@riverbankcms/sdk 0.130.2 → 0.132.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 +3 -3
- package/dist/{PreviewEditorSidebar-BY-1QdE2.mjs → PreviewEditorSidebar-DKQ5eFK9.mjs} +351 -95
- package/dist/{PreviewEditorUI-BS34jI9_.mjs → PreviewEditorUI-CNTcOjCC.mjs} +3 -3
- package/dist/{PreviewQueryProvider-BD0kOjtI.mjs → PreviewQueryProvider-D51gQaG3.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-B1pWnhu-.mjs → SdkPreviewModeRuntime-DJu3qu33.mjs} +48 -9
- package/dist/{SiteChromeCustomizeContext-BhUG_72i.mjs → SiteChromeCustomizeContext-2TzT3vbj.mjs} +6417 -4184
- package/dist/_dts/ai/src/contracts/proposals.d.ts +723 -151
- package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +151 -64
- package/dist/_dts/api/src/bookingConfig.d.ts +13 -9
- package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +8 -19
- package/dist/_dts/api/src/bookingManagementEventEndpointTypes.d.ts +31 -2
- package/dist/_dts/api/src/bookingVerticals.d.ts +1 -140
- package/dist/_dts/api/src/commercePortalEndpoints.d.ts +45 -12
- package/dist/_dts/api/src/contentRuntime.d.ts +2 -1
- package/dist/_dts/api/src/courses.d.ts +1 -19
- package/dist/_dts/api/src/endpoints.d.ts +466 -346
- package/dist/_dts/api/src/event-destination-policy.d.ts +1 -1
- package/dist/_dts/api/src/eventManagementContracts.d.ts +91 -1
- package/dist/_dts/api/src/eventManagementEndpointDefinitions.d.ts +32 -0
- package/dist/_dts/api/src/giftingDashboard.d.ts +117 -0
- package/dist/_dts/api/src/giftingEndpointDefinitions.d.ts +124 -0
- package/dist/_dts/api/src/index.d.ts +4 -4
- 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/media.d.ts +1 -0
- package/dist/_dts/api/src/navigation/dashboardBookingsNav.d.ts +3 -4
- package/dist/_dts/api/src/publicEventEndpointDefinitions.d.ts +11 -0
- package/dist/_dts/api/src/publicExperience/eventEndpoints.d.ts +25 -12
- package/dist/_dts/api/src/publicExperience/sharedTypes.d.ts +2 -0
- package/dist/_dts/api/src/publicExperience/wholeSeriesEndpoints.d.ts +1 -0
- package/dist/_dts/api/src/sdk-event-upsert.d.ts +2 -2
- package/dist/_dts/api/src/sdkBookingVerticalContracts.d.ts +29 -0
- package/dist/_dts/api/src/sdkContracts.d.ts +9 -32
- package/dist/_dts/api/src/sdkEndpointDefinitions.d.ts +23 -0
- package/dist/_dts/api/src/sdkSettingsContracts.d.ts +25 -0
- package/dist/_dts/api/src/sdkThemeCatalogContracts.d.ts +20 -0
- package/dist/_dts/api/src/sdkThemeWire.d.ts +16 -6
- package/dist/_dts/api/src/siteOnboarding.d.ts +3 -3
- package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +4 -10
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +0 -3
- package/dist/_dts/api/src/types.d.ts +1 -2
- package/dist/_dts/blocks/src/PageRenderer.d.ts +2 -13
- package/dist/_dts/blocks/src/contracts/non-block-islands.d.ts +9 -0
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +26 -44
- package/dist/_dts/blocks/src/index.d.ts +1 -1
- package/dist/_dts/blocks/src/subroutes/fold.d.ts +2 -1
- package/dist/_dts/blocks/src/system/blocks/courses/shared/index.d.ts +0 -3
- package/dist/_dts/blocks/src/system/blocks/courses/shared/pricing.d.ts +2 -50
- package/dist/_dts/blocks/src/system/blocks/courses/shared/schemas.d.ts +1 -929
- package/dist/_dts/blocks/src/system/blocks/courses/shared/types.d.ts +1 -97
- package/dist/_dts/blocks/src/system/blocks/event-details.d.ts +39 -6
- package/dist/_dts/blocks/src/system/blocks/events/event-calendar.d.ts +2 -1
- package/dist/_dts/blocks/src/system/blocks/events/event-listing.d.ts +3 -3
- package/dist/_dts/blocks/src/system/blocks/events/event-spotlight.d.ts +2 -3
- package/dist/_dts/blocks/src/system/blocks/events/shared/filtering.d.ts +2 -2
- package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +6 -6
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +2 -9
- package/dist/_dts/blocks/src/system/blocks/events/whole-series/index.d.ts +3 -0
- package/dist/_dts/blocks/src/system/blocks/events/whole-series/pricing.d.ts +50 -0
- package/dist/_dts/blocks/src/system/blocks/events/whole-series/schemas.d.ts +135 -0
- package/dist/_dts/blocks/src/system/blocks/events/whole-series/types.d.ts +81 -0
- package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +9 -9
- package/dist/_dts/blocks/src/system/blocks/offerings-preview/model.d.ts +1 -1
- package/dist/_dts/blocks/src/system/fields/boxStyles.d.ts +7 -8
- package/dist/_dts/blocks/src/system/node/validation-constants.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/blockComposition.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +45 -72
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +21 -36
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessWholeSeriesRegistrationFlow.d.ts +6 -6
- package/dist/_dts/blocks/src/system/runtime/nodes/course-page-surface-scope.d.ts +2 -5
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration.client.d.ts +4 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration.interactive.d.ts +19 -7
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details/logic.d.ts +25 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details/presentation.d.ts +75 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details/view.d.ts +4 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details.client.d.ts +5 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details.server.d.ts +5 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/PaymentSelectionStep.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/RegistrationClosedState.d.ts +5 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/SiteCreditPreviewPanel.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/eventPaymentOptions.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/hooks.d.ts +17 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationSurface.d.ts +3 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/siteCreditPreview.d.ts +51 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +3 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/BookingModeStep.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/CheckIcon.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/ErrorStep.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/MembershipHero.d.ts +3 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/PaymentFailedStep.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/StepIndicator.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/VerifyingTimeoutStep.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/WholeSeriesRegistrationActiveSteps.d.ts +9 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration/CourseRegistrationErrorBoundary.d.ts → event-registration/whole-series/WholeSeriesRegistrationErrorBoundary.d.ts} +5 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/WholeSeriesRegistrationTerminalContent.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/WholeSeriesRegistrationWizard.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/components.d.ts +45 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/index.d.ts +4 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/presentation.d.ts +7 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/pricing.d.ts +14 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/types.d.ts +18 -16
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration/useCourseEligibility.d.ts → event-registration/whole-series/useWholeSeriesEligibility.d.ts} +6 -6
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/useWholeSeriesPaymentVerification.d.ts +10 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/useWholeSeriesRegistrationActions.d.ts +35 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration/useCourseRegistrationPortal.d.ts → event-registration/whole-series/useWholeSeriesRegistrationPortal.d.ts} +2 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/useWholeSeriesRegistrationSelection.d.ts +35 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/useWholeSeriesRegistrationWizard.d.ts +185 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration/useCourseWaitlistSelection.d.ts → event-registration/whole-series/useWholeSeriesWaitlistSelection.d.ts} +5 -5
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/utils.d.ts +4 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/whole-series-registration.headless.contract.d.ts +5 -7
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/whole-series-registration.headless.planning.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/wholeSeriesPageSurfaceScope.d.ts +17 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration/courseRegistrationViewState.d.ts → event-registration/whole-series/wholeSeriesRegistrationViewState.d.ts} +7 -7
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/wizardSteps.d.ts +4 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +24 -54
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.client.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.interactive.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventListing.interactive.d.ts +12 -11
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventListing.server.d.ts +3 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventSpotlight.d.ts +3 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventCard.d.ts +3 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventDetailModal.d.ts +4 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventModalCloseButton.d.ts +7 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventModals.d.ts +4 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/WeekBoardView.d.ts +14 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +19 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/shared/MagicLinkForm.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/shared/components/DiscountCodeDisclosure.d.ts +12 -12
- package/dist/_dts/blocks/src/system/runtime/shared/useWaitlistClaim.d.ts +1 -0
- package/dist/_dts/blocks/src/system/transforms/registry/_utils/boxStyleClassNames.d.ts +30 -11
- package/dist/_dts/blocks/src/system/transforms/registry/boxStyles.d.ts +15 -4
- package/dist/_dts/blocks/src/system/transforms/registry/index.d.ts +1 -0
- package/dist/_dts/blocks/src/system/transforms/typed.d.ts +1 -4
- package/dist/_dts/commerce/src/purchase/bookingInstalmentSchedule.d.ts +13 -0
- package/dist/_dts/commerce/src/purchase/cancellationPolicy.d.ts +7 -0
- package/dist/_dts/commerce/src/purchase/canonicalRefundPlanner.d.ts +48 -0
- package/dist/_dts/commerce/src/purchase/checkoutCollectionPlan.d.ts +39 -0
- package/dist/_dts/commerce/src/purchase/checkoutCommitPlan.d.ts +40 -0
- package/dist/_dts/commerce/src/purchase/checkoutDiscountContextPlanning.d.ts +80 -0
- package/dist/_dts/commerce/src/purchase/checkoutErrorCodes.d.ts +1 -0
- package/dist/_dts/commerce/src/purchase/checkoutOrderItemProjection.d.ts +22 -0
- package/dist/_dts/commerce/src/purchase/checkoutPaymentFlow.d.ts +50 -0
- package/dist/_dts/commerce/src/purchase/checkoutPaymentPlanPlanning.d.ts +30 -0
- package/dist/_dts/commerce/src/purchase/checkoutPaymentTermPlanning.d.ts +10 -0
- package/dist/_dts/commerce/src/purchase/checkoutPaymentTerms.d.ts +53 -0
- package/dist/_dts/commerce/src/purchase/checkoutQuantity.d.ts +8 -0
- package/dist/_dts/commerce/src/purchase/checkoutSessionMetadata.d.ts +76 -0
- package/dist/_dts/commerce/src/purchase/checkoutSettlement.d.ts +46 -0
- package/dist/_dts/commerce/src/purchase/checkoutStripeFinalizationPlanning.d.ts +12 -0
- package/dist/_dts/commerce/src/purchase/checkoutStripeSessionPlanning.d.ts +125 -0
- package/dist/_dts/commerce/src/purchase/checkoutValidatedItemPlanning.d.ts +55 -0
- package/dist/_dts/commerce/src/purchase/confirmationEmailPayment.d.ts +91 -0
- package/dist/_dts/commerce/src/purchase/discountApplication.d.ts +74 -0
- package/dist/_dts/commerce/src/purchase/index.d.ts +55 -0
- package/dist/_dts/commerce/src/purchase/oneTimeCheckoutPlanning.d.ts +86 -0
- package/dist/_dts/commerce/src/purchase/order-number.d.ts +33 -0
- package/dist/_dts/commerce/src/purchase/orderCancellationPlan.d.ts +19 -0
- package/dist/_dts/commerce/src/purchase/orderCompletionEmailPlan.d.ts +71 -0
- package/dist/_dts/commerce/src/purchase/orderConfirmationPlanning.d.ts +120 -0
- package/dist/_dts/commerce/src/purchase/orderFulfillmentPlan.d.ts +81 -0
- package/dist/_dts/commerce/src/purchase/orderFulfillmentResult.d.ts +8 -0
- package/dist/_dts/commerce/src/purchase/orderHistoryLedgerFilters.d.ts +1 -0
- package/dist/_dts/commerce/src/purchase/orderHistorySource.d.ts +11 -0
- package/dist/_dts/commerce/src/purchase/orderInstalmentAdminSettlement.d.ts +43 -0
- package/dist/_dts/commerce/src/purchase/orderInstalmentClosure.d.ts +29 -0
- package/dist/_dts/commerce/src/purchase/orderInstalmentLifecycle.d.ts +44 -0
- package/dist/_dts/commerce/src/purchase/orderInstalmentPayoff.d.ts +24 -0
- package/dist/_dts/commerce/src/purchase/orderInstalmentPlan.d.ts +40 -0
- package/dist/_dts/commerce/src/purchase/orderItemMetadata.d.ts +151 -0
- package/dist/_dts/commerce/src/purchase/orderItemSupport.d.ts +14 -0
- package/dist/_dts/commerce/src/purchase/orderListFilters.d.ts +3 -0
- package/dist/_dts/commerce/src/purchase/orderPaymentLinkPlanning.d.ts +60 -0
- package/dist/_dts/commerce/src/purchase/orderPaymentReceipt.d.ts +184 -0
- package/dist/_dts/commerce/src/purchase/orderPaymentState.d.ts +135 -0
- package/dist/_dts/commerce/src/purchase/orderPlanningTypes.d.ts +102 -0
- package/dist/_dts/commerce/src/purchase/orderRefundPlanning.d.ts +50 -0
- package/dist/_dts/commerce/src/purchase/orderRefundPolicy.d.ts +36 -0
- package/dist/_dts/commerce/src/purchase/orderTotals.d.ts +23 -0
- package/dist/_dts/commerce/src/purchase/orderTypes.d.ts +39 -0
- package/dist/_dts/commerce/src/purchase/pendingCheckoutSessionClaim.d.ts +1 -0
- package/dist/_dts/commerce/src/purchase/persistedCheckoutLines.d.ts +27 -0
- package/dist/_dts/commerce/src/purchase/protectedDepositRefundPolicy.d.ts +86 -0
- package/dist/_dts/commerce/src/purchase/refundPolicy.d.ts +8 -0
- package/dist/_dts/commerce/src/purchase/refundRailSplit.d.ts +40 -0
- package/dist/_dts/commerce/src/purchase/result.d.ts +2 -0
- package/dist/_dts/commerce/src/purchase/settlement.d.ts +97 -0
- package/dist/_dts/commerce/src/purchase/shopRefundPlanning.d.ts +43 -0
- package/dist/_dts/commerce/src/purchase/stateTransitions.d.ts +31 -0
- package/dist/_dts/commerce/src/purchase/stripeMinimumCharge.d.ts +10 -0
- package/dist/_dts/commerce/src/purchase/types.d.ts +168 -0
- package/dist/_dts/commerce/src/shop/shipmentEligibility.d.ts +14 -0
- package/dist/_dts/commerce/src/utils/assertNever.d.ts +1 -0
- package/dist/_dts/content-model/src/content-types/builtin-schemas.d.ts +4 -0
- package/dist/_dts/content-model/src/content-types/builtins.d.ts +4 -0
- package/dist/_dts/core/src/booking-vertical-catalog.d.ts +741 -0
- package/dist/_dts/core/src/booking-vertical-config.d.ts +66 -0
- package/dist/_dts/core/src/booking-vertical-definitions.d.ts +68 -0
- package/dist/_dts/{api/src/bookingVerticalPreset.d.ts → core/src/booking-vertical-preset.d.ts} +1 -1
- package/dist/_dts/core/src/booking-verticals.d.ts +98 -0
- package/dist/_dts/core/src/event-page-selection.d.ts +22 -0
- package/dist/_dts/core/src/event-pricing.d.ts +5 -0
- package/dist/_dts/core/src/event-series-behaviour.d.ts +16 -0
- package/dist/_dts/core/src/index.d.ts +3 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +72 -0
- package/dist/_dts/db/src/schemas/forms.d.ts +4 -4
- package/dist/_dts/media-core/src/fileUploadCompletion.d.ts +3 -0
- package/dist/_dts/media-core/src/fileUploadDurableFinalization.d.ts +2 -0
- package/dist/_dts/media-core/src/identifiers.d.ts +10 -0
- package/dist/_dts/media-core/src/mediaWriteNormalizer.d.ts +2 -6
- package/dist/_dts/media-core/src/types.d.ts +2 -1
- package/dist/_dts/media-editor/src/index.d.ts +2 -2
- package/dist/_dts/media-editor/src/mediaSelection.d.ts +1 -22
- package/dist/_dts/media-editor/src/useMediaSelection.d.ts +0 -9
- package/dist/_dts/preview-next/src/client/preview/ButtonHoverRoleControls.d.ts +10 -0
- package/dist/_dts/preview-next/src/client/preview/ButtonStylePicker.d.ts +3 -2
- package/dist/_dts/preview-next/src/client/preview/PreviewEditorSidebar.d.ts +3 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.d.ts +3 -1
- package/dist/_dts/preview-next/src/client/preview/StyleConfiguratorWarningNotice.d.ts +7 -0
- package/dist/_dts/preview-next/src/client/preview/siteStylePreviewPlanner.d.ts +1 -1
- package/dist/_dts/sdk/src/client/eventSubrouteReadOperations.d.ts +11 -0
- package/dist/_dts/sdk/src/client/types.d.ts +12 -5
- package/dist/_dts/sdk/src/components.d.ts +1 -1
- package/dist/_dts/sdk/src/contracts/index.d.ts +1 -1
- package/dist/_dts/sdk/src/contracts/page.d.ts +2 -13
- package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +4 -16
- package/dist/_dts/sdk/src/next/pageMetadataProjection.d.ts +7 -0
- package/dist/_dts/sdk/src/next/resolveEventPageSubroute.d.ts +12 -0
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +5 -19
- package/dist/_dts/sdk/src/public-api/eventSubrouteContracts.d.ts +12 -0
- package/dist/_dts/sdk/src/public-api/runtime.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/client.d.ts +44 -0
- package/dist/_dts/sdk/src/rendering/index.d.ts +1 -1
- package/dist/_dts/sdk/src/routing/entrySubroutes.d.ts +1 -1
- package/dist/_dts/sdk/src/routing/resolveOccurrence.d.ts +4 -3
- package/dist/_dts/sdk/src/routing/resolvePageContent.d.ts +7 -3
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/theme-core/src/buttons/buttonSurfaceContext.d.ts +1 -1
- package/dist/_dts/theme-core/src/buttons/contextualHover.d.ts +41 -0
- package/dist/_dts/theme-core/src/buttons/index.d.ts +1 -0
- package/dist/_dts/theme-core/src/buttons/resolveButtonColourStates.d.ts +3 -0
- package/dist/_dts/theme-core/src/buttons/resolveButtonHoverTreatment.d.ts +14 -0
- package/dist/_dts/theme-core/src/buttons/styles/domain.d.ts +21 -4
- package/dist/_dts/theme-core/src/buttons/styles/recipes/flatInk.d.ts +92 -0
- package/dist/_dts/theme-core/src/buttons/styles/recipes/staticRecipes.d.ts +10 -150
- package/dist/_dts/theme-core/src/buttons/styles/registry.d.ts +57 -102
- package/dist/_dts/theme-core/src/buttons/styles/selection.d.ts +50 -2
- package/dist/_dts/theme-core/src/buttons/types.d.ts +29 -0
- package/dist/_dts/theme-core/src/cards/types.d.ts +3 -25
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +21 -6
- package/dist/_dts/theme-core/src/schema.d.ts +21 -33
- package/dist/_dts/theme-core/src/site-styles/appearancePresetCatalog.d.ts +27 -0
- package/dist/_dts/theme-core/src/site-styles/blockAppearancePresets.d.ts +27 -0
- package/dist/_dts/theme-core/src/site-styles/buttonSelectionCompiler.d.ts +18 -0
- package/dist/_dts/theme-core/src/site-styles/compilationPlan.d.ts +21 -0
- package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +2 -11
- package/dist/_dts/theme-core/src/site-styles/selectionFallbackWarning.d.ts +15 -0
- package/dist/_dts/theme-core/src/site-styles/types.d.ts +13 -1
- package/dist/_dts/ui/src/navigation-tabs.d.ts +2 -0
- package/dist/client/{DiscountCodeDisclosure-BPZ-yfGI.mjs → DiscountCodeDisclosure-DO7llLxm.mjs} +12 -12
- package/dist/client/{EventCombined.client-Cjt3kKYR.mjs → EventCombined.client-xID7zN__.mjs} +36 -48
- package/dist/client/{EventListing.client-DY9dn6Fh.mjs → EventListing.client-CriBslp0.mjs} +2 -2
- package/dist/client/{LeafletStaticMap--2c61XYn.mjs → LeafletStaticMap-DYmHnM8g.mjs} +1 -1
- package/dist/client/{StepIndicator-CLjQhkDb.mjs → StepIndicator-CGixP_LW.mjs} +2 -2
- package/dist/client/{CourseRegistrationWizard-DGW9F0SQ.mjs → WholeSeriesRegistrationWizard-BEjzSiOA.mjs} +1408 -1245
- package/dist/client/{accordion-_boYwHHi.mjs → accordion-CgFbnnnQ.mjs} +1 -1
- package/dist/client/{bookingForm--AqEfyBX.mjs → bookingForm-dUyGpbxc.mjs} +5 -5
- package/dist/client/bookings.mjs +635 -471
- package/dist/client/{carousel-CVI2dqZr.mjs → carousel-BvBwkUzx.mjs} +1 -1
- package/dist/client/{cart-DR6IiPz9.mjs → cart-DiZENT2E.mjs} +3 -3
- package/dist/client/{checkout-CsrGAfQt.mjs → checkout-Dq13KIgR.mjs} +3 -3
- package/dist/client/client.mjs +6291 -3452
- package/dist/client/{courseRegistration-aNJVaLa3.mjs → courseRegistration-CKC5NmyH.mjs} +10 -4
- package/dist/client/{eventCalendar-OZ7h59VN.mjs → eventCalendar-BF0Jatfw.mjs} +40 -43
- package/dist/client/{eventCombined-BbJ6bFKz.mjs → eventCombined-BuoCF8je.mjs} +2 -2
- package/dist/client/{eventDetails-BLyUBiCT.mjs → eventDetails-CKwh0S9s.mjs} +276 -94
- package/dist/client/{eventListing-DuP1yhBS.mjs → eventListing-eUxaWFaB.mjs} +2 -2
- package/dist/client/{eventRegistration-BXyECPa-.mjs → eventRegistration-CfkNOkPb.mjs} +625 -132
- package/dist/client/{form-BA4t3kKU.mjs → form-C17H1c_H.mjs} +1 -1
- package/dist/client/{headerSection-CpNaJxhW.mjs → headerSection-DEwUmrtt.mjs} +2 -2
- package/dist/client/hooks.mjs +1312 -481
- package/dist/client/{locationMap-3HGMCL7_.mjs → locationMap-Pf2QwuvW.mjs} +2 -2
- package/dist/client/{newsletterForm-C2s6Mw67.mjs → newsletterForm-BWQAH5Sv.mjs} +1 -1
- package/dist/client/pricing-CVdvbopJ.mjs +195 -0
- package/dist/client/{productDetail-C9joWhdE.mjs → productDetail-BZi1Fa_G.mjs} +3 -3
- package/dist/client/{productList-CjzdU3pB.mjs → productList-qq-55DNk.mjs} +3 -3
- package/dist/client/{propsDecoder-CBPGXEYX.mjs → propsDecoder-BxmqPKdP.mjs} +412 -196
- package/dist/client/rendering/client.mjs +5685 -4037
- package/dist/client/rendering/islands.mjs +18 -18
- package/dist/client/rendering.mjs +7006 -4124
- package/dist/client/{scrollToBlock-DZ73aEX6.mjs → scrollToBlock-B3CcKdtG.mjs} +1 -1
- package/dist/client/{shop-CQRai7hj.mjs → shop-DNWJPut5.mjs} +5 -5
- package/dist/client/{shop-commerce-hP9UboOx.mjs → shop-commerce-BhvQCosS.mjs} +4 -4
- package/dist/client/{shop-commerce-store-DiD5a32e.mjs → shop-commerce-store-B04sCNnW.mjs} +1 -1
- package/dist/client/{shopShared-DP8DXTkF.mjs → shopShared-DNNgZlmW.mjs} +2 -2
- package/dist/client/{useEventFilters-pF_OJNQP.mjs → useEventFilters-CUmhE24_.mjs} +195 -6
- package/dist/client/{usePolling-Cls91SD2.mjs → usePolling-M5jG675x.mjs} +3 -3
- package/dist/preview-next/before-render.mjs +247 -60
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/keepAlive.mjs +247 -60
- package/dist/preview-next/middleware.mjs +247 -60
- package/dist/{previewAuthStore-CX1C_KJ4.mjs → previewAuthStore-BFKd4LrN.mjs} +247 -60
- package/dist/{sdk-runtime-5CcPAI14.mjs → sdk-runtime-BEXb1wqo.mjs} +2 -2
- package/dist/{separator-BXlYN_gr.mjs → separator-DGMuip1D.mjs} +1 -1
- package/dist/server/components.mjs +3461 -1577
- package/dist/server/config-validation.mjs +1312 -482
- package/dist/server/config.mjs +1312 -482
- package/dist/server/data.mjs +1312 -481
- package/dist/server/index.mjs +289 -81
- package/dist/server/manifest.mjs +0 -1
- package/dist/server/next.mjs +3576 -1689
- package/dist/server/page-converter.mjs +797 -250
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +3461 -1576
- package/dist/server/rendering.mjs +3461 -1577
- package/dist/server/routing.mjs +1555 -616
- package/dist/server/server.mjs +1352 -560
- package/dist/server/theme-bridge.mjs +1992 -931
- package/dist/server/theme.mjs +346 -133
- package/dist/styles/index.css +1602 -796
- package/package.json +1 -1
- package/dist/_dts/api/src/bookingVerticalCatalog.d.ts +0 -746
- package/dist/_dts/api/src/eventSeriesPresentationPreset.d.ts +0 -12
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/CourseRegistrationWizard.d.ts +0 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/StepIndicator.d.ts +0 -6
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/components.d.ts +0 -45
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/pricing.d.ts +0 -14
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/useCoursePaymentVerification.d.ts +0 -9
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/useCourseRegistrationActions.d.ts +0 -35
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/useCourseRegistrationSelection.d.ts +0 -31
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/useCourseRegistrationWizard.d.ts +0 -102
- package/dist/client/eventProductEligibility-AVxyCB1u.mjs +0 -50
- package/dist/client/pricing-BiqIMgZk.mjs +0 -174
- /package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/PortalAuthSidebar.d.ts +0 -0
- /package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/SuccessStep.d.ts +0 -0
- /package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/WaitlistStep.d.ts +0 -0
|
@@ -1333,6 +1333,17 @@ const PUBLIC_WHOLE_SERIES_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
1333
1333
|
}
|
|
1334
1334
|
});
|
|
1335
1335
|
//#endregion
|
|
1336
|
+
//#region ../api/src/publicEventEndpointDefinitions.ts
|
|
1337
|
+
const PUBLIC_EVENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({ resolveEventSubroute: {
|
|
1338
|
+
path: "/public/sites/{siteId}/events/subroutes/resolve",
|
|
1339
|
+
method: "GET",
|
|
1340
|
+
revalidate: 60,
|
|
1341
|
+
tags: [TAG_TEMPLATES.publicEvents, "event-subroute"],
|
|
1342
|
+
auth: "public",
|
|
1343
|
+
responseKind: "json",
|
|
1344
|
+
errors: []
|
|
1345
|
+
} });
|
|
1346
|
+
//#endregion
|
|
1336
1347
|
//#region ../api/src/siteApiKeyEndpointDefinitions.ts
|
|
1337
1348
|
const SITE_API_KEY_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
1338
1349
|
listSiteApiKeys: {
|
|
@@ -1459,13 +1470,249 @@ const EVENT_MANAGEMENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
1459
1470
|
"resource:conflict",
|
|
1460
1471
|
"server:internal_error"
|
|
1461
1472
|
]
|
|
1473
|
+
},
|
|
1474
|
+
updateEventIdentity: {
|
|
1475
|
+
path: "/sites/{siteId}/bookings/events/{eventId}",
|
|
1476
|
+
method: "PATCH",
|
|
1477
|
+
tags: ["site-{siteId}", "event-series-{siteId}"],
|
|
1478
|
+
auth: "user",
|
|
1479
|
+
responseKind: "json",
|
|
1480
|
+
errors: [
|
|
1481
|
+
"validation:invalid_input",
|
|
1482
|
+
"resource:not_found",
|
|
1483
|
+
"server:internal_error"
|
|
1484
|
+
]
|
|
1485
|
+
},
|
|
1486
|
+
createWholeSeriesRun: {
|
|
1487
|
+
path: "/sites/{siteId}/bookings/events/{eventId}/runs",
|
|
1488
|
+
method: "POST",
|
|
1489
|
+
tags: ["site-{siteId}", "event-series-{siteId}"],
|
|
1490
|
+
auth: "user",
|
|
1491
|
+
responseKind: "json",
|
|
1492
|
+
errors: [
|
|
1493
|
+
"validation:invalid_input",
|
|
1494
|
+
"resource:not_found",
|
|
1495
|
+
"resource:already_exists",
|
|
1496
|
+
"server:internal_error"
|
|
1497
|
+
]
|
|
1498
|
+
},
|
|
1499
|
+
updateWholeSeriesRun: {
|
|
1500
|
+
path: "/sites/{siteId}/bookings/events/{eventId}/runs/{runId}",
|
|
1501
|
+
method: "PATCH",
|
|
1502
|
+
tags: ["site-{siteId}", "event-series-{siteId}"],
|
|
1503
|
+
auth: "user",
|
|
1504
|
+
responseKind: "json",
|
|
1505
|
+
errors: [
|
|
1506
|
+
"validation:invalid_input",
|
|
1507
|
+
"resource:not_found",
|
|
1508
|
+
"resource:conflict",
|
|
1509
|
+
"server:internal_error"
|
|
1510
|
+
]
|
|
1511
|
+
},
|
|
1512
|
+
cancelWholeSeriesRun: {
|
|
1513
|
+
path: "/sites/{siteId}/bookings/events/{eventId}/runs/{runId}/cancellation",
|
|
1514
|
+
method: "POST",
|
|
1515
|
+
tags: ["site-{siteId}", "event-series-{siteId}"],
|
|
1516
|
+
auth: "user",
|
|
1517
|
+
responseKind: "json",
|
|
1518
|
+
errors: [
|
|
1519
|
+
"validation:invalid_input",
|
|
1520
|
+
"resource:not_found",
|
|
1521
|
+
"resource:conflict",
|
|
1522
|
+
"server:internal_error"
|
|
1523
|
+
]
|
|
1462
1524
|
}
|
|
1463
1525
|
});
|
|
1464
|
-
|
|
1526
|
+
//#endregion
|
|
1527
|
+
//#region ../api/src/giftingEndpointDefinitions.ts
|
|
1528
|
+
/**
|
|
1529
|
+
* Gifting endpoints (gift cards & vouchers) — the dashboard surface that manages
|
|
1530
|
+
* offers, gifts and settings, plus the public buy/claim surface.
|
|
1531
|
+
*/
|
|
1532
|
+
const GIFTING_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
1533
|
+
createGiftingOffer: {
|
|
1534
|
+
path: "/sites/{siteId}/gifting/offers",
|
|
1535
|
+
method: "POST",
|
|
1536
|
+
tags: ["site-{siteId}", "gifting-offers-{siteId}"],
|
|
1537
|
+
auth: "user",
|
|
1538
|
+
responseKind: "json",
|
|
1539
|
+
errors: [
|
|
1540
|
+
"validation:invalid_input",
|
|
1541
|
+
"auth:forbidden",
|
|
1542
|
+
"server:internal_error"
|
|
1543
|
+
]
|
|
1544
|
+
},
|
|
1545
|
+
updateGiftingOffer: {
|
|
1546
|
+
path: "/sites/{siteId}/gifting/offers/{offerId}",
|
|
1547
|
+
method: "PATCH",
|
|
1548
|
+
tags: ["site-{siteId}", "gifting-offers-{siteId}"],
|
|
1549
|
+
auth: "user",
|
|
1550
|
+
responseKind: "json",
|
|
1551
|
+
errors: [
|
|
1552
|
+
"validation:invalid_input",
|
|
1553
|
+
"auth:forbidden",
|
|
1554
|
+
"resource:not_found",
|
|
1555
|
+
"resource:conflict",
|
|
1556
|
+
"server:internal_error"
|
|
1557
|
+
]
|
|
1558
|
+
},
|
|
1559
|
+
deleteGiftingOffer: {
|
|
1560
|
+
path: "/sites/{siteId}/gifting/offers/{offerId}",
|
|
1561
|
+
method: "DELETE",
|
|
1562
|
+
tags: ["site-{siteId}", "gifting-offers-{siteId}"],
|
|
1563
|
+
auth: "user",
|
|
1564
|
+
responseKind: "json",
|
|
1565
|
+
errors: [
|
|
1566
|
+
"auth:forbidden",
|
|
1567
|
+
"resource:not_found",
|
|
1568
|
+
"resource:conflict",
|
|
1569
|
+
"server:internal_error"
|
|
1570
|
+
]
|
|
1571
|
+
},
|
|
1572
|
+
duplicateGiftingOffer: {
|
|
1573
|
+
path: "/sites/{siteId}/gifting/offers/{offerId}/duplicate",
|
|
1574
|
+
method: "POST",
|
|
1575
|
+
tags: ["site-{siteId}", "gifting-offers-{siteId}"],
|
|
1576
|
+
auth: "user",
|
|
1577
|
+
responseKind: "json",
|
|
1578
|
+
errors: [
|
|
1579
|
+
"auth:forbidden",
|
|
1580
|
+
"resource:not_found",
|
|
1581
|
+
"server:internal_error"
|
|
1582
|
+
]
|
|
1583
|
+
},
|
|
1584
|
+
reorderGiftingOffers: {
|
|
1585
|
+
path: "/sites/{siteId}/gifting/offers/order",
|
|
1586
|
+
method: "PUT",
|
|
1587
|
+
tags: ["site-{siteId}", "gifting-offers-{siteId}"],
|
|
1588
|
+
auth: "user",
|
|
1589
|
+
responseKind: "json",
|
|
1590
|
+
errors: [
|
|
1591
|
+
"validation:invalid_input",
|
|
1592
|
+
"auth:forbidden",
|
|
1593
|
+
"resource:not_found",
|
|
1594
|
+
"server:internal_error"
|
|
1595
|
+
]
|
|
1596
|
+
},
|
|
1597
|
+
sendGift: {
|
|
1598
|
+
path: "/sites/{siteId}/gifting/gifts",
|
|
1599
|
+
method: "POST",
|
|
1600
|
+
tags: ["site-{siteId}", "gifting-gifts-{siteId}"],
|
|
1601
|
+
auth: "user",
|
|
1602
|
+
demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN,
|
|
1603
|
+
responseKind: "json",
|
|
1604
|
+
errors: [
|
|
1605
|
+
"validation:invalid_input",
|
|
1606
|
+
"auth:forbidden",
|
|
1607
|
+
"resource:not_found",
|
|
1608
|
+
"server:internal_error"
|
|
1609
|
+
]
|
|
1610
|
+
},
|
|
1611
|
+
resendGift: {
|
|
1612
|
+
path: "/sites/{siteId}/gifting/gifts/{giftId}/resend",
|
|
1613
|
+
method: "POST",
|
|
1614
|
+
tags: ["site-{siteId}", "gifting-gifts-{siteId}"],
|
|
1615
|
+
auth: "user",
|
|
1616
|
+
demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN,
|
|
1617
|
+
responseKind: "json",
|
|
1618
|
+
errors: [
|
|
1619
|
+
"auth:forbidden",
|
|
1620
|
+
"resource:not_found",
|
|
1621
|
+
"resource:conflict",
|
|
1622
|
+
"server:internal_error"
|
|
1623
|
+
]
|
|
1624
|
+
},
|
|
1625
|
+
correctGiftEmailAndResend: {
|
|
1626
|
+
path: "/sites/{siteId}/gifting/gifts/{giftId}/correct-email-and-resend",
|
|
1627
|
+
method: "POST",
|
|
1628
|
+
tags: ["site-{siteId}", "gifting-gifts-{siteId}"],
|
|
1629
|
+
auth: "user",
|
|
1630
|
+
demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN,
|
|
1631
|
+
responseKind: "json",
|
|
1632
|
+
errors: [
|
|
1633
|
+
"validation:invalid_input",
|
|
1634
|
+
"auth:forbidden",
|
|
1635
|
+
"resource:not_found",
|
|
1636
|
+
"resource:conflict",
|
|
1637
|
+
"server:internal_error"
|
|
1638
|
+
]
|
|
1639
|
+
},
|
|
1640
|
+
updateGiftingSettings: {
|
|
1641
|
+
path: "/sites/{siteId}/gifting/settings",
|
|
1642
|
+
method: "PATCH",
|
|
1643
|
+
tags: [
|
|
1644
|
+
"site-{siteId}",
|
|
1645
|
+
"gifting-offers-{siteId}",
|
|
1646
|
+
"gifting-gifts-{siteId}"
|
|
1647
|
+
],
|
|
1648
|
+
auth: "user",
|
|
1649
|
+
responseKind: "json",
|
|
1650
|
+
errors: [
|
|
1651
|
+
"validation:invalid_input",
|
|
1652
|
+
"auth:forbidden",
|
|
1653
|
+
"server:internal_error"
|
|
1654
|
+
]
|
|
1655
|
+
},
|
|
1656
|
+
listPublicGiftingOffers: {
|
|
1657
|
+
path: "/public/sites/{siteId}/gifting/offers",
|
|
1658
|
+
method: "GET",
|
|
1659
|
+
revalidate: 300,
|
|
1660
|
+
tags: [TAG_TEMPLATES.publicGifting],
|
|
1661
|
+
errors: [],
|
|
1662
|
+
auth: "public",
|
|
1663
|
+
responseKind: "json"
|
|
1664
|
+
},
|
|
1665
|
+
createPublicGiftingCheckout: {
|
|
1666
|
+
path: "/public/sites/{siteId}/gifting/checkout",
|
|
1667
|
+
method: "POST",
|
|
1668
|
+
tags: [TAG_TEMPLATES.publicGifting],
|
|
1669
|
+
errors: [],
|
|
1670
|
+
auth: "public",
|
|
1671
|
+
responseKind: "json"
|
|
1672
|
+
},
|
|
1673
|
+
claimGiftCardPublic: {
|
|
1674
|
+
path: "/public/sites/{siteId}/gifting/claim",
|
|
1675
|
+
method: "POST",
|
|
1676
|
+
tags: [TAG_TEMPLATES.publicGifting],
|
|
1677
|
+
errors: [],
|
|
1678
|
+
auth: "public",
|
|
1679
|
+
responseKind: "json"
|
|
1680
|
+
}
|
|
1681
|
+
});
|
|
1682
|
+
//#endregion
|
|
1683
|
+
//#region ../api/src/sdkEndpointDefinitions.ts
|
|
1684
|
+
/** SDK management endpoints that do not belong to a CRUD resource family. */
|
|
1685
|
+
const SDK_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
1686
|
+
sdkUpdateSettings: {
|
|
1687
|
+
path: "/sdk/{siteId}/settings",
|
|
1688
|
+
method: "PATCH",
|
|
1689
|
+
auth: "service",
|
|
1690
|
+
responseKind: "json",
|
|
1691
|
+
errors: ["validation:invalid_input", "server:internal_error"]
|
|
1692
|
+
},
|
|
1693
|
+
sdkConfigureBookingVertical: {
|
|
1694
|
+
path: "/sdk/{siteId}/settings/booking/vertical",
|
|
1695
|
+
method: "POST",
|
|
1696
|
+
auth: "service",
|
|
1697
|
+
responseKind: "json"
|
|
1698
|
+
},
|
|
1699
|
+
sdkSetupRevalidationWebhook: {
|
|
1700
|
+
path: "/sdk/{siteId}/webhooks/revalidation/setup",
|
|
1701
|
+
method: "POST",
|
|
1702
|
+
auth: "service",
|
|
1703
|
+
responseKind: "json",
|
|
1704
|
+
errors: ["validation:invalid_input", "server:internal_error"]
|
|
1705
|
+
}
|
|
1706
|
+
});
|
|
1707
|
+
({
|
|
1708
|
+
...ACCOUNT_ENDPOINT_DEFINITIONS,
|
|
1709
|
+
...PUBLIC_EVENT_ENDPOINT_DEFINITIONS,
|
|
1710
|
+
...GIFTING_ENDPOINT_DEFINITIONS
|
|
1711
|
+
}), TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteTheme, TAG_TEMPLATES.siteCollection, { ...SITE_API_KEY_ENDPOINT_DEFINITIONS }, TAG_TEMPLATES.site, TAG_TEMPLATES.siteBookingSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteBookingSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteEmailSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteEmailSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteEmailSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteEmailSettings, {
|
|
1465
1712
|
...NEWSLETTER_ENDPOINT_DEFINITIONS,
|
|
1466
1713
|
...APPOINTMENT_ENDPOINT_DEFINITIONS,
|
|
1467
1714
|
...COURSE_ENDPOINT_DEFINITIONS
|
|
1468
|
-
}, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteById, TAG_TEMPLATES.siteBySlug, TAG_TEMPLATES.siteByDomain, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteById, TAG_TEMPLATES.siteBySlug, TAG_TEMPLATES.siteByDomain, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.workflowRunById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.routeById, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.site, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.navigationItemById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.navigationItemById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteTheme, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteTheme, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteTheme, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRedirects, TAG_TEMPLATES.siteRouteOutcomes, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRedirects, TAG_TEMPLATES.siteRouteOutcomes, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.formSubmissionsBySlug, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.formSubmissionsBySlug, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.formSubmissionsBySlug, TAG_TEMPLATES.formById, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.publicEvents, TAG_TEMPLATES.publicEventFilters, { ...PUBLIC_WHOLE_SERIES_ENDPOINT_DEFINITIONS }, TAG_TEMPLATES.publicTeamMembers, TAG_TEMPLATES.publicWholeSeriesOfferings, TAG_TEMPLATES.publicEvents, TAG_TEMPLATES.publicPasses, TAG_TEMPLATES.publicMemberships, TAG_TEMPLATES.publicProducts, TAG_TEMPLATES.
|
|
1715
|
+
}, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteById, TAG_TEMPLATES.siteBySlug, TAG_TEMPLATES.siteByDomain, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteById, TAG_TEMPLATES.siteBySlug, TAG_TEMPLATES.siteByDomain, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.workflowRunById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.routeById, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.site, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.navigationItemById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.navigationItemById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteTheme, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteTheme, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteTheme, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRedirects, TAG_TEMPLATES.siteRouteOutcomes, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRedirects, TAG_TEMPLATES.siteRouteOutcomes, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.formSubmissionsBySlug, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.formSubmissionsBySlug, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.formSubmissionsBySlug, TAG_TEMPLATES.formById, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.publicEvents, TAG_TEMPLATES.publicEventFilters, { ...PUBLIC_WHOLE_SERIES_ENDPOINT_DEFINITIONS }, TAG_TEMPLATES.publicTeamMembers, TAG_TEMPLATES.publicWholeSeriesOfferings, TAG_TEMPLATES.publicEvents, TAG_TEMPLATES.publicPasses, TAG_TEMPLATES.publicMemberships, TAG_TEMPLATES.publicProducts, TAG_TEMPLATES.publicShop, TAG_TEMPLATES.publicCheckout, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.publicEvents, TAG_TEMPLATES.publicEvents, TAG_TEMPLATES.publicEvents, TAG_TEMPLATES.publicEvents, TAG_TEMPLATES.publicEvents, { ...EVENT_MANAGEMENT_ENDPOINT_DEFINITIONS }, { ...SDK_ENDPOINT_DEFINITIONS }, { ...SDK_ENTRY_READ_ENDPOINTS };
|
|
1469
1716
|
z.object({ refreshToken: z.string().min(1).max(4096) }).strict();
|
|
1470
1717
|
z.object({
|
|
1471
1718
|
accessToken: z.string().min(1).max(4096),
|
|
@@ -1935,6 +2182,298 @@ function parseManagementKey(raw) {
|
|
|
1935
2182
|
if (typeof raw !== "string" || !raw.startsWith("bld_mgmt_sk_") || raw.length === 12) return err({ kind: "invalid-management-key" });
|
|
1936
2183
|
return ok(createSecretInternal("management-key", raw));
|
|
1937
2184
|
}
|
|
2185
|
+
//#endregion
|
|
2186
|
+
//#region ../core/src/event-series-behaviour.ts
|
|
2187
|
+
const SURFACE_EVENT_PRESET_VALUES = [
|
|
2188
|
+
"class",
|
|
2189
|
+
"course",
|
|
2190
|
+
"term",
|
|
2191
|
+
"workshop",
|
|
2192
|
+
"retreat",
|
|
2193
|
+
"performance"
|
|
2194
|
+
];
|
|
2195
|
+
//#endregion
|
|
2196
|
+
//#region ../core/src/booking-vertical-preset.ts
|
|
2197
|
+
const BOOKING_ENGINE_BY_BEHAVIOUR = {
|
|
2198
|
+
class: "event_series",
|
|
2199
|
+
workshop: "event_series",
|
|
2200
|
+
course: "event_series",
|
|
2201
|
+
retreat: "event_series",
|
|
2202
|
+
performance: "event_series",
|
|
2203
|
+
appointment: "appointment_service"
|
|
2204
|
+
};
|
|
2205
|
+
function verticalBookingPreset(id, verticalId, canonicalBehaviour, label, pluralLabel, description, availability = "onboarding") {
|
|
2206
|
+
return {
|
|
2207
|
+
id,
|
|
2208
|
+
verticalId,
|
|
2209
|
+
canonicalBehaviour,
|
|
2210
|
+
engine: BOOKING_ENGINE_BY_BEHAVIOUR[canonicalBehaviour],
|
|
2211
|
+
availability,
|
|
2212
|
+
label,
|
|
2213
|
+
pluralLabel,
|
|
2214
|
+
description
|
|
2215
|
+
};
|
|
2216
|
+
}
|
|
2217
|
+
//#endregion
|
|
2218
|
+
//#region ../core/src/booking-vertical-definitions.ts
|
|
2219
|
+
const VERTICAL_DEFINITIONS = [
|
|
2220
|
+
{
|
|
2221
|
+
id: "yoga_wellness",
|
|
2222
|
+
label: "Yoga, meditation or mindfulness",
|
|
2223
|
+
description: "Yoga studios, wellness teachers, and movement practitioners."
|
|
2224
|
+
},
|
|
2225
|
+
{
|
|
2226
|
+
id: "fitness_pt",
|
|
2227
|
+
label: "Fitness and personal training",
|
|
2228
|
+
description: "Personal trainers, group training, and fitness programmes."
|
|
2229
|
+
},
|
|
2230
|
+
{
|
|
2231
|
+
id: "dance_school",
|
|
2232
|
+
label: "Dance school",
|
|
2233
|
+
description: "Dance classes, courses or terms, workshops, private lessons, and shows."
|
|
2234
|
+
},
|
|
2235
|
+
{
|
|
2236
|
+
id: "physiotherapy_physical_health",
|
|
2237
|
+
label: "Physiotherapy & physical health",
|
|
2238
|
+
description: "Physiotherapists, chiropractors, osteopaths, sports therapists, and rehabilitation practitioners."
|
|
2239
|
+
},
|
|
2240
|
+
{
|
|
2241
|
+
id: "massage_bodywork",
|
|
2242
|
+
label: "Massage & bodywork",
|
|
2243
|
+
description: "Massage therapists, bodyworkers, and somatic practitioners."
|
|
2244
|
+
},
|
|
2245
|
+
{
|
|
2246
|
+
id: "therapist_practitioner",
|
|
2247
|
+
label: "Therapist or practitioner",
|
|
2248
|
+
description: "Appointments, sessions, consultations, and occasional group work."
|
|
2249
|
+
},
|
|
2250
|
+
{
|
|
2251
|
+
id: "beauty_spa",
|
|
2252
|
+
label: "Beauty or spa",
|
|
2253
|
+
description: "Treatment-led businesses with optional workshops."
|
|
2254
|
+
},
|
|
2255
|
+
{
|
|
2256
|
+
id: "consultant_coach",
|
|
2257
|
+
label: "Consultant or coach",
|
|
2258
|
+
description: "One-to-one calls, workshops, courses, and retreats."
|
|
2259
|
+
},
|
|
2260
|
+
{
|
|
2261
|
+
id: "training_provider",
|
|
2262
|
+
label: "Training provider",
|
|
2263
|
+
description: "Courses, workshops, classes, appointments, and residential training."
|
|
2264
|
+
},
|
|
2265
|
+
{
|
|
2266
|
+
id: "retreat_centre",
|
|
2267
|
+
label: "Retreat centre",
|
|
2268
|
+
description: "Residential retreats, workshops, classes, courses, and private sessions."
|
|
2269
|
+
},
|
|
2270
|
+
{
|
|
2271
|
+
id: "music_school",
|
|
2272
|
+
label: "Music teacher or school",
|
|
2273
|
+
description: "Lessons, classes, terms, workshops, and performances."
|
|
2274
|
+
},
|
|
2275
|
+
{
|
|
2276
|
+
id: "voice_singing",
|
|
2277
|
+
label: "Voice & Singing",
|
|
2278
|
+
description: "Singing lessons, choirs, voice circles, workshops, and performances."
|
|
2279
|
+
},
|
|
2280
|
+
{
|
|
2281
|
+
id: "performing_arts_school",
|
|
2282
|
+
label: "Theatre or performing arts school",
|
|
2283
|
+
description: "Classes, terms, workshops, performances, and lessons."
|
|
2284
|
+
},
|
|
2285
|
+
{
|
|
2286
|
+
id: "community_wellbeing",
|
|
2287
|
+
label: "Community or wellbeing centre",
|
|
2288
|
+
description: "Groups, workshops, courses, appointments, and retreats."
|
|
2289
|
+
},
|
|
2290
|
+
{
|
|
2291
|
+
id: "venue_event_space",
|
|
2292
|
+
label: "Venue or event space",
|
|
2293
|
+
description: "Room, resource, or access bookings. Depends on the future capacity-booking domain."
|
|
2294
|
+
}
|
|
2295
|
+
];
|
|
2296
|
+
VERTICAL_DEFINITIONS.map(({ id }) => id);
|
|
2297
|
+
//#endregion
|
|
2298
|
+
//#region ../core/src/booking-vertical-catalog.ts
|
|
2299
|
+
const VERTICAL_BOOKING_PRESETS = [
|
|
2300
|
+
verticalBookingPreset("yoga_wellness.classes", "yoga_wellness", "class", "Class", "Classes", "Regular scheduled classes and group sessions."),
|
|
2301
|
+
verticalBookingPreset("yoga_wellness.workshops", "yoga_wellness", "workshop", "Workshop", "Workshops", "One-off workshops, day retreats, or special sessions."),
|
|
2302
|
+
verticalBookingPreset("yoga_wellness.courses", "yoga_wellness", "course", "Course", "Courses", "Fixed-schedule courses or multi-session groups."),
|
|
2303
|
+
verticalBookingPreset("yoga_wellness.retreats", "yoga_wellness", "retreat", "Retreat", "Retreats", "Multi-day or residential retreats and immersive experiences."),
|
|
2304
|
+
verticalBookingPreset("yoga_wellness.appointments", "yoga_wellness", "appointment", "Appointment", "Appointments", "Private sessions, consultations, or one-to-one support."),
|
|
2305
|
+
verticalBookingPreset("fitness_pt.group_training", "fitness_pt", "class", "Group training", "Group training", "Regular scheduled classes and group sessions."),
|
|
2306
|
+
verticalBookingPreset("fitness_pt.personal_training", "fitness_pt", "appointment", "Personal training", "Personal training", "One-to-one sessions booked from your availability."),
|
|
2307
|
+
verticalBookingPreset("fitness_pt.programmes", "fitness_pt", "course", "Programme", "Programmes", "Multi-session programmes like bootcamps or courses."),
|
|
2308
|
+
verticalBookingPreset("fitness_pt.workshops", "fitness_pt", "workshop", "Workshop", "Workshops", "One-off workshops, events, or special sessions."),
|
|
2309
|
+
verticalBookingPreset("fitness_pt.retreats", "fitness_pt", "retreat", "Retreat", "Retreats", "Multi-day or residential fitness experiences."),
|
|
2310
|
+
verticalBookingPreset("dance_school.classes", "dance_school", "class", "Class", "Classes", "Regular group classes and weekly sessions."),
|
|
2311
|
+
{
|
|
2312
|
+
...verticalBookingPreset("dance_school.terms", "dance_school", "course", "Term", "Terms", "Multi-week term blocks or fixed-date course groups."),
|
|
2313
|
+
eventPresetOverride: "term"
|
|
2314
|
+
},
|
|
2315
|
+
verticalBookingPreset("dance_school.courses", "dance_school", "course", "Course", "Courses", "Fixed-schedule courses or multi-session groups.", "settings"),
|
|
2316
|
+
verticalBookingPreset("dance_school.workshops", "dance_school", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, or intensives."),
|
|
2317
|
+
verticalBookingPreset("dance_school.private_lessons", "dance_school", "appointment", "Private lesson", "Private lessons", "One-to-one lessons or coaching sessions."),
|
|
2318
|
+
verticalBookingPreset("dance_school.shows", "dance_school", "performance", "Show", "Shows", "Ticketed performances, showcases, and recitals."),
|
|
2319
|
+
verticalBookingPreset("physiotherapy_physical_health.appointments", "physiotherapy_physical_health", "appointment", "Appointment", "Appointments", "Assessments, treatments, follow-ups, and rehabilitation sessions."),
|
|
2320
|
+
verticalBookingPreset("physiotherapy_physical_health.rehab_classes", "physiotherapy_physical_health", "class", "Rehab class", "Rehab classes", "Regular rehabilitation, mobility, strength, or recovery classes."),
|
|
2321
|
+
verticalBookingPreset("physiotherapy_physical_health.workshops", "physiotherapy_physical_health", "workshop", "Workshop", "Workshops", "One-off workshops, talks, or practical group sessions."),
|
|
2322
|
+
verticalBookingPreset("massage_bodywork.treatments", "massage_bodywork", "appointment", "Treatment", "Treatments", "Massage treatments, bodywork sessions, and one-to-one appointments."),
|
|
2323
|
+
verticalBookingPreset("massage_bodywork.group_sessions", "massage_bodywork", "class", "Group session", "Group sessions", "Regular bodywork, somatic movement, or self-massage sessions."),
|
|
2324
|
+
verticalBookingPreset("massage_bodywork.workshops", "massage_bodywork", "workshop", "Workshop", "Workshops", "One-off bodywork, self-massage, or somatic practice workshops."),
|
|
2325
|
+
verticalBookingPreset("therapist_practitioner.appointments", "therapist_practitioner", "appointment", "Appointment", "Appointments", "Sessions, consultations, treatments, or assessments."),
|
|
2326
|
+
verticalBookingPreset("therapist_practitioner.workshops", "therapist_practitioner", "workshop", "Workshop", "Workshops", "One-off group workshops, talks, or wellbeing sessions."),
|
|
2327
|
+
verticalBookingPreset("therapist_practitioner.retreats", "therapist_practitioner", "retreat", "Retreat", "Retreats", "Multi-day retreats or immersive group experiences."),
|
|
2328
|
+
verticalBookingPreset("beauty_spa.appointments", "beauty_spa", "appointment", "Appointment", "Appointments", "Treatments, consultations, services, and sessions."),
|
|
2329
|
+
verticalBookingPreset("beauty_spa.workshops", "beauty_spa", "workshop", "Workshop", "Workshops", "Skincare workshops, makeup lessons, demos, or group events."),
|
|
2330
|
+
verticalBookingPreset("consultant_coach.appointments", "consultant_coach", "appointment", "Appointment", "Appointments", "One-to-one calls, consultations, reviews, or coaching sessions."),
|
|
2331
|
+
verticalBookingPreset("consultant_coach.workshops", "consultant_coach", "workshop", "Workshop", "Workshops", "One-off group sessions, webinars, or strategy days."),
|
|
2332
|
+
verticalBookingPreset("consultant_coach.courses", "consultant_coach", "course", "Course", "Courses", "Fixed-schedule cohorts or multi-session group programmes."),
|
|
2333
|
+
verticalBookingPreset("consultant_coach.retreats", "consultant_coach", "retreat", "Retreat", "Retreats", "Multi-day coaching retreats or immersive experiences."),
|
|
2334
|
+
verticalBookingPreset("training_provider.courses", "training_provider", "course", "Course", "Courses", "Fixed-schedule courses, cohorts, and multi-session training."),
|
|
2335
|
+
verticalBookingPreset("training_provider.workshops", "training_provider", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, and short training sessions."),
|
|
2336
|
+
verticalBookingPreset("training_provider.appointments", "training_provider", "appointment", "Appointment", "Appointments", "Consultations, assessments, mentoring, or office hours."),
|
|
2337
|
+
verticalBookingPreset("training_provider.classes", "training_provider", "class", "Class", "Classes", "Regular classes, sessions, or groups.", "settings"),
|
|
2338
|
+
verticalBookingPreset("training_provider.residentials", "training_provider", "retreat", "Residential", "Residentials", "Residential courses or multi-day training experiences.", "settings"),
|
|
2339
|
+
verticalBookingPreset("retreat_centre.retreats", "retreat_centre", "retreat", "Retreat", "Retreats", "Multi-day or residential retreats with richer booking needs."),
|
|
2340
|
+
verticalBookingPreset("retreat_centre.workshops", "retreat_centre", "workshop", "Workshop", "Workshops", "One-day retreats, ceremonies, workshops, or special events."),
|
|
2341
|
+
verticalBookingPreset("retreat_centre.classes", "retreat_centre", "class", "Class", "Classes", "Regular sessions like guided meditations or group practices."),
|
|
2342
|
+
verticalBookingPreset("retreat_centre.courses", "retreat_centre", "course", "Course", "Courses", "Fixed-schedule programmes or multi-session experiences."),
|
|
2343
|
+
verticalBookingPreset("retreat_centre.appointments", "retreat_centre", "appointment", "Appointment", "Appointments", "Private sessions, therapies, consultations, or add-ons."),
|
|
2344
|
+
verticalBookingPreset("music_school.lessons", "music_school", "appointment", "Lesson", "Lessons", "One-to-one lessons, consultations, or coaching sessions."),
|
|
2345
|
+
verticalBookingPreset("music_school.classes", "music_school", "class", "Class", "Classes", "Regular group classes, ensembles, or recurring sessions."),
|
|
2346
|
+
{
|
|
2347
|
+
...verticalBookingPreset("music_school.terms", "music_school", "course", "Term", "Terms", "Multi-week term blocks or fixed-date group courses."),
|
|
2348
|
+
eventPresetOverride: "term"
|
|
2349
|
+
},
|
|
2350
|
+
verticalBookingPreset("music_school.workshops", "music_school", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, or intensives."),
|
|
2351
|
+
verticalBookingPreset("music_school.performances", "music_school", "performance", "Performance", "Performances", "Concerts, recitals, showcases, or ticketed performances."),
|
|
2352
|
+
verticalBookingPreset("voice_singing.lessons", "voice_singing", "appointment", "Voice session", "Voice sessions", "One-to-one singing lessons, voice coaching, or private practice sessions."),
|
|
2353
|
+
verticalBookingPreset("voice_singing.classes", "voice_singing", "class", "Ongoing weekly session", "Ongoing weekly sessions", "Regular choirs, voice circles, community singing, or group practice."),
|
|
2354
|
+
{
|
|
2355
|
+
...verticalBookingPreset("voice_singing.terms", "voice_singing", "course", "Singing term", "Singing terms", "Multi-week choir terms, voice courses, or fixed-date group programmes."),
|
|
2356
|
+
eventPresetOverride: "term"
|
|
2357
|
+
},
|
|
2358
|
+
verticalBookingPreset("voice_singing.workshops", "voice_singing", "workshop", "Workshop", "Workshops", "One-off singing workshops, voice journeys, or devotional singing sessions."),
|
|
2359
|
+
verticalBookingPreset("voice_singing.performances", "voice_singing", "performance", "Performance", "Performances", "Choir concerts, sharing events, recitals, or community performances."),
|
|
2360
|
+
verticalBookingPreset("performing_arts_school.classes", "performing_arts_school", "class", "Class", "Classes", "Regular group classes, rehearsals, or weekly sessions."),
|
|
2361
|
+
{
|
|
2362
|
+
...verticalBookingPreset("performing_arts_school.terms", "performing_arts_school", "course", "Term", "Terms", "Multi-week term blocks or fixed-date course groups."),
|
|
2363
|
+
eventPresetOverride: "term"
|
|
2364
|
+
},
|
|
2365
|
+
verticalBookingPreset("performing_arts_school.workshops", "performing_arts_school", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, or intensives."),
|
|
2366
|
+
verticalBookingPreset("performing_arts_school.performances", "performing_arts_school", "performance", "Performance", "Performances", "Shows, showcases, productions, or ticketed performances."),
|
|
2367
|
+
verticalBookingPreset("performing_arts_school.lessons", "performing_arts_school", "appointment", "Lesson", "Lessons", "One-to-one lessons, coaching, or audition prep."),
|
|
2368
|
+
verticalBookingPreset("community_wellbeing.classes", "community_wellbeing", "class", "Class", "Classes", "Regular groups, sessions, practices, or weekly activities."),
|
|
2369
|
+
verticalBookingPreset("community_wellbeing.workshops", "community_wellbeing", "workshop", "Workshop", "Workshops", "One-off workshops, talks, events, or gatherings."),
|
|
2370
|
+
verticalBookingPreset("community_wellbeing.courses", "community_wellbeing", "course", "Course", "Courses", "Fixed-schedule courses, study groups, or multi-session programmes."),
|
|
2371
|
+
verticalBookingPreset("community_wellbeing.appointments", "community_wellbeing", "appointment", "Appointment", "Appointments", "One-to-one appointments, consultations, or support sessions."),
|
|
2372
|
+
verticalBookingPreset("community_wellbeing.retreats", "community_wellbeing", "retreat", "Retreat", "Retreats", "Multi-day or residential retreats."),
|
|
2373
|
+
verticalBookingPreset("venue_event_space.resource_hire", "venue_event_space", "appointment", "Hire slot", "Hire slots", "Future room, venue, and resource hire bookings.", "future")
|
|
2374
|
+
];
|
|
2375
|
+
//#endregion
|
|
2376
|
+
//#region ../core/src/booking-vertical-config.ts
|
|
2377
|
+
const VERTICAL_ID_SET = new Set(VERTICAL_DEFINITIONS.map(({ id }) => id));
|
|
2378
|
+
const VERTICAL_PRESET_ID_SET = new Set(VERTICAL_BOOKING_PRESETS.map((presetDefinition) => presetDefinition.id));
|
|
2379
|
+
function parseVerticalId(value) {
|
|
2380
|
+
return typeof value === "string" && VERTICAL_ID_SET.has(value) ? value : null;
|
|
2381
|
+
}
|
|
2382
|
+
function parseVerticalPresetId(value) {
|
|
2383
|
+
return typeof value === "string" && VERTICAL_PRESET_ID_SET.has(value) ? value : null;
|
|
2384
|
+
}
|
|
2385
|
+
function getVerticalPresetDefinition(presetId) {
|
|
2386
|
+
const definition = VERTICAL_BOOKING_PRESETS.find((presetDefinition) => presetDefinition.id === presetId);
|
|
2387
|
+
if (definition === void 0) throw new Error(`Unhandled vertical preset id: ${presetId}`);
|
|
2388
|
+
return definition;
|
|
2389
|
+
}
|
|
2390
|
+
function createConfiguredSiteVerticalBookingConfig(verticalId, selectedPresetIds) {
|
|
2391
|
+
return {
|
|
2392
|
+
verticalId,
|
|
2393
|
+
selectedPresetIds
|
|
2394
|
+
};
|
|
2395
|
+
}
|
|
2396
|
+
function toNonEmptyVerticalPresetIds(presetIds) {
|
|
2397
|
+
const firstPresetId = presetIds[0];
|
|
2398
|
+
return firstPresetId ? [firstPresetId, ...presetIds.slice(1)] : null;
|
|
2399
|
+
}
|
|
2400
|
+
const DEFAULT_SITE_VERTICAL_BOOKING_CONFIG = {
|
|
2401
|
+
verticalId: null,
|
|
2402
|
+
selectedPresetIds: []
|
|
2403
|
+
};
|
|
2404
|
+
function appendUniqueIssue(issues, issue) {
|
|
2405
|
+
return issues.some((existing) => existing.code === issue.code) ? issues : [...issues, issue];
|
|
2406
|
+
}
|
|
2407
|
+
function collectRawConfigIssues(rawConfig, config) {
|
|
2408
|
+
const rawPresetValue = rawConfig.selectedPresetIds;
|
|
2409
|
+
const rawPresetIds = Array.isArray(rawPresetValue) ? rawPresetValue : [];
|
|
2410
|
+
let issues = [];
|
|
2411
|
+
if (rawConfig.verticalId != null && config.verticalId === null) issues = appendUniqueIssue(issues, {
|
|
2412
|
+
code: "unknown_vertical",
|
|
2413
|
+
rawValue: rawConfig.verticalId
|
|
2414
|
+
});
|
|
2415
|
+
if (config.verticalId === null && config.selectedPresetIds.length > 0) issues = appendUniqueIssue(issues, { code: "missing_vertical" });
|
|
2416
|
+
if (rawPresetValue !== void 0 && !Array.isArray(rawPresetValue) || rawPresetIds.some((presetId) => parseVerticalPresetId(presetId) === null)) issues = appendUniqueIssue(issues, {
|
|
2417
|
+
code: "unknown_preset",
|
|
2418
|
+
rawValue: rawPresetValue
|
|
2419
|
+
});
|
|
2420
|
+
if (rawConfig.verticalId != null && config.selectedPresetIds.length === 0) issues = appendUniqueIssue(issues, { code: "empty_selected_presets" });
|
|
2421
|
+
return issues;
|
|
2422
|
+
}
|
|
2423
|
+
function collectPresetConfigIssues(config) {
|
|
2424
|
+
const seenPresetIds = /* @__PURE__ */ new Set();
|
|
2425
|
+
const seenBehaviours = /* @__PURE__ */ new Set();
|
|
2426
|
+
let issues = [];
|
|
2427
|
+
for (const presetId of config.selectedPresetIds) {
|
|
2428
|
+
const presetDefinition = getVerticalPresetDefinition(presetId);
|
|
2429
|
+
if (seenPresetIds.has(presetId)) issues = appendUniqueIssue(issues, { code: "duplicate_preset_id" });
|
|
2430
|
+
seenPresetIds.add(presetId);
|
|
2431
|
+
if (config.verticalId !== null && presetDefinition.verticalId !== config.verticalId) issues = appendUniqueIssue(issues, { code: "preset_vertical_mismatch" });
|
|
2432
|
+
if (presetDefinition.availability === "future") issues = appendUniqueIssue(issues, { code: "future_preset_selected" });
|
|
2433
|
+
if (seenBehaviours.has(presetDefinition.canonicalBehaviour)) issues = appendUniqueIssue(issues, { code: "duplicate_canonical_behaviour" });
|
|
2434
|
+
seenBehaviours.add(presetDefinition.canonicalBehaviour);
|
|
2435
|
+
}
|
|
2436
|
+
return issues;
|
|
2437
|
+
}
|
|
2438
|
+
function getSiteVerticalConfigIssues(rawConfig, config) {
|
|
2439
|
+
let issues = collectRawConfigIssues(rawConfig, config);
|
|
2440
|
+
for (const issue of collectPresetConfigIssues(config)) issues = appendUniqueIssue(issues, issue);
|
|
2441
|
+
return issues;
|
|
2442
|
+
}
|
|
2443
|
+
function resolveSiteVerticalBookingConfig(rawConfig) {
|
|
2444
|
+
if (rawConfig == null) return {
|
|
2445
|
+
kind: "unconfigured",
|
|
2446
|
+
config: DEFAULT_SITE_VERTICAL_BOOKING_CONFIG
|
|
2447
|
+
};
|
|
2448
|
+
const verticalId = parseVerticalId(rawConfig.verticalId);
|
|
2449
|
+
const selectedPresetIds = (Array.isArray(rawConfig.selectedPresetIds) ? rawConfig.selectedPresetIds : []).map(parseVerticalPresetId).filter((presetId) => Boolean(presetId));
|
|
2450
|
+
const config = {
|
|
2451
|
+
verticalId,
|
|
2452
|
+
selectedPresetIds
|
|
2453
|
+
};
|
|
2454
|
+
if (rawConfig.verticalId == null && selectedPresetIds.length === 0) return {
|
|
2455
|
+
kind: "unconfigured",
|
|
2456
|
+
config: DEFAULT_SITE_VERTICAL_BOOKING_CONFIG
|
|
2457
|
+
};
|
|
2458
|
+
const issues = getSiteVerticalConfigIssues(rawConfig, config);
|
|
2459
|
+
if (issues.length > 0) return {
|
|
2460
|
+
kind: "invalid",
|
|
2461
|
+
config,
|
|
2462
|
+
issues
|
|
2463
|
+
};
|
|
2464
|
+
const nonEmptyPresetIds = toNonEmptyVerticalPresetIds(selectedPresetIds);
|
|
2465
|
+
const configuredConfig = verticalId !== null && nonEmptyPresetIds !== null ? createConfiguredSiteVerticalBookingConfig(verticalId, nonEmptyPresetIds) : null;
|
|
2466
|
+
if (configuredConfig === null) return {
|
|
2467
|
+
kind: "invalid",
|
|
2468
|
+
config,
|
|
2469
|
+
issues: [{ code: "empty_selected_presets" }]
|
|
2470
|
+
};
|
|
2471
|
+
return {
|
|
2472
|
+
kind: "configured",
|
|
2473
|
+
config: configuredConfig,
|
|
2474
|
+
selectedPresets: configuredConfig.selectedPresetIds.map(getVerticalPresetDefinition)
|
|
2475
|
+
};
|
|
2476
|
+
}
|
|
1938
2477
|
z.object({
|
|
1939
2478
|
formulaVersion: z.literal("managed-domain-overage-v1"),
|
|
1940
2479
|
conversionRule: z.literal("usd-to-gbp-1-to-1-v1"),
|
|
@@ -3847,6 +4386,12 @@ const opaqueButtonColourTokenSchema = themeColorTokenSchema.refine((value) => pa
|
|
|
3847
4386
|
if (token === null) throw new Error("Invariant: opaque button token passed its schema");
|
|
3848
4387
|
return token;
|
|
3849
4388
|
});
|
|
4389
|
+
const contextualButtonHoverSchema = z.strictObject({
|
|
4390
|
+
kind: z.literal("shade-shift"),
|
|
4391
|
+
seedToken: opaqueButtonColourTokenSchema,
|
|
4392
|
+
fallbackDirection: z.enum(["lighter", "darker"]),
|
|
4393
|
+
preferredToken: opaqueButtonColourTokenSchema.optional()
|
|
4394
|
+
});
|
|
3850
4395
|
const buttonShadeAmountSchema = z.number().finite().min(0).max(900).multipleOf(100);
|
|
3851
4396
|
const buttonShadowIntensitySchema = z.enum([
|
|
3852
4397
|
"subtle",
|
|
@@ -4186,6 +4731,7 @@ const buttonVariantSchema = z.strictObject({
|
|
|
4186
4731
|
shadow: variantShadowSchema.optional(),
|
|
4187
4732
|
border: buttonBorderSchema.optional(),
|
|
4188
4733
|
hoverBackgroundToken: opaqueButtonColourTokenSchema.optional(),
|
|
4734
|
+
contextualHover: contextualButtonHoverSchema.optional(),
|
|
4189
4735
|
effects: variantEffectsSchema.optional(),
|
|
4190
4736
|
sizes: variantSizeOverridesSchema.optional(),
|
|
4191
4737
|
affordance: buttonVariantAffordanceSchema.optional()
|
|
@@ -4458,6 +5004,139 @@ function validateButtonTextContrast(input) {
|
|
|
4458
5004
|
};
|
|
4459
5005
|
}
|
|
4460
5006
|
//#endregion
|
|
5007
|
+
//#region ../theme-core/src/buttons/contextualHover.ts
|
|
5008
|
+
function resolveContextualHoverPreference(input) {
|
|
5009
|
+
const preferred = input.instruction.preferredToken;
|
|
5010
|
+
if (preferred && isSafeCandidate(preferred, input.palette, input.surface)) return {
|
|
5011
|
+
kind: "resolved",
|
|
5012
|
+
token: preferred,
|
|
5013
|
+
repair: null
|
|
5014
|
+
};
|
|
5015
|
+
const contextual = resolveContextualHover(input);
|
|
5016
|
+
return contextual.kind === "resolved" ? {
|
|
5017
|
+
kind: "resolved",
|
|
5018
|
+
token: contextual.token,
|
|
5019
|
+
repair: preferred ? {
|
|
5020
|
+
kind: "preferred-token-replaced",
|
|
5021
|
+
preferredToken: preferred,
|
|
5022
|
+
contextualToken: contextual.token
|
|
5023
|
+
} : null
|
|
5024
|
+
} : contextual;
|
|
5025
|
+
}
|
|
5026
|
+
/**
|
|
5027
|
+
* Resolves semantic shade movement from real palette steps. The persisted
|
|
5028
|
+
* instruction owns the colour family and deterministic unknown-surface
|
|
5029
|
+
* fallback; a proven surface may select the opposite direction when it gives
|
|
5030
|
+
* the button stronger separation while retaining the shared contrast contract.
|
|
5031
|
+
*/
|
|
5032
|
+
function resolveContextualHover(input) {
|
|
5033
|
+
const candidates = shadeCandidates(input.instruction.seedToken, input.palette);
|
|
5034
|
+
if (candidates.length === 0) return {
|
|
5035
|
+
kind: "unavailable",
|
|
5036
|
+
reason: "no-distinct-shade"
|
|
5037
|
+
};
|
|
5038
|
+
const textSafe = candidates.filter((candidate) => hasSafeTextContrast(candidate.token, input.palette));
|
|
5039
|
+
if (textSafe.length === 0) return {
|
|
5040
|
+
kind: "unavailable",
|
|
5041
|
+
reason: "no-text-safe-candidate"
|
|
5042
|
+
};
|
|
5043
|
+
if (!input.surface) {
|
|
5044
|
+
const selected = textSafe.find((candidate) => candidate.direction === input.instruction.fallbackDirection) ?? textSafe[0];
|
|
5045
|
+
return selected ? {
|
|
5046
|
+
kind: "resolved",
|
|
5047
|
+
token: selected.token,
|
|
5048
|
+
direction: selected.direction,
|
|
5049
|
+
evidence: "fallback-direction"
|
|
5050
|
+
} : {
|
|
5051
|
+
kind: "unavailable",
|
|
5052
|
+
reason: "no-text-safe-candidate"
|
|
5053
|
+
};
|
|
5054
|
+
}
|
|
5055
|
+
const selected = textSafe.map((candidate) => ({
|
|
5056
|
+
...candidate,
|
|
5057
|
+
surfaceContrast: contrastRatio(input.palette[candidate.token] ?? "", input.surface?.backgroundHex ?? "")
|
|
5058
|
+
})).filter((candidate) => candidate.surfaceContrast !== null && candidate.surfaceContrast >= BUTTON_CONTRAST_POLICY.nonTextMinimumRatio).sort((left, right) => {
|
|
5059
|
+
const distanceDifference = left.distance - right.distance;
|
|
5060
|
+
if (distanceDifference !== 0) return distanceDifference;
|
|
5061
|
+
const contrastDifference = (right.surfaceContrast ?? 0) - (left.surfaceContrast ?? 0);
|
|
5062
|
+
if (contrastDifference !== 0) return contrastDifference;
|
|
5063
|
+
if (left.direction === right.direction) return left.token.localeCompare(right.token);
|
|
5064
|
+
return left.direction === input.instruction.fallbackDirection ? -1 : 1;
|
|
5065
|
+
})[0];
|
|
5066
|
+
return selected ? {
|
|
5067
|
+
kind: "resolved",
|
|
5068
|
+
token: selected.token,
|
|
5069
|
+
direction: selected.direction,
|
|
5070
|
+
evidence: "known-surface"
|
|
5071
|
+
} : {
|
|
5072
|
+
kind: "unavailable",
|
|
5073
|
+
reason: "no-surface-safe-candidate"
|
|
5074
|
+
};
|
|
5075
|
+
}
|
|
5076
|
+
function shadeCandidates(seedToken, palette) {
|
|
5077
|
+
const match = String(seedToken).match(/^(.*?)(?:-(\d{2,3}))?$/);
|
|
5078
|
+
const family = match?.[1] ?? String(seedToken);
|
|
5079
|
+
const currentShade = match?.[2] ? Number(match[2]) : 500;
|
|
5080
|
+
const seedHex = palette[seedToken];
|
|
5081
|
+
const shades = Object.keys(palette).flatMap((token) => {
|
|
5082
|
+
const shade = token.match(new RegExp(`^${escapeRegExp(family)}-(\\d{2,3})$`));
|
|
5083
|
+
return shade?.[1] ? [Number(shade[1])] : [];
|
|
5084
|
+
}).filter((shade) => Number.isFinite(shade)).sort((left, right) => left - right);
|
|
5085
|
+
const lower = [...shades].filter((shade) => shade < currentShade).sort((left, right) => right - left);
|
|
5086
|
+
const higher = shades.filter((shade) => shade > currentShade);
|
|
5087
|
+
return [...lower.map((shade) => candidate(family, shade, currentShade, "lighter", seedHex, palette)), ...higher.map((shade) => candidate(family, shade, currentShade, "darker", seedHex, palette))].filter((value) => value !== null);
|
|
5088
|
+
}
|
|
5089
|
+
function candidate(family, shade, currentShade, direction, seedHex, palette) {
|
|
5090
|
+
const token = parseOpaqueButtonColourToken(`${family}-${shade}`);
|
|
5091
|
+
if (token === null) return null;
|
|
5092
|
+
const candidateHex = palette[token];
|
|
5093
|
+
if (!candidateHex || candidateHex === seedHex) return null;
|
|
5094
|
+
return {
|
|
5095
|
+
token,
|
|
5096
|
+
direction,
|
|
5097
|
+
distance: Math.abs(shade - currentShade),
|
|
5098
|
+
surfaceContrast: null
|
|
5099
|
+
};
|
|
5100
|
+
}
|
|
5101
|
+
function hasSafeTextContrast(token, palette) {
|
|
5102
|
+
const background = palette[token];
|
|
5103
|
+
const foreground = palette[onColorTokenName(token)];
|
|
5104
|
+
return typeof background === "string" && typeof foreground === "string" && contrastRatio(background, foreground) >= BUTTON_CONTRAST_POLICY.textMinimumRatio;
|
|
5105
|
+
}
|
|
5106
|
+
function isSafeCandidate(token, palette, surface) {
|
|
5107
|
+
if (!hasSafeTextContrast(token, palette)) return false;
|
|
5108
|
+
return surface ? contrastRatio(palette[token] ?? "", surface.backgroundHex) >= BUTTON_CONTRAST_POLICY.nonTextMinimumRatio : true;
|
|
5109
|
+
}
|
|
5110
|
+
function escapeRegExp(value) {
|
|
5111
|
+
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
5112
|
+
}
|
|
5113
|
+
//#endregion
|
|
5114
|
+
//#region ../theme-core/src/buttons/resolveButtonHoverTreatment.ts
|
|
5115
|
+
function resolveButtonHoverTreatment(input) {
|
|
5116
|
+
if (input.variant.contextualHover) {
|
|
5117
|
+
const contextual = resolveContextualHoverPreference({
|
|
5118
|
+
instruction: input.variant.contextualHover,
|
|
5119
|
+
palette: input.palette,
|
|
5120
|
+
surface: input.surface
|
|
5121
|
+
});
|
|
5122
|
+
if (contextual.kind === "resolved") return {
|
|
5123
|
+
treatment: {
|
|
5124
|
+
type: "solid",
|
|
5125
|
+
colorToken: contextual.token
|
|
5126
|
+
},
|
|
5127
|
+
repair: contextual.repair
|
|
5128
|
+
};
|
|
5129
|
+
}
|
|
5130
|
+
const token = input.variant.hoverBackgroundToken ?? (input.global.hoverColor === "token" ? input.global.hoverColorToken : void 0);
|
|
5131
|
+
return {
|
|
5132
|
+
treatment: token === void 0 ? input.fallback : {
|
|
5133
|
+
type: "solid",
|
|
5134
|
+
colorToken: token
|
|
5135
|
+
},
|
|
5136
|
+
repair: null
|
|
5137
|
+
};
|
|
5138
|
+
}
|
|
5139
|
+
//#endregion
|
|
4461
5140
|
//#region ../theme-core/src/buttons/resolveButtonColourStates.ts
|
|
4462
5141
|
function compileButtonColourStates(input) {
|
|
4463
5142
|
const baseTransition = applyColourEffects({
|
|
@@ -4468,9 +5147,16 @@ function compileButtonColourStates(input) {
|
|
|
4468
5147
|
palette: input.palette
|
|
4469
5148
|
});
|
|
4470
5149
|
if (!baseTransition.ok) return baseTransition;
|
|
5150
|
+
const hover = resolveButtonHoverTreatment({
|
|
5151
|
+
variant: input.variant,
|
|
5152
|
+
global: input.global,
|
|
5153
|
+
fallback: baseTransition.treatment,
|
|
5154
|
+
palette: input.palette,
|
|
5155
|
+
surface: input.surface
|
|
5156
|
+
});
|
|
4471
5157
|
const stateTreatments = {
|
|
4472
5158
|
base: baseTransition.treatment,
|
|
4473
|
-
hover:
|
|
5159
|
+
hover: hover.treatment,
|
|
4474
5160
|
focus: baseTransition.treatment,
|
|
4475
5161
|
active: baseTransition.treatment,
|
|
4476
5162
|
disabled: baseTransition.treatment
|
|
@@ -4509,14 +5195,8 @@ function compileButtonColourStates(input) {
|
|
|
4509
5195
|
ok: true,
|
|
4510
5196
|
states: resolved,
|
|
4511
5197
|
focusIndicator: resolveFocusIndicator(resolved.focus),
|
|
4512
|
-
nonColourEffects
|
|
4513
|
-
|
|
4514
|
-
}
|
|
4515
|
-
function hoverTreatment(variant, global, fallback) {
|
|
4516
|
-
const token = variant.hoverBackgroundToken ?? (global.hoverColor === "token" ? global.hoverColorToken : void 0);
|
|
4517
|
-
return token === void 0 ? fallback : {
|
|
4518
|
-
type: "solid",
|
|
4519
|
-
colorToken: token
|
|
5198
|
+
nonColourEffects,
|
|
5199
|
+
contextualHoverRepair: hover.repair
|
|
4520
5200
|
};
|
|
4521
5201
|
}
|
|
4522
5202
|
function applyColourEffects(input) {
|
|
@@ -5327,13 +6007,24 @@ function resolveContextualButtonRole(input) {
|
|
|
5327
6007
|
};
|
|
5328
6008
|
const rejected = [];
|
|
5329
6009
|
const preferred = compileCandidate(requested, input.buttonSystem, input.palette, input.surface);
|
|
5330
|
-
if (preferred.ok)
|
|
5331
|
-
|
|
5332
|
-
|
|
5333
|
-
|
|
5334
|
-
|
|
5335
|
-
|
|
5336
|
-
|
|
6010
|
+
if (preferred.ok) {
|
|
6011
|
+
if (preferred.contextualHoverRepair) return {
|
|
6012
|
+
kind: "repaired",
|
|
6013
|
+
requestedRole: input.role,
|
|
6014
|
+
candidate: "contextual-hover",
|
|
6015
|
+
states: preferred.states,
|
|
6016
|
+
focusIndicator: preferred.focusIndicator,
|
|
6017
|
+
boundary: boundaryForVariant(requested),
|
|
6018
|
+
rejectedCandidates: []
|
|
6019
|
+
};
|
|
6020
|
+
return {
|
|
6021
|
+
kind: "preferred",
|
|
6022
|
+
requestedRole: input.role,
|
|
6023
|
+
states: preferred.states,
|
|
6024
|
+
focusIndicator: preferred.focusIndicator,
|
|
6025
|
+
boundary: boundaryForVariant(requested)
|
|
6026
|
+
};
|
|
6027
|
+
}
|
|
5337
6028
|
rejected.push({
|
|
5338
6029
|
candidate: "preferred",
|
|
5339
6030
|
error: preferred.error
|
|
@@ -5453,6 +6144,7 @@ function candidateVariant(fallback, requested, system) {
|
|
|
5453
6144
|
},
|
|
5454
6145
|
border: { widthClass: "border" },
|
|
5455
6146
|
hoverBackgroundToken: void 0,
|
|
6147
|
+
contextualHover: void 0,
|
|
5456
6148
|
effects: void 0
|
|
5457
6149
|
},
|
|
5458
6150
|
boundary: {
|
|
@@ -5564,13 +6256,7 @@ function readNonEmptyString(value) {
|
|
|
5564
6256
|
buttonSizeNameSchema.options;
|
|
5565
6257
|
//#endregion
|
|
5566
6258
|
//#region ../theme-core/src/buttons/styles/domain.ts
|
|
5567
|
-
const PUBLIC_BUTTON_ROLES =
|
|
5568
|
-
"primary",
|
|
5569
|
-
"secondary",
|
|
5570
|
-
"outline",
|
|
5571
|
-
"ghost",
|
|
5572
|
-
"accent"
|
|
5573
|
-
];
|
|
6259
|
+
const PUBLIC_BUTTON_ROLES = VARIANT_ROLES;
|
|
5574
6260
|
function defineButtonStyleRecipe(recipe) {
|
|
5575
6261
|
return recipe;
|
|
5576
6262
|
}
|
|
@@ -5666,6 +6352,14 @@ const BUTTON_STYLE_IDS = [
|
|
|
5666
6352
|
"quiet-arrow"
|
|
5667
6353
|
];
|
|
5668
6354
|
const quietArrowParametersSchema = z.object({ secondaryTreatment: z.enum(["outlined", "solid-accent"]) }).strict();
|
|
6355
|
+
const flatInkHoverTreatmentSchema = z.enum([
|
|
6356
|
+
"contextual",
|
|
6357
|
+
"secondary",
|
|
6358
|
+
"accent"
|
|
6359
|
+
]);
|
|
6360
|
+
const flatInkHoverPreferencesShape = Object.fromEntries(VARIANT_ROLES.map((role) => [role, flatInkHoverTreatmentSchema.optional()]));
|
|
6361
|
+
const flatInkHoverPreferencesSchema = z.strictObject(flatInkHoverPreferencesShape);
|
|
6362
|
+
const flatInkParametersSchema = z.strictObject({ hoverPreferences: flatInkHoverPreferencesSchema.optional() });
|
|
5669
6363
|
const emptyParametersSchema$1 = z.object({}).strict();
|
|
5670
6364
|
function selectionBranch(styleId, parameters) {
|
|
5671
6365
|
return z.object({
|
|
@@ -5680,7 +6374,7 @@ const buttonStyleSelectionSchema = z.discriminatedUnion("styleId", [
|
|
|
5680
6374
|
selectionBranch("editorial-link", emptyParametersSchema$1),
|
|
5681
6375
|
selectionBranch("pebble", emptyParametersSchema$1),
|
|
5682
6376
|
selectionBranch("ink-stamp", emptyParametersSchema$1),
|
|
5683
|
-
selectionBranch("flat-ink",
|
|
6377
|
+
selectionBranch("flat-ink", flatInkParametersSchema),
|
|
5684
6378
|
selectionBranch("brushed-wash", emptyParametersSchema$1),
|
|
5685
6379
|
selectionBranch("showtime-pill", emptyParametersSchema$1),
|
|
5686
6380
|
selectionBranch("joy-stamp", emptyParametersSchema$1),
|
|
@@ -5817,6 +6511,189 @@ const quietArrowRecipe = defineButtonStyleRecipe({
|
|
|
5817
6511
|
})
|
|
5818
6512
|
});
|
|
5819
6513
|
//#endregion
|
|
6514
|
+
//#region ../theme-core/src/buttons/styles/recipes/flatInk.ts
|
|
6515
|
+
const contextualRoleConfig = {
|
|
6516
|
+
primary: {
|
|
6517
|
+
contextualSeedToken: unsafeAsOpaqueButtonColourToken("primary"),
|
|
6518
|
+
fallbackDirection: "darker"
|
|
6519
|
+
},
|
|
6520
|
+
secondary: {
|
|
6521
|
+
contextualSeedToken: unsafeAsOpaqueButtonColourToken("surfaceAlt"),
|
|
6522
|
+
fallbackDirection: "darker"
|
|
6523
|
+
},
|
|
6524
|
+
outline: {
|
|
6525
|
+
contextualSeedToken: unsafeAsOpaqueButtonColourToken("surfaceAlt"),
|
|
6526
|
+
fallbackDirection: "darker"
|
|
6527
|
+
},
|
|
6528
|
+
ghost: {
|
|
6529
|
+
contextualSeedToken: unsafeAsOpaqueButtonColourToken("surfaceAlt"),
|
|
6530
|
+
fallbackDirection: "darker"
|
|
6531
|
+
},
|
|
6532
|
+
accent: {
|
|
6533
|
+
contextualSeedToken: unsafeAsOpaqueButtonColourToken("accent"),
|
|
6534
|
+
fallbackDirection: "darker"
|
|
6535
|
+
}
|
|
6536
|
+
};
|
|
6537
|
+
const hoverControl = {
|
|
6538
|
+
kind: "button-hover-by-role",
|
|
6539
|
+
parameter: "hoverPreferences",
|
|
6540
|
+
label: "Button hover",
|
|
6541
|
+
roles: contextualRoleConfig,
|
|
6542
|
+
options: [
|
|
6543
|
+
{
|
|
6544
|
+
value: "contextual",
|
|
6545
|
+
label: "Contextual shade shift"
|
|
6546
|
+
},
|
|
6547
|
+
{
|
|
6548
|
+
value: "secondary",
|
|
6549
|
+
label: "Secondary button colour"
|
|
6550
|
+
},
|
|
6551
|
+
{
|
|
6552
|
+
value: "accent",
|
|
6553
|
+
label: "Accent button colour"
|
|
6554
|
+
}
|
|
6555
|
+
]
|
|
6556
|
+
};
|
|
6557
|
+
const lift = { effectId: "lift" };
|
|
6558
|
+
const flatInkRecipe = defineButtonStyleRecipe({
|
|
6559
|
+
id: "flat-ink",
|
|
6560
|
+
accessibilityLabel: "Flat rounded buttons with arrow affordances",
|
|
6561
|
+
tags: {
|
|
6562
|
+
tone: "classic",
|
|
6563
|
+
energy: "calm",
|
|
6564
|
+
motion: "subtle",
|
|
6565
|
+
era: "editorial"
|
|
6566
|
+
},
|
|
6567
|
+
parameterSchema: flatInkParametersSchema,
|
|
6568
|
+
defaultParameters: {},
|
|
6569
|
+
controls: [hoverControl],
|
|
6570
|
+
defineSystem: (parameters) => ({
|
|
6571
|
+
global: {
|
|
6572
|
+
cornerStyle: "rounded",
|
|
6573
|
+
textTransform: "none",
|
|
6574
|
+
fontWeight: 600,
|
|
6575
|
+
typography: "body",
|
|
6576
|
+
letterSpacing: "tight",
|
|
6577
|
+
paddingPreset: "default",
|
|
6578
|
+
hoverTransform: "lift",
|
|
6579
|
+
hoverColor: "none"
|
|
6580
|
+
},
|
|
6581
|
+
sizes: {
|
|
6582
|
+
sm: {
|
|
6583
|
+
padding: "0.625rem 1.125rem",
|
|
6584
|
+
fontSize: "text-sm"
|
|
6585
|
+
},
|
|
6586
|
+
md: { padding: "0.8125rem 1.375rem" },
|
|
6587
|
+
lg: {
|
|
6588
|
+
padding: "0.9375rem 1.625rem",
|
|
6589
|
+
fontSize: "text-lg"
|
|
6590
|
+
},
|
|
6591
|
+
xl: {
|
|
6592
|
+
padding: "1.0625rem 2rem",
|
|
6593
|
+
fontSize: "text-xl"
|
|
6594
|
+
}
|
|
6595
|
+
},
|
|
6596
|
+
roles: {
|
|
6597
|
+
primary: {
|
|
6598
|
+
kind: "complete",
|
|
6599
|
+
appearance: {
|
|
6600
|
+
background: {
|
|
6601
|
+
type: "solid",
|
|
6602
|
+
colorToken: unsafeAsOpaqueButtonColourToken("primary")
|
|
6603
|
+
},
|
|
6604
|
+
borderRadius: "rounded-lg",
|
|
6605
|
+
affordance: { iconId: "ArrowRight" },
|
|
6606
|
+
...hoverAppearance("primary", parameters, [lift, {
|
|
6607
|
+
effectId: "background-on-hover",
|
|
6608
|
+
options: { colorToken: unsafeAsOpaqueButtonColourToken("secondary") }
|
|
6609
|
+
}])
|
|
6610
|
+
}
|
|
6611
|
+
},
|
|
6612
|
+
secondary: {
|
|
6613
|
+
kind: "complete",
|
|
6614
|
+
appearance: {
|
|
6615
|
+
background: {
|
|
6616
|
+
type: "surface",
|
|
6617
|
+
role: "link"
|
|
6618
|
+
},
|
|
6619
|
+
borderRadius: "rounded-lg",
|
|
6620
|
+
border: { widthClass: "border" },
|
|
6621
|
+
...hoverAppearance("secondary", parameters, [lift, {
|
|
6622
|
+
effectId: "background-on-hover",
|
|
6623
|
+
options: { colorToken: unsafeAsOpaqueButtonColourToken("surfaceAlt") }
|
|
6624
|
+
}])
|
|
6625
|
+
}
|
|
6626
|
+
},
|
|
6627
|
+
outline: {
|
|
6628
|
+
kind: "complete",
|
|
6629
|
+
appearance: {
|
|
6630
|
+
background: {
|
|
6631
|
+
type: "surface",
|
|
6632
|
+
role: "link"
|
|
6633
|
+
},
|
|
6634
|
+
borderRadius: "rounded-lg",
|
|
6635
|
+
border: { widthClass: "border" },
|
|
6636
|
+
...hoverAppearance("outline", parameters, [lift, {
|
|
6637
|
+
effectId: "background-on-hover",
|
|
6638
|
+
options: { colorToken: unsafeAsOpaqueButtonColourToken("surfaceAlt") }
|
|
6639
|
+
}])
|
|
6640
|
+
}
|
|
6641
|
+
},
|
|
6642
|
+
ghost: {
|
|
6643
|
+
kind: "complete",
|
|
6644
|
+
appearance: {
|
|
6645
|
+
background: {
|
|
6646
|
+
type: "surface",
|
|
6647
|
+
role: "link"
|
|
6648
|
+
},
|
|
6649
|
+
borderRadius: "rounded-lg",
|
|
6650
|
+
...hoverAppearance("ghost", parameters, [lift])
|
|
6651
|
+
}
|
|
6652
|
+
},
|
|
6653
|
+
accent: {
|
|
6654
|
+
kind: "complete",
|
|
6655
|
+
appearance: {
|
|
6656
|
+
background: {
|
|
6657
|
+
type: "solid",
|
|
6658
|
+
colorToken: unsafeAsOpaqueButtonColourToken("accent")
|
|
6659
|
+
},
|
|
6660
|
+
borderRadius: "rounded-lg",
|
|
6661
|
+
affordance: { iconId: "ArrowRight" },
|
|
6662
|
+
...hoverAppearance("accent", parameters, [lift])
|
|
6663
|
+
}
|
|
6664
|
+
}
|
|
6665
|
+
}
|
|
6666
|
+
})
|
|
6667
|
+
});
|
|
6668
|
+
function hoverAppearance(role, parameters, recommended) {
|
|
6669
|
+
const preference = parameters.hoverPreferences?.[role];
|
|
6670
|
+
if (preference === void 0) return { effects: { hover: [...recommended] } };
|
|
6671
|
+
if (preference === "contextual") {
|
|
6672
|
+
const config = contextualRoleConfig[role];
|
|
6673
|
+
return {
|
|
6674
|
+
effects: { hover: [lift] },
|
|
6675
|
+
contextualHover: {
|
|
6676
|
+
kind: "shade-shift",
|
|
6677
|
+
seedToken: config.contextualSeedToken,
|
|
6678
|
+
fallbackDirection: config.fallbackDirection
|
|
6679
|
+
}
|
|
6680
|
+
};
|
|
6681
|
+
}
|
|
6682
|
+
const config = contextualRoleConfig[role];
|
|
6683
|
+
return {
|
|
6684
|
+
effects: { hover: [lift] },
|
|
6685
|
+
contextualHover: {
|
|
6686
|
+
kind: "shade-shift",
|
|
6687
|
+
seedToken: config.contextualSeedToken,
|
|
6688
|
+
fallbackDirection: config.fallbackDirection,
|
|
6689
|
+
preferredToken: unsafeAsOpaqueButtonColourToken(paletteRole(preference))
|
|
6690
|
+
}
|
|
6691
|
+
};
|
|
6692
|
+
}
|
|
6693
|
+
function paletteRole(preference) {
|
|
6694
|
+
return preference;
|
|
6695
|
+
}
|
|
6696
|
+
//#endregion
|
|
5820
6697
|
//#region ../theme-core/src/buttons/styles/recipes/defineStaticButtonStyleRecipe.ts
|
|
5821
6698
|
const emptyParametersSchema = z.object({}).strict();
|
|
5822
6699
|
function defineStaticButtonStyleRecipe(input) {
|
|
@@ -6663,113 +7540,6 @@ const inkStampRecipe = defineStaticButtonStyleRecipe({
|
|
|
6663
7540
|
}
|
|
6664
7541
|
}
|
|
6665
7542
|
});
|
|
6666
|
-
const flatInkRecipe = defineStaticButtonStyleRecipe({
|
|
6667
|
-
id: "flat-ink",
|
|
6668
|
-
accessibilityLabel: "Flat rounded buttons with arrow affordances",
|
|
6669
|
-
tags: {
|
|
6670
|
-
tone: "classic",
|
|
6671
|
-
energy: "calm",
|
|
6672
|
-
motion: "subtle",
|
|
6673
|
-
era: "editorial"
|
|
6674
|
-
},
|
|
6675
|
-
system: {
|
|
6676
|
-
global: {
|
|
6677
|
-
cornerStyle: "rounded",
|
|
6678
|
-
textTransform: "none",
|
|
6679
|
-
fontWeight: 600,
|
|
6680
|
-
typography: "body",
|
|
6681
|
-
letterSpacing: "tight",
|
|
6682
|
-
paddingPreset: "default",
|
|
6683
|
-
hoverTransform: "lift",
|
|
6684
|
-
hoverColor: "none"
|
|
6685
|
-
},
|
|
6686
|
-
sizes: {
|
|
6687
|
-
sm: {
|
|
6688
|
-
padding: "0.625rem 1.125rem",
|
|
6689
|
-
fontSize: "text-sm"
|
|
6690
|
-
},
|
|
6691
|
-
md: { padding: "0.8125rem 1.375rem" },
|
|
6692
|
-
lg: {
|
|
6693
|
-
padding: "0.9375rem 1.625rem",
|
|
6694
|
-
fontSize: "text-lg"
|
|
6695
|
-
},
|
|
6696
|
-
xl: {
|
|
6697
|
-
padding: "1.0625rem 2rem",
|
|
6698
|
-
fontSize: "text-xl"
|
|
6699
|
-
}
|
|
6700
|
-
},
|
|
6701
|
-
roles: {
|
|
6702
|
-
primary: {
|
|
6703
|
-
kind: "complete",
|
|
6704
|
-
appearance: {
|
|
6705
|
-
background: {
|
|
6706
|
-
type: "solid",
|
|
6707
|
-
colorToken: "primary"
|
|
6708
|
-
},
|
|
6709
|
-
borderRadius: "rounded-lg",
|
|
6710
|
-
affordance: { iconId: "ArrowRight" },
|
|
6711
|
-
effects: { hover: [{ effectId: "lift" }, {
|
|
6712
|
-
effectId: "background-on-hover",
|
|
6713
|
-
options: { colorToken: unsafeAsOpaqueButtonColourToken("secondary") }
|
|
6714
|
-
}] }
|
|
6715
|
-
}
|
|
6716
|
-
},
|
|
6717
|
-
secondary: {
|
|
6718
|
-
kind: "complete",
|
|
6719
|
-
appearance: {
|
|
6720
|
-
background: {
|
|
6721
|
-
type: "surface",
|
|
6722
|
-
role: "link"
|
|
6723
|
-
},
|
|
6724
|
-
borderRadius: "rounded-lg",
|
|
6725
|
-
border: { widthClass: "border" },
|
|
6726
|
-
effects: { hover: [{ effectId: "lift" }, {
|
|
6727
|
-
effectId: "background-on-hover",
|
|
6728
|
-
options: { colorToken: unsafeAsOpaqueButtonColourToken("surfaceAlt") }
|
|
6729
|
-
}] }
|
|
6730
|
-
}
|
|
6731
|
-
},
|
|
6732
|
-
outline: {
|
|
6733
|
-
kind: "complete",
|
|
6734
|
-
appearance: {
|
|
6735
|
-
background: {
|
|
6736
|
-
type: "surface",
|
|
6737
|
-
role: "link"
|
|
6738
|
-
},
|
|
6739
|
-
borderRadius: "rounded-lg",
|
|
6740
|
-
border: { widthClass: "border" },
|
|
6741
|
-
effects: { hover: [{ effectId: "lift" }, {
|
|
6742
|
-
effectId: "background-on-hover",
|
|
6743
|
-
options: { colorToken: unsafeAsOpaqueButtonColourToken("surfaceAlt") }
|
|
6744
|
-
}] }
|
|
6745
|
-
}
|
|
6746
|
-
},
|
|
6747
|
-
ghost: {
|
|
6748
|
-
kind: "complete",
|
|
6749
|
-
appearance: {
|
|
6750
|
-
background: {
|
|
6751
|
-
type: "surface",
|
|
6752
|
-
role: "link"
|
|
6753
|
-
},
|
|
6754
|
-
borderRadius: "rounded-lg",
|
|
6755
|
-
effects: { hover: [{ effectId: "lift" }] }
|
|
6756
|
-
}
|
|
6757
|
-
},
|
|
6758
|
-
accent: {
|
|
6759
|
-
kind: "complete",
|
|
6760
|
-
appearance: {
|
|
6761
|
-
background: {
|
|
6762
|
-
type: "solid",
|
|
6763
|
-
colorToken: "accent"
|
|
6764
|
-
},
|
|
6765
|
-
borderRadius: "rounded-lg",
|
|
6766
|
-
affordance: { iconId: "ArrowRight" },
|
|
6767
|
-
effects: { hover: [{ effectId: "lift" }] }
|
|
6768
|
-
}
|
|
6769
|
-
}
|
|
6770
|
-
}
|
|
6771
|
-
}
|
|
6772
|
-
});
|
|
6773
7543
|
const showtimePillRecipe = defineStaticButtonStyleRecipe({
|
|
6774
7544
|
id: "showtime-pill",
|
|
6775
7545
|
accessibilityLabel: "Bold uppercase pill buttons with playful movement",
|
|
@@ -7191,8 +7961,8 @@ const openCardRoleValue = "open";
|
|
|
7191
7961
|
*/
|
|
7192
7962
|
const surfaceCardRoleValues = [...cardVariantRoleValues, openCardRoleValue];
|
|
7193
7963
|
/**
|
|
7194
|
-
* The closed
|
|
7195
|
-
*
|
|
7964
|
+
* The closed role vocabulary Looks and blocks use for surfaced and boxless
|
|
7965
|
+
* card choices.
|
|
7196
7966
|
*
|
|
7197
7967
|
* - `none` — no site-style card surface; the block's own composition and
|
|
7198
7968
|
* the author's own card fields govern the item. This is *not*
|
|
@@ -7204,11 +7974,6 @@ const surfaceCardRoleValues = [...cardVariantRoleValues, openCardRoleValue];
|
|
|
7204
7974
|
* - `alternative` — the statement card carrying the site's personality
|
|
7205
7975
|
*/
|
|
7206
7976
|
const cardRoleValues = [...surfaceCardRoleValues, boxlessCardVariantValue];
|
|
7207
|
-
const legacyCardVariantRoleAliases = {
|
|
7208
|
-
variant1: "alternative",
|
|
7209
|
-
variant2: "alternative",
|
|
7210
|
-
statement: "alternative"
|
|
7211
|
-
};
|
|
7212
7977
|
const cardSpacingSchema = z.enum([
|
|
7213
7978
|
"none",
|
|
7214
7979
|
"compact",
|
|
@@ -7238,33 +8003,21 @@ const gradientDirectionSchema = z.enum([
|
|
|
7238
8003
|
"to-br",
|
|
7239
8004
|
"to-bl"
|
|
7240
8005
|
]);
|
|
7241
|
-
|
|
8006
|
+
z.enum(cardVariantRoleValues);
|
|
7242
8007
|
const surfaceCardRoleSchema = z.enum(surfaceCardRoleValues);
|
|
7243
8008
|
const cardRoleSchema = z.enum(cardRoleValues);
|
|
7244
|
-
/**
|
|
7245
|
-
* Historical name for the role vocabulary as it reaches box styles. Widened to
|
|
7246
|
-
* the full `CardRole` set — old values keep parsing, `open` now parses too.
|
|
7247
|
-
*/
|
|
7248
|
-
const boxStylesCardVariantSchema = cardRoleSchema;
|
|
7249
8009
|
function isCardVariantRole(value) {
|
|
7250
8010
|
return typeof value === "string" && cardVariantRoleValues.includes(value);
|
|
7251
8011
|
}
|
|
7252
8012
|
function normalizeCardVariantRole(value) {
|
|
7253
|
-
|
|
7254
|
-
if (typeof value !== "string") return null;
|
|
7255
|
-
return legacyCardVariantRoleAliases[value] ?? null;
|
|
8013
|
+
return isCardVariantRole(value) ? value : null;
|
|
7256
8014
|
}
|
|
7257
|
-
/**
|
|
7258
|
-
* The one untrusted-input boundary for the role vocabulary. Legacy alias values
|
|
7259
|
-
* (`variant1`, `variant2`, `statement`) normalize here and nowhere else.
|
|
7260
|
-
*/
|
|
8015
|
+
/** The one untrusted-input boundary for the closed role vocabulary. */
|
|
7261
8016
|
function normalizeCardRole(value) {
|
|
7262
8017
|
if (value === "none") return boxlessCardVariantValue;
|
|
7263
8018
|
if (value === "open") return openCardRoleValue;
|
|
7264
8019
|
return normalizeCardVariantRole(value);
|
|
7265
8020
|
}
|
|
7266
|
-
/** Historical name for {@link normalizeCardRole}. */
|
|
7267
|
-
const normalizeBoxStylesCardVariant = normalizeCardRole;
|
|
7268
8021
|
const PRIORITY_ROLE_INFERENCE = {
|
|
7269
8022
|
1: "default",
|
|
7270
8023
|
2: "alternative"
|
|
@@ -8209,6 +8962,21 @@ const eventListTreatmentValues = [
|
|
|
8209
8962
|
"editorial-register",
|
|
8210
8963
|
"dense-index"
|
|
8211
8964
|
];
|
|
8965
|
+
const testimonialsCompositionTreatmentValues = [
|
|
8966
|
+
"open-editorial",
|
|
8967
|
+
"evergreen-lead",
|
|
8968
|
+
"room-and-response",
|
|
8969
|
+
"open-floor"
|
|
8970
|
+
];
|
|
8971
|
+
/**
|
|
8972
|
+
* How an offerings preview arranges its groups. Structure only — the group
|
|
8973
|
+
* card surface is the Look's `cardRole` and the site style's card system.
|
|
8974
|
+
*/
|
|
8975
|
+
const offeringsPreviewCompositionTreatmentValues = [
|
|
8976
|
+
"paired-feature-cards",
|
|
8977
|
+
"open-editorial-columns",
|
|
8978
|
+
"joined-programme-panel"
|
|
8979
|
+
];
|
|
8212
8980
|
const eyebrowTreatmentValues = [
|
|
8213
8981
|
"plain",
|
|
8214
8982
|
"accent",
|
|
@@ -8742,8 +9510,7 @@ const cardStylesOverrideSchema = z.object({
|
|
|
8742
9510
|
spacing: semanticSpacingSchema.nullable().optional(),
|
|
8743
9511
|
raised: z.boolean().nullable().optional(),
|
|
8744
9512
|
rounded: boxRoundedSchema.nullable().optional(),
|
|
8745
|
-
role: cardRoleSchema.nullable().optional()
|
|
8746
|
-
cardVariant: boxStylesCardVariantSchema.nullable().optional()
|
|
9513
|
+
role: cardRoleSchema.nullable().optional()
|
|
8747
9514
|
});
|
|
8748
9515
|
const blockStyleOverridesSchema = z.object({
|
|
8749
9516
|
sectionStyles: sectionStylesOverrideSchema.nullable().optional(),
|
|
@@ -9632,7 +10399,12 @@ defineBlockAppearancePreset({
|
|
|
9632
10399
|
constraints: { layoutVariantKeys: ["cards"] },
|
|
9633
10400
|
design: {
|
|
9634
10401
|
sectionSurface: "base",
|
|
9635
|
-
contentFrame: plainFrame
|
|
10402
|
+
contentFrame: plainFrame,
|
|
10403
|
+
cardRole: "alternative",
|
|
10404
|
+
composition: {
|
|
10405
|
+
kind: "offerings-preview",
|
|
10406
|
+
treatment: "paired-feature-cards"
|
|
10407
|
+
}
|
|
9636
10408
|
}
|
|
9637
10409
|
}), defineBlockAppearancePreset({
|
|
9638
10410
|
id: "offerings-preview-open-editorial-columns",
|
|
@@ -9642,7 +10414,12 @@ defineBlockAppearancePreset({
|
|
|
9642
10414
|
constraints: { layoutVariantKeys: ["cards"] },
|
|
9643
10415
|
design: {
|
|
9644
10416
|
sectionSurface: "base",
|
|
9645
|
-
contentFrame: plainFrame
|
|
10417
|
+
contentFrame: plainFrame,
|
|
10418
|
+
cardRole: "open",
|
|
10419
|
+
composition: {
|
|
10420
|
+
kind: "offerings-preview",
|
|
10421
|
+
treatment: "open-editorial-columns"
|
|
10422
|
+
}
|
|
9646
10423
|
}
|
|
9647
10424
|
}), defineBlockAppearancePreset({
|
|
9648
10425
|
id: "offerings-preview-joined-programme-panel",
|
|
@@ -9652,7 +10429,12 @@ defineBlockAppearancePreset({
|
|
|
9652
10429
|
constraints: { layoutVariantKeys: ["cards"] },
|
|
9653
10430
|
design: {
|
|
9654
10431
|
sectionSurface: "base",
|
|
9655
|
-
contentFrame: plainFrame
|
|
10432
|
+
contentFrame: plainFrame,
|
|
10433
|
+
cardRole: "default",
|
|
10434
|
+
composition: {
|
|
10435
|
+
kind: "offerings-preview",
|
|
10436
|
+
treatment: "joined-programme-panel"
|
|
10437
|
+
}
|
|
9656
10438
|
}
|
|
9657
10439
|
}), defineBlockAppearancePreset({
|
|
9658
10440
|
id: "feature-cards-raised-rule",
|
|
@@ -9894,7 +10676,11 @@ defineBlockAppearancePreset({
|
|
|
9894
10676
|
constraints: { layoutVariantKeys: ["featured-editorial"] },
|
|
9895
10677
|
design: {
|
|
9896
10678
|
sectionSurface: "base",
|
|
9897
|
-
contentFrame: plainFrame
|
|
10679
|
+
contentFrame: plainFrame,
|
|
10680
|
+
composition: {
|
|
10681
|
+
kind: "testimonials",
|
|
10682
|
+
treatment: "evergreen-lead"
|
|
10683
|
+
}
|
|
9898
10684
|
}
|
|
9899
10685
|
}), defineBlockAppearancePreset({
|
|
9900
10686
|
id: "testimonials-room-and-response",
|
|
@@ -9904,7 +10690,11 @@ defineBlockAppearancePreset({
|
|
|
9904
10690
|
constraints: { layoutVariantKeys: ["featured-editorial"] },
|
|
9905
10691
|
design: {
|
|
9906
10692
|
sectionSurface: "base",
|
|
9907
|
-
contentFrame: plainFrame
|
|
10693
|
+
contentFrame: plainFrame,
|
|
10694
|
+
composition: {
|
|
10695
|
+
kind: "testimonials",
|
|
10696
|
+
treatment: "room-and-response"
|
|
10697
|
+
}
|
|
9908
10698
|
}
|
|
9909
10699
|
}), defineBlockAppearancePreset({
|
|
9910
10700
|
id: "testimonials-open-floor",
|
|
@@ -9914,7 +10704,11 @@ defineBlockAppearancePreset({
|
|
|
9914
10704
|
constraints: { layoutVariantKeys: ["featured-editorial"] },
|
|
9915
10705
|
design: {
|
|
9916
10706
|
sectionSurface: "base",
|
|
9917
|
-
contentFrame: plainFrame
|
|
10707
|
+
contentFrame: plainFrame,
|
|
10708
|
+
composition: {
|
|
10709
|
+
kind: "testimonials",
|
|
10710
|
+
treatment: "open-floor"
|
|
10711
|
+
}
|
|
9918
10712
|
}
|
|
9919
10713
|
}), defineBlockAppearancePreset({
|
|
9920
10714
|
id: "faq-base-accordion",
|
|
@@ -12839,7 +13633,8 @@ const curatedSiteStyles = [
|
|
|
12839
13633
|
buttonStyleChoices: [
|
|
12840
13634
|
buttonChoice("soft-pill"),
|
|
12841
13635
|
buttonChoice("pebble"),
|
|
12842
|
-
buttonChoice("confident-chip")
|
|
13636
|
+
buttonChoice("confident-chip"),
|
|
13637
|
+
buttonChoice("flat-ink")
|
|
12843
13638
|
],
|
|
12844
13639
|
paletteRecommendations: [
|
|
12845
13640
|
paletteRecommendation("soft-natural-sage"),
|
|
@@ -14354,7 +15149,6 @@ const ALLOWED_TRANSFORM_IDS = [
|
|
|
14354
15149
|
"boxStyles.resolveRootStyle",
|
|
14355
15150
|
"boxStyles.semanticGap",
|
|
14356
15151
|
"boxStyles.semanticGapValue",
|
|
14357
|
-
"boxStyles.cardVariantClass",
|
|
14358
15152
|
"containerStyles.resolveBoxClassName"
|
|
14359
15153
|
];
|
|
14360
15154
|
/**
|
|
@@ -15804,8 +16598,41 @@ function containerStylesField(options = {}) {
|
|
|
15804
16598
|
return createBoxStylesFieldWithDepth("container", options);
|
|
15805
16599
|
}
|
|
15806
16600
|
function cardStylesField(options = {}) {
|
|
16601
|
+
if (options.controls === "role-only") return createRoleOnlyCardStylesField(options);
|
|
15807
16602
|
return createBoxStylesFieldWithDepth("card", options);
|
|
15808
16603
|
}
|
|
16604
|
+
function createRoleOnlyCardStylesField(options) {
|
|
16605
|
+
const { id = "_cardStyles", label = "Card styles", renderInHeader, intent } = options;
|
|
16606
|
+
return {
|
|
16607
|
+
id,
|
|
16608
|
+
type: "modal",
|
|
16609
|
+
label,
|
|
16610
|
+
required: false,
|
|
16611
|
+
schema: { fields: [{
|
|
16612
|
+
id: "role",
|
|
16613
|
+
type: "select",
|
|
16614
|
+
label: "Card style",
|
|
16615
|
+
description: "Choose a semantic card style from the active site style.",
|
|
16616
|
+
required: false,
|
|
16617
|
+
multiple: false,
|
|
16618
|
+
defaultValue: "default",
|
|
16619
|
+
options: cardVariantRoleValues.map((value) => ({
|
|
16620
|
+
value,
|
|
16621
|
+
label: value === "default" ? "Default" : "Alternative"
|
|
16622
|
+
}))
|
|
16623
|
+
}] },
|
|
16624
|
+
ui: {
|
|
16625
|
+
...typeof renderInHeader === "boolean" ? { renderInHeader } : {},
|
|
16626
|
+
...intent ? { intent } : {},
|
|
16627
|
+
modalConfig: {
|
|
16628
|
+
buttonLabel: label,
|
|
16629
|
+
description: "Choose the site-style card role.",
|
|
16630
|
+
buttonVariant: "outline",
|
|
16631
|
+
showCustomizedIndicator: true
|
|
16632
|
+
}
|
|
16633
|
+
}
|
|
16634
|
+
};
|
|
16635
|
+
}
|
|
15809
16636
|
//#endregion
|
|
15810
16637
|
//#region ../blocks/src/system/fields/imageShape.ts
|
|
15811
16638
|
const standardImageShapeOptions = [
|
|
@@ -16992,21 +17819,29 @@ function cardRoleClass(role) {
|
|
|
16992
17819
|
return `card-role-${role}`;
|
|
16993
17820
|
}
|
|
16994
17821
|
/**
|
|
17822
|
+
* The role class for a card slot the *block* owns structurally, where a Look
|
|
17823
|
+
* may still name the surface.
|
|
17824
|
+
*
|
|
17825
|
+
* Some layouts have more than one card slot and decide themselves which one is
|
|
17826
|
+
* the statement — the featured-editorial testimonials field is a lead voice
|
|
17827
|
+
* beside its supporting voices, and that is structure, not composition. Those
|
|
17828
|
+
* slots still have to honour a Look that picks a surface, or a role-picking
|
|
17829
|
+
* Look would silently no-op under the layout. So the slot carries a default
|
|
17830
|
+
* role and the Look's compiled role wins over it when there is one.
|
|
17831
|
+
*
|
|
17832
|
+
* An explicit `none` is honoured as boxlessness and emits no class, matching
|
|
17833
|
+
* how the composite emitter reads it.
|
|
17834
|
+
*/
|
|
17835
|
+
/**
|
|
16995
17836
|
* The role a card renders with, and the one place a set of card styles becomes
|
|
16996
17837
|
* a role.
|
|
16997
17838
|
*
|
|
16998
|
-
* Precedence: a per-item override, then the `role` a Look
|
|
16999
|
-
* block's card styles
|
|
17000
|
-
*
|
|
17001
|
-
* vocabulary — an explicit `role` wins when a record carries both.
|
|
17002
|
-
*
|
|
17003
|
-
* Compiled and freshly authored card styles carry only `role`. `cardVariant`
|
|
17004
|
-
* survives on content persisted before the role contract, and normalizes here
|
|
17005
|
-
* rather than in `cardStylesOverrideSchema` because that content reaches the
|
|
17006
|
-
* renderer as a raw record without ever passing through the schema.
|
|
17839
|
+
* Precedence: a per-item override, then the `role` a Look or semantic field
|
|
17840
|
+
* compiled onto the block's card styles. Persisted inputs are normalized at
|
|
17841
|
+
* this boundary because raw block records do not pass through the theme schema.
|
|
17007
17842
|
*/
|
|
17008
17843
|
function resolveCardRoleForBoxStyles(input, override) {
|
|
17009
|
-
return override ?? normalizeCardRole(input.role)
|
|
17844
|
+
return override ?? normalizeCardRole(input.role);
|
|
17010
17845
|
}
|
|
17011
17846
|
/**
|
|
17012
17847
|
* Parse a block's own per-item surface vocabulary into a card role. The alias
|
|
@@ -17023,8 +17858,8 @@ function resolveItemCardRole(value, aliases) {
|
|
|
17023
17858
|
* The card surface for a set of box styles: one role, one class vocabulary, so
|
|
17024
17859
|
* a site-style swap re-skins the card whichever field named it.
|
|
17025
17860
|
*/
|
|
17026
|
-
function cardSurface(input, override) {
|
|
17027
|
-
const role = resolveCardRoleForBoxStyles(input, override);
|
|
17861
|
+
function cardSurface(input, override, fallback) {
|
|
17862
|
+
const role = resolveCardRoleForBoxStyles(input, override) ?? fallback ?? null;
|
|
17028
17863
|
if (!role) return {
|
|
17029
17864
|
role: null,
|
|
17030
17865
|
classes: []
|
|
@@ -17121,10 +17956,9 @@ function raisedClassFor(options) {
|
|
|
17121
17956
|
* of keeping a copy that drifts.
|
|
17122
17957
|
*/
|
|
17123
17958
|
function boxStyleClassNames(value, options) {
|
|
17124
|
-
|
|
17125
|
-
const input = value;
|
|
17959
|
+
const input = value && typeof value === "object" ? value : {};
|
|
17126
17960
|
const borderOverride = borderOverrideClass(input);
|
|
17127
|
-
const surface = cardSurface(input, options.cardRoleOverride);
|
|
17961
|
+
const surface = cardSurface(input, options.cardRoleOverride, options.cardRoleFallback);
|
|
17128
17962
|
const cardOwnsBorder = surface.role !== null && surface.role !== "none";
|
|
17129
17963
|
return [
|
|
17130
17964
|
borderOverride || cardOwnsBorder ? withoutBorderClasses(options.baseClass ?? "") : options.baseClass ?? "",
|
|
@@ -17272,29 +18106,41 @@ const cardRoleClassTransform = {
|
|
|
17272
18106
|
return baseClass ? `${baseClass.trim()} ${hook}` : hook;
|
|
17273
18107
|
}
|
|
17274
18108
|
};
|
|
17275
|
-
|
|
17276
|
-
|
|
18109
|
+
/**
|
|
18110
|
+
* The role class for a layout's own card slot, bound from the block's compiled
|
|
18111
|
+
* card styles so a Look that picks a surface still reaches a slot the layout
|
|
18112
|
+
* assigned a default role to.
|
|
18113
|
+
*/
|
|
18114
|
+
const cardSlotRoleTransform = {
|
|
18115
|
+
id: "boxStyles.cardSlotRole",
|
|
17277
18116
|
kind: "string",
|
|
17278
|
-
summary: "
|
|
17279
|
-
run: (value, options) => {
|
|
17280
|
-
|
|
17281
|
-
|
|
17282
|
-
|
|
17283
|
-
|
|
17284
|
-
return baseClass ? `${baseClass} ${roleClass}` : roleClass;
|
|
17285
|
-
}
|
|
18117
|
+
summary: "Resolve a layout card slot's role class, defaulting to the slot's own role",
|
|
18118
|
+
run: (value, options) => boxStyleClassNames(value, {
|
|
18119
|
+
baseClass: options?.baseClass,
|
|
18120
|
+
cardRoleFallback: options.slotDefault,
|
|
18121
|
+
includeSpacing: false
|
|
18122
|
+
})
|
|
17286
18123
|
};
|
|
18124
|
+
function resolveBorderColorState(value, options, viewModel) {
|
|
18125
|
+
const input = asPartialObject(options?.stylesPath ? readPath(viewModel, options.stylesPath) : value);
|
|
18126
|
+
if (!input) return null;
|
|
18127
|
+
return {
|
|
18128
|
+
input,
|
|
18129
|
+
role: resolveCardRoleForBoxStyles(input, options?.stylesPath ? resolveItemCardRole(value, options.itemRoleAliases) : void 0)
|
|
18130
|
+
};
|
|
18131
|
+
}
|
|
17287
18132
|
const boxStylesBorderColorTransform = {
|
|
17288
18133
|
id: "boxStyles.borderColor",
|
|
17289
18134
|
kind: "string",
|
|
17290
18135
|
summary: "Resolve border color from box styles border.colorToken",
|
|
17291
|
-
run: (value, options,
|
|
18136
|
+
run: (value, options, context) => {
|
|
17292
18137
|
const fallbackToken = options?.fallbackToken ?? "border";
|
|
17293
18138
|
const returnEmptyForDefault = options?.returnEmptyForDefault ?? false;
|
|
17294
18139
|
let explicitToken = null;
|
|
17295
|
-
const
|
|
17296
|
-
if (
|
|
17297
|
-
|
|
18140
|
+
const state = resolveBorderColorState(value, options, context.viewModel);
|
|
18141
|
+
if (state) {
|
|
18142
|
+
if (state.role && state.role !== "none") return "";
|
|
18143
|
+
const border = normalizeBoxStylesBorder(state.input.border);
|
|
17298
18144
|
if (border && border.enabled === true && border.colorToken) explicitToken = border.colorToken;
|
|
17299
18145
|
}
|
|
17300
18146
|
if (explicitToken) {
|
|
@@ -17514,7 +18360,7 @@ const boxStylesTransforms = [
|
|
|
17514
18360
|
roundedTransform,
|
|
17515
18361
|
boxStylesCompositeTransform,
|
|
17516
18362
|
cardRoleClassTransform,
|
|
17517
|
-
|
|
18363
|
+
cardSlotRoleTransform,
|
|
17518
18364
|
boxStylesBorderColorTransform,
|
|
17519
18365
|
sectionClassNameTransform,
|
|
17520
18366
|
containerStylesResolveClassName,
|
|
@@ -17621,10 +18467,16 @@ function styledCard(children, opts, ...mods) {
|
|
|
17621
18467
|
const style = {
|
|
17622
18468
|
...opts.style ?? {},
|
|
17623
18469
|
borderColor: { $bind: {
|
|
17624
|
-
from: opts.stylesFrom,
|
|
18470
|
+
from: opts.itemRole?.from ?? opts.stylesFrom,
|
|
17625
18471
|
transforms: [{
|
|
17626
18472
|
id: "boxStyles.borderColor",
|
|
17627
|
-
options: {
|
|
18473
|
+
options: {
|
|
18474
|
+
returnEmptyForDefault: true,
|
|
18475
|
+
...opts.itemRole ? {
|
|
18476
|
+
stylesPath: opts.stylesFrom,
|
|
18477
|
+
...opts.itemRole.aliases ? { itemRoleAliases: opts.itemRole.aliases } : {}
|
|
18478
|
+
} : {}
|
|
18479
|
+
}
|
|
17628
18480
|
}]
|
|
17629
18481
|
} }
|
|
17630
18482
|
};
|
|
@@ -18749,18 +19601,73 @@ function buildGridCardsLayout(className) {
|
|
|
18749
19601
|
return el("div", { className }, buildResponsiveGridCards());
|
|
18750
19602
|
}
|
|
18751
19603
|
/**
|
|
19604
|
+
* The card slots the featured-editorial layout has, and the role each one
|
|
19605
|
+
* defaults to.
|
|
19606
|
+
*
|
|
19607
|
+
* Which slot is the statement is *structure*, so the layout decides it: this
|
|
19608
|
+
* variant exists to put one lead voice beside its supporting voices. But a Look
|
|
19609
|
+
* that picks a surface has to keep meaning something here, so the lead slot's
|
|
19610
|
+
* role is a default the Look's compiled `cardRole` wins over — see
|
|
19611
|
+
* `cardSlotRoleClass`. Supporting voices stay the quiet everyday card.
|
|
19612
|
+
*/
|
|
19613
|
+
const FEATURED_EDITORIAL_SLOTS = {
|
|
19614
|
+
lead: {
|
|
19615
|
+
/** Composition CSS addresses the lead card's geometry through this. */
|
|
19616
|
+
variantClass: "rb-testimonials-fe-card--feature",
|
|
19617
|
+
slotDefault: "alternative",
|
|
19618
|
+
followsLook: true
|
|
19619
|
+
},
|
|
19620
|
+
support: {
|
|
19621
|
+
variantClass: null,
|
|
19622
|
+
slotDefault: "default",
|
|
19623
|
+
followsLook: false
|
|
19624
|
+
}
|
|
19625
|
+
};
|
|
19626
|
+
/** Where the testimonials block's compiled card styles live. */
|
|
19627
|
+
const TESTIMONIALS_CARD_STYLES_PATH = "content._cardStyles";
|
|
19628
|
+
/**
|
|
19629
|
+
* The class list for one featured-editorial card slot.
|
|
19630
|
+
*
|
|
19631
|
+
* A slot that follows the Look has to resolve at render time, so it binds
|
|
19632
|
+
* through the shared card-class emitter rather than naming a role class here;
|
|
19633
|
+
* a slot that does not is a plain string built by the same composite emitter.
|
|
19634
|
+
*/
|
|
19635
|
+
function featuredEditorialCardClassName(slot) {
|
|
19636
|
+
const { variantClass, slotDefault, followsLook } = FEATURED_EDITORIAL_SLOTS[slot];
|
|
19637
|
+
const baseClass = ["rb-testimonials-fe-card", variantClass].filter(Boolean).join(" ");
|
|
19638
|
+
if (!followsLook) return boxStyleClassNames({}, {
|
|
19639
|
+
baseClass,
|
|
19640
|
+
cardRoleFallback: slotDefault,
|
|
19641
|
+
includeSpacing: false
|
|
19642
|
+
});
|
|
19643
|
+
return { $bind: {
|
|
19644
|
+
from: TESTIMONIALS_CARD_STYLES_PATH,
|
|
19645
|
+
transforms: [{
|
|
19646
|
+
id: "boxStyles.cardSlotRole",
|
|
19647
|
+
options: {
|
|
19648
|
+
baseClass,
|
|
19649
|
+
slotDefault
|
|
19650
|
+
}
|
|
19651
|
+
}],
|
|
19652
|
+
fallback: boxStyleClassNames({}, {
|
|
19653
|
+
baseClass,
|
|
19654
|
+
cardRoleFallback: slotDefault,
|
|
19655
|
+
includeSpacing: false
|
|
19656
|
+
})
|
|
19657
|
+
} };
|
|
19658
|
+
}
|
|
19659
|
+
/**
|
|
18752
19660
|
* Build a single "featured editorial" testimonial card.
|
|
18753
19661
|
*
|
|
18754
|
-
* This card type deliberately renders NO avatar/headshot:
|
|
18755
|
-
*
|
|
18756
|
-
*
|
|
18757
|
-
*
|
|
18758
|
-
* - `rb-testimonials-fe-card--plain` → white surface card
|
|
19662
|
+
* This card type deliberately renders NO avatar/headshot: a quote mark, the
|
|
19663
|
+
* quote body, then the author name and a context line. The card surface comes
|
|
19664
|
+
* from the slot's card role — the site style owns the fill, border, corners and
|
|
19665
|
+
* padding.
|
|
18759
19666
|
*
|
|
18760
19667
|
* Extra modifiers (`repeat`, `when`) are forwarded to the card node so the
|
|
18761
19668
|
* caller can drive first-vs-rest branching.
|
|
18762
19669
|
*/
|
|
18763
|
-
function buildFeaturedEditorialCard(
|
|
19670
|
+
function buildFeaturedEditorialCard(slot, ...mods) {
|
|
18764
19671
|
const quoteMark = text({
|
|
18765
19672
|
as: "span",
|
|
18766
19673
|
className: "rb-testimonials-fe-qmark",
|
|
@@ -18774,11 +19681,11 @@ function buildFeaturedEditorialCard(variantClass, ...mods) {
|
|
|
18774
19681
|
as: "span",
|
|
18775
19682
|
className: "rb-testimonials-fe-context"
|
|
18776
19683
|
}, when("testimonial.content.jobTitle"), bind("testimonial.content.jobTitle"))]);
|
|
18777
|
-
return el("div", { className:
|
|
19684
|
+
return el("div", { className: featuredEditorialCardClassName(slot) }, [el("div", { className: "card-content rb-testimonials-fe-card-body" }, [
|
|
18778
19685
|
quoteMark,
|
|
18779
19686
|
quote,
|
|
18780
19687
|
meta
|
|
18781
|
-
], ...mods);
|
|
19688
|
+
])], ...mods);
|
|
18782
19689
|
}
|
|
18783
19690
|
/**
|
|
18784
19691
|
* Build the "featured editorial" layout: an asymmetric two-column arrangement
|
|
@@ -18792,7 +19699,7 @@ function buildFeaturedEditorialCard(variantClass, ...mods) {
|
|
|
18792
19699
|
* index scope in context, so entry 0 produces no node in the rest column.
|
|
18793
19700
|
*/
|
|
18794
19701
|
function buildFeaturedEditorialLayout() {
|
|
18795
|
-
return el("div", { className: "rb-testimonials-fe-grid" }, [buildFeaturedEditorialCard("
|
|
19702
|
+
return el("div", { className: "rb-testimonials-fe-grid" }, [buildFeaturedEditorialCard("lead", repeat("data.entries", "testimonial", { limit: 1 })), el("div", { className: "rb-testimonials-fe-col" }, [buildFeaturedEditorialCard("support", repeat("data.entries", "testimonial", { indexName: "tIndex" }), when("tIndex", {
|
|
18796
19703
|
equals: 0,
|
|
18797
19704
|
not: true
|
|
18798
19705
|
}))])]);
|
|
@@ -19519,7 +20426,7 @@ const newsletterFormFragment = defineFragment({
|
|
|
19519
20426
|
});
|
|
19520
20427
|
//#endregion
|
|
19521
20428
|
//#region ../blocks/src/system/fragments/library/card.ts
|
|
19522
|
-
const cardVariantOptions
|
|
20429
|
+
const cardVariantOptions = cardVariantRoleValues.map((value) => ({
|
|
19523
20430
|
value,
|
|
19524
20431
|
label: value === "default" ? "Default" : "Alternative"
|
|
19525
20432
|
}));
|
|
@@ -19617,7 +20524,7 @@ const cardFragment = defineFragment({
|
|
|
19617
20524
|
description: "Choose a card style from your theme",
|
|
19618
20525
|
required: false,
|
|
19619
20526
|
defaultValue: "default",
|
|
19620
|
-
options: cardVariantOptions
|
|
20527
|
+
options: cardVariantOptions,
|
|
19621
20528
|
ui: { intent: "style" }
|
|
19622
20529
|
}
|
|
19623
20530
|
],
|
|
@@ -19626,7 +20533,10 @@ const cardFragment = defineFragment({
|
|
|
19626
20533
|
className: { $bind: {
|
|
19627
20534
|
from: "variant",
|
|
19628
20535
|
fallback: "default",
|
|
19629
|
-
transforms: [{
|
|
20536
|
+
transforms: [{
|
|
20537
|
+
id: "boxStyles.cardRoleClass",
|
|
20538
|
+
options: { baseClass: "" }
|
|
20539
|
+
}]
|
|
19630
20540
|
} }
|
|
19631
20541
|
}, [media({
|
|
19632
20542
|
className: "card-media rb-w-full rb-h-auto rb-object-cover",
|
|
@@ -25572,19 +26482,13 @@ const blockBookingPaymentCollectionOptionSchema = z.union([
|
|
|
25572
26482
|
]);
|
|
25573
26483
|
const blockBookingPaymentTermsSchema = z.object({ allowedOptions: z.array(blockBookingPaymentCollectionOptionSchema).min(1) });
|
|
25574
26484
|
//#endregion
|
|
25575
|
-
//#region ../blocks/src/system/blocks/
|
|
25576
|
-
|
|
25577
|
-
* Zod schema for course venue data
|
|
25578
|
-
*/
|
|
25579
|
-
const courseVenueSchema = z.object({
|
|
26485
|
+
//#region ../blocks/src/system/blocks/events/whole-series/schemas.ts
|
|
26486
|
+
const wholeSeriesVenueSchema = z.object({
|
|
25580
26487
|
id: z.string(),
|
|
25581
26488
|
name: z.string(),
|
|
25582
26489
|
address: z.string().nullable()
|
|
25583
26490
|
});
|
|
25584
|
-
|
|
25585
|
-
* Zod schema for course session (occurrence) data
|
|
25586
|
-
*/
|
|
25587
|
-
const courseSessionSchema = z.object({
|
|
26491
|
+
const wholeSeriesSessionSchema = z.object({
|
|
25588
26492
|
id: z.string(),
|
|
25589
26493
|
startsAt: z.string(),
|
|
25590
26494
|
endsAt: z.string(),
|
|
@@ -25592,14 +26496,14 @@ const courseSessionSchema = z.object({
|
|
|
25592
26496
|
capacityOverride: z.number().nullable().optional(),
|
|
25593
26497
|
overrides: z.record(z.string(), z.unknown()).nullable().optional()
|
|
25594
26498
|
});
|
|
25595
|
-
const
|
|
26499
|
+
const wholeSeriesTeamMemberSummarySchema = z.object({
|
|
25596
26500
|
id: z.string(),
|
|
25597
26501
|
name: z.string(),
|
|
25598
26502
|
roleLabel: z.string().nullable(),
|
|
25599
26503
|
summary: z.string().nullable(),
|
|
25600
26504
|
profilePath: z.string().nullable()
|
|
25601
26505
|
});
|
|
25602
|
-
const
|
|
26506
|
+
const wholeSeriesPricingOptionSchema = z.object({
|
|
25603
26507
|
id: z.string(),
|
|
25604
26508
|
name: z.string(),
|
|
25605
26509
|
description: z.string().nullable(),
|
|
@@ -25615,7 +26519,7 @@ const coursePricingOptionSchema = z.object({
|
|
|
25615
26519
|
"both"
|
|
25616
26520
|
]).nullable().optional()
|
|
25617
26521
|
});
|
|
25618
|
-
const
|
|
26522
|
+
const wholeSeriesPricingSchema = z.object({
|
|
25619
26523
|
bookingRequirement: z.enum(["none", "required"]),
|
|
25620
26524
|
pricingStrategy: z.enum([
|
|
25621
26525
|
"free",
|
|
@@ -25629,20 +26533,17 @@ const coursePricingSchema = z.object({
|
|
|
25629
26533
|
slidingMaxAmount: z.number().nullable().optional(),
|
|
25630
26534
|
slidingSuggestedAmount: z.number().nullable().optional(),
|
|
25631
26535
|
paymentTerms: blockBookingPaymentTermsSchema,
|
|
25632
|
-
options: z.array(
|
|
26536
|
+
options: z.array(wholeSeriesPricingOptionSchema)
|
|
25633
26537
|
});
|
|
25634
|
-
/**
|
|
25635
|
-
* Zod schema for public course data
|
|
25636
|
-
*/
|
|
25637
26538
|
const publicWholeSeriesOfferingSchema = z.object({
|
|
25638
26539
|
eventSeriesId: z.string(),
|
|
25639
26540
|
eventOfferingId: z.string(),
|
|
25640
26541
|
title: z.string(),
|
|
25641
26542
|
slug: z.string(),
|
|
25642
26543
|
description: z.unknown().nullable(),
|
|
25643
|
-
teamMembers: z.array(
|
|
26544
|
+
teamMembers: z.array(wholeSeriesTeamMemberSummarySchema).optional(),
|
|
25644
26545
|
enrollmentOpen: z.boolean(),
|
|
25645
|
-
pricing:
|
|
26546
|
+
pricing: wholeSeriesPricingSchema,
|
|
25646
26547
|
currency: z.string(),
|
|
25647
26548
|
paymentTerms: blockBookingPaymentTermsSchema,
|
|
25648
26549
|
enrollmentCapacity: z.number().nullable(),
|
|
@@ -25655,12 +26556,10 @@ const publicWholeSeriesOfferingSchema = z.object({
|
|
|
25655
26556
|
sessionsCount: z.number(),
|
|
25656
26557
|
enrolledCount: z.number(),
|
|
25657
26558
|
availableSpots: z.number().nullable(),
|
|
25658
|
-
sessions: z.array(
|
|
25659
|
-
venue:
|
|
26559
|
+
sessions: z.array(wholeSeriesSessionSchema),
|
|
26560
|
+
venue: wholeSeriesVenueSchema.nullable()
|
|
25660
26561
|
});
|
|
25661
|
-
|
|
25662
|
-
const publicCourseSchema = publicWholeSeriesOfferingSchema;
|
|
25663
|
-
const publicCoursesArraySchema = z.array(publicWholeSeriesOfferingSchema);
|
|
26562
|
+
const publicWholeSeriesOfferingsArraySchema = z.array(publicWholeSeriesOfferingSchema);
|
|
25664
26563
|
//#endregion
|
|
25665
26564
|
//#region ../blocks/src/system/blocks/events/shared/schemas.ts
|
|
25666
26565
|
const eventPresetSchema = z.enum([
|
|
@@ -25971,7 +26870,7 @@ const publicEventSchema = z.object({
|
|
|
25971
26870
|
acceptsMemberships: z.boolean().optional(),
|
|
25972
26871
|
wholeSeries: z.object({
|
|
25973
26872
|
eventSeriesId: z.string(),
|
|
25974
|
-
pricing:
|
|
26873
|
+
pricing: wholeSeriesPricingSchema,
|
|
25975
26874
|
currency: z.string(),
|
|
25976
26875
|
enrollmentOpen: z.boolean()
|
|
25977
26876
|
}).nullable().optional()
|
|
@@ -25980,24 +26879,19 @@ const publicEventSchema = z.object({
|
|
|
25980
26879
|
* Schema for an array of public events
|
|
25981
26880
|
*/
|
|
25982
26881
|
const publicEventsArraySchema = z.array(publicEventSchema);
|
|
26882
|
+
//#endregion
|
|
26883
|
+
//#region ../blocks/src/system/blocks/events/shared/fields.ts
|
|
25983
26884
|
/**
|
|
25984
26885
|
* Shared card styling fields for event blocks
|
|
25985
26886
|
*/
|
|
25986
26887
|
const cardStylingFields = [
|
|
25987
|
-
{
|
|
25988
|
-
id: "
|
|
25989
|
-
type: "select",
|
|
26888
|
+
cardStylesField({
|
|
26889
|
+
id: "_cardStyles",
|
|
25990
26890
|
label: "Card style",
|
|
25991
|
-
|
|
25992
|
-
|
|
25993
|
-
|
|
25994
|
-
|
|
25995
|
-
options: cardVariantRoleValues.map((value) => ({
|
|
25996
|
-
value,
|
|
25997
|
-
label: value === "default" ? "Default" : "Alternative"
|
|
25998
|
-
})),
|
|
25999
|
-
ui: { intent: "style" }
|
|
26000
|
-
},
|
|
26891
|
+
controls: "role-only",
|
|
26892
|
+
renderInHeader: false,
|
|
26893
|
+
intent: "style"
|
|
26894
|
+
}),
|
|
26001
26895
|
createButtonVariantField({ description: "Choose a button style from your theme" }),
|
|
26002
26896
|
{
|
|
26003
26897
|
id: "buttonText",
|
|
@@ -26136,14 +27030,7 @@ function normalizeIdList(parts) {
|
|
|
26136
27030
|
}
|
|
26137
27031
|
//#endregion
|
|
26138
27032
|
//#region ../blocks/src/system/blocks/events/shared/filtering.ts
|
|
26139
|
-
const eventSurfacePresetValues =
|
|
26140
|
-
"course",
|
|
26141
|
-
"term",
|
|
26142
|
-
"class",
|
|
26143
|
-
"workshop",
|
|
26144
|
-
"retreat",
|
|
26145
|
-
"performance"
|
|
26146
|
-
];
|
|
27033
|
+
const eventSurfacePresetValues = SURFACE_EVENT_PRESET_VALUES;
|
|
26147
27034
|
const eventSurfaceScopeValues = [
|
|
26148
27035
|
"all",
|
|
26149
27036
|
"regularClassSchedule",
|
|
@@ -26644,8 +27531,8 @@ const eventRegistrationHydrationSchemaShape = {
|
|
|
26644
27531
|
occurrenceContext: occurrenceContextSchema.optional(),
|
|
26645
27532
|
subject: eventRegistrationPageSurfaceSubjectSchema.nullable().optional(),
|
|
26646
27533
|
events: z.array(eventRegistrationPublicEventSchema).nullable().optional(),
|
|
26647
|
-
wholeSeriesOfferings:
|
|
26648
|
-
wholeSeriesOffering:
|
|
27534
|
+
wholeSeriesOfferings: publicWholeSeriesOfferingsArraySchema.nullable().optional(),
|
|
27535
|
+
wholeSeriesOffering: publicWholeSeriesOfferingSchema.nullable().optional(),
|
|
26649
27536
|
maxTickets: z.string().optional(),
|
|
26650
27537
|
showVenue: z.boolean().optional(),
|
|
26651
27538
|
showCapacity: z.boolean().optional(),
|
|
@@ -26667,12 +27554,13 @@ const eventRegistrationSourceSchema = z.object({
|
|
|
26667
27554
|
portalToken: z.string().nullable().optional(),
|
|
26668
27555
|
previewToken: z.string().nullable().optional(),
|
|
26669
27556
|
...eventRegistrationHydrationSchemaShape,
|
|
27557
|
+
subjectWholeSeriesOffering: publicWholeSeriesOfferingSchema.nullable().optional(),
|
|
26670
27558
|
className: z.string().nullable().optional(),
|
|
26671
27559
|
buttonText: z.string().nullable().optional(),
|
|
26672
27560
|
maxTickets: z.string().nullable().optional(),
|
|
26673
27561
|
stage: previewStageSchema.optional()
|
|
26674
27562
|
});
|
|
26675
|
-
const eventRegistrationDisplaySchema = z.object({
|
|
27563
|
+
const eventRegistrationDisplaySchema = z.discriminatedUnion("state", [z.object({
|
|
26676
27564
|
kind: z.literal("event-registration"),
|
|
26677
27565
|
state: z.literal("generic-shell"),
|
|
26678
27566
|
className: z.string().nullable(),
|
|
@@ -26680,7 +27568,13 @@ const eventRegistrationDisplaySchema = z.object({
|
|
|
26680
27568
|
bodyText: z.string(),
|
|
26681
27569
|
stepLabels: z.array(z.enum(EVENT_REGISTRATION_SHELL_STEP_LABELS)).min(1),
|
|
26682
27570
|
summaryButtonText: z.string()
|
|
26683
|
-
})
|
|
27571
|
+
}), z.object({
|
|
27572
|
+
kind: z.literal("event-registration"),
|
|
27573
|
+
state: z.literal("registration-closed"),
|
|
27574
|
+
className: z.string().nullable(),
|
|
27575
|
+
titleText: z.string(),
|
|
27576
|
+
bodyText: z.string()
|
|
27577
|
+
})]);
|
|
26684
27578
|
const eventRegistrationHydrationSchema = z.object(eventRegistrationHydrationSchemaShape);
|
|
26685
27579
|
const eventRegistrationRenderSchema = z.object({
|
|
26686
27580
|
display: eventRegistrationDisplaySchema,
|
|
@@ -26694,6 +27588,13 @@ z.object({
|
|
|
26694
27588
|
stage: previewStageSchema.optional()
|
|
26695
27589
|
});
|
|
26696
27590
|
function buildEventRegistrationDisplay(source) {
|
|
27591
|
+
if (resolveWholeSeriesOffering(source)?.enrollmentOpen === false) return {
|
|
27592
|
+
kind: "event-registration",
|
|
27593
|
+
state: "registration-closed",
|
|
27594
|
+
className: source.className ?? null,
|
|
27595
|
+
titleText: "Registration closed",
|
|
27596
|
+
bodyText: "This run is no longer open for bookings."
|
|
27597
|
+
};
|
|
26697
27598
|
const stepLabels = buildEventRegistrationShellStepLabels(source);
|
|
26698
27599
|
return {
|
|
26699
27600
|
kind: "event-registration",
|
|
@@ -26705,6 +27606,9 @@ function buildEventRegistrationDisplay(source) {
|
|
|
26705
27606
|
summaryButtonText: source.buttonText?.trim() || "Register"
|
|
26706
27607
|
};
|
|
26707
27608
|
}
|
|
27609
|
+
function resolveWholeSeriesOffering(source) {
|
|
27610
|
+
return source.wholeSeriesOffering ?? source.subjectWholeSeriesOffering ?? null;
|
|
27611
|
+
}
|
|
26708
27612
|
function buildEventRegistrationShellStepLabels(source) {
|
|
26709
27613
|
const scopedEvents = scopeEventRegistrationEvents(source);
|
|
26710
27614
|
if (scopedEvents.length === 0) return EVENT_REGISTRATION_GENERIC_SHELL_STEP_LABELS;
|
|
@@ -26762,7 +27666,7 @@ const eventRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
|
|
|
26762
27666
|
subject: source.subject ?? null,
|
|
26763
27667
|
events: source.events ?? null,
|
|
26764
27668
|
wholeSeriesOfferings: source.wholeSeriesOfferings ?? null,
|
|
26765
|
-
wholeSeriesOffering: source
|
|
27669
|
+
wholeSeriesOffering: resolveWholeSeriesOffering(source),
|
|
26766
27670
|
maxTickets: source.maxTickets ?? void 0,
|
|
26767
27671
|
showVenue: source.showVenue,
|
|
26768
27672
|
showCapacity: source.showCapacity,
|
|
@@ -26983,7 +27887,9 @@ const eventRegistrationBlockDefinition = {
|
|
|
26983
27887
|
fallback: false
|
|
26984
27888
|
} },
|
|
26985
27889
|
events: { $bind: { from: "data.events" } },
|
|
26986
|
-
wholeSeriesOffering: { $bind: { from: "data.
|
|
27890
|
+
wholeSeriesOffering: { $bind: { from: "data.selectedRunOffering.offering" } },
|
|
27891
|
+
subjectWholeSeriesOffering: { $bind: { from: "data.subjectWholeSeriesOffering.offering" } },
|
|
27892
|
+
wholeSeriesOfferings: { $bind: { from: "data.wholeSeriesOfferings" } },
|
|
26987
27893
|
sitePasses: { $bind: { from: "data.sitePasses" } },
|
|
26988
27894
|
siteMemberships: { $bind: { from: "data.siteMemberships" } },
|
|
26989
27895
|
stage: { $bind: {
|
|
@@ -26997,7 +27903,9 @@ const eventRegistrationBlockDefinition = {
|
|
|
26997
27903
|
runtime: eventRegistrationBlockRuntime,
|
|
26998
27904
|
dataSchemas: {
|
|
26999
27905
|
events: publicEventsArraySchema.optional(),
|
|
27000
|
-
|
|
27906
|
+
selectedRunOffering: z.object({ offering: publicWholeSeriesOfferingSchema }).optional(),
|
|
27907
|
+
subjectWholeSeriesOffering: z.object({ offering: publicWholeSeriesOfferingSchema }).optional(),
|
|
27908
|
+
wholeSeriesOfferings: z.array(publicWholeSeriesOfferingSchema).optional(),
|
|
27001
27909
|
sitePasses: publicPassProductCollectionSchema.optional(),
|
|
27002
27910
|
siteMemberships: publicMembershipProductCollectionSchema.optional(),
|
|
27003
27911
|
occurrenceContext: occurrenceContextSchema.optional()
|
|
@@ -27014,11 +27922,29 @@ const eventRegistrationBlockDefinition = {
|
|
|
27014
27922
|
} },
|
|
27015
27923
|
readProfile: "registration",
|
|
27016
27924
|
seriesId: { $bind: { from: "$root.subject.eventSeriesId" } },
|
|
27925
|
+
seriesIds: { $bind: {
|
|
27926
|
+
from: "$root.subject.availableEventSeriesIds",
|
|
27927
|
+
transforms: [{ id: "value.csv" }]
|
|
27928
|
+
} },
|
|
27929
|
+
runSeriesId: { $bind: { from: "$root.entrySubrouteContext.run.seriesId" } },
|
|
27017
27930
|
includeOccurrenceId: { $bind: { from: "$root.occurrenceContext.id" } }
|
|
27018
27931
|
},
|
|
27019
27932
|
mode: "server"
|
|
27020
27933
|
},
|
|
27021
|
-
|
|
27934
|
+
selectedRunOffering: {
|
|
27935
|
+
endpoint: "getPublicWholeSeriesOffering",
|
|
27936
|
+
params: {
|
|
27937
|
+
siteId: { $bind: { from: "$root.siteId" } },
|
|
27938
|
+
eventSeriesId: { $bind: { from: "$root.entrySubrouteContext.run.seriesId" } },
|
|
27939
|
+
stage: { $bind: {
|
|
27940
|
+
from: "$root.previewStage",
|
|
27941
|
+
fallback: "published"
|
|
27942
|
+
} }
|
|
27943
|
+
},
|
|
27944
|
+
requiredParams: ["eventSeriesId"],
|
|
27945
|
+
mode: "server"
|
|
27946
|
+
},
|
|
27947
|
+
subjectWholeSeriesOffering: {
|
|
27022
27948
|
endpoint: "getPublicWholeSeriesOffering",
|
|
27023
27949
|
when: { $bind: {
|
|
27024
27950
|
from: "$root.subject.isWholeSeriesBooking",
|
|
@@ -27035,6 +27961,22 @@ const eventRegistrationBlockDefinition = {
|
|
|
27035
27961
|
requiredParams: ["eventSeriesId"],
|
|
27036
27962
|
mode: "server"
|
|
27037
27963
|
},
|
|
27964
|
+
wholeSeriesOfferings: {
|
|
27965
|
+
endpoint: "listPublicWholeSeriesOfferings",
|
|
27966
|
+
params: {
|
|
27967
|
+
siteId: { $bind: { from: "$root.siteId" } },
|
|
27968
|
+
eventSeriesIds: { $bind: {
|
|
27969
|
+
from: "$root.subject.availableEventSeriesIds",
|
|
27970
|
+
transforms: [{ id: "value.csv" }]
|
|
27971
|
+
} },
|
|
27972
|
+
stage: { $bind: {
|
|
27973
|
+
from: "$root.previewStage",
|
|
27974
|
+
fallback: "published"
|
|
27975
|
+
} }
|
|
27976
|
+
},
|
|
27977
|
+
requiredParams: ["eventSeriesIds"],
|
|
27978
|
+
mode: "server"
|
|
27979
|
+
},
|
|
27038
27980
|
sitePasses: {
|
|
27039
27981
|
endpoint: "listPublicPasses",
|
|
27040
27982
|
params: { siteId: { $bind: { from: "$root.siteId" } } },
|
|
@@ -27049,13 +27991,9 @@ const eventRegistrationBlockDefinition = {
|
|
|
27049
27991
|
};
|
|
27050
27992
|
//#endregion
|
|
27051
27993
|
//#region ../blocks/src/system/runtime/nodes/course-registration.interactive.ts
|
|
27052
|
-
const
|
|
27053
|
-
siteId: z.string().optional(),
|
|
27054
|
-
apiBaseUrl: z.string().optional(),
|
|
27055
|
-
portalToken: z.string().nullable().optional(),
|
|
27994
|
+
const courseRegistrationHydrationSchemaShape = {
|
|
27056
27995
|
subject: eventRegistrationPageSurfaceSubjectSchema.nullable().optional(),
|
|
27057
|
-
courses: z.array(
|
|
27058
|
-
className: z.string().nullable().optional(),
|
|
27996
|
+
courses: z.array(publicWholeSeriesOfferingSchema).nullable().optional(),
|
|
27059
27997
|
showSessions: z.boolean().optional(),
|
|
27060
27998
|
showPrice: z.boolean().optional(),
|
|
27061
27999
|
showCapacity: z.boolean().optional(),
|
|
@@ -27063,8 +28001,15 @@ const courseRegistrationSourceSchema = z.object({
|
|
|
27063
28001
|
successMessage: z.string().optional(),
|
|
27064
28002
|
waitlistMessage: z.string().optional(),
|
|
27065
28003
|
membershipMessage: z.string().optional(),
|
|
28004
|
+
buttonVariant: registrationButtonVariantSchema.optional()
|
|
28005
|
+
};
|
|
28006
|
+
const courseRegistrationSourceSchema = z.object({
|
|
28007
|
+
siteId: z.string().optional(),
|
|
28008
|
+
apiBaseUrl: z.string().optional(),
|
|
28009
|
+
portalToken: z.string().nullable().optional(),
|
|
28010
|
+
...courseRegistrationHydrationSchemaShape,
|
|
28011
|
+
className: z.string().nullable().optional(),
|
|
27066
28012
|
buttonText: z.string().nullable().optional(),
|
|
27067
|
-
buttonVariant: registrationButtonVariantSchema.optional(),
|
|
27068
28013
|
stage: previewStageSchema.optional()
|
|
27069
28014
|
});
|
|
27070
28015
|
const courseRegistrationDisplaySchema = z.object({
|
|
@@ -27073,18 +28018,7 @@ const courseRegistrationDisplaySchema = z.object({
|
|
|
27073
28018
|
className: z.string().nullable(),
|
|
27074
28019
|
summaryButtonText: z.string()
|
|
27075
28020
|
});
|
|
27076
|
-
const courseRegistrationHydrationSchema = z.object(
|
|
27077
|
-
subject: eventRegistrationPageSurfaceSubjectSchema.nullable().optional(),
|
|
27078
|
-
courses: z.array(publicCourseSchema).nullable().optional(),
|
|
27079
|
-
showSessions: z.boolean().optional(),
|
|
27080
|
-
showPrice: z.boolean().optional(),
|
|
27081
|
-
showCapacity: z.boolean().optional(),
|
|
27082
|
-
showVenue: z.boolean().optional(),
|
|
27083
|
-
successMessage: z.string().optional(),
|
|
27084
|
-
waitlistMessage: z.string().optional(),
|
|
27085
|
-
membershipMessage: z.string().optional(),
|
|
27086
|
-
buttonVariant: registrationButtonVariantSchema.optional()
|
|
27087
|
-
});
|
|
28021
|
+
const courseRegistrationHydrationSchema = z.object(courseRegistrationHydrationSchemaShape);
|
|
27088
28022
|
const courseRegistrationRenderSchema = z.object({
|
|
27089
28023
|
display: courseRegistrationDisplaySchema,
|
|
27090
28024
|
hydration: courseRegistrationHydrationSchema
|
|
@@ -27289,7 +28223,7 @@ const courseRegistrationBlockDefinition = {
|
|
|
27289
28223
|
})]
|
|
27290
28224
|
}),
|
|
27291
28225
|
runtime: courseRegistrationBlockRuntime,
|
|
27292
|
-
dataSchemas: { courses:
|
|
28226
|
+
dataSchemas: { courses: publicWholeSeriesOfferingsArraySchema.optional() },
|
|
27293
28227
|
dataLoaders: { courses: {
|
|
27294
28228
|
endpoint: "listPublicWholeSeriesOfferings",
|
|
27295
28229
|
params: {
|
|
@@ -27360,6 +28294,22 @@ const eventDetailsManifest = createBlockManifest({
|
|
|
27360
28294
|
defaultValue: true,
|
|
27361
28295
|
ui: { intent: "display" }
|
|
27362
28296
|
},
|
|
28297
|
+
{
|
|
28298
|
+
id: "showTitle",
|
|
28299
|
+
type: "boolean",
|
|
28300
|
+
label: "Show event title",
|
|
28301
|
+
required: false,
|
|
28302
|
+
defaultValue: false,
|
|
28303
|
+
ui: { intent: "display" }
|
|
28304
|
+
},
|
|
28305
|
+
{
|
|
28306
|
+
id: "showDescription",
|
|
28307
|
+
type: "boolean",
|
|
28308
|
+
label: "Show event description",
|
|
28309
|
+
required: false,
|
|
28310
|
+
defaultValue: false,
|
|
28311
|
+
ui: { intent: "display" }
|
|
28312
|
+
},
|
|
27363
28313
|
{
|
|
27364
28314
|
id: "showMap",
|
|
27365
28315
|
type: "boolean",
|
|
@@ -27396,10 +28346,22 @@ const eventDetailsManifest = createBlockManifest({
|
|
|
27396
28346
|
{
|
|
27397
28347
|
value: "10",
|
|
27398
28348
|
label: "10 dates"
|
|
28349
|
+
},
|
|
28350
|
+
{
|
|
28351
|
+
value: "all",
|
|
28352
|
+
label: "All dates"
|
|
27399
28353
|
}
|
|
27400
28354
|
],
|
|
27401
28355
|
ui: { intent: "display" }
|
|
27402
28356
|
},
|
|
28357
|
+
{
|
|
28358
|
+
id: "showCapacity",
|
|
28359
|
+
type: "boolean",
|
|
28360
|
+
label: "Show capacity",
|
|
28361
|
+
required: false,
|
|
28362
|
+
defaultValue: false,
|
|
28363
|
+
ui: { intent: "display" }
|
|
28364
|
+
},
|
|
27403
28365
|
{
|
|
27404
28366
|
id: "showCost",
|
|
27405
28367
|
type: "boolean",
|
|
@@ -27442,6 +28404,8 @@ const eventDetailsManifest = createBlockManifest({
|
|
|
27442
28404
|
} },
|
|
27443
28405
|
events: { $bind: { from: "data.eventDetailsData.events" } },
|
|
27444
28406
|
showVenue: { $bind: { from: "content.showVenue" } },
|
|
28407
|
+
showTitle: { $bind: { from: "content.showTitle" } },
|
|
28408
|
+
showDescription: { $bind: { from: "content.showDescription" } },
|
|
27445
28409
|
showMap: { $bind: { from: "content.showMap" } },
|
|
27446
28410
|
showOtherDates: { $bind: { from: "content.showOtherDates" } },
|
|
27447
28411
|
otherDatesLimit: { $bind: {
|
|
@@ -27452,6 +28416,10 @@ const eventDetailsManifest = createBlockManifest({
|
|
|
27452
28416
|
from: "content.showCost",
|
|
27453
28417
|
fallback: true
|
|
27454
28418
|
} },
|
|
28419
|
+
showCapacity: { $bind: {
|
|
28420
|
+
from: "content.showCapacity",
|
|
28421
|
+
fallback: false
|
|
28422
|
+
} },
|
|
27455
28423
|
showAcceptedPasses: { $bind: {
|
|
27456
28424
|
from: "content.showAcceptedPasses",
|
|
27457
28425
|
fallback: true
|
|
@@ -27506,6 +28474,11 @@ const eventDetailsBlockDefinition = {
|
|
|
27506
28474
|
limit: "100",
|
|
27507
28475
|
readProfile: "details",
|
|
27508
28476
|
seriesId: { $bind: { from: "$root.subject.eventSeriesId" } },
|
|
28477
|
+
seriesIds: { $bind: {
|
|
28478
|
+
from: "$root.subject.availableEventSeriesIds",
|
|
28479
|
+
transforms: [{ id: "value.csv" }]
|
|
28480
|
+
} },
|
|
28481
|
+
runSeriesId: { $bind: { from: "$root.entrySubrouteContext.run.seriesId" } },
|
|
27509
28482
|
includeOccurrenceId: { $bind: { from: "$root.occurrenceContext.id" } }
|
|
27510
28483
|
},
|
|
27511
28484
|
mode: "server"
|
|
@@ -27691,7 +28664,7 @@ const courseDetailsBlockDefinition = {
|
|
|
27691
28664
|
})], { gap: "lg" })
|
|
27692
28665
|
})]
|
|
27693
28666
|
}),
|
|
27694
|
-
dataSchemas: { courses:
|
|
28667
|
+
dataSchemas: { courses: publicWholeSeriesOfferingsArraySchema.optional() },
|
|
27695
28668
|
dataLoaders: { courses: {
|
|
27696
28669
|
endpoint: "listPublicWholeSeriesOfferings",
|
|
27697
28670
|
params: {
|
|
@@ -27810,8 +28783,8 @@ const eventSpotlightBlockDefinition = {
|
|
|
27810
28783
|
from: "content.columns",
|
|
27811
28784
|
fallback: "3"
|
|
27812
28785
|
} },
|
|
27813
|
-
|
|
27814
|
-
from: "content.
|
|
28786
|
+
cardRole: { $bind: {
|
|
28787
|
+
from: "content._cardStyles.role",
|
|
27815
28788
|
fallback: "default"
|
|
27816
28789
|
} },
|
|
27817
28790
|
buttonVariant: { $bind: {
|
|
@@ -27973,6 +28946,7 @@ const eventCollectionSourceSchemaShape = {
|
|
|
27973
28946
|
showVenue: z.boolean().nullable().optional(),
|
|
27974
28947
|
showMap: z.boolean().nullable().optional(),
|
|
27975
28948
|
showCapacity: z.boolean().nullable().optional(),
|
|
28949
|
+
cardRole: cardRoleSchema.optional(),
|
|
27976
28950
|
buttonVariant: eventButtonVariantSchema.optional(),
|
|
27977
28951
|
buttonText: z.string().optional(),
|
|
27978
28952
|
emptyMessage: z.string().optional(),
|
|
@@ -28000,6 +28974,7 @@ const eventCollectionDisplaySchemaShape = {
|
|
|
28000
28974
|
showVenue: z.boolean(),
|
|
28001
28975
|
showMap: z.boolean(),
|
|
28002
28976
|
showCapacity: z.boolean(),
|
|
28977
|
+
cardRole: cardRoleSchema,
|
|
28003
28978
|
buttonVariant: eventButtonVariantSchema,
|
|
28004
28979
|
buttonText: z.string(),
|
|
28005
28980
|
emptyMessage: z.string()
|
|
@@ -28049,6 +29024,7 @@ function buildEventCollectionPresentationDisplay(source) {
|
|
|
28049
29024
|
showVenue: source.showVenue ?? true,
|
|
28050
29025
|
showMap: source.showMap ?? true,
|
|
28051
29026
|
showCapacity: source.showCapacity ?? true,
|
|
29027
|
+
cardRole: source.cardRole ?? "default",
|
|
28052
29028
|
buttonVariant: source.buttonVariant ?? "primary",
|
|
28053
29029
|
buttonText: source.buttonText ?? "Book",
|
|
28054
29030
|
emptyMessage: source.emptyMessage ?? "No upcoming events scheduled."
|
|
@@ -28066,8 +29042,6 @@ function buildEventCollectionHydration(source) {
|
|
|
28066
29042
|
}
|
|
28067
29043
|
//#endregion
|
|
28068
29044
|
//#region ../blocks/src/system/runtime/nodes/events/EventListing.interactive.ts
|
|
28069
|
-
const legacyEventCardVariantSchema = z.enum(["variant1", "variant2"]);
|
|
28070
|
-
const eventCardVariantInputSchema = z.union([cardVariantRoleSchema, legacyEventCardVariantSchema]);
|
|
28071
29045
|
const cardOrientationSchema = z.enum(["vertical", "horizontal"]);
|
|
28072
29046
|
const eventSurfaceScopeSchema = z.enum(eventSurfaceScopeValues);
|
|
28073
29047
|
const eventScheduleScopeSchema = z.enum(eventScheduleScopeValues);
|
|
@@ -28082,7 +29056,7 @@ const eventListingSourceSchema = z.object({
|
|
|
28082
29056
|
paginationMode: z.enum(["loadMore", "seeAllLink"]).optional(),
|
|
28083
29057
|
seeAllUrl: z.string().optional(),
|
|
28084
29058
|
loadMoreText: z.string().optional(),
|
|
28085
|
-
|
|
29059
|
+
cardRole: cardRoleSchema.optional(),
|
|
28086
29060
|
buttonVariant: eventButtonVariantSchema.optional(),
|
|
28087
29061
|
buttonText: z.string().optional(),
|
|
28088
29062
|
showVenue: z.boolean().optional(),
|
|
@@ -28104,7 +29078,7 @@ const eventListingDisplaySchema = z.object({
|
|
|
28104
29078
|
emptyMessage: z.string(),
|
|
28105
29079
|
loadingMessage: z.string(),
|
|
28106
29080
|
containerClass: z.string(),
|
|
28107
|
-
|
|
29081
|
+
cardRole: cardRoleSchema,
|
|
28108
29082
|
buttonVariant: eventButtonVariantSchema,
|
|
28109
29083
|
buttonText: z.string(),
|
|
28110
29084
|
showVenue: z.boolean(),
|
|
@@ -28160,7 +29134,7 @@ const eventListingBlockRuntime = defineProgressiveBlockRuntime({
|
|
|
28160
29134
|
emptyMessage: source.emptyMessage ?? "No upcoming events scheduled.",
|
|
28161
29135
|
loadingMessage: "Loading events…",
|
|
28162
29136
|
containerClass: getContainerClass(layout, source.columns ?? "3"),
|
|
28163
|
-
|
|
29137
|
+
cardRole: source.cardRole ?? "default",
|
|
28164
29138
|
buttonVariant: source.buttonVariant ?? "primary",
|
|
28165
29139
|
buttonText: source.buttonText ?? "Book",
|
|
28166
29140
|
showVenue: source.showVenue ?? true,
|
|
@@ -28482,8 +29456,8 @@ const eventListingBlockDefinition = {
|
|
|
28482
29456
|
from: "content.loadMoreText",
|
|
28483
29457
|
fallback: "Load more events"
|
|
28484
29458
|
} },
|
|
28485
|
-
|
|
28486
|
-
from: "content.
|
|
29459
|
+
cardRole: { $bind: {
|
|
29460
|
+
from: "content._cardStyles.role",
|
|
28487
29461
|
fallback: "default"
|
|
28488
29462
|
} },
|
|
28489
29463
|
buttonVariant: { $bind: {
|
|
@@ -28753,6 +29727,10 @@ const eventCalendarLayout = [styledSection({
|
|
|
28753
29727
|
filterCategoryIds: { $bind: { from: "content.filterCategoryIds" } },
|
|
28754
29728
|
filterStaffMemberId: { $bind: { from: "content.filterStaffMemberId" } },
|
|
28755
29729
|
filterVenueId: { $bind: { from: "content.filterVenueId" } },
|
|
29730
|
+
cardRole: { $bind: {
|
|
29731
|
+
from: "content._cardStyles.role",
|
|
29732
|
+
fallback: "default"
|
|
29733
|
+
} },
|
|
28756
29734
|
buttonVariant: { $bind: {
|
|
28757
29735
|
from: "content.buttonVariant",
|
|
28758
29736
|
fallback: "primary"
|
|
@@ -29385,11 +30363,11 @@ const eventCalendarAdditionalFields = [
|
|
|
29385
30363
|
searchThreshold: 8
|
|
29386
30364
|
}
|
|
29387
30365
|
}),
|
|
29388
|
-
...cardStylingFields.
|
|
30366
|
+
...cardStylingFields.map((field) => ({
|
|
29389
30367
|
...field,
|
|
29390
30368
|
ui: {
|
|
29391
30369
|
...field.ui ?? {},
|
|
29392
|
-
intent: field.id === "buttonVariant" ? "style" : "content"
|
|
30370
|
+
intent: field.id === "_cardStyles" || field.id === "buttonVariant" ? "style" : "content"
|
|
29393
30371
|
}
|
|
29394
30372
|
})),
|
|
29395
30373
|
{
|
|
@@ -30156,7 +31134,7 @@ const offeringsPreviewBlockDefinition = {
|
|
|
30156
31134
|
dataSchemas: {
|
|
30157
31135
|
...offeringsPreviewEventDataSchemas,
|
|
30158
31136
|
routeCandidates: publicRouteCandidatesSchema.optional(),
|
|
30159
|
-
courses:
|
|
31137
|
+
courses: publicWholeSeriesOfferingsArraySchema.optional()
|
|
30160
31138
|
},
|
|
30161
31139
|
dataLoaders: {
|
|
30162
31140
|
...offeringsPreviewEventDataLoaders,
|
|
@@ -31628,7 +32606,7 @@ const audioPlayerBlockDefinition = { manifest: createBlockManifest({
|
|
|
31628
32606
|
}
|
|
31629
32607
|
],
|
|
31630
32608
|
layout: styledSection({
|
|
31631
|
-
children: stack({ className: "rb-container rb-mx-auto rb-max-w-3xl" }, [el("div", { className: "
|
|
32609
|
+
children: stack({ className: "rb-container rb-mx-auto rb-max-w-3xl" }, [el("div", { className: boxStyleClassNames({ role: "default" }, {}) }, [media({
|
|
31632
32610
|
className: "card-media rb-aspect-video rb-w-full rb-object-cover",
|
|
31633
32611
|
size: {
|
|
31634
32612
|
width: 960,
|
|
@@ -34680,16 +35658,27 @@ function eventListCapable() {
|
|
|
34680
35658
|
looks: "supported",
|
|
34681
35659
|
sectionSurfaces: "supported",
|
|
34682
35660
|
contentFrames: ["plain", "panel"],
|
|
34683
|
-
cardRoles: "
|
|
35661
|
+
cardRoles: "supported",
|
|
34684
35662
|
eventListTreatments
|
|
34685
35663
|
});
|
|
34686
35664
|
}
|
|
35665
|
+
function eventSpotlightCapable() {
|
|
35666
|
+
return declareBlockDesignCapability({
|
|
35667
|
+
sectionSurfaces: "supported",
|
|
35668
|
+
contentFrames: ["plain"],
|
|
35669
|
+
cardRoles: "supported"
|
|
35670
|
+
});
|
|
35671
|
+
}
|
|
34687
35672
|
function offeringsPreviewCapable() {
|
|
34688
35673
|
return declareBlockDesignCapability({
|
|
34689
35674
|
looks: "supported",
|
|
34690
35675
|
sectionSurfaces: "supported",
|
|
34691
35676
|
contentFrames: ["plain"],
|
|
34692
|
-
cardRoles: "supported"
|
|
35677
|
+
cardRoles: "supported",
|
|
35678
|
+
compositions: {
|
|
35679
|
+
kind: "offerings-preview",
|
|
35680
|
+
treatments: offeringsPreviewCompositionTreatmentValues
|
|
35681
|
+
}
|
|
34693
35682
|
});
|
|
34694
35683
|
}
|
|
34695
35684
|
function defaultBoundaryBias(visualWeight) {
|
|
@@ -34982,7 +35971,7 @@ const systemBlockDefinitions = [
|
|
|
34982
35971
|
cardRoles: "supported",
|
|
34983
35972
|
compositions: {
|
|
34984
35973
|
kind: "testimonials",
|
|
34985
|
-
treatments:
|
|
35974
|
+
treatments: testimonialsCompositionTreatmentValues
|
|
34986
35975
|
},
|
|
34987
35976
|
headingDecorationCapability: {
|
|
34988
35977
|
kind: "supported",
|
|
@@ -35137,7 +36126,7 @@ const systemBlockDefinitions = [
|
|
|
35137
36126
|
weight: "standard"
|
|
35138
36127
|
})]
|
|
35139
36128
|
})),
|
|
35140
|
-
withDesignCapability("block.event-spotlight", eventSpotlightBlockDefinition,
|
|
36129
|
+
withDesignCapability("block.event-spotlight", eventSpotlightBlockDefinition, eventSpotlightCapable(), defineBlockDesignMetadata({
|
|
35141
36130
|
flow: offeringsFlow,
|
|
35142
36131
|
layoutProfiles: [layoutProfile({
|
|
35143
36132
|
variantKey: "default",
|
|
@@ -36376,184 +37365,29 @@ const EVENT_ATTENDEE_REFUND_INVALID_CODES = ["manual_booking_not_refundable", ..
|
|
|
36376
37365
|
[...EVENT_ATTENDEE_REFUND_INVALID_CODES, ...CANONICAL_ADMIN_REFUND_FAILURE_CODES];
|
|
36377
37366
|
[...STANDARD_LINE_ITEM_REFUND_INVALID_CODES, ...CANONICAL_ADMIN_REFUND_FAILURE_CODES];
|
|
36378
37367
|
//#endregion
|
|
36379
|
-
//#region ../api/src/
|
|
36380
|
-
|
|
36381
|
-
|
|
36382
|
-
|
|
36383
|
-
|
|
36384
|
-
|
|
36385
|
-
|
|
36386
|
-
|
|
36387
|
-
|
|
36388
|
-
|
|
36389
|
-
|
|
36390
|
-
|
|
36391
|
-
|
|
36392
|
-
|
|
36393
|
-
|
|
36394
|
-
|
|
36395
|
-
|
|
36396
|
-
|
|
36397
|
-
|
|
36398
|
-
|
|
36399
|
-
|
|
36400
|
-
|
|
36401
|
-
//#region ../api/src/bookingVerticalCatalog.ts
|
|
36402
|
-
const VERTICAL_BOOKING_PRESETS = [
|
|
36403
|
-
verticalBookingPreset("yoga_wellness.classes", "yoga_wellness", "class", "Class", "Classes", "Regular scheduled classes and group sessions."),
|
|
36404
|
-
verticalBookingPreset("yoga_wellness.workshops", "yoga_wellness", "workshop", "Workshop", "Workshops", "One-off workshops, day retreats, or special sessions."),
|
|
36405
|
-
verticalBookingPreset("yoga_wellness.courses", "yoga_wellness", "course", "Course", "Courses", "Fixed-schedule courses or multi-session groups."),
|
|
36406
|
-
verticalBookingPreset("yoga_wellness.retreats", "yoga_wellness", "retreat", "Retreat", "Retreats", "Multi-day or residential retreats and immersive experiences."),
|
|
36407
|
-
verticalBookingPreset("yoga_wellness.appointments", "yoga_wellness", "appointment", "Appointment", "Appointments", "Private sessions, consultations, or one-to-one support."),
|
|
36408
|
-
verticalBookingPreset("fitness_pt.group_training", "fitness_pt", "class", "Group training", "Group training", "Regular scheduled classes and group sessions."),
|
|
36409
|
-
verticalBookingPreset("fitness_pt.personal_training", "fitness_pt", "appointment", "Personal training", "Personal training", "One-to-one sessions booked from your availability."),
|
|
36410
|
-
verticalBookingPreset("fitness_pt.programmes", "fitness_pt", "course", "Programme", "Programmes", "Multi-session programmes like bootcamps or courses."),
|
|
36411
|
-
verticalBookingPreset("fitness_pt.workshops", "fitness_pt", "workshop", "Workshop", "Workshops", "One-off workshops, events, or special sessions."),
|
|
36412
|
-
verticalBookingPreset("fitness_pt.retreats", "fitness_pt", "retreat", "Retreat", "Retreats", "Multi-day or residential fitness experiences."),
|
|
36413
|
-
verticalBookingPreset("dance_school.classes", "dance_school", "class", "Class", "Classes", "Regular group classes and weekly sessions."),
|
|
36414
|
-
verticalBookingPreset("dance_school.terms", "dance_school", "course", "Term", "Terms", "Multi-week term blocks or fixed-date course groups."),
|
|
36415
|
-
verticalBookingPreset("dance_school.courses", "dance_school", "course", "Course", "Courses", "Fixed-schedule courses or multi-session groups.", "settings"),
|
|
36416
|
-
verticalBookingPreset("dance_school.workshops", "dance_school", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, or intensives."),
|
|
36417
|
-
verticalBookingPreset("dance_school.private_lessons", "dance_school", "appointment", "Private lesson", "Private lessons", "One-to-one lessons or coaching sessions."),
|
|
36418
|
-
verticalBookingPreset("dance_school.shows", "dance_school", "performance", "Show", "Shows", "Ticketed performances, showcases, and recitals."),
|
|
36419
|
-
verticalBookingPreset("physiotherapy_physical_health.appointments", "physiotherapy_physical_health", "appointment", "Appointment", "Appointments", "Assessments, treatments, follow-ups, and rehabilitation sessions."),
|
|
36420
|
-
verticalBookingPreset("physiotherapy_physical_health.rehab_classes", "physiotherapy_physical_health", "class", "Rehab class", "Rehab classes", "Regular rehabilitation, mobility, strength, or recovery classes."),
|
|
36421
|
-
verticalBookingPreset("physiotherapy_physical_health.workshops", "physiotherapy_physical_health", "workshop", "Workshop", "Workshops", "One-off workshops, talks, or practical group sessions."),
|
|
36422
|
-
verticalBookingPreset("massage_bodywork.treatments", "massage_bodywork", "appointment", "Treatment", "Treatments", "Massage treatments, bodywork sessions, and one-to-one appointments."),
|
|
36423
|
-
verticalBookingPreset("massage_bodywork.group_sessions", "massage_bodywork", "class", "Group session", "Group sessions", "Regular bodywork, somatic movement, or self-massage sessions."),
|
|
36424
|
-
verticalBookingPreset("massage_bodywork.workshops", "massage_bodywork", "workshop", "Workshop", "Workshops", "One-off bodywork, self-massage, or somatic practice workshops."),
|
|
36425
|
-
verticalBookingPreset("therapist_practitioner.appointments", "therapist_practitioner", "appointment", "Appointment", "Appointments", "Sessions, consultations, treatments, or assessments."),
|
|
36426
|
-
verticalBookingPreset("therapist_practitioner.workshops", "therapist_practitioner", "workshop", "Workshop", "Workshops", "One-off group workshops, talks, or wellbeing sessions."),
|
|
36427
|
-
verticalBookingPreset("therapist_practitioner.retreats", "therapist_practitioner", "retreat", "Retreat", "Retreats", "Multi-day retreats or immersive group experiences."),
|
|
36428
|
-
verticalBookingPreset("beauty_spa.appointments", "beauty_spa", "appointment", "Appointment", "Appointments", "Treatments, consultations, services, and sessions."),
|
|
36429
|
-
verticalBookingPreset("beauty_spa.workshops", "beauty_spa", "workshop", "Workshop", "Workshops", "Skincare workshops, makeup lessons, demos, or group events."),
|
|
36430
|
-
verticalBookingPreset("consultant_coach.appointments", "consultant_coach", "appointment", "Appointment", "Appointments", "One-to-one calls, consultations, reviews, or coaching sessions."),
|
|
36431
|
-
verticalBookingPreset("consultant_coach.workshops", "consultant_coach", "workshop", "Workshop", "Workshops", "One-off group sessions, webinars, or strategy days."),
|
|
36432
|
-
verticalBookingPreset("consultant_coach.courses", "consultant_coach", "course", "Course", "Courses", "Fixed-schedule cohorts or multi-session group programmes."),
|
|
36433
|
-
verticalBookingPreset("consultant_coach.retreats", "consultant_coach", "retreat", "Retreat", "Retreats", "Multi-day coaching retreats or immersive experiences."),
|
|
36434
|
-
verticalBookingPreset("training_provider.courses", "training_provider", "course", "Course", "Courses", "Fixed-schedule courses, cohorts, and multi-session training."),
|
|
36435
|
-
verticalBookingPreset("training_provider.workshops", "training_provider", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, and short training sessions."),
|
|
36436
|
-
verticalBookingPreset("training_provider.appointments", "training_provider", "appointment", "Appointment", "Appointments", "Consultations, assessments, mentoring, or office hours."),
|
|
36437
|
-
verticalBookingPreset("training_provider.classes", "training_provider", "class", "Class", "Classes", "Regular classes, sessions, or groups.", "settings"),
|
|
36438
|
-
verticalBookingPreset("training_provider.residentials", "training_provider", "retreat", "Residential", "Residentials", "Residential courses or multi-day training experiences.", "settings"),
|
|
36439
|
-
verticalBookingPreset("retreat_centre.retreats", "retreat_centre", "retreat", "Retreat", "Retreats", "Multi-day or residential retreats with richer booking needs."),
|
|
36440
|
-
verticalBookingPreset("retreat_centre.workshops", "retreat_centre", "workshop", "Workshop", "Workshops", "One-day retreats, ceremonies, workshops, or special events."),
|
|
36441
|
-
verticalBookingPreset("retreat_centre.classes", "retreat_centre", "class", "Class", "Classes", "Regular sessions like guided meditations or group practices."),
|
|
36442
|
-
verticalBookingPreset("retreat_centre.courses", "retreat_centre", "course", "Course", "Courses", "Fixed-schedule programmes or multi-session experiences."),
|
|
36443
|
-
verticalBookingPreset("retreat_centre.appointments", "retreat_centre", "appointment", "Appointment", "Appointments", "Private sessions, therapies, consultations, or add-ons."),
|
|
36444
|
-
verticalBookingPreset("music_school.lessons", "music_school", "appointment", "Lesson", "Lessons", "One-to-one lessons, consultations, or coaching sessions."),
|
|
36445
|
-
verticalBookingPreset("music_school.classes", "music_school", "class", "Class", "Classes", "Regular group classes, ensembles, or recurring sessions."),
|
|
36446
|
-
verticalBookingPreset("music_school.terms", "music_school", "course", "Term", "Terms", "Multi-week term blocks or fixed-date group courses."),
|
|
36447
|
-
verticalBookingPreset("music_school.workshops", "music_school", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, or intensives."),
|
|
36448
|
-
verticalBookingPreset("music_school.performances", "music_school", "performance", "Performance", "Performances", "Concerts, recitals, showcases, or ticketed performances."),
|
|
36449
|
-
verticalBookingPreset("voice_singing.lessons", "voice_singing", "appointment", "Voice session", "Voice sessions", "One-to-one singing lessons, voice coaching, or private practice sessions."),
|
|
36450
|
-
verticalBookingPreset("voice_singing.classes", "voice_singing", "class", "Ongoing weekly session", "Ongoing weekly sessions", "Regular choirs, voice circles, community singing, or group practice."),
|
|
36451
|
-
verticalBookingPreset("voice_singing.terms", "voice_singing", "course", "Singing term", "Singing terms", "Multi-week choir terms, voice courses, or fixed-date group programmes."),
|
|
36452
|
-
verticalBookingPreset("voice_singing.workshops", "voice_singing", "workshop", "Workshop", "Workshops", "One-off singing workshops, voice journeys, or devotional singing sessions."),
|
|
36453
|
-
verticalBookingPreset("voice_singing.performances", "voice_singing", "performance", "Performance", "Performances", "Choir concerts, sharing events, recitals, or community performances."),
|
|
36454
|
-
verticalBookingPreset("performing_arts_school.classes", "performing_arts_school", "class", "Class", "Classes", "Regular group classes, rehearsals, or weekly sessions."),
|
|
36455
|
-
verticalBookingPreset("performing_arts_school.terms", "performing_arts_school", "course", "Term", "Terms", "Multi-week term blocks or fixed-date course groups."),
|
|
36456
|
-
verticalBookingPreset("performing_arts_school.workshops", "performing_arts_school", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, or intensives."),
|
|
36457
|
-
verticalBookingPreset("performing_arts_school.performances", "performing_arts_school", "performance", "Performance", "Performances", "Shows, showcases, productions, or ticketed performances."),
|
|
36458
|
-
verticalBookingPreset("performing_arts_school.lessons", "performing_arts_school", "appointment", "Lesson", "Lessons", "One-to-one lessons, coaching, or audition prep."),
|
|
36459
|
-
verticalBookingPreset("community_wellbeing.classes", "community_wellbeing", "class", "Class", "Classes", "Regular groups, sessions, practices, or weekly activities."),
|
|
36460
|
-
verticalBookingPreset("community_wellbeing.workshops", "community_wellbeing", "workshop", "Workshop", "Workshops", "One-off workshops, talks, events, or gatherings."),
|
|
36461
|
-
verticalBookingPreset("community_wellbeing.courses", "community_wellbeing", "course", "Course", "Courses", "Fixed-schedule courses, study groups, or multi-session programmes."),
|
|
36462
|
-
verticalBookingPreset("community_wellbeing.appointments", "community_wellbeing", "appointment", "Appointment", "Appointments", "One-to-one appointments, consultations, or support sessions."),
|
|
36463
|
-
verticalBookingPreset("community_wellbeing.retreats", "community_wellbeing", "retreat", "Retreat", "Retreats", "Multi-day or residential retreats."),
|
|
36464
|
-
verticalBookingPreset("venue_event_space.resource_hire", "venue_event_space", "appointment", "Hire slot", "Hire slots", "Future room, venue, and resource hire bookings.", "future")
|
|
36465
|
-
];
|
|
36466
|
-
const VERTICAL_ID_SET = /* @__PURE__ */ new Set([
|
|
36467
|
-
"yoga_wellness",
|
|
36468
|
-
"fitness_pt",
|
|
36469
|
-
"dance_school",
|
|
36470
|
-
"physiotherapy_physical_health",
|
|
36471
|
-
"massage_bodywork",
|
|
36472
|
-
"therapist_practitioner",
|
|
36473
|
-
"beauty_spa",
|
|
36474
|
-
"consultant_coach",
|
|
36475
|
-
"training_provider",
|
|
36476
|
-
"retreat_centre",
|
|
36477
|
-
"music_school",
|
|
36478
|
-
"voice_singing",
|
|
36479
|
-
"performing_arts_school",
|
|
36480
|
-
"community_wellbeing",
|
|
36481
|
-
"venue_event_space"
|
|
36482
|
-
]);
|
|
36483
|
-
const VERTICAL_PRESET_ID_SET = new Set(VERTICAL_BOOKING_PRESETS.map((presetDefinition) => presetDefinition.id));
|
|
36484
|
-
function parseVerticalId(value) {
|
|
36485
|
-
return typeof value === "string" && VERTICAL_ID_SET.has(value) ? value : null;
|
|
36486
|
-
}
|
|
36487
|
-
function parseVerticalPresetId(value) {
|
|
36488
|
-
return typeof value === "string" && VERTICAL_PRESET_ID_SET.has(value) ? value : null;
|
|
36489
|
-
}
|
|
36490
|
-
function getVerticalPresetDefinition(presetId) {
|
|
36491
|
-
const definition = VERTICAL_BOOKING_PRESETS.find((presetDefinition) => presetDefinition.id === presetId);
|
|
36492
|
-
if (!definition) throw new Error(`Unhandled vertical preset id: ${presetId}`);
|
|
36493
|
-
return definition;
|
|
36494
|
-
}
|
|
36495
|
-
function toNonEmptyVerticalPresetIds(presetIds) {
|
|
36496
|
-
const firstPresetId = presetIds[0];
|
|
36497
|
-
return firstPresetId ? [firstPresetId, ...presetIds.slice(1)] : null;
|
|
36498
|
-
}
|
|
36499
|
-
function createConfiguredSiteVerticalBookingConfig(verticalId, selectedPresetIds) {
|
|
36500
|
-
return {
|
|
36501
|
-
verticalId,
|
|
36502
|
-
selectedPresetIds
|
|
36503
|
-
};
|
|
36504
|
-
}
|
|
36505
|
-
function createSiteVerticalBookingConfig(verticalId, selectedPresetIds) {
|
|
36506
|
-
const nonEmptyPresetIds = toNonEmptyVerticalPresetIds(selectedPresetIds);
|
|
36507
|
-
return nonEmptyPresetIds ? createConfiguredSiteVerticalBookingConfig(verticalId, nonEmptyPresetIds) : null;
|
|
36508
|
-
}
|
|
36509
|
-
function resolveSiteVerticalBookingConfig(rawConfig) {
|
|
36510
|
-
if (!rawConfig) return {
|
|
36511
|
-
kind: "unconfigured",
|
|
36512
|
-
config: DEFAULT_SITE_VERTICAL_BOOKING_CONFIG
|
|
36513
|
-
};
|
|
36514
|
-
const verticalId = parseVerticalId(rawConfig.verticalId);
|
|
36515
|
-
const selectedPresetIds = (Array.isArray(rawConfig.selectedPresetIds) ? rawConfig.selectedPresetIds : []).map(parseVerticalPresetId).filter((presetId) => Boolean(presetId));
|
|
36516
|
-
const config = {
|
|
36517
|
-
verticalId,
|
|
36518
|
-
selectedPresetIds
|
|
36519
|
-
};
|
|
36520
|
-
if (!verticalId && selectedPresetIds.length === 0) return {
|
|
36521
|
-
kind: "unconfigured",
|
|
36522
|
-
config: DEFAULT_SITE_VERTICAL_BOOKING_CONFIG
|
|
36523
|
-
};
|
|
36524
|
-
const issues = getSiteVerticalConfigIssues(rawConfig, config);
|
|
36525
|
-
if (issues.length > 0) return {
|
|
36526
|
-
kind: "invalid",
|
|
36527
|
-
config,
|
|
36528
|
-
issues
|
|
36529
|
-
};
|
|
36530
|
-
const configuredConfig = verticalId ? createSiteVerticalBookingConfig(verticalId, selectedPresetIds) : null;
|
|
36531
|
-
if (!configuredConfig) return {
|
|
36532
|
-
kind: "invalid",
|
|
36533
|
-
config,
|
|
36534
|
-
issues: ["empty_selected_presets"]
|
|
36535
|
-
};
|
|
36536
|
-
return {
|
|
36537
|
-
kind: "configured",
|
|
36538
|
-
config: configuredConfig,
|
|
36539
|
-
selectedPresets: configuredConfig.selectedPresetIds.map(getVerticalPresetDefinition)
|
|
36540
|
-
};
|
|
36541
|
-
}
|
|
36542
|
-
function getSiteVerticalConfigIssues(rawConfig, config) {
|
|
36543
|
-
const issues = /* @__PURE__ */ new Set();
|
|
36544
|
-
if (rawConfig.verticalId != null && !config.verticalId) issues.add("unknown_vertical");
|
|
36545
|
-
if (!config.verticalId && config.selectedPresetIds.length > 0) issues.add("missing_vertical");
|
|
36546
|
-
if ((Array.isArray(rawConfig.selectedPresetIds) ? rawConfig.selectedPresetIds : []).some((presetId) => parseVerticalPresetId(presetId) === null)) issues.add("unknown_preset");
|
|
36547
|
-
if (config.verticalId && config.selectedPresetIds.length === 0) issues.add("empty_selected_presets");
|
|
36548
|
-
const seenBehaviours = /* @__PURE__ */ new Set();
|
|
36549
|
-
for (const presetId of config.selectedPresetIds) {
|
|
36550
|
-
const presetDefinition = getVerticalPresetDefinition(presetId);
|
|
36551
|
-
if (config.verticalId && presetDefinition.verticalId !== config.verticalId) issues.add("preset_vertical_mismatch");
|
|
36552
|
-
if (presetDefinition.availability === "future") issues.add("future_preset_selected");
|
|
36553
|
-
if (seenBehaviours.has(presetDefinition.canonicalBehaviour)) issues.add("duplicate_canonical_behaviour");
|
|
36554
|
-
seenBehaviours.add(presetDefinition.canonicalBehaviour);
|
|
37368
|
+
//#region ../api/src/bookingVerticals.ts
|
|
37369
|
+
/**
|
|
37370
|
+
* Transport adapters for the booking-vertical domain.
|
|
37371
|
+
*
|
|
37372
|
+
* The domain catalog and all pure resolution/selection rules live in core;
|
|
37373
|
+
* this module owns only the Zod boundary used by API payloads.
|
|
37374
|
+
*/
|
|
37375
|
+
function formatRawDiagnosticValue(value) {
|
|
37376
|
+
const serialized = JSON.stringify(value);
|
|
37377
|
+
return serialized === void 0 ? String(value) : serialized;
|
|
37378
|
+
}
|
|
37379
|
+
function describeSiteVerticalConfigIssue(issue) {
|
|
37380
|
+
switch (issue.code) {
|
|
37381
|
+
case "unknown_vertical": return `${issue.code}: ${formatRawDiagnosticValue(issue.rawValue)}`;
|
|
37382
|
+
case "unknown_preset": return `${issue.code}: ${formatRawDiagnosticValue(issue.rawValue)}`;
|
|
37383
|
+
case "missing_vertical":
|
|
37384
|
+
case "empty_selected_presets":
|
|
37385
|
+
case "preset_vertical_mismatch":
|
|
37386
|
+
case "duplicate_preset_id":
|
|
37387
|
+
case "duplicate_canonical_behaviour":
|
|
37388
|
+
case "future_preset_selected": return issue.code;
|
|
37389
|
+
default: return assertNever$2(issue);
|
|
36555
37390
|
}
|
|
36556
|
-
return [...issues];
|
|
36557
37391
|
}
|
|
36558
37392
|
const VerticalIdSchema = z.string().trim().transform((value, ctx) => {
|
|
36559
37393
|
const parsed = parseVerticalId(value);
|
|
@@ -36585,16 +37419,12 @@ z.object({
|
|
|
36585
37419
|
if (resolved.kind === "invalid") {
|
|
36586
37420
|
ctx.addIssue({
|
|
36587
37421
|
code: z.ZodIssueCode.custom,
|
|
36588
|
-
message: `Invalid booking vertical config: ${resolved.issues.join(", ")}`
|
|
37422
|
+
message: `Invalid booking vertical config: ${resolved.issues.map(describeSiteVerticalConfigIssue).join(", ")}`
|
|
36589
37423
|
});
|
|
36590
37424
|
return z.NEVER;
|
|
36591
37425
|
}
|
|
36592
37426
|
return resolved.config;
|
|
36593
37427
|
});
|
|
36594
|
-
const DEFAULT_SITE_VERTICAL_BOOKING_CONFIG = {
|
|
36595
|
-
verticalId: null,
|
|
36596
|
-
selectedPresetIds: []
|
|
36597
|
-
};
|
|
36598
37428
|
//#endregion
|
|
36599
37429
|
//#region ../api/src/utils/isRecord.ts
|
|
36600
37430
|
function isRecord(value) {
|