@riverbankcms/sdk 0.144.0 → 0.145.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 (162) hide show
  1. package/dist/{PreviewEditorSidebar-CQZNnFiM.mjs → PreviewEditorSidebar-O-V6Pl5a.mjs} +4 -4
  2. package/dist/{PreviewEditorUI-DCNxnmI0.mjs → PreviewEditorUI-1UlX_9cw.mjs} +3 -3
  3. package/dist/{PreviewQueryProvider-BCYICImX.mjs → PreviewQueryProvider-BxGwdOCV.mjs} +1 -1
  4. package/dist/{SdkPreviewModeRuntime-BJolUbr1.mjs → SdkPreviewModeRuntime-DYbA_4iv.mjs} +419 -348
  5. package/dist/{SiteChromeCustomizeContext-CKgEpoxi.mjs → SiteChromeCustomizeContext-CNTKQ9nx.mjs} +2081 -1313
  6. package/dist/_dts/ai/src/contracts/proposals.d.ts +4719 -66
  7. package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +429 -6
  8. package/dist/_dts/api/src/appointmentEndpointDefinitions.d.ts +49 -0
  9. package/dist/_dts/api/src/appointmentServiceCategoryEndpoints.d.ts +75 -0
  10. package/dist/_dts/api/src/appointmentServiceContracts.d.ts +80 -0
  11. package/dist/_dts/api/src/appointmentSetup.d.ts +8 -1
  12. package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +2 -12
  13. package/dist/_dts/api/src/communications.d.ts +14 -22
  14. package/dist/_dts/api/src/contentRuntime.d.ts +2 -0
  15. package/dist/_dts/api/src/endpoints.d.ts +105 -58
  16. package/dist/_dts/api/src/indexExtendedTypes.d.ts +1 -1
  17. package/dist/_dts/api/src/launchReadiness.d.ts +2 -0
  18. package/dist/_dts/api/src/newsletterEndpointDefinitions.d.ts +0 -23
  19. package/dist/_dts/api/src/onboarding/confirmationResend.d.ts +3 -0
  20. package/dist/_dts/api/src/publicBookingService.d.ts +35 -1
  21. package/dist/_dts/api/src/publicExperience/newsletterEndpoints.d.ts +13 -0
  22. package/dist/_dts/api/src/publicNewsletterEndpointDefinitions.d.ts +58 -0
  23. package/dist/_dts/api/src/schemas/admin-observability-logs.d.ts +3 -3
  24. package/dist/_dts/api/src/siteManagementEndpoints.d.ts +2 -6
  25. package/dist/_dts/api/src/types.d.ts +2 -1
  26. package/dist/_dts/blocks/src/PageRenderer.d.ts +4 -4
  27. package/dist/_dts/blocks/src/bindings/index.d.ts +2 -2
  28. package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +24 -0
  29. package/dist/_dts/blocks/src/index.d.ts +1 -1
  30. package/dist/_dts/blocks/src/pageRenderJoins.d.ts +68 -0
  31. package/dist/_dts/blocks/src/pageRenderPlan.d.ts +8 -27
  32. package/dist/_dts/blocks/src/pageRenderPreparation.d.ts +7 -4
  33. package/dist/_dts/blocks/src/pageRendererBoundaries.d.ts +40 -23
  34. package/dist/_dts/blocks/src/server.d.ts +1 -1
  35. package/dist/_dts/blocks/src/system/blocks/appointment-services.d.ts +2 -0
  36. package/dist/_dts/blocks/src/system/blocks/events/eventSelectionFields.d.ts +2 -2
  37. package/dist/_dts/blocks/src/system/blocks/events/shared/calendarWindow.d.ts +1 -1
  38. package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +2 -2
  39. package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +47 -47
  40. package/dist/_dts/blocks/src/system/manifest/schema.d.ts +29 -3
  41. package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessBookingFlow.d.ts +8 -1
  42. package/dist/_dts/blocks/src/system/runtime/nodes/appointment-services.d.ts +22 -2
  43. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.headless.state.d.ts +3 -1
  44. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.interactive.d.ts +57 -2
  45. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.service-categories.d.ts +29 -0
  46. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.service-choices.d.ts +13 -0
  47. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.state.d.ts +3 -3
  48. package/dist/_dts/blocks/src/system/runtime/nodes/booking-runtime-sources.d.ts +13 -1
  49. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/eventSourceRecovery.d.ts +1 -1
  50. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +3 -3
  51. package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.submission.d.ts +20 -1
  52. package/dist/_dts/content-editor/src/ui/editorSnapshot.d.ts +2 -0
  53. package/dist/_dts/content-model/src/content-types/schema.d.ts +1 -1
  54. package/dist/_dts/core/src/appointment-service-categories.d.ts +108 -0
  55. package/dist/_dts/core/src/editor-state.d.ts +6 -0
  56. package/dist/_dts/core/src/index.d.ts +1 -0
  57. package/dist/_dts/core/src/public-profile.d.ts +9 -0
  58. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +663 -241
  59. package/dist/_dts/editor-blocks/src/block-editor/types.d.ts +6 -0
  60. package/dist/_dts/editor-blocks/src/widgets/site-option-picker/loaders.d.ts +16 -1
  61. package/dist/_dts/editor-blocks/src/widgets/site-option-picker/types.d.ts +13 -0
  62. package/dist/_dts/editor-blocks/src/widgets/site-option-picker/utils.d.ts +29 -0
  63. package/dist/_dts/preview-next/src/client/blocks/BoundaryControl.d.ts +7 -2
  64. package/dist/_dts/preview-next/src/client/blocks/composer/mergeDrafts.d.ts +1 -1
  65. package/dist/_dts/preview-next/src/client/blocks/composer/types.d.ts +1 -0
  66. package/dist/_dts/preview-next/src/client/blocks/previewProjection/applyPreviewProjections.d.ts +1 -3
  67. package/dist/_dts/preview-next/src/client/blocks/previewProjection/runtimeContentDecoration.d.ts +2 -2
  68. package/dist/_dts/preview-next/src/client/blocks/previewProjection/types.d.ts +2 -2
  69. package/dist/_dts/preview-next/src/client/preview/PreviewEntryControllerProvider.d.ts +1 -0
  70. package/dist/_dts/sdk/src/client/runtimeCacheKeys.d.ts +8 -0
  71. package/dist/_dts/sdk/src/client/types.d.ts +1 -1
  72. package/dist/_dts/sdk/src/contracts/index.d.ts +1 -1
  73. package/dist/_dts/sdk/src/contracts/page.d.ts +7 -2
  74. package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +5 -0
  75. package/dist/_dts/sdk/src/manifest/passes/pass1-fields.d.ts +2 -2
  76. package/dist/_dts/sdk/src/public-api/contracts.d.ts +6 -8
  77. package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +2 -2
  78. package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +2 -2
  79. package/dist/_dts/sdk/src/rendering/helpers/loadContent.d.ts +1 -1
  80. package/dist/_dts/sdk/src/rendering/hooks/useContent.d.ts +1 -1
  81. package/dist/_dts/sdk/src/version.d.ts +1 -1
  82. package/dist/_dts/surfaces/src/index.d.ts +1 -0
  83. package/dist/_dts/theme-core/src/layout/boundaryCss.d.ts +3 -0
  84. package/dist/_dts/theme-core/src/site-styles/compositionBudget.d.ts +8 -0
  85. package/dist/_dts/theme-core/src/site-styles/contentTemplateRuntimeCompiler.d.ts +3 -2
  86. package/dist/_dts/theme-core/src/site-styles/designState.d.ts +1 -3
  87. package/dist/_dts/theme-core/src/site-styles/generatedDesignPipeline.d.ts +3 -0
  88. package/dist/_dts/theme-core/src/site-styles/index.d.ts +3 -0
  89. package/dist/_dts/theme-core/src/site-styles/joinTreatment.d.ts +132 -0
  90. package/dist/_dts/theme-core/src/site-styles/pageDesignEditorBoundaries.d.ts +31 -0
  91. package/dist/_dts/theme-core/src/site-styles/pageDesignEditorModel.d.ts +33 -29
  92. package/dist/_dts/theme-core/src/site-styles/pageDesignIntent.d.ts +4 -4
  93. package/dist/_dts/theme-core/src/site-styles/pageFlowPresets.d.ts +36 -0
  94. package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +4 -10
  95. package/dist/_dts/theme-core/src/site-styles/rawStyleFields.d.ts +17 -4
  96. package/dist/_dts/theme-core/src/site-styles/runtimeCompiler.d.ts +20 -74
  97. package/dist/_dts/theme-core/src/site-styles/sectionBoundaryComposition.d.ts +95 -0
  98. package/dist/_dts/theme-core/src/site-styles/sectionTransitions.d.ts +80 -518
  99. package/dist/_dts/theme-core/src/site-styles/siteStyleBlockPolicies.d.ts +9 -4
  100. package/dist/_dts/theme-core/src/site-styles/transitionCatalogue.d.ts +320 -0
  101. package/dist/_dts/theme-core/src/site-styles/types.d.ts +3 -18
  102. package/dist/client/{BookingConsentAgreement-DoAILrkN.mjs → BookingConsentAgreement-DlVOmpW4.mjs} +2 -2
  103. package/dist/client/{DiscountCodeDisclosure-X528hUTf.mjs → DiscountCodeDisclosure-T9q623PQ.mjs} +1 -1
  104. package/dist/client/{EventCombined.client-DSBVwq5m.mjs → EventCombined.client-DnsUeONl.mjs} +6 -6
  105. package/dist/client/{EventListing.client-DmFAX7Vb.mjs → EventListing.client-CNBFqJS4.mjs} +2 -2
  106. package/dist/client/{LeafletStaticMap-BAqXdfhq.mjs → LeafletStaticMap-C7higg52.mjs} +1 -1
  107. package/dist/client/{ThemedButton-BwNFVwi4.mjs → ThemedButton-LAJTNrS8.mjs} +1 -1
  108. package/dist/client/{accordion-DRhMdkbd.mjs → accordion-BcNF9TjX.mjs} +1 -1
  109. package/dist/client/{bookingForm-iJ_nCsNF.mjs → bookingForm-BUaQ3S03.mjs} +142 -50
  110. package/dist/client/bookings.mjs +191 -64
  111. package/dist/client/{carousel-D8zuffZr.mjs → carousel-CTdF6e0V.mjs} +1 -1
  112. package/dist/client/{cart-DeMGJViN.mjs → cart-pGtyf_XU.mjs} +3 -3
  113. package/dist/client/{checkout-DXc06Km2.mjs → checkout-Da9WSn7Y.mjs} +3 -3
  114. package/dist/client/client.mjs +1630 -816
  115. package/dist/client/{context-CDLCfDep.mjs → context-BFeY_Wbm.mjs} +1 -1
  116. package/dist/client/{dates-ClFx7Epy.mjs → dates-BhwVSxDg.mjs} +2 -2
  117. package/dist/client/{eventCalendar-BaGpnOGN.mjs → eventCalendar-BAtdnR4s.mjs} +9 -9
  118. package/dist/client/{eventCombined-ywONOx2m.mjs → eventCombined-RksA3tRC.mjs} +4 -4
  119. package/dist/client/{eventDetails-B2LlOTYY.mjs → eventDetails-BB9hB4wR.mjs} +4 -4
  120. package/dist/client/{eventListing-CMgxWpqP.mjs → eventListing-BpJBkviM.mjs} +4 -4
  121. package/dist/client/{eventRegistration-BarLDNHR.mjs → eventRegistration-B18jFq_o.mjs} +8 -8
  122. package/dist/client/{form-BjqKaBJ7.mjs → form-Dodt8Y8t.mjs} +3 -3
  123. package/dist/client/{headerSection-CP4XDwz1.mjs → headerSection-B0qj9ttg.mjs} +3 -3
  124. package/dist/client/hooks.mjs +550 -99
  125. package/dist/client/{locationMap-C5gW-d-w.mjs → locationMap-gn-iMk7a.mjs} +3 -3
  126. package/dist/client/{newsletterForm-afXlVSA0.mjs → newsletterForm-oByLdFkr.mjs} +26 -5
  127. package/dist/client/{pricing-Bl1CAl28.mjs → pricing-BOU0_Hai.mjs} +1 -1
  128. package/dist/client/{productDetail-CvQ3jWQe.mjs → productDetail-D9v1zH2j.mjs} +3 -3
  129. package/dist/client/{productList-U874PGO7.mjs → productList-D-mItx1n.mjs} +3 -3
  130. package/dist/client/{propsDecoder-DPXtCZWP.mjs → propsDecoder-C3TP_z4x.mjs} +72 -33
  131. package/dist/client/rendering/client.mjs +900 -266
  132. package/dist/client/rendering/islands.mjs +17 -17
  133. package/dist/client/rendering.mjs +1637 -788
  134. package/dist/client/{routeIslandApiConfig-NGYiUWXu.mjs → routeIslandApiConfig-DzN1W0sq.mjs} +1 -1
  135. package/dist/client/{scrollToBlock-0-C3DVhK.mjs → scrollToBlock-CWs8EIdo.mjs} +1 -1
  136. package/dist/client/{shop-BXjXhM9P.mjs → shop-Dufw7N7o.mjs} +7 -7
  137. package/dist/client/{shop-commerce-BZ6UlWJ7.mjs → shop-commerce-gklw_hLF.mjs} +6 -6
  138. package/dist/client/{shop-commerce-store-DlSBXb3D.mjs → shop-commerce-store-Sf1eyTaZ.mjs} +1 -1
  139. package/dist/client/{shopShared-kkEOiLPA.mjs → shopShared-B5nyA41S.mjs} +4 -4
  140. package/dist/client/{useEventFilters-zvnnE1ro.mjs → useEventFilters-CLL829vy.mjs} +6 -6
  141. package/dist/preview-next/before-render.mjs +147 -77
  142. package/dist/preview-next/client/runtime.mjs +4 -4
  143. package/dist/preview-next/keepAlive.mjs +147 -77
  144. package/dist/preview-next/middleware.mjs +147 -77
  145. package/dist/{previewAuthStore-JA6-I_sL.mjs → previewAuthStore-BxAFlu-j.mjs} +147 -77
  146. package/dist/{sdk-runtime-DFJlQt3q.mjs → sdk-runtime-D0uZFev7.mjs} +2 -2
  147. package/dist/{separator-o8GHb1xh.mjs → separator-EvdCAn4V.mjs} +1 -1
  148. package/dist/server/components.mjs +1727 -991
  149. package/dist/server/config-validation.mjs +537 -97
  150. package/dist/server/config.mjs +537 -97
  151. package/dist/server/data.mjs +549 -98
  152. package/dist/server/index.mjs +159 -81
  153. package/dist/server/next.mjs +1460 -748
  154. package/dist/server/page-converter.mjs +384 -54
  155. package/dist/server/prebuild.mjs +1 -1
  156. package/dist/server/rendering/server.mjs +1712 -973
  157. package/dist/server/rendering.mjs +1748 -1001
  158. package/dist/server/routing.mjs +624 -131
  159. package/dist/server/server.mjs +554 -138
  160. package/dist/server/theme-bridge.mjs +1192 -27
  161. package/dist/server/theme.mjs +6 -4
  162. package/package.json +2 -1
