@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
@@ -135,6 +135,7 @@ riverbankcms push entries blog-post welcome # Specific entry
135
135
  riverbankcms push pages # All pages with blocks
136
136
  riverbankcms push pages home # Specific page with blocks
137
137
  riverbankcms push navigation # Navigation menus
138
+ riverbankcms push settings # Site settings / branding
138
139
  riverbankcms push forms # Forms
139
140
  riverbankcms push theme # Push content/themes/{activeTheme|current}.json
140
141
  riverbankcms push venues # Event venues
@@ -158,7 +159,7 @@ riverbankcms push --dry-run --json-diff=full
158
159
  | `--force-update-asset` | Replace CMS media when identifiers conflict (local media sync only) |
159
160
  | `--allow-truncated` | Push even if remote content was truncated (may cause incomplete sync) |
160
161
  | `--json-diff [mode]` | Output JSON diff: `summary` or `full` |
161
- | `--with-config` | Also push SDK config after content |
162
+ | `--with-config` | Also push SDK schema/config after file content |
162
163
  | `--with-theme` | Also push theme when pushing all content |
163
164
  | `--sync-media` | Sync media files from local to remote environment |
164
165
  | `--overwrite-media` | When using `--sync-media`, overwrite target media on checksum mismatch |
@@ -248,7 +249,7 @@ For theme and footer pushes, stale resolution updates only the metadata timestam
248
249
 
249
250
  - Use `logoIdentifier` / `faviconIdentifier` to manage the site logo and favicon from the repo
250
251
  - The identifiers should match files in `content/media/`
251
- - `riverbankcms push` reuses the normal local-media upload flow before updating site settings
252
+ - `riverbankcms push settings` reuses the normal local-media upload flow before updating site settings, without pushing unrelated content
252
253
  - `riverbankcms pull settings` warns and omits a branding field if the current CMS asset cannot be represented by an identifier yet
253
254
  - Dashboard branding edits and CLI pushes are last-write-wins on the same settings row, so pull before pushing after dashboard-side changes
254
255
 
@@ -193,12 +193,12 @@ Recommended workflow:
193
193
 
194
194
  1. Add the branding files to `content/media/`, for example `content/media/positive-play-primary-logo.svg`
195
195
  2. Reference those identifiers in `content/settings.json`
196
- 3. Run `riverbankcms push`
196
+ 3. Run `riverbankcms push settings`
197
197
  4. Run `riverbankcms pull settings` if you want to confirm the CMS state round-trips cleanly
198
198
 
199
199
  Notes:
200
200
 
201
- - `riverbankcms push` uploads missing branding files through the normal local-media sync path before updating site settings
201
+ - `riverbankcms push settings` uploads missing branding files through the normal local-media sync path before updating site settings, without pushing unrelated content
202
202
  - `riverbankcms pull settings` warns and omits `logoIdentifier` / `faviconIdentifier` if the current CMS branding asset has no media identifier yet
203
203
  - Dashboard branding edits and CLI pushes both update the same site settings row, so treat them as last-write-wins and pull before pushing after dashboard-side edits
204
204
 
@@ -43,9 +43,17 @@ Create `src/proxy.ts`:
43
43
  import { handlePreviewTokens } from '@riverbankcms/sdk/preview-next/middleware'
44
44
  import { NextResponse, type NextRequest } from 'next/server'
45
45
 
