@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/client/hooks.mjs
CHANGED
|
@@ -1334,6 +1334,17 @@ const PUBLIC_WHOLE_SERIES_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
1334
1334
|
}
|
|
1335
1335
|
});
|
|
1336
1336
|
//#endregion
|
|
1337
|
+
//#region ../api/src/publicEventEndpointDefinitions.ts
|
|
1338
|
+
const PUBLIC_EVENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({ resolveEventSubroute: {
|
|
1339
|
+
path: "/public/sites/{siteId}/events/subroutes/resolve",
|
|
1340
|
+
method: "GET",
|
|
1341
|
+
revalidate: 60,
|
|
1342
|
+
tags: [TAG_TEMPLATES.publicEvents, "event-subroute"],
|
|
1343
|
+
auth: "public",
|
|
1344
|
+
responseKind: "json",
|
|
1345
|
+
errors: []
|
|
1346
|
+
} });
|
|
1347
|
+
//#endregion
|
|
1337
1348
|
//#region ../api/src/siteApiKeyEndpointDefinitions.ts
|
|
1338
1349
|
const SITE_API_KEY_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
1339
1350
|
listSiteApiKeys: {
|
|
@@ -1460,13 +1471,249 @@ const EVENT_MANAGEMENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
1460
1471
|
"resource:conflict",
|
|
1461
1472
|
"server:internal_error"
|
|
1462
1473
|
]
|
|
1474
|
+
},
|
|
1475
|
+
updateEventIdentity: {
|
|
1476
|
+
path: "/sites/{siteId}/bookings/events/{eventId}",
|
|
1477
|
+
method: "PATCH",
|
|
1478
|
+
tags: ["site-{siteId}", "event-series-{siteId}"],
|
|
1479
|
+
auth: "user",
|
|
1480
|
+
responseKind: "json",
|
|
1481
|
+
errors: [
|
|
1482
|
+
"validation:invalid_input",
|
|
1483
|
+
"resource:not_found",
|
|
1484
|
+
"server:internal_error"
|
|
1485
|
+
]
|
|
1486
|
+
},
|
|
1487
|
+
createWholeSeriesRun: {
|
|
1488
|
+
path: "/sites/{siteId}/bookings/events/{eventId}/runs",
|
|
1489
|
+
method: "POST",
|
|
1490
|
+
tags: ["site-{siteId}", "event-series-{siteId}"],
|
|
1491
|
+
auth: "user",
|
|
1492
|
+
responseKind: "json",
|
|
1493
|
+
errors: [
|
|
1494
|
+
"validation:invalid_input",
|
|
1495
|
+
"resource:not_found",
|
|
1496
|
+
"resource:already_exists",
|
|
1497
|
+
"server:internal_error"
|
|
1498
|
+
]
|
|
1499
|
+
},
|
|
1500
|
+
updateWholeSeriesRun: {
|
|
1501
|
+
path: "/sites/{siteId}/bookings/events/{eventId}/runs/{runId}",
|
|
1502
|
+
method: "PATCH",
|
|
1503
|
+
tags: ["site-{siteId}", "event-series-{siteId}"],
|
|
1504
|
+
auth: "user",
|
|
1505
|
+
responseKind: "json",
|
|
1506
|
+
errors: [
|
|
1507
|
+
"validation:invalid_input",
|
|
1508
|
+
"resource:not_found",
|
|
1509
|
+
"resource:conflict",
|
|
1510
|
+
"server:internal_error"
|
|
1511
|
+
]
|
|
1512
|
+
},
|
|
1513
|
+
cancelWholeSeriesRun: {
|
|
1514
|
+
path: "/sites/{siteId}/bookings/events/{eventId}/runs/{runId}/cancellation",
|
|
1515
|
+
method: "POST",
|
|
1516
|
+
tags: ["site-{siteId}", "event-series-{siteId}"],
|
|
1517
|
+
auth: "user",
|
|
1518
|
+
responseKind: "json",
|
|
1519
|
+
errors: [
|
|
1520
|
+
"validation:invalid_input",
|
|
1521
|
+
"resource:not_found",
|
|
1522
|
+
"resource:conflict",
|
|
1523
|
+
"server:internal_error"
|
|
1524
|
+
]
|
|
1463
1525
|
}
|
|
1464
1526
|
});
|
|
1465
|
-
|
|
1527
|
+
//#endregion
|
|
1528
|
+
//#region ../api/src/giftingEndpointDefinitions.ts
|
|
1529
|
+
/**
|
|
1530
|
+
* Gifting endpoints (gift cards & vouchers) — the dashboard surface that manages
|
|
1531
|
+
* offers, gifts and settings, plus the public buy/claim surface.
|
|
1532
|
+
*/
|
|
1533
|
+
const GIFTING_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
1534
|
+
createGiftingOffer: {
|
|
1535
|
+
path: "/sites/{siteId}/gifting/offers",
|
|
1536
|
+
method: "POST",
|
|
1537
|
+
tags: ["site-{siteId}", "gifting-offers-{siteId}"],
|
|
1538
|
+
auth: "user",
|
|
1539
|
+
responseKind: "json",
|
|
1540
|
+
errors: [
|
|
1541
|
+
"validation:invalid_input",
|
|
1542
|
+
"auth:forbidden",
|
|
1543
|
+
"server:internal_error"
|
|
1544
|
+
]
|
|
1545
|
+
},
|
|
1546
|
+
updateGiftingOffer: {
|
|
1547
|
+
path: "/sites/{siteId}/gifting/offers/{offerId}",
|
|
1548
|
+
method: "PATCH",
|
|
1549
|
+
tags: ["site-{siteId}", "gifting-offers-{siteId}"],
|
|
1550
|
+
auth: "user",
|
|
1551
|
+
responseKind: "json",
|
|
1552
|
+
errors: [
|
|
1553
|
+
"validation:invalid_input",
|
|
1554
|
+
"auth:forbidden",
|
|
1555
|
+
"resource:not_found",
|
|
1556
|
+
"resource:conflict",
|
|
1557
|
+
"server:internal_error"
|
|
1558
|
+
]
|
|
1559
|
+
},
|
|
1560
|
+
deleteGiftingOffer: {
|
|
1561
|
+
path: "/sites/{siteId}/gifting/offers/{offerId}",
|
|
1562
|
+
method: "DELETE",
|
|
1563
|
+
tags: ["site-{siteId}", "gifting-offers-{siteId}"],
|
|
1564
|
+
auth: "user",
|
|
1565
|
+
responseKind: "json",
|
|
1566
|
+
errors: [
|
|
1567
|
+
"auth:forbidden",
|
|
1568
|
+
"resource:not_found",
|
|
1569
|
+
"resource:conflict",
|
|
1570
|
+
"server:internal_error"
|
|
1571
|
+
]
|
|
1572
|
+
},
|
|
1573
|
+
duplicateGiftingOffer: {
|
|
1574
|
+
path: "/sites/{siteId}/gifting/offers/{offerId}/duplicate",
|
|
1575
|
+
method: "POST",
|
|
1576
|
+
tags: ["site-{siteId}", "gifting-offers-{siteId}"],
|
|
1577
|
+
auth: "user",
|
|
1578
|
+
responseKind: "json",
|
|
1579
|
+
errors: [
|
|
1580
|
+
"auth:forbidden",
|
|
1581
|
+
"resource:not_found",
|
|
1582
|
+
"server:internal_error"
|
|
1583
|
+
]
|
|
1584
|
+
},
|
|
1585
|
+
reorderGiftingOffers: {
|
|
1586
|
+
path: "/sites/{siteId}/gifting/offers/order",
|
|
1587
|
+
method: "PUT",
|
|
1588
|
+
tags: ["site-{siteId}", "gifting-offers-{siteId}"],
|
|
1589
|
+
auth: "user",
|
|
1590
|
+
responseKind: "json",
|
|
1591
|
+
errors: [
|
|
1592
|
+
"validation:invalid_input",
|
|
1593
|
+
"auth:forbidden",
|
|
1594
|
+
"resource:not_found",
|
|
1595
|
+
"server:internal_error"
|
|
1596
|
+
]
|
|
1597
|
+
},
|
|
1598
|
+
sendGift: {
|
|
1599
|
+
path: "/sites/{siteId}/gifting/gifts",
|
|
1600
|
+
method: "POST",
|
|
1601
|
+
tags: ["site-{siteId}", "gifting-gifts-{siteId}"],
|
|
1602
|
+
auth: "user",
|
|
1603
|
+
demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN,
|
|
1604
|
+
responseKind: "json",
|
|
1605
|
+
errors: [
|
|
1606
|
+
"validation:invalid_input",
|
|
1607
|
+
"auth:forbidden",
|
|
1608
|
+
"resource:not_found",
|
|
1609
|
+
"server:internal_error"
|
|
1610
|
+
]
|
|
1611
|
+
},
|
|
1612
|
+
resendGift: {
|
|
1613
|
+
path: "/sites/{siteId}/gifting/gifts/{giftId}/resend",
|
|
1614
|
+
method: "POST",
|
|
1615
|
+
tags: ["site-{siteId}", "gifting-gifts-{siteId}"],
|
|
1616
|
+
auth: "user",
|
|
1617
|
+
demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN,
|
|
1618
|
+
responseKind: "json",
|
|
1619
|
+
errors: [
|
|
1620
|
+
"auth:forbidden",
|
|
1621
|
+
"resource:not_found",
|
|
1622
|
+
"resource:conflict",
|
|
1623
|
+
"server:internal_error"
|
|
1624
|
+
]
|
|
1625
|
+
},
|
|
1626
|
+
correctGiftEmailAndResend: {
|
|
1627
|
+
path: "/sites/{siteId}/gifting/gifts/{giftId}/correct-email-and-resend",
|
|
1628
|
+
method: "POST",
|
|
1629
|
+
tags: ["site-{siteId}", "gifting-gifts-{siteId}"],
|
|
1630
|
+
auth: "user",
|
|
1631
|
+
demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN,
|
|
1632
|
+
responseKind: "json",
|
|
1633
|
+
errors: [
|
|
1634
|
+
"validation:invalid_input",
|
|
1635
|
+
"auth:forbidden",
|
|
1636
|
+
"resource:not_found",
|
|
1637
|
+
"resource:conflict",
|
|
1638
|
+
"server:internal_error"
|
|
1639
|
+
]
|
|
1640
|
+
},
|
|
1641
|
+
updateGiftingSettings: {
|
|
1642
|
+
path: "/sites/{siteId}/gifting/settings",
|
|
1643
|
+
method: "PATCH",
|
|
1644
|
+
tags: [
|
|
1645
|
+
"site-{siteId}",
|
|
1646
|
+
"gifting-offers-{siteId}",
|
|
1647
|
+
"gifting-gifts-{siteId}"
|
|
1648
|
+
],
|
|
1649
|
+
auth: "user",
|
|
1650
|
+
responseKind: "json",
|
|
1651
|
+
errors: [
|
|
1652
|
+
"validation:invalid_input",
|
|
1653
|
+
"auth:forbidden",
|
|
1654
|
+
"server:internal_error"
|
|
1655
|
+
]
|
|
1656
|
+
},
|
|
1657
|
+
listPublicGiftingOffers: {
|
|
1658
|
+
path: "/public/sites/{siteId}/gifting/offers",
|
|
1659
|
+
method: "GET",
|
|
1660
|
+
revalidate: 300,
|
|
1661
|
+
tags: [TAG_TEMPLATES.publicGifting],
|
|
1662
|
+
errors: [],
|
|
1663
|
+
auth: "public",
|
|
1664
|
+
responseKind: "json"
|
|
1665
|
+
},
|
|
1666
|
+
createPublicGiftingCheckout: {
|
|
1667
|
+
path: "/public/sites/{siteId}/gifting/checkout",
|
|
1668
|
+
method: "POST",
|
|
1669
|
+
tags: [TAG_TEMPLATES.publicGifting],
|
|
1670
|
+
errors: [],
|
|
1671
|
+
auth: "public",
|
|
1672
|
+
responseKind: "json"
|
|
1673
|
+
},
|
|
1674
|
+
claimGiftCardPublic: {
|
|
1675
|
+
path: "/public/sites/{siteId}/gifting/claim",
|
|
1676
|
+
method: "POST",
|
|
1677
|
+
tags: [TAG_TEMPLATES.publicGifting],
|
|
1678
|
+
errors: [],
|
|
1679
|
+
auth: "public",
|
|
1680
|
+
responseKind: "json"
|
|
1681
|
+
}
|
|
1682
|
+
});
|
|
1683
|
+
//#endregion
|
|
1684
|
+
//#region ../api/src/sdkEndpointDefinitions.ts
|
|
1685
|
+
/** SDK management endpoints that do not belong to a CRUD resource family. */
|
|
1686
|
+
const SDK_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
1687
|
+
sdkUpdateSettings: {
|
|
1688
|
+
path: "/sdk/{siteId}/settings",
|
|
1689
|
+
method: "PATCH",
|
|
1690
|
+
auth: "service",
|
|
1691
|
+
responseKind: "json",
|
|
1692
|
+
errors: ["validation:invalid_input", "server:internal_error"]
|
|
1693
|
+
},
|
|
1694
|
+
sdkConfigureBookingVertical: {
|
|
1695
|
+
path: "/sdk/{siteId}/settings/booking/vertical",
|
|
1696
|
+
method: "POST",
|
|
1697
|
+
auth: "service",
|
|
1698
|
+
responseKind: "json"
|
|
1699
|
+
},
|
|
1700
|
+
sdkSetupRevalidationWebhook: {
|
|
1701
|
+
path: "/sdk/{siteId}/webhooks/revalidation/setup",
|
|
1702
|
+
method: "POST",
|
|
1703
|
+
auth: "service",
|
|
1704
|
+
responseKind: "json",
|
|
1705
|
+
errors: ["validation:invalid_input", "server:internal_error"]
|
|
1706
|
+
}
|
|
1707
|
+
});
|
|
1708
|
+
({
|
|
1709
|
+
...ACCOUNT_ENDPOINT_DEFINITIONS,
|
|
1710
|
+
...PUBLIC_EVENT_ENDPOINT_DEFINITIONS,
|
|
1711
|
+
...GIFTING_ENDPOINT_DEFINITIONS
|
|
1712
|
+
}), TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteTheme, TAG_TEMPLATES.siteCollection, { ...SITE_API_KEY_ENDPOINT_DEFINITIONS }, TAG_TEMPLATES.site, TAG_TEMPLATES.siteBookingSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteBookingSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteEmailSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteEmailSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteEmailSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteEmailSettings, {
|
|
1466
1713
|
...NEWSLETTER_ENDPOINT_DEFINITIONS,
|
|
1467
1714
|
...APPOINTMENT_ENDPOINT_DEFINITIONS,
|
|
1468
1715
|
...COURSE_ENDPOINT_DEFINITIONS
|
|
1469
|
-
}, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteById, TAG_TEMPLATES.siteBySlug, TAG_TEMPLATES.siteByDomain, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteById, TAG_TEMPLATES.siteBySlug, TAG_TEMPLATES.siteByDomain, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.workflowRunById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.routeById, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.site, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.navigationItemById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.navigationItemById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteTheme, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteTheme, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteTheme, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRedirects, TAG_TEMPLATES.siteRouteOutcomes, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRedirects, TAG_TEMPLATES.siteRouteOutcomes, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.formSubmissionsBySlug, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.formSubmissionsBySlug, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.formSubmissionsBySlug, TAG_TEMPLATES.formById, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.publicEvents, TAG_TEMPLATES.publicEventFilters, { ...PUBLIC_WHOLE_SERIES_ENDPOINT_DEFINITIONS }, TAG_TEMPLATES.publicTeamMembers, TAG_TEMPLATES.publicWholeSeriesOfferings, TAG_TEMPLATES.publicEvents, TAG_TEMPLATES.publicPasses, TAG_TEMPLATES.publicMemberships, TAG_TEMPLATES.publicProducts, TAG_TEMPLATES.
|
|
1716
|
+
}, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteById, TAG_TEMPLATES.siteBySlug, TAG_TEMPLATES.siteByDomain, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteById, TAG_TEMPLATES.siteBySlug, TAG_TEMPLATES.siteByDomain, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.workflowRunById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.routeById, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.site, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.navigationItemById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.navigationItemById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteTheme, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteTheme, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteTheme, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRedirects, TAG_TEMPLATES.siteRouteOutcomes, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRedirects, TAG_TEMPLATES.siteRouteOutcomes, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.formSubmissionsBySlug, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.formSubmissionsBySlug, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.formSubmissionsBySlug, TAG_TEMPLATES.formById, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.publicEvents, TAG_TEMPLATES.publicEventFilters, { ...PUBLIC_WHOLE_SERIES_ENDPOINT_DEFINITIONS }, TAG_TEMPLATES.publicTeamMembers, TAG_TEMPLATES.publicWholeSeriesOfferings, TAG_TEMPLATES.publicEvents, TAG_TEMPLATES.publicPasses, TAG_TEMPLATES.publicMemberships, TAG_TEMPLATES.publicProducts, TAG_TEMPLATES.publicShop, TAG_TEMPLATES.publicCheckout, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.publicEvents, TAG_TEMPLATES.publicEvents, TAG_TEMPLATES.publicEvents, TAG_TEMPLATES.publicEvents, TAG_TEMPLATES.publicEvents, { ...EVENT_MANAGEMENT_ENDPOINT_DEFINITIONS }, { ...SDK_ENDPOINT_DEFINITIONS }, { ...SDK_ENTRY_READ_ENDPOINTS };
|
|
1470
1717
|
z.object({ refreshToken: z.string().min(1).max(4096) }).strict();
|
|
1471
1718
|
z.object({
|
|
1472
1719
|
accessToken: z.string().min(1).max(4096),
|
|
@@ -1936,6 +2183,298 @@ function parseManagementKey(raw) {
|
|
|
1936
2183
|
if (typeof raw !== "string" || !raw.startsWith("bld_mgmt_sk_") || raw.length === 12) return err({ kind: "invalid-management-key" });
|
|
1937
2184
|
return ok(createSecretInternal("management-key", raw));
|
|
1938
2185
|
}
|
|
2186
|
+
//#endregion
|
|
2187
|
+
//#region ../core/src/event-series-behaviour.ts
|
|
2188
|
+
const SURFACE_EVENT_PRESET_VALUES = [
|
|
2189
|
+
"class",
|
|
2190
|
+
"course",
|
|
2191
|
+
"term",
|
|
2192
|
+
"workshop",
|
|
2193
|
+
"retreat",
|
|
2194
|
+
"performance"
|
|
2195
|
+
];
|
|
2196
|
+
//#endregion
|
|
2197
|
+
//#region ../core/src/booking-vertical-preset.ts
|
|
2198
|
+
const BOOKING_ENGINE_BY_BEHAVIOUR = {
|
|
2199
|
+
class: "event_series",
|
|
2200
|
+
workshop: "event_series",
|
|
2201
|
+
course: "event_series",
|
|
2202
|
+
retreat: "event_series",
|
|
2203
|
+
performance: "event_series",
|
|
2204
|
+
appointment: "appointment_service"
|
|
2205
|
+
};
|
|
2206
|
+
function verticalBookingPreset(id, verticalId, canonicalBehaviour, label, pluralLabel, description, availability = "onboarding") {
|
|
2207
|
+
return {
|
|
2208
|
+
id,
|
|
2209
|
+
verticalId,
|
|
2210
|
+
canonicalBehaviour,
|
|
2211
|
+
engine: BOOKING_ENGINE_BY_BEHAVIOUR[canonicalBehaviour],
|
|
2212
|
+
availability,
|
|
2213
|
+
label,
|
|
2214
|
+
pluralLabel,
|
|
2215
|
+
description
|
|
2216
|
+
};
|
|
2217
|
+
}
|
|
2218
|
+
//#endregion
|
|
2219
|
+
//#region ../core/src/booking-vertical-definitions.ts
|
|
2220
|
+
const VERTICAL_DEFINITIONS = [
|
|
2221
|
+
{
|
|
2222
|
+
id: "yoga_wellness",
|
|
2223
|
+
label: "Yoga, meditation or mindfulness",
|
|
2224
|
+
description: "Yoga studios, wellness teachers, and movement practitioners."
|
|
2225
|
+
},
|
|
2226
|
+
{
|
|
2227
|
+
id: "fitness_pt",
|
|
2228
|
+
label: "Fitness and personal training",
|
|
2229
|
+
description: "Personal trainers, group training, and fitness programmes."
|
|
2230
|
+
},
|
|
2231
|
+
{
|
|
2232
|
+
id: "dance_school",
|
|
2233
|
+
label: "Dance school",
|
|
2234
|
+
description: "Dance classes, courses or terms, workshops, private lessons, and shows."
|
|
2235
|
+
},
|
|
2236
|
+
{
|
|
2237
|
+
id: "physiotherapy_physical_health",
|
|
2238
|
+
label: "Physiotherapy & physical health",
|
|
2239
|
+
description: "Physiotherapists, chiropractors, osteopaths, sports therapists, and rehabilitation practitioners."
|
|
2240
|
+
},
|
|
2241
|
+
{
|
|
2242
|
+
id: "massage_bodywork",
|
|
2243
|
+
label: "Massage & bodywork",
|
|
2244
|
+
description: "Massage therapists, bodyworkers, and somatic practitioners."
|
|
2245
|
+
},
|
|
2246
|
+
{
|
|
2247
|
+
id: "therapist_practitioner",
|
|
2248
|
+
label: "Therapist or practitioner",
|
|
2249
|
+
description: "Appointments, sessions, consultations, and occasional group work."
|
|
2250
|
+
},
|
|
2251
|
+
{
|
|
2252
|
+
id: "beauty_spa",
|
|
2253
|
+
label: "Beauty or spa",
|
|
2254
|
+
description: "Treatment-led businesses with optional workshops."
|
|
2255
|
+
},
|
|
2256
|
+
{
|
|
2257
|
+
id: "consultant_coach",
|
|
2258
|
+
label: "Consultant or coach",
|
|
2259
|
+
description: "One-to-one calls, workshops, courses, and retreats."
|
|
2260
|
+
},
|
|
2261
|
+
{
|
|
2262
|
+
id: "training_provider",
|
|
2263
|
+
label: "Training provider",
|
|
2264
|
+
description: "Courses, workshops, classes, appointments, and residential training."
|
|
2265
|
+
},
|
|
2266
|
+
{
|
|
2267
|
+
id: "retreat_centre",
|
|
2268
|
+
label: "Retreat centre",
|
|
2269
|
+
description: "Residential retreats, workshops, classes, courses, and private sessions."
|
|
2270
|
+
},
|
|
2271
|
+
{
|
|
2272
|
+
id: "music_school",
|
|
2273
|
+
label: "Music teacher or school",
|
|
2274
|
+
description: "Lessons, classes, terms, workshops, and performances."
|
|
2275
|
+
},
|
|
2276
|
+
{
|
|
2277
|
+
id: "voice_singing",
|
|
2278
|
+
label: "Voice & Singing",
|
|
2279
|
+
description: "Singing lessons, choirs, voice circles, workshops, and performances."
|
|
2280
|
+
},
|
|
2281
|
+
{
|
|
2282
|
+
id: "performing_arts_school",
|
|
2283
|
+
label: "Theatre or performing arts school",
|
|
2284
|
+
description: "Classes, terms, workshops, performances, and lessons."
|
|
2285
|
+
},
|
|
2286
|
+
{
|
|
2287
|
+
id: "community_wellbeing",
|
|
2288
|
+
label: "Community or wellbeing centre",
|
|
2289
|
+
description: "Groups, workshops, courses, appointments, and retreats."
|
|
2290
|
+
},
|
|
2291
|
+
{
|
|
2292
|
+
id: "venue_event_space",
|
|
2293
|
+
label: "Venue or event space",
|
|
2294
|
+
description: "Room, resource, or access bookings. Depends on the future capacity-booking domain."
|
|
2295
|
+
}
|
|
2296
|
+
];
|
|
2297
|
+
VERTICAL_DEFINITIONS.map(({ id }) => id);
|
|
2298
|
+
//#endregion
|
|
2299
|
+
//#region ../core/src/booking-vertical-catalog.ts
|
|
2300
|
+
const VERTICAL_BOOKING_PRESETS = [
|
|
2301
|
+
verticalBookingPreset("yoga_wellness.classes", "yoga_wellness", "class", "Class", "Classes", "Regular scheduled classes and group sessions."),
|
|
2302
|
+
verticalBookingPreset("yoga_wellness.workshops", "yoga_wellness", "workshop", "Workshop", "Workshops", "One-off workshops, day retreats, or special sessions."),
|
|
2303
|
+
verticalBookingPreset("yoga_wellness.courses", "yoga_wellness", "course", "Course", "Courses", "Fixed-schedule courses or multi-session groups."),
|
|
2304
|
+
verticalBookingPreset("yoga_wellness.retreats", "yoga_wellness", "retreat", "Retreat", "Retreats", "Multi-day or residential retreats and immersive experiences."),
|
|
2305
|
+
verticalBookingPreset("yoga_wellness.appointments", "yoga_wellness", "appointment", "Appointment", "Appointments", "Private sessions, consultations, or one-to-one support."),
|
|
2306
|
+
verticalBookingPreset("fitness_pt.group_training", "fitness_pt", "class", "Group training", "Group training", "Regular scheduled classes and group sessions."),
|
|
2307
|
+
verticalBookingPreset("fitness_pt.personal_training", "fitness_pt", "appointment", "Personal training", "Personal training", "One-to-one sessions booked from your availability."),
|
|
2308
|
+
verticalBookingPreset("fitness_pt.programmes", "fitness_pt", "course", "Programme", "Programmes", "Multi-session programmes like bootcamps or courses."),
|
|
2309
|
+
verticalBookingPreset("fitness_pt.workshops", "fitness_pt", "workshop", "Workshop", "Workshops", "One-off workshops, events, or special sessions."),
|
|
2310
|
+
verticalBookingPreset("fitness_pt.retreats", "fitness_pt", "retreat", "Retreat", "Retreats", "Multi-day or residential fitness experiences."),
|
|
2311
|
+
verticalBookingPreset("dance_school.classes", "dance_school", "class", "Class", "Classes", "Regular group classes and weekly sessions."),
|
|
2312
|
+
{
|
|
2313
|
+
...verticalBookingPreset("dance_school.terms", "dance_school", "course", "Term", "Terms", "Multi-week term blocks or fixed-date course groups."),
|
|
2314
|
+
eventPresetOverride: "term"
|
|
2315
|
+
},
|
|
2316
|
+
verticalBookingPreset("dance_school.courses", "dance_school", "course", "Course", "Courses", "Fixed-schedule courses or multi-session groups.", "settings"),
|
|
2317
|
+
verticalBookingPreset("dance_school.workshops", "dance_school", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, or intensives."),
|
|
2318
|
+
verticalBookingPreset("dance_school.private_lessons", "dance_school", "appointment", "Private lesson", "Private lessons", "One-to-one lessons or coaching sessions."),
|
|
2319
|
+
verticalBookingPreset("dance_school.shows", "dance_school", "performance", "Show", "Shows", "Ticketed performances, showcases, and recitals."),
|
|
2320
|
+
verticalBookingPreset("physiotherapy_physical_health.appointments", "physiotherapy_physical_health", "appointment", "Appointment", "Appointments", "Assessments, treatments, follow-ups, and rehabilitation sessions."),
|
|
2321
|
+
verticalBookingPreset("physiotherapy_physical_health.rehab_classes", "physiotherapy_physical_health", "class", "Rehab class", "Rehab classes", "Regular rehabilitation, mobility, strength, or recovery classes."),
|
|
2322
|
+
verticalBookingPreset("physiotherapy_physical_health.workshops", "physiotherapy_physical_health", "workshop", "Workshop", "Workshops", "One-off workshops, talks, or practical group sessions."),
|
|
2323
|
+
verticalBookingPreset("massage_bodywork.treatments", "massage_bodywork", "appointment", "Treatment", "Treatments", "Massage treatments, bodywork sessions, and one-to-one appointments."),
|
|
2324
|
+
verticalBookingPreset("massage_bodywork.group_sessions", "massage_bodywork", "class", "Group session", "Group sessions", "Regular bodywork, somatic movement, or self-massage sessions."),
|
|
2325
|
+
verticalBookingPreset("massage_bodywork.workshops", "massage_bodywork", "workshop", "Workshop", "Workshops", "One-off bodywork, self-massage, or somatic practice workshops."),
|
|
2326
|
+
verticalBookingPreset("therapist_practitioner.appointments", "therapist_practitioner", "appointment", "Appointment", "Appointments", "Sessions, consultations, treatments, or assessments."),
|
|
2327
|
+
verticalBookingPreset("therapist_practitioner.workshops", "therapist_practitioner", "workshop", "Workshop", "Workshops", "One-off group workshops, talks, or wellbeing sessions."),
|
|
2328
|
+
verticalBookingPreset("therapist_practitioner.retreats", "therapist_practitioner", "retreat", "Retreat", "Retreats", "Multi-day retreats or immersive group experiences."),
|
|
2329
|
+
verticalBookingPreset("beauty_spa.appointments", "beauty_spa", "appointment", "Appointment", "Appointments", "Treatments, consultations, services, and sessions."),
|
|
2330
|
+
verticalBookingPreset("beauty_spa.workshops", "beauty_spa", "workshop", "Workshop", "Workshops", "Skincare workshops, makeup lessons, demos, or group events."),
|
|
2331
|
+
verticalBookingPreset("consultant_coach.appointments", "consultant_coach", "appointment", "Appointment", "Appointments", "One-to-one calls, consultations, reviews, or coaching sessions."),
|
|
2332
|
+
verticalBookingPreset("consultant_coach.workshops", "consultant_coach", "workshop", "Workshop", "Workshops", "One-off group sessions, webinars, or strategy days."),
|
|
2333
|
+
verticalBookingPreset("consultant_coach.courses", "consultant_coach", "course", "Course", "Courses", "Fixed-schedule cohorts or multi-session group programmes."),
|
|
2334
|
+
verticalBookingPreset("consultant_coach.retreats", "consultant_coach", "retreat", "Retreat", "Retreats", "Multi-day coaching retreats or immersive experiences."),
|
|
2335
|
+
verticalBookingPreset("training_provider.courses", "training_provider", "course", "Course", "Courses", "Fixed-schedule courses, cohorts, and multi-session training."),
|
|
2336
|
+
verticalBookingPreset("training_provider.workshops", "training_provider", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, and short training sessions."),
|
|
2337
|
+
verticalBookingPreset("training_provider.appointments", "training_provider", "appointment", "Appointment", "Appointments", "Consultations, assessments, mentoring, or office hours."),
|
|
2338
|
+
verticalBookingPreset("training_provider.classes", "training_provider", "class", "Class", "Classes", "Regular classes, sessions, or groups.", "settings"),
|
|
2339
|
+
verticalBookingPreset("training_provider.residentials", "training_provider", "retreat", "Residential", "Residentials", "Residential courses or multi-day training experiences.", "settings"),
|
|
2340
|
+
verticalBookingPreset("retreat_centre.retreats", "retreat_centre", "retreat", "Retreat", "Retreats", "Multi-day or residential retreats with richer booking needs."),
|
|
2341
|
+
verticalBookingPreset("retreat_centre.workshops", "retreat_centre", "workshop", "Workshop", "Workshops", "One-day retreats, ceremonies, workshops, or special events."),
|
|
2342
|
+
verticalBookingPreset("retreat_centre.classes", "retreat_centre", "class", "Class", "Classes", "Regular sessions like guided meditations or group practices."),
|
|
2343
|
+
verticalBookingPreset("retreat_centre.courses", "retreat_centre", "course", "Course", "Courses", "Fixed-schedule programmes or multi-session experiences."),
|
|
2344
|
+
verticalBookingPreset("retreat_centre.appointments", "retreat_centre", "appointment", "Appointment", "Appointments", "Private sessions, therapies, consultations, or add-ons."),
|
|
2345
|
+
verticalBookingPreset("music_school.lessons", "music_school", "appointment", "Lesson", "Lessons", "One-to-one lessons, consultations, or coaching sessions."),
|
|
2346
|
+
verticalBookingPreset("music_school.classes", "music_school", "class", "Class", "Classes", "Regular group classes, ensembles, or recurring sessions."),
|
|
2347
|
+
{
|
|
2348
|
+
...verticalBookingPreset("music_school.terms", "music_school", "course", "Term", "Terms", "Multi-week term blocks or fixed-date group courses."),
|
|
2349
|
+
eventPresetOverride: "term"
|
|
2350
|
+
},
|
|
2351
|
+
verticalBookingPreset("music_school.workshops", "music_school", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, or intensives."),
|
|
2352
|
+
verticalBookingPreset("music_school.performances", "music_school", "performance", "Performance", "Performances", "Concerts, recitals, showcases, or ticketed performances."),
|
|
2353
|
+
verticalBookingPreset("voice_singing.lessons", "voice_singing", "appointment", "Voice session", "Voice sessions", "One-to-one singing lessons, voice coaching, or private practice sessions."),
|
|
2354
|
+
verticalBookingPreset("voice_singing.classes", "voice_singing", "class", "Ongoing weekly session", "Ongoing weekly sessions", "Regular choirs, voice circles, community singing, or group practice."),
|
|
2355
|
+
{
|
|
2356
|
+
...verticalBookingPreset("voice_singing.terms", "voice_singing", "course", "Singing term", "Singing terms", "Multi-week choir terms, voice courses, or fixed-date group programmes."),
|
|
2357
|
+
eventPresetOverride: "term"
|
|
2358
|
+
},
|
|
2359
|
+
verticalBookingPreset("voice_singing.workshops", "voice_singing", "workshop", "Workshop", "Workshops", "One-off singing workshops, voice journeys, or devotional singing sessions."),
|
|
2360
|
+
verticalBookingPreset("voice_singing.performances", "voice_singing", "performance", "Performance", "Performances", "Choir concerts, sharing events, recitals, or community performances."),
|
|
2361
|
+
verticalBookingPreset("performing_arts_school.classes", "performing_arts_school", "class", "Class", "Classes", "Regular group classes, rehearsals, or weekly sessions."),
|
|
2362
|
+
{
|
|
2363
|
+
...verticalBookingPreset("performing_arts_school.terms", "performing_arts_school", "course", "Term", "Terms", "Multi-week term blocks or fixed-date course groups."),
|
|
2364
|
+
eventPresetOverride: "term"
|
|
2365
|
+
},
|
|
2366
|
+
verticalBookingPreset("performing_arts_school.workshops", "performing_arts_school", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, or intensives."),
|
|
2367
|
+
verticalBookingPreset("performing_arts_school.performances", "performing_arts_school", "performance", "Performance", "Performances", "Shows, showcases, productions, or ticketed performances."),
|
|
2368
|
+
verticalBookingPreset("performing_arts_school.lessons", "performing_arts_school", "appointment", "Lesson", "Lessons", "One-to-one lessons, coaching, or audition prep."),
|
|
2369
|
+
verticalBookingPreset("community_wellbeing.classes", "community_wellbeing", "class", "Class", "Classes", "Regular groups, sessions, practices, or weekly activities."),
|
|
2370
|
+
verticalBookingPreset("community_wellbeing.workshops", "community_wellbeing", "workshop", "Workshop", "Workshops", "One-off workshops, talks, events, or gatherings."),
|
|
2371
|
+
verticalBookingPreset("community_wellbeing.courses", "community_wellbeing", "course", "Course", "Courses", "Fixed-schedule courses, study groups, or multi-session programmes."),
|
|
2372
|
+
verticalBookingPreset("community_wellbeing.appointments", "community_wellbeing", "appointment", "Appointment", "Appointments", "One-to-one appointments, consultations, or support sessions."),
|
|
2373
|
+
verticalBookingPreset("community_wellbeing.retreats", "community_wellbeing", "retreat", "Retreat", "Retreats", "Multi-day or residential retreats."),
|
|
2374
|
+
verticalBookingPreset("venue_event_space.resource_hire", "venue_event_space", "appointment", "Hire slot", "Hire slots", "Future room, venue, and resource hire bookings.", "future")
|
|
2375
|
+
];
|
|
2376
|
+
//#endregion
|
|
2377
|
+
//#region ../core/src/booking-vertical-config.ts
|
|
2378
|
+
const VERTICAL_ID_SET = new Set(VERTICAL_DEFINITIONS.map(({ id }) => id));
|
|
2379
|
+
const VERTICAL_PRESET_ID_SET = new Set(VERTICAL_BOOKING_PRESETS.map((presetDefinition) => presetDefinition.id));
|
|
2380
|
+
function parseVerticalId(value) {
|
|
2381
|
+
return typeof value === "string" && VERTICAL_ID_SET.has(value) ? value : null;
|
|
2382
|
+
}
|
|
2383
|
+
function parseVerticalPresetId(value) {
|
|
2384
|
+
return typeof value === "string" && VERTICAL_PRESET_ID_SET.has(value) ? value : null;
|
|
2385
|
+
}
|
|
2386
|
+
function getVerticalPresetDefinition(presetId) {
|
|
2387
|
+
const definition = VERTICAL_BOOKING_PRESETS.find((presetDefinition) => presetDefinition.id === presetId);
|
|
2388
|
+
if (definition === void 0) throw new Error(`Unhandled vertical preset id: ${presetId}`);
|
|
2389
|
+
return definition;
|
|
2390
|
+
}
|
|
2391
|
+
function createConfiguredSiteVerticalBookingConfig(verticalId, selectedPresetIds) {
|
|
2392
|
+
return {
|
|
2393
|
+
verticalId,
|
|
2394
|
+
selectedPresetIds
|
|
2395
|
+
};
|
|
2396
|
+
}
|
|
2397
|
+
function toNonEmptyVerticalPresetIds(presetIds) {
|
|
2398
|
+
const firstPresetId = presetIds[0];
|
|
2399
|
+
return firstPresetId ? [firstPresetId, ...presetIds.slice(1)] : null;
|
|
2400
|
+
}
|
|
2401
|
+
const DEFAULT_SITE_VERTICAL_BOOKING_CONFIG = {
|
|
2402
|
+
verticalId: null,
|
|
2403
|
+
selectedPresetIds: []
|
|
2404
|
+
};
|
|
2405
|
+
function appendUniqueIssue(issues, issue) {
|
|
2406
|
+
return issues.some((existing) => existing.code === issue.code) ? issues : [...issues, issue];
|
|
2407
|
+
}
|
|
2408
|
+
function collectRawConfigIssues(rawConfig, config) {
|
|
2409
|
+
const rawPresetValue = rawConfig.selectedPresetIds;
|
|
2410
|
+
const rawPresetIds = Array.isArray(rawPresetValue) ? rawPresetValue : [];
|
|
2411
|
+
let issues = [];
|
|
2412
|
+
if (rawConfig.verticalId != null && config.verticalId === null) issues = appendUniqueIssue(issues, {
|
|
2413
|
+
code: "unknown_vertical",
|
|
2414
|
+
rawValue: rawConfig.verticalId
|
|
2415
|
+
});
|
|
2416
|
+
if (config.verticalId === null && config.selectedPresetIds.length > 0) issues = appendUniqueIssue(issues, { code: "missing_vertical" });
|
|
2417
|
+
if (rawPresetValue !== void 0 && !Array.isArray(rawPresetValue) || rawPresetIds.some((presetId) => parseVerticalPresetId(presetId) === null)) issues = appendUniqueIssue(issues, {
|
|
2418
|
+
code: "unknown_preset",
|
|
2419
|
+
rawValue: rawPresetValue
|
|
2420
|
+
});
|
|
2421
|
+
if (rawConfig.verticalId != null && config.selectedPresetIds.length === 0) issues = appendUniqueIssue(issues, { code: "empty_selected_presets" });
|
|
2422
|
+
return issues;
|
|
2423
|
+
}
|
|
2424
|
+
function collectPresetConfigIssues(config) {
|
|
2425
|
+
const seenPresetIds = /* @__PURE__ */ new Set();
|
|
2426
|
+
const seenBehaviours = /* @__PURE__ */ new Set();
|
|
2427
|
+
let issues = [];
|
|
2428
|
+
for (const presetId of config.selectedPresetIds) {
|
|
2429
|
+
const presetDefinition = getVerticalPresetDefinition(presetId);
|
|
2430
|
+
if (seenPresetIds.has(presetId)) issues = appendUniqueIssue(issues, { code: "duplicate_preset_id" });
|
|
2431
|
+
seenPresetIds.add(presetId);
|
|
2432
|
+
if (config.verticalId !== null && presetDefinition.verticalId !== config.verticalId) issues = appendUniqueIssue(issues, { code: "preset_vertical_mismatch" });
|
|
2433
|
+
if (presetDefinition.availability === "future") issues = appendUniqueIssue(issues, { code: "future_preset_selected" });
|
|
2434
|
+
if (seenBehaviours.has(presetDefinition.canonicalBehaviour)) issues = appendUniqueIssue(issues, { code: "duplicate_canonical_behaviour" });
|
|
2435
|
+
seenBehaviours.add(presetDefinition.canonicalBehaviour);
|
|
2436
|
+
}
|
|
2437
|
+
return issues;
|
|
2438
|
+
}
|
|
2439
|
+
function getSiteVerticalConfigIssues(rawConfig, config) {
|
|
2440
|
+
let issues = collectRawConfigIssues(rawConfig, config);
|
|
2441
|
+
for (const issue of collectPresetConfigIssues(config)) issues = appendUniqueIssue(issues, issue);
|
|
2442
|
+
return issues;
|
|
2443
|
+
}
|
|
2444
|
+
function resolveSiteVerticalBookingConfig(rawConfig) {
|
|
2445
|
+
if (rawConfig == null) return {
|
|
2446
|
+
kind: "unconfigured",
|
|
2447
|
+
config: DEFAULT_SITE_VERTICAL_BOOKING_CONFIG
|
|
2448
|
+
};
|
|
2449
|
+
const verticalId = parseVerticalId(rawConfig.verticalId);
|
|
2450
|
+
const selectedPresetIds = (Array.isArray(rawConfig.selectedPresetIds) ? rawConfig.selectedPresetIds : []).map(parseVerticalPresetId).filter((presetId) => Boolean(presetId));
|
|
2451
|
+
const config = {
|
|
2452
|
+
verticalId,
|
|
2453
|
+
selectedPresetIds
|
|
2454
|
+
};
|
|
2455
|
+
if (rawConfig.verticalId == null && selectedPresetIds.length === 0) return {
|
|
2456
|
+
kind: "unconfigured",
|
|
2457
|
+
config: DEFAULT_SITE_VERTICAL_BOOKING_CONFIG
|
|
2458
|
+
};
|
|
2459
|
+
const issues = getSiteVerticalConfigIssues(rawConfig, config);
|
|
2460
|
+
if (issues.length > 0) return {
|
|
2461
|
+
kind: "invalid",
|
|
2462
|
+
config,
|
|
2463
|
+
issues
|
|
2464
|
+
};
|
|
2465
|
+
const nonEmptyPresetIds = toNonEmptyVerticalPresetIds(selectedPresetIds);
|
|
2466
|
+
const configuredConfig = verticalId !== null && nonEmptyPresetIds !== null ? createConfiguredSiteVerticalBookingConfig(verticalId, nonEmptyPresetIds) : null;
|
|
2467
|
+
if (configuredConfig === null) return {
|
|
2468
|
+
kind: "invalid",
|
|
2469
|
+
config,
|
|
2470
|
+
issues: [{ code: "empty_selected_presets" }]
|
|
2471
|
+
};
|
|
2472
|
+
return {
|
|
2473
|
+
kind: "configured",
|
|
2474
|
+
config: configuredConfig,
|
|
2475
|
+
selectedPresets: configuredConfig.selectedPresetIds.map(getVerticalPresetDefinition)
|
|
2476
|
+
};
|
|
2477
|
+
}
|
|
1939
2478
|
z.object({
|
|
1940
2479
|
formulaVersion: z.literal("managed-domain-overage-v1"),
|
|
1941
2480
|
conversionRule: z.literal("usd-to-gbp-1-to-1-v1"),
|
|
@@ -3848,6 +4387,12 @@ const opaqueButtonColourTokenSchema = themeColorTokenSchema.refine((value) => pa
|
|
|
3848
4387
|
if (token === null) throw new Error("Invariant: opaque button token passed its schema");
|
|
3849
4388
|
return token;
|
|
3850
4389
|
});
|
|
4390
|
+
const contextualButtonHoverSchema = z.strictObject({
|
|
4391
|
+
kind: z.literal("shade-shift"),
|
|
4392
|
+
seedToken: opaqueButtonColourTokenSchema,
|
|
4393
|
+
fallbackDirection: z.enum(["lighter", "darker"]),
|
|
4394
|
+
preferredToken: opaqueButtonColourTokenSchema.optional()
|
|
4395
|
+
});
|
|
3851
4396
|
const buttonShadeAmountSchema = z.number().finite().min(0).max(900).multipleOf(100);
|
|
3852
4397
|
const buttonShadowIntensitySchema = z.enum([
|
|
3853
4398
|
"subtle",
|
|
@@ -4187,6 +4732,7 @@ const buttonVariantSchema = z.strictObject({
|
|
|
4187
4732
|
shadow: variantShadowSchema.optional(),
|
|
4188
4733
|
border: buttonBorderSchema.optional(),
|
|
4189
4734
|
hoverBackgroundToken: opaqueButtonColourTokenSchema.optional(),
|
|
4735
|
+
contextualHover: contextualButtonHoverSchema.optional(),
|
|
4190
4736
|
effects: variantEffectsSchema.optional(),
|
|
4191
4737
|
sizes: variantSizeOverridesSchema.optional(),
|
|
4192
4738
|
affordance: buttonVariantAffordanceSchema.optional()
|
|
@@ -4459,6 +5005,139 @@ function validateButtonTextContrast(input) {
|
|
|
4459
5005
|
};
|
|
4460
5006
|
}
|
|
4461
5007
|
//#endregion
|
|
5008
|
+
//#region ../theme-core/src/buttons/contextualHover.ts
|
|
5009
|
+
function resolveContextualHoverPreference(input) {
|
|
5010
|
+
const preferred = input.instruction.preferredToken;
|
|
5011
|
+
if (preferred && isSafeCandidate(preferred, input.palette, input.surface)) return {
|
|
5012
|
+
kind: "resolved",
|
|
5013
|
+
token: preferred,
|
|
5014
|
+
repair: null
|
|
5015
|
+
};
|
|
5016
|
+
const contextual = resolveContextualHover(input);
|
|
5017
|
+
return contextual.kind === "resolved" ? {
|
|
5018
|
+
kind: "resolved",
|
|
5019
|
+
token: contextual.token,
|
|
5020
|
+
repair: preferred ? {
|
|
5021
|
+
kind: "preferred-token-replaced",
|
|
5022
|
+
preferredToken: preferred,
|
|
5023
|
+
contextualToken: contextual.token
|
|
5024
|
+
} : null
|
|
5025
|
+
} : contextual;
|
|
5026
|
+
}
|
|
5027
|
+
/**
|
|
5028
|
+
* Resolves semantic shade movement from real palette steps. The persisted
|
|
5029
|
+
* instruction owns the colour family and deterministic unknown-surface
|
|
5030
|
+
* fallback; a proven surface may select the opposite direction when it gives
|
|
5031
|
+
* the button stronger separation while retaining the shared contrast contract.
|
|
5032
|
+
*/
|
|
5033
|
+
function resolveContextualHover(input) {
|
|
5034
|
+
const candidates = shadeCandidates(input.instruction.seedToken, input.palette);
|
|
5035
|
+
if (candidates.length === 0) return {
|
|
5036
|
+
kind: "unavailable",
|
|
5037
|
+
reason: "no-distinct-shade"
|
|
5038
|
+
};
|
|
5039
|
+
const textSafe = candidates.filter((candidate) => hasSafeTextContrast(candidate.token, input.palette));
|
|
5040
|
+
if (textSafe.length === 0) return {
|
|
5041
|
+
kind: "unavailable",
|
|
5042
|
+
reason: "no-text-safe-candidate"
|
|
5043
|
+
};
|
|
5044
|
+
if (!input.surface) {
|
|
5045
|
+
const selected = textSafe.find((candidate) => candidate.direction === input.instruction.fallbackDirection) ?? textSafe[0];
|
|
5046
|
+
return selected ? {
|
|
5047
|
+
kind: "resolved",
|
|
5048
|
+
token: selected.token,
|
|
5049
|
+
direction: selected.direction,
|
|
5050
|
+
evidence: "fallback-direction"
|
|
5051
|
+
} : {
|
|
5052
|
+
kind: "unavailable",
|
|
5053
|
+
reason: "no-text-safe-candidate"
|
|
5054
|
+
};
|
|
5055
|
+
}
|
|
5056
|
+
const selected = textSafe.map((candidate) => ({
|
|
5057
|
+
...candidate,
|
|
5058
|
+
surfaceContrast: contrastRatio(input.palette[candidate.token] ?? "", input.surface?.backgroundHex ?? "")
|
|
5059
|
+
})).filter((candidate) => candidate.surfaceContrast !== null && candidate.surfaceContrast >= BUTTON_CONTRAST_POLICY.nonTextMinimumRatio).sort((left, right) => {
|
|
5060
|
+
const distanceDifference = left.distance - right.distance;
|
|
5061
|
+
if (distanceDifference !== 0) return distanceDifference;
|
|
5062
|
+
const contrastDifference = (right.surfaceContrast ?? 0) - (left.surfaceContrast ?? 0);
|
|
5063
|
+
if (contrastDifference !== 0) return contrastDifference;
|
|
5064
|
+
if (left.direction === right.direction) return left.token.localeCompare(right.token);
|
|
5065
|
+
return left.direction === input.instruction.fallbackDirection ? -1 : 1;
|
|
5066
|
+
})[0];
|
|
5067
|
+
return selected ? {
|
|
5068
|
+
kind: "resolved",
|
|
5069
|
+
token: selected.token,
|
|
5070
|
+
direction: selected.direction,
|
|
5071
|
+
evidence: "known-surface"
|
|
5072
|
+
} : {
|
|
5073
|
+
kind: "unavailable",
|
|
5074
|
+
reason: "no-surface-safe-candidate"
|
|
5075
|
+
};
|
|
5076
|
+
}
|
|
5077
|
+
function shadeCandidates(seedToken, palette) {
|
|
5078
|
+
const match = String(seedToken).match(/^(.*?)(?:-(\d{2,3}))?$/);
|
|
5079
|
+
const family = match?.[1] ?? String(seedToken);
|
|
5080
|
+
const currentShade = match?.[2] ? Number(match[2]) : 500;
|
|
5081
|
+
const seedHex = palette[seedToken];
|
|
5082
|
+
const shades = Object.keys(palette).flatMap((token) => {
|
|
5083
|
+
const shade = token.match(new RegExp(`^${escapeRegExp(family)}-(\\d{2,3})$`));
|
|
5084
|
+
return shade?.[1] ? [Number(shade[1])] : [];
|
|
5085
|
+
}).filter((shade) => Number.isFinite(shade)).sort((left, right) => left - right);
|
|
5086
|
+
const lower = [...shades].filter((shade) => shade < currentShade).sort((left, right) => right - left);
|
|
5087
|
+
const higher = shades.filter((shade) => shade > currentShade);
|
|
5088
|
+
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);
|
|
5089
|
+
}
|
|
5090
|
+
function candidate(family, shade, currentShade, direction, seedHex, palette) {
|
|
5091
|
+
const token = parseOpaqueButtonColourToken(`${family}-${shade}`);
|
|
5092
|
+
if (token === null) return null;
|
|
5093
|
+
const candidateHex = palette[token];
|
|
5094
|
+
if (!candidateHex || candidateHex === seedHex) return null;
|
|
5095
|
+
return {
|
|
5096
|
+
token,
|
|
5097
|
+
direction,
|
|
5098
|
+
distance: Math.abs(shade - currentShade),
|
|
5099
|
+
surfaceContrast: null
|
|
5100
|
+
};
|
|
5101
|
+
}
|
|
5102
|
+
function hasSafeTextContrast(token, palette) {
|
|
5103
|
+
const background = palette[token];
|
|
5104
|
+
const foreground = palette[onColorTokenName(token)];
|
|
5105
|
+
return typeof background === "string" && typeof foreground === "string" && contrastRatio(background, foreground) >= BUTTON_CONTRAST_POLICY.textMinimumRatio;
|
|
5106
|
+
}
|
|
5107
|
+
function isSafeCandidate(token, palette, surface) {
|
|
5108
|
+
if (!hasSafeTextContrast(token, palette)) return false;
|
|
5109
|
+
return surface ? contrastRatio(palette[token] ?? "", surface.backgroundHex) >= BUTTON_CONTRAST_POLICY.nonTextMinimumRatio : true;
|
|
5110
|
+
}
|
|
5111
|
+
function escapeRegExp(value) {
|
|
5112
|
+
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
5113
|
+
}
|
|
5114
|
+
//#endregion
|
|
5115
|
+
//#region ../theme-core/src/buttons/resolveButtonHoverTreatment.ts
|
|
5116
|
+
function resolveButtonHoverTreatment(input) {
|
|
5117
|
+
if (input.variant.contextualHover) {
|
|
5118
|
+
const contextual = resolveContextualHoverPreference({
|
|
5119
|
+
instruction: input.variant.contextualHover,
|
|
5120
|
+
palette: input.palette,
|
|
5121
|
+
surface: input.surface
|
|
5122
|
+
});
|
|
5123
|
+
if (contextual.kind === "resolved") return {
|
|
5124
|
+
treatment: {
|
|
5125
|
+
type: "solid",
|
|
5126
|
+
colorToken: contextual.token
|
|
5127
|
+
},
|
|
5128
|
+
repair: contextual.repair
|
|
5129
|
+
};
|
|
5130
|
+
}
|
|
5131
|
+
const token = input.variant.hoverBackgroundToken ?? (input.global.hoverColor === "token" ? input.global.hoverColorToken : void 0);
|
|
5132
|
+
return {
|
|
5133
|
+
treatment: token === void 0 ? input.fallback : {
|
|
5134
|
+
type: "solid",
|
|
5135
|
+
colorToken: token
|
|
5136
|
+
},
|
|
5137
|
+
repair: null
|
|
5138
|
+
};
|
|
5139
|
+
}
|
|
5140
|
+
//#endregion
|
|
4462
5141
|
//#region ../theme-core/src/buttons/resolveButtonColourStates.ts
|
|
4463
5142
|
function compileButtonColourStates(input) {
|
|
4464
5143
|
const baseTransition = applyColourEffects({
|
|
@@ -4469,9 +5148,16 @@ function compileButtonColourStates(input) {
|
|
|
4469
5148
|
palette: input.palette
|
|
4470
5149
|
});
|
|
4471
5150
|
if (!baseTransition.ok) return baseTransition;
|
|
5151
|
+
const hover = resolveButtonHoverTreatment({
|
|
5152
|
+
variant: input.variant,
|
|
5153
|
+
global: input.global,
|
|
5154
|
+
fallback: baseTransition.treatment,
|
|
5155
|
+
palette: input.palette,
|
|
5156
|
+
surface: input.surface
|
|
5157
|
+
});
|
|
4472
5158
|
const stateTreatments = {
|
|
4473
5159
|
base: baseTransition.treatment,
|
|
4474
|
-
hover:
|
|
5160
|
+
hover: hover.treatment,
|
|
4475
5161
|
focus: baseTransition.treatment,
|
|
4476
5162
|
active: baseTransition.treatment,
|
|
4477
5163
|
disabled: baseTransition.treatment
|
|
@@ -4510,14 +5196,8 @@ function compileButtonColourStates(input) {
|
|
|
4510
5196
|
ok: true,
|
|
4511
5197
|
states: resolved,
|
|
4512
5198
|
focusIndicator: resolveFocusIndicator(resolved.focus),
|
|
4513
|
-
nonColourEffects
|
|
4514
|
-
|
|
4515
|
-
}
|
|
4516
|
-
function hoverTreatment(variant, global, fallback) {
|
|
4517
|
-
const token = variant.hoverBackgroundToken ?? (global.hoverColor === "token" ? global.hoverColorToken : void 0);
|
|
4518
|
-
return token === void 0 ? fallback : {
|
|
4519
|
-
type: "solid",
|
|
4520
|
-
colorToken: token
|
|
5199
|
+
nonColourEffects,
|
|
5200
|
+
contextualHoverRepair: hover.repair
|
|
4521
5201
|
};
|
|
4522
5202
|
}
|
|
4523
5203
|
function applyColourEffects(input) {
|
|
@@ -5327,13 +6007,24 @@ function resolveContextualButtonRole(input) {
|
|
|
5327
6007
|
};
|
|
5328
6008
|
const rejected = [];
|
|
5329
6009
|
const preferred = compileCandidate(requested, input.buttonSystem, input.palette, input.surface);
|
|
5330
|
-
if (preferred.ok)
|
|
5331
|
-
|
|
5332
|
-
|
|
5333
|
-
|
|
5334
|
-
|
|
5335
|
-
|
|
5336
|
-
|
|
6010
|
+
if (preferred.ok) {
|
|
6011
|
+
if (preferred.contextualHoverRepair) return {
|
|
6012
|
+
kind: "repaired",
|
|
6013
|
+
requestedRole: input.role,
|
|
6014
|
+
candidate: "contextual-hover",
|
|
6015
|
+
states: preferred.states,
|
|
6016
|
+
focusIndicator: preferred.focusIndicator,
|
|
6017
|
+
boundary: boundaryForVariant(requested),
|
|
6018
|
+
rejectedCandidates: []
|
|
6019
|
+
};
|
|
6020
|
+
return {
|
|
6021
|
+
kind: "preferred",
|
|
6022
|
+
requestedRole: input.role,
|
|
6023
|
+
states: preferred.states,
|
|
6024
|
+
focusIndicator: preferred.focusIndicator,
|
|
6025
|
+
boundary: boundaryForVariant(requested)
|
|
6026
|
+
};
|
|
6027
|
+
}
|
|
5337
6028
|
rejected.push({
|
|
5338
6029
|
candidate: "preferred",
|
|
5339
6030
|
error: preferred.error
|
|
@@ -5453,6 +6144,7 @@ function candidateVariant(fallback, requested, system) {
|
|
|
5453
6144
|
},
|
|
5454
6145
|
border: { widthClass: "border" },
|
|
5455
6146
|
hoverBackgroundToken: void 0,
|
|
6147
|
+
contextualHover: void 0,
|
|
5456
6148
|
effects: void 0
|
|
5457
6149
|
},
|
|
5458
6150
|
boundary: {
|
|
@@ -5564,13 +6256,7 @@ function readNonEmptyString(value) {
|
|
|
5564
6256
|
buttonSizeNameSchema.options;
|
|
5565
6257
|
//#endregion
|
|
5566
6258
|
//#region ../theme-core/src/buttons/styles/domain.ts
|
|
5567
|
-
const PUBLIC_BUTTON_ROLES =
|
|
5568
|
-
"primary",
|
|
5569
|
-
"secondary",
|
|
5570
|
-
"outline",
|
|
5571
|
-
"ghost",
|
|
5572
|
-
"accent"
|
|
5573
|
-
];
|
|
6259
|
+
const PUBLIC_BUTTON_ROLES = VARIANT_ROLES;
|
|
5574
6260
|
function defineButtonStyleRecipe(recipe) {
|
|
5575
6261
|
return recipe;
|
|
5576
6262
|
}
|
|
@@ -5666,6 +6352,14 @@ const BUTTON_STYLE_IDS = [
|
|
|
5666
6352
|
"quiet-arrow"
|
|
5667
6353
|
];
|
|
5668
6354
|
const quietArrowParametersSchema = z.object({ secondaryTreatment: z.enum(["outlined", "solid-accent"]) }).strict();
|
|
6355
|
+
const flatInkHoverTreatmentSchema = z.enum([
|
|
6356
|
+
"contextual",
|
|
6357
|
+
"secondary",
|
|
6358
|
+
"accent"
|
|
6359
|
+
]);
|
|
6360
|
+
const flatInkHoverPreferencesShape = Object.fromEntries(VARIANT_ROLES.map((role) => [role, flatInkHoverTreatmentSchema.optional()]));
|
|
6361
|
+
const flatInkHoverPreferencesSchema = z.strictObject(flatInkHoverPreferencesShape);
|
|
6362
|
+
const flatInkParametersSchema = z.strictObject({ hoverPreferences: flatInkHoverPreferencesSchema.optional() });
|
|
5669
6363
|
const emptyParametersSchema$1 = z.object({}).strict();
|
|
5670
6364
|
function selectionBranch(styleId, parameters) {
|
|
5671
6365
|
return z.object({
|
|
@@ -5680,7 +6374,7 @@ const buttonStyleSelectionSchema = z.discriminatedUnion("styleId", [
|
|
|
5680
6374
|
selectionBranch("editorial-link", emptyParametersSchema$1),
|
|
5681
6375
|
selectionBranch("pebble", emptyParametersSchema$1),
|
|
5682
6376
|
selectionBranch("ink-stamp", emptyParametersSchema$1),
|
|
5683
|
-
selectionBranch("flat-ink",
|
|
6377
|
+
selectionBranch("flat-ink", flatInkParametersSchema),
|
|
5684
6378
|
selectionBranch("brushed-wash", emptyParametersSchema$1),
|
|
5685
6379
|
selectionBranch("showtime-pill", emptyParametersSchema$1),
|
|
5686
6380
|
selectionBranch("joy-stamp", emptyParametersSchema$1),
|
|
@@ -5817,6 +6511,189 @@ const quietArrowRecipe = defineButtonStyleRecipe({
|
|
|
5817
6511
|
})
|
|
5818
6512
|
});
|
|
5819
6513
|
//#endregion
|
|
6514
|
+
//#region ../theme-core/src/buttons/styles/recipes/flatInk.ts
|
|
6515
|
+
const contextualRoleConfig = {
|
|
6516
|
+
primary: {
|
|
6517
|
+
contextualSeedToken: unsafeAsOpaqueButtonColourToken("primary"),
|
|
6518
|
+
fallbackDirection: "darker"
|
|
6519
|
+
},
|
|
6520
|
+
secondary: {
|
|
6521
|
+
contextualSeedToken: unsafeAsOpaqueButtonColourToken("surfaceAlt"),
|
|
6522
|
+
fallbackDirection: "darker"
|
|
6523
|
+
},
|
|
6524
|
+
outline: {
|
|
6525
|
+
contextualSeedToken: unsafeAsOpaqueButtonColourToken("surfaceAlt"),
|
|
6526
|
+
fallbackDirection: "darker"
|
|
6527
|
+
},
|
|
6528
|
+
ghost: {
|
|
6529
|
+
contextualSeedToken: unsafeAsOpaqueButtonColourToken("surfaceAlt"),
|
|
6530
|
+
fallbackDirection: "darker"
|
|
6531
|
+
},
|
|
6532
|
+
accent: {
|
|
6533
|
+
contextualSeedToken: unsafeAsOpaqueButtonColourToken("accent"),
|
|
6534
|
+
fallbackDirection: "darker"
|
|
6535
|
+
}
|
|
6536
|
+
};
|
|
6537
|
+
const hoverControl = {
|
|
6538
|
+
kind: "button-hover-by-role",
|
|
6539
|
+
parameter: "hoverPreferences",
|
|
6540
|
+
label: "Button hover",
|
|
6541
|
+
roles: contextualRoleConfig,
|
|
6542
|
+
options: [
|
|
6543
|
+
{
|
|
6544
|
+
value: "contextual",
|
|
6545
|
+
label: "Contextual shade shift"
|
|
6546
|
+
},
|
|
6547
|
+
{
|
|
6548
|
+
value: "secondary",
|
|
6549
|
+
label: "Secondary button colour"
|
|
6550
|
+
},
|
|
6551
|
+
{
|
|
6552
|
+
value: "accent",
|
|
6553
|
+
label: "Accent button colour"
|
|
6554
|
+
}
|
|
6555
|
+
]
|
|
6556
|
+
};
|
|
6557
|
+
const lift = { effectId: "lift" };
|
|
6558
|
+
const flatInkRecipe = defineButtonStyleRecipe({
|
|
6559
|
+
id: "flat-ink",
|
|
6560
|
+
accessibilityLabel: "Flat rounded buttons with arrow affordances",
|
|
6561
|
+
tags: {
|
|
6562
|
+
tone: "classic",
|
|
6563
|
+
energy: "calm",
|
|
6564
|
+
motion: "subtle",
|
|
6565
|
+
era: "editorial"
|
|
6566
|
+
},
|
|
6567
|
+
parameterSchema: flatInkParametersSchema,
|
|
6568
|
+
defaultParameters: {},
|
|
6569
|
+
controls: [hoverControl],
|
|
6570
|
+
defineSystem: (parameters) => ({
|
|
6571
|
+
global: {
|
|
6572
|
+
cornerStyle: "rounded",
|
|
6573
|
+
textTransform: "none",
|
|
6574
|
+
fontWeight: 600,
|
|
6575
|
+
typography: "body",
|
|
6576
|
+
letterSpacing: "tight",
|
|
6577
|
+
paddingPreset: "default",
|
|
6578
|
+
hoverTransform: "lift",
|
|
6579
|
+
hoverColor: "none"
|
|
6580
|
+
},
|
|
6581
|
+
sizes: {
|
|
6582
|
+
sm: {
|
|
6583
|
+
padding: "0.625rem 1.125rem",
|
|
6584
|
+
fontSize: "text-sm"
|
|
6585
|
+
},
|
|
6586
|
+
md: { padding: "0.8125rem 1.375rem" },
|
|
6587
|
+
lg: {
|
|
6588
|
+
padding: "0.9375rem 1.625rem",
|
|
6589
|
+
fontSize: "text-lg"
|
|
6590
|
+
},
|
|
6591
|
+
xl: {
|
|
6592
|
+
padding: "1.0625rem 2rem",
|
|
6593
|
+
fontSize: "text-xl"
|
|
6594
|
+
}
|
|
6595
|
+
},
|
|
6596
|
+
roles: {
|
|
6597
|
+
primary: {
|
|
6598
|
+
kind: "complete",
|
|
6599
|
+
appearance: {
|
|
6600
|
+
background: {
|
|
6601
|
+
type: "solid",
|
|
6602
|
+
colorToken: unsafeAsOpaqueButtonColourToken("primary")
|
|
6603
|
+
},
|
|
6604
|
+
borderRadius: "rounded-lg",
|
|
6605
|
+
affordance: { iconId: "ArrowRight" },
|
|
6606
|
+
...hoverAppearance("primary", parameters, [lift, {
|
|
6607
|
+
effectId: "background-on-hover",
|
|
6608
|
+
options: { colorToken: unsafeAsOpaqueButtonColourToken("secondary") }
|
|
6609
|
+
}])
|
|
6610
|
+
}
|
|
6611
|
+
},
|
|
6612
|
+
secondary: {
|
|
6613
|
+
kind: "complete",
|
|
6614
|
+
appearance: {
|
|
6615
|
+
background: {
|
|
6616
|
+
type: "surface",
|
|
6617
|
+
role: "link"
|
|
6618
|
+
},
|
|
6619
|
+
borderRadius: "rounded-lg",
|
|
6620
|
+
border: { widthClass: "border" },
|
|
6621
|
+
...hoverAppearance("secondary", parameters, [lift, {
|
|
6622
|
+
effectId: "background-on-hover",
|
|
6623
|
+
options: { colorToken: unsafeAsOpaqueButtonColourToken("surfaceAlt") }
|
|
6624
|
+
}])
|
|
6625
|
+
}
|
|
6626
|
+
},
|
|
6627
|
+
outline: {
|
|
6628
|
+
kind: "complete",
|
|
6629
|
+
appearance: {
|
|
6630
|
+
background: {
|
|
6631
|
+
type: "surface",
|
|
6632
|
+
role: "link"
|
|
6633
|
+
},
|
|
6634
|
+
borderRadius: "rounded-lg",
|
|
6635
|
+
border: { widthClass: "border" },
|
|
6636
|
+
...hoverAppearance("outline", parameters, [lift, {
|
|
6637
|
+
effectId: "background-on-hover",
|
|
6638
|
+
options: { colorToken: unsafeAsOpaqueButtonColourToken("surfaceAlt") }
|
|
6639
|
+
}])
|
|
6640
|
+
}
|
|
6641
|
+
},
|
|
6642
|
+
ghost: {
|
|
6643
|
+
kind: "complete",
|
|
6644
|
+
appearance: {
|
|
6645
|
+
background: {
|
|
6646
|
+
type: "surface",
|
|
6647
|
+
role: "link"
|
|
6648
|
+
},
|
|
6649
|
+
borderRadius: "rounded-lg",
|
|
6650
|
+
...hoverAppearance("ghost", parameters, [lift])
|
|
6651
|
+
}
|
|
6652
|
+
},
|
|
6653
|
+
accent: {
|
|
6654
|
+
kind: "complete",
|
|
6655
|
+
appearance: {
|
|
6656
|
+
background: {
|
|
6657
|
+
type: "solid",
|
|
6658
|
+
colorToken: unsafeAsOpaqueButtonColourToken("accent")
|
|
6659
|
+
},
|
|
6660
|
+
borderRadius: "rounded-lg",
|
|
6661
|
+
affordance: { iconId: "ArrowRight" },
|
|
6662
|
+
...hoverAppearance("accent", parameters, [lift])
|
|
6663
|
+
}
|
|
6664
|
+
}
|
|
6665
|
+
}
|
|
6666
|
+
})
|
|
6667
|
+
});
|
|
6668
|
+
function hoverAppearance(role, parameters, recommended) {
|
|
6669
|
+
const preference = parameters.hoverPreferences?.[role];
|
|
6670
|
+
if (preference === void 0) return { effects: { hover: [...recommended] } };
|
|
6671
|
+
if (preference === "contextual") {
|
|
6672
|
+
const config = contextualRoleConfig[role];
|
|
6673
|
+
return {
|
|
6674
|
+
effects: { hover: [lift] },
|
|
6675
|
+
contextualHover: {
|
|
6676
|
+
kind: "shade-shift",
|
|
6677
|
+
seedToken: config.contextualSeedToken,
|
|
6678
|
+
fallbackDirection: config.fallbackDirection
|
|
6679
|
+
}
|
|
6680
|
+
};
|
|
6681
|
+
}
|
|
6682
|
+
const config = contextualRoleConfig[role];
|
|
6683
|
+
return {
|
|
6684
|
+
effects: { hover: [lift] },
|
|
6685
|
+
contextualHover: {
|
|
6686
|
+
kind: "shade-shift",
|
|
6687
|
+
seedToken: config.contextualSeedToken,
|
|
6688
|
+
fallbackDirection: config.fallbackDirection,
|
|
6689
|
+
preferredToken: unsafeAsOpaqueButtonColourToken(paletteRole(preference))
|
|
6690
|
+
}
|
|
6691
|
+
};
|
|
6692
|
+
}
|
|
6693
|
+
function paletteRole(preference) {
|
|
6694
|
+
return preference;
|
|
6695
|
+
}
|
|
6696
|
+
//#endregion
|
|
5820
6697
|
//#region ../theme-core/src/buttons/styles/recipes/defineStaticButtonStyleRecipe.ts
|
|
5821
6698
|
const emptyParametersSchema = z.object({}).strict();
|
|
5822
6699
|
function defineStaticButtonStyleRecipe(input) {
|
|
@@ -6663,113 +7540,6 @@ const inkStampRecipe = defineStaticButtonStyleRecipe({
|
|
|
6663
7540
|
}
|
|
6664
7541
|
}
|
|
6665
7542
|
});
|
|
6666
|
-
const flatInkRecipe = defineStaticButtonStyleRecipe({
|
|
6667
|
-
id: "flat-ink",
|
|
6668
|
-
accessibilityLabel: "Flat rounded buttons with arrow affordances",
|
|
6669
|
-
tags: {
|
|
6670
|
-
tone: "classic",
|
|
6671
|
-
energy: "calm",
|
|
6672
|
-
motion: "subtle",
|
|
6673
|
-
era: "editorial"
|
|
6674
|
-
},
|
|
6675
|
-
system: {
|
|
6676
|
-
global: {
|
|
6677
|
-
cornerStyle: "rounded",
|
|
6678
|
-
textTransform: "none",
|
|
6679
|
-
fontWeight: 600,
|
|
6680
|
-
typography: "body",
|
|
6681
|
-
letterSpacing: "tight",
|
|
6682
|
-
paddingPreset: "default",
|
|
6683
|
-
hoverTransform: "lift",
|
|
6684
|
-
hoverColor: "none"
|
|
6685
|
-
},
|
|
6686
|
-
sizes: {
|
|
6687
|
-
sm: {
|
|
6688
|
-
padding: "0.625rem 1.125rem",
|
|
6689
|
-
fontSize: "text-sm"
|
|
6690
|
-
},
|
|
6691
|
-
md: { padding: "0.8125rem 1.375rem" },
|
|
6692
|
-
lg: {
|
|
6693
|
-
padding: "0.9375rem 1.625rem",
|
|
6694
|
-
fontSize: "text-lg"
|
|
6695
|
-
},
|
|
6696
|
-
xl: {
|
|
6697
|
-
padding: "1.0625rem 2rem",
|
|
6698
|
-
fontSize: "text-xl"
|
|
6699
|
-
}
|
|
6700
|
-
},
|
|
6701
|
-
roles: {
|
|
6702
|
-
primary: {
|
|
6703
|
-
kind: "complete",
|
|
6704
|
-
appearance: {
|
|
6705
|
-
background: {
|
|
6706
|
-
type: "solid",
|
|
6707
|
-
colorToken: "primary"
|
|
6708
|
-
},
|
|
6709
|
-
borderRadius: "rounded-lg",
|
|
6710
|
-
affordance: { iconId: "ArrowRight" },
|
|
6711
|
-
effects: { hover: [{ effectId: "lift" }, {
|
|
6712
|
-
effectId: "background-on-hover",
|
|
6713
|
-
options: { colorToken: unsafeAsOpaqueButtonColourToken("secondary") }
|
|
6714
|
-
}] }
|
|
6715
|
-
}
|
|
6716
|
-
},
|
|
6717
|
-
secondary: {
|
|
6718
|
-
kind: "complete",
|
|
6719
|
-
appearance: {
|
|
6720
|
-
background: {
|
|
6721
|
-
type: "surface",
|
|
6722
|
-
role: "link"
|
|
6723
|
-
},
|
|
6724
|
-
borderRadius: "rounded-lg",
|
|
6725
|
-
border: { widthClass: "border" },
|
|
6726
|
-
effects: { hover: [{ effectId: "lift" }, {
|
|
6727
|
-
effectId: "background-on-hover",
|
|
6728
|
-
options: { colorToken: unsafeAsOpaqueButtonColourToken("surfaceAlt") }
|
|
6729
|
-
}] }
|
|
6730
|
-
}
|
|
6731
|
-
},
|
|
6732
|
-
outline: {
|
|
6733
|
-
kind: "complete",
|
|
6734
|
-
appearance: {
|
|
6735
|
-
background: {
|
|
6736
|
-
type: "surface",
|
|
6737
|
-
role: "link"
|
|
6738
|
-
},
|
|
6739
|
-
borderRadius: "rounded-lg",
|
|
6740
|
-
border: { widthClass: "border" },
|
|
6741
|
-
effects: { hover: [{ effectId: "lift" }, {
|
|
6742
|
-
effectId: "background-on-hover",
|
|
6743
|
-
options: { colorToken: unsafeAsOpaqueButtonColourToken("surfaceAlt") }
|
|
6744
|
-
}] }
|
|
6745
|
-
}
|
|
6746
|
-
},
|
|
6747
|
-
ghost: {
|
|
6748
|
-
kind: "complete",
|
|
6749
|
-
appearance: {
|
|
6750
|
-
background: {
|
|
6751
|
-
type: "surface",
|
|
6752
|
-
role: "link"
|
|
6753
|
-
},
|
|
6754
|
-
borderRadius: "rounded-lg",
|
|
6755
|
-
effects: { hover: [{ effectId: "lift" }] }
|
|
6756
|
-
}
|
|
6757
|
-
},
|
|
6758
|
-
accent: {
|
|
6759
|
-
kind: "complete",
|
|
6760
|
-
appearance: {
|
|
6761
|
-
background: {
|
|
6762
|
-
type: "solid",
|
|
6763
|
-
colorToken: "accent"
|
|
6764
|
-
},
|
|
6765
|
-
borderRadius: "rounded-lg",
|
|
6766
|
-
affordance: { iconId: "ArrowRight" },
|
|
6767
|
-
effects: { hover: [{ effectId: "lift" }] }
|
|
6768
|
-
}
|
|
6769
|
-
}
|
|
6770
|
-
}
|
|
6771
|
-
}
|
|
6772
|
-
});
|
|
6773
7543
|
const showtimePillRecipe = defineStaticButtonStyleRecipe({
|
|
6774
7544
|
id: "showtime-pill",
|
|
6775
7545
|
accessibilityLabel: "Bold uppercase pill buttons with playful movement",
|
|
@@ -7191,8 +7961,8 @@ const openCardRoleValue = "open";
|
|
|
7191
7961
|
*/
|
|
7192
7962
|
const surfaceCardRoleValues = [...cardVariantRoleValues, openCardRoleValue];
|
|
7193
7963
|
/**
|
|
7194
|
-
* The closed
|
|
7195
|
-
*
|
|
7964
|
+
* The closed role vocabulary Looks and blocks use for surfaced and boxless
|
|
7965
|
+
* card choices.
|
|
7196
7966
|
*
|
|
7197
7967
|
* - `none` — no site-style card surface; the block's own composition and
|
|
7198
7968
|
* the author's own card fields govern the item. This is *not*
|
|
@@ -7204,11 +7974,6 @@ const surfaceCardRoleValues = [...cardVariantRoleValues, openCardRoleValue];
|
|
|
7204
7974
|
* - `alternative` — the statement card carrying the site's personality
|
|
7205
7975
|
*/
|
|
7206
7976
|
const cardRoleValues = [...surfaceCardRoleValues, boxlessCardVariantValue];
|
|
7207
|
-
const legacyCardVariantRoleAliases = {
|
|
7208
|
-
variant1: "alternative",
|
|
7209
|
-
variant2: "alternative",
|
|
7210
|
-
statement: "alternative"
|
|
7211
|
-
};
|
|
7212
7977
|
const cardSpacingSchema = z.enum([
|
|
7213
7978
|
"none",
|
|
7214
7979
|
"compact",
|
|
@@ -7238,33 +8003,21 @@ const gradientDirectionSchema = z.enum([
|
|
|
7238
8003
|
"to-br",
|
|
7239
8004
|
"to-bl"
|
|
7240
8005
|
]);
|
|
7241
|
-
|
|
8006
|
+
z.enum(cardVariantRoleValues);
|
|
7242
8007
|
const surfaceCardRoleSchema = z.enum(surfaceCardRoleValues);
|
|
7243
8008
|
const cardRoleSchema = z.enum(cardRoleValues);
|
|
7244
|
-
/**
|
|
7245
|
-
* Historical name for the role vocabulary as it reaches box styles. Widened to
|
|
7246
|
-
* the full `CardRole` set — old values keep parsing, `open` now parses too.
|
|
7247
|
-
*/
|
|
7248
|
-
const boxStylesCardVariantSchema = cardRoleSchema;
|
|
7249
8009
|
function isCardVariantRole(value) {
|
|
7250
8010
|
return typeof value === "string" && cardVariantRoleValues.includes(value);
|
|
7251
8011
|
}
|
|
7252
8012
|
function normalizeCardVariantRole(value) {
|
|
7253
|
-
|
|
7254
|
-
if (typeof value !== "string") return null;
|
|
7255
|
-
return legacyCardVariantRoleAliases[value] ?? null;
|
|
8013
|
+
return isCardVariantRole(value) ? value : null;
|
|
7256
8014
|
}
|
|
7257
|
-
/**
|
|
7258
|
-
* The one untrusted-input boundary for the role vocabulary. Legacy alias values
|
|
7259
|
-
* (`variant1`, `variant2`, `statement`) normalize here and nowhere else.
|
|
7260
|
-
*/
|
|
8015
|
+
/** The one untrusted-input boundary for the closed role vocabulary. */
|
|
7261
8016
|
function normalizeCardRole(value) {
|
|
7262
8017
|
if (value === "none") return boxlessCardVariantValue;
|
|
7263
8018
|
if (value === "open") return openCardRoleValue;
|
|
7264
8019
|
return normalizeCardVariantRole(value);
|
|
7265
8020
|
}
|
|
7266
|
-
/** Historical name for {@link normalizeCardRole}. */
|
|
7267
|
-
const normalizeBoxStylesCardVariant = normalizeCardRole;
|
|
7268
8021
|
const PRIORITY_ROLE_INFERENCE = {
|
|
7269
8022
|
1: "default",
|
|
7270
8023
|
2: "alternative"
|
|
@@ -8209,6 +8962,21 @@ const eventListTreatmentValues = [
|
|
|
8209
8962
|
"editorial-register",
|
|
8210
8963
|
"dense-index"
|
|
8211
8964
|
];
|
|
8965
|
+
const testimonialsCompositionTreatmentValues = [
|
|
8966
|
+
"open-editorial",
|
|
8967
|
+
"evergreen-lead",
|
|
8968
|
+
"room-and-response",
|
|
8969
|
+
"open-floor"
|
|
8970
|
+
];
|
|
8971
|
+
/**
|
|
8972
|
+
* How an offerings preview arranges its groups. Structure only — the group
|
|
8973
|
+
* card surface is the Look's `cardRole` and the site style's card system.
|
|
8974
|
+
*/
|
|
8975
|
+
const offeringsPreviewCompositionTreatmentValues = [
|
|
8976
|
+
"paired-feature-cards",
|
|
8977
|
+
"open-editorial-columns",
|
|
8978
|
+
"joined-programme-panel"
|
|
8979
|
+
];
|
|
8212
8980
|
const eyebrowTreatmentValues = [
|
|
8213
8981
|
"plain",
|
|
8214
8982
|
"accent",
|
|
@@ -8742,8 +9510,7 @@ const cardStylesOverrideSchema = z.object({
|
|
|
8742
9510
|
spacing: semanticSpacingSchema.nullable().optional(),
|
|
8743
9511
|
raised: z.boolean().nullable().optional(),
|
|
8744
9512
|
rounded: boxRoundedSchema.nullable().optional(),
|
|
8745
|
-
role: cardRoleSchema.nullable().optional()
|
|
8746
|
-
cardVariant: boxStylesCardVariantSchema.nullable().optional()
|
|
9513
|
+
role: cardRoleSchema.nullable().optional()
|
|
8747
9514
|
});
|
|
8748
9515
|
const blockStyleOverridesSchema = z.object({
|
|
8749
9516
|
sectionStyles: sectionStylesOverrideSchema.nullable().optional(),
|
|
@@ -9632,7 +10399,12 @@ defineBlockAppearancePreset({
|
|
|
9632
10399
|
constraints: { layoutVariantKeys: ["cards"] },
|
|
9633
10400
|
design: {
|
|
9634
10401
|
sectionSurface: "base",
|
|
9635
|
-
contentFrame: plainFrame
|
|
10402
|
+
contentFrame: plainFrame,
|
|
10403
|
+
cardRole: "alternative",
|
|
10404
|
+
composition: {
|
|
10405
|
+
kind: "offerings-preview",
|
|
10406
|
+
treatment: "paired-feature-cards"
|
|
10407
|
+
}
|
|
9636
10408
|
}
|
|
9637
10409
|
}), defineBlockAppearancePreset({
|
|
9638
10410
|
id: "offerings-preview-open-editorial-columns",
|
|
@@ -9642,7 +10414,12 @@ defineBlockAppearancePreset({
|
|
|
9642
10414
|
constraints: { layoutVariantKeys: ["cards"] },
|
|
9643
10415
|
design: {
|
|
9644
10416
|
sectionSurface: "base",
|
|
9645
|
-
contentFrame: plainFrame
|
|
10417
|
+
contentFrame: plainFrame,
|
|
10418
|
+
cardRole: "open",
|
|
10419
|
+
composition: {
|
|
10420
|
+
kind: "offerings-preview",
|
|
10421
|
+
treatment: "open-editorial-columns"
|
|
10422
|
+
}
|
|
9646
10423
|
}
|
|
9647
10424
|
}), defineBlockAppearancePreset({
|
|
9648
10425
|
id: "offerings-preview-joined-programme-panel",
|
|
@@ -9652,7 +10429,12 @@ defineBlockAppearancePreset({
|
|
|
9652
10429
|
constraints: { layoutVariantKeys: ["cards"] },
|
|
9653
10430
|
design: {
|
|
9654
10431
|
sectionSurface: "base",
|
|
9655
|
-
contentFrame: plainFrame
|
|
10432
|
+
contentFrame: plainFrame,
|
|
10433
|
+
cardRole: "default",
|
|
10434
|
+
composition: {
|
|
10435
|
+
kind: "offerings-preview",
|
|
10436
|
+
treatment: "joined-programme-panel"
|
|
10437
|
+
}
|
|
9656
10438
|
}
|
|
9657
10439
|
}), defineBlockAppearancePreset({
|
|
9658
10440
|
id: "feature-cards-raised-rule",
|
|
@@ -9894,7 +10676,11 @@ defineBlockAppearancePreset({
|
|
|
9894
10676
|
constraints: { layoutVariantKeys: ["featured-editorial"] },
|
|
9895
10677
|
design: {
|
|
9896
10678
|
sectionSurface: "base",
|
|
9897
|
-
contentFrame: plainFrame
|
|
10679
|
+
contentFrame: plainFrame,
|
|
10680
|
+
composition: {
|
|
10681
|
+
kind: "testimonials",
|
|
10682
|
+
treatment: "evergreen-lead"
|
|
10683
|
+
}
|
|
9898
10684
|
}
|
|
9899
10685
|
}), defineBlockAppearancePreset({
|
|
9900
10686
|
id: "testimonials-room-and-response",
|
|
@@ -9904,7 +10690,11 @@ defineBlockAppearancePreset({
|
|
|
9904
10690
|
constraints: { layoutVariantKeys: ["featured-editorial"] },
|
|
9905
10691
|
design: {
|
|
9906
10692
|
sectionSurface: "base",
|
|
9907
|
-
contentFrame: plainFrame
|
|
10693
|
+
contentFrame: plainFrame,
|
|
10694
|
+
composition: {
|
|
10695
|
+
kind: "testimonials",
|
|
10696
|
+
treatment: "room-and-response"
|
|
10697
|
+
}
|
|
9908
10698
|
}
|
|
9909
10699
|
}), defineBlockAppearancePreset({
|
|
9910
10700
|
id: "testimonials-open-floor",
|
|
@@ -9914,7 +10704,11 @@ defineBlockAppearancePreset({
|
|
|
9914
10704
|
constraints: { layoutVariantKeys: ["featured-editorial"] },
|
|
9915
10705
|
design: {
|
|
9916
10706
|
sectionSurface: "base",
|
|
9917
|
-
contentFrame: plainFrame
|
|
10707
|
+
contentFrame: plainFrame,
|
|
10708
|
+
composition: {
|
|
10709
|
+
kind: "testimonials",
|
|
10710
|
+
treatment: "open-floor"
|
|
10711
|
+
}
|
|
9918
10712
|
}
|
|
9919
10713
|
}), defineBlockAppearancePreset({
|
|
9920
10714
|
id: "faq-base-accordion",
|
|
@@ -12941,7 +13735,8 @@ const curatedSiteStyles = [
|
|
|
12941
13735
|
buttonStyleChoices: [
|
|
12942
13736
|
buttonChoice("soft-pill"),
|
|
12943
13737
|
buttonChoice("pebble"),
|
|
12944
|
-
buttonChoice("confident-chip")
|
|
13738
|
+
buttonChoice("confident-chip"),
|
|
13739
|
+
buttonChoice("flat-ink")
|
|
12945
13740
|
],
|
|
12946
13741
|
paletteRecommendations: [
|
|
12947
13742
|
paletteRecommendation("soft-natural-sage"),
|
|
@@ -15786,8 +16581,41 @@ function containerStylesField(options = {}) {
|
|
|
15786
16581
|
return createBoxStylesFieldWithDepth("container", options);
|
|
15787
16582
|
}
|
|
15788
16583
|
function cardStylesField(options = {}) {
|
|
16584
|
+
if (options.controls === "role-only") return createRoleOnlyCardStylesField(options);
|
|
15789
16585
|
return createBoxStylesFieldWithDepth("card", options);
|
|
15790
16586
|
}
|
|
16587
|
+
function createRoleOnlyCardStylesField(options) {
|
|
16588
|
+
const { id = "_cardStyles", label = "Card styles", renderInHeader, intent } = options;
|
|
16589
|
+
return {
|
|
16590
|
+
id,
|
|
16591
|
+
type: "modal",
|
|
16592
|
+
label,
|
|
16593
|
+
required: false,
|
|
16594
|
+
schema: { fields: [{
|
|
16595
|
+
id: "role",
|
|
16596
|
+
type: "select",
|
|
16597
|
+
label: "Card style",
|
|
16598
|
+
description: "Choose a semantic card style from the active site style.",
|
|
16599
|
+
required: false,
|
|
16600
|
+
multiple: false,
|
|
16601
|
+
defaultValue: "default",
|
|
16602
|
+
options: cardVariantRoleValues.map((value) => ({
|
|
16603
|
+
value,
|
|
16604
|
+
label: value === "default" ? "Default" : "Alternative"
|
|
16605
|
+
}))
|
|
16606
|
+
}] },
|
|
16607
|
+
ui: {
|
|
16608
|
+
...typeof renderInHeader === "boolean" ? { renderInHeader } : {},
|
|
16609
|
+
...intent ? { intent } : {},
|
|
16610
|
+
modalConfig: {
|
|
16611
|
+
buttonLabel: label,
|
|
16612
|
+
description: "Choose the site-style card role.",
|
|
16613
|
+
buttonVariant: "outline",
|
|
16614
|
+
showCustomizedIndicator: true
|
|
16615
|
+
}
|
|
16616
|
+
}
|
|
16617
|
+
};
|
|
16618
|
+
}
|
|
15791
16619
|
//#endregion
|
|
15792
16620
|
//#region ../blocks/src/system/fields/imageShape.ts
|
|
15793
16621
|
const standardImageShapeOptions = [
|
|
@@ -16983,21 +17811,29 @@ function cardRoleClass(role) {
|
|
|
16983
17811
|
return `card-role-${role}`;
|
|
16984
17812
|
}
|
|
16985
17813
|
/**
|
|
17814
|
+
* The role class for a card slot the *block* owns structurally, where a Look
|
|
17815
|
+
* may still name the surface.
|
|
17816
|
+
*
|
|
17817
|
+
* Some layouts have more than one card slot and decide themselves which one is
|
|
17818
|
+
* the statement — the featured-editorial testimonials field is a lead voice
|
|
17819
|
+
* beside its supporting voices, and that is structure, not composition. Those
|
|
17820
|
+
* slots still have to honour a Look that picks a surface, or a role-picking
|
|
17821
|
+
* Look would silently no-op under the layout. So the slot carries a default
|
|
17822
|
+
* role and the Look's compiled role wins over it when there is one.
|
|
17823
|
+
*
|
|
17824
|
+
* An explicit `none` is honoured as boxlessness and emits no class, matching
|
|
17825
|
+
* how the composite emitter reads it.
|
|
17826
|
+
*/
|
|
17827
|
+
/**
|
|
16986
17828
|
* The role a card renders with, and the one place a set of card styles becomes
|
|
16987
17829
|
* a role.
|
|
16988
17830
|
*
|
|
16989
|
-
* Precedence: a per-item override, then the `role` a Look
|
|
16990
|
-
* block's card styles
|
|
16991
|
-
*
|
|
16992
|
-
* vocabulary — an explicit `role` wins when a record carries both.
|
|
16993
|
-
*
|
|
16994
|
-
* Compiled and freshly authored card styles carry only `role`. `cardVariant`
|
|
16995
|
-
* survives on content persisted before the role contract, and normalizes here
|
|
16996
|
-
* rather than in `cardStylesOverrideSchema` because that content reaches the
|
|
16997
|
-
* renderer as a raw record without ever passing through the schema.
|
|
17831
|
+
* Precedence: a per-item override, then the `role` a Look or semantic field
|
|
17832
|
+
* compiled onto the block's card styles. Persisted inputs are normalized at
|
|
17833
|
+
* this boundary because raw block records do not pass through the theme schema.
|
|
16998
17834
|
*/
|
|
16999
17835
|
function resolveCardRoleForBoxStyles(input, override) {
|
|
17000
|
-
return override ?? normalizeCardRole(input.role)
|
|
17836
|
+
return override ?? normalizeCardRole(input.role);
|
|
17001
17837
|
}
|
|
17002
17838
|
/**
|
|
17003
17839
|
* Parse a block's own per-item surface vocabulary into a card role. The alias
|
|
@@ -17014,8 +17850,8 @@ function resolveItemCardRole(value, aliases) {
|
|
|
17014
17850
|
* The card surface for a set of box styles: one role, one class vocabulary, so
|
|
17015
17851
|
* a site-style swap re-skins the card whichever field named it.
|
|
17016
17852
|
*/
|
|
17017
|
-
function cardSurface(input, override) {
|
|
17018
|
-
const role = resolveCardRoleForBoxStyles(input, override);
|
|
17853
|
+
function cardSurface(input, override, fallback) {
|
|
17854
|
+
const role = resolveCardRoleForBoxStyles(input, override) ?? fallback ?? null;
|
|
17019
17855
|
if (!role) return {
|
|
17020
17856
|
role: null,
|
|
17021
17857
|
classes: []
|
|
@@ -17112,10 +17948,9 @@ function raisedClassFor(options) {
|
|
|
17112
17948
|
* of keeping a copy that drifts.
|
|
17113
17949
|
*/
|
|
17114
17950
|
function boxStyleClassNames(value, options) {
|
|
17115
|
-
|
|
17116
|
-
const input = value;
|
|
17951
|
+
const input = value && typeof value === "object" ? value : {};
|
|
17117
17952
|
const borderOverride = borderOverrideClass(input);
|
|
17118
|
-
const surface = cardSurface(input, options.cardRoleOverride);
|
|
17953
|
+
const surface = cardSurface(input, options.cardRoleOverride, options.cardRoleFallback);
|
|
17119
17954
|
const cardOwnsBorder = surface.role !== null && surface.role !== "none";
|
|
17120
17955
|
return [
|
|
17121
17956
|
borderOverride || cardOwnsBorder ? withoutBorderClasses(options.baseClass ?? "") : options.baseClass ?? "",
|
|
@@ -17263,29 +18098,41 @@ const cardRoleClassTransform = {
|
|
|
17263
18098
|
return baseClass ? `${baseClass.trim()} ${hook}` : hook;
|
|
17264
18099
|
}
|
|
17265
18100
|
};
|
|
17266
|
-
|
|
17267
|
-
|
|
18101
|
+
/**
|
|
18102
|
+
* The role class for a layout's own card slot, bound from the block's compiled
|
|
18103
|
+
* card styles so a Look that picks a surface still reaches a slot the layout
|
|
18104
|
+
* assigned a default role to.
|
|
18105
|
+
*/
|
|
18106
|
+
const cardSlotRoleTransform = {
|
|
18107
|
+
id: "boxStyles.cardSlotRole",
|
|
17268
18108
|
kind: "string",
|
|
17269
|
-
summary: "
|
|
17270
|
-
run: (value, options) => {
|
|
17271
|
-
|
|
17272
|
-
|
|
17273
|
-
|
|
17274
|
-
|
|
17275
|
-
return baseClass ? `${baseClass} ${roleClass}` : roleClass;
|
|
17276
|
-
}
|
|
18109
|
+
summary: "Resolve a layout card slot's role class, defaulting to the slot's own role",
|
|
18110
|
+
run: (value, options) => boxStyleClassNames(value, {
|
|
18111
|
+
baseClass: options?.baseClass,
|
|
18112
|
+
cardRoleFallback: options.slotDefault,
|
|
18113
|
+
includeSpacing: false
|
|
18114
|
+
})
|
|
17277
18115
|
};
|
|
18116
|
+
function resolveBorderColorState(value, options, viewModel) {
|
|
18117
|
+
const input = asPartialObject(options?.stylesPath ? readPath(viewModel, options.stylesPath) : value);
|
|
18118
|
+
if (!input) return null;
|
|
18119
|
+
return {
|
|
18120
|
+
input,
|
|
18121
|
+
role: resolveCardRoleForBoxStyles(input, options?.stylesPath ? resolveItemCardRole(value, options.itemRoleAliases) : void 0)
|
|
18122
|
+
};
|
|
18123
|
+
}
|
|
17278
18124
|
const boxStylesBorderColorTransform = {
|
|
17279
18125
|
id: "boxStyles.borderColor",
|
|
17280
18126
|
kind: "string",
|
|
17281
18127
|
summary: "Resolve border color from box styles border.colorToken",
|
|
17282
|
-
run: (value, options,
|
|
18128
|
+
run: (value, options, context) => {
|
|
17283
18129
|
const fallbackToken = options?.fallbackToken ?? "border";
|
|
17284
18130
|
const returnEmptyForDefault = options?.returnEmptyForDefault ?? false;
|
|
17285
18131
|
let explicitToken = null;
|
|
17286
|
-
const
|
|
17287
|
-
if (
|
|
17288
|
-
|
|
18132
|
+
const state = resolveBorderColorState(value, options, context.viewModel);
|
|
18133
|
+
if (state) {
|
|
18134
|
+
if (state.role && state.role !== "none") return "";
|
|
18135
|
+
const border = normalizeBoxStylesBorder(state.input.border);
|
|
17289
18136
|
if (border && border.enabled === true && border.colorToken) explicitToken = border.colorToken;
|
|
17290
18137
|
}
|
|
17291
18138
|
if (explicitToken) {
|
|
@@ -17501,7 +18348,7 @@ const boxStylesTransforms = [
|
|
|
17501
18348
|
roundedTransform,
|
|
17502
18349
|
boxStylesCompositeTransform,
|
|
17503
18350
|
cardRoleClassTransform,
|
|
17504
|
-
|
|
18351
|
+
cardSlotRoleTransform,
|
|
17505
18352
|
boxStylesBorderColorTransform,
|
|
17506
18353
|
sectionClassNameTransform,
|
|
17507
18354
|
containerStylesResolveClassName,
|
|
@@ -17608,10 +18455,16 @@ function styledCard(children, opts, ...mods) {
|
|
|
17608
18455
|
const style = {
|
|
17609
18456
|
...opts.style ?? {},
|
|
17610
18457
|
borderColor: { $bind: {
|
|
17611
|
-
from: opts.stylesFrom,
|
|
18458
|
+
from: opts.itemRole?.from ?? opts.stylesFrom,
|
|
17612
18459
|
transforms: [{
|
|
17613
18460
|
id: "boxStyles.borderColor",
|
|
17614
|
-
options: {
|
|
18461
|
+
options: {
|
|
18462
|
+
returnEmptyForDefault: true,
|
|
18463
|
+
...opts.itemRole ? {
|
|
18464
|
+
stylesPath: opts.stylesFrom,
|
|
18465
|
+
...opts.itemRole.aliases ? { itemRoleAliases: opts.itemRole.aliases } : {}
|
|
18466
|
+
} : {}
|
|
18467
|
+
}
|
|
17615
18468
|
}]
|
|
17616
18469
|
} }
|
|
17617
18470
|
};
|
|
@@ -18736,18 +19589,73 @@ function buildGridCardsLayout(className) {
|
|
|
18736
19589
|
return el("div", { className }, buildResponsiveGridCards());
|
|
18737
19590
|
}
|
|
18738
19591
|
/**
|
|
19592
|
+
* The card slots the featured-editorial layout has, and the role each one
|
|
19593
|
+
* defaults to.
|
|
19594
|
+
*
|
|
19595
|
+
* Which slot is the statement is *structure*, so the layout decides it: this
|
|
19596
|
+
* variant exists to put one lead voice beside its supporting voices. But a Look
|
|
19597
|
+
* that picks a surface has to keep meaning something here, so the lead slot's
|
|
19598
|
+
* role is a default the Look's compiled `cardRole` wins over — see
|
|
19599
|
+
* `cardSlotRoleClass`. Supporting voices stay the quiet everyday card.
|
|
19600
|
+
*/
|
|
19601
|
+
const FEATURED_EDITORIAL_SLOTS = {
|
|
19602
|
+
lead: {
|
|
19603
|
+
/** Composition CSS addresses the lead card's geometry through this. */
|
|
19604
|
+
variantClass: "rb-testimonials-fe-card--feature",
|
|
19605
|
+
slotDefault: "alternative",
|
|
19606
|
+
followsLook: true
|
|
19607
|
+
},
|
|
19608
|
+
support: {
|
|
19609
|
+
variantClass: null,
|
|
19610
|
+
slotDefault: "default",
|
|
19611
|
+
followsLook: false
|
|
19612
|
+
}
|
|
19613
|
+
};
|
|
19614
|
+
/** Where the testimonials block's compiled card styles live. */
|
|
19615
|
+
const TESTIMONIALS_CARD_STYLES_PATH = "content._cardStyles";
|
|
19616
|
+
/**
|
|
19617
|
+
* The class list for one featured-editorial card slot.
|
|
19618
|
+
*
|
|
19619
|
+
* A slot that follows the Look has to resolve at render time, so it binds
|
|
19620
|
+
* through the shared card-class emitter rather than naming a role class here;
|
|
19621
|
+
* a slot that does not is a plain string built by the same composite emitter.
|
|
19622
|
+
*/
|
|
19623
|
+
function featuredEditorialCardClassName(slot) {
|
|
19624
|
+
const { variantClass, slotDefault, followsLook } = FEATURED_EDITORIAL_SLOTS[slot];
|
|
19625
|
+
const baseClass = ["rb-testimonials-fe-card", variantClass].filter(Boolean).join(" ");
|
|
19626
|
+
if (!followsLook) return boxStyleClassNames({}, {
|
|
19627
|
+
baseClass,
|
|
19628
|
+
cardRoleFallback: slotDefault,
|
|
19629
|
+
includeSpacing: false
|
|
19630
|
+
});
|
|
19631
|
+
return { $bind: {
|
|
19632
|
+
from: TESTIMONIALS_CARD_STYLES_PATH,
|
|
19633
|
+
transforms: [{
|
|
19634
|
+
id: "boxStyles.cardSlotRole",
|
|
19635
|
+
options: {
|
|
19636
|
+
baseClass,
|
|
19637
|
+
slotDefault
|
|
19638
|
+
}
|
|
19639
|
+
}],
|
|
19640
|
+
fallback: boxStyleClassNames({}, {
|
|
19641
|
+
baseClass,
|
|
19642
|
+
cardRoleFallback: slotDefault,
|
|
19643
|
+
includeSpacing: false
|
|
19644
|
+
})
|
|
19645
|
+
} };
|
|
19646
|
+
}
|
|
19647
|
+
/**
|
|
18739
19648
|
* Build a single "featured editorial" testimonial card.
|
|
18740
19649
|
*
|
|
18741
|
-
* This card type deliberately renders NO avatar/headshot:
|
|
18742
|
-
*
|
|
18743
|
-
*
|
|
18744
|
-
*
|
|
18745
|
-
* - `rb-testimonials-fe-card--plain` → white surface card
|
|
19650
|
+
* This card type deliberately renders NO avatar/headshot: a quote mark, the
|
|
19651
|
+
* quote body, then the author name and a context line. The card surface comes
|
|
19652
|
+
* from the slot's card role — the site style owns the fill, border, corners and
|
|
19653
|
+
* padding.
|
|
18746
19654
|
*
|
|
18747
19655
|
* Extra modifiers (`repeat`, `when`) are forwarded to the card node so the
|
|
18748
19656
|
* caller can drive first-vs-rest branching.
|
|
18749
19657
|
*/
|
|
18750
|
-
function buildFeaturedEditorialCard(
|
|
19658
|
+
function buildFeaturedEditorialCard(slot, ...mods) {
|
|
18751
19659
|
const quoteMark = text({
|
|
18752
19660
|
as: "span",
|
|
18753
19661
|
className: "rb-testimonials-fe-qmark",
|
|
@@ -18761,11 +19669,11 @@ function buildFeaturedEditorialCard(variantClass, ...mods) {
|
|
|
18761
19669
|
as: "span",
|
|
18762
19670
|
className: "rb-testimonials-fe-context"
|
|
18763
19671
|
}, when("testimonial.content.jobTitle"), bind("testimonial.content.jobTitle"))]);
|
|
18764
|
-
return el("div", { className:
|
|
19672
|
+
return el("div", { className: featuredEditorialCardClassName(slot) }, [el("div", { className: "card-content rb-testimonials-fe-card-body" }, [
|
|
18765
19673
|
quoteMark,
|
|
18766
19674
|
quote,
|
|
18767
19675
|
meta
|
|
18768
|
-
], ...mods);
|
|
19676
|
+
])], ...mods);
|
|
18769
19677
|
}
|
|
18770
19678
|
/**
|
|
18771
19679
|
* Build the "featured editorial" layout: an asymmetric two-column arrangement
|
|
@@ -18779,7 +19687,7 @@ function buildFeaturedEditorialCard(variantClass, ...mods) {
|
|
|
18779
19687
|
* index scope in context, so entry 0 produces no node in the rest column.
|
|
18780
19688
|
*/
|
|
18781
19689
|
function buildFeaturedEditorialLayout() {
|
|
18782
|
-
return el("div", { className: "rb-testimonials-fe-grid" }, [buildFeaturedEditorialCard("
|
|
19690
|
+
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", {
|
|
18783
19691
|
equals: 0,
|
|
18784
19692
|
not: true
|
|
18785
19693
|
}))])]);
|
|
@@ -19506,7 +20414,7 @@ const newsletterFormFragment = defineFragment({
|
|
|
19506
20414
|
});
|
|
19507
20415
|
//#endregion
|
|
19508
20416
|
//#region ../blocks/src/system/fragments/library/card.ts
|
|
19509
|
-
const cardVariantOptions
|
|
20417
|
+
const cardVariantOptions = cardVariantRoleValues.map((value) => ({
|
|
19510
20418
|
value,
|
|
19511
20419
|
label: value === "default" ? "Default" : "Alternative"
|
|
19512
20420
|
}));
|
|
@@ -19604,7 +20512,7 @@ const cardFragment = defineFragment({
|
|
|
19604
20512
|
description: "Choose a card style from your theme",
|
|
19605
20513
|
required: false,
|
|
19606
20514
|
defaultValue: "default",
|
|
19607
|
-
options: cardVariantOptions
|
|
20515
|
+
options: cardVariantOptions,
|
|
19608
20516
|
ui: { intent: "style" }
|
|
19609
20517
|
}
|
|
19610
20518
|
],
|
|
@@ -19613,7 +20521,10 @@ const cardFragment = defineFragment({
|
|
|
19613
20521
|
className: { $bind: {
|
|
19614
20522
|
from: "variant",
|
|
19615
20523
|
fallback: "default",
|
|
19616
|
-
transforms: [{
|
|
20524
|
+
transforms: [{
|
|
20525
|
+
id: "boxStyles.cardRoleClass",
|
|
20526
|
+
options: { baseClass: "" }
|
|
20527
|
+
}]
|
|
19617
20528
|
} }
|
|
19618
20529
|
}, [media({
|
|
19619
20530
|
className: "card-media rb-w-full rb-h-auto rb-object-cover",
|
|
@@ -25569,19 +26480,13 @@ const blockBookingPaymentCollectionOptionSchema = z.union([
|
|
|
25569
26480
|
]);
|
|
25570
26481
|
const blockBookingPaymentTermsSchema = z.object({ allowedOptions: z.array(blockBookingPaymentCollectionOptionSchema).min(1) });
|
|
25571
26482
|
//#endregion
|
|
25572
|
-
//#region ../blocks/src/system/blocks/
|
|
25573
|
-
|
|
25574
|
-
* Zod schema for course venue data
|
|
25575
|
-
*/
|
|
25576
|
-
const courseVenueSchema = z.object({
|
|
26483
|
+
//#region ../blocks/src/system/blocks/events/whole-series/schemas.ts
|
|
26484
|
+
const wholeSeriesVenueSchema = z.object({
|
|
25577
26485
|
id: z.string(),
|
|
25578
26486
|
name: z.string(),
|
|
25579
26487
|
address: z.string().nullable()
|
|
25580
26488
|
});
|
|
25581
|
-
|
|
25582
|
-
* Zod schema for course session (occurrence) data
|
|
25583
|
-
*/
|
|
25584
|
-
const courseSessionSchema = z.object({
|
|
26489
|
+
const wholeSeriesSessionSchema = z.object({
|
|
25585
26490
|
id: z.string(),
|
|
25586
26491
|
startsAt: z.string(),
|
|
25587
26492
|
endsAt: z.string(),
|
|
@@ -25589,14 +26494,14 @@ const courseSessionSchema = z.object({
|
|
|
25589
26494
|
capacityOverride: z.number().nullable().optional(),
|
|
25590
26495
|
overrides: z.record(z.string(), z.unknown()).nullable().optional()
|
|
25591
26496
|
});
|
|
25592
|
-
const
|
|
26497
|
+
const wholeSeriesTeamMemberSummarySchema = z.object({
|
|
25593
26498
|
id: z.string(),
|
|
25594
26499
|
name: z.string(),
|
|
25595
26500
|
roleLabel: z.string().nullable(),
|
|
25596
26501
|
summary: z.string().nullable(),
|
|
25597
26502
|
profilePath: z.string().nullable()
|
|
25598
26503
|
});
|
|
25599
|
-
const
|
|
26504
|
+
const wholeSeriesPricingOptionSchema = z.object({
|
|
25600
26505
|
id: z.string(),
|
|
25601
26506
|
name: z.string(),
|
|
25602
26507
|
description: z.string().nullable(),
|
|
@@ -25612,7 +26517,7 @@ const coursePricingOptionSchema = z.object({
|
|
|
25612
26517
|
"both"
|
|
25613
26518
|
]).nullable().optional()
|
|
25614
26519
|
});
|
|
25615
|
-
const
|
|
26520
|
+
const wholeSeriesPricingSchema = z.object({
|
|
25616
26521
|
bookingRequirement: z.enum(["none", "required"]),
|
|
25617
26522
|
pricingStrategy: z.enum([
|
|
25618
26523
|
"free",
|
|
@@ -25626,20 +26531,17 @@ const coursePricingSchema = z.object({
|
|
|
25626
26531
|
slidingMaxAmount: z.number().nullable().optional(),
|
|
25627
26532
|
slidingSuggestedAmount: z.number().nullable().optional(),
|
|
25628
26533
|
paymentTerms: blockBookingPaymentTermsSchema,
|
|
25629
|
-
options: z.array(
|
|
26534
|
+
options: z.array(wholeSeriesPricingOptionSchema)
|
|
25630
26535
|
});
|
|
25631
|
-
/**
|
|
25632
|
-
* Zod schema for public course data
|
|
25633
|
-
*/
|
|
25634
26536
|
const publicWholeSeriesOfferingSchema = z.object({
|
|
25635
26537
|
eventSeriesId: z.string(),
|
|
25636
26538
|
eventOfferingId: z.string(),
|
|
25637
26539
|
title: z.string(),
|
|
25638
26540
|
slug: z.string(),
|
|
25639
26541
|
description: z.unknown().nullable(),
|
|
25640
|
-
teamMembers: z.array(
|
|
26542
|
+
teamMembers: z.array(wholeSeriesTeamMemberSummarySchema).optional(),
|
|
25641
26543
|
enrollmentOpen: z.boolean(),
|
|
25642
|
-
pricing:
|
|
26544
|
+
pricing: wholeSeriesPricingSchema,
|
|
25643
26545
|
currency: z.string(),
|
|
25644
26546
|
paymentTerms: blockBookingPaymentTermsSchema,
|
|
25645
26547
|
enrollmentCapacity: z.number().nullable(),
|
|
@@ -25652,12 +26554,10 @@ const publicWholeSeriesOfferingSchema = z.object({
|
|
|
25652
26554
|
sessionsCount: z.number(),
|
|
25653
26555
|
enrolledCount: z.number(),
|
|
25654
26556
|
availableSpots: z.number().nullable(),
|
|
25655
|
-
sessions: z.array(
|
|
25656
|
-
venue:
|
|
26557
|
+
sessions: z.array(wholeSeriesSessionSchema),
|
|
26558
|
+
venue: wholeSeriesVenueSchema.nullable()
|
|
25657
26559
|
});
|
|
25658
|
-
|
|
25659
|
-
const publicCourseSchema = publicWholeSeriesOfferingSchema;
|
|
25660
|
-
const publicCoursesArraySchema = z.array(publicWholeSeriesOfferingSchema);
|
|
26560
|
+
const publicWholeSeriesOfferingsArraySchema = z.array(publicWholeSeriesOfferingSchema);
|
|
25661
26561
|
//#endregion
|
|
25662
26562
|
//#region ../blocks/src/system/blocks/events/shared/schemas.ts
|
|
25663
26563
|
const eventPresetSchema = z.enum([
|
|
@@ -25968,7 +26868,7 @@ const publicEventSchema = z.object({
|
|
|
25968
26868
|
acceptsMemberships: z.boolean().optional(),
|
|
25969
26869
|
wholeSeries: z.object({
|
|
25970
26870
|
eventSeriesId: z.string(),
|
|
25971
|
-
pricing:
|
|
26871
|
+
pricing: wholeSeriesPricingSchema,
|
|
25972
26872
|
currency: z.string(),
|
|
25973
26873
|
enrollmentOpen: z.boolean()
|
|
25974
26874
|
}).nullable().optional()
|
|
@@ -25977,24 +26877,19 @@ const publicEventSchema = z.object({
|
|
|
25977
26877
|
* Schema for an array of public events
|
|
25978
26878
|
*/
|
|
25979
26879
|
const publicEventsArraySchema = z.array(publicEventSchema);
|
|
26880
|
+
//#endregion
|
|
26881
|
+
//#region ../blocks/src/system/blocks/events/shared/fields.ts
|
|
25980
26882
|
/**
|
|
25981
26883
|
* Shared card styling fields for event blocks
|
|
25982
26884
|
*/
|
|
25983
26885
|
const cardStylingFields = [
|
|
25984
|
-
{
|
|
25985
|
-
id: "
|
|
25986
|
-
type: "select",
|
|
26886
|
+
cardStylesField({
|
|
26887
|
+
id: "_cardStyles",
|
|
25987
26888
|
label: "Card style",
|
|
25988
|
-
|
|
25989
|
-
|
|
25990
|
-
|
|
25991
|
-
|
|
25992
|
-
options: cardVariantRoleValues.map((value) => ({
|
|
25993
|
-
value,
|
|
25994
|
-
label: value === "default" ? "Default" : "Alternative"
|
|
25995
|
-
})),
|
|
25996
|
-
ui: { intent: "style" }
|
|
25997
|
-
},
|
|
26889
|
+
controls: "role-only",
|
|
26890
|
+
renderInHeader: false,
|
|
26891
|
+
intent: "style"
|
|
26892
|
+
}),
|
|
25998
26893
|
createButtonVariantField({ description: "Choose a button style from your theme" }),
|
|
25999
26894
|
{
|
|
26000
26895
|
id: "buttonText",
|
|
@@ -26133,14 +27028,7 @@ function normalizeIdList(parts) {
|
|
|
26133
27028
|
}
|
|
26134
27029
|
//#endregion
|
|
26135
27030
|
//#region ../blocks/src/system/blocks/events/shared/filtering.ts
|
|
26136
|
-
const eventSurfacePresetValues =
|
|
26137
|
-
"course",
|
|
26138
|
-
"term",
|
|
26139
|
-
"class",
|
|
26140
|
-
"workshop",
|
|
26141
|
-
"retreat",
|
|
26142
|
-
"performance"
|
|
26143
|
-
];
|
|
27031
|
+
const eventSurfacePresetValues = SURFACE_EVENT_PRESET_VALUES;
|
|
26144
27032
|
const eventSurfaceScopeValues = [
|
|
26145
27033
|
"all",
|
|
26146
27034
|
"regularClassSchedule",
|
|
@@ -26641,8 +27529,8 @@ const eventRegistrationHydrationSchemaShape = {
|
|
|
26641
27529
|
occurrenceContext: occurrenceContextSchema.optional(),
|
|
26642
27530
|
subject: eventRegistrationPageSurfaceSubjectSchema.nullable().optional(),
|
|
26643
27531
|
events: z.array(eventRegistrationPublicEventSchema).nullable().optional(),
|
|
26644
|
-
wholeSeriesOfferings:
|
|
26645
|
-
wholeSeriesOffering:
|
|
27532
|
+
wholeSeriesOfferings: publicWholeSeriesOfferingsArraySchema.nullable().optional(),
|
|
27533
|
+
wholeSeriesOffering: publicWholeSeriesOfferingSchema.nullable().optional(),
|
|
26646
27534
|
maxTickets: z.string().optional(),
|
|
26647
27535
|
showVenue: z.boolean().optional(),
|
|
26648
27536
|
showCapacity: z.boolean().optional(),
|
|
@@ -26664,12 +27552,13 @@ const eventRegistrationSourceSchema = z.object({
|
|
|
26664
27552
|
portalToken: z.string().nullable().optional(),
|
|
26665
27553
|
previewToken: z.string().nullable().optional(),
|
|
26666
27554
|
...eventRegistrationHydrationSchemaShape,
|
|
27555
|
+
subjectWholeSeriesOffering: publicWholeSeriesOfferingSchema.nullable().optional(),
|
|
26667
27556
|
className: z.string().nullable().optional(),
|
|
26668
27557
|
buttonText: z.string().nullable().optional(),
|
|
26669
27558
|
maxTickets: z.string().nullable().optional(),
|
|
26670
27559
|
stage: previewStageSchema.optional()
|
|
26671
27560
|
});
|
|
26672
|
-
const eventRegistrationDisplaySchema = z.object({
|
|
27561
|
+
const eventRegistrationDisplaySchema = z.discriminatedUnion("state", [z.object({
|
|
26673
27562
|
kind: z.literal("event-registration"),
|
|
26674
27563
|
state: z.literal("generic-shell"),
|
|
26675
27564
|
className: z.string().nullable(),
|
|
@@ -26677,7 +27566,13 @@ const eventRegistrationDisplaySchema = z.object({
|
|
|
26677
27566
|
bodyText: z.string(),
|
|
26678
27567
|
stepLabels: z.array(z.enum(EVENT_REGISTRATION_SHELL_STEP_LABELS)).min(1),
|
|
26679
27568
|
summaryButtonText: z.string()
|
|
26680
|
-
})
|
|
27569
|
+
}), z.object({
|
|
27570
|
+
kind: z.literal("event-registration"),
|
|
27571
|
+
state: z.literal("registration-closed"),
|
|
27572
|
+
className: z.string().nullable(),
|
|
27573
|
+
titleText: z.string(),
|
|
27574
|
+
bodyText: z.string()
|
|
27575
|
+
})]);
|
|
26681
27576
|
const eventRegistrationHydrationSchema = z.object(eventRegistrationHydrationSchemaShape);
|
|
26682
27577
|
const eventRegistrationRenderSchema = z.object({
|
|
26683
27578
|
display: eventRegistrationDisplaySchema,
|
|
@@ -26691,6 +27586,13 @@ z.object({
|
|
|
26691
27586
|
stage: previewStageSchema.optional()
|
|
26692
27587
|
});
|
|
26693
27588
|
function buildEventRegistrationDisplay(source) {
|
|
27589
|
+
if (resolveWholeSeriesOffering(source)?.enrollmentOpen === false) return {
|
|
27590
|
+
kind: "event-registration",
|
|
27591
|
+
state: "registration-closed",
|
|
27592
|
+
className: source.className ?? null,
|
|
27593
|
+
titleText: "Registration closed",
|
|
27594
|
+
bodyText: "This run is no longer open for bookings."
|
|
27595
|
+
};
|
|
26694
27596
|
const stepLabels = buildEventRegistrationShellStepLabels(source);
|
|
26695
27597
|
return {
|
|
26696
27598
|
kind: "event-registration",
|
|
@@ -26702,6 +27604,9 @@ function buildEventRegistrationDisplay(source) {
|
|
|
26702
27604
|
summaryButtonText: source.buttonText?.trim() || "Register"
|
|
26703
27605
|
};
|
|
26704
27606
|
}
|
|
27607
|
+
function resolveWholeSeriesOffering(source) {
|
|
27608
|
+
return source.wholeSeriesOffering ?? source.subjectWholeSeriesOffering ?? null;
|
|
27609
|
+
}
|
|
26705
27610
|
function buildEventRegistrationShellStepLabels(source) {
|
|
26706
27611
|
const scopedEvents = scopeEventRegistrationEvents(source);
|
|
26707
27612
|
if (scopedEvents.length === 0) return EVENT_REGISTRATION_GENERIC_SHELL_STEP_LABELS;
|
|
@@ -26759,7 +27664,7 @@ const eventRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
|
|
|
26759
27664
|
subject: source.subject ?? null,
|
|
26760
27665
|
events: source.events ?? null,
|
|
26761
27666
|
wholeSeriesOfferings: source.wholeSeriesOfferings ?? null,
|
|
26762
|
-
wholeSeriesOffering: source
|
|
27667
|
+
wholeSeriesOffering: resolveWholeSeriesOffering(source),
|
|
26763
27668
|
maxTickets: source.maxTickets ?? void 0,
|
|
26764
27669
|
showVenue: source.showVenue,
|
|
26765
27670
|
showCapacity: source.showCapacity,
|
|
@@ -26980,7 +27885,9 @@ const eventRegistrationBlockDefinition = {
|
|
|
26980
27885
|
fallback: false
|
|
26981
27886
|
} },
|
|
26982
27887
|
events: { $bind: { from: "data.events" } },
|
|
26983
|
-
wholeSeriesOffering: { $bind: { from: "data.
|
|
27888
|
+
wholeSeriesOffering: { $bind: { from: "data.selectedRunOffering.offering" } },
|
|
27889
|
+
subjectWholeSeriesOffering: { $bind: { from: "data.subjectWholeSeriesOffering.offering" } },
|
|
27890
|
+
wholeSeriesOfferings: { $bind: { from: "data.wholeSeriesOfferings" } },
|
|
26984
27891
|
sitePasses: { $bind: { from: "data.sitePasses" } },
|
|
26985
27892
|
siteMemberships: { $bind: { from: "data.siteMemberships" } },
|
|
26986
27893
|
stage: { $bind: {
|
|
@@ -26994,7 +27901,9 @@ const eventRegistrationBlockDefinition = {
|
|
|
26994
27901
|
runtime: eventRegistrationBlockRuntime,
|
|
26995
27902
|
dataSchemas: {
|
|
26996
27903
|
events: publicEventsArraySchema.optional(),
|
|
26997
|
-
|
|
27904
|
+
selectedRunOffering: z.object({ offering: publicWholeSeriesOfferingSchema }).optional(),
|
|
27905
|
+
subjectWholeSeriesOffering: z.object({ offering: publicWholeSeriesOfferingSchema }).optional(),
|
|
27906
|
+
wholeSeriesOfferings: z.array(publicWholeSeriesOfferingSchema).optional(),
|
|
26998
27907
|
sitePasses: publicPassProductCollectionSchema.optional(),
|
|
26999
27908
|
siteMemberships: publicMembershipProductCollectionSchema.optional(),
|
|
27000
27909
|
occurrenceContext: occurrenceContextSchema.optional()
|
|
@@ -27011,11 +27920,29 @@ const eventRegistrationBlockDefinition = {
|
|
|
27011
27920
|
} },
|
|
27012
27921
|
readProfile: "registration",
|
|
27013
27922
|
seriesId: { $bind: { from: "$root.subject.eventSeriesId" } },
|
|
27923
|
+
seriesIds: { $bind: {
|
|
27924
|
+
from: "$root.subject.availableEventSeriesIds",
|
|
27925
|
+
transforms: [{ id: "value.csv" }]
|
|
27926
|
+
} },
|
|
27927
|
+
runSeriesId: { $bind: { from: "$root.entrySubrouteContext.run.seriesId" } },
|
|
27014
27928
|
includeOccurrenceId: { $bind: { from: "$root.occurrenceContext.id" } }
|
|
27015
27929
|
},
|
|
27016
27930
|
mode: "server"
|
|
27017
27931
|
},
|
|
27018
|
-
|
|
27932
|
+
selectedRunOffering: {
|
|
27933
|
+
endpoint: "getPublicWholeSeriesOffering",
|
|
27934
|
+
params: {
|
|
27935
|
+
siteId: { $bind: { from: "$root.siteId" } },
|
|
27936
|
+
eventSeriesId: { $bind: { from: "$root.entrySubrouteContext.run.seriesId" } },
|
|
27937
|
+
stage: { $bind: {
|
|
27938
|
+
from: "$root.previewStage",
|
|
27939
|
+
fallback: "published"
|
|
27940
|
+
} }
|
|
27941
|
+
},
|
|
27942
|
+
requiredParams: ["eventSeriesId"],
|
|
27943
|
+
mode: "server"
|
|
27944
|
+
},
|
|
27945
|
+
subjectWholeSeriesOffering: {
|
|
27019
27946
|
endpoint: "getPublicWholeSeriesOffering",
|
|
27020
27947
|
when: { $bind: {
|
|
27021
27948
|
from: "$root.subject.isWholeSeriesBooking",
|
|
@@ -27032,6 +27959,22 @@ const eventRegistrationBlockDefinition = {
|
|
|
27032
27959
|
requiredParams: ["eventSeriesId"],
|
|
27033
27960
|
mode: "server"
|
|
27034
27961
|
},
|
|
27962
|
+
wholeSeriesOfferings: {
|
|
27963
|
+
endpoint: "listPublicWholeSeriesOfferings",
|
|
27964
|
+
params: {
|
|
27965
|
+
siteId: { $bind: { from: "$root.siteId" } },
|
|
27966
|
+
eventSeriesIds: { $bind: {
|
|
27967
|
+
from: "$root.subject.availableEventSeriesIds",
|
|
27968
|
+
transforms: [{ id: "value.csv" }]
|
|
27969
|
+
} },
|
|
27970
|
+
stage: { $bind: {
|
|
27971
|
+
from: "$root.previewStage",
|
|
27972
|
+
fallback: "published"
|
|
27973
|
+
} }
|
|
27974
|
+
},
|
|
27975
|
+
requiredParams: ["eventSeriesIds"],
|
|
27976
|
+
mode: "server"
|
|
27977
|
+
},
|
|
27035
27978
|
sitePasses: {
|
|
27036
27979
|
endpoint: "listPublicPasses",
|
|
27037
27980
|
params: { siteId: { $bind: { from: "$root.siteId" } } },
|
|
@@ -27046,13 +27989,9 @@ const eventRegistrationBlockDefinition = {
|
|
|
27046
27989
|
};
|
|
27047
27990
|
//#endregion
|
|
27048
27991
|
//#region ../blocks/src/system/runtime/nodes/course-registration.interactive.ts
|
|
27049
|
-
const
|
|
27050
|
-
siteId: z.string().optional(),
|
|
27051
|
-
apiBaseUrl: z.string().optional(),
|
|
27052
|
-
portalToken: z.string().nullable().optional(),
|
|
27992
|
+
const courseRegistrationHydrationSchemaShape = {
|
|
27053
27993
|
subject: eventRegistrationPageSurfaceSubjectSchema.nullable().optional(),
|
|
27054
|
-
courses: z.array(
|
|
27055
|
-
className: z.string().nullable().optional(),
|
|
27994
|
+
courses: z.array(publicWholeSeriesOfferingSchema).nullable().optional(),
|
|
27056
27995
|
showSessions: z.boolean().optional(),
|
|
27057
27996
|
showPrice: z.boolean().optional(),
|
|
27058
27997
|
showCapacity: z.boolean().optional(),
|
|
@@ -27060,8 +27999,15 @@ const courseRegistrationSourceSchema = z.object({
|
|
|
27060
27999
|
successMessage: z.string().optional(),
|
|
27061
28000
|
waitlistMessage: z.string().optional(),
|
|
27062
28001
|
membershipMessage: z.string().optional(),
|
|
28002
|
+
buttonVariant: registrationButtonVariantSchema.optional()
|
|
28003
|
+
};
|
|
28004
|
+
const courseRegistrationSourceSchema = z.object({
|
|
28005
|
+
siteId: z.string().optional(),
|
|
28006
|
+
apiBaseUrl: z.string().optional(),
|
|
28007
|
+
portalToken: z.string().nullable().optional(),
|
|
28008
|
+
...courseRegistrationHydrationSchemaShape,
|
|
28009
|
+
className: z.string().nullable().optional(),
|
|
27063
28010
|
buttonText: z.string().nullable().optional(),
|
|
27064
|
-
buttonVariant: registrationButtonVariantSchema.optional(),
|
|
27065
28011
|
stage: previewStageSchema.optional()
|
|
27066
28012
|
});
|
|
27067
28013
|
const courseRegistrationDisplaySchema = z.object({
|
|
@@ -27070,18 +28016,7 @@ const courseRegistrationDisplaySchema = z.object({
|
|
|
27070
28016
|
className: z.string().nullable(),
|
|
27071
28017
|
summaryButtonText: z.string()
|
|
27072
28018
|
});
|
|
27073
|
-
const courseRegistrationHydrationSchema = z.object(
|
|
27074
|
-
subject: eventRegistrationPageSurfaceSubjectSchema.nullable().optional(),
|
|
27075
|
-
courses: z.array(publicCourseSchema).nullable().optional(),
|
|
27076
|
-
showSessions: z.boolean().optional(),
|
|
27077
|
-
showPrice: z.boolean().optional(),
|
|
27078
|
-
showCapacity: z.boolean().optional(),
|
|
27079
|
-
showVenue: z.boolean().optional(),
|
|
27080
|
-
successMessage: z.string().optional(),
|
|
27081
|
-
waitlistMessage: z.string().optional(),
|
|
27082
|
-
membershipMessage: z.string().optional(),
|
|
27083
|
-
buttonVariant: registrationButtonVariantSchema.optional()
|
|
27084
|
-
});
|
|
28019
|
+
const courseRegistrationHydrationSchema = z.object(courseRegistrationHydrationSchemaShape);
|
|
27085
28020
|
const courseRegistrationRenderSchema = z.object({
|
|
27086
28021
|
display: courseRegistrationDisplaySchema,
|
|
27087
28022
|
hydration: courseRegistrationHydrationSchema
|
|
@@ -27286,7 +28221,7 @@ const courseRegistrationBlockDefinition = {
|
|
|
27286
28221
|
})]
|
|
27287
28222
|
}),
|
|
27288
28223
|
runtime: courseRegistrationBlockRuntime,
|
|
27289
|
-
dataSchemas: { courses:
|
|
28224
|
+
dataSchemas: { courses: publicWholeSeriesOfferingsArraySchema.optional() },
|
|
27290
28225
|
dataLoaders: { courses: {
|
|
27291
28226
|
endpoint: "listPublicWholeSeriesOfferings",
|
|
27292
28227
|
params: {
|
|
@@ -27357,6 +28292,22 @@ const eventDetailsManifest = createBlockManifest({
|
|
|
27357
28292
|
defaultValue: true,
|
|
27358
28293
|
ui: { intent: "display" }
|
|
27359
28294
|
},
|
|
28295
|
+
{
|
|
28296
|
+
id: "showTitle",
|
|
28297
|
+
type: "boolean",
|
|
28298
|
+
label: "Show event title",
|
|
28299
|
+
required: false,
|
|
28300
|
+
defaultValue: false,
|
|
28301
|
+
ui: { intent: "display" }
|
|
28302
|
+
},
|
|
28303
|
+
{
|
|
28304
|
+
id: "showDescription",
|
|
28305
|
+
type: "boolean",
|
|
28306
|
+
label: "Show event description",
|
|
28307
|
+
required: false,
|
|
28308
|
+
defaultValue: false,
|
|
28309
|
+
ui: { intent: "display" }
|
|
28310
|
+
},
|
|
27360
28311
|
{
|
|
27361
28312
|
id: "showMap",
|
|
27362
28313
|
type: "boolean",
|
|
@@ -27393,10 +28344,22 @@ const eventDetailsManifest = createBlockManifest({
|
|
|
27393
28344
|
{
|
|
27394
28345
|
value: "10",
|
|
27395
28346
|
label: "10 dates"
|
|
28347
|
+
},
|
|
28348
|
+
{
|
|
28349
|
+
value: "all",
|
|
28350
|
+
label: "All dates"
|
|
27396
28351
|
}
|
|
27397
28352
|
],
|
|
27398
28353
|
ui: { intent: "display" }
|
|
27399
28354
|
},
|
|
28355
|
+
{
|
|
28356
|
+
id: "showCapacity",
|
|
28357
|
+
type: "boolean",
|
|
28358
|
+
label: "Show capacity",
|
|
28359
|
+
required: false,
|
|
28360
|
+
defaultValue: false,
|
|
28361
|
+
ui: { intent: "display" }
|
|
28362
|
+
},
|
|
27400
28363
|
{
|
|
27401
28364
|
id: "showCost",
|
|
27402
28365
|
type: "boolean",
|
|
@@ -27439,6 +28402,8 @@ const eventDetailsManifest = createBlockManifest({
|
|
|
27439
28402
|
} },
|
|
27440
28403
|
events: { $bind: { from: "data.eventDetailsData.events" } },
|
|
27441
28404
|
showVenue: { $bind: { from: "content.showVenue" } },
|
|
28405
|
+
showTitle: { $bind: { from: "content.showTitle" } },
|
|
28406
|
+
showDescription: { $bind: { from: "content.showDescription" } },
|
|
27442
28407
|
showMap: { $bind: { from: "content.showMap" } },
|
|
27443
28408
|
showOtherDates: { $bind: { from: "content.showOtherDates" } },
|
|
27444
28409
|
otherDatesLimit: { $bind: {
|
|
@@ -27449,6 +28414,10 @@ const eventDetailsManifest = createBlockManifest({
|
|
|
27449
28414
|
from: "content.showCost",
|
|
27450
28415
|
fallback: true
|
|
27451
28416
|
} },
|
|
28417
|
+
showCapacity: { $bind: {
|
|
28418
|
+
from: "content.showCapacity",
|
|
28419
|
+
fallback: false
|
|
28420
|
+
} },
|
|
27452
28421
|
showAcceptedPasses: { $bind: {
|
|
27453
28422
|
from: "content.showAcceptedPasses",
|
|
27454
28423
|
fallback: true
|
|
@@ -27503,6 +28472,11 @@ const eventDetailsBlockDefinition = {
|
|
|
27503
28472
|
limit: "100",
|
|
27504
28473
|
readProfile: "details",
|
|
27505
28474
|
seriesId: { $bind: { from: "$root.subject.eventSeriesId" } },
|
|
28475
|
+
seriesIds: { $bind: {
|
|
28476
|
+
from: "$root.subject.availableEventSeriesIds",
|
|
28477
|
+
transforms: [{ id: "value.csv" }]
|
|
28478
|
+
} },
|
|
28479
|
+
runSeriesId: { $bind: { from: "$root.entrySubrouteContext.run.seriesId" } },
|
|
27506
28480
|
includeOccurrenceId: { $bind: { from: "$root.occurrenceContext.id" } }
|
|
27507
28481
|
},
|
|
27508
28482
|
mode: "server"
|
|
@@ -27688,7 +28662,7 @@ const courseDetailsBlockDefinition = {
|
|
|
27688
28662
|
})], { gap: "lg" })
|
|
27689
28663
|
})]
|
|
27690
28664
|
}),
|
|
27691
|
-
dataSchemas: { courses:
|
|
28665
|
+
dataSchemas: { courses: publicWholeSeriesOfferingsArraySchema.optional() },
|
|
27692
28666
|
dataLoaders: { courses: {
|
|
27693
28667
|
endpoint: "listPublicWholeSeriesOfferings",
|
|
27694
28668
|
params: {
|
|
@@ -27807,8 +28781,8 @@ const eventSpotlightBlockDefinition = {
|
|
|
27807
28781
|
from: "content.columns",
|
|
27808
28782
|
fallback: "3"
|
|
27809
28783
|
} },
|
|
27810
|
-
|
|
27811
|
-
from: "content.
|
|
28784
|
+
cardRole: { $bind: {
|
|
28785
|
+
from: "content._cardStyles.role",
|
|
27812
28786
|
fallback: "default"
|
|
27813
28787
|
} },
|
|
27814
28788
|
buttonVariant: { $bind: {
|
|
@@ -27970,6 +28944,7 @@ const eventCollectionSourceSchemaShape = {
|
|
|
27970
28944
|
showVenue: z.boolean().nullable().optional(),
|
|
27971
28945
|
showMap: z.boolean().nullable().optional(),
|
|
27972
28946
|
showCapacity: z.boolean().nullable().optional(),
|
|
28947
|
+
cardRole: cardRoleSchema.optional(),
|
|
27973
28948
|
buttonVariant: eventButtonVariantSchema.optional(),
|
|
27974
28949
|
buttonText: z.string().optional(),
|
|
27975
28950
|
emptyMessage: z.string().optional(),
|
|
@@ -27997,6 +28972,7 @@ const eventCollectionDisplaySchemaShape = {
|
|
|
27997
28972
|
showVenue: z.boolean(),
|
|
27998
28973
|
showMap: z.boolean(),
|
|
27999
28974
|
showCapacity: z.boolean(),
|
|
28975
|
+
cardRole: cardRoleSchema,
|
|
28000
28976
|
buttonVariant: eventButtonVariantSchema,
|
|
28001
28977
|
buttonText: z.string(),
|
|
28002
28978
|
emptyMessage: z.string()
|
|
@@ -28046,6 +29022,7 @@ function buildEventCollectionPresentationDisplay(source) {
|
|
|
28046
29022
|
showVenue: source.showVenue ?? true,
|
|
28047
29023
|
showMap: source.showMap ?? true,
|
|
28048
29024
|
showCapacity: source.showCapacity ?? true,
|
|
29025
|
+
cardRole: source.cardRole ?? "default",
|
|
28049
29026
|
buttonVariant: source.buttonVariant ?? "primary",
|
|
28050
29027
|
buttonText: source.buttonText ?? "Book",
|
|
28051
29028
|
emptyMessage: source.emptyMessage ?? "No upcoming events scheduled."
|
|
@@ -28063,8 +29040,6 @@ function buildEventCollectionHydration(source) {
|
|
|
28063
29040
|
}
|
|
28064
29041
|
//#endregion
|
|
28065
29042
|
//#region ../blocks/src/system/runtime/nodes/events/EventListing.interactive.ts
|
|
28066
|
-
const legacyEventCardVariantSchema = z.enum(["variant1", "variant2"]);
|
|
28067
|
-
const eventCardVariantInputSchema = z.union([cardVariantRoleSchema, legacyEventCardVariantSchema]);
|
|
28068
29043
|
const cardOrientationSchema = z.enum(["vertical", "horizontal"]);
|
|
28069
29044
|
const eventSurfaceScopeSchema = z.enum(eventSurfaceScopeValues);
|
|
28070
29045
|
const eventScheduleScopeSchema = z.enum(eventScheduleScopeValues);
|
|
@@ -28079,7 +29054,7 @@ const eventListingSourceSchema = z.object({
|
|
|
28079
29054
|
paginationMode: z.enum(["loadMore", "seeAllLink"]).optional(),
|
|
28080
29055
|
seeAllUrl: z.string().optional(),
|
|
28081
29056
|
loadMoreText: z.string().optional(),
|
|
28082
|
-
|
|
29057
|
+
cardRole: cardRoleSchema.optional(),
|
|
28083
29058
|
buttonVariant: eventButtonVariantSchema.optional(),
|
|
28084
29059
|
buttonText: z.string().optional(),
|
|
28085
29060
|
showVenue: z.boolean().optional(),
|
|
@@ -28101,7 +29076,7 @@ const eventListingDisplaySchema = z.object({
|
|
|
28101
29076
|
emptyMessage: z.string(),
|
|
28102
29077
|
loadingMessage: z.string(),
|
|
28103
29078
|
containerClass: z.string(),
|
|
28104
|
-
|
|
29079
|
+
cardRole: cardRoleSchema,
|
|
28105
29080
|
buttonVariant: eventButtonVariantSchema,
|
|
28106
29081
|
buttonText: z.string(),
|
|
28107
29082
|
showVenue: z.boolean(),
|
|
@@ -28157,7 +29132,7 @@ const eventListingBlockRuntime = defineProgressiveBlockRuntime({
|
|
|
28157
29132
|
emptyMessage: source.emptyMessage ?? "No upcoming events scheduled.",
|
|
28158
29133
|
loadingMessage: "Loading events…",
|
|
28159
29134
|
containerClass: getContainerClass(layout, source.columns ?? "3"),
|
|
28160
|
-
|
|
29135
|
+
cardRole: source.cardRole ?? "default",
|
|
28161
29136
|
buttonVariant: source.buttonVariant ?? "primary",
|
|
28162
29137
|
buttonText: source.buttonText ?? "Book",
|
|
28163
29138
|
showVenue: source.showVenue ?? true,
|
|
@@ -28479,8 +29454,8 @@ const eventListingBlockDefinition = {
|
|
|
28479
29454
|
from: "content.loadMoreText",
|
|
28480
29455
|
fallback: "Load more events"
|
|
28481
29456
|
} },
|
|
28482
|
-
|
|
28483
|
-
from: "content.
|
|
29457
|
+
cardRole: { $bind: {
|
|
29458
|
+
from: "content._cardStyles.role",
|
|
28484
29459
|
fallback: "default"
|
|
28485
29460
|
} },
|
|
28486
29461
|
buttonVariant: { $bind: {
|
|
@@ -28750,6 +29725,10 @@ const eventCalendarLayout = [styledSection({
|
|
|
28750
29725
|
filterCategoryIds: { $bind: { from: "content.filterCategoryIds" } },
|
|
28751
29726
|
filterStaffMemberId: { $bind: { from: "content.filterStaffMemberId" } },
|
|
28752
29727
|
filterVenueId: { $bind: { from: "content.filterVenueId" } },
|
|
29728
|
+
cardRole: { $bind: {
|
|
29729
|
+
from: "content._cardStyles.role",
|
|
29730
|
+
fallback: "default"
|
|
29731
|
+
} },
|
|
28753
29732
|
buttonVariant: { $bind: {
|
|
28754
29733
|
from: "content.buttonVariant",
|
|
28755
29734
|
fallback: "primary"
|
|
@@ -29382,11 +30361,11 @@ const eventCalendarAdditionalFields = [
|
|
|
29382
30361
|
searchThreshold: 8
|
|
29383
30362
|
}
|
|
29384
30363
|
}),
|
|
29385
|
-
...cardStylingFields.
|
|
30364
|
+
...cardStylingFields.map((field) => ({
|
|
29386
30365
|
...field,
|
|
29387
30366
|
ui: {
|
|
29388
30367
|
...field.ui ?? {},
|
|
29389
|
-
intent: field.id === "buttonVariant" ? "style" : "content"
|
|
30368
|
+
intent: field.id === "_cardStyles" || field.id === "buttonVariant" ? "style" : "content"
|
|
29390
30369
|
}
|
|
29391
30370
|
})),
|
|
29392
30371
|
{
|
|
@@ -30377,7 +31356,7 @@ const offeringsPreviewBlockDefinition = {
|
|
|
30377
31356
|
dataSchemas: {
|
|
30378
31357
|
...offeringsPreviewEventDataSchemas,
|
|
30379
31358
|
routeCandidates: publicRouteCandidatesSchema.optional(),
|
|
30380
|
-
courses:
|
|
31359
|
+
courses: publicWholeSeriesOfferingsArraySchema.optional()
|
|
30381
31360
|
},
|
|
30382
31361
|
dataLoaders: {
|
|
30383
31362
|
...offeringsPreviewEventDataLoaders,
|
|
@@ -31849,7 +32828,7 @@ const audioPlayerBlockDefinition = { manifest: createBlockManifest({
|
|
|
31849
32828
|
}
|
|
31850
32829
|
],
|
|
31851
32830
|
layout: styledSection({
|
|
31852
|
-
children: stack({ className: "rb-container rb-mx-auto rb-max-w-3xl" }, [el("div", { className: "
|
|
32831
|
+
children: stack({ className: "rb-container rb-mx-auto rb-max-w-3xl" }, [el("div", { className: boxStyleClassNames({ role: "default" }, {}) }, [media({
|
|
31853
32832
|
className: "card-media rb-aspect-video rb-w-full rb-object-cover",
|
|
31854
32833
|
size: {
|
|
31855
32834
|
width: 960,
|
|
@@ -34901,16 +35880,27 @@ function eventListCapable() {
|
|
|
34901
35880
|
looks: "supported",
|
|
34902
35881
|
sectionSurfaces: "supported",
|
|
34903
35882
|
contentFrames: ["plain", "panel"],
|
|
34904
|
-
cardRoles: "
|
|
35883
|
+
cardRoles: "supported",
|
|
34905
35884
|
eventListTreatments
|
|
34906
35885
|
});
|
|
34907
35886
|
}
|
|
35887
|
+
function eventSpotlightCapable() {
|
|
35888
|
+
return declareBlockDesignCapability({
|
|
35889
|
+
sectionSurfaces: "supported",
|
|
35890
|
+
contentFrames: ["plain"],
|
|
35891
|
+
cardRoles: "supported"
|
|
35892
|
+
});
|
|
35893
|
+
}
|
|
34908
35894
|
function offeringsPreviewCapable() {
|
|
34909
35895
|
return declareBlockDesignCapability({
|
|
34910
35896
|
looks: "supported",
|
|
34911
35897
|
sectionSurfaces: "supported",
|
|
34912
35898
|
contentFrames: ["plain"],
|
|
34913
|
-
cardRoles: "supported"
|
|
35899
|
+
cardRoles: "supported",
|
|
35900
|
+
compositions: {
|
|
35901
|
+
kind: "offerings-preview",
|
|
35902
|
+
treatments: offeringsPreviewCompositionTreatmentValues
|
|
35903
|
+
}
|
|
34914
35904
|
});
|
|
34915
35905
|
}
|
|
34916
35906
|
function defaultBoundaryBias(visualWeight) {
|
|
@@ -35203,7 +36193,7 @@ const systemBlockDefinitions = [
|
|
|
35203
36193
|
cardRoles: "supported",
|
|
35204
36194
|
compositions: {
|
|
35205
36195
|
kind: "testimonials",
|
|
35206
|
-
treatments:
|
|
36196
|
+
treatments: testimonialsCompositionTreatmentValues
|
|
35207
36197
|
},
|
|
35208
36198
|
headingDecorationCapability: {
|
|
35209
36199
|
kind: "supported",
|
|
@@ -35358,7 +36348,7 @@ const systemBlockDefinitions = [
|
|
|
35358
36348
|
weight: "standard"
|
|
35359
36349
|
})]
|
|
35360
36350
|
})),
|
|
35361
|
-
withDesignCapability("block.event-spotlight", eventSpotlightBlockDefinition,
|
|
36351
|
+
withDesignCapability("block.event-spotlight", eventSpotlightBlockDefinition, eventSpotlightCapable(), defineBlockDesignMetadata({
|
|
35362
36352
|
flow: offeringsFlow,
|
|
35363
36353
|
layoutProfiles: [layoutProfile({
|
|
35364
36354
|
variantKey: "default",
|
|
@@ -37054,184 +38044,29 @@ const EVENT_ATTENDEE_REFUND_INVALID_CODES = ["manual_booking_not_refundable", ..
|
|
|
37054
38044
|
[...EVENT_ATTENDEE_REFUND_INVALID_CODES, ...CANONICAL_ADMIN_REFUND_FAILURE_CODES];
|
|
37055
38045
|
[...STANDARD_LINE_ITEM_REFUND_INVALID_CODES, ...CANONICAL_ADMIN_REFUND_FAILURE_CODES];
|
|
37056
38046
|
//#endregion
|
|
37057
|
-
//#region ../api/src/
|
|
37058
|
-
|
|
37059
|
-
|
|
37060
|
-
|
|
37061
|
-
|
|
37062
|
-
|
|
37063
|
-
|
|
37064
|
-
|
|
37065
|
-
|
|
37066
|
-
|
|
37067
|
-
|
|
37068
|
-
|
|
37069
|
-
|
|
37070
|
-
|
|
37071
|
-
|
|
37072
|
-
|
|
37073
|
-
|
|
37074
|
-
|
|
37075
|
-
|
|
37076
|
-
|
|
37077
|
-
|
|
37078
|
-
|
|
37079
|
-
//#region ../api/src/bookingVerticalCatalog.ts
|
|
37080
|
-
const VERTICAL_BOOKING_PRESETS = [
|
|
37081
|
-
verticalBookingPreset("yoga_wellness.classes", "yoga_wellness", "class", "Class", "Classes", "Regular scheduled classes and group sessions."),
|
|
37082
|
-
verticalBookingPreset("yoga_wellness.workshops", "yoga_wellness", "workshop", "Workshop", "Workshops", "One-off workshops, day retreats, or special sessions."),
|
|
37083
|
-
verticalBookingPreset("yoga_wellness.courses", "yoga_wellness", "course", "Course", "Courses", "Fixed-schedule courses or multi-session groups."),
|
|
37084
|
-
verticalBookingPreset("yoga_wellness.retreats", "yoga_wellness", "retreat", "Retreat", "Retreats", "Multi-day or residential retreats and immersive experiences."),
|
|
37085
|
-
verticalBookingPreset("yoga_wellness.appointments", "yoga_wellness", "appointment", "Appointment", "Appointments", "Private sessions, consultations, or one-to-one support."),
|
|
37086
|
-
verticalBookingPreset("fitness_pt.group_training", "fitness_pt", "class", "Group training", "Group training", "Regular scheduled classes and group sessions."),
|
|
37087
|
-
verticalBookingPreset("fitness_pt.personal_training", "fitness_pt", "appointment", "Personal training", "Personal training", "One-to-one sessions booked from your availability."),
|
|
37088
|
-
verticalBookingPreset("fitness_pt.programmes", "fitness_pt", "course", "Programme", "Programmes", "Multi-session programmes like bootcamps or courses."),
|
|
37089
|
-
verticalBookingPreset("fitness_pt.workshops", "fitness_pt", "workshop", "Workshop", "Workshops", "One-off workshops, events, or special sessions."),
|
|
37090
|
-
verticalBookingPreset("fitness_pt.retreats", "fitness_pt", "retreat", "Retreat", "Retreats", "Multi-day or residential fitness experiences."),
|
|
37091
|
-
verticalBookingPreset("dance_school.classes", "dance_school", "class", "Class", "Classes", "Regular group classes and weekly sessions."),
|
|
37092
|
-
verticalBookingPreset("dance_school.terms", "dance_school", "course", "Term", "Terms", "Multi-week term blocks or fixed-date course groups."),
|
|
37093
|
-
verticalBookingPreset("dance_school.courses", "dance_school", "course", "Course", "Courses", "Fixed-schedule courses or multi-session groups.", "settings"),
|
|
37094
|
-
verticalBookingPreset("dance_school.workshops", "dance_school", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, or intensives."),
|
|
37095
|
-
verticalBookingPreset("dance_school.private_lessons", "dance_school", "appointment", "Private lesson", "Private lessons", "One-to-one lessons or coaching sessions."),
|
|
37096
|
-
verticalBookingPreset("dance_school.shows", "dance_school", "performance", "Show", "Shows", "Ticketed performances, showcases, and recitals."),
|
|
37097
|
-
verticalBookingPreset("physiotherapy_physical_health.appointments", "physiotherapy_physical_health", "appointment", "Appointment", "Appointments", "Assessments, treatments, follow-ups, and rehabilitation sessions."),
|
|
37098
|
-
verticalBookingPreset("physiotherapy_physical_health.rehab_classes", "physiotherapy_physical_health", "class", "Rehab class", "Rehab classes", "Regular rehabilitation, mobility, strength, or recovery classes."),
|
|
37099
|
-
verticalBookingPreset("physiotherapy_physical_health.workshops", "physiotherapy_physical_health", "workshop", "Workshop", "Workshops", "One-off workshops, talks, or practical group sessions."),
|
|
37100
|
-
verticalBookingPreset("massage_bodywork.treatments", "massage_bodywork", "appointment", "Treatment", "Treatments", "Massage treatments, bodywork sessions, and one-to-one appointments."),
|
|
37101
|
-
verticalBookingPreset("massage_bodywork.group_sessions", "massage_bodywork", "class", "Group session", "Group sessions", "Regular bodywork, somatic movement, or self-massage sessions."),
|
|
37102
|
-
verticalBookingPreset("massage_bodywork.workshops", "massage_bodywork", "workshop", "Workshop", "Workshops", "One-off bodywork, self-massage, or somatic practice workshops."),
|
|
37103
|
-
verticalBookingPreset("therapist_practitioner.appointments", "therapist_practitioner", "appointment", "Appointment", "Appointments", "Sessions, consultations, treatments, or assessments."),
|
|
37104
|
-
verticalBookingPreset("therapist_practitioner.workshops", "therapist_practitioner", "workshop", "Workshop", "Workshops", "One-off group workshops, talks, or wellbeing sessions."),
|
|
37105
|
-
verticalBookingPreset("therapist_practitioner.retreats", "therapist_practitioner", "retreat", "Retreat", "Retreats", "Multi-day retreats or immersive group experiences."),
|
|
37106
|
-
verticalBookingPreset("beauty_spa.appointments", "beauty_spa", "appointment", "Appointment", "Appointments", "Treatments, consultations, services, and sessions."),
|
|
37107
|
-
verticalBookingPreset("beauty_spa.workshops", "beauty_spa", "workshop", "Workshop", "Workshops", "Skincare workshops, makeup lessons, demos, or group events."),
|
|
37108
|
-
verticalBookingPreset("consultant_coach.appointments", "consultant_coach", "appointment", "Appointment", "Appointments", "One-to-one calls, consultations, reviews, or coaching sessions."),
|
|
37109
|
-
verticalBookingPreset("consultant_coach.workshops", "consultant_coach", "workshop", "Workshop", "Workshops", "One-off group sessions, webinars, or strategy days."),
|
|
37110
|
-
verticalBookingPreset("consultant_coach.courses", "consultant_coach", "course", "Course", "Courses", "Fixed-schedule cohorts or multi-session group programmes."),
|
|
37111
|
-
verticalBookingPreset("consultant_coach.retreats", "consultant_coach", "retreat", "Retreat", "Retreats", "Multi-day coaching retreats or immersive experiences."),
|
|
37112
|
-
verticalBookingPreset("training_provider.courses", "training_provider", "course", "Course", "Courses", "Fixed-schedule courses, cohorts, and multi-session training."),
|
|
37113
|
-
verticalBookingPreset("training_provider.workshops", "training_provider", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, and short training sessions."),
|
|
37114
|
-
verticalBookingPreset("training_provider.appointments", "training_provider", "appointment", "Appointment", "Appointments", "Consultations, assessments, mentoring, or office hours."),
|
|
37115
|
-
verticalBookingPreset("training_provider.classes", "training_provider", "class", "Class", "Classes", "Regular classes, sessions, or groups.", "settings"),
|
|
37116
|
-
verticalBookingPreset("training_provider.residentials", "training_provider", "retreat", "Residential", "Residentials", "Residential courses or multi-day training experiences.", "settings"),
|
|
37117
|
-
verticalBookingPreset("retreat_centre.retreats", "retreat_centre", "retreat", "Retreat", "Retreats", "Multi-day or residential retreats with richer booking needs."),
|
|
37118
|
-
verticalBookingPreset("retreat_centre.workshops", "retreat_centre", "workshop", "Workshop", "Workshops", "One-day retreats, ceremonies, workshops, or special events."),
|
|
37119
|
-
verticalBookingPreset("retreat_centre.classes", "retreat_centre", "class", "Class", "Classes", "Regular sessions like guided meditations or group practices."),
|
|
37120
|
-
verticalBookingPreset("retreat_centre.courses", "retreat_centre", "course", "Course", "Courses", "Fixed-schedule programmes or multi-session experiences."),
|
|
37121
|
-
verticalBookingPreset("retreat_centre.appointments", "retreat_centre", "appointment", "Appointment", "Appointments", "Private sessions, therapies, consultations, or add-ons."),
|
|
37122
|
-
verticalBookingPreset("music_school.lessons", "music_school", "appointment", "Lesson", "Lessons", "One-to-one lessons, consultations, or coaching sessions."),
|
|
37123
|
-
verticalBookingPreset("music_school.classes", "music_school", "class", "Class", "Classes", "Regular group classes, ensembles, or recurring sessions."),
|
|
37124
|
-
verticalBookingPreset("music_school.terms", "music_school", "course", "Term", "Terms", "Multi-week term blocks or fixed-date group courses."),
|
|
37125
|
-
verticalBookingPreset("music_school.workshops", "music_school", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, or intensives."),
|
|
37126
|
-
verticalBookingPreset("music_school.performances", "music_school", "performance", "Performance", "Performances", "Concerts, recitals, showcases, or ticketed performances."),
|
|
37127
|
-
verticalBookingPreset("voice_singing.lessons", "voice_singing", "appointment", "Voice session", "Voice sessions", "One-to-one singing lessons, voice coaching, or private practice sessions."),
|
|
37128
|
-
verticalBookingPreset("voice_singing.classes", "voice_singing", "class", "Ongoing weekly session", "Ongoing weekly sessions", "Regular choirs, voice circles, community singing, or group practice."),
|
|
37129
|
-
verticalBookingPreset("voice_singing.terms", "voice_singing", "course", "Singing term", "Singing terms", "Multi-week choir terms, voice courses, or fixed-date group programmes."),
|
|
37130
|
-
verticalBookingPreset("voice_singing.workshops", "voice_singing", "workshop", "Workshop", "Workshops", "One-off singing workshops, voice journeys, or devotional singing sessions."),
|
|
37131
|
-
verticalBookingPreset("voice_singing.performances", "voice_singing", "performance", "Performance", "Performances", "Choir concerts, sharing events, recitals, or community performances."),
|
|
37132
|
-
verticalBookingPreset("performing_arts_school.classes", "performing_arts_school", "class", "Class", "Classes", "Regular group classes, rehearsals, or weekly sessions."),
|
|
37133
|
-
verticalBookingPreset("performing_arts_school.terms", "performing_arts_school", "course", "Term", "Terms", "Multi-week term blocks or fixed-date course groups."),
|
|
37134
|
-
verticalBookingPreset("performing_arts_school.workshops", "performing_arts_school", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, or intensives."),
|
|
37135
|
-
verticalBookingPreset("performing_arts_school.performances", "performing_arts_school", "performance", "Performance", "Performances", "Shows, showcases, productions, or ticketed performances."),
|
|
37136
|
-
verticalBookingPreset("performing_arts_school.lessons", "performing_arts_school", "appointment", "Lesson", "Lessons", "One-to-one lessons, coaching, or audition prep."),
|
|
37137
|
-
verticalBookingPreset("community_wellbeing.classes", "community_wellbeing", "class", "Class", "Classes", "Regular groups, sessions, practices, or weekly activities."),
|
|
37138
|
-
verticalBookingPreset("community_wellbeing.workshops", "community_wellbeing", "workshop", "Workshop", "Workshops", "One-off workshops, talks, events, or gatherings."),
|
|
37139
|
-
verticalBookingPreset("community_wellbeing.courses", "community_wellbeing", "course", "Course", "Courses", "Fixed-schedule courses, study groups, or multi-session programmes."),
|
|
37140
|
-
verticalBookingPreset("community_wellbeing.appointments", "community_wellbeing", "appointment", "Appointment", "Appointments", "One-to-one appointments, consultations, or support sessions."),
|
|
37141
|
-
verticalBookingPreset("community_wellbeing.retreats", "community_wellbeing", "retreat", "Retreat", "Retreats", "Multi-day or residential retreats."),
|
|
37142
|
-
verticalBookingPreset("venue_event_space.resource_hire", "venue_event_space", "appointment", "Hire slot", "Hire slots", "Future room, venue, and resource hire bookings.", "future")
|
|
37143
|
-
];
|
|
37144
|
-
const VERTICAL_ID_SET = /* @__PURE__ */ new Set([
|
|
37145
|
-
"yoga_wellness",
|
|
37146
|
-
"fitness_pt",
|
|
37147
|
-
"dance_school",
|
|
37148
|
-
"physiotherapy_physical_health",
|
|
37149
|
-
"massage_bodywork",
|
|
37150
|
-
"therapist_practitioner",
|
|
37151
|
-
"beauty_spa",
|
|
37152
|
-
"consultant_coach",
|
|
37153
|
-
"training_provider",
|
|
37154
|
-
"retreat_centre",
|
|
37155
|
-
"music_school",
|
|
37156
|
-
"voice_singing",
|
|
37157
|
-
"performing_arts_school",
|
|
37158
|
-
"community_wellbeing",
|
|
37159
|
-
"venue_event_space"
|
|
37160
|
-
]);
|
|
37161
|
-
const VERTICAL_PRESET_ID_SET = new Set(VERTICAL_BOOKING_PRESETS.map((presetDefinition) => presetDefinition.id));
|
|
37162
|
-
function parseVerticalId(value) {
|
|
37163
|
-
return typeof value === "string" && VERTICAL_ID_SET.has(value) ? value : null;
|
|
37164
|
-
}
|
|
37165
|
-
function parseVerticalPresetId(value) {
|
|
37166
|
-
return typeof value === "string" && VERTICAL_PRESET_ID_SET.has(value) ? value : null;
|
|
37167
|
-
}
|
|
37168
|
-
function getVerticalPresetDefinition(presetId) {
|
|
37169
|
-
const definition = VERTICAL_BOOKING_PRESETS.find((presetDefinition) => presetDefinition.id === presetId);
|
|
37170
|
-
if (!definition) throw new Error(`Unhandled vertical preset id: ${presetId}`);
|
|
37171
|
-
return definition;
|
|
37172
|
-
}
|
|
37173
|
-
function toNonEmptyVerticalPresetIds(presetIds) {
|
|
37174
|
-
const firstPresetId = presetIds[0];
|
|
37175
|
-
return firstPresetId ? [firstPresetId, ...presetIds.slice(1)] : null;
|
|
37176
|
-
}
|
|
37177
|
-
function createConfiguredSiteVerticalBookingConfig(verticalId, selectedPresetIds) {
|
|
37178
|
-
return {
|
|
37179
|
-
verticalId,
|
|
37180
|
-
selectedPresetIds
|
|
37181
|
-
};
|
|
37182
|
-
}
|
|
37183
|
-
function createSiteVerticalBookingConfig(verticalId, selectedPresetIds) {
|
|
37184
|
-
const nonEmptyPresetIds = toNonEmptyVerticalPresetIds(selectedPresetIds);
|
|
37185
|
-
return nonEmptyPresetIds ? createConfiguredSiteVerticalBookingConfig(verticalId, nonEmptyPresetIds) : null;
|
|
37186
|
-
}
|
|
37187
|
-
function resolveSiteVerticalBookingConfig(rawConfig) {
|
|
37188
|
-
if (!rawConfig) return {
|
|
37189
|
-
kind: "unconfigured",
|
|
37190
|
-
config: DEFAULT_SITE_VERTICAL_BOOKING_CONFIG
|
|
37191
|
-
};
|
|
37192
|
-
const verticalId = parseVerticalId(rawConfig.verticalId);
|
|
37193
|
-
const selectedPresetIds = (Array.isArray(rawConfig.selectedPresetIds) ? rawConfig.selectedPresetIds : []).map(parseVerticalPresetId).filter((presetId) => Boolean(presetId));
|
|
37194
|
-
const config = {
|
|
37195
|
-
verticalId,
|
|
37196
|
-
selectedPresetIds
|
|
37197
|
-
};
|
|
37198
|
-
if (!verticalId && selectedPresetIds.length === 0) return {
|
|
37199
|
-
kind: "unconfigured",
|
|
37200
|
-
config: DEFAULT_SITE_VERTICAL_BOOKING_CONFIG
|
|
37201
|
-
};
|
|
37202
|
-
const issues = getSiteVerticalConfigIssues(rawConfig, config);
|
|
37203
|
-
if (issues.length > 0) return {
|
|
37204
|
-
kind: "invalid",
|
|
37205
|
-
config,
|
|
37206
|
-
issues
|
|
37207
|
-
};
|
|
37208
|
-
const configuredConfig = verticalId ? createSiteVerticalBookingConfig(verticalId, selectedPresetIds) : null;
|
|
37209
|
-
if (!configuredConfig) return {
|
|
37210
|
-
kind: "invalid",
|
|
37211
|
-
config,
|
|
37212
|
-
issues: ["empty_selected_presets"]
|
|
37213
|
-
};
|
|
37214
|
-
return {
|
|
37215
|
-
kind: "configured",
|
|
37216
|
-
config: configuredConfig,
|
|
37217
|
-
selectedPresets: configuredConfig.selectedPresetIds.map(getVerticalPresetDefinition)
|
|
37218
|
-
};
|
|
37219
|
-
}
|
|
37220
|
-
function getSiteVerticalConfigIssues(rawConfig, config) {
|
|
37221
|
-
const issues = /* @__PURE__ */ new Set();
|
|
37222
|
-
if (rawConfig.verticalId != null && !config.verticalId) issues.add("unknown_vertical");
|
|
37223
|
-
if (!config.verticalId && config.selectedPresetIds.length > 0) issues.add("missing_vertical");
|
|
37224
|
-
if ((Array.isArray(rawConfig.selectedPresetIds) ? rawConfig.selectedPresetIds : []).some((presetId) => parseVerticalPresetId(presetId) === null)) issues.add("unknown_preset");
|
|
37225
|
-
if (config.verticalId && config.selectedPresetIds.length === 0) issues.add("empty_selected_presets");
|
|
37226
|
-
const seenBehaviours = /* @__PURE__ */ new Set();
|
|
37227
|
-
for (const presetId of config.selectedPresetIds) {
|
|
37228
|
-
const presetDefinition = getVerticalPresetDefinition(presetId);
|
|
37229
|
-
if (config.verticalId && presetDefinition.verticalId !== config.verticalId) issues.add("preset_vertical_mismatch");
|
|
37230
|
-
if (presetDefinition.availability === "future") issues.add("future_preset_selected");
|
|
37231
|
-
if (seenBehaviours.has(presetDefinition.canonicalBehaviour)) issues.add("duplicate_canonical_behaviour");
|
|
37232
|
-
seenBehaviours.add(presetDefinition.canonicalBehaviour);
|
|
38047
|
+
//#region ../api/src/bookingVerticals.ts
|
|
38048
|
+
/**
|
|
38049
|
+
* Transport adapters for the booking-vertical domain.
|
|
38050
|
+
*
|
|
38051
|
+
* The domain catalog and all pure resolution/selection rules live in core;
|
|
38052
|
+
* this module owns only the Zod boundary used by API payloads.
|
|
38053
|
+
*/
|
|
38054
|
+
function formatRawDiagnosticValue(value) {
|
|
38055
|
+
const serialized = JSON.stringify(value);
|
|
38056
|
+
return serialized === void 0 ? String(value) : serialized;
|
|
38057
|
+
}
|
|
38058
|
+
function describeSiteVerticalConfigIssue(issue) {
|
|
38059
|
+
switch (issue.code) {
|
|
38060
|
+
case "unknown_vertical": return `${issue.code}: ${formatRawDiagnosticValue(issue.rawValue)}`;
|
|
38061
|
+
case "unknown_preset": return `${issue.code}: ${formatRawDiagnosticValue(issue.rawValue)}`;
|
|
38062
|
+
case "missing_vertical":
|
|
38063
|
+
case "empty_selected_presets":
|
|
38064
|
+
case "preset_vertical_mismatch":
|
|
38065
|
+
case "duplicate_preset_id":
|
|
38066
|
+
case "duplicate_canonical_behaviour":
|
|
38067
|
+
case "future_preset_selected": return issue.code;
|
|
38068
|
+
default: return assertNever$2(issue);
|
|
37233
38069
|
}
|
|
37234
|
-
return [...issues];
|
|
37235
38070
|
}
|
|
37236
38071
|
const VerticalIdSchema = z.string().trim().transform((value, ctx) => {
|
|
37237
38072
|
const parsed = parseVerticalId(value);
|
|
@@ -37263,16 +38098,12 @@ z.object({
|
|
|
37263
38098
|
if (resolved.kind === "invalid") {
|
|
37264
38099
|
ctx.addIssue({
|
|
37265
38100
|
code: z.ZodIssueCode.custom,
|
|
37266
|
-
message: `Invalid booking vertical config: ${resolved.issues.join(", ")}`
|
|
38101
|
+
message: `Invalid booking vertical config: ${resolved.issues.map(describeSiteVerticalConfigIssue).join(", ")}`
|
|
37267
38102
|
});
|
|
37268
38103
|
return z.NEVER;
|
|
37269
38104
|
}
|
|
37270
38105
|
return resolved.config;
|
|
37271
38106
|
});
|
|
37272
|
-
const DEFAULT_SITE_VERTICAL_BOOKING_CONFIG = {
|
|
37273
|
-
verticalId: null,
|
|
37274
|
-
selectedPresetIds: []
|
|
37275
|
-
};
|
|
37276
38107
|
//#endregion
|
|
37277
38108
|
//#region ../api/src/utils/isRecord.ts
|
|
37278
38109
|
function isRecord$1(value) {
|