@wildo-ai/saas-website 1.1.4 → 1.1.6
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 +23 -20
- package/dist/esm/astro/blog-post-bridge.d.ts.map +1 -1
- package/dist/esm/astro/blog-post-bridge.js +13 -6
- 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 +55 -26
- package/dist/esm/astro/bridge-runtime.d.ts.map +1 -1
- package/dist/esm/astro/bridge-runtime.js +21 -7
- 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 +14 -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 +20 -10
- 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 +10 -5
- package/dist/esm/config/wildo-website-config.schemas.d.ts.map +1 -1
- package/dist/esm/config/wildo-website-config.schemas.js +10 -5
- package/dist/esm/config/wildo-website-config.schemas.js.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 +14 -3
- 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 +28 -13
- 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 +24 -1
- package/dist/esm/core/anonymous-session/website-anonymous-session-client.d.ts.map +1 -1
- package/dist/esm/core/anonymous-session/website-anonymous-session-client.js +46 -3
- 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 +6 -0
- package/dist/esm/core/consent/WebsiteConsentBanner.d.ts.map +1 -0
- package/dist/esm/core/consent/WebsiteConsentBanner.js +129 -0
- package/dist/esm/core/consent/WebsiteConsentBanner.js.map +1 -0
- package/dist/esm/core/consent/WebsiteConsentContext.d.ts +85 -0
- package/dist/esm/core/consent/WebsiteConsentContext.d.ts.map +1 -0
- package/dist/esm/core/consent/WebsiteConsentContext.js +89 -0
- package/dist/esm/core/consent/WebsiteConsentContext.js.map +1 -0
- package/dist/esm/core/consent/WebsiteConsentGate.d.ts +27 -0
- package/dist/esm/core/consent/WebsiteConsentGate.d.ts.map +1 -0
- package/dist/esm/core/consent/WebsiteConsentGate.js +9 -0
- package/dist/esm/core/consent/WebsiteConsentGate.js.map +1 -0
- package/dist/esm/core/consent/useWebsiteConsent.d.ts +10 -0
- package/dist/esm/core/consent/useWebsiteConsent.d.ts.map +1 -0
- package/dist/esm/core/consent/useWebsiteConsent.js +17 -0
- package/dist/esm/core/consent/useWebsiteConsent.js.map +1 -0
- package/dist/esm/core/consent/website-consent-storage.d.ts +22 -0
- package/dist/esm/core/consent/website-consent-storage.d.ts.map +1 -0
- package/dist/esm/core/consent/website-consent-storage.js +102 -0
- package/dist/esm/core/consent/website-consent-storage.js.map +1 -0
- package/dist/esm/core/contexts/WebsitePageContext.d.ts.map +1 -1
- package/dist/esm/core/contexts/WebsitePageContext.js.map +1 -1
- package/dist/esm/core/contexts/WebsiteRuntimeContext.d.ts +33 -6
- 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/WebsiteSectionContext.js.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 +1 -2
- package/dist/esm/core/external-providers/frontend-provider-registry.website.d.ts.map +1 -1
- package/dist/esm/core/external-providers/frontend-provider-registry.website.js.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 +43 -10
- package/dist/esm/core/external-providers/useWebsiteProviderScripts.d.ts.map +1 -1
- package/dist/esm/core/external-providers/useWebsiteProviderScripts.js +92 -29
- 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 +21 -1
- package/dist/esm/core/layouts/WebsitePageLayout.d.ts.map +1 -1
- package/dist/esm/core/layouts/WebsitePageLayout.js +39 -8
- 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 +36 -65
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +36 -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 +61 -0
- package/dist/esm/schemas/label-keys/website-consent-label-keys.schemas.d.ts.map +1 -0
- package/dist/esm/schemas/label-keys/website-consent-label-keys.schemas.js +73 -0
- package/dist/esm/schemas/label-keys/website-consent-label-keys.schemas.js.map +1 -0
- 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 +6 -5
- 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-category.shared.js.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 +6 -29
- package/src/__tests__/bundle-isolation.test.ts +19 -22
- package/src/astro/__tests__/blog-post-bridge.test.tsx +58 -1
- package/src/astro/__tests__/bridge-runtime.test.tsx +44 -1
- package/src/astro/__tests__/label-pack-loader.test.ts +29 -1
- package/src/astro/blog-post-bridge.tsx +36 -26
- package/src/astro/bridge-runtime.tsx +79 -33
- package/src/astro/label-pack-loader.ts +12 -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 +27 -15
- package/src/config/load-website-pricing-catalog.ts +52 -0
- package/src/config/load-website-site-context.ts +145 -0
- package/src/config/wildo-website-config.schemas.ts +10 -5
- package/src/config-loader.ts +2 -0
- package/src/core/__tests__/WebsitePageLayout.test.tsx +1 -1
- package/src/core/__tests__/contexts.test.tsx +20 -1
- package/src/core/__tests__/website-consent.test.tsx +312 -0
- 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/__tests__/inbound-contact-form.schema.test.ts +11 -4
- package/src/core/anonymous-session/inbound-contact-form.schema.ts +30 -13
- package/src/core/anonymous-session/website-anonymous-session-client.ts +52 -3
- package/src/core/anonymous-session/website-submission-challenge.ts +99 -0
- package/src/core/consent/WebsiteConsentBanner.tsx +223 -0
- package/src/core/consent/WebsiteConsentContext.tsx +164 -0
- package/src/core/consent/WebsiteConsentGate.tsx +34 -0
- package/src/core/consent/useWebsiteConsent.ts +18 -0
- package/src/core/consent/website-consent-storage.ts +116 -0
- package/src/core/contexts/WebsiteRuntimeContext.tsx +33 -6
- 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/frontend-provider-registry.website.ts +1 -2
- 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 +114 -40
- 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 +75 -7
- package/src/index.ts +38 -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 +83 -0
- package/src/schemas/label-keys/website-consent-label-keys.schemas.ts +78 -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
- package/dist/esm/core/external-providers/provider-scripts.website.d.ts +0 -68
- package/dist/esm/core/external-providers/provider-scripts.website.d.ts.map +0 -1
- package/dist/esm/core/external-providers/provider-scripts.website.js +0 -99
- package/dist/esm/core/external-providers/provider-scripts.website.js.map +0 -1
- package/src/core/external-providers/__tests__/provider-scripts.website.test.ts +0 -146
- package/src/core/external-providers/provider-scripts.website.ts +0 -126
package/dist/esm/index.d.ts
CHANGED
|
@@ -11,75 +11,33 @@
|
|
|
11
11
|
* accompanying SKILLs in `framework-knowledge`.
|
|
12
12
|
*
|
|
13
13
|
* @wildo-boundary
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
14
|
+
* This barrel re-exports the React-side surface: `schemas/`, `core/`,
|
|
15
|
+
* `components/`. The other entries are separate subpaths with their own
|
|
16
|
+
* audiences — `/astro` (Node, Astro frontmatter), `/astro-island` (the
|
|
17
|
+
* bridge factory), `/config` and `/config-loader` (Node), `/mdx`,
|
|
18
|
+
* `/companion` (React-free). Per directory:
|
|
17
19
|
* - `schemas/` : NO React, NO Astro, NO `~wildo-frontend-lib/**`
|
|
18
|
-
* - `
|
|
19
|
-
* - `
|
|
20
|
-
* - `
|
|
20
|
+
* - `core/`, `components/`: MAY use React; NO `~wildo-frontend-lib/**` (Q17=B)
|
|
21
|
+
* - `astro/` : MAY use Astro and Node; NO React component runtime imports
|
|
22
|
+
* - `config/` : Node-side loaders; never reachable from a React-island entry
|
|
21
23
|
* - `mdx/` : MAY use `@mdx-js/*`
|
|
22
|
-
* - `integration/` : MAY use React; MAY import the
|
|
23
|
-
* `@wildo-ai/saas-models/public-runtime` SUBPATH,
|
|
24
|
-
* the `@wildo-ai/presets-components-models/public-runtime`
|
|
25
|
-
* SUBPATH, `@wildo-ai/zod-decorators`,
|
|
26
|
-
* plus the SSR / Astro-middleware tier
|
|
27
|
-
* (`axios`, `jsonwebtoken`, `socket.io-client`,
|
|
28
|
-
* `reflect-metadata`) — D12 revised
|
|
29
|
-
* 2026-04-19 (second same-day loosening);
|
|
30
|
-
* the ROOT barrels of `@wildo-ai/saas-models`
|
|
31
|
-
* and `@wildo-ai/presets-components-models`
|
|
32
|
-
* are FORBIDDEN (they boot the decorator
|
|
33
|
-
* framework / pull the heavy registry);
|
|
34
|
-
* the saas-app DI / backend stack
|
|
35
|
-
* (`inversify`, `mongoose`, `express`,
|
|
36
|
-
* `pino`, `helmet`, `argon2`, `bcrypt`,
|
|
37
|
-
* the `@wildo-ai/saas-frontend-lib` /
|
|
38
|
-
* `@wildo-ai/saas-backend-lib` /
|
|
39
|
-
* `@wildo-ai/external-connectors-models`
|
|
40
|
-
* root + subpath surfaces) is FORBIDDEN;
|
|
41
|
-
* MUST NOT import `~wildo-frontend-lib/**`
|
|
42
|
-
* (Q17=B / D16)
|
|
43
24
|
*
|
|
44
|
-
* D12 (client-bundle import discipline
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
* internal seam for symbols not (yet) re-exported by saas-models.
|
|
52
|
-
* - `@wildo-ai/zod-decorators` is allowed to import (first revision
|
|
53
|
-
* 2026-04-19). The package itself is side-effect-free; only an
|
|
54
|
-
* explicit `initZodDecorators()` call mutates `z.ZodType.prototype`,
|
|
55
|
-
* which neither saas-website nor the saas-models /public-runtime
|
|
56
|
-
* barrel does.
|
|
57
|
-
* - `axios`, `jsonwebtoken`, `socket.io-client`, `reflect-metadata` are
|
|
58
|
-
* allowed for SSR / Astro-middleware code paths (second same-day
|
|
59
|
-
* revision 2026-04-19). The website engine needs them to provide
|
|
60
|
-
* middleware utilities (HTTP proxying to the SaaS backend, JWT
|
|
61
|
-
* verification of cross-frontend handoff codes, real-time push,
|
|
62
|
-
* decorator-metadata reads). They are SSR-tier — discipline
|
|
63
|
-
* (and a future strict/loose entry split for React islands vs
|
|
64
|
-
* middleware) keeps them out of the React-island bundle.
|
|
25
|
+
* D12 (client-bundle import discipline): everything reachable from a
|
|
26
|
+
* React-island entry ships to the browser, so every shared model atom
|
|
27
|
+
* comes from a side-effect-free `/public-runtime` subpath —
|
|
28
|
+
* `@wildo-ai/saas-models/public-runtime` first,
|
|
29
|
+
* `@wildo-ai/presets-components-models/public-runtime` for symbols it does
|
|
30
|
+
* not re-export yet — and `@wildo-ai/zod-decorators` is allowed because
|
|
31
|
+
* only an explicit `initZodDecorators()` mutates Zod's prototype.
|
|
65
32
|
*
|
|
66
|
-
* The ROOT
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
* `@wildo-ai/
|
|
71
|
-
* (`
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
* These boundaries are enforced by review + the bundle-isolation test
|
|
76
|
-
* above until Phase 8 promotes them to a programmatic ESLint check
|
|
77
|
-
* (cf. `saas-website-slice.md`
|
|
78
|
-
* §"DEFERRED to Phase 8 — boundary lint mechanism design").
|
|
79
|
-
*
|
|
80
|
-
* Phase 1+2 status: schemas + runtime contexts/hooks + layout
|
|
81
|
-
* primitives + L1 placeholders + factories are all exported. Phase 5
|
|
82
|
-
* adds the Astro adapter; Phase 5.7 the `integration/` layer.
|
|
33
|
+
* The ROOT barrels of `@wildo-ai/saas-models` and
|
|
34
|
+
* `@wildo-ai/presets-components-models` are forbidden everywhere in this
|
|
35
|
+
* package (they boot the decorator framework and pull the full schema
|
|
36
|
+
* graph), as are the saas-app DI runtime (`inversify`,
|
|
37
|
+
* `@wildo-ai/saas-frontend-lib`, `@wildo-ai/saas-backend-lib`) and
|
|
38
|
+
* pure-backend libs (`mongoose`, `express`, `pino`, `helmet`, `argon2`,
|
|
39
|
+
* `bcrypt`). Enforced by `src/__tests__/bundle-isolation.test.ts`, which
|
|
40
|
+
* walks every entry's import graph against an allow-list.
|
|
83
41
|
*
|
|
84
42
|
* D18 (L1 boundary, Phase 2): the L1 primitives (`WebsiteHeading`,
|
|
85
43
|
* `WebsiteText`, `WebsiteButton`, `WebsiteLink`, `WebsiteImage`) are
|
|
@@ -94,10 +52,13 @@
|
|
|
94
52
|
export * from './schemas/refs/page-ref.schemas';
|
|
95
53
|
export * from './schemas/refs/section-ref.schemas';
|
|
96
54
|
export * from './schemas/label-keys/website-label-key.schemas';
|
|
55
|
+
export * from './schemas/label-keys/website-consent-label-keys.schemas';
|
|
56
|
+
export * from './schemas/label-keys/website-provider-component-label-keys.schemas';
|
|
97
57
|
export * from './schemas/sections/website-section-category.shared';
|
|
98
58
|
export * from './schemas/sections/website-section-definition.shared.schemas';
|
|
99
59
|
export * from './schemas/structured-data/website-structured-data.shared.schemas';
|
|
100
60
|
export * from './schemas/structured-data/structured-data-reconciliation.shared';
|
|
61
|
+
export * from './schemas/structured-data/pricing-offer-structured-data.shared';
|
|
101
62
|
export * from './schemas/design-tokens/website-design-tokens.shared.schemas';
|
|
102
63
|
export * from './schemas/manifests/website-page-manifest.shared.schemas';
|
|
103
64
|
export * from './schemas/manifests/website-root-config.shared.schemas';
|
|
@@ -115,9 +76,19 @@ export * from './core/factories/define-website-section';
|
|
|
115
76
|
export * from './core/factories/define-website-page-manifest';
|
|
116
77
|
export * from './core/layouts/WebsitePageLayout';
|
|
117
78
|
export * from './core/layouts/WebsiteSection';
|
|
79
|
+
export * from './core/consent/website-consent-storage';
|
|
80
|
+
export * from './core/consent/WebsiteConsentContext';
|
|
81
|
+
export * from './core/consent/useWebsiteConsent';
|
|
82
|
+
export * from './core/consent/WebsiteConsentGate';
|
|
83
|
+
export * from './core/consent/WebsiteConsentBanner';
|
|
84
|
+
export * from './core/external-providers/provider-component-registry.website';
|
|
85
|
+
export * from './core/external-providers/useWebsiteProviderComponent';
|
|
86
|
+
export * from './core/external-providers/WebsiteProviderComponent';
|
|
87
|
+
export * from './core/external-providers/website-provider-sdk-activations';
|
|
118
88
|
export * from './core/anonymous-session/website-anonymous-session-client';
|
|
119
89
|
export * from './core/anonymous-session/inbound-contact-form.schema';
|
|
120
90
|
export * from './core/anonymous-session/InboundContactForm';
|
|
91
|
+
export * from './core/anonymous-session/website-submission-challenge';
|
|
121
92
|
export * from './components/low-level/WebsiteHeading';
|
|
122
93
|
export * from './components/low-level/WebsiteText';
|
|
123
94
|
export * from './components/low-level/WebsiteLink';
|
package/dist/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AAEH,cAAc,iCAAiC,CAAC;AAChD,cAAc,oCAAoC,CAAC;AACnD,cAAc,gDAAgD,CAAC;AAC/D,cAAc,yDAAyD,CAAC;AACxE,cAAc,oEAAoE,CAAC;AACnF,cAAc,oDAAoD,CAAC;AACnE,cAAc,8DAA8D,CAAC;AAC7E,cAAc,kEAAkE,CAAC;AACjF,cAAc,iEAAiE,CAAC;AAChF,cAAc,gEAAgE,CAAC;AAC/E,cAAc,8DAA8D,CAAC;AAC7E,cAAc,0DAA0D,CAAC;AACzE,cAAc,wDAAwD,CAAC;AACvE,cAAc,qDAAqD,CAAC;AACpE,cAAc,2CAA2C,CAAC;AAE1D,cAAc,uCAAuC,CAAC;AACtD,cAAc,mCAAmC,CAAC;AAClD,cAAc,oCAAoC,CAAC;AACnD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,uCAAuC,CAAC;AACtD,cAAc,mCAAmC,CAAC;AAClD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qCAAqC,CAAC;AACpD,cAAc,yCAAyC,CAAC;AACxD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,kCAAkC,CAAC;AACjD,cAAc,+BAA+B,CAAC;AAE9C,cAAc,wCAAwC,CAAC;AACvD,cAAc,sCAAsC,CAAC;AACrD,cAAc,kCAAkC,CAAC;AACjD,cAAc,mCAAmC,CAAC;AAClD,cAAc,qCAAqC,CAAC;AAEpD,cAAc,+DAA+D,CAAC;AAC9E,cAAc,uDAAuD,CAAC;AACtE,cAAc,oDAAoD,CAAC;AACnE,cAAc,4DAA4D,CAAC;AAE3E,cAAc,2DAA2D,CAAC;AAC1E,cAAc,sDAAsD,CAAC;AACrE,cAAc,6CAA6C,CAAC;AAC5D,cAAc,uDAAuD,CAAC;AAEtE,cAAc,uCAAuC,CAAC;AACtD,cAAc,oCAAoC,CAAC;AACnD,cAAc,oCAAoC,CAAC;AACnD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,uCAAuC,CAAC;AACtD,cAAc,sCAAsC,CAAC;AACrD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,qCAAqC,CAAC"}
|
package/dist/esm/index.js
CHANGED
|
@@ -11,75 +11,33 @@
|
|
|
11
11
|
* accompanying SKILLs in `framework-knowledge`.
|
|
12
12
|
*
|
|
13
13
|
* @wildo-boundary
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
14
|
+
* This barrel re-exports the React-side surface: `schemas/`, `core/`,
|
|
15
|
+
* `components/`. The other entries are separate subpaths with their own
|
|
16
|
+
* audiences — `/astro` (Node, Astro frontmatter), `/astro-island` (the
|
|
17
|
+
* bridge factory), `/config` and `/config-loader` (Node), `/mdx`,
|
|
18
|
+
* `/companion` (React-free). Per directory:
|
|
17
19
|
* - `schemas/` : NO React, NO Astro, NO `~wildo-frontend-lib/**`
|
|
18
|
-
* - `
|
|
19
|
-
* - `
|
|
20
|
-
* - `
|
|
20
|
+
* - `core/`, `components/`: MAY use React; NO `~wildo-frontend-lib/**` (Q17=B)
|
|
21
|
+
* - `astro/` : MAY use Astro and Node; NO React component runtime imports
|
|
22
|
+
* - `config/` : Node-side loaders; never reachable from a React-island entry
|
|
21
23
|
* - `mdx/` : MAY use `@mdx-js/*`
|
|
22
|
-
* - `integration/` : MAY use React; MAY import the
|
|
23
|
-
* `@wildo-ai/saas-models/public-runtime` SUBPATH,
|
|
24
|
-
* the `@wildo-ai/presets-components-models/public-runtime`
|
|
25
|
-
* SUBPATH, `@wildo-ai/zod-decorators`,
|
|
26
|
-
* plus the SSR / Astro-middleware tier
|
|
27
|
-
* (`axios`, `jsonwebtoken`, `socket.io-client`,
|
|
28
|
-
* `reflect-metadata`) — D12 revised
|
|
29
|
-
* 2026-04-19 (second same-day loosening);
|
|
30
|
-
* the ROOT barrels of `@wildo-ai/saas-models`
|
|
31
|
-
* and `@wildo-ai/presets-components-models`
|
|
32
|
-
* are FORBIDDEN (they boot the decorator
|
|
33
|
-
* framework / pull the heavy registry);
|
|
34
|
-
* the saas-app DI / backend stack
|
|
35
|
-
* (`inversify`, `mongoose`, `express`,
|
|
36
|
-
* `pino`, `helmet`, `argon2`, `bcrypt`,
|
|
37
|
-
* the `@wildo-ai/saas-frontend-lib` /
|
|
38
|
-
* `@wildo-ai/saas-backend-lib` /
|
|
39
|
-
* `@wildo-ai/external-connectors-models`
|
|
40
|
-
* root + subpath surfaces) is FORBIDDEN;
|
|
41
|
-
* MUST NOT import `~wildo-frontend-lib/**`
|
|
42
|
-
* (Q17=B / D16)
|
|
43
24
|
*
|
|
44
|
-
* D12 (client-bundle import discipline
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
* internal seam for symbols not (yet) re-exported by saas-models.
|
|
52
|
-
* - `@wildo-ai/zod-decorators` is allowed to import (first revision
|
|
53
|
-
* 2026-04-19). The package itself is side-effect-free; only an
|
|
54
|
-
* explicit `initZodDecorators()` call mutates `z.ZodType.prototype`,
|
|
55
|
-
* which neither saas-website nor the saas-models /public-runtime
|
|
56
|
-
* barrel does.
|
|
57
|
-
* - `axios`, `jsonwebtoken`, `socket.io-client`, `reflect-metadata` are
|
|
58
|
-
* allowed for SSR / Astro-middleware code paths (second same-day
|
|
59
|
-
* revision 2026-04-19). The website engine needs them to provide
|
|
60
|
-
* middleware utilities (HTTP proxying to the SaaS backend, JWT
|
|
61
|
-
* verification of cross-frontend handoff codes, real-time push,
|
|
62
|
-
* decorator-metadata reads). They are SSR-tier — discipline
|
|
63
|
-
* (and a future strict/loose entry split for React islands vs
|
|
64
|
-
* middleware) keeps them out of the React-island bundle.
|
|
25
|
+
* D12 (client-bundle import discipline): everything reachable from a
|
|
26
|
+
* React-island entry ships to the browser, so every shared model atom
|
|
27
|
+
* comes from a side-effect-free `/public-runtime` subpath —
|
|
28
|
+
* `@wildo-ai/saas-models/public-runtime` first,
|
|
29
|
+
* `@wildo-ai/presets-components-models/public-runtime` for symbols it does
|
|
30
|
+
* not re-export yet — and `@wildo-ai/zod-decorators` is allowed because
|
|
31
|
+
* only an explicit `initZodDecorators()` mutates Zod's prototype.
|
|
65
32
|
*
|
|
66
|
-
* The ROOT
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
* `@wildo-ai/
|
|
71
|
-
* (`
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
* These boundaries are enforced by review + the bundle-isolation test
|
|
76
|
-
* above until Phase 8 promotes them to a programmatic ESLint check
|
|
77
|
-
* (cf. `saas-website-slice.md`
|
|
78
|
-
* §"DEFERRED to Phase 8 — boundary lint mechanism design").
|
|
79
|
-
*
|
|
80
|
-
* Phase 1+2 status: schemas + runtime contexts/hooks + layout
|
|
81
|
-
* primitives + L1 placeholders + factories are all exported. Phase 5
|
|
82
|
-
* adds the Astro adapter; Phase 5.7 the `integration/` layer.
|
|
33
|
+
* The ROOT barrels of `@wildo-ai/saas-models` and
|
|
34
|
+
* `@wildo-ai/presets-components-models` are forbidden everywhere in this
|
|
35
|
+
* package (they boot the decorator framework and pull the full schema
|
|
36
|
+
* graph), as are the saas-app DI runtime (`inversify`,
|
|
37
|
+
* `@wildo-ai/saas-frontend-lib`, `@wildo-ai/saas-backend-lib`) and
|
|
38
|
+
* pure-backend libs (`mongoose`, `express`, `pino`, `helmet`, `argon2`,
|
|
39
|
+
* `bcrypt`). Enforced by `src/__tests__/bundle-isolation.test.ts`, which
|
|
40
|
+
* walks every entry's import graph against an allow-list.
|
|
83
41
|
*
|
|
84
42
|
* D18 (L1 boundary, Phase 2): the L1 primitives (`WebsiteHeading`,
|
|
85
43
|
* `WebsiteText`, `WebsiteButton`, `WebsiteLink`, `WebsiteImage`) are
|
|
@@ -94,10 +52,13 @@
|
|
|
94
52
|
export * from './schemas/refs/page-ref.schemas.js';
|
|
95
53
|
export * from './schemas/refs/section-ref.schemas.js';
|
|
96
54
|
export * from './schemas/label-keys/website-label-key.schemas.js';
|
|
55
|
+
export * from './schemas/label-keys/website-consent-label-keys.schemas.js';
|
|
56
|
+
export * from './schemas/label-keys/website-provider-component-label-keys.schemas.js';
|
|
97
57
|
export * from './schemas/sections/website-section-category.shared.js';
|
|
98
58
|
export * from './schemas/sections/website-section-definition.shared.schemas.js';
|
|
99
59
|
export * from './schemas/structured-data/website-structured-data.shared.schemas.js';
|
|
100
60
|
export * from './schemas/structured-data/structured-data-reconciliation.shared.js';
|
|
61
|
+
export * from './schemas/structured-data/pricing-offer-structured-data.shared.js';
|
|
101
62
|
export * from './schemas/design-tokens/website-design-tokens.shared.schemas.js';
|
|
102
63
|
export * from './schemas/manifests/website-page-manifest.shared.schemas.js';
|
|
103
64
|
export * from './schemas/manifests/website-root-config.shared.schemas.js';
|
|
@@ -115,9 +76,19 @@ export * from './core/factories/define-website-section.js';
|
|
|
115
76
|
export * from './core/factories/define-website-page-manifest.js';
|
|
116
77
|
export * from './core/layouts/WebsitePageLayout.js';
|
|
117
78
|
export * from './core/layouts/WebsiteSection.js';
|
|
79
|
+
export * from './core/consent/website-consent-storage.js';
|
|
80
|
+
export * from './core/consent/WebsiteConsentContext.js';
|
|
81
|
+
export * from './core/consent/useWebsiteConsent.js';
|
|
82
|
+
export * from './core/consent/WebsiteConsentGate.js';
|
|
83
|
+
export * from './core/consent/WebsiteConsentBanner.js';
|
|
84
|
+
export * from './core/external-providers/provider-component-registry.website.js';
|
|
85
|
+
export * from './core/external-providers/useWebsiteProviderComponent.js';
|
|
86
|
+
export * from './core/external-providers/WebsiteProviderComponent.js';
|
|
87
|
+
export * from './core/external-providers/website-provider-sdk-activations.js';
|
|
118
88
|
export * from './core/anonymous-session/website-anonymous-session-client.js';
|
|
119
89
|
export * from './core/anonymous-session/inbound-contact-form.schema.js';
|
|
120
90
|
export * from './core/anonymous-session/InboundContactForm.js';
|
|
91
|
+
export * from './core/anonymous-session/website-submission-challenge.js';
|
|
121
92
|
export * from './components/low-level/WebsiteHeading.js';
|
|
122
93
|
export * from './components/low-level/WebsiteText.js';
|
|
123
94
|
export * from './components/low-level/WebsiteLink.js';
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AAEH,cAAc,iCAAiC,CAAC;AAChD,cAAc,oCAAoC,CAAC;AACnD,cAAc,gDAAgD,CAAC;AAC/D,cAAc,yDAAyD,CAAC;AACxE,cAAc,oEAAoE,CAAC;AACnF,cAAc,oDAAoD,CAAC;AACnE,cAAc,8DAA8D,CAAC;AAC7E,cAAc,kEAAkE,CAAC;AACjF,cAAc,iEAAiE,CAAC;AAChF,cAAc,gEAAgE,CAAC;AAC/E,cAAc,8DAA8D,CAAC;AAC7E,cAAc,0DAA0D,CAAC;AACzE,cAAc,wDAAwD,CAAC;AACvE,cAAc,qDAAqD,CAAC;AACpE,cAAc,2CAA2C,CAAC;AAE1D,cAAc,uCAAuC,CAAC;AACtD,cAAc,mCAAmC,CAAC;AAClD,cAAc,oCAAoC,CAAC;AACnD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,uCAAuC,CAAC;AACtD,cAAc,mCAAmC,CAAC;AAClD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qCAAqC,CAAC;AACpD,cAAc,yCAAyC,CAAC;AACxD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,kCAAkC,CAAC;AACjD,cAAc,+BAA+B,CAAC;AAE9C,cAAc,wCAAwC,CAAC;AACvD,cAAc,sCAAsC,CAAC;AACrD,cAAc,kCAAkC,CAAC;AACjD,cAAc,mCAAmC,CAAC;AAClD,cAAc,qCAAqC,CAAC;AAEpD,cAAc,+DAA+D,CAAC;AAC9E,cAAc,uDAAuD,CAAC;AACtE,cAAc,oDAAoD,CAAC;AACnE,cAAc,4DAA4D,CAAC;AAE3E,cAAc,2DAA2D,CAAC;AAC1E,cAAc,sDAAsD,CAAC;AACrE,cAAc,6CAA6C,CAAC;AAC5D,cAAc,uDAAuD,CAAC;AAEtE,cAAc,uCAAuC,CAAC;AACtD,cAAc,oCAAoC,CAAC;AACnD,cAAc,oCAAoC,CAAC;AACnD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,uCAAuC,CAAC;AACtD,cAAc,sCAAsC,CAAC;AACrD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,qCAAqC,CAAC","sourcesContent":["/**\n * @wildo-package @wildo-ai/saas-website\n *\n * SaaS marketing/landing website engine — schemas + helpers + layout\n * placeholders + Astro/MDX adapters + SEO/AEO/GEO builder library.\n *\n * Per `saas-website-slice.md` D6/D15: this engine ships **NO concrete\n * business sections** (no Hero, no CTA, no Pricing). It ships the\n * structural and helper machinery; consumers author every business\n * section themselves via the `defineWebsiteSection` factory and the\n * accompanying SKILLs in `framework-knowledge`.\n *\n * @wildo-boundary\n * This barrel re-exports the React-side surface: `schemas/`, `core/`,\n * `components/`. The other entries are separate subpaths with their own\n * audiences — `/astro` (Node, Astro frontmatter), `/astro-island` (the\n * bridge factory), `/config` and `/config-loader` (Node), `/mdx`,\n * `/companion` (React-free). Per directory:\n * - `schemas/` : NO React, NO Astro, NO `~wildo-frontend-lib/**`\n * - `core/`, `components/`: MAY use React; NO `~wildo-frontend-lib/**` (Q17=B)\n * - `astro/` : MAY use Astro and Node; NO React component runtime imports\n * - `config/` : Node-side loaders; never reachable from a React-island entry\n * - `mdx/` : MAY use `@mdx-js/*`\n *\n * D12 (client-bundle import discipline): everything reachable from a\n * React-island entry ships to the browser, so every shared model atom\n * comes from a side-effect-free `/public-runtime` subpath —\n * `@wildo-ai/saas-models/public-runtime` first,\n * `@wildo-ai/presets-components-models/public-runtime` for symbols it does\n * not re-export yet — and `@wildo-ai/zod-decorators` is allowed because\n * only an explicit `initZodDecorators()` mutates Zod's prototype.\n *\n * The ROOT barrels of `@wildo-ai/saas-models` and\n * `@wildo-ai/presets-components-models` are forbidden everywhere in this\n * package (they boot the decorator framework and pull the full schema\n * graph), as are the saas-app DI runtime (`inversify`,\n * `@wildo-ai/saas-frontend-lib`, `@wildo-ai/saas-backend-lib`) and\n * pure-backend libs (`mongoose`, `express`, `pino`, `helmet`, `argon2`,\n * `bcrypt`). Enforced by `src/__tests__/bundle-isolation.test.ts`, which\n * walks every entry's import graph against an allow-list.\n *\n * D18 (L1 boundary, Phase 2): the L1 primitives (`WebsiteHeading`,\n * `WebsiteText`, `WebsiteButton`, `WebsiteLink`, `WebsiteImage`) are\n * self-contained placeholders — they do NOT consume\n * `ComponentRegistryService` from `saas-frontend-lib` and do NOT\n * re-export `saas-frontend-lib` primitives. Consumers override at the\n * L1 boundary by barrel-re-exporting their preferred styled variant\n * from their app's `app/website/primitives/<Primitive>.tsx`. Phase 6\n * dogfood will revisit and decide whether to promote a registry-based\n * override mechanism.\n */\n\nexport * from './schemas/refs/page-ref.schemas';\nexport * from './schemas/refs/section-ref.schemas';\nexport * from './schemas/label-keys/website-label-key.schemas';\nexport * from './schemas/label-keys/website-consent-label-keys.schemas';\nexport * from './schemas/label-keys/website-provider-component-label-keys.schemas';\nexport * from './schemas/sections/website-section-category.shared';\nexport * from './schemas/sections/website-section-definition.shared.schemas';\nexport * from './schemas/structured-data/website-structured-data.shared.schemas';\nexport * from './schemas/structured-data/structured-data-reconciliation.shared';\nexport * from './schemas/structured-data/pricing-offer-structured-data.shared';\nexport * from './schemas/design-tokens/website-design-tokens.shared.schemas';\nexport * from './schemas/manifests/website-page-manifest.shared.schemas';\nexport * from './schemas/manifests/website-root-config.shared.schemas';\nexport * from './schemas/blog/blog-post-frontmatter.shared.schemas';\nexport * from './schemas/validators/label-pack.validator';\n\nexport * from './core/contexts/WebsiteRuntimeContext';\nexport * from './core/contexts/useWebsiteRuntime';\nexport * from './core/contexts/WebsitePageContext';\nexport * from './core/contexts/useWebsitePage';\nexport * from './core/contexts/WebsiteSectionContext';\nexport * from './core/contexts/useWebsiteSection';\nexport * from './core/hooks/useWebsiteLabel';\nexport * from './core/hooks/useWebsiteDesignTokens';\nexport * from './core/factories/define-website-section';\nexport * from './core/factories/define-website-page-manifest';\nexport * from './core/layouts/WebsitePageLayout';\nexport * from './core/layouts/WebsiteSection';\n\nexport * from './core/consent/website-consent-storage';\nexport * from './core/consent/WebsiteConsentContext';\nexport * from './core/consent/useWebsiteConsent';\nexport * from './core/consent/WebsiteConsentGate';\nexport * from './core/consent/WebsiteConsentBanner';\n\nexport * from './core/external-providers/provider-component-registry.website';\nexport * from './core/external-providers/useWebsiteProviderComponent';\nexport * from './core/external-providers/WebsiteProviderComponent';\nexport * from './core/external-providers/website-provider-sdk-activations';\n\nexport * from './core/anonymous-session/website-anonymous-session-client';\nexport * from './core/anonymous-session/inbound-contact-form.schema';\nexport * from './core/anonymous-session/InboundContactForm';\nexport * from './core/anonymous-session/website-submission-challenge';\n\nexport * from './components/low-level/WebsiteHeading';\nexport * from './components/low-level/WebsiteText';\nexport * from './components/low-level/WebsiteLink';\nexport * from './components/low-level/WebsiteInternalLink';\nexport * from './core/routing/internal-routing.utils';\nexport * from './components/low-level/WebsiteButton';\nexport * from './components/low-level/WebsiteInternalButton';\nexport * from './components/low-level/WebsiteImage';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlogPost.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"BlogPost.d.ts","sourceRoot":"","sources":["../../../../src/mdx/BlogPost.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGtD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAMvE,OAAO,EAEL,KAAK,uBAAuB,EAC7B,MAAM,wBAAwB,CAAC;AAEhC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4GG;AAEH;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,kBAAkB,EAAE,cAAyD,CAAC;AAE3F,MAAM,WAAW,aAAa;IAC5B;;;;;;;OAOG;IACH,cAAc,EAAE,OAAO,CAAC;IACxB;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;;;;;OASG;IACH,aAAa,CAAC,EAAE,uBAAuB,CAAC;IACxC;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IAC1B,MAAM,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IAC1B;;;;;OAKG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB;AAWD,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,SAAS,CAiFxD;yBAjFe,QAAQ;;;AAoFxB;;;;GAIG;AACH,MAAM,MAAM,qBAAqB,GAAG,uBAAuB,CAAC;AAE5D;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC;AACtD,6DAA6D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blog-post-collection.config.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"blog-post-collection.config.d.ts","sourceRoot":"","sources":["../../../../src/mdx/blog-post-collection.config.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,sDAAsD,CAAC;AAE9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+EG;AAEH;;;;;;GAMG;AACH,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,KAAK;QACxC,WAAW,EAAE,MAAM,OAAO,CAAC;KAC5B,CAAC;CACH;AAED,MAAM,WAAW,oCAAoC;IACnD;;;;;;OAMG;IACH,MAAM,EAAE,oBAAoB,CAAC;CAC9B;AAED,MAAM,WAAW,6BAA6B;IAC5C;;;;;;OAMG;IACH,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,wBAAgB,6BAA6B,CAC3C,IAAI,EAAE,oCAAoC,GACzC,6BAA6B,CAK/B;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,+BAA+B;IAC9C;;;;;OAKG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,wBAAgB,wBAAwB,CACtC,GAAG,EAAE,OAAO,EACZ,GAAG,GAAE,+BAAoC,GACxC,mBAAmB,CAkBrB;AACD,iEAAiE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blog-post-frontmatter-source.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"blog-post-frontmatter-source.d.ts","sourceRoot":"","sources":["../../../../src/mdx/blog-post-frontmatter-source.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,+BAA+B,EACrC,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sDAAsD,CAAC;AAEhG;;;;;;GAMG;AACH,MAAM,MAAM,4CAA4C,GAAG,+BAA+B,CAAC;AAE3F,wBAAgB,qCAAqC,CACnD,MAAM,EAAE,MAAM,EACd,GAAG,GAAE,4CAAiD,GACrD,mBAAmB,CAUrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/mdx/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EACL,QAAQ,EACR,kBAAkB,EAClB,KAAK,aAAa,EAClB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,GAC1B,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,6BAA6B,EAC7B,wBAAwB,EACxB,KAAK,oBAAoB,EACzB,KAAK,oCAAoC,EACzC,KAAK,6BAA6B,EAClC,KAAK,+BAA+B,GACrC,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,kBAAkB,EAClB,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,GAC7B,MAAM,wBAAwB,CAAC"}
|
package/dist/esm/mdx.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mdx.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"mdx.d.ts","sourceRoot":"","sources":["../../../src/mdx.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,cAAc,aAAa,CAAC;AAC5B;;;;;;;;;;;GAWG;AACH,cAAc,0BAA0B,CAAC"}
|
|
@@ -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,CAAC;IACzC,UAAU,EAAE,YAAY,CAAC,kBAAkB,CAAC;IAC5C,UAAU,EAAE,YAAY,CAAC,kBAAkB,CAAC;IAC5C,OAAO,EAAE,YAAY,CAAC,eAAe,CAAC;IACtC,iBAAiB,EAAE,YAAY,CAAC,yBAAyB,CAAC;IAC1D,MAAM,EAAE,YAAY,CAAC,cAAc,CAAC;IACpC,gBAAgB,EAAE,YAAY,CAAC,wBAAwB,CAAC;IACxD,OAAO,EAAE,YAAY,CAAC,eAAe,CAAC;IACtC,iBAAiB,EAAE,YAAY,CAAC,yBAAyB,CAAC;IAC1D,MAAM,EAAE,YAAY,CAAC,cAAc,CAAC;IACpC,KAAK,EAAE,YAAY,CAAC,aAAa,CAAC;IAClC,eAAe,EAAE,YAAY,CAAC,uBAAuB,CAAC;CACvD,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,wBAAwB,GAAqC,yBAAyB,CAAC;AAGpG,+DAA+D;AAE/D;;;;;;;;;;;;;;;GAeG;AACH,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,IAAI,EAAE,YAAY,CAAC,aAAa,CAAC;IACjC,EAAE,EAAE,YAAY,CAAC,WAAW,CAAC;IAC7B,EAAE,EAAE,YAAY,CAAC,WAAW,CAAC;IAC7B,EAAE,EAAE,YAAY,CAAC,WAAW,CAAC;IAC7B,EAAE,EAAE,YAAY,CAAC,WAAW,CAAC;IAC7B,IAAI,EAAE,YAAY,CAAC,aAAa,CAAC;CAClC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,yBAAyB,GAAsC,0BAA0B,CAAC;AAGvG,+DAA+D;AAE/D;;;;;;;;;;GAUG;AACH,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,MAAM,EAAE,yBAAyB;IACjC,KAAK,EAAE,0BAA0B;CAClC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,yBAAyB,GAAsC,0BAA0B,CAAC;AAGvG,+DAA+D","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-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,OAAO,EAAE,YAAY,CAAC,eAAe,CAAC;IACtC,iBAAiB,EAAE,YAAY,CAAC,yBAAyB,CAAC;IAC1D,MAAM,EAAE,YAAY,CAAC,cAAc,CAAC;IACpC,gBAAgB,EAAE,YAAY,CAAC,wBAAwB,CAAC;IACxD,OAAO,EAAE,YAAY,CAAC,eAAe,CAAC;IACtC,iBAAiB,EAAE,YAAY,CAAC,yBAAyB,CAAC;IAC1D,MAAM,EAAE,YAAY,CAAC,cAAc,CAAC;IACpC,KAAK,EAAE,YAAY,CAAC,aAAa,CAAC;IAClC,eAAe,EAAE,YAAY,CAAC,uBAAuB,CAAC;CACvD,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,wBAAwB,GAAqC,yBAAyB,CAAC;AAGpG,+DAA+D;AAE/D;;;;;;;;;;;;;;;GAeG;AACH,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,IAAI,EAAE,YAAY,CAAC,aAAa,CAAC;IACjC,EAAE,EAAE,YAAY,CAAC,WAAW,CAAC;IAC7B,EAAE,EAAE,YAAY,CAAC,WAAW,CAAC;IAC7B,EAAE,EAAE,YAAY,CAAC,WAAW,CAAC;IAC7B,EAAE,EAAE,YAAY,CAAC,WAAW,CAAC;IAC7B,IAAI,EAAE,YAAY,CAAC,aAAa,CAAC;CAClC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,yBAAyB,GAAsC,0BAA0B,CAAC;AAGvG,+DAA+D;AAE/D;;;;;;;;;;GAUG;AACH,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,MAAM,EAAE,yBAAyB;IACjC,KAAK,EAAE,0BAA0B;CAClC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,yBAAyB,GAAsC,0BAA0B,CAAC;AAGvG,+DAA+D;AAE/D;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,6BAA6B,CAAC,KAAa,EAAE,KAAa;IACxE,OAAO,aAAa,KAAK,IAAI,KAAK,EAAE,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"]}
|