@wildo-ai/saas-website 1.1.5 → 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.
Files changed (182) hide show
  1. package/dist/esm/astro/blog-post-bridge.d.ts +9 -0
  2. package/dist/esm/astro/blog-post-bridge.d.ts.map +1 -1
  3. package/dist/esm/astro/blog-post-bridge.js +10 -5
  4. package/dist/esm/astro/blog-post-bridge.js.map +1 -1
  5. package/dist/esm/astro/bridge-runtime.d.ts +25 -6
  6. package/dist/esm/astro/bridge-runtime.d.ts.map +1 -1
  7. package/dist/esm/astro/bridge-runtime.js +10 -6
  8. package/dist/esm/astro/bridge-runtime.js.map +1 -1
  9. package/dist/esm/astro/label-pack-loader.d.ts +4 -4
  10. package/dist/esm/astro/label-pack-loader.d.ts.map +1 -1
  11. package/dist/esm/astro/label-pack-loader.js +9 -4
  12. package/dist/esm/astro/label-pack-loader.js.map +1 -1
  13. package/dist/esm/astro/robots-renderer.d.ts +9 -8
  14. package/dist/esm/astro/robots-renderer.d.ts.map +1 -1
  15. package/dist/esm/astro/robots-renderer.js +15 -15
  16. package/dist/esm/astro/robots-renderer.js.map +1 -1
  17. package/dist/esm/astro/website-page-head.renderer.d.ts +1 -1
  18. package/dist/esm/astro/website-page-head.renderer.d.ts.map +1 -1
  19. package/dist/esm/astro/website-page-head.renderer.js +2 -1
  20. package/dist/esm/astro/website-page-head.renderer.js.map +1 -1
  21. package/dist/esm/astro/website-site-context.d.ts +5 -2
  22. package/dist/esm/astro/website-site-context.d.ts.map +1 -1
  23. package/dist/esm/astro/website-site-context.js.map +1 -1
  24. package/dist/esm/companion-exports.d.ts +8 -15
  25. package/dist/esm/companion-exports.d.ts.map +1 -1
  26. package/dist/esm/companion-exports.js +8 -15
  27. package/dist/esm/companion-exports.js.map +1 -1
  28. package/dist/esm/config/define-website-config.d.ts +3 -2
  29. package/dist/esm/config/define-website-config.d.ts.map +1 -1
  30. package/dist/esm/config/define-website-config.js +10 -10
  31. package/dist/esm/config/define-website-config.js.map +1 -1
  32. package/dist/esm/config/load-website-config.d.ts +6 -0
  33. package/dist/esm/config/load-website-config.d.ts.map +1 -1
  34. package/dist/esm/config/load-website-config.js +18 -9
  35. package/dist/esm/config/load-website-config.js.map +1 -1
  36. package/dist/esm/config/load-website-pricing-catalog.d.ts +13 -0
  37. package/dist/esm/config/load-website-pricing-catalog.d.ts.map +1 -0
  38. package/dist/esm/config/load-website-pricing-catalog.js +34 -0
  39. package/dist/esm/config/load-website-pricing-catalog.js.map +1 -0
  40. package/dist/esm/config/load-website-site-context.d.ts +53 -0
  41. package/dist/esm/config/load-website-site-context.d.ts.map +1 -0
  42. package/dist/esm/config/load-website-site-context.js +98 -0
  43. package/dist/esm/config/load-website-site-context.js.map +1 -0
  44. package/dist/esm/config-loader.d.ts +2 -0
  45. package/dist/esm/config-loader.d.ts.map +1 -1
  46. package/dist/esm/config-loader.js +2 -0
  47. package/dist/esm/config-loader.js.map +1 -1
  48. package/dist/esm/core/anonymous-session/InboundContactForm.d.ts +26 -6
  49. package/dist/esm/core/anonymous-session/InboundContactForm.d.ts.map +1 -1
  50. package/dist/esm/core/anonymous-session/InboundContactForm.js +51 -33
  51. package/dist/esm/core/anonymous-session/InboundContactForm.js.map +1 -1
  52. package/dist/esm/core/anonymous-session/inbound-contact-form.schema.d.ts +11 -0
  53. package/dist/esm/core/anonymous-session/inbound-contact-form.schema.d.ts.map +1 -1
  54. package/dist/esm/core/anonymous-session/inbound-contact-form.schema.js +15 -4
  55. package/dist/esm/core/anonymous-session/inbound-contact-form.schema.js.map +1 -1
  56. package/dist/esm/core/anonymous-session/website-anonymous-session-client.d.ts +14 -2
  57. package/dist/esm/core/anonymous-session/website-anonymous-session-client.d.ts.map +1 -1
  58. package/dist/esm/core/anonymous-session/website-anonymous-session-client.js +34 -4
  59. package/dist/esm/core/anonymous-session/website-anonymous-session-client.js.map +1 -1
  60. package/dist/esm/core/anonymous-session/website-submission-challenge.d.ts +36 -0
  61. package/dist/esm/core/anonymous-session/website-submission-challenge.d.ts.map +1 -0
  62. package/dist/esm/core/anonymous-session/website-submission-challenge.js +69 -0
  63. package/dist/esm/core/anonymous-session/website-submission-challenge.js.map +1 -0
  64. package/dist/esm/core/consent/WebsiteConsentBanner.d.ts.map +1 -1
  65. package/dist/esm/core/consent/WebsiteConsentBanner.js +11 -10
  66. package/dist/esm/core/consent/WebsiteConsentBanner.js.map +1 -1
  67. package/dist/esm/core/contexts/WebsiteRuntimeContext.d.ts +25 -5
  68. package/dist/esm/core/contexts/WebsiteRuntimeContext.d.ts.map +1 -1
  69. package/dist/esm/core/contexts/WebsiteRuntimeContext.js.map +1 -1
  70. package/dist/esm/core/contexts/useWebsiteRuntime.d.ts +18 -0
  71. package/dist/esm/core/contexts/useWebsiteRuntime.d.ts.map +1 -1
  72. package/dist/esm/core/contexts/useWebsiteRuntime.js +28 -2
  73. package/dist/esm/core/contexts/useWebsiteRuntime.js.map +1 -1
  74. package/dist/esm/core/external-providers/WebsiteProviderComponent.d.ts +57 -0
  75. package/dist/esm/core/external-providers/WebsiteProviderComponent.d.ts.map +1 -0
  76. package/dist/esm/core/external-providers/WebsiteProviderComponent.js +56 -0
  77. package/dist/esm/core/external-providers/WebsiteProviderComponent.js.map +1 -0
  78. package/dist/esm/core/external-providers/provider-component-registry.website.d.ts +63 -0
  79. package/dist/esm/core/external-providers/provider-component-registry.website.d.ts.map +1 -0
  80. package/dist/esm/core/external-providers/provider-component-registry.website.js +68 -0
  81. package/dist/esm/core/external-providers/provider-component-registry.website.js.map +1 -0
  82. package/dist/esm/core/external-providers/useWebsiteProviderComponent.d.ts +36 -0
  83. package/dist/esm/core/external-providers/useWebsiteProviderComponent.d.ts.map +1 -0
  84. package/dist/esm/core/external-providers/useWebsiteProviderComponent.js +59 -0
  85. package/dist/esm/core/external-providers/useWebsiteProviderComponent.js.map +1 -0
  86. package/dist/esm/core/external-providers/useWebsiteProviderScripts.d.ts +15 -5
  87. package/dist/esm/core/external-providers/useWebsiteProviderScripts.d.ts.map +1 -1
  88. package/dist/esm/core/external-providers/useWebsiteProviderScripts.js +39 -24
  89. package/dist/esm/core/external-providers/useWebsiteProviderScripts.js.map +1 -1
  90. package/dist/esm/core/external-providers/website-provider-sdk-activations.d.ts +11 -0
  91. package/dist/esm/core/external-providers/website-provider-sdk-activations.d.ts.map +1 -0
  92. package/dist/esm/core/external-providers/website-provider-sdk-activations.js +14 -0
  93. package/dist/esm/core/external-providers/website-provider-sdk-activations.js.map +1 -0
  94. package/dist/esm/core/factories/define-website-section.d.ts +3 -3
  95. package/dist/esm/core/factories/define-website-section.js +3 -3
  96. package/dist/esm/core/factories/define-website-section.js.map +1 -1
  97. package/dist/esm/core/layouts/WebsitePageLayout.d.ts.map +1 -1
  98. package/dist/esm/core/layouts/WebsitePageLayout.js +10 -7
  99. package/dist/esm/core/layouts/WebsitePageLayout.js.map +1 -1
  100. package/dist/esm/index.d.ts +30 -65
  101. package/dist/esm/index.d.ts.map +1 -1
  102. package/dist/esm/index.js +30 -65
  103. package/dist/esm/index.js.map +1 -1
  104. package/dist/esm/schemas/design-tokens/website-design-tokens.shared.schemas.d.ts +35 -6
  105. package/dist/esm/schemas/design-tokens/website-design-tokens.shared.schemas.d.ts.map +1 -1
  106. package/dist/esm/schemas/design-tokens/website-design-tokens.shared.schemas.js +39 -5
  107. package/dist/esm/schemas/design-tokens/website-design-tokens.shared.schemas.js.map +1 -1
  108. package/dist/esm/schemas/label-keys/website-provider-component-label-keys.schemas.d.ts +32 -0
  109. package/dist/esm/schemas/label-keys/website-provider-component-label-keys.schemas.d.ts.map +1 -0
  110. package/dist/esm/schemas/label-keys/website-provider-component-label-keys.schemas.js +36 -0
  111. package/dist/esm/schemas/label-keys/website-provider-component-label-keys.schemas.js.map +1 -0
  112. package/dist/esm/schemas/manifests/website-root-config.shared.schemas.d.ts +6 -5
  113. package/dist/esm/schemas/manifests/website-root-config.shared.schemas.d.ts.map +1 -1
  114. package/dist/esm/schemas/manifests/website-root-config.shared.schemas.js +8 -7
  115. package/dist/esm/schemas/manifests/website-root-config.shared.schemas.js.map +1 -1
  116. package/dist/esm/schemas/sections/website-section-definition.shared.schemas.d.ts +14 -7
  117. package/dist/esm/schemas/sections/website-section-definition.shared.schemas.d.ts.map +1 -1
  118. package/dist/esm/schemas/sections/website-section-definition.shared.schemas.js +14 -7
  119. package/dist/esm/schemas/sections/website-section-definition.shared.schemas.js.map +1 -1
  120. package/dist/esm/schemas/structured-data/pricing-offer-structured-data.shared.d.ts +57 -0
  121. package/dist/esm/schemas/structured-data/pricing-offer-structured-data.shared.d.ts.map +1 -0
  122. package/dist/esm/schemas/structured-data/pricing-offer-structured-data.shared.js +76 -0
  123. package/dist/esm/schemas/structured-data/pricing-offer-structured-data.shared.js.map +1 -0
  124. package/dist/esm/schemas/structured-data/structured-data-reconciliation.shared.d.ts +23 -0
  125. package/dist/esm/schemas/structured-data/structured-data-reconciliation.shared.d.ts.map +1 -1
  126. package/dist/esm/schemas/structured-data/structured-data-reconciliation.shared.js +20 -2
  127. package/dist/esm/schemas/structured-data/structured-data-reconciliation.shared.js.map +1 -1
  128. package/dist/esm/schemas/structured-data/website-structured-data.shared.schemas.d.ts +7 -5
  129. package/dist/esm/schemas/structured-data/website-structured-data.shared.schemas.d.ts.map +1 -1
  130. package/dist/esm/schemas/structured-data/website-structured-data.shared.schemas.js.map +1 -1
  131. package/dist/tsconfig.build.tsbuildinfo +1 -1
  132. package/package.json +5 -5
  133. package/src/__tests__/bundle-isolation.test.ts +19 -22
  134. package/src/astro/__tests__/blog-post-bridge.test.tsx +18 -2
  135. package/src/astro/__tests__/bridge-runtime.test.tsx +21 -3
  136. package/src/astro/__tests__/label-pack-loader.test.ts +7 -4
  137. package/src/astro/blog-post-bridge.tsx +19 -5
  138. package/src/astro/bridge-runtime.tsx +35 -11
  139. package/src/astro/label-pack-loader.ts +8 -4
  140. package/src/astro/robots-renderer.ts +15 -15
  141. package/src/astro/website-page-head.renderer.ts +2 -2
  142. package/src/astro/website-site-context.ts +5 -2
  143. package/src/companion-exports.ts +8 -15
  144. package/src/config/__tests__/website-build-origins.test.ts +52 -0
  145. package/src/config/define-website-config.ts +10 -10
  146. package/src/config/load-website-config.ts +25 -14
  147. package/src/config/load-website-pricing-catalog.ts +52 -0
  148. package/src/config/load-website-site-context.ts +145 -0
  149. package/src/config-loader.ts +2 -0
  150. package/src/core/__tests__/contexts.test.tsx +20 -1
  151. package/src/core/__tests__/website-consent.test.tsx +2 -1
  152. package/src/core/anonymous-session/InboundContactForm.tsx +100 -45
  153. package/src/core/anonymous-session/__tests__/InboundContactForm.labels.test.tsx +108 -0
  154. package/src/core/anonymous-session/__tests__/InboundContactForm.submission-challenge.test.tsx +139 -0
  155. package/src/core/anonymous-session/inbound-contact-form.schema.ts +16 -4
  156. package/src/core/anonymous-session/website-anonymous-session-client.ts +39 -4
  157. package/src/core/anonymous-session/website-submission-challenge.ts +99 -0
  158. package/src/core/consent/WebsiteConsentBanner.tsx +11 -10
  159. package/src/core/contexts/WebsiteRuntimeContext.tsx +25 -5
  160. package/src/core/contexts/useWebsiteRuntime.ts +33 -2
  161. package/src/core/external-providers/WebsiteProviderComponent.tsx +153 -0
  162. package/src/core/external-providers/__tests__/frontend-provider-registry.website.test.ts +4 -0
  163. package/src/core/external-providers/__tests__/website-provider-component.test.tsx +238 -0
  164. package/src/core/external-providers/__tests__/website-provider-sdks.test.tsx +72 -0
  165. package/src/core/external-providers/provider-component-registry.website.ts +115 -0
  166. package/src/core/external-providers/useWebsiteProviderComponent.ts +76 -0
  167. package/src/core/external-providers/useWebsiteProviderScripts.ts +56 -37
  168. package/src/core/external-providers/website-provider-sdk-activations.ts +23 -0
  169. package/src/core/factories/define-website-section.ts +3 -3
  170. package/src/core/layouts/WebsitePageLayout.tsx +11 -6
  171. package/src/index.ts +31 -65
  172. package/src/schemas/__tests__/design-token-css-property.test.ts +72 -0
  173. package/src/schemas/__tests__/pricing-offer-structured-data.test.ts +122 -0
  174. package/src/schemas/__tests__/structured-data-reconciliation.test.ts +35 -0
  175. package/src/schemas/design-tokens/website-design-tokens.shared.schemas.ts +45 -5
  176. package/src/schemas/label-keys/__tests__/scaffolded-consent-label-pack.parity.test.ts +12 -0
  177. package/src/schemas/label-keys/website-provider-component-label-keys.schemas.ts +40 -0
  178. package/src/schemas/manifests/website-root-config.shared.schemas.ts +10 -9
  179. package/src/schemas/sections/website-section-definition.shared.schemas.ts +14 -7
  180. package/src/schemas/structured-data/pricing-offer-structured-data.shared.ts +144 -0
  181. package/src/schemas/structured-data/structured-data-reconciliation.shared.ts +46 -1
  182. package/src/schemas/structured-data/website-structured-data.shared.schemas.ts +7 -5
