@wildo-ai/saas-website 1.1.7 → 1.1.8

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.
Files changed (112) hide show
  1. package/dist/esm/astro/blog-post-bridge.d.ts.map +1 -1
  2. package/dist/esm/astro/blog-post-bridge.js.map +1 -1
  3. package/dist/esm/astro/blog-post-head.renderer.d.ts.map +1 -1
  4. package/dist/esm/astro/bridge-runtime.d.ts.map +1 -1
  5. package/dist/esm/astro/bridge-runtime.js.map +1 -1
  6. package/dist/esm/astro/collect-expected-label-keys.d.ts.map +1 -1
  7. package/dist/esm/astro/headers-renderer.d.ts.map +1 -1
  8. package/dist/esm/astro/i18n-routing.helper.d.ts.map +1 -1
  9. package/dist/esm/astro/label-pack-loader.d.ts.map +1 -1
  10. package/dist/esm/astro/label-pack-loader.js.map +1 -1
  11. package/dist/esm/astro/llms-txt-server.d.ts.map +1 -1
  12. package/dist/esm/astro/pick-labels-for-page.d.ts.map +1 -1
  13. package/dist/esm/astro/robots-renderer.d.ts.map +1 -1
  14. package/dist/esm/astro/robots-renderer.js.map +1 -1
  15. package/dist/esm/astro/sitemap-coverage.d.ts.map +1 -1
  16. package/dist/esm/astro/structured-data.renderer.d.ts.map +1 -1
  17. package/dist/esm/astro/website-page-head.renderer.d.ts.map +1 -1
  18. package/dist/esm/astro/website-page-head.renderer.js.map +1 -1
  19. package/dist/esm/astro/website-page-runtime.helper.d.ts.map +1 -1
  20. package/dist/esm/astro/website-site-context.d.ts.map +1 -1
  21. package/dist/esm/astro/website-site-context.js.map +1 -1
  22. package/dist/esm/astro-island.d.ts.map +1 -1
  23. package/dist/esm/astro.d.ts.map +1 -1
  24. package/dist/esm/companion-exports.d.ts.map +1 -1
  25. package/dist/esm/companion-exports.js.map +1 -1
  26. package/dist/esm/components/low-level/WebsiteInternalButton.d.ts.map +1 -1
  27. package/dist/esm/components/low-level/WebsiteInternalLink.d.ts.map +1 -1
  28. package/dist/esm/config/define-website-config.d.ts.map +1 -1
  29. package/dist/esm/config/define-website-config.js.map +1 -1
  30. package/dist/esm/config/index.d.ts.map +1 -1
  31. package/dist/esm/config/load-website-config.d.ts.map +1 -1
  32. package/dist/esm/config/load-website-config.js.map +1 -1
  33. package/dist/esm/config/load-website-pricing-catalog.d.ts.map +1 -1
  34. package/dist/esm/config/load-website-pricing-catalog.js.map +1 -1
  35. package/dist/esm/config/load-website-site-context.d.ts.map +1 -1
  36. package/dist/esm/config/load-website-site-context.js.map +1 -1
  37. package/dist/esm/config/wildo-website-config.schemas.d.ts.map +1 -1
  38. package/dist/esm/config-loader.d.ts.map +1 -1
  39. package/dist/esm/config-loader.js.map +1 -1
  40. package/dist/esm/core/anonymous-session/InboundContactForm.d.ts.map +1 -1
  41. package/dist/esm/core/anonymous-session/InboundContactForm.js.map +1 -1
  42. package/dist/esm/core/anonymous-session/inbound-contact-form.schema.d.ts.map +1 -1
  43. package/dist/esm/core/anonymous-session/inbound-contact-form.schema.js.map +1 -1
  44. package/dist/esm/core/anonymous-session/website-anonymous-session-client.d.ts.map +1 -1
  45. package/dist/esm/core/anonymous-session/website-anonymous-session-client.js.map +1 -1
  46. package/dist/esm/core/anonymous-session/website-submission-challenge.d.ts.map +1 -1
  47. package/dist/esm/core/anonymous-session/website-submission-challenge.js.map +1 -1
  48. package/dist/esm/core/consent/WebsiteConsentBanner.d.ts.map +1 -1
  49. package/dist/esm/core/consent/WebsiteConsentBanner.js.map +1 -1
  50. package/dist/esm/core/consent/WebsiteConsentContext.d.ts.map +1 -1
  51. package/dist/esm/core/consent/WebsiteConsentGate.d.ts.map +1 -1
  52. package/dist/esm/core/consent/useWebsiteConsent.d.ts.map +1 -1
  53. package/dist/esm/core/consent/website-consent-storage.d.ts.map +1 -1
  54. package/dist/esm/core/contexts/WebsitePageContext.d.ts.map +1 -1
  55. package/dist/esm/core/contexts/WebsiteRuntimeContext.d.ts.map +1 -1
  56. package/dist/esm/core/contexts/WebsiteRuntimeContext.js.map +1 -1
  57. package/dist/esm/core/contexts/WebsiteSectionContext.d.ts.map +1 -1
  58. package/dist/esm/core/contexts/useWebsitePage.d.ts.map +1 -1
  59. package/dist/esm/core/contexts/useWebsiteRuntime.d.ts.map +1 -1
  60. package/dist/esm/core/contexts/useWebsiteRuntime.js.map +1 -1
  61. package/dist/esm/core/contexts/useWebsiteSection.d.ts.map +1 -1
  62. package/dist/esm/core/external-providers/WebsiteProviderComponent.d.ts.map +1 -1
  63. package/dist/esm/core/external-providers/WebsiteProviderComponent.js.map +1 -1
  64. package/dist/esm/core/external-providers/frontend-provider-registry.website.d.ts.map +1 -1
  65. package/dist/esm/core/external-providers/provider-component-registry.website.d.ts.map +1 -1
  66. package/dist/esm/core/external-providers/provider-component-registry.website.js.map +1 -1
  67. package/dist/esm/core/external-providers/useWebsiteProviderComponent.d.ts.map +1 -1
  68. package/dist/esm/core/external-providers/useWebsiteProviderComponent.js.map +1 -1
  69. package/dist/esm/core/external-providers/useWebsiteProviderScripts.d.ts.map +1 -1
  70. package/dist/esm/core/external-providers/useWebsiteProviderScripts.js.map +1 -1
  71. package/dist/esm/core/external-providers/website-provider-sdk-activations.d.ts.map +1 -1
  72. package/dist/esm/core/external-providers/website-provider-sdk-activations.js.map +1 -1
  73. package/dist/esm/core/factories/define-website-page-manifest.d.ts.map +1 -1
  74. package/dist/esm/core/factories/define-website-section.d.ts.map +1 -1
  75. package/dist/esm/core/factories/define-website-section.js.map +1 -1
  76. package/dist/esm/core/hooks/useWebsiteDesignTokens.d.ts.map +1 -1
  77. package/dist/esm/core/hooks/useWebsiteLabel.d.ts.map +1 -1
  78. package/dist/esm/core/layouts/WebsitePageLayout.d.ts.map +1 -1
  79. package/dist/esm/core/layouts/WebsitePageLayout.js.map +1 -1
  80. package/dist/esm/core/layouts/WebsiteSection.d.ts.map +1 -1
  81. package/dist/esm/core/routing/internal-routing.utils.d.ts.map +1 -1
  82. package/dist/esm/index.d.ts.map +1 -1
  83. package/dist/esm/index.js.map +1 -1
  84. package/dist/esm/mdx/BlogPost.d.ts.map +1 -1
  85. package/dist/esm/mdx/blog-post-collection.config.d.ts.map +1 -1
  86. package/dist/esm/mdx/blog-post-frontmatter-source.d.ts.map +1 -1
  87. package/dist/esm/mdx/index.d.ts.map +1 -1
  88. package/dist/esm/mdx.d.ts.map +1 -1
  89. package/dist/esm/schemas/blog/blog-post-frontmatter.shared.schemas.d.ts.map +1 -1
  90. package/dist/esm/schemas/design-tokens/website-design-tokens.shared.schemas.d.ts.map +1 -1
  91. package/dist/esm/schemas/design-tokens/website-design-tokens.shared.schemas.js.map +1 -1
  92. package/dist/esm/schemas/label-keys/website-consent-label-keys.schemas.d.ts.map +1 -1
  93. package/dist/esm/schemas/label-keys/website-label-key.schemas.d.ts.map +1 -1
  94. package/dist/esm/schemas/label-keys/website-provider-component-label-keys.schemas.d.ts.map +1 -1
  95. package/dist/esm/schemas/label-keys/website-provider-component-label-keys.schemas.js.map +1 -1
  96. package/dist/esm/schemas/manifests/website-page-manifest.shared.schemas.d.ts.map +1 -1
  97. package/dist/esm/schemas/manifests/website-root-config.shared.schemas.d.ts +3 -3
  98. package/dist/esm/schemas/manifests/website-root-config.shared.schemas.d.ts.map +1 -1
  99. package/dist/esm/schemas/manifests/website-root-config.shared.schemas.js.map +1 -1
  100. package/dist/esm/schemas/refs/page-ref.schemas.d.ts.map +1 -1
  101. package/dist/esm/schemas/refs/section-ref.schemas.d.ts.map +1 -1
  102. package/dist/esm/schemas/sections/website-section-category.shared.d.ts.map +1 -1
  103. package/dist/esm/schemas/sections/website-section-definition.shared.schemas.d.ts.map +1 -1
  104. package/dist/esm/schemas/sections/website-section-definition.shared.schemas.js.map +1 -1
  105. package/dist/esm/schemas/structured-data/pricing-offer-structured-data.shared.d.ts.map +1 -1
  106. package/dist/esm/schemas/structured-data/pricing-offer-structured-data.shared.js.map +1 -1
  107. package/dist/esm/schemas/structured-data/structured-data-reconciliation.shared.d.ts.map +1 -1
  108. package/dist/esm/schemas/structured-data/structured-data-reconciliation.shared.js.map +1 -1
  109. package/dist/esm/schemas/structured-data/website-structured-data.shared.schemas.d.ts.map +1 -1
  110. package/dist/esm/schemas/structured-data/website-structured-data.shared.schemas.js.map +1 -1
  111. package/dist/esm/schemas/validators/label-pack.validator.d.ts.map +1 -1
  112. package/package.json +5 -5
