@wildo-ai/saas-website 1.1.3 → 1.1.4

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 (76) 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/llms-txt-server.d.ts.map +1 -1
  11. package/dist/esm/astro/pick-labels-for-page.d.ts.map +1 -1
  12. package/dist/esm/astro/robots-renderer.d.ts.map +1 -1
  13. package/dist/esm/astro/robots-renderer.js.map +1 -1
  14. package/dist/esm/astro/sitemap-coverage.d.ts.map +1 -1
  15. package/dist/esm/astro/structured-data.renderer.d.ts.map +1 -1
  16. package/dist/esm/astro/website-page-head.renderer.d.ts.map +1 -1
  17. package/dist/esm/astro/website-page-head.renderer.js.map +1 -1
  18. package/dist/esm/astro/website-page-runtime.helper.d.ts.map +1 -1
  19. package/dist/esm/astro/website-site-context.d.ts.map +1 -1
  20. package/dist/esm/astro-island.d.ts.map +1 -1
  21. package/dist/esm/astro.d.ts.map +1 -1
  22. package/dist/esm/companion-exports.d.ts.map +1 -1
  23. package/dist/esm/components/low-level/WebsiteInternalButton.d.ts.map +1 -1
  24. package/dist/esm/components/low-level/WebsiteInternalLink.d.ts.map +1 -1
  25. package/dist/esm/config/define-website-config.d.ts.map +1 -1
  26. package/dist/esm/config/index.d.ts.map +1 -1
  27. package/dist/esm/config/load-website-config.d.ts.map +1 -1
  28. package/dist/esm/config/wildo-website-config.schemas.d.ts.map +1 -1
  29. package/dist/esm/config/wildo-website-config.schemas.js.map +1 -1
  30. package/dist/esm/config-loader.d.ts.map +1 -1
  31. package/dist/esm/core/anonymous-session/InboundContactForm.d.ts.map +1 -1
  32. package/dist/esm/core/anonymous-session/inbound-contact-form.schema.d.ts.map +1 -1
  33. package/dist/esm/core/anonymous-session/inbound-contact-form.schema.js.map +1 -1
  34. package/dist/esm/core/anonymous-session/website-anonymous-session-client.d.ts.map +1 -1
  35. package/dist/esm/core/contexts/WebsitePageContext.d.ts.map +1 -1
  36. package/dist/esm/core/contexts/WebsitePageContext.js.map +1 -1
  37. package/dist/esm/core/contexts/WebsiteRuntimeContext.d.ts.map +1 -1
  38. package/dist/esm/core/contexts/WebsiteRuntimeContext.js.map +1 -1
  39. package/dist/esm/core/contexts/WebsiteSectionContext.d.ts.map +1 -1
  40. package/dist/esm/core/contexts/WebsiteSectionContext.js.map +1 -1
  41. package/dist/esm/core/contexts/useWebsitePage.d.ts.map +1 -1
  42. package/dist/esm/core/contexts/useWebsiteRuntime.d.ts.map +1 -1
  43. package/dist/esm/core/contexts/useWebsiteSection.d.ts.map +1 -1
  44. package/dist/esm/core/external-providers/frontend-provider-registry.website.d.ts.map +1 -1
  45. package/dist/esm/core/external-providers/frontend-provider-registry.website.js.map +1 -1
  46. package/dist/esm/core/external-providers/provider-scripts.website.d.ts.map +1 -1
  47. package/dist/esm/core/external-providers/provider-scripts.website.js.map +1 -1
  48. package/dist/esm/core/external-providers/useWebsiteProviderScripts.d.ts.map +1 -1
  49. package/dist/esm/core/external-providers/useWebsiteProviderScripts.js.map +1 -1
  50. package/dist/esm/core/factories/define-website-page-manifest.d.ts.map +1 -1
  51. package/dist/esm/core/factories/define-website-section.d.ts.map +1 -1
  52. package/dist/esm/core/hooks/useWebsiteDesignTokens.d.ts.map +1 -1
  53. package/dist/esm/core/hooks/useWebsiteLabel.d.ts.map +1 -1
  54. package/dist/esm/core/layouts/WebsitePageLayout.d.ts.map +1 -1
  55. package/dist/esm/core/layouts/WebsitePageLayout.js.map +1 -1
  56. package/dist/esm/core/layouts/WebsiteSection.d.ts.map +1 -1
  57. package/dist/esm/core/routing/internal-routing.utils.d.ts.map +1 -1
  58. package/dist/esm/index.d.ts.map +1 -1
  59. package/dist/esm/mdx/BlogPost.d.ts.map +1 -1
  60. package/dist/esm/mdx/blog-post-collection.config.d.ts.map +1 -1
  61. package/dist/esm/mdx/blog-post-frontmatter-source.d.ts.map +1 -1
  62. package/dist/esm/mdx/index.d.ts.map +1 -1
  63. package/dist/esm/mdx.d.ts.map +1 -1
  64. package/dist/esm/schemas/blog/blog-post-frontmatter.shared.schemas.d.ts.map +1 -1
  65. package/dist/esm/schemas/design-tokens/website-design-tokens.shared.schemas.d.ts.map +1 -1
  66. package/dist/esm/schemas/label-keys/website-label-key.schemas.d.ts.map +1 -1
  67. package/dist/esm/schemas/manifests/website-page-manifest.shared.schemas.d.ts.map +1 -1
  68. package/dist/esm/schemas/manifests/website-root-config.shared.schemas.d.ts.map +1 -1
  69. package/dist/esm/schemas/refs/page-ref.schemas.d.ts.map +1 -1
  70. package/dist/esm/schemas/refs/section-ref.schemas.d.ts.map +1 -1
  71. package/dist/esm/schemas/sections/website-section-category.shared.d.ts.map +1 -1
  72. package/dist/esm/schemas/sections/website-section-category.shared.js.map +1 -1
  73. package/dist/esm/schemas/sections/website-section-definition.shared.schemas.d.ts.map +1 -1
  74. package/dist/esm/schemas/validators/label-pack.validator.d.ts.map +1 -1
  75. package/dist/tsconfig.build.tsbuildinfo +1 -1
  76. package/package.json +5 -5