@@ -11,75 +11,33 @@
11
11
  * accompanying SKILLs in `framework-knowledge`.
12
12
  *
13
13
  * @wildo-boundary
14
- * - This barrel MAY re-export from any subdirectory of `src/`.
15
- * - Subdirectories MUST observe their own boundary contracts (see
16
- * each subdirectory's own `index.ts` `@wildo-boundary` block):
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
- * - `seo/` : NO React, NO Astro
19
- * - `core/` : MAY use React; NO `~wildo-frontend-lib/**` (Q17=B)
20
- * - `astro/` : MAY use Astro; NO React component runtime imports
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, all `core/`/`schemas/`/`integration/`
45
- * files): the entire saas-website source tree ships into a browser bundle
46
- * (Astro SSG + React islands). Every shared model atom MUST come from a
47
- * side-effect-free `/public-runtime` subpath:
48
- * - `@wildo-ai/saas-models/public-runtime` is the primary door
49
- * (saas-models-public-runtime.md K-6 — consumers see one path).
50
- * - `@wildo-ai/presets-components-models/public-runtime` is the
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 barrel of `@wildo-ai/saas-models` is forbidden everywhere in
67
- * this package — it calls `initZodDecorators()` at module load and pulls
68
- * `@wildo-ai/external-connectors-models` + the full schema graph into
69
- * the bundle. Same forbid applies to the root barrel of
70
- * `@wildo-ai/presets-components-models`, the saas-app DI runtime
71
- * (`inversify`, `@wildo-ai/saas-frontend-lib`, `@wildo-ai/saas-backend-lib`),
72
- * and pure-backend libs (`mongoose`, `express`, `pino`, `helmet`,
73
- * `argon2`, `bcrypt`). Enforced by `src/__tests__/bundle-isolation.test.ts`.
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
@@ -95,10 +53,12 @@ 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';
97
55
  export * from './schemas/label-keys/website-consent-label-keys.schemas';
