@riverbankcms/sdk 0.146.0 → 0.148.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/CHANGELOG.md +28 -0
- package/dist/{PreviewEditorSidebar-kg2r2Fyi.mjs → PreviewEditorSidebar-DvEPG3Z2.mjs} +249 -172
- package/dist/{PreviewEditorUI-sWMLp5dT.mjs → PreviewEditorUI-D6eb6fkx.mjs} +68 -60
- package/dist/{PreviewQueryProvider-Cg51xq1w.mjs → PreviewQueryProvider-5znTyJuz.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-h2ti3Hch.mjs → SdkPreviewModeRuntime-DJ6utQ_R.mjs} +1180 -475
- package/dist/{SiteChromeCustomizeContext-DEACFH9m.mjs → SiteChromeCustomizeContext-CFJYh6vo.mjs} +199078 -193767
- package/dist/_dts/ai/src/contracts/proposals.d.ts +198 -33
- package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +18 -3
- package/dist/_dts/api/src/accessAdmin.d.ts +0 -4
- package/dist/_dts/api/src/accountApi.d.ts +6 -6
- package/dist/_dts/api/src/admin.d.ts +22 -22
- package/dist/_dts/api/src/aiPatch.d.ts +2 -2
- package/dist/_dts/api/src/aiPlayground.d.ts +1 -0
- package/dist/_dts/api/src/analytics.d.ts +2 -2
- package/dist/_dts/api/src/apiEndpointTypes.d.ts +2 -0
- package/dist/_dts/api/src/appointmentSetup.d.ts +2 -2
- package/dist/_dts/api/src/auth.d.ts +10 -10
- package/dist/_dts/api/src/availability.d.ts +6 -6
- package/dist/_dts/api/src/billing.d.ts +42 -15
- package/dist/_dts/api/src/billingEndpointDefinitions.d.ts +8 -0
- package/dist/_dts/api/src/billingEndpointTypes.d.ts +15 -6
- package/dist/_dts/api/src/blocks.d.ts +15 -14
- package/dist/_dts/api/src/blocksKeys.d.ts +2 -0
- package/dist/_dts/api/src/bookingConfig.d.ts +16 -2
- package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +4 -13
- package/dist/_dts/api/src/bookingOperations.d.ts +6 -48
- package/dist/_dts/api/src/bookingPeople.d.ts +92 -0
- package/dist/_dts/api/src/bookingPeopleEndpointDefinitions.d.ts +38 -0
- package/dist/_dts/api/src/bookingRecords.d.ts +12 -49
- package/dist/_dts/api/src/bookingSettingsSections.d.ts +1 -1
- package/dist/_dts/api/src/bookings.d.ts +8 -7
- package/dist/_dts/api/src/calendar.d.ts +9 -9
- package/dist/_dts/api/src/commercePortalEndpoints.d.ts +7 -6
- package/dist/_dts/api/src/common/envelope.d.ts +2 -2
- package/dist/_dts/api/src/content-editor.d.ts +2 -2
- package/dist/_dts/api/src/contentEntries.d.ts +17 -48
- package/dist/_dts/api/src/contentRuntime.d.ts +51 -37
- package/dist/_dts/api/src/contentTypes.d.ts +11 -11
- package/dist/_dts/api/src/contentVersionHistoryClient.d.ts +6 -6
- package/dist/_dts/api/src/documentLifecycle.d.ts +67 -0
- package/dist/_dts/api/src/domains.d.ts +16 -16
- package/dist/_dts/api/src/editLeaseEndpoints.d.ts +72 -0
- package/dist/_dts/api/src/emailSettings.d.ts +4 -4
- package/dist/_dts/api/src/endpoints.d.ts +725 -607
- package/dist/_dts/api/src/eventEmailTemplates.d.ts +2 -2
- package/dist/_dts/api/src/eventManagementContracts.d.ts +48 -8
- package/dist/_dts/api/src/eventManagementEndpointDefinitions.d.ts +1 -9
- package/dist/_dts/api/src/eventPageWords.d.ts +7 -12
- package/dist/_dts/api/src/footerSettings.d.ts +6 -6
- package/dist/_dts/api/src/index.d.ts +8 -6
- package/dist/_dts/api/src/indexCoreTypes.d.ts +2 -1
- package/dist/_dts/api/src/indexExtendedTypes.d.ts +1 -1
- package/dist/_dts/api/src/launchReadiness.d.ts +1 -6
- package/dist/_dts/api/src/mailingListIntegration.d.ts +6 -0
- package/dist/_dts/api/src/navigation/dashboardBookingsNav.d.ts +1 -1
- package/dist/_dts/api/src/navigation.d.ts +5 -5
- package/dist/_dts/api/src/newsletterEndpointDefinitions.d.ts +15 -0
- package/dist/_dts/api/src/occurrenceScheduling.d.ts +19 -0
- package/dist/_dts/api/src/pageSurfaceEditorEndpoints.d.ts +55 -0
- package/dist/_dts/api/src/pageSurfaceEndpoints.d.ts +28 -7
- package/dist/_dts/api/src/pages.d.ts +7 -7
- package/dist/_dts/api/src/performance.d.ts +1 -1
- package/dist/_dts/api/src/public/index.d.ts +1 -1
- package/dist/_dts/api/src/publicAppointmentBookingContracts.d.ts +50 -0
- package/dist/_dts/api/src/publicExperience/commerceEndpoints.d.ts +4 -0
- package/dist/_dts/api/src/publicExperience/eventEndpoints.d.ts +7 -0
- package/dist/_dts/api/src/redirects.d.ts +3 -3
- package/dist/_dts/api/src/request.d.ts +10 -1
- package/dist/_dts/api/src/resources.d.ts +4 -4
- package/dist/_dts/api/src/routes.d.ts +8 -3
- package/dist/_dts/api/src/sdk-event-upsert.d.ts +15 -1
- package/dist/_dts/api/src/sdkBlockUpsertContracts.d.ts +21 -0
- package/dist/_dts/api/src/sdkContracts.d.ts +5 -28
- package/dist/_dts/api/src/sdkCourseBooking.d.ts +4 -4
- package/dist/_dts/api/src/sdkEventEndpointDefinitions.d.ts +1 -1
- package/dist/_dts/api/src/sdkEventOccurrenceRequestContracts.d.ts +43 -0
- package/dist/_dts/api/src/sdkManagedEventContracts.d.ts +4 -2
- package/dist/_dts/api/src/sdkPullEventContracts.d.ts +8 -1
- package/dist/_dts/api/src/seo.d.ts +4 -4
- package/dist/_dts/api/src/services.d.ts +4 -4
- package/dist/_dts/api/src/siteLifecycleEndpoints.d.ts +61 -0
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +19 -25
- package/dist/_dts/api/src/siteMembers.d.ts +10 -10
- package/dist/_dts/api/src/siteOnboarding.d.ts +16 -14
- package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +7 -3
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +5 -12
- package/dist/_dts/api/src/siteRuntimeEntry.d.ts +31 -0
- package/dist/_dts/billing/src/checkout/platform.d.ts +77 -0
- package/dist/_dts/billing/src/components/index.d.ts +25 -40
- package/dist/_dts/billing/src/membership/index.d.ts +1 -3
- package/dist/_dts/billing/src/plans/entitlements.d.ts +80 -0
- package/dist/_dts/billing/src/plans/registry.d.ts +16 -16
- package/dist/_dts/billing/src/plans/standing.d.ts +9 -2
- package/dist/_dts/billing/src/plans/types.d.ts +5 -15
- package/dist/_dts/billing/src/site-arrangements.d.ts +2 -2
- package/dist/_dts/billing/src/subscriptions/standingEvidence.d.ts +2 -4
- package/dist/_dts/billing/src/subscriptions/store.d.ts +17 -11
- package/dist/_dts/block-form/src/backend/store-backend.d.ts +6 -7
- package/dist/_dts/block-form/src/backend/types.d.ts +7 -0
- package/dist/_dts/block-form/src/widgets/FieldFrame.d.ts +3 -1
- package/dist/_dts/blocks/src/PageRenderer.d.ts +3 -4
- package/dist/_dts/blocks/src/client/events.d.ts +3 -0
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +24 -4
- package/dist/_dts/blocks/src/index.d.ts +1 -1
- package/dist/_dts/blocks/src/pageRenderAdmission.d.ts +18 -9
- package/dist/_dts/blocks/src/pageRendererContracts.d.ts +4 -0
- package/dist/_dts/blocks/src/portal/types.d.ts +0 -2
- package/dist/_dts/blocks/src/system/blocks/contact-newsletter.d.ts +2 -1
- package/dist/_dts/blocks/src/system/blocks/event-registration.d.ts +3 -1
- package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +4 -4
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +6 -1
- package/dist/_dts/blocks/src/system/blocks/newsletter-signup.d.ts +4 -1
- package/dist/_dts/blocks/src/system/runtime/api/client.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/api/index.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/api/types/appointments.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/api/types/events.d.ts +18 -0
- package/dist/_dts/blocks/src/system/runtime/api/types/portal.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/api/types/shop.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/components/booking/SuccessMessage.d.ts +4 -1
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +36 -6
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +18 -3
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessBookingFlow.d.ts +11 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessEventRegistrationFlow.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/usePaymentVerification.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/hooks/usePolling.d.ts +7 -48
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.checkout-return-context.d.ts +7 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.completion.d.ts +11 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.headless.state.d.ts +13 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.interactive.d.ts +28 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.mailing-list-choice.d.ts +5 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.mailing-list-state.d.ts +9 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.payment-confirmation.d.ts +13 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.reserved-fields.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.server.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.state.d.ts +17 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.submit-actions.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.submit-handler.d.ts +9 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.submit-success.d.ts +9 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-runtime-sources.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/checkout.server.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/AttendeeDetailsStep.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationSurface.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationWizard.d.ts +5 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/SuccessStep.d.ts +7 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.contract.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/sessionStorage.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationSubmit.d.ts +5 -5
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +18 -5
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventListing.interactive.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/domain/dates.d.ts +37 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventCard.client.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventCard.d.ts +16 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCardPresentations.d.ts +13 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +5 -5
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.block-submission.d.ts +2 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/shared/MagicLinkForm.d.ts +1 -14
- package/dist/_dts/blocks/src/system/runtime/nodes/shared/MagicLinkForm.state.d.ts +12 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/shop.interactive.d.ts +13 -0
- package/dist/_dts/blocks/src/system/runtime/resolver.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/shared/components/BookingMailingListNote.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/shared/components/DemoBookingPortalAccess.d.ts +22 -0
- package/dist/_dts/blocks/src/system/runtime/shared/components/DemoPortalSignInLink.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/shared/components/index.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/shared/mailingListSignupCopy.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/shared/types.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/shared/utils/demoBookingPassStorage.d.ts +10 -0
- package/dist/_dts/blocks/src/system/runtime/shared/utils/demoPortalMagicLink.d.ts +29 -0
- package/dist/_dts/blocks/src/system/transforms/registry/_utils/surfaceForegroundStyles.d.ts +3 -2
- package/dist/_dts/blocks/src/system/transforms/registry/core.d.ts +2 -0
- package/dist/_dts/blocks/src/system/transforms/registry/layout.d.ts +1 -3
- package/dist/_dts/commerce/src/purchase/event-registration-errors.d.ts +4 -0
- package/dist/_dts/content-editor/src/components/ContentFieldsForm.d.ts +2 -7
- package/dist/_dts/content-editor/src/controller/EditLeaseController.d.ts +39 -0
- package/dist/_dts/content-editor/src/controller/EditorWriteGate.d.ts +38 -0
- package/dist/_dts/content-editor/src/controller/EntryControllerProvider.d.ts +25 -61
- package/dist/_dts/content-editor/src/controller/LinkedEntryLeaseBanner.d.ts +7 -0
- package/dist/_dts/content-editor/src/controller/LinkedEntryLeaseControllers.d.ts +14 -0
- package/dist/_dts/content-editor/src/controller/deriveEditorUnpublishedState.d.ts +6 -0
- package/dist/_dts/content-editor/src/controller/documentValueBaseline.d.ts +25 -0
- package/dist/_dts/content-editor/src/controller/editLeaseLossSignal.d.ts +6 -0
- package/dist/_dts/content-editor/src/controller/editLeaseNotice.d.ts +28 -0
- package/dist/_dts/content-editor/src/controller/editorClientId.d.ts +2 -0
- package/dist/_dts/content-editor/src/controller/editorEditability.d.ts +38 -0
- package/dist/_dts/content-editor/src/controller/editorLeaseParticipation.d.ts +34 -0
- package/dist/_dts/content-editor/src/controller/normalizedMetadataBaseline.d.ts +29 -0
- package/dist/_dts/content-editor/src/controller/pageSurfaceDocumentBaselines.d.ts +14 -0
- package/dist/_dts/content-editor/src/controller/pageSurfaceLifecycle.d.ts +11 -0
- package/dist/_dts/content-editor/src/controller/planDocumentBaselineRefresh.d.ts +19 -0
- package/dist/_dts/content-editor/src/controller/readDocumentLeaseBaselines.d.ts +19 -0
- package/dist/_dts/content-editor/src/controller/refreshDocumentLeaseBaseline.d.ts +12 -0
- package/dist/_dts/content-editor/src/controller/refreshLinkedEntry.d.ts +17 -0
- package/dist/_dts/content-editor/src/controller/replayRestoredEditorEffects.d.ts +2 -3
- package/dist/_dts/content-editor/src/controller/routeWrites.d.ts +26 -0
- package/dist/_dts/content-editor/src/controller/useAutosaveTriggers.d.ts +16 -17
- package/dist/_dts/content-editor/src/controller/useBlockedPublishPlan.d.ts +6 -2
- package/dist/_dts/content-editor/src/controller/useBlocksList.d.ts +3 -3
- package/dist/_dts/content-editor/src/controller/useEntryValueAutosaves.d.ts +21 -0
- package/dist/_dts/content-editor/src/controller/useInitialEditorUiStore.d.ts +24 -0
- package/dist/_dts/content-editor/src/controller/useServerBaselineReconciliation.d.ts +17 -0
- package/dist/_dts/content-editor/src/footerComposerPanelTypes.d.ts +1 -1
- package/dist/_dts/content-editor/src/hooks/applyBlockedPublishPlan.d.ts +5 -1
- package/dist/_dts/content-editor/src/hooks/blockDraftLifecycle.d.ts +8 -47
- package/dist/_dts/content-editor/src/hooks/editLeaseMachine.d.ts +120 -0
- package/dist/_dts/content-editor/src/hooks/publishability.d.ts +6 -10
- package/dist/_dts/content-editor/src/hooks/useAutosaveStatus.d.ts +3 -0
- package/dist/_dts/content-editor/src/hooks/useBlockAutosave.d.ts +5 -15
- package/dist/_dts/content-editor/src/hooks/useDebouncedLatestSave.d.ts +7 -5
- package/dist/_dts/content-editor/src/hooks/useEditLease.d.ts +28 -0
- package/dist/_dts/content-editor/src/hooks/useEntryActions.d.ts +25 -39
- package/dist/_dts/content-editor/src/hooks/useEntryMutations.d.ts +17 -19
- package/dist/_dts/content-editor/src/hooks/useLinkedEntryAutosave.d.ts +5 -8
- package/dist/_dts/content-editor/src/hooks/useValueAutosave.d.ts +64 -0
- package/dist/_dts/content-editor/src/hooks/validateBlocksForPublish.d.ts +0 -7
- package/dist/_dts/content-editor/src/index.d.ts +26 -7
- package/dist/_dts/content-editor/src/linkedEntries/domain.d.ts +12 -0
- package/dist/_dts/content-editor/src/linkedEntries/owner.d.ts +9 -0
- package/dist/_dts/content-editor/src/liveDrafts/draftProjection.d.ts +66 -0
- package/dist/_dts/content-editor/src/liveDrafts/linkedSaveHandovers.d.ts +37 -0
- package/dist/_dts/content-editor/src/liveDrafts/remoteDraftOverlay.d.ts +113 -0
- package/dist/_dts/content-editor/src/liveDrafts/useLiveDrafts.d.ts +32 -0
- package/dist/_dts/content-editor/src/liveDrafts/useRetentionTicks.d.ts +7 -0
- package/dist/_dts/content-editor/src/primitives/shared/activePreviewField.d.ts +6 -0
- package/dist/_dts/content-editor/src/primitives/shared/storeBinding.d.ts +1 -0
- package/dist/_dts/content-editor/src/services/contentEntryServices.d.ts +96 -19
- package/dist/_dts/content-editor/src/services/editorApiClient.d.ts +13 -0
- package/dist/_dts/content-editor/src/services/index.d.ts +2 -0
- package/dist/_dts/content-editor/src/services/pageSurfaceEditorServices.d.ts +23 -0
- package/dist/_dts/content-editor/src/sync/flushValues.d.ts +13 -0
- package/dist/_dts/content-editor/src/sync/lifecycleFailure.d.ts +51 -0
- package/dist/_dts/content-editor/src/sync/runLifecycle.d.ts +64 -0
- package/dist/_dts/content-editor/src/sync/schedulerValues.d.ts +27 -0
- package/dist/_dts/content-editor/src/sync/sendPlanning.d.ts +104 -0
- package/dist/_dts/content-editor/src/sync/valueSync.d.ts +114 -0
- package/dist/_dts/content-editor/src/ui/blockCollection.d.ts +8 -0
- package/dist/_dts/content-editor/src/ui/documentLifecycle.d.ts +18 -0
- package/dist/_dts/content-editor/src/ui/editorLeaseUiState.d.ts +7 -0
- package/dist/_dts/content-editor/src/ui/editorRefresh.d.ts +82 -0
- package/dist/_dts/content-editor/src/ui/editorSnapshot.d.ts +102 -127
- package/dist/_dts/content-editor/src/ui/editorTransactionState.d.ts +1 -1
- package/dist/_dts/content-editor/src/ui/editorUiStore.d.ts +126 -72
- package/dist/_dts/content-editor/src/ui/editorValueSnapshot.d.ts +18 -0
- package/dist/_dts/content-editor/src/ui/serverBlockAdmission.d.ts +26 -0
- package/dist/_dts/content-editor/src/ui/stores/autosaveStore.d.ts +16 -27
- package/dist/_dts/content-editor/src/ui/stores/blockVersionsStore.d.ts +24 -0
- package/dist/_dts/content-editor/src/ui/stores/linkedEntryLeaseStore.d.ts +54 -0
- package/dist/_dts/content-editor/src/ui/stores/linkedSaveHandoversStore.d.ts +11 -0
- package/dist/_dts/content-editor/src/ui/stores/remoteDraftsStore.d.ts +10 -0
- package/dist/_dts/content-editor/src/ui/stores/types.d.ts +63 -3
- package/dist/_dts/content-editor/src/useFooterComposerState.d.ts +2 -2
- package/dist/_dts/content-editor/src/useFooterNavigationLayout.d.ts +1 -1
- package/dist/_dts/content-model/src/content-types/builtin-schemas.d.ts +4 -4
- package/dist/_dts/content-model/src/content-types/builtins.d.ts +4 -4
- package/dist/_dts/content-model/src/definitions/shared.d.ts +11 -2
- package/dist/_dts/content-model/src/entry-slots/index.d.ts +1 -0
- package/dist/_dts/content-model/src/entry-slots/serializeAllowedBlocks.d.ts +2 -0
- package/dist/_dts/content-model/src/metadataConfig.d.ts +10 -38
- package/dist/_dts/content-model/src/templates/defaults.d.ts +0 -1
- package/dist/_dts/content-model/src/types.d.ts +0 -1
- package/dist/_dts/core/src/block-content-identity.d.ts +49 -1
- package/dist/_dts/core/src/branded.d.ts +12 -0
- package/dist/_dts/core/src/currency-format.d.ts +8 -2
- package/dist/_dts/core/src/demo-lifecycle-status.d.ts +2 -2
- package/dist/_dts/core/src/demo-warm-pool-target.d.ts +8 -0
- package/dist/_dts/core/src/edit-lease.d.ts +55 -0
- package/dist/_dts/core/src/editor-state.d.ts +38 -13
- package/dist/_dts/core/src/editor-value-sync.d.ts +79 -0
- package/dist/_dts/core/src/html-entities.d.ts +6 -0
- package/dist/_dts/core/src/index.d.ts +5 -1
- package/dist/_dts/core/src/mailing-list-runtime.d.ts +15 -0
- package/dist/_dts/core/src/mailing-list-setup.d.ts +2 -0
- package/dist/_dts/core/src/mailing-list-submission.d.ts +6 -0
- package/dist/_dts/core/src/navigation-portal-labels.d.ts +9 -0
- package/dist/_dts/core/src/participants.d.ts +0 -38
- package/dist/_dts/core/src/uuid.d.ts +7 -5
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +261 -175
- package/dist/_dts/editor/src/EditorProvider.d.ts +5 -0
- package/dist/_dts/editor/src/chrome/EditorChrome.d.ts +14 -0
- package/dist/_dts/editor/src/chrome/EditorStatusBar.d.ts +1 -0
- package/dist/_dts/editor/src/chrome/statusBarPresentation.d.ts +0 -1
- package/dist/_dts/editor/src/index.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/BlockEditor.d.ts +10 -9
- package/dist/_dts/editor-blocks/src/BlockForm.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/block-editor/BlockCard.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/block-editor/BlockCardFrame.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/block-editor/BlockSettingsModal.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/block-editor/actionPresentation.d.ts +1 -0
- package/dist/_dts/editor-blocks/src/block-editor/applyExtendedFieldDefaults.d.ts +3 -4
- package/dist/_dts/editor-blocks/src/block-editor/blockDraftBaselineSeed.d.ts +4 -8
- package/dist/_dts/editor-blocks/src/block-editor/editorBlockItem.d.ts +23 -0
- package/dist/_dts/editor-blocks/src/block-editor/generatedIconApplyCoordination.d.ts +2 -7
- package/dist/_dts/editor-blocks/src/block-editor/hooks/applyBlockStructureChange.d.ts +4 -0
- package/dist/_dts/editor-blocks/src/block-editor/hooks/buildInsertBlockHistoryCommand.d.ts +14 -5
- package/dist/_dts/editor-blocks/src/block-editor/hooks/useBlockBaselineSync.d.ts +21 -19
- package/dist/_dts/editor-blocks/src/block-editor/hooks/useBlockCreation.d.ts +2 -10
- package/dist/_dts/editor-blocks/src/block-editor/hooks/useBlockDuplication.d.ts +8 -16
- package/dist/_dts/editor-blocks/src/block-editor/owner.d.ts +6 -16
- package/dist/_dts/editor-blocks/src/block-editor/types.d.ts +37 -9
- package/dist/_dts/editor-blocks/src/index.d.ts +2 -1
- package/dist/_dts/editor-blocks/src/widgets/entry-picker/loaders.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/link/loaders.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/mailing-list-targeting/loaders.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/reference/loaders.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/site-option-picker/loaders.d.ts +3 -2
- package/dist/_dts/media-core/src/fileStorage.d.ts +4 -0
- package/dist/_dts/media-editor/src/context.d.ts +1 -1
- package/dist/_dts/media-editor/src/createMediaEditorProvider.d.ts +1 -2
- package/dist/_dts/media-editor/src/provider.d.ts +3 -2
- package/dist/_dts/media-react/src/hooks/internal/classification.d.ts +1 -1
- package/dist/_dts/media-react/src/hooks/useApiMediaUploader.d.ts +3 -1
- package/dist/_dts/preview-next/src/client/blocks/EditablePageRenderer.d.ts +7 -1
- package/dist/_dts/preview-next/src/client/blocks/composer/mergeDrafts.d.ts +8 -3
- package/dist/_dts/preview-next/src/client/blocks/composer/types.d.ts +10 -6
- package/dist/_dts/preview-next/src/client/blocks/linkedEntryRenderOverlay.d.ts +22 -2
- package/dist/_dts/preview-next/src/client/blocks/previewProjection/entryFieldRebinding.d.ts +13 -0
- package/dist/_dts/preview-next/src/client/blocks/previewProjection/index.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/blocks/previewProjection/types.d.ts +11 -1
- package/dist/_dts/preview-next/src/client/blocks/renderPrecedence.d.ts +17 -0
- package/dist/_dts/preview-next/src/client/blocks/useLinkedSaveHandoverRetention.d.ts +20 -0
- package/dist/_dts/preview-next/src/client/index.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/preview/EntryEditorPanel.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/EntrySlotBlockEditorPanel.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewAccessBanners.d.ts +7 -0
- package/dist/_dts/preview-next/src/client/preview/PreviewEditorSidebar.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewEntryControllerProvider.d.ts +24 -14
- package/dist/_dts/preview-next/src/client/preview/PreviewLeaseEditingMode.d.ts +2 -0
- package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +9 -2
- package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +1 -0
- package/dist/_dts/preview-next/src/client/preview/previewCustomizeAutosave.d.ts +5 -0
- package/dist/_dts/preview-next/src/client/preview/previewCustomizeWorkflowState.d.ts +3 -4
- package/dist/_dts/preview-next/src/client/preview/sdkConfig.d.ts +1 -0
- package/dist/_dts/preview-next/src/client/preview/usePreviewCustomizeWorkflowState.d.ts +4 -0
- package/dist/_dts/realtime/src/client.d.ts +3 -0
- package/dist/_dts/realtime/src/draftChannel.d.ts +91 -0
- package/dist/_dts/realtime/src/drafts.d.ts +210 -0
- package/dist/_dts/realtime/src/index.d.ts +3 -0
- package/dist/_dts/realtime/src/leaseChangeSubscriptions.d.ts +8 -0
- package/dist/_dts/realtime/src/types.d.ts +113 -0
- package/dist/_dts/realtime/src/useDraftChannel.d.ts +34 -0
- package/dist/_dts/realtime/src/useSiteRealtimeReload.d.ts +27 -0
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +6 -55
- package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +2 -0
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +2 -0
- package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +4 -2
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/surfaces/src/index.d.ts +1 -0
- package/dist/_dts/theme-core/src/buttons/effects/types.d.ts +1 -1
- package/dist/_dts/theme-core/src/footer/effectiveNavLinkStyle.d.ts +13 -0
- package/dist/_dts/theme-core/src/footer/index.d.ts +1 -0
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/header/effectiveNavLinkStyle.d.ts +17 -0
- package/dist/_dts/theme-core/src/header/generateHeaderLogoStyles.d.ts +15 -0
- package/dist/_dts/theme-core/src/header/generateHeaderNavLinkStyles.d.ts +4 -0
- package/dist/_dts/theme-core/src/header/index.d.ts +3 -0
- package/dist/_dts/theme-core/src/header/legacyNavLinkStyle.d.ts +1 -1
- package/dist/_dts/theme-core/src/header/openingForegroundProjection.d.ts +7 -0
- package/dist/_dts/theme-core/src/header/rootPaint.d.ts +4 -0
- package/dist/_dts/theme-core/src/navigation/effectPolicy.d.ts +38 -0
- package/dist/_dts/theme-core/src/navigation/generateNavLinkCSS.d.ts +4 -0
- package/dist/_dts/theme-core/src/navigation/types.d.ts +4 -0
- package/dist/_dts/theme-core/src/site-styles/accessibleSurfaces.d.ts +1 -1
- package/dist/_dts/theme-core/src/site-styles/designState.d.ts +2 -2
- package/dist/_dts/theme-core/src/surfaces/foregroundContract.d.ts +7 -0
- package/dist/_dts/theme-core/src/surfaces/foregroundInteraction.d.ts +29 -22
- package/dist/_dts/theme-core/src/surfaces/foregroundRoles.d.ts +10 -2
- package/dist/_dts/theme-core/src/surfaces/resolveSurfaceForeground.d.ts +9 -0
- package/dist/_dts/theme-core/src/utils/cssDeclarations.d.ts +2 -0
- package/dist/_dts/ui/src/badge.d.ts +2 -1
- package/dist/_dts/ui/src/button.d.ts +1 -1
- package/dist/_dts/ui/src/combobox-keys.d.ts +23 -0
- package/dist/_dts/ui/src/combobox-rows.d.ts +34 -0
- package/dist/_dts/ui/src/combobox.d.ts +26 -1
- package/dist/_dts/ui/src/date-picker.d.ts +5 -8
- package/dist/_dts/ui/src/editor-item-card.d.ts +1 -0
- package/dist/_dts/ui/src/field-trigger.d.ts +39 -0
- package/dist/_dts/ui/src/fieldControl.d.ts +27 -0
- package/dist/_dts/ui/src/index.d.ts +4 -1
- package/dist/_dts/ui/src/native-select.d.ts +8 -0
- package/dist/_dts/ui/src/popover.d.ts +7 -1
- package/dist/_dts/ui/src/segmented-control.d.ts +4 -0
- package/dist/_dts/ui/src/surface.d.ts +1 -1
- package/dist/client/{BookingConsentAgreement-BQKL045f.mjs → BookingMailingListNote-CzRt2dF_.mjs} +110 -97
- package/dist/client/{CheckboxChoice--W2n6yKs.mjs → CheckboxChoice-B33MqoUo.mjs} +1 -1
- package/dist/client/DemoBookingPortalAccess-mxqwap3f.mjs +344 -0
- package/dist/client/{EventCombined.client-BdRjVbhH.mjs → EventCombined.client-CDb11igO.mjs} +7 -7
- package/dist/client/{EventListing.client-DBxC6xOU.mjs → EventListing.client-EgYhzKPa.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-mHEJKrTs.mjs → LeafletStaticMap-gtmtaA2b.mjs} +1 -1
- package/dist/client/{scrollToBlock-BNgaEUpo.mjs → TerminalPanel-DvNUP5ot.mjs} +77 -77
- package/dist/client/{ThemedButton-CE5KYT6z.mjs → ThemedButton-C7CeUJjW.mjs} +2 -2
- package/dist/client/{accordion-BEQNSptH.mjs → accordion-kjvt49rA.mjs} +1 -1
- package/dist/client/{bookingForm-AMr-s5vw.mjs → bookingForm-pbRZordh.mjs} +411 -141
- package/dist/client/bookings.mjs +966 -396
- package/dist/client/{carousel-Bbt_QgJy.mjs → carousel-f4Zbmicv.mjs} +2 -2
- package/dist/client/{carousel.client-jahpU9Vz.mjs → carousel.client-A2lG-9od.mjs} +1 -1
- package/dist/client/{cart-CnWi30zJ.mjs → cart-DO20An50.mjs} +3 -3
- package/dist/client/{checkout-f3nkWgd4.mjs → checkout-Du5amDR_.mjs} +3 -3
- package/dist/client/{checkoutUrls-CW3-78uu.mjs → checkoutUrls-CXhko2Rv.mjs} +1 -1
- package/dist/client/client.mjs +3837 -2202
- package/dist/client/{colorStyles-CuJBiS-1.mjs → colorStyles-j5U9v5JA.mjs} +5 -1
- package/dist/client/{context-Bc8T6pCe.mjs → context-eW97E945.mjs} +4 -3
- package/dist/client/{dates-DUsCEzLb.mjs → dates-jPCirRea.mjs} +56 -11
- package/dist/client/{eventCalendar-CKwgXui5.mjs → eventCalendar-C2M-iE4j.mjs} +10 -10
- package/dist/client/{eventCombined-CBAOSTGR.mjs → eventCombined-W6ns3LHg.mjs} +4 -4
- package/dist/client/{eventDetails-Dh-_WiBD.mjs → eventDetails-CR-GT0f0.mjs} +4 -4
- package/dist/client/{eventListing-CA3frIH5.mjs → eventListing-BK8AfYZz.mjs} +4 -4
- package/dist/client/{eventRegistration-BHtsgdcg.mjs → eventRegistration-BJSd4KUu.mjs} +461 -266
- package/dist/client/{form-C2h3YAcg.mjs → form-BvpfbQaT.mjs} +5 -5
- package/dist/client/{headerSection-lwMuMTH9.mjs → headerSection-I5sUQ8x-.mjs} +3 -3
- package/dist/client/hooks.mjs +909 -163
- package/dist/client/{locationMap-DJ2bLODV.mjs → locationMap-BLvwf9_f.mjs} +4 -4
- package/dist/client/{FieldValidationMessage-AYanWFb-.mjs → mailingListSignupCopy-DZSHZrm6.mjs} +14 -1
- package/dist/client/{media-BtJ37tzS.mjs → media-Cl38iOMI.mjs} +11 -4
- package/dist/client/{newsletterForm-8Pu5K32g.mjs → newsletterForm-DrQ2weE8.mjs} +6 -6
- package/dist/client/{pricing-HHx3IgBz.mjs → pricing-BES87mrR.mjs} +1 -1
- package/dist/client/{productDetail-C_1odnAf.mjs → productDetail-Url9jcc5.mjs} +3 -3
- package/dist/client/{productList-CtCv-Nmx.mjs → productList-DE7ngEZJ.mjs} +3 -3
- package/dist/client/{propsDecoder-Dcgsncxb.mjs → propsDecoder-D1OtGXDV.mjs} +140 -22
- package/dist/client/rendering/client.mjs +2366 -997
- package/dist/client/rendering/islands.mjs +19 -19
- package/dist/client/rendering.mjs +4607 -2884
- package/dist/client/{routeIslandApiConfig-CWLP7wu3.mjs → routeIslandApiConfig-BG9Y-SHg.mjs} +1 -1
- package/dist/client/{shop-DQXrQ8kJ.mjs → shop-CJkuySJ3.mjs} +126 -79
- package/dist/client/{shop-commerce-B88zmWWo.mjs → shop-commerce-4rKj5n9h.mjs} +26 -14
- package/dist/client/{shop-commerce-store-DtSfkKuX.mjs → shop-commerce-store-Bxm75Pg6.mjs} +1 -1
- package/dist/client/{shopShared-cuaONpkJ.mjs → shopShared-DpoQDWfz.mjs} +5 -5
- package/dist/client/{useEventFilters-Bukew6Gb.mjs → useEventFilters-D8HliSqR.mjs} +33 -18
- package/dist/preview-next/before-render.mjs +314 -133
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/editor-base.css +53 -2
- package/dist/preview-next/editor-chrome.css +7 -4
- package/dist/preview-next/keepAlive.mjs +314 -133
- package/dist/preview-next/middleware.mjs +314 -133
- package/dist/{previewAuthStore-h5IgbSp4.mjs → previewAuthStore-BXXF3hhW.mjs} +316 -133
- package/dist/{sdk-runtime-DTc1uIXn.mjs → sdk-runtime-C2a05WjL.mjs} +2 -2
- package/dist/{separator-BpHS1KZK.mjs → separator-CuNhBAhS.mjs} +1 -1
- package/dist/server/components.mjs +6888 -6157
- package/dist/server/config-validation.mjs +931 -199
- package/dist/server/config.mjs +931 -199
- package/dist/server/data.mjs +929 -198
- package/dist/server/index.mjs +317 -134
- package/dist/server/navigation.mjs +13 -2
- package/dist/server/next.mjs +5003 -4340
- package/dist/server/page-converter.mjs +160 -78
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +6421 -5687
- package/dist/server/rendering.mjs +7683 -6933
- package/dist/server/routing.mjs +1035 -338
- package/dist/server/server.mjs +946 -256
- package/dist/server/theme-bridge.mjs +66 -17
- package/dist/server/theme.mjs +5 -1
- package/dist/styles/index.css +32 -4
- package/package.json +1 -1
- package/dist/_dts/billing/src/plans/display.d.ts +0 -15
- package/dist/_dts/content-editor/src/controller/buildBlockPublishedBaselines.d.ts +0 -4
- package/dist/_dts/content-editor/src/controller/buildPublishSuccessTransition.d.ts +0 -16
- package/dist/_dts/content-editor/src/controller/driver.d.ts +0 -14
- package/dist/_dts/content-editor/src/controller/seedDraftBaselinesFromBlocks.d.ts +0 -7
- package/dist/_dts/content-editor/src/controller/useEntrySyncHelpers.d.ts +0 -29
- package/dist/_dts/content-editor/src/hooks/autosaveScopePlanning.d.ts +0 -26
- package/dist/_dts/content-editor/src/hooks/useSimpleAutosave.d.ts +0 -64
- package/dist/_dts/content-editor/src/hooks/useStoreAutosave.d.ts +0 -48
- package/dist/_dts/content-editor/src/types.d.ts +0 -44
- package/dist/_dts/core/src/participant-identity.d.ts +0 -135
- package/dist/client/DiscountCodeDisclosure-CsOtjFY7.mjs +0 -137
package/dist/client/hooks.mjs
CHANGED
|
@@ -58,6 +58,19 @@ const CURRENCY_LOCALE_BY_CODE = {
|
|
|
58
58
|
function resolveCurrencyLocale(currencyCode, override) {
|
|
59
59
|
return override ?? CURRENCY_LOCALE_BY_CODE[currencyCode] ?? "en";
|
|
60
60
|
}
|
|
61
|
+
function fractionDigitsFor(decimals, exactFormatter) {
|
|
62
|
+
switch (decimals) {
|
|
63
|
+
case "exact": return {};
|
|
64
|
+
case "auto": return {
|
|
65
|
+
minimumFractionDigits: 0,
|
|
66
|
+
maximumFractionDigits: exactFormatter.resolvedOptions().maximumFractionDigits
|
|
67
|
+
};
|
|
68
|
+
case "whole": return {
|
|
69
|
+
minimumFractionDigits: 0,
|
|
70
|
+
maximumFractionDigits: 0
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
}
|
|
61
74
|
/**
|
|
62
75
|
* The single currency-amount formatter for the product: minor units in,
|
|
63
76
|
* localized string out.
|
|
@@ -68,6 +81,13 @@ function resolveCurrencyLocale(currencyCode, override) {
|
|
|
68
81
|
* own `Intl.NumberFormat`.
|
|
69
82
|
*/
|
|
70
83
|
function formatCurrencyAmount(amountCents, currency, options) {
|
|
84
|
+
return formatCurrencyMajorUnits(amountCents / 100, currency, options);
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* `formatCurrencyAmount` for an amount already in MAJOR units (29.99 = £29.99),
|
|
88
|
+
* such as a registrar price. Prefer minor units everywhere else.
|
|
89
|
+
*/
|
|
90
|
+
function formatCurrencyMajorUnits(amount, currency, options) {
|
|
71
91
|
const currencyCode = currency.toUpperCase();
|
|
72
92
|
const locale = resolveCurrencyLocale(currencyCode, options?.locale);
|
|
73
93
|
try {
|
|
@@ -75,17 +95,13 @@ function formatCurrencyAmount(amountCents, currency, options) {
|
|
|
75
95
|
style: "currency",
|
|
76
96
|
currency: currencyCode
|
|
77
97
|
});
|
|
78
|
-
const fractionDigits = options?.decimals === "auto" ? {
|
|
79
|
-
minimumFractionDigits: 0,
|
|
80
|
-
maximumFractionDigits: exactFormatter.resolvedOptions().maximumFractionDigits
|
|
81
|
-
} : {};
|
|
82
98
|
return new Intl.NumberFormat(locale, {
|
|
83
99
|
style: "currency",
|
|
84
100
|
currency: currencyCode,
|
|
85
|
-
...
|
|
86
|
-
}).format(
|
|
101
|
+
...fractionDigitsFor(options?.decimals ?? "exact", exactFormatter)
|
|
102
|
+
}).format(amount);
|
|
87
103
|
} catch {
|
|
88
|
-
return `${
|
|
104
|
+
return `${amount.toFixed(2)} ${currencyCode}`;
|
|
89
105
|
}
|
|
90
106
|
}
|
|
91
107
|
//#endregion
|
|
@@ -494,6 +510,26 @@ function toLocationCoordinates(value) {
|
|
|
494
510
|
};
|
|
495
511
|
}
|
|
496
512
|
//#endregion
|
|
513
|
+
//#region ../core/src/block-content-identity.ts
|
|
514
|
+
function readContentVersionId(value) {
|
|
515
|
+
const parsed = parseContentVersionId(value);
|
|
516
|
+
return parsed.ok ? parsed.value : null;
|
|
517
|
+
}
|
|
518
|
+
/** The one pairing of a published id with its content. */
|
|
519
|
+
function readPublishedBlockPlacement(id, content) {
|
|
520
|
+
if (id == null && content == null) return null;
|
|
521
|
+
const versionId = readContentVersionId(id);
|
|
522
|
+
return versionId !== null && content != null ? {
|
|
523
|
+
kind: "published",
|
|
524
|
+
id: versionId,
|
|
525
|
+
content
|
|
526
|
+
} : {
|
|
527
|
+
kind: "incomplete",
|
|
528
|
+
id: id ?? null,
|
|
529
|
+
content: content ?? null
|
|
530
|
+
};
|
|
531
|
+
}
|
|
532
|
+
//#endregion
|
|
497
533
|
//#region ../core/src/mailing-list-identifiers.ts
|
|
498
534
|
const UUID_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/iu;
|
|
499
535
|
const OPAQUE_ID_PATTERN = /^[A-Za-z0-9_-]{1,100}$/u;
|
|
@@ -662,17 +698,35 @@ function parseMailingListRuntimeContext(value) {
|
|
|
662
698
|
if (!isRecord$13(value)) return invalidRuntimeContext();
|
|
663
699
|
if (value.tag === "not_configured") return ok({ tag: "not_configured" });
|
|
664
700
|
if (value.tag !== "configured") return invalidRuntimeContext();
|
|
701
|
+
return parseConfiguredRuntimeContext(value);
|
|
702
|
+
}
|
|
703
|
+
function parseConfiguredRuntimeContext(value) {
|
|
665
704
|
const revision = parseMailingListSetupRevision(value.revision);
|
|
666
705
|
const form = parseMailingListGlobalForm(value.form);
|
|
667
706
|
const provider = parseRuntimeProvider(value.provider);
|
|
668
|
-
|
|
707
|
+
const bookingSignup = parseBookingSignupOffer(value.bookingSignup);
|
|
708
|
+
if (revision === null || !form.ok || provider === null || bookingSignup === null) return invalidRuntimeContext();
|
|
669
709
|
return ok({
|
|
670
710
|
tag: "configured",
|
|
671
711
|
revision,
|
|
712
|
+
bookingSignup,
|
|
672
713
|
form: form.value,
|
|
673
714
|
provider
|
|
674
715
|
});
|
|
675
716
|
}
|
|
717
|
+
function parseBookingSignupOffer(value) {
|
|
718
|
+
if (value === void 0) return {
|
|
719
|
+
tag: "unavailable",
|
|
720
|
+
reason: "disabled"
|
|
721
|
+
};
|
|
722
|
+
if (!isRecord$13(value)) return null;
|
|
723
|
+
if (value.tag === "offered") return { tag: "offered" };
|
|
724
|
+
if (value.tag === "unavailable" && (value.reason === "disabled" || value.reason === "fields" || value.reason === "destination")) return {
|
|
725
|
+
tag: "unavailable",
|
|
726
|
+
reason: value.reason
|
|
727
|
+
};
|
|
728
|
+
return null;
|
|
729
|
+
}
|
|
676
730
|
function parseRuntimeProvider(value) {
|
|
677
731
|
if (!isRecord$13(value)) return null;
|
|
678
732
|
switch (value.provider) {
|
|
@@ -2384,13 +2438,16 @@ const SURFACE_FOREGROUND_CSS_VARS = {
|
|
|
2384
2438
|
text: "--rb-surface-text-color",
|
|
2385
2439
|
heading: "--rb-surface-heading-color",
|
|
2386
2440
|
link: "--rb-surface-link-color",
|
|
2441
|
+
linkHover: "--rb-surface-link-hover-color",
|
|
2387
2442
|
supporting: "--rb-surface-supporting-color"
|
|
2388
2443
|
};
|
|
2389
2444
|
const DEFAULT_SURFACE_TEXT_COLOR = "rgb(var(--tb-text, 17 24 39))";
|
|
2445
|
+
const DEFAULT_SURFACE_LINK_COLOR = "rgb(var(--tb-primary, var(--tb-text, 17 24 39)))";
|
|
2390
2446
|
const DEFAULT_ROLE_FALLBACKS = {
|
|
2391
2447
|
text: DEFAULT_SURFACE_TEXT_COLOR,
|
|
2392
2448
|
heading: DEFAULT_SURFACE_TEXT_COLOR,
|
|
2393
|
-
link:
|
|
2449
|
+
link: DEFAULT_SURFACE_LINK_COLOR,
|
|
2450
|
+
linkHover: DEFAULT_SURFACE_LINK_COLOR,
|
|
2394
2451
|
supporting: "rgb(var(--tb-mutedText, 100 116 139))"
|
|
2395
2452
|
};
|
|
2396
2453
|
function requireSurfaceColorValue(role, value) {
|
|
@@ -2400,10 +2457,12 @@ function requireSurfaceColorValue(role, value) {
|
|
|
2400
2457
|
}
|
|
2401
2458
|
function completeSurfaceForegrounds(input) {
|
|
2402
2459
|
const text = requireSurfaceColorValue("text", input.text);
|
|
2460
|
+
const link = input.link === void 0 ? text : requireSurfaceColorValue("link", input.link);
|
|
2403
2461
|
return {
|
|
2404
2462
|
text,
|
|
2405
2463
|
heading: input.heading === void 0 ? text : requireSurfaceColorValue("heading", input.heading),
|
|
2406
|
-
link
|
|
2464
|
+
link,
|
|
2465
|
+
linkHover: input.linkHover === void 0 ? link : requireSurfaceColorValue("linkHover", input.linkHover),
|
|
2407
2466
|
supporting: input.supporting === void 0 ? text : requireSurfaceColorValue("supporting", input.supporting)
|
|
2408
2467
|
};
|
|
2409
2468
|
}
|
|
@@ -2411,6 +2470,7 @@ function surfaceForegroundValue(role, outsideProviderFallback = DEFAULT_ROLE_FAL
|
|
|
2411
2470
|
const roleVariable = SURFACE_FOREGROUND_CSS_VARS[role];
|
|
2412
2471
|
const fallback = requireSurfaceColorValue("fallback", outsideProviderFallback);
|
|
2413
2472
|
if (role === "text") return `var(${roleVariable}, ${fallback})`;
|
|
2473
|
+
if (role === "linkHover") return `var(${roleVariable}, ${surfaceForegroundValue("link", fallback)})`;
|
|
2414
2474
|
return `var(${roleVariable}, var(${SURFACE_FOREGROUND_CSS_VARS.text}, ${fallback}))`;
|
|
2415
2475
|
}
|
|
2416
2476
|
function surfaceForegroundValueWithOpacity(role, opacityPercent) {
|
|
@@ -2424,9 +2484,25 @@ function surfaceForegroundStyle(input) {
|
|
|
2424
2484
|
[SURFACE_FOREGROUND_CSS_VARS.text]: foregrounds.text,
|
|
2425
2485
|
[SURFACE_FOREGROUND_CSS_VARS.heading]: foregrounds.heading,
|
|
2426
2486
|
[SURFACE_FOREGROUND_CSS_VARS.link]: foregrounds.link,
|
|
2427
|
-
[SURFACE_FOREGROUND_CSS_VARS.
|
|
2487
|
+
[SURFACE_FOREGROUND_CSS_VARS.linkHover]: foregrounds.linkHover,
|
|
2488
|
+
[SURFACE_FOREGROUND_CSS_VARS.supporting]: foregrounds.supporting,
|
|
2489
|
+
"--rb-surface-link-hover-decoration": hoverDecoration(input)
|
|
2490
|
+
};
|
|
2491
|
+
}
|
|
2492
|
+
function surfaceForegroundInputFromResolved(foreground, color) {
|
|
2493
|
+
const { roles } = foreground;
|
|
2494
|
+
return {
|
|
2495
|
+
text: color(roles.text),
|
|
2496
|
+
heading: color(roles.heading),
|
|
2497
|
+
link: color(roles.link),
|
|
2498
|
+
linkHover: color(roles.linkHover),
|
|
2499
|
+
supporting: color(roles.supporting),
|
|
2500
|
+
hoverDecoration: foreground.hoverDecoration
|
|
2428
2501
|
};
|
|
2429
2502
|
}
|
|
2503
|
+
function hoverDecoration(input) {
|
|
2504
|
+
return input.hoverDecoration ?? "underline";
|
|
2505
|
+
}
|
|
2430
2506
|
//#endregion
|
|
2431
2507
|
//#region ../theme-core/src/buttons/constants.ts
|
|
2432
2508
|
/**
|
|
@@ -3283,6 +3359,64 @@ function parseAlpha(source) {
|
|
|
3283
3359
|
function isRgbChannel(value) {
|
|
3284
3360
|
return Number.isFinite(value) && value >= 0 && value <= 255;
|
|
3285
3361
|
}
|
|
3362
|
+
/**
|
|
3363
|
+
* Derive the hover foreground that belongs with a resolved resting foreground.
|
|
3364
|
+
*
|
|
3365
|
+
* A resting foreground is chosen to be legible against a known surface. A hover
|
|
3366
|
+
* state derived from it stays within a bounded distance of that colour, so it
|
|
3367
|
+
* inherits most of the resting colour's contrast margin instead of asserting
|
|
3368
|
+
* an unrelated brand colour that no one checked against the surface.
|
|
3369
|
+
*
|
|
3370
|
+
* That bounded-distance property is what lets this be used on a transparent
|
|
3371
|
+
* overlay header, where the backdrop is only partly knowable: the scrolled
|
|
3372
|
+
* state composites a 60% glass tint over arbitrary page content, so no
|
|
3373
|
+
* compile-time contrast proof is available there. Staying near a colour that
|
|
3374
|
+
* is already trusted in both states is a weaker claim than a contrast proof,
|
|
3375
|
+
* and it is one this function can actually keep.
|
|
3376
|
+
*
|
|
3377
|
+
* Returns `null` when the resting token is not a plain palette token — an
|
|
3378
|
+
* already-faded or raw value has no well-defined softening, and the caller
|
|
3379
|
+
* should leave hover alone rather than guess.
|
|
3380
|
+
*/
|
|
3381
|
+
function deriveForegroundHoverToken(restingToken) {
|
|
3382
|
+
const parts = parseColorTokenParts(restingToken);
|
|
3383
|
+
if (parts.kind !== "token") return null;
|
|
3384
|
+
if (parts.opacityPercent !== null) return null;
|
|
3385
|
+
return parseThemeColorToken(`${parts.token}/85`);
|
|
3386
|
+
}
|
|
3387
|
+
/**
|
|
3388
|
+
* Prefer an authored hover that survives every measured backdrop, then a
|
|
3389
|
+
* checked softening of the resting colour. A null backdrop set represents a
|
|
3390
|
+
* trusted treatment: only an explicit authored hover may change the colour.
|
|
3391
|
+
* When neither option works, retain the resting colour and underline it.
|
|
3392
|
+
*/
|
|
3393
|
+
function planForegroundHover(input) {
|
|
3394
|
+
const { restingToken, candidate, palette, backdrops } = input;
|
|
3395
|
+
if (candidate && candidate !== restingToken) {
|
|
3396
|
+
if (backdrops === null || survivesEveryBackdrop(candidate, palette, backdrops)) return {
|
|
3397
|
+
kind: "candidate",
|
|
3398
|
+
token: candidate,
|
|
3399
|
+
decoration: "initial"
|
|
3400
|
+
};
|
|
3401
|
+
}
|
|
3402
|
+
const softened = deriveForegroundHoverToken(restingToken);
|
|
3403
|
+
if (softened && backdrops && survivesEveryBackdrop(softened, palette, backdrops)) return {
|
|
3404
|
+
kind: "softened",
|
|
3405
|
+
token: softened,
|
|
3406
|
+
decoration: "initial"
|
|
3407
|
+
};
|
|
3408
|
+
return {
|
|
3409
|
+
kind: "resting",
|
|
3410
|
+
token: restingToken,
|
|
3411
|
+
decoration: "underline"
|
|
3412
|
+
};
|
|
3413
|
+
}
|
|
3414
|
+
function survivesEveryBackdrop(token, palette, backdrops) {
|
|
3415
|
+
return backdrops.length > 0 && backdrops.every((backdrop) => {
|
|
3416
|
+
const foreground = resolveOpaqueSurfaceHex(token, palette, backdrop);
|
|
3417
|
+
return foreground !== null && contrastRatio(foreground, backdrop) >= 4.5;
|
|
3418
|
+
});
|
|
3419
|
+
}
|
|
3286
3420
|
//#endregion
|
|
3287
3421
|
//#region ../theme-core/src/surfaces/resolveSurfaceForeground.ts
|
|
3288
3422
|
const FALLBACK_TEXT_TOKENS = [
|
|
@@ -3329,12 +3463,16 @@ function resolveSurfaceForeground(background, palette, candidates = {}, options
|
|
|
3329
3463
|
}
|
|
3330
3464
|
function foregroundCandidates(background, overrides) {
|
|
3331
3465
|
return {
|
|
3332
|
-
text: overrides.text
|
|
3333
|
-
heading: overrides.heading
|
|
3334
|
-
link: overrides.link
|
|
3335
|
-
|
|
3466
|
+
text: candidateOrBackground(overrides.text, background?.textColor),
|
|
3467
|
+
heading: candidateOrBackground(overrides.heading, background?.headingColor),
|
|
3468
|
+
link: candidateOrBackground(overrides.link, background?.linkColor),
|
|
3469
|
+
linkHover: candidateOrBackground(overrides.linkHover),
|
|
3470
|
+
supporting: candidateOrBackground(overrides.supporting, background?.supportingColor)
|
|
3336
3471
|
};
|
|
3337
3472
|
}
|
|
3473
|
+
function candidateOrBackground(candidate, backgroundValue) {
|
|
3474
|
+
return candidate ?? backgroundValue ?? null;
|
|
3475
|
+
}
|
|
3338
3476
|
function resolveDeterministicForeground(backgroundReference, candidates, palette, compositeBase) {
|
|
3339
3477
|
const backgroundHex = resolveOpaqueSurfaceHex(backgroundReference, palette, compositeBase);
|
|
3340
3478
|
if (!backgroundHex) return resolveTrustedTreatmentForeground(candidates, palette);
|
|
@@ -3346,29 +3484,51 @@ function resolveDeterministicForeground(backgroundReference, candidates, palette
|
|
|
3346
3484
|
...FALLBACK_TEXT_TOKENS
|
|
3347
3485
|
], backgroundHex, palette, derivedOnToken ? [derivedOnToken] : []);
|
|
3348
3486
|
if (!text) return { kind: "unknown" };
|
|
3349
|
-
return {
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
};
|
|
3487
|
+
return knownForeground({
|
|
3488
|
+
text,
|
|
3489
|
+
heading: safeTokenOr(candidates.heading, text, backgroundHex, palette),
|
|
3490
|
+
link: safeTokenOr(candidates.link, text, backgroundHex, palette),
|
|
3491
|
+
supporting: safeTokenOr(candidates.supporting, text, backgroundHex, palette)
|
|
3492
|
+
}, {
|
|
3493
|
+
kind: "measured",
|
|
3494
|
+
backdropHex: backgroundHex
|
|
3495
|
+
}, candidates.linkHover, palette);
|
|
3358
3496
|
}
|
|
3359
3497
|
function resolveTrustedTreatmentForeground(candidates, palette) {
|
|
3360
3498
|
const text = canonicalToken(candidates.text, palette);
|
|
3361
3499
|
if (!text) return { kind: "unknown" };
|
|
3500
|
+
return knownForeground({
|
|
3501
|
+
text,
|
|
3502
|
+
heading: canonicalToken(candidates.heading, palette) ?? text,
|
|
3503
|
+
link: canonicalToken(candidates.link, palette) ?? text,
|
|
3504
|
+
supporting: canonicalToken(candidates.supporting, palette) ?? text
|
|
3505
|
+
}, { kind: "trusted-treatment" }, candidates.linkHover, palette);
|
|
3506
|
+
}
|
|
3507
|
+
function knownForeground(roles, provenance, hoverCandidate, palette) {
|
|
3508
|
+
const hover = planForegroundHover({
|
|
3509
|
+
restingToken: roles.link,
|
|
3510
|
+
candidate: canonicalHoverToken(hoverCandidate, palette),
|
|
3511
|
+
palette,
|
|
3512
|
+
backdrops: provenance.kind === "measured" ? [provenance.backdropHex] : null
|
|
3513
|
+
});
|
|
3362
3514
|
return {
|
|
3363
3515
|
kind: "known",
|
|
3516
|
+
provenance,
|
|
3364
3517
|
roles: {
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
}
|
|
3518
|
+
...roles,
|
|
3519
|
+
linkHover: hover.token
|
|
3520
|
+
},
|
|
3521
|
+
hoverDecoration: hover.decoration
|
|
3370
3522
|
};
|
|
3371
3523
|
}
|
|
3524
|
+
function canonicalHoverToken(reference, palette) {
|
|
3525
|
+
const token = parseThemeColorToken(reference);
|
|
3526
|
+
if (token) {
|
|
3527
|
+
const parts = parseColorTokenParts(token);
|
|
3528
|
+
if (parts.kind === "token" && resolveConcreteColorHex(parts.token, palette)) return token;
|
|
3529
|
+
}
|
|
3530
|
+
return canonicalToken(reference, palette);
|
|
3531
|
+
}
|
|
3372
3532
|
function safeTokenOr(candidate, fallback, backgroundHex, palette) {
|
|
3373
3533
|
return firstSafeToken([candidate], backgroundHex, palette) ?? fallback;
|
|
3374
3534
|
}
|
|
@@ -6307,6 +6467,43 @@ const effectCompositionSchema = z.object({
|
|
|
6307
6467
|
/** Effects applied on focus */
|
|
6308
6468
|
focus: z.array(effectApplicationSchema).optional()
|
|
6309
6469
|
});
|
|
6470
|
+
const policiesById = {
|
|
6471
|
+
"darken-background": "other",
|
|
6472
|
+
"lighten-background": "other",
|
|
6473
|
+
"fade-background": "other",
|
|
6474
|
+
"opacity-reduce": "other",
|
|
6475
|
+
"animated-gradient": "other",
|
|
6476
|
+
"background-on-hover": "paired-hover",
|
|
6477
|
+
"background-on-hover-alpha": "paired-hover",
|
|
6478
|
+
"border-glow": "other",
|
|
6479
|
+
"drop-shadow": "other",
|
|
6480
|
+
"inner-shadow": "other",
|
|
6481
|
+
"neumorphic-shadow": "other",
|
|
6482
|
+
"outer-glow": "other",
|
|
6483
|
+
"retro-3d-shadow": "other",
|
|
6484
|
+
"scale-up": "other",
|
|
6485
|
+
"scale-down": "other",
|
|
6486
|
+
lift: "other",
|
|
6487
|
+
"press-down": "other",
|
|
6488
|
+
pop: "other",
|
|
6489
|
+
"aurora-glow": "other",
|
|
6490
|
+
"cosmic-stardust": "other",
|
|
6491
|
+
"gradient-border-fill": "other",
|
|
6492
|
+
"animated-gradient-border-fill": "other",
|
|
6493
|
+
"border-bottom-grow": "other",
|
|
6494
|
+
"gradient-text": "other",
|
|
6495
|
+
"text-color-change": "text-colour",
|
|
6496
|
+
"border-color-change": "other",
|
|
6497
|
+
"sketchy-border": "other",
|
|
6498
|
+
"pulse-animation": "other",
|
|
6499
|
+
"nav-underline": "underline",
|
|
6500
|
+
"nav-frosted-base": "other",
|
|
6501
|
+
"nav-frosted-hover": "other",
|
|
6502
|
+
"nav-frosted-active": "other"
|
|
6503
|
+
};
|
|
6504
|
+
function navEffectPolicy(effectId) {
|
|
6505
|
+
return policiesById[effectId] ?? null;
|
|
6506
|
+
}
|
|
6310
6507
|
//#endregion
|
|
6311
6508
|
//#region ../theme-core/src/navigation/types.ts
|
|
6312
6509
|
/**
|
|
@@ -6395,6 +6592,16 @@ const navLinkStyleSchema = z.object({
|
|
|
6395
6592
|
/** Composable effects */
|
|
6396
6593
|
effects: effectCompositionSchema.optional()
|
|
6397
6594
|
});
|
|
6595
|
+
function navLinkHoverColorCandidate(style) {
|
|
6596
|
+
const effect = style?.effects?.hover?.find((item) => navEffectPolicy(item.effectId) === "text-colour");
|
|
6597
|
+
return parseThemeColorToken(effect?.options?.hoverColorToken ?? style?.hoverColorToken);
|
|
6598
|
+
}
|
|
6599
|
+
function navLinkOwnsHoverForeground(style) {
|
|
6600
|
+
return style?.effects?.hover?.some((effect) => navEffectPolicy(effect.effectId) === "paired-hover") ?? false;
|
|
6601
|
+
}
|
|
6602
|
+
function navLinkOwnsUnderline(style) {
|
|
6603
|
+
return style?.effects?.hover?.some((effect) => navEffectPolicy(effect.effectId) === "underline") ?? false;
|
|
6604
|
+
}
|
|
6398
6605
|
//#endregion
|
|
6399
6606
|
//#region ../theme-core/src/customCss/validation.ts
|
|
6400
6607
|
/**
|
|
@@ -8260,7 +8467,6 @@ const publicEventBaseSchema = z.object({
|
|
|
8260
8467
|
description: z.string().nullable(),
|
|
8261
8468
|
content: z.object({ body: RichTextDocSchema.nullable().optional() }).optional(),
|
|
8262
8469
|
presentation: z.object({
|
|
8263
|
-
cardTitleOverride: z.string().nullable().optional(),
|
|
8264
8470
|
summary: z.string().nullable().optional(),
|
|
8265
8471
|
image: mediaSchema.nullable().optional()
|
|
8266
8472
|
}).optional(),
|
|
@@ -8293,6 +8499,7 @@ const publicEventBaseSchema = z.object({
|
|
|
8293
8499
|
"archived"
|
|
8294
8500
|
]).optional(),
|
|
8295
8501
|
timeZone: z.string(),
|
|
8502
|
+
siteTimeZone: z.string().optional(),
|
|
8296
8503
|
pricing: publicEventPricingSchema,
|
|
8297
8504
|
paymentTerms: blockBookingPaymentTermsSchema,
|
|
8298
8505
|
cancellationPolicy: z.object({ refunds: z.object({
|
|
@@ -8563,6 +8770,64 @@ function defineEndpointDefinitions(definitions) {
|
|
|
8563
8770
|
return definitions;
|
|
8564
8771
|
}
|
|
8565
8772
|
//#endregion
|
|
8773
|
+
//#region ../api/src/apiEndpointTypes.ts
|
|
8774
|
+
function allowedDemoMutationPolicy() {
|
|
8775
|
+
return {
|
|
8776
|
+
classification: "allowed",
|
|
8777
|
+
publicMessage: ""
|
|
8778
|
+
};
|
|
8779
|
+
}
|
|
8780
|
+
function blockedDemoMutationPolicy(classification, publicMessage) {
|
|
8781
|
+
if (publicMessage.trim() === "") throw new Error(`Demo mutation policy ${classification} requires publicMessage.`);
|
|
8782
|
+
return {
|
|
8783
|
+
classification,
|
|
8784
|
+
publicMessage
|
|
8785
|
+
};
|
|
8786
|
+
}
|
|
8787
|
+
//#endregion
|
|
8788
|
+
//#region ../api/src/demoMutationPolicies.ts
|
|
8789
|
+
const DEMO_MUTATION_BLOCKED_HIDDEN = blockedDemoMutationPolicy("blocked-hidden", "This action is not available in demo sites.");
|
|
8790
|
+
const DEMO_MUTATION_BLOCKED_DISABLED = blockedDemoMutationPolicy("blocked-disabled", "This setting is disabled in demo sites.");
|
|
8791
|
+
blockedDemoMutationPolicy("internal-only", "This internal operation is not available in demo sites.");
|
|
8792
|
+
const DEMO_MUTATION_ALLOWED = allowedDemoMutationPolicy();
|
|
8793
|
+
//#endregion
|
|
8794
|
+
//#region ../api/src/siteLifecycleEndpoints.ts
|
|
8795
|
+
const SITE_LIFECYCLE_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
8796
|
+
createSite: {
|
|
8797
|
+
path: "/sites/manage",
|
|
8798
|
+
method: "POST",
|
|
8799
|
+
tags: ["site"],
|
|
8800
|
+
auth: "user",
|
|
8801
|
+
responseKind: "json",
|
|
8802
|
+
errors: []
|
|
8803
|
+
},
|
|
8804
|
+
createSiteManual: {
|
|
8805
|
+
path: "/sites/manual",
|
|
8806
|
+
method: "POST",
|
|
8807
|
+
tags: ["site"],
|
|
8808
|
+
auth: "user",
|
|
8809
|
+
responseKind: "json",
|
|
8810
|
+
errors: []
|
|
8811
|
+
},
|
|
8812
|
+
updateSite: {
|
|
8813
|
+
path: "/sites/manage",
|
|
8814
|
+
method: "PUT",
|
|
8815
|
+
tags: ["site"],
|
|
8816
|
+
auth: "user",
|
|
8817
|
+
responseKind: "json",
|
|
8818
|
+
errors: []
|
|
8819
|
+
},
|
|
8820
|
+
deleteSite: {
|
|
8821
|
+
path: "/sites/{siteId}",
|
|
8822
|
+
method: "DELETE",
|
|
8823
|
+
tags: ["site", "site-{siteId}"],
|
|
8824
|
+
auth: "user",
|
|
8825
|
+
responseKind: "json",
|
|
8826
|
+
errors: [],
|
|
8827
|
+
demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN
|
|
8828
|
+
}
|
|
8829
|
+
});
|
|
8830
|
+
//#endregion
|
|
8566
8831
|
//#region ../api/src/publicNewsletterEndpointDefinitions.ts
|
|
8567
8832
|
const PUBLIC_NEWSLETTER_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
8568
8833
|
subscribeNewsletter: {
|
|
@@ -8623,27 +8888,6 @@ const PUBLIC_NEWSLETTER_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
8623
8888
|
}
|
|
8624
8889
|
});
|
|
8625
8890
|
//#endregion
|
|
8626
|
-
//#region ../api/src/apiEndpointTypes.ts
|
|
8627
|
-
function allowedDemoMutationPolicy() {
|
|
8628
|
-
return {
|
|
8629
|
-
classification: "allowed",
|
|
8630
|
-
publicMessage: ""
|
|
8631
|
-
};
|
|
8632
|
-
}
|
|
8633
|
-
function blockedDemoMutationPolicy(classification, publicMessage) {
|
|
8634
|
-
if (publicMessage.trim() === "") throw new Error(`Demo mutation policy ${classification} requires publicMessage.`);
|
|
8635
|
-
return {
|
|
8636
|
-
classification,
|
|
8637
|
-
publicMessage
|
|
8638
|
-
};
|
|
8639
|
-
}
|
|
8640
|
-
//#endregion
|
|
8641
|
-
//#region ../api/src/demoMutationPolicies.ts
|
|
8642
|
-
const DEMO_MUTATION_BLOCKED_HIDDEN = blockedDemoMutationPolicy("blocked-hidden", "This action is not available in demo sites.");
|
|
8643
|
-
const DEMO_MUTATION_BLOCKED_DISABLED = blockedDemoMutationPolicy("blocked-disabled", "This setting is disabled in demo sites.");
|
|
8644
|
-
blockedDemoMutationPolicy("internal-only", "This internal operation is not available in demo sites.");
|
|
8645
|
-
const DEMO_MUTATION_ALLOWED = allowedDemoMutationPolicy();
|
|
8646
|
-
//#endregion
|
|
8647
8891
|
//#region ../api/src/cache-tags.ts
|
|
8648
8892
|
/**
|
|
8649
8893
|
* Tag templates for endpoint definitions (support `{param}` placeholders).
|
|
@@ -9670,6 +9914,20 @@ const NEWSLETTER_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
9670
9914
|
responseKind: "json",
|
|
9671
9915
|
errors: ["auth:forbidden", "server:internal_error"]
|
|
9672
9916
|
},
|
|
9917
|
+
setMailingListBookingOptIn: {
|
|
9918
|
+
path: "/sites/{siteId}/mailing-list/setup/booking-opt-in",
|
|
9919
|
+
method: "PUT",
|
|
9920
|
+
tags: [TAG_TEMPLATES.site, TAG_TEMPLATES.siteNewsletter],
|
|
9921
|
+
auth: "user",
|
|
9922
|
+
responseKind: "json",
|
|
9923
|
+
demoMutation: DEMO_MUTATION_BLOCKED_DISABLED,
|
|
9924
|
+
errors: [
|
|
9925
|
+
"auth:forbidden",
|
|
9926
|
+
"validation:invalid_input",
|
|
9927
|
+
"resource:conflict",
|
|
9928
|
+
"server:internal_error"
|
|
9929
|
+
]
|
|
9930
|
+
},
|
|
9673
9931
|
getMailingListAuthoringContext: {
|
|
9674
9932
|
path: "/sites/{siteId}/mailing-list/authoring-context",
|
|
9675
9933
|
method: "GET",
|
|
@@ -10085,6 +10343,7 @@ const SDK_EVENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
10085
10343
|
responseKind: "json",
|
|
10086
10344
|
errors: [
|
|
10087
10345
|
"resource:not_found",
|
|
10346
|
+
"validation:invalid_input",
|
|
10088
10347
|
"resource:conflict",
|
|
10089
10348
|
"server:internal_error"
|
|
10090
10349
|
]
|
|
@@ -10539,28 +10798,6 @@ const EVENT_MANAGEMENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
10539
10798
|
"resource:conflict",
|
|
10540
10799
|
"server:internal_error"
|
|
10541
10800
|
]
|
|
10542
|
-
},
|
|
10543
|
-
/**
|
|
10544
|
-
* The Content tab's one write: the short introduction, image and
|
|
10545
|
-
* description of an event's page, published without its layout.
|
|
10546
|
-
*/
|
|
10547
|
-
saveEventPageWords: {
|
|
10548
|
-
path: "/sites/{siteId}/page-surfaces/{pageSurfaceId}/words",
|
|
10549
|
-
method: "PUT",
|
|
10550
|
-
tags: [
|
|
10551
|
-
TAG_TEMPLATES.siteCollection,
|
|
10552
|
-
TAG_TEMPLATES.siteRoutableContent,
|
|
10553
|
-
TAG_TEMPLATES.pageSurfaceById
|
|
10554
|
-
],
|
|
10555
|
-
auth: "user",
|
|
10556
|
-
responseKind: "json",
|
|
10557
|
-
errors: [
|
|
10558
|
-
"auth:forbidden",
|
|
10559
|
-
"validation:invalid_input",
|
|
10560
|
-
"resource:not_found",
|
|
10561
|
-
"resource:conflict",
|
|
10562
|
-
"server:internal_error"
|
|
10563
|
-
]
|
|
10564
10801
|
}
|
|
10565
10802
|
});
|
|
10566
10803
|
//#endregion
|
|
@@ -10985,6 +11222,15 @@ const BILLING_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
10985
11222
|
auth: "user",
|
|
10986
11223
|
responseKind: "json"
|
|
10987
11224
|
},
|
|
11225
|
+
/** Continue on Free from the onboarding card page; only the attempt's owner. */
|
|
11226
|
+
continueOnboardingOnFree: {
|
|
11227
|
+
path: "/onboarding/attempts/{attemptToken}/plan/free",
|
|
11228
|
+
method: "POST",
|
|
11229
|
+
tags: ["billing"],
|
|
11230
|
+
auth: "user",
|
|
11231
|
+
errors: [],
|
|
11232
|
+
responseKind: "json"
|
|
11233
|
+
},
|
|
10988
11234
|
createBillingPortalSession: {
|
|
10989
11235
|
path: "/billing/portal/session",
|
|
10990
11236
|
method: "POST",
|
|
@@ -10994,6 +11240,209 @@ const BILLING_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
10994
11240
|
}
|
|
10995
11241
|
});
|
|
10996
11242
|
//#endregion
|
|
11243
|
+
//#region ../api/src/editLeaseEndpoints.ts
|
|
11244
|
+
const path = "/sites/{siteId}/edit-leases/{nodeType}/{nodeId}";
|
|
11245
|
+
const lifecycleErrors = [
|
|
11246
|
+
"auth:lease_required",
|
|
11247
|
+
"auth:forbidden",
|
|
11248
|
+
"resource:not_found",
|
|
11249
|
+
"validation:invalid_input",
|
|
11250
|
+
"server:internal_error"
|
|
11251
|
+
];
|
|
11252
|
+
const EDIT_LEASE_ENDPOINT_DEFINITIONS = {
|
|
11253
|
+
readEditLease: {
|
|
11254
|
+
path,
|
|
11255
|
+
method: "GET",
|
|
11256
|
+
editLease: "lifecycle",
|
|
11257
|
+
errors: lifecycleErrors,
|
|
11258
|
+
auth: "user",
|
|
11259
|
+
responseKind: "json"
|
|
11260
|
+
},
|
|
11261
|
+
acquireEditLease: {
|
|
11262
|
+
path,
|
|
11263
|
+
method: "POST",
|
|
11264
|
+
editLease: "lifecycle",
|
|
11265
|
+
errors: lifecycleErrors,
|
|
11266
|
+
auth: "user",
|
|
11267
|
+
responseKind: "json"
|
|
11268
|
+
},
|
|
11269
|
+
takeOverEditLease: {
|
|
11270
|
+
path,
|
|
11271
|
+
method: "PUT",
|
|
11272
|
+
editLease: "lifecycle",
|
|
11273
|
+
errors: lifecycleErrors,
|
|
11274
|
+
auth: "user",
|
|
11275
|
+
responseKind: "json"
|
|
11276
|
+
},
|
|
11277
|
+
heartbeatEditLease: {
|
|
11278
|
+
path,
|
|
11279
|
+
method: "PATCH",
|
|
11280
|
+
editLease: "lifecycle",
|
|
11281
|
+
errors: [...lifecycleErrors, "auth:lease_lost"],
|
|
11282
|
+
auth: "user",
|
|
11283
|
+
responseKind: "json"
|
|
11284
|
+
},
|
|
11285
|
+
releaseEditLease: {
|
|
11286
|
+
path,
|
|
11287
|
+
method: "DELETE",
|
|
11288
|
+
editLease: "lifecycle",
|
|
11289
|
+
errors: lifecycleErrors,
|
|
11290
|
+
auth: "user",
|
|
11291
|
+
responseKind: "json"
|
|
11292
|
+
}
|
|
11293
|
+
};
|
|
11294
|
+
//#endregion
|
|
11295
|
+
//#region ../api/src/pageSurfaceEditorEndpoints.ts
|
|
11296
|
+
const surfaceTags = [TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById];
|
|
11297
|
+
const PAGE_SURFACE_EDITOR_ENDPOINT_DEFINITIONS = {
|
|
11298
|
+
getPageSurfaceEditorDocument: {
|
|
11299
|
+
path: "/sites/{siteId}/page-surfaces/{pageSurfaceId}/content",
|
|
11300
|
+
method: "GET",
|
|
11301
|
+
errors: [
|
|
11302
|
+
"auth:forbidden",
|
|
11303
|
+
"validation:invalid_input",
|
|
11304
|
+
"resource:not_found",
|
|
11305
|
+
"resource:conflict",
|
|
11306
|
+
"server:internal_error"
|
|
11307
|
+
],
|
|
11308
|
+
tags: surfaceTags,
|
|
11309
|
+
auth: "user",
|
|
11310
|
+
responseKind: "json"
|
|
11311
|
+
},
|
|
11312
|
+
updatePageSurfaceDraftContent: {
|
|
11313
|
+
editLease: "managed",
|
|
11314
|
+
path: "/sites/{siteId}/page-surfaces/{pageSurfaceId}/content",
|
|
11315
|
+
method: "PUT",
|
|
11316
|
+
errors: [
|
|
11317
|
+
"validation:invalid_input",
|
|
11318
|
+
"resource:not_found",
|
|
11319
|
+
"resource:conflict",
|
|
11320
|
+
"server:internal_error"
|
|
11321
|
+
],
|
|
11322
|
+
tags: surfaceTags,
|
|
11323
|
+
auth: "user",
|
|
11324
|
+
responseKind: "json"
|
|
11325
|
+
},
|
|
11326
|
+
discardPageSurfaceDraftContent: {
|
|
11327
|
+
editLease: "managed",
|
|
11328
|
+
path: "/sites/{siteId}/page-surfaces/{pageSurfaceId}/content/draft",
|
|
11329
|
+
method: "DELETE",
|
|
11330
|
+
errors: [
|
|
11331
|
+
"validation:invalid_input",
|
|
11332
|
+
"resource:not_found",
|
|
11333
|
+
"resource:conflict",
|
|
11334
|
+
"server:internal_error"
|
|
11335
|
+
],
|
|
11336
|
+
tags: surfaceTags,
|
|
11337
|
+
auth: "user",
|
|
11338
|
+
responseKind: "json"
|
|
11339
|
+
},
|
|
11340
|
+
updatePageSurfaceRouteMetadata: {
|
|
11341
|
+
editLease: "managed",
|
|
11342
|
+
path: "/sites/{siteId}/page-surfaces/{pageSurfaceId}/metadata",
|
|
11343
|
+
method: "PATCH",
|
|
11344
|
+
errors: [
|
|
11345
|
+
"validation:invalid_input",
|
|
11346
|
+
"resource:not_found",
|
|
11347
|
+
"resource:conflict",
|
|
11348
|
+
"server:internal_error"
|
|
11349
|
+
],
|
|
11350
|
+
tags: [
|
|
11351
|
+
TAG_TEMPLATES.siteCollection,
|
|
11352
|
+
TAG_TEMPLATES.siteRoutableContent,
|
|
11353
|
+
TAG_TEMPLATES.pageSurfaceById
|
|
11354
|
+
],
|
|
11355
|
+
auth: "user",
|
|
11356
|
+
responseKind: "json"
|
|
11357
|
+
},
|
|
11358
|
+
publishPageSurface: {
|
|
11359
|
+
editLease: "managed",
|
|
11360
|
+
path: "/sites/{siteId}/page-surfaces/{pageSurfaceId}/publication",
|
|
11361
|
+
method: "POST",
|
|
11362
|
+
errors: [
|
|
11363
|
+
"auth:forbidden",
|
|
11364
|
+
"validation:invalid_input",
|
|
11365
|
+
"resource:not_found",
|
|
11366
|
+
"resource:conflict",
|
|
11367
|
+
"server:internal_error"
|
|
11368
|
+
],
|
|
11369
|
+
tags: [
|
|
11370
|
+
TAG_TEMPLATES.siteCollection,
|
|
11371
|
+
TAG_TEMPLATES.siteRoutableContent,
|
|
11372
|
+
TAG_TEMPLATES.pageSurfaceById
|
|
11373
|
+
],
|
|
11374
|
+
auth: "user",
|
|
11375
|
+
responseKind: "json"
|
|
11376
|
+
},
|
|
11377
|
+
saveEventContentTab: {
|
|
11378
|
+
editLease: "managed",
|
|
11379
|
+
path: "/sites/{siteId}/page-surfaces/{pageSurfaceId}/event-content",
|
|
11380
|
+
method: "PUT",
|
|
11381
|
+
errors: [
|
|
11382
|
+
"auth:forbidden",
|
|
11383
|
+
"validation:invalid_input",
|
|
11384
|
+
"resource:not_found",
|
|
11385
|
+
"resource:conflict",
|
|
11386
|
+
"server:internal_error"
|
|
11387
|
+
],
|
|
11388
|
+
tags: [
|
|
11389
|
+
TAG_TEMPLATES.siteCollection,
|
|
11390
|
+
TAG_TEMPLATES.siteRoutableContent,
|
|
11391
|
+
TAG_TEMPLATES.pageSurfaceById
|
|
11392
|
+
],
|
|
11393
|
+
auth: "user",
|
|
11394
|
+
responseKind: "json"
|
|
11395
|
+
}
|
|
11396
|
+
};
|
|
11397
|
+
//#endregion
|
|
11398
|
+
//#region ../api/src/bookingPeopleEndpointDefinitions.ts
|
|
11399
|
+
/**
|
|
11400
|
+
* People endpoints (#1356): the People list, its CSV export, and deleting a
|
|
11401
|
+
* person when nothing is attached to them.
|
|
11402
|
+
*/
|
|
11403
|
+
const BOOKING_PEOPLE_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
11404
|
+
listPeople: {
|
|
11405
|
+
path: "/sites/{siteId}/bookings/people",
|
|
11406
|
+
method: "GET",
|
|
11407
|
+
tags: ["site-{siteId}", "customers-{siteId}"],
|
|
11408
|
+
auth: "user",
|
|
11409
|
+
responseKind: "json",
|
|
11410
|
+
errors: ["server:internal_error"]
|
|
11411
|
+
},
|
|
11412
|
+
exportPeopleCsv: {
|
|
11413
|
+
path: "/sites/{siteId}/bookings/people/export.csv",
|
|
11414
|
+
method: "GET",
|
|
11415
|
+
tags: ["site-{siteId}", "customers-{siteId}"],
|
|
11416
|
+
auth: "user",
|
|
11417
|
+
errors: [],
|
|
11418
|
+
responseKind: "blob"
|
|
11419
|
+
},
|
|
11420
|
+
checkPersonDeletion: {
|
|
11421
|
+
path: "/sites/{siteId}/bookings/people/{personId}/deletion-check",
|
|
11422
|
+
method: "GET",
|
|
11423
|
+
tags: ["site-{siteId}", "customers-{siteId}"],
|
|
11424
|
+
auth: "user",
|
|
11425
|
+
responseKind: "json",
|
|
11426
|
+
errors: [
|
|
11427
|
+
"auth:forbidden",
|
|
11428
|
+
"resource:not_found",
|
|
11429
|
+
"server:internal_error"
|
|
11430
|
+
]
|
|
11431
|
+
},
|
|
11432
|
+
deletePerson: {
|
|
11433
|
+
path: "/sites/{siteId}/bookings/people/{personId}",
|
|
11434
|
+
method: "DELETE",
|
|
11435
|
+
tags: ["site-{siteId}", "customers-{siteId}"],
|
|
11436
|
+
auth: "user",
|
|
11437
|
+
responseKind: "json",
|
|
11438
|
+
errors: [
|
|
11439
|
+
"auth:forbidden",
|
|
11440
|
+
"resource:not_found",
|
|
11441
|
+
"server:internal_error"
|
|
11442
|
+
]
|
|
11443
|
+
}
|
|
11444
|
+
});
|
|
11445
|
+
//#endregion
|
|
10997
11446
|
//#region ../api/src/clientErrorReporting.ts
|
|
10998
11447
|
const CLIENT_ERROR_REPORT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({ reportClientError: {
|
|
10999
11448
|
path: "/client/error-report",
|
|
@@ -11029,6 +11478,7 @@ z.object({
|
|
|
11029
11478
|
sourceLocation: z.string().max(CLIENT_ERROR_REPORT_LIMITS.sourceLocation).nullable()
|
|
11030
11479
|
}).strict();
|
|
11031
11480
|
({
|
|
11481
|
+
...SITE_LIFECYCLE_ENDPOINT_DEFINITIONS,
|
|
11032
11482
|
...CLIENT_ERROR_REPORT_ENDPOINT_DEFINITIONS,
|
|
11033
11483
|
...PUBLIC_NEWSLETTER_ENDPOINT_DEFINITIONS,
|
|
11034
11484
|
...ACCOUNT_ENDPOINT_DEFINITIONS,
|
|
@@ -11037,12 +11487,14 @@ z.object({
|
|
|
11037
11487
|
...GIFTING_ENDPOINT_DEFINITIONS,
|
|
11038
11488
|
...PUBLIC_READ_ENDPOINT_DEFINITIONS,
|
|
11039
11489
|
...BILLING_ENDPOINT_DEFINITIONS,
|
|
11490
|
+
...EDIT_LEASE_ENDPOINT_DEFINITIONS,
|
|
11491
|
+
...PAGE_SURFACE_EDITOR_ENDPOINT_DEFINITIONS,
|
|
11040
11492
|
...SITE_MANAGEMENT_ENDPOINT_DEFINITIONS
|
|
11041
11493
|
}), TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteTheme, TAG_TEMPLATES.siteCollection, { ...SITE_API_KEY_ENDPOINT_DEFINITIONS }, TAG_TEMPLATES.site, TAG_TEMPLATES.siteBookingSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteBookingSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteEmailSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteEmailSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteEmailSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteEmailSettings, {
|
|
11042
11494
|
...NEWSLETTER_ENDPOINT_DEFINITIONS,
|
|
11043
11495
|
...APPOINTMENT_ENDPOINT_DEFINITIONS,
|
|
11044
11496
|
...EVENT_SERIES_REGISTRATION_ENDPOINT_DEFINITIONS
|
|
11045
|
-
}, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteById, TAG_TEMPLATES.siteBySlug, TAG_TEMPLATES.siteByDomain, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteById, TAG_TEMPLATES.siteBySlug, TAG_TEMPLATES.siteByDomain, TAG_TEMPLATES.
|
|
11497
|
+
}, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteById, TAG_TEMPLATES.siteBySlug, TAG_TEMPLATES.siteByDomain, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteById, TAG_TEMPLATES.siteBySlug, TAG_TEMPLATES.siteByDomain, TAG_TEMPLATES.workflowRunById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.routeById, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.site, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.navigationItemById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.navigationItemById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.publicEvents, TAG_TEMPLATES.publicBookingServices, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteTheme, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteTheme, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteTheme, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRedirects, TAG_TEMPLATES.siteRouteOutcomes, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRedirects, TAG_TEMPLATES.siteRouteOutcomes, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.formSubmissionsBySlug, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.formSubmissionsBySlug, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.formSubmissionsBySlug, TAG_TEMPLATES.siteForms, { ...PUBLIC_BOOKING_AVAILABILITY_ENDPOINT_DEFINITIONS }, TAG_TEMPLATES.publicEventFilters, TAG_TEMPLATES.publicEvents, TAG_TEMPLATES.publicShop, TAG_TEMPLATES.publicCheckout, TAG_TEMPLATES.siteRoutableContent, { ...PUBLIC_EVENT_CHECKOUT_ENDPOINT_DEFINITIONS }, TAG_TEMPLATES.publicEvents, TAG_TEMPLATES.publicEvents, { ...EVENT_MANAGEMENT_ENDPOINT_DEFINITIONS }, { ...BOOKING_PEOPLE_ENDPOINT_DEFINITIONS }, { ...SDK_MEDIA_ENDPOINT_DEFINITIONS }, { ...SDK_ENDPOINT_DEFINITIONS }, { ...SDK_PAGE_DESIGN_ENDPOINT_DEFINITIONS }, { ...SDK_EVENT_ENDPOINT_DEFINITIONS }, { ...SDK_ENTRY_READ_ENDPOINTS };
|
|
11046
11498
|
z.object({ refreshToken: z.string().min(1).max(4096) }).strict();
|
|
11047
11499
|
z.object({
|
|
11048
11500
|
accessToken: z.string().min(1).max(4096),
|
|
@@ -11269,17 +11721,6 @@ const navigationLinkInputSchemaOptions = [
|
|
|
11269
11721
|
];
|
|
11270
11722
|
z.discriminatedUnion("kind", navigationLinkInputSchemaOptions);
|
|
11271
11723
|
//#endregion
|
|
11272
|
-
//#region ../blocks/src/pageRenderAdmission.ts
|
|
11273
|
-
/** Pair a published version with the content it authorises at the render boundary. */
|
|
11274
|
-
function readPublishedBlockPlacement(id, content) {
|
|
11275
|
-
if (id == null && content == null) return null;
|
|
11276
|
-
if (id == null || content == null) throw new Error("Published block placement requires both an ID and content");
|
|
11277
|
-
return {
|
|
11278
|
-
id,
|
|
11279
|
-
content
|
|
11280
|
-
};
|
|
11281
|
-
}
|
|
11282
|
-
//#endregion
|
|
11283
11724
|
//#region ../theme-core/src/site-styles/styleTags.ts
|
|
11284
11725
|
/**
|
|
11285
11726
|
* Descriptive style-axis metadata for button personalities and palette
|
|
@@ -17342,6 +17783,14 @@ const blockDesignFallback = {
|
|
|
17342
17783
|
};
|
|
17343
17784
|
blockDesignFallback.sectionSurface, blockDesignFallback.contentFrame, blockDesignFallback.sectionHeight, blockDesignFallback.heroLegibility, blockDesignFallback.imageSurfaceTreatment, blockDesignFallback.imageSurfaceMotion, blockDesignFallback.tileTreatment, blockDesignFallback.eventListTreatment, blockDesignFallback.eyebrowTreatment, blockDesignFallback.accordionIconTreatment, blockDesignFallback.composition;
|
|
17344
17785
|
//#endregion
|
|
17786
|
+
//#region ../theme-core/src/header/rootPaint.ts
|
|
17787
|
+
/** The nav container takes precedence when a floating header also has one. */
|
|
17788
|
+
function headerRootPaint(header) {
|
|
17789
|
+
const navContainerType = header?.navContainer?.type ?? "none";
|
|
17790
|
+
if (navContainerType === "glass" || navContainerType === "pill") return "contained-nav";
|
|
17791
|
+
return header?.variant === "floating" ? "overlay" : "own-surface";
|
|
17792
|
+
}
|
|
17793
|
+
//#endregion
|
|
17345
17794
|
//#region ../theme-core/src/site-styles/siteChromeBackgrounds.ts
|
|
17346
17795
|
const siteChromeBackgroundColorTokens = toSiteChromeBackgroundColorTokens(backgroundAppearanceColorTokenNames);
|
|
17347
17796
|
const quickSiteChromeBackgroundColorTokens = toSiteChromeBackgroundColorTokens(backgroundAppearanceQuickColorTokenNames);
|
|
@@ -17521,6 +17970,259 @@ z.object(headerPreferencesShape).omit({
|
|
|
17521
17970
|
structure: true
|
|
17522
17971
|
}).strict();
|
|
17523
17972
|
//#endregion
|
|
17973
|
+
//#region ../theme-core/src/navigation/presets.ts
|
|
17974
|
+
/**
|
|
17975
|
+
* Built-in nav link style presets
|
|
17976
|
+
*
|
|
17977
|
+
* Each preset uses composable effects to achieve its look.
|
|
17978
|
+
*/
|
|
17979
|
+
const NAV_LINK_PRESETS = {
|
|
17980
|
+
/**
|
|
17981
|
+
* Minimal - subtle color change on hover
|
|
17982
|
+
*/
|
|
17983
|
+
minimal: {
|
|
17984
|
+
name: "Minimal",
|
|
17985
|
+
typography: "body",
|
|
17986
|
+
fontWeight: "medium",
|
|
17987
|
+
textTransform: "none",
|
|
17988
|
+
italic: false,
|
|
17989
|
+
colorToken: "text",
|
|
17990
|
+
hoverColorToken: "primary",
|
|
17991
|
+
padding: "none",
|
|
17992
|
+
borderRadius: "none",
|
|
17993
|
+
effects: { hover: [{
|
|
17994
|
+
effectId: "text-color-change",
|
|
17995
|
+
options: { hoverColorToken: "primary" }
|
|
17996
|
+
}] }
|
|
17997
|
+
},
|
|
17998
|
+
/**
|
|
17999
|
+
* Underline - static underline appears on hover
|
|
18000
|
+
*/
|
|
18001
|
+
underline: {
|
|
18002
|
+
name: "Underline",
|
|
18003
|
+
typography: "body",
|
|
18004
|
+
fontWeight: "medium",
|
|
18005
|
+
textTransform: "none",
|
|
18006
|
+
italic: false,
|
|
18007
|
+
colorToken: "text",
|
|
18008
|
+
padding: "none",
|
|
18009
|
+
borderRadius: "none",
|
|
18010
|
+
effects: { hover: [{
|
|
18011
|
+
effectId: "nav-underline",
|
|
18012
|
+
options: { style: "static" }
|
|
18013
|
+
}] }
|
|
18014
|
+
},
|
|
18015
|
+
/**
|
|
18016
|
+
* Underline Grow - animated underline grows from center on hover
|
|
18017
|
+
*/
|
|
18018
|
+
"underline-grow": {
|
|
18019
|
+
name: "Underline Grow",
|
|
18020
|
+
typography: "body",
|
|
18021
|
+
fontWeight: "medium",
|
|
18022
|
+
textTransform: "none",
|
|
18023
|
+
italic: false,
|
|
18024
|
+
colorToken: "text",
|
|
18025
|
+
padding: "none",
|
|
18026
|
+
borderRadius: "none",
|
|
18027
|
+
effects: { hover: [{
|
|
18028
|
+
effectId: "nav-underline",
|
|
18029
|
+
options: { style: "grow" }
|
|
18030
|
+
}] }
|
|
18031
|
+
},
|
|
18032
|
+
/**
|
|
18033
|
+
* Capsule - pill-shaped background on hover
|
|
18034
|
+
*/
|
|
18035
|
+
capsule: {
|
|
18036
|
+
name: "Capsule",
|
|
18037
|
+
typography: "body",
|
|
18038
|
+
fontWeight: "medium",
|
|
18039
|
+
textTransform: "none",
|
|
18040
|
+
italic: false,
|
|
18041
|
+
colorToken: "text",
|
|
18042
|
+
padding: "compact",
|
|
18043
|
+
borderRadius: "full",
|
|
18044
|
+
effects: {
|
|
18045
|
+
hover: [{
|
|
18046
|
+
effectId: "background-on-hover-alpha",
|
|
18047
|
+
options: {
|
|
18048
|
+
colorToken: "primary",
|
|
18049
|
+
opacity: 10
|
|
18050
|
+
}
|
|
18051
|
+
}],
|
|
18052
|
+
active: [{
|
|
18053
|
+
effectId: "background-on-hover-alpha",
|
|
18054
|
+
options: {
|
|
18055
|
+
colorToken: "primary",
|
|
18056
|
+
opacity: 15
|
|
18057
|
+
}
|
|
18058
|
+
}]
|
|
18059
|
+
}
|
|
18060
|
+
},
|
|
18061
|
+
/**
|
|
18062
|
+
* Solid - solid background color on hover
|
|
18063
|
+
*/
|
|
18064
|
+
solid: {
|
|
18065
|
+
name: "Solid",
|
|
18066
|
+
typography: "body",
|
|
18067
|
+
fontWeight: "medium",
|
|
18068
|
+
textTransform: "none",
|
|
18069
|
+
italic: false,
|
|
18070
|
+
colorToken: "text",
|
|
18071
|
+
padding: "compact",
|
|
18072
|
+
borderRadius: "none",
|
|
18073
|
+
effects: {
|
|
18074
|
+
hover: [{
|
|
18075
|
+
effectId: "background-on-hover",
|
|
18076
|
+
options: {
|
|
18077
|
+
colorToken: "primary",
|
|
18078
|
+
textColorToken: "primaryForeground"
|
|
18079
|
+
}
|
|
18080
|
+
}],
|
|
18081
|
+
active: [{
|
|
18082
|
+
effectId: "background-on-hover",
|
|
18083
|
+
options: {
|
|
18084
|
+
colorToken: "primary",
|
|
18085
|
+
textColorToken: "primaryForeground"
|
|
18086
|
+
}
|
|
18087
|
+
}]
|
|
18088
|
+
}
|
|
18089
|
+
},
|
|
18090
|
+
/**
|
|
18091
|
+
* Scale - gentle scale-up on hover
|
|
18092
|
+
*/
|
|
18093
|
+
scale: {
|
|
18094
|
+
name: "Scale",
|
|
18095
|
+
typography: "body",
|
|
18096
|
+
fontWeight: "medium",
|
|
18097
|
+
textTransform: "none",
|
|
18098
|
+
italic: false,
|
|
18099
|
+
colorToken: "text",
|
|
18100
|
+
padding: "none",
|
|
18101
|
+
borderRadius: "none",
|
|
18102
|
+
effects: { hover: [{
|
|
18103
|
+
effectId: "scale-up",
|
|
18104
|
+
options: { scale: 1.05 }
|
|
18105
|
+
}] }
|
|
18106
|
+
},
|
|
18107
|
+
/**
|
|
18108
|
+
* Frosted - semi-transparent glass-like background
|
|
18109
|
+
*/
|
|
18110
|
+
frosted: {
|
|
18111
|
+
name: "Frosted",
|
|
18112
|
+
typography: "body",
|
|
18113
|
+
fontWeight: "medium",
|
|
18114
|
+
textTransform: "none",
|
|
18115
|
+
italic: false,
|
|
18116
|
+
colorToken: "text",
|
|
18117
|
+
padding: "compact",
|
|
18118
|
+
borderRadius: "md",
|
|
18119
|
+
effects: {
|
|
18120
|
+
base: [{ effectId: "nav-frosted-base" }],
|
|
18121
|
+
hover: [{ effectId: "nav-frosted-hover" }],
|
|
18122
|
+
active: [{ effectId: "nav-frosted-active" }]
|
|
18123
|
+
}
|
|
18124
|
+
}
|
|
18125
|
+
};
|
|
18126
|
+
/**
|
|
18127
|
+
* Get a nav link style preset by ID
|
|
18128
|
+
*/
|
|
18129
|
+
function getNavLinkPreset(presetId) {
|
|
18130
|
+
return NAV_LINK_PRESETS[presetId];
|
|
18131
|
+
}
|
|
18132
|
+
Object.keys(NAV_LINK_PRESETS);
|
|
18133
|
+
//#endregion
|
|
18134
|
+
//#region ../theme-core/src/header/legacyNavLinkStyle.ts
|
|
18135
|
+
function buildLegacyHeaderNavLinkStyle(header, contrastTreatment, navTextSize) {
|
|
18136
|
+
const navStyle = header.navStyle ?? "minimal";
|
|
18137
|
+
const basePreset = getNavLinkPreset(navStyle);
|
|
18138
|
+
if (!basePreset) return null;
|
|
18139
|
+
const style = {
|
|
18140
|
+
...basePreset,
|
|
18141
|
+
fontWeight: header.navWeight ?? basePreset.fontWeight,
|
|
18142
|
+
colorToken: (header.navColor ?? header.textColor)?.trim() || basePreset.colorToken,
|
|
18143
|
+
...contrastTreatment ? { contrastTreatment } : {},
|
|
18144
|
+
...navTextSize ? { textSize: navTextSize } : {}
|
|
18145
|
+
};
|
|
18146
|
+
if (header.navWeight === "bold" && navStyle === "solid") style.textTransform = "uppercase";
|
|
18147
|
+
applyLegacyGlassTreatment(style, header, navStyle);
|
|
18148
|
+
return style;
|
|
18149
|
+
}
|
|
18150
|
+
function applyLegacyGlassTreatment(style, header, navStyle) {
|
|
18151
|
+
if (header.navContainer?.type !== "glass" || navStyle !== "minimal") return;
|
|
18152
|
+
style.borderRadius = "full";
|
|
18153
|
+
style.effects = {
|
|
18154
|
+
...style.effects,
|
|
18155
|
+
hover: glassStateEffects(10),
|
|
18156
|
+
active: glassStateEffects(18)
|
|
18157
|
+
};
|
|
18158
|
+
}
|
|
18159
|
+
function glassStateEffects(opacity) {
|
|
18160
|
+
return [{
|
|
18161
|
+
effectId: "background-on-hover-alpha",
|
|
18162
|
+
options: {
|
|
18163
|
+
colorToken: "neutral-50",
|
|
18164
|
+
opacity
|
|
18165
|
+
}
|
|
18166
|
+
}, {
|
|
18167
|
+
effectId: "text-color-change",
|
|
18168
|
+
options: { hoverColorToken: "neutral-50" }
|
|
18169
|
+
}];
|
|
18170
|
+
}
|
|
18171
|
+
//#endregion
|
|
18172
|
+
//#region ../theme-core/src/header/openingForegroundProjection.ts
|
|
18173
|
+
function readOpeningForegroundProjection(header) {
|
|
18174
|
+
return header?.__runtimeOpeningForeground ?? null;
|
|
18175
|
+
}
|
|
18176
|
+
//#endregion
|
|
18177
|
+
//#region ../theme-core/src/header/effectiveNavLinkStyle.ts
|
|
18178
|
+
function effectiveHeaderNavLinkStyle(header, contrastTreatment = null, navTextSize = null) {
|
|
18179
|
+
if (!header) return null;
|
|
18180
|
+
if (!header.navLinkStyle) return buildLegacyHeaderNavLinkStyle(header, contrastTreatment, navTextSize);
|
|
18181
|
+
return {
|
|
18182
|
+
...header.navLinkStyle,
|
|
18183
|
+
...contrastTreatment ? { contrastTreatment } : {},
|
|
18184
|
+
...navTextSize ? { textSize: navTextSize } : {}
|
|
18185
|
+
};
|
|
18186
|
+
}
|
|
18187
|
+
function headerForegroundCandidates(header) {
|
|
18188
|
+
if (!header) return {};
|
|
18189
|
+
const style = effectiveHeaderNavLinkStyle(header);
|
|
18190
|
+
return {
|
|
18191
|
+
text: header.textColor ?? header.background?.textColor,
|
|
18192
|
+
link: style?.colorToken ?? header.navColor ?? header.textColor,
|
|
18193
|
+
linkHover: navLinkHoverColorCandidate(style)
|
|
18194
|
+
};
|
|
18195
|
+
}
|
|
18196
|
+
function headerLeafTextColor(header) {
|
|
18197
|
+
if (!header) return "text";
|
|
18198
|
+
return header.textColor ?? header.navColor ?? header.background?.textColor ?? header.navLinkStyle?.colorToken ?? "text";
|
|
18199
|
+
}
|
|
18200
|
+
/** Transparent chrome must reset the whole contract on its own root. */
|
|
18201
|
+
function transparentHeaderForegroundInput(header, palette) {
|
|
18202
|
+
const projection = readOpeningForegroundProjection(header);
|
|
18203
|
+
if (projection?.kind === "known") return surfaceForegroundInputFromResolved(projection, rgbColorValue);
|
|
18204
|
+
return authoredTransparentHeaderForegroundInput(header, palette);
|
|
18205
|
+
}
|
|
18206
|
+
function authoredTransparentHeaderForegroundInput(header, palette) {
|
|
18207
|
+
const text = headerLeafTextColor(header);
|
|
18208
|
+
const style = effectiveHeaderNavLinkStyle(header);
|
|
18209
|
+
const link = style?.colorToken ?? text;
|
|
18210
|
+
const restingToken = parseThemeColorToken(link) ?? parseThemeColorToken("text");
|
|
18211
|
+
if (!restingToken) throw new Error("Built-in text colour token is invalid");
|
|
18212
|
+
const hover = planForegroundHover({
|
|
18213
|
+
restingToken,
|
|
18214
|
+
candidate: navLinkOwnsHoverForeground(style) ? null : navLinkHoverColorCandidate(style),
|
|
18215
|
+
palette,
|
|
18216
|
+
backdrops: null
|
|
18217
|
+
});
|
|
18218
|
+
return {
|
|
18219
|
+
text: rgbColorValue(text),
|
|
18220
|
+
link: rgbColorValue(link),
|
|
18221
|
+
linkHover: rgbColorValue(hover.token),
|
|
18222
|
+
hoverDecoration: navLinkOwnsUnderline(style) ? "initial" : hover.decoration
|
|
18223
|
+
};
|
|
18224
|
+
}
|
|
18225
|
+
//#endregion
|
|
17524
18226
|
//#region ../theme-core/src/site-styles/pageDesignAuthority.ts
|
|
17525
18227
|
const nonEmptyStringSchema = z.string().min(1);
|
|
17526
18228
|
const blockContentVersionIdSchema = nonEmptyStringSchema.transform(asBlockContentVersionId);
|
|
@@ -17673,6 +18375,28 @@ z.object({
|
|
|
17673
18375
|
motion: z.enum(themeTokenRecipeOptions.motion)
|
|
17674
18376
|
});
|
|
17675
18377
|
//#endregion
|
|
18378
|
+
//#region ../theme-core/src/footer/effectiveNavLinkStyle.ts
|
|
18379
|
+
function effectiveFooterNavLinkStyle(footer) {
|
|
18380
|
+
if (!footer) return null;
|
|
18381
|
+
if (footer.navLinkStyle) return footer.navLinkStyle;
|
|
18382
|
+
const basePreset = getNavLinkPreset(footer.navStyle ?? "minimal");
|
|
18383
|
+
if (!basePreset) return null;
|
|
18384
|
+
return {
|
|
18385
|
+
...basePreset,
|
|
18386
|
+
fontWeight: footer.navWeight ?? basePreset.fontWeight,
|
|
18387
|
+
colorToken: footer.navColor?.trim() || basePreset.colorToken
|
|
18388
|
+
};
|
|
18389
|
+
}
|
|
18390
|
+
function footerForegroundCandidates(footer, proseHoverCandidate) {
|
|
18391
|
+
if (!footer) return {};
|
|
18392
|
+
const style = effectiveFooterNavLinkStyle(footer);
|
|
18393
|
+
return {
|
|
18394
|
+
text: footer.background?.textColor,
|
|
18395
|
+
link: style?.colorToken ?? footer.navColor ?? footer.background?.textColor,
|
|
18396
|
+
linkHover: navLinkOwnsHoverForeground(style) ? proseHoverCandidate : navLinkHoverColorCandidate(style)
|
|
18397
|
+
};
|
|
18398
|
+
}
|
|
18399
|
+
//#endregion
|
|
17676
18400
|
//#region ../theme-core/src/siteChromeOverlayClearance.ts
|
|
17677
18401
|
const SITE_CHROME_VISIBLE_HEADER_ATTR = "data-site-chrome-visible-header";
|
|
17678
18402
|
//#endregion
|
|
@@ -22265,33 +22989,28 @@ function resolveBackgroundColorValue(value, context) {
|
|
|
22265
22989
|
//#endregion
|
|
22266
22990
|
//#region ../blocks/src/system/transforms/registry/_utils/surfaceForegroundStyles.ts
|
|
22267
22991
|
const contextualButtonStylesCache = /* @__PURE__ */ new WeakMap();
|
|
22268
|
-
function resolveHeaderLeafTextColor(header) {
|
|
22269
|
-
return header?.textColor ?? header?.navColor ?? header?.background?.textColor ?? header?.navLinkStyle?.colorToken ?? "text";
|
|
22270
|
-
}
|
|
22271
22992
|
function resolveHeaderRootForeground(header, palette, isTransparent) {
|
|
22272
|
-
if (isTransparent) return { kind: "unknown" };
|
|
22993
|
+
if (isTransparent) return readOpeningForegroundProjection(header) ?? { kind: "unknown" };
|
|
22273
22994
|
const background = header?.background;
|
|
22274
22995
|
return resolveSurfaceForeground(background ?? {
|
|
22275
22996
|
type: "color",
|
|
22276
22997
|
color: "surface"
|
|
22277
|
-
}, palette,
|
|
22278
|
-
|
|
22279
|
-
|
|
22280
|
-
|
|
22998
|
+
}, palette, headerForegroundCandidates(header));
|
|
22999
|
+
}
|
|
23000
|
+
function resolveFooterRootForeground(footer, palette, proseHoverCandidate) {
|
|
23001
|
+
return resolveSurfaceForeground(footer?.background ?? {
|
|
23002
|
+
type: "color",
|
|
23003
|
+
color: "surface"
|
|
23004
|
+
}, palette, footerForegroundCandidates(footer, proseHoverCandidate), { compositeBase: "background" });
|
|
22281
23005
|
}
|
|
22282
23006
|
function resolveSurfaceForegroundStyles(value, context, options) {
|
|
22283
23007
|
const input = parseBackgroundContent(value);
|
|
22284
|
-
const foreground = input ? resolveSurfaceForeground(input, context.theme.palette, {}, { compositeBase: options?.fallbackToken }) : { kind: "unknown" };
|
|
23008
|
+
const foreground = input ? resolveSurfaceForeground(input, context.theme.palette, { linkHover: context.proseHoverCandidate }, { compositeBase: options?.fallbackToken }) : { kind: "unknown" };
|
|
22285
23009
|
const buttonStyles = resolveContextualButtonStyles(input, foreground, context, options);
|
|
22286
23010
|
if (foreground.kind === "unknown") return buttonStyles;
|
|
22287
23011
|
return {
|
|
22288
23012
|
...buttonStyles,
|
|
22289
|
-
...surfaceForegroundStyle(
|
|
22290
|
-
text: resolveBackgroundColorValue(foreground.roles.text, context),
|
|
22291
|
-
heading: resolveBackgroundColorValue(foreground.roles.heading, context),
|
|
22292
|
-
link: resolveBackgroundColorValue(foreground.roles.link, context),
|
|
22293
|
-
supporting: resolveBackgroundColorValue(foreground.roles.supporting, context)
|
|
22294
|
-
})
|
|
23013
|
+
...surfaceForegroundStyle(surfaceForegroundInputFromResolved(foreground, (token) => resolveBackgroundColorValue(token, context)))
|
|
22295
23014
|
};
|
|
22296
23015
|
}
|
|
22297
23016
|
function resolveContextualButtonStyles(background, foreground, context, options) {
|
|
@@ -28103,10 +28822,7 @@ function resolveBackgroundVisualStyles(backgroundColor, defaultToken = "surface"
|
|
|
28103
28822
|
};
|
|
28104
28823
|
}
|
|
28105
28824
|
function resolveHeaderVisualStyles(header) {
|
|
28106
|
-
|
|
28107
|
-
const hasContainedNav = navContainerType === "glass" || navContainerType === "pill";
|
|
28108
|
-
const hasOverlayVariant = header?.variant === "floating";
|
|
28109
|
-
if (hasContainedNav || hasOverlayVariant) return {
|
|
28825
|
+
if (headerRootPaint(header) !== "own-surface") return {
|
|
28110
28826
|
backgroundToken: "transparent",
|
|
28111
28827
|
isTransparent: true
|
|
28112
28828
|
};
|
|
@@ -28117,23 +28833,7 @@ function resolveHeaderVisualStyles(header) {
|
|
|
28117
28833
|
}
|
|
28118
28834
|
function resolvedForegroundStyle(foreground) {
|
|
28119
28835
|
if (foreground.kind === "unknown") return void 0;
|
|
28120
|
-
|
|
28121
|
-
return surfaceForegroundStyle({
|
|
28122
|
-
text: rgbColorValue(roles.text),
|
|
28123
|
-
heading: rgbColorValue(roles.heading),
|
|
28124
|
-
link: rgbColorValue(roles.link),
|
|
28125
|
-
supporting: rgbColorValue(roles.supporting)
|
|
28126
|
-
});
|
|
28127
|
-
}
|
|
28128
|
-
function resolveFooterRootForeground(footer, palette) {
|
|
28129
|
-
const background = footer?.background;
|
|
28130
|
-
return resolveSurfaceForeground(background ?? {
|
|
28131
|
-
type: "color",
|
|
28132
|
-
color: "surface"
|
|
28133
|
-
}, palette, {
|
|
28134
|
-
text: background?.textColor,
|
|
28135
|
-
link: footer?.navLinkStyle?.colorToken ?? footer?.navColor ?? background?.textColor
|
|
28136
|
-
});
|
|
28836
|
+
return surfaceForegroundStyle(surfaceForegroundInputFromResolved(foreground, rgbColorValue));
|
|
28137
28837
|
}
|
|
28138
28838
|
function footerBottomBarBorderWidthStyle(width) {
|
|
28139
28839
|
if (!width) return void 0;
|
|
@@ -28160,8 +28860,7 @@ const headerRootClassTransform = {
|
|
|
28160
28860
|
const placement = planSiteChromePlacement(parseHeaderPositioning(content.positioning));
|
|
28161
28861
|
const header = asPartialObject(value);
|
|
28162
28862
|
const visuals = resolveHeaderVisualStyles(header);
|
|
28163
|
-
const
|
|
28164
|
-
const hasContainedNav = navContainerType === "glass" || navContainerType === "pill";
|
|
28863
|
+
const hasContainedNav = headerRootPaint(header) === "contained-nav";
|
|
28165
28864
|
const backgroundClass = visuals.isTransparent || hasContainedNav ? "rb-bg-transparent" : null;
|
|
28166
28865
|
const classes = [config.base, backgroundClass];
|
|
28167
28866
|
if (!hasContainedNav) {
|
|
@@ -28204,7 +28903,7 @@ const headerRootStyleTransform = {
|
|
|
28204
28903
|
run: (value, _options, context) => {
|
|
28205
28904
|
const header = asPartialObject(value);
|
|
28206
28905
|
const visuals = resolveHeaderVisualStyles(header);
|
|
28207
|
-
return mergeStyles(resolvedForegroundStyle(resolveHeaderRootForeground(header, context.theme.palette, visuals.isTransparent)) ?? { color: rgbColorValue(
|
|
28906
|
+
return mergeStyles(resolvedForegroundStyle(resolveHeaderRootForeground(header, context.theme.palette, visuals.isTransparent)) ?? (visuals.isTransparent ? surfaceForegroundStyle(transparentHeaderForegroundInput(header, context.theme.palette)) : { color: rgbColorValue(headerLeafTextColor(header)) }), borderColorStyle(header?.border?.colorToken ?? "border"));
|
|
28208
28907
|
}
|
|
28209
28908
|
};
|
|
28210
28909
|
const headerSectionBackgroundTransform = {
|
|
@@ -28212,9 +28911,7 @@ const headerSectionBackgroundTransform = {
|
|
|
28212
28911
|
kind: "string",
|
|
28213
28912
|
summary: "Resolve the inner site-header section background token",
|
|
28214
28913
|
run: (value) => {
|
|
28215
|
-
|
|
28216
|
-
const navContainerType = header?.navContainer?.type ?? "none";
|
|
28217
|
-
return header?.variant === "floating" || navContainerType === "glass" || navContainerType === "pill" ? "raw:transparent" : "background";
|
|
28914
|
+
return headerRootPaint(asPartialObject(value)) !== "own-surface" ? "raw:transparent" : "background";
|
|
28218
28915
|
}
|
|
28219
28916
|
};
|
|
28220
28917
|
const footerRootStyleTransform = {
|
|
@@ -28232,7 +28929,7 @@ const footerRootStyleTransform = {
|
|
|
28232
28929
|
styleParts.push(backgroundColorStyle(token));
|
|
28233
28930
|
}
|
|
28234
28931
|
}
|
|
28235
|
-
styleParts.push(resolvedForegroundStyle(resolveFooterRootForeground(footer, context.theme.palette)));
|
|
28932
|
+
styleParts.push(resolvedForegroundStyle(resolveFooterRootForeground(footer, context.theme.palette, context.proseHoverCandidate)));
|
|
28236
28933
|
styleParts.push(borderColorStyle("border"));
|
|
28237
28934
|
return mergeStyles(...styleParts);
|
|
28238
28935
|
}
|
|
@@ -28294,22 +28991,28 @@ const footerBottomBarStyleTransform = {
|
|
|
28294
28991
|
run: (value, _options, context) => {
|
|
28295
28992
|
const footer = asPartialObject(value);
|
|
28296
28993
|
const bottomBar = footer?.bottomBar;
|
|
28297
|
-
|
|
28298
|
-
const background = bottomBar?.background;
|
|
28299
|
-
if (background?.type === "color") styleParts.push(backgroundColorStyle(background.color ?? "surface"));
|
|
28300
|
-
styleParts.push(borderColorStyle(bottomBar?.borderTop?.colorToken ?? "border"), footerBottomBarBorderWidthStyle(bottomBar?.borderTop?.width));
|
|
28301
|
-
const foreground = resolveSurfaceForeground(background?.type === "color" ? background : {
|
|
28302
|
-
type: "color",
|
|
28303
|
-
color: "transparent"
|
|
28304
|
-
}, context.theme.palette, {
|
|
28305
|
-
text: bottomBar?.textColor,
|
|
28306
|
-
link: footer?.bottomTextLinkStyle?.colorToken ?? bottomBar?.textColor
|
|
28307
|
-
});
|
|
28308
|
-
if (background?.type === "color") styleParts.push(resolvedForegroundStyle(foreground));
|
|
28309
|
-
else if (bottomBar?.textColor) styleParts.push(textColorStyle(bottomBar.textColor));
|
|
28310
|
-
return mergeStyles(...styleParts);
|
|
28994
|
+
return mergeStyles(bottomBar?.background?.type === "color" ? backgroundColorStyle(bottomBar.background.color ?? "surface") : void 0, borderColorStyle(bottomBar?.borderTop?.colorToken ?? "border"), footerBottomBarBorderWidthStyle(bottomBar?.borderTop?.width), footerBottomBarForegroundStyle(footer, context.theme.palette));
|
|
28311
28995
|
}
|
|
28312
28996
|
};
|
|
28997
|
+
function footerBottomBarForegroundStyle(footer, palette) {
|
|
28998
|
+
if (!footer?.bottomBar) return void 0;
|
|
28999
|
+
const bar = footer.bottomBar;
|
|
29000
|
+
if (bar.background?.type !== "color") return backgroundlessBottomBarForegroundStyle(footer);
|
|
29001
|
+
return resolvedForegroundStyle(resolveSurfaceForeground(bar.background, palette, {
|
|
29002
|
+
text: bar.textColor,
|
|
29003
|
+
link: footer.bottomTextLinkStyle?.colorToken ?? bar.textColor,
|
|
29004
|
+
linkHover: footer.bottomTextLinkStyle?.hoverColorToken
|
|
29005
|
+
}, { compositeBase: measuredFooterBackdrop(footer, palette) }));
|
|
29006
|
+
}
|
|
29007
|
+
function backgroundlessBottomBarForegroundStyle(footer) {
|
|
29008
|
+
if (footer.background?.contentOwner === "site-chrome-editor") return;
|
|
29009
|
+
const textColor = footer.bottomBar?.textColor;
|
|
29010
|
+
return textColor ? textColorStyle(textColor) : void 0;
|
|
29011
|
+
}
|
|
29012
|
+
function measuredFooterBackdrop(footer, palette) {
|
|
29013
|
+
const foreground = resolveFooterRootForeground(footer, palette);
|
|
29014
|
+
return foreground.kind === "known" && foreground.provenance.kind === "measured" ? foreground.provenance.backdropHex : null;
|
|
29015
|
+
}
|
|
28313
29016
|
const footerSplitMainClassTransform = {
|
|
28314
29017
|
id: "layout.footerSplitMainClass",
|
|
28315
29018
|
kind: "string",
|
|
@@ -28405,7 +29108,7 @@ function chromeSurfaceTextToken(surface, theme, palette) {
|
|
|
28405
29108
|
case "header-root": {
|
|
28406
29109
|
const header = theme.header;
|
|
28407
29110
|
const foreground = resolveHeaderRootForeground(header, palette, resolveHeaderVisualStyles(header).isTransparent);
|
|
28408
|
-
return foreground.kind === "known" ? foreground.roles.text :
|
|
29111
|
+
return foreground.kind === "known" ? foreground.roles.text : headerLeafTextColor(header);
|
|
28409
29112
|
}
|
|
28410
29113
|
case "header-mobile-panel": return theme.header?.dropdownStyle?.textColor ?? "text";
|
|
28411
29114
|
case "footer-root": {
|
|
@@ -30478,13 +31181,19 @@ const bookingDescription = richText({}, bind("content.description"), when("conte
|
|
|
30478
31181
|
* that hydration never rewrites.
|
|
30479
31182
|
*/
|
|
30480
31183
|
const bookingWizard = bookingForm(withApiBindings({
|
|
31184
|
+
demoEmailSuppressed: { $bind: {
|
|
31185
|
+
from: "$root.demoEmailSuppressed",
|
|
31186
|
+
fallback: false
|
|
31187
|
+
} },
|
|
30481
31188
|
portalToken: { $bind: {
|
|
30482
31189
|
from: "$root.portalToken",
|
|
30483
31190
|
fallback: null
|
|
30484
31191
|
} },
|
|
30485
31192
|
formId: { $bind: { from: "content.formId" } },
|
|
30486
31193
|
form: { $bind: { from: "data.form" } },
|
|
30487
|
-
services: { $bind: { from: "data.services" } }
|
|
31194
|
+
services: { $bind: { from: "data.services" } },
|
|
31195
|
+
mailingList: { $bind: { from: "$root.mailingList" } },
|
|
31196
|
+
siteName: { $bind: { from: "$root.siteName" } }
|
|
30488
31197
|
}));
|
|
30489
31198
|
/** Both variants sit in the same section shell; only the inner layout differs. */
|
|
30490
31199
|
function bookingSection(children) {
|
|
@@ -31389,6 +32098,7 @@ const EVENT_REGISTRATION_SHELL_STEP_LABELS = [
|
|
|
31389
32098
|
];
|
|
31390
32099
|
const eventRegistrationPublicEventSchema = z.preprocess(normalizeEventRegistrationEventInput, publicEventSchema);
|
|
31391
32100
|
const eventRegistrationHydrationSchemaShape = {
|
|
32101
|
+
demoEmailSuppressed: z.boolean().optional(),
|
|
31392
32102
|
occurrenceContext: occurrenceContextSchema.optional(),
|
|
31393
32103
|
subject: eventRegistrationPageSurfaceSubjectSchema.nullable().optional(),
|
|
31394
32104
|
maxTickets: z.string().optional(),
|
|
@@ -31400,7 +32110,13 @@ const eventRegistrationHydrationSchemaShape = {
|
|
|
31400
32110
|
spamProtectionEnabled: z.boolean().optional(),
|
|
31401
32111
|
supportEmail: z.string().optional(),
|
|
31402
32112
|
sitePasses: publicPassProductCollectionSchema.nullable().optional(),
|
|
31403
|
-
siteMemberships: publicMembershipProductCollectionSchema.nullable().optional()
|
|
32113
|
+
siteMemberships: publicMembershipProductCollectionSchema.nullable().optional(),
|
|
32114
|
+
mailingList: z.unknown().transform((value) => {
|
|
32115
|
+
if (value === void 0) return void 0;
|
|
32116
|
+
const parsed = parseMailingListRuntimeContext(value);
|
|
32117
|
+
return parsed.ok ? parsed.value : void 0;
|
|
32118
|
+
}),
|
|
32119
|
+
siteName: z.string().optional()
|
|
31404
32120
|
};
|
|
31405
32121
|
const eventRegistrationEventSourceSchema = z.discriminatedUnion("kind", [z.object({
|
|
31406
32122
|
kind: z.literal("loaded"),
|
|
@@ -31563,6 +32279,7 @@ const eventRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
|
|
|
31563
32279
|
...eventSource,
|
|
31564
32280
|
events: [...scopedSourceEvents]
|
|
31565
32281
|
} : eventSource,
|
|
32282
|
+
demoEmailSuppressed: source.demoEmailSuppressed,
|
|
31566
32283
|
maxTickets: source.maxTickets ?? void 0,
|
|
31567
32284
|
showVenue: source.showVenue,
|
|
31568
32285
|
showCapacity: source.showCapacity,
|
|
@@ -31572,7 +32289,9 @@ const eventRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
|
|
|
31572
32289
|
spamProtectionEnabled: source.spamProtectionEnabled,
|
|
31573
32290
|
supportEmail: source.supportEmail,
|
|
31574
32291
|
sitePasses: source.sitePasses ?? null,
|
|
31575
|
-
siteMemberships: source.siteMemberships ?? null
|
|
32292
|
+
siteMemberships: source.siteMemberships ?? null,
|
|
32293
|
+
mailingList: source.mailingList,
|
|
32294
|
+
siteName: source.siteName
|
|
31576
32295
|
}
|
|
31577
32296
|
};
|
|
31578
32297
|
}
|
|
@@ -31689,8 +32408,8 @@ const eventRegistrationBlockDefinition = {
|
|
|
31689
32408
|
description: "Message shown after successful registration",
|
|
31690
32409
|
required: false,
|
|
31691
32410
|
multiline: true,
|
|
31692
|
-
|
|
31693
|
-
|
|
32411
|
+
maxLength: 500,
|
|
32412
|
+
ui: { placeholder: "Thank you for registering! Check your email for confirmation details." }
|
|
31694
32413
|
},
|
|
31695
32414
|
{
|
|
31696
32415
|
id: "buttonText",
|
|
@@ -31711,6 +32430,10 @@ const eventRegistrationBlockDefinition = {
|
|
|
31711
32430
|
text({ as: "h2" }, bind("content.heading"), when("content.heading")),
|
|
31712
32431
|
richText({ className: "rb-prose rb-max-w-none" }, bind("content.description"), when("content.description")),
|
|
31713
32432
|
eventRegistration(withApiBindings({
|
|
32433
|
+
demoEmailSuppressed: { $bind: {
|
|
32434
|
+
from: "$root.demoEmailSuppressed",
|
|
32435
|
+
fallback: false
|
|
32436
|
+
} },
|
|
31714
32437
|
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
31715
32438
|
occurrenceContext: { $bind: { from: "$root.occurrenceContext" } },
|
|
31716
32439
|
subject: { $bind: { from: "$root.subject" } },
|
|
@@ -31740,6 +32463,8 @@ const eventRegistrationBlockDefinition = {
|
|
|
31740
32463
|
events: { $bind: { from: "data.events" } },
|
|
31741
32464
|
wholeSeriesRunEvents: { $bind: { from: "data.wholeSeriesRunEvents" } },
|
|
31742
32465
|
loaderFailures: { $bind: { from: "$root.loaderFailures" } },
|
|
32466
|
+
mailingList: { $bind: { from: "$root.mailingList" } },
|
|
32467
|
+
siteName: { $bind: { from: "$root.siteName" } },
|
|
31743
32468
|
sitePasses: { $bind: { from: "data.sitePasses" } },
|
|
31744
32469
|
siteMemberships: { $bind: { from: "data.siteMemberships" } },
|
|
31745
32470
|
stage: { $bind: {
|
|
@@ -37071,6 +37796,7 @@ const shopSourceSchema = z.object({
|
|
|
37071
37796
|
memberships: z.array(publicMembershipProductSchema).nullable().optional(),
|
|
37072
37797
|
products: z.array(publicProductSchema).nullable().optional(),
|
|
37073
37798
|
siteId: z.string().optional(),
|
|
37799
|
+
demoEmailSuppressed: z.boolean().optional(),
|
|
37074
37800
|
apiBaseUrl: z.string().optional(),
|
|
37075
37801
|
readAuthority: browserReadAuthoritySchema.optional(),
|
|
37076
37802
|
stage: previewStageSchema.optional()
|
|
@@ -37190,7 +37916,8 @@ const checkoutDisplaySchema = z.object({
|
|
|
37190
37916
|
const passesMembershipsHydrationSchema = z.object({
|
|
37191
37917
|
memberships: z.array(publicMembershipProductSchema),
|
|
37192
37918
|
passPurchaseMode: z.enum(["add_to_cart", "buy_now"]),
|
|
37193
|
-
buttonVariant: blockButtonRoleSchema
|
|
37919
|
+
buttonVariant: blockButtonRoleSchema,
|
|
37920
|
+
demoEmailSuppressed: z.boolean().optional()
|
|
37194
37921
|
});
|
|
37195
37922
|
const productListHydrationSchema = z.object({
|
|
37196
37923
|
products: z.array(publicProductSchema),
|
|
@@ -37212,7 +37939,8 @@ const cartHydrationSchema = z.object({
|
|
|
37212
37939
|
});
|
|
37213
37940
|
const checkoutHydrationSchema = z.object({
|
|
37214
37941
|
emptyStateText: z.string(),
|
|
37215
|
-
submitButtonText: z.string()
|
|
37942
|
+
submitButtonText: z.string(),
|
|
37943
|
+
demoEmailSuppressed: z.boolean().optional()
|
|
37216
37944
|
});
|
|
37217
37945
|
const passesMembershipsRenderSchema = z.object({
|
|
37218
37946
|
display: passesMembershipsDisplaySchema,
|
|
@@ -37271,7 +37999,8 @@ const shopBlockRuntime = defineProgressiveBlockRuntime({
|
|
|
37271
37999
|
hydration: {
|
|
37272
38000
|
memberships: source.showMemberships === false ? [] : source.memberships ?? [],
|
|
37273
38001
|
passPurchaseMode,
|
|
37274
|
-
buttonVariant: source.buttonVariant ?? "primary"
|
|
38002
|
+
buttonVariant: source.buttonVariant ?? "primary",
|
|
38003
|
+
demoEmailSuppressed: source.demoEmailSuppressed
|
|
37275
38004
|
}
|
|
37276
38005
|
};
|
|
37277
38006
|
}
|
|
@@ -37364,7 +38093,8 @@ const checkoutBlockRuntime = defineClientOwnedBlockRuntime({
|
|
|
37364
38093
|
}),
|
|
37365
38094
|
hydration: {
|
|
37366
38095
|
emptyStateText: source.emptyStateText ?? "Add something to your cart to continue.",
|
|
37367
|
-
submitButtonText: source.submitButtonText ?? "Checkout"
|
|
38096
|
+
submitButtonText: source.submitButtonText ?? "Checkout",
|
|
38097
|
+
demoEmailSuppressed: source.demoEmailSuppressed
|
|
37368
38098
|
}
|
|
37369
38099
|
})
|
|
37370
38100
|
});
|
|
@@ -37582,6 +38312,10 @@ const shopBlockDefinition = {
|
|
|
37582
38312
|
spacing: "spacious",
|
|
37583
38313
|
children: sectionContainer([shop(withApiBindings({
|
|
37584
38314
|
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
38315
|
+
demoEmailSuppressed: { $bind: {
|
|
38316
|
+
from: "$root.demoEmailSuppressed",
|
|
38317
|
+
fallback: false
|
|
38318
|
+
} },
|
|
37585
38319
|
mode: "passes-memberships",
|
|
37586
38320
|
showPasses: { $bind: {
|
|
37587
38321
|
from: "content.showPasses",
|
|
@@ -38124,6 +38858,10 @@ const checkoutBlockDefinition = {
|
|
|
38124
38858
|
baseClass: "",
|
|
38125
38859
|
spacing: "spacious",
|
|
38126
38860
|
children: sectionContainer([checkout(withApiBindings({
|
|
38861
|
+
demoEmailSuppressed: { $bind: {
|
|
38862
|
+
from: "$root.demoEmailSuppressed",
|
|
38863
|
+
fallback: false
|
|
38864
|
+
} },
|
|
38127
38865
|
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
38128
38866
|
mode: "checkout",
|
|
38129
38867
|
heading: { $bind: {
|
|
@@ -38814,18 +39552,11 @@ const newsletterSignupManifest = createBlockManifest({
|
|
|
38814
39552
|
],
|
|
38815
39553
|
icon: "Mail"
|
|
38816
39554
|
});
|
|
39555
|
+
const newsletterPublicFieldIds = [...(newsletterSignupManifest.fields ?? []).map((field) => field.id), "_containerStyles"];
|
|
38817
39556
|
function sanitizeNewsletterSignupPublicContent(content) {
|
|
38818
39557
|
if (typeof content !== "object" || content === null || Array.isArray(content)) return content;
|
|
38819
39558
|
const value = content;
|
|
38820
|
-
return
|
|
38821
|
-
title: value.title,
|
|
38822
|
-
subtitle: value.subtitle,
|
|
38823
|
-
targeting: value.targeting,
|
|
38824
|
-
buttonVariant: value.buttonVariant,
|
|
38825
|
-
mailingListSource: value.mailingListSource,
|
|
38826
|
-
mailingListSourceToken: value.mailingListSourceToken,
|
|
38827
|
-
_sectionStyles: value._sectionStyles
|
|
38828
|
-
};
|
|
39559
|
+
return Object.fromEntries(newsletterPublicFieldIds.map((id) => [id, value[id]]));
|
|
38829
39560
|
}
|
|
38830
39561
|
const newsletterSignupBlockDefinition = {
|
|
38831
39562
|
manifest: newsletterSignupManifest,
|
|
@@ -42857,9 +43588,17 @@ function readBlockContentId(value, name) {
|
|
|
42857
43588
|
function readTransportedBlockIdentity(block, kind, stage) {
|
|
42858
43589
|
return {
|
|
42859
43590
|
draftContentId: readBlockContentId(block.draftContentId, "draft content id"),
|
|
42860
|
-
publishedPlacement: stage === "preview" ?
|
|
43591
|
+
publishedPlacement: stage === "preview" ? readSdkPreviewPublishedPlacement(block, kind) : null
|
|
42861
43592
|
};
|
|
42862
43593
|
}
|
|
43594
|
+
/** Pair SDK preview publication data whether it is transported or already admitted. */
|
|
43595
|
+
function readSdkPreviewPublishedPlacement(block, kind) {
|
|
43596
|
+
if (block.publishedPlacement !== void 0 && block.publishedPlacement !== null) {
|
|
43597
|
+
if (!isRecord(block.publishedPlacement)) throw new Error("Invalid published placement in page");
|
|
43598
|
+
return readPublishedBlockPlacement(readBlockContentId(block.publishedPlacement.id, "published content id"), sanitizeNullableSdkRuntimeBlockContent(kind, readContentRecord(block.publishedPlacement.content) ?? null));
|
|
43599
|
+
}
|
|
43600
|
+
return readPublishedBlockPlacement(readBlockContentId(block.publishedContentId, "published content id"), sanitizeNullableSdkRuntimeBlockContent(kind, readSdkPublishedContentRecord(block.publishedContent)));
|
|
43601
|
+
}
|
|
42863
43602
|
function convertPageResponseBlock(block, stage) {
|
|
42864
43603
|
if (!isRecord(block)) throw new Error("Invalid block format in page API response");
|
|
42865
43604
|
const header = readTransportedBlockHeader(block);
|
|
@@ -42968,6 +43707,10 @@ function readNestedContentRecord(value) {
|
|
|
42968
43707
|
if (!isRecord(value)) return null;
|
|
42969
43708
|
return readContentRecord(value.data) ?? null;
|
|
42970
43709
|
}
|
|
43710
|
+
function readSdkPublishedContentRecord(value) {
|
|
43711
|
+
if (!isRecord(value)) return null;
|
|
43712
|
+
return "data" in value ? readContentRecord(value.data) ?? null : value;
|
|
43713
|
+
}
|
|
42971
43714
|
function sanitizeSdkRuntimeBlockContent(blockKind, content) {
|
|
42972
43715
|
if (blockKind !== "block.newsletter-signup") return content;
|
|
42973
43716
|
const sanitized = sanitizeNewsletterSignupPublicContent(content);
|
|
@@ -43099,7 +43842,10 @@ function usePage(params) {
|
|
|
43099
43842
|
let cancelled = false;
|
|
43100
43843
|
async function fetchPage() {
|
|
43101
43844
|
try {
|
|
43102
|
-
const [site, pageResponse] = await Promise.all([client.getSite({
|
|
43845
|
+
const [site, pageResponse] = await Promise.all([client.getSite({
|
|
43846
|
+
id: siteId,
|
|
43847
|
+
currentPath: path
|
|
43848
|
+
}), client.getPage({
|
|
43103
43849
|
siteId,
|
|
43104
43850
|
path,
|
|
43105
43851
|
preview
|