@riverbankcms/sdk 0.77.1 → 0.78.0

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 (230) hide show
  1. package/README.md +69 -0
  2. package/dist/{PreviewEditorSidebar-DVUG7GK4.mjs → PreviewEditorSidebar-RIKFQ72L.mjs} +4916 -4847
  3. package/dist/{PreviewEditorUI-P7RN4CDS.mjs → PreviewEditorUI-XO7TUWKK.mjs} +3 -3
  4. package/dist/SdkPreviewModeRuntime-LAGYMPNF.mjs +8 -0
  5. package/dist/_dts/ai/src/contracts/proposals.d.ts +154 -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/demoDashboardMutationSurfaces.d.ts +46 -0
  11. package/dist/_dts/api/src/endpoints.d.ts +8 -0
  12. package/dist/_dts/api/src/index.d.ts +14 -2
  13. package/dist/_dts/api/src/navigation/dashboardBookingsNav.d.ts +87 -0
  14. package/dist/_dts/api/src/navigation/dashboardDemoNav.d.ts +5 -0
  15. package/dist/_dts/api/src/navigation/dashboardSettingsNav.d.ts +45 -0
  16. package/dist/_dts/api/src/navigation/dashboardSiteNav.d.ts +42 -0
  17. package/dist/_dts/api/src/navigation/dashboardTeamMemberNav.d.ts +24 -0
  18. package/dist/_dts/api/src/navigation/linkUrlType.d.ts +3 -0
  19. package/dist/_dts/api/src/navigation.d.ts +12 -0
  20. package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +55 -26
  21. package/dist/_dts/api/src/staffAccess.d.ts +79 -0
  22. package/dist/_dts/api/src/types.d.ts +3 -1
  23. package/dist/_dts/api/src/workflows/automaticWorkflowTriggers.d.ts +21 -0
  24. package/dist/_dts/blocks/src/client/site-chrome.d.ts +4 -1
  25. package/dist/_dts/blocks/src/index.d.ts +1 -0
  26. package/dist/_dts/blocks/src/system/blocks/appointment-booking.d.ts +288 -288
  27. package/dist/_dts/blocks/src/system/blocks/blog-listing.d.ts +288 -288
  28. package/dist/_dts/blocks/src/system/blocks/cart.d.ts +288 -288
  29. package/dist/_dts/blocks/src/system/blocks/checkout.d.ts +288 -288
  30. package/dist/_dts/blocks/src/system/blocks/collection.d.ts +288 -288
  31. package/dist/_dts/blocks/src/system/blocks/courses/shared/schemas.d.ts +2 -2
  32. package/dist/_dts/blocks/src/system/blocks/faq.d.ts +294 -289
  33. package/dist/_dts/blocks/src/system/blocks/gifting.d.ts +288 -288
  34. package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +1 -1
  35. package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +21 -21
  36. package/dist/_dts/blocks/src/system/blocks/product-detail.d.ts +288 -288
  37. package/dist/_dts/blocks/src/system/blocks/product-list.d.ts +288 -288
  38. package/dist/_dts/blocks/src/system/blocks/shop.d.ts +288 -288
  39. package/dist/_dts/blocks/src/system/data/index.d.ts +5 -3
  40. package/dist/_dts/blocks/src/system/data/previewResolvedDataState.d.ts +45 -0
  41. package/dist/_dts/blocks/src/system/fields/boxStyles.d.ts +2 -1
  42. package/dist/_dts/blocks/src/system/fragments/library/faqAccordion.d.ts +5 -0
  43. package/dist/_dts/blocks/src/system/manifest/schema.d.ts +29 -29
  44. package/dist/_dts/blocks/src/system/node/fragments/headingDecoration.d.ts +10 -0
  45. package/dist/_dts/blocks/src/system/node/fragments/index.d.ts +1 -0
  46. package/dist/_dts/blocks/src/system/node/fragments/styledSection.d.ts +9 -0
  47. package/dist/_dts/blocks/src/system/runtime/api/client.d.ts +3 -2
  48. package/dist/_dts/blocks/src/system/runtime/api/endpoints.d.ts +8 -0
  49. package/dist/_dts/blocks/src/system/runtime/api/index.d.ts +1 -1
  50. package/dist/_dts/blocks/src/system/runtime/api/types.d.ts +43 -8
  51. package/dist/_dts/blocks/src/system/runtime/header/shared.d.ts +8 -7
  52. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventCompactRow.d.ts +1 -4
  53. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/utils.d.ts +7 -0
  54. package/dist/_dts/blocks/src/system/runtime/nodes/header-section.client.d.ts +2 -8
  55. package/dist/_dts/blocks/src/system/runtime/nodes/header-section.server.d.ts +2 -9
  56. package/dist/_dts/blocks/src/system/runtime/nodes/shop-cart-discount-ui.d.ts +5 -0
  57. package/dist/_dts/blocks/src/system/runtime/nodes/shop-checkout-form.d.ts +76 -0
  58. package/dist/_dts/blocks/src/system/runtime/nodes/shop-checkout.state.d.ts +1 -4
  59. package/dist/_dts/blocks/src/system/runtime/nodes/shop-commerce-store.d.ts +2 -0
  60. package/dist/_dts/blocks/src/system/runtime/nodes/shop-commerce.shared.d.ts +1 -0
  61. package/dist/_dts/blocks/src/system/runtime/nodes/shop-discount-apply.state.d.ts +52 -0
  62. package/dist/_dts/blocks/src/system/runtime/nodes/shop.state.d.ts +2 -4
  63. package/dist/_dts/blocks/src/system/runtime/nodes/useDiscountApply.d.ts +21 -0
  64. package/dist/_dts/blocks/src/system/runtime/shared/components/DiscountCodeDisclosure.d.ts +54 -0
  65. package/dist/_dts/blocks/src/system/runtime/shared/components/index.d.ts +2 -0
  66. package/dist/_dts/blocks/src/system/runtime/shared/index.d.ts +2 -2
  67. package/dist/_dts/blocks/src/system/transforms/registry/ui.d.ts +1 -1
  68. package/dist/_dts/blocks/src/system/transforms/typed.d.ts +1 -1
  69. package/dist/_dts/content-editor/src/contentTypeEditorContentState.d.ts +26 -0
  70. package/dist/_dts/content-editor/src/definitions/factory.d.ts +75 -0
  71. package/dist/_dts/content-editor/src/entryWorkflows.d.ts +2 -0
  72. package/dist/_dts/content-editor/src/footerBlocksEditorState.d.ts +76 -0
  73. package/dist/_dts/content-editor/src/index.d.ts +5 -0
  74. package/dist/_dts/content-editor/src/pageWorkflowContent.d.ts +29 -0
  75. package/dist/_dts/content-model/src/content-types/schema.d.ts +3 -3
  76. package/dist/_dts/content-model/src/index.d.ts +1 -0
  77. package/dist/_dts/content-model/src/routeTemplate.d.ts +4 -0
  78. package/dist/_dts/content-model/src/templates/editorState.d.ts +25 -0
  79. package/dist/_dts/core/src/csv-cells.d.ts +10 -0
  80. package/dist/_dts/core/src/csv-date-filter.d.ts +27 -0
  81. package/dist/_dts/core/src/csv-escape.d.ts +1 -0
  82. package/dist/_dts/core/src/csv-filename.d.ts +18 -0
  83. package/dist/_dts/core/src/csv-render.d.ts +4 -0
  84. package/dist/_dts/core/src/csv-types.d.ts +116 -0
  85. package/dist/_dts/core/src/currency-format.d.ts +4 -0
  86. package/dist/_dts/core/src/demo-capability-policy.d.ts +29 -0
  87. package/dist/_dts/core/src/demo-claim-access.d.ts +14 -0
  88. package/dist/_dts/core/src/demo-lifecycle-status.d.ts +11 -0
  89. package/dist/_dts/core/src/demo-runtime.d.ts +47 -0
  90. package/dist/_dts/core/src/duration.d.ts +14 -0
  91. package/dist/_dts/core/src/email-format.d.ts +10 -0
  92. package/dist/_dts/core/src/field-errors.d.ts +1 -0
  93. package/dist/_dts/core/src/form-submission-preview.d.ts +24 -0
  94. package/dist/_dts/core/src/index.d.ts +20 -0
  95. package/dist/_dts/core/src/number-input.d.ts +22 -0
  96. package/dist/_dts/core/src/public-url-validation.d.ts +12 -0
  97. package/dist/_dts/core/src/slug.d.ts +39 -0
  98. package/dist/_dts/core/src/string.d.ts +19 -0
  99. package/dist/_dts/core/src/uuid.d.ts +6 -0
  100. package/dist/_dts/db/src/schemas/forms.d.ts +50 -50
  101. package/dist/_dts/media-core/src/assetsInUseSummary.d.ts +34 -0
  102. package/dist/_dts/media-core/src/bulkDeletePlanning.d.ts +24 -0
  103. package/dist/_dts/media-core/src/canonicalCropReview.d.ts +66 -0
  104. package/dist/_dts/media-core/src/classifyAllPlanning.d.ts +48 -0
  105. package/dist/_dts/media-core/src/filename.d.ts +1 -0
  106. package/dist/_dts/media-core/src/index.d.ts +10 -0
  107. package/dist/_dts/media-core/src/mediaAssetUsageStatus.d.ts +47 -0
  108. package/dist/_dts/media-core/src/mediaSettingsState.d.ts +3 -0
  109. package/dist/_dts/media-core/src/portableMediaReferences.d.ts +38 -0
  110. package/dist/_dts/media-core/src/uploadVerificationContract.d.ts +28 -0
  111. package/dist/_dts/media-core/src/videoAssetRepair.d.ts +38 -0
  112. package/dist/_dts/media-editor/src/mediaEditorDebug.d.ts +1 -0
  113. package/dist/_dts/path-utils/src/index.d.ts +8 -0
  114. package/dist/_dts/path-utils/src/redirectPaths.d.ts +26 -0
  115. package/dist/_dts/path-utils/src/safeAppPath.d.ts +26 -0
  116. package/dist/_dts/preview-next/src/client/preview/SiteChromeCustomizeButton.d.ts +2 -1
  117. package/dist/_dts/preview-next/src/client/preview/SiteChromeCustomizeContext.d.ts +4 -0
  118. package/dist/_dts/preview-next/src/client/preview/previewDocumentFrame.d.ts +31 -0
  119. package/dist/_dts/sdk/src/client/error.d.ts +3 -0
  120. package/dist/_dts/sdk/src/client/index.d.ts +2 -2
  121. package/dist/_dts/sdk/src/client/types.d.ts +37 -19
  122. package/dist/_dts/sdk/src/index.d.ts +2 -2
  123. package/dist/_dts/sdk/src/manifest/passes/pass1-fields.d.ts +16 -16
  124. package/dist/_dts/sdk/src/next/content-load-failure.d.ts +51 -0
  125. package/dist/_dts/sdk/src/next/index.d.ts +2 -1
  126. package/dist/_dts/sdk/src/next/types.d.ts +19 -0
  127. package/dist/_dts/sdk/src/portal/redirects.d.ts +1 -1
  128. package/dist/_dts/sdk/src/routing/index.d.ts +3 -2
  129. package/dist/_dts/sdk/src/routing/resolvePageContent.d.ts +71 -6
  130. package/dist/_dts/sdk/src/version.d.ts +1 -1
  131. package/dist/_dts/site-commands/src/commands.d.ts +12 -12
  132. package/dist/_dts/site-commands/src/index.d.ts +1 -0
  133. package/dist/_dts/site-commands/src/pagePaths.d.ts +6 -0
  134. package/dist/_dts/theme-core/src/accordions/siteStyleDefaults.d.ts +26 -0
  135. package/dist/_dts/theme-core/src/accordions/types.d.ts +1 -0
  136. package/dist/_dts/theme-core/src/blocks/vars/index.d.ts +1 -0
  137. package/dist/_dts/theme-core/src/fonts/index.d.ts +1 -0
  138. package/dist/_dts/theme-core/src/fonts/uploadFormat.d.ts +44 -0
  139. package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
  140. package/dist/_dts/theme-core/src/index.d.ts +3 -1
  141. package/dist/_dts/theme-core/src/mock-themes/all.d.ts +36 -24
  142. package/dist/_dts/theme-core/src/navigation/generateNavLinkCSS.d.ts +6 -1
  143. package/dist/_dts/theme-core/src/navigation/types.d.ts +12 -0
  144. package/dist/_dts/theme-core/src/palette/variants/types.d.ts +3 -3
  145. package/dist/_dts/theme-core/src/runtime/themeCssVarNames.d.ts +7 -0
  146. package/dist/_dts/theme-core/src/schema.d.ts +64 -18
  147. package/dist/_dts/theme-core/src/site-styles/appearancePresetCatalog.d.ts +214 -34
  148. package/dist/_dts/theme-core/src/site-styles/appearancePresetTypes.d.ts +5 -2
  149. package/dist/_dts/theme-core/src/site-styles/blockAppearancePresets.d.ts +214 -34
  150. package/dist/_dts/theme-core/src/site-styles/curatedSiteStyles.d.ts +24 -0
  151. package/dist/_dts/theme-core/src/site-styles/designState.d.ts +31 -3
  152. package/dist/_dts/theme-core/src/site-styles/generatedSchemas.d.ts +4 -4
  153. package/dist/_dts/theme-core/src/site-styles/headerLooks.d.ts +33 -1
  154. package/dist/_dts/theme-core/src/site-styles/rawStyleFields.d.ts +4 -2
  155. package/dist/_dts/theme-core/src/site-styles/runtimeCompiler.d.ts +9 -1
  156. package/dist/_dts/theme-core/src/site-styles/types.d.ts +27 -2
  157. package/dist/_dts/theme-core/src/siteChrome.d.ts +17 -34
  158. package/dist/_dts/theme-core/src/siteChromeOverlayClearance.d.ts +22 -0
  159. package/dist/_dts/theme-core/src/siteChromePlacement.d.ts +22 -0
  160. package/dist/_dts/theme-core/src/siteChromePlanning.d.ts +32 -0
  161. package/dist/_dts/theme-core/src/tokens/themeColorTokens.d.ts +2 -2
  162. package/dist/{chunk-2SPENC5M.mjs → chunk-F7RTCZYN.mjs} +229 -50
  163. package/dist/{chunk-IENWFSLO.mjs → chunk-NIDXI46P.mjs} +1 -1
  164. package/dist/{chunk-KWJPDZH2.mjs → chunk-OECWLDHN.mjs} +2770 -620
  165. package/dist/{chunk-VX7B5VAC.mjs → chunk-SVMMM2NA.mjs} +8 -0
  166. package/dist/{chunk-6SMUFTXD.mjs → chunk-SXOLGNMX.mjs} +1 -1
  167. package/dist/{chunk-ZYEJLCTN.mjs → chunk-TXDES5P2.mjs} +2 -2
  168. package/dist/cli/index.mjs +1677 -440
  169. package/dist/client/{accordion-RZMQSYLR.mjs → accordion-EVDEOUPR.mjs} +2 -2
  170. package/dist/client/{bookingForm-NF4ASVNV.mjs → bookingForm-DIHBLC64.mjs} +27 -30
  171. package/dist/client/bookings.mjs +3707 -259
  172. package/dist/client/{carousel-LDX47ZIK.mjs → carousel-FEBQHIWI.mjs} +3 -4
  173. package/dist/client/{cart-RGXDS5F4.mjs → cart-7CKSXAE4.mjs} +8 -8
  174. package/dist/client/{checkout-P7WWSNNY.mjs → checkout-WKYCANLV.mjs} +8 -8
  175. package/dist/client/{chunk-JNC7CGHX.mjs → chunk-2SAVKN2M.mjs} +2 -2
  176. package/dist/client/{chunk-TQ5MSPDX.mjs → chunk-36WJCERQ.mjs} +1 -1
  177. package/dist/client/{chunk-R56FQ3RR.mjs → chunk-65F47D7Y.mjs} +280 -71
  178. package/dist/client/{chunk-L3DNHIJX.mjs → chunk-GUK2FPXQ.mjs} +23 -45
  179. package/dist/client/{chunk-PMAIXMAB.mjs → chunk-IVNCUVAV.mjs} +26 -21
  180. package/dist/client/{chunk-II7O4XN3.mjs → chunk-OFMSCGNY.mjs} +2 -2
  181. package/dist/client/chunk-PD6NBCEY.mjs +66 -0
  182. package/dist/client/{chunk-GMVTOKYG.mjs → chunk-RV6FX7UH.mjs} +510 -64
  183. package/dist/client/{chunk-E2TDNXCL.mjs → chunk-RZDWX7QW.mjs} +2 -1
  184. package/dist/client/{chunk-M3L3KYYR.mjs → chunk-UDNSI5PY.mjs} +12 -0
  185. package/dist/client/{chunk-JEZECJ3W.mjs → chunk-VPPMNXCF.mjs} +129 -3
  186. package/dist/client/{chunk-UFSWADAO.mjs → chunk-YDSEG6GZ.mjs} +5 -66
  187. package/dist/client/client.mjs +7070 -4561
  188. package/dist/client/{courseRegistration-7F65K5ZR.mjs → courseRegistration-5QF2PHKM.mjs} +14 -11
  189. package/dist/client/{eventCalendar-GLSC5KTL.mjs → eventCalendar-4ZOSETDU.mjs} +9 -9
  190. package/dist/client/{eventCombined-ZHK4WKUR.mjs → eventCombined-WQGU7JUX.mjs} +9 -9
  191. package/dist/client/{eventDetails-E3PJYBIN.mjs → eventDetails-AYWVUJ5Y.mjs} +9 -9
  192. package/dist/client/{eventListing-EMS3WC3E.mjs → eventListing-NT7C6UT5.mjs} +9 -9
  193. package/dist/client/{eventRegistration-NZOTVNPI.mjs → eventRegistration-OH24F4ZJ.mjs} +9 -9
  194. package/dist/client/{form-ETFZFATW.mjs → form-7L42SRBB.mjs} +6 -6
  195. package/dist/client/{headerSection-4LBP7ULT.mjs → headerSection-OZRZNZ52.mjs} +3 -3
  196. package/dist/client/hooks.mjs +1040 -278
  197. package/dist/client/{locationMap-5M655YSJ.mjs → locationMap-ZBXRPQ7C.mjs} +2 -2
  198. package/dist/client/{newsletterForm-QOUYW44O.mjs → newsletterForm-SNAGFF2I.mjs} +3 -3
  199. package/dist/client/{productDetail-O4DOCWQG.mjs → productDetail-I46BOFGV.mjs} +8 -8
  200. package/dist/client/{productList-A5RO5WIS.mjs → productList-BOYHTYI6.mjs} +8 -8
  201. package/dist/client/rendering/client.mjs +7090 -2645
  202. package/dist/client/rendering/islands.mjs +19 -19
  203. package/dist/client/rendering.mjs +6089 -3792
  204. package/dist/client/{shop-L4MZH4I2.mjs → shop-XTXPZTKR.mjs} +8 -8
  205. package/dist/preview-next/before-render.mjs +8 -0
  206. package/dist/preview-next/client/runtime.mjs +5 -5
  207. package/dist/preview-next/editor-chrome.css +10 -0
  208. package/dist/preview-next/middleware.mjs +8 -0
  209. package/dist/{sdk-runtime-6UT2S7KZ.mjs → sdk-runtime-ZJLKC6DR.mjs} +6 -6
  210. package/dist/server/components.mjs +2635 -1262
  211. package/dist/server/config-validation.mjs +1271 -509
  212. package/dist/server/config.mjs +1271 -509
  213. package/dist/server/data.mjs +1040 -278
  214. package/dist/server/index.mjs +488 -246
  215. package/dist/server/next.mjs +4087 -2147
  216. package/dist/server/page-converter.mjs +571 -115
  217. package/dist/server/prebuild.mjs +1 -1
  218. package/dist/server/rendering/server.mjs +2636 -1263
  219. package/dist/server/rendering.mjs +2654 -1268
  220. package/dist/server/routing.mjs +1729 -489
  221. package/dist/server/server.mjs +1532 -530
  222. package/dist/server/theme-bridge.mjs +3151 -131
  223. package/dist/server/theme.mjs +10 -1
  224. package/dist/styles/index.css +488 -48
  225. package/package.json +2 -1
  226. package/dist/SdkPreviewModeRuntime-KLPX47SE.mjs +0 -8
  227. package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/DiscountCodeSection.d.ts +0 -7
  228. package/dist/_dts/preview-next/src/client/widgets/PreviewMediaField.d.ts +0 -4
  229. package/dist/client/chunk-OJPZEZU2.mjs +0 -31
  230. package/dist/client/chunk-RTZ3JKKX.mjs +0 -178