56
+ export * from './schemas/label-keys/website-provider-component-label-keys.schemas';
98
57
  export * from './schemas/sections/website-section-category.shared';
99
58
  export * from './schemas/sections/website-section-definition.shared.schemas';
100
59
  export * from './schemas/structured-data/website-structured-data.shared.schemas';
101
60
  export * from './schemas/structured-data/structured-data-reconciliation.shared';
61
+ export * from './schemas/structured-data/pricing-offer-structured-data.shared';
102
62
  export * from './schemas/design-tokens/website-design-tokens.shared.schemas';
103
63
  export * from './schemas/manifests/website-page-manifest.shared.schemas';
104
64
  export * from './schemas/manifests/website-root-config.shared.schemas';
@@ -121,9 +81,14 @@ export * from './core/consent/WebsiteConsentContext';
121
81
  export * from './core/consent/useWebsiteConsent';
122
82
  export * from './core/consent/WebsiteConsentGate';
123
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';
124
88
  export * from './core/anonymous-session/website-anonymous-session-client';
125
89
  export * from './core/anonymous-session/inbound-contact-form.schema';
126
90
  export * from './core/anonymous-session/InboundContactForm';
91
+ export * from './core/anonymous-session/website-submission-challenge';
127
92
  export * from './components/low-level/WebsiteHeading';
