@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/server.mjs
CHANGED
|
@@ -1383,6 +1383,17 @@ const PUBLIC_WHOLE_SERIES_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
1383
1383
|
}
|
|
1384
1384
|
});
|
|
1385
1385
|
//#endregion
|
|
1386
|
+
//#region ../api/src/publicEventEndpointDefinitions.ts
|
|
1387
|
+
const PUBLIC_EVENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({ resolveEventSubroute: {
|
|
1388
|
+
path: "/public/sites/{siteId}/events/subroutes/resolve",
|
|
1389
|
+
method: "GET",
|
|
1390
|
+
revalidate: 60,
|
|
1391
|
+
tags: [TAG_TEMPLATES.publicEvents, "event-subroute"],
|
|
1392
|
+
auth: "public",
|
|
1393
|
+
responseKind: "json",
|
|
1394
|
+
errors: []
|
|
1395
|
+
} });
|
|
1396
|
+
//#endregion
|
|
1386
1397
|
//#region ../api/src/siteApiKeyEndpointDefinitions.ts
|
|
1387
1398
|
const SITE_API_KEY_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
1388
1399
|
listSiteApiKeys: {
|
|
@@ -1509,10 +1520,244 @@ const EVENT_MANAGEMENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
1509
1520
|
"resource:conflict",
|
|
1510
1521
|
"server:internal_error"
|
|
1511
1522
|
]
|
|
1523
|
+
},
|
|
1524
|
+
updateEventIdentity: {
|
|
1525
|
+
path: "/sites/{siteId}/bookings/events/{eventId}",
|
|
1526
|
+
method: "PATCH",
|
|
1527
|
+
tags: ["site-{siteId}", "event-series-{siteId}"],
|
|
1528
|
+
auth: "user",
|
|
1529
|
+
responseKind: "json",
|
|
1530
|
+
errors: [
|
|
1531
|
+
"validation:invalid_input",
|
|
1532
|
+
"resource:not_found",
|
|
1533
|
+
"server:internal_error"
|
|
1534
|
+
]
|
|
1535
|
+
},
|
|
1536
|
+
createWholeSeriesRun: {
|
|
1537
|
+
path: "/sites/{siteId}/bookings/events/{eventId}/runs",
|
|
1538
|
+
method: "POST",
|
|
1539
|
+
tags: ["site-{siteId}", "event-series-{siteId}"],
|
|
1540
|
+
auth: "user",
|
|
1541
|
+
responseKind: "json",
|
|
1542
|
+
errors: [
|
|
1543
|
+
"validation:invalid_input",
|
|
1544
|
+
"resource:not_found",
|
|
1545
|
+
"resource:already_exists",
|
|
1546
|
+
"server:internal_error"
|
|
1547
|
+
]
|
|
1548
|
+
},
|
|
1549
|
+
updateWholeSeriesRun: {
|
|
1550
|
+
path: "/sites/{siteId}/bookings/events/{eventId}/runs/{runId}",
|
|
1551
|
+
method: "PATCH",
|
|
1552
|
+
tags: ["site-{siteId}", "event-series-{siteId}"],
|
|
1553
|
+
auth: "user",
|
|
1554
|
+
responseKind: "json",
|
|
1555
|
+
errors: [
|
|
1556
|
+
"validation:invalid_input",
|
|
1557
|
+
"resource:not_found",
|
|
1558
|
+
"resource:conflict",
|
|
1559
|
+
"server:internal_error"
|
|
1560
|
+
]
|
|
1561
|
+
},
|
|
1562
|
+
cancelWholeSeriesRun: {
|
|
1563
|
+
path: "/sites/{siteId}/bookings/events/{eventId}/runs/{runId}/cancellation",
|
|
1564
|
+
method: "POST",
|
|
1565
|
+
tags: ["site-{siteId}", "event-series-{siteId}"],
|
|
1566
|
+
auth: "user",
|
|
1567
|
+
responseKind: "json",
|
|
1568
|
+
errors: [
|
|
1569
|
+
"validation:invalid_input",
|
|
1570
|
+
"resource:not_found",
|
|
1571
|
+
"resource:conflict",
|
|
1572
|
+
"server:internal_error"
|
|
1573
|
+
]
|
|
1574
|
+
}
|
|
1575
|
+
});
|
|
1576
|
+
//#endregion
|
|
1577
|
+
//#region ../api/src/giftingEndpointDefinitions.ts
|
|
1578
|
+
/**
|
|
1579
|
+
* Gifting endpoints (gift cards & vouchers) — the dashboard surface that manages
|
|
1580
|
+
* offers, gifts and settings, plus the public buy/claim surface.
|
|
1581
|
+
*/
|
|
1582
|
+
const GIFTING_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
1583
|
+
createGiftingOffer: {
|
|
1584
|
+
path: "/sites/{siteId}/gifting/offers",
|
|
1585
|
+
method: "POST",
|
|
1586
|
+
tags: ["site-{siteId}", "gifting-offers-{siteId}"],
|
|
1587
|
+
auth: "user",
|
|
1588
|
+
responseKind: "json",
|
|
1589
|
+
errors: [
|
|
1590
|
+
"validation:invalid_input",
|
|
1591
|
+
"auth:forbidden",
|
|
1592
|
+
"server:internal_error"
|
|
1593
|
+
]
|
|
1594
|
+
},
|
|
1595
|
+
updateGiftingOffer: {
|
|
1596
|
+
path: "/sites/{siteId}/gifting/offers/{offerId}",
|
|
1597
|
+
method: "PATCH",
|
|
1598
|
+
tags: ["site-{siteId}", "gifting-offers-{siteId}"],
|
|
1599
|
+
auth: "user",
|
|
1600
|
+
responseKind: "json",
|
|
1601
|
+
errors: [
|
|
1602
|
+
"validation:invalid_input",
|
|
1603
|
+
"auth:forbidden",
|
|
1604
|
+
"resource:not_found",
|
|
1605
|
+
"resource:conflict",
|
|
1606
|
+
"server:internal_error"
|
|
1607
|
+
]
|
|
1608
|
+
},
|
|
1609
|
+
deleteGiftingOffer: {
|
|
1610
|
+
path: "/sites/{siteId}/gifting/offers/{offerId}",
|
|
1611
|
+
method: "DELETE",
|
|
1612
|
+
tags: ["site-{siteId}", "gifting-offers-{siteId}"],
|
|
1613
|
+
auth: "user",
|
|
1614
|
+
responseKind: "json",
|
|
1615
|
+
errors: [
|
|
1616
|
+
"auth:forbidden",
|
|
1617
|
+
"resource:not_found",
|
|
1618
|
+
"resource:conflict",
|
|
1619
|
+
"server:internal_error"
|
|
1620
|
+
]
|
|
1621
|
+
},
|
|
1622
|
+
duplicateGiftingOffer: {
|
|
1623
|
+
path: "/sites/{siteId}/gifting/offers/{offerId}/duplicate",
|
|
1624
|
+
method: "POST",
|
|
1625
|
+
tags: ["site-{siteId}", "gifting-offers-{siteId}"],
|
|
1626
|
+
auth: "user",
|
|
1627
|
+
responseKind: "json",
|
|
1628
|
+
errors: [
|
|
1629
|
+
"auth:forbidden",
|
|
1630
|
+
"resource:not_found",
|
|
1631
|
+
"server:internal_error"
|
|
1632
|
+
]
|
|
1633
|
+
},
|
|
1634
|
+
reorderGiftingOffers: {
|
|
1635
|
+
path: "/sites/{siteId}/gifting/offers/order",
|
|
1636
|
+
method: "PUT",
|
|
1637
|
+
tags: ["site-{siteId}", "gifting-offers-{siteId}"],
|
|
1638
|
+
auth: "user",
|
|
1639
|
+
responseKind: "json",
|
|
1640
|
+
errors: [
|
|
1641
|
+
"validation:invalid_input",
|
|
1642
|
+
"auth:forbidden",
|
|
1643
|
+
"resource:not_found",
|
|
1644
|
+
"server:internal_error"
|
|
1645
|
+
]
|
|
1646
|
+
},
|
|
1647
|
+
sendGift: {
|
|
1648
|
+
path: "/sites/{siteId}/gifting/gifts",
|
|
1649
|
+
method: "POST",
|
|
1650
|
+
tags: ["site-{siteId}", "gifting-gifts-{siteId}"],
|
|
1651
|
+
auth: "user",
|
|
1652
|
+
demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN,
|
|
1653
|
+
responseKind: "json",
|
|
1654
|
+
errors: [
|
|
1655
|
+
"validation:invalid_input",
|
|
1656
|
+
"auth:forbidden",
|
|
1657
|
+
"resource:not_found",
|
|
1658
|
+
"server:internal_error"
|
|
1659
|
+
]
|
|
1660
|
+
},
|
|
1661
|
+
resendGift: {
|
|
1662
|
+
path: "/sites/{siteId}/gifting/gifts/{giftId}/resend",
|
|
1663
|
+
method: "POST",
|
|
1664
|
+
tags: ["site-{siteId}", "gifting-gifts-{siteId}"],
|
|
1665
|
+
auth: "user",
|
|
1666
|
+
demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN,
|
|
1667
|
+
responseKind: "json",
|
|
1668
|
+
errors: [
|
|
1669
|
+
"auth:forbidden",
|
|
1670
|
+
"resource:not_found",
|
|
1671
|
+
"resource:conflict",
|
|
1672
|
+
"server:internal_error"
|
|
1673
|
+
]
|
|
1674
|
+
},
|
|
1675
|
+
correctGiftEmailAndResend: {
|
|
1676
|
+
path: "/sites/{siteId}/gifting/gifts/{giftId}/correct-email-and-resend",
|
|
1677
|
+
method: "POST",
|
|
1678
|
+
tags: ["site-{siteId}", "gifting-gifts-{siteId}"],
|
|
1679
|
+
auth: "user",
|
|
1680
|
+
demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN,
|
|
1681
|
+
responseKind: "json",
|
|
1682
|
+
errors: [
|
|
1683
|
+
"validation:invalid_input",
|
|
1684
|
+
"auth:forbidden",
|
|
1685
|
+
"resource:not_found",
|
|
1686
|
+
"resource:conflict",
|
|
1687
|
+
"server:internal_error"
|
|
1688
|
+
]
|
|
1689
|
+
},
|
|
1690
|
+
updateGiftingSettings: {
|
|
1691
|
+
path: "/sites/{siteId}/gifting/settings",
|
|
1692
|
+
method: "PATCH",
|
|
1693
|
+
tags: [
|
|
1694
|
+
"site-{siteId}",
|
|
1695
|
+
"gifting-offers-{siteId}",
|
|
1696
|
+
"gifting-gifts-{siteId}"
|
|
1697
|
+
],
|
|
1698
|
+
auth: "user",
|
|
1699
|
+
responseKind: "json",
|
|
1700
|
+
errors: [
|
|
1701
|
+
"validation:invalid_input",
|
|
1702
|
+
"auth:forbidden",
|
|
1703
|
+
"server:internal_error"
|
|
1704
|
+
]
|
|
1705
|
+
},
|
|
1706
|
+
listPublicGiftingOffers: {
|
|
1707
|
+
path: "/public/sites/{siteId}/gifting/offers",
|
|
1708
|
+
method: "GET",
|
|
1709
|
+
revalidate: 300,
|
|
1710
|
+
tags: [TAG_TEMPLATES.publicGifting],
|
|
1711
|
+
errors: [],
|
|
1712
|
+
auth: "public",
|
|
1713
|
+
responseKind: "json"
|
|
1714
|
+
},
|
|
1715
|
+
createPublicGiftingCheckout: {
|
|
1716
|
+
path: "/public/sites/{siteId}/gifting/checkout",
|
|
1717
|
+
method: "POST",
|
|
1718
|
+
tags: [TAG_TEMPLATES.publicGifting],
|
|
1719
|
+
errors: [],
|
|
1720
|
+
auth: "public",
|
|
1721
|
+
responseKind: "json"
|
|
1722
|
+
},
|
|
1723
|
+
claimGiftCardPublic: {
|
|
1724
|
+
path: "/public/sites/{siteId}/gifting/claim",
|
|
1725
|
+
method: "POST",
|
|
1726
|
+
tags: [TAG_TEMPLATES.publicGifting],
|
|
1727
|
+
errors: [],
|
|
1728
|
+
auth: "public",
|
|
1729
|
+
responseKind: "json"
|
|
1730
|
+
}
|
|
1731
|
+
});
|
|
1732
|
+
//#endregion
|
|
1733
|
+
//#region ../api/src/sdkEndpointDefinitions.ts
|
|
1734
|
+
/** SDK management endpoints that do not belong to a CRUD resource family. */
|
|
1735
|
+
const SDK_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
1736
|
+
sdkUpdateSettings: {
|
|
1737
|
+
path: "/sdk/{siteId}/settings",
|
|
1738
|
+
method: "PATCH",
|
|
1739
|
+
auth: "service",
|
|
1740
|
+
responseKind: "json",
|
|
1741
|
+
errors: ["validation:invalid_input", "server:internal_error"]
|
|
1742
|
+
},
|
|
1743
|
+
sdkConfigureBookingVertical: {
|
|
1744
|
+
path: "/sdk/{siteId}/settings/booking/vertical",
|
|
1745
|
+
method: "POST",
|
|
1746
|
+
auth: "service",
|
|
1747
|
+
responseKind: "json"
|
|
1748
|
+
},
|
|
1749
|
+
sdkSetupRevalidationWebhook: {
|
|
1750
|
+
path: "/sdk/{siteId}/webhooks/revalidation/setup",
|
|
1751
|
+
method: "POST",
|
|
1752
|
+
auth: "service",
|
|
1753
|
+
responseKind: "json",
|
|
1754
|
+
errors: ["validation:invalid_input", "server:internal_error"]
|
|
1512
1755
|
}
|
|
1513
1756
|
});
|
|
1514
1757
|
const API_ENDPOINTS$1 = {
|
|
1515
1758
|
...ACCOUNT_ENDPOINT_DEFINITIONS,
|
|
1759
|
+
...PUBLIC_EVENT_ENDPOINT_DEFINITIONS,
|
|
1760
|
+
...GIFTING_ENDPOINT_DEFINITIONS,
|
|
1516
1761
|
aiContentUpdateChat: {
|
|
1517
1762
|
path: "/ai/content-update-chat",
|
|
1518
1763
|
method: "POST",
|
|
@@ -3837,14 +4082,6 @@ const API_ENDPOINTS$1 = {
|
|
|
3837
4082
|
auth: "user",
|
|
3838
4083
|
responseKind: "json"
|
|
3839
4084
|
},
|
|
3840
|
-
mediaAssignIdentifier: {
|
|
3841
|
-
path: "/media/{assetId}/identifier",
|
|
3842
|
-
method: "POST",
|
|
3843
|
-
tags: ["media", "media-{assetId}"],
|
|
3844
|
-
errors: ["resource:not_found", "server:internal_error"],
|
|
3845
|
-
auth: "user",
|
|
3846
|
-
responseKind: "json"
|
|
3847
|
-
},
|
|
3848
4085
|
mediaDelete: {
|
|
3849
4086
|
path: "/media/{assetId}",
|
|
3850
4087
|
method: "DELETE",
|
|
@@ -4798,31 +5035,6 @@ const API_ENDPOINTS$1 = {
|
|
|
4798
5035
|
auth: "public",
|
|
4799
5036
|
responseKind: "json"
|
|
4800
5037
|
},
|
|
4801
|
-
listPublicGiftingOffers: {
|
|
4802
|
-
path: "/public/sites/{siteId}/gifting/offers",
|
|
4803
|
-
method: "GET",
|
|
4804
|
-
revalidate: 300,
|
|
4805
|
-
tags: [TAG_TEMPLATES.publicGifting],
|
|
4806
|
-
errors: [],
|
|
4807
|
-
auth: "public",
|
|
4808
|
-
responseKind: "json"
|
|
4809
|
-
},
|
|
4810
|
-
createPublicGiftingCheckout: {
|
|
4811
|
-
path: "/public/sites/{siteId}/gifting/checkout",
|
|
4812
|
-
method: "POST",
|
|
4813
|
-
tags: [TAG_TEMPLATES.publicGifting],
|
|
4814
|
-
errors: [],
|
|
4815
|
-
auth: "public",
|
|
4816
|
-
responseKind: "json"
|
|
4817
|
-
},
|
|
4818
|
-
claimGiftCardPublic: {
|
|
4819
|
-
path: "/public/sites/{siteId}/gifting/claim",
|
|
4820
|
-
method: "POST",
|
|
4821
|
-
tags: [TAG_TEMPLATES.publicGifting],
|
|
4822
|
-
errors: [],
|
|
4823
|
-
auth: "public",
|
|
4824
|
-
responseKind: "json"
|
|
4825
|
-
},
|
|
4826
5038
|
createShopCheckout: {
|
|
4827
5039
|
path: "/public/sites/{siteId}/bookings/checkout",
|
|
4828
5040
|
method: "POST",
|
|
@@ -4873,14 +5085,6 @@ const API_ENDPOINTS$1 = {
|
|
|
4873
5085
|
responseKind: "json",
|
|
4874
5086
|
errors: []
|
|
4875
5087
|
},
|
|
4876
|
-
resolveEventOccurrence: {
|
|
4877
|
-
path: "/public/sites/{siteId}/events/occurrences/resolve",
|
|
4878
|
-
method: "GET",
|
|
4879
|
-
revalidate: 60,
|
|
4880
|
-
tags: [TAG_TEMPLATES.publicEvents, "event-occurrence"],
|
|
4881
|
-
auth: "public",
|
|
4882
|
-
responseKind: "json"
|
|
4883
|
-
},
|
|
4884
5088
|
registerForEvent: {
|
|
4885
5089
|
path: "/public/sites/{siteId}/events/register",
|
|
4886
5090
|
method: "POST",
|
|
@@ -6505,12 +6709,6 @@ const API_ENDPOINTS$1 = {
|
|
|
6505
6709
|
auth: "service",
|
|
6506
6710
|
responseKind: "json"
|
|
6507
6711
|
},
|
|
6508
|
-
sdkMediaAssignIdentifier: {
|
|
6509
|
-
path: "/sdk/{siteId}/media/assign-identifier",
|
|
6510
|
-
method: "POST",
|
|
6511
|
-
auth: "service",
|
|
6512
|
-
responseKind: "json"
|
|
6513
|
-
},
|
|
6514
6712
|
sdkUpdateWorkflowRunStatus: {
|
|
6515
6713
|
path: "/sdk/{siteId}/workflows/runs/{runId}/status",
|
|
6516
6714
|
method: "POST",
|
|
@@ -6592,6 +6790,7 @@ const API_ENDPOINTS$1 = {
|
|
|
6592
6790
|
sdkPullSettings: {
|
|
6593
6791
|
path: "/sdk/{siteId}/pull/settings",
|
|
6594
6792
|
method: "GET",
|
|
6793
|
+
errors: ["resource:conflict", "server:internal_error"],
|
|
6595
6794
|
auth: "service",
|
|
6596
6795
|
responseKind: "json"
|
|
6597
6796
|
},
|
|
@@ -6643,6 +6842,7 @@ const API_ENDPOINTS$1 = {
|
|
|
6643
6842
|
auth: "service",
|
|
6644
6843
|
responseKind: "json"
|
|
6645
6844
|
},
|
|
6845
|
+
...SDK_ENDPOINT_DEFINITIONS,
|
|
6646
6846
|
sdkUpsertPage: {
|
|
6647
6847
|
path: "/sdk/{siteId}/pages",
|
|
6648
6848
|
method: "POST",
|
|
@@ -6927,19 +7127,6 @@ const API_ENDPOINTS$1 = {
|
|
|
6927
7127
|
auth: "service",
|
|
6928
7128
|
responseKind: "json"
|
|
6929
7129
|
},
|
|
6930
|
-
sdkUpdateSettings: {
|
|
6931
|
-
path: "/sdk/{siteId}/settings",
|
|
6932
|
-
method: "PATCH",
|
|
6933
|
-
auth: "service",
|
|
6934
|
-
responseKind: "json"
|
|
6935
|
-
},
|
|
6936
|
-
sdkSetupRevalidationWebhook: {
|
|
6937
|
-
path: "/sdk/{siteId}/webhooks/revalidation/setup",
|
|
6938
|
-
method: "POST",
|
|
6939
|
-
auth: "service",
|
|
6940
|
-
responseKind: "json",
|
|
6941
|
-
errors: ["validation:invalid_input", "server:internal_error"]
|
|
6942
|
-
},
|
|
6943
7130
|
portalGetProfile: {
|
|
6944
7131
|
path: "/portal/me",
|
|
6945
7132
|
method: "GET",
|
|
@@ -8009,7 +8196,7 @@ var SimpleCache = class {
|
|
|
8009
8196
|
* 1. This constant
|
|
8010
8197
|
* 2. The "version" field in package.json
|
|
8011
8198
|
*/
|
|
8012
|
-
const SDK_VERSION = "0.
|
|
8199
|
+
const SDK_VERSION = "0.132.0";
|
|
8013
8200
|
//#endregion
|
|
8014
8201
|
//#region src/client/error.ts
|
|
8015
8202
|
let _Symbol$for;
|
|
@@ -8214,7 +8401,7 @@ const PUBLIC_ENDPOINT_NAMES = [
|
|
|
8214
8401
|
"listPublicProducts",
|
|
8215
8402
|
"listPublicPasses",
|
|
8216
8403
|
"listPublicMemberships",
|
|
8217
|
-
"
|
|
8404
|
+
"resolveEventSubroute",
|
|
8218
8405
|
"checkRedirect",
|
|
8219
8406
|
"getRoutableContent",
|
|
8220
8407
|
"getPublicRoutableContent",
|
|
@@ -8363,11 +8550,11 @@ const API_ENDPOINTS = Object.freeze({
|
|
|
8363
8550
|
auth: "public",
|
|
8364
8551
|
responseKind: "json"
|
|
8365
8552
|
},
|
|
8366
|
-
|
|
8367
|
-
path: "/public/sites/{siteId}/events/
|
|
8553
|
+
resolveEventSubroute: {
|
|
8554
|
+
path: "/public/sites/{siteId}/events/subroutes/resolve",
|
|
8368
8555
|
method: "GET",
|
|
8369
8556
|
revalidate: 60,
|
|
8370
|
-
tags: ["riverbank:site:{siteId}:public-events", "event-
|
|
8557
|
+
tags: ["riverbank:site:{siteId}:public-events", "event-subroute"],
|
|
8371
8558
|
auth: "public",
|
|
8372
8559
|
responseKind: "json"
|
|
8373
8560
|
},
|
|
@@ -8564,7 +8751,7 @@ const RUNTIME_CACHE_DURABILITY_OVERRIDES = {
|
|
|
8564
8751
|
kind: "live-only",
|
|
8565
8752
|
reason: "safety_sensitive_booking"
|
|
8566
8753
|
},
|
|
8567
|
-
|
|
8754
|
+
resolveEventSubroute: {
|
|
8568
8755
|
kind: "memory-only",
|
|
8569
8756
|
reason: "durable_rollout_pending"
|
|
8570
8757
|
},
|
|
@@ -8594,7 +8781,7 @@ function isTruthyParam(value) {
|
|
|
8594
8781
|
}
|
|
8595
8782
|
function isPreviewRequest(endpoint, params) {
|
|
8596
8783
|
if (endpoint === "getContentByPath") return isTruthyParam(params.preview);
|
|
8597
|
-
if (endpoint === "listPublishedEntries" || endpoint === "
|
|
8784
|
+
if (endpoint === "listPublishedEntries" || endpoint === "resolveEventSubroute") return params.stage === "preview";
|
|
8598
8785
|
return false;
|
|
8599
8786
|
}
|
|
8600
8787
|
function getEndpointFreshTtlSec(endpoint) {
|
|
@@ -8784,6 +8971,36 @@ function createWholeSeriesReadOperations(deps) {
|
|
|
8784
8971
|
} };
|
|
8785
8972
|
}
|
|
8786
8973
|
//#endregion
|
|
8974
|
+
//#region src/client/eventSubrouteReadOperations.ts
|
|
8975
|
+
function createEventSubrouteReadOperations(deps) {
|
|
8976
|
+
async function resolveEventSubroute(params, kind) {
|
|
8977
|
+
const { siteId, subject, segment, signal } = params;
|
|
8978
|
+
if (!siteId || !segment) throw new Error(`${kind === "event-run" ? "resolveEventRun" : "resolveEventOccurrence"}() requires siteId, subject, and segment`);
|
|
8979
|
+
const subjectId = subject.kind === "eventOffering" ? subject.eventOfferingId : subject.eventSeriesId;
|
|
8980
|
+
return deps.resilientFetchData(`${kind}:${siteId}:${subject.kind}:${subjectId}:${segment}`, (requestSignal) => deps.apiClient({
|
|
8981
|
+
endpoint: "resolveEventSubroute",
|
|
8982
|
+
params: {
|
|
8983
|
+
siteId,
|
|
8984
|
+
kind,
|
|
8985
|
+
subjectKind: subject.kind,
|
|
8986
|
+
subjectId,
|
|
8987
|
+
segment
|
|
8988
|
+
},
|
|
8989
|
+
options: { signal: requestSignal }
|
|
8990
|
+
}), { signal });
|
|
8991
|
+
}
|
|
8992
|
+
return {
|
|
8993
|
+
async resolveEventOccurrence(params) {
|
|
8994
|
+
const response = await resolveEventSubroute(params, "event-occurrence");
|
|
8995
|
+
return { occurrence: response.subroute?.kind === "event-occurrence" ? response.subroute.occurrence : null };
|
|
8996
|
+
},
|
|
8997
|
+
async resolveEventRun(params) {
|
|
8998
|
+
const response = await resolveEventSubroute(params, "event-run");
|
|
8999
|
+
return { run: response.subroute?.kind === "event-run" ? response.subroute.run : null };
|
|
9000
|
+
}
|
|
9001
|
+
};
|
|
9002
|
+
}
|
|
9003
|
+
//#endregion
|
|
8787
9004
|
//#region src/client/combineAbortSignals.ts
|
|
8788
9005
|
/** Combine signals into one that aborts when any input aborts. */
|
|
8789
9006
|
function combineAbortSignals(...signals) {
|
|
@@ -9594,6 +9811,10 @@ function createRiverbankClientWithDeps(deps, config) {
|
|
|
9594
9811
|
apiClient,
|
|
9595
9812
|
resilientFetchData
|
|
9596
9813
|
});
|
|
9814
|
+
const eventSubrouteReads = createEventSubrouteReadOperations({
|
|
9815
|
+
apiClient,
|
|
9816
|
+
resilientFetchData
|
|
9817
|
+
});
|
|
9597
9818
|
async function getEntriesInternal(params) {
|
|
9598
9819
|
const { siteId, contentType, limit, offset, order, preview = false, mode, entryIds, includeMeta, signal } = params;
|
|
9599
9820
|
const entryIdsCacheKey = mode === "manual" && entryIds?.length ? entryIds.join(",") : "";
|
|
@@ -9876,20 +10097,7 @@ function createRiverbankClientWithDeps(deps, config) {
|
|
|
9876
10097
|
});
|
|
9877
10098
|
}, { signal });
|
|
9878
10099
|
},
|
|
9879
|
-
|
|
9880
|
-
const { siteId, eventSeriesIds, segment, signal } = params;
|
|
9881
|
-
if (!siteId || eventSeriesIds.length === 0 || !segment) throw new Error("resolveEventOccurrence() requires siteId, eventSeriesIds, and segment");
|
|
9882
|
-
const seriesScope = [...new Set(eventSeriesIds)].sort();
|
|
9883
|
-
return resilientFetchData(`event-occurrence:${siteId}:${seriesScope.join(",")}:${segment}`, async (sig) => apiClient({
|
|
9884
|
-
endpoint: "resolveEventOccurrence",
|
|
9885
|
-
params: {
|
|
9886
|
-
siteId,
|
|
9887
|
-
eventSeriesIds: seriesScope.join(","),
|
|
9888
|
-
segment
|
|
9889
|
-
},
|
|
9890
|
-
options: { signal: sig }
|
|
9891
|
-
}), { signal });
|
|
9892
|
-
},
|
|
10100
|
+
...eventSubrouteReads,
|
|
9893
10101
|
async checkRedirect(params) {
|
|
9894
10102
|
const { siteId, path, signal } = params;
|
|
9895
10103
|
if (!siteId || !path) throw new Error("checkRedirect() requires siteId and path");
|
|
@@ -10882,6 +11090,298 @@ function parseManagementKey(raw) {
|
|
|
10882
11090
|
if (typeof raw !== "string" || !raw.startsWith("bld_mgmt_sk_") || raw.length === 12) return err$1({ kind: "invalid-management-key" });
|
|
10883
11091
|
return ok$1(createSecretInternal("management-key", raw));
|
|
10884
11092
|
}
|
|
11093
|
+
//#endregion
|
|
11094
|
+
//#region ../core/src/event-series-behaviour.ts
|
|
11095
|
+
const SURFACE_EVENT_PRESET_VALUES = [
|
|
11096
|
+
"class",
|
|
11097
|
+
"course",
|
|
11098
|
+
"term",
|
|
11099
|
+
"workshop",
|
|
11100
|
+
"retreat",
|
|
11101
|
+
"performance"
|
|
11102
|
+
];
|
|
11103
|
+
//#endregion
|
|
11104
|
+
//#region ../core/src/booking-vertical-preset.ts
|
|
11105
|
+
const BOOKING_ENGINE_BY_BEHAVIOUR = {
|
|
11106
|
+
class: "event_series",
|
|
11107
|
+
workshop: "event_series",
|
|
11108
|
+
course: "event_series",
|
|
11109
|
+
retreat: "event_series",
|
|
11110
|
+
performance: "event_series",
|
|
11111
|
+
appointment: "appointment_service"
|
|
11112
|
+
};
|
|
11113
|
+
function verticalBookingPreset(id, verticalId, canonicalBehaviour, label, pluralLabel, description, availability = "onboarding") {
|
|
11114
|
+
return {
|
|
11115
|
+
id,
|
|
11116
|
+
verticalId,
|
|
11117
|
+
canonicalBehaviour,
|
|
11118
|
+
engine: BOOKING_ENGINE_BY_BEHAVIOUR[canonicalBehaviour],
|
|
11119
|
+
availability,
|
|
11120
|
+
label,
|
|
11121
|
+
pluralLabel,
|
|
11122
|
+
description
|
|
11123
|
+
};
|
|
11124
|
+
}
|
|
11125
|
+
//#endregion
|
|
11126
|
+
//#region ../core/src/booking-vertical-definitions.ts
|
|
11127
|
+
const VERTICAL_DEFINITIONS = [
|
|
11128
|
+
{
|
|
11129
|
+
id: "yoga_wellness",
|
|
11130
|
+
label: "Yoga, meditation or mindfulness",
|
|
11131
|
+
description: "Yoga studios, wellness teachers, and movement practitioners."
|
|
11132
|
+
},
|
|
11133
|
+
{
|
|
11134
|
+
id: "fitness_pt",
|
|
11135
|
+
label: "Fitness and personal training",
|
|
11136
|
+
description: "Personal trainers, group training, and fitness programmes."
|
|
11137
|
+
},
|
|
11138
|
+
{
|
|
11139
|
+
id: "dance_school",
|
|
11140
|
+
label: "Dance school",
|
|
11141
|
+
description: "Dance classes, courses or terms, workshops, private lessons, and shows."
|
|
11142
|
+
},
|
|
11143
|
+
{
|
|
11144
|
+
id: "physiotherapy_physical_health",
|
|
11145
|
+
label: "Physiotherapy & physical health",
|
|
11146
|
+
description: "Physiotherapists, chiropractors, osteopaths, sports therapists, and rehabilitation practitioners."
|
|
11147
|
+
},
|
|
11148
|
+
{
|
|
11149
|
+
id: "massage_bodywork",
|
|
11150
|
+
label: "Massage & bodywork",
|
|
11151
|
+
description: "Massage therapists, bodyworkers, and somatic practitioners."
|
|
11152
|
+
},
|
|
11153
|
+
{
|
|
11154
|
+
id: "therapist_practitioner",
|
|
11155
|
+
label: "Therapist or practitioner",
|
|
11156
|
+
description: "Appointments, sessions, consultations, and occasional group work."
|
|
11157
|
+
},
|
|
11158
|
+
{
|
|
11159
|
+
id: "beauty_spa",
|
|
11160
|
+
label: "Beauty or spa",
|
|
11161
|
+
description: "Treatment-led businesses with optional workshops."
|
|
11162
|
+
},
|
|
11163
|
+
{
|
|
11164
|
+
id: "consultant_coach",
|
|
11165
|
+
label: "Consultant or coach",
|
|
11166
|
+
description: "One-to-one calls, workshops, courses, and retreats."
|
|
11167
|
+
},
|
|
11168
|
+
{
|
|
11169
|
+
id: "training_provider",
|
|
11170
|
+
label: "Training provider",
|
|
11171
|
+
description: "Courses, workshops, classes, appointments, and residential training."
|
|
11172
|
+
},
|
|
11173
|
+
{
|
|
11174
|
+
id: "retreat_centre",
|
|
11175
|
+
label: "Retreat centre",
|
|
11176
|
+
description: "Residential retreats, workshops, classes, courses, and private sessions."
|
|
11177
|
+
},
|
|
11178
|
+
{
|
|
11179
|
+
id: "music_school",
|
|
11180
|
+
label: "Music teacher or school",
|
|
11181
|
+
description: "Lessons, classes, terms, workshops, and performances."
|
|
11182
|
+
},
|
|
11183
|
+
{
|
|
11184
|
+
id: "voice_singing",
|
|
11185
|
+
label: "Voice & Singing",
|
|
11186
|
+
description: "Singing lessons, choirs, voice circles, workshops, and performances."
|
|
11187
|
+
},
|
|
11188
|
+
{
|
|
11189
|
+
id: "performing_arts_school",
|
|
11190
|
+
label: "Theatre or performing arts school",
|
|
11191
|
+
description: "Classes, terms, workshops, performances, and lessons."
|
|
11192
|
+
},
|
|
11193
|
+
{
|
|
11194
|
+
id: "community_wellbeing",
|
|
11195
|
+
label: "Community or wellbeing centre",
|
|
11196
|
+
description: "Groups, workshops, courses, appointments, and retreats."
|
|
11197
|
+
},
|
|
11198
|
+
{
|
|
11199
|
+
id: "venue_event_space",
|
|
11200
|
+
label: "Venue or event space",
|
|
11201
|
+
description: "Room, resource, or access bookings. Depends on the future capacity-booking domain."
|
|
11202
|
+
}
|
|
11203
|
+
];
|
|
11204
|
+
VERTICAL_DEFINITIONS.map(({ id }) => id);
|
|
11205
|
+
//#endregion
|
|
11206
|
+
//#region ../core/src/booking-vertical-catalog.ts
|
|
11207
|
+
const VERTICAL_BOOKING_PRESETS = [
|
|
11208
|
+
verticalBookingPreset("yoga_wellness.classes", "yoga_wellness", "class", "Class", "Classes", "Regular scheduled classes and group sessions."),
|
|
11209
|
+
verticalBookingPreset("yoga_wellness.workshops", "yoga_wellness", "workshop", "Workshop", "Workshops", "One-off workshops, day retreats, or special sessions."),
|
|
11210
|
+
verticalBookingPreset("yoga_wellness.courses", "yoga_wellness", "course", "Course", "Courses", "Fixed-schedule courses or multi-session groups."),
|
|
11211
|
+
verticalBookingPreset("yoga_wellness.retreats", "yoga_wellness", "retreat", "Retreat", "Retreats", "Multi-day or residential retreats and immersive experiences."),
|
|
11212
|
+
verticalBookingPreset("yoga_wellness.appointments", "yoga_wellness", "appointment", "Appointment", "Appointments", "Private sessions, consultations, or one-to-one support."),
|
|
11213
|
+
verticalBookingPreset("fitness_pt.group_training", "fitness_pt", "class", "Group training", "Group training", "Regular scheduled classes and group sessions."),
|
|
11214
|
+
verticalBookingPreset("fitness_pt.personal_training", "fitness_pt", "appointment", "Personal training", "Personal training", "One-to-one sessions booked from your availability."),
|
|
11215
|
+
verticalBookingPreset("fitness_pt.programmes", "fitness_pt", "course", "Programme", "Programmes", "Multi-session programmes like bootcamps or courses."),
|
|
11216
|
+
verticalBookingPreset("fitness_pt.workshops", "fitness_pt", "workshop", "Workshop", "Workshops", "One-off workshops, events, or special sessions."),
|
|
11217
|
+
verticalBookingPreset("fitness_pt.retreats", "fitness_pt", "retreat", "Retreat", "Retreats", "Multi-day or residential fitness experiences."),
|
|
11218
|
+
verticalBookingPreset("dance_school.classes", "dance_school", "class", "Class", "Classes", "Regular group classes and weekly sessions."),
|
|
11219
|
+
{
|
|
11220
|
+
...verticalBookingPreset("dance_school.terms", "dance_school", "course", "Term", "Terms", "Multi-week term blocks or fixed-date course groups."),
|
|
11221
|
+
eventPresetOverride: "term"
|
|
11222
|
+
},
|
|
11223
|
+
verticalBookingPreset("dance_school.courses", "dance_school", "course", "Course", "Courses", "Fixed-schedule courses or multi-session groups.", "settings"),
|
|
11224
|
+
verticalBookingPreset("dance_school.workshops", "dance_school", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, or intensives."),
|
|
11225
|
+
verticalBookingPreset("dance_school.private_lessons", "dance_school", "appointment", "Private lesson", "Private lessons", "One-to-one lessons or coaching sessions."),
|
|
11226
|
+
verticalBookingPreset("dance_school.shows", "dance_school", "performance", "Show", "Shows", "Ticketed performances, showcases, and recitals."),
|
|
11227
|
+
verticalBookingPreset("physiotherapy_physical_health.appointments", "physiotherapy_physical_health", "appointment", "Appointment", "Appointments", "Assessments, treatments, follow-ups, and rehabilitation sessions."),
|
|
11228
|
+
verticalBookingPreset("physiotherapy_physical_health.rehab_classes", "physiotherapy_physical_health", "class", "Rehab class", "Rehab classes", "Regular rehabilitation, mobility, strength, or recovery classes."),
|
|
11229
|
+
verticalBookingPreset("physiotherapy_physical_health.workshops", "physiotherapy_physical_health", "workshop", "Workshop", "Workshops", "One-off workshops, talks, or practical group sessions."),
|
|
11230
|
+
verticalBookingPreset("massage_bodywork.treatments", "massage_bodywork", "appointment", "Treatment", "Treatments", "Massage treatments, bodywork sessions, and one-to-one appointments."),
|
|
11231
|
+
verticalBookingPreset("massage_bodywork.group_sessions", "massage_bodywork", "class", "Group session", "Group sessions", "Regular bodywork, somatic movement, or self-massage sessions."),
|
|
11232
|
+
verticalBookingPreset("massage_bodywork.workshops", "massage_bodywork", "workshop", "Workshop", "Workshops", "One-off bodywork, self-massage, or somatic practice workshops."),
|
|
11233
|
+
verticalBookingPreset("therapist_practitioner.appointments", "therapist_practitioner", "appointment", "Appointment", "Appointments", "Sessions, consultations, treatments, or assessments."),
|
|
11234
|
+
verticalBookingPreset("therapist_practitioner.workshops", "therapist_practitioner", "workshop", "Workshop", "Workshops", "One-off group workshops, talks, or wellbeing sessions."),
|
|
11235
|
+
verticalBookingPreset("therapist_practitioner.retreats", "therapist_practitioner", "retreat", "Retreat", "Retreats", "Multi-day retreats or immersive group experiences."),
|
|
11236
|
+
verticalBookingPreset("beauty_spa.appointments", "beauty_spa", "appointment", "Appointment", "Appointments", "Treatments, consultations, services, and sessions."),
|
|
11237
|
+
verticalBookingPreset("beauty_spa.workshops", "beauty_spa", "workshop", "Workshop", "Workshops", "Skincare workshops, makeup lessons, demos, or group events."),
|
|
11238
|
+
verticalBookingPreset("consultant_coach.appointments", "consultant_coach", "appointment", "Appointment", "Appointments", "One-to-one calls, consultations, reviews, or coaching sessions."),
|
|
11239
|
+
verticalBookingPreset("consultant_coach.workshops", "consultant_coach", "workshop", "Workshop", "Workshops", "One-off group sessions, webinars, or strategy days."),
|
|
11240
|
+
verticalBookingPreset("consultant_coach.courses", "consultant_coach", "course", "Course", "Courses", "Fixed-schedule cohorts or multi-session group programmes."),
|
|
11241
|
+
verticalBookingPreset("consultant_coach.retreats", "consultant_coach", "retreat", "Retreat", "Retreats", "Multi-day coaching retreats or immersive experiences."),
|
|
11242
|
+
verticalBookingPreset("training_provider.courses", "training_provider", "course", "Course", "Courses", "Fixed-schedule courses, cohorts, and multi-session training."),
|
|
11243
|
+
verticalBookingPreset("training_provider.workshops", "training_provider", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, and short training sessions."),
|
|
11244
|
+
verticalBookingPreset("training_provider.appointments", "training_provider", "appointment", "Appointment", "Appointments", "Consultations, assessments, mentoring, or office hours."),
|
|
11245
|
+
verticalBookingPreset("training_provider.classes", "training_provider", "class", "Class", "Classes", "Regular classes, sessions, or groups.", "settings"),
|
|
11246
|
+
verticalBookingPreset("training_provider.residentials", "training_provider", "retreat", "Residential", "Residentials", "Residential courses or multi-day training experiences.", "settings"),
|
|
11247
|
+
verticalBookingPreset("retreat_centre.retreats", "retreat_centre", "retreat", "Retreat", "Retreats", "Multi-day or residential retreats with richer booking needs."),
|
|
11248
|
+
verticalBookingPreset("retreat_centre.workshops", "retreat_centre", "workshop", "Workshop", "Workshops", "One-day retreats, ceremonies, workshops, or special events."),
|
|
11249
|
+
verticalBookingPreset("retreat_centre.classes", "retreat_centre", "class", "Class", "Classes", "Regular sessions like guided meditations or group practices."),
|
|
11250
|
+
verticalBookingPreset("retreat_centre.courses", "retreat_centre", "course", "Course", "Courses", "Fixed-schedule programmes or multi-session experiences."),
|
|
11251
|
+
verticalBookingPreset("retreat_centre.appointments", "retreat_centre", "appointment", "Appointment", "Appointments", "Private sessions, therapies, consultations, or add-ons."),
|
|
11252
|
+
verticalBookingPreset("music_school.lessons", "music_school", "appointment", "Lesson", "Lessons", "One-to-one lessons, consultations, or coaching sessions."),
|
|
11253
|
+
verticalBookingPreset("music_school.classes", "music_school", "class", "Class", "Classes", "Regular group classes, ensembles, or recurring sessions."),
|
|
11254
|
+
{
|
|
11255
|
+
...verticalBookingPreset("music_school.terms", "music_school", "course", "Term", "Terms", "Multi-week term blocks or fixed-date group courses."),
|
|
11256
|
+
eventPresetOverride: "term"
|
|
11257
|
+
},
|
|
11258
|
+
verticalBookingPreset("music_school.workshops", "music_school", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, or intensives."),
|
|
11259
|
+
verticalBookingPreset("music_school.performances", "music_school", "performance", "Performance", "Performances", "Concerts, recitals, showcases, or ticketed performances."),
|
|
11260
|
+
verticalBookingPreset("voice_singing.lessons", "voice_singing", "appointment", "Voice session", "Voice sessions", "One-to-one singing lessons, voice coaching, or private practice sessions."),
|
|
11261
|
+
verticalBookingPreset("voice_singing.classes", "voice_singing", "class", "Ongoing weekly session", "Ongoing weekly sessions", "Regular choirs, voice circles, community singing, or group practice."),
|
|
11262
|
+
{
|
|
11263
|
+
...verticalBookingPreset("voice_singing.terms", "voice_singing", "course", "Singing term", "Singing terms", "Multi-week choir terms, voice courses, or fixed-date group programmes."),
|
|
11264
|
+
eventPresetOverride: "term"
|
|
11265
|
+
},
|
|
11266
|
+
verticalBookingPreset("voice_singing.workshops", "voice_singing", "workshop", "Workshop", "Workshops", "One-off singing workshops, voice journeys, or devotional singing sessions."),
|
|
11267
|
+
verticalBookingPreset("voice_singing.performances", "voice_singing", "performance", "Performance", "Performances", "Choir concerts, sharing events, recitals, or community performances."),
|
|
11268
|
+
verticalBookingPreset("performing_arts_school.classes", "performing_arts_school", "class", "Class", "Classes", "Regular group classes, rehearsals, or weekly sessions."),
|
|
11269
|
+
{
|
|
11270
|
+
...verticalBookingPreset("performing_arts_school.terms", "performing_arts_school", "course", "Term", "Terms", "Multi-week term blocks or fixed-date course groups."),
|
|
11271
|
+
eventPresetOverride: "term"
|
|
11272
|
+
},
|
|
11273
|
+
verticalBookingPreset("performing_arts_school.workshops", "performing_arts_school", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, or intensives."),
|
|
11274
|
+
verticalBookingPreset("performing_arts_school.performances", "performing_arts_school", "performance", "Performance", "Performances", "Shows, showcases, productions, or ticketed performances."),
|
|
11275
|
+
verticalBookingPreset("performing_arts_school.lessons", "performing_arts_school", "appointment", "Lesson", "Lessons", "One-to-one lessons, coaching, or audition prep."),
|
|
11276
|
+
verticalBookingPreset("community_wellbeing.classes", "community_wellbeing", "class", "Class", "Classes", "Regular groups, sessions, practices, or weekly activities."),
|
|
11277
|
+
verticalBookingPreset("community_wellbeing.workshops", "community_wellbeing", "workshop", "Workshop", "Workshops", "One-off workshops, talks, events, or gatherings."),
|
|
11278
|
+
verticalBookingPreset("community_wellbeing.courses", "community_wellbeing", "course", "Course", "Courses", "Fixed-schedule courses, study groups, or multi-session programmes."),
|
|
11279
|
+
verticalBookingPreset("community_wellbeing.appointments", "community_wellbeing", "appointment", "Appointment", "Appointments", "One-to-one appointments, consultations, or support sessions."),
|
|
11280
|
+
verticalBookingPreset("community_wellbeing.retreats", "community_wellbeing", "retreat", "Retreat", "Retreats", "Multi-day or residential retreats."),
|
|
11281
|
+
verticalBookingPreset("venue_event_space.resource_hire", "venue_event_space", "appointment", "Hire slot", "Hire slots", "Future room, venue, and resource hire bookings.", "future")
|
|
11282
|
+
];
|
|
11283
|
+
//#endregion
|
|
11284
|
+
//#region ../core/src/booking-vertical-config.ts
|
|
11285
|
+
const VERTICAL_ID_SET = new Set(VERTICAL_DEFINITIONS.map(({ id }) => id));
|
|
11286
|
+
const VERTICAL_PRESET_ID_SET = new Set(VERTICAL_BOOKING_PRESETS.map((presetDefinition) => presetDefinition.id));
|
|
11287
|
+
function parseVerticalId(value) {
|
|
11288
|
+
return typeof value === "string" && VERTICAL_ID_SET.has(value) ? value : null;
|
|
11289
|
+
}
|
|
11290
|
+
function parseVerticalPresetId(value) {
|
|
11291
|
+
return typeof value === "string" && VERTICAL_PRESET_ID_SET.has(value) ? value : null;
|
|
11292
|
+
}
|
|
11293
|
+
function getVerticalPresetDefinition(presetId) {
|
|
11294
|
+
const definition = VERTICAL_BOOKING_PRESETS.find((presetDefinition) => presetDefinition.id === presetId);
|
|
11295
|
+
if (definition === void 0) throw new Error(`Unhandled vertical preset id: ${presetId}`);
|
|
11296
|
+
return definition;
|
|
11297
|
+
}
|
|
11298
|
+
function createConfiguredSiteVerticalBookingConfig(verticalId, selectedPresetIds) {
|
|
11299
|
+
return {
|
|
11300
|
+
verticalId,
|
|
11301
|
+
selectedPresetIds
|
|
11302
|
+
};
|
|
11303
|
+
}
|
|
11304
|
+
function toNonEmptyVerticalPresetIds(presetIds) {
|
|
11305
|
+
const firstPresetId = presetIds[0];
|
|
11306
|
+
return firstPresetId ? [firstPresetId, ...presetIds.slice(1)] : null;
|
|
11307
|
+
}
|
|
11308
|
+
const DEFAULT_SITE_VERTICAL_BOOKING_CONFIG = {
|
|
11309
|
+
verticalId: null,
|
|
11310
|
+
selectedPresetIds: []
|
|
11311
|
+
};
|
|
11312
|
+
function appendUniqueIssue(issues, issue) {
|
|
11313
|
+
return issues.some((existing) => existing.code === issue.code) ? issues : [...issues, issue];
|
|
11314
|
+
}
|
|
11315
|
+
function collectRawConfigIssues(rawConfig, config) {
|
|
11316
|
+
const rawPresetValue = rawConfig.selectedPresetIds;
|
|
11317
|
+
const rawPresetIds = Array.isArray(rawPresetValue) ? rawPresetValue : [];
|
|
11318
|
+
let issues = [];
|
|
11319
|
+
if (rawConfig.verticalId != null && config.verticalId === null) issues = appendUniqueIssue(issues, {
|
|
11320
|
+
code: "unknown_vertical",
|
|
11321
|
+
rawValue: rawConfig.verticalId
|
|
11322
|
+
});
|
|
11323
|
+
if (config.verticalId === null && config.selectedPresetIds.length > 0) issues = appendUniqueIssue(issues, { code: "missing_vertical" });
|
|
11324
|
+
if (rawPresetValue !== void 0 && !Array.isArray(rawPresetValue) || rawPresetIds.some((presetId) => parseVerticalPresetId(presetId) === null)) issues = appendUniqueIssue(issues, {
|
|
11325
|
+
code: "unknown_preset",
|
|
11326
|
+
rawValue: rawPresetValue
|
|
11327
|
+
});
|
|
11328
|
+
if (rawConfig.verticalId != null && config.selectedPresetIds.length === 0) issues = appendUniqueIssue(issues, { code: "empty_selected_presets" });
|
|
11329
|
+
return issues;
|
|
11330
|
+
}
|
|
11331
|
+
function collectPresetConfigIssues(config) {
|
|
11332
|
+
const seenPresetIds = /* @__PURE__ */ new Set();
|
|
11333
|
+
const seenBehaviours = /* @__PURE__ */ new Set();
|
|
11334
|
+
let issues = [];
|
|
11335
|
+
for (const presetId of config.selectedPresetIds) {
|
|
11336
|
+
const presetDefinition = getVerticalPresetDefinition(presetId);
|
|
11337
|
+
if (seenPresetIds.has(presetId)) issues = appendUniqueIssue(issues, { code: "duplicate_preset_id" });
|
|
11338
|
+
seenPresetIds.add(presetId);
|
|
11339
|
+
if (config.verticalId !== null && presetDefinition.verticalId !== config.verticalId) issues = appendUniqueIssue(issues, { code: "preset_vertical_mismatch" });
|
|
11340
|
+
if (presetDefinition.availability === "future") issues = appendUniqueIssue(issues, { code: "future_preset_selected" });
|
|
11341
|
+
if (seenBehaviours.has(presetDefinition.canonicalBehaviour)) issues = appendUniqueIssue(issues, { code: "duplicate_canonical_behaviour" });
|
|
11342
|
+
seenBehaviours.add(presetDefinition.canonicalBehaviour);
|
|
11343
|
+
}
|
|
11344
|
+
return issues;
|
|
11345
|
+
}
|
|
11346
|
+
function getSiteVerticalConfigIssues(rawConfig, config) {
|
|
11347
|
+
let issues = collectRawConfigIssues(rawConfig, config);
|
|
11348
|
+
for (const issue of collectPresetConfigIssues(config)) issues = appendUniqueIssue(issues, issue);
|
|
11349
|
+
return issues;
|
|
11350
|
+
}
|
|
11351
|
+
function resolveSiteVerticalBookingConfig(rawConfig) {
|
|
11352
|
+
if (rawConfig == null) return {
|
|
11353
|
+
kind: "unconfigured",
|
|
11354
|
+
config: DEFAULT_SITE_VERTICAL_BOOKING_CONFIG
|
|
11355
|
+
};
|
|
11356
|
+
const verticalId = parseVerticalId(rawConfig.verticalId);
|
|
11357
|
+
const selectedPresetIds = (Array.isArray(rawConfig.selectedPresetIds) ? rawConfig.selectedPresetIds : []).map(parseVerticalPresetId).filter((presetId) => Boolean(presetId));
|
|
11358
|
+
const config = {
|
|
11359
|
+
verticalId,
|
|
11360
|
+
selectedPresetIds
|
|
11361
|
+
};
|
|
11362
|
+
if (rawConfig.verticalId == null && selectedPresetIds.length === 0) return {
|
|
11363
|
+
kind: "unconfigured",
|
|
11364
|
+
config: DEFAULT_SITE_VERTICAL_BOOKING_CONFIG
|
|
11365
|
+
};
|
|
11366
|
+
const issues = getSiteVerticalConfigIssues(rawConfig, config);
|
|
11367
|
+
if (issues.length > 0) return {
|
|
11368
|
+
kind: "invalid",
|
|
11369
|
+
config,
|
|
11370
|
+
issues
|
|
11371
|
+
};
|
|
11372
|
+
const nonEmptyPresetIds = toNonEmptyVerticalPresetIds(selectedPresetIds);
|
|
11373
|
+
const configuredConfig = verticalId !== null && nonEmptyPresetIds !== null ? createConfiguredSiteVerticalBookingConfig(verticalId, nonEmptyPresetIds) : null;
|
|
11374
|
+
if (configuredConfig === null) return {
|
|
11375
|
+
kind: "invalid",
|
|
11376
|
+
config,
|
|
11377
|
+
issues: [{ code: "empty_selected_presets" }]
|
|
11378
|
+
};
|
|
11379
|
+
return {
|
|
11380
|
+
kind: "configured",
|
|
11381
|
+
config: configuredConfig,
|
|
11382
|
+
selectedPresets: configuredConfig.selectedPresetIds.map(getVerticalPresetDefinition)
|
|
11383
|
+
};
|
|
11384
|
+
}
|
|
10885
11385
|
z.object({
|
|
10886
11386
|
formulaVersion: z.literal("managed-domain-overage-v1"),
|
|
10887
11387
|
conversionRule: z.literal("usd-to-gbp-1-to-1-v1"),
|
|
@@ -12794,6 +13294,12 @@ const opaqueButtonColourTokenSchema = themeColorTokenSchema.refine((value) => pa
|
|
|
12794
13294
|
if (token === null) throw new Error("Invariant: opaque button token passed its schema");
|
|
12795
13295
|
return token;
|
|
12796
13296
|
});
|
|
13297
|
+
const contextualButtonHoverSchema = z.strictObject({
|
|
13298
|
+
kind: z.literal("shade-shift"),
|
|
13299
|
+
seedToken: opaqueButtonColourTokenSchema,
|
|
13300
|
+
fallbackDirection: z.enum(["lighter", "darker"]),
|
|
13301
|
+
preferredToken: opaqueButtonColourTokenSchema.optional()
|
|
13302
|
+
});
|
|
12797
13303
|
const buttonShadeAmountSchema = z.number().finite().min(0).max(900).multipleOf(100);
|
|
12798
13304
|
const buttonShadowIntensitySchema = z.enum([
|
|
12799
13305
|
"subtle",
|
|
@@ -13133,6 +13639,7 @@ const buttonVariantSchema = z.strictObject({
|
|
|
13133
13639
|
shadow: variantShadowSchema.optional(),
|
|
13134
13640
|
border: buttonBorderSchema.optional(),
|
|
13135
13641
|
hoverBackgroundToken: opaqueButtonColourTokenSchema.optional(),
|
|
13642
|
+
contextualHover: contextualButtonHoverSchema.optional(),
|
|
13136
13643
|
effects: variantEffectsSchema.optional(),
|
|
13137
13644
|
sizes: variantSizeOverridesSchema.optional(),
|
|
13138
13645
|
affordance: buttonVariantAffordanceSchema.optional()
|
|
@@ -13405,6 +13912,139 @@ function validateButtonTextContrast(input) {
|
|
|
13405
13912
|
};
|
|
13406
13913
|
}
|
|
13407
13914
|
//#endregion
|
|
13915
|
+
//#region ../theme-core/src/buttons/contextualHover.ts
|
|
13916
|
+
function resolveContextualHoverPreference(input) {
|
|
13917
|
+
const preferred = input.instruction.preferredToken;
|
|
13918
|
+
if (preferred && isSafeCandidate(preferred, input.palette, input.surface)) return {
|
|
13919
|
+
kind: "resolved",
|
|
13920
|
+
token: preferred,
|
|
13921
|
+
repair: null
|
|
13922
|
+
};
|
|
13923
|
+
const contextual = resolveContextualHover(input);
|
|
13924
|
+
return contextual.kind === "resolved" ? {
|
|
13925
|
+
kind: "resolved",
|
|
13926
|
+
token: contextual.token,
|
|
13927
|
+
repair: preferred ? {
|
|
13928
|
+
kind: "preferred-token-replaced",
|
|
13929
|
+
preferredToken: preferred,
|
|
13930
|
+
contextualToken: contextual.token
|
|
13931
|
+
} : null
|
|
13932
|
+
} : contextual;
|
|
13933
|
+
}
|
|
13934
|
+
/**
|
|
13935
|
+
* Resolves semantic shade movement from real palette steps. The persisted
|
|
13936
|
+
* instruction owns the colour family and deterministic unknown-surface
|
|
13937
|
+
* fallback; a proven surface may select the opposite direction when it gives
|
|
13938
|
+
* the button stronger separation while retaining the shared contrast contract.
|
|
13939
|
+
*/
|
|
13940
|
+
function resolveContextualHover(input) {
|
|
13941
|
+
const candidates = shadeCandidates(input.instruction.seedToken, input.palette);
|
|
13942
|
+
if (candidates.length === 0) return {
|
|
13943
|
+
kind: "unavailable",
|
|
13944
|
+
reason: "no-distinct-shade"
|
|
13945
|
+
};
|
|
13946
|
+
const textSafe = candidates.filter((candidate) => hasSafeTextContrast(candidate.token, input.palette));
|
|
13947
|
+
if (textSafe.length === 0) return {
|
|
13948
|
+
kind: "unavailable",
|
|
13949
|
+
reason: "no-text-safe-candidate"
|
|
13950
|
+
};
|
|
13951
|
+
if (!input.surface) {
|
|
13952
|
+
const selected = textSafe.find((candidate) => candidate.direction === input.instruction.fallbackDirection) ?? textSafe[0];
|
|
13953
|
+
return selected ? {
|
|
13954
|
+
kind: "resolved",
|
|
13955
|
+
token: selected.token,
|
|
13956
|
+
direction: selected.direction,
|
|
13957
|
+
evidence: "fallback-direction"
|
|
13958
|
+
} : {
|
|
13959
|
+
kind: "unavailable",
|
|
13960
|
+
reason: "no-text-safe-candidate"
|
|
13961
|
+
};
|
|
13962
|
+
}
|
|
13963
|
+
const selected = textSafe.map((candidate) => ({
|
|
13964
|
+
...candidate,
|
|
13965
|
+
surfaceContrast: contrastRatio(input.palette[candidate.token] ?? "", input.surface?.backgroundHex ?? "")
|
|
13966
|
+
})).filter((candidate) => candidate.surfaceContrast !== null && candidate.surfaceContrast >= BUTTON_CONTRAST_POLICY.nonTextMinimumRatio).sort((left, right) => {
|
|
13967
|
+
const distanceDifference = left.distance - right.distance;
|
|
13968
|
+
if (distanceDifference !== 0) return distanceDifference;
|
|
13969
|
+
const contrastDifference = (right.surfaceContrast ?? 0) - (left.surfaceContrast ?? 0);
|
|
13970
|
+
if (contrastDifference !== 0) return contrastDifference;
|
|
13971
|
+
if (left.direction === right.direction) return left.token.localeCompare(right.token);
|
|
13972
|
+
return left.direction === input.instruction.fallbackDirection ? -1 : 1;
|
|
13973
|
+
})[0];
|
|
13974
|
+
return selected ? {
|
|
13975
|
+
kind: "resolved",
|
|
13976
|
+
token: selected.token,
|
|
13977
|
+
direction: selected.direction,
|
|
13978
|
+
evidence: "known-surface"
|
|
13979
|
+
} : {
|
|
13980
|
+
kind: "unavailable",
|
|
13981
|
+
reason: "no-surface-safe-candidate"
|
|
13982
|
+
};
|
|
13983
|
+
}
|
|
13984
|
+
function shadeCandidates(seedToken, palette) {
|
|
13985
|
+
const match = String(seedToken).match(/^(.*?)(?:-(\d{2,3}))?$/);
|
|
13986
|
+
const family = match?.[1] ?? String(seedToken);
|
|
13987
|
+
const currentShade = match?.[2] ? Number(match[2]) : 500;
|
|
13988
|
+
const seedHex = palette[seedToken];
|
|
13989
|
+
const shades = Object.keys(palette).flatMap((token) => {
|
|
13990
|
+
const shade = token.match(new RegExp(`^${escapeRegExp(family)}-(\\d{2,3})$`));
|
|
13991
|
+
return shade?.[1] ? [Number(shade[1])] : [];
|
|
13992
|
+
}).filter((shade) => Number.isFinite(shade)).sort((left, right) => left - right);
|
|
13993
|
+
const lower = [...shades].filter((shade) => shade < currentShade).sort((left, right) => right - left);
|
|
13994
|
+
const higher = shades.filter((shade) => shade > currentShade);
|
|
13995
|
+
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);
|
|
13996
|
+
}
|
|
13997
|
+
function candidate(family, shade, currentShade, direction, seedHex, palette) {
|
|
13998
|
+
const token = parseOpaqueButtonColourToken(`${family}-${shade}`);
|
|
13999
|
+
if (token === null) return null;
|
|
14000
|
+
const candidateHex = palette[token];
|
|
14001
|
+
if (!candidateHex || candidateHex === seedHex) return null;
|
|
14002
|
+
return {
|
|
14003
|
+
token,
|
|
14004
|
+
direction,
|
|
14005
|
+
distance: Math.abs(shade - currentShade),
|
|
14006
|
+
surfaceContrast: null
|
|
14007
|
+
};
|
|
14008
|
+
}
|
|
14009
|
+
function hasSafeTextContrast(token, palette) {
|
|
14010
|
+
const background = palette[token];
|
|
14011
|
+
const foreground = palette[onColorTokenName(token)];
|
|
14012
|
+
return typeof background === "string" && typeof foreground === "string" && contrastRatio(background, foreground) >= BUTTON_CONTRAST_POLICY.textMinimumRatio;
|
|
14013
|
+
}
|
|
14014
|
+
function isSafeCandidate(token, palette, surface) {
|
|
14015
|
+
if (!hasSafeTextContrast(token, palette)) return false;
|
|
14016
|
+
return surface ? contrastRatio(palette[token] ?? "", surface.backgroundHex) >= BUTTON_CONTRAST_POLICY.nonTextMinimumRatio : true;
|
|
14017
|
+
}
|
|
14018
|
+
function escapeRegExp(value) {
|
|
14019
|
+
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
14020
|
+
}
|
|
14021
|
+
//#endregion
|
|
14022
|
+
//#region ../theme-core/src/buttons/resolveButtonHoverTreatment.ts
|
|
14023
|
+
function resolveButtonHoverTreatment(input) {
|
|
14024
|
+
if (input.variant.contextualHover) {
|
|
14025
|
+
const contextual = resolveContextualHoverPreference({
|
|
14026
|
+
instruction: input.variant.contextualHover,
|
|
14027
|
+
palette: input.palette,
|
|
14028
|
+
surface: input.surface
|
|
14029
|
+
});
|
|
14030
|
+
if (contextual.kind === "resolved") return {
|
|
14031
|
+
treatment: {
|
|
14032
|
+
type: "solid",
|
|
14033
|
+
colorToken: contextual.token
|
|
14034
|
+
},
|
|
14035
|
+
repair: contextual.repair
|
|
14036
|
+
};
|
|
14037
|
+
}
|
|
14038
|
+
const token = input.variant.hoverBackgroundToken ?? (input.global.hoverColor === "token" ? input.global.hoverColorToken : void 0);
|
|
14039
|
+
return {
|
|
14040
|
+
treatment: token === void 0 ? input.fallback : {
|
|
14041
|
+
type: "solid",
|
|
14042
|
+
colorToken: token
|
|
14043
|
+
},
|
|
14044
|
+
repair: null
|
|
14045
|
+
};
|
|
14046
|
+
}
|
|
14047
|
+
//#endregion
|
|
13408
14048
|
//#region ../theme-core/src/buttons/resolveButtonColourStates.ts
|
|
13409
14049
|
function compileButtonColourStates(input) {
|
|
13410
14050
|
const baseTransition = applyColourEffects({
|
|
@@ -13415,9 +14055,16 @@ function compileButtonColourStates(input) {
|
|
|
13415
14055
|
palette: input.palette
|
|
13416
14056
|
});
|
|
13417
14057
|
if (!baseTransition.ok) return baseTransition;
|
|
14058
|
+
const hover = resolveButtonHoverTreatment({
|
|
14059
|
+
variant: input.variant,
|
|
14060
|
+
global: input.global,
|
|
14061
|
+
fallback: baseTransition.treatment,
|
|
14062
|
+
palette: input.palette,
|
|
14063
|
+
surface: input.surface
|
|
14064
|
+
});
|
|
13418
14065
|
const stateTreatments = {
|
|
13419
14066
|
base: baseTransition.treatment,
|
|
13420
|
-
hover:
|
|
14067
|
+
hover: hover.treatment,
|
|
13421
14068
|
focus: baseTransition.treatment,
|
|
13422
14069
|
active: baseTransition.treatment,
|
|
13423
14070
|
disabled: baseTransition.treatment
|
|
@@ -13456,14 +14103,8 @@ function compileButtonColourStates(input) {
|
|
|
13456
14103
|
ok: true,
|
|
13457
14104
|
states: resolved,
|
|
13458
14105
|
focusIndicator: resolveFocusIndicator(resolved.focus),
|
|
13459
|
-
nonColourEffects
|
|
13460
|
-
|
|
13461
|
-
}
|
|
13462
|
-
function hoverTreatment(variant, global, fallback) {
|
|
13463
|
-
const token = variant.hoverBackgroundToken ?? (global.hoverColor === "token" ? global.hoverColorToken : void 0);
|
|
13464
|
-
return token === void 0 ? fallback : {
|
|
13465
|
-
type: "solid",
|
|
13466
|
-
colorToken: token
|
|
14106
|
+
nonColourEffects,
|
|
14107
|
+
contextualHoverRepair: hover.repair
|
|
13467
14108
|
};
|
|
13468
14109
|
}
|
|
13469
14110
|
function applyColourEffects(input) {
|
|
@@ -14274,13 +14915,24 @@ function resolveContextualButtonRole(input) {
|
|
|
14274
14915
|
};
|
|
14275
14916
|
const rejected = [];
|
|
14276
14917
|
const preferred = compileCandidate(requested, input.buttonSystem, input.palette, input.surface);
|
|
14277
|
-
if (preferred.ok)
|
|
14278
|
-
|
|
14279
|
-
|
|
14280
|
-
|
|
14281
|
-
|
|
14282
|
-
|
|
14283
|
-
|
|
14918
|
+
if (preferred.ok) {
|
|
14919
|
+
if (preferred.contextualHoverRepair) return {
|
|
14920
|
+
kind: "repaired",
|
|
14921
|
+
requestedRole: input.role,
|
|
14922
|
+
candidate: "contextual-hover",
|
|
14923
|
+
states: preferred.states,
|
|
14924
|
+
focusIndicator: preferred.focusIndicator,
|
|
14925
|
+
boundary: boundaryForVariant(requested),
|
|
14926
|
+
rejectedCandidates: []
|
|
14927
|
+
};
|
|
14928
|
+
return {
|
|
14929
|
+
kind: "preferred",
|
|
14930
|
+
requestedRole: input.role,
|
|
14931
|
+
states: preferred.states,
|
|
14932
|
+
focusIndicator: preferred.focusIndicator,
|
|
14933
|
+
boundary: boundaryForVariant(requested)
|
|
14934
|
+
};
|
|
14935
|
+
}
|
|
14284
14936
|
rejected.push({
|
|
14285
14937
|
candidate: "preferred",
|
|
14286
14938
|
error: preferred.error
|
|
@@ -14400,6 +15052,7 @@ function candidateVariant(fallback, requested, system) {
|
|
|
14400
15052
|
},
|
|
14401
15053
|
border: { widthClass: "border" },
|
|
14402
15054
|
hoverBackgroundToken: void 0,
|
|
15055
|
+
contextualHover: void 0,
|
|
14403
15056
|
effects: void 0
|
|
14404
15057
|
},
|
|
14405
15058
|
boundary: {
|
|
@@ -14511,13 +15164,7 @@ function readNonEmptyString(value) {
|
|
|
14511
15164
|
buttonSizeNameSchema.options;
|
|
14512
15165
|
//#endregion
|
|
14513
15166
|
//#region ../theme-core/src/buttons/styles/domain.ts
|
|
14514
|
-
const PUBLIC_BUTTON_ROLES =
|
|
14515
|
-
"primary",
|
|
14516
|
-
"secondary",
|
|
14517
|
-
"outline",
|
|
14518
|
-
"ghost",
|
|
14519
|
-
"accent"
|
|
14520
|
-
];
|
|
15167
|
+
const PUBLIC_BUTTON_ROLES = VARIANT_ROLES;
|
|
14521
15168
|
function defineButtonStyleRecipe(recipe) {
|
|
14522
15169
|
return recipe;
|
|
14523
15170
|
}
|
|
@@ -14613,6 +15260,14 @@ const BUTTON_STYLE_IDS = [
|
|
|
14613
15260
|
"quiet-arrow"
|
|
14614
15261
|
];
|
|
14615
15262
|
const quietArrowParametersSchema = z.object({ secondaryTreatment: z.enum(["outlined", "solid-accent"]) }).strict();
|
|
15263
|
+
const flatInkHoverTreatmentSchema = z.enum([
|
|
15264
|
+
"contextual",
|
|
15265
|
+
"secondary",
|
|
15266
|
+
"accent"
|
|
15267
|
+
]);
|
|
15268
|
+
const flatInkHoverPreferencesShape = Object.fromEntries(VARIANT_ROLES.map((role) => [role, flatInkHoverTreatmentSchema.optional()]));
|
|
15269
|
+
const flatInkHoverPreferencesSchema = z.strictObject(flatInkHoverPreferencesShape);
|
|
15270
|
+
const flatInkParametersSchema = z.strictObject({ hoverPreferences: flatInkHoverPreferencesSchema.optional() });
|
|
14616
15271
|
const emptyParametersSchema$1 = z.object({}).strict();
|
|
14617
15272
|
function selectionBranch(styleId, parameters) {
|
|
14618
15273
|
return z.object({
|
|
@@ -14627,7 +15282,7 @@ const buttonStyleSelectionSchema = z.discriminatedUnion("styleId", [
|
|
|
14627
15282
|
selectionBranch("editorial-link", emptyParametersSchema$1),
|
|
14628
15283
|
selectionBranch("pebble", emptyParametersSchema$1),
|
|
14629
15284
|
selectionBranch("ink-stamp", emptyParametersSchema$1),
|
|
14630
|
-
selectionBranch("flat-ink",
|
|
15285
|
+
selectionBranch("flat-ink", flatInkParametersSchema),
|
|
14631
15286
|
selectionBranch("brushed-wash", emptyParametersSchema$1),
|
|
14632
15287
|
selectionBranch("showtime-pill", emptyParametersSchema$1),
|
|
14633
15288
|
selectionBranch("joy-stamp", emptyParametersSchema$1),
|
|
@@ -14764,6 +15419,189 @@ const quietArrowRecipe = defineButtonStyleRecipe({
|
|
|
14764
15419
|
})
|
|
14765
15420
|
});
|
|
14766
15421
|
//#endregion
|
|
15422
|
+
//#region ../theme-core/src/buttons/styles/recipes/flatInk.ts
|
|
15423
|
+
const contextualRoleConfig = {
|
|
15424
|
+
primary: {
|
|
15425
|
+
contextualSeedToken: unsafeAsOpaqueButtonColourToken("primary"),
|
|
15426
|
+
fallbackDirection: "darker"
|
|
15427
|
+
},
|
|
15428
|
+
secondary: {
|
|
15429
|
+
contextualSeedToken: unsafeAsOpaqueButtonColourToken("surfaceAlt"),
|
|
15430
|
+
fallbackDirection: "darker"
|
|
15431
|
+
},
|
|
15432
|
+
outline: {
|
|
15433
|
+
contextualSeedToken: unsafeAsOpaqueButtonColourToken("surfaceAlt"),
|
|
15434
|
+
fallbackDirection: "darker"
|
|
15435
|
+
},
|
|
15436
|
+
ghost: {
|
|
15437
|
+
contextualSeedToken: unsafeAsOpaqueButtonColourToken("surfaceAlt"),
|
|
15438
|
+
fallbackDirection: "darker"
|
|
15439
|
+
},
|
|
15440
|
+
accent: {
|
|
15441
|
+
contextualSeedToken: unsafeAsOpaqueButtonColourToken("accent"),
|
|
15442
|
+
fallbackDirection: "darker"
|
|
15443
|
+
}
|
|
15444
|
+
};
|
|
15445
|
+
const hoverControl = {
|
|
15446
|
+
kind: "button-hover-by-role",
|
|
15447
|
+
parameter: "hoverPreferences",
|
|
15448
|
+
label: "Button hover",
|
|
15449
|
+
roles: contextualRoleConfig,
|
|
15450
|
+
options: [
|
|
15451
|
+
{
|
|
15452
|
+
value: "contextual",
|
|
15453
|
+
label: "Contextual shade shift"
|
|
15454
|
+
},
|
|
15455
|
+
{
|
|
15456
|
+
value: "secondary",
|
|
15457
|
+
label: "Secondary button colour"
|
|
15458
|
+
},
|
|
15459
|
+
{
|
|
15460
|
+
value: "accent",
|
|
15461
|
+
label: "Accent button colour"
|
|
15462
|
+
}
|
|
15463
|
+
]
|
|
15464
|
+
};
|
|
15465
|
+
const lift = { effectId: "lift" };
|
|
15466
|
+
const flatInkRecipe = defineButtonStyleRecipe({
|
|
15467
|
+
id: "flat-ink",
|
|
15468
|
+
accessibilityLabel: "Flat rounded buttons with arrow affordances",
|
|
15469
|
+
tags: {
|
|
15470
|
+
tone: "classic",
|
|
15471
|
+
energy: "calm",
|
|
15472
|
+
motion: "subtle",
|
|
15473
|
+
era: "editorial"
|
|
15474
|
+
},
|
|
15475
|
+
parameterSchema: flatInkParametersSchema,
|
|
15476
|
+
defaultParameters: {},
|
|
15477
|
+
controls: [hoverControl],
|
|
15478
|
+
defineSystem: (parameters) => ({
|
|
15479
|
+
global: {
|
|
15480
|
+
cornerStyle: "rounded",
|
|
15481
|
+
textTransform: "none",
|
|
15482
|
+
fontWeight: 600,
|
|
15483
|
+
typography: "body",
|
|
15484
|
+
letterSpacing: "tight",
|
|
15485
|
+
paddingPreset: "default",
|
|
15486
|
+
hoverTransform: "lift",
|
|
15487
|
+
hoverColor: "none"
|
|
15488
|
+
},
|
|
15489
|
+
sizes: {
|
|
15490
|
+
sm: {
|
|
15491
|
+
padding: "0.625rem 1.125rem",
|
|
15492
|
+
fontSize: "text-sm"
|
|
15493
|
+
},
|
|
15494
|
+
md: { padding: "0.8125rem 1.375rem" },
|
|
15495
|
+
lg: {
|
|
15496
|
+
padding: "0.9375rem 1.625rem",
|
|
15497
|
+
fontSize: "text-lg"
|
|
15498
|
+
},
|
|
15499
|
+
xl: {
|
|
15500
|
+
padding: "1.0625rem 2rem",
|
|
15501
|
+
fontSize: "text-xl"
|
|
15502
|
+
}
|
|
15503
|
+
},
|
|
15504
|
+
roles: {
|
|
15505
|
+
primary: {
|
|
15506
|
+
kind: "complete",
|
|
15507
|
+
appearance: {
|
|
15508
|
+
background: {
|
|
15509
|
+
type: "solid",
|
|
15510
|
+
colorToken: unsafeAsOpaqueButtonColourToken("primary")
|
|
15511
|
+
},
|
|
15512
|
+
borderRadius: "rounded-lg",
|
|
15513
|
+
affordance: { iconId: "ArrowRight" },
|
|
15514
|
+
...hoverAppearance("primary", parameters, [lift, {
|
|
15515
|
+
effectId: "background-on-hover",
|
|
15516
|
+
options: { colorToken: unsafeAsOpaqueButtonColourToken("secondary") }
|
|
15517
|
+
}])
|
|
15518
|
+
}
|
|
15519
|
+
},
|
|
15520
|
+
secondary: {
|
|
15521
|
+
kind: "complete",
|
|
15522
|
+
appearance: {
|
|
15523
|
+
background: {
|
|
15524
|
+
type: "surface",
|
|
15525
|
+
role: "link"
|
|
15526
|
+
},
|
|
15527
|
+
borderRadius: "rounded-lg",
|
|
15528
|
+
border: { widthClass: "border" },
|
|
15529
|
+
...hoverAppearance("secondary", parameters, [lift, {
|
|
15530
|
+
effectId: "background-on-hover",
|
|
15531
|
+
options: { colorToken: unsafeAsOpaqueButtonColourToken("surfaceAlt") }
|
|
15532
|
+
}])
|
|
15533
|
+
}
|
|
15534
|
+
},
|
|
15535
|
+
outline: {
|
|
15536
|
+
kind: "complete",
|
|
15537
|
+
appearance: {
|
|
15538
|
+
background: {
|
|
15539
|
+
type: "surface",
|
|
15540
|
+
role: "link"
|
|
15541
|
+
},
|
|
15542
|
+
borderRadius: "rounded-lg",
|
|
15543
|
+
border: { widthClass: "border" },
|
|
15544
|
+
...hoverAppearance("outline", parameters, [lift, {
|
|
15545
|
+
effectId: "background-on-hover",
|
|
15546
|
+
options: { colorToken: unsafeAsOpaqueButtonColourToken("surfaceAlt") }
|
|
15547
|
+
}])
|
|
15548
|
+
}
|
|
15549
|
+
},
|
|
15550
|
+
ghost: {
|
|
15551
|
+
kind: "complete",
|
|
15552
|
+
appearance: {
|
|
15553
|
+
background: {
|
|
15554
|
+
type: "surface",
|
|
15555
|
+
role: "link"
|
|
15556
|
+
},
|
|
15557
|
+
borderRadius: "rounded-lg",
|
|
15558
|
+
...hoverAppearance("ghost", parameters, [lift])
|
|
15559
|
+
}
|
|
15560
|
+
},
|
|
15561
|
+
accent: {
|
|
15562
|
+
kind: "complete",
|
|
15563
|
+
appearance: {
|
|
15564
|
+
background: {
|
|
15565
|
+
type: "solid",
|
|
15566
|
+
colorToken: unsafeAsOpaqueButtonColourToken("accent")
|
|
15567
|
+
},
|
|
15568
|
+
borderRadius: "rounded-lg",
|
|
15569
|
+
affordance: { iconId: "ArrowRight" },
|
|
15570
|
+
...hoverAppearance("accent", parameters, [lift])
|
|
15571
|
+
}
|
|
15572
|
+
}
|
|
15573
|
+
}
|
|
15574
|
+
})
|
|
15575
|
+
});
|
|
15576
|
+
function hoverAppearance(role, parameters, recommended) {
|
|
15577
|
+
const preference = parameters.hoverPreferences?.[role];
|
|
15578
|
+
if (preference === void 0) return { effects: { hover: [...recommended] } };
|
|
15579
|
+
if (preference === "contextual") {
|
|
15580
|
+
const config = contextualRoleConfig[role];
|
|
15581
|
+
return {
|
|
15582
|
+
effects: { hover: [lift] },
|
|
15583
|
+
contextualHover: {
|
|
15584
|
+
kind: "shade-shift",
|
|
15585
|
+
seedToken: config.contextualSeedToken,
|
|
15586
|
+
fallbackDirection: config.fallbackDirection
|
|
15587
|
+
}
|
|
15588
|
+
};
|
|
15589
|
+
}
|
|
15590
|
+
const config = contextualRoleConfig[role];
|
|
15591
|
+
return {
|
|
15592
|
+
effects: { hover: [lift] },
|
|
15593
|
+
contextualHover: {
|
|
15594
|
+
kind: "shade-shift",
|
|
15595
|
+
seedToken: config.contextualSeedToken,
|
|
15596
|
+
fallbackDirection: config.fallbackDirection,
|
|
15597
|
+
preferredToken: unsafeAsOpaqueButtonColourToken(paletteRole(preference))
|
|
15598
|
+
}
|
|
15599
|
+
};
|
|
15600
|
+
}
|
|
15601
|
+
function paletteRole(preference) {
|
|
15602
|
+
return preference;
|
|
15603
|
+
}
|
|
15604
|
+
//#endregion
|
|
14767
15605
|
//#region ../theme-core/src/buttons/styles/recipes/defineStaticButtonStyleRecipe.ts
|
|
14768
15606
|
const emptyParametersSchema = z.object({}).strict();
|
|
14769
15607
|
function defineStaticButtonStyleRecipe(input) {
|
|
@@ -15610,113 +16448,6 @@ const inkStampRecipe = defineStaticButtonStyleRecipe({
|
|
|
15610
16448
|
}
|
|
15611
16449
|
}
|
|
15612
16450
|
});
|
|
15613
|
-
const flatInkRecipe = defineStaticButtonStyleRecipe({
|
|
15614
|
-
id: "flat-ink",
|
|
15615
|
-
accessibilityLabel: "Flat rounded buttons with arrow affordances",
|
|
15616
|
-
tags: {
|
|
15617
|
-
tone: "classic",
|
|
15618
|
-
energy: "calm",
|
|
15619
|
-
motion: "subtle",
|
|
15620
|
-
era: "editorial"
|
|
15621
|
-
},
|
|
15622
|
-
system: {
|
|
15623
|
-
global: {
|
|
15624
|
-
cornerStyle: "rounded",
|
|
15625
|
-
textTransform: "none",
|
|
15626
|
-
fontWeight: 600,
|
|
15627
|
-
typography: "body",
|
|
15628
|
-
letterSpacing: "tight",
|
|
15629
|
-
paddingPreset: "default",
|
|
15630
|
-
hoverTransform: "lift",
|
|
15631
|
-
hoverColor: "none"
|
|
15632
|
-
},
|
|
15633
|
-
sizes: {
|
|
15634
|
-
sm: {
|
|
15635
|
-
padding: "0.625rem 1.125rem",
|
|
15636
|
-
fontSize: "text-sm"
|
|
15637
|
-
},
|
|
15638
|
-
md: { padding: "0.8125rem 1.375rem" },
|
|
15639
|
-
lg: {
|
|
15640
|
-
padding: "0.9375rem 1.625rem",
|
|
15641
|
-
fontSize: "text-lg"
|
|
15642
|
-
},
|
|
15643
|
-
xl: {
|
|
15644
|
-
padding: "1.0625rem 2rem",
|
|
15645
|
-
fontSize: "text-xl"
|
|
15646
|
-
}
|
|
15647
|
-
},
|
|
15648
|
-
roles: {
|
|
15649
|
-
primary: {
|
|
15650
|
-
kind: "complete",
|
|
15651
|
-
appearance: {
|
|
15652
|
-
background: {
|
|
15653
|
-
type: "solid",
|
|
15654
|
-
colorToken: "primary"
|
|
15655
|
-
},
|
|
15656
|
-
borderRadius: "rounded-lg",
|
|
15657
|
-
affordance: { iconId: "ArrowRight" },
|
|
15658
|
-
effects: { hover: [{ effectId: "lift" }, {
|
|
15659
|
-
effectId: "background-on-hover",
|
|
15660
|
-
options: { colorToken: unsafeAsOpaqueButtonColourToken("secondary") }
|
|
15661
|
-
}] }
|
|
15662
|
-
}
|
|
15663
|
-
},
|
|
15664
|
-
secondary: {
|
|
15665
|
-
kind: "complete",
|
|
15666
|
-
appearance: {
|
|
15667
|
-
background: {
|
|
15668
|
-
type: "surface",
|
|
15669
|
-
role: "link"
|
|
15670
|
-
},
|
|
15671
|
-
borderRadius: "rounded-lg",
|
|
15672
|
-
border: { widthClass: "border" },
|
|
15673
|
-
effects: { hover: [{ effectId: "lift" }, {
|
|
15674
|
-
effectId: "background-on-hover",
|
|
15675
|
-
options: { colorToken: unsafeAsOpaqueButtonColourToken("surfaceAlt") }
|
|
15676
|
-
}] }
|
|
15677
|
-
}
|
|
15678
|
-
},
|
|
15679
|
-
outline: {
|
|
15680
|
-
kind: "complete",
|
|
15681
|
-
appearance: {
|
|
15682
|
-
background: {
|
|
15683
|
-
type: "surface",
|
|
15684
|
-
role: "link"
|
|
15685
|
-
},
|
|
15686
|
-
borderRadius: "rounded-lg",
|
|
15687
|
-
border: { widthClass: "border" },
|
|
15688
|
-
effects: { hover: [{ effectId: "lift" }, {
|
|
15689
|
-
effectId: "background-on-hover",
|
|
15690
|
-
options: { colorToken: unsafeAsOpaqueButtonColourToken("surfaceAlt") }
|
|
15691
|
-
}] }
|
|
15692
|
-
}
|
|
15693
|
-
},
|
|
15694
|
-
ghost: {
|
|
15695
|
-
kind: "complete",
|
|
15696
|
-
appearance: {
|
|
15697
|
-
background: {
|
|
15698
|
-
type: "surface",
|
|
15699
|
-
role: "link"
|
|
15700
|
-
},
|
|
15701
|
-
borderRadius: "rounded-lg",
|
|
15702
|
-
effects: { hover: [{ effectId: "lift" }] }
|
|
15703
|
-
}
|
|
15704
|
-
},
|
|
15705
|
-
accent: {
|
|
15706
|
-
kind: "complete",
|
|
15707
|
-
appearance: {
|
|
15708
|
-
background: {
|
|
15709
|
-
type: "solid",
|
|
15710
|
-
colorToken: "accent"
|
|
15711
|
-
},
|
|
15712
|
-
borderRadius: "rounded-lg",
|
|
15713
|
-
affordance: { iconId: "ArrowRight" },
|
|
15714
|
-
effects: { hover: [{ effectId: "lift" }] }
|
|
15715
|
-
}
|
|
15716
|
-
}
|
|
15717
|
-
}
|
|
15718
|
-
}
|
|
15719
|
-
});
|
|
15720
16451
|
const showtimePillRecipe = defineStaticButtonStyleRecipe({
|
|
15721
16452
|
id: "showtime-pill",
|
|
15722
16453
|
accessibilityLabel: "Bold uppercase pill buttons with playful movement",
|
|
@@ -16138,8 +16869,8 @@ const openCardRoleValue = "open";
|
|
|
16138
16869
|
*/
|
|
16139
16870
|
const surfaceCardRoleValues = [...cardVariantRoleValues, openCardRoleValue];
|
|
16140
16871
|
/**
|
|
16141
|
-
* The closed
|
|
16142
|
-
*
|
|
16872
|
+
* The closed role vocabulary Looks and blocks use for surfaced and boxless
|
|
16873
|
+
* card choices.
|
|
16143
16874
|
*
|
|
16144
16875
|
* - `none` — no site-style card surface; the block's own composition and
|
|
16145
16876
|
* the author's own card fields govern the item. This is *not*
|
|
@@ -16151,11 +16882,6 @@ const surfaceCardRoleValues = [...cardVariantRoleValues, openCardRoleValue];
|
|
|
16151
16882
|
* - `alternative` — the statement card carrying the site's personality
|
|
16152
16883
|
*/
|
|
16153
16884
|
const cardRoleValues = [...surfaceCardRoleValues, boxlessCardVariantValue];
|
|
16154
|
-
const legacyCardVariantRoleAliases = {
|
|
16155
|
-
variant1: "alternative",
|
|
16156
|
-
variant2: "alternative",
|
|
16157
|
-
statement: "alternative"
|
|
16158
|
-
};
|
|
16159
16885
|
const cardSpacingSchema = z.enum([
|
|
16160
16886
|
"none",
|
|
16161
16887
|
"compact",
|
|
@@ -16185,33 +16911,21 @@ const gradientDirectionSchema = z.enum([
|
|
|
16185
16911
|
"to-br",
|
|
16186
16912
|
"to-bl"
|
|
16187
16913
|
]);
|
|
16188
|
-
|
|
16914
|
+
z.enum(cardVariantRoleValues);
|
|
16189
16915
|
const surfaceCardRoleSchema = z.enum(surfaceCardRoleValues);
|
|
16190
16916
|
const cardRoleSchema = z.enum(cardRoleValues);
|
|
16191
|
-
/**
|
|
16192
|
-
* Historical name for the role vocabulary as it reaches box styles. Widened to
|
|
16193
|
-
* the full `CardRole` set — old values keep parsing, `open` now parses too.
|
|
16194
|
-
*/
|
|
16195
|
-
const boxStylesCardVariantSchema = cardRoleSchema;
|
|
16196
16917
|
function isCardVariantRole(value) {
|
|
16197
16918
|
return typeof value === "string" && cardVariantRoleValues.includes(value);
|
|
16198
16919
|
}
|
|
16199
16920
|
function normalizeCardVariantRole(value) {
|
|
16200
|
-
|
|
16201
|
-
if (typeof value !== "string") return null;
|
|
16202
|
-
return legacyCardVariantRoleAliases[value] ?? null;
|
|
16921
|
+
return isCardVariantRole(value) ? value : null;
|
|
16203
16922
|
}
|
|
16204
|
-
/**
|
|
16205
|
-
* The one untrusted-input boundary for the role vocabulary. Legacy alias values
|
|
16206
|
-
* (`variant1`, `variant2`, `statement`) normalize here and nowhere else.
|
|
16207
|
-
*/
|
|
16923
|
+
/** The one untrusted-input boundary for the closed role vocabulary. */
|
|
16208
16924
|
function normalizeCardRole(value) {
|
|
16209
16925
|
if (value === "none") return boxlessCardVariantValue;
|
|
16210
16926
|
if (value === "open") return openCardRoleValue;
|
|
16211
16927
|
return normalizeCardVariantRole(value);
|
|
16212
16928
|
}
|
|
16213
|
-
/** Historical name for {@link normalizeCardRole}. */
|
|
16214
|
-
const normalizeBoxStylesCardVariant = normalizeCardRole;
|
|
16215
16929
|
const PRIORITY_ROLE_INFERENCE = {
|
|
16216
16930
|
1: "default",
|
|
16217
16931
|
2: "alternative"
|
|
@@ -17156,6 +17870,21 @@ const eventListTreatmentValues = [
|
|
|
17156
17870
|
"editorial-register",
|
|
17157
17871
|
"dense-index"
|
|
17158
17872
|
];
|
|
17873
|
+
const testimonialsCompositionTreatmentValues = [
|
|
17874
|
+
"open-editorial",
|
|
17875
|
+
"evergreen-lead",
|
|
17876
|
+
"room-and-response",
|
|
17877
|
+
"open-floor"
|
|
17878
|
+
];
|
|
17879
|
+
/**
|
|
17880
|
+
* How an offerings preview arranges its groups. Structure only — the group
|
|
17881
|
+
* card surface is the Look's `cardRole` and the site style's card system.
|
|
17882
|
+
*/
|
|
17883
|
+
const offeringsPreviewCompositionTreatmentValues = [
|
|
17884
|
+
"paired-feature-cards",
|
|
17885
|
+
"open-editorial-columns",
|
|
17886
|
+
"joined-programme-panel"
|
|
17887
|
+
];
|
|
17159
17888
|
const eyebrowTreatmentValues = [
|
|
17160
17889
|
"plain",
|
|
17161
17890
|
"accent",
|
|
@@ -17689,8 +18418,7 @@ const cardStylesOverrideSchema = z.object({
|
|
|
17689
18418
|
spacing: semanticSpacingSchema.nullable().optional(),
|
|
17690
18419
|
raised: z.boolean().nullable().optional(),
|
|
17691
18420
|
rounded: boxRoundedSchema.nullable().optional(),
|
|
17692
|
-
role: cardRoleSchema.nullable().optional()
|
|
17693
|
-
cardVariant: boxStylesCardVariantSchema.nullable().optional()
|
|
18421
|
+
role: cardRoleSchema.nullable().optional()
|
|
17694
18422
|
});
|
|
17695
18423
|
const blockStyleOverridesSchema = z.object({
|
|
17696
18424
|
sectionStyles: sectionStylesOverrideSchema.nullable().optional(),
|
|
@@ -18579,7 +19307,12 @@ defineBlockAppearancePreset({
|
|
|
18579
19307
|
constraints: { layoutVariantKeys: ["cards"] },
|
|
18580
19308
|
design: {
|
|
18581
19309
|
sectionSurface: "base",
|
|
18582
|
-
contentFrame: plainFrame
|
|
19310
|
+
contentFrame: plainFrame,
|
|
19311
|
+
cardRole: "alternative",
|
|
19312
|
+
composition: {
|
|
19313
|
+
kind: "offerings-preview",
|
|
19314
|
+
treatment: "paired-feature-cards"
|
|
19315
|
+
}
|
|
18583
19316
|
}
|
|
18584
19317
|
}), defineBlockAppearancePreset({
|
|
18585
19318
|
id: "offerings-preview-open-editorial-columns",
|
|
@@ -18589,7 +19322,12 @@ defineBlockAppearancePreset({
|
|
|
18589
19322
|
constraints: { layoutVariantKeys: ["cards"] },
|
|
18590
19323
|
design: {
|
|
18591
19324
|
sectionSurface: "base",
|
|
18592
|
-
contentFrame: plainFrame
|
|
19325
|
+
contentFrame: plainFrame,
|
|
19326
|
+
cardRole: "open",
|
|
19327
|
+
composition: {
|
|
19328
|
+
kind: "offerings-preview",
|
|
19329
|
+
treatment: "open-editorial-columns"
|
|
19330
|
+
}
|
|
18593
19331
|
}
|
|
18594
19332
|
}), defineBlockAppearancePreset({
|
|
18595
19333
|
id: "offerings-preview-joined-programme-panel",
|
|
@@ -18599,7 +19337,12 @@ defineBlockAppearancePreset({
|
|
|
18599
19337
|
constraints: { layoutVariantKeys: ["cards"] },
|
|
18600
19338
|
design: {
|
|
18601
19339
|
sectionSurface: "base",
|
|
18602
|
-
contentFrame: plainFrame
|
|
19340
|
+
contentFrame: plainFrame,
|
|
19341
|
+
cardRole: "default",
|
|
19342
|
+
composition: {
|
|
19343
|
+
kind: "offerings-preview",
|
|
19344
|
+
treatment: "joined-programme-panel"
|
|
19345
|
+
}
|
|
18603
19346
|
}
|
|
18604
19347
|
}), defineBlockAppearancePreset({
|
|
18605
19348
|
id: "feature-cards-raised-rule",
|
|
@@ -18841,7 +19584,11 @@ defineBlockAppearancePreset({
|
|
|
18841
19584
|
constraints: { layoutVariantKeys: ["featured-editorial"] },
|
|
18842
19585
|
design: {
|
|
18843
19586
|
sectionSurface: "base",
|
|
18844
|
-
contentFrame: plainFrame
|
|
19587
|
+
contentFrame: plainFrame,
|
|
19588
|
+
composition: {
|
|
19589
|
+
kind: "testimonials",
|
|
19590
|
+
treatment: "evergreen-lead"
|
|
19591
|
+
}
|
|
18845
19592
|
}
|
|
18846
19593
|
}), defineBlockAppearancePreset({
|
|
18847
19594
|
id: "testimonials-room-and-response",
|
|
@@ -18851,7 +19598,11 @@ defineBlockAppearancePreset({
|
|
|
18851
19598
|
constraints: { layoutVariantKeys: ["featured-editorial"] },
|
|
18852
19599
|
design: {
|
|
18853
19600
|
sectionSurface: "base",
|
|
18854
|
-
contentFrame: plainFrame
|
|
19601
|
+
contentFrame: plainFrame,
|
|
19602
|
+
composition: {
|
|
19603
|
+
kind: "testimonials",
|
|
19604
|
+
treatment: "room-and-response"
|
|
19605
|
+
}
|
|
18855
19606
|
}
|
|
18856
19607
|
}), defineBlockAppearancePreset({
|
|
18857
19608
|
id: "testimonials-open-floor",
|
|
@@ -18861,7 +19612,11 @@ defineBlockAppearancePreset({
|
|
|
18861
19612
|
constraints: { layoutVariantKeys: ["featured-editorial"] },
|
|
18862
19613
|
design: {
|
|
18863
19614
|
sectionSurface: "base",
|
|
18864
|
-
contentFrame: plainFrame
|
|
19615
|
+
contentFrame: plainFrame,
|
|
19616
|
+
composition: {
|
|
19617
|
+
kind: "testimonials",
|
|
19618
|
+
treatment: "open-floor"
|
|
19619
|
+
}
|
|
18865
19620
|
}
|
|
18866
19621
|
}), defineBlockAppearancePreset({
|
|
18867
19622
|
id: "faq-base-accordion",
|
|
@@ -21888,7 +22643,8 @@ const curatedSiteStyles = [
|
|
|
21888
22643
|
buttonStyleChoices: [
|
|
21889
22644
|
buttonChoice("soft-pill"),
|
|
21890
22645
|
buttonChoice("pebble"),
|
|
21891
|
-
buttonChoice("confident-chip")
|
|
22646
|
+
buttonChoice("confident-chip"),
|
|
22647
|
+
buttonChoice("flat-ink")
|
|
21892
22648
|
],
|
|
21893
22649
|
paletteRecommendations: [
|
|
21894
22650
|
paletteRecommendation("soft-natural-sage"),
|
|
@@ -24733,8 +25489,41 @@ function containerStylesField(options = {}) {
|
|
|
24733
25489
|
return createBoxStylesFieldWithDepth("container", options);
|
|
24734
25490
|
}
|
|
24735
25491
|
function cardStylesField(options = {}) {
|
|
25492
|
+
if (options.controls === "role-only") return createRoleOnlyCardStylesField(options);
|
|
24736
25493
|
return createBoxStylesFieldWithDepth("card", options);
|
|
24737
25494
|
}
|
|
25495
|
+
function createRoleOnlyCardStylesField(options) {
|
|
25496
|
+
const { id = "_cardStyles", label = "Card styles", renderInHeader, intent } = options;
|
|
25497
|
+
return {
|
|
25498
|
+
id,
|
|
25499
|
+
type: "modal",
|
|
25500
|
+
label,
|
|
25501
|
+
required: false,
|
|
25502
|
+
schema: { fields: [{
|
|
25503
|
+
id: "role",
|
|
25504
|
+
type: "select",
|
|
25505
|
+
label: "Card style",
|
|
25506
|
+
description: "Choose a semantic card style from the active site style.",
|
|
25507
|
+
required: false,
|
|
25508
|
+
multiple: false,
|
|
25509
|
+
defaultValue: "default",
|
|
25510
|
+
options: cardVariantRoleValues.map((value) => ({
|
|
25511
|
+
value,
|
|
25512
|
+
label: value === "default" ? "Default" : "Alternative"
|
|
25513
|
+
}))
|
|
25514
|
+
}] },
|
|
25515
|
+
ui: {
|
|
25516
|
+
...typeof renderInHeader === "boolean" ? { renderInHeader } : {},
|
|
25517
|
+
...intent ? { intent } : {},
|
|
25518
|
+
modalConfig: {
|
|
25519
|
+
buttonLabel: label,
|
|
25520
|
+
description: "Choose the site-style card role.",
|
|
25521
|
+
buttonVariant: "outline",
|
|
25522
|
+
showCustomizedIndicator: true
|
|
25523
|
+
}
|
|
25524
|
+
}
|
|
25525
|
+
};
|
|
25526
|
+
}
|
|
24738
25527
|
//#endregion
|
|
24739
25528
|
//#region ../blocks/src/system/fields/imageShape.ts
|
|
24740
25529
|
const standardImageShapeOptions = [
|
|
@@ -25930,21 +26719,29 @@ function cardRoleClass(role) {
|
|
|
25930
26719
|
return `card-role-${role}`;
|
|
25931
26720
|
}
|
|
25932
26721
|
/**
|
|
26722
|
+
* The role class for a card slot the *block* owns structurally, where a Look
|
|
26723
|
+
* may still name the surface.
|
|
26724
|
+
*
|
|
26725
|
+
* Some layouts have more than one card slot and decide themselves which one is
|
|
26726
|
+
* the statement — the featured-editorial testimonials field is a lead voice
|
|
26727
|
+
* beside its supporting voices, and that is structure, not composition. Those
|
|
26728
|
+
* slots still have to honour a Look that picks a surface, or a role-picking
|
|
26729
|
+
* Look would silently no-op under the layout. So the slot carries a default
|
|
26730
|
+
* role and the Look's compiled role wins over it when there is one.
|
|
26731
|
+
*
|
|
26732
|
+
* An explicit `none` is honoured as boxlessness and emits no class, matching
|
|
26733
|
+
* how the composite emitter reads it.
|
|
26734
|
+
*/
|
|
26735
|
+
/**
|
|
25933
26736
|
* The role a card renders with, and the one place a set of card styles becomes
|
|
25934
26737
|
* a role.
|
|
25935
26738
|
*
|
|
25936
|
-
* Precedence: a per-item override, then the `role` a Look
|
|
25937
|
-
* block's card styles
|
|
25938
|
-
*
|
|
25939
|
-
* vocabulary — an explicit `role` wins when a record carries both.
|
|
25940
|
-
*
|
|
25941
|
-
* Compiled and freshly authored card styles carry only `role`. `cardVariant`
|
|
25942
|
-
* survives on content persisted before the role contract, and normalizes here
|
|
25943
|
-
* rather than in `cardStylesOverrideSchema` because that content reaches the
|
|
25944
|
-
* renderer as a raw record without ever passing through the schema.
|
|
26739
|
+
* Precedence: a per-item override, then the `role` a Look or semantic field
|
|
26740
|
+
* compiled onto the block's card styles. Persisted inputs are normalized at
|
|
26741
|
+
* this boundary because raw block records do not pass through the theme schema.
|
|
25945
26742
|
*/
|
|
25946
26743
|
function resolveCardRoleForBoxStyles(input, override) {
|
|
25947
|
-
return override ?? normalizeCardRole(input.role)
|
|
26744
|
+
return override ?? normalizeCardRole(input.role);
|
|
25948
26745
|
}
|
|
25949
26746
|
/**
|
|
25950
26747
|
* Parse a block's own per-item surface vocabulary into a card role. The alias
|
|
@@ -25961,8 +26758,8 @@ function resolveItemCardRole(value, aliases) {
|
|
|
25961
26758
|
* The card surface for a set of box styles: one role, one class vocabulary, so
|
|
25962
26759
|
* a site-style swap re-skins the card whichever field named it.
|
|
25963
26760
|
*/
|
|
25964
|
-
function cardSurface(input, override) {
|
|
25965
|
-
const role = resolveCardRoleForBoxStyles(input, override);
|
|
26761
|
+
function cardSurface(input, override, fallback) {
|
|
26762
|
+
const role = resolveCardRoleForBoxStyles(input, override) ?? fallback ?? null;
|
|
25966
26763
|
if (!role) return {
|
|
25967
26764
|
role: null,
|
|
25968
26765
|
classes: []
|
|
@@ -26059,10 +26856,9 @@ function raisedClassFor(options) {
|
|
|
26059
26856
|
* of keeping a copy that drifts.
|
|
26060
26857
|
*/
|
|
26061
26858
|
function boxStyleClassNames(value, options) {
|
|
26062
|
-
|
|
26063
|
-
const input = value;
|
|
26859
|
+
const input = value && typeof value === "object" ? value : {};
|
|
26064
26860
|
const borderOverride = borderOverrideClass(input);
|
|
26065
|
-
const surface = cardSurface(input, options.cardRoleOverride);
|
|
26861
|
+
const surface = cardSurface(input, options.cardRoleOverride, options.cardRoleFallback);
|
|
26066
26862
|
const cardOwnsBorder = surface.role !== null && surface.role !== "none";
|
|
26067
26863
|
return [
|
|
26068
26864
|
borderOverride || cardOwnsBorder ? withoutBorderClasses(options.baseClass ?? "") : options.baseClass ?? "",
|
|
@@ -26210,29 +27006,41 @@ const cardRoleClassTransform = {
|
|
|
26210
27006
|
return baseClass ? `${baseClass.trim()} ${hook}` : hook;
|
|
26211
27007
|
}
|
|
26212
27008
|
};
|
|
26213
|
-
|
|
26214
|
-
|
|
27009
|
+
/**
|
|
27010
|
+
* The role class for a layout's own card slot, bound from the block's compiled
|
|
27011
|
+
* card styles so a Look that picks a surface still reaches a slot the layout
|
|
27012
|
+
* assigned a default role to.
|
|
27013
|
+
*/
|
|
27014
|
+
const cardSlotRoleTransform = {
|
|
27015
|
+
id: "boxStyles.cardSlotRole",
|
|
26215
27016
|
kind: "string",
|
|
26216
|
-
summary: "
|
|
26217
|
-
run: (value, options) => {
|
|
26218
|
-
|
|
26219
|
-
|
|
26220
|
-
|
|
26221
|
-
|
|
26222
|
-
return baseClass ? `${baseClass} ${roleClass}` : roleClass;
|
|
26223
|
-
}
|
|
27017
|
+
summary: "Resolve a layout card slot's role class, defaulting to the slot's own role",
|
|
27018
|
+
run: (value, options) => boxStyleClassNames(value, {
|
|
27019
|
+
baseClass: options?.baseClass,
|
|
27020
|
+
cardRoleFallback: options.slotDefault,
|
|
27021
|
+
includeSpacing: false
|
|
27022
|
+
})
|
|
26224
27023
|
};
|
|
27024
|
+
function resolveBorderColorState(value, options, viewModel) {
|
|
27025
|
+
const input = asPartialObject(options?.stylesPath ? readPath(viewModel, options.stylesPath) : value);
|
|
27026
|
+
if (!input) return null;
|
|
27027
|
+
return {
|
|
27028
|
+
input,
|
|
27029
|
+
role: resolveCardRoleForBoxStyles(input, options?.stylesPath ? resolveItemCardRole(value, options.itemRoleAliases) : void 0)
|
|
27030
|
+
};
|
|
27031
|
+
}
|
|
26225
27032
|
const boxStylesBorderColorTransform = {
|
|
26226
27033
|
id: "boxStyles.borderColor",
|
|
26227
27034
|
kind: "string",
|
|
26228
27035
|
summary: "Resolve border color from box styles border.colorToken",
|
|
26229
|
-
run: (value, options,
|
|
27036
|
+
run: (value, options, context) => {
|
|
26230
27037
|
const fallbackToken = options?.fallbackToken ?? "border";
|
|
26231
27038
|
const returnEmptyForDefault = options?.returnEmptyForDefault ?? false;
|
|
26232
27039
|
let explicitToken = null;
|
|
26233
|
-
const
|
|
26234
|
-
if (
|
|
26235
|
-
|
|
27040
|
+
const state = resolveBorderColorState(value, options, context.viewModel);
|
|
27041
|
+
if (state) {
|
|
27042
|
+
if (state.role && state.role !== "none") return "";
|
|
27043
|
+
const border = normalizeBoxStylesBorder(state.input.border);
|
|
26236
27044
|
if (border && border.enabled === true && border.colorToken) explicitToken = border.colorToken;
|
|
26237
27045
|
}
|
|
26238
27046
|
if (explicitToken) {
|
|
@@ -26452,7 +27260,7 @@ const boxStylesTransforms = [
|
|
|
26452
27260
|
roundedTransform,
|
|
26453
27261
|
boxStylesCompositeTransform,
|
|
26454
27262
|
cardRoleClassTransform,
|
|
26455
|
-
|
|
27263
|
+
cardSlotRoleTransform,
|
|
26456
27264
|
boxStylesBorderColorTransform,
|
|
26457
27265
|
sectionClassNameTransform,
|
|
26458
27266
|
containerStylesResolveClassName,
|
|
@@ -26559,10 +27367,16 @@ function styledCard(children, opts, ...mods) {
|
|
|
26559
27367
|
const style = {
|
|
26560
27368
|
...opts.style ?? {},
|
|
26561
27369
|
borderColor: { $bind: {
|
|
26562
|
-
from: opts.stylesFrom,
|
|
27370
|
+
from: opts.itemRole?.from ?? opts.stylesFrom,
|
|
26563
27371
|
transforms: [{
|
|
26564
27372
|
id: "boxStyles.borderColor",
|
|
26565
|
-
options: {
|
|
27373
|
+
options: {
|
|
27374
|
+
returnEmptyForDefault: true,
|
|
27375
|
+
...opts.itemRole ? {
|
|
27376
|
+
stylesPath: opts.stylesFrom,
|
|
27377
|
+
...opts.itemRole.aliases ? { itemRoleAliases: opts.itemRole.aliases } : {}
|
|
27378
|
+
} : {}
|
|
27379
|
+
}
|
|
26566
27380
|
}]
|
|
26567
27381
|
} }
|
|
26568
27382
|
};
|
|
@@ -27687,18 +28501,73 @@ function buildGridCardsLayout(className) {
|
|
|
27687
28501
|
return el("div", { className }, buildResponsiveGridCards());
|
|
27688
28502
|
}
|
|
27689
28503
|
/**
|
|
28504
|
+
* The card slots the featured-editorial layout has, and the role each one
|
|
28505
|
+
* defaults to.
|
|
28506
|
+
*
|
|
28507
|
+
* Which slot is the statement is *structure*, so the layout decides it: this
|
|
28508
|
+
* variant exists to put one lead voice beside its supporting voices. But a Look
|
|
28509
|
+
* that picks a surface has to keep meaning something here, so the lead slot's
|
|
28510
|
+
* role is a default the Look's compiled `cardRole` wins over — see
|
|
28511
|
+
* `cardSlotRoleClass`. Supporting voices stay the quiet everyday card.
|
|
28512
|
+
*/
|
|
28513
|
+
const FEATURED_EDITORIAL_SLOTS = {
|
|
28514
|
+
lead: {
|
|
28515
|
+
/** Composition CSS addresses the lead card's geometry through this. */
|
|
28516
|
+
variantClass: "rb-testimonials-fe-card--feature",
|
|
28517
|
+
slotDefault: "alternative",
|
|
28518
|
+
followsLook: true
|
|
28519
|
+
},
|
|
28520
|
+
support: {
|
|
28521
|
+
variantClass: null,
|
|
28522
|
+
slotDefault: "default",
|
|
28523
|
+
followsLook: false
|
|
28524
|
+
}
|
|
28525
|
+
};
|
|
28526
|
+
/** Where the testimonials block's compiled card styles live. */
|
|
28527
|
+
const TESTIMONIALS_CARD_STYLES_PATH = "content._cardStyles";
|
|
28528
|
+
/**
|
|
28529
|
+
* The class list for one featured-editorial card slot.
|
|
28530
|
+
*
|
|
28531
|
+
* A slot that follows the Look has to resolve at render time, so it binds
|
|
28532
|
+
* through the shared card-class emitter rather than naming a role class here;
|
|
28533
|
+
* a slot that does not is a plain string built by the same composite emitter.
|
|
28534
|
+
*/
|
|
28535
|
+
function featuredEditorialCardClassName(slot) {
|
|
28536
|
+
const { variantClass, slotDefault, followsLook } = FEATURED_EDITORIAL_SLOTS[slot];
|
|
28537
|
+
const baseClass = ["rb-testimonials-fe-card", variantClass].filter(Boolean).join(" ");
|
|
28538
|
+
if (!followsLook) return boxStyleClassNames({}, {
|
|
28539
|
+
baseClass,
|
|
28540
|
+
cardRoleFallback: slotDefault,
|
|
28541
|
+
includeSpacing: false
|
|
28542
|
+
});
|
|
28543
|
+
return { $bind: {
|
|
28544
|
+
from: TESTIMONIALS_CARD_STYLES_PATH,
|
|
28545
|
+
transforms: [{
|
|
28546
|
+
id: "boxStyles.cardSlotRole",
|
|
28547
|
+
options: {
|
|
28548
|
+
baseClass,
|
|
28549
|
+
slotDefault
|
|
28550
|
+
}
|
|
28551
|
+
}],
|
|
28552
|
+
fallback: boxStyleClassNames({}, {
|
|
28553
|
+
baseClass,
|
|
28554
|
+
cardRoleFallback: slotDefault,
|
|
28555
|
+
includeSpacing: false
|
|
28556
|
+
})
|
|
28557
|
+
} };
|
|
28558
|
+
}
|
|
28559
|
+
/**
|
|
27690
28560
|
* Build a single "featured editorial" testimonial card.
|
|
27691
28561
|
*
|
|
27692
|
-
* This card type deliberately renders NO avatar/headshot:
|
|
27693
|
-
*
|
|
27694
|
-
*
|
|
27695
|
-
*
|
|
27696
|
-
* - `rb-testimonials-fe-card--plain` → white surface card
|
|
28562
|
+
* This card type deliberately renders NO avatar/headshot: a quote mark, the
|
|
28563
|
+
* quote body, then the author name and a context line. The card surface comes
|
|
28564
|
+
* from the slot's card role — the site style owns the fill, border, corners and
|
|
28565
|
+
* padding.
|
|
27697
28566
|
*
|
|
27698
28567
|
* Extra modifiers (`repeat`, `when`) are forwarded to the card node so the
|
|
27699
28568
|
* caller can drive first-vs-rest branching.
|
|
27700
28569
|
*/
|
|
27701
|
-
function buildFeaturedEditorialCard(
|
|
28570
|
+
function buildFeaturedEditorialCard(slot, ...mods) {
|
|
27702
28571
|
const quoteMark = text({
|
|
27703
28572
|
as: "span",
|
|
27704
28573
|
className: "rb-testimonials-fe-qmark",
|
|
@@ -27712,11 +28581,11 @@ function buildFeaturedEditorialCard(variantClass, ...mods) {
|
|
|
27712
28581
|
as: "span",
|
|
27713
28582
|
className: "rb-testimonials-fe-context"
|
|
27714
28583
|
}, when("testimonial.content.jobTitle"), bind("testimonial.content.jobTitle"))]);
|
|
27715
|
-
return el("div", { className:
|
|
28584
|
+
return el("div", { className: featuredEditorialCardClassName(slot) }, [el("div", { className: "card-content rb-testimonials-fe-card-body" }, [
|
|
27716
28585
|
quoteMark,
|
|
27717
28586
|
quote,
|
|
27718
28587
|
meta
|
|
27719
|
-
], ...mods);
|
|
28588
|
+
])], ...mods);
|
|
27720
28589
|
}
|
|
27721
28590
|
/**
|
|
27722
28591
|
* Build the "featured editorial" layout: an asymmetric two-column arrangement
|
|
@@ -27730,7 +28599,7 @@ function buildFeaturedEditorialCard(variantClass, ...mods) {
|
|
|
27730
28599
|
* index scope in context, so entry 0 produces no node in the rest column.
|
|
27731
28600
|
*/
|
|
27732
28601
|
function buildFeaturedEditorialLayout() {
|
|
27733
|
-
return el("div", { className: "rb-testimonials-fe-grid" }, [buildFeaturedEditorialCard("
|
|
28602
|
+
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", {
|
|
27734
28603
|
equals: 0,
|
|
27735
28604
|
not: true
|
|
27736
28605
|
}))])]);
|
|
@@ -28457,7 +29326,7 @@ const newsletterFormFragment = defineFragment({
|
|
|
28457
29326
|
});
|
|
28458
29327
|
//#endregion
|
|
28459
29328
|
//#region ../blocks/src/system/fragments/library/card.ts
|
|
28460
|
-
const cardVariantOptions
|
|
29329
|
+
const cardVariantOptions = cardVariantRoleValues.map((value) => ({
|
|
28461
29330
|
value,
|
|
28462
29331
|
label: value === "default" ? "Default" : "Alternative"
|
|
28463
29332
|
}));
|
|
@@ -28555,7 +29424,7 @@ const cardFragment = defineFragment({
|
|
|
28555
29424
|
description: "Choose a card style from your theme",
|
|
28556
29425
|
required: false,
|
|
28557
29426
|
defaultValue: "default",
|
|
28558
|
-
options: cardVariantOptions
|
|
29427
|
+
options: cardVariantOptions,
|
|
28559
29428
|
ui: { intent: "style" }
|
|
28560
29429
|
}
|
|
28561
29430
|
],
|
|
@@ -28564,7 +29433,10 @@ const cardFragment = defineFragment({
|
|
|
28564
29433
|
className: { $bind: {
|
|
28565
29434
|
from: "variant",
|
|
28566
29435
|
fallback: "default",
|
|
28567
|
-
transforms: [{
|
|
29436
|
+
transforms: [{
|
|
29437
|
+
id: "boxStyles.cardRoleClass",
|
|
29438
|
+
options: { baseClass: "" }
|
|
29439
|
+
}]
|
|
28568
29440
|
} }
|
|
28569
29441
|
}, [media({
|
|
28570
29442
|
className: "card-media rb-w-full rb-h-auto rb-object-cover",
|
|
@@ -34530,19 +35402,13 @@ const blockBookingPaymentCollectionOptionSchema = z.union([
|
|
|
34530
35402
|
]);
|
|
34531
35403
|
const blockBookingPaymentTermsSchema = z.object({ allowedOptions: z.array(blockBookingPaymentCollectionOptionSchema).min(1) });
|
|
34532
35404
|
//#endregion
|
|
34533
|
-
//#region ../blocks/src/system/blocks/
|
|
34534
|
-
|
|
34535
|
-
* Zod schema for course venue data
|
|
34536
|
-
*/
|
|
34537
|
-
const courseVenueSchema = z.object({
|
|
35405
|
+
//#region ../blocks/src/system/blocks/events/whole-series/schemas.ts
|
|
35406
|
+
const wholeSeriesVenueSchema = z.object({
|
|
34538
35407
|
id: z.string(),
|
|
34539
35408
|
name: z.string(),
|
|
34540
35409
|
address: z.string().nullable()
|
|
34541
35410
|
});
|
|
34542
|
-
|
|
34543
|
-
* Zod schema for course session (occurrence) data
|
|
34544
|
-
*/
|
|
34545
|
-
const courseSessionSchema = z.object({
|
|
35411
|
+
const wholeSeriesSessionSchema = z.object({
|
|
34546
35412
|
id: z.string(),
|
|
34547
35413
|
startsAt: z.string(),
|
|
34548
35414
|
endsAt: z.string(),
|
|
@@ -34550,14 +35416,14 @@ const courseSessionSchema = z.object({
|
|
|
34550
35416
|
capacityOverride: z.number().nullable().optional(),
|
|
34551
35417
|
overrides: z.record(z.string(), z.unknown()).nullable().optional()
|
|
34552
35418
|
});
|
|
34553
|
-
const
|
|
35419
|
+
const wholeSeriesTeamMemberSummarySchema = z.object({
|
|
34554
35420
|
id: z.string(),
|
|
34555
35421
|
name: z.string(),
|
|
34556
35422
|
roleLabel: z.string().nullable(),
|
|
34557
35423
|
summary: z.string().nullable(),
|
|
34558
35424
|
profilePath: z.string().nullable()
|
|
34559
35425
|
});
|
|
34560
|
-
const
|
|
35426
|
+
const wholeSeriesPricingOptionSchema = z.object({
|
|
34561
35427
|
id: z.string(),
|
|
34562
35428
|
name: z.string(),
|
|
34563
35429
|
description: z.string().nullable(),
|
|
@@ -34573,7 +35439,7 @@ const coursePricingOptionSchema = z.object({
|
|
|
34573
35439
|
"both"
|
|
34574
35440
|
]).nullable().optional()
|
|
34575
35441
|
});
|
|
34576
|
-
const
|
|
35442
|
+
const wholeSeriesPricingSchema = z.object({
|
|
34577
35443
|
bookingRequirement: z.enum(["none", "required"]),
|
|
34578
35444
|
pricingStrategy: z.enum([
|
|
34579
35445
|
"free",
|
|
@@ -34587,20 +35453,17 @@ const coursePricingSchema = z.object({
|
|
|
34587
35453
|
slidingMaxAmount: z.number().nullable().optional(),
|
|
34588
35454
|
slidingSuggestedAmount: z.number().nullable().optional(),
|
|
34589
35455
|
paymentTerms: blockBookingPaymentTermsSchema,
|
|
34590
|
-
options: z.array(
|
|
35456
|
+
options: z.array(wholeSeriesPricingOptionSchema)
|
|
34591
35457
|
});
|
|
34592
|
-
/**
|
|
34593
|
-
* Zod schema for public course data
|
|
34594
|
-
*/
|
|
34595
35458
|
const publicWholeSeriesOfferingSchema = z.object({
|
|
34596
35459
|
eventSeriesId: z.string(),
|
|
34597
35460
|
eventOfferingId: z.string(),
|
|
34598
35461
|
title: z.string(),
|
|
34599
35462
|
slug: z.string(),
|
|
34600
35463
|
description: z.unknown().nullable(),
|
|
34601
|
-
teamMembers: z.array(
|
|
35464
|
+
teamMembers: z.array(wholeSeriesTeamMemberSummarySchema).optional(),
|
|
34602
35465
|
enrollmentOpen: z.boolean(),
|
|
34603
|
-
pricing:
|
|
35466
|
+
pricing: wholeSeriesPricingSchema,
|
|
34604
35467
|
currency: z.string(),
|
|
34605
35468
|
paymentTerms: blockBookingPaymentTermsSchema,
|
|
34606
35469
|
enrollmentCapacity: z.number().nullable(),
|
|
@@ -34613,12 +35476,10 @@ const publicWholeSeriesOfferingSchema = z.object({
|
|
|
34613
35476
|
sessionsCount: z.number(),
|
|
34614
35477
|
enrolledCount: z.number(),
|
|
34615
35478
|
availableSpots: z.number().nullable(),
|
|
34616
|
-
sessions: z.array(
|
|
34617
|
-
venue:
|
|
35479
|
+
sessions: z.array(wholeSeriesSessionSchema),
|
|
35480
|
+
venue: wholeSeriesVenueSchema.nullable()
|
|
34618
35481
|
});
|
|
34619
|
-
|
|
34620
|
-
const publicCourseSchema = publicWholeSeriesOfferingSchema;
|
|
34621
|
-
const publicCoursesArraySchema = z.array(publicWholeSeriesOfferingSchema);
|
|
35482
|
+
const publicWholeSeriesOfferingsArraySchema = z.array(publicWholeSeriesOfferingSchema);
|
|
34622
35483
|
//#endregion
|
|
34623
35484
|
//#region ../blocks/src/system/blocks/events/shared/schemas.ts
|
|
34624
35485
|
const eventPresetSchema = z.enum([
|
|
@@ -34929,7 +35790,7 @@ const publicEventSchema = z.object({
|
|
|
34929
35790
|
acceptsMemberships: z.boolean().optional(),
|
|
34930
35791
|
wholeSeries: z.object({
|
|
34931
35792
|
eventSeriesId: z.string(),
|
|
34932
|
-
pricing:
|
|
35793
|
+
pricing: wholeSeriesPricingSchema,
|
|
34933
35794
|
currency: z.string(),
|
|
34934
35795
|
enrollmentOpen: z.boolean()
|
|
34935
35796
|
}).nullable().optional()
|
|
@@ -34938,24 +35799,19 @@ const publicEventSchema = z.object({
|
|
|
34938
35799
|
* Schema for an array of public events
|
|
34939
35800
|
*/
|
|
34940
35801
|
const publicEventsArraySchema = z.array(publicEventSchema);
|
|
35802
|
+
//#endregion
|
|
35803
|
+
//#region ../blocks/src/system/blocks/events/shared/fields.ts
|
|
34941
35804
|
/**
|
|
34942
35805
|
* Shared card styling fields for event blocks
|
|
34943
35806
|
*/
|
|
34944
35807
|
const cardStylingFields = [
|
|
34945
|
-
{
|
|
34946
|
-
id: "
|
|
34947
|
-
type: "select",
|
|
35808
|
+
cardStylesField({
|
|
35809
|
+
id: "_cardStyles",
|
|
34948
35810
|
label: "Card style",
|
|
34949
|
-
|
|
34950
|
-
|
|
34951
|
-
|
|
34952
|
-
|
|
34953
|
-
options: cardVariantRoleValues.map((value) => ({
|
|
34954
|
-
value,
|
|
34955
|
-
label: value === "default" ? "Default" : "Alternative"
|
|
34956
|
-
})),
|
|
34957
|
-
ui: { intent: "style" }
|
|
34958
|
-
},
|
|
35811
|
+
controls: "role-only",
|
|
35812
|
+
renderInHeader: false,
|
|
35813
|
+
intent: "style"
|
|
35814
|
+
}),
|
|
34959
35815
|
createButtonVariantField({ description: "Choose a button style from your theme" }),
|
|
34960
35816
|
{
|
|
34961
35817
|
id: "buttonText",
|
|
@@ -35094,14 +35950,7 @@ function normalizeIdList(parts) {
|
|
|
35094
35950
|
}
|
|
35095
35951
|
//#endregion
|
|
35096
35952
|
//#region ../blocks/src/system/blocks/events/shared/filtering.ts
|
|
35097
|
-
const eventSurfacePresetValues =
|
|
35098
|
-
"course",
|
|
35099
|
-
"term",
|
|
35100
|
-
"class",
|
|
35101
|
-
"workshop",
|
|
35102
|
-
"retreat",
|
|
35103
|
-
"performance"
|
|
35104
|
-
];
|
|
35953
|
+
const eventSurfacePresetValues = SURFACE_EVENT_PRESET_VALUES;
|
|
35105
35954
|
const eventSurfaceScopeValues = [
|
|
35106
35955
|
"all",
|
|
35107
35956
|
"regularClassSchedule",
|
|
@@ -35602,8 +36451,8 @@ const eventRegistrationHydrationSchemaShape = {
|
|
|
35602
36451
|
occurrenceContext: occurrenceContextSchema.optional(),
|
|
35603
36452
|
subject: eventRegistrationPageSurfaceSubjectSchema.nullable().optional(),
|
|
35604
36453
|
events: z.array(eventRegistrationPublicEventSchema).nullable().optional(),
|
|
35605
|
-
wholeSeriesOfferings:
|
|
35606
|
-
wholeSeriesOffering:
|
|
36454
|
+
wholeSeriesOfferings: publicWholeSeriesOfferingsArraySchema.nullable().optional(),
|
|
36455
|
+
wholeSeriesOffering: publicWholeSeriesOfferingSchema.nullable().optional(),
|
|
35607
36456
|
maxTickets: z.string().optional(),
|
|
35608
36457
|
showVenue: z.boolean().optional(),
|
|
35609
36458
|
showCapacity: z.boolean().optional(),
|
|
@@ -35625,12 +36474,13 @@ const eventRegistrationSourceSchema = z.object({
|
|
|
35625
36474
|
portalToken: z.string().nullable().optional(),
|
|
35626
36475
|
previewToken: z.string().nullable().optional(),
|
|
35627
36476
|
...eventRegistrationHydrationSchemaShape,
|
|
36477
|
+
subjectWholeSeriesOffering: publicWholeSeriesOfferingSchema.nullable().optional(),
|
|
35628
36478
|
className: z.string().nullable().optional(),
|
|
35629
36479
|
buttonText: z.string().nullable().optional(),
|
|
35630
36480
|
maxTickets: z.string().nullable().optional(),
|
|
35631
36481
|
stage: previewStageSchema.optional()
|
|
35632
36482
|
});
|
|
35633
|
-
const eventRegistrationDisplaySchema = z.object({
|
|
36483
|
+
const eventRegistrationDisplaySchema = z.discriminatedUnion("state", [z.object({
|
|
35634
36484
|
kind: z.literal("event-registration"),
|
|
35635
36485
|
state: z.literal("generic-shell"),
|
|
35636
36486
|
className: z.string().nullable(),
|
|
@@ -35638,7 +36488,13 @@ const eventRegistrationDisplaySchema = z.object({
|
|
|
35638
36488
|
bodyText: z.string(),
|
|
35639
36489
|
stepLabels: z.array(z.enum(EVENT_REGISTRATION_SHELL_STEP_LABELS)).min(1),
|
|
35640
36490
|
summaryButtonText: z.string()
|
|
35641
|
-
})
|
|
36491
|
+
}), z.object({
|
|
36492
|
+
kind: z.literal("event-registration"),
|
|
36493
|
+
state: z.literal("registration-closed"),
|
|
36494
|
+
className: z.string().nullable(),
|
|
36495
|
+
titleText: z.string(),
|
|
36496
|
+
bodyText: z.string()
|
|
36497
|
+
})]);
|
|
35642
36498
|
const eventRegistrationHydrationSchema = z.object(eventRegistrationHydrationSchemaShape);
|
|
35643
36499
|
const eventRegistrationRenderSchema = z.object({
|
|
35644
36500
|
display: eventRegistrationDisplaySchema,
|
|
@@ -35652,6 +36508,13 @@ z.object({
|
|
|
35652
36508
|
stage: previewStageSchema.optional()
|
|
35653
36509
|
});
|
|
35654
36510
|
function buildEventRegistrationDisplay(source) {
|
|
36511
|
+
if (resolveWholeSeriesOffering(source)?.enrollmentOpen === false) return {
|
|
36512
|
+
kind: "event-registration",
|
|
36513
|
+
state: "registration-closed",
|
|
36514
|
+
className: source.className ?? null,
|
|
36515
|
+
titleText: "Registration closed",
|
|
36516
|
+
bodyText: "This run is no longer open for bookings."
|
|
36517
|
+
};
|
|
35655
36518
|
const stepLabels = buildEventRegistrationShellStepLabels(source);
|
|
35656
36519
|
return {
|
|
35657
36520
|
kind: "event-registration",
|
|
@@ -35663,6 +36526,9 @@ function buildEventRegistrationDisplay(source) {
|
|
|
35663
36526
|
summaryButtonText: source.buttonText?.trim() || "Register"
|
|
35664
36527
|
};
|
|
35665
36528
|
}
|
|
36529
|
+
function resolveWholeSeriesOffering(source) {
|
|
36530
|
+
return source.wholeSeriesOffering ?? source.subjectWholeSeriesOffering ?? null;
|
|
36531
|
+
}
|
|
35666
36532
|
function buildEventRegistrationShellStepLabels(source) {
|
|
35667
36533
|
const scopedEvents = scopeEventRegistrationEvents(source);
|
|
35668
36534
|
if (scopedEvents.length === 0) return EVENT_REGISTRATION_GENERIC_SHELL_STEP_LABELS;
|
|
@@ -35720,7 +36586,7 @@ const eventRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
|
|
|
35720
36586
|
subject: source.subject ?? null,
|
|
35721
36587
|
events: source.events ?? null,
|
|
35722
36588
|
wholeSeriesOfferings: source.wholeSeriesOfferings ?? null,
|
|
35723
|
-
wholeSeriesOffering: source
|
|
36589
|
+
wholeSeriesOffering: resolveWholeSeriesOffering(source),
|
|
35724
36590
|
maxTickets: source.maxTickets ?? void 0,
|
|
35725
36591
|
showVenue: source.showVenue,
|
|
35726
36592
|
showCapacity: source.showCapacity,
|
|
@@ -35941,7 +36807,9 @@ const eventRegistrationBlockDefinition = {
|
|
|
35941
36807
|
fallback: false
|
|
35942
36808
|
} },
|
|
35943
36809
|
events: { $bind: { from: "data.events" } },
|
|
35944
|
-
wholeSeriesOffering: { $bind: { from: "data.
|
|
36810
|
+
wholeSeriesOffering: { $bind: { from: "data.selectedRunOffering.offering" } },
|
|
36811
|
+
subjectWholeSeriesOffering: { $bind: { from: "data.subjectWholeSeriesOffering.offering" } },
|
|
36812
|
+
wholeSeriesOfferings: { $bind: { from: "data.wholeSeriesOfferings" } },
|
|
35945
36813
|
sitePasses: { $bind: { from: "data.sitePasses" } },
|
|
35946
36814
|
siteMemberships: { $bind: { from: "data.siteMemberships" } },
|
|
35947
36815
|
stage: { $bind: {
|
|
@@ -35955,7 +36823,9 @@ const eventRegistrationBlockDefinition = {
|
|
|
35955
36823
|
runtime: eventRegistrationBlockRuntime,
|
|
35956
36824
|
dataSchemas: {
|
|
35957
36825
|
events: publicEventsArraySchema.optional(),
|
|
35958
|
-
|
|
36826
|
+
selectedRunOffering: z.object({ offering: publicWholeSeriesOfferingSchema }).optional(),
|
|
36827
|
+
subjectWholeSeriesOffering: z.object({ offering: publicWholeSeriesOfferingSchema }).optional(),
|
|
36828
|
+
wholeSeriesOfferings: z.array(publicWholeSeriesOfferingSchema).optional(),
|
|
35959
36829
|
sitePasses: publicPassProductCollectionSchema.optional(),
|
|
35960
36830
|
siteMemberships: publicMembershipProductCollectionSchema.optional(),
|
|
35961
36831
|
occurrenceContext: occurrenceContextSchema.optional()
|
|
@@ -35972,11 +36842,29 @@ const eventRegistrationBlockDefinition = {
|
|
|
35972
36842
|
} },
|
|
35973
36843
|
readProfile: "registration",
|
|
35974
36844
|
seriesId: { $bind: { from: "$root.subject.eventSeriesId" } },
|
|
36845
|
+
seriesIds: { $bind: {
|
|
36846
|
+
from: "$root.subject.availableEventSeriesIds",
|
|
36847
|
+
transforms: [{ id: "value.csv" }]
|
|
36848
|
+
} },
|
|
36849
|
+
runSeriesId: { $bind: { from: "$root.entrySubrouteContext.run.seriesId" } },
|
|
35975
36850
|
includeOccurrenceId: { $bind: { from: "$root.occurrenceContext.id" } }
|
|
35976
36851
|
},
|
|
35977
36852
|
mode: "server"
|
|
35978
36853
|
},
|
|
35979
|
-
|
|
36854
|
+
selectedRunOffering: {
|
|
36855
|
+
endpoint: "getPublicWholeSeriesOffering",
|
|
36856
|
+
params: {
|
|
36857
|
+
siteId: { $bind: { from: "$root.siteId" } },
|
|
36858
|
+
eventSeriesId: { $bind: { from: "$root.entrySubrouteContext.run.seriesId" } },
|
|
36859
|
+
stage: { $bind: {
|
|
36860
|
+
from: "$root.previewStage",
|
|
36861
|
+
fallback: "published"
|
|
36862
|
+
} }
|
|
36863
|
+
},
|
|
36864
|
+
requiredParams: ["eventSeriesId"],
|
|
36865
|
+
mode: "server"
|
|
36866
|
+
},
|
|
36867
|
+
subjectWholeSeriesOffering: {
|
|
35980
36868
|
endpoint: "getPublicWholeSeriesOffering",
|
|
35981
36869
|
when: { $bind: {
|
|
35982
36870
|
from: "$root.subject.isWholeSeriesBooking",
|
|
@@ -35993,6 +36881,22 @@ const eventRegistrationBlockDefinition = {
|
|
|
35993
36881
|
requiredParams: ["eventSeriesId"],
|
|
35994
36882
|
mode: "server"
|
|
35995
36883
|
},
|
|
36884
|
+
wholeSeriesOfferings: {
|
|
36885
|
+
endpoint: "listPublicWholeSeriesOfferings",
|
|
36886
|
+
params: {
|
|
36887
|
+
siteId: { $bind: { from: "$root.siteId" } },
|
|
36888
|
+
eventSeriesIds: { $bind: {
|
|
36889
|
+
from: "$root.subject.availableEventSeriesIds",
|
|
36890
|
+
transforms: [{ id: "value.csv" }]
|
|
36891
|
+
} },
|
|
36892
|
+
stage: { $bind: {
|
|
36893
|
+
from: "$root.previewStage",
|
|
36894
|
+
fallback: "published"
|
|
36895
|
+
} }
|
|
36896
|
+
},
|
|
36897
|
+
requiredParams: ["eventSeriesIds"],
|
|
36898
|
+
mode: "server"
|
|
36899
|
+
},
|
|
35996
36900
|
sitePasses: {
|
|
35997
36901
|
endpoint: "listPublicPasses",
|
|
35998
36902
|
params: { siteId: { $bind: { from: "$root.siteId" } } },
|
|
@@ -36007,13 +36911,9 @@ const eventRegistrationBlockDefinition = {
|
|
|
36007
36911
|
};
|
|
36008
36912
|
//#endregion
|
|
36009
36913
|
//#region ../blocks/src/system/runtime/nodes/course-registration.interactive.ts
|
|
36010
|
-
const
|
|
36011
|
-
siteId: z.string().optional(),
|
|
36012
|
-
apiBaseUrl: z.string().optional(),
|
|
36013
|
-
portalToken: z.string().nullable().optional(),
|
|
36914
|
+
const courseRegistrationHydrationSchemaShape = {
|
|
36014
36915
|
subject: eventRegistrationPageSurfaceSubjectSchema.nullable().optional(),
|
|
36015
|
-
courses: z.array(
|
|
36016
|
-
className: z.string().nullable().optional(),
|
|
36916
|
+
courses: z.array(publicWholeSeriesOfferingSchema).nullable().optional(),
|
|
36017
36917
|
showSessions: z.boolean().optional(),
|
|
36018
36918
|
showPrice: z.boolean().optional(),
|
|
36019
36919
|
showCapacity: z.boolean().optional(),
|
|
@@ -36021,8 +36921,15 @@ const courseRegistrationSourceSchema = z.object({
|
|
|
36021
36921
|
successMessage: z.string().optional(),
|
|
36022
36922
|
waitlistMessage: z.string().optional(),
|
|
36023
36923
|
membershipMessage: z.string().optional(),
|
|
36924
|
+
buttonVariant: registrationButtonVariantSchema.optional()
|
|
36925
|
+
};
|
|
36926
|
+
const courseRegistrationSourceSchema = z.object({
|
|
36927
|
+
siteId: z.string().optional(),
|
|
36928
|
+
apiBaseUrl: z.string().optional(),
|
|
36929
|
+
portalToken: z.string().nullable().optional(),
|
|
36930
|
+
...courseRegistrationHydrationSchemaShape,
|
|
36931
|
+
className: z.string().nullable().optional(),
|
|
36024
36932
|
buttonText: z.string().nullable().optional(),
|
|
36025
|
-
buttonVariant: registrationButtonVariantSchema.optional(),
|
|
36026
36933
|
stage: previewStageSchema.optional()
|
|
36027
36934
|
});
|
|
36028
36935
|
const courseRegistrationDisplaySchema = z.object({
|
|
@@ -36031,18 +36938,7 @@ const courseRegistrationDisplaySchema = z.object({
|
|
|
36031
36938
|
className: z.string().nullable(),
|
|
36032
36939
|
summaryButtonText: z.string()
|
|
36033
36940
|
});
|
|
36034
|
-
const courseRegistrationHydrationSchema = z.object(
|
|
36035
|
-
subject: eventRegistrationPageSurfaceSubjectSchema.nullable().optional(),
|
|
36036
|
-
courses: z.array(publicCourseSchema).nullable().optional(),
|
|
36037
|
-
showSessions: z.boolean().optional(),
|
|
36038
|
-
showPrice: z.boolean().optional(),
|
|
36039
|
-
showCapacity: z.boolean().optional(),
|
|
36040
|
-
showVenue: z.boolean().optional(),
|
|
36041
|
-
successMessage: z.string().optional(),
|
|
36042
|
-
waitlistMessage: z.string().optional(),
|
|
36043
|
-
membershipMessage: z.string().optional(),
|
|
36044
|
-
buttonVariant: registrationButtonVariantSchema.optional()
|
|
36045
|
-
});
|
|
36941
|
+
const courseRegistrationHydrationSchema = z.object(courseRegistrationHydrationSchemaShape);
|
|
36046
36942
|
const courseRegistrationRenderSchema = z.object({
|
|
36047
36943
|
display: courseRegistrationDisplaySchema,
|
|
36048
36944
|
hydration: courseRegistrationHydrationSchema
|
|
@@ -36247,7 +37143,7 @@ const courseRegistrationBlockDefinition = {
|
|
|
36247
37143
|
})]
|
|
36248
37144
|
}),
|
|
36249
37145
|
runtime: courseRegistrationBlockRuntime,
|
|
36250
|
-
dataSchemas: { courses:
|
|
37146
|
+
dataSchemas: { courses: publicWholeSeriesOfferingsArraySchema.optional() },
|
|
36251
37147
|
dataLoaders: { courses: {
|
|
36252
37148
|
endpoint: "listPublicWholeSeriesOfferings",
|
|
36253
37149
|
params: {
|
|
@@ -36318,6 +37214,22 @@ const eventDetailsManifest = createBlockManifest({
|
|
|
36318
37214
|
defaultValue: true,
|
|
36319
37215
|
ui: { intent: "display" }
|
|
36320
37216
|
},
|
|
37217
|
+
{
|
|
37218
|
+
id: "showTitle",
|
|
37219
|
+
type: "boolean",
|
|
37220
|
+
label: "Show event title",
|
|
37221
|
+
required: false,
|
|
37222
|
+
defaultValue: false,
|
|
37223
|
+
ui: { intent: "display" }
|
|
37224
|
+
},
|
|
37225
|
+
{
|
|
37226
|
+
id: "showDescription",
|
|
37227
|
+
type: "boolean",
|
|
37228
|
+
label: "Show event description",
|
|
37229
|
+
required: false,
|
|
37230
|
+
defaultValue: false,
|
|
37231
|
+
ui: { intent: "display" }
|
|
37232
|
+
},
|
|
36321
37233
|
{
|
|
36322
37234
|
id: "showMap",
|
|
36323
37235
|
type: "boolean",
|
|
@@ -36354,10 +37266,22 @@ const eventDetailsManifest = createBlockManifest({
|
|
|
36354
37266
|
{
|
|
36355
37267
|
value: "10",
|
|
36356
37268
|
label: "10 dates"
|
|
37269
|
+
},
|
|
37270
|
+
{
|
|
37271
|
+
value: "all",
|
|
37272
|
+
label: "All dates"
|
|
36357
37273
|
}
|
|
36358
37274
|
],
|
|
36359
37275
|
ui: { intent: "display" }
|
|
36360
37276
|
},
|
|
37277
|
+
{
|
|
37278
|
+
id: "showCapacity",
|
|
37279
|
+
type: "boolean",
|
|
37280
|
+
label: "Show capacity",
|
|
37281
|
+
required: false,
|
|
37282
|
+
defaultValue: false,
|
|
37283
|
+
ui: { intent: "display" }
|
|
37284
|
+
},
|
|
36361
37285
|
{
|
|
36362
37286
|
id: "showCost",
|
|
36363
37287
|
type: "boolean",
|
|
@@ -36400,6 +37324,8 @@ const eventDetailsManifest = createBlockManifest({
|
|
|
36400
37324
|
} },
|
|
36401
37325
|
events: { $bind: { from: "data.eventDetailsData.events" } },
|
|
36402
37326
|
showVenue: { $bind: { from: "content.showVenue" } },
|
|
37327
|
+
showTitle: { $bind: { from: "content.showTitle" } },
|
|
37328
|
+
showDescription: { $bind: { from: "content.showDescription" } },
|
|
36403
37329
|
showMap: { $bind: { from: "content.showMap" } },
|
|
36404
37330
|
showOtherDates: { $bind: { from: "content.showOtherDates" } },
|
|
36405
37331
|
otherDatesLimit: { $bind: {
|
|
@@ -36410,6 +37336,10 @@ const eventDetailsManifest = createBlockManifest({
|
|
|
36410
37336
|
from: "content.showCost",
|
|
36411
37337
|
fallback: true
|
|
36412
37338
|
} },
|
|
37339
|
+
showCapacity: { $bind: {
|
|
37340
|
+
from: "content.showCapacity",
|
|
37341
|
+
fallback: false
|
|
37342
|
+
} },
|
|
36413
37343
|
showAcceptedPasses: { $bind: {
|
|
36414
37344
|
from: "content.showAcceptedPasses",
|
|
36415
37345
|
fallback: true
|
|
@@ -36464,6 +37394,11 @@ const eventDetailsBlockDefinition = {
|
|
|
36464
37394
|
limit: "100",
|
|
36465
37395
|
readProfile: "details",
|
|
36466
37396
|
seriesId: { $bind: { from: "$root.subject.eventSeriesId" } },
|
|
37397
|
+
seriesIds: { $bind: {
|
|
37398
|
+
from: "$root.subject.availableEventSeriesIds",
|
|
37399
|
+
transforms: [{ id: "value.csv" }]
|
|
37400
|
+
} },
|
|
37401
|
+
runSeriesId: { $bind: { from: "$root.entrySubrouteContext.run.seriesId" } },
|
|
36467
37402
|
includeOccurrenceId: { $bind: { from: "$root.occurrenceContext.id" } }
|
|
36468
37403
|
},
|
|
36469
37404
|
mode: "server"
|
|
@@ -36649,7 +37584,7 @@ const courseDetailsBlockDefinition = {
|
|
|
36649
37584
|
})], { gap: "lg" })
|
|
36650
37585
|
})]
|
|
36651
37586
|
}),
|
|
36652
|
-
dataSchemas: { courses:
|
|
37587
|
+
dataSchemas: { courses: publicWholeSeriesOfferingsArraySchema.optional() },
|
|
36653
37588
|
dataLoaders: { courses: {
|
|
36654
37589
|
endpoint: "listPublicWholeSeriesOfferings",
|
|
36655
37590
|
params: {
|
|
@@ -36768,8 +37703,8 @@ const eventSpotlightBlockDefinition = {
|
|
|
36768
37703
|
from: "content.columns",
|
|
36769
37704
|
fallback: "3"
|
|
36770
37705
|
} },
|
|
36771
|
-
|
|
36772
|
-
from: "content.
|
|
37706
|
+
cardRole: { $bind: {
|
|
37707
|
+
from: "content._cardStyles.role",
|
|
36773
37708
|
fallback: "default"
|
|
36774
37709
|
} },
|
|
36775
37710
|
buttonVariant: { $bind: {
|
|
@@ -36931,6 +37866,7 @@ const eventCollectionSourceSchemaShape = {
|
|
|
36931
37866
|
showVenue: z.boolean().nullable().optional(),
|
|
36932
37867
|
showMap: z.boolean().nullable().optional(),
|
|
36933
37868
|
showCapacity: z.boolean().nullable().optional(),
|
|
37869
|
+
cardRole: cardRoleSchema.optional(),
|
|
36934
37870
|
buttonVariant: eventButtonVariantSchema.optional(),
|
|
36935
37871
|
buttonText: z.string().optional(),
|
|
36936
37872
|
emptyMessage: z.string().optional(),
|
|
@@ -36958,6 +37894,7 @@ const eventCollectionDisplaySchemaShape = {
|
|
|
36958
37894
|
showVenue: z.boolean(),
|
|
36959
37895
|
showMap: z.boolean(),
|
|
36960
37896
|
showCapacity: z.boolean(),
|
|
37897
|
+
cardRole: cardRoleSchema,
|
|
36961
37898
|
buttonVariant: eventButtonVariantSchema,
|
|
36962
37899
|
buttonText: z.string(),
|
|
36963
37900
|
emptyMessage: z.string()
|
|
@@ -37007,6 +37944,7 @@ function buildEventCollectionPresentationDisplay(source) {
|
|
|
37007
37944
|
showVenue: source.showVenue ?? true,
|
|
37008
37945
|
showMap: source.showMap ?? true,
|
|
37009
37946
|
showCapacity: source.showCapacity ?? true,
|
|
37947
|
+
cardRole: source.cardRole ?? "default",
|
|
37010
37948
|
buttonVariant: source.buttonVariant ?? "primary",
|
|
37011
37949
|
buttonText: source.buttonText ?? "Book",
|
|
37012
37950
|
emptyMessage: source.emptyMessage ?? "No upcoming events scheduled."
|
|
@@ -37024,8 +37962,6 @@ function buildEventCollectionHydration(source) {
|
|
|
37024
37962
|
}
|
|
37025
37963
|
//#endregion
|
|
37026
37964
|
//#region ../blocks/src/system/runtime/nodes/events/EventListing.interactive.ts
|
|
37027
|
-
const legacyEventCardVariantSchema = z.enum(["variant1", "variant2"]);
|
|
37028
|
-
const eventCardVariantInputSchema = z.union([cardVariantRoleSchema, legacyEventCardVariantSchema]);
|
|
37029
37965
|
const cardOrientationSchema = z.enum(["vertical", "horizontal"]);
|
|
37030
37966
|
const eventSurfaceScopeSchema = z.enum(eventSurfaceScopeValues);
|
|
37031
37967
|
const eventScheduleScopeSchema = z.enum(eventScheduleScopeValues);
|
|
@@ -37040,7 +37976,7 @@ const eventListingSourceSchema = z.object({
|
|
|
37040
37976
|
paginationMode: z.enum(["loadMore", "seeAllLink"]).optional(),
|
|
37041
37977
|
seeAllUrl: z.string().optional(),
|
|
37042
37978
|
loadMoreText: z.string().optional(),
|
|
37043
|
-
|
|
37979
|
+
cardRole: cardRoleSchema.optional(),
|
|
37044
37980
|
buttonVariant: eventButtonVariantSchema.optional(),
|
|
37045
37981
|
buttonText: z.string().optional(),
|
|
37046
37982
|
showVenue: z.boolean().optional(),
|
|
@@ -37062,7 +37998,7 @@ const eventListingDisplaySchema = z.object({
|
|
|
37062
37998
|
emptyMessage: z.string(),
|
|
37063
37999
|
loadingMessage: z.string(),
|
|
37064
38000
|
containerClass: z.string(),
|
|
37065
|
-
|
|
38001
|
+
cardRole: cardRoleSchema,
|
|
37066
38002
|
buttonVariant: eventButtonVariantSchema,
|
|
37067
38003
|
buttonText: z.string(),
|
|
37068
38004
|
showVenue: z.boolean(),
|
|
@@ -37118,7 +38054,7 @@ const eventListingBlockRuntime = defineProgressiveBlockRuntime({
|
|
|
37118
38054
|
emptyMessage: source.emptyMessage ?? "No upcoming events scheduled.",
|
|
37119
38055
|
loadingMessage: "Loading events…",
|
|
37120
38056
|
containerClass: getContainerClass(layout, source.columns ?? "3"),
|
|
37121
|
-
|
|
38057
|
+
cardRole: source.cardRole ?? "default",
|
|
37122
38058
|
buttonVariant: source.buttonVariant ?? "primary",
|
|
37123
38059
|
buttonText: source.buttonText ?? "Book",
|
|
37124
38060
|
showVenue: source.showVenue ?? true,
|
|
@@ -37440,8 +38376,8 @@ const eventListingBlockDefinition = {
|
|
|
37440
38376
|
from: "content.loadMoreText",
|
|
37441
38377
|
fallback: "Load more events"
|
|
37442
38378
|
} },
|
|
37443
|
-
|
|
37444
|
-
from: "content.
|
|
38379
|
+
cardRole: { $bind: {
|
|
38380
|
+
from: "content._cardStyles.role",
|
|
37445
38381
|
fallback: "default"
|
|
37446
38382
|
} },
|
|
37447
38383
|
buttonVariant: { $bind: {
|
|
@@ -37711,6 +38647,10 @@ const eventCalendarLayout = [styledSection({
|
|
|
37711
38647
|
filterCategoryIds: { $bind: { from: "content.filterCategoryIds" } },
|
|
37712
38648
|
filterStaffMemberId: { $bind: { from: "content.filterStaffMemberId" } },
|
|
37713
38649
|
filterVenueId: { $bind: { from: "content.filterVenueId" } },
|
|
38650
|
+
cardRole: { $bind: {
|
|
38651
|
+
from: "content._cardStyles.role",
|
|
38652
|
+
fallback: "default"
|
|
38653
|
+
} },
|
|
37714
38654
|
buttonVariant: { $bind: {
|
|
37715
38655
|
from: "content.buttonVariant",
|
|
37716
38656
|
fallback: "primary"
|
|
@@ -38343,11 +39283,11 @@ const eventCalendarAdditionalFields = [
|
|
|
38343
39283
|
searchThreshold: 8
|
|
38344
39284
|
}
|
|
38345
39285
|
}),
|
|
38346
|
-
...cardStylingFields.
|
|
39286
|
+
...cardStylingFields.map((field) => ({
|
|
38347
39287
|
...field,
|
|
38348
39288
|
ui: {
|
|
38349
39289
|
...field.ui ?? {},
|
|
38350
|
-
intent: field.id === "buttonVariant" ? "style" : "content"
|
|
39290
|
+
intent: field.id === "_cardStyles" || field.id === "buttonVariant" ? "style" : "content"
|
|
38351
39291
|
}
|
|
38352
39292
|
})),
|
|
38353
39293
|
{
|
|
@@ -39338,7 +40278,7 @@ const offeringsPreviewBlockDefinition = {
|
|
|
39338
40278
|
dataSchemas: {
|
|
39339
40279
|
...offeringsPreviewEventDataSchemas,
|
|
39340
40280
|
routeCandidates: publicRouteCandidatesSchema.optional(),
|
|
39341
|
-
courses:
|
|
40281
|
+
courses: publicWholeSeriesOfferingsArraySchema.optional()
|
|
39342
40282
|
},
|
|
39343
40283
|
dataLoaders: {
|
|
39344
40284
|
...offeringsPreviewEventDataLoaders,
|
|
@@ -40810,7 +41750,7 @@ const audioPlayerBlockDefinition = { manifest: createBlockManifest({
|
|
|
40810
41750
|
}
|
|
40811
41751
|
],
|
|
40812
41752
|
layout: styledSection({
|
|
40813
|
-
children: stack({ className: "rb-container rb-mx-auto rb-max-w-3xl" }, [el("div", { className: "
|
|
41753
|
+
children: stack({ className: "rb-container rb-mx-auto rb-max-w-3xl" }, [el("div", { className: boxStyleClassNames({ role: "default" }, {}) }, [media({
|
|
40814
41754
|
className: "card-media rb-aspect-video rb-w-full rb-object-cover",
|
|
40815
41755
|
size: {
|
|
40816
41756
|
width: 960,
|
|
@@ -43882,16 +44822,27 @@ function eventListCapable() {
|
|
|
43882
44822
|
looks: "supported",
|
|
43883
44823
|
sectionSurfaces: "supported",
|
|
43884
44824
|
contentFrames: ["plain", "panel"],
|
|
43885
|
-
cardRoles: "
|
|
44825
|
+
cardRoles: "supported",
|
|
43886
44826
|
eventListTreatments
|
|
43887
44827
|
});
|
|
43888
44828
|
}
|
|
44829
|
+
function eventSpotlightCapable() {
|
|
44830
|
+
return declareBlockDesignCapability({
|
|
44831
|
+
sectionSurfaces: "supported",
|
|
44832
|
+
contentFrames: ["plain"],
|
|
44833
|
+
cardRoles: "supported"
|
|
44834
|
+
});
|
|
44835
|
+
}
|
|
43889
44836
|
function offeringsPreviewCapable() {
|
|
43890
44837
|
return declareBlockDesignCapability({
|
|
43891
44838
|
looks: "supported",
|
|
43892
44839
|
sectionSurfaces: "supported",
|
|
43893
44840
|
contentFrames: ["plain"],
|
|
43894
|
-
cardRoles: "supported"
|
|
44841
|
+
cardRoles: "supported",
|
|
44842
|
+
compositions: {
|
|
44843
|
+
kind: "offerings-preview",
|
|
44844
|
+
treatments: offeringsPreviewCompositionTreatmentValues
|
|
44845
|
+
}
|
|
43895
44846
|
});
|
|
43896
44847
|
}
|
|
43897
44848
|
function defaultBoundaryBias(visualWeight) {
|
|
@@ -44184,7 +45135,7 @@ const systemBlockDefinitions = [
|
|
|
44184
45135
|
cardRoles: "supported",
|
|
44185
45136
|
compositions: {
|
|
44186
45137
|
kind: "testimonials",
|
|
44187
|
-
treatments:
|
|
45138
|
+
treatments: testimonialsCompositionTreatmentValues
|
|
44188
45139
|
},
|
|
44189
45140
|
headingDecorationCapability: {
|
|
44190
45141
|
kind: "supported",
|
|
@@ -44339,7 +45290,7 @@ const systemBlockDefinitions = [
|
|
|
44339
45290
|
weight: "standard"
|
|
44340
45291
|
})]
|
|
44341
45292
|
})),
|
|
44342
|
-
withDesignCapability("block.event-spotlight", eventSpotlightBlockDefinition,
|
|
45293
|
+
withDesignCapability("block.event-spotlight", eventSpotlightBlockDefinition, eventSpotlightCapable(), defineBlockDesignMetadata({
|
|
44343
45294
|
flow: offeringsFlow,
|
|
44344
45295
|
layoutProfiles: [layoutProfile({
|
|
44345
45296
|
variantKey: "default",
|
|
@@ -46030,184 +46981,29 @@ const EVENT_ATTENDEE_REFUND_INVALID_CODES = ["manual_booking_not_refundable", ..
|
|
|
46030
46981
|
[...EVENT_ATTENDEE_REFUND_INVALID_CODES, ...CANONICAL_ADMIN_REFUND_FAILURE_CODES];
|
|
46031
46982
|
[...STANDARD_LINE_ITEM_REFUND_INVALID_CODES, ...CANONICAL_ADMIN_REFUND_FAILURE_CODES];
|
|
46032
46983
|
//#endregion
|
|
46033
|
-
//#region ../api/src/
|
|
46034
|
-
|
|
46035
|
-
|
|
46036
|
-
|
|
46037
|
-
|
|
46038
|
-
|
|
46039
|
-
|
|
46040
|
-
|
|
46041
|
-
|
|
46042
|
-
|
|
46043
|
-
|
|
46044
|
-
|
|
46045
|
-
|
|
46046
|
-
|
|
46047
|
-
|
|
46048
|
-
|
|
46049
|
-
|
|
46050
|
-
|
|
46051
|
-
|
|
46052
|
-
|
|
46053
|
-
|
|
46054
|
-
|
|
46055
|
-
//#region ../api/src/bookingVerticalCatalog.ts
|
|
46056
|
-
const VERTICAL_BOOKING_PRESETS = [
|
|
46057
|
-
verticalBookingPreset("yoga_wellness.classes", "yoga_wellness", "class", "Class", "Classes", "Regular scheduled classes and group sessions."),
|
|
46058
|
-
verticalBookingPreset("yoga_wellness.workshops", "yoga_wellness", "workshop", "Workshop", "Workshops", "One-off workshops, day retreats, or special sessions."),
|
|
46059
|
-
verticalBookingPreset("yoga_wellness.courses", "yoga_wellness", "course", "Course", "Courses", "Fixed-schedule courses or multi-session groups."),
|
|
46060
|
-
verticalBookingPreset("yoga_wellness.retreats", "yoga_wellness", "retreat", "Retreat", "Retreats", "Multi-day or residential retreats and immersive experiences."),
|
|
46061
|
-
verticalBookingPreset("yoga_wellness.appointments", "yoga_wellness", "appointment", "Appointment", "Appointments", "Private sessions, consultations, or one-to-one support."),
|
|
46062
|
-
verticalBookingPreset("fitness_pt.group_training", "fitness_pt", "class", "Group training", "Group training", "Regular scheduled classes and group sessions."),
|
|
46063
|
-
verticalBookingPreset("fitness_pt.personal_training", "fitness_pt", "appointment", "Personal training", "Personal training", "One-to-one sessions booked from your availability."),
|
|
46064
|
-
verticalBookingPreset("fitness_pt.programmes", "fitness_pt", "course", "Programme", "Programmes", "Multi-session programmes like bootcamps or courses."),
|
|
46065
|
-
verticalBookingPreset("fitness_pt.workshops", "fitness_pt", "workshop", "Workshop", "Workshops", "One-off workshops, events, or special sessions."),
|
|
46066
|
-
verticalBookingPreset("fitness_pt.retreats", "fitness_pt", "retreat", "Retreat", "Retreats", "Multi-day or residential fitness experiences."),
|
|
46067
|
-
verticalBookingPreset("dance_school.classes", "dance_school", "class", "Class", "Classes", "Regular group classes and weekly sessions."),
|
|
46068
|
-
verticalBookingPreset("dance_school.terms", "dance_school", "course", "Term", "Terms", "Multi-week term blocks or fixed-date course groups."),
|
|
46069
|
-
verticalBookingPreset("dance_school.courses", "dance_school", "course", "Course", "Courses", "Fixed-schedule courses or multi-session groups.", "settings"),
|
|
46070
|
-
verticalBookingPreset("dance_school.workshops", "dance_school", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, or intensives."),
|
|
46071
|
-
verticalBookingPreset("dance_school.private_lessons", "dance_school", "appointment", "Private lesson", "Private lessons", "One-to-one lessons or coaching sessions."),
|
|
46072
|
-
verticalBookingPreset("dance_school.shows", "dance_school", "performance", "Show", "Shows", "Ticketed performances, showcases, and recitals."),
|
|
46073
|
-
verticalBookingPreset("physiotherapy_physical_health.appointments", "physiotherapy_physical_health", "appointment", "Appointment", "Appointments", "Assessments, treatments, follow-ups, and rehabilitation sessions."),
|
|
46074
|
-
verticalBookingPreset("physiotherapy_physical_health.rehab_classes", "physiotherapy_physical_health", "class", "Rehab class", "Rehab classes", "Regular rehabilitation, mobility, strength, or recovery classes."),
|
|
46075
|
-
verticalBookingPreset("physiotherapy_physical_health.workshops", "physiotherapy_physical_health", "workshop", "Workshop", "Workshops", "One-off workshops, talks, or practical group sessions."),
|
|
46076
|
-
verticalBookingPreset("massage_bodywork.treatments", "massage_bodywork", "appointment", "Treatment", "Treatments", "Massage treatments, bodywork sessions, and one-to-one appointments."),
|
|
46077
|
-
verticalBookingPreset("massage_bodywork.group_sessions", "massage_bodywork", "class", "Group session", "Group sessions", "Regular bodywork, somatic movement, or self-massage sessions."),
|
|
46078
|
-
verticalBookingPreset("massage_bodywork.workshops", "massage_bodywork", "workshop", "Workshop", "Workshops", "One-off bodywork, self-massage, or somatic practice workshops."),
|
|
46079
|
-
verticalBookingPreset("therapist_practitioner.appointments", "therapist_practitioner", "appointment", "Appointment", "Appointments", "Sessions, consultations, treatments, or assessments."),
|
|
46080
|
-
verticalBookingPreset("therapist_practitioner.workshops", "therapist_practitioner", "workshop", "Workshop", "Workshops", "One-off group workshops, talks, or wellbeing sessions."),
|
|
46081
|
-
verticalBookingPreset("therapist_practitioner.retreats", "therapist_practitioner", "retreat", "Retreat", "Retreats", "Multi-day retreats or immersive group experiences."),
|
|
46082
|
-
verticalBookingPreset("beauty_spa.appointments", "beauty_spa", "appointment", "Appointment", "Appointments", "Treatments, consultations, services, and sessions."),
|
|
46083
|
-
verticalBookingPreset("beauty_spa.workshops", "beauty_spa", "workshop", "Workshop", "Workshops", "Skincare workshops, makeup lessons, demos, or group events."),
|
|
46084
|
-
verticalBookingPreset("consultant_coach.appointments", "consultant_coach", "appointment", "Appointment", "Appointments", "One-to-one calls, consultations, reviews, or coaching sessions."),
|
|
46085
|
-
verticalBookingPreset("consultant_coach.workshops", "consultant_coach", "workshop", "Workshop", "Workshops", "One-off group sessions, webinars, or strategy days."),
|
|
46086
|
-
verticalBookingPreset("consultant_coach.courses", "consultant_coach", "course", "Course", "Courses", "Fixed-schedule cohorts or multi-session group programmes."),
|
|
46087
|
-
verticalBookingPreset("consultant_coach.retreats", "consultant_coach", "retreat", "Retreat", "Retreats", "Multi-day coaching retreats or immersive experiences."),
|
|
46088
|
-
verticalBookingPreset("training_provider.courses", "training_provider", "course", "Course", "Courses", "Fixed-schedule courses, cohorts, and multi-session training."),
|
|
46089
|
-
verticalBookingPreset("training_provider.workshops", "training_provider", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, and short training sessions."),
|
|
46090
|
-
verticalBookingPreset("training_provider.appointments", "training_provider", "appointment", "Appointment", "Appointments", "Consultations, assessments, mentoring, or office hours."),
|
|
46091
|
-
verticalBookingPreset("training_provider.classes", "training_provider", "class", "Class", "Classes", "Regular classes, sessions, or groups.", "settings"),
|
|
46092
|
-
verticalBookingPreset("training_provider.residentials", "training_provider", "retreat", "Residential", "Residentials", "Residential courses or multi-day training experiences.", "settings"),
|
|
46093
|
-
verticalBookingPreset("retreat_centre.retreats", "retreat_centre", "retreat", "Retreat", "Retreats", "Multi-day or residential retreats with richer booking needs."),
|
|
46094
|
-
verticalBookingPreset("retreat_centre.workshops", "retreat_centre", "workshop", "Workshop", "Workshops", "One-day retreats, ceremonies, workshops, or special events."),
|
|
46095
|
-
verticalBookingPreset("retreat_centre.classes", "retreat_centre", "class", "Class", "Classes", "Regular sessions like guided meditations or group practices."),
|
|
46096
|
-
verticalBookingPreset("retreat_centre.courses", "retreat_centre", "course", "Course", "Courses", "Fixed-schedule programmes or multi-session experiences."),
|
|
46097
|
-
verticalBookingPreset("retreat_centre.appointments", "retreat_centre", "appointment", "Appointment", "Appointments", "Private sessions, therapies, consultations, or add-ons."),
|
|
46098
|
-
verticalBookingPreset("music_school.lessons", "music_school", "appointment", "Lesson", "Lessons", "One-to-one lessons, consultations, or coaching sessions."),
|
|
46099
|
-
verticalBookingPreset("music_school.classes", "music_school", "class", "Class", "Classes", "Regular group classes, ensembles, or recurring sessions."),
|
|
46100
|
-
verticalBookingPreset("music_school.terms", "music_school", "course", "Term", "Terms", "Multi-week term blocks or fixed-date group courses."),
|
|
46101
|
-
verticalBookingPreset("music_school.workshops", "music_school", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, or intensives."),
|
|
46102
|
-
verticalBookingPreset("music_school.performances", "music_school", "performance", "Performance", "Performances", "Concerts, recitals, showcases, or ticketed performances."),
|
|
46103
|
-
verticalBookingPreset("voice_singing.lessons", "voice_singing", "appointment", "Voice session", "Voice sessions", "One-to-one singing lessons, voice coaching, or private practice sessions."),
|
|
46104
|
-
verticalBookingPreset("voice_singing.classes", "voice_singing", "class", "Ongoing weekly session", "Ongoing weekly sessions", "Regular choirs, voice circles, community singing, or group practice."),
|
|
46105
|
-
verticalBookingPreset("voice_singing.terms", "voice_singing", "course", "Singing term", "Singing terms", "Multi-week choir terms, voice courses, or fixed-date group programmes."),
|
|
46106
|
-
verticalBookingPreset("voice_singing.workshops", "voice_singing", "workshop", "Workshop", "Workshops", "One-off singing workshops, voice journeys, or devotional singing sessions."),
|
|
46107
|
-
verticalBookingPreset("voice_singing.performances", "voice_singing", "performance", "Performance", "Performances", "Choir concerts, sharing events, recitals, or community performances."),
|
|
46108
|
-
verticalBookingPreset("performing_arts_school.classes", "performing_arts_school", "class", "Class", "Classes", "Regular group classes, rehearsals, or weekly sessions."),
|
|
46109
|
-
verticalBookingPreset("performing_arts_school.terms", "performing_arts_school", "course", "Term", "Terms", "Multi-week term blocks or fixed-date course groups."),
|
|
46110
|
-
verticalBookingPreset("performing_arts_school.workshops", "performing_arts_school", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, or intensives."),
|
|
46111
|
-
verticalBookingPreset("performing_arts_school.performances", "performing_arts_school", "performance", "Performance", "Performances", "Shows, showcases, productions, or ticketed performances."),
|
|
46112
|
-
verticalBookingPreset("performing_arts_school.lessons", "performing_arts_school", "appointment", "Lesson", "Lessons", "One-to-one lessons, coaching, or audition prep."),
|
|
46113
|
-
verticalBookingPreset("community_wellbeing.classes", "community_wellbeing", "class", "Class", "Classes", "Regular groups, sessions, practices, or weekly activities."),
|
|
46114
|
-
verticalBookingPreset("community_wellbeing.workshops", "community_wellbeing", "workshop", "Workshop", "Workshops", "One-off workshops, talks, events, or gatherings."),
|
|
46115
|
-
verticalBookingPreset("community_wellbeing.courses", "community_wellbeing", "course", "Course", "Courses", "Fixed-schedule courses, study groups, or multi-session programmes."),
|
|
46116
|
-
verticalBookingPreset("community_wellbeing.appointments", "community_wellbeing", "appointment", "Appointment", "Appointments", "One-to-one appointments, consultations, or support sessions."),
|
|
46117
|
-
verticalBookingPreset("community_wellbeing.retreats", "community_wellbeing", "retreat", "Retreat", "Retreats", "Multi-day or residential retreats."),
|
|
46118
|
-
verticalBookingPreset("venue_event_space.resource_hire", "venue_event_space", "appointment", "Hire slot", "Hire slots", "Future room, venue, and resource hire bookings.", "future")
|
|
46119
|
-
];
|
|
46120
|
-
const VERTICAL_ID_SET = /* @__PURE__ */ new Set([
|
|
46121
|
-
"yoga_wellness",
|
|
46122
|
-
"fitness_pt",
|
|
46123
|
-
"dance_school",
|
|
46124
|
-
"physiotherapy_physical_health",
|
|
46125
|
-
"massage_bodywork",
|
|
46126
|
-
"therapist_practitioner",
|
|
46127
|
-
"beauty_spa",
|
|
46128
|
-
"consultant_coach",
|
|
46129
|
-
"training_provider",
|
|
46130
|
-
"retreat_centre",
|
|
46131
|
-
"music_school",
|
|
46132
|
-
"voice_singing",
|
|
46133
|
-
"performing_arts_school",
|
|
46134
|
-
"community_wellbeing",
|
|
46135
|
-
"venue_event_space"
|
|
46136
|
-
]);
|
|
46137
|
-
const VERTICAL_PRESET_ID_SET = new Set(VERTICAL_BOOKING_PRESETS.map((presetDefinition) => presetDefinition.id));
|
|
46138
|
-
function parseVerticalId(value) {
|
|
46139
|
-
return typeof value === "string" && VERTICAL_ID_SET.has(value) ? value : null;
|
|
46140
|
-
}
|
|
46141
|
-
function parseVerticalPresetId(value) {
|
|
46142
|
-
return typeof value === "string" && VERTICAL_PRESET_ID_SET.has(value) ? value : null;
|
|
46143
|
-
}
|
|
46144
|
-
function getVerticalPresetDefinition(presetId) {
|
|
46145
|
-
const definition = VERTICAL_BOOKING_PRESETS.find((presetDefinition) => presetDefinition.id === presetId);
|
|
46146
|
-
if (!definition) throw new Error(`Unhandled vertical preset id: ${presetId}`);
|
|
46147
|
-
return definition;
|
|
46148
|
-
}
|
|
46149
|
-
function toNonEmptyVerticalPresetIds(presetIds) {
|
|
46150
|
-
const firstPresetId = presetIds[0];
|
|
46151
|
-
return firstPresetId ? [firstPresetId, ...presetIds.slice(1)] : null;
|
|
46152
|
-
}
|
|
46153
|
-
function createConfiguredSiteVerticalBookingConfig(verticalId, selectedPresetIds) {
|
|
46154
|
-
return {
|
|
46155
|
-
verticalId,
|
|
46156
|
-
selectedPresetIds
|
|
46157
|
-
};
|
|
46158
|
-
}
|
|
46159
|
-
function createSiteVerticalBookingConfig(verticalId, selectedPresetIds) {
|
|
46160
|
-
const nonEmptyPresetIds = toNonEmptyVerticalPresetIds(selectedPresetIds);
|
|
46161
|
-
return nonEmptyPresetIds ? createConfiguredSiteVerticalBookingConfig(verticalId, nonEmptyPresetIds) : null;
|
|
46162
|
-
}
|
|
46163
|
-
function resolveSiteVerticalBookingConfig(rawConfig) {
|
|
46164
|
-
if (!rawConfig) return {
|
|
46165
|
-
kind: "unconfigured",
|
|
46166
|
-
config: DEFAULT_SITE_VERTICAL_BOOKING_CONFIG
|
|
46167
|
-
};
|
|
46168
|
-
const verticalId = parseVerticalId(rawConfig.verticalId);
|
|
46169
|
-
const selectedPresetIds = (Array.isArray(rawConfig.selectedPresetIds) ? rawConfig.selectedPresetIds : []).map(parseVerticalPresetId).filter((presetId) => Boolean(presetId));
|
|
46170
|
-
const config = {
|
|
46171
|
-
verticalId,
|
|
46172
|
-
selectedPresetIds
|
|
46173
|
-
};
|
|
46174
|
-
if (!verticalId && selectedPresetIds.length === 0) return {
|
|
46175
|
-
kind: "unconfigured",
|
|
46176
|
-
config: DEFAULT_SITE_VERTICAL_BOOKING_CONFIG
|
|
46177
|
-
};
|
|
46178
|
-
const issues = getSiteVerticalConfigIssues(rawConfig, config);
|
|
46179
|
-
if (issues.length > 0) return {
|
|
46180
|
-
kind: "invalid",
|
|
46181
|
-
config,
|
|
46182
|
-
issues
|
|
46183
|
-
};
|
|
46184
|
-
const configuredConfig = verticalId ? createSiteVerticalBookingConfig(verticalId, selectedPresetIds) : null;
|
|
46185
|
-
if (!configuredConfig) return {
|
|
46186
|
-
kind: "invalid",
|
|
46187
|
-
config,
|
|
46188
|
-
issues: ["empty_selected_presets"]
|
|
46189
|
-
};
|
|
46190
|
-
return {
|
|
46191
|
-
kind: "configured",
|
|
46192
|
-
config: configuredConfig,
|
|
46193
|
-
selectedPresets: configuredConfig.selectedPresetIds.map(getVerticalPresetDefinition)
|
|
46194
|
-
};
|
|
46195
|
-
}
|
|
46196
|
-
function getSiteVerticalConfigIssues(rawConfig, config) {
|
|
46197
|
-
const issues = /* @__PURE__ */ new Set();
|
|
46198
|
-
if (rawConfig.verticalId != null && !config.verticalId) issues.add("unknown_vertical");
|
|
46199
|
-
if (!config.verticalId && config.selectedPresetIds.length > 0) issues.add("missing_vertical");
|
|
46200
|
-
if ((Array.isArray(rawConfig.selectedPresetIds) ? rawConfig.selectedPresetIds : []).some((presetId) => parseVerticalPresetId(presetId) === null)) issues.add("unknown_preset");
|
|
46201
|
-
if (config.verticalId && config.selectedPresetIds.length === 0) issues.add("empty_selected_presets");
|
|
46202
|
-
const seenBehaviours = /* @__PURE__ */ new Set();
|
|
46203
|
-
for (const presetId of config.selectedPresetIds) {
|
|
46204
|
-
const presetDefinition = getVerticalPresetDefinition(presetId);
|
|
46205
|
-
if (config.verticalId && presetDefinition.verticalId !== config.verticalId) issues.add("preset_vertical_mismatch");
|
|
46206
|
-
if (presetDefinition.availability === "future") issues.add("future_preset_selected");
|
|
46207
|
-
if (seenBehaviours.has(presetDefinition.canonicalBehaviour)) issues.add("duplicate_canonical_behaviour");
|
|
46208
|
-
seenBehaviours.add(presetDefinition.canonicalBehaviour);
|
|
46984
|
+
//#region ../api/src/bookingVerticals.ts
|
|
46985
|
+
/**
|
|
46986
|
+
* Transport adapters for the booking-vertical domain.
|
|
46987
|
+
*
|
|
46988
|
+
* The domain catalog and all pure resolution/selection rules live in core;
|
|
46989
|
+
* this module owns only the Zod boundary used by API payloads.
|
|
46990
|
+
*/
|
|
46991
|
+
function formatRawDiagnosticValue(value) {
|
|
46992
|
+
const serialized = JSON.stringify(value);
|
|
46993
|
+
return serialized === void 0 ? String(value) : serialized;
|
|
46994
|
+
}
|
|
46995
|
+
function describeSiteVerticalConfigIssue(issue) {
|
|
46996
|
+
switch (issue.code) {
|
|
46997
|
+
case "unknown_vertical": return `${issue.code}: ${formatRawDiagnosticValue(issue.rawValue)}`;
|
|
46998
|
+
case "unknown_preset": return `${issue.code}: ${formatRawDiagnosticValue(issue.rawValue)}`;
|
|
46999
|
+
case "missing_vertical":
|
|
47000
|
+
case "empty_selected_presets":
|
|
47001
|
+
case "preset_vertical_mismatch":
|
|
47002
|
+
case "duplicate_preset_id":
|
|
47003
|
+
case "duplicate_canonical_behaviour":
|
|
47004
|
+
case "future_preset_selected": return issue.code;
|
|
47005
|
+
default: return assertNever$3(issue);
|
|
46209
47006
|
}
|
|
46210
|
-
return [...issues];
|
|
46211
47007
|
}
|
|
46212
47008
|
const VerticalIdSchema = z.string().trim().transform((value, ctx) => {
|
|
46213
47009
|
const parsed = parseVerticalId(value);
|
|
@@ -46239,16 +47035,12 @@ z.object({
|
|
|
46239
47035
|
if (resolved.kind === "invalid") {
|
|
46240
47036
|
ctx.addIssue({
|
|
46241
47037
|
code: z.ZodIssueCode.custom,
|
|
46242
|
-
message: `Invalid booking vertical config: ${resolved.issues.join(", ")}`
|
|
47038
|
+
message: `Invalid booking vertical config: ${resolved.issues.map(describeSiteVerticalConfigIssue).join(", ")}`
|
|
46243
47039
|
});
|
|
46244
47040
|
return z.NEVER;
|
|
46245
47041
|
}
|
|
46246
47042
|
return resolved.config;
|
|
46247
47043
|
});
|
|
46248
|
-
const DEFAULT_SITE_VERTICAL_BOOKING_CONFIG = {
|
|
46249
|
-
verticalId: null,
|
|
46250
|
-
selectedPresetIds: []
|
|
46251
|
-
};
|
|
46252
47044
|
//#endregion
|
|
46253
47045
|
//#region ../api/src/utils/isRecord.ts
|
|
46254
47046
|
function isRecord$3(value) {
|