@@ -0,0 +1,76 @@
1
+ import { type Brand, type Result } from '../../../../../core/src/index';
2
+ import type { DiscountsAvailableRequest, DiscountsAvailableResponse, ShopCheckoutRequest, UnifiedCheckoutItem, UnifiedCheckoutRequest } from '../api/types';
3
+ import type { CommerceCheckoutState } from './shop-commerce.shared';
4
+ export type ManualDiscountCode = Brand<string, 'ManualDiscountCode'>;
5
+ export type CheckoutContactForm = Readonly<{
6
+ name: string;
7
+ email: string;
8
+ }>;
9
+ export type CheckoutDiscountForm = Readonly<{
10
+ discountCode: string;
11
+ }>;
12
+ export type ShopCheckoutForm = CheckoutContactForm & CheckoutDiscountForm;
13
+ export type NormalizedCheckoutContact = Readonly<{
14
+ name: string;
15
+ email: string;
16
+ }>;
17
+ export type CheckoutFormError = Readonly<{
18
+ type: 'missing_contact';
19
+ message: string;
20
+ }> | Readonly<{
21
+ type: 'invalid_email';
22
+ message: string;
23
+ }> | Readonly<{
24
+ type: 'empty_cart';
25
+ message: string;
26
+ }> | Readonly<{
27
+ type: 'blocked_cart';
28
+ reason: 'mixed_currency';
29
+ message: string;
30
+ }>;
31
+ export type CartDiscountAvailabilityRequest = Readonly<{
32
+ context: DiscountsAvailableRequest['context'];
33
+ subtotalCents: number;
34
+ currency: string;
35
+ }>;
36
+ export type CartDiscountUiState = Readonly<{
37
+ type: 'unavailable';
38
+ }> | Readonly<{
39
+ type: 'loading';
40
+ }> | Readonly<{
41
+ type: 'manual-allowed';
42
+ }> | Readonly<{
43
+ type: 'auto-only';
44
+ autoAppliedDiscount: DiscountsAvailableResponse['autoAppliedDiscount'];
45
+ }> | Readonly<{
46
+ type: 'error-unavailable';
47
+ }>;
48
+ export declare function normalizeManualDiscountCode(raw: string): ManualDiscountCode | null;
49
+ export declare function normalizeCheckoutEmail(raw: string): Result<string, CheckoutFormError>;
50
+ export declare function normalizeCheckoutContactForm(form: CheckoutContactForm): Result<NormalizedCheckoutContact, CheckoutFormError>;
51
+ export type DirectShopCheckoutCommand = Omit<ShopCheckoutRequest, 'siteId' | 'discountCode'> & Readonly<{
52
+ discountCode?: ManualDiscountCode;
53
+ }>;
54
+ export declare function planDirectShopCheckoutRequest(input: Readonly<{
55
+ productType: DirectShopCheckoutCommand['productType'];
56
+ productId: string;
57
+ form: ShopCheckoutForm;
58
+ successUrl: string;
59
+ cancelUrl: string;
60
+ confirmDuplicate?: boolean;
61
+ }>): Result<DirectShopCheckoutCommand, CheckoutFormError>;
62
+ export type UnifiedCheckoutCommand = Omit<UnifiedCheckoutRequest, 'siteId' | 'discountCode'> & Readonly<{
63
+ discountCode?: ManualDiscountCode;
64
+ }>;
65
+ export declare function buildUnifiedCheckoutItems(checkout: Extract<CommerceCheckoutState, {
66
+ kind: 'ready';
67
+ }>): UnifiedCheckoutItem[];
68
+ export declare function planUnifiedCheckoutRequest(input: Readonly<{
69
+ checkout: CommerceCheckoutState;
70
+ form: ShopCheckoutForm;
71
+ successUrl: string;
72
+ cancelUrl: string;
73
+ }>): Result<UnifiedCheckoutCommand, CheckoutFormError>;
74
+ export declare function planCartDiscountAvailabilityRequests(checkout: CommerceCheckoutState): Result<CartDiscountAvailabilityRequest[], CheckoutFormError>;
75
+ export declare function aggregateCartDiscountUiState(availability: readonly DiscountsAvailableResponse[]): CartDiscountUiState;
76
+ export declare function checkoutFormForDiscountUiState(form: ShopCheckoutForm, discountUiState: CartDiscountUiState): ShopCheckoutForm;
@@ -1,9 +1,6 @@
1
1
  import { type FeedbackState } from '@riverbankcms/frontend-state';