128
93
  export * from './components/low-level/WebsiteText';
129
94
  export * from './components/low-level/WebsiteLink';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4FG;AAEH,cA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,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
- * - This barrel MAY re-export from any subdirectory of `src/`.
15
- * - Subdirectories MUST observe their own boundary contracts (see
16
- * each subdirectory's own `index.ts` `@wildo-boundary` block):
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
- * - `seo/` : NO React, NO Astro
19
- * - `core/` : MAY use React; NO `~wildo-frontend-lib/**` (Q17=B)
20
- * - `astro/` : MAY use Astro; NO React component runtime imports
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, all `core/`/`schemas/`/`integration/`
45
- * files): the entire saas-website source tree ships into a browser bundle
46
- * (Astro SSG + React islands). Every shared model atom MUST come from a
47
- * side-effect-free `/public-runtime` subpath:
48
- * - `@wildo-ai/saas-models/public-runtime` is the primary door
49
- * (saas-models-public-runtime.md K-6 — consumers see one path).
50
- * - `@wildo-ai/presets-components-models/public-runtime` is the
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 barrel of `@wildo-ai/saas-models` is forbidden everywhere in
67
- * this package — it calls `initZodDecorators()` at module load and pulls
68
- * `@wildo-ai/external-connectors-models` + the full schema graph into
69
- * the bundle. Same forbid applies to the root barrel of
70
- * `@wildo-ai/presets-components-models`, the saas-app DI runtime
71
- * (`inversify`, `@wildo-ai/saas-frontend-lib`, `@wildo-ai/saas-backend-lib`),
72
- * and pure-backend libs (`mongoose`, `express`, `pino`, `helmet`,
73
- * `argon2`, `bcrypt`). Enforced by `src/__tests__/bundle-isolation.test.ts`.
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
@@ -95,10 +53,12 @@ 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';
97
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';
98
57
  export * from './schemas/sections/website-section-category.shared.js';
