@riverbankcms/sdk 0.95.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 +47 -5
- package/dist/{PreviewEditorSidebar-6FQYKOSB.mjs → PreviewEditorSidebar-CG3SSJND.mjs} +3 -3
- package/dist/{PreviewEditorUI-NPO2XMFB.mjs → PreviewEditorUI-RHNGKAAU.mjs} +3 -3
- package/dist/SdkPreviewModeRuntime-OV5PNJBB.mjs +8 -0
- package/dist/_dts/ai/src/contracts/proposals.d.ts +10 -10
- 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/block-form/src/client/index.d.ts +1 -1
- package/dist/_dts/block-form/src/fields/types.d.ts +9 -1
- package/dist/_dts/block-form/src/registry/schemas.d.ts +4 -0
- package/dist/_dts/block-form/src/registry/widgets.d.ts +1 -0
- package/dist/_dts/block-form/src/widgets/InlineTextField/InlineTextField.d.ts +4 -0
- package/dist/_dts/block-form/src/widgets/InlineTextField/index.d.ts +3 -0
- package/dist/_dts/block-form/src/widgets/InlineTextField/inlineTextFieldDefaults.d.ts +2 -0
- package/dist/_dts/block-form/src/widgets/InlineTextField/inlineTextFieldSchema.d.ts +3 -0
- package/dist/_dts/blocks/src/PageRenderer.d.ts +2 -1
- package/dist/_dts/blocks/src/bindings/index.d.ts +1 -0
- package/dist/_dts/blocks/src/bindings/types.d.ts +1 -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/index.d.ts +2 -0
- package/dist/_dts/blocks/src/primitives/content/primitives.d.ts +4 -0
- package/dist/_dts/blocks/src/system/blocks/appointment-booking.d.ts +2 -29631
- package/dist/_dts/blocks/src/system/blocks/blog-listing.d.ts +2 -29614
- package/dist/_dts/blocks/src/system/blocks/cart.d.ts +2 -29634
- package/dist/_dts/blocks/src/system/blocks/checkout.d.ts +2 -29627
- package/dist/_dts/blocks/src/system/blocks/collection.d.ts +2 -29585
- 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/faq.d.ts +2 -29677
- package/dist/_dts/blocks/src/system/blocks/gifting.d.ts +2 -29655
- package/dist/_dts/blocks/src/system/blocks/index.d.ts +1 -0
- package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +220 -0
- package/dist/_dts/blocks/src/system/blocks/product-detail.d.ts +2 -29655
- package/dist/_dts/blocks/src/system/blocks/product-list.d.ts +2 -29685
- package/dist/_dts/blocks/src/system/blocks/shop.d.ts +2 -29761
- 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/fragments/library/heroCopy.d.ts +9 -0
- package/dist/_dts/blocks/src/system/inlineText.d.ts +78 -0
- package/dist/_dts/blocks/src/system/manifest/derivedContent.d.ts +3 -1
- package/dist/_dts/blocks/src/system/manifest/fieldValidation/index.d.ts +15 -3
- package/dist/_dts/blocks/src/system/manifest/schema.d.ts +188 -7
- 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/basic.d.ts +2 -1
- 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/renderInlineText.d.ts +3 -0
- 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/index.d.ts +1 -0
- package/dist/_dts/content-editor/src/primitives/PreviewInlineTextEditor.d.ts +9 -0
- package/dist/_dts/content-editor/src/primitives/PreviewRichTextEditor.d.ts +1 -1
- package/dist/_dts/content-model/src/templates/bindingTypeCompatibility.d.ts +1 -1
- package/dist/_dts/content-model/src/templates/defaults.d.ts +30 -0
- package/dist/_dts/content-model/src/templates/types.d.ts +3 -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/editor/src/inline/FloatingToolbar.d.ts +18 -0
- package/dist/_dts/editor/src/inline/InlineTextEditor.d.ts +18 -1
- package/dist/_dts/editor/src/inline/InlineTextEditorStyles.d.ts +1 -0
- package/dist/_dts/editor/src/inline/domParse.d.ts +3 -0
- package/dist/_dts/editor/src/inline/presentation.d.ts +48 -0
- package/dist/_dts/editor/src/inline/selection.d.ts +12 -0
- package/dist/_dts/editor-blocks/src/widgets/index.d.ts +1 -0
- package/dist/_dts/editor-blocks/src/widgets/inline-text/InlineTextField.d.ts +3 -0
- package/dist/_dts/editor-blocks/src/widgets/inline-text/index.d.ts +1 -0
- package/dist/_dts/field-primitives/src/bindings/index.d.ts +8 -0
- package/dist/_dts/path-utils/src/index.d.ts +1 -0
- package/dist/_dts/preview-next/src/client/widgets/widgetOverrides.d.ts +1 -0
- package/dist/_dts/sdk/src/cli/commands/content.d.ts +56 -0
- package/dist/_dts/sdk/src/cli/commands/push/options.d.ts +4 -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 +4 -7
- package/dist/_dts/sdk/src/cli/commands/push/scopes/types.d.ts +5 -1
- package/dist/_dts/sdk/src/cli/commands/push/stale-resolution.d.ts +9 -3
- package/dist/_dts/sdk/src/cli/commands/push/verification.d.ts +56 -0
- package/dist/_dts/sdk/src/cli/commands/push/workflowPlan.d.ts +34 -0
- package/dist/_dts/sdk/src/cli/commands/push-execute.d.ts +2 -1
- 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/edit/format.d.ts +2 -0
- package/dist/_dts/sdk/src/cli/content/edit/path.d.ts +14 -0
- package/dist/_dts/sdk/src/cli/content/edit/planner.d.ts +46 -0
- package/dist/_dts/sdk/src/cli/content/fs-utils.d.ts +4 -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 +8 -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/mergeFieldChanges.d.ts +22 -0
- package/dist/_dts/sdk/src/cli/merge-remote/pageLocal.d.ts +3 -0
- package/dist/_dts/sdk/src/cli/merge-remote/pageMerge.d.ts +78 -0
- package/dist/_dts/sdk/src/cli/merge-remote/pageMergePlan.d.ts +36 -0
- package/dist/_dts/sdk/src/cli/merge-remote/pageMergePush.d.ts +23 -0
- package/dist/_dts/sdk/src/cli/merge-remote/pageMergeReport.d.ts +29 -0
- package/dist/_dts/sdk/src/cli/merge-remote/pageSnapshots.d.ts +48 -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/cli/sync/diff.d.ts +3 -6
- package/dist/_dts/sdk/src/cli/sync/field-diff.d.ts +39 -0
- package/dist/_dts/sdk/src/cli/sync/index.d.ts +1 -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/field-definitions.d.ts +8 -3
- package/dist/_dts/sdk/src/config/typed-entries.d.ts +5 -3
- 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 +4 -7
- package/dist/_dts/sdk/src/contracts/content.d.ts +18 -0
- package/dist/_dts/sdk/src/contracts/index.d.ts +1 -1
- package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +16 -2
- 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 -3
- 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/_dts/theme-core/src/accordions/types.d.ts +1 -1
- package/dist/_dts/theme-core/src/buttons/types.d.ts +1 -1
- package/dist/_dts/theme-core/src/cards/types.d.ts +15 -15
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/inputs/types.d.ts +1 -1
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +42 -42
- package/dist/_dts/theme-core/src/palette/variants/types.d.ts +2 -2
- package/dist/_dts/theme-core/src/schema.d.ts +44 -44
- package/dist/_dts/theme-core/src/site-styles/backgroundAppearance.d.ts +2 -2
- package/dist/_dts/theme-core/src/site-styles/designState.d.ts +16 -16
- package/dist/_dts/theme-core/src/site-styles/pageDesignIntent.d.ts +4 -4
- package/dist/_dts/theme-core/src/site-styles/tokenRecipes.d.ts +1 -1
- package/dist/_dts/theme-core/src/tokens/themeColorTokens.d.ts +1 -1
- package/dist/{chunk-4A6NWO3X.mjs → chunk-6WDBXCPX.mjs} +73 -12
- package/dist/{chunk-VZBSD4AJ.mjs → chunk-DBRI3PQF.mjs} +2281 -322
- package/dist/{chunk-PJPFTVZG.mjs → chunk-H24OU7WG.mjs} +106 -4
- package/dist/{chunk-K2SJTZMX.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 +4182 -1165
- package/dist/cli/init-docs/content/cli-reference.md +72 -5
- package/dist/cli/init-docs/content/content-management.md +22 -0
- 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-LGO4IO5U.mjs → accordion-Q2BDNL53.mjs} +1 -1
- package/dist/client/{bookingForm-MWLS4LGU.mjs → bookingForm-ZMP4P7EK.mjs} +16 -6
- package/dist/client/bookings.mjs +98 -18
- package/dist/client/{carousel-6AHNP5HA.mjs → carousel-LW3UXPWO.mjs} +1 -1
- package/dist/client/{cart-CIXGYAZB.mjs → cart-Z6D3KS6K.mjs} +5 -5
- package/dist/client/{checkout-OTX6O3DN.mjs → checkout-YMT2QJQM.mjs} +5 -5
- package/dist/client/{chunk-Y2PMKCXO.mjs → chunk-26ZBRXFR.mjs} +9 -3
- package/dist/client/{chunk-MYCXAKWP.mjs → chunk-DRRQ7QSL.mjs} +2 -2
- package/dist/client/{chunk-TREIML53.mjs → chunk-ET2MDQQT.mjs} +4 -4
- package/dist/client/{chunk-AVBQSUIS.mjs → chunk-HBQEAOG4.mjs} +1 -1
- package/dist/client/{chunk-INRIT6DP.mjs → chunk-IEOECM7U.mjs} +62 -43
- package/dist/client/{chunk-TNGL2WJF.mjs → chunk-KDP7ZRZV.mjs} +16 -0
- package/dist/client/{chunk-V67AT7ZW.mjs → chunk-R4XK3CKR.mjs} +18 -1
- package/dist/client/{chunk-R3NQTBWE.mjs → chunk-SK2BMD22.mjs} +2 -2
- package/dist/client/{chunk-HOP7MKAZ.mjs → chunk-XNTHVZ25.mjs} +1 -1
- package/dist/client/client.mjs +5172 -4177
- package/dist/client/{courseRegistration-2LU6C3JL.mjs → courseRegistration-DGKCMC77.mjs} +4 -4
- package/dist/client/{eventCalendar-OKUSISBZ.mjs → eventCalendar-74Z2NNFM.mjs} +7 -7
- package/dist/client/{eventCombined-CMF6CD4S.mjs → eventCombined-GK2ODOX2.mjs} +7 -7
- package/dist/client/{eventDetails-XYWH7WXI.mjs → eventDetails-MONAGT3N.mjs} +7 -7
- package/dist/client/{eventListing-EK5DJTAH.mjs → eventListing-SKGAO6PS.mjs} +7 -7
- package/dist/client/{eventRegistration-XDOSICV6.mjs → eventRegistration-6KISGXRD.mjs} +7 -7
- package/dist/client/{form-J6GOHKYG.mjs → form-FXPRTXHI.mjs} +2 -2
- package/dist/client/{headerSection-C5SYJTRW.mjs → headerSection-7NAN5WNB.mjs} +2 -2
- package/dist/client/hooks.mjs +1681 -1337
- package/dist/client/{locationMap-QSQIFVVT.mjs → locationMap-UERN74U4.mjs} +2 -2
- package/dist/client/{newsletterForm-47VXJRWK.mjs → newsletterForm-SGWXMJ7U.mjs} +2 -2
- package/dist/client/{productDetail-5U6ISCC2.mjs → productDetail-HN3HWZQZ.mjs} +5 -5
- package/dist/client/{productList-XDZUMR3P.mjs → productList-YT22Z5UR.mjs} +5 -5
- package/dist/client/rendering/client.mjs +4796 -4288
- package/dist/client/rendering/islands.mjs +18 -18
- package/dist/client/rendering.mjs +2120 -1106
- package/dist/client/{shop-ZSZKIY3R.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-PHNM7MRD.mjs → sdk-runtime-LWNYCQF2.mjs} +6 -6
- package/dist/server/components.mjs +3777 -2981
- package/dist/server/config-template-validation.mjs +35 -22
- package/dist/server/config-validation.mjs +1883 -1565
- package/dist/server/config.mjs +1883 -1565
- package/dist/server/data.mjs +1667 -1334
- package/dist/server/index.mjs +208 -9
- package/dist/server/next/middleware.mjs +2 -2
- package/dist/server/next.mjs +4077 -3060
- package/dist/server/page-converter.mjs +1481 -1279
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +3806 -2993
- package/dist/server/rendering.mjs +4000 -3060
- package/dist/server/routing.mjs +1737 -1357
- package/dist/server/server.mjs +2918 -2276
- package/dist/server/theme-bridge.mjs +43 -0
- package/dist/styles/index.css +44 -0
- package/package.json +1 -1
- package/dist/SdkPreviewModeRuntime-PBEFH5AL.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,15 +196,16 @@ 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 |
|
|
180
|
-
| `--merge-remote` | Plan an entries
|
|
203
|
+
| `--merge-remote` | Plan an entries/pages three-way merge for `--env=remote` that preserves remote edits |
|
|
181
204
|
| `--delete-orphaned` | Delete CMS entries not present in local files |
|
|
182
205
|
| `--auto-pull-stale` | Automatically pull stale content and retry push |
|
|
183
206
|
| `--no-meta` | Skip writing `.meta/` and media manifest files (content files still written) |
|
|
184
207
|
| `--diff` | Show human-readable field-level diff with before/after values (requires `--dry-run`) |
|
|
208
|
+
| `--verify-noop` | After an applied push, re-fetch the target and fail if changes remain |
|
|
185
209
|
| `--delete-missing` | **[Deprecated]** Use `--delete-orphaned` instead |
|
|
186
210
|
|
|
187
211
|
**Theme files:**
|
|
@@ -206,9 +230,9 @@ riverbankcms push entries service-tile --env=remote --yes --delete-orphaned
|
|
|
206
230
|
|
|
207
231
|
**Warning:** This is a destructive operation. Always use `--dry-run` first to preview which entries will be deleted.
|
|
208
232
|
|
|
209
|
-
**Remote-aware
|
|
233
|
+
**Remote-aware content merge:**
|
|
210
234
|
|
|
211
|
-
Use `--merge-remote` when pushing entries to production and you want to preserve remote dashboard edits instead of treating local files as the whole source of truth. The CLI compares the last pulled base snapshot, local
|
|
235
|
+
Use `--merge-remote` when pushing entries or pages to production and you want to preserve remote dashboard edits instead of treating local files as the whole source of truth. The CLI compares the last pulled base snapshot, local files, and current remote content, then prints a merge plan. Remote runs still default to dry-run; add `--yes` only after reviewing the plan. Page block changes are treated conservatively as conflicts unless remote blocks are unchanged.
|
|
212
236
|
|
|
213
237
|
```bash
|
|
214
238
|
# Preview a merge for one content type
|
|
@@ -219,14 +243,50 @@ riverbankcms push entries blog-post --env=remote --merge-remote --yes
|
|
|
219
243
|
|
|
220
244
|
# Target a single entry
|
|
221
245
|
riverbankcms push entries blog-post welcome --env=remote --merge-remote --yes
|
|
246
|
+
|
|
247
|
+
# Target a single page
|
|
248
|
+
riverbankcms push pages home --env=remote --merge-remote
|
|
222
249
|
```
|
|
223
250
|
|
|
224
|
-
In v1 this mode
|
|
251
|
+
In v1 this mode supports `entries` and `pages` with `--env=remote`. It rejects `--env=both`, unsupported scopes, `--force`, `--delete-orphaned`, and `--auto-pull-stale`.
|
|
252
|
+
|
|
253
|
+
**Local content edit helpers:**
|
|
254
|
+
|
|
255
|
+
Use `content edit` for local file-backed edits. These commands do not call the CMS. They preview by default and require `--write` to mutate local files.
|
|
256
|
+
|
|
257
|
+
```bash
|
|
258
|
+
# Preview removing a block from content/pages/home.json
|
|
259
|
+
riverbankcms content edit remove-page-block home old-hero
|
|
260
|
+
|
|
261
|
+
# Move a page block and write the file
|
|
262
|
+
riverbankcms content edit move-page-block home intro --after hero --write
|
|
263
|
+
|
|
264
|
+
# Set a string field
|
|
265
|
+
riverbankcms content edit set-page-field home title --value "New title" --write
|
|
266
|
+
|
|
267
|
+
# Set a JSON value
|
|
268
|
+
riverbankcms content edit set-page-field home blocks[0].data.count --json-value 3
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
After editing, run `riverbankcms push --dry-run --diff`, then push with `--verify-noop` when ready.
|
|
272
|
+
|
|
273
|
+
**Post-push no-op verification:**
|
|
274
|
+
|
|
275
|
+
Use `--verify-noop` when automation should prove the target CMS compares cleanly after an applied push. Verification re-reads local files from disk, re-fetches the target environment, and fails the command if remaining changes are found.
|
|
276
|
+
|
|
277
|
+
```bash
|
|
278
|
+
riverbankcms push --yes --verify-noop
|
|
279
|
+
riverbankcms push --env=both --yes --verify-noop
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
`--verify-noop` cannot be combined with `--dry-run`; dry-run already answers the pre-push question. For remote targets, pass `--yes` so the push actually applies before verification. In JSON mode the CLI emits a `verification` object with `clean`, `dirty`, `fetch_failed`, or `unsupported_scope` status. A dirty result usually means the push did not leave the target in sync, but it can also mean another user or process changed remote content between the push and verification fetch.
|
|
225
283
|
|
|
226
284
|
**Stale Content Detection:**
|
|
227
285
|
|
|
228
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.
|
|
229
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
|
+
|
|
230
290
|
Options for handling stale content:
|
|
231
291
|
|
|
232
292
|
- **Interactive prompt** (default in TTY): Push asks whether to pull the stale items and retry.
|
|
@@ -249,6 +309,7 @@ For theme and footer pushes, stale resolution updates only the metadata timestam
|
|
|
249
309
|
- Add `identifier` to media fields (slug only, no extension)
|
|
250
310
|
- Place files at `content/media/<identifier>.<ext>`
|
|
251
311
|
- Run `riverbankcms push` to upload referenced files (default-on)
|
|
312
|
+
- Treat `content/media/*` as local cache/migration working data by default. Generated SDK sites gitignore it, while allowing intentional small fixtures under `content/media/fixtures/`.
|
|
252
313
|
|
|
253
314
|
**Branding workflow (`content/settings.json`):**
|
|
254
315
|
|
|
@@ -292,12 +353,15 @@ Push SDK configuration to the CMS dashboard.
|
|
|
292
353
|
|
|
293
354
|
```bash
|
|
294
355
|
riverbankcms push-config
|
|
356
|
+
riverbankcms push-config --dry-run
|
|
295
357
|
riverbankcms push-config --env=remote
|
|
296
358
|
riverbankcms push-config --config ./src/riverbank.config.ts
|
|
297
359
|
```
|
|
298
360
|
|
|
299
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.
|
|
300
362
|
|
|
363
|
+
Use `--dry-run` to validate config and preview the schema/config surfaces that would be considered without mutating the dashboard.
|
|
364
|
+
|
|
301
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.
|
|
302
366
|
|
|
303
367
|
This syncs:
|
|
@@ -1099,4 +1163,7 @@ riverbankcms push --env=remote --yes
|
|
|
1099
1163
|
|
|
1100
1164
|
# Push to both local and remote
|
|
1101
1165
|
riverbankcms push --env=both --yes
|
|
1166
|
+
|
|
1167
|
+
# Push to both and verify both targets are clean afterwards
|
|
1168
|
+
riverbankcms push --env=both --yes --verify-noop
|
|
1102
1169
|
```
|
|
@@ -176,6 +176,27 @@ Rich text images (TipTap JSON) are also identifier-based:
|
|
|
176
176
|
- Store images as `{ type: "image", attrs: { identifier: "..." } }` (no persisted `attrs.src`)
|
|
177
177
|
- External `attrs.src` URLs are auto-imported into CMS media on write
|
|
178
178
|
|
|
179
|
+
### `content/media` is local cache by default
|
|
180
|
+
|
|
181
|
+
The generated SDK site `.gitignore` treats `content/media/*` as local cache and
|
|
182
|
+
migration working data by default. This prevents large downloaded files, such as
|
|
183
|
+
audio libraries or environment-clone media, from being staged accidentally. The
|
|
184
|
+
portable source of truth is the media identifier in content JSON; local files are
|
|
185
|
+
only the bytes used by pull/push workflows.
|
|
186
|
+
|
|
187
|
+
If a project intentionally wants to version a few small media fixtures, place
|
|
188
|
+
them under `content/media/fixtures/`. That directory is unignored by the generated
|
|
189
|
+
pattern. For existing SDK repos that already committed local media, opt in to the
|
|
190
|
+
new default with:
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
git rm --cached -r content/media
|
|
194
|
+
git add .gitignore
|
|
195
|
+
git commit -m "Treat content/media as local cache"
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
Review the staged diff before committing if you keep intentional fixtures.
|
|
199
|
+
|
|
179
200
|
### Managing Site Logo and Favicon
|
|
180
201
|
|
|
181
202
|
Use `content/settings.json` as the repo-managed source of truth for branding:
|
|
@@ -409,6 +430,7 @@ Notes:
|
|
|
409
430
|
|
|
410
431
|
- `--sync-media` is **identifier + checksum** based. If the target already has an identifier with different bytes, the command fails unless you pass `--overwrite-media`.
|
|
411
432
|
- When pulling from remote, `--sync-media` may need to **write to the source CMS** to backfill missing identifiers, so remote sync requires `--yes`.
|
|
433
|
+
- Local media bytes live under `content/media/`, which is treated as cache/migration working data by default in generated SDK sites.
|
|
412
434
|
|
|
413
435
|
#### Promote local files → production CMS
|
|
414
436
|
|
|
@@ -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
|