@wildo-ai/saas-website 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +34 -0
- package/dist/esm/.builder.pid +9 -0
- package/dist/esm/astro/blog-post-bridge.d.ts +324 -0
- package/dist/esm/astro/blog-post-bridge.d.ts.map +1 -0
- package/dist/esm/astro/blog-post-bridge.js +57 -0
- package/dist/esm/astro/blog-post-bridge.js.map +1 -0
- package/dist/esm/astro/blog-post-head.renderer.d.ts +129 -0
- package/dist/esm/astro/blog-post-head.renderer.d.ts.map +1 -0
- package/dist/esm/astro/blog-post-head.renderer.js +139 -0
- package/dist/esm/astro/blog-post-head.renderer.js.map +1 -0
- package/dist/esm/astro/bridge-runtime.d.ts +224 -0
- package/dist/esm/astro/bridge-runtime.d.ts.map +1 -0
- package/dist/esm/astro/bridge-runtime.js +30 -0
- package/dist/esm/astro/bridge-runtime.js.map +1 -0
- package/dist/esm/astro/collect-expected-label-keys.d.ts +65 -0
- package/dist/esm/astro/collect-expected-label-keys.d.ts.map +1 -0
- package/dist/esm/astro/collect-expected-label-keys.js +101 -0
- package/dist/esm/astro/collect-expected-label-keys.js.map +1 -0
- package/dist/esm/astro/headers-renderer.d.ts +32 -0
- package/dist/esm/astro/headers-renderer.d.ts.map +1 -0
- package/dist/esm/astro/headers-renderer.js +64 -0
- package/dist/esm/astro/headers-renderer.js.map +1 -0
- package/dist/esm/astro/i18n-routing.helper.d.ts +91 -0
- package/dist/esm/astro/i18n-routing.helper.d.ts.map +1 -0
- package/dist/esm/astro/i18n-routing.helper.js +23 -0
- package/dist/esm/astro/i18n-routing.helper.js.map +1 -0
- package/dist/esm/astro/internal/html-escape.d.ts +31 -0
- package/dist/esm/astro/internal/html-escape.d.ts.map +1 -0
- package/dist/esm/astro/internal/html-escape.js +40 -0
- package/dist/esm/astro/internal/html-escape.js.map +1 -0
- package/dist/esm/astro/label-pack-loader.d.ts +134 -0
- package/dist/esm/astro/label-pack-loader.d.ts.map +1 -0
- package/dist/esm/astro/label-pack-loader.js +298 -0
- package/dist/esm/astro/label-pack-loader.js.map +1 -0
- package/dist/esm/astro/llms-txt-server.d.ts +28 -0
- package/dist/esm/astro/llms-txt-server.d.ts.map +1 -0
- package/dist/esm/astro/llms-txt-server.js +33 -0
- package/dist/esm/astro/llms-txt-server.js.map +1 -0
- package/dist/esm/astro/pick-labels-for-page.d.ts +63 -0
- package/dist/esm/astro/pick-labels-for-page.d.ts.map +1 -0
- package/dist/esm/astro/pick-labels-for-page.js +73 -0
- package/dist/esm/astro/pick-labels-for-page.js.map +1 -0
- package/dist/esm/astro/robots-renderer.d.ts +85 -0
- package/dist/esm/astro/robots-renderer.d.ts.map +1 -0
- package/dist/esm/astro/robots-renderer.js +157 -0
- package/dist/esm/astro/robots-renderer.js.map +1 -0
- package/dist/esm/astro/sitemap-coverage.d.ts +101 -0
- package/dist/esm/astro/sitemap-coverage.d.ts.map +1 -0
- package/dist/esm/astro/sitemap-coverage.js +67 -0
- package/dist/esm/astro/sitemap-coverage.js.map +1 -0
- package/dist/esm/astro/structured-data.renderer.d.ts +21 -0
- package/dist/esm/astro/structured-data.renderer.d.ts.map +1 -0
- package/dist/esm/astro/structured-data.renderer.js +142 -0
- package/dist/esm/astro/structured-data.renderer.js.map +1 -0
- package/dist/esm/astro/website-page-head.renderer.d.ts +93 -0
- package/dist/esm/astro/website-page-head.renderer.d.ts.map +1 -0
- package/dist/esm/astro/website-page-head.renderer.js +184 -0
- package/dist/esm/astro/website-page-head.renderer.js.map +1 -0
- package/dist/esm/astro/website-page-runtime.helper.d.ts +112 -0
- package/dist/esm/astro/website-page-runtime.helper.d.ts.map +1 -0
- package/dist/esm/astro/website-page-runtime.helper.js +60 -0
- package/dist/esm/astro/website-page-runtime.helper.js.map +1 -0
- package/dist/esm/astro/website-site-context.d.ts +126 -0
- package/dist/esm/astro/website-site-context.d.ts.map +1 -0
- package/dist/esm/astro/website-site-context.js +37 -0
- package/dist/esm/astro/website-site-context.js.map +1 -0
- package/dist/esm/astro-island.d.ts +56 -0
- package/dist/esm/astro-island.d.ts.map +1 -0
- package/dist/esm/astro-island.js +61 -0
- package/dist/esm/astro-island.js.map +1 -0
- package/dist/esm/astro.d.ts +151 -0
- package/dist/esm/astro.d.ts.map +1 -0
- package/dist/esm/astro.js +151 -0
- package/dist/esm/astro.js.map +1 -0
- package/dist/esm/companion-exports.d.ts +38 -0
- package/dist/esm/companion-exports.d.ts.map +1 -0
- package/dist/esm/companion-exports.js +38 -0
- package/dist/esm/companion-exports.js.map +1 -0
- package/dist/esm/components/low-level/WebsiteButton.d.ts +73 -0
- package/dist/esm/components/low-level/WebsiteButton.d.ts.map +1 -0
- package/dist/esm/components/low-level/WebsiteButton.js +68 -0
- package/dist/esm/components/low-level/WebsiteButton.js.map +1 -0
- package/dist/esm/components/low-level/WebsiteHeading.d.ts +78 -0
- package/dist/esm/components/low-level/WebsiteHeading.d.ts.map +1 -0
- package/dist/esm/components/low-level/WebsiteHeading.js +41 -0
- package/dist/esm/components/low-level/WebsiteHeading.js.map +1 -0
- package/dist/esm/components/low-level/WebsiteImage.d.ts +73 -0
- package/dist/esm/components/low-level/WebsiteImage.d.ts.map +1 -0
- package/dist/esm/components/low-level/WebsiteImage.js +21 -0
- package/dist/esm/components/low-level/WebsiteImage.js.map +1 -0
- package/dist/esm/components/low-level/WebsiteInternalButton.d.ts +90 -0
- package/dist/esm/components/low-level/WebsiteInternalButton.d.ts.map +1 -0
- package/dist/esm/components/low-level/WebsiteInternalButton.js +47 -0
- package/dist/esm/components/low-level/WebsiteInternalButton.js.map +1 -0
- package/dist/esm/components/low-level/WebsiteInternalLink.d.ts +99 -0
- package/dist/esm/components/low-level/WebsiteInternalLink.d.ts.map +1 -0
- package/dist/esm/components/low-level/WebsiteInternalLink.js +68 -0
- package/dist/esm/components/low-level/WebsiteInternalLink.js.map +1 -0
- package/dist/esm/components/low-level/WebsiteLink.d.ts +50 -0
- package/dist/esm/components/low-level/WebsiteLink.d.ts.map +1 -0
- package/dist/esm/components/low-level/WebsiteLink.js +22 -0
- package/dist/esm/components/low-level/WebsiteLink.js.map +1 -0
- package/dist/esm/components/low-level/WebsiteText.d.ts +57 -0
- package/dist/esm/components/low-level/WebsiteText.d.ts.map +1 -0
- package/dist/esm/components/low-level/WebsiteText.js +57 -0
- package/dist/esm/components/low-level/WebsiteText.js.map +1 -0
- package/dist/esm/config/define-website-config.d.ts +83 -0
- package/dist/esm/config/define-website-config.d.ts.map +1 -0
- package/dist/esm/config/define-website-config.js +126 -0
- package/dist/esm/config/define-website-config.js.map +1 -0
- package/dist/esm/config/index.d.ts +38 -0
- package/dist/esm/config/index.d.ts.map +1 -0
- package/dist/esm/config/index.js +38 -0
- package/dist/esm/config/index.js.map +1 -0
- package/dist/esm/config/load-website-config.d.ts +136 -0
- package/dist/esm/config/load-website-config.d.ts.map +1 -0
- package/dist/esm/config/load-website-config.js +177 -0
- package/dist/esm/config/load-website-config.js.map +1 -0
- package/dist/esm/config/wildo-website-config.schemas.d.ts +251 -0
- package/dist/esm/config/wildo-website-config.schemas.d.ts.map +1 -0
- package/dist/esm/config/wildo-website-config.schemas.js +302 -0
- package/dist/esm/config/wildo-website-config.schemas.js.map +1 -0
- package/dist/esm/config-loader.d.ts +35 -0
- package/dist/esm/config-loader.d.ts.map +1 -0
- package/dist/esm/config-loader.js +35 -0
- package/dist/esm/config-loader.js.map +1 -0
- package/dist/esm/core/anonymous-session/InboundContactForm.d.ts +38 -0
- package/dist/esm/core/anonymous-session/InboundContactForm.d.ts.map +1 -0
- package/dist/esm/core/anonymous-session/InboundContactForm.js +77 -0
- package/dist/esm/core/anonymous-session/InboundContactForm.js.map +1 -0
- package/dist/esm/core/anonymous-session/inbound-contact-form.schema.d.ts +41 -0
- package/dist/esm/core/anonymous-session/inbound-contact-form.schema.d.ts.map +1 -0
- package/dist/esm/core/anonymous-session/inbound-contact-form.schema.js +58 -0
- package/dist/esm/core/anonymous-session/inbound-contact-form.schema.js.map +1 -0
- package/dist/esm/core/anonymous-session/website-anonymous-session-client.d.ts +81 -0
- package/dist/esm/core/anonymous-session/website-anonymous-session-client.d.ts.map +1 -0
- package/dist/esm/core/anonymous-session/website-anonymous-session-client.js +177 -0
- package/dist/esm/core/anonymous-session/website-anonymous-session-client.js.map +1 -0
- package/dist/esm/core/contexts/WebsitePageContext.d.ts +40 -0
- package/dist/esm/core/contexts/WebsitePageContext.d.ts.map +1 -0
- package/dist/esm/core/contexts/WebsitePageContext.js +8 -0
- package/dist/esm/core/contexts/WebsitePageContext.js.map +1 -0
- package/dist/esm/core/contexts/WebsiteRuntimeContext.d.ts +162 -0
- package/dist/esm/core/contexts/WebsiteRuntimeContext.d.ts.map +1 -0
- package/dist/esm/core/contexts/WebsiteRuntimeContext.js +22 -0
- package/dist/esm/core/contexts/WebsiteRuntimeContext.js.map +1 -0
- package/dist/esm/core/contexts/WebsiteSectionContext.d.ts +47 -0
- package/dist/esm/core/contexts/WebsiteSectionContext.d.ts.map +1 -0
- package/dist/esm/core/contexts/WebsiteSectionContext.js +8 -0
- package/dist/esm/core/contexts/WebsiteSectionContext.js.map +1 -0
- package/dist/esm/core/contexts/useWebsitePage.d.ts +13 -0
- package/dist/esm/core/contexts/useWebsitePage.d.ts.map +1 -0
- package/dist/esm/core/contexts/useWebsitePage.js +22 -0
- package/dist/esm/core/contexts/useWebsitePage.js.map +1 -0
- package/dist/esm/core/contexts/useWebsiteRuntime.d.ts +19 -0
- package/dist/esm/core/contexts/useWebsiteRuntime.d.ts.map +1 -0
- package/dist/esm/core/contexts/useWebsiteRuntime.js +28 -0
- package/dist/esm/core/contexts/useWebsiteRuntime.js.map +1 -0
- package/dist/esm/core/contexts/useWebsiteSection.d.ts +12 -0
- package/dist/esm/core/contexts/useWebsiteSection.d.ts.map +1 -0
- package/dist/esm/core/contexts/useWebsiteSection.js +22 -0
- package/dist/esm/core/contexts/useWebsiteSection.js.map +1 -0
- package/dist/esm/core/external-providers/frontend-provider-registry.website.d.ts +17 -0
- package/dist/esm/core/external-providers/frontend-provider-registry.website.d.ts.map +1 -0
- package/dist/esm/core/external-providers/frontend-provider-registry.website.js +23 -0
- package/dist/esm/core/external-providers/frontend-provider-registry.website.js.map +1 -0
- package/dist/esm/core/factories/define-website-page-manifest.d.ts +70 -0
- package/dist/esm/core/factories/define-website-page-manifest.d.ts.map +1 -0
- package/dist/esm/core/factories/define-website-page-manifest.js +51 -0
- package/dist/esm/core/factories/define-website-page-manifest.js.map +1 -0
- package/dist/esm/core/factories/define-website-section.d.ts +101 -0
- package/dist/esm/core/factories/define-website-section.d.ts.map +1 -0
- package/dist/esm/core/factories/define-website-section.js +71 -0
- package/dist/esm/core/factories/define-website-section.js.map +1 -0
- package/dist/esm/core/hooks/useWebsiteDesignTokens.d.ts +23 -0
- package/dist/esm/core/hooks/useWebsiteDesignTokens.d.ts.map +1 -0
- package/dist/esm/core/hooks/useWebsiteDesignTokens.js +25 -0
- package/dist/esm/core/hooks/useWebsiteDesignTokens.js.map +1 -0
- package/dist/esm/core/hooks/useWebsiteLabel.d.ts +68 -0
- package/dist/esm/core/hooks/useWebsiteLabel.d.ts.map +1 -0
- package/dist/esm/core/hooks/useWebsiteLabel.js +103 -0
- package/dist/esm/core/hooks/useWebsiteLabel.js.map +1 -0
- package/dist/esm/core/layouts/WebsitePageLayout.d.ts +87 -0
- package/dist/esm/core/layouts/WebsitePageLayout.d.ts.map +1 -0
- package/dist/esm/core/layouts/WebsitePageLayout.js +170 -0
- package/dist/esm/core/layouts/WebsitePageLayout.js.map +1 -0
- package/dist/esm/core/layouts/WebsiteSection.d.ts +91 -0
- package/dist/esm/core/layouts/WebsiteSection.d.ts.map +1 -0
- package/dist/esm/core/layouts/WebsiteSection.js +26 -0
- package/dist/esm/core/layouts/WebsiteSection.js.map +1 -0
- package/dist/esm/core/routing/internal-routing.utils.d.ts +65 -0
- package/dist/esm/core/routing/internal-routing.utils.d.ts.map +1 -0
- package/dist/esm/core/routing/internal-routing.utils.js +14 -0
- package/dist/esm/core/routing/internal-routing.utils.js.map +1 -0
- package/dist/esm/index.d.ts +129 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +129 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/mdx/BlogPost.d.ts +193 -0
- package/dist/esm/mdx/BlogPost.d.ts.map +1 -0
- package/dist/esm/mdx/BlogPost.js +161 -0
- package/dist/esm/mdx/BlogPost.js.map +1 -0
- package/dist/esm/mdx/blog-post-collection.config.d.ts +139 -0
- package/dist/esm/mdx/blog-post-collection.config.d.ts.map +1 -0
- package/dist/esm/mdx/blog-post-collection.config.js +27 -0
- package/dist/esm/mdx/blog-post-collection.config.js.map +1 -0
- package/dist/esm/mdx/blog-post-frontmatter-source.d.ts +12 -0
- package/dist/esm/mdx/blog-post-frontmatter-source.d.ts.map +1 -0
- package/dist/esm/mdx/blog-post-frontmatter-source.js +13 -0
- package/dist/esm/mdx/blog-post-frontmatter-source.js.map +1 -0
- package/dist/esm/mdx/index.d.ts +22 -0
- package/dist/esm/mdx/index.d.ts.map +1 -0
- package/dist/esm/mdx/index.js +22 -0
- package/dist/esm/mdx/index.js.map +1 -0
- package/dist/esm/mdx/website-mdx-provider.d.ts +90 -0
- package/dist/esm/mdx/website-mdx-provider.d.ts.map +1 -0
- package/dist/esm/mdx/website-mdx-provider.js +8 -0
- package/dist/esm/mdx/website-mdx-provider.js.map +1 -0
- package/dist/esm/mdx.d.ts +38 -0
- package/dist/esm/mdx.d.ts.map +1 -0
- package/dist/esm/mdx.js +38 -0
- package/dist/esm/mdx.js.map +1 -0
- package/dist/esm/schemas/blog/blog-post-frontmatter.shared.schemas.d.ts +75 -0
- package/dist/esm/schemas/blog/blog-post-frontmatter.shared.schemas.d.ts.map +1 -0
- package/dist/esm/schemas/blog/blog-post-frontmatter.shared.schemas.js +85 -0
- package/dist/esm/schemas/blog/blog-post-frontmatter.shared.schemas.js.map +1 -0
- package/dist/esm/schemas/design-tokens/website-design-tokens.shared.schemas.d.ts +120 -0
- package/dist/esm/schemas/design-tokens/website-design-tokens.shared.schemas.d.ts.map +1 -0
- package/dist/esm/schemas/design-tokens/website-design-tokens.shared.schemas.js +152 -0
- package/dist/esm/schemas/design-tokens/website-design-tokens.shared.schemas.js.map +1 -0
- package/dist/esm/schemas/label-keys/website-label-key.schemas.d.ts +73 -0
- package/dist/esm/schemas/label-keys/website-label-key.schemas.d.ts.map +1 -0
- package/dist/esm/schemas/label-keys/website-label-key.schemas.js +76 -0
- package/dist/esm/schemas/label-keys/website-label-key.schemas.js.map +1 -0
- package/dist/esm/schemas/manifests/website-page-manifest.shared.schemas.d.ts +209 -0
- package/dist/esm/schemas/manifests/website-page-manifest.shared.schemas.d.ts.map +1 -0
- package/dist/esm/schemas/manifests/website-page-manifest.shared.schemas.js +218 -0
- package/dist/esm/schemas/manifests/website-page-manifest.shared.schemas.js.map +1 -0
- package/dist/esm/schemas/manifests/website-root-config.shared.schemas.d.ts +431 -0
- package/dist/esm/schemas/manifests/website-root-config.shared.schemas.d.ts.map +1 -0
- package/dist/esm/schemas/manifests/website-root-config.shared.schemas.js +438 -0
- package/dist/esm/schemas/manifests/website-root-config.shared.schemas.js.map +1 -0
- package/dist/esm/schemas/refs/page-ref.schemas.d.ts +40 -0
- package/dist/esm/schemas/refs/page-ref.schemas.d.ts.map +1 -0
- package/dist/esm/schemas/refs/page-ref.schemas.js +43 -0
- package/dist/esm/schemas/refs/page-ref.schemas.js.map +1 -0
- package/dist/esm/schemas/refs/section-ref.schemas.d.ts +41 -0
- package/dist/esm/schemas/refs/section-ref.schemas.d.ts.map +1 -0
- package/dist/esm/schemas/refs/section-ref.schemas.js +44 -0
- package/dist/esm/schemas/refs/section-ref.schemas.js.map +1 -0
- package/dist/esm/schemas/sections/website-section-category.shared.d.ts +63 -0
- package/dist/esm/schemas/sections/website-section-category.shared.d.ts.map +1 -0
- package/dist/esm/schemas/sections/website-section-category.shared.js +64 -0
- package/dist/esm/schemas/sections/website-section-category.shared.js.map +1 -0
- package/dist/esm/schemas/sections/website-section-definition.shared.schemas.d.ts +114 -0
- package/dist/esm/schemas/sections/website-section-definition.shared.schemas.d.ts.map +1 -0
- package/dist/esm/schemas/sections/website-section-definition.shared.schemas.js +69 -0
- package/dist/esm/schemas/sections/website-section-definition.shared.schemas.js.map +1 -0
- package/dist/esm/schemas/structured-data/structured-data-reconciliation.shared.d.ts +100 -0
- package/dist/esm/schemas/structured-data/structured-data-reconciliation.shared.d.ts.map +1 -0
- package/dist/esm/schemas/structured-data/structured-data-reconciliation.shared.js +355 -0
- package/dist/esm/schemas/structured-data/structured-data-reconciliation.shared.js.map +1 -0
- package/dist/esm/schemas/structured-data/website-structured-data.shared.schemas.d.ts +58 -0
- package/dist/esm/schemas/structured-data/website-structured-data.shared.schemas.d.ts.map +1 -0
- package/dist/esm/schemas/structured-data/website-structured-data.shared.schemas.js +2 -0
- package/dist/esm/schemas/structured-data/website-structured-data.shared.schemas.js.map +1 -0
- package/dist/esm/schemas/validators/label-pack.validator.d.ts +144 -0
- package/dist/esm/schemas/validators/label-pack.validator.d.ts.map +1 -0
- package/dist/esm/schemas/validators/label-pack.validator.js +100 -0
- package/dist/esm/schemas/validators/label-pack.validator.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/package.json +143 -0
- package/src/__tests__/bundle-isolation.test.ts +607 -0
- package/src/astro/__tests__/blog-post-bridge.test.tsx +288 -0
- package/src/astro/__tests__/blog-post-head.renderer.test.ts +249 -0
- package/src/astro/__tests__/bridge-runtime.test.tsx +198 -0
- package/src/astro/__tests__/collect-expected-label-keys.test.ts +69 -0
- package/src/astro/__tests__/headers-renderer.test.ts +143 -0
- package/src/astro/__tests__/i18n-routing.helper.test.ts +116 -0
- package/src/astro/__tests__/label-pack-loader.test.ts +305 -0
- package/src/astro/__tests__/llms-txt-server.test.ts +127 -0
- package/src/astro/__tests__/pick-labels-for-page.test.ts +60 -0
- package/src/astro/__tests__/robots-renderer.test.ts +228 -0
- package/src/astro/__tests__/sitemap-coverage.test.ts +230 -0
- package/src/astro/__tests__/structured-data.renderer.test.ts +172 -0
- package/src/astro/__tests__/website-page-head.renderer.test.ts +424 -0
- package/src/astro/__tests__/website-page-runtime.helper.test.ts +157 -0
- package/src/astro/__tests__/website-site-context.test.ts +121 -0
- package/src/astro/blog-post-bridge.tsx +404 -0
- package/src/astro/blog-post-head.renderer.ts +293 -0
- package/src/astro/bridge-runtime.tsx +270 -0
- package/src/astro/collect-expected-label-keys.ts +113 -0
- package/src/astro/headers-renderer.ts +82 -0
- package/src/astro/i18n-routing.helper.ts +116 -0
- package/src/astro/internal/html-escape.ts +41 -0
- package/src/astro/label-pack-loader.ts +385 -0
- package/src/astro/llms-txt-server.ts +56 -0
- package/src/astro/pick-labels-for-page.ts +85 -0
- package/src/astro/robots-renderer.ts +171 -0
- package/src/astro/sitemap-coverage.ts +186 -0
- package/src/astro/structured-data.renderer.ts +171 -0
- package/src/astro/website-page-head.renderer.ts +279 -0
- package/src/astro/website-page-runtime.helper.ts +188 -0
- package/src/astro/website-site-context.ts +136 -0
- package/src/astro-island.ts +61 -0
- package/src/astro.ts +151 -0
- package/src/companion-exports.ts +38 -0
- package/src/components/low-level/WebsiteButton.tsx +118 -0
- package/src/components/low-level/WebsiteHeading.tsx +96 -0
- package/src/components/low-level/WebsiteImage.tsx +96 -0
- package/src/components/low-level/WebsiteInternalButton.tsx +172 -0
- package/src/components/low-level/WebsiteInternalLink.tsx +193 -0
- package/src/components/low-level/WebsiteLink.tsx +71 -0
- package/src/components/low-level/WebsiteText.tsx +75 -0
- package/src/components/low-level/__tests__/WebsiteInternalButton.test.tsx +169 -0
- package/src/components/low-level/__tests__/WebsiteInternalLink.test.tsx +202 -0
- package/src/components/low-level/__tests__/primitives.test.tsx +141 -0
- package/src/config/__tests__/define-website-config.test.ts +231 -0
- package/src/config/__tests__/load-website-config.test.ts +215 -0
- package/src/config/define-website-config.ts +134 -0
- package/src/config/index.ts +38 -0
- package/src/config/load-website-config.ts +229 -0
- package/src/config/wildo-website-config.schemas.ts +322 -0
- package/src/config-loader.ts +35 -0
- package/src/core/__tests__/WebsitePageLayout.test.tsx +184 -0
- package/src/core/__tests__/WebsiteSection.test.tsx +85 -0
- package/src/core/__tests__/contexts.test.tsx +133 -0
- package/src/core/__tests__/core-boundary.test.ts +85 -0
- package/src/core/__tests__/define-website-page-manifest.test.tsx +111 -0
- package/src/core/__tests__/define-website-section.test.tsx +89 -0
- package/src/core/__tests__/useWebsiteDesignTokens.test.tsx +41 -0
- package/src/core/__tests__/useWebsiteLabel.test.tsx +117 -0
- package/src/core/anonymous-session/InboundContactForm.tsx +157 -0
- package/src/core/anonymous-session/__tests__/inbound-contact-form.schema.test.ts +44 -0
- package/src/core/anonymous-session/inbound-contact-form.schema.ts +62 -0
- package/src/core/anonymous-session/website-anonymous-session-client.ts +194 -0
- package/src/core/contexts/WebsitePageContext.tsx +52 -0
- package/src/core/contexts/WebsiteRuntimeContext.tsx +175 -0
- package/src/core/contexts/WebsiteSectionContext.tsx +59 -0
- package/src/core/contexts/useWebsitePage.ts +28 -0
- package/src/core/contexts/useWebsiteRuntime.ts +34 -0
- package/src/core/contexts/useWebsiteSection.ts +28 -0
- package/src/core/external-providers/frontend-provider-registry.website.ts +62 -0
- package/src/core/factories/define-website-page-manifest.ts +102 -0
- package/src/core/factories/define-website-section.ts +128 -0
- package/src/core/hooks/useWebsiteDesignTokens.ts +26 -0
- package/src/core/hooks/useWebsiteLabel.ts +121 -0
- package/src/core/layouts/WebsitePageLayout.tsx +311 -0
- package/src/core/layouts/WebsiteSection.tsx +139 -0
- package/src/core/routing/__tests__/internal-routing.utils.test.ts +134 -0
- package/src/core/routing/internal-routing.utils.ts +77 -0
- package/src/index.ts +132 -0
- package/src/mdx/BlogPost.tsx +296 -0
- package/src/mdx/__tests__/BlogPost.test.tsx +218 -0
- package/src/mdx/__tests__/blog-post-collection.config.test.ts +127 -0
- package/src/mdx/__tests__/website-mdx-provider.test.tsx +82 -0
- package/src/mdx/blog-post-collection.config.ts +177 -0
- package/src/mdx/blog-post-frontmatter-source.ts +31 -0
- package/src/mdx/index.ts +39 -0
- package/src/mdx/website-mdx-provider.tsx +95 -0
- package/src/mdx.ts +38 -0
- package/src/schemas/__tests__/blog-frontmatter.test.ts +50 -0
- package/src/schemas/__tests__/companion-exports-react-free.test.ts +51 -0
- package/src/schemas/__tests__/design-tokens.test.ts +163 -0
- package/src/schemas/__tests__/label-key.test.ts +46 -0
- package/src/schemas/__tests__/label-pack-validator.test.ts +146 -0
- package/src/schemas/__tests__/page-manifest.test.ts +66 -0
- package/src/schemas/__tests__/refs.test.ts +37 -0
- package/src/schemas/__tests__/root-config.test.ts +292 -0
- package/src/schemas/__tests__/section-definition.test.ts +47 -0
- package/src/schemas/__tests__/structured-data-reconciliation.test.ts +543 -0
- package/src/schemas/blog/blog-post-frontmatter.shared.schemas.ts +111 -0
- package/src/schemas/design-tokens/website-design-tokens.shared.schemas.ts +166 -0
- package/src/schemas/label-keys/website-label-key.schemas.ts +88 -0
- package/src/schemas/manifests/website-page-manifest.shared.schemas.ts +266 -0
- package/src/schemas/manifests/website-root-config.shared.schemas.ts +504 -0
- package/src/schemas/refs/page-ref.schemas.ts +49 -0
- package/src/schemas/refs/section-ref.schemas.ts +50 -0
- package/src/schemas/sections/website-section-category.shared.ts +65 -0
- package/src/schemas/sections/website-section-definition.shared.schemas.ts +120 -0
- package/src/schemas/structured-data/structured-data-reconciliation.shared.ts +579 -0
- package/src/schemas/structured-data/website-structured-data.shared.schemas.ts +62 -0
- package/src/schemas/validators/label-pack.validator.ts +201 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* @wildo_source:part:start saas.website.refs.section facet:layer:shared facet:family:website
|
|
4
|
+
*
|
|
5
|
+
* `WebsiteSectionRef` — branded kebab-case identifier for one section on a
|
|
6
|
+
* page (e.g. `'hero'`, `'social-proof'`, `'pricing-teaser'`, `'final-cta'`).
|
|
7
|
+
*
|
|
8
|
+
* The section ref is the **section-level structural identity**:
|
|
9
|
+
*
|
|
10
|
+
* 1. **Label-key root**: every label leaf consumed inside a section is
|
|
11
|
+
* rooted at `website.<pageRef>.<sectionRef>.<slot>`. The hook
|
|
12
|
+
* `useWebsiteLabel('headline')` (Phase 2) reads `WebsiteSectionContext`
|
|
13
|
+
* to derive the full key; the section author never types the page or
|
|
14
|
+
* section ref into a label call.
|
|
15
|
+
* 2. **Page manifest contract**: `WebsitePageManifest.sectionRefs[]`
|
|
16
|
+
* declares the refs the page commits to. The label-pack validator
|
|
17
|
+
* cross-references the manifest's declared refs against the actual
|
|
18
|
+
* sections rendered, surfacing mismatches at build start.
|
|
19
|
+
* 3. **DOM landmark**: `<WebsiteSection ref="…">` (Phase 2) emits
|
|
20
|
+
* `<section data-section-ref="…">` so analytics, scroll-tracking, and
|
|
21
|
+
* automated audits can identify sections without parsing class names.
|
|
22
|
+
*
|
|
23
|
+
* **Format**: lowercase ASCII letters, digits and `-`. Must start with a
|
|
24
|
+
* letter. 1–64 characters. Same shape as `WebsitePageRef` for consistency
|
|
25
|
+
* across both ref scopes.
|
|
26
|
+
*
|
|
27
|
+
* **Why a brand**: same reasoning as `WebsitePageRef`. The two refs are
|
|
28
|
+
* structurally identical strings but semantically distinct — branding
|
|
29
|
+
* prevents accidental swaps between page-level and section-level APIs at
|
|
30
|
+
* compile time.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* const heroRef = WebsiteSectionRefSchema.parse('hero');
|
|
34
|
+
* const ctaRef = WebsiteSectionRefSchema.parse('final-cta');
|
|
35
|
+
*/
|
|
36
|
+
const _WebsiteSectionRefSchema = z
|
|
37
|
+
.string()
|
|
38
|
+
.min(1, { error: 'WebsiteSectionRef must be at least 1 character' })
|
|
39
|
+
.max(64, { error: 'WebsiteSectionRef must be at most 64 characters' })
|
|
40
|
+
.regex(/^[a-z][a-z0-9-]*$/, { error: 'WebsiteSectionRef must be lowercase kebab-case starting with a letter (e.g. "hero", "social-proof")' })
|
|
41
|
+
.brand();
|
|
42
|
+
export const WebsiteSectionRefSchema = _WebsiteSectionRefSchema;
|
|
43
|
+
/** @wildo_source:part:end saas.website.refs.section */
|
|
44
|
+
//# sourceMappingURL=section-ref.schemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"section-ref.schemas.js","sourceRoot":"","sources":["../../../../../src/schemas/refs/section-ref.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,MAAM,wBAAwB,GAAG,CAAC;KAC/B,MAAM,EAAE;KACR,GAAG,CAAC,CAAC,EAAE,EAAE,KAAK,EAAE,gDAAgD,EAAE,CAAC;KACnE,GAAG,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,iDAAiD,EAAE,CAAC;KACrE,KAAK,CACJ,mBAAmB,EACnB,EAAE,KAAK,EAAE,qGAAqG,EAAE,CACjH;KACA,KAAK,EAAuB,CAAC;AAEhC,MAAM,CAAC,MAAM,uBAAuB,GAAoC,wBAAwB,CAAC;AAGjG,uDAAuD","sourcesContent":["import { z } from 'zod';\n\n/**\n * @wildo_source:part:start saas.website.refs.section facet:layer:shared facet:family:website\n *\n * `WebsiteSectionRef` — branded kebab-case identifier for one section on a\n * page (e.g. `'hero'`, `'social-proof'`, `'pricing-teaser'`, `'final-cta'`).\n *\n * The section ref is the **section-level structural identity**:\n *\n * 1. **Label-key root**: every label leaf consumed inside a section is\n * rooted at `website.<pageRef>.<sectionRef>.<slot>`. The hook\n * `useWebsiteLabel('headline')` (Phase 2) reads `WebsiteSectionContext`\n * to derive the full key; the section author never types the page or\n * section ref into a label call.\n * 2. **Page manifest contract**: `WebsitePageManifest.sectionRefs[]`\n * declares the refs the page commits to. The label-pack validator\n * cross-references the manifest's declared refs against the actual\n * sections rendered, surfacing mismatches at build start.\n * 3. **DOM landmark**: `<WebsiteSection ref=\"…\">` (Phase 2) emits\n * `<section data-section-ref=\"…\">` so analytics, scroll-tracking, and\n * automated audits can identify sections without parsing class names.\n *\n * **Format**: lowercase ASCII letters, digits and `-`. Must start with a\n * letter. 1–64 characters. Same shape as `WebsitePageRef` for consistency\n * across both ref scopes.\n *\n * **Why a brand**: same reasoning as `WebsitePageRef`. The two refs are\n * structurally identical strings but semantically distinct — branding\n * prevents accidental swaps between page-level and section-level APIs at\n * compile time.\n *\n * @example\n * const heroRef = WebsiteSectionRefSchema.parse('hero');\n * const ctaRef = WebsiteSectionRefSchema.parse('final-cta');\n */\nconst _WebsiteSectionRefSchema = z\n .string()\n .min(1, { error: 'WebsiteSectionRef must be at least 1 character' })\n .max(64, { error: 'WebsiteSectionRef must be at most 64 characters' })\n .regex(\n /^[a-z][a-z0-9-]*$/,\n { error: 'WebsiteSectionRef must be lowercase kebab-case starting with a letter (e.g. \"hero\", \"social-proof\")' },\n )\n .brand<'WebsiteSectionRef'>();\n\nexport const WebsiteSectionRefSchema: typeof _WebsiteSectionRefSchema = _WebsiteSectionRefSchema;\n\nexport type WebsiteSectionRef = z.infer<typeof _WebsiteSectionRefSchema>;\n/** @wildo_source:part:end saas.website.refs.section */\n"]}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* @wildo_source:part:start saas.website.sections.category-enum facet:layer:shared facet:family:website
|
|
4
|
+
*
|
|
5
|
+
* `WebsiteSectionCategory` — closed vocabulary tagging the **structural
|
|
6
|
+
* intent** of a section.
|
|
7
|
+
*
|
|
8
|
+
* The category is NOT a layout-shape constraint and NOT a CSS class; the
|
|
9
|
+
* framework ships zero concrete sections and never inspects
|
|
10
|
+
* the category at render time. The category exists for three orthogonal
|
|
11
|
+
* non-render concerns:
|
|
12
|
+
*
|
|
13
|
+
* 1. **Structured-data dispatch**: the
|
|
14
|
+
* SEO library reads `WebsiteSectionDefinition.category` to decide
|
|
15
|
+
* which JSON-LD vocabulary the section's `getStructuredData()` hook
|
|
16
|
+
* is allowed to emit. e.g. `PRICING` may emit `Product` /
|
|
17
|
+
* `AggregateOffer`; `FAQ` may emit `FAQPage`; `HERO` may emit
|
|
18
|
+
* `Organization` / `WebSite`. Mismatches are surfaced as build-time
|
|
19
|
+
* warnings.
|
|
20
|
+
* 2. **Authoring guidance**: each value has matching application-builder
|
|
21
|
+
* guidance. When introducing a new category, provide its public authoring
|
|
22
|
+
* method before asking an application to use it.
|
|
23
|
+
* 3. **Analytics labelling**: the runtime emits
|
|
24
|
+
* `data-section-category="…"` on the `<WebsiteSection>` wrapper so
|
|
25
|
+
* analytics tooling can group section impressions
|
|
26
|
+
* without parsing className conventions.
|
|
27
|
+
*
|
|
28
|
+
* **Closed vocabulary on purpose**: a free-string `category` would
|
|
29
|
+
* defeat the skill-mapping and SEO-dispatch contracts. Consumers who
|
|
30
|
+
* need a wholly-novel section shape use the `RAW` advanced path
|
|
31
|
+
* (`website-factory-advanced` skill) which bypasses the category
|
|
32
|
+
* vocabulary entirely.
|
|
33
|
+
*
|
|
34
|
+
* **Adding a value**: requires (a) a new entry here, (b) a matching
|
|
35
|
+
* `website_section_<value>` skill stub, (c) (optionally) a
|
|
36
|
+
* structured-data dispatch entry in the SEO library. Removing a value
|
|
37
|
+
* is a labelled rename — every consumer's
|
|
38
|
+
* `defineWebsiteSection({ category: … })` declaration breaks at compile
|
|
39
|
+
* time, which is the desired loud failure.
|
|
40
|
+
*/
|
|
41
|
+
export declare enum WebsiteSectionCategory {
|
|
42
|
+
HERO = "hero",
|
|
43
|
+
CTA = "cta",
|
|
44
|
+
FEATURE_BENEFIT_SUMMARY = "feature-benefit-summary",
|
|
45
|
+
FEATURE_DETAIL = "feature-detail",
|
|
46
|
+
PRICING = "pricing",
|
|
47
|
+
CONTACT = "contact",
|
|
48
|
+
SOCIAL_PROOF = "social-proof",
|
|
49
|
+
FAQ = "faq",
|
|
50
|
+
FOOTER_CTA = "footer-cta",
|
|
51
|
+
/**
|
|
52
|
+
* Escape hatch for sections that don't fit any standard category
|
|
53
|
+
* (third-party widgets, custom one-off marketing pieces). Skips the
|
|
54
|
+
* SEO-dispatch contract — the section's `getStructuredData()` may
|
|
55
|
+
* return any vocabulary, no validation. Authors should prefer a
|
|
56
|
+
* concrete category whenever possible; using `RAW` opts the section
|
|
57
|
+
* out of the framework's structured-data safety net.
|
|
58
|
+
*/
|
|
59
|
+
RAW = "raw"
|
|
60
|
+
}
|
|
61
|
+
export declare const WebsiteSectionCategorySchema: z.ZodEnum<typeof WebsiteSectionCategory>;
|
|
62
|
+
/** @wildo_source:part:end saas.website.sections.category-enum */
|
|
63
|
+
//# sourceMappingURL=website-section-category.shared.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"website-section-category.shared.d.ts","sourceRoot":"","sources":["../../../../../src/schemas/sections/website-section-category.shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,oBAAY,sBAAsB;IAChC,IAAI,SAAS;IACb,GAAG,QAAQ;IACX,uBAAuB,4BAA4B;IACnD,cAAc,mBAAmB;IACjC,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,YAAY,iBAAiB;IAC7B,GAAG,QAAQ;IACX,UAAU,eAAe;IACzB;;;;;;;OAOG;IACH,GAAG,QAAQ;CACZ;AAED,eAAO,MAAM,4BAA4B,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,sBAAsB,CAClD,CAAC;AACjC,iEAAiE"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* @wildo_source:part:start saas.website.sections.category-enum facet:layer:shared facet:family:website
|
|
4
|
+
*
|
|
5
|
+
* `WebsiteSectionCategory` — closed vocabulary tagging the **structural
|
|
6
|
+
* intent** of a section.
|
|
7
|
+
*
|
|
8
|
+
* The category is NOT a layout-shape constraint and NOT a CSS class; the
|
|
9
|
+
* framework ships zero concrete sections and never inspects
|
|
10
|
+
* the category at render time. The category exists for three orthogonal
|
|
11
|
+
* non-render concerns:
|
|
12
|
+
*
|
|
13
|
+
* 1. **Structured-data dispatch**: the
|
|
14
|
+
* SEO library reads `WebsiteSectionDefinition.category` to decide
|
|
15
|
+
* which JSON-LD vocabulary the section's `getStructuredData()` hook
|
|
16
|
+
* is allowed to emit. e.g. `PRICING` may emit `Product` /
|
|
17
|
+
* `AggregateOffer`; `FAQ` may emit `FAQPage`; `HERO` may emit
|
|
18
|
+
* `Organization` / `WebSite`. Mismatches are surfaced as build-time
|
|
19
|
+
* warnings.
|
|
20
|
+
* 2. **Authoring guidance**: each value has matching application-builder
|
|
21
|
+
* guidance. When introducing a new category, provide its public authoring
|
|
22
|
+
* method before asking an application to use it.
|
|
23
|
+
* 3. **Analytics labelling**: the runtime emits
|
|
24
|
+
* `data-section-category="…"` on the `<WebsiteSection>` wrapper so
|
|
25
|
+
* analytics tooling can group section impressions
|
|
26
|
+
* without parsing className conventions.
|
|
27
|
+
*
|
|
28
|
+
* **Closed vocabulary on purpose**: a free-string `category` would
|
|
29
|
+
* defeat the skill-mapping and SEO-dispatch contracts. Consumers who
|
|
30
|
+
* need a wholly-novel section shape use the `RAW` advanced path
|
|
31
|
+
* (`website-factory-advanced` skill) which bypasses the category
|
|
32
|
+
* vocabulary entirely.
|
|
33
|
+
*
|
|
34
|
+
* **Adding a value**: requires (a) a new entry here, (b) a matching
|
|
35
|
+
* `website_section_<value>` skill stub, (c) (optionally) a
|
|
36
|
+
* structured-data dispatch entry in the SEO library. Removing a value
|
|
37
|
+
* is a labelled rename — every consumer's
|
|
38
|
+
* `defineWebsiteSection({ category: … })` declaration breaks at compile
|
|
39
|
+
* time, which is the desired loud failure.
|
|
40
|
+
*/
|
|
41
|
+
export var WebsiteSectionCategory;
|
|
42
|
+
(function (WebsiteSectionCategory) {
|
|
43
|
+
WebsiteSectionCategory["HERO"] = "hero";
|
|
44
|
+
WebsiteSectionCategory["CTA"] = "cta";
|
|
45
|
+
WebsiteSectionCategory["FEATURE_BENEFIT_SUMMARY"] = "feature-benefit-summary";
|
|
46
|
+
WebsiteSectionCategory["FEATURE_DETAIL"] = "feature-detail";
|
|
47
|
+
WebsiteSectionCategory["PRICING"] = "pricing";
|
|
48
|
+
WebsiteSectionCategory["CONTACT"] = "contact";
|
|
49
|
+
WebsiteSectionCategory["SOCIAL_PROOF"] = "social-proof";
|
|
50
|
+
WebsiteSectionCategory["FAQ"] = "faq";
|
|
51
|
+
WebsiteSectionCategory["FOOTER_CTA"] = "footer-cta";
|
|
52
|
+
/**
|
|
53
|
+
* Escape hatch for sections that don't fit any standard category
|
|
54
|
+
* (third-party widgets, custom one-off marketing pieces). Skips the
|
|
55
|
+
* SEO-dispatch contract — the section's `getStructuredData()` may
|
|
56
|
+
* return any vocabulary, no validation. Authors should prefer a
|
|
57
|
+
* concrete category whenever possible; using `RAW` opts the section
|
|
58
|
+
* out of the framework's structured-data safety net.
|
|
59
|
+
*/
|
|
60
|
+
WebsiteSectionCategory["RAW"] = "raw";
|
|
61
|
+
})(WebsiteSectionCategory || (WebsiteSectionCategory = {}));
|
|
62
|
+
export const WebsiteSectionCategorySchema = z.enum(WebsiteSectionCategory);
|
|
63
|
+
/** @wildo_source:part:end saas.website.sections.category-enum */
|
|
64
|
+
//# sourceMappingURL=website-section-category.shared.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"website-section-category.shared.js","sourceRoot":"","sources":["../../../../../src/schemas/sections/website-section-category.shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,MAAM,CAAN,IAAY,sBAmBX;AAnBD,WAAY,sBAAsB;IAChC,uCAAa,CAAA;IACb,qCAAW,CAAA;IACX,6EAAmD,CAAA;IACnD,2DAAiC,CAAA;IACjC,6CAAmB,CAAA;IACnB,6CAAmB,CAAA;IACnB,uDAA6B,CAAA;IAC7B,qCAAW,CAAA;IACX,mDAAyB,CAAA;IACzB;;;;;;;OAOG;IACH,qCAAW,CAAA;AACb,CAAC,EAnBW,sBAAsB,KAAtB,sBAAsB,QAmBjC;AAED,MAAM,CAAC,MAAM,4BAA4B,GACvC,CAAC,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;AACjC,iEAAiE","sourcesContent":["import { z } from 'zod';\n\n/**\n * @wildo_source:part:start saas.website.sections.category-enum facet:layer:shared facet:family:website\n *\n * `WebsiteSectionCategory` — closed vocabulary tagging the **structural\n * intent** of a section.\n *\n * The category is NOT a layout-shape constraint and NOT a CSS class; the\n * framework ships zero concrete sections and never inspects\n * the category at render time. The category exists for three orthogonal\n * non-render concerns:\n *\n * 1. **Structured-data dispatch**: the\n * SEO library reads `WebsiteSectionDefinition.category` to decide\n * which JSON-LD vocabulary the section's `getStructuredData()` hook\n * is allowed to emit. e.g. `PRICING` may emit `Product` /\n * `AggregateOffer`; `FAQ` may emit `FAQPage`; `HERO` may emit\n * `Organization` / `WebSite`. Mismatches are surfaced as build-time\n * warnings.\n * 2. **Authoring guidance**: each value has matching application-builder\n * guidance. When introducing a new category, provide its public authoring\n * method before asking an application to use it.\n * 3. **Analytics labelling**: the runtime emits\n * `data-section-category=\"…\"` on the `<WebsiteSection>` wrapper so\n * analytics tooling can group section impressions\n * without parsing className conventions.\n *\n * **Closed vocabulary on purpose**: a free-string `category` would\n * defeat the skill-mapping and SEO-dispatch contracts. Consumers who\n * need a wholly-novel section shape use the `RAW` advanced path\n * (`website-factory-advanced` skill) which bypasses the category\n * vocabulary entirely.\n *\n * **Adding a value**: requires (a) a new entry here, (b) a matching\n * `website_section_<value>` skill stub, (c) (optionally) a\n * structured-data dispatch entry in the SEO library. Removing a value\n * is a labelled rename — every consumer's\n * `defineWebsiteSection({ category: … })` declaration breaks at compile\n * time, which is the desired loud failure.\n */\nexport enum WebsiteSectionCategory {\n HERO = 'hero',\n CTA = 'cta',\n FEATURE_BENEFIT_SUMMARY = 'feature-benefit-summary',\n FEATURE_DETAIL = 'feature-detail',\n PRICING = 'pricing',\n CONTACT = 'contact',\n SOCIAL_PROOF = 'social-proof',\n FAQ = 'faq',\n FOOTER_CTA = 'footer-cta',\n /**\n * Escape hatch for sections that don't fit any standard category\n * (third-party widgets, custom one-off marketing pieces). Skips the\n * SEO-dispatch contract — the section's `getStructuredData()` may\n * return any vocabulary, no validation. Authors should prefer a\n * concrete category whenever possible; using `RAW` opts the section\n * out of the framework's structured-data safety net.\n */\n RAW = 'raw',\n}\n\nexport const WebsiteSectionCategorySchema: z.ZodEnum<typeof WebsiteSectionCategory> =\n z.enum(WebsiteSectionCategory);\n/** @wildo_source:part:end saas.website.sections.category-enum */\n"]}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import type { ComponentType } from 'react';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import type { WebsiteStructuredDataReturn } from '../structured-data/website-structured-data.shared.schemas';
|
|
4
|
+
/**
|
|
5
|
+
* @wildo_source:part:start saas.website.sections.definition-schema facet:layer:shared facet:family:website
|
|
6
|
+
*
|
|
7
|
+
* `WebsiteSectionDefinition` — the runtime contract returned by the
|
|
8
|
+
* `defineWebsiteSection({ … })` factory (authored as a separate
|
|
9
|
+
* `core/define-website-section.tsx` module in Phase 2 because it carries
|
|
10
|
+
* React types in its inputs). The shape is declared in `schemas/`
|
|
11
|
+
* because it is the **observable contract** the page-manifest
|
|
12
|
+
* registration, label-pack validator, and SEO dispatcher depend on.
|
|
13
|
+
*
|
|
14
|
+
* **Shape rationale** (each field carries semantic weight — see
|
|
15
|
+
* `design-philosophy.mdc`):
|
|
16
|
+
*
|
|
17
|
+
* - `sectionRef` — the section's identity inside its hosting page.
|
|
18
|
+
* Uniqueness is enforced **per page** at manifest registration time
|
|
19
|
+
* (a section can be reused with the same `sectionRef` across pages
|
|
20
|
+
* when its label-key root is intentionally shared).
|
|
21
|
+
* - `category` — see `WebsiteSectionCategory` JSDoc; tags the section
|
|
22
|
+
* for SEO-dispatch, skill-mapping, and analytics labelling.
|
|
23
|
+
* - `expectedLabelKeys` — the **fully-composed** label keys the section
|
|
24
|
+
* commits to consuming. The plan originally proposed leaf-relative
|
|
25
|
+
* keys (`'headline'`) resolved at runtime against the
|
|
26
|
+
* page+section context, but storing the fully-composed key on the
|
|
27
|
+
* definition has three concrete benefits:
|
|
28
|
+
* 1. The label-pack validator (`validateLabelPackAgainstManifest`)
|
|
29
|
+
* runs as a pure function with no need to walk the JSX tree at
|
|
30
|
+
* build time to discover the leaf-to-key resolution.
|
|
31
|
+
* 2. The contract is auditable from outside the React render
|
|
32
|
+
* graph — `wildo website audit` can list a page's required keys
|
|
33
|
+
* without booting React.
|
|
34
|
+
* 3. The leaf-relative ergonomics (`useWebsiteLabel('headline')`)
|
|
35
|
+
* survive in Phase 2 — the hook composes the leaf with the
|
|
36
|
+
* page+section context and validates the result against
|
|
37
|
+
* `expectedLabelKeys`.
|
|
38
|
+
* - `Component` — the React component that renders the section. Typed
|
|
39
|
+
* as `ComponentType<unknown>` here because schema-layer cannot lock
|
|
40
|
+
* the component's prop shape (props vary per section). The factory
|
|
41
|
+
* function (`defineWebsiteSection<TProps>(…)`) preserves the precise
|
|
42
|
+
* prop type at the consumer call site via generics; this schema only
|
|
43
|
+
* guards the runtime shape of "is callable as a React component".
|
|
44
|
+
* - `getStructuredData?` — optional pure function the SEO/AEO/GEO
|
|
45
|
+
* builder library invokes at static-build time to materialize JSON-LD
|
|
46
|
+
* for the section. The return type is intentionally `unknown` here;
|
|
47
|
+
* the SEO library narrows by `category` (e.g. `PRICING` →
|
|
48
|
+
* `Product | AggregateOffer`).
|
|
49
|
+
*
|
|
50
|
+
* **Why not `z.custom<ComponentType>(…)`**: a `z.custom` predicate
|
|
51
|
+
* cannot meaningfully validate "is a React component" beyond
|
|
52
|
+
* `typeof === 'function'`, and the false-positive cost (any function
|
|
53
|
+
* passes) is too high for the value (none — the consumer either
|
|
54
|
+
* imports a real component or fails at JSX render time with a clearer
|
|
55
|
+
* error). Using `z.unknown()` + a TS-side type cast keeps the runtime
|
|
56
|
+
* cost zero and the type-safety contract entirely on the TS side
|
|
57
|
+
* (where it actually has teeth via the factory's generic).
|
|
58
|
+
*/
|
|
59
|
+
declare const _WebsiteSectionDefinitionSchema: z.ZodObject<{
|
|
60
|
+
sectionRef: z.core.$ZodBranded<z.ZodString, "WebsiteSectionRef", "out">;
|
|
61
|
+
category: z.ZodEnum<typeof import("./website-section-category.shared").WebsiteSectionCategory>;
|
|
62
|
+
expectedLabelKeys: z.ZodReadonly<z.ZodArray<z.core.$ZodBranded<z.ZodString, "WebsiteLabelKey", "out">>>;
|
|
63
|
+
Component: z.ZodUnknown;
|
|
64
|
+
getStructuredData: z.ZodOptional<z.ZodUnknown>;
|
|
65
|
+
}, z.core.$strip>;
|
|
66
|
+
export declare const WebsiteSectionDefinitionSchema: typeof _WebsiteSectionDefinitionSchema;
|
|
67
|
+
/**
|
|
68
|
+
* Runtime shape of `WebsiteSectionDefinition`. Note: `Component` and
|
|
69
|
+
* `getStructuredData` are typed precisely on the factory return type
|
|
70
|
+
* (`defineWebsiteSection<TProps>` in Phase 2); the schema-inferred
|
|
71
|
+
* type is the lowest common denominator used at the persistence /
|
|
72
|
+
* validation boundary only.
|
|
73
|
+
*
|
|
74
|
+
* **Why `ComponentType<any>` and NOT `ComponentType<unknown>`**:
|
|
75
|
+
* React component props are CONTRAVARIANT in `ComponentType<T>` —
|
|
76
|
+
* a narrower `ComponentType<{ foo: string }>` is NOT assignable to
|
|
77
|
+
* `ComponentType<unknown>` (because a caller could pass an `unknown`
|
|
78
|
+
* the narrower component cannot accept). This made every consumer
|
|
79
|
+
* who built sections via `defineWebsiteSection<TProps>(…)` unable
|
|
80
|
+
* to feed the resulting `TypedWebsiteSectionDefinition<TProps>` to
|
|
81
|
+
* helpers typed against the bare `WebsiteSectionDefinition` —
|
|
82
|
+
* collectors, validators, and registries. Using `any` here is the
|
|
83
|
+
* exact escape hatch the React typings themselves use for
|
|
84
|
+
* heterogeneous component containers (`React.forwardRef`,
|
|
85
|
+
* `React.lazy`'s internal component slot, etc.) and matches the
|
|
86
|
+
* runtime contract: the framework NEVER instantiates these
|
|
87
|
+
* components directly with arbitrary props — the consumer's JSX
|
|
88
|
+
* supplies the right props at the call site.
|
|
89
|
+
*/
|
|
90
|
+
export interface WebsiteSectionDefinition extends z.infer<typeof _WebsiteSectionDefinitionSchema> {
|
|
91
|
+
Component: ComponentType<any>;
|
|
92
|
+
/**
|
|
93
|
+
* Optional pure function the SEO/AEO/GEO renderer invokes at
|
|
94
|
+
* static-build time to materialize JSON-LD for the section.
|
|
95
|
+
*
|
|
96
|
+
* **Why typed as `WebsiteStructuredDataReturn` (not `unknown`)** —
|
|
97
|
+
* a typed return shape gives section authors autocomplete on
|
|
98
|
+
* `@type` / `@id` / `@context` (the framework-owned fields) while
|
|
99
|
+
* keeping all other fields free-form (Schema.org has hundreds of
|
|
100
|
+
* optional fields per entity; locking them in TS would be both
|
|
101
|
+
* impractical and brittle as Schema.org evolves). The companion
|
|
102
|
+
* catalog reconciliation surface catches missing-required and
|
|
103
|
+
* deprecated-field-used at the SEMANTIC layer (warning-only per
|
|
104
|
+
* D-AG4), so the runtime type stays loose.
|
|
105
|
+
*
|
|
106
|
+
* Returns `null`, `undefined`, or `[]` when the section has no
|
|
107
|
+
* structured-data contribution for the current state — the
|
|
108
|
+
* renderer short-circuits all three.
|
|
109
|
+
*/
|
|
110
|
+
getStructuredData?: () => WebsiteStructuredDataReturn;
|
|
111
|
+
}
|
|
112
|
+
export {};
|
|
113
|
+
/** @wildo_source:part:end saas.website.sections.definition-schema */
|
|
114
|
+
//# sourceMappingURL=website-section-definition.shared.schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"website-section-definition.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../../src/schemas/sections/website-section-definition.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,2DAA2D,CAAC;AAG7G;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AACH,QAAA,MAAM,+BAA+B;;;;;;iBAMnC,CAAC;AAEH,eAAO,MAAM,8BAA8B,EAAE,OAAO,+BACnB,CAAC;AAElC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,WAAW,wBAAyB,SAAQ,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC;IAC/F,SAAS,EAAE,aAAa,CAAC,GAAG,CAAC,CAAC;IAC9B;;;;;;;;;;;;;;;;;OAiBG;IACH,iBAAiB,CAAC,EAAE,MAAM,2BAA2B,CAAC;CACvD;;AACD,qEAAqE"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { WebsiteLabelKeySchema } from '../label-keys/website-label-key.schemas.js';
|
|
3
|
+
import { WebsiteSectionRefSchema } from '../refs/section-ref.schemas.js';
|
|
4
|
+
import { WebsiteSectionCategorySchema } from './website-section-category.shared.js';
|
|
5
|
+
/**
|
|
6
|
+
* @wildo_source:part:start saas.website.sections.definition-schema facet:layer:shared facet:family:website
|
|
7
|
+
*
|
|
8
|
+
* `WebsiteSectionDefinition` — the runtime contract returned by the
|
|
9
|
+
* `defineWebsiteSection({ … })` factory (authored as a separate
|
|
10
|
+
* `core/define-website-section.tsx` module in Phase 2 because it carries
|
|
11
|
+
* React types in its inputs). The shape is declared in `schemas/`
|
|
12
|
+
* because it is the **observable contract** the page-manifest
|
|
13
|
+
* registration, label-pack validator, and SEO dispatcher depend on.
|
|
14
|
+
*
|
|
15
|
+
* **Shape rationale** (each field carries semantic weight — see
|
|
16
|
+
* `design-philosophy.mdc`):
|
|
17
|
+
*
|
|
18
|
+
* - `sectionRef` — the section's identity inside its hosting page.
|
|
19
|
+
* Uniqueness is enforced **per page** at manifest registration time
|
|
20
|
+
* (a section can be reused with the same `sectionRef` across pages
|
|
21
|
+
* when its label-key root is intentionally shared).
|
|
22
|
+
* - `category` — see `WebsiteSectionCategory` JSDoc; tags the section
|
|
23
|
+
* for SEO-dispatch, skill-mapping, and analytics labelling.
|
|
24
|
+
* - `expectedLabelKeys` — the **fully-composed** label keys the section
|
|
25
|
+
* commits to consuming. The plan originally proposed leaf-relative
|
|
26
|
+
* keys (`'headline'`) resolved at runtime against the
|
|
27
|
+
* page+section context, but storing the fully-composed key on the
|
|
28
|
+
* definition has three concrete benefits:
|
|
29
|
+
* 1. The label-pack validator (`validateLabelPackAgainstManifest`)
|
|
30
|
+
* runs as a pure function with no need to walk the JSX tree at
|
|
31
|
+
* build time to discover the leaf-to-key resolution.
|
|
32
|
+
* 2. The contract is auditable from outside the React render
|
|
33
|
+
* graph — `wildo website audit` can list a page's required keys
|
|
34
|
+
* without booting React.
|
|
35
|
+
* 3. The leaf-relative ergonomics (`useWebsiteLabel('headline')`)
|
|
36
|
+
* survive in Phase 2 — the hook composes the leaf with the
|
|
37
|
+
* page+section context and validates the result against
|
|
38
|
+
* `expectedLabelKeys`.
|
|
39
|
+
* - `Component` — the React component that renders the section. Typed
|
|
40
|
+
* as `ComponentType<unknown>` here because schema-layer cannot lock
|
|
41
|
+
* the component's prop shape (props vary per section). The factory
|
|
42
|
+
* function (`defineWebsiteSection<TProps>(…)`) preserves the precise
|
|
43
|
+
* prop type at the consumer call site via generics; this schema only
|
|
44
|
+
* guards the runtime shape of "is callable as a React component".
|
|
45
|
+
* - `getStructuredData?` — optional pure function the SEO/AEO/GEO
|
|
46
|
+
* builder library invokes at static-build time to materialize JSON-LD
|
|
47
|
+
* for the section. The return type is intentionally `unknown` here;
|
|
48
|
+
* the SEO library narrows by `category` (e.g. `PRICING` →
|
|
49
|
+
* `Product | AggregateOffer`).
|
|
50
|
+
*
|
|
51
|
+
* **Why not `z.custom<ComponentType>(…)`**: a `z.custom` predicate
|
|
52
|
+
* cannot meaningfully validate "is a React component" beyond
|
|
53
|
+
* `typeof === 'function'`, and the false-positive cost (any function
|
|
54
|
+
* passes) is too high for the value (none — the consumer either
|
|
55
|
+
* imports a real component or fails at JSX render time with a clearer
|
|
56
|
+
* error). Using `z.unknown()` + a TS-side type cast keeps the runtime
|
|
57
|
+
* cost zero and the type-safety contract entirely on the TS side
|
|
58
|
+
* (where it actually has teeth via the factory's generic).
|
|
59
|
+
*/
|
|
60
|
+
const _WebsiteSectionDefinitionSchema = z.object({
|
|
61
|
+
sectionRef: WebsiteSectionRefSchema,
|
|
62
|
+
category: WebsiteSectionCategorySchema,
|
|
63
|
+
expectedLabelKeys: z.array(WebsiteLabelKeySchema).readonly(),
|
|
64
|
+
Component: z.unknown(),
|
|
65
|
+
getStructuredData: z.unknown().optional(),
|
|
66
|
+
});
|
|
67
|
+
export const WebsiteSectionDefinitionSchema = _WebsiteSectionDefinitionSchema;
|
|
68
|
+
/** @wildo_source:part:end saas.website.sections.definition-schema */
|
|
69
|
+
//# sourceMappingURL=website-section-definition.shared.schemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"website-section-definition.shared.schemas.js","sourceRoot":"","sources":["../../../../../src/schemas/sections/website-section-definition.shared.schemas.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAEtE,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AAEjF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AACH,MAAM,+BAA+B,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,UAAU,EAAE,uBAAuB;IACnC,QAAQ,EAAE,4BAA4B;IACtC,iBAAiB,EAAE,CAAC,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC,QAAQ,EAAE;IAC5D,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE;IACtB,iBAAiB,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CAC1C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,8BAA8B,GACzC,+BAA+B,CAAC;AA+ClC,qEAAqE","sourcesContent":["import type { ComponentType } from 'react';\nimport { z } from 'zod';\n\nimport { WebsiteLabelKeySchema } from '../label-keys/website-label-key.schemas';\nimport { WebsiteSectionRefSchema } from '../refs/section-ref.schemas';\nimport type { WebsiteStructuredDataReturn } from '../structured-data/website-structured-data.shared.schemas';\nimport { WebsiteSectionCategorySchema } from './website-section-category.shared';\n\n/**\n * @wildo_source:part:start saas.website.sections.definition-schema facet:layer:shared facet:family:website\n *\n * `WebsiteSectionDefinition` — the runtime contract returned by the\n * `defineWebsiteSection({ … })` factory (authored as a separate\n * `core/define-website-section.tsx` module in Phase 2 because it carries\n * React types in its inputs). The shape is declared in `schemas/`\n * because it is the **observable contract** the page-manifest\n * registration, label-pack validator, and SEO dispatcher depend on.\n *\n * **Shape rationale** (each field carries semantic weight — see\n * `design-philosophy.mdc`):\n *\n * - `sectionRef` — the section's identity inside its hosting page.\n * Uniqueness is enforced **per page** at manifest registration time\n * (a section can be reused with the same `sectionRef` across pages\n * when its label-key root is intentionally shared).\n * - `category` — see `WebsiteSectionCategory` JSDoc; tags the section\n * for SEO-dispatch, skill-mapping, and analytics labelling.\n * - `expectedLabelKeys` — the **fully-composed** label keys the section\n * commits to consuming. The plan originally proposed leaf-relative\n * keys (`'headline'`) resolved at runtime against the\n * page+section context, but storing the fully-composed key on the\n * definition has three concrete benefits:\n * 1. The label-pack validator (`validateLabelPackAgainstManifest`)\n * runs as a pure function with no need to walk the JSX tree at\n * build time to discover the leaf-to-key resolution.\n * 2. The contract is auditable from outside the React render\n * graph — `wildo website audit` can list a page's required keys\n * without booting React.\n * 3. The leaf-relative ergonomics (`useWebsiteLabel('headline')`)\n * survive in Phase 2 — the hook composes the leaf with the\n * page+section context and validates the result against\n * `expectedLabelKeys`.\n * - `Component` — the React component that renders the section. Typed\n * as `ComponentType<unknown>` here because schema-layer cannot lock\n * the component's prop shape (props vary per section). The factory\n * function (`defineWebsiteSection<TProps>(…)`) preserves the precise\n * prop type at the consumer call site via generics; this schema only\n * guards the runtime shape of \"is callable as a React component\".\n * - `getStructuredData?` — optional pure function the SEO/AEO/GEO\n * builder library invokes at static-build time to materialize JSON-LD\n * for the section. The return type is intentionally `unknown` here;\n * the SEO library narrows by `category` (e.g. `PRICING` →\n * `Product | AggregateOffer`).\n *\n * **Why not `z.custom<ComponentType>(…)`**: a `z.custom` predicate\n * cannot meaningfully validate \"is a React component\" beyond\n * `typeof === 'function'`, and the false-positive cost (any function\n * passes) is too high for the value (none — the consumer either\n * imports a real component or fails at JSX render time with a clearer\n * error). Using `z.unknown()` + a TS-side type cast keeps the runtime\n * cost zero and the type-safety contract entirely on the TS side\n * (where it actually has teeth via the factory's generic).\n */\nconst _WebsiteSectionDefinitionSchema = z.object({\n sectionRef: WebsiteSectionRefSchema,\n category: WebsiteSectionCategorySchema,\n expectedLabelKeys: z.array(WebsiteLabelKeySchema).readonly(),\n Component: z.unknown(),\n getStructuredData: z.unknown().optional(),\n});\n\nexport const WebsiteSectionDefinitionSchema: typeof _WebsiteSectionDefinitionSchema =\n _WebsiteSectionDefinitionSchema;\n\n/**\n * Runtime shape of `WebsiteSectionDefinition`. Note: `Component` and\n * `getStructuredData` are typed precisely on the factory return type\n * (`defineWebsiteSection<TProps>` in Phase 2); the schema-inferred\n * type is the lowest common denominator used at the persistence /\n * validation boundary only.\n *\n * **Why `ComponentType<any>` and NOT `ComponentType<unknown>`**:\n * React component props are CONTRAVARIANT in `ComponentType<T>` —\n * a narrower `ComponentType<{ foo: string }>` is NOT assignable to\n * `ComponentType<unknown>` (because a caller could pass an `unknown`\n * the narrower component cannot accept). This made every consumer\n * who built sections via `defineWebsiteSection<TProps>(…)` unable\n * to feed the resulting `TypedWebsiteSectionDefinition<TProps>` to\n * helpers typed against the bare `WebsiteSectionDefinition` —\n * collectors, validators, and registries. Using `any` here is the\n * exact escape hatch the React typings themselves use for\n * heterogeneous component containers (`React.forwardRef`,\n * `React.lazy`'s internal component slot, etc.) and matches the\n * runtime contract: the framework NEVER instantiates these\n * components directly with arbitrary props — the consumer's JSX\n * supplies the right props at the call site.\n */\nexport interface WebsiteSectionDefinition extends z.infer<typeof _WebsiteSectionDefinitionSchema> {\n Component: ComponentType<any>;\n /**\n * Optional pure function the SEO/AEO/GEO renderer invokes at\n * static-build time to materialize JSON-LD for the section.\n *\n * **Why typed as `WebsiteStructuredDataReturn` (not `unknown`)** —\n * a typed return shape gives section authors autocomplete on\n * `@type` / `@id` / `@context` (the framework-owned fields) while\n * keeping all other fields free-form (Schema.org has hundreds of\n * optional fields per entity; locking them in TS would be both\n * impractical and brittle as Schema.org evolves). The companion\n * catalog reconciliation surface catches missing-required and\n * deprecated-field-used at the SEMANTIC layer (warning-only per\n * D-AG4), so the runtime type stays loose.\n *\n * Returns `null`, `undefined`, or `[]` when the section has no\n * structured-data contribution for the current state — the\n * renderer short-circuits all three.\n */\n getStructuredData?: () => WebsiteStructuredDataReturn;\n}\n/** @wildo_source:part:end saas.website.sections.definition-schema */\n"]}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
export interface StructuredDataDeprecatedField {
|
|
2
|
+
field: string;
|
|
3
|
+
replacedBy: string | null;
|
|
4
|
+
deprecatedSince: string;
|
|
5
|
+
}
|
|
6
|
+
export interface StructuredDataCatalogEntry {
|
|
7
|
+
'@type': string;
|
|
8
|
+
requiredFields: readonly string[];
|
|
9
|
+
optionalFields?: readonly string[];
|
|
10
|
+
deprecatedFields?: readonly StructuredDataDeprecatedField[];
|
|
11
|
+
recommendOptionals?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface StructuredDataPayload {
|
|
14
|
+
'@type': string;
|
|
15
|
+
'@id'?: string;
|
|
16
|
+
[key: string]: unknown;
|
|
17
|
+
}
|
|
18
|
+
export interface StructuredDataSectionDefinitionLike {
|
|
19
|
+
sectionRef: string;
|
|
20
|
+
getStructuredData?: () => unknown;
|
|
21
|
+
}
|
|
22
|
+
export interface StructuredDataPageManifestLike {
|
|
23
|
+
ref: string;
|
|
24
|
+
routePath: string;
|
|
25
|
+
sectionRefs: readonly string[];
|
|
26
|
+
}
|
|
27
|
+
export interface StructuredDataPagePayloadLike {
|
|
28
|
+
pageRef: string;
|
|
29
|
+
routePath?: string;
|
|
30
|
+
sourceRef?: string;
|
|
31
|
+
payloads: unknown;
|
|
32
|
+
}
|
|
33
|
+
export type StructuredDataSpecViolationCode = 'invalid-payload-shape' | 'missing-entity-type' | 'missing-required-field' | 'missing-section-definition' | 'orphan-page-payload';
|
|
34
|
+
export interface StructuredDataCatalogOverrideFinding {
|
|
35
|
+
kind: 'catalog-override';
|
|
36
|
+
entityType: string;
|
|
37
|
+
count: number;
|
|
38
|
+
message: string;
|
|
39
|
+
}
|
|
40
|
+
export interface StructuredDataCatalogMissFinding {
|
|
41
|
+
kind: 'catalog-miss';
|
|
42
|
+
pageRef: string;
|
|
43
|
+
routePath: string;
|
|
44
|
+
sectionRef: string;
|
|
45
|
+
entityType: string;
|
|
46
|
+
entityId?: string;
|
|
47
|
+
message: string;
|
|
48
|
+
}
|
|
49
|
+
export interface StructuredDataSpecViolationFinding {
|
|
50
|
+
kind: 'spec-violation';
|
|
51
|
+
code: StructuredDataSpecViolationCode;
|
|
52
|
+
pageRef: string;
|
|
53
|
+
routePath: string;
|
|
54
|
+
sectionRef: string;
|
|
55
|
+
entityType?: string;
|
|
56
|
+
entityId?: string;
|
|
57
|
+
field?: string;
|
|
58
|
+
message: string;
|
|
59
|
+
}
|
|
60
|
+
export interface StructuredDataDeprecatedFieldFinding {
|
|
61
|
+
kind: 'deprecated-field';
|
|
62
|
+
pageRef: string;
|
|
63
|
+
routePath: string;
|
|
64
|
+
sectionRef: string;
|
|
65
|
+
entityType: string;
|
|
66
|
+
entityId?: string;
|
|
67
|
+
field: string;
|
|
68
|
+
replacedBy: string | null;
|
|
69
|
+
deprecatedSince: string;
|
|
70
|
+
message: string;
|
|
71
|
+
}
|
|
72
|
+
export interface StructuredDataCrossEntityReferenceDriftFinding {
|
|
73
|
+
kind: 'cross-entity-reference-drift';
|
|
74
|
+
pageRef: string;
|
|
75
|
+
routePath: string;
|
|
76
|
+
sectionRef: string;
|
|
77
|
+
entityType: string;
|
|
78
|
+
entityId?: string;
|
|
79
|
+
missingReferenceId: string;
|
|
80
|
+
message: string;
|
|
81
|
+
}
|
|
82
|
+
export type StructuredDataReconciliationFinding = StructuredDataCatalogOverrideFinding | StructuredDataCatalogMissFinding | StructuredDataSpecViolationFinding | StructuredDataDeprecatedFieldFinding | StructuredDataCrossEntityReferenceDriftFinding;
|
|
83
|
+
export interface StructuredDataReconciliationPageResult {
|
|
84
|
+
pageRef: string;
|
|
85
|
+
routePath: string;
|
|
86
|
+
payloadCount: number;
|
|
87
|
+
findingCount: number;
|
|
88
|
+
}
|
|
89
|
+
export interface StructuredDataReconciliationResult {
|
|
90
|
+
findings: StructuredDataReconciliationFinding[];
|
|
91
|
+
pages: StructuredDataReconciliationPageResult[];
|
|
92
|
+
}
|
|
93
|
+
export interface ReconcileStructuredDataOptions {
|
|
94
|
+
catalog: readonly StructuredDataCatalogEntry[];
|
|
95
|
+
pages: readonly StructuredDataPageManifestLike[];
|
|
96
|
+
sections: readonly StructuredDataSectionDefinitionLike[];
|
|
97
|
+
pagePayloads?: readonly StructuredDataPagePayloadLike[];
|
|
98
|
+
}
|
|
99
|
+
export declare function reconcileStructuredDataAgainstCatalog(options: ReconcileStructuredDataOptions): StructuredDataReconciliationResult;
|
|
100
|
+
//# sourceMappingURL=structured-data-reconciliation.shared.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"structured-data-reconciliation.shared.d.ts","sourceRoot":"","sources":["../../../../../src/schemas/structured-data/structured-data-reconciliation.shared.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,6BAA6B;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,0BAA0B;IACzC,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,cAAc,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,gBAAgB,CAAC,EAAE,SAAS,6BAA6B,EAAE,CAAC;IAC5D,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,mCAAmC;IAClD,UAAU,EAAE,MAAM,CAAC;IACnB,iBAAiB,CAAC,EAAE,MAAM,OAAO,CAAC;CACnC;AAED,MAAM,WAAW,8BAA8B;IAC7C,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;CAChC;AAED,MAAM,WAAW,6BAA6B;IAC5C,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,MAAM,+BAA+B,GACvC,uBAAuB,GACvB,qBAAqB,GACrB,wBAAwB,GACxB,4BAA4B,GAC5B,qBAAqB,CAAC;AAE1B,MAAM,WAAW,oCAAoC;IACnD,IAAI,EAAE,kBAAkB,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,gCAAgC;IAC/C,IAAI,EAAE,cAAc,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,kCAAkC;IACjD,IAAI,EAAE,gBAAgB,CAAC;IACvB,IAAI,EAAE,+BAA+B,CAAC;IACtC,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,oCAAoC;IACnD,IAAI,EAAE,kBAAkB,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,eAAe,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,8CAA8C;IAC7D,IAAI,EAAE,8BAA8B,CAAC;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,mCAAmC,GAC3C,oCAAoC,GACpC,gCAAgC,GAChC,kCAAkC,GAClC,oCAAoC,GACpC,8CAA8C,CAAC;AAEnD,MAAM,WAAW,sCAAsC;IACrD,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,kCAAkC;IACjD,QAAQ,EAAE,mCAAmC,EAAE,CAAC;IAChD,KAAK,EAAE,sCAAsC,EAAE,CAAC;CACjD;AAED,MAAM,WAAW,8BAA8B;IAC7C,OAAO,EAAE,SAAS,0BAA0B,EAAE,CAAC;IAC/C,KAAK,EAAE,SAAS,8BAA8B,EAAE,CAAC;IACjD,QAAQ,EAAE,SAAS,mCAAmC,EAAE,CAAC;IACzD,YAAY,CAAC,EAAE,SAAS,6BAA6B,EAAE,CAAC;CACzD;AASD,wBAAgB,qCAAqC,CACnD,OAAO,EAAE,8BAA8B,GACtC,kCAAkC,CA2MpC"}
|