46
- export function proxy(request: NextRequest) {
46
+ import { getCmsConfig } from './lib/env'
47
+
48
+ export async function proxy(request: NextRequest) {
47
49
  if (process.env.RIVERBANK_PREVIEW_MODE === 'true') {
48
- const response = handlePreviewTokens(request)
50
+ const { dashboardUrl } = getCmsConfig()
51
+ const response = await handlePreviewTokens(request, {
52
+ dashboardUrl: dashboardUrl ?? null,
53
+ onExchangeFailure: (failure) => {
54
+ console.warn('[riverbank] preview token exchange failed', failure)
55
+ },
56
+ })
49
57
  if (response) return response
50
58
  }
51
59
 
@@ -57,6 +65,10 @@ export const config = {
57
65
  }
58
66
  ```
59
67
 
68
+ The example logs preview exchange failures with `console.warn`; replace it with your app logger if you already centralize server-side logging.
69
+
70
+ If you are upgrading an existing generated site, make sure your proxy imports `getCmsConfig`, is declared `async`, and passes `dashboardUrl` into `handlePreviewTokens`. Without the dashboard URL, visits with `preview_code` cannot exchange the short-lived code for preview cookies.
71
+
60
72
  ## Add Preview Keep-Alive Route
61
73
 
62
74
  Create `src/app/api/preview/keep-alive/route.ts`:
@@ -127,6 +139,60 @@ export default Page
127
139
  export { generateMetadata }
128
140
  ```
129
141
 
142
+ ## Custom Header/Footer Chrome
143
+
144
+ If your site replaces the SDK header or footer, pass that chrome into `PreviewLayoutProvider` only when there is an editable preview session. `RIVERBANK_PREVIEW_MODE=true` makes the route preview-capable, but `getPreviewSession()` tells you whether the current request actually has preview cookies. Regular visitors without preview cookies should keep the normal SDK `Layout`.
145
+
146
+ In `src/app/layout.tsx`:
147
+
148
+ ```tsx
149
+ import type { ReactNode } from 'react'
150
+
151
+ import { Layout } from '@riverbankcms/sdk/rendering/server'
152
+ import { PreviewLayoutProvider } from '@riverbankcms/sdk/preview-next/client'
153
+ import { getPreviewSession } from '@riverbankcms/sdk/preview-next/session'
154
+
155
+ import { getRiverbankClient, getSiteId } from '@/lib/riverbank-client'
156
+
157
+ function SiteHeader() {
158
+ return <header>{/* your site header */}</header>
159
+ }
160
+
161
+ function SiteFooter() {
162
+ return <footer>{/* your site footer */}</footer>
163
+ }
164
+
165
+ export default async function RootLayout({ children }: { children: ReactNode }) {
166
+ const session = await getPreviewSession()
167
+ const hasEditablePreviewSession = Boolean(session?.canEdit && session?.token)
168
+ const headerNode = <SiteHeader />
169
+ const footerNode = <SiteFooter />
170
+
171
+ return (
172
+ <html lang="en">
173
+ <body>
174
+ {hasEditablePreviewSession ? (
175
+ <PreviewLayoutProvider headerNode={headerNode} footerNode={footerNode}>
176
+ {children}
177
+ </PreviewLayoutProvider>
178
+ ) : (
179
+ <Layout
180
+ client={getRiverbankClient()}
181
+ siteId={getSiteId()}
182
+ header={() => headerNode}
183
+ footer={() => footerNode}
184
+ >
185
+ {children}
186
+ </Layout>
187
+ )}
188
+ </body>
189
+ </html>
190
+ )
191
+ }
192
+ ```
193
+
194
+ If your custom chrome needs CMS navigation data, build the `headerNode` and `footerNode` from the same data used by your normal layout before branching. Calling `getPreviewSession()` in the root layout reads cookies, so the layout becomes dynamic.
195
+
130
196
  ## Import Preview CSS
131
197
 
132
198
  For Tailwind sites, add this to `src/app/globals.css`:
@@ -1,5 +1,5 @@
1
- import { defineIslandPropsDecoder } from './chunk-R56FQ3RR.mjs';
2
- import './chunk-PMAIXMAB.mjs';
1
+ import { defineIslandPropsDecoder } from './chunk-JGXPTEI2.mjs';
2
+ import './chunk-AUJ5DBZJ.mjs';
3
3
 
4
4
  // src/rendering/islands/enhancers/accordion.ts
5
5
  var decode = defineIslandPropsDecoder("accordion");
@@ -66,7 +66,7 @@ function useAnalytics(config) {
66
66
  console.warn("[analytics] Failed to initialize client", error);
67
67
  }
68
68
  }
69
- start();
69
+ void start();
70
70
  return () => {
71
71
  disposed = true;
72
72
  if (state.client) {
@@ -1,15 +1,15 @@
1
1
  "use client";
2
- import { DiscountCodeSection } from './chunk-OJPZEZU2.mjs';
3
- import { useDiscountCodeUi, usePolling } from './chunk-UFSWADAO.mjs';
4
- import { SpinnerNode } from './chunk-TQ5MSPDX.mjs';
5
- import { scrollToBlock, buildCheckoutReturnUrls, formatPrice } from './chunk-JEZECJ3W.mjs';
2
+ import { usePolling } from './chunk-DNRGY432.mjs';
3
+ import { SpinnerNode } from './chunk-CE7IBGVW.mjs';
4
+ import { useDiscountCodeUi } from './chunk-ZFHRN6W2.mjs';
5
+ import { scrollToBlock, buildCheckoutReturnUrls, DiscountCodeDisclosure, formatPrice } from './chunk-UVQEJJTN.mjs';
6
6
  import { FieldValidationMessage, getFieldValidationControlProps } from './chunk-3DCJ45Z2.mjs';
7
7
  import './chunk-3PEDD5KJ.mjs';
8
8
  import { isSpamProtectionEnabled, getChallengeUrl, AltchaWidget } from './chunk-YLMKMCSJ.mjs';
9
- import { BlockApiProvider, useBlockApi, FeedbackMessage } from './chunk-M3L3KYYR.mjs';
9
+ import { BlockApiProvider, useBlockApi, FeedbackMessage } from './chunk-UDNSI5PY.mjs';
10
10
  import { mountReactIsland } from './chunk-N7PBWBWQ.mjs';
11
- import { defineIslandPropsDecoder, resolveBookingSiteId, resolveDefaultBookingServiceId, getBookingRedirectStateFromLocation, deriveBookingFormViewState, logger, getBookingSuccessMessage, resolveAppointmentCheckoutVerificationState, themeButtonClassName, toSelectedCollectionOptionKind, assertNever, prepareBookingSubmission, formatBookingSubmissionPreparationError, resolveBookingPaymentStep, BOOKING_FORM_DATA_RESERVED_KEYS, okWith, err } from './chunk-R56FQ3RR.mjs';
12
- import { resolveBookingTimeZoneId, DEFAULT_BOOKING_TIME_ZONE, asFormId, asAppointmentResourceId, asCustomerPassId, asAppointmentServiceId, formatLocalScheduleDate, addLocalScheduleDays, parseBookingLocalDate, resolveFlexibleBalanceInitialPaymentCents, resolveFlexibleBalanceDueAt, getBookingInstalmentDepositRefundability, asPassId, splitAmountWithRemainderInFirst, addIntervalPreservingMonthAnchor, clampConfiguredAmount, getBookingInstalmentPlanIntervalCount, omitZeroAmountFutureRows, formatBookingInstant } from './chunk-PMAIXMAB.mjs';
11
+ import { defineIslandPropsDecoder, resolveBookingSiteId, resolveDefaultBookingServiceId, getBookingRedirectStateFromLocation, deriveBookingFormViewState, logger, getBookingSuccessMessage, resolveAppointmentCheckoutVerificationState, themeButtonClassName, toSelectedCollectionOptionKind, assertNever11, prepareBookingSubmission, formatBookingSubmissionPreparationError, resolveBookingPaymentStep, BOOKING_FORM_DATA_RESERVED_KEYS, clearWorkflowFeedback, reportWorkflowError, reportWorkflowSuccess, okWith2, err2 } from './chunk-JGXPTEI2.mjs';
12
+ import { resolveBookingTimeZoneId, DEFAULT_BOOKING_TIME_ZONE, unsafeAsFormId, unsafeAsAppointmentResourceId, unsafeAsCustomerPassId, unsafeAsAppointmentServiceId, formatLocalScheduleDate, addLocalScheduleDays, parseBookingLocalDate, resolveFlexibleBalanceInitialPaymentCents, resolveFlexibleBalanceDueAt, getBookingInstalmentDepositRefundability, unsafeAsPassId, splitAmountWithRemainderInFirst, addIntervalPreservingMonthAnchor, clampConfiguredAmount, getBookingInstalmentPlanIntervalCount, omitZeroAmountFutureRows, formatBookingInstant } from './chunk-AUJ5DBZJ.mjs';
13
13
  import React2, { useRef, useState, useMemo, useReducer, useEffect, useCallback, useLayoutEffect } from 'react';
14
14
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
15
15
 
@@ -191,10 +191,10 @@ function useAvailableDates({
191
191
  start: append && prev ? prev.start : data.startDate,
192
192
  end: data.endDate
193
193
  }));
194
- } catch (err2) {
194
+ } catch (err) {
195
195
  if (requestId !== requestIdRef.current) return;
196
196
  setError(
197
- err2 instanceof Error ? err2.message : "Failed to load available dates"
197
+ err instanceof Error ? err.message : "Failed to load available dates"
198
198
  );
199
199
  } finally {
200
200
  if (mode === "refresh" && requestId === requestIdRef.current) {
@@ -223,7 +223,7 @@ function useAvailableDates({
223
223
  const endDate = formatLocalScheduleDate(
224
224
  addLocalScheduleDays(parseBookingLocalDate(today), initialDays)
225
225
  );
226
- fetchDates(today, endDate, false);
226
+ void fetchDates(today, endDate, false);
227
227
  }, [serviceId, fetchDates, initialDays]);
228
228
  useVisibleTabPolling({
229
229
  enabled: Boolean(serviceId && loadedRange),
@@ -243,7 +243,7 @@ function useAvailableDates({
243
243
  BOOKING_FETCH_CHUNK_DAYS
244
244
  )
245
245
  );
246
- fetchDates(start, end, true);
246
+ void fetchDates(start, end, true);
247
247
  }, [fetchDates, isLoading]);
248
248
  return {
249
249
  availableDates,
@@ -303,14 +303,14 @@ function useAvailableSlots({
303
303
  setSlots(
304
304
  result.slots.map((slot) => ({
305
305
  ...slot,
306
- resourceId: asAppointmentResourceId(slot.resourceId)
306
+ resourceId: unsafeAsAppointmentResourceId(slot.resourceId)
307
307
  }))
308
308
  );
309
309
  setHasLoaded(true);
310
- } catch (err2) {
310
+ } catch (err) {
311
311
  if (requestId !== requestIdRef.current) return;
312
312
  setError(
313
- err2 instanceof Error ? err2.message : "Failed to load available times"
313
+ err instanceof Error ? err.message : "Failed to load available times"
314
314
  );
315
315
  } finally {
316
316
  if (mode === "refresh" && requestId === requestIdRef.current) {
@@ -346,28 +346,24 @@ function bookingSubmissionReducer(state, action) {
346
346
  switch (action.type) {
347
347
  case "submission-started":
348
348
  return {
349
- ...state,
350
- status: { tag: "submitting" },
351
- feedback: { tag: "idle" }
349
+ ...clearWorkflowFeedback(state),
350
+ status: { tag: "submitting" }
352
351
  };
353
352
  case "submission-succeeded":
354
353
  return {
355
354
  status: { tag: "idle" },
356
- feedback: { tag: "success", message: action.message }
355
+ feedback: reportWorkflowSuccess(state, action.message).feedback
357
356
  };
358
357
  case "submission-failed":
359
358
  case "issue-reported":
360
359
  return {
361
360
  status: { tag: "idle" },
362
- feedback: { tag: "error", message: action.message }
361
+ feedback: reportWorkflowError(state, action.message).feedback
363
362
  };
364
363
  case "feedback-cleared":
365
- return {
366
- ...state,
367
- feedback: { tag: "idle" }
368
- };
364
+ return clearWorkflowFeedback(state);
369
365
  default:
370
- return assertNever(action);
366
+ return assertNever11(action);
371
367
  }
372
368
  }
373
369
  function selectIsSubmitting(state) {
@@ -411,7 +407,7 @@ function useBookingSubmission(_siteId) {
411
407
  type: "submission-succeeded",
412
408
  message: response.type === "checkout_redirect" ? "Redirecting to secure checkout..." : "Booking submitted successfully."
413
409
  });
414
- return okWith(response);
410
+ return okWith2(response);
415
411
  } catch (error) {
416
412
  console.error("Booking submission error:", error);
417
413
  const message = error instanceof Error ? error.message : "Failed to book appointment";
@@ -419,7 +415,7 @@ function useBookingSubmission(_siteId) {
419
415
  type: "submission-failed",
420
416
  message
421
417
  });
422
- return err(message);
418
+ return err2(message);
423
419
  }
424
420
  };
425
421
  return {
@@ -602,7 +598,7 @@ function buildBookingPaymentOptionViewModel(input) {
602
598
  };
603
599
  }
604
600
  default:
605
- return assertNever(input.option);
601
+ return assertNever11(input.option);
606
602
  }
607
603
  }
608
604
  function buildInstalmentSchedulePreview(input) {
@@ -659,7 +655,7 @@ function buildInstalmentSchedulePreview(input) {
659
655
  })));
