@wildo-ai/saas-website 1.1.1

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 (383) hide show
  1. package/LICENSE +34 -0
  2. package/dist/esm/.builder.pid +9 -0
  3. package/dist/esm/astro/blog-post-bridge.d.ts +324 -0
  4. package/dist/esm/astro/blog-post-bridge.d.ts.map +1 -0
  5. package/dist/esm/astro/blog-post-bridge.js +57 -0
  6. package/dist/esm/astro/blog-post-bridge.js.map +1 -0
  7. package/dist/esm/astro/blog-post-head.renderer.d.ts +129 -0
  8. package/dist/esm/astro/blog-post-head.renderer.d.ts.map +1 -0
  9. package/dist/esm/astro/blog-post-head.renderer.js +139 -0
  10. package/dist/esm/astro/blog-post-head.renderer.js.map +1 -0
  11. package/dist/esm/astro/bridge-runtime.d.ts +224 -0
  12. package/dist/esm/astro/bridge-runtime.d.ts.map +1 -0
  13. package/dist/esm/astro/bridge-runtime.js +30 -0
  14. package/dist/esm/astro/bridge-runtime.js.map +1 -0
  15. package/dist/esm/astro/collect-expected-label-keys.d.ts +65 -0
  16. package/dist/esm/astro/collect-expected-label-keys.d.ts.map +1 -0
  17. package/dist/esm/astro/collect-expected-label-keys.js +101 -0
  18. package/dist/esm/astro/collect-expected-label-keys.js.map +1 -0
  19. package/dist/esm/astro/headers-renderer.d.ts +32 -0
  20. package/dist/esm/astro/headers-renderer.d.ts.map +1 -0
  21. package/dist/esm/astro/headers-renderer.js +64 -0
  22. package/dist/esm/astro/headers-renderer.js.map +1 -0
  23. package/dist/esm/astro/i18n-routing.helper.d.ts +91 -0
  24. package/dist/esm/astro/i18n-routing.helper.d.ts.map +1 -0
  25. package/dist/esm/astro/i18n-routing.helper.js +23 -0
  26. package/dist/esm/astro/i18n-routing.helper.js.map +1 -0
  27. package/dist/esm/astro/internal/html-escape.d.ts +31 -0
  28. package/dist/esm/astro/internal/html-escape.d.ts.map +1 -0
  29. package/dist/esm/astro/internal/html-escape.js +40 -0
  30. package/dist/esm/astro/internal/html-escape.js.map +1 -0
  31. package/dist/esm/astro/label-pack-loader.d.ts +134 -0
  32. package/dist/esm/astro/label-pack-loader.d.ts.map +1 -0
  33. package/dist/esm/astro/label-pack-loader.js +298 -0
  34. package/dist/esm/astro/label-pack-loader.js.map +1 -0
  35. package/dist/esm/astro/llms-txt-server.d.ts +28 -0
  36. package/dist/esm/astro/llms-txt-server.d.ts.map +1 -0
  37. package/dist/esm/astro/llms-txt-server.js +33 -0
  38. package/dist/esm/astro/llms-txt-server.js.map +1 -0
  39. package/dist/esm/astro/pick-labels-for-page.d.ts +63 -0
  40. package/dist/esm/astro/pick-labels-for-page.d.ts.map +1 -0
  41. package/dist/esm/astro/pick-labels-for-page.js +73 -0
  42. package/dist/esm/astro/pick-labels-for-page.js.map +1 -0
  43. package/dist/esm/astro/robots-renderer.d.ts +85 -0
  44. package/dist/esm/astro/robots-renderer.d.ts.map +1 -0
  45. package/dist/esm/astro/robots-renderer.js +157 -0
  46. package/dist/esm/astro/robots-renderer.js.map +1 -0
  47. package/dist/esm/astro/sitemap-coverage.d.ts +101 -0
  48. package/dist/esm/astro/sitemap-coverage.d.ts.map +1 -0
  49. package/dist/esm/astro/sitemap-coverage.js +67 -0
  50. package/dist/esm/astro/sitemap-coverage.js.map +1 -0
  51. package/dist/esm/astro/structured-data.renderer.d.ts +21 -0
  52. package/dist/esm/astro/structured-data.renderer.d.ts.map +1 -0
  53. package/dist/esm/astro/structured-data.renderer.js +142 -0
  54. package/dist/esm/astro/structured-data.renderer.js.map +1 -0
  55. package/dist/esm/astro/website-page-head.renderer.d.ts +93 -0
  56. package/dist/esm/astro/website-page-head.renderer.d.ts.map +1 -0
  57. package/dist/esm/astro/website-page-head.renderer.js +184 -0
  58. package/dist/esm/astro/website-page-head.renderer.js.map +1 -0
  59. package/dist/esm/astro/website-page-runtime.helper.d.ts +112 -0
  60. package/dist/esm/astro/website-page-runtime.helper.d.ts.map +1 -0
  61. package/dist/esm/astro/website-page-runtime.helper.js +60 -0
  62. package/dist/esm/astro/website-page-runtime.helper.js.map +1 -0
  63. package/dist/esm/astro/website-site-context.d.ts +126 -0
  64. package/dist/esm/astro/website-site-context.d.ts.map +1 -0
  65. package/dist/esm/astro/website-site-context.js +37 -0
  66. package/dist/esm/astro/website-site-context.js.map +1 -0
  67. package/dist/esm/astro-island.d.ts +56 -0
  68. package/dist/esm/astro-island.d.ts.map +1 -0
  69. package/dist/esm/astro-island.js +61 -0
  70. package/dist/esm/astro-island.js.map +1 -0
  71. package/dist/esm/astro.d.ts +151 -0
  72. package/dist/esm/astro.d.ts.map +1 -0
  73. package/dist/esm/astro.js +151 -0
  74. package/dist/esm/astro.js.map +1 -0
  75. package/dist/esm/companion-exports.d.ts +38 -0
  76. package/dist/esm/companion-exports.d.ts.map +1 -0
  77. package/dist/esm/companion-exports.js +38 -0
  78. package/dist/esm/companion-exports.js.map +1 -0
  79. package/dist/esm/components/low-level/WebsiteButton.d.ts +73 -0
  80. package/dist/esm/components/low-level/WebsiteButton.d.ts.map +1 -0
  81. package/dist/esm/components/low-level/WebsiteButton.js +68 -0
  82. package/dist/esm/components/low-level/WebsiteButton.js.map +1 -0
  83. package/dist/esm/components/low-level/WebsiteHeading.d.ts +78 -0
  84. package/dist/esm/components/low-level/WebsiteHeading.d.ts.map +1 -0
  85. package/dist/esm/components/low-level/WebsiteHeading.js +41 -0
  86. package/dist/esm/components/low-level/WebsiteHeading.js.map +1 -0
  87. package/dist/esm/components/low-level/WebsiteImage.d.ts +73 -0
  88. package/dist/esm/components/low-level/WebsiteImage.d.ts.map +1 -0
  89. package/dist/esm/components/low-level/WebsiteImage.js +21 -0
  90. package/dist/esm/components/low-level/WebsiteImage.js.map +1 -0
  91. package/dist/esm/components/low-level/WebsiteInternalButton.d.ts +90 -0
  92. package/dist/esm/components/low-level/WebsiteInternalButton.d.ts.map +1 -0
  93. package/dist/esm/components/low-level/WebsiteInternalButton.js +47 -0
  94. package/dist/esm/components/low-level/WebsiteInternalButton.js.map +1 -0
  95. package/dist/esm/components/low-level/WebsiteInternalLink.d.ts +99 -0
  96. package/dist/esm/components/low-level/WebsiteInternalLink.d.ts.map +1 -0
  97. package/dist/esm/components/low-level/WebsiteInternalLink.js +68 -0
  98. package/dist/esm/components/low-level/WebsiteInternalLink.js.map +1 -0
  99. package/dist/esm/components/low-level/WebsiteLink.d.ts +50 -0
  100. package/dist/esm/components/low-level/WebsiteLink.d.ts.map +1 -0
  101. package/dist/esm/components/low-level/WebsiteLink.js +22 -0
  102. package/dist/esm/components/low-level/WebsiteLink.js.map +1 -0
  103. package/dist/esm/components/low-level/WebsiteText.d.ts +57 -0
  104. package/dist/esm/components/low-level/WebsiteText.d.ts.map +1 -0
  105. package/dist/esm/components/low-level/WebsiteText.js +57 -0
  106. package/dist/esm/components/low-level/WebsiteText.js.map +1 -0
  107. package/dist/esm/config/define-website-config.d.ts +83 -0
  108. package/dist/esm/config/define-website-config.d.ts.map +1 -0
  109. package/dist/esm/config/define-website-config.js +126 -0
  110. package/dist/esm/config/define-website-config.js.map +1 -0
  111. package/dist/esm/config/index.d.ts +38 -0
  112. package/dist/esm/config/index.d.ts.map +1 -0
  113. package/dist/esm/config/index.js +38 -0
  114. package/dist/esm/config/index.js.map +1 -0
  115. package/dist/esm/config/load-website-config.d.ts +136 -0
  116. package/dist/esm/config/load-website-config.d.ts.map +1 -0
  117. package/dist/esm/config/load-website-config.js +177 -0
  118. package/dist/esm/config/load-website-config.js.map +1 -0
  119. package/dist/esm/config/wildo-website-config.schemas.d.ts +251 -0
  120. package/dist/esm/config/wildo-website-config.schemas.d.ts.map +1 -0
  121. package/dist/esm/config/wildo-website-config.schemas.js +302 -0
  122. package/dist/esm/config/wildo-website-config.schemas.js.map +1 -0
  123. package/dist/esm/config-loader.d.ts +35 -0
  124. package/dist/esm/config-loader.d.ts.map +1 -0
  125. package/dist/esm/config-loader.js +35 -0
  126. package/dist/esm/config-loader.js.map +1 -0
  127. package/dist/esm/core/anonymous-session/InboundContactForm.d.ts +38 -0
  128. package/dist/esm/core/anonymous-session/InboundContactForm.d.ts.map +1 -0
  129. package/dist/esm/core/anonymous-session/InboundContactForm.js +77 -0
  130. package/dist/esm/core/anonymous-session/InboundContactForm.js.map +1 -0
  131. package/dist/esm/core/anonymous-session/inbound-contact-form.schema.d.ts +41 -0
  132. package/dist/esm/core/anonymous-session/inbound-contact-form.schema.d.ts.map +1 -0
  133. package/dist/esm/core/anonymous-session/inbound-contact-form.schema.js +58 -0
  134. package/dist/esm/core/anonymous-session/inbound-contact-form.schema.js.map +1 -0
  135. package/dist/esm/core/anonymous-session/website-anonymous-session-client.d.ts +81 -0
  136. package/dist/esm/core/anonymous-session/website-anonymous-session-client.d.ts.map +1 -0
  137. package/dist/esm/core/anonymous-session/website-anonymous-session-client.js +177 -0
  138. package/dist/esm/core/anonymous-session/website-anonymous-session-client.js.map +1 -0
  139. package/dist/esm/core/contexts/WebsitePageContext.d.ts +40 -0
  140. package/dist/esm/core/contexts/WebsitePageContext.d.ts.map +1 -0
  141. package/dist/esm/core/contexts/WebsitePageContext.js +8 -0
  142. package/dist/esm/core/contexts/WebsitePageContext.js.map +1 -0
  143. package/dist/esm/core/contexts/WebsiteRuntimeContext.d.ts +162 -0
  144. package/dist/esm/core/contexts/WebsiteRuntimeContext.d.ts.map +1 -0
  145. package/dist/esm/core/contexts/WebsiteRuntimeContext.js +22 -0
  146. package/dist/esm/core/contexts/WebsiteRuntimeContext.js.map +1 -0
  147. package/dist/esm/core/contexts/WebsiteSectionContext.d.ts +47 -0
  148. package/dist/esm/core/contexts/WebsiteSectionContext.d.ts.map +1 -0
  149. package/dist/esm/core/contexts/WebsiteSectionContext.js +8 -0
  150. package/dist/esm/core/contexts/WebsiteSectionContext.js.map +1 -0
  151. package/dist/esm/core/contexts/useWebsitePage.d.ts +13 -0
  152. package/dist/esm/core/contexts/useWebsitePage.d.ts.map +1 -0
  153. package/dist/esm/core/contexts/useWebsitePage.js +22 -0
  154. package/dist/esm/core/contexts/useWebsitePage.js.map +1 -0
  155. package/dist/esm/core/contexts/useWebsiteRuntime.d.ts +19 -0
  156. package/dist/esm/core/contexts/useWebsiteRuntime.d.ts.map +1 -0
  157. package/dist/esm/core/contexts/useWebsiteRuntime.js +28 -0
  158. package/dist/esm/core/contexts/useWebsiteRuntime.js.map +1 -0
  159. package/dist/esm/core/contexts/useWebsiteSection.d.ts +12 -0
  160. package/dist/esm/core/contexts/useWebsiteSection.d.ts.map +1 -0
  161. package/dist/esm/core/contexts/useWebsiteSection.js +22 -0
  162. package/dist/esm/core/contexts/useWebsiteSection.js.map +1 -0
  163. package/dist/esm/core/external-providers/frontend-provider-registry.website.d.ts +17 -0
  164. package/dist/esm/core/external-providers/frontend-provider-registry.website.d.ts.map +1 -0
  165. package/dist/esm/core/external-providers/frontend-provider-registry.website.js +23 -0
  166. package/dist/esm/core/external-providers/frontend-provider-registry.website.js.map +1 -0
  167. package/dist/esm/core/factories/define-website-page-manifest.d.ts +70 -0
  168. package/dist/esm/core/factories/define-website-page-manifest.d.ts.map +1 -0
  169. package/dist/esm/core/factories/define-website-page-manifest.js +51 -0
  170. package/dist/esm/core/factories/define-website-page-manifest.js.map +1 -0
  171. package/dist/esm/core/factories/define-website-section.d.ts +101 -0
  172. package/dist/esm/core/factories/define-website-section.d.ts.map +1 -0
  173. package/dist/esm/core/factories/define-website-section.js +71 -0
  174. package/dist/esm/core/factories/define-website-section.js.map +1 -0
  175. package/dist/esm/core/hooks/useWebsiteDesignTokens.d.ts +23 -0
  176. package/dist/esm/core/hooks/useWebsiteDesignTokens.d.ts.map +1 -0
  177. package/dist/esm/core/hooks/useWebsiteDesignTokens.js +25 -0
  178. package/dist/esm/core/hooks/useWebsiteDesignTokens.js.map +1 -0
  179. package/dist/esm/core/hooks/useWebsiteLabel.d.ts +68 -0
  180. package/dist/esm/core/hooks/useWebsiteLabel.d.ts.map +1 -0
  181. package/dist/esm/core/hooks/useWebsiteLabel.js +103 -0
  182. package/dist/esm/core/hooks/useWebsiteLabel.js.map +1 -0
  183. package/dist/esm/core/layouts/WebsitePageLayout.d.ts +87 -0
  184. package/dist/esm/core/layouts/WebsitePageLayout.d.ts.map +1 -0
  185. package/dist/esm/core/layouts/WebsitePageLayout.js +170 -0
  186. package/dist/esm/core/layouts/WebsitePageLayout.js.map +1 -0
  187. package/dist/esm/core/layouts/WebsiteSection.d.ts +91 -0
  188. package/dist/esm/core/layouts/WebsiteSection.d.ts.map +1 -0
  189. package/dist/esm/core/layouts/WebsiteSection.js +26 -0
  190. package/dist/esm/core/layouts/WebsiteSection.js.map +1 -0
  191. package/dist/esm/core/routing/internal-routing.utils.d.ts +65 -0
  192. package/dist/esm/core/routing/internal-routing.utils.d.ts.map +1 -0
  193. package/dist/esm/core/routing/internal-routing.utils.js +14 -0
  194. package/dist/esm/core/routing/internal-routing.utils.js.map +1 -0
  195. package/dist/esm/index.d.ts +129 -0
  196. package/dist/esm/index.d.ts.map +1 -0
  197. package/dist/esm/index.js +129 -0
  198. package/dist/esm/index.js.map +1 -0
  199. package/dist/esm/mdx/BlogPost.d.ts +193 -0
  200. package/dist/esm/mdx/BlogPost.d.ts.map +1 -0
  201. package/dist/esm/mdx/BlogPost.js +161 -0
  202. package/dist/esm/mdx/BlogPost.js.map +1 -0
  203. package/dist/esm/mdx/blog-post-collection.config.d.ts +139 -0
  204. package/dist/esm/mdx/blog-post-collection.config.d.ts.map +1 -0
  205. package/dist/esm/mdx/blog-post-collection.config.js +27 -0
  206. package/dist/esm/mdx/blog-post-collection.config.js.map +1 -0
  207. package/dist/esm/mdx/blog-post-frontmatter-source.d.ts +12 -0
  208. package/dist/esm/mdx/blog-post-frontmatter-source.d.ts.map +1 -0
  209. package/dist/esm/mdx/blog-post-frontmatter-source.js +13 -0
  210. package/dist/esm/mdx/blog-post-frontmatter-source.js.map +1 -0
  211. package/dist/esm/mdx/index.d.ts +22 -0
  212. package/dist/esm/mdx/index.d.ts.map +1 -0
  213. package/dist/esm/mdx/index.js +22 -0
  214. package/dist/esm/mdx/index.js.map +1 -0
  215. package/dist/esm/mdx/website-mdx-provider.d.ts +90 -0
  216. package/dist/esm/mdx/website-mdx-provider.d.ts.map +1 -0
  217. package/dist/esm/mdx/website-mdx-provider.js +8 -0
  218. package/dist/esm/mdx/website-mdx-provider.js.map +1 -0
  219. package/dist/esm/mdx.d.ts +38 -0
  220. package/dist/esm/mdx.d.ts.map +1 -0
  221. package/dist/esm/mdx.js +38 -0
  222. package/dist/esm/mdx.js.map +1 -0
  223. package/dist/esm/schemas/blog/blog-post-frontmatter.shared.schemas.d.ts +75 -0
  224. package/dist/esm/schemas/blog/blog-post-frontmatter.shared.schemas.d.ts.map +1 -0
  225. package/dist/esm/schemas/blog/blog-post-frontmatter.shared.schemas.js +85 -0
  226. package/dist/esm/schemas/blog/blog-post-frontmatter.shared.schemas.js.map +1 -0
  227. package/dist/esm/schemas/design-tokens/website-design-tokens.shared.schemas.d.ts +120 -0
  228. package/dist/esm/schemas/design-tokens/website-design-tokens.shared.schemas.d.ts.map +1 -0
  229. package/dist/esm/schemas/design-tokens/website-design-tokens.shared.schemas.js +152 -0
  230. package/dist/esm/schemas/design-tokens/website-design-tokens.shared.schemas.js.map +1 -0
  231. package/dist/esm/schemas/label-keys/website-label-key.schemas.d.ts +73 -0
  232. package/dist/esm/schemas/label-keys/website-label-key.schemas.d.ts.map +1 -0
  233. package/dist/esm/schemas/label-keys/website-label-key.schemas.js +76 -0
  234. package/dist/esm/schemas/label-keys/website-label-key.schemas.js.map +1 -0
  235. package/dist/esm/schemas/manifests/website-page-manifest.shared.schemas.d.ts +209 -0
  236. package/dist/esm/schemas/manifests/website-page-manifest.shared.schemas.d.ts.map +1 -0
  237. package/dist/esm/schemas/manifests/website-page-manifest.shared.schemas.js +218 -0
  238. package/dist/esm/schemas/manifests/website-page-manifest.shared.schemas.js.map +1 -0
  239. package/dist/esm/schemas/manifests/website-root-config.shared.schemas.d.ts +431 -0
  240. package/dist/esm/schemas/manifests/website-root-config.shared.schemas.d.ts.map +1 -0
  241. package/dist/esm/schemas/manifests/website-root-config.shared.schemas.js +438 -0
  242. package/dist/esm/schemas/manifests/website-root-config.shared.schemas.js.map +1 -0
  243. package/dist/esm/schemas/refs/page-ref.schemas.d.ts +40 -0
  244. package/dist/esm/schemas/refs/page-ref.schemas.d.ts.map +1 -0
  245. package/dist/esm/schemas/refs/page-ref.schemas.js +43 -0
  246. package/dist/esm/schemas/refs/page-ref.schemas.js.map +1 -0
  247. package/dist/esm/schemas/refs/section-ref.schemas.d.ts +41 -0
  248. package/dist/esm/schemas/refs/section-ref.schemas.d.ts.map +1 -0
  249. package/dist/esm/schemas/refs/section-ref.schemas.js +44 -0
  250. package/dist/esm/schemas/refs/section-ref.schemas.js.map +1 -0
  251. package/dist/esm/schemas/sections/website-section-category.shared.d.ts +63 -0
  252. package/dist/esm/schemas/sections/website-section-category.shared.d.ts.map +1 -0
  253. package/dist/esm/schemas/sections/website-section-category.shared.js +64 -0
  254. package/dist/esm/schemas/sections/website-section-category.shared.js.map +1 -0
  255. package/dist/esm/schemas/sections/website-section-definition.shared.schemas.d.ts +114 -0
  256. package/dist/esm/schemas/sections/website-section-definition.shared.schemas.d.ts.map +1 -0
  257. package/dist/esm/schemas/sections/website-section-definition.shared.schemas.js +69 -0
  258. package/dist/esm/schemas/sections/website-section-definition.shared.schemas.js.map +1 -0
  259. package/dist/esm/schemas/structured-data/structured-data-reconciliation.shared.d.ts +100 -0
  260. package/dist/esm/schemas/structured-data/structured-data-reconciliation.shared.d.ts.map +1 -0
  261. package/dist/esm/schemas/structured-data/structured-data-reconciliation.shared.js +355 -0
  262. package/dist/esm/schemas/structured-data/structured-data-reconciliation.shared.js.map +1 -0
  263. package/dist/esm/schemas/structured-data/website-structured-data.shared.schemas.d.ts +58 -0
  264. package/dist/esm/schemas/structured-data/website-structured-data.shared.schemas.d.ts.map +1 -0
  265. package/dist/esm/schemas/structured-data/website-structured-data.shared.schemas.js +2 -0
  266. package/dist/esm/schemas/structured-data/website-structured-data.shared.schemas.js.map +1 -0
  267. package/dist/esm/schemas/validators/label-pack.validator.d.ts +144 -0
  268. package/dist/esm/schemas/validators/label-pack.validator.d.ts.map +1 -0
  269. package/dist/esm/schemas/validators/label-pack.validator.js +100 -0
  270. package/dist/esm/schemas/validators/label-pack.validator.js.map +1 -0
  271. package/dist/tsconfig.build.tsbuildinfo +1 -0
  272. package/package.json +143 -0
  273. package/src/__tests__/bundle-isolation.test.ts +607 -0
  274. package/src/astro/__tests__/blog-post-bridge.test.tsx +288 -0
  275. package/src/astro/__tests__/blog-post-head.renderer.test.ts +249 -0
  276. package/src/astro/__tests__/bridge-runtime.test.tsx +198 -0
  277. package/src/astro/__tests__/collect-expected-label-keys.test.ts +69 -0
  278. package/src/astro/__tests__/headers-renderer.test.ts +143 -0
  279. package/src/astro/__tests__/i18n-routing.helper.test.ts +116 -0
  280. package/src/astro/__tests__/label-pack-loader.test.ts +305 -0
  281. package/src/astro/__tests__/llms-txt-server.test.ts +127 -0
  282. package/src/astro/__tests__/pick-labels-for-page.test.ts +60 -0
  283. package/src/astro/__tests__/robots-renderer.test.ts +228 -0
  284. package/src/astro/__tests__/sitemap-coverage.test.ts +230 -0
  285. package/src/astro/__tests__/structured-data.renderer.test.ts +172 -0
  286. package/src/astro/__tests__/website-page-head.renderer.test.ts +424 -0
  287. package/src/astro/__tests__/website-page-runtime.helper.test.ts +157 -0
  288. package/src/astro/__tests__/website-site-context.test.ts +121 -0
  289. package/src/astro/blog-post-bridge.tsx +404 -0
  290. package/src/astro/blog-post-head.renderer.ts +293 -0
  291. package/src/astro/bridge-runtime.tsx +270 -0
  292. package/src/astro/collect-expected-label-keys.ts +113 -0
  293. package/src/astro/headers-renderer.ts +82 -0
  294. package/src/astro/i18n-routing.helper.ts +116 -0
  295. package/src/astro/internal/html-escape.ts +41 -0
  296. package/src/astro/label-pack-loader.ts +385 -0
  297. package/src/astro/llms-txt-server.ts +56 -0
  298. package/src/astro/pick-labels-for-page.ts +85 -0
  299. package/src/astro/robots-renderer.ts +171 -0
  300. package/src/astro/sitemap-coverage.ts +186 -0
  301. package/src/astro/structured-data.renderer.ts +171 -0
  302. package/src/astro/website-page-head.renderer.ts +279 -0
  303. package/src/astro/website-page-runtime.helper.ts +188 -0
  304. package/src/astro/website-site-context.ts +136 -0
  305. package/src/astro-island.ts +61 -0
  306. package/src/astro.ts +151 -0
  307. package/src/companion-exports.ts +38 -0
  308. package/src/components/low-level/WebsiteButton.tsx +118 -0
  309. package/src/components/low-level/WebsiteHeading.tsx +96 -0
  310. package/src/components/low-level/WebsiteImage.tsx +96 -0
  311. package/src/components/low-level/WebsiteInternalButton.tsx +172 -0
  312. package/src/components/low-level/WebsiteInternalLink.tsx +193 -0
  313. package/src/components/low-level/WebsiteLink.tsx +71 -0
  314. package/src/components/low-level/WebsiteText.tsx +75 -0
  315. package/src/components/low-level/__tests__/WebsiteInternalButton.test.tsx +169 -0
  316. package/src/components/low-level/__tests__/WebsiteInternalLink.test.tsx +202 -0
  317. package/src/components/low-level/__tests__/primitives.test.tsx +141 -0
  318. package/src/config/__tests__/define-website-config.test.ts +231 -0
  319. package/src/config/__tests__/load-website-config.test.ts +215 -0
  320. package/src/config/define-website-config.ts +134 -0
  321. package/src/config/index.ts +38 -0
  322. package/src/config/load-website-config.ts +229 -0
  323. package/src/config/wildo-website-config.schemas.ts +322 -0
  324. package/src/config-loader.ts +35 -0
  325. package/src/core/__tests__/WebsitePageLayout.test.tsx +184 -0
  326. package/src/core/__tests__/WebsiteSection.test.tsx +85 -0
  327. package/src/core/__tests__/contexts.test.tsx +133 -0
  328. package/src/core/__tests__/core-boundary.test.ts +85 -0
  329. package/src/core/__tests__/define-website-page-manifest.test.tsx +111 -0
  330. package/src/core/__tests__/define-website-section.test.tsx +89 -0
  331. package/src/core/__tests__/useWebsiteDesignTokens.test.tsx +41 -0
  332. package/src/core/__tests__/useWebsiteLabel.test.tsx +117 -0
  333. package/src/core/anonymous-session/InboundContactForm.tsx +157 -0
  334. package/src/core/anonymous-session/__tests__/inbound-contact-form.schema.test.ts +44 -0
  335. package/src/core/anonymous-session/inbound-contact-form.schema.ts +62 -0
  336. package/src/core/anonymous-session/website-anonymous-session-client.ts +194 -0
  337. package/src/core/contexts/WebsitePageContext.tsx +52 -0
  338. package/src/core/contexts/WebsiteRuntimeContext.tsx +175 -0
  339. package/src/core/contexts/WebsiteSectionContext.tsx +59 -0
  340. package/src/core/contexts/useWebsitePage.ts +28 -0
  341. package/src/core/contexts/useWebsiteRuntime.ts +34 -0
  342. package/src/core/contexts/useWebsiteSection.ts +28 -0
  343. package/src/core/external-providers/frontend-provider-registry.website.ts +62 -0
  344. package/src/core/factories/define-website-page-manifest.ts +102 -0
  345. package/src/core/factories/define-website-section.ts +128 -0
  346. package/src/core/hooks/useWebsiteDesignTokens.ts +26 -0
  347. package/src/core/hooks/useWebsiteLabel.ts +121 -0
  348. package/src/core/layouts/WebsitePageLayout.tsx +311 -0
  349. package/src/core/layouts/WebsiteSection.tsx +139 -0
  350. package/src/core/routing/__tests__/internal-routing.utils.test.ts +134 -0
  351. package/src/core/routing/internal-routing.utils.ts +77 -0
  352. package/src/index.ts +132 -0
  353. package/src/mdx/BlogPost.tsx +296 -0
  354. package/src/mdx/__tests__/BlogPost.test.tsx +218 -0
  355. package/src/mdx/__tests__/blog-post-collection.config.test.ts +127 -0
  356. package/src/mdx/__tests__/website-mdx-provider.test.tsx +82 -0
  357. package/src/mdx/blog-post-collection.config.ts +177 -0
  358. package/src/mdx/blog-post-frontmatter-source.ts +31 -0
  359. package/src/mdx/index.ts +39 -0
  360. package/src/mdx/website-mdx-provider.tsx +95 -0
  361. package/src/mdx.ts +38 -0
  362. package/src/schemas/__tests__/blog-frontmatter.test.ts +50 -0
  363. package/src/schemas/__tests__/companion-exports-react-free.test.ts +51 -0
  364. package/src/schemas/__tests__/design-tokens.test.ts +163 -0
  365. package/src/schemas/__tests__/label-key.test.ts +46 -0
  366. package/src/schemas/__tests__/label-pack-validator.test.ts +146 -0
  367. package/src/schemas/__tests__/page-manifest.test.ts +66 -0
  368. package/src/schemas/__tests__/refs.test.ts +37 -0
  369. package/src/schemas/__tests__/root-config.test.ts +292 -0
  370. package/src/schemas/__tests__/section-definition.test.ts +47 -0
  371. package/src/schemas/__tests__/structured-data-reconciliation.test.ts +543 -0
  372. package/src/schemas/blog/blog-post-frontmatter.shared.schemas.ts +111 -0
  373. package/src/schemas/design-tokens/website-design-tokens.shared.schemas.ts +166 -0
  374. package/src/schemas/label-keys/website-label-key.schemas.ts +88 -0
  375. package/src/schemas/manifests/website-page-manifest.shared.schemas.ts +266 -0
  376. package/src/schemas/manifests/website-root-config.shared.schemas.ts +504 -0
  377. package/src/schemas/refs/page-ref.schemas.ts +49 -0
  378. package/src/schemas/refs/section-ref.schemas.ts +50 -0
  379. package/src/schemas/sections/website-section-category.shared.ts +65 -0
  380. package/src/schemas/sections/website-section-definition.shared.schemas.ts +120 -0
  381. package/src/schemas/structured-data/structured-data-reconciliation.shared.ts +579 -0
  382. package/src/schemas/structured-data/website-structured-data.shared.schemas.ts +62 -0
  383. package/src/schemas/validators/label-pack.validator.ts +201 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WebsitePageContext.d.ts","sourceRoot":"","sources":["../../../../../src/core/contexts/WebsitePageContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAiB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAE1E;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,WAAW,uBAAuB;IACtC;;;;OAIG;IACH,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,OAAO,CAAC,uBAAuB,GAAG,IAAI,CACxB,CAAC;AAEtD,MAAM,WAAW,+BAA+B;IAC9C,KAAK,EAAE,uBAAuB,CAAC;IAC/B,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,0BAA0B,CAAC,EACzC,KAAK,EACL,QAAQ,GACT,EAAE,+BAA+B,GAAG,SAAS,CAM7C;yBATe,0BAA0B;;;AAW1C,uDAAuD"}
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { createContext } from 'react';
3
+ export const WebsitePageContext = createContext(null);
4
+ export function WebsitePageContextProvider({ value, children, }) {
5
+ return (_jsx(WebsitePageContext.Provider, { value: value, children: children }));
6
+ }
7
+ WebsitePageContextProvider.displayName = 'WebsitePageContextProvider';
8
+ //# sourceMappingURL=WebsitePageContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WebsitePageContext.js","sourceRoot":"","sources":["../../../../../src/core/contexts/WebsitePageContext.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,aAAa,EAAkB,MAAM,OAAO,CAAC;AAgC7D,MAAM,CAAC,MAAM,kBAAkB,GAC7B,aAAa,CAAiC,IAAI,CAAC,CAAC;AAOtD,MAAM,UAAU,0BAA0B,CAAC,EACzC,KAAK,EACL,QAAQ,GACwB;IAChC,OAAO,CACL,KAAC,kBAAkB,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YACtC,QAAQ,GACmB,CAC/B,CAAC;AACJ,CAAC;AACD,0BAA0B,CAAC,WAAW,GAAG,4BAA4B,CAAC","sourcesContent":["import React, { createContext, type ReactNode } from 'react';\n\nimport type { WebsitePageRef } from '../../schemas/refs/page-ref.schemas';\n\n/**\n * @wildo_source:part:start saas.website.page.context facet:layer:core facet:family:website\n *\n * `WebsitePageContext` — identity of the page currently rendering.\n * Provided by `<WebsitePageLayout pageRef=\"…\">` exactly once per\n * page render and consumed by `useWebsiteLabel(leaf)` to compose the\n * full label key (`website.{pageRef}.{sectionRef}.{leaf}`).\n *\n * **Why an isolated context (not merged into runtime)**: the runtime\n * context is set at the host-adapter boundary and is constant per\n * build; the page context is set per page route. Splitting them\n * lets a single host adapter render multiple pages (preview tooling,\n * MDX-driven blog index aggregating post excerpts, etc.) without\n * lying about which page each subtree belongs to.\n *\n * **Why a separate file from the hook**: same Fast-Refresh rationale\n * as `WebsiteRuntimeContext` — split provider/context/hook to keep\n * HMR boundaries small.\n */\nexport interface WebsitePageContextValue {\n /**\n * The validated `WebsitePageRef` of the page currently rendering.\n * MUST match a `WebsitePageManifest.pageRef` registered in the\n * site's `WebsiteRootConfig`.\n */\n pageRef: WebsitePageRef;\n}\n\nexport const WebsitePageContext: React.Context<WebsitePageContextValue | null> =\n createContext<WebsitePageContextValue | null>(null);\n\nexport interface WebsitePageContextProviderProps {\n value: WebsitePageContextValue;\n children: ReactNode;\n}\n\nexport function WebsitePageContextProvider({\n value,\n children,\n}: WebsitePageContextProviderProps): ReactNode {\n return (\n <WebsitePageContext.Provider value={value}>\n {children}\n </WebsitePageContext.Provider>\n );\n}\nWebsitePageContextProvider.displayName = 'WebsitePageContextProvider';\n/** @wildo_source:part:end saas.website.page.context */\n"]}
@@ -0,0 +1,162 @@
1
+ import React, { type ReactNode } from 'react';
2
+ import type { AvailableLanguage } from '@wildo-ai/saas-models/public-runtime';
3
+ import type { WebsiteDesignTokens } from '../../schemas/design-tokens/website-design-tokens.shared.schemas';
4
+ import type { FrontendWebsiteProviderRegistry } from '../external-providers/frontend-provider-registry.website';
5
+ import type { WebsiteLabelKey } from '../../schemas/label-keys/website-label-key.schemas';
6
+ import type { WebsiteNavigationConfig } from '../../schemas/manifests/website-root-config.shared.schemas';
7
+ import type { LabelPack } from '../../schemas/validators/label-pack.validator';
8
+ /**
9
+ * @wildo_source:part:start saas.website.runtime.context facet:layer:core facet:family:website
10
+ *
11
+ * `WebsiteRuntimeContext` — site-wide runtime state for the marketing
12
+ * surface. Created **once per page render** by the host adapter
13
+ * (Phase 5 `WebsitePageBridge.astro` reads `WebsiteRootConfig` and the
14
+ * resolved label pack from disk and calls
15
+ * `<WebsiteRuntimeContextProvider value={…}>` around the page tree).
16
+ *
17
+ * **Why "runtime" and not "config"**: the values here are the
18
+ * locale-resolved subset of `WebsiteRootConfig` — only the active
19
+ * locale's label pack travels with the React tree (the other locales
20
+ * live in their own per-locale static builds). A `*Config` name would
21
+ * suggest the full multi-locale surface is in scope.
22
+ *
23
+ * **Three pieces of state**:
24
+ *
25
+ * - `locale` — the currently-rendering locale. Sections that need
26
+ * locale-aware formatting (number/date in marketing copy is rare
27
+ * but legitimate) read it via `useWebsiteRuntime()`.
28
+ * - `labelPack` — the locale-resolved flat key→string map, validated
29
+ * against the manifest by `validateLabelPackAgainstManifest` at
30
+ * build start. Consumed by `useWebsiteLabel` and
31
+ * `useWebsiteLabelByKey`.
32
+ * - `designTokens` — the `WebsiteDesignTokens` from
33
+ * `WebsiteRootConfig.designTokens`. Consumed by
34
+ * `useWebsiteDesignTokens` and by the Phase 5 CSS emitter that
35
+ * materializes them as `--website-*` custom properties on the
36
+ * `<WebsitePageLayout>` root.
37
+ * - `navigation` — the `WebsiteNavigationConfig` from
38
+ * `WebsiteRootConfig.navigation`. Carried in the runtime context
39
+ * (rather than as a separate `WebsiteNavigationContext`) because
40
+ * `<WebsitePageLayout>` already reads runtime state and
41
+ * header/footer slots are inseparable from "the site is rendering
42
+ * right now". A second context for two component refs would split
43
+ * the host-adapter's wiring surface without buying isolation.
44
+ * - `frontendProviderRegistry` — optional website-facing public provider
45
+ * registry hydrated from the materialized provider artifact for the
46
+ * concrete `STATIC_WEBSITE` service. This keeps analytics / captcha /
47
+ * browser-monitoring integrations on the same frontend-provider
48
+ * contract the SaaS app now uses, instead of inventing a website-only
49
+ * metadata seam.
50
+ *
51
+ * **Why a separate file from the hook + provider**: split for React
52
+ * Fast Refresh — when a `.tsx` exports both a React component and a
53
+ * React Context object, edits to either one invalidate the entire
54
+ * module's HMR boundary. Keeping the bare context here, the hook in
55
+ * `useWebsiteRuntime.ts`, and the provider component in
56
+ * `WebsiteRuntimeContextProvider.tsx` makes section authors edit
57
+ * components without retriggering the runtime context's identity.
58
+ */
59
+ export interface WebsiteRuntimeContextValue {
60
+ /**
61
+ * The currently-rendering locale. Marketing-site routing emits one
62
+ * static build per locale (D8), so this value is constant per build
63
+ * — never re-renders mid-session.
64
+ */
65
+ locale: AvailableLanguage;
66
+ /**
67
+ * The site's default locale (mirrors `WebsiteRootConfig.defaultLocale`).
68
+ * Carried in the runtime context so client-tier components — namely
69
+ * `WebsiteInternalLink` (Phase 6 fix H-β) — can compute the correct
70
+ * locale-prefixed pathname (`/pricing` on the EN site,
71
+ * `/fr/pricing` on the FR site) without re-importing the root
72
+ * config. Plumbing it through the runtime keeps the routing rule
73
+ * a framework-internal concern: section authors NEVER hand-prefix
74
+ * paths.
75
+ */
76
+ defaultLocale: AvailableLanguage;
77
+ /**
78
+ * Flat `Record<string, string>` label pack for the active locale.
79
+ * Lookup keys MUST be fully-composed `website.<page>.<section>.<slot>`
80
+ * strings; consumers that hold leaf paths use `useWebsiteLabel(leaf)`
81
+ * which composes the full key against the page+section context.
82
+ */
83
+ labelPack: LabelPack;
84
+ /**
85
+ * Design-token bundle for the active site. Same object referenced
86
+ * by `WebsiteRootConfig.designTokens`; passed by reference (not
87
+ * cloned) so token-aware components can rely on referential
88
+ * stability across renders.
89
+ */
90
+ designTokens: WebsiteDesignTokens;
91
+ /**
92
+ * Site-wide navigation slot bindings (header / footer components).
93
+ * Same object referenced by `WebsiteRootConfig.navigation`. Read
94
+ * by `<WebsitePageLayout>` to render the chrome around each page's
95
+ * `<main>` content; per-page `header` / `footer` props on
96
+ * `<WebsitePageLayout>` override these defaults.
97
+ */
98
+ navigation: WebsiteNavigationConfig;
99
+ /**
100
+ * Fully-composed label key the framework reads to render the
101
+ * "Skip to main content" affordance as the FIRST focusable element
102
+ * on every page (Phase 6 third audit fix M-α). Mirrors
103
+ * `WebsiteRootConfig.skipToMainContentLabelKey`. Carried in the
104
+ * runtime context (NOT re-derived from the root config inside
105
+ * `WebsitePageLayout`) for two reasons:
106
+ * - The layout is a client-tier React component; it cannot import
107
+ * the consumer's `WEBSITE_ROOT_CONFIG` symbol without dragging
108
+ * server-only code (manifest registry, page components) into
109
+ * the client bundle.
110
+ * - Threading the key through the runtime keeps the layout's
111
+ * contract symmetric with how every other localized text on the
112
+ * page is sourced (label pack + key), so the skip link is
113
+ * translated automatically without any per-locale branching.
114
+ */
115
+ skipToMainContentLabelKey: WebsiteLabelKey;
116
+ /**
117
+ * Website-facing public providers for the active static website
118
+ * service. Optional so older tests and provider-free sites can omit
119
+ * it, but when present it is the canonical frontend-safe provider
120
+ * catalog for analytics / captcha / browser-monitoring slices.
121
+ */
122
+ frontendProviderRegistry?: FrontendWebsiteProviderRegistry;
123
+ /**
124
+ * Backend API origin (WITHOUT a trailing slash) that anonymous-capture
125
+ * sections POST to when constructing a `WebsiteAnonymousSessionClient`
126
+ * (lead / draft-note forms). Sourced from
127
+ * `WildoMarketingWebsiteConfig.apiOrigin` and passed as a
128
+ * JSON-serializable island prop (the `.astro` page resolves the
129
+ * per-environment value and forwards it).
130
+ *
131
+ * Optional because only pages that host an anonymous-capture section
132
+ * need it — brochure pages omit it. A capture section that reads
133
+ * `undefined` here surfaces a loud misconfiguration rather than
134
+ * silently failing to submit.
135
+ */
136
+ apiOrigin?: string;
137
+ }
138
+ /**
139
+ * Bare React context. Default `null` — `useWebsiteRuntime()` throws
140
+ * with a clear error message when invoked outside of
141
+ * `<WebsiteRuntimeContextProvider>`. The defensive throw is preferred
142
+ * over a silent default value so a missing provider is detected at
143
+ * the first hook call rather than at render time when a missing
144
+ * label silently renders as the key string.
145
+ */
146
+ export declare const WebsiteRuntimeContext: React.Context<WebsiteRuntimeContextValue | null>;
147
+ export interface WebsiteRuntimeContextProviderProps {
148
+ value: WebsiteRuntimeContextValue;
149
+ children: ReactNode;
150
+ }
151
+ /**
152
+ * Provider component. Authored as a thin wrapper so consumers do NOT
153
+ * have to import `WebsiteRuntimeContext.Provider` directly — the
154
+ * provider component carries the documented authoring API and is the
155
+ * Fast-Refresh-stable surface section authors compose against.
156
+ */
157
+ export declare function WebsiteRuntimeContextProvider({ value, children, }: WebsiteRuntimeContextProviderProps): ReactNode;
158
+ export declare namespace WebsiteRuntimeContextProvider {
159
+ var displayName: string;
160
+ }
161
+ /** @wildo_source:part:end saas.website.runtime.context */
162
+ //# sourceMappingURL=WebsiteRuntimeContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WebsiteRuntimeContext.d.ts","sourceRoot":"","sources":["../../../../../src/core/contexts/WebsiteRuntimeContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAiB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE7D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAE9E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kEAAkE,CAAC;AAC5G,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,0DAA0D,CAAC;AAChH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oDAAoD,CAAC;AAC1F,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,4DAA4D,CAAC;AAC1G,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+CAA+C,CAAC;AAE/E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,MAAM,WAAW,0BAA0B;IACzC;;;;OAIG;IACH,MAAM,EAAE,iBAAiB,CAAC;IAC1B;;;;;;;;;OASG;IACH,aAAa,EAAE,iBAAiB,CAAC;IACjC;;;;;OAKG;IACH,SAAS,EAAE,SAAS,CAAC;IACrB;;;;;OAKG;IACH,YAAY,EAAE,mBAAmB,CAAC;IAClC;;;;;;OAMG;IACH,UAAU,EAAE,uBAAuB,CAAC;IACpC;;;;;;;;;;;;;;;OAeG;IACH,yBAAyB,EAAE,eAAe,CAAC;IAC3C;;;;;OAKG;IACH,wBAAwB,CAAC,EAAE,+BAA+B,CAAC;IAC3D;;;;;;;;;;;;OAYG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,OAAO,CAAC,0BAA0B,GAAG,IAAI,CAC3B,CAAC;AAEzD,MAAM,WAAW,kCAAkC;IACjD,KAAK,EAAE,0BAA0B,CAAC;IAClC,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAAC,EAC5C,KAAK,EACL,QAAQ,GACT,EAAE,kCAAkC,GAAG,SAAS,CAMhD;yBATe,6BAA6B;;;AAW7C,0DAA0D"}
@@ -0,0 +1,22 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { createContext } from 'react';
3
+ /**
4
+ * Bare React context. Default `null` — `useWebsiteRuntime()` throws
5
+ * with a clear error message when invoked outside of
6
+ * `<WebsiteRuntimeContextProvider>`. The defensive throw is preferred
7
+ * over a silent default value so a missing provider is detected at
8
+ * the first hook call rather than at render time when a missing
9
+ * label silently renders as the key string.
10
+ */
11
+ export const WebsiteRuntimeContext = createContext(null);
12
+ /**
13
+ * Provider component. Authored as a thin wrapper so consumers do NOT
14
+ * have to import `WebsiteRuntimeContext.Provider` directly — the
15
+ * provider component carries the documented authoring API and is the
16
+ * Fast-Refresh-stable surface section authors compose against.
17
+ */
18
+ export function WebsiteRuntimeContextProvider({ value, children, }) {
19
+ return (_jsx(WebsiteRuntimeContext.Provider, { value: value, children: children }));
20
+ }
21
+ WebsiteRuntimeContextProvider.displayName = 'WebsiteRuntimeContextProvider';
22
+ //# sourceMappingURL=WebsiteRuntimeContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WebsiteRuntimeContext.js","sourceRoot":"","sources":["../../../../../src/core/contexts/WebsiteRuntimeContext.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,aAAa,EAAkB,MAAM,OAAO,CAAC;AA6I7D;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAChC,aAAa,CAAoC,IAAI,CAAC,CAAC;AAOzD;;;;;GAKG;AACH,MAAM,UAAU,6BAA6B,CAAC,EAC5C,KAAK,EACL,QAAQ,GAC2B;IACnC,OAAO,CACL,KAAC,qBAAqB,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YACzC,QAAQ,GACsB,CAClC,CAAC;AACJ,CAAC;AACD,6BAA6B,CAAC,WAAW,GAAG,+BAA+B,CAAC","sourcesContent":["import React, { createContext, type ReactNode } from 'react';\n\nimport type { AvailableLanguage } from '@wildo-ai/saas-models/public-runtime';\n\nimport type { WebsiteDesignTokens } from '../../schemas/design-tokens/website-design-tokens.shared.schemas';\nimport type { FrontendWebsiteProviderRegistry } from '../external-providers/frontend-provider-registry.website';\nimport type { WebsiteLabelKey } from '../../schemas/label-keys/website-label-key.schemas';\nimport type { WebsiteNavigationConfig } from '../../schemas/manifests/website-root-config.shared.schemas';\nimport type { LabelPack } from '../../schemas/validators/label-pack.validator';\n\n/**\n * @wildo_source:part:start saas.website.runtime.context facet:layer:core facet:family:website\n *\n * `WebsiteRuntimeContext` — site-wide runtime state for the marketing\n * surface. Created **once per page render** by the host adapter\n * (Phase 5 `WebsitePageBridge.astro` reads `WebsiteRootConfig` and the\n * resolved label pack from disk and calls\n * `<WebsiteRuntimeContextProvider value={…}>` around the page tree).\n *\n * **Why \"runtime\" and not \"config\"**: the values here are the\n * locale-resolved subset of `WebsiteRootConfig` — only the active\n * locale's label pack travels with the React tree (the other locales\n * live in their own per-locale static builds). A `*Config` name would\n * suggest the full multi-locale surface is in scope.\n *\n * **Three pieces of state**:\n *\n * - `locale` — the currently-rendering locale. Sections that need\n * locale-aware formatting (number/date in marketing copy is rare\n * but legitimate) read it via `useWebsiteRuntime()`.\n * - `labelPack` — the locale-resolved flat key→string map, validated\n * against the manifest by `validateLabelPackAgainstManifest` at\n * build start. Consumed by `useWebsiteLabel` and\n * `useWebsiteLabelByKey`.\n * - `designTokens` — the `WebsiteDesignTokens` from\n * `WebsiteRootConfig.designTokens`. Consumed by\n * `useWebsiteDesignTokens` and by the Phase 5 CSS emitter that\n * materializes them as `--website-*` custom properties on the\n * `<WebsitePageLayout>` root.\n * - `navigation` — the `WebsiteNavigationConfig` from\n * `WebsiteRootConfig.navigation`. Carried in the runtime context\n * (rather than as a separate `WebsiteNavigationContext`) because\n * `<WebsitePageLayout>` already reads runtime state and\n * header/footer slots are inseparable from \"the site is rendering\n * right now\". A second context for two component refs would split\n * the host-adapter's wiring surface without buying isolation.\n * - `frontendProviderRegistry` — optional website-facing public provider\n * registry hydrated from the materialized provider artifact for the\n * concrete `STATIC_WEBSITE` service. This keeps analytics / captcha /\n * browser-monitoring integrations on the same frontend-provider\n * contract the SaaS app now uses, instead of inventing a website-only\n * metadata seam.\n *\n * **Why a separate file from the hook + provider**: split for React\n * Fast Refresh — when a `.tsx` exports both a React component and a\n * React Context object, edits to either one invalidate the entire\n * module's HMR boundary. Keeping the bare context here, the hook in\n * `useWebsiteRuntime.ts`, and the provider component in\n * `WebsiteRuntimeContextProvider.tsx` makes section authors edit\n * components without retriggering the runtime context's identity.\n */\nexport interface WebsiteRuntimeContextValue {\n /**\n * The currently-rendering locale. Marketing-site routing emits one\n * static build per locale (D8), so this value is constant per build\n * — never re-renders mid-session.\n */\n locale: AvailableLanguage;\n /**\n * The site's default locale (mirrors `WebsiteRootConfig.defaultLocale`).\n * Carried in the runtime context so client-tier components — namely\n * `WebsiteInternalLink` (Phase 6 fix H-β) — can compute the correct\n * locale-prefixed pathname (`/pricing` on the EN site,\n * `/fr/pricing` on the FR site) without re-importing the root\n * config. Plumbing it through the runtime keeps the routing rule\n * a framework-internal concern: section authors NEVER hand-prefix\n * paths.\n */\n defaultLocale: AvailableLanguage;\n /**\n * Flat `Record<string, string>` label pack for the active locale.\n * Lookup keys MUST be fully-composed `website.<page>.<section>.<slot>`\n * strings; consumers that hold leaf paths use `useWebsiteLabel(leaf)`\n * which composes the full key against the page+section context.\n */\n labelPack: LabelPack;\n /**\n * Design-token bundle for the active site. Same object referenced\n * by `WebsiteRootConfig.designTokens`; passed by reference (not\n * cloned) so token-aware components can rely on referential\n * stability across renders.\n */\n designTokens: WebsiteDesignTokens;\n /**\n * Site-wide navigation slot bindings (header / footer components).\n * Same object referenced by `WebsiteRootConfig.navigation`. Read\n * by `<WebsitePageLayout>` to render the chrome around each page's\n * `<main>` content; per-page `header` / `footer` props on\n * `<WebsitePageLayout>` override these defaults.\n */\n navigation: WebsiteNavigationConfig;\n /**\n * Fully-composed label key the framework reads to render the\n * \"Skip to main content\" affordance as the FIRST focusable element\n * on every page (Phase 6 third audit fix M-α). Mirrors\n * `WebsiteRootConfig.skipToMainContentLabelKey`. Carried in the\n * runtime context (NOT re-derived from the root config inside\n * `WebsitePageLayout`) for two reasons:\n * - The layout is a client-tier React component; it cannot import\n * the consumer's `WEBSITE_ROOT_CONFIG` symbol without dragging\n * server-only code (manifest registry, page components) into\n * the client bundle.\n * - Threading the key through the runtime keeps the layout's\n * contract symmetric with how every other localized text on the\n * page is sourced (label pack + key), so the skip link is\n * translated automatically without any per-locale branching.\n */\n skipToMainContentLabelKey: WebsiteLabelKey;\n /**\n * Website-facing public providers for the active static website\n * service. Optional so older tests and provider-free sites can omit\n * it, but when present it is the canonical frontend-safe provider\n * catalog for analytics / captcha / browser-monitoring slices.\n */\n frontendProviderRegistry?: FrontendWebsiteProviderRegistry;\n /**\n * Backend API origin (WITHOUT a trailing slash) that anonymous-capture\n * sections POST to when constructing a `WebsiteAnonymousSessionClient`\n * (lead / draft-note forms). Sourced from\n * `WildoMarketingWebsiteConfig.apiOrigin` and passed as a\n * JSON-serializable island prop (the `.astro` page resolves the\n * per-environment value and forwards it).\n *\n * Optional because only pages that host an anonymous-capture section\n * need it — brochure pages omit it. A capture section that reads\n * `undefined` here surfaces a loud misconfiguration rather than\n * silently failing to submit.\n */\n apiOrigin?: string;\n}\n\n/**\n * Bare React context. Default `null` — `useWebsiteRuntime()` throws\n * with a clear error message when invoked outside of\n * `<WebsiteRuntimeContextProvider>`. The defensive throw is preferred\n * over a silent default value so a missing provider is detected at\n * the first hook call rather than at render time when a missing\n * label silently renders as the key string.\n */\nexport const WebsiteRuntimeContext: React.Context<WebsiteRuntimeContextValue | null> =\n createContext<WebsiteRuntimeContextValue | null>(null);\n\nexport interface WebsiteRuntimeContextProviderProps {\n value: WebsiteRuntimeContextValue;\n children: ReactNode;\n}\n\n/**\n * Provider component. Authored as a thin wrapper so consumers do NOT\n * have to import `WebsiteRuntimeContext.Provider` directly — the\n * provider component carries the documented authoring API and is the\n * Fast-Refresh-stable surface section authors compose against.\n */\nexport function WebsiteRuntimeContextProvider({\n value,\n children,\n}: WebsiteRuntimeContextProviderProps): ReactNode {\n return (\n <WebsiteRuntimeContext.Provider value={value}>\n {children}\n </WebsiteRuntimeContext.Provider>\n );\n}\nWebsiteRuntimeContextProvider.displayName = 'WebsiteRuntimeContextProvider';\n/** @wildo_source:part:end saas.website.runtime.context */\n"]}
@@ -0,0 +1,47 @@
1
+ import React, { type ReactNode } from 'react';
2
+ import type { WebsiteSectionCategory } from '../../schemas/sections/website-section-category.shared';
3
+ import type { WebsiteSectionRef } from '../../schemas/refs/section-ref.schemas';
4
+ /**
5
+ * @wildo_source:part:start saas.website.section.context facet:layer:core facet:family:website
6
+ *
7
+ * `WebsiteSectionContext` — identity + metadata of the section
8
+ * currently rendering. Provided by `<WebsiteSection>` and consumed
9
+ * by `useWebsiteLabel(leaf)` to compose the full label key, by
10
+ * analytics overlays that need the category, and by SEO emitters
11
+ * that decorate sections with `data-*` attributes.
12
+ *
13
+ * **Why expose `category` here (not just `sectionRef`)**: the
14
+ * category is the section's semantic role (`hero`, `cta`, `social`,
15
+ * etc.) and is needed by overlay tooling and analytics consumers
16
+ * that don't know the per-site `sectionRef` vocabulary. Bundling
17
+ * both saves consumers from having to thread the manifest just to
18
+ * map a ref back to its category.
19
+ *
20
+ * **Why a separate file from the hook**: same Fast-Refresh rationale
21
+ * as the runtime + page contexts.
22
+ */
23
+ export interface WebsiteSectionContextValue {
24
+ /**
25
+ * The validated `WebsiteSectionRef` of the section currently
26
+ * rendering. Composed by `useWebsiteLabel(leaf)` into the full key.
27
+ */
28
+ sectionRef: WebsiteSectionRef;
29
+ /**
30
+ * The semantic category of the section (`hero` / `cta` / etc.).
31
+ * Sourced from the matching `WebsiteSectionDefinition.category`
32
+ * by the host adapter and surfaced here so analytics + SEO
33
+ * tooling does not need to re-resolve it.
34
+ */
35
+ category: WebsiteSectionCategory;
36
+ }
37
+ export declare const WebsiteSectionContext: React.Context<WebsiteSectionContextValue | null>;
38
+ export interface WebsiteSectionContextProviderProps {
39
+ value: WebsiteSectionContextValue;
40
+ children: ReactNode;
41
+ }
42
+ export declare function WebsiteSectionContextProvider({ value, children, }: WebsiteSectionContextProviderProps): ReactNode;
43
+ export declare namespace WebsiteSectionContextProvider {
44
+ var displayName: string;
45
+ }
46
+ /** @wildo_source:part:end saas.website.section.context */
47
+ //# sourceMappingURL=WebsiteSectionContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WebsiteSectionContext.d.ts","sourceRoot":"","sources":["../../../../../src/core/contexts/WebsiteSectionContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAiB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE7D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wDAAwD,CAAC;AACrG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAEhF;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,WAAW,0BAA0B;IACzC;;;OAGG;IACH,UAAU,EAAE,iBAAiB,CAAC;IAC9B;;;;;OAKG;IACH,QAAQ,EAAE,sBAAsB,CAAC;CAClC;AAED,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,OAAO,CAAC,0BAA0B,GAAG,IAAI,CAC3B,CAAC;AAEzD,MAAM,WAAW,kCAAkC;IACjD,KAAK,EAAE,0BAA0B,CAAC;IAClC,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,6BAA6B,CAAC,EAC5C,KAAK,EACL,QAAQ,GACT,EAAE,kCAAkC,GAAG,SAAS,CAMhD;yBATe,6BAA6B;;;AAW7C,0DAA0D"}
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { createContext } from 'react';
3
+ export const WebsiteSectionContext = createContext(null);
4
+ export function WebsiteSectionContextProvider({ value, children, }) {
5
+ return (_jsx(WebsiteSectionContext.Provider, { value: value, children: children }));
6
+ }
7
+ WebsiteSectionContextProvider.displayName = 'WebsiteSectionContextProvider';
8
+ //# sourceMappingURL=WebsiteSectionContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WebsiteSectionContext.js","sourceRoot":"","sources":["../../../../../src/core/contexts/WebsiteSectionContext.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,aAAa,EAAkB,MAAM,OAAO,CAAC;AAuC7D,MAAM,CAAC,MAAM,qBAAqB,GAChC,aAAa,CAAoC,IAAI,CAAC,CAAC;AAOzD,MAAM,UAAU,6BAA6B,CAAC,EAC5C,KAAK,EACL,QAAQ,GAC2B;IACnC,OAAO,CACL,KAAC,qBAAqB,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YACzC,QAAQ,GACsB,CAClC,CAAC;AACJ,CAAC;AACD,6BAA6B,CAAC,WAAW,GAAG,+BAA+B,CAAC","sourcesContent":["import React, { createContext, type ReactNode } from 'react';\n\nimport type { WebsiteSectionCategory } from '../../schemas/sections/website-section-category.shared';\nimport type { WebsiteSectionRef } from '../../schemas/refs/section-ref.schemas';\n\n/**\n * @wildo_source:part:start saas.website.section.context facet:layer:core facet:family:website\n *\n * `WebsiteSectionContext` — identity + metadata of the section\n * currently rendering. Provided by `<WebsiteSection>` and consumed\n * by `useWebsiteLabel(leaf)` to compose the full label key, by\n * analytics overlays that need the category, and by SEO emitters\n * that decorate sections with `data-*` attributes.\n *\n * **Why expose `category` here (not just `sectionRef`)**: the\n * category is the section's semantic role (`hero`, `cta`, `social`,\n * etc.) and is needed by overlay tooling and analytics consumers\n * that don't know the per-site `sectionRef` vocabulary. Bundling\n * both saves consumers from having to thread the manifest just to\n * map a ref back to its category.\n *\n * **Why a separate file from the hook**: same Fast-Refresh rationale\n * as the runtime + page contexts.\n */\nexport interface WebsiteSectionContextValue {\n /**\n * The validated `WebsiteSectionRef` of the section currently\n * rendering. Composed by `useWebsiteLabel(leaf)` into the full key.\n */\n sectionRef: WebsiteSectionRef;\n /**\n * The semantic category of the section (`hero` / `cta` / etc.).\n * Sourced from the matching `WebsiteSectionDefinition.category`\n * by the host adapter and surfaced here so analytics + SEO\n * tooling does not need to re-resolve it.\n */\n category: WebsiteSectionCategory;\n}\n\nexport const WebsiteSectionContext: React.Context<WebsiteSectionContextValue | null> =\n createContext<WebsiteSectionContextValue | null>(null);\n\nexport interface WebsiteSectionContextProviderProps {\n value: WebsiteSectionContextValue;\n children: ReactNode;\n}\n\nexport function WebsiteSectionContextProvider({\n value,\n children,\n}: WebsiteSectionContextProviderProps): ReactNode {\n return (\n <WebsiteSectionContext.Provider value={value}>\n {children}\n </WebsiteSectionContext.Provider>\n );\n}\nWebsiteSectionContextProvider.displayName = 'WebsiteSectionContextProvider';\n/** @wildo_source:part:end saas.website.section.context */\n"]}
@@ -0,0 +1,13 @@
1
+ import { type WebsitePageContextValue } from './WebsitePageContext';
2
+ /**
3
+ * @wildo_source:part:start saas.website.use-page.hook facet:layer:core facet:family:website
4
+ *
5
+ * Returns the active page identity. Throws when called outside a
6
+ * `<WebsitePageLayout>` so a section dropped at the wrong level (eg.
7
+ * directly under the runtime provider, before the page layout) fails
8
+ * loud at first render rather than silently composing a malformed
9
+ * label key.
10
+ */
11
+ export declare function useWebsitePage(): WebsitePageContextValue;
12
+ /** @wildo_source:part:end saas.website.use-page.hook */
13
+ //# sourceMappingURL=useWebsitePage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useWebsitePage.d.ts","sourceRoot":"","sources":["../../../../../src/core/contexts/useWebsitePage.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,uBAAuB,EAC7B,MAAM,sBAAsB,CAAC;AAE9B;;;;;;;;GAQG;AACH,wBAAgB,cAAc,IAAI,uBAAuB,CAUxD;AACD,wDAAwD"}
@@ -0,0 +1,22 @@
1
+ import { useContext } from 'react';
2
+ import { WebsitePageContext, } from './WebsitePageContext.js';
3
+ /**
4
+ * @wildo_source:part:start saas.website.use-page.hook facet:layer:core facet:family:website
5
+ *
6
+ * Returns the active page identity. Throws when called outside a
7
+ * `<WebsitePageLayout>` so a section dropped at the wrong level (eg.
8
+ * directly under the runtime provider, before the page layout) fails
9
+ * loud at first render rather than silently composing a malformed
10
+ * label key.
11
+ */
12
+ export function useWebsitePage() {
13
+ const value = useContext(WebsitePageContext);
14
+ if (value === null) {
15
+ throw new Error('[useWebsitePage] must be called inside <WebsitePageLayout>. ' +
16
+ 'Sections that need to compose a label key require a page identity ' +
17
+ '— wrap your content in `<WebsitePageLayout pageRef="…">` first.');
18
+ }
19
+ return value;
20
+ }
21
+ /** @wildo_source:part:end saas.website.use-page.hook */
22
+ //# sourceMappingURL=useWebsitePage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useWebsitePage.js","sourceRoot":"","sources":["../../../../../src/core/contexts/useWebsitePage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,EACL,kBAAkB,GAEnB,MAAM,sBAAsB,CAAC;AAE9B;;;;;;;;GAQG;AACH,MAAM,UAAU,cAAc;IAC5B,MAAM,KAAK,GAAG,UAAU,CAAC,kBAAkB,CAAC,CAAC;IAC7C,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QACnB,MAAM,IAAI,KAAK,CACb,8DAA8D;YAC5D,oEAAoE;YACpE,iEAAiE,CACpE,CAAC;IACJ,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AACD,wDAAwD","sourcesContent":["import { useContext } from 'react';\n\nimport {\n WebsitePageContext,\n type WebsitePageContextValue,\n} from './WebsitePageContext';\n\n/**\n * @wildo_source:part:start saas.website.use-page.hook facet:layer:core facet:family:website\n *\n * Returns the active page identity. Throws when called outside a\n * `<WebsitePageLayout>` so a section dropped at the wrong level (eg.\n * directly under the runtime provider, before the page layout) fails\n * loud at first render rather than silently composing a malformed\n * label key.\n */\nexport function useWebsitePage(): WebsitePageContextValue {\n const value = useContext(WebsitePageContext);\n if (value === null) {\n throw new Error(\n '[useWebsitePage] must be called inside <WebsitePageLayout>. ' +\n 'Sections that need to compose a label key require a page identity ' +\n '— wrap your content in `<WebsitePageLayout pageRef=\"…\">` first.',\n );\n }\n return value;\n}\n/** @wildo_source:part:end saas.website.use-page.hook */\n"]}
@@ -0,0 +1,19 @@
1
+ import { type WebsiteRuntimeContextValue } from './WebsiteRuntimeContext';
2
+ /**
3
+ * @wildo_source:part:start saas.website.use-runtime.hook facet:layer:core facet:family:website
4
+ *
5
+ * `useWebsiteRuntime()` — read access to the
6
+ * `WebsiteRuntimeContextValue`. Throws if invoked outside of a
7
+ * `<WebsiteRuntimeContextProvider>` so a missing host adapter is
8
+ * detected at the first hook call (fail-loud).
9
+ *
10
+ * Section authors usually do NOT call this directly — prefer the
11
+ * higher-level hooks (`useWebsiteLabel`, `useWebsiteLabelByKey`,
12
+ * `useWebsiteDesignTokens`) which expose only the slice they need.
13
+ * Direct access is reserved for layout primitives and locale-aware
14
+ * formatters that legitimately need the active locale or the raw
15
+ * label pack.
16
+ */
17
+ export declare function useWebsiteRuntime(): WebsiteRuntimeContextValue;
18
+ /** @wildo_source:part:end saas.website.use-runtime.hook */
19
+ //# sourceMappingURL=useWebsiteRuntime.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useWebsiteRuntime.d.ts","sourceRoot":"","sources":["../../../../../src/core/contexts/useWebsiteRuntime.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,0BAA0B,EAChC,MAAM,yBAAyB,CAAC;AAEjC;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,IAAI,0BAA0B,CAU9D;AACD,2DAA2D"}
@@ -0,0 +1,28 @@
1
+ import { useContext } from 'react';
2
+ import { WebsiteRuntimeContext, } from './WebsiteRuntimeContext.js';
3
+ /**
4
+ * @wildo_source:part:start saas.website.use-runtime.hook facet:layer:core facet:family:website
5
+ *
6
+ * `useWebsiteRuntime()` — read access to the
7
+ * `WebsiteRuntimeContextValue`. Throws if invoked outside of a
8
+ * `<WebsiteRuntimeContextProvider>` so a missing host adapter is
9
+ * detected at the first hook call (fail-loud).
10
+ *
11
+ * Section authors usually do NOT call this directly — prefer the
12
+ * higher-level hooks (`useWebsiteLabel`, `useWebsiteLabelByKey`,
13
+ * `useWebsiteDesignTokens`) which expose only the slice they need.
14
+ * Direct access is reserved for layout primitives and locale-aware
15
+ * formatters that legitimately need the active locale or the raw
16
+ * label pack.
17
+ */
18
+ export function useWebsiteRuntime() {
19
+ const value = useContext(WebsiteRuntimeContext);
20
+ if (value === null) {
21
+ throw new Error('[useWebsiteRuntime] must be called inside <WebsiteRuntimeContextProvider>. ' +
22
+ 'In Astro pages this is provided by `WebsitePageBridge.astro` — make sure ' +
23
+ 'your page imports the bridge instead of rendering React components directly.');
24
+ }
25
+ return value;
26
+ }
27
+ /** @wildo_source:part:end saas.website.use-runtime.hook */
28
+ //# sourceMappingURL=useWebsiteRuntime.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useWebsiteRuntime.js","sourceRoot":"","sources":["../../../../../src/core/contexts/useWebsiteRuntime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,EACL,qBAAqB,GAEtB,MAAM,yBAAyB,CAAC;AAEjC;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,iBAAiB;IAC/B,MAAM,KAAK,GAAG,UAAU,CAAC,qBAAqB,CAAC,CAAC;IAChD,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QACnB,MAAM,IAAI,KAAK,CACb,6EAA6E;YAC3E,2EAA2E;YAC3E,8EAA8E,CACjF,CAAC;IACJ,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AACD,2DAA2D","sourcesContent":["import { useContext } from 'react';\n\nimport {\n WebsiteRuntimeContext,\n type WebsiteRuntimeContextValue,\n} from './WebsiteRuntimeContext';\n\n/**\n * @wildo_source:part:start saas.website.use-runtime.hook facet:layer:core facet:family:website\n *\n * `useWebsiteRuntime()` — read access to the\n * `WebsiteRuntimeContextValue`. Throws if invoked outside of a\n * `<WebsiteRuntimeContextProvider>` so a missing host adapter is\n * detected at the first hook call (fail-loud).\n *\n * Section authors usually do NOT call this directly — prefer the\n * higher-level hooks (`useWebsiteLabel`, `useWebsiteLabelByKey`,\n * `useWebsiteDesignTokens`) which expose only the slice they need.\n * Direct access is reserved for layout primitives and locale-aware\n * formatters that legitimately need the active locale or the raw\n * label pack.\n */\nexport function useWebsiteRuntime(): WebsiteRuntimeContextValue {\n const value = useContext(WebsiteRuntimeContext);\n if (value === null) {\n throw new Error(\n '[useWebsiteRuntime] must be called inside <WebsiteRuntimeContextProvider>. ' +\n 'In Astro pages this is provided by `WebsitePageBridge.astro` — make sure ' +\n 'your page imports the bridge instead of rendering React components directly.',\n );\n }\n return value;\n}\n/** @wildo_source:part:end saas.website.use-runtime.hook */\n"]}
@@ -0,0 +1,12 @@
1
+ import { type WebsiteSectionContextValue } from './WebsiteSectionContext';
2
+ /**
3
+ * @wildo_source:part:start saas.website.use-section.hook facet:layer:core facet:family:website
4
+ *
5
+ * Returns the active section identity + category. Throws when called
6
+ * outside `<WebsiteSection>` so a leaf primitive that needs the
7
+ * section ref (eg. a CMS-bound text block calling `useWebsiteLabel`)
8
+ * fails loud the moment it's dropped at the wrong nesting depth.
9
+ */
10
+ export declare function useWebsiteSection(): WebsiteSectionContextValue;
11
+ /** @wildo_source:part:end saas.website.use-section.hook */
12
+ //# sourceMappingURL=useWebsiteSection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useWebsiteSection.d.ts","sourceRoot":"","sources":["../../../../../src/core/contexts/useWebsiteSection.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,0BAA0B,EAChC,MAAM,yBAAyB,CAAC;AAEjC;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,IAAI,0BAA0B,CAW9D;AACD,2DAA2D"}
@@ -0,0 +1,22 @@
1
+ import { useContext } from 'react';
2
+ import { WebsiteSectionContext, } from './WebsiteSectionContext.js';
3
+ /**
4
+ * @wildo_source:part:start saas.website.use-section.hook facet:layer:core facet:family:website
5
+ *
6
+ * Returns the active section identity + category. Throws when called
7
+ * outside `<WebsiteSection>` so a leaf primitive that needs the
8
+ * section ref (eg. a CMS-bound text block calling `useWebsiteLabel`)
9
+ * fails loud the moment it's dropped at the wrong nesting depth.
10
+ */
11
+ export function useWebsiteSection() {
12
+ const value = useContext(WebsiteSectionContext);
13
+ if (value === null) {
14
+ throw new Error('[useWebsiteSection] must be called inside <WebsiteSection>. ' +
15
+ 'Leaf primitives that compose label keys (`useWebsiteLabel(leaf)`) ' +
16
+ 'require a section identity — wrap your content in ' +
17
+ '`<WebsiteSection sectionRef="…" category="…">` first.');
18
+ }
19
+ return value;
20
+ }
21
+ /** @wildo_source:part:end saas.website.use-section.hook */
22
+ //# sourceMappingURL=useWebsiteSection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useWebsiteSection.js","sourceRoot":"","sources":["../../../../../src/core/contexts/useWebsiteSection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,EACL,qBAAqB,GAEtB,MAAM,yBAAyB,CAAC;AAEjC;;;;;;;GAOG;AACH,MAAM,UAAU,iBAAiB;IAC/B,MAAM,KAAK,GAAG,UAAU,CAAC,qBAAqB,CAAC,CAAC;IAChD,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QACnB,MAAM,IAAI,KAAK,CACb,8DAA8D;YAC5D,oEAAoE;YACpE,oDAAoD;YACpD,uDAAuD,CAC1D,CAAC;IACJ,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AACD,2DAA2D","sourcesContent":["import { useContext } from 'react';\n\nimport {\n WebsiteSectionContext,\n type WebsiteSectionContextValue,\n} from './WebsiteSectionContext';\n\n/**\n * @wildo_source:part:start saas.website.use-section.hook facet:layer:core facet:family:website\n *\n * Returns the active section identity + category. Throws when called\n * outside `<WebsiteSection>` so a leaf primitive that needs the\n * section ref (eg. a CMS-bound text block calling `useWebsiteLabel`)\n * fails loud the moment it's dropped at the wrong nesting depth.\n */\nexport function useWebsiteSection(): WebsiteSectionContextValue {\n const value = useContext(WebsiteSectionContext);\n if (value === null) {\n throw new Error(\n '[useWebsiteSection] must be called inside <WebsiteSection>. ' +\n 'Leaf primitives that compose label keys (`useWebsiteLabel(leaf)`) ' +\n 'require a section identity — wrap your content in ' +\n '`<WebsiteSection sectionRef=\"…\" category=\"…\">` first.',\n );\n }\n return value;\n}\n/** @wildo_source:part:end saas.website.use-section.hook */\n"]}
@@ -0,0 +1,17 @@
1
+ import type { FrontendProviderEntry, FrontendProvidersBlock, ProviderCapability } from '@wildo-ai/saas-models/public-runtime';
2
+ export type FrontendWebsiteProviderRef = string & {
3
+ readonly __brand: 'FrontendWebsiteProviderRef';
4
+ };
5
+ export type FrontendWebsiteProviderModule = FrontendProviderEntry;
6
+ export interface FrontendWebsiteProviderRegistry {
7
+ readonly modules: ReadonlyMap<FrontendWebsiteProviderRef, FrontendWebsiteProviderModule>;
8
+ getProviderByRef(ref: FrontendWebsiteProviderRef): FrontendWebsiteProviderModule | undefined;
9
+ getProvidersByProviderCapability(providerCapability: ProviderCapability): ReadonlyArray<FrontendWebsiteProviderModule>;
10
+ findProviderByProviderCapability(providerCapability: ProviderCapability): FrontendWebsiteProviderModule | undefined;
11
+ }
12
+ /**
13
+ * Website-side public-provider registry hydrated from the materialized
14
+ * frontend-provider bootstrap block.
15
+ */
16
+ export declare function createFrontendWebsiteProviderRegistry(frontendProviders?: FrontendProvidersBlock): FrontendWebsiteProviderRegistry;
17
+ //# sourceMappingURL=frontend-provider-registry.website.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"frontend-provider-registry.website.d.ts","sourceRoot":"","sources":["../../../../../src/core/external-providers/frontend-provider-registry.website.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,sBAAsB,EACtB,kBAAkB,EACnB,MAAM,sCAAsC,CAAC;AAE9C,MAAM,MAAM,0BAA0B,GAAG,MAAM,GAAG;IAChD,QAAQ,CAAC,OAAO,EAAE,4BAA4B,CAAC;CAChD,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG,qBAAqB,CAAC;AAElE,MAAM,WAAW,+BAA+B;IAC9C,QAAQ,CAAC,OAAO,EAAE,WAAW,CAC3B,0BAA0B,EAC1B,6BAA6B,CAC9B,CAAC;IAEF,gBAAgB,CACd,GAAG,EAAE,0BAA0B,GAC9B,6BAA6B,GAAG,SAAS,CAAC;IAE7C,gCAAgC,CAC9B,kBAAkB,EAAE,kBAAkB,GACrC,aAAa,CAAC,6BAA6B,CAAC,CAAC;IAEhD,gCAAgC,CAC9B,kBAAkB,EAAE,kBAAkB,GACrC,6BAA6B,GAAG,SAAS,CAAC;CAC9C;AAED;;;GAGG;AACH,wBAAgB,qCAAqC,CACnD,iBAAiB,CAAC,EAAE,sBAAsB,GACzC,+BAA+B,CAwBjC"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Website-side public-provider registry hydrated from the materialized
3
+ * frontend-provider bootstrap block.
4
+ */
5
+ export function createFrontendWebsiteProviderRegistry(frontendProviders) {
6
+ const modules = new Map(Object.entries(frontendProviders?.providers ?? {}).map(([ref, provider]) => [
7
+ ref,
8
+ provider,
9
+ ]));
10
+ return {
11
+ modules,
12
+ getProviderByRef(ref) {
13
+ return modules.get(ref);
14
+ },
15
+ getProvidersByProviderCapability(providerCapability) {
16
+ return [...modules.values()].filter((provider) => provider.providerCapabilities.includes(providerCapability));
17
+ },
18
+ findProviderByProviderCapability(providerCapability) {
19
+ return [...modules.values()].find((provider) => provider.providerCapabilities.includes(providerCapability));
20
+ },
21
+ };
22
+ }
23
+ //# sourceMappingURL=frontend-provider-registry.website.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"frontend-provider-registry.website.js","sourceRoot":"","sources":["../../../../../src/core/external-providers/frontend-provider-registry.website.ts"],"names":[],"mappings":"AA+BA;;;GAGG;AACH,MAAM,UAAU,qCAAqC,CACnD,iBAA0C;IAE1C,MAAM,OAAO,GAAG,IAAI,GAAG,CACrB,MAAM,CAAC,OAAO,CAAC,iBAAiB,EAAE,SAAS,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,QAAQ,CAAC,EAAE,EAAE,CAAC;QAC1E,GAAiC;QACjC,QAAyC;KAC1C,CAAC,CACH,CAAC;IAEF,OAAO;QACL,OAAO;QACP,gBAAgB,CAAC,GAA+B;YAC9C,OAAO,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAC1B,CAAC;QACD,gCAAgC,CAAC,kBAAsC;YACrE,OAAO,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE,CAC/C,QAAQ,CAAC,oBAAoB,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAC3D,CAAC;QACJ,CAAC;QACD,gCAAgC,CAAC,kBAAsC;YACrE,OAAO,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAC7C,QAAQ,CAAC,oBAAoB,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAC3D,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["import type {\n FrontendProviderEntry,\n FrontendProvidersBlock,\n ProviderCapability,\n} from '@wildo-ai/saas-models/public-runtime';\n\nexport type FrontendWebsiteProviderRef = string & {\n readonly __brand: 'FrontendWebsiteProviderRef';\n};\n\nexport type FrontendWebsiteProviderModule = FrontendProviderEntry;\n\nexport interface FrontendWebsiteProviderRegistry {\n readonly modules: ReadonlyMap<\n FrontendWebsiteProviderRef,\n FrontendWebsiteProviderModule\n >;\n\n getProviderByRef(\n ref: FrontendWebsiteProviderRef,\n ): FrontendWebsiteProviderModule | undefined;\n\n getProvidersByProviderCapability(\n providerCapability: ProviderCapability,\n ): ReadonlyArray<FrontendWebsiteProviderModule>;\n\n findProviderByProviderCapability(\n providerCapability: ProviderCapability,\n ): FrontendWebsiteProviderModule | undefined;\n}\n\n/**\n * Website-side public-provider registry hydrated from the materialized\n * frontend-provider bootstrap block.\n */\nexport function createFrontendWebsiteProviderRegistry(\n frontendProviders?: FrontendProvidersBlock,\n): FrontendWebsiteProviderRegistry {\n const modules = new Map<FrontendWebsiteProviderRef, FrontendWebsiteProviderModule>(\n Object.entries(frontendProviders?.providers ?? {}).map(([ref, provider]) => [\n ref as FrontendWebsiteProviderRef,\n provider as FrontendWebsiteProviderModule,\n ]),\n );\n\n return {\n modules,\n getProviderByRef(ref: FrontendWebsiteProviderRef) {\n return modules.get(ref);\n },\n getProvidersByProviderCapability(providerCapability: ProviderCapability) {\n return [...modules.values()].filter((provider) =>\n provider.providerCapabilities.includes(providerCapability),\n );\n },\n findProviderByProviderCapability(providerCapability: ProviderCapability) {\n return [...modules.values()].find((provider) =>\n provider.providerCapabilities.includes(providerCapability),\n );\n },\n };\n}\n"]}
@@ -0,0 +1,70 @@
1
+ import type { ComponentType } from 'react';
2
+ import { type WebsitePageManifest, type WebsitePageMetaLabelKeys, type WebsitePageRoutePath, type WebsitePageSeoConfig, WebsitePageHydrationStrategy } from '../../schemas/manifests/website-page-manifest.shared.schemas';
3
+ import type { WebsitePageRef } from '../../schemas/refs/page-ref.schemas';
4
+ import type { WebsiteSectionRef } from '../../schemas/refs/section-ref.schemas';
5
+ /**
6
+ * @wildo_source:part:start saas.website.factories.define-page-manifest facet:layer:core facet:family:website
7
+ *
8
+ * Input shape consumed by `defineWebsitePageManifest<TProps>`.
9
+ *
10
+ * `TProps` is rarely non-empty for top-level marketing pages (which
11
+ * are usually rendered by Astro with no React-side props), but the
12
+ * generic exists for two legitimate cases:
13
+ * - templated pages (eg. `/blog/[slug]` whose page component
14
+ * accepts `{ slug, frontmatter }` from the Astro adapter),
15
+ * - pages whose host adapter wants to inject server-side resolved
16
+ * props (eg. an A/B-test variant id) before hydration.
17
+ *
18
+ * **String inputs vs. branded inputs**: `ref`, `routePath`, and
19
+ * `sectionRefs` accept raw strings — the factory parses them through
20
+ * the underlying schemas. Same ergonomic + safety trade-off as
21
+ * `defineWebsiteSection`.
22
+ */
23
+ export interface DefineWebsitePageManifestInput<TProps> {
24
+ ref: WebsitePageRef | string;
25
+ routePath: WebsitePageRoutePath | string;
26
+ pageComponent: ComponentType<TProps>;
27
+ sectionRefs: readonly (WebsiteSectionRef | string)[];
28
+ metaLabelKeys: WebsitePageMetaLabelKeys;
29
+ hydration?: WebsitePageHydrationStrategy;
30
+ seo?: WebsitePageSeoConfig;
31
+ }
32
+ /**
33
+ * Return shape of `defineWebsitePageManifest<TProps>`. Identical to
34
+ * `WebsitePageManifest` except `pageComponent` retains the
35
+ * caller-supplied generic prop shape.
36
+ */
37
+ export interface TypedWebsitePageManifest<TProps> extends Omit<WebsitePageManifest, 'pageComponent'> {
38
+ pageComponent: ComponentType<TProps>;
39
+ }
40
+ /**
41
+ * `defineWebsitePageManifest<TProps>` — factory that materializes a
42
+ * `WebsitePageManifest` from authored input.
43
+ *
44
+ * Same two responsibilities as `defineWebsiteSection`: runtime
45
+ * validation through the schema (incl. the schema's `superRefine`
46
+ * for unique sectionRefs and meta-key prefixing) plus type
47
+ * preservation for `pageComponent`.
48
+ *
49
+ * **Why a separate factory** (and not a single `defineWebsite*` API):
50
+ * a section and a page have different validation semantics
51
+ * (`expectedLabelKeys` discipline vs. `metaLabelKeys` prefix
52
+ * discipline) and different override paths (sections via L2
53
+ * import-swap; pages via root-config registration). Conflating them
54
+ * would force one of the two contracts onto the other's authors.
55
+ *
56
+ * @example
57
+ * export const LANDING_PAGE_MANIFEST = defineWebsitePageManifest({
58
+ * ref: 'landing',
59
+ * routePath: '/',
60
+ * pageComponent: LandingPage,
61
+ * sectionRefs: ['hero', 'social-proof', 'pricing-teaser', 'final-cta'],
62
+ * metaLabelKeys: {
63
+ * titleKey: WebsiteLabelKeySchema.parse('website.landing.meta.title'),
64
+ * descriptionKey: WebsiteLabelKeySchema.parse('website.landing.meta.description'),
65
+ * },
66
+ * });
67
+ */
68
+ export declare function defineWebsitePageManifest<TProps = Record<string, never>>(input: DefineWebsitePageManifestInput<TProps>): TypedWebsitePageManifest<TProps>;
69
+ /** @wildo_source:part:end saas.website.factories.define-page-manifest */
70
+ //# sourceMappingURL=define-website-page-manifest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"define-website-page-manifest.d.ts","sourceRoot":"","sources":["../../../../../src/core/factories/define-website-page-manifest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,4BAA4B,EAC7B,MAAM,8DAA8D,CAAC;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAC1E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAEhF;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,8BAA8B,CAAC,MAAM;IACpD,GAAG,EAAE,cAAc,GAAG,MAAM,CAAC;IAC7B,SAAS,EAAE,oBAAoB,GAAG,MAAM,CAAC;IACzC,aAAa,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACrC,WAAW,EAAE,SAAS,CAAC,iBAAiB,GAAG,MAAM,CAAC,EAAE,CAAC;IACrD,aAAa,EAAE,wBAAwB,CAAC;IACxC,SAAS,CAAC,EAAE,4BAA4B,CAAC;IACzC,GAAG,CAAC,EAAE,oBAAoB,CAAC;CAC5B;AAED;;;;GAIG;AACH,MAAM,WAAW,wBAAwB,CAAC,MAAM,CAC9C,SAAQ,IAAI,CAAC,mBAAmB,EAAE,eAAe,CAAC;IAClD,aAAa,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;CACtC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EACtE,KAAK,EAAE,8BAA8B,CAAC,MAAM,CAAC,GAC5C,wBAAwB,CAAC,MAAM,CAAC,CAmBlC;AACD,yEAAyE"}