@riverbankcms/sdk 0.77.1 → 0.78.2

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 (295) hide show
  1. package/README.md +114 -43
  2. package/dist/{PreviewEditorSidebar-DVUG7GK4.mjs → PreviewEditorSidebar-4DXLYX2V.mjs} +4962 -4885
  3. package/dist/{PreviewEditorUI-P7RN4CDS.mjs → PreviewEditorUI-CS5P4N3P.mjs} +4 -4
  4. package/dist/SdkPreviewModeRuntime-IJDHTW4W.mjs +8 -0
  5. package/dist/_dts/ai/src/contracts/proposals.d.ts +190 -154
  6. package/dist/_dts/api/src/accessAdmin.d.ts +5 -0
  7. package/dist/_dts/api/src/billing.d.ts +3 -26
  8. package/dist/_dts/api/src/bookingVerticals.d.ts +4 -0
  9. package/dist/_dts/api/src/content-editor.d.ts +1 -0
  10. package/dist/_dts/api/src/contentRuntime.d.ts +1 -0
  11. package/dist/_dts/api/src/demoDashboardMutationSurfaces.d.ts +46 -0
  12. package/dist/_dts/api/src/endpoints.d.ts +17 -0
  13. package/dist/_dts/api/src/index.d.ts +16 -4
  14. package/dist/_dts/api/src/navigation/dashboardBookingsNav.d.ts +87 -0
  15. package/dist/_dts/api/src/navigation/dashboardDemoNav.d.ts +5 -0
  16. package/dist/_dts/api/src/navigation/dashboardSettingsNav.d.ts +45 -0
  17. package/dist/_dts/api/src/navigation/dashboardSiteNav.d.ts +42 -0
  18. package/dist/_dts/api/src/navigation/dashboardTeamMemberNav.d.ts +24 -0
  19. package/dist/_dts/api/src/navigation/linkUrlType.d.ts +3 -0
  20. package/dist/_dts/api/src/navigation.d.ts +12 -0
  21. package/dist/_dts/api/src/public/types.d.ts +1 -1
  22. package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +55 -26
  23. package/dist/_dts/api/src/request.d.ts +3 -11
  24. package/dist/_dts/api/src/sdkConfig/contracts.d.ts +1 -0
  25. package/dist/_dts/api/src/sdkContracts.d.ts +7 -1
  26. package/dist/_dts/api/src/siteManagementEndpoints.d.ts +10 -0
  27. package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +1 -0
  28. package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +15 -19
  29. package/dist/_dts/api/src/staffAccess.d.ts +79 -0
  30. package/dist/_dts/api/src/types.d.ts +14 -27
  31. package/dist/_dts/api/src/workflows/automaticWorkflowTriggers.d.ts +21 -0
  32. package/dist/_dts/block-form/src/fields/types.d.ts +6 -0
  33. package/dist/_dts/block-form/src/widgets/RepeaterField/components/RepeaterList.d.ts +3 -2
  34. package/dist/_dts/block-form/src/widgets/RepeaterField/components/RepeaterRow.d.ts +6 -3
  35. package/dist/_dts/block-form/src/widgets/RepeaterField/components/RepeaterRowActions.d.ts +8 -3
  36. package/dist/_dts/block-form/src/widgets/RepeaterField/hooks/index.d.ts +1 -1
  37. package/dist/_dts/block-form/src/widgets/RepeaterField/hooks/useLinearRepeaterDnd.d.ts +1 -0
  38. package/dist/_dts/block-form/src/widgets/RepeaterField/hooks/useRepeaterPointerDragCapability.d.ts +1 -0
  39. package/dist/_dts/block-form/src/widgets/RepeaterField/hooks/useResolvedItemLabel.d.ts +7 -0
  40. package/dist/_dts/block-form/src/widgets/RepeaterField/utils/buildSummary.d.ts +1 -0
  41. package/dist/_dts/block-form/src/widgets/RepeaterField/utils/index.d.ts +3 -1
  42. package/dist/_dts/block-form/src/widgets/RepeaterField/utils/repeaterDndDomain.d.ts +1 -1
  43. package/dist/_dts/block-form/src/widgets/RepeaterField/utils/repeaterLabelSource.d.ts +15 -0
  44. package/dist/_dts/block-form/src/widgets/RepeaterField/utils/repeaterRowActionsDomain.d.ts +50 -0
  45. package/dist/_dts/blocks/src/client/site-chrome.d.ts +4 -1
  46. package/dist/_dts/blocks/src/index.d.ts +1 -0
  47. package/dist/_dts/blocks/src/system/blocks/appointment-booking.d.ts +879 -288
  48. package/dist/_dts/blocks/src/system/blocks/blog-listing.d.ts +879 -288
  49. package/dist/_dts/blocks/src/system/blocks/cart.d.ts +879 -288
  50. package/dist/_dts/blocks/src/system/blocks/checkout.d.ts +879 -288
  51. package/dist/_dts/blocks/src/system/blocks/collection.d.ts +879 -288
  52. package/dist/_dts/blocks/src/system/blocks/courses/shared/schemas.d.ts +2 -2
  53. package/dist/_dts/blocks/src/system/blocks/faq.d.ts +885 -289
  54. package/dist/_dts/blocks/src/system/blocks/gifting.d.ts +879 -288
  55. package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +3 -1
  56. package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +68 -21
  57. package/dist/_dts/blocks/src/system/blocks/product-detail.d.ts +879 -288
  58. package/dist/_dts/blocks/src/system/blocks/product-list.d.ts +879 -288
  59. package/dist/_dts/blocks/src/system/blocks/shop.d.ts +879 -288
  60. package/dist/_dts/blocks/src/system/blocks/team-members.d.ts +3 -0
  61. package/dist/_dts/blocks/src/system/data/index.d.ts +5 -3
  62. package/dist/_dts/blocks/src/system/data/previewResolvedDataState.d.ts +45 -0
  63. package/dist/_dts/blocks/src/system/fields/boxStyles.d.ts +2 -1
  64. package/dist/_dts/blocks/src/system/fragments/library/faqAccordion.d.ts +5 -0
  65. package/dist/_dts/blocks/src/system/manifest/schema.d.ts +193 -29
  66. package/dist/_dts/blocks/src/system/node/fragments/headingDecoration.d.ts +10 -0
  67. package/dist/_dts/blocks/src/system/node/fragments/index.d.ts +1 -0
  68. package/dist/_dts/blocks/src/system/node/fragments/styledSection.d.ts +9 -0
  69. package/dist/_dts/blocks/src/system/runtime/api/client.d.ts +3 -2
  70. package/dist/_dts/blocks/src/system/runtime/api/endpoints.d.ts +8 -0
  71. package/dist/_dts/blocks/src/system/runtime/api/index.d.ts +1 -1
  72. package/dist/_dts/blocks/src/system/runtime/api/types.d.ts +43 -8
  73. package/dist/_dts/blocks/src/system/runtime/header/shared.d.ts +8 -7
  74. package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessBookingFlow.state.d.ts +1 -1
  75. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.headless.state.d.ts +1 -1
  76. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventCompactRow.d.ts +1 -4
  77. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/utils.d.ts +7 -0
  78. package/dist/_dts/blocks/src/system/runtime/nodes/header-section.client.d.ts +2 -8
  79. package/dist/_dts/blocks/src/system/runtime/nodes/header-section.server.d.ts +2 -9
  80. package/dist/_dts/blocks/src/system/runtime/nodes/shop-cart-discount-ui.d.ts +5 -0
  81. package/dist/_dts/blocks/src/system/runtime/nodes/shop-checkout-form.d.ts +76 -0
  82. package/dist/_dts/blocks/src/system/runtime/nodes/shop-checkout.state.d.ts +1 -4
  83. package/dist/_dts/blocks/src/system/runtime/nodes/shop-commerce-store.d.ts +2 -0
  84. package/dist/_dts/blocks/src/system/runtime/nodes/shop-commerce.shared.d.ts +1 -0
  85. package/dist/_dts/blocks/src/system/runtime/nodes/shop-discount-apply.state.d.ts +52 -0
  86. package/dist/_dts/blocks/src/system/runtime/nodes/shop.state.d.ts +2 -4
  87. package/dist/_dts/blocks/src/system/runtime/nodes/useDiscountApply.d.ts +21 -0
  88. package/dist/_dts/blocks/src/system/runtime/shared/components/DiscountCodeDisclosure.d.ts +54 -0
  89. package/dist/_dts/blocks/src/system/runtime/shared/components/index.d.ts +2 -0
  90. package/dist/_dts/blocks/src/system/runtime/shared/index.d.ts +2 -2
  91. package/dist/_dts/blocks/src/system/transforms/registry/ui.d.ts +1 -1
  92. package/dist/_dts/blocks/src/system/transforms/typed.d.ts +1 -1
  93. package/dist/_dts/content-editor/src/contentTypeEditorContentState.d.ts +26 -0
  94. package/dist/_dts/content-editor/src/definitions/factory.d.ts +75 -0
  95. package/dist/_dts/content-editor/src/entryWorkflows.d.ts +2 -0
  96. package/dist/_dts/content-editor/src/footerBlocksEditorState.d.ts +76 -0
  97. package/dist/_dts/content-editor/src/index.d.ts +6 -1
  98. package/dist/_dts/content-editor/src/pageWorkflowContent.d.ts +29 -0
  99. package/dist/_dts/content-editor/src/ui/editorSnapshot.d.ts +2 -2
  100. package/dist/_dts/content-model/src/content-types/schema.d.ts +17 -3
  101. package/dist/_dts/content-model/src/index.d.ts +1 -0
  102. package/dist/_dts/content-model/src/routeTemplate.d.ts +4 -0
  103. package/dist/_dts/content-model/src/templates/bindingTypeCompatibility.d.ts +3 -1
  104. package/dist/_dts/content-model/src/templates/bindingValidation.d.ts +10 -4
  105. package/dist/_dts/content-model/src/templates/editorState.d.ts +25 -0
  106. package/dist/_dts/content-model/src/templates/fieldPaths.d.ts +20 -0
  107. package/dist/_dts/content-model/src/templates/manifestAdapter.d.ts +5 -2
  108. package/dist/_dts/core/src/branded.d.ts +108 -85
  109. package/dist/_dts/core/src/csv-cells.d.ts +10 -0
  110. package/dist/_dts/core/src/csv-date-filter.d.ts +27 -0
  111. package/dist/_dts/core/src/csv-escape.d.ts +1 -0
  112. package/dist/_dts/core/src/csv-filename.d.ts +18 -0
  113. package/dist/_dts/core/src/csv-render.d.ts +4 -0
  114. package/dist/_dts/core/src/csv-types.d.ts +116 -0
  115. package/dist/_dts/core/src/currency-format.d.ts +4 -0
  116. package/dist/_dts/core/src/demo-capability-policy.d.ts +29 -0
  117. package/dist/_dts/core/src/demo-claim-access.d.ts +14 -0
  118. package/dist/_dts/core/src/demo-lifecycle-status.d.ts +11 -0
  119. package/dist/_dts/core/src/demo-runtime.d.ts +47 -0
  120. package/dist/_dts/core/src/duration.d.ts +14 -0
  121. package/dist/_dts/core/src/editor-state.d.ts +7 -7
  122. package/dist/_dts/core/src/email-format.d.ts +10 -0
  123. package/dist/_dts/core/src/field-errors.d.ts +1 -0
  124. package/dist/_dts/core/src/form-submission-preview.d.ts +24 -0
  125. package/dist/_dts/core/src/index.d.ts +20 -0
  126. package/dist/_dts/core/src/number-input.d.ts +22 -0
  127. package/dist/_dts/core/src/participants.d.ts +2 -2
  128. package/dist/_dts/core/src/public-url-validation.d.ts +12 -0
  129. package/dist/_dts/core/src/slug.d.ts +39 -0
  130. package/dist/_dts/core/src/string.d.ts +19 -0
  131. package/dist/_dts/core/src/uuid.d.ts +6 -0
  132. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +11 -0
  133. package/dist/_dts/db/src/schemas/forms.d.ts +50 -50
  134. package/dist/_dts/editor-blocks/src/blockPayload.d.ts +1 -1
  135. package/dist/_dts/media-core/src/assetsInUseSummary.d.ts +34 -0
  136. package/dist/_dts/media-core/src/bulkDeletePlanning.d.ts +24 -0
  137. package/dist/_dts/media-core/src/canonicalCropReview.d.ts +66 -0
  138. package/dist/_dts/media-core/src/classifyAllPlanning.d.ts +48 -0
  139. package/dist/_dts/media-core/src/filename.d.ts +1 -0
  140. package/dist/_dts/media-core/src/index.d.ts +10 -0
  141. package/dist/_dts/media-core/src/mediaAssetUsageStatus.d.ts +47 -0
  142. package/dist/_dts/media-core/src/mediaSettingsState.d.ts +3 -0
  143. package/dist/_dts/media-core/src/portableMediaReferences.d.ts +38 -0
  144. package/dist/_dts/media-core/src/uploadVerificationContract.d.ts +28 -0
  145. package/dist/_dts/media-core/src/videoAssetRepair.d.ts +38 -0
  146. package/dist/_dts/media-editor/src/MediaEditor.d.ts +3 -1
  147. package/dist/_dts/media-editor/src/MediaPreview.d.ts +3 -1
  148. package/dist/_dts/media-editor/src/fieldUi.d.ts +5 -0
  149. package/dist/_dts/media-editor/src/index.d.ts +1 -1
  150. package/dist/_dts/media-editor/src/mediaEditorDebug.d.ts +1 -0
  151. package/dist/_dts/path-utils/src/index.d.ts +8 -0
  152. package/dist/_dts/path-utils/src/redirectPaths.d.ts +26 -0
  153. package/dist/_dts/path-utils/src/safeAppPath.d.ts +26 -0
  154. package/dist/_dts/preview-next/src/client/preview/SiteChromeCustomizeButton.d.ts +2 -1
  155. package/dist/_dts/preview-next/src/client/preview/SiteChromeCustomizeContext.d.ts +4 -0
  156. package/dist/_dts/preview-next/src/client/preview/previewDocumentFrame.d.ts +31 -0
  157. package/dist/_dts/sdk/src/cli/commands/push/consts.d.ts +1 -1
  158. package/dist/_dts/sdk/src/cli/commands/push/metadata.d.ts +2 -0
  159. package/dist/_dts/sdk/src/cli/commands/push/stale.d.ts +3 -3
  160. package/dist/_dts/sdk/src/cli/commands/push-execute.d.ts +7 -0
  161. package/dist/_dts/sdk/src/cli/commands/push.d.ts +2 -0
  162. package/dist/_dts/sdk/src/cli/content/reader.d.ts +13 -0
  163. package/dist/_dts/sdk/src/cli/content/writer.d.ts +2 -1
  164. package/dist/_dts/sdk/src/cli/helpers.d.ts +2 -0
  165. package/dist/_dts/sdk/src/cli/site-commands/commandKeys.d.ts +6 -6
  166. package/dist/_dts/sdk/src/cli/site-commands/commandRuntime.d.ts +5 -0
  167. package/dist/_dts/sdk/src/cli/site-commands/commandSurfaceDispatch.d.ts +4 -0
  168. package/dist/_dts/sdk/src/cli/site-commands/pageCommands.d.ts +5 -2
  169. package/dist/_dts/sdk/src/cli/site-commands/pushExecution.d.ts +10 -1
  170. package/dist/_dts/sdk/src/cli/site-commands/pushExecutionTypes.d.ts +1 -1
  171. package/dist/_dts/sdk/src/client/error.d.ts +3 -0
  172. package/dist/_dts/sdk/src/client/index.d.ts +2 -2
  173. package/dist/_dts/sdk/src/client/management/types.d.ts +6 -0
  174. package/dist/_dts/sdk/src/client/types.d.ts +39 -21
  175. package/dist/_dts/sdk/src/config/content-types.d.ts +7 -0
  176. package/dist/_dts/sdk/src/config/field-definitions.d.ts +2 -0
  177. package/dist/_dts/sdk/src/index.d.ts +2 -2
  178. package/dist/_dts/sdk/src/manifest/passes/pass1-fields.d.ts +16 -16
  179. package/dist/_dts/sdk/src/next/content-load-failure.d.ts +51 -0
  180. package/dist/_dts/sdk/src/next/index.d.ts +2 -1
  181. package/dist/_dts/sdk/src/next/types.d.ts +19 -0
  182. package/dist/_dts/sdk/src/portal/redirects.d.ts +1 -1
  183. package/dist/_dts/sdk/src/routing/index.d.ts +3 -2
  184. package/dist/_dts/sdk/src/routing/resolvePageContent.d.ts +71 -6
  185. package/dist/_dts/sdk/src/version.d.ts +1 -1
  186. package/dist/_dts/site-commands/src/commands.d.ts +15 -12
  187. package/dist/_dts/site-commands/src/index.d.ts +1 -0
  188. package/dist/_dts/site-commands/src/pagePaths.d.ts +6 -0
  189. package/dist/_dts/theme-core/src/accordions/siteStyleDefaults.d.ts +26 -0
  190. package/dist/_dts/theme-core/src/accordions/types.d.ts +1 -0
  191. package/dist/_dts/theme-core/src/blocks/vars/index.d.ts +1 -0
  192. package/dist/_dts/theme-core/src/fonts/index.d.ts +1 -0
  193. package/dist/_dts/theme-core/src/fonts/uploadFormat.d.ts +44 -0
  194. package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
  195. package/dist/_dts/theme-core/src/index.d.ts +3 -1
  196. package/dist/_dts/theme-core/src/mock-themes/all.d.ts +36 -24
  197. package/dist/_dts/theme-core/src/navigation/generateNavLinkCSS.d.ts +6 -1
  198. package/dist/_dts/theme-core/src/navigation/types.d.ts +12 -0
  199. package/dist/_dts/theme-core/src/palette/variants/types.d.ts +3 -3
  200. package/dist/_dts/theme-core/src/runtime/themeCssVarNames.d.ts +7 -0
  201. package/dist/_dts/theme-core/src/schema.d.ts +64 -18
  202. package/dist/_dts/theme-core/src/site-styles/appearancePresetCatalog.d.ts +214 -34
  203. package/dist/_dts/theme-core/src/site-styles/appearancePresetTypes.d.ts +5 -2
  204. package/dist/_dts/theme-core/src/site-styles/blockAppearancePresets.d.ts +214 -34
  205. package/dist/_dts/theme-core/src/site-styles/curatedSiteStyles.d.ts +24 -0
  206. package/dist/_dts/theme-core/src/site-styles/designState.d.ts +31 -3
  207. package/dist/_dts/theme-core/src/site-styles/generatedSchemas.d.ts +4 -4
  208. package/dist/_dts/theme-core/src/site-styles/headerLooks.d.ts +33 -1
  209. package/dist/_dts/theme-core/src/site-styles/rawStyleFields.d.ts +4 -2
  210. package/dist/_dts/theme-core/src/site-styles/runtimeCompiler.d.ts +9 -1
  211. package/dist/_dts/theme-core/src/site-styles/types.d.ts +27 -2
  212. package/dist/_dts/theme-core/src/siteChrome.d.ts +17 -34
  213. package/dist/_dts/theme-core/src/siteChromeOverlayClearance.d.ts +22 -0
  214. package/dist/_dts/theme-core/src/siteChromePlacement.d.ts +22 -0
  215. package/dist/_dts/theme-core/src/siteChromePlanning.d.ts +32 -0
  216. package/dist/_dts/theme-core/src/tokens/themeColorTokens.d.ts +2 -2
  217. package/dist/{altcha-B5XGSXP5.mjs → altcha-EKUEQ4RP.mjs} +1 -1
  218. package/dist/{chunk-IENWFSLO.mjs → chunk-4QEGTLK6.mjs} +1 -1
  219. package/dist/{chunk-ZYEJLCTN.mjs → chunk-6HYXHRAI.mjs} +5 -5
  220. package/dist/{chunk-VX7B5VAC.mjs → chunk-CR5HKAGU.mjs} +32 -5
  221. package/dist/{chunk-KWJPDZH2.mjs → chunk-MCRQMPET.mjs} +3793 -1201
  222. package/dist/{chunk-6SMUFTXD.mjs → chunk-OKMBEAXY.mjs} +1 -1
  223. package/dist/{chunk-XGB3TDIC.mjs → chunk-R7POPVJR.mjs} +2 -8
  224. package/dist/{chunk-2SPENC5M.mjs → chunk-RGTOD4AJ.mjs} +242 -57
  225. package/dist/cli/index.mjs +2361 -668
  226. package/dist/cli/init-docs/content/cli-reference.md +3 -2
  227. package/dist/cli/init-docs/content/content-management.md +2 -2
  228. package/dist/cli/init-docs/content/workflow-preview-mode.md +68 -2
  229. package/dist/client/{accordion-RZMQSYLR.mjs → accordion-PLYNJIIM.mjs} +2 -2
  230. package/dist/client/analytics.mjs +1 -1
  231. package/dist/client/{bookingForm-NF4ASVNV.mjs → bookingForm-BXAP6AO7.mjs} +76 -72
  232. package/dist/client/bookings.mjs +3765 -310
  233. package/dist/client/{carousel-LDX47ZIK.mjs → carousel-TRBXDHGF.mjs} +3 -4
  234. package/dist/client/{cart-RGXDS5F4.mjs → cart-Z7H3HJRS.mjs} +8 -8
  235. package/dist/client/{checkout-P7WWSNNY.mjs → checkout-WAFCUBIX.mjs} +8 -8
  236. package/dist/client/{chunk-II7O4XN3.mjs → chunk-75OUS5MT.mjs} +2 -2
  237. package/dist/client/{chunk-PMAIXMAB.mjs → chunk-AUJ5DBZJ.mjs} +42 -37
  238. package/dist/client/{chunk-TQ5MSPDX.mjs → chunk-CE7IBGVW.mjs} +3 -1
  239. package/dist/client/{chunk-E2TDNXCL.mjs → chunk-CWGTG37I.mjs} +2 -1
  240. package/dist/client/{chunk-UFSWADAO.mjs → chunk-DNRGY432.mjs} +6 -67
  241. package/dist/client/{chunk-GMVTOKYG.mjs → chunk-FUXW6VW2.mjs} +512 -66
  242. package/dist/client/{chunk-R56FQ3RR.mjs → chunk-JGXPTEI2.mjs} +322 -106
  243. package/dist/client/{chunk-L3DNHIJX.mjs → chunk-JRDUHZCT.mjs} +53 -53
  244. package/dist/client/{chunk-M3L3KYYR.mjs → chunk-UDNSI5PY.mjs} +12 -0
  245. package/dist/client/{chunk-JEZECJ3W.mjs → chunk-UVQEJJTN.mjs} +129 -3
  246. package/dist/client/{chunk-F7LHOKEH.mjs → chunk-XSV6KW4D.mjs} +1 -1
  247. package/dist/client/chunk-ZFHRN6W2.mjs +66 -0
  248. package/dist/client/{chunk-JNC7CGHX.mjs → chunk-ZI3LLBPZ.mjs} +3 -3
  249. package/dist/client/client.mjs +7577 -4979
  250. package/dist/client/{courseRegistration-7F65K5ZR.mjs → courseRegistration-AHFQHWIJ.mjs} +19 -16
  251. package/dist/client/{eventCalendar-GLSC5KTL.mjs → eventCalendar-LDXTV5R7.mjs} +10 -10
  252. package/dist/client/{eventCombined-ZHK4WKUR.mjs → eventCombined-A4JGTNJO.mjs} +10 -10
  253. package/dist/client/{eventDetails-E3PJYBIN.mjs → eventDetails-4YXTZ7EG.mjs} +10 -10
  254. package/dist/client/{eventListing-EMS3WC3E.mjs → eventListing-P72TPFFM.mjs} +10 -10
  255. package/dist/client/{eventRegistration-NZOTVNPI.mjs → eventRegistration-LSYJHGMT.mjs} +10 -10
  256. package/dist/client/{form-ETFZFATW.mjs → form-AOPYOKOW.mjs} +10 -7
  257. package/dist/client/{headerSection-4LBP7ULT.mjs → headerSection-5TFYDFVQ.mjs} +3 -3
  258. package/dist/client/hooks.mjs +1119 -327
  259. package/dist/client/{locationMap-5M655YSJ.mjs → locationMap-QSZ3ZVAZ.mjs} +3 -3
  260. package/dist/client/{newsletterForm-QOUYW44O.mjs → newsletterForm-KTRHZY52.mjs} +3 -3
  261. package/dist/client/{productDetail-O4DOCWQG.mjs → productDetail-N4E775RG.mjs} +8 -8
  262. package/dist/client/{productList-A5RO5WIS.mjs → productList-UGUQ2S45.mjs} +8 -8
  263. package/dist/client/rendering/client.mjs +7262 -2775
  264. package/dist/client/rendering/islands.mjs +19 -19
  265. package/dist/client/rendering.mjs +6964 -4587
  266. package/dist/client/{shop-L4MZH4I2.mjs → shop-VHSZEEQ2.mjs} +8 -8
  267. package/dist/preview-next/before-render.mjs +18 -1
  268. package/dist/preview-next/client/runtime.mjs +6 -6
  269. package/dist/preview-next/editor-chrome.css +10 -0
  270. package/dist/preview-next/middleware.mjs +18 -1
  271. package/dist/preview-next/tailwind-sources.css +1 -0
  272. package/dist/sdk-runtime-WHPJEF5G.mjs +8 -0
  273. package/dist/server/components.mjs +2736 -1316
  274. package/dist/server/config-template-validation.mjs +221 -15
  275. package/dist/server/config-validation.mjs +1346 -550
  276. package/dist/server/config.mjs +1346 -550
  277. package/dist/server/data.mjs +1118 -326
  278. package/dist/server/index.mjs +514 -251
  279. package/dist/server/next.mjs +4446 -2444
  280. package/dist/server/page-converter.mjs +631 -155
  281. package/dist/server/prebuild.mjs +1 -1
  282. package/dist/server/rendering/server.mjs +2743 -1323
  283. package/dist/server/rendering.mjs +2764 -1328
  284. package/dist/server/routing.mjs +1860 -590
  285. package/dist/server/server.mjs +1622 -575
  286. package/dist/server/theme-bridge.mjs +3151 -131
  287. package/dist/server/theme.mjs +10 -1
  288. package/dist/styles/index.css +488 -48
  289. package/package.json +2 -1
  290. package/dist/SdkPreviewModeRuntime-KLPX47SE.mjs +0 -8
  291. package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/DiscountCodeSection.d.ts +0 -7
  292. package/dist/_dts/preview-next/src/client/widgets/PreviewMediaField.d.ts +0 -4
  293. package/dist/client/chunk-OJPZEZU2.mjs +0 -31
  294. package/dist/client/chunk-RTZ3JKKX.mjs +0 -178
  295. package/dist/sdk-runtime-6UT2S7KZ.mjs +0 -8
@@ -86,7 +86,7 @@ function ze() {
86
86
  /* @__PURE__ */ Te(P)
87
87
  );
88
88
  }