660
656
  }
661
657
  default:
662
- return assertNever(input.option.plan);
658
+ return assertNever11(input.option.plan);
663
659
  }
664
660
  }
665
661
  function getPaymentCadenceLabel(plan) {
@@ -679,7 +675,7 @@ function formatScheduleDate(isoString, locale) {
679
675
  }
680
676
 
681
677
  // ../blocks/src/system/runtime/nodes/booking-form.headless.state.ts
682
- var asBookingFieldId = (id) => id;
678
+ var unsafeAsBookingFieldId = (id) => id;
683
679
  function createEmptyBookingValidationErrors() {
684
680
  return { formError: null, fieldErrors: {} };
685
681
  }
@@ -749,13 +745,13 @@ function toOptionalBrandedId(value, brand) {
749
745
  return trimmed ? brand(trimmed) : void 0;
750
746
  }
751
747
  function toOptionalAppointmentServiceId(value) {
752
- return toOptionalBrandedId(value, asAppointmentServiceId);
748
+ return toOptionalBrandedId(value, unsafeAsAppointmentServiceId);
753
749
  }
754
750
  function toOptionalAppointmentResourceId(value) {
755
- return toOptionalBrandedId(value, asAppointmentResourceId);
751
+ return toOptionalBrandedId(value, unsafeAsAppointmentResourceId);
756
752
  }
757
753
  function toOptionalCustomerPassId(value) {
758
- return toOptionalBrandedId(value, asCustomerPassId);
754
+ return toOptionalBrandedId(value, unsafeAsCustomerPassId);
759
755
  }
760
756
  function isBookingFieldValue(value) {
761
757
  return value === null || typeof value === "string" || typeof value === "number" || typeof value === "boolean" || Array.isArray(value) && value.every((item) => typeof item === "string");
@@ -883,7 +879,7 @@ function bookingFlowReducer(state, event) {
883
879
  case "reset":
884
880
  return event.initial;
885
881
  default:
886
- return assertNever(event);
882
+ return assertNever11(event);
887
883
  }
888
884
  }
889
885
  function clearAvailabilityFeedback(feedback) {
@@ -909,7 +905,7 @@ function toBookingSlotView(slot) {
909
905
  key: `${slot.startAt}|${slot.endAt}|${slot.resourceId}`,
910
906
  startAt: slot.startAt,
911
907
  endAt: slot.endAt,
912
- resourceId: asAppointmentResourceId(slot.resourceId),
908
+ resourceId: unsafeAsAppointmentResourceId(slot.resourceId),
913
909
  ...slot.resourceName ? { resourceName: slot.resourceName } : {},
914
910
  ...slot.label ? { label: slot.label } : {}
915
911
  };
@@ -1012,7 +1008,7 @@ function validateBookingStep(input) {
1012
1008
  return Object.keys(errors).length > 0 ? { ok: false, errors: createFieldBookingValidationErrors(errors) } : { ok: true };
1013
1009
  }
1014
1010
  default:
1015
- return assertNever(input.stepId);
1011
+ return assertNever11(input.stepId);
1016
1012
  }
1017
1013
  }