@@ -1 +1 @@
1
- {"version":3,"file":"website-root-config.shared.schemas.js","sourceRoot":"","sources":["../../../../src/schemas/manifests/website-root-config.shared.schemas.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,yBAAyB,EAAE,MAAM,uDAAuD,CAAC;AAClG,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,EACL,yBAAyB,GAE1B,MAAM,wCAAwC,CAAC;AAEhD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,MAAM,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IAClC,UAAU,EAAE,CAAC;SACV,IAAI,CAAC,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;SAC3E,QAAQ,EAAE;IACb,QAAQ,EAAE,CAAC;SACR,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,EAAE,EAAE,KAAK,EAAE,uDAAuD,EAAE,CAAC;SAC1E,GAAG,CAAC,CAAC,EAAE,EAAE,KAAK,EAAE,uDAAuD,EAAE,CAAC;SAC1E,QAAQ,EAAE;CACd,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,0BAA0B,GACrC,2BAA2B,CAAC;AAG9B,6DAA6D;AAE7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH,MAAM,0B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GAAG,IAAI,GAAG,EAAU,CAAC;IACzC,KAAK,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,IAAI,MAAM,CAAC,eAAe,CAAC,OAAO,EAAE,EAAE,CAAC;QAC5D,MAAM,MAAM,GAAG,GAAwB,CAAC;QACxC,IAAI,cAAc,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC;YAC/B,GAAG,CAAC,QAAQ,CAAC;gBACX,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,iBAAiB,EAAE,KAAK,CAAC;gBAChC,OAAO,EAAE,+BAA+B,MAAM,wCAAwC;aACvF,CAAC,CAAC;QACL,CAAC;QACD,cAAc,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAC7B,CAAC;AACH,CAAC,CAAC,CAAC;AAEL,MAAM,CAAC,MAAM,uBAAuB,GAAoC,wBAAwB,CAAC;AA4BjG,6DAA6D","sourcesContent":["import type { ComponentType } from 'react';\nimport { z } from 'zod';\n\nimport { WebsiteDesignTokensSchema } from '../design-tokens/website-design-tokens.shared.schemas';\nimport { WebsiteLabelKeySchema } from '../label-keys/website-label-key.schemas';\nimport {\n WebsitePageManifestSchema,\n type WebsitePageManifest,\n} from './website-page-manifest.shared.schemas';\n\n/**\n * @wildo_source:part:start saas.website.seo.sitemap-config facet:layer:shared facet:family:website\n *\n * `WebsiteSitemapConfig` — site-wide sitemap policy block.\n *\n * Materialized at build time by `@astrojs/sitemap` (the official\n * Astro plugin) when the consumer wires it into `astro.config.ts`\n * (see `website-seo-aeo-geo` SKILL). The framework owns the\n * **schema** (so config + enforcement live in lock-step with the\n * page registry) but the framework does NOT own the runtime\n * generator — `@astrojs/sitemap` already covers per-page\n * `lastmod` / `changefreq` / `priority` + i18n `xhtml:link\n * hreflang` annotations natively, and re-implementing that surface\n * inside the engine would duplicate well-trodden Astro tooling for\n * zero added value.\n *\n * # Field rationale\n *\n * **Why `enabled` defaults to `true`**:\n * - Marketing sites that want to ship public pages overwhelmingly\n * also want them in `sitemap.xml` (search engines treat its\n * absence as a discoverability signal). The opt-OUT shape avoids\n * a silent regression where a consumer ships pages that crawlers\n * never index because they forgot to flip a flag.\n * - The escape hatch (`enabled: false`) covers staging deployments\n * and the rare per-app decision to suppress sitemap emission\n * entirely (e.g. a private beta surface routed under a\n * `noindex` policy).\n *\n * **Why `changefreq` / `priority` are OPTIONAL** (no defaults):\n * - Both fields are non-binding hints — Google explicitly\n * ignores `priority` and treats `changefreq` as a soft signal.\n * Forcing the consumer to pick a value would either invite\n * superstitious authoring (`priority: 1.0` on every page) or\n * bury the field's actual ergonomic shape (per-page overrides\n * via `WebsitePageManifest.seo` — deferred until a real\n * consumer requests it).\n * - Unset values are simply omitted from the emitted `<url>`\n * entries; `@astrojs/sitemap` handles that automatically.\n *\n * **Validation**:\n * - `priority` is `z.number().min(0).max(1)` — outside the spec\n * range would silently break crawler ingestion.\n * - `changefreq` is the union of the seven values the sitemap\n * spec defines; arbitrary strings would be silently dropped by\n * compliant crawlers.\n */\nconst _WebsiteSitemapConfigSchema = z.object({\n enabled: z.boolean().default(true),\n changefreq: z\n .enum(['always', 'hourly', 'daily', 'weekly', 'monthly', 'yearly', 'never'])\n .optional(),\n priority: z\n .number()\n .min(0, { error: 'WebsiteSitemapConfig.priority must be between 0 and 1' })\n .max(1, { error: 'WebsiteSitemapConfig.priority must be between 0 and 1' })\n .optional(),\n});\n\nexport const WebsiteSitemapConfigSchema: typeof _WebsiteSitemapConfigSchema =\n _WebsiteSitemapConfigSchema;\n\nexport type WebsiteSitemapConfig = z.infer<typeof _WebsiteSitemapConfigSchema>;\n/** @wildo_source:part:end saas.website.seo.sitemap-config */\n\n/**\n * @wildo_source:part:start saas.website.seo.robots-config facet:layer:shared facet:family:website\n *\n * `WebsiteRobotsConfig` — site-wide `robots.txt` policy block.\n *\n * Materialized at request time by `renderRobotsTxt(siteContext)`\n * from `@wildo-ai/saas-website/astro` (consumer wires a thin\n * `src/pages/robots.txt.ts` Astro endpoint that returns the helper's\n * output). Scoped to the SITE-WIDE policy surface — per-page\n * `noindex` is a separate concern that lands on\n * `WebsitePageManifest.seo` once a real consumer requests it (today\n * the site-wide `disallow[]` covers staging-environment exclusion of\n * specific path prefixes, the dominant real-world use case).\n *\n * # Field rationale\n *\n * **Why `policy` defaults to `'index'`**:\n * - The default for a public marketing site is \"let crawlers in\";\n * `'noindex'` is the deliberate exception (staging environments,\n * beta surfaces, sites still under construction). The opt-OUT\n * shape mirrors `WebsiteSitemapConfig.enabled` for consistency.\n * - `'noindex'` is expressed by a `<meta name=\"robots\" content=\"noindex\">`\n * on every page, NOT by `Disallow: /` in `robots.txt` (#494): a crawler\n * barred from fetching a page never reads its noindex, so the URL can\n * still be indexed bare. `robots.txt` stays allow-everything for it.\n *\n * **Why `disallow[]` is a path-prefix list (not a regex)**:\n * - The `robots.txt` spec only supports literal path prefixes\n * with `*` / `$` wildcards; Disallow is NOT a regex surface.\n * Typing it as `string[]` (validated to start with `/`) keeps\n * the contract honest and lets consumers paste from their CDN\n * allowlists without translation.\n *\n * **Why `allowedCrawlers` and `disallowedCrawlers` are mutually\n * exclusive**:\n * - The two fields are two halves of the SAME AI-crawler policy\n * decision. `allowedCrawlers` is the deny-by-default shape\n * (only the named bots may crawl); `disallowedCrawlers` is the\n * allow-by-default shape (every bot except the named ones may\n * crawl). Mixing both would emit a contradictory `robots.txt`\n * (a bot in both lists would receive conflicting directives).\n * A `superRefine` enforces the mutual-exclusion invariant at\n * parse time so the build fails fast.\n *\n * **Validation**:\n * - `disallow[]` entries must start with `/` (sitemap path-prefix\n * spec) — anything else would silently match nothing.\n * - `allowedCrawlers` / `disallowedCrawlers` entries must be\n * non-empty strings (a blank User-agent token would emit\n * `User-agent: ` which compliant crawlers ignore — silent\n * misconfig).\n * - `superRefine` rejects the combined-list anti-pattern.\n */\nconst _WebsiteRobotsConfigSchema = z\n .object({\n policy: z.enum(['index', 'noindex']).default('index'),\n disallow: z\n .array(\n z\n .string()\n .min(1)\n .refine((path) => path.startsWith('/'), {\n error: 'WebsiteRobotsConfig.disallow[] entries must start with \"/\"',\n }),\n )\n .optional(),\n /**\n * Deny-by-default AI-crawler allowlist. When set, the emitted\n * `robots.txt` lists each named bot under its own\n * `User-agent: <bot>\\nAllow: /` block, then closes with a\n * catch-all `User-agent: *\\nDisallow: /`. Mutually exclusive\n * with `disallowedCrawlers` (see `superRefine` below).\n */\n allowedCrawlers: z.array(z.string().min(1)).optional(),\n /**\n * Allow-by-default AI-crawler denylist. When set, the emitted\n * `robots.txt` lists each named bot under its own\n * `User-agent: <bot>\\nDisallow: /` block. Mutually exclusive\n * with `allowedCrawlers` (see `superRefine` below).\n */\n disallowedCrawlers: z.array(z.string().min(1)).optional(),\n })\n .superRefine((value, ctx) => {\n if (value.allowedCrawlers !== undefined && value.disallowedCrawlers !== undefined) {\n ctx.addIssue({\n code: 'custom',\n path: ['allowedCrawlers'],\n message:\n 'WebsiteRobotsConfig.allowedCrawlers and disallowedCrawlers are mutually exclusive — pick one policy direction (deny-by-default vs allow-by-default).',\n });\n }\n });\n\nexport const WebsiteRobotsConfigSchema: typeof _WebsiteRobotsConfigSchema =\n _WebsiteRobotsConfigSchema;\n\nexport type WebsiteRobotsConfig = z.infer<typeof _WebsiteRobotsConfigSchema>;\n/** @wildo_source:part:end saas.website.seo.robots-config */\n\n/**\n * @wildo_source:part:start saas.website.seo.llms-txt-config facet:layer:shared facet:family:website\n *\n * `WebsiteLlmsTxtConfig` — site-wide `llms.txt` publication policy.\n *\n * The framework owns only the SERVING surface; the CONTENT remains\n * hand-authored in `src/content/llms.txt`. This block therefore needs\n * exactly one knob:\n *\n * - `enabled?: boolean`\n * - `true` → publish when the file exists\n * - `false` → suppress publication even if the file exists\n * - `undefined` → auto-detect (`readLlmsTxtBody` publishes when the\n * file exists, returns `null` when absent)\n *\n * Keeping the \"auto-detect when undefined\" convention in the HELPER\n * (not as a schema default) is deliberate: schema defaults are static,\n * while file presence is runtime/build-time state.\n */\nconst _WebsiteLlmsTxtConfigSchema = z.object({\n enabled: z.boolean().optional(),\n});\n\nexport const WebsiteLlmsTxtConfigSchema: typeof _WebsiteLlmsTxtConfigSchema =\n _WebsiteLlmsTxtConfigSchema;\n\nexport type WebsiteLlmsTxtConfig = z.infer<typeof _WebsiteLlmsTxtConfigSchema>;\n/** @wildo_source:part:end saas.website.seo.llms-txt-config */\n\n/**\n * @wildo_source:part:start saas.website.root-config.seo facet:layer:shared facet:family:website\n *\n * `WebsiteSeoConfig` — site-wide SEO/social-graph configuration\n * AUTHORED ON THE ROOT CONFIG.\n *\n * # Scope\n *\n * The public marketing-site origin belongs only in the per-service\n * `wildo.website.config.ts` declaration. Keep it out of this site-level SEO\n * block so the origin and localized routing have one source of truth.\n *\n * What stays on this block: site-level branding + hero-image\n * fallbacks that are co-authored with chrome labels and page\n * manifests respectively, NOT with the URL/i18n routing surface.\n *\n * # Field rationale\n *\n * **Why `siteName` is REQUIRED**:\n * - `og:site_name` is the brand label social platforms render\n * above the page title in shared previews. Without it, every\n * LinkedIn / Facebook / Slack preview shows the bare title with\n * no brand context.\n * - It is also the recommended `application-name` meta tag value\n * and a useful default for JSON-LD `Organization.name` schema\n * when the application ships structured data.\n *\n * **Why `defaultOgImageUrl` is OPTIONAL**:\n * - Each page's `WebsitePageManifest.metaLabelKeys.ogImageUrl`\n * takes precedence; the site-level default is a fallback for\n * pages that did not commit to a hero image.\n * - Marketing surfaces shipping no OG images at all (acceptable\n * for a placeholder build) should not be forced to author one.\n *\n * **Why `sitemap?` and `robots?` are OPTIONAL** (with sensible\n * defaults inside each sub-schema):\n * - The marketing-site default ships a public surface — every\n * page indexable, no AI-crawler restrictions, no per-path\n * disallow. Forcing every consumer to author both blocks just\n * to land in that default state would pollute the call site.\n * - Omitting either block at the call site is equivalent to\n * authoring `{}` — `WebsiteSitemapConfig.enabled` defaults to\n * `true`, `WebsiteRobotsConfig.policy` defaults to `'index'`.\n * The per-block field rationale lives on each sub-schema.\n * - `llmsTxt?` is similarly optional, but with a different default\n * mechanic: omitting the block means \"auto-detect from file\n * presence\" rather than \"use a static schema default\". The helper\n * `readLlmsTxtBody(...)` publishes when `src/content/llms.txt`\n * exists and returns `null` otherwise.\n *\n * **Validation**:\n * - `siteName` is `z.string().min(1)` — empty strings would emit\n * `<meta property=\"og:site_name\" content=\"\" />` which social\n * platforms render as a blank line.\n * - `defaultOgImageUrl` (when present) is `z.url()`.\n * - `sitemap` / `robots` validation lives on the sub-schemas.\n */\nconst _WebsiteSeoConfigSchema = z\n .object({\n siteName: z\n .string()\n .min(1, { error: 'WebsiteSeoConfig.siteName must be a non-empty string' }),\n defaultOgImageUrl: z\n .url({ error: 'WebsiteSeoConfig.defaultOgImageUrl must be a fully-qualified URL' })\n .optional(),\n /**\n * Sitemap policy block. Optional — omitting it is equivalent to\n * `{ enabled: true }` (the marketing-site default). See\n * `WebsiteSitemapConfigSchema` for field-by-field rationale.\n */\n sitemap: _WebsiteSitemapConfigSchema.optional(),\n /**\n * Robots.txt policy block. Optional — omitting it is equivalent\n * to `{ policy: 'index' }` (the marketing-site default). See\n * `WebsiteRobotsConfigSchema` for field-by-field rationale.\n */\n robots: _WebsiteRobotsConfigSchema.optional(),\n /**\n * `llms.txt` publication policy. Optional — omitting it means\n * \"auto-detect from file presence\". See\n * `WebsiteLlmsTxtConfigSchema` for the serving contract.\n */\n llmsTxt: _WebsiteLlmsTxtConfigSchema.optional(),\n });\n\nexport const WebsiteSeoConfigSchema: typeof _WebsiteSeoConfigSchema = _WebsiteSeoConfigSchema;\n\nexport type WebsiteSeoConfig = z.infer<typeof _WebsiteSeoConfigSchema>;\n/** @wildo_source:part:end saas.website.root-config.seo */\n\n/**\n * @wildo_source:part:start saas.website.root-config.navigation facet:layer:shared facet:family:website\n *\n * `WebsiteNavigationConfig` — site-wide header/footer slot bindings.\n *\n * The framework intentionally ships no concrete header or footer. The\n * application authors both as React components, registers them once here, and\n * the page layout renders the site-wide chrome around every page.\n *\n * Both fields are typed as `unknown` at the schema layer with the\n * `WebsiteNavigationConfig` interface narrowing them to\n * `ComponentType<unknown>` — same rationale as\n * `WebsiteSectionDefinition.Component` and `WebsitePageManifest.pageComponent`.\n */\nconst _WebsiteNavigationConfigSchema = z.object({\n headerComponent: z.unknown(),\n footerComponent: z.unknown(),\n});\n\nexport const WebsiteNavigationConfigSchema: typeof _WebsiteNavigationConfigSchema =\n _WebsiteNavigationConfigSchema;\n\nexport interface WebsiteNavigationConfig\n extends z.infer<typeof _WebsiteNavigationConfigSchema> {\n headerComponent: ComponentType<unknown>;\n footerComponent: ComponentType<unknown>;\n}\n/** @wildo_source:part:end saas.website.root-config.navigation */\n\n/**\n * @wildo_source:part:start saas.website.root-config.schema facet:layer:shared facet:family:website\n *\n * `WebsiteRootConfig` — the site-level configuration consumed by:\n * - the Astro adapter to drive i18n routing, page mounting,\n * and design-token CSS emission,\n * - the website audit command to validate label-pack\n * coverage and SEO structured-data conformance,\n * - the runtime `<WebsitePageLayout>` to render navigation\n * and apply design tokens.\n *\n * **Authoring convention**: each marketing-site service exports a single\n * `WEBSITE_ROOT_CONFIG: WebsiteRootConfig` from `src/website-root.config.ts`.\n * The Astro adapter and the audit command\n * both consume this canonical entry point; there is exactly one site\n * config per marketing site (no per-page or per-section overrides at\n * this level — overrides flow through the L0/L1/L1.5 component\n * registration hierarchy described in D6).\n *\n * # Scope\n *\n * This block carries site-level chrome and registry data only. Per-locale\n * routing (`locales` / `defaultLocale`) and the public origin belong in the\n * per-service `wildo.website.config.ts` declaration, avoiding duplicated\n * configuration that could diverge during site generation.\n *\n * **Field-by-field rationale**:\n *\n * - `pageManifests` — the registry of every page on the site. Indexed\n * downstream by `manifest.ref`. Refs MUST be unique (refinement\n * below).\n * - `designTokens` — see `WebsiteDesignTokensSchema`.\n * - `navigation` — see `WebsiteNavigationConfigSchema`.\n * - `chromeLabelKeys` — OPTIONAL. The set of fully-composed label keys\n * the site-wide chrome (header / footer / any global slot the\n * consumer renders outside a section context) reads via\n * `useWebsiteLabelByKey(...)`. Declared here, NOT in section\n * `expectedLabelKeys`, because chrome is rendered outside the\n * page+section context — `useWebsiteLabel(slot)` is structurally\n * unavailable to it. Threading these through the label-pack\n * validator (a) silences the always-on \"orphaned chrome key\" build\n * warnings and (b) lets the build fail fast when a chrome key is\n * missing from a locale pack, the same way section keys do.\n * Defaults to an empty array; sites with no chrome label reads\n * may omit the field entirely.\n * - `seo` — site-level branding + hero-image fallback (see\n * `WebsiteSeoConfigSchema`). The marketing-site origin USED to live\n * here as `seo.siteOrigin`; it now lives only on\n * `WildoMarketingWebsiteConfig.publicOrigin`.\n * - `skipToMainContentLabelKey` — see field JSDoc below.\n *\n * **Refinements**:\n * - `pageManifests[].ref` uniqueness — the registry is keyed by ref;\n * duplicates would silently overwrite each other in the lookup\n * table the bridge uses for cross-page links.\n * - `pageManifests[].routePath` uniqueness — two pages cannot mount\n * at the same path (Astro would error at build time, but we\n * surface it earlier here with a clearer diagnostic).\n * - `chromeLabelKeys` uniqueness — duplicates indicate copy-paste\n * bugs at the consumer's call site; surface them here.\n */\nconst _WebsiteRootConfigSchema = z\n .object({\n pageManifests: z.array(WebsitePageManifestSchema).min(1, {\n error: 'WebsiteRootConfig must declare at least one page manifest',\n }),\n designTokens: WebsiteDesignTokensSchema,\n navigation: _WebsiteNavigationConfigSchema,\n chromeLabelKeys: z.array(WebsiteLabelKeySchema).default([]),\n /**\n * Site-level branding + hero-image fallback used by the Astro\n * head renderer to compose `<meta property=\"og:site_name\">` and\n * the per-page OG image fallback. The marketing-site origin\n * (`siteOrigin`) USED to live here; it was moved to\n * `WildoMarketingWebsiteConfig.publicOrigin` in the seam-collapse\n * (single source of truth for \"what's the origin this site is\n * reachable at\").\n */\n seo: _WebsiteSeoConfigSchema,\n /**\n * Label key the framework reads to render the \"Skip to main\n * content\" link as the first focusable element on every page\n * Required because:\n * - Skip-to-main is a baseline keyboard-accessibility\n * affordance — WCAG 2.1 §2.4.1 \"Bypass Blocks\" (Level A)\n * mandates it. A marketing-site framework that omits it\n * fails AA for the entire surface; making the contract\n * opt-in invites that regression on every new consumer.\n * - The text is announced verbatim by assistive tech, so it\n * MUST be localized — a hardcoded English fallback would\n * speak \"Skip to main content\" to French users. Forcing the\n * key through the label-pack validation surface means the\n * dev server fails fast when the consumer forgets to add\n * the entry to a locale pack.\n * - The framework (NOT the consumer's chrome) owns rendering\n * the skip link because the chrome is itself the obstacle\n * the link bypasses — a chrome-side implementation would\n * either be inside the chrome (impossible to focus before\n * the chrome) or above it (creating a structural surface\n * the framework needs anyway).\n *\n * It is validated as a chrome key without being listed in\n * `chromeLabelKeys`: the label-pack loader adds it to the effective\n * chrome key set (`composeEffectiveChromeLabelKeys` in\n * `astro/label-pack-loader.ts`), so consumers cannot forget it.\n */\n skipToMainContentLabelKey: WebsiteLabelKeySchema,\n })\n .superRefine((config, ctx) => {\n const seenRefs = new Set<string>();\n const seenRoutePaths = new Set<string>();\n for (const [index, manifest] of config.pageManifests.entries()) {\n const refKey = manifest.ref as unknown as string;\n if (seenRefs.has(refKey)) {\n ctx.addIssue({\n code: 'custom',\n path: ['pageManifests', index, 'ref'],\n message: `Duplicate page ref \"${refKey}\" in WebsiteRootConfig.pageManifests`,\n });\n }\n seenRefs.add(refKey);\n\n const routeKey = manifest.routePath as unknown as string;\n if (seenRoutePaths.has(routeKey)) {\n ctx.addIssue({\n code: 'custom',\n path: ['pageManifests', index, 'routePath'],\n message: `Duplicate routePath \"${routeKey}\" in WebsiteRootConfig.pageManifests`,\n });\n }\n seenRoutePaths.add(routeKey);\n }\n\n /**\n * `chromeLabelKeys` uniqueness — a duplicate is harmless at\n * runtime (the validator de-dupes via a Set) but always indicates\n * a copy-paste bug at the consumer's call site. Surfacing it here\n * keeps the chrome contract tidy and matches the discipline applied\n * to `pageManifests[].ref` and `locales`.\n */\n const seenChromeKeys = new Set<string>();\n for (const [index, key] of config.chromeLabelKeys.entries()) {\n const keyStr = key as unknown as string;\n if (seenChromeKeys.has(keyStr)) {\n ctx.addIssue({\n code: 'custom',\n path: ['chromeLabelKeys', index],\n message: `Duplicate chrome label key \"${keyStr}\" in WebsiteRootConfig.chromeLabelKeys`,\n });\n }\n seenChromeKeys.add(keyStr);\n }\n });\n\nexport const WebsiteRootConfigSchema: typeof _WebsiteRootConfigSchema = _WebsiteRootConfigSchema;\n\n/**\n * Runtime shape of `WebsiteRootConfig`.\n *\n * Hand-written (NOT a bare `z.infer<typeof _WebsiteRootConfigSchema>`)\n * because `z.infer` walks the schema tree and would type\n * `pageManifests[number].pageComponent`, `navigation.headerComponent`\n * and `navigation.footerComponent` as `unknown` (their schema field\n * type), losing the `ComponentType<unknown>` narrowing carried by the\n * hand-written `WebsitePageManifest` and `WebsiteNavigationConfig`\n * interfaces. The layout primitives and the Astro helpers consume\n * `WebsiteRootConfig` and must see those\n * fields pre-narrowed; otherwise every consumer would need a local\n * `as ComponentType` cast at the JSX call site, defeating the type-safe\n * component contract.\n *\n * The `Omit` + intersection pattern keeps the rest of the inferred\n * shape (`designTokens`, `seo`, `chromeLabelKeys`,\n * `skipToMainContentLabelKey`) sourced directly from the schema.\n */\nexport type WebsiteRootConfig = Omit<\n z.infer<typeof _WebsiteRootConfigSchema>,\n 'pageManifests' | 'navigation'\n> & {\n pageManifests: WebsitePageManifest[];\n navigation: WebsiteNavigationConfig;\n};\n/** @wildo_source:part:end saas.website.root-config.schema */\n"]}
1
+ {"version":3,"file":"website-root-config.shared.schemas.js","sourceRoot":"","sources":["../../../../../src/schemas/manifests/website-root-config.shared.schemas.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,yBAAyB,EAAE,MAAM,uDAAuD,CAAC;AAClG,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,EACL,yBAAyB,GAE1B,MAAM,wCAAwC,CAAC;AAEhD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,MAAM,2BAA2B,GAAG,CA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'zod';\n\nimport { WebsiteDesignTokensSchema } from '../design-tokens/website-design-tokens.shared.schemas';\nimport { WebsiteLabelKeySchema } from '../label-keys/website-label-key.schemas';\nimport {\n WebsitePageManifestSchema,\n type WebsitePageManifest,\n} from './website-page-manifest.shared.schemas';\n\n/**\n * @wildo_source:part:start saas.website.seo.sitemap-config facet:layer:shared facet:family:website\n *\n * `WebsiteSitemapConfig` — site-wide sitemap policy block.\n *\n * Materialized at build time by `@astrojs/sitemap` (the official\n * Astro plugin) when the consumer wires it into `astro.config.ts`\n * (see `website-seo-aeo-geo` SKILL). The framework owns the\n * **schema** (so config + enforcement live in lock-step with the\n * page registry) but the framework does NOT own the runtime\n * generator — `@astrojs/sitemap` already covers per-page\n * `lastmod` / `changefreq` / `priority` + i18n `xhtml:link\n * hreflang` annotations natively, and re-implementing that surface\n * inside the engine would duplicate well-trodden Astro tooling for\n * zero added value.\n *\n * # Field rationale\n *\n * **Why `enabled` defaults to `true`**:\n * - Marketing sites that want to ship public pages overwhelmingly\n * also want them in `sitemap.xml` (search engines treat its\n * absence as a discoverability signal). The opt-OUT shape avoids\n * a silent regression where a consumer ships pages that crawlers\n * never index because they forgot to flip a flag.\n * - The escape hatch (`enabled: false`) covers staging deployments\n * and the rare per-app decision to suppress sitemap emission\n * entirely (e.g. a private beta surface routed under a\n * `noindex` policy).\n *\n * **Why `changefreq` / `priority` are OPTIONAL** (no defaults):\n * - Both fields are non-binding hints — Google explicitly\n * ignores `priority` and treats `changefreq` as a soft signal.\n * Forcing the consumer to pick a value would either invite\n * superstitious authoring (`priority: 1.0` on every page) or\n * bury the field's actual ergonomic shape (per-page overrides\n * via `WebsitePageManifest.seo` — deferred until a real\n * consumer requests it).\n * - Unset values are simply omitted from the emitted `<url>`\n * entries; `@astrojs/sitemap` handles that automatically.\n *\n * **Validation**:\n * - `priority` is `z.number().min(0).max(1)` — outside the spec\n * range would silently break crawler ingestion.\n * - `changefreq` is the union of the seven values the sitemap\n * spec defines; arbitrary strings would be silently dropped by\n * compliant crawlers.\n */\nconst _WebsiteSitemapConfigSchema = z.object({\n enabled: z.boolean().default(true),\n changefreq: z\n .enum(['always', 'hourly', 'daily', 'weekly', 'monthly', 'yearly', 'never'])\n .optional(),\n priority: z\n .number()\n .min(0, { error: 'WebsiteSitemapConfig.priority must be between 0 and 1' })\n .max(1, { error: 'WebsiteSitemapConfig.priority must be between 0 and 1' })\n .optional(),\n});\n\nexport const WebsiteSitemapConfigSchema: typeof _WebsiteSitemapConfigSchema =\n _WebsiteSitemapConfigSchema;\n\nexport type WebsiteSitemapConfig = z.infer<typeof _WebsiteSitemapConfigSchema>;\n/** @wildo_source:part:end saas.website.seo.sitemap-config */\n\n/**\n * @wildo_source:part:start saas.website.seo.robots-config facet:layer:shared facet:family:website\n *\n * `WebsiteRobotsConfig` — site-wide `robots.txt` policy block.\n *\n * Materialized at request time by `renderRobotsTxt(siteContext)`\n * from `@wildo-ai/saas-website/astro` (consumer wires a thin\n * `src/pages/robots.txt.ts` Astro endpoint that returns the helper's\n * output). Scoped to the SITE-WIDE policy surface — per-page\n * `noindex` is a separate concern that lands on\n * `WebsitePageManifest.seo` once a real consumer requests it (today\n * the site-wide `disallow[]` covers staging-environment exclusion of\n * specific path prefixes, the dominant real-world use case).\n *\n * # Field rationale\n *\n * **Why `policy` defaults to `'index'`**:\n * - The default for a public marketing site is \"let crawlers in\";\n * `'noindex'` is the deliberate exception (staging environments,\n * beta surfaces, sites still under construction). The opt-OUT\n * shape mirrors `WebsiteSitemapConfig.enabled` for consistency.\n * - `'noindex'` is expressed by a `<meta name=\"robots\" content=\"noindex\">`\n * on every page, NOT by `Disallow: /` in `robots.txt` (#494): a crawler\n * barred from fetching a page never reads its noindex, so the URL can\n * still be indexed bare. `robots.txt` stays allow-everything for it.\n *\n * **Why `disallow[]` is a path-prefix list (not a regex)**:\n * - The `robots.txt` spec only supports literal path prefixes\n * with `*` / `$` wildcards; Disallow is NOT a regex surface.\n * Typing it as `string[]` (validated to start with `/`) keeps\n * the contract honest and lets consumers paste from their CDN\n * allowlists without translation.\n *\n * **Why `allowedCrawlers` and `disallowedCrawlers` are mutually\n * exclusive**:\n * - The two fields are two halves of the SAME AI-crawler policy\n * decision. `allowedCrawlers` is the deny-by-default shape\n * (only the named bots may crawl); `disallowedCrawlers` is the\n * allow-by-default shape (every bot except the named ones may\n * crawl). Mixing both would emit a contradictory `robots.txt`\n * (a bot in both lists would receive conflicting directives).\n * A `superRefine` enforces the mutual-exclusion invariant at\n * parse time so the build fails fast.\n *\n * **Validation**:\n * - `disallow[]` entries must start with `/` (sitemap path-prefix\n * spec) — anything else would silently match nothing.\n * - `allowedCrawlers` / `disallowedCrawlers` entries must be\n * non-empty strings (a blank User-agent token would emit\n * `User-agent: ` which compliant crawlers ignore — silent\n * misconfig).\n * - `superRefine` rejects the combined-list anti-pattern.\n */\nconst _WebsiteRobotsConfigSchema = z\n .object({\n policy: z.enum(['index', 'noindex']).default('index'),\n disallow: z\n .array(\n z\n .string()\n .min(1)\n .refine((path) => path.startsWith('/'), {\n error: 'WebsiteRobotsConfig.disallow[] entries must start with \"/\"',\n }),\n )\n .optional(),\n /**\n * Deny-by-default AI-crawler allowlist. When set, the emitted\n * `robots.txt` lists each named bot under its own\n * `User-agent: <bot>\\nAllow: /` block, then closes with a\n * catch-all `User-agent: *\\nDisallow: /`. Mutually exclusive\n * with `disallowedCrawlers` (see `superRefine` below).\n */\n allowedCrawlers: z.array(z.string().min(1)).optional(),\n /**\n * Allow-by-default AI-crawler denylist. When set, the emitted\n * `robots.txt` lists each named bot under its own\n * `User-agent: <bot>\\nDisallow: /` block. Mutually exclusive\n * with `allowedCrawlers` (see `superRefine` below).\n */\n disallowedCrawlers: z.array(z.string().min(1)).optional(),\n })\n .superRefine((value, ctx) => {\n if (value.allowedCrawlers !== undefined && value.disallowedCrawlers !== undefined) {\n ctx.addIssue({\n code: 'custom',\n path: ['allowedCrawlers'],\n message:\n 'WebsiteRobotsConfig.allowedCrawlers and disallowedCrawlers are mutually exclusive — pick one policy direction (deny-by-default vs allow-by-default).',\n });\n }\n });\n\nexport const WebsiteRobotsConfigSchema: typeof _WebsiteRobotsConfigSchema =\n _WebsiteRobotsConfigSchema;\n\nexport type WebsiteRobotsConfig = z.infer<typeof _WebsiteRobotsConfigSchema>;\n/** @wildo_source:part:end saas.website.seo.robots-config */\n\n/**\n * @wildo_source:part:start saas.website.seo.llms-txt-config facet:layer:shared facet:family:website\n *\n * `WebsiteLlmsTxtConfig` — site-wide `llms.txt` publication policy.\n *\n * The framework owns only the SERVING surface; the CONTENT remains\n * hand-authored in `src/content/llms.txt`. This block therefore needs\n * exactly one knob:\n *\n * - `enabled?: boolean`\n * - `true` → publish when the file exists\n * - `false` → suppress publication even if the file exists\n * - `undefined` → auto-detect (`readLlmsTxtBody` publishes when the\n * file exists, returns `null` when absent)\n *\n * Keeping the \"auto-detect when undefined\" convention in the HELPER\n * (not as a schema default) is deliberate: schema defaults are static,\n * while file presence is runtime/build-time state.\n */\nconst _WebsiteLlmsTxtConfigSchema = z.object({\n enabled: z.boolean().optional(),\n});\n\nexport const WebsiteLlmsTxtConfigSchema: typeof _WebsiteLlmsTxtConfigSchema =\n _WebsiteLlmsTxtConfigSchema;\n\nexport type WebsiteLlmsTxtConfig = z.infer<typeof _WebsiteLlmsTxtConfigSchema>;\n/** @wildo_source:part:end saas.website.seo.llms-txt-config */\n\n/**\n * @wildo_source:part:start saas.website.root-config.seo facet:layer:shared facet:family:website\n *\n * `WebsiteSeoConfig` — site-wide SEO/social-graph configuration\n * AUTHORED ON THE ROOT CONFIG.\n *\n * # Scope\n *\n * The public marketing-site origin belongs only in the per-service\n * `wildo.website.config.ts` declaration. Keep it out of this site-level SEO\n * block so the origin and localized routing have one source of truth.\n *\n * What stays on this block: site-level branding + hero-image\n * fallbacks that are co-authored with chrome labels and page\n * manifests respectively, NOT with the URL/i18n routing surface.\n *\n * # Field rationale\n *\n * **Why `siteName` is REQUIRED**:\n * - `og:site_name` is the brand label social platforms render\n * above the page title in shared previews. Without it, every\n * LinkedIn / Facebook / Slack preview shows the bare title with\n * no brand context.\n * - It is also the recommended `application-name` meta tag value\n * and a useful default for JSON-LD `Organization.name` schema\n * when the application ships structured data.\n *\n * **Why `defaultOgImageUrl` is OPTIONAL**:\n * - Each page's `WebsitePageManifest.metaLabelKeys.ogImageUrl`\n * takes precedence; the site-level default is a fallback for\n * pages that did not commit to a hero image.\n * - Marketing surfaces shipping no OG images at all (acceptable\n * for a placeholder build) should not be forced to author one.\n *\n * **Why `sitemap?` and `robots?` are OPTIONAL** (with sensible\n * defaults inside each sub-schema):\n * - The marketing-site default ships a public surface — every\n * page indexable, no AI-crawler restrictions, no per-path\n * disallow. Forcing every consumer to author both blocks just\n * to land in that default state would pollute the call site.\n * - Omitting either block at the call site is equivalent to\n * authoring `{}` — `WebsiteSitemapConfig.enabled` defaults to\n * `true`, `WebsiteRobotsConfig.policy` defaults to `'index'`.\n * The per-block field rationale lives on each sub-schema.\n * - `llmsTxt?` is similarly optional, but with a different default\n * mechanic: omitting the block means \"auto-detect from file\n * presence\" rather than \"use a static schema default\". The helper\n * `readLlmsTxtBody(...)` publishes when `src/content/llms.txt`\n * exists and returns `null` otherwise.\n *\n * **Validation**:\n * - `siteName` is `z.string().min(1)` — empty strings would emit\n * `<meta property=\"og:site_name\" content=\"\" />` which social\n * platforms render as a blank line.\n * - `defaultOgImageUrl` (when present) is `z.url()`.\n * - `sitemap` / `robots` validation lives on the sub-schemas.\n */\nconst _WebsiteSeoConfigSchema = z\n .object({\n siteName: z\n .string()\n .min(1, { error: 'WebsiteSeoConfig.siteName must be a non-empty string' }),\n defaultOgImageUrl: z\n .url({ error: 'WebsiteSeoConfig.defaultOgImageUrl must be a fully-qualified URL' })\n .optional(),\n /**\n * Sitemap policy block. Optional — omitting it is equivalent to\n * `{ enabled: true }` (the marketing-site default). See\n * `WebsiteSitemapConfigSchema` for field-by-field rationale.\n */\n sitemap: _WebsiteSitemapConfigSchema.optional(),\n /**\n * Robots.txt policy block. Optional — omitting it is equivalent\n * to `{ policy: 'index' }` (the marketing-site default). See\n * `WebsiteRobotsConfigSchema` for field-by-field rationale.\n */\n robots: _WebsiteRobotsConfigSchema.optional(),\n /**\n * `llms.txt` publication policy. Optional — omitting it means\n * \"auto-detect from file presence\". See\n * `WebsiteLlmsTxtConfigSchema` for the serving contract.\n */\n llmsTxt: _WebsiteLlmsTxtConfigSchema.optional(),\n });\n\nexport const WebsiteSeoConfigSchema: typeof _WebsiteSeoConfigSchema = _WebsiteSeoConfigSchema;\n\nexport type WebsiteSeoConfig = z.infer<typeof _WebsiteSeoConfigSchema>;\n/** @wildo_source:part:end saas.website.root-config.seo */\n\n/**\n * @wildo_source:part:start saas.website.root-config.navigation facet:layer:shared facet:family:website\n *\n * `WebsiteNavigationConfig` — site-wide header/footer slot bindings.\n *\n * The framework intentionally ships no concrete header or footer. The\n * application authors both as React components, registers them once here, and\n * the page layout renders the site-wide chrome around every page.\n *\n * Both fields are typed as `unknown` at the schema layer with the\n * `WebsiteNavigationConfig` interface narrowing them to\n * `ComponentType<unknown>` — same rationale as\n * `WebsiteSectionDefinition.Component` and `WebsitePageManifest.pageComponent`.\n */\nconst _WebsiteNavigationConfigSchema = z.object({\n headerComponent: z.unknown(),\n footerComponent: z.unknown(),\n});\n\nexport const WebsiteNavigationConfigSchema: typeof _WebsiteNavigationConfigSchema =\n _WebsiteNavigationConfigSchema;\n\nexport interface WebsiteNavigationConfig\n extends z.infer<typeof _WebsiteNavigationConfigSchema> {\n headerComponent: ComponentType<unknown>;\n footerComponent: ComponentType<unknown>;\n}\n/** @wildo_source:part:end saas.website.root-config.navigation */\n\n/**\n * @wildo_source:part:start saas.website.root-config.schema facet:layer:shared facet:family:website\n *\n * `WebsiteRootConfig` — the site-level configuration consumed by:\n * - the Astro adapter to drive i18n routing, page mounting,\n * and design-token CSS emission,\n * - the website audit command to validate label-pack\n * coverage and SEO structured-data conformance,\n * - the runtime `<WebsitePageLayout>` to render navigation\n * and apply design tokens.\n *\n * **Authoring convention**: each marketing-site service exports a single\n * `WEBSITE_ROOT_CONFIG: WebsiteRootConfig` from `src/website-root.config.ts`.\n * The Astro adapter and the audit command\n * both consume this canonical entry point; there is exactly one site\n * config per marketing site (no per-page or per-section overrides at\n * this level — overrides flow through the L0/L1/L1.5 component\n * registration hierarchy described in D6).\n *\n * # Scope\n *\n * This block carries site-level chrome and registry data only. Per-locale\n * routing (`locales` / `defaultLocale`) and the public origin belong in the\n * per-service `wildo.website.config.ts` declaration, avoiding duplicated\n * configuration that could diverge during site generation.\n *\n * **Field-by-field rationale**:\n *\n * - `pageManifests` — the registry of every page on the site. Indexed\n * downstream by `manifest.ref`. Refs MUST be unique (refinement\n * below).\n * - `designTokens` — see `WebsiteDesignTokensSchema`.\n * - `navigation` — see `WebsiteNavigationConfigSchema`.\n * - `chromeLabelKeys` — OPTIONAL. The set of fully-composed label keys\n * the site-wide chrome (header / footer / any global slot the\n * consumer renders outside a section context) reads via\n * `useWebsiteLabelByKey(...)`. Declared here, NOT in section\n * `expectedLabelKeys`, because chrome is rendered outside the\n * page+section context — `useWebsiteLabel(slot)` is structurally\n * unavailable to it. Threading these through the label-pack\n * validator (a) silences the always-on \"orphaned chrome key\" build\n * warnings and (b) lets the build fail fast when a chrome key is\n * missing from a locale pack, the same way section keys do.\n * Defaults to an empty array; sites with no chrome label reads\n * may omit the field entirely.\n * - `seo` — site-level branding + hero-image fallback (see\n * `WebsiteSeoConfigSchema`). The marketing-site origin USED to live\n * here as `seo.siteOrigin`; it now lives only on\n * `WildoMarketingWebsiteConfig.publicOrigin`.\n * - `skipToMainContentLabelKey` — see field JSDoc below.\n *\n * **Refinements**:\n * - `pageManifests[].ref` uniqueness — the registry is keyed by ref;\n * duplicates would silently overwrite each other in the lookup\n * table the bridge uses for cross-page links.\n * - `pageManifests[].routePath` uniqueness — two pages cannot mount\n * at the same path (Astro would error at build time, but we\n * surface it earlier here with a clearer diagnostic).\n * - `chromeLabelKeys` uniqueness — duplicates indicate copy-paste\n * bugs at the consumer's call site; surface them here.\n */\nconst _WebsiteRootConfigSchema = z\n .object({\n pageManifests: z.array(WebsitePageManifestSchema).min(1, {\n error: 'WebsiteRootConfig must declare at least one page manifest',\n }),\n designTokens: WebsiteDesignTokensSchema,\n navigation: _WebsiteNavigationConfigSchema,\n chromeLabelKeys: z.array(WebsiteLabelKeySchema).default([]),\n /**\n * Site-level branding + hero-image fallback used by the Astro\n * head renderer to compose `<meta property=\"og:site_name\">` and\n * the per-page OG image fallback. The marketing-site origin\n * (`siteOrigin`) USED to live here; it was moved to\n * `WildoMarketingWebsiteConfig.publicOrigin` in the seam-collapse\n * (single source of truth for \"what's the origin this site is\n * reachable at\").\n */\n seo: _WebsiteSeoConfigSchema,\n /**\n * Label key the framework reads to render the \"Skip to main\n * content\" link as the first focusable element on every page\n * Required because:\n * - Skip-to-main is a baseline keyboard-accessibility\n * affordance — WCAG 2.1 §2.4.1 \"Bypass Blocks\" (Level A)\n * mandates it. A marketing-site framework that omits it\n * fails AA for the entire surface; making the contract\n * opt-in invites that regression on every new consumer.\n * - The text is announced verbatim by assistive tech, so it\n * MUST be localized — a hardcoded English fallback would\n * speak \"Skip to main content\" to French users. Forcing the\n * key through the label-pack validation surface means the\n * dev server fails fast when the consumer forgets to add\n * the entry to a locale pack.\n * - The framework (NOT the consumer's chrome) owns rendering\n * the skip link because the chrome is itself the obstacle\n * the link bypasses — a chrome-side implementation would\n * either be inside the chrome (impossible to focus before\n * the chrome) or above it (creating a structural surface\n * the framework needs anyway).\n *\n * It is validated as a chrome key without being listed in\n * `chromeLabelKeys`: the label-pack loader adds it to the effective\n * chrome key set (`composeEffectiveChromeLabelKeys` in\n * `astro/label-pack-loader.ts`), so consumers cannot forget it.\n */\n skipToMainContentLabelKey: WebsiteLabelKeySchema,\n })\n .superRefine((config, ctx) => {\n const seenRefs = new Set<string>();\n const seenRoutePaths = new Set<string>();\n for (const [index, manifest] of config.pageManifests.entries()) {\n const refKey = manifest.ref as unknown as string;\n if (seenRefs.has(refKey)) {\n ctx.addIssue({\n code: 'custom',\n path: ['pageManifests', index, 'ref'],\n message: `Duplicate page ref \"${refKey}\" in WebsiteRootConfig.pageManifests`,\n });\n }\n seenRefs.add(refKey);\n\n const routeKey = manifest.routePath as unknown as string;\n if (seenRoutePaths.has(routeKey)) {\n ctx.addIssue({\n code: 'custom',\n path: ['pageManifests', index, 'routePath'],\n message: `Duplicate routePath \"${routeKey}\" in WebsiteRootConfig.pageManifests`,\n });\n }\n seenRoutePaths.add(routeKey);\n }\n\n /**\n * `chromeLabelKeys` uniqueness — a duplicate is harmless at\n * runtime (the validator de-dupes via a Set) but always indicates\n * a copy-paste bug at the consumer's call site. Surfacing it here\n * keeps the chrome contract tidy and matches the discipline applied\n * to `pageManifests[].ref` and `locales`.\n */\n const seenChromeKeys = new Set<string>();\n for (const [index, key] of config.chromeLabelKeys.entries()) {\n const keyStr = key as unknown as string;\n if (seenChromeKeys.has(keyStr)) {\n ctx.addIssue({\n code: 'custom',\n path: ['chromeLabelKeys', index],\n message: `Duplicate chrome label key \"${keyStr}\" in WebsiteRootConfig.chromeLabelKeys`,\n });\n }\n seenChromeKeys.add(keyStr);\n }\n });\n\nexport const WebsiteRootConfigSchema: typeof _WebsiteRootConfigSchema = _WebsiteRootConfigSchema;\n\n/**\n * Runtime shape of `WebsiteRootConfig`.\n *\n * Hand-written (NOT a bare `z.infer<typeof _WebsiteRootConfigSchema>`)\n * because `z.infer` walks the schema tree and would type\n * `pageManifests[number].pageComponent`, `navigation.headerComponent`\n * and `navigation.footerComponent` as `unknown` (their schema field\n * type), losing the `ComponentType<unknown>` narrowing carried by the\n * hand-written `WebsitePageManifest` and `WebsiteNavigationConfig`\n * interfaces. The layout primitives and the Astro helpers consume\n * `WebsiteRootConfig` and must see those\n * fields pre-narrowed; otherwise every consumer would need a local\n * `as ComponentType` cast at the JSX call site, defeating the type-safe\n * component contract.\n *\n * The `Omit` + intersection pattern keeps the rest of the inferred\n * shape (`designTokens`, `seo`, `chromeLabelKeys`,\n * `skipToMainContentLabelKey`) sourced directly from the schema.\n */\nexport type WebsiteRootConfig = Omit<\n z.infer<typeof _WebsiteRootConfigSchema>,\n 'pageManifests' | 'navigation'\n> & {\n pageManifests: WebsitePageManifest[];\n navigation: WebsiteNavigationConfig;\n};\n/** @wildo_source:part:end saas.website.root-config.schema */\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"page-ref.schemas.d.ts","sourceRoot":"","sources":["../../../../src/schemas/refs/page-ref.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,QAAA,MAAM,qBAAqB,0DAQC,CAAC;AAE7B,eAAO,MAAM,oBAAoB,EAAE,OAAO,qBAA6C,CAAC;AAExF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;;AACnE,oDAAoD"}
1
+ {"version":3,"file":"page-ref.schemas.d.ts","sourceRoot":"","sources":["../../../../../src/schemas/refs/page-ref.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,QAAA,MAAM,qBAAqB,0DAQC,CAAC;AAE7B,eAAO,MAAM,oBAAoB,EAAE,OAAO,qBAA6C,CAAC;AAExF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;;AACnE,oDAAoD"}
@@ -1 +1 @@
1
- {"version":3,"file":"section-ref.schemas.d.ts","sourceRoot":"","sources":["../../../../src/schemas/refs/section-ref.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,QAAA,MAAM,wBAAwB,6DAQC,CAAC;AAEhC,eAAO,MAAM,uBAAuB,EAAE,OAAO,wBAAmD,CAAC;AAEjG,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;;AACzE,uDAAuD"}
1
+ {"version":3,"file":"section-ref.schemas.d.ts","sourceRoot":"","sources":["../../../../../src/schemas/refs/section-ref.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,QAAA,MAAM,wBAAwB,6DAQC,CAAC;AAEhC,eAAO,MAAM,uBAAuB,EAAE,OAAO,wBAAmD,CAAC;AAEjG,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;;AACzE,uDAAuD"}
@@ -1 +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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;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;;;;;;;;OAQG;IACH,GAAG,QAAQ;CACZ;AAED,eAAO,MAAM,4BAA4B,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,sBAAsB,CAClD,CAAC;AACjC,iEAAiE"}
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;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;;;;;;;;OAQG;IACH,GAAG,QAAQ;CACZ;AAED,eAAO,MAAM,4BAA4B,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,sBAAsB,CAClD,CAAC;AACjC,iEAAiE"}
@@ -1 +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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6DG;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"}
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6DG;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"}
@@ -1 +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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6DG;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, the label-pack validator, `renderPageStructuredData` and the\n * structured-data audit 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 skill-mapping and analytics labelling. It does NOT select the\n * section's structured data.\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 — the hook composes the leaf with the page+section\n * context and looks the result up in the active pack. It does\n * NOT check the key against `expectedLabelKeys`: a leaf the\n * section never declared renders its key (with a console warning)\n * and is caught by nothing until a reviewer reads the page. The\n * build and `wildo website audit` check the pack against the\n * DECLARED keys, so declare every slot the component reads.\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 * nothing narrows it by `category` — the section returns whatever\n * vocabulary it emits, and `wildo website audit` reconciles that\n * against the application's Schema.org catalog.\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"]}
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6DG;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, the label-pack validator, `renderPageStructuredData` and the\n * structured-data audit 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 skill-mapping and analytics labelling. It does NOT select the\n * section's structured data.\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 — the hook composes the leaf with the page+section\n * context and looks the result up in the active pack. It does\n * NOT check the key against `expectedLabelKeys`: a leaf the\n * section never declared renders its key (with a console warning)\n * and is caught by nothing until a reviewer reads the page. The\n * build and `wildo website audit` check the pack against the\n * DECLARED keys, so declare every slot the component reads.\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 * nothing narrows it by `category` — the section returns whatever\n * vocabulary it emits, and `wildo website audit` reconciles that\n * against the application's Schema.org catalog.\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"]}
@@ -1 +1 @@
1
- {"version":3,"file":"pricing-offer-structured-data.shared.d.ts","sourceRoot":"","sources":["../../../../src/schemas/structured-data/pricing-offer-structured-data.shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,oBAAoB,EAG1B,MAAM,sCAAsC,CAAC;AAE9C,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,0CAA0C,CAAC;AAE7F;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,WAAW,2CAA2C;IAC1D,QAAQ,CAAC,OAAO,EAAE,oBAAoB,CAAC;IACvC,6FAA6F;IAC7F,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B;;;OAGG;IACH,QAAQ,CAAC,sBAAsB,EAAE,MAAM,CAAC;IACxC,+FAA+F;IAC/F,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IAC5D;;;;OAIG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,wBAAgB,sCAAsC,CAAC,KAAK,EAAE,2CAA2C,GAAG,SAAS,4BAA4B,EAAE,CAmDlJ;AA0BD,wEAAwE"}
1
+ {"version":3,"file":"pricing-offer-structured-data.shared.d.ts","sourceRoot":"","sources":["../../../../../src/schemas/structured-data/pricing-offer-structured-data.shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,oBAAoB,EAG1B,MAAM,sCAAsC,CAAC;AAE9C,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,0CAA0C,CAAC;AAE7F;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,WAAW,2CAA2C;IAC1D,QAAQ,CAAC,OAAO,EAAE,oBAAoB,CAAC;IACvC,6FAA6F;IAC7F,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B;;;OAGG;IACH,QAAQ,CAAC,sBAAsB,EAAE,MAAM,CAAC;IACxC,+FAA+F;IAC/F,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IAC5D;;;;OAIG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,wBAAgB,sCAAsC,CAAC,KAAK,EAAE,2CAA2C,GAAG,SAAS,4BAA4B,EAAE,CAmDlJ;AA0BD,wEAAwE"}
@@ -1 +1 @@
1
- {"version":3,"file":"pricing-offer-structured-data.shared.js","sourceRoot":"","sources":["../../../../src/schemas/structured-data/pricing-offer-structured-data.shared.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,wBAAwB,EACxB,2BAA2B,EAC3B,0BAA0B,GAI3B,MAAM,sCAAsC,CAAC;AAyD9C,MAAM,UAAU,sCAAsC,CAAC,KAAkD;IACvG,MAAM,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QACrD,MAAM,KAAK,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAC;QACrC,OAAO,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IACtD,CAAC,CAAC,CAAC;IACH,IAAI,SAAS,CAAC,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,WAAW,KAAK,wBAAwB,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC;QACjH,MAAM,IAAI,KAAK,CACb,+GAA+G;cAC3G,uGAAuG,CAC5G,CAAC;IACJ,C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enceUnit,\n publicPricingAmountDecimal,\n type PublicPricingCatalog,\n type PublicPricingPlan,\n type PublicPricingPrice,\n} from '@wildo-ai/saas-models/public-runtime';\n\nimport type { WebsiteStructuredDataPayload } from './website-structured-data.shared.schemas';\n\n/**\n * @wildo_source:part:start saas.website.pricing-offer-structured-data facet:layer:core facet:family:website facet:audience:app-developer\n *\n * `buildWebsitePricingOfferStructuredData` — the `AggregateOffer` a pricing page publishes, DERIVED from\n * the application's public pricing catalogue (#1835) instead of typed by hand beside it.\n *\n * ## What it publishes, and what it refuses to\n *\n * A search engine shows an offer's `price` as the price of the offer, so an offer is published only\n * when that is TRUE:\n *\n * - the plan is on sale (`availability: AVAILABLE`) — an upcoming plan cannot be bought;\n * - its price is `LISTED` — a starting price is a floor, and an on-request plan has no price;\n * - its published price states the whole offer for its unit: a flat or per-unit amount, never an\n * indicative amount of a tiered, graduated or package price.\n *\n * Each published offer uses the plan's DEFAULT price (the one the catalogue marks) and carries a\n * `UnitPriceSpecification` saying what the number is FOR: its recurrence as `billingDuration` (ISO 8601\n * `P1M` / `P1Y`) and, for a per-unit price, a `referenceQuantity` of one of the page's unit (`member`)\n * — so \"$4 per member per month\" is never read as \"$4\".\n *\n * One `AggregateOffer` per (currency, amount basis, recurrence): a range is only meaningful over prices\n * that measure the same thing, so a flat price and a per-member price, or a monthly and a yearly one, are\n * never folded into one `lowPrice` / `highPrice`. EVERY group's `@id` is `aggregateOfferIdPrefix` suffixed with\n * what distinguishes it (`-per-unit-1-month-usd`), so an aggregate's identity depends only on what it\n * aggregates: adding, removing or reordering a plan in ANOTHER group never moves it. Returns `[]` when\n * nothing may be published — a page with only on-request plans publishes no price at all, which is the\n * true statement.\n */\nexport interface BuildWebsitePricingOfferStructuredDataInput {\n readonly catalog: PublicPricingCatalog;\n /** The `@id` of the entity the offers price — typically the page's `SoftwareApplication`. */\n readonly itemOfferedId: string;\n /**\n * The prefix of every `AggregateOffer` `@id` (`https://…/pricing#plans`); each group appends what it\n * aggregates, e.g. `#plans-flat-1-month-usd`.\n */\n readonly aggregateOfferIdPrefix: string;\n /** The URL of the page the offers are made on; each offer's URL is this plus `#plan-<key>`. */\n readonly url: string;\n /**\n * The plan's name in the page's locale. Names are text a person reads, so they come from the page's\n * label pack; a plan the callback does not name is published without one rather than with its key.\n */\n readonly planName?: (planKey: string) => string | undefined;\n /**\n * What ONE unit of a per-unit price is, in the page's locale (`member`, `seat`) — published as the\n * offer's `referenceQuantity.unitText`. Required when any published offer is per-unit: omitting it\n * would state a per-member price as a whole price, so the builder refuses instead.\n */\n readonly perUnitName?: string;\n}\n\nexport function buildWebsitePricingOfferStructuredData(input: BuildWebsitePricingOfferStructuredDataInput): readonly WebsiteStructuredDataPayload[] {\n const published = input.catalog.plans.flatMap((plan) => {\n const price = publishablePrice(plan);\n return price === undefined ? [] : [{ plan, price }];\n });\n if (published.some(({ price }) => price.amountBasis === PublicPricingAmountBasis.PER_UNIT) && !input.perUnitName) {\n throw new Error(\n '[buildWebsitePricingOfferStructuredData] a published plan is priced per unit, so the page must name the unit '\n + '(`perUnitName`, e.g. \"member\"); without it the offer would state a per-unit price as the whole price.',\n );\n }\n const groupKeyOf = (price: PublicPricingPrice): string =>\n `${price.currency}|${price.amountBasis}|${price.recurrence.unit}|${price.recurrence.count}`;\n const groupKeys = [...new Set(published.map(({ price }) => groupKeyOf(price)))];\n return groupKeys.map((groupKey) => {\n const offers = published.filter(({ price }) => groupKeyOf(price) === groupKey);\n const sample = offers[0]!.price;\n const amounts = offers.map(({ price }) => publicPricingAmountDecimal(price));\n const numeric = amounts.map(Number);\n return {\n '@type': 'AggregateOffer',\n '@id': `${input.aggregateOfferIdPrefix}-${aggregateSuffix(sample)}`,\n itemOffered: { '@id': input.itemOfferedId },\n priceCurrency: sample.currency,\n lowPrice: amounts[numeric.indexOf(Math.min(...numeric))],\n highPrice: amounts[numeric.indexOf(Math.max(...numeric))],\n offerCount: offers.length,\n url: input.url,\n offers: offers.map(({ plan, price }) => {\n const name = input.planName?.(plan.key);\n const amount = publicPricingAmountDecimal(price);\n return {\n '@type': 'Offer',\n ...(name === undefined ? {} : { name }),\n price: amount,\n priceCurrency: price.currency,\n availability: 'https://schema.org/InStock',\n url: `${input.url}#plan-${plan.key}`,\n priceSpecification: {\n '@type': 'UnitPriceSpecification',\n price: amount,\n priceCurrency: price.currency,\n ...(price.recurrence.unit === PublicPricingRecurrenceUnit.ONE_TIME ? {} : { billingDuration: isoDurationOf(price) }),\n ...(price.amountBasis === PublicPricingAmountBasis.PER_UNIT\n ? { referenceQuantity: { '@type': 'QuantitativeValue', value: 1, unitText: input.perUnitName } }\n : {}),\n },\n };\n }),\n };\n });\n}\n\n/** What distinguishes an aggregate's `@id`: its basis, its recurrence and its currency — exactly its group key. */\nfunction aggregateSuffix(price: PublicPricingPrice): string {\n return `${price.amountBasis}-${price.recurrence.count}-${price.recurrence.unit}-${price.currency}`.toLowerCase().replace(/_/gu, '-');\n}\n\n/** The plan's default price, when publishing it as the offer's price would be true. */\nfunction publishablePrice(plan: PublicPricingPlan): PublicPricingPrice | undefined {\n if (plan.availability !== ProductAvailability.AVAILABLE) return undefined;\n if (plan.priceDisclosure !== ProductPriceDisclosure.LISTED) return undefined;\n const price = plan.prices.find((candidate) => candidate.isDefault) ?? plan.prices[0];\n if (price === undefined || price.amountBasis === PublicPricingAmountBasis.VARIABLE) return undefined;\n return price;\n}\n\n/** Total over the recurring units: a member added to the vocabulary is a compile error here until it is mapped. */\nconst ISO_DURATION_DESIGNATOR: Record<Exclude<PublicPricingRecurrenceUnit, PublicPricingRecurrenceUnit.ONE_TIME>, string> = {\n [PublicPricingRecurrenceUnit.MONTH]: 'M',\n [PublicPricingRecurrenceUnit.YEAR]: 'Y',\n};\n\nfunction isoDurationOf(price: PublicPricingPrice): string {\n const unit = price.recurrence.unit as Exclude<PublicPricingRecurrenceUnit, PublicPricingRecurrenceUnit.ONE_TIME>;\n return `P${price.recurrence.count}${ISO_DURATION_DESIGNATOR[unit]}`;\n}\n/** @wildo_source:part:end saas.website.pricing-offer-structured-data */\n"]}
1
+ {"version":3,"file":"pricing-offer-structured-data.shared.js","sourceRoot":"","sources":["../../../../../src/schemas/structured-data/pricing-offer-structured-data.shared.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,wBAAwB,EACxB,2BAA2B,EAC3B,0BAA0B,GAI3B,MAAM,sCAAsC,CAAC;AAyD9C,MAAM,UAAU,sCAAsC,CAAC,KAAkD;IACvG,MAAM,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QACrD,MAAM,KAAK,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAC;QACrC,OAAO,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IACtD,CAAC,CAAC,CAAC;IACH,IAAI,SAAS,CAAC,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,WAAW,KAAK,wBAAwB,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC;QACjH,MAAM,IAAI,KAAK,CACb,+GAA+G;cAC3G,uGAAuG,CAC5G,CAAC;IACJ,CAAC;IACD,MAAM,UAAU,GAAG,CAAC,KAAyB,EAAU,EAAE,CACvD,GAAG,KAAK,CAAC,QAAQ,IAAI,KAAK,CAAC,WAAW,IAAI,KAAK,CAAC,UAAU,CAAC,IAAI,IAAI,KAAK,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;IAC9F,MAAM,SAAS,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAChF,OAAO,SAAS,CAAC,GAA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AO,SAAS,CAAC;IAC1E,IAAI,IAAI,CAAC,eAAe,KAAK,sBAAsB,CAAC,MAAM;QAAE,OAAO,SAAS,CAAC;IAC7E,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IACrF,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,CAAC,WAAW,KAAK,wBAAwB,CAAC,QAAQ;QAAE,OAAO,SAAS,CAAC;IACrG,OAAO,KAAK,CAAC;AACf,CAAC;AAED,mHAAmH;AACnH,MAAM,uBAAuB,GAA+F;IAC1H,CAAC,2BAA2B,CAAC,KAAK,CAAC,EAAE,GAAG;IACxC,CAAC,2BAA2B,CAAC,IAAI,CAAC,EAAE,GAAG;CACxC,CAAC;AAEF,SAAS,aAAa,CAAC,KAAyB;IAC9C,MAAM,IAAI,GAAG,KAAK,CAAC,UAAU,CAAC,IAAkF,CAAC;IACjH,OAAO,IAAI,KAAK,CAAC,UAAU,CAAC,KAAK,GAAG,uBAAuB,CAAC,IAAI,CAAC,EAAE,CAAC;AACtE,CAAC;AACD,wEAAwE","sourcesContent":["import {\n ProductAvailability,\n ProductPriceDisclosure,\n PublicPricingAmountBasis,\n PublicPricingRecurrenceUnit,\n publicPricingAmountDecimal,\n type PublicPricingCatalog,\n type PublicPricingPlan,\n type PublicPricingPrice,\n} from '@wildo-ai/saas-models/public-runtime';\n\nimport type { WebsiteStructuredDataPayload } from './website-structured-data.shared.schemas';\n\n/**\n * @wildo_source:part:start saas.website.pricing-offer-structured-data facet:layer:core facet:family:website facet:audience:app-developer\n *\n * `buildWebsitePricingOfferStructuredData` — the `AggregateOffer` a pricing page publishes, DERIVED from\n * the application's public pricing catalogue (#1835) instead of typed by hand beside it.\n *\n * ## What it publishes, and what it refuses to\n *\n * A search engine shows an offer's `price` as the price of the offer, so an offer is published only\n * when that is TRUE:\n *\n * - the plan is on sale (`availability: AVAILABLE`) — an upcoming plan cannot be bought;\n * - its price is `LISTED` — a starting price is a floor, and an on-request plan has no price;\n * - its published price states the whole offer for its unit: a flat or per-unit amount, never an\n * indicative amount of a tiered, graduated or package price.\n *\n * Each published offer uses the plan's DEFAULT price (the one the catalogue marks) and carries a\n * `UnitPriceSpecification` saying what the number is FOR: its recurrence as `billingDuration` (ISO 8601\n * `P1M` / `P1Y`) and, for a per-unit price, a `referenceQuantity` of one of the page's unit (`member`)\n * — so \"$4 per member per month\" is never read as \"$4\".\n *\n * One `AggregateOffer` per (currency, amount basis, recurrence): a range is only meaningful over prices\n * that measure the same thing, so a flat price and a per-member price, or a monthly and a yearly one, are\n * never folded into one `lowPrice` / `highPrice`. EVERY group's `@id` is `aggregateOfferIdPrefix` suffixed with\n * what distinguishes it (`-per-unit-1-month-usd`), so an aggregate's identity depends only on what it\n * aggregates: adding, removing or reordering a plan in ANOTHER group never moves it. Returns `[]` when\n * nothing may be published — a page with only on-request plans publishes no price at all, which is the\n * true statement.\n */\nexport interface BuildWebsitePricingOfferStructuredDataInput {\n readonly catalog: PublicPricingCatalog;\n /** The `@id` of the entity the offers price — typically the page's `SoftwareApplication`. */\n readonly itemOfferedId: string;\n /**\n * The prefix of every `AggregateOffer` `@id` (`https://…/pricing#plans`); each group appends what it\n * aggregates, e.g. `#plans-flat-1-month-usd`.\n */\n readonly aggregateOfferIdPrefix: string;\n /** The URL of the page the offers are made on; each offer's URL is this plus `#plan-<key>`. */\n readonly url: string;\n /**\n * The plan's name in the page's locale. Names are text a person reads, so they come from the page's\n * label pack; a plan the callback does not name is published without one rather than with its key.\n */\n readonly planName?: (planKey: string) => string | undefined;\n /**\n * What ONE unit of a per-unit price is, in the page's locale (`member`, `seat`) — published as the\n * offer's `referenceQuantity.unitText`. Required when any published offer is per-unit: omitting it\n * would state a per-member price as a whole price, so the builder refuses instead.\n */\n readonly perUnitName?: string;\n}\n\nexport function buildWebsitePricingOfferStructuredData(input: BuildWebsitePricingOfferStructuredDataInput): readonly WebsiteStructuredDataPayload[] {\n const published = input.catalog.plans.flatMap((plan) => {\n const price = publishablePrice(plan);\n return price === undefined ? [] : [{ plan, price }];\n });\n if (published.some(({ price }) => price.amountBasis === PublicPricingAmountBasis.PER_UNIT) && !input.perUnitName) {\n throw new Error(\n '[buildWebsitePricingOfferStructuredData] a published plan is priced per unit, so the page must name the unit '\n + '(`perUnitName`, e.g. \"member\"); without it the offer would state a per-unit price as the whole price.',\n );\n }\n const groupKeyOf = (price: PublicPricingPrice): string =>\n `${price.currency}|${price.amountBasis}|${price.recurrence.unit}|${price.recurrence.count}`;\n const groupKeys = [...new Set(published.map(({ price }) => groupKeyOf(price)))];\n return groupKeys.map((groupKey) => {\n const offers = published.filter(({ price }) => groupKeyOf(price) === groupKey);\n const sample = offers[0]!.price;\n const amounts = offers.map(({ price }) => publicPricingAmountDecimal(price));\n const numeric = amounts.map(Number);\n return {\n '@type': 'AggregateOffer',\n '@id': `${input.aggregateOfferIdPrefix}-${aggregateSuffix(sample)}`,\n itemOffered: { '@id': input.itemOfferedId },\n priceCurrency: sample.currency,\n lowPrice: amounts[numeric.indexOf(Math.min(...numeric))],\n highPrice: amounts[numeric.indexOf(Math.max(...numeric))],\n offerCount: offers.length,\n url: input.url,\n offers: offers.map(({ plan, price }) => {\n const name = input.planName?.(plan.key);\n const amount = publicPricingAmountDecimal(price);\n return {\n '@type': 'Offer',\n ...(name === undefined ? {} : { name }),\n price: amount,\n priceCurrency: price.currency,\n availability: 'https://schema.org/InStock',\n url: `${input.url}#plan-${plan.key}`,\n priceSpecification: {\n '@type': 'UnitPriceSpecification',\n price: amount,\n priceCurrency: price.currency,\n ...(price.recurrence.unit === PublicPricingRecurrenceUnit.ONE_TIME ? {} : { billingDuration: isoDurationOf(price) }),\n ...(price.amountBasis === PublicPricingAmountBasis.PER_UNIT\n ? { referenceQuantity: { '@type': 'QuantitativeValue', value: 1, unitText: input.perUnitName } }\n : {}),\n },\n };\n }),\n };\n });\n}\n\n/** What distinguishes an aggregate's `@id`: its basis, its recurrence and its currency — exactly its group key. */\nfunction aggregateSuffix(price: PublicPricingPrice): string {\n return `${price.amountBasis}-${price.recurrence.count}-${price.recurrence.unit}-${price.currency}`.toLowerCase().replace(/_/gu, '-');\n}\n\n/** The plan's default price, when publishing it as the offer's price would be true. */\nfunction publishablePrice(plan: PublicPricingPlan): PublicPricingPrice | undefined {\n if (plan.availability !== ProductAvailability.AVAILABLE) return undefined;\n if (plan.priceDisclosure !== ProductPriceDisclosure.LISTED) return undefined;\n const price = plan.prices.find((candidate) => candidate.isDefault) ?? plan.prices[0];\n if (price === undefined || price.amountBasis === PublicPricingAmountBasis.VARIABLE) return undefined;\n return price;\n}\n\n/** Total over the recurring units: a member added to the vocabulary is a compile error here until it is mapped. */\nconst ISO_DURATION_DESIGNATOR: Record<Exclude<PublicPricingRecurrenceUnit, PublicPricingRecurrenceUnit.ONE_TIME>, string> = {\n [PublicPricingRecurrenceUnit.MONTH]: 'M',\n [PublicPricingRecurrenceUnit.YEAR]: 'Y',\n};\n\nfunction isoDurationOf(price: PublicPricingPrice): string {\n const unit = price.recurrence.unit as Exclude<PublicPricingRecurrenceUnit, PublicPricingRecurrenceUnit.ONE_TIME>;\n return `P${price.recurrence.count}${ISO_DURATION_DESIGNATOR[unit]}`;\n}\n/** @wildo_source:part:end saas.website.pricing-offer-structured-data */\n"]}
@@ -1 +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,CA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,CAAC,EAAE,MAAM,CAAC;IAClB,iFAAiF;IACjF,qBAAqB,EAAE,SAAS,MAAM,EAAE,CAAC;IACzC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,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,gGAAgG;IAChG,eAAe,EAAE,yCAAyC,EAAE,CAAC;IAC7D,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,CA6MpC"}
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,WA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AAM,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,gGAAgG;IAChG,eAAe,EAAE,yCAAyC,EAAE,CAAC;IAC7D,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,CA6MpC"}
@@ -1 +1 @@
1
- {"version":3,"file":"structured-data-reconciliation.shared.js","sourceRoot":"","sources":["../../../../src/schemas/structured-data/structured-data-reconciliation.shared.ts"],"names":[],"mappings":"AA2JA,MAAM,UAAU,qCAAqC,CACnD,OAAuC;IAEvC,MAAM,QAAQ,GAA0C,EAAE,CAAC;IAC3D,MAAM,eAAe,GAAgD,EAAE,CAAC;IACxE,MAAM,KAAK,GAA6C,EAAE,CAAC;IAC3D,MAAM,aAAa,GAAG,IAAI,GAAG,CAC3B,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,OAAO,CAAU,CAAC,CAC1E,CAAC;IACF,MAAM,qBAAqB,GAAG,IAAI,GAAG,EAA2C,CAAC;IACjF,KAAK,MAAM,WAAW,IAAI,OAAO,CAAC,YAAY,IAAI,EAAE,EAAE,CAAC;QACrD,MAAM,YAAY,GAAG,qBAAqB,CAAC,GAAG,CAAC,WAAW,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;QAC1E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AK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC","sourcesContent":["export interface StructuredDataDeprecatedField {\n field: string;\n replacedBy: string | null;\n deprecatedSince: string;\n}\n\nexport interface StructuredDataCatalogEntry {\n '@type': string;\n requiredFields: readonly string[];\n optionalFields?: readonly string[];\n deprecatedFields?: readonly StructuredDataDeprecatedField[];\n recommendOptionals?: boolean;\n}\n\nexport interface StructuredDataPayload {\n '@type': string;\n '@id'?: string;\n [key: string]: unknown;\n}\n\nexport interface StructuredDataSectionDefinitionLike {\n sectionRef: string;\n getStructuredData?: () => unknown;\n}\n\nexport interface StructuredDataPageManifestLike {\n ref: string;\n routePath: string;\n sectionRefs: readonly string[];\n}\n\nexport interface StructuredDataPagePayloadLike {\n pageRef: string;\n routePath?: string;\n sourceRef?: string;\n payloads: unknown;\n}\n\nexport type StructuredDataSpecViolationCode =\n | 'invalid-payload-shape'\n | 'missing-entity-type'\n | 'missing-required-field'\n | 'missing-section-definition'\n | 'orphan-page-payload';\n\nexport interface StructuredDataCatalogOverrideFinding {\n kind: 'catalog-override';\n entityType: string;\n count: number;\n message: string;\n}\n\nexport interface StructuredDataCatalogMissFinding {\n kind: 'catalog-miss';\n pageRef: string;\n routePath: string;\n sectionRef: string;\n entityType: string;\n entityId?: string;\n message: string;\n}\n\nexport interface StructuredDataSpecViolationFinding {\n kind: 'spec-violation';\n code: StructuredDataSpecViolationCode;\n pageRef: string;\n routePath: string;\n sectionRef: string;\n entityType?: string;\n entityId?: string;\n field?: string;\n message: string;\n}\n\nexport interface StructuredDataDeprecatedFieldFinding {\n kind: 'deprecated-field';\n pageRef: string;\n routePath: string;\n sectionRef: string;\n entityType: string;\n entityId?: string;\n field: string;\n replacedBy: string | null;\n deprecatedSince: string;\n message: string;\n}\n\nexport interface StructuredDataCrossEntityReferenceDriftFinding {\n kind: 'cross-entity-reference-drift';\n pageRef: string;\n routePath: string;\n sectionRef: string;\n entityType: string;\n entityId?: string;\n missingReferenceId: string;\n message: string;\n}\n\nexport type StructuredDataReconciliationFinding =\n | StructuredDataCatalogOverrideFinding\n | StructuredDataCatalogMissFinding\n | StructuredDataSpecViolationFinding\n | StructuredDataDeprecatedFieldFinding\n | StructuredDataCrossEntityReferenceDriftFinding;\n\n/**\n * An OPTIONAL field a payload leaves out, reported because its catalog entry opted in with\n * `recommendOptionals: true` — the entry's statement that for this type the optional fields are\n * where the richer search and answer-engine results come from.\n *\n * Deliberately NOT a finding. A finding says the payload is wrong (a missing required field, an\n * unknown type, a deprecated field) and `--strict` escalates every finding to a failure. A payload\n * without its optional fields is valid; reporting it through the same channel would fail strict CI for\n * following the vocabulary. So recommendations travel beside the findings, are shown as information,\n * and never change an audit's outcome.\n */\nexport interface StructuredDataOptionalFieldRecommendation {\n pageRef: string;\n routePath: string;\n sectionRef: string;\n entityType: string;\n entityId?: string;\n /** The entry's optional fields this payload does not carry, in catalog order. */\n missingOptionalFields: readonly string[];\n message: string;\n}\n\nexport interface StructuredDataReconciliationPageResult {\n pageRef: string;\n routePath: string;\n payloadCount: number;\n findingCount: number;\n}\n\nexport interface StructuredDataReconciliationResult {\n findings: StructuredDataReconciliationFinding[];\n /** Optional-field recommendations from entries that opted in — information, never a finding. */\n recommendations: StructuredDataOptionalFieldRecommendation[];\n pages: StructuredDataReconciliationPageResult[];\n}\n\nexport interface ReconcileStructuredDataOptions {\n catalog: readonly StructuredDataCatalogEntry[];\n pages: readonly StructuredDataPageManifestLike[];\n sections: readonly StructuredDataSectionDefinitionLike[];\n pagePayloads?: readonly StructuredDataPagePayloadLike[];\n}\n\ninterface ReconciliationPayloadContext {\n pageRef: string;\n routePath: string;\n sectionRef: string;\n payload: StructuredDataPayload;\n}\n\nexport function reconcileStructuredDataAgainstCatalog(\n options: ReconcileStructuredDataOptions,\n): StructuredDataReconciliationResult {\n const findings: StructuredDataReconciliationFinding[] = [];\n const recommendations: StructuredDataOptionalFieldRecommendation[] = [];\n const pages: StructuredDataReconciliationPageResult[] = [];\n const sectionsByRef = new Map(\n options.sections.map((section) => [section.sectionRef, section] as const),\n );\n const pagePayloadsByPageRef = new Map<string, StructuredDataPagePayloadLike[]>();\n for (const pagePayload of options.pagePayloads ?? []) {\n const pagePayloads = pagePayloadsByPageRef.get(pagePayload.pageRef) ?? [];\n pagePayloads.push(pagePayload);\n pagePayloadsByPageRef.set(pagePayload.pageRef, pagePayloads);\n }\n const catalogByType = new Map<string, StructuredDataCatalogEntry>();\n const catalogCounts = new Map<string, number>();\n\n for (const entry of options.catalog) {\n catalogByType.set(entry['@type'], entry);\n catalogCounts.set(entry['@type'], (catalogCounts.get(entry['@type']) ?? 0) + 1);\n }\n\n for (const [entityType, count] of catalogCounts.entries()) {\n if (count > 1) {\n findings.push({\n kind: 'catalog-override',\n entityType,\n count,\n message:\n `Merged catalog contains ${count} entries for @type=\"${entityType}\". ` +\n 'Replacement semantics are last-wins; duplicate array entries indicate an unresolved override.',\n });\n }\n }\n\n for (const page of options.pages) {\n const pageFindingStart = findings.length;\n const sectionPayloadContexts: ReconciliationPayloadContext[] = [];\n const isTemplatedRoute = page.routePath.includes('[');\n\n for (const sectionRef of page.sectionRefs) {\n const section = sectionsByRef.get(sectionRef);\n if (!section) {\n findings.push({\n kind: 'spec-violation',\n code: 'missing-section-definition',\n pageRef: page.ref,\n routePath: page.routePath,\n sectionRef,\n message:\n `Page \"${page.ref}\" references sectionRef \"${sectionRef}\" but no matching section ` +\n 'definition was supplied to the structured-data reconciliation harness.',\n });\n continue;\n }\n\n if (!section.getStructuredData) {\n continue;\n }\n\n const rawStructuredData = section.getStructuredData();\n const normalizedPayloads = normalizeStructuredDataReturn(rawStructuredData);\n\n if (normalizedPayloads === null) {\n findings.push({\n kind: 'spec-violation',\n code: 'invalid-payload-shape',\n pageRef: page.ref,\n routePath: page.routePath,\n sectionRef,\n message:\n `Section \"${sectionRef}\" on page \"${page.ref}\" returned an invalid ` +\n '`getStructuredData()` shape. Expected object, array, null, or undefined.',\n });\n continue;\n }\n\n for (const candidate of normalizedPayloads) {\n if (!isPlainObject(candidate)) {\n findings.push({\n kind: 'spec-violation',\n code: 'invalid-payload-shape',\n pageRef: page.ref,\n routePath: page.routePath,\n sectionRef,\n message:\n `Section \"${sectionRef}\" on page \"${page.ref}\" returned a non-object structured-data payload.`,\n });\n continue;\n }\n\n if (typeof candidate['@type'] !== 'string' || candidate['@type'].trim().length === 0) {\n findings.push({\n kind: 'spec-violation',\n code: 'missing-entity-type',\n pageRef: page.ref,\n routePath: page.routePath,\n sectionRef,\n entityId: typeof candidate['@id'] === 'string' ? candidate['@id'] : undefined,\n message:\n `Section \"${sectionRef}\" on page \"${page.ref}\" returned a structured-data payload ` +\n 'without a non-empty string `@type`.',\n });\n continue;\n }\n\n sectionPayloadContexts.push({\n pageRef: page.ref,\n routePath: page.routePath,\n sectionRef,\n payload: candidate as StructuredDataPayload,\n });\n }\n }\n\n const contextsByRoutePath = new Map<string, ReconciliationPayloadContext[]>();\n const collectionFindingCountByRoutePath = new Map<string, number>();\n const pagePayloadsForPage = pagePayloadsByPageRef.get(page.ref) ?? [];\n pagePayloadsByPageRef.delete(page.ref);\n const shouldEmitManifestResult =\n (sectionPayloadContexts.length > 0 && (!isTemplatedRoute || pagePayloadsForPage.length === 0))\n || findings.length > pageFindingStart\n || pagePayloadsForPage.length === 0;\n if (shouldEmitManifestResult) {\n const manifestPayloadContexts =\n isTemplatedRoute && pagePayloadsForPage.length > 0\n ? []\n : [...sectionPayloadContexts];\n contextsByRoutePath.set(page.routePath, manifestPayloadContexts);\n collectionFindingCountByRoutePath.set(page.routePath, findings.length - pageFindingStart);\n }\n\n for (const pagePayload of pagePayloadsForPage) {\n const routePath = pagePayload.routePath ?? page.routePath;\n const payloadContexts = contextsByRoutePath.get(routePath) ?? [];\n if (\n payloadContexts.length === 0\n && isTemplatedRoute\n && sectionPayloadContexts.length > 0\n ) {\n payloadContexts.push(\n ...sectionPayloadContexts.map((context) => ({\n ...context,\n routePath,\n })),\n );\n }\n contextsByRoutePath.set(routePath, payloadContexts);\n const collectionFindingStart = findings.length;\n collectNormalizedPayloadContexts({\n rawStructuredData: pagePayload.payloads,\n pageRef: page.ref,\n routePath,\n sectionRef: pagePayload.sourceRef ?? `page:${page.ref}`,\n findings,\n into: payloadContexts,\n });\n collectionFindingCountByRoutePath.set(\n routePath,\n (collectionFindingCountByRoutePath.get(routePath) ?? 0)\n + findings.length - collectionFindingStart,\n );\n }\n\n for (const [routePath, payloadContexts] of contextsByRoutePath.entries()) {\n const declaredEntityIds = new Set<string>();\n for (const payloadContext of payloadContexts) {\n collectDeclaredEntityIds(payloadContext.payload, declaredEntityIds);\n }\n\n const routeFindingStart = findings.length;\n for (const payloadContext of payloadContexts) {\n validatePayloadAgainstCatalog(payloadContext, catalogByType, declaredEntityIds, findings, recommendations);\n }\n\n pages.push({\n pageRef: page.ref,\n routePath,\n payloadCount: payloadContexts.length,\n findingCount:\n (collectionFindingCountByRoutePath.get(routePath) ?? 0)\n + findings.length - routeFindingStart,\n });\n }\n }\n\n for (const [pageRef, pagePayloads] of pagePayloadsByPageRef.entries()) {\n for (const pagePayload of pagePayloads) {\n findings.push({\n kind: 'spec-violation',\n code: 'orphan-page-payload',\n pageRef,\n routePath: pagePayload.routePath ?? '',\n sectionRef: pagePayload.sourceRef ?? `page:${pageRef}`,\n message:\n `Structured-data page payload \"${pagePayload.sourceRef ?? `page:${pageRef}`}\" ` +\n `references pageRef \"${pageRef}\" but no matching page manifest was supplied.`,\n });\n }\n }\n\n return {\n findings,\n recommendations,\n pages,\n };\n}\n\nfunction collectNormalizedPayloadContexts(input: {\n rawStructuredData: unknown;\n pageRef: string;\n routePath: string;\n sectionRef: string;\n findings: StructuredDataReconciliationFinding[];\n into: ReconciliationPayloadContext[];\n}): void {\n const {\n rawStructuredData,\n pageRef,\n routePath,\n sectionRef,\n findings,\n into,\n } = input;\n const normalizedPayloads = normalizeStructuredDataReturn(rawStructuredData);\n\n if (normalizedPayloads === null) {\n findings.push({\n kind: 'spec-violation',\n code: 'invalid-payload-shape',\n pageRef,\n routePath,\n sectionRef,\n message:\n `Structured-data source \"${sectionRef}\" on page \"${pageRef}\" returned an invalid ` +\n 'structured-data shape. Expected object, array, null, or undefined.',\n });\n return;\n }\n\n for (const candidate of normalizedPayloads) {\n if (!isPlainObject(candidate)) {\n findings.push({\n kind: 'spec-violation',\n code: 'invalid-payload-shape',\n pageRef,\n routePath,\n sectionRef,\n message:\n `Structured-data source \"${sectionRef}\" on page \"${pageRef}\" returned a non-object structured-data payload.`,\n });\n continue;\n }\n\n if (typeof candidate['@type'] !== 'string' || candidate['@type'].trim().length === 0) {\n findings.push({\n kind: 'spec-violation',\n code: 'missing-entity-type',\n pageRef,\n routePath,\n sectionRef,\n entityId: typeof candidate['@id'] === 'string' ? candidate['@id'] : undefined,\n message:\n `Structured-data source \"${sectionRef}\" on page \"${pageRef}\" returned a structured-data payload ` +\n 'without a non-empty string `@type`.',\n });\n continue;\n }\n\n into.push({\n pageRef,\n routePath,\n sectionRef,\n payload: candidate as StructuredDataPayload,\n });\n }\n}\n\nfunction validatePayloadAgainstCatalog(\n payloadContext: ReconciliationPayloadContext,\n catalogByType: ReadonlyMap<string, StructuredDataCatalogEntry>,\n declaredEntityIds: ReadonlySet<string>,\n findings: StructuredDataReconciliationFinding[],\n recommendations: StructuredDataOptionalFieldRecommendation[],\n): void {\n const { payload, pageRef, routePath, sectionRef } = payloadContext;\n const entityType = payload['@type'];\n const entityId = typeof payload['@id'] === 'string' ? payload['@id'] : undefined;\n const catalogEntry = catalogByType.get(entityType);\n\n if (!catalogEntry) {\n findings.push({\n kind: 'catalog-miss',\n pageRef,\n routePath,\n sectionRef,\n entityType,\n entityId,\n message:\n `Structured-data payload @type=\"${entityType}\" emitted by section \"${sectionRef}\" ` +\n `on page \"${pageRef}\" does not exist in the merged catalog.`,\n });\n return;\n }\n\n for (const requiredField of catalogEntry.requiredFields) {\n if (!hasPresentFieldValue(payload, requiredField)) {\n findings.push({\n kind: 'spec-violation',\n code: 'missing-required-field',\n pageRef,\n routePath,\n sectionRef,\n entityType,\n entityId,\n field: requiredField,\n message:\n `Structured-data payload @type=\"${entityType}\" emitted by section \"${sectionRef}\" ` +\n `on page \"${pageRef}\" is missing required field \"${requiredField}\".`,\n });\n }\n }\n\n if (catalogEntry.recommendOptionals === true) {\n const missingOptionalFields = (catalogEntry.optionalFields ?? []).filter((field) => !hasPresentFieldValue(payload, field));\n if (missingOptionalFields.length > 0) {\n recommendations.push({\n pageRef,\n routePath,\n sectionRef,\n entityType,\n entityId,\n missingOptionalFields,\n message:\n `Structured-data payload @type=\"${entityType}\" emitted by section \"${sectionRef}\" on page \"${pageRef}\" ` +\n `could carry ${missingOptionalFields.map((field) => `\"${field}\"`).join(', ')} — optional, and the catalog ` +\n 'recommends them for richer search and answer-engine results.',\n });\n }\n }\n\n for (const deprecatedField of catalogEntry.deprecatedFields ?? []) {\n if (!hasPresentFieldValue(payload, deprecatedField.field)) {\n continue;\n }\n\n findings.push({\n kind: 'deprecated-field',\n pageRef,\n routePath,\n sectionRef,\n entityType,\n entityId,\n field: deprecatedField.field,\n replacedBy: deprecatedField.replacedBy,\n deprecatedSince: deprecatedField.deprecatedSince,\n message:\n deprecatedField.replacedBy === null\n ? `Structured-data payload @type=\"${entityType}\" emitted by section \"${sectionRef}\" ` +\n `on page \"${pageRef}\" uses deprecated field \"${deprecatedField.field}\" ` +\n `(deprecated since ${deprecatedField.deprecatedSince}).`\n : `Structured-data payload @type=\"${entityType}\" emitted by section \"${sectionRef}\" ` +\n `on page \"${pageRef}\" uses deprecated field \"${deprecatedField.field}\". ` +\n `Use \"${deprecatedField.replacedBy}\" instead ` +\n `(deprecated since ${deprecatedField.deprecatedSince}).`,\n });\n }\n\n const referencedIds = new Set<string>();\n collectReferencedEntityIds(payload, referencedIds, true);\n for (const referencedId of referencedIds) {\n if (declaredEntityIds.has(referencedId)) {\n continue;\n }\n\n findings.push({\n kind: 'cross-entity-reference-drift',\n pageRef,\n routePath,\n sectionRef,\n entityType,\n entityId,\n missingReferenceId: referencedId,\n message:\n `Structured-data payload @type=\"${entityType}\" emitted by section \"${sectionRef}\" ` +\n `on page \"${pageRef}\" references @id \"${referencedId}\" but no emitted entity on the page defines it.`,\n });\n }\n}\n\nfunction normalizeStructuredDataReturn(value: unknown): unknown[] | null {\n if (value === null || value === undefined) {\n return [];\n }\n\n if (Array.isArray(value)) {\n return value.filter((item) => item !== null && item !== undefined);\n }\n\n if (isPlainObject(value)) {\n return [value];\n }\n\n return null;\n}\n\nfunction hasPresentFieldValue(payload: StructuredDataPayload, fieldName: string): boolean {\n if (!Object.prototype.hasOwnProperty.call(payload, fieldName)) {\n return false;\n }\n\n const value = payload[fieldName];\n return value !== null && value !== undefined;\n}\n\nfunction collectDeclaredEntityIds(value: unknown, into: Set<string>): void {\n if (Array.isArray(value)) {\n for (const item of value) {\n collectDeclaredEntityIds(item, into);\n }\n return;\n }\n\n if (!isPlainObject(value)) {\n return;\n }\n\n const entityId = typeof value['@id'] === 'string' ? value['@id'] : null;\n const entityType = typeof value['@type'] === 'string' ? value['@type'] : null;\n if (entityId && entityType) {\n into.add(entityId);\n }\n\n for (const child of Object.values(value)) {\n collectDeclaredEntityIds(child, into);\n }\n}\n\nfunction collectReferencedEntityIds(\n value: unknown,\n into: Set<string>,\n isRootPayload: boolean,\n): void {\n if (Array.isArray(value)) {\n for (const item of value) {\n collectReferencedEntityIds(item, into, false);\n }\n return;\n }\n\n if (!isPlainObject(value)) {\n return;\n }\n\n const entityId = typeof value['@id'] === 'string' ? value['@id'] : null;\n const entityType = typeof value['@type'] === 'string' ? value['@type'] : null;\n if (!isRootPayload && entityId && !entityType) {\n into.add(entityId);\n }\n\n for (const child of Object.values(value)) {\n collectReferencedEntityIds(child, into, false);\n }\n}\n\nfunction isPlainObject(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n"]}
1
+ {"version":3,"file":"structured-data-reconciliation.shared.js","sourceRoot":"","sources":["../../../../../src/schemas/structured-data/structured-data-reconciliation.shared.ts"],"names":[],"mappings":"AA2JA,MAAM,UAAU,qCAAqC,CACnD,OAAuC;IAEvC,MAAM,QAAQ,GAA0C,EAAE,CAAC;IAC3D,MAAM,eAAe,GAAgD,EAAE,CAAC;IACxE,MAAM,KAAK,GAA6C,EAAE,CAAC;IAC3D,MAAM,aAAa,GAAG,IAAI,GAAG,CAC3B,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,OAAO,CAAU,CAAC,CAC1E,CAAC;IACF,MAAM,qBAAqB,GAAG,IAAI,GAAG,EAA2C,CAAC;IACjF,KAAK,MAAM,WAAW,IAAI,OAAO,CAAC,YAAY,IAAI,EAAE,EAAE,CAAC;QACrD,MAAM,YAAY,GAAG,qBAAqB,CAAC,GAAG,CAAC,WAAW,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;QAC1E,YAAY,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAC/B,qBAAqB,CAAC,GAAG,CAAC,WAAW,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;IAC/D,CAAC;IACD,MAAM,aAAa,GAAG,IAAI,GAAG,EAAsC,CAAC;IACpE,MAAM,aAAa,GAAG,IAAI,GAAG,EAAkB,CAAC;IAEhD,KAAK,MAAM,KAAK,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;QACpC,aAAa,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,KAAK,CAAC,CAAC;QACzC,aAAa,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC,aAAa,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IAClF,CAAC;IAED,KAAK,MAAM,CAAC,UAAU,EAAE,KAAK,CA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AC1B,OAAO;IACT,CAAC;IAED,MAAM,QAAQ,GAAG,OAAO,KAAK,CAAC,KAAK,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IACxE,MAAM,UAAU,GAAG,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAC9E,IAAI,CAAC,aAAa,IAAI,QAAQ,IAAI,CAAC,UAAU,EAAE,CAAC;QAC9C,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IACrB,CAAC;IAED,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;QACzC,0BAA0B,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;IACjD,CAAC;AACH,CAAC;AAED,SAAS,aAAa,CAAC,KAAc;IACnC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC","sourcesContent":["export interface StructuredDataDeprecatedField {\n field: string;\n replacedBy: string | null;\n deprecatedSince: string;\n}\n\nexport interface StructuredDataCatalogEntry {\n '@type': string;\n requiredFields: readonly string[];\n optionalFields?: readonly string[];\n deprecatedFields?: readonly StructuredDataDeprecatedField[];\n recommendOptionals?: boolean;\n}\n\nexport interface StructuredDataPayload {\n '@type': string;\n '@id'?: string;\n [key: string]: unknown;\n}\n\nexport interface StructuredDataSectionDefinitionLike {\n sectionRef: string;\n getStructuredData?: () => unknown;\n}\n\nexport interface StructuredDataPageManifestLike {\n ref: string;\n routePath: string;\n sectionRefs: readonly string[];\n}\n\nexport interface StructuredDataPagePayloadLike {\n pageRef: string;\n routePath?: string;\n sourceRef?: string;\n payloads: unknown;\n}\n\nexport type StructuredDataSpecViolationCode =\n | 'invalid-payload-shape'\n | 'missing-entity-type'\n | 'missing-required-field'\n | 'missing-section-definition'\n | 'orphan-page-payload';\n\nexport interface StructuredDataCatalogOverrideFinding {\n kind: 'catalog-override';\n entityType: string;\n count: number;\n message: string;\n}\n\nexport interface StructuredDataCatalogMissFinding {\n kind: 'catalog-miss';\n pageRef: string;\n routePath: string;\n sectionRef: string;\n entityType: string;\n entityId?: string;\n message: string;\n}\n\nexport interface StructuredDataSpecViolationFinding {\n kind: 'spec-violation';\n code: StructuredDataSpecViolationCode;\n pageRef: string;\n routePath: string;\n sectionRef: string;\n entityType?: string;\n entityId?: string;\n field?: string;\n message: string;\n}\n\nexport interface StructuredDataDeprecatedFieldFinding {\n kind: 'deprecated-field';\n pageRef: string;\n routePath: string;\n sectionRef: string;\n entityType: string;\n entityId?: string;\n field: string;\n replacedBy: string | null;\n deprecatedSince: string;\n message: string;\n}\n\nexport interface StructuredDataCrossEntityReferenceDriftFinding {\n kind: 'cross-entity-reference-drift';\n pageRef: string;\n routePath: string;\n sectionRef: string;\n entityType: string;\n entityId?: string;\n missingReferenceId: string;\n message: string;\n}\n\nexport type StructuredDataReconciliationFinding =\n | StructuredDataCatalogOverrideFinding\n | StructuredDataCatalogMissFinding\n | StructuredDataSpecViolationFinding\n | StructuredDataDeprecatedFieldFinding\n | StructuredDataCrossEntityReferenceDriftFinding;\n\n/**\n * An OPTIONAL field a payload leaves out, reported because its catalog entry opted in with\n * `recommendOptionals: true` — the entry's statement that for this type the optional fields are\n * where the richer search and answer-engine results come from.\n *\n * Deliberately NOT a finding. A finding says the payload is wrong (a missing required field, an\n * unknown type, a deprecated field) and `--strict` escalates every finding to a failure. A payload\n * without its optional fields is valid; reporting it through the same channel would fail strict CI for\n * following the vocabulary. So recommendations travel beside the findings, are shown as information,\n * and never change an audit's outcome.\n */\nexport interface StructuredDataOptionalFieldRecommendation {\n pageRef: string;\n routePath: string;\n sectionRef: string;\n entityType: string;\n entityId?: string;\n /** The entry's optional fields this payload does not carry, in catalog order. */\n missingOptionalFields: readonly string[];\n message: string;\n}\n\nexport interface StructuredDataReconciliationPageResult {\n pageRef: string;\n routePath: string;\n payloadCount: number;\n findingCount: number;\n}\n\nexport interface StructuredDataReconciliationResult {\n findings: StructuredDataReconciliationFinding[];\n /** Optional-field recommendations from entries that opted in — information, never a finding. */\n recommendations: StructuredDataOptionalFieldRecommendation[];\n pages: StructuredDataReconciliationPageResult[];\n}\n\nexport interface ReconcileStructuredDataOptions {\n catalog: readonly StructuredDataCatalogEntry[];\n pages: readonly StructuredDataPageManifestLike[];\n sections: readonly StructuredDataSectionDefinitionLike[];\n pagePayloads?: readonly StructuredDataPagePayloadLike[];\n}\n\ninterface ReconciliationPayloadContext {\n pageRef: string;\n routePath: string;\n sectionRef: string;\n payload: StructuredDataPayload;\n}\n\nexport function reconcileStructuredDataAgainstCatalog(\n options: ReconcileStructuredDataOptions,\n): StructuredDataReconciliationResult {\n const findings: StructuredDataReconciliationFinding[] = [];\n const recommendations: StructuredDataOptionalFieldRecommendation[] = [];\n const pages: StructuredDataReconciliationPageResult[] = [];\n const sectionsByRef = new Map(\n options.sections.map((section) => [section.sectionRef, section] as const),\n );\n const pagePayloadsByPageRef = new Map<string, StructuredDataPagePayloadLike[]>();\n for (const pagePayload of options.pagePayloads ?? []) {\n const pagePayloads = pagePayloadsByPageRef.get(pagePayload.pageRef) ?? [];\n pagePayloads.push(pagePayload);\n pagePayloadsByPageRef.set(pagePayload.pageRef, pagePayloads);\n }\n const catalogByType = new Map<string, StructuredDataCatalogEntry>();\n const catalogCounts = new Map<string, number>();\n\n for (const entry of options.catalog) {\n catalogByType.set(entry['@type'], entry);\n catalogCounts.set(entry['@type'], (catalogCounts.get(entry['@type']) ?? 0) + 1);\n }\n\n for (const [entityType, count] of catalogCounts.entries()) {\n if (count > 1) {\n findings.push({\n kind: 'catalog-override',\n entityType,\n count,\n message:\n `Merged catalog contains ${count} entries for @type=\"${entityType}\". ` +\n 'Replacement semantics are last-wins; duplicate array entries indicate an unresolved override.',\n });\n }\n }\n\n for (const page of options.pages) {\n const pageFindingStart = findings.length;\n const sectionPayloadContexts: ReconciliationPayloadContext[] = [];\n const isTemplatedRoute = page.routePath.includes('[');\n\n for (const sectionRef of page.sectionRefs) {\n const section = sectionsByRef.get(sectionRef);\n if (!section) {\n findings.push({\n kind: 'spec-violation',\n code: 'missing-section-definition',\n pageRef: page.ref,\n routePath: page.routePath,\n sectionRef,\n message:\n `Page \"${page.ref}\" references sectionRef \"${sectionRef}\" but no matching section ` +\n 'definition was supplied to the structured-data reconciliation harness.',\n });\n continue;\n }\n\n if (!section.getStructuredData) {\n continue;\n }\n\n const rawStructuredData = section.getStructuredData();\n const normalizedPayloads = normalizeStructuredDataReturn(rawStructuredData);\n\n if (normalizedPayloads === null) {\n findings.push({\n kind: 'spec-violation',\n code: 'invalid-payload-shape',\n pageRef: page.ref,\n routePath: page.routePath,\n sectionRef,\n message:\n `Section \"${sectionRef}\" on page \"${page.ref}\" returned an invalid ` +\n '`getStructuredData()` shape. Expected object, array, null, or undefined.',\n });\n continue;\n }\n\n for (const candidate of normalizedPayloads) {\n if (!isPlainObject(candidate)) {\n findings.push({\n kind: 'spec-violation',\n code: 'invalid-payload-shape',\n pageRef: page.ref,\n routePath: page.routePath,\n sectionRef,\n message:\n `Section \"${sectionRef}\" on page \"${page.ref}\" returned a non-object structured-data payload.`,\n });\n continue;\n }\n\n if (typeof candidate['@type'] !== 'string' || candidate['@type'].trim().length === 0) {\n findings.push({\n kind: 'spec-violation',\n code: 'missing-entity-type',\n pageRef: page.ref,\n routePath: page.routePath,\n sectionRef,\n entityId: typeof candidate['@id'] === 'string' ? candidate['@id'] : undefined,\n message:\n `Section \"${sectionRef}\" on page \"${page.ref}\" returned a structured-data payload ` +\n 'without a non-empty string `@type`.',\n });\n continue;\n }\n\n sectionPayloadContexts.push({\n pageRef: page.ref,\n routePath: page.routePath,\n sectionRef,\n payload: candidate as StructuredDataPayload,\n });\n }\n }\n\n const contextsByRoutePath = new Map<string, ReconciliationPayloadContext[]>();\n const collectionFindingCountByRoutePath = new Map<string, number>();\n const pagePayloadsForPage = pagePayloadsByPageRef.get(page.ref) ?? [];\n pagePayloadsByPageRef.delete(page.ref);\n const shouldEmitManifestResult =\n (sectionPayloadContexts.length > 0 && (!isTemplatedRoute || pagePayloadsForPage.length === 0))\n || findings.length > pageFindingStart\n || pagePayloadsForPage.length === 0;\n if (shouldEmitManifestResult) {\n const manifestPayloadContexts =\n isTemplatedRoute && pagePayloadsForPage.length > 0\n ? []\n : [...sectionPayloadContexts];\n contextsByRoutePath.set(page.routePath, manifestPayloadContexts);\n collectionFindingCountByRoutePath.set(page.routePath, findings.length - pageFindingStart);\n }\n\n for (const pagePayload of pagePayloadsForPage) {\n const routePath = pagePayload.routePath ?? page.routePath;\n const payloadContexts = contextsByRoutePath.get(routePath) ?? [];\n if (\n payloadContexts.length === 0\n && isTemplatedRoute\n && sectionPayloadContexts.length > 0\n ) {\n payloadContexts.push(\n ...sectionPayloadContexts.map((context) => ({\n ...context,\n routePath,\n })),\n );\n }\n contextsByRoutePath.set(routePath, payloadContexts);\n const collectionFindingStart = findings.length;\n collectNormalizedPayloadContexts({\n rawStructuredData: pagePayload.payloads,\n pageRef: page.ref,\n routePath,\n sectionRef: pagePayload.sourceRef ?? `page:${page.ref}`,\n findings,\n into: payloadContexts,\n });\n collectionFindingCountByRoutePath.set(\n routePath,\n (collectionFindingCountByRoutePath.get(routePath) ?? 0)\n + findings.length - collectionFindingStart,\n );\n }\n\n for (const [routePath, payloadContexts] of contextsByRoutePath.entries()) {\n const declaredEntityIds = new Set<string>();\n for (const payloadContext of payloadContexts) {\n collectDeclaredEntityIds(payloadContext.payload, declaredEntityIds);\n }\n\n const routeFindingStart = findings.length;\n for (const payloadContext of payloadContexts) {\n validatePayloadAgainstCatalog(payloadContext, catalogByType, declaredEntityIds, findings, recommendations);\n }\n\n pages.push({\n pageRef: page.ref,\n routePath,\n payloadCount: payloadContexts.length,\n findingCount:\n (collectionFindingCountByRoutePath.get(routePath) ?? 0)\n + findings.length - routeFindingStart,\n });\n }\n }\n\n for (const [pageRef, pagePayloads] of pagePayloadsByPageRef.entries()) {\n for (const pagePayload of pagePayloads) {\n findings.push({\n kind: 'spec-violation',\n code: 'orphan-page-payload',\n pageRef,\n routePath: pagePayload.routePath ?? '',\n sectionRef: pagePayload.sourceRef ?? `page:${pageRef}`,\n message:\n `Structured-data page payload \"${pagePayload.sourceRef ?? `page:${pageRef}`}\" ` +\n `references pageRef \"${pageRef}\" but no matching page manifest was supplied.`,\n });\n }\n }\n\n return {\n findings,\n recommendations,\n pages,\n };\n}\n\nfunction collectNormalizedPayloadContexts(input: {\n rawStructuredData: unknown;\n pageRef: string;\n routePath: string;\n sectionRef: string;\n findings: StructuredDataReconciliationFinding[];\n into: ReconciliationPayloadContext[];\n}): void {\n const {\n rawStructuredData,\n pageRef,\n routePath,\n sectionRef,\n findings,\n into,\n } = input;\n const normalizedPayloads = normalizeStructuredDataReturn(rawStructuredData);\n\n if (normalizedPayloads === null) {\n findings.push({\n kind: 'spec-violation',\n code: 'invalid-payload-shape',\n pageRef,\n routePath,\n sectionRef,\n message:\n `Structured-data source \"${sectionRef}\" on page \"${pageRef}\" returned an invalid ` +\n 'structured-data shape. Expected object, array, null, or undefined.',\n });\n return;\n }\n\n for (const candidate of normalizedPayloads) {\n if (!isPlainObject(candidate)) {\n findings.push({\n kind: 'spec-violation',\n code: 'invalid-payload-shape',\n pageRef,\n routePath,\n sectionRef,\n message:\n `Structured-data source \"${sectionRef}\" on page \"${pageRef}\" returned a non-object structured-data payload.`,\n });\n continue;\n }\n\n if (typeof candidate['@type'] !== 'string' || candidate['@type'].trim().length === 0) {\n findings.push({\n kind: 'spec-violation',\n code: 'missing-entity-type',\n pageRef,\n routePath,\n sectionRef,\n entityId: typeof candidate['@id'] === 'string' ? candidate['@id'] : undefined,\n message:\n `Structured-data source \"${sectionRef}\" on page \"${pageRef}\" returned a structured-data payload ` +\n 'without a non-empty string `@type`.',\n });\n continue;\n }\n\n into.push({\n pageRef,\n routePath,\n sectionRef,\n payload: candidate as StructuredDataPayload,\n });\n }\n}\n\nfunction validatePayloadAgainstCatalog(\n payloadContext: ReconciliationPayloadContext,\n catalogByType: ReadonlyMap<string, StructuredDataCatalogEntry>,\n declaredEntityIds: ReadonlySet<string>,\n findings: StructuredDataReconciliationFinding[],\n recommendations: StructuredDataOptionalFieldRecommendation[],\n): void {\n const { payload, pageRef, routePath, sectionRef } = payloadContext;\n const entityType = payload['@type'];\n const entityId = typeof payload['@id'] === 'string' ? payload['@id'] : undefined;\n const catalogEntry = catalogByType.get(entityType);\n\n if (!catalogEntry) {\n findings.push({\n kind: 'catalog-miss',\n pageRef,\n routePath,\n sectionRef,\n entityType,\n entityId,\n message:\n `Structured-data payload @type=\"${entityType}\" emitted by section \"${sectionRef}\" ` +\n `on page \"${pageRef}\" does not exist in the merged catalog.`,\n });\n return;\n }\n\n for (const requiredField of catalogEntry.requiredFields) {\n if (!hasPresentFieldValue(payload, requiredField)) {\n findings.push({\n kind: 'spec-violation',\n code: 'missing-required-field',\n pageRef,\n routePath,\n sectionRef,\n entityType,\n entityId,\n field: requiredField,\n message:\n `Structured-data payload @type=\"${entityType}\" emitted by section \"${sectionRef}\" ` +\n `on page \"${pageRef}\" is missing required field \"${requiredField}\".`,\n });\n }\n }\n\n if (catalogEntry.recommendOptionals === true) {\n const missingOptionalFields = (catalogEntry.optionalFields ?? []).filter((field) => !hasPresentFieldValue(payload, field));\n if (missingOptionalFields.length > 0) {\n recommendations.push({\n pageRef,\n routePath,\n sectionRef,\n entityType,\n entityId,\n missingOptionalFields,\n message:\n `Structured-data payload @type=\"${entityType}\" emitted by section \"${sectionRef}\" on page \"${pageRef}\" ` +\n `could carry ${missingOptionalFields.map((field) => `\"${field}\"`).join(', ')} — optional, and the catalog ` +\n 'recommends them for richer search and answer-engine results.',\n });\n }\n }\n\n for (const deprecatedField of catalogEntry.deprecatedFields ?? []) {\n if (!hasPresentFieldValue(payload, deprecatedField.field)) {\n continue;\n }\n\n findings.push({\n kind: 'deprecated-field',\n pageRef,\n routePath,\n sectionRef,\n entityType,\n entityId,\n field: deprecatedField.field,\n replacedBy: deprecatedField.replacedBy,\n deprecatedSince: deprecatedField.deprecatedSince,\n message:\n deprecatedField.replacedBy === null\n ? `Structured-data payload @type=\"${entityType}\" emitted by section \"${sectionRef}\" ` +\n `on page \"${pageRef}\" uses deprecated field \"${deprecatedField.field}\" ` +\n `(deprecated since ${deprecatedField.deprecatedSince}).`\n : `Structured-data payload @type=\"${entityType}\" emitted by section \"${sectionRef}\" ` +\n `on page \"${pageRef}\" uses deprecated field \"${deprecatedField.field}\". ` +\n `Use \"${deprecatedField.replacedBy}\" instead ` +\n `(deprecated since ${deprecatedField.deprecatedSince}).`,\n });\n }\n\n const referencedIds = new Set<string>();\n collectReferencedEntityIds(payload, referencedIds, true);\n for (const referencedId of referencedIds) {\n if (declaredEntityIds.has(referencedId)) {\n continue;\n }\n\n findings.push({\n kind: 'cross-entity-reference-drift',\n pageRef,\n routePath,\n sectionRef,\n entityType,\n entityId,\n missingReferenceId: referencedId,\n message:\n `Structured-data payload @type=\"${entityType}\" emitted by section \"${sectionRef}\" ` +\n `on page \"${pageRef}\" references @id \"${referencedId}\" but no emitted entity on the page defines it.`,\n });\n }\n}\n\nfunction normalizeStructuredDataReturn(value: unknown): unknown[] | null {\n if (value === null || value === undefined) {\n return [];\n }\n\n if (Array.isArray(value)) {\n return value.filter((item) => item !== null && item !== undefined);\n }\n\n if (isPlainObject(value)) {\n return [value];\n }\n\n return null;\n}\n\nfunction hasPresentFieldValue(payload: StructuredDataPayload, fieldName: string): boolean {\n if (!Object.prototype.hasOwnProperty.call(payload, fieldName)) {\n return false;\n }\n\n const value = payload[fieldName];\n return value !== null && value !== undefined;\n}\n\nfunction collectDeclaredEntityIds(value: unknown, into: Set<string>): void {\n if (Array.isArray(value)) {\n for (const item of value) {\n collectDeclaredEntityIds(item, into);\n }\n return;\n }\n\n if (!isPlainObject(value)) {\n return;\n }\n\n const entityId = typeof value['@id'] === 'string' ? value['@id'] : null;\n const entityType = typeof value['@type'] === 'string' ? value['@type'] : null;\n if (entityId && entityType) {\n into.add(entityId);\n }\n\n for (const child of Object.values(value)) {\n collectDeclaredEntityIds(child, into);\n }\n}\n\nfunction collectReferencedEntityIds(\n value: unknown,\n into: Set<string>,\n isRootPayload: boolean,\n): void {\n if (Array.isArray(value)) {\n for (const item of value) {\n collectReferencedEntityIds(item, into, false);\n }\n return;\n }\n\n if (!isPlainObject(value)) {\n return;\n }\n\n const entityId = typeof value['@id'] === 'string' ? value['@id'] : null;\n const entityType = typeof value['@type'] === 'string' ? value['@type'] : null;\n if (!isRootPayload && entityId && !entityType) {\n into.add(entityId);\n }\n\n for (const child of Object.values(value)) {\n collectReferencedEntityIds(child, into, false);\n }\n}\n\nfunction isPlainObject(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"website-structured-data.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../src/schemas/structured-data/website-structured-data.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,MAAM,WAAW,4BAA4B;IAC3C,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9C,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,2BAA2B,GACnC,4BAA4B,GAC5B,SAAS,4BAA4B,EAAE,GACvC,IAAI,GACJ,SAAS,CAAC;AACd,wEAAwE"}
1
+ {"version":3,"file":"website-structured-data.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../../src/schemas/structured-data/website-structured-data.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,MAAM,WAAW,4BAA4B;IAC3C,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9C,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,2BAA2B,GACnC,4BAA4B,GAC5B,SAAS,4BAA4B,EAAE,GACvC,IAAI,GACJ,SAAS,CAAC;AACd,wEAAwE"}
@@ -1 +1 @@
1
- {"version":3,"file":"website-structured-data.shared.schemas.js","sourceRoot":"","sources":["../../../../src/schemas/structured-data/website-structured-data.shared.schemas.ts"],"names":[],"mappings":"AA+DA,wEAAwE","sourcesContent":["/**\n * @wildo_source:part:start saas.website.structured-data.payload-shape facet:layer:shared facet:family:website\n *\n * `WebsiteStructuredDataPayload` — the runtime JSON-LD object shape returned\n * by a section's `getStructuredData()` and serialized into one\n * `<script type=\"application/ld+json\">` block per payload.\n *\n * **Layering note** — the payload type is defined HERE (in the\n * website runtime) rather than imported from the specification package because\n * runtime rendering must remain independent from companion semantics. The\n * application's Schema.org catalog describes the same vocabulary (per-`@type`\n * required / optional / deprecated fields); the two contracts are structurally\n * compatible by design but independently owned.\n *\n * **Authoring contract**:\n *\n * - `@type` REQUIRED — the Schema.org entity kind (`'Article'`,\n * `'BlogPosting'`, `'FAQPage'`, …). Typed as a free-form `string`\n * here (not a closed enum) because this package ships to the browser\n * and must not carry the catalog: the renderer emits whatever type a\n * section returns. What VALIDATES the type is the Schema.org catalog,\n * through `wildo website audit` and the companion's reconciliation —\n * and that catalog is a closed enum an application can override but\n * not extend, so a type outside it reports `catalog-miss` until the\n * framework adds it.\n * - `@id?` OPTIONAL — a stable URI identifying the entity. Used for\n * cross-referencing on the same page (e.g. `Article.publisher`\n * referencing the page-level `Organization` via `@id`). The\n * renderer uses `@id` for deduplication: two payloads with the\n * same `@id` collapse into one emitted block (last-wins).\n * - `@context?` OPTIONAL — the JSON-LD vocabulary URL. The renderer\n * auto-injects `'https://schema.org'` when omitted; the field is\n * exposed so consumers CAN override (Schema.org payload extended\n * with a custom vocabulary).\n * - All other fields are pass-through `unknown` — the catalog\n * describes the FIELD NAMES per `@type`; the per-field SHAPE\n * (e.g. `Article.author` is a `Person | Organization`) is locked\n * at the section's payload-builder TS-side.\n */\nexport interface WebsiteStructuredDataPayload {\n '@type': string;\n '@id'?: string;\n '@context'?: string | Record<string, unknown>;\n [key: string]: unknown;\n}\n\n/**\n * Convenience union for `getStructuredData()` return types.\n *\n * A section may emit:\n * - a single payload (most common — `FAQPage` for an FAQ section);\n * - a fixed-length tuple of payloads (e.g. pricing emits `Product +\n * AggregateOffer` together);\n * - `null` / `undefined` when the section has no contribution for\n * the current state (e.g. an empty FAQ list);\n * - an empty array (semantically equivalent to `null`; the renderer\n * short-circuits both).\n */\nexport type WebsiteStructuredDataReturn =\n | WebsiteStructuredDataPayload\n | readonly WebsiteStructuredDataPayload[]\n | null\n | undefined;\n/** @wildo_source:part:end saas.website.structured-data.payload-shape */\n"]}
1
+ {"version":3,"file":"website-structured-data.shared.schemas.js","sourceRoot":"","sources":["../../../../../src/schemas/structured-data/website-structured-data.shared.schemas.ts"],"names":[],"mappings":"AA+DA,wEAAwE","sourcesContent":["/**\n * @wildo_source:part:start saas.website.structured-data.payload-shape facet:layer:shared facet:family:website\n *\n * `WebsiteStructuredDataPayload` — the runtime JSON-LD object shape returned\n * by a section's `getStructuredData()` and serialized into one\n * `<script type=\"application/ld+json\">` block per payload.\n *\n * **Layering note** — the payload type is defined HERE (in the\n * website runtime) rather than imported from the specification package because\n * runtime rendering must remain independent from companion semantics. The\n * application's Schema.org catalog describes the same vocabulary (per-`@type`\n * required / optional / deprecated fields); the two contracts are structurally\n * compatible by design but independently owned.\n *\n * **Authoring contract**:\n *\n * - `@type` REQUIRED — the Schema.org entity kind (`'Article'`,\n * `'BlogPosting'`, `'FAQPage'`, …). Typed as a free-form `string`\n * here (not a closed enum) because this package ships to the browser\n * and must not carry the catalog: the renderer emits whatever type a\n * section returns. What VALIDATES the type is the Schema.org catalog,\n * through `wildo website audit` and the companion's reconciliation —\n * and that catalog is a closed enum an application can override but\n * not extend, so a type outside it reports `catalog-miss` until the\n * framework adds it.\n * - `@id?` OPTIONAL — a stable URI identifying the entity. Used for\n * cross-referencing on the same page (e.g. `Article.publisher`\n * referencing the page-level `Organization` via `@id`). The\n * renderer uses `@id` for deduplication: two payloads with the\n * same `@id` collapse into one emitted block (last-wins).\n * - `@context?` OPTIONAL — the JSON-LD vocabulary URL. The renderer\n * auto-injects `'https://schema.org'` when omitted; the field is\n * exposed so consumers CAN override (Schema.org payload extended\n * with a custom vocabulary).\n * - All other fields are pass-through `unknown` — the catalog\n * describes the FIELD NAMES per `@type`; the per-field SHAPE\n * (e.g. `Article.author` is a `Person | Organization`) is locked\n * at the section's payload-builder TS-side.\n */\nexport interface WebsiteStructuredDataPayload {\n '@type': string;\n '@id'?: string;\n '@context'?: string | Record<string, unknown>;\n [key: string]: unknown;\n}\n\n/**\n * Convenience union for `getStructuredData()` return types.\n *\n * A section may emit:\n * - a single payload (most common — `FAQPage` for an FAQ section);\n * - a fixed-length tuple of payloads (e.g. pricing emits `Product +\n * AggregateOffer` together);\n * - `null` / `undefined` when the section has no contribution for\n * the current state (e.g. an empty FAQ list);\n * - an empty array (semantically equivalent to `null`; the renderer\n * short-circuits both).\n */\nexport type WebsiteStructuredDataReturn =\n | WebsiteStructuredDataPayload\n | readonly WebsiteStructuredDataPayload[]\n | null\n | undefined;\n/** @wildo_source:part:end saas.website.structured-data.payload-shape */\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"label-pack.validator.d.ts","sourceRoot":"","sources":["../../../../src/schemas/validators/label-pack.validator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAC/E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mDAAmD,CAAC;AAC7F,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAErE;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAE/C;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,6BAA6B,GAAG,GAAG,CAAC,iBAAiB,EAAE,SAAS,eAAe,EAAE,CAAC,CAAC;AAE/F;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,WAAW,yBAAyB;IACxC;;;;OAIG;IACH,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B;;;;;;;;;;OAUG;IACH,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB;;;;;;;OAOG;IACH,mBAAmB,EAAE,iBAAiB,EAAE,CAAC;CAC1C;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,wBAAgB,gCAAgC,CAC9C,SAAS,EAAE,SAAS,mBAAmB,EAAE,EACzC,wBAAwB,EAAE,6BAA6B,EACvD,IAAI,EAAE,SAAS,EACf,eAAe,GAAE,SAAS,eAAe,EAAO,GAC/C,yBAAyB,CAiD3B;AACD,+DAA+D"}
1
+ {"version":3,"file":"label-pack.validator.d.ts","sourceRoot":"","sources":["../../../../../src/schemas/validators/label-pack.validator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAC/E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mDAAmD,CAAC;AAC7F,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAErE;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAE/C;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,6BAA6B,GAAG,GAAG,CAAC,iBAAiB,EAAE,SAAS,eAAe,EAAE,CAAC,CAAC;AAE/F;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,WAAW,yBAAyB;IACxC;;;;OAIG;IACH,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B;;;;;;;;;;OAUG;IACH,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB;;;;;;;OAOG;IACH,mBAAmB,EAAE,iBAAiB,EAAE,CAAC;CAC1C;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,wBAAgB,gCAAgC,CAC9C,SAAS,EAAE,SAAS,mBAAmB,EAAE,EACzC,wBAAwB,EAAE,6BAA6B,EACvD,IAAI,EAAE,SAAS,EACf,eAAe,GAAE,SAAS,eAAe,EAAO,GAC/C,yBAAyB,CAiD3B;AACD,+DAA+D"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wildo-ai/saas-website",
3
- "version": "1.1.7",
3
+ "version": "1.1.8",
4
4
  "description": "SaaS marketing/landing website engine — schemas, helpers, layout/primitive placeholders, Astro/MDX adapters, and SEO/AEO/GEO builder library. Consumers author all business sections themselves via the defineWebsiteSection factory.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "author": "Wildo AI",
@@ -65,10 +65,10 @@
65
65
  "test:watch": "vitest"
66
66
  },
67
67
  "dependencies": {
68
- "@wildo-ai/external-connectors-public": "1.1.7",
69
- "@wildo-ai/platform-config-lib": "1.1.7",
70
- "@wildo-ai/presets-components-models": "1.1.7",
71
- "@wildo-ai/saas-models": "1.1.7",
68
+ "@wildo-ai/external-connectors-public": "1.1.8",
69
+ "@wildo-ai/platform-config-lib": "1.1.8",
70
+ "@wildo-ai/presets-components-models": "1.1.8",
71
+ "@wildo-ai/saas-models": "1.1.8",
72
72
  "yaml": "^2.3.4"
73
73
  },
74
74
  "devDependencies": {