@riverbankcms/sdk 0.98.0 → 0.99.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 (120) hide show
  1. package/dist/{PreviewEditorSidebar-CG3SSJND.mjs → PreviewEditorSidebar-TPOKCCKY.mjs} +3 -3
  2. package/dist/{PreviewEditorUI-RHNGKAAU.mjs → PreviewEditorUI-Y347GLC2.mjs} +3 -3
  3. package/dist/SdkPreviewModeRuntime-OGTXRQ4M.mjs +8 -0
  4. package/dist/_dts/ai/src/contracts/proposals.d.ts +36 -36
  5. package/dist/_dts/api/src/billing.d.ts +2 -0
  6. package/dist/_dts/api/src/commercePortalEndpoints.d.ts +5 -1
  7. package/dist/_dts/api/src/endpoints.d.ts +8 -0
  8. package/dist/_dts/api/src/index.d.ts +1 -1
  9. package/dist/_dts/api/src/siteOperations.d.ts +65 -1
  10. package/dist/_dts/billing/src/site-arrangements.d.ts +151 -0
  11. package/dist/_dts/billing/src/subscriptions/store.d.ts +2 -0
  12. package/dist/_dts/block-form/src/widgets/RepeaterField/utils/resolveThumbnail.d.ts +2 -1
  13. package/dist/_dts/blocks/src/PageRenderer.d.ts +6 -0
  14. package/dist/_dts/blocks/src/system/runtime/components/booking/DatePicker.d.ts +6 -2
  15. package/dist/_dts/blocks/src/system/runtime/components/booking/SuccessMessage.d.ts +3 -1
  16. package/dist/_dts/blocks/src/system/runtime/components/booking/TimeSlotSelector.d.ts +10 -4
  17. package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessBookingFlow.state.d.ts +2 -2
  18. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.headless.state.d.ts +11 -0
  19. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/StepIndicator.d.ts +3 -1
  20. package/dist/_dts/blocks/src/system/runtime/shared/components/FeedbackMessage.d.ts +2 -1
  21. package/dist/_dts/blocks/src/system/runtime/{nodes/event-registration → shared/components}/SelectableOptionCard.d.ts +11 -2
  22. package/dist/_dts/blocks/src/system/runtime/shared/components/StepIndicator.d.ts +16 -5
  23. package/dist/_dts/blocks/src/system/runtime/shared/components/index.d.ts +2 -0
  24. package/dist/_dts/blocks/src/system/runtime/shared/index.d.ts +2 -2
  25. package/dist/_dts/blocks/src/utils/date-formatting.d.ts +17 -1
  26. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +274 -30
  27. package/dist/_dts/sdk/src/__mocks__/next-cache.d.ts +1 -1
  28. package/dist/_dts/sdk/src/cli/commands/push.d.ts +13 -0
  29. package/dist/_dts/sdk/src/cli/merge-remote/entryMergeReport.d.ts +6 -18
  30. package/dist/_dts/sdk/src/cli/merge-remote/entrySnapshots.d.ts +2 -4
  31. package/dist/_dts/sdk/src/cli/merge-remote/pageMergeReport.d.ts +6 -18
  32. package/dist/_dts/sdk/src/cli/merge-remote/pageSnapshots.d.ts +2 -4
  33. package/dist/_dts/sdk/src/cli/merge-remote/sharedBaseSnapshots.d.ts +32 -0
  34. package/dist/_dts/sdk/src/cli/merge-remote/sharedMergePlan.d.ts +27 -0
  35. package/dist/_dts/sdk/src/cli/merge-remote/sharedMergeReport.d.ts +63 -0
  36. package/dist/_dts/sdk/src/client/index.d.ts +6 -0
  37. package/dist/_dts/sdk/src/data/prefetchBlockData.d.ts +6 -1
  38. package/dist/_dts/sdk/src/next/types.d.ts +19 -0
  39. package/dist/_dts/sdk/src/prebuild/loader.d.ts +8 -1
  40. package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +2 -0
  41. package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +4 -0
  42. package/dist/_dts/sdk/src/rendering/helpers/loadContent.d.ts +6 -0
  43. package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +8 -0
  44. package/dist/_dts/sdk/src/rendering/index.d.ts +7 -7
  45. package/dist/_dts/sdk/src/rendering/overrides.d.ts +2 -0
  46. package/dist/_dts/sdk/src/routing/resolveRoute.d.ts +18 -0
  47. package/dist/_dts/sdk/src/test/apiClient.d.ts +17 -0
  48. package/dist/_dts/sdk/src/test/bunDom.setup.d.ts +1 -0
  49. package/dist/_dts/sdk/src/test/env.d.ts +4 -0
  50. package/dist/_dts/sdk/src/version.d.ts +1 -1
  51. package/dist/_dts/site-commands/src/commands.d.ts +3 -3
  52. package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
  53. package/dist/_dts/theme-core/src/interactive/generateBaseCSS.d.ts +6 -0
  54. package/dist/_dts/theme-core/src/status/contextualColors.d.ts +6 -0
  55. package/dist/_dts/theme-core/src/status/index.d.ts +1 -0
  56. package/dist/{chunk-H24OU7WG.mjs → chunk-4HXF2QLH.mjs} +2 -2
  57. package/dist/{chunk-QPXE2OUZ.mjs → chunk-EMJIT3ZJ.mjs} +1 -1
  58. package/dist/{chunk-PKDPQHB5.mjs → chunk-PM7HGDHM.mjs} +2 -2
  59. package/dist/{chunk-DBRI3PQF.mjs → chunk-XO34WBBP.mjs} +1383 -1143
  60. package/dist/{chunk-6WDBXCPX.mjs → chunk-YGTTEVUM.mjs} +7 -7
  61. package/dist/{chunk-V2BYFSPW.mjs → chunk-YWTCCOSF.mjs} +8 -0
  62. package/dist/cli/index.mjs +1010 -921
  63. package/dist/client/{accordion-Q2BDNL53.mjs → accordion-QSUEYL4L.mjs} +2 -2
  64. package/dist/client/{bookingForm-ZMP4P7EK.mjs → bookingForm-QYGAHPDP.mjs} +364 -300
  65. package/dist/client/bookings.mjs +697 -411
  66. package/dist/client/{carousel-LW3UXPWO.mjs → carousel-SM2LEWAU.mjs} +3 -3
  67. package/dist/client/{cart-Z6D3KS6K.mjs → cart-3N3SFKNQ.mjs} +7 -7
  68. package/dist/client/{checkout-YMT2QJQM.mjs → checkout-YFAYPKPZ.mjs} +7 -7
  69. package/dist/client/{chunk-XNTHVZ25.mjs → chunk-5DLGREUB.mjs} +1 -1
  70. package/dist/client/{chunk-SK2BMD22.mjs → chunk-CLZ7NBSP.mjs} +147 -75
  71. package/dist/client/{chunk-R4XK3CKR.mjs → chunk-CYJ3MUFP.mjs} +6 -5
  72. package/dist/client/{chunk-JNE6UI6U.mjs → chunk-H3H3ODO7.mjs} +1 -1
  73. package/dist/client/{chunk-IEOECM7U.mjs → chunk-HPEQ4YWW.mjs} +28 -73
  74. package/dist/client/{chunk-PCHACQEB.mjs → chunk-IIUIKJ4K.mjs} +15 -7
  75. package/dist/client/{chunk-KDP7ZRZV.mjs → chunk-IOAHWAQG.mjs} +2 -0
  76. package/dist/client/{chunk-26ZBRXFR.mjs → chunk-JTKBF3W2.mjs} +3 -3
  77. package/dist/client/{chunk-OLAOAZEO.mjs → chunk-K7KTSACR.mjs} +1 -1
  78. package/dist/client/{chunk-ET2MDQQT.mjs → chunk-R32M5HFS.mjs} +6 -6
  79. package/dist/client/{chunk-DRRQ7QSL.mjs → chunk-WEVT46PX.mjs} +3 -3
  80. package/dist/client/{chunk-HBQEAOG4.mjs → chunk-ZU65LTI3.mjs} +1 -1
  81. package/dist/client/client.mjs +1875 -1581
  82. package/dist/client/{courseRegistration-DGKCMC77.mjs → courseRegistration-LYBE7VVK.mjs} +7 -7
  83. package/dist/client/{eventCalendar-74Z2NNFM.mjs → eventCalendar-FMTB75X6.mjs} +9 -9
  84. package/dist/client/{eventCombined-GK2ODOX2.mjs → eventCombined-E4LUCJXT.mjs} +9 -9
  85. package/dist/client/{eventDetails-MONAGT3N.mjs → eventDetails-GELSRR4Z.mjs} +9 -9
  86. package/dist/client/{eventListing-SKGAO6PS.mjs → eventListing-TB623B6R.mjs} +9 -9
  87. package/dist/client/{eventRegistration-6KISGXRD.mjs → eventRegistration-NRIKHXTI.mjs} +9 -9
  88. package/dist/client/{form-FXPRTXHI.mjs → form-Y4U4IAXE.mjs} +3 -3
  89. package/dist/client/{headerSection-7NAN5WNB.mjs → headerSection-QSOVV5P7.mjs} +3 -3
  90. package/dist/client/hooks.mjs +115 -21
  91. package/dist/client/{locationMap-UERN74U4.mjs → locationMap-QYCAHH7H.mjs} +3 -3
  92. package/dist/client/{newsletterForm-SGWXMJ7U.mjs → newsletterForm-NWHY5TBY.mjs} +3 -3
  93. package/dist/client/{productDetail-HN3HWZQZ.mjs → productDetail-FYDMU2CE.mjs} +7 -7
  94. package/dist/client/{productList-YT22Z5UR.mjs → productList-D76CGACQ.mjs} +7 -7
  95. package/dist/client/rendering/client.mjs +1209 -975
  96. package/dist/client/rendering/islands.mjs +19 -19
  97. package/dist/client/rendering.mjs +1952 -1638
  98. package/dist/client/{shop-TKEDNWUS.mjs → shop-SOUACT5N.mjs} +7 -7
  99. package/dist/preview-next/before-render.mjs +8 -0
  100. package/dist/preview-next/client/runtime.mjs +5 -5
  101. package/dist/preview-next/middleware.mjs +8 -0
  102. package/dist/{sdk-runtime-LWNYCQF2.mjs → sdk-runtime-XPVE3LBA.mjs} +6 -6
  103. package/dist/server/components.mjs +917 -765
  104. package/dist/server/config-validation.mjs +100 -19
  105. package/dist/server/config.mjs +100 -19
  106. package/dist/server/data.mjs +115 -21
  107. package/dist/server/index.mjs +59 -25
  108. package/dist/server/next.mjs +1017 -816
  109. package/dist/server/page-converter.mjs +92 -19
  110. package/dist/server/prebuild-loader.mjs +42 -23
  111. package/dist/server/prebuild.mjs +1 -1
  112. package/dist/server/rendering/server.mjs +932 -767
  113. package/dist/server/rendering.mjs +968 -776
  114. package/dist/server/routing.mjs +162 -36
  115. package/dist/server/server.mjs +156 -32
  116. package/dist/server/theme-bridge.mjs +597 -505
  117. package/dist/server/theme.mjs +5 -4
  118. package/dist/styles/index.css +499 -490
  119. package/package.json +6 -4
  120. package/dist/SdkPreviewModeRuntime-OV5PNJBB.mjs +0 -8