2
+ import type { ShopCheckoutForm } from './shop-checkout-form';
2
3
  export type ShopCheckoutNotice = 'success' | 'cancelled' | null;
3
- export type ShopCheckoutForm = Readonly<{
4
- name: string;
5
- email: string;
6
- }>;
7
4
  export type ShopCheckoutState = Readonly<{
8
5
  form: ShopCheckoutForm;
9
6
  submission: 'idle' | 'submitting';
@@ -9,6 +9,7 @@ declare class CommerceCartStore {
9
9
  addProduct(input: Readonly<{
10
10
  key: string;
11
11
  productId: string;
12
+ productCategoryId?: string | null;
12
13
  variantId?: string | null;
13
14
  title: string;
14
15
  variantTitle?: string | null;
@@ -36,6 +37,7 @@ export declare function useCommerceCart(siteId: string | undefined): {
36
37
  addProduct: (input: Readonly<{
37
38
  key: string;
38
39
  productId: string;
40
+ productCategoryId?: string | null;
39
41
  variantId?: string | null;
40
42
  title: string;
41
43
  variantTitle?: string | null;
@@ -3,6 +3,7 @@ export type CommerceCartItem = Readonly<{
3
3
  key: string;
4
4
  kind: 'product';
5
5
  productId: string;
6
+ productCategoryId: string | null;
6
7
  variantId?: string;
7
8
  title: string;
8
9
  variantTitle?: string | null;
@@ -0,0 +1,52 @@
1
+ import type { DiscountApplyRejectedReason, DiscountApplyResponse } from '../api/types';
2
+ import { type ManualDiscountCode } from './shop-checkout-form';
3
+ export type DiscountApplyClientRejectedReason = 'empty_code' | 'email_required';
4
+ export type DiscountApplyRejectedReasonWithClient = DiscountApplyClientRejectedReason | DiscountApplyRejectedReason;
5
+ export type AppliedDiscountCode = Extract<DiscountApplyResponse, {
6
+ type: 'applied';
7
+ }>;
8
+ export type DiscountApplyStatus = Readonly<{
9
+ type: 'idle';
10
+ }> | Readonly<{
11
+ type: 'applying';
12
+ }> | Readonly<{
13
+ type: 'applied';
14
+ discount: AppliedDiscountCode;
15
+ }> | Readonly<{
16
+ type: 'rejected';
17
+ reason: DiscountApplyRejectedReasonWithClient;
18
+ message: string;
19
+ }>;
20
+ export type DiscountApplyState = Readonly<{
21
+ isOpen: boolean;
22
+ draftCode: string;
23
+ status: DiscountApplyStatus;
24
+ }>;
25
+ export type DiscountApplyFeedback = Readonly<{
26
+ tone: 'success' | 'error' | 'info';
27
+ message: string;
28
+ }>;
29
+ export type DiscountApplyAction = Readonly<{
30
+ type: 'open';
31
+ }> | Readonly<{
32
+ type: 'draftChanged';
33
+ draftCode: string;
34
+ }> | Readonly<{
35
+ type: 'remove';
36
+ }> | Readonly<{
37
+ type: 'applyStarted';
38
+ }> | Readonly<{
39
+ type: 'applySucceeded';
40
+ discount: AppliedDiscountCode;
41
+ }> | Readonly<{
42
+ type: 'applyRejected';
43
+ reason: DiscountApplyRejectedReasonWithClient;
44
+ message: string;
45
+ }> | Readonly<{
46
+ type: 'resetApplied';
47
+ }>;
48
+ export declare const initialDiscountApplyState: DiscountApplyState;
49
+ export declare function discountApplyReducer(state: DiscountApplyState, action: DiscountApplyAction): DiscountApplyState;
50
+ export declare function getAppliedDiscountCode(state: DiscountApplyState): ManualDiscountCode | null;
51
+ export declare function isDiscountApplyInFlight(state: DiscountApplyState): boolean;
52
+ export declare function getDiscountApplyFeedback(status: DiscountApplyStatus, formatPrice: (cents: number, currency: string) => string): DiscountApplyFeedback | null;
@@ -1,14 +1,12 @@
1
1
  import type { PublicMembershipProduct, PublicPassProduct } from '../../blocks/shop';
2
2
  import type { ShopDuplicateMembershipWarning as DuplicateMembershipWarning } from '../api';
3
+ import type { ShopCheckoutForm } from './shop-checkout-form';
3
4
  export type CheckoutReturnNotice = Readonly<{
4
5
  kind: 'success';
5
6
  }> | Readonly<{
6
7
  kind: 'cancelled';
7
8
  }> | null;
8
- export type CheckoutForm = Readonly<{
9
- email: string;
10
- name: string;
11
- }>;
9
+ export type CheckoutForm = ShopCheckoutForm;
12
10
  export type CheckoutItem = Readonly<{
13
11
  productType: 'pass';
14
12
  product: PublicPassProduct;
@@ -0,0 +1,21 @@
1
+ import type { BlockApiClient, DiscountApplyLine } from '../api';
2
+ import type { DiscountApplyAction, DiscountApplyState } from './shop-discount-apply.state';
3
+ export type DiscountApplyLinesPlan = Readonly<{
4
+ ok: true;
5
+ lines: DiscountApplyLine[];
6
+ }> | Readonly<{
7
+ ok: false;
8
+ }>;
9
+ export declare const DISCOUNT_APPLY_MESSAGES: {
10
+ readonly emptyCode: "Enter a discount code first.";
11
+ readonly emailRequired: "Enter your email before applying a code.";
12
+ readonly unavailable: "That code doesn't work for this checkout.";
13
+ readonly unknown: "We couldn't check that code. Try again.";
14
+ };
15
+ export declare function useDiscountApply(options: Readonly<{
16
+ api: BlockApiClient;
17
+ state: DiscountApplyState;
18
+ dispatch: (action: DiscountApplyAction) => void;
19
+ getCustomerEmail: () => string;
20
+ getLines: () => DiscountApplyLinesPlan;
21
+ }>): () => Promise<void>;
@@ -0,0 +1,54 @@
1
+ import type React from 'react';
2
+ type BlockDiscountCodeSurface = 'course-registration' | 'event-registration';
3
+ export type DiscountCodeDisclosureSurface = BlockDiscountCodeSurface | 'theme-form';
4
+ export declare const BLOCK_DISCOUNT_CODE_DISCLOSURE_CLASSES: {
5
+ readonly 'course-registration': {
6
+ readonly root: "cr-discount";
7
+ readonly toggle: "cr-discount__toggle";
8
+ readonly form: "cr-discount__form";
9
+ readonly label: "cr-discount__label";
10
+ readonly row: "cr-discount__row";
11
+ readonly input: "cr-discount__input";
12
+ readonly apply: "cr-discount__apply";
13
+ readonly remove: "cr-discount__remove";
14
+ readonly hint: "cr-discount__hint";
15
+ readonly feedback: "cr-discount__feedback";
16
+ };
17
+ readonly 'event-registration': {
18
+ readonly root: "er-discount";
19
+ readonly toggle: "er-discount__toggle";
20
+ readonly form: "er-discount__form";
21
+ readonly label: "er-discount__label";
22
+ readonly row: "er-discount__row";
23
+ readonly input: "er-discount__input";
24
+ readonly apply: "er-discount__apply";
25
+ readonly remove: "er-discount__remove";
26
+ readonly hint: "er-discount__hint";
27
+ readonly feedback: "er-discount__feedback";
28
+ };
29
+ };
30
+ export type DiscountCodeDisclosureProps = Readonly<{
31
+ surface: DiscountCodeDisclosureSurface;
32
+ isOpen: boolean;
33
+ code: string;
34
+ onOpen: () => void;
35
+ onChange: (next: string) => void;
36
+ onRemove: () => void;
37
+ onApply?: () => void;
38
+ id?: string;
39
+ toggleLabel?: string;
40
+ label?: string;
41
+ placeholder?: string;
42
+ applyLabel?: string;
43
+ removeLabel?: string;
44
+ hint?: string;
45
+ feedback?: Readonly<{
46
+ tone: 'success' | 'error' | 'info';
47
+ message: string;
48
+ }> | null;
49
+ isApplying?: boolean;
50
+ applyDisabled?: boolean;
51
+ disabled?: boolean;
52
+ }>;
53
+ export declare function DiscountCodeDisclosure({ surface, isOpen, code, onOpen, onChange, onRemove, onApply, id, toggleLabel, label, placeholder, applyLabel, removeLabel, hint, feedback, isApplying, applyDisabled, disabled, }: DiscountCodeDisclosureProps): React.JSX.Element;
54
+ export {};
@@ -4,6 +4,8 @@
4
4
  export { CheckIcon } from './CheckIcon';
5
5
  export { ClockIcon } from './ClockIcon';
6
6
  export { CrossIcon } from './CrossIcon';
7
+ export { BLOCK_DISCOUNT_CODE_DISCLOSURE_CLASSES, DiscountCodeDisclosure, } from './DiscountCodeDisclosure';
8
+ export type { DiscountCodeDisclosureProps, DiscountCodeDisclosureSurface, } from './DiscountCodeDisclosure';
7
9
  export { ActionRow } from './ActionRow';
8
10
  export type { ActionRowProps } from './ActionRow';
9
11
  export { BookingOptionCompactRow } from './BookingOptionCompactRow';
@@ -8,5 +8,5 @@ export { DEFAULT_CURRENCY } from './types';
8
8
  export { BOOK_TARGET_PARAMS, buildCheckoutReturnUrls, resolveDedicatedBookingHref, resolveDedicatedBookingPath, resolveDedicatedBookingTarget, formatPrice, scrollToBlock, consumeSearchParam, consumeSearchParams, validateFormData, getStepNumber, } from './utils';
9
9
  export type { DedicatedBookingTarget, UniversalBookingRouteTarget, } from './utils';
10
10
  export { createBodyThemePortalRoot } from './utils';
11
- export { ActionRow, BookingOptionCompactRow, BookingOptionList, CheckIcon, ClockIcon, CrossIcon, FieldValidationMessage, FeedbackMessage, getFieldValidationControlProps, MembershipHero, ModalShell, StateIcon, StepIndicator, TerminalPanel, } from './components';
12
- export type { ActionRowProps, BookingOptionCompactRowAction, BookingOptionCompactRowProps, BookingOptionCompactRowViewModel, BookingOptionGroupViewModel, BookingOptionListProps, BookingOptionMetaItem, FieldValidationControlInput, FieldValidationControlProps, FieldValidationMessageProps, FeedbackLiveMode, FeedbackMessageProps, FeedbackTone, ModalShellProps, StepIndicatorBaseProps, StepIndicatorProps, TerminalPanelProps, TerminalPanelTitleElement, } from './components';
11
+ export { ActionRow, BookingOptionCompactRow, BookingOptionList, CheckIcon, ClockIcon, CrossIcon, BLOCK_DISCOUNT_CODE_DISCLOSURE_CLASSES, DiscountCodeDisclosure, FieldValidationMessage, FeedbackMessage, getFieldValidationControlProps, MembershipHero, ModalShell, StateIcon, StepIndicator, TerminalPanel, } from './components';
12
+ export type { ActionRowProps, BookingOptionCompactRowAction, BookingOptionCompactRowProps, BookingOptionCompactRowViewModel, BookingOptionGroupViewModel, BookingOptionListProps, BookingOptionMetaItem, DiscountCodeDisclosureProps, DiscountCodeDisclosureSurface, FieldValidationControlInput, FieldValidationControlProps, FieldValidationMessageProps, FeedbackLiveMode, FeedbackMessageProps, FeedbackTone, ModalShellProps, StepIndicatorBaseProps, StepIndicatorProps, TerminalPanelProps, TerminalPanelTitleElement, } from './components';
@@ -45,8 +45,8 @@ declare const twoColumnContainerClassOptionsSchema: z.ZodObject<{
45
45
  export declare const twoColumnContainerClassTransform: TransformDefinition<z.infer<typeof twoColumnContainerClassOptionsSchema>>;
46
46
  declare const twoColumnFlexBasisOptionsSchema: z.ZodObject<{
47
47
  side: z.ZodEnum<{
48
- image: "image";
49
48
  text: "text";
49
+ image: "image";
50
50
  }>;
51
51
  }, z.core.$strip>;
52
52
  export declare const twoColumnFlexBasisTransform: TransformDefinition<z.infer<typeof twoColumnFlexBasisOptionsSchema>>;
@@ -73,7 +73,7 @@ export declare const transformDefinitions: {
73
73
  reverseClass: string;
74
74
  }>;
75
75
  readonly "ui.twoColumnFlexBasis": TransformDefinition<{
76
- side: "image" | "text";
76
+ side: "text" | "image";
77
77
  }>;
78
78
  readonly "media.fromUrl": TransformDefinition<{
79
79
  width?: number;
@@ -0,0 +1,26 @@
1
+ export type ContentTypeEditorContentState = Readonly<{
2
+ deleteDialogOpen: boolean;
3
+ deletePending: boolean;
4
+ seoDisclosure: Readonly<{
5
+ open: boolean;
6
+ lastIssueCount: number;
7
+ }>;
8
+ }>;
9
+ export type ContentTypeEditorContentAction = Readonly<{
10
+ type: 'delete-dialog-opened';
11
+ }> | Readonly<{
12
+ type: 'delete-dialog-closed';
13
+ }> | Readonly<{
14
+ type: 'delete-started';
15
+ }> | Readonly<{
16
+ type: 'delete-finished';
17
+ }> | Readonly<{
18
+ type: 'seo-open-changed';
19
+ open: boolean;
20
+ }> | Readonly<{
21
+ type: 'seo-validation-state-changed';
22
+ issueCount: number;
23
+ hasMetadataError: boolean;
24
+ }>;
25
+ export declare function createInitialContentTypeEditorContentState(): ContentTypeEditorContentState;
26
+ export declare function contentTypeEditorContentReducer(state: ContentTypeEditorContentState, action: ContentTypeEditorContentAction): ContentTypeEditorContentState;
@@ -0,0 +1,75 @@
1
+ import type { ContentEntryDetail, ContentTypeKey } from '../../../api/src/content-editor';
2
+ import type { ContentEntryDefinition, ContentEntrySnapshot, ContentLifecycleStatus, ContentTypeSchema, RoutingHelpers } from '../../../content-model/src/index';
3
+ export type SnapshotDefaults = {
4
+ title: string;
5
+ slug?: string | null;
6
+ };
7
+ export type ContentEntryDefinitionPlan<TResponse, TSnapshot extends ContentEntrySnapshot> = Readonly<{
8
+ type: ContentTypeKey;
9
+ title: string;
10
+ kind: 'content' | 'page';
11
+ routing: RoutingHelpers;
12
+ hasRoute: boolean;
13
+ snapshotFromResponse: (response: TResponse) => TSnapshot;
14
+ getRouteId?: (response: TResponse) => string | undefined;
15
+ }>;
16
+ type BaseFactoryOptions<TResponse> = {
17
+ typeKey: ContentTypeKey;
18
+ schema: ContentTypeSchema;
19
+ entityLabel: string;
20
+ getRouteId?: (response: TResponse) => string | undefined;
21
+ };
22
+ export type ContentEntriesDefinitionPlanOptions<TContent> = BaseFactoryOptions<ContentEntryDetail<TContent>>;
23
+ export type PagesDefinitionPlanOptions = BaseFactoryOptions<PageRecordLike>;
24
+ type PageRecordLike = {
25
+ id: string;
26
+ draftTitle?: string | null;
27
+ draftPath?: string | null;
28
+ draftStatus?: string | null;
29
+ title?: string | null;
30
+ path?: string | null;
31
+ status?: string | null;
32
+ publishedAt?: string | null;
33
+ scheduledPublishAt?: string | null;
34
+ scheduledPublishFailedAt?: string | null;
35
+ scheduledPublishLastError?: string | null;
36
+ draftMetaTitle?: string | null;
37
+ draftMetaDescription?: string | null;
38
+ publishedMetaTitle?: string | null;
39
+ publishedMetaDescription?: string | null;
40
+ ogImageId?: string | null;
41
+ };
42
+ type ContentEntryLikeForSnapshot = {
43
+ entry: {
44
+ id: string;
45
+ };
46
+ route: {
47
+ draftTitle?: string | null;
48
+ draftPath?: string | null;
49
+ draftSlug?: string | null;
50
+ draftStatus?: string | null;
51
+ publishedTitle?: string | null;
52
+ publishedPath?: string | null;
53
+ publishedSlug?: string | null;
54
+ status?: string | null;
55
+ publishedAt?: string | null;
56
+ scheduledPublishAt?: string | null;
57
+ draftMetaTitle?: string | null;
58
+ draftMetaDescription?: string | null;
59
+ publishedMetaTitle?: string | null;
60
+ publishedMetaDescription?: string | null;
61
+ ogImageId?: string | null;
62
+ } | null;
63
+ draftContent?: Record<string, unknown> | null;
64
+ publishedContent?: Record<string, unknown> | null;
65
+ };
66
+ export declare function getDefaultEntityLabel(name?: string | null): string;
67
+ export declare function createSnapshotDefaults(entityLabel: string, slugSeed?: string | null): SnapshotDefaults;
68
+ export declare function asContentEntrySnapshotSource<TContent>(detail: ContentEntryDetail<TContent>): ContentEntryLikeForSnapshot;
69
+ export declare function createContentEntriesDefinitionPlan<TContent>(options: ContentEntriesDefinitionPlanOptions<TContent>): ContentEntryDefinitionPlan<ContentEntryDetail<TContent>, ContentEntrySnapshot<ContentLifecycleStatus>>;
70
+ export declare function createPagesDefinitionPlan(options: PagesDefinitionPlanOptions): ContentEntryDefinitionPlan<PageRecordLike, ContentEntrySnapshot<'draft' | 'scheduled' | 'published'>>;
71
+ export type PageEntrySnapshot = ContentEntrySnapshot<'draft' | 'scheduled' | 'published'>;
72
+ export declare function createPageSnapshot(record: PageRecordLike, schema: ContentTypeSchema): PageEntrySnapshot;
73
+ export declare function mapPageRecordToSnapshot(record: PageRecordLike, schema: ContentTypeSchema): PageEntrySnapshot;
74
+ export type DefinitionServices<TEntry extends ContentEntrySnapshot, TMetadataPayload extends Record<string, unknown>, TPublishPayload, TMetadataResponse extends Record<string, unknown> = Record<string, unknown>> = ContentEntryDefinition<TEntry, Record<string, unknown>, TMetadataPayload, TPublishPayload, TMetadataResponse>['services'];
75
+ export {};
@@ -0,0 +1,2 @@
1
+ import type { RiverbankSiteConfig, SdkWorkflowConfig } from '../../api/src/sdkContracts';
2
+ export declare function listManualEntryWorkflows(sdkConfig: RiverbankSiteConfig | null | undefined, contentType: string): SdkWorkflowConfig[];
@@ -0,0 +1,76 @@
1
+ type FooterBlocksFooterMode = 'default' | 'blocks' | 'default+blocks' | 'none';
2
+ export type FooterBlocksEditorBlock = Readonly<{
3
+ id: string;
4
+ kind: string;
5
+ kindLabel: string;
6
+ purpose: 'footer';
7
+ content: Record<string, unknown>;
8
+ editable: boolean;
9
+ readOnlyReason?: string | null;
10
+ }>;
11
+ export type FooterBlocksEditorLoadResponse = Readonly<{
12
+ blocks: FooterBlocksEditorBlock[];
13
+ footerMode: FooterBlocksFooterMode;
14
+ }>;
15
+ type FooterBlocksResponse = FooterBlocksEditorLoadResponse;
16
+ type FooterBlock = FooterBlocksEditorBlock;
17
+ type UpdatePayload = Readonly<{
18
+ blocks: Array<Readonly<{
19
+ id: string;
20
+ content: Record<string, unknown>;
21
+ }>>;
22
+ removedBlockIds?: string[];
23
+ }>;
24
+ export type FooterBlocksEditorReadyState = Readonly<{
25
+ tag: 'ready';
26
+ footerMode: FooterBlocksResponse['footerMode'];
27
+ blocks: FooterBlock[];
28
+ initialOrder: string[];
29
+ removedBlockIds: ReadonlySet<string>;
30
+ validationMessage: string | null;
31
+ previewExpanded: boolean;
32
+ }>;
33
+ export type FooterBlocksEditorState = Readonly<{
34
+ tag: 'loading';
35
+ }> | Readonly<{
36
+ tag: 'error';
37
+ message: string;
38
+ }> | FooterBlocksEditorReadyState;
39
+ export type FooterBlocksEditorAction = Readonly<{
40
+ type: 'load-started';
41
+ }> | Readonly<{
42
+ type: 'load-succeeded';
43
+ response: FooterBlocksResponse;
44
+ }> | Readonly<{
45
+ type: 'load-failed';
46
+ message: string;
47
+ }> | Readonly<{
48
+ type: 'block-moved';
49
+ blockId: string;
50
+ direction: -1 | 1;
51
+ }> | Readonly<{
52
+ type: 'block-removed';
53
+ blockId: string;
54
+ }> | Readonly<{
55
+ type: 'preview-toggled';
56
+ expanded: boolean;
57
+ }> | Readonly<{
58
+ type: 'validation-message-set';
59
+ message: string | null;
60
+ }>;
61
+ export type FooterBlocksPreviewState = Readonly<{
62
+ blocks: Array<Readonly<{
63
+ id: string;
64
+ content: Record<string, unknown>;
65
+ kind: string;
66
+ kindLabel: string;
67
+ readOnlyReason: string | null;
68
+ }>>;
69
+ removedBlockIds: string[];
70
+ }>;
71
+ export declare function createInitialFooterBlocksEditorState(): FooterBlocksEditorState;
72
+ export declare function footerBlocksEditorReducer(state: FooterBlocksEditorState, action: FooterBlocksEditorAction): FooterBlocksEditorState;
73
+ export declare function selectFooterBlocksStructuralChanges(state: FooterBlocksEditorState): boolean;
74
+ export declare function buildFooterBlocksUpdatePayload(state: FooterBlocksEditorReadyState, getDraftContent: (block: FooterBlock) => Record<string, unknown> | null): UpdatePayload;
75
+ export declare function selectFooterBlocksPreview(state: FooterBlocksEditorReadyState, getDraftContent: (block: FooterBlock) => Record<string, unknown> | null): FooterBlocksPreviewState | null;
76
+ export {};
@@ -23,6 +23,11 @@ export { useStoreBinding, parseEditorPath } from './primitives/shared';
23
23
  export type { PathInfo } from './primitives/shared';
24
24
  export * from './ai/overlayHelpers';
25
25
  export { diffPaths, isUnpublishedChangesDebugEnabled } from './debug/unpublishedChangesDebug';
26
+ export { listManualEntryWorkflows } from './entryWorkflows';
27
+ export { pageWorkflowDraftContent, pageWorkflowPublishedContent, type PageWorkflowDraftSource, type PageWorkflowPublishedSource, } from './pageWorkflowContent';
28
+ export { contentTypeEditorContentReducer, createInitialContentTypeEditorContentState, type ContentTypeEditorContentAction, type ContentTypeEditorContentState, } from './contentTypeEditorContentState';
29
+ export { buildFooterBlocksUpdatePayload, createInitialFooterBlocksEditorState, footerBlocksEditorReducer, selectFooterBlocksPreview, selectFooterBlocksStructuralChanges, type FooterBlocksEditorBlock, type FooterBlocksEditorAction, type FooterBlocksEditorLoadResponse, type FooterBlocksEditorReadyState, type FooterBlocksEditorState, type FooterBlocksPreviewState, } from './footerBlocksEditorState';
30
+ export { asContentEntrySnapshotSource, createContentEntriesDefinitionPlan, createPageSnapshot, createPagesDefinitionPlan, createSnapshotDefaults, getDefaultEntityLabel, mapPageRecordToSnapshot, type ContentEntriesDefinitionPlanOptions, type ContentEntryDefinitionPlan, type DefinitionServices, type PageEntrySnapshot, type PagesDefinitionPlanOptions, type SnapshotDefaults, } from './definitions/factory';
26
31
  export { canRedoHistory, canUndoHistory, createHistoryState, asEditorBlockId, pushHistoryEntry, redoHistory, replaceHistoryPresent, undoHistory, type HistoryState, type EditorBlockId, } from './ui/editorHistory';
27
32
  export { classifyHistoryShortcut, isNativeHistoryTarget, type HistoryShortcutCommand } from './historyShortcuts';
28
33
  export type { ContentEntryControllerOptions, ContentEntryControllerState, DraftWorkflowStatus, MetadataAutosaveConfig, MetadataKindConfig, } from './types';
@@ -0,0 +1,29 @@
1
+ import type { WorkflowPageDraftContent, WorkflowPagePublishedContent } from '../../api/src/content-editor';
2
+ type PageRouteCanonicalUrl = Readonly<{
3
+ canonicalUrl?: string | null;
4
+ }>;
5
+ export type PageWorkflowDraftSource = Readonly<{
6
+ draftTitle?: string | null;
7
+ draftSlug?: string | null;
8
+ draftStatus?: string | null;
9
+ scheduledPublishAt?: string | null;
10
+ draftMetaTitle?: string | null;
11
+ draftMetaDescription?: string | null;
12
+ canonicalUrl?: string | null;
13
+ ogImageId?: string | null;
14
+ route?: PageRouteCanonicalUrl | null;
15
+ }>;
16
+ export type PageWorkflowPublishedSource = Readonly<{
17
+ title?: string | null;
18
+ slug?: string | null;
19
+ status?: string | null;
20
+ publishedAt?: string | null;
21
+ publishedMetaTitle?: string | null;
22
+ publishedMetaDescription?: string | null;
23
+ canonicalUrl?: string | null;
24
+ ogImageId?: string | null;
25
+ route?: PageRouteCanonicalUrl | null;
26
+ }>;
27
+ export declare function pageWorkflowDraftContent(page: PageWorkflowDraftSource): WorkflowPageDraftContent;
28
+ export declare function pageWorkflowPublishedContent(page: PageWorkflowPublishedSource): WorkflowPagePublishedContent | null;
29
+ export {};
@@ -8,13 +8,13 @@ declare const BaseContentFieldSchema: z.ZodObject<{
8
8
  number: "number";
9
9
  boolean: "boolean";
10
10
  date: "date";
11
+ text: "text";
12
+ textarea: "textarea";
13
+ select: "select";
11
14
  url: "url";
12
15
  media: "media";
13
16
  button: "button";
14
17
  link: "link";
15
- select: "select";
16
- textarea: "textarea";
17
- text: "text";
18
18
  richText: "richText";
19
19
  file: "file";
20
20
  datetime: "datetime";
@@ -18,3 +18,4 @@ export * from './templates/fieldPaths';
18
18
  export * from './templates/bindingValidation';
19
19
  export * from './templates/manifestAdapter';
20
20
  export * from './templates/auditBindings';
21
+ export * from './templates/editorState';
@@ -40,4 +40,8 @@ export declare function fixedPathOrNull(routeTemplate: RouteTemplate): string |
40
40
  /** Returns the first path segment, or undefined when the template has no fixed prefix segment. */
41
41
  export declare function getRouteTemplatePrefix(routeTemplate: RouteTemplate): string | undefined;
42
42
  export declare function expandSlug(routeTemplate: RouteTemplate, slug: string): string;
43
+ export declare function buildContentEntryRoutePath(input: Readonly<{
44
+ routePattern: string | null;
45
+ slug: string;
46
+ }>): string;
43
47
  export declare function describeRouteTemplateParseError(error: RouteTemplateParseError): string;
@@ -0,0 +1,25 @@
1
+ import type { TemplateBindingValue } from './types';
2
+ export type TemplateEditorBindingDescriptor = TemplateBindingValue | Record<string, unknown>;
3
+ export type TemplateEditorBindings = Record<string, TemplateEditorBindingDescriptor>;
4
+ export type TemplateEditorBlockBindings = Record<string, TemplateEditorBindings>;
5
+ export type TemplateEditorBlockBindingSource = Readonly<{
6
+ id: string;
7
+ scope: string;
8
+ bindings?: Record<string, unknown> | null;
9
+ }>;
10
+ export type ParsedTemplateEditorBindings = Readonly<{
11
+ ok: true;
12
+ bindings: TemplateEditorBindings;
13
+ }> | Readonly<{
14
+ ok: false;
15
+ message: string;
16
+ }>;
17
+ export declare function normalizeTemplateEditorBindings(bindings: Record<string, unknown> | null | undefined): TemplateEditorBindings;
18
+ export declare function serializeTemplateEditorBindingsJson(bindings: TemplateEditorBindings): string;
19
+ export declare function parseTemplateEditorBindingsJson(jsonValue: string): ParsedTemplateEditorBindings;
20
+ export declare function mergeTemplateBindingEdits(currentBindings: TemplateEditorBindings, editedBindings: TemplateEditorBindings): TemplateEditorBindings;
21
+ export declare function setTemplateEditorBinding(bindings: TemplateEditorBindings, propId: string, binding: TemplateEditorBindingDescriptor): TemplateEditorBindings;
22
+ export declare function removeTemplateEditorBinding(bindings: TemplateEditorBindings, propId: string): TemplateEditorBindings;
23
+ export declare function createEntryTemplateBindingRecords(blocks: readonly TemplateEditorBlockBindingSource[]): TemplateEditorBlockBindings;
24
+ export declare function setTemplateBlockBinding(allBindings: TemplateEditorBlockBindings, blockId: string, propId: string, binding: TemplateEditorBindingDescriptor): TemplateEditorBlockBindings;
25
+ export declare function removeTemplateBlockBinding(allBindings: TemplateEditorBlockBindings, blockId: string, propId: string): TemplateEditorBlockBindings;
@@ -0,0 +1,10 @@
1
+ import type { CsvCell } from './csv-types';
2
+ export declare const csvEmptyCell: () => CsvCell;
3
+ export declare const csvTextCell: (value: string | null | undefined) => CsvCell;
4
+ export declare const csvIntegerCell: (value: number | null | undefined) => CsvCell;
5
+ export declare const csvDecimalCell: (value: number | null | undefined, decimals: number) => CsvCell;
6
+ export declare const csvMoneyCentsCell: (cents: number | null | undefined, currency: string | null | undefined) => CsvCell;
7
+ export declare const csvIsoDateCell: (value: string | null | undefined) => CsvCell;
8
+ export declare const csvIsoDateTimeCell: (value: string | null | undefined) => CsvCell;
9
+ export declare const csvBooleanCell: (value: boolean | null | undefined) => CsvCell;
10
+ export declare function formatCsvCell(cell: CsvCell): string;
@@ -0,0 +1,27 @@
1
+ import type { CsvExportDatePolicy, CsvExportId, ExportDateBasis, ExportDateFilterError, ExportDateRange, ResolvedExportDateWindow } from './csv-types';
2
+ export type ResolveExportDateWindowInput = Readonly<{
3
+ exportId: CsvExportId;
4
+ policy: CsvExportDatePolicy;
5
+ range: ExportDateRange;
6
+ requestedBasis?: ExportDateBasis;
7
+ timeZone: string;
8
+ today?: Date;
9
+ }>;
10
+ export type ResolveExportDateWindowInputFor<Basis extends ExportDateBasis> = Readonly<{
11
+ exportId: CsvExportId;
12
+ policy: CsvExportDatePolicy<Basis>;
13
+ range: ExportDateRange;
14
+ requestedBasis?: Basis;
15
+ timeZone: string;
16
+ today?: Date;
17
+ }>;
18
+ export type ResolveExportDateWindowResult<Basis extends ExportDateBasis = ExportDateBasis> = Readonly<{
19
+ ok: true;
20
+ window: ResolvedExportDateWindow<Basis>;
21
+ }> | Readonly<{
22
+ ok: false;
23
+ error: ExportDateFilterError;
24
+ }>;
25
+ export declare function resolveExportDateWindow<Basis extends ExportDateBasis>(input: ResolveExportDateWindowInputFor<Basis>): ResolveExportDateWindowResult<Basis>;
26
+ export declare function resolveExportDateWindow(input: ResolveExportDateWindowInput): ResolveExportDateWindowResult;
27
+ export declare function describeExportDateBasis(basis: ExportDateBasis): string;
@@ -0,0 +1 @@
1
+ export declare function csvEscape(value: string): string;