@riverbankcms/sdk 0.145.0 → 0.147.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 +29 -0
- package/dist/{PreviewEditorSidebar-O-V6Pl5a.mjs → PreviewEditorSidebar-DtpB3_sS.mjs} +51 -33
- package/dist/{PreviewEditorUI-1UlX_9cw.mjs → PreviewEditorUI-DxTLgaHo.mjs} +3 -3
- package/dist/{PreviewQueryProvider-BxGwdOCV.mjs → PreviewQueryProvider-Dd4dxOiU.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-DYbA_4iv.mjs → SdkPreviewModeRuntime-DMMNCngt.mjs} +311 -186
- package/dist/{SiteChromeCustomizeContext-CNTKQ9nx.mjs → SiteChromeCustomizeContext-DQXZXiqS.mjs} +3808 -2395
- package/dist/_dts/ai/src/contracts/proposals.d.ts +1122 -0
- package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +102 -0
- package/dist/_dts/api/src/accountApi.d.ts +5 -5
- package/dist/_dts/api/src/bookingConfig.d.ts +24 -1
- package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +11 -26
- package/dist/_dts/api/src/bookingManagementEventEndpointTypes.d.ts +45 -1
- package/dist/_dts/api/src/bookingOperations.d.ts +2 -44
- 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 +11 -49
- package/dist/_dts/api/src/bookingSettingsSections.d.ts +1 -1
- package/dist/_dts/api/src/bookings.d.ts +1 -0
- package/dist/_dts/api/src/clientErrorReporting.d.ts +50 -0
- package/dist/_dts/api/src/communications.d.ts +20 -4
- package/dist/_dts/api/src/contentRuntime.d.ts +3 -7
- package/dist/_dts/api/src/endpoints.d.ts +816 -655
- package/dist/_dts/api/src/event-visibility.d.ts +20 -0
- package/dist/_dts/api/src/eventManagementContracts.d.ts +72 -4
- package/dist/_dts/api/src/eventManagementEndpointDefinitions.d.ts +24 -0
- package/dist/_dts/api/src/eventPageWords.d.ts +19 -0
- package/dist/_dts/api/src/eventSeriesRegistrationEndpointDefinitions.d.ts +14 -0
- package/dist/_dts/api/src/index.d.ts +9 -2
- package/dist/_dts/api/src/indexCoreTypes.d.ts +1 -1
- package/dist/_dts/api/src/indexExtendedTypes.d.ts +1 -1
- package/dist/_dts/api/src/launchReadiness.d.ts +19 -6
- package/dist/_dts/api/src/launchRequirementPriority.d.ts +3 -0
- 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/newsletterCampaignCommandEndpoints.d.ts +13 -0
- package/dist/_dts/api/src/newsletterEndpointDefinitions.d.ts +57 -0
- package/dist/_dts/api/src/occurrenceScheduling.d.ts +29 -0
- package/dist/_dts/api/src/pageSurfaceEndpoints.d.ts +44 -0
- package/dist/_dts/api/src/participantMessaging.d.ts +11 -1
- package/dist/_dts/api/src/publicAppointmentBookingContracts.d.ts +48 -0
- package/dist/_dts/api/src/publicExperience/eventEndpoints.d.ts +7 -0
- package/dist/_dts/api/src/sdk-event-upsert.d.ts +55 -1
- package/dist/_dts/api/src/sdkContracts.d.ts +3 -42
- package/dist/_dts/api/src/sdkCourseBooking.d.ts +30 -0
- package/dist/_dts/api/src/sdkEventEndpointDefinitions.d.ts +76 -0
- package/dist/_dts/api/src/sdkEventLifecycle.d.ts +37 -0
- package/dist/_dts/api/src/sdkManagedEventContracts.d.ts +18 -0
- package/dist/_dts/api/src/sdkPageDesign.d.ts +388 -0
- package/dist/_dts/api/src/sdkPageDesignEndpointDefinitions.d.ts +22 -0
- package/dist/_dts/api/src/sdkPullEventContracts.d.ts +46 -0
- package/dist/_dts/api/src/siteAddressEndpoints.d.ts +29 -0
- package/dist/_dts/api/src/siteLifecycleEndpoints.d.ts +61 -0
- package/dist/_dts/api/src/siteManagementEndpointDefinitions.d.ts +49 -0
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +6 -49
- package/dist/_dts/api/src/siteOnboarding.d.ts +72 -18
- package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +1 -1
- package/dist/_dts/api/src/types.d.ts +7 -1
- package/dist/_dts/api/src/wholeSeriesRuns.d.ts +14 -0
- package/dist/_dts/blocks/src/PageRenderer.d.ts +3 -4
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +8 -0
- package/dist/_dts/blocks/src/index.d.ts +2 -0
- package/dist/_dts/blocks/src/pageRenderAdmission.d.ts +29 -1
- package/dist/_dts/blocks/src/pageRendererContracts.d.ts +5 -1
- package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +27 -5
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +14 -1
- package/dist/_dts/blocks/src/system/blocks/newsletter-signup.d.ts +4 -1
- package/dist/_dts/blocks/src/system/icons/social.d.ts +1 -1
- package/dist/_dts/blocks/src/system/registry.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/api/types/appointments.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/api/types/events.d.ts +12 -0
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +12 -0
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessBookingFlow.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessEventRegistrationFlow.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.completion.d.ts +9 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.headless.state.d.ts +9 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.interactive.d.ts +19 -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-note.d.ts +3 -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.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 +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.submit-handler.d.ts +8 -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 +3 -0
- 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/SuccessStep.d.ts +3 -0
- 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/eventSourceRecovery.d.ts +1 -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 +6 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationSubmit.d.ts +3 -0
- 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 +9 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +20 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/form.fields.d.ts +5 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.block-submission.d.ts +34 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.client.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.interactive.d.ts +6 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.parts.d.ts +46 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.types.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/resolver.d.ts +4 -1
- package/dist/_dts/blocks/src/system/runtime/shared/components/BookingMailingListNote.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/shared/components/CheckboxChoice.d.ts +18 -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/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/content-editor/src/index.d.ts +1 -0
- package/dist/_dts/content-editor/src/primitives/previewEditableOutline.d.ts +2 -0
- package/dist/_dts/content-editor/src/ui/editorBlockEquality.d.ts +3 -0
- package/dist/_dts/content-editor/src/ui/editorSnapshot.d.ts +3 -5
- package/dist/_dts/core/src/block-content-identity.d.ts +5 -0
- package/dist/_dts/core/src/editor-state.d.ts +2 -7
- package/dist/_dts/core/src/index.d.ts +2 -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 +9 -1
- 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/public-event-booking-availability.d.ts +20 -1
- package/dist/_dts/core/src/public-profile.d.ts +3 -1
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +151 -24
- package/dist/_dts/editor-blocks/src/BlockEditor.d.ts +3 -0
- package/dist/_dts/editor-blocks/src/block-editor/EmptyState.d.ts +13 -1
- package/dist/_dts/editor-blocks/src/block-editor/actionPresentation.d.ts +1 -0
- package/dist/_dts/editor-blocks/src/block-editor/types.d.ts +2 -8
- package/dist/_dts/editor-blocks/src/index.d.ts +1 -0
- package/dist/_dts/preview-next/src/client/blocks/EditablePageRenderer.d.ts +7 -1
- package/dist/_dts/preview-next/src/client/blocks/composer/types.d.ts +5 -5
- package/dist/_dts/preview-next/src/client/preview/PreviewEntryControllerProvider.d.ts +1 -2
- package/dist/_dts/sdk/src/next/renderSdkContent.d.ts +0 -1
- package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +3 -2
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +3 -2
- package/dist/_dts/sdk/src/rendering/helpers/loadContent.d.ts +6 -1
- package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +5 -2
- package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +6 -1
- package/dist/_dts/sdk/src/rendering/helpers/templateContent.d.ts +2 -0
- package/dist/_dts/sdk/src/rendering/hooks/useContent.d.ts +5 -1
- package/dist/_dts/sdk/src/rendering/hooks/usePage.d.ts +5 -1
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/surfaces/src/index.d.ts +9 -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/inputs/checkable.d.ts +42 -0
- package/dist/_dts/theme-core/src/inputs/inputGroup.d.ts +19 -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/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/navigation-tabs.d.ts +2 -1
- 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-DlVOmpW4.mjs → BookingMailingListNote-1n4Ch_u_.mjs} +15 -4
- package/dist/client/CheckboxChoice-B33MqoUo.mjs +24 -0
- package/dist/client/{DiscountCodeDisclosure-T9q623PQ.mjs → DiscountCodeDisclosure-CKJtz0mY.mjs} +1 -1
- package/dist/client/{EventCombined.client-DnsUeONl.mjs → EventCombined.client-C0pgma9y.mjs} +7 -7
- package/dist/client/{EventListing.client-CNBFqJS4.mjs → EventListing.client-4fhLOvHP.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-C7higg52.mjs → LeafletStaticMap-DScC4F3w.mjs} +1 -1
- package/dist/client/{scrollToBlock-CWs8EIdo.mjs → TerminalPanel-B5ZUsYhe.mjs} +77 -77
- package/dist/client/{ThemedButton-LAJTNrS8.mjs → ThemedButton-DoVIV1Ao.mjs} +2 -2
- package/dist/client/{accordion-BcNF9TjX.mjs → accordion-CoT5g7zo.mjs} +1 -1
- package/dist/client/{bookingForm-BUaQ3S03.mjs → bookingForm-BWxB46xD.mjs} +251 -150
- package/dist/client/bookings.mjs +415 -234
- package/dist/client/{carousel-CTdF6e0V.mjs → carousel-DtNYWFd3.mjs} +2 -2
- package/dist/client/{carousel.client-jahpU9Vz.mjs → carousel.client-A2lG-9od.mjs} +1 -1
- package/dist/client/{cart-pGtyf_XU.mjs → cart-z4qZih1Y.mjs} +3 -3
- package/dist/client/{checkout-Da9WSn7Y.mjs → checkout-DpL7euFH.mjs} +3 -3
- package/dist/client/{checkoutUrls-CW3-78uu.mjs → checkoutUrls-BEfR7kVu.mjs} +1 -1
- package/dist/client/client.mjs +3721 -2220
- package/dist/client/{colorStyles-CuJBiS-1.mjs → colorStyles-j5U9v5JA.mjs} +5 -1
- package/dist/client/{context-BFeY_Wbm.mjs → context-C8TinPJc.mjs} +1 -1
- package/dist/client/{dates-BhwVSxDg.mjs → dates-vwwxTeB0.mjs} +2 -3
- package/dist/client/{eventCalendar-BAtdnR4s.mjs → eventCalendar-DIbHfJXO.mjs} +10 -10
- package/dist/client/{eventCombined-RksA3tRC.mjs → eventCombined-DoGMJ6cg.mjs} +4 -4
- package/dist/client/{eventDetails-BB9hB4wR.mjs → eventDetails-BjN9v6a1.mjs} +4 -4
- package/dist/client/{eventListing-BpJBkviM.mjs → eventListing-DajjWgOv.mjs} +4 -4
- package/dist/client/{eventRegistration-B18jFq_o.mjs → eventRegistration-DMq9gMA-.mjs} +121 -54
- package/dist/client/{form-Dodt8Y8t.mjs → form-Qf6qTbos.mjs} +136 -105
- package/dist/client/{headerSection-B0qj9ttg.mjs → headerSection-D7qJrqFX.mjs} +3 -3
- package/dist/client/hooks.mjs +1148 -179
- package/dist/client/{locationMap-gn-iMk7a.mjs → locationMap-CCF9-t_0.mjs} +4 -4
- package/dist/client/{FieldValidationMessage-AYanWFb-.mjs → mailingListSignupCopy-DZSHZrm6.mjs} +14 -1
- package/dist/client/{media-BtJ37tzS.mjs → media-CwBGetqC.mjs} +1 -1
- package/dist/client/{newsletterForm-oByLdFkr.mjs → newsletterForm-DzCLSP4S.mjs} +206 -104
- package/dist/client/{pricing-BOU0_Hai.mjs → pricing-Cgxv2KLC.mjs} +1 -1
- package/dist/client/{productDetail-D9v1zH2j.mjs → productDetail-ru9w5GHx.mjs} +3 -3
- package/dist/client/{productList-D-mItx1n.mjs → productList-zaapKSl-.mjs} +3 -3
- package/dist/client/{propsDecoder-C3TP_z4x.mjs → propsDecoder-CwvvNOHx.mjs} +91 -28
- package/dist/client/rendering/client.mjs +1441 -826
- package/dist/client/rendering/islands.mjs +19 -19
- package/dist/client/rendering.mjs +3652 -2005
- package/dist/client/{routeIslandApiConfig-DzN1W0sq.mjs → routeIslandApiConfig-BwVFo0Y4.mjs} +1 -1
- package/dist/client/{shop-commerce-gklw_hLF.mjs → shop-commerce-De7gEnkA.mjs} +8 -8
- package/dist/client/{shop-commerce-store-Sf1eyTaZ.mjs → shop-commerce-store-B3MCxIBW.mjs} +1 -1
- package/dist/client/{shop-Dufw7N7o.mjs → shop-mktkXvbV.mjs} +7 -7
- package/dist/client/{shopShared-B5nyA41S.mjs → shopShared-TqExh235.mjs} +5 -5
- package/dist/client/{useEventFilters-CLL829vy.mjs → useEventFilters-n_OjkIjX.mjs} +8 -8
- package/dist/preview-next/before-render.mjs +490 -153
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/editor-base.css +64 -2
- package/dist/preview-next/editor-chrome.css +7 -4
- package/dist/preview-next/keepAlive.mjs +450 -153
- package/dist/preview-next/middleware.mjs +451 -153
- package/dist/{previewAuthStore-BxAFlu-j.mjs → previewAuthStore-C_EHQ5XA.mjs} +475 -153
- package/dist/{sdk-runtime-D0uZFev7.mjs → sdk-runtime-BIkJg5y1.mjs} +2 -2
- package/dist/{separator-EvdCAn4V.mjs → separator-C9qDP95Z.mjs} +1 -1
- package/dist/server/components.mjs +4957 -3509
- package/dist/server/config-validation.mjs +1115 -189
- package/dist/server/config.mjs +1115 -189
- package/dist/server/data.mjs +1113 -188
- package/dist/server/index.mjs +492 -154
- package/dist/server/navigation.mjs +13 -2
- package/dist/server/next.mjs +4798 -3462
- package/dist/server/page-converter.mjs +143 -89
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +3862 -2414
- package/dist/server/rendering.mjs +5648 -4154
- package/dist/server/routing.mjs +1223 -329
- package/dist/server/server.mjs +1172 -314
- package/dist/server/theme-bridge.mjs +533 -128
- package/dist/server/theme.mjs +5 -1
- package/dist/styles/index.css +218 -69
- package/package.json +1 -1
- package/dist/_dts/core/src/participant-identity.d.ts +0 -135
package/dist/client/hooks.mjs
CHANGED
|
@@ -662,17 +662,35 @@ function parseMailingListRuntimeContext(value) {
|
|
|
662
662
|
if (!isRecord$13(value)) return invalidRuntimeContext();
|
|
663
663
|
if (value.tag === "not_configured") return ok({ tag: "not_configured" });
|
|
664
664
|
if (value.tag !== "configured") return invalidRuntimeContext();
|
|
665
|
+
return parseConfiguredRuntimeContext(value);
|
|
666
|
+
}
|
|
667
|
+
function parseConfiguredRuntimeContext(value) {
|
|
665
668
|
const revision = parseMailingListSetupRevision(value.revision);
|
|
666
669
|
const form = parseMailingListGlobalForm(value.form);
|
|
667
670
|
const provider = parseRuntimeProvider(value.provider);
|
|
668
|
-
|
|
671
|
+
const bookingSignup = parseBookingSignupOffer(value.bookingSignup);
|
|
672
|
+
if (revision === null || !form.ok || provider === null || bookingSignup === null) return invalidRuntimeContext();
|
|
669
673
|
return ok({
|
|
670
674
|
tag: "configured",
|
|
671
675
|
revision,
|
|
676
|
+
bookingSignup,
|
|
672
677
|
form: form.value,
|
|
673
678
|
provider
|
|
674
679
|
});
|
|
675
680
|
}
|
|
681
|
+
function parseBookingSignupOffer(value) {
|
|
682
|
+
if (value === void 0) return {
|
|
683
|
+
tag: "unavailable",
|
|
684
|
+
reason: "disabled"
|
|
685
|
+
};
|
|
686
|
+
if (!isRecord$13(value)) return null;
|
|
687
|
+
if (value.tag === "offered") return { tag: "offered" };
|
|
688
|
+
if (value.tag === "unavailable" && (value.reason === "disabled" || value.reason === "fields" || value.reason === "destination")) return {
|
|
689
|
+
tag: "unavailable",
|
|
690
|
+
reason: value.reason
|
|
691
|
+
};
|
|
692
|
+
return null;
|
|
693
|
+
}
|
|
676
694
|
function parseRuntimeProvider(value) {
|
|
677
695
|
if (!isRecord$13(value)) return null;
|
|
678
696
|
switch (value.provider) {
|
|
@@ -899,15 +917,6 @@ function parseMailingListContentVersionId(value) {
|
|
|
899
917
|
const parsed = parseContentVersionId(value);
|
|
900
918
|
return parsed.ok ? parsed.value : null;
|
|
901
919
|
}
|
|
902
|
-
function buildMailingListSignupBlockSourceRef(blockId, contentVersionId) {
|
|
903
|
-
const parsedBlockId = parseMailingListBlockId(blockId);
|
|
904
|
-
const parsedContentVersionId = parseMailingListContentVersionId(contentVersionId);
|
|
905
|
-
return parsedBlockId !== null && parsedContentVersionId !== null ? {
|
|
906
|
-
tag: "block_ref",
|
|
907
|
-
blockId: parsedBlockId,
|
|
908
|
-
contentVersionId: parsedContentVersionId
|
|
909
|
-
} : null;
|
|
910
|
-
}
|
|
911
920
|
//#endregion
|
|
912
921
|
//#region ../core/src/secret.ts
|
|
913
922
|
/**
|
|
@@ -2393,13 +2402,16 @@ const SURFACE_FOREGROUND_CSS_VARS = {
|
|
|
2393
2402
|
text: "--rb-surface-text-color",
|
|
2394
2403
|
heading: "--rb-surface-heading-color",
|
|
2395
2404
|
link: "--rb-surface-link-color",
|
|
2405
|
+
linkHover: "--rb-surface-link-hover-color",
|
|
2396
2406
|
supporting: "--rb-surface-supporting-color"
|
|
2397
2407
|
};
|
|
2398
2408
|
const DEFAULT_SURFACE_TEXT_COLOR = "rgb(var(--tb-text, 17 24 39))";
|
|
2409
|
+
const DEFAULT_SURFACE_LINK_COLOR = "rgb(var(--tb-primary, var(--tb-text, 17 24 39)))";
|
|
2399
2410
|
const DEFAULT_ROLE_FALLBACKS = {
|
|
2400
2411
|
text: DEFAULT_SURFACE_TEXT_COLOR,
|
|
2401
2412
|
heading: DEFAULT_SURFACE_TEXT_COLOR,
|
|
2402
|
-
link:
|
|
2413
|
+
link: DEFAULT_SURFACE_LINK_COLOR,
|
|
2414
|
+
linkHover: DEFAULT_SURFACE_LINK_COLOR,
|
|
2403
2415
|
supporting: "rgb(var(--tb-mutedText, 100 116 139))"
|
|
2404
2416
|
};
|
|
2405
2417
|
function requireSurfaceColorValue(role, value) {
|
|
@@ -2409,10 +2421,12 @@ function requireSurfaceColorValue(role, value) {
|
|
|
2409
2421
|
}
|
|
2410
2422
|
function completeSurfaceForegrounds(input) {
|
|
2411
2423
|
const text = requireSurfaceColorValue("text", input.text);
|
|
2424
|
+
const link = input.link === void 0 ? text : requireSurfaceColorValue("link", input.link);
|
|
2412
2425
|
return {
|
|
2413
2426
|
text,
|
|
2414
2427
|
heading: input.heading === void 0 ? text : requireSurfaceColorValue("heading", input.heading),
|
|
2415
|
-
link
|
|
2428
|
+
link,
|
|
2429
|
+
linkHover: input.linkHover === void 0 ? link : requireSurfaceColorValue("linkHover", input.linkHover),
|
|
2416
2430
|
supporting: input.supporting === void 0 ? text : requireSurfaceColorValue("supporting", input.supporting)
|
|
2417
2431
|
};
|
|
2418
2432
|
}
|
|
@@ -2420,6 +2434,7 @@ function surfaceForegroundValue(role, outsideProviderFallback = DEFAULT_ROLE_FAL
|
|
|
2420
2434
|
const roleVariable = SURFACE_FOREGROUND_CSS_VARS[role];
|
|
2421
2435
|
const fallback = requireSurfaceColorValue("fallback", outsideProviderFallback);
|
|
2422
2436
|
if (role === "text") return `var(${roleVariable}, ${fallback})`;
|
|
2437
|
+
if (role === "linkHover") return `var(${roleVariable}, ${surfaceForegroundValue("link", fallback)})`;
|
|
2423
2438
|
return `var(${roleVariable}, var(${SURFACE_FOREGROUND_CSS_VARS.text}, ${fallback}))`;
|
|
2424
2439
|
}
|
|
2425
2440
|
function surfaceForegroundValueWithOpacity(role, opacityPercent) {
|
|
@@ -2433,9 +2448,25 @@ function surfaceForegroundStyle(input) {
|
|
|
2433
2448
|
[SURFACE_FOREGROUND_CSS_VARS.text]: foregrounds.text,
|
|
2434
2449
|
[SURFACE_FOREGROUND_CSS_VARS.heading]: foregrounds.heading,
|
|
2435
2450
|
[SURFACE_FOREGROUND_CSS_VARS.link]: foregrounds.link,
|
|
2436
|
-
[SURFACE_FOREGROUND_CSS_VARS.
|
|
2451
|
+
[SURFACE_FOREGROUND_CSS_VARS.linkHover]: foregrounds.linkHover,
|
|
2452
|
+
[SURFACE_FOREGROUND_CSS_VARS.supporting]: foregrounds.supporting,
|
|
2453
|
+
"--rb-surface-link-hover-decoration": hoverDecoration(input)
|
|
2437
2454
|
};
|
|
2438
2455
|
}
|
|
2456
|
+
function surfaceForegroundInputFromResolved(foreground, color) {
|
|
2457
|
+
const { roles } = foreground;
|
|
2458
|
+
return {
|
|
2459
|
+
text: color(roles.text),
|
|
2460
|
+
heading: color(roles.heading),
|
|
2461
|
+
link: color(roles.link),
|
|
2462
|
+
linkHover: color(roles.linkHover),
|
|
2463
|
+
supporting: color(roles.supporting),
|
|
2464
|
+
hoverDecoration: foreground.hoverDecoration
|
|
2465
|
+
};
|
|
2466
|
+
}
|
|
2467
|
+
function hoverDecoration(input) {
|
|
2468
|
+
return input.hoverDecoration ?? "underline";
|
|
2469
|
+
}
|
|
2439
2470
|
//#endregion
|
|
2440
2471
|
//#region ../theme-core/src/buttons/constants.ts
|
|
2441
2472
|
/**
|
|
@@ -3292,6 +3323,64 @@ function parseAlpha(source) {
|
|
|
3292
3323
|
function isRgbChannel(value) {
|
|
3293
3324
|
return Number.isFinite(value) && value >= 0 && value <= 255;
|
|
3294
3325
|
}
|
|
3326
|
+
/**
|
|
3327
|
+
* Derive the hover foreground that belongs with a resolved resting foreground.
|
|
3328
|
+
*
|
|
3329
|
+
* A resting foreground is chosen to be legible against a known surface. A hover
|
|
3330
|
+
* state derived from it stays within a bounded distance of that colour, so it
|
|
3331
|
+
* inherits most of the resting colour's contrast margin instead of asserting
|
|
3332
|
+
* an unrelated brand colour that no one checked against the surface.
|
|
3333
|
+
*
|
|
3334
|
+
* That bounded-distance property is what lets this be used on a transparent
|
|
3335
|
+
* overlay header, where the backdrop is only partly knowable: the scrolled
|
|
3336
|
+
* state composites a 60% glass tint over arbitrary page content, so no
|
|
3337
|
+
* compile-time contrast proof is available there. Staying near a colour that
|
|
3338
|
+
* is already trusted in both states is a weaker claim than a contrast proof,
|
|
3339
|
+
* and it is one this function can actually keep.
|
|
3340
|
+
*
|
|
3341
|
+
* Returns `null` when the resting token is not a plain palette token — an
|
|
3342
|
+
* already-faded or raw value has no well-defined softening, and the caller
|
|
3343
|
+
* should leave hover alone rather than guess.
|
|
3344
|
+
*/
|
|
3345
|
+
function deriveForegroundHoverToken(restingToken) {
|
|
3346
|
+
const parts = parseColorTokenParts(restingToken);
|
|
3347
|
+
if (parts.kind !== "token") return null;
|
|
3348
|
+
if (parts.opacityPercent !== null) return null;
|
|
3349
|
+
return parseThemeColorToken(`${parts.token}/85`);
|
|
3350
|
+
}
|
|
3351
|
+
/**
|
|
3352
|
+
* Prefer an authored hover that survives every measured backdrop, then a
|
|
3353
|
+
* checked softening of the resting colour. A null backdrop set represents a
|
|
3354
|
+
* trusted treatment: only an explicit authored hover may change the colour.
|
|
3355
|
+
* When neither option works, retain the resting colour and underline it.
|
|
3356
|
+
*/
|
|
3357
|
+
function planForegroundHover(input) {
|
|
3358
|
+
const { restingToken, candidate, palette, backdrops } = input;
|
|
3359
|
+
if (candidate && candidate !== restingToken) {
|
|
3360
|
+
if (backdrops === null || survivesEveryBackdrop(candidate, palette, backdrops)) return {
|
|
3361
|
+
kind: "candidate",
|
|
3362
|
+
token: candidate,
|
|
3363
|
+
decoration: "initial"
|
|
3364
|
+
};
|
|
3365
|
+
}
|
|
3366
|
+
const softened = deriveForegroundHoverToken(restingToken);
|
|
3367
|
+
if (softened && backdrops && survivesEveryBackdrop(softened, palette, backdrops)) return {
|
|
3368
|
+
kind: "softened",
|
|
3369
|
+
token: softened,
|
|
3370
|
+
decoration: "initial"
|
|
3371
|
+
};
|
|
3372
|
+
return {
|
|
3373
|
+
kind: "resting",
|
|
3374
|
+
token: restingToken,
|
|
3375
|
+
decoration: "underline"
|
|
3376
|
+
};
|
|
3377
|
+
}
|
|
3378
|
+
function survivesEveryBackdrop(token, palette, backdrops) {
|
|
3379
|
+
return backdrops.length > 0 && backdrops.every((backdrop) => {
|
|
3380
|
+
const foreground = resolveOpaqueSurfaceHex(token, palette, backdrop);
|
|
3381
|
+
return foreground !== null && contrastRatio(foreground, backdrop) >= 4.5;
|
|
3382
|
+
});
|
|
3383
|
+
}
|
|
3295
3384
|
//#endregion
|
|
3296
3385
|
//#region ../theme-core/src/surfaces/resolveSurfaceForeground.ts
|
|
3297
3386
|
const FALLBACK_TEXT_TOKENS = [
|
|
@@ -3338,12 +3427,16 @@ function resolveSurfaceForeground(background, palette, candidates = {}, options
|
|
|
3338
3427
|
}
|
|
3339
3428
|
function foregroundCandidates(background, overrides) {
|
|
3340
3429
|
return {
|
|
3341
|
-
text: overrides.text
|
|
3342
|
-
heading: overrides.heading
|
|
3343
|
-
link: overrides.link
|
|
3344
|
-
|
|
3430
|
+
text: candidateOrBackground(overrides.text, background?.textColor),
|
|
3431
|
+
heading: candidateOrBackground(overrides.heading, background?.headingColor),
|
|
3432
|
+
link: candidateOrBackground(overrides.link, background?.linkColor),
|
|
3433
|
+
linkHover: candidateOrBackground(overrides.linkHover),
|
|
3434
|
+
supporting: candidateOrBackground(overrides.supporting, background?.supportingColor)
|
|
3345
3435
|
};
|
|
3346
3436
|
}
|
|
3437
|
+
function candidateOrBackground(candidate, backgroundValue) {
|
|
3438
|
+
return candidate ?? backgroundValue ?? null;
|
|
3439
|
+
}
|
|
3347
3440
|
function resolveDeterministicForeground(backgroundReference, candidates, palette, compositeBase) {
|
|
3348
3441
|
const backgroundHex = resolveOpaqueSurfaceHex(backgroundReference, palette, compositeBase);
|
|
3349
3442
|
if (!backgroundHex) return resolveTrustedTreatmentForeground(candidates, palette);
|
|
@@ -3355,29 +3448,51 @@ function resolveDeterministicForeground(backgroundReference, candidates, palette
|
|
|
3355
3448
|
...FALLBACK_TEXT_TOKENS
|
|
3356
3449
|
], backgroundHex, palette, derivedOnToken ? [derivedOnToken] : []);
|
|
3357
3450
|
if (!text) return { kind: "unknown" };
|
|
3358
|
-
return {
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
};
|
|
3451
|
+
return knownForeground({
|
|
3452
|
+
text,
|
|
3453
|
+
heading: safeTokenOr(candidates.heading, text, backgroundHex, palette),
|
|
3454
|
+
link: safeTokenOr(candidates.link, text, backgroundHex, palette),
|
|
3455
|
+
supporting: safeTokenOr(candidates.supporting, text, backgroundHex, palette)
|
|
3456
|
+
}, {
|
|
3457
|
+
kind: "measured",
|
|
3458
|
+
backdropHex: backgroundHex
|
|
3459
|
+
}, candidates.linkHover, palette);
|
|
3367
3460
|
}
|
|
3368
3461
|
function resolveTrustedTreatmentForeground(candidates, palette) {
|
|
3369
3462
|
const text = canonicalToken(candidates.text, palette);
|
|
3370
3463
|
if (!text) return { kind: "unknown" };
|
|
3464
|
+
return knownForeground({
|
|
3465
|
+
text,
|
|
3466
|
+
heading: canonicalToken(candidates.heading, palette) ?? text,
|
|
3467
|
+
link: canonicalToken(candidates.link, palette) ?? text,
|
|
3468
|
+
supporting: canonicalToken(candidates.supporting, palette) ?? text
|
|
3469
|
+
}, { kind: "trusted-treatment" }, candidates.linkHover, palette);
|
|
3470
|
+
}
|
|
3471
|
+
function knownForeground(roles, provenance, hoverCandidate, palette) {
|
|
3472
|
+
const hover = planForegroundHover({
|
|
3473
|
+
restingToken: roles.link,
|
|
3474
|
+
candidate: canonicalHoverToken(hoverCandidate, palette),
|
|
3475
|
+
palette,
|
|
3476
|
+
backdrops: provenance.kind === "measured" ? [provenance.backdropHex] : null
|
|
3477
|
+
});
|
|
3371
3478
|
return {
|
|
3372
3479
|
kind: "known",
|
|
3480
|
+
provenance,
|
|
3373
3481
|
roles: {
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
}
|
|
3482
|
+
...roles,
|
|
3483
|
+
linkHover: hover.token
|
|
3484
|
+
},
|
|
3485
|
+
hoverDecoration: hover.decoration
|
|
3379
3486
|
};
|
|
3380
3487
|
}
|
|
3488
|
+
function canonicalHoverToken(reference, palette) {
|
|
3489
|
+
const token = parseThemeColorToken(reference);
|
|
3490
|
+
if (token) {
|
|
3491
|
+
const parts = parseColorTokenParts(token);
|
|
3492
|
+
if (parts.kind === "token" && resolveConcreteColorHex(parts.token, palette)) return token;
|
|
3493
|
+
}
|
|
3494
|
+
return canonicalToken(reference, palette);
|
|
3495
|
+
}
|
|
3381
3496
|
function safeTokenOr(candidate, fallback, backgroundHex, palette) {
|
|
3382
3497
|
return firstSafeToken([candidate], backgroundHex, palette) ?? fallback;
|
|
3383
3498
|
}
|
|
@@ -6316,6 +6431,43 @@ const effectCompositionSchema = z.object({
|
|
|
6316
6431
|
/** Effects applied on focus */
|
|
6317
6432
|
focus: z.array(effectApplicationSchema).optional()
|
|
6318
6433
|
});
|
|
6434
|
+
const policiesById = {
|
|
6435
|
+
"darken-background": "other",
|
|
6436
|
+
"lighten-background": "other",
|
|
6437
|
+
"fade-background": "other",
|
|
6438
|
+
"opacity-reduce": "other",
|
|
6439
|
+
"animated-gradient": "other",
|
|
6440
|
+
"background-on-hover": "paired-hover",
|
|
6441
|
+
"background-on-hover-alpha": "paired-hover",
|
|
6442
|
+
"border-glow": "other",
|
|
6443
|
+
"drop-shadow": "other",
|
|
6444
|
+
"inner-shadow": "other",
|
|
6445
|
+
"neumorphic-shadow": "other",
|
|
6446
|
+
"outer-glow": "other",
|
|
6447
|
+
"retro-3d-shadow": "other",
|
|
6448
|
+
"scale-up": "other",
|
|
6449
|
+
"scale-down": "other",
|
|
6450
|
+
lift: "other",
|
|
6451
|
+
"press-down": "other",
|
|
6452
|
+
pop: "other",
|
|
6453
|
+
"aurora-glow": "other",
|
|
6454
|
+
"cosmic-stardust": "other",
|
|
6455
|
+
"gradient-border-fill": "other",
|
|
6456
|
+
"animated-gradient-border-fill": "other",
|
|
6457
|
+
"border-bottom-grow": "other",
|
|
6458
|
+
"gradient-text": "other",
|
|
6459
|
+
"text-color-change": "text-colour",
|
|
6460
|
+
"border-color-change": "other",
|
|
6461
|
+
"sketchy-border": "other",
|
|
6462
|
+
"pulse-animation": "other",
|
|
6463
|
+
"nav-underline": "underline",
|
|
6464
|
+
"nav-frosted-base": "other",
|
|
6465
|
+
"nav-frosted-hover": "other",
|
|
6466
|
+
"nav-frosted-active": "other"
|
|
6467
|
+
};
|
|
6468
|
+
function navEffectPolicy(effectId) {
|
|
6469
|
+
return policiesById[effectId] ?? null;
|
|
6470
|
+
}
|
|
6319
6471
|
//#endregion
|
|
6320
6472
|
//#region ../theme-core/src/navigation/types.ts
|
|
6321
6473
|
/**
|
|
@@ -6404,6 +6556,16 @@ const navLinkStyleSchema = z.object({
|
|
|
6404
6556
|
/** Composable effects */
|
|
6405
6557
|
effects: effectCompositionSchema.optional()
|
|
6406
6558
|
});
|
|
6559
|
+
function navLinkHoverColorCandidate(style) {
|
|
6560
|
+
const effect = style?.effects?.hover?.find((item) => navEffectPolicy(item.effectId) === "text-colour");
|
|
6561
|
+
return parseThemeColorToken(effect?.options?.hoverColorToken ?? style?.hoverColorToken);
|
|
6562
|
+
}
|
|
6563
|
+
function navLinkOwnsHoverForeground(style) {
|
|
6564
|
+
return style?.effects?.hover?.some((effect) => navEffectPolicy(effect.effectId) === "paired-hover") ?? false;
|
|
6565
|
+
}
|
|
6566
|
+
function navLinkOwnsUnderline(style) {
|
|
6567
|
+
return style?.effects?.hover?.some((effect) => navEffectPolicy(effect.effectId) === "underline") ?? false;
|
|
6568
|
+
}
|
|
6407
6569
|
//#endregion
|
|
6408
6570
|
//#region ../theme-core/src/customCss/validation.ts
|
|
6409
6571
|
/**
|
|
@@ -8062,6 +8224,7 @@ const publicEventLoaderQuerySchemaShape = {
|
|
|
8062
8224
|
seriesSlug: z.string().optional(),
|
|
8063
8225
|
includeOccurrenceId: z.string().optional(),
|
|
8064
8226
|
readIntent: z.string().optional(),
|
|
8227
|
+
detailAdmission: z.string().optional(),
|
|
8065
8228
|
detailLevel: z.string().optional(),
|
|
8066
8229
|
readProfile: z.string().optional()
|
|
8067
8230
|
};
|
|
@@ -8228,11 +8391,11 @@ const publicEventBookingAvailabilitySchema = z.discriminatedUnion("kind", [z.obj
|
|
|
8228
8391
|
"series_archived",
|
|
8229
8392
|
"parent_archived",
|
|
8230
8393
|
"parent_inconsistent",
|
|
8231
|
-
"not_public",
|
|
8232
8394
|
"already_started",
|
|
8233
8395
|
"enrollment_closed"
|
|
8234
8396
|
])
|
|
8235
8397
|
})]);
|
|
8398
|
+
const publicEventBookingClosedDetailSchema = z.discriminatedUnion("kind", [z.object({ kind: z.literal("opensSoon") }), z.object({ kind: z.literal("paused") })]);
|
|
8236
8399
|
const publicRunSessionSchema = z.object({
|
|
8237
8400
|
occurrenceId: z.string(),
|
|
8238
8401
|
startsAt: z.string(),
|
|
@@ -8277,6 +8440,7 @@ const publicEventBaseSchema = z.object({
|
|
|
8277
8440
|
destination: publicEventDestinationSchema,
|
|
8278
8441
|
requiresRegistration: z.boolean(),
|
|
8279
8442
|
bookingAvailability: publicEventBookingAvailabilitySchema,
|
|
8443
|
+
bookingClosedDetail: publicEventBookingClosedDetailSchema.optional(),
|
|
8280
8444
|
deliveryMode: z.enum([
|
|
8281
8445
|
"in_person",
|
|
8282
8446
|
"online",
|
|
@@ -8570,6 +8734,64 @@ function defineEndpointDefinitions(definitions) {
|
|
|
8570
8734
|
return definitions;
|
|
8571
8735
|
}
|
|
8572
8736
|
//#endregion
|
|
8737
|
+
//#region ../api/src/apiEndpointTypes.ts
|
|
8738
|
+
function allowedDemoMutationPolicy() {
|
|
8739
|
+
return {
|
|
8740
|
+
classification: "allowed",
|
|
8741
|
+
publicMessage: ""
|
|
8742
|
+
};
|
|
8743
|
+
}
|
|
8744
|
+
function blockedDemoMutationPolicy(classification, publicMessage) {
|
|
8745
|
+
if (publicMessage.trim() === "") throw new Error(`Demo mutation policy ${classification} requires publicMessage.`);
|
|
8746
|
+
return {
|
|
8747
|
+
classification,
|
|
8748
|
+
publicMessage
|
|
8749
|
+
};
|
|
8750
|
+
}
|
|
8751
|
+
//#endregion
|
|
8752
|
+
//#region ../api/src/demoMutationPolicies.ts
|
|
8753
|
+
const DEMO_MUTATION_BLOCKED_HIDDEN = blockedDemoMutationPolicy("blocked-hidden", "This action is not available in demo sites.");
|
|
8754
|
+
const DEMO_MUTATION_BLOCKED_DISABLED = blockedDemoMutationPolicy("blocked-disabled", "This setting is disabled in demo sites.");
|
|
8755
|
+
blockedDemoMutationPolicy("internal-only", "This internal operation is not available in demo sites.");
|
|
8756
|
+
const DEMO_MUTATION_ALLOWED = allowedDemoMutationPolicy();
|
|
8757
|
+
//#endregion
|
|
8758
|
+
//#region ../api/src/siteLifecycleEndpoints.ts
|
|
8759
|
+
const SITE_LIFECYCLE_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
8760
|
+
createSite: {
|
|
8761
|
+
path: "/sites/manage",
|
|
8762
|
+
method: "POST",
|
|
8763
|
+
tags: ["site"],
|
|
8764
|
+
auth: "user",
|
|
8765
|
+
responseKind: "json",
|
|
8766
|
+
errors: []
|
|
8767
|
+
},
|
|
8768
|
+
createSiteManual: {
|
|
8769
|
+
path: "/sites/manual",
|
|
8770
|
+
method: "POST",
|
|
8771
|
+
tags: ["site"],
|
|
8772
|
+
auth: "user",
|
|
8773
|
+
responseKind: "json",
|
|
8774
|
+
errors: []
|
|
8775
|
+
},
|
|
8776
|
+
updateSite: {
|
|
8777
|
+
path: "/sites/manage",
|
|
8778
|
+
method: "PUT",
|
|
8779
|
+
tags: ["site"],
|
|
8780
|
+
auth: "user",
|
|
8781
|
+
responseKind: "json",
|
|
8782
|
+
errors: []
|
|
8783
|
+
},
|
|
8784
|
+
deleteSite: {
|
|
8785
|
+
path: "/sites/{siteId}",
|
|
8786
|
+
method: "DELETE",
|
|
8787
|
+
tags: ["site", "site-{siteId}"],
|
|
8788
|
+
auth: "user",
|
|
8789
|
+
responseKind: "json",
|
|
8790
|
+
errors: [],
|
|
8791
|
+
demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN
|
|
8792
|
+
}
|
|
8793
|
+
});
|
|
8794
|
+
//#endregion
|
|
8573
8795
|
//#region ../api/src/publicNewsletterEndpointDefinitions.ts
|
|
8574
8796
|
const PUBLIC_NEWSLETTER_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
8575
8797
|
subscribeNewsletter: {
|
|
@@ -8630,27 +8852,6 @@ const PUBLIC_NEWSLETTER_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
8630
8852
|
}
|
|
8631
8853
|
});
|
|
8632
8854
|
//#endregion
|
|
8633
|
-
//#region ../api/src/apiEndpointTypes.ts
|
|
8634
|
-
function allowedDemoMutationPolicy() {
|
|
8635
|
-
return {
|
|
8636
|
-
classification: "allowed",
|
|
8637
|
-
publicMessage: ""
|
|
8638
|
-
};
|
|
8639
|
-
}
|
|
8640
|
-
function blockedDemoMutationPolicy(classification, publicMessage) {
|
|
8641
|
-
if (publicMessage.trim() === "") throw new Error(`Demo mutation policy ${classification} requires publicMessage.`);
|
|
8642
|
-
return {
|
|
8643
|
-
classification,
|
|
8644
|
-
publicMessage
|
|
8645
|
-
};
|
|
8646
|
-
}
|
|
8647
|
-
//#endregion
|
|
8648
|
-
//#region ../api/src/demoMutationPolicies.ts
|
|
8649
|
-
const DEMO_MUTATION_BLOCKED_HIDDEN = blockedDemoMutationPolicy("blocked-hidden", "This action is not available in demo sites.");
|
|
8650
|
-
const DEMO_MUTATION_BLOCKED_DISABLED = blockedDemoMutationPolicy("blocked-disabled", "This setting is disabled in demo sites.");
|
|
8651
|
-
blockedDemoMutationPolicy("internal-only", "This internal operation is not available in demo sites.");
|
|
8652
|
-
const DEMO_MUTATION_ALLOWED = allowedDemoMutationPolicy();
|
|
8653
|
-
//#endregion
|
|
8654
8855
|
//#region ../api/src/cache-tags.ts
|
|
8655
8856
|
/**
|
|
8656
8857
|
* Tag templates for endpoint definitions (support `{param}` placeholders).
|
|
@@ -9510,6 +9711,13 @@ const EVENT_SERIES_REGISTRATION_ENDPOINT_DEFINITIONS = defineEndpointDefinitions
|
|
|
9510
9711
|
errors: [],
|
|
9511
9712
|
responseKind: "blob"
|
|
9512
9713
|
},
|
|
9714
|
+
exportEventOfferingRegistrationsCsv: {
|
|
9715
|
+
path: "/sites/{siteId}/bookings/event-offerings/{eventOfferingId}/registrations/export.csv",
|
|
9716
|
+
method: "GET",
|
|
9717
|
+
auth: "user",
|
|
9718
|
+
errors: [],
|
|
9719
|
+
responseKind: "blob"
|
|
9720
|
+
},
|
|
9513
9721
|
updateEventSeriesRegistration: {
|
|
9514
9722
|
path: "/sites/{siteId}/bookings/event-series/{seriesId}/registrations/{registrationId}",
|
|
9515
9723
|
method: "PATCH",
|
|
@@ -9520,6 +9728,19 @@ const EVENT_SERIES_REGISTRATION_ENDPOINT_DEFINITIONS = defineEndpointDefinitions
|
|
|
9520
9728
|
"resource:not_found",
|
|
9521
9729
|
"server:internal_error"
|
|
9522
9730
|
]
|
|
9731
|
+
},
|
|
9732
|
+
saveEventSeriesRegistrationAnswers: {
|
|
9733
|
+
path: "/sites/{siteId}/bookings/event-series/{seriesId}/registrations/{registrationId}/answers",
|
|
9734
|
+
method: "PUT",
|
|
9735
|
+
auth: "user",
|
|
9736
|
+
responseKind: "json",
|
|
9737
|
+
errors: [
|
|
9738
|
+
"validation:invalid_input",
|
|
9739
|
+
"auth:forbidden",
|
|
9740
|
+
"resource:not_found",
|
|
9741
|
+
"resource:conflict",
|
|
9742
|
+
"server:internal_error"
|
|
9743
|
+
]
|
|
9523
9744
|
}
|
|
9524
9745
|
});
|
|
9525
9746
|
//#endregion
|
|
@@ -9657,6 +9878,20 @@ const NEWSLETTER_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
9657
9878
|
responseKind: "json",
|
|
9658
9879
|
errors: ["auth:forbidden", "server:internal_error"]
|
|
9659
9880
|
},
|
|
9881
|
+
setMailingListBookingOptIn: {
|
|
9882
|
+
path: "/sites/{siteId}/mailing-list/setup/booking-opt-in",
|
|
9883
|
+
method: "PUT",
|
|
9884
|
+
tags: [TAG_TEMPLATES.site, TAG_TEMPLATES.siteNewsletter],
|
|
9885
|
+
auth: "user",
|
|
9886
|
+
responseKind: "json",
|
|
9887
|
+
demoMutation: DEMO_MUTATION_BLOCKED_DISABLED,
|
|
9888
|
+
errors: [
|
|
9889
|
+
"auth:forbidden",
|
|
9890
|
+
"validation:invalid_input",
|
|
9891
|
+
"resource:conflict",
|
|
9892
|
+
"server:internal_error"
|
|
9893
|
+
]
|
|
9894
|
+
},
|
|
9660
9895
|
getMailingListAuthoringContext: {
|
|
9661
9896
|
path: "/sites/{siteId}/mailing-list/authoring-context",
|
|
9662
9897
|
method: "GET",
|
|
@@ -9940,6 +10175,30 @@ const NEWSLETTER_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
9940
10175
|
responseKind: "json",
|
|
9941
10176
|
demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN
|
|
9942
10177
|
},
|
|
10178
|
+
scheduleNewsletterCampaign: {
|
|
10179
|
+
path: "/sites/{siteId}/newsletter/campaigns/{campaignId}/schedule",
|
|
10180
|
+
method: "POST",
|
|
10181
|
+
tags: [TAG_TEMPLATES.site, TAG_TEMPLATES.siteNewsletter],
|
|
10182
|
+
auth: "user",
|
|
10183
|
+
responseKind: "json",
|
|
10184
|
+
demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN
|
|
10185
|
+
},
|
|
10186
|
+
unscheduleNewsletterCampaign: {
|
|
10187
|
+
path: "/sites/{siteId}/newsletter/campaigns/{campaignId}/unschedule",
|
|
10188
|
+
method: "POST",
|
|
10189
|
+
tags: [TAG_TEMPLATES.site, TAG_TEMPLATES.siteNewsletter],
|
|
10190
|
+
auth: "user",
|
|
10191
|
+
responseKind: "json",
|
|
10192
|
+
demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN
|
|
10193
|
+
},
|
|
10194
|
+
stopNewsletterCampaign: {
|
|
10195
|
+
path: "/sites/{siteId}/newsletter/campaigns/{campaignId}/stop",
|
|
10196
|
+
method: "POST",
|
|
10197
|
+
tags: [TAG_TEMPLATES.site, TAG_TEMPLATES.siteNewsletter],
|
|
10198
|
+
auth: "user",
|
|
10199
|
+
responseKind: "json",
|
|
10200
|
+
demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN
|
|
10201
|
+
},
|
|
9943
10202
|
testSendNewsletterCampaign: {
|
|
9944
10203
|
path: "/sites/{siteId}/newsletter/campaigns/{campaignId}/test-send",
|
|
9945
10204
|
method: "POST",
|
|
@@ -9950,6 +10209,154 @@ const NEWSLETTER_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
9950
10209
|
}
|
|
9951
10210
|
});
|
|
9952
10211
|
//#endregion
|
|
10212
|
+
//#region ../api/src/sdkEventEndpointDefinitions.ts
|
|
10213
|
+
/**
|
|
10214
|
+
* The SDK's Event graph: the Events themselves and the occurrences of one run.
|
|
10215
|
+
* Extracted from `endpoints.ts` so this family can be read, and added to, on
|
|
10216
|
+
* its own. New entries here must declare `errors`; the
|
|
10217
|
+
* require-api-endpoint-errors lint enforces that here as in endpoints.ts.
|
|
10218
|
+
*/
|
|
10219
|
+
const SDK_EVENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
10220
|
+
sdkListEvents: {
|
|
10221
|
+
path: "/sdk/{siteId}/events",
|
|
10222
|
+
method: "GET",
|
|
10223
|
+
auth: "service",
|
|
10224
|
+
responseKind: "json"
|
|
10225
|
+
},
|
|
10226
|
+
sdkUpsertEvent: {
|
|
10227
|
+
path: "/sdk/{siteId}/events",
|
|
10228
|
+
method: "POST",
|
|
10229
|
+
auth: "service",
|
|
10230
|
+
responseKind: "json",
|
|
10231
|
+
errors: [
|
|
10232
|
+
"validation:invalid_input",
|
|
10233
|
+
"resource:not_found",
|
|
10234
|
+
"resource:conflict",
|
|
10235
|
+
"billing:plan_limit_exceeded",
|
|
10236
|
+
"server:internal_error"
|
|
10237
|
+
]
|
|
10238
|
+
},
|
|
10239
|
+
sdkGetEvent: {
|
|
10240
|
+
path: "/sdk/{siteId}/events/{identifier}",
|
|
10241
|
+
method: "GET",
|
|
10242
|
+
auth: "service",
|
|
10243
|
+
responseKind: "json"
|
|
10244
|
+
},
|
|
10245
|
+
sdkDeleteEvent: {
|
|
10246
|
+
path: "/sdk/{siteId}/events/{identifier}",
|
|
10247
|
+
method: "DELETE",
|
|
10248
|
+
auth: "service",
|
|
10249
|
+
responseKind: "json",
|
|
10250
|
+
errors: [
|
|
10251
|
+
"resource:not_found",
|
|
10252
|
+
"resource:conflict",
|
|
10253
|
+
"server:internal_error"
|
|
10254
|
+
]
|
|
10255
|
+
},
|
|
10256
|
+
sdkTakeEventOffline: {
|
|
10257
|
+
path: "/sdk/{siteId}/events/{identifier}/lifecycle",
|
|
10258
|
+
method: "POST",
|
|
10259
|
+
auth: "service",
|
|
10260
|
+
responseKind: "json",
|
|
10261
|
+
errors: [
|
|
10262
|
+
"resource:not_found",
|
|
10263
|
+
"validation:invalid_input",
|
|
10264
|
+
"resource:conflict",
|
|
10265
|
+
"server:internal_error"
|
|
10266
|
+
]
|
|
10267
|
+
},
|
|
10268
|
+
sdkListEventOccurrences: {
|
|
10269
|
+
path: "/sdk/{siteId}/events/{identifier}/runs/{runIdentifier}/occurrences",
|
|
10270
|
+
method: "GET",
|
|
10271
|
+
auth: "service",
|
|
10272
|
+
responseKind: "json",
|
|
10273
|
+
errors: [
|
|
10274
|
+
"resource:not_found",
|
|
10275
|
+
"validation:invalid_input",
|
|
10276
|
+
"server:internal_error"
|
|
10277
|
+
]
|
|
10278
|
+
},
|
|
10279
|
+
sdkAddEventOccurrence: {
|
|
10280
|
+
path: "/sdk/{siteId}/events/{identifier}/runs/{runIdentifier}/occurrences",
|
|
10281
|
+
method: "POST",
|
|
10282
|
+
auth: "service",
|
|
10283
|
+
responseKind: "json",
|
|
10284
|
+
errors: [
|
|
10285
|
+
"resource:not_found",
|
|
10286
|
+
"validation:invalid_input",
|
|
10287
|
+
"resource:conflict",
|
|
10288
|
+
"server:internal_error"
|
|
10289
|
+
]
|
|
10290
|
+
},
|
|
10291
|
+
sdkUpdateEventOccurrence: {
|
|
10292
|
+
path: "/sdk/{siteId}/events/{identifier}/runs/{runIdentifier}/occurrences/{occurrenceId}",
|
|
10293
|
+
method: "PATCH",
|
|
10294
|
+
auth: "service",
|
|
10295
|
+
responseKind: "json",
|
|
10296
|
+
errors: [
|
|
10297
|
+
"resource:not_found",
|
|
10298
|
+
"validation:invalid_input",
|
|
10299
|
+
"resource:conflict",
|
|
10300
|
+
"server:internal_error"
|
|
10301
|
+
]
|
|
10302
|
+
},
|
|
10303
|
+
sdkCancelEventOccurrence: {
|
|
10304
|
+
path: "/sdk/{siteId}/events/{identifier}/runs/{runIdentifier}/occurrences/{occurrenceId}/cancel",
|
|
10305
|
+
method: "POST",
|
|
10306
|
+
auth: "service",
|
|
10307
|
+
responseKind: "json",
|
|
10308
|
+
errors: [
|
|
10309
|
+
"resource:not_found",
|
|
10310
|
+
"resource:conflict",
|
|
10311
|
+
"server:internal_error"
|
|
10312
|
+
]
|
|
10313
|
+
},
|
|
10314
|
+
sdkDeleteEventOccurrence: {
|
|
10315
|
+
path: "/sdk/{siteId}/events/{identifier}/runs/{runIdentifier}/occurrences/{occurrenceId}",
|
|
10316
|
+
method: "DELETE",
|
|
10317
|
+
auth: "service",
|
|
10318
|
+
responseKind: "json",
|
|
10319
|
+
errors: [
|
|
10320
|
+
"resource:not_found",
|
|
10321
|
+
"resource:conflict",
|
|
10322
|
+
"server:internal_error"
|
|
10323
|
+
]
|
|
10324
|
+
}
|
|
10325
|
+
});
|
|
10326
|
+
//#endregion
|
|
10327
|
+
//#region ../api/src/sdkPageDesignEndpointDefinitions.ts
|
|
10328
|
+
/**
|
|
10329
|
+
* SDK management endpoints for a page's draft design (issue 1497), spread into
|
|
10330
|
+
* `ENDPOINT_DEFINITIONS` like the other endpoint-definition modules. New
|
|
10331
|
+
* entries here must declare `errors`, which the require-api-endpoint-errors
|
|
10332
|
+
* lint enforces.
|
|
10333
|
+
*/
|
|
10334
|
+
const SDK_PAGE_DESIGN_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
10335
|
+
sdkGetPageDesign: {
|
|
10336
|
+
path: "/sdk/{siteId}/pages/{identifier}/design",
|
|
10337
|
+
method: "GET",
|
|
10338
|
+
auth: "service",
|
|
10339
|
+
responseKind: "json",
|
|
10340
|
+
errors: [
|
|
10341
|
+
"resource:not_found",
|
|
10342
|
+
"validation:invalid_input",
|
|
10343
|
+
"server:internal_error"
|
|
10344
|
+
]
|
|
10345
|
+
},
|
|
10346
|
+
sdkSavePageDesign: {
|
|
10347
|
+
path: "/sdk/{siteId}/pages/{identifier}/design",
|
|
10348
|
+
method: "POST",
|
|
10349
|
+
auth: "service",
|
|
10350
|
+
responseKind: "json",
|
|
10351
|
+
errors: [
|
|
10352
|
+
"resource:not_found",
|
|
10353
|
+
"validation:invalid_input",
|
|
10354
|
+
"resource:conflict",
|
|
10355
|
+
"server:internal_error"
|
|
10356
|
+
]
|
|
10357
|
+
}
|
|
10358
|
+
});
|
|
10359
|
+
//#endregion
|
|
9953
10360
|
//#region ../api/src/publicEventEndpointDefinitions.ts
|
|
9954
10361
|
const PUBLIC_EVENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
9955
10362
|
checkPublicEventRegistrationNextStep: {
|
|
@@ -10194,6 +10601,45 @@ const SITE_API_KEY_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
10194
10601
|
}
|
|
10195
10602
|
});
|
|
10196
10603
|
//#endregion
|
|
10604
|
+
//#region ../api/src/siteManagementEndpointDefinitions.ts
|
|
10605
|
+
const SITE_MANAGEMENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
10606
|
+
createSite: {
|
|
10607
|
+
path: "/sites/manage",
|
|
10608
|
+
method: "POST",
|
|
10609
|
+
tags: ["site"],
|
|
10610
|
+
auth: "user",
|
|
10611
|
+
responseKind: "json"
|
|
10612
|
+
},
|
|
10613
|
+
updateSite: {
|
|
10614
|
+
path: "/sites/manage",
|
|
10615
|
+
method: "PUT",
|
|
10616
|
+
tags: ["site"],
|
|
10617
|
+
auth: "user",
|
|
10618
|
+
responseKind: "json"
|
|
10619
|
+
},
|
|
10620
|
+
changeSiteAddress: {
|
|
10621
|
+
path: "/sites/{siteId}/address",
|
|
10622
|
+
method: "PUT",
|
|
10623
|
+
auth: "user",
|
|
10624
|
+
responseKind: "json",
|
|
10625
|
+
demoMutation: DEMO_MUTATION_BLOCKED_DISABLED
|
|
10626
|
+
},
|
|
10627
|
+
getSiteAddressAvailability: {
|
|
10628
|
+
path: "/sites/{siteId}/address/availability",
|
|
10629
|
+
method: "GET",
|
|
10630
|
+
auth: "user",
|
|
10631
|
+
responseKind: "json"
|
|
10632
|
+
},
|
|
10633
|
+
deleteSite: {
|
|
10634
|
+
path: "/sites/{siteId}",
|
|
10635
|
+
method: "DELETE",
|
|
10636
|
+
tags: ["site", "site-{siteId}"],
|
|
10637
|
+
auth: "user",
|
|
10638
|
+
responseKind: "json",
|
|
10639
|
+
demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN
|
|
10640
|
+
}
|
|
10641
|
+
});
|
|
10642
|
+
//#endregion
|
|
10197
10643
|
//#region ../api/src/eventManagementEndpointDefinitions.ts
|
|
10198
10644
|
const EVENT_MANAGEMENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
10199
10645
|
listEvents: {
|
|
@@ -10241,6 +10687,28 @@ const EVENT_MANAGEMENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
10241
10687
|
"server:internal_error"
|
|
10242
10688
|
]
|
|
10243
10689
|
},
|
|
10690
|
+
/**
|
|
10691
|
+
* The web address of an event's own page. A course page belongs to the
|
|
10692
|
+
* event itself, so its address is written here rather than through a run.
|
|
10693
|
+
*/
|
|
10694
|
+
updateEventAddress: {
|
|
10695
|
+
path: "/sites/{siteId}/bookings/events/{eventId}/address",
|
|
10696
|
+
method: "PATCH",
|
|
10697
|
+
tags: [
|
|
10698
|
+
"site-{siteId}",
|
|
10699
|
+
"event-series-{siteId}",
|
|
10700
|
+
TAG_TEMPLATES.siteRoutableContent,
|
|
10701
|
+
TAG_TEMPLATES.siteRedirects
|
|
10702
|
+
],
|
|
10703
|
+
auth: "user",
|
|
10704
|
+
responseKind: "json",
|
|
10705
|
+
errors: [
|
|
10706
|
+
"validation:invalid_input",
|
|
10707
|
+
"resource:not_found",
|
|
10708
|
+
"resource:conflict",
|
|
10709
|
+
"server:internal_error"
|
|
10710
|
+
]
|
|
10711
|
+
},
|
|
10244
10712
|
createWholeSeriesRun: {
|
|
10245
10713
|
path: "/sites/{siteId}/bookings/events/{eventId}/runs",
|
|
10246
10714
|
method: "POST",
|
|
@@ -10267,6 +10735,20 @@ const EVENT_MANAGEMENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
10267
10735
|
"server:internal_error"
|
|
10268
10736
|
]
|
|
10269
10737
|
},
|
|
10738
|
+
updateCourseBookingSettings: {
|
|
10739
|
+
path: "/sites/{siteId}/bookings/events/{eventId}/booking-settings",
|
|
10740
|
+
method: "PATCH",
|
|
10741
|
+
tags: ["site-{siteId}", "event-series-{siteId}"],
|
|
10742
|
+
auth: "user",
|
|
10743
|
+
responseKind: "json",
|
|
10744
|
+
errors: [
|
|
10745
|
+
"validation:invalid_input",
|
|
10746
|
+
"auth:forbidden",
|
|
10747
|
+
"resource:not_found",
|
|
10748
|
+
"resource:conflict",
|
|
10749
|
+
"server:internal_error"
|
|
10750
|
+
]
|
|
10751
|
+
},
|
|
10270
10752
|
cancelWholeSeriesRun: {
|
|
10271
10753
|
path: "/sites/{siteId}/bookings/events/{eventId}/runs/{runId}/cancellation",
|
|
10272
10754
|
method: "POST",
|
|
@@ -10279,6 +10761,28 @@ const EVENT_MANAGEMENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
10279
10761
|
"resource:conflict",
|
|
10280
10762
|
"server:internal_error"
|
|
10281
10763
|
]
|
|
10764
|
+
},
|
|
10765
|
+
/**
|
|
10766
|
+
* The Content tab's one write: the short introduction, image and
|
|
10767
|
+
* description of an event's page, published without its layout.
|
|
10768
|
+
*/
|
|
10769
|
+
saveEventPageWords: {
|
|
10770
|
+
path: "/sites/{siteId}/page-surfaces/{pageSurfaceId}/words",
|
|
10771
|
+
method: "PUT",
|
|
10772
|
+
tags: [
|
|
10773
|
+
TAG_TEMPLATES.siteCollection,
|
|
10774
|
+
TAG_TEMPLATES.siteRoutableContent,
|
|
10775
|
+
TAG_TEMPLATES.pageSurfaceById
|
|
10776
|
+
],
|
|
10777
|
+
auth: "user",
|
|
10778
|
+
responseKind: "json",
|
|
10779
|
+
errors: [
|
|
10780
|
+
"auth:forbidden",
|
|
10781
|
+
"validation:invalid_input",
|
|
10782
|
+
"resource:not_found",
|
|
10783
|
+
"resource:conflict",
|
|
10784
|
+
"server:internal_error"
|
|
10785
|
+
]
|
|
10282
10786
|
}
|
|
10283
10787
|
});
|
|
10284
10788
|
//#endregion
|
|
@@ -10711,19 +11215,105 @@ const BILLING_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
10711
11215
|
responseKind: "json"
|
|
10712
11216
|
}
|
|
10713
11217
|
});
|
|
11218
|
+
//#endregion
|
|
11219
|
+
//#region ../api/src/bookingPeopleEndpointDefinitions.ts
|
|
11220
|
+
/**
|
|
11221
|
+
* People endpoints (#1356): the People list, its CSV export, and deleting a
|
|
11222
|
+
* person when nothing is attached to them.
|
|
11223
|
+
*/
|
|
11224
|
+
const BOOKING_PEOPLE_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
11225
|
+
listPeople: {
|
|
11226
|
+
path: "/sites/{siteId}/bookings/people",
|
|
11227
|
+
method: "GET",
|
|
11228
|
+
tags: ["site-{siteId}", "customers-{siteId}"],
|
|
11229
|
+
auth: "user",
|
|
11230
|
+
responseKind: "json",
|
|
11231
|
+
errors: ["server:internal_error"]
|
|
11232
|
+
},
|
|
11233
|
+
exportPeopleCsv: {
|
|
11234
|
+
path: "/sites/{siteId}/bookings/people/export.csv",
|
|
11235
|
+
method: "GET",
|
|
11236
|
+
tags: ["site-{siteId}", "customers-{siteId}"],
|
|
11237
|
+
auth: "user",
|
|
11238
|
+
errors: [],
|
|
11239
|
+
responseKind: "blob"
|
|
11240
|
+
},
|
|
11241
|
+
checkPersonDeletion: {
|
|
11242
|
+
path: "/sites/{siteId}/bookings/people/{personId}/deletion-check",
|
|
11243
|
+
method: "GET",
|
|
11244
|
+
tags: ["site-{siteId}", "customers-{siteId}"],
|
|
11245
|
+
auth: "user",
|
|
11246
|
+
responseKind: "json",
|
|
11247
|
+
errors: [
|
|
11248
|
+
"auth:forbidden",
|
|
11249
|
+
"resource:not_found",
|
|
11250
|
+
"server:internal_error"
|
|
11251
|
+
]
|
|
11252
|
+
},
|
|
11253
|
+
deletePerson: {
|
|
11254
|
+
path: "/sites/{siteId}/bookings/people/{personId}",
|
|
11255
|
+
method: "DELETE",
|
|
11256
|
+
tags: ["site-{siteId}", "customers-{siteId}"],
|
|
11257
|
+
auth: "user",
|
|
11258
|
+
responseKind: "json",
|
|
11259
|
+
errors: [
|
|
11260
|
+
"auth:forbidden",
|
|
11261
|
+
"resource:not_found",
|
|
11262
|
+
"server:internal_error"
|
|
11263
|
+
]
|
|
11264
|
+
}
|
|
11265
|
+
});
|
|
11266
|
+
//#endregion
|
|
11267
|
+
//#region ../api/src/clientErrorReporting.ts
|
|
11268
|
+
const CLIENT_ERROR_REPORT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({ reportClientError: {
|
|
11269
|
+
path: "/client/error-report",
|
|
11270
|
+
method: "POST",
|
|
11271
|
+
auth: "user",
|
|
11272
|
+
errors: [],
|
|
11273
|
+
responseKind: "json"
|
|
11274
|
+
} });
|
|
11275
|
+
const CLIENT_ERROR_REPORT_LIMITS = {
|
|
11276
|
+
pathname: 1024,
|
|
11277
|
+
name: 120,
|
|
11278
|
+
message: 2e3,
|
|
11279
|
+
stack: 8e3,
|
|
11280
|
+
digest: 128,
|
|
11281
|
+
componentStack: 8e3,
|
|
11282
|
+
sourceLocation: 1024
|
|
11283
|
+
};
|
|
11284
|
+
const clientErrorEventSchema = z.enum([
|
|
11285
|
+
"dashboard:route-error",
|
|
11286
|
+
"dashboard:app-error",
|
|
11287
|
+
"client:error-boundary",
|
|
11288
|
+
"client:window-error",
|
|
11289
|
+
"client:unhandled-rejection"
|
|
11290
|
+
]);
|
|
11291
|
+
z.object({
|
|
11292
|
+
event: clientErrorEventSchema,
|
|
11293
|
+
pathname: z.string().startsWith("/").max(CLIENT_ERROR_REPORT_LIMITS.pathname),
|
|
11294
|
+
name: z.string().max(CLIENT_ERROR_REPORT_LIMITS.name),
|
|
11295
|
+
message: z.string().max(CLIENT_ERROR_REPORT_LIMITS.message),
|
|
11296
|
+
stack: z.string().max(CLIENT_ERROR_REPORT_LIMITS.stack).nullable(),
|
|
11297
|
+
digest: z.string().max(CLIENT_ERROR_REPORT_LIMITS.digest).nullable(),
|
|
11298
|
+
componentStack: z.string().max(CLIENT_ERROR_REPORT_LIMITS.componentStack).nullable(),
|
|
11299
|
+
sourceLocation: z.string().max(CLIENT_ERROR_REPORT_LIMITS.sourceLocation).nullable()
|
|
11300
|
+
}).strict();
|
|
10714
11301
|
({
|
|
11302
|
+
...SITE_LIFECYCLE_ENDPOINT_DEFINITIONS,
|
|
11303
|
+
...CLIENT_ERROR_REPORT_ENDPOINT_DEFINITIONS,
|
|
10715
11304
|
...PUBLIC_NEWSLETTER_ENDPOINT_DEFINITIONS,
|
|
10716
11305
|
...ACCOUNT_ENDPOINT_DEFINITIONS,
|
|
10717
11306
|
...PUBLIC_ONBOARDING_ATTEMPT_ENDPOINT_DEFINITIONS,
|
|
10718
11307
|
...PUBLIC_EVENT_ENDPOINT_DEFINITIONS,
|
|
10719
11308
|
...GIFTING_ENDPOINT_DEFINITIONS,
|
|
10720
11309
|
...PUBLIC_READ_ENDPOINT_DEFINITIONS,
|
|
10721
|
-
...BILLING_ENDPOINT_DEFINITIONS
|
|
11310
|
+
...BILLING_ENDPOINT_DEFINITIONS,
|
|
11311
|
+
...SITE_MANAGEMENT_ENDPOINT_DEFINITIONS
|
|
10722
11312
|
}), 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, {
|
|
10723
11313
|
...NEWSLETTER_ENDPOINT_DEFINITIONS,
|
|
10724
11314
|
...APPOINTMENT_ENDPOINT_DEFINITIONS,
|
|
10725
11315
|
...EVENT_SERIES_REGISTRATION_ENDPOINT_DEFINITIONS
|
|
10726
|
-
}, 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.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageSurfaceById, 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 }, { ...SDK_MEDIA_ENDPOINT_DEFINITIONS }, { ...SDK_ENDPOINT_DEFINITIONS }, { ...SDK_ENTRY_READ_ENDPOINTS };
|
|
11316
|
+
}, 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.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageSurfaceById, 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 };
|
|
10727
11317
|
z.object({ refreshToken: z.string().min(1).max(4096) }).strict();
|
|
10728
11318
|
z.object({
|
|
10729
11319
|
accessToken: z.string().min(1).max(4096),
|
|
@@ -10950,6 +11540,21 @@ const navigationLinkInputSchemaOptions = [
|
|
|
10950
11540
|
];
|
|
10951
11541
|
z.discriminatedUnion("kind", navigationLinkInputSchemaOptions);
|
|
10952
11542
|
//#endregion
|
|
11543
|
+
//#region ../blocks/src/pageRenderAdmission.ts
|
|
11544
|
+
/** Pair a published version with the content it authorises at the render boundary. */
|
|
11545
|
+
function readPublishedBlockPlacement(id, content) {
|
|
11546
|
+
if (id == null && content == null) return null;
|
|
11547
|
+
if (id == null || content == null) return {
|
|
11548
|
+
kind: "incomplete",
|
|
11549
|
+
id: id ?? null,
|
|
11550
|
+
content: content ?? null
|
|
11551
|
+
};
|
|
11552
|
+
return {
|
|
11553
|
+
id,
|
|
11554
|
+
content
|
|
11555
|
+
};
|
|
11556
|
+
}
|
|
11557
|
+
//#endregion
|
|
10953
11558
|
//#region ../theme-core/src/site-styles/styleTags.ts
|
|
10954
11559
|
/**
|
|
10955
11560
|
* Descriptive style-axis metadata for button personalities and palette
|
|
@@ -17012,6 +17617,14 @@ const blockDesignFallback = {
|
|
|
17012
17617
|
};
|
|
17013
17618
|
blockDesignFallback.sectionSurface, blockDesignFallback.contentFrame, blockDesignFallback.sectionHeight, blockDesignFallback.heroLegibility, blockDesignFallback.imageSurfaceTreatment, blockDesignFallback.imageSurfaceMotion, blockDesignFallback.tileTreatment, blockDesignFallback.eventListTreatment, blockDesignFallback.eyebrowTreatment, blockDesignFallback.accordionIconTreatment, blockDesignFallback.composition;
|
|
17014
17619
|
//#endregion
|
|
17620
|
+
//#region ../theme-core/src/header/rootPaint.ts
|
|
17621
|
+
/** The nav container takes precedence when a floating header also has one. */
|
|
17622
|
+
function headerRootPaint(header) {
|
|
17623
|
+
const navContainerType = header?.navContainer?.type ?? "none";
|
|
17624
|
+
if (navContainerType === "glass" || navContainerType === "pill") return "contained-nav";
|
|
17625
|
+
return header?.variant === "floating" ? "overlay" : "own-surface";
|
|
17626
|
+
}
|
|
17627
|
+
//#endregion
|
|
17015
17628
|
//#region ../theme-core/src/site-styles/siteChromeBackgrounds.ts
|
|
17016
17629
|
const siteChromeBackgroundColorTokens = toSiteChromeBackgroundColorTokens(backgroundAppearanceColorTokenNames);
|
|
17017
17630
|
const quickSiteChromeBackgroundColorTokens = toSiteChromeBackgroundColorTokens(backgroundAppearanceQuickColorTokenNames);
|
|
@@ -17191,6 +17804,259 @@ z.object(headerPreferencesShape).omit({
|
|
|
17191
17804
|
structure: true
|
|
17192
17805
|
}).strict();
|
|
17193
17806
|
//#endregion
|
|
17807
|
+
//#region ../theme-core/src/navigation/presets.ts
|
|
17808
|
+
/**
|
|
17809
|
+
* Built-in nav link style presets
|
|
17810
|
+
*
|
|
17811
|
+
* Each preset uses composable effects to achieve its look.
|
|
17812
|
+
*/
|
|
17813
|
+
const NAV_LINK_PRESETS = {
|
|
17814
|
+
/**
|
|
17815
|
+
* Minimal - subtle color change on hover
|
|
17816
|
+
*/
|
|
17817
|
+
minimal: {
|
|
17818
|
+
name: "Minimal",
|
|
17819
|
+
typography: "body",
|
|
17820
|
+
fontWeight: "medium",
|
|
17821
|
+
textTransform: "none",
|
|
17822
|
+
italic: false,
|
|
17823
|
+
colorToken: "text",
|
|
17824
|
+
hoverColorToken: "primary",
|
|
17825
|
+
padding: "none",
|
|
17826
|
+
borderRadius: "none",
|
|
17827
|
+
effects: { hover: [{
|
|
17828
|
+
effectId: "text-color-change",
|
|
17829
|
+
options: { hoverColorToken: "primary" }
|
|
17830
|
+
}] }
|
|
17831
|
+
},
|
|
17832
|
+
/**
|
|
17833
|
+
* Underline - static underline appears on hover
|
|
17834
|
+
*/
|
|
17835
|
+
underline: {
|
|
17836
|
+
name: "Underline",
|
|
17837
|
+
typography: "body",
|
|
17838
|
+
fontWeight: "medium",
|
|
17839
|
+
textTransform: "none",
|
|
17840
|
+
italic: false,
|
|
17841
|
+
colorToken: "text",
|
|
17842
|
+
padding: "none",
|
|
17843
|
+
borderRadius: "none",
|
|
17844
|
+
effects: { hover: [{
|
|
17845
|
+
effectId: "nav-underline",
|
|
17846
|
+
options: { style: "static" }
|
|
17847
|
+
}] }
|
|
17848
|
+
},
|
|
17849
|
+
/**
|
|
17850
|
+
* Underline Grow - animated underline grows from center on hover
|
|
17851
|
+
*/
|
|
17852
|
+
"underline-grow": {
|
|
17853
|
+
name: "Underline Grow",
|
|
17854
|
+
typography: "body",
|
|
17855
|
+
fontWeight: "medium",
|
|
17856
|
+
textTransform: "none",
|
|
17857
|
+
italic: false,
|
|
17858
|
+
colorToken: "text",
|
|
17859
|
+
padding: "none",
|
|
17860
|
+
borderRadius: "none",
|
|
17861
|
+
effects: { hover: [{
|
|
17862
|
+
effectId: "nav-underline",
|
|
17863
|
+
options: { style: "grow" }
|
|
17864
|
+
}] }
|
|
17865
|
+
},
|
|
17866
|
+
/**
|
|
17867
|
+
* Capsule - pill-shaped background on hover
|
|
17868
|
+
*/
|
|
17869
|
+
capsule: {
|
|
17870
|
+
name: "Capsule",
|
|
17871
|
+
typography: "body",
|
|
17872
|
+
fontWeight: "medium",
|
|
17873
|
+
textTransform: "none",
|
|
17874
|
+
italic: false,
|
|
17875
|
+
colorToken: "text",
|
|
17876
|
+
padding: "compact",
|
|
17877
|
+
borderRadius: "full",
|
|
17878
|
+
effects: {
|
|
17879
|
+
hover: [{
|
|
17880
|
+
effectId: "background-on-hover-alpha",
|
|
17881
|
+
options: {
|
|
17882
|
+
colorToken: "primary",
|
|
17883
|
+
opacity: 10
|
|
17884
|
+
}
|
|
17885
|
+
}],
|
|
17886
|
+
active: [{
|
|
17887
|
+
effectId: "background-on-hover-alpha",
|
|
17888
|
+
options: {
|
|
17889
|
+
colorToken: "primary",
|
|
17890
|
+
opacity: 15
|
|
17891
|
+
}
|
|
17892
|
+
}]
|
|
17893
|
+
}
|
|
17894
|
+
},
|
|
17895
|
+
/**
|
|
17896
|
+
* Solid - solid background color on hover
|
|
17897
|
+
*/
|
|
17898
|
+
solid: {
|
|
17899
|
+
name: "Solid",
|
|
17900
|
+
typography: "body",
|
|
17901
|
+
fontWeight: "medium",
|
|
17902
|
+
textTransform: "none",
|
|
17903
|
+
italic: false,
|
|
17904
|
+
colorToken: "text",
|
|
17905
|
+
padding: "compact",
|
|
17906
|
+
borderRadius: "none",
|
|
17907
|
+
effects: {
|
|
17908
|
+
hover: [{
|
|
17909
|
+
effectId: "background-on-hover",
|
|
17910
|
+
options: {
|
|
17911
|
+
colorToken: "primary",
|
|
17912
|
+
textColorToken: "primaryForeground"
|
|
17913
|
+
}
|
|
17914
|
+
}],
|
|
17915
|
+
active: [{
|
|
17916
|
+
effectId: "background-on-hover",
|
|
17917
|
+
options: {
|
|
17918
|
+
colorToken: "primary",
|
|
17919
|
+
textColorToken: "primaryForeground"
|
|
17920
|
+
}
|
|
17921
|
+
}]
|
|
17922
|
+
}
|
|
17923
|
+
},
|
|
17924
|
+
/**
|
|
17925
|
+
* Scale - gentle scale-up on hover
|
|
17926
|
+
*/
|
|
17927
|
+
scale: {
|
|
17928
|
+
name: "Scale",
|
|
17929
|
+
typography: "body",
|
|
17930
|
+
fontWeight: "medium",
|
|
17931
|
+
textTransform: "none",
|
|
17932
|
+
italic: false,
|
|
17933
|
+
colorToken: "text",
|
|
17934
|
+
padding: "none",
|
|
17935
|
+
borderRadius: "none",
|
|
17936
|
+
effects: { hover: [{
|
|
17937
|
+
effectId: "scale-up",
|
|
17938
|
+
options: { scale: 1.05 }
|
|
17939
|
+
}] }
|
|
17940
|
+
},
|
|
17941
|
+
/**
|
|
17942
|
+
* Frosted - semi-transparent glass-like background
|
|
17943
|
+
*/
|
|
17944
|
+
frosted: {
|
|
17945
|
+
name: "Frosted",
|
|
17946
|
+
typography: "body",
|
|
17947
|
+
fontWeight: "medium",
|
|
17948
|
+
textTransform: "none",
|
|
17949
|
+
italic: false,
|
|
17950
|
+
colorToken: "text",
|
|
17951
|
+
padding: "compact",
|
|
17952
|
+
borderRadius: "md",
|
|
17953
|
+
effects: {
|
|
17954
|
+
base: [{ effectId: "nav-frosted-base" }],
|
|
17955
|
+
hover: [{ effectId: "nav-frosted-hover" }],
|
|
17956
|
+
active: [{ effectId: "nav-frosted-active" }]
|
|
17957
|
+
}
|
|
17958
|
+
}
|
|
17959
|
+
};
|
|
17960
|
+
/**
|
|
17961
|
+
* Get a nav link style preset by ID
|
|
17962
|
+
*/
|
|
17963
|
+
function getNavLinkPreset(presetId) {
|
|
17964
|
+
return NAV_LINK_PRESETS[presetId];
|
|
17965
|
+
}
|
|
17966
|
+
Object.keys(NAV_LINK_PRESETS);
|
|
17967
|
+
//#endregion
|
|
17968
|
+
//#region ../theme-core/src/header/legacyNavLinkStyle.ts
|
|
17969
|
+
function buildLegacyHeaderNavLinkStyle(header, contrastTreatment, navTextSize) {
|
|
17970
|
+
const navStyle = header.navStyle ?? "minimal";
|
|
17971
|
+
const basePreset = getNavLinkPreset(navStyle);
|
|
17972
|
+
if (!basePreset) return null;
|
|
17973
|
+
const style = {
|
|
17974
|
+
...basePreset,
|
|
17975
|
+
fontWeight: header.navWeight ?? basePreset.fontWeight,
|
|
17976
|
+
colorToken: (header.navColor ?? header.textColor)?.trim() || basePreset.colorToken,
|
|
17977
|
+
...contrastTreatment ? { contrastTreatment } : {},
|
|
17978
|
+
...navTextSize ? { textSize: navTextSize } : {}
|
|
17979
|
+
};
|
|
17980
|
+
if (header.navWeight === "bold" && navStyle === "solid") style.textTransform = "uppercase";
|
|
17981
|
+
applyLegacyGlassTreatment(style, header, navStyle);
|
|
17982
|
+
return style;
|
|
17983
|
+
}
|
|
17984
|
+
function applyLegacyGlassTreatment(style, header, navStyle) {
|
|
17985
|
+
if (header.navContainer?.type !== "glass" || navStyle !== "minimal") return;
|
|
17986
|
+
style.borderRadius = "full";
|
|
17987
|
+
style.effects = {
|
|
17988
|
+
...style.effects,
|
|
17989
|
+
hover: glassStateEffects(10),
|
|
17990
|
+
active: glassStateEffects(18)
|
|
17991
|
+
};
|
|
17992
|
+
}
|
|
17993
|
+
function glassStateEffects(opacity) {
|
|
17994
|
+
return [{
|
|
17995
|
+
effectId: "background-on-hover-alpha",
|
|
17996
|
+
options: {
|
|
17997
|
+
colorToken: "neutral-50",
|
|
17998
|
+
opacity
|
|
17999
|
+
}
|
|
18000
|
+
}, {
|
|
18001
|
+
effectId: "text-color-change",
|
|
18002
|
+
options: { hoverColorToken: "neutral-50" }
|
|
18003
|
+
}];
|
|
18004
|
+
}
|
|
18005
|
+
//#endregion
|
|
18006
|
+
//#region ../theme-core/src/header/openingForegroundProjection.ts
|
|
18007
|
+
function readOpeningForegroundProjection(header) {
|
|
18008
|
+
return header?.__runtimeOpeningForeground ?? null;
|
|
18009
|
+
}
|
|
18010
|
+
//#endregion
|
|
18011
|
+
//#region ../theme-core/src/header/effectiveNavLinkStyle.ts
|
|
18012
|
+
function effectiveHeaderNavLinkStyle(header, contrastTreatment = null, navTextSize = null) {
|
|
18013
|
+
if (!header) return null;
|
|
18014
|
+
if (!header.navLinkStyle) return buildLegacyHeaderNavLinkStyle(header, contrastTreatment, navTextSize);
|
|
18015
|
+
return {
|
|
18016
|
+
...header.navLinkStyle,
|
|
18017
|
+
...contrastTreatment ? { contrastTreatment } : {},
|
|
18018
|
+
...navTextSize ? { textSize: navTextSize } : {}
|
|
18019
|
+
};
|
|
18020
|
+
}
|
|
18021
|
+
function headerForegroundCandidates(header) {
|
|
18022
|
+
if (!header) return {};
|
|
18023
|
+
const style = effectiveHeaderNavLinkStyle(header);
|
|
18024
|
+
return {
|
|
18025
|
+
text: header.textColor ?? header.background?.textColor,
|
|
18026
|
+
link: style?.colorToken ?? header.navColor ?? header.textColor,
|
|
18027
|
+
linkHover: navLinkHoverColorCandidate(style)
|
|
18028
|
+
};
|
|
18029
|
+
}
|
|
18030
|
+
function headerLeafTextColor(header) {
|
|
18031
|
+
if (!header) return "text";
|
|
18032
|
+
return header.textColor ?? header.navColor ?? header.background?.textColor ?? header.navLinkStyle?.colorToken ?? "text";
|
|
18033
|
+
}
|
|
18034
|
+
/** Transparent chrome must reset the whole contract on its own root. */
|
|
18035
|
+
function transparentHeaderForegroundInput(header, palette) {
|
|
18036
|
+
const projection = readOpeningForegroundProjection(header);
|
|
18037
|
+
if (projection?.kind === "known") return surfaceForegroundInputFromResolved(projection, rgbColorValue);
|
|
18038
|
+
return authoredTransparentHeaderForegroundInput(header, palette);
|
|
18039
|
+
}
|
|
18040
|
+
function authoredTransparentHeaderForegroundInput(header, palette) {
|
|
18041
|
+
const text = headerLeafTextColor(header);
|
|
18042
|
+
const style = effectiveHeaderNavLinkStyle(header);
|
|
18043
|
+
const link = style?.colorToken ?? text;
|
|
18044
|
+
const restingToken = parseThemeColorToken(link) ?? parseThemeColorToken("text");
|
|
18045
|
+
if (!restingToken) throw new Error("Built-in text colour token is invalid");
|
|
18046
|
+
const hover = planForegroundHover({
|
|
18047
|
+
restingToken,
|
|
18048
|
+
candidate: navLinkOwnsHoverForeground(style) ? null : navLinkHoverColorCandidate(style),
|
|
18049
|
+
palette,
|
|
18050
|
+
backdrops: null
|
|
18051
|
+
});
|
|
18052
|
+
return {
|
|
18053
|
+
text: rgbColorValue(text),
|
|
18054
|
+
link: rgbColorValue(link),
|
|
18055
|
+
linkHover: rgbColorValue(hover.token),
|
|
18056
|
+
hoverDecoration: navLinkOwnsUnderline(style) ? "initial" : hover.decoration
|
|
18057
|
+
};
|
|
18058
|
+
}
|
|
18059
|
+
//#endregion
|
|
17194
18060
|
//#region ../theme-core/src/site-styles/pageDesignAuthority.ts
|
|
17195
18061
|
const nonEmptyStringSchema = z.string().min(1);
|
|
17196
18062
|
const blockContentVersionIdSchema = nonEmptyStringSchema.transform(asBlockContentVersionId);
|
|
@@ -17343,6 +18209,28 @@ z.object({
|
|
|
17343
18209
|
motion: z.enum(themeTokenRecipeOptions.motion)
|
|
17344
18210
|
});
|
|
17345
18211
|
//#endregion
|
|
18212
|
+
//#region ../theme-core/src/footer/effectiveNavLinkStyle.ts
|
|
18213
|
+
function effectiveFooterNavLinkStyle(footer) {
|
|
18214
|
+
if (!footer) return null;
|
|
18215
|
+
if (footer.navLinkStyle) return footer.navLinkStyle;
|
|
18216
|
+
const basePreset = getNavLinkPreset(footer.navStyle ?? "minimal");
|
|
18217
|
+
if (!basePreset) return null;
|
|
18218
|
+
return {
|
|
18219
|
+
...basePreset,
|
|
18220
|
+
fontWeight: footer.navWeight ?? basePreset.fontWeight,
|
|
18221
|
+
colorToken: footer.navColor?.trim() || basePreset.colorToken
|
|
18222
|
+
};
|
|
18223
|
+
}
|
|
18224
|
+
function footerForegroundCandidates(footer, proseHoverCandidate) {
|
|
18225
|
+
if (!footer) return {};
|
|
18226
|
+
const style = effectiveFooterNavLinkStyle(footer);
|
|
18227
|
+
return {
|
|
18228
|
+
text: footer.background?.textColor,
|
|
18229
|
+
link: style?.colorToken ?? footer.navColor ?? footer.background?.textColor,
|
|
18230
|
+
linkHover: navLinkOwnsHoverForeground(style) ? proseHoverCandidate : navLinkHoverColorCandidate(style)
|
|
18231
|
+
};
|
|
18232
|
+
}
|
|
18233
|
+
//#endregion
|
|
17346
18234
|
//#region ../theme-core/src/siteChromeOverlayClearance.ts
|
|
17347
18235
|
const SITE_CHROME_VISIBLE_HEADER_ATTR = "data-site-chrome-visible-header";
|
|
17348
18236
|
//#endregion
|
|
@@ -21935,33 +22823,28 @@ function resolveBackgroundColorValue(value, context) {
|
|
|
21935
22823
|
//#endregion
|
|
21936
22824
|
//#region ../blocks/src/system/transforms/registry/_utils/surfaceForegroundStyles.ts
|
|
21937
22825
|
const contextualButtonStylesCache = /* @__PURE__ */ new WeakMap();
|
|
21938
|
-
function resolveHeaderLeafTextColor(header) {
|
|
21939
|
-
return header?.textColor ?? header?.navColor ?? header?.background?.textColor ?? header?.navLinkStyle?.colorToken ?? "text";
|
|
21940
|
-
}
|
|
21941
22826
|
function resolveHeaderRootForeground(header, palette, isTransparent) {
|
|
21942
|
-
if (isTransparent) return { kind: "unknown" };
|
|
22827
|
+
if (isTransparent) return readOpeningForegroundProjection(header) ?? { kind: "unknown" };
|
|
21943
22828
|
const background = header?.background;
|
|
21944
22829
|
return resolveSurfaceForeground(background ?? {
|
|
21945
22830
|
type: "color",
|
|
21946
22831
|
color: "surface"
|
|
21947
|
-
}, palette,
|
|
21948
|
-
|
|
21949
|
-
|
|
21950
|
-
|
|
22832
|
+
}, palette, headerForegroundCandidates(header));
|
|
22833
|
+
}
|
|
22834
|
+
function resolveFooterRootForeground(footer, palette, proseHoverCandidate) {
|
|
22835
|
+
return resolveSurfaceForeground(footer?.background ?? {
|
|
22836
|
+
type: "color",
|
|
22837
|
+
color: "surface"
|
|
22838
|
+
}, palette, footerForegroundCandidates(footer, proseHoverCandidate), { compositeBase: "background" });
|
|
21951
22839
|
}
|
|
21952
22840
|
function resolveSurfaceForegroundStyles(value, context, options) {
|
|
21953
22841
|
const input = parseBackgroundContent(value);
|
|
21954
|
-
const foreground = input ? resolveSurfaceForeground(input, context.theme.palette, {}, { compositeBase: options?.fallbackToken }) : { kind: "unknown" };
|
|
22842
|
+
const foreground = input ? resolveSurfaceForeground(input, context.theme.palette, { linkHover: context.proseHoverCandidate }, { compositeBase: options?.fallbackToken }) : { kind: "unknown" };
|
|
21955
22843
|
const buttonStyles = resolveContextualButtonStyles(input, foreground, context, options);
|
|
21956
22844
|
if (foreground.kind === "unknown") return buttonStyles;
|
|
21957
22845
|
return {
|
|
21958
22846
|
...buttonStyles,
|
|
21959
|
-
...surfaceForegroundStyle(
|
|
21960
|
-
text: resolveBackgroundColorValue(foreground.roles.text, context),
|
|
21961
|
-
heading: resolveBackgroundColorValue(foreground.roles.heading, context),
|
|
21962
|
-
link: resolveBackgroundColorValue(foreground.roles.link, context),
|
|
21963
|
-
supporting: resolveBackgroundColorValue(foreground.roles.supporting, context)
|
|
21964
|
-
})
|
|
22847
|
+
...surfaceForegroundStyle(surfaceForegroundInputFromResolved(foreground, (token) => resolveBackgroundColorValue(token, context)))
|
|
21965
22848
|
};
|
|
21966
22849
|
}
|
|
21967
22850
|
function resolveContextualButtonStyles(background, foreground, context, options) {
|
|
@@ -27773,10 +28656,7 @@ function resolveBackgroundVisualStyles(backgroundColor, defaultToken = "surface"
|
|
|
27773
28656
|
};
|
|
27774
28657
|
}
|
|
27775
28658
|
function resolveHeaderVisualStyles(header) {
|
|
27776
|
-
|
|
27777
|
-
const hasContainedNav = navContainerType === "glass" || navContainerType === "pill";
|
|
27778
|
-
const hasOverlayVariant = header?.variant === "floating";
|
|
27779
|
-
if (hasContainedNav || hasOverlayVariant) return {
|
|
28659
|
+
if (headerRootPaint(header) !== "own-surface") return {
|
|
27780
28660
|
backgroundToken: "transparent",
|
|
27781
28661
|
isTransparent: true
|
|
27782
28662
|
};
|
|
@@ -27787,23 +28667,7 @@ function resolveHeaderVisualStyles(header) {
|
|
|
27787
28667
|
}
|
|
27788
28668
|
function resolvedForegroundStyle(foreground) {
|
|
27789
28669
|
if (foreground.kind === "unknown") return void 0;
|
|
27790
|
-
|
|
27791
|
-
return surfaceForegroundStyle({
|
|
27792
|
-
text: rgbColorValue(roles.text),
|
|
27793
|
-
heading: rgbColorValue(roles.heading),
|
|
27794
|
-
link: rgbColorValue(roles.link),
|
|
27795
|
-
supporting: rgbColorValue(roles.supporting)
|
|
27796
|
-
});
|
|
27797
|
-
}
|
|
27798
|
-
function resolveFooterRootForeground(footer, palette) {
|
|
27799
|
-
const background = footer?.background;
|
|
27800
|
-
return resolveSurfaceForeground(background ?? {
|
|
27801
|
-
type: "color",
|
|
27802
|
-
color: "surface"
|
|
27803
|
-
}, palette, {
|
|
27804
|
-
text: background?.textColor,
|
|
27805
|
-
link: footer?.navLinkStyle?.colorToken ?? footer?.navColor ?? background?.textColor
|
|
27806
|
-
});
|
|
28670
|
+
return surfaceForegroundStyle(surfaceForegroundInputFromResolved(foreground, rgbColorValue));
|
|
27807
28671
|
}
|
|
27808
28672
|
function footerBottomBarBorderWidthStyle(width) {
|
|
27809
28673
|
if (!width) return void 0;
|
|
@@ -27830,8 +28694,7 @@ const headerRootClassTransform = {
|
|
|
27830
28694
|
const placement = planSiteChromePlacement(parseHeaderPositioning(content.positioning));
|
|
27831
28695
|
const header = asPartialObject(value);
|
|
27832
28696
|
const visuals = resolveHeaderVisualStyles(header);
|
|
27833
|
-
const
|
|
27834
|
-
const hasContainedNav = navContainerType === "glass" || navContainerType === "pill";
|
|
28697
|
+
const hasContainedNav = headerRootPaint(header) === "contained-nav";
|
|
27835
28698
|
const backgroundClass = visuals.isTransparent || hasContainedNav ? "rb-bg-transparent" : null;
|
|
27836
28699
|
const classes = [config.base, backgroundClass];
|
|
27837
28700
|
if (!hasContainedNav) {
|
|
@@ -27874,7 +28737,7 @@ const headerRootStyleTransform = {
|
|
|
27874
28737
|
run: (value, _options, context) => {
|
|
27875
28738
|
const header = asPartialObject(value);
|
|
27876
28739
|
const visuals = resolveHeaderVisualStyles(header);
|
|
27877
|
-
return mergeStyles(resolvedForegroundStyle(resolveHeaderRootForeground(header, context.theme.palette, visuals.isTransparent)) ?? { color: rgbColorValue(
|
|
28740
|
+
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"));
|
|
27878
28741
|
}
|
|
27879
28742
|
};
|
|
27880
28743
|
const headerSectionBackgroundTransform = {
|
|
@@ -27882,9 +28745,7 @@ const headerSectionBackgroundTransform = {
|
|
|
27882
28745
|
kind: "string",
|
|
27883
28746
|
summary: "Resolve the inner site-header section background token",
|
|
27884
28747
|
run: (value) => {
|
|
27885
|
-
|
|
27886
|
-
const navContainerType = header?.navContainer?.type ?? "none";
|
|
27887
|
-
return header?.variant === "floating" || navContainerType === "glass" || navContainerType === "pill" ? "raw:transparent" : "background";
|
|
28748
|
+
return headerRootPaint(asPartialObject(value)) !== "own-surface" ? "raw:transparent" : "background";
|
|
27888
28749
|
}
|
|
27889
28750
|
};
|
|
27890
28751
|
const footerRootStyleTransform = {
|
|
@@ -27902,7 +28763,7 @@ const footerRootStyleTransform = {
|
|
|
27902
28763
|
styleParts.push(backgroundColorStyle(token));
|
|
27903
28764
|
}
|
|
27904
28765
|
}
|
|
27905
|
-
styleParts.push(resolvedForegroundStyle(resolveFooterRootForeground(footer, context.theme.palette)));
|
|
28766
|
+
styleParts.push(resolvedForegroundStyle(resolveFooterRootForeground(footer, context.theme.palette, context.proseHoverCandidate)));
|
|
27906
28767
|
styleParts.push(borderColorStyle("border"));
|
|
27907
28768
|
return mergeStyles(...styleParts);
|
|
27908
28769
|
}
|
|
@@ -27964,22 +28825,28 @@ const footerBottomBarStyleTransform = {
|
|
|
27964
28825
|
run: (value, _options, context) => {
|
|
27965
28826
|
const footer = asPartialObject(value);
|
|
27966
28827
|
const bottomBar = footer?.bottomBar;
|
|
27967
|
-
|
|
27968
|
-
const background = bottomBar?.background;
|
|
27969
|
-
if (background?.type === "color") styleParts.push(backgroundColorStyle(background.color ?? "surface"));
|
|
27970
|
-
styleParts.push(borderColorStyle(bottomBar?.borderTop?.colorToken ?? "border"), footerBottomBarBorderWidthStyle(bottomBar?.borderTop?.width));
|
|
27971
|
-
const foreground = resolveSurfaceForeground(background?.type === "color" ? background : {
|
|
27972
|
-
type: "color",
|
|
27973
|
-
color: "transparent"
|
|
27974
|
-
}, context.theme.palette, {
|
|
27975
|
-
text: bottomBar?.textColor,
|
|
27976
|
-
link: footer?.bottomTextLinkStyle?.colorToken ?? bottomBar?.textColor
|
|
27977
|
-
});
|
|
27978
|
-
if (background?.type === "color") styleParts.push(resolvedForegroundStyle(foreground));
|
|
27979
|
-
else if (bottomBar?.textColor) styleParts.push(textColorStyle(bottomBar.textColor));
|
|
27980
|
-
return mergeStyles(...styleParts);
|
|
28828
|
+
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));
|
|
27981
28829
|
}
|
|
27982
28830
|
};
|
|
28831
|
+
function footerBottomBarForegroundStyle(footer, palette) {
|
|
28832
|
+
if (!footer?.bottomBar) return void 0;
|
|
28833
|
+
const bar = footer.bottomBar;
|
|
28834
|
+
if (bar.background?.type !== "color") return backgroundlessBottomBarForegroundStyle(footer);
|
|
28835
|
+
return resolvedForegroundStyle(resolveSurfaceForeground(bar.background, palette, {
|
|
28836
|
+
text: bar.textColor,
|
|
28837
|
+
link: footer.bottomTextLinkStyle?.colorToken ?? bar.textColor,
|
|
28838
|
+
linkHover: footer.bottomTextLinkStyle?.hoverColorToken
|
|
28839
|
+
}, { compositeBase: measuredFooterBackdrop(footer, palette) }));
|
|
28840
|
+
}
|
|
28841
|
+
function backgroundlessBottomBarForegroundStyle(footer) {
|
|
28842
|
+
if (footer.background?.contentOwner === "site-chrome-editor") return;
|
|
28843
|
+
const textColor = footer.bottomBar?.textColor;
|
|
28844
|
+
return textColor ? textColorStyle(textColor) : void 0;
|
|
28845
|
+
}
|
|
28846
|
+
function measuredFooterBackdrop(footer, palette) {
|
|
28847
|
+
const foreground = resolveFooterRootForeground(footer, palette);
|
|
28848
|
+
return foreground.kind === "known" && foreground.provenance.kind === "measured" ? foreground.provenance.backdropHex : null;
|
|
28849
|
+
}
|
|
27983
28850
|
const footerSplitMainClassTransform = {
|
|
27984
28851
|
id: "layout.footerSplitMainClass",
|
|
27985
28852
|
kind: "string",
|
|
@@ -28075,7 +28942,7 @@ function chromeSurfaceTextToken(surface, theme, palette) {
|
|
|
28075
28942
|
case "header-root": {
|
|
28076
28943
|
const header = theme.header;
|
|
28077
28944
|
const foreground = resolveHeaderRootForeground(header, palette, resolveHeaderVisualStyles(header).isTransparent);
|
|
28078
|
-
return foreground.kind === "known" ? foreground.roles.text :
|
|
28945
|
+
return foreground.kind === "known" ? foreground.roles.text : headerLeafTextColor(header);
|
|
28079
28946
|
}
|
|
28080
28947
|
case "header-mobile-panel": return theme.header?.dropdownStyle?.textColor ?? "text";
|
|
28081
28948
|
case "footer-root": {
|
|
@@ -28651,13 +29518,13 @@ const hours = stack({
|
|
|
28651
29518
|
as: "p",
|
|
28652
29519
|
className: "rb-caption rb-opacity-70"
|
|
28653
29520
|
}, bind("module.timeZone"), when("module.timeZone"))], when("module.kind", { equals: "opening-hours" }));
|
|
28654
|
-
const socials = inline({ className: "rb-
|
|
29521
|
+
const socials = inline({ className: "rb-footer-socials" }, [link({
|
|
28655
29522
|
href: { $bind: { from: "social.href" } },
|
|
28656
29523
|
target: "_blank",
|
|
28657
29524
|
rel: "noreferrer noopener",
|
|
28658
29525
|
"aria-label": { $bind: { from: "social.label" } },
|
|
28659
|
-
className: "rb-nav-text transition-theme-standard"
|
|
28660
|
-
}, [icon({ className: "rb-
|
|
29526
|
+
className: "rb-footer-social-link rb-nav-text transition-theme-standard"
|
|
29527
|
+
}, [icon({ className: "rb-footer-social-icon" }, bind("social.icon"), when("social.icon")), text({ as: "span" }, bind("social.label"), when("social.icon", { equals: null }))], repeat("module.socialLinks", "social"))], when("module.kind", { equals: "social-links" }));
|
|
28661
29528
|
const authoredCopy = richText({
|
|
28662
29529
|
className: "rb-prose rb-prose-sm rb-max-w-none",
|
|
28663
29530
|
style: textColorStyle("text/80")
|
|
@@ -30154,7 +31021,9 @@ const bookingWizard = bookingForm(withApiBindings({
|
|
|
30154
31021
|
} },
|
|
30155
31022
|
formId: { $bind: { from: "content.formId" } },
|
|
30156
31023
|
form: { $bind: { from: "data.form" } },
|
|
30157
|
-
services: { $bind: { from: "data.services" } }
|
|
31024
|
+
services: { $bind: { from: "data.services" } },
|
|
31025
|
+
mailingList: { $bind: { from: "$root.mailingList" } },
|
|
31026
|
+
siteName: { $bind: { from: "$root.siteName" } }
|
|
30158
31027
|
}));
|
|
30159
31028
|
/** Both variants sit in the same section shell; only the inner layout differs. */
|
|
30160
31029
|
function bookingSection(children) {
|
|
@@ -31070,7 +31939,13 @@ const eventRegistrationHydrationSchemaShape = {
|
|
|
31070
31939
|
spamProtectionEnabled: z.boolean().optional(),
|
|
31071
31940
|
supportEmail: z.string().optional(),
|
|
31072
31941
|
sitePasses: publicPassProductCollectionSchema.nullable().optional(),
|
|
31073
|
-
siteMemberships: publicMembershipProductCollectionSchema.nullable().optional()
|
|
31942
|
+
siteMemberships: publicMembershipProductCollectionSchema.nullable().optional(),
|
|
31943
|
+
mailingList: z.unknown().transform((value) => {
|
|
31944
|
+
if (value === void 0) return void 0;
|
|
31945
|
+
const parsed = parseMailingListRuntimeContext(value);
|
|
31946
|
+
return parsed.ok ? parsed.value : void 0;
|
|
31947
|
+
}),
|
|
31948
|
+
siteName: z.string().optional()
|
|
31074
31949
|
};
|
|
31075
31950
|
const eventRegistrationEventSourceSchema = z.discriminatedUnion("kind", [z.object({
|
|
31076
31951
|
kind: z.literal("loaded"),
|
|
@@ -31242,7 +32117,9 @@ const eventRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
|
|
|
31242
32117
|
spamProtectionEnabled: source.spamProtectionEnabled,
|
|
31243
32118
|
supportEmail: source.supportEmail,
|
|
31244
32119
|
sitePasses: source.sitePasses ?? null,
|
|
31245
|
-
siteMemberships: source.siteMemberships ?? null
|
|
32120
|
+
siteMemberships: source.siteMemberships ?? null,
|
|
32121
|
+
mailingList: source.mailingList,
|
|
32122
|
+
siteName: source.siteName
|
|
31246
32123
|
}
|
|
31247
32124
|
};
|
|
31248
32125
|
}
|
|
@@ -31410,6 +32287,8 @@ const eventRegistrationBlockDefinition = {
|
|
|
31410
32287
|
events: { $bind: { from: "data.events" } },
|
|
31411
32288
|
wholeSeriesRunEvents: { $bind: { from: "data.wholeSeriesRunEvents" } },
|
|
31412
32289
|
loaderFailures: { $bind: { from: "$root.loaderFailures" } },
|
|
32290
|
+
mailingList: { $bind: { from: "$root.mailingList" } },
|
|
32291
|
+
siteName: { $bind: { from: "$root.siteName" } },
|
|
31413
32292
|
sitePasses: { $bind: { from: "data.sitePasses" } },
|
|
31414
32293
|
siteMemberships: { $bind: { from: "data.siteMemberships" } },
|
|
31415
32294
|
stage: { $bind: {
|
|
@@ -38169,6 +39048,11 @@ const mailingListContentVersionIdSchema = z.string().transform((value, ctx) => {
|
|
|
38169
39048
|
});
|
|
38170
39049
|
return z.NEVER;
|
|
38171
39050
|
});
|
|
39051
|
+
const mailingListSignupBlockSourceRefSchema = z.object({
|
|
39052
|
+
tag: z.literal("block_ref"),
|
|
39053
|
+
blockId: mailingListSignupBlockIdSchema,
|
|
39054
|
+
contentVersionId: mailingListContentVersionIdSchema
|
|
39055
|
+
});
|
|
38172
39056
|
const signedMailingListSourceTokenSchema = z.string().trim().min(1).transform(parseRequiredMailingListSignedSourceToken);
|
|
38173
39057
|
const newsletterSourceCommonSchema = z.object({
|
|
38174
39058
|
siteId: z.string().optional(),
|
|
@@ -38183,7 +39067,15 @@ const newsletterSourceSchema = z.discriminatedUnion("source", [
|
|
|
38183
39067
|
newsletterSourceCommonSchema.extend({
|
|
38184
39068
|
source: z.literal("block"),
|
|
38185
39069
|
blockId: z.string().nullable().optional(),
|
|
38186
|
-
|
|
39070
|
+
newsletterBlockSubmission: z.discriminatedUnion("tag", [
|
|
39071
|
+
z.object({
|
|
39072
|
+
tag: z.literal("ready"),
|
|
39073
|
+
sourceRef: mailingListSignupBlockSourceRefSchema
|
|
39074
|
+
}),
|
|
39075
|
+
z.object({ tag: z.literal("unpublished-form") }),
|
|
39076
|
+
z.object({ tag: z.literal("unpublished-settings") }),
|
|
39077
|
+
z.object({ tag: z.literal("unavailable") })
|
|
39078
|
+
])
|
|
38187
39079
|
}),
|
|
38188
39080
|
newsletterSourceCommonSchema.extend({
|
|
38189
39081
|
source: z.literal("signed-footer"),
|
|
@@ -38212,11 +39104,7 @@ const newsletterHydrationSchema = z.object({
|
|
|
38212
39104
|
target: z.discriminatedUnion("tag", [
|
|
38213
39105
|
z.object({
|
|
38214
39106
|
tag: z.literal("block-source"),
|
|
38215
|
-
sourceRef:
|
|
38216
|
-
tag: z.literal("block_ref"),
|
|
38217
|
-
blockId: mailingListSignupBlockIdSchema,
|
|
38218
|
-
contentVersionId: mailingListContentVersionIdSchema
|
|
38219
|
-
}).nullable()
|
|
39107
|
+
sourceRef: mailingListSignupBlockSourceRefSchema.nullable()
|
|
38220
39108
|
}),
|
|
38221
39109
|
z.object({
|
|
38222
39110
|
tag: z.literal("signed-footer-source"),
|
|
@@ -38225,7 +39113,11 @@ const newsletterHydrationSchema = z.object({
|
|
|
38225
39113
|
token: signedMailingListSourceTokenSchema
|
|
38226
39114
|
})
|
|
38227
39115
|
}),
|
|
38228
|
-
z.object({ tag: z.literal("preview") })
|
|
39116
|
+
z.object({ tag: z.literal("preview") }),
|
|
39117
|
+
z.object({
|
|
39118
|
+
tag: z.literal("unpublished-preview"),
|
|
39119
|
+
reason: z.enum(["unpublished-form", "unpublished-settings"])
|
|
39120
|
+
})
|
|
38229
39121
|
]),
|
|
38230
39122
|
setupRevision: z.number().int().positive().nullable(),
|
|
38231
39123
|
choiceProvider: z.enum([
|
|
@@ -38294,16 +39186,21 @@ const newsletterFormBlockRuntime = defineProgressiveBlockRuntime({
|
|
|
38294
39186
|
});
|
|
38295
39187
|
function projectNewsletterFormHydrationTarget(source) {
|
|
38296
39188
|
switch (source.source) {
|
|
38297
|
-
case "block": {
|
|
38298
|
-
|
|
38299
|
-
|
|
39189
|
+
case "block": switch (source.newsletterBlockSubmission.tag) {
|
|
39190
|
+
case "unpublished-form":
|
|
39191
|
+
case "unpublished-settings": return {
|
|
39192
|
+
tag: "unpublished-preview",
|
|
39193
|
+
reason: source.newsletterBlockSubmission.tag
|
|
39194
|
+
};
|
|
39195
|
+
case "ready": return {
|
|
38300
39196
|
tag: "block-source",
|
|
38301
|
-
sourceRef
|
|
39197
|
+
sourceRef: source.newsletterBlockSubmission.sourceRef
|
|
38302
39198
|
};
|
|
38303
|
-
return {
|
|
39199
|
+
case "unavailable": return {
|
|
38304
39200
|
tag: "block-source",
|
|
38305
39201
|
sourceRef: null
|
|
38306
39202
|
};
|
|
39203
|
+
default: return assertNever$3(source.newsletterBlockSubmission);
|
|
38307
39204
|
}
|
|
38308
39205
|
case "signed-footer": return {
|
|
38309
39206
|
tag: "signed-footer-source",
|
|
@@ -38466,18 +39363,11 @@ const newsletterSignupManifest = createBlockManifest({
|
|
|
38466
39363
|
],
|
|
38467
39364
|
icon: "Mail"
|
|
38468
39365
|
});
|
|
39366
|
+
const newsletterPublicFieldIds = [...(newsletterSignupManifest.fields ?? []).map((field) => field.id), "_containerStyles"];
|
|
38469
39367
|
function sanitizeNewsletterSignupPublicContent(content) {
|
|
38470
39368
|
if (typeof content !== "object" || content === null || Array.isArray(content)) return content;
|
|
38471
39369
|
const value = content;
|
|
38472
|
-
return
|
|
38473
|
-
title: value.title,
|
|
38474
|
-
subtitle: value.subtitle,
|
|
38475
|
-
targeting: value.targeting,
|
|
38476
|
-
buttonVariant: value.buttonVariant,
|
|
38477
|
-
mailingListSource: value.mailingListSource,
|
|
38478
|
-
mailingListSourceToken: value.mailingListSourceToken,
|
|
38479
|
-
_sectionStyles: value._sectionStyles
|
|
38480
|
-
};
|
|
39370
|
+
return Object.fromEntries(newsletterPublicFieldIds.map((id) => [id, value[id]]));
|
|
38481
39371
|
}
|
|
38482
39372
|
const newsletterSignupBlockDefinition = {
|
|
38483
39373
|
manifest: newsletterSignupManifest,
|
|
@@ -41359,6 +42249,46 @@ z.object({ acceptExtraSiteCharge: z.boolean().optional() });
|
|
|
41359
42249
|
//#region ../surfaces/src/index.ts
|
|
41360
42250
|
const SURFACE_IDS = ["core", "macadamia"];
|
|
41361
42251
|
const DEFAULT_SURFACE_ID = "core";
|
|
42252
|
+
/**
|
|
42253
|
+
* Root hosts for each surface, keyed by deployment tier. The tier-keyed shape
|
|
42254
|
+
* makes it impossible to mis-order entries: callers like
|
|
42255
|
+
* `buildSurfaceAwareDashboardOriginForSurfaceId` look up by tier directly
|
|
42256
|
+
* rather than relying on positional alignment between arrays.
|
|
42257
|
+
*/
|
|
42258
|
+
const SURFACE_ROOT_HOSTS = {
|
|
42259
|
+
core: {
|
|
42260
|
+
local: "localhost",
|
|
42261
|
+
prod: "riverbankcms.com"
|
|
42262
|
+
},
|
|
42263
|
+
macadamia: {
|
|
42264
|
+
local: "macadamia.localhost",
|
|
42265
|
+
prod: "macadamia.studio"
|
|
42266
|
+
}
|
|
42267
|
+
};
|
|
42268
|
+
const SURFACE_SITE_ROOT_HOSTS = {
|
|
42269
|
+
core: {
|
|
42270
|
+
local: "localhost",
|
|
42271
|
+
prod: "riverbanksites.com"
|
|
42272
|
+
},
|
|
42273
|
+
macadamia: {
|
|
42274
|
+
local: "macadamia.localhost",
|
|
42275
|
+
prod: "macadamia.studio"
|
|
42276
|
+
}
|
|
42277
|
+
};
|
|
42278
|
+
const SURFACE_SITE_ROOT_HOST_ALIASES = { core: { prod: ["preview.riverbanksites.com"] } };
|
|
42279
|
+
function surfaceHostTableValues(table) {
|
|
42280
|
+
return Object.values(table).flatMap((byTier) => Object.values(byTier).flat());
|
|
42281
|
+
}
|
|
42282
|
+
function siteSlugLabelUnderRoot(host, siteRootHost) {
|
|
42283
|
+
if (!host.endsWith(`.${siteRootHost}`)) return [];
|
|
42284
|
+
return host.slice(0, host.length - siteRootHost.length - 1).split(".").slice(-1);
|
|
42285
|
+
}
|
|
42286
|
+
function deriveSurfaceOwnedSiteSlugs() {
|
|
42287
|
+
const siteRootHosts = [...surfaceHostTableValues(SURFACE_SITE_ROOT_HOSTS), ...surfaceHostTableValues(SURFACE_SITE_ROOT_HOST_ALIASES)];
|
|
42288
|
+
const labels = [...surfaceHostTableValues(SURFACE_ROOT_HOSTS), ...siteRootHosts].flatMap((host) => siteRootHosts.flatMap((root) => siteSlugLabelUnderRoot(host, root)));
|
|
42289
|
+
return [...new Set(labels)].sort();
|
|
42290
|
+
}
|
|
42291
|
+
deriveSurfaceOwnedSiteSlugs();
|
|
41362
42292
|
[...SURFACE_IDS.filter((surfaceId) => surfaceId !== DEFAULT_SURFACE_ID)];
|
|
41363
42293
|
//#endregion
|
|
41364
42294
|
//#region ../api/src/accountApi.ts
|
|
@@ -41987,6 +42917,7 @@ function parsePublicProductCategorySelector(value) {
|
|
|
41987
42917
|
productCategoryEntryId: record.productCategoryEntryId
|
|
41988
42918
|
};
|
|
41989
42919
|
}
|
|
42920
|
+
z.enum(["public", "unlisted"], { error: "visibility must be 'public' or 'unlisted'" });
|
|
41990
42921
|
//#endregion
|
|
41991
42922
|
//#region ../api/src/bookingPaymentTermSchemas.ts
|
|
41992
42923
|
const bookingDepositRefundPolicySchema = z.enum(["refundable", "non_refundable"]);
|
|
@@ -42457,21 +43388,42 @@ function resolveSiteCustomBlocks(site) {
|
|
|
42457
43388
|
}
|
|
42458
43389
|
//#endregion
|
|
42459
43390
|
//#region src/rendering/helpers/pageRuntimeSupport.ts
|
|
42460
|
-
function
|
|
43391
|
+
function collectMediaAssetSidecar(mediaAssets) {
|
|
43392
|
+
return Array.isArray(mediaAssets) && mediaAssets.length > 0 ? mediaAssets : void 0;
|
|
43393
|
+
}
|
|
43394
|
+
function readBlockContentId(value, name) {
|
|
43395
|
+
if (value === null || value === void 0) return null;
|
|
43396
|
+
if (typeof value === "string") return value;
|
|
43397
|
+
throw new Error(`Invalid ${name} in page: expected string or null`);
|
|
43398
|
+
}
|
|
43399
|
+
function readTransportedBlockIdentity(block, kind, stage) {
|
|
43400
|
+
return {
|
|
43401
|
+
draftContentId: readBlockContentId(block.draftContentId, "draft content id"),
|
|
43402
|
+
publishedPlacement: stage === "preview" ? readPublishedBlockPlacement(readBlockContentId(block.publishedContentId, "published content id"), sanitizeNullableSdkRuntimeBlockContent(kind, readNestedContentRecord(block.publishedContent))) : null
|
|
43403
|
+
};
|
|
43404
|
+
}
|
|
43405
|
+
function convertPageResponseBlock(block, stage) {
|
|
42461
43406
|
if (!isRecord(block)) throw new Error("Invalid block format in page API response");
|
|
43407
|
+
const header = readTransportedBlockHeader(block);
|
|
43408
|
+
const admission = readInvalidBlockAdmission(block.admission);
|
|
43409
|
+
return {
|
|
43410
|
+
...header,
|
|
43411
|
+
...readTransportedBlockIdentity(block, header.kind, stage),
|
|
43412
|
+
content: sanitizeSdkRuntimeBlockContent(header.kind, readContentRecord(block.content) ?? {}),
|
|
43413
|
+
draftContent: sanitizeNullableSdkRuntimeBlockContent(header.kind, readNestedContentRecord(block.draftContent)),
|
|
43414
|
+
...admission ? { admission } : {}
|
|
43415
|
+
};
|
|
43416
|
+
}
|
|
43417
|
+
function readTransportedBlockHeader(block) {
|
|
42462
43418
|
if (typeof block.id !== "string" && block.id !== null) throw new Error(`Invalid block id in page: expected string or null, got ${typeof block.id}`);
|
|
42463
43419
|
if (typeof block.kind !== "string") throw new Error(`Invalid block kind in page: expected string, got ${typeof block.kind}`);
|
|
42464
43420
|
if (typeof block.purpose !== "string") throw new Error(`Invalid block purpose in page: expected string, got ${typeof block.purpose}`);
|
|
42465
43421
|
if (block.contentVersionId !== void 0 && block.contentVersionId !== null && typeof block.contentVersionId !== "string") throw new Error(`Invalid content version id in page: expected string or null, got ${typeof block.contentVersionId}`);
|
|
42466
|
-
const admission = readInvalidBlockAdmission(block.admission);
|
|
42467
43422
|
return {
|
|
42468
43423
|
id: block.id,
|
|
42469
43424
|
...block.contentVersionId !== void 0 ? { contentVersionId: block.contentVersionId } : {},
|
|
42470
43425
|
kind: block.kind,
|
|
42471
|
-
purpose: block.purpose
|
|
42472
|
-
content: sanitizeSdkRuntimeBlockContent(block.kind, readContentRecord(block.content) ?? {}),
|
|
42473
|
-
draftContent: sanitizeNullableSdkRuntimeBlockContent(block.kind, readNestedContentRecord(block.draftContent)),
|
|
42474
|
-
...admission ? { admission } : {}
|
|
43426
|
+
purpose: block.purpose
|
|
42475
43427
|
};
|
|
42476
43428
|
}
|
|
42477
43429
|
function readInvalidBlockAdmission(value) {
|
|
@@ -42484,7 +43436,7 @@ function buildPageOutline(input) {
|
|
|
42484
43436
|
name: input.name,
|
|
42485
43437
|
path: input.path ?? input.fallbackPath,
|
|
42486
43438
|
purpose: input.purpose,
|
|
42487
|
-
blocks: input.blocks.map(convertPageResponseBlock)
|
|
43439
|
+
blocks: input.blocks.map((block) => convertPageResponseBlock(block, input.previewStage))
|
|
42488
43440
|
};
|
|
42489
43441
|
}
|
|
42490
43442
|
function buildRenderablePageOutline(input) {
|
|
@@ -42510,6 +43462,8 @@ function projectRenderablePageOutline(page) {
|
|
|
42510
43462
|
function admitSdkRuntimePageBlock(block, customBlocks) {
|
|
42511
43463
|
const base = {
|
|
42512
43464
|
id: block.id,
|
|
43465
|
+
draftContentId: block.draftContentId,
|
|
43466
|
+
publishedPlacement: block.publishedPlacement,
|
|
42513
43467
|
...block.contentVersionId !== void 0 ? { contentVersionId: block.contentVersionId } : {},
|
|
42514
43468
|
kind: block.kind,
|
|
42515
43469
|
purpose: block.purpose,
|
|
@@ -42571,6 +43525,40 @@ function sanitizeNullableSdkRuntimeBlockContent(blockKind, content) {
|
|
|
42571
43525
|
*
|
|
42572
43526
|
* Use this in client components for dynamic page loading.
|
|
42573
43527
|
*/
|
|
43528
|
+
async function loadUsePageSuccess(input) {
|
|
43529
|
+
const { client, site, pageResponse, siteId, path, pageId, preview } = input;
|
|
43530
|
+
const pageData = pageResponse.page;
|
|
43531
|
+
const mediaAssets = collectMediaAssetSidecar(pageResponse.mediaAssets);
|
|
43532
|
+
const previewStage = preview ? "preview" : "published";
|
|
43533
|
+
const pageOutline = buildRenderablePageOutline({
|
|
43534
|
+
name: pageData.name,
|
|
43535
|
+
path: pageData.path ?? path,
|
|
43536
|
+
fallbackPath: path,
|
|
43537
|
+
purpose: pageData.purpose,
|
|
43538
|
+
blocks: pageData.blocks,
|
|
43539
|
+
previewStage,
|
|
43540
|
+
customBlocks: resolveSiteCustomBlocks(site)
|
|
43541
|
+
});
|
|
43542
|
+
const resolvedData = await prefetchBlockData(projectRenderablePageOutline(pageOutline), {
|
|
43543
|
+
siteId,
|
|
43544
|
+
pageId: pageId ?? pageData.id,
|
|
43545
|
+
previewStage
|
|
43546
|
+
}, client);
|
|
43547
|
+
return {
|
|
43548
|
+
loading: false,
|
|
43549
|
+
error: null,
|
|
43550
|
+
page: pageOutline,
|
|
43551
|
+
runtimeJoins: pageData.runtimeJoins,
|
|
43552
|
+
theme: requireSdkTheme(site.theme, siteId),
|
|
43553
|
+
siteId,
|
|
43554
|
+
resolvedData,
|
|
43555
|
+
dataContext: { previewStage },
|
|
43556
|
+
mailingList: site.mailingList,
|
|
43557
|
+
sdkConfig: site.sdkConfig ?? null,
|
|
43558
|
+
supabaseUrl: site.supabaseUrl,
|
|
43559
|
+
...mediaAssets ? { mediaAssets } : {}
|
|
43560
|
+
};
|
|
43561
|
+
}
|
|
42574
43562
|
/**
|
|
42575
43563
|
* Client-side React hook to fetch all data needed for <Page> component.
|
|
42576
43564
|
*
|
|
@@ -42653,7 +43641,10 @@ function usePage(params) {
|
|
|
42653
43641
|
let cancelled = false;
|
|
42654
43642
|
async function fetchPage() {
|
|
42655
43643
|
try {
|
|
42656
|
-
const [site, pageResponse] = await Promise.all([client.getSite({
|
|
43644
|
+
const [site, pageResponse] = await Promise.all([client.getSite({
|
|
43645
|
+
id: siteId,
|
|
43646
|
+
currentPath: path
|
|
43647
|
+
}), client.getPage({
|
|
42657
43648
|
siteId,
|
|
42658
43649
|
path,
|
|
42659
43650
|
preview
|
|
@@ -42661,36 +43652,17 @@ function usePage(params) {
|
|
|
42661
43652
|
if (cancelled) return;
|
|
42662
43653
|
if ("entry" in pageResponse) throw new Error("This path resolves to a content entry, not a page. Use useContent() instead, which handles both pages and entries. For entries, useContent() returns the raw entry data for custom rendering.");
|
|
42663
43654
|
if ("pageSurface" in pageResponse) throw new Error("This path resolves to a page surface, not a page. Use useContent() instead, which handles pages, entries, and page surfaces.");
|
|
42664
|
-
const
|
|
42665
|
-
|
|
42666
|
-
|
|
42667
|
-
|
|
42668
|
-
name: pageData.name,
|
|
42669
|
-
path: canonicalPagePath,
|
|
42670
|
-
fallbackPath: path,
|
|
42671
|
-
purpose: pageData.purpose,
|
|
42672
|
-
blocks: pageData.blocks,
|
|
42673
|
-
customBlocks: resolveSiteCustomBlocks(site)
|
|
42674
|
-
});
|
|
42675
|
-
const resolvedData = await prefetchBlockData(projectRenderablePageOutline(pageOutline), {
|
|
43655
|
+
const success = await loadUsePageSuccess({
|
|
43656
|
+
client,
|
|
43657
|
+
site,
|
|
43658
|
+
pageResponse,
|
|
42676
43659
|
siteId,
|
|
42677
|
-
|
|
42678
|
-
|
|
42679
|
-
|
|
42680
|
-
if (cancelled) return;
|
|
42681
|
-
setResult({
|
|
42682
|
-
loading: false,
|
|
42683
|
-
error: null,
|
|
42684
|
-
page: pageOutline,
|
|
42685
|
-
runtimeJoins: pageData.runtimeJoins,
|
|
42686
|
-
theme: requireSdkTheme(site.theme, siteId),
|
|
42687
|
-
siteId,
|
|
42688
|
-
resolvedData,
|
|
42689
|
-
mailingList: site.mailingList,
|
|
42690
|
-
sdkConfig: site.sdkConfig ?? null,
|
|
42691
|
-
supabaseUrl: site.supabaseUrl,
|
|
42692
|
-
...mediaAssets ? { mediaAssets } : {}
|
|
43660
|
+
path,
|
|
43661
|
+
pageId,
|
|
43662
|
+
preview
|
|
42693
43663
|
});
|
|
43664
|
+
if (cancelled) return;
|
|
43665
|
+
setResult(success);
|
|
42694
43666
|
} catch (error) {
|
|
42695
43667
|
if (cancelled) return;
|
|
42696
43668
|
setResult({
|
|
@@ -42717,9 +43689,6 @@ function usePage(params) {
|
|
|
42717
43689
|
]);
|
|
42718
43690
|
return result;
|
|
42719
43691
|
}
|
|
42720
|
-
function toMediaAssetSidecar(mediaAssets) {
|
|
42721
|
-
return mediaAssets ?? [];
|
|
42722
|
-
}
|
|
42723
43692
|
//#endregion
|
|
42724
43693
|
//#region src/hooks/index.ts
|
|
42725
43694
|
/**
|