@@ -1 +1 @@
1
- {"version":3,"file":"wildo-website-config.schemas.js","sourceRoot":"","sources":["../../../../src/config/wildo-website-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA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AAC,CAAC;IAC3C,CAAC;IAED,6DAA6D;IAC7D,kEAAkE;IAClE,cAAc;IACd,MAAM,YAAY,GAAG,IAAI,GAAG,EAA6B,CAAC;IAC1D,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;QACnC,MAAM,YAAY,GAAG,YAAY,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QACpD,IAAI,YAAY,KAAK,SAAS,EAAE,CAAC;YAC/B,GAAG,CAAC,QAAQ,CAAC;gBACX,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,SAAS,CAAC;gBACjB,OAAO,EACL,WAAW,KAAK,CAAC,MAAM,+BAA+B,YAAY,IAAI;oBACtE,QAAQ,KAAK,CAAC,IAAI,2CAA2C;aAChE,CAAC,CAAC;YACH,SAAS;QACX,CAAC;QACD,YAAY,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IAC7C,CAAC;AACH,CAAC,CAAC,CAAC;AAGL,wDAAwD","sourcesContent":["/**\n * @wildo_source:part:start engine.saas-website.config facet:layer:engine facet:family:marketing-website\n *\n * Per-service marketing-website configuration block, authored in\n * the website service folder as `wildo.website.config.ts`.\n *\n * # What this file's loaded value is used for TODAY\n *\n * This schema is the single source of truth for the marketing-site routing\n * and origin surface. Every consumer reads here:\n *\n * - `defaultLocale` + `locales` — read by `buildAstroI18nConfig(...)`,\n * `assertLabelPacksValid(...)`, `loadWebsitePageRuntime(...)` and\n * `renderWebsitePageHeadHtml(...)` via the shared `WebsiteSiteContext`.\n * - `publicOrigin` — read by the head renderer to compose absolute\n * `<link rel=\"canonical\">`, `og:url`, hreflang `href` URLs and\n * the structured-data `mainEntityOfPage`. The previous\n * `WebsiteRootConfig.seo.siteOrigin` was deleted.\n * - `appOrigin` — the marketing → app handoff target, read at runtime\n * since #493. A `wildo.website.config.ts` is Node-loaded and so\n * invisible to a client island, which is why this value reaches the\n * browser the way `apiOrigin` does: the `.astro` page forwards it to\n * its bridge island, which puts it on `WebsiteRuntimeContext.appOrigin`\n * for the CTA to read.\n *\n * It previously had NO runtime consumer, and a site resolved the app\n * origin a SECOND time from a public build-time environment variable —\n * one host authored twice with no mechanical link, and a silent\n * fallback to localhost when the variable was unset. That is how a\n * marketing site comes to point at the wrong environment.\n * - `csp?` — read by the website-local `sync-nginx-csp` build step,\n * which merges the app-static posture with `infra.csp?.<serviceKey>`,\n * emits the generated artifact consumed by Astro pages, and rewrites\n * the checked-in nginx marker file used by the website Docker image.\n *\n * Future companion subprocesses that introspect the marketing\n * surface (locale-coverage audits, label-pack validation against\n * authored locales, SEO-link sanity checks) will also read here —\n * none exist today.\n *\n * # Why this is per-service website configuration\n *\n * Co-locating the schema with the engine package that owns its semantics\n * keeps three concerns separate from application-root service declarations:\n *\n * 1. **Right reuse axis.** Marketing-site content (locales, SEO origins,\n * future label-pack overrides, marketing-only CTAs) is conceptually\n * different from saas-app-level service declarations (`path`,\n * `serviceName`, `frontendType`, `sessionStorage`). The marketing\n * config travels with the website service folder, NOT with the\n * SaaS app root. Two unrelated lifecycles, two different review\n * audiences.\n * 2. **Engine boundary.** `platform-config-lib` no longer needs to\n * depend on `@wildo-ai/presets-components-models` (the home of\n * `AvailableLanguage`) just to type the marketing-site locale\n * enum. Adding a new website primitive (a new SEO field, a new\n * locale-pack id) belongs with the website package and its public\n * configuration contract.\n * 3. **Disambiguator hazard.** The previous root-level\n * `marketingWebsite?` block silently assumed \"one STATIC_WEBSITE\n * service per SaaS app\" — but nothing in the schema enforced it.\n * Two STATIC_WEBSITE services would have silently shared one\n * config block with no obvious \"which one wins?\" answer. The\n * application configuration rejects more than one STATIC_WEBSITE (and\n * TECH_DOC) service, so the per-service config-file lookup is\n * deterministic by construction.\n *\n * # Schema decisions encoded here\n *\n * - `z.strictObject` so authoring an unknown key surfaces as a parse\n * error at `defineWebsiteConfig` time instead of being silently\n * dropped (same posture as `WildoSaasConfigSchema` and\n * `WildoTechnicalDocConfigSchema`).\n *\n * - **No `enabled` field.** The gate is \"is there a `wildo.website.config.ts`\n * in a `frontendType: STATIC_WEBSITE` service folder?\" — file\n * presence under a STATIC_WEBSITE service IS the enable signal.\n * The Astro build / dev companion / future audit CLI requires the\n * file when it walks a STATIC_WEBSITE service folder, so a\n * half-authored config simply cannot exist (the loader fails\n * closed). Removing the boolean closes a foot-gun: an authored\n * `enabled: false` block was previously a silent way to keep the\n * config \"warm\" without shipping anything, and consumers had to\n * remember to read the flag in addition to the file presence — a\n * future read-the-config / forget-the-flag bug waiting to happen.\n * A separate `services.<key>.enabled` pattern (orthogonal to\n * marketing-website) is the right place for any \"temporarily\n * disable this service\" story (deferred — see DASHBOARD).\n *\n * - URL fields are `z.url()` (Zod 4 native validator) so we get\n * protocol + host parsing for free, matching the rest of the\n * codebase.\n *\n * - `csp?` is typed against `WildoCspConfigSchema` from\n * `@wildo-ai/platform-config-lib`, mirroring the docs service's\n * `wildo.tech-doc.config.ts` contract. The parsed value is consumed by\n * the shared `resolveCspPolicy()` / `emitCspArtifacts()` generator flow.\n *\n * - `defaultLocale ∈ locales` cross-check via `.superRefine` —\n * keeping `defaultLocale` as a top-level field is product-explicit\n * (\"which locale URL is the canonical one\") and decouples it from\n * list ordering. Locale-path uniqueness AND locale-value\n * uniqueness are also enforced — duplicate paths would silently\n * overwrite each other in the Astro build and corrupt the sitemap;\n * duplicate locales would produce duplicate hreflang entries.\n *\n * - Locale primitive is `AvailableLanguage`. The schema imports it\n * from `@wildo-ai/presets-components-models/public-runtime` (the\n * side-effect-free public-runtime seam), but **consumers authoring\n * `wildo.website.config.ts` must import it from\n * `@wildo-ai/saas-models/public-runtime`**. Both paths produce identical\n * values; saas-models simply re-exports the presets atom. Picking\n * one path consistently across consumer files prevents drift in\n * docs / examples / search results. Values authored in\n * `wildo.website.config.ts` are the lowercase BCP-47 strings\n * (`'en'`, `'fr'`), NOT the UPPERCASE TS enum member names\n * (`EN`, `FR`). `z.enum(AvailableLanguage)` parses against the\n * enum VALUES, which is what we want.\n */\n\nimport { WildoCspConfigSchema } from '@wildo-ai/platform-config-lib';\nimport { z } from 'zod';\nimport { AvailableLanguage } from '@wildo-ai/presets-components-models/public-runtime';\n\n/**\n * Per-locale configuration. Each authored locale gets one entry.\n *\n * `path` is the locale URL prefix segment (e.g. `'en'`, `'fr'`) — the\n * Astro builder maps `/en/...` and `/fr/...` paths via this value. We\n * do NOT auto-derive `path` from the locale string because some\n * deployments may want a flat root for the default locale (`/...`\n * instead of `/en/...`); keeping it explicit per locale leaves that\n * door open without a config-shape change.\n */\nexport const WebsiteLocaleConfigSchema = z.strictObject({\n locale: z.enum(AvailableLanguage),\n path: z\n .string()\n .min(1)\n .regex(\n /^[a-z0-9-]+$/,\n 'locale path must be lowercase alphanumeric with hyphens (becomes a URL segment)',\n ),\n});\nexport type WebsiteLocaleConfig = z.infer<typeof WebsiteLocaleConfigSchema>;\n\n/**\n * Per-service marketing-website configuration block.\n *\n * Authored as `export default defineWebsiteConfig({...})` in\n * `<website-service-root>/wildo.website.config.ts`. The Astro\n * build loads this file once at bootstrap via jiti and composes\n * a `WebsiteSiteContext`; helpers consume that composed context rather than\n * this raw value.\n *\n * @example\n * ```ts\n * import { AvailableLanguage } from '@wildo-ai/saas-models/public-runtime';\n * import { defineWebsiteConfig } from '@wildo-ai/saas-website';\n *\n * export default defineWebsiteConfig({\n * publicOrigin: 'https://example.com',\n * appOrigin: 'https://app.example.com',\n * defaultLocale: AvailableLanguage.EN,\n * locales: [\n * { locale: AvailableLanguage.EN, path: 'en' },\n * { locale: AvailableLanguage.FR, path: 'fr' },\n * ],\n * csp: { enabled: true, reportOnly: true },\n * });\n * ```\n */\nexport const WildoMarketingWebsiteConfigSchema = z\n .strictObject({\n /**\n * Public origin of the marketing site (apex / www) — canonical\n * input the Astro head renderer emits as absolute URLs\n * (`<link rel=\"canonical\">`, `og:url`, hreflang `href`,\n * sitemap base, structured-data `mainEntityOfPage`).\n *\n * MUST NOT end with `/` — the head renderer composes\n * `${publicOrigin}${routePath}` and a trailing slash would emit\n * `https://example.com//`. Surface the constraint loudly here\n * rather than silently corrupting URLs at build time.\n */\n publicOrigin: z\n .url()\n .refine((value) => !value.endsWith('/'), {\n error:\n 'WildoMarketingWebsiteConfig.publicOrigin must NOT end with \"/\" (the head ' +\n 'renderer concatenates publicOrigin + routePath; trailing slash would emit \"//\")',\n }),\n\n /**\n * Origin of the SaaS application the marketing site links into\n * (signup / login / pricing → checkout).\n *\n * **Today**: NO runtime consumer. The cross-origin handoff\n * surface that will read it does not exist yet. Authored\n * eagerly so the link-surface PR is a single framework-owned move\n * — until then the field is exercised only by the schema\n * parser.\n *\n * Distinct from the general `WildoSaasConfig.services.<name>`\n * URL surface because the marketing site is a separate Astro\n * project that does not load the full SaaS app graph at build\n * time.\n */\n appOrigin: z.url(),\n\n /**\n * Backend API origin the marketing site POSTs to for anonymous\n * captures (lead / draft-note forms) — e.g.\n * `https://api.example.com`. Threaded through\n * `WebsiteRuntimeContext.apiOrigin` into the React island that\n * constructs the `WebsiteAnonymousSessionClient`.\n *\n * OPTIONAL because a pure brochure site with no capture forms never\n * talks to an API — only sites that host an anonymous-capture\n * section need it. When such a section renders without a resolved\n * `apiOrigin`, the section surfaces a loud misconfiguration rather\n * than silently POSTing nowhere.\n *\n * MUST NOT end with `/` — the anon client composes\n * `${apiOrigin}${MAIN_API_BASE_PATH}${path}` and a trailing slash\n * would emit a doubled `//` in the request URL. (The client also\n * defensively strips trailing slashes, but the refine surfaces the\n * mistake at authoring time.)\n *\n * Distinct from `appOrigin` (the human-facing app the marketing CTAs\n * link into) and `publicOrigin` (the marketing site's own canonical\n * origin): this is the machine-to-machine API host.\n */\n apiOrigin: z\n .url()\n .refine((value) => !value.endsWith('/'), {\n error:\n 'WildoMarketingWebsiteConfig.apiOrigin must NOT end with \"/\" (the anonymous ' +\n 'client concatenates apiOrigin + MAIN_API_BASE_PATH + path; a trailing slash ' +\n 'would emit \"//\")',\n })\n .optional(),\n\n /**\n * Optional Content-Security-Policy override for the marketing site.\n * Consumed by the website-local `sync-nginx-csp` step, which emits\n * the generated artifact for Astro page injection and rewrites the\n * website nginx marker file from the same resolved output.\n */\n csp: WildoCspConfigSchema.optional(),\n\n /**\n * Default locale the marketing site serves for unmatched URLs\n * and as the canonical hreflang signal. Must appear in\n * `locales` below (cross-check enforced by the schema-level\n * `.superRefine`).\n *\n * Read by `buildAstroI18nConfig(...)` (drives Astro's own\n * `i18n.defaultLocale`) and by the head renderer (drives\n * `<html lang=\"...\">`, `og:locale`, hreflang `x-default`).\n */\n defaultLocale: z.enum(AvailableLanguage),\n\n /**\n * Ordered list of locales the marketing site builds. Order is\n * preserved (used by the language switcher rendering and by\n * the sitemap emitter — when the sitemap surface lands).\n *\n * Read by `buildAstroI18nConfig(...)` (Astro `i18n.locales`),\n * by `assertLabelPacksValid(...)` (one label pack per locale),\n * by `loadWebsitePageRuntime(...)` (per-page locale resolution),\n * and by the head renderer (hreflang alternates).\n */\n locales: z.array(WebsiteLocaleConfigSchema).min(1),\n })\n .superRefine((config, ctx) => {\n const declaredLocales = new Set(config.locales.map((entry) => entry.locale));\n if (!declaredLocales.has(config.defaultLocale)) {\n ctx.addIssue({\n code: 'custom',\n path: ['defaultLocale'],\n message:\n `defaultLocale '${config.defaultLocale}' is not declared in 'locales' ` +\n `(declared: [${[...declaredLocales].join(', ')}]). The default locale ` +\n `must be one of the locales the site actually builds.`,\n });\n }\n\n // Locale-path uniqueness: two entries collapsing to the same URL\n // segment would silently overwrite each other in the Astro build\n // and corrupt the sitemap. Fail closed at parse time.\n const pathOwners = new Map<string, AvailableLanguage>();\n for (const entry of config.locales) {\n const previous = pathOwners.get(entry.path);\n if (previous !== undefined) {\n ctx.addIssue({\n code: 'custom',\n path: ['locales'],\n message:\n `Locale path '${entry.path}' is declared by both '${previous}' and ` +\n `'${entry.locale}'. Each locale must have a unique URL path segment.`,\n });\n continue;\n }\n pathOwners.set(entry.path, entry.locale);\n }\n\n // Locale-value uniqueness: same locale appearing twice would\n // produce duplicate hreflang entries and ambiguous default-locale\n // resolution.\n const localeOwners = new Map<AvailableLanguage, string>();\n for (const entry of config.locales) {\n const previousPath = localeOwners.get(entry.locale);\n if (previousPath !== undefined) {\n ctx.addIssue({\n code: 'custom',\n path: ['locales'],\n message:\n `Locale '${entry.locale}' is declared twice (paths '${previousPath}' ` +\n `and '${entry.path}'). Each locale must appear at most once.`,\n });\n continue;\n }\n localeOwners.set(entry.locale, entry.path);\n }\n });\nexport type WildoMarketingWebsiteConfig = z.infer<typeof WildoMarketingWebsiteConfigSchema>;\nexport type WildoMarketingWebsiteConfigInput = z.input<typeof WildoMarketingWebsiteConfigSchema>;\n/** @wildo_source:part:end engine.saas-website.config */\n"]}
1
+ {"version":3,"file":"wildo-website-config.schemas.js","sourceRoot":"","sources":["../../../src/config/wildo-website-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsHG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAC;AAEvF;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,YAAY,CAAC;IACtD,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC;IACjC,IAAI,EAAE,CAAC;SACJ,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,KAAK,CACJ,cAAc,EACd,iFAAiF,CAClF;CACJ,CAAC,CAAC;AAGH;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC;KAC/C,YAA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CAAC;QACD,YAAY,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IAC7C,CAAC;AACH,CAAC,CAAC,CAAC;AAGL,wDAAwD","sourcesContent":["/**\n * @wildo_source:part:start engine.saas-website.config facet:layer:engine facet:family:marketing-website\n *\n * Per-service marketing-website configuration block, authored in\n * the website service folder as `wildo.website.config.ts`.\n *\n * # What this file's loaded value is used for TODAY\n *\n * This schema is the single source of truth for the marketing-site routing\n * and origin surface. Every consumer reads here:\n *\n * - `defaultLocale` + `locales` — read by `buildAstroI18nConfig(...)`,\n * `assertLabelPacksValid(...)`, `loadWebsitePageRuntime(...)` and\n * `renderWebsitePageHeadHtml(...)` via the shared `WebsiteSiteContext`.\n * - `publicOrigin` — read by the head renderer to compose absolute\n * `<link rel=\"canonical\">`, `og:url`, hreflang `href` URLs and\n * the structured-data `mainEntityOfPage`. The previous\n * `WebsiteRootConfig.seo.siteOrigin` was deleted.\n * - `appOrigin` — the marketing → app handoff target, read at runtime\n * since #493. A `wildo.website.config.ts` is Node-loaded and so\n * invisible to a client island, which is why this value reaches the\n * browser the way `apiOrigin` does: the `.astro` page forwards it to\n * its bridge island, which puts it on `WebsiteRuntimeContext.appOrigin`\n * for the CTA to read.\n *\n * It previously had NO runtime consumer, and a site resolved the app\n * origin a SECOND time from a public build-time environment variable —\n * one host authored twice with no mechanical link, and a silent\n * fallback to localhost when the variable was unset. That is how a\n * marketing site comes to point at the wrong environment.\n * - `csp?` — read by the website-local `sync-nginx-csp` build step,\n * which merges the app-static posture with `infra.csp?.<serviceKey>`,\n * emits the generated artifact consumed by Astro pages, and rewrites\n * the checked-in nginx marker file used by the website Docker image.\n *\n * Future companion subprocesses that introspect the marketing\n * surface (locale-coverage audits, label-pack validation against\n * authored locales, SEO-link sanity checks) will also read here —\n * none exist today.\n *\n * # Why this is per-service website configuration\n *\n * Co-locating the schema with the engine package that owns its semantics\n * keeps three concerns separate from application-root service declarations:\n *\n * 1. **Right reuse axis.** Marketing-site content (locales, SEO origins,\n * future label-pack overrides, marketing-only CTAs) is conceptually\n * different from saas-app-level service declarations (`path`,\n * `serviceName`, `frontendType`, `sessionStorage`). The marketing\n * config travels with the website service folder, NOT with the\n * SaaS app root. Two unrelated lifecycles, two different review\n * audiences.\n * 2. **Engine boundary.** `platform-config-lib` no longer needs to\n * depend on `@wildo-ai/presets-components-models` (the home of\n * `AvailableLanguage`) just to type the marketing-site locale\n * enum. Adding a new website primitive (a new SEO field, a new\n * locale-pack id) belongs with the website package and its public\n * configuration contract.\n * 3. **Disambiguator hazard.** The previous root-level\n * `marketingWebsite?` block silently assumed \"one STATIC_WEBSITE\n * service per SaaS app\" — but nothing in the schema enforced it.\n * Two STATIC_WEBSITE services would have silently shared one\n * config block with no obvious \"which one wins?\" answer. The\n * application configuration rejects more than one STATIC_WEBSITE (and\n * TECH_DOC) service, so the per-service config-file lookup is\n * deterministic by construction.\n *\n * # Schema decisions encoded here\n *\n * - `z.strictObject` so authoring an unknown key surfaces as a parse\n * error at `defineWebsiteConfig` time instead of being silently\n * dropped (same posture as `WildoSaasConfigSchema` and\n * `WildoTechnicalDocConfigSchema`).\n *\n * - **No `enabled` field.** The gate is \"is there a `wildo.website.config.ts`\n * in a `frontendType: STATIC_WEBSITE` service folder?\" — file\n * presence under a STATIC_WEBSITE service IS the enable signal.\n * The Astro build / dev companion / future audit CLI requires the\n * file when it walks a STATIC_WEBSITE service folder, so a\n * half-authored config simply cannot exist (the loader fails\n * closed). Removing the boolean closes a foot-gun: an authored\n * `enabled: false` block was previously a silent way to keep the\n * config \"warm\" without shipping anything, and consumers had to\n * remember to read the flag in addition to the file presence — a\n * future read-the-config / forget-the-flag bug waiting to happen.\n * A separate `services.<key>.enabled` pattern (orthogonal to\n * marketing-website) is the right place for any \"temporarily\n * disable this service\" story (deferred — see DASHBOARD).\n *\n * - URL fields are `z.url()` (Zod 4 native validator) so we get\n * protocol + host parsing for free, matching the rest of the\n * codebase.\n *\n * - `csp?` is typed against `WildoCspConfigSchema` from\n * `@wildo-ai/platform-config-lib`, mirroring the docs service's\n * `wildo.tech-doc.config.ts` contract. The parsed value is consumed by\n * the shared `resolveCspPolicy()` / `emitCspArtifacts()` generator flow.\n *\n * - `defaultLocale ∈ locales` cross-check via `.superRefine` —\n * keeping `defaultLocale` as a top-level field is product-explicit\n * (\"which locale URL is the canonical one\") and decouples it from\n * list ordering. Locale-path uniqueness AND locale-value\n * uniqueness are also enforced — duplicate paths would silently\n * overwrite each other in the Astro build and corrupt the sitemap;\n * duplicate locales would produce duplicate hreflang entries.\n *\n * - Locale primitive is `AvailableLanguage`. The schema imports it\n * from `@wildo-ai/presets-components-models/public-runtime` (the\n * side-effect-free public-runtime seam), but **consumers authoring\n * `wildo.website.config.ts` must import it from\n * `@wildo-ai/saas-models/public-runtime`**. Both paths produce identical\n * values; saas-models simply re-exports the presets atom. Picking\n * one path consistently across consumer files prevents drift in\n * docs / examples / search results. Values authored in\n * `wildo.website.config.ts` are the lowercase BCP-47 strings\n * (`'en'`, `'fr'`), NOT the UPPERCASE TS enum member names\n * (`EN`, `FR`). `z.enum(AvailableLanguage)` parses against the\n * enum VALUES, which is what we want.\n */\n\nimport { WildoCspConfigSchema } from '@wildo-ai/platform-config-lib';\nimport { z } from 'zod';\nimport { AvailableLanguage } from '@wildo-ai/presets-components-models/public-runtime';\n\n/**\n * Per-locale configuration. Each authored locale gets one entry.\n *\n * `path` is the locale URL prefix segment (e.g. `'en'`, `'fr'`) — the\n * Astro builder maps `/en/...` and `/fr/...` paths via this value. We\n * do NOT auto-derive `path` from the locale string because some\n * deployments may want a flat root for the default locale (`/...`\n * instead of `/en/...`); keeping it explicit per locale leaves that\n * door open without a config-shape change.\n */\nexport const WebsiteLocaleConfigSchema = z.strictObject({\n locale: z.enum(AvailableLanguage),\n path: z\n .string()\n .min(1)\n .regex(\n /^[a-z0-9-]+$/,\n 'locale path must be lowercase alphanumeric with hyphens (becomes a URL segment)',\n ),\n});\nexport type WebsiteLocaleConfig = z.infer<typeof WebsiteLocaleConfigSchema>;\n\n/**\n * Per-service marketing-website configuration block.\n *\n * Authored as `export default defineWebsiteConfig({...})` in\n * `<website-service-root>/wildo.website.config.ts`. The Astro\n * build loads this file once at bootstrap via jiti and composes\n * a `WebsiteSiteContext`; helpers consume that composed context rather than\n * this raw value.\n *\n * @example\n * ```ts\n * import { AvailableLanguage } from '@wildo-ai/saas-models/public-runtime';\n * import { defineWebsiteConfig } from '@wildo-ai/saas-website';\n *\n * export default defineWebsiteConfig({\n * publicOrigin: 'https://example.com',\n * appOrigin: 'https://app.example.com',\n * defaultLocale: AvailableLanguage.EN,\n * locales: [\n * { locale: AvailableLanguage.EN, path: 'en' },\n * { locale: AvailableLanguage.FR, path: 'fr' },\n * ],\n * csp: { enabled: true, reportOnly: true },\n * });\n * ```\n */\nexport const WildoMarketingWebsiteConfigSchema = z\n .strictObject({\n /**\n * Public origin of the marketing site (apex / www) — canonical\n * input the Astro head renderer emits as absolute URLs\n * (`<link rel=\"canonical\">`, `og:url`, hreflang `href`,\n * sitemap base, structured-data `mainEntityOfPage`).\n *\n * MUST NOT end with `/` — the head renderer composes\n * `${publicOrigin}${routePath}` and a trailing slash would emit\n * `https://example.com//`. Surface the constraint loudly here\n * rather than silently corrupting URLs at build time.\n */\n publicOrigin: z\n .url()\n .refine((value) => !value.endsWith('/'), {\n error:\n 'WildoMarketingWebsiteConfig.publicOrigin must NOT end with \"/\" (the head ' +\n 'renderer concatenates publicOrigin + routePath; trailing slash would emit \"//\")',\n }),\n\n /**\n * Origin of the SaaS application the marketing site links into\n * (signup / login / pricing → checkout).\n *\n * **Today**: NO runtime consumer. The cross-origin handoff\n * surface that will read it does not exist yet. Authored\n * eagerly so the link-surface PR is a single framework-owned move\n * — until then the field is exercised only by the schema\n * parser.\n *\n * Distinct from the general `WildoSaasConfig.services.<name>`\n * URL surface because the marketing site is a separate Astro\n * project that does not load the full SaaS app graph at build\n * time.\n */\n appOrigin: z.url(),\n\n /**\n * Backend API origin the marketing site POSTs to for anonymous\n * captures (lead / draft-note forms) — e.g.\n * `https://api.example.com`. Threaded through\n * `WebsiteRuntimeContext.apiOrigin` into the React island that\n * constructs the `WebsiteAnonymousSessionClient`.\n *\n * OPTIONAL because a pure brochure site with no capture forms never\n * talks to an API — only sites that host an anonymous-capture\n * section need it. When such a section renders without a resolved\n * `apiOrigin`, the section surfaces a loud misconfiguration rather\n * than silently POSTing nowhere.\n *\n * MUST NOT end with `/` — the anon client composes\n * `${apiOrigin}${MAIN_API_BASE_PATH}${path}` and a trailing slash\n * would emit a doubled `//` in the request URL. (The client also\n * defensively strips trailing slashes, but the refine surfaces the\n * mistake at authoring time.)\n *\n * Distinct from `appOrigin` (the human-facing app the marketing CTAs\n * link into) and `publicOrigin` (the marketing site's own canonical\n * origin): this is the machine-to-machine API host.\n */\n apiOrigin: z\n .url()\n .refine((value) => !value.endsWith('/'), {\n error:\n 'WildoMarketingWebsiteConfig.apiOrigin must NOT end with \"/\" (the anonymous ' +\n 'client concatenates apiOrigin + MAIN_API_BASE_PATH + path; a trailing slash ' +\n 'would emit \"//\")',\n })\n .optional(),\n\n /**\n * Optional Content-Security-Policy override for the marketing site.\n * Consumed by the website-local `sync-nginx-csp` step, which emits\n * the generated artifact for Astro page injection and rewrites the\n * website nginx marker file from the same resolved output.\n */\n csp: WildoCspConfigSchema.optional(),\n\n /**\n * Default locale the marketing site serves for unmatched URLs\n * and as the canonical hreflang signal. Must appear in\n * `locales` below (cross-check enforced by the schema-level\n * `.superRefine`).\n *\n * Read by `buildAstroI18nConfig(...)` (drives Astro's own\n * `i18n.defaultLocale`) and by the head renderer (drives\n * `<html lang=\"...\">`, `og:locale`, hreflang `x-default`).\n */\n defaultLocale: z.enum(AvailableLanguage),\n\n /**\n * Ordered list of locales the marketing site builds. Order is\n * preserved (used by the language switcher rendering and by\n * the sitemap emitter — when the sitemap surface lands).\n *\n * Read by `buildAstroI18nConfig(...)` (Astro `i18n.locales`),\n * by `assertLabelPacksValid(...)` (one label pack per locale),\n * by `loadWebsitePageRuntime(...)` (per-page locale resolution),\n * and by the head renderer (hreflang alternates).\n */\n locales: z.array(WebsiteLocaleConfigSchema).min(1),\n })\n .superRefine((config, ctx) => {\n const declaredLocales = new Set(config.locales.map((entry) => entry.locale));\n if (!declaredLocales.has(config.defaultLocale)) {\n ctx.addIssue({\n code: 'custom',\n path: ['defaultLocale'],\n message:\n `defaultLocale '${config.defaultLocale}' is not declared in 'locales' ` +\n `(declared: [${[...declaredLocales].join(', ')}]). The default locale ` +\n `must be one of the locales the site actually builds.`,\n });\n }\n\n // Locale-path uniqueness: two entries collapsing to the same URL\n // segment would silently overwrite each other in the Astro build\n // and corrupt the sitemap. Fail closed at parse time.\n const pathOwners = new Map<string, AvailableLanguage>();\n for (const entry of config.locales) {\n const previous = pathOwners.get(entry.path);\n if (previous !== undefined) {\n ctx.addIssue({\n code: 'custom',\n path: ['locales'],\n message:\n `Locale path '${entry.path}' is declared by both '${previous}' and ` +\n `'${entry.locale}'. Each locale must have a unique URL path segment.`,\n });\n continue;\n }\n pathOwners.set(entry.path, entry.locale);\n }\n\n // Locale-value uniqueness: same locale appearing twice would\n // produce duplicate hreflang entries and ambiguous default-locale\n // resolution.\n const localeOwners = new Map<AvailableLanguage, string>();\n for (const entry of config.locales) {\n const previousPath = localeOwners.get(entry.locale);\n if (previousPath !== undefined) {\n ctx.addIssue({\n code: 'custom',\n path: ['locales'],\n message:\n `Locale '${entry.locale}' is declared twice (paths '${previousPath}' ` +\n `and '${entry.path}'). Each locale must appear at most once.`,\n });\n continue;\n }\n localeOwners.set(entry.locale, entry.path);\n }\n });\nexport type WildoMarketingWebsiteConfig = z.infer<typeof WildoMarketingWebsiteConfigSchema>;\nexport type WildoMarketingWebsiteConfigInput = z.input<typeof WildoMarketingWebsiteConfigSchema>;\n/** @wildo_source:part:end engine.saas-website.config */\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"config-loader.d.ts","sourceRoot":"","sources":["../../../src/config-loader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,cAAc,8BAA8B,CAAC"}
1
+ {"version":3,"file":"config-loader.d.ts","sourceRoot":"","sources":["../../src/config-loader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,cAAc,8BAA8B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"InboundContactForm.d.ts","sourceRoot":"","sources":["../../../../../src/core/anonymous-session/InboundContactForm.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAyC,MAAM,OAAO,CAAC;AAE9D,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AAExF,MAAM,WAAW,wBAAwB;IACvC,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,0CAA0C;IAC1C,qBAAqB,EAAE,MAAM,CAAC;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;CACtB;AAgBD,MAAM,WAAW,uBAAuB;IACtC,yFAAyF;IACzF,MAAM,EAAE,6BAA6B,CAAC;IACtC,wFAAwF;IACxF,MAAM,CAAC,EAAE,OAAO,CAAC,wBAAwB,CAAC,CAAC;IAC3C,8EAA8E;IAC9E,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;CAC1B;AAUD,wBAAgB,kBAAkB,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,EAAE,uBAAuB,GAAG,KAAK,CAAC,YAAY,CA6F/G"}
1
+ {"version":3,"file":"InboundContactForm.d.ts","sourceRoot":"","sources":["../../../../src/core/anonymous-session/InboundContactForm.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAyC,MAAM,OAAO,CAAC;AAE9D,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AAExF,MAAM,WAAW,wBAAwB;IACvC,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,0CAA0C;IAC1C,qBAAqB,EAAE,MAAM,CAAC;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;CACtB;AAgBD,MAAM,WAAW,uBAAuB;IACtC,yFAAyF;IACzF,MAAM,EAAE,6BAA6B,CAAC;IACtC,wFAAwF;IACxF,MAAM,CAAC,EAAE,OAAO,CAAC,wBAAwB,CAAC,CAAC;IAC3C,8EAA8E;IAC9E,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;CAC1B;AAUD,wBAAgB,kBAAkB,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,EAAE,uBAAuB,GAAG,KAAK,CAAC,YAAY,CA6F/G"}
@@ -1 +1 @@
1
- {"version":3,"file":"inbound-contact-form.schema.d.ts","sourceRoot":"","sources":["../../../../../src/core/anonymous-session/inbound-contact-form.schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;GAIG;AACH,eAAO,MAAM,wBAAwB;;;;;;iBAanC,CAAC;AAEH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAEhF;;;;GAIG;AACH,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,wBAAwB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAYvG"}
1
+ {"version":3,"file":"inbound-contact-form.schema.d.ts","sourceRoot":"","sources":["../../../../src/core/anonymous-session/inbound-contact-form.schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;GAIG;AACH,eAAO,MAAM,wBAAwB;;;;;;iBAanC,CAAC;AAEH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAEhF;;;;GAIG;AACH,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,wBAAwB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAYvG"}
@@ -1 +1 @@
1
- {"version":3,"file":"inbound-contact-form.schema.js","sourceRoot":"","sources":["../../../../../src/core/anonymous-session/inbound-contact-form.schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;GAIG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,mFAAmF;IACnF,+EAA+E;IAC/E,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,6BAA6B,CAAC;IAC7C,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;IAChD,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;IAC/C,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC3C;;;;OAIG;IACH,gBAAgB,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;CAC7C,CAAC,CAAC;AAIH;;;;GAIG;AACH,MAAM,UAAU,6BAA6B,CAAC,MAAgC;IAC5E,OAAO;QACL,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE;QACxC,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC5D,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACzD,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAChD,OAAO,EAAE;YACP,2EAA2E;YAC3E,4BAA4B;YAC5B,qBAAqB,EAAE,MAAM,CAAC,gBAAgB,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,OAAO;SACvE;KACF,CAAC;AACJ,CAAC","sourcesContent":["/**\n * Inbound-contact form input schema (website-local, bundle-safe).\n *\n * Deliberately a SEPARATE plain-Zod schema, NOT `InboundContactSchema` from\n * `@wildo-ai/saas-models`: that schema is decorator-bound (`.isPrimaryKey()`,\n * `.excludeFromCreate()`, `.isBackendOnly()`, …), so importing it would boot the\n * decorator framework into the browser bundle — forbidden by bundle discipline. The\n * website only needs to validate the handful of client-authored CREATE fields; the\n * backend is the authority on the full contract (it re-validates + injects the\n * server-set fields: `_id`, `anonymousUserId`, `userId`, `emailUserMatch`, timestamps).\n *\n * Mirrors the non-excluded, non-backend-only CREATE inputs of `InboundContact`\n * (`email` required; `firstName` / `lastName` / `phone` optional), plus ONE privacy\n * signal: an OPTIONAL marketing opt-in (mapped to the `privacy.dataProcessingConsent`\n * tier). There is no second, required agreement field: a governed notice, contract or\n * consent interaction must use the separate exact-release receipt contract, because this\n * DTO cannot manufacture legal evidence from a checkbox and a client timestamp.\n * `relatedUserId` is intentionally absent — it is `.excludeFromCreate()` on the\n * resource (sales/admin-only, never client-authored).\n */\n\nimport { z } from \"zod\";\n\n/**\n * The wire payload POSTed to `/api/v1/inbound-contacts`. `privacy` matches the\n * resource's `InboundContactPrivacySchema` shape (a nested consent object) so the\n * backend accepts it verbatim.\n */\nexport const InboundContactFormSchema = z.object({\n // Zod 4: top-level `z.email()` (not the deprecated `z.string().email()`), matching\n // the resource schema. An empty string fails it, so it also covers \"required\".\n email: z.email(\"Enter a valid email address\"),\n firstName: z.string().trim().max(200).optional(),\n lastName: z.string().trim().max(200).optional(),\n phone: z.string().trim().max(64).optional(),\n /**\n * OPTIONAL marketing opt-in — maps into the resource's `privacy.dataProcessingConsent`\n * tier ('marketing' vs the BASIC default). It is the only privacy field on this form,\n * and it gates nothing: an unchecked box still submits, at the BASIC tier.\n */\n marketingConsent: z.boolean().default(false),\n});\n\nexport type InboundContactFormValues = z.infer<typeof InboundContactFormSchema>;\n\n/**\n * Build the exact JSON body the backend CREATE expects from validated form values.\n * Keeps the `privacy` nesting + the consent enum mapping in ONE place so the form\n * component stays declarative.\n */\nexport function buildInboundContactCreateBody(values: InboundContactFormValues): Record<string, unknown> {\n return {\n email: values.email.trim().toLowerCase(),\n ...(values.firstName ? { firstName: values.firstName } : {}),\n ...(values.lastName ? { lastName: values.lastName } : {}),\n ...(values.phone ? { phone: values.phone } : {}),\n privacy: {\n // OPTIONAL marketing tier: 'marketing' when the visitor opted in, else the\n // resource's BASIC default.\n dataProcessingConsent: values.marketingConsent ? \"marketing\" : \"basic\",\n },\n };\n}\n"]}
1
+ {"version":3,"file":"inbound-contact-form.schema.js","sourceRoot":"","sources":["../../../../src/core/anonymous-session/inbound-contact-form.schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,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AC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,OAAO;SACvE;KACF,CAAC;AACJ,CAAC","sourcesContent":["/**\n * Inbound-contact form input schema (website-local, bundle-safe).\n *\n * Deliberately a SEPARATE plain-Zod schema, NOT `InboundContactSchema` from\n * `@wildo-ai/saas-models`: that schema is decorator-bound (`.isPrimaryKey()`,\n * `.excludeFromCreate()`, `.isBackendOnly()`, …), so importing it would boot the\n * decorator framework into the browser bundle — forbidden by bundle discipline. The\n * website only needs to validate the handful of client-authored CREATE fields; the\n * backend is the authority on the full contract (it re-validates + injects the\n * server-set fields: `_id`, `anonymousUserId`, `userId`, `emailUserMatch`, timestamps).\n *\n * Mirrors the non-excluded, non-backend-only CREATE inputs of `InboundContact`\n * (`email` required; `firstName` / `lastName` / `phone` optional), plus ONE privacy\n * signal: an OPTIONAL marketing opt-in (mapped to the `privacy.dataProcessingConsent`\n * tier). There is no second, required agreement field: a governed notice, contract or\n * consent interaction must use the separate exact-release receipt contract, because this\n * DTO cannot manufacture legal evidence from a checkbox and a client timestamp.\n * `relatedUserId` is intentionally absent — it is `.excludeFromCreate()` on the\n * resource (sales/admin-only, never client-authored).\n */\n\nimport { z } from \"zod\";\n\n/**\n * The wire payload POSTed to `/api/v1/inbound-contacts`. `privacy` matches the\n * resource's `InboundContactPrivacySchema` shape (a nested consent object) so the\n * backend accepts it verbatim.\n */\nexport const InboundContactFormSchema = z.object({\n // Zod 4: top-level `z.email()` (not the deprecated `z.string().email()`), matching\n // the resource schema. An empty string fails it, so it also covers \"required\".\n email: z.email(\"Enter a valid email address\"),\n firstName: z.string().trim().max(200).optional(),\n lastName: z.string().trim().max(200).optional(),\n phone: z.string().trim().max(64).optional(),\n /**\n * OPTIONAL marketing opt-in — maps into the resource's `privacy.dataProcessingConsent`\n * tier ('marketing' vs the BASIC default). It is the only privacy field on this form,\n * and it gates nothing: an unchecked box still submits, at the BASIC tier.\n */\n marketingConsent: z.boolean().default(false),\n});\n\nexport type InboundContactFormValues = z.infer<typeof InboundContactFormSchema>;\n\n/**\n * Build the exact JSON body the backend CREATE expects from validated form values.\n * Keeps the `privacy` nesting + the consent enum mapping in ONE place so the form\n * component stays declarative.\n */\nexport function buildInboundContactCreateBody(values: InboundContactFormValues): Record<string, unknown> {\n return {\n email: values.email.trim().toLowerCase(),\n ...(values.firstName ? { firstName: values.firstName } : {}),\n ...(values.lastName ? { lastName: values.lastName } : {}),\n ...(values.phone ? { phone: values.phone } : {}),\n privacy: {\n // OPTIONAL marketing tier: 'marketing' when the visitor opted in, else the\n // resource's BASIC default.\n dataProcessingConsent: values.marketingConsent ? \"marketing\" : \"basic\",\n },\n };\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"website-anonymous-session-client.d.ts","sourceRoot":"","sources":["../../../../../src/core/anonymous-session/website-anonymous-session-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAeH,MAAM,WAAW,oCAAoC;IACnD,mFAAmF;IACnF,SAAS,EAAE,MAAM,CAAC;IAClB,sFAAsF;IACtF,mBAAmB,EAAE,MAAM,CAAC;CAC7B;AAED,iEAAiE;AACjE,qBAAa,4BAA6B,SAAQ,KAAK;aAEnC,MAAM,EAAE,MAAM;aACd,QAAQ,EAAE,MAAM;gBADhB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM;CAKnC;AAED,qBAAa,6BAA6B;IACxC,OAAO,CAAC,eAAe,CAAuB;IAC9C,OAAO,CAAC,YAAY,CAAuB;IAC3C,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAS;IACpC,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAS;gBAEjC,OAAO,EAAE,oCAAoC;IAMzD,8FAA8F;IAC9F,kBAAkB,IAAI,MAAM,GAAG,IAAI;IAInC;;;;;;;;;;;;OAYG;IACH,yBAAyB,IAAI,MAAM;IAMnC,6EAA6E;IAC7E,eAAe,IAAI,OAAO;IAI1B;;;;;;OAMG;IACG,aAAa,CAAC,SAAS,GAAG,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC;IAoBzF,OAAO,CAAC,oBAAoB;IAQ5B,OAAO,CAAC,YAAY;IAcpB,OAAO,CAAC,mBAAmB;IAS3B,OAAO,CAAC,kBAAkB;IAY1B,OAAO,CAAC,OAAO;CAYhB"}
1
+ {"version":3,"file":"website-anonymous-session-client.d.ts","sourceRoot":"","sources":["../../../../src/core/anonymous-session/website-anonymous-session-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAeH,MAAM,WAAW,oCAAoC;IACnD,mFAAmF;IACnF,SAAS,EAAE,MAAM,CAAC;IAClB,sFAAsF;IACtF,mBAAmB,EAAE,MAAM,CAAC;CAC7B;AAED,iEAAiE;AACjE,qBAAa,4BAA6B,SAAQ,KAAK;aAEnC,MAAM,EAAE,MAAM;aACd,QAAQ,EAAE,MAAM;gBADhB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM;CAKnC;AAED,qBAAa,6BAA6B;IACxC,OAAO,CAAC,eAAe,CAAuB;IAC9C,OAAO,CAAC,YAAY,CAAuB;IAC3C,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAS;IACpC,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAS;gBAEjC,OAAO,EAAE,oCAAoC;IAMzD,8FAA8F;IAC9F,kBAAkB,IAAI,MAAM,GAAG,IAAI;IAInC;;;;;;;;;;;;OAYG;IACH,yBAAyB,IAAI,MAAM;IAMnC,6EAA6E;IAC7E,eAAe,IAAI,OAAO;IAI1B;;;;;;OAMG;IACG,aAAa,CAAC,SAAS,GAAG,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC;IAoBzF,OAAO,CAAC,oBAAoB;IAQ5B,OAAO,CAAC,YAAY;IAcpB,OAAO,CAAC,mBAAmB;IAS3B,OAAO,CAAC,kBAAkB;IAY1B,OAAO,CAAC,OAAO;CAYhB"}
@@ -1 +1 @@
1
- {"version":3,"file":"WebsitePageContext.d.ts","sourceRoot":"","sources":["../../../../../src/core/contexts/WebsitePageContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAiB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAE1E;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,WAAW,uBAAuB;IACtC;;;;OAIG;IACH,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,OAAO,CAAC,uBAAuB,GAAG,IAAI,CACxB,CAAC;AAEtD,MAAM,WAAW,+BAA+B;IAC9C,KAAK,EAAE,uBAAuB,CAAC;IAC/B,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,0BAA0B,CAAC,EACzC,KAAK,EACL,QAAQ,GACT,EAAE,+BAA+B,GAAG,SAAS,CAM7C;yBATe,0BAA0B;;;AAW1C,uDAAuD"}
1
+ {"version":3,"file":"WebsitePageContext.d.ts","sourceRoot":"","sources":["../../../../src/core/contexts/WebsitePageContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAiB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAE1E;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,WAAW,uBAAuB;IACtC;;;;OAIG;IACH,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,OAAO,CAAC,uBAAuB,GAAG,IAAI,CACxB,CAAC;AAEtD,MAAM,WAAW,+BAA+B;IAC9C,KAAK,EAAE,uBAAuB,CAAC;IAC/B,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,0BAA0B,CAAC,EACzC,KAAK,EACL,QAAQ,GACT,EAAE,+BAA+B,GAAG,SAAS,CAM7C;yBATe,0BAA0B;;;AAW1C,uDAAuD"}
@@ -1 +1 @@
1
- {"version":3,"file":"WebsitePageContext.js","sourceRoot":"","sources":["../../../../../src/core/contexts/WebsitePageContext.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,aAAa,EAAkB,MAAM,OAAO,CAAC;AAiC7D,MAAM,CAAC,MAAM,kBAAkB,GAC7B,aAAa,CAAiC,IAAI,CAAC,CAAC;AAOtD,MAAM,UAAU,0BAA0B,CAAC,EACzC,KAAK,EACL,QAAQ,GACwB;IAChC,OAAO,CACL,KAAC,kBAAkB,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YACtC,QAAQ,GACmB,CAC/B,CAAC;AACJ,CAAC;AACD,0BAA0B,CAAC,WAAW,GAAG,4BAA4B,CAAC","sourcesContent":["import React, { createContext, type ReactNode } from 'react';\n\nimport type { WebsitePageRef } from '../../schemas/refs/page-ref.schemas';\n\n/**\n * @wildo_source:part:start saas.website.page.context facet:layer:core facet:family:website\n *\n * `WebsitePageContext` — identity of the page currently rendering.\n * Provided by `<WebsitePageLayout pageRef=\"…\">` exactly once per\n * page render and consumed by `useWebsiteLabel(leaf)` to compose the\n * full label key (`website.{pageRef}.{sectionRef}.{leaf}`).\n *\n * **Why an isolated context (not merged into runtime)**: the runtime\n * context is set at the host-adapter boundary and is constant per\n * build; the page context is set per page route. Splitting them\n * lets a single host adapter render multiple pages (preview tooling,\n * MDX-driven blog index aggregating post excerpts, etc.) without\n * lying about which page each subtree belongs to.\n *\n * **Why the hook lives in a separate file**: same Fast-Refresh\n * rationale as `WebsiteRuntimeContext` — the context and its provider\n * component stay together here (`useContext` matches on object\n * identity), and only the hook is split out, into `useWebsitePage.ts`.\n */\nexport interface WebsitePageContextValue {\n /**\n * The validated `WebsitePageRef` of the page currently rendering.\n * MUST match a `WebsitePageManifest.pageRef` registered in the\n * site's `WebsiteRootConfig`.\n */\n pageRef: WebsitePageRef;\n}\n\nexport const WebsitePageContext: React.Context<WebsitePageContextValue | null> =\n createContext<WebsitePageContextValue | null>(null);\n\nexport interface WebsitePageContextProviderProps {\n value: WebsitePageContextValue;\n children: ReactNode;\n}\n\nexport function WebsitePageContextProvider({\n value,\n children,\n}: WebsitePageContextProviderProps): ReactNode {\n return (\n <WebsitePageContext.Provider value={value}>\n {children}\n </WebsitePageContext.Provider>\n );\n}\nWebsitePageContextProvider.displayName = 'WebsitePageContextProvider';\n/** @wildo_source:part:end saas.website.page.context */\n"]}
1
+ {"version":3,"file":"WebsitePageContext.js","sourceRoot":"","sources":["../../../../src/core/contexts/WebsitePageContext.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,aAAa,EAAkB,MAAM,OAAO,CAAC;AAiC7D,MAAM,CAAC,MAAM,kBAAkB,GAC7B,aAAa,CAAiC,IAAI,CAAC,CAAC;AAOtD,MAAM,UAAU,0BAA0B,CAAC,EACzC,KAAK,EACL,QAAQ,GACwB;IAChC,OAAO,CACL,KAAC,kBAAkB,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YACtC,QAAQ,GACmB,CAC/B,CAAC;AACJ,CAAC;AACD,0BAA0B,CAAC,WAAW,GAAG,4BAA4B,CAAC","sourcesContent":["import React, { createContext, type ReactNode } from 'react';\n\nimport type { WebsitePageRef } from '../../schemas/refs/page-ref.schemas';\n\n/**\n * @wildo_source:part:start saas.website.page.context facet:layer:core facet:family:website\n *\n * `WebsitePageContext` — identity of the page currently rendering.\n * Provided by `<WebsitePageLayout pageRef=\"…\">` exactly once per\n * page render and consumed by `useWebsiteLabel(leaf)` to compose the\n * full label key (`website.{pageRef}.{sectionRef}.{leaf}`).\n *\n * **Why an isolated context (not merged into runtime)**: the runtime\n * context is set at the host-adapter boundary and is constant per\n * build; the page context is set per page route. Splitting them\n * lets a single host adapter render multiple pages (preview tooling,\n * MDX-driven blog index aggregating post excerpts, etc.) without\n * lying about which page each subtree belongs to.\n *\n * **Why the hook lives in a separate file**: same Fast-Refresh\n * rationale as `WebsiteRuntimeContext` — the context and its provider\n * component stay together here (`useContext` matches on object\n * identity), and only the hook is split out, into `useWebsitePage.ts`.\n */\nexport interface WebsitePageContextValue {\n /**\n * The validated `WebsitePageRef` of the page currently rendering.\n * MUST match a `WebsitePageManifest.pageRef` registered in the\n * site's `WebsiteRootConfig`.\n */\n pageRef: WebsitePageRef;\n}\n\nexport const WebsitePageContext: React.Context<WebsitePageContextValue | null> =\n createContext<WebsitePageContextValue | null>(null);\n\nexport interface WebsitePageContextProviderProps {\n value: WebsitePageContextValue;\n children: ReactNode;\n}\n\nexport function WebsitePageContextProvider({\n value,\n children,\n}: WebsitePageContextProviderProps): ReactNode {\n return (\n <WebsitePageContext.Provider value={value}>\n {children}\n </WebsitePageContext.Provider>\n );\n}\nWebsitePageContextProvider.displayName = 'WebsitePageContextProvider';\n/** @wildo_source:part:end saas.website.page.context */\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"WebsiteRuntimeContext.d.ts","sourceRoot":"","sources":["../../../../../src/core/contexts/WebsiteRuntimeContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAiB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE7D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAE9E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kEAAkE,CAAC;AAC5G,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,0DAA0D,CAAC;AAChH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oDAAoD,CAAC;AAC1F,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,4DAA4D,CAAC;AAC1G,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+CAA+C,CAAC;AAE/E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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x"],"names":[],"mappings":";AAAA,OAAc,EAAE,aAAa,EAAkB,MAAM,OAAO,CAAC;AA0K7D;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAChC,aAAa,CAAoC,IAAI,CAAC,CAAC;AAOzD;;;;;GAKG;AACH,MAAM,UAAU,6BAA6B,CAAC,EAC5C,KAAK,EACL,QAAQ,GAC2B;IACnC,OAAO,CACL,KAAC,qBAAqB,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YACzC,QAAQ,GACsB,CAClC,CAAC;AACJ,CAAC;AACD,6BAA6B,CAAC,WAAW,GAAG,+BAA+B,CAAC","sourcesContent":["import React, { createContext, type ReactNode } from 'react';\n\nimport type { AvailableLanguage } from '@wildo-ai/saas-models/public-runtime';\n\nimport type { WebsiteDesignTokens } from '../../schemas/design-tokens/website-design-tokens.shared.schemas';\nimport type { FrontendWebsiteProviderRegistry } from '../external-providers/frontend-provider-registry.website';\nimport type { WebsiteLabelKey } from '../../schemas/label-keys/website-label-key.schemas';\nimport type { WebsiteNavigationConfig } from '../../schemas/manifests/website-root-config.shared.schemas';\nimport type { LabelPack } from '../../schemas/validators/label-pack.validator';\n\n/**\n * @wildo_source:part:start saas.website.runtime.context facet:layer:core facet:family:website\n *\n * `WebsiteRuntimeContext` — site-wide runtime state for the marketing\n * surface. Created **once per page render** by the host adapter\n * (Phase 5 `WebsitePageBridge.astro` reads `WebsiteRootConfig` and the\n * resolved label pack from disk and calls\n * `<WebsiteRuntimeContextProvider value={…}>` around the page tree).\n *\n * **Why \"runtime\" and not \"config\"**: the values here are the\n * locale-resolved subset of `WebsiteRootConfig` — only the active\n * locale's label pack travels with the React tree (the other locales\n * live in their own per-locale static builds). A `*Config` name would\n * suggest the full multi-locale surface is in scope.\n *\n * **Three pieces of state**:\n *\n * - `locale` — the currently-rendering locale. Sections that need\n * locale-aware formatting (number/date in marketing copy is rare\n * but legitimate) read it via `useWebsiteRuntime()`.\n * - `labelPack` — the locale-resolved flat key→string map, validated\n * against the manifest by `validateLabelPackAgainstManifest` at\n * build start. Consumed by `useWebsiteLabel` and\n * `useWebsiteLabelByKey`.\n * - `designTokens` — the `WebsiteDesignTokens` from\n * `WebsiteRootConfig.designTokens`. Consumed by\n * `useWebsiteDesignTokens` and by the Phase 5 CSS emitter that\n * materializes them as `--website-*` custom properties on the\n * `<WebsitePageLayout>` root.\n * - `navigation` — the `WebsiteNavigationConfig` from\n * `WebsiteRootConfig.navigation`. Carried in the runtime context\n * (rather than as a separate `WebsiteNavigationContext`) because\n * `<WebsitePageLayout>` already reads runtime state and\n * header/footer slots are inseparable from \"the site is rendering\n * right now\". A second context for two component refs would split\n * the host-adapter's wiring surface without buying isolation.\n * - `frontendProviderRegistry` — optional website-facing public provider\n * registry hydrated from the materialized provider artifact for the\n * concrete `STATIC_WEBSITE` service. This keeps analytics / captcha /\n * browser-monitoring integrations on the same frontend-provider\n * contract the SaaS app now uses, instead of inventing a website-only\n * metadata seam.\n *\n * **Why the hook lives in a separate file**: React Fast Refresh only\n * preserves state for a module whose every export is a component, so\n * a module mixing components with plain functions loses its HMR\n * boundary. This file holds the two things that must be identical\n * objects at runtime — the context and the provider component that\n * writes it — while `useWebsiteRuntime` sits alone in\n * `useWebsiteRuntime.ts`. A section author editing a component that\n * merely READS the runtime therefore never remounts the provider.\n *\n * Until 2026-09-09 this paragraph described a different arrangement:\n * that only the bare context was kept here and the provider lived in\n * a file of its own. No such file has ever existed — the provider is\n * exported below — and splitting it out would be the wrong shape\n * anyway, since `useContext` matches on object identity.\n * prose-referent-waiver: the retired file name is quoted only to retire it.\n * The claim named `WebsiteRuntimeContextProvider.tsx`.\n */\nexport interface WebsiteRuntimeContextValue {\n /**\n * The currently-rendering locale. Marketing-site routing emits one\n * static build per locale (D8), so this value is constant per build\n * — never re-renders mid-session.\n */\n locale: AvailableLanguage;\n /**\n * The site's default locale (mirrors `WebsiteRootConfig.defaultLocale`).\n * Carried in the runtime context so client-tier components — namely\n * `WebsiteInternalLink` (Phase 6 fix H-β) — can compute the correct\n * locale-prefixed pathname (`/pricing` on the EN site,\n * `/fr/pricing` on the FR site) without re-importing the root\n * config. Plumbing it through the runtime keeps the routing rule\n * a framework-internal concern: section authors NEVER hand-prefix\n * paths.\n */\n defaultLocale: AvailableLanguage;\n /**\n * Origin of the application this marketing site sends visitors INTO — the\n * marketing → product handoff target, authored once as\n * `WildoMarketingWebsiteConfig.appOrigin` (#493).\n *\n * Carried here for exactly the reason `defaultLocale` above is: a\n * `wildo.website.config.ts` is Node-loaded and therefore invisible to a\n * client island, so before this a site resolved the app origin a SECOND\n * time from a public build-time environment variable it could read in the\n * browser — one host authored twice, in two files, with no mechanical link\n * between the copies. That is how a marketing site comes to point at the\n * wrong environment: a defect nobody notices until a customer follows the\n * link.\n *\n * Threading it through the runtime keeps the handoff a framework-internal\n * concern, the same way threading `defaultLocale` kept locale-prefixing one:\n * section authors never hand-assemble the product URL, and there is one\n * place to change it.\n */\n appOrigin?: string;\n /**\n * Flat `Record<string, string>` label pack for the active locale.\n * Lookup keys MUST be fully-composed `website.<page>.<section>.<slot>`\n * strings; consumers that hold leaf paths use `useWebsiteLabel(leaf)`\n * which composes the full key against the page+section context.\n */\n labelPack: LabelPack;\n /**\n * Design-token bundle for the active site. Same object referenced\n * by `WebsiteRootConfig.designTokens`; passed by reference (not\n * cloned) so token-aware components can rely on referential\n * stability across renders.\n */\n designTokens: WebsiteDesignTokens;\n /**\n * Site-wide navigation slot bindings (header / footer components).\n * Same object referenced by `WebsiteRootConfig.navigation`. Read\n * by `<WebsitePageLayout>` to render the chrome around each page's\n * `<main>` content; per-page `header` / `footer` props on\n * `<WebsitePageLayout>` override these defaults.\n */\n navigation: WebsiteNavigationConfig;\n /**\n * Fully-composed label key the framework reads to render the\n * \"Skip to main content\" affordance as the FIRST focusable element\n * on every page (Phase 6 third audit fix M-α). Mirrors\n * `WebsiteRootConfig.skipToMainContentLabelKey`. Carried in the\n * runtime context (NOT re-derived from the root config inside\n * `WebsitePageLayout`) for two reasons:\n * - The layout is a client-tier React component; it cannot import\n * the consumer's `WEBSITE_ROOT_CONFIG` symbol without dragging\n * server-only code (manifest registry, page components) into\n * the client bundle.\n * - Threading the key through the runtime keeps the layout's\n * contract symmetric with how every other localized text on the\n * page is sourced (label pack + key), so the skip link is\n * translated automatically without any per-locale branching.\n */\n skipToMainContentLabelKey: WebsiteLabelKey;\n /**\n * Website-facing public providers for the active static website\n * service. Optional so older tests and provider-free sites can omit\n * it, but when present it is the canonical frontend-safe provider\n * catalog for analytics / captcha / browser-monitoring slices.\n */\n frontendProviderRegistry?: FrontendWebsiteProviderRegistry;\n /**\n * Backend API origin (WITHOUT a trailing slash) that anonymous-capture\n * sections POST to when constructing a `WebsiteAnonymousSessionClient`\n * (lead / draft-note forms). Sourced from\n * `WildoMarketingWebsiteConfig.apiOrigin` and passed as a\n * JSON-serializable island prop (the `.astro` page resolves the\n * per-environment value and forwards it).\n *\n * Optional because only pages that host an anonymous-capture section\n * need it — brochure pages omit it. A capture section that reads\n * `undefined` here surfaces a loud misconfiguration rather than\n * silently failing to submit.\n */\n apiOrigin?: string;\n}\n\n/**\n * Bare React context. Default `null` — `useWebsiteRuntime()` throws\n * with a clear error message when invoked outside of\n * `<WebsiteRuntimeContextProvider>`. The defensive throw is preferred\n * over a silent default value so a missing provider is detected at\n * the first hook call rather than at render time when a missing\n * label silently renders as the key string.\n */\nexport const WebsiteRuntimeContext: React.Context<WebsiteRuntimeContextValue | null> =\n createContext<WebsiteRuntimeContextValue | null>(null);\n\nexport interface WebsiteRuntimeContextProviderProps {\n value: WebsiteRuntimeContextValue;\n children: ReactNode;\n}\n\n/**\n * Provider component. Authored as a thin wrapper so consumers do NOT\n * have to import `WebsiteRuntimeContext.Provider` directly — the\n * provider component carries the documented authoring API and is the\n * Fast-Refresh-stable surface section authors compose against.\n */\nexport function WebsiteRuntimeContextProvider({\n value,\n children,\n}: WebsiteRuntimeContextProviderProps): ReactNode {\n return (\n <WebsiteRuntimeContext.Provider value={value}>\n {children}\n </WebsiteRuntimeContext.Provider>\n );\n}\nWebsiteRuntimeContextProvider.displayName = 'WebsiteRuntimeContextProvider';\n/** @wildo_source:part:end saas.website.runtime.context */\n"]}
1
+ {"version":3,"file":"WebsiteRuntimeContext.js","sourceRoot":"","sources":["../../../../src/core/contexts/WebsiteRuntimeContext.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,aAAa,EAAkB,MAAM,OAAO,CAAC;AA0K7D;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAChC,aAAa,CAAoC,IAAI,CAAC,CAAC;AAOzD;;;;;GAKG;AACH,MAAM,UAAU,6BAA6B,CAAC,EAC5C,KAAK,EACL,QAAQ,GAC2B;IACnC,OAAO,CACL,KAAC,qBAAqB,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YACzC,QAAQ,GACsB,CAClC,CAAC;AACJ,CAAC;AACD,6BAA6B,CAAC,WAAW,GAAG,+BAA+B,CAAC","sourcesContent":["import React, { createContext, type ReactNode } from 'react';\n\nimport type { AvailableLanguage } from '@wildo-ai/saas-models/public-runtime';\n\nimport type { WebsiteDesignTokens } from '../../schemas/design-tokens/website-design-tokens.shared.schemas';\nimport type { FrontendWebsiteProviderRegistry } from '../external-providers/frontend-provider-registry.website';\nimport type { WebsiteLabelKey } from '../../schemas/label-keys/website-label-key.schemas';\nimport type { WebsiteNavigationConfig } from '../../schemas/manifests/website-root-config.shared.schemas';\nimport type { LabelPack } from '../../schemas/validators/label-pack.validator';\n\n/**\n * @wildo_source:part:start saas.website.runtime.context facet:layer:core facet:family:website\n *\n * `WebsiteRuntimeContext` — site-wide runtime state for the marketing\n * surface. Created **once per page render** by the host adapter\n * (Phase 5 `WebsitePageBridge.astro` reads `WebsiteRootConfig` and the\n * resolved label pack from disk and calls\n * `<WebsiteRuntimeContextProvider value={…}>` around the page tree).\n *\n * **Why \"runtime\" and not \"config\"**: the values here are the\n * locale-resolved subset of `WebsiteRootConfig` — only the active\n * locale's label pack travels with the React tree (the other locales\n * live in their own per-locale static builds). A `*Config` name would\n * suggest the full multi-locale surface is in scope.\n *\n * **Three pieces of state**:\n *\n * - `locale` — the currently-rendering locale. Sections that need\n * locale-aware formatting (number/date in marketing copy is rare\n * but legitimate) read it via `useWebsiteRuntime()`.\n * - `labelPack` — the locale-resolved flat key→string map, validated\n * against the manifest by `validateLabelPackAgainstManifest` at\n * build start. Consumed by `useWebsiteLabel` and\n * `useWebsiteLabelByKey`.\n * - `designTokens` — the `WebsiteDesignTokens` from\n * `WebsiteRootConfig.designTokens`. Consumed by\n * `useWebsiteDesignTokens` and by the Phase 5 CSS emitter that\n * materializes them as `--website-*` custom properties on the\n * `<WebsitePageLayout>` root.\n * - `navigation` — the `WebsiteNavigationConfig` from\n * `WebsiteRootConfig.navigation`. Carried in the runtime context\n * (rather than as a separate `WebsiteNavigationContext`) because\n * `<WebsitePageLayout>` already reads runtime state and\n * header/footer slots are inseparable from \"the site is rendering\n * right now\". A second context for two component refs would split\n * the host-adapter's wiring surface without buying isolation.\n * - `frontendProviderRegistry` — optional website-facing public provider\n * registry hydrated from the materialized provider artifact for the\n * concrete `STATIC_WEBSITE` service. This keeps analytics / captcha /\n * browser-monitoring integrations on the same frontend-provider\n * contract the SaaS app now uses, instead of inventing a website-only\n * metadata seam.\n *\n * **Why the hook lives in a separate file**: React Fast Refresh only\n * preserves state for a module whose every export is a component, so\n * a module mixing components with plain functions loses its HMR\n * boundary. This file holds the two things that must be identical\n * objects at runtime — the context and the provider component that\n * writes it — while `useWebsiteRuntime` sits alone in\n * `useWebsiteRuntime.ts`. A section author editing a component that\n * merely READS the runtime therefore never remounts the provider.\n *\n * Until 2026-09-09 this paragraph described a different arrangement:\n * that only the bare context was kept here and the provider lived in\n * a file of its own. No such file has ever existed — the provider is\n * exported below — and splitting it out would be the wrong shape\n * anyway, since `useContext` matches on object identity.\n * prose-referent-waiver: the retired file name is quoted only to retire it.\n * The claim named `WebsiteRuntimeContextProvider.tsx`.\n */\nexport interface WebsiteRuntimeContextValue {\n /**\n * The currently-rendering locale. Marketing-site routing emits one\n * static build per locale (D8), so this value is constant per build\n * — never re-renders mid-session.\n */\n locale: AvailableLanguage;\n /**\n * The site's default locale (mirrors `WebsiteRootConfig.defaultLocale`).\n * Carried in the runtime context so client-tier components — namely\n * `WebsiteInternalLink` (Phase 6 fix H-β) — can compute the correct\n * locale-prefixed pathname (`/pricing` on the EN site,\n * `/fr/pricing` on the FR site) without re-importing the root\n * config. Plumbing it through the runtime keeps the routing rule\n * a framework-internal concern: section authors NEVER hand-prefix\n * paths.\n */\n defaultLocale: AvailableLanguage;\n /**\n * Origin of the application this marketing site sends visitors INTO — the\n * marketing → product handoff target, authored once as\n * `WildoMarketingWebsiteConfig.appOrigin` (#493).\n *\n * Carried here for exactly the reason `defaultLocale` above is: a\n * `wildo.website.config.ts` is Node-loaded and therefore invisible to a\n * client island, so before this a site resolved the app origin a SECOND\n * time from a public build-time environment variable it could read in the\n * browser — one host authored twice, in two files, with no mechanical link\n * between the copies. That is how a marketing site comes to point at the\n * wrong environment: a defect nobody notices until a customer follows the\n * link.\n *\n * Threading it through the runtime keeps the handoff a framework-internal\n * concern, the same way threading `defaultLocale` kept locale-prefixing one:\n * section authors never hand-assemble the product URL, and there is one\n * place to change it.\n */\n appOrigin?: string;\n /**\n * Flat `Record<string, string>` label pack for the active locale.\n * Lookup keys MUST be fully-composed `website.<page>.<section>.<slot>`\n * strings; consumers that hold leaf paths use `useWebsiteLabel(leaf)`\n * which composes the full key against the page+section context.\n */\n labelPack: LabelPack;\n /**\n * Design-token bundle for the active site. Same object referenced\n * by `WebsiteRootConfig.designTokens`; passed by reference (not\n * cloned) so token-aware components can rely on referential\n * stability across renders.\n */\n designTokens: WebsiteDesignTokens;\n /**\n * Site-wide navigation slot bindings (header / footer components).\n * Same object referenced by `WebsiteRootConfig.navigation`. Read\n * by `<WebsitePageLayout>` to render the chrome around each page's\n * `<main>` content; per-page `header` / `footer` props on\n * `<WebsitePageLayout>` override these defaults.\n */\n navigation: WebsiteNavigationConfig;\n /**\n * Fully-composed label key the framework reads to render the\n * \"Skip to main content\" affordance as the FIRST focusable element\n * on every page (Phase 6 third audit fix M-α). Mirrors\n * `WebsiteRootConfig.skipToMainContentLabelKey`. Carried in the\n * runtime context (NOT re-derived from the root config inside\n * `WebsitePageLayout`) for two reasons:\n * - The layout is a client-tier React component; it cannot import\n * the consumer's `WEBSITE_ROOT_CONFIG` symbol without dragging\n * server-only code (manifest registry, page components) into\n * the client bundle.\n * - Threading the key through the runtime keeps the layout's\n * contract symmetric with how every other localized text on the\n * page is sourced (label pack + key), so the skip link is\n * translated automatically without any per-locale branching.\n */\n skipToMainContentLabelKey: WebsiteLabelKey;\n /**\n * Website-facing public providers for the active static website\n * service. Optional so older tests and provider-free sites can omit\n * it, but when present it is the canonical frontend-safe provider\n * catalog for analytics / captcha / browser-monitoring slices.\n */\n frontendProviderRegistry?: FrontendWebsiteProviderRegistry;\n /**\n * Backend API origin (WITHOUT a trailing slash) that anonymous-capture\n * sections POST to when constructing a `WebsiteAnonymousSessionClient`\n * (lead / draft-note forms). Sourced from\n * `WildoMarketingWebsiteConfig.apiOrigin` and passed as a\n * JSON-serializable island prop (the `.astro` page resolves the\n * per-environment value and forwards it).\n *\n * Optional because only pages that host an anonymous-capture section\n * need it — brochure pages omit it. A capture section that reads\n * `undefined` here surfaces a loud misconfiguration rather than\n * silently failing to submit.\n */\n apiOrigin?: string;\n}\n\n/**\n * Bare React context. Default `null` — `useWebsiteRuntime()` throws\n * with a clear error message when invoked outside of\n * `<WebsiteRuntimeContextProvider>`. The defensive throw is preferred\n * over a silent default value so a missing provider is detected at\n * the first hook call rather than at render time when a missing\n * label silently renders as the key string.\n */\nexport const WebsiteRuntimeContext: React.Context<WebsiteRuntimeContextValue | null> =\n createContext<WebsiteRuntimeContextValue | null>(null);\n\nexport interface WebsiteRuntimeContextProviderProps {\n value: WebsiteRuntimeContextValue;\n children: ReactNode;\n}\n\n/**\n * Provider component. Authored as a thin wrapper so consumers do NOT\n * have to import `WebsiteRuntimeContext.Provider` directly — the\n * provider component carries the documented authoring API and is the\n * Fast-Refresh-stable surface section authors compose against.\n */\nexport function WebsiteRuntimeContextProvider({\n value,\n children,\n}: WebsiteRuntimeContextProviderProps): ReactNode {\n return (\n <WebsiteRuntimeContext.Provider value={value}>\n {children}\n </WebsiteRuntimeContext.Provider>\n );\n}\nWebsiteRuntimeContextProvider.displayName = 'WebsiteRuntimeContextProvider';\n/** @wildo_source:part:end saas.website.runtime.context */\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"WebsiteSectionContext.d.ts","sourceRoot":"","sources":["../../../../../src/core/contexts/WebsiteSectionContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAiB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE7D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wDAAwD,CAAC;AACrG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAEhF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,WAAW,0BAA0B;IACzC;;;OAGG;IACH,UAAU,EAAE,iBAAiB,CAAC;IAC9B;;;;;OAKG;IACH,QAAQ,EAAE,sBAAsB,CAAC;CAClC;AAED,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,OAAO,CAAC,0BAA0B,GAAG,IAAI,CAC3B,CAAC;AAEzD,MAAM,WAAW,kCAAkC;IACjD,KAAK,EAAE,0BAA0B,CAAC;IAClC,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,6BAA6B,CAAC,EAC5C,KAAK,EACL,QAAQ,GACT,EAAE,kCAAkC,GAAG,SAAS,CAMhD;yBATe,6BAA6B;;;AAW7C,0DAA0D"}
1
+ {"version":3,"file":"WebsiteSectionContext.d.ts","sourceRoot":"","sources":["../../../../src/core/contexts/WebsiteSectionContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAiB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE7D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wDAAwD,CAAC;AACrG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAEhF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,WAAW,0BAA0B;IACzC;;;OAGG;IACH,UAAU,EAAE,iBAAiB,CAAC;IAC9B;;;;;OAKG;IACH,QAAQ,EAAE,sBAAsB,CAAC;CAClC;AAED,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,OAAO,CAAC,0BAA0B,GAAG,IAAI,CAC3B,CAAC;AAEzD,MAAM,WAAW,kCAAkC;IACjD,KAAK,EAAE,0BAA0B,CAAC;IAClC,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,6BAA6B,CAAC,EAC5C,KAAK,EACL,QAAQ,GACT,EAAE,kCAAkC,GAAG,SAAS,CAMhD;yBATe,6BAA6B;;;AAW7C,0DAA0D"}
@@ -1 +1 @@
1
- {"version":3,"file":"WebsiteSectionContext.js","sourceRoot":"","sources":["../../../../../src/core/contexts/WebsiteSectionContext.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,aAAa,EAAkB,MAAM,OAAO,CAAC;AAwC7D,MAAM,CAAC,MAAM,qBAAqB,GAChC,aAAa,CAAoC,IAAI,CAAC,CAAC;AAOzD,MAAM,UAAU,6BAA6B,CAAC,EAC5C,KAAK,EACL,QAAQ,GAC2B;IACnC,OAAO,CACL,KAAC,qBAAqB,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YACzC,QAAQ,GACsB,CAClC,CAAC;AACJ,CAAC;AACD,6BAA6B,CAAC,WAAW,GAAG,+BAA+B,CAAC","sourcesContent":["import React, { createContext, type ReactNode } from 'react';\n\nimport type { WebsiteSectionCategory } from '../../schemas/sections/website-section-category.shared';\nimport type { WebsiteSectionRef } from '../../schemas/refs/section-ref.schemas';\n\n/**\n * @wildo_source:part:start saas.website.section.context facet:layer:core facet:family:website\n *\n * `WebsiteSectionContext` — identity + metadata of the section\n * currently rendering. Provided by `<WebsiteSection>` and consumed\n * by `useWebsiteLabel(leaf)` to compose the full label key, by\n * analytics overlays that need the category, and by SEO emitters\n * that decorate sections with `data-*` attributes.\n *\n * **Why expose `category` here (not just `sectionRef`)**: the\n * category is the section's semantic role (`hero`, `cta`, `social`,\n * etc.) and is needed by overlay tooling and analytics consumers\n * that don't know the per-site `sectionRef` vocabulary. Bundling\n * both saves consumers from having to thread the manifest just to\n * map a ref back to its category.\n *\n * **Why the hook lives in a separate file**: same Fast-Refresh\n * rationale as the runtime + page contexts — context and provider\n * together here, the hook alone in `useWebsiteSection.ts`.\n */\nexport interface WebsiteSectionContextValue {\n /**\n * The validated `WebsiteSectionRef` of the section currently\n * rendering. Composed by `useWebsiteLabel(leaf)` into the full key.\n */\n sectionRef: WebsiteSectionRef;\n /**\n * The semantic category of the section (`hero` / `cta` / etc.).\n * Sourced from the matching `WebsiteSectionDefinition.category`\n * by the host adapter and surfaced here so analytics + SEO\n * tooling does not need to re-resolve it.\n */\n category: WebsiteSectionCategory;\n}\n\nexport const WebsiteSectionContext: React.Context<WebsiteSectionContextValue | null> =\n createContext<WebsiteSectionContextValue | null>(null);\n\nexport interface WebsiteSectionContextProviderProps {\n value: WebsiteSectionContextValue;\n children: ReactNode;\n}\n\nexport function WebsiteSectionContextProvider({\n value,\n children,\n}: WebsiteSectionContextProviderProps): ReactNode {\n return (\n <WebsiteSectionContext.Provider value={value}>\n {children}\n </WebsiteSectionContext.Provider>\n );\n}\nWebsiteSectionContextProvider.displayName = 'WebsiteSectionContextProvider';\n/** @wildo_source:part:end saas.website.section.context */\n"]}
1
+ {"version":3,"file":"WebsiteSectionContext.js","sourceRoot":"","sources":["../../../../src/core/contexts/WebsiteSectionContext.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,aAAa,EAAkB,MAAM,OAAO,CAAC;AAwC7D,MAAM,CAAC,MAAM,qBAAqB,GAChC,aAAa,CAAoC,IAAI,CAAC,CAAC;AAOzD,MAAM,UAAU,6BAA6B,CAAC,EAC5C,KAAK,EACL,QAAQ,GAC2B;IACnC,OAAO,CACL,KAAC,qBAAqB,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YACzC,QAAQ,GACsB,CAClC,CAAC;AACJ,CAAC;AACD,6BAA6B,CAAC,WAAW,GAAG,+BAA+B,CAAC","sourcesContent":["import React, { createContext, type ReactNode } from 'react';\n\nimport type { WebsiteSectionCategory } from '../../schemas/sections/website-section-category.shared';\nimport type { WebsiteSectionRef } from '../../schemas/refs/section-ref.schemas';\n\n/**\n * @wildo_source:part:start saas.website.section.context facet:layer:core facet:family:website\n *\n * `WebsiteSectionContext` — identity + metadata of the section\n * currently rendering. Provided by `<WebsiteSection>` and consumed\n * by `useWebsiteLabel(leaf)` to compose the full label key, by\n * analytics overlays that need the category, and by SEO emitters\n * that decorate sections with `data-*` attributes.\n *\n * **Why expose `category` here (not just `sectionRef`)**: the\n * category is the section's semantic role (`hero`, `cta`, `social`,\n * etc.) and is needed by overlay tooling and analytics consumers\n * that don't know the per-site `sectionRef` vocabulary. Bundling\n * both saves consumers from having to thread the manifest just to\n * map a ref back to its category.\n *\n * **Why the hook lives in a separate file**: same Fast-Refresh\n * rationale as the runtime + page contexts — context and provider\n * together here, the hook alone in `useWebsiteSection.ts`.\n */\nexport interface WebsiteSectionContextValue {\n /**\n * The validated `WebsiteSectionRef` of the section currently\n * rendering. Composed by `useWebsiteLabel(leaf)` into the full key.\n */\n sectionRef: WebsiteSectionRef;\n /**\n * The semantic category of the section (`hero` / `cta` / etc.).\n * Sourced from the matching `WebsiteSectionDefinition.category`\n * by the host adapter and surfaced here so analytics + SEO\n * tooling does not need to re-resolve it.\n */\n category: WebsiteSectionCategory;\n}\n\nexport const WebsiteSectionContext: React.Context<WebsiteSectionContextValue | null> =\n createContext<WebsiteSectionContextValue | null>(null);\n\nexport interface WebsiteSectionContextProviderProps {\n value: WebsiteSectionContextValue;\n children: ReactNode;\n}\n\nexport function WebsiteSectionContextProvider({\n value,\n children,\n}: WebsiteSectionContextProviderProps): ReactNode {\n return (\n <WebsiteSectionContext.Provider value={value}>\n {children}\n </WebsiteSectionContext.Provider>\n );\n}\nWebsiteSectionContextProvider.displayName = 'WebsiteSectionContextProvider';\n/** @wildo_source:part:end saas.website.section.context */\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"useWebsitePage.d.ts","sourceRoot":"","sources":["../../../../../src/core/contexts/useWebsitePage.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,uBAAuB,EAC7B,MAAM,sBAAsB,CAAC;AAE9B;;;;;;;;GAQG;AACH,wBAAgB,cAAc,IAAI,uBAAuB,CAUxD;AACD,wDAAwD"}
1
+ {"version":3,"file":"useWebsitePage.d.ts","sourceRoot":"","sources":["../../../../src/core/contexts/useWebsitePage.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,uBAAuB,EAC7B,MAAM,sBAAsB,CAAC;AAE9B;;;;;;;;GAQG;AACH,wBAAgB,cAAc,IAAI,uBAAuB,CAUxD;AACD,wDAAwD"}
@@ -1 +1 @@
1
- {"version":3,"file":"useWebsiteRuntime.d.ts","sourceRoot":"","sources":["../../../../../src/core/contexts/useWebsiteRuntime.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,0BAA0B,EAChC,MAAM,yBAAyB,CAAC;AAEjC;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,IAAI,0BAA0B,CAU9D;AACD,2DAA2D"}
1
+ {"version":3,"file":"useWebsiteRuntime.d.ts","sourceRoot":"","sources":["../../../../src/core/contexts/useWebsiteRuntime.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,0BAA0B,EAChC,MAAM,yBAAyB,CAAC;AAEjC;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,IAAI,0BAA0B,CAU9D;AACD,2DAA2D"}
@@ -1 +1 @@
1
- {"version":3,"file":"useWebsiteSection.d.ts","sourceRoot":"","sources":["../../../../../src/core/contexts/useWebsiteSection.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,0BAA0B,EAChC,MAAM,yBAAyB,CAAC;AAEjC;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,IAAI,0BAA0B,CAW9D;AACD,2DAA2D"}
1
+ {"version":3,"file":"useWebsiteSection.d.ts","sourceRoot":"","sources":["../../../../src/core/contexts/useWebsiteSection.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,0BAA0B,EAChC,MAAM,yBAAyB,CAAC;AAEjC;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,IAAI,0BAA0B,CAW9D;AACD,2DAA2D"}
@@ -1 +1 @@
1
- {"version":3,"file":"frontend-provider-registry.website.d.ts","sourceRoot":"","sources":["../../../../../src/core/external-providers/frontend-provider-registry.website.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAEL,KAAK,+BAA+B,EACrC,MAAM,8CAA8C,CAAC;AACtD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AACnF,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,8CAA8C,CAAC;AAExG,YAAY,EACV,6BAA6B,EAC7B,0BAA0B,EAC1B,+BAA+B,EAC/B,+BAA+B,GAChC,MAAM,8CAA8C,CAAC;AAEtD,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,8CAA8C,CAAC;AAEpG,MAAM,WAAW,0CAA0C;IACzD,yEAAyE;IACzE,QAAQ,CAAC,OAAO,CAAC,EAAE,sBAAsB,CAAC;IAC1C;;;;OAIG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,+BAA+B,CAAC;IACnD,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC,UAAU,EAAE,mCAAmC,KAAK,IAAI,CAAC;CACnF;AAED;;GAEG;AACH,wBAAgB,qCAAqC,CACnD,KAAK,CAAC,EAAE,0CAA0C,GACjD,+BAA+B,CAMjC"}
1
+ {"version":3,"file":"frontend-provider-registry.website.d.ts","sourceRoot":"","sources":["../../../../src/core/external-providers/frontend-provider-registry.website.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAEL,KAAK,+BAA+B,EACrC,MAAM,8CAA8C,CAAC;AACtD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AACnF,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,8CAA8C,CAAC;AAExG,YAAY,EACV,6BAA6B,EAC7B,0BAA0B,EAC1B,+BAA+B,EAC/B,+BAA+B,GAChC,MAAM,8CAA8C,CAAC;AAEtD,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,8CAA8C,CAAC;AAEpG,MAAM,WAAW,0CAA0C;IACzD,yEAAyE;IACzE,QAAQ,CAAC,OAAO,CAAC,EAAE,sBAAsB,CAAC;IAC1C;;;;OAIG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,+BAA+B,CAAC;IACnD,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC,UAAU,EAAE,mCAAmC,KAAK,IAAI,CAAC;CACnF;AAED;;GAEG;AACH,wBAAgB,qCAAqC,CACnD,KAAK,CAAC,EAAE,0CAA0C,GACjD,+BAA+B,CAMjC"}
@@ -1 +1 @@
1
- {"version":3,"file":"frontend-provider-registry.website.js","sourceRoot":"","sources":["../../../../../src/core/external-providers/frontend-provider-registry.website.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EACL,uCAAuC,GAExC,MAAM,8CAA8C,CAAC;AAyBtD;;GAEG;AACH,MAAM,UAAU,qCAAqC,CACnD,KAAkD;IAElD,OAAO,uCAAuC,CAAC;QAC7C,OAAO,EAAE,KAAK,EAAE,OAAO;QACvB,OAAO,EAAE,KAAK,EAAE,OAAO;QACvB,YAAY,EAAE,KAAK,EAAE,YAAY;KAClC,CAAC,CAAC;AACL,CAAC","sourcesContent":["/**\n * The website's provider registry — now composed from BOTH channels.\n *\n * It used to build itself by casting each served `FrontendProviderEntry` to a\n * module type that was an alias of that entry, which made the cast true and\n * useless: the registry could never hold anything a JSON payload could not\n * carry, so a provider's SDK loader had nowhere to arrive.\n *\n * - **DATA** — the materialized frontend-services block for THIS website\n * service. Authoritative for which providers are on, in this environment.\n * - **CODE** — `generatedFrontendProviderModules` from the website's own\n * `src/generated/frontend-providers.generated.ts`, written by\n * `wildo config sync` and handed in by the Astro bridge.\n *\n * The types are now the engine's own website-facet types rather than local\n * aliases, so a provider module authored against\n * `@wildo-ai/external-connectors-public/website` is the same type this registry\n * holds. Re-exported under the same names so every consumer's import is\n * unchanged.\n */\n\nimport {\n composeHydratedFrontendWebsiteProviders,\n type GeneratedWebsiteProviderModules,\n} from '@wildo-ai/external-connectors-public/website';\nimport type { FrontendProvidersBlock } from '@wildo-ai/saas-models/public-runtime';\nimport type { FrontendProviderHydrationDiagnostic } from '@wildo-ai/external-connectors-public/website';\n\nexport type {\n FrontendWebsiteProviderModule,\n FrontendWebsiteProviderRef,\n FrontendWebsiteProviderRegistry,\n GeneratedWebsiteProviderModules,\n} from '@wildo-ai/external-connectors-public/website';\n\nimport type { FrontendWebsiteProviderRegistry } from '@wildo-ai/external-connectors-public/website';\n\nexport interface CreateFrontendWebsiteProviderRegistryInput {\n /** The DATA channel: the materialized block for this website service. */\n readonly entries?: FrontendProvidersBlock;\n /**\n * The CODE channel. Absent is the ordinary case for a website that declares\n * no package-shipped provider — `wildo config sync` writes no generated file,\n * so there is nothing to import and nothing to pass.\n */\n readonly modules?: GeneratedWebsiteProviderModules;\n readonly onDiagnostic?: (diagnostic: FrontendProviderHydrationDiagnostic) => void;\n}\n\n/**\n * Website-side public-provider registry, hydrated from both channels.\n */\nexport function createFrontendWebsiteProviderRegistry(\n input?: CreateFrontendWebsiteProviderRegistryInput,\n): FrontendWebsiteProviderRegistry {\n return composeHydratedFrontendWebsiteProviders({\n entries: input?.entries,\n modules: input?.modules,\n onDiagnostic: input?.onDiagnostic,\n });\n}\n"]}
1
+ {"version":3,"file":"frontend-provider-registry.website.js","sourceRoot":"","sources":["../../../../src/core/external-providers/frontend-provider-registry.website.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EACL,uCAAuC,GAExC,MAAM,8CAA8C,CAAC;AAyBtD;;GAEG;AACH,MAAM,UAAU,qCAAqC,CACnD,KAAkD;IAElD,OAAO,uCAAuC,CAAC;QAC7C,OAAO,EAAE,KAAK,EAAE,OAAO;QACvB,OAAO,EAAE,KAAK,EAAE,OAAO;QACvB,YAAY,EAAE,KAAK,EAAE,YAAY;KAClC,CAAC,CAAC;AACL,CAAC","sourcesContent":["/**\n * The website's provider registry — now composed from BOTH channels.\n *\n * It used to build itself by casting each served `FrontendProviderEntry` to a\n * module type that was an alias of that entry, which made the cast true and\n * useless: the registry could never hold anything a JSON payload could not\n * carry, so a provider's SDK loader had nowhere to arrive.\n *\n * - **DATA** — the materialized frontend-services block for THIS website\n * service. Authoritative for which providers are on, in this environment.\n * - **CODE** — `generatedFrontendProviderModules` from the website's own\n * `src/generated/frontend-providers.generated.ts`, written by\n * `wildo config sync` and handed in by the Astro bridge.\n *\n * The types are now the engine's own website-facet types rather than local\n * aliases, so a provider module authored against\n * `@wildo-ai/external-connectors-public/website` is the same type this registry\n * holds. Re-exported under the same names so every consumer's import is\n * unchanged.\n */\n\nimport {\n composeHydratedFrontendWebsiteProviders,\n type GeneratedWebsiteProviderModules,\n} from '@wildo-ai/external-connectors-public/website';\nimport type { FrontendProvidersBlock } from '@wildo-ai/saas-models/public-runtime';\nimport type { FrontendProviderHydrationDiagnostic } from '@wildo-ai/external-connectors-public/website';\n\nexport type {\n FrontendWebsiteProviderModule,\n FrontendWebsiteProviderRef,\n FrontendWebsiteProviderRegistry,\n GeneratedWebsiteProviderModules,\n} from '@wildo-ai/external-connectors-public/website';\n\nimport type { FrontendWebsiteProviderRegistry } from '@wildo-ai/external-connectors-public/website';\n\nexport interface CreateFrontendWebsiteProviderRegistryInput {\n /** The DATA channel: the materialized block for this website service. */\n readonly entries?: FrontendProvidersBlock;\n /**\n * The CODE channel. Absent is the ordinary case for a website that declares\n * no package-shipped provider — `wildo config sync` writes no generated file,\n * so there is nothing to import and nothing to pass.\n */\n readonly modules?: GeneratedWebsiteProviderModules;\n readonly onDiagnostic?: (diagnostic: FrontendProviderHydrationDiagnostic) => void;\n}\n\n/**\n * Website-side public-provider registry, hydrated from both channels.\n */\nexport function createFrontendWebsiteProviderRegistry(\n input?: CreateFrontendWebsiteProviderRegistryInput,\n): FrontendWebsiteProviderRegistry {\n return composeHydratedFrontendWebsiteProviders({\n entries: input?.entries,\n modules: input?.modules,\n onDiagnostic: input?.onDiagnostic,\n });\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"provider-scripts.website.d.ts","sourceRoot":"","sources":["../../../../../src/core/external-providers/provider-scripts.website.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,sCAAsC,CAAC;AAC9F,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,sCAAsC,CAAC;AAE5F;;;;;GAKG;AACH,eAAO,MAAM,gCAAgC,+BAA+B,CAAC;AAE7E,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,WAAW,EAAE,iCAAiC,CAAC;CACzD;AAED;;;GAGG;AACH,wBAAgB,8BAA8B,CAC5C,QAAQ,EAAE,+BAA+B,GAAG,SAAS,GACpD,aAAa,CAAC,sBAAsB,CAAC,CAUvC;AAED,MAAM,WAAW,2BAA2B;IAC1C,yCAAyC;IACzC,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACzC,mEAAmE;IACnE,QAAQ,CAAC,cAAc,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;CAChD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,aAAa,CAAC,sBAAsB,CAAC,EAC9C,cAAc,EAAE,QAAQ,GACvB,2BAA2B,CAsC7B"}
1
+ {"version":3,"file":"provider-scripts.website.d.ts","sourceRoot":"","sources":["../../../../src/core/external-providers/provider-scripts.website.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,sCAAsC,CAAC;AAC9F,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,sCAAsC,CAAC;AAE5F;;;;;GAKG;AACH,eAAO,MAAM,gCAAgC,+BAA+B,CAAC;AAE7E,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,WAAW,EAAE,iCAAiC,CAAC;CACzD;AAED;;;GAGG;AACH,wBAAgB,8BAA8B,CAC5C,QAAQ,EAAE,+BAA+B,GAAG,SAAS,GACpD,aAAa,CAAC,sBAAsB,CAAC,CAUvC;AAED,MAAM,WAAW,2BAA2B;IAC1C,yCAAyC;IACzC,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACzC,mEAAmE;IACnE,QAAQ,CAAC,cAAc,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;CAChD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,aAAa,CAAC,sBAAsB,CAAC,EAC9C,cAAc,EAAE,QAAQ,GACvB,2BAA2B,CAsC7B"}
@@ -1 +1 @@
1
- {"version":3,"file":"provider-scripts.website.js","sourceRoot":"","sources":["../../../../../src/core/external-providers/provider-scripts.website.ts"],"names":[],"mappings":"AAAA;;;;;;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CAAC,CAAC;QACvD,OAAO,CAAC,GAAG,GAAG,WAAW,CAAC,GAAG,CAAC;QAC9B,OAAO,CAAC,YAAY,CAAC,gCAAgC,EAAE,WAAW,CAAC,CAAC;QAEpE,IAAI,WAAW,CAAC,SAAS,KAAK,SAAS,EAAE,CAAC;YACxC,OAAO,CAAC,SAAS,GAAG,WAAW,CAAC,SAAS,CAAC;QAC5C,CAAC;QACD,IAAI,WAAW,CAAC,WAAW,KAAK,SAAS,EAAE,CAAC;YAC1C,OAAO,CAAC,WAAW,GAAG,WAAW,CAAC,WAAW,CAAC;QAChD,CAAC;QACD,4EAA4E;QAC5E,6EAA6E;QAC7E,gEAAgE;QAChE,OAAO,CAAC,KAAK,GAAG,WAAW,CAAC,KAAK,IAAI,WAAW,CAAC,KAAK,KAAK,IAAI,CAAC;QAChE,OAAO,CAAC,KAAK,GAAG,WAAW,CAAC,KAAK,IAAI,KAAK,CAAC;QAE3C,cAAc,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;QACzC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC7B,CAAC;IAED,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,CAAC;AACtC,CAAC","sourcesContent":["/**\n * Loading what a website provider actually declared, instead of naming it.\n *\n * `FRONTEND_SDK` was a label on this surface. The layout resolved the analytics,\n * error-monitoring and captcha provider refs and stamped them into `data-*`\n * attributes on the page root; no consumer loaded anything. A provider could be\n * declared, enabled, hydrated — and do nothing at all.\n *\n * This is the consumer for the DATA half of a provider's executable surface: the\n * `scripts` it declares (#332). It serves the case a dynamic `import()` cannot,\n * and it is the dominant case on a marketing site: a vendor that ships a\n * global-installing `<script>` tag rather than an npm module (reCAPTCHA, tag\n * managers, chat widgets, and the CDN distributions of most analytics SDKs).\n *\n * The npm half — `sdk.activate`, a dynamic import inside the provider package —\n * needs the CODE channel, which needs this package to depend on\n * `@wildo-ai/external-connectors-public`. That dependency is not added here; see\n * the note in the S4a ledger. Nothing below anticipates it: a provider that\n * declares both gets its scripts from here and its SDK from there.\n *\n * ## Client-side injection, and the alternative that was rejected\n *\n * This is an Astro static site, so the \"obvious\" home for a third-party tag is\n * the built HTML `<head>`. That was rejected for now: the set of live providers\n * is per SERVICE and per ENVIRONMENT, resolved from the materialized artifact,\n * while the built HTML is one artifact shared across deploys of the same build.\n * Baking the tags in would make the build environment-specific — the same class\n * of coupling the DATA channel exists to avoid. Injecting from the client keeps\n * one build correct everywhere, at the cost of the tag arriving after hydration.\n * Revisit if a provider ever needs to run before first paint.\n */\n\nimport type { ProviderFrontendScriptDeclaration } from '@wildo-ai/saas-models/public-runtime';\nimport type { FrontendWebsiteProviderRegistry } from './frontend-provider-registry.website';\n\n/**\n * Marks a `<script>` this module owns, so a re-render, a client-side route\n * change or a second layout mount finds it instead of appending a duplicate.\n * A vendor tag loaded twice initialises twice — two analytics clients, two sets\n * of events — which is the failure mode this attribute exists to prevent.\n */\nexport const PROVIDER_SCRIPT_MARKER_ATTRIBUTE = 'data-wildo-provider-script';\n\nexport interface DeclaredProviderScript {\n readonly providerRef: string;\n readonly declaration: ProviderFrontendScriptDeclaration;\n}\n\n/**\n * Every script declared by the providers live on this surface, in registry\n * order, with the declaring ref kept beside each one so a failure can name it.\n */\nexport function collectDeclaredProviderScripts(\n registry: FrontendWebsiteProviderRegistry | undefined,\n): ReadonlyArray<DeclaredProviderScript> {\n if (registry === undefined) return [];\n\n const collected: DeclaredProviderScript[] = [];\n for (const provider of registry.modules.values()) {\n for (const declaration of provider.scripts ?? []) {\n collected.push({ providerRef: provider.metadata.ref, declaration });\n }\n }\n return collected;\n}\n\nexport interface InjectProviderScriptsResult {\n /** Refs whose script this call added. */\n readonly injected: ReadonlyArray<string>;\n /** Refs whose script was already present, so nothing was added. */\n readonly alreadyPresent: ReadonlyArray<string>;\n}\n\n/**\n * Adds each declared script to the document, once.\n *\n * Idempotent by `src`: a declaration whose element is already in the document is\n * skipped. Callers may therefore run this on every mount without tracking state.\n *\n * `async` defaults to TRUE when the declaration says nothing. A third-party tag\n * that blocks parsing is the single most common way an analytics provider costs\n * a marketing site its paint metrics, and a provider author who has not thought\n * about it should get the safe answer rather than the blocking one.\n */\nexport function injectProviderScripts(\n scripts: ReadonlyArray<DeclaredProviderScript>,\n targetDocument: Document,\n): InjectProviderScriptsResult {\n const injected: string[] = [];\n const alreadyPresent: string[] = [];\n\n for (const { providerRef, declaration } of scripts) {\n // Matched by reading the attribute rather than by a selector carrying the\n // URL: a `src` can contain characters a CSS selector would have to escape,\n // and an escaping bug here would show up as a duplicated vendor tag — two\n // analytics clients, two sets of events — rather than as an error.\n const existing = [\n ...targetDocument.querySelectorAll(`script[${PROVIDER_SCRIPT_MARKER_ATTRIBUTE}]`),\n ].some((element) => element.getAttribute('src') === declaration.src);\n if (existing) {\n alreadyPresent.push(providerRef);\n continue;\n }\n\n const element = targetDocument.createElement('script');\n element.src = declaration.src;\n element.setAttribute(PROVIDER_SCRIPT_MARKER_ATTRIBUTE, providerRef);\n\n if (declaration.integrity !== undefined) {\n element.integrity = declaration.integrity;\n }\n if (declaration.crossOrigin !== undefined) {\n element.crossOrigin = declaration.crossOrigin;\n }\n // Both flags are set explicitly rather than left to the element's defaults:\n // a dynamically created script is `async` by default, so `defer: true` alone\n // would be silently ignored without the paired `async = false`.\n element.async = declaration.async ?? declaration.defer !== true;\n element.defer = declaration.defer ?? false;\n\n targetDocument.head.appendChild(element);\n injected.push(providerRef);\n }\n\n return { injected, alreadyPresent };\n}\n"]}
1
+ {"version":3,"file":"provider-scripts.website.js","sourceRoot":"","sources":["../../../../src/core/external-providers/provider-scripts.website.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAKH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG,4BAA4B,CAAC;AAO7E;;;GAGG;AACH,MAAM,UAAU,8BAA8B,CAC5C,QAAqD;IAErD,IAAI,QAAQ,KAAK,SAAS;QA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AO,CAAC,SAAS,GAAG,WAAW,CAAC,SAAS,CAAC;QAC5C,CAAC;QACD,IAAI,WAAW,CAAC,WAAW,KAAK,SAAS,EAAE,CAAC;YAC1C,OAAO,CAAC,WAAW,GAAG,WAAW,CAAC,WAAW,CAAC;QAChD,CAAC;QACD,4EAA4E;QAC5E,6EAA6E;QAC7E,gEAAgE;QAChE,OAAO,CAAC,KAAK,GAAG,WAAW,CAAC,KAAK,IAAI,WAAW,CAAC,KAAK,KAAK,IAAI,CAAC;QAChE,OAAO,CAAC,KAAK,GAAG,WAAW,CAAC,KAAK,IAAI,KAAK,CAAC;QAE3C,cAAc,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;QACzC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC7B,CAAC;IAED,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,CAAC;AACtC,CAAC","sourcesContent":["/**\n * Loading what a website provider actually declared, instead of naming it.\n *\n * `FRONTEND_SDK` was a label on this surface. The layout resolved the analytics,\n * error-monitoring and captcha provider refs and stamped them into `data-*`\n * attributes on the page root; no consumer loaded anything. A provider could be\n * declared, enabled, hydrated — and do nothing at all.\n *\n * This is the consumer for the DATA half of a provider's executable surface: the\n * `scripts` it declares (#332). It serves the case a dynamic `import()` cannot,\n * and it is the dominant case on a marketing site: a vendor that ships a\n * global-installing `<script>` tag rather than an npm module (reCAPTCHA, tag\n * managers, chat widgets, and the CDN distributions of most analytics SDKs).\n *\n * The npm half — `sdk.activate`, a dynamic import inside the provider package —\n * needs the CODE channel, which needs this package to depend on\n * `@wildo-ai/external-connectors-public`. That dependency is not added here; see\n * the note in the S4a ledger. Nothing below anticipates it: a provider that\n * declares both gets its scripts from here and its SDK from there.\n *\n * ## Client-side injection, and the alternative that was rejected\n *\n * This is an Astro static site, so the \"obvious\" home for a third-party tag is\n * the built HTML `<head>`. That was rejected for now: the set of live providers\n * is per SERVICE and per ENVIRONMENT, resolved from the materialized artifact,\n * while the built HTML is one artifact shared across deploys of the same build.\n * Baking the tags in would make the build environment-specific — the same class\n * of coupling the DATA channel exists to avoid. Injecting from the client keeps\n * one build correct everywhere, at the cost of the tag arriving after hydration.\n * Revisit if a provider ever needs to run before first paint.\n */\n\nimport type { ProviderFrontendScriptDeclaration } from '@wildo-ai/saas-models/public-runtime';\nimport type { FrontendWebsiteProviderRegistry } from './frontend-provider-registry.website';\n\n/**\n * Marks a `<script>` this module owns, so a re-render, a client-side route\n * change or a second layout mount finds it instead of appending a duplicate.\n * A vendor tag loaded twice initialises twice — two analytics clients, two sets\n * of events — which is the failure mode this attribute exists to prevent.\n */\nexport const PROVIDER_SCRIPT_MARKER_ATTRIBUTE = 'data-wildo-provider-script';\n\nexport interface DeclaredProviderScript {\n readonly providerRef: string;\n readonly declaration: ProviderFrontendScriptDeclaration;\n}\n\n/**\n * Every script declared by the providers live on this surface, in registry\n * order, with the declaring ref kept beside each one so a failure can name it.\n */\nexport function collectDeclaredProviderScripts(\n registry: FrontendWebsiteProviderRegistry | undefined,\n): ReadonlyArray<DeclaredProviderScript> {\n if (registry === undefined) return [];\n\n const collected: DeclaredProviderScript[] = [];\n for (const provider of registry.modules.values()) {\n for (const declaration of provider.scripts ?? []) {\n collected.push({ providerRef: provider.metadata.ref, declaration });\n }\n }\n return collected;\n}\n\nexport interface InjectProviderScriptsResult {\n /** Refs whose script this call added. */\n readonly injected: ReadonlyArray<string>;\n /** Refs whose script was already present, so nothing was added. */\n readonly alreadyPresent: ReadonlyArray<string>;\n}\n\n/**\n * Adds each declared script to the document, once.\n *\n * Idempotent by `src`: a declaration whose element is already in the document is\n * skipped. Callers may therefore run this on every mount without tracking state.\n *\n * `async` defaults to TRUE when the declaration says nothing. A third-party tag\n * that blocks parsing is the single most common way an analytics provider costs\n * a marketing site its paint metrics, and a provider author who has not thought\n * about it should get the safe answer rather than the blocking one.\n */\nexport function injectProviderScripts(\n scripts: ReadonlyArray<DeclaredProviderScript>,\n targetDocument: Document,\n): InjectProviderScriptsResult {\n const injected: string[] = [];\n const alreadyPresent: string[] = [];\n\n for (const { providerRef, declaration } of scripts) {\n // Matched by reading the attribute rather than by a selector carrying the\n // URL: a `src` can contain characters a CSS selector would have to escape,\n // and an escaping bug here would show up as a duplicated vendor tag — two\n // analytics clients, two sets of events — rather than as an error.\n const existing = [\n ...targetDocument.querySelectorAll(`script[${PROVIDER_SCRIPT_MARKER_ATTRIBUTE}]`),\n ].some((element) => element.getAttribute('src') === declaration.src);\n if (existing) {\n alreadyPresent.push(providerRef);\n continue;\n }\n\n const element = targetDocument.createElement('script');\n element.src = declaration.src;\n element.setAttribute(PROVIDER_SCRIPT_MARKER_ATTRIBUTE, providerRef);\n\n if (declaration.integrity !== undefined) {\n element.integrity = declaration.integrity;\n }\n if (declaration.crossOrigin !== undefined) {\n element.crossOrigin = declaration.crossOrigin;\n }\n // Both flags are set explicitly rather than left to the element's defaults:\n // a dynamically created script is `async` by default, so `defer: true` alone\n // would be silently ignored without the paired `async = false`.\n element.async = declaration.async ?? declaration.defer !== true;\n element.defer = declaration.defer ?? false;\n\n targetDocument.head.appendChild(element);\n injected.push(providerRef);\n }\n\n return { injected, alreadyPresent };\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"useWebsiteProviderScripts.d.ts","sourceRoot":"","sources":["../../../../../src/core/external-providers/useWebsiteProviderScripts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAYH,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,sCAAsC,CAAC;AAE5F,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,+BAA+B,GAAG,SAAS,GACpD,IAAI,CAaN;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,+BAA+B,GAAG,SAAS,GACpD,IAAI,CA6BN"}
1
+ {"version":3,"file":"useWebsiteProviderScripts.d.ts","sourceRoot":"","sources":["../../../../src/core/external-providers/useWebsiteProviderScripts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAYH,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,sCAAsC,CAAC;AAE5F,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,+BAA+B,GAAG,SAAS,GACpD,IAAI,CAaN;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,+BAA+B,GAAG,SAAS,GACpD,IAAI,CA6BN"}
@@ -1 +1 @@
1
- {"version":3,"file":"useWebsiteProviderScripts.js","sourceRoot":"","sources":["../../../../../src/core/external-providers/useWebsiteProviderScripts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EACL,4BAA4B,GAE7B,MAAM,8CAA8C,CAAC;AACtD,OAAO,EACL,8BAA8B,EAC9B,qBAAqB,GACtB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAGvE,MAAM,UAAU,yBAAyB,CACvC,QAAqD;IAErD,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,OAAO,QAAQ,KAAK,WAAW;YAAE,OAAO;QAE5C,MAAM,OAAO,GAAG,8BAA8B,CAAC,QAAQ,CAAC,CAAC;QACzD,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO;QAEjC,qBAAqB,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QACzC,4EAA4E;QAC5E,2EAA2E;QAC3E,uEAAuE;QACvE,kEAAkE;IACpE,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;AACjB,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,sBAAsB,CACpC,QAAqD;IAErD,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,QAAQ,KAAK,SAAS;YAAE,OAAO;QAEnC,IAAI,SAAS,GAAG,KAAK,CAAC;QACtB,IAAI,SAAoD,CAAC;QAEzD,KAAK,4BAA4B,CAAC;YAChC,OAAO,EAAE,eAAe,CAAC,cAAc;YACvC,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,EAAE;YAClC,YAAY,EAAE,CAAC,UAAU,EAAE,EAAE;gBAC3B,wEAAwE;gBACxE,4DAA4D;gBAC5D,sCAAsC;gBACtC,OAAO,CAAC,IAAI,CAAC,wBAAwB,UAAU,CAAC,IAAI,KAAK,UAAU,CAAC,OAAO,EAAE,CAAC,CAAC;YACjF,CAAC;SACF,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE;YACjB,SAAS,GAAG,MAAM,CAAC;YACnB,0EAA0E;YAC1E,yEAAyE;YACzE,iDAAiD;YACjD,IAAI,SAAS;gBAAE,KAAK,MAAM,CAAC,aAAa,EAAE,CAAC;QAC7C,CAAC,CAAC,CAAC;QAEH,OAAO,GAAG,EAAE;YACV,SAAS,GAAG,IAAI,CAAC;YACjB,KAAK,SAAS,EAAE,aAAa,EAAE,CAAC;QAClC,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;AACjB,CAAC","sourcesContent":["/**\n * The website's executable-surface hooks: load what the live providers declared.\n *\n * Two mechanisms, one per kind of vendor. `useWebsiteProviderScripts` adds the\n * `<script>` tags a provider declared — the case a dynamic `import()` cannot\n * serve, and the dominant one on a marketing site. `useWebsiteProviderSdks`\n * activates the npm SDK of any provider that ships one, which reaches this\n * bundle through the CODE channel.\n *\n * Both are effect-only, and that is not incidental: this is an Astro site, so\n * page modules execute in Node at build time. Injecting into a document that\n * does not exist would throw, and starting a vendor SDK there would run a live\n * analytics client inside a build.\n *\n * SDK activation comes from `@wildo-ai/external-connectors-public/website`, which\n * this package now depends on. The script injector beside it does NOT yet, and\n * that is a timing artifact rather than a decision: it belongs in the same\n * package so the technical doc can use one copy — a second copy of a DOM\n * mutation eventually disagrees about idempotence, which is how a vendor tag\n * gets loaded twice. Moving it needs that package's `dist` to carry it, and no\n * watcher is running in this tree; consolidating it is a one-step follow-up, not\n * a design question.\n */\n\nimport { useEffect } from 'react';\nimport {\n activateFrontendProviderSdks,\n type ActivatedFrontendProviderSdks,\n} from '@wildo-ai/external-connectors-public/website';\nimport {\n collectDeclaredProviderScripts,\n injectProviderScripts,\n} from './provider-scripts.website';\nimport { AppFrontendType } from '@wildo-ai/saas-models/public-runtime';\nimport type { FrontendWebsiteProviderRegistry } from './frontend-provider-registry.website';\n\nexport function useWebsiteProviderScripts(\n registry: FrontendWebsiteProviderRegistry | undefined,\n): void {\n useEffect(() => {\n if (typeof document === 'undefined') return;\n\n const scripts = collectDeclaredProviderScripts(registry);\n if (scripts.length === 0) return;\n\n injectProviderScripts(scripts, document);\n // Deliberately no teardown. A vendor tag installs a global and often starts\n // work immediately; removing the element undoes neither, so a cleanup that\n // removed it would only make the next mount inject a SECOND copy of an\n // already-running script. Idempotence by `src` is the real guard.\n }, [registry]);\n}\n\n/**\n * Loads and starts the npm SDK of every live provider that declares one.\n *\n * Unlike a script tag, an SDK activation IS undone on unmount where the vendor\n * offers a teardown — an analytics client that cannot be stopped cannot honour\n * a consent withdrawal, and accumulates one instance per view transition.\n */\nexport function useWebsiteProviderSdks(\n registry: FrontendWebsiteProviderRegistry | undefined,\n): void {\n useEffect(() => {\n if (registry === undefined) return;\n\n let unmounted = false;\n let activated: ActivatedFrontendProviderSdks | undefined;\n\n void activateFrontendProviderSdks({\n surface: AppFrontendType.STATIC_WEBSITE,\n modules: registry.modules.values(),\n onDiagnostic: (diagnostic) => {\n // The website runtime has no logger service, and a provider that cannot\n // start is a developer-facing fact that must not be silent.\n // eslint-disable-next-line no-console\n console.warn(`[wildo-provider-sdk] ${diagnostic.kind}: ${diagnostic.message}`);\n },\n }).then((result) => {\n activated = result;\n // Activation is asynchronous and unmount is not: if the surface went away\n // while a vendor bundle was still downloading, stop what we just started\n // rather than leaving a client nobody can reach.\n if (unmounted) void result.deactivateAll();\n });\n\n return () => {\n unmounted = true;\n void activated?.deactivateAll();\n };\n }, [registry]);\n}\n"]}
1
+ {"version":3,"file":"useWebsiteProviderScripts.js","sourceRoot":"","sources":["../../../../src/core/external-providers/useWebsiteProviderScripts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EACL,4BAA4B,GAE7B,MAAM,8CAA8C,CAAC;AACtD,OAAO,EACL,8BAA8B,EAC9B,qBAAqB,GACtB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAGvE,MAAM,UAAU,yBAAyB,CACvC,QAAqD;IAErD,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,OAAO,QAAQ,KAAK,WAAW;YAAE,OAAO;QAE5C,MAAM,OAAO,GAAG,8BAA8B,CAAC,QAAQ,CAAC,CAAC;QACzD,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO;QAEjC,qBAAqB,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QACzC,4EAA4E;QAC5E,2EAA2E;QAC3E,uEAAuE;QACvE,kEAAkE;IACpE,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;AACjB,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,sBAAsB,CACpC,QAAqD;IAErD,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,QAAQ,KAAK,SAAS;YAAE,OAAO;QAEnC,IAAI,SAAS,GAAG,KAAK,CAAC;QACtB,IAAI,SAAoD,CAAC;QAEzD,KAAK,4BAA4B,CAAC;YAChC,OAAO,EAAE,eAAe,CAAC,cAAc;YACvC,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,EAAE;YAClC,YAAY,EAAE,CAAC,UAAU,EAAE,EAAE;gBAC3B,wEAAwE;gBACxE,4DAA4D;gBAC5D,sCAAsC;gBACtC,OAAO,CAAC,IAAI,CAAC,wBAAwB,UAAU,CAAC,IAAI,KAAK,UAAU,CAAC,OAAO,EAAE,CAAC,CAAC;YACjF,CAAC;SACF,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE;YACjB,SAAS,GAAG,MAAM,CAAC;YACnB,0EAA0E;YAC1E,yEAAyE;YACzE,iDAAiD;YACjD,IAAI,SAAS;gBAAE,KAAK,MAAM,CAAC,aAAa,EAAE,CAAC;QAC7C,CAAC,CAAC,CAAC;QAEH,OAAO,GAAG,EAAE;YACV,SAAS,GAAG,IAAI,CAAC;YACjB,KAAK,SAAS,EAAE,aAAa,EAAE,CAAC;QAClC,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;AACjB,CAAC","sourcesContent":["/**\n * The website's executable-surface hooks: load what the live providers declared.\n *\n * Two mechanisms, one per kind of vendor. `useWebsiteProviderScripts` adds the\n * `<script>` tags a provider declared — the case a dynamic `import()` cannot\n * serve, and the dominant one on a marketing site. `useWebsiteProviderSdks`\n * activates the npm SDK of any provider that ships one, which reaches this\n * bundle through the CODE channel.\n *\n * Both are effect-only, and that is not incidental: this is an Astro site, so\n * page modules execute in Node at build time. Injecting into a document that\n * does not exist would throw, and starting a vendor SDK there would run a live\n * analytics client inside a build.\n *\n * SDK activation comes from `@wildo-ai/external-connectors-public/website`, which\n * this package now depends on. The script injector beside it does NOT yet, and\n * that is a timing artifact rather than a decision: it belongs in the same\n * package so the technical doc can use one copy — a second copy of a DOM\n * mutation eventually disagrees about idempotence, which is how a vendor tag\n * gets loaded twice. Moving it needs that package's `dist` to carry it, and no\n * watcher is running in this tree; consolidating it is a one-step follow-up, not\n * a design question.\n */\n\nimport { useEffect } from 'react';\nimport {\n activateFrontendProviderSdks,\n type ActivatedFrontendProviderSdks,\n} from '@wildo-ai/external-connectors-public/website';\nimport {\n collectDeclaredProviderScripts,\n injectProviderScripts,\n} from './provider-scripts.website';\nimport { AppFrontendType } from '@wildo-ai/saas-models/public-runtime';\nimport type { FrontendWebsiteProviderRegistry } from './frontend-provider-registry.website';\n\nexport function useWebsiteProviderScripts(\n registry: FrontendWebsiteProviderRegistry | undefined,\n): void {\n useEffect(() => {\n if (typeof document === 'undefined') return;\n\n const scripts = collectDeclaredProviderScripts(registry);\n if (scripts.length === 0) return;\n\n injectProviderScripts(scripts, document);\n // Deliberately no teardown. A vendor tag installs a global and often starts\n // work immediately; removing the element undoes neither, so a cleanup that\n // removed it would only make the next mount inject a SECOND copy of an\n // already-running script. Idempotence by `src` is the real guard.\n }, [registry]);\n}\n\n/**\n * Loads and starts the npm SDK of every live provider that declares one.\n *\n * Unlike a script tag, an SDK activation IS undone on unmount where the vendor\n * offers a teardown — an analytics client that cannot be stopped cannot honour\n * a consent withdrawal, and accumulates one instance per view transition.\n */\nexport function useWebsiteProviderSdks(\n registry: FrontendWebsiteProviderRegistry | undefined,\n): void {\n useEffect(() => {\n if (registry === undefined) return;\n\n let unmounted = false;\n let activated: ActivatedFrontendProviderSdks | undefined;\n\n void activateFrontendProviderSdks({\n surface: AppFrontendType.STATIC_WEBSITE,\n modules: registry.modules.values(),\n onDiagnostic: (diagnostic) => {\n // The website runtime has no logger service, and a provider that cannot\n // start is a developer-facing fact that must not be silent.\n // eslint-disable-next-line no-console\n console.warn(`[wildo-provider-sdk] ${diagnostic.kind}: ${diagnostic.message}`);\n },\n }).then((result) => {\n activated = result;\n // Activation is asynchronous and unmount is not: if the surface went away\n // while a vendor bundle was still downloading, stop what we just started\n // rather than leaving a client nobody can reach.\n if (unmounted) void result.deactivateAll();\n });\n\n return () => {\n unmounted = true;\n void activated?.deactivateAll();\n };\n }, [registry]);\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"define-website-page-manifest.d.ts","sourceRoot":"","sources":["../../../../../src/core/factories/define-website-page-manifest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,4BAA4B,EAC7B,MAAM,8DAA8D,CAAC;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAC1E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAEhF;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,8BAA8B,CAAC,MAAM;IACpD,GAAG,EAAE,cAAc,GAAG,MAAM,CAAC;IAC7B,SAAS,EAAE,oBAAoB,GAAG,MAAM,CAAC;IACzC,aAAa,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACrC,WAAW,EAAE,SAAS,CAAC,iBAAiB,GAAG,MAAM,CAAC,EAAE,CAAC;IACrD,aAAa,EAAE,wBAAwB,CAAC;IACxC,SAAS,CAAC,EAAE,4BAA4B,CAAC;IACzC,GAAG,CAAC,EAAE,oBAAoB,CAAC;CAC5B;AAED;;;;GAIG;AACH,MAAM,WAAW,wBAAwB,CAAC,MAAM,CAC9C,SAAQ,IAAI,CAAC,mBAAmB,EAAE,eAAe,CAAC;IAClD,aAAa,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;CACtC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EACtE,KAAK,EAAE,8BAA8B,CAAC,MAAM,CAAC,GAC5C,wBAAwB,CAAC,MAAM,CAAC,CAmBlC;AACD,yEAAyE"}
1
+ {"version":3,"file":"define-website-page-manifest.d.ts","sourceRoot":"","sources":["../../../../src/core/factories/define-website-page-manifest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,4BAA4B,EAC7B,MAAM,8DAA8D,CAAC;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAC1E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAEhF;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,8BAA8B,CAAC,MAAM;IACpD,GAAG,EAAE,cAAc,GAAG,MAAM,CAAC;IAC7B,SAAS,EAAE,oBAAoB,GAAG,MAAM,CAAC;IACzC,aAAa,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACrC,WAAW,EAAE,SAAS,CAAC,iBAAiB,GAAG,MAAM,CAAC,EAAE,CAAC;IACrD,aAAa,EAAE,wBAAwB,CAAC;IACxC,SAAS,CAAC,EAAE,4BAA4B,CAAC;IACzC,GAAG,CAAC,EAAE,oBAAoB,CAAC;CAC5B;AAED;;;;GAIG;AACH,MAAM,WAAW,wBAAwB,CAAC,MAAM,CAC9C,SAAQ,IAAI,CAAC,mBAAmB,EAAE,eAAe,CAAC;IAClD,aAAa,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;CACtC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EACtE,KAAK,EAAE,8BAA8B,CAAC,MAAM,CAAC,GAC5C,wBAAwB,CAAC,MAAM,CAAC,CAmBlC;AACD,yEAAyE"}
@@ -1 +1 @@
1
- {"version":3,"file":"define-website-section.d.ts","sourceRoot":"","sources":["../../../../../src/core/factories/define-website-section.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAG3C,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kEAAkE,CAAC;AACjH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wDAAwD,CAAC;AACrG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAChF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oDAAoD,CAAC;AAC1F,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,sEAAsE,CAAC;AAExH;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,yBAAyB,CAAC,MAAM;IAC/C,UAAU,EAAE,iBAAiB,GAAG,MAAM,CAAC;IACvC,QAAQ,EAAE,sBAAsB,CAAC;IACjC,iBAAiB,EAAE,SAAS,CAAC,eAAe,GAAG,MAAM,CAAC,EAAE,CAAC;IACzD,SAAS,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACjC;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,MAAM,2BAA2B,CAAC;CACvD;AAED;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,6BAA6B,CAAC,MAAM,CACnD,SAAQ,IAAI,CAAC,wBAAwB,EAAE,WAAW,GAAG,mBAAmB,CAAC;IACzE,SAAS,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACjC,iBAAiB,CAAC,EAAE,MAAM,2BAA2B,CAAC;CACvD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EACzC,KAAK,EAAE,yBAAyB,CAAC,MAAM,CAAC,GACvC,6BAA6B,CAAC,MAAM,CAAC,CAoBvC;AACD,mEAAmE"}
1
+ {"version":3,"file":"define-website-section.d.ts","sourceRoot":"","sources":["../../../../src/core/factories/define-website-section.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAG3C,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kEAAkE,CAAC;AACjH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wDAAwD,CAAC;AACrG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAChF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oDAAoD,CAAC;AAC1F,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,sEAAsE,CAAC;AAExH;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,yBAAyB,CAAC,MAAM;IAC/C,UAAU,EAAE,iBAAiB,GAAG,MAAM,CAAC;IACvC,QAAQ,EAAE,sBAAsB,CAAC;IACjC,iBAAiB,EAAE,SAAS,CAAC,eAAe,GAAG,MAAM,CAAC,EAAE,CAAC;IACzD,SAAS,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACjC;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,MAAM,2BAA2B,CAAC;CACvD;AAED;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,6BAA6B,CAAC,MAAM,CACnD,SAAQ,IAAI,CAAC,wBAAwB,EAAE,WAAW,GAAG,mBAAmB,CAAC;IACzE,SAAS,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACjC,iBAAiB,CAAC,EAAE,MAAM,2BAA2B,CAAC;CACvD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EACzC,KAAK,EAAE,yBAAyB,CAAC,MAAM,CAAC,GACvC,6BAA6B,CAAC,MAAM,CAAC,CAoBvC;AACD,mEAAmE"}
@@ -1 +1 @@
1
- {"version":3,"file":"useWebsiteDesignTokens.d.ts","sourceRoot":"","sources":["../../../../../src/core/hooks/useWebsiteDesignTokens.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kEAAkE,CAAC;AAE5G;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,sBAAsB,IAAI,mBAAmB,CAE5D;AACD,0DAA0D"}
1
+ {"version":3,"file":"useWebsiteDesignTokens.d.ts","sourceRoot":"","sources":["../../../../src/core/hooks/useWebsiteDesignTokens.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kEAAkE,CAAC;AAE5G;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,sBAAsB,IAAI,mBAAmB,CAE5D;AACD,0DAA0D"}
@@ -1 +1 @@
1
- {"version":3,"file":"useWebsiteLabel.d.ts","sourceRoot":"","sources":["../../../../../src/core/hooks/useWebsiteLabel.ts"],"names":[],"mappings":"AAKA,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,oDAAoD,CAAC;AAE5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CA8BxD;AACD,yDAAyD;AAEzD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,eAAe,GAAG,MAAM,CAajE;AACD,gEAAgE"}
1
+ {"version":3,"file":"useWebsiteLabel.d.ts","sourceRoot":"","sources":["../../../../src/core/hooks/useWebsiteLabel.ts"],"names":[],"mappings":"AAKA,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,oDAAoD,CAAC;AAE5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CA8BxD;AACD,yDAAyD;AAEzD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,eAAe,GAAG,MAAM,CAajE;AACD,gEAAgE"}
@@ -1 +1 @@
1
- {"version":3,"file":"WebsitePageLayout.d.ts","sourceRoot":"","sources":["../../../../../src/core/layouts/WebsitePageLayout.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAW,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAWvD,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,qCAAqC,CAAC;AA6F7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,MAAM,WAAW,sBAAsB;IACrC;;;;;;;OAOG;IACH,OAAO,EAAE,cAAc,GAAG,MAAM,CAAC;IACjC;;;;;OAKG;IACH,MAAM,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IAC1B;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IAC1B;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,iBAAiB,CAAC,EAChC,OAAO,EACP,MAAM,EACN,MAAM,EACN,SAAS,EACT,aAAa,EACb,QAAQ,GACT,EAAE,sBAAsB,GAAG,SAAS,CA6HpC;yBApIe,iBAAiB;;;AAsIjC,gEAAgE"}
1
+ {"version":3,"file":"WebsitePageLayout.d.ts","sourceRoot":"","sources":["../../../../src/core/layouts/WebsitePageLayout.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAW,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAWvD,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,qCAAqC,CAAC;AA6F7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,MAAM,WAAW,sBAAsB;IACrC;;;;;;;OAOG;IACH,OAAO,EAAE,cAAc,GAAG,MAAM,CAAC;IACjC;;;;;OAKG;IACH,MAAM,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IAC1B;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IAC1B;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,iBAAiB,CAAC,EAChC,OAAO,EACP,MAAM,EACN,MAAM,EACN,SAAS,EACT,aAAa,EACb,QAAQ,GACT,EAAE,sBAAsB,GAAG,SAAS,CA6HpC;yBApIe,iBAAiB;;;AAsIjC,gEAAgE"}
@@ -1 +1 @@
1
- {"version":3,"file":"WebsitePageLayout.js","sourceRoot":"","sources":["../../../../../src/core/layouts/WebsitePageLayout.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,OAAO,EAAkB,MAAM,OAAO,CAAC;AACvD,OAAO,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC;AAEnF,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,EACL,yBAAyB,EACzB,sBAAsB,GACvB,MAAM,iDAAiD,CAAC;AAEzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EACL,oBAAoB,GAErB,MAAM,qCAAqC,CAAC;AAE7C;;;;;;;;;;;GAWG;AACH,MAAM,mBAAmB,GAAG,cAAc,CAAC;AAE3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,MAAM,sBAAsB,GAAwB;IAClD,QAAQ,EAAE,UAAU;IACpB,GAAG,EAAE,CAAC;IACN,IAAI,EAAE,CAAC;IACP,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE,KAAK;IACb,OAAO,EAAE,CAAC;IACV,MAAM,EAAE,MAAM;IACd,QAAQ,EAAE,QAAQ;IAClB,IAAI,EAAE,eAAe;IACrB,UAAU,EAAE,QAAQ;IACpB,MAAM,EAAE,CAAC;CACV,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,mBAAmB,GAAG;;;;;;;;;;;;;;;;;;;;CAoB3B,CAAC,IAAI,EAAE,CAAC;AAkFT,MAAM,UAAU,iBAAiB,CAAC,EAChC,OAAO,EACP,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B,aAAa,GACZ,EACH,cAAc,KAAK,IAAI,CAAC,CAAC,CAAC,2BAAS,cAAc,GAAU,CAAC,CAAC,CAAC,IAAI,EACnE,eAAM,EAAE,EAAE,mBAAmB,EAAE,SAAS,EAAE,aAAa,EAAE,QAAQ,EAAE,CAAC,CAAC,YAClE,QAAQ,GACJ,EACN,cAAc,KAAK,IAAI,CAAC,CAAC,CAAC,2BAAS,cAAc,GAAU,CAAC,CAAC,CAAC,IAAI,IAC/D,GACqB,CAC9B,CAAC;AACJ,CAAC;AACD,iBAAiB,CAAC,WAAW,GAAG,mBAAmB,CAAC","sourcesContent":["import React, { useMemo, type ReactNode } from 'react';\nimport { BUILTIN_PROVIDER_CAPABILITY } from '@wildo-ai/saas-models/public-runtime';\n\nimport { WebsitePageContextProvider } from '../contexts/WebsitePageContext';\nimport {\n useWebsiteProviderScripts,\n useWebsiteProviderSdks,\n} from '../external-providers/useWebsiteProviderScripts';\nimport type { WebsitePageContextValue } from '../contexts/WebsitePageContext';\nimport { useWebsiteRuntime } from '../contexts/useWebsiteRuntime';\nimport { useWebsiteLabelByKey } from '../hooks/useWebsiteLabel';\nimport {\n WebsitePageRefSchema,\n type WebsitePageRef,\n} from '../../schemas/refs/page-ref.schemas';\n\n/**\n * Stable DOM id stamped on the `<main>` element so the framework's\n * skip-link `<a href=\"#main-content\">` can move keyboard focus past\n * the chrome on every page (Phase 6 audit fix M-α). Co-located here\n * (rather than exposed as a prop) because:\n * - The skip-link target is a framework concern — exposing it as a\n * consumer-tunable id would invite drift between the link's href\n * and the main element's id.\n * - Screen readers announce the heading inside `<main id=\"...\">` on\n * focus; a stable, framework-owned id keeps that affordance\n * deterministic across every page on every site.\n */\nconst MAIN_CONTENT_DOM_ID = 'main-content';\n\n/**\n * Inline style for the skip link's \"visually hidden by default,\n * visible on focus\" pattern. Inlined (NOT shipped as a CSS class)\n * because:\n * - The framework intentionally avoids shipping any CSS file the\n * consumer must opt in to — the only stylesheet emitted is the\n * `:root { --website-*: … }` design-token block, and the rest of\n * the styling surface lives in consumer code (see Phase 5\n * `renderWebsiteDesignTokensCss`). Inlining keeps the skip link\n * self-sufficient and side-effect-free.\n * - The \"skip-link\" pattern is a small, well-known a11y idiom; the\n * handful of style declarations here do not benefit from being\n * reorganized into a class with a custom-property hook.\n *\n * The \"focused\" variant uses BOTH `:focus` AND `:focus-visible`\n * pseudo-classes via a scoped `<style>` tag inside the layout output.\n * We cannot apply pseudo-class styles via a `style` attribute, but\n * emitting a tiny scoped block once at the layout root is safe (one\n * block per page render, ~120 bytes) and avoids importing a CSS-in-JS\n * runtime.\n *\n * **Why both selectors and not just `:focus-visible`** (Phase 6 fourth\n * audit fix M-Η): `:focus-visible` is the modern UA-heuristic-driven\n * selector that hides focus rings on mouse clicks, and it is the\n * RIGHT default for buttons / links. For a skip link though we WANT\n * the affordance to appear on EVERY focus event — the link is\n * invisible by default and a keyboard-only user (the only intended\n * audience) is the only one who can reach it. Older browsers that\n * predate `:focus-visible` (and Safari < 15.4 with the feature\n * disabled) would skip the rule entirely with a `:focus-visible`-only\n * declaration, leaving the keyboard user looking at an apparently\n * empty page when they pressed Tab. Pairing `:focus, :focus-visible`\n * is the documented WCAG 2.1 fallback pattern.\n */\nconst SKIP_LINK_HIDDEN_STYLE: React.CSSProperties = {\n position: 'absolute',\n top: 0,\n left: 0,\n width: '1px',\n height: '1px',\n padding: 0,\n margin: '-1px',\n overflow: 'hidden',\n clip: 'rect(0 0 0 0)',\n whiteSpace: 'nowrap',\n border: 0,\n};\n\n/**\n * Single scoped style block for the skip link's `:focus-visible`\n * affordance. Targets the `data-website-skip-link` attribute (NOT a\n * class) so consumer Tailwind / utility classes cannot accidentally\n * shadow it. Stays trivially small to keep payload under the\n * \"framework rendering\" implicit budget.\n */\nconst SKIP_LINK_FOCUS_CSS = `\n[data-website-skip-link]:focus,\n[data-website-skip-link]:focus-visible {\n position: fixed !important;\n top: 0.5rem !important;\n left: 0.5rem !important;\n width: auto !important;\n height: auto !important;\n padding: 0.75rem 1rem !important;\n margin: 0 !important;\n overflow: visible !important;\n clip: auto !important;\n white-space: normal !important;\n background: var(--website-colors-background, #fff) !important;\n color: var(--website-colors-foreground, #000) !important;\n border: 2px solid var(--website-colors-primary, #000) !important;\n border-radius: var(--website-radii-md, 0.375rem) !important;\n z-index: 9999 !important;\n text-decoration: none !important;\n}\n`.trim();\n\n/**\n * @wildo_source:part:start saas.website.page-layout.component facet:layer:core facet:family:website\n *\n * `WebsitePageLayout` — the per-page structural primitive.\n *\n * **Three responsibilities** (each carrying its own semantic weight):\n *\n * 1. **Provides `WebsitePageContext`** — registers the active page\n * ref so child sections (`<WebsiteSection>`) and label hooks\n * (`useWebsiteLabel`) can derive label keys without re-typing\n * the page ref at every leaf.\n * 2. **Renders the site-wide chrome** — pulls\n * `headerComponent` and `footerComponent` from the runtime\n * navigation config and wraps the page's main content in the\n * site's standard header/main/footer scaffold. Per-page\n * overrides (`header={…}` / `footer={…}` props) take precedence\n * over the runtime defaults so individual pages can opt into a\n * custom chrome (eg. a campaign landing page running with\n * header-only minimal chrome).\n * 3. **Stamps DOM landmarks** — emits `data-website-page-ref` on\n * the layout root for analytics / SEO crawlers / overlay\n * tooling that needs to identify the active page from the DOM\n * without booting React. When the website facet hydrates\n * frontend-provider bootstraps, the same root also carries the\n * active public provider refs for analytics / browser-monitoring /\n * captcha so non-React tooling can detect the configured vendor\n * without reverse-engineering app code.\n *\n * **Why semantic `<header>` / `<main>` / `<footer>` elements**:\n * marketing-site SEO scoring penalizes pages that ship a single\n * unstructured `<div>` tree. Using semantic landmarks costs nothing\n * and improves crawler accessibility AND screen-reader\n * navigability — both are first-class concerns for a public\n * marketing surface.\n *\n * **Why this lives in `core/`** (not `components/`): the layout is\n * structural framework machinery (it owns the page-context\n * provisioning + the navigation slot resolution), not a styled\n * primitive. Designers override `header` / `footer` via runtime\n * config or per-page props, NOT by replacing this component.\n */\nexport interface WebsitePageLayoutProps {\n /**\n * The active page's ref. Accepts either an already-branded\n * `WebsitePageRef` or a raw string — the layout parses through\n * `WebsitePageRefSchema` so a malformed ref fails loud at render.\n *\n * Typically sourced from the page's `WebsitePageManifest.ref`\n * (eg. `<WebsitePageLayout pageRef={LANDING_PAGE_MANIFEST.ref}>`).\n */\n pageRef: WebsitePageRef | string;\n /**\n * Per-page header override. When supplied, takes precedence over\n * `WebsiteRuntimeContext.designTokens` navigation config's\n * `headerComponent`. Pass `null` explicitly to suppress the header\n * entirely (campaign landing pages without site-wide nav).\n */\n header?: ReactNode | null;\n /**\n * Per-page footer override. Same semantics as `header`.\n */\n footer?: ReactNode | null;\n /**\n * Optional className applied to the root `<div data-website-page-ref=\"…\">`\n * wrapper. Use for page-level layout tweaks (eg. `min-h-screen` on\n * landing pages).\n */\n className?: string;\n /**\n * Optional className applied to the inner `<main>` element. Use for\n * vertical-rhythm overrides on long-scroll landing pages.\n */\n mainClassName?: string;\n /**\n * The page's section composition. Typically a sequence of\n * `<WebsiteSection>` wrappers around concrete section components.\n */\n children: ReactNode;\n}\n\nexport function WebsitePageLayout({\n pageRef,\n header,\n footer,\n className,\n mainClassName,\n children,\n}: WebsitePageLayoutProps): ReactNode {\n const runtime = useWebsiteRuntime();\n\n /**\n * Defensive parse: callers should pass a `WebsitePageManifest.ref`\n * (already branded), but accepting raw strings + parsing here means\n * a hand-typed call site can't smuggle a malformed ref into the\n * label-key derivation chain.\n */\n const safePageRef = useMemo<WebsitePageRef>(\n () => WebsitePageRefSchema.parse(pageRef),\n [pageRef],\n );\n\n const pageContextValue = useMemo<WebsitePageContextValue>(\n () => ({ pageRef: safePageRef }),\n [safePageRef],\n );\n\n /**\n * Header resolution rules:\n * - `header === null` => explicit suppression\n * - `header !== undefined` => per-page override (any ReactNode)\n * - `header === undefined` => fall back to the runtime navigation\n * config's `headerComponent`\n *\n * The fallback is the common path: every page renders the same\n * site-wide chrome. The override path is the escape hatch (campaign\n * landing pages with custom header layouts).\n */\n const resolvedHeader = useMemo<ReactNode>(() => {\n if (header === null) return null;\n if (header !== undefined) return header;\n const HeaderComponent = runtime.navigation.headerComponent;\n return <HeaderComponent />;\n }, [header, runtime.navigation.headerComponent]);\n\n const resolvedFooter = useMemo<ReactNode>(() => {\n if (footer === null) return null;\n if (footer !== undefined) return footer;\n const FooterComponent = runtime.navigation.footerComponent;\n return <FooterComponent />;\n }, [footer, runtime.navigation.footerComponent]);\n\n // Load whatever the live providers declared. Until this landed, the surface\n // resolved provider refs and stamped them into the attributes below and\n // stopped there — a provider could be declared, enabled and hydrated without\n // anything of it ever running.\n useWebsiteProviderScripts(runtime.frontendProviderRegistry);\n useWebsiteProviderSdks(runtime.frontendProviderRegistry);\n\n const providerRootAttributes = useMemo<Record<string, string>>(() => {\n const attrs: Record<string, string> = {};\n const productAnalyticsProviderRef = runtime.frontendProviderRegistry\n ?.findProviderByProviderCapability(\n BUILTIN_PROVIDER_CAPABILITY.FRONTEND_PRODUCT_ANALYTICS,\n )\n ?.metadata.ref;\n const errorMonitoringProviderRef = runtime.frontendProviderRegistry\n ?.findProviderByProviderCapability(\n BUILTIN_PROVIDER_CAPABILITY.FRONTEND_ERROR_MONITORING,\n )\n ?.metadata.ref;\n const captchaProviderRef = runtime.frontendProviderRegistry\n ?.findProviderByProviderCapability(\n BUILTIN_PROVIDER_CAPABILITY.FRONTEND_CAPTCHA,\n )\n ?.metadata.ref;\n\n if (productAnalyticsProviderRef) {\n attrs['data-website-product-analytics-provider-ref'] = productAnalyticsProviderRef;\n }\n if (errorMonitoringProviderRef) {\n attrs['data-website-error-monitoring-provider-ref'] = errorMonitoringProviderRef;\n }\n if (captchaProviderRef) {\n attrs['data-website-captcha-provider-ref'] = captchaProviderRef;\n }\n\n return attrs;\n }, [runtime.frontendProviderRegistry]);\n\n /**\n * Resolved skip-link label. Reads through the runtime label pack\n * via the standard `useWebsiteLabelByKey` hook so a missing\n * translation surfaces the same diagnostic shape as any other\n * missing chrome label. The framework guarantees the key reaches\n * the bridge (see `pickLabelsForPage`) and the consumer's\n * label-pack validator (see `composeEffectiveChromeLabelKeys` in\n * `label-pack-loader.ts`) ensures it is present in every locale\n * pack — there is therefore no silent-fallback path that would\n * ship an English skip link to a non-EN visitor.\n */\n const skipLinkLabel = useWebsiteLabelByKey(runtime.skipToMainContentLabelKey);\n\n return (\n <WebsitePageContextProvider value={pageContextValue}>\n <div\n data-website-page-ref={safePageRef as unknown as string}\n className={className}\n {...providerRootAttributes}\n >\n {/*\n * Skip link rendered as the FIRST focusable element on the\n * page so a keyboard / AT user can bypass the chrome on every\n * navigation (WCAG 2.1 §2.4.1 \"Bypass Blocks\", Level A).\n * Visually hidden by default; revealed on focus via the\n * scoped `<style>` block below.\n */}\n <style>{SKIP_LINK_FOCUS_CSS}</style>\n <a\n href={`#${MAIN_CONTENT_DOM_ID}`}\n data-website-skip-link=\"\"\n style={SKIP_LINK_HIDDEN_STYLE}\n >\n {skipLinkLabel}\n </a>\n {resolvedHeader !== null ? <header>{resolvedHeader}</header> : null}\n <main id={MAIN_CONTENT_DOM_ID} className={mainClassName} tabIndex={-1}>\n {children}\n </main>\n {resolvedFooter !== null ? <footer>{resolvedFooter}</footer> : null}\n </div>\n </WebsitePageContextProvider>\n );\n}\nWebsitePageLayout.displayName = 'WebsitePageLayout';\n/** @wildo_source:part:end saas.website.page-layout.component */\n"]}
1
+ {"version":3,"file":"WebsitePageLayout.js","sourceRoot":"","sources":["../../../../src/core/layouts/WebsitePageLayout.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,OAAO,EAAkB,MAAM,OAAO,CAAC;AACvD,OAAO,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC;AAEnF,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,EACL,yBAAyB,EACzB,sBAAsB,GACvB,MAAM,iDAAiD,CAAC;AAEzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EACL,o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AI,0BAA0B,EAAE,CAAC;YAC/B,KAAK,CAAC,4CAA4C,CAAC,GAAG,0BAA0B,CAAC;QACnF,CAAC;QACD,IAAI,kBAAkB,EAAE,CAAC;YACvB,KAAK,CAAC,mCAAmC,CAAC,GAAG,kBAAkB,CAAC;QAClE,CAAC;QAED,OAAO,KAAK,CAAC;IACf,CAAC,EAAE,CAAC,OAAO,CAAC,wBAAwB,CAAC,CAAC,CAAC;IAEvC;;;;;;;;;;OAUG;IACH,MAAM,aAAa,GAAG,oBAAoB,CAAC,OAAO,CAAC,yBAAyB,CAAC,CAAC;IAE9E,OAAO,CACL,KAAC,0BAA0B,IAAC,KAAK,EAAE,gBAAgB,YACjD,wCACyB,WAAgC,EACvD,SAAS,EAAE,SAAS,KAChB,sBAAsB,aAS1B,0BAAQ,mBAAmB,GAAS,EACpC,YACE,IAAI,EAAE,IAAI,mBAAmB,EAAE,4BACR,EAAE,EACzB,KAAK,EAAE,sBAAsB,YAE5B,aAAa,GACZ,EACH,cAAc,KAAK,IAAI,CAAC,CAAC,CAAC,2BAAS,cAAc,GAAU,CAAC,CAAC,CAAC,IAAI,EACnE,eAAM,EAAE,EAAE,mBAAmB,EAAE,SAAS,EAAE,aAAa,EAAE,QAAQ,EAAE,CAAC,CAAC,YAClE,QAAQ,GACJ,EACN,cAAc,KAAK,IAAI,CAAC,CAAC,CAAC,2BAAS,cAAc,GAAU,CAAC,CAAC,CAAC,IAAI,IAC/D,GACqB,CAC9B,CAAC;AACJ,CAAC;AACD,iBAAiB,CAAC,WAAW,GAAG,mBAAmB,CAAC","sourcesContent":["import React, { useMemo, type ReactNode } from 'react';\nimport { BUILTIN_PROVIDER_CAPABILITY } from '@wildo-ai/saas-models/public-runtime';\n\nimport { WebsitePageContextProvider } from '../contexts/WebsitePageContext';\nimport {\n useWebsiteProviderScripts,\n useWebsiteProviderSdks,\n} from '../external-providers/useWebsiteProviderScripts';\nimport type { WebsitePageContextValue } from '../contexts/WebsitePageContext';\nimport { useWebsiteRuntime } from '../contexts/useWebsiteRuntime';\nimport { useWebsiteLabelByKey } from '../hooks/useWebsiteLabel';\nimport {\n WebsitePageRefSchema,\n type WebsitePageRef,\n} from '../../schemas/refs/page-ref.schemas';\n\n/**\n * Stable DOM id stamped on the `<main>` element so the framework's\n * skip-link `<a href=\"#main-content\">` can move keyboard focus past\n * the chrome on every page (Phase 6 audit fix M-α). Co-located here\n * (rather than exposed as a prop) because:\n * - The skip-link target is a framework concern — exposing it as a\n * consumer-tunable id would invite drift between the link's href\n * and the main element's id.\n * - Screen readers announce the heading inside `<main id=\"...\">` on\n * focus; a stable, framework-owned id keeps that affordance\n * deterministic across every page on every site.\n */\nconst MAIN_CONTENT_DOM_ID = 'main-content';\n\n/**\n * Inline style for the skip link's \"visually hidden by default,\n * visible on focus\" pattern. Inlined (NOT shipped as a CSS class)\n * because:\n * - The framework intentionally avoids shipping any CSS file the\n * consumer must opt in to — the only stylesheet emitted is the\n * `:root { --website-*: … }` design-token block, and the rest of\n * the styling surface lives in consumer code (see Phase 5\n * `renderWebsiteDesignTokensCss`). Inlining keeps the skip link\n * self-sufficient and side-effect-free.\n * - The \"skip-link\" pattern is a small, well-known a11y idiom; the\n * handful of style declarations here do not benefit from being\n * reorganized into a class with a custom-property hook.\n *\n * The \"focused\" variant uses BOTH `:focus` AND `:focus-visible`\n * pseudo-classes via a scoped `<style>` tag inside the layout output.\n * We cannot apply pseudo-class styles via a `style` attribute, but\n * emitting a tiny scoped block once at the layout root is safe (one\n * block per page render, ~120 bytes) and avoids importing a CSS-in-JS\n * runtime.\n *\n * **Why both selectors and not just `:focus-visible`** (Phase 6 fourth\n * audit fix M-Η): `:focus-visible` is the modern UA-heuristic-driven\n * selector that hides focus rings on mouse clicks, and it is the\n * RIGHT default for buttons / links. For a skip link though we WANT\n * the affordance to appear on EVERY focus event — the link is\n * invisible by default and a keyboard-only user (the only intended\n * audience) is the only one who can reach it. Older browsers that\n * predate `:focus-visible` (and Safari < 15.4 with the feature\n * disabled) would skip the rule entirely with a `:focus-visible`-only\n * declaration, leaving the keyboard user looking at an apparently\n * empty page when they pressed Tab. Pairing `:focus, :focus-visible`\n * is the documented WCAG 2.1 fallback pattern.\n */\nconst SKIP_LINK_HIDDEN_STYLE: React.CSSProperties = {\n position: 'absolute',\n top: 0,\n left: 0,\n width: '1px',\n height: '1px',\n padding: 0,\n margin: '-1px',\n overflow: 'hidden',\n clip: 'rect(0 0 0 0)',\n whiteSpace: 'nowrap',\n border: 0,\n};\n\n/**\n * Single scoped style block for the skip link's `:focus-visible`\n * affordance. Targets the `data-website-skip-link` attribute (NOT a\n * class) so consumer Tailwind / utility classes cannot accidentally\n * shadow it. Stays trivially small to keep payload under the\n * \"framework rendering\" implicit budget.\n */\nconst SKIP_LINK_FOCUS_CSS = `\n[data-website-skip-link]:focus,\n[data-website-skip-link]:focus-visible {\n position: fixed !important;\n top: 0.5rem !important;\n left: 0.5rem !important;\n width: auto !important;\n height: auto !important;\n padding: 0.75rem 1rem !important;\n margin: 0 !important;\n overflow: visible !important;\n clip: auto !important;\n white-space: normal !important;\n background: var(--website-colors-background, #fff) !important;\n color: var(--website-colors-foreground, #000) !important;\n border: 2px solid var(--website-colors-primary, #000) !important;\n border-radius: var(--website-radii-md, 0.375rem) !important;\n z-index: 9999 !important;\n text-decoration: none !important;\n}\n`.trim();\n\n/**\n * @wildo_source:part:start saas.website.page-layout.component facet:layer:core facet:family:website\n *\n * `WebsitePageLayout` — the per-page structural primitive.\n *\n * **Three responsibilities** (each carrying its own semantic weight):\n *\n * 1. **Provides `WebsitePageContext`** — registers the active page\n * ref so child sections (`<WebsiteSection>`) and label hooks\n * (`useWebsiteLabel`) can derive label keys without re-typing\n * the page ref at every leaf.\n * 2. **Renders the site-wide chrome** — pulls\n * `headerComponent` and `footerComponent` from the runtime\n * navigation config and wraps the page's main content in the\n * site's standard header/main/footer scaffold. Per-page\n * overrides (`header={…}` / `footer={…}` props) take precedence\n * over the runtime defaults so individual pages can opt into a\n * custom chrome (eg. a campaign landing page running with\n * header-only minimal chrome).\n * 3. **Stamps DOM landmarks** — emits `data-website-page-ref` on\n * the layout root for analytics / SEO crawlers / overlay\n * tooling that needs to identify the active page from the DOM\n * without booting React. When the website facet hydrates\n * frontend-provider bootstraps, the same root also carries the\n * active public provider refs for analytics / browser-monitoring /\n * captcha so non-React tooling can detect the configured vendor\n * without reverse-engineering app code.\n *\n * **Why semantic `<header>` / `<main>` / `<footer>` elements**:\n * marketing-site SEO scoring penalizes pages that ship a single\n * unstructured `<div>` tree. Using semantic landmarks costs nothing\n * and improves crawler accessibility AND screen-reader\n * navigability — both are first-class concerns for a public\n * marketing surface.\n *\n * **Why this lives in `core/`** (not `components/`): the layout is\n * structural framework machinery (it owns the page-context\n * provisioning + the navigation slot resolution), not a styled\n * primitive. Designers override `header` / `footer` via runtime\n * config or per-page props, NOT by replacing this component.\n */\nexport interface WebsitePageLayoutProps {\n /**\n * The active page's ref. Accepts either an already-branded\n * `WebsitePageRef` or a raw string — the layout parses through\n * `WebsitePageRefSchema` so a malformed ref fails loud at render.\n *\n * Typically sourced from the page's `WebsitePageManifest.ref`\n * (eg. `<WebsitePageLayout pageRef={LANDING_PAGE_MANIFEST.ref}>`).\n */\n pageRef: WebsitePageRef | string;\n /**\n * Per-page header override. When supplied, takes precedence over\n * `WebsiteRuntimeContext.designTokens` navigation config's\n * `headerComponent`. Pass `null` explicitly to suppress the header\n * entirely (campaign landing pages without site-wide nav).\n */\n header?: ReactNode | null;\n /**\n * Per-page footer override. Same semantics as `header`.\n */\n footer?: ReactNode | null;\n /**\n * Optional className applied to the root `<div data-website-page-ref=\"…\">`\n * wrapper. Use for page-level layout tweaks (eg. `min-h-screen` on\n * landing pages).\n */\n className?: string;\n /**\n * Optional className applied to the inner `<main>` element. Use for\n * vertical-rhythm overrides on long-scroll landing pages.\n */\n mainClassName?: string;\n /**\n * The page's section composition. Typically a sequence of\n * `<WebsiteSection>` wrappers around concrete section components.\n */\n children: ReactNode;\n}\n\nexport function WebsitePageLayout({\n pageRef,\n header,\n footer,\n className,\n mainClassName,\n children,\n}: WebsitePageLayoutProps): ReactNode {\n const runtime = useWebsiteRuntime();\n\n /**\n * Defensive parse: callers should pass a `WebsitePageManifest.ref`\n * (already branded), but accepting raw strings + parsing here means\n * a hand-typed call site can't smuggle a malformed ref into the\n * label-key derivation chain.\n */\n const safePageRef = useMemo<WebsitePageRef>(\n () => WebsitePageRefSchema.parse(pageRef),\n [pageRef],\n );\n\n const pageContextValue = useMemo<WebsitePageContextValue>(\n () => ({ pageRef: safePageRef }),\n [safePageRef],\n );\n\n /**\n * Header resolution rules:\n * - `header === null` => explicit suppression\n * - `header !== undefined` => per-page override (any ReactNode)\n * - `header === undefined` => fall back to the runtime navigation\n * config's `headerComponent`\n *\n * The fallback is the common path: every page renders the same\n * site-wide chrome. The override path is the escape hatch (campaign\n * landing pages with custom header layouts).\n */\n const resolvedHeader = useMemo<ReactNode>(() => {\n if (header === null) return null;\n if (header !== undefined) return header;\n const HeaderComponent = runtime.navigation.headerComponent;\n return <HeaderComponent />;\n }, [header, runtime.navigation.headerComponent]);\n\n const resolvedFooter = useMemo<ReactNode>(() => {\n if (footer === null) return null;\n if (footer !== undefined) return footer;\n const FooterComponent = runtime.navigation.footerComponent;\n return <FooterComponent />;\n }, [footer, runtime.navigation.footerComponent]);\n\n // Load whatever the live providers declared. Until this landed, the surface\n // resolved provider refs and stamped them into the attributes below and\n // stopped there — a provider could be declared, enabled and hydrated without\n // anything of it ever running.\n useWebsiteProviderScripts(runtime.frontendProviderRegistry);\n useWebsiteProviderSdks(runtime.frontendProviderRegistry);\n\n const providerRootAttributes = useMemo<Record<string, string>>(() => {\n const attrs: Record<string, string> = {};\n const productAnalyticsProviderRef = runtime.frontendProviderRegistry\n ?.findProviderByProviderCapability(\n BUILTIN_PROVIDER_CAPABILITY.FRONTEND_PRODUCT_ANALYTICS,\n )\n ?.metadata.ref;\n const errorMonitoringProviderRef = runtime.frontendProviderRegistry\n ?.findProviderByProviderCapability(\n BUILTIN_PROVIDER_CAPABILITY.FRONTEND_ERROR_MONITORING,\n )\n ?.metadata.ref;\n const captchaProviderRef = runtime.frontendProviderRegistry\n ?.findProviderByProviderCapability(\n BUILTIN_PROVIDER_CAPABILITY.FRONTEND_CAPTCHA,\n )\n ?.metadata.ref;\n\n if (productAnalyticsProviderRef) {\n attrs['data-website-product-analytics-provider-ref'] = productAnalyticsProviderRef;\n }\n if (errorMonitoringProviderRef) {\n attrs['data-website-error-monitoring-provider-ref'] = errorMonitoringProviderRef;\n }\n if (captchaProviderRef) {\n attrs['data-website-captcha-provider-ref'] = captchaProviderRef;\n }\n\n return attrs;\n }, [runtime.frontendProviderRegistry]);\n\n /**\n * Resolved skip-link label. Reads through the runtime label pack\n * via the standard `useWebsiteLabelByKey` hook so a missing\n * translation surfaces the same diagnostic shape as any other\n * missing chrome label. The framework guarantees the key reaches\n * the bridge (see `pickLabelsForPage`) and the consumer's\n * label-pack validator (see `composeEffectiveChromeLabelKeys` in\n * `label-pack-loader.ts`) ensures it is present in every locale\n * pack — there is therefore no silent-fallback path that would\n * ship an English skip link to a non-EN visitor.\n */\n const skipLinkLabel = useWebsiteLabelByKey(runtime.skipToMainContentLabelKey);\n\n return (\n <WebsitePageContextProvider value={pageContextValue}>\n <div\n data-website-page-ref={safePageRef as unknown as string}\n className={className}\n {...providerRootAttributes}\n >\n {/*\n * Skip link rendered as the FIRST focusable element on the\n * page so a keyboard / AT user can bypass the chrome on every\n * navigation (WCAG 2.1 §2.4.1 \"Bypass Blocks\", Level A).\n * Visually hidden by default; revealed on focus via the\n * scoped `<style>` block below.\n */}\n <style>{SKIP_LINK_FOCUS_CSS}</style>\n <a\n href={`#${MAIN_CONTENT_DOM_ID}`}\n data-website-skip-link=\"\"\n style={SKIP_LINK_HIDDEN_STYLE}\n >\n {skipLinkLabel}\n </a>\n {resolvedHeader !== null ? <header>{resolvedHeader}</header> : null}\n <main id={MAIN_CONTENT_DOM_ID} className={mainClassName} tabIndex={-1}>\n {children}\n </main>\n {resolvedFooter !== null ? <footer>{resolvedFooter}</footer> : null}\n </div>\n </WebsitePageContextProvider>\n );\n}\nWebsitePageLayout.displayName = 'WebsitePageLayout';\n/** @wildo_source:part:end saas.website.page-layout.component */\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"WebsiteSection.d.ts","sourceRoot":"","sources":["../../../../../src/core/layouts/WebsiteSection.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAgC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAI5E,OAAO,EAAE,sBAAsB,EAAE,MAAM,wDAAwD,CAAC;AAChG,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,wCAAwC,CAAC;AAEhD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;;;;OAMG;IACH,UAAU,EAAE,iBAAiB,GAAG,MAAM,CAAC;IACvC;;;;;;;OAOG;IACH,QAAQ,EAAE,sBAAsB,CAAC;IACjC;;;;OAIG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,wBAAgB,cAAc,CAAC,EAC7B,UAAU,EACV,QAAQ,EACR,EAAE,EACF,SAAS,EACT,QAAQ,EACR,SAAS,EACT,cAAc,GACf,EAAE,mBAAmB,GAAG,SAAS,CAmCjC;yBA3Ce,cAAc;;;AA6C9B,4DAA4D"}
1
+ {"version":3,"file":"WebsiteSection.d.ts","sourceRoot":"","sources":["../../../../src/core/layouts/WebsiteSection.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAgC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAI5E,OAAO,EAAE,sBAAsB,EAAE,MAAM,wDAAwD,CAAC;AAChG,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,wCAAwC,CAAC;AAEhD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;;;;OAMG;IACH,UAAU,EAAE,iBAAiB,GAAG,MAAM,CAAC;IACvC;;;;;;;OAOG;IACH,QAAQ,EAAE,sBAAsB,CAAC;IACjC;;;;OAIG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,wBAAgB,cAAc,CAAC,EAC7B,UAAU,EACV,QAAQ,EACR,EAAE,EACF,SAAS,EACT,QAAQ,EACR,SAAS,EACT,cAAc,GACf,EAAE,mBAAmB,GAAG,SAAS,CAmCjC;yBA3Ce,cAAc;;;AA6C9B,4DAA4D"}
@@ -1 +1 @@
1
- {"version":3,"file":"internal-routing.utils.d.ts","sourceRoot":"","sources":["../../../../../src/core/routing/internal-routing.utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAE9E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,MAAM,WAAW,8BAA8B;IAC7C,iFAAiF;IACjF,MAAM,EAAE,iBAAiB,CAAC;IAC1B,sFAAsF;IACtF,aAAa,EAAE,iBAAiB,CAAC;IACjC;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,8BAA8B,GAAG,MAAM,CAWpF;AACD,iEAAiE"}
1
+ {"version":3,"file":"internal-routing.utils.d.ts","sourceRoot":"","sources":["../../../../src/core/routing/internal-routing.utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAE9E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,MAAM,WAAW,8BAA8B;IAC7C,iFAAiF;IACjF,MAAM,EAAE,iBAAiB,CAAC;IAC1B,sFAAsF;IACtF,aAAa,EAAE,iBAAiB,CAAC;IACjC;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,8BAA8B,GAAG,MAAM,CAWpF;AACD,iEAAiE"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4FG;AAEH,cAAc,iCAAiC,CAAC;AAChD,cAAc,oCAAoC,CAAC;AACnD,cAAc,gDAAgD,CAAC;AAC/D,cAAc,oDAAoD,CAAC;AACnE,cAAc,8DAA8D,CAAC;AAC7E,cAAc,kEAAkE,CAAC;AACjF,cAAc,iEAAiE,CAAC;AAChF,cAAc,8DAA8D,CAAC;AAC7E,cAAc,0DAA0D,CAAC;AACzE,cAAc,wDAAwD,CAAC;AACvE,cAAc,qDAAqD,CAAC;AACpE,cAAc,2CAA2C,CAAC;AAE1D,cAAc,uCAAuC,CAAC;AACtD,cAAc,mCAAmC,CAAC;AAClD,cAAc,oCAAoC,CAAC;AACnD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,uCAAuC,CAAC;AACtD,cAAc,mCAAmC,CAAC;AAClD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qCAAqC,CAAC;AACpD,cAAc,yCAAyC,CAAC;AACxD,cAAc,+CAA+C,CAAC;AAC9D,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config.d.ts","sourceRoot":"","sources":["../../../../src/mdx/blog-post-collection.config.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,sDAAsD,CAAC;AAE9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+EG;AAEH;;;;;;GAMG;AACH,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,KAAK;QACxC,WAAW,EAAE,MAAM,OAAO,CAAC;KAC5B,CAAC;CACH;AAED,MAAM,WAAW,oCAAoC;IACnD;;;;;;OAMG;IACH,MAAM,EAAE,oBAAoB,CAAC;CAC9B;AAED,MAAM,WAAW,6BAA6B;IAC5C;;;;;;OAMG;IACH,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,wBAAgB,6BAA6B,CAC3C,IAAI,EAAE,oCAAoC,GACzC,6BAA6B,CAK/B;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,+BAA+B;IAC9C;;;;;OAKG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,wBAAgB,wBAAwB,CACtC,GAAG,EAAE,OAAO,EACZ,GAAG,GAAE,+BAAoC,GACxC,mBAAmB,CAkBrB;AACD,iEAAiE"}
1
+ {"version":3,"file":"blog-post-collection.config.d.ts","sourceRoot":"","sources":["../../../src/mdx/blog-post-collection.config.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,sDAAsD,CAAC;AAE9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+EG;AAEH;;;;;;GAMG;AACH,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,KAAK;QACxC,WAAW,EAAE,MAAM,OAAO,CAAC;KAC5B,CAAC;CACH;AAED,MAAM,WAAW,oCAAoC;IACnD;;;;;;OAMG;IACH,MAAM,EAAE,oBAAoB,CAAC;CAC9B;AAED,MAAM,WAAW,6BAA6B;IAC5C;;;;;;OAMG;IACH,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,wBAAgB,6BAA6B,CAC3C,IAAI,EAAE,oCAAoC,GACzC,6BAA6B,CAK/B;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,+BAA+B;IAC9C;;;;;OAKG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,wBAAgB,wBAAwB,CACtC,GAAG,EAAE,OAAO,EACZ,GAAG,GAAE,+BAAoC,GACxC,mBAAmB,CAkBrB;AACD,iEAAiE"}
@@ -1 +1 @@
1
- {"version":3,"file":"blog-post-frontmatter-source.d.ts","sourceRoot":"","sources":["../../../../src/mdx/blog-post-frontmatter-source.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,+BAA+B,EACrC,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sDAAsD,CAAC;AAEhG;;;;;;GAMG;AACH,MAAM,MAAM,4CAA4C,GAAG,+BAA+B,CAAC;AAE3F,wBAAgB,qCAAqC,CACnD,MAAM,EAAE,MAAM,EACd,GAAG,GAAE,4CAAiD,GACrD,mBAAmB,CAUrB"}
1
+ {"version":3,"file":"blog-post-frontmatter-source.d.ts","sourceRoot":"","sources":["../../../src/mdx/blog-post-frontmatter-source.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,+BAA+B,EACrC,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sDAAsD,CAAC;AAEhG;;;;;;GAMG;AACH,MAAM,MAAM,4CAA4C,GAAG,+BAA+B,CAAC;AAE3F,wBAAgB,qCAAqC,CACnD,MAAM,EAAE,MAAM,EACd,GAAG,GAAE,4CAAiD,GACrD,mBAAmB,CAUrB"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/mdx/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EACL,QAAQ,EACR,kBAAkB,EAClB,KAAK,aAAa,EAClB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,GAC1B,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,6BAA6B,EAC7B,wBAAwB,EACxB,KAAK,oBAAoB,EACzB,KAAK,oCAAoC,EACzC,KAAK,6BAA6B,EAClC,KAAK,+BAA+B,GACrC,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,kBAAkB,EAClB,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,GAC7B,MAAM,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/mdx/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EACL,QAAQ,EACR,kBAAkB,EAClB,KAAK,aAAa,EAClB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,GAC1B,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,6BAA6B,EAC7B,wBAAwB,EACxB,KAAK,oBAAoB,EACzB,KAAK,oCAAoC,EACzC,KAAK,6BAA6B,EAClC,KAAK,+BAA+B,GACrC,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,kBAAkB,EAClB,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,GAC7B,MAAM,wBAAwB,CAAC"}