99
58
  export * from './schemas/sections/website-section-definition.shared.schemas.js';
100
59
  export * from './schemas/structured-data/website-structured-data.shared.schemas.js';
101
60
  export * from './schemas/structured-data/structured-data-reconciliation.shared.js';
61
+ export * from './schemas/structured-data/pricing-offer-structured-data.shared.js';
102
62
  export * from './schemas/design-tokens/website-design-tokens.shared.schemas.js';
103
63
  export * from './schemas/manifests/website-page-manifest.shared.schemas.js';
104
64
  export * from './schemas/manifests/website-root-config.shared.schemas.js';
@@ -121,9 +81,14 @@ export * from './core/consent/WebsiteConsentContext.js';
121
81
  export * from './core/consent/useWebsiteConsent.js';
122
82
  export * from './core/consent/WebsiteConsentGate.js';
123
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';
124
88
  export * from './core/anonymous-session/website-anonymous-session-client.js';
125
89
  export * from './core/anonymous-session/inbound-contact-form.schema.js';
126
90
  export * from './core/anonymous-session/InboundContactForm.js';
91
+ export * from './core/anonymous-session/website-submission-challenge.js';
127
92
  export * from './components/low-level/WebsiteHeading.js';
128
93
  export * from './components/low-level/WebsiteText.js';
