@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/server/data.mjs
CHANGED
|
@@ -661,17 +661,35 @@ function parseMailingListRuntimeContext(value) {
|
|
|
661
661
|
if (!isRecord$10(value)) return invalidRuntimeContext();
|
|
662
662
|
if (value.tag === "not_configured") return ok({ tag: "not_configured" });
|
|
663
663
|
if (value.tag !== "configured") return invalidRuntimeContext();
|
|
664
|
+
return parseConfiguredRuntimeContext(value);
|
|
665
|
+
}
|
|
666
|
+
function parseConfiguredRuntimeContext(value) {
|
|
664
667
|
const revision = parseMailingListSetupRevision(value.revision);
|
|
665
668
|
const form = parseMailingListGlobalForm(value.form);
|
|
666
669
|
const provider = parseRuntimeProvider(value.provider);
|
|
667
|
-
|
|
670
|
+
const bookingSignup = parseBookingSignupOffer(value.bookingSignup);
|
|
671
|
+
if (revision === null || !form.ok || provider === null || bookingSignup === null) return invalidRuntimeContext();
|
|
668
672
|
return ok({
|
|
669
673
|
tag: "configured",
|
|
670
674
|
revision,
|
|
675
|
+
bookingSignup,
|
|
671
676
|
form: form.value,
|
|
672
677
|
provider
|
|
673
678
|
});
|
|
674
679
|
}
|
|
680
|
+
function parseBookingSignupOffer(value) {
|
|
681
|
+
if (value === void 0) return {
|
|
682
|
+
tag: "unavailable",
|
|
683
|
+
reason: "disabled"
|
|
684
|
+
};
|
|
685
|
+
if (!isRecord$10(value)) return null;
|
|
686
|
+
if (value.tag === "offered") return { tag: "offered" };
|
|
687
|
+
if (value.tag === "unavailable" && (value.reason === "disabled" || value.reason === "fields" || value.reason === "destination")) return {
|
|
688
|
+
tag: "unavailable",
|
|
689
|
+
reason: value.reason
|
|
690
|
+
};
|
|
691
|
+
return null;
|
|
692
|
+
}
|
|
675
693
|
function parseRuntimeProvider(value) {
|
|
676
694
|
if (!isRecord$10(value)) return null;
|
|
677
695
|
switch (value.provider) {
|
|
@@ -898,15 +916,6 @@ function parseMailingListContentVersionId(value) {
|
|
|
898
916
|
const parsed = parseContentVersionId(value);
|
|
899
917
|
return parsed.ok ? parsed.value : null;
|
|
900
918
|
}
|
|
901
|
-
function buildMailingListSignupBlockSourceRef(blockId, contentVersionId) {
|
|
902
|
-
const parsedBlockId = parseMailingListBlockId(blockId);
|
|
903
|
-
const parsedContentVersionId = parseMailingListContentVersionId(contentVersionId);
|
|
904
|
-
return parsedBlockId !== null && parsedContentVersionId !== null ? {
|
|
905
|
-
tag: "block_ref",
|
|
906
|
-
blockId: parsedBlockId,
|
|
907
|
-
contentVersionId: parsedContentVersionId
|
|
908
|
-
} : null;
|
|
909
|
-
}
|
|
910
919
|
//#endregion
|
|
911
920
|
//#region ../core/src/secret.ts
|
|
912
921
|
/**
|
|
@@ -2356,13 +2365,16 @@ const SURFACE_FOREGROUND_CSS_VARS = {
|
|
|
2356
2365
|
text: "--rb-surface-text-color",
|
|
2357
2366
|
heading: "--rb-surface-heading-color",
|
|
2358
2367
|
link: "--rb-surface-link-color",
|
|
2368
|
+
linkHover: "--rb-surface-link-hover-color",
|
|
2359
2369
|
supporting: "--rb-surface-supporting-color"
|
|
2360
2370
|
};
|
|
2361
2371
|
const DEFAULT_SURFACE_TEXT_COLOR = "rgb(var(--tb-text, 17 24 39))";
|
|
2372
|
+
const DEFAULT_SURFACE_LINK_COLOR = "rgb(var(--tb-primary, var(--tb-text, 17 24 39)))";
|
|
2362
2373
|
const DEFAULT_ROLE_FALLBACKS = {
|
|
2363
2374
|
text: DEFAULT_SURFACE_TEXT_COLOR,
|
|
2364
2375
|
heading: DEFAULT_SURFACE_TEXT_COLOR,
|
|
2365
|
-
link:
|
|
2376
|
+
link: DEFAULT_SURFACE_LINK_COLOR,
|
|
2377
|
+
linkHover: DEFAULT_SURFACE_LINK_COLOR,
|
|
2366
2378
|
supporting: "rgb(var(--tb-mutedText, 100 116 139))"
|
|
2367
2379
|
};
|
|
2368
2380
|
function requireSurfaceColorValue(role, value) {
|
|
@@ -2372,10 +2384,12 @@ function requireSurfaceColorValue(role, value) {
|
|
|
2372
2384
|
}
|
|
2373
2385
|
function completeSurfaceForegrounds(input) {
|
|
2374
2386
|
const text = requireSurfaceColorValue("text", input.text);
|
|
2387
|
+
const link = input.link === void 0 ? text : requireSurfaceColorValue("link", input.link);
|
|
2375
2388
|
return {
|
|
2376
2389
|
text,
|
|
2377
2390
|
heading: input.heading === void 0 ? text : requireSurfaceColorValue("heading", input.heading),
|
|
2378
|
-
link
|
|
2391
|
+
link,
|
|
2392
|
+
linkHover: input.linkHover === void 0 ? link : requireSurfaceColorValue("linkHover", input.linkHover),
|
|
2379
2393
|
supporting: input.supporting === void 0 ? text : requireSurfaceColorValue("supporting", input.supporting)
|
|
2380
2394
|
};
|
|
2381
2395
|
}
|
|
@@ -2383,6 +2397,7 @@ function surfaceForegroundValue(role, outsideProviderFallback = DEFAULT_ROLE_FAL
|
|
|
2383
2397
|
const roleVariable = SURFACE_FOREGROUND_CSS_VARS[role];
|
|
2384
2398
|
const fallback = requireSurfaceColorValue("fallback", outsideProviderFallback);
|
|
2385
2399
|
if (role === "text") return `var(${roleVariable}, ${fallback})`;
|
|
2400
|
+
if (role === "linkHover") return `var(${roleVariable}, ${surfaceForegroundValue("link", fallback)})`;
|
|
2386
2401
|
return `var(${roleVariable}, var(${SURFACE_FOREGROUND_CSS_VARS.text}, ${fallback}))`;
|
|
2387
2402
|
}
|
|
2388
2403
|
function surfaceForegroundValueWithOpacity(role, opacityPercent) {
|
|
@@ -2396,9 +2411,25 @@ function surfaceForegroundStyle(input) {
|
|
|
2396
2411
|
[SURFACE_FOREGROUND_CSS_VARS.text]: foregrounds.text,
|
|
2397
2412
|
[SURFACE_FOREGROUND_CSS_VARS.heading]: foregrounds.heading,
|
|
2398
2413
|
[SURFACE_FOREGROUND_CSS_VARS.link]: foregrounds.link,
|
|
2399
|
-
[SURFACE_FOREGROUND_CSS_VARS.
|
|
2414
|
+
[SURFACE_FOREGROUND_CSS_VARS.linkHover]: foregrounds.linkHover,
|
|
2415
|
+
[SURFACE_FOREGROUND_CSS_VARS.supporting]: foregrounds.supporting,
|
|
2416
|
+
"--rb-surface-link-hover-decoration": hoverDecoration(input)
|
|
2400
2417
|
};
|
|
2401
2418
|
}
|
|
2419
|
+
function surfaceForegroundInputFromResolved(foreground, color) {
|
|
2420
|
+
const { roles } = foreground;
|
|
2421
|
+
return {
|
|
2422
|
+
text: color(roles.text),
|
|
2423
|
+
heading: color(roles.heading),
|
|
2424
|
+
link: color(roles.link),
|
|
2425
|
+
linkHover: color(roles.linkHover),
|
|
2426
|
+
supporting: color(roles.supporting),
|
|
2427
|
+
hoverDecoration: foreground.hoverDecoration
|
|
2428
|
+
};
|
|
2429
|
+
}
|
|
2430
|
+
function hoverDecoration(input) {
|
|
2431
|
+
return input.hoverDecoration ?? "underline";
|
|
2432
|
+
}
|
|
2402
2433
|
//#endregion
|
|
2403
2434
|
//#region ../theme-core/src/buttons/constants.ts
|
|
2404
2435
|
/**
|
|
@@ -3255,6 +3286,64 @@ function parseAlpha(source) {
|
|
|
3255
3286
|
function isRgbChannel(value) {
|
|
3256
3287
|
return Number.isFinite(value) && value >= 0 && value <= 255;
|
|
3257
3288
|
}
|
|
3289
|
+
/**
|
|
3290
|
+
* Derive the hover foreground that belongs with a resolved resting foreground.
|
|
3291
|
+
*
|
|
3292
|
+
* A resting foreground is chosen to be legible against a known surface. A hover
|
|
3293
|
+
* state derived from it stays within a bounded distance of that colour, so it
|
|
3294
|
+
* inherits most of the resting colour's contrast margin instead of asserting
|
|
3295
|
+
* an unrelated brand colour that no one checked against the surface.
|
|
3296
|
+
*
|
|
3297
|
+
* That bounded-distance property is what lets this be used on a transparent
|
|
3298
|
+
* overlay header, where the backdrop is only partly knowable: the scrolled
|
|
3299
|
+
* state composites a 60% glass tint over arbitrary page content, so no
|
|
3300
|
+
* compile-time contrast proof is available there. Staying near a colour that
|
|
3301
|
+
* is already trusted in both states is a weaker claim than a contrast proof,
|
|
3302
|
+
* and it is one this function can actually keep.
|
|
3303
|
+
*
|
|
3304
|
+
* Returns `null` when the resting token is not a plain palette token — an
|
|
3305
|
+
* already-faded or raw value has no well-defined softening, and the caller
|
|
3306
|
+
* should leave hover alone rather than guess.
|
|
3307
|
+
*/
|
|
3308
|
+
function deriveForegroundHoverToken(restingToken) {
|
|
3309
|
+
const parts = parseColorTokenParts(restingToken);
|
|
3310
|
+
if (parts.kind !== "token") return null;
|
|
3311
|
+
if (parts.opacityPercent !== null) return null;
|
|
3312
|
+
return parseThemeColorToken(`${parts.token}/85`);
|
|
3313
|
+
}
|
|
3314
|
+
/**
|
|
3315
|
+
* Prefer an authored hover that survives every measured backdrop, then a
|
|
3316
|
+
* checked softening of the resting colour. A null backdrop set represents a
|
|
3317
|
+
* trusted treatment: only an explicit authored hover may change the colour.
|
|
3318
|
+
* When neither option works, retain the resting colour and underline it.
|
|
3319
|
+
*/
|
|
3320
|
+
function planForegroundHover(input) {
|
|
3321
|
+
const { restingToken, candidate, palette, backdrops } = input;
|
|
3322
|
+
if (candidate && candidate !== restingToken) {
|
|
3323
|
+
if (backdrops === null || survivesEveryBackdrop(candidate, palette, backdrops)) return {
|
|
3324
|
+
kind: "candidate",
|
|
3325
|
+
token: candidate,
|
|
3326
|
+
decoration: "initial"
|
|
3327
|
+
};
|
|
3328
|
+
}
|
|
3329
|
+
const softened = deriveForegroundHoverToken(restingToken);
|
|
3330
|
+
if (softened && backdrops && survivesEveryBackdrop(softened, palette, backdrops)) return {
|
|
3331
|
+
kind: "softened",
|
|
3332
|
+
token: softened,
|
|
3333
|
+
decoration: "initial"
|
|
3334
|
+
};
|
|
3335
|
+
return {
|
|
3336
|
+
kind: "resting",
|
|
3337
|
+
token: restingToken,
|
|
3338
|
+
decoration: "underline"
|
|
3339
|
+
};
|
|
3340
|
+
}
|
|
3341
|
+
function survivesEveryBackdrop(token, palette, backdrops) {
|
|
3342
|
+
return backdrops.length > 0 && backdrops.every((backdrop) => {
|
|
3343
|
+
const foreground = resolveOpaqueSurfaceHex(token, palette, backdrop);
|
|
3344
|
+
return foreground !== null && contrastRatio(foreground, backdrop) >= 4.5;
|
|
3345
|
+
});
|
|
3346
|
+
}
|
|
3258
3347
|
//#endregion
|
|
3259
3348
|
//#region ../theme-core/src/surfaces/resolveSurfaceForeground.ts
|
|
3260
3349
|
const FALLBACK_TEXT_TOKENS = [
|
|
@@ -3301,12 +3390,16 @@ function resolveSurfaceForeground(background, palette, candidates = {}, options
|
|
|
3301
3390
|
}
|
|
3302
3391
|
function foregroundCandidates(background, overrides) {
|
|
3303
3392
|
return {
|
|
3304
|
-
text: overrides.text
|
|
3305
|
-
heading: overrides.heading
|
|
3306
|
-
link: overrides.link
|
|
3307
|
-
|
|
3393
|
+
text: candidateOrBackground(overrides.text, background?.textColor),
|
|
3394
|
+
heading: candidateOrBackground(overrides.heading, background?.headingColor),
|
|
3395
|
+
link: candidateOrBackground(overrides.link, background?.linkColor),
|
|
3396
|
+
linkHover: candidateOrBackground(overrides.linkHover),
|
|
3397
|
+
supporting: candidateOrBackground(overrides.supporting, background?.supportingColor)
|
|
3308
3398
|
};
|
|
3309
3399
|
}
|
|
3400
|
+
function candidateOrBackground(candidate, backgroundValue) {
|
|
3401
|
+
return candidate ?? backgroundValue ?? null;
|
|
3402
|
+
}
|
|
3310
3403
|
function resolveDeterministicForeground(backgroundReference, candidates, palette, compositeBase) {
|
|
3311
3404
|
const backgroundHex = resolveOpaqueSurfaceHex(backgroundReference, palette, compositeBase);
|
|
3312
3405
|
if (!backgroundHex) return resolveTrustedTreatmentForeground(candidates, palette);
|
|
@@ -3318,29 +3411,51 @@ function resolveDeterministicForeground(backgroundReference, candidates, palette
|
|
|
3318
3411
|
...FALLBACK_TEXT_TOKENS
|
|
3319
3412
|
], backgroundHex, palette, derivedOnToken ? [derivedOnToken] : []);
|
|
3320
3413
|
if (!text) return { kind: "unknown" };
|
|
3321
|
-
return {
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
};
|
|
3414
|
+
return knownForeground({
|
|
3415
|
+
text,
|
|
3416
|
+
heading: safeTokenOr(candidates.heading, text, backgroundHex, palette),
|
|
3417
|
+
link: safeTokenOr(candidates.link, text, backgroundHex, palette),
|
|
3418
|
+
supporting: safeTokenOr(candidates.supporting, text, backgroundHex, palette)
|
|
3419
|
+
}, {
|
|
3420
|
+
kind: "measured",
|
|
3421
|
+
backdropHex: backgroundHex
|
|
3422
|
+
}, candidates.linkHover, palette);
|
|
3330
3423
|
}
|
|
3331
3424
|
function resolveTrustedTreatmentForeground(candidates, palette) {
|
|
3332
3425
|
const text = canonicalToken(candidates.text, palette);
|
|
3333
3426
|
if (!text) return { kind: "unknown" };
|
|
3427
|
+
return knownForeground({
|
|
3428
|
+
text,
|
|
3429
|
+
heading: canonicalToken(candidates.heading, palette) ?? text,
|
|
3430
|
+
link: canonicalToken(candidates.link, palette) ?? text,
|
|
3431
|
+
supporting: canonicalToken(candidates.supporting, palette) ?? text
|
|
3432
|
+
}, { kind: "trusted-treatment" }, candidates.linkHover, palette);
|
|
3433
|
+
}
|
|
3434
|
+
function knownForeground(roles, provenance, hoverCandidate, palette) {
|
|
3435
|
+
const hover = planForegroundHover({
|
|
3436
|
+
restingToken: roles.link,
|
|
3437
|
+
candidate: canonicalHoverToken(hoverCandidate, palette),
|
|
3438
|
+
palette,
|
|
3439
|
+
backdrops: provenance.kind === "measured" ? [provenance.backdropHex] : null
|
|
3440
|
+
});
|
|
3334
3441
|
return {
|
|
3335
3442
|
kind: "known",
|
|
3443
|
+
provenance,
|
|
3336
3444
|
roles: {
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
}
|
|
3445
|
+
...roles,
|
|
3446
|
+
linkHover: hover.token
|
|
3447
|
+
},
|
|
3448
|
+
hoverDecoration: hover.decoration
|
|
3342
3449
|
};
|
|
3343
3450
|
}
|
|
3451
|
+
function canonicalHoverToken(reference, palette) {
|
|
3452
|
+
const token = parseThemeColorToken(reference);
|
|
3453
|
+
if (token) {
|
|
3454
|
+
const parts = parseColorTokenParts(token);
|
|
3455
|
+
if (parts.kind === "token" && resolveConcreteColorHex(parts.token, palette)) return token;
|
|
3456
|
+
}
|
|
3457
|
+
return canonicalToken(reference, palette);
|
|
3458
|
+
}
|
|
3344
3459
|
function safeTokenOr(candidate, fallback, backgroundHex, palette) {
|
|
3345
3460
|
return firstSafeToken([candidate], backgroundHex, palette) ?? fallback;
|
|
3346
3461
|
}
|
|
@@ -6280,6 +6395,43 @@ const effectCompositionSchema = z.object({
|
|
|
6280
6395
|
/** Effects applied on focus */
|
|
6281
6396
|
focus: z.array(effectApplicationSchema).optional()
|
|
6282
6397
|
});
|
|
6398
|
+
const policiesById = {
|
|
6399
|
+
"darken-background": "other",
|
|
6400
|
+
"lighten-background": "other",
|
|
6401
|
+
"fade-background": "other",
|
|
6402
|
+
"opacity-reduce": "other",
|
|
6403
|
+
"animated-gradient": "other",
|
|
6404
|
+
"background-on-hover": "paired-hover",
|
|
6405
|
+
"background-on-hover-alpha": "paired-hover",
|
|
6406
|
+
"border-glow": "other",
|
|
6407
|
+
"drop-shadow": "other",
|
|
6408
|
+
"inner-shadow": "other",
|
|
6409
|
+
"neumorphic-shadow": "other",
|
|
6410
|
+
"outer-glow": "other",
|
|
6411
|
+
"retro-3d-shadow": "other",
|
|
6412
|
+
"scale-up": "other",
|
|
6413
|
+
"scale-down": "other",
|
|
6414
|
+
lift: "other",
|
|
6415
|
+
"press-down": "other",
|
|
6416
|
+
pop: "other",
|
|
6417
|
+
"aurora-glow": "other",
|
|
6418
|
+
"cosmic-stardust": "other",
|
|
6419
|
+
"gradient-border-fill": "other",
|
|
6420
|
+
"animated-gradient-border-fill": "other",
|
|
6421
|
+
"border-bottom-grow": "other",
|
|
6422
|
+
"gradient-text": "other",
|
|
6423
|
+
"text-color-change": "text-colour",
|
|
6424
|
+
"border-color-change": "other",
|
|
6425
|
+
"sketchy-border": "other",
|
|
6426
|
+
"pulse-animation": "other",
|
|
6427
|
+
"nav-underline": "underline",
|
|
6428
|
+
"nav-frosted-base": "other",
|
|
6429
|
+
"nav-frosted-hover": "other",
|
|
6430
|
+
"nav-frosted-active": "other"
|
|
6431
|
+
};
|
|
6432
|
+
function navEffectPolicy(effectId) {
|
|
6433
|
+
return policiesById[effectId] ?? null;
|
|
6434
|
+
}
|
|
6283
6435
|
//#endregion
|
|
6284
6436
|
//#region ../theme-core/src/navigation/types.ts
|
|
6285
6437
|
/**
|
|
@@ -6368,6 +6520,16 @@ const navLinkStyleSchema = z.object({
|
|
|
6368
6520
|
/** Composable effects */
|
|
6369
6521
|
effects: effectCompositionSchema.optional()
|
|
6370
6522
|
});
|
|
6523
|
+
function navLinkHoverColorCandidate(style) {
|
|
6524
|
+
const effect = style?.effects?.hover?.find((item) => navEffectPolicy(item.effectId) === "text-colour");
|
|
6525
|
+
return parseThemeColorToken(effect?.options?.hoverColorToken ?? style?.hoverColorToken);
|
|
6526
|
+
}
|
|
6527
|
+
function navLinkOwnsHoverForeground(style) {
|
|
6528
|
+
return style?.effects?.hover?.some((effect) => navEffectPolicy(effect.effectId) === "paired-hover") ?? false;
|
|
6529
|
+
}
|
|
6530
|
+
function navLinkOwnsUnderline(style) {
|
|
6531
|
+
return style?.effects?.hover?.some((effect) => navEffectPolicy(effect.effectId) === "underline") ?? false;
|
|
6532
|
+
}
|
|
6371
6533
|
//#endregion
|
|
6372
6534
|
//#region ../theme-core/src/customCss/validation.ts
|
|
6373
6535
|
/**
|
|
@@ -8016,6 +8178,7 @@ const publicEventLoaderQuerySchemaShape = {
|
|
|
8016
8178
|
seriesSlug: z.string().optional(),
|
|
8017
8179
|
includeOccurrenceId: z.string().optional(),
|
|
8018
8180
|
readIntent: z.string().optional(),
|
|
8181
|
+
detailAdmission: z.string().optional(),
|
|
8019
8182
|
detailLevel: z.string().optional(),
|
|
8020
8183
|
readProfile: z.string().optional()
|
|
8021
8184
|
};
|
|
@@ -8182,11 +8345,11 @@ const publicEventBookingAvailabilitySchema = z.discriminatedUnion("kind", [z.obj
|
|
|
8182
8345
|
"series_archived",
|
|
8183
8346
|
"parent_archived",
|
|
8184
8347
|
"parent_inconsistent",
|
|
8185
|
-
"not_public",
|
|
8186
8348
|
"already_started",
|
|
8187
8349
|
"enrollment_closed"
|
|
8188
8350
|
])
|
|
8189
8351
|
})]);
|
|
8352
|
+
const publicEventBookingClosedDetailSchema = z.discriminatedUnion("kind", [z.object({ kind: z.literal("opensSoon") }), z.object({ kind: z.literal("paused") })]);
|
|
8190
8353
|
const publicRunSessionSchema = z.object({
|
|
8191
8354
|
occurrenceId: z.string(),
|
|
8192
8355
|
startsAt: z.string(),
|
|
@@ -8231,6 +8394,7 @@ const publicEventBaseSchema = z.object({
|
|
|
8231
8394
|
destination: publicEventDestinationSchema,
|
|
8232
8395
|
requiresRegistration: z.boolean(),
|
|
8233
8396
|
bookingAvailability: publicEventBookingAvailabilitySchema,
|
|
8397
|
+
bookingClosedDetail: publicEventBookingClosedDetailSchema.optional(),
|
|
8234
8398
|
deliveryMode: z.enum([
|
|
8235
8399
|
"in_person",
|
|
8236
8400
|
"online",
|
|
@@ -8524,6 +8688,64 @@ function defineEndpointDefinitions(definitions) {
|
|
|
8524
8688
|
return definitions;
|
|
8525
8689
|
}
|
|
8526
8690
|
//#endregion
|
|
8691
|
+
//#region ../api/src/apiEndpointTypes.ts
|
|
8692
|
+
function allowedDemoMutationPolicy() {
|
|
8693
|
+
return {
|
|
8694
|
+
classification: "allowed",
|
|
8695
|
+
publicMessage: ""
|
|
8696
|
+
};
|
|
8697
|
+
}
|
|
8698
|
+
function blockedDemoMutationPolicy(classification, publicMessage) {
|
|
8699
|
+
if (publicMessage.trim() === "") throw new Error(`Demo mutation policy ${classification} requires publicMessage.`);
|
|
8700
|
+
return {
|
|
8701
|
+
classification,
|
|
8702
|
+
publicMessage
|
|
8703
|
+
};
|
|
8704
|
+
}
|
|
8705
|
+
//#endregion
|
|
8706
|
+
//#region ../api/src/demoMutationPolicies.ts
|
|
8707
|
+
const DEMO_MUTATION_BLOCKED_HIDDEN = blockedDemoMutationPolicy("blocked-hidden", "This action is not available in demo sites.");
|
|
8708
|
+
const DEMO_MUTATION_BLOCKED_DISABLED = blockedDemoMutationPolicy("blocked-disabled", "This setting is disabled in demo sites.");
|
|
8709
|
+
blockedDemoMutationPolicy("internal-only", "This internal operation is not available in demo sites.");
|
|
8710
|
+
const DEMO_MUTATION_ALLOWED = allowedDemoMutationPolicy();
|
|
8711
|
+
//#endregion
|
|
8712
|
+
//#region ../api/src/siteLifecycleEndpoints.ts
|
|
8713
|
+
const SITE_LIFECYCLE_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
8714
|
+
createSite: {
|
|
8715
|
+
path: "/sites/manage",
|
|
8716
|
+
method: "POST",
|
|
8717
|
+
tags: ["site"],
|
|
8718
|
+
auth: "user",
|
|
8719
|
+
responseKind: "json",
|
|
8720
|
+
errors: []
|
|
8721
|
+
},
|
|
8722
|
+
createSiteManual: {
|
|
8723
|
+
path: "/sites/manual",
|
|
8724
|
+
method: "POST",
|
|
8725
|
+
tags: ["site"],
|
|
8726
|
+
auth: "user",
|
|
8727
|
+
responseKind: "json",
|
|
8728
|
+
errors: []
|
|
8729
|
+
},
|
|
8730
|
+
updateSite: {
|
|
8731
|
+
path: "/sites/manage",
|
|
8732
|
+
method: "PUT",
|
|
8733
|
+
tags: ["site"],
|
|
8734
|
+
auth: "user",
|
|
8735
|
+
responseKind: "json",
|
|
8736
|
+
errors: []
|
|
8737
|
+
},
|
|
8738
|
+
deleteSite: {
|
|
8739
|
+
path: "/sites/{siteId}",
|
|
8740
|
+
method: "DELETE",
|
|
8741
|
+
tags: ["site", "site-{siteId}"],
|
|
8742
|
+
auth: "user",
|
|
8743
|
+
responseKind: "json",
|
|
8744
|
+
errors: [],
|
|
8745
|
+
demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN
|
|
8746
|
+
}
|
|
8747
|
+
});
|
|
8748
|
+
//#endregion
|
|
8527
8749
|
//#region ../api/src/publicNewsletterEndpointDefinitions.ts
|
|
8528
8750
|
const PUBLIC_NEWSLETTER_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
8529
8751
|
subscribeNewsletter: {
|
|
@@ -8584,27 +8806,6 @@ const PUBLIC_NEWSLETTER_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
8584
8806
|
}
|
|
8585
8807
|
});
|
|
8586
8808
|
//#endregion
|
|
8587
|
-
//#region ../api/src/apiEndpointTypes.ts
|
|
8588
|
-
function allowedDemoMutationPolicy() {
|
|
8589
|
-
return {
|
|
8590
|
-
classification: "allowed",
|
|
8591
|
-
publicMessage: ""
|
|
8592
|
-
};
|
|
8593
|
-
}
|
|
8594
|
-
function blockedDemoMutationPolicy(classification, publicMessage) {
|
|
8595
|
-
if (publicMessage.trim() === "") throw new Error(`Demo mutation policy ${classification} requires publicMessage.`);
|
|
8596
|
-
return {
|
|
8597
|
-
classification,
|
|
8598
|
-
publicMessage
|
|
8599
|
-
};
|
|
8600
|
-
}
|
|
8601
|
-
//#endregion
|
|
8602
|
-
//#region ../api/src/demoMutationPolicies.ts
|
|
8603
|
-
const DEMO_MUTATION_BLOCKED_HIDDEN = blockedDemoMutationPolicy("blocked-hidden", "This action is not available in demo sites.");
|
|
8604
|
-
const DEMO_MUTATION_BLOCKED_DISABLED = blockedDemoMutationPolicy("blocked-disabled", "This setting is disabled in demo sites.");
|
|
8605
|
-
blockedDemoMutationPolicy("internal-only", "This internal operation is not available in demo sites.");
|
|
8606
|
-
const DEMO_MUTATION_ALLOWED = allowedDemoMutationPolicy();
|
|
8607
|
-
//#endregion
|
|
8608
8809
|
//#region ../api/src/cache-tags.ts
|
|
8609
8810
|
/**
|
|
8610
8811
|
* Tag templates for endpoint definitions (support `{param}` placeholders).
|
|
@@ -9464,6 +9665,13 @@ const EVENT_SERIES_REGISTRATION_ENDPOINT_DEFINITIONS = defineEndpointDefinitions
|
|
|
9464
9665
|
errors: [],
|
|
9465
9666
|
responseKind: "blob"
|
|
9466
9667
|
},
|
|
9668
|
+
exportEventOfferingRegistrationsCsv: {
|
|
9669
|
+
path: "/sites/{siteId}/bookings/event-offerings/{eventOfferingId}/registrations/export.csv",
|
|
9670
|
+
method: "GET",
|
|
9671
|
+
auth: "user",
|
|
9672
|
+
errors: [],
|
|
9673
|
+
responseKind: "blob"
|
|
9674
|
+
},
|
|
9467
9675
|
updateEventSeriesRegistration: {
|
|
9468
9676
|
path: "/sites/{siteId}/bookings/event-series/{seriesId}/registrations/{registrationId}",
|
|
9469
9677
|
method: "PATCH",
|
|
@@ -9474,6 +9682,19 @@ const EVENT_SERIES_REGISTRATION_ENDPOINT_DEFINITIONS = defineEndpointDefinitions
|
|
|
9474
9682
|
"resource:not_found",
|
|
9475
9683
|
"server:internal_error"
|
|
9476
9684
|
]
|
|
9685
|
+
},
|
|
9686
|
+
saveEventSeriesRegistrationAnswers: {
|
|
9687
|
+
path: "/sites/{siteId}/bookings/event-series/{seriesId}/registrations/{registrationId}/answers",
|
|
9688
|
+
method: "PUT",
|
|
9689
|
+
auth: "user",
|
|
9690
|
+
responseKind: "json",
|
|
9691
|
+
errors: [
|
|
9692
|
+
"validation:invalid_input",
|
|
9693
|
+
"auth:forbidden",
|
|
9694
|
+
"resource:not_found",
|
|
9695
|
+
"resource:conflict",
|
|
9696
|
+
"server:internal_error"
|
|
9697
|
+
]
|
|
9477
9698
|
}
|
|
9478
9699
|
});
|
|
9479
9700
|
//#endregion
|
|
@@ -9611,6 +9832,20 @@ const NEWSLETTER_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
9611
9832
|
responseKind: "json",
|
|
9612
9833
|
errors: ["auth:forbidden", "server:internal_error"]
|
|
9613
9834
|
},
|
|
9835
|
+
setMailingListBookingOptIn: {
|
|
9836
|
+
path: "/sites/{siteId}/mailing-list/setup/booking-opt-in",
|
|
9837
|
+
method: "PUT",
|
|
9838
|
+
tags: [TAG_TEMPLATES.site, TAG_TEMPLATES.siteNewsletter],
|
|
9839
|
+
auth: "user",
|
|
9840
|
+
responseKind: "json",
|
|
9841
|
+
demoMutation: DEMO_MUTATION_BLOCKED_DISABLED,
|
|
9842
|
+
errors: [
|
|
9843
|
+
"auth:forbidden",
|
|
9844
|
+
"validation:invalid_input",
|
|
9845
|
+
"resource:conflict",
|
|
9846
|
+
"server:internal_error"
|
|
9847
|
+
]
|
|
9848
|
+
},
|
|
9614
9849
|
getMailingListAuthoringContext: {
|
|
9615
9850
|
path: "/sites/{siteId}/mailing-list/authoring-context",
|
|
9616
9851
|
method: "GET",
|
|
@@ -9894,6 +10129,30 @@ const NEWSLETTER_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
9894
10129
|
responseKind: "json",
|
|
9895
10130
|
demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN
|
|
9896
10131
|
},
|
|
10132
|
+
scheduleNewsletterCampaign: {
|
|
10133
|
+
path: "/sites/{siteId}/newsletter/campaigns/{campaignId}/schedule",
|
|
10134
|
+
method: "POST",
|
|
10135
|
+
tags: [TAG_TEMPLATES.site, TAG_TEMPLATES.siteNewsletter],
|
|
10136
|
+
auth: "user",
|
|
10137
|
+
responseKind: "json",
|
|
10138
|
+
demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN
|
|
10139
|
+
},
|
|
10140
|
+
unscheduleNewsletterCampaign: {
|
|
10141
|
+
path: "/sites/{siteId}/newsletter/campaigns/{campaignId}/unschedule",
|
|
10142
|
+
method: "POST",
|
|
10143
|
+
tags: [TAG_TEMPLATES.site, TAG_TEMPLATES.siteNewsletter],
|
|
10144
|
+
auth: "user",
|
|
10145
|
+
responseKind: "json",
|
|
10146
|
+
demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN
|
|
10147
|
+
},
|
|
10148
|
+
stopNewsletterCampaign: {
|
|
10149
|
+
path: "/sites/{siteId}/newsletter/campaigns/{campaignId}/stop",
|
|
10150
|
+
method: "POST",
|
|
10151
|
+
tags: [TAG_TEMPLATES.site, TAG_TEMPLATES.siteNewsletter],
|
|
10152
|
+
auth: "user",
|
|
10153
|
+
responseKind: "json",
|
|
10154
|
+
demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN
|
|
10155
|
+
},
|
|
9897
10156
|
testSendNewsletterCampaign: {
|
|
9898
10157
|
path: "/sites/{siteId}/newsletter/campaigns/{campaignId}/test-send",
|
|
9899
10158
|
method: "POST",
|
|
@@ -9904,6 +10163,154 @@ const NEWSLETTER_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
9904
10163
|
}
|
|
9905
10164
|
});
|
|
9906
10165
|
//#endregion
|
|
10166
|
+
//#region ../api/src/sdkEventEndpointDefinitions.ts
|
|
10167
|
+
/**
|
|
10168
|
+
* The SDK's Event graph: the Events themselves and the occurrences of one run.
|
|
10169
|
+
* Extracted from `endpoints.ts` so this family can be read, and added to, on
|
|
10170
|
+
* its own. New entries here must declare `errors`; the
|
|
10171
|
+
* require-api-endpoint-errors lint enforces that here as in endpoints.ts.
|
|
10172
|
+
*/
|
|
10173
|
+
const SDK_EVENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
10174
|
+
sdkListEvents: {
|
|
10175
|
+
path: "/sdk/{siteId}/events",
|
|
10176
|
+
method: "GET",
|
|
10177
|
+
auth: "service",
|
|
10178
|
+
responseKind: "json"
|
|
10179
|
+
},
|
|
10180
|
+
sdkUpsertEvent: {
|
|
10181
|
+
path: "/sdk/{siteId}/events",
|
|
10182
|
+
method: "POST",
|
|
10183
|
+
auth: "service",
|
|
10184
|
+
responseKind: "json",
|
|
10185
|
+
errors: [
|
|
10186
|
+
"validation:invalid_input",
|
|
10187
|
+
"resource:not_found",
|
|
10188
|
+
"resource:conflict",
|
|
10189
|
+
"billing:plan_limit_exceeded",
|
|
10190
|
+
"server:internal_error"
|
|
10191
|
+
]
|
|
10192
|
+
},
|
|
10193
|
+
sdkGetEvent: {
|
|
10194
|
+
path: "/sdk/{siteId}/events/{identifier}",
|
|
10195
|
+
method: "GET",
|
|
10196
|
+
auth: "service",
|
|
10197
|
+
responseKind: "json"
|
|
10198
|
+
},
|
|
10199
|
+
sdkDeleteEvent: {
|
|
10200
|
+
path: "/sdk/{siteId}/events/{identifier}",
|
|
10201
|
+
method: "DELETE",
|
|
10202
|
+
auth: "service",
|
|
10203
|
+
responseKind: "json",
|
|
10204
|
+
errors: [
|
|
10205
|
+
"resource:not_found",
|
|
10206
|
+
"resource:conflict",
|
|
10207
|
+
"server:internal_error"
|
|
10208
|
+
]
|
|
10209
|
+
},
|
|
10210
|
+
sdkTakeEventOffline: {
|
|
10211
|
+
path: "/sdk/{siteId}/events/{identifier}/lifecycle",
|
|
10212
|
+
method: "POST",
|
|
10213
|
+
auth: "service",
|
|
10214
|
+
responseKind: "json",
|
|
10215
|
+
errors: [
|
|
10216
|
+
"resource:not_found",
|
|
10217
|
+
"validation:invalid_input",
|
|
10218
|
+
"resource:conflict",
|
|
10219
|
+
"server:internal_error"
|
|
10220
|
+
]
|
|
10221
|
+
},
|
|
10222
|
+
sdkListEventOccurrences: {
|
|
10223
|
+
path: "/sdk/{siteId}/events/{identifier}/runs/{runIdentifier}/occurrences",
|
|
10224
|
+
method: "GET",
|
|
10225
|
+
auth: "service",
|
|
10226
|
+
responseKind: "json",
|
|
10227
|
+
errors: [
|
|
10228
|
+
"resource:not_found",
|
|
10229
|
+
"validation:invalid_input",
|
|
10230
|
+
"server:internal_error"
|
|
10231
|
+
]
|
|
10232
|
+
},
|
|
10233
|
+
sdkAddEventOccurrence: {
|
|
10234
|
+
path: "/sdk/{siteId}/events/{identifier}/runs/{runIdentifier}/occurrences",
|
|
10235
|
+
method: "POST",
|
|
10236
|
+
auth: "service",
|
|
10237
|
+
responseKind: "json",
|
|
10238
|
+
errors: [
|
|
10239
|
+
"resource:not_found",
|
|
10240
|
+
"validation:invalid_input",
|
|
10241
|
+
"resource:conflict",
|
|
10242
|
+
"server:internal_error"
|
|
10243
|
+
]
|
|
10244
|
+
},
|
|
10245
|
+
sdkUpdateEventOccurrence: {
|
|
10246
|
+
path: "/sdk/{siteId}/events/{identifier}/runs/{runIdentifier}/occurrences/{occurrenceId}",
|
|
10247
|
+
method: "PATCH",
|
|
10248
|
+
auth: "service",
|
|
10249
|
+
responseKind: "json",
|
|
10250
|
+
errors: [
|
|
10251
|
+
"resource:not_found",
|
|
10252
|
+
"validation:invalid_input",
|
|
10253
|
+
"resource:conflict",
|
|
10254
|
+
"server:internal_error"
|
|
10255
|
+
]
|
|
10256
|
+
},
|
|
10257
|
+
sdkCancelEventOccurrence: {
|
|
10258
|
+
path: "/sdk/{siteId}/events/{identifier}/runs/{runIdentifier}/occurrences/{occurrenceId}/cancel",
|
|
10259
|
+
method: "POST",
|
|
10260
|
+
auth: "service",
|
|
10261
|
+
responseKind: "json",
|
|
10262
|
+
errors: [
|
|
10263
|
+
"resource:not_found",
|
|
10264
|
+
"resource:conflict",
|
|
10265
|
+
"server:internal_error"
|
|
10266
|
+
]
|
|
10267
|
+
},
|
|
10268
|
+
sdkDeleteEventOccurrence: {
|
|
10269
|
+
path: "/sdk/{siteId}/events/{identifier}/runs/{runIdentifier}/occurrences/{occurrenceId}",
|
|
10270
|
+
method: "DELETE",
|
|
10271
|
+
auth: "service",
|
|
10272
|
+
responseKind: "json",
|
|
10273
|
+
errors: [
|
|
10274
|
+
"resource:not_found",
|
|
10275
|
+
"resource:conflict",
|
|
10276
|
+
"server:internal_error"
|
|
10277
|
+
]
|
|
10278
|
+
}
|
|
10279
|
+
});
|
|
10280
|
+
//#endregion
|
|
10281
|
+
//#region ../api/src/sdkPageDesignEndpointDefinitions.ts
|
|
10282
|
+
/**
|
|
10283
|
+
* SDK management endpoints for a page's draft design (issue 1497), spread into
|
|
10284
|
+
* `ENDPOINT_DEFINITIONS` like the other endpoint-definition modules. New
|
|
10285
|
+
* entries here must declare `errors`, which the require-api-endpoint-errors
|
|
10286
|
+
* lint enforces.
|
|
10287
|
+
*/
|
|
10288
|
+
const SDK_PAGE_DESIGN_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
10289
|
+
sdkGetPageDesign: {
|
|
10290
|
+
path: "/sdk/{siteId}/pages/{identifier}/design",
|
|
10291
|
+
method: "GET",
|
|
10292
|
+
auth: "service",
|
|
10293
|
+
responseKind: "json",
|
|
10294
|
+
errors: [
|
|
10295
|
+
"resource:not_found",
|
|
10296
|
+
"validation:invalid_input",
|
|
10297
|
+
"server:internal_error"
|
|
10298
|
+
]
|
|
10299
|
+
},
|
|
10300
|
+
sdkSavePageDesign: {
|
|
10301
|
+
path: "/sdk/{siteId}/pages/{identifier}/design",
|
|
10302
|
+
method: "POST",
|
|
10303
|
+
auth: "service",
|
|
10304
|
+
responseKind: "json",
|
|
10305
|
+
errors: [
|
|
10306
|
+
"resource:not_found",
|
|
10307
|
+
"validation:invalid_input",
|
|
10308
|
+
"resource:conflict",
|
|
10309
|
+
"server:internal_error"
|
|
10310
|
+
]
|
|
10311
|
+
}
|
|
10312
|
+
});
|
|
10313
|
+
//#endregion
|
|
9907
10314
|
//#region ../api/src/publicEventEndpointDefinitions.ts
|
|
9908
10315
|
const PUBLIC_EVENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
9909
10316
|
checkPublicEventRegistrationNextStep: {
|
|
@@ -10148,6 +10555,45 @@ const SITE_API_KEY_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
10148
10555
|
}
|
|
10149
10556
|
});
|
|
10150
10557
|
//#endregion
|
|
10558
|
+
//#region ../api/src/siteManagementEndpointDefinitions.ts
|
|
10559
|
+
const SITE_MANAGEMENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
10560
|
+
createSite: {
|
|
10561
|
+
path: "/sites/manage",
|
|
10562
|
+
method: "POST",
|
|
10563
|
+
tags: ["site"],
|
|
10564
|
+
auth: "user",
|
|
10565
|
+
responseKind: "json"
|
|
10566
|
+
},
|
|
10567
|
+
updateSite: {
|
|
10568
|
+
path: "/sites/manage",
|
|
10569
|
+
method: "PUT",
|
|
10570
|
+
tags: ["site"],
|
|
10571
|
+
auth: "user",
|
|
10572
|
+
responseKind: "json"
|
|
10573
|
+
},
|
|
10574
|
+
changeSiteAddress: {
|
|
10575
|
+
path: "/sites/{siteId}/address",
|
|
10576
|
+
method: "PUT",
|
|
10577
|
+
auth: "user",
|
|
10578
|
+
responseKind: "json",
|
|
10579
|
+
demoMutation: DEMO_MUTATION_BLOCKED_DISABLED
|
|
10580
|
+
},
|
|
10581
|
+
getSiteAddressAvailability: {
|
|
10582
|
+
path: "/sites/{siteId}/address/availability",
|
|
10583
|
+
method: "GET",
|
|
10584
|
+
auth: "user",
|
|
10585
|
+
responseKind: "json"
|
|
10586
|
+
},
|
|
10587
|
+
deleteSite: {
|
|
10588
|
+
path: "/sites/{siteId}",
|
|
10589
|
+
method: "DELETE",
|
|
10590
|
+
tags: ["site", "site-{siteId}"],
|
|
10591
|
+
auth: "user",
|
|
10592
|
+
responseKind: "json",
|
|
10593
|
+
demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN
|
|
10594
|
+
}
|
|
10595
|
+
});
|
|
10596
|
+
//#endregion
|
|
10151
10597
|
//#region ../api/src/eventManagementEndpointDefinitions.ts
|
|
10152
10598
|
const EVENT_MANAGEMENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
10153
10599
|
listEvents: {
|
|
@@ -10195,6 +10641,28 @@ const EVENT_MANAGEMENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
10195
10641
|
"server:internal_error"
|
|
10196
10642
|
]
|
|
10197
10643
|
},
|
|
10644
|
+
/**
|
|
10645
|
+
* The web address of an event's own page. A course page belongs to the
|
|
10646
|
+
* event itself, so its address is written here rather than through a run.
|
|
10647
|
+
*/
|
|
10648
|
+
updateEventAddress: {
|
|
10649
|
+
path: "/sites/{siteId}/bookings/events/{eventId}/address",
|
|
10650
|
+
method: "PATCH",
|
|
10651
|
+
tags: [
|
|
10652
|
+
"site-{siteId}",
|
|
10653
|
+
"event-series-{siteId}",
|
|
10654
|
+
TAG_TEMPLATES.siteRoutableContent,
|
|
10655
|
+
TAG_TEMPLATES.siteRedirects
|
|
10656
|
+
],
|
|
10657
|
+
auth: "user",
|
|
10658
|
+
responseKind: "json",
|
|
10659
|
+
errors: [
|
|
10660
|
+
"validation:invalid_input",
|
|
10661
|
+
"resource:not_found",
|
|
10662
|
+
"resource:conflict",
|
|
10663
|
+
"server:internal_error"
|
|
10664
|
+
]
|
|
10665
|
+
},
|
|
10198
10666
|
createWholeSeriesRun: {
|
|
10199
10667
|
path: "/sites/{siteId}/bookings/events/{eventId}/runs",
|
|
10200
10668
|
method: "POST",
|
|
@@ -10221,6 +10689,20 @@ const EVENT_MANAGEMENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
10221
10689
|
"server:internal_error"
|
|
10222
10690
|
]
|
|
10223
10691
|
},
|
|
10692
|
+
updateCourseBookingSettings: {
|
|
10693
|
+
path: "/sites/{siteId}/bookings/events/{eventId}/booking-settings",
|
|
10694
|
+
method: "PATCH",
|
|
10695
|
+
tags: ["site-{siteId}", "event-series-{siteId}"],
|
|
10696
|
+
auth: "user",
|
|
10697
|
+
responseKind: "json",
|
|
10698
|
+
errors: [
|
|
10699
|
+
"validation:invalid_input",
|
|
10700
|
+
"auth:forbidden",
|
|
10701
|
+
"resource:not_found",
|
|
10702
|
+
"resource:conflict",
|
|
10703
|
+
"server:internal_error"
|
|
10704
|
+
]
|
|
10705
|
+
},
|
|
10224
10706
|
cancelWholeSeriesRun: {
|
|
10225
10707
|
path: "/sites/{siteId}/bookings/events/{eventId}/runs/{runId}/cancellation",
|
|
10226
10708
|
method: "POST",
|
|
@@ -10233,6 +10715,28 @@ const EVENT_MANAGEMENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
10233
10715
|
"resource:conflict",
|
|
10234
10716
|
"server:internal_error"
|
|
10235
10717
|
]
|
|
10718
|
+
},
|
|
10719
|
+
/**
|
|
10720
|
+
* The Content tab's one write: the short introduction, image and
|
|
10721
|
+
* description of an event's page, published without its layout.
|
|
10722
|
+
*/
|
|
10723
|
+
saveEventPageWords: {
|
|
10724
|
+
path: "/sites/{siteId}/page-surfaces/{pageSurfaceId}/words",
|
|
10725
|
+
method: "PUT",
|
|
10726
|
+
tags: [
|
|
10727
|
+
TAG_TEMPLATES.siteCollection,
|
|
10728
|
+
TAG_TEMPLATES.siteRoutableContent,
|
|
10729
|
+
TAG_TEMPLATES.pageSurfaceById
|
|
10730
|
+
],
|
|
10731
|
+
auth: "user",
|
|
10732
|
+
responseKind: "json",
|
|
10733
|
+
errors: [
|
|
10734
|
+
"auth:forbidden",
|
|
10735
|
+
"validation:invalid_input",
|
|
10736
|
+
"resource:not_found",
|
|
10737
|
+
"resource:conflict",
|
|
10738
|
+
"server:internal_error"
|
|
10739
|
+
]
|
|
10236
10740
|
}
|
|
10237
10741
|
});
|
|
10238
10742
|
//#endregion
|
|
@@ -10665,19 +11169,105 @@ const BILLING_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
10665
11169
|
responseKind: "json"
|
|
10666
11170
|
}
|
|
10667
11171
|
});
|
|
11172
|
+
//#endregion
|
|
11173
|
+
//#region ../api/src/bookingPeopleEndpointDefinitions.ts
|
|
11174
|
+
/**
|
|
11175
|
+
* People endpoints (#1356): the People list, its CSV export, and deleting a
|
|
11176
|
+
* person when nothing is attached to them.
|
|
11177
|
+
*/
|
|
11178
|
+
const BOOKING_PEOPLE_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
11179
|
+
listPeople: {
|
|
11180
|
+
path: "/sites/{siteId}/bookings/people",
|
|
11181
|
+
method: "GET",
|
|
11182
|
+
tags: ["site-{siteId}", "customers-{siteId}"],
|
|
11183
|
+
auth: "user",
|
|
11184
|
+
responseKind: "json",
|
|
11185
|
+
errors: ["server:internal_error"]
|
|
11186
|
+
},
|
|
11187
|
+
exportPeopleCsv: {
|
|
11188
|
+
path: "/sites/{siteId}/bookings/people/export.csv",
|
|
11189
|
+
method: "GET",
|
|
11190
|
+
tags: ["site-{siteId}", "customers-{siteId}"],
|
|
11191
|
+
auth: "user",
|
|
11192
|
+
errors: [],
|
|
11193
|
+
responseKind: "blob"
|
|
11194
|
+
},
|
|
11195
|
+
checkPersonDeletion: {
|
|
11196
|
+
path: "/sites/{siteId}/bookings/people/{personId}/deletion-check",
|
|
11197
|
+
method: "GET",
|
|
11198
|
+
tags: ["site-{siteId}", "customers-{siteId}"],
|
|
11199
|
+
auth: "user",
|
|
11200
|
+
responseKind: "json",
|
|
11201
|
+
errors: [
|
|
11202
|
+
"auth:forbidden",
|
|
11203
|
+
"resource:not_found",
|
|
11204
|
+
"server:internal_error"
|
|
11205
|
+
]
|
|
11206
|
+
},
|
|
11207
|
+
deletePerson: {
|
|
11208
|
+
path: "/sites/{siteId}/bookings/people/{personId}",
|
|
11209
|
+
method: "DELETE",
|
|
11210
|
+
tags: ["site-{siteId}", "customers-{siteId}"],
|
|
11211
|
+
auth: "user",
|
|
11212
|
+
responseKind: "json",
|
|
11213
|
+
errors: [
|
|
11214
|
+
"auth:forbidden",
|
|
11215
|
+
"resource:not_found",
|
|
11216
|
+
"server:internal_error"
|
|
11217
|
+
]
|
|
11218
|
+
}
|
|
11219
|
+
});
|
|
11220
|
+
//#endregion
|
|
11221
|
+
//#region ../api/src/clientErrorReporting.ts
|
|
11222
|
+
const CLIENT_ERROR_REPORT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({ reportClientError: {
|
|
11223
|
+
path: "/client/error-report",
|
|
11224
|
+
method: "POST",
|
|
11225
|
+
auth: "user",
|
|
11226
|
+
errors: [],
|
|
11227
|
+
responseKind: "json"
|
|
11228
|
+
} });
|
|
11229
|
+
const CLIENT_ERROR_REPORT_LIMITS = {
|
|
11230
|
+
pathname: 1024,
|
|
11231
|
+
name: 120,
|
|
11232
|
+
message: 2e3,
|
|
11233
|
+
stack: 8e3,
|
|
11234
|
+
digest: 128,
|
|
11235
|
+
componentStack: 8e3,
|
|
11236
|
+
sourceLocation: 1024
|
|
11237
|
+
};
|
|
11238
|
+
const clientErrorEventSchema = z.enum([
|
|
11239
|
+
"dashboard:route-error",
|
|
11240
|
+
"dashboard:app-error",
|
|
11241
|
+
"client:error-boundary",
|
|
11242
|
+
"client:window-error",
|
|
11243
|
+
"client:unhandled-rejection"
|
|
11244
|
+
]);
|
|
11245
|
+
z.object({
|
|
11246
|
+
event: clientErrorEventSchema,
|
|
11247
|
+
pathname: z.string().startsWith("/").max(CLIENT_ERROR_REPORT_LIMITS.pathname),
|
|
11248
|
+
name: z.string().max(CLIENT_ERROR_REPORT_LIMITS.name),
|
|
11249
|
+
message: z.string().max(CLIENT_ERROR_REPORT_LIMITS.message),
|
|
11250
|
+
stack: z.string().max(CLIENT_ERROR_REPORT_LIMITS.stack).nullable(),
|
|
11251
|
+
digest: z.string().max(CLIENT_ERROR_REPORT_LIMITS.digest).nullable(),
|
|
11252
|
+
componentStack: z.string().max(CLIENT_ERROR_REPORT_LIMITS.componentStack).nullable(),
|
|
11253
|
+
sourceLocation: z.string().max(CLIENT_ERROR_REPORT_LIMITS.sourceLocation).nullable()
|
|
11254
|
+
}).strict();
|
|
10668
11255
|
({
|
|
11256
|
+
...SITE_LIFECYCLE_ENDPOINT_DEFINITIONS,
|
|
11257
|
+
...CLIENT_ERROR_REPORT_ENDPOINT_DEFINITIONS,
|
|
10669
11258
|
...PUBLIC_NEWSLETTER_ENDPOINT_DEFINITIONS,
|
|
10670
11259
|
...ACCOUNT_ENDPOINT_DEFINITIONS,
|
|
10671
11260
|
...PUBLIC_ONBOARDING_ATTEMPT_ENDPOINT_DEFINITIONS,
|
|
10672
11261
|
...PUBLIC_EVENT_ENDPOINT_DEFINITIONS,
|
|
10673
11262
|
...GIFTING_ENDPOINT_DEFINITIONS,
|
|
10674
11263
|
...PUBLIC_READ_ENDPOINT_DEFINITIONS,
|
|
10675
|
-
...BILLING_ENDPOINT_DEFINITIONS
|
|
11264
|
+
...BILLING_ENDPOINT_DEFINITIONS,
|
|
11265
|
+
...SITE_MANAGEMENT_ENDPOINT_DEFINITIONS
|
|
10676
11266
|
}), 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, {
|
|
10677
11267
|
...NEWSLETTER_ENDPOINT_DEFINITIONS,
|
|
10678
11268
|
...APPOINTMENT_ENDPOINT_DEFINITIONS,
|
|
10679
11269
|
...EVENT_SERIES_REGISTRATION_ENDPOINT_DEFINITIONS
|
|
10680
|
-
}, 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 };
|
|
11270
|
+
}, 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 };
|
|
10681
11271
|
z.object({ refreshToken: z.string().min(1).max(4096) }).strict();
|
|
10682
11272
|
z.object({
|
|
10683
11273
|
accessToken: z.string().min(1).max(4096),
|
|
@@ -16966,6 +17556,14 @@ const blockDesignFallback = {
|
|
|
16966
17556
|
};
|
|
16967
17557
|
blockDesignFallback.sectionSurface, blockDesignFallback.contentFrame, blockDesignFallback.sectionHeight, blockDesignFallback.heroLegibility, blockDesignFallback.imageSurfaceTreatment, blockDesignFallback.imageSurfaceMotion, blockDesignFallback.tileTreatment, blockDesignFallback.eventListTreatment, blockDesignFallback.eyebrowTreatment, blockDesignFallback.accordionIconTreatment, blockDesignFallback.composition;
|
|
16968
17558
|
//#endregion
|
|
17559
|
+
//#region ../theme-core/src/header/rootPaint.ts
|
|
17560
|
+
/** The nav container takes precedence when a floating header also has one. */
|
|
17561
|
+
function headerRootPaint(header) {
|
|
17562
|
+
const navContainerType = header?.navContainer?.type ?? "none";
|
|
17563
|
+
if (navContainerType === "glass" || navContainerType === "pill") return "contained-nav";
|
|
17564
|
+
return header?.variant === "floating" ? "overlay" : "own-surface";
|
|
17565
|
+
}
|
|
17566
|
+
//#endregion
|
|
16969
17567
|
//#region ../theme-core/src/site-styles/siteChromeBackgrounds.ts
|
|
16970
17568
|
const siteChromeBackgroundColorTokens = toSiteChromeBackgroundColorTokens(backgroundAppearanceColorTokenNames);
|
|
16971
17569
|
const quickSiteChromeBackgroundColorTokens = toSiteChromeBackgroundColorTokens(backgroundAppearanceQuickColorTokenNames);
|
|
@@ -17145,6 +17743,259 @@ z.object(headerPreferencesShape).omit({
|
|
|
17145
17743
|
structure: true
|
|
17146
17744
|
}).strict();
|
|
17147
17745
|
//#endregion
|
|
17746
|
+
//#region ../theme-core/src/navigation/presets.ts
|
|
17747
|
+
/**
|
|
17748
|
+
* Built-in nav link style presets
|
|
17749
|
+
*
|
|
17750
|
+
* Each preset uses composable effects to achieve its look.
|
|
17751
|
+
*/
|
|
17752
|
+
const NAV_LINK_PRESETS = {
|
|
17753
|
+
/**
|
|
17754
|
+
* Minimal - subtle color change on hover
|
|
17755
|
+
*/
|
|
17756
|
+
minimal: {
|
|
17757
|
+
name: "Minimal",
|
|
17758
|
+
typography: "body",
|
|
17759
|
+
fontWeight: "medium",
|
|
17760
|
+
textTransform: "none",
|
|
17761
|
+
italic: false,
|
|
17762
|
+
colorToken: "text",
|
|
17763
|
+
hoverColorToken: "primary",
|
|
17764
|
+
padding: "none",
|
|
17765
|
+
borderRadius: "none",
|
|
17766
|
+
effects: { hover: [{
|
|
17767
|
+
effectId: "text-color-change",
|
|
17768
|
+
options: { hoverColorToken: "primary" }
|
|
17769
|
+
}] }
|
|
17770
|
+
},
|
|
17771
|
+
/**
|
|
17772
|
+
* Underline - static underline appears on hover
|
|
17773
|
+
*/
|
|
17774
|
+
underline: {
|
|
17775
|
+
name: "Underline",
|
|
17776
|
+
typography: "body",
|
|
17777
|
+
fontWeight: "medium",
|
|
17778
|
+
textTransform: "none",
|
|
17779
|
+
italic: false,
|
|
17780
|
+
colorToken: "text",
|
|
17781
|
+
padding: "none",
|
|
17782
|
+
borderRadius: "none",
|
|
17783
|
+
effects: { hover: [{
|
|
17784
|
+
effectId: "nav-underline",
|
|
17785
|
+
options: { style: "static" }
|
|
17786
|
+
}] }
|
|
17787
|
+
},
|
|
17788
|
+
/**
|
|
17789
|
+
* Underline Grow - animated underline grows from center on hover
|
|
17790
|
+
*/
|
|
17791
|
+
"underline-grow": {
|
|
17792
|
+
name: "Underline Grow",
|
|
17793
|
+
typography: "body",
|
|
17794
|
+
fontWeight: "medium",
|
|
17795
|
+
textTransform: "none",
|
|
17796
|
+
italic: false,
|
|
17797
|
+
colorToken: "text",
|
|
17798
|
+
padding: "none",
|
|
17799
|
+
borderRadius: "none",
|
|
17800
|
+
effects: { hover: [{
|
|
17801
|
+
effectId: "nav-underline",
|
|
17802
|
+
options: { style: "grow" }
|
|
17803
|
+
}] }
|
|
17804
|
+
},
|
|
17805
|
+
/**
|
|
17806
|
+
* Capsule - pill-shaped background on hover
|
|
17807
|
+
*/
|
|
17808
|
+
capsule: {
|
|
17809
|
+
name: "Capsule",
|
|
17810
|
+
typography: "body",
|
|
17811
|
+
fontWeight: "medium",
|
|
17812
|
+
textTransform: "none",
|
|
17813
|
+
italic: false,
|
|
17814
|
+
colorToken: "text",
|
|
17815
|
+
padding: "compact",
|
|
17816
|
+
borderRadius: "full",
|
|
17817
|
+
effects: {
|
|
17818
|
+
hover: [{
|
|
17819
|
+
effectId: "background-on-hover-alpha",
|
|
17820
|
+
options: {
|
|
17821
|
+
colorToken: "primary",
|
|
17822
|
+
opacity: 10
|
|
17823
|
+
}
|
|
17824
|
+
}],
|
|
17825
|
+
active: [{
|
|
17826
|
+
effectId: "background-on-hover-alpha",
|
|
17827
|
+
options: {
|
|
17828
|
+
colorToken: "primary",
|
|
17829
|
+
opacity: 15
|
|
17830
|
+
}
|
|
17831
|
+
}]
|
|
17832
|
+
}
|
|
17833
|
+
},
|
|
17834
|
+
/**
|
|
17835
|
+
* Solid - solid background color on hover
|
|
17836
|
+
*/
|
|
17837
|
+
solid: {
|
|
17838
|
+
name: "Solid",
|
|
17839
|
+
typography: "body",
|
|
17840
|
+
fontWeight: "medium",
|
|
17841
|
+
textTransform: "none",
|
|
17842
|
+
italic: false,
|
|
17843
|
+
colorToken: "text",
|
|
17844
|
+
padding: "compact",
|
|
17845
|
+
borderRadius: "none",
|
|
17846
|
+
effects: {
|
|
17847
|
+
hover: [{
|
|
17848
|
+
effectId: "background-on-hover",
|
|
17849
|
+
options: {
|
|
17850
|
+
colorToken: "primary",
|
|
17851
|
+
textColorToken: "primaryForeground"
|
|
17852
|
+
}
|
|
17853
|
+
}],
|
|
17854
|
+
active: [{
|
|
17855
|
+
effectId: "background-on-hover",
|
|
17856
|
+
options: {
|
|
17857
|
+
colorToken: "primary",
|
|
17858
|
+
textColorToken: "primaryForeground"
|
|
17859
|
+
}
|
|
17860
|
+
}]
|
|
17861
|
+
}
|
|
17862
|
+
},
|
|
17863
|
+
/**
|
|
17864
|
+
* Scale - gentle scale-up on hover
|
|
17865
|
+
*/
|
|
17866
|
+
scale: {
|
|
17867
|
+
name: "Scale",
|
|
17868
|
+
typography: "body",
|
|
17869
|
+
fontWeight: "medium",
|
|
17870
|
+
textTransform: "none",
|
|
17871
|
+
italic: false,
|
|
17872
|
+
colorToken: "text",
|
|
17873
|
+
padding: "none",
|
|
17874
|
+
borderRadius: "none",
|
|
17875
|
+
effects: { hover: [{
|
|
17876
|
+
effectId: "scale-up",
|
|
17877
|
+
options: { scale: 1.05 }
|
|
17878
|
+
}] }
|
|
17879
|
+
},
|
|
17880
|
+
/**
|
|
17881
|
+
* Frosted - semi-transparent glass-like background
|
|
17882
|
+
*/
|
|
17883
|
+
frosted: {
|
|
17884
|
+
name: "Frosted",
|
|
17885
|
+
typography: "body",
|
|
17886
|
+
fontWeight: "medium",
|
|
17887
|
+
textTransform: "none",
|
|
17888
|
+
italic: false,
|
|
17889
|
+
colorToken: "text",
|
|
17890
|
+
padding: "compact",
|
|
17891
|
+
borderRadius: "md",
|
|
17892
|
+
effects: {
|
|
17893
|
+
base: [{ effectId: "nav-frosted-base" }],
|
|
17894
|
+
hover: [{ effectId: "nav-frosted-hover" }],
|
|
17895
|
+
active: [{ effectId: "nav-frosted-active" }]
|
|
17896
|
+
}
|
|
17897
|
+
}
|
|
17898
|
+
};
|
|
17899
|
+
/**
|
|
17900
|
+
* Get a nav link style preset by ID
|
|
17901
|
+
*/
|
|
17902
|
+
function getNavLinkPreset(presetId) {
|
|
17903
|
+
return NAV_LINK_PRESETS[presetId];
|
|
17904
|
+
}
|
|
17905
|
+
Object.keys(NAV_LINK_PRESETS);
|
|
17906
|
+
//#endregion
|
|
17907
|
+
//#region ../theme-core/src/header/legacyNavLinkStyle.ts
|
|
17908
|
+
function buildLegacyHeaderNavLinkStyle(header, contrastTreatment, navTextSize) {
|
|
17909
|
+
const navStyle = header.navStyle ?? "minimal";
|
|
17910
|
+
const basePreset = getNavLinkPreset(navStyle);
|
|
17911
|
+
if (!basePreset) return null;
|
|
17912
|
+
const style = {
|
|
17913
|
+
...basePreset,
|
|
17914
|
+
fontWeight: header.navWeight ?? basePreset.fontWeight,
|
|
17915
|
+
colorToken: (header.navColor ?? header.textColor)?.trim() || basePreset.colorToken,
|
|
17916
|
+
...contrastTreatment ? { contrastTreatment } : {},
|
|
17917
|
+
...navTextSize ? { textSize: navTextSize } : {}
|
|
17918
|
+
};
|
|
17919
|
+
if (header.navWeight === "bold" && navStyle === "solid") style.textTransform = "uppercase";
|
|
17920
|
+
applyLegacyGlassTreatment(style, header, navStyle);
|
|
17921
|
+
return style;
|
|
17922
|
+
}
|
|
17923
|
+
function applyLegacyGlassTreatment(style, header, navStyle) {
|
|
17924
|
+
if (header.navContainer?.type !== "glass" || navStyle !== "minimal") return;
|
|
17925
|
+
style.borderRadius = "full";
|
|
17926
|
+
style.effects = {
|
|
17927
|
+
...style.effects,
|
|
17928
|
+
hover: glassStateEffects(10),
|
|
17929
|
+
active: glassStateEffects(18)
|
|
17930
|
+
};
|
|
17931
|
+
}
|
|
17932
|
+
function glassStateEffects(opacity) {
|
|
17933
|
+
return [{
|
|
17934
|
+
effectId: "background-on-hover-alpha",
|
|
17935
|
+
options: {
|
|
17936
|
+
colorToken: "neutral-50",
|
|
17937
|
+
opacity
|
|
17938
|
+
}
|
|
17939
|
+
}, {
|
|
17940
|
+
effectId: "text-color-change",
|
|
17941
|
+
options: { hoverColorToken: "neutral-50" }
|
|
17942
|
+
}];
|
|
17943
|
+
}
|
|
17944
|
+
//#endregion
|
|
17945
|
+
//#region ../theme-core/src/header/openingForegroundProjection.ts
|
|
17946
|
+
function readOpeningForegroundProjection(header) {
|
|
17947
|
+
return header?.__runtimeOpeningForeground ?? null;
|
|
17948
|
+
}
|
|
17949
|
+
//#endregion
|
|
17950
|
+
//#region ../theme-core/src/header/effectiveNavLinkStyle.ts
|
|
17951
|
+
function effectiveHeaderNavLinkStyle(header, contrastTreatment = null, navTextSize = null) {
|
|
17952
|
+
if (!header) return null;
|
|
17953
|
+
if (!header.navLinkStyle) return buildLegacyHeaderNavLinkStyle(header, contrastTreatment, navTextSize);
|
|
17954
|
+
return {
|
|
17955
|
+
...header.navLinkStyle,
|
|
17956
|
+
...contrastTreatment ? { contrastTreatment } : {},
|
|
17957
|
+
...navTextSize ? { textSize: navTextSize } : {}
|
|
17958
|
+
};
|
|
17959
|
+
}
|
|
17960
|
+
function headerForegroundCandidates(header) {
|
|
17961
|
+
if (!header) return {};
|
|
17962
|
+
const style = effectiveHeaderNavLinkStyle(header);
|
|
17963
|
+
return {
|
|
17964
|
+
text: header.textColor ?? header.background?.textColor,
|
|
17965
|
+
link: style?.colorToken ?? header.navColor ?? header.textColor,
|
|
17966
|
+
linkHover: navLinkHoverColorCandidate(style)
|
|
17967
|
+
};
|
|
17968
|
+
}
|
|
17969
|
+
function headerLeafTextColor(header) {
|
|
17970
|
+
if (!header) return "text";
|
|
17971
|
+
return header.textColor ?? header.navColor ?? header.background?.textColor ?? header.navLinkStyle?.colorToken ?? "text";
|
|
17972
|
+
}
|
|
17973
|
+
/** Transparent chrome must reset the whole contract on its own root. */
|
|
17974
|
+
function transparentHeaderForegroundInput(header, palette) {
|
|
17975
|
+
const projection = readOpeningForegroundProjection(header);
|
|
17976
|
+
if (projection?.kind === "known") return surfaceForegroundInputFromResolved(projection, rgbColorValue);
|
|
17977
|
+
return authoredTransparentHeaderForegroundInput(header, palette);
|
|
17978
|
+
}
|
|
17979
|
+
function authoredTransparentHeaderForegroundInput(header, palette) {
|
|
17980
|
+
const text = headerLeafTextColor(header);
|
|
17981
|
+
const style = effectiveHeaderNavLinkStyle(header);
|
|
17982
|
+
const link = style?.colorToken ?? text;
|
|
17983
|
+
const restingToken = parseThemeColorToken(link) ?? parseThemeColorToken("text");
|
|
17984
|
+
if (!restingToken) throw new Error("Built-in text colour token is invalid");
|
|
17985
|
+
const hover = planForegroundHover({
|
|
17986
|
+
restingToken,
|
|
17987
|
+
candidate: navLinkOwnsHoverForeground(style) ? null : navLinkHoverColorCandidate(style),
|
|
17988
|
+
palette,
|
|
17989
|
+
backdrops: null
|
|
17990
|
+
});
|
|
17991
|
+
return {
|
|
17992
|
+
text: rgbColorValue(text),
|
|
17993
|
+
link: rgbColorValue(link),
|
|
17994
|
+
linkHover: rgbColorValue(hover.token),
|
|
17995
|
+
hoverDecoration: navLinkOwnsUnderline(style) ? "initial" : hover.decoration
|
|
17996
|
+
};
|
|
17997
|
+
}
|
|
17998
|
+
//#endregion
|
|
17148
17999
|
//#region ../theme-core/src/site-styles/pageDesignAuthority.ts
|
|
17149
18000
|
const nonEmptyStringSchema = z.string().min(1);
|
|
17150
18001
|
const blockContentVersionIdSchema = nonEmptyStringSchema.transform(asBlockContentVersionId);
|
|
@@ -17297,6 +18148,28 @@ z.object({
|
|
|
17297
18148
|
motion: z.enum(themeTokenRecipeOptions.motion)
|
|
17298
18149
|
});
|
|
17299
18150
|
//#endregion
|
|
18151
|
+
//#region ../theme-core/src/footer/effectiveNavLinkStyle.ts
|
|
18152
|
+
function effectiveFooterNavLinkStyle(footer) {
|
|
18153
|
+
if (!footer) return null;
|
|
18154
|
+
if (footer.navLinkStyle) return footer.navLinkStyle;
|
|
18155
|
+
const basePreset = getNavLinkPreset(footer.navStyle ?? "minimal");
|
|
18156
|
+
if (!basePreset) return null;
|
|
18157
|
+
return {
|
|
18158
|
+
...basePreset,
|
|
18159
|
+
fontWeight: footer.navWeight ?? basePreset.fontWeight,
|
|
18160
|
+
colorToken: footer.navColor?.trim() || basePreset.colorToken
|
|
18161
|
+
};
|
|
18162
|
+
}
|
|
18163
|
+
function footerForegroundCandidates(footer, proseHoverCandidate) {
|
|
18164
|
+
if (!footer) return {};
|
|
18165
|
+
const style = effectiveFooterNavLinkStyle(footer);
|
|
18166
|
+
return {
|
|
18167
|
+
text: footer.background?.textColor,
|
|
18168
|
+
link: style?.colorToken ?? footer.navColor ?? footer.background?.textColor,
|
|
18169
|
+
linkHover: navLinkOwnsHoverForeground(style) ? proseHoverCandidate : navLinkHoverColorCandidate(style)
|
|
18170
|
+
};
|
|
18171
|
+
}
|
|
18172
|
+
//#endregion
|
|
17300
18173
|
//#region ../theme-core/src/siteChromeOverlayClearance.ts
|
|
17301
18174
|
const SITE_CHROME_VISIBLE_HEADER_ATTR = "data-site-chrome-visible-header";
|
|
17302
18175
|
//#endregion
|
|
@@ -20070,33 +20943,28 @@ function resolveBackgroundColorValue(value, context) {
|
|
|
20070
20943
|
//#endregion
|
|
20071
20944
|
//#region ../blocks/src/system/transforms/registry/_utils/surfaceForegroundStyles.ts
|
|
20072
20945
|
const contextualButtonStylesCache = /* @__PURE__ */ new WeakMap();
|
|
20073
|
-
function resolveHeaderLeafTextColor(header) {
|
|
20074
|
-
return header?.textColor ?? header?.navColor ?? header?.background?.textColor ?? header?.navLinkStyle?.colorToken ?? "text";
|
|
20075
|
-
}
|
|
20076
20946
|
function resolveHeaderRootForeground(header, palette, isTransparent) {
|
|
20077
|
-
if (isTransparent) return { kind: "unknown" };
|
|
20947
|
+
if (isTransparent) return readOpeningForegroundProjection(header) ?? { kind: "unknown" };
|
|
20078
20948
|
const background = header?.background;
|
|
20079
20949
|
return resolveSurfaceForeground(background ?? {
|
|
20080
20950
|
type: "color",
|
|
20081
20951
|
color: "surface"
|
|
20082
|
-
}, palette,
|
|
20083
|
-
|
|
20084
|
-
|
|
20085
|
-
|
|
20952
|
+
}, palette, headerForegroundCandidates(header));
|
|
20953
|
+
}
|
|
20954
|
+
function resolveFooterRootForeground(footer, palette, proseHoverCandidate) {
|
|
20955
|
+
return resolveSurfaceForeground(footer?.background ?? {
|
|
20956
|
+
type: "color",
|
|
20957
|
+
color: "surface"
|
|
20958
|
+
}, palette, footerForegroundCandidates(footer, proseHoverCandidate), { compositeBase: "background" });
|
|
20086
20959
|
}
|
|
20087
20960
|
function resolveSurfaceForegroundStyles(value, context, options) {
|
|
20088
20961
|
const input = parseBackgroundContent(value);
|
|
20089
|
-
const foreground = input ? resolveSurfaceForeground(input, context.theme.palette, {}, { compositeBase: options?.fallbackToken }) : { kind: "unknown" };
|
|
20962
|
+
const foreground = input ? resolveSurfaceForeground(input, context.theme.palette, { linkHover: context.proseHoverCandidate }, { compositeBase: options?.fallbackToken }) : { kind: "unknown" };
|
|
20090
20963
|
const buttonStyles = resolveContextualButtonStyles(input, foreground, context, options);
|
|
20091
20964
|
if (foreground.kind === "unknown") return buttonStyles;
|
|
20092
20965
|
return {
|
|
20093
20966
|
...buttonStyles,
|
|
20094
|
-
...surfaceForegroundStyle(
|
|
20095
|
-
text: resolveBackgroundColorValue(foreground.roles.text, context),
|
|
20096
|
-
heading: resolveBackgroundColorValue(foreground.roles.heading, context),
|
|
20097
|
-
link: resolveBackgroundColorValue(foreground.roles.link, context),
|
|
20098
|
-
supporting: resolveBackgroundColorValue(foreground.roles.supporting, context)
|
|
20099
|
-
})
|
|
20967
|
+
...surfaceForegroundStyle(surfaceForegroundInputFromResolved(foreground, (token) => resolveBackgroundColorValue(token, context)))
|
|
20100
20968
|
};
|
|
20101
20969
|
}
|
|
20102
20970
|
function resolveContextualButtonStyles(background, foreground, context, options) {
|
|
@@ -25912,10 +26780,7 @@ function resolveBackgroundVisualStyles(backgroundColor, defaultToken = "surface"
|
|
|
25912
26780
|
};
|
|
25913
26781
|
}
|
|
25914
26782
|
function resolveHeaderVisualStyles(header) {
|
|
25915
|
-
|
|
25916
|
-
const hasContainedNav = navContainerType === "glass" || navContainerType === "pill";
|
|
25917
|
-
const hasOverlayVariant = header?.variant === "floating";
|
|
25918
|
-
if (hasContainedNav || hasOverlayVariant) return {
|
|
26783
|
+
if (headerRootPaint(header) !== "own-surface") return {
|
|
25919
26784
|
backgroundToken: "transparent",
|
|
25920
26785
|
isTransparent: true
|
|
25921
26786
|
};
|
|
@@ -25926,23 +26791,7 @@ function resolveHeaderVisualStyles(header) {
|
|
|
25926
26791
|
}
|
|
25927
26792
|
function resolvedForegroundStyle(foreground) {
|
|
25928
26793
|
if (foreground.kind === "unknown") return void 0;
|
|
25929
|
-
|
|
25930
|
-
return surfaceForegroundStyle({
|
|
25931
|
-
text: rgbColorValue(roles.text),
|
|
25932
|
-
heading: rgbColorValue(roles.heading),
|
|
25933
|
-
link: rgbColorValue(roles.link),
|
|
25934
|
-
supporting: rgbColorValue(roles.supporting)
|
|
25935
|
-
});
|
|
25936
|
-
}
|
|
25937
|
-
function resolveFooterRootForeground(footer, palette) {
|
|
25938
|
-
const background = footer?.background;
|
|
25939
|
-
return resolveSurfaceForeground(background ?? {
|
|
25940
|
-
type: "color",
|
|
25941
|
-
color: "surface"
|
|
25942
|
-
}, palette, {
|
|
25943
|
-
text: background?.textColor,
|
|
25944
|
-
link: footer?.navLinkStyle?.colorToken ?? footer?.navColor ?? background?.textColor
|
|
25945
|
-
});
|
|
26794
|
+
return surfaceForegroundStyle(surfaceForegroundInputFromResolved(foreground, rgbColorValue));
|
|
25946
26795
|
}
|
|
25947
26796
|
function footerBottomBarBorderWidthStyle(width) {
|
|
25948
26797
|
if (!width) return void 0;
|
|
@@ -25969,8 +26818,7 @@ const headerRootClassTransform = {
|
|
|
25969
26818
|
const placement = planSiteChromePlacement(parseHeaderPositioning(content.positioning));
|
|
25970
26819
|
const header = asPartialObject(value);
|
|
25971
26820
|
const visuals = resolveHeaderVisualStyles(header);
|
|
25972
|
-
const
|
|
25973
|
-
const hasContainedNav = navContainerType === "glass" || navContainerType === "pill";
|
|
26821
|
+
const hasContainedNav = headerRootPaint(header) === "contained-nav";
|
|
25974
26822
|
const backgroundClass = visuals.isTransparent || hasContainedNav ? "rb-bg-transparent" : null;
|
|
25975
26823
|
const classes = [config.base, backgroundClass];
|
|
25976
26824
|
if (!hasContainedNav) {
|
|
@@ -26013,7 +26861,7 @@ const headerRootStyleTransform = {
|
|
|
26013
26861
|
run: (value, _options, context) => {
|
|
26014
26862
|
const header = asPartialObject(value);
|
|
26015
26863
|
const visuals = resolveHeaderVisualStyles(header);
|
|
26016
|
-
return mergeStyles(resolvedForegroundStyle(resolveHeaderRootForeground(header, context.theme.palette, visuals.isTransparent)) ?? { color: rgbColorValue(
|
|
26864
|
+
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"));
|
|
26017
26865
|
}
|
|
26018
26866
|
};
|
|
26019
26867
|
const headerSectionBackgroundTransform = {
|
|
@@ -26021,9 +26869,7 @@ const headerSectionBackgroundTransform = {
|
|
|
26021
26869
|
kind: "string",
|
|
26022
26870
|
summary: "Resolve the inner site-header section background token",
|
|
26023
26871
|
run: (value) => {
|
|
26024
|
-
|
|
26025
|
-
const navContainerType = header?.navContainer?.type ?? "none";
|
|
26026
|
-
return header?.variant === "floating" || navContainerType === "glass" || navContainerType === "pill" ? "raw:transparent" : "background";
|
|
26872
|
+
return headerRootPaint(asPartialObject(value)) !== "own-surface" ? "raw:transparent" : "background";
|
|
26027
26873
|
}
|
|
26028
26874
|
};
|
|
26029
26875
|
const footerRootStyleTransform = {
|
|
@@ -26041,7 +26887,7 @@ const footerRootStyleTransform = {
|
|
|
26041
26887
|
styleParts.push(backgroundColorStyle(token));
|
|
26042
26888
|
}
|
|
26043
26889
|
}
|
|
26044
|
-
styleParts.push(resolvedForegroundStyle(resolveFooterRootForeground(footer, context.theme.palette)));
|
|
26890
|
+
styleParts.push(resolvedForegroundStyle(resolveFooterRootForeground(footer, context.theme.palette, context.proseHoverCandidate)));
|
|
26045
26891
|
styleParts.push(borderColorStyle("border"));
|
|
26046
26892
|
return mergeStyles(...styleParts);
|
|
26047
26893
|
}
|
|
@@ -26103,22 +26949,28 @@ const footerBottomBarStyleTransform = {
|
|
|
26103
26949
|
run: (value, _options, context) => {
|
|
26104
26950
|
const footer = asPartialObject(value);
|
|
26105
26951
|
const bottomBar = footer?.bottomBar;
|
|
26106
|
-
|
|
26107
|
-
const background = bottomBar?.background;
|
|
26108
|
-
if (background?.type === "color") styleParts.push(backgroundColorStyle(background.color ?? "surface"));
|
|
26109
|
-
styleParts.push(borderColorStyle(bottomBar?.borderTop?.colorToken ?? "border"), footerBottomBarBorderWidthStyle(bottomBar?.borderTop?.width));
|
|
26110
|
-
const foreground = resolveSurfaceForeground(background?.type === "color" ? background : {
|
|
26111
|
-
type: "color",
|
|
26112
|
-
color: "transparent"
|
|
26113
|
-
}, context.theme.palette, {
|
|
26114
|
-
text: bottomBar?.textColor,
|
|
26115
|
-
link: footer?.bottomTextLinkStyle?.colorToken ?? bottomBar?.textColor
|
|
26116
|
-
});
|
|
26117
|
-
if (background?.type === "color") styleParts.push(resolvedForegroundStyle(foreground));
|
|
26118
|
-
else if (bottomBar?.textColor) styleParts.push(textColorStyle(bottomBar.textColor));
|
|
26119
|
-
return mergeStyles(...styleParts);
|
|
26952
|
+
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));
|
|
26120
26953
|
}
|
|
26121
26954
|
};
|
|
26955
|
+
function footerBottomBarForegroundStyle(footer, palette) {
|
|
26956
|
+
if (!footer?.bottomBar) return void 0;
|
|
26957
|
+
const bar = footer.bottomBar;
|
|
26958
|
+
if (bar.background?.type !== "color") return backgroundlessBottomBarForegroundStyle(footer);
|
|
26959
|
+
return resolvedForegroundStyle(resolveSurfaceForeground(bar.background, palette, {
|
|
26960
|
+
text: bar.textColor,
|
|
26961
|
+
link: footer.bottomTextLinkStyle?.colorToken ?? bar.textColor,
|
|
26962
|
+
linkHover: footer.bottomTextLinkStyle?.hoverColorToken
|
|
26963
|
+
}, { compositeBase: measuredFooterBackdrop(footer, palette) }));
|
|
26964
|
+
}
|
|
26965
|
+
function backgroundlessBottomBarForegroundStyle(footer) {
|
|
26966
|
+
if (footer.background?.contentOwner === "site-chrome-editor") return;
|
|
26967
|
+
const textColor = footer.bottomBar?.textColor;
|
|
26968
|
+
return textColor ? textColorStyle(textColor) : void 0;
|
|
26969
|
+
}
|
|
26970
|
+
function measuredFooterBackdrop(footer, palette) {
|
|
26971
|
+
const foreground = resolveFooterRootForeground(footer, palette);
|
|
26972
|
+
return foreground.kind === "known" && foreground.provenance.kind === "measured" ? foreground.provenance.backdropHex : null;
|
|
26973
|
+
}
|
|
26122
26974
|
const footerSplitMainClassTransform = {
|
|
26123
26975
|
id: "layout.footerSplitMainClass",
|
|
26124
26976
|
kind: "string",
|
|
@@ -26214,7 +27066,7 @@ function chromeSurfaceTextToken(surface, theme, palette) {
|
|
|
26214
27066
|
case "header-root": {
|
|
26215
27067
|
const header = theme.header;
|
|
26216
27068
|
const foreground = resolveHeaderRootForeground(header, palette, resolveHeaderVisualStyles(header).isTransparent);
|
|
26217
|
-
return foreground.kind === "known" ? foreground.roles.text :
|
|
27069
|
+
return foreground.kind === "known" ? foreground.roles.text : headerLeafTextColor(header);
|
|
26218
27070
|
}
|
|
26219
27071
|
case "header-mobile-panel": return theme.header?.dropdownStyle?.textColor ?? "text";
|
|
26220
27072
|
case "footer-root": {
|
|
@@ -26790,13 +27642,13 @@ const hours = stack({
|
|
|
26790
27642
|
as: "p",
|
|
26791
27643
|
className: "rb-caption rb-opacity-70"
|
|
26792
27644
|
}, bind("module.timeZone"), when("module.timeZone"))], when("module.kind", { equals: "opening-hours" }));
|
|
26793
|
-
const socials = inline({ className: "rb-
|
|
27645
|
+
const socials = inline({ className: "rb-footer-socials" }, [link({
|
|
26794
27646
|
href: { $bind: { from: "social.href" } },
|
|
26795
27647
|
target: "_blank",
|
|
26796
27648
|
rel: "noreferrer noopener",
|
|
26797
27649
|
"aria-label": { $bind: { from: "social.label" } },
|
|
26798
|
-
className: "rb-nav-text transition-theme-standard"
|
|
26799
|
-
}, [icon({ className: "rb-
|
|
27650
|
+
className: "rb-footer-social-link rb-nav-text transition-theme-standard"
|
|
27651
|
+
}, [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" }));
|
|
26800
27652
|
const authoredCopy = richText({
|
|
26801
27653
|
className: "rb-prose rb-prose-sm rb-max-w-none",
|
|
26802
27654
|
style: textColorStyle("text/80")
|
|
@@ -28293,7 +29145,9 @@ const bookingWizard = bookingForm(withApiBindings({
|
|
|
28293
29145
|
} },
|
|
28294
29146
|
formId: { $bind: { from: "content.formId" } },
|
|
28295
29147
|
form: { $bind: { from: "data.form" } },
|
|
28296
|
-
services: { $bind: { from: "data.services" } }
|
|
29148
|
+
services: { $bind: { from: "data.services" } },
|
|
29149
|
+
mailingList: { $bind: { from: "$root.mailingList" } },
|
|
29150
|
+
siteName: { $bind: { from: "$root.siteName" } }
|
|
28297
29151
|
}));
|
|
28298
29152
|
/** Both variants sit in the same section shell; only the inner layout differs. */
|
|
28299
29153
|
function bookingSection(children) {
|
|
@@ -29209,7 +30063,13 @@ const eventRegistrationHydrationSchemaShape = {
|
|
|
29209
30063
|
spamProtectionEnabled: z.boolean().optional(),
|
|
29210
30064
|
supportEmail: z.string().optional(),
|
|
29211
30065
|
sitePasses: publicPassProductCollectionSchema.nullable().optional(),
|
|
29212
|
-
siteMemberships: publicMembershipProductCollectionSchema.nullable().optional()
|
|
30066
|
+
siteMemberships: publicMembershipProductCollectionSchema.nullable().optional(),
|
|
30067
|
+
mailingList: z.unknown().transform((value) => {
|
|
30068
|
+
if (value === void 0) return void 0;
|
|
30069
|
+
const parsed = parseMailingListRuntimeContext(value);
|
|
30070
|
+
return parsed.ok ? parsed.value : void 0;
|
|
30071
|
+
}),
|
|
30072
|
+
siteName: z.string().optional()
|
|
29213
30073
|
};
|
|
29214
30074
|
const eventRegistrationEventSourceSchema = z.discriminatedUnion("kind", [z.object({
|
|
29215
30075
|
kind: z.literal("loaded"),
|
|
@@ -29381,7 +30241,9 @@ const eventRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
|
|
|
29381
30241
|
spamProtectionEnabled: source.spamProtectionEnabled,
|
|
29382
30242
|
supportEmail: source.supportEmail,
|
|
29383
30243
|
sitePasses: source.sitePasses ?? null,
|
|
29384
|
-
siteMemberships: source.siteMemberships ?? null
|
|
30244
|
+
siteMemberships: source.siteMemberships ?? null,
|
|
30245
|
+
mailingList: source.mailingList,
|
|
30246
|
+
siteName: source.siteName
|
|
29385
30247
|
}
|
|
29386
30248
|
};
|
|
29387
30249
|
}
|
|
@@ -29549,6 +30411,8 @@ const eventRegistrationBlockDefinition = {
|
|
|
29549
30411
|
events: { $bind: { from: "data.events" } },
|
|
29550
30412
|
wholeSeriesRunEvents: { $bind: { from: "data.wholeSeriesRunEvents" } },
|
|
29551
30413
|
loaderFailures: { $bind: { from: "$root.loaderFailures" } },
|
|
30414
|
+
mailingList: { $bind: { from: "$root.mailingList" } },
|
|
30415
|
+
siteName: { $bind: { from: "$root.siteName" } },
|
|
29552
30416
|
sitePasses: { $bind: { from: "data.sitePasses" } },
|
|
29553
30417
|
siteMemberships: { $bind: { from: "data.siteMemberships" } },
|
|
29554
30418
|
stage: { $bind: {
|
|
@@ -36308,6 +37172,11 @@ const mailingListContentVersionIdSchema = z.string().transform((value, ctx) => {
|
|
|
36308
37172
|
});
|
|
36309
37173
|
return z.NEVER;
|
|
36310
37174
|
});
|
|
37175
|
+
const mailingListSignupBlockSourceRefSchema = z.object({
|
|
37176
|
+
tag: z.literal("block_ref"),
|
|
37177
|
+
blockId: mailingListSignupBlockIdSchema,
|
|
37178
|
+
contentVersionId: mailingListContentVersionIdSchema
|
|
37179
|
+
});
|
|
36311
37180
|
const signedMailingListSourceTokenSchema = z.string().trim().min(1).transform(parseRequiredMailingListSignedSourceToken);
|
|
36312
37181
|
const newsletterSourceCommonSchema = z.object({
|
|
36313
37182
|
siteId: z.string().optional(),
|
|
@@ -36322,7 +37191,15 @@ const newsletterSourceSchema = z.discriminatedUnion("source", [
|
|
|
36322
37191
|
newsletterSourceCommonSchema.extend({
|
|
36323
37192
|
source: z.literal("block"),
|
|
36324
37193
|
blockId: z.string().nullable().optional(),
|
|
36325
|
-
|
|
37194
|
+
newsletterBlockSubmission: z.discriminatedUnion("tag", [
|
|
37195
|
+
z.object({
|
|
37196
|
+
tag: z.literal("ready"),
|
|
37197
|
+
sourceRef: mailingListSignupBlockSourceRefSchema
|
|
37198
|
+
}),
|
|
37199
|
+
z.object({ tag: z.literal("unpublished-form") }),
|
|
37200
|
+
z.object({ tag: z.literal("unpublished-settings") }),
|
|
37201
|
+
z.object({ tag: z.literal("unavailable") })
|
|
37202
|
+
])
|
|
36326
37203
|
}),
|
|
36327
37204
|
newsletterSourceCommonSchema.extend({
|
|
36328
37205
|
source: z.literal("signed-footer"),
|
|
@@ -36351,11 +37228,7 @@ const newsletterHydrationSchema = z.object({
|
|
|
36351
37228
|
target: z.discriminatedUnion("tag", [
|
|
36352
37229
|
z.object({
|
|
36353
37230
|
tag: z.literal("block-source"),
|
|
36354
|
-
sourceRef:
|
|
36355
|
-
tag: z.literal("block_ref"),
|
|
36356
|
-
blockId: mailingListSignupBlockIdSchema,
|
|
36357
|
-
contentVersionId: mailingListContentVersionIdSchema
|
|
36358
|
-
}).nullable()
|
|
37231
|
+
sourceRef: mailingListSignupBlockSourceRefSchema.nullable()
|
|
36359
37232
|
}),
|
|
36360
37233
|
z.object({
|
|
36361
37234
|
tag: z.literal("signed-footer-source"),
|
|
@@ -36364,7 +37237,11 @@ const newsletterHydrationSchema = z.object({
|
|
|
36364
37237
|
token: signedMailingListSourceTokenSchema
|
|
36365
37238
|
})
|
|
36366
37239
|
}),
|
|
36367
|
-
z.object({ tag: z.literal("preview") })
|
|
37240
|
+
z.object({ tag: z.literal("preview") }),
|
|
37241
|
+
z.object({
|
|
37242
|
+
tag: z.literal("unpublished-preview"),
|
|
37243
|
+
reason: z.enum(["unpublished-form", "unpublished-settings"])
|
|
37244
|
+
})
|
|
36368
37245
|
]),
|
|
36369
37246
|
setupRevision: z.number().int().positive().nullable(),
|
|
36370
37247
|
choiceProvider: z.enum([
|
|
@@ -36433,16 +37310,21 @@ const newsletterFormBlockRuntime = defineProgressiveBlockRuntime({
|
|
|
36433
37310
|
});
|
|
36434
37311
|
function projectNewsletterFormHydrationTarget(source) {
|
|
36435
37312
|
switch (source.source) {
|
|
36436
|
-
case "block": {
|
|
36437
|
-
|
|
36438
|
-
|
|
37313
|
+
case "block": switch (source.newsletterBlockSubmission.tag) {
|
|
37314
|
+
case "unpublished-form":
|
|
37315
|
+
case "unpublished-settings": return {
|
|
37316
|
+
tag: "unpublished-preview",
|
|
37317
|
+
reason: source.newsletterBlockSubmission.tag
|
|
37318
|
+
};
|
|
37319
|
+
case "ready": return {
|
|
36439
37320
|
tag: "block-source",
|
|
36440
|
-
sourceRef
|
|
37321
|
+
sourceRef: source.newsletterBlockSubmission.sourceRef
|
|
36441
37322
|
};
|
|
36442
|
-
return {
|
|
37323
|
+
case "unavailable": return {
|
|
36443
37324
|
tag: "block-source",
|
|
36444
37325
|
sourceRef: null
|
|
36445
37326
|
};
|
|
37327
|
+
default: return assertNever$3(source.newsletterBlockSubmission);
|
|
36446
37328
|
}
|
|
36447
37329
|
case "signed-footer": return {
|
|
36448
37330
|
tag: "signed-footer-source",
|
|
@@ -36547,65 +37429,67 @@ const editorialSplitLayout = styledSection({
|
|
|
36547
37429
|
spacing: "comfortable",
|
|
36548
37430
|
background: "surface"
|
|
36549
37431
|
});
|
|
36550
|
-
const
|
|
36551
|
-
|
|
36552
|
-
|
|
36553
|
-
|
|
36554
|
-
|
|
36555
|
-
|
|
36556
|
-
|
|
36557
|
-
|
|
36558
|
-
|
|
36559
|
-
|
|
36560
|
-
|
|
36561
|
-
|
|
36562
|
-
|
|
36563
|
-
|
|
36564
|
-
|
|
36565
|
-
|
|
36566
|
-
|
|
36567
|
-
|
|
36568
|
-
|
|
36569
|
-
|
|
36570
|
-
|
|
36571
|
-
|
|
36572
|
-
|
|
36573
|
-
|
|
36574
|
-
|
|
36575
|
-
description: "Vertical layout with fields stacked"
|
|
36576
|
-
},
|
|
36577
|
-
inline: {
|
|
36578
|
-
label: "Inline",
|
|
36579
|
-
description: "Horizontal layout (email + button side by side)"
|
|
36580
|
-
},
|
|
36581
|
-
"editorial-split": {
|
|
36582
|
-
label: "Editorial split",
|
|
36583
|
-
description: "Copy and form in balanced side-by-side columns, stacked on mobile."
|
|
36584
|
-
}
|
|
36585
|
-
},
|
|
36586
|
-
styleTokens: {
|
|
36587
|
-
background: "surface",
|
|
36588
|
-
typography: "body",
|
|
36589
|
-
spacing: "md"
|
|
37432
|
+
const newsletterSignupManifest = createBlockManifest({
|
|
37433
|
+
id: "block.newsletter-signup",
|
|
37434
|
+
title: "Newsletter Signup",
|
|
37435
|
+
titleSource: "title",
|
|
37436
|
+
description: "Newsletter subscription form with configurable field presets.",
|
|
37437
|
+
category: "interactive",
|
|
37438
|
+
contentSource: { kind: "inline" },
|
|
37439
|
+
fragments: [{
|
|
37440
|
+
fragment: newsletterCopyFragment,
|
|
37441
|
+
fieldPriority: 0
|
|
37442
|
+
}, {
|
|
37443
|
+
fragment: newsletterFormFragment,
|
|
37444
|
+
fieldPriority: 1
|
|
37445
|
+
}],
|
|
37446
|
+
layout: stackedLayout,
|
|
37447
|
+
variants: {
|
|
37448
|
+
stacked: stackedLayout,
|
|
37449
|
+
inline: inlineLayout,
|
|
37450
|
+
"editorial-split": editorialSplitLayout
|
|
37451
|
+
},
|
|
37452
|
+
defaultVariant: "stacked",
|
|
37453
|
+
variantOptions: {
|
|
37454
|
+
stacked: {
|
|
37455
|
+
label: "Stacked",
|
|
37456
|
+
description: "Vertical layout with fields stacked"
|
|
36590
37457
|
},
|
|
36591
|
-
|
|
36592
|
-
|
|
36593
|
-
|
|
36594
|
-
animation: false,
|
|
36595
|
-
paletteHidden: false
|
|
37458
|
+
inline: {
|
|
37459
|
+
label: "Inline",
|
|
37460
|
+
description: "Horizontal layout (email + button side by side)"
|
|
36596
37461
|
},
|
|
36597
|
-
|
|
36598
|
-
"
|
|
36599
|
-
"
|
|
36600
|
-
|
|
36601
|
-
|
|
36602
|
-
|
|
36603
|
-
|
|
36604
|
-
|
|
36605
|
-
|
|
36606
|
-
|
|
36607
|
-
|
|
36608
|
-
|
|
37462
|
+
"editorial-split": {
|
|
37463
|
+
label: "Editorial split",
|
|
37464
|
+
description: "Copy and form in balanced side-by-side columns, stacked on mobile."
|
|
37465
|
+
}
|
|
37466
|
+
},
|
|
37467
|
+
styleTokens: {
|
|
37468
|
+
background: "surface",
|
|
37469
|
+
typography: "body",
|
|
37470
|
+
spacing: "md"
|
|
37471
|
+
},
|
|
37472
|
+
behaviours: {
|
|
37473
|
+
supportsThemeSwitching: true,
|
|
37474
|
+
inlineEditing: false,
|
|
37475
|
+
animation: false,
|
|
37476
|
+
paletteHidden: false
|
|
37477
|
+
},
|
|
37478
|
+
tags: [
|
|
37479
|
+
"newsletter",
|
|
37480
|
+
"signup",
|
|
37481
|
+
"email",
|
|
37482
|
+
"subscribe",
|
|
37483
|
+
"subscription",
|
|
37484
|
+
"mailchimp",
|
|
37485
|
+
"marketing",
|
|
37486
|
+
"lead-capture"
|
|
37487
|
+
],
|
|
37488
|
+
icon: "Mail"
|
|
37489
|
+
});
|
|
37490
|
+
[...(newsletterSignupManifest.fields ?? []).map((field) => field.id)];
|
|
37491
|
+
const newsletterSignupBlockDefinition = {
|
|
37492
|
+
manifest: newsletterSignupManifest,
|
|
36609
37493
|
runtime: newsletterFormBlockRuntime
|
|
36610
37494
|
};
|
|
36611
37495
|
//#endregion
|
|
@@ -39484,6 +40368,46 @@ z.object({ acceptExtraSiteCharge: z.boolean().optional() });
|
|
|
39484
40368
|
//#region ../surfaces/src/index.ts
|
|
39485
40369
|
const SURFACE_IDS = ["core", "macadamia"];
|
|
39486
40370
|
const DEFAULT_SURFACE_ID = "core";
|
|
40371
|
+
/**
|
|
40372
|
+
* Root hosts for each surface, keyed by deployment tier. The tier-keyed shape
|
|
40373
|
+
* makes it impossible to mis-order entries: callers like
|
|
40374
|
+
* `buildSurfaceAwareDashboardOriginForSurfaceId` look up by tier directly
|
|
40375
|
+
* rather than relying on positional alignment between arrays.
|
|
40376
|
+
*/
|
|
40377
|
+
const SURFACE_ROOT_HOSTS = {
|
|
40378
|
+
core: {
|
|
40379
|
+
local: "localhost",
|
|
40380
|
+
prod: "riverbankcms.com"
|
|
40381
|
+
},
|
|
40382
|
+
macadamia: {
|
|
40383
|
+
local: "macadamia.localhost",
|
|
40384
|
+
prod: "macadamia.studio"
|
|
40385
|
+
}
|
|
40386
|
+
};
|
|
40387
|
+
const SURFACE_SITE_ROOT_HOSTS = {
|
|
40388
|
+
core: {
|
|
40389
|
+
local: "localhost",
|
|
40390
|
+
prod: "riverbanksites.com"
|
|
40391
|
+
},
|
|
40392
|
+
macadamia: {
|
|
40393
|
+
local: "macadamia.localhost",
|
|
40394
|
+
prod: "macadamia.studio"
|
|
40395
|
+
}
|
|
40396
|
+
};
|
|
40397
|
+
const SURFACE_SITE_ROOT_HOST_ALIASES = { core: { prod: ["preview.riverbanksites.com"] } };
|
|
40398
|
+
function surfaceHostTableValues(table) {
|
|
40399
|
+
return Object.values(table).flatMap((byTier) => Object.values(byTier).flat());
|
|
40400
|
+
}
|
|
40401
|
+
function siteSlugLabelUnderRoot(host, siteRootHost) {
|
|
40402
|
+
if (!host.endsWith(`.${siteRootHost}`)) return [];
|
|
40403
|
+
return host.slice(0, host.length - siteRootHost.length - 1).split(".").slice(-1);
|
|
40404
|
+
}
|
|
40405
|
+
function deriveSurfaceOwnedSiteSlugs() {
|
|
40406
|
+
const siteRootHosts = [...surfaceHostTableValues(SURFACE_SITE_ROOT_HOSTS), ...surfaceHostTableValues(SURFACE_SITE_ROOT_HOST_ALIASES)];
|
|
40407
|
+
const labels = [...surfaceHostTableValues(SURFACE_ROOT_HOSTS), ...siteRootHosts].flatMap((host) => siteRootHosts.flatMap((root) => siteSlugLabelUnderRoot(host, root)));
|
|
40408
|
+
return [...new Set(labels)].sort();
|
|
40409
|
+
}
|
|
40410
|
+
deriveSurfaceOwnedSiteSlugs();
|
|
39487
40411
|
[...SURFACE_IDS.filter((surfaceId) => surfaceId !== DEFAULT_SURFACE_ID)];
|
|
39488
40412
|
//#endregion
|
|
39489
40413
|
//#region ../api/src/accountApi.ts
|
|
@@ -40112,6 +41036,7 @@ function parsePublicProductCategorySelector(value) {
|
|
|
40112
41036
|
productCategoryEntryId: record.productCategoryEntryId
|
|
40113
41037
|
};
|
|
40114
41038
|
}
|
|
41039
|
+
z.enum(["public", "unlisted"], { error: "visibility must be 'public' or 'unlisted'" });
|
|
40115
41040
|
//#endregion
|
|
40116
41041
|
//#region ../api/src/bookingPaymentTermSchemas.ts
|
|
40117
41042
|
const bookingDepositRefundPolicySchema = z.enum(["refundable", "non_refundable"]);
|