@@ -10,6 +10,7 @@ declare const BaseContentFieldSchema: z.ZodObject<{
10
10
  link: "link";
11
11
  date: "date";
12
12
  text: "text";
13
+ group: "group";
13
14
  url: "url";
14
15
  textarea: "textarea";
15
16
  select: "select";
@@ -17,7 +18,6 @@ declare const BaseContentFieldSchema: z.ZodObject<{
17
18
  reference: "reference";
18
19
  repeater: "repeater";
19
20
  file: "file";
20
- group: "group";
21
21
  datetime: "datetime";
22
22
  button: "button";
23
23
  richText: "richText";
@@ -0,0 +1,108 @@
1
+ /**
2
+ * The one grouping authority for appointment-service categories (issue 1403).
3
+ *
4
+ * Every surface that shows services by category — the public services list,
5
+ * the booking selector, the dashboard Services page and the CSV export — goes
6
+ * through `layoutServicesByCategory` rather than deciding grouping itself.
7
+ *
8
+ * Ordering is not decided here. The database owns it (category `sort_order`,
9
+ * then service `sort_order` within its group, with title and id as
10
+ * tie-breakers) and the reads hand both lists over already ordered. This
11
+ * module only buckets, and it preserves input order inside every bucket, so a
12
+ * client never re-sorts into an order the reorder compare-and-swap would not
13
+ * recognise.
14
+ */
15
+ /** What a visitor may know about a category: its heading and optional intro. */
16
+ export type ServiceCategorySummary = Readonly<{
17
+ id: string;
18
+ name: string;
19
+ description: string | null;
20
+ }>;
21
+ /** Anything carrying the category it belongs to; null is the "Other" group. */
22
+ export type CategorizedService = Readonly<{
23
+ categoryId: string | null;
24
+ }>;
25
+ export type ServiceCategoryGroup<TService, TCategory extends Readonly<{
26
+ id: string;
27
+ }> = ServiceCategorySummary> = Readonly<{
28
+ category: TCategory;
29
+ services: readonly TService[];
30
+ }>;
31
+ /**
32
+ * `uncategorized-site` means there is nothing to group by, so the list stays
33
+ * flat exactly as before categories existed. That is when the site has **no
34
+ * categories at all**, decided by the category list and never inferred from
35
+ * which categories the services happen to reference. On public surfaces
36
+ * (`keepEmptyGroups: false`) it is also when no category has any of the
37
+ * listed services, so visitors never see a lone "Other" heading (W20).
38
+ *
39
+ * `categorized-site` carries the groups in category order and `other`, the
40
+ * uncategorised services, which always sort last. `other` may be empty:
41
+ * whether an empty Other is shown is the caller's decision (the public list
42
+ * omits it, the dashboard always shows it).
43
+ */
44
+ export type ServiceCategoryLayout<TService, TCategory extends Readonly<{
45
+ id: string;
46
+ }> = ServiceCategorySummary> = Readonly<{
47
+ kind: 'uncategorized-site';
48
+ services: readonly TService[];
49
+ }> | Readonly<{
50
+ kind: 'categorized-site';
51
+ groups: readonly ServiceCategoryGroup<TService, TCategory>[];
52
+ other: readonly TService[];
53
+ }>;
54
+ export type LayoutServicesByCategoryOptions = Readonly<{
55
+ /**
56
+ * Public surfaces drop categories with no services. The dashboard keeps
57
+ * them so it can show "No services in this category yet".
58
+ */
59
+ keepEmptyGroups: boolean;
60
+ }>;
61
+ /**
62
+ * Groups services under their categories.
63
+ *
64
+ * A service whose `categoryId` names no category in `categories` lands in
65
+ * Other. The composite foreign key keeps that from happening with stored data,
66
+ * so this is only the total, safe answer for a caller holding a stale list.
67
+ */
68
+ export declare function layoutServicesByCategory<TService extends CategorizedService, TCategory extends Readonly<{
69
+ id: string;
70
+ }>>(categories: readonly TCategory[], services: readonly TService[], options: LayoutServicesByCategoryOptions): ServiceCategoryLayout<TService, TCategory>;
71
+ /** The services in display order: each group in turn, then Other. */
72
+ export declare function flattenServiceCategoryLayout<TService, TCategory extends Readonly<{
73
+ id: string;
74
+ }>>(layout: ServiceCategoryLayout<TService, TCategory>): TService[];
75
+ /**
76
+ * What a block filtered to (at most) one category should show.
77
+ *
78
+ * - `all`: no filter is set, so every non-empty group shows, Other last.
79
+ * - `single`: the filter names one of the site's categories. The group can be
80
+ * empty, which the caller renders as its empty state.
81
+ * - `fallback-all`: the filter names a category the site no longer has (it was
82
+ * deleted), so everything shows, grouped. This is a first-class state rather
83
+ * than a null check so the editor can warn about it.
84
+ */
85
+ export type ServiceCategoryView<TService, TCategory extends Readonly<{
86
+ id: string;
87
+ }> = ServiceCategorySummary> = Readonly<{
88
+ kind: 'all';
89
+ layout: ServiceCategoryLayout<TService, TCategory>;
90
+ }> | Readonly<{
91
+ kind: 'single';
92
+ group: ServiceCategoryGroup<TService, TCategory>;
93
+ }> | Readonly<{
94
+ kind: 'fallback-all';
95
+ missingCategoryId: string;
96
+ layout: ServiceCategoryLayout<TService, TCategory>;
97
+ }>;
98
+ /**
99
+ * Selects the public view for an optional category filter.
100
+ *
101
+ * It takes the category and service lists rather than a prebuilt layout
102
+ * because the public layout has already dropped empty categories, and then an
103
+ * empty category (`single` with no services) could not be told apart from a
104
+ * deleted one (`fallback-all`).
105
+ */
106
+ export declare function selectCategoryView<TService extends CategorizedService, TCategory extends Readonly<{
107
+ id: string;
108
+ }>>(categories: readonly TCategory[], services: readonly TService[], filterCategoryId: string | null | undefined): ServiceCategoryView<TService, TCategory>;
@@ -63,6 +63,12 @@ export type EditorBlockPublishedBaselineInput = Readonly<{
63
63
  }>;
64
64
  export type EditorPersistedBlock = Readonly<{
65
65
  id: EditorBlockId;
66
+ /**
67
+ * The content version the block was loaded with. Runtime blocks that
68
+ * submit to the API (newsletter signup) cite it so the server can verify
69
+ * the placement, so the editor must carry it rather than strip it.
70
+ */
71
+ contentVersionId?: string | null;
66
72
  kind: string;
67
73
  content: EditorBlockValues | null;
68
74
  orderIndex: number | null;
@@ -18,6 +18,7 @@ export * from './booking-refunds';
18
18
  export * from './booking-instalments';
19
19
  export * from './booking-date-time';
20
20
  export * from './booking-consent';
21
+ export * from './appointment-service-categories';
21
22
  export * from './dated-offering-settlement';
22
23
  export * from './person-records';
23
24
  export * from './rectification';
@@ -104,4 +104,13 @@ export declare function parsePublicProfile(value: unknown): Result<PublicProfile
104
104
  * holds a business address for every profile saved before the switch existed.
105
105
  */
106
106
  export declare function resolvePublicProfilePremises(profile: PublicProfile, hasBusinessAddress: boolean): boolean;
107
+ /**
108
+ * The contact details the site may publish: the stored contact with every
109
+ * hidden method removed, or null when nothing is left to show.
110
+ *
111
+ * Every public reader goes through this. The privacy policy identity is the
112
+ * one exception and reads the stored email directly, because a hidden email
113
+ * can still be the policy's contact.
114
+ */
115
+ export declare function publishedContactDetails(profile: Pick<PublicProfile, 'contact' | 'contactVisibility'>): PublicContactDetails | null;
107
116
  export declare function emptyPublicProfile(): PublicProfile;