@wildo-ai/saas-website 1.1.7 → 1.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/astro/assert-website-pages-have-sections.d.ts +28 -0
- package/dist/esm/astro/assert-website-pages-have-sections.d.ts.map +1 -0
- package/dist/esm/astro/assert-website-pages-have-sections.js +38 -0
- package/dist/esm/astro/assert-website-pages-have-sections.js.map +1 -0
- package/dist/esm/astro/blog-post-bridge.d.ts.map +1 -1
- package/dist/esm/astro/blog-post-bridge.js.map +1 -1
- package/dist/esm/astro/blog-post-head.renderer.d.ts.map +1 -1
- package/dist/esm/astro/bridge-runtime.d.ts.map +1 -1
- package/dist/esm/astro/bridge-runtime.js.map +1 -1
- package/dist/esm/astro/collect-expected-label-keys.d.ts.map +1 -1
- package/dist/esm/astro/headers-renderer.d.ts.map +1 -1
- package/dist/esm/astro/i18n-routing.helper.d.ts.map +1 -1
- package/dist/esm/astro/label-pack-loader.d.ts +6 -0
- package/dist/esm/astro/label-pack-loader.d.ts.map +1 -1
- package/dist/esm/astro/label-pack-loader.js +10 -0
- package/dist/esm/astro/label-pack-loader.js.map +1 -1
- package/dist/esm/astro/llms-txt-server.d.ts.map +1 -1
- package/dist/esm/astro/pick-labels-for-page.d.ts.map +1 -1
- package/dist/esm/astro/robots-renderer.d.ts.map +1 -1
- package/dist/esm/astro/robots-renderer.js.map +1 -1
- package/dist/esm/astro/sitemap-coverage.d.ts.map +1 -1
- package/dist/esm/astro/structured-data.renderer.d.ts.map +1 -1
- package/dist/esm/astro/website-page-head.renderer.d.ts.map +1 -1
- package/dist/esm/astro/website-page-head.renderer.js.map +1 -1
- package/dist/esm/astro/website-page-runtime.helper.d.ts.map +1 -1
- package/dist/esm/astro/website-site-context.d.ts.map +1 -1
- package/dist/esm/astro/website-site-context.js.map +1 -1
- package/dist/esm/astro-island.d.ts.map +1 -1
- package/dist/esm/astro.d.ts +1 -0
- package/dist/esm/astro.d.ts.map +1 -1
- package/dist/esm/astro.js +1 -0
- package/dist/esm/astro.js.map +1 -1
- package/dist/esm/companion-exports.d.ts.map +1 -1
- package/dist/esm/companion-exports.js.map +1 -1
- package/dist/esm/components/low-level/WebsiteInternalButton.d.ts.map +1 -1
- package/dist/esm/components/low-level/WebsiteInternalLink.d.ts.map +1 -1
- package/dist/esm/config/define-website-config.d.ts.map +1 -1
- package/dist/esm/config/define-website-config.js.map +1 -1
- package/dist/esm/config/index.d.ts.map +1 -1
- package/dist/esm/config/load-website-config.d.ts.map +1 -1
- package/dist/esm/config/load-website-config.js.map +1 -1
- package/dist/esm/config/load-website-pricing-catalog.d.ts.map +1 -1
- package/dist/esm/config/load-website-pricing-catalog.js.map +1 -1
- package/dist/esm/config/load-website-site-context.d.ts.map +1 -1
- package/dist/esm/config/load-website-site-context.js.map +1 -1
- package/dist/esm/config/wildo-website-config.schemas.d.ts.map +1 -1
- package/dist/esm/config-loader.d.ts.map +1 -1
- package/dist/esm/config-loader.js.map +1 -1
- package/dist/esm/core/anonymous-session/InboundContactForm.d.ts.map +1 -1
- package/dist/esm/core/anonymous-session/InboundContactForm.js.map +1 -1
- package/dist/esm/core/anonymous-session/inbound-contact-form.schema.d.ts.map +1 -1
- package/dist/esm/core/anonymous-session/inbound-contact-form.schema.js.map +1 -1
- package/dist/esm/core/anonymous-session/website-anonymous-session-client.d.ts.map +1 -1
- package/dist/esm/core/anonymous-session/website-anonymous-session-client.js.map +1 -1
- package/dist/esm/core/anonymous-session/website-submission-challenge.d.ts.map +1 -1
- package/dist/esm/core/anonymous-session/website-submission-challenge.js.map +1 -1
- package/dist/esm/core/consent/WebsiteConsentBanner.d.ts.map +1 -1
- package/dist/esm/core/consent/WebsiteConsentBanner.js.map +1 -1
- package/dist/esm/core/consent/WebsiteConsentContext.d.ts.map +1 -1
- package/dist/esm/core/consent/WebsiteConsentGate.d.ts.map +1 -1
- package/dist/esm/core/consent/useWebsiteConsent.d.ts.map +1 -1
- package/dist/esm/core/consent/website-consent-storage.d.ts.map +1 -1
- package/dist/esm/core/contexts/WebsitePageContext.d.ts.map +1 -1
- package/dist/esm/core/contexts/WebsiteRuntimeContext.d.ts.map +1 -1
- package/dist/esm/core/contexts/WebsiteRuntimeContext.js.map +1 -1
- package/dist/esm/core/contexts/WebsiteSectionContext.d.ts.map +1 -1
- package/dist/esm/core/contexts/useWebsitePage.d.ts.map +1 -1
- package/dist/esm/core/contexts/useWebsiteRuntime.d.ts.map +1 -1
- package/dist/esm/core/contexts/useWebsiteRuntime.js.map +1 -1
- package/dist/esm/core/contexts/useWebsiteSection.d.ts.map +1 -1
- package/dist/esm/core/external-providers/WebsiteProviderComponent.d.ts.map +1 -1
- package/dist/esm/core/external-providers/WebsiteProviderComponent.js.map +1 -1
- package/dist/esm/core/external-providers/frontend-provider-registry.website.d.ts.map +1 -1
- package/dist/esm/core/external-providers/provider-component-registry.website.d.ts.map +1 -1
- package/dist/esm/core/external-providers/provider-component-registry.website.js.map +1 -1
- package/dist/esm/core/external-providers/useWebsiteProviderComponent.d.ts.map +1 -1
- package/dist/esm/core/external-providers/useWebsiteProviderComponent.js.map +1 -1
- package/dist/esm/core/external-providers/useWebsiteProviderScripts.d.ts.map +1 -1
- package/dist/esm/core/external-providers/useWebsiteProviderScripts.js.map +1 -1
- package/dist/esm/core/external-providers/website-provider-sdk-activations.d.ts.map +1 -1
- package/dist/esm/core/external-providers/website-provider-sdk-activations.js.map +1 -1
- package/dist/esm/core/factories/define-website-page-manifest.d.ts.map +1 -1
- package/dist/esm/core/factories/define-website-section.d.ts +2 -0
- package/dist/esm/core/factories/define-website-section.d.ts.map +1 -1
- package/dist/esm/core/factories/define-website-section.js +2 -0
- package/dist/esm/core/factories/define-website-section.js.map +1 -1
- package/dist/esm/core/hooks/useWebsiteDesignTokens.d.ts.map +1 -1
- package/dist/esm/core/hooks/useWebsiteLabel.d.ts.map +1 -1
- package/dist/esm/core/layouts/WebsitePageLayout.d.ts.map +1 -1
- package/dist/esm/core/layouts/WebsitePageLayout.js.map +1 -1
- package/dist/esm/core/layouts/WebsitePageSections.d.ts +43 -0
- package/dist/esm/core/layouts/WebsitePageSections.d.ts.map +1 -0
- package/dist/esm/core/layouts/WebsitePageSections.js +13 -0
- package/dist/esm/core/layouts/WebsitePageSections.js.map +1 -0
- package/dist/esm/core/layouts/WebsiteSection.d.ts.map +1 -1
- package/dist/esm/core/routing/internal-routing.utils.d.ts.map +1 -1
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/mdx/BlogPost.d.ts.map +1 -1
- package/dist/esm/mdx/blog-post-collection.config.d.ts.map +1 -1
- package/dist/esm/mdx/blog-post-frontmatter-source.d.ts.map +1 -1
- package/dist/esm/mdx/index.d.ts.map +1 -1
- package/dist/esm/mdx.d.ts.map +1 -1
- package/dist/esm/schemas/blog/blog-post-frontmatter.shared.schemas.d.ts.map +1 -1
- package/dist/esm/schemas/design-tokens/website-design-tokens.shared.schemas.d.ts.map +1 -1
- package/dist/esm/schemas/design-tokens/website-design-tokens.shared.schemas.js.map +1 -1
- package/dist/esm/schemas/label-keys/website-consent-label-keys.schemas.d.ts.map +1 -1
- package/dist/esm/schemas/label-keys/website-label-key.schemas.d.ts.map +1 -1
- package/dist/esm/schemas/label-keys/website-provider-component-label-keys.schemas.d.ts.map +1 -1
- package/dist/esm/schemas/label-keys/website-provider-component-label-keys.schemas.js.map +1 -1
- package/dist/esm/schemas/manifests/website-page-manifest.shared.schemas.d.ts +2 -0
- package/dist/esm/schemas/manifests/website-page-manifest.shared.schemas.d.ts.map +1 -1
- package/dist/esm/schemas/manifests/website-page-manifest.shared.schemas.js +12 -3
- package/dist/esm/schemas/manifests/website-page-manifest.shared.schemas.js.map +1 -1
- package/dist/esm/schemas/manifests/website-root-config.shared.schemas.d.ts +3 -3
- package/dist/esm/schemas/manifests/website-root-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/schemas/manifests/website-root-config.shared.schemas.js.map +1 -1
- package/dist/esm/schemas/refs/page-ref.schemas.d.ts.map +1 -1
- package/dist/esm/schemas/refs/section-ref.schemas.d.ts.map +1 -1
- package/dist/esm/schemas/sections/website-section-category.shared.d.ts.map +1 -1
- package/dist/esm/schemas/sections/website-section-definition.shared.schemas.d.ts +9 -0
- package/dist/esm/schemas/sections/website-section-definition.shared.schemas.d.ts.map +1 -1
- package/dist/esm/schemas/sections/website-section-definition.shared.schemas.js +11 -0
- package/dist/esm/schemas/sections/website-section-definition.shared.schemas.js.map +1 -1
- package/dist/esm/schemas/structured-data/pricing-offer-structured-data.shared.d.ts.map +1 -1
- package/dist/esm/schemas/structured-data/pricing-offer-structured-data.shared.js.map +1 -1
- package/dist/esm/schemas/structured-data/structured-data-reconciliation.shared.d.ts.map +1 -1
- package/dist/esm/schemas/structured-data/structured-data-reconciliation.shared.js.map +1 -1
- package/dist/esm/schemas/structured-data/website-structured-data.shared.schemas.d.ts.map +1 -1
- package/dist/esm/schemas/structured-data/website-structured-data.shared.schemas.js.map +1 -1
- package/dist/esm/schemas/validators/label-pack.validator.d.ts.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +5 -5
- package/src/astro/__tests__/assert-website-pages-have-sections.test.ts +75 -0
- package/src/astro/assert-website-pages-have-sections.ts +41 -0
- package/src/astro/label-pack-loader.ts +10 -0
- package/src/astro.ts +1 -0
- package/src/core/__tests__/WebsitePageSections.test.tsx +57 -0
- package/src/core/factories/define-website-section.ts +4 -0
- package/src/core/layouts/WebsitePageSections.tsx +68 -0
- package/src/index.ts +1 -0
- package/src/schemas/__tests__/page-manifest.test.ts +4 -7
- package/src/schemas/manifests/website-page-manifest.shared.schemas.ts +12 -3
- package/src/schemas/sections/website-section-definition.shared.schemas.ts +11 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"structured-data.renderer.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"structured-data.renderer.d.ts","sourceRoot":"","sources":["../../../../src/astro/structured-data.renderer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,4BAA4B,EAE7B,MAAM,mEAAmE,CAAC;AAC3E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,+DAA+D,CAAC;AAgD9G,MAAM,WAAW,+BAA+B;IAC9C;;;;OAIG;IACH,QAAQ,CAAC,EAAE,SAAS,IAAI,CAAC,wBAAwB,EAAE,YAAY,GAAG,mBAAmB,CAAC,EAAE,CAAC;IACzF;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,SAAS,4BAA4B,EAAE,CAAC;CACxD;AAED,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,+BAA+B,GAAG,MAAM,CAiDtF;AAoDD,yEAAyE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"website-page-head.renderer.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"website-page-head.renderer.d.ts","sourceRoot":"","sources":["../../../../src/astro/website-page-head.renderer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAG9E,OAAO,EAAiC,KAAK,mBAAmB,EAAE,MAAM,+DAA+D,CAAC;AACxI,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2DAA2D,CAAC;AACrG,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4CAA4C,CAAC;AAG5E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAEjE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AAEH,MAAM,WAAW,gCAAgC;IAC/C,QAAQ,EAAE,mBAAmB,CAAC;IAC9B;;;;;OAKG;IACH,WAAW,EAAE,kBAAkB,CAAC;IAChC,MAAM,EAAE,iBAAiB,CAAC;IAC1B,SAAS,EAAE,SAAS,CAAC;CACtB;AAED,wBAAgB,yB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,CAAC,CAAC;gBACzF,CAAC;YACH,CAAC;QACH,CAAC;aAAM,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE,CAAC;YAC1C,KAAK,CAAC,IAAI,CAAC,eAAe,SAAS,KAAK,UAAU,GAAG,CAAC,CAAC;QACzD,CAAC;IACH,CAAC;IACD,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAChB,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED;;;;;;;;GAQG","sourcesContent":["import type { AvailableLanguage } from '@wildo-ai/saas-models/public-runtime';\n\nimport { buildLocalizedRoutePath } from '../core/routing/internal-routing.utils';\nimport { websiteDesignTokenCssProperty, type WebsiteDesignTokens } from '../schemas/design-tokens/website-design-tokens.shared.schemas';\nimport type { WebsitePageManifest } from '../schemas/manifests/website-page-manifest.shared.schemas';\nimport type { LabelPack } from '../schemas/validators/label-pack.validator';\n\nimport { escapeHtmlAttribute, escapeHtmlText } from './internal/html-escape';\nimport type { WebsiteSiteContext } from './website-site-context';\n\n/**\n * @wildo_source:part:start saas.website.astro.head-renderer facet:layer:astro facet:family:website\n *\n * Head-block renderers — pure string builders the consumer's per-page\n * `.astro` file injects via `<Fragment set:html={...}/>` /\n * `<style set:html={...}></style>`. Two functions:\n *\n * - `renderWebsitePageHeadHtml(opts)` — emits the complete SEO\n * `<head>` block: `<title>`, meta description, full Open Graph\n * card (`og:title` / `og:description` / `og:type` / `og:url` /\n * `og:site_name` / `og:locale` / `og:locale:alternate` / optional\n * `og:image`), Twitter card mirrors, `<link rel=\"canonical\">`,\n * and one `<link rel=\"alternate\" hreflang>` per declared locale\n * (plus an `x-default` for Google's i18n discoverability). Every\n * URL is ABSOLUTE (composed from `websiteConfig.publicOrigin` +\n * the page's `routePath`) — relative hreflang/canonical\n * annotations are not honored consistently across crawlers\n * (Phase 6 audit findings H-B / H-C / M-A).\n * - `renderWebsiteDesignTokensCss(tokens)` — flattens the design-token\n * bundle into `--website-*` custom properties scoped to `:root`.\n * Server-static — zero island JS.\n *\n * **Why pure string builders** (rather than React components or Astro\n * components):\n *\n * 1. **Avoids the `.astro` distribution problem.** A `.astro` shell\n * cannot be re-exported from a TS subpath barrel and `tsc` does\n * not copy `.astro` files to `dist/`. Pure TS sidesteps both.\n * 2. **Avoids the React-island boundary.** Rendering head content\n * via React would require either (a) a server-only React subtree\n * (extra moving part) or (b) hydrating the `<head>` on the client\n * (waste of bundle size for static-build content).\n * 3. **Vitest-friendly.** Pure functions returning strings are\n * trivially asserted against without an Astro test harness.\n *\n * **HTML escaping**: every consumer-supplied string (title,\n * description, OG image URL, hreflang values) is escaped with\n * `escapeHtmlAttribute` / `escapeHtmlText` before interpolation into\n * the emitted markup. Marketing copy frequently contains characters\n * (quotes, ampersands, the rare `<`) that would break the surrounding\n * tag if interpolated raw — escaping is non-negotiable for a public\n * surface.\n *\n * **Failure modes** — `renderWebsitePageHeadHtml` throws when:\n * - `manifest.metaLabelKeys.titleKey` is absent from the pack\n * - `manifest.metaLabelKeys.descriptionKey` is absent from the pack\n * Both throw with the locale + key + actionable next step (`Run\n * \\`wildo website audit\\` or add the entry to <pack-path>.json`).\n */\n\nexport interface RenderWebsitePageHeadHtmlOptions {\n manifest: WebsitePageManifest;\n /**\n * Composed `WebsiteSiteContext` — the renderer reads\n * `websiteConfig.{defaultLocale, locales, publicOrigin}` for the\n * URL/locale surface and `rootConfig.seo.{siteName, defaultOgImageUrl}`\n * for the SEO branding fallback.\n */\n siteContext: WebsiteSiteContext;\n locale: AvailableLanguage;\n labelPack: LabelPack;\n}\n\nexport function renderWebsitePageHeadHtml(opts: RenderWebsitePageHeadHtmlOptions): string {\n const { manifest, siteContext, locale, labelPack } = opts;\n const { rootConfig, websiteConfig } = siteContext;\n\n const titleKey = manifest.metaLabelKeys.titleKey as unknown as string;\n const descriptionKey = manifest.metaLabelKeys.descriptionKey as unknown as string;\n const title = labelPack[titleKey];\n const description = labelPack[descriptionKey];\n\n if (title === undefined) {\n throw new Error(\n `[renderWebsitePageHeadHtml] Label pack for locale \"${locale}\" is missing ` +\n `the page title key \"${titleKey}\" (page ref=\"${manifest.ref as unknown as string}\"). ` +\n `Run \\`wildo website audit\\` or add the entry to your <locale>.json pack.`,\n );\n }\n if (description === undefined) {\n throw new Error(\n `[renderWebsitePageHeadHtml] Label pack for locale \"${locale}\" is missing ` +\n `the page description key \"${descriptionKey}\" (page ref=\"${manifest.ref as unknown as string}\"). ` +\n `Run \\`wildo website audit\\` or add the entry to your <locale>.json pack.`,\n );\n }\n\n /**\n * OG image precedence: per-page `manifest.metaLabelKeys.ogImageUrl`\n * wins; falls back to the site-level `seo.defaultOgImageUrl` so\n * marketing pages without a hero image still produce a richer\n * social-card (Phase 6 audit fix M-A). When neither is present,\n * the Twitter card kind degrades to the smaller `summary` and the\n * `og:image` / `twitter:image` lines are omitted entirely.\n */\n const ogImageUrl = manifest.metaLabelKeys.ogImageUrl ?? rootConfig.seo.defaultOgImageUrl;\n const titleAttr = escapeHtmlAttribute(title);\n const descriptionAttr = escapeHtmlAttribute(description);\n const titleText = escapeHtmlText(title);\n\n /**\n * Absolute URL builder. `prefixDefaultLocale: false` means the\n * default locale lives at the locale-neutral path; every other\n * locale sits under `/<locale>/<routePath>`. `x-default` always\n * resolves to the default-locale path.\n *\n * Every URL emitted here is FULLY-QUALIFIED (composed against\n * `websiteConfig.publicOrigin`) — Google's hreflang spec requires\n * absolute URLs, and `<link rel=\"canonical\">` relies on absolute\n * URLs to survive cross-host fetches (preview deployments, CDN\n * edges). See `WildoMarketingWebsiteConfigSchema.publicOrigin`\n * JSDoc for the full rationale (incl. trailing-slash rejection).\n */\n const routePath = manifest.routePath as unknown as string;\n const siteOrigin = websiteConfig.publicOrigin;\n const defaultLocale = websiteConfig.defaultLocale;\n const currentLocaleStr = String(locale);\n\n /**\n * Compose the absolute URL for `(locale, routePath)` by delegating\n * the locale-prefix decision to the shared `buildLocalizedRoutePath`\n * helper — same routing rule that powers `WebsiteInternalLink`. This\n * guarantees that hreflang/canonical URLs and the chrome's internal\n * links can never disagree about how a locale is prefixed.\n */\n function buildAbsoluteUrl(forLocale: AvailableLanguage): string {\n const path = buildLocalizedRoutePath({\n locale: forLocale,\n defaultLocale,\n routePath,\n });\n return `${siteOrigin}${path}`;\n }\n\n const canonicalUrl = buildAbsoluteUrl(locale);\n\n const hreflangLines: string[] = [];\n for (const entry of websiteConfig.locales) {\n const localeStr = String(entry.locale);\n hreflangLines.push(\n `<link rel=\"alternate\" hreflang=\"${escapeHtmlAttribute(localeStr)}\" href=\"${escapeHtmlAttribute(buildAbsoluteUrl(entry.locale))}\" />`,\n );\n }\n hreflangLines.push(\n `<link rel=\"alternate\" hreflang=\"x-default\" href=\"${escapeHtmlAttribute(buildAbsoluteUrl(defaultLocale))}\" />`,\n );\n\n /**\n * `og:image` + `twitter:image` are emitted only when an image URL\n * is available (page-level override OR site-level fallback).\n * Twitter card type also flips between `summary` (no image) and\n * `summary_large_image` (image present).\n */\n const ogImageLines: string[] = [];\n if (ogImageUrl !== undefined) {\n const ogImageAttr = escapeHtmlAttribute(ogImageUrl);\n ogImageLines.push(\n `<meta property=\"og:image\" content=\"${ogImageAttr}\" />`,\n `<meta name=\"twitter:image\" content=\"${ogImageAttr}\" />`,\n );\n }\n const twitterCardKind = ogImageUrl !== undefined ? 'summary_large_image' : 'summary';\n\n /**\n * `og:locale:alternate` — one per non-current declared locale. Open\n * Graph spec: the `og:locale` field carries the page's primary\n * locale; alternates declare the other locales the page is\n * available in. Emitted in declaration order.\n *\n * Locale format: we emit the bare language code (`en`, `fr`) per\n * the AvailableLanguage atom shape. Open Graph technically\n * recommends `language_TERRITORY` (e.g. `en_US`), but Facebook /\n * LinkedIn / Slack accept the bare language code in practice. The\n * future fix when the platform grows territory-tagged locales is to\n * map at this site (no consumer change required).\n */\n const ogLocaleAlternateLines: string[] = [];\n for (const entry of websiteConfig.locales) {\n const localeStr = String(entry.locale);\n if (localeStr === currentLocaleStr) continue;\n ogLocaleAlternateLines.push(\n `<meta property=\"og:locale:alternate\" content=\"${escapeHtmlAttribute(localeStr)}\" />`,\n );\n }\n\n const siteNameAttr = escapeHtmlAttribute(rootConfig.seo.siteName);\n const canonicalAttr = escapeHtmlAttribute(canonicalUrl);\n const ogLocaleAttr = escapeHtmlAttribute(currentLocaleStr);\n\n /**\n * SITE-WIDE `noindex` (#494) — the directive that actually keeps a site out of search.\n *\n * `robots.txt` `Disallow` governs CRAWLING, not INDEXING: a disallowed URL can still be listed, as a\n * bare URL with no snippet, if anything links to it. Only this directive de-indexes. Until 2026-09-08\n * a site declared `noindex` emitted the `Disallow` and NOT this, so it was closed to well-behaved\n * crawlers and still indexable — the weaker half of the pair.\n *\n * The two are also mutually defeating, which is why `renderRobotsTxt` no longer emits `Disallow: /`\n * for this policy: a crawler barred from fetching the page never reads the directive telling it not\n * to index. To stay out of search you must let the crawler IN and tell it no.\n *\n * `noindex` only — not `noindex, nofollow`. `nofollow` additionally suppresses link discovery, which\n * is a broader claim than \"keep this out of the index\" and is not what the policy declares.\n */\n const robotsDirectives: string[] = [];\n if (rootConfig.seo.robots?.policy === 'noindex') {\n robotsDirectives.push('noindex');\n }\n /**\n * AI-training opt-out (D-AG3) — emitted ONLY when the page manifest opts in via\n * `seo.noaiOptOut: true`. Default is OPT-IN to AI training (the marketing-site default). This\n * emission pairs with the sibling `_headers` entry produced by `renderWebsitePageNoaiHeaders()`\n * for crawlers that don't honor in-document meta.\n *\n * `noai` (block AI training on text) and `noimageai` (block AI training on images) are the two\n * directives the major AI crawlers (GPTBot, ClaudeBot, Google-Extended, etc.) recognise.\n */\n if (manifest.seo?.noaiOptOut === true) {\n robotsDirectives.push('noai', 'noimageai');\n }\n /*\n * ONE `<meta name=\"robots\">`, carrying every directive comma-separated — the canonical shape. Two\n * separate robots meta tags are legal and are read inconsistently; merging avoids the question.\n */\n const noaiMetaLines: string[] = robotsDirectives.length > 0\n ? [`<meta name=\"robots\" content=\"${robotsDirectives.join(', ')}\" />`]\n : [];\n\n return [\n `<title>${titleText}</title>`,\n `<meta name=\"description\" content=\"${descriptionAttr}\" />`,\n `<link rel=\"canonical\" href=\"${canonicalAttr}\" />`,\n `<meta property=\"og:title\" content=\"${titleAttr}\" />`,\n `<meta property=\"og:description\" content=\"${descriptionAttr}\" />`,\n `<meta property=\"og:type\" content=\"website\" />`,\n `<meta property=\"og:url\" content=\"${canonicalAttr}\" />`,\n `<meta property=\"og:site_name\" content=\"${siteNameAttr}\" />`,\n `<meta property=\"og:locale\" content=\"${ogLocaleAttr}\" />`,\n ...ogLocaleAlternateLines,\n ...ogImageLines,\n `<meta name=\"twitter:card\" content=\"${twitterCardKind}\" />`,\n `<meta name=\"twitter:title\" content=\"${titleAttr}\" />`,\n `<meta name=\"twitter:description\" content=\"${descriptionAttr}\" />`,\n ...noaiMetaLines,\n ...hreflangLines,\n ].join('\\n');\n}\n\n/**\n * Flatten `WebsiteDesignTokens` to a `:root { … }` block of CSS custom\n * properties. Naming convention: `--website-<group>-<token>` for nested\n * groups (`colors.primary` → `--website-colors-primary`); top-level\n * string-valued tokens (none today, future-proofed) emit as\n * `--website-<token>`.\n *\n * **Why scoped to `:root`** rather than `<WebsitePageLayout>`'s root\n * div: marketing pages frequently embed third-party widgets (live-chat,\n * analytics overlays) that paint outside the React tree. Scoping\n * tokens to `:root` makes them visible to those widgets too. The\n * design-token surface is small enough that the cost of a broader\n * scope (token-name collisions with consumer-authored `:root` rules)\n * is bounded by the `--website-` prefix.\n */\nexport function renderWebsiteDesignTokensCss(tokens: WebsiteDesignTokens): string {\n const lines: string[] = [':root {'];\n for (const [groupName, groupValue] of Object.entries(tokens) as [string, unknown][]) {\n if (groupValue !== null && typeof groupValue === 'object' && !Array.isArray(groupValue)) {\n for (const [tokenName, tokenValue] of Object.entries(groupValue) as [string, unknown][]) {\n if (typeof tokenValue === 'string') {\n lines.push(` ${websiteDesignTokenCssProperty(groupName, tokenName)}: ${tokenValue};`);\n }\n }\n } else if (typeof groupValue === 'string') {\n lines.push(` --website-${groupName}: ${groupValue};`);\n }\n }\n lines.push('}');\n return lines.join('\\n');\n}\n\n/**\n * @wildo_source:part:end saas.website.astro.head-renderer\n *\n * HTML escape helpers moved to `./internal/html-escape.ts` (Phase 7)\n * so the new `blog-post-head.renderer.ts` sibling can share the same\n * escape contract instead of redefining it. See that module's preamble\n * for the framework-mindset rationale (one escape contract per engine,\n * not one per renderer).\n */\n"]}
|
|
1
|
+
{"version":3,"file":"website-page-head.renderer.js","sourceRoot":"","sources":["../../../../src/astro/website-page-head.renderer.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AACjF,OAAO,EAAE,6BAA6B,EAA4B,MAAM,+DAA+D,CAAC;AAIxI,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAkE7E,MAAM,UAAU,yBAAyB,CAAC,IAAsC;IAC9E,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC;IAC1D,MAAM,EAAE,UAAU,EAAE,aAAa,EAAE,GAAG,WAAW,CAAC;IAElD,MAAM,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,QAA6B,CAAC;IACtE,MAAM,cAAc,GAAG,QAAQ,CAAC,aAAa,CAAC,cAAmC,CAAC;IAClF,MAAM,KAAK,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;IAClC,MAAM,WAAW,GAAG,SAAS,CAAC,cAAc,CAAC,CAAC;IAE9C,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACxB,MAAM,IAAI,KAAK,CACb,sDAAsD,MAAM,eAAe;YACzE,uBAAuB,QAAQ,gBAAgB,QAAQ,CAAC,GAAwB,MAAM;YACtF,0EAA0E,CAC7E,CAAC;IACJ,CAAC;IACD,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;QAC9B,MAAM,IAAI,KAAK,CACb,sDAAsD,MAAM,e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,IAAI,CAAC,KAAK,6BAA6B,CAAC,SAAS,EAAE,SAAS,CAAC,KAAK,UAAU,GAAG,CAAC,CAAC;gBACzF,CAAC;YACH,CAAC;QACH,CAAC;aAAM,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE,CAAC;YAC1C,KAAK,CAAC,IAAI,CAAC,eAAe,SAAS,KAAK,UAAU,GAAG,CAAC,CAAC;QACzD,CAAC;IACH,CAAC;IACD,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAChB,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED;;;;;;;;GAQG","sourcesContent":["import type { AvailableLanguage } from '@wildo-ai/saas-models/public-runtime';\n\nimport { buildLocalizedRoutePath } from '../core/routing/internal-routing.utils';\nimport { websiteDesignTokenCssProperty, type WebsiteDesignTokens } from '../schemas/design-tokens/website-design-tokens.shared.schemas';\nimport type { WebsitePageManifest } from '../schemas/manifests/website-page-manifest.shared.schemas';\nimport type { LabelPack } from '../schemas/validators/label-pack.validator';\n\nimport { escapeHtmlAttribute, escapeHtmlText } from './internal/html-escape';\nimport type { WebsiteSiteContext } from './website-site-context';\n\n/**\n * @wildo_source:part:start saas.website.astro.head-renderer facet:layer:astro facet:family:website\n *\n * Head-block renderers — pure string builders the consumer's per-page\n * `.astro` file injects via `<Fragment set:html={...}/>` /\n * `<style set:html={...}></style>`. Two functions:\n *\n * - `renderWebsitePageHeadHtml(opts)` — emits the complete SEO\n * `<head>` block: `<title>`, meta description, full Open Graph\n * card (`og:title` / `og:description` / `og:type` / `og:url` /\n * `og:site_name` / `og:locale` / `og:locale:alternate` / optional\n * `og:image`), Twitter card mirrors, `<link rel=\"canonical\">`,\n * and one `<link rel=\"alternate\" hreflang>` per declared locale\n * (plus an `x-default` for Google's i18n discoverability). Every\n * URL is ABSOLUTE (composed from `websiteConfig.publicOrigin` +\n * the page's `routePath`) — relative hreflang/canonical\n * annotations are not honored consistently across crawlers\n * (Phase 6 audit findings H-B / H-C / M-A).\n * - `renderWebsiteDesignTokensCss(tokens)` — flattens the design-token\n * bundle into `--website-*` custom properties scoped to `:root`.\n * Server-static — zero island JS.\n *\n * **Why pure string builders** (rather than React components or Astro\n * components):\n *\n * 1. **Avoids the `.astro` distribution problem.** A `.astro` shell\n * cannot be re-exported from a TS subpath barrel and `tsc` does\n * not copy `.astro` files to `dist/`. Pure TS sidesteps both.\n * 2. **Avoids the React-island boundary.** Rendering head content\n * via React would require either (a) a server-only React subtree\n * (extra moving part) or (b) hydrating the `<head>` on the client\n * (waste of bundle size for static-build content).\n * 3. **Vitest-friendly.** Pure functions returning strings are\n * trivially asserted against without an Astro test harness.\n *\n * **HTML escaping**: every consumer-supplied string (title,\n * description, OG image URL, hreflang values) is escaped with\n * `escapeHtmlAttribute` / `escapeHtmlText` before interpolation into\n * the emitted markup. Marketing copy frequently contains characters\n * (quotes, ampersands, the rare `<`) that would break the surrounding\n * tag if interpolated raw — escaping is non-negotiable for a public\n * surface.\n *\n * **Failure modes** — `renderWebsitePageHeadHtml` throws when:\n * - `manifest.metaLabelKeys.titleKey` is absent from the pack\n * - `manifest.metaLabelKeys.descriptionKey` is absent from the pack\n * Both throw with the locale + key + actionable next step (`Run\n * \\`wildo website audit\\` or add the entry to <pack-path>.json`).\n */\n\nexport interface RenderWebsitePageHeadHtmlOptions {\n manifest: WebsitePageManifest;\n /**\n * Composed `WebsiteSiteContext` — the renderer reads\n * `websiteConfig.{defaultLocale, locales, publicOrigin}` for the\n * URL/locale surface and `rootConfig.seo.{siteName, defaultOgImageUrl}`\n * for the SEO branding fallback.\n */\n siteContext: WebsiteSiteContext;\n locale: AvailableLanguage;\n labelPack: LabelPack;\n}\n\nexport function renderWebsitePageHeadHtml(opts: RenderWebsitePageHeadHtmlOptions): string {\n const { manifest, siteContext, locale, labelPack } = opts;\n const { rootConfig, websiteConfig } = siteContext;\n\n const titleKey = manifest.metaLabelKeys.titleKey as unknown as string;\n const descriptionKey = manifest.metaLabelKeys.descriptionKey as unknown as string;\n const title = labelPack[titleKey];\n const description = labelPack[descriptionKey];\n\n if (title === undefined) {\n throw new Error(\n `[renderWebsitePageHeadHtml] Label pack for locale \"${locale}\" is missing ` +\n `the page title key \"${titleKey}\" (page ref=\"${manifest.ref as unknown as string}\"). ` +\n `Run \\`wildo website audit\\` or add the entry to your <locale>.json pack.`,\n );\n }\n if (description === undefined) {\n throw new Error(\n `[renderWebsitePageHeadHtml] Label pack for locale \"${locale}\" is missing ` +\n `the page description key \"${descriptionKey}\" (page ref=\"${manifest.ref as unknown as string}\"). ` +\n `Run \\`wildo website audit\\` or add the entry to your <locale>.json pack.`,\n );\n }\n\n /**\n * OG image precedence: per-page `manifest.metaLabelKeys.ogImageUrl`\n * wins; falls back to the site-level `seo.defaultOgImageUrl` so\n * marketing pages without a hero image still produce a richer\n * social-card (Phase 6 audit fix M-A). When neither is present,\n * the Twitter card kind degrades to the smaller `summary` and the\n * `og:image` / `twitter:image` lines are omitted entirely.\n */\n const ogImageUrl = manifest.metaLabelKeys.ogImageUrl ?? rootConfig.seo.defaultOgImageUrl;\n const titleAttr = escapeHtmlAttribute(title);\n const descriptionAttr = escapeHtmlAttribute(description);\n const titleText = escapeHtmlText(title);\n\n /**\n * Absolute URL builder. `prefixDefaultLocale: false` means the\n * default locale lives at the locale-neutral path; every other\n * locale sits under `/<locale>/<routePath>`. `x-default` always\n * resolves to the default-locale path.\n *\n * Every URL emitted here is FULLY-QUALIFIED (composed against\n * `websiteConfig.publicOrigin`) — Google's hreflang spec requires\n * absolute URLs, and `<link rel=\"canonical\">` relies on absolute\n * URLs to survive cross-host fetches (preview deployments, CDN\n * edges). See `WildoMarketingWebsiteConfigSchema.publicOrigin`\n * JSDoc for the full rationale (incl. trailing-slash rejection).\n */\n const routePath = manifest.routePath as unknown as string;\n const siteOrigin = websiteConfig.publicOrigin;\n const defaultLocale = websiteConfig.defaultLocale;\n const currentLocaleStr = String(locale);\n\n /**\n * Compose the absolute URL for `(locale, routePath)` by delegating\n * the locale-prefix decision to the shared `buildLocalizedRoutePath`\n * helper — same routing rule that powers `WebsiteInternalLink`. This\n * guarantees that hreflang/canonical URLs and the chrome's internal\n * links can never disagree about how a locale is prefixed.\n */\n function buildAbsoluteUrl(forLocale: AvailableLanguage): string {\n const path = buildLocalizedRoutePath({\n locale: forLocale,\n defaultLocale,\n routePath,\n });\n return `${siteOrigin}${path}`;\n }\n\n const canonicalUrl = buildAbsoluteUrl(locale);\n\n const hreflangLines: string[] = [];\n for (const entry of websiteConfig.locales) {\n const localeStr = String(entry.locale);\n hreflangLines.push(\n `<link rel=\"alternate\" hreflang=\"${escapeHtmlAttribute(localeStr)}\" href=\"${escapeHtmlAttribute(buildAbsoluteUrl(entry.locale))}\" />`,\n );\n }\n hreflangLines.push(\n `<link rel=\"alternate\" hreflang=\"x-default\" href=\"${escapeHtmlAttribute(buildAbsoluteUrl(defaultLocale))}\" />`,\n );\n\n /**\n * `og:image` + `twitter:image` are emitted only when an image URL\n * is available (page-level override OR site-level fallback).\n * Twitter card type also flips between `summary` (no image) and\n * `summary_large_image` (image present).\n */\n const ogImageLines: string[] = [];\n if (ogImageUrl !== undefined) {\n const ogImageAttr = escapeHtmlAttribute(ogImageUrl);\n ogImageLines.push(\n `<meta property=\"og:image\" content=\"${ogImageAttr}\" />`,\n `<meta name=\"twitter:image\" content=\"${ogImageAttr}\" />`,\n );\n }\n const twitterCardKind = ogImageUrl !== undefined ? 'summary_large_image' : 'summary';\n\n /**\n * `og:locale:alternate` — one per non-current declared locale. Open\n * Graph spec: the `og:locale` field carries the page's primary\n * locale; alternates declare the other locales the page is\n * available in. Emitted in declaration order.\n *\n * Locale format: we emit the bare language code (`en`, `fr`) per\n * the AvailableLanguage atom shape. Open Graph technically\n * recommends `language_TERRITORY` (e.g. `en_US`), but Facebook /\n * LinkedIn / Slack accept the bare language code in practice. The\n * future fix when the platform grows territory-tagged locales is to\n * map at this site (no consumer change required).\n */\n const ogLocaleAlternateLines: string[] = [];\n for (const entry of websiteConfig.locales) {\n const localeStr = String(entry.locale);\n if (localeStr === currentLocaleStr) continue;\n ogLocaleAlternateLines.push(\n `<meta property=\"og:locale:alternate\" content=\"${escapeHtmlAttribute(localeStr)}\" />`,\n );\n }\n\n const siteNameAttr = escapeHtmlAttribute(rootConfig.seo.siteName);\n const canonicalAttr = escapeHtmlAttribute(canonicalUrl);\n const ogLocaleAttr = escapeHtmlAttribute(currentLocaleStr);\n\n /**\n * SITE-WIDE `noindex` (#494) — the directive that actually keeps a site out of search.\n *\n * `robots.txt` `Disallow` governs CRAWLING, not INDEXING: a disallowed URL can still be listed, as a\n * bare URL with no snippet, if anything links to it. Only this directive de-indexes. Until 2026-09-08\n * a site declared `noindex` emitted the `Disallow` and NOT this, so it was closed to well-behaved\n * crawlers and still indexable — the weaker half of the pair.\n *\n * The two are also mutually defeating, which is why `renderRobotsTxt` no longer emits `Disallow: /`\n * for this policy: a crawler barred from fetching the page never reads the directive telling it not\n * to index. To stay out of search you must let the crawler IN and tell it no.\n *\n * `noindex` only — not `noindex, nofollow`. `nofollow` additionally suppresses link discovery, which\n * is a broader claim than \"keep this out of the index\" and is not what the policy declares.\n */\n const robotsDirectives: string[] = [];\n if (rootConfig.seo.robots?.policy === 'noindex') {\n robotsDirectives.push('noindex');\n }\n /**\n * AI-training opt-out (D-AG3) — emitted ONLY when the page manifest opts in via\n * `seo.noaiOptOut: true`. Default is OPT-IN to AI training (the marketing-site default). This\n * emission pairs with the sibling `_headers` entry produced by `renderWebsitePageNoaiHeaders()`\n * for crawlers that don't honor in-document meta.\n *\n * `noai` (block AI training on text) and `noimageai` (block AI training on images) are the two\n * directives the major AI crawlers (GPTBot, ClaudeBot, Google-Extended, etc.) recognise.\n */\n if (manifest.seo?.noaiOptOut === true) {\n robotsDirectives.push('noai', 'noimageai');\n }\n /*\n * ONE `<meta name=\"robots\">`, carrying every directive comma-separated — the canonical shape. Two\n * separate robots meta tags are legal and are read inconsistently; merging avoids the question.\n */\n const noaiMetaLines: string[] = robotsDirectives.length > 0\n ? [`<meta name=\"robots\" content=\"${robotsDirectives.join(', ')}\" />`]\n : [];\n\n return [\n `<title>${titleText}</title>`,\n `<meta name=\"description\" content=\"${descriptionAttr}\" />`,\n `<link rel=\"canonical\" href=\"${canonicalAttr}\" />`,\n `<meta property=\"og:title\" content=\"${titleAttr}\" />`,\n `<meta property=\"og:description\" content=\"${descriptionAttr}\" />`,\n `<meta property=\"og:type\" content=\"website\" />`,\n `<meta property=\"og:url\" content=\"${canonicalAttr}\" />`,\n `<meta property=\"og:site_name\" content=\"${siteNameAttr}\" />`,\n `<meta property=\"og:locale\" content=\"${ogLocaleAttr}\" />`,\n ...ogLocaleAlternateLines,\n ...ogImageLines,\n `<meta name=\"twitter:card\" content=\"${twitterCardKind}\" />`,\n `<meta name=\"twitter:title\" content=\"${titleAttr}\" />`,\n `<meta name=\"twitter:description\" content=\"${descriptionAttr}\" />`,\n ...noaiMetaLines,\n ...hreflangLines,\n ].join('\\n');\n}\n\n/**\n * Flatten `WebsiteDesignTokens` to a `:root { … }` block of CSS custom\n * properties. Naming convention: `--website-<group>-<token>` for nested\n * groups (`colors.primary` → `--website-colors-primary`); top-level\n * string-valued tokens (none today, future-proofed) emit as\n * `--website-<token>`.\n *\n * **Why scoped to `:root`** rather than `<WebsitePageLayout>`'s root\n * div: marketing pages frequently embed third-party widgets (live-chat,\n * analytics overlays) that paint outside the React tree. Scoping\n * tokens to `:root` makes them visible to those widgets too. The\n * design-token surface is small enough that the cost of a broader\n * scope (token-name collisions with consumer-authored `:root` rules)\n * is bounded by the `--website-` prefix.\n */\nexport function renderWebsiteDesignTokensCss(tokens: WebsiteDesignTokens): string {\n const lines: string[] = [':root {'];\n for (const [groupName, groupValue] of Object.entries(tokens) as [string, unknown][]) {\n if (groupValue !== null && typeof groupValue === 'object' && !Array.isArray(groupValue)) {\n for (const [tokenName, tokenValue] of Object.entries(groupValue) as [string, unknown][]) {\n if (typeof tokenValue === 'string') {\n lines.push(` ${websiteDesignTokenCssProperty(groupName, tokenName)}: ${tokenValue};`);\n }\n }\n } else if (typeof groupValue === 'string') {\n lines.push(` --website-${groupName}: ${groupValue};`);\n }\n }\n lines.push('}');\n return lines.join('\\n');\n}\n\n/**\n * @wildo_source:part:end saas.website.astro.head-renderer\n *\n * HTML escape helpers moved to `./internal/html-escape.ts` (Phase 7)\n * so the new `blog-post-head.renderer.ts` sibling can share the same\n * escape contract instead of redefining it. See that module's preamble\n * for the framework-mindset rationale (one escape contract per engine,\n * not one per renderer).\n */\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"website-page-runtime.helper.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"website-page-runtime.helper.d.ts","sourceRoot":"","sources":["../../../../src/astro/website-page-runtime.helper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAGzE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2DAA2D,CAAC;AACrG,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4CAA4C,CAAC;AAI5E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAEjE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkEG;AACH,MAAM,WAAW,6BAA6B;IAC5C,gFAAgF;IAChF,QAAQ,EAAE,mBAAmB,CAAC;IAC9B,yEAAyE;IACzE,WAAW,EAAE,kBAAkB,CAAC;IAChC,0DAA0D;IAC1D,aAAa,EAAE,MAAM,CAAC;IACtB,2DAA2D;IAC3D,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;CACjC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,kBAAkB;IACjC,wEAAwE;IACxE,MAAM,EAAE,iBAAiB,CAAC;IAC1B;;;;;;;;OAQG;IACH,aAAa,EAAE,iBAAiB,CAAC;IACjC,qEAAqE;IACrE,SAAS,EAAE,SAAS,CAAC;CACtB;AAED,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,6BAA6B,GAClC,kBAAkB,CAqCpB;AA+BD,+DAA+D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"website-site-context.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"website-site-context.d.ts","sourceRoot":"","sources":["../../../../src/astro/website-site-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,wCAAwC,CAAC;AAC1F,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yDAAyD,CAAC;AACjG,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAEnF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;;;;OAMG;IACH,QAAQ,CAAC,UAAU,EAAE,iBAAiB,CAAC;IAEvC;;;;;;;OAOG;IACH,QAAQ,CAAC,aAAa,EAAE,2BAA2B,CAAC;IACpD;;;;;OAKG;IACH,QAAQ,CAAC,iBAAiB,CAAC,EAAE,sBAAsB,CAAC;CACrD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,kBAAkB,GACxB,kBAAkB,CAMpB;AACD,6DAA6D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"website-site-context.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"website-site-context.js","sourceRoot":"","sources":["../../../../src/astro/website-site-context.ts"],"names":[],"mappings":"AAqGA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,UAAU,yBAAyB,CACvC,KAAyB;IAEzB,OAAO,MAAM,CAAC,MAAM,CAAC;QACnB,UAAU,EAAE,KAAK,CAAC,UAAU;QAC5B,aAAa,EAAE,KAAK,CAAC,aAAa;QAClC,iBAAiB,EAAE,KAAK,CAAC,iBAAiB;KAC3C,CAAC,CAAC;AACL,CAAC;AACD,6DAA6D","sourcesContent":["import type { WildoMarketingWebsiteConfig } from '../config/wildo-website-config.schemas';\nimport type { WebsiteRootConfig } from '../schemas/manifests/website-root-config.shared.schemas';\nimport type { FrontendProvidersBlock } from '@wildo-ai/saas-models/public-runtime';\n\n/**\n * @wildo_source:part:start saas.website.astro.site-context facet:layer:astro facet:family:website\n *\n * `WebsiteSiteContext` — the aggregated site-level inputs every Astro\n * build-time engine helper consumes. Composes the consumer-authored\n * `WebsiteRootConfig` (page registry, design tokens, navigation chrome,\n * site-level SEO branding) with the per-service `WildoMarketingWebsiteConfig`\n * loaded from `wildo.website.config.ts` (locales, default locale,\n * public origin, and the `appOrigin` / `apiOrigin` the site reaches the\n * product through — settled for THIS build by `loadWebsiteSiteContext`).\n *\n * # Why a dedicated aggregator type (vs. threading both raw configs)\n *\n * The seam-collapse (`saas-website-seam-collapse.md`, Option B) made\n * `WildoMarketingWebsiteConfig` the SINGLE source of truth for the\n * marketing-site routing surface (`defaultLocale`, `locales`,\n * `publicOrigin`). Every engine helper that previously read those\n * fields from `WebsiteRootConfig` now reads them from\n * `WildoMarketingWebsiteConfig` — and four out of five of those helpers\n * also still read OTHER fields from `WebsiteRootConfig` (page\n * manifests, chrome label keys, design tokens, `seo.siteName`,\n * `seo.defaultOgImageUrl`, `skipToMainContentLabelKey`). Threading\n * both raw configs through every helper signature would:\n *\n * 1. **Bloat call sites.** Every consumer `.astro` file would have\n * to import both `WEBSITE_ROOT_CONFIG` and the loaded\n * `WILDO_WEBSITE_CONFIG`, then forward both to every helper.\n * 2. **Spread the consumer-side composition responsibility.**\n * Each `.astro` file would need to know which subset of the\n * configs each helper consumes — a refactor hazard the next time\n * we add a field that the head renderer reads from the website\n * config but the runtime loader does not.\n * 3. **Defeat top-level `await` ergonomics.** The website config\n * load is async (`loadWebsiteConfig` does jiti-backed file I/O);\n * forcing every `.astro` file to `await` it would either spread\n * the await across every page or force every page to receive the\n * already-loaded config from a separate consumer module —\n * duplicating the composition logic this aggregator centralizes.\n *\n * One aggregator, composed once at the consumer's\n * `<service-root>/src/website-site-context.ts`, is the minimum-blast\n * shape: every engine helper takes `siteContext: WebsiteSiteContext`,\n * every `.astro` file imports the singleton `WEBSITE_SITE_CONTEXT`\n * once, and the next field move (consumer-config-only field, or\n * root-config-only field) lands in this type's shape with no\n * helper-signature ripple.\n *\n * # Why frozen (defensive)\n *\n * The composed value is shared across every page render in the build\n * graph. A misbehaving Astro plugin (or a future consumer-side audit\n * subprocess) that mutated either nested config in place would\n * silently corrupt every subsequent page. `Object.freeze` is a cheap\n * top-level guard — the inner configs are themselves already produced\n * by Zod parsers (which return fresh objects), so mutating their\n * fields would require a deliberate `as any` cast at the consumer's\n * call site rather than an accidental in-place edit.\n *\n * # When this type WOULD grow\n *\n * Future inputs that are also \"site-wide\" but neither belong to\n * `WebsiteRootConfig` (chrome-rendered) nor to\n * `WildoMarketingWebsiteConfig` (per-service routing/origins) — e.g.\n * a build-environment block (`production` / `preview` / `dev`), or\n * a feature-flag bag — would land here as a third sibling field\n * rather than being plumbed through every helper signature\n * individually. The aggregator is the right place for that\n * orchestration concern; per-call ergonomics ride along for free.\n */\nexport interface WebsiteSiteContext {\n /**\n * The consumer's `WebsiteRootConfig` — page registry, design tokens,\n * navigation chrome, site-level SEO branding (`siteName`,\n * `defaultOgImageUrl?`), `chromeLabelKeys`,\n * `skipToMainContentLabelKey`. Single source of truth for chrome\n * + per-page meta declarations.\n */\n readonly rootConfig: WebsiteRootConfig;\n\n /**\n * The per-service `WildoMarketingWebsiteConfig` loaded from\n * `wildo.website.config.ts`. Single source of truth for the\n * marketing-site ROUTING + ORIGIN surface (`defaultLocale`,\n * `locales`, `publicOrigin`, `appOrigin`, `apiOrigin`). The two origins\n * are the values for THIS build (override, local dev, authored — see\n * `resolveWebsiteBuildOrigins`), which is why every page reads them here.\n */\n readonly websiteConfig: WildoMarketingWebsiteConfig;\n /**\n * Optional website-facing public provider block materialized from the\n * app's provider graph for the concrete `STATIC_WEBSITE` service.\n * Build-time only: the consumer loads it once and forwards it into the\n * React island as JSON-serializable data.\n */\n readonly frontendProviders?: FrontendProvidersBlock;\n}\n\n/**\n * Compose a `WebsiteSiteContext` from the two source configs. Pure +\n * synchronous — the I/O happens upstream in `loadWebsiteConfig` and\n * in the consumer's `WEBSITE_ROOT_CONFIG` module evaluation.\n *\n * **Defensive freezing**: the returned object is `Object.freeze`-d\n * top-level so the singleton handed to every helper cannot have its\n * `rootConfig` / `websiteConfig` references swapped in place by a\n * misbehaving plugin. The nested configs are NOT deep-frozen — Zod\n * already produces fresh objects per parse, and a deep freeze would\n * cost a recursive walk per build for protection that no realistic\n * plugin would breach.\n *\n * @example\n * ```ts\n * // examples/<app>/website/src/website-site-context.ts\n * import { composeWebsiteSiteContext } from '@wildo-ai/saas-website/astro';\n * import { loadWebsiteConfig } from '@wildo-ai/saas-website/config-loader';\n *\n * import { WEBSITE_ROOT_CONFIG } from './website-root.config';\n *\n * const websiteConfig = await loadWebsiteConfig({ saasRoot: '...' });\n * export const WEBSITE_SITE_CONTEXT = composeWebsiteSiteContext({\n * rootConfig: WEBSITE_ROOT_CONFIG,\n * websiteConfig,\n * });\n * ```\n */\nexport function composeWebsiteSiteContext(\n parts: WebsiteSiteContext,\n): WebsiteSiteContext {\n return Object.freeze({\n rootConfig: parts.rootConfig,\n websiteConfig: parts.websiteConfig,\n frontendProviders: parts.frontendProviders,\n });\n}\n/** @wildo_source:part:end saas.website.astro.site-context */\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"astro-island.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"astro-island.d.ts","sourceRoot":"","sources":["../../../src/astro-island.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAOH,cAAc,wBAAwB,CAAC;AACvC;;;;;;;;;;;;;;GAcG"}
|
package/dist/esm/astro.d.ts
CHANGED
|
@@ -69,6 +69,7 @@ export * from './astro/website-site-context';
|
|
|
69
69
|
export * from './astro/i18n-routing.helper';
|
|
70
70
|
export * from './astro/collect-expected-label-keys';
|
|
71
71
|
export * from './astro/label-pack-loader';
|
|
72
|
+
export * from './astro/assert-website-pages-have-sections';
|
|
72
73
|
/**
|
|
73
74
|
* `pick-labels-for-page` is INTENTIONALLY NOT re-exported here.
|
|
74
75
|
* It is an internal helper consumed only by `loadWebsitePageRuntime`
|
package/dist/esm/astro.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"astro.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"astro.d.ts","sourceRoot":"","sources":["../../../src/astro.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkEG;AAEH,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qCAAqC,CAAC;AACpD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4CAA4C,CAAC;AAC3D;;;;;;;;;;;GAWG;AACH,cAAc,qCAAqC,CAAC;AACpD,cAAc,oCAAoC,CAAC;AACnD,cAAc,kCAAkC,CAAC;AACjD;;;;;;;;GAQG;AACH,cAAc,iCAAiC,CAAC;AAChD;;;;;;;;GAQG;AACH,cAAc,yBAAyB,CAAC;AACxC;;;;;;;;;;;;;;;;;;GAkBG;AACH,cAAc,0BAA0B,CAAC;AACzC;;;;;;;;;;GAUG;AACH,cAAc,kCAAkC,CAAC;AACjD,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC;;;;;;;;GAQG;AACH,cAAc,kEAAkE,CAAC"}
|
package/dist/esm/astro.js
CHANGED
|
@@ -69,6 +69,7 @@ export * from './astro/website-site-context.js';
|
|
|
69
69
|
export * from './astro/i18n-routing.helper.js';
|
|
70
70
|
export * from './astro/collect-expected-label-keys.js';
|
|
71
71
|
export * from './astro/label-pack-loader.js';
|
|
72
|
+
export * from './astro/assert-website-pages-have-sections.js';
|
|
72
73
|
/**
|
|
73
74
|
* `pick-labels-for-page` is INTENTIONALLY NOT re-exported here.
|
|
74
75
|
* It is an internal helper consumed only by `loadWebsitePageRuntime`
|
package/dist/esm/astro.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"astro.js","sourceRoot":"","sources":["../../../src/astro.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkEG;AAEH,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qCAAqC,CAAC;AACpD,cAAc,2BAA2B,CAAC;AAC1C;;;;;;;;;;;GAWG;AACH,cAAc,qCAAqC,CAAC;AACpD,cAAc,oCAAoC,CAAC;AACnD,cAAc,kCAAkC,CAAC;AACjD;;;;;;;;GAQG;AACH,cAAc,iCAAiC,CAAC;AAChD;;;;;;;;GAQG;AACH,cAAc,yBAAyB,CAAC;AACxC;;;;;;;;;;;;;;;;;;GAkBG;AACH,cAAc,0BAA0B,CAAC;AACzC;;;;;;;;;;GAUG;AACH,cAAc,kCAAkC,CAAC;AACjD,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC;;;;;;;;GAQG;AACH,cAAc,kEAAkE,CAAC","sourcesContent":["/**\n * @wildo-package @wildo-ai/saas-website (astro adapter SSR/frontmatter entry)\n *\n * Astro **frontmatter / SSR** sub-entry. Re-exports the TypeScript\n * helpers a consumer's per-page `.astro` files consume INSIDE\n * frontmatter to render a marketing-site page (locale resolution,\n * label-pack loading, `<head>` HTML rendering, design-token CSS\n * rendering, i18n routing config, expected-label-key collection).\n *\n * **The `createWebsitePageBridgeIsland` factory lives in a SEPARATE\n * subpath — `@wildo-ai/saas-website/astro-island`** — and is NOT\n * re-exported here. The split exists because the consumer's per-page\n * `*.bridge.tsx` module is bundled into BOTH the SSR graph (via the\n * `.astro` page that statically imports it) AND the client graph\n * (Astro's hydration pipeline). Re-exporting the bridge factory\n * alongside the Node-using helpers here would force Vite to resolve\n * `node:fs` / `node:path` for the client bundle even though\n * tree-shaking would later drop them — resolution happens BEFORE\n * tree-shaking, so the build hard-fails with\n * `\"resolve\" is not exported by \"__vite-browser-external\"`. The\n * dedicated `astro-island` subpath keeps the client import graph\n * 100% bundle-clean.\n *\n * **No `.astro` shell shipped.** The Phase-5 redesign deliberately\n * removed the previously-planned `WebsitePageBridge.astro` shell\n * because:\n * 1. A `.astro` file cannot be re-exported from a TS subpath barrel\n * and `tsc` does not copy non-TS files to `dist/`, so the shell\n * was unreachable from `@wildo-ai/saas-website/astro`.\n * 2. The shell would have had to pass `pageComponent` /\n * `headerComponent` / `footerComponent` (`ComponentType` refs)\n * as React-island props — Astro's `devalue`-style island prop\n * serialization cannot transport function values, so hydration\n * would have mismatched on first interaction.\n * Both failure modes are sidestepped by giving consumers two\n * primitive-string-only TS helpers (`renderWebsitePageHeadHtml`,\n * `renderWebsiteDesignTokensCss`) for the Astro-side `<head>` work\n * and a closure-based island factory (`createWebsitePageBridgeIsland`,\n * exported from `@wildo-ai/saas-website/astro-island`) for the\n * React-island side. The consumer authors a thin per-page `.astro`\n * file that statically imports the per-page bridge island — Astro's\n * compiler then resolves the `client:*` directive against a static\n * module export, which is the only pattern that makes Astro's\n * hydration bundling work correctly. See `bridge-runtime.tsx`'s\n * file-level JSDoc for the full rationale.\n *\n * @wildo-boundary\n * This entry is on the SSR / Astro-build-time side of the bundle\n * boundary (D12 second loosening). It MAY import:\n * - `node:fs`, `node:path` (label-pack-loader, runtime-helper)\n * It MUST NOT import:\n * - the bridge-runtime module — that module ships into the\n * client island bundle and is exposed via the\n * `@wildo-ai/saas-website/astro-island` subpath instead.\n * - the Astro runtime (`astro` package, `astro:*` virtual modules)\n * — those live exclusively inside `.astro` files. Adding\n * `astro` here would make the engine package unimportable\n * from any context that does not boot the Astro compiler\n * (Vitest tests, the `wildo website audit` CLI, companion\n * subprocesses).\n *\n * Enforced by `engine/saas-website/src/__tests__/bundle-isolation.test.ts`\n * which walks `astro.ts` as one of `ENTRY_FILES` AND runs a targeted\n * negative test that `node:fs` / `node:path` are reachable from\n * `astro.ts` ONLY — never from `index.ts`, `companion-exports.ts`,\n * or `astro-island.ts`.\n */\n\nexport * from './astro/website-site-context';\nexport * from './astro/i18n-routing.helper';\nexport * from './astro/collect-expected-label-keys';\nexport * from './astro/label-pack-loader';\n/**\n * `pick-labels-for-page` is INTENTIONALLY NOT re-exported here.\n * It is an internal helper consumed only by `loadWebsitePageRuntime`\n * (which IS exported via the runtime helper below). Exposing it as a\n * public sub-entry surface would (a) invite consumers to call it\n * directly from `.astro` frontmatter — which they should never do\n * (the runtime helper already wires the slicing transparently), and\n * (b) lock the engine into an extra public API the audit step would\n * have to keep stable. Tests import the helper via its relative\n * path, which keeps the behavior covered without leaking the surface.\n * (Phase 6 audit fix M-B.)\n */\nexport * from './astro/website-page-runtime.helper';\nexport * from './astro/website-page-head.renderer';\nexport * from './astro/structured-data.renderer';\n/**\n * Phase 7 — sibling head renderer for blog posts. Reads from a\n * validated `BlogPostFrontmatter` instead of the page manifest's\n * `metaLabelKeys`; emits `og:type=article` plus the\n * `article:published_time` / `article:author` / `article:tag` lines\n * the OG \"article\" vertical requires. See the renderer file's\n * preamble for why this is a sibling rather than a flag on\n * `renderWebsitePageHeadHtml`.\n */\nexport * from './astro/blog-post-head.renderer';\n/**\n * Phase 8 close-out — `renderRobotsTxt(siteContext)` pure string\n * builder for the marketing site's `robots.txt` body. Sibling of\n * `renderWebsitePageHeadHtml` (same Astro-frontmatter consumption\n * shape: pure TypeScript, no Astro runtime dependency, vitest-\n * friendly). See `engine/saas-website/src/astro/robots-renderer.ts`\n * for the field-by-field rationale and\n * `.cursor/plans/saas-website-seo-sitemap.md` for the slice context.\n */\nexport * from './astro/robots-renderer';\n/**\n * Phase 8 close-out — `enumerateMarketingPageSitemapUrls(siteContext)`\n * pure helper that returns every (page-manifest × locale) absolute\n * URL the marketing site's sitemap MUST advertise, paired with its\n * hreflang alternates. Two consumption surfaces:\n *\n * 1. Vitest enforcement — a regression that drops a manifest-\n * registered route fails fast in unit tests, well before\n * `astro build` would surface it.\n * 2. `@astrojs/sitemap` `customPages` integration — when the\n * consumer needs to surface routes Astro's file-based router\n * cannot auto-discover (data-driven landing variants, etc.),\n * this helper computes the canonical URL list to spread into\n * the plugin config.\n *\n * See `engine/saas-website/src/astro/sitemap-coverage.ts` and\n * `.cursor/plans/saas-website-seo-sitemap.md` for the full\n * rationale + scope boundary.\n */\nexport * from './astro/sitemap-coverage';\n/**\n * AEO — `renderPageStructuredData(opts)` pure string builder that\n * collects every section's `getStructuredData()` (when present),\n * dedupes by `@id`, and emits one\n * `<script type=\"application/ld+json\">` block per surviving payload.\n * Sibling of `renderWebsitePageHeadHtml` (same pure-TS, vitest-\n * friendly contract). See\n * `engine/saas-website/src/astro/structured-data.renderer.ts`\n * for the safety + dedupe semantics and\n * `.cursor/plans/saas-website-aeo-geo.md` for the slice context.\n */\nexport * from './astro/structured-data.renderer';\nexport * from './astro/headers-renderer';\nexport * from './astro/llms-txt-server';\n/**\n * AEO — runtime payload type (`WebsiteStructuredDataPayload`) and\n * convenience return-shape union (`WebsiteStructuredDataReturn`)\n * the section author imports to type their `getStructuredData()`.\n * Defined locally in `saas-website` (not in `saas-specifications`)\n * because the runtime engine cannot depend on the spec layer; the\n * companion catalog at `_catalogs/schema-org/` describes the same\n * vocabulary at the COMPANION layer.\n */\nexport * from './schemas/structured-data/website-structured-data.shared.schemas';\n"]}
|
|
1
|
+
{"version":3,"file":"astro.js","sourceRoot":"","sources":["../../../src/astro.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkEG;AAEH,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qCAAqC,CAAC;AACpD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4CAA4C,CAAC;AAC3D;;;;;;;;;;;GAWG;AACH,cAAc,qCAAqC,CAAC;AACpD,cAAc,oCAAoC,CAAC;AACnD,cAAc,kCAAkC,CAAC;AACjD;;;;;;;;GAQG;AACH,cAAc,iCAAiC,CAAC;AAChD;;;;;;;;GAQG;AACH,cAAc,yBAAyB,CAAC;AACxC;;;;;;;;;;;;;;;;;;GAkBG;AACH,cAAc,0BAA0B,CAAC;AACzC;;;;;;;;;;GAUG;AACH,cAAc,kCAAkC,CAAC;AACjD,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC;;;;;;;;GAQG;AACH,cAAc,kEAAkE,CAAC","sourcesContent":["/**\n * @wildo-package @wildo-ai/saas-website (astro adapter SSR/frontmatter entry)\n *\n * Astro **frontmatter / SSR** sub-entry. Re-exports the TypeScript\n * helpers a consumer's per-page `.astro` files consume INSIDE\n * frontmatter to render a marketing-site page (locale resolution,\n * label-pack loading, `<head>` HTML rendering, design-token CSS\n * rendering, i18n routing config, expected-label-key collection).\n *\n * **The `createWebsitePageBridgeIsland` factory lives in a SEPARATE\n * subpath — `@wildo-ai/saas-website/astro-island`** — and is NOT\n * re-exported here. The split exists because the consumer's per-page\n * `*.bridge.tsx` module is bundled into BOTH the SSR graph (via the\n * `.astro` page that statically imports it) AND the client graph\n * (Astro's hydration pipeline). Re-exporting the bridge factory\n * alongside the Node-using helpers here would force Vite to resolve\n * `node:fs` / `node:path` for the client bundle even though\n * tree-shaking would later drop them — resolution happens BEFORE\n * tree-shaking, so the build hard-fails with\n * `\"resolve\" is not exported by \"__vite-browser-external\"`. The\n * dedicated `astro-island` subpath keeps the client import graph\n * 100% bundle-clean.\n *\n * **No `.astro` shell shipped.** The Phase-5 redesign deliberately\n * removed the previously-planned `WebsitePageBridge.astro` shell\n * because:\n * 1. A `.astro` file cannot be re-exported from a TS subpath barrel\n * and `tsc` does not copy non-TS files to `dist/`, so the shell\n * was unreachable from `@wildo-ai/saas-website/astro`.\n * 2. The shell would have had to pass `pageComponent` /\n * `headerComponent` / `footerComponent` (`ComponentType` refs)\n * as React-island props — Astro's `devalue`-style island prop\n * serialization cannot transport function values, so hydration\n * would have mismatched on first interaction.\n * Both failure modes are sidestepped by giving consumers two\n * primitive-string-only TS helpers (`renderWebsitePageHeadHtml`,\n * `renderWebsiteDesignTokensCss`) for the Astro-side `<head>` work\n * and a closure-based island factory (`createWebsitePageBridgeIsland`,\n * exported from `@wildo-ai/saas-website/astro-island`) for the\n * React-island side. The consumer authors a thin per-page `.astro`\n * file that statically imports the per-page bridge island — Astro's\n * compiler then resolves the `client:*` directive against a static\n * module export, which is the only pattern that makes Astro's\n * hydration bundling work correctly. See `bridge-runtime.tsx`'s\n * file-level JSDoc for the full rationale.\n *\n * @wildo-boundary\n * This entry is on the SSR / Astro-build-time side of the bundle\n * boundary (D12 second loosening). It MAY import:\n * - `node:fs`, `node:path` (label-pack-loader, runtime-helper)\n * It MUST NOT import:\n * - the bridge-runtime module — that module ships into the\n * client island bundle and is exposed via the\n * `@wildo-ai/saas-website/astro-island` subpath instead.\n * - the Astro runtime (`astro` package, `astro:*` virtual modules)\n * — those live exclusively inside `.astro` files. Adding\n * `astro` here would make the engine package unimportable\n * from any context that does not boot the Astro compiler\n * (Vitest tests, the `wildo website audit` CLI, companion\n * subprocesses).\n *\n * Enforced by `engine/saas-website/src/__tests__/bundle-isolation.test.ts`\n * which walks `astro.ts` as one of `ENTRY_FILES` AND runs a targeted\n * negative test that `node:fs` / `node:path` are reachable from\n * `astro.ts` ONLY — never from `index.ts`, `companion-exports.ts`,\n * or `astro-island.ts`.\n */\n\nexport * from './astro/website-site-context';\nexport * from './astro/i18n-routing.helper';\nexport * from './astro/collect-expected-label-keys';\nexport * from './astro/label-pack-loader';\nexport * from './astro/assert-website-pages-have-sections';\n/**\n * `pick-labels-for-page` is INTENTIONALLY NOT re-exported here.\n * It is an internal helper consumed only by `loadWebsitePageRuntime`\n * (which IS exported via the runtime helper below). Exposing it as a\n * public sub-entry surface would (a) invite consumers to call it\n * directly from `.astro` frontmatter — which they should never do\n * (the runtime helper already wires the slicing transparently), and\n * (b) lock the engine into an extra public API the audit step would\n * have to keep stable. Tests import the helper via its relative\n * path, which keeps the behavior covered without leaking the surface.\n * (Phase 6 audit fix M-B.)\n */\nexport * from './astro/website-page-runtime.helper';\nexport * from './astro/website-page-head.renderer';\nexport * from './astro/structured-data.renderer';\n/**\n * Phase 7 — sibling head renderer for blog posts. Reads from a\n * validated `BlogPostFrontmatter` instead of the page manifest's\n * `metaLabelKeys`; emits `og:type=article` plus the\n * `article:published_time` / `article:author` / `article:tag` lines\n * the OG \"article\" vertical requires. See the renderer file's\n * preamble for why this is a sibling rather than a flag on\n * `renderWebsitePageHeadHtml`.\n */\nexport * from './astro/blog-post-head.renderer';\n/**\n * Phase 8 close-out — `renderRobotsTxt(siteContext)` pure string\n * builder for the marketing site's `robots.txt` body. Sibling of\n * `renderWebsitePageHeadHtml` (same Astro-frontmatter consumption\n * shape: pure TypeScript, no Astro runtime dependency, vitest-\n * friendly). See `engine/saas-website/src/astro/robots-renderer.ts`\n * for the field-by-field rationale and\n * `.cursor/plans/saas-website-seo-sitemap.md` for the slice context.\n */\nexport * from './astro/robots-renderer';\n/**\n * Phase 8 close-out — `enumerateMarketingPageSitemapUrls(siteContext)`\n * pure helper that returns every (page-manifest × locale) absolute\n * URL the marketing site's sitemap MUST advertise, paired with its\n * hreflang alternates. Two consumption surfaces:\n *\n * 1. Vitest enforcement — a regression that drops a manifest-\n * registered route fails fast in unit tests, well before\n * `astro build` would surface it.\n * 2. `@astrojs/sitemap` `customPages` integration — when the\n * consumer needs to surface routes Astro's file-based router\n * cannot auto-discover (data-driven landing variants, etc.),\n * this helper computes the canonical URL list to spread into\n * the plugin config.\n *\n * See `engine/saas-website/src/astro/sitemap-coverage.ts` and\n * `.cursor/plans/saas-website-seo-sitemap.md` for the full\n * rationale + scope boundary.\n */\nexport * from './astro/sitemap-coverage';\n/**\n * AEO — `renderPageStructuredData(opts)` pure string builder that\n * collects every section's `getStructuredData()` (when present),\n * dedupes by `@id`, and emits one\n * `<script type=\"application/ld+json\">` block per surviving payload.\n * Sibling of `renderWebsitePageHeadHtml` (same pure-TS, vitest-\n * friendly contract). See\n * `engine/saas-website/src/astro/structured-data.renderer.ts`\n * for the safety + dedupe semantics and\n * `.cursor/plans/saas-website-aeo-geo.md` for the slice context.\n */\nexport * from './astro/structured-data.renderer';\nexport * from './astro/headers-renderer';\nexport * from './astro/llms-txt-server';\n/**\n * AEO — runtime payload type (`WebsiteStructuredDataPayload`) and\n * convenience return-shape union (`WebsiteStructuredDataReturn`)\n * the section author imports to type their `getStructuredData()`.\n * Defined locally in `saas-website` (not in `saas-specifications`)\n * because the runtime engine cannot depend on the spec layer; the\n * companion catalog at `_catalogs/schema-org/` describes the same\n * vocabulary at the COMPANION layer.\n */\nexport * from './schemas/structured-data/website-structured-data.shared.schemas';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"companion-exports.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"companion-exports.d.ts","sourceRoot":"","sources":["../../../src/companion-exports.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,cAAc,iCAAiC,CAAC;AAChD,cAAc,oCAAoC,CAAC;AACnD,cAAc,gDAAgD,CAAC;AAC/D,cAAc,oDAAoD,CAAC;AACnE,cAAc,8DAA8D,CAAC;AAC7E,cAAc,8DAA8D,CAAC;AAC7E,cAAc,0DAA0D,CAAC;AACzE,cAAc,wDAAwD,CAAC;AACvE,cAAc,qDAAqD,CAAC;AACpE,cAAc,2CAA2C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"companion-exports.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"companion-exports.js","sourceRoot":"","sources":["../../../src/companion-exports.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,cAAc,iCAAiC,CAAC;AAChD,cAAc,oCAAoC,CAAC;AACnD,cAAc,gDAAgD,CAAC;AAC/D,cAAc,oDAAoD,CAAC;AACnE,cAAc,8DAA8D,CAAC;AAC7E,cAAc,8DAA8D,CAAC;AAC7E,cAAc,0DAA0D,CAAC;AACzE,cAAc,wDAAwD,CAAC;AACvE,cAAc,qDAAqD,CAAC;AACpE,cAAc,2CAA2C,CAAC","sourcesContent":["/**\n * @wildo-package @wildo-ai/saas-website (companion entry)\n *\n * Narrow, React-free entry point for non-React consumers:\n * - the `wildo-cli`'s page/sitemap/structured-data audit commands\n * - companion subprocesses (e.g. introspection of authored pages)\n * - CI scripts that validate label-pack coverage\n * - anything Astro-build-time that cannot pull React into the\n * evaluation graph\n *\n * @wildo-boundary\n * This file re-exports ONLY from `schemas/**`. It MUST NOT import or\n * re-export anything from `core/**` (React contexts/hooks), `astro/**`\n * (Astro/Node adapter), `mdx/**` or `config/**`, and MUST NOT import\n * React, Astro or `@mdx-js/*`. The SEO and structured-data renderers\n * are React-free string builders too, but they live on `/astro` beside\n * the build-time helpers that call them, and are reached from there.\n * Enforced by `src/__tests__/bundle-isolation.test.ts` and\n * `schemas/__tests__/companion-exports-react-free.test.ts`.\n */\n\nexport * from './schemas/refs/page-ref.schemas';\nexport * from './schemas/refs/section-ref.schemas';\nexport * from './schemas/label-keys/website-label-key.schemas';\nexport * from './schemas/sections/website-section-category.shared';\nexport * from './schemas/sections/website-section-definition.shared.schemas';\nexport * from './schemas/design-tokens/website-design-tokens.shared.schemas';\nexport * from './schemas/manifests/website-page-manifest.shared.schemas';\nexport * from './schemas/manifests/website-root-config.shared.schemas';\nexport * from './schemas/blog/blog-post-frontmatter.shared.schemas';\nexport * from './schemas/validators/label-pack.validator';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebsiteInternalButton.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"WebsiteInternalButton.d.ts","sourceRoot":"","sources":["../../../../../src/components/low-level/WebsiteInternalButton.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,aAAa,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAOlE,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EAC1B,MAAM,iBAAiB,CAAC;AAmBzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgEG;AACH,MAAM,WAAW,0BAA0B;IACzC;;;;;;OAMG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,oBAAoB,CAAC;IAC/B,IAAI,CAAC,EAAE,iBAAiB,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,qBAAqB,CAAC,EACpC,SAAS,EACT,OAAO,EACP,IAAI,EACJ,SAAS,EACT,KAAK,EACL,EAAE,EACF,SAAS,EACT,QAAQ,GACT,EAAE,0BAA0B,GAAG,SAAS,CA+CxC;yBAxDe,qBAAqB;;;AA0DrC,qEAAqE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebsiteInternalLink.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"WebsiteInternalLink.d.ts","sourceRoot":"","sources":["../../../../../src/components/low-level/WebsiteInternalLink.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,aAAa,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AASlE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwEG;AACH,MAAM,WAAW,wBAAwB;IACvC;;;;;;OAMG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAqCD,wBAAgB,mBAAmB,CAAC,EAClC,SAAS,EACT,SAAS,EACT,KAAK,EACL,EAAE,EACF,SAAS,EACT,QAAQ,GACT,EAAE,wBAAwB,GAAG,SAAS,CA8CtC;yBArDe,mBAAmB;;;AAuDnC,mEAAmE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"define-website-config.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"define-website-config.d.ts","sourceRoot":"","sources":["../../../../src/config/define-website-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AAEH,OAAO,EAEL,KAAK,2BAA2B,EAChC,KAAK,gCAAgC,EACtC,MAAM,gCAAgC,CAAC;AAExC;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,gCAAgC,GACvC,2BAA2B,CAI7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"define-website-config.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"define-website-config.js","sourceRoot":"","sources":["../../../../src/config/define-website-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AAEH,OAAO,EACL,iCAAiC,GAGlC,MAAM,gCAAgC,CAAC;AAExC;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,UAAU,mBAAmB,CACjC,MAAwC;IAExC,MAAM,MAAM,GAAG,iCAAiC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC/D,gCAAgC,CAAC,MAAM,CAAC,CAAC;IACzC,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,SAAS,gCAAgC,CAAC,OAAoC;IAC5E,gEAAgE;IAChE,iEAAiE;IACjE,sDAAsD;AACxD,CAAC","sourcesContent":["/**\n * @fileoverview Author helper for `wildo.website.config.ts` files.\n *\n * `defineWebsiteConfig({...})` mirrors the `defineSaasConfig` /\n * `defineInfraEnvConfig` helpers from `@wildo-ai/platform-config-lib`\n * and `defineTechnicalDocConfig` from `@wildo-ai/saas-technical-doc`:\n * it wraps `WildoMarketingWebsiteConfigSchema.parse(...)` with full\n * IDE autocompletion on the input shape, and emits a parse-time\n * stderr warning for any authored field that has no runtime\n * consumer yet.\n *\n * # `@unimplemented` channel — current state\n *\n * The warner has ZERO branches today because every OPTIONAL field that\n * exists is already wired (`csp?` now flows through the website-local\n * CSP sync step), and every REQUIRED field has a runtime consumer too —\n * `appOrigin` reaches every CTA through `WebsiteRuntimeContext.appOrigin`,\n * settled per build by `loadWebsiteSiteContext`. After the seam-collapse (`saas-website-seam-collapse.md`\n * — SHIPPED), the routing/origin fields (`publicOrigin`,\n * `defaultLocale`, `locales`) are consumed directly by every Astro\n * engine helper via `WebsiteSiteContext`, so they are no longer\n * candidates for a \"deferred wiring\" warning either. The\n * `@unimplemented` warner is for fields that are parsed-but-unused AND\n * opt-in — firing on every Astro build for a required field would drown\n * the dev console.\n *\n * Two valid futures will trigger adding warner branches:\n * 1. A future optional field lands (e.g. `seo?.{title,description}`,\n * `structuredData?.organization`) whose runtime wiring ships\n * in a later PR — that would get\n * `if (config.seo !== undefined) warn('seo', ...)` until the\n * renderer reads it.\n * 2. A required field temporarily loses its consumer (e.g. a\n * large refactor splits the SEO renderer into two PRs); the\n * branch fires unconditionally for the duration.\n *\n * The scaffold is kept (and the no-warning contract is pinned by\n * the test suite) so the moment either case lands, the warning\n * channel is one branch addition away — matching the\n * `defineTechnicalDocConfig` shape exactly so future authors\n * grepping for `@unimplemented` find a uniform pattern.\n *\n * Why we don't reuse `platform-config-lib`'s\n * `createUnimplementedFieldWarner`:\n *\n * `platform-config-lib` is the platform-level boundary; this engine\n * package is downstream of it for everything else. Importing the\n * warner from `platform-config-lib` would invert the dependency\n * direction (engine → platform-config), creating the same architectural\n * defect Step 7.5 set out to fix. The warning format is small and\n * stable enough to inline here — kept structurally similar to the\n * platform-config-lib warner so readers grepping for `@unimplemented`\n * still find both surfaces.\n */\n\nimport {\n WildoMarketingWebsiteConfigSchema,\n type WildoMarketingWebsiteConfig,\n type WildoMarketingWebsiteConfigInput,\n} from './wildo-website-config.schemas';\n\n/**\n * Define a per-service marketing-website config. Provides full IDE\n * autocompletion on the input shape, runs Zod validation (fail-closed\n * on typos / unknown keys / out-of-range values / cross-field\n * invariants like `defaultLocale ∈ locales`), and emits parse-time\n * `@unimplemented` warnings for fields that are authored but have no\n * runtime consumer yet.\n *\n * Throws on validation failure — same contract as `defineSaasConfig`\n * and `defineTechnicalDocConfig`.\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://wonder-todos.example.com',\n * appOrigin: 'https://app.wonder-todos.example.com',\n * defaultLocale: AvailableLanguage.EN,\n * locales: [\n * { locale: AvailableLanguage.EN, path: 'en' },\n * { locale: AvailableLanguage.FR, path: 'fr' },\n * ],\n * });\n * ```\n */\nexport function defineWebsiteConfig(\n config: WildoMarketingWebsiteConfigInput,\n): WildoMarketingWebsiteConfig {\n const parsed = WildoMarketingWebsiteConfigSchema.parse(config);\n emitUnimplementedRuntimeWarnings(parsed);\n return parsed;\n}\n\n/**\n * Emit `@unimplemented` parse-time warnings for every authored\n * OPTIONAL field on `WildoMarketingWebsiteConfig` that is parsed\n * but has no runtime consumer yet.\n *\n * Branches today: ZERO. The one OPTIONAL field that exists (`csp?`) is\n * fully wired through the website-local CSP sync/build path. After the\n * seam-collapse (`saas-website-seam-collapse.md` — SHIPPED) the\n * routing/origin fields are consumed directly by every Astro engine\n * helper via `WebsiteSiteContext`, and `appOrigin` / `apiOrigin` are\n * settled per build by `loadWebsiteSiteContext` and read by every page.\n * A required field could never fire this warner anyway — it would fire\n * on every parse.\n *\n * The function exists as a structural mirror of\n * `defineTechnicalDocConfig.emitUnimplementedRuntimeWarnings` so\n * readers grepping for `emitUnimplementedRuntimeWarnings` find a\n * uniform pattern across every `defineXxxConfig` helper.\n *\n * # Adding a branch (recipe)\n *\n * When the first OPTIONAL `@unimplemented` field lands (most\n * likely candidate: `seo?.{title,description}`), add the warner\n * machinery here: a `seen` set + a\n * `warn(fieldPath, sliceId)` helper that formats as\n * `[wildo-website-config] @unimplemented field '...'` and writes\n * to `process.stderr`, then the matching `if (config.<field> !==\n * undefined)` branch. Copy the exact shape from\n * `define-tech-doc-config.ts > emitUnimplementedRuntimeWarnings`\n * to keep the message format identical across helpers. The test\n * suite pins the zero-warnings contract — flip its expectation in\n * the same commit.\n */\nfunction emitUnimplementedRuntimeWarnings(_config: WildoMarketingWebsiteConfig): void {\n // Intentional no-op — see function JSDoc for why a no-op is the\n // correct shape today (optional fields are either fully wired or\n // absent) and the recipe for adding the first branch.\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/config/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,cAAc,yBAAyB,CAAC;AACxC,cAAc,gCAAgC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load-website-config.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"load-website-config.d.ts","sourceRoot":"","sources":["../../../../src/config/load-website-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAKH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,gCAAgC,CAAC;AAGlF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,oCAAoC,4BAA4B,CAAC;AAkB9E;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,CACrC,kBAAkB,EAAE,MAAM,EAC1B,MAAM,EAAE,2BAA2B,GAClC,IAAI,CAEN;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,IAAI,IAAI,CAE9C;AAED;;;;;;GAMG;AACH,MAAM,WAAW,qBAAqB;IACpC;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;;OAKG;IACH,UAAU,EAAE,eAAe,CAAC;CAC7B;AAED;;;;GAIG;AACH,wBAAgB,gCAAgC,CAC9C,UAAU,EAAE,eAAe,GAC1B,CAAC,MAAM,EAAE,eAAe,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC,CAe/C;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,qBAAqB,GAC1B,OAAO,CAAC,2BAA2B,CAAC,CA+CtC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load-website-config.js","sourceRoot":"","sources":["../../../src/config/load-website-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;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per-service `wildo.website.config.ts` loader.\n *\n * Mirrors the `loadTechnicalDocConfig()` shape used by\n * `platform/factory/wildo-dev-companion/src/technical-doc/services/technical-doc.companion.service.ts`\n * (see `saas-technical-doc.md` Step 7.5). Discovers the unique\n * `frontendType: STATIC_WEBSITE` service in the SaaS config, joins\n * `<saasRoot>/<service.path>/wildo.website.config.ts`, and loads it\n * via the jiti-backed `loadConfig` from `@wildo-ai/platform-config-lib`.\n *\n * The actual Zod validation runs INSIDE `defineWebsiteConfig` (which\n * the per-service config file invokes via\n * `export default defineWebsiteConfig({...})`), so by the time\n * `loadConfig` returns we already hold a parsed\n * `WildoMarketingWebsiteConfig`.\n *\n * @wildo-boundary\n * This module is **Node-only**. It imports `loadConfig` and\n * `AppFrontendType` from `@wildo-ai/platform-config-lib`, which\n * transitively pulls `jiti`, `node:fs`, `node:path`, `node:crypto`,\n * and other Node-only API surface. It MUST NOT be imported from\n * any browser-bundled entry of this engine package — specifically\n * NOT from `index.ts`, `companion-exports.ts`, or `astro-island.ts`.\n * The dedicated `./config-loader` package subpath exists precisely\n * to keep this surface OUT of the React-island bundle (enforced by\n * `__tests__/bundle-isolation.test.ts`).\n *\n * The Astro build's `astro.config.ts` (a Node-side file by\n * construction) is the canonical caller. A future companion\n * subprocess that audits the marketing surface would also call\n * from here. Browser bundles MUST NOT.\n */\n\nimport { existsSync } from 'node:fs';\nimport { resolve as resolvePath } from 'node:path';\nimport { AppFrontendType, loadConfig } from '@wildo-ai/platform-config-lib';\nimport type { WildoSaasConfig } from '@wildo-ai/platform-config-lib';\nimport type { WildoMarketingWebsiteConfig } from './wildo-website-config.schemas';\n\nimport { describeThrownValue } from '@wildo-ai/saas-models/public-runtime';\n/**\n * Conventional file name for the per-service marketing-website\n * configuration (Step 7.5 refactor — `saas-website-slice.md` /\n * `saas-technical-doc.md` Step 7.5 mirror). Authored at the website\n * service root next to `package.json` / `astro.config.ts`.\n *\n * Discovery is \"by convention, not by configuration\":\n *\n * - The loader locates this file by walking the `services` entry\n * whose `frontendType === STATIC_WEBSITE` and joining\n * `<saasRoot>/<service.path>/`. The saas-config schema's\n * `superRefine` already enforces \"at most one STATIC_WEBSITE\n * service per app\", so the lookup is deterministic — apps can\n * name the website service anything (`'website'`, `'marketing'`,\n * `'site'`).\n *\n * - File presence is the enable signal — there is NO `enabled`\n * field on `WildoMarketingWebsiteConfigSchema`. A STATIC_WEBSITE\n * service without this file is treated as a misconfiguration\n * and the loader throws (rather than silently shipping an Astro\n * build with no `i18n` routing / no canonical origin).\n */\nexport const PER_SERVICE_WEBSITE_CONFIG_FILE_NAME = 'wildo.website.config.ts';\n\n/**\n * Memoization slot scoped to the loader module. Keyed by absolute\n * config file path so multiple SaaS configs evaluated in the same\n * process (rare in production — possible in tests) do not collide.\n *\n * Lifetime: the loader is invoked from the Astro build / dev-server\n * pipeline, both of which restart the Node process on every dev-stack\n * reload (the watcher that picks up changes to `wildo.website.config.ts`\n * is the same watcher that reboots the build). A stale entry here\n * therefore cannot outlive a config edit.\n *\n * Tests can pre-populate a known path via {@link primeWebsiteConfigCache}\n * to skip the jiti round-trip when exercising downstream consumers.\n */\nconst WEBSITE_CONFIG_CACHE = new Map<string, WildoMarketingWebsiteConfig>();\n\n/**\n * Test helper — pre-populate the loader's memoization slot for a\n * given absolute config path. Mirrors the\n * `cachedTechnicalDocConfig` pre-population trick used by\n * `technical-doc.publish-openapi.service.test.ts` so the loader's\n * downstream consumers can be exercised in tests without writing a\n * `.ts` file to disk + invoking jiti.\n *\n * Production callers MUST NOT use this helper.\n */\nexport function primeWebsiteConfigCache(\n absoluteConfigPath: string,\n config: WildoMarketingWebsiteConfig,\n): void {\n WEBSITE_CONFIG_CACHE.set(resolvePath(absoluteConfigPath), config);\n}\n\n/**\n * Test helper — clear every cached entry. Use in `beforeEach`/`afterEach`\n * to prevent test cross-contamination.\n */\nexport function clearWebsiteConfigCache(): void {\n WEBSITE_CONFIG_CACHE.clear();\n}\n\n/**\n * Arguments for {@link loadWebsiteConfig}. Kept as a structured shape\n * (rather than positional `loadWebsiteConfig(saasRoot, saasConfig)`)\n * so that future per-call options (e.g. an explicit `serviceKey`\n * override for multi-website apps the day the singleton invariant\n * relaxes) slot in without breaking callers.\n */\nexport interface LoadWebsiteConfigArgs {\n /**\n * Absolute path to the SaaS app root — the directory holding\n * `wildo.saas.config.ts`. Used to resolve `<saasRoot>/<service.path>/`\n * for the website service folder.\n */\n saasRoot: string;\n /**\n * The already-parsed SaaS config (load once via\n * `loadConfig<WildoSaasConfig>(...)` upstream and pass it down here\n * — re-parsing per call would invoke jiti twice for one logical\n * load).\n */\n saasConfig: WildoSaasConfig;\n}\n\n/**\n * The application's one `STATIC_WEBSITE` service, as `[serviceKey, service]`.\n * Throws when none is declared: the service folder is what owns\n * `wildo.website.config.ts`, so a website build without one has nothing to load.\n */\nexport function resolveStaticWebsiteServiceEntry(\n saasConfig: WildoSaasConfig,\n): [string, WildoSaasConfig['services'][string]] {\n const websiteServiceEntry = Object.entries(saasConfig.services).find(\n ([, service]) => service.frontendType === AppFrontendType.STATIC_WEBSITE,\n );\n if (!websiteServiceEntry) {\n throw new Error(\n '[wildo-website-config] No frontend service with `frontendType: STATIC_WEBSITE` is declared in '\n + 'wildo.saas.config.ts. The marketing-website Astro build / loader requires an authored '\n + 'STATIC_WEBSITE service because that service folder owns the per-service '\n + '`wildo.website.config.ts` (publicOrigin, appOrigin, defaultLocale, locales). '\n + 'Add a STATIC_WEBSITE service in wildo.saas.config.ts and ship the per-service '\n + 'config file under it.',\n );\n }\n return websiteServiceEntry;\n}\n\n/**\n * Discover and load the per-service marketing-website config.\n *\n * Resolution algorithm (mirrors\n * `TechnicalDocCompanionService.loadTechnicalDocConfig`):\n *\n * 1. Find the unique service in `saasConfig.services` whose\n * `frontendType === STATIC_WEBSITE`. The saas-config\n * `superRefine` guarantees there is at most one — if there is\n * none, throw with the misconfiguration message.\n * 2. Resolve `<saasRoot>/<service.path>/wildo.website.config.ts`.\n * 3. If the file does not exist, throw (file presence IS the\n * enable signal — a STATIC_WEBSITE service without this file\n * is broken).\n * 4. Check the memoization slot keyed on the absolute path; return\n * the cached value if present.\n * 5. Call `loadConfig<WildoMarketingWebsiteConfig>(absolutePath)`.\n * jiti evaluates the file, which invokes `defineWebsiteConfig`,\n * which invokes `WildoMarketingWebsiteConfigSchema.parse` and\n * emits any `@unimplemented` warnings. The returned object is\n * already-validated — we trust the in-file `defineWebsiteConfig`\n * contract here (mirrors the technical-doc loader pattern in\n * `TechnicalDocCompanionService.loadTechnicalDocConfig`, which\n * also does NOT re-parse). A file that hand-rolls the default\n * export without going through `defineWebsiteConfig` would\n * surface as a downstream type mismatch — acceptable given the\n * authoring contract is explicit and grep-discoverable.\n * 6. Memoize and return.\n *\n * @throws Error with a `[wildo-website-config]` prefix if no\n * STATIC_WEBSITE service is declared, the per-service config\n * file is missing, or the file's default export does not\n * pass `WildoMarketingWebsiteConfigSchema`. The loader\n * intentionally throws plain `Error`s rather than building a\n * `WildoBackendError` so it stays usable from the Astro\n * build pipeline (which has no DI container) — the companion\n * can wrap with `errorBuilder` at the call site if needed\n * (mirrors how `loadConfig` itself throws plain `Error`).\n */\nexport async function loadWebsiteConfig(\n args: LoadWebsiteConfigArgs,\n): Promise<WildoMarketingWebsiteConfig> {\n const { saasRoot, saasConfig } = args;\n const websiteServiceEntry = resolveStaticWebsiteServiceEntry(saasConfig);\n\n const [websiteServiceKey, websiteService] = websiteServiceEntry;\n const websiteConfigPath = resolvePath(\n saasRoot,\n websiteService.path,\n PER_SERVICE_WEBSITE_CONFIG_FILE_NAME,\n );\n\n const cached = WEBSITE_CONFIG_CACHE.get(websiteConfigPath);\n if (cached !== undefined) {\n return cached;\n }\n\n if (!existsSync(websiteConfigPath)) {\n throw new Error(\n `[wildo-website-config] STATIC_WEBSITE service '${websiteServiceKey}' is declared in `\n + `wildo.saas.config.ts but the required per-service config file `\n + `'${PER_SERVICE_WEBSITE_CONFIG_FILE_NAME}' is missing under `\n + `'${websiteService.path}/'. File presence IS the enable signal `\n + '(saas-website-slice.md / saas-technical-doc.md Step 7.5 — the legacy '\n + '`marketingWebsite` block on wildo.saas.config.ts was dropped in favor of '\n + 'a per-service file). Create '\n + `'${websiteConfigPath}' with `\n + '`export default defineWebsiteConfig({ ... })` from `@wildo-ai/saas-website`.',\n );\n }\n\n let loaded: WildoMarketingWebsiteConfig;\n try {\n loaded = await loadConfig<WildoMarketingWebsiteConfig>(websiteConfigPath);\n } catch (e) {\n const cause = describeThrownValue(e);\n throw new Error(\n `[wildo-website-config] Failed to load per-service marketing-website config at `\n + `${websiteConfigPath}. The file MUST do `\n + '`export default defineWebsiteConfig({...})` and pass '\n + 'WildoMarketingWebsiteConfigSchema (`z.strictObject` — unknown keys reject; '\n + '`defaultLocale` must appear in `locales`). '\n + `Cause: ${cause}`,\n );\n }\n\n WEBSITE_CONFIG_CACHE.set(websiteConfigPath, loaded);\n return loaded;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"load-website-config.js","sourceRoot":"","sources":["../../../../src/config/load-website-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAI5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAC3E;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,MAAM,oCAAoC,GAAG,yBAAyB,CAAC;AAE9E;;;;;;;;;;;;;GAaG;AACH,MAAM,oBAAoB,GAAG,IAAI,GAAG,EAAuC,CAAC;AAE5E;;;;;;;;;GASG;AACH,MAAM,UAAU,uBAAuB,CACrC,kBAA0B,EAC1B,MAAmC;IAEnC,oBAAoB,CAAC,GAAG,CAAC,WAAW,CAAC,kBAAkB,CAAC,EAAE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BAAmB;cAClF,gEAAgE;cAChE,IAAI,oCAAoC,qBAAqB;cAC7D,IAAI,cAAc,CAAC,IAAI,yCAAyC;cAChE,uEAAuE;cACvE,2EAA2E;cAC3E,8BAA8B;cAC9B,IAAI,iBAAiB,SAAS;cAC9B,8EAA8E,CACnF,CAAC;IACJ,CAAC;IAED,IAAI,MAAmC,CAAC;IACxC,IAAI,CAAC;QACH,MAAM,GAAG,MAAM,UAAU,CAA8B,iBAAiB,CAAC,CAAC;IAC5E,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,MAAM,KAAK,GAAG,mBAAmB,CAAC,CAAC,CAAC,CAAC;QACrC,MAAM,IAAI,KAAK,CACb,gFAAgF;cAC5E,GAAG,iBAAiB,qBAAqB;cACzC,uDAAuD;cACvD,6EAA6E;cAC7E,6CAA6C;cAC7C,UAAU,KAAK,EAAE,CACtB,CAAC;IACJ,CAAC;IAED,oBAAoB,CAAC,GAAG,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAAC;IACpD,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["/**\n * @fileoverview Per-service `wildo.website.config.ts` loader.\n *\n * Mirrors the `loadTechnicalDocConfig()` shape used by\n * `platform/factory/wildo-dev-companion/src/technical-doc/services/technical-doc.companion.service.ts`\n * (see `saas-technical-doc.md` Step 7.5). Discovers the unique\n * `frontendType: STATIC_WEBSITE` service in the SaaS config, joins\n * `<saasRoot>/<service.path>/wildo.website.config.ts`, and loads it\n * via the jiti-backed `loadConfig` from `@wildo-ai/platform-config-lib`.\n *\n * The actual Zod validation runs INSIDE `defineWebsiteConfig` (which\n * the per-service config file invokes via\n * `export default defineWebsiteConfig({...})`), so by the time\n * `loadConfig` returns we already hold a parsed\n * `WildoMarketingWebsiteConfig`.\n *\n * @wildo-boundary\n * This module is **Node-only**. It imports `loadConfig` and\n * `AppFrontendType` from `@wildo-ai/platform-config-lib`, which\n * transitively pulls `jiti`, `node:fs`, `node:path`, `node:crypto`,\n * and other Node-only API surface. It MUST NOT be imported from\n * any browser-bundled entry of this engine package — specifically\n * NOT from `index.ts`, `companion-exports.ts`, or `astro-island.ts`.\n * The dedicated `./config-loader` package subpath exists precisely\n * to keep this surface OUT of the React-island bundle (enforced by\n * `__tests__/bundle-isolation.test.ts`).\n *\n * The Astro build's `astro.config.ts` (a Node-side file by\n * construction) is the canonical caller. A future companion\n * subprocess that audits the marketing surface would also call\n * from here. Browser bundles MUST NOT.\n */\n\nimport { existsSync } from 'node:fs';\nimport { resolve as resolvePath } from 'node:path';\nimport { AppFrontendType, loadConfig } from '@wildo-ai/platform-config-lib';\nimport type { WildoSaasConfig } from '@wildo-ai/platform-config-lib';\nimport type { WildoMarketingWebsiteConfig } from './wildo-website-config.schemas';\n\nimport { describeThrownValue } from '@wildo-ai/saas-models/public-runtime';\n/**\n * Conventional file name for the per-service marketing-website\n * configuration (Step 7.5 refactor — `saas-website-slice.md` /\n * `saas-technical-doc.md` Step 7.5 mirror). Authored at the website\n * service root next to `package.json` / `astro.config.ts`.\n *\n * Discovery is \"by convention, not by configuration\":\n *\n * - The loader locates this file by walking the `services` entry\n * whose `frontendType === STATIC_WEBSITE` and joining\n * `<saasRoot>/<service.path>/`. The saas-config schema's\n * `superRefine` already enforces \"at most one STATIC_WEBSITE\n * service per app\", so the lookup is deterministic — apps can\n * name the website service anything (`'website'`, `'marketing'`,\n * `'site'`).\n *\n * - File presence is the enable signal — there is NO `enabled`\n * field on `WildoMarketingWebsiteConfigSchema`. A STATIC_WEBSITE\n * service without this file is treated as a misconfiguration\n * and the loader throws (rather than silently shipping an Astro\n * build with no `i18n` routing / no canonical origin).\n */\nexport const PER_SERVICE_WEBSITE_CONFIG_FILE_NAME = 'wildo.website.config.ts';\n\n/**\n * Memoization slot scoped to the loader module. Keyed by absolute\n * config file path so multiple SaaS configs evaluated in the same\n * process (rare in production — possible in tests) do not collide.\n *\n * Lifetime: the loader is invoked from the Astro build / dev-server\n * pipeline, both of which restart the Node process on every dev-stack\n * reload (the watcher that picks up changes to `wildo.website.config.ts`\n * is the same watcher that reboots the build). A stale entry here\n * therefore cannot outlive a config edit.\n *\n * Tests can pre-populate a known path via {@link primeWebsiteConfigCache}\n * to skip the jiti round-trip when exercising downstream consumers.\n */\nconst WEBSITE_CONFIG_CACHE = new Map<string, WildoMarketingWebsiteConfig>();\n\n/**\n * Test helper — pre-populate the loader's memoization slot for a\n * given absolute config path. Mirrors the\n * `cachedTechnicalDocConfig` pre-population trick used by\n * `technical-doc.publish-openapi.service.test.ts` so the loader's\n * downstream consumers can be exercised in tests without writing a\n * `.ts` file to disk + invoking jiti.\n *\n * Production callers MUST NOT use this helper.\n */\nexport function primeWebsiteConfigCache(\n absoluteConfigPath: string,\n config: WildoMarketingWebsiteConfig,\n): void {\n WEBSITE_CONFIG_CACHE.set(resolvePath(absoluteConfigPath), config);\n}\n\n/**\n * Test helper — clear every cached entry. Use in `beforeEach`/`afterEach`\n * to prevent test cross-contamination.\n */\nexport function clearWebsiteConfigCache(): void {\n WEBSITE_CONFIG_CACHE.clear();\n}\n\n/**\n * Arguments for {@link loadWebsiteConfig}. Kept as a structured shape\n * (rather than positional `loadWebsiteConfig(saasRoot, saasConfig)`)\n * so that future per-call options (e.g. an explicit `serviceKey`\n * override for multi-website apps the day the singleton invariant\n * relaxes) slot in without breaking callers.\n */\nexport interface LoadWebsiteConfigArgs {\n /**\n * Absolute path to the SaaS app root — the directory holding\n * `wildo.saas.config.ts`. Used to resolve `<saasRoot>/<service.path>/`\n * for the website service folder.\n */\n saasRoot: string;\n /**\n * The already-parsed SaaS config (load once via\n * `loadConfig<WildoSaasConfig>(...)` upstream and pass it down here\n * — re-parsing per call would invoke jiti twice for one logical\n * load).\n */\n saasConfig: WildoSaasConfig;\n}\n\n/**\n * The application's one `STATIC_WEBSITE` service, as `[serviceKey, service]`.\n * Throws when none is declared: the service folder is what owns\n * `wildo.website.config.ts`, so a website build without one has nothing to load.\n */\nexport function resolveStaticWebsiteServiceEntry(\n saasConfig: WildoSaasConfig,\n): [string, WildoSaasConfig['services'][string]] {\n const websiteServiceEntry = Object.entries(saasConfig.services).find(\n ([, service]) => service.frontendType === AppFrontendType.STATIC_WEBSITE,\n );\n if (!websiteServiceEntry) {\n throw new Error(\n '[wildo-website-config] No frontend service with `frontendType: STATIC_WEBSITE` is declared in '\n + 'wildo.saas.config.ts. The marketing-website Astro build / loader requires an authored '\n + 'STATIC_WEBSITE service because that service folder owns the per-service '\n + '`wildo.website.config.ts` (publicOrigin, appOrigin, defaultLocale, locales). '\n + 'Add a STATIC_WEBSITE service in wildo.saas.config.ts and ship the per-service '\n + 'config file under it.',\n );\n }\n return websiteServiceEntry;\n}\n\n/**\n * Discover and load the per-service marketing-website config.\n *\n * Resolution algorithm (mirrors\n * `TechnicalDocCompanionService.loadTechnicalDocConfig`):\n *\n * 1. Find the unique service in `saasConfig.services` whose\n * `frontendType === STATIC_WEBSITE`. The saas-config\n * `superRefine` guarantees there is at most one — if there is\n * none, throw with the misconfiguration message.\n * 2. Resolve `<saasRoot>/<service.path>/wildo.website.config.ts`.\n * 3. If the file does not exist, throw (file presence IS the\n * enable signal — a STATIC_WEBSITE service without this file\n * is broken).\n * 4. Check the memoization slot keyed on the absolute path; return\n * the cached value if present.\n * 5. Call `loadConfig<WildoMarketingWebsiteConfig>(absolutePath)`.\n * jiti evaluates the file, which invokes `defineWebsiteConfig`,\n * which invokes `WildoMarketingWebsiteConfigSchema.parse` and\n * emits any `@unimplemented` warnings. The returned object is\n * already-validated — we trust the in-file `defineWebsiteConfig`\n * contract here (mirrors the technical-doc loader pattern in\n * `TechnicalDocCompanionService.loadTechnicalDocConfig`, which\n * also does NOT re-parse). A file that hand-rolls the default\n * export without going through `defineWebsiteConfig` would\n * surface as a downstream type mismatch — acceptable given the\n * authoring contract is explicit and grep-discoverable.\n * 6. Memoize and return.\n *\n * @throws Error with a `[wildo-website-config]` prefix if no\n * STATIC_WEBSITE service is declared, the per-service config\n * file is missing, or the file's default export does not\n * pass `WildoMarketingWebsiteConfigSchema`. The loader\n * intentionally throws plain `Error`s rather than building a\n * `WildoBackendError` so it stays usable from the Astro\n * build pipeline (which has no DI container) — the companion\n * can wrap with `errorBuilder` at the call site if needed\n * (mirrors how `loadConfig` itself throws plain `Error`).\n */\nexport async function loadWebsiteConfig(\n args: LoadWebsiteConfigArgs,\n): Promise<WildoMarketingWebsiteConfig> {\n const { saasRoot, saasConfig } = args;\n const websiteServiceEntry = resolveStaticWebsiteServiceEntry(saasConfig);\n\n const [websiteServiceKey, websiteService] = websiteServiceEntry;\n const websiteConfigPath = resolvePath(\n saasRoot,\n websiteService.path,\n PER_SERVICE_WEBSITE_CONFIG_FILE_NAME,\n );\n\n const cached = WEBSITE_CONFIG_CACHE.get(websiteConfigPath);\n if (cached !== undefined) {\n return cached;\n }\n\n if (!existsSync(websiteConfigPath)) {\n throw new Error(\n `[wildo-website-config] STATIC_WEBSITE service '${websiteServiceKey}' is declared in `\n + `wildo.saas.config.ts but the required per-service config file `\n + `'${PER_SERVICE_WEBSITE_CONFIG_FILE_NAME}' is missing under `\n + `'${websiteService.path}/'. File presence IS the enable signal `\n + '(saas-website-slice.md / saas-technical-doc.md Step 7.5 — the legacy '\n + '`marketingWebsite` block on wildo.saas.config.ts was dropped in favor of '\n + 'a per-service file). Create '\n + `'${websiteConfigPath}' with `\n + '`export default defineWebsiteConfig({ ... })` from `@wildo-ai/saas-website`.',\n );\n }\n\n let loaded: WildoMarketingWebsiteConfig;\n try {\n loaded = await loadConfig<WildoMarketingWebsiteConfig>(websiteConfigPath);\n } catch (e) {\n const cause = describeThrownValue(e);\n throw new Error(\n `[wildo-website-config] Failed to load per-service marketing-website config at `\n + `${websiteConfigPath}. The file MUST do `\n + '`export default defineWebsiteConfig({...})` and pass '\n + 'WildoMarketingWebsiteConfigSchema (`z.strictObject` — unknown keys reject; '\n + '`defaultLocale` must appear in `locales`). '\n + `Cause: ${cause}`,\n );\n }\n\n WEBSITE_CONFIG_CACHE.set(websiteConfigPath, loaded);\n return loaded;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load-website-pricing-catalog.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"load-website-pricing-catalog.d.ts","sourceRoot":"","sources":["../../../../src/config/load-website-pricing-catalog.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAEjF,MAAM,WAAW,8BAA8B;IAC7C,+FAA+F;IAC/F,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC;;;OAGG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3C;AAED,wBAAsB,yBAAyB,CAAC,KAAK,GAAE,8BAAmC,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAczH;AACD,wEAAwE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load-website-pricing-catalog.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"load-website-pricing-catalog.js","sourceRoot":"","sources":["../../../../src/config/load-website-pricing-catalog.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EACL,mCAAmC,EACnC,UAAU,EACV,qBAAqB,GAEtB,MAAM,+BAA+B,CAAC;AAavC,MAAM,CAAC,KAAK,UAAU,yBAAyB,CAAC,QAAwC,EAAE;IACxF,MAAM,cAAc,GAAG,qBAAqB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACxD,IAAI,cAAc,CAAC,QAAQ,KAAK,IAAI,IAAI,cAAc,CAAC,cAAc,KAAK,IAAI,EAAE,CAAC;QAC/E,MAAM,IAAI,KAAK,CACb,gEAAgE,KAAK,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,EAAE,IAAI;cAC1F,kDAAkD,CACvD,CAAC;IACJ,CAAC;IACD,MAAM,UAAU,GAAG,MAAM,UAAU,CAAkB,cAAc,CAAC,cAAc,CAAC,CAAC;IACpF,OAAO,mCAAmC,CAAC;QACzC,QAAQ,EAAE,cAAc,CAAC,QAAQ;QACjC,UAAU;QACV,GAAG,CAAC,KAAK,CAAC,WAAW,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,KAAK,CAAC,WAAW,EAAE,CAAC;KAC/E,CAAC,CAAC;AACL,CAAC;AACD,wEAAwE","sourcesContent":["/**\n * @wildo_source:part:start saas.website.config.pricing-catalog-loader facet:layer:astro facet:family:website facet:audience:app-developer\n *\n * `loadWebsitePricingCatalog` — the application's public pricing catalogue, for a website's pricing\n * page (#1835). Call it in the page's `.astro` frontmatter, pass the result to the bridge island as\n * `pricingCatalog`, and read it in the section with `useWebsitePricingCatalog()`; build the page's\n * `AggregateOffer` from the same value with `buildWebsitePricingOfferStructuredData`.\n *\n * It walks up to `wildo.saas.config.ts` the way `loadWebsiteSiteContext` does, and reads the billing\n * catalogue the backend sells from — the `productDefinitions` of the application's shared modules —\n * through `loadApplicationPublicPricingCatalog`, from SOURCE, so a website image that builds only the\n * website still sees the current catalogue.\n *\n * Separate from `loadWebsiteSiteContext` on purpose: loading the shared graph costs seconds, and only a\n * pricing page needs it. Every other page's build stays as fast as it was.\n *\n * **Node-only.** Lives on the `/config-loader` subpath; it must never reach a React-island bundle.\n */\nimport {\n loadApplicationPublicPricingCatalog,\n loadConfig,\n resolveWorkspaceScope,\n type WildoSaasConfig,\n} from '@wildo-ai/platform-config-lib';\nimport type { PublicPricingCatalog } from '@wildo-ai/saas-models/public-runtime';\n\nexport interface LoadWebsitePricingCatalogInput {\n /** Where to start the walk up to `wildo.saas.config.ts`. Defaults to the working directory. */\n readonly cwd?: string | undefined;\n /**\n * Keep only plans this scope may subscribe to (a `ResourcePrimaryScope` wire value, e.g.\n * `'organizations'`). Omit when the catalogue sells to one audience.\n */\n readonly targetScope?: string | undefined;\n}\n\nexport async function loadWebsitePricingCatalog(input: LoadWebsitePricingCatalogInput = {}): Promise<PublicPricingCatalog> {\n const workspaceScope = resolveWorkspaceScope(input.cwd);\n if (workspaceScope.saasRoot === null || workspaceScope.saasConfigPath === null) {\n throw new Error(\n `[saas-website] No wildo.saas.config.ts found walking up from ${input.cwd ?? process.cwd()}. `\n + 'Run astro from inside the application workspace.',\n );\n }\n const saasConfig = await loadConfig<WildoSaasConfig>(workspaceScope.saasConfigPath);\n return loadApplicationPublicPricingCatalog({\n saasRoot: workspaceScope.saasRoot,\n saasConfig,\n ...(input.targetScope === undefined ? {} : { targetScope: input.targetScope }),\n });\n}\n/** @wildo_source:part:end saas.website.config.pricing-catalog-loader */\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load-website-site-context.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"load-website-site-context.d.ts","sourceRoot":"","sources":["../../../../src/config/load-website-site-context.ts"],"names":[],"mappings":"AA0CA,OAAO,EAML,KAAK,2BAA2B,EAEjC,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAA6B,KAAK,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yDAAyD,CAAC;AAEjG,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,gCAAgC,CAAC;AAElF,2FAA2F;AAC3F,MAAM,WAAW,sBAAsB;IACrC,8FAA8F;IAC9F,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,0DAA0D;IAC1D,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACzC;AAED,MAAM,WAAW,+BAA+B;IAC9C,uEAAuE;IACvE,QAAQ,CAAC,aAAa,EAAE,2BAA2B,CAAC;IACpD,gCAAgC;IAChC,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAChC,gFAAgF;IAChF,QAAQ,CAAC,YAAY,EAAE,2BAA2B,CAAC;IACnD,qDAAqD;IACrD,QAAQ,CAAC,SAAS,EAAE,sBAAsB,CAAC;CAC5C;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,+BAA+B,GAAG,2BAA2B,CAO9G;AAED,MAAM,WAAW,2BAA2B;IAC1C,6CAA6C;IAC7C,QAAQ,CAAC,UAAU,EAAE,iBAAiB,CAAC;IACvC,iIAAiI;IACjI,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAChC,+FAA+F;IAC/F,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,0FAA0F;IAC1F,QAAQ,CAAC,SAAS,CAAC,EAAE,sBAAsB,GAAG,SAAS,CAAC;CACzD;AAED,wBAAsB,sBAAsB,CAAC,KAAK,EAAE,2BAA2B,GAAG,OAAO,CAAC,kBAAkB,CAAC,CA6B5G;AACD,qEAAqE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load-website-site-context.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"load-website-site-context.js","sourceRoot":"","sources":["../../../../src/config/load-website-site-context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,WAAW,CAAC;AAEnD,OAAO,EACL,UAAU,EACV,iCAAiC,EACjC,mCAAmC,EACnC,kCAAkC,EAClC,qBAAqB,GAGtB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,yBAAyB,EAA2B,MAAM,+BAA+B,CAAC;AAEnG,OAAO,EAAE,iBAAiB,EAAE,gCAAgC,EAAE,MAAM,uBAAuB,CAAC;AAsB5F;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,0BAA0B,CAAC,KAAsC;IAC/E,MAAM,EAAE,aAAa,EAAE,aAAa,EAAE,YAAY,EAAE,SAA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AE,UAAU,EAAE,CAAC,CAAC;IAExE,OAAO,yBAAyB,CAAC;QAC/B,UAAU,EAAE,KAAK,CAAC,UAAU;QAC5B,aAAa,EAAE,0BAA0B,CAAC;YACxC,aAAa;YACb,aAAa,EAAE,KAAK,CAAC,aAAa;YAClC,YAAY,EAAE,kCAAkC,CAAC,UAAU,CAAC,QAAQ,CAAC;YACrE,SAAS,EAAE,KAAK,CAAC,SAAS,IAAI;gBAC5B,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,iBAAiB;gBACxC,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,iBAAiB;aACzC;SACF,CAAC;QACF,iBAAiB,EAAE,iCAAiC,CAAC;YACnD,YAAY,EAAE,mCAAmC,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;YACxE,UAAU,EAAE,iBAAiB;SAC9B,CAAC;KACH,CAAC,CAAC;AACL,CAAC;AACD,qEAAqE","sourcesContent":["/**\n * @wildo_source:part:start saas.website.config.site-context-loader facet:layer:astro facet:family:website facet:audience:app-developer\n *\n * `loadWebsiteSiteContext` — the ONE way a website workspace builds its\n * `WebsiteSiteContext`. Called once, from the workspace's\n * `src/website-site-context.ts`:\n *\n * ```ts\n * import { loadWebsiteSiteContext } from '@wildo-ai/saas-website/config-loader';\n * import { WEBSITE_ROOT_CONFIG } from './website-root.config';\n *\n * export const WEBSITE_SITE_CONTEXT = await loadWebsiteSiteContext({\n * rootConfig: WEBSITE_ROOT_CONFIG,\n * isDevelopment: import.meta.env?.DEV === true,\n * });\n * ```\n *\n * It walks up from the working directory to `wildo.saas.config.ts`, finds the\n * application's single `STATIC_WEBSITE` service, loads that service's\n * `wildo.website.config.ts` and its materialized provider block, and settles the\n * two origins the site reaches the product through (see\n * {@link resolveWebsiteBuildOrigins}).\n *\n * **Why the engine owns this.** Every website workspace used to carry its own\n * copy of this lookup — the scaffolded ones and the hand-written ones alike —\n * and each copy hardcoded its local API port while the app origin had no local\n * form at all. The result: under `astro dev`, every \"Start free\" CTA pointed at a\n * production-shaped host that resolves to nothing. One loader means one rule.\n *\n * **Why it walks up from the working directory, never from `import.meta.url`.**\n * Astro's prerender pass bundles the calling module into `dist/.prerender/chunks/…`,\n * where a `new URL('../..', import.meta.url)` anchor resolves to `dist/` rather than\n * the application root — every prerendered route then failed with \"Config file not\n * found: …/website/dist/wildo.saas.config.ts\", while `astro dev` hid it by serving\n * from `src/`. Every `astro dev` / `astro build` runs with the website package (or\n * an ancestor) as its working directory, which is inside the application either way.\n *\n * **Node-only.** Lives on the `/config-loader` subpath with the other loaders; it\n * must never reach a React-island bundle.\n */\nimport { resolve as resolvePath } from 'node:path';\n\nimport {\n loadConfig,\n loadMaterializedFrontendProviders,\n resolveFrontendServicesArtifactPath,\n resolveLocalhostApplicationOrigins,\n resolveWorkspaceScope,\n type LocalhostApplicationOrigins,\n type WildoSaasConfig,\n} from '@wildo-ai/platform-config-lib';\n\nimport { composeWebsiteSiteContext, type WebsiteSiteContext } from '../astro/website-site-context';\nimport type { WebsiteRootConfig } from '../schemas/manifests/website-root-config.shared.schemas';\nimport { loadWebsiteConfig, resolveStaticWebsiteServiceEntry } from './load-website-config';\nimport type { WildoMarketingWebsiteConfig } from './wildo-website-config.schemas';\n\n/** Explicit per-build origin overrides — what a deploy build passes as build arguments. */\nexport interface WebsiteOriginOverrides {\n /** `PUBLIC_APP_ORIGIN`: this environment's product origin, derived by the deploy workflow. */\n readonly appOrigin?: string | undefined;\n /** `PUBLIC_API_ORIGIN`: this environment's API origin. */\n readonly apiOrigin?: string | undefined;\n}\n\nexport interface ResolveWebsiteBuildOriginsInput {\n /** The authored `wildo.website.config.ts` — the production default. */\n readonly websiteConfig: WildoMarketingWebsiteConfig;\n /** `true` under `astro dev`. */\n readonly isDevelopment: boolean;\n /** Where the product and API run locally, from the app's own declared ports. */\n readonly localOrigins: LocalhostApplicationOrigins;\n /** Explicit overrides, which win over everything. */\n readonly overrides: WebsiteOriginOverrides;\n}\n\n/**\n * The `websiteConfig` this BUILD serves, with `appOrigin` and `apiOrigin` settled.\n *\n * Precedence, per origin:\n *\n * 1. an explicit override (`PUBLIC_APP_ORIGIN` / `PUBLIC_API_ORIGIN`) — the deploy\n * workflow derives these per environment, so a staging build links into staging;\n * 2. under `astro dev`, the locally running product / API, from the ports the\n * application declares — so a CTA reaches the process `wildo local dev` started;\n * 3. the value authored in `wildo.website.config.ts`.\n *\n * The result replaces the two fields in `websiteConfig` rather than living beside\n * it, because every page already forwards `websiteConfig.appOrigin` /\n * `websiteConfig.apiOrigin` into its island: a second field would be a second\n * source that pages could read instead. `websiteConfig` in a site context is\n * therefore \"the config as it applies to this build\", which the config file was\n * already half-way to being — it reads `PUBLIC_APP_ORIGIN` itself.\n */\nexport function resolveWebsiteBuildOrigins(input: ResolveWebsiteBuildOriginsInput): WildoMarketingWebsiteConfig {\n const { websiteConfig, isDevelopment, localOrigins, overrides } = input;\n const settle = (override: string | undefined, local: string | undefined, authored: string | undefined): string | undefined =>\n override || (isDevelopment ? local : undefined) || authored;\n const appOrigin = settle(overrides.appOrigin, localOrigins.app, websiteConfig.appOrigin) ?? websiteConfig.appOrigin;\n const apiOrigin = settle(overrides.apiOrigin, localOrigins.api, websiteConfig.apiOrigin);\n return { ...websiteConfig, appOrigin, ...(apiOrigin === undefined ? {} : { apiOrigin }) };\n}\n\nexport interface LoadWebsiteSiteContextInput {\n /** The workspace's `WEBSITE_ROOT_CONFIG`. */\n readonly rootConfig: WebsiteRootConfig;\n /** Pass `import.meta.env?.DEV === true` (optional chaining: `astro.config.ts` evaluates the caller before Vite's env exists). */\n readonly isDevelopment: boolean;\n /** Where to start the walk up to `wildo.saas.config.ts`. Defaults to the working directory. */\n readonly cwd?: string | undefined;\n /** Defaults to `PUBLIC_APP_ORIGIN` / `PUBLIC_API_ORIGIN` from the process environment. */\n readonly overrides?: WebsiteOriginOverrides | undefined;\n}\n\nexport async function loadWebsiteSiteContext(input: LoadWebsiteSiteContextInput): Promise<WebsiteSiteContext> {\n const workspaceScope = resolveWorkspaceScope(input.cwd);\n if (workspaceScope.saasRoot === null || workspaceScope.saasConfigPath === null) {\n throw new Error(\n `[saas-website] No wildo.saas.config.ts found walking up from ${input.cwd ?? process.cwd()}. `\n + 'Run astro from inside the application workspace.',\n );\n }\n const saasRoot = workspaceScope.saasRoot;\n const saasConfig = await loadConfig<WildoSaasConfig>(workspaceScope.saasConfigPath);\n const [websiteServiceKey] = resolveStaticWebsiteServiceEntry(saasConfig);\n const websiteConfig = await loadWebsiteConfig({ saasRoot, saasConfig });\n\n return composeWebsiteSiteContext({\n rootConfig: input.rootConfig,\n websiteConfig: resolveWebsiteBuildOrigins({\n websiteConfig,\n isDevelopment: input.isDevelopment,\n localOrigins: resolveLocalhostApplicationOrigins(saasConfig.services),\n overrides: input.overrides ?? {\n appOrigin: process.env.PUBLIC_APP_ORIGIN,\n apiOrigin: process.env.PUBLIC_API_ORIGIN,\n },\n }),\n frontendProviders: loadMaterializedFrontendProviders({\n artifactPath: resolveFrontendServicesArtifactPath(resolvePath(saasRoot)),\n serviceKey: websiteServiceKey,\n }),\n });\n}\n/** @wildo_source:part:end saas.website.config.site-context-loader */\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wildo-website-config.schemas.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"wildo-website-config.schemas.d.ts","sourceRoot":"","sources":["../../../../src/config/wildo-website-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsHG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAC;AAEvF;;;;;;;;;GASG;AACH,eAAO,MAAM,yBAAyB;;;kBASpC,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,iCAAiC;IAE1C;;;;;;;;;;OAUG;;IASH;;;;;;;;;;;;;;;;;;;OAmBG;;IAGH;;;;;;;;;;;;;;;;;;;;;;OAsBG;;IAWH;;;;;OAKG;;;;;;;;IAGH;;;;;;;;;OASG;;IAGH;;;;;;;;;OASG;;;;;kBAqDH,CAAC;AACL,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC;AAC5F,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC;AACjG,wDAAwD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-loader.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"config-loader.d.ts","sourceRoot":"","sources":["../../../src/config-loader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oCAAoC,CAAC;AACnD,cAAc,uCAAuC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-loader.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"config-loader.js","sourceRoot":"","sources":["../../../src/config-loader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oCAAoC,CAAC;AACnD,cAAc,uCAAuC,CAAC","sourcesContent":["/**\n * @wildo-package @wildo-ai/saas-website (Node-only config-loader entry)\n *\n * Dedicated subpath for the per-service `wildo.website.config.ts`\n * loader (`saas-website-slice.md` Step 7.5 — mirrors the\n * `saas-technical-doc.md` Step 7.5 ship). Consumers:\n *\n * - `examples/wonder-todos/website/astro.config.ts` — wires the\n * loader into the Astro build's `i18n` config.\n * - Future companion subprocesses that introspect the marketing\n * surface (locale coverage audits, SEO-link sanity checks).\n *\n * @wildo-boundary\n * This entry is on the **Node-only** side of the bundle boundary.\n * It re-exports `loadWebsiteConfig` (which transitively pulls\n * `loadConfig` from `@wildo-ai/platform-config-lib` — jiti-backed,\n * uses `node:fs` / `node:path` / `node:crypto`) and is therefore\n * carved into its own package subpath so it cannot leak into the\n * browser-side React-island bundle.\n *\n * Enforced by `engine/saas-website/src/__tests__/bundle-isolation.test.ts`:\n * - This file IS in `ENTRY_FILES` (so the closure walker covers it).\n * - `@wildo-ai/platform-config-lib` is in `ALLOWED_BARE_SPECIFIERS`\n * AND `SSR_ONLY_BARE_SPECIFIERS`, which together prove the\n * specifier reaches the closure ONLY through this entry — never\n * through `index.ts`, `companion-exports.ts`, or `astro-island.ts`.\n *\n * Re-exporting `loadWebsiteConfig` from `index.ts` would (a) drag\n * `@wildo-ai/platform-config-lib`'s heavy graph into the marketing-\n * site browser bundle and (b) trip the SSR-tier negative test\n * above — both fail-loud signals that this subpath separation\n * exists for a reason.\n */\n\nexport * from './config/load-website-config';\nexport * from './config/load-website-site-context';\nexport * from './config/load-website-pricing-catalog';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InboundContactForm.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"InboundContactForm.d.ts","sourceRoot":"","sources":["../../../../../src/core/anonymous-session/InboundContactForm.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAgC,MAAM,OAAO,CAAC;AASrD,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AACxF,OAAO,EAIL,KAAK,gCAAgC,EACtC,MAAM,gCAAgC,CAAC;AAExC;;;;GAIG;AACH,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;IACrB,6EAA6E;IAC7E,uBAAuB,EAAE,MAAM,CAAC;IAChC,wFAAwF;IACxF,mBAAmB,EAAE,MAAM,CAAC;CAC7B;AAID,MAAM,WAAW,uBAAuB;IACtC,yFAAyF;IACzF,MAAM,EAAE,6BAA6B,CAAC;IACtC,sEAAsE;IACtE,MAAM,EAAE,wBAAwB,CAAC;IACjC,8EAA8E;IAC9E,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,yGAAyG;IACzG,eAAe,CAAC,EAAE,gCAAgC,CAAC;CACpD;AAUD,wBAAgB,kBAAkB,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,eAAe,EAAE,EAAE,uBAAuB,GAAG,KAAK,CAAC,YAAY,CAgIhI"}
|