@riverbankcms/sdk 0.146.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 +12 -0
- package/dist/{PreviewEditorSidebar-kg2r2Fyi.mjs → PreviewEditorSidebar-DtpB3_sS.mjs} +51 -33
- package/dist/{PreviewEditorUI-sWMLp5dT.mjs → PreviewEditorUI-DxTLgaHo.mjs} +3 -3
- package/dist/{PreviewQueryProvider-Cg51xq1w.mjs → PreviewQueryProvider-Dd4dxOiU.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-h2ti3Hch.mjs → SdkPreviewModeRuntime-DMMNCngt.mjs} +39 -12
- package/dist/{SiteChromeCustomizeContext-DEACFH9m.mjs → SiteChromeCustomizeContext-DQXZXiqS.mjs} +2499 -1682
- package/dist/_dts/ai/src/contracts/proposals.d.ts +198 -0
- package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +18 -0
- package/dist/_dts/api/src/accountApi.d.ts +5 -5
- package/dist/_dts/api/src/bookingConfig.d.ts +16 -0
- package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +4 -13
- 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/endpoints.d.ts +587 -561
- package/dist/_dts/api/src/eventManagementContracts.d.ts +23 -8
- package/dist/_dts/api/src/eventManagementEndpointDefinitions.d.ts +1 -1
- package/dist/_dts/api/src/index.d.ts +3 -2
- package/dist/_dts/api/src/indexCoreTypes.d.ts +1 -1
- package/dist/_dts/api/src/launchReadiness.d.ts +1 -6
- package/dist/_dts/api/src/mailingListIntegration.d.ts +6 -0
- package/dist/_dts/api/src/navigation/dashboardBookingsNav.d.ts +1 -1
- package/dist/_dts/api/src/newsletterEndpointDefinitions.d.ts +15 -0
- package/dist/_dts/api/src/occurrenceScheduling.d.ts +19 -0
- 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 +15 -0
- package/dist/_dts/api/src/sdkCourseBooking.d.ts +4 -4
- package/dist/_dts/api/src/siteLifecycleEndpoints.d.ts +61 -0
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +5 -18
- package/dist/_dts/api/src/siteOnboarding.d.ts +2 -14
- 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 +1 -1
- package/dist/_dts/blocks/src/pageRenderAdmission.d.ts +22 -4
- package/dist/_dts/blocks/src/pageRendererContracts.d.ts +2 -0
- package/dist/_dts/blocks/src/system/blocks/newsletter-signup.d.ts +4 -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/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/newsletter-form.block-submission.d.ts +2 -4
- package/dist/_dts/blocks/src/system/runtime/resolver.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/shared/components/BookingMailingListNote.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/shared/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/core/src/index.d.ts +1 -1
- package/dist/_dts/core/src/mailing-list-runtime.d.ts +15 -0
- package/dist/_dts/core/src/mailing-list-setup.d.ts +2 -0
- package/dist/_dts/core/src/mailing-list-submission.d.ts +6 -0
- package/dist/_dts/core/src/navigation-portal-labels.d.ts +9 -0
- package/dist/_dts/core/src/participants.d.ts +0 -38
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +102 -22
- package/dist/_dts/editor-blocks/src/block-editor/actionPresentation.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 +4 -3
- package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +1 -0
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +1 -0
- package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +2 -2
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/theme-core/src/buttons/effects/types.d.ts +1 -1
- package/dist/_dts/theme-core/src/footer/effectiveNavLinkStyle.d.ts +13 -0
- package/dist/_dts/theme-core/src/footer/index.d.ts +1 -0
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/header/effectiveNavLinkStyle.d.ts +17 -0
- package/dist/_dts/theme-core/src/header/generateHeaderLogoStyles.d.ts +15 -0
- package/dist/_dts/theme-core/src/header/generateHeaderNavLinkStyles.d.ts +4 -0
- package/dist/_dts/theme-core/src/header/index.d.ts +3 -0
- package/dist/_dts/theme-core/src/header/legacyNavLinkStyle.d.ts +1 -1
- package/dist/_dts/theme-core/src/header/openingForegroundProjection.d.ts +7 -0
- package/dist/_dts/theme-core/src/header/rootPaint.d.ts +4 -0
- package/dist/_dts/theme-core/src/navigation/effectPolicy.d.ts +38 -0
- package/dist/_dts/theme-core/src/navigation/generateNavLinkCSS.d.ts +4 -0
- package/dist/_dts/theme-core/src/navigation/types.d.ts +4 -0
- package/dist/_dts/theme-core/src/site-styles/accessibleSurfaces.d.ts +1 -1
- package/dist/_dts/theme-core/src/surfaces/foregroundContract.d.ts +7 -0
- package/dist/_dts/theme-core/src/surfaces/foregroundInteraction.d.ts +29 -22
- package/dist/_dts/theme-core/src/surfaces/foregroundRoles.d.ts +10 -2
- package/dist/_dts/theme-core/src/surfaces/resolveSurfaceForeground.d.ts +9 -0
- package/dist/_dts/theme-core/src/utils/cssDeclarations.d.ts +2 -0
- package/dist/_dts/ui/src/badge.d.ts +2 -1
- package/dist/_dts/ui/src/button.d.ts +1 -1
- package/dist/_dts/ui/src/combobox-keys.d.ts +23 -0
- package/dist/_dts/ui/src/combobox-rows.d.ts +34 -0
- package/dist/_dts/ui/src/combobox.d.ts +26 -1
- package/dist/_dts/ui/src/date-picker.d.ts +5 -8
- package/dist/_dts/ui/src/editor-item-card.d.ts +1 -0
- package/dist/_dts/ui/src/field-trigger.d.ts +39 -0
- package/dist/_dts/ui/src/fieldControl.d.ts +27 -0
- package/dist/_dts/ui/src/index.d.ts +4 -1
- package/dist/_dts/ui/src/native-select.d.ts +8 -0
- package/dist/_dts/ui/src/popover.d.ts +7 -1
- package/dist/_dts/ui/src/segmented-control.d.ts +4 -0
- package/dist/_dts/ui/src/surface.d.ts +1 -1
- package/dist/client/{BookingConsentAgreement-BQKL045f.mjs → BookingMailingListNote-1n4Ch_u_.mjs} +15 -4
- package/dist/client/{CheckboxChoice--W2n6yKs.mjs → CheckboxChoice-B33MqoUo.mjs} +1 -1
- package/dist/client/{DiscountCodeDisclosure-CsOtjFY7.mjs → DiscountCodeDisclosure-CKJtz0mY.mjs} +1 -1
- package/dist/client/{EventCombined.client-BdRjVbhH.mjs → EventCombined.client-C0pgma9y.mjs} +7 -7
- package/dist/client/{EventListing.client-DBxC6xOU.mjs → EventListing.client-4fhLOvHP.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-mHEJKrTs.mjs → LeafletStaticMap-DScC4F3w.mjs} +1 -1
- package/dist/client/{scrollToBlock-BNgaEUpo.mjs → TerminalPanel-B5ZUsYhe.mjs} +77 -77
- package/dist/client/{ThemedButton-CE5KYT6z.mjs → ThemedButton-DoVIV1Ao.mjs} +2 -2
- package/dist/client/{accordion-BEQNSptH.mjs → accordion-CoT5g7zo.mjs} +1 -1
- package/dist/client/{bookingForm-AMr-s5vw.mjs → bookingForm-BWxB46xD.mjs} +226 -106
- package/dist/client/bookings.mjs +367 -188
- package/dist/client/{carousel-Bbt_QgJy.mjs → carousel-DtNYWFd3.mjs} +2 -2
- package/dist/client/{carousel.client-jahpU9Vz.mjs → carousel.client-A2lG-9od.mjs} +1 -1
- package/dist/client/{cart-CnWi30zJ.mjs → cart-z4qZih1Y.mjs} +3 -3
- package/dist/client/{checkout-f3nkWgd4.mjs → checkout-DpL7euFH.mjs} +3 -3
- package/dist/client/{checkoutUrls-CW3-78uu.mjs → checkoutUrls-BEfR7kVu.mjs} +1 -1
- package/dist/client/client.mjs +2125 -1420
- package/dist/client/{colorStyles-CuJBiS-1.mjs → colorStyles-j5U9v5JA.mjs} +5 -1
- package/dist/client/{context-Bc8T6pCe.mjs → context-C8TinPJc.mjs} +1 -1
- package/dist/client/{dates-DUsCEzLb.mjs → dates-vwwxTeB0.mjs} +2 -2
- package/dist/client/{eventCalendar-CKwgXui5.mjs → eventCalendar-DIbHfJXO.mjs} +10 -10
- package/dist/client/{eventCombined-CBAOSTGR.mjs → eventCombined-DoGMJ6cg.mjs} +4 -4
- package/dist/client/{eventDetails-Dh-_WiBD.mjs → eventDetails-BjN9v6a1.mjs} +4 -4
- package/dist/client/{eventListing-CA3frIH5.mjs → eventListing-DajjWgOv.mjs} +4 -4
- package/dist/client/{eventRegistration-BHtsgdcg.mjs → eventRegistration-DMq9gMA-.mjs} +109 -41
- package/dist/client/{form-C2h3YAcg.mjs → form-Qf6qTbos.mjs} +5 -5
- package/dist/client/{headerSection-lwMuMTH9.mjs → headerSection-D7qJrqFX.mjs} +3 -3
- package/dist/client/hooks.mjs +661 -116
- package/dist/client/{locationMap-DJ2bLODV.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-8Pu5K32g.mjs → newsletterForm-DzCLSP4S.mjs} +6 -6
- package/dist/client/{pricing-HHx3IgBz.mjs → pricing-Cgxv2KLC.mjs} +1 -1
- package/dist/client/{productDetail-C_1odnAf.mjs → productDetail-ru9w5GHx.mjs} +3 -3
- package/dist/client/{productList-CtCv-Nmx.mjs → productList-zaapKSl-.mjs} +3 -3
- package/dist/client/{propsDecoder-Dcgsncxb.mjs → propsDecoder-CwvvNOHx.mjs} +52 -6
- package/dist/client/rendering/client.mjs +951 -369
- package/dist/client/rendering/islands.mjs +19 -19
- package/dist/client/rendering.mjs +2153 -1393
- package/dist/client/{routeIslandApiConfig-CWLP7wu3.mjs → routeIslandApiConfig-BwVFo0Y4.mjs} +1 -1
- package/dist/client/{shop-commerce-B88zmWWo.mjs → shop-commerce-De7gEnkA.mjs} +8 -8
- package/dist/client/{shop-commerce-store-DtSfkKuX.mjs → shop-commerce-store-B3MCxIBW.mjs} +1 -1
- package/dist/client/{shop-DQXrQ8kJ.mjs → shop-mktkXvbV.mjs} +7 -7
- package/dist/client/{shopShared-cuaONpkJ.mjs → shopShared-TqExh235.mjs} +5 -5
- package/dist/client/{useEventFilters-Bukew6Gb.mjs → useEventFilters-n_OjkIjX.mjs} +8 -8
- package/dist/preview-next/before-render.mjs +122 -50
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/editor-base.css +53 -2
- package/dist/preview-next/editor-chrome.css +7 -4
- package/dist/preview-next/keepAlive.mjs +122 -50
- package/dist/preview-next/middleware.mjs +122 -50
- package/dist/{previewAuthStore-h5IgbSp4.mjs → previewAuthStore-C_EHQ5XA.mjs} +122 -50
- package/dist/{sdk-runtime-DTc1uIXn.mjs → sdk-runtime-BIkJg5y1.mjs} +2 -2
- package/dist/{separator-BpHS1KZK.mjs → separator-C9qDP95Z.mjs} +1 -1
- package/dist/server/components.mjs +25345 -24942
- package/dist/server/config-validation.mjs +711 -163
- package/dist/server/config.mjs +711 -163
- package/dist/server/data.mjs +709 -162
- package/dist/server/index.mjs +123 -51
- package/dist/server/navigation.mjs +13 -2
- package/dist/server/next.mjs +4538 -4169
- package/dist/server/page-converter.mjs +107 -64
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +2509 -2104
- package/dist/server/rendering.mjs +25526 -25104
- package/dist/server/routing.mjs +750 -289
- package/dist/server/server.mjs +671 -148
- package/dist/server/theme-bridge.mjs +66 -17
- package/dist/server/theme.mjs +5 -1
- package/dist/styles/index.css +32 -4
- package/package.json +1 -1
- package/dist/_dts/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).
|
|
@@ -1159,6 +1196,20 @@ const NEWSLETTER_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
1159
1196
|
responseKind: "json",
|
|
1160
1197
|
errors: ["auth:forbidden", "server:internal_error"]
|
|
1161
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
|
+
},
|
|
1162
1213
|
getMailingListAuthoringContext: {
|
|
1163
1214
|
path: "/sites/{siteId}/mailing-list/authoring-context",
|
|
1164
1215
|
method: "GET",
|
|
@@ -2284,17 +2335,35 @@ function parseMailingListRuntimeContext(value) {
|
|
|
2284
2335
|
if (!isRecord$15(value)) return invalidRuntimeContext();
|
|
2285
2336
|
if (value.tag === "not_configured") return ok$1({ tag: "not_configured" });
|
|
2286
2337
|
if (value.tag !== "configured") return invalidRuntimeContext();
|
|
2338
|
+
return parseConfiguredRuntimeContext(value);
|
|
2339
|
+
}
|
|
2340
|
+
function parseConfiguredRuntimeContext(value) {
|
|
2287
2341
|
const revision = parseMailingListSetupRevision(value.revision);
|
|
2288
2342
|
const form = parseMailingListGlobalForm(value.form);
|
|
2289
2343
|
const provider = parseRuntimeProvider(value.provider);
|
|
2290
|
-
|
|
2344
|
+
const bookingSignup = parseBookingSignupOffer(value.bookingSignup);
|
|
2345
|
+
if (revision === null || !form.ok || provider === null || bookingSignup === null) return invalidRuntimeContext();
|
|
2291
2346
|
return ok$1({
|
|
2292
2347
|
tag: "configured",
|
|
2293
2348
|
revision,
|
|
2349
|
+
bookingSignup,
|
|
2294
2350
|
form: form.value,
|
|
2295
2351
|
provider
|
|
2296
2352
|
});
|
|
2297
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
|
+
}
|
|
2298
2367
|
function parseRuntimeProvider(value) {
|
|
2299
2368
|
if (!isRecord$15(value)) return null;
|
|
2300
2369
|
switch (value.provider) {
|
|
@@ -3787,6 +3856,54 @@ const BILLING_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
3787
3856
|
}
|
|
3788
3857
|
});
|
|
3789
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
|
|
3790
3907
|
//#region ../api/src/clientErrorReporting.ts
|
|
3791
3908
|
const CLIENT_ERROR_REPORT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({ reportClientError: {
|
|
3792
3909
|
path: "/client/error-report",
|
|
@@ -3822,6 +3939,7 @@ z.object({
|
|
|
3822
3939
|
sourceLocation: z.string().max(CLIENT_ERROR_REPORT_LIMITS.sourceLocation).nullable()
|
|
3823
3940
|
}).strict();
|
|
3824
3941
|
const API_ENDPOINTS$1 = {
|
|
3942
|
+
...SITE_LIFECYCLE_ENDPOINT_DEFINITIONS,
|
|
3825
3943
|
...CLIENT_ERROR_REPORT_ENDPOINT_DEFINITIONS,
|
|
3826
3944
|
...PUBLIC_NEWSLETTER_ENDPOINT_DEFINITIONS,
|
|
3827
3945
|
...ACCOUNT_ENDPOINT_DEFINITIONS,
|
|
@@ -4357,13 +4475,6 @@ const API_ENDPOINTS$1 = {
|
|
|
4357
4475
|
auth: "user",
|
|
4358
4476
|
responseKind: "json"
|
|
4359
4477
|
},
|
|
4360
|
-
createSiteManual: {
|
|
4361
|
-
path: "/sites/manual",
|
|
4362
|
-
method: "POST",
|
|
4363
|
-
tags: ["site"],
|
|
4364
|
-
auth: "user",
|
|
4365
|
-
responseKind: "json"
|
|
4366
|
-
},
|
|
4367
4478
|
listSiteMembers: {
|
|
4368
4479
|
path: "/sites/{siteId}/members",
|
|
4369
4480
|
method: "GET",
|
|
@@ -7869,21 +7980,7 @@ const API_ENDPOINTS$1 = {
|
|
|
7869
7980
|
responseKind: "json",
|
|
7870
7981
|
errors: []
|
|
7871
7982
|
},
|
|
7872
|
-
|
|
7873
|
-
path: "/sites/{siteId}/bookings/customers",
|
|
7874
|
-
method: "GET",
|
|
7875
|
-
tags: ["site-{siteId}", "customers-{siteId}"],
|
|
7876
|
-
auth: "user",
|
|
7877
|
-
responseKind: "json"
|
|
7878
|
-
},
|
|
7879
|
-
exportBookingCustomersCsv: {
|
|
7880
|
-
path: "/sites/{siteId}/bookings/customers/export.csv",
|
|
7881
|
-
method: "GET",
|
|
7882
|
-
tags: ["site-{siteId}", "customers-{siteId}"],
|
|
7883
|
-
auth: "user",
|
|
7884
|
-
errors: [],
|
|
7885
|
-
responseKind: "blob"
|
|
7886
|
-
},
|
|
7983
|
+
...BOOKING_PEOPLE_ENDPOINT_DEFINITIONS,
|
|
7887
7984
|
createBookingCustomer: {
|
|
7888
7985
|
path: "/sites/{siteId}/bookings/customers",
|
|
7889
7986
|
method: "POST",
|
|
@@ -7974,13 +8071,6 @@ const API_ENDPOINTS$1 = {
|
|
|
7974
8071
|
"server:internal_error"
|
|
7975
8072
|
]
|
|
7976
8073
|
},
|
|
7977
|
-
listCustomerAttendances: {
|
|
7978
|
-
path: "/sites/{siteId}/bookings/customers/{customerId}/attendances",
|
|
7979
|
-
method: "GET",
|
|
7980
|
-
tags: ["site-{siteId}", "customers-{siteId}"],
|
|
7981
|
-
auth: "user",
|
|
7982
|
-
responseKind: "json"
|
|
7983
|
-
},
|
|
7984
8074
|
createPersonRecordEntry: {
|
|
7985
8075
|
path: "/sites/{siteId}/bookings/person-records/entries",
|
|
7986
8076
|
method: "POST",
|
|
@@ -9865,7 +9955,7 @@ var SimpleCache = class {
|
|
|
9865
9955
|
* 1. This constant
|
|
9866
9956
|
* 2. The "version" field in package.json
|
|
9867
9957
|
*/
|
|
9868
|
-
const SDK_VERSION = "0.
|
|
9958
|
+
const SDK_VERSION = "0.147.0";
|
|
9869
9959
|
//#endregion
|
|
9870
9960
|
//#region src/client/error.ts
|
|
9871
9961
|
let _Symbol$for;
|
|
@@ -11068,13 +11158,16 @@ const SURFACE_FOREGROUND_CSS_VARS = {
|
|
|
11068
11158
|
text: "--rb-surface-text-color",
|
|
11069
11159
|
heading: "--rb-surface-heading-color",
|
|
11070
11160
|
link: "--rb-surface-link-color",
|
|
11161
|
+
linkHover: "--rb-surface-link-hover-color",
|
|
11071
11162
|
supporting: "--rb-surface-supporting-color"
|
|
11072
11163
|
};
|
|
11073
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)))";
|
|
11074
11166
|
const DEFAULT_ROLE_FALLBACKS = {
|
|
11075
11167
|
text: DEFAULT_SURFACE_TEXT_COLOR,
|
|
11076
11168
|
heading: DEFAULT_SURFACE_TEXT_COLOR,
|
|
11077
|
-
link:
|
|
11169
|
+
link: DEFAULT_SURFACE_LINK_COLOR,
|
|
11170
|
+
linkHover: DEFAULT_SURFACE_LINK_COLOR,
|
|
11078
11171
|
supporting: "rgb(var(--tb-mutedText, 100 116 139))"
|
|
11079
11172
|
};
|
|
11080
11173
|
function requireSurfaceColorValue(role, value) {
|
|
@@ -11084,10 +11177,12 @@ function requireSurfaceColorValue(role, value) {
|
|
|
11084
11177
|
}
|
|
11085
11178
|
function completeSurfaceForegrounds(input) {
|
|
11086
11179
|
const text = requireSurfaceColorValue("text", input.text);
|
|
11180
|
+
const link = input.link === void 0 ? text : requireSurfaceColorValue("link", input.link);
|
|
11087
11181
|
return {
|
|
11088
11182
|
text,
|
|
11089
11183
|
heading: input.heading === void 0 ? text : requireSurfaceColorValue("heading", input.heading),
|
|
11090
|
-
link
|
|
11184
|
+
link,
|
|
11185
|
+
linkHover: input.linkHover === void 0 ? link : requireSurfaceColorValue("linkHover", input.linkHover),
|
|
11091
11186
|
supporting: input.supporting === void 0 ? text : requireSurfaceColorValue("supporting", input.supporting)
|
|
11092
11187
|
};
|
|
11093
11188
|
}
|
|
@@ -11095,6 +11190,7 @@ function surfaceForegroundValue(role, outsideProviderFallback = DEFAULT_ROLE_FAL
|
|
|
11095
11190
|
const roleVariable = SURFACE_FOREGROUND_CSS_VARS[role];
|
|
11096
11191
|
const fallback = requireSurfaceColorValue("fallback", outsideProviderFallback);
|
|
11097
11192
|
if (role === "text") return `var(${roleVariable}, ${fallback})`;
|
|
11193
|
+
if (role === "linkHover") return `var(${roleVariable}, ${surfaceForegroundValue("link", fallback)})`;
|
|
11098
11194
|
return `var(${roleVariable}, var(${SURFACE_FOREGROUND_CSS_VARS.text}, ${fallback}))`;
|
|
11099
11195
|
}
|
|
11100
11196
|
function surfaceForegroundValueWithOpacity(role, opacityPercent) {
|
|
@@ -11108,9 +11204,25 @@ function surfaceForegroundStyle(input) {
|
|
|
11108
11204
|
[SURFACE_FOREGROUND_CSS_VARS.text]: foregrounds.text,
|
|
11109
11205
|
[SURFACE_FOREGROUND_CSS_VARS.heading]: foregrounds.heading,
|
|
11110
11206
|
[SURFACE_FOREGROUND_CSS_VARS.link]: foregrounds.link,
|
|
11111
|
-
[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)
|
|
11112
11210
|
};
|
|
11113
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
|
+
}
|
|
11114
11226
|
//#endregion
|
|
11115
11227
|
//#region ../theme-core/src/buttons/constants.ts
|
|
11116
11228
|
/**
|
|
@@ -11967,6 +12079,64 @@ function parseAlpha(source) {
|
|
|
11967
12079
|
function isRgbChannel(value) {
|
|
11968
12080
|
return Number.isFinite(value) && value >= 0 && value <= 255;
|
|
11969
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
|
+
}
|
|
11970
12140
|
//#endregion
|
|
11971
12141
|
//#region ../theme-core/src/surfaces/resolveSurfaceForeground.ts
|
|
11972
12142
|
const FALLBACK_TEXT_TOKENS = [
|
|
@@ -12013,12 +12183,16 @@ function resolveSurfaceForeground(background, palette, candidates = {}, options
|
|
|
12013
12183
|
}
|
|
12014
12184
|
function foregroundCandidates(background, overrides) {
|
|
12015
12185
|
return {
|
|
12016
|
-
text: overrides.text
|
|
12017
|
-
heading: overrides.heading
|
|
12018
|
-
link: overrides.link
|
|
12019
|
-
|
|
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)
|
|
12020
12191
|
};
|
|
12021
12192
|
}
|
|
12193
|
+
function candidateOrBackground(candidate, backgroundValue) {
|
|
12194
|
+
return candidate ?? backgroundValue ?? null;
|
|
12195
|
+
}
|
|
12022
12196
|
function resolveDeterministicForeground(backgroundReference, candidates, palette, compositeBase) {
|
|
12023
12197
|
const backgroundHex = resolveOpaqueSurfaceHex(backgroundReference, palette, compositeBase);
|
|
12024
12198
|
if (!backgroundHex) return resolveTrustedTreatmentForeground(candidates, palette);
|
|
@@ -12030,29 +12204,51 @@ function resolveDeterministicForeground(backgroundReference, candidates, palette
|
|
|
12030
12204
|
...FALLBACK_TEXT_TOKENS
|
|
12031
12205
|
], backgroundHex, palette, derivedOnToken ? [derivedOnToken] : []);
|
|
12032
12206
|
if (!text) return { kind: "unknown" };
|
|
12033
|
-
return {
|
|
12034
|
-
|
|
12035
|
-
|
|
12036
|
-
|
|
12037
|
-
|
|
12038
|
-
|
|
12039
|
-
|
|
12040
|
-
|
|
12041
|
-
};
|
|
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);
|
|
12042
12216
|
}
|
|
12043
12217
|
function resolveTrustedTreatmentForeground(candidates, palette) {
|
|
12044
12218
|
const text = canonicalToken(candidates.text, palette);
|
|
12045
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
|
+
});
|
|
12046
12234
|
return {
|
|
12047
12235
|
kind: "known",
|
|
12236
|
+
provenance,
|
|
12048
12237
|
roles: {
|
|
12049
|
-
|
|
12050
|
-
|
|
12051
|
-
|
|
12052
|
-
|
|
12053
|
-
}
|
|
12238
|
+
...roles,
|
|
12239
|
+
linkHover: hover.token
|
|
12240
|
+
},
|
|
12241
|
+
hoverDecoration: hover.decoration
|
|
12054
12242
|
};
|
|
12055
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
|
+
}
|
|
12056
12252
|
function safeTokenOr(candidate, fallback, backgroundHex, palette) {
|
|
12057
12253
|
return firstSafeToken([candidate], backgroundHex, palette) ?? fallback;
|
|
12058
12254
|
}
|
|
@@ -14992,6 +15188,43 @@ const effectCompositionSchema = z.object({
|
|
|
14992
15188
|
/** Effects applied on focus */
|
|
14993
15189
|
focus: z.array(effectApplicationSchema).optional()
|
|
14994
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
|
+
}
|
|
14995
15228
|
//#endregion
|
|
14996
15229
|
//#region ../theme-core/src/navigation/types.ts
|
|
14997
15230
|
/**
|
|
@@ -15080,6 +15313,16 @@ const navLinkStyleSchema = z.object({
|
|
|
15080
15313
|
/** Composable effects */
|
|
15081
15314
|
effects: effectCompositionSchema.optional()
|
|
15082
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
|
+
}
|
|
15083
15326
|
//#endregion
|
|
15084
15327
|
//#region ../theme-core/src/customCss/validation.ts
|
|
15085
15328
|
/**
|
|
@@ -25527,6 +25770,14 @@ const blockDesignFallback = {
|
|
|
25527
25770
|
};
|
|
25528
25771
|
blockDesignFallback.sectionSurface, blockDesignFallback.contentFrame, blockDesignFallback.sectionHeight, blockDesignFallback.heroLegibility, blockDesignFallback.imageSurfaceTreatment, blockDesignFallback.imageSurfaceMotion, blockDesignFallback.tileTreatment, blockDesignFallback.eventListTreatment, blockDesignFallback.eyebrowTreatment, blockDesignFallback.accordionIconTreatment, blockDesignFallback.composition;
|
|
25529
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
|
|
25530
25781
|
//#region ../theme-core/src/site-styles/siteChromeBackgrounds.ts
|
|
25531
25782
|
const siteChromeBackgroundColorTokens = toSiteChromeBackgroundColorTokens(backgroundAppearanceColorTokenNames);
|
|
25532
25783
|
const quickSiteChromeBackgroundColorTokens = toSiteChromeBackgroundColorTokens(backgroundAppearanceQuickColorTokenNames);
|
|
@@ -25706,6 +25957,259 @@ z.object(headerPreferencesShape).omit({
|
|
|
25706
25957
|
structure: true
|
|
25707
25958
|
}).strict();
|
|
25708
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
|
|
25709
26213
|
//#region ../theme-core/src/site-styles/pageDesignAuthority.ts
|
|
25710
26214
|
const nonEmptyStringSchema = z.string().min(1);
|
|
25711
26215
|
const blockContentVersionIdSchema = nonEmptyStringSchema.transform(asBlockContentVersionId);
|
|
@@ -27697,6 +28201,28 @@ function createTransformRegistry(definitions) {
|
|
|
27697
28201
|
return registry;
|
|
27698
28202
|
}
|
|
27699
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
|
|
27700
28226
|
//#region ../blocks/src/system/fields/backgroundContent.ts
|
|
27701
28227
|
function parseBackgroundContent(value) {
|
|
27702
28228
|
const result = boxBackgroundSchema.safeParse(value);
|
|
@@ -27714,33 +28240,28 @@ function resolveBackgroundColorValue(value, context) {
|
|
|
27714
28240
|
//#endregion
|
|
27715
28241
|
//#region ../blocks/src/system/transforms/registry/_utils/surfaceForegroundStyles.ts
|
|
27716
28242
|
const contextualButtonStylesCache = /* @__PURE__ */ new WeakMap();
|
|
27717
|
-
function resolveHeaderLeafTextColor(header) {
|
|
27718
|
-
return header?.textColor ?? header?.navColor ?? header?.background?.textColor ?? header?.navLinkStyle?.colorToken ?? "text";
|
|
27719
|
-
}
|
|
27720
28243
|
function resolveHeaderRootForeground(header, palette, isTransparent) {
|
|
27721
|
-
if (isTransparent) return { kind: "unknown" };
|
|
28244
|
+
if (isTransparent) return readOpeningForegroundProjection(header) ?? { kind: "unknown" };
|
|
27722
28245
|
const background = header?.background;
|
|
27723
28246
|
return resolveSurfaceForeground(background ?? {
|
|
27724
28247
|
type: "color",
|
|
27725
28248
|
color: "surface"
|
|
27726
|
-
}, palette,
|
|
27727
|
-
|
|
27728
|
-
|
|
27729
|
-
|
|
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" });
|
|
27730
28256
|
}
|
|
27731
28257
|
function resolveSurfaceForegroundStyles(value, context, options) {
|
|
27732
28258
|
const input = parseBackgroundContent(value);
|
|
27733
|
-
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" };
|
|
27734
28260
|
const buttonStyles = resolveContextualButtonStyles(input, foreground, context, options);
|
|
27735
28261
|
if (foreground.kind === "unknown") return buttonStyles;
|
|
27736
28262
|
return {
|
|
27737
28263
|
...buttonStyles,
|
|
27738
|
-
...surfaceForegroundStyle(
|
|
27739
|
-
text: resolveBackgroundColorValue(foreground.roles.text, context),
|
|
27740
|
-
heading: resolveBackgroundColorValue(foreground.roles.heading, context),
|
|
27741
|
-
link: resolveBackgroundColorValue(foreground.roles.link, context),
|
|
27742
|
-
supporting: resolveBackgroundColorValue(foreground.roles.supporting, context)
|
|
27743
|
-
})
|
|
28264
|
+
...surfaceForegroundStyle(surfaceForegroundInputFromResolved(foreground, (token) => resolveBackgroundColorValue(token, context)))
|
|
27744
28265
|
};
|
|
27745
28266
|
}
|
|
27746
28267
|
function resolveContextualButtonStyles(background, foreground, context, options) {
|
|
@@ -33589,10 +34110,7 @@ function resolveBackgroundVisualStyles(backgroundColor, defaultToken = "surface"
|
|
|
33589
34110
|
};
|
|
33590
34111
|
}
|
|
33591
34112
|
function resolveHeaderVisualStyles(header) {
|
|
33592
|
-
|
|
33593
|
-
const hasContainedNav = navContainerType === "glass" || navContainerType === "pill";
|
|
33594
|
-
const hasOverlayVariant = header?.variant === "floating";
|
|
33595
|
-
if (hasContainedNav || hasOverlayVariant) return {
|
|
34113
|
+
if (headerRootPaint(header) !== "own-surface") return {
|
|
33596
34114
|
backgroundToken: "transparent",
|
|
33597
34115
|
isTransparent: true
|
|
33598
34116
|
};
|
|
@@ -33603,23 +34121,7 @@ function resolveHeaderVisualStyles(header) {
|
|
|
33603
34121
|
}
|
|
33604
34122
|
function resolvedForegroundStyle(foreground) {
|
|
33605
34123
|
if (foreground.kind === "unknown") return void 0;
|
|
33606
|
-
|
|
33607
|
-
return surfaceForegroundStyle({
|
|
33608
|
-
text: rgbColorValue(roles.text),
|
|
33609
|
-
heading: rgbColorValue(roles.heading),
|
|
33610
|
-
link: rgbColorValue(roles.link),
|
|
33611
|
-
supporting: rgbColorValue(roles.supporting)
|
|
33612
|
-
});
|
|
33613
|
-
}
|
|
33614
|
-
function resolveFooterRootForeground(footer, palette) {
|
|
33615
|
-
const background = footer?.background;
|
|
33616
|
-
return resolveSurfaceForeground(background ?? {
|
|
33617
|
-
type: "color",
|
|
33618
|
-
color: "surface"
|
|
33619
|
-
}, palette, {
|
|
33620
|
-
text: background?.textColor,
|
|
33621
|
-
link: footer?.navLinkStyle?.colorToken ?? footer?.navColor ?? background?.textColor
|
|
33622
|
-
});
|
|
34124
|
+
return surfaceForegroundStyle(surfaceForegroundInputFromResolved(foreground, rgbColorValue));
|
|
33623
34125
|
}
|
|
33624
34126
|
function footerBottomBarBorderWidthStyle(width) {
|
|
33625
34127
|
if (!width) return void 0;
|
|
@@ -33646,8 +34148,7 @@ const headerRootClassTransform = {
|
|
|
33646
34148
|
const placement = planSiteChromePlacement(parseHeaderPositioning(content.positioning));
|
|
33647
34149
|
const header = asPartialObject(value);
|
|
33648
34150
|
const visuals = resolveHeaderVisualStyles(header);
|
|
33649
|
-
const
|
|
33650
|
-
const hasContainedNav = navContainerType === "glass" || navContainerType === "pill";
|
|
34151
|
+
const hasContainedNav = headerRootPaint(header) === "contained-nav";
|
|
33651
34152
|
const backgroundClass = visuals.isTransparent || hasContainedNav ? "rb-bg-transparent" : null;
|
|
33652
34153
|
const classes = [config.base, backgroundClass];
|
|
33653
34154
|
if (!hasContainedNav) {
|
|
@@ -33690,7 +34191,7 @@ const headerRootStyleTransform = {
|
|
|
33690
34191
|
run: (value, _options, context) => {
|
|
33691
34192
|
const header = asPartialObject(value);
|
|
33692
34193
|
const visuals = resolveHeaderVisualStyles(header);
|
|
33693
|
-
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"));
|
|
33694
34195
|
}
|
|
33695
34196
|
};
|
|
33696
34197
|
const headerSectionBackgroundTransform = {
|
|
@@ -33698,9 +34199,7 @@ const headerSectionBackgroundTransform = {
|
|
|
33698
34199
|
kind: "string",
|
|
33699
34200
|
summary: "Resolve the inner site-header section background token",
|
|
33700
34201
|
run: (value) => {
|
|
33701
|
-
|
|
33702
|
-
const navContainerType = header?.navContainer?.type ?? "none";
|
|
33703
|
-
return header?.variant === "floating" || navContainerType === "glass" || navContainerType === "pill" ? "raw:transparent" : "background";
|
|
34202
|
+
return headerRootPaint(asPartialObject(value)) !== "own-surface" ? "raw:transparent" : "background";
|
|
33704
34203
|
}
|
|
33705
34204
|
};
|
|
33706
34205
|
const footerRootStyleTransform = {
|
|
@@ -33718,7 +34217,7 @@ const footerRootStyleTransform = {
|
|
|
33718
34217
|
styleParts.push(backgroundColorStyle(token));
|
|
33719
34218
|
}
|
|
33720
34219
|
}
|
|
33721
|
-
styleParts.push(resolvedForegroundStyle(resolveFooterRootForeground(footer, context.theme.palette)));
|
|
34220
|
+
styleParts.push(resolvedForegroundStyle(resolveFooterRootForeground(footer, context.theme.palette, context.proseHoverCandidate)));
|
|
33722
34221
|
styleParts.push(borderColorStyle("border"));
|
|
33723
34222
|
return mergeStyles(...styleParts);
|
|
33724
34223
|
}
|
|
@@ -33780,22 +34279,28 @@ const footerBottomBarStyleTransform = {
|
|
|
33780
34279
|
run: (value, _options, context) => {
|
|
33781
34280
|
const footer = asPartialObject(value);
|
|
33782
34281
|
const bottomBar = footer?.bottomBar;
|
|
33783
|
-
|
|
33784
|
-
const background = bottomBar?.background;
|
|
33785
|
-
if (background?.type === "color") styleParts.push(backgroundColorStyle(background.color ?? "surface"));
|
|
33786
|
-
styleParts.push(borderColorStyle(bottomBar?.borderTop?.colorToken ?? "border"), footerBottomBarBorderWidthStyle(bottomBar?.borderTop?.width));
|
|
33787
|
-
const foreground = resolveSurfaceForeground(background?.type === "color" ? background : {
|
|
33788
|
-
type: "color",
|
|
33789
|
-
color: "transparent"
|
|
33790
|
-
}, context.theme.palette, {
|
|
33791
|
-
text: bottomBar?.textColor,
|
|
33792
|
-
link: footer?.bottomTextLinkStyle?.colorToken ?? bottomBar?.textColor
|
|
33793
|
-
});
|
|
33794
|
-
if (background?.type === "color") styleParts.push(resolvedForegroundStyle(foreground));
|
|
33795
|
-
else if (bottomBar?.textColor) styleParts.push(textColorStyle(bottomBar.textColor));
|
|
33796
|
-
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));
|
|
33797
34283
|
}
|
|
33798
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
|
+
}
|
|
33799
34304
|
const footerSplitMainClassTransform = {
|
|
33800
34305
|
id: "layout.footerSplitMainClass",
|
|
33801
34306
|
kind: "string",
|
|
@@ -33891,7 +34396,7 @@ function chromeSurfaceTextToken(surface, theme, palette) {
|
|
|
33891
34396
|
case "header-root": {
|
|
33892
34397
|
const header = theme.header;
|
|
33893
34398
|
const foreground = resolveHeaderRootForeground(header, palette, resolveHeaderVisualStyles(header).isTransparent);
|
|
33894
|
-
return foreground.kind === "known" ? foreground.roles.text :
|
|
34399
|
+
return foreground.kind === "known" ? foreground.roles.text : headerLeafTextColor(header);
|
|
33895
34400
|
}
|
|
33896
34401
|
case "header-mobile-panel": return theme.header?.dropdownStyle?.textColor ?? "text";
|
|
33897
34402
|
case "footer-root": {
|
|
@@ -35973,7 +36478,9 @@ const bookingWizard = bookingForm(withApiBindings({
|
|
|
35973
36478
|
} },
|
|
35974
36479
|
formId: { $bind: { from: "content.formId" } },
|
|
35975
36480
|
form: { $bind: { from: "data.form" } },
|
|
35976
|
-
services: { $bind: { from: "data.services" } }
|
|
36481
|
+
services: { $bind: { from: "data.services" } },
|
|
36482
|
+
mailingList: { $bind: { from: "$root.mailingList" } },
|
|
36483
|
+
siteName: { $bind: { from: "$root.siteName" } }
|
|
35977
36484
|
}));
|
|
35978
36485
|
/** Both variants sit in the same section shell; only the inner layout differs. */
|
|
35979
36486
|
function bookingSection(children) {
|
|
@@ -37398,7 +37905,13 @@ const eventRegistrationHydrationSchemaShape = {
|
|
|
37398
37905
|
spamProtectionEnabled: z.boolean().optional(),
|
|
37399
37906
|
supportEmail: z.string().optional(),
|
|
37400
37907
|
sitePasses: publicPassProductCollectionSchema.nullable().optional(),
|
|
37401
|
-
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()
|
|
37402
37915
|
};
|
|
37403
37916
|
const eventRegistrationEventSourceSchema = z.discriminatedUnion("kind", [z.object({
|
|
37404
37917
|
kind: z.literal("loaded"),
|
|
@@ -37570,7 +38083,9 @@ const eventRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
|
|
|
37570
38083
|
spamProtectionEnabled: source.spamProtectionEnabled,
|
|
37571
38084
|
supportEmail: source.supportEmail,
|
|
37572
38085
|
sitePasses: source.sitePasses ?? null,
|
|
37573
|
-
siteMemberships: source.siteMemberships ?? null
|
|
38086
|
+
siteMemberships: source.siteMemberships ?? null,
|
|
38087
|
+
mailingList: source.mailingList,
|
|
38088
|
+
siteName: source.siteName
|
|
37574
38089
|
}
|
|
37575
38090
|
};
|
|
37576
38091
|
}
|
|
@@ -37738,6 +38253,8 @@ const eventRegistrationBlockDefinition = {
|
|
|
37738
38253
|
events: { $bind: { from: "data.events" } },
|
|
37739
38254
|
wholeSeriesRunEvents: { $bind: { from: "data.wholeSeriesRunEvents" } },
|
|
37740
38255
|
loaderFailures: { $bind: { from: "$root.loaderFailures" } },
|
|
38256
|
+
mailingList: { $bind: { from: "$root.mailingList" } },
|
|
38257
|
+
siteName: { $bind: { from: "$root.siteName" } },
|
|
37741
38258
|
sitePasses: { $bind: { from: "data.sitePasses" } },
|
|
37742
38259
|
siteMemberships: { $bind: { from: "data.siteMemberships" } },
|
|
37743
38260
|
stage: { $bind: {
|
|
@@ -44903,18 +45420,11 @@ const newsletterSignupManifest = createBlockManifest({
|
|
|
44903
45420
|
],
|
|
44904
45421
|
icon: "Mail"
|
|
44905
45422
|
});
|
|
45423
|
+
const newsletterPublicFieldIds = [...(newsletterSignupManifest.fields ?? []).map((field) => field.id), "_containerStyles"];
|
|
44906
45424
|
function sanitizeNewsletterSignupPublicContent(content) {
|
|
44907
45425
|
if (typeof content !== "object" || content === null || Array.isArray(content)) return content;
|
|
44908
45426
|
const value = content;
|
|
44909
|
-
return
|
|
44910
|
-
title: value.title,
|
|
44911
|
-
subtitle: value.subtitle,
|
|
44912
|
-
targeting: value.targeting,
|
|
44913
|
-
buttonVariant: value.buttonVariant,
|
|
44914
|
-
mailingListSource: value.mailingListSource,
|
|
44915
|
-
mailingListSourceToken: value.mailingListSourceToken,
|
|
44916
|
-
_sectionStyles: value._sectionStyles
|
|
44917
|
-
};
|
|
45427
|
+
return Object.fromEntries(newsletterPublicFieldIds.map((id) => [id, value[id]]));
|
|
44918
45428
|
}
|
|
44919
45429
|
const newsletterSignupBlockDefinition = {
|
|
44920
45430
|
manifest: newsletterSignupManifest,
|
|
@@ -49929,7 +50439,11 @@ z.discriminatedUnion("kind", navigationLinkInputSchemaOptions);
|
|
|
49929
50439
|
/** Pair a published version with the content it authorises at the render boundary. */
|
|
49930
50440
|
function readPublishedBlockPlacement(id, content) {
|
|
49931
50441
|
if (id == null && content == null) return null;
|
|
49932
|
-
if (id == null || content == null)
|
|
50442
|
+
if (id == null || content == null) return {
|
|
50443
|
+
kind: "incomplete",
|
|
50444
|
+
id: id ?? null,
|
|
50445
|
+
content: content ?? null
|
|
50446
|
+
};
|
|
49933
50447
|
return {
|
|
49934
50448
|
id,
|
|
49935
50449
|
content
|
|
@@ -51603,15 +52117,14 @@ async function loadPageWithDeps(deps, params) {
|
|
|
51603
52117
|
const { client, siteId, path, pageId, preview = false, dataLoaderOverrides, searchParams, forceSite } = params;
|
|
51604
52118
|
const [site, pageResponse] = await Promise.all([client.getSite({
|
|
51605
52119
|
id: siteId,
|
|
52120
|
+
currentPath: path,
|
|
51606
52121
|
...forceSite ? { force: true } : {}
|
|
51607
52122
|
}), client.getPage({
|
|
51608
52123
|
siteId,
|
|
51609
52124
|
path,
|
|
51610
52125
|
preview
|
|
51611
52126
|
})]);
|
|
51612
|
-
|
|
51613
|
-
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.");
|
|
51614
|
-
const { page: pageData } = pageResponse;
|
|
52127
|
+
const pageData = requirePageRecord(pageResponse);
|
|
51615
52128
|
const support = buildSiteRenderSupport(site, collectMediaAssetSidecar(pageResponse.mediaAssets));
|
|
51616
52129
|
const previewStage = preview ? "preview" : "published";
|
|
51617
52130
|
const pageOutline = buildRenderablePageOutline({
|
|
@@ -51641,8 +52154,11 @@ async function loadPageWithDeps(deps, params) {
|
|
|
51641
52154
|
theme: requireSdkTheme(support.theme, siteId),
|
|
51642
52155
|
sdkConfig: support.sdkConfig,
|
|
51643
52156
|
siteId,
|
|
52157
|
+
dataContext: {
|
|
52158
|
+
siteName: support.site.title,
|
|
52159
|
+
previewStage
|
|
52160
|
+
},
|
|
51644
52161
|
resolvedData,
|
|
51645
|
-
dataContext: { previewStage },
|
|
51646
52162
|
bookingOfferingPresets: support.bookingOfferingPresets,
|
|
51647
52163
|
mailingList: support.mailingList,
|
|
51648
52164
|
bookingTimeZone: support.bookingTimeZone,
|
|
@@ -51654,6 +52170,11 @@ async function loadPageWithDeps(deps, params) {
|
|
|
51654
52170
|
entriesByIdentifier: support.entriesByIdentifier
|
|
51655
52171
|
};
|
|
51656
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
|
+
}
|
|
51657
52178
|
//#endregion
|
|
51658
52179
|
//#region ../content-model/src/entry-slots/types.ts
|
|
51659
52180
|
function ok(value) {
|
|
@@ -52077,6 +52598,7 @@ function resolveTemplateBlock(block, bindingContext, customBlocks) {
|
|
|
52077
52598
|
id: block.id,
|
|
52078
52599
|
kind: block.blockKind,
|
|
52079
52600
|
purpose: block.scope === "template" ? "template-layout" : "entry-content",
|
|
52601
|
+
publishedPlacement: null,
|
|
52080
52602
|
...isRecord(block.bindings) ? { bindings: block.bindings } : {}
|
|
52081
52603
|
};
|
|
52082
52604
|
const manifest = resolveSdkBlockManifest(block.blockKind, customBlocks);
|
|
@@ -52242,6 +52764,7 @@ async function loadContentWithDeps(deps, params) {
|
|
|
52242
52764
|
const { client, siteId, path, preview = false, forceSite, dataLoaderOverrides, searchParams } = params;
|
|
52243
52765
|
const [siteResult, contentResult] = await Promise.allSettled([client.getSite({
|
|
52244
52766
|
id: siteId,
|
|
52767
|
+
currentPath: path,
|
|
52245
52768
|
...forceSite ? { force: true } : {}
|
|
52246
52769
|
}), client.getPage({
|
|
52247
52770
|
siteId,
|