1018
1014
  function validateBookingFields(input) {
@@ -1031,29 +1027,30 @@ function validateBookingField(field, value) {
1031
1027
  }
1032
1028
  if (isBlankFieldValue(value)) return null;
1033
1029
  const strValue = typeof value === "string" ? value : String(value);
1034
- switch (field.type) {
1035
- case "email":
1036
- return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(strValue) ? null : "Please enter a valid email address";
1037
- case "url":
1038
- try {
1039
- new URL(strValue);
1040
- return null;
1041
- } catch {
1042
- return "Please enter a valid URL";
1043
- }
1044
- case "tel":
1045
- return /^[+\d\s\-()]+$/.test(strValue) ? null : "Please enter a valid phone number";
1046
- case "number": {
1047
- const num = Number(value);
1048
- if (Number.isNaN(num)) return "Please enter a valid number";
1049
- if (field.min !== void 0 && num < field.min) {
1050
- return `Value must be at least ${field.min}`;
1051
- }
1052
- if (field.max !== void 0 && num > field.max) {
1053
- return `Value must be at most ${field.max}`;
1054
- }
1030
+ if (field.type === "email") {
1031
+ return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(strValue) ? null : "Please enter a valid email address";
1032
+ }
1033
+ if (field.type === "url") {
1034
+ try {
1035
+ new URL(strValue);
1055
1036
  return null;
1037
+ } catch {
1038
+ return "Please enter a valid URL";
1039
+ }
1040
+ }
1041
+ if (field.type === "tel") {
1042
+ return /^[+\d\s\-()]+$/.test(strValue) ? null : "Please enter a valid phone number";
1043
+ }
1044
+ if (field.type === "number") {
1045
+ const num = Number(value);
1046
+ if (Number.isNaN(num)) return "Please enter a valid number";
1047
+ if (field.min !== void 0 && num < field.min) {
1048
+ return `Value must be at least ${field.min}`;
1056
1049
  }
1050
+ if (field.max !== void 0 && num > field.max) {
1051
+ return `Value must be at most ${field.max}`;
1052
+ }
1053
+ return null;
1057
1054
  }
1058
1055
  if (typeof value === "string") {
1059
1056
  if (field.minLength && value.length < field.minLength) {
@@ -1152,7 +1149,7 @@ function buildBookingAvailabilityQuery(input) {
1152
1149
  }
1153
1150
  function deriveBookingFieldViews(input) {
1154
1151
  return (input.form?.schema?.fields ?? []).map((field) => {
1155
- const fieldId = asBookingFieldId(field.id);
1152
+ const fieldId = unsafeAsBookingFieldId(field.id);
1156
1153
  const inputId = `${input.idPrefix}-${fieldId}`;
1157
1154
  const helpTextId = field.helpText ? `${inputId}-help` : null;
1158
1155
  const fieldValue = input.values[field.id] ?? null;
@@ -1303,14 +1300,14 @@ function resolveAppointmentPackagesModel(input) {
1303
1300
  };
1304
1301
  }
1305
1302
  default:
1306
- return assertNever(input.state);
1303
+ return assertNever11(input.state);
1307
1304
  }
1308
1305
  }
1309
1306
  function toHeadlessEligibleAppointmentPackage(appointmentPackage) {
1310
1307
  return {
1311
1308
  ...appointmentPackage,
1312
- customerPassId: asCustomerPassId(appointmentPackage.customerPassId),
1313
- passId: asPassId(appointmentPackage.passId)
1309
+ customerPassId: unsafeAsCustomerPassId(appointmentPackage.customerPassId),
1310
+ passId: unsafeAsPassId(appointmentPackage.passId)
1314
1311
  };
1315
1312
  }
1316
1313
  function resolveHeadlessBookingStatus(input) {
@@ -1370,7 +1367,7 @@ function omitRecordKey(record, key) {
1370
1367
  // ../blocks/src/system/runtime/hooks/useHeadlessBookingFlow.ts
1371
1368
  function useHeadlessBookingFlow(options) {
1372
1369
  const viewerTimeZone = options.viewerTimeZone ?? getRuntimeTimeZone();
1373
- const formKey = asFormId(options.formId);
1370
+ const formKey = unsafeAsFormId(options.formId);
1374
1371
  const defaultServiceId = toOptionalAppointmentServiceId(
1375
1372
  options.initialServiceId ?? resolveDefaultBookingServiceId(options.form, options.services) ?? void 0
1376
1373
  );
@@ -1536,7 +1533,7 @@ function useHeadlessBookingFlow(options) {
1536
1533
  setResourcesState({
1537
1534
  tag: "loaded",
1538
1535
  value: (result.options ?? []).map((option) => ({
1539
- id: asAppointmentResourceId(option.id),
1536
+ id: unsafeAsAppointmentResourceId(option.id),
1540
1537
  label: option.label
1541
1538
  }))
1542
1539
  });
@@ -1752,11 +1749,11 @@ function useHeadlessBookingFlow(options) {
1752
1749
  () => ({
1753
1750
  selectService: (serviceId) => dispatch({
1754
1751
  type: "service-selected",
1755
- serviceId: asAppointmentServiceId(serviceId)
1752
+ serviceId: unsafeAsAppointmentServiceId(serviceId)
1756
1753
  }),
1757
1754
  selectResource: (resourceId) => dispatch({
1758
1755
  type: "resource-selected",
1759
- resourceId: resourceId ? asAppointmentResourceId(resourceId) : null
1756
+ resourceId: resourceId ? unsafeAsAppointmentResourceId(resourceId) : null
1760
1757
  }),
1761
1758
  selectDate: (date) => dispatch({ type: "date-selected", date }),
1762
1759
  selectSlot: (slot) => dispatch({
@@ -1765,14 +1762,14 @@ function useHeadlessBookingFlow(options) {
1765
1762
  }),
1766
1763
  updateField: (fieldId, value) => dispatch({
1767
1764
  type: "field-updated",
1768
- fieldId: asBookingFieldId(fieldId),
1765
+ fieldId: unsafeAsBookingFieldId(fieldId),
1769
1766
  value
1770
1767
  }),
1771
- markFieldTouched: (fieldId) => dispatch({ type: "field-touched", fieldId: asBookingFieldId(fieldId) }),
1768
+ markFieldTouched: (fieldId) => dispatch({ type: "field-touched", fieldId: unsafeAsBookingFieldId(fieldId) }),
1772
1769
  selectPaymentOption: (kind) => dispatch({ type: "payment-option-selected", kind }),
1773
1770
  selectAppointmentPackage: (packageId) => dispatch({
1774
1771
  type: "appointment-package-selected",
1775
- packageId: packageId ? asCustomerPassId(packageId) : null
1772
+ packageId: packageId ? unsafeAsCustomerPassId(packageId) : null
1776
1773
  }),
1777
1774
  setDiscountCode: (code) => {
1778
1775
  dispatch({ type: "discount-code-changed", code });
@@ -2213,7 +2210,7 @@ function DefaultBookingStepContent({
2213
2210
  case "custom-fields":
2214
2211
  return /* @__PURE__ */ jsx(DefaultDynamicFields, { fields: booking.fields.items, booking });
2215
2212
  default:
2216
- return assertNever(stepId);
2213
+ return assertNever11(stepId);
2217
2214
  }
2218
2215
  }
2219
2216
  function DefaultServiceSelectionStep({
@@ -2607,7 +2604,7 @@ function DefaultFieldInput({
2607
2604
  ] }, option.value)) });
2608
2605
  case "checkbox":
2609
2606
  if (field.field.options && field.field.options.length > 1) {
2610
- const checkedValues = Array.isArray(value) ? value : [];
2607
+ const checkedValues = toStringArray(value);
2611
2608
  return /* @__PURE__ */ jsx("div", { className: "rb-space-y-2", children: field.field.options.map((option) => /* @__PURE__ */ jsxs("label", { className: "rb-flex rb-items-center rb-gap-2 rb-cursor-pointer", children: [
2612
2609
  /* @__PURE__ */ jsx(
2613
2610
  "input",
@@ -2702,7 +2699,10 @@ function DefaultFieldInput({
2702
2699
  className: "form-input"
2703
2700
  }
2704
2701
  );
2705
- default:
2702
+ case "text":
2703
+ case "email":
2704
+ case "tel":
2705
+ case "url":
2706
2706
  return /* @__PURE__ */ jsx(
2707
2707
  "input",
2708
2708
  {
@@ -2719,6 +2719,9 @@ function DefaultFieldInput({
2719
2719
  );
2720
2720
  }
2721
2721
  }
2722
+ function toStringArray(value) {
2723
+ return Array.isArray(value) ? value.filter((item) => typeof item === "string") : [];
2724
+ }
2722
2725
  function DefaultBookingDiscount({
2723
2726
  booking
2724
2727
  }) {
@@ -2726,8 +2729,9 @@ function DefaultBookingDiscount({
2726
2729
  if (!shouldShowDiscountSection) return null;
2727
2730
  return /* @__PURE__ */ jsxs("div", { className: "rb-mt-6", children: [
2728
2731
  booking.discount.manualCodeEntryAllowed ? /* @__PURE__ */ jsx(
2729
- DiscountCodeSection,
2732
+ DiscountCodeDisclosure,
2730
2733
  {
2734
+ surface: "theme-form",
2731
2735
  isOpen: booking.discount.isOpen,
2732
2736
  code: booking.discount.code,
2733
2737
  onOpen: () => booking.discount.setOpen(true),
@@ -2809,7 +2813,7 @@ function collapseHeadlessSlotsForDisplay(input) {
2809
2813
  visibleSlots.push({
2810
2814
  startAt: slot.startAt,
2811
2815
  endAt: slot.endAt,
2812
- resourceId: asAppointmentResourceId(slot.resourceId)
2816
+ resourceId: unsafeAsAppointmentResourceId(slot.resourceId)
2813
2817
  });
2814
2818
  }
2815
2819
  return visibleSlots;