@@ -1,5 +1,6 @@
1
1
  import type { AppointmentBookingQuestionsTask } from "./bookingOperations";
2
2
  import type { SiteRole } from "./siteMembers";
3
+ import type { AdminManagedSubscriptionActionChoice, ManagedManualBillingReason, SiteBillingArrangement, SiteBillingArrangementKind, SiteBillingArrangementSubscriptionAction, SiteBillingManualReviewPayload, SiteBillingManualReviewResolutionAction, SiteBillingManualReviewStatus } from "../../billing/src/site-arrangements";
3
4
  /**
4
5
  * Site Operations Contracts
5
6
  *
@@ -70,8 +71,12 @@ export type AdminSiteCostResponse = {
70
71
  site: {
71
72
  id: string;
72
73
  name: string;
74
+ arrangement: SiteBillingArrangement;
75
+ arrangementKind: SiteBillingArrangementKind;
73
76
  monthlyCostCents: number;
74
77
  billingStartsAt: string | null;
78
+ manualReason: ManagedManualBillingReason | null;
79
+ manualNote: string | null;
75
80
  formattedCost: string;
76
81
  };
77
82
  owner: {
@@ -88,10 +93,46 @@ export type AdminSiteCostResponse = {
88
93
  formattedPreviousCost: string;
89
94
  formattedNewCost: string;
90
95
  }>;
96
+ arrangementHistory: Array<{
97
+ id: string;
98
+ previousArrangement: SiteBillingArrangementKind;
99
+ newArrangement: SiteBillingArrangementKind;
100
+ previousCostCents: number;
101
+ newCostCents: number;
102
+ previousManualReason: ManagedManualBillingReason | null;
103
+ newManualReason: ManagedManualBillingReason | null;
104
+ previousManualNote: string | null;
105
+ newManualNote: string | null;
106
+ changedBy: string;
107
+ reason: string | null;
108
+ subscriptionAction: SiteBillingArrangementSubscriptionAction;
109
+ subscriptionActionResult: unknown;
110
+ createdAt: string;
111
+ formattedPreviousCost: string;
112
+ formattedNewCost: string;
113
+ }>;
114
+ manualReviews: AdminSiteCostManualReview[];
91
115
  };
92
- export type AdminUpdateSiteCostRequest = {
116
+ export type AdminSiteCostManualReview = SiteBillingManualReviewPayload & {
117
+ id: string;
118
+ status: SiteBillingManualReviewStatus;
119
+ resolutionAction: SiteBillingManualReviewResolutionAction | null;
120
+ createdAt: string;
121
+ };
122
+ export type AdminSiteBillingArrangementRequest = {
123
+ tag: "self_serve";
124
+ } | {
125
+ tag: "managed_platform_subscription";
93
126
  monthlyCostCents: number;
94
127
  billingStartsAt?: string | null;
128
+ } | {
129
+ tag: "managed_manual";
130
+ reason: ManagedManualBillingReason;
131
+ note?: string | null;
132
+ };
133
+ export type AdminUpdateSiteCostRequest = {
134
+ arrangement: AdminSiteBillingArrangementRequest;
135
+ subscriptionAction?: AdminManagedSubscriptionActionChoice;
95
136
  reason?: string;
96
137
  };
97
138
  export type AdminSiteCostUpdateSyncResult = {
@@ -106,6 +147,15 @@ export type AdminSiteCostUpdateSyncResult = {
106
147
  } | {
107
148
  status: "failed";
108
149
  message: string;
150
+ } | {
151
+ status: "cancelled";
152
+ message: null;
153
+ } | {
154
+ status: "scheduled_cancel_at_period_end";
155
+ message: null;
156
+ } | {
157
+ status: "manual_review_required";
158
+ message: string;
109
159
  };
110
160
  export type AdminUpdateSiteCostResponse = AdminSiteCostResponse & {
111
161
  subscriptionSync: AdminSiteCostUpdateSyncResult;
@@ -120,6 +170,20 @@ export type AdminScheduleBillingComponentEndResponse = {
120
170
  endsAt: string;
121
171
  };
122
172
  };
173
+ export type AdminResolveSiteBillingManualReviewRequest = {
174
+ resolutionAction: SiteBillingManualReviewResolutionAction;
175
+ resolutionNote: string;
176
+ };
177
+ export type AdminResolveSiteBillingManualReviewResponse = {
178
+ review: {
179
+ id: string;
180
+ status: SiteBillingManualReviewStatus;
181
+ resolutionAction: SiteBillingManualReviewResolutionAction | null;
182
+ resolvedAt: string | null;
183
+ resolvedBy: string | null;
184
+ resolutionNote: string | null;
185
+ };
186
+ };
123
187
  export type ListGscPropertiesAdminResponse = {
124
188
  properties: Array<{
125
189
  id: string;
@@ -0,0 +1,151 @@
1
+ import { type PositiveCents, type Result } from '../../core/src/index';
2
+ export declare const SITE_BILLING_ARRANGEMENT_KINDS: readonly ["self_serve", "managed_platform_subscription", "managed_manual"];
3
+ export type SiteBillingArrangementKind = (typeof SITE_BILLING_ARRANGEMENT_KINDS)[number];
4
+ export declare const MANAGED_MANUAL_BILLING_REASONS: readonly ["bank_transfer", "testing_exchange", "complimentary", "other"];
5
+ export type ManagedManualBillingReason = (typeof MANAGED_MANUAL_BILLING_REASONS)[number];
6
+ export type SiteBillingArrangement = Readonly<{
7
+ tag: 'self_serve';
8
+ }> | Readonly<{
9
+ tag: 'managed_platform_subscription';
10
+ monthlyCostCents: PositiveCents;
11
+ billingStartsAt: string | null;
12
+ }> | Readonly<{
13
+ tag: 'managed_manual';
14
+ reason: ManagedManualBillingReason;
15
+ note: string | null;
16
+ }>;
17
+ export type SiteBillingArrangementRow = Readonly<{
18
+ siteBillingArrangement: string | null | undefined;
19
+ monthlyCostCents: number | null | undefined;
20
+ billingStartsAt: string | null | undefined;
21
+ siteBillingManualReason?: string | null | undefined;
22
+ siteBillingManualNote?: string | null | undefined;
23
+ }>;
24
+ export type SiteBillingArrangementParseError = Readonly<{
25
+ kind: 'unknown_arrangement';
26
+ value: string | null | undefined;
27
+ }> | Readonly<{
28
+ kind: 'invalid_platform_cost';
29
+ value: number | null | undefined;
30
+ }> | Readonly<{
31
+ kind: 'unexpected_platform_fields_for_self_serve';
32
+ }> | Readonly<{
33
+ kind: 'missing_manual_reason';
34
+ }> | Readonly<{
35
+ kind: 'unknown_manual_reason';
36
+ value: string | null | undefined;
37
+ }> | Readonly<{
38
+ kind: 'unexpected_platform_fields_for_manual';
39
+ }> | Readonly<{
40
+ kind: 'unexpected_manual_fields_for_non_manual';
41
+ }>;
42
+ export type SiteBillingArrangementStorageFields = Readonly<{
43
+ siteBillingArrangement: SiteBillingArrangementKind;
44
+ monthlyCostCents: number;
45
+ billingStartsAt: string | null;
46
+ siteBillingManualReason: ManagedManualBillingReason | null;
47
+ siteBillingManualNote: string | null;
48
+ }>;
49
+ export type BillingSubscriptionOrigin = 'self_serve_plan' | 'managed_site_aggregate';
50
+ export declare const BILLING_SUBSCRIPTION_ORIGINS: readonly ["self_serve_plan", "managed_site_aggregate"];
51
+ export type AdminManagedSubscriptionActionChoice = 'cancel_immediately' | 'cancel_at_period_end' | 'manual_review';
52
+ export type ActiveSiteLinkedPlatformAddOn = Readonly<{
53
+ id: string;
54
+ kind: string;
55
+ }>;
56
+ export type SiteBillingSubscriptionSnapshot = Readonly<{
57
+ id: string;
58
+ origin: BillingSubscriptionOrigin | null;
59
+ status: string;
60
+ }> | null;
61
+ export type SiteBillingManualReviewReason = 'ambiguous_subscription_origin' | 'active_site_linked_add_on' | 'admin_requested_manual_review' | 'missing_admin_subscription_choice' | 'subscription_action_failed';
62
+ export declare const SITE_BILLING_MANUAL_REVIEW_REASONS: readonly ["ambiguous_subscription_origin", "active_site_linked_add_on", "admin_requested_manual_review", "missing_admin_subscription_choice", "subscription_action_failed"];
63
+ export type SiteBillingManualReviewStatus = 'open' | 'resolved';
64
+ export declare const SITE_BILLING_MANUAL_REVIEW_STATUSES: readonly ["open", "resolved"];
65
+ export type SiteBillingManualReviewResolutionAction = 'external_action_completed' | 'no_action_needed' | 'duplicate' | 'superseded_by_arrangement_change' | 'accepted_risk';
66
+ export declare const SITE_BILLING_MANUAL_REVIEW_RESOLUTION_ACTIONS: readonly ["external_action_completed", "no_action_needed", "duplicate", "superseded_by_arrangement_change", "accepted_risk"];
67
+ export type SiteBillingManualReviewFailureAction = 'cancel_immediately' | 'cancel_at_period_end' | 'sync_existing_subscription' | 'post_stripe_arrangement_update_failed';
68
+ export type SiteBillingManualReviewDetailsByReason = Readonly<{
69
+ ambiguous_subscription_origin: Readonly<{
70
+ subscriptionId: string | null;
71
+ }>;
72
+ active_site_linked_add_on: Readonly<{
73
+ activeAddOnIds: readonly string[];
74
+ }>;
75
+ admin_requested_manual_review: Readonly<{
76
+ subscriptionId: string | null;
77
+ }>;
78
+ missing_admin_subscription_choice: Readonly<{
79
+ subscriptionId: string | null;
80
+ }>;
81
+ subscription_action_failed: Readonly<{
82
+ action: SiteBillingManualReviewFailureAction;
83
+ error: string;
84
+ stripeSubscriptionId: string | null;
85
+ externalActionCompleted?: boolean;
86
+ transitionAttemptId?: string | null;
87
+ }>;
88
+ }>;
89
+ export type SiteBillingManualReviewPayload = {
90
+ [TReason in SiteBillingManualReviewReason]: Readonly<{
91
+ reason: TReason;
92
+ details: SiteBillingManualReviewDetailsByReason[TReason];
93
+ }>;
94
+ }[SiteBillingManualReviewReason];
95
+ export type SiteBillingArrangementPlanManualReviewReason = Exclude<SiteBillingManualReviewReason, 'subscription_action_failed'>;
96
+ export type SiteBillingArrangementSubscriptionAction = 'not_applicable' | 'sync_attempted' | 'cancelled_immediately' | 'scheduled_cancel_at_period_end' | 'manual_review_required' | 'failed';
97
+ export declare const SITE_BILLING_ARRANGEMENT_SUBSCRIPTION_ACTIONS: readonly ["not_applicable", "sync_attempted", "cancelled_immediately", "scheduled_cancel_at_period_end", "manual_review_required", "failed"];
98
+ export type SiteBillingTransitionAttemptStatus = 'pending_external_action' | 'external_action_succeeded' | 'finalized' | 'failed';
99
+ export declare const SITE_BILLING_TRANSITION_ATTEMPT_STATUSES: readonly ["pending_external_action", "external_action_succeeded", "finalized", "failed"];
100
+ export type SiteBillingArrangementChangePlan = Readonly<{
101
+ tag: 'no_stripe_action';
102
+ }> | Readonly<{
103
+ tag: 'sync_existing_subscription';
104
+ }> | Readonly<{
105
+ tag: 'cancel_managed_site_subscription';
106
+ timing: 'immediate' | 'period_end';
107
+ subscriptionId: string;
108
+ }> | Readonly<{
109
+ tag: 'manual_review_required';
110
+ reason: SiteBillingArrangementPlanManualReviewReason;
111
+ subscriptionId?: string;
112
+ activeAddOnIds?: readonly string[];
113
+ }>;
114
+ export declare function isSiteBillingArrangementKind(value: string | null | undefined): value is SiteBillingArrangementKind;
115
+ export declare function isManagedManualBillingReason(value: string | null | undefined): value is ManagedManualBillingReason;
116
+ export declare function isBillingSubscriptionOrigin(value: string | null | undefined): value is BillingSubscriptionOrigin;
117
+ export declare function isSiteBillingArrangementSubscriptionAction(value: string | null | undefined): value is SiteBillingArrangementSubscriptionAction;
118
+ export declare function isSiteBillingManualReviewReason(value: string | null | undefined): value is SiteBillingManualReviewReason;
119
+ export declare function isSiteBillingManualReviewStatus(value: string | null | undefined): value is SiteBillingManualReviewStatus;
120
+ export declare function isSiteBillingManualReviewResolutionAction(value: string | null | undefined): value is SiteBillingManualReviewResolutionAction;
121
+ export declare function isSiteBillingTransitionAttemptStatus(value: string | null | undefined): value is SiteBillingTransitionAttemptStatus;
122
+ export declare function normalizeSiteBillingManualReviewPayload(payload: SiteBillingManualReviewPayload): SiteBillingManualReviewPayload;
123
+ export declare function parseSiteBillingArrangement(row: SiteBillingArrangementRow): Result<SiteBillingArrangement, SiteBillingArrangementParseError>;
124
+ export declare function unwrapSiteBillingArrangement(row: SiteBillingArrangementRow): SiteBillingArrangement;
125
+ export declare function siteBillingArrangementToStorage(arrangement: SiteBillingArrangement): SiteBillingArrangementStorageFields;
126
+ export declare function getSiteBillingArrangementKind(arrangement: SiteBillingArrangement): SiteBillingArrangementKind;
127
+ export declare function grantsStudioEquivalentEntitlements(arrangement: SiteBillingArrangement): boolean;
128
+ export declare function isManagedSiteArrangement(arrangement: SiteBillingArrangement): boolean;
129
+ export declare function isPlatformCollectedManagedSite(arrangement: SiteBillingArrangement): arrangement is Extract<SiteBillingArrangement, {
130
+ tag: 'managed_platform_subscription';
131
+ }>;
132
+ export declare function requiresSiteBillingCheckout(arrangement: SiteBillingArrangement): boolean;
133
+ export declare function countsAsSelfServeMacadamiaSite(arrangement: SiteBillingArrangement): boolean;
134
+ export declare function toChargeableManagedSiteCost(site: Readonly<{
135
+ siteId: string;
136
+ siteName: string;
137
+ arrangement: SiteBillingArrangement;
138
+ }>): Readonly<{
139
+ siteId: string;
140
+ siteName: string;
141
+ monthlyCostCents: number;
142
+ billingStartsAt: string | null;
143
+ }> | null;
144
+ export declare function planSiteBillingArrangementChange(input: Readonly<{
145
+ previous: SiteBillingArrangement;
146
+ next: SiteBillingArrangement;
147
+ subscription: SiteBillingSubscriptionSnapshot;
148
+ activeSiteLinkedAddOns: readonly ActiveSiteLinkedPlatformAddOn[];
149
+ adminSubscriptionAction?: AdminManagedSubscriptionActionChoice | null;
150
+ }>): SiteBillingArrangementChangePlan;
151
+ export declare function isSubscriptionActiveForArrangementPlanning(status: string): boolean;
@@ -1,10 +1,12 @@
1
1
  import type { BillingInterval } from '../plans/types';
2
+ import type { BillingSubscriptionOrigin } from '../site-arrangements';
2
3
  export type SubscriptionStatus = 'incomplete' | 'trialing' | 'active' | 'past_due' | 'canceled' | 'unpaid';
3
4
  export interface SubscriptionRecord {
4
5
  id: string;
5
6
  userId: string;
6
7
  customerId: string;
7
8
  planId: string;
9
+ origin: BillingSubscriptionOrigin | null;
8
10
  interval: BillingInterval;
9
11
  status: SubscriptionStatus;
10
12
  currentPeriodEnd: string;
@@ -1,7 +1,8 @@
1
- import { type ResolveImageUrlContext } from '../../../../../blocks/src/index';
1
+ import { resolveImageUrlWithContext, type ResolveImageUrlContext } from '../../../../../blocks/src/index';
2
2
  type ResolveRepeaterThumbnailOptions = {
3
3
  siteId?: string;
4
4
  imageResolveContext?: ResolveImageUrlContext;
5
+ resolveImageUrl?: typeof resolveImageUrlWithContext;
5
6
  };
6
7
  export type ResolvedRepeaterThumbnail = {
7
8
  src: string | null;
@@ -50,6 +50,8 @@ type PageRendererDataContext = {
50
50
  occurrenceContext?: OccurrenceContextData | null;
51
51
  entrySubrouteContext?: EntrySubrouteContextData | null;
52
52
  contentEntry?: Record<string, unknown> | null;
53
+ pageSurface?: Record<string, unknown> | null;
54
+ subject?: unknown;
53
55
  editableRouteMetadataFieldIds?: ReadonlyArray<string> | null;
54
56
  supabaseUrl?: string;
55
57
  mediaAssets?: readonly MediaAssetIndexItem[];
@@ -104,6 +106,10 @@ export type BlockOverrideProps<TContent = Record<string, unknown>> = {
104
106
  entrySubrouteContext?: EntrySubrouteContextData | null;
105
107
  /** Content entry context for template-aware block overrides. */
