Files
sm-seo-plugin/assets/src/elements/index.ts
Jakub Zych 6f69031c73 feat: import and export element (E6)
- golem15-seo-transfer: export by dataset with a Blob download, the
  import file read in the browser and refused over 60 KB, the preview
  table (refused first, 200 rows, scrolling wrapper), Apply gated on
  refused and empty previews, a stale preview kept with the message
- en and pl copy; assets/dist rebuilt
2026-10-27 12:35:26 +01:00

44 lines
1.3 KiB
TypeScript

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,
}