89
- function z12(e) {
89
+ function z18(e) {
90
90
  if (L) {
91
91
  if (/* @__PURE__ */ Te(P) !== null)
92
92
  throw Tt(), Je;
@@ -2115,12 +2115,12 @@ function ha(e, t) {
2115
2115
  var mt = we(Dr, 2);
2116
2116
  let Pr;
2117
2117
  var We = X(mt);
2118
- en(We), We.__change = ui, z12(mt);
2118
+ en(We), We.__change = ui, z18(mt);
2119
2119
  var Ut = we(mt, 2), wi = X(Ut);
2120
2120
  {
2121
2121
  var pi = (n) => {
2122
2122
  var u = na(), _ = Gr(u), y = X(_);
2123
- Ge(y, () => c(re).verified), z12(_);
2123
+ Ge(y, () => c(re).verified), z18(_);
2124
2124
  var T = we(_, 2);
2125
2125
  en(T), Pe(() => {
2126
2126
  se(T, "name", V()), jo(T, c(Le));
@@ -2129,10 +2129,10 @@ function ha(e, t) {
2129
2129
  {
2130
2130
  var _ = (T) => {
2131
2131
  var E = ia(), p = X(E);
2132
- Ge(p, () => c(re).verifying), z12(E), ne(T, E);
2132
+ Ge(p, () => c(re).verifying), z18(E), ne(T, E);
2133
2133
  }, y = (T) => {
2134
2134
  var E = oa(), p = X(E);
2135
- Ge(p, () => c(re).label), z12(E), Pe(() => se(E, "for", c(cr))), ne(T, E);
2135
+ Ge(p, () => c(re).label), z18(E), Pe(() => se(E, "for", c(cr))), ne(T, E);
2136
2136
  };
2137
2137
  $e(
2138
2138
  n,
@@ -2147,18 +2147,18 @@ function ha(e, t) {
2147
2147
  c(C) === b.VERIFIED ? n(pi) : n(bi, false);
2148
2148
  });
2149
2149
  }
2150
- z12(Ut);
2150
+ z18(Ut);
2151
2151
  var yi = we(Ut, 2);
2152
2152
  {
2153
2153
  var Ei = (n) => {
2154
2154
  var u = aa(), _ = X(u);
2155
- se(_, "href", sr), z12(u), Pe(() => se(_, "aria-label", c(re).ariaLinkLabel)), ne(n, u);
2155
+ se(_, "href", sr), z18(u), Pe(() => se(_, "aria-label", c(re).ariaLinkLabel)), ne(n, u);
2156
2156
  };
2157
2157
  $e(yi, (n) => {
2158
2158
  (N() !== true || c(Dt)) && n(Ei);
2159
2159
  });
2160
2160
  }
2161
- z12(Mt);
2161
+ z18(Mt);
2162
2162
  var Or = we(Mt, 2);
2163
2163
  {
2164
2164
  var xi = (n) => {
@@ -2166,16 +2166,16 @@ function ha(e, t) {
2166
2166
  {
2167
2167
  var y = (E) => {
2168
2168
  var p = la(), x = X(p);
2169
- Ge(x, () => c(re).expired), z12(p), Pe(() => se(p, "title", c(He))), ne(E, p);
2169
+ Ge(x, () => c(re).expired), z18(p), Pe(() => se(p, "title", c(He))), ne(E, p);
2170
2170
  }, T = (E) => {
2171
2171
  var p = sa(), x = X(p);
2172
- Ge(x, () => c(re).error), z12(p), Pe(() => se(p, "title", c(He))), ne(E, p);
2172
+ Ge(x, () => c(re).error), z18(p), Pe(() => se(p, "title", c(He))), ne(E, p);
2173
2173
  };
2174
2174
  $e(_, (E) => {
2175
2175
  c(C) === b.EXPIRED ? E(y) : E(T, false);
2176
2176
  });
2177
2177
  }
2178
- z12(u), ne(n, u);
2178
+ z18(u), ne(n, u);
2179
2179
  };
2180
2180
  $e(Or, (n) => {
2181
2181
  (c(He) || c(C) === b.EXPIRED) && n(xi);
@@ -2185,7 +2185,7 @@ function ha(e, t) {
2185
2185
  {
2186
2186
  var $i = (n) => {
2187
2187
  var u = ua(), _ = X(u), y = X(_);
2188
- Ge(y, () => c(re).footer), z12(_), z12(u), ne(n, u);
2188
+ Ge(y, () => c(re).footer), z18(_), z18(u), ne(n, u);
2189
2189
  };
2190
2190
  $e(Fr, (n) => {
2191
2191
  c(re).footer && (k() !== true || c(Dt)) && n($i);
@@ -2201,7 +2201,7 @@ function ha(e, t) {
2201
2201
  v() && n(Ci);
2202
2202
  });
2203
2203
  }
2204
- return z12(ot), nn(ot, (n) => D(B, n), () => c(B)), Pe(
2204
+ return z18(ot), nn(ot, (n) => D(B, n), () => c(B)), Pe(
2205
2205
  (n) => {
2206
2206
  se(ot, "data-state", c(C)), se(ot, "data-floating", v()), Pr = Fo(mt, 1, "altcha-checkbox", null, Pr, n), se(We, "id", c(cr)), We.required = r2() !== "onsubmit" && (!v() || r2() !== "off");
2207
2207
  },
@@ -2990,6 +2990,10 @@ var DISCOUNTS = {
2990
2990
  available: {
2991
2991
  path: "/public/sites/{siteId}/bookings/discounts/available",
2992
2992
  method: "POST"
2993
+ },
2994
+ apply: {
2995
+ path: "/public/sites/{siteId}/bookings/discounts/apply",
2996
+ method: "POST"
2993
2997
  }
2994
2998
  };
2995
2999
  var NEWSLETTER = {
@@ -3601,6 +3605,14 @@ function createBlockApi(config) {
3601
3605
  body: { context: data.context, subtotalCents: data.subtotalCents }
3602
3606
  });
3603
3607
  },
3608
+ async applyDiscountCode(data) {
3609
+ const sid = requireSiteId();
3610
+ const path = buildPath(DISCOUNTS.apply.path, { siteId: sid });
3611
+ return request(DISCOUNTS.apply, {
3612
+ path,
3613
+ body: data
3614
+ });
3615
+ },
3604
3616
  // Shop
3605
3617
  async getPublicProducts(params) {
3606
3618
  const sid = requireSiteId();
@@ -5003,12 +5015,12 @@ var personalitiesById = new Map(
5003
5015
  );
5004
5016
 
5005
5017
  // ../core/src/branded.ts
5006
- var asSiteId = (id) => id;
5007
- var asFormId = (id) => id;
5008
- var asPassId = (id) => id;
5009
- var asCustomerPassId = (id) => id;
5010
- var asAppointmentServiceId = (id) => id;
5011
- var asAppointmentResourceId = (id) => id;
5018
+ var unsafeAsSiteId = (id) => id;
5019
+ var unsafeAsFormId = (id) => id;
5020
+ var unsafeAsPassId = (id) => id;
5021
+ var unsafeAsCustomerPassId = (id) => id;
5022
+ var unsafeAsAppointmentServiceId = (id) => id;
5023
+ var unsafeAsAppointmentResourceId = (id) => id;
5012
5024
 
5013
5025
  // ../core/src/date-math.ts
5014
5026
  function addDaysToDate(date, dayCount) {
@@ -5256,7 +5268,8 @@ var accordionSystemSchema = z5.object({
5256
5268
  icon: z5.object({
5257
5269
  style: accordionIconSchema,
5258
5270
  position: z5.enum(["left", "right"]),
5259
- size: z5.enum(["sm", "md", "lg"])
5271
+ size: z5.enum(["sm", "md", "lg"]),
5272
+ colorToken: themeColorTokenSchema.optional()
5260
5273
  }),
5261
5274
  // Trigger (question) styling
5262
5275
  trigger: z5.object({
@@ -5276,10 +5289,108 @@ var accordionSystemSchema = z5.object({
5276
5289
  })
5277
5290
  });
5278
5291
 
5292
+ // ../theme-core/src/site-styles/types.ts
5293
+ function asAppearancePresetId(value) {
5294
+ return brandNonEmptyString(value, "AppearancePresetId");
5295
+ }
5296
+ function asSiteStyleId(value) {
5297
+ const siteStyleId = brandNonEmptyString(value, "SiteStyleId");
5298
+ if (!siteStyleId.startsWith("site-style:")) {
5299
+ throw new Error(
5300
+ `SiteStyleId must start with "site-style:". Received: ${value}`
5301
+ );
5302
+ }
5303
+ return siteStyleId;
5304
+ }
5305
+ function asDesignSystemTemplateId(value) {
5306
+ return brandNonEmptyString(value, "DesignSystemTemplateId");
5307
+ }
5308
+ function assertNever3(value, message = "Unhandled Theme V2 variant") {
5309
+ throw new Error(`${message}: ${String(value)}`);
5310
+ }
5311
+ function brandNonEmptyString(value, label) {
5312
+ if (value.length === 0) {
5313
+ throw new Error(`${label} must be a non-empty string.`);
5314
+ }
5315
+ return value;
5316
+ }
5317
+ var plainFrame = {
5318
+ kind: "plain"
5319
+ };
5320
+ function panelFrame(treatment) {
5321
+ return { kind: "panel", treatment };
5322
+ }
5323
+ function flushPanelFrame(options) {
5324
+ return {
5325
+ kind: "flush-panel",
5326
+ treatment: options.treatment ?? "media-panel",
5327
+ bleed: options.bleed
5328
+ };
5329
+ }
5330
+ var tileTreatmentValues = [
5331
+ "default",
5332
+ "quiet",
5333
+ "brand-depth"
5334
+ ];
5335
+ var eventListTreatmentValues = [
5336
+ "plain",
5337
+ "lined-panel"
5338
+ ];
5339
+ var eyebrowTreatmentValues = [
5340
+ "plain",
5341
+ "pill",
5342
+ "accent-pill",
5343
+ "pill-bounce",
5344
+ "accent-pill-bounce"
5345
+ ];
5346
+ var visibleHeadingDecorationFamilyValues = [
5347
+ "organic-squiggle",
5348
+ "short-center-rule"
5349
+ ];
5350
+ var visibleHeadingDecorationPlacementValues = [
5351
+ "after-heading",
5352
+ "between-heading-and-body",
5353
+ "under-centered-heading"
5354
+ ];
5355
+ var headingDecorationOverrideValues = [
5356
+ "site-default",
5357
+ "on",
5358
+ "off"
5359
+ ];
5360
+ var headingDecorationColorTokenValues = [
5361
+ "text",
5362
+ "primary",
5363
+ "secondary",
5364
+ "accent",
5365
+ "border",
5366
+ "muted"
5367
+ ];
5368
+ var accordionIconSetValues = [
5369
+ "plus",
5370
+ "chevron",
5371
+ "caret",
5372
+ "minimal-cross"
5373
+ ];
5374
+ var accordionIconColorTokenValues = [
5375
+ "text",
5376
+ "muted",
5377
+ "primary",
5378
+ "secondary",
5379
+ "accent",
5380
+ "current"
5381
+ ];
5382
+ var accordionIconMotionValues = [
5383
+ "none",
5384
+ "rotate",
5385
+ "swap"
5386
+ ];
5387
+
5279
5388
  // ../blocks/src/system/runtime/nodes/spinner.tsx
5280
5389
  import { jsx as jsx2, jsxs } from "react/jsx-runtime";
5281
5390
  function resolveColorStyle(color) {
5282
5391
  switch (color) {
5392
+ case void 0:
5393
+ return void 0;
5283
5394
  case "inherit":
5284
5395
  return { color: "inherit" };
5285
5396
  case "foreground":
@@ -5349,13 +5460,44 @@ function SpinnerNode({
5349
5460
  }
5350
5461
 
5351
5462
  // ../frontend-state/dist/index.mjs
5352
- function okWith(data) {
5463
+ var IDLE_FEEDBACK = idleFeedback();
5464
+ function idleFeedback() {
5465
+ return { tag: "idle" };
5466
+ }
5467
+ function clearWorkflowFeedback(state) {
5468
+ return {
5469
+ ...state,
5470
+ feedback: idleSubmissionFeedback()
5471
+ };
5472
+ }
5473
+ function reportWorkflowError(state, message) {
5474
+ return {
5475
+ ...state,
5476
+ feedback: errorSubmissionFeedback(message)
5477
+ };
5478
+ }
5479
+ function reportWorkflowSuccess(state, message) {
5480
+ return {
5481
+ ...state,
5482
+ feedback: successSubmissionFeedback(message)
5483
+ };
5484
+ }
5485
+ function idleSubmissionFeedback() {
5486
+ return { tag: "idle" };
5487
+ }
5488
+ function errorSubmissionFeedback(message) {
5489
+ return { tag: "error", message };
5490
+ }
5491
+ function successSubmissionFeedback(message) {
5492
+ return { tag: "success", message };
5493
+ }
5494
+ function okWith2(data) {
5353
5495
  return { ok: true, data };
5354
5496
  }
5355
- function err(error) {
5497
+ function err2(error) {
5356
5498
  return { ok: false, error };
5357
5499
  }
5358
- function assertNever3(value, message) {
5500
+ function assertNever11(value, message) {
5359
5501
  throw new Error(message ?? `Unexpected value: ${String(value)}`);
5360
5502
  }
5361
5503
 
@@ -5510,7 +5652,7 @@ function deriveBookingFormViewState(input) {
5510
5652
  resourceName: input.verificationState.resourceName
5511
5653
  };
5512
5654
  default:
5513
- return assertNever3(input.verificationState);
5655
+ return assertNever11(input.verificationState);
5514
5656
  }
5515
5657
  }
5516
5658
  function resolveBookingSiteId(siteId, form) {
@@ -5680,7 +5822,7 @@ function getBookingServicePaymentSelectionMode(service) {
5680
5822
  case "flexible_balance":
5681
5823
  return "implicit_flexible_balance";
5682
5824
  default:
5683
- return assertNever3(onlyKind);
5825
+ return assertNever11(onlyKind);
5684
5826
  }
5685
5827
  }
5686
5828
  if (allowedKinds.length === 2 && allowedKinds.includes("upfront") && (allowedKinds.includes("deferred_manual") || allowedKinds.includes("instalment_plan") || allowedKinds.includes("flexible_balance"))) {
@@ -5882,7 +6024,7 @@ function formatBookingSubmissionPreparationError(error) {
5882
6024
  case "service-missing-duration":
5883
6025
  return `Service "${error.serviceTitle}" is missing duration. Please update the service in the dashboard to include a duration (e.g., 30 minutes).`;
5884
6026
  default:
5885
- return assertNever3(error);
6027
+ return assertNever11(error);
5886
6028
  }
5887
6029
  }
5888
6030
  function getBookingSuccessMessage(successMessage) {
@@ -5900,107 +6042,241 @@ var logger = {
5900
6042
  withFields: (_) => logger
5901
6043
  };
5902
6044
 
5903
- // ../theme-core/src/inputs/types.ts
6045
+ // ../theme-core/src/utils/tokenOrColor.ts
5904
6046
  import { z as z6 } from "zod";
5905
- var inputSystemSchema = z6.object({
6047
+ var tokenOrCssColorValueSchema = z6.string();
6048
+
6049
+ // ../theme-core/src/site-styles/headerCtaVariants.ts
6050
+ function hasButtonVariant(theme, variantId) {
6051
+ return theme.buttons?.variants.some((variant) => variant.enabled && variant.id === variantId) ?? false;
6052
+ }
6053
+ function resolveHeaderCtaVariant(theme, treatment) {
6054
+ switch (treatment) {
6055
+ case "default":
6056
+ return void 0;
6057
+ case "primary":
6058
+ return "primary";
6059
+ case "secondary":
6060
+ return hasButtonVariant(theme, "secondary") ? "secondary" : "primary";
6061
+ case "inverted":
6062
+ if (hasButtonVariant(theme, "header")) return "header";
6063
+ if (hasButtonVariant(theme, "secondary")) return "secondary";
6064
+ if (hasButtonVariant(theme, "outline")) return "outline";
6065
+ return "primary";
6066
+ case "outline":
6067
+ return hasButtonVariant(theme, "outline") ? "outline" : "secondary";
6068
+ case "ghost":
6069
+ return hasButtonVariant(theme, "ghost") ? "ghost" : "secondary";
6070
+ }
6071
+ }
6072
+
6073
+ // ../theme-core/src/palette/variants/types.ts
6074
+ import { z as z17 } from "zod";
6075
+
6076
+ // ../theme-core/src/schema.ts
6077
+ import { z as z16 } from "zod";
6078
+
6079
+ // ../theme-core/src/lib/media.ts
6080
+ import z7 from "zod";
6081
+ var hotspotSchema = z7.object({
6082
+ x: z7.number().min(0).max(1),
6083
+ y: z7.number().min(0).max(1),
6084
+ radius: z7.number().optional()
6085
+ });
6086
+ var rotationSchema = z7.union([z7.literal(0), z7.literal(90), z7.literal(180), z7.literal(270)]);
6087
+ var rectSchema = z7.tuple([z7.number(), z7.number(), z7.number(), z7.number()]);
6088
+ var aspectCropSchema = z7.object({
6089
+ aspect: z7.preprocess((value) => value == null ? void 0 : value, z7.string().optional()),
6090
+ rect: z7.preprocess((value) => value == null ? void 0 : value, rectSchema.optional()),
6091
+ hotspot: z7.preprocess((value) => value == null ? void 0 : value, hotspotSchema.optional()),
6092
+ rotation: z7.preprocess((value) => value == null ? void 0 : value, rotationSchema.optional())
6093
+ });
6094
+ var transformSchema = z7.object({
6095
+ aspectCrops: z7.preprocess((value) => {
6096
+ if (!value || typeof value !== "object" || Array.isArray(value)) {
6097
+ return void 0;
6098
+ }
6099
+ return value;
6100
+ }, z7.record(z7.string(), aspectCropSchema.catch({}))).optional(),
6101
+ rect: rectSchema.optional(),
6102
+ hotspot: hotspotSchema.optional(),
6103
+ rotation: rotationSchema.optional()
6104
+ });
6105
+ var mediaSchema = z7.object({
6106
+ type: z7.enum(["image", "video", "audio", "document", "spreadsheet", "archive"]),
6107
+ purpose: z7.string().optional(),
6108
+ placeholder: z7.boolean().default(true).optional(),
6109
+ assetId: z7.string().optional(),
6110
+ identifier: z7.string().optional(),
6111
+ src: z7.string().optional(),
6112
+ alt: z7.string().optional(),
6113
+ filename: z7.string().optional(),
6114
+ mimeType: z7.string().optional(),
6115
+ width: z7.number().optional(),
6116
+ height: z7.number().optional(),
6117
+ storageBucket: z7.string().optional(),
6118
+ storagePath: z7.string().optional(),
6119
+ transform: transformSchema.optional()
6120
+ });
6121
+
6122
+ // ../theme-core/src/cards/types.ts
6123
+ import { z as z8 } from "zod";
6124
+ var cardSpacingSchema = z8.enum(["none", "compact", "cozy", "medium", "comfortable", "spacious"]);
6125
+ var gradientDirectionSchema2 = z8.enum(["to-r", "to-l", "to-t", "to-b", "to-tr", "to-tl", "to-br", "to-bl"]);
6126
+ var cardBackgroundSchema = z8.discriminatedUnion("type", [
6127
+ z8.object({ type: z8.literal("solid"), colorToken: themeColorTokenSchema }),
6128
+ z8.object({
6129
+ type: z8.literal("gradient"),
6130
+ fromToken: themeColorTokenSchema,
6131
+ toToken: themeColorTokenSchema,
6132
+ direction: gradientDirectionSchema2
6133
+ }),
6134
+ z8.object({ type: z8.literal("transparent") })
6135
+ ]);
6136
+ var cardBorderSchema = z8.object({
6137
+ widthClass: z8.string(),
6138
+ colorToken: themeColorTokenSchema
6139
+ });
6140
+ var cardVariantSchema = z8.object({
6141
+ id: z8.string(),
6142
+ name: z8.string().min(1).max(20),
6143
+ enabled: z8.boolean(),
6144
+ priority: z8.union([z8.literal(1), z8.literal(2), z8.literal(3)]),
6145
+ // Appearance (token-based)
6146
+ background: cardBackgroundSchema,
6147
+ spacing: cardSpacingSchema,
6148
+ // Optional overrides (uses theme defaults if not specified)
6149
+ shadow: z8.object({
6150
+ elevation: z8.enum(["none", "low", "medium", "high"]),
6151
+ softness: z8.enum(["crisp", "soft", "hard"]).nullable(),
6152
+ position: z8.enum(["bottom", "bottom-right"]).default("bottom")
6153
+ }).optional(),
6154
+ corners: z8.enum(["square", "soft", "rounded", "pill"]).optional(),
6155
+ // Border (optional)
6156
+ border: cardBorderSchema.optional()
6157
+ });
6158
+ var cardSystemSchema = z8.object({
6159
+ variants: z8.array(cardVariantSchema).min(1).max(3)
6160
+ });
6161
+
6162
+ // ../theme-core/src/inputs/types.ts
6163
+ import { z as z9 } from "zod";
6164
+ var inputSystemSchema = z9.object({
5906
6165
  // Base styling (applied to all inputs)
5907
- base: z6.object({
5908
- background: z6.union([
5909
- z6.object({
5910
- type: z6.literal("solid"),
6166
+ base: z9.object({
6167
+ background: z9.union([
6168
+ z9.object({
6169
+ type: z9.literal("solid"),
5911
6170
  colorToken: themeColorTokenSchema
5912
6171
  }),
5913
- z6.object({
5914
- type: z6.literal("transparent")
6172
+ z9.object({
6173
+ type: z9.literal("transparent")
5915
6174
  })
5916
6175
  ]),
5917
6176
  textColorToken: themeColorTokenSchema,
5918
- border: z6.object({
5919
- widthClass: z6.string(),
6177
+ border: z9.object({
6178
+ widthClass: z9.string(),
5920
6179
  // e.g., 'border', 'border-2'
5921
6180
  colorToken: themeColorTokenSchema,
5922
- style: z6.enum(["all", "underline"]).optional()
6181
+ style: z9.enum(["all", "underline"]).optional()
5923
6182
  }),
5924
- corners: z6.enum(["square", "soft", "rounded", "pill"]).nullable(),
6183
+ corners: z9.enum(["square", "soft", "rounded", "pill"]).nullable(),
5925
6184
  // null = inherit from theme.corners
5926
- shadow: z6.object({
5927
- elevation: z6.enum(["none", "low", "medium"]),
5928
- softness: z6.enum(["soft", "crisp", "hard"]).nullable()
6185
+ shadow: z9.object({
6186
+ elevation: z9.enum(["none", "low", "medium"]),
6187
+ softness: z9.enum(["soft", "crisp", "hard"]).nullable()
5929
6188
  }).nullable(),
5930
- spacing: z6.enum(["compact", "cozy", "medium", "comfortable"]),
6189
+ spacing: z9.enum(["compact", "cozy", "medium", "comfortable"]),
5931
6190
  // padding inside inputs
5932
- fontSize: z6.enum(["sm", "base", "lg"])
6191
+ fontSize: z9.enum(["sm", "base", "lg"])
5933
6192
  }),
5934
6193
  // Label styling
5935
- label: z6.object({
6194
+ label: z9.object({
5936
6195
  textColorToken: themeColorTokenSchema,
5937
- fontWeight: z6.enum(["regular", "medium", "semibold", "bold", "black"]),
5938
- fontSize: z6.enum(["2xs", "xs", "sm", "base"]),
5939
- textTransform: z6.enum(["none", "uppercase", "lowercase", "capitalize"]).optional(),
5940
- letterSpacing: z6.enum(["normal", "wide", "wider", "widest"]).optional(),
5941
- opacity: z6.number().min(0.2).max(1).optional()
6196
+ fontWeight: z9.enum(["regular", "medium", "semibold", "bold", "black"]),
6197
+ fontSize: z9.enum(["2xs", "xs", "sm", "base"]),
6198
+ textTransform: z9.enum(["none", "uppercase", "lowercase", "capitalize"]).optional(),
6199
+ letterSpacing: z9.enum(["normal", "wide", "wider", "widest"]).optional(),
6200
+ opacity: z9.number().min(0.2).max(1).optional()
5942
6201
  }),
5943
6202
  // Focus state
5944
- focus: z6.object({
6203
+ focus: z9.object({
5945
6204
  ringColorToken: themeColorTokenSchema,
5946
- ringWidth: z6.enum(["0", "1", "2", "3"]),
6205
+ ringWidth: z9.enum(["0", "1", "2", "3"]),
5947
6206
  borderColorToken: themeColorTokenSchema.optional()
5948
6207
  // Change border color on focus
5949
6208
  }),
5950
6209
  // Error state (for validation feedback)
5951
- error: z6.object({
6210
+ error: z9.object({
5952
6211
  borderColorToken: themeColorTokenSchema,
5953
6212
  textColorToken: themeColorTokenSchema
5954
6213
  }),
5955
6214
  // Disabled state
5956
- disabled: z6.object({
6215
+ disabled: z9.object({
5957
6216
  backgroundColorToken: themeColorTokenSchema,
5958
6217
  textColorToken: themeColorTokenSchema,
5959
- opacity: z6.number().min(0.3).max(0.7)
6218
+ opacity: z9.number().min(0.3).max(0.7)
5960
6219
  })
5961
6220
  });
5962
6221
 
6222
+ // ../theme-core/src/gradients/types.ts
6223
+ import { z as z10 } from "zod";
6224
+ var gradientStopSchema = z10.object({
6225
+ color: themeColorTokenSchema,
6226
+ position: z10.number().min(0).max(100)
6227
+ // Percentage 0-100
6228
+ });
6229
+ var gradientConfigSchema = z10.object({
6230
+ type: z10.enum(["linear", "radial"]),
6231
+ angle: z10.number().min(0).max(360).optional(),
6232
+ // For linear gradients (degrees)
6233
+ position: z10.string().optional(),
6234
+ // For radial gradients ('center', 'top left', etc.)
6235
+ stops: z10.array(gradientStopSchema).min(2)
6236
+ });
6237
+
5963
6238
  // ../theme-core/src/navigation/types.ts
5964
- import { z as z8 } from "zod";
6239
+ import { z as z12 } from "zod";
5965
6240
 
5966
6241
  // ../theme-core/src/interactive/baseSchema.ts
5967
- import { z as z7 } from "zod";
5968
- var interactiveTypographySchema = z7.object({
6242
+ import { z as z11 } from "zod";
6243
+ var interactiveTypographySchema = z11.object({
5969
6244
  /** Font family source */
5970
- typography: z7.enum(["body", "heading"]).default("body"),
6245
+ typography: z11.enum(["body", "heading"]).default("body"),
5971
6246
  /** Font weight */
5972
- fontWeight: z7.enum(["regular", "medium", "semibold", "bold"]).default("medium"),
6247
+ fontWeight: z11.enum(["regular", "medium", "semibold", "bold"]).default("medium"),
5973
6248
  /** Text transform */
5974
- textTransform: z7.enum(["none", "uppercase", "capitalize"]).default("none"),
6249
+ textTransform: z11.enum(["none", "uppercase", "capitalize"]).default("none"),
5975
6250
  /** Italic style */
5976
- italic: z7.boolean().default(false)
6251
+ italic: z11.boolean().default(false)
5977
6252
  });
5978
- var effectApplicationSchema2 = z7.object({
6253
+ var effectApplicationSchema2 = z11.object({
5979
6254
  /** Effect preset ID */
5980
- effectId: z7.string(),
6255
+ effectId: z11.string(),
5981
6256
  /** User-provided customization options */
5982
- options: z7.record(z7.string(), z7.any()).optional()
6257
+ options: z11.record(z11.string(), z11.any()).optional()
5983
6258
  });
5984
- var effectCompositionSchema = z7.object({
6259
+ var effectCompositionSchema = z11.object({
5985
6260
  /** Effects always applied */
5986
- base: z7.array(effectApplicationSchema2).optional(),
6261
+ base: z11.array(effectApplicationSchema2).optional(),
5987
6262
  /** Effects applied on hover */
5988
- hover: z7.array(effectApplicationSchema2).optional(),
6263
+ hover: z11.array(effectApplicationSchema2).optional(),
5989
6264
  /** Effects applied on active/pressed */
5990
- active: z7.array(effectApplicationSchema2).optional(),
6265
+ active: z11.array(effectApplicationSchema2).optional(),
5991
6266
  /** Effects applied on focus */
5992
- focus: z7.array(effectApplicationSchema2).optional()
6267
+ focus: z11.array(effectApplicationSchema2).optional()
5993
6268
  });
5994
6269
 
5995
6270
  // ../theme-core/src/navigation/types.ts
5996
- var navLinkPaddingSchema = z8.enum(["none", "compact", "default"]);
5997
- var navLinkPaddingXSchema = z8.enum(["none", "tight", "compact", "default", "relaxed", "spacious"]);
5998
- var navLinkBorderRadiusSchema = z8.enum(["none", "sm", "md", "full"]);
5999
- var navLinkTextSizeSchema = z8.enum(["xs", "sm", "base", "lg"]);
6000
- var navLinkLetterSpacingSchema = z8.enum(["normal", "wide", "wider", "widest"]);
6001
- var navLinkStyleSchema = z8.object({
6271
+ var navLinkPaddingSchema = z12.enum(["none", "compact", "default"]);
6272
+ var navLinkPaddingXSchema = z12.enum(["none", "tight", "compact", "default", "relaxed", "spacious"]);
6273
+ var navLinkBorderRadiusSchema = z12.enum(["none", "sm", "md", "full"]);
6274
+ var navLinkTextSizeSchema = z12.enum(["xs", "sm", "base", "lg"]);
6275
+ var navLinkLetterSpacingSchema = z12.enum(["normal", "wide", "wider", "widest"]);
6276
+ var navLinkContrastTreatmentSchema = z12.enum(["none", "soft-glow"]);
6277
+ var navLinkStyleSchema = z12.object({
6002
6278
  /** Display name for the style */
6003
- name: z8.string().min(1).max(30).optional(),
6279
+ name: z12.string().min(1).max(30).optional(),
6004
6280
  /** Typography settings (inherited from interactive base) */
6005
6281
  ...interactiveTypographySchema.shape,
6006
6282
  /** Text color token */
@@ -6009,6 +6285,8 @@ var navLinkStyleSchema = z8.object({
6009
6285
  textSize: navLinkTextSizeSchema.optional(),
6010
6286
  /** Optional letter spacing override */
6011
6287
  letterSpacing: navLinkLetterSpacingSchema.optional(),
6288
+ /** Optional text-only contrast treatment for transparent/overlay navigation */
6289
+ contrastTreatment: navLinkContrastTreatmentSchema.optional(),
6012
6290
  /** Hover/active color token (for color-change effects) */
6013
6291
  hoverColorToken: themeColorTokenSchema.nullable().optional(),
6014
6292
  /** Padding preset */
@@ -6022,7 +6300,7 @@ var navLinkStyleSchema = z8.object({
6022
6300
  });
6023
6301
 
6024
6302
  // ../theme-core/src/customCss/validation.ts
6025
- import { z as z9 } from "zod";
6303
+ import { z as z13 } from "zod";
6026
6304
  var FORBIDDEN_SELECTORS = [":root", "html", "body"];
6027
6305
  var UNIVERSAL_SELECTOR = "*";
6028
6306
  var REMOTE_URL_PATTERN = /url\s*\(\s*['"]?(https?:|\/\/)/i;
@@ -6050,152 +6328,3215 @@ function hasScopeEscapingSiblingCombinator(selector) {
6050
6328
  const normalized = selector.trim();
6051
6329
  return /&\s*[+~]/.test(normalized);
6052
6330
  }
6053
- function containsForbiddenSelector(selector) {
6054
- const normalized = selector.toLowerCase().trim();
6055
- if (!normalized) return true;
6056
- if (hasScopeEscapingSiblingCombinator(selector)) {
6331
+ function containsForbiddenSelector(selector) {
6332
+ const normalized = selector.toLowerCase().trim();
6333
+ if (!normalized) return true;
6334
+ if (hasScopeEscapingSiblingCombinator(selector)) {
6335
+ return true;
6336
+ }
6337
+ const parts = normalized.split(",");
6338
+ for (const part of parts) {
6339
+ if (isForbiddenSelectorPart(part)) {
6340
+ return true;
6341
+ }
6342
+ }
6343
+ return false;
6344
+ }
6345
+ var selectorSchema = z13.string().min(1, "Selector cannot be empty").max(200, "Selector too long (max 200 characters)").refine(
6346
+ (s) => !containsForbiddenSelector(s),
6347
+ { message: "Global selectors (:root, html, body, *) are not allowed" }
6348
+ );
6349
+ function containsRemoteUrl(value) {
6350
+ return REMOTE_URL_PATTERN.test(value);
6351
+ }
6352
+ function containsJavascriptUrl(value) {
6353
+ return JAVASCRIPT_URL_PATTERN.test(value);
6354
+ }
6355
+ var declarationValueSchema = z13.string().max(500, "Declaration value too long (max 500 characters)").refine(
6356
+ (v) => !containsRemoteUrl(v),
6357
+ { message: "Remote url() references are not allowed. Use local paths, data URIs, or fragment IDs." }
6358
+ ).refine(
6359
+ (v) => !containsJavascriptUrl(v),
6360
+ { message: "javascript: URLs are not allowed" }
6361
+ );
6362
+ var declarationsSchema = z13.record(
6363
+ z13.string().min(1).max(100),
6364
+ // property name
6365
+ declarationValueSchema
6366
+ // property value
6367
+ );
6368
+ var customCssRuleSchema = z13.object({
6369
+ id: z13.string().min(1, "Rule ID is required").max(50, "Rule ID too long"),
6370
+ selector: selectorSchema,
6371
+ declarations: declarationsSchema
6372
+ });
6373
+ var blockCustomCssRuleSchema = customCssRuleSchema.extend({
6374
+ blockKind: z13.string().min(1, "Block kind is required").max(50, "Block kind too long")
6375
+ });
6376
+ var customCssRulesSchema = z13.array(customCssRuleSchema).optional();
6377
+ var blockCustomCssRulesSchema = z13.array(blockCustomCssRuleSchema).optional();
6378
+
6379
+ // ../theme-core/src/customCss/atRuleValidation.ts
6380
+ import { z as z14 } from "zod";
6381
+ var KEYFRAME_OFFSET_PATTERN = /^(from|to|\d{1,3}%)$/i;
6382
+ var ANIMATION_NAME_PATTERN = /^[a-zA-Z_-][a-zA-Z0-9_-]*$/;
6383
+ var BLOCKED_AT_RULES = ["@import", "@charset"];
6384
+ var BLOCKED_AT_RULE_PATTERN = /@(?:import|charset)\b/i;
6385
+ var ruleIdSchema = z14.string().min(1, "Rule ID is required").max(50, "Rule ID too long");
6386
+ var nestedRuleSchema = z14.object({
6387
+ selector: selectorSchema,
6388
+ declarations: declarationsSchema
6389
+ });
6390
+ function isValidKeyframeOffset(offset) {
6391
+ const trimmed = offset.trim().toLowerCase();
6392
+ if (trimmed === "from" || trimmed === "to") return true;
6393
+ const match = trimmed.match(/^(\d{1,3})%$/);
6394
+ if (!match || match[1] === void 0) return false;
6395
+ const value = parseInt(match[1], 10);
6396
+ return value >= 0 && value <= 100;
6397
+ }
6398
+ var keyframeOffsetSchema = z14.string().transform((offset) => offset.trim()).refine(
6399
+ (offset) => KEYFRAME_OFFSET_PATTERN.test(offset),
6400
+ { message: 'Invalid keyframe offset. Use percentages (0%, 50%, 100%) or "from"/"to"' }
6401
+ ).refine(
6402
+ isValidKeyframeOffset,
6403
+ { message: "Keyframe offset must be between 0% and 100%" }
6404
+ );
6405
+ var animationNameSchema = z14.string().min(1, "Animation name is required").max(50, "Animation name too long").refine(
6406
+ (name) => ANIMATION_NAME_PATTERN.test(name),
6407
+ { message: "Invalid animation name. Use letters, numbers, dashes, underscores (start with letter, dash, or underscore)" }
6408
+ );
6409
+ var keyframeSchema = z14.object({
6410
+ offset: keyframeOffsetSchema,
6411
+ declarations: declarationsSchema
6412
+ });
6413
+ var keyframesAtRuleSchema = z14.object({
6414
+ id: ruleIdSchema,
6415
+ type: z14.literal("keyframes"),
6416
+ name: animationNameSchema,
6417
+ frames: z14.array(keyframeSchema).min(1, "At least one keyframe is required")
6418
+ });
6419
+ var fontFaceDeclarationsSchema = z14.record(z14.string().min(1).max(100), declarationValueSchema).refine(
6420
+ (decls) => "fontFamily" in decls || "font-family" in decls,
6421
+ { message: "font-family is required in @font-face" }
6422
+ );
6423
+ var fontFaceAtRuleSchema = z14.object({
6424
+ id: ruleIdSchema,
6425
+ type: z14.literal("font-face"),
6426
+ declarations: fontFaceDeclarationsSchema
6427
+ });
6428
+ var mediaQuerySchema = z14.string().min(1, "Media query is required").max(200, "Media query too long");
6429
+ var mediaAtRuleSchema = z14.object({
6430
+ id: ruleIdSchema,
6431
+ type: z14.literal("media"),
6432
+ query: mediaQuerySchema,
6433
+ rules: z14.array(nestedRuleSchema).min(1, "At least one rule is required")
6434
+ });
6435
+ var supportsConditionSchema = z14.string().min(1, "Supports condition is required").max(200, "Supports condition too long");
6436
+ var supportsAtRuleSchema = z14.object({
6437
+ id: ruleIdSchema,
6438
+ type: z14.literal("supports"),
6439
+ condition: supportsConditionSchema,
6440
+ rules: z14.array(nestedRuleSchema).min(1, "At least one rule is required")
6441
+ });
6442
+ function containsBlockedAtRule(css) {
6443
+ return BLOCKED_AT_RULE_PATTERN.test(css);
6444
+ }
6445
+ var rawCssSchema = z14.string().min(1, "CSS is required").max(5e3, "Raw CSS too long (max 5000 characters)").refine(
6446
+ (css) => css.trim().startsWith("@"),
6447
+ { message: "Raw at-rule must start with @" }
6448
+ ).refine(
6449
+ (css) => !containsBlockedAtRule(css),
6450
+ { message: `Blocked at-rules: ${BLOCKED_AT_RULES.join(", ")}. Use typed at-rules or local assets instead.` }
6451
+ );
6452
+ var rawAtRuleSchema = z14.object({
6453
+ id: ruleIdSchema,
6454
+ type: z14.literal("raw"),
6455
+ css: rawCssSchema
6456
+ });
6457
+ var customCssAtRuleSchema = z14.discriminatedUnion("type", [
6458
+ keyframesAtRuleSchema,
6459
+ fontFaceAtRuleSchema,
6460
+ mediaAtRuleSchema,
6461
+ supportsAtRuleSchema,
6462
+ rawAtRuleSchema
6463
+ ]);
6464
+ var customCssAtRulesSchema = z14.array(customCssAtRuleSchema).optional();
6465
+
6466
+ // ../theme-core/src/shared/componentStyles.ts
6467
+ import { z as z15 } from "zod";
6468
+ var componentBorderSchema = z15.object({
6469
+ width: z15.enum(["none", "hairline", "thin", "medium", "thick"]).default("none"),
6470
+ style: z15.enum(["solid", "dashed"]).default("solid"),
6471
+ colorToken: themeColorTokenSchema.optional()
6472
+ // defaults to "border" if not set
6473
+ });
6474
+ var componentShadowSchema = z15.object({
6475
+ elevation: z15.enum(["none", "sm", "md", "lg", "xl", "2xl"]).default("sm")
6476
+ });
6477
+
6478
+ // ../theme-core/src/schema.ts
6479
+ var axesSchema = z16.object({
6480
+ tone: z16.enum(["minimal", "classic", "bold"]),
6481
+ energy: z16.enum(["calm", "vibrant"]),
6482
+ density: z16.enum(["airy", "regular", "compact"]),
6483
+ mediaBias: z16.enum(["text", "media", "mixed"]),
6484
+ conversionBias: z16.enum(["low", "med", "high"]),
6485
+ motion: z16.enum(["subtle", "standard", "expressive"])
6486
+ });
6487
+ var colourHexString = z16.string().regex(/^#([0-9A-Fa-f]{3}){1,2}$/);
6488
+ var paletteColorSchema = z16.object({
6489
+ name: z16.string().min(1),
6490
+ hex: colourHexString
6491
+ });
6492
+ var paletteMetaSchema = z16.object({
6493
+ mode: z16.enum(["light", "dark"])
6494
+ });
6495
+ var paletteSchema = z16.object({
6496
+ colors: z16.array(paletteColorSchema),
6497
+ meta: paletteMetaSchema
6498
+ });
6499
+ var typographyStyleSchema = z16.object({
6500
+ family: z16.string().min(1),
6501
+ weight: z16.enum(["light", "regular", "medium", "semibold", "bold"]),
6502
+ letterSpacing: z16.enum(["tight", "normal", "loose"]),
6503
+ lineHeight: z16.enum(["normal", "relaxed", "loose"])
6504
+ });
6505
+ var bodyTypographyStyleSchema = typographyStyleSchema.extend({
6506
+ size: z16.enum(["md", "lg", "xl"])
6507
+ });
6508
+ var headingSizeSchema = z16.enum(["xs", "sm", "md", "lg", "xl", "2xl"]);
6509
+ var headingTypographyOverridesSchema = z16.object({
6510
+ weight: z16.enum(["light", "regular", "medium", "semibold", "bold"]).nullable().optional(),
6511
+ letterSpacing: z16.enum(["tight", "normal", "loose"]).nullable().optional(),
6512
+ size: headingSizeSchema.nullable().optional(),
6513
+ lineHeight: z16.enum(["normal", "relaxed", "loose"]).nullable().optional(),
6514
+ italic: z16.boolean().nullable().optional(),
6515
+ colorToken: themeColorTokenSchema.nullable().optional()
6516
+ });
6517
+ var headingTypographyStyleSchema = typographyStyleSchema.extend({
6518
+ case: z16.enum(["uppercase", "normal", "smallCaps"]).nullable(),
6519
+ italic: z16.boolean().nullable(),
6520
+ colorToken: themeColorTokenSchema.nullable().optional()
6521
+ });
6522
+ var proseLinkUnderlineStyleSchema = z16.enum(["solid", "dotted", "dashed"]);
6523
+ var proseLinkUnderlineThicknessSchema = z16.enum([
6524
+ "auto",
6525
+ "fromFont",
6526
+ "thin",
6527
+ "medium",
6528
+ "thick"
6529
+ ]);
6530
+ var proseLinkUnderlineOffsetSchema = z16.enum([
6531
+ "auto",
6532
+ "tight",
6533
+ "normal",
6534
+ "loose"
6535
+ ]);
6536
+ var proseLinkStyleSchema = z16.object({
6537
+ colorToken: themeColorTokenSchema.optional(),
6538
+ hoverColorToken: themeColorTokenSchema.optional(),
6539
+ underline: z16.boolean().optional(),
6540
+ decorationColorToken: themeColorTokenSchema.optional(),
6541
+ hoverDecorationColorToken: themeColorTokenSchema.optional(),
6542
+ underlineStyle: proseLinkUnderlineStyleSchema.optional(),
6543
+ underlineThickness: proseLinkUnderlineThicknessSchema.optional(),
6544
+ underlineOffset: proseLinkUnderlineOffsetSchema.optional()
6545
+ });
6546
+ var semanticSpacingSchema = z16.enum([
6547
+ "none",
6548
+ "compact",
6549
+ "cozy",
6550
+ "medium",
6551
+ "comfortable",
6552
+ "spacious"
6553
+ ]);
6554
+ var boxRoundedSchema = z16.enum(["none", "sm", "md", "lg", "xl", "2xl", "full"]);
6555
+ var boxBackgroundOverlaySchema = z16.object({
6556
+ type: z16.enum(["none", "color", "gradient"]).nullable().optional(),
6557
+ color: tokenOrCssColorValueSchema.nullable().optional(),
6558
+ gradient: z16.string().nullable().optional(),
6559
+ opacity: z16.number().min(0).max(1).nullable().optional()
6560
+ });
6561
+ var boxBackgroundSchema = z16.object({
6562
+ type: z16.enum(["color", "gradient", "image"]).optional(),
6563
+ color: tokenOrCssColorValueSchema.nullable().optional(),
6564
+ gradient: z16.string().nullable().optional(),
6565
+ image: mediaSchema.nullable().optional(),
6566
+ objectFit: z16.enum(["fill", "fit", "original", "custom"]).nullable().optional(),
6567
+ scale: z16.string().nullable().optional(),
6568
+ position: z16.string().nullable().optional(),
6569
+ opacity: z16.number().min(0).max(1).nullable().optional(),
6570
+ motion: z16.enum(["static", "fixed-frame"]).nullable().optional(),
6571
+ overlay: boxBackgroundOverlaySchema.nullable().optional(),
6572
+ textColor: tokenOrCssColorValueSchema.nullable().optional(),
6573
+ headingColor: tokenOrCssColorValueSchema.nullable().optional()
6574
+ });
6575
+ var noHeadingDecorationSchema = z16.object({
6576
+ family: z16.literal("none"),
6577
+ placement: z16.literal("none")
6578
+ });
6579
+ var visibleHeadingDecorationSchema = z16.object({
6580
+ family: z16.enum(visibleHeadingDecorationFamilyValues),
6581
+ placement: z16.enum(visibleHeadingDecorationPlacementValues),
6582
+ colorToken: z16.enum(headingDecorationColorTokenValues).optional()
6583
+ });
6584
+ var headingDecorationSchema = z16.union([
6585
+ noHeadingDecorationSchema,
6586
+ visibleHeadingDecorationSchema
6587
+ ]);
6588
+ var accordionIconTreatmentSchema = z16.object({
6589
+ iconSet: z16.enum(accordionIconSetValues),
6590
+ colorToken: z16.enum(accordionIconColorTokenValues),
6591
+ openColorToken: z16.enum(accordionIconColorTokenValues).optional(),
6592
+ motion: z16.enum(accordionIconMotionValues)
6593
+ });
6594
+ var sectionStylesOverrideSchema = z16.object({
6595
+ background: boxBackgroundSchema.nullable().optional(),
6596
+ spacing: semanticSpacingSchema.nullable().optional(),
6597
+ minHeight: z16.enum(["none", "banner", "hero", "immersive"]).nullable().optional(),
6598
+ tileTreatment: z16.enum(tileTreatmentValues).nullable().optional(),
6599
+ eventListTreatment: z16.enum(eventListTreatmentValues).nullable().optional(),
6600
+ eyebrowTreatment: z16.enum(eyebrowTreatmentValues).nullable().optional(),
6601
+ headingDecoration: headingDecorationSchema.nullable().optional(),
6602
+ // Author-level override consumed by later block/editor rendering phases.
6603
+ // Keeping it in section styles lets existing block save APIs persist it.
6604
+ headingDecorationOverride: z16.enum(headingDecorationOverrideValues).nullable().optional(),
6605
+ accordionIconTreatment: accordionIconTreatmentSchema.nullable().optional()
6606
+ });
6607
+ var containerStylesOverrideSchema = z16.object({
6608
+ background: boxBackgroundSchema.nullable().optional(),
6609
+ spacing: semanticSpacingSchema.nullable().optional(),
6610
+ raised: z16.boolean().nullable().optional(),
6611
+ rounded: boxRoundedSchema.nullable().optional(),
6612
+ fullWidth: z16.boolean().nullable().optional()
6613
+ });
6614
+ var cardBorderOverrideSchema = z16.object({
6615
+ enabled: z16.boolean().nullable().optional(),
6616
+ width: z16.enum(["none", "1", "2", "3"]).nullable().optional(),
6617
+ colorToken: themeColorTokenSchema.nullable().optional()
6618
+ });
6619
+ var cardStylesOverrideSchema = z16.object({
6620
+ background: boxBackgroundSchema.nullable().optional(),
6621
+ border: cardBorderOverrideSchema.nullable().optional(),
6622
+ spacing: semanticSpacingSchema.nullable().optional(),
6623
+ raised: z16.boolean().nullable().optional(),
6624
+ rounded: boxRoundedSchema.nullable().optional(),
6625
+ treatment: z16.enum(["accent-quote"]).nullable().optional()
6626
+ });
6627
+ var blockStyleOverridesSchema = z16.object({
6628
+ sectionStyles: sectionStylesOverrideSchema.nullable().optional(),
6629
+ containerStyles: containerStylesOverrideSchema.nullable().optional(),
6630
+ cardStyles: cardStylesOverrideSchema.nullable().optional()
6631
+ });
6632
+ var blockThemeOverrideSchema = z16.object({
6633
+ typography: z16.object({
6634
+ proseLinkStyle: proseLinkStyleSchema.optional()
6635
+ }).optional(),
6636
+ styles: blockStyleOverridesSchema.optional()
6637
+ });
6638
+ var typographyScaleSchema = z16.enum([
6639
+ // New intuitive names
6640
+ "compact",
6641
+ // ratio 1.2 (was minorThird)
6642
+ "balanced",
6643
+ // ratio 1.25 (was majorThird)
6644
+ "spacious",
6645
+ // ratio 1.333 (was perfectFourth)
6646
+ // Legacy names (backward compatibility)
6647
+ "minorThird",
6648
+ "majorThird",
6649
+ "perfectFourth"
6650
+ ]);
6651
+ var typographySchema = z16.object({
6652
+ body: bodyTypographyStyleSchema,
6653
+ headings: z16.object({
6654
+ default: headingTypographyStyleSchema,
6655
+ h1: headingTypographyOverridesSchema,
6656
+ h2: headingTypographyOverridesSchema,
6657
+ h3: headingTypographyOverridesSchema,
6658
+ // Allow per-level overrides for additional heading levels
6659
+ h4: headingTypographyOverridesSchema.optional(),
6660
+ h5: headingTypographyOverridesSchema.optional(),
6661
+ h6: headingTypographyOverridesSchema.optional()
6662
+ }),
6663
+ scale: typographyScaleSchema,
6664
+ proseLinkStyle: proseLinkStyleSchema.optional()
6665
+ });
6666
+ var spaceSchema = z16.enum(["comfortable", "standard", "dense"]);
6667
+ var corners = z16.enum(["square", "soft", "rounded", "pill"]);
6668
+ var shadow = z16.object({
6669
+ elevation: z16.enum(["none", "low", "medium", "high"]),
6670
+ softness: z16.enum(["crisp", "soft", "hard"]).nullable(),
6671
+ position: z16.enum(["bottom", "bottom-right"]).default("bottom")
6672
+ });
6673
+ var border = z16.object({
6674
+ width: z16.enum(["none", "hairline", "thin", "thick"]),
6675
+ style: z16.enum(["solid", "dashed"])
6676
+ });
6677
+ var motion = z16.object({
6678
+ level: z16.enum(["off", "low", "medium", "high"]),
6679
+ easing: z16.enum(["standard", "snappy", "gentle"]).nullable()
6680
+ });
6681
+ var buttonStyle = z16.object({
6682
+ shape: corners
6683
+ // Used for --radius-control CSS variable
6684
+ });
6685
+ var cardStyle = z16.object({
6686
+ elevation: z16.enum(["none", "low", "medium", "high"]),
6687
+ border: z16.enum(["none", "subtle", "defined"]),
6688
+ shape: corners,
6689
+ headerStyle: z16.enum(["plain", "accentBar", "subtleBg"]).nullable(),
6690
+ mediaTreatment: z16.enum(["square", "rounded", "bleed"]).nullable()
6691
+ });
6692
+ var inputStyle = z16.object({
6693
+ shape: corners,
6694
+ border: z16.enum(["subtle", "defined", "underline"]),
6695
+ focus: z16.enum(["glow", "ring", "underline"]),
6696
+ label: z16.enum(["inside", "above"])
6697
+ });
6698
+ var headerVariant = z16.enum(["classic", "centered", "transparent", "floating"]);
6699
+ var headerPositioning = z16.enum(["static", "sticky", "fixed"]);
6700
+ var headerNavStyle = z16.enum([
6701
+ "minimal",
6702
+ "underline",
6703
+ "underline-grow",
6704
+ "capsule",
6705
+ "scale",
6706
+ "frosted",
6707
+ "solid"
6708
+ ]);
6709
+ var navFontWeight = z16.enum(["regular", "medium", "semibold", "bold"]);
6710
+ var headerMaxWidth = z16.enum(["container", "full"]);
6711
+ var headerContainerSchema = z16.object({
6712
+ rounded: z16.enum(["none", "sm", "md", "lg", "xl", "2xl"]).default("xl"),
6713
+ border: z16.boolean().default(true),
6714
+ shadow: z16.boolean().default(true),
6715
+ padding: z16.enum(["sm", "md", "lg"]).default("md"),
6716
+ tint: z16.string().nullable().optional(),
6717
+ opacity: z16.number().min(0).max(1).default(0.12)
6718
+ }).optional();
6719
+ var headerBorderSchema = componentBorderSchema.extend({
6720
+ position: z16.enum(["bottom", "top", "both", "none"]).default("bottom")
6721
+ }).optional();
6722
+ var logoStyleSchema = z16.object({
6723
+ fontFamily: z16.enum(["heading", "body"]).default("heading"),
6724
+ letterSpacing: z16.enum(["normal", "wide", "wider", "widest"]).default("normal"),
6725
+ gradient: z16.boolean().default(false)
6726
+ }).optional();
6727
+ var headerLogoTextSchema = z16.object({
6728
+ mobileWrapLines: z16.union([z16.literal(1), z16.literal(2)]).optional(),
6729
+ mobileMaxWidth: z16.enum(["xs", "sm", "md"]).optional(),
6730
+ hideOnShrink: z16.boolean().optional()
6731
+ }).optional();
6732
+ var navEffectsSchema = z16.object({
6733
+ underlineGradient: z16.boolean().default(false),
6734
+ glow: z16.boolean().default(false),
6735
+ glowColor: z16.string().optional(),
6736
+ neumorphic: z16.boolean().default(false)
6737
+ }).optional();
6738
+ var dropdownStyleSchema = z16.object({
6739
+ // Container styling
6740
+ background: themeColorTokenSchema.default("surface"),
6741
+ textColor: themeColorTokenSchema.default("text"),
6742
+ borderColor: themeColorTokenSchema.nullable().default("border"),
6743
+ shadow: z16.enum(["none", "sm", "md", "lg"]).default("md"),
6744
+ borderRadius: z16.enum(["none", "sm", "md", "lg"]).default("md"),
6745
+ // Link hover states (explicit control)
6746
+ hoverBackground: themeColorTokenSchema.nullable().optional(),
6747
+ hoverTextColor: themeColorTokenSchema.nullable().optional(),
6748
+ // Typography
6749
+ textTransform: z16.enum(["none", "uppercase", "capitalize"]).default("none"),
6750
+ letterSpacing: z16.enum(["normal", "wide", "wider"]).default("normal"),
6751
+ fontWeight: z16.enum(["regular", "medium", "semibold", "bold"]).optional(),
6752
+ // optional = inherit from navWeight
6753
+ textSize: z16.enum(["xs", "sm", "base", "lg"]).optional()
6754
+ // optional = no override (browser default)
6755
+ }).optional();
6756
+ var headerCtaGapSchema = z16.enum([
6757
+ "none",
6758
+ "tight",
6759
+ "compact",
6760
+ "default",
6761
+ "relaxed",
6762
+ "spacious"
6763
+ ]);
6764
+ var headerCtaTreatmentSchema = z16.enum([
6765
+ "default",
6766
+ "primary",
6767
+ "secondary",
6768
+ "inverted",
6769
+ "outline",
6770
+ "ghost"
6771
+ ]);
6772
+ var navContainerSchema = z16.object({
6773
+ type: z16.enum(["none", "pill", "glass"]).default("none"),
6774
+ tint: z16.string().nullable().optional(),
6775
+ opacity: z16.number().min(0).max(1).default(0.15)
6776
+ }).default({ type: "none", tint: null, opacity: 0.15 });
6777
+ var headerBackgroundSchema = z16.object({
6778
+ type: z16.enum(["color", "gradient", "image"]),
6779
+ color: tokenOrCssColorValueSchema.nullable().optional(),
6780
+ gradient: gradientConfigSchema.nullable().optional(),
6781
+ image: mediaSchema.nullable().optional(),
6782
+ textColor: tokenOrCssColorValueSchema.nullable().optional()
6783
+ });
6784
+ var headerSchema = z16.object({
6785
+ variant: headerVariant,
6786
+ positioning: headerPositioning,
6787
+ shrinkOnScroll: z16.boolean(),
6788
+ maxWidth: headerMaxWidth,
6789
+ logoOverride: mediaSchema.nullable().optional(),
6790
+ background: headerBackgroundSchema.default({
6791
+ type: "color",
6792
+ color: "surface"
6793
+ }),
6794
+ textColor: themeColorTokenSchema.nullable().optional(),
6795
+ navStyle: headerNavStyle,
6796
+ navColor: themeColorTokenSchema.nullable().optional(),
6797
+ navWeight: navFontWeight.default("medium"),
6798
+ // New fields for header system enhancement
6799
+ container: headerContainerSchema,
6800
+ border: headerBorderSchema,
6801
+ shadow: componentShadowSchema.optional(),
6802
+ // defaults to 'sm' for sticky in CSS generator
6803
+ logo: logoStyleSchema,
6804
+ logoText: headerLogoTextSchema,
6805
+ navEffects: navEffectsSchema,
6806
+ navContainer: navContainerSchema,
6807
+ // Full nav link customization (overrides navStyle if set)
6808
+ navLinkStyle: navLinkStyleSchema.optional(),
6809
+ // CTA button spacing (desktop left margin)
6810
+ ctaGap: headerCtaGapSchema.optional(),
6811
+ // Semantic CTA treatment for header/nav CTA buttons. The Theme V2 compiler
6812
+ // materializes this to ctaVariant against the active button personality.
6813
+ ctaTreatment: headerCtaTreatmentSchema.optional(),
6814
+ // Optional theme-level CTA variant for header/nav CTA buttons.
6815
+ // Internal runtime bridge for the block renderer; prefer ctaTreatment in
6816
+ // authored Theme V2 concepts.
6817
+ ctaVariant: z16.string().min(1).optional(),
6818
+ // Dropdown menu styling (nav dropdowns and mobile drawer)
6819
+ dropdownStyle: dropdownStyleSchema
6820
+ });
6821
+ var footerVariant = z16.enum(["simple", "columns", "split"]);
6822
+ var footerMaxWidth = z16.enum(["container", "full"]);
6823
+ var footerMode = z16.enum(["default", "blocks", "default+blocks", "none"]);
6824
+ var footerNavLayoutMode = z16.enum(["stack", "inline", "inline-wrap"]);
6825
+ var footerNavLayoutAlign = z16.enum(["start", "center", "end", "space-between"]);
6826
+ var footerSpacing = z16.enum([
6827
+ "none",
6828
+ "tight",
6829
+ "compact",
6830
+ "default",
6831
+ "relaxed",
6832
+ "spacious"
6833
+ ]);
6834
+ var footerLogoPlacement = z16.enum(["left", "right", "above", "below"]);
6835
+ var footerLogoSize = z16.enum(["sm", "md", "lg", "xl"]);
6836
+ var footerLogoMaxHeight = z16.enum(["sm", "md", "lg", "xl"]);
6837
+ var footerBottomTextLinkStyleSchema = z16.object({
6838
+ colorToken: themeColorTokenSchema.optional(),
6839
+ hoverColorToken: themeColorTokenSchema.nullable().optional(),
6840
+ decorationColorToken: themeColorTokenSchema.nullable().optional(),
6841
+ underline: z16.boolean().optional()
6842
+ });
6843
+ var footerBottomBarSchema = z16.object({
6844
+ enabled: z16.boolean().optional(),
6845
+ fullBleed: z16.boolean().optional(),
6846
+ background: headerBackgroundSchema.optional(),
6847
+ textColor: themeColorTokenSchema.nullable().optional(),
6848
+ textAlign: z16.enum(["left", "center", "right"]).optional(),
6849
+ paddingY: footerSpacing.optional(),
6850
+ paddingX: footerSpacing.optional(),
6851
+ borderTop: z16.object({
6852
+ colorToken: themeColorTokenSchema.nullable().optional(),
6853
+ width: z16.enum(["none", "thin", "medium", "thick"]).optional()
6854
+ }).optional()
6855
+ });
6856
+ var footerNavLayoutSchema = z16.object({
6857
+ layout: footerNavLayoutMode.optional(),
6858
+ align: footerNavLayoutAlign.optional(),
6859
+ gapX: footerSpacing.optional(),
6860
+ gapY: footerSpacing.optional(),
6861
+ columns: z16.number().int().min(1).max(6).optional()
6862
+ });
6863
+ var footerLogoSchema = z16.object({
6864
+ showLogo: z16.boolean().default(true),
6865
+ showLogoText: z16.boolean().optional(),
6866
+ placement: footerLogoPlacement.optional(),
6867
+ size: footerLogoSize.optional(),
6868
+ maxHeight: footerLogoMaxHeight.optional(),
6869
+ align: z16.enum(["start", "center", "end"]).optional()
6870
+ });
6871
+ var footerSchema = z16.object({
6872
+ /**
6873
+ * SDK-only footer rendering mode.
6874
+ *
6875
+ * Backwards compatible: missing/undefined behaves as 'default'.
6876
+ */
6877
+ mode: footerMode.optional(),
6878
+ variant: footerVariant,
6879
+ maxWidth: footerMaxWidth,
6880
+ showLogoText: z16.boolean().optional(),
6881
+ background: headerBackgroundSchema.default({
6882
+ type: "color",
6883
+ color: "surface"
6884
+ }),
6885
+ // Footer nav styling (independent from header)
6886
+ navStyle: headerNavStyle.default("minimal"),
6887
+ navColor: themeColorTokenSchema.nullable().optional(),
6888
+ navWeight: navFontWeight.default("medium"),
6889
+ // Full nav link customization (overrides navStyle if set)
6890
+ navLinkStyle: navLinkStyleSchema.optional(),
6891
+ // Footer bottom rich-text link styling (scoped to footer prose links)
6892
+ bottomTextLinkStyle: footerBottomTextLinkStyleSchema.optional(),
6893
+ // Footer layout controls
6894
+ navLayout: footerNavLayoutSchema.optional(),
6895
+ logo: footerLogoSchema.optional(),
6896
+ bottomBar: footerBottomBarSchema.optional()
6897
+ });
6898
+ var containerPaddingPresetSchema = z16.enum([
6899
+ "tight",
6900
+ "compact",
6901
+ "default",
6902
+ "relaxed"
6903
+ ]);
6904
+ var layoutSchema = z16.object({
6905
+ containerPadding: z16.object({
6906
+ mobile: containerPaddingPresetSchema.optional(),
6907
+ tablet: containerPaddingPresetSchema.optional(),
6908
+ desktop: containerPaddingPresetSchema.optional()
6909
+ }).optional()
6910
+ }).optional();
6911
+ var heroTypographySizeSchema = z16.enum([
6912
+ "sm",
6913
+ "base",
6914
+ "lg",
6915
+ "xl",
6916
+ "2xl",
6917
+ "3xl",
6918
+ "4xl",
6919
+ "5xl",
6920
+ "6xl",
6921
+ "editorial"
6922
+ ]);
6923
+ var heroTypographyLineHeightSchema = z16.enum([
6924
+ "tight",
6925
+ "snug",
6926
+ "normal",
6927
+ "relaxed"
6928
+ ]);
6929
+ var heroResponsiveTypographySchema = z16.object({
6930
+ headlineSize: heroTypographySizeSchema.optional(),
6931
+ headlineLineHeight: heroTypographyLineHeightSchema.optional(),
6932
+ subheadlineSize: heroTypographySizeSchema.optional(),
6933
+ subheadlineLineHeight: heroTypographyLineHeightSchema.optional()
6934
+ });
6935
+ var heroTypographySchema = z16.object({
6936
+ headlineSize: heroTypographySizeSchema.optional(),
6937
+ headlineLineHeight: heroTypographyLineHeightSchema.optional(),
6938
+ subheadlineSize: heroTypographySizeSchema.optional(),
6939
+ subheadlineLineHeight: heroTypographyLineHeightSchema.optional(),
6940
+ microHeadlineSize: heroTypographySizeSchema.optional(),
6941
+ microHeadlineLineHeight: heroTypographyLineHeightSchema.optional(),
6942
+ microSubheadlineSize: heroTypographySizeSchema.optional(),
6943
+ microSubheadlineLineHeight: heroTypographyLineHeightSchema.optional(),
6944
+ responsive: z16.object({
6945
+ tablet: heroResponsiveTypographySchema.optional(),
6946
+ mobile: heroResponsiveTypographySchema.optional()
6947
+ }).optional()
6948
+ });
6949
+ var heroSchema = z16.object({
6950
+ typography: heroTypographySchema.optional()
6951
+ }).optional();
6952
+ var bodyTextIntroTypographySizeSchema = z16.enum(["default", "editorial"]);
6953
+ var bodyTextSchema = z16.object({
6954
+ intro: z16.object({
6955
+ paragraphSize: bodyTextIntroTypographySizeSchema.optional(),
6956
+ headingSize: bodyTextIntroTypographySizeSchema.optional()
6957
+ }).optional()
6958
+ }).optional();
6959
+ var gradientsSchema = z16.object({
6960
+ button: z16.string().min(1).nullable().optional(),
6961
+ hero: z16.string().min(1).nullable().optional(),
6962
+ background: z16.string().min(1).nullable().optional()
6963
+ });
6964
+ var themeSchema = z16.object({
6965
+ name: z16.string().min(1).max(30),
6966
+ description: z16.string().min(1).max(400),
6967
+ rationale: z16.string().min(1).max(400),
6968
+ siteStyleId: z16.string().min(1).transform((value) => asSiteStyleId(value)).optional(),
6969
+ axes: axesSchema,
6970
+ palette: paletteSchema,
6971
+ typography: typographySchema,
6972
+ space: spaceSchema,
6973
+ border,
6974
+ shadow,
6975
+ motion,
6976
+ corners,
6977
+ gradients: gradientsSchema.optional(),
6978
+ layout: layoutSchema,
6979
+ hero: heroSchema,
6980
+ bodyText: bodyTextSchema,
6981
+ header: headerSchema,
6982
+ footer: footerSchema,
6983
+ buttons: buttonSystemSchema.optional(),
6984
+ // New button system (optional for backwards compatibility)
6985
+ cards: cardSystemSchema.optional(),
6986
+ // Card variant system (optional for backwards compatibility)
6987
+ accordions: accordionSystemSchema.optional(),
6988
+ // Accordion system (optional - generated if not provided)
6989
+ inputs: inputSystemSchema.optional(),
6990
+ // Input system (optional - generated if not provided)
6991
+ inputStyle: inputStyle.optional(),
6992
+ // Simple input styling API (drives InputSystem defaults)
6993
+ // Block-specific customization (Tier 3)
6994
+ // blockCustomVars: Per-block CSS variable overrides as bare values
6995
+ // Example: { "event-registration": { "--step-color": "#6d28d9" } }
6996
+ blockCustomVars: z16.record(
6997
+ z16.string(),
6998
+ // block kind (matches data-block attribute)
6999
+ z16.record(z16.string(), z16.string())
7000
+ // { '--var-name': 'value' }
7001
+ ).optional(),
7002
+ // Structured block-kind theme overrides (v1: typography prose-link style only)
7003
+ // Keyed by block kind (usually data-block value like "hero"; "block.hero" also accepted)
7004
+ blockOverrides: z16.record(z16.string(), blockThemeOverrideSchema).optional(),
7005
+ // Structured custom CSS rules
7006
+ // Validated, scoped, and safe by construction - no @import, remote url(), or global selectors
7007
+ customCssRules: customCssRulesSchema,
7008
+ // Structured block-specific CSS rules
7009
+ blockCustomCssRules: blockCustomCssRulesSchema,
7010
+ // Structured CSS at-rules (@keyframes, @media, @font-face, etc.)
7011
+ // @keyframes and @font-face are global; @media/@supports have scoped selectors
7012
+ customCssAtRules: customCssAtRulesSchema,
7013
+ /**
7014
+ * Style groups define named visual presets that content authors can apply to blocks.
7015
+ *
7016
+ * Unlike variants (which change block structure/layout), style groups only affect
7017
+ * CSS styling. The selected style group is rendered as a `data-style-group` attribute
7018
+ * on the block wrapper, which can be targeted in `blockCustomCssRules`.
7019
+ *
7020
+ * @example
7021
+ * ```typescript
7022
+ * {
7023
+ * styleGroups: {
7024
+ * hero: ['bold', 'minimal', 'featured'],
7025
+ * 'body-text': ['intro', 'compact'],
7026
+ * },
7027
+ * blockCustomCssRules: [
7028
+ * {
7029
+ * id: 'hero-bold-headline',
7030
+ * blockKind: 'hero',
7031
+ * selector: '&[data-style-group="bold"] .hero-headline',
7032
+ * declarations: { fontWeight: '800', fontSize: '3rem' }
7033
+ * }
7034
+ * ]
7035
+ * }
7036
+ * ```
7037
+ */
7038
+ styleGroups: z16.record(z16.string(), z16.array(z16.string())).optional()
7039
+ });
7040
+ var themesTurnSchema = z16.object({
7041
+ message: z16.string().min(1),
7042
+ themes: z16.array(themeSchema).length(3)
7043
+ });
7044
+
7045
+ // ../theme-core/src/palette/variants/types.ts
7046
+ function asPaletteVariantId(value) {
7047
+ if (value.length === 0) {
7048
+ throw new Error("PaletteVariantId must be a non-empty string");
7049
+ }
7050
+ return value;
7051
+ }
7052
+ var paletteVariantIdSchema = z17.string().min(1).transform((value) => asPaletteVariantId(value));
7053
+ var HEX_COLOR_REGEX = /^#[0-9a-f]{6}$/;
7054
+ var hexColorSchema = z17.string().regex(HEX_COLOR_REGEX, "Hex must be #RRGGBB (lowercase)").transform((value) => value);
7055
+ var variantPaletteColorSchema = paletteColorSchema.extend({
7056
+ name: paletteTokenNameSchema
7057
+ });
7058
+ var paletteVariantSchema = z17.object({
7059
+ id: paletteVariantIdSchema,
7060
+ name: z17.string().min(1),
7061
+ description: z17.string().min(1),
7062
+ tags: styleTagsSchema,
7063
+ mode: z17.enum(["light", "dark"]),
7064
+ colors: z17.array(variantPaletteColorSchema).min(1)
7065
+ });
7066
+ function definePaletteVariant(input) {
7067
+ return {
7068
+ id: asPaletteVariantId(input.id),
7069
+ name: input.name,
7070
+ description: input.description,
7071
+ tags: input.tags,
7072
+ mode: input.mode,
7073
+ colors: input.colors
7074
+ };
7075
+ }
7076
+ var paletteOverridesSchema = z17.object({
7077
+ primary: hexColorSchema.optional(),
7078
+ primaryForeground: hexColorSchema.optional(),
7079
+ secondary: hexColorSchema.optional(),
7080
+ accent: hexColorSchema.optional(),
7081
+ success: hexColorSchema.optional(),
7082
+ warning: hexColorSchema.optional(),
7083
+ destructive: hexColorSchema.optional(),
7084
+ background: hexColorSchema.optional(),
7085
+ surface: hexColorSchema.optional(),
7086
+ surfaceAlt: hexColorSchema.optional(),
7087
+ muted: hexColorSchema.optional(),
7088
+ text: hexColorSchema.optional(),
7089
+ border: hexColorSchema.optional()
7090
+ }).strict().transform((value) => value);
7091
+
7092
+ // ../theme-core/src/palette/variants/brand-led.ts
7093
+ var brandLedCool = definePaletteVariant({
7094
+ id: "brand-led-cool",
7095
+ name: "Brand-led \u2014 Cool",
7096
+ description: "Confident blue primary with slate neutrals.",
7097
+ tags: { tone: "classic", energy: "calm", era: "modern" },
7098
+ mode: "light",
7099
+ colors: [
7100
+ { name: "primary", hex: "#2563eb" },
7101
+ { name: "secondary", hex: "#64748b" },
7102
+ { name: "accent", hex: "#0f766e" },
7103
+ { name: "success", hex: "#16a34a" },
7104
+ { name: "warning", hex: "#d97706" },
7105
+ { name: "destructive", hex: "#dc2626" },
7106
+ { name: "background", hex: "#ffffff" },
7107
+ { name: "surface", hex: "#ffffff" },
7108
+ { name: "surfaceAlt", hex: "#f8fafc" },
7109
+ { name: "muted", hex: "#f1f5f9" },
7110
+ { name: "text", hex: "#0f172a" },
7111
+ { name: "primaryForeground", hex: "#ffffff" },
7112
+ { name: "border", hex: "#cbd5e1" }
7113
+ ]
7114
+ });
7115
+ var brandLedWarm = definePaletteVariant({
7116
+ id: "brand-led-warm",
7117
+ name: "Brand-led \u2014 Warm",
7118
+ description: "Sunset orange primary with warm grey neutrals.",
7119
+ tags: { tone: "classic", energy: "vibrant", era: "modern" },
7120
+ mode: "light",
7121
+ colors: [
7122
+ { name: "primary", hex: "#ea580c" },
7123
+ { name: "secondary", hex: "#78716c" },
7124
+ { name: "accent", hex: "#a16207" },
7125
+ { name: "success", hex: "#16a34a" },
7126
+ { name: "warning", hex: "#d97706" },
7127
+ { name: "destructive", hex: "#b91c1c" },
7128
+ { name: "background", hex: "#fffaf3" },
7129
+ { name: "surface", hex: "#ffffff" },
7130
+ { name: "surfaceAlt", hex: "#fbeee0" },
7131
+ { name: "muted", hex: "#f4e2cd" },
7132
+ { name: "text", hex: "#1c1917" },
7133
+ { name: "primaryForeground", hex: "#fffaf3" },
7134
+ { name: "border", hex: "#d6c4ad" }
7135
+ ]
7136
+ });
7137
+ var brandLedJewel = definePaletteVariant({
7138
+ id: "brand-led-jewel",
7139
+ name: "Brand-led \u2014 Jewel",
7140
+ description: "Deep emerald primary with rich neutrals.",
7141
+ tags: { tone: "bold", energy: "vibrant", era: "modern" },
7142
+ mode: "light",
7143
+ colors: [
7144
+ { name: "primary", hex: "#047857" },
7145
+ { name: "secondary", hex: "#4b5563" },
7146
+ { name: "accent", hex: "#7c3aed" },
7147
+ { name: "success", hex: "#15803d" },
7148
+ { name: "warning", hex: "#b45309" },
7149
+ { name: "destructive", hex: "#b91c1c" },
7150
+ { name: "background", hex: "#ffffff" },
7151
+ { name: "surface", hex: "#ffffff" },
7152
+ { name: "surfaceAlt", hex: "#f5f5f4" },
7153
+ { name: "muted", hex: "#e7e5e4" },
7154
+ { name: "text", hex: "#0c0a09" },
7155
+ { name: "primaryForeground", hex: "#ffffff" },
7156
+ { name: "border", hex: "#a8a29e" }
7157
+ ]
7158
+ });
7159
+ var brandLedBurgundyGold = definePaletteVariant({
7160
+ id: "brand-led-burgundy-gold",
7161
+ name: "Brand-led \u2014 Burgundy Gold",
7162
+ description: "Deep burgundy with warm gold accents and soft neutral grounds.",
7163
+ tags: { tone: "bold", energy: "vibrant", era: "modern" },
7164
+ mode: "light",
7165
+ colors: [
7166
+ { name: "primary", hex: "#7c2e38" },
7167
+ { name: "secondary", hex: "#d4af37" },
7168
+ { name: "accent", hex: "#b8e19a" },
7169
+ { name: "success", hex: "#10b981" },
7170
+ { name: "warning", hex: "#f59e0b" },
7171
+ { name: "destructive", hex: "#ef4444" },
7172
+ { name: "background", hex: "#f1dfd0" },
7173
+ { name: "surface", hex: "#f5e6db" },
7174
+ { name: "surfaceAlt", hex: "#f8ece3" },
7175
+ { name: "muted", hex: "#c9b8a8" },
7176
+ { name: "text", hex: "#400000" },
7177
+ { name: "primaryForeground", hex: "#ffffff" },
7178
+ { name: "border", hex: "#c9b8a8" }
7179
+ ]
7180
+ });
7181
+
7182
+ // ../theme-core/src/palette/variants/high-contrast.ts
7183
+ var highContrastInk = definePaletteVariant({
7184
+ id: "high-contrast-ink",
7185
+ name: "High Contrast \u2014 Ink",
7186
+ description: "Near-black primary with cool greys.",
7187
+ tags: { tone: "bold", energy: "calm", era: "editorial" },
7188
+ mode: "light",
7189
+ colors: [
7190
+ { name: "primary", hex: "#111827" },
7191
+ { name: "secondary", hex: "#374151" },
7192
+ { name: "accent", hex: "#1d4ed8" },
7193
+ { name: "success", hex: "#047857" },
7194
+ { name: "warning", hex: "#b45309" },
7195
+ { name: "destructive", hex: "#b91c1c" },
7196
+ { name: "background", hex: "#ffffff" },
7197
+ { name: "surface", hex: "#ffffff" },
7198
+ { name: "surfaceAlt", hex: "#f3f4f6" },
7199
+ { name: "muted", hex: "#e5e7eb" },
7200
+ { name: "text", hex: "#030712" },
7201
+ { name: "primaryForeground", hex: "#ffffff" },
7202
+ { name: "border", hex: "#6b7280" }
7203
+ ]
7204
+ });
7205
+ var highContrastCharcoal = definePaletteVariant({
7206
+ id: "high-contrast-charcoal",
7207
+ name: "High Contrast \u2014 Charcoal",
7208
+ description: "Warm charcoal primary on a soft cream ground.",
7209
+ tags: { tone: "minimal", energy: "calm", era: "editorial" },
7210
+ mode: "light",
7211
+ colors: [
7212
+ { name: "primary", hex: "#1f2937" },
7213
+ { name: "secondary", hex: "#52525b" },
7214
+ { name: "accent", hex: "#a16207" },
7215
+ { name: "success", hex: "#15803d" },
7216
+ { name: "warning", hex: "#b45309" },
7217
+ { name: "destructive", hex: "#991b1b" },
7218
+ { name: "background", hex: "#fafaf9" },
7219
+ { name: "surface", hex: "#ffffff" },
7220
+ { name: "surfaceAlt", hex: "#f5f5f4" },
7221
+ { name: "muted", hex: "#e7e5e4" },
7222
+ { name: "text", hex: "#0c0a09" },
7223
+ { name: "primaryForeground", hex: "#fafaf9" },
7224
+ { name: "border", hex: "#a8a29e" }
7225
+ ]
7226
+ });
7227
+ var highContrastMonochrome = definePaletteVariant({
7228
+ id: "high-contrast-monochrome",
7229
+ name: "High Contrast \u2014 Monochrome",
7230
+ description: "Pure black-on-white with a single saturated accent.",
7231
+ tags: { tone: "bold", energy: "vibrant", era: "editorial" },
7232
+ mode: "light",
7233
+ colors: [
7234
+ { name: "primary", hex: "#000000" },
7235
+ { name: "secondary", hex: "#404040" },
7236
+ { name: "accent", hex: "#dc2626" },
7237
+ { name: "success", hex: "#000000" },
7238
+ { name: "warning", hex: "#000000" },
7239
+ { name: "destructive", hex: "#dc2626" },
7240
+ { name: "background", hex: "#ffffff" },
7241
+ { name: "surface", hex: "#ffffff" },
7242
+ { name: "surfaceAlt", hex: "#f5f5f5" },
7243
+ { name: "muted", hex: "#e5e5e5" },
7244
+ { name: "text", hex: "#000000" },
7245
+ { name: "primaryForeground", hex: "#ffffff" },
7246
+ { name: "border", hex: "#525252" }
7247
+ ]
7248
+ });
7249
+
7250
+ // ../theme-core/src/palette/variants/soft-natural.ts
7251
+ var softNaturalSage = definePaletteVariant({
7252
+ id: "soft-natural-sage",
7253
+ name: "Soft Natural \u2014 Sage",
7254
+ description: "Olive sage primary on an off-white ground.",
7255
+ tags: { tone: "classic", energy: "calm", era: "organic" },
7256
+ mode: "light",
7257
+ colors: [
7258
+ { name: "primary", hex: "#3f6212" },
7259
+ { name: "secondary", hex: "#6b7280" },
7260
+ { name: "accent", hex: "#0f766e" },
7261
+ { name: "success", hex: "#15803d" },
7262
+ { name: "warning", hex: "#a16207" },
7263
+ { name: "destructive", hex: "#b91c1c" },
7264
+ { name: "background", hex: "#fbfdf7" },
7265
+ { name: "surface", hex: "#ffffff" },
7266
+ { name: "surfaceAlt", hex: "#eef5e8" },
7267
+ { name: "muted", hex: "#e7efdf" },
7268
+ { name: "text", hex: "#1f2a1d" },
7269
+ { name: "primaryForeground", hex: "#ffffff" },
7270
+ { name: "border", hex: "#cbd8c0" }
7271
+ ]
7272
+ });
7273
+ var softNaturalStone = definePaletteVariant({
7274
+ id: "soft-natural-stone",
7275
+ name: "Soft Natural \u2014 Stone",
7276
+ description: "River-stone grey-green primary with cool neutrals.",
7277
+ tags: { tone: "minimal", energy: "calm", era: "organic" },
7278
+ mode: "light",
7279
+ colors: [
7280
+ { name: "primary", hex: "#5a7a5d" },
7281
+ { name: "secondary", hex: "#8a9a8c" },
7282
+ { name: "accent", hex: "#c9b88f" },
7283
+ { name: "success", hex: "#5a7a5d" },
7284
+ { name: "warning", hex: "#a89466" },
7285
+ { name: "destructive", hex: "#a3503e" },
7286
+ { name: "background", hex: "#faf6ec" },
7287
+ { name: "surface", hex: "#ffffff" },
7288
+ { name: "surfaceAlt", hex: "#f0ecdf" },
7289
+ { name: "muted", hex: "#e6e1d0" },
7290
+ { name: "text", hex: "#2f3d31" },
7291
+ { name: "primaryForeground", hex: "#faf6ec" },
7292
+ { name: "border", hex: "#c9c1ad" }
7293
+ ]
7294
+ });
7295
+ var softNaturalWatercolor = definePaletteVariant({
7296
+ id: "soft-natural-watercolor",
7297
+ name: "Soft Natural \u2014 Watercolor",
7298
+ description: "Soft sand primary with watercolour sage accents.",
7299
+ tags: { tone: "classic", energy: "vibrant", era: "organic" },
7300
+ mode: "light",
7301
+ colors: [
7302
+ { name: "primary", hex: "#a8825f" },
7303
+ { name: "secondary", hex: "#88a888" },
7304
+ { name: "accent", hex: "#c8a78e" },
7305
+ { name: "success", hex: "#7d8a5f" },
7306
+ { name: "warning", hex: "#c89a4d" },
7307
+ { name: "destructive", hex: "#a3503e" },
7308
+ { name: "background", hex: "#fefdfa" },
7309
+ { name: "surface", hex: "#ffffff" },
7310
+ { name: "surfaceAlt", hex: "#f6f1e6" },
7311
+ { name: "muted", hex: "#eee7d1" },
7312
+ { name: "text", hex: "#4a3d30" },
7313
+ { name: "primaryForeground", hex: "#fefdfa" },
7314
+ { name: "border", hex: "#d8c9a8" }
7315
+ ]
7316
+ });
7317
+
7318
+ // ../theme-core/src/palette/variants/warm-neutral.ts
7319
+ var warmNeutralClay = definePaletteVariant({
7320
+ id: "warm-neutral-clay",
7321
+ name: "Warm Neutral \u2014 Clay",
7322
+ description: "Terracotta primary on a cream ground.",
7323
+ tags: { tone: "classic", energy: "calm", era: "organic" },
7324
+ mode: "light",
7325
+ colors: [
7326
+ { name: "primary", hex: "#8b5e34" },
7327
+ { name: "secondary", hex: "#7c6f64" },
7328
+ { name: "accent", hex: "#a15c38" },
7329
+ { name: "success", hex: "#527853" },
7330
+ { name: "warning", hex: "#b7791f" },
7331
+ { name: "destructive", hex: "#b91c1c" },
7332
+ { name: "background", hex: "#fffaf3" },
7333
+ { name: "surface", hex: "#ffffff" },
7334
+ { name: "surfaceAlt", hex: "#f5eadc" },
7335
+ { name: "muted", hex: "#efe2d0" },
7336
+ { name: "text", hex: "#2f241c" },
7337
+ { name: "primaryForeground", hex: "#fffaf3" },
7338
+ { name: "border", hex: "#d8c6b3" }
7339
+ ]
7340
+ });
7341
+ var warmNeutralCream = definePaletteVariant({
7342
+ id: "warm-neutral-cream",
7343
+ name: "Warm Neutral \u2014 Cream",
7344
+ description: "Soft sand primary with pale cream surfaces.",
7345
+ tags: { tone: "minimal", energy: "calm", era: "organic" },
7346
+ mode: "light",
7347
+ colors: [
7348
+ { name: "primary", hex: "#b08864" },
7349
+ { name: "secondary", hex: "#9a8c7e" },
7350
+ { name: "accent", hex: "#c2956a" },
7351
+ { name: "success", hex: "#7d8a5f" },
7352
+ { name: "warning", hex: "#c89a4d" },
7353
+ { name: "destructive", hex: "#a3503e" },
7354
+ { name: "background", hex: "#fdf8ee" },
7355
+ { name: "surface", hex: "#ffffff" },
7356
+ { name: "surfaceAlt", hex: "#f4ebd9" },
7357
+ { name: "muted", hex: "#ede3cf" },
7358
+ { name: "text", hex: "#3b2f24" },
7359
+ { name: "primaryForeground", hex: "#fdf8ee" },
7360
+ { name: "border", hex: "#e0d2b8" }
7361
+ ]
7362
+ });
7363
+ var warmNeutralSoftEarth = definePaletteVariant({
7364
+ id: "warm-neutral-soft-earth",
7365
+ name: "Warm Neutral \u2014 Soft Earth",
7366
+ description: "Cream ground with terracotta primary, clay accents, and olive depth.",
7367
+ tags: { tone: "classic", energy: "calm", era: "organic" },
7368
+ mode: "light",
7369
+ colors: [
7370
+ { name: "primary", hex: "#a8573d" },
7371
+ { name: "secondary", hex: "#72765c" },
7372
+ { name: "accent", hex: "#c87557" },
7373
+ { name: "success", hex: "#687854" },
7374
+ { name: "warning", hex: "#b7863e" },
7375
+ { name: "destructive", hex: "#a54b3c" },
7376
+ { name: "background", hex: "#fbf6eb" },
7377
+ { name: "surface", hex: "#fffdf7" },
7378
+ { name: "surfaceAlt", hex: "#f0e4d3" },
7379
+ { name: "muted", hex: "#eadbc6" },
7380
+ { name: "text", hex: "#30281f" },
7381
+ { name: "primaryForeground", hex: "#fffaf3" },
7382
+ { name: "border", hex: "#d9c8b2" }
7383
+ ]
7384
+ });
7385
+ var warmNeutralForest = definePaletteVariant({
7386
+ id: "warm-neutral-forest",
7387
+ name: "Warm Neutral \u2014 Forest",
7388
+ description: "Deep forest green primary with earthy neutrals.",
7389
+ tags: { tone: "classic", energy: "calm", era: "organic" },
7390
+ mode: "light",
7391
+ colors: [
7392
+ { name: "primary", hex: "#3d5840" },
7393
+ { name: "secondary", hex: "#7a6f5d" },
7394
+ { name: "accent", hex: "#b06b50" },
7395
+ { name: "success", hex: "#5a7a5d" },
7396
+ { name: "warning", hex: "#b7791f" },
7397
+ { name: "destructive", hex: "#b91c1c" },
7398
+ { name: "background", hex: "#fbf8f0" },
7399
+ { name: "surface", hex: "#ffffff" },
7400
+ { name: "surfaceAlt", hex: "#f2ecdb" },
7401
+ { name: "muted", hex: "#ebe3cc" },
7402
+ { name: "text", hex: "#2a2a2a" },
7403
+ { name: "primaryForeground", hex: "#fbf8f0" },
7404
+ { name: "border", hex: "#cdc1a4" }
7405
+ ]
7406
+ });
7407
+
7408
+ // ../theme-core/src/palette/variants/index.ts
7409
+ var paletteVariants = [
7410
+ // Brand-led family
7411
+ brandLedCool,
7412
+ brandLedWarm,
7413
+ brandLedJewel,
7414
+ brandLedBurgundyGold,
7415
+ // Warm-neutral family
7416
+ warmNeutralClay,
7417
+ warmNeutralCream,
7418
+ warmNeutralSoftEarth,
7419
+ warmNeutralForest,
7420
+ // High-contrast family
7421
+ highContrastInk,
7422
+ highContrastCharcoal,
7423
+ highContrastMonochrome,
7424
+ // Soft-natural family
7425
+ softNaturalSage,
7426
+ softNaturalStone,
7427
+ softNaturalWatercolor
7428
+ ];
7429
+ var paletteVariantsById = new Map(
7430
+ paletteVariants.map((v) => [v.id, v])
7431
+ );
7432
+
7433
+ // ../theme-core/src/accordions/siteStyleDefaults.ts
7434
+ var softEarthAccordionSystem = {
7435
+ background: {
7436
+ type: "solid",
7437
+ colorToken: "background"
7438
+ },
7439
+ spacing: "comfortable",
7440
+ corners: "square",
7441
+ border: null,
7442
+ shadow: null,
7443
+ icon: {
7444
+ style: "plus-minus",
7445
+ position: "right",
7446
+ size: "md",
7447
+ colorToken: "primary"
7448
+ },
7449
+ trigger: {
7450
+ textColorToken: "text",
7451
+ fontWeight: "medium"
7452
+ },
7453
+ hover: {
7454
+ textColorToken: "primary"
7455
+ },
7456
+ content: {
7457
+ textColorToken: "neutral-700"
7458
+ }
7459
+ };
7460
+
7461
+ // ../theme-core/src/site-styles/headerLooks.ts
7462
+ function asHeaderLookId(value) {
7463
+ return value;
7464
+ }
7465
+ function asHeaderLayoutId(value) {
7466
+ return value;
7467
+ }
7468
+ function asHeaderStyleId(value) {
7469
+ return value;
7470
+ }
7471
+ function baseHeader(theme) {
7472
+ const {
7473
+ navLinkStyle: _navLinkStyle,
7474
+ dropdownStyle: _dropdownStyle,
7475
+ ctaVariant: _ctaVariant,
7476
+ navContainer: _navContainer,
7477
+ container: _container,
7478
+ shadow: _shadow,
7479
+ logo: _logo,
7480
+ logoText: _logoText,
7481
+ border: _border,
7482
+ ...header
7483
+ } = theme.header;
7484
+ return {
7485
+ ...header,
7486
+ navContainer: { type: "none", tint: null, opacity: 0.15 }
7487
+ };
7488
+ }
7489
+ var headerLayoutCatalog = [
7490
+ {
7491
+ id: asHeaderLayoutId("classic"),
7492
+ label: "Classic",
7493
+ description: "Logo and navigation in one practical horizontal row.",
7494
+ structure: "inline-classic",
7495
+ variant: "classic",
7496
+ defaultPositioning: "sticky",
7497
+ shrinkOnScroll: false
7498
+ },
7499
+ {
7500
+ id: asHeaderLayoutId("centered"),
7501
+ label: "Centered",
7502
+ description: "Logo centered above a balanced navigation row.",
7503
+ structure: "centered-stack",
7504
+ variant: "centered",
7505
+ defaultPositioning: "static",
7506
+ shrinkOnScroll: false,
7507
+ maxRecommendedNavItems: 5,
7508
+ allowedLogoShapes: ["none", "text-only", "horizontal", "square"]
7509
+ },
7510
+ {
7511
+ id: asHeaderLayoutId("floating"),
7512
+ label: "Floating",
7513
+ description: "Detached header chrome that sits over the opening section.",
7514
+ structure: "floating-shell",
7515
+ variant: "floating",
7516
+ defaultPositioning: "sticky",
7517
+ shrinkOnScroll: true,
7518
+ maxRecommendedNavItems: 5,
7519
+ allowedLogoShapes: ["none", "text-only", "horizontal"]
7520
+ }
7521
+ ];
7522
+ function supportedLayouts(ids) {
7523
+ return ids.map(asHeaderLayoutId);
7524
+ }
7525
+ var headerStyleCatalog = [
7526
+ {
7527
+ id: asHeaderStyleId("minimal"),
7528
+ label: "Minimal",
7529
+ description: "Quiet surface with simple color-change navigation.",
7530
+ supportedLayoutIds: supportedLayouts(["classic", "centered"]),
7531
+ navInteraction: "color-change",
7532
+ surface: "neutral",
7533
+ defaultDepth: "none",
7534
+ navTypography: "plain",
7535
+ moods: ["calm", "professional", "editorial"]
7536
+ },
7537
+ {
7538
+ id: asHeaderStyleId("fine-line"),
7539
+ label: "Fine Line",
7540
+ description: "Light surface with a crisp lower rule and underline hover.",
7541
+ supportedLayoutIds: supportedLayouts(["classic", "centered"]),
7542
+ navInteraction: "underline-grow",
7543
+ surface: "bordered",
7544
+ defaultDepth: "line",
7545
+ navTypography: "plain",
7546
+ moods: ["calm", "professional", "editorial"]
7547
+ },
7548
+ {
7549
+ id: asHeaderStyleId("soft-bar"),
7550
+ label: "Soft Bar",
7551
+ description: "Soft tinted surface with gentle pill hover states.",
7552
+ supportedLayoutIds: supportedLayouts(["classic", "centered"]),
7553
+ navInteraction: "pill-background",
7554
+ surface: "soft",
7555
+ defaultDepth: "line",
7556
+ navTypography: "plain",
7557
+ moods: ["calm", "professional"]
7558
+ },
7559
+ {
7560
+ id: asHeaderStyleId("pill-nav"),
7561
+ label: "Pill Nav",
7562
+ description: "A calm pill navigation rail over a neutral header.",
7563
+ supportedLayoutIds: supportedLayouts(["classic", "centered"]),
7564
+ navInteraction: "pill-background",
7565
+ surface: "soft",
7566
+ defaultDepth: "none",
7567
+ navTypography: "plain",
7568
+ moods: ["calm"]
7569
+ },
7570
+ {
7571
+ id: asHeaderStyleId("brand-bar"),
7572
+ label: "Brand Bar",
7573
+ description: "Solid brand surface with high-contrast navigation.",
7574
+ supportedLayoutIds: supportedLayouts(["classic", "centered"]),
7575
+ navInteraction: "color-change",
7576
+ surface: "brand-solid",
7577
+ defaultDepth: "none",
7578
+ navTypography: "brand-caps",
7579
+ moods: ["professional", "expressive", "utility"]
7580
+ },
7581
+ {
7582
+ id: asHeaderStyleId("brand-underline"),
7583
+ label: "Brand Underline",
7584
+ description: "Brand surface with underline-grow navigation.",
7585
+ supportedLayoutIds: supportedLayouts(["classic"]),
7586
+ navInteraction: "underline-grow",
7587
+ surface: "brand-solid",
7588
+ defaultDepth: "none",
7589
+ navTypography: "brand-caps",
7590
+ moods: ["expressive"]
7591
+ },
7592
+ {
7593
+ id: asHeaderStyleId("brand-pill"),
7594
+ label: "Brand Pill",
7595
+ description: "Solid brand surface with rounded active and hover states.",
7596
+ supportedLayoutIds: supportedLayouts(["classic", "centered", "floating"]),
7597
+ navInteraction: "pill-background",
7598
+ surface: "brand-solid",
7599
+ defaultDepth: "none",
7600
+ navTypography: "brand-caps",
7601
+ moods: ["expressive"]
7602
+ },
7603
+ {
7604
+ id: asHeaderStyleId("serif-line"),
7605
+ label: "Serif Line",
7606
+ description: "Typographic logo treatment with understated underline navigation.",
7607
+ supportedLayoutIds: supportedLayouts(["classic", "centered"]),
7608
+ navInteraction: "underline-grow",
7609
+ surface: "bordered",
7610
+ defaultDepth: "line",
7611
+ navTypography: "heading",
7612
+ moods: ["editorial", "calm"]
7613
+ },
7614
+ {
7615
+ id: asHeaderStyleId("flat-tabs"),
7616
+ label: "Flat Tabs",
7617
+ description: "Flat block hover and active states with a Swiss utility feel.",
7618
+ supportedLayoutIds: supportedLayouts(["classic", "centered"]),
7619
+ navInteraction: "flat-block",
7620
+ surface: "bordered",
7621
+ defaultDepth: "shadow",
7622
+ navTypography: "quiet-caps",
7623
+ moods: ["professional", "utility", "expressive"]
7624
+ },
7625
+ {
7626
+ id: asHeaderStyleId("glass"),
7627
+ label: "Glass",
7628
+ description: "Translucent chrome with frosted navigation backing.",
7629
+ supportedLayoutIds: supportedLayouts(["floating"]),
7630
+ navInteraction: "glass-backed",
7631
+ surface: "floating",
7632
+ defaultDepth: "shadow",
7633
+ navTypography: "plain",
7634
+ moods: ["expressive", "calm"]
7635
+ },
7636
+ {
7637
+ id: asHeaderStyleId("minimal-surface"),
7638
+ label: "Clear Split",
7639
+ description: "Floating logo with transparent navigation and no shared shell.",
7640
+ supportedLayoutIds: supportedLayouts(["floating"]),
7641
+ navInteraction: "color-change",
7642
+ surface: "floating",
7643
+ defaultDepth: "none",
7644
+ navTypography: "plain",
7645
+ moods: ["editorial", "calm"]
7646
+ },
7647
+ {
7648
+ id: asHeaderStyleId("soft-shell"),
7649
+ label: "Soft Shell",
7650
+ description: "Floating rounded shell with soft pill navigation states.",
7651
+ supportedLayoutIds: supportedLayouts(["floating"]),
7652
+ navInteraction: "pill-background",
7653
+ surface: "floating",
7654
+ defaultDepth: "shadow",
7655
+ navTypography: "plain",
7656
+ moods: ["calm", "professional"]
7657
+ },
7658
+ {
7659
+ id: asHeaderStyleId("split-glass"),
7660
+ label: "Split Glass",
7661
+ description: "Logo floats independently while the navigation sits in a glass rail.",
7662
+ supportedLayoutIds: supportedLayouts(["floating"]),
7663
+ navInteraction: "glass-backed",
7664
+ surface: "floating",
7665
+ defaultDepth: "shadow",
7666
+ navTypography: "quiet-caps",
7667
+ moods: ["expressive"]
7668
+ },
7669
+ {
7670
+ id: asHeaderStyleId("split-pill"),
7671
+ label: "Split Pill",
7672
+ description: "Logo floats independently with a soft pill-backed navigation rail.",
7673
+ supportedLayoutIds: supportedLayouts(["floating"]),
7674
+ navInteraction: "pill-background",
7675
+ surface: "floating",
7676
+ defaultDepth: "shadow",
7677
+ navTypography: "heading",
7678
+ moods: ["calm", "editorial"]
7679
+ }
7680
+ ];
7681
+ var headerLayoutsById = new Map(
7682
+ headerLayoutCatalog.map((layout) => [layout.id, layout])
7683
+ );
7684
+ var headerStylesById = new Map(
7685
+ headerStyleCatalog.map((style) => [style.id, style])
7686
+ );
7687
+ var headerStyleCompatibilityOrder = /* @__PURE__ */ new Map([
7688
+ [
7689
+ asHeaderLayoutId("classic"),
7690
+ headerStyleRepairChain([
7691
+ "minimal",
7692
+ "fine-line",
7693
+ "soft-bar",
7694
+ "pill-nav",
7695
+ "brand-bar",
7696
+ "brand-underline",
7697
+ "brand-pill",
7698
+ "serif-line",
7699
+ "flat-tabs"
7700
+ ])
7701
+ ],
7702
+ [
7703
+ asHeaderLayoutId("centered"),
7704
+ headerStyleRepairChain([
7705
+ "minimal",
7706
+ "fine-line",
7707
+ "soft-bar",
7708
+ "pill-nav",
7709
+ "brand-bar",
7710
+ "brand-pill",
7711
+ "serif-line",
7712
+ "flat-tabs"
7713
+ ])
7714
+ ],
7715
+ [
7716
+ asHeaderLayoutId("floating"),
7717
+ headerStyleRepairChain([
7718
+ "glass",
7719
+ "minimal-surface",
7720
+ "split-glass",
7721
+ "split-pill",
7722
+ "soft-shell",
7723
+ "brand-pill"
7724
+ ])
7725
+ ]
7726
+ ]);
7727
+ function headerStyleRepairChain(values) {
7728
+ return values.map(asHeaderStyleId);
7729
+ }
7730
+ var headerStyleRepairOrder = /* @__PURE__ */ new Map(
7731
+ [
7732
+ [
7733
+ asHeaderStyleId("brand-bar"),
7734
+ headerStyleRepairChain(["brand-bar", "brand-pill", "minimal"])
7735
+ ],
7736
+ [
7737
+ asHeaderStyleId("brand-underline"),
7738
+ headerStyleRepairChain(["serif-line", "fine-line", "minimal"])
7739
+ ],
7740
+ [
7741
+ asHeaderStyleId("brand-pill"),
7742
+ headerStyleRepairChain(["brand-pill", "brand-bar", "minimal"])
7743
+ ],
7744
+ [
7745
+ asHeaderStyleId("pill-nav"),
7746
+ headerStyleRepairChain(["pill-nav", "soft-bar", "minimal"])
7747
+ ],
7748
+ [
7749
+ asHeaderStyleId("flat-tabs"),
7750
+ headerStyleRepairChain(["flat-tabs", "pill-nav", "minimal"])
7751
+ ],
7752
+ [
7753
+ asHeaderStyleId("serif-line"),
7754
+ headerStyleRepairChain(["serif-line", "fine-line", "minimal"])
7755
+ ],
7756
+ [
7757
+ asHeaderStyleId("glass"),
7758
+ headerStyleRepairChain([
7759
+ "glass",
7760
+ "soft-shell",
7761
+ "fine-line",
7762
+ "minimal-surface",
7763
+ "minimal"
7764
+ ])
7765
+ ],
7766
+ [
7767
+ asHeaderStyleId("soft-shell"),
7768
+ headerStyleRepairChain(["soft-shell", "soft-bar", "minimal"])
7769
+ ],
7770
+ [
7771
+ asHeaderStyleId("minimal-surface"),
7772
+ headerStyleRepairChain(["minimal-surface", "minimal"])
7773
+ ],
7774
+ [
7775
+ asHeaderStyleId("split-glass"),
7776
+ headerStyleRepairChain(["split-glass", "glass", "minimal-surface"])
7777
+ ],
7778
+ [
7779
+ asHeaderStyleId("split-pill"),
7780
+ headerStyleRepairChain(["split-pill", "soft-shell", "brand-pill"])
7781
+ ],
7782
+ [
7783
+ asHeaderStyleId("fine-line"),
7784
+ headerStyleRepairChain(["fine-line", "minimal"])
7785
+ ],
7786
+ [
7787
+ asHeaderStyleId("soft-bar"),
7788
+ headerStyleRepairChain(["soft-bar", "minimal"])
7789
+ ],
7790
+ [asHeaderStyleId("minimal"), headerStyleRepairChain(["minimal"])]
7791
+ ]
7792
+ );
7793
+ var legacyHeaderLookAliases = [
7794
+ {
7795
+ lookId: asHeaderLookId("clean-base"),
7796
+ selection: {
7797
+ layoutId: asHeaderLayoutId("classic"),
7798
+ styleId: asHeaderStyleId("minimal")
7799
+ }
7800
+ },
7801
+ {
7802
+ lookId: asHeaderLookId("brand-solid"),
7803
+ selection: {
7804
+ layoutId: asHeaderLayoutId("classic"),
7805
+ styleId: asHeaderStyleId("brand-bar")
7806
+ }
7807
+ },
7808
+ {
7809
+ lookId: asHeaderLookId("serif-line"),
7810
+ selection: {
7811
+ layoutId: asHeaderLayoutId("centered"),
7812
+ styleId: asHeaderStyleId("serif-line")
7813
+ }
7814
+ },
7815
+ {
7816
+ lookId: asHeaderLookId("centered-calm"),
7817
+ selection: {
7818
+ layoutId: asHeaderLayoutId("centered"),
7819
+ styleId: asHeaderStyleId("minimal")
7820
+ }
7821
+ },
7822
+ {
7823
+ lookId: asHeaderLookId("practical-utility"),
7824
+ selection: {
7825
+ layoutId: asHeaderLayoutId("classic"),
7826
+ styleId: asHeaderStyleId("flat-tabs")
7827
+ }
7828
+ },
7829
+ {
7830
+ lookId: asHeaderLookId("minimal-transparent"),
7831
+ selection: {
7832
+ layoutId: asHeaderLayoutId("classic"),
7833
+ styleId: asHeaderStyleId("minimal")
7834
+ }
7835
+ },
7836
+ {
7837
+ lookId: asHeaderLookId("transparent-overlay"),
7838
+ selection: {
7839
+ layoutId: asHeaderLayoutId("floating"),
7840
+ styleId: asHeaderStyleId("glass")
7841
+ }
7842
+ },
7843
+ {
7844
+ lookId: asHeaderLookId("floating-glass"),
7845
+ selection: {
7846
+ layoutId: asHeaderLayoutId("floating"),
7847
+ styleId: asHeaderStyleId("glass")
7848
+ }
7849
+ }
7850
+ ];
7851
+ var legacyHeaderLookAliasesById = new Map(legacyHeaderLookAliases.map((alias) => [alias.lookId, alias]));
7852
+ function getHeaderStyle(id) {
7853
+ return headerStylesById.get(id) ?? null;
7854
+ }
7855
+ function isHeaderStyleCompatibleWithLayout(style, layoutId) {
7856
+ return style.supportedLayoutIds.includes(layoutId);
7857
+ }
7858
+ function getHeaderStyleOrThrow(id) {
7859
+ const style = getHeaderStyle(id);
7860
+ if (!style) {
7861
+ throw new Error(`Unknown Theme V2 header style: ${id}`);
7862
+ }
7863
+ return style;
7864
+ }
7865
+ function resolveLegacyHeaderLookAlias(lookId) {
7866
+ return legacyHeaderLookAliasesById.get(lookId)?.selection ?? null;
7867
+ }
7868
+ function getCompatibleHeaderStyleIds(layoutId) {
7869
+ return (headerStyleCompatibilityOrder.get(layoutId) ?? []).filter(
7870
+ (styleId) => {
7871
+ const style = getHeaderStyleOrThrow(styleId);
7872
+ return isHeaderStyleCompatibleWithLayout(style, layoutId);
7873
+ }
7874
+ );
7875
+ }
7876
+ function themedHeaderShadow(theme) {
7877
+ switch (theme.shadow.elevation) {
7878
+ case "none":
7879
+ return void 0;
7880
+ case "low":
7881
+ return { elevation: "sm" };
7882
+ case "medium":
7883
+ return { elevation: "md" };
7884
+ case "high":
7885
+ return { elevation: "lg" };
7886
+ default:
7887
+ return assertNever3(
7888
+ theme.shadow.elevation,
7889
+ "Unhandled theme shadow elevation"
7890
+ );
7891
+ }
7892
+ }
7893
+ function solidBrandHeader(theme) {
7894
+ const ctaVariant = resolveHeaderCtaVariant(theme, "inverted");
7895
+ return {
7896
+ ...baseHeader(theme),
7897
+ variant: "classic",
7898
+ positioning: "sticky",
7899
+ shrinkOnScroll: true,
7900
+ background: {
7901
+ type: "color",
7902
+ color: "primary"
7903
+ },
7904
+ textColor: "primaryForeground",
7905
+ navColor: "primaryForeground",
7906
+ navStyle: "underline-grow",
7907
+ navWeight: "bold",
7908
+ navLinkStyle: {
7909
+ typography: "body",
7910
+ fontWeight: "bold",
7911
+ textTransform: "uppercase",
7912
+ italic: false,
7913
+ colorToken: "primaryForeground",
7914
+ hoverColorToken: "secondary",
7915
+ textSize: "sm",
7916
+ letterSpacing: "wider",
7917
+ padding: "compact",
7918
+ paddingX: "compact",
7919
+ borderRadius: "none",
7920
+ effects: {
7921
+ hover: [
7922
+ {
7923
+ effectId: "text-color-change",
7924
+ options: { hoverColorToken: "secondary" }
7925
+ },
7926
+ {
7927
+ effectId: "nav-underline",
7928
+ options: { style: "grow", colorToken: "secondary" }
7929
+ }
7930
+ ]
7931
+ }
7932
+ },
7933
+ dropdownStyle: {
7934
+ background: "primary-700",
7935
+ textColor: "primaryForeground",
7936
+ borderColor: null,
7937
+ shadow: "md",
7938
+ borderRadius: "md",
7939
+ hoverBackground: "primary-900",
7940
+ hoverTextColor: "secondary",
7941
+ textTransform: "uppercase",
7942
+ letterSpacing: "wider",
7943
+ fontWeight: "bold",
7944
+ textSize: "sm"
7945
+ },
7946
+ border: {
7947
+ style: "solid",
7948
+ width: "none",
7949
+ position: "none"
7950
+ },
7951
+ logoText: {
7952
+ hideOnShrink: true,
7953
+ mobileMaxWidth: "sm",
7954
+ mobileWrapLines: 2
7955
+ },
7956
+ ctaGap: "compact",
7957
+ ctaTreatment: "inverted",
7958
+ ...ctaVariant ? { ctaVariant } : {}
7959
+ };
7960
+ }
7961
+ function cleanBaseHeader(theme) {
7962
+ return {
7963
+ ...baseHeader(theme),
7964
+ variant: "classic",
7965
+ positioning: "sticky",
7966
+ shrinkOnScroll: false,
7967
+ background: {
7968
+ type: "color",
7969
+ color: "surface"
7970
+ },
7971
+ textColor: "text",
7972
+ navColor: "text",
7973
+ navStyle: "minimal",
7974
+ navWeight: "medium",
7975
+ border: {
7976
+ style: "solid",
7977
+ width: "thin",
7978
+ position: "bottom",
7979
+ colorToken: "border"
7980
+ },
7981
+ ctaTreatment: "default",
7982
+ ctaGap: "default"
7983
+ };
7984
+ }
7985
+ function serifLineHeader(theme) {
7986
+ return {
7987
+ ...baseHeader(theme),
7988
+ variant: "centered",
7989
+ positioning: "sticky",
7990
+ shrinkOnScroll: false,
7991
+ background: {
7992
+ type: "color",
7993
+ color: "background"
7994
+ },
7995
+ textColor: "text",
7996
+ navColor: "text",
7997
+ navStyle: "underline-grow",
7998
+ navWeight: "medium",
7999
+ logo: {
8000
+ fontFamily: "heading",
8001
+ letterSpacing: "wide",
8002
+ gradient: false
8003
+ },
8004
+ ctaTreatment: "outline",
8005
+ ctaVariant: resolveHeaderCtaVariant(theme, "outline"),
8006
+ ctaGap: "relaxed"
8007
+ };
8008
+ }
8009
+ function centeredCalmHeader(theme) {
8010
+ return {
8011
+ ...baseHeader(theme),
8012
+ variant: "centered",
8013
+ positioning: "static",
8014
+ shrinkOnScroll: false,
8015
+ background: {
8016
+ type: "color",
8017
+ color: "surface"
8018
+ },
8019
+ textColor: "text",
8020
+ navColor: "text",
8021
+ navStyle: "minimal",
8022
+ navWeight: "medium",
8023
+ ctaTreatment: "ghost",
8024
+ ctaVariant: resolveHeaderCtaVariant(theme, "ghost"),
8025
+ ctaGap: "none"
8026
+ };
8027
+ }
8028
+ function practicalUtilityHeader(theme) {
8029
+ return {
8030
+ ...baseHeader(theme),
8031
+ variant: "classic",
8032
+ positioning: "sticky",
8033
+ shrinkOnScroll: true,
8034
+ background: {
8035
+ type: "color",
8036
+ color: "surface"
8037
+ },
8038
+ textColor: "text",
8039
+ navColor: "text",
8040
+ navStyle: "solid",
8041
+ navWeight: "semibold",
8042
+ shadow: themedHeaderShadow(theme),
8043
+ border: {
8044
+ style: "solid",
8045
+ width: "thin",
8046
+ position: "bottom",
8047
+ colorToken: "border"
8048
+ },
8049
+ ctaTreatment: "primary",
8050
+ ctaVariant: resolveHeaderCtaVariant(theme, "primary"),
8051
+ ctaGap: "compact",
8052
+ logoText: {
8053
+ mobileMaxWidth: "sm",
8054
+ mobileWrapLines: 1,
8055
+ hideOnShrink: false
8056
+ }
8057
+ };
8058
+ }
8059
+ function minimalTransparentHeader(theme) {
8060
+ return {
8061
+ ...baseHeader(theme),
8062
+ variant: "classic",
8063
+ positioning: "static",
8064
+ shrinkOnScroll: false,
8065
+ background: {
8066
+ type: "color",
8067
+ color: "transparent"
8068
+ },
8069
+ textColor: "text",
8070
+ navColor: "text",
8071
+ navStyle: "underline",
8072
+ navWeight: "medium",
8073
+ border: {
8074
+ style: "solid",
8075
+ width: "none",
8076
+ position: "none"
8077
+ },
8078
+ ctaTreatment: "outline",
8079
+ ctaVariant: resolveHeaderCtaVariant(theme, "outline"),
8080
+ ctaGap: "default"
8081
+ };
8082
+ }
8083
+ function transparentOverlayHeader(theme) {
8084
+ return {
8085
+ ...baseHeader(theme),
8086
+ variant: "transparent",
8087
+ positioning: "fixed",
8088
+ shrinkOnScroll: true,
8089
+ background: {
8090
+ type: "color",
8091
+ color: "transparent"
8092
+ },
8093
+ textColor: "background",
8094
+ navColor: "background",
8095
+ navStyle: "frosted",
8096
+ navWeight: "semibold",
8097
+ border: {
8098
+ style: "solid",
8099
+ width: "none",
8100
+ position: "none"
8101
+ },
8102
+ ctaTreatment: "inverted",
8103
+ ctaVariant: resolveHeaderCtaVariant(theme, "inverted"),
8104
+ ctaGap: "compact"
8105
+ };
8106
+ }
8107
+ function floatingGlassHeader(theme) {
8108
+ return {
8109
+ ...transparentOverlayHeader(theme),
8110
+ variant: "floating",
8111
+ positioning: "sticky",
8112
+ navStyle: "frosted",
8113
+ navContainer: {
8114
+ type: "glass",
8115
+ tint: "text",
8116
+ opacity: 0.16
8117
+ },
8118
+ container: {
8119
+ rounded: "2xl",
8120
+ border: true,
8121
+ shadow: true,
8122
+ padding: "sm",
8123
+ tint: "background",
8124
+ opacity: 0.12
8125
+ }
8126
+ };
8127
+ }
8128
+ var headerLookCatalog = [
8129
+ {
8130
+ id: asHeaderLookId("clean-base"),
8131
+ label: "Clean base",
8132
+ visualTreatment: "solid-neutral",
8133
+ layoutBehavior: "sticky",
8134
+ configuration: {
8135
+ structure: "inline-classic",
8136
+ treatment: "solid-neutral",
8137
+ behavior: "sticky"
8138
+ },
8139
+ openingRequirement: "none",
8140
+ compile: cleanBaseHeader
8141
+ },
8142
+ {
8143
+ id: asHeaderLookId("brand-solid"),
8144
+ label: "Brand solid",
8145
+ visualTreatment: "solid-brand",
8146
+ layoutBehavior: "sticky-shrink",
8147
+ configuration: {
8148
+ structure: "inline-classic",
8149
+ treatment: "solid-brand",
8150
+ behavior: "sticky-shrink"
8151
+ },
8152
+ openingRequirement: "none",
8153
+ compile: solidBrandHeader
8154
+ },
8155
+ {
8156
+ id: asHeaderLookId("serif-line"),
8157
+ label: "Serif line",
8158
+ visualTreatment: "light-serif",
8159
+ layoutBehavior: "sticky",
8160
+ configuration: {
8161
+ structure: "centered-stack",
8162
+ treatment: "light-serif",
8163
+ behavior: "sticky"
8164
+ },
8165
+ openingRequirement: "none",
8166
+ maxRecommendedNavItems: 6,
8167
+ compile: serifLineHeader
8168
+ },
8169
+ {
8170
+ id: asHeaderLookId("centered-calm"),
8171
+ label: "Centered calm",
8172
+ visualTreatment: "light-serif",
8173
+ layoutBehavior: "normal-flow",
8174
+ configuration: {
8175
+ structure: "centered-stack",
8176
+ treatment: "light-serif",
8177
+ behavior: "normal-flow"
8178
+ },
8179
+ openingRequirement: "none",
8180
+ maxRecommendedNavItems: 5,
8181
+ allowedLogoShapes: ["none", "text-only", "horizontal", "square"],
8182
+ compile: centeredCalmHeader
8183
+ },
8184
+ {
8185
+ id: asHeaderLookId("practical-utility"),
8186
+ label: "Practical utility",
8187
+ visualTreatment: "solid-neutral",
8188
+ layoutBehavior: "sticky-shrink",
8189
+ configuration: {
8190
+ structure: "inline-classic",
8191
+ treatment: "solid-neutral",
8192
+ behavior: "sticky-shrink"
8193
+ },
8194
+ openingRequirement: "none",
8195
+ requiresProminentCta: true,
8196
+ compile: practicalUtilityHeader
8197
+ },
8198
+ {
8199
+ id: asHeaderLookId("minimal-transparent"),
8200
+ label: "Minimal transparent",
8201
+ visualTreatment: "minimal-transparent",
8202
+ layoutBehavior: "normal-flow",
8203
+ configuration: {
8204
+ structure: "inline-classic",
8205
+ treatment: "minimal-transparent",
8206
+ behavior: "normal-flow"
8207
+ },
8208
+ openingRequirement: "reserved-space-ok",
8209
+ compile: minimalTransparentHeader
8210
+ },
8211
+ {
8212
+ id: asHeaderLookId("transparent-overlay"),
8213
+ label: "Transparent overlay",
8214
+ visualTreatment: "transparent-overlay",
8215
+ layoutBehavior: "fixed-overlay",
8216
+ configuration: {
8217
+ structure: "inline-classic",
8218
+ treatment: "transparent-overlay",
8219
+ behavior: "fixed-overlay"
8220
+ },
8221
+ openingRequirement: "requires-image-hero-with-contrast-overlay",
8222
+ maxRecommendedNavItems: 5,
8223
+ allowedLogoShapes: ["none", "text-only", "horizontal"],
8224
+ compile: transparentOverlayHeader
8225
+ },
8226
+ {
8227
+ id: asHeaderLookId("floating-glass"),
8228
+ label: "Floating glass",
8229
+ visualTreatment: "floating-glass",
8230
+ layoutBehavior: "fixed-floating",
8231
+ configuration: {
8232
+ structure: "floating-shell",
8233
+ treatment: "floating-glass",
8234
+ behavior: "fixed-floating"
8235
+ },
8236
+ openingRequirement: "requires-image-hero-with-contrast-overlay",
8237
+ maxRecommendedNavItems: 5,
8238
+ allowedLogoShapes: ["none", "text-only", "horizontal"],
8239
+ compile: floatingGlassHeader
8240
+ }
8241
+ ];
8242
+ var guaranteedFallbackHeaderLookId = asHeaderLookId("clean-base");
8243
+ var guaranteedFallbackHeaderLayoutId = asHeaderLayoutId("classic");
8244
+ var guaranteedFallbackHeaderStyleId = asHeaderStyleId("minimal");
8245
+ var allowedHeaderConfigurationKeys = new Set(
8246
+ headerLookCatalog.map((look) => headerConfigurationKey(look.configuration))
8247
+ );
8248
+ var headerLooksById = new Map(
8249
+ headerLookCatalog.map((look) => [look.id, look])
8250
+ );
8251
+ function headerConfigurationKey(configuration) {
8252
+ return `${configuration.structure}:${configuration.treatment}:${configuration.behavior}`;
8253
+ }
8254
+
8255
+ // ../theme-core/src/site-styles/footerLooks.ts
8256
+ function asFooterLookId(value) {
8257
+ return value;
8258
+ }
8259
+ var guaranteedFallbackFooterLookId = asFooterLookId("footer-muted-grounding");
8260
+ function mutedGroundingFooter(theme) {
8261
+ return theme.footer;
8262
+ }
8263
+ function brandTwoBandFooter(theme) {
8264
+ return {
8265
+ ...theme.footer,
8266
+ variant: "split",
8267
+ maxWidth: "container",
8268
+ background: {
8269
+ type: "color",
8270
+ color: "primary-800"
8271
+ },
8272
+ navStyle: "minimal",
8273
+ navWeight: "medium",
8274
+ navColor: "primaryForeground",
8275
+ navLinkStyle: {
8276
+ typography: "body",
8277
+ fontWeight: "medium",
8278
+ textTransform: "none",
8279
+ italic: false,
8280
+ colorToken: "primaryForeground",
8281
+ hoverColorToken: "secondary",
8282
+ padding: "none",
8283
+ borderRadius: "none"
8284
+ },
8285
+ bottomTextLinkStyle: {
8286
+ colorToken: "secondary",
8287
+ decorationColorToken: "secondary"
8288
+ },
8289
+ navLayout: {
8290
+ layout: "inline-wrap",
8291
+ align: "start",
8292
+ gapX: "default",
8293
+ gapY: "tight"
8294
+ },
8295
+ logo: {
8296
+ showLogo: true,
8297
+ showLogoText: false,
8298
+ placement: "left",
8299
+ size: "sm",
8300
+ align: "start"
8301
+ },
8302
+ bottomBar: {
8303
+ enabled: true,
8304
+ fullBleed: true,
8305
+ background: {
8306
+ type: "color",
8307
+ color: "primary-900"
8308
+ },
8309
+ textColor: "primaryForeground",
8310
+ textAlign: "center",
8311
+ paddingX: "default",
8312
+ paddingY: "compact",
8313
+ borderTop: {
8314
+ width: "none"
8315
+ }
8316
+ }
8317
+ };
8318
+ }
8319
+ var footerLookCatalog = [
8320
+ {
8321
+ id: asFooterLookId("footer-muted-grounding"),
8322
+ label: "Muted grounding footer",
8323
+ compile: mutedGroundingFooter
8324
+ },
8325
+ {
8326
+ id: asFooterLookId("site-footer-brand-two-band"),
8327
+ label: "Two-band brand footer",
8328
+ maxRecommendedNavDensity: "balanced",
8329
+ allowedContentPresence: ["default-footer", "default-and-blocks"],
8330
+ compile: brandTwoBandFooter
8331
+ }
8332
+ ];
8333
+ var footerLooksById = new Map(
8334
+ footerLookCatalog.map((look) => [look.id, look])
8335
+ );
8336
+
8337
+ // ../theme-core/src/site-styles/sourceCatalogs.ts
8338
+ var generatedContentFrames = [
8339
+ plainFrame,
8340
+ panelFrame("inset"),
8341
+ panelFrame("raised"),
8342
+ flushPanelFrame({ bleed: "start" })
8343
+ ];
8344
+ var userContentFrames = [
8345
+ ...generatedContentFrames,
8346
+ panelFrame("editorial"),
8347
+ flushPanelFrame({ bleed: "end" }),
8348
+ flushPanelFrame({ bleed: "both" })
8349
+ ];
8350
+ var generatedDesignOptionCatalog = {
8351
+ source: "generated",
8352
+ sectionSurfaces: ["base", "muted-band", "accent-band", "brand-depth-band", "hero-image"],
8353
+ contentFrames: generatedContentFrames,
8354
+ itemSurfaces: ["none", "default", "flat", "outlined", "raised"],
8355
+ transitions: ["none", "soft-fade-short", "soft-fade-long"],
8356
+ emphases: ["low", "medium", "high"],
8357
+ detachedCustom: false
8358
+ };
8359
+ var userDesignOptionCatalog = {
8360
+ source: "user",
8361
+ sectionSurfaces: generatedDesignOptionCatalog.sectionSurfaces,
8362
+ contentFrames: userContentFrames,
8363
+ itemSurfaces: [
8364
+ ...generatedDesignOptionCatalog.itemSurfaces,
8365
+ "inset",
8366
+ "editorial"
8367
+ ],
8368
+ transitions: [
8369
+ ...generatedDesignOptionCatalog.transitions,
8370
+ "wave-edge",
8371
+ "angle-edge"
8372
+ ],
8373
+ emphases: generatedDesignOptionCatalog.emphases,
8374
+ detachedCustom: false
8375
+ };
8376
+ var advancedDesignOptionCatalog = {
8377
+ source: "advanced",
8378
+ sectionSurfaces: userDesignOptionCatalog.sectionSurfaces,
8379
+ contentFrames: userDesignOptionCatalog.contentFrames,
8380
+ itemSurfaces: userDesignOptionCatalog.itemSurfaces,
8381
+ transitions: userDesignOptionCatalog.transitions,
8382
+ emphases: userDesignOptionCatalog.emphases,
8383
+ detachedCustom: true
8384
+ };
8385
+
8386
+ // ../theme-core/src/site-styles/typographyPresets.ts
8387
+ var bodyReadablePolicy = {
8388
+ recommendedCategories: ["sans-serif", "serif"],
8389
+ allowedCategories: ["sans-serif", "serif"],
8390
+ requiresItalicForBody: true,
8391
+ requiresBoldForBody: true
8392
+ };
8393
+ var headingFlexiblePolicy = {
8394
+ recommendedCategories: ["sans-serif", "serif", "display"],
8395
+ allowedCategories: ["sans-serif", "serif", "display"]
8396
+ };
8397
+ var displayHeadingPolicy = {
8398
+ recommendedCategories: ["display", "sans-serif", "serif"],
8399
+ allowedCategories: ["display", "sans-serif", "serif"]
8400
+ };
8401
+ function asTypographyPresetId(value) {
8402
+ if (!value.startsWith("typography-preset:")) {
8403
+ throw new Error(`TypographyPresetId must start with "typography-preset:". Received: ${value}`);
8404
+ }
8405
+ return value;
8406
+ }
8407
+ function defineTypographyPreset(preset) {
8408
+ return {
8409
+ ...preset,
8410
+ id: asTypographyPresetId(preset.id)
8411
+ };
8412
+ }
8413
+ var modernSansTypography = {
8414
+ body: {
8415
+ family: "Inter, system-ui, sans-serif",
8416
+ size: "md",
8417
+ weight: "regular",
8418
+ lineHeight: "relaxed",
8419
+ letterSpacing: "normal"
8420
+ },
8421
+ headings: {
8422
+ default: {
8423
+ family: "Inter, system-ui, sans-serif",
8424
+ weight: "semibold",
8425
+ lineHeight: "normal",
8426
+ letterSpacing: "tight",
8427
+ italic: null,
8428
+ case: null
8429
+ },
8430
+ h1: { size: "xl", weight: "bold", lineHeight: "normal", letterSpacing: "tight", italic: null },
8431
+ h2: { size: "lg", weight: "semibold", lineHeight: "normal", letterSpacing: "tight", italic: null },
8432
+ h3: { size: "md", weight: "semibold", lineHeight: "normal", letterSpacing: "normal", italic: null }
8433
+ },
8434
+ scale: "balanced"
8435
+ };
8436
+ var warmRoundedTypography = {
8437
+ body: {
8438
+ family: "Nunito Sans, system-ui, sans-serif",
8439
+ size: "lg",
8440
+ weight: "regular",
8441
+ lineHeight: "relaxed",
8442
+ letterSpacing: "normal"
8443
+ },
8444
+ headings: {
8445
+ default: {
8446
+ family: "Nunito Sans, system-ui, sans-serif",
8447
+ weight: "bold",
8448
+ lineHeight: "normal",
8449
+ letterSpacing: "normal",
8450
+ italic: null,
8451
+ case: null
8452
+ },
8453
+ h1: { size: "xl", weight: "bold", lineHeight: "normal", letterSpacing: "normal", italic: null },
8454
+ h2: { size: "lg", weight: "bold", lineHeight: "normal", letterSpacing: "normal", italic: null },
8455
+ h3: { size: "md", weight: "semibold", lineHeight: "relaxed", letterSpacing: "normal", italic: null }
8456
+ },
8457
+ scale: "balanced"
8458
+ };
8459
+ var editorialSerifTypography = {
8460
+ body: {
8461
+ family: "Lora, Georgia, serif",
8462
+ size: "lg",
8463
+ weight: "regular",
8464
+ lineHeight: "loose",
8465
+ letterSpacing: "normal"
8466
+ },
8467
+ headings: {
8468
+ default: {
8469
+ family: "Playfair Display, Georgia, serif",
8470
+ weight: "semibold",
8471
+ lineHeight: "normal",
8472
+ letterSpacing: "tight",
8473
+ italic: null,
8474
+ case: null
8475
+ },
8476
+ h1: { size: "2xl", weight: "semibold", lineHeight: "normal", letterSpacing: "tight", italic: null },
8477
+ h2: { size: "xl", weight: "semibold", lineHeight: "normal", letterSpacing: "normal", italic: null },
8478
+ h3: { size: "md", weight: "semibold", lineHeight: "relaxed", letterSpacing: "normal", italic: true }
8479
+ },
8480
+ scale: "spacious"
8481
+ };
8482
+ var classicSerifTypography = {
8483
+ body: {
8484
+ family: "Libre Baskerville, Georgia, serif",
8485
+ size: "md",
8486
+ weight: "regular",
8487
+ lineHeight: "relaxed",
8488
+ letterSpacing: "normal"
8489
+ },
8490
+ headings: {
8491
+ default: {
8492
+ family: "Cormorant Garamond, Georgia, serif",
8493
+ weight: "semibold",
8494
+ lineHeight: "normal",
8495
+ letterSpacing: "normal",
8496
+ italic: null,
8497
+ case: null
8498
+ },
8499
+ h1: { size: "2xl", weight: "semibold", lineHeight: "normal", letterSpacing: "normal", italic: null },
8500
+ h2: { size: "xl", weight: "semibold", lineHeight: "normal", letterSpacing: "normal", italic: null },
8501
+ h3: { size: "md", weight: "medium", lineHeight: "relaxed", letterSpacing: "normal", italic: null }
8502
+ },
8503
+ scale: "balanced"
8504
+ };
8505
+ var luxeContrastTypography = {
8506
+ body: {
8507
+ family: "Manrope, system-ui, sans-serif",
8508
+ size: "md",
8509
+ weight: "regular",
8510
+ lineHeight: "relaxed",
8511
+ letterSpacing: "normal"
8512
+ },
8513
+ headings: {
8514
+ default: {
8515
+ family: "Cormorant Garamond, Georgia, serif",
8516
+ weight: "semibold",
8517
+ lineHeight: "normal",
8518
+ letterSpacing: "tight",
8519
+ italic: null,
8520
+ case: null
8521
+ },
8522
+ h1: { size: "2xl", weight: "semibold", lineHeight: "normal", letterSpacing: "tight", italic: null },
8523
+ h2: { size: "xl", weight: "semibold", lineHeight: "normal", letterSpacing: "tight", italic: null },
8524
+ h3: { size: "md", weight: "medium", lineHeight: "relaxed", letterSpacing: "normal", italic: null }
8525
+ },
8526
+ scale: "spacious"
8527
+ };
8528
+ var boldDisplayTypography = {
8529
+ body: {
8530
+ family: "Manrope, system-ui, sans-serif",
8531
+ size: "lg",
8532
+ weight: "regular",
8533
+ lineHeight: "relaxed",
8534
+ letterSpacing: "normal"
8535
+ },
8536
+ headings: {
8537
+ default: {
8538
+ family: '"TAN - PEARL", sans-serif',
8539
+ weight: "bold",
8540
+ lineHeight: "normal",
8541
+ letterSpacing: "tight",
8542
+ colorToken: "primary",
8543
+ italic: null,
8544
+ case: null
8545
+ },
8546
+ h1: { size: "xl", weight: "bold", lineHeight: "normal", letterSpacing: "tight", italic: null },
8547
+ h2: { size: "lg", weight: "bold", lineHeight: "normal", letterSpacing: "normal", italic: null },
8548
+ h3: { size: "md", weight: "bold", lineHeight: "normal", letterSpacing: "normal", italic: null }
8549
+ },
8550
+ scale: "balanced"
8551
+ };
8552
+ var typographyPresets = [
8553
+ defineTypographyPreset({
8554
+ id: "typography-preset:modern-sans",
8555
+ name: "Modern Sans",
8556
+ description: "Crisp, neutral type for clear service pages and practical editorial structure.",
8557
+ defaultFonts: { body: "Inter, system-ui, sans-serif", heading: "Inter, system-ui, sans-serif" },
8558
+ recommendedFonts: {
8559
+ body: ["Inter", "Source Sans 3", "IBM Plex Sans"],
8560
+ heading: ["Inter", "Manrope", "Source Sans 3"]
8561
+ },
8562
+ slotPolicies: { body: bodyReadablePolicy, heading: headingFlexiblePolicy },
8563
+ typography: modernSansTypography
8564
+ }),
8565
+ defineTypographyPreset({
8566
+ id: "typography-preset:warm-rounded",
8567
+ name: "Warm Rounded",
8568
+ description: "Soft, friendly type for welcoming studios, classes, and community businesses.",
8569
+ defaultFonts: { body: "Nunito Sans, system-ui, sans-serif", heading: "Nunito Sans, system-ui, sans-serif" },
8570
+ recommendedFonts: {
8571
+ body: ["Nunito Sans", "Atkinson Hyperlegible", "Lato"],
8572
+ heading: ["Nunito Sans", "Quicksand", "Manrope"]
8573
+ },
8574
+ slotPolicies: { body: bodyReadablePolicy, heading: headingFlexiblePolicy },
8575
+ typography: warmRoundedTypography
8576
+ }),
8577
+ defineTypographyPreset({
8578
+ id: "typography-preset:editorial-serif",
8579
+ name: "Editorial Serif",
8580
+ description: "Story-led type with warm reading rhythm and expressive headings.",
8581
+ defaultFonts: { body: "Lora, Georgia, serif", heading: "Playfair Display, Georgia, serif" },
8582
+ recommendedFonts: {
8583
+ body: ["Lora", "Source Serif 4", "Libre Baskerville"],
8584
+ heading: ["Playfair Display", "Cormorant Garamond", "Fraunces"]
8585
+ },
8586
+ slotPolicies: { body: bodyReadablePolicy, heading: displayHeadingPolicy },
8587
+ typography: editorialSerifTypography
8588
+ }),
8589
+ defineTypographyPreset({
8590
+ id: "typography-preset:classic-serif",
8591
+ name: "Classic Serif",
8592
+ description: "Measured, polished type for premium and established offers.",
8593
+ defaultFonts: { body: "Libre Baskerville, Georgia, serif", heading: "Cormorant Garamond, Georgia, serif" },
8594
+ recommendedFonts: {
8595
+ body: ["Libre Baskerville", "Source Serif 4", "Lora"],
8596
+ heading: ["Cormorant Garamond", "Playfair Display", "Libre Baskerville"]
8597
+ },
8598
+ slotPolicies: { body: bodyReadablePolicy, heading: displayHeadingPolicy },
8599
+ typography: classicSerifTypography
8600
+ }),
8601
+ defineTypographyPreset({
8602
+ id: "typography-preset:luxe-contrast",
8603
+ name: "Luxe Contrast",
8604
+ description: "A restrained sans body paired with elegant high-contrast headings.",
8605
+ defaultFonts: { body: "Manrope, system-ui, sans-serif", heading: "Cormorant Garamond, Georgia, serif" },
8606
+ recommendedFonts: {
8607
+ body: ["Manrope", "Inter", "Source Sans 3"],
8608
+ heading: ["Cormorant Garamond", "Playfair Display", "Bodoni Moda"]
8609
+ },
8610
+ slotPolicies: { body: bodyReadablePolicy, heading: displayHeadingPolicy },
8611
+ typography: luxeContrastTypography
8612
+ }),
8613
+ defineTypographyPreset({
8614
+ id: "typography-preset:bold-display",
8615
+ name: "Bold Display",
8616
+ description: "Punchy display headings with readable sans body copy for branded launches.",
8617
+ defaultFonts: { body: "Manrope, system-ui, sans-serif", heading: '"TAN - PEARL", sans-serif' },
8618
+ recommendedFonts: {
8619
+ body: ["Manrope", "Inter", "Space Grotesk"],
8620
+ heading: ["Anton", "Bebas Neue", "Archivo Black"]
8621
+ },
8622
+ slotPolicies: { body: bodyReadablePolicy, heading: displayHeadingPolicy },
8623
+ typography: boldDisplayTypography,
8624
+ heroTypography: {
8625
+ headlineSize: "6xl",
8626
+ headlineLineHeight: "tight",
8627
+ subheadlineSize: "2xl",
8628
+ subheadlineLineHeight: "normal",
8629
+ microHeadlineSize: "6xl",
8630
+ microHeadlineLineHeight: "tight",
8631
+ microSubheadlineSize: "xl",
8632
+ microSubheadlineLineHeight: "normal",
8633
+ responsive: {
8634
+ tablet: { headlineSize: "5xl" },
8635
+ mobile: { headlineSize: "4xl", subheadlineSize: "xl" }
8636
+ }
8637
+ }
8638
+ })
8639
+ ];
8640
+ var typographyPresetsById = new Map(
8641
+ typographyPresets.map((preset) => [preset.id, preset])
8642
+ );
8643
+
8644
+ // ../theme-core/src/site-styles/curatedSiteStyles.ts
8645
+ var SOFT_EARTH_SITE_STYLE_ID_VALUE = "site-style:soft-earth";
8646
+ var SOFT_EARTH_SITE_STYLE_ID = asSiteStyleId(SOFT_EARTH_SITE_STYLE_ID_VALUE);
8647
+ var quietBudget = {
8648
+ accentDensity: "low",
8649
+ panelDensity: "medium",
8650
+ transitionMix: "quiet",
8651
+ primaryCtaLimit: 2,
8652
+ mediaDensity: "medium",
8653
+ decorativeRepetition: "low"
8654
+ };
8655
+ var balancedBudget = {
8656
+ accentDensity: "medium",
8657
+ panelDensity: "medium",
8658
+ transitionMix: "balanced",
8659
+ primaryCtaLimit: 3,
8660
+ mediaDensity: "medium",
8661
+ decorativeRepetition: "medium"
8662
+ };
8663
+ var expressiveBudget = {
8664
+ accentDensity: "high",
8665
+ panelDensity: "high",
8666
+ transitionMix: "expressive",
8667
+ primaryCtaLimit: 3,
8668
+ mediaDensity: "high",
8669
+ decorativeRepetition: "medium"
8670
+ };
8671
+ var expressiveUnderlineInputs = {
8672
+ base: {
8673
+ background: { type: "transparent" },
8674
+ textColorToken: "text",
8675
+ border: {
8676
+ widthClass: "border-2",
8677
+ colorToken: "border",
8678
+ style: "underline"
8679
+ },
8680
+ corners: "square",
8681
+ shadow: null,
8682
+ spacing: "compact",
8683
+ fontSize: "base"
8684
+ },
8685
+ label: {
8686
+ textColorToken: "primary",
8687
+ fontWeight: "black",
8688
+ fontSize: "xs",
8689
+ textTransform: "uppercase",
8690
+ letterSpacing: "widest",
8691
+ opacity: 1
8692
+ },
8693
+ focus: {
8694
+ ringColorToken: "secondary",
8695
+ ringWidth: "0",
8696
+ borderColorToken: "secondary"
8697
+ },
8698
+ error: {
8699
+ borderColorToken: "destructive",
8700
+ textColorToken: "destructive"
8701
+ },
8702
+ disabled: {
8703
+ backgroundColorToken: "surface",
8704
+ textColorToken: "text",
8705
+ opacity: 0.6
8706
+ }
8707
+ };
8708
+ function uniqueContentFrameKinds() {
8709
+ const kinds = [
8710
+ ...new Set(
8711
+ generatedDesignOptionCatalog.contentFrames.map((frame) => frame.kind)
8712
+ )
8713
+ ];
8714
+ const firstKind = kinds[0];
8715
+ if (!firstKind) {
8716
+ throw new Error(
8717
+ "Expected generated design option catalog to expose at least one content frame kind."
8718
+ );
8719
+ }
8720
+ return [firstKind, ...kinds.slice(1)];
8721
+ }
8722
+ var generatedContentFrameKinds = uniqueContentFrameKinds();
8723
+ function defineCuratedSiteStyle(input) {
8724
+ const legacyHeaderLookIds = input.recommendedHeaderLookIds ?? ["clean-base"];
8725
+ const inferredHeaderCuration = inferHeaderCurationFromLegacyLooks(
8726
+ legacyHeaderLookIds,
8727
+ input.tokenRecipes
8728
+ );
8729
+ const typographyPresetChoices = input.typographyPresetChoices ?? defaultTypographyPresetChoicesForRecipe(input.tokenRecipes.typography);
8730
+ const defaultTypographyPresetId = input.defaultTypographyPresetId ? asTypographyPresetId(input.defaultTypographyPresetId) : typographyPresetChoices[0].id;
8731
+ if (!typographyPresetChoices.some(
8732
+ (choice) => choice.id === defaultTypographyPresetId
8733
+ )) {
8734
+ throw new Error(
8735
+ `Default typography preset ${defaultTypographyPresetId} is not curated for site style ${input.id}.`
8736
+ );
8737
+ }
8738
+ return {
8739
+ id: asSiteStyleId(input.id),
8740
+ name: input.name,
8741
+ description: input.description,
8742
+ generationBrief: input.generationBrief,
8743
+ selectionKeywordRules: input.selectionKeywordRules ?? [],
8744
+ siteCreatorSelection: input.siteCreatorSelection ?? {
8745
+ kind: "explicit_only"
8746
+ },
8747
+ template: {
8748
+ id: asDesignSystemTemplateId(
8749
+ `template:${input.id.replace("site-style:", "")}`
8750
+ ),
8751
+ name: input.name,
8752
+ version: 1,
8753
+ tokenRecipes: input.tokenRecipes,
8754
+ compositionBudget: input.compositionBudget,
8755
+ supportedSectionSurfaces: generatedDesignOptionCatalog.sectionSurfaces,
8756
+ supportedContentFrames: generatedContentFrameKinds,
8757
+ supportedItemSurfaces: generatedDesignOptionCatalog.itemSurfaces,
8758
+ supportedTransitions: generatedDesignOptionCatalog.transitions
8759
+ },
8760
+ ...input.themeOverrides ? { themeOverrides: input.themeOverrides } : {},
8761
+ ...input.defaultBlockVariants ? { defaultBlockVariants: input.defaultBlockVariants } : {},
8762
+ recommendedAppearancePresetIds: (input.recommendedAppearancePresetIds ?? []).map(asAppearancePresetId),
8763
+ defaultHeaderSelection: input.defaultHeaderSelection ? {
8764
+ layoutId: asHeaderLayoutId(input.defaultHeaderSelection.layoutId),
8765
+ styleId: asHeaderStyleId(input.defaultHeaderSelection.styleId)
8766
+ } : inferredHeaderCuration.defaultHeaderSelection,
8767
+ recommendedHeaderLayoutChoices: input.recommendedHeaderLayoutChoices ?? inferredHeaderCuration.recommendedHeaderLayoutChoices,
8768
+ recommendedHeaderStyleChoicesByLayout: input.recommendedHeaderStyleChoicesByLayout ?? inferredHeaderCuration.recommendedHeaderStyleChoicesByLayout,
8769
+ discouragedHeaderSelections: input.discouragedHeaderSelections?.map(
8770
+ (selection) => ({
8771
+ layoutId: asHeaderLayoutId(selection.layoutId),
8772
+ styleId: asHeaderStyleId(selection.styleId)
8773
+ })
8774
+ ),
8775
+ recommendedHeaderLookIds: legacyHeaderLookIds.map(asHeaderLookId),
8776
+ // Empty is intentional: resolveFooterLook always appends its guaranteed fallback.
8777
+ recommendedFooterLookIds: (input.recommendedFooterLookIds ?? []).map(
8778
+ asFooterLookId
8779
+ ),
8780
+ buttonPersonalityChoices: input.buttonPersonalityChoices,
8781
+ paletteVariantChoices: input.paletteVariantChoices,
8782
+ typographyPresetChoices,
8783
+ defaultTypographyPresetId
8784
+ };
8785
+ }
8786
+ function buttonChoice(id, note) {
8787
+ return note ? { id: asButtonPersonalityId(id), note } : { id: asButtonPersonalityId(id) };
8788
+ }
8789
+ function paletteChoice(id, note) {
8790
+ return note ? { id: asPaletteVariantId(id), note } : { id: asPaletteVariantId(id) };
8791
+ }
8792
+ function headerLayoutChoice(id, note) {
8793
+ return note ? { id: asHeaderLayoutId(id), note } : { id: asHeaderLayoutId(id) };
8794
+ }
8795
+ function headerStyleChoice(id, note) {
8796
+ return note ? { id: asHeaderStyleId(id), note } : { id: asHeaderStyleId(id) };
8797
+ }
8798
+ function unbrandHeaderLayoutId(id) {
8799
+ return id;
8800
+ }
8801
+ function uniqueHeaderLayoutChoices(choices) {
8802
+ const seen = /* @__PURE__ */ new Set();
8803
+ const unique = choices.filter((choice) => {
8804
+ if (seen.has(choice.id)) return false;
8805
+ seen.add(choice.id);
6057
8806
  return true;
8807
+ });
8808
+ const first = unique[0];
8809
+ if (!first) {
8810
+ throw new Error("Expected at least one curated header layout choice.");
6058
8811
  }
6059
- const parts = normalized.split(",");
6060
- for (const part of parts) {
6061
- if (isForbiddenSelectorPart(part)) {
6062
- return true;
6063
- }
6064
- }
6065
- return false;
8812
+ return [first, ...unique.slice(1)];
6066
8813
  }
6067
- var selectorSchema = z9.string().min(1, "Selector cannot be empty").max(200, "Selector too long (max 200 characters)").refine(
6068
- (s) => !containsForbiddenSelector(s),
6069
- { message: "Global selectors (:root, html, body, *) are not allowed" }
6070
- );
6071
- function containsRemoteUrl(value) {
6072
- return REMOTE_URL_PATTERN.test(value);
8814
+ function nonEmptyHeaderStyleChoices(choices, fallbackLayoutId) {
8815
+ const first = choices[0] ?? {
8816
+ id: getCompatibleHeaderStyleIds(fallbackLayoutId)[0] ?? asHeaderStyleId("minimal")
8817
+ };
8818
+ return [first, ...choices.slice(1)];
8819
+ }
8820
+ function uniqueCompatibleHeaderStyleChoices(choices, fallbackLayoutId) {
8821
+ const compatible = new Set(getCompatibleHeaderStyleIds(fallbackLayoutId));
8822
+ const seen = /* @__PURE__ */ new Set();
8823
+ const unique = choices.filter((choice) => {
8824
+ if (!compatible.has(choice.id)) return false;
8825
+ if (seen.has(choice.id)) return false;
8826
+ seen.add(choice.id);
8827
+ return true;
8828
+ });
8829
+ return nonEmptyHeaderStyleChoices(unique, fallbackLayoutId);
8830
+ }
8831
+ function inferredHeaderStyleValuesForRecipes(layoutId, recipes) {
8832
+ switch (layoutId) {
8833
+ case "classic":
8834
+ if (isExpressiveRecipe(recipes)) {
8835
+ return [
8836
+ "brand-bar",
8837
+ "brand-underline",
8838
+ "flat-tabs",
8839
+ "brand-pill",
8840
+ "fine-line"
8841
+ ];
8842
+ }
8843
+ if (recipes.spacing === "compact") {
8844
+ return ["flat-tabs", "fine-line", "minimal", "brand-bar"];
8845
+ }
8846
+ if (isSerifTypographyRecipe(recipes)) {
8847
+ return ["serif-line", "fine-line", "minimal", "soft-bar"];
8848
+ }
8849
+ if (recipes.radius === "rounded" || recipes.radius === "pill") {
8850
+ return ["soft-bar", "pill-nav", "fine-line", "minimal"];
8851
+ }
8852
+ return ["fine-line", "minimal", "soft-bar", "brand-bar"];
8853
+ case "centered":
8854
+ if (isSerifTypographyRecipe(recipes)) {
8855
+ return ["serif-line", "fine-line", "minimal", "soft-bar"];
8856
+ }
8857
+ if (isExpressiveRecipe(recipes)) {
8858
+ return ["brand-pill", "flat-tabs", "brand-bar", "fine-line"];
8859
+ }
8860
+ if (recipes.radius === "rounded" || recipes.radius === "pill") {
8861
+ return ["soft-bar", "pill-nav", "fine-line", "minimal"];
8862
+ }
8863
+ return ["minimal", "fine-line", "soft-bar"];
8864
+ case "floating":
8865
+ if (isExpressiveRecipe(recipes)) {
8866
+ return ["glass", "split-glass", "brand-pill", "soft-shell"];
8867
+ }
8868
+ if (isSerifTypographyRecipe(recipes)) {
8869
+ return ["split-pill", "minimal-surface", "soft-shell"];
8870
+ }
8871
+ return ["soft-shell", "minimal-surface", "glass"];
8872
+ default:
8873
+ return [];
8874
+ }
6073
8875
  }
6074
- function containsJavascriptUrl(value) {
6075
- return JAVASCRIPT_URL_PATTERN.test(value);
8876
+ function isExpressiveRecipe(recipes) {
8877
+ return recipes.contrast === "maximum" || recipes.shadow === "layered" || recipes.motion === "expressive";
6076
8878
  }
6077
- var declarationValueSchema = z9.string().max(500, "Declaration value too long (max 500 characters)").refine(
6078
- (v) => !containsRemoteUrl(v),
6079
- { message: "Remote url() references are not allowed. Use local paths, data URIs, or fragment IDs." }
6080
- ).refine(
6081
- (v) => !containsJavascriptUrl(v),
6082
- { message: "javascript: URLs are not allowed" }
6083
- );
6084
- var declarationsSchema = z9.record(
6085
- z9.string().min(1).max(100),
6086
- // property name
6087
- declarationValueSchema
6088
- // property value
6089
- );
6090
- var customCssRuleSchema = z9.object({
6091
- id: z9.string().min(1, "Rule ID is required").max(50, "Rule ID too long"),
6092
- selector: selectorSchema,
6093
- declarations: declarationsSchema
6094
- });
6095
- var blockCustomCssRuleSchema = customCssRuleSchema.extend({
6096
- blockKind: z9.string().min(1, "Block kind is required").max(50, "Block kind too long")
6097
- });
6098
- var customCssRulesSchema = z9.array(customCssRuleSchema).optional();
6099
- var blockCustomCssRulesSchema = z9.array(blockCustomCssRuleSchema).optional();
6100
-
6101
- // ../theme-core/src/customCss/atRuleValidation.ts
6102
- import { z as z10 } from "zod";
6103
- var KEYFRAME_OFFSET_PATTERN = /^(from|to|\d{1,3}%)$/i;
6104
- var ANIMATION_NAME_PATTERN = /^[a-zA-Z_-][a-zA-Z0-9_-]*$/;
6105
- var BLOCKED_AT_RULES = ["@import", "@charset"];
6106
- var BLOCKED_AT_RULE_PATTERN = /@(?:import|charset)\b/i;
6107
- var ruleIdSchema = z10.string().min(1, "Rule ID is required").max(50, "Rule ID too long");
6108
- var nestedRuleSchema = z10.object({
6109
- selector: selectorSchema,
6110
- declarations: declarationsSchema
6111
- });
6112
- function isValidKeyframeOffset(offset) {
6113
- const trimmed = offset.trim().toLowerCase();
6114
- if (trimmed === "from" || trimmed === "to") return true;
6115
- const match = trimmed.match(/^(\d{1,3})%$/);
6116
- if (!match || match[1] === void 0) return false;
6117
- const value = parseInt(match[1], 10);
6118
- return value >= 0 && value <= 100;
8879
+ function isSerifTypographyRecipe(recipes) {
8880
+ return recipes.typography === "serif-editorial" || recipes.typography === "classic-serif";
6119
8881
  }
6120
- var keyframeOffsetSchema = z10.string().transform((offset) => offset.trim()).refine(
6121
- (offset) => KEYFRAME_OFFSET_PATTERN.test(offset),
6122
- { message: 'Invalid keyframe offset. Use percentages (0%, 50%, 100%) or "from"/"to"' }
6123
- ).refine(
6124
- isValidKeyframeOffset,
6125
- { message: "Keyframe offset must be between 0% and 100%" }
6126
- );
6127
- var animationNameSchema = z10.string().min(1, "Animation name is required").max(50, "Animation name too long").refine(
6128
- (name) => ANIMATION_NAME_PATTERN.test(name),
6129
- { message: "Invalid animation name. Use letters, numbers, dashes, underscores (start with letter, dash, or underscore)" }
6130
- );
6131
- var keyframeSchema = z10.object({
6132
- offset: keyframeOffsetSchema,
6133
- declarations: declarationsSchema
6134
- });
6135
- var keyframesAtRuleSchema = z10.object({
6136
- id: ruleIdSchema,
6137
- type: z10.literal("keyframes"),
6138
- name: animationNameSchema,
6139
- frames: z10.array(keyframeSchema).min(1, "At least one keyframe is required")
6140
- });
6141
- var fontFaceDeclarationsSchema = z10.record(z10.string().min(1).max(100), declarationValueSchema).refine(
6142
- (decls) => "fontFamily" in decls || "font-family" in decls,
6143
- { message: "font-family is required in @font-face" }
6144
- );
6145
- var fontFaceAtRuleSchema = z10.object({
6146
- id: ruleIdSchema,
6147
- type: z10.literal("font-face"),
6148
- declarations: fontFaceDeclarationsSchema
6149
- });
6150
- var mediaQuerySchema = z10.string().min(1, "Media query is required").max(200, "Media query too long");
6151
- var mediaAtRuleSchema = z10.object({
6152
- id: ruleIdSchema,
6153
- type: z10.literal("media"),
6154
- query: mediaQuerySchema,
6155
- rules: z10.array(nestedRuleSchema).min(1, "At least one rule is required")
6156
- });
6157
- var supportsConditionSchema = z10.string().min(1, "Supports condition is required").max(200, "Supports condition too long");
6158
- var supportsAtRuleSchema = z10.object({
6159
- id: ruleIdSchema,
6160
- type: z10.literal("supports"),
6161
- condition: supportsConditionSchema,
6162
- rules: z10.array(nestedRuleSchema).min(1, "At least one rule is required")
6163
- });
6164
- function containsBlockedAtRule(css) {
6165
- return BLOCKED_AT_RULE_PATTERN.test(css);
8882
+ function inferHeaderCurationFromLegacyLooks(lookIds, recipes) {
8883
+ const selections = lookIds.map((lookId) => resolveLegacyHeaderLookAlias(asHeaderLookId(lookId))).filter(
8884
+ (selection) => Boolean(selection)
8885
+ );
8886
+ const defaultHeaderSelection = selections[0] ?? {
8887
+ layoutId: asHeaderLayoutId("classic"),
8888
+ styleId: asHeaderStyleId("minimal")
8889
+ };
8890
+ const layoutChoices = uniqueHeaderLayoutChoices(
8891
+ selections.map((selection) => headerLayoutChoice(selection.layoutId))
8892
+ );
8893
+ const stylesByLayout = {};
8894
+ for (const layoutChoice of layoutChoices) {
8895
+ const legacyStyleChoices = selections.filter((selection) => selection.layoutId === layoutChoice.id).map((selection) => headerStyleChoice(selection.styleId));
8896
+ const inferredStyleChoices = inferredHeaderStyleValuesForRecipes(
8897
+ layoutChoice.id,
8898
+ recipes
8899
+ ).map((styleId) => headerStyleChoice(styleId));
8900
+ stylesByLayout[unbrandHeaderLayoutId(layoutChoice.id)] = uniqueCompatibleHeaderStyleChoices(
8901
+ [...legacyStyleChoices, ...inferredStyleChoices],
8902
+ layoutChoice.id
8903
+ );
8904
+ }
8905
+ return {
8906
+ defaultHeaderSelection,
8907
+ recommendedHeaderLayoutChoices: layoutChoices,
8908
+ recommendedHeaderStyleChoicesByLayout: stylesByLayout
8909
+ };
6166
8910
  }
6167
- var rawCssSchema = z10.string().min(1, "CSS is required").max(5e3, "Raw CSS too long (max 5000 characters)").refine(
6168
- (css) => css.trim().startsWith("@"),
6169
- { message: "Raw at-rule must start with @" }
6170
- ).refine(
6171
- (css) => !containsBlockedAtRule(css),
6172
- { message: `Blocked at-rules: ${BLOCKED_AT_RULES.join(", ")}. Use typed at-rules or local assets instead.` }
8911
+ function typographyChoice(id, note) {
8912
+ return note ? { id: asTypographyPresetId(id), note } : { id: asTypographyPresetId(id) };
8913
+ }
8914
+ function defaultTypographyPresetChoicesForRecipe(recipe) {
8915
+ switch (recipe) {
8916
+ case "clean-sans":
8917
+ return [
8918
+ typographyChoice("typography-preset:modern-sans"),
8919
+ typographyChoice("typography-preset:luxe-contrast"),
8920
+ typographyChoice("typography-preset:bold-display")
8921
+ ];
8922
+ case "friendly-sans":
8923
+ return [
8924
+ typographyChoice("typography-preset:warm-rounded"),
8925
+ typographyChoice("typography-preset:modern-sans"),
8926
+ typographyChoice("typography-preset:editorial-serif")
8927
+ ];
8928
+ case "serif-editorial":
8929
+ return [
8930
+ typographyChoice("typography-preset:editorial-serif"),
8931
+ typographyChoice("typography-preset:classic-serif"),
8932
+ typographyChoice("typography-preset:warm-rounded")
8933
+ ];
8934
+ case "classic-serif":
8935
+ return [
8936
+ typographyChoice("typography-preset:classic-serif"),
8937
+ typographyChoice("typography-preset:luxe-contrast"),
8938
+ typographyChoice("typography-preset:editorial-serif")
8939
+ ];
8940
+ }
8941
+ }
8942
+ var curatedSiteStyles = [
8943
+ defineCuratedSiteStyle({
8944
+ id: "site-style:calm-studio",
8945
+ name: "Calm Studio",
8946
+ description: "Soft, measured, and spacious for intimate appointment or class businesses.",
8947
+ generationBrief: "Use calm pacing, concise copy, generous breathing room, and natural imagery. Keep calls to action steady rather than urgent.",
8948
+ tokenRecipes: {
8949
+ palette: "soft-natural",
8950
+ contrast: "standard",
8951
+ radius: "soft",
8952
+ shadow: "subtle",
8953
+ typography: "friendly-sans",
8954
+ spacing: "airy",
8955
+ motion: "subtle"
8956
+ },
8957
+ compositionBudget: quietBudget,
8958
+ recommendedHeaderLookIds: [
8959
+ "centered-calm",
8960
+ "minimal-transparent",
8961
+ "clean-base"
8962
+ ],
8963
+ buttonPersonalityChoices: [
8964
+ buttonChoice("soft-pill"),
8965
+ buttonChoice("pebble"),
8966
+ buttonChoice("editorial-link"),
8967
+ buttonChoice("brushed-wash")
8968
+ ],
8969
+ paletteVariantChoices: [
8970
+ paletteChoice("soft-natural-sage"),
8971
+ paletteChoice("soft-natural-stone"),
8972
+ paletteChoice("warm-neutral-clay"),
8973
+ paletteChoice("soft-natural-watercolor")
8974
+ ]
8975
+ }),
8976
+ defineCuratedSiteStyle({
8977
+ id: "site-style:clear-professional",
8978
+ name: "Clear Professional",
8979
+ description: "Crisp, trustworthy, and direct for local services and consultancies.",
8980
+ generationBrief: "Prioritize clarity, proof, service detail, and easy next steps. Keep visuals polished and specific, with restrained decorative treatment.",
8981
+ tokenRecipes: {
8982
+ palette: "brand-led",
8983
+ contrast: "strong",
8984
+ radius: "soft",
8985
+ shadow: "subtle",
8986
+ typography: "clean-sans",
8987
+ spacing: "regular",
8988
+ motion: "subtle"
8989
+ },
8990
+ compositionBudget: balancedBudget,
8991
+ recommendedHeaderLookIds: [
8992
+ "practical-utility",
8993
+ "brand-solid",
8994
+ "clean-base"
8995
+ ],
8996
+ buttonPersonalityChoices: [
8997
+ buttonChoice("confident-chip"),
8998
+ buttonChoice("soft-pill"),
8999
+ buttonChoice("editorial-link")
9000
+ ],
9001
+ paletteVariantChoices: [
9002
+ paletteChoice("brand-led-cool"),
9003
+ paletteChoice("high-contrast-ink"),
9004
+ paletteChoice("brand-led-jewel")
9005
+ ]
9006
+ }),
9007
+ defineCuratedSiteStyle({
9008
+ id: "site-style:warm-editorial",
9009
+ name: "Warm Editorial",
9010
+ description: "Story-led and textured for educators, makers, venues, and retreats.",
9011
+ generationBrief: "Let the copy feel thoughtful and grounded. Favor narrative sections, supporting media, and a small number of editorial panels.",
9012
+ tokenRecipes: {
9013
+ palette: "warm-neutral",
9014
+ contrast: "standard",
9015
+ radius: "square",
9016
+ shadow: "none",
9017
+ typography: "serif-editorial",
9018
+ spacing: "airy",
9019
+ motion: "subtle"
9020
+ },
9021
+ compositionBudget: balancedBudget,
9022
+ recommendedHeaderLookIds: [
9023
+ "serif-line",
9024
+ "minimal-transparent",
9025
+ "centered-calm"
9026
+ ],
9027
+ buttonPersonalityChoices: [
9028
+ buttonChoice("editorial-link"),
9029
+ buttonChoice("soft-pill"),
9030
+ buttonChoice("brushed-wash")
9031
+ ],
9032
+ paletteVariantChoices: [
9033
+ paletteChoice("warm-neutral-cream"),
9034
+ paletteChoice("warm-neutral-clay"),
9035
+ paletteChoice("warm-neutral-forest"),
9036
+ paletteChoice("soft-natural-stone")
9037
+ ]
9038
+ }),
9039
+ defineCuratedSiteStyle({
9040
+ id: "site-style:bright-community",
9041
+ name: "Bright Community",
9042
+ description: "Friendly, welcoming, and active for groups, classes, and neighborhood offers.",
9043
+ generationBrief: "Use welcoming language, clear event or booking routes, and optimistic imagery. Let accents appear, but avoid noisy decoration.",
9044
+ tokenRecipes: {
9045
+ palette: "brand-led",
9046
+ contrast: "standard",
9047
+ radius: "rounded",
9048
+ shadow: "subtle",
9049
+ typography: "friendly-sans",
9050
+ spacing: "regular",
9051
+ motion: "expressive"
9052
+ },
9053
+ compositionBudget: balancedBudget,
9054
+ recommendedHeaderLookIds: [
9055
+ "brand-solid",
9056
+ "practical-utility",
9057
+ "clean-base"
9058
+ ],
9059
+ buttonPersonalityChoices: [
9060
+ buttonChoice("pebble"),
9061
+ buttonChoice("brushed-wash"),
9062
+ buttonChoice("confident-chip")
9063
+ ],
9064
+ paletteVariantChoices: [
9065
+ paletteChoice("brand-led-warm"),
9066
+ paletteChoice("brand-led-jewel"),
9067
+ paletteChoice("soft-natural-watercolor")
9068
+ ]
9069
+ }),
9070
+ defineCuratedSiteStyle({
9071
+ id: "site-style:quiet-luxury",
9072
+ name: "Quiet Luxury",
9073
+ description: "Minimal, confident, and refined for premium experiences and private services.",
9074
+ generationBrief: "Use fewer claims, more specificity, and restrained sensory detail. Favor elegant media and low repetition over dense panels.",
9075
+ siteCreatorSelection: {
9076
+ kind: "site_creator_keyword_heuristic",
9077
+ priority: 20
9078
+ },
9079
+ selectionKeywordRules: [
9080
+ { kind: "word", value: "luxury" },
9081
+ { kind: "word", value: "premium" },
9082
+ { kind: "word", value: "boutique" },
9083
+ { kind: "word", value: "bespoke" },
9084
+ { kind: "word", value: "exclusive" }
9085
+ ],
9086
+ tokenRecipes: {
9087
+ palette: "high-contrast",
9088
+ contrast: "strong",
9089
+ radius: "square",
9090
+ shadow: "none",
9091
+ typography: "classic-serif",
9092
+ spacing: "airy",
9093
+ motion: "none"
9094
+ },
9095
+ compositionBudget: quietBudget,
9096
+ recommendedHeaderLookIds: [
9097
+ "minimal-transparent",
9098
+ "serif-line",
9099
+ "clean-base"
9100
+ ],
9101
+ buttonPersonalityChoices: [
9102
+ buttonChoice("editorial-link"),
9103
+ buttonChoice("confident-chip"),
9104
+ buttonChoice("soft-pill")
9105
+ ],
9106
+ paletteVariantChoices: [
9107
+ paletteChoice("high-contrast-charcoal"),
9108
+ paletteChoice("high-contrast-ink"),
9109
+ paletteChoice("warm-neutral-cream")
9110
+ ]
9111
+ }),
9112
+ defineCuratedSiteStyle({
9113
+ id: "site-style:practical-services",
9114
+ name: "Practical Services",
9115
+ description: "Efficient, plainspoken, and conversion-focused for trades and everyday services.",
9116
+ generationBrief: "Make services, location, trust signals, and contact paths obvious. Keep copy brief and avoid ornate visual treatments.",
9117
+ siteCreatorSelection: { kind: "primary_goal_support" },
9118
+ selectionKeywordRules: [
9119
+ { kind: "word", value: "repair" },
9120
+ { kind: "substring", value: "plumb" },
9121
+ { kind: "substring", value: "electric" },
9122
+ { kind: "word", value: "cleaning" },
9123
+ { kind: "substring", value: "landscap" },
9124
+ { kind: "substring", value: "contractor" }
9125
+ ],
9126
+ tokenRecipes: {
9127
+ palette: "brand-led",
9128
+ contrast: "maximum",
9129
+ radius: "soft",
9130
+ shadow: "subtle",
9131
+ typography: "clean-sans",
9132
+ spacing: "compact",
9133
+ motion: "none"
9134
+ },
9135
+ compositionBudget: quietBudget,
9136
+ recommendedHeaderLookIds: [
9137
+ "practical-utility",
9138
+ "brand-solid",
9139
+ "clean-base"
9140
+ ],
9141
+ buttonPersonalityChoices: [
9142
+ buttonChoice("confident-chip"),
9143
+ buttonChoice("pebble"),
9144
+ buttonChoice("ink-stamp")
9145
+ ],
9146
+ paletteVariantChoices: [
9147
+ paletteChoice("brand-led-cool"),
9148
+ paletteChoice("high-contrast-ink"),
9149
+ paletteChoice("brand-led-warm")
9150
+ ]
9151
+ }),
9152
+ defineCuratedSiteStyle({
9153
+ id: "site-style:modern-wellness",
9154
+ name: "Modern Wellness",
9155
+ description: "Natural, current, and reassuring for practitioners, studios, and wellbeing offers.",
9156
+ generationBrief: "Keep the tone warm and practical. Use gentle section variation, natural materials, and inclusive copy without making medical claims.",
9157
+ tokenRecipes: {
9158
+ palette: "soft-natural",
9159
+ contrast: "standard",
9160
+ radius: "rounded",
9161
+ shadow: "subtle",
9162
+ typography: "clean-sans",
9163
+ spacing: "airy",
9164
+ motion: "subtle"
9165
+ },
9166
+ compositionBudget: balancedBudget,
9167
+ recommendedHeaderLookIds: [
9168
+ "centered-calm",
9169
+ "minimal-transparent",
9170
+ "clean-base"
9171
+ ],
9172
+ buttonPersonalityChoices: [
9173
+ buttonChoice("soft-pill"),
9174
+ buttonChoice("pebble"),
9175
+ buttonChoice("confident-chip")
9176
+ ],
9177
+ paletteVariantChoices: [
9178
+ paletteChoice("soft-natural-sage"),
9179
+ paletteChoice("soft-natural-stone"),
9180
+ paletteChoice("warm-neutral-forest")
9181
+ ]
9182
+ }),
9183
+ defineCuratedSiteStyle({
9184
+ id: "site-style:quiet-practice",
9185
+ name: "Quiet Practice",
9186
+ description: "Grounded, calm, and practical for small appointment-first practices.",
9187
+ generationBrief: "Make services, practitioner trust, preparation notes, and booking routes easy to scan. Keep the tone warm and specific, with quiet confidence rather than spa cliches or medical claims.",
9188
+ siteCreatorSelection: {
9189
+ kind: "site_creator_keyword_heuristic",
9190
+ priority: 30
9191
+ },
9192
+ selectionKeywordRules: [
9193
+ { kind: "substring", value: "massage" },
9194
+ { kind: "word", value: "bodywork" },
9195
+ { kind: "phrase", value: "appointment practice" },
9196
+ { kind: "phrase", value: "appointment-first" },
9197
+ { kind: "substring", value: "practitioner" },
9198
+ { kind: "substring", value: "therap" },
9199
+ { kind: "substring", value: "clinic" },
9200
+ { kind: "phrase", value: "wellness practice" }
9201
+ ],
9202
+ tokenRecipes: {
9203
+ palette: "soft-natural",
9204
+ contrast: "standard",
9205
+ radius: "soft",
9206
+ shadow: "subtle",
9207
+ typography: "clean-sans",
9208
+ spacing: "regular",
9209
+ motion: "subtle"
9210
+ },
9211
+ compositionBudget: quietBudget,
9212
+ recommendedHeaderLookIds: [
9213
+ "practical-utility",
9214
+ "clean-base",
9215
+ "centered-calm"
9216
+ ],
9217
+ buttonPersonalityChoices: [
9218
+ buttonChoice("pebble"),
9219
+ buttonChoice("soft-pill"),
9220
+ buttonChoice("editorial-link")
9221
+ ],
9222
+ paletteVariantChoices: [
9223
+ paletteChoice("soft-natural-stone"),
9224
+ paletteChoice("soft-natural-sage"),
9225
+ paletteChoice("warm-neutral-clay")
9226
+ ]
9227
+ }),
9228
+ defineCuratedSiteStyle({
9229
+ id: "site-style:personal-retreat-journal",
9230
+ name: "Personal Retreat Journal",
9231
+ description: "Warm, story-led, and readable for solo practitioners with mixed offers.",
9232
+ generationBrief: "Center the practitioner as the guide, then make private sessions, classes, retreats, and resources feel like clear pathways. Keep retreat copy grounded and practical, with enough editorial warmth for longer reading.",
9233
+ siteCreatorSelection: {
9234
+ kind: "site_creator_keyword_heuristic",
9235
+ priority: 40
9236
+ },
9237
+ selectionKeywordRules: [
9238
+ { kind: "substring", value: "retreat" },
9239
+ { kind: "phrase", value: "solo practitioner" },
9240
+ { kind: "phrase", value: "personal brand" },
9241
+ { kind: "substring", value: "teacher" },
9242
+ { kind: "substring", value: "coach" },
9243
+ { kind: "phrase", value: "retreat resources" },
9244
+ { kind: "substring", value: "journal" }
9245
+ ],
9246
+ tokenRecipes: {
9247
+ palette: "warm-neutral",
9248
+ contrast: "standard",
9249
+ radius: "soft",
9250
+ shadow: "subtle",
9251
+ typography: "serif-editorial",
9252
+ spacing: "airy",
9253
+ motion: "subtle"
9254
+ },
9255
+ compositionBudget: balancedBudget,
9256
+ recommendedHeaderLookIds: [
9257
+ "serif-line",
9258
+ "centered-calm",
9259
+ "minimal-transparent"
9260
+ ],
9261
+ buttonPersonalityChoices: [
9262
+ buttonChoice("editorial-link"),
9263
+ buttonChoice("soft-pill"),
9264
+ buttonChoice("brushed-wash")
9265
+ ],
9266
+ paletteVariantChoices: [
9267
+ paletteChoice("warm-neutral-forest"),
9268
+ paletteChoice("warm-neutral-clay"),
9269
+ paletteChoice("soft-natural-stone")
9270
+ ]
9271
+ }),
9272
+ defineCuratedSiteStyle({
9273
+ id: "site-style:tactile-workshop",
9274
+ name: "Tactile Workshop",
9275
+ description: "Bright, hands-on, and image-led for maker studios, workshops, and creative classes.",
9276
+ generationBrief: "Lead with objects, materials, studio process, and practical booking detail. Keep the tone warm and direct, with useful mess, clear dates, and enough gallery rhythm to feel like a real creative studio.",
9277
+ siteCreatorSelection: {
9278
+ kind: "site_creator_keyword_heuristic",
9279
+ priority: 50
9280
+ },
9281
+ selectionKeywordRules: [
9282
+ { kind: "substring", value: "ceramic" },
9283
+ { kind: "word", value: "pottery" },
9284
+ { kind: "phrase", value: "maker studio" },
9285
+ { kind: "phrase", value: "craft class" },
9286
+ { kind: "phrase", value: "craft workshop" },
9287
+ { kind: "word", value: "clay" },
9288
+ { kind: "word", value: "kiln" }
9289
+ ],
9290
+ tokenRecipes: {
9291
+ palette: "brand-led",
9292
+ contrast: "standard",
9293
+ radius: "soft",
9294
+ shadow: "subtle",
9295
+ typography: "friendly-sans",
9296
+ spacing: "regular",
9297
+ motion: "subtle"
9298
+ },
9299
+ compositionBudget: balancedBudget,
9300
+ recommendedHeaderLookIds: [
9301
+ "brand-solid",
9302
+ "practical-utility",
9303
+ "clean-base"
9304
+ ],
9305
+ recommendedFooterLookIds: [
9306
+ "site-footer-brand-two-band",
9307
+ "footer-muted-grounding"
9308
+ ],
9309
+ buttonPersonalityChoices: [
9310
+ buttonChoice("pebble"),
9311
+ buttonChoice("confident-chip"),
9312
+ buttonChoice("ink-stamp"),
9313
+ buttonChoice("editorial-link")
9314
+ ],
9315
+ paletteVariantChoices: [
9316
+ paletteChoice("brand-led-warm"),
9317
+ paletteChoice("brand-led-cool"),
9318
+ paletteChoice("soft-natural-watercolor"),
9319
+ paletteChoice("warm-neutral-clay")
9320
+ ]
9321
+ }),
9322
+ defineCuratedSiteStyle({
9323
+ id: SOFT_EARTH_SITE_STYLE_ID,
9324
+ name: "Soft Earth",
9325
+ description: "Warm, grounded, and editorial for yoga studios, retreats, and wellbeing communities.",
9326
+ generationBrief: "Use cream space, terracotta CTAs, olive quote bands, natural imagery, generous but composed spacing, and editorial serif headings. Prefer a real intro section, image-led offering cards, warm community quotes, and an FAQ with a full-width intro above two columns of questions when content allows.",
9327
+ siteCreatorSelection: {
9328
+ kind: "site_creator_keyword_heuristic",
9329
+ priority: 45
9330
+ },
9331
+ selectionKeywordRules: [
9332
+ { kind: "word", value: "meditation" },
9333
+ { kind: "word", value: "wellbeing" },
9334
+ { kind: "substring", value: "retreat" },
9335
+ { kind: "phrase", value: "yoga studio" },
9336
+ { kind: "phrase", value: "mindful movement" }
9337
+ ],
9338
+ tokenRecipes: {
9339
+ palette: "warm-neutral",
9340
+ contrast: "standard",
9341
+ radius: "soft",
9342
+ shadow: "subtle",
9343
+ typography: "serif-editorial",
9344
+ spacing: "airy",
9345
+ motion: "subtle"
9346
+ },
9347
+ compositionBudget: balancedBudget,
9348
+ themeOverrides: {
9349
+ typography: {
9350
+ body: {
9351
+ family: "Inter, system-ui, sans-serif",
9352
+ size: "md",
9353
+ weight: "regular",
9354
+ lineHeight: "relaxed",
9355
+ letterSpacing: "normal"
9356
+ },
9357
+ headings: {
9358
+ default: {
9359
+ family: '"Cormorant Garamond", Georgia, serif',
9360
+ weight: "regular",
9361
+ lineHeight: "normal",
9362
+ letterSpacing: "normal",
9363
+ colorToken: "text",
9364
+ italic: null,
9365
+ case: null
9366
+ },
9367
+ h1: {
9368
+ size: "xl",
9369
+ weight: "regular",
9370
+ lineHeight: "normal",
9371
+ letterSpacing: "normal",
9372
+ italic: null
9373
+ },
9374
+ h2: {
9375
+ size: "lg",
9376
+ weight: "regular",
9377
+ lineHeight: "normal",
9378
+ letterSpacing: "normal",
9379
+ italic: null
9380
+ },
9381
+ h3: {
9382
+ size: "md",
9383
+ weight: "regular",
9384
+ lineHeight: "normal",
9385
+ letterSpacing: "normal",
9386
+ italic: null
9387
+ }
9388
+ },
9389
+ scale: "majorThird"
9390
+ },
9391
+ bodyText: {
9392
+ intro: {
9393
+ paragraphSize: "default",
9394
+ headingSize: "editorial"
9395
+ }
9396
+ },
9397
+ accordions: softEarthAccordionSystem
9398
+ },
9399
+ defaultBlockVariants: {
9400
+ "block.faq": "question-columns"
9401
+ },
9402
+ recommendedAppearancePresetIds: [
9403
+ "hero-brand-scrim",
9404
+ "intro-organic-statement",
9405
+ "feature-cards-raised-rule",
9406
+ "events-lined-panel",
9407
+ "testimonials-brand-background-quotes",
9408
+ "contact-form-panel"
9409
+ ],
9410
+ recommendedHeaderLookIds: [
9411
+ "centered-calm",
9412
+ "minimal-transparent",
9413
+ "serif-line"
9414
+ ],
9415
+ recommendedFooterLookIds: [
9416
+ "footer-muted-grounding",
9417
+ "site-footer-brand-two-band"
9418
+ ],
9419
+ buttonPersonalityChoices: [
9420
+ buttonChoice("earth-pill"),
9421
+ buttonChoice("soft-pill"),
9422
+ buttonChoice("pebble"),
9423
+ buttonChoice("editorial-link")
9424
+ ],
9425
+ paletteVariantChoices: [
9426
+ paletteChoice("warm-neutral-soft-earth"),
9427
+ paletteChoice("warm-neutral-clay"),
9428
+ paletteChoice("warm-neutral-forest"),
9429
+ paletteChoice("soft-natural-sage")
9430
+ ]
9431
+ }),
9432
+ defineCuratedSiteStyle({
9433
+ id: "site-style:bold-launch",
9434
+ name: "Bold Launch",
9435
+ description: "High-energy and punchy for launches, campaigns, and creative offers.",
9436
+ generationBrief: "Use crisp positioning, bold hero structure, strong calls to action, and confident visual rhythm. Keep it precise, not shouty.",
9437
+ siteCreatorSelection: {
9438
+ kind: "site_creator_keyword_heuristic",
9439
+ priority: 10
9440
+ },
9441
+ selectionKeywordRules: [
9442
+ { kind: "substring", value: "launch" },
9443
+ { kind: "substring", value: "campaign" },
9444
+ { kind: "word", value: "preorder" },
9445
+ { kind: "phrase", value: "pre-order" },
9446
+ { kind: "substring", value: "waitlist" },
9447
+ { kind: "word", value: "drop" }
9448
+ ],
9449
+ tokenRecipes: {
9450
+ palette: "high-contrast",
9451
+ contrast: "maximum",
9452
+ radius: "pill",
9453
+ shadow: "layered",
9454
+ typography: "clean-sans",
9455
+ spacing: "regular",
9456
+ motion: "expressive"
9457
+ },
9458
+ compositionBudget: expressiveBudget,
9459
+ recommendedHeaderLookIds: [
9460
+ "transparent-overlay",
9461
+ "floating-glass",
9462
+ "brand-solid"
9463
+ ],
9464
+ buttonPersonalityChoices: [
9465
+ buttonChoice("ink-stamp"),
9466
+ buttonChoice("confident-chip"),
9467
+ buttonChoice("brushed-wash"),
9468
+ buttonChoice("pebble")
9469
+ ],
9470
+ paletteVariantChoices: [
9471
+ paletteChoice("high-contrast-monochrome"),
9472
+ paletteChoice("high-contrast-ink"),
9473
+ paletteChoice("brand-led-jewel"),
9474
+ paletteChoice("brand-led-warm")
9475
+ ]
9476
+ }),
9477
+ defineCuratedSiteStyle({
9478
+ id: "site-style:south-west-twerk-school",
9479
+ name: "South West Twerk School",
9480
+ description: "Energetic, editorial, and high-contrast for a branded dance school presence.",
9481
+ generationBrief: "Use confident rhythm, bold burgundy-and-gold accents, large editorial intro copy, strong booking routes, and dark feature sections where proof or forms need emphasis.",
9482
+ tokenRecipes: {
9483
+ palette: "brand-led",
9484
+ contrast: "maximum",
9485
+ radius: "soft",
9486
+ shadow: "layered",
9487
+ typography: "clean-sans",
9488
+ spacing: "airy",
9489
+ motion: "expressive"
9490
+ },
9491
+ compositionBudget: expressiveBudget,
9492
+ typographyPresetChoices: [
9493
+ typographyChoice("typography-preset:bold-display"),
9494
+ typographyChoice("typography-preset:modern-sans"),
9495
+ typographyChoice("typography-preset:luxe-contrast")
9496
+ ],
9497
+ defaultTypographyPresetId: "typography-preset:bold-display",
9498
+ themeOverrides: {
9499
+ bodyText: {
9500
+ intro: {
9501
+ paragraphSize: "editorial",
9502
+ headingSize: "editorial"
9503
+ }
9504
+ },
9505
+ inputs: expressiveUnderlineInputs
9506
+ },
9507
+ recommendedAppearancePresetIds: [
9508
+ "hero-brand-scrim-fixed-frame",
9509
+ "body-text-editorial-intro",
9510
+ "schedule-details-brand-depth",
9511
+ "testimonials-accent-quote-cards",
9512
+ "contact-form-brand-depth-card"
9513
+ ],
9514
+ recommendedHeaderLookIds: [
9515
+ "brand-solid",
9516
+ "transparent-overlay",
9517
+ "practical-utility"
9518
+ ],
9519
+ recommendedFooterLookIds: [
9520
+ "site-footer-brand-two-band",
9521
+ "footer-muted-grounding"
9522
+ ],
9523
+ buttonPersonalityChoices: [
9524
+ buttonChoice("showtime-pill"),
9525
+ buttonChoice("confident-chip"),
9526
+ buttonChoice("ink-stamp"),
9527
+ buttonChoice("brushed-wash")
9528
+ ],
9529
+ paletteVariantChoices: [
9530
+ paletteChoice("brand-led-burgundy-gold"),
9531
+ paletteChoice("brand-led-jewel"),
9532
+ paletteChoice("brand-led-warm"),
9533
+ paletteChoice("high-contrast-ink")
9534
+ ]
9535
+ })
9536
+ ];
9537
+ var curatedSiteStylesById = new Map(
9538
+ curatedSiteStyles.map((style) => [style.id, style])
6173
9539
  );
6174
- var rawAtRuleSchema = z10.object({
6175
- id: ruleIdSchema,
6176
- type: z10.literal("raw"),
6177
- css: rawCssSchema
6178
- });
6179
- var customCssAtRuleSchema = z10.discriminatedUnion("type", [
6180
- keyframesAtRuleSchema,
6181
- fontFaceAtRuleSchema,
6182
- mediaAtRuleSchema,
6183
- supportsAtRuleSchema,
6184
- rawAtRuleSchema
6185
- ]);
6186
- var customCssAtRulesSchema = z10.array(customCssAtRuleSchema).optional();
6187
-
6188
- // ../theme-core/src/shared/componentStyles.ts
6189
- import { z as z11 } from "zod";
6190
- var componentBorderSchema = z11.object({
6191
- width: z11.enum(["none", "hairline", "thin", "medium", "thick"]).default("none"),
6192
- style: z11.enum(["solid", "dashed"]).default("solid"),
6193
- colorToken: themeColorTokenSchema.optional()
6194
- // defaults to "border" if not set
6195
- });
6196
- var componentShadowSchema = z11.object({
6197
- elevation: z11.enum(["none", "sm", "md", "lg", "xl", "2xl"]).default("sm")
6198
- });
6199
9540
 
6200
9541
  // ../theme-core/src/responsive/breakpoints.ts
6201
9542
  var BREAKPOINT_SM = 640;
@@ -6299,8 +9640,8 @@ function AltchaWidget({
6299
9640
  }));
6300
9641
  containerRef.current.appendChild(widget);
6301
9642
  setIsLoaded(true);
6302
- }).catch((err2) => {
6303
- console.error("Failed to load ALTCHA widget:", err2);
9643
+ }).catch((err) => {
9644
+ console.error("Failed to load ALTCHA widget:", err);
6304
9645
  });
6305
9646
  return () => {
6306
9647
  if (widget && containerRef.current) {
@@ -6540,10 +9881,10 @@ function useAvailableDates({
6540
9881
  start: append && prev ? prev.start : data.startDate,
6541
9882
  end: data.endDate
6542
9883
  }));
6543
- } catch (err2) {
9884
+ } catch (err) {
6544
9885
  if (requestId !== requestIdRef.current) return;
6545
9886
  setError(
6546
- err2 instanceof Error ? err2.message : "Failed to load available dates"
9887
+ err instanceof Error ? err.message : "Failed to load available dates"
6547
9888
  );
6548
9889
  } finally {
6549
9890
  if (mode === "refresh" && requestId === requestIdRef.current) {
@@ -6572,7 +9913,7 @@ function useAvailableDates({
6572
9913
  const endDate = formatLocalScheduleDate(
6573
9914
  addLocalScheduleDays(parseBookingLocalDate(today), initialDays)
6574
9915
  );
6575
- fetchDates(today, endDate, false);
9916
+ void fetchDates(today, endDate, false);
6576
9917
  }, [serviceId, fetchDates, initialDays]);
6577
9918
  useVisibleTabPolling({
6578
9919
  enabled: Boolean(serviceId && loadedRange),
@@ -6592,7 +9933,7 @@ function useAvailableDates({
6592
9933
  BOOKING_FETCH_CHUNK_DAYS
6593
9934
  )
6594
9935
  );
6595
- fetchDates(start, end, true);
9936
+ void fetchDates(start, end, true);
6596
9937
  }, [fetchDates, isLoading]);
6597
9938
  return {
6598
9939
  availableDates,
@@ -6655,14 +9996,14 @@ function useAvailableSlots({
6655
9996
  setSlots(
6656
9997
  result.slots.map((slot) => ({
6657
9998
  ...slot,
6658
- resourceId: asAppointmentResourceId(slot.resourceId)
9999
+ resourceId: unsafeAsAppointmentResourceId(slot.resourceId)
6659
10000
  }))
6660
10001
  );
6661
10002
  setHasLoaded(true);
6662
- } catch (err2) {
10003
+ } catch (err) {
6663
10004
  if (requestId !== requestIdRef.current) return;
6664
10005
  setError(
6665
- err2 instanceof Error ? err2.message : "Failed to load available times"
10006
+ err instanceof Error ? err.message : "Failed to load available times"
6666
10007
  );
6667
10008
  } finally {
6668
10009
  if (mode === "refresh" && requestId === requestIdRef.current) {
@@ -6701,28 +10042,24 @@ function bookingSubmissionReducer(state, action) {
6701
10042
  switch (action.type) {
6702
10043
  case "submission-started":
6703
10044
  return {
6704
- ...state,
6705
- status: { tag: "submitting" },
6706
- feedback: { tag: "idle" }
10045
+ ...clearWorkflowFeedback(state),
10046
+ status: { tag: "submitting" }
6707
10047
  };
6708
10048
  case "submission-succeeded":
6709
10049
  return {
6710
10050
  status: { tag: "idle" },
6711
- feedback: { tag: "success", message: action.message }
10051
+ feedback: reportWorkflowSuccess(state, action.message).feedback
6712
10052
  };
6713
10053
  case "submission-failed":
6714
10054
  case "issue-reported":
6715
10055
  return {
6716
10056
  status: { tag: "idle" },
6717
- feedback: { tag: "error", message: action.message }
10057
+ feedback: reportWorkflowError(state, action.message).feedback
6718
10058
  };
6719
10059
  case "feedback-cleared":
6720
- return {
6721
- ...state,
6722
- feedback: { tag: "idle" }
6723
- };
10060
+ return clearWorkflowFeedback(state);
6724
10061
  default:
6725
- return assertNever3(action);
10062
+ return assertNever11(action);
6726
10063
  }
6727
10064
  }
6728
10065
  function selectIsSubmitting(state) {
@@ -6766,7 +10103,7 @@ function useBookingSubmission(_siteId) {
6766
10103
  type: "submission-succeeded",
6767
10104
  message: response.type === "checkout_redirect" ? "Redirecting to secure checkout..." : "Booking submitted successfully."
6768
10105
  });
6769
- return okWith(response);
10106
+ return okWith2(response);
6770
10107
  } catch (error) {
6771
10108
  console.error("Booking submission error:", error);
6772
10109
  const message = error instanceof Error ? error.message : "Failed to book appointment";
@@ -6774,7 +10111,7 @@ function useBookingSubmission(_siteId) {
6774
10111
  type: "submission-failed",
6775
10112
  message
6776
10113
  });
6777
- return err(message);
10114
+ return err2(message);
6778
10115
  }
6779
10116
  };
6780
10117
  return {
@@ -6832,7 +10169,7 @@ function useDiscountCodeUi(options) {
6832
10169
  if (!cancelled) setDiscountsAvailableLoading(false);
6833
10170
  }
6834
10171
  }
6835
- checkDiscountAvailability();
10172
+ void checkDiscountAvailability();
6836
10173
  return () => {
6837
10174
  cancelled = true;
6838
10175
  };
@@ -7031,7 +10368,7 @@ function buildBookingPaymentOptionViewModel(input) {
7031
10368
  };
7032
10369
  }
7033
10370
  default:
7034
- return assertNever3(input.option);
10371
+ return assertNever11(input.option);
7035
10372
  }
7036
10373
  }
7037
10374
  function buildInstalmentSchedulePreview(input) {
@@ -7088,7 +10425,7 @@ function buildInstalmentSchedulePreview(input) {
7088
10425
  })));
7089
10426
  }
7090
10427
  default:
7091
- return assertNever3(input.option.plan);
10428
+ return assertNever11(input.option.plan);
7092
10429
  }
7093
10430
  }
7094
10431
  function getPaymentCadenceLabel(plan) {
@@ -7108,7 +10445,7 @@ function formatScheduleDate(isoString, locale) {
7108
10445
  }
7109
10446
 
7110
10447
  // ../blocks/src/system/runtime/nodes/booking-form.headless.state.ts
7111
- var asBookingFieldId = (id) => id;
10448
+ var unsafeAsBookingFieldId = (id) => id;
7112
10449
  function createEmptyBookingValidationErrors() {
7113
10450
  return { formError: null, fieldErrors: {} };
7114
10451
  }
@@ -7178,16 +10515,16 @@ function toOptionalBrandedId(value, brand) {
7178
10515
  return trimmed ? brand(trimmed) : void 0;
7179
10516
  }
7180
10517
  function toOptionalFormId(value) {
7181
- return toOptionalBrandedId(value, asFormId);
10518
+ return toOptionalBrandedId(value, unsafeAsFormId);
7182
10519
  }
7183
10520
  function toOptionalAppointmentServiceId(value) {
7184
- return toOptionalBrandedId(value, asAppointmentServiceId);
10521
+ return toOptionalBrandedId(value, unsafeAsAppointmentServiceId);
7185
10522
  }
7186
10523
  function toOptionalAppointmentResourceId(value) {
7187
- return toOptionalBrandedId(value, asAppointmentResourceId);
10524
+ return toOptionalBrandedId(value, unsafeAsAppointmentResourceId);
7188
10525
  }
7189
10526
  function toOptionalCustomerPassId(value) {
7190
- return toOptionalBrandedId(value, asCustomerPassId);
10527
+ return toOptionalBrandedId(value, unsafeAsCustomerPassId);
7191
10528
  }
7192
10529
  function isBookingFieldValue(value) {
7193
10530
  return value === null || typeof value === "string" || typeof value === "number" || typeof value === "boolean" || Array.isArray(value) && value.every((item) => typeof item === "string");
@@ -7315,7 +10652,7 @@ function bookingFlowReducer(state, event) {
7315
10652
  case "reset":
7316
10653
  return event.initial;
7317
10654
  default:
7318
- return assertNever3(event);
10655
+ return assertNever11(event);
7319
10656
  }
7320
10657
  }
7321
10658
  function clearAvailabilityFeedback(feedback) {
@@ -7341,7 +10678,7 @@ function toBookingSlotView(slot) {
7341
10678
  key: `${slot.startAt}|${slot.endAt}|${slot.resourceId}`,
7342
10679
  startAt: slot.startAt,
7343
10680
  endAt: slot.endAt,
7344
- resourceId: asAppointmentResourceId(slot.resourceId),
10681
+ resourceId: unsafeAsAppointmentResourceId(slot.resourceId),
7345
10682
  ...slot.resourceName ? { resourceName: slot.resourceName } : {},
7346
10683
  ...slot.label ? { label: slot.label } : {}
7347
10684
  };
@@ -7444,7 +10781,7 @@ function validateBookingStep(input) {
7444
10781
  return Object.keys(errors).length > 0 ? { ok: false, errors: createFieldBookingValidationErrors(errors) } : { ok: true };
7445
10782
  }
7446
10783
  default:
7447
- return assertNever3(input.stepId);
10784
+ return assertNever11(input.stepId);
7448
10785
  }
7449
10786
  }
7450
10787
  function validateBookingFields(input) {
@@ -7463,31 +10800,30 @@ function validateBookingField(field, value) {
7463
10800
  }
7464
10801
  if (isBlankFieldValue(value)) return null;
7465
10802
  const strValue = typeof value === "string" ? value : String(value);
7466
- switch (field.type) {
7467
- case "email":
7468
- return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(strValue) ? null : "Please enter a valid email address";
7469
- case "url":
7470
- try {
7471
- new URL(strValue);
7472
- return null;
7473
- } catch {
7474
- return "Please enter a valid URL";
7475
- }
7476
- case "tel":
7477
- return /^[+\d\s\-()]+$/.test(strValue) ? null : "Please enter a valid phone number";
7478
- case "number": {
7479
- const num = Number(value);
7480
- if (Number.isNaN(num)) return "Please enter a valid number";
7481
- if (field.min !== void 0 && num < field.min) {
7482
- return `Value must be at least ${field.min}`;
7483
- }
7484
- if (field.max !== void 0 && num > field.max) {
7485
- return `Value must be at most ${field.max}`;
7486
- }
10803
+ if (field.type === "email") {
10804
+ return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(strValue) ? null : "Please enter a valid email address";
10805
+ }
10806
+ if (field.type === "url") {
10807
+ try {
10808
+ new URL(strValue);
7487
10809
  return null;
10810
+ } catch {
10811
+ return "Please enter a valid URL";
7488
10812
  }
7489
- default:
7490
- break;
10813
+ }
10814
+ if (field.type === "tel") {
10815
+ return /^[+\d\s\-()]+$/.test(strValue) ? null : "Please enter a valid phone number";
10816
+ }
10817
+ if (field.type === "number") {
10818
+ const num = Number(value);
10819
+ if (Number.isNaN(num)) return "Please enter a valid number";
10820
+ if (field.min !== void 0 && num < field.min) {
10821
+ return `Value must be at least ${field.min}`;
10822
+ }
10823
+ if (field.max !== void 0 && num > field.max) {
10824
+ return `Value must be at most ${field.max}`;
10825
+ }
10826
+ return null;
7491
10827
  }
7492
10828
  if (typeof value === "string") {
7493
10829
  if (field.minLength && value.length < field.minLength) {
@@ -7587,7 +10923,7 @@ function buildBookingAvailabilityQuery(input) {
7587
10923
  }
7588
10924
  function deriveBookingFieldViews(input) {
7589
10925
  return (input.form?.schema?.fields ?? []).map((field) => {
7590
- const fieldId = asBookingFieldId(field.id);
10926
+ const fieldId = unsafeAsBookingFieldId(field.id);
7591
10927
  const inputId = `${input.idPrefix}-${fieldId}`;
7592
10928
  const helpTextId = field.helpText ? `${inputId}-help` : null;
7593
10929
  const fieldValue = input.values[field.id] ?? null;
@@ -7710,7 +11046,7 @@ function getAppointmentBookingOverrideInput(props) {
7710
11046
  return {
7711
11047
  ok: true,
7712
11048
  value: {
7713
- siteId: asSiteId(props.siteId),
11049
+ siteId: unsafeAsSiteId(props.siteId),
7714
11050
  apiBaseUrl: props.apiBaseUrl,
7715
11051
  portalToken: props.portalToken ?? null,
7716
11052
  formId,
@@ -7806,14 +11142,14 @@ function resolveAppointmentPackagesModel(input) {
7806
11142
  };
7807
11143
  }
7808
11144
  default:
7809
- return assertNever3(input.state);
11145
+ return assertNever11(input.state);
7810
11146
  }
7811
11147
  }
7812
11148
  function toHeadlessEligibleAppointmentPackage(appointmentPackage) {
7813
11149
  return {
7814
11150
  ...appointmentPackage,
7815
- customerPassId: asCustomerPassId(appointmentPackage.customerPassId),
7816
- passId: asPassId(appointmentPackage.passId)
11151
+ customerPassId: unsafeAsCustomerPassId(appointmentPackage.customerPassId),
11152
+ passId: unsafeAsPassId(appointmentPackage.passId)
7817
11153
  };
7818
11154
  }
7819
11155
  function resolveHeadlessBookingStatus(input) {
@@ -7896,7 +11232,7 @@ function HeadlessBookingProvider({
7896
11232
  }
7897
11233
  function useHeadlessBookingFlow(options) {
7898
11234
  const viewerTimeZone = options.viewerTimeZone ?? getRuntimeTimeZone();
7899
- const formKey = asFormId(options.formId);
11235
+ const formKey = unsafeAsFormId(options.formId);
7900
11236
  const defaultServiceId = toOptionalAppointmentServiceId(
7901
11237
  options.initialServiceId ?? resolveDefaultBookingServiceId(options.form, options.services) ?? void 0
7902
11238
  );
@@ -8062,7 +11398,7 @@ function useHeadlessBookingFlow(options) {
8062
11398
  setResourcesState({
8063
11399
  tag: "loaded",
8064
11400
  value: (result.options ?? []).map((option) => ({
8065
- id: asAppointmentResourceId(option.id),
11401
+ id: unsafeAsAppointmentResourceId(option.id),
8066
11402
  label: option.label
8067
11403
  }))
8068
11404
  });
@@ -8278,11 +11614,11 @@ function useHeadlessBookingFlow(options) {
8278
11614
  () => ({
8279
11615
  selectService: (serviceId) => dispatch({
8280
11616
  type: "service-selected",
8281
- serviceId: asAppointmentServiceId(serviceId)
11617
+ serviceId: unsafeAsAppointmentServiceId(serviceId)
8282
11618
  }),
8283
11619
  selectResource: (resourceId) => dispatch({
8284
11620
  type: "resource-selected",
8285
- resourceId: resourceId ? asAppointmentResourceId(resourceId) : null
11621
+ resourceId: resourceId ? unsafeAsAppointmentResourceId(resourceId) : null
8286
11622
  }),
8287
11623
  selectDate: (date) => dispatch({ type: "date-selected", date }),
8288
11624
  selectSlot: (slot) => dispatch({
@@ -8291,14 +11627,14 @@ function useHeadlessBookingFlow(options) {
8291
11627
  }),
8292
11628
  updateField: (fieldId, value) => dispatch({
8293
11629
  type: "field-updated",
8294
- fieldId: asBookingFieldId(fieldId),
11630
+ fieldId: unsafeAsBookingFieldId(fieldId),
8295
11631
  value
8296
11632
  }),
8297
- markFieldTouched: (fieldId) => dispatch({ type: "field-touched", fieldId: asBookingFieldId(fieldId) }),
11633
+ markFieldTouched: (fieldId) => dispatch({ type: "field-touched", fieldId: unsafeAsBookingFieldId(fieldId) }),
8298
11634
  selectPaymentOption: (kind) => dispatch({ type: "payment-option-selected", kind }),
8299
11635
  selectAppointmentPackage: (packageId) => dispatch({
8300
11636
  type: "appointment-package-selected",
8301
- packageId: packageId ? asCustomerPassId(packageId) : null
11637
+ packageId: packageId ? unsafeAsCustomerPassId(packageId) : null
8302
11638
  }),
8303
11639
  setDiscountCode: (code) => {
8304
11640
  dispatch({ type: "discount-code-changed", code });
@@ -8545,7 +11881,7 @@ function pollingReducer(state, action) {
8545
11881
  case "timeout":
8546
11882
  return state;
8547
11883
  default:
8548
- return assertNever3(state);
11884
+ return assertNever11(state);
8549
11885
  }
8550
11886
  case "polling-timed-out":
8551
11887
  return {
@@ -8554,7 +11890,7 @@ function pollingReducer(state, action) {
8554
11890
  error: new Error("Polling timed out")
8555
11891
  };
8556
11892
  default:
8557
- return assertNever3(action);
11893
+ return assertNever11(action);
8558
11894
  }
8559
11895
  }
8560
11896
 
@@ -8619,13 +11955,13 @@ function usePolling(config) {
8619
11955
  dispatch({ type: "polling-progressed", result: data });
8620
11956
  isPollingRef.current = false;
8621
11957
  return false;
8622
- } catch (err2) {
11958
+ } catch (err) {
8623
11959
  if (generation !== generationRef.current || !isActiveRef.current) {
8624
11960
  isPollingRef.current = false;
8625
11961
  return true;
8626
11962
  }
8627
- if (err2 instanceof Error) {
8628
- dispatch({ type: "polling-request-failed", error: err2 });
11963
+ if (err instanceof Error) {
11964
+ dispatch({ type: "polling-request-failed", error: err });
8629
11965
  }
8630
11966
  isPollingRef.current = false;
8631
11967
  return false;
@@ -8641,7 +11977,7 @@ function usePolling(config) {
8641
11977
  timeoutRef.current = setTimeout(doPoll, pollInterval);
8642
11978
  }
8643
11979
  };
8644
- doPoll();
11980
+ void doPoll();
8645
11981
  }, [poll]);
8646
11982
  useEffect7(() => {
8647
11983
  if (!config) {
@@ -8799,32 +12135,130 @@ var TimeSlotSelector = ({
8799
12135
  ] });
8800
12136
  };
8801
12137
 
8802
- // ../blocks/src/system/runtime/nodes/course-registration/DiscountCodeSection.tsx
12138
+ // ../blocks/src/system/runtime/shared/components/DiscountCodeDisclosure.tsx
12139
+ import { useId } from "react";
8803
12140
  import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
8804
- function DiscountCodeSection({
12141
+ var BLOCK_DISCOUNT_CODE_DISCLOSURE_CLASSES = {
12142
+ "course-registration": {
12143
+ root: "cr-discount",
12144
+ toggle: "cr-discount__toggle",
12145
+ form: "cr-discount__form",
12146
+ label: "cr-discount__label",
12147
+ row: "cr-discount__row",
12148
+ input: "cr-discount__input",
12149
+ apply: "cr-discount__apply",
12150
+ remove: "cr-discount__remove",
12151
+ hint: "cr-discount__hint",
12152
+ feedback: "cr-discount__feedback"
12153
+ },
12154
+ "event-registration": {
12155
+ root: "er-discount",
12156
+ toggle: "er-discount__toggle",
12157
+ form: "er-discount__form",
12158
+ label: "er-discount__label",
12159
+ row: "er-discount__row",
12160
+ input: "er-discount__input",
12161
+ apply: "er-discount__apply",
12162
+ remove: "er-discount__remove",
12163
+ hint: "er-discount__hint",
12164
+ feedback: "er-discount__feedback"
12165
+ }
12166
+ };
12167
+ var textLinkButtonClassName = ["button", "link"].join("-");
12168
+ var themeFormClasses = {
12169
+ root: "rb-flex rb-flex-col rb-gap-2 rb-mb-4",
12170
+ toggle: `${textLinkButtonClassName} rb-self-start`,
12171
+ form: "rb-flex rb-flex-col rb-gap-2",
12172
+ label: "form-label",
12173
+ row: "rb-flex rb-flex-col rb-gap-2 rb-sm-flex-row",
12174
+ input: "form-input",
12175
+ apply: themeButtonClassName({ variant: "secondary", size: "sm" }),
12176
+ remove: themeButtonClassName({ variant: "secondary", size: "sm" }),
12177
+ hint: "rb-caption status-muted",
12178
+ feedback: "rb-caption"
12179
+ };
12180
+ function getDiscountCodeDisclosureClasses(surface) {
12181
+ if (surface === "theme-form") return themeFormClasses;
12182
+ return BLOCK_DISCOUNT_CODE_DISCLOSURE_CLASSES[surface];
12183
+ }
12184
+ function DiscountCodeDisclosure({
12185
+ surface,
8805
12186
  isOpen,
8806
12187
  code,
8807
12188
  onOpen,
8808
12189
  onChange,
8809
- onRemove
12190
+ onRemove,
12191
+ onApply,
12192
+ id,
12193
+ toggleLabel = "Have a discount code?",
12194
+ label = "Discount code",
12195
+ placeholder = "Enter code",
12196
+ applyLabel = "Apply",
12197
+ removeLabel = "Remove",
12198
+ hint = "Applied at checkout.",
12199
+ feedback = null,
12200
+ isApplying = false,
12201
+ applyDisabled = false,
12202
+ disabled = false
8810
12203
  }) {
8811
- return /* @__PURE__ */ jsx8("div", { className: "cr-discount", children: !isOpen ? /* @__PURE__ */ jsx8("button", { type: "button", className: "cr-discount__toggle", onClick: onOpen, children: "Have a discount code?" }) : /* @__PURE__ */ jsxs6("div", { className: "cr-discount__form", children: [
8812
- /* @__PURE__ */ jsx8("label", { htmlFor: "cr-discount-code", className: "cr-discount__label", children: "Discount code" }),
8813
- /* @__PURE__ */ jsxs6("div", { className: "cr-discount__row", children: [
12204
+ const generatedId = useId();
12205
+ const inputId = id ?? `discount-code-${generatedId}`;
12206
+ const classes = getDiscountCodeDisclosureClasses(surface);
12207
+ const handleChange = (event) => {
12208
+ onChange(event.target.value);
12209
+ };
12210
+ const handleKeyDown = (event) => {
12211
+ if (!onApply || event.key !== "Enter") return;
12212
+ event.preventDefault();
12213
+ onApply();
12214
+ };
12215
+ const feedbackClassName = feedback ? `${classes.feedback} status-${feedback.tone}` : classes.feedback;
12216
+ return /* @__PURE__ */ jsx8("div", { className: classes.root, children: !isOpen ? /* @__PURE__ */ jsx8("button", { type: "button", className: classes.toggle, onClick: onOpen, children: toggleLabel }) : /* @__PURE__ */ jsxs6("div", { className: classes.form, children: [
12217
+ /* @__PURE__ */ jsx8("label", { htmlFor: inputId, className: classes.label, children: label }),
12218
+ /* @__PURE__ */ jsxs6("div", { className: classes.row, children: [
8814
12219
  /* @__PURE__ */ jsx8(
8815
12220
  "input",
8816
12221
  {
8817
- id: "cr-discount-code",
8818
- className: "cr-discount__input",
12222
+ id: inputId,
12223
+ className: classes.input,
8819
12224
  value: code,
8820
- onChange: (e) => onChange(e.target.value),
8821
- placeholder: "Enter code",
8822
- autoComplete: "off"
12225
+ onChange: handleChange,
12226
+ onKeyDown: handleKeyDown,
12227
+ placeholder,
12228
+ autoComplete: "off",
12229
+ disabled: disabled || isApplying
8823
12230
  }
8824
12231
  ),
8825
- /* @__PURE__ */ jsx8("button", { type: "button", className: "cr-discount__remove", onClick: onRemove, children: "Remove" })
12232
+ onApply ? /* @__PURE__ */ jsx8(
12233
+ "button",
12234
+ {
12235
+ type: "button",
12236
+ className: classes.apply,
12237
+ onClick: onApply,
12238
+ disabled: disabled || isApplying || applyDisabled,
12239
+ children: isApplying ? "Applying..." : applyLabel
12240
+ }
12241
+ ) : null,
12242
+ /* @__PURE__ */ jsx8(
12243
+ "button",
12244
+ {
12245
+ type: "button",
12246
+ className: classes.remove,
12247
+ onClick: onRemove,
12248
+ disabled: disabled || isApplying,
12249
+ children: removeLabel
12250
+ }
12251
+ )
8826
12252
  ] }),
8827
- /* @__PURE__ */ jsx8("p", { className: "cr-discount__hint", children: "Applied at checkout." })
12253
+ /* @__PURE__ */ jsx8("p", { className: classes.hint, children: hint }),
12254
+ feedback ? /* @__PURE__ */ jsx8(
12255
+ "p",
12256
+ {
12257
+ className: feedbackClassName,
12258
+ role: feedback.tone === "error" ? "alert" : "status",
12259
+ children: feedback.message
12260
+ }
12261
+ ) : null
8828
12262
  ] }) });
8829
12263
  }
8830
12264
 
@@ -8998,7 +12432,7 @@ function DefaultBookingStepContent({
8998
12432
  case "custom-fields":
8999
12433
  return /* @__PURE__ */ jsx10(DefaultDynamicFields, { fields: booking.fields.items, booking });
9000
12434
  default:
9001
- return assertNever3(stepId);
12435
+ return assertNever11(stepId);
9002
12436
  }
9003
12437
  }
9004
12438
  function DefaultServiceSelectionStep({
@@ -9392,7 +12826,7 @@ function DefaultFieldInput({
9392
12826
  ] }, option.value)) });
9393
12827
  case "checkbox":
9394
12828
  if (field.field.options && field.field.options.length > 1) {
9395
- const checkedValues = Array.isArray(value) ? value : [];
12829
+ const checkedValues = toStringArray(value);
9396
12830
  return /* @__PURE__ */ jsx10("div", { className: "rb-space-y-2", children: field.field.options.map((option) => /* @__PURE__ */ jsxs7("label", { className: "rb-flex rb-items-center rb-gap-2 rb-cursor-pointer", children: [
9397
12831
  /* @__PURE__ */ jsx10(
9398
12832
  "input",
@@ -9487,7 +12921,10 @@ function DefaultFieldInput({
9487
12921
  className: "form-input"
9488
12922
  }
9489
12923
  );
9490
- default:
12924
+ case "text":
12925
+ case "email":
12926
+ case "tel":
12927
+ case "url":
9491
12928
  return /* @__PURE__ */ jsx10(
9492
12929
  "input",
9493
12930
  {
@@ -9504,6 +12941,9 @@ function DefaultFieldInput({
9504
12941
  );
9505
12942
  }
9506
12943
  }
12944
+ function toStringArray(value) {
12945
+ return Array.isArray(value) ? value.filter((item) => typeof item === "string") : [];
12946
+ }
9507
12947
  function DefaultBookingDiscount({
9508
12948
  booking
9509
12949
  }) {
@@ -9511,8 +12951,9 @@ function DefaultBookingDiscount({
9511
12951
  if (!shouldShowDiscountSection) return null;
9512
12952
  return /* @__PURE__ */ jsxs7("div", { className: "rb-mt-6", children: [
9513
12953
  booking.discount.manualCodeEntryAllowed ? /* @__PURE__ */ jsx10(
9514
- DiscountCodeSection,
12954
+ DiscountCodeDisclosure,
9515
12955
  {
12956
+ surface: "theme-form",
9516
12957
  isOpen: booking.discount.isOpen,
9517
12958
  code: booking.discount.code,
9518
12959
  onOpen: () => booking.discount.setOpen(true),
@@ -9594,7 +13035,7 @@ function collapseHeadlessSlotsForDisplay(input) {
9594
13035
  visibleSlots.push({
9595
13036
  startAt: slot.startAt,
9596
13037
  endAt: slot.endAt,
9597
- resourceId: asAppointmentResourceId(slot.resourceId)
13038
+ resourceId: unsafeAsAppointmentResourceId(slot.resourceId)
9598
13039
  });
9599
13040
  }
9600
13041
  return visibleSlots;
@@ -10208,6 +13649,15 @@ ${root} {
10208
13649
  `;
10209
13650
  }
10210
13651
 
13652
+ // ../theme-core/src/runtime/themeCssVarNames.ts
13653
+ var THEME_RADIUS_CSS_VARS = {
13654
+ block: "--rb-block-radius",
13655
+ button: "--rb-button-radius",
13656
+ input: "--rb-input-radius",
13657
+ legacyCard: "--radius-card",
13658
+ legacyControl: "--radius-control"
13659
+ };
13660
+
10211
13661
  // ../theme-core/src/blocks/vars/customer-portal.ts
10212
13662
  function generateCustomerPortalVars({
10213
13663
  themeId
@@ -10221,6 +13671,11 @@ ${root} {
10221
13671
  --cp-muted: rgb(var(--tb-mutedText));
10222
13672
  --cp-border: rgb(var(--tb-border));
10223
13673
  --cp-shadow: var(--shadow-elev);
13674
+ --cp-primary: rgb(var(--tb-primary));
13675
+ --cp-primary-hover: rgb(var(--tb-primary-700, var(--tb-primary)));
13676
+ --cp-error: rgb(var(--tb-destructive));
13677
+ --cp-card-radius: var(${THEME_RADIUS_CSS_VARS.block}, var(${THEME_RADIUS_CSS_VARS.legacyCard}, 0.75rem));
13678
+ --cp-control-radius: var(${THEME_RADIUS_CSS_VARS.input}, var(${THEME_RADIUS_CSS_VARS.legacyControl}, 0.5rem));
10224
13679
 
10225
13680
  /* Shared tab bar (underline style) */
10226
13681
  --rb-tab-border-width: 1px;
@@ -10271,7 +13726,7 @@ ${root} {
10271
13726
  --rb-modal-bg: var(--cp-card-bg);
10272
13727
  --rb-modal-border: var(--cp-card-border);
10273
13728
  --rb-modal-shadow: var(--shadow-lg, var(--shadow-elev));
10274
- --rb-modal-radius: var(--radius-card);
13729
+ --rb-modal-radius: var(--cp-card-radius);
10275
13730
  --rb-modal-max-width: 560px;
10276
13731
 
10277
13732
  /* Header */
@@ -10491,8 +13946,8 @@ function useBookingFormConfig(siteId, formId) {
10491
13946
  } catch {
10492
13947
  }
10493
13948
  }
10494
- } catch (err2) {
10495
- console.error("Failed to load form:", err2);
13949
+ } catch (err) {
13950
+ console.error("Failed to load form:", err);
10496
13951
  if (mounted) {
10497
13952
  setError("Failed to load booking form. Please try again later.");
10498
13953
  }
@@ -10502,7 +13957,7 @@ function useBookingFormConfig(siteId, formId) {
10502
13957
  }
10503
13958
  }
10504
13959
  }
10505
- loadFormAndServices();
13960
+ void loadFormAndServices();
10506
13961
  return () => {
10507
13962
  mounted = false;
10508
13963
  };