import './styles.css' import { IMAGE_TAG, SeoImageElement } from './image' import { ROBOTS_TAG, SeoRobotsElement } from './robots' import { ROBOTSTESTER_TAG, SeoRobotsTesterElement } from './robotstester' import { ROBOTSTXT_TAG, SeoRobotsTxtElement } from './robotstxt' import { SERP_TAG, SeoSerpElement } from './serp' import { SeoTextElement, TEXT_TAG } from './text' import { SeoTransferElement, TRANSFER_TAG } from './transfer' // The admin SPA loads this script once on every admin page (the SEO field // types list it in Scripts); defining a tag twice would throw, so a second // evaluation is a no-op. const elements: Array<[string, CustomElementConstructor]> = [ [TEXT_TAG, SeoTextElement], [ROBOTS_TAG, SeoRobotsElement], [SERP_TAG, SeoSerpElement], [IMAGE_TAG, SeoImageElement], [ROBOTSTXT_TAG, SeoRobotsTxtElement], [ROBOTSTESTER_TAG, SeoRobotsTesterElement], [TRANSFER_TAG, SeoTransferElement], ] for (const [tag, ctor] of elements) { if (!customElements.get(tag)) { customElements.define(tag, ctor) } } export { IMAGE_TAG, ROBOTS_TAG, ROBOTSTESTER_TAG, ROBOTSTXT_TAG, SERP_TAG, SeoImageElement, SeoRobotsElement, SeoRobotsTesterElement, SeoRobotsTxtElement, SeoSerpElement, SeoTextElement, SeoTransferElement, TEXT_TAG, TRANSFER_TAG, }