@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
package/dist/server/data.mjs
CHANGED
|
@@ -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",
|
|
@@ -12941,7 +13735,8 @@ const curatedSiteStyles = [
|
|
|
12941
13735
|
buttonStyleChoices: [
|
|
12942
13736
|
buttonChoice("soft-pill"),
|
|
12943
13737
|
buttonChoice("pebble"),
|
|
12944
|
-
buttonChoice("confident-chip")
|
|
13738
|
+
buttonChoice("confident-chip"),
|
|
13739
|
+
buttonChoice("flat-ink")
|
|
12945
13740
|
],
|
|
12946
13741
|
paletteRecommendations: [
|
|
12947
13742
|
paletteRecommendation("soft-natural-sage"),
|
|
@@ -15786,8 +16581,41 @@ function containerStylesField(options = {}) {
|
|
|
15786
16581
|
return createBoxStylesFieldWithDepth("container", options);
|
|
15787
16582
|
}
|
|
15788
16583
|
function cardStylesField(options = {}) {
|
|
16584
|
+
if (options.controls === "role-only") return createRoleOnlyCardStylesField(options);
|
|
15789
16585
|
return createBoxStylesFieldWithDepth("card", options);
|
|
15790
16586
|
}
|
|
16587
|
+
function createRoleOnlyCardStylesField(options) {
|
|
16588
|
+
const { id = "_cardStyles", label = "Card styles", renderInHeader, intent } = options;
|
|
16589
|
+
return {
|
|
16590
|
+
id,
|
|
16591
|
+
type: "modal",
|
|
16592
|
+
label,
|
|
16593
|
+
required: false,
|
|
16594
|
+
schema: { fields: [{
|
|
16595
|
+
id: "role",
|
|
16596
|
+
type: "select",
|
|
16597
|
+
label: "Card style",
|
|
16598
|
+
description: "Choose a semantic card style from the active site style.",
|
|
16599
|
+
required: false,
|
|
16600
|
+
multiple: false,
|
|
16601
|
+
defaultValue: "default",
|
|
16602
|
+
options: cardVariantRoleValues.map((value) => ({
|
|
16603
|
+
value,
|
|
16604
|
+
label: value === "default" ? "Default" : "Alternative"
|
|
16605
|
+
}))
|
|
16606
|
+
}] },
|
|
16607
|
+
ui: {
|
|
16608
|
+
...typeof renderInHeader === "boolean" ? { renderInHeader } : {},
|
|
16609
|
+
...intent ? { intent } : {},
|
|
16610
|
+
modalConfig: {
|
|
16611
|
+
buttonLabel: label,
|
|
16612
|
+
description: "Choose the site-style card role.",
|
|
16613
|
+
buttonVariant: "outline",
|
|
16614
|
+
showCustomizedIndicator: true
|
|
16615
|
+
}
|
|
16616
|
+
}
|
|
16617
|
+
};
|
|
16618
|
+
}
|
|
15791
16619
|
//#endregion
|
|
15792
16620
|
//#region ../blocks/src/system/fields/imageShape.ts
|
|
15793
16621
|
const standardImageShapeOptions = [
|
|
@@ -16983,21 +17811,29 @@ function cardRoleClass(role) {
|
|
|
16983
17811
|
return `card-role-${role}`;
|
|
16984
17812
|
}
|
|
16985
17813
|
/**
|
|
17814
|
+
* The role class for a card slot the *block* owns structurally, where a Look
|
|
17815
|
+
* may still name the surface.
|
|
17816
|
+
*
|
|
17817
|
+
* Some layouts have more than one card slot and decide themselves which one is
|
|
17818
|
+
* the statement — the featured-editorial testimonials field is a lead voice
|
|
17819
|
+
* beside its supporting voices, and that is structure, not composition. Those
|
|
17820
|
+
* slots still have to honour a Look that picks a surface, or a role-picking
|
|
17821
|
+
* Look would silently no-op under the layout. So the slot carries a default
|
|
17822
|
+
* role and the Look's compiled role wins over it when there is one.
|
|
17823
|
+
*
|
|
17824
|
+
* An explicit `none` is honoured as boxlessness and emits no class, matching
|
|
17825
|
+
* how the composite emitter reads it.
|
|
17826
|
+
*/
|
|
17827
|
+
/**
|
|
16986
17828
|
* The role a card renders with, and the one place a set of card styles becomes
|
|
16987
17829
|
* a role.
|
|
16988
17830
|
*
|
|
16989
|
-
* Precedence: a per-item override, then the `role` a Look
|
|
16990
|
-
* block's card styles
|
|
16991
|
-
*
|
|
16992
|
-
* vocabulary — an explicit `role` wins when a record carries both.
|
|
16993
|
-
*
|
|
16994
|
-
* Compiled and freshly authored card styles carry only `role`. `cardVariant`
|
|
16995
|
-
* survives on content persisted before the role contract, and normalizes here
|
|
16996
|
-
* rather than in `cardStylesOverrideSchema` because that content reaches the
|
|
16997
|
-
* renderer as a raw record without ever passing through the schema.
|
|
17831
|
+
* Precedence: a per-item override, then the `role` a Look or semantic field
|
|
17832
|
+
* compiled onto the block's card styles. Persisted inputs are normalized at
|
|
17833
|
+
* this boundary because raw block records do not pass through the theme schema.
|
|
16998
17834
|
*/
|
|
16999
17835
|
function resolveCardRoleForBoxStyles(input, override) {
|
|
17000
|
-
return override ?? normalizeCardRole(input.role)
|
|
17836
|
+
return override ?? normalizeCardRole(input.role);
|
|
17001
17837
|
}
|
|
17002
17838
|
/**
|
|
17003
17839
|
* Parse a block's own per-item surface vocabulary into a card role. The alias
|
|
@@ -17014,8 +17850,8 @@ function resolveItemCardRole(value, aliases) {
|
|
|
17014
17850
|
* The card surface for a set of box styles: one role, one class vocabulary, so
|
|
17015
17851
|
* a site-style swap re-skins the card whichever field named it.
|
|
17016
17852
|
*/
|
|
17017
|
-
function cardSurface(input, override) {
|
|
17018
|
-
const role = resolveCardRoleForBoxStyles(input, override);
|
|
17853
|
+
function cardSurface(input, override, fallback) {
|
|
17854
|
+
const role = resolveCardRoleForBoxStyles(input, override) ?? fallback ?? null;
|
|
17019
17855
|
if (!role) return {
|
|
17020
17856
|
role: null,
|
|
17021
17857
|
classes: []
|
|
@@ -17112,10 +17948,9 @@ function raisedClassFor(options) {
|
|
|
17112
17948
|
* of keeping a copy that drifts.
|
|
17113
17949
|
*/
|
|
17114
17950
|
function boxStyleClassNames(value, options) {
|
|
17115
|
-
|
|
17116
|
-
const input = value;
|
|
17951
|
+
const input = value && typeof value === "object" ? value : {};
|
|
17117
17952
|
const borderOverride = borderOverrideClass(input);
|
|
17118
|
-
const surface = cardSurface(input, options.cardRoleOverride);
|
|
17953
|
+
const surface = cardSurface(input, options.cardRoleOverride, options.cardRoleFallback);
|
|
17119
17954
|
const cardOwnsBorder = surface.role !== null && surface.role !== "none";
|
|
17120
17955
|
return [
|
|
17121
17956
|
borderOverride || cardOwnsBorder ? withoutBorderClasses(options.baseClass ?? "") : options.baseClass ?? "",
|
|
@@ -17263,29 +18098,41 @@ const cardRoleClassTransform = {
|
|
|
17263
18098
|
return baseClass ? `${baseClass.trim()} ${hook}` : hook;
|
|
17264
18099
|
}
|
|
17265
18100
|
};
|
|
17266
|
-
|
|
17267
|
-
|
|
18101
|
+
/**
|
|
18102
|
+
* The role class for a layout's own card slot, bound from the block's compiled
|
|
18103
|
+
* card styles so a Look that picks a surface still reaches a slot the layout
|
|
18104
|
+
* assigned a default role to.
|
|
18105
|
+
*/
|
|
18106
|
+
const cardSlotRoleTransform = {
|
|
18107
|
+
id: "boxStyles.cardSlotRole",
|
|
17268
18108
|
kind: "string",
|
|
17269
|
-
summary: "
|
|
17270
|
-
run: (value, options) => {
|
|
17271
|
-
|
|
17272
|
-
|
|
17273
|
-
|
|
17274
|
-
|
|
17275
|
-
return baseClass ? `${baseClass} ${roleClass}` : roleClass;
|
|
17276
|
-
}
|
|
18109
|
+
summary: "Resolve a layout card slot's role class, defaulting to the slot's own role",
|
|
18110
|
+
run: (value, options) => boxStyleClassNames(value, {
|
|
18111
|
+
baseClass: options?.baseClass,
|
|
18112
|
+
cardRoleFallback: options.slotDefault,
|
|
18113
|
+
includeSpacing: false
|
|
18114
|
+
})
|
|
17277
18115
|
};
|
|
18116
|
+
function resolveBorderColorState(value, options, viewModel) {
|
|
18117
|
+
const input = asPartialObject(options?.stylesPath ? readPath(viewModel, options.stylesPath) : value);
|
|
18118
|
+
if (!input) return null;
|
|
18119
|
+
return {
|
|
18120
|
+
input,
|
|
18121
|
+
role: resolveCardRoleForBoxStyles(input, options?.stylesPath ? resolveItemCardRole(value, options.itemRoleAliases) : void 0)
|
|
18122
|
+
};
|
|
18123
|
+
}
|
|
17278
18124
|
const boxStylesBorderColorTransform = {
|
|
17279
18125
|
id: "boxStyles.borderColor",
|
|
17280
18126
|
kind: "string",
|
|
17281
18127
|
summary: "Resolve border color from box styles border.colorToken",
|
|
17282
|
-
run: (value, options,
|
|
18128
|
+
run: (value, options, context) => {
|
|
17283
18129
|
const fallbackToken = options?.fallbackToken ?? "border";
|
|
17284
18130
|
const returnEmptyForDefault = options?.returnEmptyForDefault ?? false;
|
|
17285
18131
|
let explicitToken = null;
|
|
17286
|
-
const
|
|
17287
|
-
if (
|
|
17288
|
-
|
|
18132
|
+
const state = resolveBorderColorState(value, options, context.viewModel);
|
|
18133
|
+
if (state) {
|
|
18134
|
+
if (state.role && state.role !== "none") return "";
|
|
18135
|
+
const border = normalizeBoxStylesBorder(state.input.border);
|
|
17289
18136
|
if (border && border.enabled === true && border.colorToken) explicitToken = border.colorToken;
|
|
17290
18137
|
}
|
|
17291
18138
|
if (explicitToken) {
|
|
@@ -17505,7 +18352,7 @@ const boxStylesTransforms = [
|
|
|
17505
18352
|
roundedTransform,
|
|
17506
18353
|
boxStylesCompositeTransform,
|
|
17507
18354
|
cardRoleClassTransform,
|
|
17508
|
-
|
|
18355
|
+
cardSlotRoleTransform,
|
|
17509
18356
|
boxStylesBorderColorTransform,
|
|
17510
18357
|
sectionClassNameTransform,
|
|
17511
18358
|
containerStylesResolveClassName,
|
|
@@ -17612,10 +18459,16 @@ function styledCard(children, opts, ...mods) {
|
|
|
17612
18459
|
const style = {
|
|
17613
18460
|
...opts.style ?? {},
|
|
17614
18461
|
borderColor: { $bind: {
|
|
17615
|
-
from: opts.stylesFrom,
|
|
18462
|
+
from: opts.itemRole?.from ?? opts.stylesFrom,
|
|
17616
18463
|
transforms: [{
|
|
17617
18464
|
id: "boxStyles.borderColor",
|
|
17618
|
-
options: {
|
|
18465
|
+
options: {
|
|
18466
|
+
returnEmptyForDefault: true,
|
|
18467
|
+
...opts.itemRole ? {
|
|
18468
|
+
stylesPath: opts.stylesFrom,
|
|
18469
|
+
...opts.itemRole.aliases ? { itemRoleAliases: opts.itemRole.aliases } : {}
|
|
18470
|
+
} : {}
|
|
18471
|
+
}
|
|
17619
18472
|
}]
|
|
17620
18473
|
} }
|
|
17621
18474
|
};
|
|
@@ -18740,18 +19593,73 @@ function buildGridCardsLayout(className) {
|
|
|
18740
19593
|
return el("div", { className }, buildResponsiveGridCards());
|
|
18741
19594
|
}
|
|
18742
19595
|
/**
|
|
19596
|
+
* The card slots the featured-editorial layout has, and the role each one
|
|
19597
|
+
* defaults to.
|
|
19598
|
+
*
|
|
19599
|
+
* Which slot is the statement is *structure*, so the layout decides it: this
|
|
19600
|
+
* variant exists to put one lead voice beside its supporting voices. But a Look
|
|
19601
|
+
* that picks a surface has to keep meaning something here, so the lead slot's
|
|
19602
|
+
* role is a default the Look's compiled `cardRole` wins over — see
|
|
19603
|
+
* `cardSlotRoleClass`. Supporting voices stay the quiet everyday card.
|
|
19604
|
+
*/
|
|
19605
|
+
const FEATURED_EDITORIAL_SLOTS = {
|
|
19606
|
+
lead: {
|
|
19607
|
+
/** Composition CSS addresses the lead card's geometry through this. */
|
|
19608
|
+
variantClass: "rb-testimonials-fe-card--feature",
|
|
19609
|
+
slotDefault: "alternative",
|
|
19610
|
+
followsLook: true
|
|
19611
|
+
},
|
|
19612
|
+
support: {
|
|
19613
|
+
variantClass: null,
|
|
19614
|
+
slotDefault: "default",
|
|
19615
|
+
followsLook: false
|
|
19616
|
+
}
|
|
19617
|
+
};
|
|
19618
|
+
/** Where the testimonials block's compiled card styles live. */
|
|
19619
|
+
const TESTIMONIALS_CARD_STYLES_PATH = "content._cardStyles";
|
|
19620
|
+
/**
|
|
19621
|
+
* The class list for one featured-editorial card slot.
|
|
19622
|
+
*
|
|
19623
|
+
* A slot that follows the Look has to resolve at render time, so it binds
|
|
19624
|
+
* through the shared card-class emitter rather than naming a role class here;
|
|
19625
|
+
* a slot that does not is a plain string built by the same composite emitter.
|
|
19626
|
+
*/
|
|
19627
|
+
function featuredEditorialCardClassName(slot) {
|
|
19628
|
+
const { variantClass, slotDefault, followsLook } = FEATURED_EDITORIAL_SLOTS[slot];
|
|
19629
|
+
const baseClass = ["rb-testimonials-fe-card", variantClass].filter(Boolean).join(" ");
|
|
19630
|
+
if (!followsLook) return boxStyleClassNames({}, {
|
|
19631
|
+
baseClass,
|
|
19632
|
+
cardRoleFallback: slotDefault,
|
|
19633
|
+
includeSpacing: false
|
|
19634
|
+
});
|
|
19635
|
+
return { $bind: {
|
|
19636
|
+
from: TESTIMONIALS_CARD_STYLES_PATH,
|
|
19637
|
+
transforms: [{
|
|
19638
|
+
id: "boxStyles.cardSlotRole",
|
|
19639
|
+
options: {
|
|
19640
|
+
baseClass,
|
|
19641
|
+
slotDefault
|
|
19642
|
+
}
|
|
19643
|
+
}],
|
|
19644
|
+
fallback: boxStyleClassNames({}, {
|
|
19645
|
+
baseClass,
|
|
19646
|
+
cardRoleFallback: slotDefault,
|
|
19647
|
+
includeSpacing: false
|
|
19648
|
+
})
|
|
19649
|
+
} };
|
|
19650
|
+
}
|
|
19651
|
+
/**
|
|
18743
19652
|
* Build a single "featured editorial" testimonial card.
|
|
18744
19653
|
*
|
|
18745
|
-
* This card type deliberately renders NO avatar/headshot:
|
|
18746
|
-
*
|
|
18747
|
-
*
|
|
18748
|
-
*
|
|
18749
|
-
* - `rb-testimonials-fe-card--plain` → white surface card
|
|
19654
|
+
* This card type deliberately renders NO avatar/headshot: a quote mark, the
|
|
19655
|
+
* quote body, then the author name and a context line. The card surface comes
|
|
19656
|
+
* from the slot's card role — the site style owns the fill, border, corners and
|
|
19657
|
+
* padding.
|
|
18750
19658
|
*
|
|
18751
19659
|
* Extra modifiers (`repeat`, `when`) are forwarded to the card node so the
|
|
18752
19660
|
* caller can drive first-vs-rest branching.
|
|
18753
19661
|
*/
|
|
18754
|
-
function buildFeaturedEditorialCard(
|
|
19662
|
+
function buildFeaturedEditorialCard(slot, ...mods) {
|
|
18755
19663
|
const quoteMark = text({
|
|
18756
19664
|
as: "span",
|
|
18757
19665
|
className: "rb-testimonials-fe-qmark",
|
|
@@ -18765,11 +19673,11 @@ function buildFeaturedEditorialCard(variantClass, ...mods) {
|
|
|
18765
19673
|
as: "span",
|
|
18766
19674
|
className: "rb-testimonials-fe-context"
|
|
18767
19675
|
}, when("testimonial.content.jobTitle"), bind("testimonial.content.jobTitle"))]);
|
|
18768
|
-
return el("div", { className:
|
|
19676
|
+
return el("div", { className: featuredEditorialCardClassName(slot) }, [el("div", { className: "card-content rb-testimonials-fe-card-body" }, [
|
|
18769
19677
|
quoteMark,
|
|
18770
19678
|
quote,
|
|
18771
19679
|
meta
|
|
18772
|
-
], ...mods);
|
|
19680
|
+
])], ...mods);
|
|
18773
19681
|
}
|
|
18774
19682
|
/**
|
|
18775
19683
|
* Build the "featured editorial" layout: an asymmetric two-column arrangement
|
|
@@ -18783,7 +19691,7 @@ function buildFeaturedEditorialCard(variantClass, ...mods) {
|
|
|
18783
19691
|
* index scope in context, so entry 0 produces no node in the rest column.
|
|
18784
19692
|
*/
|
|
18785
19693
|
function buildFeaturedEditorialLayout() {
|
|
18786
|
-
return el("div", { className: "rb-testimonials-fe-grid" }, [buildFeaturedEditorialCard("
|
|
19694
|
+
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", {
|
|
18787
19695
|
equals: 0,
|
|
18788
19696
|
not: true
|
|
18789
19697
|
}))])]);
|
|
@@ -19510,7 +20418,7 @@ const newsletterFormFragment = defineFragment({
|
|
|
19510
20418
|
});
|
|
19511
20419
|
//#endregion
|
|
19512
20420
|
//#region ../blocks/src/system/fragments/library/card.ts
|
|
19513
|
-
const cardVariantOptions
|
|
20421
|
+
const cardVariantOptions = cardVariantRoleValues.map((value) => ({
|
|
19514
20422
|
value,
|
|
19515
20423
|
label: value === "default" ? "Default" : "Alternative"
|
|
19516
20424
|
}));
|
|
@@ -19608,7 +20516,7 @@ const cardFragment = defineFragment({
|
|
|
19608
20516
|
description: "Choose a card style from your theme",
|
|
19609
20517
|
required: false,
|
|
19610
20518
|
defaultValue: "default",
|
|
19611
|
-
options: cardVariantOptions
|
|
20519
|
+
options: cardVariantOptions,
|
|
19612
20520
|
ui: { intent: "style" }
|
|
19613
20521
|
}
|
|
19614
20522
|
],
|
|
@@ -19617,7 +20525,10 @@ const cardFragment = defineFragment({
|
|
|
19617
20525
|
className: { $bind: {
|
|
19618
20526
|
from: "variant",
|
|
19619
20527
|
fallback: "default",
|
|
19620
|
-
transforms: [{
|
|
20528
|
+
transforms: [{
|
|
20529
|
+
id: "boxStyles.cardRoleClass",
|
|
20530
|
+
options: { baseClass: "" }
|
|
20531
|
+
}]
|
|
19621
20532
|
} }
|
|
19622
20533
|
}, [media({
|
|
19623
20534
|
className: "card-media rb-w-full rb-h-auto rb-object-cover",
|
|
@@ -25573,19 +26484,13 @@ const blockBookingPaymentCollectionOptionSchema = z.union([
|
|
|
25573
26484
|
]);
|
|
25574
26485
|
const blockBookingPaymentTermsSchema = z.object({ allowedOptions: z.array(blockBookingPaymentCollectionOptionSchema).min(1) });
|
|
25575
26486
|
//#endregion
|
|
25576
|
-
//#region ../blocks/src/system/blocks/
|
|
25577
|
-
|
|
25578
|
-
* Zod schema for course venue data
|
|
25579
|
-
*/
|
|
25580
|
-
const courseVenueSchema = z.object({
|
|
26487
|
+
//#region ../blocks/src/system/blocks/events/whole-series/schemas.ts
|
|
26488
|
+
const wholeSeriesVenueSchema = z.object({
|
|
25581
26489
|
id: z.string(),
|
|
25582
26490
|
name: z.string(),
|
|
25583
26491
|
address: z.string().nullable()
|
|
25584
26492
|
});
|
|
25585
|
-
|
|
25586
|
-
* Zod schema for course session (occurrence) data
|
|
25587
|
-
*/
|
|
25588
|
-
const courseSessionSchema = z.object({
|
|
26493
|
+
const wholeSeriesSessionSchema = z.object({
|
|
25589
26494
|
id: z.string(),
|
|
25590
26495
|
startsAt: z.string(),
|
|
25591
26496
|
endsAt: z.string(),
|
|
@@ -25593,14 +26498,14 @@ const courseSessionSchema = z.object({
|
|
|
25593
26498
|
capacityOverride: z.number().nullable().optional(),
|
|
25594
26499
|
overrides: z.record(z.string(), z.unknown()).nullable().optional()
|
|
25595
26500
|
});
|
|
25596
|
-
const
|
|
26501
|
+
const wholeSeriesTeamMemberSummarySchema = z.object({
|
|
25597
26502
|
id: z.string(),
|
|
25598
26503
|
name: z.string(),
|
|
25599
26504
|
roleLabel: z.string().nullable(),
|
|
25600
26505
|
summary: z.string().nullable(),
|
|
25601
26506
|
profilePath: z.string().nullable()
|
|
25602
26507
|
});
|
|
25603
|
-
const
|
|
26508
|
+
const wholeSeriesPricingOptionSchema = z.object({
|
|
25604
26509
|
id: z.string(),
|
|
25605
26510
|
name: z.string(),
|
|
25606
26511
|
description: z.string().nullable(),
|
|
@@ -25616,7 +26521,7 @@ const coursePricingOptionSchema = z.object({
|
|
|
25616
26521
|
"both"
|
|
25617
26522
|
]).nullable().optional()
|
|
25618
26523
|
});
|
|
25619
|
-
const
|
|
26524
|
+
const wholeSeriesPricingSchema = z.object({
|
|
25620
26525
|
bookingRequirement: z.enum(["none", "required"]),
|
|
25621
26526
|
pricingStrategy: z.enum([
|
|
25622
26527
|
"free",
|
|
@@ -25630,20 +26535,17 @@ const coursePricingSchema = z.object({
|
|
|
25630
26535
|
slidingMaxAmount: z.number().nullable().optional(),
|
|
25631
26536
|
slidingSuggestedAmount: z.number().nullable().optional(),
|
|
25632
26537
|
paymentTerms: blockBookingPaymentTermsSchema,
|
|
25633
|
-
options: z.array(
|
|
26538
|
+
options: z.array(wholeSeriesPricingOptionSchema)
|
|
25634
26539
|
});
|
|
25635
|
-
/**
|
|
25636
|
-
* Zod schema for public course data
|
|
25637
|
-
*/
|
|
25638
26540
|
const publicWholeSeriesOfferingSchema = z.object({
|
|
25639
26541
|
eventSeriesId: z.string(),
|
|
25640
26542
|
eventOfferingId: z.string(),
|
|
25641
26543
|
title: z.string(),
|
|
25642
26544
|
slug: z.string(),
|
|
25643
26545
|
description: z.unknown().nullable(),
|
|
25644
|
-
teamMembers: z.array(
|
|
26546
|
+
teamMembers: z.array(wholeSeriesTeamMemberSummarySchema).optional(),
|
|
25645
26547
|
enrollmentOpen: z.boolean(),
|
|
25646
|
-
pricing:
|
|
26548
|
+
pricing: wholeSeriesPricingSchema,
|
|
25647
26549
|
currency: z.string(),
|
|
25648
26550
|
paymentTerms: blockBookingPaymentTermsSchema,
|
|
25649
26551
|
enrollmentCapacity: z.number().nullable(),
|
|
@@ -25656,12 +26558,10 @@ const publicWholeSeriesOfferingSchema = z.object({
|
|
|
25656
26558
|
sessionsCount: z.number(),
|
|
25657
26559
|
enrolledCount: z.number(),
|
|
25658
26560
|
availableSpots: z.number().nullable(),
|
|
25659
|
-
sessions: z.array(
|
|
25660
|
-
venue:
|
|
26561
|
+
sessions: z.array(wholeSeriesSessionSchema),
|
|
26562
|
+
venue: wholeSeriesVenueSchema.nullable()
|
|
25661
26563
|
});
|
|
25662
|
-
|
|
25663
|
-
const publicCourseSchema = publicWholeSeriesOfferingSchema;
|
|
25664
|
-
const publicCoursesArraySchema = z.array(publicWholeSeriesOfferingSchema);
|
|
26564
|
+
const publicWholeSeriesOfferingsArraySchema = z.array(publicWholeSeriesOfferingSchema);
|
|
25665
26565
|
//#endregion
|
|
25666
26566
|
//#region ../blocks/src/system/blocks/events/shared/schemas.ts
|
|
25667
26567
|
const eventPresetSchema = z.enum([
|
|
@@ -25972,7 +26872,7 @@ const publicEventSchema = z.object({
|
|
|
25972
26872
|
acceptsMemberships: z.boolean().optional(),
|
|
25973
26873
|
wholeSeries: z.object({
|
|
25974
26874
|
eventSeriesId: z.string(),
|
|
25975
|
-
pricing:
|
|
26875
|
+
pricing: wholeSeriesPricingSchema,
|
|
25976
26876
|
currency: z.string(),
|
|
25977
26877
|
enrollmentOpen: z.boolean()
|
|
25978
26878
|
}).nullable().optional()
|
|
@@ -25981,24 +26881,19 @@ const publicEventSchema = z.object({
|
|
|
25981
26881
|
* Schema for an array of public events
|
|
25982
26882
|
*/
|
|
25983
26883
|
const publicEventsArraySchema = z.array(publicEventSchema);
|
|
26884
|
+
//#endregion
|
|
26885
|
+
//#region ../blocks/src/system/blocks/events/shared/fields.ts
|
|
25984
26886
|
/**
|
|
25985
26887
|
* Shared card styling fields for event blocks
|
|
25986
26888
|
*/
|
|
25987
26889
|
const cardStylingFields = [
|
|
25988
|
-
{
|
|
25989
|
-
id: "
|
|
25990
|
-
type: "select",
|
|
26890
|
+
cardStylesField({
|
|
26891
|
+
id: "_cardStyles",
|
|
25991
26892
|
label: "Card style",
|
|
25992
|
-
|
|
25993
|
-
|
|
25994
|
-
|
|
25995
|
-
|
|
25996
|
-
options: cardVariantRoleValues.map((value) => ({
|
|
25997
|
-
value,
|
|
25998
|
-
label: value === "default" ? "Default" : "Alternative"
|
|
25999
|
-
})),
|
|
26000
|
-
ui: { intent: "style" }
|
|
26001
|
-
},
|
|
26893
|
+
controls: "role-only",
|
|
26894
|
+
renderInHeader: false,
|
|
26895
|
+
intent: "style"
|
|
26896
|
+
}),
|
|
26002
26897
|
createButtonVariantField({ description: "Choose a button style from your theme" }),
|
|
26003
26898
|
{
|
|
26004
26899
|
id: "buttonText",
|
|
@@ -26137,14 +27032,7 @@ function normalizeIdList(parts) {
|
|
|
26137
27032
|
}
|
|
26138
27033
|
//#endregion
|
|
26139
27034
|
//#region ../blocks/src/system/blocks/events/shared/filtering.ts
|
|
26140
|
-
const eventSurfacePresetValues =
|
|
26141
|
-
"course",
|
|
26142
|
-
"term",
|
|
26143
|
-
"class",
|
|
26144
|
-
"workshop",
|
|
26145
|
-
"retreat",
|
|
26146
|
-
"performance"
|
|
26147
|
-
];
|
|
27035
|
+
const eventSurfacePresetValues = SURFACE_EVENT_PRESET_VALUES;
|
|
26148
27036
|
const eventSurfaceScopeValues = [
|
|
26149
27037
|
"all",
|
|
26150
27038
|
"regularClassSchedule",
|
|
@@ -26645,8 +27533,8 @@ const eventRegistrationHydrationSchemaShape = {
|
|
|
26645
27533
|
occurrenceContext: occurrenceContextSchema.optional(),
|
|
26646
27534
|
subject: eventRegistrationPageSurfaceSubjectSchema.nullable().optional(),
|
|
26647
27535
|
events: z.array(eventRegistrationPublicEventSchema).nullable().optional(),
|
|
26648
|
-
wholeSeriesOfferings:
|
|
26649
|
-
wholeSeriesOffering:
|
|
27536
|
+
wholeSeriesOfferings: publicWholeSeriesOfferingsArraySchema.nullable().optional(),
|
|
27537
|
+
wholeSeriesOffering: publicWholeSeriesOfferingSchema.nullable().optional(),
|
|
26650
27538
|
maxTickets: z.string().optional(),
|
|
26651
27539
|
showVenue: z.boolean().optional(),
|
|
26652
27540
|
showCapacity: z.boolean().optional(),
|
|
@@ -26668,12 +27556,13 @@ const eventRegistrationSourceSchema = z.object({
|
|
|
26668
27556
|
portalToken: z.string().nullable().optional(),
|
|
26669
27557
|
previewToken: z.string().nullable().optional(),
|
|
26670
27558
|
...eventRegistrationHydrationSchemaShape,
|
|
27559
|
+
subjectWholeSeriesOffering: publicWholeSeriesOfferingSchema.nullable().optional(),
|
|
26671
27560
|
className: z.string().nullable().optional(),
|
|
26672
27561
|
buttonText: z.string().nullable().optional(),
|
|
26673
27562
|
maxTickets: z.string().nullable().optional(),
|
|
26674
27563
|
stage: previewStageSchema.optional()
|
|
26675
27564
|
});
|
|
26676
|
-
const eventRegistrationDisplaySchema = z.object({
|
|
27565
|
+
const eventRegistrationDisplaySchema = z.discriminatedUnion("state", [z.object({
|
|
26677
27566
|
kind: z.literal("event-registration"),
|
|
26678
27567
|
state: z.literal("generic-shell"),
|
|
26679
27568
|
className: z.string().nullable(),
|
|
@@ -26681,7 +27570,13 @@ const eventRegistrationDisplaySchema = z.object({
|
|
|
26681
27570
|
bodyText: z.string(),
|
|
26682
27571
|
stepLabels: z.array(z.enum(EVENT_REGISTRATION_SHELL_STEP_LABELS)).min(1),
|
|
26683
27572
|
summaryButtonText: z.string()
|
|
26684
|
-
})
|
|
27573
|
+
}), z.object({
|
|
27574
|
+
kind: z.literal("event-registration"),
|
|
27575
|
+
state: z.literal("registration-closed"),
|
|
27576
|
+
className: z.string().nullable(),
|
|
27577
|
+
titleText: z.string(),
|
|
27578
|
+
bodyText: z.string()
|
|
27579
|
+
})]);
|
|
26685
27580
|
const eventRegistrationHydrationSchema = z.object(eventRegistrationHydrationSchemaShape);
|
|
26686
27581
|
const eventRegistrationRenderSchema = z.object({
|
|
26687
27582
|
display: eventRegistrationDisplaySchema,
|
|
@@ -26695,6 +27590,13 @@ z.object({
|
|
|
26695
27590
|
stage: previewStageSchema.optional()
|
|
26696
27591
|
});
|
|
26697
27592
|
function buildEventRegistrationDisplay(source) {
|
|
27593
|
+
if (resolveWholeSeriesOffering(source)?.enrollmentOpen === false) return {
|
|
27594
|
+
kind: "event-registration",
|
|
27595
|
+
state: "registration-closed",
|
|
27596
|
+
className: source.className ?? null,
|
|
27597
|
+
titleText: "Registration closed",
|
|
27598
|
+
bodyText: "This run is no longer open for bookings."
|
|
27599
|
+
};
|
|
26698
27600
|
const stepLabels = buildEventRegistrationShellStepLabels(source);
|
|
26699
27601
|
return {
|
|
26700
27602
|
kind: "event-registration",
|
|
@@ -26706,6 +27608,9 @@ function buildEventRegistrationDisplay(source) {
|
|
|
26706
27608
|
summaryButtonText: source.buttonText?.trim() || "Register"
|
|
26707
27609
|
};
|
|
26708
27610
|
}
|
|
27611
|
+
function resolveWholeSeriesOffering(source) {
|
|
27612
|
+
return source.wholeSeriesOffering ?? source.subjectWholeSeriesOffering ?? null;
|
|
27613
|
+
}
|
|
26709
27614
|
function buildEventRegistrationShellStepLabels(source) {
|
|
26710
27615
|
const scopedEvents = scopeEventRegistrationEvents(source);
|
|
26711
27616
|
if (scopedEvents.length === 0) return EVENT_REGISTRATION_GENERIC_SHELL_STEP_LABELS;
|
|
@@ -26763,7 +27668,7 @@ const eventRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
|
|
|
26763
27668
|
subject: source.subject ?? null,
|
|
26764
27669
|
events: source.events ?? null,
|
|
26765
27670
|
wholeSeriesOfferings: source.wholeSeriesOfferings ?? null,
|
|
26766
|
-
wholeSeriesOffering: source
|
|
27671
|
+
wholeSeriesOffering: resolveWholeSeriesOffering(source),
|
|
26767
27672
|
maxTickets: source.maxTickets ?? void 0,
|
|
26768
27673
|
showVenue: source.showVenue,
|
|
26769
27674
|
showCapacity: source.showCapacity,
|
|
@@ -26984,7 +27889,9 @@ const eventRegistrationBlockDefinition = {
|
|
|
26984
27889
|
fallback: false
|
|
26985
27890
|
} },
|
|
26986
27891
|
events: { $bind: { from: "data.events" } },
|
|
26987
|
-
wholeSeriesOffering: { $bind: { from: "data.
|
|
27892
|
+
wholeSeriesOffering: { $bind: { from: "data.selectedRunOffering.offering" } },
|
|
27893
|
+
subjectWholeSeriesOffering: { $bind: { from: "data.subjectWholeSeriesOffering.offering" } },
|
|
27894
|
+
wholeSeriesOfferings: { $bind: { from: "data.wholeSeriesOfferings" } },
|
|
26988
27895
|
sitePasses: { $bind: { from: "data.sitePasses" } },
|
|
26989
27896
|
siteMemberships: { $bind: { from: "data.siteMemberships" } },
|
|
26990
27897
|
stage: { $bind: {
|
|
@@ -26998,7 +27905,9 @@ const eventRegistrationBlockDefinition = {
|
|
|
26998
27905
|
runtime: eventRegistrationBlockRuntime,
|
|
26999
27906
|
dataSchemas: {
|
|
27000
27907
|
events: publicEventsArraySchema.optional(),
|
|
27001
|
-
|
|
27908
|
+
selectedRunOffering: z.object({ offering: publicWholeSeriesOfferingSchema }).optional(),
|
|
27909
|
+
subjectWholeSeriesOffering: z.object({ offering: publicWholeSeriesOfferingSchema }).optional(),
|
|
27910
|
+
wholeSeriesOfferings: z.array(publicWholeSeriesOfferingSchema).optional(),
|
|
27002
27911
|
sitePasses: publicPassProductCollectionSchema.optional(),
|
|
27003
27912
|
siteMemberships: publicMembershipProductCollectionSchema.optional(),
|
|
27004
27913
|
occurrenceContext: occurrenceContextSchema.optional()
|
|
@@ -27015,11 +27924,29 @@ const eventRegistrationBlockDefinition = {
|
|
|
27015
27924
|
} },
|
|
27016
27925
|
readProfile: "registration",
|
|
27017
27926
|
seriesId: { $bind: { from: "$root.subject.eventSeriesId" } },
|
|
27927
|
+
seriesIds: { $bind: {
|
|
27928
|
+
from: "$root.subject.availableEventSeriesIds",
|
|
27929
|
+
transforms: [{ id: "value.csv" }]
|
|
27930
|
+
} },
|
|
27931
|
+
runSeriesId: { $bind: { from: "$root.entrySubrouteContext.run.seriesId" } },
|
|
27018
27932
|
includeOccurrenceId: { $bind: { from: "$root.occurrenceContext.id" } }
|
|
27019
27933
|
},
|
|
27020
27934
|
mode: "server"
|
|
27021
27935
|
},
|
|
27022
|
-
|
|
27936
|
+
selectedRunOffering: {
|
|
27937
|
+
endpoint: "getPublicWholeSeriesOffering",
|
|
27938
|
+
params: {
|
|
27939
|
+
siteId: { $bind: { from: "$root.siteId" } },
|
|
27940
|
+
eventSeriesId: { $bind: { from: "$root.entrySubrouteContext.run.seriesId" } },
|
|
27941
|
+
stage: { $bind: {
|
|
27942
|
+
from: "$root.previewStage",
|
|
27943
|
+
fallback: "published"
|
|
27944
|
+
} }
|
|
27945
|
+
},
|
|
27946
|
+
requiredParams: ["eventSeriesId"],
|
|
27947
|
+
mode: "server"
|
|
27948
|
+
},
|
|
27949
|
+
subjectWholeSeriesOffering: {
|
|
27023
27950
|
endpoint: "getPublicWholeSeriesOffering",
|
|
27024
27951
|
when: { $bind: {
|
|
27025
27952
|
from: "$root.subject.isWholeSeriesBooking",
|
|
@@ -27036,6 +27963,22 @@ const eventRegistrationBlockDefinition = {
|
|
|
27036
27963
|
requiredParams: ["eventSeriesId"],
|
|
27037
27964
|
mode: "server"
|
|
27038
27965
|
},
|
|
27966
|
+
wholeSeriesOfferings: {
|
|
27967
|
+
endpoint: "listPublicWholeSeriesOfferings",
|
|
27968
|
+
params: {
|
|
27969
|
+
siteId: { $bind: { from: "$root.siteId" } },
|
|
27970
|
+
eventSeriesIds: { $bind: {
|
|
27971
|
+
from: "$root.subject.availableEventSeriesIds",
|
|
27972
|
+
transforms: [{ id: "value.csv" }]
|
|
27973
|
+
} },
|
|
27974
|
+
stage: { $bind: {
|
|
27975
|
+
from: "$root.previewStage",
|
|
27976
|
+
fallback: "published"
|
|
27977
|
+
} }
|
|
27978
|
+
},
|
|
27979
|
+
requiredParams: ["eventSeriesIds"],
|
|
27980
|
+
mode: "server"
|
|
27981
|
+
},
|
|
27039
27982
|
sitePasses: {
|
|
27040
27983
|
endpoint: "listPublicPasses",
|
|
27041
27984
|
params: { siteId: { $bind: { from: "$root.siteId" } } },
|
|
@@ -27050,13 +27993,9 @@ const eventRegistrationBlockDefinition = {
|
|
|
27050
27993
|
};
|
|
27051
27994
|
//#endregion
|
|
27052
27995
|
//#region ../blocks/src/system/runtime/nodes/course-registration.interactive.ts
|
|
27053
|
-
const
|
|
27054
|
-
siteId: z.string().optional(),
|
|
27055
|
-
apiBaseUrl: z.string().optional(),
|
|
27056
|
-
portalToken: z.string().nullable().optional(),
|
|
27996
|
+
const courseRegistrationHydrationSchemaShape = {
|
|
27057
27997
|
subject: eventRegistrationPageSurfaceSubjectSchema.nullable().optional(),
|
|
27058
|
-
courses: z.array(
|
|
27059
|
-
className: z.string().nullable().optional(),
|
|
27998
|
+
courses: z.array(publicWholeSeriesOfferingSchema).nullable().optional(),
|
|
27060
27999
|
showSessions: z.boolean().optional(),
|
|
27061
28000
|
showPrice: z.boolean().optional(),
|
|
27062
28001
|
showCapacity: z.boolean().optional(),
|
|
@@ -27064,8 +28003,15 @@ const courseRegistrationSourceSchema = z.object({
|
|
|
27064
28003
|
successMessage: z.string().optional(),
|
|
27065
28004
|
waitlistMessage: z.string().optional(),
|
|
27066
28005
|
membershipMessage: z.string().optional(),
|
|
28006
|
+
buttonVariant: registrationButtonVariantSchema.optional()
|
|
28007
|
+
};
|
|
28008
|
+
const courseRegistrationSourceSchema = z.object({
|
|
28009
|
+
siteId: z.string().optional(),
|
|
28010
|
+
apiBaseUrl: z.string().optional(),
|
|
28011
|
+
portalToken: z.string().nullable().optional(),
|
|
28012
|
+
...courseRegistrationHydrationSchemaShape,
|
|
28013
|
+
className: z.string().nullable().optional(),
|
|
27067
28014
|
buttonText: z.string().nullable().optional(),
|
|
27068
|
-
buttonVariant: registrationButtonVariantSchema.optional(),
|
|
27069
28015
|
stage: previewStageSchema.optional()
|
|
27070
28016
|
});
|
|
27071
28017
|
const courseRegistrationDisplaySchema = z.object({
|
|
@@ -27074,18 +28020,7 @@ const courseRegistrationDisplaySchema = z.object({
|
|
|
27074
28020
|
className: z.string().nullable(),
|
|
27075
28021
|
summaryButtonText: z.string()
|
|
27076
28022
|
});
|
|
27077
|
-
const courseRegistrationHydrationSchema = z.object(
|
|
27078
|
-
subject: eventRegistrationPageSurfaceSubjectSchema.nullable().optional(),
|
|
27079
|
-
courses: z.array(publicCourseSchema).nullable().optional(),
|
|
27080
|
-
showSessions: z.boolean().optional(),
|
|
27081
|
-
showPrice: z.boolean().optional(),
|
|
27082
|
-
showCapacity: z.boolean().optional(),
|
|
27083
|
-
showVenue: z.boolean().optional(),
|
|
27084
|
-
successMessage: z.string().optional(),
|
|
27085
|
-
waitlistMessage: z.string().optional(),
|
|
27086
|
-
membershipMessage: z.string().optional(),
|
|
27087
|
-
buttonVariant: registrationButtonVariantSchema.optional()
|
|
27088
|
-
});
|
|
28023
|
+
const courseRegistrationHydrationSchema = z.object(courseRegistrationHydrationSchemaShape);
|
|
27089
28024
|
const courseRegistrationRenderSchema = z.object({
|
|
27090
28025
|
display: courseRegistrationDisplaySchema,
|
|
27091
28026
|
hydration: courseRegistrationHydrationSchema
|
|
@@ -27290,7 +28225,7 @@ const courseRegistrationBlockDefinition = {
|
|
|
27290
28225
|
})]
|
|
27291
28226
|
}),
|
|
27292
28227
|
runtime: courseRegistrationBlockRuntime,
|
|
27293
|
-
dataSchemas: { courses:
|
|
28228
|
+
dataSchemas: { courses: publicWholeSeriesOfferingsArraySchema.optional() },
|
|
27294
28229
|
dataLoaders: { courses: {
|
|
27295
28230
|
endpoint: "listPublicWholeSeriesOfferings",
|
|
27296
28231
|
params: {
|
|
@@ -27361,6 +28296,22 @@ const eventDetailsManifest = createBlockManifest({
|
|
|
27361
28296
|
defaultValue: true,
|
|
27362
28297
|
ui: { intent: "display" }
|
|
27363
28298
|
},
|
|
28299
|
+
{
|
|
28300
|
+
id: "showTitle",
|
|
28301
|
+
type: "boolean",
|
|
28302
|
+
label: "Show event title",
|
|
28303
|
+
required: false,
|
|
28304
|
+
defaultValue: false,
|
|
28305
|
+
ui: { intent: "display" }
|
|
28306
|
+
},
|
|
28307
|
+
{
|
|
28308
|
+
id: "showDescription",
|
|
28309
|
+
type: "boolean",
|
|
28310
|
+
label: "Show event description",
|
|
28311
|
+
required: false,
|
|
28312
|
+
defaultValue: false,
|
|
28313
|
+
ui: { intent: "display" }
|
|
28314
|
+
},
|
|
27364
28315
|
{
|
|
27365
28316
|
id: "showMap",
|
|
27366
28317
|
type: "boolean",
|
|
@@ -27397,10 +28348,22 @@ const eventDetailsManifest = createBlockManifest({
|
|
|
27397
28348
|
{
|
|
27398
28349
|
value: "10",
|
|
27399
28350
|
label: "10 dates"
|
|
28351
|
+
},
|
|
28352
|
+
{
|
|
28353
|
+
value: "all",
|
|
28354
|
+
label: "All dates"
|
|
27400
28355
|
}
|
|
27401
28356
|
],
|
|
27402
28357
|
ui: { intent: "display" }
|
|
27403
28358
|
},
|
|
28359
|
+
{
|
|
28360
|
+
id: "showCapacity",
|
|
28361
|
+
type: "boolean",
|
|
28362
|
+
label: "Show capacity",
|
|
28363
|
+
required: false,
|
|
28364
|
+
defaultValue: false,
|
|
28365
|
+
ui: { intent: "display" }
|
|
28366
|
+
},
|
|
27404
28367
|
{
|
|
27405
28368
|
id: "showCost",
|
|
27406
28369
|
type: "boolean",
|
|
@@ -27443,6 +28406,8 @@ const eventDetailsManifest = createBlockManifest({
|
|
|
27443
28406
|
} },
|
|
27444
28407
|
events: { $bind: { from: "data.eventDetailsData.events" } },
|
|
27445
28408
|
showVenue: { $bind: { from: "content.showVenue" } },
|
|
28409
|
+
showTitle: { $bind: { from: "content.showTitle" } },
|
|
28410
|
+
showDescription: { $bind: { from: "content.showDescription" } },
|
|
27446
28411
|
showMap: { $bind: { from: "content.showMap" } },
|
|
27447
28412
|
showOtherDates: { $bind: { from: "content.showOtherDates" } },
|
|
27448
28413
|
otherDatesLimit: { $bind: {
|
|
@@ -27453,6 +28418,10 @@ const eventDetailsManifest = createBlockManifest({
|
|
|
27453
28418
|
from: "content.showCost",
|
|
27454
28419
|
fallback: true
|
|
27455
28420
|
} },
|
|
28421
|
+
showCapacity: { $bind: {
|
|
28422
|
+
from: "content.showCapacity",
|
|
28423
|
+
fallback: false
|
|
28424
|
+
} },
|
|
27456
28425
|
showAcceptedPasses: { $bind: {
|
|
27457
28426
|
from: "content.showAcceptedPasses",
|
|
27458
28427
|
fallback: true
|
|
@@ -27507,6 +28476,11 @@ const eventDetailsBlockDefinition = {
|
|
|
27507
28476
|
limit: "100",
|
|
27508
28477
|
readProfile: "details",
|
|
27509
28478
|
seriesId: { $bind: { from: "$root.subject.eventSeriesId" } },
|
|
28479
|
+
seriesIds: { $bind: {
|
|
28480
|
+
from: "$root.subject.availableEventSeriesIds",
|
|
28481
|
+
transforms: [{ id: "value.csv" }]
|
|
28482
|
+
} },
|
|
28483
|
+
runSeriesId: { $bind: { from: "$root.entrySubrouteContext.run.seriesId" } },
|
|
27510
28484
|
includeOccurrenceId: { $bind: { from: "$root.occurrenceContext.id" } }
|
|
27511
28485
|
},
|
|
27512
28486
|
mode: "server"
|
|
@@ -27692,7 +28666,7 @@ const courseDetailsBlockDefinition = {
|
|
|
27692
28666
|
})], { gap: "lg" })
|
|
27693
28667
|
})]
|
|
27694
28668
|
}),
|
|
27695
|
-
dataSchemas: { courses:
|
|
28669
|
+
dataSchemas: { courses: publicWholeSeriesOfferingsArraySchema.optional() },
|
|
27696
28670
|
dataLoaders: { courses: {
|
|
27697
28671
|
endpoint: "listPublicWholeSeriesOfferings",
|
|
27698
28672
|
params: {
|
|
@@ -27811,8 +28785,8 @@ const eventSpotlightBlockDefinition = {
|
|
|
27811
28785
|
from: "content.columns",
|
|
27812
28786
|
fallback: "3"
|
|
27813
28787
|
} },
|
|
27814
|
-
|
|
27815
|
-
from: "content.
|
|
28788
|
+
cardRole: { $bind: {
|
|
28789
|
+
from: "content._cardStyles.role",
|
|
27816
28790
|
fallback: "default"
|
|
27817
28791
|
} },
|
|
27818
28792
|
buttonVariant: { $bind: {
|
|
@@ -27974,6 +28948,7 @@ const eventCollectionSourceSchemaShape = {
|
|
|
27974
28948
|
showVenue: z.boolean().nullable().optional(),
|
|
27975
28949
|
showMap: z.boolean().nullable().optional(),
|
|
27976
28950
|
showCapacity: z.boolean().nullable().optional(),
|
|
28951
|
+
cardRole: cardRoleSchema.optional(),
|
|
27977
28952
|
buttonVariant: eventButtonVariantSchema.optional(),
|
|
27978
28953
|
buttonText: z.string().optional(),
|
|
27979
28954
|
emptyMessage: z.string().optional(),
|
|
@@ -28001,6 +28976,7 @@ const eventCollectionDisplaySchemaShape = {
|
|
|
28001
28976
|
showVenue: z.boolean(),
|
|
28002
28977
|
showMap: z.boolean(),
|
|
28003
28978
|
showCapacity: z.boolean(),
|
|
28979
|
+
cardRole: cardRoleSchema,
|
|
28004
28980
|
buttonVariant: eventButtonVariantSchema,
|
|
28005
28981
|
buttonText: z.string(),
|
|
28006
28982
|
emptyMessage: z.string()
|
|
@@ -28050,6 +29026,7 @@ function buildEventCollectionPresentationDisplay(source) {
|
|
|
28050
29026
|
showVenue: source.showVenue ?? true,
|
|
28051
29027
|
showMap: source.showMap ?? true,
|
|
28052
29028
|
showCapacity: source.showCapacity ?? true,
|
|
29029
|
+
cardRole: source.cardRole ?? "default",
|
|
28053
29030
|
buttonVariant: source.buttonVariant ?? "primary",
|
|
28054
29031
|
buttonText: source.buttonText ?? "Book",
|
|
28055
29032
|
emptyMessage: source.emptyMessage ?? "No upcoming events scheduled."
|
|
@@ -28067,8 +29044,6 @@ function buildEventCollectionHydration(source) {
|
|
|
28067
29044
|
}
|
|
28068
29045
|
//#endregion
|
|
28069
29046
|
//#region ../blocks/src/system/runtime/nodes/events/EventListing.interactive.ts
|
|
28070
|
-
const legacyEventCardVariantSchema = z.enum(["variant1", "variant2"]);
|
|
28071
|
-
const eventCardVariantInputSchema = z.union([cardVariantRoleSchema, legacyEventCardVariantSchema]);
|
|
28072
29047
|
const cardOrientationSchema = z.enum(["vertical", "horizontal"]);
|
|
28073
29048
|
const eventSurfaceScopeSchema = z.enum(eventSurfaceScopeValues);
|
|
28074
29049
|
const eventScheduleScopeSchema = z.enum(eventScheduleScopeValues);
|
|
@@ -28083,7 +29058,7 @@ const eventListingSourceSchema = z.object({
|
|
|
28083
29058
|
paginationMode: z.enum(["loadMore", "seeAllLink"]).optional(),
|
|
28084
29059
|
seeAllUrl: z.string().optional(),
|
|
28085
29060
|
loadMoreText: z.string().optional(),
|
|
28086
|
-
|
|
29061
|
+
cardRole: cardRoleSchema.optional(),
|
|
28087
29062
|
buttonVariant: eventButtonVariantSchema.optional(),
|
|
28088
29063
|
buttonText: z.string().optional(),
|
|
28089
29064
|
showVenue: z.boolean().optional(),
|
|
@@ -28105,7 +29080,7 @@ const eventListingDisplaySchema = z.object({
|
|
|
28105
29080
|
emptyMessage: z.string(),
|
|
28106
29081
|
loadingMessage: z.string(),
|
|
28107
29082
|
containerClass: z.string(),
|
|
28108
|
-
|
|
29083
|
+
cardRole: cardRoleSchema,
|
|
28109
29084
|
buttonVariant: eventButtonVariantSchema,
|
|
28110
29085
|
buttonText: z.string(),
|
|
28111
29086
|
showVenue: z.boolean(),
|
|
@@ -28161,7 +29136,7 @@ const eventListingBlockRuntime = defineProgressiveBlockRuntime({
|
|
|
28161
29136
|
emptyMessage: source.emptyMessage ?? "No upcoming events scheduled.",
|
|
28162
29137
|
loadingMessage: "Loading events…",
|
|
28163
29138
|
containerClass: getContainerClass(layout, source.columns ?? "3"),
|
|
28164
|
-
|
|
29139
|
+
cardRole: source.cardRole ?? "default",
|
|
28165
29140
|
buttonVariant: source.buttonVariant ?? "primary",
|
|
28166
29141
|
buttonText: source.buttonText ?? "Book",
|
|
28167
29142
|
showVenue: source.showVenue ?? true,
|
|
@@ -28483,8 +29458,8 @@ const eventListingBlockDefinition = {
|
|
|
28483
29458
|
from: "content.loadMoreText",
|
|
28484
29459
|
fallback: "Load more events"
|
|
28485
29460
|
} },
|
|
28486
|
-
|
|
28487
|
-
from: "content.
|
|
29461
|
+
cardRole: { $bind: {
|
|
29462
|
+
from: "content._cardStyles.role",
|
|
28488
29463
|
fallback: "default"
|
|
28489
29464
|
} },
|
|
28490
29465
|
buttonVariant: { $bind: {
|
|
@@ -28754,6 +29729,10 @@ const eventCalendarLayout = [styledSection({
|
|
|
28754
29729
|
filterCategoryIds: { $bind: { from: "content.filterCategoryIds" } },
|
|
28755
29730
|
filterStaffMemberId: { $bind: { from: "content.filterStaffMemberId" } },
|
|
28756
29731
|
filterVenueId: { $bind: { from: "content.filterVenueId" } },
|
|
29732
|
+
cardRole: { $bind: {
|
|
29733
|
+
from: "content._cardStyles.role",
|
|
29734
|
+
fallback: "default"
|
|
29735
|
+
} },
|
|
28757
29736
|
buttonVariant: { $bind: {
|
|
28758
29737
|
from: "content.buttonVariant",
|
|
28759
29738
|
fallback: "primary"
|
|
@@ -29386,11 +30365,11 @@ const eventCalendarAdditionalFields = [
|
|
|
29386
30365
|
searchThreshold: 8
|
|
29387
30366
|
}
|
|
29388
30367
|
}),
|
|
29389
|
-
...cardStylingFields.
|
|
30368
|
+
...cardStylingFields.map((field) => ({
|
|
29390
30369
|
...field,
|
|
29391
30370
|
ui: {
|
|
29392
30371
|
...field.ui ?? {},
|
|
29393
|
-
intent: field.id === "buttonVariant" ? "style" : "content"
|
|
30372
|
+
intent: field.id === "_cardStyles" || field.id === "buttonVariant" ? "style" : "content"
|
|
29394
30373
|
}
|
|
29395
30374
|
})),
|
|
29396
30375
|
{
|
|
@@ -30381,7 +31360,7 @@ const offeringsPreviewBlockDefinition = {
|
|
|
30381
31360
|
dataSchemas: {
|
|
30382
31361
|
...offeringsPreviewEventDataSchemas,
|
|
30383
31362
|
routeCandidates: publicRouteCandidatesSchema.optional(),
|
|
30384
|
-
courses:
|
|
31363
|
+
courses: publicWholeSeriesOfferingsArraySchema.optional()
|
|
30385
31364
|
},
|
|
30386
31365
|
dataLoaders: {
|
|
30387
31366
|
...offeringsPreviewEventDataLoaders,
|
|
@@ -31853,7 +32832,7 @@ const audioPlayerBlockDefinition = { manifest: createBlockManifest({
|
|
|
31853
32832
|
}
|
|
31854
32833
|
],
|
|
31855
32834
|
layout: styledSection({
|
|
31856
|
-
children: stack({ className: "rb-container rb-mx-auto rb-max-w-3xl" }, [el("div", { className: "
|
|
32835
|
+
children: stack({ className: "rb-container rb-mx-auto rb-max-w-3xl" }, [el("div", { className: boxStyleClassNames({ role: "default" }, {}) }, [media({
|
|
31857
32836
|
className: "card-media rb-aspect-video rb-w-full rb-object-cover",
|
|
31858
32837
|
size: {
|
|
31859
32838
|
width: 960,
|
|
@@ -34905,16 +35884,27 @@ function eventListCapable() {
|
|
|
34905
35884
|
looks: "supported",
|
|
34906
35885
|
sectionSurfaces: "supported",
|
|
34907
35886
|
contentFrames: ["plain", "panel"],
|
|
34908
|
-
cardRoles: "
|
|
35887
|
+
cardRoles: "supported",
|
|
34909
35888
|
eventListTreatments
|
|
34910
35889
|
});
|
|
34911
35890
|
}
|
|
35891
|
+
function eventSpotlightCapable() {
|
|
35892
|
+
return declareBlockDesignCapability({
|
|
35893
|
+
sectionSurfaces: "supported",
|
|
35894
|
+
contentFrames: ["plain"],
|
|
35895
|
+
cardRoles: "supported"
|
|
35896
|
+
});
|
|
35897
|
+
}
|
|
34912
35898
|
function offeringsPreviewCapable() {
|
|
34913
35899
|
return declareBlockDesignCapability({
|
|
34914
35900
|
looks: "supported",
|
|
34915
35901
|
sectionSurfaces: "supported",
|
|
34916
35902
|
contentFrames: ["plain"],
|
|
34917
|
-
cardRoles: "supported"
|
|
35903
|
+
cardRoles: "supported",
|
|
35904
|
+
compositions: {
|
|
35905
|
+
kind: "offerings-preview",
|
|
35906
|
+
treatments: offeringsPreviewCompositionTreatmentValues
|
|
35907
|
+
}
|
|
34918
35908
|
});
|
|
34919
35909
|
}
|
|
34920
35910
|
function defaultBoundaryBias(visualWeight) {
|
|
@@ -35207,7 +36197,7 @@ const systemBlockDefinitions = [
|
|
|
35207
36197
|
cardRoles: "supported",
|
|
35208
36198
|
compositions: {
|
|
35209
36199
|
kind: "testimonials",
|
|
35210
|
-
treatments:
|
|
36200
|
+
treatments: testimonialsCompositionTreatmentValues
|
|
35211
36201
|
},
|
|
35212
36202
|
headingDecorationCapability: {
|
|
35213
36203
|
kind: "supported",
|
|
@@ -35362,7 +36352,7 @@ const systemBlockDefinitions = [
|
|
|
35362
36352
|
weight: "standard"
|
|
35363
36353
|
})]
|
|
35364
36354
|
})),
|
|
35365
|
-
withDesignCapability("block.event-spotlight", eventSpotlightBlockDefinition,
|
|
36355
|
+
withDesignCapability("block.event-spotlight", eventSpotlightBlockDefinition, eventSpotlightCapable(), defineBlockDesignMetadata({
|
|
35366
36356
|
flow: offeringsFlow,
|
|
35367
36357
|
layoutProfiles: [layoutProfile({
|
|
35368
36358
|
variantKey: "default",
|
|
@@ -37058,184 +38048,29 @@ const EVENT_ATTENDEE_REFUND_INVALID_CODES = ["manual_booking_not_refundable", ..
|
|
|
37058
38048
|
[...EVENT_ATTENDEE_REFUND_INVALID_CODES, ...CANONICAL_ADMIN_REFUND_FAILURE_CODES];
|
|
37059
38049
|
[...STANDARD_LINE_ITEM_REFUND_INVALID_CODES, ...CANONICAL_ADMIN_REFUND_FAILURE_CODES];
|
|
37060
38050
|
//#endregion
|
|
37061
|
-
//#region ../api/src/
|
|
37062
|
-
|
|
37063
|
-
|
|
37064
|
-
|
|
37065
|
-
|
|
37066
|
-
|
|
37067
|
-
|
|
37068
|
-
|
|
37069
|
-
|
|
37070
|
-
|
|
37071
|
-
|
|
37072
|
-
|
|
37073
|
-
|
|
37074
|
-
|
|
37075
|
-
|
|
37076
|
-
|
|
37077
|
-
|
|
37078
|
-
|
|
37079
|
-
|
|
37080
|
-
|
|
37081
|
-
|
|
37082
|
-
|
|
37083
|
-
//#region ../api/src/bookingVerticalCatalog.ts
|
|
37084
|
-
const VERTICAL_BOOKING_PRESETS = [
|
|
37085
|
-
verticalBookingPreset("yoga_wellness.classes", "yoga_wellness", "class", "Class", "Classes", "Regular scheduled classes and group sessions."),
|
|
37086
|
-
verticalBookingPreset("yoga_wellness.workshops", "yoga_wellness", "workshop", "Workshop", "Workshops", "One-off workshops, day retreats, or special sessions."),
|
|
37087
|
-
verticalBookingPreset("yoga_wellness.courses", "yoga_wellness", "course", "Course", "Courses", "Fixed-schedule courses or multi-session groups."),
|
|
37088
|
-
verticalBookingPreset("yoga_wellness.retreats", "yoga_wellness", "retreat", "Retreat", "Retreats", "Multi-day or residential retreats and immersive experiences."),
|
|
37089
|
-
verticalBookingPreset("yoga_wellness.appointments", "yoga_wellness", "appointment", "Appointment", "Appointments", "Private sessions, consultations, or one-to-one support."),
|
|
37090
|
-
verticalBookingPreset("fitness_pt.group_training", "fitness_pt", "class", "Group training", "Group training", "Regular scheduled classes and group sessions."),
|
|
37091
|
-
verticalBookingPreset("fitness_pt.personal_training", "fitness_pt", "appointment", "Personal training", "Personal training", "One-to-one sessions booked from your availability."),
|
|
37092
|
-
verticalBookingPreset("fitness_pt.programmes", "fitness_pt", "course", "Programme", "Programmes", "Multi-session programmes like bootcamps or courses."),
|
|
37093
|
-
verticalBookingPreset("fitness_pt.workshops", "fitness_pt", "workshop", "Workshop", "Workshops", "One-off workshops, events, or special sessions."),
|
|
37094
|
-
verticalBookingPreset("fitness_pt.retreats", "fitness_pt", "retreat", "Retreat", "Retreats", "Multi-day or residential fitness experiences."),
|
|
37095
|
-
verticalBookingPreset("dance_school.classes", "dance_school", "class", "Class", "Classes", "Regular group classes and weekly sessions."),
|
|
37096
|
-
verticalBookingPreset("dance_school.terms", "dance_school", "course", "Term", "Terms", "Multi-week term blocks or fixed-date course groups."),
|
|
37097
|
-
verticalBookingPreset("dance_school.courses", "dance_school", "course", "Course", "Courses", "Fixed-schedule courses or multi-session groups.", "settings"),
|
|
37098
|
-
verticalBookingPreset("dance_school.workshops", "dance_school", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, or intensives."),
|
|
37099
|
-
verticalBookingPreset("dance_school.private_lessons", "dance_school", "appointment", "Private lesson", "Private lessons", "One-to-one lessons or coaching sessions."),
|
|
37100
|
-
verticalBookingPreset("dance_school.shows", "dance_school", "performance", "Show", "Shows", "Ticketed performances, showcases, and recitals."),
|
|
37101
|
-
verticalBookingPreset("physiotherapy_physical_health.appointments", "physiotherapy_physical_health", "appointment", "Appointment", "Appointments", "Assessments, treatments, follow-ups, and rehabilitation sessions."),
|
|
37102
|
-
verticalBookingPreset("physiotherapy_physical_health.rehab_classes", "physiotherapy_physical_health", "class", "Rehab class", "Rehab classes", "Regular rehabilitation, mobility, strength, or recovery classes."),
|
|
37103
|
-
verticalBookingPreset("physiotherapy_physical_health.workshops", "physiotherapy_physical_health", "workshop", "Workshop", "Workshops", "One-off workshops, talks, or practical group sessions."),
|
|
37104
|
-
verticalBookingPreset("massage_bodywork.treatments", "massage_bodywork", "appointment", "Treatment", "Treatments", "Massage treatments, bodywork sessions, and one-to-one appointments."),
|
|
37105
|
-
verticalBookingPreset("massage_bodywork.group_sessions", "massage_bodywork", "class", "Group session", "Group sessions", "Regular bodywork, somatic movement, or self-massage sessions."),
|
|
37106
|
-
verticalBookingPreset("massage_bodywork.workshops", "massage_bodywork", "workshop", "Workshop", "Workshops", "One-off bodywork, self-massage, or somatic practice workshops."),
|
|
37107
|
-
verticalBookingPreset("therapist_practitioner.appointments", "therapist_practitioner", "appointment", "Appointment", "Appointments", "Sessions, consultations, treatments, or assessments."),
|
|
37108
|
-
verticalBookingPreset("therapist_practitioner.workshops", "therapist_practitioner", "workshop", "Workshop", "Workshops", "One-off group workshops, talks, or wellbeing sessions."),
|
|
37109
|
-
verticalBookingPreset("therapist_practitioner.retreats", "therapist_practitioner", "retreat", "Retreat", "Retreats", "Multi-day retreats or immersive group experiences."),
|
|
37110
|
-
verticalBookingPreset("beauty_spa.appointments", "beauty_spa", "appointment", "Appointment", "Appointments", "Treatments, consultations, services, and sessions."),
|
|
37111
|
-
verticalBookingPreset("beauty_spa.workshops", "beauty_spa", "workshop", "Workshop", "Workshops", "Skincare workshops, makeup lessons, demos, or group events."),
|
|
37112
|
-
verticalBookingPreset("consultant_coach.appointments", "consultant_coach", "appointment", "Appointment", "Appointments", "One-to-one calls, consultations, reviews, or coaching sessions."),
|
|
37113
|
-
verticalBookingPreset("consultant_coach.workshops", "consultant_coach", "workshop", "Workshop", "Workshops", "One-off group sessions, webinars, or strategy days."),
|
|
37114
|
-
verticalBookingPreset("consultant_coach.courses", "consultant_coach", "course", "Course", "Courses", "Fixed-schedule cohorts or multi-session group programmes."),
|
|
37115
|
-
verticalBookingPreset("consultant_coach.retreats", "consultant_coach", "retreat", "Retreat", "Retreats", "Multi-day coaching retreats or immersive experiences."),
|
|
37116
|
-
verticalBookingPreset("training_provider.courses", "training_provider", "course", "Course", "Courses", "Fixed-schedule courses, cohorts, and multi-session training."),
|
|
37117
|
-
verticalBookingPreset("training_provider.workshops", "training_provider", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, and short training sessions."),
|
|
37118
|
-
verticalBookingPreset("training_provider.appointments", "training_provider", "appointment", "Appointment", "Appointments", "Consultations, assessments, mentoring, or office hours."),
|
|
37119
|
-
verticalBookingPreset("training_provider.classes", "training_provider", "class", "Class", "Classes", "Regular classes, sessions, or groups.", "settings"),
|
|
37120
|
-
verticalBookingPreset("training_provider.residentials", "training_provider", "retreat", "Residential", "Residentials", "Residential courses or multi-day training experiences.", "settings"),
|
|
37121
|
-
verticalBookingPreset("retreat_centre.retreats", "retreat_centre", "retreat", "Retreat", "Retreats", "Multi-day or residential retreats with richer booking needs."),
|
|
37122
|
-
verticalBookingPreset("retreat_centre.workshops", "retreat_centre", "workshop", "Workshop", "Workshops", "One-day retreats, ceremonies, workshops, or special events."),
|
|
37123
|
-
verticalBookingPreset("retreat_centre.classes", "retreat_centre", "class", "Class", "Classes", "Regular sessions like guided meditations or group practices."),
|
|
37124
|
-
verticalBookingPreset("retreat_centre.courses", "retreat_centre", "course", "Course", "Courses", "Fixed-schedule programmes or multi-session experiences."),
|
|
37125
|
-
verticalBookingPreset("retreat_centre.appointments", "retreat_centre", "appointment", "Appointment", "Appointments", "Private sessions, therapies, consultations, or add-ons."),
|
|
37126
|
-
verticalBookingPreset("music_school.lessons", "music_school", "appointment", "Lesson", "Lessons", "One-to-one lessons, consultations, or coaching sessions."),
|
|
37127
|
-
verticalBookingPreset("music_school.classes", "music_school", "class", "Class", "Classes", "Regular group classes, ensembles, or recurring sessions."),
|
|
37128
|
-
verticalBookingPreset("music_school.terms", "music_school", "course", "Term", "Terms", "Multi-week term blocks or fixed-date group courses."),
|
|
37129
|
-
verticalBookingPreset("music_school.workshops", "music_school", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, or intensives."),
|
|
37130
|
-
verticalBookingPreset("music_school.performances", "music_school", "performance", "Performance", "Performances", "Concerts, recitals, showcases, or ticketed performances."),
|
|
37131
|
-
verticalBookingPreset("voice_singing.lessons", "voice_singing", "appointment", "Voice session", "Voice sessions", "One-to-one singing lessons, voice coaching, or private practice sessions."),
|
|
37132
|
-
verticalBookingPreset("voice_singing.classes", "voice_singing", "class", "Ongoing weekly session", "Ongoing weekly sessions", "Regular choirs, voice circles, community singing, or group practice."),
|
|
37133
|
-
verticalBookingPreset("voice_singing.terms", "voice_singing", "course", "Singing term", "Singing terms", "Multi-week choir terms, voice courses, or fixed-date group programmes."),
|
|
37134
|
-
verticalBookingPreset("voice_singing.workshops", "voice_singing", "workshop", "Workshop", "Workshops", "One-off singing workshops, voice journeys, or devotional singing sessions."),
|
|
37135
|
-
verticalBookingPreset("voice_singing.performances", "voice_singing", "performance", "Performance", "Performances", "Choir concerts, sharing events, recitals, or community performances."),
|
|
37136
|
-
verticalBookingPreset("performing_arts_school.classes", "performing_arts_school", "class", "Class", "Classes", "Regular group classes, rehearsals, or weekly sessions."),
|
|
37137
|
-
verticalBookingPreset("performing_arts_school.terms", "performing_arts_school", "course", "Term", "Terms", "Multi-week term blocks or fixed-date course groups."),
|
|
37138
|
-
verticalBookingPreset("performing_arts_school.workshops", "performing_arts_school", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, or intensives."),
|
|
37139
|
-
verticalBookingPreset("performing_arts_school.performances", "performing_arts_school", "performance", "Performance", "Performances", "Shows, showcases, productions, or ticketed performances."),
|
|
37140
|
-
verticalBookingPreset("performing_arts_school.lessons", "performing_arts_school", "appointment", "Lesson", "Lessons", "One-to-one lessons, coaching, or audition prep."),
|
|
37141
|
-
verticalBookingPreset("community_wellbeing.classes", "community_wellbeing", "class", "Class", "Classes", "Regular groups, sessions, practices, or weekly activities."),
|
|
37142
|
-
verticalBookingPreset("community_wellbeing.workshops", "community_wellbeing", "workshop", "Workshop", "Workshops", "One-off workshops, talks, events, or gatherings."),
|
|
37143
|
-
verticalBookingPreset("community_wellbeing.courses", "community_wellbeing", "course", "Course", "Courses", "Fixed-schedule courses, study groups, or multi-session programmes."),
|
|
37144
|
-
verticalBookingPreset("community_wellbeing.appointments", "community_wellbeing", "appointment", "Appointment", "Appointments", "One-to-one appointments, consultations, or support sessions."),
|
|
37145
|
-
verticalBookingPreset("community_wellbeing.retreats", "community_wellbeing", "retreat", "Retreat", "Retreats", "Multi-day or residential retreats."),
|
|
37146
|
-
verticalBookingPreset("venue_event_space.resource_hire", "venue_event_space", "appointment", "Hire slot", "Hire slots", "Future room, venue, and resource hire bookings.", "future")
|
|
37147
|
-
];
|
|
37148
|
-
const VERTICAL_ID_SET = /* @__PURE__ */ new Set([
|
|
37149
|
-
"yoga_wellness",
|
|
37150
|
-
"fitness_pt",
|
|
37151
|
-
"dance_school",
|
|
37152
|
-
"physiotherapy_physical_health",
|
|
37153
|
-
"massage_bodywork",
|
|
37154
|
-
"therapist_practitioner",
|
|
37155
|
-
"beauty_spa",
|
|
37156
|
-
"consultant_coach",
|
|
37157
|
-
"training_provider",
|
|
37158
|
-
"retreat_centre",
|
|
37159
|
-
"music_school",
|
|
37160
|
-
"voice_singing",
|
|
37161
|
-
"performing_arts_school",
|
|
37162
|
-
"community_wellbeing",
|
|
37163
|
-
"venue_event_space"
|
|
37164
|
-
]);
|
|
37165
|
-
const VERTICAL_PRESET_ID_SET = new Set(VERTICAL_BOOKING_PRESETS.map((presetDefinition) => presetDefinition.id));
|
|
37166
|
-
function parseVerticalId(value) {
|
|
37167
|
-
return typeof value === "string" && VERTICAL_ID_SET.has(value) ? value : null;
|
|
37168
|
-
}
|
|
37169
|
-
function parseVerticalPresetId(value) {
|
|
37170
|
-
return typeof value === "string" && VERTICAL_PRESET_ID_SET.has(value) ? value : null;
|
|
37171
|
-
}
|
|
37172
|
-
function getVerticalPresetDefinition(presetId) {
|
|
37173
|
-
const definition = VERTICAL_BOOKING_PRESETS.find((presetDefinition) => presetDefinition.id === presetId);
|
|
37174
|
-
if (!definition) throw new Error(`Unhandled vertical preset id: ${presetId}`);
|
|
37175
|
-
return definition;
|
|
37176
|
-
}
|
|
37177
|
-
function toNonEmptyVerticalPresetIds(presetIds) {
|
|
37178
|
-
const firstPresetId = presetIds[0];
|
|
37179
|
-
return firstPresetId ? [firstPresetId, ...presetIds.slice(1)] : null;
|
|
37180
|
-
}
|
|
37181
|
-
function createConfiguredSiteVerticalBookingConfig(verticalId, selectedPresetIds) {
|
|
37182
|
-
return {
|
|
37183
|
-
verticalId,
|
|
37184
|
-
selectedPresetIds
|
|
37185
|
-
};
|
|
37186
|
-
}
|
|
37187
|
-
function createSiteVerticalBookingConfig(verticalId, selectedPresetIds) {
|
|
37188
|
-
const nonEmptyPresetIds = toNonEmptyVerticalPresetIds(selectedPresetIds);
|
|
37189
|
-
return nonEmptyPresetIds ? createConfiguredSiteVerticalBookingConfig(verticalId, nonEmptyPresetIds) : null;
|
|
37190
|
-
}
|
|
37191
|
-
function resolveSiteVerticalBookingConfig(rawConfig) {
|
|
37192
|
-
if (!rawConfig) return {
|
|
37193
|
-
kind: "unconfigured",
|
|
37194
|
-
config: DEFAULT_SITE_VERTICAL_BOOKING_CONFIG
|
|
37195
|
-
};
|
|
37196
|
-
const verticalId = parseVerticalId(rawConfig.verticalId);
|
|
37197
|
-
const selectedPresetIds = (Array.isArray(rawConfig.selectedPresetIds) ? rawConfig.selectedPresetIds : []).map(parseVerticalPresetId).filter((presetId) => Boolean(presetId));
|
|
37198
|
-
const config = {
|
|
37199
|
-
verticalId,
|
|
37200
|
-
selectedPresetIds
|
|
37201
|
-
};
|
|
37202
|
-
if (!verticalId && selectedPresetIds.length === 0) return {
|
|
37203
|
-
kind: "unconfigured",
|
|
37204
|
-
config: DEFAULT_SITE_VERTICAL_BOOKING_CONFIG
|
|
37205
|
-
};
|
|
37206
|
-
const issues = getSiteVerticalConfigIssues(rawConfig, config);
|
|
37207
|
-
if (issues.length > 0) return {
|
|
37208
|
-
kind: "invalid",
|
|
37209
|
-
config,
|
|
37210
|
-
issues
|
|
37211
|
-
};
|
|
37212
|
-
const configuredConfig = verticalId ? createSiteVerticalBookingConfig(verticalId, selectedPresetIds) : null;
|
|
37213
|
-
if (!configuredConfig) return {
|
|
37214
|
-
kind: "invalid",
|
|
37215
|
-
config,
|
|
37216
|
-
issues: ["empty_selected_presets"]
|
|
37217
|
-
};
|
|
37218
|
-
return {
|
|
37219
|
-
kind: "configured",
|
|
37220
|
-
config: configuredConfig,
|
|
37221
|
-
selectedPresets: configuredConfig.selectedPresetIds.map(getVerticalPresetDefinition)
|
|
37222
|
-
};
|
|
37223
|
-
}
|
|
37224
|
-
function getSiteVerticalConfigIssues(rawConfig, config) {
|
|
37225
|
-
const issues = /* @__PURE__ */ new Set();
|
|
37226
|
-
if (rawConfig.verticalId != null && !config.verticalId) issues.add("unknown_vertical");
|
|
37227
|
-
if (!config.verticalId && config.selectedPresetIds.length > 0) issues.add("missing_vertical");
|
|
37228
|
-
if ((Array.isArray(rawConfig.selectedPresetIds) ? rawConfig.selectedPresetIds : []).some((presetId) => parseVerticalPresetId(presetId) === null)) issues.add("unknown_preset");
|
|
37229
|
-
if (config.verticalId && config.selectedPresetIds.length === 0) issues.add("empty_selected_presets");
|
|
37230
|
-
const seenBehaviours = /* @__PURE__ */ new Set();
|
|
37231
|
-
for (const presetId of config.selectedPresetIds) {
|
|
37232
|
-
const presetDefinition = getVerticalPresetDefinition(presetId);
|
|
37233
|
-
if (config.verticalId && presetDefinition.verticalId !== config.verticalId) issues.add("preset_vertical_mismatch");
|
|
37234
|
-
if (presetDefinition.availability === "future") issues.add("future_preset_selected");
|
|
37235
|
-
if (seenBehaviours.has(presetDefinition.canonicalBehaviour)) issues.add("duplicate_canonical_behaviour");
|
|
37236
|
-
seenBehaviours.add(presetDefinition.canonicalBehaviour);
|
|
38051
|
+
//#region ../api/src/bookingVerticals.ts
|
|
38052
|
+
/**
|
|
38053
|
+
* Transport adapters for the booking-vertical domain.
|
|
38054
|
+
*
|
|
38055
|
+
* The domain catalog and all pure resolution/selection rules live in core;
|
|
38056
|
+
* this module owns only the Zod boundary used by API payloads.
|
|
38057
|
+
*/
|
|
38058
|
+
function formatRawDiagnosticValue(value) {
|
|
38059
|
+
const serialized = JSON.stringify(value);
|
|
38060
|
+
return serialized === void 0 ? String(value) : serialized;
|
|
38061
|
+
}
|
|
38062
|
+
function describeSiteVerticalConfigIssue(issue) {
|
|
38063
|
+
switch (issue.code) {
|
|
38064
|
+
case "unknown_vertical": return `${issue.code}: ${formatRawDiagnosticValue(issue.rawValue)}`;
|
|
38065
|
+
case "unknown_preset": return `${issue.code}: ${formatRawDiagnosticValue(issue.rawValue)}`;
|
|
38066
|
+
case "missing_vertical":
|
|
38067
|
+
case "empty_selected_presets":
|
|
38068
|
+
case "preset_vertical_mismatch":
|
|
38069
|
+
case "duplicate_preset_id":
|
|
38070
|
+
case "duplicate_canonical_behaviour":
|
|
38071
|
+
case "future_preset_selected": return issue.code;
|
|
38072
|
+
default: return assertNever$3(issue);
|
|
37237
38073
|
}
|
|
37238
|
-
return [...issues];
|
|
37239
38074
|
}
|
|
37240
38075
|
const VerticalIdSchema = z.string().trim().transform((value, ctx) => {
|
|
37241
38076
|
const parsed = parseVerticalId(value);
|
|
@@ -37267,16 +38102,12 @@ z.object({
|
|
|
37267
38102
|
if (resolved.kind === "invalid") {
|
|
37268
38103
|
ctx.addIssue({
|
|
37269
38104
|
code: z.ZodIssueCode.custom,
|
|
37270
|
-
message: `Invalid booking vertical config: ${resolved.issues.join(", ")}`
|
|
38105
|
+
message: `Invalid booking vertical config: ${resolved.issues.map(describeSiteVerticalConfigIssue).join(", ")}`
|
|
37271
38106
|
});
|
|
37272
38107
|
return z.NEVER;
|
|
37273
38108
|
}
|
|
37274
38109
|
return resolved.config;
|
|
37275
38110
|
});
|
|
37276
|
-
const DEFAULT_SITE_VERTICAL_BOOKING_CONFIG = {
|
|
37277
|
-
verticalId: null,
|
|
37278
|
-
selectedPresetIds: []
|
|
37279
|
-
};
|
|
37280
38111
|
//#endregion
|
|
37281
38112
|
//#region ../api/src/utils/isRecord.ts
|
|
37282
38113
|
function isRecord$1(value) {
|