@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/server.mjs
CHANGED
|
@@ -52,6 +52,64 @@ function defineEndpointDefinitions(definitions) {
|
|
|
52
52
|
return definitions;
|
|
53
53
|
}
|
|
54
54
|
//#endregion
|
|
55
|
+
//#region ../api/src/apiEndpointTypes.ts
|
|
56
|
+
function allowedDemoMutationPolicy() {
|
|
57
|
+
return {
|
|
58
|
+
classification: "allowed",
|
|
59
|
+
publicMessage: ""
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
function blockedDemoMutationPolicy(classification, publicMessage) {
|
|
63
|
+
if (publicMessage.trim() === "") throw new Error(`Demo mutation policy ${classification} requires publicMessage.`);
|
|
64
|
+
return {
|
|
65
|
+
classification,
|
|
66
|
+
publicMessage
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
//#endregion
|
|
70
|
+
//#region ../api/src/demoMutationPolicies.ts
|
|
71
|
+
const DEMO_MUTATION_BLOCKED_HIDDEN = blockedDemoMutationPolicy("blocked-hidden", "This action is not available in demo sites.");
|
|
72
|
+
const DEMO_MUTATION_BLOCKED_DISABLED = blockedDemoMutationPolicy("blocked-disabled", "This setting is disabled in demo sites.");
|
|
73
|
+
const DEMO_MUTATION_INTERNAL_ONLY = blockedDemoMutationPolicy("internal-only", "This internal operation is not available in demo sites.");
|
|
74
|
+
const DEMO_MUTATION_ALLOWED = allowedDemoMutationPolicy();
|
|
75
|
+
//#endregion
|
|
76
|
+
//#region ../api/src/siteLifecycleEndpoints.ts
|
|
77
|
+
const SITE_LIFECYCLE_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
78
|
+
createSite: {
|
|
79
|
+
path: "/sites/manage",
|
|
80
|
+
method: "POST",
|
|
81
|
+
tags: ["site"],
|
|
82
|
+
auth: "user",
|
|
83
|
+
responseKind: "json",
|
|
84
|
+
errors: []
|
|
85
|
+
},
|
|
86
|
+
createSiteManual: {
|
|
87
|
+
path: "/sites/manual",
|
|
88
|
+
method: "POST",
|
|
89
|
+
tags: ["site"],
|
|
90
|
+
auth: "user",
|
|
91
|
+
responseKind: "json",
|
|
92
|
+
errors: []
|
|
93
|
+
},
|
|
94
|
+
updateSite: {
|
|
95
|
+
path: "/sites/manage",
|
|
96
|
+
method: "PUT",
|
|
97
|
+
tags: ["site"],
|
|
98
|
+
auth: "user",
|
|
99
|
+
responseKind: "json",
|
|
100
|
+
errors: []
|
|
101
|
+
},
|
|
102
|
+
deleteSite: {
|
|
103
|
+
path: "/sites/{siteId}",
|
|
104
|
+
method: "DELETE",
|
|
105
|
+
tags: ["site", "site-{siteId}"],
|
|
106
|
+
auth: "user",
|
|
107
|
+
responseKind: "json",
|
|
108
|
+
errors: [],
|
|
109
|
+
demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
//#endregion
|
|
55
113
|
//#region ../api/src/publicNewsletterEndpointDefinitions.ts
|
|
56
114
|
const PUBLIC_NEWSLETTER_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
57
115
|
subscribeNewsletter: {
|
|
@@ -112,27 +170,6 @@ const PUBLIC_NEWSLETTER_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
112
170
|
}
|
|
113
171
|
});
|
|
114
172
|
//#endregion
|
|
115
|
-
//#region ../api/src/apiEndpointTypes.ts
|
|
116
|
-
function allowedDemoMutationPolicy() {
|
|
117
|
-
return {
|
|
118
|
-
classification: "allowed",
|
|
119
|
-
publicMessage: ""
|
|
120
|
-
};
|
|
121
|
-
}
|
|
122
|
-
function blockedDemoMutationPolicy(classification, publicMessage) {
|
|
123
|
-
if (publicMessage.trim() === "") throw new Error(`Demo mutation policy ${classification} requires publicMessage.`);
|
|
124
|
-
return {
|
|
125
|
-
classification,
|
|
126
|
-
publicMessage
|
|
127
|
-
};
|
|
128
|
-
}
|
|
129
|
-
//#endregion
|
|
130
|
-
//#region ../api/src/demoMutationPolicies.ts
|
|
131
|
-
const DEMO_MUTATION_BLOCKED_HIDDEN = blockedDemoMutationPolicy("blocked-hidden", "This action is not available in demo sites.");
|
|
132
|
-
const DEMO_MUTATION_BLOCKED_DISABLED = blockedDemoMutationPolicy("blocked-disabled", "This setting is disabled in demo sites.");
|
|
133
|
-
const DEMO_MUTATION_INTERNAL_ONLY = blockedDemoMutationPolicy("internal-only", "This internal operation is not available in demo sites.");
|
|
134
|
-
const DEMO_MUTATION_ALLOWED = allowedDemoMutationPolicy();
|
|
135
|
-
//#endregion
|
|
136
173
|
//#region ../api/src/cache-tags.ts
|
|
137
174
|
/**
|
|
138
175
|
* Tag templates for endpoint definitions (support `{param}` placeholders).
|
|
@@ -992,6 +1029,13 @@ const EVENT_SERIES_REGISTRATION_ENDPOINT_DEFINITIONS = defineEndpointDefinitions
|
|
|
992
1029
|
errors: [],
|
|
993
1030
|
responseKind: "blob"
|
|
994
1031
|
},
|
|
1032
|
+
exportEventOfferingRegistrationsCsv: {
|
|
1033
|
+
path: "/sites/{siteId}/bookings/event-offerings/{eventOfferingId}/registrations/export.csv",
|
|
1034
|
+
method: "GET",
|
|
1035
|
+
auth: "user",
|
|
1036
|
+
errors: [],
|
|
1037
|
+
responseKind: "blob"
|
|
1038
|
+
},
|
|
995
1039
|
updateEventSeriesRegistration: {
|
|
996
1040
|
path: "/sites/{siteId}/bookings/event-series/{seriesId}/registrations/{registrationId}",
|
|
997
1041
|
method: "PATCH",
|
|
@@ -1002,6 +1046,19 @@ const EVENT_SERIES_REGISTRATION_ENDPOINT_DEFINITIONS = defineEndpointDefinitions
|
|
|
1002
1046
|
"resource:not_found",
|
|
1003
1047
|
"server:internal_error"
|
|
1004
1048
|
]
|
|
1049
|
+
},
|
|
1050
|
+
saveEventSeriesRegistrationAnswers: {
|
|
1051
|
+
path: "/sites/{siteId}/bookings/event-series/{seriesId}/registrations/{registrationId}/answers",
|
|
1052
|
+
method: "PUT",
|
|
1053
|
+
auth: "user",
|
|
1054
|
+
responseKind: "json",
|
|
1055
|
+
errors: [
|
|
1056
|
+
"validation:invalid_input",
|
|
1057
|
+
"auth:forbidden",
|
|
1058
|
+
"resource:not_found",
|
|
1059
|
+
"resource:conflict",
|
|
1060
|
+
"server:internal_error"
|
|
1061
|
+
]
|
|
1005
1062
|
}
|
|
1006
1063
|
});
|
|
1007
1064
|
//#endregion
|
|
@@ -1139,6 +1196,20 @@ const NEWSLETTER_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
1139
1196
|
responseKind: "json",
|
|
1140
1197
|
errors: ["auth:forbidden", "server:internal_error"]
|
|
1141
1198
|
},
|
|
1199
|
+
setMailingListBookingOptIn: {
|
|
1200
|
+
path: "/sites/{siteId}/mailing-list/setup/booking-opt-in",
|
|
1201
|
+
method: "PUT",
|
|
1202
|
+
tags: [TAG_TEMPLATES.site, TAG_TEMPLATES.siteNewsletter],
|
|
1203
|
+
auth: "user",
|
|
1204
|
+
responseKind: "json",
|
|
1205
|
+
demoMutation: DEMO_MUTATION_BLOCKED_DISABLED,
|
|
1206
|
+
errors: [
|
|
1207
|
+
"auth:forbidden",
|
|
1208
|
+
"validation:invalid_input",
|
|
1209
|
+
"resource:conflict",
|
|
1210
|
+
"server:internal_error"
|
|
1211
|
+
]
|
|
1212
|
+
},
|
|
1142
1213
|
getMailingListAuthoringContext: {
|
|
1143
1214
|
path: "/sites/{siteId}/mailing-list/authoring-context",
|
|
1144
1215
|
method: "GET",
|
|
@@ -1422,6 +1493,30 @@ const NEWSLETTER_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
1422
1493
|
responseKind: "json",
|
|
1423
1494
|
demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN
|
|
1424
1495
|
},
|
|
1496
|
+
scheduleNewsletterCampaign: {
|
|
1497
|
+
path: "/sites/{siteId}/newsletter/campaigns/{campaignId}/schedule",
|
|
1498
|
+
method: "POST",
|
|
1499
|
+
tags: [TAG_TEMPLATES.site, TAG_TEMPLATES.siteNewsletter],
|
|
1500
|
+
auth: "user",
|
|
1501
|
+
responseKind: "json",
|
|
1502
|
+
demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN
|
|
1503
|
+
},
|
|
1504
|
+
unscheduleNewsletterCampaign: {
|
|
1505
|
+
path: "/sites/{siteId}/newsletter/campaigns/{campaignId}/unschedule",
|
|
1506
|
+
method: "POST",
|
|
1507
|
+
tags: [TAG_TEMPLATES.site, TAG_TEMPLATES.siteNewsletter],
|
|
1508
|
+
auth: "user",
|
|
1509
|
+
responseKind: "json",
|
|
1510
|
+
demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN
|
|
1511
|
+
},
|
|
1512
|
+
stopNewsletterCampaign: {
|
|
1513
|
+
path: "/sites/{siteId}/newsletter/campaigns/{campaignId}/stop",
|
|
1514
|
+
method: "POST",
|
|
1515
|
+
tags: [TAG_TEMPLATES.site, TAG_TEMPLATES.siteNewsletter],
|
|
1516
|
+
auth: "user",
|
|
1517
|
+
responseKind: "json",
|
|
1518
|
+
demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN
|
|
1519
|
+
},
|
|
1425
1520
|
testSendNewsletterCampaign: {
|
|
1426
1521
|
path: "/sites/{siteId}/newsletter/campaigns/{campaignId}/test-send",
|
|
1427
1522
|
method: "POST",
|
|
@@ -1432,6 +1527,154 @@ const NEWSLETTER_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
1432
1527
|
}
|
|
1433
1528
|
});
|
|
1434
1529
|
//#endregion
|
|
1530
|
+
//#region ../api/src/sdkEventEndpointDefinitions.ts
|
|
1531
|
+
/**
|
|
1532
|
+
* The SDK's Event graph: the Events themselves and the occurrences of one run.
|
|
1533
|
+
* Extracted from `endpoints.ts` so this family can be read, and added to, on
|
|
1534
|
+
* its own. New entries here must declare `errors`; the
|
|
1535
|
+
* require-api-endpoint-errors lint enforces that here as in endpoints.ts.
|
|
1536
|
+
*/
|
|
1537
|
+
const SDK_EVENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
1538
|
+
sdkListEvents: {
|
|
1539
|
+
path: "/sdk/{siteId}/events",
|
|
1540
|
+
method: "GET",
|
|
1541
|
+
auth: "service",
|
|
1542
|
+
responseKind: "json"
|
|
1543
|
+
},
|
|
1544
|
+
sdkUpsertEvent: {
|
|
1545
|
+
path: "/sdk/{siteId}/events",
|
|
1546
|
+
method: "POST",
|
|
1547
|
+
auth: "service",
|
|
1548
|
+
responseKind: "json",
|
|
1549
|
+
errors: [
|
|
1550
|
+
"validation:invalid_input",
|
|
1551
|
+
"resource:not_found",
|
|
1552
|
+
"resource:conflict",
|
|
1553
|
+
"billing:plan_limit_exceeded",
|
|
1554
|
+
"server:internal_error"
|
|
1555
|
+
]
|
|
1556
|
+
},
|
|
1557
|
+
sdkGetEvent: {
|
|
1558
|
+
path: "/sdk/{siteId}/events/{identifier}",
|
|
1559
|
+
method: "GET",
|
|
1560
|
+
auth: "service",
|
|
1561
|
+
responseKind: "json"
|
|
1562
|
+
},
|
|
1563
|
+
sdkDeleteEvent: {
|
|
1564
|
+
path: "/sdk/{siteId}/events/{identifier}",
|
|
1565
|
+
method: "DELETE",
|
|
1566
|
+
auth: "service",
|
|
1567
|
+
responseKind: "json",
|
|
1568
|
+
errors: [
|
|
1569
|
+
"resource:not_found",
|
|
1570
|
+
"resource:conflict",
|
|
1571
|
+
"server:internal_error"
|
|
1572
|
+
]
|
|
1573
|
+
},
|
|
1574
|
+
sdkTakeEventOffline: {
|
|
1575
|
+
path: "/sdk/{siteId}/events/{identifier}/lifecycle",
|
|
1576
|
+
method: "POST",
|
|
1577
|
+
auth: "service",
|
|
1578
|
+
responseKind: "json",
|
|
1579
|
+
errors: [
|
|
1580
|
+
"resource:not_found",
|
|
1581
|
+
"validation:invalid_input",
|
|
1582
|
+
"resource:conflict",
|
|
1583
|
+
"server:internal_error"
|
|
1584
|
+
]
|
|
1585
|
+
},
|
|
1586
|
+
sdkListEventOccurrences: {
|
|
1587
|
+
path: "/sdk/{siteId}/events/{identifier}/runs/{runIdentifier}/occurrences",
|
|
1588
|
+
method: "GET",
|
|
1589
|
+
auth: "service",
|
|
1590
|
+
responseKind: "json",
|
|
1591
|
+
errors: [
|
|
1592
|
+
"resource:not_found",
|
|
1593
|
+
"validation:invalid_input",
|
|
1594
|
+
"server:internal_error"
|
|
1595
|
+
]
|
|
1596
|
+
},
|
|
1597
|
+
sdkAddEventOccurrence: {
|
|
1598
|
+
path: "/sdk/{siteId}/events/{identifier}/runs/{runIdentifier}/occurrences",
|
|
1599
|
+
method: "POST",
|
|
1600
|
+
auth: "service",
|
|
1601
|
+
responseKind: "json",
|
|
1602
|
+
errors: [
|
|
1603
|
+
"resource:not_found",
|
|
1604
|
+
"validation:invalid_input",
|
|
1605
|
+
"resource:conflict",
|
|
1606
|
+
"server:internal_error"
|
|
1607
|
+
]
|
|
1608
|
+
},
|
|
1609
|
+
sdkUpdateEventOccurrence: {
|
|
1610
|
+
path: "/sdk/{siteId}/events/{identifier}/runs/{runIdentifier}/occurrences/{occurrenceId}",
|
|
1611
|
+
method: "PATCH",
|
|
1612
|
+
auth: "service",
|
|
1613
|
+
responseKind: "json",
|
|
1614
|
+
errors: [
|
|
1615
|
+
"resource:not_found",
|
|
1616
|
+
"validation:invalid_input",
|
|
1617
|
+
"resource:conflict",
|
|
1618
|
+
"server:internal_error"
|
|
1619
|
+
]
|
|
1620
|
+
},
|
|
1621
|
+
sdkCancelEventOccurrence: {
|
|
1622
|
+
path: "/sdk/{siteId}/events/{identifier}/runs/{runIdentifier}/occurrences/{occurrenceId}/cancel",
|
|
1623
|
+
method: "POST",
|
|
1624
|
+
auth: "service",
|
|
1625
|
+
responseKind: "json",
|
|
1626
|
+
errors: [
|
|
1627
|
+
"resource:not_found",
|
|
1628
|
+
"resource:conflict",
|
|
1629
|
+
"server:internal_error"
|
|
1630
|
+
]
|
|
1631
|
+
},
|
|
1632
|
+
sdkDeleteEventOccurrence: {
|
|
1633
|
+
path: "/sdk/{siteId}/events/{identifier}/runs/{runIdentifier}/occurrences/{occurrenceId}",
|
|
1634
|
+
method: "DELETE",
|
|
1635
|
+
auth: "service",
|
|
1636
|
+
responseKind: "json",
|
|
1637
|
+
errors: [
|
|
1638
|
+
"resource:not_found",
|
|
1639
|
+
"resource:conflict",
|
|
1640
|
+
"server:internal_error"
|
|
1641
|
+
]
|
|
1642
|
+
}
|
|
1643
|
+
});
|
|
1644
|
+
//#endregion
|
|
1645
|
+
//#region ../api/src/sdkPageDesignEndpointDefinitions.ts
|
|
1646
|
+
/**
|
|
1647
|
+
* SDK management endpoints for a page's draft design (issue 1497), spread into
|
|
1648
|
+
* `ENDPOINT_DEFINITIONS` like the other endpoint-definition modules. New
|
|
1649
|
+
* entries here must declare `errors`, which the require-api-endpoint-errors
|
|
1650
|
+
* lint enforces.
|
|
1651
|
+
*/
|
|
1652
|
+
const SDK_PAGE_DESIGN_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
1653
|
+
sdkGetPageDesign: {
|
|
1654
|
+
path: "/sdk/{siteId}/pages/{identifier}/design",
|
|
1655
|
+
method: "GET",
|
|
1656
|
+
auth: "service",
|
|
1657
|
+
responseKind: "json",
|
|
1658
|
+
errors: [
|
|
1659
|
+
"resource:not_found",
|
|
1660
|
+
"validation:invalid_input",
|
|
1661
|
+
"server:internal_error"
|
|
1662
|
+
]
|
|
1663
|
+
},
|
|
1664
|
+
sdkSavePageDesign: {
|
|
1665
|
+
path: "/sdk/{siteId}/pages/{identifier}/design",
|
|
1666
|
+
method: "POST",
|
|
1667
|
+
auth: "service",
|
|
1668
|
+
responseKind: "json",
|
|
1669
|
+
errors: [
|
|
1670
|
+
"resource:not_found",
|
|
1671
|
+
"validation:invalid_input",
|
|
1672
|
+
"resource:conflict",
|
|
1673
|
+
"server:internal_error"
|
|
1674
|
+
]
|
|
1675
|
+
}
|
|
1676
|
+
});
|
|
1677
|
+
//#endregion
|
|
1435
1678
|
//#region ../core/src/result.ts
|
|
1436
1679
|
function ok$1(value) {
|
|
1437
1680
|
return {
|
|
@@ -2092,17 +2335,35 @@ function parseMailingListRuntimeContext(value) {
|
|
|
2092
2335
|
if (!isRecord$15(value)) return invalidRuntimeContext();
|
|
2093
2336
|
if (value.tag === "not_configured") return ok$1({ tag: "not_configured" });
|
|
2094
2337
|
if (value.tag !== "configured") return invalidRuntimeContext();
|
|
2338
|
+
return parseConfiguredRuntimeContext(value);
|
|
2339
|
+
}
|
|
2340
|
+
function parseConfiguredRuntimeContext(value) {
|
|
2095
2341
|
const revision = parseMailingListSetupRevision(value.revision);
|
|
2096
2342
|
const form = parseMailingListGlobalForm(value.form);
|
|
2097
2343
|
const provider = parseRuntimeProvider(value.provider);
|
|
2098
|
-
|
|
2344
|
+
const bookingSignup = parseBookingSignupOffer(value.bookingSignup);
|
|
2345
|
+
if (revision === null || !form.ok || provider === null || bookingSignup === null) return invalidRuntimeContext();
|
|
2099
2346
|
return ok$1({
|
|
2100
2347
|
tag: "configured",
|
|
2101
2348
|
revision,
|
|
2349
|
+
bookingSignup,
|
|
2102
2350
|
form: form.value,
|
|
2103
2351
|
provider
|
|
2104
2352
|
});
|
|
2105
2353
|
}
|
|
2354
|
+
function parseBookingSignupOffer(value) {
|
|
2355
|
+
if (value === void 0) return {
|
|
2356
|
+
tag: "unavailable",
|
|
2357
|
+
reason: "disabled"
|
|
2358
|
+
};
|
|
2359
|
+
if (!isRecord$15(value)) return null;
|
|
2360
|
+
if (value.tag === "offered") return { tag: "offered" };
|
|
2361
|
+
if (value.tag === "unavailable" && (value.reason === "disabled" || value.reason === "fields" || value.reason === "destination")) return {
|
|
2362
|
+
tag: "unavailable",
|
|
2363
|
+
reason: value.reason
|
|
2364
|
+
};
|
|
2365
|
+
return null;
|
|
2366
|
+
}
|
|
2106
2367
|
function parseRuntimeProvider(value) {
|
|
2107
2368
|
if (!isRecord$15(value)) return null;
|
|
2108
2369
|
switch (value.provider) {
|
|
@@ -2329,15 +2590,6 @@ function parseMailingListContentVersionId(value) {
|
|
|
2329
2590
|
const parsed = parseContentVersionId(value);
|
|
2330
2591
|
return parsed.ok ? parsed.value : null;
|
|
2331
2592
|
}
|
|
2332
|
-
function buildMailingListSignupBlockSourceRef(blockId, contentVersionId) {
|
|
2333
|
-
const parsedBlockId = parseMailingListBlockId(blockId);
|
|
2334
|
-
const parsedContentVersionId = parseMailingListContentVersionId(contentVersionId);
|
|
2335
|
-
return parsedBlockId !== null && parsedContentVersionId !== null ? {
|
|
2336
|
-
tag: "block_ref",
|
|
2337
|
-
blockId: parsedBlockId,
|
|
2338
|
-
contentVersionId: parsedContentVersionId
|
|
2339
|
-
} : null;
|
|
2340
|
-
}
|
|
2341
2593
|
//#endregion
|
|
2342
2594
|
//#region ../core/src/secret.ts
|
|
2343
2595
|
/**
|
|
@@ -2989,6 +3241,45 @@ const SITE_API_KEY_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
2989
3241
|
}
|
|
2990
3242
|
});
|
|
2991
3243
|
//#endregion
|
|
3244
|
+
//#region ../api/src/siteManagementEndpointDefinitions.ts
|
|
3245
|
+
const SITE_MANAGEMENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
3246
|
+
createSite: {
|
|
3247
|
+
path: "/sites/manage",
|
|
3248
|
+
method: "POST",
|
|
3249
|
+
tags: ["site"],
|
|
3250
|
+
auth: "user",
|
|
3251
|
+
responseKind: "json"
|
|
3252
|
+
},
|
|
3253
|
+
updateSite: {
|
|
3254
|
+
path: "/sites/manage",
|
|
3255
|
+
method: "PUT",
|
|
3256
|
+
tags: ["site"],
|
|
3257
|
+
auth: "user",
|
|
3258
|
+
responseKind: "json"
|
|
3259
|
+
},
|
|
3260
|
+
changeSiteAddress: {
|
|
3261
|
+
path: "/sites/{siteId}/address",
|
|
3262
|
+
method: "PUT",
|
|
3263
|
+
auth: "user",
|
|
3264
|
+
responseKind: "json",
|
|
3265
|
+
demoMutation: DEMO_MUTATION_BLOCKED_DISABLED
|
|
3266
|
+
},
|
|
3267
|
+
getSiteAddressAvailability: {
|
|
3268
|
+
path: "/sites/{siteId}/address/availability",
|
|
3269
|
+
method: "GET",
|
|
3270
|
+
auth: "user",
|
|
3271
|
+
responseKind: "json"
|
|
3272
|
+
},
|
|
3273
|
+
deleteSite: {
|
|
3274
|
+
path: "/sites/{siteId}",
|
|
3275
|
+
method: "DELETE",
|
|
3276
|
+
tags: ["site", "site-{siteId}"],
|
|
3277
|
+
auth: "user",
|
|
3278
|
+
responseKind: "json",
|
|
3279
|
+
demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN
|
|
3280
|
+
}
|
|
3281
|
+
});
|
|
3282
|
+
//#endregion
|
|
2992
3283
|
//#region ../api/src/eventManagementEndpointDefinitions.ts
|
|
2993
3284
|
const EVENT_MANAGEMENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
2994
3285
|
listEvents: {
|
|
@@ -3036,6 +3327,28 @@ const EVENT_MANAGEMENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
3036
3327
|
"server:internal_error"
|
|
3037
3328
|
]
|
|
3038
3329
|
},
|
|
3330
|
+
/**
|
|
3331
|
+
* The web address of an event's own page. A course page belongs to the
|
|
3332
|
+
* event itself, so its address is written here rather than through a run.
|
|
3333
|
+
*/
|
|
3334
|
+
updateEventAddress: {
|
|
3335
|
+
path: "/sites/{siteId}/bookings/events/{eventId}/address",
|
|
3336
|
+
method: "PATCH",
|
|
3337
|
+
tags: [
|
|
3338
|
+
"site-{siteId}",
|
|
3339
|
+
"event-series-{siteId}",
|
|
3340
|
+
TAG_TEMPLATES.siteRoutableContent,
|
|
3341
|
+
TAG_TEMPLATES.siteRedirects
|
|
3342
|
+
],
|
|
3343
|
+
auth: "user",
|
|
3344
|
+
responseKind: "json",
|
|
3345
|
+
errors: [
|
|
3346
|
+
"validation:invalid_input",
|
|
3347
|
+
"resource:not_found",
|
|
3348
|
+
"resource:conflict",
|
|
3349
|
+
"server:internal_error"
|
|
3350
|
+
]
|
|
3351
|
+
},
|
|
3039
3352
|
createWholeSeriesRun: {
|
|
3040
3353
|
path: "/sites/{siteId}/bookings/events/{eventId}/runs",
|
|
3041
3354
|
method: "POST",
|
|
@@ -3062,6 +3375,20 @@ const EVENT_MANAGEMENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
3062
3375
|
"server:internal_error"
|
|
3063
3376
|
]
|
|
3064
3377
|
},
|
|
3378
|
+
updateCourseBookingSettings: {
|
|
3379
|
+
path: "/sites/{siteId}/bookings/events/{eventId}/booking-settings",
|
|
3380
|
+
method: "PATCH",
|
|
3381
|
+
tags: ["site-{siteId}", "event-series-{siteId}"],
|
|
3382
|
+
auth: "user",
|
|
3383
|
+
responseKind: "json",
|
|
3384
|
+
errors: [
|
|
3385
|
+
"validation:invalid_input",
|
|
3386
|
+
"auth:forbidden",
|
|
3387
|
+
"resource:not_found",
|
|
3388
|
+
"resource:conflict",
|
|
3389
|
+
"server:internal_error"
|
|
3390
|
+
]
|
|
3391
|
+
},
|
|
3065
3392
|
cancelWholeSeriesRun: {
|
|
3066
3393
|
path: "/sites/{siteId}/bookings/events/{eventId}/runs/{runId}/cancellation",
|
|
3067
3394
|
method: "POST",
|
|
@@ -3074,6 +3401,28 @@ const EVENT_MANAGEMENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
3074
3401
|
"resource:conflict",
|
|
3075
3402
|
"server:internal_error"
|
|
3076
3403
|
]
|
|
3404
|
+
},
|
|
3405
|
+
/**
|
|
3406
|
+
* The Content tab's one write: the short introduction, image and
|
|
3407
|
+
* description of an event's page, published without its layout.
|
|
3408
|
+
*/
|
|
3409
|
+
saveEventPageWords: {
|
|
3410
|
+
path: "/sites/{siteId}/page-surfaces/{pageSurfaceId}/words",
|
|
3411
|
+
method: "PUT",
|
|
3412
|
+
tags: [
|
|
3413
|
+
TAG_TEMPLATES.siteCollection,
|
|
3414
|
+
TAG_TEMPLATES.siteRoutableContent,
|
|
3415
|
+
TAG_TEMPLATES.pageSurfaceById
|
|
3416
|
+
],
|
|
3417
|
+
auth: "user",
|
|
3418
|
+
responseKind: "json",
|
|
3419
|
+
errors: [
|
|
3420
|
+
"auth:forbidden",
|
|
3421
|
+
"validation:invalid_input",
|
|
3422
|
+
"resource:not_found",
|
|
3423
|
+
"resource:conflict",
|
|
3424
|
+
"server:internal_error"
|
|
3425
|
+
]
|
|
3077
3426
|
}
|
|
3078
3427
|
});
|
|
3079
3428
|
//#endregion
|
|
@@ -3506,7 +3855,92 @@ const BILLING_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
3506
3855
|
responseKind: "json"
|
|
3507
3856
|
}
|
|
3508
3857
|
});
|
|
3858
|
+
//#endregion
|
|
3859
|
+
//#region ../api/src/bookingPeopleEndpointDefinitions.ts
|
|
3860
|
+
/**
|
|
3861
|
+
* People endpoints (#1356): the People list, its CSV export, and deleting a
|
|
3862
|
+
* person when nothing is attached to them.
|
|
3863
|
+
*/
|
|
3864
|
+
const BOOKING_PEOPLE_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
3865
|
+
listPeople: {
|
|
3866
|
+
path: "/sites/{siteId}/bookings/people",
|
|
3867
|
+
method: "GET",
|
|
3868
|
+
tags: ["site-{siteId}", "customers-{siteId}"],
|
|
3869
|
+
auth: "user",
|
|
3870
|
+
responseKind: "json",
|
|
3871
|
+
errors: ["server:internal_error"]
|
|
3872
|
+
},
|
|
3873
|
+
exportPeopleCsv: {
|
|
3874
|
+
path: "/sites/{siteId}/bookings/people/export.csv",
|
|
3875
|
+
method: "GET",
|
|
3876
|
+
tags: ["site-{siteId}", "customers-{siteId}"],
|
|
3877
|
+
auth: "user",
|
|
3878
|
+
errors: [],
|
|
3879
|
+
responseKind: "blob"
|
|
3880
|
+
},
|
|
3881
|
+
checkPersonDeletion: {
|
|
3882
|
+
path: "/sites/{siteId}/bookings/people/{personId}/deletion-check",
|
|
3883
|
+
method: "GET",
|
|
3884
|
+
tags: ["site-{siteId}", "customers-{siteId}"],
|
|
3885
|
+
auth: "user",
|
|
3886
|
+
responseKind: "json",
|
|
3887
|
+
errors: [
|
|
3888
|
+
"auth:forbidden",
|
|
3889
|
+
"resource:not_found",
|
|
3890
|
+
"server:internal_error"
|
|
3891
|
+
]
|
|
3892
|
+
},
|
|
3893
|
+
deletePerson: {
|
|
3894
|
+
path: "/sites/{siteId}/bookings/people/{personId}",
|
|
3895
|
+
method: "DELETE",
|
|
3896
|
+
tags: ["site-{siteId}", "customers-{siteId}"],
|
|
3897
|
+
auth: "user",
|
|
3898
|
+
responseKind: "json",
|
|
3899
|
+
errors: [
|
|
3900
|
+
"auth:forbidden",
|
|
3901
|
+
"resource:not_found",
|
|
3902
|
+
"server:internal_error"
|
|
3903
|
+
]
|
|
3904
|
+
}
|
|
3905
|
+
});
|
|
3906
|
+
//#endregion
|
|
3907
|
+
//#region ../api/src/clientErrorReporting.ts
|
|
3908
|
+
const CLIENT_ERROR_REPORT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({ reportClientError: {
|
|
3909
|
+
path: "/client/error-report",
|
|
3910
|
+
method: "POST",
|
|
3911
|
+
auth: "user",
|
|
3912
|
+
errors: [],
|
|
3913
|
+
responseKind: "json"
|
|
3914
|
+
} });
|
|
3915
|
+
const CLIENT_ERROR_REPORT_LIMITS = {
|
|
3916
|
+
pathname: 1024,
|
|
3917
|
+
name: 120,
|
|
3918
|
+
message: 2e3,
|
|
3919
|
+
stack: 8e3,
|
|
3920
|
+
digest: 128,
|
|
3921
|
+
componentStack: 8e3,
|
|
3922
|
+
sourceLocation: 1024
|
|
3923
|
+
};
|
|
3924
|
+
const clientErrorEventSchema = z.enum([
|
|
3925
|
+
"dashboard:route-error",
|
|
3926
|
+
"dashboard:app-error",
|
|
3927
|
+
"client:error-boundary",
|
|
3928
|
+
"client:window-error",
|
|
3929
|
+
"client:unhandled-rejection"
|
|
3930
|
+
]);
|
|
3931
|
+
z.object({
|
|
3932
|
+
event: clientErrorEventSchema,
|
|
3933
|
+
pathname: z.string().startsWith("/").max(CLIENT_ERROR_REPORT_LIMITS.pathname),
|
|
3934
|
+
name: z.string().max(CLIENT_ERROR_REPORT_LIMITS.name),
|
|
3935
|
+
message: z.string().max(CLIENT_ERROR_REPORT_LIMITS.message),
|
|
3936
|
+
stack: z.string().max(CLIENT_ERROR_REPORT_LIMITS.stack).nullable(),
|
|
3937
|
+
digest: z.string().max(CLIENT_ERROR_REPORT_LIMITS.digest).nullable(),
|
|
3938
|
+
componentStack: z.string().max(CLIENT_ERROR_REPORT_LIMITS.componentStack).nullable(),
|
|
3939
|
+
sourceLocation: z.string().max(CLIENT_ERROR_REPORT_LIMITS.sourceLocation).nullable()
|
|
3940
|
+
}).strict();
|
|
3509
3941
|
const API_ENDPOINTS$1 = {
|
|
3942
|
+
...SITE_LIFECYCLE_ENDPOINT_DEFINITIONS,
|
|
3943
|
+
...CLIENT_ERROR_REPORT_ENDPOINT_DEFINITIONS,
|
|
3510
3944
|
...PUBLIC_NEWSLETTER_ENDPOINT_DEFINITIONS,
|
|
3511
3945
|
...ACCOUNT_ENDPOINT_DEFINITIONS,
|
|
3512
3946
|
...PUBLIC_ONBOARDING_ATTEMPT_ENDPOINT_DEFINITIONS,
|
|
@@ -3514,6 +3948,7 @@ const API_ENDPOINTS$1 = {
|
|
|
3514
3948
|
...GIFTING_ENDPOINT_DEFINITIONS,
|
|
3515
3949
|
...PUBLIC_READ_ENDPOINT_DEFINITIONS,
|
|
3516
3950
|
...BILLING_ENDPOINT_DEFINITIONS,
|
|
3951
|
+
...SITE_MANAGEMENT_ENDPOINT_DEFINITIONS,
|
|
3517
3952
|
aiContentUpdateChat: {
|
|
3518
3953
|
path: "/ai/content-update-chat",
|
|
3519
3954
|
method: "POST",
|
|
@@ -4040,35 +4475,6 @@ const API_ENDPOINTS$1 = {
|
|
|
4040
4475
|
auth: "user",
|
|
4041
4476
|
responseKind: "json"
|
|
4042
4477
|
},
|
|
4043
|
-
createSite: {
|
|
4044
|
-
path: "/sites/manage",
|
|
4045
|
-
method: "POST",
|
|
4046
|
-
tags: ["site"],
|
|
4047
|
-
auth: "user",
|
|
4048
|
-
responseKind: "json"
|
|
4049
|
-
},
|
|
4050
|
-
createSiteManual: {
|
|
4051
|
-
path: "/sites/manual",
|
|
4052
|
-
method: "POST",
|
|
4053
|
-
tags: ["site"],
|
|
4054
|
-
auth: "user",
|
|
4055
|
-
responseKind: "json"
|
|
4056
|
-
},
|
|
4057
|
-
updateSite: {
|
|
4058
|
-
path: "/sites/manage",
|
|
4059
|
-
method: "PUT",
|
|
4060
|
-
tags: ["site"],
|
|
4061
|
-
auth: "user",
|
|
4062
|
-
responseKind: "json"
|
|
4063
|
-
},
|
|
4064
|
-
deleteSite: {
|
|
4065
|
-
path: "/sites/{siteId}",
|
|
4066
|
-
method: "DELETE",
|
|
4067
|
-
tags: ["site", "site-{siteId}"],
|
|
4068
|
-
auth: "user",
|
|
4069
|
-
responseKind: "json",
|
|
4070
|
-
demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN
|
|
4071
|
-
},
|
|
4072
4478
|
listSiteMembers: {
|
|
4073
4479
|
path: "/sites/{siteId}/members",
|
|
4074
4480
|
method: "GET",
|
|
@@ -7574,21 +7980,7 @@ const API_ENDPOINTS$1 = {
|
|
|
7574
7980
|
responseKind: "json",
|
|
7575
7981
|
errors: []
|
|
7576
7982
|
},
|
|
7577
|
-
|
|
7578
|
-
path: "/sites/{siteId}/bookings/customers",
|
|
7579
|
-
method: "GET",
|
|
7580
|
-
tags: ["site-{siteId}", "customers-{siteId}"],
|
|
7581
|
-
auth: "user",
|
|
7582
|
-
responseKind: "json"
|
|
7583
|
-
},
|
|
7584
|
-
exportBookingCustomersCsv: {
|
|
7585
|
-
path: "/sites/{siteId}/bookings/customers/export.csv",
|
|
7586
|
-
method: "GET",
|
|
7587
|
-
tags: ["site-{siteId}", "customers-{siteId}"],
|
|
7588
|
-
auth: "user",
|
|
7589
|
-
errors: [],
|
|
7590
|
-
responseKind: "blob"
|
|
7591
|
-
},
|
|
7983
|
+
...BOOKING_PEOPLE_ENDPOINT_DEFINITIONS,
|
|
7592
7984
|
createBookingCustomer: {
|
|
7593
7985
|
path: "/sites/{siteId}/bookings/customers",
|
|
7594
7986
|
method: "POST",
|
|
@@ -7679,13 +8071,6 @@ const API_ENDPOINTS$1 = {
|
|
|
7679
8071
|
"server:internal_error"
|
|
7680
8072
|
]
|
|
7681
8073
|
},
|
|
7682
|
-
listCustomerAttendances: {
|
|
7683
|
-
path: "/sites/{siteId}/bookings/customers/{customerId}/attendances",
|
|
7684
|
-
method: "GET",
|
|
7685
|
-
tags: ["site-{siteId}", "customers-{siteId}"],
|
|
7686
|
-
auth: "user",
|
|
7687
|
-
responseKind: "json"
|
|
7688
|
-
},
|
|
7689
8074
|
createPersonRecordEntry: {
|
|
7690
8075
|
path: "/sites/{siteId}/bookings/person-records/entries",
|
|
7691
8076
|
method: "POST",
|
|
@@ -8301,6 +8686,7 @@ const API_ENDPOINTS$1 = {
|
|
|
8301
8686
|
auth: "service",
|
|
8302
8687
|
responseKind: "json"
|
|
8303
8688
|
},
|
|
8689
|
+
...SDK_PAGE_DESIGN_ENDPOINT_DEFINITIONS,
|
|
8304
8690
|
sdkUpsertPageBlock: {
|
|
8305
8691
|
path: "/sdk/{siteId}/pages/{identifier}/blocks",
|
|
8306
8692
|
method: "POST",
|
|
@@ -8423,87 +8809,7 @@ const API_ENDPOINTS$1 = {
|
|
|
8423
8809
|
auth: "service",
|
|
8424
8810
|
responseKind: "json"
|
|
8425
8811
|
},
|
|
8426
|
-
|
|
8427
|
-
path: "/sdk/{siteId}/events",
|
|
8428
|
-
method: "GET",
|
|
8429
|
-
auth: "service",
|
|
8430
|
-
responseKind: "json"
|
|
8431
|
-
},
|
|
8432
|
-
sdkUpsertEvent: {
|
|
8433
|
-
path: "/sdk/{siteId}/events",
|
|
8434
|
-
method: "POST",
|
|
8435
|
-
auth: "service",
|
|
8436
|
-
responseKind: "json"
|
|
8437
|
-
},
|
|
8438
|
-
sdkGetEvent: {
|
|
8439
|
-
path: "/sdk/{siteId}/events/{identifier}",
|
|
8440
|
-
method: "GET",
|
|
8441
|
-
auth: "service",
|
|
8442
|
-
responseKind: "json"
|
|
8443
|
-
},
|
|
8444
|
-
sdkDeleteEvent: {
|
|
8445
|
-
path: "/sdk/{siteId}/events/{identifier}",
|
|
8446
|
-
method: "DELETE",
|
|
8447
|
-
auth: "service",
|
|
8448
|
-
responseKind: "json"
|
|
8449
|
-
},
|
|
8450
|
-
sdkListEventOccurrences: {
|
|
8451
|
-
path: "/sdk/{siteId}/events/{identifier}/runs/{runIdentifier}/occurrences",
|
|
8452
|
-
method: "GET",
|
|
8453
|
-
auth: "service",
|
|
8454
|
-
responseKind: "json",
|
|
8455
|
-
errors: [
|
|
8456
|
-
"resource:not_found",
|
|
8457
|
-
"validation:invalid_input",
|
|
8458
|
-
"server:internal_error"
|
|
8459
|
-
]
|
|
8460
|
-
},
|
|
8461
|
-
sdkAddEventOccurrence: {
|
|
8462
|
-
path: "/sdk/{siteId}/events/{identifier}/runs/{runIdentifier}/occurrences",
|
|
8463
|
-
method: "POST",
|
|
8464
|
-
auth: "service",
|
|
8465
|
-
responseKind: "json",
|
|
8466
|
-
errors: [
|
|
8467
|
-
"resource:not_found",
|
|
8468
|
-
"validation:invalid_input",
|
|
8469
|
-
"resource:conflict",
|
|
8470
|
-
"server:internal_error"
|
|
8471
|
-
]
|
|
8472
|
-
},
|
|
8473
|
-
sdkUpdateEventOccurrence: {
|
|
8474
|
-
path: "/sdk/{siteId}/events/{identifier}/runs/{runIdentifier}/occurrences/{occurrenceId}",
|
|
8475
|
-
method: "PATCH",
|
|
8476
|
-
auth: "service",
|
|
8477
|
-
responseKind: "json",
|
|
8478
|
-
errors: [
|
|
8479
|
-
"resource:not_found",
|
|
8480
|
-
"validation:invalid_input",
|
|
8481
|
-
"resource:conflict",
|
|
8482
|
-
"server:internal_error"
|
|
8483
|
-
]
|
|
8484
|
-
},
|
|
8485
|
-
sdkCancelEventOccurrence: {
|
|
8486
|
-
path: "/sdk/{siteId}/events/{identifier}/runs/{runIdentifier}/occurrences/{occurrenceId}/cancel",
|
|
8487
|
-
method: "POST",
|
|
8488
|
-
auth: "service",
|
|
8489
|
-
responseKind: "json",
|
|
8490
|
-
errors: [
|
|
8491
|
-
"resource:not_found",
|
|
8492
|
-
"resource:conflict",
|
|
8493
|
-
"server:internal_error"
|
|
8494
|
-
]
|
|
8495
|
-
},
|
|
8496
|
-
sdkDeleteEventOccurrence: {
|
|
8497
|
-
path: "/sdk/{siteId}/events/{identifier}/runs/{runIdentifier}/occurrences/{occurrenceId}",
|
|
8498
|
-
method: "DELETE",
|
|
8499
|
-
auth: "service",
|
|
8500
|
-
responseKind: "json",
|
|
8501
|
-
errors: [
|
|
8502
|
-
"resource:not_found",
|
|
8503
|
-
"resource:conflict",
|
|
8504
|
-
"server:internal_error"
|
|
8505
|
-
]
|
|
8506
|
-
},
|
|
8812
|
+
...SDK_EVENT_ENDPOINT_DEFINITIONS,
|
|
8507
8813
|
sdkUpsertEntry: {
|
|
8508
8814
|
path: "/sdk/{siteId}/entries",
|
|
8509
8815
|
method: "POST",
|
|
@@ -8997,6 +9303,46 @@ const API_ENDPOINTS$1 = {
|
|
|
8997
9303
|
//#region ../surfaces/src/index.ts
|
|
8998
9304
|
const SURFACE_IDS = ["core", "macadamia"];
|
|
8999
9305
|
const DEFAULT_SURFACE_ID = "core";
|
|
9306
|
+
/**
|
|
9307
|
+
* Root hosts for each surface, keyed by deployment tier. The tier-keyed shape
|
|
9308
|
+
* makes it impossible to mis-order entries: callers like
|
|
9309
|
+
* `buildSurfaceAwareDashboardOriginForSurfaceId` look up by tier directly
|
|
9310
|
+
* rather than relying on positional alignment between arrays.
|
|
9311
|
+
*/
|
|
9312
|
+
const SURFACE_ROOT_HOSTS = {
|
|
9313
|
+
core: {
|
|
9314
|
+
local: "localhost",
|
|
9315
|
+
prod: "riverbankcms.com"
|
|
9316
|
+
},
|
|
9317
|
+
macadamia: {
|
|
9318
|
+
local: "macadamia.localhost",
|
|
9319
|
+
prod: "macadamia.studio"
|
|
9320
|
+
}
|
|
9321
|
+
};
|
|
9322
|
+
const SURFACE_SITE_ROOT_HOSTS = {
|
|
9323
|
+
core: {
|
|
9324
|
+
local: "localhost",
|
|
9325
|
+
prod: "riverbanksites.com"
|
|
9326
|
+
},
|
|
9327
|
+
macadamia: {
|
|
9328
|
+
local: "macadamia.localhost",
|
|
9329
|
+
prod: "macadamia.studio"
|
|
9330
|
+
}
|
|
9331
|
+
};
|
|
9332
|
+
const SURFACE_SITE_ROOT_HOST_ALIASES = { core: { prod: ["preview.riverbanksites.com"] } };
|
|
9333
|
+
function surfaceHostTableValues(table) {
|
|
9334
|
+
return Object.values(table).flatMap((byTier) => Object.values(byTier).flat());
|
|
9335
|
+
}
|
|
9336
|
+
function siteSlugLabelUnderRoot(host, siteRootHost) {
|
|
9337
|
+
if (!host.endsWith(`.${siteRootHost}`)) return [];
|
|
9338
|
+
return host.slice(0, host.length - siteRootHost.length - 1).split(".").slice(-1);
|
|
9339
|
+
}
|
|
9340
|
+
function deriveSurfaceOwnedSiteSlugs() {
|
|
9341
|
+
const siteRootHosts = [...surfaceHostTableValues(SURFACE_SITE_ROOT_HOSTS), ...surfaceHostTableValues(SURFACE_SITE_ROOT_HOST_ALIASES)];
|
|
9342
|
+
const labels = [...surfaceHostTableValues(SURFACE_ROOT_HOSTS), ...siteRootHosts].flatMap((host) => siteRootHosts.flatMap((root) => siteSlugLabelUnderRoot(host, root)));
|
|
9343
|
+
return [...new Set(labels)].sort();
|
|
9344
|
+
}
|
|
9345
|
+
deriveSurfaceOwnedSiteSlugs();
|
|
9000
9346
|
[...SURFACE_IDS.filter((surfaceId) => surfaceId !== DEFAULT_SURFACE_ID)];
|
|
9001
9347
|
//#endregion
|
|
9002
9348
|
//#region ../api/src/url.ts
|
|
@@ -9609,7 +9955,7 @@ var SimpleCache = class {
|
|
|
9609
9955
|
* 1. This constant
|
|
9610
9956
|
* 2. The "version" field in package.json
|
|
9611
9957
|
*/
|
|
9612
|
-
const SDK_VERSION = "0.
|
|
9958
|
+
const SDK_VERSION = "0.147.0";
|
|
9613
9959
|
//#endregion
|
|
9614
9960
|
//#region src/client/error.ts
|
|
9615
9961
|
let _Symbol$for;
|
|
@@ -10812,13 +11158,16 @@ const SURFACE_FOREGROUND_CSS_VARS = {
|
|
|
10812
11158
|
text: "--rb-surface-text-color",
|
|
10813
11159
|
heading: "--rb-surface-heading-color",
|
|
10814
11160
|
link: "--rb-surface-link-color",
|
|
11161
|
+
linkHover: "--rb-surface-link-hover-color",
|
|
10815
11162
|
supporting: "--rb-surface-supporting-color"
|
|
10816
11163
|
};
|
|
10817
11164
|
const DEFAULT_SURFACE_TEXT_COLOR = "rgb(var(--tb-text, 17 24 39))";
|
|
11165
|
+
const DEFAULT_SURFACE_LINK_COLOR = "rgb(var(--tb-primary, var(--tb-text, 17 24 39)))";
|
|
10818
11166
|
const DEFAULT_ROLE_FALLBACKS = {
|
|
10819
11167
|
text: DEFAULT_SURFACE_TEXT_COLOR,
|
|
10820
11168
|
heading: DEFAULT_SURFACE_TEXT_COLOR,
|
|
10821
|
-
link:
|
|
11169
|
+
link: DEFAULT_SURFACE_LINK_COLOR,
|
|
11170
|
+
linkHover: DEFAULT_SURFACE_LINK_COLOR,
|
|
10822
11171
|
supporting: "rgb(var(--tb-mutedText, 100 116 139))"
|
|
10823
11172
|
};
|
|
10824
11173
|
function requireSurfaceColorValue(role, value) {
|
|
@@ -10828,10 +11177,12 @@ function requireSurfaceColorValue(role, value) {
|
|
|
10828
11177
|
}
|
|
10829
11178
|
function completeSurfaceForegrounds(input) {
|
|
10830
11179
|
const text = requireSurfaceColorValue("text", input.text);
|
|
11180
|
+
const link = input.link === void 0 ? text : requireSurfaceColorValue("link", input.link);
|
|
10831
11181
|
return {
|
|
10832
11182
|
text,
|
|
10833
11183
|
heading: input.heading === void 0 ? text : requireSurfaceColorValue("heading", input.heading),
|
|
10834
|
-
link
|
|
11184
|
+
link,
|
|
11185
|
+
linkHover: input.linkHover === void 0 ? link : requireSurfaceColorValue("linkHover", input.linkHover),
|
|
10835
11186
|
supporting: input.supporting === void 0 ? text : requireSurfaceColorValue("supporting", input.supporting)
|
|
10836
11187
|
};
|
|
10837
11188
|
}
|
|
@@ -10839,6 +11190,7 @@ function surfaceForegroundValue(role, outsideProviderFallback = DEFAULT_ROLE_FAL
|
|
|
10839
11190
|
const roleVariable = SURFACE_FOREGROUND_CSS_VARS[role];
|
|
10840
11191
|
const fallback = requireSurfaceColorValue("fallback", outsideProviderFallback);
|
|
10841
11192
|
if (role === "text") return `var(${roleVariable}, ${fallback})`;
|
|
11193
|
+
if (role === "linkHover") return `var(${roleVariable}, ${surfaceForegroundValue("link", fallback)})`;
|
|
10842
11194
|
return `var(${roleVariable}, var(${SURFACE_FOREGROUND_CSS_VARS.text}, ${fallback}))`;
|
|
10843
11195
|
}
|
|
10844
11196
|
function surfaceForegroundValueWithOpacity(role, opacityPercent) {
|
|
@@ -10852,9 +11204,25 @@ function surfaceForegroundStyle(input) {
|
|
|
10852
11204
|
[SURFACE_FOREGROUND_CSS_VARS.text]: foregrounds.text,
|
|
10853
11205
|
[SURFACE_FOREGROUND_CSS_VARS.heading]: foregrounds.heading,
|
|
10854
11206
|
[SURFACE_FOREGROUND_CSS_VARS.link]: foregrounds.link,
|
|
10855
|
-
[SURFACE_FOREGROUND_CSS_VARS.
|
|
11207
|
+
[SURFACE_FOREGROUND_CSS_VARS.linkHover]: foregrounds.linkHover,
|
|
11208
|
+
[SURFACE_FOREGROUND_CSS_VARS.supporting]: foregrounds.supporting,
|
|
11209
|
+
"--rb-surface-link-hover-decoration": hoverDecoration(input)
|
|
10856
11210
|
};
|
|
10857
11211
|
}
|
|
11212
|
+
function surfaceForegroundInputFromResolved(foreground, color) {
|
|
11213
|
+
const { roles } = foreground;
|
|
11214
|
+
return {
|
|
11215
|
+
text: color(roles.text),
|
|
11216
|
+
heading: color(roles.heading),
|
|
11217
|
+
link: color(roles.link),
|
|
11218
|
+
linkHover: color(roles.linkHover),
|
|
11219
|
+
supporting: color(roles.supporting),
|
|
11220
|
+
hoverDecoration: foreground.hoverDecoration
|
|
11221
|
+
};
|
|
11222
|
+
}
|
|
11223
|
+
function hoverDecoration(input) {
|
|
11224
|
+
return input.hoverDecoration ?? "underline";
|
|
11225
|
+
}
|
|
10858
11226
|
//#endregion
|
|
10859
11227
|
//#region ../theme-core/src/buttons/constants.ts
|
|
10860
11228
|
/**
|
|
@@ -11711,6 +12079,64 @@ function parseAlpha(source) {
|
|
|
11711
12079
|
function isRgbChannel(value) {
|
|
11712
12080
|
return Number.isFinite(value) && value >= 0 && value <= 255;
|
|
11713
12081
|
}
|
|
12082
|
+
/**
|
|
12083
|
+
* Derive the hover foreground that belongs with a resolved resting foreground.
|
|
12084
|
+
*
|
|
12085
|
+
* A resting foreground is chosen to be legible against a known surface. A hover
|
|
12086
|
+
* state derived from it stays within a bounded distance of that colour, so it
|
|
12087
|
+
* inherits most of the resting colour's contrast margin instead of asserting
|
|
12088
|
+
* an unrelated brand colour that no one checked against the surface.
|
|
12089
|
+
*
|
|
12090
|
+
* That bounded-distance property is what lets this be used on a transparent
|
|
12091
|
+
* overlay header, where the backdrop is only partly knowable: the scrolled
|
|
12092
|
+
* state composites a 60% glass tint over arbitrary page content, so no
|
|
12093
|
+
* compile-time contrast proof is available there. Staying near a colour that
|
|
12094
|
+
* is already trusted in both states is a weaker claim than a contrast proof,
|
|
12095
|
+
* and it is one this function can actually keep.
|
|
12096
|
+
*
|
|
12097
|
+
* Returns `null` when the resting token is not a plain palette token — an
|
|
12098
|
+
* already-faded or raw value has no well-defined softening, and the caller
|
|
12099
|
+
* should leave hover alone rather than guess.
|
|
12100
|
+
*/
|
|
12101
|
+
function deriveForegroundHoverToken(restingToken) {
|
|
12102
|
+
const parts = parseColorTokenParts(restingToken);
|
|
12103
|
+
if (parts.kind !== "token") return null;
|
|
12104
|
+
if (parts.opacityPercent !== null) return null;
|
|
12105
|
+
return parseThemeColorToken(`${parts.token}/85`);
|
|
12106
|
+
}
|
|
12107
|
+
/**
|
|
12108
|
+
* Prefer an authored hover that survives every measured backdrop, then a
|
|
12109
|
+
* checked softening of the resting colour. A null backdrop set represents a
|
|
12110
|
+
* trusted treatment: only an explicit authored hover may change the colour.
|
|
12111
|
+
* When neither option works, retain the resting colour and underline it.
|
|
12112
|
+
*/
|
|
12113
|
+
function planForegroundHover(input) {
|
|
12114
|
+
const { restingToken, candidate, palette, backdrops } = input;
|
|
12115
|
+
if (candidate && candidate !== restingToken) {
|
|
12116
|
+
if (backdrops === null || survivesEveryBackdrop(candidate, palette, backdrops)) return {
|
|
12117
|
+
kind: "candidate",
|
|
12118
|
+
token: candidate,
|
|
12119
|
+
decoration: "initial"
|
|
12120
|
+
};
|
|
12121
|
+
}
|
|
12122
|
+
const softened = deriveForegroundHoverToken(restingToken);
|
|
12123
|
+
if (softened && backdrops && survivesEveryBackdrop(softened, palette, backdrops)) return {
|
|
12124
|
+
kind: "softened",
|
|
12125
|
+
token: softened,
|
|
12126
|
+
decoration: "initial"
|
|
12127
|
+
};
|
|
12128
|
+
return {
|
|
12129
|
+
kind: "resting",
|
|
12130
|
+
token: restingToken,
|
|
12131
|
+
decoration: "underline"
|
|
12132
|
+
};
|
|
12133
|
+
}
|
|
12134
|
+
function survivesEveryBackdrop(token, palette, backdrops) {
|
|
12135
|
+
return backdrops.length > 0 && backdrops.every((backdrop) => {
|
|
12136
|
+
const foreground = resolveOpaqueSurfaceHex(token, palette, backdrop);
|
|
12137
|
+
return foreground !== null && contrastRatio(foreground, backdrop) >= 4.5;
|
|
12138
|
+
});
|
|
12139
|
+
}
|
|
11714
12140
|
//#endregion
|
|
11715
12141
|
//#region ../theme-core/src/surfaces/resolveSurfaceForeground.ts
|
|
11716
12142
|
const FALLBACK_TEXT_TOKENS = [
|
|
@@ -11757,12 +12183,16 @@ function resolveSurfaceForeground(background, palette, candidates = {}, options
|
|
|
11757
12183
|
}
|
|
11758
12184
|
function foregroundCandidates(background, overrides) {
|
|
11759
12185
|
return {
|
|
11760
|
-
text: overrides.text
|
|
11761
|
-
heading: overrides.heading
|
|
11762
|
-
link: overrides.link
|
|
11763
|
-
|
|
12186
|
+
text: candidateOrBackground(overrides.text, background?.textColor),
|
|
12187
|
+
heading: candidateOrBackground(overrides.heading, background?.headingColor),
|
|
12188
|
+
link: candidateOrBackground(overrides.link, background?.linkColor),
|
|
12189
|
+
linkHover: candidateOrBackground(overrides.linkHover),
|
|
12190
|
+
supporting: candidateOrBackground(overrides.supporting, background?.supportingColor)
|
|
11764
12191
|
};
|
|
11765
12192
|
}
|
|
12193
|
+
function candidateOrBackground(candidate, backgroundValue) {
|
|
12194
|
+
return candidate ?? backgroundValue ?? null;
|
|
12195
|
+
}
|
|
11766
12196
|
function resolveDeterministicForeground(backgroundReference, candidates, palette, compositeBase) {
|
|
11767
12197
|
const backgroundHex = resolveOpaqueSurfaceHex(backgroundReference, palette, compositeBase);
|
|
11768
12198
|
if (!backgroundHex) return resolveTrustedTreatmentForeground(candidates, palette);
|
|
@@ -11774,29 +12204,51 @@ function resolveDeterministicForeground(backgroundReference, candidates, palette
|
|
|
11774
12204
|
...FALLBACK_TEXT_TOKENS
|
|
11775
12205
|
], backgroundHex, palette, derivedOnToken ? [derivedOnToken] : []);
|
|
11776
12206
|
if (!text) return { kind: "unknown" };
|
|
11777
|
-
return {
|
|
11778
|
-
|
|
11779
|
-
|
|
11780
|
-
|
|
11781
|
-
|
|
11782
|
-
|
|
11783
|
-
|
|
11784
|
-
|
|
11785
|
-
};
|
|
12207
|
+
return knownForeground({
|
|
12208
|
+
text,
|
|
12209
|
+
heading: safeTokenOr(candidates.heading, text, backgroundHex, palette),
|
|
12210
|
+
link: safeTokenOr(candidates.link, text, backgroundHex, palette),
|
|
12211
|
+
supporting: safeTokenOr(candidates.supporting, text, backgroundHex, palette)
|
|
12212
|
+
}, {
|
|
12213
|
+
kind: "measured",
|
|
12214
|
+
backdropHex: backgroundHex
|
|
12215
|
+
}, candidates.linkHover, palette);
|
|
11786
12216
|
}
|
|
11787
12217
|
function resolveTrustedTreatmentForeground(candidates, palette) {
|
|
11788
12218
|
const text = canonicalToken(candidates.text, palette);
|
|
11789
12219
|
if (!text) return { kind: "unknown" };
|
|
12220
|
+
return knownForeground({
|
|
12221
|
+
text,
|
|
12222
|
+
heading: canonicalToken(candidates.heading, palette) ?? text,
|
|
12223
|
+
link: canonicalToken(candidates.link, palette) ?? text,
|
|
12224
|
+
supporting: canonicalToken(candidates.supporting, palette) ?? text
|
|
12225
|
+
}, { kind: "trusted-treatment" }, candidates.linkHover, palette);
|
|
12226
|
+
}
|
|
12227
|
+
function knownForeground(roles, provenance, hoverCandidate, palette) {
|
|
12228
|
+
const hover = planForegroundHover({
|
|
12229
|
+
restingToken: roles.link,
|
|
12230
|
+
candidate: canonicalHoverToken(hoverCandidate, palette),
|
|
12231
|
+
palette,
|
|
12232
|
+
backdrops: provenance.kind === "measured" ? [provenance.backdropHex] : null
|
|
12233
|
+
});
|
|
11790
12234
|
return {
|
|
11791
12235
|
kind: "known",
|
|
12236
|
+
provenance,
|
|
11792
12237
|
roles: {
|
|
11793
|
-
|
|
11794
|
-
|
|
11795
|
-
|
|
11796
|
-
|
|
11797
|
-
}
|
|
12238
|
+
...roles,
|
|
12239
|
+
linkHover: hover.token
|
|
12240
|
+
},
|
|
12241
|
+
hoverDecoration: hover.decoration
|
|
11798
12242
|
};
|
|
11799
12243
|
}
|
|
12244
|
+
function canonicalHoverToken(reference, palette) {
|
|
12245
|
+
const token = parseThemeColorToken(reference);
|
|
12246
|
+
if (token) {
|
|
12247
|
+
const parts = parseColorTokenParts(token);
|
|
12248
|
+
if (parts.kind === "token" && resolveConcreteColorHex(parts.token, palette)) return token;
|
|
12249
|
+
}
|
|
12250
|
+
return canonicalToken(reference, palette);
|
|
12251
|
+
}
|
|
11800
12252
|
function safeTokenOr(candidate, fallback, backgroundHex, palette) {
|
|
11801
12253
|
return firstSafeToken([candidate], backgroundHex, palette) ?? fallback;
|
|
11802
12254
|
}
|
|
@@ -14736,6 +15188,43 @@ const effectCompositionSchema = z.object({
|
|
|
14736
15188
|
/** Effects applied on focus */
|
|
14737
15189
|
focus: z.array(effectApplicationSchema).optional()
|
|
14738
15190
|
});
|
|
15191
|
+
const policiesById = {
|
|
15192
|
+
"darken-background": "other",
|
|
15193
|
+
"lighten-background": "other",
|
|
15194
|
+
"fade-background": "other",
|
|
15195
|
+
"opacity-reduce": "other",
|
|
15196
|
+
"animated-gradient": "other",
|
|
15197
|
+
"background-on-hover": "paired-hover",
|
|
15198
|
+
"background-on-hover-alpha": "paired-hover",
|
|
15199
|
+
"border-glow": "other",
|
|
15200
|
+
"drop-shadow": "other",
|
|
15201
|
+
"inner-shadow": "other",
|
|
15202
|
+
"neumorphic-shadow": "other",
|
|
15203
|
+
"outer-glow": "other",
|
|
15204
|
+
"retro-3d-shadow": "other",
|
|
15205
|
+
"scale-up": "other",
|
|
15206
|
+
"scale-down": "other",
|
|
15207
|
+
lift: "other",
|
|
15208
|
+
"press-down": "other",
|
|
15209
|
+
pop: "other",
|
|
15210
|
+
"aurora-glow": "other",
|
|
15211
|
+
"cosmic-stardust": "other",
|
|
15212
|
+
"gradient-border-fill": "other",
|
|
15213
|
+
"animated-gradient-border-fill": "other",
|
|
15214
|
+
"border-bottom-grow": "other",
|
|
15215
|
+
"gradient-text": "other",
|
|
15216
|
+
"text-color-change": "text-colour",
|
|
15217
|
+
"border-color-change": "other",
|
|
15218
|
+
"sketchy-border": "other",
|
|
15219
|
+
"pulse-animation": "other",
|
|
15220
|
+
"nav-underline": "underline",
|
|
15221
|
+
"nav-frosted-base": "other",
|
|
15222
|
+
"nav-frosted-hover": "other",
|
|
15223
|
+
"nav-frosted-active": "other"
|
|
15224
|
+
};
|
|
15225
|
+
function navEffectPolicy(effectId) {
|
|
15226
|
+
return policiesById[effectId] ?? null;
|
|
15227
|
+
}
|
|
14739
15228
|
//#endregion
|
|
14740
15229
|
//#region ../theme-core/src/navigation/types.ts
|
|
14741
15230
|
/**
|
|
@@ -14824,6 +15313,16 @@ const navLinkStyleSchema = z.object({
|
|
|
14824
15313
|
/** Composable effects */
|
|
14825
15314
|
effects: effectCompositionSchema.optional()
|
|
14826
15315
|
});
|
|
15316
|
+
function navLinkHoverColorCandidate(style) {
|
|
15317
|
+
const effect = style?.effects?.hover?.find((item) => navEffectPolicy(item.effectId) === "text-colour");
|
|
15318
|
+
return parseThemeColorToken(effect?.options?.hoverColorToken ?? style?.hoverColorToken);
|
|
15319
|
+
}
|
|
15320
|
+
function navLinkOwnsHoverForeground(style) {
|
|
15321
|
+
return style?.effects?.hover?.some((effect) => navEffectPolicy(effect.effectId) === "paired-hover") ?? false;
|
|
15322
|
+
}
|
|
15323
|
+
function navLinkOwnsUnderline(style) {
|
|
15324
|
+
return style?.effects?.hover?.some((effect) => navEffectPolicy(effect.effectId) === "underline") ?? false;
|
|
15325
|
+
}
|
|
14827
15326
|
//#endregion
|
|
14828
15327
|
//#region ../theme-core/src/customCss/validation.ts
|
|
14829
15328
|
/**
|
|
@@ -25271,6 +25770,14 @@ const blockDesignFallback = {
|
|
|
25271
25770
|
};
|
|
25272
25771
|
blockDesignFallback.sectionSurface, blockDesignFallback.contentFrame, blockDesignFallback.sectionHeight, blockDesignFallback.heroLegibility, blockDesignFallback.imageSurfaceTreatment, blockDesignFallback.imageSurfaceMotion, blockDesignFallback.tileTreatment, blockDesignFallback.eventListTreatment, blockDesignFallback.eyebrowTreatment, blockDesignFallback.accordionIconTreatment, blockDesignFallback.composition;
|
|
25273
25772
|
//#endregion
|
|
25773
|
+
//#region ../theme-core/src/header/rootPaint.ts
|
|
25774
|
+
/** The nav container takes precedence when a floating header also has one. */
|
|
25775
|
+
function headerRootPaint(header) {
|
|
25776
|
+
const navContainerType = header?.navContainer?.type ?? "none";
|
|
25777
|
+
if (navContainerType === "glass" || navContainerType === "pill") return "contained-nav";
|
|
25778
|
+
return header?.variant === "floating" ? "overlay" : "own-surface";
|
|
25779
|
+
}
|
|
25780
|
+
//#endregion
|
|
25274
25781
|
//#region ../theme-core/src/site-styles/siteChromeBackgrounds.ts
|
|
25275
25782
|
const siteChromeBackgroundColorTokens = toSiteChromeBackgroundColorTokens(backgroundAppearanceColorTokenNames);
|
|
25276
25783
|
const quickSiteChromeBackgroundColorTokens = toSiteChromeBackgroundColorTokens(backgroundAppearanceQuickColorTokenNames);
|
|
@@ -25450,6 +25957,259 @@ z.object(headerPreferencesShape).omit({
|
|
|
25450
25957
|
structure: true
|
|
25451
25958
|
}).strict();
|
|
25452
25959
|
//#endregion
|
|
25960
|
+
//#region ../theme-core/src/navigation/presets.ts
|
|
25961
|
+
/**
|
|
25962
|
+
* Built-in nav link style presets
|
|
25963
|
+
*
|
|
25964
|
+
* Each preset uses composable effects to achieve its look.
|
|
25965
|
+
*/
|
|
25966
|
+
const NAV_LINK_PRESETS = {
|
|
25967
|
+
/**
|
|
25968
|
+
* Minimal - subtle color change on hover
|
|
25969
|
+
*/
|
|
25970
|
+
minimal: {
|
|
25971
|
+
name: "Minimal",
|
|
25972
|
+
typography: "body",
|
|
25973
|
+
fontWeight: "medium",
|
|
25974
|
+
textTransform: "none",
|
|
25975
|
+
italic: false,
|
|
25976
|
+
colorToken: "text",
|
|
25977
|
+
hoverColorToken: "primary",
|
|
25978
|
+
padding: "none",
|
|
25979
|
+
borderRadius: "none",
|
|
25980
|
+
effects: { hover: [{
|
|
25981
|
+
effectId: "text-color-change",
|
|
25982
|
+
options: { hoverColorToken: "primary" }
|
|
25983
|
+
}] }
|
|
25984
|
+
},
|
|
25985
|
+
/**
|
|
25986
|
+
* Underline - static underline appears on hover
|
|
25987
|
+
*/
|
|
25988
|
+
underline: {
|
|
25989
|
+
name: "Underline",
|
|
25990
|
+
typography: "body",
|
|
25991
|
+
fontWeight: "medium",
|
|
25992
|
+
textTransform: "none",
|
|
25993
|
+
italic: false,
|
|
25994
|
+
colorToken: "text",
|
|
25995
|
+
padding: "none",
|
|
25996
|
+
borderRadius: "none",
|
|
25997
|
+
effects: { hover: [{
|
|
25998
|
+
effectId: "nav-underline",
|
|
25999
|
+
options: { style: "static" }
|
|
26000
|
+
}] }
|
|
26001
|
+
},
|
|
26002
|
+
/**
|
|
26003
|
+
* Underline Grow - animated underline grows from center on hover
|
|
26004
|
+
*/
|
|
26005
|
+
"underline-grow": {
|
|
26006
|
+
name: "Underline Grow",
|
|
26007
|
+
typography: "body",
|
|
26008
|
+
fontWeight: "medium",
|
|
26009
|
+
textTransform: "none",
|
|
26010
|
+
italic: false,
|
|
26011
|
+
colorToken: "text",
|
|
26012
|
+
padding: "none",
|
|
26013
|
+
borderRadius: "none",
|
|
26014
|
+
effects: { hover: [{
|
|
26015
|
+
effectId: "nav-underline",
|
|
26016
|
+
options: { style: "grow" }
|
|
26017
|
+
}] }
|
|
26018
|
+
},
|
|
26019
|
+
/**
|
|
26020
|
+
* Capsule - pill-shaped background on hover
|
|
26021
|
+
*/
|
|
26022
|
+
capsule: {
|
|
26023
|
+
name: "Capsule",
|
|
26024
|
+
typography: "body",
|
|
26025
|
+
fontWeight: "medium",
|
|
26026
|
+
textTransform: "none",
|
|
26027
|
+
italic: false,
|
|
26028
|
+
colorToken: "text",
|
|
26029
|
+
padding: "compact",
|
|
26030
|
+
borderRadius: "full",
|
|
26031
|
+
effects: {
|
|
26032
|
+
hover: [{
|
|
26033
|
+
effectId: "background-on-hover-alpha",
|
|
26034
|
+
options: {
|
|
26035
|
+
colorToken: "primary",
|
|
26036
|
+
opacity: 10
|
|
26037
|
+
}
|
|
26038
|
+
}],
|
|
26039
|
+
active: [{
|
|
26040
|
+
effectId: "background-on-hover-alpha",
|
|
26041
|
+
options: {
|
|
26042
|
+
colorToken: "primary",
|
|
26043
|
+
opacity: 15
|
|
26044
|
+
}
|
|
26045
|
+
}]
|
|
26046
|
+
}
|
|
26047
|
+
},
|
|
26048
|
+
/**
|
|
26049
|
+
* Solid - solid background color on hover
|
|
26050
|
+
*/
|
|
26051
|
+
solid: {
|
|
26052
|
+
name: "Solid",
|
|
26053
|
+
typography: "body",
|
|
26054
|
+
fontWeight: "medium",
|
|
26055
|
+
textTransform: "none",
|
|
26056
|
+
italic: false,
|
|
26057
|
+
colorToken: "text",
|
|
26058
|
+
padding: "compact",
|
|
26059
|
+
borderRadius: "none",
|
|
26060
|
+
effects: {
|
|
26061
|
+
hover: [{
|
|
26062
|
+
effectId: "background-on-hover",
|
|
26063
|
+
options: {
|
|
26064
|
+
colorToken: "primary",
|
|
26065
|
+
textColorToken: "primaryForeground"
|
|
26066
|
+
}
|
|
26067
|
+
}],
|
|
26068
|
+
active: [{
|
|
26069
|
+
effectId: "background-on-hover",
|
|
26070
|
+
options: {
|
|
26071
|
+
colorToken: "primary",
|
|
26072
|
+
textColorToken: "primaryForeground"
|
|
26073
|
+
}
|
|
26074
|
+
}]
|
|
26075
|
+
}
|
|
26076
|
+
},
|
|
26077
|
+
/**
|
|
26078
|
+
* Scale - gentle scale-up on hover
|
|
26079
|
+
*/
|
|
26080
|
+
scale: {
|
|
26081
|
+
name: "Scale",
|
|
26082
|
+
typography: "body",
|
|
26083
|
+
fontWeight: "medium",
|
|
26084
|
+
textTransform: "none",
|
|
26085
|
+
italic: false,
|
|
26086
|
+
colorToken: "text",
|
|
26087
|
+
padding: "none",
|
|
26088
|
+
borderRadius: "none",
|
|
26089
|
+
effects: { hover: [{
|
|
26090
|
+
effectId: "scale-up",
|
|
26091
|
+
options: { scale: 1.05 }
|
|
26092
|
+
}] }
|
|
26093
|
+
},
|
|
26094
|
+
/**
|
|
26095
|
+
* Frosted - semi-transparent glass-like background
|
|
26096
|
+
*/
|
|
26097
|
+
frosted: {
|
|
26098
|
+
name: "Frosted",
|
|
26099
|
+
typography: "body",
|
|
26100
|
+
fontWeight: "medium",
|
|
26101
|
+
textTransform: "none",
|
|
26102
|
+
italic: false,
|
|
26103
|
+
colorToken: "text",
|
|
26104
|
+
padding: "compact",
|
|
26105
|
+
borderRadius: "md",
|
|
26106
|
+
effects: {
|
|
26107
|
+
base: [{ effectId: "nav-frosted-base" }],
|
|
26108
|
+
hover: [{ effectId: "nav-frosted-hover" }],
|
|
26109
|
+
active: [{ effectId: "nav-frosted-active" }]
|
|
26110
|
+
}
|
|
26111
|
+
}
|
|
26112
|
+
};
|
|
26113
|
+
/**
|
|
26114
|
+
* Get a nav link style preset by ID
|
|
26115
|
+
*/
|
|
26116
|
+
function getNavLinkPreset(presetId) {
|
|
26117
|
+
return NAV_LINK_PRESETS[presetId];
|
|
26118
|
+
}
|
|
26119
|
+
Object.keys(NAV_LINK_PRESETS);
|
|
26120
|
+
//#endregion
|
|
26121
|
+
//#region ../theme-core/src/header/legacyNavLinkStyle.ts
|
|
26122
|
+
function buildLegacyHeaderNavLinkStyle(header, contrastTreatment, navTextSize) {
|
|
26123
|
+
const navStyle = header.navStyle ?? "minimal";
|
|
26124
|
+
const basePreset = getNavLinkPreset(navStyle);
|
|
26125
|
+
if (!basePreset) return null;
|
|
26126
|
+
const style = {
|
|
26127
|
+
...basePreset,
|
|
26128
|
+
fontWeight: header.navWeight ?? basePreset.fontWeight,
|
|
26129
|
+
colorToken: (header.navColor ?? header.textColor)?.trim() || basePreset.colorToken,
|
|
26130
|
+
...contrastTreatment ? { contrastTreatment } : {},
|
|
26131
|
+
...navTextSize ? { textSize: navTextSize } : {}
|
|
26132
|
+
};
|
|
26133
|
+
if (header.navWeight === "bold" && navStyle === "solid") style.textTransform = "uppercase";
|
|
26134
|
+
applyLegacyGlassTreatment(style, header, navStyle);
|
|
26135
|
+
return style;
|
|
26136
|
+
}
|
|
26137
|
+
function applyLegacyGlassTreatment(style, header, navStyle) {
|
|
26138
|
+
if (header.navContainer?.type !== "glass" || navStyle !== "minimal") return;
|
|
26139
|
+
style.borderRadius = "full";
|
|
26140
|
+
style.effects = {
|
|
26141
|
+
...style.effects,
|
|
26142
|
+
hover: glassStateEffects(10),
|
|
26143
|
+
active: glassStateEffects(18)
|
|
26144
|
+
};
|
|
26145
|
+
}
|
|
26146
|
+
function glassStateEffects(opacity) {
|
|
26147
|
+
return [{
|
|
26148
|
+
effectId: "background-on-hover-alpha",
|
|
26149
|
+
options: {
|
|
26150
|
+
colorToken: "neutral-50",
|
|
26151
|
+
opacity
|
|
26152
|
+
}
|
|
26153
|
+
}, {
|
|
26154
|
+
effectId: "text-color-change",
|
|
26155
|
+
options: { hoverColorToken: "neutral-50" }
|
|
26156
|
+
}];
|
|
26157
|
+
}
|
|
26158
|
+
//#endregion
|
|
26159
|
+
//#region ../theme-core/src/header/openingForegroundProjection.ts
|
|
26160
|
+
function readOpeningForegroundProjection(header) {
|
|
26161
|
+
return header?.__runtimeOpeningForeground ?? null;
|
|
26162
|
+
}
|
|
26163
|
+
//#endregion
|
|
26164
|
+
//#region ../theme-core/src/header/effectiveNavLinkStyle.ts
|
|
26165
|
+
function effectiveHeaderNavLinkStyle(header, contrastTreatment = null, navTextSize = null) {
|
|
26166
|
+
if (!header) return null;
|
|
26167
|
+
if (!header.navLinkStyle) return buildLegacyHeaderNavLinkStyle(header, contrastTreatment, navTextSize);
|
|
26168
|
+
return {
|
|
26169
|
+
...header.navLinkStyle,
|
|
26170
|
+
...contrastTreatment ? { contrastTreatment } : {},
|
|
26171
|
+
...navTextSize ? { textSize: navTextSize } : {}
|
|
26172
|
+
};
|
|
26173
|
+
}
|
|
26174
|
+
function headerForegroundCandidates(header) {
|
|
26175
|
+
if (!header) return {};
|
|
26176
|
+
const style = effectiveHeaderNavLinkStyle(header);
|
|
26177
|
+
return {
|
|
26178
|
+
text: header.textColor ?? header.background?.textColor,
|
|
26179
|
+
link: style?.colorToken ?? header.navColor ?? header.textColor,
|
|
26180
|
+
linkHover: navLinkHoverColorCandidate(style)
|
|
26181
|
+
};
|
|
26182
|
+
}
|
|
26183
|
+
function headerLeafTextColor(header) {
|
|
26184
|
+
if (!header) return "text";
|
|
26185
|
+
return header.textColor ?? header.navColor ?? header.background?.textColor ?? header.navLinkStyle?.colorToken ?? "text";
|
|
26186
|
+
}
|
|
26187
|
+
/** Transparent chrome must reset the whole contract on its own root. */
|
|
26188
|
+
function transparentHeaderForegroundInput(header, palette) {
|
|
26189
|
+
const projection = readOpeningForegroundProjection(header);
|
|
26190
|
+
if (projection?.kind === "known") return surfaceForegroundInputFromResolved(projection, rgbColorValue);
|
|
26191
|
+
return authoredTransparentHeaderForegroundInput(header, palette);
|
|
26192
|
+
}
|
|
26193
|
+
function authoredTransparentHeaderForegroundInput(header, palette) {
|
|
26194
|
+
const text = headerLeafTextColor(header);
|
|
26195
|
+
const style = effectiveHeaderNavLinkStyle(header);
|
|
26196
|
+
const link = style?.colorToken ?? text;
|
|
26197
|
+
const restingToken = parseThemeColorToken(link) ?? parseThemeColorToken("text");
|
|
26198
|
+
if (!restingToken) throw new Error("Built-in text colour token is invalid");
|
|
26199
|
+
const hover = planForegroundHover({
|
|
26200
|
+
restingToken,
|
|
26201
|
+
candidate: navLinkOwnsHoverForeground(style) ? null : navLinkHoverColorCandidate(style),
|
|
26202
|
+
palette,
|
|
26203
|
+
backdrops: null
|
|
26204
|
+
});
|
|
26205
|
+
return {
|
|
26206
|
+
text: rgbColorValue(text),
|
|
26207
|
+
link: rgbColorValue(link),
|
|
26208
|
+
linkHover: rgbColorValue(hover.token),
|
|
26209
|
+
hoverDecoration: navLinkOwnsUnderline(style) ? "initial" : hover.decoration
|
|
26210
|
+
};
|
|
26211
|
+
}
|
|
26212
|
+
//#endregion
|
|
25453
26213
|
//#region ../theme-core/src/site-styles/pageDesignAuthority.ts
|
|
25454
26214
|
const nonEmptyStringSchema = z.string().min(1);
|
|
25455
26215
|
const blockContentVersionIdSchema = nonEmptyStringSchema.transform(asBlockContentVersionId);
|
|
@@ -27441,6 +28201,28 @@ function createTransformRegistry(definitions) {
|
|
|
27441
28201
|
return registry;
|
|
27442
28202
|
}
|
|
27443
28203
|
//#endregion
|
|
28204
|
+
//#region ../theme-core/src/footer/effectiveNavLinkStyle.ts
|
|
28205
|
+
function effectiveFooterNavLinkStyle(footer) {
|
|
28206
|
+
if (!footer) return null;
|
|
28207
|
+
if (footer.navLinkStyle) return footer.navLinkStyle;
|
|
28208
|
+
const basePreset = getNavLinkPreset(footer.navStyle ?? "minimal");
|
|
28209
|
+
if (!basePreset) return null;
|
|
28210
|
+
return {
|
|
28211
|
+
...basePreset,
|
|
28212
|
+
fontWeight: footer.navWeight ?? basePreset.fontWeight,
|
|
28213
|
+
colorToken: footer.navColor?.trim() || basePreset.colorToken
|
|
28214
|
+
};
|
|
28215
|
+
}
|
|
28216
|
+
function footerForegroundCandidates(footer, proseHoverCandidate) {
|
|
28217
|
+
if (!footer) return {};
|
|
28218
|
+
const style = effectiveFooterNavLinkStyle(footer);
|
|
28219
|
+
return {
|
|
28220
|
+
text: footer.background?.textColor,
|
|
28221
|
+
link: style?.colorToken ?? footer.navColor ?? footer.background?.textColor,
|
|
28222
|
+
linkHover: navLinkOwnsHoverForeground(style) ? proseHoverCandidate : navLinkHoverColorCandidate(style)
|
|
28223
|
+
};
|
|
28224
|
+
}
|
|
28225
|
+
//#endregion
|
|
27444
28226
|
//#region ../blocks/src/system/fields/backgroundContent.ts
|
|
27445
28227
|
function parseBackgroundContent(value) {
|
|
27446
28228
|
const result = boxBackgroundSchema.safeParse(value);
|
|
@@ -27458,33 +28240,28 @@ function resolveBackgroundColorValue(value, context) {
|
|
|
27458
28240
|
//#endregion
|
|
27459
28241
|
//#region ../blocks/src/system/transforms/registry/_utils/surfaceForegroundStyles.ts
|
|
27460
28242
|
const contextualButtonStylesCache = /* @__PURE__ */ new WeakMap();
|
|
27461
|
-
function resolveHeaderLeafTextColor(header) {
|
|
27462
|
-
return header?.textColor ?? header?.navColor ?? header?.background?.textColor ?? header?.navLinkStyle?.colorToken ?? "text";
|
|
27463
|
-
}
|
|
27464
28243
|
function resolveHeaderRootForeground(header, palette, isTransparent) {
|
|
27465
|
-
if (isTransparent) return { kind: "unknown" };
|
|
28244
|
+
if (isTransparent) return readOpeningForegroundProjection(header) ?? { kind: "unknown" };
|
|
27466
28245
|
const background = header?.background;
|
|
27467
28246
|
return resolveSurfaceForeground(background ?? {
|
|
27468
28247
|
type: "color",
|
|
27469
28248
|
color: "surface"
|
|
27470
|
-
}, palette,
|
|
27471
|
-
|
|
27472
|
-
|
|
27473
|
-
|
|
28249
|
+
}, palette, headerForegroundCandidates(header));
|
|
28250
|
+
}
|
|
28251
|
+
function resolveFooterRootForeground(footer, palette, proseHoverCandidate) {
|
|
28252
|
+
return resolveSurfaceForeground(footer?.background ?? {
|
|
28253
|
+
type: "color",
|
|
28254
|
+
color: "surface"
|
|
28255
|
+
}, palette, footerForegroundCandidates(footer, proseHoverCandidate), { compositeBase: "background" });
|
|
27474
28256
|
}
|
|
27475
28257
|
function resolveSurfaceForegroundStyles(value, context, options) {
|
|
27476
28258
|
const input = parseBackgroundContent(value);
|
|
27477
|
-
const foreground = input ? resolveSurfaceForeground(input, context.theme.palette, {}, { compositeBase: options?.fallbackToken }) : { kind: "unknown" };
|
|
28259
|
+
const foreground = input ? resolveSurfaceForeground(input, context.theme.palette, { linkHover: context.proseHoverCandidate }, { compositeBase: options?.fallbackToken }) : { kind: "unknown" };
|
|
27478
28260
|
const buttonStyles = resolveContextualButtonStyles(input, foreground, context, options);
|
|
27479
28261
|
if (foreground.kind === "unknown") return buttonStyles;
|
|
27480
28262
|
return {
|
|
27481
28263
|
...buttonStyles,
|
|
27482
|
-
...surfaceForegroundStyle(
|
|
27483
|
-
text: resolveBackgroundColorValue(foreground.roles.text, context),
|
|
27484
|
-
heading: resolveBackgroundColorValue(foreground.roles.heading, context),
|
|
27485
|
-
link: resolveBackgroundColorValue(foreground.roles.link, context),
|
|
27486
|
-
supporting: resolveBackgroundColorValue(foreground.roles.supporting, context)
|
|
27487
|
-
})
|
|
28264
|
+
...surfaceForegroundStyle(surfaceForegroundInputFromResolved(foreground, (token) => resolveBackgroundColorValue(token, context)))
|
|
27488
28265
|
};
|
|
27489
28266
|
}
|
|
27490
28267
|
function resolveContextualButtonStyles(background, foreground, context, options) {
|
|
@@ -33333,10 +34110,7 @@ function resolveBackgroundVisualStyles(backgroundColor, defaultToken = "surface"
|
|
|
33333
34110
|
};
|
|
33334
34111
|
}
|
|
33335
34112
|
function resolveHeaderVisualStyles(header) {
|
|
33336
|
-
|
|
33337
|
-
const hasContainedNav = navContainerType === "glass" || navContainerType === "pill";
|
|
33338
|
-
const hasOverlayVariant = header?.variant === "floating";
|
|
33339
|
-
if (hasContainedNav || hasOverlayVariant) return {
|
|
34113
|
+
if (headerRootPaint(header) !== "own-surface") return {
|
|
33340
34114
|
backgroundToken: "transparent",
|
|
33341
34115
|
isTransparent: true
|
|
33342
34116
|
};
|
|
@@ -33347,23 +34121,7 @@ function resolveHeaderVisualStyles(header) {
|
|
|
33347
34121
|
}
|
|
33348
34122
|
function resolvedForegroundStyle(foreground) {
|
|
33349
34123
|
if (foreground.kind === "unknown") return void 0;
|
|
33350
|
-
|
|
33351
|
-
return surfaceForegroundStyle({
|
|
33352
|
-
text: rgbColorValue(roles.text),
|
|
33353
|
-
heading: rgbColorValue(roles.heading),
|
|
33354
|
-
link: rgbColorValue(roles.link),
|
|
33355
|
-
supporting: rgbColorValue(roles.supporting)
|
|
33356
|
-
});
|
|
33357
|
-
}
|
|
33358
|
-
function resolveFooterRootForeground(footer, palette) {
|
|
33359
|
-
const background = footer?.background;
|
|
33360
|
-
return resolveSurfaceForeground(background ?? {
|
|
33361
|
-
type: "color",
|
|
33362
|
-
color: "surface"
|
|
33363
|
-
}, palette, {
|
|
33364
|
-
text: background?.textColor,
|
|
33365
|
-
link: footer?.navLinkStyle?.colorToken ?? footer?.navColor ?? background?.textColor
|
|
33366
|
-
});
|
|
34124
|
+
return surfaceForegroundStyle(surfaceForegroundInputFromResolved(foreground, rgbColorValue));
|
|
33367
34125
|
}
|
|
33368
34126
|
function footerBottomBarBorderWidthStyle(width) {
|
|
33369
34127
|
if (!width) return void 0;
|
|
@@ -33390,8 +34148,7 @@ const headerRootClassTransform = {
|
|
|
33390
34148
|
const placement = planSiteChromePlacement(parseHeaderPositioning(content.positioning));
|
|
33391
34149
|
const header = asPartialObject(value);
|
|
33392
34150
|
const visuals = resolveHeaderVisualStyles(header);
|
|
33393
|
-
const
|
|
33394
|
-
const hasContainedNav = navContainerType === "glass" || navContainerType === "pill";
|
|
34151
|
+
const hasContainedNav = headerRootPaint(header) === "contained-nav";
|
|
33395
34152
|
const backgroundClass = visuals.isTransparent || hasContainedNav ? "rb-bg-transparent" : null;
|
|
33396
34153
|
const classes = [config.base, backgroundClass];
|
|
33397
34154
|
if (!hasContainedNav) {
|
|
@@ -33434,7 +34191,7 @@ const headerRootStyleTransform = {
|
|
|
33434
34191
|
run: (value, _options, context) => {
|
|
33435
34192
|
const header = asPartialObject(value);
|
|
33436
34193
|
const visuals = resolveHeaderVisualStyles(header);
|
|
33437
|
-
return mergeStyles(resolvedForegroundStyle(resolveHeaderRootForeground(header, context.theme.palette, visuals.isTransparent)) ?? { color: rgbColorValue(
|
|
34194
|
+
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"));
|
|
33438
34195
|
}
|
|
33439
34196
|
};
|
|
33440
34197
|
const headerSectionBackgroundTransform = {
|
|
@@ -33442,9 +34199,7 @@ const headerSectionBackgroundTransform = {
|
|
|
33442
34199
|
kind: "string",
|
|
33443
34200
|
summary: "Resolve the inner site-header section background token",
|
|
33444
34201
|
run: (value) => {
|
|
33445
|
-
|
|
33446
|
-
const navContainerType = header?.navContainer?.type ?? "none";
|
|
33447
|
-
return header?.variant === "floating" || navContainerType === "glass" || navContainerType === "pill" ? "raw:transparent" : "background";
|
|
34202
|
+
return headerRootPaint(asPartialObject(value)) !== "own-surface" ? "raw:transparent" : "background";
|
|
33448
34203
|
}
|
|
33449
34204
|
};
|
|
33450
34205
|
const footerRootStyleTransform = {
|
|
@@ -33462,7 +34217,7 @@ const footerRootStyleTransform = {
|
|
|
33462
34217
|
styleParts.push(backgroundColorStyle(token));
|
|
33463
34218
|
}
|
|
33464
34219
|
}
|
|
33465
|
-
styleParts.push(resolvedForegroundStyle(resolveFooterRootForeground(footer, context.theme.palette)));
|
|
34220
|
+
styleParts.push(resolvedForegroundStyle(resolveFooterRootForeground(footer, context.theme.palette, context.proseHoverCandidate)));
|
|
33466
34221
|
styleParts.push(borderColorStyle("border"));
|
|
33467
34222
|
return mergeStyles(...styleParts);
|
|
33468
34223
|
}
|
|
@@ -33524,22 +34279,28 @@ const footerBottomBarStyleTransform = {
|
|
|
33524
34279
|
run: (value, _options, context) => {
|
|
33525
34280
|
const footer = asPartialObject(value);
|
|
33526
34281
|
const bottomBar = footer?.bottomBar;
|
|
33527
|
-
|
|
33528
|
-
const background = bottomBar?.background;
|
|
33529
|
-
if (background?.type === "color") styleParts.push(backgroundColorStyle(background.color ?? "surface"));
|
|
33530
|
-
styleParts.push(borderColorStyle(bottomBar?.borderTop?.colorToken ?? "border"), footerBottomBarBorderWidthStyle(bottomBar?.borderTop?.width));
|
|
33531
|
-
const foreground = resolveSurfaceForeground(background?.type === "color" ? background : {
|
|
33532
|
-
type: "color",
|
|
33533
|
-
color: "transparent"
|
|
33534
|
-
}, context.theme.palette, {
|
|
33535
|
-
text: bottomBar?.textColor,
|
|
33536
|
-
link: footer?.bottomTextLinkStyle?.colorToken ?? bottomBar?.textColor
|
|
33537
|
-
});
|
|
33538
|
-
if (background?.type === "color") styleParts.push(resolvedForegroundStyle(foreground));
|
|
33539
|
-
else if (bottomBar?.textColor) styleParts.push(textColorStyle(bottomBar.textColor));
|
|
33540
|
-
return mergeStyles(...styleParts);
|
|
34282
|
+
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));
|
|
33541
34283
|
}
|
|
33542
34284
|
};
|
|
34285
|
+
function footerBottomBarForegroundStyle(footer, palette) {
|
|
34286
|
+
if (!footer?.bottomBar) return void 0;
|
|
34287
|
+
const bar = footer.bottomBar;
|
|
34288
|
+
if (bar.background?.type !== "color") return backgroundlessBottomBarForegroundStyle(footer);
|
|
34289
|
+
return resolvedForegroundStyle(resolveSurfaceForeground(bar.background, palette, {
|
|
34290
|
+
text: bar.textColor,
|
|
34291
|
+
link: footer.bottomTextLinkStyle?.colorToken ?? bar.textColor,
|
|
34292
|
+
linkHover: footer.bottomTextLinkStyle?.hoverColorToken
|
|
34293
|
+
}, { compositeBase: measuredFooterBackdrop(footer, palette) }));
|
|
34294
|
+
}
|
|
34295
|
+
function backgroundlessBottomBarForegroundStyle(footer) {
|
|
34296
|
+
if (footer.background?.contentOwner === "site-chrome-editor") return;
|
|
34297
|
+
const textColor = footer.bottomBar?.textColor;
|
|
34298
|
+
return textColor ? textColorStyle(textColor) : void 0;
|
|
34299
|
+
}
|
|
34300
|
+
function measuredFooterBackdrop(footer, palette) {
|
|
34301
|
+
const foreground = resolveFooterRootForeground(footer, palette);
|
|
34302
|
+
return foreground.kind === "known" && foreground.provenance.kind === "measured" ? foreground.provenance.backdropHex : null;
|
|
34303
|
+
}
|
|
33543
34304
|
const footerSplitMainClassTransform = {
|
|
33544
34305
|
id: "layout.footerSplitMainClass",
|
|
33545
34306
|
kind: "string",
|
|
@@ -33635,7 +34396,7 @@ function chromeSurfaceTextToken(surface, theme, palette) {
|
|
|
33635
34396
|
case "header-root": {
|
|
33636
34397
|
const header = theme.header;
|
|
33637
34398
|
const foreground = resolveHeaderRootForeground(header, palette, resolveHeaderVisualStyles(header).isTransparent);
|
|
33638
|
-
return foreground.kind === "known" ? foreground.roles.text :
|
|
34399
|
+
return foreground.kind === "known" ? foreground.roles.text : headerLeafTextColor(header);
|
|
33639
34400
|
}
|
|
33640
34401
|
case "header-mobile-panel": return theme.header?.dropdownStyle?.textColor ?? "text";
|
|
33641
34402
|
case "footer-root": {
|
|
@@ -34214,13 +34975,13 @@ const hours = stack({
|
|
|
34214
34975
|
as: "p",
|
|
34215
34976
|
className: "rb-caption rb-opacity-70"
|
|
34216
34977
|
}, bind("module.timeZone"), when("module.timeZone"))], when("module.kind", { equals: "opening-hours" }));
|
|
34217
|
-
const socials = inline({ className: "rb-
|
|
34978
|
+
const socials = inline({ className: "rb-footer-socials" }, [link({
|
|
34218
34979
|
href: { $bind: { from: "social.href" } },
|
|
34219
34980
|
target: "_blank",
|
|
34220
34981
|
rel: "noreferrer noopener",
|
|
34221
34982
|
"aria-label": { $bind: { from: "social.label" } },
|
|
34222
|
-
className: "rb-nav-text transition-theme-standard"
|
|
34223
|
-
}, [icon({ className: "rb-
|
|
34983
|
+
className: "rb-footer-social-link rb-nav-text transition-theme-standard"
|
|
34984
|
+
}, [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" }));
|
|
34224
34985
|
const authoredCopy = richText({
|
|
34225
34986
|
className: "rb-prose rb-prose-sm rb-max-w-none",
|
|
34226
34987
|
style: textColorStyle("text/80")
|
|
@@ -35717,7 +36478,9 @@ const bookingWizard = bookingForm(withApiBindings({
|
|
|
35717
36478
|
} },
|
|
35718
36479
|
formId: { $bind: { from: "content.formId" } },
|
|
35719
36480
|
form: { $bind: { from: "data.form" } },
|
|
35720
|
-
services: { $bind: { from: "data.services" } }
|
|
36481
|
+
services: { $bind: { from: "data.services" } },
|
|
36482
|
+
mailingList: { $bind: { from: "$root.mailingList" } },
|
|
36483
|
+
siteName: { $bind: { from: "$root.siteName" } }
|
|
35721
36484
|
}));
|
|
35722
36485
|
/** Both variants sit in the same section shell; only the inner layout differs. */
|
|
35723
36486
|
function bookingSection(children) {
|
|
@@ -36228,6 +36991,7 @@ const publicEventLoaderQuerySchemaShape = {
|
|
|
36228
36991
|
seriesSlug: z.string().optional(),
|
|
36229
36992
|
includeOccurrenceId: z.string().optional(),
|
|
36230
36993
|
readIntent: z.string().optional(),
|
|
36994
|
+
detailAdmission: z.string().optional(),
|
|
36231
36995
|
detailLevel: z.string().optional(),
|
|
36232
36996
|
readProfile: z.string().optional()
|
|
36233
36997
|
};
|
|
@@ -36394,11 +37158,11 @@ const publicEventBookingAvailabilitySchema = z.discriminatedUnion("kind", [z.obj
|
|
|
36394
37158
|
"series_archived",
|
|
36395
37159
|
"parent_archived",
|
|
36396
37160
|
"parent_inconsistent",
|
|
36397
|
-
"not_public",
|
|
36398
37161
|
"already_started",
|
|
36399
37162
|
"enrollment_closed"
|
|
36400
37163
|
])
|
|
36401
37164
|
})]);
|
|
37165
|
+
const publicEventBookingClosedDetailSchema = z.discriminatedUnion("kind", [z.object({ kind: z.literal("opensSoon") }), z.object({ kind: z.literal("paused") })]);
|
|
36402
37166
|
const publicRunSessionSchema = z.object({
|
|
36403
37167
|
occurrenceId: z.string(),
|
|
36404
37168
|
startsAt: z.string(),
|
|
@@ -36443,6 +37207,7 @@ const publicEventBaseSchema = z.object({
|
|
|
36443
37207
|
destination: publicEventDestinationSchema,
|
|
36444
37208
|
requiresRegistration: z.boolean(),
|
|
36445
37209
|
bookingAvailability: publicEventBookingAvailabilitySchema,
|
|
37210
|
+
bookingClosedDetail: publicEventBookingClosedDetailSchema.optional(),
|
|
36446
37211
|
deliveryMode: z.enum([
|
|
36447
37212
|
"in_person",
|
|
36448
37213
|
"online",
|
|
@@ -37140,7 +37905,13 @@ const eventRegistrationHydrationSchemaShape = {
|
|
|
37140
37905
|
spamProtectionEnabled: z.boolean().optional(),
|
|
37141
37906
|
supportEmail: z.string().optional(),
|
|
37142
37907
|
sitePasses: publicPassProductCollectionSchema.nullable().optional(),
|
|
37143
|
-
siteMemberships: publicMembershipProductCollectionSchema.nullable().optional()
|
|
37908
|
+
siteMemberships: publicMembershipProductCollectionSchema.nullable().optional(),
|
|
37909
|
+
mailingList: z.unknown().transform((value) => {
|
|
37910
|
+
if (value === void 0) return void 0;
|
|
37911
|
+
const parsed = parseMailingListRuntimeContext(value);
|
|
37912
|
+
return parsed.ok ? parsed.value : void 0;
|
|
37913
|
+
}),
|
|
37914
|
+
siteName: z.string().optional()
|
|
37144
37915
|
};
|
|
37145
37916
|
const eventRegistrationEventSourceSchema = z.discriminatedUnion("kind", [z.object({
|
|
37146
37917
|
kind: z.literal("loaded"),
|
|
@@ -37312,7 +38083,9 @@ const eventRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
|
|
|
37312
38083
|
spamProtectionEnabled: source.spamProtectionEnabled,
|
|
37313
38084
|
supportEmail: source.supportEmail,
|
|
37314
38085
|
sitePasses: source.sitePasses ?? null,
|
|
37315
|
-
siteMemberships: source.siteMemberships ?? null
|
|
38086
|
+
siteMemberships: source.siteMemberships ?? null,
|
|
38087
|
+
mailingList: source.mailingList,
|
|
38088
|
+
siteName: source.siteName
|
|
37316
38089
|
}
|
|
37317
38090
|
};
|
|
37318
38091
|
}
|
|
@@ -37480,6 +38253,8 @@ const eventRegistrationBlockDefinition = {
|
|
|
37480
38253
|
events: { $bind: { from: "data.events" } },
|
|
37481
38254
|
wholeSeriesRunEvents: { $bind: { from: "data.wholeSeriesRunEvents" } },
|
|
37482
38255
|
loaderFailures: { $bind: { from: "$root.loaderFailures" } },
|
|
38256
|
+
mailingList: { $bind: { from: "$root.mailingList" } },
|
|
38257
|
+
siteName: { $bind: { from: "$root.siteName" } },
|
|
37483
38258
|
sitePasses: { $bind: { from: "data.sitePasses" } },
|
|
37484
38259
|
siteMemberships: { $bind: { from: "data.siteMemberships" } },
|
|
37485
38260
|
stage: { $bind: {
|
|
@@ -44330,6 +45105,11 @@ const mailingListContentVersionIdSchema = z.string().transform((value, ctx) => {
|
|
|
44330
45105
|
});
|
|
44331
45106
|
return z.NEVER;
|
|
44332
45107
|
});
|
|
45108
|
+
const mailingListSignupBlockSourceRefSchema = z.object({
|
|
45109
|
+
tag: z.literal("block_ref"),
|
|
45110
|
+
blockId: mailingListSignupBlockIdSchema,
|
|
45111
|
+
contentVersionId: mailingListContentVersionIdSchema
|
|
45112
|
+
});
|
|
44333
45113
|
const signedMailingListSourceTokenSchema = z.string().trim().min(1).transform(parseRequiredMailingListSignedSourceToken);
|
|
44334
45114
|
const newsletterSourceCommonSchema = z.object({
|
|
44335
45115
|
siteId: z.string().optional(),
|
|
@@ -44344,7 +45124,15 @@ const newsletterSourceSchema = z.discriminatedUnion("source", [
|
|
|
44344
45124
|
newsletterSourceCommonSchema.extend({
|
|
44345
45125
|
source: z.literal("block"),
|
|
44346
45126
|
blockId: z.string().nullable().optional(),
|
|
44347
|
-
|
|
45127
|
+
newsletterBlockSubmission: z.discriminatedUnion("tag", [
|
|
45128
|
+
z.object({
|
|
45129
|
+
tag: z.literal("ready"),
|
|
45130
|
+
sourceRef: mailingListSignupBlockSourceRefSchema
|
|
45131
|
+
}),
|
|
45132
|
+
z.object({ tag: z.literal("unpublished-form") }),
|
|
45133
|
+
z.object({ tag: z.literal("unpublished-settings") }),
|
|
45134
|
+
z.object({ tag: z.literal("unavailable") })
|
|
45135
|
+
])
|
|
44348
45136
|
}),
|
|
44349
45137
|
newsletterSourceCommonSchema.extend({
|
|
44350
45138
|
source: z.literal("signed-footer"),
|
|
@@ -44373,11 +45161,7 @@ const newsletterHydrationSchema = z.object({
|
|
|
44373
45161
|
target: z.discriminatedUnion("tag", [
|
|
44374
45162
|
z.object({
|
|
44375
45163
|
tag: z.literal("block-source"),
|
|
44376
|
-
sourceRef:
|
|
44377
|
-
tag: z.literal("block_ref"),
|
|
44378
|
-
blockId: mailingListSignupBlockIdSchema,
|
|
44379
|
-
contentVersionId: mailingListContentVersionIdSchema
|
|
44380
|
-
}).nullable()
|
|
45164
|
+
sourceRef: mailingListSignupBlockSourceRefSchema.nullable()
|
|
44381
45165
|
}),
|
|
44382
45166
|
z.object({
|
|
44383
45167
|
tag: z.literal("signed-footer-source"),
|
|
@@ -44386,7 +45170,11 @@ const newsletterHydrationSchema = z.object({
|
|
|
44386
45170
|
token: signedMailingListSourceTokenSchema
|
|
44387
45171
|
})
|
|
44388
45172
|
}),
|
|
44389
|
-
z.object({ tag: z.literal("preview") })
|
|
45173
|
+
z.object({ tag: z.literal("preview") }),
|
|
45174
|
+
z.object({
|
|
45175
|
+
tag: z.literal("unpublished-preview"),
|
|
45176
|
+
reason: z.enum(["unpublished-form", "unpublished-settings"])
|
|
45177
|
+
})
|
|
44390
45178
|
]),
|
|
44391
45179
|
setupRevision: z.number().int().positive().nullable(),
|
|
44392
45180
|
choiceProvider: z.enum([
|
|
@@ -44455,16 +45243,21 @@ const newsletterFormBlockRuntime = defineProgressiveBlockRuntime({
|
|
|
44455
45243
|
});
|
|
44456
45244
|
function projectNewsletterFormHydrationTarget(source) {
|
|
44457
45245
|
switch (source.source) {
|
|
44458
|
-
case "block": {
|
|
44459
|
-
|
|
44460
|
-
|
|
45246
|
+
case "block": switch (source.newsletterBlockSubmission.tag) {
|
|
45247
|
+
case "unpublished-form":
|
|
45248
|
+
case "unpublished-settings": return {
|
|
45249
|
+
tag: "unpublished-preview",
|
|
45250
|
+
reason: source.newsletterBlockSubmission.tag
|
|
45251
|
+
};
|
|
45252
|
+
case "ready": return {
|
|
44461
45253
|
tag: "block-source",
|
|
44462
|
-
sourceRef
|
|
45254
|
+
sourceRef: source.newsletterBlockSubmission.sourceRef
|
|
44463
45255
|
};
|
|
44464
|
-
return {
|
|
45256
|
+
case "unavailable": return {
|
|
44465
45257
|
tag: "block-source",
|
|
44466
45258
|
sourceRef: null
|
|
44467
45259
|
};
|
|
45260
|
+
default: return assertNever$6(source.newsletterBlockSubmission);
|
|
44468
45261
|
}
|
|
44469
45262
|
case "signed-footer": return {
|
|
44470
45263
|
tag: "signed-footer-source",
|
|
@@ -44627,18 +45420,11 @@ const newsletterSignupManifest = createBlockManifest({
|
|
|
44627
45420
|
],
|
|
44628
45421
|
icon: "Mail"
|
|
44629
45422
|
});
|
|
45423
|
+
const newsletterPublicFieldIds = [...(newsletterSignupManifest.fields ?? []).map((field) => field.id), "_containerStyles"];
|
|
44630
45424
|
function sanitizeNewsletterSignupPublicContent(content) {
|
|
44631
45425
|
if (typeof content !== "object" || content === null || Array.isArray(content)) return content;
|
|
44632
45426
|
const value = content;
|
|
44633
|
-
return
|
|
44634
|
-
title: value.title,
|
|
44635
|
-
subtitle: value.subtitle,
|
|
44636
|
-
targeting: value.targeting,
|
|
44637
|
-
buttonVariant: value.buttonVariant,
|
|
44638
|
-
mailingListSource: value.mailingListSource,
|
|
44639
|
-
mailingListSourceToken: value.mailingListSourceToken,
|
|
44640
|
-
_sectionStyles: value._sectionStyles
|
|
44641
|
-
};
|
|
45427
|
+
return Object.fromEntries(newsletterPublicFieldIds.map((id) => [id, value[id]]));
|
|
44642
45428
|
}
|
|
44643
45429
|
const newsletterSignupBlockDefinition = {
|
|
44644
45430
|
manifest: newsletterSignupManifest,
|
|
@@ -49649,6 +50435,21 @@ const navigationLinkInputSchemaOptions = [
|
|
|
49649
50435
|
];
|
|
49650
50436
|
z.discriminatedUnion("kind", navigationLinkInputSchemaOptions);
|
|
49651
50437
|
//#endregion
|
|
50438
|
+
//#region ../blocks/src/pageRenderAdmission.ts
|
|
50439
|
+
/** Pair a published version with the content it authorises at the render boundary. */
|
|
50440
|
+
function readPublishedBlockPlacement(id, content) {
|
|
50441
|
+
if (id == null && content == null) return null;
|
|
50442
|
+
if (id == null || content == null) return {
|
|
50443
|
+
kind: "incomplete",
|
|
50444
|
+
id: id ?? null,
|
|
50445
|
+
content: content ?? null
|
|
50446
|
+
};
|
|
50447
|
+
return {
|
|
50448
|
+
id,
|
|
50449
|
+
content
|
|
50450
|
+
};
|
|
50451
|
+
}
|
|
50452
|
+
//#endregion
|
|
49652
50453
|
//#region ../api/src/sdkConfig/contracts.ts
|
|
49653
50454
|
/**
|
|
49654
50455
|
* Canonical SDK config Zod contracts.
|
|
@@ -50557,6 +51358,7 @@ function collectText(node) {
|
|
|
50557
51358
|
if (node.type === "text") return node.text ?? "";
|
|
50558
51359
|
return (node.content ?? []).map(collectText).join("");
|
|
50559
51360
|
}
|
|
51361
|
+
z.enum(["public", "unlisted"], { error: "visibility must be 'public' or 'unlisted'" });
|
|
50560
51362
|
//#endregion
|
|
50561
51363
|
//#region ../api/src/bookingPaymentTermSchemas.ts
|
|
50562
51364
|
const bookingDepositRefundPolicySchema = z.enum(["refundable", "non_refundable"]);
|
|
@@ -51105,21 +51907,39 @@ function buildSiteRenderSupport(site, mediaAssets) {
|
|
|
51105
51907
|
function collectMediaAssetSidecar(mediaAssets) {
|
|
51106
51908
|
return Array.isArray(mediaAssets) && mediaAssets.length > 0 ? mediaAssets : void 0;
|
|
51107
51909
|
}
|
|
51108
|
-
function
|
|
51910
|
+
function readBlockContentId(value, name) {
|
|
51911
|
+
if (value === null || value === void 0) return null;
|
|
51912
|
+
if (typeof value === "string") return value;
|
|
51913
|
+
throw new Error(`Invalid ${name} in page: expected string or null`);
|
|
51914
|
+
}
|
|
51915
|
+
function readTransportedBlockIdentity(block, kind, stage) {
|
|
51916
|
+
return {
|
|
51917
|
+
draftContentId: readBlockContentId(block.draftContentId, "draft content id"),
|
|
51918
|
+
publishedPlacement: stage === "preview" ? readPublishedBlockPlacement(readBlockContentId(block.publishedContentId, "published content id"), sanitizeNullableSdkRuntimeBlockContent(kind, readNestedContentRecord(block.publishedContent))) : null
|
|
51919
|
+
};
|
|
51920
|
+
}
|
|
51921
|
+
function convertPageResponseBlock(block, stage) {
|
|
51109
51922
|
if (!isRecord$1(block)) throw new Error("Invalid block format in page API response");
|
|
51923
|
+
const header = readTransportedBlockHeader(block);
|
|
51924
|
+
const admission = readInvalidBlockAdmission(block.admission);
|
|
51925
|
+
return {
|
|
51926
|
+
...header,
|
|
51927
|
+
...readTransportedBlockIdentity(block, header.kind, stage),
|
|
51928
|
+
content: sanitizeSdkRuntimeBlockContent(header.kind, readContentRecord(block.content) ?? {}),
|
|
51929
|
+
draftContent: sanitizeNullableSdkRuntimeBlockContent(header.kind, readNestedContentRecord(block.draftContent)),
|
|
51930
|
+
...admission ? { admission } : {}
|
|
51931
|
+
};
|
|
51932
|
+
}
|
|
51933
|
+
function readTransportedBlockHeader(block) {
|
|
51110
51934
|
if (typeof block.id !== "string" && block.id !== null) throw new Error(`Invalid block id in page: expected string or null, got ${typeof block.id}`);
|
|
51111
51935
|
if (typeof block.kind !== "string") throw new Error(`Invalid block kind in page: expected string, got ${typeof block.kind}`);
|
|
51112
51936
|
if (typeof block.purpose !== "string") throw new Error(`Invalid block purpose in page: expected string, got ${typeof block.purpose}`);
|
|
51113
51937
|
if (block.contentVersionId !== void 0 && block.contentVersionId !== null && typeof block.contentVersionId !== "string") throw new Error(`Invalid content version id in page: expected string or null, got ${typeof block.contentVersionId}`);
|
|
51114
|
-
const admission = readInvalidBlockAdmission(block.admission);
|
|
51115
51938
|
return {
|
|
51116
51939
|
id: block.id,
|
|
51117
51940
|
...block.contentVersionId !== void 0 ? { contentVersionId: block.contentVersionId } : {},
|
|
51118
51941
|
kind: block.kind,
|
|
51119
|
-
purpose: block.purpose
|
|
51120
|
-
content: sanitizeSdkRuntimeBlockContent(block.kind, readContentRecord(block.content) ?? {}),
|
|
51121
|
-
draftContent: sanitizeNullableSdkRuntimeBlockContent(block.kind, readNestedContentRecord(block.draftContent)),
|
|
51122
|
-
...admission ? { admission } : {}
|
|
51942
|
+
purpose: block.purpose
|
|
51123
51943
|
};
|
|
51124
51944
|
}
|
|
51125
51945
|
function readInvalidBlockAdmission(value) {
|
|
@@ -51132,7 +51952,7 @@ function buildPageOutline(input) {
|
|
|
51132
51952
|
name: input.name,
|
|
51133
51953
|
path: input.path ?? input.fallbackPath,
|
|
51134
51954
|
purpose: input.purpose,
|
|
51135
|
-
blocks: input.blocks.map(convertPageResponseBlock)
|
|
51955
|
+
blocks: input.blocks.map((block) => convertPageResponseBlock(block, input.previewStage))
|
|
51136
51956
|
};
|
|
51137
51957
|
}
|
|
51138
51958
|
function buildRenderablePageOutline(input) {
|
|
@@ -51158,6 +51978,8 @@ function projectRenderablePageOutline(page) {
|
|
|
51158
51978
|
function admitSdkRuntimePageBlock(block, customBlocks) {
|
|
51159
51979
|
const base = {
|
|
51160
51980
|
id: block.id,
|
|
51981
|
+
draftContentId: block.draftContentId,
|
|
51982
|
+
publishedPlacement: block.publishedPlacement,
|
|
51161
51983
|
...block.contentVersionId !== void 0 ? { contentVersionId: block.contentVersionId } : {},
|
|
51162
51984
|
kind: block.kind,
|
|
51163
51985
|
purpose: block.purpose,
|
|
@@ -51295,33 +52117,32 @@ async function loadPageWithDeps(deps, params) {
|
|
|
51295
52117
|
const { client, siteId, path, pageId, preview = false, dataLoaderOverrides, searchParams, forceSite } = params;
|
|
51296
52118
|
const [site, pageResponse] = await Promise.all([client.getSite({
|
|
51297
52119
|
id: siteId,
|
|
52120
|
+
currentPath: path,
|
|
51298
52121
|
...forceSite ? { force: true } : {}
|
|
51299
52122
|
}), client.getPage({
|
|
51300
52123
|
siteId,
|
|
51301
52124
|
path,
|
|
51302
52125
|
preview
|
|
51303
52126
|
})]);
|
|
51304
|
-
|
|
51305
|
-
if ("pageSurface" in pageResponse) throw new Error("This path resolves to a page surface, not a page. Use loadContent() instead, which handles pages, entries, and page surfaces.");
|
|
51306
|
-
const { page: pageData } = pageResponse;
|
|
52127
|
+
const pageData = requirePageRecord(pageResponse);
|
|
51307
52128
|
const support = buildSiteRenderSupport(site, collectMediaAssetSidecar(pageResponse.mediaAssets));
|
|
52129
|
+
const previewStage = preview ? "preview" : "published";
|
|
51308
52130
|
const pageOutline = buildRenderablePageOutline({
|
|
51309
52131
|
name: pageData.name,
|
|
51310
52132
|
path: pageData.path,
|
|
51311
52133
|
fallbackPath: path,
|
|
51312
52134
|
purpose: pageData.purpose,
|
|
51313
52135
|
blocks: pageData.blocks,
|
|
52136
|
+
previewStage,
|
|
51314
52137
|
customBlocks: support.customBlocks
|
|
51315
52138
|
});
|
|
51316
|
-
const previewStage = preview ? "preview" : "published";
|
|
51317
|
-
const renderTarget = {
|
|
51318
|
-
kind: "page",
|
|
51319
|
-
pageId: pageId ?? pageData.id
|
|
51320
|
-
};
|
|
51321
52139
|
const resolvedData = await resolveBlockDataWithDeps(deps, {
|
|
51322
52140
|
page: projectRenderablePageOutline(pageOutline),
|
|
51323
52141
|
siteId,
|
|
51324
|
-
renderTarget
|
|
52142
|
+
renderTarget: {
|
|
52143
|
+
kind: "page",
|
|
52144
|
+
pageId: pageId ?? pageData.id
|
|
52145
|
+
},
|
|
51325
52146
|
previewStage,
|
|
51326
52147
|
policy: createBlockDataLoadPolicy(dataLoaderOverrides, normalizeDataLoaderSearchParams(searchParams)),
|
|
51327
52148
|
client,
|
|
@@ -51333,6 +52154,10 @@ async function loadPageWithDeps(deps, params) {
|
|
|
51333
52154
|
theme: requireSdkTheme(support.theme, siteId),
|
|
51334
52155
|
sdkConfig: support.sdkConfig,
|
|
51335
52156
|
siteId,
|
|
52157
|
+
dataContext: {
|
|
52158
|
+
siteName: support.site.title,
|
|
52159
|
+
previewStage
|
|
52160
|
+
},
|
|
51336
52161
|
resolvedData,
|
|
51337
52162
|
bookingOfferingPresets: support.bookingOfferingPresets,
|
|
51338
52163
|
mailingList: support.mailingList,
|
|
@@ -51345,6 +52170,11 @@ async function loadPageWithDeps(deps, params) {
|
|
|
51345
52170
|
entriesByIdentifier: support.entriesByIdentifier
|
|
51346
52171
|
};
|
|
51347
52172
|
}
|
|
52173
|
+
function requirePageRecord(response) {
|
|
52174
|
+
if ("entry" in response) throw new Error("This path resolves to a content entry, not a page. Use loadContent() instead, which handles both pages and entries. For entries, loadContent() returns the raw entry data for custom rendering.");
|
|
52175
|
+
if ("pageSurface" in response) throw new Error("This path resolves to a page surface, not a page. Use loadContent() instead, which handles pages, entries, and page surfaces.");
|
|
52176
|
+
return response.page;
|
|
52177
|
+
}
|
|
51348
52178
|
//#endregion
|
|
51349
52179
|
//#region ../content-model/src/entry-slots/types.ts
|
|
51350
52180
|
function ok(value) {
|
|
@@ -51727,7 +52557,8 @@ async function processTemplatePage(input) {
|
|
|
51727
52557
|
block,
|
|
51728
52558
|
bindingContext: input.bindingContext,
|
|
51729
52559
|
slotContent: input.slotContent,
|
|
51730
|
-
customBlocks: input.customBlocks
|
|
52560
|
+
customBlocks: input.customBlocks,
|
|
52561
|
+
previewStage: input.previewStage
|
|
51731
52562
|
}));
|
|
51732
52563
|
if (blocks.length === 0) return {
|
|
51733
52564
|
templatePage: null,
|
|
@@ -51758,7 +52589,7 @@ function resolveTemplateBlockSequence(input) {
|
|
|
51758
52589
|
if (slotKey) return selectBlocksForDeclaredEntrySlot({
|
|
51759
52590
|
declaredSlotKey: slotKey,
|
|
51760
52591
|
entrySlots: input.slotContent ?? []
|
|
51761
|
-
}).map((slotBlock) => admitEntrySlotBlock(slotBlock, input.customBlocks));
|
|
52592
|
+
}).map((slotBlock) => admitEntrySlotBlock(slotBlock, input.customBlocks, input.previewStage));
|
|
51762
52593
|
if (block.blockKind === "system.entry-slot") return [];
|
|
51763
52594
|
return [resolveTemplateBlock(block, input.bindingContext, input.customBlocks)];
|
|
51764
52595
|
}
|
|
@@ -51767,6 +52598,7 @@ function resolveTemplateBlock(block, bindingContext, customBlocks) {
|
|
|
51767
52598
|
id: block.id,
|
|
51768
52599
|
kind: block.blockKind,
|
|
51769
52600
|
purpose: block.scope === "template" ? "template-layout" : "entry-content",
|
|
52601
|
+
publishedPlacement: null,
|
|
51770
52602
|
...isRecord(block.bindings) ? { bindings: block.bindings } : {}
|
|
51771
52603
|
};
|
|
51772
52604
|
const manifest = resolveSdkBlockManifest(block.blockKind, customBlocks);
|
|
@@ -51792,10 +52624,11 @@ function readEntrySlotKey(block) {
|
|
|
51792
52624
|
const parsed = parseSlotKey(block.content?.slotKey);
|
|
51793
52625
|
return parsed.ok ? parsed.value : null;
|
|
51794
52626
|
}
|
|
51795
|
-
function admitEntrySlotBlock(block, customBlocks) {
|
|
52627
|
+
function admitEntrySlotBlock(block, customBlocks, previewStage) {
|
|
51796
52628
|
const base = {
|
|
51797
52629
|
id: block.id ?? block.blockId ?? null,
|
|
51798
52630
|
contentVersionId: block.contentVersionId,
|
|
52631
|
+
...entrySlotBlockIdentity(block, previewStage),
|
|
51799
52632
|
kind: block.kind,
|
|
51800
52633
|
purpose: block.purpose,
|
|
51801
52634
|
...isRecord(block.bindings) ? { bindings: block.bindings } : {}
|
|
@@ -51816,6 +52649,12 @@ function admitEntrySlotBlock(block, customBlocks) {
|
|
|
51816
52649
|
error: renderable.error
|
|
51817
52650
|
});
|
|
51818
52651
|
}
|
|
52652
|
+
function entrySlotBlockIdentity(block, previewStage) {
|
|
52653
|
+
return {
|
|
52654
|
+
draftContentId: block.draftContentId ?? null,
|
|
52655
|
+
publishedPlacement: previewStage === "preview" ? readPublishedBlockPlacement(block.publishedContentId, isRecord(block.publishedContent) && isRecord(block.publishedContent.data) ? block.publishedContent.data : null) : null
|
|
52656
|
+
};
|
|
52657
|
+
}
|
|
51819
52658
|
//#endregion
|
|
51820
52659
|
//#region src/rendering/helpers/loadContent.ts
|
|
51821
52660
|
/**
|
|
@@ -51925,6 +52764,7 @@ async function loadContentWithDeps(deps, params) {
|
|
|
51925
52764
|
const { client, siteId, path, preview = false, forceSite, dataLoaderOverrides, searchParams } = params;
|
|
51926
52765
|
const [siteResult, contentResult] = await Promise.allSettled([client.getSite({
|
|
51927
52766
|
id: siteId,
|
|
52767
|
+
currentPath: path,
|
|
51928
52768
|
...forceSite ? { force: true } : {}
|
|
51929
52769
|
}), client.getPage({
|
|
51930
52770
|
siteId,
|
|
@@ -51987,15 +52827,18 @@ async function loadContentFromContentResponseWithDeps(deps, params) {
|
|
|
51987
52827
|
entry,
|
|
51988
52828
|
templatePage,
|
|
51989
52829
|
resolvedData,
|
|
51990
|
-
dataContext: {
|
|
51991
|
-
|
|
51992
|
-
|
|
51993
|
-
|
|
51994
|
-
|
|
51995
|
-
|
|
51996
|
-
|
|
51997
|
-
|
|
51998
|
-
|
|
52830
|
+
dataContext: {
|
|
52831
|
+
previewStage,
|
|
52832
|
+
contentEntry: {
|
|
52833
|
+
...entry.content ?? {},
|
|
52834
|
+
id: entry.id,
|
|
52835
|
+
slug: entry.slug,
|
|
52836
|
+
contentTypeSlug: entry.type,
|
|
52837
|
+
_entryId: entry.id,
|
|
52838
|
+
_entrySlug: entry.slug,
|
|
52839
|
+
_contentTypeSlug: entry.type
|
|
52840
|
+
}
|
|
52841
|
+
},
|
|
51999
52842
|
...templateContentSupport
|
|
52000
52843
|
};
|
|
52001
52844
|
}
|
|
@@ -52056,6 +52899,7 @@ async function loadContentFromContentResponseWithDeps(deps, params) {
|
|
|
52056
52899
|
templatePage,
|
|
52057
52900
|
resolvedData,
|
|
52058
52901
|
dataContext: {
|
|
52902
|
+
previewStage,
|
|
52059
52903
|
pageSurface: {
|
|
52060
52904
|
...pageSurface.content ?? {},
|
|
52061
52905
|
id: pageSurface.id,
|
|
@@ -52072,13 +52916,13 @@ async function loadContentFromContentResponseWithDeps(deps, params) {
|
|
|
52072
52916
|
const { page: pageData } = contentResponse;
|
|
52073
52917
|
const pageRecord = pageData;
|
|
52074
52918
|
const canonicalPagePath = pageData.path ?? pageRecord.path ?? "/";
|
|
52075
|
-
const draftPagePath = pageRecord.draftPath ?? pageRecord.path ?? canonicalPagePath;
|
|
52076
52919
|
const pageOutline = buildRenderablePageOutline({
|
|
52077
52920
|
name: pageData.name,
|
|
52078
52921
|
path: canonicalPagePath,
|
|
52079
52922
|
fallbackPath: "/",
|
|
52080
52923
|
purpose: pageData.purpose,
|
|
52081
52924
|
blocks: pageData.blocks,
|
|
52925
|
+
previewStage,
|
|
52082
52926
|
customBlocks: support.customBlocks
|
|
52083
52927
|
});
|
|
52084
52928
|
const resolvedData = await resolveBlockDataWithDeps(deps, {
|
|
@@ -52097,26 +52941,14 @@ async function loadContentFromContentResponseWithDeps(deps, params) {
|
|
|
52097
52941
|
type: "page",
|
|
52098
52942
|
pageId: pageRecord.id,
|
|
52099
52943
|
routeId: pageRecord.routeId ?? null,
|
|
52100
|
-
pageMetadata:
|
|
52101
|
-
draftTitle: pageRecord.draftTitle ?? pageRecord.name ?? pageData.name,
|
|
52102
|
-
draftPath: draftPagePath,
|
|
52103
|
-
draftStatus: pageRecord.draftStatus ?? pageRecord.status ?? "draft",
|
|
52104
|
-
title: pageRecord.name ?? pageData.name,
|
|
52105
|
-
path: canonicalPagePath,
|
|
52106
|
-
status: pageRecord.status ?? pageRecord.draftStatus ?? "draft",
|
|
52107
|
-
publishedAt: pageRecord.publishedAt ?? null,
|
|
52108
|
-
draftMetaTitle: pageRecord.draftMetaTitle ?? null,
|
|
52109
|
-
draftMetaDescription: pageRecord.draftMetaDescription ?? null,
|
|
52110
|
-
publishedMetaTitle: pageRecord.publishedMetaTitle ?? null,
|
|
52111
|
-
publishedMetaDescription: pageRecord.publishedMetaDescription ?? null,
|
|
52112
|
-
ogImageId: pageRecord.ogImageId ?? null
|
|
52113
|
-
},
|
|
52944
|
+
pageMetadata: projectPagePreviewMetadata(pageRecord, pageData.name, canonicalPagePath),
|
|
52114
52945
|
page: pageOutline,
|
|
52115
52946
|
runtimeJoins: pageData.runtimeJoins,
|
|
52116
52947
|
theme: support.theme,
|
|
52117
52948
|
siteId,
|
|
52118
52949
|
...support.customBlocks ? { customBlocks: support.customBlocks } : {},
|
|
52119
52950
|
resolvedData,
|
|
52951
|
+
dataContext: { previewStage },
|
|
52120
52952
|
bookingOfferingPresets: support.bookingOfferingPresets,
|
|
52121
52953
|
mailingList: support.mailingList,
|
|
52122
52954
|
bookingTimeZone: support.bookingTimeZone,
|
|
@@ -52129,6 +52961,32 @@ async function loadContentFromContentResponseWithDeps(deps, params) {
|
|
|
52129
52961
|
...support.mediaAssets ? { mediaAssets: support.mediaAssets } : {}
|
|
52130
52962
|
};
|
|
52131
52963
|
}
|
|
52964
|
+
function projectPagePreviewMetadata(page, pageName, canonicalPath) {
|
|
52965
|
+
return {
|
|
52966
|
+
...projectDraftPageMetadata(page, pageName, canonicalPath),
|
|
52967
|
+
...projectPublishedPageMetadata(page, pageName, canonicalPath)
|
|
52968
|
+
};
|
|
52969
|
+
}
|
|
52970
|
+
function projectDraftPageMetadata(page, pageName, canonicalPath) {
|
|
52971
|
+
return {
|
|
52972
|
+
draftTitle: page.draftTitle ?? page.name ?? pageName,
|
|
52973
|
+
draftPath: page.draftPath ?? page.path ?? canonicalPath,
|
|
52974
|
+
draftStatus: page.draftStatus ?? page.status ?? "draft",
|
|
52975
|
+
draftMetaTitle: page.draftMetaTitle ?? null,
|
|
52976
|
+
draftMetaDescription: page.draftMetaDescription ?? null
|
|
52977
|
+
};
|
|
52978
|
+
}
|
|
52979
|
+
function projectPublishedPageMetadata(page, pageName, canonicalPath) {
|
|
52980
|
+
return {
|
|
52981
|
+
title: page.name ?? pageName,
|
|
52982
|
+
path: canonicalPath,
|
|
52983
|
+
status: page.status ?? page.draftStatus ?? "draft",
|
|
52984
|
+
publishedAt: page.publishedAt ?? null,
|
|
52985
|
+
publishedMetaTitle: page.publishedMetaTitle ?? null,
|
|
52986
|
+
publishedMetaDescription: page.publishedMetaDescription ?? null,
|
|
52987
|
+
ogImageId: page.ogImageId ?? null
|
|
52988
|
+
};
|
|
52989
|
+
}
|
|
52132
52990
|
/**
|
|
52133
52991
|
* Type guard to check if API response is an entry
|
|
52134
52992
|
*/
|