@riverbankcms/sdk 0.96.0 → 0.98.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.
- package/README.md +20 -1
- package/dist/{PreviewEditorSidebar-46VT4QVU.mjs → PreviewEditorSidebar-CG3SSJND.mjs} +3 -3
- package/dist/{PreviewEditorUI-JD75GE5F.mjs → PreviewEditorUI-RHNGKAAU.mjs} +3 -3
- package/dist/SdkPreviewModeRuntime-OV5PNJBB.mjs +8 -0
- package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +35 -1
- package/dist/_dts/api/src/bookingOperations.d.ts +246 -0
- package/dist/_dts/api/src/contentRuntime.d.ts +109 -40
- package/dist/_dts/api/src/endpoints.d.ts +80 -0
- package/dist/_dts/api/src/index.d.ts +3 -2
- package/dist/_dts/api/src/public/endpoints.d.ts +1 -1
- package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +10 -0
- package/dist/_dts/api/src/sdkContracts.d.ts +2 -0
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +2 -1
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +7 -1
- package/dist/_dts/blocks/src/PageRenderer.d.ts +2 -1
- package/dist/_dts/blocks/src/bindings/types.d.ts +0 -4
- package/dist/_dts/blocks/src/client/site-chrome.d.ts +7 -0
- package/dist/_dts/blocks/src/contracts/index.d.ts +1 -0
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +12 -12
- package/dist/_dts/blocks/src/primitives/content/primitives.d.ts +4 -0
- package/dist/_dts/blocks/src/system/blocks/events/shared/index.d.ts +1 -0
- package/dist/_dts/blocks/src/system/blocks/events/shared/layout.d.ts +2 -0
- package/dist/_dts/blocks/src/system/blocks/index.d.ts +1 -0
- package/dist/_dts/blocks/src/system/blocks/weekly-slot-availability.d.ts +34 -0
- package/dist/_dts/blocks/src/system/componentFactory.d.ts +1 -0
- package/dist/_dts/blocks/src/system/constants/blockKinds.d.ts +1 -1
- package/dist/_dts/blocks/src/system/customize/facets.d.ts +2 -2
- package/dist/_dts/blocks/src/system/data/loaderEndpoints.d.ts +1 -1
- package/dist/_dts/blocks/src/system/data/prefetchBlockData.d.ts +4 -1
- package/dist/_dts/blocks/src/system/node/builder.d.ts +2 -0
- package/dist/_dts/blocks/src/system/node/schema.d.ts +13 -0
- package/dist/_dts/blocks/src/system/node/validation-constants.d.ts +1 -1
- package/dist/_dts/blocks/src/system/registry.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/api/client.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/api/endpoints.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/api/types.d.ts +24 -0
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useAppointmentCheckoutVerification.d.ts +7 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useAvailableSlots.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessEventRegistrationFlow.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/usePaymentVerification.d.ts +5 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/hooks.d.ts +14 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationSubmit.d.ts +8 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +133 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/weekly-slot-availability.client.controller.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/weekly-slot-availability.client.d.ts +9 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/weekly-slot-availability.client.state.d.ts +14 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/weekly-slot-availability.server.d.ts +10 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/weekly-slot-availability.view.d.ts +11 -0
- package/dist/_dts/blocks/src/system/runtime/resolver.d.ts +31 -1
- package/dist/_dts/blocks/src/system/runtime/shared/useWaitlistClaim.d.ts +5 -0
- package/dist/_dts/blocks/src/utils/date-formatting.d.ts +1 -1
- package/dist/_dts/content-editor/src/primitives/PreviewInlineTextEditor.d.ts +1 -1
- package/dist/_dts/content-editor/src/primitives/PreviewRichTextEditor.d.ts +1 -1
- package/dist/_dts/content-model/src/templates/defaults.d.ts +5 -5
- package/dist/_dts/content-model/src/templates/types.d.ts +2 -6
- package/dist/_dts/core/src/branded.d.ts +8 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +505 -2
- package/dist/_dts/field-primitives/src/bindings/index.d.ts +8 -0
- package/dist/_dts/sdk/src/cli/commands/push/publishGuidance.d.ts +15 -0
- package/dist/_dts/sdk/src/cli/commands/push/scopes/commandBackedDatedOfferingScope.d.ts +2 -1
- package/dist/_dts/sdk/src/cli/commands/push/scopes/types.d.ts +3 -1
- package/dist/_dts/sdk/src/cli/commands/push/stale-resolution.d.ts +9 -3
- package/dist/_dts/sdk/src/cli/commands/push/workflowPlan.d.ts +34 -0
- package/dist/_dts/sdk/src/cli/commands/setup.d.ts +2 -0
- package/dist/_dts/sdk/src/cli/config-loader.d.ts +2 -0
- package/dist/_dts/sdk/src/cli/content/metadataStore.d.ts +29 -0
- package/dist/_dts/sdk/src/cli/content/reader.d.ts +16 -14
- package/dist/_dts/sdk/src/cli/content/writer.d.ts +6 -4
- package/dist/_dts/sdk/src/cli/env-scope.d.ts +2 -0
- package/dist/_dts/sdk/src/cli/helpers.d.ts +6 -7
- package/dist/_dts/sdk/src/cli/merge-remote/entryMergePush.d.ts +2 -0
- package/dist/_dts/sdk/src/cli/merge-remote/pageMergePush.d.ts +2 -0
- package/dist/_dts/sdk/src/cli/push-config.d.ts +13 -2
- package/dist/_dts/sdk/src/cli/setup/setupPlan.d.ts +51 -0
- package/dist/_dts/sdk/src/cli/site-commands/commandRuntime.d.ts +21 -0
- package/dist/_dts/sdk/src/client/runtimeCachePolicy.d.ts +1 -1
- package/dist/_dts/sdk/src/client/types.d.ts +18 -2
- package/dist/_dts/sdk/src/config/types.d.ts +1 -1
- package/dist/_dts/sdk/src/config/validation.d.ts +3 -0
- package/dist/_dts/sdk/src/contracts/bindings.d.ts +3 -7
- package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +13 -0
- package/dist/_dts/sdk/src/next/route-outcome-proxy.d.ts +3 -3
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +174 -78
- package/dist/_dts/sdk/src/public-api/runtime.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/helpers/bindings.d.ts +4 -4
- package/dist/_dts/sdk/src/rendering/helpers/loadContent.d.ts +52 -1
- package/dist/_dts/sdk/src/rendering/hooks/usePage.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/islands/types.d.ts +18 -66
- package/dist/_dts/sdk/src/types/block-kinds.d.ts +1 -1
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/{chunk-EL55VV6Q.mjs → chunk-6WDBXCPX.mjs} +31 -10
- package/dist/{chunk-XMATDBXO.mjs → chunk-DBRI3PQF.mjs} +731 -180
- package/dist/{chunk-VHIMXQ7Z.mjs → chunk-H24OU7WG.mjs} +2 -2
- package/dist/{chunk-4TLTV7OB.mjs → chunk-PKDPQHB5.mjs} +2 -2
- package/dist/{chunk-VTPPVAOL.mjs → chunk-QPXE2OUZ.mjs} +1 -1
- package/dist/{chunk-7ED5UNHL.mjs → chunk-V2BYFSPW.mjs} +109 -0
- package/dist/cli/index.mjs +2131 -1033
- package/dist/cli/init-docs/content/cli-reference.md +29 -1
- package/dist/cli/init-docs/content/getting-started.md +8 -0
- package/dist/cli/init-docs/content/workflow-agent-safe-sync.md +3 -1
- package/dist/cli/init-docs/content/workflow-preview-mode.md +6 -0
- package/dist/cli/init-docs/content/workflow-remote-setup.md +51 -0
- package/dist/client/{accordion-GUNXIIZR.mjs → accordion-Q2BDNL53.mjs} +1 -1
- package/dist/client/{bookingForm-AOU4VHP5.mjs → bookingForm-ZMP4P7EK.mjs} +16 -6
- package/dist/client/bookings.mjs +98 -18
- package/dist/client/{carousel-4QSX2JPC.mjs → carousel-LW3UXPWO.mjs} +1 -1
- package/dist/client/{cart-JKN6C4ZB.mjs → cart-Z6D3KS6K.mjs} +5 -5
- package/dist/client/{checkout-YY6YMITW.mjs → checkout-YMT2QJQM.mjs} +5 -5
- package/dist/client/{chunk-6H27K6AA.mjs → chunk-26ZBRXFR.mjs} +9 -3
- package/dist/client/{chunk-VJROUYOQ.mjs → chunk-DRRQ7QSL.mjs} +2 -2
- package/dist/client/{chunk-BFCJZODD.mjs → chunk-ET2MDQQT.mjs} +4 -4
- package/dist/client/{chunk-H7A6PUGM.mjs → chunk-HBQEAOG4.mjs} +1 -1
- package/dist/client/{chunk-CPKMJVBD.mjs → chunk-IEOECM7U.mjs} +62 -43
- package/dist/client/{chunk-TNGL2WJF.mjs → chunk-KDP7ZRZV.mjs} +16 -0
- package/dist/client/{chunk-GWCRCJLB.mjs → chunk-R4XK3CKR.mjs} +12 -1
- package/dist/client/{chunk-A3YN7M3G.mjs → chunk-SK2BMD22.mjs} +2 -2
- package/dist/client/{chunk-SY543WZ3.mjs → chunk-XNTHVZ25.mjs} +1 -1
- package/dist/client/client.mjs +3729 -3054
- package/dist/client/{courseRegistration-UU2KMPSQ.mjs → courseRegistration-DGKCMC77.mjs} +4 -4
- package/dist/client/{eventCalendar-WIVNS2TM.mjs → eventCalendar-74Z2NNFM.mjs} +7 -7
- package/dist/client/{eventCombined-P3G5MW4J.mjs → eventCombined-GK2ODOX2.mjs} +7 -7
- package/dist/client/{eventDetails-2VHJ2RDG.mjs → eventDetails-MONAGT3N.mjs} +7 -7
- package/dist/client/{eventListing-TGO6JI3R.mjs → eventListing-SKGAO6PS.mjs} +7 -7
- package/dist/client/{eventRegistration-B46HEJES.mjs → eventRegistration-6KISGXRD.mjs} +7 -7
- package/dist/client/{form-VKRTFUNQ.mjs → form-FXPRTXHI.mjs} +2 -2
- package/dist/client/{headerSection-XUX4ZJLO.mjs → headerSection-7NAN5WNB.mjs} +2 -2
- package/dist/client/hooks.mjs +1661 -1334
- package/dist/client/{locationMap-NQFI5MJO.mjs → locationMap-UERN74U4.mjs} +2 -2
- package/dist/client/{newsletterForm-P2GETCQK.mjs → newsletterForm-SGWXMJ7U.mjs} +2 -2
- package/dist/client/{productDetail-7NQ7O5IF.mjs → productDetail-HN3HWZQZ.mjs} +5 -5
- package/dist/client/{productList-RX6ZJ7BL.mjs → productList-YT22Z5UR.mjs} +5 -5
- package/dist/client/rendering/client.mjs +2208 -1922
- package/dist/client/rendering/islands.mjs +18 -18
- package/dist/client/rendering.mjs +1497 -811
- package/dist/client/{shop-BHN5AKY6.mjs → shop-TKEDNWUS.mjs} +5 -5
- package/dist/preview-next/before-render.mjs +109 -0
- package/dist/preview-next/client/runtime.mjs +5 -5
- package/dist/preview-next/middleware.mjs +109 -0
- package/dist/{sdk-runtime-X2LXQ5IC.mjs → sdk-runtime-LWNYCQF2.mjs} +6 -6
- package/dist/server/components.mjs +2351 -1872
- package/dist/server/config-template-validation.mjs +6 -2
- package/dist/server/config-validation.mjs +1861 -1561
- package/dist/server/config.mjs +1861 -1561
- package/dist/server/data.mjs +1647 -1331
- package/dist/server/index.mjs +208 -9
- package/dist/server/next/middleware.mjs +2 -2
- package/dist/server/next.mjs +2572 -1878
- package/dist/server/page-converter.mjs +1461 -1276
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +2372 -1875
- package/dist/server/rendering.mjs +2557 -1941
- package/dist/server/routing.mjs +1716 -1353
- package/dist/server/server.mjs +1911 -1380
- package/package.json +1 -1
- package/dist/SdkPreviewModeRuntime-MJUSYUFB.mjs +0 -8
|
@@ -61,6 +61,29 @@ RIVERBANK_REMOTE_API_KEY=bld_live_sk_... # Required for deploy command
|
|
|
61
61
|
|
|
62
62
|
---
|
|
63
63
|
|
|
64
|
+
## Setup Commands
|
|
65
|
+
|
|
66
|
+
### setup plan
|
|
67
|
+
|
|
68
|
+
Show the safe site, key, user access, and env setup lifecycle for the selected environment.
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
# Show local setup status and lifecycle
|
|
72
|
+
riverbankcms setup plan
|
|
73
|
+
|
|
74
|
+
# Show remote setup status and lifecycle
|
|
75
|
+
riverbankcms setup plan --env=remote
|
|
76
|
+
|
|
77
|
+
# Show both targets as JSON
|
|
78
|
+
riverbankcms setup plan --env=both --json
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
The setup planner is read-only. It does not create sites, issue API keys, or grant dashboard access. Those operations require a dashboard/admin actor or an approved CMS repo script with service-role/admin credentials. SDK management keys are site-scoped and are only used for verifying access and syncing content/config for an existing site.
|
|
82
|
+
|
|
83
|
+
Use this command when a project has missing `RIVERBANK_*_SITE_ID`, `RIVERBANK_*_DASHBOARD_URL`, or `RIVERBANK_*_MGMT_API_KEY` values, or when onboarding an existing remote site into an SDK repo.
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
64
87
|
## Content Sync Commands
|
|
65
88
|
|
|
66
89
|
### pull
|
|
@@ -173,7 +196,7 @@ If unrelated local files would be included by a broad scope, stage a temporary c
|
|
|
173
196
|
| `--force-update-asset` | Replace CMS media when identifiers conflict (local media sync only) |
|
|
174
197
|
| `--allow-truncated` | Push even if remote content was truncated (may cause incomplete sync) |
|
|
175
198
|
| `--json-diff [mode]` | Output JSON diff: `summary` or `full` |
|
|
176
|
-
| `--with-config` |
|
|
199
|
+
| `--with-config` | Push SDK schema/config before dependent file content |
|
|
177
200
|
| `--with-theme` | Also push theme when pushing all content |
|
|
178
201
|
| `--sync-media` | Sync media files from local to remote environment |
|
|
179
202
|
| `--overwrite-media` | When using `--sync-media`, overwrite target media on checksum mismatch |
|
|
@@ -262,6 +285,8 @@ riverbankcms push --env=both --yes --verify-noop
|
|
|
262
285
|
|
|
263
286
|
Push compares local metadata timestamps against the remote CMS. If the remote has newer changes than your last pull, push aborts by default to prevent overwriting someone else's edits.
|
|
264
287
|
|
|
288
|
+
Metadata is stored separately per CLI target under `content/.meta/local/` and `content/.meta/remote/`, with a small target marker so local and remote pulls do not overwrite each other's stale-detection base. Older flat `content/.meta/*.json` files are still read as a fallback and are written forward to the scoped layout on the next pull or metadata update.
|
|
289
|
+
|
|
265
290
|
Options for handling stale content:
|
|
266
291
|
|
|
267
292
|
- **Interactive prompt** (default in TTY): Push asks whether to pull the stale items and retry.
|
|
@@ -328,12 +353,15 @@ Push SDK configuration to the CMS dashboard.
|
|
|
328
353
|
|
|
329
354
|
```bash
|
|
330
355
|
riverbankcms push-config
|
|
356
|
+
riverbankcms push-config --dry-run
|
|
331
357
|
riverbankcms push-config --env=remote
|
|
332
358
|
riverbankcms push-config --config ./src/riverbank.config.ts
|
|
333
359
|
```
|
|
334
360
|
|
|
335
361
|
Syncs SDK schema/config surfaces such as custom blocks, block field options/extensions, content type definitions/templates, SDK-managed site settings, and footer blocks. Pages, entries, and navigation menus are synced with explicit `riverbankcms push` scopes.
|
|
336
362
|
|
|
363
|
+
Use `--dry-run` to validate config and preview the schema/config surfaces that would be considered without mutating the dashboard.
|
|
364
|
+
|
|
337
365
|
If `push-config` returns template binding validation errors, treat them as schema feedback. For example, a content type `reference` field should bind to a custom block `reference` field with the same `referenceKind`, not to a plain `text` field.
|
|
338
366
|
|
|
339
367
|
This syncs:
|
|
@@ -127,6 +127,14 @@ Additional content configuration for scaffolding.
|
|
|
127
127
|
|
|
128
128
|
## Working with Remote/Production
|
|
129
129
|
|
|
130
|
+
If the remote site, management key, or dashboard user access is not set up yet, start with the safe setup planner:
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
riverbankcms setup plan --env=remote
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
See `workflows/remote-setup.md` for the full site/key/user lifecycle. The SDK CLI uses site-scoped management keys for sync; remote site creation, key issuance, and user access changes stay in the dashboard/admin surface.
|
|
137
|
+
|
|
130
138
|
Use `--env=remote` to target production instead of local:
|
|
131
139
|
|
|
132
140
|
```bash
|
|
@@ -17,7 +17,7 @@ Use the CLI environment flag:
|
|
|
17
17
|
```bash
|
|
18
18
|
riverbankcms pull --env=remote
|
|
19
19
|
riverbankcms push pages privacy-policy --env=remote --dry-run
|
|
20
|
-
riverbankcms push-config --env=remote
|
|
20
|
+
riverbankcms push-config --env=remote --dry-run
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
Do not rely on `RIVERBANK_ENV=remote riverbankcms ...` for CLI sync commands. Site projects often load `.env.local`, and an existing `RIVERBANK_ENV=local` value can override the shell value in config-loading paths. The CLI `--env` flag is explicit and survives project env defaults.
|
|
@@ -70,6 +70,8 @@ riverbankcms push-config ...
|
|
|
70
70
|
|
|
71
71
|
`push-config` does not replace `push pages` or `push entries`; it syncs schema/config surfaces. If config validation fails, read the field errors as schema feedback before working around them in the site.
|
|
72
72
|
|
|
73
|
+
Run `riverbankcms push-config --dry-run` before applying schema/config changes to validate the config and preview the config surfaces without mutating the dashboard.
|
|
74
|
+
|
|
73
75
|
## Before Applying
|
|
74
76
|
|
|
75
77
|
Checklist:
|
|
@@ -69,6 +69,12 @@ The example logs preview exchange failures with `console.warn`; replace it with
|
|
|
69
69
|
|
|
70
70
|
If you are upgrading an existing generated site, make sure your proxy imports `getCmsConfig`, is declared `async`, and passes `dashboardUrl` into `handlePreviewTokens`. Without the dashboard URL, visits with `preview_code` cannot exchange the short-lived code for preview cookies.
|
|
71
71
|
|
|
72
|
+
## Public Runtime Adapter Contracts
|
|
73
|
+
|
|
74
|
+
Use `resolveRouteDecision` for middleware or redirect-only checks. It returns only `contentExists`, `redirect`, `notFound`, or `loadFailed`; use `resolveRouteOutcome` only when the caller needs the full content payload for rendering.
|
|
75
|
+
|
|
76
|
+
Event registration endpoints use the `public-event-ticket-selection.v2` transport shape: pass `ticketSelections: [{ ticketTypeId, quantity }]`. Legacy top-level `ticketsCount` or `ticketTypeId` fields are rejected so stale clients fail visibly instead of silently selecting the wrong tickets.
|
|
77
|
+
|
|
72
78
|
## Add Preview Keep-Alive Route
|
|
73
79
|
|
|
74
80
|
Create `src/app/api/preview/keep-alive/route.ts`:
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Remote Site, Key, and User Access Setup
|
|
2
|
+
|
|
3
|
+
This SDK project can sync content once it has a site ID, dashboard URL, and site-scoped management key. Creating the remote site, issuing keys, and granting dashboard user access are admin operations.
|
|
4
|
+
|
|
5
|
+
## Check the Plan
|
|
6
|
+
|
|
7
|
+
Run the setup planner before copying secrets or pushing to production:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
riverbankcms setup plan --env=remote
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
For a machine-readable checklist:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
riverbankcms setup plan --env=remote --json
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Authority Model
|
|
20
|
+
|
|
21
|
+
- Dashboard/admin users can create sites, issue site-scoped management keys, and grant dashboard access.
|
|
22
|
+
- Approved CMS repo scripts can do the same when run with service-role/admin credentials.
|
|
23
|
+
- SDK management keys can verify access and sync content/config for one site. They cannot create sites, issue new keys, or grant user access.
|
|
24
|
+
|
|
25
|
+
Do not put platform-admin, service-role, or user-session credentials in an SDK site repository.
|
|
26
|
+
|
|
27
|
+
## Remote Setup Lifecycle
|
|
28
|
+
|
|
29
|
+
1. Create or choose the remote site from the dashboard/admin surface.
|
|
30
|
+
2. Generate a management key for that site.
|
|
31
|
+
3. Grant the site owner or editor dashboard access from the dashboard/admin surface.
|
|
32
|
+
4. Add the remote SDK variables to `.env.local`:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
RIVERBANK_REMOTE_SITE_ID=your-site-id
|
|
36
|
+
RIVERBANK_REMOTE_DASHBOARD_URL=https://your-dashboard.example.com
|
|
37
|
+
RIVERBANK_REMOTE_MGMT_API_KEY=bld_mgmt_sk_...
|
|
38
|
+
RIVERBANK_REMOTE_API_KEY=bld_live_sk_... # optional for public content fetching/deploy
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
5. Verify the SDK can reach the site:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
riverbankcms env status --env=remote
|
|
45
|
+
riverbankcms pull --env=remote --dry-run
|
|
46
|
+
riverbankcms push --env=remote --dry-run
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Existing Sites and Users
|
|
50
|
+
|
|
51
|
+
For an existing remote site, copy its site ID and create a fresh site-scoped management key if the old one is missing or should be rotated. Associate existing users with the site through the dashboard/admin surface. If the user does not exist yet, invite or create them through that approved flow rather than through the SDK CLI.
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { buildBookingPaymentSelectionViewModel, usePolling } from './chunk-
|
|
2
|
+
import { buildBookingPaymentSelectionViewModel, usePolling } from './chunk-DRRQ7QSL.mjs';
|
|
3
3
|
import { SpinnerNode } from './chunk-OLAOAZEO.mjs';
|
|
4
4
|
import { buildRouteIslandApiConfig } from './chunk-L4J5Y62O.mjs';
|
|
5
|
-
import { scrollToBlock, useDiscountCodeUi, buildCheckoutReturnUrls, DiscountCodeDisclosure } from './chunk-
|
|
5
|
+
import { scrollToBlock, useDiscountCodeUi, buildCheckoutReturnUrls, DiscountCodeDisclosure } from './chunk-SK2BMD22.mjs';
|
|
6
6
|
import { FieldValidationMessage, getFieldValidationControlProps } from './chunk-3DCJ45Z2.mjs';
|
|
7
7
|
import './chunk-WBQG7VJA.mjs';
|
|
8
8
|
import { isSpamProtectionEnabled, getChallengeUrl, AltchaWidget } from './chunk-LJCX6V7Q.mjs';
|
|
9
|
-
import { BlockApiProvider, useBlockApi, FeedbackMessage } from './chunk-
|
|
9
|
+
import { BlockApiProvider, useBlockApi, FeedbackMessage } from './chunk-KDP7ZRZV.mjs';
|
|
10
10
|
import { mountReactIsland } from './chunk-N7PBWBWQ.mjs';
|
|
11
|
-
import { defineIslandPropsDecoder, resolveBookingSiteId, resolveDefaultBookingServiceId, getBookingRedirectStateFromLocation, deriveBookingFormViewState, logger, getBookingSuccessMessage, getBookingServiceSlidingScale, formatBookingCentsAsCurrencyInput, parseBookingCurrencyInputToCents,
|
|
11
|
+
import { defineIslandPropsDecoder, resolveBookingSiteId, resolveDefaultBookingServiceId, getBookingRedirectStateFromLocation, deriveBookingFormViewState, logger, getBookingSuccessMessage, getBookingServiceSlidingScale, formatBookingCentsAsCurrencyInput, parseBookingCurrencyInputToCents, themeButtonClassName, toSelectedCollectionOptionKind, assertNever, prepareBookingSubmission, formatBookingSubmissionPreparationError, resolveBookingPaymentStep, resolveAppointmentCheckoutVerificationState, BOOKING_FORM_DATA_RESERVED_KEYS, isBookingServiceSlidingAmountInRange, clearWorkflowFeedback, reportWorkflowError, reportWorkflowSuccess, okWith, err } from './chunk-R4XK3CKR.mjs';
|
|
12
12
|
import { resolveBookingTimeZoneId, DEFAULT_BOOKING_TIME_ZONE, unsafeAsFormId, unsafeAsAppointmentResourceId, unsafeAsCustomerPassId, unsafeAsAppointmentServiceId, formatLocalScheduleDate, addLocalScheduleDays, parseBookingLocalDate, unsafeAsPassId, formatCurrencyAmount, formatBookingInstant } from './chunk-PCHACQEB.mjs';
|
|
13
13
|
import React2, { useRef, useState, useMemo, useReducer, useEffect, useCallback, useLayoutEffect } from 'react';
|
|
14
14
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
@@ -1875,8 +1875,18 @@ function useLatestRef(value) {
|
|
|
1875
1875
|
}, [value]);
|
|
1876
1876
|
return ref;
|
|
1877
1877
|
}
|
|
1878
|
+
var appointmentCheckoutVerificationDeps = {
|
|
1879
|
+
useBlockApi,
|
|
1880
|
+
usePolling
|
|
1881
|
+
};
|
|
1878
1882
|
function useAppointmentCheckoutVerification(config) {
|
|
1879
|
-
|
|
1883
|
+
return useAppointmentCheckoutVerificationWithDeps(
|
|
1884
|
+
config,
|
|
1885
|
+
appointmentCheckoutVerificationDeps
|
|
1886
|
+
);
|
|
1887
|
+
}
|
|
1888
|
+
function useAppointmentCheckoutVerificationWithDeps(config, deps) {
|
|
1889
|
+
const api = deps.useBlockApi();
|
|
1880
1890
|
const pollingConfig = useMemo(() => {
|
|
1881
1891
|
if (!config) return null;
|
|
1882
1892
|
return {
|
|
@@ -1887,7 +1897,7 @@ function useAppointmentCheckoutVerification(config) {
|
|
|
1887
1897
|
interval: config.pollInterval
|
|
1888
1898
|
};
|
|
1889
1899
|
}, [api, config]);
|
|
1890
|
-
const polling = usePolling(pollingConfig);
|
|
1900
|
+
const polling = deps.usePolling(pollingConfig);
|
|
1891
1901
|
const state = resolveAppointmentCheckoutVerificationState({
|
|
1892
1902
|
config,
|
|
1893
1903
|
pollingStatus: polling.status,
|
package/dist/client/bookings.mjs
CHANGED
|
@@ -2882,6 +2882,10 @@ var BOOKINGS = {
|
|
|
2882
2882
|
path: "/public/bookings/availability/slots",
|
|
2883
2883
|
method: "GET"
|
|
2884
2884
|
},
|
|
2885
|
+
getWeeklySlotAvailability: {
|
|
2886
|
+
path: "/public/bookings/weekly-slot-availability",
|
|
2887
|
+
method: "GET"
|
|
2888
|
+
},
|
|
2885
2889
|
getAvailableDates: {
|
|
2886
2890
|
path: "/public/bookings/availability/dates",
|
|
2887
2891
|
method: "GET"
|
|
@@ -3428,6 +3432,18 @@ function createBlockApi(config) {
|
|
|
3428
3432
|
}
|
|
3429
3433
|
});
|
|
3430
3434
|
},
|
|
3435
|
+
async getWeeklySlotAvailability(params) {
|
|
3436
|
+
const sid = requireSiteId();
|
|
3437
|
+
return request(BOOKINGS.getWeeklySlotAvailability, {
|
|
3438
|
+
query: {
|
|
3439
|
+
siteId: sid,
|
|
3440
|
+
serviceId: params.serviceId,
|
|
3441
|
+
resourceId: params.resourceId,
|
|
3442
|
+
horizonWeeks: params.horizonWeeks,
|
|
3443
|
+
timezone: params.timezone
|
|
3444
|
+
}
|
|
3445
|
+
});
|
|
3446
|
+
},
|
|
3431
3447
|
async getAvailableDates(params) {
|
|
3432
3448
|
const sid = requireSiteId();
|
|
3433
3449
|
return request(BOOKINGS.getAvailableDates, {
|
|
@@ -15167,8 +15183,18 @@ function usePolling(config) {
|
|
|
15167
15183
|
}
|
|
15168
15184
|
|
|
15169
15185
|
// ../blocks/src/system/runtime/hooks/useAppointmentCheckoutVerification.ts
|
|
15186
|
+
var appointmentCheckoutVerificationDeps = {
|
|
15187
|
+
useBlockApi,
|
|
15188
|
+
usePolling
|
|
15189
|
+
};
|
|
15170
15190
|
function useAppointmentCheckoutVerification(config) {
|
|
15171
|
-
|
|
15191
|
+
return useAppointmentCheckoutVerificationWithDeps(
|
|
15192
|
+
config,
|
|
15193
|
+
appointmentCheckoutVerificationDeps
|
|
15194
|
+
);
|
|
15195
|
+
}
|
|
15196
|
+
function useAppointmentCheckoutVerificationWithDeps(config, deps) {
|
|
15197
|
+
const api = deps.useBlockApi();
|
|
15172
15198
|
const pollingConfig = useMemo3(() => {
|
|
15173
15199
|
if (!config) return null;
|
|
15174
15200
|
return {
|
|
@@ -15179,7 +15205,7 @@ function useAppointmentCheckoutVerification(config) {
|
|
|
15179
15205
|
interval: config.pollInterval
|
|
15180
15206
|
};
|
|
15181
15207
|
}, [api, config]);
|
|
15182
|
-
const polling = usePolling(pollingConfig);
|
|
15208
|
+
const polling = deps.usePolling(pollingConfig);
|
|
15183
15209
|
const state = resolveAppointmentCheckoutVerificationState({
|
|
15184
15210
|
config,
|
|
15185
15211
|
pollingStatus: polling.status,
|
|
@@ -17104,8 +17130,14 @@ function existingRegistrationLookupReducer(state, action) {
|
|
|
17104
17130
|
}
|
|
17105
17131
|
|
|
17106
17132
|
// ../blocks/src/system/runtime/nodes/event-registration/hooks.ts
|
|
17133
|
+
var eventRegistrationHooksDeps = {
|
|
17134
|
+
useBlockApi
|
|
17135
|
+
};
|
|
17107
17136
|
function usePortalAuth() {
|
|
17108
|
-
|
|
17137
|
+
return usePortalAuthWithDeps(eventRegistrationHooksDeps);
|
|
17138
|
+
}
|
|
17139
|
+
function usePortalAuthWithDeps(deps) {
|
|
17140
|
+
const api = deps.useBlockApi();
|
|
17109
17141
|
const [authState, setAuthState] = useState3("checking");
|
|
17110
17142
|
const [profile, setProfile] = useState3(null);
|
|
17111
17143
|
useEffect8(() => {
|
|
@@ -17153,7 +17185,10 @@ function usePortalAuth() {
|
|
|
17153
17185
|
};
|
|
17154
17186
|
}
|
|
17155
17187
|
function useEligibility(params) {
|
|
17156
|
-
|
|
17188
|
+
return useEligibilityWithDeps(params, eventRegistrationHooksDeps);
|
|
17189
|
+
}
|
|
17190
|
+
function useEligibilityWithDeps(params, deps) {
|
|
17191
|
+
const api = deps.useBlockApi();
|
|
17157
17192
|
const ticketSelectionsKey = JSON.stringify(normalizeTicketSelectionLines(params.ticketSelections));
|
|
17158
17193
|
const [state, dispatch] = useReducer7(
|
|
17159
17194
|
eligibilityLookupReducer,
|
|
@@ -17222,7 +17257,16 @@ function useExistingEventRegistration({
|
|
|
17222
17257
|
isAuthenticated,
|
|
17223
17258
|
occurrenceId
|
|
17224
17259
|
}) {
|
|
17225
|
-
|
|
17260
|
+
return useExistingEventRegistrationWithDeps(
|
|
17261
|
+
{ isAuthenticated, occurrenceId },
|
|
17262
|
+
eventRegistrationHooksDeps
|
|
17263
|
+
);
|
|
17264
|
+
}
|
|
17265
|
+
function useExistingEventRegistrationWithDeps({
|
|
17266
|
+
isAuthenticated,
|
|
17267
|
+
occurrenceId
|
|
17268
|
+
}, deps) {
|
|
17269
|
+
const api = deps.useBlockApi();
|
|
17226
17270
|
const [state, dispatch] = useReducer7(
|
|
17227
17271
|
existingRegistrationLookupReducer,
|
|
17228
17272
|
initialExistingRegistrationLookupState
|
|
@@ -17609,6 +17653,9 @@ function getWaitlistClaimTokenFromUrl() {
|
|
|
17609
17653
|
const token = new URLSearchParams(window.location.search).get("waitlist_claim")?.trim() ?? "";
|
|
17610
17654
|
return token.length > 0 ? token : null;
|
|
17611
17655
|
}
|
|
17656
|
+
var useWaitlistClaimDeps = {
|
|
17657
|
+
useBlockApi
|
|
17658
|
+
};
|
|
17612
17659
|
function subscribeToWaitlistClaimToken(callback) {
|
|
17613
17660
|
if (typeof window === "undefined") {
|
|
17614
17661
|
return () => {
|
|
@@ -17624,7 +17671,10 @@ function getWaitlistClaimTokenSnapshot() {
|
|
|
17624
17671
|
return getWaitlistClaimTokenFromUrl();
|
|
17625
17672
|
}
|
|
17626
17673
|
function useWaitlistClaim() {
|
|
17627
|
-
|
|
17674
|
+
return useWaitlistClaimWithDeps(useWaitlistClaimDeps);
|
|
17675
|
+
}
|
|
17676
|
+
function useWaitlistClaimWithDeps(deps) {
|
|
17677
|
+
const api = deps.useBlockApi();
|
|
17628
17678
|
const token = useSyncExternalStore(
|
|
17629
17679
|
subscribeToWaitlistClaimToken,
|
|
17630
17680
|
getWaitlistClaimTokenSnapshot,
|
|
@@ -17675,8 +17725,14 @@ import { useEffect as useEffect10, useMemo as useMemo5 } from "react";
|
|
|
17675
17725
|
|
|
17676
17726
|
// ../blocks/src/system/runtime/hooks/usePaymentVerification.ts
|
|
17677
17727
|
import { useMemo as useMemo4 } from "react";
|
|
17728
|
+
var paymentVerificationDeps = {
|
|
17729
|
+
useBlockApi
|
|
17730
|
+
};
|
|
17678
17731
|
function usePaymentVerification(config) {
|
|
17679
|
-
|
|
17732
|
+
return usePaymentVerificationWithDeps(config, paymentVerificationDeps);
|
|
17733
|
+
}
|
|
17734
|
+
function usePaymentVerificationWithDeps(config, deps) {
|
|
17735
|
+
const api = deps.useBlockApi();
|
|
17680
17736
|
const pollingConfig = useMemo4(() => {
|
|
17681
17737
|
if (!config) return null;
|
|
17682
17738
|
return {
|
|
@@ -17786,7 +17842,13 @@ function useEventRegistrationStripeReturn(options) {
|
|
|
17786
17842
|
}
|
|
17787
17843
|
|
|
17788
17844
|
// ../blocks/src/system/runtime/nodes/event-registration/useEventRegistrationSubmit.ts
|
|
17845
|
+
var eventRegistrationSubmitDeps = {
|
|
17846
|
+
savePendingRegistration
|
|
17847
|
+
};
|
|
17789
17848
|
function useEventRegistrationSubmit(options) {
|
|
17849
|
+
return useEventRegistrationSubmitWithDeps(options, eventRegistrationSubmitDeps);
|
|
17850
|
+
}
|
|
17851
|
+
function useEventRegistrationSubmitWithDeps(options, deps) {
|
|
17790
17852
|
return async (method, passId, membershipId, selection, submitOptions) => {
|
|
17791
17853
|
const submitOccurrenceId = options.registrationTarget?.occurrenceId;
|
|
17792
17854
|
if (!submitOccurrenceId) {
|
|
@@ -17875,7 +17937,7 @@ function useEventRegistrationSubmit(options) {
|
|
|
17875
17937
|
}
|
|
17876
17938
|
const siteId = options.api.config.siteId;
|
|
17877
17939
|
if (siteId && submitOccurrenceId) {
|
|
17878
|
-
savePendingRegistration(siteId, submitOccurrenceId, {
|
|
17940
|
+
deps.savePendingRegistration(siteId, submitOccurrenceId, {
|
|
17879
17941
|
attendeeId: result.attendeeId,
|
|
17880
17942
|
formData: options.formData,
|
|
17881
17943
|
ticketSelections,
|
|
@@ -17931,6 +17993,15 @@ function useEventRegistrationSubmit(options) {
|
|
|
17931
17993
|
}
|
|
17932
17994
|
|
|
17933
17995
|
// ../blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.ts
|
|
17996
|
+
var eventRegistrationWizardDeps = {
|
|
17997
|
+
usePortalAuth,
|
|
17998
|
+
useEligibility,
|
|
17999
|
+
useExistingEventRegistration,
|
|
18000
|
+
useWaitlistClaim,
|
|
18001
|
+
useEventRegistrationStripeReturn,
|
|
18002
|
+
useEventRegistrationSubmit,
|
|
18003
|
+
useDiscountCodeUi
|
|
18004
|
+
};
|
|
17934
18005
|
function parseCurrencyInputToCents(value) {
|
|
17935
18006
|
const trimmed = value.trim();
|
|
17936
18007
|
if (!trimmed) return null;
|
|
@@ -17961,6 +18032,9 @@ function getSlidingScaleSelectionMessage(input) {
|
|
|
17961
18032
|
return null;
|
|
17962
18033
|
}
|
|
17963
18034
|
function useEventRegistrationWizard(options) {
|
|
18035
|
+
return useEventRegistrationWizardWithDeps(options, eventRegistrationWizardDeps);
|
|
18036
|
+
}
|
|
18037
|
+
function useEventRegistrationWizardWithDeps(options, deps) {
|
|
17964
18038
|
const api = useBlockApi();
|
|
17965
18039
|
const registrationEvents = useMemo6(
|
|
17966
18040
|
() => toRegistrationEvents(options.events ?? []),
|
|
@@ -18010,8 +18084,8 @@ function useEventRegistrationWizard(options) {
|
|
|
18010
18084
|
const [registrationResult, setRegistrationResult] = useState4(null);
|
|
18011
18085
|
const [errorMessage, setErrorMessage] = useState4("");
|
|
18012
18086
|
const [altchaSolution, setAltchaSolution] = useState4(null);
|
|
18013
|
-
const { authState: portalAuthState, profile: portalProfile } = usePortalAuth();
|
|
18014
|
-
const waitlistClaim = useWaitlistClaim();
|
|
18087
|
+
const { authState: portalAuthState, profile: portalProfile } = deps.usePortalAuth();
|
|
18088
|
+
const waitlistClaim = deps.useWaitlistClaim();
|
|
18015
18089
|
const [showMagicLinkModal, setShowMagicLinkModal] = useState4(false);
|
|
18016
18090
|
const [pendingAttendeeId, setPendingAttendeeId] = useState4(null);
|
|
18017
18091
|
const [paymentStepState, setPaymentStepState] = useState4({
|
|
@@ -18076,7 +18150,7 @@ function useEventRegistrationWizard(options) {
|
|
|
18076
18150
|
if (flowState.ticketsCount === ticketsCount) return;
|
|
18077
18151
|
dispatchFlow({ type: "set-tickets-count", ticketsCount });
|
|
18078
18152
|
}, [flowState.ticketsCount, ticketsCount]);
|
|
18079
|
-
const eligibilityResult = useEligibility({
|
|
18153
|
+
const eligibilityResult = deps.useEligibility({
|
|
18080
18154
|
enabled: portalAuthState === "authenticated" || step === "enter-details" || step === "select-payment",
|
|
18081
18155
|
occurrenceId,
|
|
18082
18156
|
attendanceMode: selectedAttendanceMode,
|
|
@@ -18084,7 +18158,7 @@ function useEventRegistrationWizard(options) {
|
|
|
18084
18158
|
selectedSlidingAmount: parseCurrencyInputToCents(selectedSlidingAmountInput),
|
|
18085
18159
|
email: formData.email
|
|
18086
18160
|
});
|
|
18087
|
-
const existingRegistrationResult = useExistingEventRegistration({
|
|
18161
|
+
const existingRegistrationResult = deps.useExistingEventRegistration({
|
|
18088
18162
|
isAuthenticated: portalAuthState === "authenticated",
|
|
18089
18163
|
occurrenceId
|
|
18090
18164
|
});
|
|
@@ -18178,7 +18252,7 @@ function useEventRegistrationWizard(options) {
|
|
|
18178
18252
|
useEffect11(() => {
|
|
18179
18253
|
dispatchFlow({ type: "eligibility-updated", eligibility });
|
|
18180
18254
|
}, [eligibility]);
|
|
18181
|
-
const verification = useEventRegistrationStripeReturn({
|
|
18255
|
+
const verification = deps.useEventRegistrationStripeReturn({
|
|
18182
18256
|
api,
|
|
18183
18257
|
events: registrationEvents,
|
|
18184
18258
|
occurrenceId,
|
|
@@ -18442,10 +18516,10 @@ function useEventRegistrationWizard(options) {
|
|
|
18442
18516
|
if (discountContext?.type !== "event") return void 0;
|
|
18443
18517
|
return ticketSelectionSubtotalCents;
|
|
18444
18518
|
}, [discountContext, ticketSelectionSubtotalCents]);
|
|
18445
|
-
const discountUi = useDiscountCodeUi({ api, discountContext, subtotalCents: discountSubtotalCents });
|
|
18519
|
+
const discountUi = deps.useDiscountCodeUi({ api, discountContext, subtotalCents: discountSubtotalCents });
|
|
18446
18520
|
const selectionMethod = paymentSelection.method;
|
|
18447
18521
|
const shouldShowDiscountToggle = discountContext !== null && discountUi.manualCodeEntryAllowed && (selectionMethod === "stripe" || selectionMethod === "pass_bundle" || selectionMethod === "membership_bundle");
|
|
18448
|
-
const handleSubmit = useEventRegistrationSubmit({
|
|
18522
|
+
const handleSubmit = deps.useEventRegistrationSubmit({
|
|
18449
18523
|
api,
|
|
18450
18524
|
registrationTarget,
|
|
18451
18525
|
selectedAttendanceMode,
|
|
@@ -19326,6 +19400,9 @@ import { jsx as jsx12 } from "react/jsx-runtime";
|
|
|
19326
19400
|
|
|
19327
19401
|
// ../blocks/src/system/runtime/hooks/useHeadlessEventRegistrationFlow.ts
|
|
19328
19402
|
import React4, { useCallback as useCallback7, useMemo as useMemo8 } from "react";
|
|
19403
|
+
var eventRegistrationControllerDeps = {
|
|
19404
|
+
useEventRegistrationWizard
|
|
19405
|
+
};
|
|
19329
19406
|
function HeadlessEventRegistrationProvider({
|
|
19330
19407
|
config,
|
|
19331
19408
|
children
|
|
@@ -19336,7 +19413,10 @@ function useHeadlessEventRegistrationFlow(options) {
|
|
|
19336
19413
|
return useEventRegistrationController(options).flow;
|
|
19337
19414
|
}
|
|
19338
19415
|
function useEventRegistrationController(options) {
|
|
19339
|
-
|
|
19416
|
+
return useEventRegistrationControllerWithDeps(options, eventRegistrationControllerDeps);
|
|
19417
|
+
}
|
|
19418
|
+
function useEventRegistrationControllerWithDeps(options, deps) {
|
|
19419
|
+
const { wizard } = useEventRegistrationWizardControllerWithDeps(options, deps);
|
|
19340
19420
|
const steps = useMemo8(
|
|
19341
19421
|
() => deriveEventRegistrationSteps({
|
|
19342
19422
|
step: wizard.step,
|
|
@@ -19581,9 +19661,9 @@ function useEventRegistrationController(options) {
|
|
|
19581
19661
|
};
|
|
19582
19662
|
return { flow, wizard };
|
|
19583
19663
|
}
|
|
19584
|
-
function
|
|
19664
|
+
function useEventRegistrationWizardControllerWithDeps(options, deps) {
|
|
19585
19665
|
const maxTicketsNum = normalizeEventRegistrationMaxTickets(options.maxTickets);
|
|
19586
|
-
const wizard = useEventRegistrationWizard({
|
|
19666
|
+
const wizard = deps.useEventRegistrationWizard({
|
|
19587
19667
|
anchorId: options.anchorId ?? "event-registration",
|
|
19588
19668
|
occurrenceContext: options.occurrenceContext ?? null,
|
|
19589
19669
|
contentEntry: options.contentEntry ?? null,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { normalizeCarouselProps, CarouselNodeClient } from './chunk-JNE6UI6U.mjs';
|
|
2
2
|
import './chunk-6N7YRNYU.mjs';
|
|
3
3
|
import { mountReactIsland } from './chunk-N7PBWBWQ.mjs';
|
|
4
|
-
import { defineIslandPropsDecoder } from './chunk-
|
|
4
|
+
import { defineIslandPropsDecoder } from './chunk-R4XK3CKR.mjs';
|
|
5
5
|
import './chunk-PCHACQEB.mjs';
|
|
6
6
|
import { jsx } from 'react/jsx-runtime';
|
|
7
7
|
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { mountShopBlockIsland, CartClient } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
import { mountShopBlockIsland, CartClient } from './chunk-ET2MDQQT.mjs';
|
|
2
|
+
import './chunk-HBQEAOG4.mjs';
|
|
3
3
|
import './chunk-JNE6UI6U.mjs';
|
|
4
4
|
import './chunk-6N7YRNYU.mjs';
|
|
5
5
|
import './chunk-L4J5Y62O.mjs';
|
|
6
|
-
import './chunk-
|
|
6
|
+
import './chunk-SK2BMD22.mjs';
|
|
7
7
|
import './chunk-3DCJ45Z2.mjs';
|
|
8
8
|
import './chunk-WBQG7VJA.mjs';
|
|
9
|
-
import './chunk-
|
|
9
|
+
import './chunk-KDP7ZRZV.mjs';
|
|
10
10
|
import './chunk-N7PBWBWQ.mjs';
|
|
11
|
-
import { defineIslandPropsDecoder } from './chunk-
|
|
11
|
+
import { defineIslandPropsDecoder } from './chunk-R4XK3CKR.mjs';
|
|
12
12
|
import './chunk-PCHACQEB.mjs';
|
|
13
13
|
|
|
14
14
|
// src/rendering/islands/enhancers/cart.tsx
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { mountShopBlockIsland, CheckoutClient } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
import { mountShopBlockIsland, CheckoutClient } from './chunk-ET2MDQQT.mjs';
|
|
2
|
+
import './chunk-HBQEAOG4.mjs';
|
|
3
3
|
import './chunk-JNE6UI6U.mjs';
|
|
4
4
|
import './chunk-6N7YRNYU.mjs';
|
|
5
5
|
import './chunk-L4J5Y62O.mjs';
|
|
6
|
-
import './chunk-
|
|
6
|
+
import './chunk-SK2BMD22.mjs';
|
|
7
7
|
import './chunk-3DCJ45Z2.mjs';
|
|
8
8
|
import './chunk-WBQG7VJA.mjs';
|
|
9
|
-
import './chunk-
|
|
9
|
+
import './chunk-KDP7ZRZV.mjs';
|
|
10
10
|
import './chunk-N7PBWBWQ.mjs';
|
|
11
|
-
import { defineIslandPropsDecoder } from './chunk-
|
|
11
|
+
import { defineIslandPropsDecoder } from './chunk-R4XK3CKR.mjs';
|
|
12
12
|
import './chunk-PCHACQEB.mjs';
|
|
13
13
|
|
|
14
14
|
// src/rendering/islands/enhancers/checkout.tsx
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { useBlockApi } from './chunk-
|
|
3
|
-
import { themeButtonClassName, assertNever } from './chunk-
|
|
2
|
+
import { useBlockApi } from './chunk-KDP7ZRZV.mjs';
|
|
3
|
+
import { themeButtonClassName, assertNever } from './chunk-R4XK3CKR.mjs';
|
|
4
4
|
import { resolvePlanningDateInput, formatBookingPriceDisplay } from './chunk-PCHACQEB.mjs';
|
|
5
5
|
import { useState, useReducer, useSyncExternalStore, useEffect } from 'react';
|
|
6
6
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
@@ -373,6 +373,9 @@ function getWaitlistClaimTokenFromUrl() {
|
|
|
373
373
|
const token = new URLSearchParams(window.location.search).get("waitlist_claim")?.trim() ?? "";
|
|
374
374
|
return token.length > 0 ? token : null;
|
|
375
375
|
}
|
|
376
|
+
var useWaitlistClaimDeps = {
|
|
377
|
+
useBlockApi
|
|
378
|
+
};
|
|
376
379
|
function subscribeToWaitlistClaimToken(callback) {
|
|
377
380
|
if (typeof window === "undefined") {
|
|
378
381
|
return () => {
|
|
@@ -388,7 +391,10 @@ function getWaitlistClaimTokenSnapshot() {
|
|
|
388
391
|
return getWaitlistClaimTokenFromUrl();
|
|
389
392
|
}
|
|
390
393
|
function useWaitlistClaim() {
|
|
391
|
-
|
|
394
|
+
return useWaitlistClaimWithDeps(useWaitlistClaimDeps);
|
|
395
|
+
}
|
|
396
|
+
function useWaitlistClaimWithDeps(deps) {
|
|
397
|
+
const api = deps.useBlockApi();
|
|
392
398
|
const token = useSyncExternalStore(
|
|
393
399
|
subscribeToWaitlistClaimToken,
|
|
394
400
|
getWaitlistClaimTokenSnapshot,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { formatPrice } from './chunk-
|
|
3
|
-
import { assertNever } from './chunk-
|
|
2
|
+
import { formatPrice } from './chunk-SK2BMD22.mjs';
|
|
3
|
+
import { assertNever } from './chunk-R4XK3CKR.mjs';
|
|
4
4
|
import { resolveFlexibleBalanceInitialPaymentCents, resolveFlexibleBalanceDueAt, getBookingInstalmentDepositRefundability, splitAmountWithRemainderInFirst, addIntervalPreservingMonthAnchor, clampConfiguredAmount, getBookingInstalmentPlanIntervalCount, omitZeroAmountFutureRows } from './chunk-PCHACQEB.mjs';
|
|
5
5
|
import { useReducer, useRef, useCallback, useEffect } from 'react';
|
|
6
6
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { addPassToCommerceCart, useCommerceCart } from './chunk-
|
|
2
|
+
import { addPassToCommerceCart, useCommerceCart } from './chunk-HBQEAOG4.mjs';
|
|
3
3
|
import { CarouselNodeClient } from './chunk-JNE6UI6U.mjs';
|
|
4
4
|
import { buildRouteIslandApiConfig } from './chunk-L4J5Y62O.mjs';
|
|
5
|
-
import { useDiscountCodeUi, createBodyThemePortalRoot, consumeSearchParams, scrollToBlock, TerminalPanel, StateIcon, CheckIcon, CrossIcon, ActionRow, DiscountCodeDisclosure, consumeSearchParam, buildCheckoutReturnUrls } from './chunk-
|
|
5
|
+
import { useDiscountCodeUi, createBodyThemePortalRoot, consumeSearchParams, scrollToBlock, TerminalPanel, StateIcon, CheckIcon, CrossIcon, ActionRow, DiscountCodeDisclosure, consumeSearchParam, buildCheckoutReturnUrls } from './chunk-SK2BMD22.mjs';
|
|
6
6
|
import { ModalShell, resolveDedicatedCheckoutPath } from './chunk-WBQG7VJA.mjs';
|
|
7
|
-
import { useBlockApi, FeedbackMessage, BlockApiProvider, discountAvailabilityHasDiscounts, discountAvailabilityAllowsManualEntry, getAutoAppliedDiscountPreview } from './chunk-
|
|
7
|
+
import { useBlockApi, FeedbackMessage, BlockApiProvider, discountAvailabilityHasDiscounts, discountAvailabilityAllowsManualEntry, getAutoAppliedDiscountPreview } from './chunk-KDP7ZRZV.mjs';
|
|
8
8
|
import { mountReactIsland } from './chunk-N7PBWBWQ.mjs';
|
|
9
|
-
import { themeButtonClassName, formatCommercePrice, formatInterval, getShopDisplayForItems, deriveCommerceCheckoutState, buildProductDetailDisplay, productItemKey, buildProductCartItem, buildProductCardDisplay, assertNever as assertNever$1, reportWorkflowError, clearWorkflowFeedback, unwrapRichTextRoot, createRichTextDocFromMarkdown, isRecord } from './chunk-
|
|
9
|
+
import { themeButtonClassName, formatCommercePrice, formatInterval, getShopDisplayForItems, deriveCommerceCheckoutState, buildProductDetailDisplay, productItemKey, buildProductCartItem, buildProductCardDisplay, assertNever as assertNever$1, reportWorkflowError, clearWorkflowFeedback, unwrapRichTextRoot, createRichTextDocFromMarkdown, isRecord } from './chunk-R4XK3CKR.mjs';
|
|
10
10
|
import { assertNever, ok, err, getCurrentResolveImageUrlContext, resolveImageUrlWithContext, ImagePresets } from './chunk-PCHACQEB.mjs';
|
|
11
11
|
import * as React3 from 'react';
|
|
12
12
|
import React3__default, { useState, useRef, useCallback, useEffect } from 'react';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EMPTY_COMMERCE_CART_STATE, parseStoredCommerceCartState, reduceCommerceCart, buildPassCartItem } from './chunk-
|
|
1
|
+
import { EMPTY_COMMERCE_CART_STATE, parseStoredCommerceCartState, reduceCommerceCart, buildPassCartItem } from './chunk-R4XK3CKR.mjs';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
|
|
4
4
|
var EMPTY_STATE = EMPTY_COMMERCE_CART_STATE;
|