@wildo-ai/saas-website 1.1.5 → 1.1.7
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/blog-post-bridge.d.ts +9 -0
- package/dist/esm/astro/blog-post-bridge.d.ts.map +1 -1
- package/dist/esm/astro/blog-post-bridge.js +10 -5
- 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 +25 -6
- package/dist/esm/astro/bridge-runtime.d.ts.map +1 -1
- package/dist/esm/astro/bridge-runtime.js +10 -6
- 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 +4 -4
- package/dist/esm/astro/label-pack-loader.d.ts.map +1 -1
- package/dist/esm/astro/label-pack-loader.js +9 -4
- 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 +9 -8
- package/dist/esm/astro/robots-renderer.d.ts.map +1 -1
- package/dist/esm/astro/robots-renderer.js +15 -15
- 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 +1 -1
- package/dist/esm/astro/website-page-head.renderer.d.ts.map +1 -1
- package/dist/esm/astro/website-page-head.renderer.js +2 -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 +5 -2
- 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.map +1 -1
- package/dist/esm/companion-exports.d.ts +8 -15
- package/dist/esm/companion-exports.d.ts.map +1 -1
- package/dist/esm/companion-exports.js +8 -15
- 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 +3 -2
- package/dist/esm/config/define-website-config.d.ts.map +1 -1
- package/dist/esm/config/define-website-config.js +10 -10
- 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 +6 -0
- package/dist/esm/config/load-website-config.d.ts.map +1 -1
- package/dist/esm/config/load-website-config.js +18 -9
- package/dist/esm/config/load-website-config.js.map +1 -1
- package/dist/esm/config/load-website-pricing-catalog.d.ts +13 -0
- package/dist/esm/config/load-website-pricing-catalog.d.ts.map +1 -0
- package/dist/esm/config/load-website-pricing-catalog.js +34 -0
- package/dist/esm/config/load-website-pricing-catalog.js.map +1 -0
- package/dist/esm/config/load-website-site-context.d.ts +53 -0
- package/dist/esm/config/load-website-site-context.d.ts.map +1 -0
- package/dist/esm/config/load-website-site-context.js +98 -0
- package/dist/esm/config/load-website-site-context.js.map +1 -0
- package/dist/esm/config/wildo-website-config.schemas.d.ts.map +1 -1
- package/dist/esm/config-loader.d.ts +2 -0
- package/dist/esm/config-loader.d.ts.map +1 -1
- package/dist/esm/config-loader.js +2 -0
- package/dist/esm/config-loader.js.map +1 -1
- package/dist/esm/core/anonymous-session/InboundContactForm.d.ts +26 -6
- package/dist/esm/core/anonymous-session/InboundContactForm.d.ts.map +1 -1
- package/dist/esm/core/anonymous-session/InboundContactForm.js +51 -33
- package/dist/esm/core/anonymous-session/InboundContactForm.js.map +1 -1
- package/dist/esm/core/anonymous-session/inbound-contact-form.schema.d.ts +11 -0
- 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 +15 -4
- 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 +14 -2
- 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 +34 -4
- 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 +36 -0
- package/dist/esm/core/anonymous-session/website-submission-challenge.d.ts.map +1 -0
- package/dist/esm/core/anonymous-session/website-submission-challenge.js +69 -0
- package/dist/esm/core/anonymous-session/website-submission-challenge.js.map +1 -0
- package/dist/esm/core/consent/WebsiteConsentBanner.d.ts.map +1 -1
- package/dist/esm/core/consent/WebsiteConsentBanner.js +11 -10
- 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 +25 -5
- 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 +18 -0
- package/dist/esm/core/contexts/useWebsiteRuntime.d.ts.map +1 -1
- package/dist/esm/core/contexts/useWebsiteRuntime.js +28 -2
- 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 +57 -0
- package/dist/esm/core/external-providers/WebsiteProviderComponent.d.ts.map +1 -0
- package/dist/esm/core/external-providers/WebsiteProviderComponent.js +56 -0
- package/dist/esm/core/external-providers/WebsiteProviderComponent.js.map +1 -0
- 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 +63 -0
- package/dist/esm/core/external-providers/provider-component-registry.website.d.ts.map +1 -0
- package/dist/esm/core/external-providers/provider-component-registry.website.js +68 -0
- package/dist/esm/core/external-providers/provider-component-registry.website.js.map +1 -0
- package/dist/esm/core/external-providers/useWebsiteProviderComponent.d.ts +36 -0
- package/dist/esm/core/external-providers/useWebsiteProviderComponent.d.ts.map +1 -0
- package/dist/esm/core/external-providers/useWebsiteProviderComponent.js +59 -0
- package/dist/esm/core/external-providers/useWebsiteProviderComponent.js.map +1 -0
- package/dist/esm/core/external-providers/useWebsiteProviderScripts.d.ts +15 -5
- package/dist/esm/core/external-providers/useWebsiteProviderScripts.d.ts.map +1 -1
- package/dist/esm/core/external-providers/useWebsiteProviderScripts.js +39 -24
- package/dist/esm/core/external-providers/useWebsiteProviderScripts.js.map +1 -1
- package/dist/esm/core/external-providers/website-provider-sdk-activations.d.ts +11 -0
- package/dist/esm/core/external-providers/website-provider-sdk-activations.d.ts.map +1 -0
- package/dist/esm/core/external-providers/website-provider-sdk-activations.js +14 -0
- package/dist/esm/core/external-providers/website-provider-sdk-activations.js.map +1 -0
- package/dist/esm/core/factories/define-website-page-manifest.d.ts.map +1 -1
- package/dist/esm/core/factories/define-website-section.d.ts +3 -3
- package/dist/esm/core/factories/define-website-section.d.ts.map +1 -1
- package/dist/esm/core/factories/define-website-section.js +3 -3
- 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 +10 -7
- package/dist/esm/core/layouts/WebsitePageLayout.js.map +1 -1
- 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 +30 -65
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +30 -65
- 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 +35 -6
- 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 +39 -5
- 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 +32 -0
- package/dist/esm/schemas/label-keys/website-provider-component-label-keys.schemas.d.ts.map +1 -0
- package/dist/esm/schemas/label-keys/website-provider-component-label-keys.schemas.js +36 -0
- package/dist/esm/schemas/label-keys/website-provider-component-label-keys.schemas.js.map +1 -0
- package/dist/esm/schemas/manifests/website-page-manifest.shared.schemas.d.ts.map +1 -1
- package/dist/esm/schemas/manifests/website-root-config.shared.schemas.d.ts +9 -8
- 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 +8 -7
- 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 +14 -7
- 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 +14 -7
- 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 +57 -0
- package/dist/esm/schemas/structured-data/pricing-offer-structured-data.shared.d.ts.map +1 -0
- package/dist/esm/schemas/structured-data/pricing-offer-structured-data.shared.js +76 -0
- package/dist/esm/schemas/structured-data/pricing-offer-structured-data.shared.js.map +1 -0
- package/dist/esm/schemas/structured-data/structured-data-reconciliation.shared.d.ts +23 -0
- 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 +20 -2
- 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 +7 -5
- 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/__tests__/bundle-isolation.test.ts +19 -22
- package/src/astro/__tests__/blog-post-bridge.test.tsx +18 -2
- package/src/astro/__tests__/bridge-runtime.test.tsx +21 -3
- package/src/astro/__tests__/label-pack-loader.test.ts +7 -4
- package/src/astro/blog-post-bridge.tsx +19 -5
- package/src/astro/bridge-runtime.tsx +35 -11
- package/src/astro/label-pack-loader.ts +8 -4
- package/src/astro/robots-renderer.ts +15 -15
- package/src/astro/website-page-head.renderer.ts +2 -2
- package/src/astro/website-site-context.ts +5 -2
- package/src/companion-exports.ts +8 -15
- package/src/config/__tests__/website-build-origins.test.ts +52 -0
- package/src/config/define-website-config.ts +10 -10
- package/src/config/load-website-config.ts +25 -14
- package/src/config/load-website-pricing-catalog.ts +52 -0
- package/src/config/load-website-site-context.ts +145 -0
- package/src/config-loader.ts +2 -0
- package/src/core/__tests__/contexts.test.tsx +20 -1
- package/src/core/__tests__/website-consent.test.tsx +2 -1
- package/src/core/anonymous-session/InboundContactForm.tsx +100 -45
- package/src/core/anonymous-session/__tests__/InboundContactForm.labels.test.tsx +108 -0
- package/src/core/anonymous-session/__tests__/InboundContactForm.submission-challenge.test.tsx +139 -0
- package/src/core/anonymous-session/inbound-contact-form.schema.ts +16 -4
- package/src/core/anonymous-session/website-anonymous-session-client.ts +39 -4
- package/src/core/anonymous-session/website-submission-challenge.ts +99 -0
- package/src/core/consent/WebsiteConsentBanner.tsx +11 -10
- package/src/core/contexts/WebsiteRuntimeContext.tsx +25 -5
- package/src/core/contexts/useWebsiteRuntime.ts +33 -2
- package/src/core/external-providers/WebsiteProviderComponent.tsx +153 -0
- package/src/core/external-providers/__tests__/frontend-provider-registry.website.test.ts +4 -0
- package/src/core/external-providers/__tests__/website-provider-component.test.tsx +238 -0
- package/src/core/external-providers/__tests__/website-provider-sdks.test.tsx +72 -0
- package/src/core/external-providers/provider-component-registry.website.ts +115 -0
- package/src/core/external-providers/useWebsiteProviderComponent.ts +76 -0
- package/src/core/external-providers/useWebsiteProviderScripts.ts +56 -37
- package/src/core/external-providers/website-provider-sdk-activations.ts +23 -0
- package/src/core/factories/define-website-section.ts +3 -3
- package/src/core/layouts/WebsitePageLayout.tsx +11 -6
- package/src/index.ts +31 -65
- package/src/schemas/__tests__/design-token-css-property.test.ts +72 -0
- package/src/schemas/__tests__/pricing-offer-structured-data.test.ts +122 -0
- package/src/schemas/__tests__/structured-data-reconciliation.test.ts +35 -0
- package/src/schemas/design-tokens/website-design-tokens.shared.schemas.ts +45 -5
- package/src/schemas/label-keys/__tests__/scaffolded-consent-label-pack.parity.test.ts +12 -0
- package/src/schemas/label-keys/website-provider-component-label-keys.schemas.ts +40 -0
- package/src/schemas/manifests/website-root-config.shared.schemas.ts +10 -9
- package/src/schemas/sections/website-section-definition.shared.schemas.ts +14 -7
- package/src/schemas/structured-data/pricing-offer-structured-data.shared.ts +144 -0
- package/src/schemas/structured-data/structured-data-reconciliation.shared.ts +46 -1
- package/src/schemas/structured-data/website-structured-data.shared.schemas.ts +7 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blog-post-frontmatter.shared.schemas.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"blog-post-frontmatter.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../src/schemas/blog/blog-post-frontmatter.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAEzE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,QAAA,MAAM,mBAAmB,wDAQC,CAAC;AAE3B,eAAO,MAAM,kBAAkB,EAAE,OAAO,mBAAyC,CAAC;AAElF,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAE/D,QAAA,MAAM,oBAAoB,yDAQC,CAAC;AAE5B,eAAO,MAAM,mBAAmB,EAAE,OAAO,oBAA2C,CAAC;AAErF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAEjE,QAAA,MAAM,kBAAkB,uDAQC,CAAC;AAE1B,eAAO,MAAM,iBAAiB,EAAE,OAAO,kBAAuC,CAAC;AAE/E,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE7D,QAAA,MAAM,0BAA0B;;;;;;;;;iBAS9B,CAAC;AAEH,eAAO,MAAM,yBAAyB,EAAE,OAAO,0BACnB,CAAC;AAE7B,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;;AAC7E,2DAA2D"}
|
|
@@ -3,8 +3,10 @@ import { z } from 'zod';
|
|
|
3
3
|
* @wildo_source:part:start saas.website.design-tokens.colors facet:layer:shared facet:family:website
|
|
4
4
|
*
|
|
5
5
|
* `WebsiteColorTokens` — minimal palette the marketing-site exposes as
|
|
6
|
-
* CSS custom properties (`--website-
|
|
7
|
-
*
|
|
6
|
+
* CSS custom properties (`--website-colors-<token>`, the key verbatim, so
|
|
7
|
+
* `surfaceForeground` → `--website-colors-surfaceForeground`) on `:root`.
|
|
8
|
+
* Reference one from code through `websiteDesignTokenCssVar('colors', …)`
|
|
9
|
+
* rather than spelling the name.
|
|
8
10
|
*
|
|
9
11
|
* **Why a dedicated marketing palette** (vs. reusing
|
|
10
12
|
* `presets-components-models/design-tokens-config`):
|
|
@@ -33,8 +35,9 @@ import { z } from 'zod';
|
|
|
33
35
|
* `cssSafeValue` JSDoc above for the full threat model.
|
|
34
36
|
*
|
|
35
37
|
* **Adding a token**: append the field here using `cssSafeValue(...)`,
|
|
36
|
-
* document its semantic intent in the JSDoc
|
|
37
|
-
*
|
|
38
|
+
* document its semantic intent in the JSDoc. `renderWebsiteDesignTokensCss`
|
|
39
|
+
* (from `@wildo-ai/saas-website/astro`) emits every key generically, so no
|
|
40
|
+
* emitter needs editing.
|
|
38
41
|
*/
|
|
39
42
|
declare const _WebsiteColorTokensSchema: z.ZodObject<{
|
|
40
43
|
background: z.ZodString;
|
|
@@ -56,7 +59,7 @@ export type WebsiteColorTokens = z.infer<typeof _WebsiteColorTokensSchema>;
|
|
|
56
59
|
* @wildo_source:part:start saas.website.design-tokens.radius facet:layer:shared facet:family:website
|
|
57
60
|
*
|
|
58
61
|
* `WebsiteRadiusTokens` — border-radius scale exposed as
|
|
59
|
-
* `--website-
|
|
62
|
+
* `--website-radii-<token>` CSS variables.
|
|
60
63
|
*
|
|
61
64
|
* Marketing radii are intentionally a separate token set from the
|
|
62
65
|
* SaaS app's radii: the website typically wants larger pill / hero
|
|
@@ -115,6 +118,32 @@ declare const _WebsiteDesignTokensSchema: z.ZodObject<{
|
|
|
115
118
|
}, z.core.$strip>;
|
|
116
119
|
export declare const WebsiteDesignTokensSchema: typeof _WebsiteDesignTokensSchema;
|
|
117
120
|
export type WebsiteDesignTokens = z.infer<typeof _WebsiteDesignTokensSchema>;
|
|
118
|
-
export {};
|
|
119
121
|
/** @wildo_source:part:end saas.website.design-tokens.bundle */
|
|
122
|
+
/**
|
|
123
|
+
* The CSS custom-property NAME one design token is emitted under —
|
|
124
|
+
* `--website-<group>-<token>`, with the token key verbatim (no case
|
|
125
|
+
* conversion), so `('colors', 'surfaceForeground')` is
|
|
126
|
+
* `--website-colors-surfaceForeground`.
|
|
127
|
+
*
|
|
128
|
+
* This is the one place the naming rule lives. `renderWebsiteDesignTokensCss`
|
|
129
|
+
* emits through it, and every engine component that reads a token reads
|
|
130
|
+
* through `websiteDesignTokenCssVar`. It exists because the rule used to be
|
|
131
|
+
* spelled by hand at each reader, and one reader spelled it
|
|
132
|
+
* `surface-foreground`: the consent banner's text colour silently fell back to
|
|
133
|
+
* `#000` on every site, whatever palette the application authored.
|
|
134
|
+
*/
|
|
135
|
+
export declare function websiteDesignTokenCssProperty(group: string, token: string): string;
|
|
136
|
+
/**
|
|
137
|
+
* A `var(...)` reference to one design token, typed against the token bundle
|
|
138
|
+
* so a misspelt group or key does not compile.
|
|
139
|
+
*
|
|
140
|
+
* @example
|
|
141
|
+
* ```ts
|
|
142
|
+
* import { websiteDesignTokenCssVar } from '@wildo-ai/saas-website';
|
|
143
|
+
* const style = { color: websiteDesignTokenCssVar('colors', 'surfaceForeground', '#000') };
|
|
144
|
+
* // → 'var(--website-colors-surfaceForeground, #000)'
|
|
145
|
+
* ```
|
|
146
|
+
*/
|
|
147
|
+
export declare function websiteDesignTokenCssVar<G extends keyof WebsiteDesignTokens>(group: G, token: keyof WebsiteDesignTokens[G] & string, fallback?: string): string;
|
|
148
|
+
export {};
|
|
120
149
|
//# sourceMappingURL=website-design-tokens.shared.schemas.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"website-design-tokens.shared.schemas.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"website-design-tokens.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../src/schemas/design-tokens/website-design-tokens.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA4DxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,QAAA,MAAM,yBAAyB;;;;;;;;;;;;iBAY7B,CAAC;AAEH,eAAO,MAAM,wBAAwB,EAAE,OAAO,yBAAqD,CAAC;AAEpG,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC3E,+DAA+D;AAE/D;;;;;;;;;;;;;;;GAeG;AACH,QAAA,MAAM,0BAA0B;;;;;;;iBAO9B,CAAC;AAEH,eAAO,MAAM,yBAAyB,EAAE,OAAO,0BAAuD,CAAC;AAEvG,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAC7E,+DAA+D;AAE/D;;;;;;;;;;GAUG;AACH,QAAA,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;iBAG9B,CAAC;AAEH,eAAO,MAAM,yBAAyB,EAAE,OAAO,0BAAuD,CAAC;AAEvG,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAC7E,+DAA+D;AAE/D;;;;;;;;;;;;GAYG;AACH,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAElF;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,wBAAwB,CAAC,CAAC,SAAS,MAAM,mBAAmB,EAC1E,KAAK,EAAE,CAAC,EACR,KAAK,EAAE,MAAM,mBAAmB,CAAC,CAAC,CAAC,GAAG,MAAM,EAC5C,QAAQ,CAAC,EAAE,MAAM,GAChB,MAAM,CAGR"}
|
|
@@ -58,8 +58,10 @@ const cssSafeValue = (fieldName) => z
|
|
|
58
58
|
* @wildo_source:part:start saas.website.design-tokens.colors facet:layer:shared facet:family:website
|
|
59
59
|
*
|
|
60
60
|
* `WebsiteColorTokens` — minimal palette the marketing-site exposes as
|
|
61
|
-
* CSS custom properties (`--website-
|
|
62
|
-
*
|
|
61
|
+
* CSS custom properties (`--website-colors-<token>`, the key verbatim, so
|
|
62
|
+
* `surfaceForeground` → `--website-colors-surfaceForeground`) on `:root`.
|
|
63
|
+
* Reference one from code through `websiteDesignTokenCssVar('colors', …)`
|
|
64
|
+
* rather than spelling the name.
|
|
63
65
|
*
|
|
64
66
|
* **Why a dedicated marketing palette** (vs. reusing
|
|
65
67
|
* `presets-components-models/design-tokens-config`):
|
|
@@ -88,8 +90,9 @@ const cssSafeValue = (fieldName) => z
|
|
|
88
90
|
* `cssSafeValue` JSDoc above for the full threat model.
|
|
89
91
|
*
|
|
90
92
|
* **Adding a token**: append the field here using `cssSafeValue(...)`,
|
|
91
|
-
* document its semantic intent in the JSDoc
|
|
92
|
-
*
|
|
93
|
+
* document its semantic intent in the JSDoc. `renderWebsiteDesignTokensCss`
|
|
94
|
+
* (from `@wildo-ai/saas-website/astro`) emits every key generically, so no
|
|
95
|
+
* emitter needs editing.
|
|
93
96
|
*/
|
|
94
97
|
const _WebsiteColorTokensSchema = z.object({
|
|
95
98
|
background: cssSafeValue('background color'),
|
|
@@ -110,7 +113,7 @@ export const WebsiteColorTokensSchema = _WebsiteColorTokensSchema;
|
|
|
110
113
|
* @wildo_source:part:start saas.website.design-tokens.radius facet:layer:shared facet:family:website
|
|
111
114
|
*
|
|
112
115
|
* `WebsiteRadiusTokens` — border-radius scale exposed as
|
|
113
|
-
* `--website-
|
|
116
|
+
* `--website-radii-<token>` CSS variables.
|
|
114
117
|
*
|
|
115
118
|
* Marketing radii are intentionally a separate token set from the
|
|
116
119
|
* SaaS app's radii: the website typically wants larger pill / hero
|
|
@@ -149,4 +152,35 @@ const _WebsiteDesignTokensSchema = z.object({
|
|
|
149
152
|
});
|
|
150
153
|
export const WebsiteDesignTokensSchema = _WebsiteDesignTokensSchema;
|
|
151
154
|
/** @wildo_source:part:end saas.website.design-tokens.bundle */
|
|
155
|
+
/**
|
|
156
|
+
* The CSS custom-property NAME one design token is emitted under —
|
|
157
|
+
* `--website-<group>-<token>`, with the token key verbatim (no case
|
|
158
|
+
* conversion), so `('colors', 'surfaceForeground')` is
|
|
159
|
+
* `--website-colors-surfaceForeground`.
|
|
160
|
+
*
|
|
161
|
+
* This is the one place the naming rule lives. `renderWebsiteDesignTokensCss`
|
|
162
|
+
* emits through it, and every engine component that reads a token reads
|
|
163
|
+
* through `websiteDesignTokenCssVar`. It exists because the rule used to be
|
|
164
|
+
* spelled by hand at each reader, and one reader spelled it
|
|
165
|
+
* `surface-foreground`: the consent banner's text colour silently fell back to
|
|
166
|
+
* `#000` on every site, whatever palette the application authored.
|
|
167
|
+
*/
|
|
168
|
+
export function websiteDesignTokenCssProperty(group, token) {
|
|
169
|
+
return `--website-${group}-${token}`;
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* A `var(...)` reference to one design token, typed against the token bundle
|
|
173
|
+
* so a misspelt group or key does not compile.
|
|
174
|
+
*
|
|
175
|
+
* @example
|
|
176
|
+
* ```ts
|
|
177
|
+
* import { websiteDesignTokenCssVar } from '@wildo-ai/saas-website';
|
|
178
|
+
* const style = { color: websiteDesignTokenCssVar('colors', 'surfaceForeground', '#000') };
|
|
179
|
+
* // → 'var(--website-colors-surfaceForeground, #000)'
|
|
180
|
+
* ```
|
|
181
|
+
*/
|
|
182
|
+
export function websiteDesignTokenCssVar(group, token, fallback) {
|
|
183
|
+
const property = websiteDesignTokenCssProperty(group, token);
|
|
184
|
+
return fallback === undefined ? `var(${property})` : `var(${property}, ${fallback})`;
|
|
185
|
+
}
|
|
152
186
|
//# sourceMappingURL=website-design-tokens.shared.schemas.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"website-design-tokens.shared.schemas.js","sourceRoot":"","sources":["../../../../../src/schemas/design-tokens/website-design-tokens.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,MAAM,+BAA+B,GAAG,uBAAuB,CAAC;AAChE,MAAM,YAAY,GAAG,CAAC,SAAiB,EAAe,EAAE,CACtD,CAAC;KACE,MAAM,EAAE;KACR,GAAG,CAAC,CAAC,EAAE,EAAE,KAAK,EAAE,GAAG,SAAS,oBAAoB,EAAE,CAAC;KACnD,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,+BAA+B,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;IAC/D,KAAK,EACH,GAAG,SAAS,oDAAoD;QAChE,8DAA8D;QAC9D,wEAAwE;CAC3E,CAA2B,CAAC;AAEjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CA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import { z } from 'zod';\n\n/**\n * CSS-injection-safe value validator shared by every design-token field.\n *\n * **Threat model** — TWO escape surfaces, BOTH covered:\n *\n * 1. CSS *declaration* break-out (Phase 6 third audit fix H-α):\n * the renderer `renderWebsiteDesignTokensCss` interpolates token\n * values **raw** into a `:root { --website-<group>-<token>: <value>; }`\n * block. A value containing any of `;`, `}`, `{`, `/*`, `*\\/`, or a\n * newline can break out of the property declaration and inject\n * arbitrary CSS — at minimum a config typo silently corrupts the\n * page; at worst a malicious or untrusted config author injects a\n * `body { display: none; }` rule that blanks the entire site.\n *\n * 2. HTML *style-element* break-out (Phase 6 fourth audit fix H-Χ):\n * the rendered `:root { ... }` block is itself wrapped in an inline\n * `<style>…</style>` element by the head renderer. Per the HTML spec\n * the `<style>` element is a *raw-text* element — its only\n * terminator is the literal sequence `</style`. A token value\n * containing `<` (or, for symmetry, `>`) can therefore close the\n * `<style>` element early and follow up with `<svg onload=alert(1)>`\n * or any other HTML / JS payload, which the H-α deny-list (which\n * did NOT forbid `<` / `>`) failed to catch. CSS values legitimately\n * need NEITHER `<` NOR `>` (no CSS grammar uses them — no color,\n * length, variable reference, calc expression, or functional\n * notation does), so denying both is conservative and correct.\n *\n * **Why validate at the schema layer (not inside the renderer)**:\n * 1. Fail at config load (build-time / boot-time), not at every\n * `<head>` render — a malformed token surfaces in the schema-parse\n * error message instead of silently emitting broken CSS / HTML.\n * 2. Single source of truth — every field that flows into the\n * `<style>`-wrapped CSS block gets the same guard (impossible to\n * add a future token field that bypasses the renderer's escape\n * pass).\n * 3. The renderer stays a simple interpolator, which makes its own\n * audit surface trivially small.\n *\n * **Why a `.refine` over a strict color-string regex**: colors accept\n * `currentColor`, named colors, `var(--foo)` references, oklch\n * functional notation, etc. — a strict positive grammar is ~80 lines\n * and high-maintenance. A negative deny-list of the eight characters\n * that are LITERALLY the only ones that can break out of either the CSS\n * property declaration OR the wrapping `<style>` element is small,\n * complete, and obviously correct.\n */\nconst CSS_INJECTION_FORBIDDEN_PATTERN = /[;{}<>\\n\\r]|\\/\\*|\\*\\//;\nconst cssSafeValue = (fieldName: string): z.ZodString =>\n z\n .string()\n .min(1, { error: `${fieldName} must not be empty` })\n .refine((value) => !CSS_INJECTION_FORBIDDEN_PATTERN.test(value), {\n error:\n `${fieldName} must not contain CSS-injection or HTML break-out ` +\n `metacharacters (; { } < > /* */ newline) — token values are ` +\n `interpolated raw into <style>:root { --website-...: <value>; }</style>`,\n }) as unknown as z.ZodString;\n\n/**\n * @wildo_source:part:start saas.website.design-tokens.colors facet:layer:shared facet:family:website\n *\n * `WebsiteColorTokens` — minimal palette the marketing-site exposes as\n * CSS custom properties (`--website-color-<token>`) on the\n * `<WebsitePageLayout>` root.\n *\n * **Why a dedicated marketing palette** (vs. reusing\n * `presets-components-models/design-tokens-config`):\n *\n * - The SaaS app's design tokens carry many semantic states (`muted`,\n * `destructive`, `ring`, `sidebar-*`, …) that have no marketing-site\n * analogue. Forcing the website to consume the full palette would\n * leak app-internal semantics into a public surface.\n * - Marketing pages need *display-grade* colors (heavily branded\n * accents, gradient stops, hero-overlay tints) that the SaaS app's\n * functional palette deliberately avoids.\n * - Designers overriding website tokens (Phase 6 dogfood proves this\n * path) should not be able to break the SaaS app by editing one\n * tailwind.config — the two surfaces stay decoupled.\n *\n * **Token format**: every value is a CSS color string. Shape validation\n * is intentionally permissive (accepts hex, rgb/rgba, hsl/hsla, oklch,\n * `currentColor`, named colors, CSS variable references) — a strict\n * color-string regex would reject legitimate values (oklch grammar\n * alone is ~80 lines) and a malformed-but-syntactically-valid color\n * fails loudly at render time.\n *\n * **What IS strictly enforced**: every value passes `cssSafeValue`,\n * which rejects the six characters that can break out of a CSS\n * property declaration (`;`, `{`, `}`, `/*`, `*\\/`, newline). See the\n * `cssSafeValue` JSDoc above for the full threat model.\n *\n * **Adding a token**: append the field here using `cssSafeValue(...)`,\n * document its semantic intent in the JSDoc, and update the matching\n * CSS-emit helper in Phase 2 (`emitWebsiteColorTokensCss`).\n */\nconst _WebsiteColorTokensSchema = z.object({\n background: cssSafeValue('background color'),\n foreground: cssSafeValue('foreground color'),\n primary: cssSafeValue('primary color'),\n primaryForeground: cssSafeValue('primaryForeground color'),\n accent: cssSafeValue('accent color'),\n accentForeground: cssSafeValue('accentForeground color'),\n surface: cssSafeValue('surface color'),\n surfaceForeground: cssSafeValue('surfaceForeground color'),\n border: cssSafeValue('border color'),\n muted: cssSafeValue('muted color'),\n mutedForeground: cssSafeValue('mutedForeground color'),\n});\n\nexport const WebsiteColorTokensSchema: typeof _WebsiteColorTokensSchema = _WebsiteColorTokensSchema;\n\nexport type WebsiteColorTokens = z.infer<typeof _WebsiteColorTokensSchema>;\n/** @wildo_source:part:end saas.website.design-tokens.colors */\n\n/**\n * @wildo_source:part:start saas.website.design-tokens.radius facet:layer:shared facet:family:website\n *\n * `WebsiteRadiusTokens` — border-radius scale exposed as\n * `--website-radius-<token>` CSS variables.\n *\n * Marketing radii are intentionally a separate token set from the\n * SaaS app's radii: the website typically wants larger pill / hero\n * radii than the app's compact-UI radii. Keeping them separate lets\n * either surface evolve without coupling.\n *\n * Values are CSS length strings (`'0.25rem'`, `'12px'`,\n * `'9999px'`). Same permissive-shape + strict-CSS-injection\n * rationale as `WebsiteColorTokens` (every value runs through\n * `cssSafeValue`).\n */\nconst _WebsiteRadiusTokensSchema = z.object({\n none: cssSafeValue('none radius'),\n sm: cssSafeValue('sm radius'),\n md: cssSafeValue('md radius'),\n lg: cssSafeValue('lg radius'),\n xl: cssSafeValue('xl radius'),\n full: cssSafeValue('full radius'),\n});\n\nexport const WebsiteRadiusTokensSchema: typeof _WebsiteRadiusTokensSchema = _WebsiteRadiusTokensSchema;\n\nexport type WebsiteRadiusTokens = z.infer<typeof _WebsiteRadiusTokensSchema>;\n/** @wildo_source:part:end saas.website.design-tokens.radius */\n\n/**\n * @wildo_source:part:start saas.website.design-tokens.bundle facet:layer:shared facet:family:website\n *\n * `WebsiteDesignTokens` — the complete design-token bundle attached to\n * `WebsiteRootConfig.designTokens`. Currently colors + radii only\n * (per plan Phase 1 scope: \"WebsiteColorTokensSchema + WebsiteRadiusTokensSchema (only)\").\n *\n * Future expansions (typography scale, motion tokens, shadow elevation)\n * will land as additional fields here without breaking the\n * `WebsiteRootConfig` shape.\n */\nconst _WebsiteDesignTokensSchema = z.object({\n colors: _WebsiteColorTokensSchema,\n radii: _WebsiteRadiusTokensSchema,\n});\n\nexport const WebsiteDesignTokensSchema: typeof _WebsiteDesignTokensSchema = _WebsiteDesignTokensSchema;\n\nexport type WebsiteDesignTokens = z.infer<typeof _WebsiteDesignTokensSchema>;\n/** @wildo_source:part:end saas.website.design-tokens.bundle */\n"]}
|
|
1
|
+
{"version":3,"file":"website-design-tokens.shared.schemas.js","sourceRoot":"","sources":["../../../../src/schemas/design-tokens/website-design-tokens.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,MAAM,+BAA+B,GAAG,uBAAuB,CAAC;AAChE,MAAM,YAAY,GAAG,CAAC,SAAiB,EAAe,EAAE,CACtD,CAAC;KACE,MAAM,EAAE;KACR,GAAG,CAAC,CAAC,EAAE,EAAE,KAAK,EAAE,GAAG,SAAS,oBAAoB,EAAE,CAAC;KACnD,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,+BAA+B,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;IAC/D,KAAK,EACH,GAAG,SAAS,oDAAoD;QAChE,8DAA8D;QAC9D,wEAAwE;CAC3E,CAA2B,CAAC;AAEjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,UAAU,EAAE,YAAY,CAAC,kBAAkB,CAAC;IAC5C,UAAU,EAAE,YAAY,CAAC,kBAAkB,CAAC;IAC5C,OAA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AE,CAAC;AACvC,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,wBAAwB,CACtC,KAAQ,EACR,KAA4C,EAC5C,QAAiB;IAEjB,MAAM,QAAQ,GAAG,6BAA6B,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IAC7D,OAAO,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,OAAO,QAAQ,GAAG,CAAC,CAAC,CAAC,OAAO,QAAQ,KAAK,QAAQ,GAAG,CAAC;AACvF,CAAC","sourcesContent":["import { z } from 'zod';\n\n/**\n * CSS-injection-safe value validator shared by every design-token field.\n *\n * **Threat model** — TWO escape surfaces, BOTH covered:\n *\n * 1. CSS *declaration* break-out (Phase 6 third audit fix H-α):\n * the renderer `renderWebsiteDesignTokensCss` interpolates token\n * values **raw** into a `:root { --website-<group>-<token>: <value>; }`\n * block. A value containing any of `;`, `}`, `{`, `/*`, `*\\/`, or a\n * newline can break out of the property declaration and inject\n * arbitrary CSS — at minimum a config typo silently corrupts the\n * page; at worst a malicious or untrusted config author injects a\n * `body { display: none; }` rule that blanks the entire site.\n *\n * 2. HTML *style-element* break-out (Phase 6 fourth audit fix H-Χ):\n * the rendered `:root { ... }` block is itself wrapped in an inline\n * `<style>…</style>` element by the head renderer. Per the HTML spec\n * the `<style>` element is a *raw-text* element — its only\n * terminator is the literal sequence `</style`. A token value\n * containing `<` (or, for symmetry, `>`) can therefore close the\n * `<style>` element early and follow up with `<svg onload=alert(1)>`\n * or any other HTML / JS payload, which the H-α deny-list (which\n * did NOT forbid `<` / `>`) failed to catch. CSS values legitimately\n * need NEITHER `<` NOR `>` (no CSS grammar uses them — no color,\n * length, variable reference, calc expression, or functional\n * notation does), so denying both is conservative and correct.\n *\n * **Why validate at the schema layer (not inside the renderer)**:\n * 1. Fail at config load (build-time / boot-time), not at every\n * `<head>` render — a malformed token surfaces in the schema-parse\n * error message instead of silently emitting broken CSS / HTML.\n * 2. Single source of truth — every field that flows into the\n * `<style>`-wrapped CSS block gets the same guard (impossible to\n * add a future token field that bypasses the renderer's escape\n * pass).\n * 3. The renderer stays a simple interpolator, which makes its own\n * audit surface trivially small.\n *\n * **Why a `.refine` over a strict color-string regex**: colors accept\n * `currentColor`, named colors, `var(--foo)` references, oklch\n * functional notation, etc. — a strict positive grammar is ~80 lines\n * and high-maintenance. A negative deny-list of the eight characters\n * that are LITERALLY the only ones that can break out of either the CSS\n * property declaration OR the wrapping `<style>` element is small,\n * complete, and obviously correct.\n */\nconst CSS_INJECTION_FORBIDDEN_PATTERN = /[;{}<>\\n\\r]|\\/\\*|\\*\\//;\nconst cssSafeValue = (fieldName: string): z.ZodString =>\n z\n .string()\n .min(1, { error: `${fieldName} must not be empty` })\n .refine((value) => !CSS_INJECTION_FORBIDDEN_PATTERN.test(value), {\n error:\n `${fieldName} must not contain CSS-injection or HTML break-out ` +\n `metacharacters (; { } < > /* */ newline) — token values are ` +\n `interpolated raw into <style>:root { --website-...: <value>; }</style>`,\n }) as unknown as z.ZodString;\n\n/**\n * @wildo_source:part:start saas.website.design-tokens.colors facet:layer:shared facet:family:website\n *\n * `WebsiteColorTokens` — minimal palette the marketing-site exposes as\n * CSS custom properties (`--website-colors-<token>`, the key verbatim, so\n * `surfaceForeground` → `--website-colors-surfaceForeground`) on `:root`.\n * Reference one from code through `websiteDesignTokenCssVar('colors', …)`\n * rather than spelling the name.\n *\n * **Why a dedicated marketing palette** (vs. reusing\n * `presets-components-models/design-tokens-config`):\n *\n * - The SaaS app's design tokens carry many semantic states (`muted`,\n * `destructive`, `ring`, `sidebar-*`, …) that have no marketing-site\n * analogue. Forcing the website to consume the full palette would\n * leak app-internal semantics into a public surface.\n * - Marketing pages need *display-grade* colors (heavily branded\n * accents, gradient stops, hero-overlay tints) that the SaaS app's\n * functional palette deliberately avoids.\n * - Designers overriding website tokens (Phase 6 dogfood proves this\n * path) should not be able to break the SaaS app by editing one\n * tailwind.config — the two surfaces stay decoupled.\n *\n * **Token format**: every value is a CSS color string. Shape validation\n * is intentionally permissive (accepts hex, rgb/rgba, hsl/hsla, oklch,\n * `currentColor`, named colors, CSS variable references) — a strict\n * color-string regex would reject legitimate values (oklch grammar\n * alone is ~80 lines) and a malformed-but-syntactically-valid color\n * fails loudly at render time.\n *\n * **What IS strictly enforced**: every value passes `cssSafeValue`,\n * which rejects the six characters that can break out of a CSS\n * property declaration (`;`, `{`, `}`, `/*`, `*\\/`, newline). See the\n * `cssSafeValue` JSDoc above for the full threat model.\n *\n * **Adding a token**: append the field here using `cssSafeValue(...)`,\n * document its semantic intent in the JSDoc. `renderWebsiteDesignTokensCss`\n * (from `@wildo-ai/saas-website/astro`) emits every key generically, so no\n * emitter needs editing.\n */\nconst _WebsiteColorTokensSchema = z.object({\n background: cssSafeValue('background color'),\n foreground: cssSafeValue('foreground color'),\n primary: cssSafeValue('primary color'),\n primaryForeground: cssSafeValue('primaryForeground color'),\n accent: cssSafeValue('accent color'),\n accentForeground: cssSafeValue('accentForeground color'),\n surface: cssSafeValue('surface color'),\n surfaceForeground: cssSafeValue('surfaceForeground color'),\n border: cssSafeValue('border color'),\n muted: cssSafeValue('muted color'),\n mutedForeground: cssSafeValue('mutedForeground color'),\n});\n\nexport const WebsiteColorTokensSchema: typeof _WebsiteColorTokensSchema = _WebsiteColorTokensSchema;\n\nexport type WebsiteColorTokens = z.infer<typeof _WebsiteColorTokensSchema>;\n/** @wildo_source:part:end saas.website.design-tokens.colors */\n\n/**\n * @wildo_source:part:start saas.website.design-tokens.radius facet:layer:shared facet:family:website\n *\n * `WebsiteRadiusTokens` — border-radius scale exposed as\n * `--website-radii-<token>` CSS variables.\n *\n * Marketing radii are intentionally a separate token set from the\n * SaaS app's radii: the website typically wants larger pill / hero\n * radii than the app's compact-UI radii. Keeping them separate lets\n * either surface evolve without coupling.\n *\n * Values are CSS length strings (`'0.25rem'`, `'12px'`,\n * `'9999px'`). Same permissive-shape + strict-CSS-injection\n * rationale as `WebsiteColorTokens` (every value runs through\n * `cssSafeValue`).\n */\nconst _WebsiteRadiusTokensSchema = z.object({\n none: cssSafeValue('none radius'),\n sm: cssSafeValue('sm radius'),\n md: cssSafeValue('md radius'),\n lg: cssSafeValue('lg radius'),\n xl: cssSafeValue('xl radius'),\n full: cssSafeValue('full radius'),\n});\n\nexport const WebsiteRadiusTokensSchema: typeof _WebsiteRadiusTokensSchema = _WebsiteRadiusTokensSchema;\n\nexport type WebsiteRadiusTokens = z.infer<typeof _WebsiteRadiusTokensSchema>;\n/** @wildo_source:part:end saas.website.design-tokens.radius */\n\n/**\n * @wildo_source:part:start saas.website.design-tokens.bundle facet:layer:shared facet:family:website\n *\n * `WebsiteDesignTokens` — the complete design-token bundle attached to\n * `WebsiteRootConfig.designTokens`. Currently colors + radii only\n * (per plan Phase 1 scope: \"WebsiteColorTokensSchema + WebsiteRadiusTokensSchema (only)\").\n *\n * Future expansions (typography scale, motion tokens, shadow elevation)\n * will land as additional fields here without breaking the\n * `WebsiteRootConfig` shape.\n */\nconst _WebsiteDesignTokensSchema = z.object({\n colors: _WebsiteColorTokensSchema,\n radii: _WebsiteRadiusTokensSchema,\n});\n\nexport const WebsiteDesignTokensSchema: typeof _WebsiteDesignTokensSchema = _WebsiteDesignTokensSchema;\n\nexport type WebsiteDesignTokens = z.infer<typeof _WebsiteDesignTokensSchema>;\n/** @wildo_source:part:end saas.website.design-tokens.bundle */\n\n/**\n * The CSS custom-property NAME one design token is emitted under —\n * `--website-<group>-<token>`, with the token key verbatim (no case\n * conversion), so `('colors', 'surfaceForeground')` is\n * `--website-colors-surfaceForeground`.\n *\n * This is the one place the naming rule lives. `renderWebsiteDesignTokensCss`\n * emits through it, and every engine component that reads a token reads\n * through `websiteDesignTokenCssVar`. It exists because the rule used to be\n * spelled by hand at each reader, and one reader spelled it\n * `surface-foreground`: the consent banner's text colour silently fell back to\n * `#000` on every site, whatever palette the application authored.\n */\nexport function websiteDesignTokenCssProperty(group: string, token: string): string {\n return `--website-${group}-${token}`;\n}\n\n/**\n * A `var(...)` reference to one design token, typed against the token bundle\n * so a misspelt group or key does not compile.\n *\n * @example\n * ```ts\n * import { websiteDesignTokenCssVar } from '@wildo-ai/saas-website';\n * const style = { color: websiteDesignTokenCssVar('colors', 'surfaceForeground', '#000') };\n * // → 'var(--website-colors-surfaceForeground, #000)'\n * ```\n */\nexport function websiteDesignTokenCssVar<G extends keyof WebsiteDesignTokens>(\n group: G,\n token: keyof WebsiteDesignTokens[G] & string,\n fallback?: string,\n): string {\n const property = websiteDesignTokenCssProperty(group, token);\n return fallback === undefined ? `var(${property})` : `var(${property}, ${fallback})`;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"website-consent-label-keys.schemas.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"website-consent-label-keys.schemas.d.ts","sourceRoot":"","sources":["../../../../src/schemas/label-keys/website-consent-label-keys.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAoB,MAAM,sCAAsC,CAAC;AAExF,OAAO,EAAyB,KAAK,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE1F;;;;;;;;;;;;;;GAcG;AACH,oBAAY,uBAAuB;IACjC,oCAAoC;IACpC,KAAK,UAAU;IACf,+GAA+G;IAC/G,WAAW,gBAAgB;IAC3B,qCAAqC;IACrC,UAAU,eAAe;IACzB,kFAAkF;IAClF,WAAW,gBAAgB;IAC3B,wCAAwC;IACxC,IAAI,SAAS;IACb,yDAAyD;IACzD,MAAM,WAAW;IACjB;;;;;;;OAOG;IACH,eAAe,oBAAoB;IACnC,+FAA+F;IAC/F,qBAAqB,0BAA0B;CAChD;AAID,iDAAiD;AACjD,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,uBAAuB,GAAG,eAAe,CAErF;AAED,yDAAyD;AACzD,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,cAAc,GAAG,eAAe,CAEtF;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,wCAAwC,CAAC,OAAO,EAAE,cAAc,GAAG,eAAe,CAEjG;AAED,uGAAuG;AACvG,eAAO,MAAM,0BAA0B,EAAE,SAAS,eAAe,EAI/D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"website-label-key.schemas.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"website-label-key.schemas.d.ts","sourceRoot":"","sources":["../../../../src/schemas/label-keys/website-label-key.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,QAAA,MAAM,sBAAsB,2DAWC,CAAC;AAE9B,eAAO,MAAM,qBAAqB,EAAE,OAAO,sBAA+C,CAAC;AAE3F,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACrE,4DAA4D;AAE5D;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE;IAC5C,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CAClB,GAAG,eAAe,CAElB;;AACD,oEAAoE"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type WebsiteLabelKey } from './website-label-key.schemas';
|
|
2
|
+
/**
|
|
3
|
+
* The label keys the framework's provider-component slot reads (#1703).
|
|
4
|
+
*
|
|
5
|
+
* FRAMEWORK-OWNED, like the consent panel's keys: `WebsiteProviderComponent` renders these states,
|
|
6
|
+
* not the site's chrome, so the site does not list them in `chromeLabelKeys`.
|
|
7
|
+
* `composeEffectiveChromeLabelKeys` unions them into the label-pack validator's expected set, so a
|
|
8
|
+
* locale pack missing one fails the build rather than showing a visitor a raw key.
|
|
9
|
+
*
|
|
10
|
+
* Required of every site, including one that places no provider component today, for the reason the
|
|
11
|
+
* consent keys are: the words are cheap, and a site that adds an address lookup tomorrow must not
|
|
12
|
+
* ship it with an unlabelled refusal. The consent-required state also names each missing purpose and
|
|
13
|
+
* offers the panel, and it reuses the consent keys for both (`purpose-<purpose>`, `manage`) rather
|
|
14
|
+
* than a second wording of the same thing.
|
|
15
|
+
*/
|
|
16
|
+
export declare enum WebsiteProviderComponentLabelSlot {
|
|
17
|
+
/**
|
|
18
|
+
* Shown where a provider component would be when the visitor has not agreed to a purpose it rests
|
|
19
|
+
* on. Says the feature is off until they agree; the purposes and the way to agree follow it.
|
|
20
|
+
*/
|
|
21
|
+
CONSENT_REQUIRED = "consent-required",
|
|
22
|
+
/**
|
|
23
|
+
* Shown when the component could not be loaded (a network failure, a blocked script). Says the
|
|
24
|
+
* feature is unavailable right now, without blaming the visitor.
|
|
25
|
+
*/
|
|
26
|
+
UNAVAILABLE = "unavailable"
|
|
27
|
+
}
|
|
28
|
+
/** The fully-composed key for one slot state. */
|
|
29
|
+
export declare function websiteProviderComponentLabelKey(slot: WebsiteProviderComponentLabelSlot): WebsiteLabelKey;
|
|
30
|
+
/** Every framework-owned provider-component key — what a locale pack must carry. Total over the vocabulary. */
|
|
31
|
+
export declare const WEBSITE_PROVIDER_COMPONENT_LABEL_KEYS: readonly WebsiteLabelKey[];
|
|
32
|
+
//# sourceMappingURL=website-provider-component-label-keys.schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"website-provider-component-label-keys.schemas.d.ts","sourceRoot":"","sources":["../../../../src/schemas/label-keys/website-provider-component-label-keys.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,KAAK,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE1F;;;;;;;;;;;;;GAaG;AACH,oBAAY,iCAAiC;IAC3C;;;OAGG;IACH,gBAAgB,qBAAqB;IACrC;;;OAGG;IACH,WAAW,gBAAgB;CAC5B;AAID,iDAAiD;AACjD,wBAAgB,gCAAgC,CAAC,IAAI,EAAE,iCAAiC,GAAG,eAAe,CAEzG;AAED,+GAA+G;AAC/G,eAAO,MAAM,qCAAqC,EAAE,SAAS,eAAe,EAE3E,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { WebsiteLabelKeySchema } from './website-label-key.schemas.js';
|
|
2
|
+
/**
|
|
3
|
+
* The label keys the framework's provider-component slot reads (#1703).
|
|
4
|
+
*
|
|
5
|
+
* FRAMEWORK-OWNED, like the consent panel's keys: `WebsiteProviderComponent` renders these states,
|
|
6
|
+
* not the site's chrome, so the site does not list them in `chromeLabelKeys`.
|
|
7
|
+
* `composeEffectiveChromeLabelKeys` unions them into the label-pack validator's expected set, so a
|
|
8
|
+
* locale pack missing one fails the build rather than showing a visitor a raw key.
|
|
9
|
+
*
|
|
10
|
+
* Required of every site, including one that places no provider component today, for the reason the
|
|
11
|
+
* consent keys are: the words are cheap, and a site that adds an address lookup tomorrow must not
|
|
12
|
+
* ship it with an unlabelled refusal. The consent-required state also names each missing purpose and
|
|
13
|
+
* offers the panel, and it reuses the consent keys for both (`purpose-<purpose>`, `manage`) rather
|
|
14
|
+
* than a second wording of the same thing.
|
|
15
|
+
*/
|
|
16
|
+
export var WebsiteProviderComponentLabelSlot;
|
|
17
|
+
(function (WebsiteProviderComponentLabelSlot) {
|
|
18
|
+
/**
|
|
19
|
+
* Shown where a provider component would be when the visitor has not agreed to a purpose it rests
|
|
20
|
+
* on. Says the feature is off until they agree; the purposes and the way to agree follow it.
|
|
21
|
+
*/
|
|
22
|
+
WebsiteProviderComponentLabelSlot["CONSENT_REQUIRED"] = "consent-required";
|
|
23
|
+
/**
|
|
24
|
+
* Shown when the component could not be loaded (a network failure, a blocked script). Says the
|
|
25
|
+
* feature is unavailable right now, without blaming the visitor.
|
|
26
|
+
*/
|
|
27
|
+
WebsiteProviderComponentLabelSlot["UNAVAILABLE"] = "unavailable";
|
|
28
|
+
})(WebsiteProviderComponentLabelSlot || (WebsiteProviderComponentLabelSlot = {}));
|
|
29
|
+
const PROVIDER_COMPONENT_LABEL_KEY_PREFIX = 'website.chrome.provider-component';
|
|
30
|
+
/** The fully-composed key for one slot state. */
|
|
31
|
+
export function websiteProviderComponentLabelKey(slot) {
|
|
32
|
+
return WebsiteLabelKeySchema.parse(`${PROVIDER_COMPONENT_LABEL_KEY_PREFIX}.${slot}`);
|
|
33
|
+
}
|
|
34
|
+
/** Every framework-owned provider-component key — what a locale pack must carry. Total over the vocabulary. */
|
|
35
|
+
export const WEBSITE_PROVIDER_COMPONENT_LABEL_KEYS = Object.freeze(Object.values(WebsiteProviderComponentLabelSlot).map(websiteProviderComponentLabelKey));
|
|
36
|
+
//# sourceMappingURL=website-provider-component-label-keys.schemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"website-provider-component-label-keys.schemas.js","sourceRoot":"","sources":["../../../../src/schemas/label-keys/website-provider-component-label-keys.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAwB,MAAM,6BAA6B,CAAC;AAE1F;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAN,IAAY,iCAWX;AAXD,WAAY,iCAAiC;IAC3C;;;OAGG;IACH,0EAAqC,CAAA;IACrC;;;OAGG;IACH,gEAA2B,CAAA;AAC7B,CAAC,EAXW,iCAAiC,KAAjC,iCAAiC,QAW5C;AAED,MAAM,mCAAmC,GAAG,mCAAmC,CAAC;AAEhF,iDAAiD;AACjD,MAAM,UAAU,gCAAgC,CAAC,IAAuC;IACtF,OAAO,qBAAqB,CAAC,KAAK,CAAC,GAAG,mCAAmC,IAAI,IAAI,EAAE,CAAC,CAAC;AACvF,CAAC;AAED,+GAA+G;AAC/G,MAAM,CAAC,MAAM,qCAAqC,GAA+B,MAAM,CAAC,MAAM,CAC5F,MAAM,CAAC,MAAM,CAAC,iCAAiC,CAAC,CAAC,GAAG,CAAC,gCAAgC,CAAC,CACvF,CAAC","sourcesContent":["import { WebsiteLabelKeySchema, type WebsiteLabelKey } from './website-label-key.schemas';\n\n/**\n * The label keys the framework's provider-component slot reads (#1703).\n *\n * FRAMEWORK-OWNED, like the consent panel's keys: `WebsiteProviderComponent` renders these states,\n * not the site's chrome, so the site does not list them in `chromeLabelKeys`.\n * `composeEffectiveChromeLabelKeys` unions them into the label-pack validator's expected set, so a\n * locale pack missing one fails the build rather than showing a visitor a raw key.\n *\n * Required of every site, including one that places no provider component today, for the reason the\n * consent keys are: the words are cheap, and a site that adds an address lookup tomorrow must not\n * ship it with an unlabelled refusal. The consent-required state also names each missing purpose and\n * offers the panel, and it reuses the consent keys for both (`purpose-<purpose>`, `manage`) rather\n * than a second wording of the same thing.\n */\nexport enum WebsiteProviderComponentLabelSlot {\n /**\n * Shown where a provider component would be when the visitor has not agreed to a purpose it rests\n * on. Says the feature is off until they agree; the purposes and the way to agree follow it.\n */\n CONSENT_REQUIRED = 'consent-required',\n /**\n * Shown when the component could not be loaded (a network failure, a blocked script). Says the\n * feature is unavailable right now, without blaming the visitor.\n */\n UNAVAILABLE = 'unavailable',\n}\n\nconst PROVIDER_COMPONENT_LABEL_KEY_PREFIX = 'website.chrome.provider-component';\n\n/** The fully-composed key for one slot state. */\nexport function websiteProviderComponentLabelKey(slot: WebsiteProviderComponentLabelSlot): WebsiteLabelKey {\n return WebsiteLabelKeySchema.parse(`${PROVIDER_COMPONENT_LABEL_KEY_PREFIX}.${slot}`);\n}\n\n/** Every framework-owned provider-component key — what a locale pack must carry. Total over the vocabulary. */\nexport const WEBSITE_PROVIDER_COMPONENT_LABEL_KEYS: readonly WebsiteLabelKey[] = Object.freeze(\n Object.values(WebsiteProviderComponentLabelSlot).map(websiteProviderComponentLabelKey),\n);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"website-page-manifest.shared.schemas.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"website-page-manifest.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../src/schemas/manifests/website-page-manifest.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE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AC,KAAK,CAAC,OAAO,0BAA0B,CAAC;IACrF,aAAa,EAAE,aAAa,CAAC,GAAG,CAAC,CAAC;CACnC;;AACD,+DAA+D"}
|
|
@@ -51,13 +51,13 @@ import { type WebsitePageManifest } from './website-page-manifest.shared.schemas
|
|
|
51
51
|
declare const _WebsiteSitemapConfigSchema: z.ZodObject<{
|
|
52
52
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
53
53
|
changefreq: z.ZodOptional<z.ZodEnum<{
|
|
54
|
-
never: "never";
|
|
55
54
|
always: "always";
|
|
56
55
|
hourly: "hourly";
|
|
57
56
|
daily: "daily";
|
|
58
57
|
weekly: "weekly";
|
|
59
58
|
monthly: "monthly";
|
|
60
59
|
yearly: "yearly";
|
|
60
|
+
never: "never";
|
|
61
61
|
}>>;
|
|
62
62
|
priority: z.ZodOptional<z.ZodNumber>;
|
|
63
63
|
}, z.core.$strip>;
|
|
@@ -85,9 +85,10 @@ export type WebsiteSitemapConfig = z.infer<typeof _WebsiteSitemapConfigSchema>;
|
|
|
85
85
|
* `'noindex'` is the deliberate exception (staging environments,
|
|
86
86
|
* beta surfaces, sites still under construction). The opt-OUT
|
|
87
87
|
* shape mirrors `WebsiteSitemapConfig.enabled` for consistency.
|
|
88
|
-
* - `'noindex'`
|
|
89
|
-
*
|
|
90
|
-
*
|
|
88
|
+
* - `'noindex'` is expressed by a `<meta name="robots" content="noindex">`
|
|
89
|
+
* on every page, NOT by `Disallow: /` in `robots.txt` (#494): a crawler
|
|
90
|
+
* barred from fetching a page never reads its noindex, so the URL can
|
|
91
|
+
* still be indexed bare. `robots.txt` stays allow-everything for it.
|
|
91
92
|
*
|
|
92
93
|
* **Why `disallow[]` is a path-prefix list (not a regex)**:
|
|
93
94
|
* - The `robots.txt` spec only supports literal path prefixes
|
|
@@ -216,13 +217,13 @@ declare const _WebsiteSeoConfigSchema: z.ZodObject<{
|
|
|
216
217
|
sitemap: z.ZodOptional<z.ZodObject<{
|
|
217
218
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
218
219
|
changefreq: z.ZodOptional<z.ZodEnum<{
|
|
219
|
-
never: "never";
|
|
220
220
|
always: "always";
|
|
221
221
|
hourly: "hourly";
|
|
222
222
|
daily: "daily";
|
|
223
223
|
weekly: "weekly";
|
|
224
224
|
monthly: "monthly";
|
|
225
225
|
yearly: "yearly";
|
|
226
|
+
never: "never";
|
|
226
227
|
}>>;
|
|
227
228
|
priority: z.ZodOptional<z.ZodNumber>;
|
|
228
229
|
}, z.core.$strip>>;
|
|
@@ -377,13 +378,13 @@ declare const _WebsiteRootConfigSchema: z.ZodObject<{
|
|
|
377
378
|
sitemap: z.ZodOptional<z.ZodObject<{
|
|
378
379
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
379
380
|
changefreq: z.ZodOptional<z.ZodEnum<{
|
|
380
|
-
never: "never";
|
|
381
381
|
always: "always";
|
|
382
382
|
hourly: "hourly";
|
|
383
383
|
daily: "daily";
|
|
384
384
|
weekly: "weekly";
|
|
385
385
|
monthly: "monthly";
|
|
386
386
|
yearly: "yearly";
|
|
387
|
+
never: "never";
|
|
387
388
|
}>>;
|
|
388
389
|
priority: z.ZodOptional<z.ZodNumber>;
|
|
389
390
|
}, z.core.$strip>>;
|
|
@@ -412,8 +413,8 @@ export declare const WebsiteRootConfigSchema: typeof _WebsiteRootConfigSchema;
|
|
|
412
413
|
* and `navigation.footerComponent` as `unknown` (their schema field
|
|
413
414
|
* type), losing the `ComponentType<unknown>` narrowing carried by the
|
|
414
415
|
* hand-written `WebsitePageManifest` and `WebsiteNavigationConfig`
|
|
415
|
-
* interfaces.
|
|
416
|
-
*
|
|
416
|
+
* interfaces. The layout primitives and the Astro helpers consume
|
|
417
|
+
* `WebsiteRootConfig` and must see those
|
|
417
418
|
* fields pre-narrowed; otherwise every consumer would need a local
|
|
418
419
|
* `as ComponentType` cast at the JSX call site, defeating the type-safe
|
|
419
420
|
* component contract.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"website-root-config.shared.schemas.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"website-root-config.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../src/schemas/manifests/website-root-config.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,wCAAwC,CAAC;AAEhD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,QAAA,MAAM,2BAA2B;;;;;;;;;;;;iBAU/B,CAAC;AAEH,eAAO,MAAM,0BAA0B,EAAE,OAAO,2BACnB,CAAC;AAE9B,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAC/E,6DAA6D;AAE7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH,QAAA,MAAM,0BAA0B;;;;;;;;iBAsC5B,CAAC;AAEL,eAAO,MAAM,yBAAyB,EAAE,OAAO,0BACnB,CAAC;AAE7B,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAC7E,4DAA4D;AAE5D;;;;;;;;;;;;;;;;;;GAkBG;AACH,QAAA,MAAM,2BAA2B;;iBAE/B,CAAC;AAEH,eAAO,MAAM,0BAA0B,EAAE,OAAO,2BACnB,CAAC;AAE9B,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAC/E,8DAA8D;AAE9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AACH,QAAA,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA0BzB,CAAC;AAEL,eAAO,MAAM,sBAAsB,EAAE,OAAO,uBAAiD,CAAC;AAE9F,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACvE,0DAA0D;AAE1D;;;;;;;;;;;;;GAaG;AACH,QAAA,MAAM,8BAA8B;;;iBAGlC,CAAC;AAEH,eAAO,MAAM,6BAA6B,EAAE,OAAO,8BACnB,CAAC;AAEjC,MAAM,WAAW,uBACf,SAAQ,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC;IACtD,eAAe,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IACxC,eAAe,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;CACzC;AACD,iEAAiE;AAEjE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AACH,QAAA,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA2F1B,CAAC;AAEL,eAAO,MAAM,uBAAuB,EAAE,OAAO,wBAAmD,CAAC;AAEjG;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAClC,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,EACxC,eAAe,GAAG,YAAY,CAC/B,GAAG;IACF,aAAa,EAAE,mBAAmB,EAAE,CAAC;IACrC,UAAU,EAAE,uBAAuB,CAAC;CACrC,CAAC;;AACF,6DAA6D"}
|
|
@@ -83,9 +83,10 @@ export const WebsiteSitemapConfigSchema = _WebsiteSitemapConfigSchema;
|
|
|
83
83
|
* `'noindex'` is the deliberate exception (staging environments,
|
|
84
84
|
* beta surfaces, sites still under construction). The opt-OUT
|
|
85
85
|
* shape mirrors `WebsiteSitemapConfig.enabled` for consistency.
|
|
86
|
-
* - `'noindex'`
|
|
87
|
-
*
|
|
88
|
-
*
|
|
86
|
+
* - `'noindex'` is expressed by a `<meta name="robots" content="noindex">`
|
|
87
|
+
* on every page, NOT by `Disallow: /` in `robots.txt` (#494): a crawler
|
|
88
|
+
* barred from fetching a page never reads its noindex, so the URL can
|
|
89
|
+
* still be indexed bare. `robots.txt` stays allow-everything for it.
|
|
89
90
|
*
|
|
90
91
|
* **Why `disallow[]` is a path-prefix list (not a regex)**:
|
|
91
92
|
* - The `robots.txt` spec only supports literal path prefixes
|
|
@@ -383,10 +384,10 @@ const _WebsiteRootConfigSchema = z
|
|
|
383
384
|
* the chrome) or above it (creating a structural surface
|
|
384
385
|
* the framework needs anyway).
|
|
385
386
|
*
|
|
386
|
-
*
|
|
387
|
-
* label-pack
|
|
388
|
-
*
|
|
389
|
-
*
|
|
387
|
+
* It is validated as a chrome key without being listed in
|
|
388
|
+
* `chromeLabelKeys`: the label-pack loader adds it to the effective
|
|
389
|
+
* chrome key set (`composeEffectiveChromeLabelKeys` in
|
|
390
|
+
* `astro/label-pack-loader.ts`), so consumers cannot forget it.
|
|
390
391
|
*/
|
|
391
392
|
skipToMainContentLabelKey: WebsiteLabelKeySchema,
|
|
392
393
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"website-root-config.shared.schemas.js","sourceRoot":"","sources":["../../../../../src/schemas/manifests/website-root-config.shared.schemas.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,yBAAyB,EAAE,MAAM,uDAAuD,CAAC;AAClG,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,EACL,yBAAyB,GAE1B,MAAM,wCAAwC,CAAC;AAEhD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,MAAM,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,OAAO,EAAE,CAAC,CAAC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BACd,IAAI,EAAE,CAAC,eAAe,EAAE,KAAK,EAAE,KAAK,CAAC;gBACrC,OAAO,EAAE,uBAAuB,MAAM,sCAAsC;aAC7E,CAAC,CAAC;QACL,CAAC;QACD,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QAErB,MAAM,QAAQ,GAAG,QAAQ,CAAC,SAA8B,CAAC;QACzD,IAAI,cAAc,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC;YACjC,GAAG,CAAC,QAAQ,CAAC;gBACX,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,eAAe,EAAE,KAAK,EAAE,WAAW,CAAC;gBAC3C,OAAO,EAAE,wBAAwB,QAAQ,sCAAsC;aAChF,CAAC,CAAC;QACL,CAAC;QACD,cAAc,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAC/B,CAAC;IAED;;;;;;OAMG;IACH,MAAM,cAAc,GAAG,IAAI,GAAG,EAAU,CAAC;IACzC,KAAK,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,IAAI,MAAM,CAAC,eAAe,CAAC,OAAO,EAAE,EAAE,CAAC;QAC5D,MAAM,MAAM,GAAG,GAAwB,CAAC;QACxC,IAAI,cAAc,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC;YAC/B,GAAG,CAAC,QAAQ,CAAC;gBACX,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,iBAAiB,EAAE,KAAK,CAAC;gBAChC,OAAO,EAAE,+BAA+B,MAAM,wCAAwC;aACvF,CAAC,CAAC;QACL,CAAC;QACD,cAAc,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAC7B,CAAC;AACH,CAAC,CAAC,CAAC;AAEL,MAAM,CAAC,MAAM,uBAAuB,GAAoC,wBAAwB,CAAC;AA4BjG,6DAA6D","sourcesContent":["import type { ComponentType } from 'react';\nimport { z } from 'zod';\n\nimport { WebsiteDesignTokensSchema } from '../design-tokens/website-design-tokens.shared.schemas';\nimport { WebsiteLabelKeySchema } from '../label-keys/website-label-key.schemas';\nimport {\n WebsitePageManifestSchema,\n type WebsitePageManifest,\n} from './website-page-manifest.shared.schemas';\n\n/**\n * @wildo_source:part:start saas.website.seo.sitemap-config facet:layer:shared facet:family:website\n *\n * `WebsiteSitemapConfig` — site-wide sitemap policy block.\n *\n * Materialized at build time by `@astrojs/sitemap` (the official\n * Astro plugin) when the consumer wires it into `astro.config.ts`\n * (see `website-seo-aeo-geo` SKILL). The framework owns the\n * **schema** (so config + enforcement live in lock-step with the\n * page registry) but the framework does NOT own the runtime\n * generator — `@astrojs/sitemap` already covers per-page\n * `lastmod` / `changefreq` / `priority` + i18n `xhtml:link\n * hreflang` annotations natively, and re-implementing that surface\n * inside the engine would duplicate well-trodden Astro tooling for\n * zero added value.\n *\n * # Field rationale\n *\n * **Why `enabled` defaults to `true`**:\n * - Marketing sites that want to ship public pages overwhelmingly\n * also want them in `sitemap.xml` (search engines treat its\n * absence as a discoverability signal). The opt-OUT shape avoids\n * a silent regression where a consumer ships pages that crawlers\n * never index because they forgot to flip a flag.\n * - The escape hatch (`enabled: false`) covers staging deployments\n * and the rare per-app decision to suppress sitemap emission\n * entirely (e.g. a private beta surface routed under a\n * `noindex` policy).\n *\n * **Why `changefreq` / `priority` are OPTIONAL** (no defaults):\n * - Both fields are non-binding hints — Google explicitly\n * ignores `priority` and treats `changefreq` as a soft signal.\n * Forcing the consumer to pick a value would either invite\n * superstitious authoring (`priority: 1.0` on every page) or\n * bury the field's actual ergonomic shape (per-page overrides\n * via `WebsitePageManifest.seo` — deferred until a real\n * consumer requests it).\n * - Unset values are simply omitted from the emitted `<url>`\n * entries; `@astrojs/sitemap` handles that automatically.\n *\n * **Validation**:\n * - `priority` is `z.number().min(0).max(1)` — outside the spec\n * range would silently break crawler ingestion.\n * - `changefreq` is the union of the seven values the sitemap\n * spec defines; arbitrary strings would be silently dropped by\n * compliant crawlers.\n */\nconst _WebsiteSitemapConfigSchema = z.object({\n enabled: z.boolean().default(true),\n changefreq: z\n .enum(['always', 'hourly', 'daily', 'weekly', 'monthly', 'yearly', 'never'])\n .optional(),\n priority: z\n .number()\n .min(0, { error: 'WebsiteSitemapConfig.priority must be between 0 and 1' })\n .max(1, { error: 'WebsiteSitemapConfig.priority must be between 0 and 1' })\n .optional(),\n});\n\nexport const WebsiteSitemapConfigSchema: typeof _WebsiteSitemapConfigSchema =\n _WebsiteSitemapConfigSchema;\n\nexport type WebsiteSitemapConfig = z.infer<typeof _WebsiteSitemapConfigSchema>;\n/** @wildo_source:part:end saas.website.seo.sitemap-config */\n\n/**\n * @wildo_source:part:start saas.website.seo.robots-config facet:layer:shared facet:family:website\n *\n * `WebsiteRobotsConfig` — site-wide `robots.txt` policy block.\n *\n * Materialized at request time by `renderRobotsTxt(siteContext)`\n * from `@wildo-ai/saas-website/astro` (consumer wires a thin\n * `src/pages/robots.txt.ts` Astro endpoint that returns the helper's\n * output). Scoped to the SITE-WIDE policy surface — per-page\n * `noindex` is a separate concern that lands on\n * `WebsitePageManifest.seo` once a real consumer requests it (today\n * the site-wide `disallow[]` covers staging-environment exclusion of\n * specific path prefixes, the dominant real-world use case).\n *\n * # Field rationale\n *\n * **Why `policy` defaults to `'index'`**:\n * - The default for a public marketing site is \"let crawlers in\";\n * `'noindex'` is the deliberate exception (staging environments,\n * beta surfaces, sites still under construction). The opt-OUT\n * shape mirrors `WebsiteSitemapConfig.enabled` for consistency.\n * - `'noindex'` emits a `User-agent: *\\nDisallow: /` block — the\n * standard \"tell every well-behaved crawler to stay away\"\n * primitive.\n *\n * **Why `disallow[]` is a path-prefix list (not a regex)**:\n * - The `robots.txt` spec only supports literal path prefixes\n * with `*` / `$` wildcards; Disallow is NOT a regex surface.\n * Typing it as `string[]` (validated to start with `/`) keeps\n * the contract honest and lets consumers paste from their CDN\n * allowlists without translation.\n *\n * **Why `allowedCrawlers` and `disallowedCrawlers` are mutually\n * exclusive**:\n * - The two fields are two halves of the SAME AI-crawler policy\n * decision. `allowedCrawlers` is the deny-by-default shape\n * (only the named bots may crawl); `disallowedCrawlers` is the\n * allow-by-default shape (every bot except the named ones may\n * crawl). Mixing both would emit a contradictory `robots.txt`\n * (a bot in both lists would receive conflicting directives).\n * A `superRefine` enforces the mutual-exclusion invariant at\n * parse time so the build fails fast.\n *\n * **Validation**:\n * - `disallow[]` entries must start with `/` (sitemap path-prefix\n * spec) — anything else would silently match nothing.\n * - `allowedCrawlers` / `disallowedCrawlers` entries must be\n * non-empty strings (a blank User-agent token would emit\n * `User-agent: ` which compliant crawlers ignore — silent\n * misconfig).\n * - `superRefine` rejects the combined-list anti-pattern.\n */\nconst _WebsiteRobotsConfigSchema = z\n .object({\n policy: z.enum(['index', 'noindex']).default('index'),\n disallow: z\n .array(\n z\n .string()\n .min(1)\n .refine((path) => path.startsWith('/'), {\n error: 'WebsiteRobotsConfig.disallow[] entries must start with \"/\"',\n }),\n )\n .optional(),\n /**\n * Deny-by-default AI-crawler allowlist. When set, the emitted\n * `robots.txt` lists each named bot under its own\n * `User-agent: <bot>\\nAllow: /` block, then closes with a\n * catch-all `User-agent: *\\nDisallow: /`. Mutually exclusive\n * with `disallowedCrawlers` (see `superRefine` below).\n */\n allowedCrawlers: z.array(z.string().min(1)).optional(),\n /**\n * Allow-by-default AI-crawler denylist. When set, the emitted\n * `robots.txt` lists each named bot under its own\n * `User-agent: <bot>\\nDisallow: /` block. Mutually exclusive\n * with `allowedCrawlers` (see `superRefine` below).\n */\n disallowedCrawlers: z.array(z.string().min(1)).optional(),\n })\n .superRefine((value, ctx) => {\n if (value.allowedCrawlers !== undefined && value.disallowedCrawlers !== undefined) {\n ctx.addIssue({\n code: 'custom',\n path: ['allowedCrawlers'],\n message:\n 'WebsiteRobotsConfig.allowedCrawlers and disallowedCrawlers are mutually exclusive — pick one policy direction (deny-by-default vs allow-by-default).',\n });\n }\n });\n\nexport const WebsiteRobotsConfigSchema: typeof _WebsiteRobotsConfigSchema =\n _WebsiteRobotsConfigSchema;\n\nexport type WebsiteRobotsConfig = z.infer<typeof _WebsiteRobotsConfigSchema>;\n/** @wildo_source:part:end saas.website.seo.robots-config */\n\n/**\n * @wildo_source:part:start saas.website.seo.llms-txt-config facet:layer:shared facet:family:website\n *\n * `WebsiteLlmsTxtConfig` — site-wide `llms.txt` publication policy.\n *\n * The framework owns only the SERVING surface; the CONTENT remains\n * hand-authored in `src/content/llms.txt`. This block therefore needs\n * exactly one knob:\n *\n * - `enabled?: boolean`\n * - `true` → publish when the file exists\n * - `false` → suppress publication even if the file exists\n * - `undefined` → auto-detect (`readLlmsTxtBody` publishes when the\n * file exists, returns `null` when absent)\n *\n * Keeping the \"auto-detect when undefined\" convention in the HELPER\n * (not as a schema default) is deliberate: schema defaults are static,\n * while file presence is runtime/build-time state.\n */\nconst _WebsiteLlmsTxtConfigSchema = z.object({\n enabled: z.boolean().optional(),\n});\n\nexport const WebsiteLlmsTxtConfigSchema: typeof _WebsiteLlmsTxtConfigSchema =\n _WebsiteLlmsTxtConfigSchema;\n\nexport type WebsiteLlmsTxtConfig = z.infer<typeof _WebsiteLlmsTxtConfigSchema>;\n/** @wildo_source:part:end saas.website.seo.llms-txt-config */\n\n/**\n * @wildo_source:part:start saas.website.root-config.seo facet:layer:shared facet:family:website\n *\n * `WebsiteSeoConfig` — site-wide SEO/social-graph configuration\n * AUTHORED ON THE ROOT CONFIG.\n *\n * # Scope\n *\n * The public marketing-site origin belongs only in the per-service\n * `wildo.website.config.ts` declaration. Keep it out of this site-level SEO\n * block so the origin and localized routing have one source of truth.\n *\n * What stays on this block: site-level branding + hero-image\n * fallbacks that are co-authored with chrome labels and page\n * manifests respectively, NOT with the URL/i18n routing surface.\n *\n * # Field rationale\n *\n * **Why `siteName` is REQUIRED**:\n * - `og:site_name` is the brand label social platforms render\n * above the page title in shared previews. Without it, every\n * LinkedIn / Facebook / Slack preview shows the bare title with\n * no brand context.\n * - It is also the recommended `application-name` meta tag value\n * and a useful default for JSON-LD `Organization.name` schema\n * when the application ships structured data.\n *\n * **Why `defaultOgImageUrl` is OPTIONAL**:\n * - Each page's `WebsitePageManifest.metaLabelKeys.ogImageUrl`\n * takes precedence; the site-level default is a fallback for\n * pages that did not commit to a hero image.\n * - Marketing surfaces shipping no OG images at all (acceptable\n * for a placeholder build) should not be forced to author one.\n *\n * **Why `sitemap?` and `robots?` are OPTIONAL** (with sensible\n * defaults inside each sub-schema):\n * - The marketing-site default ships a public surface — every\n * page indexable, no AI-crawler restrictions, no per-path\n * disallow. Forcing every consumer to author both blocks just\n * to land in that default state would pollute the call site.\n * - Omitting either block at the call site is equivalent to\n * authoring `{}` — `WebsiteSitemapConfig.enabled` defaults to\n * `true`, `WebsiteRobotsConfig.policy` defaults to `'index'`.\n * The per-block field rationale lives on each sub-schema.\n * - `llmsTxt?` is similarly optional, but with a different default\n * mechanic: omitting the block means \"auto-detect from file\n * presence\" rather than \"use a static schema default\". The helper\n * `readLlmsTxtBody(...)` publishes when `src/content/llms.txt`\n * exists and returns `null` otherwise.\n *\n * **Validation**:\n * - `siteName` is `z.string().min(1)` — empty strings would emit\n * `<meta property=\"og:site_name\" content=\"\" />` which social\n * platforms render as a blank line.\n * - `defaultOgImageUrl` (when present) is `z.url()`.\n * - `sitemap` / `robots` validation lives on the sub-schemas.\n */\nconst _WebsiteSeoConfigSchema = z\n .object({\n siteName: z\n .string()\n .min(1, { error: 'WebsiteSeoConfig.siteName must be a non-empty string' }),\n defaultOgImageUrl: z\n .url({ error: 'WebsiteSeoConfig.defaultOgImageUrl must be a fully-qualified URL' })\n .optional(),\n /**\n * Sitemap policy block. Optional — omitting it is equivalent to\n * `{ enabled: true }` (the marketing-site default). See\n * `WebsiteSitemapConfigSchema` for field-by-field rationale.\n */\n sitemap: _WebsiteSitemapConfigSchema.optional(),\n /**\n * Robots.txt policy block. Optional — omitting it is equivalent\n * to `{ policy: 'index' }` (the marketing-site default). See\n * `WebsiteRobotsConfigSchema` for field-by-field rationale.\n */\n robots: _WebsiteRobotsConfigSchema.optional(),\n /**\n * `llms.txt` publication policy. Optional — omitting it means\n * \"auto-detect from file presence\". See\n * `WebsiteLlmsTxtConfigSchema` for the serving contract.\n */\n llmsTxt: _WebsiteLlmsTxtConfigSchema.optional(),\n });\n\nexport const WebsiteSeoConfigSchema: typeof _WebsiteSeoConfigSchema = _WebsiteSeoConfigSchema;\n\nexport type WebsiteSeoConfig = z.infer<typeof _WebsiteSeoConfigSchema>;\n/** @wildo_source:part:end saas.website.root-config.seo */\n\n/**\n * @wildo_source:part:start saas.website.root-config.navigation facet:layer:shared facet:family:website\n *\n * `WebsiteNavigationConfig` — site-wide header/footer slot bindings.\n *\n * The framework intentionally ships no concrete header or footer. The\n * application authors both as React components, registers them once here, and\n * the page layout renders the site-wide chrome around every page.\n *\n * Both fields are typed as `unknown` at the schema layer with the\n * `WebsiteNavigationConfig` interface narrowing them to\n * `ComponentType<unknown>` — same rationale as\n * `WebsiteSectionDefinition.Component` and `WebsitePageManifest.pageComponent`.\n */\nconst _WebsiteNavigationConfigSchema = z.object({\n headerComponent: z.unknown(),\n footerComponent: z.unknown(),\n});\n\nexport const WebsiteNavigationConfigSchema: typeof _WebsiteNavigationConfigSchema =\n _WebsiteNavigationConfigSchema;\n\nexport interface WebsiteNavigationConfig\n extends z.infer<typeof _WebsiteNavigationConfigSchema> {\n headerComponent: ComponentType<unknown>;\n footerComponent: ComponentType<unknown>;\n}\n/** @wildo_source:part:end saas.website.root-config.navigation */\n\n/**\n * @wildo_source:part:start saas.website.root-config.schema facet:layer:shared facet:family:website\n *\n * `WebsiteRootConfig` — the site-level configuration consumed by:\n * - the Astro adapter to drive i18n routing, page mounting,\n * and design-token CSS emission,\n * - the website audit command to validate label-pack\n * coverage and SEO structured-data conformance,\n * - the runtime `<WebsitePageLayout>` to render navigation\n * and apply design tokens.\n *\n * **Authoring convention**: each marketing-site service exports a single\n * `WEBSITE_ROOT_CONFIG: WebsiteRootConfig` from `src/website-root.config.ts`.\n * The Astro adapter and the audit command\n * both consume this canonical entry point; there is exactly one site\n * config per marketing site (no per-page or per-section overrides at\n * this level — overrides flow through the L0/L1/L1.5 component\n * registration hierarchy described in D6).\n *\n * # Scope\n *\n * This block carries site-level chrome and registry data only. Per-locale\n * routing (`locales` / `defaultLocale`) and the public origin belong in the\n * per-service `wildo.website.config.ts` declaration, avoiding duplicated\n * configuration that could diverge during site generation.\n *\n * **Field-by-field rationale**:\n *\n * - `pageManifests` — the registry of every page on the site. Indexed\n * downstream by `manifest.ref`. Refs MUST be unique (refinement\n * below).\n * - `designTokens` — see `WebsiteDesignTokensSchema`.\n * - `navigation` — see `WebsiteNavigationConfigSchema`.\n * - `chromeLabelKeys` — OPTIONAL. The set of fully-composed label keys\n * the site-wide chrome (header / footer / any global slot the\n * consumer renders outside a section context) reads via\n * `useWebsiteLabelByKey(...)`. Declared here, NOT in section\n * `expectedLabelKeys`, because chrome is rendered outside the\n * page+section context — `useWebsiteLabel(slot)` is structurally\n * unavailable to it. Threading these through the label-pack\n * validator (a) silences the always-on \"orphaned chrome key\" build\n * warnings and (b) lets the build fail fast when a chrome key is\n * missing from a locale pack, the same way section keys do.\n * Defaults to an empty array; sites with no chrome label reads\n * may omit the field entirely.\n * - `seo` — site-level branding + hero-image fallback (see\n * `WebsiteSeoConfigSchema`). The marketing-site origin USED to live\n * here as `seo.siteOrigin`; it now lives only on\n * `WildoMarketingWebsiteConfig.publicOrigin`.\n * - `skipToMainContentLabelKey` — see field JSDoc below.\n *\n * **Refinements**:\n * - `pageManifests[].ref` uniqueness — the registry is keyed by ref;\n * duplicates would silently overwrite each other in the lookup\n * table the bridge uses for cross-page links.\n * - `pageManifests[].routePath` uniqueness — two pages cannot mount\n * at the same path (Astro would error at build time, but we\n * surface it earlier here with a clearer diagnostic).\n * - `chromeLabelKeys` uniqueness — duplicates indicate copy-paste\n * bugs at the consumer's call site; surface them here.\n */\nconst _WebsiteRootConfigSchema = z\n .object({\n pageManifests: z.array(WebsitePageManifestSchema).min(1, {\n error: 'WebsiteRootConfig must declare at least one page manifest',\n }),\n designTokens: WebsiteDesignTokensSchema,\n navigation: _WebsiteNavigationConfigSchema,\n chromeLabelKeys: z.array(WebsiteLabelKeySchema).default([]),\n /**\n * Site-level branding + hero-image fallback used by the Astro\n * head renderer to compose `<meta property=\"og:site_name\">` and\n * the per-page OG image fallback. The marketing-site origin\n * (`siteOrigin`) USED to live here; it was moved to\n * `WildoMarketingWebsiteConfig.publicOrigin` in the seam-collapse\n * (single source of truth for \"what's the origin this site is\n * reachable at\").\n */\n seo: _WebsiteSeoConfigSchema,\n /**\n * Label key the framework reads to render the \"Skip to main\n * content\" link as the first focusable element on every page\n * Required because:\n * - Skip-to-main is a baseline keyboard-accessibility\n * affordance — WCAG 2.1 §2.4.1 \"Bypass Blocks\" (Level A)\n * mandates it. A marketing-site framework that omits it\n * fails AA for the entire surface; making the contract\n * opt-in invites that regression on every new consumer.\n * - The text is announced verbatim by assistive tech, so it\n * MUST be localized — a hardcoded English fallback would\n * speak \"Skip to main content\" to French users. Forcing the\n * key through the label-pack validation surface means the\n * dev server fails fast when the consumer forgets to add\n * the entry to a locale pack.\n * - The framework (NOT the consumer's chrome) owns rendering\n * the skip link because the chrome is itself the obstacle\n * the link bypasses — a chrome-side implementation would\n * either be inside the chrome (impossible to focus before\n * the chrome) or above it (creating a structural surface\n * the framework needs anyway).\n *\n * The key MUST also be present in `chromeLabelKeys` (the\n * label-pack validator silences \"orphaned\" warnings off\n * `chromeLabelKeys`) — the framework adds it automatically via\n * the `superRefine` pass below so consumers cannot forget.\n */\n skipToMainContentLabelKey: WebsiteLabelKeySchema,\n })\n .superRefine((config, ctx) => {\n const seenRefs = new Set<string>();\n const seenRoutePaths = new Set<string>();\n for (const [index, manifest] of config.pageManifests.entries()) {\n const refKey = manifest.ref as unknown as string;\n if (seenRefs.has(refKey)) {\n ctx.addIssue({\n code: 'custom',\n path: ['pageManifests', index, 'ref'],\n message: `Duplicate page ref \"${refKey}\" in WebsiteRootConfig.pageManifests`,\n });\n }\n seenRefs.add(refKey);\n\n const routeKey = manifest.routePath as unknown as string;\n if (seenRoutePaths.has(routeKey)) {\n ctx.addIssue({\n code: 'custom',\n path: ['pageManifests', index, 'routePath'],\n message: `Duplicate routePath \"${routeKey}\" in WebsiteRootConfig.pageManifests`,\n });\n }\n seenRoutePaths.add(routeKey);\n }\n\n /**\n * `chromeLabelKeys` uniqueness — a duplicate is harmless at\n * runtime (the validator de-dupes via a Set) but always indicates\n * a copy-paste bug at the consumer's call site. Surfacing it here\n * keeps the chrome contract tidy and matches the discipline applied\n * to `pageManifests[].ref` and `locales`.\n */\n const seenChromeKeys = new Set<string>();\n for (const [index, key] of config.chromeLabelKeys.entries()) {\n const keyStr = key as unknown as string;\n if (seenChromeKeys.has(keyStr)) {\n ctx.addIssue({\n code: 'custom',\n path: ['chromeLabelKeys', index],\n message: `Duplicate chrome label key \"${keyStr}\" in WebsiteRootConfig.chromeLabelKeys`,\n });\n }\n seenChromeKeys.add(keyStr);\n }\n });\n\nexport const WebsiteRootConfigSchema: typeof _WebsiteRootConfigSchema = _WebsiteRootConfigSchema;\n\n/**\n * Runtime shape of `WebsiteRootConfig`.\n *\n * Hand-written (NOT a bare `z.infer<typeof _WebsiteRootConfigSchema>`)\n * because `z.infer` walks the schema tree and would type\n * `pageManifests[number].pageComponent`, `navigation.headerComponent`\n * and `navigation.footerComponent` as `unknown` (their schema field\n * type), losing the `ComponentType<unknown>` narrowing carried by the\n * hand-written `WebsitePageManifest` and `WebsiteNavigationConfig`\n * interfaces. Factories such as `defineWebsiteRootConfig` and the\n * layout primitives consume `WebsiteRootConfig` and must see those\n * fields pre-narrowed; otherwise every consumer would need a local\n * `as ComponentType` cast at the JSX call site, defeating the type-safe\n * component contract.\n *\n * The `Omit` + intersection pattern keeps the rest of the inferred\n * shape (`designTokens`, `seo`, `chromeLabelKeys`,\n * `skipToMainContentLabelKey`) sourced directly from the schema.\n */\nexport type WebsiteRootConfig = Omit<\n z.infer<typeof _WebsiteRootConfigSchema>,\n 'pageManifests' | 'navigation'\n> & {\n pageManifests: WebsitePageManifest[];\n navigation: WebsiteNavigationConfig;\n};\n/** @wildo_source:part:end saas.website.root-config.schema */\n"]}
|
|
1
|
+
{"version":3,"file":"website-root-config.shared.schemas.js","sourceRoot":"","sources":["../../../../src/schemas/manifests/website-root-config.shared.schemas.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,yBAAyB,EAAE,MAAM,uDAAuD,CAAC;AAClG,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,EACL,yBAAyB,GAE1B,MAAM,wCAAwC,CAAC;AAEhD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,MAAM,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IAClC,UAAU,EAAE,CAAC;SACV,IAAI,CAAC,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;SAC3E,QAAQ,EAAE;IACb,QAAQ,EAAE,CAAC;SACR,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,EAAE,EAAE,KAAK,EAAE,uDAAuD,EAAE,CAAC;SAC1E,GAAG,CAAC,CAAC,EAAE,EAAE,KAAK,EAAE,uDAAuD,EAAE,CAAC;SAC1E,QAAQ,EAAE;CACd,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,0BAA0B,GACrC,2BAA2B,CAAC;AAG9B,6DAA6D;AAE7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH,MAAM,0BAA0B,GAAG,CAAC;KACjC,MAAM,CAAC;IACN,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,OAA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AM,CAAC,eAAe,CAAC,OAAO,EAAE,EAAE,CAAC;QAC5D,MAAM,MAAM,GAAG,GAAwB,CAAC;QACxC,IAAI,cAAc,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC;YAC/B,GAAG,CAAC,QAAQ,CAAC;gBACX,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,iBAAiB,EAAE,KAAK,CAAC;gBAChC,OAAO,EAAE,+BAA+B,MAAM,wCAAwC;aACvF,CAAC,CAAC;QACL,CAAC;QACD,cAAc,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAC7B,CAAC;AACH,CAAC,CAAC,CAAC;AAEL,MAAM,CAAC,MAAM,uBAAuB,GAAoC,wBAAwB,CAAC;AA4BjG,6DAA6D","sourcesContent":["import type { ComponentType } from 'react';\nimport { z } from 'zod';\n\nimport { WebsiteDesignTokensSchema } from '../design-tokens/website-design-tokens.shared.schemas';\nimport { WebsiteLabelKeySchema } from '../label-keys/website-label-key.schemas';\nimport {\n WebsitePageManifestSchema,\n type WebsitePageManifest,\n} from './website-page-manifest.shared.schemas';\n\n/**\n * @wildo_source:part:start saas.website.seo.sitemap-config facet:layer:shared facet:family:website\n *\n * `WebsiteSitemapConfig` — site-wide sitemap policy block.\n *\n * Materialized at build time by `@astrojs/sitemap` (the official\n * Astro plugin) when the consumer wires it into `astro.config.ts`\n * (see `website-seo-aeo-geo` SKILL). The framework owns the\n * **schema** (so config + enforcement live in lock-step with the\n * page registry) but the framework does NOT own the runtime\n * generator — `@astrojs/sitemap` already covers per-page\n * `lastmod` / `changefreq` / `priority` + i18n `xhtml:link\n * hreflang` annotations natively, and re-implementing that surface\n * inside the engine would duplicate well-trodden Astro tooling for\n * zero added value.\n *\n * # Field rationale\n *\n * **Why `enabled` defaults to `true`**:\n * - Marketing sites that want to ship public pages overwhelmingly\n * also want them in `sitemap.xml` (search engines treat its\n * absence as a discoverability signal). The opt-OUT shape avoids\n * a silent regression where a consumer ships pages that crawlers\n * never index because they forgot to flip a flag.\n * - The escape hatch (`enabled: false`) covers staging deployments\n * and the rare per-app decision to suppress sitemap emission\n * entirely (e.g. a private beta surface routed under a\n * `noindex` policy).\n *\n * **Why `changefreq` / `priority` are OPTIONAL** (no defaults):\n * - Both fields are non-binding hints — Google explicitly\n * ignores `priority` and treats `changefreq` as a soft signal.\n * Forcing the consumer to pick a value would either invite\n * superstitious authoring (`priority: 1.0` on every page) or\n * bury the field's actual ergonomic shape (per-page overrides\n * via `WebsitePageManifest.seo` — deferred until a real\n * consumer requests it).\n * - Unset values are simply omitted from the emitted `<url>`\n * entries; `@astrojs/sitemap` handles that automatically.\n *\n * **Validation**:\n * - `priority` is `z.number().min(0).max(1)` — outside the spec\n * range would silently break crawler ingestion.\n * - `changefreq` is the union of the seven values the sitemap\n * spec defines; arbitrary strings would be silently dropped by\n * compliant crawlers.\n */\nconst _WebsiteSitemapConfigSchema = z.object({\n enabled: z.boolean().default(true),\n changefreq: z\n .enum(['always', 'hourly', 'daily', 'weekly', 'monthly', 'yearly', 'never'])\n .optional(),\n priority: z\n .number()\n .min(0, { error: 'WebsiteSitemapConfig.priority must be between 0 and 1' })\n .max(1, { error: 'WebsiteSitemapConfig.priority must be between 0 and 1' })\n .optional(),\n});\n\nexport const WebsiteSitemapConfigSchema: typeof _WebsiteSitemapConfigSchema =\n _WebsiteSitemapConfigSchema;\n\nexport type WebsiteSitemapConfig = z.infer<typeof _WebsiteSitemapConfigSchema>;\n/** @wildo_source:part:end saas.website.seo.sitemap-config */\n\n/**\n * @wildo_source:part:start saas.website.seo.robots-config facet:layer:shared facet:family:website\n *\n * `WebsiteRobotsConfig` — site-wide `robots.txt` policy block.\n *\n * Materialized at request time by `renderRobotsTxt(siteContext)`\n * from `@wildo-ai/saas-website/astro` (consumer wires a thin\n * `src/pages/robots.txt.ts` Astro endpoint that returns the helper's\n * output). Scoped to the SITE-WIDE policy surface — per-page\n * `noindex` is a separate concern that lands on\n * `WebsitePageManifest.seo` once a real consumer requests it (today\n * the site-wide `disallow[]` covers staging-environment exclusion of\n * specific path prefixes, the dominant real-world use case).\n *\n * # Field rationale\n *\n * **Why `policy` defaults to `'index'`**:\n * - The default for a public marketing site is \"let crawlers in\";\n * `'noindex'` is the deliberate exception (staging environments,\n * beta surfaces, sites still under construction). The opt-OUT\n * shape mirrors `WebsiteSitemapConfig.enabled` for consistency.\n * - `'noindex'` is expressed by a `<meta name=\"robots\" content=\"noindex\">`\n * on every page, NOT by `Disallow: /` in `robots.txt` (#494): a crawler\n * barred from fetching a page never reads its noindex, so the URL can\n * still be indexed bare. `robots.txt` stays allow-everything for it.\n *\n * **Why `disallow[]` is a path-prefix list (not a regex)**:\n * - The `robots.txt` spec only supports literal path prefixes\n * with `*` / `$` wildcards; Disallow is NOT a regex surface.\n * Typing it as `string[]` (validated to start with `/`) keeps\n * the contract honest and lets consumers paste from their CDN\n * allowlists without translation.\n *\n * **Why `allowedCrawlers` and `disallowedCrawlers` are mutually\n * exclusive**:\n * - The two fields are two halves of the SAME AI-crawler policy\n * decision. `allowedCrawlers` is the deny-by-default shape\n * (only the named bots may crawl); `disallowedCrawlers` is the\n * allow-by-default shape (every bot except the named ones may\n * crawl). Mixing both would emit a contradictory `robots.txt`\n * (a bot in both lists would receive conflicting directives).\n * A `superRefine` enforces the mutual-exclusion invariant at\n * parse time so the build fails fast.\n *\n * **Validation**:\n * - `disallow[]` entries must start with `/` (sitemap path-prefix\n * spec) — anything else would silently match nothing.\n * - `allowedCrawlers` / `disallowedCrawlers` entries must be\n * non-empty strings (a blank User-agent token would emit\n * `User-agent: ` which compliant crawlers ignore — silent\n * misconfig).\n * - `superRefine` rejects the combined-list anti-pattern.\n */\nconst _WebsiteRobotsConfigSchema = z\n .object({\n policy: z.enum(['index', 'noindex']).default('index'),\n disallow: z\n .array(\n z\n .string()\n .min(1)\n .refine((path) => path.startsWith('/'), {\n error: 'WebsiteRobotsConfig.disallow[] entries must start with \"/\"',\n }),\n )\n .optional(),\n /**\n * Deny-by-default AI-crawler allowlist. When set, the emitted\n * `robots.txt` lists each named bot under its own\n * `User-agent: <bot>\\nAllow: /` block, then closes with a\n * catch-all `User-agent: *\\nDisallow: /`. Mutually exclusive\n * with `disallowedCrawlers` (see `superRefine` below).\n */\n allowedCrawlers: z.array(z.string().min(1)).optional(),\n /**\n * Allow-by-default AI-crawler denylist. When set, the emitted\n * `robots.txt` lists each named bot under its own\n * `User-agent: <bot>\\nDisallow: /` block. Mutually exclusive\n * with `allowedCrawlers` (see `superRefine` below).\n */\n disallowedCrawlers: z.array(z.string().min(1)).optional(),\n })\n .superRefine((value, ctx) => {\n if (value.allowedCrawlers !== undefined && value.disallowedCrawlers !== undefined) {\n ctx.addIssue({\n code: 'custom',\n path: ['allowedCrawlers'],\n message:\n 'WebsiteRobotsConfig.allowedCrawlers and disallowedCrawlers are mutually exclusive — pick one policy direction (deny-by-default vs allow-by-default).',\n });\n }\n });\n\nexport const WebsiteRobotsConfigSchema: typeof _WebsiteRobotsConfigSchema =\n _WebsiteRobotsConfigSchema;\n\nexport type WebsiteRobotsConfig = z.infer<typeof _WebsiteRobotsConfigSchema>;\n/** @wildo_source:part:end saas.website.seo.robots-config */\n\n/**\n * @wildo_source:part:start saas.website.seo.llms-txt-config facet:layer:shared facet:family:website\n *\n * `WebsiteLlmsTxtConfig` — site-wide `llms.txt` publication policy.\n *\n * The framework owns only the SERVING surface; the CONTENT remains\n * hand-authored in `src/content/llms.txt`. This block therefore needs\n * exactly one knob:\n *\n * - `enabled?: boolean`\n * - `true` → publish when the file exists\n * - `false` → suppress publication even if the file exists\n * - `undefined` → auto-detect (`readLlmsTxtBody` publishes when the\n * file exists, returns `null` when absent)\n *\n * Keeping the \"auto-detect when undefined\" convention in the HELPER\n * (not as a schema default) is deliberate: schema defaults are static,\n * while file presence is runtime/build-time state.\n */\nconst _WebsiteLlmsTxtConfigSchema = z.object({\n enabled: z.boolean().optional(),\n});\n\nexport const WebsiteLlmsTxtConfigSchema: typeof _WebsiteLlmsTxtConfigSchema =\n _WebsiteLlmsTxtConfigSchema;\n\nexport type WebsiteLlmsTxtConfig = z.infer<typeof _WebsiteLlmsTxtConfigSchema>;\n/** @wildo_source:part:end saas.website.seo.llms-txt-config */\n\n/**\n * @wildo_source:part:start saas.website.root-config.seo facet:layer:shared facet:family:website\n *\n * `WebsiteSeoConfig` — site-wide SEO/social-graph configuration\n * AUTHORED ON THE ROOT CONFIG.\n *\n * # Scope\n *\n * The public marketing-site origin belongs only in the per-service\n * `wildo.website.config.ts` declaration. Keep it out of this site-level SEO\n * block so the origin and localized routing have one source of truth.\n *\n * What stays on this block: site-level branding + hero-image\n * fallbacks that are co-authored with chrome labels and page\n * manifests respectively, NOT with the URL/i18n routing surface.\n *\n * # Field rationale\n *\n * **Why `siteName` is REQUIRED**:\n * - `og:site_name` is the brand label social platforms render\n * above the page title in shared previews. Without it, every\n * LinkedIn / Facebook / Slack preview shows the bare title with\n * no brand context.\n * - It is also the recommended `application-name` meta tag value\n * and a useful default for JSON-LD `Organization.name` schema\n * when the application ships structured data.\n *\n * **Why `defaultOgImageUrl` is OPTIONAL**:\n * - Each page's `WebsitePageManifest.metaLabelKeys.ogImageUrl`\n * takes precedence; the site-level default is a fallback for\n * pages that did not commit to a hero image.\n * - Marketing surfaces shipping no OG images at all (acceptable\n * for a placeholder build) should not be forced to author one.\n *\n * **Why `sitemap?` and `robots?` are OPTIONAL** (with sensible\n * defaults inside each sub-schema):\n * - The marketing-site default ships a public surface — every\n * page indexable, no AI-crawler restrictions, no per-path\n * disallow. Forcing every consumer to author both blocks just\n * to land in that default state would pollute the call site.\n * - Omitting either block at the call site is equivalent to\n * authoring `{}` — `WebsiteSitemapConfig.enabled` defaults to\n * `true`, `WebsiteRobotsConfig.policy` defaults to `'index'`.\n * The per-block field rationale lives on each sub-schema.\n * - `llmsTxt?` is similarly optional, but with a different default\n * mechanic: omitting the block means \"auto-detect from file\n * presence\" rather than \"use a static schema default\". The helper\n * `readLlmsTxtBody(...)` publishes when `src/content/llms.txt`\n * exists and returns `null` otherwise.\n *\n * **Validation**:\n * - `siteName` is `z.string().min(1)` — empty strings would emit\n * `<meta property=\"og:site_name\" content=\"\" />` which social\n * platforms render as a blank line.\n * - `defaultOgImageUrl` (when present) is `z.url()`.\n * - `sitemap` / `robots` validation lives on the sub-schemas.\n */\nconst _WebsiteSeoConfigSchema = z\n .object({\n siteName: z\n .string()\n .min(1, { error: 'WebsiteSeoConfig.siteName must be a non-empty string' }),\n defaultOgImageUrl: z\n .url({ error: 'WebsiteSeoConfig.defaultOgImageUrl must be a fully-qualified URL' })\n .optional(),\n /**\n * Sitemap policy block. Optional — omitting it is equivalent to\n * `{ enabled: true }` (the marketing-site default). See\n * `WebsiteSitemapConfigSchema` for field-by-field rationale.\n */\n sitemap: _WebsiteSitemapConfigSchema.optional(),\n /**\n * Robots.txt policy block. Optional — omitting it is equivalent\n * to `{ policy: 'index' }` (the marketing-site default). See\n * `WebsiteRobotsConfigSchema` for field-by-field rationale.\n */\n robots: _WebsiteRobotsConfigSchema.optional(),\n /**\n * `llms.txt` publication policy. Optional — omitting it means\n * \"auto-detect from file presence\". See\n * `WebsiteLlmsTxtConfigSchema` for the serving contract.\n */\n llmsTxt: _WebsiteLlmsTxtConfigSchema.optional(),\n });\n\nexport const WebsiteSeoConfigSchema: typeof _WebsiteSeoConfigSchema = _WebsiteSeoConfigSchema;\n\nexport type WebsiteSeoConfig = z.infer<typeof _WebsiteSeoConfigSchema>;\n/** @wildo_source:part:end saas.website.root-config.seo */\n\n/**\n * @wildo_source:part:start saas.website.root-config.navigation facet:layer:shared facet:family:website\n *\n * `WebsiteNavigationConfig` — site-wide header/footer slot bindings.\n *\n * The framework intentionally ships no concrete header or footer. The\n * application authors both as React components, registers them once here, and\n * the page layout renders the site-wide chrome around every page.\n *\n * Both fields are typed as `unknown` at the schema layer with the\n * `WebsiteNavigationConfig` interface narrowing them to\n * `ComponentType<unknown>` — same rationale as\n * `WebsiteSectionDefinition.Component` and `WebsitePageManifest.pageComponent`.\n */\nconst _WebsiteNavigationConfigSchema = z.object({\n headerComponent: z.unknown(),\n footerComponent: z.unknown(),\n});\n\nexport const WebsiteNavigationConfigSchema: typeof _WebsiteNavigationConfigSchema =\n _WebsiteNavigationConfigSchema;\n\nexport interface WebsiteNavigationConfig\n extends z.infer<typeof _WebsiteNavigationConfigSchema> {\n headerComponent: ComponentType<unknown>;\n footerComponent: ComponentType<unknown>;\n}\n/** @wildo_source:part:end saas.website.root-config.navigation */\n\n/**\n * @wildo_source:part:start saas.website.root-config.schema facet:layer:shared facet:family:website\n *\n * `WebsiteRootConfig` — the site-level configuration consumed by:\n * - the Astro adapter to drive i18n routing, page mounting,\n * and design-token CSS emission,\n * - the website audit command to validate label-pack\n * coverage and SEO structured-data conformance,\n * - the runtime `<WebsitePageLayout>` to render navigation\n * and apply design tokens.\n *\n * **Authoring convention**: each marketing-site service exports a single\n * `WEBSITE_ROOT_CONFIG: WebsiteRootConfig` from `src/website-root.config.ts`.\n * The Astro adapter and the audit command\n * both consume this canonical entry point; there is exactly one site\n * config per marketing site (no per-page or per-section overrides at\n * this level — overrides flow through the L0/L1/L1.5 component\n * registration hierarchy described in D6).\n *\n * # Scope\n *\n * This block carries site-level chrome and registry data only. Per-locale\n * routing (`locales` / `defaultLocale`) and the public origin belong in the\n * per-service `wildo.website.config.ts` declaration, avoiding duplicated\n * configuration that could diverge during site generation.\n *\n * **Field-by-field rationale**:\n *\n * - `pageManifests` — the registry of every page on the site. Indexed\n * downstream by `manifest.ref`. Refs MUST be unique (refinement\n * below).\n * - `designTokens` — see `WebsiteDesignTokensSchema`.\n * - `navigation` — see `WebsiteNavigationConfigSchema`.\n * - `chromeLabelKeys` — OPTIONAL. The set of fully-composed label keys\n * the site-wide chrome (header / footer / any global slot the\n * consumer renders outside a section context) reads via\n * `useWebsiteLabelByKey(...)`. Declared here, NOT in section\n * `expectedLabelKeys`, because chrome is rendered outside the\n * page+section context — `useWebsiteLabel(slot)` is structurally\n * unavailable to it. Threading these through the label-pack\n * validator (a) silences the always-on \"orphaned chrome key\" build\n * warnings and (b) lets the build fail fast when a chrome key is\n * missing from a locale pack, the same way section keys do.\n * Defaults to an empty array; sites with no chrome label reads\n * may omit the field entirely.\n * - `seo` — site-level branding + hero-image fallback (see\n * `WebsiteSeoConfigSchema`). The marketing-site origin USED to live\n * here as `seo.siteOrigin`; it now lives only on\n * `WildoMarketingWebsiteConfig.publicOrigin`.\n * - `skipToMainContentLabelKey` — see field JSDoc below.\n *\n * **Refinements**:\n * - `pageManifests[].ref` uniqueness — the registry is keyed by ref;\n * duplicates would silently overwrite each other in the lookup\n * table the bridge uses for cross-page links.\n * - `pageManifests[].routePath` uniqueness — two pages cannot mount\n * at the same path (Astro would error at build time, but we\n * surface it earlier here with a clearer diagnostic).\n * - `chromeLabelKeys` uniqueness — duplicates indicate copy-paste\n * bugs at the consumer's call site; surface them here.\n */\nconst _WebsiteRootConfigSchema = z\n .object({\n pageManifests: z.array(WebsitePageManifestSchema).min(1, {\n error: 'WebsiteRootConfig must declare at least one page manifest',\n }),\n designTokens: WebsiteDesignTokensSchema,\n navigation: _WebsiteNavigationConfigSchema,\n chromeLabelKeys: z.array(WebsiteLabelKeySchema).default([]),\n /**\n * Site-level branding + hero-image fallback used by the Astro\n * head renderer to compose `<meta property=\"og:site_name\">` and\n * the per-page OG image fallback. The marketing-site origin\n * (`siteOrigin`) USED to live here; it was moved to\n * `WildoMarketingWebsiteConfig.publicOrigin` in the seam-collapse\n * (single source of truth for \"what's the origin this site is\n * reachable at\").\n */\n seo: _WebsiteSeoConfigSchema,\n /**\n * Label key the framework reads to render the \"Skip to main\n * content\" link as the first focusable element on every page\n * Required because:\n * - Skip-to-main is a baseline keyboard-accessibility\n * affordance — WCAG 2.1 §2.4.1 \"Bypass Blocks\" (Level A)\n * mandates it. A marketing-site framework that omits it\n * fails AA for the entire surface; making the contract\n * opt-in invites that regression on every new consumer.\n * - The text is announced verbatim by assistive tech, so it\n * MUST be localized — a hardcoded English fallback would\n * speak \"Skip to main content\" to French users. Forcing the\n * key through the label-pack validation surface means the\n * dev server fails fast when the consumer forgets to add\n * the entry to a locale pack.\n * - The framework (NOT the consumer's chrome) owns rendering\n * the skip link because the chrome is itself the obstacle\n * the link bypasses — a chrome-side implementation would\n * either be inside the chrome (impossible to focus before\n * the chrome) or above it (creating a structural surface\n * the framework needs anyway).\n *\n * It is validated as a chrome key without being listed in\n * `chromeLabelKeys`: the label-pack loader adds it to the effective\n * chrome key set (`composeEffectiveChromeLabelKeys` in\n * `astro/label-pack-loader.ts`), so consumers cannot forget it.\n */\n skipToMainContentLabelKey: WebsiteLabelKeySchema,\n })\n .superRefine((config, ctx) => {\n const seenRefs = new Set<string>();\n const seenRoutePaths = new Set<string>();\n for (const [index, manifest] of config.pageManifests.entries()) {\n const refKey = manifest.ref as unknown as string;\n if (seenRefs.has(refKey)) {\n ctx.addIssue({\n code: 'custom',\n path: ['pageManifests', index, 'ref'],\n message: `Duplicate page ref \"${refKey}\" in WebsiteRootConfig.pageManifests`,\n });\n }\n seenRefs.add(refKey);\n\n const routeKey = manifest.routePath as unknown as string;\n if (seenRoutePaths.has(routeKey)) {\n ctx.addIssue({\n code: 'custom',\n path: ['pageManifests', index, 'routePath'],\n message: `Duplicate routePath \"${routeKey}\" in WebsiteRootConfig.pageManifests`,\n });\n }\n seenRoutePaths.add(routeKey);\n }\n\n /**\n * `chromeLabelKeys` uniqueness — a duplicate is harmless at\n * runtime (the validator de-dupes via a Set) but always indicates\n * a copy-paste bug at the consumer's call site. Surfacing it here\n * keeps the chrome contract tidy and matches the discipline applied\n * to `pageManifests[].ref` and `locales`.\n */\n const seenChromeKeys = new Set<string>();\n for (const [index, key] of config.chromeLabelKeys.entries()) {\n const keyStr = key as unknown as string;\n if (seenChromeKeys.has(keyStr)) {\n ctx.addIssue({\n code: 'custom',\n path: ['chromeLabelKeys', index],\n message: `Duplicate chrome label key \"${keyStr}\" in WebsiteRootConfig.chromeLabelKeys`,\n });\n }\n seenChromeKeys.add(keyStr);\n }\n });\n\nexport const WebsiteRootConfigSchema: typeof _WebsiteRootConfigSchema = _WebsiteRootConfigSchema;\n\n/**\n * Runtime shape of `WebsiteRootConfig`.\n *\n * Hand-written (NOT a bare `z.infer<typeof _WebsiteRootConfigSchema>`)\n * because `z.infer` walks the schema tree and would type\n * `pageManifests[number].pageComponent`, `navigation.headerComponent`\n * and `navigation.footerComponent` as `unknown` (their schema field\n * type), losing the `ComponentType<unknown>` narrowing carried by the\n * hand-written `WebsitePageManifest` and `WebsiteNavigationConfig`\n * interfaces. The layout primitives and the Astro helpers consume\n * `WebsiteRootConfig` and must see those\n * fields pre-narrowed; otherwise every consumer would need a local\n * `as ComponentType` cast at the JSX call site, defeating the type-safe\n * component contract.\n *\n * The `Omit` + intersection pattern keeps the rest of the inferred\n * shape (`designTokens`, `seo`, `chromeLabelKeys`,\n * `skipToMainContentLabelKey`) sourced directly from the schema.\n */\nexport type WebsiteRootConfig = Omit<\n z.infer<typeof _WebsiteRootConfigSchema>,\n 'pageManifests' | 'navigation'\n> & {\n pageManifests: WebsitePageManifest[];\n navigation: WebsiteNavigationConfig;\n};\n/** @wildo_source:part:end saas.website.root-config.schema */\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page-ref.schemas.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"page-ref.schemas.d.ts","sourceRoot":"","sources":["../../../../src/schemas/refs/page-ref.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,QAAA,MAAM,qBAAqB,0DAQC,CAAC;AAE7B,eAAO,MAAM,oBAAoB,EAAE,OAAO,qBAA6C,CAAC;AAExF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;;AACnE,oDAAoD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"section-ref.schemas.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"section-ref.schemas.d.ts","sourceRoot":"","sources":["../../../../src/schemas/refs/section-ref.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,QAAA,MAAM,wBAAwB,6DAQC,CAAC;AAEhC,eAAO,MAAM,uBAAuB,EAAE,OAAO,wBAAmD,CAAC;AAEjG,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;;AACzE,uDAAuD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"website-section-category.shared.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"website-section-category.shared.d.ts","sourceRoot":"","sources":["../../../../src/schemas/sections/website-section-category.shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,oBAAY,sBAAsB;IAChC,IAAI,SAAS;IACb,GAAG,QAAQ;IACX,uBAAuB,4BAA4B;IACnD,cAAc,mBAAmB;IACjC,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,YAAY,iBAAiB;IAC7B,GAAG,QAAQ;IACX,UAAU,eAAe;IACzB;;;;;;;;OAQG;IACH,GAAG,QAAQ;CACZ;AAED,eAAO,MAAM,4BAA4B,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,sBAAsB,CAClD,CAAC;AACjC,iEAAiE"}
|