129
94
  export * from './components/low-level/WebsiteLink.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4FG;AAEH,cAAc,iCAAiC,CAAC;AAChD,cAAc,oCAAoC,CAAC;AACnD,cAAc,gDAAgD,CAAC;AAC/D,cAAc,yDAAyD,CAAC;AACxE,cAAc,oDAAoD,CAAC;AACnE,cAAc,8DAA8D,CAAC;AAC7E,cAAc,kEAAkE,CAAC;AACjF,cAAc,iEAAiE,CAAC;AAChF,cAAc,8DAA8D,CAAC;AAC7E,cAAc,0DAA0D,CAAC;AACzE,cAAc,wDAAwD,CAAC;AACvE,cAAc,qDAAqD,CAAC;AACpE,cAAc,2CAA2C,CAAC;AAE1D,cAAc,uCAAuC,CAAC;AACtD,cAAc,mCAAmC,CAAC;AAClD,cAAc,oCAAoC,CAAC;AACnD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,uCAAuC,CAAC;AACtD,cAAc,mCAAmC,CAAC;AAClD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qCAAqC,CAAC;AACpD,cAAc,yCAAyC,CAAC;AACxD,cAAc,+CAA+C,CAAC;AAC9D,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,2DAA2D,CAAC;AAC1E,cAAc,sDAAsD,CAAC;AACrE,cAAc,6CAA6C,CAAC;AAE5D,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 MAY re-export from any subdirectory of `src/`.\n * - Subdirectories MUST observe their own boundary contracts (see\n * each subdirectory's own `index.ts` `@wildo-boundary` block):\n * - `schemas/` : NO React, NO Astro, NO `~wildo-frontend-lib/**`\n * - `seo/` : NO React, NO Astro\n * - `core/` : MAY use React; NO `~wildo-frontend-lib/**` (Q17=B)\n * - `astro/` : MAY use Astro; NO React component runtime imports\n * - `mdx/` : MAY use `@mdx-js/*`\n * - `integration/` : MAY use React; MAY import the\n * `@wildo-ai/saas-models/public-runtime` SUBPATH,\n * the `@wildo-ai/presets-components-models/public-runtime`\n * SUBPATH, `@wildo-ai/zod-decorators`,\n * plus the SSR / Astro-middleware tier\n * (`axios`, `jsonwebtoken`, `socket.io-client`,\n * `reflect-metadata`) — D12 revised\n * 2026-04-19 (second same-day loosening);\n * the ROOT barrels of `@wildo-ai/saas-models`\n * and `@wildo-ai/presets-components-models`\n * are FORBIDDEN (they boot the decorator\n * framework / pull the heavy registry);\n * the saas-app DI / backend stack\n * (`inversify`, `mongoose`, `express`,\n * `pino`, `helmet`, `argon2`, `bcrypt`,\n * the `@wildo-ai/saas-frontend-lib` /\n * `@wildo-ai/saas-backend-lib` /\n * `@wildo-ai/external-connectors-models`\n * root + subpath surfaces) is FORBIDDEN;\n * MUST NOT import `~wildo-frontend-lib/**`\n * (Q17=B / D16)\n *\n * D12 (client-bundle import discipline, all `core/`/`schemas/`/`integration/`\n * files): the entire saas-website source tree ships into a browser bundle\n * (Astro SSG + React islands). Every shared model atom MUST come from a\n * side-effect-free `/public-runtime` subpath:\n * - `@wildo-ai/saas-models/public-runtime` is the primary door\n * (saas-models-public-runtime.md K-6 — consumers see one path).\n * - `@wildo-ai/presets-components-models/public-runtime` is the\n * internal seam for symbols not (yet) re-exported by saas-models.\n * - `@wildo-ai/zod-decorators` is allowed to import (first revision\n * 2026-04-19). The package itself is side-effect-free; only an\n * explicit `initZodDecorators()` call mutates `z.ZodType.prototype`,\n * which neither saas-website nor the saas-models /public-runtime\n * barrel does.\n * - `axios`, `jsonwebtoken`, `socket.io-client`, `reflect-metadata` are\n * allowed for SSR / Astro-middleware code paths (second same-day\n * revision 2026-04-19). The website engine needs them to provide\n * middleware utilities (HTTP proxying to the SaaS backend, JWT\n * verification of cross-frontend handoff codes, real-time push,\n * decorator-metadata reads). They are SSR-tier — discipline\n * (and a future strict/loose entry split for React islands vs\n * middleware) keeps them out of the React-island bundle.\n *\n * The ROOT barrel of `@wildo-ai/saas-models` is forbidden everywhere in\n * this package — it calls `initZodDecorators()` at module load and pulls\n * `@wildo-ai/external-connectors-models` + the full schema graph into\n * the bundle. Same forbid applies to the root barrel of\n * `@wildo-ai/presets-components-models`, the saas-app DI runtime\n * (`inversify`, `@wildo-ai/saas-frontend-lib`, `@wildo-ai/saas-backend-lib`),\n * and pure-backend libs (`mongoose`, `express`, `pino`, `helmet`,\n * `argon2`, `bcrypt`). Enforced by `src/__tests__/bundle-isolation.test.ts`.\n *\n * These boundaries are enforced by review + the bundle-isolation test\n * above until Phase 8 promotes them to a programmatic ESLint check\n * (cf. `saas-website-slice.md`\n * §\"DEFERRED to Phase 8 — boundary lint mechanism design\").\n *\n * Phase 1+2 status: schemas + runtime contexts/hooks + layout\n * primitives + L1 placeholders + factories are all exported. Phase 5\n * adds the Astro adapter; Phase 5.7 the `integration/` layer.\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/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/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/anonymous-session/website-anonymous-session-client';\nexport * from './core/anonymous-session/inbound-contact-form.schema';\nexport * from './core/anonymous-session/InboundContactForm';\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
+ {"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,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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"]}
@@ -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-color-<token>`) on the
7
- * `<WebsitePageLayout>` root.
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, and update the matching
37
- * CSS-emit helper in Phase 2 (`emitWebsiteColorTokensCss`).
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-radius-<token>` CSS variables.
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":["../../../../../src/schemas/design-tokens/website-design-tokens.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA4DxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;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"}
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-color-<token>`) on the
62
- * `<WebsitePageLayout>` root.
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, and update the matching
92
- * CSS-emit helper in Phase 2 (`emitWebsiteColorTokensCss`).
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-radius-<token>` CSS variables.
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,GAA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GvG,+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,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K,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"]}
@@ -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"]}