@riverbankcms/sdk 0.139.0 → 0.140.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/README.md +1 -1
- package/dist/{PreviewEditorSidebar-BDeenhi3.mjs → PreviewEditorSidebar-CUyTzd5z.mjs} +4 -4
- package/dist/{PreviewEditorUI-DSRhgjF5.mjs → PreviewEditorUI-Agkw4v5i.mjs} +3 -3
- package/dist/{PreviewQueryProvider-D2K8GLUG.mjs → PreviewQueryProvider-CN0ewic5.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-CL7wSnYu.mjs → SdkPreviewModeRuntime-DdbeAdS8.mjs} +22 -8
- package/dist/{SiteChromeCustomizeContext-BhDn-5ir.mjs → SiteChromeCustomizeContext-CqGOz-Kv.mjs} +2053 -1110
- package/dist/_dts/ai/src/contracts/proposals.d.ts +165 -165
- package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +212 -212
- package/dist/_dts/api/src/accessAdmin.d.ts +74 -104
- package/dist/_dts/api/src/aiEndpoints.d.ts +5 -1
- package/dist/_dts/api/src/authSubmission.d.ts +46 -0
- package/dist/_dts/api/src/billing.d.ts +8 -4
- package/dist/_dts/api/src/billingEndpointDefinitions.d.ts +23 -0
- package/dist/_dts/api/src/billingEndpointTypes.d.ts +26 -0
- package/dist/_dts/api/src/blocks.d.ts +2 -0
- package/dist/_dts/api/src/bookingRecords.d.ts +1 -2
- package/dist/_dts/api/src/commercePortalEndpoints.d.ts +8 -1
- package/dist/_dts/api/src/communications.d.ts +0 -1
- package/dist/_dts/api/src/contentRuntime.d.ts +8 -3
- package/dist/_dts/api/src/endpoints.d.ts +93 -64
- package/dist/_dts/api/src/event-destination-policy.d.ts +2 -1
- package/dist/_dts/api/src/footerSettings.d.ts +9 -6
- package/dist/_dts/api/src/index.d.ts +5 -6
- 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/mailingListIntegration.d.ts +8 -2
- package/dist/_dts/api/src/navigation/dashboardSettingsNav.d.ts +1 -1
- package/dist/_dts/api/src/navigation/types.d.ts +1 -1
- package/dist/_dts/api/src/onboarding/confirmationResend.d.ts +25 -0
- package/dist/_dts/api/src/onboarding/surfaceData.d.ts +32 -32
- package/dist/_dts/api/src/publicBookingAvailabilityEndpointDefinitions.d.ts +8 -0
- package/dist/_dts/api/src/publicExperience/commerceEndpoints.d.ts +1 -0
- package/dist/_dts/api/src/publicExperience/eventEndpoints.d.ts +11 -3
- package/dist/_dts/api/src/publicExperience/sharedTypes.d.ts +3 -29
- package/dist/_dts/api/src/publicOnboardingAttemptEndpointDefinitions.d.ts +65 -0
- package/dist/_dts/api/src/saveOutcome.d.ts +20 -0
- package/dist/_dts/api/src/sdkContracts.d.ts +3 -22
- package/dist/_dts/api/src/sdkPushContracts.d.ts +18 -0
- package/dist/_dts/api/src/sdkThemeWire.d.ts +44 -44
- package/dist/_dts/api/src/settings/permissions.d.ts +12 -0
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +9 -5
- package/dist/_dts/api/src/siteOnboarding.d.ts +2 -9
- package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +2 -4
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +3 -1
- package/dist/_dts/api/src/siteSettings.d.ts +20 -7
- package/dist/_dts/api/src/types.d.ts +77 -77
- package/dist/_dts/api/src/wholeSeriesRuns.d.ts +2 -37
- package/dist/_dts/billing/src/membership/index.d.ts +3 -0
- package/dist/_dts/billing/src/plans/types.d.ts +3 -0
- package/dist/_dts/billing/src/site-arrangements.d.ts +14 -3
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +16 -4
- package/dist/_dts/blocks/src/pageRenderAdmission.d.ts +2 -0
- package/dist/_dts/blocks/src/pageRendererContracts.d.ts +5 -0
- package/dist/_dts/blocks/src/portal/types.d.ts +2 -4
- package/dist/_dts/blocks/src/portal/waitlist-types.d.ts +35 -0
- package/dist/_dts/blocks/src/system/blocks/event-registration.d.ts +2 -0
- package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +42 -0
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +4 -0
- package/dist/_dts/blocks/src/system/data/index.d.ts +2 -2
- package/dist/_dts/blocks/src/system/data/prefetchBlockData.d.ts +2 -1
- package/dist/_dts/blocks/src/system/data/types.d.ts +9 -0
- package/dist/_dts/blocks/src/system/registry.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/api/client.d.ts +0 -28
- package/dist/_dts/blocks/src/system/runtime/api/index.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/api/types/events.d.ts +7 -3
- package/dist/_dts/blocks/src/system/runtime/api/types/portal.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/api/types/waitlist-claims.d.ts +7 -2
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +30 -6
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +15 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/appointment-services.d.ts +43 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationSurface.d.ts +1 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/TicketSelectionStep.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/checkoutRecovery.d.ts +14 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/eventSourceRecovery.d.ts +56 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +6 -8
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useCheckoutRecovery.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationSubmit.d.ts +8 -7
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +10 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventSourceRecovery.d.ts +18 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.client.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +24 -6
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.server.d.ts +4 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.interactive.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.types.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/resolver.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/shared/components/index.d.ts +2 -6
- package/dist/_dts/blocks/src/system/runtime/shared/index.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/shared/useWaitlistClaim.d.ts +2 -0
- package/dist/_dts/commerce/src/purchase/event-registration-errors.d.ts +4 -0
- package/dist/_dts/commerce/src/purchase/orderItemMetadata.d.ts +27 -4
- package/dist/_dts/content-editor/src/controller/EntryControllerProvider.d.ts +2 -1
- package/dist/_dts/content-editor/src/hooks/useBlockAutosave.d.ts +3 -1
- package/dist/_dts/content-editor/src/useFooterComposerState.d.ts +3 -0
- package/dist/_dts/core/src/branded.d.ts +0 -8
- package/dist/_dts/core/src/index.d.ts +1 -0
- package/dist/_dts/core/src/mailing-list-setup-parser.d.ts +1 -1
- package/dist/_dts/core/src/mailing-list-setup.d.ts +14 -1
- package/dist/_dts/core/src/mailing-list-submission.d.ts +7 -27
- package/dist/_dts/core/src/participants.d.ts +2 -29
- package/dist/_dts/core/src/public-experience.d.ts +4 -0
- package/dist/_dts/core/src/public-profile.d.ts +27 -1
- package/dist/_dts/core/src/site-route-target.d.ts +9 -2
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +293 -606
- package/dist/_dts/editor-blocks/src/widgets/mailing-list-targeting/MailingListGlobalSettingsSummary.d.ts +10 -0
- package/dist/_dts/editor-blocks/src/widgets/mailing-list-targeting/MailingListTargetingField.d.ts +3 -2
- package/dist/_dts/editor-blocks/src/widgets/mailing-list-targeting/context.d.ts +3 -2
- package/dist/_dts/editor-blocks/src/widgets/mailing-list-targeting/loaders.d.ts +3 -2
- package/dist/_dts/editor-blocks/src/widgets/mailing-list-targeting/targetingState.d.ts +19 -0
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +14 -20
- package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +2 -0
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +2 -0
- package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +7 -1
- package/dist/_dts/sdk/src/rendering/helpers/templateContent.d.ts +1 -0
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/theme-core/src/accordions/types.d.ts +3 -3
- package/dist/_dts/theme-core/src/cards/types.d.ts +21 -21
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/header/interactionPalette.d.ts +8 -2
- package/dist/_dts/theme-core/src/header/legacyHeaderVariant.d.ts +2 -2
- package/dist/_dts/theme-core/src/inputs/types.d.ts +2 -2
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +54 -54
- package/dist/_dts/theme-core/src/runtime/buildThemeRuntimeFromBridge.d.ts +1 -4
- package/dist/_dts/theme-core/src/schema.d.ts +84 -84
- package/dist/_dts/theme-core/src/shared/componentStyles.d.ts +1 -1
- package/dist/_dts/theme-core/src/site-styles/backgroundAppearance.d.ts +2 -2
- package/dist/_dts/theme-core/src/surfaces/foregroundInteraction.d.ts +77 -0
- package/dist/_dts/theme-core/src/surfaces/index.d.ts +1 -0
- package/dist/_dts/theme-core/src/typography/generateTypographyCss.d.ts +2 -2
- package/dist/_dts/ui/src/lib/use-delayed-flag.d.ts +9 -0
- package/dist/_dts/ui/src/pending-button.d.ts +10 -0
- package/dist/client/{BookingConsentAgreement-CZvTDtsK.mjs → BookingConsentAgreement-CuKa82V4.mjs} +4 -4
- package/dist/client/{DiscountCodeDisclosure-D-DsLCMU.mjs → DiscountCodeDisclosure-BbYieKWB.mjs} +1 -1
- package/dist/client/{EventCombined.client-dWqgd5ZO.mjs → EventCombined.client-LTfR1Aby.mjs} +6 -6
- package/dist/client/{EventListing.client-BMRa9IYp.mjs → EventListing.client-DUHpYSuo.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-D21W9kBZ.mjs → LeafletStaticMap-CHRupL6m.mjs} +1 -1
- package/dist/client/{accordion-FxF_ta47.mjs → accordion-6HiIFxNL.mjs} +1 -1
- package/dist/client/{bookingForm-YnwW4TGw.mjs → bookingForm-Dlmid43H.mjs} +7 -7
- package/dist/client/bookings.mjs +325 -140
- package/dist/client/{carousel-vng7fFT5.mjs → carousel-DmkZRRq_.mjs} +2 -2
- package/dist/client/{carousel.client-59G_WMr4.mjs → carousel.client-DQTjCVQT.mjs} +1 -1
- package/dist/client/{cart-DEPDsjNk.mjs → cart-CIC24330.mjs} +3 -3
- package/dist/client/{checkout-CZRWu9rW.mjs → checkout-D1Zw9imo.mjs} +3 -3
- package/dist/client/{checkoutUrls-BuseL0dw.mjs → checkoutUrls-FL6lRkrt.mjs} +1 -1
- package/dist/client/client.mjs +1717 -882
- package/dist/client/{colorStyles-CrxJrPjJ.mjs → colorStyles-3013aRAY.mjs} +3 -1
- package/dist/client/{context-DvU_WUmd.mjs → context-Cy1OayHx.mjs} +6 -19
- package/dist/client/{dates-wnPMiRl5.mjs → dates-aDcfoLHr.mjs} +2 -2
- package/dist/client/{eventCalendar-BA3Q5L15.mjs → eventCalendar-FQxMPAjf.mjs} +8 -8
- package/dist/client/{eventCombined-51wgR-1R.mjs → eventCombined-Dr3ac6Hb.mjs} +3 -3
- package/dist/client/{eventDetails-modaetpm.mjs → eventDetails-D-AzUHFQ.mjs} +4 -4
- package/dist/client/{eventListing-D8t2J3Kv.mjs → eventListing-B3XxBf3i.mjs} +3 -3
- package/dist/client/{eventRegistration-CYqtkCE_.mjs → eventRegistration-I6EaokFD.mjs} +500 -152
- package/dist/client/{form-CBKXN5In.mjs → form-BbWckVWY.mjs} +3 -3
- package/dist/client/{headerSection-DylDqNrs.mjs → headerSection-C9qU4Y7x.mjs} +2 -2
- package/dist/client/hooks.mjs +445 -180
- package/dist/client/{locationMap-CvWrG0vZ.mjs → locationMap-CLCShvlG.mjs} +3 -3
- package/dist/client/{media-BOHuueS5.mjs → media-DHpfFwd3.mjs} +1 -1
- package/dist/client/{newsletterForm-Btwk70zw.mjs → newsletterForm-Briukxzi.mjs} +130 -87
- package/dist/client/{pricing-Uzw-GQ6Y.mjs → pricing-Copadu-2.mjs} +1 -1
- package/dist/client/{productDetail-JLcUYKnd.mjs → productDetail-oujlRd-r.mjs} +3 -3
- package/dist/client/{productList-FM0cbUzj.mjs → productList-BRiIRUcd.mjs} +3 -3
- package/dist/client/{propsDecoder-DYzafZb2.mjs → propsDecoder-CB2KS_ko.mjs} +130 -24
- package/dist/client/rendering/client.mjs +911 -400
- package/dist/client/rendering/islands.mjs +19 -19
- package/dist/client/rendering.mjs +1696 -818
- package/dist/client/{scrollToBlock-CvXszexS.mjs → scrollToBlock-B1IS1_ua.mjs} +1 -1
- package/dist/client/{shop-BIcjvy5a.mjs → shop-Vn6yNFED.mjs} +6 -6
- package/dist/client/{shop-commerce-BZQsy7xw.mjs → shop-commerce-BVTqipYp.mjs} +7 -7
- package/dist/client/{shop-commerce-store-D5V7XAb5.mjs → shop-commerce-store-BVnJVy7v.mjs} +1 -1
- package/dist/client/{shopShared-DowkXevB.mjs → shopShared-COIeK77T.mjs} +4 -4
- package/dist/client/{useEventFilters-oMoTw_JE.mjs → useEventFilters-DzIUcS9n.mjs} +7 -7
- package/dist/preview-next/before-render.mjs +119 -64
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/keepAlive.mjs +119 -64
- package/dist/preview-next/middleware.mjs +119 -64
- package/dist/{previewAuthStore-COUyAKaX.mjs → previewAuthStore-Gjb6r6vz.mjs} +119 -64
- package/dist/{sdk-runtime-D4k2LSGF.mjs → sdk-runtime-CnCLvZRv.mjs} +2 -2
- package/dist/{separator-UGtpag4Z.mjs → separator-DKDRJ1oH.mjs} +1 -1
- package/dist/server/components.mjs +787 -323
- package/dist/server/config-validation.mjs +328 -79
- package/dist/server/config.mjs +332 -83
- package/dist/server/data.mjs +441 -180
- package/dist/server/index.mjs +126 -66
- package/dist/server/next.mjs +1031 -595
- package/dist/server/page-converter.mjs +183 -74
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +1068 -592
- package/dist/server/rendering.mjs +802 -324
- package/dist/server/routing.mjs +506 -214
- package/dist/server/server.mjs +468 -244
- package/dist/server/theme-bridge.mjs +433 -100
- package/dist/server/theme.mjs +8 -2
- package/dist/styles/index.css +237 -43
- package/package.json +1 -1
- package/dist/_dts/blocks/src/system/runtime/shared/components/BookingOptionCompactRow.d.ts +0 -29
- package/dist/_dts/blocks/src/system/runtime/shared/components/BookingOptionList.d.ts +0 -13
package/dist/server/server.mjs
CHANGED
|
@@ -1356,10 +1356,12 @@ const unsafeAsApiKeyId = (id) => id;
|
|
|
1356
1356
|
const unsafeAsEventOfferingId = (id) => id;
|
|
1357
1357
|
const unsafeAsEventSeriesId = (id) => id;
|
|
1358
1358
|
const unsafeAsUserId = (id) => id;
|
|
1359
|
+
const unsafeAsContentVersionId = (id) => id;
|
|
1359
1360
|
const parseSiteId = (value) => parseUuidBrand(value, unsafeAsSiteId);
|
|
1360
1361
|
const parseApiKeyId = (value) => parseUuidBrand(value, unsafeAsApiKeyId);
|
|
1361
1362
|
const parseEventOfferingId = (value) => parseUuidBrand(value, unsafeAsEventOfferingId);
|
|
1362
1363
|
const parseUserId = (value) => parseUuidBrand(value, unsafeAsUserId);
|
|
1364
|
+
const parseContentVersionId = (value) => parseUuidBrand(value, unsafeAsContentVersionId);
|
|
1363
1365
|
const parseEventSeriesId = (value) => parseUuidBrand(value, unsafeAsEventSeriesId);
|
|
1364
1366
|
//#endregion
|
|
1365
1367
|
//#region ../core/src/assert-never.ts
|
|
@@ -1593,7 +1595,7 @@ function parseEventPageSurfaceDestinationMode(value) {
|
|
|
1593
1595
|
return value === "cms-managed" || value === "system-managed" ? value : void 0;
|
|
1594
1596
|
}
|
|
1595
1597
|
function parseEventPageSurfaceSubject(value) {
|
|
1596
|
-
if (!isRecord$
|
|
1598
|
+
if (!isRecord$18(value)) return err$1({ kind: "notObject" });
|
|
1597
1599
|
switch (value.kind) {
|
|
1598
1600
|
case "eventSeries": {
|
|
1599
1601
|
const eventSeriesId = parseEventSeriesId(value.eventSeriesId);
|
|
@@ -1648,7 +1650,7 @@ function parseEventSeriesIdList(values) {
|
|
|
1648
1650
|
}
|
|
1649
1651
|
return ok$1(parsed);
|
|
1650
1652
|
}
|
|
1651
|
-
function isRecord$
|
|
1653
|
+
function isRecord$18(value) {
|
|
1652
1654
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
1653
1655
|
}
|
|
1654
1656
|
//#endregion
|
|
@@ -1832,16 +1834,47 @@ function parsePositiveInteger(value) {
|
|
|
1832
1834
|
function parseNewsletterListId(value) {
|
|
1833
1835
|
return parseTrimmedMatchingString(value, UUID_PATTERN);
|
|
1834
1836
|
}
|
|
1837
|
+
function parseMailchimpAccountId(value) {
|
|
1838
|
+
return parseTrimmedMatchingString(value, OPAQUE_ID_PATTERN);
|
|
1839
|
+
}
|
|
1835
1840
|
function parseMailchimpAudienceId(value) {
|
|
1836
1841
|
return parseTrimmedMatchingString(value, OPAQUE_ID_PATTERN);
|
|
1837
1842
|
}
|
|
1838
1843
|
function parseMailchimpInterestId(value) {
|
|
1839
1844
|
return parseTrimmedMatchingString(value, OPAQUE_ID_PATTERN);
|
|
1840
1845
|
}
|
|
1846
|
+
function parseBrevoAccountId(value) {
|
|
1847
|
+
return parseTrimmedMatchingString(value, OPAQUE_ID_PATTERN);
|
|
1848
|
+
}
|
|
1841
1849
|
function parseBrevoListId(value) {
|
|
1842
1850
|
return parsePositiveInteger(value);
|
|
1843
1851
|
}
|
|
1844
1852
|
//#endregion
|
|
1853
|
+
//#region ../core/src/mailing-list-setup.ts
|
|
1854
|
+
function isRecord$17(value) {
|
|
1855
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
1856
|
+
}
|
|
1857
|
+
const DEFAULT_MAILING_LIST_SUCCESS_MESSAGE = "Thanks — you're on the list.";
|
|
1858
|
+
function parseMailingListProviderScope(value) {
|
|
1859
|
+
if (!isRecord$17(value)) return err$1("invalid_mailing_list_provider_scope");
|
|
1860
|
+
if (value.provider === "native") return ok$1({ provider: "native" });
|
|
1861
|
+
if (value.provider === "brevo") {
|
|
1862
|
+
const accountId = parseBrevoAccountId(value.accountId);
|
|
1863
|
+
return accountId !== null ? ok$1({
|
|
1864
|
+
provider: "brevo",
|
|
1865
|
+
accountId
|
|
1866
|
+
}) : err$1("invalid_mailing_list_provider_scope");
|
|
1867
|
+
}
|
|
1868
|
+
if (value.provider === "mailchimp") {
|
|
1869
|
+
const accountId = parseMailchimpAccountId(value.accountId);
|
|
1870
|
+
return accountId !== null ? ok$1({
|
|
1871
|
+
provider: "mailchimp",
|
|
1872
|
+
accountId
|
|
1873
|
+
}) : err$1("invalid_mailing_list_provider_scope");
|
|
1874
|
+
}
|
|
1875
|
+
return err$1("invalid_mailing_list_provider_scope");
|
|
1876
|
+
}
|
|
1877
|
+
//#endregion
|
|
1845
1878
|
//#region ../core/src/mailing-list-setup-parser.ts
|
|
1846
1879
|
function parseMailingListGlobalForm(value) {
|
|
1847
1880
|
if (!isRecord$16(value)) return formError("shape");
|
|
@@ -1850,12 +1883,15 @@ function parseMailingListGlobalForm(value) {
|
|
|
1850
1883
|
if (typeof value.includeOptionalPhone !== "boolean") return formError("includeOptionalPhone");
|
|
1851
1884
|
const buttonLabel = parseRequiredString(value.buttonLabel);
|
|
1852
1885
|
if (buttonLabel === null) return formError("buttonLabel");
|
|
1886
|
+
const successMessage = parseRequiredString(value.successMessage);
|
|
1887
|
+
if (successMessage === null) return formError("successMessage");
|
|
1853
1888
|
const privacyNote = parseOptionalString(value.privacyNote);
|
|
1854
1889
|
if (privacyNote === void 0) return formError("privacyNote");
|
|
1855
1890
|
return ok$1({
|
|
1856
1891
|
fields,
|
|
1857
1892
|
includeOptionalPhone: value.includeOptionalPhone,
|
|
1858
1893
|
buttonLabel,
|
|
1894
|
+
successMessage,
|
|
1859
1895
|
privacyNote
|
|
1860
1896
|
});
|
|
1861
1897
|
}
|
|
@@ -2185,11 +2221,17 @@ function parseMailingListSignedSourceToken(value) {
|
|
|
2185
2221
|
const parsed = typeof value === "string" ? value.trim() : "";
|
|
2186
2222
|
return /^[A-Za-z0-9._~-]{16,1000}$/u.test(parsed) ? parsed : null;
|
|
2187
2223
|
}
|
|
2188
|
-
function
|
|
2189
|
-
const parsed =
|
|
2190
|
-
return parsed
|
|
2224
|
+
function parseMailingListContentVersionId(value) {
|
|
2225
|
+
const parsed = parseContentVersionId(value);
|
|
2226
|
+
return parsed.ok ? parsed.value : null;
|
|
2227
|
+
}
|
|
2228
|
+
function buildMailingListSignupBlockSourceRef(blockId, contentVersionId) {
|
|
2229
|
+
const parsedBlockId = parseMailingListBlockId(blockId);
|
|
2230
|
+
const parsedContentVersionId = parseMailingListContentVersionId(contentVersionId);
|
|
2231
|
+
return parsedBlockId !== null && parsedContentVersionId !== null ? {
|
|
2191
2232
|
tag: "block_ref",
|
|
2192
|
-
blockId:
|
|
2233
|
+
blockId: parsedBlockId,
|
|
2234
|
+
contentVersionId: parsedContentVersionId
|
|
2193
2235
|
} : null;
|
|
2194
2236
|
}
|
|
2195
2237
|
//#endregion
|
|
@@ -2697,6 +2739,14 @@ const PUBLIC_BOOKING_AVAILABILITY_ENDPOINT_DEFINITIONS = defineEndpointDefinitio
|
|
|
2697
2739
|
auth: "public",
|
|
2698
2740
|
responseKind: "json"
|
|
2699
2741
|
},
|
|
2742
|
+
getPublicBookingServiceBySlug: {
|
|
2743
|
+
path: "/public/bookings/services/by-slug/{slug}",
|
|
2744
|
+
method: "GET",
|
|
2745
|
+
revalidate: publicReadFreshnessSeconds("getPublicBookingService"),
|
|
2746
|
+
tags: [TAG_TEMPLATES.publicBookingServices],
|
|
2747
|
+
auth: "public",
|
|
2748
|
+
responseKind: "json"
|
|
2749
|
+
},
|
|
2700
2750
|
getPublicBookingResourcesReference: {
|
|
2701
2751
|
path: "/public/bookings/resources/reference",
|
|
2702
2752
|
method: "GET",
|
|
@@ -3249,11 +3299,105 @@ const PUBLIC_READ_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
3249
3299
|
responseKind: "json"
|
|
3250
3300
|
}
|
|
3251
3301
|
});
|
|
3302
|
+
//#endregion
|
|
3303
|
+
//#region ../api/src/publicOnboardingAttemptEndpointDefinitions.ts
|
|
3304
|
+
/**
|
|
3305
|
+
* The anonymous onboarding attempt, addressed by its opaque resume token.
|
|
3306
|
+
*
|
|
3307
|
+
* Every route here is reached before there is an account, so none of them can
|
|
3308
|
+
* be scoped to a site or a user: the token is the whole credential. They are
|
|
3309
|
+
* kept together so that stays obvious.
|
|
3310
|
+
*/
|
|
3311
|
+
const PUBLIC_ONBOARDING_ATTEMPT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
3312
|
+
createPublicOnboardingAttempt: {
|
|
3313
|
+
path: "/public/onboarding/attempts",
|
|
3314
|
+
method: "POST",
|
|
3315
|
+
auth: "public",
|
|
3316
|
+
errors: [],
|
|
3317
|
+
responseKind: "json"
|
|
3318
|
+
},
|
|
3319
|
+
createPublicOnboardingLogoUploadUrl: {
|
|
3320
|
+
path: "/public/onboarding/attempts/{attemptToken}/logo-upload-url",
|
|
3321
|
+
method: "POST",
|
|
3322
|
+
auth: "public",
|
|
3323
|
+
errors: [],
|
|
3324
|
+
responseKind: "json"
|
|
3325
|
+
},
|
|
3326
|
+
uploadPublicOnboardingLogo: {
|
|
3327
|
+
path: "/public/onboarding/attempts/{attemptToken}/logo",
|
|
3328
|
+
method: "POST",
|
|
3329
|
+
auth: "public",
|
|
3330
|
+
errors: [],
|
|
3331
|
+
responseKind: "json"
|
|
3332
|
+
},
|
|
3333
|
+
getPublicOnboardingAttempt: {
|
|
3334
|
+
path: "/public/onboarding/attempts/{attemptToken}",
|
|
3335
|
+
method: "GET",
|
|
3336
|
+
auth: "public",
|
|
3337
|
+
errors: [],
|
|
3338
|
+
responseKind: "json"
|
|
3339
|
+
},
|
|
3340
|
+
getPublicOnboardingAttemptProgress: {
|
|
3341
|
+
path: "/public/onboarding/attempts/{attemptToken}/status",
|
|
3342
|
+
method: "GET",
|
|
3343
|
+
auth: "public",
|
|
3344
|
+
errors: [],
|
|
3345
|
+
responseKind: "json"
|
|
3346
|
+
},
|
|
3347
|
+
updatePublicOnboardingAttempt: {
|
|
3348
|
+
path: "/public/onboarding/attempts/{attemptToken}",
|
|
3349
|
+
method: "PATCH",
|
|
3350
|
+
auth: "public",
|
|
3351
|
+
errors: [],
|
|
3352
|
+
responseKind: "json"
|
|
3353
|
+
},
|
|
3354
|
+
runPublicOnboardingAttempt: {
|
|
3355
|
+
path: "/public/onboarding/attempts/{attemptToken}/run",
|
|
3356
|
+
method: "POST",
|
|
3357
|
+
auth: "public",
|
|
3358
|
+
errors: [],
|
|
3359
|
+
responseKind: "json"
|
|
3360
|
+
},
|
|
3361
|
+
resendPublicOnboardingAttemptConfirmation: {
|
|
3362
|
+
path: "/public/onboarding/attempts/{attemptToken}/resend-confirmation",
|
|
3363
|
+
method: "POST",
|
|
3364
|
+
auth: "public",
|
|
3365
|
+
errors: [],
|
|
3366
|
+
responseKind: "json"
|
|
3367
|
+
}
|
|
3368
|
+
});
|
|
3369
|
+
//#endregion
|
|
3370
|
+
//#region ../api/src/billingEndpointDefinitions.ts
|
|
3371
|
+
const BILLING_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
3372
|
+
adminChangePlan: {
|
|
3373
|
+
path: "/admin/billing/plan",
|
|
3374
|
+
method: "POST",
|
|
3375
|
+
tags: ["admin", "billing"],
|
|
3376
|
+
auth: "admin",
|
|
3377
|
+
responseKind: "json"
|
|
3378
|
+
},
|
|
3379
|
+
changePlan: {
|
|
3380
|
+
path: "/billing/plan/change",
|
|
3381
|
+
method: "POST",
|
|
3382
|
+
tags: ["billing"],
|
|
3383
|
+
auth: "user",
|
|
3384
|
+
responseKind: "json"
|
|
3385
|
+
},
|
|
3386
|
+
createBillingPortalSession: {
|
|
3387
|
+
path: "/billing/portal/session",
|
|
3388
|
+
method: "POST",
|
|
3389
|
+
tags: ["billing"],
|
|
3390
|
+
auth: "user",
|
|
3391
|
+
responseKind: "json"
|
|
3392
|
+
}
|
|
3393
|
+
});
|
|
3252
3394
|
const API_ENDPOINTS$1 = {
|
|
3253
3395
|
...ACCOUNT_ENDPOINT_DEFINITIONS,
|
|
3396
|
+
...PUBLIC_ONBOARDING_ATTEMPT_ENDPOINT_DEFINITIONS,
|
|
3254
3397
|
...PUBLIC_EVENT_ENDPOINT_DEFINITIONS,
|
|
3255
3398
|
...GIFTING_ENDPOINT_DEFINITIONS,
|
|
3256
3399
|
...PUBLIC_READ_ENDPOINT_DEFINITIONS,
|
|
3400
|
+
...BILLING_ENDPOINT_DEFINITIONS,
|
|
3257
3401
|
aiContentUpdateChat: {
|
|
3258
3402
|
path: "/ai/content-update-chat",
|
|
3259
3403
|
method: "POST",
|
|
@@ -3407,55 +3551,6 @@ const API_ENDPOINTS$1 = {
|
|
|
3407
3551
|
errors: [],
|
|
3408
3552
|
responseKind: "json"
|
|
3409
3553
|
},
|
|
3410
|
-
createPublicOnboardingAttempt: {
|
|
3411
|
-
path: "/public/onboarding/attempts",
|
|
3412
|
-
method: "POST",
|
|
3413
|
-
auth: "public",
|
|
3414
|
-
errors: [],
|
|
3415
|
-
responseKind: "json"
|
|
3416
|
-
},
|
|
3417
|
-
createPublicOnboardingLogoUploadUrl: {
|
|
3418
|
-
path: "/public/onboarding/attempts/{attemptToken}/logo-upload-url",
|
|
3419
|
-
method: "POST",
|
|
3420
|
-
auth: "public",
|
|
3421
|
-
errors: [],
|
|
3422
|
-
responseKind: "json"
|
|
3423
|
-
},
|
|
3424
|
-
uploadPublicOnboardingLogo: {
|
|
3425
|
-
path: "/public/onboarding/attempts/{attemptToken}/logo",
|
|
3426
|
-
method: "POST",
|
|
3427
|
-
auth: "public",
|
|
3428
|
-
errors: [],
|
|
3429
|
-
responseKind: "json"
|
|
3430
|
-
},
|
|
3431
|
-
getPublicOnboardingAttempt: {
|
|
3432
|
-
path: "/public/onboarding/attempts/{attemptToken}",
|
|
3433
|
-
method: "GET",
|
|
3434
|
-
auth: "public",
|
|
3435
|
-
errors: [],
|
|
3436
|
-
responseKind: "json"
|
|
3437
|
-
},
|
|
3438
|
-
getPublicOnboardingAttemptProgress: {
|
|
3439
|
-
path: "/public/onboarding/attempts/{attemptToken}/status",
|
|
3440
|
-
method: "GET",
|
|
3441
|
-
auth: "public",
|
|
3442
|
-
errors: [],
|
|
3443
|
-
responseKind: "json"
|
|
3444
|
-
},
|
|
3445
|
-
updatePublicOnboardingAttempt: {
|
|
3446
|
-
path: "/public/onboarding/attempts/{attemptToken}",
|
|
3447
|
-
method: "PATCH",
|
|
3448
|
-
auth: "public",
|
|
3449
|
-
errors: [],
|
|
3450
|
-
responseKind: "json"
|
|
3451
|
-
},
|
|
3452
|
-
runPublicOnboardingAttempt: {
|
|
3453
|
-
path: "/public/onboarding/attempts/{attemptToken}/run",
|
|
3454
|
-
method: "POST",
|
|
3455
|
-
auth: "public",
|
|
3456
|
-
errors: [],
|
|
3457
|
-
responseKind: "json"
|
|
3458
|
-
},
|
|
3459
3554
|
aiSiteWizardSuggestGoals: {
|
|
3460
3555
|
path: "/sites/{siteId}/ai/site-wizard/goals",
|
|
3461
3556
|
method: "POST",
|
|
@@ -4971,20 +5066,6 @@ const API_ENDPOINTS$1 = {
|
|
|
4971
5066
|
auth: "admin",
|
|
4972
5067
|
responseKind: "json"
|
|
4973
5068
|
},
|
|
4974
|
-
adminChangePlan: {
|
|
4975
|
-
path: "/admin/billing/plan",
|
|
4976
|
-
method: "POST",
|
|
4977
|
-
tags: ["admin", "billing"],
|
|
4978
|
-
auth: "admin",
|
|
4979
|
-
responseKind: "json"
|
|
4980
|
-
},
|
|
4981
|
-
changePlan: {
|
|
4982
|
-
path: "/billing/plan/change",
|
|
4983
|
-
method: "POST",
|
|
4984
|
-
tags: ["billing"],
|
|
4985
|
-
auth: "user",
|
|
4986
|
-
responseKind: "json"
|
|
4987
|
-
},
|
|
4988
5069
|
mfaTotpEnroll: {
|
|
4989
5070
|
path: "/auth/mfa/totp/enroll",
|
|
4990
5071
|
method: "POST",
|
|
@@ -5333,7 +5414,12 @@ const API_ENDPOINTS$1 = {
|
|
|
5333
5414
|
path: "/public/sites/{siteId}/sitemap",
|
|
5334
5415
|
method: "GET",
|
|
5335
5416
|
revalidate: 60,
|
|
5336
|
-
tags: [
|
|
5417
|
+
tags: [
|
|
5418
|
+
TAG_TEMPLATES.siteRoutableContent,
|
|
5419
|
+
TAG_TEMPLATES.siteSettings,
|
|
5420
|
+
TAG_TEMPLATES.publicEvents,
|
|
5421
|
+
TAG_TEMPLATES.publicBookingServices
|
|
5422
|
+
],
|
|
5337
5423
|
auth: "public",
|
|
5338
5424
|
responseKind: "json"
|
|
5339
5425
|
},
|
|
@@ -8652,6 +8738,17 @@ const API_ENDPOINTS$1 = {
|
|
|
8652
8738
|
auth: "public",
|
|
8653
8739
|
responseKind: "json"
|
|
8654
8740
|
},
|
|
8741
|
+
portalCancelWaitlistEntry: {
|
|
8742
|
+
path: "/portal/waitlists/{entryId}/cancel",
|
|
8743
|
+
method: "POST",
|
|
8744
|
+
auth: "public",
|
|
8745
|
+
responseKind: "json",
|
|
8746
|
+
errors: [
|
|
8747
|
+
"resource:not_found",
|
|
8748
|
+
"resource:conflict",
|
|
8749
|
+
"server:internal_error"
|
|
8750
|
+
]
|
|
8751
|
+
},
|
|
8655
8752
|
portalGetEventGuests: {
|
|
8656
8753
|
path: "/portal/events/{registrationId}/guests",
|
|
8657
8754
|
method: "GET",
|
|
@@ -9468,7 +9565,7 @@ var SimpleCache = class {
|
|
|
9468
9565
|
* 1. This constant
|
|
9469
9566
|
* 2. The "version" field in package.json
|
|
9470
9567
|
*/
|
|
9471
|
-
const SDK_VERSION = "0.
|
|
9568
|
+
const SDK_VERSION = "0.140.0";
|
|
9472
9569
|
//#endregion
|
|
9473
9570
|
//#region src/client/error.ts
|
|
9474
9571
|
let _Symbol$for;
|
|
@@ -11328,59 +11425,108 @@ function interpolateHex(startHex, endHex, position) {
|
|
|
11328
11425
|
const channel = (from, to) => Math.round(from + (to - from) * position).toString(16).padStart(2, "0");
|
|
11329
11426
|
return `#${channel(start.r, end.r)}${channel(start.g, end.g)}${channel(start.b, end.b)}`;
|
|
11330
11427
|
}
|
|
11331
|
-
|
|
11332
|
-
|
|
11333
|
-
|
|
11334
|
-
|
|
11335
|
-
|
|
11336
|
-
|
|
11337
|
-
|
|
11338
|
-
|
|
11339
|
-
|
|
11340
|
-
|
|
11341
|
-
|
|
11342
|
-
|
|
11343
|
-
|
|
11344
|
-
|
|
11345
|
-
|
|
11346
|
-
|
|
11347
|
-
|
|
11348
|
-
|
|
11349
|
-
|
|
11350
|
-
|
|
11351
|
-
pseudoElement: "none",
|
|
11352
|
-
applicableTo: ["button"],
|
|
11353
|
-
customizableOption: {
|
|
11354
|
-
name: "amount",
|
|
11355
|
-
type: "select",
|
|
11356
|
-
label: config.label,
|
|
11357
|
-
default: 100,
|
|
11358
|
-
options: [
|
|
11359
|
-
0,
|
|
11360
|
-
100,
|
|
11361
|
-
200,
|
|
11362
|
-
300,
|
|
11363
|
-
400,
|
|
11364
|
-
500,
|
|
11365
|
-
600,
|
|
11366
|
-
700,
|
|
11367
|
-
800,
|
|
11368
|
-
900
|
|
11369
|
-
]
|
|
11428
|
+
//#endregion
|
|
11429
|
+
//#region ../theme-core/src/tokens/tokens.ts
|
|
11430
|
+
const defaultThemeTokens = {
|
|
11431
|
+
color: {
|
|
11432
|
+
"background/base": "#ffffff",
|
|
11433
|
+
"background/elevated": "#f5f5f5",
|
|
11434
|
+
"surface/base": "#ffffff",
|
|
11435
|
+
"surface/subtle": "#f9f9fb",
|
|
11436
|
+
"surface/inverted": "#111111",
|
|
11437
|
+
"content/primary": "#111111",
|
|
11438
|
+
"content/secondary": "#3f3f46",
|
|
11439
|
+
"accent/primary": "#2563eb",
|
|
11440
|
+
"accent/secondary": "#1d4ed8",
|
|
11441
|
+
"border/base": "#e5e7eb"
|
|
11442
|
+
},
|
|
11443
|
+
typography: {
|
|
11444
|
+
"display/hero": {
|
|
11445
|
+
fontSize: "clamp(48px, 8vw, 96px)",
|
|
11446
|
+
lineHeight: "1.05",
|
|
11447
|
+
fontWeight: "700"
|
|
11370
11448
|
},
|
|
11371
|
-
|
|
11372
|
-
|
|
11373
|
-
|
|
11374
|
-
|
|
11375
|
-
|
|
11376
|
-
|
|
11377
|
-
|
|
11378
|
-
|
|
11379
|
-
|
|
11380
|
-
|
|
11449
|
+
"display/section": {
|
|
11450
|
+
fontSize: "clamp(40px, 6vw, 72px)",
|
|
11451
|
+
lineHeight: "1.1",
|
|
11452
|
+
fontWeight: "700"
|
|
11453
|
+
},
|
|
11454
|
+
"heading/large": {
|
|
11455
|
+
fontSize: "clamp(32px, 4vw, 48px)",
|
|
11456
|
+
lineHeight: "1.2",
|
|
11457
|
+
fontWeight: "600"
|
|
11458
|
+
},
|
|
11459
|
+
"heading/medium": {
|
|
11460
|
+
fontSize: "clamp(24px, 3vw, 32px)",
|
|
11461
|
+
lineHeight: "1.25",
|
|
11462
|
+
fontWeight: "600"
|
|
11463
|
+
},
|
|
11464
|
+
"heading/small": {
|
|
11465
|
+
fontSize: "20px",
|
|
11466
|
+
lineHeight: "1.3",
|
|
11467
|
+
fontWeight: "600"
|
|
11468
|
+
},
|
|
11469
|
+
"body/normal": {
|
|
11470
|
+
fontSize: "16px",
|
|
11471
|
+
lineHeight: "1.6",
|
|
11472
|
+
fontWeight: "400"
|
|
11473
|
+
},
|
|
11474
|
+
"body/small": {
|
|
11475
|
+
fontSize: "14px",
|
|
11476
|
+
lineHeight: "1.5",
|
|
11477
|
+
fontWeight: "400"
|
|
11478
|
+
},
|
|
11479
|
+
caption: {
|
|
11480
|
+
fontSize: "12px",
|
|
11481
|
+
lineHeight: "1.4",
|
|
11482
|
+
fontWeight: "500"
|
|
11381
11483
|
}
|
|
11382
|
-
}
|
|
11383
|
-
|
|
11484
|
+
},
|
|
11485
|
+
spacing: {
|
|
11486
|
+
none: "0px",
|
|
11487
|
+
"3xs": "4px",
|
|
11488
|
+
"2xs": "8px",
|
|
11489
|
+
xs: "12px",
|
|
11490
|
+
sm: "16px",
|
|
11491
|
+
md: "24px",
|
|
11492
|
+
lg: "32px",
|
|
11493
|
+
xl: "40px",
|
|
11494
|
+
"2xl": "56px",
|
|
11495
|
+
"3xl": "72px"
|
|
11496
|
+
},
|
|
11497
|
+
radius: {
|
|
11498
|
+
none: "0px",
|
|
11499
|
+
xs: "2px",
|
|
11500
|
+
sm: "4px",
|
|
11501
|
+
md: "8px",
|
|
11502
|
+
lg: "12px",
|
|
11503
|
+
pill: "999px",
|
|
11504
|
+
full: "9999px"
|
|
11505
|
+
},
|
|
11506
|
+
shadow: {
|
|
11507
|
+
none: "none",
|
|
11508
|
+
soft: "0px 2px 8px rgba(15, 23, 42, 0.08)",
|
|
11509
|
+
medium: "0px 6px 18px rgba(15, 23, 42, 0.12)",
|
|
11510
|
+
strong: "0px 12px 36px rgba(15, 23, 42, 0.16)"
|
|
11511
|
+
},
|
|
11512
|
+
palette: {
|
|
11513
|
+
surface: "#ffffff",
|
|
11514
|
+
"neutral-50": "#f9fafb",
|
|
11515
|
+
"neutral-900": "#111827",
|
|
11516
|
+
primary: "#2563eb",
|
|
11517
|
+
"primary-50": "#eff6ff",
|
|
11518
|
+
"primary-500": "#2563eb",
|
|
11519
|
+
"primary-900": "#1d4ed8",
|
|
11520
|
+
secondary: "#9333ea",
|
|
11521
|
+
"secondary-50": "#f3e8ff",
|
|
11522
|
+
"secondary-500": "#9333ea",
|
|
11523
|
+
"secondary-900": "#4c1d95",
|
|
11524
|
+
accent: "#f97316",
|
|
11525
|
+
"accent-50": "#fff7ed",
|
|
11526
|
+
"accent-500": "#f97316",
|
|
11527
|
+
"accent-900": "#7c2d12"
|
|
11528
|
+
}
|
|
11529
|
+
};
|
|
11384
11530
|
//#endregion
|
|
11385
11531
|
//#region ../theme-core/src/palette/utils/opaqueSurfaceColor.ts
|
|
11386
11532
|
/** Resolve an opaque colour, compositing alpha against an explicit underlay. */
|
|
@@ -11665,6 +11811,59 @@ function mergeStyles(...styles) {
|
|
|
11665
11811
|
}
|
|
11666
11812
|
return Object.keys(merged).length ? merged : void 0;
|
|
11667
11813
|
}
|
|
11814
|
+
shadeBackgroundEffect({
|
|
11815
|
+
id: "darken-background",
|
|
11816
|
+
name: "Darken on Hover",
|
|
11817
|
+
description: "Darkens the background color on hover",
|
|
11818
|
+
label: "Darken Amount (shade step)",
|
|
11819
|
+
shadeDirection: 1
|
|
11820
|
+
});
|
|
11821
|
+
shadeBackgroundEffect({
|
|
11822
|
+
id: "lighten-background",
|
|
11823
|
+
name: "Lighten on Hover",
|
|
11824
|
+
description: "Lightens the background color on hover",
|
|
11825
|
+
label: "Lighten Amount (shade step)",
|
|
11826
|
+
shadeDirection: -1
|
|
11827
|
+
});
|
|
11828
|
+
function shadeBackgroundEffect(config) {
|
|
11829
|
+
return {
|
|
11830
|
+
id: config.id,
|
|
11831
|
+
name: config.name,
|
|
11832
|
+
description: config.description,
|
|
11833
|
+
category: "background",
|
|
11834
|
+
pseudoElement: "none",
|
|
11835
|
+
applicableTo: ["button"],
|
|
11836
|
+
customizableOption: {
|
|
11837
|
+
name: "amount",
|
|
11838
|
+
type: "select",
|
|
11839
|
+
label: config.label,
|
|
11840
|
+
default: 100,
|
|
11841
|
+
options: [
|
|
11842
|
+
0,
|
|
11843
|
+
100,
|
|
11844
|
+
200,
|
|
11845
|
+
300,
|
|
11846
|
+
400,
|
|
11847
|
+
500,
|
|
11848
|
+
600,
|
|
11849
|
+
700,
|
|
11850
|
+
800,
|
|
11851
|
+
900
|
|
11852
|
+
]
|
|
11853
|
+
},
|
|
11854
|
+
isApplicable: (buttonConfig) => buttonConfig.background.type === "solid",
|
|
11855
|
+
generateCSS: ({ themeId, variantId, options, tokens, buttonConfig }) => {
|
|
11856
|
+
if (buttonConfig.background.type !== "solid") return "";
|
|
11857
|
+
const amount = (options.amount || 100) * config.shadeDirection;
|
|
11858
|
+
const baseToken = buttonConfig.background.colorToken ?? "primary-500";
|
|
11859
|
+
return `
|
|
11860
|
+
:where([data-theme-scope="${themeId}"]) .${variantId}:hover {
|
|
11861
|
+
background-color: ${tokens.getColor(tokens.adjustShade(baseToken, amount))};
|
|
11862
|
+
}
|
|
11863
|
+
`;
|
|
11864
|
+
}
|
|
11865
|
+
};
|
|
11866
|
+
}
|
|
11668
11867
|
//#endregion
|
|
11669
11868
|
//#region ../theme-core/src/utils/tokenOrColor.ts
|
|
11670
11869
|
/**
|
|
@@ -15087,8 +15286,14 @@ const headerInteractionPillPaletteValues = [
|
|
|
15087
15286
|
"accent"
|
|
15088
15287
|
];
|
|
15089
15288
|
/**
|
|
15090
|
-
* "No pill":
|
|
15091
|
-
*
|
|
15289
|
+
* "No pill": a colour change on hover rather than a filled background.
|
|
15290
|
+
*
|
|
15291
|
+
* The palette step writes nothing (#1318 Phase 4c decision 2), but on a
|
|
15292
|
+
* foreground-adaptive style that is not the end of the story: the hover colour
|
|
15293
|
+
* is derived from the resolved opening foreground at render time, paired with
|
|
15294
|
+
* the resting colour, so `quiet` resolves to a definite colour rather than to
|
|
15295
|
+
* whatever brand token the recipe happened to name. See
|
|
15296
|
+
* `applyOpeningForeground`.
|
|
15092
15297
|
*
|
|
15093
15298
|
* It exists because "a colour change on hover, no filled background" was not
|
|
15094
15299
|
* expressible in the vocabulary, and it is what
|
|
@@ -19547,108 +19752,6 @@ function assertUniqueLayoutProfileKeys(profiles) {
|
|
|
19547
19752
|
if (duplicates.length > 0) throw new Error(`Duplicate block layout design profiles: ${duplicates.join(", ")}`);
|
|
19548
19753
|
}
|
|
19549
19754
|
//#endregion
|
|
19550
|
-
//#region ../theme-core/src/tokens/tokens.ts
|
|
19551
|
-
const defaultThemeTokens = {
|
|
19552
|
-
color: {
|
|
19553
|
-
"background/base": "#ffffff",
|
|
19554
|
-
"background/elevated": "#f5f5f5",
|
|
19555
|
-
"surface/base": "#ffffff",
|
|
19556
|
-
"surface/subtle": "#f9f9fb",
|
|
19557
|
-
"surface/inverted": "#111111",
|
|
19558
|
-
"content/primary": "#111111",
|
|
19559
|
-
"content/secondary": "#3f3f46",
|
|
19560
|
-
"accent/primary": "#2563eb",
|
|
19561
|
-
"accent/secondary": "#1d4ed8",
|
|
19562
|
-
"border/base": "#e5e7eb"
|
|
19563
|
-
},
|
|
19564
|
-
typography: {
|
|
19565
|
-
"display/hero": {
|
|
19566
|
-
fontSize: "clamp(48px, 8vw, 96px)",
|
|
19567
|
-
lineHeight: "1.05",
|
|
19568
|
-
fontWeight: "700"
|
|
19569
|
-
},
|
|
19570
|
-
"display/section": {
|
|
19571
|
-
fontSize: "clamp(40px, 6vw, 72px)",
|
|
19572
|
-
lineHeight: "1.1",
|
|
19573
|
-
fontWeight: "700"
|
|
19574
|
-
},
|
|
19575
|
-
"heading/large": {
|
|
19576
|
-
fontSize: "clamp(32px, 4vw, 48px)",
|
|
19577
|
-
lineHeight: "1.2",
|
|
19578
|
-
fontWeight: "600"
|
|
19579
|
-
},
|
|
19580
|
-
"heading/medium": {
|
|
19581
|
-
fontSize: "clamp(24px, 3vw, 32px)",
|
|
19582
|
-
lineHeight: "1.25",
|
|
19583
|
-
fontWeight: "600"
|
|
19584
|
-
},
|
|
19585
|
-
"heading/small": {
|
|
19586
|
-
fontSize: "20px",
|
|
19587
|
-
lineHeight: "1.3",
|
|
19588
|
-
fontWeight: "600"
|
|
19589
|
-
},
|
|
19590
|
-
"body/normal": {
|
|
19591
|
-
fontSize: "16px",
|
|
19592
|
-
lineHeight: "1.6",
|
|
19593
|
-
fontWeight: "400"
|
|
19594
|
-
},
|
|
19595
|
-
"body/small": {
|
|
19596
|
-
fontSize: "14px",
|
|
19597
|
-
lineHeight: "1.5",
|
|
19598
|
-
fontWeight: "400"
|
|
19599
|
-
},
|
|
19600
|
-
caption: {
|
|
19601
|
-
fontSize: "12px",
|
|
19602
|
-
lineHeight: "1.4",
|
|
19603
|
-
fontWeight: "500"
|
|
19604
|
-
}
|
|
19605
|
-
},
|
|
19606
|
-
spacing: {
|
|
19607
|
-
none: "0px",
|
|
19608
|
-
"3xs": "4px",
|
|
19609
|
-
"2xs": "8px",
|
|
19610
|
-
xs: "12px",
|
|
19611
|
-
sm: "16px",
|
|
19612
|
-
md: "24px",
|
|
19613
|
-
lg: "32px",
|
|
19614
|
-
xl: "40px",
|
|
19615
|
-
"2xl": "56px",
|
|
19616
|
-
"3xl": "72px"
|
|
19617
|
-
},
|
|
19618
|
-
radius: {
|
|
19619
|
-
none: "0px",
|
|
19620
|
-
xs: "2px",
|
|
19621
|
-
sm: "4px",
|
|
19622
|
-
md: "8px",
|
|
19623
|
-
lg: "12px",
|
|
19624
|
-
pill: "999px",
|
|
19625
|
-
full: "9999px"
|
|
19626
|
-
},
|
|
19627
|
-
shadow: {
|
|
19628
|
-
none: "none",
|
|
19629
|
-
soft: "0px 2px 8px rgba(15, 23, 42, 0.08)",
|
|
19630
|
-
medium: "0px 6px 18px rgba(15, 23, 42, 0.12)",
|
|
19631
|
-
strong: "0px 12px 36px rgba(15, 23, 42, 0.16)"
|
|
19632
|
-
},
|
|
19633
|
-
palette: {
|
|
19634
|
-
surface: "#ffffff",
|
|
19635
|
-
"neutral-50": "#f9fafb",
|
|
19636
|
-
"neutral-900": "#111827",
|
|
19637
|
-
primary: "#2563eb",
|
|
19638
|
-
"primary-50": "#eff6ff",
|
|
19639
|
-
"primary-500": "#2563eb",
|
|
19640
|
-
"primary-900": "#1d4ed8",
|
|
19641
|
-
secondary: "#9333ea",
|
|
19642
|
-
"secondary-50": "#f3e8ff",
|
|
19643
|
-
"secondary-500": "#9333ea",
|
|
19644
|
-
"secondary-900": "#4c1d95",
|
|
19645
|
-
accent: "#f97316",
|
|
19646
|
-
"accent-50": "#fff7ed",
|
|
19647
|
-
"accent-500": "#f97316",
|
|
19648
|
-
"accent-900": "#7c2d12"
|
|
19649
|
-
}
|
|
19650
|
-
};
|
|
19651
|
-
//#endregion
|
|
19652
19755
|
//#region ../theme-core/src/site-styles/backgroundAppearance.ts
|
|
19653
19756
|
const backgroundAppearanceQuickColorTokenNames = [
|
|
19654
19757
|
"background",
|
|
@@ -35583,6 +35686,28 @@ const bookingRequirementConsentFieldSchema = z.object({
|
|
|
35583
35686
|
z.union([blockBookingConsentSchema, bookingRequirementConsentFieldSchema]);
|
|
35584
35687
|
//#endregion
|
|
35585
35688
|
//#region ../blocks/src/system/blocks/events/shared/schemas.ts
|
|
35689
|
+
const publicEventLoaderQuerySchemaShape = {
|
|
35690
|
+
limit: z.string().optional(),
|
|
35691
|
+
from: z.string().optional(),
|
|
35692
|
+
to: z.string().optional(),
|
|
35693
|
+
afterStartsAt: z.string().optional(),
|
|
35694
|
+
afterId: z.string().optional(),
|
|
35695
|
+
categoryIds: z.string().optional(),
|
|
35696
|
+
venueId: z.string().optional(),
|
|
35697
|
+
staffMemberId: z.string().optional(),
|
|
35698
|
+
eventSurface: z.string().optional(),
|
|
35699
|
+
eventPresets: z.string().optional(),
|
|
35700
|
+
scheduleScope: z.string().optional(),
|
|
35701
|
+
seriesId: z.string().optional(),
|
|
35702
|
+
seriesIds: z.string().optional(),
|
|
35703
|
+
runSeriesId: z.string().optional(),
|
|
35704
|
+
seriesSlug: z.string().optional(),
|
|
35705
|
+
includeOccurrenceId: z.string().optional(),
|
|
35706
|
+
readIntent: z.string().optional(),
|
|
35707
|
+
detailLevel: z.string().optional(),
|
|
35708
|
+
readProfile: z.string().optional()
|
|
35709
|
+
};
|
|
35710
|
+
z.object(publicEventLoaderQuerySchemaShape);
|
|
35586
35711
|
const eventPresetSchema = z.enum([
|
|
35587
35712
|
"event",
|
|
35588
35713
|
"class",
|
|
@@ -36385,6 +36510,44 @@ function toWholeSeriesRegistrationEvents(events) {
|
|
|
36385
36510
|
return groupPublicEventsByRun(events).map(toWholeSeriesRegistrationEvent).filter((event) => event !== null);
|
|
36386
36511
|
}
|
|
36387
36512
|
//#endregion
|
|
36513
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/eventSourceRecovery.ts
|
|
36514
|
+
const { limit: _rawLimit, eventSurface: _rawEventSurface, scheduleScope: _rawScheduleScope, detailLevel: _rawDetailLevel, ...stringEventQueryShape } = publicEventLoaderQuerySchemaShape;
|
|
36515
|
+
const eventRecoveryRequestSchema = z.object({
|
|
36516
|
+
...stringEventQueryShape,
|
|
36517
|
+
limit: z.coerce.number().int().positive().optional(),
|
|
36518
|
+
eventSurface: z.enum(eventSurfaceScopeValues).optional(),
|
|
36519
|
+
scheduleScope: z.enum(eventScheduleScopeValues).optional(),
|
|
36520
|
+
detailLevel: z.enum(["full", "listing"]).optional(),
|
|
36521
|
+
stage: z.enum(["preview", "published"]).optional()
|
|
36522
|
+
});
|
|
36523
|
+
function resolveEventRegistrationEventSource(input) {
|
|
36524
|
+
if (input.wholeSeriesRunEvents != null) return {
|
|
36525
|
+
kind: "loaded",
|
|
36526
|
+
events: input.wholeSeriesRunEvents
|
|
36527
|
+
};
|
|
36528
|
+
if (input.events != null) return {
|
|
36529
|
+
kind: "loaded",
|
|
36530
|
+
events: input.events
|
|
36531
|
+
};
|
|
36532
|
+
return {
|
|
36533
|
+
kind: "unresolved",
|
|
36534
|
+
request: parseEventLoaderRecoveryRequest(input.failures?.wholeSeriesRunEvents ?? input.failures?.events)
|
|
36535
|
+
};
|
|
36536
|
+
}
|
|
36537
|
+
const eventLoaderFailureSchema = z.object({
|
|
36538
|
+
endpoint: z.literal("listPublicEvents"),
|
|
36539
|
+
params: eventRecoveryRequestSchema.extend({ siteId: z.string().optional() })
|
|
36540
|
+
});
|
|
36541
|
+
function parseEventLoaderRecoveryRequest(value) {
|
|
36542
|
+
const parsed = eventLoaderFailureSchema.safeParse(value);
|
|
36543
|
+
if (!parsed.success) return null;
|
|
36544
|
+
const { siteId: _siteId, stage, ...params } = parsed.data.params;
|
|
36545
|
+
return {
|
|
36546
|
+
...params,
|
|
36547
|
+
stage: stage ?? "published"
|
|
36548
|
+
};
|
|
36549
|
+
}
|
|
36550
|
+
//#endregion
|
|
36388
36551
|
//#region ../blocks/src/system/runtime/nodes/event-registration.interactive.ts
|
|
36389
36552
|
const EVENT_REGISTRATION_GENERIC_SHELL_STEP_LABELS = [
|
|
36390
36553
|
"Date",
|
|
@@ -36402,8 +36565,6 @@ const eventRegistrationPublicEventSchema = z.preprocess(normalizeEventRegistrati
|
|
|
36402
36565
|
const eventRegistrationHydrationSchemaShape = {
|
|
36403
36566
|
occurrenceContext: occurrenceContextSchema.optional(),
|
|
36404
36567
|
subject: eventRegistrationPageSurfaceSubjectSchema.nullable().optional(),
|
|
36405
|
-
events: z.array(eventRegistrationPublicEventSchema).nullable().optional(),
|
|
36406
|
-
wholeSeriesRunEvents: z.array(eventRegistrationPublicEventSchema).nullable().optional(),
|
|
36407
36568
|
maxTickets: z.string().optional(),
|
|
36408
36569
|
showVenue: z.boolean().optional(),
|
|
36409
36570
|
showCapacity: z.boolean().optional(),
|
|
@@ -36415,12 +36576,22 @@ const eventRegistrationHydrationSchemaShape = {
|
|
|
36415
36576
|
sitePasses: publicPassProductCollectionSchema.nullable().optional(),
|
|
36416
36577
|
siteMemberships: publicMembershipProductCollectionSchema.nullable().optional()
|
|
36417
36578
|
};
|
|
36579
|
+
const eventRegistrationEventSourceSchema = z.discriminatedUnion("kind", [z.object({
|
|
36580
|
+
kind: z.literal("loaded"),
|
|
36581
|
+
events: z.array(eventRegistrationPublicEventSchema)
|
|
36582
|
+
}), z.object({
|
|
36583
|
+
kind: z.literal("unresolved"),
|
|
36584
|
+
request: eventRecoveryRequestSchema.nullable()
|
|
36585
|
+
})]);
|
|
36418
36586
|
const eventRegistrationSourceSchema = z.object({
|
|
36419
36587
|
siteId: z.string().optional(),
|
|
36420
36588
|
apiBaseUrl: z.string().optional(),
|
|
36421
36589
|
portalToken: z.string().nullable().optional(),
|
|
36422
36590
|
previewToken: z.string().nullable().optional(),
|
|
36423
36591
|
...eventRegistrationHydrationSchemaShape,
|
|
36592
|
+
events: z.array(eventRegistrationPublicEventSchema).nullable().optional(),
|
|
36593
|
+
wholeSeriesRunEvents: z.array(eventRegistrationPublicEventSchema).nullable().optional(),
|
|
36594
|
+
eventLoaderFailures: z.record(z.string(), z.unknown()).nullable().optional(),
|
|
36424
36595
|
className: z.string().nullable().optional(),
|
|
36425
36596
|
buttonText: z.string().nullable().optional(),
|
|
36426
36597
|
maxTickets: z.string().nullable().optional(),
|
|
@@ -36441,7 +36612,10 @@ const eventRegistrationDisplaySchema = z.discriminatedUnion("state", [z.object({
|
|
|
36441
36612
|
titleText: z.string(),
|
|
36442
36613
|
bodyText: z.string()
|
|
36443
36614
|
})]);
|
|
36444
|
-
const eventRegistrationHydrationSchema = z.object(
|
|
36615
|
+
const eventRegistrationHydrationSchema = z.object({
|
|
36616
|
+
...eventRegistrationHydrationSchemaShape,
|
|
36617
|
+
eventSource: eventRegistrationEventSourceSchema
|
|
36618
|
+
});
|
|
36445
36619
|
const eventRegistrationRenderSchema = z.object({
|
|
36446
36620
|
display: eventRegistrationDisplaySchema,
|
|
36447
36621
|
hydration: eventRegistrationHydrationSchema
|
|
@@ -36500,16 +36674,12 @@ function buildEventRegistrationShellStepLabels(source, scopedSourceEvents) {
|
|
|
36500
36674
|
function toScopedEventRegistrationEvents(scopedSourceEvents) {
|
|
36501
36675
|
return [...toRegistrationEvents(scopedSourceEvents), ...toWholeSeriesRegistrationEvents(scopedSourceEvents)];
|
|
36502
36676
|
}
|
|
36503
|
-
function scopeEventRegistrationSourceEvents(source) {
|
|
36504
|
-
return resolveEventRegistrationScopedEvents(
|
|
36677
|
+
function scopeEventRegistrationSourceEvents(source, eventSource) {
|
|
36678
|
+
return resolveEventRegistrationScopedEvents(eventSource.kind === "loaded" ? eventSource.events : [], {
|
|
36505
36679
|
occurrenceContext: source.occurrenceContext,
|
|
36506
36680
|
subject: source.subject
|
|
36507
36681
|
});
|
|
36508
36682
|
}
|
|
36509
|
-
function resolveLoadedEventRegistrationSourceEvents(source, scopedSourceEvents) {
|
|
36510
|
-
if (source.events == null && source.wholeSeriesRunEvents == null) return null;
|
|
36511
|
-
return [...scopedSourceEvents];
|
|
36512
|
-
}
|
|
36513
36683
|
/**
|
|
36514
36684
|
* The one run this surface is registering for, when the scoped events describe
|
|
36515
36685
|
* exactly one. More than one run means the visitor still has to choose.
|
|
@@ -36549,14 +36719,21 @@ const eventRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
|
|
|
36549
36719
|
render: createZodCodec(eventRegistrationRenderSchema)
|
|
36550
36720
|
},
|
|
36551
36721
|
buildRender: (source) => {
|
|
36552
|
-
const
|
|
36553
|
-
|
|
36722
|
+
const eventSource = resolveEventRegistrationEventSource({
|
|
36723
|
+
events: source.events,
|
|
36724
|
+
wholeSeriesRunEvents: source.wholeSeriesRunEvents,
|
|
36725
|
+
failures: source.eventLoaderFailures
|
|
36726
|
+
});
|
|
36727
|
+
const scopedSourceEvents = scopeEventRegistrationSourceEvents(source, eventSource);
|
|
36554
36728
|
return {
|
|
36555
36729
|
display: buildEventRegistrationDisplayFromScopedEvents(source, scopedSourceEvents),
|
|
36556
36730
|
hydration: {
|
|
36557
36731
|
occurrenceContext: source.occurrenceContext ?? null,
|
|
36558
36732
|
subject: source.subject ?? null,
|
|
36559
|
-
|
|
36733
|
+
eventSource: eventSource.kind === "loaded" ? {
|
|
36734
|
+
...eventSource,
|
|
36735
|
+
events: [...scopedSourceEvents]
|
|
36736
|
+
} : eventSource,
|
|
36560
36737
|
maxTickets: source.maxTickets ?? void 0,
|
|
36561
36738
|
showVenue: source.showVenue,
|
|
36562
36739
|
showCapacity: source.showCapacity,
|
|
@@ -36732,6 +36909,7 @@ const eventRegistrationBlockDefinition = {
|
|
|
36732
36909
|
} },
|
|
36733
36910
|
events: { $bind: { from: "data.events" } },
|
|
36734
36911
|
wholeSeriesRunEvents: { $bind: { from: "data.wholeSeriesRunEvents" } },
|
|
36912
|
+
loaderFailures: { $bind: { from: "$root.loaderFailures" } },
|
|
36735
36913
|
sitePasses: { $bind: { from: "data.sitePasses" } },
|
|
36736
36914
|
siteMemberships: { $bind: { from: "data.siteMemberships" } },
|
|
36737
36915
|
stage: { $bind: {
|
|
@@ -43378,6 +43556,15 @@ const newsletterFieldSchema = z.object({
|
|
|
43378
43556
|
placeholder: z.string().optional()
|
|
43379
43557
|
});
|
|
43380
43558
|
const mailingListSignupBlockIdSchema = z.string().trim().min(1).transform(parseRequiredMailingListSignupBlockId);
|
|
43559
|
+
const mailingListContentVersionIdSchema = z.string().transform((value, ctx) => {
|
|
43560
|
+
const parsed = parseMailingListContentVersionId(value);
|
|
43561
|
+
if (parsed) return parsed;
|
|
43562
|
+
ctx.addIssue({
|
|
43563
|
+
code: z.ZodIssueCode.custom,
|
|
43564
|
+
message: "Invalid mailing-list content version ID"
|
|
43565
|
+
});
|
|
43566
|
+
return z.NEVER;
|
|
43567
|
+
});
|
|
43381
43568
|
const signedMailingListSourceTokenSchema = z.string().trim().min(1).transform(parseRequiredMailingListSignedSourceToken);
|
|
43382
43569
|
const newsletterSourceCommonSchema = z.object({
|
|
43383
43570
|
siteId: z.string().optional(),
|
|
@@ -43391,7 +43578,8 @@ const newsletterSourceCommonSchema = z.object({
|
|
|
43391
43578
|
const newsletterSourceSchema = z.discriminatedUnion("source", [
|
|
43392
43579
|
newsletterSourceCommonSchema.extend({
|
|
43393
43580
|
source: z.literal("block"),
|
|
43394
|
-
blockId: z.string().nullable().optional()
|
|
43581
|
+
blockId: z.string().nullable().optional(),
|
|
43582
|
+
contentVersionId: z.string().nullable().optional()
|
|
43395
43583
|
}),
|
|
43396
43584
|
newsletterSourceCommonSchema.extend({
|
|
43397
43585
|
source: z.literal("signed-footer"),
|
|
@@ -43407,6 +43595,7 @@ const newsletterDisplaySchema = z.object({
|
|
|
43407
43595
|
availability: z.enum(["ready", "unavailable"]),
|
|
43408
43596
|
className: z.string().nullable(),
|
|
43409
43597
|
buttonLabel: z.string(),
|
|
43598
|
+
successMessage: z.string(),
|
|
43410
43599
|
buttonVariant: newsletterButtonVariantSchema,
|
|
43411
43600
|
privacyNote: z.string().nullable(),
|
|
43412
43601
|
fields: z.array(newsletterFieldSchema),
|
|
@@ -43421,7 +43610,8 @@ const newsletterHydrationSchema = z.object({
|
|
|
43421
43610
|
tag: z.literal("block-source"),
|
|
43422
43611
|
sourceRef: z.object({
|
|
43423
43612
|
tag: z.literal("block_ref"),
|
|
43424
|
-
blockId: mailingListSignupBlockIdSchema
|
|
43613
|
+
blockId: mailingListSignupBlockIdSchema,
|
|
43614
|
+
contentVersionId: mailingListContentVersionIdSchema
|
|
43425
43615
|
}).nullable()
|
|
43426
43616
|
}),
|
|
43427
43617
|
z.object({
|
|
@@ -43460,6 +43650,7 @@ function buildNewsletterDisplay(source) {
|
|
|
43460
43650
|
fields: { preset: "emailOnly" },
|
|
43461
43651
|
includeOptionalPhone: false,
|
|
43462
43652
|
buttonLabel: "Subscribe",
|
|
43653
|
+
successMessage: DEFAULT_MAILING_LIST_SUCCESS_MESSAGE,
|
|
43463
43654
|
privacyNote: null
|
|
43464
43655
|
};
|
|
43465
43656
|
const targeting = source.targeting ?? { mode: "default" };
|
|
@@ -43469,6 +43660,7 @@ function buildNewsletterDisplay(source) {
|
|
|
43469
43660
|
availability: runtimeTargetingIsAvailable(context, targeting, choices) ? "ready" : "unavailable",
|
|
43470
43661
|
className: source.className ?? null,
|
|
43471
43662
|
buttonLabel: form.buttonLabel,
|
|
43663
|
+
successMessage: form.successMessage,
|
|
43472
43664
|
buttonVariant: source.buttonVariant ?? "primary",
|
|
43473
43665
|
privacyNote: form.privacyNote,
|
|
43474
43666
|
fields: getGlobalFormFields(form),
|
|
@@ -43499,7 +43691,7 @@ const newsletterFormBlockRuntime = defineProgressiveBlockRuntime({
|
|
|
43499
43691
|
function projectNewsletterFormHydrationTarget(source) {
|
|
43500
43692
|
switch (source.source) {
|
|
43501
43693
|
case "block": {
|
|
43502
|
-
const sourceRef = buildMailingListSignupBlockSourceRef(source.blockId);
|
|
43694
|
+
const sourceRef = buildMailingListSignupBlockSourceRef(source.blockId, source.contentVersionId);
|
|
43503
43695
|
if (sourceRef?.tag === "block_ref") return {
|
|
43504
43696
|
tag: "block-source",
|
|
43505
43697
|
sourceRef
|
|
@@ -46053,8 +46245,12 @@ function shouldSkipResolvedLoader(input) {
|
|
|
46053
46245
|
* ```
|
|
46054
46246
|
*/
|
|
46055
46247
|
async function prefetchBlockData$1(page, context, options) {
|
|
46248
|
+
return (await prefetchBlockDataWithFailures(page, context, options)).resolvedData;
|
|
46249
|
+
}
|
|
46250
|
+
async function prefetchBlockDataWithFailures(page, context, options) {
|
|
46056
46251
|
const { apiClient, isValidEndpoint, onError, getCustomBlockLoaders, getBlockDefinition: getBlockDefinition$1 = getBlockDefinition, resolveParamsBindings: resolveParamsBindings$1 = resolveParamsBindings } = options;
|
|
46057
46252
|
const results = {};
|
|
46253
|
+
const loaderFailures = {};
|
|
46058
46254
|
const tasks = [];
|
|
46059
46255
|
for (const block of page.blocks) {
|
|
46060
46256
|
const blockId = block.id;
|
|
@@ -46102,6 +46298,11 @@ async function prefetchBlockData$1(page, context, options) {
|
|
|
46102
46298
|
const blockResults = results[blockId] ?? (results[blockId] = {});
|
|
46103
46299
|
blockResults[key] = data;
|
|
46104
46300
|
} catch (error) {
|
|
46301
|
+
const blockFailures = loaderFailures[blockId] ?? (loaderFailures[blockId] = {});
|
|
46302
|
+
blockFailures[key] = {
|
|
46303
|
+
endpoint,
|
|
46304
|
+
params
|
|
46305
|
+
};
|
|
46105
46306
|
if (onError) onError(error, {
|
|
46106
46307
|
block: block.kind,
|
|
46107
46308
|
loader: key
|
|
@@ -46111,7 +46312,10 @@ async function prefetchBlockData$1(page, context, options) {
|
|
|
46111
46312
|
}
|
|
46112
46313
|
}
|
|
46113
46314
|
if (tasks.length > 0) await Promise.all(tasks);
|
|
46114
|
-
return
|
|
46315
|
+
return {
|
|
46316
|
+
resolvedData: results,
|
|
46317
|
+
loaderFailures
|
|
46318
|
+
};
|
|
46115
46319
|
}
|
|
46116
46320
|
//#endregion
|
|
46117
46321
|
//#region ../blocks/src/system/data/loaderEndpoints.ts
|
|
@@ -46405,7 +46609,12 @@ const API_ENDPOINTS = Object.freeze({
|
|
|
46405
46609
|
path: "/public/sites/{siteId}/sitemap",
|
|
46406
46610
|
method: "GET",
|
|
46407
46611
|
revalidate: 60,
|
|
46408
|
-
tags: [
|
|
46612
|
+
tags: [
|
|
46613
|
+
"riverbank:site:{siteId}:routable-content",
|
|
46614
|
+
"riverbank:site:{siteId}:settings",
|
|
46615
|
+
"riverbank:site:{siteId}:public-events",
|
|
46616
|
+
"riverbank:site:{siteId}:public-booking-services"
|
|
46617
|
+
],
|
|
46409
46618
|
auth: "public",
|
|
46410
46619
|
responseKind: "json"
|
|
46411
46620
|
}
|
|
@@ -48893,7 +49102,17 @@ const riverbankSiteConfigInputSchema = z.object({
|
|
|
48893
49102
|
z.object({
|
|
48894
49103
|
config: riverbankSiteConfigInputSchema,
|
|
48895
49104
|
forceContentTypes: z.boolean().optional(),
|
|
48896
|
-
mode: z.enum(["apply", "preview"]).optional()
|
|
49105
|
+
mode: z.enum(["apply", "preview"]).optional(),
|
|
49106
|
+
expectedMailingListProviderScope: z.unknown().transform((value, ctx) => {
|
|
49107
|
+
if (value === void 0) return void 0;
|
|
49108
|
+
const parsed = parseMailingListProviderScope(value);
|
|
49109
|
+
if (parsed.ok) return parsed.value;
|
|
49110
|
+
ctx.addIssue({
|
|
49111
|
+
code: "custom",
|
|
49112
|
+
message: "Invalid mailing-list provider scope"
|
|
49113
|
+
});
|
|
49114
|
+
return z.NEVER;
|
|
49115
|
+
}).optional()
|
|
48897
49116
|
}).strict();
|
|
48898
49117
|
//#endregion
|
|
48899
49118
|
//#region ../api/src/sdkThemeWire.ts
|
|
@@ -50073,9 +50292,11 @@ function convertPageResponseBlock(block) {
|
|
|
50073
50292
|
if (typeof block.id !== "string" && block.id !== null) throw new Error(`Invalid block id in page: expected string or null, got ${typeof block.id}`);
|
|
50074
50293
|
if (typeof block.kind !== "string") throw new Error(`Invalid block kind in page: expected string, got ${typeof block.kind}`);
|
|
50075
50294
|
if (typeof block.purpose !== "string") throw new Error(`Invalid block purpose in page: expected string, got ${typeof block.purpose}`);
|
|
50295
|
+
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}`);
|
|
50076
50296
|
const admission = readInvalidBlockAdmission(block.admission);
|
|
50077
50297
|
return {
|
|
50078
50298
|
id: block.id,
|
|
50299
|
+
...block.contentVersionId !== void 0 ? { contentVersionId: block.contentVersionId } : {},
|
|
50079
50300
|
kind: block.kind,
|
|
50080
50301
|
purpose: block.purpose,
|
|
50081
50302
|
content: sanitizeSdkRuntimeBlockContent(block.kind, readContentRecord(block.content) ?? {}),
|
|
@@ -50108,6 +50329,7 @@ function projectRenderablePageOutline(page) {
|
|
|
50108
50329
|
...page,
|
|
50109
50330
|
blocks: page.blocks.flatMap((block) => block.admission.kind === "renderable" ? [{
|
|
50110
50331
|
id: block.id,
|
|
50332
|
+
...block.contentVersionId !== void 0 ? { contentVersionId: block.contentVersionId } : {},
|
|
50111
50333
|
kind: block.kind,
|
|
50112
50334
|
purpose: block.purpose,
|
|
50113
50335
|
content: block.admission.content,
|
|
@@ -50118,6 +50340,7 @@ function projectRenderablePageOutline(page) {
|
|
|
50118
50340
|
function admitSdkRuntimePageBlock(block, customBlocks) {
|
|
50119
50341
|
const base = {
|
|
50120
50342
|
id: block.id,
|
|
50343
|
+
...block.contentVersionId !== void 0 ? { contentVersionId: block.contentVersionId } : {},
|
|
50121
50344
|
kind: block.kind,
|
|
50122
50345
|
purpose: block.purpose,
|
|
50123
50346
|
...block.bindings ? { bindings: block.bindings } : {}
|
|
@@ -50754,6 +50977,7 @@ function readEntrySlotKey(block) {
|
|
|
50754
50977
|
function admitEntrySlotBlock(block, customBlocks) {
|
|
50755
50978
|
const base = {
|
|
50756
50979
|
id: block.id ?? block.blockId ?? null,
|
|
50980
|
+
contentVersionId: block.contentVersionId,
|
|
50757
50981
|
kind: block.kind,
|
|
50758
50982
|
purpose: block.purpose,
|
|
50759
50983
|
...isRecord(block.bindings) ? { bindings: block.bindings } : {}
|