@riverbankcms/sdk 0.130.2 → 0.132.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +3 -3
- package/dist/{PreviewEditorSidebar-BY-1QdE2.mjs → PreviewEditorSidebar-DKQ5eFK9.mjs} +351 -95
- package/dist/{PreviewEditorUI-BS34jI9_.mjs → PreviewEditorUI-CNTcOjCC.mjs} +3 -3
- package/dist/{PreviewQueryProvider-BD0kOjtI.mjs → PreviewQueryProvider-D51gQaG3.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-B1pWnhu-.mjs → SdkPreviewModeRuntime-DJu3qu33.mjs} +48 -9
- package/dist/{SiteChromeCustomizeContext-BhUG_72i.mjs → SiteChromeCustomizeContext-2TzT3vbj.mjs} +6417 -4184
- package/dist/_dts/ai/src/contracts/proposals.d.ts +723 -151
- package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +151 -64
- package/dist/_dts/api/src/bookingConfig.d.ts +13 -9
- package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +8 -19
- package/dist/_dts/api/src/bookingManagementEventEndpointTypes.d.ts +31 -2
- package/dist/_dts/api/src/bookingVerticals.d.ts +1 -140
- package/dist/_dts/api/src/commercePortalEndpoints.d.ts +45 -12
- package/dist/_dts/api/src/contentRuntime.d.ts +2 -1
- package/dist/_dts/api/src/courses.d.ts +1 -19
- package/dist/_dts/api/src/endpoints.d.ts +466 -346
- package/dist/_dts/api/src/event-destination-policy.d.ts +1 -1
- package/dist/_dts/api/src/eventManagementContracts.d.ts +91 -1
- package/dist/_dts/api/src/eventManagementEndpointDefinitions.d.ts +32 -0
- package/dist/_dts/api/src/giftingDashboard.d.ts +117 -0
- package/dist/_dts/api/src/giftingEndpointDefinitions.d.ts +124 -0
- package/dist/_dts/api/src/index.d.ts +4 -4
- package/dist/_dts/api/src/indexCoreTypes.d.ts +1 -1
- package/dist/_dts/api/src/indexExtendedTypes.d.ts +1 -1
- package/dist/_dts/api/src/media.d.ts +1 -0
- package/dist/_dts/api/src/navigation/dashboardBookingsNav.d.ts +3 -4
- package/dist/_dts/api/src/publicEventEndpointDefinitions.d.ts +11 -0
- package/dist/_dts/api/src/publicExperience/eventEndpoints.d.ts +25 -12
- package/dist/_dts/api/src/publicExperience/sharedTypes.d.ts +2 -0
- package/dist/_dts/api/src/publicExperience/wholeSeriesEndpoints.d.ts +1 -0
- package/dist/_dts/api/src/sdk-event-upsert.d.ts +2 -2
- package/dist/_dts/api/src/sdkBookingVerticalContracts.d.ts +29 -0
- package/dist/_dts/api/src/sdkContracts.d.ts +9 -32
- package/dist/_dts/api/src/sdkEndpointDefinitions.d.ts +23 -0
- package/dist/_dts/api/src/sdkSettingsContracts.d.ts +25 -0
- package/dist/_dts/api/src/sdkThemeCatalogContracts.d.ts +20 -0
- package/dist/_dts/api/src/sdkThemeWire.d.ts +16 -6
- package/dist/_dts/api/src/siteOnboarding.d.ts +3 -3
- package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +4 -10
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +0 -3
- package/dist/_dts/api/src/types.d.ts +1 -2
- package/dist/_dts/blocks/src/PageRenderer.d.ts +2 -13
- package/dist/_dts/blocks/src/contracts/non-block-islands.d.ts +9 -0
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +26 -44
- package/dist/_dts/blocks/src/index.d.ts +1 -1
- package/dist/_dts/blocks/src/subroutes/fold.d.ts +2 -1
- package/dist/_dts/blocks/src/system/blocks/courses/shared/index.d.ts +0 -3
- package/dist/_dts/blocks/src/system/blocks/courses/shared/pricing.d.ts +2 -50
- package/dist/_dts/blocks/src/system/blocks/courses/shared/schemas.d.ts +1 -929
- package/dist/_dts/blocks/src/system/blocks/courses/shared/types.d.ts +1 -97
- package/dist/_dts/blocks/src/system/blocks/event-details.d.ts +39 -6
- package/dist/_dts/blocks/src/system/blocks/events/event-calendar.d.ts +2 -1
- package/dist/_dts/blocks/src/system/blocks/events/event-listing.d.ts +3 -3
- package/dist/_dts/blocks/src/system/blocks/events/event-spotlight.d.ts +2 -3
- package/dist/_dts/blocks/src/system/blocks/events/shared/filtering.d.ts +2 -2
- package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +6 -6
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +2 -9
- package/dist/_dts/blocks/src/system/blocks/events/whole-series/index.d.ts +3 -0
- package/dist/_dts/blocks/src/system/blocks/events/whole-series/pricing.d.ts +50 -0
- package/dist/_dts/blocks/src/system/blocks/events/whole-series/schemas.d.ts +135 -0
- package/dist/_dts/blocks/src/system/blocks/events/whole-series/types.d.ts +81 -0
- package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +9 -9
- package/dist/_dts/blocks/src/system/blocks/offerings-preview/model.d.ts +1 -1
- package/dist/_dts/blocks/src/system/fields/boxStyles.d.ts +7 -8
- package/dist/_dts/blocks/src/system/node/validation-constants.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/blockComposition.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +45 -72
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +21 -36
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessWholeSeriesRegistrationFlow.d.ts +6 -6
- package/dist/_dts/blocks/src/system/runtime/nodes/course-page-surface-scope.d.ts +2 -5
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration.client.d.ts +4 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration.interactive.d.ts +19 -7
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details/logic.d.ts +25 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details/presentation.d.ts +75 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details/view.d.ts +4 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details.client.d.ts +5 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details.server.d.ts +5 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/PaymentSelectionStep.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/RegistrationClosedState.d.ts +5 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/SiteCreditPreviewPanel.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/eventPaymentOptions.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/hooks.d.ts +17 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationSurface.d.ts +3 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/siteCreditPreview.d.ts +51 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +3 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/BookingModeStep.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/CheckIcon.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/ErrorStep.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/MembershipHero.d.ts +3 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/PaymentFailedStep.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/StepIndicator.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/VerifyingTimeoutStep.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/WholeSeriesRegistrationActiveSteps.d.ts +9 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration/CourseRegistrationErrorBoundary.d.ts → event-registration/whole-series/WholeSeriesRegistrationErrorBoundary.d.ts} +5 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/WholeSeriesRegistrationTerminalContent.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/WholeSeriesRegistrationWizard.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/components.d.ts +45 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/index.d.ts +4 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/presentation.d.ts +7 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/pricing.d.ts +14 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/types.d.ts +18 -16
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration/useCourseEligibility.d.ts → event-registration/whole-series/useWholeSeriesEligibility.d.ts} +6 -6
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/useWholeSeriesPaymentVerification.d.ts +10 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/useWholeSeriesRegistrationActions.d.ts +35 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration/useCourseRegistrationPortal.d.ts → event-registration/whole-series/useWholeSeriesRegistrationPortal.d.ts} +2 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/useWholeSeriesRegistrationSelection.d.ts +35 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/useWholeSeriesRegistrationWizard.d.ts +185 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration/useCourseWaitlistSelection.d.ts → event-registration/whole-series/useWholeSeriesWaitlistSelection.d.ts} +5 -5
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/utils.d.ts +4 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/whole-series-registration.headless.contract.d.ts +5 -7
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/whole-series-registration.headless.planning.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/wholeSeriesPageSurfaceScope.d.ts +17 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration/courseRegistrationViewState.d.ts → event-registration/whole-series/wholeSeriesRegistrationViewState.d.ts} +7 -7
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/wizardSteps.d.ts +4 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +24 -54
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.client.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.interactive.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventListing.interactive.d.ts +12 -11
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventListing.server.d.ts +3 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventSpotlight.d.ts +3 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventCard.d.ts +3 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventDetailModal.d.ts +4 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventModalCloseButton.d.ts +7 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventModals.d.ts +4 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/WeekBoardView.d.ts +14 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +19 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/shared/MagicLinkForm.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/shared/components/DiscountCodeDisclosure.d.ts +12 -12
- package/dist/_dts/blocks/src/system/runtime/shared/useWaitlistClaim.d.ts +1 -0
- package/dist/_dts/blocks/src/system/transforms/registry/_utils/boxStyleClassNames.d.ts +30 -11
- package/dist/_dts/blocks/src/system/transforms/registry/boxStyles.d.ts +15 -4
- package/dist/_dts/blocks/src/system/transforms/registry/index.d.ts +1 -0
- package/dist/_dts/blocks/src/system/transforms/typed.d.ts +1 -4
- package/dist/_dts/commerce/src/purchase/bookingInstalmentSchedule.d.ts +13 -0
- package/dist/_dts/commerce/src/purchase/cancellationPolicy.d.ts +7 -0
- package/dist/_dts/commerce/src/purchase/canonicalRefundPlanner.d.ts +48 -0
- package/dist/_dts/commerce/src/purchase/checkoutCollectionPlan.d.ts +39 -0
- package/dist/_dts/commerce/src/purchase/checkoutCommitPlan.d.ts +40 -0
- package/dist/_dts/commerce/src/purchase/checkoutDiscountContextPlanning.d.ts +80 -0
- package/dist/_dts/commerce/src/purchase/checkoutErrorCodes.d.ts +1 -0
- package/dist/_dts/commerce/src/purchase/checkoutOrderItemProjection.d.ts +22 -0
- package/dist/_dts/commerce/src/purchase/checkoutPaymentFlow.d.ts +50 -0
- package/dist/_dts/commerce/src/purchase/checkoutPaymentPlanPlanning.d.ts +30 -0
- package/dist/_dts/commerce/src/purchase/checkoutPaymentTermPlanning.d.ts +10 -0
- package/dist/_dts/commerce/src/purchase/checkoutPaymentTerms.d.ts +53 -0
- package/dist/_dts/commerce/src/purchase/checkoutQuantity.d.ts +8 -0
- package/dist/_dts/commerce/src/purchase/checkoutSessionMetadata.d.ts +76 -0
- package/dist/_dts/commerce/src/purchase/checkoutSettlement.d.ts +46 -0
- package/dist/_dts/commerce/src/purchase/checkoutStripeFinalizationPlanning.d.ts +12 -0
- package/dist/_dts/commerce/src/purchase/checkoutStripeSessionPlanning.d.ts +125 -0
- package/dist/_dts/commerce/src/purchase/checkoutValidatedItemPlanning.d.ts +55 -0
- package/dist/_dts/commerce/src/purchase/confirmationEmailPayment.d.ts +91 -0
- package/dist/_dts/commerce/src/purchase/discountApplication.d.ts +74 -0
- package/dist/_dts/commerce/src/purchase/index.d.ts +55 -0
- package/dist/_dts/commerce/src/purchase/oneTimeCheckoutPlanning.d.ts +86 -0
- package/dist/_dts/commerce/src/purchase/order-number.d.ts +33 -0
- package/dist/_dts/commerce/src/purchase/orderCancellationPlan.d.ts +19 -0
- package/dist/_dts/commerce/src/purchase/orderCompletionEmailPlan.d.ts +71 -0
- package/dist/_dts/commerce/src/purchase/orderConfirmationPlanning.d.ts +120 -0
- package/dist/_dts/commerce/src/purchase/orderFulfillmentPlan.d.ts +81 -0
- package/dist/_dts/commerce/src/purchase/orderFulfillmentResult.d.ts +8 -0
- package/dist/_dts/commerce/src/purchase/orderHistoryLedgerFilters.d.ts +1 -0
- package/dist/_dts/commerce/src/purchase/orderHistorySource.d.ts +11 -0
- package/dist/_dts/commerce/src/purchase/orderInstalmentAdminSettlement.d.ts +43 -0
- package/dist/_dts/commerce/src/purchase/orderInstalmentClosure.d.ts +29 -0
- package/dist/_dts/commerce/src/purchase/orderInstalmentLifecycle.d.ts +44 -0
- package/dist/_dts/commerce/src/purchase/orderInstalmentPayoff.d.ts +24 -0
- package/dist/_dts/commerce/src/purchase/orderInstalmentPlan.d.ts +40 -0
- package/dist/_dts/commerce/src/purchase/orderItemMetadata.d.ts +151 -0
- package/dist/_dts/commerce/src/purchase/orderItemSupport.d.ts +14 -0
- package/dist/_dts/commerce/src/purchase/orderListFilters.d.ts +3 -0
- package/dist/_dts/commerce/src/purchase/orderPaymentLinkPlanning.d.ts +60 -0
- package/dist/_dts/commerce/src/purchase/orderPaymentReceipt.d.ts +184 -0
- package/dist/_dts/commerce/src/purchase/orderPaymentState.d.ts +135 -0
- package/dist/_dts/commerce/src/purchase/orderPlanningTypes.d.ts +102 -0
- package/dist/_dts/commerce/src/purchase/orderRefundPlanning.d.ts +50 -0
- package/dist/_dts/commerce/src/purchase/orderRefundPolicy.d.ts +36 -0
- package/dist/_dts/commerce/src/purchase/orderTotals.d.ts +23 -0
- package/dist/_dts/commerce/src/purchase/orderTypes.d.ts +39 -0
- package/dist/_dts/commerce/src/purchase/pendingCheckoutSessionClaim.d.ts +1 -0
- package/dist/_dts/commerce/src/purchase/persistedCheckoutLines.d.ts +27 -0
- package/dist/_dts/commerce/src/purchase/protectedDepositRefundPolicy.d.ts +86 -0
- package/dist/_dts/commerce/src/purchase/refundPolicy.d.ts +8 -0
- package/dist/_dts/commerce/src/purchase/refundRailSplit.d.ts +40 -0
- package/dist/_dts/commerce/src/purchase/result.d.ts +2 -0
- package/dist/_dts/commerce/src/purchase/settlement.d.ts +97 -0
- package/dist/_dts/commerce/src/purchase/shopRefundPlanning.d.ts +43 -0
- package/dist/_dts/commerce/src/purchase/stateTransitions.d.ts +31 -0
- package/dist/_dts/commerce/src/purchase/stripeMinimumCharge.d.ts +10 -0
- package/dist/_dts/commerce/src/purchase/types.d.ts +168 -0
- package/dist/_dts/commerce/src/shop/shipmentEligibility.d.ts +14 -0
- package/dist/_dts/commerce/src/utils/assertNever.d.ts +1 -0
- package/dist/_dts/content-model/src/content-types/builtin-schemas.d.ts +4 -0
- package/dist/_dts/content-model/src/content-types/builtins.d.ts +4 -0
- package/dist/_dts/core/src/booking-vertical-catalog.d.ts +741 -0
- package/dist/_dts/core/src/booking-vertical-config.d.ts +66 -0
- package/dist/_dts/core/src/booking-vertical-definitions.d.ts +68 -0
- package/dist/_dts/{api/src/bookingVerticalPreset.d.ts → core/src/booking-vertical-preset.d.ts} +1 -1
- package/dist/_dts/core/src/booking-verticals.d.ts +98 -0
- package/dist/_dts/core/src/event-page-selection.d.ts +22 -0
- package/dist/_dts/core/src/event-pricing.d.ts +5 -0
- package/dist/_dts/core/src/event-series-behaviour.d.ts +16 -0
- package/dist/_dts/core/src/index.d.ts +3 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +72 -0
- package/dist/_dts/db/src/schemas/forms.d.ts +4 -4
- package/dist/_dts/media-core/src/fileUploadCompletion.d.ts +3 -0
- package/dist/_dts/media-core/src/fileUploadDurableFinalization.d.ts +2 -0
- package/dist/_dts/media-core/src/identifiers.d.ts +10 -0
- package/dist/_dts/media-core/src/mediaWriteNormalizer.d.ts +2 -6
- package/dist/_dts/media-core/src/types.d.ts +2 -1
- package/dist/_dts/media-editor/src/index.d.ts +2 -2
- package/dist/_dts/media-editor/src/mediaSelection.d.ts +1 -22
- package/dist/_dts/media-editor/src/useMediaSelection.d.ts +0 -9
- package/dist/_dts/preview-next/src/client/preview/ButtonHoverRoleControls.d.ts +10 -0
- package/dist/_dts/preview-next/src/client/preview/ButtonStylePicker.d.ts +3 -2
- package/dist/_dts/preview-next/src/client/preview/PreviewEditorSidebar.d.ts +3 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.d.ts +3 -1
- package/dist/_dts/preview-next/src/client/preview/StyleConfiguratorWarningNotice.d.ts +7 -0
- package/dist/_dts/preview-next/src/client/preview/siteStylePreviewPlanner.d.ts +1 -1
- package/dist/_dts/sdk/src/client/eventSubrouteReadOperations.d.ts +11 -0
- package/dist/_dts/sdk/src/client/types.d.ts +12 -5
- package/dist/_dts/sdk/src/components.d.ts +1 -1
- package/dist/_dts/sdk/src/contracts/index.d.ts +1 -1
- package/dist/_dts/sdk/src/contracts/page.d.ts +2 -13
- package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +4 -16
- package/dist/_dts/sdk/src/next/pageMetadataProjection.d.ts +7 -0
- package/dist/_dts/sdk/src/next/resolveEventPageSubroute.d.ts +12 -0
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +5 -19
- package/dist/_dts/sdk/src/public-api/eventSubrouteContracts.d.ts +12 -0
- package/dist/_dts/sdk/src/public-api/runtime.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/client.d.ts +44 -0
- package/dist/_dts/sdk/src/rendering/index.d.ts +1 -1
- package/dist/_dts/sdk/src/routing/entrySubroutes.d.ts +1 -1
- package/dist/_dts/sdk/src/routing/resolveOccurrence.d.ts +4 -3
- package/dist/_dts/sdk/src/routing/resolvePageContent.d.ts +7 -3
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/theme-core/src/buttons/buttonSurfaceContext.d.ts +1 -1
- package/dist/_dts/theme-core/src/buttons/contextualHover.d.ts +41 -0
- package/dist/_dts/theme-core/src/buttons/index.d.ts +1 -0
- package/dist/_dts/theme-core/src/buttons/resolveButtonColourStates.d.ts +3 -0
- package/dist/_dts/theme-core/src/buttons/resolveButtonHoverTreatment.d.ts +14 -0
- package/dist/_dts/theme-core/src/buttons/styles/domain.d.ts +21 -4
- package/dist/_dts/theme-core/src/buttons/styles/recipes/flatInk.d.ts +92 -0
- package/dist/_dts/theme-core/src/buttons/styles/recipes/staticRecipes.d.ts +10 -150
- package/dist/_dts/theme-core/src/buttons/styles/registry.d.ts +57 -102
- package/dist/_dts/theme-core/src/buttons/styles/selection.d.ts +50 -2
- package/dist/_dts/theme-core/src/buttons/types.d.ts +29 -0
- package/dist/_dts/theme-core/src/cards/types.d.ts +3 -25
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +21 -6
- package/dist/_dts/theme-core/src/schema.d.ts +21 -33
- package/dist/_dts/theme-core/src/site-styles/appearancePresetCatalog.d.ts +27 -0
- package/dist/_dts/theme-core/src/site-styles/blockAppearancePresets.d.ts +27 -0
- package/dist/_dts/theme-core/src/site-styles/buttonSelectionCompiler.d.ts +18 -0
- package/dist/_dts/theme-core/src/site-styles/compilationPlan.d.ts +21 -0
- package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +2 -11
- package/dist/_dts/theme-core/src/site-styles/selectionFallbackWarning.d.ts +15 -0
- package/dist/_dts/theme-core/src/site-styles/types.d.ts +13 -1
- package/dist/_dts/ui/src/navigation-tabs.d.ts +2 -0
- package/dist/client/{DiscountCodeDisclosure-BPZ-yfGI.mjs → DiscountCodeDisclosure-DO7llLxm.mjs} +12 -12
- package/dist/client/{EventCombined.client-Cjt3kKYR.mjs → EventCombined.client-xID7zN__.mjs} +36 -48
- package/dist/client/{EventListing.client-DY9dn6Fh.mjs → EventListing.client-CriBslp0.mjs} +2 -2
- package/dist/client/{LeafletStaticMap--2c61XYn.mjs → LeafletStaticMap-DYmHnM8g.mjs} +1 -1
- package/dist/client/{StepIndicator-CLjQhkDb.mjs → StepIndicator-CGixP_LW.mjs} +2 -2
- package/dist/client/{CourseRegistrationWizard-DGW9F0SQ.mjs → WholeSeriesRegistrationWizard-BEjzSiOA.mjs} +1408 -1245
- package/dist/client/{accordion-_boYwHHi.mjs → accordion-CgFbnnnQ.mjs} +1 -1
- package/dist/client/{bookingForm--AqEfyBX.mjs → bookingForm-dUyGpbxc.mjs} +5 -5
- package/dist/client/bookings.mjs +635 -471
- package/dist/client/{carousel-CVI2dqZr.mjs → carousel-BvBwkUzx.mjs} +1 -1
- package/dist/client/{cart-DR6IiPz9.mjs → cart-DiZENT2E.mjs} +3 -3
- package/dist/client/{checkout-CsrGAfQt.mjs → checkout-Dq13KIgR.mjs} +3 -3
- package/dist/client/client.mjs +6291 -3452
- package/dist/client/{courseRegistration-aNJVaLa3.mjs → courseRegistration-CKC5NmyH.mjs} +10 -4
- package/dist/client/{eventCalendar-OZ7h59VN.mjs → eventCalendar-BF0Jatfw.mjs} +40 -43
- package/dist/client/{eventCombined-BbJ6bFKz.mjs → eventCombined-BuoCF8je.mjs} +2 -2
- package/dist/client/{eventDetails-BLyUBiCT.mjs → eventDetails-CKwh0S9s.mjs} +276 -94
- package/dist/client/{eventListing-DuP1yhBS.mjs → eventListing-eUxaWFaB.mjs} +2 -2
- package/dist/client/{eventRegistration-BXyECPa-.mjs → eventRegistration-CfkNOkPb.mjs} +625 -132
- package/dist/client/{form-BA4t3kKU.mjs → form-C17H1c_H.mjs} +1 -1
- package/dist/client/{headerSection-CpNaJxhW.mjs → headerSection-DEwUmrtt.mjs} +2 -2
- package/dist/client/hooks.mjs +1312 -481
- package/dist/client/{locationMap-3HGMCL7_.mjs → locationMap-Pf2QwuvW.mjs} +2 -2
- package/dist/client/{newsletterForm-C2s6Mw67.mjs → newsletterForm-BWQAH5Sv.mjs} +1 -1
- package/dist/client/pricing-CVdvbopJ.mjs +195 -0
- package/dist/client/{productDetail-C9joWhdE.mjs → productDetail-BZi1Fa_G.mjs} +3 -3
- package/dist/client/{productList-CjzdU3pB.mjs → productList-qq-55DNk.mjs} +3 -3
- package/dist/client/{propsDecoder-CBPGXEYX.mjs → propsDecoder-BxmqPKdP.mjs} +412 -196
- package/dist/client/rendering/client.mjs +5685 -4037
- package/dist/client/rendering/islands.mjs +18 -18
- package/dist/client/rendering.mjs +7006 -4124
- package/dist/client/{scrollToBlock-DZ73aEX6.mjs → scrollToBlock-B3CcKdtG.mjs} +1 -1
- package/dist/client/{shop-CQRai7hj.mjs → shop-DNWJPut5.mjs} +5 -5
- package/dist/client/{shop-commerce-hP9UboOx.mjs → shop-commerce-BhvQCosS.mjs} +4 -4
- package/dist/client/{shop-commerce-store-DiD5a32e.mjs → shop-commerce-store-B04sCNnW.mjs} +1 -1
- package/dist/client/{shopShared-DP8DXTkF.mjs → shopShared-DNNgZlmW.mjs} +2 -2
- package/dist/client/{useEventFilters-pF_OJNQP.mjs → useEventFilters-CUmhE24_.mjs} +195 -6
- package/dist/client/{usePolling-Cls91SD2.mjs → usePolling-M5jG675x.mjs} +3 -3
- package/dist/preview-next/before-render.mjs +247 -60
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/keepAlive.mjs +247 -60
- package/dist/preview-next/middleware.mjs +247 -60
- package/dist/{previewAuthStore-CX1C_KJ4.mjs → previewAuthStore-BFKd4LrN.mjs} +247 -60
- package/dist/{sdk-runtime-5CcPAI14.mjs → sdk-runtime-BEXb1wqo.mjs} +2 -2
- package/dist/{separator-BXlYN_gr.mjs → separator-DGMuip1D.mjs} +1 -1
- package/dist/server/components.mjs +3461 -1577
- package/dist/server/config-validation.mjs +1312 -482
- package/dist/server/config.mjs +1312 -482
- package/dist/server/data.mjs +1312 -481
- package/dist/server/index.mjs +289 -81
- package/dist/server/manifest.mjs +0 -1
- package/dist/server/next.mjs +3576 -1689
- package/dist/server/page-converter.mjs +797 -250
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +3461 -1576
- package/dist/server/rendering.mjs +3461 -1577
- package/dist/server/routing.mjs +1555 -616
- package/dist/server/server.mjs +1352 -560
- package/dist/server/theme-bridge.mjs +1992 -931
- package/dist/server/theme.mjs +346 -133
- package/dist/styles/index.css +1602 -796
- package/package.json +1 -1
- package/dist/_dts/api/src/bookingVerticalCatalog.d.ts +0 -746
- package/dist/_dts/api/src/eventSeriesPresentationPreset.d.ts +0 -12
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/CourseRegistrationWizard.d.ts +0 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/StepIndicator.d.ts +0 -6
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/components.d.ts +0 -45
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/pricing.d.ts +0 -14
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/useCoursePaymentVerification.d.ts +0 -9
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/useCourseRegistrationActions.d.ts +0 -35
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/useCourseRegistrationSelection.d.ts +0 -31
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/useCourseRegistrationWizard.d.ts +0 -102
- package/dist/client/eventProductEligibility-AVxyCB1u.mjs +0 -50
- package/dist/client/pricing-BiqIMgZk.mjs +0 -174
- /package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/PortalAuthSidebar.d.ts +0 -0
- /package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/SuccessStep.d.ts +0 -0
- /package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/WaitlistStep.d.ts +0 -0
package/dist/server/config.mjs
CHANGED
|
@@ -1377,6 +1377,17 @@ const PUBLIC_WHOLE_SERIES_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
1377
1377
|
}
|
|
1378
1378
|
});
|
|
1379
1379
|
//#endregion
|
|
1380
|
+
//#region ../api/src/publicEventEndpointDefinitions.ts
|
|
1381
|
+
const PUBLIC_EVENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({ resolveEventSubroute: {
|
|
1382
|
+
path: "/public/sites/{siteId}/events/subroutes/resolve",
|
|
1383
|
+
method: "GET",
|
|
1384
|
+
revalidate: 60,
|
|
1385
|
+
tags: [TAG_TEMPLATES.publicEvents, "event-subroute"],
|
|
1386
|
+
auth: "public",
|
|
1387
|
+
responseKind: "json",
|
|
1388
|
+
errors: []
|
|
1389
|
+
} });
|
|
1390
|
+
//#endregion
|
|
1380
1391
|
//#region ../api/src/siteApiKeyEndpointDefinitions.ts
|
|
1381
1392
|
const SITE_API_KEY_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
1382
1393
|
listSiteApiKeys: {
|
|
@@ -1503,13 +1514,249 @@ const EVENT_MANAGEMENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
1503
1514
|
"resource:conflict",
|
|
1504
1515
|
"server:internal_error"
|
|
1505
1516
|
]
|
|
1517
|
+
},
|
|
1518
|
+
updateEventIdentity: {
|
|
1519
|
+
path: "/sites/{siteId}/bookings/events/{eventId}",
|
|
1520
|
+
method: "PATCH",
|
|
1521
|
+
tags: ["site-{siteId}", "event-series-{siteId}"],
|
|
1522
|
+
auth: "user",
|
|
1523
|
+
responseKind: "json",
|
|
1524
|
+
errors: [
|
|
1525
|
+
"validation:invalid_input",
|
|
1526
|
+
"resource:not_found",
|
|
1527
|
+
"server:internal_error"
|
|
1528
|
+
]
|
|
1529
|
+
},
|
|
1530
|
+
createWholeSeriesRun: {
|
|
1531
|
+
path: "/sites/{siteId}/bookings/events/{eventId}/runs",
|
|
1532
|
+
method: "POST",
|
|
1533
|
+
tags: ["site-{siteId}", "event-series-{siteId}"],
|
|
1534
|
+
auth: "user",
|
|
1535
|
+
responseKind: "json",
|
|
1536
|
+
errors: [
|
|
1537
|
+
"validation:invalid_input",
|
|
1538
|
+
"resource:not_found",
|
|
1539
|
+
"resource:already_exists",
|
|
1540
|
+
"server:internal_error"
|
|
1541
|
+
]
|
|
1542
|
+
},
|
|
1543
|
+
updateWholeSeriesRun: {
|
|
1544
|
+
path: "/sites/{siteId}/bookings/events/{eventId}/runs/{runId}",
|
|
1545
|
+
method: "PATCH",
|
|
1546
|
+
tags: ["site-{siteId}", "event-series-{siteId}"],
|
|
1547
|
+
auth: "user",
|
|
1548
|
+
responseKind: "json",
|
|
1549
|
+
errors: [
|
|
1550
|
+
"validation:invalid_input",
|
|
1551
|
+
"resource:not_found",
|
|
1552
|
+
"resource:conflict",
|
|
1553
|
+
"server:internal_error"
|
|
1554
|
+
]
|
|
1555
|
+
},
|
|
1556
|
+
cancelWholeSeriesRun: {
|
|
1557
|
+
path: "/sites/{siteId}/bookings/events/{eventId}/runs/{runId}/cancellation",
|
|
1558
|
+
method: "POST",
|
|
1559
|
+
tags: ["site-{siteId}", "event-series-{siteId}"],
|
|
1560
|
+
auth: "user",
|
|
1561
|
+
responseKind: "json",
|
|
1562
|
+
errors: [
|
|
1563
|
+
"validation:invalid_input",
|
|
1564
|
+
"resource:not_found",
|
|
1565
|
+
"resource:conflict",
|
|
1566
|
+
"server:internal_error"
|
|
1567
|
+
]
|
|
1506
1568
|
}
|
|
1507
1569
|
});
|
|
1508
|
-
|
|
1570
|
+
//#endregion
|
|
1571
|
+
//#region ../api/src/giftingEndpointDefinitions.ts
|
|
1572
|
+
/**
|
|
1573
|
+
* Gifting endpoints (gift cards & vouchers) — the dashboard surface that manages
|
|
1574
|
+
* offers, gifts and settings, plus the public buy/claim surface.
|
|
1575
|
+
*/
|
|
1576
|
+
const GIFTING_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
1577
|
+
createGiftingOffer: {
|
|
1578
|
+
path: "/sites/{siteId}/gifting/offers",
|
|
1579
|
+
method: "POST",
|
|
1580
|
+
tags: ["site-{siteId}", "gifting-offers-{siteId}"],
|
|
1581
|
+
auth: "user",
|
|
1582
|
+
responseKind: "json",
|
|
1583
|
+
errors: [
|
|
1584
|
+
"validation:invalid_input",
|
|
1585
|
+
"auth:forbidden",
|
|
1586
|
+
"server:internal_error"
|
|
1587
|
+
]
|
|
1588
|
+
},
|
|
1589
|
+
updateGiftingOffer: {
|
|
1590
|
+
path: "/sites/{siteId}/gifting/offers/{offerId}",
|
|
1591
|
+
method: "PATCH",
|
|
1592
|
+
tags: ["site-{siteId}", "gifting-offers-{siteId}"],
|
|
1593
|
+
auth: "user",
|
|
1594
|
+
responseKind: "json",
|
|
1595
|
+
errors: [
|
|
1596
|
+
"validation:invalid_input",
|
|
1597
|
+
"auth:forbidden",
|
|
1598
|
+
"resource:not_found",
|
|
1599
|
+
"resource:conflict",
|
|
1600
|
+
"server:internal_error"
|
|
1601
|
+
]
|
|
1602
|
+
},
|
|
1603
|
+
deleteGiftingOffer: {
|
|
1604
|
+
path: "/sites/{siteId}/gifting/offers/{offerId}",
|
|
1605
|
+
method: "DELETE",
|
|
1606
|
+
tags: ["site-{siteId}", "gifting-offers-{siteId}"],
|
|
1607
|
+
auth: "user",
|
|
1608
|
+
responseKind: "json",
|
|
1609
|
+
errors: [
|
|
1610
|
+
"auth:forbidden",
|
|
1611
|
+
"resource:not_found",
|
|
1612
|
+
"resource:conflict",
|
|
1613
|
+
"server:internal_error"
|
|
1614
|
+
]
|
|
1615
|
+
},
|
|
1616
|
+
duplicateGiftingOffer: {
|
|
1617
|
+
path: "/sites/{siteId}/gifting/offers/{offerId}/duplicate",
|
|
1618
|
+
method: "POST",
|
|
1619
|
+
tags: ["site-{siteId}", "gifting-offers-{siteId}"],
|
|
1620
|
+
auth: "user",
|
|
1621
|
+
responseKind: "json",
|
|
1622
|
+
errors: [
|
|
1623
|
+
"auth:forbidden",
|
|
1624
|
+
"resource:not_found",
|
|
1625
|
+
"server:internal_error"
|
|
1626
|
+
]
|
|
1627
|
+
},
|
|
1628
|
+
reorderGiftingOffers: {
|
|
1629
|
+
path: "/sites/{siteId}/gifting/offers/order",
|
|
1630
|
+
method: "PUT",
|
|
1631
|
+
tags: ["site-{siteId}", "gifting-offers-{siteId}"],
|
|
1632
|
+
auth: "user",
|
|
1633
|
+
responseKind: "json",
|
|
1634
|
+
errors: [
|
|
1635
|
+
"validation:invalid_input",
|
|
1636
|
+
"auth:forbidden",
|
|
1637
|
+
"resource:not_found",
|
|
1638
|
+
"server:internal_error"
|
|
1639
|
+
]
|
|
1640
|
+
},
|
|
1641
|
+
sendGift: {
|
|
1642
|
+
path: "/sites/{siteId}/gifting/gifts",
|
|
1643
|
+
method: "POST",
|
|
1644
|
+
tags: ["site-{siteId}", "gifting-gifts-{siteId}"],
|
|
1645
|
+
auth: "user",
|
|
1646
|
+
demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN,
|
|
1647
|
+
responseKind: "json",
|
|
1648
|
+
errors: [
|
|
1649
|
+
"validation:invalid_input",
|
|
1650
|
+
"auth:forbidden",
|
|
1651
|
+
"resource:not_found",
|
|
1652
|
+
"server:internal_error"
|
|
1653
|
+
]
|
|
1654
|
+
},
|
|
1655
|
+
resendGift: {
|
|
1656
|
+
path: "/sites/{siteId}/gifting/gifts/{giftId}/resend",
|
|
1657
|
+
method: "POST",
|
|
1658
|
+
tags: ["site-{siteId}", "gifting-gifts-{siteId}"],
|
|
1659
|
+
auth: "user",
|
|
1660
|
+
demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN,
|
|
1661
|
+
responseKind: "json",
|
|
1662
|
+
errors: [
|
|
1663
|
+
"auth:forbidden",
|
|
1664
|
+
"resource:not_found",
|
|
1665
|
+
"resource:conflict",
|
|
1666
|
+
"server:internal_error"
|
|
1667
|
+
]
|
|
1668
|
+
},
|
|
1669
|
+
correctGiftEmailAndResend: {
|
|
1670
|
+
path: "/sites/{siteId}/gifting/gifts/{giftId}/correct-email-and-resend",
|
|
1671
|
+
method: "POST",
|
|
1672
|
+
tags: ["site-{siteId}", "gifting-gifts-{siteId}"],
|
|
1673
|
+
auth: "user",
|
|
1674
|
+
demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN,
|
|
1675
|
+
responseKind: "json",
|
|
1676
|
+
errors: [
|
|
1677
|
+
"validation:invalid_input",
|
|
1678
|
+
"auth:forbidden",
|
|
1679
|
+
"resource:not_found",
|
|
1680
|
+
"resource:conflict",
|
|
1681
|
+
"server:internal_error"
|
|
1682
|
+
]
|
|
1683
|
+
},
|
|
1684
|
+
updateGiftingSettings: {
|
|
1685
|
+
path: "/sites/{siteId}/gifting/settings",
|
|
1686
|
+
method: "PATCH",
|
|
1687
|
+
tags: [
|
|
1688
|
+
"site-{siteId}",
|
|
1689
|
+
"gifting-offers-{siteId}",
|
|
1690
|
+
"gifting-gifts-{siteId}"
|
|
1691
|
+
],
|
|
1692
|
+
auth: "user",
|
|
1693
|
+
responseKind: "json",
|
|
1694
|
+
errors: [
|
|
1695
|
+
"validation:invalid_input",
|
|
1696
|
+
"auth:forbidden",
|
|
1697
|
+
"server:internal_error"
|
|
1698
|
+
]
|
|
1699
|
+
},
|
|
1700
|
+
listPublicGiftingOffers: {
|
|
1701
|
+
path: "/public/sites/{siteId}/gifting/offers",
|
|
1702
|
+
method: "GET",
|
|
1703
|
+
revalidate: 300,
|
|
1704
|
+
tags: [TAG_TEMPLATES.publicGifting],
|
|
1705
|
+
errors: [],
|
|
1706
|
+
auth: "public",
|
|
1707
|
+
responseKind: "json"
|
|
1708
|
+
},
|
|
1709
|
+
createPublicGiftingCheckout: {
|
|
1710
|
+
path: "/public/sites/{siteId}/gifting/checkout",
|
|
1711
|
+
method: "POST",
|
|
1712
|
+
tags: [TAG_TEMPLATES.publicGifting],
|
|
1713
|
+
errors: [],
|
|
1714
|
+
auth: "public",
|
|
1715
|
+
responseKind: "json"
|
|
1716
|
+
},
|
|
1717
|
+
claimGiftCardPublic: {
|
|
1718
|
+
path: "/public/sites/{siteId}/gifting/claim",
|
|
1719
|
+
method: "POST",
|
|
1720
|
+
tags: [TAG_TEMPLATES.publicGifting],
|
|
1721
|
+
errors: [],
|
|
1722
|
+
auth: "public",
|
|
1723
|
+
responseKind: "json"
|
|
1724
|
+
}
|
|
1725
|
+
});
|
|
1726
|
+
//#endregion
|
|
1727
|
+
//#region ../api/src/sdkEndpointDefinitions.ts
|
|
1728
|
+
/** SDK management endpoints that do not belong to a CRUD resource family. */
|
|
1729
|
+
const SDK_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
1730
|
+
sdkUpdateSettings: {
|
|
1731
|
+
path: "/sdk/{siteId}/settings",
|
|
1732
|
+
method: "PATCH",
|
|
1733
|
+
auth: "service",
|
|
1734
|
+
responseKind: "json",
|
|
1735
|
+
errors: ["validation:invalid_input", "server:internal_error"]
|
|
1736
|
+
},
|
|
1737
|
+
sdkConfigureBookingVertical: {
|
|
1738
|
+
path: "/sdk/{siteId}/settings/booking/vertical",
|
|
1739
|
+
method: "POST",
|
|
1740
|
+
auth: "service",
|
|
1741
|
+
responseKind: "json"
|
|
1742
|
+
},
|
|
1743
|
+
sdkSetupRevalidationWebhook: {
|
|
1744
|
+
path: "/sdk/{siteId}/webhooks/revalidation/setup",
|
|
1745
|
+
method: "POST",
|
|
1746
|
+
auth: "service",
|
|
1747
|
+
responseKind: "json",
|
|
1748
|
+
errors: ["validation:invalid_input", "server:internal_error"]
|
|
1749
|
+
}
|
|
1750
|
+
});
|
|
1751
|
+
({
|
|
1752
|
+
...ACCOUNT_ENDPOINT_DEFINITIONS,
|
|
1753
|
+
...PUBLIC_EVENT_ENDPOINT_DEFINITIONS,
|
|
1754
|
+
...GIFTING_ENDPOINT_DEFINITIONS
|
|
1755
|
+
}), 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, {
|
|
1509
1756
|
...NEWSLETTER_ENDPOINT_DEFINITIONS,
|
|
1510
1757
|
...APPOINTMENT_ENDPOINT_DEFINITIONS,
|
|
1511
1758
|
...COURSE_ENDPOINT_DEFINITIONS
|
|
1512
|
-
}, 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.
|
|
1759
|
+
}, 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 };
|
|
1513
1760
|
z.object({ refreshToken: z.string().min(1).max(4096) }).strict();
|
|
1514
1761
|
z.object({
|
|
1515
1762
|
accessToken: z.string().min(1).max(4096),
|
|
@@ -2011,6 +2258,298 @@ function parseManagementKey(raw) {
|
|
|
2011
2258
|
if (typeof raw !== "string" || !raw.startsWith("bld_mgmt_sk_") || raw.length === 12) return err({ kind: "invalid-management-key" });
|
|
2012
2259
|
return ok(createSecretInternal("management-key", raw));
|
|
2013
2260
|
}
|
|
2261
|
+
//#endregion
|
|
2262
|
+
//#region ../core/src/event-series-behaviour.ts
|
|
2263
|
+
const SURFACE_EVENT_PRESET_VALUES = [
|
|
2264
|
+
"class",
|
|
2265
|
+
"course",
|
|
2266
|
+
"term",
|
|
2267
|
+
"workshop",
|
|
2268
|
+
"retreat",
|
|
2269
|
+
"performance"
|
|
2270
|
+
];
|
|
2271
|
+
//#endregion
|
|
2272
|
+
//#region ../core/src/booking-vertical-preset.ts
|
|
2273
|
+
const BOOKING_ENGINE_BY_BEHAVIOUR = {
|
|
2274
|
+
class: "event_series",
|
|
2275
|
+
workshop: "event_series",
|
|
2276
|
+
course: "event_series",
|
|
2277
|
+
retreat: "event_series",
|
|
2278
|
+
performance: "event_series",
|
|
2279
|
+
appointment: "appointment_service"
|
|
2280
|
+
};
|
|
2281
|
+
function verticalBookingPreset(id, verticalId, canonicalBehaviour, label, pluralLabel, description, availability = "onboarding") {
|
|
2282
|
+
return {
|
|
2283
|
+
id,
|
|
2284
|
+
verticalId,
|
|
2285
|
+
canonicalBehaviour,
|
|
2286
|
+
engine: BOOKING_ENGINE_BY_BEHAVIOUR[canonicalBehaviour],
|
|
2287
|
+
availability,
|
|
2288
|
+
label,
|
|
2289
|
+
pluralLabel,
|
|
2290
|
+
description
|
|
2291
|
+
};
|
|
2292
|
+
}
|
|
2293
|
+
//#endregion
|
|
2294
|
+
//#region ../core/src/booking-vertical-definitions.ts
|
|
2295
|
+
const VERTICAL_DEFINITIONS = [
|
|
2296
|
+
{
|
|
2297
|
+
id: "yoga_wellness",
|
|
2298
|
+
label: "Yoga, meditation or mindfulness",
|
|
2299
|
+
description: "Yoga studios, wellness teachers, and movement practitioners."
|
|
2300
|
+
},
|
|
2301
|
+
{
|
|
2302
|
+
id: "fitness_pt",
|
|
2303
|
+
label: "Fitness and personal training",
|
|
2304
|
+
description: "Personal trainers, group training, and fitness programmes."
|
|
2305
|
+
},
|
|
2306
|
+
{
|
|
2307
|
+
id: "dance_school",
|
|
2308
|
+
label: "Dance school",
|
|
2309
|
+
description: "Dance classes, courses or terms, workshops, private lessons, and shows."
|
|
2310
|
+
},
|
|
2311
|
+
{
|
|
2312
|
+
id: "physiotherapy_physical_health",
|
|
2313
|
+
label: "Physiotherapy & physical health",
|
|
2314
|
+
description: "Physiotherapists, chiropractors, osteopaths, sports therapists, and rehabilitation practitioners."
|
|
2315
|
+
},
|
|
2316
|
+
{
|
|
2317
|
+
id: "massage_bodywork",
|
|
2318
|
+
label: "Massage & bodywork",
|
|
2319
|
+
description: "Massage therapists, bodyworkers, and somatic practitioners."
|
|
2320
|
+
},
|
|
2321
|
+
{
|
|
2322
|
+
id: "therapist_practitioner",
|
|
2323
|
+
label: "Therapist or practitioner",
|
|
2324
|
+
description: "Appointments, sessions, consultations, and occasional group work."
|
|
2325
|
+
},
|
|
2326
|
+
{
|
|
2327
|
+
id: "beauty_spa",
|
|
2328
|
+
label: "Beauty or spa",
|
|
2329
|
+
description: "Treatment-led businesses with optional workshops."
|
|
2330
|
+
},
|
|
2331
|
+
{
|
|
2332
|
+
id: "consultant_coach",
|
|
2333
|
+
label: "Consultant or coach",
|
|
2334
|
+
description: "One-to-one calls, workshops, courses, and retreats."
|
|
2335
|
+
},
|
|
2336
|
+
{
|
|
2337
|
+
id: "training_provider",
|
|
2338
|
+
label: "Training provider",
|
|
2339
|
+
description: "Courses, workshops, classes, appointments, and residential training."
|
|
2340
|
+
},
|
|
2341
|
+
{
|
|
2342
|
+
id: "retreat_centre",
|
|
2343
|
+
label: "Retreat centre",
|
|
2344
|
+
description: "Residential retreats, workshops, classes, courses, and private sessions."
|
|
2345
|
+
},
|
|
2346
|
+
{
|
|
2347
|
+
id: "music_school",
|
|
2348
|
+
label: "Music teacher or school",
|
|
2349
|
+
description: "Lessons, classes, terms, workshops, and performances."
|
|
2350
|
+
},
|
|
2351
|
+
{
|
|
2352
|
+
id: "voice_singing",
|
|
2353
|
+
label: "Voice & Singing",
|
|
2354
|
+
description: "Singing lessons, choirs, voice circles, workshops, and performances."
|
|
2355
|
+
},
|
|
2356
|
+
{
|
|
2357
|
+
id: "performing_arts_school",
|
|
2358
|
+
label: "Theatre or performing arts school",
|
|
2359
|
+
description: "Classes, terms, workshops, performances, and lessons."
|
|
2360
|
+
},
|
|
2361
|
+
{
|
|
2362
|
+
id: "community_wellbeing",
|
|
2363
|
+
label: "Community or wellbeing centre",
|
|
2364
|
+
description: "Groups, workshops, courses, appointments, and retreats."
|
|
2365
|
+
},
|
|
2366
|
+
{
|
|
2367
|
+
id: "venue_event_space",
|
|
2368
|
+
label: "Venue or event space",
|
|
2369
|
+
description: "Room, resource, or access bookings. Depends on the future capacity-booking domain."
|
|
2370
|
+
}
|
|
2371
|
+
];
|
|
2372
|
+
VERTICAL_DEFINITIONS.map(({ id }) => id);
|
|
2373
|
+
//#endregion
|
|
2374
|
+
//#region ../core/src/booking-vertical-catalog.ts
|
|
2375
|
+
const VERTICAL_BOOKING_PRESETS = [
|
|
2376
|
+
verticalBookingPreset("yoga_wellness.classes", "yoga_wellness", "class", "Class", "Classes", "Regular scheduled classes and group sessions."),
|
|
2377
|
+
verticalBookingPreset("yoga_wellness.workshops", "yoga_wellness", "workshop", "Workshop", "Workshops", "One-off workshops, day retreats, or special sessions."),
|
|
2378
|
+
verticalBookingPreset("yoga_wellness.courses", "yoga_wellness", "course", "Course", "Courses", "Fixed-schedule courses or multi-session groups."),
|
|
2379
|
+
verticalBookingPreset("yoga_wellness.retreats", "yoga_wellness", "retreat", "Retreat", "Retreats", "Multi-day or residential retreats and immersive experiences."),
|
|
2380
|
+
verticalBookingPreset("yoga_wellness.appointments", "yoga_wellness", "appointment", "Appointment", "Appointments", "Private sessions, consultations, or one-to-one support."),
|
|
2381
|
+
verticalBookingPreset("fitness_pt.group_training", "fitness_pt", "class", "Group training", "Group training", "Regular scheduled classes and group sessions."),
|
|
2382
|
+
verticalBookingPreset("fitness_pt.personal_training", "fitness_pt", "appointment", "Personal training", "Personal training", "One-to-one sessions booked from your availability."),
|
|
2383
|
+
verticalBookingPreset("fitness_pt.programmes", "fitness_pt", "course", "Programme", "Programmes", "Multi-session programmes like bootcamps or courses."),
|
|
2384
|
+
verticalBookingPreset("fitness_pt.workshops", "fitness_pt", "workshop", "Workshop", "Workshops", "One-off workshops, events, or special sessions."),
|
|
2385
|
+
verticalBookingPreset("fitness_pt.retreats", "fitness_pt", "retreat", "Retreat", "Retreats", "Multi-day or residential fitness experiences."),
|
|
2386
|
+
verticalBookingPreset("dance_school.classes", "dance_school", "class", "Class", "Classes", "Regular group classes and weekly sessions."),
|
|
2387
|
+
{
|
|
2388
|
+
...verticalBookingPreset("dance_school.terms", "dance_school", "course", "Term", "Terms", "Multi-week term blocks or fixed-date course groups."),
|
|
2389
|
+
eventPresetOverride: "term"
|
|
2390
|
+
},
|
|
2391
|
+
verticalBookingPreset("dance_school.courses", "dance_school", "course", "Course", "Courses", "Fixed-schedule courses or multi-session groups.", "settings"),
|
|
2392
|
+
verticalBookingPreset("dance_school.workshops", "dance_school", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, or intensives."),
|
|
2393
|
+
verticalBookingPreset("dance_school.private_lessons", "dance_school", "appointment", "Private lesson", "Private lessons", "One-to-one lessons or coaching sessions."),
|
|
2394
|
+
verticalBookingPreset("dance_school.shows", "dance_school", "performance", "Show", "Shows", "Ticketed performances, showcases, and recitals."),
|
|
2395
|
+
verticalBookingPreset("physiotherapy_physical_health.appointments", "physiotherapy_physical_health", "appointment", "Appointment", "Appointments", "Assessments, treatments, follow-ups, and rehabilitation sessions."),
|
|
2396
|
+
verticalBookingPreset("physiotherapy_physical_health.rehab_classes", "physiotherapy_physical_health", "class", "Rehab class", "Rehab classes", "Regular rehabilitation, mobility, strength, or recovery classes."),
|
|
2397
|
+
verticalBookingPreset("physiotherapy_physical_health.workshops", "physiotherapy_physical_health", "workshop", "Workshop", "Workshops", "One-off workshops, talks, or practical group sessions."),
|
|
2398
|
+
verticalBookingPreset("massage_bodywork.treatments", "massage_bodywork", "appointment", "Treatment", "Treatments", "Massage treatments, bodywork sessions, and one-to-one appointments."),
|
|
2399
|
+
verticalBookingPreset("massage_bodywork.group_sessions", "massage_bodywork", "class", "Group session", "Group sessions", "Regular bodywork, somatic movement, or self-massage sessions."),
|
|
2400
|
+
verticalBookingPreset("massage_bodywork.workshops", "massage_bodywork", "workshop", "Workshop", "Workshops", "One-off bodywork, self-massage, or somatic practice workshops."),
|
|
2401
|
+
verticalBookingPreset("therapist_practitioner.appointments", "therapist_practitioner", "appointment", "Appointment", "Appointments", "Sessions, consultations, treatments, or assessments."),
|
|
2402
|
+
verticalBookingPreset("therapist_practitioner.workshops", "therapist_practitioner", "workshop", "Workshop", "Workshops", "One-off group workshops, talks, or wellbeing sessions."),
|
|
2403
|
+
verticalBookingPreset("therapist_practitioner.retreats", "therapist_practitioner", "retreat", "Retreat", "Retreats", "Multi-day retreats or immersive group experiences."),
|
|
2404
|
+
verticalBookingPreset("beauty_spa.appointments", "beauty_spa", "appointment", "Appointment", "Appointments", "Treatments, consultations, services, and sessions."),
|
|
2405
|
+
verticalBookingPreset("beauty_spa.workshops", "beauty_spa", "workshop", "Workshop", "Workshops", "Skincare workshops, makeup lessons, demos, or group events."),
|
|
2406
|
+
verticalBookingPreset("consultant_coach.appointments", "consultant_coach", "appointment", "Appointment", "Appointments", "One-to-one calls, consultations, reviews, or coaching sessions."),
|
|
2407
|
+
verticalBookingPreset("consultant_coach.workshops", "consultant_coach", "workshop", "Workshop", "Workshops", "One-off group sessions, webinars, or strategy days."),
|
|
2408
|
+
verticalBookingPreset("consultant_coach.courses", "consultant_coach", "course", "Course", "Courses", "Fixed-schedule cohorts or multi-session group programmes."),
|
|
2409
|
+
verticalBookingPreset("consultant_coach.retreats", "consultant_coach", "retreat", "Retreat", "Retreats", "Multi-day coaching retreats or immersive experiences."),
|
|
2410
|
+
verticalBookingPreset("training_provider.courses", "training_provider", "course", "Course", "Courses", "Fixed-schedule courses, cohorts, and multi-session training."),
|
|
2411
|
+
verticalBookingPreset("training_provider.workshops", "training_provider", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, and short training sessions."),
|
|
2412
|
+
verticalBookingPreset("training_provider.appointments", "training_provider", "appointment", "Appointment", "Appointments", "Consultations, assessments, mentoring, or office hours."),
|
|
2413
|
+
verticalBookingPreset("training_provider.classes", "training_provider", "class", "Class", "Classes", "Regular classes, sessions, or groups.", "settings"),
|
|
2414
|
+
verticalBookingPreset("training_provider.residentials", "training_provider", "retreat", "Residential", "Residentials", "Residential courses or multi-day training experiences.", "settings"),
|
|
2415
|
+
verticalBookingPreset("retreat_centre.retreats", "retreat_centre", "retreat", "Retreat", "Retreats", "Multi-day or residential retreats with richer booking needs."),
|
|
2416
|
+
verticalBookingPreset("retreat_centre.workshops", "retreat_centre", "workshop", "Workshop", "Workshops", "One-day retreats, ceremonies, workshops, or special events."),
|
|
2417
|
+
verticalBookingPreset("retreat_centre.classes", "retreat_centre", "class", "Class", "Classes", "Regular sessions like guided meditations or group practices."),
|
|
2418
|
+
verticalBookingPreset("retreat_centre.courses", "retreat_centre", "course", "Course", "Courses", "Fixed-schedule programmes or multi-session experiences."),
|
|
2419
|
+
verticalBookingPreset("retreat_centre.appointments", "retreat_centre", "appointment", "Appointment", "Appointments", "Private sessions, therapies, consultations, or add-ons."),
|
|
2420
|
+
verticalBookingPreset("music_school.lessons", "music_school", "appointment", "Lesson", "Lessons", "One-to-one lessons, consultations, or coaching sessions."),
|
|
2421
|
+
verticalBookingPreset("music_school.classes", "music_school", "class", "Class", "Classes", "Regular group classes, ensembles, or recurring sessions."),
|
|
2422
|
+
{
|
|
2423
|
+
...verticalBookingPreset("music_school.terms", "music_school", "course", "Term", "Terms", "Multi-week term blocks or fixed-date group courses."),
|
|
2424
|
+
eventPresetOverride: "term"
|
|
2425
|
+
},
|
|
2426
|
+
verticalBookingPreset("music_school.workshops", "music_school", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, or intensives."),
|
|
2427
|
+
verticalBookingPreset("music_school.performances", "music_school", "performance", "Performance", "Performances", "Concerts, recitals, showcases, or ticketed performances."),
|
|
2428
|
+
verticalBookingPreset("voice_singing.lessons", "voice_singing", "appointment", "Voice session", "Voice sessions", "One-to-one singing lessons, voice coaching, or private practice sessions."),
|
|
2429
|
+
verticalBookingPreset("voice_singing.classes", "voice_singing", "class", "Ongoing weekly session", "Ongoing weekly sessions", "Regular choirs, voice circles, community singing, or group practice."),
|
|
2430
|
+
{
|
|
2431
|
+
...verticalBookingPreset("voice_singing.terms", "voice_singing", "course", "Singing term", "Singing terms", "Multi-week choir terms, voice courses, or fixed-date group programmes."),
|
|
2432
|
+
eventPresetOverride: "term"
|
|
2433
|
+
},
|
|
2434
|
+
verticalBookingPreset("voice_singing.workshops", "voice_singing", "workshop", "Workshop", "Workshops", "One-off singing workshops, voice journeys, or devotional singing sessions."),
|
|
2435
|
+
verticalBookingPreset("voice_singing.performances", "voice_singing", "performance", "Performance", "Performances", "Choir concerts, sharing events, recitals, or community performances."),
|
|
2436
|
+
verticalBookingPreset("performing_arts_school.classes", "performing_arts_school", "class", "Class", "Classes", "Regular group classes, rehearsals, or weekly sessions."),
|
|
2437
|
+
{
|
|
2438
|
+
...verticalBookingPreset("performing_arts_school.terms", "performing_arts_school", "course", "Term", "Terms", "Multi-week term blocks or fixed-date course groups."),
|
|
2439
|
+
eventPresetOverride: "term"
|
|
2440
|
+
},
|
|
2441
|
+
verticalBookingPreset("performing_arts_school.workshops", "performing_arts_school", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, or intensives."),
|
|
2442
|
+
verticalBookingPreset("performing_arts_school.performances", "performing_arts_school", "performance", "Performance", "Performances", "Shows, showcases, productions, or ticketed performances."),
|
|
2443
|
+
verticalBookingPreset("performing_arts_school.lessons", "performing_arts_school", "appointment", "Lesson", "Lessons", "One-to-one lessons, coaching, or audition prep."),
|
|
2444
|
+
verticalBookingPreset("community_wellbeing.classes", "community_wellbeing", "class", "Class", "Classes", "Regular groups, sessions, practices, or weekly activities."),
|
|
2445
|
+
verticalBookingPreset("community_wellbeing.workshops", "community_wellbeing", "workshop", "Workshop", "Workshops", "One-off workshops, talks, events, or gatherings."),
|
|
2446
|
+
verticalBookingPreset("community_wellbeing.courses", "community_wellbeing", "course", "Course", "Courses", "Fixed-schedule courses, study groups, or multi-session programmes."),
|
|
2447
|
+
verticalBookingPreset("community_wellbeing.appointments", "community_wellbeing", "appointment", "Appointment", "Appointments", "One-to-one appointments, consultations, or support sessions."),
|
|
2448
|
+
verticalBookingPreset("community_wellbeing.retreats", "community_wellbeing", "retreat", "Retreat", "Retreats", "Multi-day or residential retreats."),
|
|
2449
|
+
verticalBookingPreset("venue_event_space.resource_hire", "venue_event_space", "appointment", "Hire slot", "Hire slots", "Future room, venue, and resource hire bookings.", "future")
|
|
2450
|
+
];
|
|
2451
|
+
//#endregion
|
|
2452
|
+
//#region ../core/src/booking-vertical-config.ts
|
|
2453
|
+
const VERTICAL_ID_SET = new Set(VERTICAL_DEFINITIONS.map(({ id }) => id));
|
|
2454
|
+
const VERTICAL_PRESET_ID_SET = new Set(VERTICAL_BOOKING_PRESETS.map((presetDefinition) => presetDefinition.id));
|
|
2455
|
+
function parseVerticalId(value) {
|
|
2456
|
+
return typeof value === "string" && VERTICAL_ID_SET.has(value) ? value : null;
|
|
2457
|
+
}
|
|
2458
|
+
function parseVerticalPresetId(value) {
|
|
2459
|
+
return typeof value === "string" && VERTICAL_PRESET_ID_SET.has(value) ? value : null;
|
|
2460
|
+
}
|
|
2461
|
+
function getVerticalPresetDefinition(presetId) {
|
|
2462
|
+
const definition = VERTICAL_BOOKING_PRESETS.find((presetDefinition) => presetDefinition.id === presetId);
|
|
2463
|
+
if (definition === void 0) throw new Error(`Unhandled vertical preset id: ${presetId}`);
|
|
2464
|
+
return definition;
|
|
2465
|
+
}
|
|
2466
|
+
function createConfiguredSiteVerticalBookingConfig(verticalId, selectedPresetIds) {
|
|
2467
|
+
return {
|
|
2468
|
+
verticalId,
|
|
2469
|
+
selectedPresetIds
|
|
2470
|
+
};
|
|
2471
|
+
}
|
|
2472
|
+
function toNonEmptyVerticalPresetIds(presetIds) {
|
|
2473
|
+
const firstPresetId = presetIds[0];
|
|
2474
|
+
return firstPresetId ? [firstPresetId, ...presetIds.slice(1)] : null;
|
|
2475
|
+
}
|
|
2476
|
+
const DEFAULT_SITE_VERTICAL_BOOKING_CONFIG = {
|
|
2477
|
+
verticalId: null,
|
|
2478
|
+
selectedPresetIds: []
|
|
2479
|
+
};
|
|
2480
|
+
function appendUniqueIssue(issues, issue) {
|
|
2481
|
+
return issues.some((existing) => existing.code === issue.code) ? issues : [...issues, issue];
|
|
2482
|
+
}
|
|
2483
|
+
function collectRawConfigIssues(rawConfig, config) {
|
|
2484
|
+
const rawPresetValue = rawConfig.selectedPresetIds;
|
|
2485
|
+
const rawPresetIds = Array.isArray(rawPresetValue) ? rawPresetValue : [];
|
|
2486
|
+
let issues = [];
|
|
2487
|
+
if (rawConfig.verticalId != null && config.verticalId === null) issues = appendUniqueIssue(issues, {
|
|
2488
|
+
code: "unknown_vertical",
|
|
2489
|
+
rawValue: rawConfig.verticalId
|
|
2490
|
+
});
|
|
2491
|
+
if (config.verticalId === null && config.selectedPresetIds.length > 0) issues = appendUniqueIssue(issues, { code: "missing_vertical" });
|
|
2492
|
+
if (rawPresetValue !== void 0 && !Array.isArray(rawPresetValue) || rawPresetIds.some((presetId) => parseVerticalPresetId(presetId) === null)) issues = appendUniqueIssue(issues, {
|
|
2493
|
+
code: "unknown_preset",
|
|
2494
|
+
rawValue: rawPresetValue
|
|
2495
|
+
});
|
|
2496
|
+
if (rawConfig.verticalId != null && config.selectedPresetIds.length === 0) issues = appendUniqueIssue(issues, { code: "empty_selected_presets" });
|
|
2497
|
+
return issues;
|
|
2498
|
+
}
|
|
2499
|
+
function collectPresetConfigIssues(config) {
|
|
2500
|
+
const seenPresetIds = /* @__PURE__ */ new Set();
|
|
2501
|
+
const seenBehaviours = /* @__PURE__ */ new Set();
|
|
2502
|
+
let issues = [];
|
|
2503
|
+
for (const presetId of config.selectedPresetIds) {
|
|
2504
|
+
const presetDefinition = getVerticalPresetDefinition(presetId);
|
|
2505
|
+
if (seenPresetIds.has(presetId)) issues = appendUniqueIssue(issues, { code: "duplicate_preset_id" });
|
|
2506
|
+
seenPresetIds.add(presetId);
|
|
2507
|
+
if (config.verticalId !== null && presetDefinition.verticalId !== config.verticalId) issues = appendUniqueIssue(issues, { code: "preset_vertical_mismatch" });
|
|
2508
|
+
if (presetDefinition.availability === "future") issues = appendUniqueIssue(issues, { code: "future_preset_selected" });
|
|
2509
|
+
if (seenBehaviours.has(presetDefinition.canonicalBehaviour)) issues = appendUniqueIssue(issues, { code: "duplicate_canonical_behaviour" });
|
|
2510
|
+
seenBehaviours.add(presetDefinition.canonicalBehaviour);
|
|
2511
|
+
}
|
|
2512
|
+
return issues;
|
|
2513
|
+
}
|
|
2514
|
+
function getSiteVerticalConfigIssues(rawConfig, config) {
|
|
2515
|
+
let issues = collectRawConfigIssues(rawConfig, config);
|
|
2516
|
+
for (const issue of collectPresetConfigIssues(config)) issues = appendUniqueIssue(issues, issue);
|
|
2517
|
+
return issues;
|
|
2518
|
+
}
|
|
2519
|
+
function resolveSiteVerticalBookingConfig(rawConfig) {
|
|
2520
|
+
if (rawConfig == null) return {
|
|
2521
|
+
kind: "unconfigured",
|
|
2522
|
+
config: DEFAULT_SITE_VERTICAL_BOOKING_CONFIG
|
|
2523
|
+
};
|
|
2524
|
+
const verticalId = parseVerticalId(rawConfig.verticalId);
|
|
2525
|
+
const selectedPresetIds = (Array.isArray(rawConfig.selectedPresetIds) ? rawConfig.selectedPresetIds : []).map(parseVerticalPresetId).filter((presetId) => Boolean(presetId));
|
|
2526
|
+
const config = {
|
|
2527
|
+
verticalId,
|
|
2528
|
+
selectedPresetIds
|
|
2529
|
+
};
|
|
2530
|
+
if (rawConfig.verticalId == null && selectedPresetIds.length === 0) return {
|
|
2531
|
+
kind: "unconfigured",
|
|
2532
|
+
config: DEFAULT_SITE_VERTICAL_BOOKING_CONFIG
|
|
2533
|
+
};
|
|
2534
|
+
const issues = getSiteVerticalConfigIssues(rawConfig, config);
|
|
2535
|
+
if (issues.length > 0) return {
|
|
2536
|
+
kind: "invalid",
|
|
2537
|
+
config,
|
|
2538
|
+
issues
|
|
2539
|
+
};
|
|
2540
|
+
const nonEmptyPresetIds = toNonEmptyVerticalPresetIds(selectedPresetIds);
|
|
2541
|
+
const configuredConfig = verticalId !== null && nonEmptyPresetIds !== null ? createConfiguredSiteVerticalBookingConfig(verticalId, nonEmptyPresetIds) : null;
|
|
2542
|
+
if (configuredConfig === null) return {
|
|
2543
|
+
kind: "invalid",
|
|
2544
|
+
config,
|
|
2545
|
+
issues: [{ code: "empty_selected_presets" }]
|
|
2546
|
+
};
|
|
2547
|
+
return {
|
|
2548
|
+
kind: "configured",
|
|
2549
|
+
config: configuredConfig,
|
|
2550
|
+
selectedPresets: configuredConfig.selectedPresetIds.map(getVerticalPresetDefinition)
|
|
2551
|
+
};
|
|
2552
|
+
}
|
|
2014
2553
|
z.object({
|
|
2015
2554
|
formulaVersion: z.literal("managed-domain-overage-v1"),
|
|
2016
2555
|
conversionRule: z.literal("usd-to-gbp-1-to-1-v1"),
|
|
@@ -3923,6 +4462,12 @@ const opaqueButtonColourTokenSchema = themeColorTokenSchema.refine((value) => pa
|
|
|
3923
4462
|
if (token === null) throw new Error("Invariant: opaque button token passed its schema");
|
|
3924
4463
|
return token;
|
|
3925
4464
|
});
|
|
4465
|
+
const contextualButtonHoverSchema = z.strictObject({
|
|
4466
|
+
kind: z.literal("shade-shift"),
|
|
4467
|
+
seedToken: opaqueButtonColourTokenSchema,
|
|
4468
|
+
fallbackDirection: z.enum(["lighter", "darker"]),
|
|
4469
|
+
preferredToken: opaqueButtonColourTokenSchema.optional()
|
|
4470
|
+
});
|
|
3926
4471
|
const buttonShadeAmountSchema = z.number().finite().min(0).max(900).multipleOf(100);
|
|
3927
4472
|
const buttonShadowIntensitySchema = z.enum([
|
|
3928
4473
|
"subtle",
|
|
@@ -4262,6 +4807,7 @@ const buttonVariantSchema = z.strictObject({
|
|
|
4262
4807
|
shadow: variantShadowSchema.optional(),
|
|
4263
4808
|
border: buttonBorderSchema.optional(),
|
|
4264
4809
|
hoverBackgroundToken: opaqueButtonColourTokenSchema.optional(),
|
|
4810
|
+
contextualHover: contextualButtonHoverSchema.optional(),
|
|
4265
4811
|
effects: variantEffectsSchema.optional(),
|
|
4266
4812
|
sizes: variantSizeOverridesSchema.optional(),
|
|
4267
4813
|
affordance: buttonVariantAffordanceSchema.optional()
|
|
@@ -4534,6 +5080,139 @@ function validateButtonTextContrast(input) {
|
|
|
4534
5080
|
};
|
|
4535
5081
|
}
|
|
4536
5082
|
//#endregion
|
|
5083
|
+
//#region ../theme-core/src/buttons/contextualHover.ts
|
|
5084
|
+
function resolveContextualHoverPreference(input) {
|
|
5085
|
+
const preferred = input.instruction.preferredToken;
|
|
5086
|
+
if (preferred && isSafeCandidate(preferred, input.palette, input.surface)) return {
|
|
5087
|
+
kind: "resolved",
|
|
5088
|
+
token: preferred,
|
|
5089
|
+
repair: null
|
|
5090
|
+
};
|
|
5091
|
+
const contextual = resolveContextualHover(input);
|
|
5092
|
+
return contextual.kind === "resolved" ? {
|
|
5093
|
+
kind: "resolved",
|
|
5094
|
+
token: contextual.token,
|
|
5095
|
+
repair: preferred ? {
|
|
5096
|
+
kind: "preferred-token-replaced",
|
|
5097
|
+
preferredToken: preferred,
|
|
5098
|
+
contextualToken: contextual.token
|
|
5099
|
+
} : null
|
|
5100
|
+
} : contextual;
|
|
5101
|
+
}
|
|
5102
|
+
/**
|
|
5103
|
+
* Resolves semantic shade movement from real palette steps. The persisted
|
|
5104
|
+
* instruction owns the colour family and deterministic unknown-surface
|
|
5105
|
+
* fallback; a proven surface may select the opposite direction when it gives
|
|
5106
|
+
* the button stronger separation while retaining the shared contrast contract.
|
|
5107
|
+
*/
|
|
5108
|
+
function resolveContextualHover(input) {
|
|
5109
|
+
const candidates = shadeCandidates(input.instruction.seedToken, input.palette);
|
|
5110
|
+
if (candidates.length === 0) return {
|
|
5111
|
+
kind: "unavailable",
|
|
5112
|
+
reason: "no-distinct-shade"
|
|
5113
|
+
};
|
|
5114
|
+
const textSafe = candidates.filter((candidate) => hasSafeTextContrast(candidate.token, input.palette));
|
|
5115
|
+
if (textSafe.length === 0) return {
|
|
5116
|
+
kind: "unavailable",
|
|
5117
|
+
reason: "no-text-safe-candidate"
|
|
5118
|
+
};
|
|
5119
|
+
if (!input.surface) {
|
|
5120
|
+
const selected = textSafe.find((candidate) => candidate.direction === input.instruction.fallbackDirection) ?? textSafe[0];
|
|
5121
|
+
return selected ? {
|
|
5122
|
+
kind: "resolved",
|
|
5123
|
+
token: selected.token,
|
|
5124
|
+
direction: selected.direction,
|
|
5125
|
+
evidence: "fallback-direction"
|
|
5126
|
+
} : {
|
|
5127
|
+
kind: "unavailable",
|
|
5128
|
+
reason: "no-text-safe-candidate"
|
|
5129
|
+
};
|
|
5130
|
+
}
|
|
5131
|
+
const selected = textSafe.map((candidate) => ({
|
|
5132
|
+
...candidate,
|
|
5133
|
+
surfaceContrast: contrastRatio(input.palette[candidate.token] ?? "", input.surface?.backgroundHex ?? "")
|
|
5134
|
+
})).filter((candidate) => candidate.surfaceContrast !== null && candidate.surfaceContrast >= BUTTON_CONTRAST_POLICY.nonTextMinimumRatio).sort((left, right) => {
|
|
5135
|
+
const distanceDifference = left.distance - right.distance;
|
|
5136
|
+
if (distanceDifference !== 0) return distanceDifference;
|
|
5137
|
+
const contrastDifference = (right.surfaceContrast ?? 0) - (left.surfaceContrast ?? 0);
|
|
5138
|
+
if (contrastDifference !== 0) return contrastDifference;
|
|
5139
|
+
if (left.direction === right.direction) return left.token.localeCompare(right.token);
|
|
5140
|
+
return left.direction === input.instruction.fallbackDirection ? -1 : 1;
|
|
5141
|
+
})[0];
|
|
5142
|
+
return selected ? {
|
|
5143
|
+
kind: "resolved",
|
|
5144
|
+
token: selected.token,
|
|
5145
|
+
direction: selected.direction,
|
|
5146
|
+
evidence: "known-surface"
|
|
5147
|
+
} : {
|
|
5148
|
+
kind: "unavailable",
|
|
5149
|
+
reason: "no-surface-safe-candidate"
|
|
5150
|
+
};
|
|
5151
|
+
}
|
|
5152
|
+
function shadeCandidates(seedToken, palette) {
|
|
5153
|
+
const match = String(seedToken).match(/^(.*?)(?:-(\d{2,3}))?$/);
|
|
5154
|
+
const family = match?.[1] ?? String(seedToken);
|
|
5155
|
+
const currentShade = match?.[2] ? Number(match[2]) : 500;
|
|
5156
|
+
const seedHex = palette[seedToken];
|
|
5157
|
+
const shades = Object.keys(palette).flatMap((token) => {
|
|
5158
|
+
const shade = token.match(new RegExp(`^${escapeRegExp(family)}-(\\d{2,3})$`));
|
|
5159
|
+
return shade?.[1] ? [Number(shade[1])] : [];
|
|
5160
|
+
}).filter((shade) => Number.isFinite(shade)).sort((left, right) => left - right);
|
|
5161
|
+
const lower = [...shades].filter((shade) => shade < currentShade).sort((left, right) => right - left);
|
|
5162
|
+
const higher = shades.filter((shade) => shade > currentShade);
|
|
5163
|
+
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);
|
|
5164
|
+
}
|
|
5165
|
+
function candidate(family, shade, currentShade, direction, seedHex, palette) {
|
|
5166
|
+
const token = parseOpaqueButtonColourToken(`${family}-${shade}`);
|
|
5167
|
+
if (token === null) return null;
|
|
5168
|
+
const candidateHex = palette[token];
|
|
5169
|
+
if (!candidateHex || candidateHex === seedHex) return null;
|
|
5170
|
+
return {
|
|
5171
|
+
token,
|
|
5172
|
+
direction,
|
|
5173
|
+
distance: Math.abs(shade - currentShade),
|
|
5174
|
+
surfaceContrast: null
|
|
5175
|
+
};
|
|
5176
|
+
}
|
|
5177
|
+
function hasSafeTextContrast(token, palette) {
|
|
5178
|
+
const background = palette[token];
|
|
5179
|
+
const foreground = palette[onColorTokenName(token)];
|
|
5180
|
+
return typeof background === "string" && typeof foreground === "string" && contrastRatio(background, foreground) >= BUTTON_CONTRAST_POLICY.textMinimumRatio;
|
|
5181
|
+
}
|
|
5182
|
+
function isSafeCandidate(token, palette, surface) {
|
|
5183
|
+
if (!hasSafeTextContrast(token, palette)) return false;
|
|
5184
|
+
return surface ? contrastRatio(palette[token] ?? "", surface.backgroundHex) >= BUTTON_CONTRAST_POLICY.nonTextMinimumRatio : true;
|
|
5185
|
+
}
|
|
5186
|
+
function escapeRegExp(value) {
|
|
5187
|
+
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
5188
|
+
}
|
|
5189
|
+
//#endregion
|
|
5190
|
+
//#region ../theme-core/src/buttons/resolveButtonHoverTreatment.ts
|
|
5191
|
+
function resolveButtonHoverTreatment(input) {
|
|
5192
|
+
if (input.variant.contextualHover) {
|
|
5193
|
+
const contextual = resolveContextualHoverPreference({
|
|
5194
|
+
instruction: input.variant.contextualHover,
|
|
5195
|
+
palette: input.palette,
|
|
5196
|
+
surface: input.surface
|
|
5197
|
+
});
|
|
5198
|
+
if (contextual.kind === "resolved") return {
|
|
5199
|
+
treatment: {
|
|
5200
|
+
type: "solid",
|
|
5201
|
+
colorToken: contextual.token
|
|
5202
|
+
},
|
|
5203
|
+
repair: contextual.repair
|
|
5204
|
+
};
|
|
5205
|
+
}
|
|
5206
|
+
const token = input.variant.hoverBackgroundToken ?? (input.global.hoverColor === "token" ? input.global.hoverColorToken : void 0);
|
|
5207
|
+
return {
|
|
5208
|
+
treatment: token === void 0 ? input.fallback : {
|
|
5209
|
+
type: "solid",
|
|
5210
|
+
colorToken: token
|
|
5211
|
+
},
|
|
5212
|
+
repair: null
|
|
5213
|
+
};
|
|
5214
|
+
}
|
|
5215
|
+
//#endregion
|
|
4537
5216
|
//#region ../theme-core/src/buttons/resolveButtonColourStates.ts
|
|
4538
5217
|
function compileButtonColourStates(input) {
|
|
4539
5218
|
const baseTransition = applyColourEffects({
|
|
@@ -4544,9 +5223,16 @@ function compileButtonColourStates(input) {
|
|
|
4544
5223
|
palette: input.palette
|
|
4545
5224
|
});
|
|
4546
5225
|
if (!baseTransition.ok) return baseTransition;
|
|
5226
|
+
const hover = resolveButtonHoverTreatment({
|
|
5227
|
+
variant: input.variant,
|
|
5228
|
+
global: input.global,
|
|
5229
|
+
fallback: baseTransition.treatment,
|
|
5230
|
+
palette: input.palette,
|
|
5231
|
+
surface: input.surface
|
|
5232
|
+
});
|
|
4547
5233
|
const stateTreatments = {
|
|
4548
5234
|
base: baseTransition.treatment,
|
|
4549
|
-
hover:
|
|
5235
|
+
hover: hover.treatment,
|
|
4550
5236
|
focus: baseTransition.treatment,
|
|
4551
5237
|
active: baseTransition.treatment,
|
|
4552
5238
|
disabled: baseTransition.treatment
|
|
@@ -4585,14 +5271,8 @@ function compileButtonColourStates(input) {
|
|
|
4585
5271
|
ok: true,
|
|
4586
5272
|
states: resolved,
|
|
4587
5273
|
focusIndicator: resolveFocusIndicator(resolved.focus),
|
|
4588
|
-
nonColourEffects
|
|
4589
|
-
|
|
4590
|
-
}
|
|
4591
|
-
function hoverTreatment(variant, global, fallback) {
|
|
4592
|
-
const token = variant.hoverBackgroundToken ?? (global.hoverColor === "token" ? global.hoverColorToken : void 0);
|
|
4593
|
-
return token === void 0 ? fallback : {
|
|
4594
|
-
type: "solid",
|
|
4595
|
-
colorToken: token
|
|
5274
|
+
nonColourEffects,
|
|
5275
|
+
contextualHoverRepair: hover.repair
|
|
4596
5276
|
};
|
|
4597
5277
|
}
|
|
4598
5278
|
function applyColourEffects(input) {
|
|
@@ -5403,13 +6083,24 @@ function resolveContextualButtonRole(input) {
|
|
|
5403
6083
|
};
|
|
5404
6084
|
const rejected = [];
|
|
5405
6085
|
const preferred = compileCandidate(requested, input.buttonSystem, input.palette, input.surface);
|
|
5406
|
-
if (preferred.ok)
|
|
5407
|
-
|
|
5408
|
-
|
|
5409
|
-
|
|
5410
|
-
|
|
5411
|
-
|
|
5412
|
-
|
|
6086
|
+
if (preferred.ok) {
|
|
6087
|
+
if (preferred.contextualHoverRepair) return {
|
|
6088
|
+
kind: "repaired",
|
|
6089
|
+
requestedRole: input.role,
|
|
6090
|
+
candidate: "contextual-hover",
|
|
6091
|
+
states: preferred.states,
|
|
6092
|
+
focusIndicator: preferred.focusIndicator,
|
|
6093
|
+
boundary: boundaryForVariant(requested),
|
|
6094
|
+
rejectedCandidates: []
|
|
6095
|
+
};
|
|
6096
|
+
return {
|
|
6097
|
+
kind: "preferred",
|
|
6098
|
+
requestedRole: input.role,
|
|
6099
|
+
states: preferred.states,
|
|
6100
|
+
focusIndicator: preferred.focusIndicator,
|
|
6101
|
+
boundary: boundaryForVariant(requested)
|
|
6102
|
+
};
|
|
6103
|
+
}
|
|
5413
6104
|
rejected.push({
|
|
5414
6105
|
candidate: "preferred",
|
|
5415
6106
|
error: preferred.error
|
|
@@ -5529,6 +6220,7 @@ function candidateVariant(fallback, requested, system) {
|
|
|
5529
6220
|
},
|
|
5530
6221
|
border: { widthClass: "border" },
|
|
5531
6222
|
hoverBackgroundToken: void 0,
|
|
6223
|
+
contextualHover: void 0,
|
|
5532
6224
|
effects: void 0
|
|
5533
6225
|
},
|
|
5534
6226
|
boundary: {
|
|
@@ -5640,13 +6332,7 @@ function readNonEmptyString(value) {
|
|
|
5640
6332
|
buttonSizeNameSchema.options;
|
|
5641
6333
|
//#endregion
|
|
5642
6334
|
//#region ../theme-core/src/buttons/styles/domain.ts
|
|
5643
|
-
const PUBLIC_BUTTON_ROLES =
|
|
5644
|
-
"primary",
|
|
5645
|
-
"secondary",
|
|
5646
|
-
"outline",
|
|
5647
|
-
"ghost",
|
|
5648
|
-
"accent"
|
|
5649
|
-
];
|
|
6335
|
+
const PUBLIC_BUTTON_ROLES = VARIANT_ROLES;
|
|
5650
6336
|
function defineButtonStyleRecipe(recipe) {
|
|
5651
6337
|
return recipe;
|
|
5652
6338
|
}
|
|
@@ -5742,6 +6428,14 @@ const BUTTON_STYLE_IDS = [
|
|
|
5742
6428
|
"quiet-arrow"
|
|
5743
6429
|
];
|
|
5744
6430
|
const quietArrowParametersSchema = z.object({ secondaryTreatment: z.enum(["outlined", "solid-accent"]) }).strict();
|
|
6431
|
+
const flatInkHoverTreatmentSchema = z.enum([
|
|
6432
|
+
"contextual",
|
|
6433
|
+
"secondary",
|
|
6434
|
+
"accent"
|
|
6435
|
+
]);
|
|
6436
|
+
const flatInkHoverPreferencesShape = Object.fromEntries(VARIANT_ROLES.map((role) => [role, flatInkHoverTreatmentSchema.optional()]));
|
|
6437
|
+
const flatInkHoverPreferencesSchema = z.strictObject(flatInkHoverPreferencesShape);
|
|
6438
|
+
const flatInkParametersSchema = z.strictObject({ hoverPreferences: flatInkHoverPreferencesSchema.optional() });
|
|
5745
6439
|
const emptyParametersSchema$1 = z.object({}).strict();
|
|
5746
6440
|
function selectionBranch(styleId, parameters) {
|
|
5747
6441
|
return z.object({
|
|
@@ -5756,7 +6450,7 @@ const buttonStyleSelectionSchema = z.discriminatedUnion("styleId", [
|
|
|
5756
6450
|
selectionBranch("editorial-link", emptyParametersSchema$1),
|
|
5757
6451
|
selectionBranch("pebble", emptyParametersSchema$1),
|
|
5758
6452
|
selectionBranch("ink-stamp", emptyParametersSchema$1),
|
|
5759
|
-
selectionBranch("flat-ink",
|
|
6453
|
+
selectionBranch("flat-ink", flatInkParametersSchema),
|
|
5760
6454
|
selectionBranch("brushed-wash", emptyParametersSchema$1),
|
|
5761
6455
|
selectionBranch("showtime-pill", emptyParametersSchema$1),
|
|
5762
6456
|
selectionBranch("joy-stamp", emptyParametersSchema$1),
|
|
@@ -5893,6 +6587,189 @@ const quietArrowRecipe = defineButtonStyleRecipe({
|
|
|
5893
6587
|
})
|
|
5894
6588
|
});
|
|
5895
6589
|
//#endregion
|
|
6590
|
+
//#region ../theme-core/src/buttons/styles/recipes/flatInk.ts
|
|
6591
|
+
const contextualRoleConfig = {
|
|
6592
|
+
primary: {
|
|
6593
|
+
contextualSeedToken: unsafeAsOpaqueButtonColourToken("primary"),
|
|
6594
|
+
fallbackDirection: "darker"
|
|
6595
|
+
},
|
|
6596
|
+
secondary: {
|
|
6597
|
+
contextualSeedToken: unsafeAsOpaqueButtonColourToken("surfaceAlt"),
|
|
6598
|
+
fallbackDirection: "darker"
|
|
6599
|
+
},
|
|
6600
|
+
outline: {
|
|
6601
|
+
contextualSeedToken: unsafeAsOpaqueButtonColourToken("surfaceAlt"),
|
|
6602
|
+
fallbackDirection: "darker"
|
|
6603
|
+
},
|
|
6604
|
+
ghost: {
|
|
6605
|
+
contextualSeedToken: unsafeAsOpaqueButtonColourToken("surfaceAlt"),
|
|
6606
|
+
fallbackDirection: "darker"
|
|
6607
|
+
},
|
|
6608
|
+
accent: {
|
|
6609
|
+
contextualSeedToken: unsafeAsOpaqueButtonColourToken("accent"),
|
|
6610
|
+
fallbackDirection: "darker"
|
|
6611
|
+
}
|
|
6612
|
+
};
|
|
6613
|
+
const hoverControl = {
|
|
6614
|
+
kind: "button-hover-by-role",
|
|
6615
|
+
parameter: "hoverPreferences",
|
|
6616
|
+
label: "Button hover",
|
|
6617
|
+
roles: contextualRoleConfig,
|
|
6618
|
+
options: [
|
|
6619
|
+
{
|
|
6620
|
+
value: "contextual",
|
|
6621
|
+
label: "Contextual shade shift"
|
|
6622
|
+
},
|
|
6623
|
+
{
|
|
6624
|
+
value: "secondary",
|
|
6625
|
+
label: "Secondary button colour"
|
|
6626
|
+
},
|
|
6627
|
+
{
|
|
6628
|
+
value: "accent",
|
|
6629
|
+
label: "Accent button colour"
|
|
6630
|
+
}
|
|
6631
|
+
]
|
|
6632
|
+
};
|
|
6633
|
+
const lift = { effectId: "lift" };
|
|
6634
|
+
const flatInkRecipe = defineButtonStyleRecipe({
|
|
6635
|
+
id: "flat-ink",
|
|
6636
|
+
accessibilityLabel: "Flat rounded buttons with arrow affordances",
|
|
6637
|
+
tags: {
|
|
6638
|
+
tone: "classic",
|
|
6639
|
+
energy: "calm",
|
|
6640
|
+
motion: "subtle",
|
|
6641
|
+
era: "editorial"
|
|
6642
|
+
},
|
|
6643
|
+
parameterSchema: flatInkParametersSchema,
|
|
6644
|
+
defaultParameters: {},
|
|
6645
|
+
controls: [hoverControl],
|
|
6646
|
+
defineSystem: (parameters) => ({
|
|
6647
|
+
global: {
|
|
6648
|
+
cornerStyle: "rounded",
|
|
6649
|
+
textTransform: "none",
|
|
6650
|
+
fontWeight: 600,
|
|
6651
|
+
typography: "body",
|
|
6652
|
+
letterSpacing: "tight",
|
|
6653
|
+
paddingPreset: "default",
|
|
6654
|
+
hoverTransform: "lift",
|
|
6655
|
+
hoverColor: "none"
|
|
6656
|
+
},
|
|
6657
|
+
sizes: {
|
|
6658
|
+
sm: {
|
|
6659
|
+
padding: "0.625rem 1.125rem",
|
|
6660
|
+
fontSize: "text-sm"
|
|
6661
|
+
},
|
|
6662
|
+
md: { padding: "0.8125rem 1.375rem" },
|
|
6663
|
+
lg: {
|
|
6664
|
+
padding: "0.9375rem 1.625rem",
|
|
6665
|
+
fontSize: "text-lg"
|
|
6666
|
+
},
|
|
6667
|
+
xl: {
|
|
6668
|
+
padding: "1.0625rem 2rem",
|
|
6669
|
+
fontSize: "text-xl"
|
|
6670
|
+
}
|
|
6671
|
+
},
|
|
6672
|
+
roles: {
|
|
6673
|
+
primary: {
|
|
6674
|
+
kind: "complete",
|
|
6675
|
+
appearance: {
|
|
6676
|
+
background: {
|
|
6677
|
+
type: "solid",
|
|
6678
|
+
colorToken: unsafeAsOpaqueButtonColourToken("primary")
|
|
6679
|
+
},
|
|
6680
|
+
borderRadius: "rounded-lg",
|
|
6681
|
+
affordance: { iconId: "ArrowRight" },
|
|
6682
|
+
...hoverAppearance("primary", parameters, [lift, {
|
|
6683
|
+
effectId: "background-on-hover",
|
|
6684
|
+
options: { colorToken: unsafeAsOpaqueButtonColourToken("secondary") }
|
|
6685
|
+
}])
|
|
6686
|
+
}
|
|
6687
|
+
},
|
|
6688
|
+
secondary: {
|
|
6689
|
+
kind: "complete",
|
|
6690
|
+
appearance: {
|
|
6691
|
+
background: {
|
|
6692
|
+
type: "surface",
|
|
6693
|
+
role: "link"
|
|
6694
|
+
},
|
|
6695
|
+
borderRadius: "rounded-lg",
|
|
6696
|
+
border: { widthClass: "border" },
|
|
6697
|
+
...hoverAppearance("secondary", parameters, [lift, {
|
|
6698
|
+
effectId: "background-on-hover",
|
|
6699
|
+
options: { colorToken: unsafeAsOpaqueButtonColourToken("surfaceAlt") }
|
|
6700
|
+
}])
|
|
6701
|
+
}
|
|
6702
|
+
},
|
|
6703
|
+
outline: {
|
|
6704
|
+
kind: "complete",
|
|
6705
|
+
appearance: {
|
|
6706
|
+
background: {
|
|
6707
|
+
type: "surface",
|
|
6708
|
+
role: "link"
|
|
6709
|
+
},
|
|
6710
|
+
borderRadius: "rounded-lg",
|
|
6711
|
+
border: { widthClass: "border" },
|
|
6712
|
+
...hoverAppearance("outline", parameters, [lift, {
|
|
6713
|
+
effectId: "background-on-hover",
|
|
6714
|
+
options: { colorToken: unsafeAsOpaqueButtonColourToken("surfaceAlt") }
|
|
6715
|
+
}])
|
|
6716
|
+
}
|
|
6717
|
+
},
|
|
6718
|
+
ghost: {
|
|
6719
|
+
kind: "complete",
|
|
6720
|
+
appearance: {
|
|
6721
|
+
background: {
|
|
6722
|
+
type: "surface",
|
|
6723
|
+
role: "link"
|
|
6724
|
+
},
|
|
6725
|
+
borderRadius: "rounded-lg",
|
|
6726
|
+
...hoverAppearance("ghost", parameters, [lift])
|
|
6727
|
+
}
|
|
6728
|
+
},
|
|
6729
|
+
accent: {
|
|
6730
|
+
kind: "complete",
|
|
6731
|
+
appearance: {
|
|
6732
|
+
background: {
|
|
6733
|
+
type: "solid",
|
|
6734
|
+
colorToken: unsafeAsOpaqueButtonColourToken("accent")
|
|
6735
|
+
},
|
|
6736
|
+
borderRadius: "rounded-lg",
|
|
6737
|
+
affordance: { iconId: "ArrowRight" },
|
|
6738
|
+
...hoverAppearance("accent", parameters, [lift])
|
|
6739
|
+
}
|
|
6740
|
+
}
|
|
6741
|
+
}
|
|
6742
|
+
})
|
|
6743
|
+
});
|
|
6744
|
+
function hoverAppearance(role, parameters, recommended) {
|
|
6745
|
+
const preference = parameters.hoverPreferences?.[role];
|
|
6746
|
+
if (preference === void 0) return { effects: { hover: [...recommended] } };
|
|
6747
|
+
if (preference === "contextual") {
|
|
6748
|
+
const config = contextualRoleConfig[role];
|
|
6749
|
+
return {
|
|
6750
|
+
effects: { hover: [lift] },
|
|
6751
|
+
contextualHover: {
|
|
6752
|
+
kind: "shade-shift",
|
|
6753
|
+
seedToken: config.contextualSeedToken,
|
|
6754
|
+
fallbackDirection: config.fallbackDirection
|
|
6755
|
+
}
|
|
6756
|
+
};
|
|
6757
|
+
}
|
|
6758
|
+
const config = contextualRoleConfig[role];
|
|
6759
|
+
return {
|
|
6760
|
+
effects: { hover: [lift] },
|
|
6761
|
+
contextualHover: {
|
|
6762
|
+
kind: "shade-shift",
|
|
6763
|
+
seedToken: config.contextualSeedToken,
|
|
6764
|
+
fallbackDirection: config.fallbackDirection,
|
|
6765
|
+
preferredToken: unsafeAsOpaqueButtonColourToken(paletteRole(preference))
|
|
6766
|
+
}
|
|
6767
|
+
};
|
|
6768
|
+
}
|
|
6769
|
+
function paletteRole(preference) {
|
|
6770
|
+
return preference;
|
|
6771
|
+
}
|
|
6772
|
+
//#endregion
|
|
5896
6773
|
//#region ../theme-core/src/buttons/styles/recipes/defineStaticButtonStyleRecipe.ts
|
|
5897
6774
|
const emptyParametersSchema = z.object({}).strict();
|
|
5898
6775
|
function defineStaticButtonStyleRecipe(input) {
|
|
@@ -6739,113 +7616,6 @@ const inkStampRecipe = defineStaticButtonStyleRecipe({
|
|
|
6739
7616
|
}
|
|
6740
7617
|
}
|
|
6741
7618
|
});
|
|
6742
|
-
const flatInkRecipe = defineStaticButtonStyleRecipe({
|
|
6743
|
-
id: "flat-ink",
|
|
6744
|
-
accessibilityLabel: "Flat rounded buttons with arrow affordances",
|
|
6745
|
-
tags: {
|
|
6746
|
-
tone: "classic",
|
|
6747
|
-
energy: "calm",
|
|
6748
|
-
motion: "subtle",
|
|
6749
|
-
era: "editorial"
|
|
6750
|
-
},
|
|
6751
|
-
system: {
|
|
6752
|
-
global: {
|
|
6753
|
-
cornerStyle: "rounded",
|
|
6754
|
-
textTransform: "none",
|
|
6755
|
-
fontWeight: 600,
|
|
6756
|
-
typography: "body",
|
|
6757
|
-
letterSpacing: "tight",
|
|
6758
|
-
paddingPreset: "default",
|
|
6759
|
-
hoverTransform: "lift",
|
|
6760
|
-
hoverColor: "none"
|
|
6761
|
-
},
|
|
6762
|
-
sizes: {
|
|
6763
|
-
sm: {
|
|
6764
|
-
padding: "0.625rem 1.125rem",
|
|
6765
|
-
fontSize: "text-sm"
|
|
6766
|
-
},
|
|
6767
|
-
md: { padding: "0.8125rem 1.375rem" },
|
|
6768
|
-
lg: {
|
|
6769
|
-
padding: "0.9375rem 1.625rem",
|
|
6770
|
-
fontSize: "text-lg"
|
|
6771
|
-
},
|
|
6772
|
-
xl: {
|
|
6773
|
-
padding: "1.0625rem 2rem",
|
|
6774
|
-
fontSize: "text-xl"
|
|
6775
|
-
}
|
|
6776
|
-
},
|
|
6777
|
-
roles: {
|
|
6778
|
-
primary: {
|
|
6779
|
-
kind: "complete",
|
|
6780
|
-
appearance: {
|
|
6781
|
-
background: {
|
|
6782
|
-
type: "solid",
|
|
6783
|
-
colorToken: "primary"
|
|
6784
|
-
},
|
|
6785
|
-
borderRadius: "rounded-lg",
|
|
6786
|
-
affordance: { iconId: "ArrowRight" },
|
|
6787
|
-
effects: { hover: [{ effectId: "lift" }, {
|
|
6788
|
-
effectId: "background-on-hover",
|
|
6789
|
-
options: { colorToken: unsafeAsOpaqueButtonColourToken("secondary") }
|
|
6790
|
-
}] }
|
|
6791
|
-
}
|
|
6792
|
-
},
|
|
6793
|
-
secondary: {
|
|
6794
|
-
kind: "complete",
|
|
6795
|
-
appearance: {
|
|
6796
|
-
background: {
|
|
6797
|
-
type: "surface",
|
|
6798
|
-
role: "link"
|
|
6799
|
-
},
|
|
6800
|
-
borderRadius: "rounded-lg",
|
|
6801
|
-
border: { widthClass: "border" },
|
|
6802
|
-
effects: { hover: [{ effectId: "lift" }, {
|
|
6803
|
-
effectId: "background-on-hover",
|
|
6804
|
-
options: { colorToken: unsafeAsOpaqueButtonColourToken("surfaceAlt") }
|
|
6805
|
-
}] }
|
|
6806
|
-
}
|
|
6807
|
-
},
|
|
6808
|
-
outline: {
|
|
6809
|
-
kind: "complete",
|
|
6810
|
-
appearance: {
|
|
6811
|
-
background: {
|
|
6812
|
-
type: "surface",
|
|
6813
|
-
role: "link"
|
|
6814
|
-
},
|
|
6815
|
-
borderRadius: "rounded-lg",
|
|
6816
|
-
border: { widthClass: "border" },
|
|
6817
|
-
effects: { hover: [{ effectId: "lift" }, {
|
|
6818
|
-
effectId: "background-on-hover",
|
|
6819
|
-
options: { colorToken: unsafeAsOpaqueButtonColourToken("surfaceAlt") }
|
|
6820
|
-
}] }
|
|
6821
|
-
}
|
|
6822
|
-
},
|
|
6823
|
-
ghost: {
|
|
6824
|
-
kind: "complete",
|
|
6825
|
-
appearance: {
|
|
6826
|
-
background: {
|
|
6827
|
-
type: "surface",
|
|
6828
|
-
role: "link"
|
|
6829
|
-
},
|
|
6830
|
-
borderRadius: "rounded-lg",
|
|
6831
|
-
effects: { hover: [{ effectId: "lift" }] }
|
|
6832
|
-
}
|
|
6833
|
-
},
|
|
6834
|
-
accent: {
|
|
6835
|
-
kind: "complete",
|
|
6836
|
-
appearance: {
|
|
6837
|
-
background: {
|
|
6838
|
-
type: "solid",
|
|
6839
|
-
colorToken: "accent"
|
|
6840
|
-
},
|
|
6841
|
-
borderRadius: "rounded-lg",
|
|
6842
|
-
affordance: { iconId: "ArrowRight" },
|
|
6843
|
-
effects: { hover: [{ effectId: "lift" }] }
|
|
6844
|
-
}
|
|
6845
|
-
}
|
|
6846
|
-
}
|
|
6847
|
-
}
|
|
6848
|
-
});
|
|
6849
7619
|
const showtimePillRecipe = defineStaticButtonStyleRecipe({
|
|
6850
7620
|
id: "showtime-pill",
|
|
6851
7621
|
accessibilityLabel: "Bold uppercase pill buttons with playful movement",
|
|
@@ -7267,8 +8037,8 @@ const openCardRoleValue = "open";
|
|
|
7267
8037
|
*/
|
|
7268
8038
|
const surfaceCardRoleValues = [...cardVariantRoleValues, openCardRoleValue];
|
|
7269
8039
|
/**
|
|
7270
|
-
* The closed
|
|
7271
|
-
*
|
|
8040
|
+
* The closed role vocabulary Looks and blocks use for surfaced and boxless
|
|
8041
|
+
* card choices.
|
|
7272
8042
|
*
|
|
7273
8043
|
* - `none` — no site-style card surface; the block's own composition and
|
|
7274
8044
|
* the author's own card fields govern the item. This is *not*
|
|
@@ -7280,11 +8050,6 @@ const surfaceCardRoleValues = [...cardVariantRoleValues, openCardRoleValue];
|
|
|
7280
8050
|
* - `alternative` — the statement card carrying the site's personality
|
|
7281
8051
|
*/
|
|
7282
8052
|
const cardRoleValues = [...surfaceCardRoleValues, boxlessCardVariantValue];
|
|
7283
|
-
const legacyCardVariantRoleAliases = {
|
|
7284
|
-
variant1: "alternative",
|
|
7285
|
-
variant2: "alternative",
|
|
7286
|
-
statement: "alternative"
|
|
7287
|
-
};
|
|
7288
8053
|
const cardSpacingSchema = z.enum([
|
|
7289
8054
|
"none",
|
|
7290
8055
|
"compact",
|
|
@@ -7314,33 +8079,21 @@ const gradientDirectionSchema = z.enum([
|
|
|
7314
8079
|
"to-br",
|
|
7315
8080
|
"to-bl"
|
|
7316
8081
|
]);
|
|
7317
|
-
|
|
8082
|
+
z.enum(cardVariantRoleValues);
|
|
7318
8083
|
const surfaceCardRoleSchema = z.enum(surfaceCardRoleValues);
|
|
7319
8084
|
const cardRoleSchema = z.enum(cardRoleValues);
|
|
7320
|
-
/**
|
|
7321
|
-
* Historical name for the role vocabulary as it reaches box styles. Widened to
|
|
7322
|
-
* the full `CardRole` set — old values keep parsing, `open` now parses too.
|
|
7323
|
-
*/
|
|
7324
|
-
const boxStylesCardVariantSchema = cardRoleSchema;
|
|
7325
8085
|
function isCardVariantRole(value) {
|
|
7326
8086
|
return typeof value === "string" && cardVariantRoleValues.includes(value);
|
|
7327
8087
|
}
|
|
7328
8088
|
function normalizeCardVariantRole(value) {
|
|
7329
|
-
|
|
7330
|
-
if (typeof value !== "string") return null;
|
|
7331
|
-
return legacyCardVariantRoleAliases[value] ?? null;
|
|
8089
|
+
return isCardVariantRole(value) ? value : null;
|
|
7332
8090
|
}
|
|
7333
|
-
/**
|
|
7334
|
-
* The one untrusted-input boundary for the role vocabulary. Legacy alias values
|
|
7335
|
-
* (`variant1`, `variant2`, `statement`) normalize here and nowhere else.
|
|
7336
|
-
*/
|
|
8091
|
+
/** The one untrusted-input boundary for the closed role vocabulary. */
|
|
7337
8092
|
function normalizeCardRole(value) {
|
|
7338
8093
|
if (value === "none") return boxlessCardVariantValue;
|
|
7339
8094
|
if (value === "open") return openCardRoleValue;
|
|
7340
8095
|
return normalizeCardVariantRole(value);
|
|
7341
8096
|
}
|
|
7342
|
-
/** Historical name for {@link normalizeCardRole}. */
|
|
7343
|
-
const normalizeBoxStylesCardVariant = normalizeCardRole;
|
|
7344
8097
|
const PRIORITY_ROLE_INFERENCE = {
|
|
7345
8098
|
1: "default",
|
|
7346
8099
|
2: "alternative"
|
|
@@ -8285,6 +9038,21 @@ const eventListTreatmentValues = [
|
|
|
8285
9038
|
"editorial-register",
|
|
8286
9039
|
"dense-index"
|
|
8287
9040
|
];
|
|
9041
|
+
const testimonialsCompositionTreatmentValues = [
|
|
9042
|
+
"open-editorial",
|
|
9043
|
+
"evergreen-lead",
|
|
9044
|
+
"room-and-response",
|
|
9045
|
+
"open-floor"
|
|
9046
|
+
];
|
|
9047
|
+
/**
|
|
9048
|
+
* How an offerings preview arranges its groups. Structure only — the group
|
|
9049
|
+
* card surface is the Look's `cardRole` and the site style's card system.
|
|
9050
|
+
*/
|
|
9051
|
+
const offeringsPreviewCompositionTreatmentValues = [
|
|
9052
|
+
"paired-feature-cards",
|
|
9053
|
+
"open-editorial-columns",
|
|
9054
|
+
"joined-programme-panel"
|
|
9055
|
+
];
|
|
8288
9056
|
const eyebrowTreatmentValues = [
|
|
8289
9057
|
"plain",
|
|
8290
9058
|
"accent",
|
|
@@ -8818,8 +9586,7 @@ const cardStylesOverrideSchema = z.object({
|
|
|
8818
9586
|
spacing: semanticSpacingSchema.nullable().optional(),
|
|
8819
9587
|
raised: z.boolean().nullable().optional(),
|
|
8820
9588
|
rounded: boxRoundedSchema.nullable().optional(),
|
|
8821
|
-
role: cardRoleSchema.nullable().optional()
|
|
8822
|
-
cardVariant: boxStylesCardVariantSchema.nullable().optional()
|
|
9589
|
+
role: cardRoleSchema.nullable().optional()
|
|
8823
9590
|
});
|
|
8824
9591
|
const blockStyleOverridesSchema = z.object({
|
|
8825
9592
|
sectionStyles: sectionStylesOverrideSchema.nullable().optional(),
|
|
@@ -9708,7 +10475,12 @@ defineBlockAppearancePreset({
|
|
|
9708
10475
|
constraints: { layoutVariantKeys: ["cards"] },
|
|
9709
10476
|
design: {
|
|
9710
10477
|
sectionSurface: "base",
|
|
9711
|
-
contentFrame: plainFrame
|
|
10478
|
+
contentFrame: plainFrame,
|
|
10479
|
+
cardRole: "alternative",
|
|
10480
|
+
composition: {
|
|
10481
|
+
kind: "offerings-preview",
|
|
10482
|
+
treatment: "paired-feature-cards"
|
|
10483
|
+
}
|
|
9712
10484
|
}
|
|
9713
10485
|
}), defineBlockAppearancePreset({
|
|
9714
10486
|
id: "offerings-preview-open-editorial-columns",
|
|
@@ -9718,7 +10490,12 @@ defineBlockAppearancePreset({
|
|
|
9718
10490
|
constraints: { layoutVariantKeys: ["cards"] },
|
|
9719
10491
|
design: {
|
|
9720
10492
|
sectionSurface: "base",
|
|
9721
|
-
contentFrame: plainFrame
|
|
10493
|
+
contentFrame: plainFrame,
|
|
10494
|
+
cardRole: "open",
|
|
10495
|
+
composition: {
|
|
10496
|
+
kind: "offerings-preview",
|
|
10497
|
+
treatment: "open-editorial-columns"
|
|
10498
|
+
}
|
|
9722
10499
|
}
|
|
9723
10500
|
}), defineBlockAppearancePreset({
|
|
9724
10501
|
id: "offerings-preview-joined-programme-panel",
|
|
@@ -9728,7 +10505,12 @@ defineBlockAppearancePreset({
|
|
|
9728
10505
|
constraints: { layoutVariantKeys: ["cards"] },
|
|
9729
10506
|
design: {
|
|
9730
10507
|
sectionSurface: "base",
|
|
9731
|
-
contentFrame: plainFrame
|
|
10508
|
+
contentFrame: plainFrame,
|
|
10509
|
+
cardRole: "default",
|
|
10510
|
+
composition: {
|
|
10511
|
+
kind: "offerings-preview",
|
|
10512
|
+
treatment: "joined-programme-panel"
|
|
10513
|
+
}
|
|
9732
10514
|
}
|
|
9733
10515
|
}), defineBlockAppearancePreset({
|
|
9734
10516
|
id: "feature-cards-raised-rule",
|
|
@@ -9970,7 +10752,11 @@ defineBlockAppearancePreset({
|
|
|
9970
10752
|
constraints: { layoutVariantKeys: ["featured-editorial"] },
|
|
9971
10753
|
design: {
|
|
9972
10754
|
sectionSurface: "base",
|
|
9973
|
-
contentFrame: plainFrame
|
|
10755
|
+
contentFrame: plainFrame,
|
|
10756
|
+
composition: {
|
|
10757
|
+
kind: "testimonials",
|
|
10758
|
+
treatment: "evergreen-lead"
|
|
10759
|
+
}
|
|
9974
10760
|
}
|
|
9975
10761
|
}), defineBlockAppearancePreset({
|
|
9976
10762
|
id: "testimonials-room-and-response",
|
|
@@ -9980,7 +10766,11 @@ defineBlockAppearancePreset({
|
|
|
9980
10766
|
constraints: { layoutVariantKeys: ["featured-editorial"] },
|
|
9981
10767
|
design: {
|
|
9982
10768
|
sectionSurface: "base",
|
|
9983
|
-
contentFrame: plainFrame
|
|
10769
|
+
contentFrame: plainFrame,
|
|
10770
|
+
composition: {
|
|
10771
|
+
kind: "testimonials",
|
|
10772
|
+
treatment: "room-and-response"
|
|
10773
|
+
}
|
|
9984
10774
|
}
|
|
9985
10775
|
}), defineBlockAppearancePreset({
|
|
9986
10776
|
id: "testimonials-open-floor",
|
|
@@ -9990,7 +10780,11 @@ defineBlockAppearancePreset({
|
|
|
9990
10780
|
constraints: { layoutVariantKeys: ["featured-editorial"] },
|
|
9991
10781
|
design: {
|
|
9992
10782
|
sectionSurface: "base",
|
|
9993
|
-
contentFrame: plainFrame
|
|
10783
|
+
contentFrame: plainFrame,
|
|
10784
|
+
composition: {
|
|
10785
|
+
kind: "testimonials",
|
|
10786
|
+
treatment: "open-floor"
|
|
10787
|
+
}
|
|
9994
10788
|
}
|
|
9995
10789
|
}), defineBlockAppearancePreset({
|
|
9996
10790
|
id: "faq-base-accordion",
|
|
@@ -12915,7 +13709,8 @@ const curatedSiteStyles = [
|
|
|
12915
13709
|
buttonStyleChoices: [
|
|
12916
13710
|
buttonChoice("soft-pill"),
|
|
12917
13711
|
buttonChoice("pebble"),
|
|
12918
|
-
buttonChoice("confident-chip")
|
|
13712
|
+
buttonChoice("confident-chip"),
|
|
13713
|
+
buttonChoice("flat-ink")
|
|
12919
13714
|
],
|
|
12920
13715
|
paletteRecommendations: [
|
|
12921
13716
|
paletteRecommendation("soft-natural-sage"),
|
|
@@ -14430,7 +15225,6 @@ const ALLOWED_TRANSFORM_IDS = [
|
|
|
14430
15225
|
"boxStyles.resolveRootStyle",
|
|
14431
15226
|
"boxStyles.semanticGap",
|
|
14432
15227
|
"boxStyles.semanticGapValue",
|
|
14433
|
-
"boxStyles.cardVariantClass",
|
|
14434
15228
|
"containerStyles.resolveBoxClassName"
|
|
14435
15229
|
];
|
|
14436
15230
|
/**
|
|
@@ -15880,8 +16674,41 @@ function containerStylesField(options = {}) {
|
|
|
15880
16674
|
return createBoxStylesFieldWithDepth("container", options);
|
|
15881
16675
|
}
|
|
15882
16676
|
function cardStylesField(options = {}) {
|
|
16677
|
+
if (options.controls === "role-only") return createRoleOnlyCardStylesField(options);
|
|
15883
16678
|
return createBoxStylesFieldWithDepth("card", options);
|
|
15884
16679
|
}
|
|
16680
|
+
function createRoleOnlyCardStylesField(options) {
|
|
16681
|
+
const { id = "_cardStyles", label = "Card styles", renderInHeader, intent } = options;
|
|
16682
|
+
return {
|
|
16683
|
+
id,
|
|
16684
|
+
type: "modal",
|
|
16685
|
+
label,
|
|
16686
|
+
required: false,
|
|
16687
|
+
schema: { fields: [{
|
|
16688
|
+
id: "role",
|
|
16689
|
+
type: "select",
|
|
16690
|
+
label: "Card style",
|
|
16691
|
+
description: "Choose a semantic card style from the active site style.",
|
|
16692
|
+
required: false,
|
|
16693
|
+
multiple: false,
|
|
16694
|
+
defaultValue: "default",
|
|
16695
|
+
options: cardVariantRoleValues.map((value) => ({
|
|
16696
|
+
value,
|
|
16697
|
+
label: value === "default" ? "Default" : "Alternative"
|
|
16698
|
+
}))
|
|
16699
|
+
}] },
|
|
16700
|
+
ui: {
|
|
16701
|
+
...typeof renderInHeader === "boolean" ? { renderInHeader } : {},
|
|
16702
|
+
...intent ? { intent } : {},
|
|
16703
|
+
modalConfig: {
|
|
16704
|
+
buttonLabel: label,
|
|
16705
|
+
description: "Choose the site-style card role.",
|
|
16706
|
+
buttonVariant: "outline",
|
|
16707
|
+
showCustomizedIndicator: true
|
|
16708
|
+
}
|
|
16709
|
+
}
|
|
16710
|
+
};
|
|
16711
|
+
}
|
|
15885
16712
|
//#endregion
|
|
15886
16713
|
//#region ../blocks/src/system/fields/imageShape.ts
|
|
15887
16714
|
const standardImageShapeOptions = [
|
|
@@ -17068,21 +17895,29 @@ function cardRoleClass(role) {
|
|
|
17068
17895
|
return `card-role-${role}`;
|
|
17069
17896
|
}
|
|
17070
17897
|
/**
|
|
17898
|
+
* The role class for a card slot the *block* owns structurally, where a Look
|
|
17899
|
+
* may still name the surface.
|
|
17900
|
+
*
|
|
17901
|
+
* Some layouts have more than one card slot and decide themselves which one is
|
|
17902
|
+
* the statement — the featured-editorial testimonials field is a lead voice
|
|
17903
|
+
* beside its supporting voices, and that is structure, not composition. Those
|
|
17904
|
+
* slots still have to honour a Look that picks a surface, or a role-picking
|
|
17905
|
+
* Look would silently no-op under the layout. So the slot carries a default
|
|
17906
|
+
* role and the Look's compiled role wins over it when there is one.
|
|
17907
|
+
*
|
|
17908
|
+
* An explicit `none` is honoured as boxlessness and emits no class, matching
|
|
17909
|
+
* how the composite emitter reads it.
|
|
17910
|
+
*/
|
|
17911
|
+
/**
|
|
17071
17912
|
* The role a card renders with, and the one place a set of card styles becomes
|
|
17072
17913
|
* a role.
|
|
17073
17914
|
*
|
|
17074
|
-
* Precedence: a per-item override, then the `role` a Look
|
|
17075
|
-
* block's card styles
|
|
17076
|
-
*
|
|
17077
|
-
* vocabulary — an explicit `role` wins when a record carries both.
|
|
17078
|
-
*
|
|
17079
|
-
* Compiled and freshly authored card styles carry only `role`. `cardVariant`
|
|
17080
|
-
* survives on content persisted before the role contract, and normalizes here
|
|
17081
|
-
* rather than in `cardStylesOverrideSchema` because that content reaches the
|
|
17082
|
-
* renderer as a raw record without ever passing through the schema.
|
|
17915
|
+
* Precedence: a per-item override, then the `role` a Look or semantic field
|
|
17916
|
+
* compiled onto the block's card styles. Persisted inputs are normalized at
|
|
17917
|
+
* this boundary because raw block records do not pass through the theme schema.
|
|
17083
17918
|
*/
|
|
17084
17919
|
function resolveCardRoleForBoxStyles(input, override) {
|
|
17085
|
-
return override ?? normalizeCardRole(input.role)
|
|
17920
|
+
return override ?? normalizeCardRole(input.role);
|
|
17086
17921
|
}
|
|
17087
17922
|
/**
|
|
17088
17923
|
* Parse a block's own per-item surface vocabulary into a card role. The alias
|
|
@@ -17099,8 +17934,8 @@ function resolveItemCardRole(value, aliases) {
|
|
|
17099
17934
|
* The card surface for a set of box styles: one role, one class vocabulary, so
|
|
17100
17935
|
* a site-style swap re-skins the card whichever field named it.
|
|
17101
17936
|
*/
|
|
17102
|
-
function cardSurface(input, override) {
|
|
17103
|
-
const role = resolveCardRoleForBoxStyles(input, override);
|
|
17937
|
+
function cardSurface(input, override, fallback) {
|
|
17938
|
+
const role = resolveCardRoleForBoxStyles(input, override) ?? fallback ?? null;
|
|
17104
17939
|
if (!role) return {
|
|
17105
17940
|
role: null,
|
|
17106
17941
|
classes: []
|
|
@@ -17197,10 +18032,9 @@ function raisedClassFor(options) {
|
|
|
17197
18032
|
* of keeping a copy that drifts.
|
|
17198
18033
|
*/
|
|
17199
18034
|
function boxStyleClassNames(value, options) {
|
|
17200
|
-
|
|
17201
|
-
const input = value;
|
|
18035
|
+
const input = value && typeof value === "object" ? value : {};
|
|
17202
18036
|
const borderOverride = borderOverrideClass(input);
|
|
17203
|
-
const surface = cardSurface(input, options.cardRoleOverride);
|
|
18037
|
+
const surface = cardSurface(input, options.cardRoleOverride, options.cardRoleFallback);
|
|
17204
18038
|
const cardOwnsBorder = surface.role !== null && surface.role !== "none";
|
|
17205
18039
|
return [
|
|
17206
18040
|
borderOverride || cardOwnsBorder ? withoutBorderClasses(options.baseClass ?? "") : options.baseClass ?? "",
|
|
@@ -17348,29 +18182,41 @@ const cardRoleClassTransform = {
|
|
|
17348
18182
|
return baseClass ? `${baseClass.trim()} ${hook}` : hook;
|
|
17349
18183
|
}
|
|
17350
18184
|
};
|
|
17351
|
-
|
|
17352
|
-
|
|
18185
|
+
/**
|
|
18186
|
+
* The role class for a layout's own card slot, bound from the block's compiled
|
|
18187
|
+
* card styles so a Look that picks a surface still reaches a slot the layout
|
|
18188
|
+
* assigned a default role to.
|
|
18189
|
+
*/
|
|
18190
|
+
const cardSlotRoleTransform = {
|
|
18191
|
+
id: "boxStyles.cardSlotRole",
|
|
17353
18192
|
kind: "string",
|
|
17354
|
-
summary: "
|
|
17355
|
-
run: (value, options) => {
|
|
17356
|
-
|
|
17357
|
-
|
|
17358
|
-
|
|
17359
|
-
|
|
17360
|
-
return baseClass ? `${baseClass} ${roleClass}` : roleClass;
|
|
17361
|
-
}
|
|
18193
|
+
summary: "Resolve a layout card slot's role class, defaulting to the slot's own role",
|
|
18194
|
+
run: (value, options) => boxStyleClassNames(value, {
|
|
18195
|
+
baseClass: options?.baseClass,
|
|
18196
|
+
cardRoleFallback: options.slotDefault,
|
|
18197
|
+
includeSpacing: false
|
|
18198
|
+
})
|
|
17362
18199
|
};
|
|
18200
|
+
function resolveBorderColorState(value, options, viewModel) {
|
|
18201
|
+
const input = asPartialObject(options?.stylesPath ? readPath(viewModel, options.stylesPath) : value);
|
|
18202
|
+
if (!input) return null;
|
|
18203
|
+
return {
|
|
18204
|
+
input,
|
|
18205
|
+
role: resolveCardRoleForBoxStyles(input, options?.stylesPath ? resolveItemCardRole(value, options.itemRoleAliases) : void 0)
|
|
18206
|
+
};
|
|
18207
|
+
}
|
|
17363
18208
|
const boxStylesBorderColorTransform = {
|
|
17364
18209
|
id: "boxStyles.borderColor",
|
|
17365
18210
|
kind: "string",
|
|
17366
18211
|
summary: "Resolve border color from box styles border.colorToken",
|
|
17367
|
-
run: (value, options,
|
|
18212
|
+
run: (value, options, context) => {
|
|
17368
18213
|
const fallbackToken = options?.fallbackToken ?? "border";
|
|
17369
18214
|
const returnEmptyForDefault = options?.returnEmptyForDefault ?? false;
|
|
17370
18215
|
let explicitToken = null;
|
|
17371
|
-
const
|
|
17372
|
-
if (
|
|
17373
|
-
|
|
18216
|
+
const state = resolveBorderColorState(value, options, context.viewModel);
|
|
18217
|
+
if (state) {
|
|
18218
|
+
if (state.role && state.role !== "none") return "";
|
|
18219
|
+
const border = normalizeBoxStylesBorder(state.input.border);
|
|
17374
18220
|
if (border && border.enabled === true && border.colorToken) explicitToken = border.colorToken;
|
|
17375
18221
|
}
|
|
17376
18222
|
if (explicitToken) {
|
|
@@ -17590,7 +18436,7 @@ const boxStylesTransforms = [
|
|
|
17590
18436
|
roundedTransform,
|
|
17591
18437
|
boxStylesCompositeTransform,
|
|
17592
18438
|
cardRoleClassTransform,
|
|
17593
|
-
|
|
18439
|
+
cardSlotRoleTransform,
|
|
17594
18440
|
boxStylesBorderColorTransform,
|
|
17595
18441
|
sectionClassNameTransform,
|
|
17596
18442
|
containerStylesResolveClassName,
|
|
@@ -17697,10 +18543,16 @@ function styledCard(children, opts, ...mods) {
|
|
|
17697
18543
|
const style = {
|
|
17698
18544
|
...opts.style ?? {},
|
|
17699
18545
|
borderColor: { $bind: {
|
|
17700
|
-
from: opts.stylesFrom,
|
|
18546
|
+
from: opts.itemRole?.from ?? opts.stylesFrom,
|
|
17701
18547
|
transforms: [{
|
|
17702
18548
|
id: "boxStyles.borderColor",
|
|
17703
|
-
options: {
|
|
18549
|
+
options: {
|
|
18550
|
+
returnEmptyForDefault: true,
|
|
18551
|
+
...opts.itemRole ? {
|
|
18552
|
+
stylesPath: opts.stylesFrom,
|
|
18553
|
+
...opts.itemRole.aliases ? { itemRoleAliases: opts.itemRole.aliases } : {}
|
|
18554
|
+
} : {}
|
|
18555
|
+
}
|
|
17704
18556
|
}]
|
|
17705
18557
|
} }
|
|
17706
18558
|
};
|
|
@@ -18825,18 +19677,73 @@ function buildGridCardsLayout(className) {
|
|
|
18825
19677
|
return el("div", { className }, buildResponsiveGridCards());
|
|
18826
19678
|
}
|
|
18827
19679
|
/**
|
|
19680
|
+
* The card slots the featured-editorial layout has, and the role each one
|
|
19681
|
+
* defaults to.
|
|
19682
|
+
*
|
|
19683
|
+
* Which slot is the statement is *structure*, so the layout decides it: this
|
|
19684
|
+
* variant exists to put one lead voice beside its supporting voices. But a Look
|
|
19685
|
+
* that picks a surface has to keep meaning something here, so the lead slot's
|
|
19686
|
+
* role is a default the Look's compiled `cardRole` wins over — see
|
|
19687
|
+
* `cardSlotRoleClass`. Supporting voices stay the quiet everyday card.
|
|
19688
|
+
*/
|
|
19689
|
+
const FEATURED_EDITORIAL_SLOTS = {
|
|
19690
|
+
lead: {
|
|
19691
|
+
/** Composition CSS addresses the lead card's geometry through this. */
|
|
19692
|
+
variantClass: "rb-testimonials-fe-card--feature",
|
|
19693
|
+
slotDefault: "alternative",
|
|
19694
|
+
followsLook: true
|
|
19695
|
+
},
|
|
19696
|
+
support: {
|
|
19697
|
+
variantClass: null,
|
|
19698
|
+
slotDefault: "default",
|
|
19699
|
+
followsLook: false
|
|
19700
|
+
}
|
|
19701
|
+
};
|
|
19702
|
+
/** Where the testimonials block's compiled card styles live. */
|
|
19703
|
+
const TESTIMONIALS_CARD_STYLES_PATH = "content._cardStyles";
|
|
19704
|
+
/**
|
|
19705
|
+
* The class list for one featured-editorial card slot.
|
|
19706
|
+
*
|
|
19707
|
+
* A slot that follows the Look has to resolve at render time, so it binds
|
|
19708
|
+
* through the shared card-class emitter rather than naming a role class here;
|
|
19709
|
+
* a slot that does not is a plain string built by the same composite emitter.
|
|
19710
|
+
*/
|
|
19711
|
+
function featuredEditorialCardClassName(slot) {
|
|
19712
|
+
const { variantClass, slotDefault, followsLook } = FEATURED_EDITORIAL_SLOTS[slot];
|
|
19713
|
+
const baseClass = ["rb-testimonials-fe-card", variantClass].filter(Boolean).join(" ");
|
|
19714
|
+
if (!followsLook) return boxStyleClassNames({}, {
|
|
19715
|
+
baseClass,
|
|
19716
|
+
cardRoleFallback: slotDefault,
|
|
19717
|
+
includeSpacing: false
|
|
19718
|
+
});
|
|
19719
|
+
return { $bind: {
|
|
19720
|
+
from: TESTIMONIALS_CARD_STYLES_PATH,
|
|
19721
|
+
transforms: [{
|
|
19722
|
+
id: "boxStyles.cardSlotRole",
|
|
19723
|
+
options: {
|
|
19724
|
+
baseClass,
|
|
19725
|
+
slotDefault
|
|
19726
|
+
}
|
|
19727
|
+
}],
|
|
19728
|
+
fallback: boxStyleClassNames({}, {
|
|
19729
|
+
baseClass,
|
|
19730
|
+
cardRoleFallback: slotDefault,
|
|
19731
|
+
includeSpacing: false
|
|
19732
|
+
})
|
|
19733
|
+
} };
|
|
19734
|
+
}
|
|
19735
|
+
/**
|
|
18828
19736
|
* Build a single "featured editorial" testimonial card.
|
|
18829
19737
|
*
|
|
18830
|
-
* This card type deliberately renders NO avatar/headshot:
|
|
18831
|
-
*
|
|
18832
|
-
*
|
|
18833
|
-
*
|
|
18834
|
-
* - `rb-testimonials-fe-card--plain` → white surface card
|
|
19738
|
+
* This card type deliberately renders NO avatar/headshot: a quote mark, the
|
|
19739
|
+
* quote body, then the author name and a context line. The card surface comes
|
|
19740
|
+
* from the slot's card role — the site style owns the fill, border, corners and
|
|
19741
|
+
* padding.
|
|
18835
19742
|
*
|
|
18836
19743
|
* Extra modifiers (`repeat`, `when`) are forwarded to the card node so the
|
|
18837
19744
|
* caller can drive first-vs-rest branching.
|
|
18838
19745
|
*/
|
|
18839
|
-
function buildFeaturedEditorialCard(
|
|
19746
|
+
function buildFeaturedEditorialCard(slot, ...mods) {
|
|
18840
19747
|
const quoteMark = text({
|
|
18841
19748
|
as: "span",
|
|
18842
19749
|
className: "rb-testimonials-fe-qmark",
|
|
@@ -18850,11 +19757,11 @@ function buildFeaturedEditorialCard(variantClass, ...mods) {
|
|
|
18850
19757
|
as: "span",
|
|
18851
19758
|
className: "rb-testimonials-fe-context"
|
|
18852
19759
|
}, when("testimonial.content.jobTitle"), bind("testimonial.content.jobTitle"))]);
|
|
18853
|
-
return el("div", { className:
|
|
19760
|
+
return el("div", { className: featuredEditorialCardClassName(slot) }, [el("div", { className: "card-content rb-testimonials-fe-card-body" }, [
|
|
18854
19761
|
quoteMark,
|
|
18855
19762
|
quote,
|
|
18856
19763
|
meta
|
|
18857
|
-
], ...mods);
|
|
19764
|
+
])], ...mods);
|
|
18858
19765
|
}
|
|
18859
19766
|
/**
|
|
18860
19767
|
* Build the "featured editorial" layout: an asymmetric two-column arrangement
|
|
@@ -18868,7 +19775,7 @@ function buildFeaturedEditorialCard(variantClass, ...mods) {
|
|
|
18868
19775
|
* index scope in context, so entry 0 produces no node in the rest column.
|
|
18869
19776
|
*/
|
|
18870
19777
|
function buildFeaturedEditorialLayout() {
|
|
18871
|
-
return el("div", { className: "rb-testimonials-fe-grid" }, [buildFeaturedEditorialCard("
|
|
19778
|
+
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", {
|
|
18872
19779
|
equals: 0,
|
|
18873
19780
|
not: true
|
|
18874
19781
|
}))])]);
|
|
@@ -19595,7 +20502,7 @@ const newsletterFormFragment = defineFragment({
|
|
|
19595
20502
|
});
|
|
19596
20503
|
//#endregion
|
|
19597
20504
|
//#region ../blocks/src/system/fragments/library/card.ts
|
|
19598
|
-
const cardVariantOptions
|
|
20505
|
+
const cardVariantOptions = cardVariantRoleValues.map((value) => ({
|
|
19599
20506
|
value,
|
|
19600
20507
|
label: value === "default" ? "Default" : "Alternative"
|
|
19601
20508
|
}));
|
|
@@ -19693,7 +20600,7 @@ const cardFragment = defineFragment({
|
|
|
19693
20600
|
description: "Choose a card style from your theme",
|
|
19694
20601
|
required: false,
|
|
19695
20602
|
defaultValue: "default",
|
|
19696
|
-
options: cardVariantOptions
|
|
20603
|
+
options: cardVariantOptions,
|
|
19697
20604
|
ui: { intent: "style" }
|
|
19698
20605
|
}
|
|
19699
20606
|
],
|
|
@@ -19702,7 +20609,10 @@ const cardFragment = defineFragment({
|
|
|
19702
20609
|
className: { $bind: {
|
|
19703
20610
|
from: "variant",
|
|
19704
20611
|
fallback: "default",
|
|
19705
|
-
transforms: [{
|
|
20612
|
+
transforms: [{
|
|
20613
|
+
id: "boxStyles.cardRoleClass",
|
|
20614
|
+
options: { baseClass: "" }
|
|
20615
|
+
}]
|
|
19706
20616
|
} }
|
|
19707
20617
|
}, [media({
|
|
19708
20618
|
className: "card-media rb-w-full rb-h-auto rb-object-cover",
|
|
@@ -25648,19 +26558,13 @@ const blockBookingPaymentCollectionOptionSchema = z.union([
|
|
|
25648
26558
|
]);
|
|
25649
26559
|
const blockBookingPaymentTermsSchema = z.object({ allowedOptions: z.array(blockBookingPaymentCollectionOptionSchema).min(1) });
|
|
25650
26560
|
//#endregion
|
|
25651
|
-
//#region ../blocks/src/system/blocks/
|
|
25652
|
-
|
|
25653
|
-
* Zod schema for course venue data
|
|
25654
|
-
*/
|
|
25655
|
-
const courseVenueSchema = z.object({
|
|
26561
|
+
//#region ../blocks/src/system/blocks/events/whole-series/schemas.ts
|
|
26562
|
+
const wholeSeriesVenueSchema = z.object({
|
|
25656
26563
|
id: z.string(),
|
|
25657
26564
|
name: z.string(),
|
|
25658
26565
|
address: z.string().nullable()
|
|
25659
26566
|
});
|
|
25660
|
-
|
|
25661
|
-
* Zod schema for course session (occurrence) data
|
|
25662
|
-
*/
|
|
25663
|
-
const courseSessionSchema = z.object({
|
|
26567
|
+
const wholeSeriesSessionSchema = z.object({
|
|
25664
26568
|
id: z.string(),
|
|
25665
26569
|
startsAt: z.string(),
|
|
25666
26570
|
endsAt: z.string(),
|
|
@@ -25668,14 +26572,14 @@ const courseSessionSchema = z.object({
|
|
|
25668
26572
|
capacityOverride: z.number().nullable().optional(),
|
|
25669
26573
|
overrides: z.record(z.string(), z.unknown()).nullable().optional()
|
|
25670
26574
|
});
|
|
25671
|
-
const
|
|
26575
|
+
const wholeSeriesTeamMemberSummarySchema = z.object({
|
|
25672
26576
|
id: z.string(),
|
|
25673
26577
|
name: z.string(),
|
|
25674
26578
|
roleLabel: z.string().nullable(),
|
|
25675
26579
|
summary: z.string().nullable(),
|
|
25676
26580
|
profilePath: z.string().nullable()
|
|
25677
26581
|
});
|
|
25678
|
-
const
|
|
26582
|
+
const wholeSeriesPricingOptionSchema = z.object({
|
|
25679
26583
|
id: z.string(),
|
|
25680
26584
|
name: z.string(),
|
|
25681
26585
|
description: z.string().nullable(),
|
|
@@ -25691,7 +26595,7 @@ const coursePricingOptionSchema = z.object({
|
|
|
25691
26595
|
"both"
|
|
25692
26596
|
]).nullable().optional()
|
|
25693
26597
|
});
|
|
25694
|
-
const
|
|
26598
|
+
const wholeSeriesPricingSchema = z.object({
|
|
25695
26599
|
bookingRequirement: z.enum(["none", "required"]),
|
|
25696
26600
|
pricingStrategy: z.enum([
|
|
25697
26601
|
"free",
|
|
@@ -25705,20 +26609,17 @@ const coursePricingSchema = z.object({
|
|
|
25705
26609
|
slidingMaxAmount: z.number().nullable().optional(),
|
|
25706
26610
|
slidingSuggestedAmount: z.number().nullable().optional(),
|
|
25707
26611
|
paymentTerms: blockBookingPaymentTermsSchema,
|
|
25708
|
-
options: z.array(
|
|
26612
|
+
options: z.array(wholeSeriesPricingOptionSchema)
|
|
25709
26613
|
});
|
|
25710
|
-
/**
|
|
25711
|
-
* Zod schema for public course data
|
|
25712
|
-
*/
|
|
25713
26614
|
const publicWholeSeriesOfferingSchema = z.object({
|
|
25714
26615
|
eventSeriesId: z.string(),
|
|
25715
26616
|
eventOfferingId: z.string(),
|
|
25716
26617
|
title: z.string(),
|
|
25717
26618
|
slug: z.string(),
|
|
25718
26619
|
description: z.unknown().nullable(),
|
|
25719
|
-
teamMembers: z.array(
|
|
26620
|
+
teamMembers: z.array(wholeSeriesTeamMemberSummarySchema).optional(),
|
|
25720
26621
|
enrollmentOpen: z.boolean(),
|
|
25721
|
-
pricing:
|
|
26622
|
+
pricing: wholeSeriesPricingSchema,
|
|
25722
26623
|
currency: z.string(),
|
|
25723
26624
|
paymentTerms: blockBookingPaymentTermsSchema,
|
|
25724
26625
|
enrollmentCapacity: z.number().nullable(),
|
|
@@ -25731,12 +26632,10 @@ const publicWholeSeriesOfferingSchema = z.object({
|
|
|
25731
26632
|
sessionsCount: z.number(),
|
|
25732
26633
|
enrolledCount: z.number(),
|
|
25733
26634
|
availableSpots: z.number().nullable(),
|
|
25734
|
-
sessions: z.array(
|
|
25735
|
-
venue:
|
|
26635
|
+
sessions: z.array(wholeSeriesSessionSchema),
|
|
26636
|
+
venue: wholeSeriesVenueSchema.nullable()
|
|
25736
26637
|
});
|
|
25737
|
-
|
|
25738
|
-
const publicCourseSchema = publicWholeSeriesOfferingSchema;
|
|
25739
|
-
const publicCoursesArraySchema = z.array(publicWholeSeriesOfferingSchema);
|
|
26638
|
+
const publicWholeSeriesOfferingsArraySchema = z.array(publicWholeSeriesOfferingSchema);
|
|
25740
26639
|
//#endregion
|
|
25741
26640
|
//#region ../blocks/src/system/blocks/events/shared/schemas.ts
|
|
25742
26641
|
const eventPresetSchema = z.enum([
|
|
@@ -26047,7 +26946,7 @@ const publicEventSchema = z.object({
|
|
|
26047
26946
|
acceptsMemberships: z.boolean().optional(),
|
|
26048
26947
|
wholeSeries: z.object({
|
|
26049
26948
|
eventSeriesId: z.string(),
|
|
26050
|
-
pricing:
|
|
26949
|
+
pricing: wholeSeriesPricingSchema,
|
|
26051
26950
|
currency: z.string(),
|
|
26052
26951
|
enrollmentOpen: z.boolean()
|
|
26053
26952
|
}).nullable().optional()
|
|
@@ -26056,24 +26955,19 @@ const publicEventSchema = z.object({
|
|
|
26056
26955
|
* Schema for an array of public events
|
|
26057
26956
|
*/
|
|
26058
26957
|
const publicEventsArraySchema = z.array(publicEventSchema);
|
|
26958
|
+
//#endregion
|
|
26959
|
+
//#region ../blocks/src/system/blocks/events/shared/fields.ts
|
|
26059
26960
|
/**
|
|
26060
26961
|
* Shared card styling fields for event blocks
|
|
26061
26962
|
*/
|
|
26062
26963
|
const cardStylingFields = [
|
|
26063
|
-
{
|
|
26064
|
-
id: "
|
|
26065
|
-
type: "select",
|
|
26964
|
+
cardStylesField({
|
|
26965
|
+
id: "_cardStyles",
|
|
26066
26966
|
label: "Card style",
|
|
26067
|
-
|
|
26068
|
-
|
|
26069
|
-
|
|
26070
|
-
|
|
26071
|
-
options: cardVariantRoleValues.map((value) => ({
|
|
26072
|
-
value,
|
|
26073
|
-
label: value === "default" ? "Default" : "Alternative"
|
|
26074
|
-
})),
|
|
26075
|
-
ui: { intent: "style" }
|
|
26076
|
-
},
|
|
26967
|
+
controls: "role-only",
|
|
26968
|
+
renderInHeader: false,
|
|
26969
|
+
intent: "style"
|
|
26970
|
+
}),
|
|
26077
26971
|
createButtonVariantField({ description: "Choose a button style from your theme" }),
|
|
26078
26972
|
{
|
|
26079
26973
|
id: "buttonText",
|
|
@@ -26212,14 +27106,7 @@ function normalizeIdList(parts) {
|
|
|
26212
27106
|
}
|
|
26213
27107
|
//#endregion
|
|
26214
27108
|
//#region ../blocks/src/system/blocks/events/shared/filtering.ts
|
|
26215
|
-
const eventSurfacePresetValues =
|
|
26216
|
-
"course",
|
|
26217
|
-
"term",
|
|
26218
|
-
"class",
|
|
26219
|
-
"workshop",
|
|
26220
|
-
"retreat",
|
|
26221
|
-
"performance"
|
|
26222
|
-
];
|
|
27109
|
+
const eventSurfacePresetValues = SURFACE_EVENT_PRESET_VALUES;
|
|
26223
27110
|
const eventSurfaceScopeValues = [
|
|
26224
27111
|
"all",
|
|
26225
27112
|
"regularClassSchedule",
|
|
@@ -26720,8 +27607,8 @@ const eventRegistrationHydrationSchemaShape = {
|
|
|
26720
27607
|
occurrenceContext: occurrenceContextSchema.optional(),
|
|
26721
27608
|
subject: eventRegistrationPageSurfaceSubjectSchema.nullable().optional(),
|
|
26722
27609
|
events: z.array(eventRegistrationPublicEventSchema).nullable().optional(),
|
|
26723
|
-
wholeSeriesOfferings:
|
|
26724
|
-
wholeSeriesOffering:
|
|
27610
|
+
wholeSeriesOfferings: publicWholeSeriesOfferingsArraySchema.nullable().optional(),
|
|
27611
|
+
wholeSeriesOffering: publicWholeSeriesOfferingSchema.nullable().optional(),
|
|
26725
27612
|
maxTickets: z.string().optional(),
|
|
26726
27613
|
showVenue: z.boolean().optional(),
|
|
26727
27614
|
showCapacity: z.boolean().optional(),
|
|
@@ -26743,12 +27630,13 @@ const eventRegistrationSourceSchema = z.object({
|
|
|
26743
27630
|
portalToken: z.string().nullable().optional(),
|
|
26744
27631
|
previewToken: z.string().nullable().optional(),
|
|
26745
27632
|
...eventRegistrationHydrationSchemaShape,
|
|
27633
|
+
subjectWholeSeriesOffering: publicWholeSeriesOfferingSchema.nullable().optional(),
|
|
26746
27634
|
className: z.string().nullable().optional(),
|
|
26747
27635
|
buttonText: z.string().nullable().optional(),
|
|
26748
27636
|
maxTickets: z.string().nullable().optional(),
|
|
26749
27637
|
stage: previewStageSchema.optional()
|
|
26750
27638
|
});
|
|
26751
|
-
const eventRegistrationDisplaySchema = z.object({
|
|
27639
|
+
const eventRegistrationDisplaySchema = z.discriminatedUnion("state", [z.object({
|
|
26752
27640
|
kind: z.literal("event-registration"),
|
|
26753
27641
|
state: z.literal("generic-shell"),
|
|
26754
27642
|
className: z.string().nullable(),
|
|
@@ -26756,7 +27644,13 @@ const eventRegistrationDisplaySchema = z.object({
|
|
|
26756
27644
|
bodyText: z.string(),
|
|
26757
27645
|
stepLabels: z.array(z.enum(EVENT_REGISTRATION_SHELL_STEP_LABELS)).min(1),
|
|
26758
27646
|
summaryButtonText: z.string()
|
|
26759
|
-
})
|
|
27647
|
+
}), z.object({
|
|
27648
|
+
kind: z.literal("event-registration"),
|
|
27649
|
+
state: z.literal("registration-closed"),
|
|
27650
|
+
className: z.string().nullable(),
|
|
27651
|
+
titleText: z.string(),
|
|
27652
|
+
bodyText: z.string()
|
|
27653
|
+
})]);
|
|
26760
27654
|
const eventRegistrationHydrationSchema = z.object(eventRegistrationHydrationSchemaShape);
|
|
26761
27655
|
const eventRegistrationRenderSchema = z.object({
|
|
26762
27656
|
display: eventRegistrationDisplaySchema,
|
|
@@ -26770,6 +27664,13 @@ z.object({
|
|
|
26770
27664
|
stage: previewStageSchema.optional()
|
|
26771
27665
|
});
|
|
26772
27666
|
function buildEventRegistrationDisplay(source) {
|
|
27667
|
+
if (resolveWholeSeriesOffering(source)?.enrollmentOpen === false) return {
|
|
27668
|
+
kind: "event-registration",
|
|
27669
|
+
state: "registration-closed",
|
|
27670
|
+
className: source.className ?? null,
|
|
27671
|
+
titleText: "Registration closed",
|
|
27672
|
+
bodyText: "This run is no longer open for bookings."
|
|
27673
|
+
};
|
|
26773
27674
|
const stepLabels = buildEventRegistrationShellStepLabels(source);
|
|
26774
27675
|
return {
|
|
26775
27676
|
kind: "event-registration",
|
|
@@ -26781,6 +27682,9 @@ function buildEventRegistrationDisplay(source) {
|
|
|
26781
27682
|
summaryButtonText: source.buttonText?.trim() || "Register"
|
|
26782
27683
|
};
|
|
26783
27684
|
}
|
|
27685
|
+
function resolveWholeSeriesOffering(source) {
|
|
27686
|
+
return source.wholeSeriesOffering ?? source.subjectWholeSeriesOffering ?? null;
|
|
27687
|
+
}
|
|
26784
27688
|
function buildEventRegistrationShellStepLabels(source) {
|
|
26785
27689
|
const scopedEvents = scopeEventRegistrationEvents(source);
|
|
26786
27690
|
if (scopedEvents.length === 0) return EVENT_REGISTRATION_GENERIC_SHELL_STEP_LABELS;
|
|
@@ -26838,7 +27742,7 @@ const eventRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
|
|
|
26838
27742
|
subject: source.subject ?? null,
|
|
26839
27743
|
events: source.events ?? null,
|
|
26840
27744
|
wholeSeriesOfferings: source.wholeSeriesOfferings ?? null,
|
|
26841
|
-
wholeSeriesOffering: source
|
|
27745
|
+
wholeSeriesOffering: resolveWholeSeriesOffering(source),
|
|
26842
27746
|
maxTickets: source.maxTickets ?? void 0,
|
|
26843
27747
|
showVenue: source.showVenue,
|
|
26844
27748
|
showCapacity: source.showCapacity,
|
|
@@ -27059,7 +27963,9 @@ const eventRegistrationBlockDefinition = {
|
|
|
27059
27963
|
fallback: false
|
|
27060
27964
|
} },
|
|
27061
27965
|
events: { $bind: { from: "data.events" } },
|
|
27062
|
-
wholeSeriesOffering: { $bind: { from: "data.
|
|
27966
|
+
wholeSeriesOffering: { $bind: { from: "data.selectedRunOffering.offering" } },
|
|
27967
|
+
subjectWholeSeriesOffering: { $bind: { from: "data.subjectWholeSeriesOffering.offering" } },
|
|
27968
|
+
wholeSeriesOfferings: { $bind: { from: "data.wholeSeriesOfferings" } },
|
|
27063
27969
|
sitePasses: { $bind: { from: "data.sitePasses" } },
|
|
27064
27970
|
siteMemberships: { $bind: { from: "data.siteMemberships" } },
|
|
27065
27971
|
stage: { $bind: {
|
|
@@ -27073,7 +27979,9 @@ const eventRegistrationBlockDefinition = {
|
|
|
27073
27979
|
runtime: eventRegistrationBlockRuntime,
|
|
27074
27980
|
dataSchemas: {
|
|
27075
27981
|
events: publicEventsArraySchema.optional(),
|
|
27076
|
-
|
|
27982
|
+
selectedRunOffering: z.object({ offering: publicWholeSeriesOfferingSchema }).optional(),
|
|
27983
|
+
subjectWholeSeriesOffering: z.object({ offering: publicWholeSeriesOfferingSchema }).optional(),
|
|
27984
|
+
wholeSeriesOfferings: z.array(publicWholeSeriesOfferingSchema).optional(),
|
|
27077
27985
|
sitePasses: publicPassProductCollectionSchema.optional(),
|
|
27078
27986
|
siteMemberships: publicMembershipProductCollectionSchema.optional(),
|
|
27079
27987
|
occurrenceContext: occurrenceContextSchema.optional()
|
|
@@ -27090,11 +27998,29 @@ const eventRegistrationBlockDefinition = {
|
|
|
27090
27998
|
} },
|
|
27091
27999
|
readProfile: "registration",
|
|
27092
28000
|
seriesId: { $bind: { from: "$root.subject.eventSeriesId" } },
|
|
28001
|
+
seriesIds: { $bind: {
|
|
28002
|
+
from: "$root.subject.availableEventSeriesIds",
|
|
28003
|
+
transforms: [{ id: "value.csv" }]
|
|
28004
|
+
} },
|
|
28005
|
+
runSeriesId: { $bind: { from: "$root.entrySubrouteContext.run.seriesId" } },
|
|
27093
28006
|
includeOccurrenceId: { $bind: { from: "$root.occurrenceContext.id" } }
|
|
27094
28007
|
},
|
|
27095
28008
|
mode: "server"
|
|
27096
28009
|
},
|
|
27097
|
-
|
|
28010
|
+
selectedRunOffering: {
|
|
28011
|
+
endpoint: "getPublicWholeSeriesOffering",
|
|
28012
|
+
params: {
|
|
28013
|
+
siteId: { $bind: { from: "$root.siteId" } },
|
|
28014
|
+
eventSeriesId: { $bind: { from: "$root.entrySubrouteContext.run.seriesId" } },
|
|
28015
|
+
stage: { $bind: {
|
|
28016
|
+
from: "$root.previewStage",
|
|
28017
|
+
fallback: "published"
|
|
28018
|
+
} }
|
|
28019
|
+
},
|
|
28020
|
+
requiredParams: ["eventSeriesId"],
|
|
28021
|
+
mode: "server"
|
|
28022
|
+
},
|
|
28023
|
+
subjectWholeSeriesOffering: {
|
|
27098
28024
|
endpoint: "getPublicWholeSeriesOffering",
|
|
27099
28025
|
when: { $bind: {
|
|
27100
28026
|
from: "$root.subject.isWholeSeriesBooking",
|
|
@@ -27111,6 +28037,22 @@ const eventRegistrationBlockDefinition = {
|
|
|
27111
28037
|
requiredParams: ["eventSeriesId"],
|
|
27112
28038
|
mode: "server"
|
|
27113
28039
|
},
|
|
28040
|
+
wholeSeriesOfferings: {
|
|
28041
|
+
endpoint: "listPublicWholeSeriesOfferings",
|
|
28042
|
+
params: {
|
|
28043
|
+
siteId: { $bind: { from: "$root.siteId" } },
|
|
28044
|
+
eventSeriesIds: { $bind: {
|
|
28045
|
+
from: "$root.subject.availableEventSeriesIds",
|
|
28046
|
+
transforms: [{ id: "value.csv" }]
|
|
28047
|
+
} },
|
|
28048
|
+
stage: { $bind: {
|
|
28049
|
+
from: "$root.previewStage",
|
|
28050
|
+
fallback: "published"
|
|
28051
|
+
} }
|
|
28052
|
+
},
|
|
28053
|
+
requiredParams: ["eventSeriesIds"],
|
|
28054
|
+
mode: "server"
|
|
28055
|
+
},
|
|
27114
28056
|
sitePasses: {
|
|
27115
28057
|
endpoint: "listPublicPasses",
|
|
27116
28058
|
params: { siteId: { $bind: { from: "$root.siteId" } } },
|
|
@@ -27125,13 +28067,9 @@ const eventRegistrationBlockDefinition = {
|
|
|
27125
28067
|
};
|
|
27126
28068
|
//#endregion
|
|
27127
28069
|
//#region ../blocks/src/system/runtime/nodes/course-registration.interactive.ts
|
|
27128
|
-
const
|
|
27129
|
-
siteId: z.string().optional(),
|
|
27130
|
-
apiBaseUrl: z.string().optional(),
|
|
27131
|
-
portalToken: z.string().nullable().optional(),
|
|
28070
|
+
const courseRegistrationHydrationSchemaShape = {
|
|
27132
28071
|
subject: eventRegistrationPageSurfaceSubjectSchema.nullable().optional(),
|
|
27133
|
-
courses: z.array(
|
|
27134
|
-
className: z.string().nullable().optional(),
|
|
28072
|
+
courses: z.array(publicWholeSeriesOfferingSchema).nullable().optional(),
|
|
27135
28073
|
showSessions: z.boolean().optional(),
|
|
27136
28074
|
showPrice: z.boolean().optional(),
|
|
27137
28075
|
showCapacity: z.boolean().optional(),
|
|
@@ -27139,8 +28077,15 @@ const courseRegistrationSourceSchema = z.object({
|
|
|
27139
28077
|
successMessage: z.string().optional(),
|
|
27140
28078
|
waitlistMessage: z.string().optional(),
|
|
27141
28079
|
membershipMessage: z.string().optional(),
|
|
28080
|
+
buttonVariant: registrationButtonVariantSchema.optional()
|
|
28081
|
+
};
|
|
28082
|
+
const courseRegistrationSourceSchema = z.object({
|
|
28083
|
+
siteId: z.string().optional(),
|
|
28084
|
+
apiBaseUrl: z.string().optional(),
|
|
28085
|
+
portalToken: z.string().nullable().optional(),
|
|
28086
|
+
...courseRegistrationHydrationSchemaShape,
|
|
28087
|
+
className: z.string().nullable().optional(),
|
|
27142
28088
|
buttonText: z.string().nullable().optional(),
|
|
27143
|
-
buttonVariant: registrationButtonVariantSchema.optional(),
|
|
27144
28089
|
stage: previewStageSchema.optional()
|
|
27145
28090
|
});
|
|
27146
28091
|
const courseRegistrationDisplaySchema = z.object({
|
|
@@ -27149,18 +28094,7 @@ const courseRegistrationDisplaySchema = z.object({
|
|
|
27149
28094
|
className: z.string().nullable(),
|
|
27150
28095
|
summaryButtonText: z.string()
|
|
27151
28096
|
});
|
|
27152
|
-
const courseRegistrationHydrationSchema = z.object(
|
|
27153
|
-
subject: eventRegistrationPageSurfaceSubjectSchema.nullable().optional(),
|
|
27154
|
-
courses: z.array(publicCourseSchema).nullable().optional(),
|
|
27155
|
-
showSessions: z.boolean().optional(),
|
|
27156
|
-
showPrice: z.boolean().optional(),
|
|
27157
|
-
showCapacity: z.boolean().optional(),
|
|
27158
|
-
showVenue: z.boolean().optional(),
|
|
27159
|
-
successMessage: z.string().optional(),
|
|
27160
|
-
waitlistMessage: z.string().optional(),
|
|
27161
|
-
membershipMessage: z.string().optional(),
|
|
27162
|
-
buttonVariant: registrationButtonVariantSchema.optional()
|
|
27163
|
-
});
|
|
28097
|
+
const courseRegistrationHydrationSchema = z.object(courseRegistrationHydrationSchemaShape);
|
|
27164
28098
|
const courseRegistrationRenderSchema = z.object({
|
|
27165
28099
|
display: courseRegistrationDisplaySchema,
|
|
27166
28100
|
hydration: courseRegistrationHydrationSchema
|
|
@@ -27365,7 +28299,7 @@ const courseRegistrationBlockDefinition = {
|
|
|
27365
28299
|
})]
|
|
27366
28300
|
}),
|
|
27367
28301
|
runtime: courseRegistrationBlockRuntime,
|
|
27368
|
-
dataSchemas: { courses:
|
|
28302
|
+
dataSchemas: { courses: publicWholeSeriesOfferingsArraySchema.optional() },
|
|
27369
28303
|
dataLoaders: { courses: {
|
|
27370
28304
|
endpoint: "listPublicWholeSeriesOfferings",
|
|
27371
28305
|
params: {
|
|
@@ -27436,6 +28370,22 @@ const eventDetailsManifest = createBlockManifest({
|
|
|
27436
28370
|
defaultValue: true,
|
|
27437
28371
|
ui: { intent: "display" }
|
|
27438
28372
|
},
|
|
28373
|
+
{
|
|
28374
|
+
id: "showTitle",
|
|
28375
|
+
type: "boolean",
|
|
28376
|
+
label: "Show event title",
|
|
28377
|
+
required: false,
|
|
28378
|
+
defaultValue: false,
|
|
28379
|
+
ui: { intent: "display" }
|
|
28380
|
+
},
|
|
28381
|
+
{
|
|
28382
|
+
id: "showDescription",
|
|
28383
|
+
type: "boolean",
|
|
28384
|
+
label: "Show event description",
|
|
28385
|
+
required: false,
|
|
28386
|
+
defaultValue: false,
|
|
28387
|
+
ui: { intent: "display" }
|
|
28388
|
+
},
|
|
27439
28389
|
{
|
|
27440
28390
|
id: "showMap",
|
|
27441
28391
|
type: "boolean",
|
|
@@ -27472,10 +28422,22 @@ const eventDetailsManifest = createBlockManifest({
|
|
|
27472
28422
|
{
|
|
27473
28423
|
value: "10",
|
|
27474
28424
|
label: "10 dates"
|
|
28425
|
+
},
|
|
28426
|
+
{
|
|
28427
|
+
value: "all",
|
|
28428
|
+
label: "All dates"
|
|
27475
28429
|
}
|
|
27476
28430
|
],
|
|
27477
28431
|
ui: { intent: "display" }
|
|
27478
28432
|
},
|
|
28433
|
+
{
|
|
28434
|
+
id: "showCapacity",
|
|
28435
|
+
type: "boolean",
|
|
28436
|
+
label: "Show capacity",
|
|
28437
|
+
required: false,
|
|
28438
|
+
defaultValue: false,
|
|
28439
|
+
ui: { intent: "display" }
|
|
28440
|
+
},
|
|
27479
28441
|
{
|
|
27480
28442
|
id: "showCost",
|
|
27481
28443
|
type: "boolean",
|
|
@@ -27518,6 +28480,8 @@ const eventDetailsManifest = createBlockManifest({
|
|
|
27518
28480
|
} },
|
|
27519
28481
|
events: { $bind: { from: "data.eventDetailsData.events" } },
|
|
27520
28482
|
showVenue: { $bind: { from: "content.showVenue" } },
|
|
28483
|
+
showTitle: { $bind: { from: "content.showTitle" } },
|
|
28484
|
+
showDescription: { $bind: { from: "content.showDescription" } },
|
|
27521
28485
|
showMap: { $bind: { from: "content.showMap" } },
|
|
27522
28486
|
showOtherDates: { $bind: { from: "content.showOtherDates" } },
|
|
27523
28487
|
otherDatesLimit: { $bind: {
|
|
@@ -27528,6 +28492,10 @@ const eventDetailsManifest = createBlockManifest({
|
|
|
27528
28492
|
from: "content.showCost",
|
|
27529
28493
|
fallback: true
|
|
27530
28494
|
} },
|
|
28495
|
+
showCapacity: { $bind: {
|
|
28496
|
+
from: "content.showCapacity",
|
|
28497
|
+
fallback: false
|
|
28498
|
+
} },
|
|
27531
28499
|
showAcceptedPasses: { $bind: {
|
|
27532
28500
|
from: "content.showAcceptedPasses",
|
|
27533
28501
|
fallback: true
|
|
@@ -27582,6 +28550,11 @@ const eventDetailsBlockDefinition = {
|
|
|
27582
28550
|
limit: "100",
|
|
27583
28551
|
readProfile: "details",
|
|
27584
28552
|
seriesId: { $bind: { from: "$root.subject.eventSeriesId" } },
|
|
28553
|
+
seriesIds: { $bind: {
|
|
28554
|
+
from: "$root.subject.availableEventSeriesIds",
|
|
28555
|
+
transforms: [{ id: "value.csv" }]
|
|
28556
|
+
} },
|
|
28557
|
+
runSeriesId: { $bind: { from: "$root.entrySubrouteContext.run.seriesId" } },
|
|
27585
28558
|
includeOccurrenceId: { $bind: { from: "$root.occurrenceContext.id" } }
|
|
27586
28559
|
},
|
|
27587
28560
|
mode: "server"
|
|
@@ -27767,7 +28740,7 @@ const courseDetailsBlockDefinition = {
|
|
|
27767
28740
|
})], { gap: "lg" })
|
|
27768
28741
|
})]
|
|
27769
28742
|
}),
|
|
27770
|
-
dataSchemas: { courses:
|
|
28743
|
+
dataSchemas: { courses: publicWholeSeriesOfferingsArraySchema.optional() },
|
|
27771
28744
|
dataLoaders: { courses: {
|
|
27772
28745
|
endpoint: "listPublicWholeSeriesOfferings",
|
|
27773
28746
|
params: {
|
|
@@ -27886,8 +28859,8 @@ const eventSpotlightBlockDefinition = {
|
|
|
27886
28859
|
from: "content.columns",
|
|
27887
28860
|
fallback: "3"
|
|
27888
28861
|
} },
|
|
27889
|
-
|
|
27890
|
-
from: "content.
|
|
28862
|
+
cardRole: { $bind: {
|
|
28863
|
+
from: "content._cardStyles.role",
|
|
27891
28864
|
fallback: "default"
|
|
27892
28865
|
} },
|
|
27893
28866
|
buttonVariant: { $bind: {
|
|
@@ -28049,6 +29022,7 @@ const eventCollectionSourceSchemaShape = {
|
|
|
28049
29022
|
showVenue: z.boolean().nullable().optional(),
|
|
28050
29023
|
showMap: z.boolean().nullable().optional(),
|
|
28051
29024
|
showCapacity: z.boolean().nullable().optional(),
|
|
29025
|
+
cardRole: cardRoleSchema.optional(),
|
|
28052
29026
|
buttonVariant: eventButtonVariantSchema.optional(),
|
|
28053
29027
|
buttonText: z.string().optional(),
|
|
28054
29028
|
emptyMessage: z.string().optional(),
|
|
@@ -28076,6 +29050,7 @@ const eventCollectionDisplaySchemaShape = {
|
|
|
28076
29050
|
showVenue: z.boolean(),
|
|
28077
29051
|
showMap: z.boolean(),
|
|
28078
29052
|
showCapacity: z.boolean(),
|
|
29053
|
+
cardRole: cardRoleSchema,
|
|
28079
29054
|
buttonVariant: eventButtonVariantSchema,
|
|
28080
29055
|
buttonText: z.string(),
|
|
28081
29056
|
emptyMessage: z.string()
|
|
@@ -28125,6 +29100,7 @@ function buildEventCollectionPresentationDisplay(source) {
|
|
|
28125
29100
|
showVenue: source.showVenue ?? true,
|
|
28126
29101
|
showMap: source.showMap ?? true,
|
|
28127
29102
|
showCapacity: source.showCapacity ?? true,
|
|
29103
|
+
cardRole: source.cardRole ?? "default",
|
|
28128
29104
|
buttonVariant: source.buttonVariant ?? "primary",
|
|
28129
29105
|
buttonText: source.buttonText ?? "Book",
|
|
28130
29106
|
emptyMessage: source.emptyMessage ?? "No upcoming events scheduled."
|
|
@@ -28142,8 +29118,6 @@ function buildEventCollectionHydration(source) {
|
|
|
28142
29118
|
}
|
|
28143
29119
|
//#endregion
|
|
28144
29120
|
//#region ../blocks/src/system/runtime/nodes/events/EventListing.interactive.ts
|
|
28145
|
-
const legacyEventCardVariantSchema = z.enum(["variant1", "variant2"]);
|
|
28146
|
-
const eventCardVariantInputSchema = z.union([cardVariantRoleSchema, legacyEventCardVariantSchema]);
|
|
28147
29121
|
const cardOrientationSchema = z.enum(["vertical", "horizontal"]);
|
|
28148
29122
|
const eventSurfaceScopeSchema = z.enum(eventSurfaceScopeValues);
|
|
28149
29123
|
const eventScheduleScopeSchema = z.enum(eventScheduleScopeValues);
|
|
@@ -28158,7 +29132,7 @@ const eventListingSourceSchema = z.object({
|
|
|
28158
29132
|
paginationMode: z.enum(["loadMore", "seeAllLink"]).optional(),
|
|
28159
29133
|
seeAllUrl: z.string().optional(),
|
|
28160
29134
|
loadMoreText: z.string().optional(),
|
|
28161
|
-
|
|
29135
|
+
cardRole: cardRoleSchema.optional(),
|
|
28162
29136
|
buttonVariant: eventButtonVariantSchema.optional(),
|
|
28163
29137
|
buttonText: z.string().optional(),
|
|
28164
29138
|
showVenue: z.boolean().optional(),
|
|
@@ -28180,7 +29154,7 @@ const eventListingDisplaySchema = z.object({
|
|
|
28180
29154
|
emptyMessage: z.string(),
|
|
28181
29155
|
loadingMessage: z.string(),
|
|
28182
29156
|
containerClass: z.string(),
|
|
28183
|
-
|
|
29157
|
+
cardRole: cardRoleSchema,
|
|
28184
29158
|
buttonVariant: eventButtonVariantSchema,
|
|
28185
29159
|
buttonText: z.string(),
|
|
28186
29160
|
showVenue: z.boolean(),
|
|
@@ -28236,7 +29210,7 @@ const eventListingBlockRuntime = defineProgressiveBlockRuntime({
|
|
|
28236
29210
|
emptyMessage: source.emptyMessage ?? "No upcoming events scheduled.",
|
|
28237
29211
|
loadingMessage: "Loading events…",
|
|
28238
29212
|
containerClass: getContainerClass(layout, source.columns ?? "3"),
|
|
28239
|
-
|
|
29213
|
+
cardRole: source.cardRole ?? "default",
|
|
28240
29214
|
buttonVariant: source.buttonVariant ?? "primary",
|
|
28241
29215
|
buttonText: source.buttonText ?? "Book",
|
|
28242
29216
|
showVenue: source.showVenue ?? true,
|
|
@@ -28558,8 +29532,8 @@ const eventListingBlockDefinition = {
|
|
|
28558
29532
|
from: "content.loadMoreText",
|
|
28559
29533
|
fallback: "Load more events"
|
|
28560
29534
|
} },
|
|
28561
|
-
|
|
28562
|
-
from: "content.
|
|
29535
|
+
cardRole: { $bind: {
|
|
29536
|
+
from: "content._cardStyles.role",
|
|
28563
29537
|
fallback: "default"
|
|
28564
29538
|
} },
|
|
28565
29539
|
buttonVariant: { $bind: {
|
|
@@ -28829,6 +29803,10 @@ const eventCalendarLayout = [styledSection({
|
|
|
28829
29803
|
filterCategoryIds: { $bind: { from: "content.filterCategoryIds" } },
|
|
28830
29804
|
filterStaffMemberId: { $bind: { from: "content.filterStaffMemberId" } },
|
|
28831
29805
|
filterVenueId: { $bind: { from: "content.filterVenueId" } },
|
|
29806
|
+
cardRole: { $bind: {
|
|
29807
|
+
from: "content._cardStyles.role",
|
|
29808
|
+
fallback: "default"
|
|
29809
|
+
} },
|
|
28832
29810
|
buttonVariant: { $bind: {
|
|
28833
29811
|
from: "content.buttonVariant",
|
|
28834
29812
|
fallback: "primary"
|
|
@@ -29461,11 +30439,11 @@ const eventCalendarAdditionalFields = [
|
|
|
29461
30439
|
searchThreshold: 8
|
|
29462
30440
|
}
|
|
29463
30441
|
}),
|
|
29464
|
-
...cardStylingFields.
|
|
30442
|
+
...cardStylingFields.map((field) => ({
|
|
29465
30443
|
...field,
|
|
29466
30444
|
ui: {
|
|
29467
30445
|
...field.ui ?? {},
|
|
29468
|
-
intent: field.id === "buttonVariant" ? "style" : "content"
|
|
30446
|
+
intent: field.id === "_cardStyles" || field.id === "buttonVariant" ? "style" : "content"
|
|
29469
30447
|
}
|
|
29470
30448
|
})),
|
|
29471
30449
|
{
|
|
@@ -30232,7 +31210,7 @@ const offeringsPreviewBlockDefinition = {
|
|
|
30232
31210
|
dataSchemas: {
|
|
30233
31211
|
...offeringsPreviewEventDataSchemas,
|
|
30234
31212
|
routeCandidates: publicRouteCandidatesSchema.optional(),
|
|
30235
|
-
courses:
|
|
31213
|
+
courses: publicWholeSeriesOfferingsArraySchema.optional()
|
|
30236
31214
|
},
|
|
30237
31215
|
dataLoaders: {
|
|
30238
31216
|
...offeringsPreviewEventDataLoaders,
|
|
@@ -31704,7 +32682,7 @@ const audioPlayerBlockDefinition = { manifest: createBlockManifest({
|
|
|
31704
32682
|
}
|
|
31705
32683
|
],
|
|
31706
32684
|
layout: styledSection({
|
|
31707
|
-
children: stack({ className: "rb-container rb-mx-auto rb-max-w-3xl" }, [el("div", { className: "
|
|
32685
|
+
children: stack({ className: "rb-container rb-mx-auto rb-max-w-3xl" }, [el("div", { className: boxStyleClassNames({ role: "default" }, {}) }, [media({
|
|
31708
32686
|
className: "card-media rb-aspect-video rb-w-full rb-object-cover",
|
|
31709
32687
|
size: {
|
|
31710
32688
|
width: 960,
|
|
@@ -34756,16 +35734,27 @@ function eventListCapable() {
|
|
|
34756
35734
|
looks: "supported",
|
|
34757
35735
|
sectionSurfaces: "supported",
|
|
34758
35736
|
contentFrames: ["plain", "panel"],
|
|
34759
|
-
cardRoles: "
|
|
35737
|
+
cardRoles: "supported",
|
|
34760
35738
|
eventListTreatments
|
|
34761
35739
|
});
|
|
34762
35740
|
}
|
|
35741
|
+
function eventSpotlightCapable() {
|
|
35742
|
+
return declareBlockDesignCapability({
|
|
35743
|
+
sectionSurfaces: "supported",
|
|
35744
|
+
contentFrames: ["plain"],
|
|
35745
|
+
cardRoles: "supported"
|
|
35746
|
+
});
|
|
35747
|
+
}
|
|
34763
35748
|
function offeringsPreviewCapable() {
|
|
34764
35749
|
return declareBlockDesignCapability({
|
|
34765
35750
|
looks: "supported",
|
|
34766
35751
|
sectionSurfaces: "supported",
|
|
34767
35752
|
contentFrames: ["plain"],
|
|
34768
|
-
cardRoles: "supported"
|
|
35753
|
+
cardRoles: "supported",
|
|
35754
|
+
compositions: {
|
|
35755
|
+
kind: "offerings-preview",
|
|
35756
|
+
treatments: offeringsPreviewCompositionTreatmentValues
|
|
35757
|
+
}
|
|
34769
35758
|
});
|
|
34770
35759
|
}
|
|
34771
35760
|
function defaultBoundaryBias(visualWeight) {
|
|
@@ -35058,7 +36047,7 @@ const systemBlockDefinitions = [
|
|
|
35058
36047
|
cardRoles: "supported",
|
|
35059
36048
|
compositions: {
|
|
35060
36049
|
kind: "testimonials",
|
|
35061
|
-
treatments:
|
|
36050
|
+
treatments: testimonialsCompositionTreatmentValues
|
|
35062
36051
|
},
|
|
35063
36052
|
headingDecorationCapability: {
|
|
35064
36053
|
kind: "supported",
|
|
@@ -35213,7 +36202,7 @@ const systemBlockDefinitions = [
|
|
|
35213
36202
|
weight: "standard"
|
|
35214
36203
|
})]
|
|
35215
36204
|
})),
|
|
35216
|
-
withDesignCapability("block.event-spotlight", eventSpotlightBlockDefinition,
|
|
36205
|
+
withDesignCapability("block.event-spotlight", eventSpotlightBlockDefinition, eventSpotlightCapable(), defineBlockDesignMetadata({
|
|
35217
36206
|
flow: offeringsFlow,
|
|
35218
36207
|
layoutProfiles: [layoutProfile({
|
|
35219
36208
|
variantKey: "default",
|
|
@@ -36452,184 +37441,29 @@ const EVENT_ATTENDEE_REFUND_INVALID_CODES = ["manual_booking_not_refundable", ..
|
|
|
36452
37441
|
[...EVENT_ATTENDEE_REFUND_INVALID_CODES, ...CANONICAL_ADMIN_REFUND_FAILURE_CODES];
|
|
36453
37442
|
[...STANDARD_LINE_ITEM_REFUND_INVALID_CODES, ...CANONICAL_ADMIN_REFUND_FAILURE_CODES];
|
|
36454
37443
|
//#endregion
|
|
36455
|
-
//#region ../api/src/
|
|
36456
|
-
|
|
36457
|
-
|
|
36458
|
-
|
|
36459
|
-
|
|
36460
|
-
|
|
36461
|
-
|
|
36462
|
-
|
|
36463
|
-
|
|
36464
|
-
|
|
36465
|
-
|
|
36466
|
-
|
|
36467
|
-
|
|
36468
|
-
|
|
36469
|
-
|
|
36470
|
-
|
|
36471
|
-
|
|
36472
|
-
|
|
36473
|
-
|
|
36474
|
-
|
|
36475
|
-
|
|
36476
|
-
|
|
36477
|
-
//#region ../api/src/bookingVerticalCatalog.ts
|
|
36478
|
-
const VERTICAL_BOOKING_PRESETS = [
|
|
36479
|
-
verticalBookingPreset("yoga_wellness.classes", "yoga_wellness", "class", "Class", "Classes", "Regular scheduled classes and group sessions."),
|
|
36480
|
-
verticalBookingPreset("yoga_wellness.workshops", "yoga_wellness", "workshop", "Workshop", "Workshops", "One-off workshops, day retreats, or special sessions."),
|
|
36481
|
-
verticalBookingPreset("yoga_wellness.courses", "yoga_wellness", "course", "Course", "Courses", "Fixed-schedule courses or multi-session groups."),
|
|
36482
|
-
verticalBookingPreset("yoga_wellness.retreats", "yoga_wellness", "retreat", "Retreat", "Retreats", "Multi-day or residential retreats and immersive experiences."),
|
|
36483
|
-
verticalBookingPreset("yoga_wellness.appointments", "yoga_wellness", "appointment", "Appointment", "Appointments", "Private sessions, consultations, or one-to-one support."),
|
|
36484
|
-
verticalBookingPreset("fitness_pt.group_training", "fitness_pt", "class", "Group training", "Group training", "Regular scheduled classes and group sessions."),
|
|
36485
|
-
verticalBookingPreset("fitness_pt.personal_training", "fitness_pt", "appointment", "Personal training", "Personal training", "One-to-one sessions booked from your availability."),
|
|
36486
|
-
verticalBookingPreset("fitness_pt.programmes", "fitness_pt", "course", "Programme", "Programmes", "Multi-session programmes like bootcamps or courses."),
|
|
36487
|
-
verticalBookingPreset("fitness_pt.workshops", "fitness_pt", "workshop", "Workshop", "Workshops", "One-off workshops, events, or special sessions."),
|
|
36488
|
-
verticalBookingPreset("fitness_pt.retreats", "fitness_pt", "retreat", "Retreat", "Retreats", "Multi-day or residential fitness experiences."),
|
|
36489
|
-
verticalBookingPreset("dance_school.classes", "dance_school", "class", "Class", "Classes", "Regular group classes and weekly sessions."),
|
|
36490
|
-
verticalBookingPreset("dance_school.terms", "dance_school", "course", "Term", "Terms", "Multi-week term blocks or fixed-date course groups."),
|
|
36491
|
-
verticalBookingPreset("dance_school.courses", "dance_school", "course", "Course", "Courses", "Fixed-schedule courses or multi-session groups.", "settings"),
|
|
36492
|
-
verticalBookingPreset("dance_school.workshops", "dance_school", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, or intensives."),
|
|
36493
|
-
verticalBookingPreset("dance_school.private_lessons", "dance_school", "appointment", "Private lesson", "Private lessons", "One-to-one lessons or coaching sessions."),
|
|
36494
|
-
verticalBookingPreset("dance_school.shows", "dance_school", "performance", "Show", "Shows", "Ticketed performances, showcases, and recitals."),
|
|
36495
|
-
verticalBookingPreset("physiotherapy_physical_health.appointments", "physiotherapy_physical_health", "appointment", "Appointment", "Appointments", "Assessments, treatments, follow-ups, and rehabilitation sessions."),
|
|
36496
|
-
verticalBookingPreset("physiotherapy_physical_health.rehab_classes", "physiotherapy_physical_health", "class", "Rehab class", "Rehab classes", "Regular rehabilitation, mobility, strength, or recovery classes."),
|
|
36497
|
-
verticalBookingPreset("physiotherapy_physical_health.workshops", "physiotherapy_physical_health", "workshop", "Workshop", "Workshops", "One-off workshops, talks, or practical group sessions."),
|
|
36498
|
-
verticalBookingPreset("massage_bodywork.treatments", "massage_bodywork", "appointment", "Treatment", "Treatments", "Massage treatments, bodywork sessions, and one-to-one appointments."),
|
|
36499
|
-
verticalBookingPreset("massage_bodywork.group_sessions", "massage_bodywork", "class", "Group session", "Group sessions", "Regular bodywork, somatic movement, or self-massage sessions."),
|
|
36500
|
-
verticalBookingPreset("massage_bodywork.workshops", "massage_bodywork", "workshop", "Workshop", "Workshops", "One-off bodywork, self-massage, or somatic practice workshops."),
|
|
36501
|
-
verticalBookingPreset("therapist_practitioner.appointments", "therapist_practitioner", "appointment", "Appointment", "Appointments", "Sessions, consultations, treatments, or assessments."),
|
|
36502
|
-
verticalBookingPreset("therapist_practitioner.workshops", "therapist_practitioner", "workshop", "Workshop", "Workshops", "One-off group workshops, talks, or wellbeing sessions."),
|
|
36503
|
-
verticalBookingPreset("therapist_practitioner.retreats", "therapist_practitioner", "retreat", "Retreat", "Retreats", "Multi-day retreats or immersive group experiences."),
|
|
36504
|
-
verticalBookingPreset("beauty_spa.appointments", "beauty_spa", "appointment", "Appointment", "Appointments", "Treatments, consultations, services, and sessions."),
|
|
36505
|
-
verticalBookingPreset("beauty_spa.workshops", "beauty_spa", "workshop", "Workshop", "Workshops", "Skincare workshops, makeup lessons, demos, or group events."),
|
|
36506
|
-
verticalBookingPreset("consultant_coach.appointments", "consultant_coach", "appointment", "Appointment", "Appointments", "One-to-one calls, consultations, reviews, or coaching sessions."),
|
|
36507
|
-
verticalBookingPreset("consultant_coach.workshops", "consultant_coach", "workshop", "Workshop", "Workshops", "One-off group sessions, webinars, or strategy days."),
|
|
36508
|
-
verticalBookingPreset("consultant_coach.courses", "consultant_coach", "course", "Course", "Courses", "Fixed-schedule cohorts or multi-session group programmes."),
|
|
36509
|
-
verticalBookingPreset("consultant_coach.retreats", "consultant_coach", "retreat", "Retreat", "Retreats", "Multi-day coaching retreats or immersive experiences."),
|
|
36510
|
-
verticalBookingPreset("training_provider.courses", "training_provider", "course", "Course", "Courses", "Fixed-schedule courses, cohorts, and multi-session training."),
|
|
36511
|
-
verticalBookingPreset("training_provider.workshops", "training_provider", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, and short training sessions."),
|
|
36512
|
-
verticalBookingPreset("training_provider.appointments", "training_provider", "appointment", "Appointment", "Appointments", "Consultations, assessments, mentoring, or office hours."),
|
|
36513
|
-
verticalBookingPreset("training_provider.classes", "training_provider", "class", "Class", "Classes", "Regular classes, sessions, or groups.", "settings"),
|
|
36514
|
-
verticalBookingPreset("training_provider.residentials", "training_provider", "retreat", "Residential", "Residentials", "Residential courses or multi-day training experiences.", "settings"),
|
|
36515
|
-
verticalBookingPreset("retreat_centre.retreats", "retreat_centre", "retreat", "Retreat", "Retreats", "Multi-day or residential retreats with richer booking needs."),
|
|
36516
|
-
verticalBookingPreset("retreat_centre.workshops", "retreat_centre", "workshop", "Workshop", "Workshops", "One-day retreats, ceremonies, workshops, or special events."),
|
|
36517
|
-
verticalBookingPreset("retreat_centre.classes", "retreat_centre", "class", "Class", "Classes", "Regular sessions like guided meditations or group practices."),
|
|
36518
|
-
verticalBookingPreset("retreat_centre.courses", "retreat_centre", "course", "Course", "Courses", "Fixed-schedule programmes or multi-session experiences."),
|
|
36519
|
-
verticalBookingPreset("retreat_centre.appointments", "retreat_centre", "appointment", "Appointment", "Appointments", "Private sessions, therapies, consultations, or add-ons."),
|
|
36520
|
-
verticalBookingPreset("music_school.lessons", "music_school", "appointment", "Lesson", "Lessons", "One-to-one lessons, consultations, or coaching sessions."),
|
|
36521
|
-
verticalBookingPreset("music_school.classes", "music_school", "class", "Class", "Classes", "Regular group classes, ensembles, or recurring sessions."),
|
|
36522
|
-
verticalBookingPreset("music_school.terms", "music_school", "course", "Term", "Terms", "Multi-week term blocks or fixed-date group courses."),
|
|
36523
|
-
verticalBookingPreset("music_school.workshops", "music_school", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, or intensives."),
|
|
36524
|
-
verticalBookingPreset("music_school.performances", "music_school", "performance", "Performance", "Performances", "Concerts, recitals, showcases, or ticketed performances."),
|
|
36525
|
-
verticalBookingPreset("voice_singing.lessons", "voice_singing", "appointment", "Voice session", "Voice sessions", "One-to-one singing lessons, voice coaching, or private practice sessions."),
|
|
36526
|
-
verticalBookingPreset("voice_singing.classes", "voice_singing", "class", "Ongoing weekly session", "Ongoing weekly sessions", "Regular choirs, voice circles, community singing, or group practice."),
|
|
36527
|
-
verticalBookingPreset("voice_singing.terms", "voice_singing", "course", "Singing term", "Singing terms", "Multi-week choir terms, voice courses, or fixed-date group programmes."),
|
|
36528
|
-
verticalBookingPreset("voice_singing.workshops", "voice_singing", "workshop", "Workshop", "Workshops", "One-off singing workshops, voice journeys, or devotional singing sessions."),
|
|
36529
|
-
verticalBookingPreset("voice_singing.performances", "voice_singing", "performance", "Performance", "Performances", "Choir concerts, sharing events, recitals, or community performances."),
|
|
36530
|
-
verticalBookingPreset("performing_arts_school.classes", "performing_arts_school", "class", "Class", "Classes", "Regular group classes, rehearsals, or weekly sessions."),
|
|
36531
|
-
verticalBookingPreset("performing_arts_school.terms", "performing_arts_school", "course", "Term", "Terms", "Multi-week term blocks or fixed-date course groups."),
|
|
36532
|
-
verticalBookingPreset("performing_arts_school.workshops", "performing_arts_school", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, or intensives."),
|
|
36533
|
-
verticalBookingPreset("performing_arts_school.performances", "performing_arts_school", "performance", "Performance", "Performances", "Shows, showcases, productions, or ticketed performances."),
|
|
36534
|
-
verticalBookingPreset("performing_arts_school.lessons", "performing_arts_school", "appointment", "Lesson", "Lessons", "One-to-one lessons, coaching, or audition prep."),
|
|
36535
|
-
verticalBookingPreset("community_wellbeing.classes", "community_wellbeing", "class", "Class", "Classes", "Regular groups, sessions, practices, or weekly activities."),
|
|
36536
|
-
verticalBookingPreset("community_wellbeing.workshops", "community_wellbeing", "workshop", "Workshop", "Workshops", "One-off workshops, talks, events, or gatherings."),
|
|
36537
|
-
verticalBookingPreset("community_wellbeing.courses", "community_wellbeing", "course", "Course", "Courses", "Fixed-schedule courses, study groups, or multi-session programmes."),
|
|
36538
|
-
verticalBookingPreset("community_wellbeing.appointments", "community_wellbeing", "appointment", "Appointment", "Appointments", "One-to-one appointments, consultations, or support sessions."),
|
|
36539
|
-
verticalBookingPreset("community_wellbeing.retreats", "community_wellbeing", "retreat", "Retreat", "Retreats", "Multi-day or residential retreats."),
|
|
36540
|
-
verticalBookingPreset("venue_event_space.resource_hire", "venue_event_space", "appointment", "Hire slot", "Hire slots", "Future room, venue, and resource hire bookings.", "future")
|
|
36541
|
-
];
|
|
36542
|
-
const VERTICAL_ID_SET = /* @__PURE__ */ new Set([
|
|
36543
|
-
"yoga_wellness",
|
|
36544
|
-
"fitness_pt",
|
|
36545
|
-
"dance_school",
|
|
36546
|
-
"physiotherapy_physical_health",
|
|
36547
|
-
"massage_bodywork",
|
|
36548
|
-
"therapist_practitioner",
|
|
36549
|
-
"beauty_spa",
|
|
36550
|
-
"consultant_coach",
|
|
36551
|
-
"training_provider",
|
|
36552
|
-
"retreat_centre",
|
|
36553
|
-
"music_school",
|
|
36554
|
-
"voice_singing",
|
|
36555
|
-
"performing_arts_school",
|
|
36556
|
-
"community_wellbeing",
|
|
36557
|
-
"venue_event_space"
|
|
36558
|
-
]);
|
|
36559
|
-
const VERTICAL_PRESET_ID_SET = new Set(VERTICAL_BOOKING_PRESETS.map((presetDefinition) => presetDefinition.id));
|
|
36560
|
-
function parseVerticalId(value) {
|
|
36561
|
-
return typeof value === "string" && VERTICAL_ID_SET.has(value) ? value : null;
|
|
36562
|
-
}
|
|
36563
|
-
function parseVerticalPresetId(value) {
|
|
36564
|
-
return typeof value === "string" && VERTICAL_PRESET_ID_SET.has(value) ? value : null;
|
|
36565
|
-
}
|
|
36566
|
-
function getVerticalPresetDefinition(presetId) {
|
|
36567
|
-
const definition = VERTICAL_BOOKING_PRESETS.find((presetDefinition) => presetDefinition.id === presetId);
|
|
36568
|
-
if (!definition) throw new Error(`Unhandled vertical preset id: ${presetId}`);
|
|
36569
|
-
return definition;
|
|
36570
|
-
}
|
|
36571
|
-
function toNonEmptyVerticalPresetIds(presetIds) {
|
|
36572
|
-
const firstPresetId = presetIds[0];
|
|
36573
|
-
return firstPresetId ? [firstPresetId, ...presetIds.slice(1)] : null;
|
|
36574
|
-
}
|
|
36575
|
-
function createConfiguredSiteVerticalBookingConfig(verticalId, selectedPresetIds) {
|
|
36576
|
-
return {
|
|
36577
|
-
verticalId,
|
|
36578
|
-
selectedPresetIds
|
|
36579
|
-
};
|
|
36580
|
-
}
|
|
36581
|
-
function createSiteVerticalBookingConfig(verticalId, selectedPresetIds) {
|
|
36582
|
-
const nonEmptyPresetIds = toNonEmptyVerticalPresetIds(selectedPresetIds);
|
|
36583
|
-
return nonEmptyPresetIds ? createConfiguredSiteVerticalBookingConfig(verticalId, nonEmptyPresetIds) : null;
|
|
36584
|
-
}
|
|
36585
|
-
function resolveSiteVerticalBookingConfig(rawConfig) {
|
|
36586
|
-
if (!rawConfig) return {
|
|
36587
|
-
kind: "unconfigured",
|
|
36588
|
-
config: DEFAULT_SITE_VERTICAL_BOOKING_CONFIG
|
|
36589
|
-
};
|
|
36590
|
-
const verticalId = parseVerticalId(rawConfig.verticalId);
|
|
36591
|
-
const selectedPresetIds = (Array.isArray(rawConfig.selectedPresetIds) ? rawConfig.selectedPresetIds : []).map(parseVerticalPresetId).filter((presetId) => Boolean(presetId));
|
|
36592
|
-
const config = {
|
|
36593
|
-
verticalId,
|
|
36594
|
-
selectedPresetIds
|
|
36595
|
-
};
|
|
36596
|
-
if (!verticalId && selectedPresetIds.length === 0) return {
|
|
36597
|
-
kind: "unconfigured",
|
|
36598
|
-
config: DEFAULT_SITE_VERTICAL_BOOKING_CONFIG
|
|
36599
|
-
};
|
|
36600
|
-
const issues = getSiteVerticalConfigIssues(rawConfig, config);
|
|
36601
|
-
if (issues.length > 0) return {
|
|
36602
|
-
kind: "invalid",
|
|
36603
|
-
config,
|
|
36604
|
-
issues
|
|
36605
|
-
};
|
|
36606
|
-
const configuredConfig = verticalId ? createSiteVerticalBookingConfig(verticalId, selectedPresetIds) : null;
|
|
36607
|
-
if (!configuredConfig) return {
|
|
36608
|
-
kind: "invalid",
|
|
36609
|
-
config,
|
|
36610
|
-
issues: ["empty_selected_presets"]
|
|
36611
|
-
};
|
|
36612
|
-
return {
|
|
36613
|
-
kind: "configured",
|
|
36614
|
-
config: configuredConfig,
|
|
36615
|
-
selectedPresets: configuredConfig.selectedPresetIds.map(getVerticalPresetDefinition)
|
|
36616
|
-
};
|
|
36617
|
-
}
|
|
36618
|
-
function getSiteVerticalConfigIssues(rawConfig, config) {
|
|
36619
|
-
const issues = /* @__PURE__ */ new Set();
|
|
36620
|
-
if (rawConfig.verticalId != null && !config.verticalId) issues.add("unknown_vertical");
|
|
36621
|
-
if (!config.verticalId && config.selectedPresetIds.length > 0) issues.add("missing_vertical");
|
|
36622
|
-
if ((Array.isArray(rawConfig.selectedPresetIds) ? rawConfig.selectedPresetIds : []).some((presetId) => parseVerticalPresetId(presetId) === null)) issues.add("unknown_preset");
|
|
36623
|
-
if (config.verticalId && config.selectedPresetIds.length === 0) issues.add("empty_selected_presets");
|
|
36624
|
-
const seenBehaviours = /* @__PURE__ */ new Set();
|
|
36625
|
-
for (const presetId of config.selectedPresetIds) {
|
|
36626
|
-
const presetDefinition = getVerticalPresetDefinition(presetId);
|
|
36627
|
-
if (config.verticalId && presetDefinition.verticalId !== config.verticalId) issues.add("preset_vertical_mismatch");
|
|
36628
|
-
if (presetDefinition.availability === "future") issues.add("future_preset_selected");
|
|
36629
|
-
if (seenBehaviours.has(presetDefinition.canonicalBehaviour)) issues.add("duplicate_canonical_behaviour");
|
|
36630
|
-
seenBehaviours.add(presetDefinition.canonicalBehaviour);
|
|
37444
|
+
//#region ../api/src/bookingVerticals.ts
|
|
37445
|
+
/**
|
|
37446
|
+
* Transport adapters for the booking-vertical domain.
|
|
37447
|
+
*
|
|
37448
|
+
* The domain catalog and all pure resolution/selection rules live in core;
|
|
37449
|
+
* this module owns only the Zod boundary used by API payloads.
|
|
37450
|
+
*/
|
|
37451
|
+
function formatRawDiagnosticValue(value) {
|
|
37452
|
+
const serialized = JSON.stringify(value);
|
|
37453
|
+
return serialized === void 0 ? String(value) : serialized;
|
|
37454
|
+
}
|
|
37455
|
+
function describeSiteVerticalConfigIssue(issue) {
|
|
37456
|
+
switch (issue.code) {
|
|
37457
|
+
case "unknown_vertical": return `${issue.code}: ${formatRawDiagnosticValue(issue.rawValue)}`;
|
|
37458
|
+
case "unknown_preset": return `${issue.code}: ${formatRawDiagnosticValue(issue.rawValue)}`;
|
|
37459
|
+
case "missing_vertical":
|
|
37460
|
+
case "empty_selected_presets":
|
|
37461
|
+
case "preset_vertical_mismatch":
|
|
37462
|
+
case "duplicate_preset_id":
|
|
37463
|
+
case "duplicate_canonical_behaviour":
|
|
37464
|
+
case "future_preset_selected": return issue.code;
|
|
37465
|
+
default: return assertNever$2(issue);
|
|
36631
37466
|
}
|
|
36632
|
-
return [...issues];
|
|
36633
37467
|
}
|
|
36634
37468
|
const VerticalIdSchema = z.string().trim().transform((value, ctx) => {
|
|
36635
37469
|
const parsed = parseVerticalId(value);
|
|
@@ -36661,16 +37495,12 @@ z.object({
|
|
|
36661
37495
|
if (resolved.kind === "invalid") {
|
|
36662
37496
|
ctx.addIssue({
|
|
36663
37497
|
code: z.ZodIssueCode.custom,
|
|
36664
|
-
message: `Invalid booking vertical config: ${resolved.issues.join(", ")}`
|
|
37498
|
+
message: `Invalid booking vertical config: ${resolved.issues.map(describeSiteVerticalConfigIssue).join(", ")}`
|
|
36665
37499
|
});
|
|
36666
37500
|
return z.NEVER;
|
|
36667
37501
|
}
|
|
36668
37502
|
return resolved.config;
|
|
36669
37503
|
});
|
|
36670
|
-
const DEFAULT_SITE_VERTICAL_BOOKING_CONFIG = {
|
|
36671
|
-
verticalId: null,
|
|
36672
|
-
selectedPresetIds: []
|
|
36673
|
-
};
|
|
36674
37504
|
//#endregion
|
|
36675
37505
|
//#region ../api/src/utils/isRecord.ts
|
|
36676
37506
|
function isRecord(value) {
|