106
108
  contentEntry?: Record<string, unknown> | null;
109
+ /** Native page-surface context for template-aware block overrides. */
110
+ pageSurface?: Record<string, unknown> | null;
111
+ /** Subject descriptor for native page-surface block overrides. */
112
+ subject?: unknown;
107
113
  /** Supabase project URL (useful for media URL resolution in override components) */
108
114
  supabaseUrl?: string;
109
115
  /** Full image-resolution context including canonical media sidecars. */
@@ -1,8 +1,10 @@
1
1
  /**
2
2
  * DatePicker Component
3
3
  *
4
- * Displays a dropdown for selecting an appointment date from available dates.
5
- * Supports loading states, empty states, and progressive loading.
4
+ * Selectable grid of available appointment dates rendered as pill buttons
5
+ * (weekday / day / month), with loading, empty and progressive-loading
6
+ * states. Selection uses button-toggle semantics: each pill is a button with
7
+ * aria-pressed and a full accessible date name, inside a labelled group.
6
8
  */
7
9
  import React from 'react';
8
10
  type DatePickerProps = {
@@ -10,6 +12,8 @@ type DatePickerProps = {
10
12
  onChange: (date: string) => void;
11
13
  dateOptions: string[];
12
14
  required?: boolean;
15
+ ariaDescribedBy?: string;
16
+ ariaInvalid?: boolean;
13
17
  isLoading?: boolean;
14
18
  isEmpty?: boolean;
15
19
  hasMore?: boolean;
@@ -1,7 +1,9 @@
1
1
  /**
2
2
  * SuccessMessage Component
3
3
  *
4
- * Displays success message after successful appointment booking.
4
+ * Terminal success state after a completed appointment booking.
5
+ * Rendered on the shared registration-surface (see booking-form.client),
6
+ * using the shared TerminalPanel + StateIcon primitives.
5
7
  */
6
8
  import React from 'react';
7
9
  type SuccessMessageProps = {
@@ -1,16 +1,22 @@
1
1
  /**
2
2
  * TimeSlotSelector Component
3
3
  *
4
- * Displays available time slots for the selected date with loading and empty states.
4
+ * Selectable grid of available time slots for the chosen date, rendered as
5
+ * pill buttons with button-toggle semantics (aria-pressed) inside a labelled
6
+ * group. The timezone is part of each pill's accessible name via the full
7
+ * time format; the visible pill shows the compact time.
5
8
  */
6
9
  import React from 'react';
7
- import type { TimeSlot } from '../../hooks/useAvailableSlots';
10
+ import type { BookingSlotDisplayOption } from '../../hooks/useHeadlessBookingFlow.state';
8
11
  type TimeSlotSelectorProps = {
9
12
  value: string;
10
- onChange: (slotStartTime: string) => void;
11
- slots: TimeSlot[];
13
+ onChange: (slotKey: string) => void;
14
+ slots: readonly BookingSlotDisplayOption[];
12
15
  isLoading: boolean;
16
+ timezone: string;
13
17
  required?: boolean;
18
+ ariaDescribedBy?: string;
19
+ ariaInvalid?: boolean;
14
20
  };
15
21
  export declare const TimeSlotSelector: React.FC<TimeSlotSelectorProps>;
16
22
  export {};
@@ -1,3 +1,3 @@
1
- export { unsafeAsBookingFieldId, bookingFlowReducer, buildBookingAvailabilityQuery, buildBookingStepPlan, buildBookingSubmitPlan, createBookingBlockApiConfig, createEmptyBookingValidationErrors, createFieldBookingValidationErrors, createFormBookingValidationError, createInitialBookingFlowReducerState, describeUnknownError, deriveBookingFieldViews, deriveBookingFlowSteps, getAppointmentBookingOverrideInput, hasBookingValidationErrors, resolveAppointmentPackagesModel, resolveAvailabilitySelectionInvalidation, resolveHeadlessBookingStatus, resolveHeadlessBookingView, toBookingFormData, toBookingSlotView, toBookingSlotViews, toOptionalAppointmentResourceId, toOptionalAppointmentServiceId, validateBookingField, validateBookingFields, validateBookingStep, } from "../nodes/booking-form.headless.state";
1
+ export { unsafeAsBookingFieldId, bookingFlowReducer, buildBookingAvailabilityQuery, buildBookingStepPlan, buildBookingSubmitPlan, createBookingBlockApiConfig, createEmptyBookingValidationErrors, createFieldBookingValidationErrors, createFormBookingValidationError, createInitialBookingFlowReducerState, deriveBookingSlotDisplayOptions, describeUnknownError, deriveBookingFieldViews, deriveBookingFlowSteps, getAppointmentBookingOverrideInput, hasBookingValidationErrors, resolveAppointmentPackagesModel, resolveAvailabilitySelectionInvalidation, resolveHeadlessBookingStatus, resolveHeadlessBookingView, toBookingFormData, toBookingSlotView, toBookingSlotViews, toOptionalAppointmentResourceId, toOptionalAppointmentServiceId, validateBookingField, validateBookingFields, validateBookingStep, } from "../nodes/booking-form.headless.state";
2
2
  export { formatBookingCentsAsCurrencyInput, getBookingServiceSlidingScale, parseBookingCurrencyInputToCents, } from "../nodes/booking-form.state";
3
- export type { AppointmentBookingOverrideData, AppointmentBookingOverrideInput, AppointmentBookingOverrideInputResult, AppointmentBookingOverridePropsLike, BookingAvailabilityQuery, BookingAppointmentPackagesModel, BookingAppointmentPackagesUnavailableReason, BookingFieldId, BookingFieldValue, BookingFieldView, BookingFlowActionResult, BookingFlowFeedback, BookingFlowStatus, BookingFlowStep, BookingFlowStepId, BookingFlowView, BookingResourceView, BookingSlotSelection, BookingSlotView, BookingSubmitActionResult, BookingSubmitOptions, BookingValidationErrors, DerivedBookingFlowSteps, DeriveBookingFlowStepsInput, LoadState, } from "../nodes/booking-form.headless.state";
3
+ export type { AppointmentBookingOverrideData, AppointmentBookingOverrideInput, AppointmentBookingOverrideInputResult, AppointmentBookingOverridePropsLike, BookingAvailabilityQuery, BookingAppointmentPackagesModel, BookingAppointmentPackagesUnavailableReason, BookingFieldId, BookingFieldValue, BookingFieldView, BookingFlowActionResult, BookingFlowFeedback, BookingFlowStatus, BookingFlowStep, BookingFlowStepId, BookingFlowView, BookingResourceView, BookingSlotDisplayOption, BookingSlotSelection, BookingSlotView, BookingSubmitActionResult, BookingSubmitOptions, BookingValidationErrors, DerivedBookingFlowSteps, DeriveBookingFlowStepsInput, LoadState, } from "../nodes/booking-form.headless.state";
@@ -47,6 +47,13 @@ export type BookingSlotSelection = Readonly<{
47
47
  resourceName?: string;
48
48
  label?: string;
49
49
  }>;
50
+ export type BookingSlotDisplayOption = Readonly<{
51
+ key: string;
52
+ startAt: string;
53
+ endAt: string;
54
+ resourceId: AppointmentResourceId;
55
+ slot: BookingSlotView;
56
+ }>;
50
57
  export type BookingResourceView = Readonly<{
51
58
  id: AppointmentResourceId;
52
59
  label: string;
@@ -429,6 +436,10 @@ export declare function resolveAvailabilitySelectionInvalidation(input: Readonly
429
436
  }>): AvailabilitySelectionInvalidation;
430
437
  export declare function toBookingSlotView(slot: BookingSlotSelection): BookingSlotView;
431
438
  export declare function toBookingSlotViews(slots: readonly TimeSlot[]): BookingSlotView[];
439
+ export declare function deriveBookingSlotDisplayOptions(input: Readonly<{
440
+ slots: readonly BookingSlotView[];
441
+ hasSelectedResource: boolean;
442
+ }>): BookingSlotDisplayOption[];
432
443
  export declare function toBookingFormData(state: BookingFlowReducerState): BookingFormData;
433
444
  export declare function buildBookingStepPlan(input: BuildBookingStepPlanInput): readonly BookingStepPlanItem[];
434
445
  export declare function validateBookingStep(input: Readonly<{
@@ -1,6 +1,8 @@
1
1
  /**
2
2
  * Step indicator component for the event registration wizard.
3
- * Thin wrapper around the shared StepIndicator with 'er' class prefix.
3
+ * Thin wrapper around the shared StepIndicator: styled by the shared
4
+ * registration-surface classes, with 'er'-prefixed classes kept in the
5
+ * markup as the stable hook surface for per-site theme CSS.
4
6
  */
5
7
  import { type StepIndicatorBaseProps } from '../../shared';
6
8
  export declare function StepIndicator(props: StepIndicatorBaseProps): import("react").JSX.Element;
@@ -5,10 +5,11 @@ export type FeedbackMessageProps = Readonly<{
5
5
  tone: FeedbackTone;
6
6
  children: ReactNode;
7
7
  className?: string;
8
+ id?: string;
8
9
  title?: ReactNode;
9
10
  titleClassName?: string;
10
11
  bodyClassName?: string;
11
12
  role?: 'alert' | 'status';
12
13
  live?: FeedbackLiveMode;
13
14
  }>;
14
- export declare function FeedbackMessage({ tone, children, className, title, titleClassName, bodyClassName, role, live, }: FeedbackMessageProps): import("react").JSX.Element;
15
+ export declare function FeedbackMessage({ tone, children, className, id, title, titleClassName, bodyClassName, role, live, }: FeedbackMessageProps): import("react").JSX.Element;
@@ -1,5 +1,15 @@
1
1
  import React from 'react';
2
- type SelectableOptionCardProps = {
2
+ /**
3
+ * Class-name preset applying the shared registration-surface option-card
4
+ * styling (`registration-surface.css`). Spread these and supply the
5
+ * block-specific content class names (icon/label/detail) alongside.
6
+ */
7
+ export declare const RB_OPTION_CARD_CLASSES: {
8
+ readonly baseClassName: "rb-option-card";
9
+ readonly selectedClassName: "rb-option-card--selected";
10
+ readonly disabledClassName: "rb-option-card--disabled";
11
+ };
12
+ export type SelectableOptionCardProps = {
3
13
  baseClassName: string;
4
14
  selectedClassName: string;
5
15
  disabledClassName: string;
@@ -18,4 +28,3 @@ type SelectableOptionCardProps = {
18
28
  renderDisabledTooltip?: (tooltip: string) => React.ReactNode;
19
29
  };
20
30
  export declare function SelectableOptionCard(props: SelectableOptionCardProps): React.JSX.Element;
21
- export {};
@@ -2,10 +2,19 @@
2
2
  * Shared step indicator component for registration wizards.
3
3
  * Shows numbered steps with current progress and completion state.
4
4
  *
5
- * Supports both course-registration (cr-*) and event-registration (er-*) class prefixes.
5
+ * Two class channels can be emitted (independently or together):
6
+ * - `emitSharedClasses` adds the shared registration-surface classes
7
+ * (`rb-steps-nav`, `rb-step-circle`, ...) styled by
8
+ * theme-core `blocks-static/registration-surface.css`.
9
+ * - `classPrefix` adds block-prefixed classes (e.g. `er-step-circle`) — the
10
+ * legacy styling channel and the stable hook surface for per-site theme CSS.
11
+ *
12
+ * Blocks opt in to the shared channel as part of their registration-surface
13
+ * migration (issue 1174); until then a prefix-only render is unchanged output.
14
+ * At least one channel must be enabled or the indicator renders unstyled.
6
15
  */
7
16
  /**
8
- * Base props for StepIndicator wrappers (without classPrefix).
17
+ * Base props for StepIndicator wrappers (without class channel config).
9
18
  * Use this type when creating block-specific thin wrappers.
10
19
  */
11
20
  export type StepIndicatorBaseProps = {
@@ -20,7 +29,9 @@ export type StepIndicatorBaseProps = {
20
29
  * Full props for the shared StepIndicator component.
21
30
  */
22
31
  export type StepIndicatorProps = StepIndicatorBaseProps & {
23
- /** CSS class prefix (e.g., 'cr' or 'er') */
24
- classPrefix: string;
32
+ /** Block-prefixed class channel (e.g. 'cr' or 'er'); kept as a theme-CSS hook */
33
+ classPrefix?: string;
34
+ /** Also emit the shared registration-surface `rb-*` classes */
35
+ emitSharedClasses?: boolean;
25
36
  };
26
- export declare function StepIndicator({ currentStep, totalSteps, stepLabels, classPrefix, }: StepIndicatorProps): import("react").JSX.Element;
37
+ export declare function StepIndicator({ currentStep, totalSteps, stepLabels, classPrefix, emitSharedClasses, }: StepIndicatorProps): import("react").JSX.Element;
@@ -27,3 +27,5 @@ export { TerminalPanel } from './TerminalPanel';
27
27
  export type { TerminalPanelProps, TerminalPanelTitleElement } from './TerminalPanel';
28
28
  export { StepIndicator } from './StepIndicator';
29
29
  export type { StepIndicatorBaseProps, StepIndicatorProps } from './StepIndicator';
30
+ export { RB_OPTION_CARD_CLASSES, SelectableOptionCard, } from './SelectableOptionCard';
31
+ export type { SelectableOptionCardProps } from './SelectableOptionCard';
@@ -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, 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';
11
+ export { ActionRow, BookingOptionCompactRow, BookingOptionList, CheckIcon, ClockIcon, CrossIcon, BLOCK_DISCOUNT_CODE_DISCLOSURE_CLASSES, DiscountCodeDisclosure, FieldValidationMessage, FeedbackMessage, getFieldValidationControlProps, MembershipHero, ModalShell, RB_OPTION_CARD_CLASSES, SelectableOptionCard, StateIcon, StepIndicator, TerminalPanel, } from './components';
12
+ export type { ActionRowProps, SelectableOptionCardProps, BookingOptionCompactRowAction, BookingOptionCompactRowProps, BookingOptionCompactRowViewModel, BookingOptionGroupViewModel, BookingOptionListProps, BookingOptionMetaItem, DiscountCodeDisclosureProps, DiscountCodeDisclosureSurface, FieldValidationControlInput, FieldValidationControlProps, FieldValidationMessageProps, FeedbackLiveMode, FeedbackMessageProps, FeedbackTone, ModalShellProps, StepIndicatorBaseProps, StepIndicatorProps, TerminalPanelProps, TerminalPanelTitleElement, } from './components';
@@ -24,9 +24,25 @@ export declare function generateDateRange(days: number, from?: Date): string[];
24
24
  * @returns Formatted date (e.g., "Friday, March 15, 2025")
25
25
  */
26
26
  export declare function formatDate(dateStr: string): string;
27
+ /**
28
+ * Formats an ISO date string (YYYY-MM-DD) into the compact parts shown on a
29
+ * booking date pill (e.g. { weekday: "Fri", day: "15", month: "Mar" }).
30
+ * Use formatDate() for the full accessible name.
31
+ */
32
+ export declare function formatDatePillParts(dateStr: string): Readonly<{
33
+ weekday: string;
34
+ day: string;
35
+ month: string;
36
+ }>;
37
+ /**
38
+ * Formats an ISO datetime string to a compact time without the timezone
39
+ * suffix (e.g. "2:30 PM") — used on booking time pills where the timezone is
40
+ * announced once for the whole group. Use formatTime() for the full form.
41
+ */
42
+ export declare function formatTimeShort(isoString: string, timeZone?: string): string;
27
43
  /**
28
44
  * Formats an ISO datetime string to a human-readable time
29
45
  * @param isoString - ISO datetime string (e.g., "2025-03-15T14:30:00Z")
30
46
  * @returns Formatted time (e.g., "2:30 PM EST")
31
47
  */
32
- export declare function formatTime(isoString: string): string;
48
+ export declare function formatTime(isoString: string, timeZone?: string): string;