feat: SEO field elements and bundle

This commit is contained in:
2026-10-27 10:53:59 +01:00
parent ab8905c429
commit deebd9aa65
15 changed files with 3871 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
import './styles.css'
import { IMAGE_TAG, SeoImageElement } from './image'
import { ROBOTS_TAG, SeoRobotsElement } from './robots'
import { SERP_TAG, SeoSerpElement } from './serp'
import { SeoTextElement, TEXT_TAG } from './text'
// 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.
if (!customElements.get(TEXT_TAG)) {
customElements.define(TEXT_TAG, SeoTextElement)
}
if (!customElements.get(ROBOTS_TAG)) {
customElements.define(ROBOTS_TAG, SeoRobotsElement)
}
if (!customElements.get(SERP_TAG)) {
customElements.define(SERP_TAG, SeoSerpElement)
}
if (!customElements.get(IMAGE_TAG)) {
customElements.define(IMAGE_TAG, SeoImageElement)
}
export { IMAGE_TAG, ROBOTS_TAG, SERP_TAG, SeoImageElement, SeoRobotsElement, SeoSerpElement, SeoTextElement, TEXT_TAG }