@riverbankcms/sdk 0.130.0 → 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 +85 -0
- package/README.md +1 -1
- package/dist/{PreviewEditorSidebar-DiEpbOdw.mjs → PreviewEditorSidebar-DKQ5eFK9.mjs} +365 -106
- package/dist/{PreviewEditorUI-C6MvxnIa.mjs → PreviewEditorUI-CNTcOjCC.mjs} +3 -3
- package/dist/{PreviewQueryProvider-C2rnoPz6.mjs → PreviewQueryProvider-D51gQaG3.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-DRXA_m5L.mjs → SdkPreviewModeRuntime-DJu3qu33.mjs} +91 -25
- package/dist/{SiteChromeCustomizeContext-BTHdv5_-.mjs → SiteChromeCustomizeContext-2TzT3vbj.mjs} +12577 -9240
- package/dist/_dts/ai/src/contracts/proposals.d.ts +991 -142
- package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +1092 -148
- package/dist/_dts/api/src/accountApi.d.ts +213 -0
- package/dist/_dts/api/src/accountEndpointDefinitions.d.ts +30 -0
- package/dist/_dts/api/src/accountEndpoints.d.ts +254 -0
- package/dist/_dts/api/src/apiCallParams.d.ts +60 -0
- package/dist/_dts/api/src/bookingConfig.d.ts +18 -24
- package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +12 -24
- package/dist/_dts/api/src/bookingManagementEventEndpointTypes.d.ts +44 -0
- package/dist/_dts/api/src/bookingSettingsSections.d.ts +9 -0
- package/dist/_dts/api/src/bookingVerticals.d.ts +1 -140
- package/dist/_dts/api/src/commercePortalEndpoints.d.ts +47 -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 +885 -721
- package/dist/_dts/api/src/event-destination-policy.d.ts +2 -2
- package/dist/_dts/api/src/eventManagementContracts.d.ts +173 -7
- package/dist/_dts/api/src/eventManagementEndpointDefinitions.d.ts +58 -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 +12 -4
- package/dist/_dts/api/src/indexCoreTypes.d.ts +1 -0
- package/dist/_dts/api/src/indexExtendedTypes.d.ts +1 -0
- 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/oauth.d.ts +8 -0
- package/dist/_dts/api/src/preview-auth.d.ts +26 -0
- package/dist/_dts/api/src/publicEventEndpointDefinitions.d.ts +11 -0
- package/dist/_dts/api/src/publicExperience/eventEndpoints.d.ts +29 -16
- package/dist/_dts/api/src/publicExperience/sharedTypes.d.ts +2 -0
- package/dist/_dts/api/src/publicExperience/wholeSeriesEndpoints.d.ts +1 -1
- package/dist/_dts/api/src/sdk-event-upsert.d.ts +3 -1
- package/dist/_dts/api/src/sdkBlockUpsertContracts.d.ts +48 -0
- package/dist/_dts/api/src/sdkBookingVerticalContracts.d.ts +29 -0
- package/dist/_dts/api/src/sdkContracts.d.ts +14 -45
- package/dist/_dts/api/src/sdkEndpointDefinitions.d.ts +23 -0
- package/dist/_dts/api/src/sdkEventCategoryContracts.d.ts +9 -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 +54 -12
- package/dist/_dts/api/src/settings/permissions.d.ts +2 -2
- package/dist/_dts/api/src/siteApiKeyEndpointDefinitions.d.ts +66 -0
- package/dist/_dts/api/src/siteInfrastructure.d.ts +3 -3
- package/dist/_dts/api/src/siteOnboarding.d.ts +3 -3
- package/dist/_dts/api/src/siteOperations.d.ts +1 -1
- package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +16 -14
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +0 -3
- package/dist/_dts/api/src/types.d.ts +8 -61
- package/dist/_dts/block-form/src/client/index.d.ts +15 -23
- package/dist/_dts/block-form/src/index.d.ts +23 -22
- 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/primitives/layout/Grid.d.ts +18 -1
- package/dist/_dts/blocks/src/subroutes/fold.d.ts +2 -1
- package/dist/_dts/blocks/src/system/blocks/appointment-booking.d.ts +1 -0
- 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 +64 -3
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +26 -31
- 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/feature-cards.d.ts +25 -1
- package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +16 -39
- package/dist/_dts/blocks/src/system/blocks/offerings-preview/model.d.ts +1 -1
- package/dist/_dts/blocks/src/system/blocks/site-header.d.ts +0 -1
- package/dist/_dts/blocks/src/system/blocks/team-members.d.ts +4 -63
- package/dist/_dts/blocks/src/system/customize/backgrounds.d.ts +1 -3
- package/dist/_dts/blocks/src/system/fields/boxStyles.d.ts +13 -2
- package/dist/_dts/blocks/src/system/fields/gridLayout.d.ts +20 -0
- package/dist/_dts/blocks/src/system/node/fragments/classNameBinding.d.ts +6 -1
- package/dist/_dts/blocks/src/system/node/fragments/styledCard.d.ts +31 -0
- package/dist/_dts/blocks/src/system/node/validation-constants.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/api/endpoints.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/api/types/courses.d.ts +0 -1
- package/dist/_dts/blocks/src/system/runtime/api/types/events.d.ts +0 -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/useHeadlessBookingFlow.state.d.ts +4 -2
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessWholeSeriesRegistrationFlow.d.ts +6 -6
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.headless.state.d.ts +24 -8
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.server.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.validationErrors.d.ts +17 -0
- 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/event-registration.headless.planning.d.ts +1 -1
- 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/eventScope.d.ts +1 -1
- 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/event-registration.server.d.ts +1 -1
- 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 +59 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/utils.d.ts +4 -1
- 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/components/FeedbackMessage.d.ts +17 -1
- package/dist/_dts/blocks/src/system/runtime/shared/components/index.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/shared/useWaitlistClaim.d.ts +1 -0
- package/dist/_dts/blocks/src/system/spacing.d.ts +1 -1
- package/dist/_dts/blocks/src/system/transforms/registry/_utils/boxStyleClassNames.d.ts +109 -0
- package/dist/_dts/blocks/src/system/transforms/registry/_utils/surfaceForegroundStyles.d.ts +4 -0
- package/dist/_dts/blocks/src/system/transforms/registry/boxStyles.d.ts +40 -3
- package/dist/_dts/blocks/src/system/transforms/registry/index.d.ts +1 -0
- package/dist/_dts/blocks/src/system/transforms/registry/layout.d.ts +4 -37
- 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-editor/src/components/ContentFieldsForm.d.ts +2 -2
- package/dist/_dts/content-model/src/content-types/builtin-schemas.d.ts +10 -6
- package/dist/_dts/content-model/src/content-types/builtins.d.ts +10 -6
- 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/branded.d.ts +4 -0
- package/dist/_dts/core/src/event-page-selection.d.ts +22 -0
- package/dist/_dts/core/src/event-page-surface-subject.d.ts +25 -4
- 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 +6 -0
- package/dist/_dts/core/src/public-event-booking-availability.d.ts +8 -0
- package/dist/_dts/core/src/secret.d.ts +44 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +413 -0
- package/dist/_dts/db/src/schemas/forms.d.ts +4 -4
- package/dist/_dts/editor-blocks/src/BlockEditor.d.ts +2 -1
- package/dist/_dts/editor-blocks/src/BlockForm.d.ts +2 -2
- package/dist/_dts/editor-blocks/src/block-editor/BlockCard.d.ts +2 -2
- package/dist/_dts/editor-blocks/src/block-editor/BlockCardBody.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/block-editor/BlockCardHeader.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/block-editor/SortableBlockItem.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/block-editor/hooks/useBlockValidationManifests.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/block-editor/preparedManifest.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/blockPayload.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/index.d.ts +2 -2
- package/dist/_dts/editor-blocks/src/media/MediaField.d.ts +2 -2
- package/dist/_dts/editor-blocks/src/widgets/button/ButtonField.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/button/ButtonVariantField.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/button/index.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/content-type-select/ContentTypeSelectField.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/entry-picker/EntryPickerField.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/entry-picker/index.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/icon-picker/IconPickerField.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/inline-text/InlineTextField.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/link/LinkField.d.ts +2 -2
- package/dist/_dts/editor-blocks/src/widgets/offerings-preview/OfferingsPreviewGroupOrderField.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/reference/ReferenceField.d.ts +2 -2
- package/dist/_dts/editor-blocks/src/widgets/rich-text/RichTextField.d.ts +2 -2
- package/dist/_dts/editor-blocks/src/widgets/site-option-picker/SiteOptionPickerField.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/site-option-picker/utils.d.ts +1 -1
- 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/blocks/useBlockCustomizeControls.d.ts +1 -1
- 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/EntryEditorPanel.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/preview/EntrySlotBlockEditorPanel.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewEditorSidebar.d.ts +3 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +4 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewSiteFontStorageContext.d.ts +6 -0
- 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/siteFontPreview.d.ts +5 -0
- package/dist/_dts/preview-next/src/client/preview/siteStylePreviewPlanner.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/sdk/contentStorage.d.ts +10 -0
- package/dist/_dts/preview-next/src/client/widgets/widgetOverrides.d.ts +1 -1
- package/dist/_dts/preview-next/src/index.d.ts +1 -0
- package/dist/_dts/preview-next/src/keepAlive.d.ts +3 -5
- package/dist/_dts/preview-next/src/refresh-contract.d.ts +1 -0
- package/dist/_dts/preview-next/src/route-contract.d.ts +7 -0
- 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 +64 -54
- 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/preview-next/keep-alive.d.ts +1 -1
- 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/components/Layout.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/index.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/islands/types.d.ts +9 -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/theme-bridge/types.d.ts +4 -2
- 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/core.d.ts +54 -10
- package/dist/_dts/theme-core/src/cards/decorations.d.ts +33 -0
- package/dist/_dts/theme-core/src/cards/generateDefaultCardSystem.d.ts +7 -2
- package/dist/_dts/theme-core/src/cards/index.d.ts +3 -0
- package/dist/_dts/theme-core/src/cards/openCardVariant.d.ts +24 -0
- package/dist/_dts/theme-core/src/cards/roles.d.ts +38 -0
- package/dist/_dts/theme-core/src/cards/siteStyleDefaults.d.ts +53 -8
- package/dist/_dts/theme-core/src/cards/types.d.ts +474 -28
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/header/legacyHeaderVariant.d.ts +59 -0
- package/dist/_dts/theme-core/src/header/paintTargets.d.ts +2 -2
- package/dist/_dts/theme-core/src/header/scrollTreatment.d.ts +3 -2
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +30 -138
- package/dist/_dts/theme-core/src/palette/utils/contrast.d.ts +1 -0
- package/dist/_dts/theme-core/src/palette/utils/opaqueSurfaceColor.d.ts +6 -0
- package/dist/_dts/theme-core/src/runtime/buildThemeRuntimeFromBridge.d.ts +1 -1
- package/dist/_dts/theme-core/src/schema.d.ts +302 -107
- package/dist/_dts/theme-core/src/site-styles/appearancePresetCatalog.d.ts +111 -102
- package/dist/_dts/theme-core/src/site-styles/appearancePresetResolution.d.ts +12 -1
- package/dist/_dts/theme-core/src/site-styles/appearancePresetTypes.d.ts +9 -4
- package/dist/_dts/theme-core/src/site-styles/backgroundAppearance.d.ts +0 -20
- package/dist/_dts/theme-core/src/site-styles/blockAppearancePresets.d.ts +111 -102
- package/dist/_dts/theme-core/src/site-styles/buttonSelectionCompiler.d.ts +18 -0
- package/dist/_dts/theme-core/src/site-styles/cardRoleVocabulary.d.ts +48 -0
- package/dist/_dts/theme-core/src/site-styles/compilationPlan.d.ts +21 -0
- package/dist/_dts/theme-core/src/site-styles/designState.d.ts +21 -385
- package/dist/_dts/theme-core/src/site-styles/generatedSchemas.d.ts +10 -18
- package/dist/_dts/theme-core/src/site-styles/headerLayoutTypes.d.ts +2 -4
- package/dist/_dts/theme-core/src/site-styles/headerOpeningForeground.d.ts +2 -9
- package/dist/_dts/theme-core/src/site-styles/headerOpeningSection.d.ts +0 -2
- package/dist/_dts/theme-core/src/site-styles/index.d.ts +5 -0
- package/dist/_dts/theme-core/src/site-styles/pageDesignAppearanceAvailability.d.ts +3 -0
- package/dist/_dts/theme-core/src/site-styles/pageDesignEditorCapabilities.d.ts +22 -0
- package/dist/_dts/theme-core/src/site-styles/pageDesignEditorModel.d.ts +9 -8
- package/dist/_dts/theme-core/src/site-styles/pageDesignIntentEquality.d.ts +3 -0
- package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +2 -11
- package/dist/_dts/theme-core/src/site-styles/previewRuntimeCapabilities.d.ts +19 -0
- package/dist/_dts/theme-core/src/site-styles/runtimeBackgroundResolution.d.ts +9 -0
- package/dist/_dts/theme-core/src/site-styles/runtimeCompiler.d.ts +1 -62
- package/dist/_dts/theme-core/src/site-styles/selectionFallbackWarning.d.ts +15 -0
- package/dist/_dts/theme-core/src/site-styles/sourceCatalogs.d.ts +13 -12
- package/dist/_dts/theme-core/src/site-styles/types.d.ts +62 -39
- package/dist/_dts/theme-core/src/siteChromePlanning.d.ts +9 -9
- package/dist/_dts/theme-core/src/status/generateStatusCss.d.ts +1 -0
- package/dist/_dts/theme-core/src/surfaces/index.d.ts +1 -0
- package/dist/_dts/theme-core/src/surfaces/resolveSurfaceForeground.d.ts +39 -0
- package/dist/_dts/ui/src/navigation-tabs.d.ts +5 -2
- package/dist/client/{DiscountCodeDisclosure-Ur-Xx1U_.mjs → DiscountCodeDisclosure-DO7llLxm.mjs} +12 -12
- package/dist/client/{EventCombined.client-EhscD4U6.mjs → EventCombined.client-xID7zN__.mjs} +38 -50
- package/dist/client/{EventListing.client-Bn26cFTY.mjs → EventListing.client-CriBslp0.mjs} +2 -2
- package/dist/client/{FeedbackMessage-ByMrs3cr.mjs → FeedbackMessage-CtLvvS_d.mjs} +15 -3
- package/dist/client/{LeafletStaticMap-BUw9Ntzr.mjs → LeafletStaticMap-DYmHnM8g.mjs} +1 -1
- package/dist/client/{StepIndicator-BfbdiVQI.mjs → StepIndicator-CGixP_LW.mjs} +3 -3
- package/dist/client/{CourseRegistrationWizard-Bvtz9G9g.mjs → WholeSeriesRegistrationWizard-BEjzSiOA.mjs} +1410 -1247
- package/dist/client/{accordion-CjIeof73.mjs → accordion-CgFbnnnQ.mjs} +1 -1
- package/dist/client/{bookingForm-DwEeovf_.mjs → bookingForm-dUyGpbxc.mjs} +56 -39
- package/dist/client/bookings.mjs +1096 -731
- package/dist/client/{carousel-BMrfgOba.mjs → carousel-BvBwkUzx.mjs} +2 -2
- package/dist/client/{carousel.client-CpwTUhIo.mjs → carousel.client-59G_WMr4.mjs} +1 -1
- package/dist/client/{cart-rXEdxTdb.mjs → cart-DiZENT2E.mjs} +3 -3
- package/dist/client/{checkout-D3JlSzh3.mjs → checkout-Dq13KIgR.mjs} +3 -3
- package/dist/client/client.mjs +10645 -6794
- package/dist/client/{colorStyles-BWpj_h4C.mjs → colorStyles-CrxJrPjJ.mjs} +277 -1
- package/dist/client/{context-CJz1Vlsz.mjs → context-B83PiNzm.mjs} +6 -21
- package/dist/client/{courseRegistration-DO5XvMAA.mjs → courseRegistration-CKC5NmyH.mjs} +11 -5
- package/dist/client/{eventCalendar-DO6rTqCn.mjs → eventCalendar-BF0Jatfw.mjs} +42 -45
- package/dist/client/{eventCombined-bJ3i_ovU.mjs → eventCombined-BuoCF8je.mjs} +3 -3
- package/dist/client/{eventDetails-CCbrXE7o.mjs → eventDetails-CKwh0S9s.mjs} +276 -94
- package/dist/client/{eventListing-Bdlt9YTm.mjs → eventListing-eUxaWFaB.mjs} +3 -3
- package/dist/client/{eventRegistration-B02lt6iY.mjs → eventRegistration-CfkNOkPb.mjs} +630 -138
- package/dist/client/{form-DrUBAAox.mjs → form-C17H1c_H.mjs} +4 -4
- package/dist/client/{headerSection-MzqvHL6T.mjs → headerSection-DEwUmrtt.mjs} +2 -2
- package/dist/client/hooks.mjs +3224 -2485
- package/dist/client/{locationMap-DG8BxTBm.mjs → locationMap-Pf2QwuvW.mjs} +3 -3
- package/dist/client/{media-CNE1Z-wb.mjs → media-BOHuueS5.mjs} +16 -4
- package/dist/client/{newsletterForm-BzO-Td3p.mjs → newsletterForm-BWQAH5Sv.mjs} +4 -4
- package/dist/client/pricing-CVdvbopJ.mjs +195 -0
- package/dist/client/{productDetail-CfQ7rhVK.mjs → productDetail-BZi1Fa_G.mjs} +3 -3
- package/dist/client/{productList-C23rOLUi.mjs → productList-qq-55DNk.mjs} +3 -3
- package/dist/client/{propsDecoder-CAZdhwjs.mjs → propsDecoder-BxmqPKdP.mjs} +859 -650
- package/dist/client/rendering/client.mjs +8658 -7862
- package/dist/client/rendering/islands.mjs +20 -20
- package/dist/client/rendering.mjs +11437 -7446
- package/dist/client/{scrollToBlock-DSSqVQr1.mjs → scrollToBlock-B3CcKdtG.mjs} +1 -1
- package/dist/client/{shop-BMToKLK7.mjs → shop-DNWJPut5.mjs} +7 -7
- package/dist/client/{shop-commerce-DB4JRKmp.mjs → shop-commerce-BhvQCosS.mjs} +8 -8
- package/dist/client/{shop-commerce-store-BOqSIOuc.mjs → shop-commerce-store-B04sCNnW.mjs} +1 -1
- package/dist/client/{shopShared-B6SK9DZv.mjs → shopShared-DNNgZlmW.mjs} +5 -5
- package/dist/client/{useEventFilters-CULOa4nB.mjs → useEventFilters-CUmhE24_.mjs} +329 -84
- package/dist/client/{usePolling-BGG_8-jl.mjs → usePolling-M5jG675x.mjs} +3 -3
- package/dist/preview-next/before-render.mjs +439 -168
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/keepAlive.mjs +7593 -29
- package/dist/preview-next/middleware.mjs +433 -167
- package/dist/{previewAuthStore-_GXFRg2W.mjs → previewAuthStore-BFKd4LrN.mjs} +432 -167
- package/dist/{sdk-runtime-hhSOMShR.mjs → sdk-runtime-BEXb1wqo.mjs} +2 -2
- package/dist/{separator-flRaFc14.mjs → separator-DGMuip1D.mjs} +1 -1
- package/dist/server/components.mjs +9596 -6347
- package/dist/server/config-validation.mjs +3224 -2486
- package/dist/server/config.mjs +3224 -2486
- package/dist/server/data.mjs +3224 -2485
- package/dist/server/index.mjs +486 -200
- package/dist/server/manifest.mjs +0 -1
- package/dist/server/next.mjs +10343 -7188
- package/dist/server/page-converter.mjs +1828 -2094
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +6750 -4519
- package/dist/server/rendering.mjs +9591 -6342
- package/dist/server/routing.mjs +3403 -1594
- package/dist/server/server.mjs +3274 -2671
- package/dist/server/theme-bridge.mjs +2979 -1639
- package/dist/server/theme.mjs +590 -176
- package/dist/styles/index.css +1896 -1129
- package/package.json +3 -2
- package/dist/_dts/api/src/bookingVerticalCatalog.d.ts +0 -746
- package/dist/_dts/block-form/src/client/blockDraftSaveability.d.ts +0 -1
- package/dist/_dts/block-form/src/widgets/index.d.ts +0 -20
- package/dist/_dts/blocks/src/system/runtime/api/requestBody.d.ts +0 -7
- 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/clsx-DgIEfj3H.mjs +0 -16
- package/dist/client/eventProductEligibility-AVxyCB1u.mjs +0 -50
- package/dist/client/pricing-NgK7ozkg.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
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { E as ok$1, T as err$1, a as paletteColorEntries, c as themeColorTokenSchema, g as parseEventSeriesId, h as parseEventOfferingId, l as parseColorTokenParts, o as paletteColorsFromEntries, p as parseAspectRatioValue, r as rgbColorValue, s as parseThemeColorToken } from "./colorStyles-CrxJrPjJ.mjs";
|
|
2
|
+
import "react";
|
|
2
3
|
import { z } from "zod";
|
|
4
|
+
import "react/jsx-runtime";
|
|
3
5
|
//#region ../core/src/assert-never.ts
|
|
4
6
|
function assertNever$2(value, message = "Unexpected variant") {
|
|
5
7
|
throw new Error(`${message}: ${String(value)}`);
|
|
@@ -113,6 +115,7 @@ function formatCoursePriceDisplayLabel(display, options) {
|
|
|
113
115
|
case "exact": return `Course (${formatCurrencyAmount(display.amount, display.currency, options)})`;
|
|
114
116
|
case "from": return `Course (From ${formatCurrencyAmount(display.amount, display.currency, options)})`;
|
|
115
117
|
case "range": return `Course (${formatCurrencyAmount(display.minAmount, display.currency, options)} - ${formatCurrencyAmount(display.maxAmount, display.currency, options)})`;
|
|
118
|
+
case "mixed": return display.paidToAmount > display.paidFromAmount ? `Course (Free / ${formatCurrencyAmount(display.paidFromAmount, display.currency, options)} - ${formatCurrencyAmount(display.paidToAmount, display.currency, options)})` : `Course (Free / ${formatCurrencyAmount(display.paidFromAmount, display.currency, options)})`;
|
|
116
119
|
default: return assertNever$2(display);
|
|
117
120
|
}
|
|
118
121
|
}
|
|
@@ -142,18 +145,32 @@ function formatEventPricing(pricing, options = {}) {
|
|
|
142
145
|
}
|
|
143
146
|
//#endregion
|
|
144
147
|
//#region ../core/src/event-page-surface-subject.ts
|
|
148
|
+
function createEventSeriesPageSurfaceSubject(eventSeriesId, bookingScope) {
|
|
149
|
+
return bookingScope === "whole_series" ? {
|
|
150
|
+
kind: "eventSeries",
|
|
151
|
+
eventSeriesId,
|
|
152
|
+
bookingScope,
|
|
153
|
+
isWholeSeriesBooking: true
|
|
154
|
+
} : {
|
|
155
|
+
kind: "eventSeries",
|
|
156
|
+
eventSeriesId,
|
|
157
|
+
bookingScope
|
|
158
|
+
};
|
|
159
|
+
}
|
|
145
160
|
function parseEventPageSurfaceSubject(value) {
|
|
146
161
|
if (!isRecord$6(value)) return err$1({ kind: "notObject" });
|
|
147
162
|
switch (value.kind) {
|
|
148
163
|
case "eventSeries": {
|
|
149
164
|
const eventSeriesId = parseEventSeriesId(value.eventSeriesId);
|
|
150
|
-
|
|
151
|
-
kind: "eventSeries",
|
|
152
|
-
eventSeriesId: eventSeriesId.value
|
|
153
|
-
}) : err$1({
|
|
165
|
+
if (!eventSeriesId.ok) return err$1({
|
|
154
166
|
kind: "invalidEventSeriesId",
|
|
155
167
|
error: eventSeriesId.error
|
|
156
168
|
});
|
|
169
|
+
if (value.bookingScope !== "single_occurrence" && value.bookingScope !== "whole_series") return err$1({
|
|
170
|
+
kind: "invalidEventSeriesBookingScope",
|
|
171
|
+
bookingScope: value.bookingScope
|
|
172
|
+
});
|
|
173
|
+
return ok$1(createEventSeriesPageSurfaceSubject(eventSeriesId.value, value.bookingScope));
|
|
157
174
|
}
|
|
158
175
|
case "eventOffering": {
|
|
159
176
|
const eventOfferingId = parseEventOfferingId(value.eventOfferingId);
|
|
@@ -469,6 +486,16 @@ function parseNewsletterSignupDestinationProvider(value) {
|
|
|
469
486
|
return value === "riverbank" || value === "mailchimp" ? value : null;
|
|
470
487
|
}
|
|
471
488
|
//#endregion
|
|
489
|
+
//#region ../core/src/event-series-behaviour.ts
|
|
490
|
+
const SURFACE_EVENT_PRESET_VALUES = [
|
|
491
|
+
"class",
|
|
492
|
+
"course",
|
|
493
|
+
"term",
|
|
494
|
+
"workshop",
|
|
495
|
+
"retreat",
|
|
496
|
+
"performance"
|
|
497
|
+
];
|
|
498
|
+
//#endregion
|
|
472
499
|
//#region ../blocks/src/contracts/runtime.ts
|
|
473
500
|
function decodeSuccess(value) {
|
|
474
501
|
return {
|
|
@@ -1375,19 +1402,13 @@ const bookingFormInteractiveIslandPropsCodec = createInteractiveIslandCodec({
|
|
|
1375
1402
|
})
|
|
1376
1403
|
});
|
|
1377
1404
|
//#endregion
|
|
1378
|
-
//#region ../blocks/src/system/blocks/
|
|
1379
|
-
|
|
1380
|
-
* Zod schema for course venue data
|
|
1381
|
-
*/
|
|
1382
|
-
const courseVenueSchema = z.object({
|
|
1405
|
+
//#region ../blocks/src/system/blocks/events/whole-series/schemas.ts
|
|
1406
|
+
const wholeSeriesVenueSchema = z.object({
|
|
1383
1407
|
id: z.string(),
|
|
1384
1408
|
name: z.string(),
|
|
1385
1409
|
address: z.string().nullable()
|
|
1386
1410
|
});
|
|
1387
|
-
|
|
1388
|
-
* Zod schema for course session (occurrence) data
|
|
1389
|
-
*/
|
|
1390
|
-
const courseSessionSchema = z.object({
|
|
1411
|
+
const wholeSeriesSessionSchema = z.object({
|
|
1391
1412
|
id: z.string(),
|
|
1392
1413
|
startsAt: z.string(),
|
|
1393
1414
|
endsAt: z.string(),
|
|
@@ -1395,14 +1416,14 @@ const courseSessionSchema = z.object({
|
|
|
1395
1416
|
capacityOverride: z.number().nullable().optional(),
|
|
1396
1417
|
overrides: z.record(z.string(), z.unknown()).nullable().optional()
|
|
1397
1418
|
});
|
|
1398
|
-
const
|
|
1419
|
+
const wholeSeriesTeamMemberSummarySchema = z.object({
|
|
1399
1420
|
id: z.string(),
|
|
1400
1421
|
name: z.string(),
|
|
1401
1422
|
roleLabel: z.string().nullable(),
|
|
1402
1423
|
summary: z.string().nullable(),
|
|
1403
1424
|
profilePath: z.string().nullable()
|
|
1404
1425
|
});
|
|
1405
|
-
const
|
|
1426
|
+
const wholeSeriesPricingOptionSchema = z.object({
|
|
1406
1427
|
id: z.string(),
|
|
1407
1428
|
name: z.string(),
|
|
1408
1429
|
description: z.string().nullable(),
|
|
@@ -1418,7 +1439,7 @@ const coursePricingOptionSchema = z.object({
|
|
|
1418
1439
|
"both"
|
|
1419
1440
|
]).nullable().optional()
|
|
1420
1441
|
});
|
|
1421
|
-
const
|
|
1442
|
+
const wholeSeriesPricingSchema = z.object({
|
|
1422
1443
|
bookingRequirement: z.enum(["none", "required"]),
|
|
1423
1444
|
pricingStrategy: z.enum([
|
|
1424
1445
|
"free",
|
|
@@ -1432,20 +1453,17 @@ const coursePricingSchema = z.object({
|
|
|
1432
1453
|
slidingMaxAmount: z.number().nullable().optional(),
|
|
1433
1454
|
slidingSuggestedAmount: z.number().nullable().optional(),
|
|
1434
1455
|
paymentTerms: blockBookingPaymentTermsSchema,
|
|
1435
|
-
options: z.array(
|
|
1456
|
+
options: z.array(wholeSeriesPricingOptionSchema)
|
|
1436
1457
|
});
|
|
1437
|
-
/**
|
|
1438
|
-
* Zod schema for public course data
|
|
1439
|
-
*/
|
|
1440
1458
|
const publicWholeSeriesOfferingSchema = z.object({
|
|
1441
1459
|
eventSeriesId: z.string(),
|
|
1442
1460
|
eventOfferingId: z.string(),
|
|
1443
1461
|
title: z.string(),
|
|
1444
1462
|
slug: z.string(),
|
|
1445
1463
|
description: z.unknown().nullable(),
|
|
1446
|
-
teamMembers: z.array(
|
|
1464
|
+
teamMembers: z.array(wholeSeriesTeamMemberSummarySchema).optional(),
|
|
1447
1465
|
enrollmentOpen: z.boolean(),
|
|
1448
|
-
pricing:
|
|
1466
|
+
pricing: wholeSeriesPricingSchema,
|
|
1449
1467
|
currency: z.string(),
|
|
1450
1468
|
paymentTerms: blockBookingPaymentTermsSchema,
|
|
1451
1469
|
enrollmentCapacity: z.number().nullable(),
|
|
@@ -1458,12 +1476,10 @@ const publicWholeSeriesOfferingSchema = z.object({
|
|
|
1458
1476
|
sessionsCount: z.number(),
|
|
1459
1477
|
enrolledCount: z.number(),
|
|
1460
1478
|
availableSpots: z.number().nullable(),
|
|
1461
|
-
sessions: z.array(
|
|
1462
|
-
venue:
|
|
1479
|
+
sessions: z.array(wholeSeriesSessionSchema),
|
|
1480
|
+
venue: wholeSeriesVenueSchema.nullable()
|
|
1463
1481
|
});
|
|
1464
|
-
|
|
1465
|
-
const publicCourseSchema = publicWholeSeriesOfferingSchema;
|
|
1466
|
-
const publicCoursesArraySchema = z.array(publicWholeSeriesOfferingSchema);
|
|
1482
|
+
const publicWholeSeriesOfferingsArraySchema = z.array(publicWholeSeriesOfferingSchema);
|
|
1467
1483
|
//#endregion
|
|
1468
1484
|
//#region ../blocks/src/system/constants/events.ts
|
|
1469
1485
|
const eventCalendarDisplayModeValues = [
|
|
@@ -1480,105 +1496,6 @@ const eventCalendarListLayoutValues = [
|
|
|
1480
1496
|
"compact"
|
|
1481
1497
|
];
|
|
1482
1498
|
//#endregion
|
|
1483
|
-
//#region ../theme-core/src/tokens/blockColorTokens.ts
|
|
1484
|
-
const blockColorTokenNames = [
|
|
1485
|
-
"text",
|
|
1486
|
-
"heading",
|
|
1487
|
-
"mutedText",
|
|
1488
|
-
"surface",
|
|
1489
|
-
"background",
|
|
1490
|
-
"foreground",
|
|
1491
|
-
"border",
|
|
1492
|
-
"primary",
|
|
1493
|
-
"secondary",
|
|
1494
|
-
"accent",
|
|
1495
|
-
"success",
|
|
1496
|
-
"warning",
|
|
1497
|
-
"info",
|
|
1498
|
-
"error",
|
|
1499
|
-
"destructive",
|
|
1500
|
-
"scrim",
|
|
1501
|
-
"shadow",
|
|
1502
|
-
"onPrimary",
|
|
1503
|
-
"onSecondary",
|
|
1504
|
-
"onAccent",
|
|
1505
|
-
"onSuccess",
|
|
1506
|
-
"onWarning",
|
|
1507
|
-
"onInfo",
|
|
1508
|
-
"onError",
|
|
1509
|
-
"onDestructive",
|
|
1510
|
-
"onSurface"
|
|
1511
|
-
];
|
|
1512
|
-
new Set(blockColorTokenNames);
|
|
1513
|
-
//#endregion
|
|
1514
|
-
//#region ../theme-core/src/tokens/themeColorTokens.ts
|
|
1515
|
-
/**
|
|
1516
|
-
* Known palette role token names. This is the low-level source of truth for
|
|
1517
|
-
* palette roles used by palette variants, Theme V2 schemas, and runtime color
|
|
1518
|
-
* reference parsing.
|
|
1519
|
-
*/
|
|
1520
|
-
const PALETTE_TOKEN_NAMES = [
|
|
1521
|
-
"primary",
|
|
1522
|
-
"primaryForeground",
|
|
1523
|
-
"secondary",
|
|
1524
|
-
"accent",
|
|
1525
|
-
"success",
|
|
1526
|
-
"warning",
|
|
1527
|
-
"destructive",
|
|
1528
|
-
"background",
|
|
1529
|
-
"surface",
|
|
1530
|
-
"surfaceAlt",
|
|
1531
|
-
"muted",
|
|
1532
|
-
"text",
|
|
1533
|
-
"border"
|
|
1534
|
-
];
|
|
1535
|
-
const paletteTokenNameSchema = z.enum(PALETTE_TOKEN_NAMES);
|
|
1536
|
-
const themeColorBaseTokenNames = [
|
|
1537
|
-
...PALETTE_TOKEN_NAMES,
|
|
1538
|
-
...blockColorTokenNames,
|
|
1539
|
-
"white",
|
|
1540
|
-
"neutral",
|
|
1541
|
-
"primaryText",
|
|
1542
|
-
"secondaryForeground",
|
|
1543
|
-
"accentForeground"
|
|
1544
|
-
];
|
|
1545
|
-
const themeColorBaseTokenSet = new Set(themeColorBaseTokenNames);
|
|
1546
|
-
const shadeStepSet = /* @__PURE__ */ new Set([
|
|
1547
|
-
"50",
|
|
1548
|
-
"100",
|
|
1549
|
-
"200",
|
|
1550
|
-
"300",
|
|
1551
|
-
"400",
|
|
1552
|
-
"500",
|
|
1553
|
-
"600",
|
|
1554
|
-
"700",
|
|
1555
|
-
"800",
|
|
1556
|
-
"900",
|
|
1557
|
-
"950"
|
|
1558
|
-
]);
|
|
1559
|
-
function isKnownBaseToken(value) {
|
|
1560
|
-
return themeColorBaseTokenSet.has(value);
|
|
1561
|
-
}
|
|
1562
|
-
function isKnownShadeToken(value) {
|
|
1563
|
-
const match = value.match(/^([a-zA-Z][a-zA-Z0-9]*)(?:-([0-9]{2,3}))$/);
|
|
1564
|
-
if (!match) return false;
|
|
1565
|
-
const [, base, shade] = match;
|
|
1566
|
-
return Boolean(base && shade && isKnownBaseToken(base) && shadeStepSet.has(shade));
|
|
1567
|
-
}
|
|
1568
|
-
function isThemeColorTokenBase(value) {
|
|
1569
|
-
return isKnownBaseToken(value) || isKnownShadeToken(value);
|
|
1570
|
-
}
|
|
1571
|
-
function isThemeColorToken(value) {
|
|
1572
|
-
if (typeof value !== "string") return false;
|
|
1573
|
-
const parts = parseColorTokenParts(value);
|
|
1574
|
-
return parts.kind === "token" && isThemeColorTokenBase(parts.token);
|
|
1575
|
-
}
|
|
1576
|
-
function parseThemeColorToken(value) {
|
|
1577
|
-
if (!isThemeColorToken(value)) return null;
|
|
1578
|
-
return value.trim();
|
|
1579
|
-
}
|
|
1580
|
-
const themeColorTokenSchema = z.string().min(1).refine((value) => Boolean(isThemeColorToken(value)), "Expected a known Theme V2 color token");
|
|
1581
|
-
//#endregion
|
|
1582
1499
|
//#region ../theme-core/src/buttons/types.ts
|
|
1583
1500
|
/**
|
|
1584
1501
|
* Standard semantic variant roles a theme exposes.
|
|
@@ -1614,6 +1531,12 @@ const opaqueButtonColourTokenSchema = themeColorTokenSchema.refine((value) => pa
|
|
|
1614
1531
|
if (token === null) throw new Error("Invariant: opaque button token passed its schema");
|
|
1615
1532
|
return token;
|
|
1616
1533
|
});
|
|
1534
|
+
const contextualButtonHoverSchema = z.strictObject({
|
|
1535
|
+
kind: z.literal("shade-shift"),
|
|
1536
|
+
seedToken: opaqueButtonColourTokenSchema,
|
|
1537
|
+
fallbackDirection: z.enum(["lighter", "darker"]),
|
|
1538
|
+
preferredToken: opaqueButtonColourTokenSchema.optional()
|
|
1539
|
+
});
|
|
1617
1540
|
const buttonShadeAmountSchema = z.number().finite().min(0).max(900).multipleOf(100);
|
|
1618
1541
|
const buttonShadowIntensitySchema = z.enum([
|
|
1619
1542
|
"subtle",
|
|
@@ -1953,6 +1876,7 @@ const buttonVariantSchema = z.strictObject({
|
|
|
1953
1876
|
shadow: variantShadowSchema.optional(),
|
|
1954
1877
|
border: buttonBorderSchema.optional(),
|
|
1955
1878
|
hoverBackgroundToken: opaqueButtonColourTokenSchema.optional(),
|
|
1879
|
+
contextualHover: contextualButtonHoverSchema.optional(),
|
|
1956
1880
|
effects: variantEffectsSchema.optional(),
|
|
1957
1881
|
sizes: variantSizeOverridesSchema.optional(),
|
|
1958
1882
|
affordance: buttonVariantAffordanceSchema.optional()
|
|
@@ -2062,144 +1986,6 @@ z.discriminatedUnion("type", [
|
|
|
2062
1986
|
persistableMediaBaseSchema.extend({ type: z.literal("archive") })
|
|
2063
1987
|
]);
|
|
2064
1988
|
//#endregion
|
|
2065
|
-
//#region ../theme-core/src/palette/colors.ts
|
|
2066
|
-
const HEX_COLOR_REGEX = /^#[0-9a-f]{6}$/;
|
|
2067
|
-
const NORMALIZABLE_HEX_REGEX = /^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;
|
|
2068
|
-
const THEME_PALETTE_COLOR_ORDER = [
|
|
2069
|
-
"primary",
|
|
2070
|
-
"secondary",
|
|
2071
|
-
"accent",
|
|
2072
|
-
"success",
|
|
2073
|
-
"warning",
|
|
2074
|
-
"destructive",
|
|
2075
|
-
"background",
|
|
2076
|
-
"surface",
|
|
2077
|
-
"surfaceAlt",
|
|
2078
|
-
"muted",
|
|
2079
|
-
"text",
|
|
2080
|
-
"primaryForeground",
|
|
2081
|
-
"border"
|
|
2082
|
-
];
|
|
2083
|
-
const hexColorSchema = z.string().regex(HEX_COLOR_REGEX, "Hex must be #RRGGBB (lowercase)").transform((value) => value);
|
|
2084
|
-
const paletteModeSchema = z.enum(["light", "dark"]);
|
|
2085
|
-
const PALETTE_VALUE_KEY_PREFIX = "palette-value:v1|";
|
|
2086
|
-
z.string().regex(/^[0-9a-f]{64}$/, "Palette hash must be a lowercase SHA-256 value").transform((value) => value);
|
|
2087
|
-
const paletteColorsSchema = z.object({
|
|
2088
|
-
primary: hexColorSchema,
|
|
2089
|
-
primaryForeground: hexColorSchema,
|
|
2090
|
-
secondary: hexColorSchema,
|
|
2091
|
-
accent: hexColorSchema,
|
|
2092
|
-
success: hexColorSchema,
|
|
2093
|
-
warning: hexColorSchema,
|
|
2094
|
-
destructive: hexColorSchema,
|
|
2095
|
-
background: hexColorSchema,
|
|
2096
|
-
surface: hexColorSchema,
|
|
2097
|
-
surfaceAlt: hexColorSchema,
|
|
2098
|
-
muted: hexColorSchema,
|
|
2099
|
-
text: hexColorSchema,
|
|
2100
|
-
border: hexColorSchema
|
|
2101
|
-
}).strict().transform((value) => value);
|
|
2102
|
-
function normalizePaletteHex(value) {
|
|
2103
|
-
if (!NORMALIZABLE_HEX_REGEX.test(value)) return null;
|
|
2104
|
-
const normalized = value.toLowerCase();
|
|
2105
|
-
if (normalized.length === 7) return normalized;
|
|
2106
|
-
const triplet = normalized.slice(1);
|
|
2107
|
-
const red = triplet.charAt(0);
|
|
2108
|
-
const green = triplet.charAt(1);
|
|
2109
|
-
const blue = triplet.charAt(2);
|
|
2110
|
-
return `#${red}${red}${green}${green}${blue}${blue}`;
|
|
2111
|
-
}
|
|
2112
|
-
function paletteColorsFromEntries(entries) {
|
|
2113
|
-
const values = {};
|
|
2114
|
-
for (const entry of entries) {
|
|
2115
|
-
const parsedRole = paletteTokenNameSchema.safeParse(entry.name);
|
|
2116
|
-
if (!parsedRole.success) return {
|
|
2117
|
-
ok: false,
|
|
2118
|
-
error: {
|
|
2119
|
-
kind: "unknown-role",
|
|
2120
|
-
role: entry.name
|
|
2121
|
-
}
|
|
2122
|
-
};
|
|
2123
|
-
const role = parsedRole.data;
|
|
2124
|
-
if (values[role] !== void 0) return {
|
|
2125
|
-
ok: false,
|
|
2126
|
-
error: {
|
|
2127
|
-
kind: "duplicate-role",
|
|
2128
|
-
role
|
|
2129
|
-
}
|
|
2130
|
-
};
|
|
2131
|
-
const hex = normalizePaletteHex(entry.hex);
|
|
2132
|
-
if (!hex) return {
|
|
2133
|
-
ok: false,
|
|
2134
|
-
error: {
|
|
2135
|
-
kind: "invalid-color",
|
|
2136
|
-
role,
|
|
2137
|
-
value: entry.hex
|
|
2138
|
-
}
|
|
2139
|
-
};
|
|
2140
|
-
values[role] = hex;
|
|
2141
|
-
}
|
|
2142
|
-
const missing = PALETTE_TOKEN_NAMES.filter((role) => values[role] === void 0);
|
|
2143
|
-
if (missing.length > 0) return {
|
|
2144
|
-
ok: false,
|
|
2145
|
-
error: {
|
|
2146
|
-
kind: "missing-roles",
|
|
2147
|
-
roles: missing
|
|
2148
|
-
}
|
|
2149
|
-
};
|
|
2150
|
-
return {
|
|
2151
|
-
ok: true,
|
|
2152
|
-
colors: paletteColorsSchema.parse(values)
|
|
2153
|
-
};
|
|
2154
|
-
}
|
|
2155
|
-
function paletteColorEntries(colors) {
|
|
2156
|
-
return THEME_PALETTE_COLOR_ORDER.map((name) => ({
|
|
2157
|
-
name,
|
|
2158
|
-
hex: colors[name]
|
|
2159
|
-
}));
|
|
2160
|
-
}
|
|
2161
|
-
function paletteColorFingerprint(colors) {
|
|
2162
|
-
return PALETTE_TOKEN_NAMES.map((name) => `${name}:${colors[name]}`).join("|");
|
|
2163
|
-
}
|
|
2164
|
-
function canonicalPaletteHashInput(colors, mode) {
|
|
2165
|
-
return `${mode}|${paletteColorFingerprint(colors)}`;
|
|
2166
|
-
}
|
|
2167
|
-
/**
|
|
2168
|
-
* Stable curated-catalogue identity. Do not reorder roles: the order comes
|
|
2169
|
-
* from PALETTE_TOKEN_NAMES through canonicalPaletteHashInput.
|
|
2170
|
-
*/
|
|
2171
|
-
function paletteValueKey(colors, mode) {
|
|
2172
|
-
return `${PALETTE_VALUE_KEY_PREFIX}${canonicalPaletteHashInput(colors, mode)}`;
|
|
2173
|
-
}
|
|
2174
|
-
/** Parses only the exact v1 canonical form emitted by paletteValueKey. */
|
|
2175
|
-
function parsePaletteValueKey(value) {
|
|
2176
|
-
if (typeof value !== "string" || !value.startsWith(PALETTE_VALUE_KEY_PREFIX)) return null;
|
|
2177
|
-
const [rawMode, ...rawRoles] = value.slice(17).split("|");
|
|
2178
|
-
const mode = paletteModeSchema.safeParse(rawMode);
|
|
2179
|
-
if (!mode.success || rawRoles.length !== PALETTE_TOKEN_NAMES.length) return null;
|
|
2180
|
-
const colors = paletteColorsFromEntries(rawRoles.map((roleValue) => {
|
|
2181
|
-
const separator = roleValue.indexOf(":");
|
|
2182
|
-
return separator === -1 ? {
|
|
2183
|
-
name: "",
|
|
2184
|
-
hex: ""
|
|
2185
|
-
} : {
|
|
2186
|
-
name: roleValue.slice(0, separator),
|
|
2187
|
-
hex: roleValue.slice(separator + 1)
|
|
2188
|
-
};
|
|
2189
|
-
}));
|
|
2190
|
-
if (!colors.ok || paletteValueKey(colors.colors, mode.data) !== value) return null;
|
|
2191
|
-
return value;
|
|
2192
|
-
}
|
|
2193
|
-
z.string().transform((value, ctx) => {
|
|
2194
|
-
const parsed = parsePaletteValueKey(value);
|
|
2195
|
-
if (parsed) return parsed;
|
|
2196
|
-
ctx.addIssue({
|
|
2197
|
-
code: "custom",
|
|
2198
|
-
message: "Invalid canonical palette value key"
|
|
2199
|
-
});
|
|
2200
|
-
return z.NEVER;
|
|
2201
|
-
});
|
|
2202
|
-
//#endregion
|
|
2203
1989
|
//#region ../theme-core/src/palette/schema.ts
|
|
2204
1990
|
const colourHexString = z.string().regex(/^#([0-9A-Fa-f]{3}){1,2}$/);
|
|
2205
1991
|
const paletteColorSchema = z.object({
|
|
@@ -2231,10 +2017,26 @@ const paletteSchema = z.object({
|
|
|
2231
2017
|
//#region ../theme-core/src/cards/types.ts
|
|
2232
2018
|
const cardVariantRoleValues = ["default", "alternative"];
|
|
2233
2019
|
const boxlessCardVariantValue = "none";
|
|
2234
|
-
const
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2020
|
+
const openCardRoleValue = "open";
|
|
2021
|
+
/**
|
|
2022
|
+
* The roles a site style implements with an actual card variant. `none` is
|
|
2023
|
+
* deliberately absent: it is a role value only, never a variant.
|
|
2024
|
+
*/
|
|
2025
|
+
const surfaceCardRoleValues = [...cardVariantRoleValues, openCardRoleValue];
|
|
2026
|
+
/**
|
|
2027
|
+
* The closed role vocabulary Looks and blocks use for surfaced and boxless
|
|
2028
|
+
* card choices.
|
|
2029
|
+
*
|
|
2030
|
+
* - `none` — no site-style card surface; the block's own composition and
|
|
2031
|
+
* the author's own card fields govern the item. This is *not*
|
|
2032
|
+
* a promise of visible boxlessness: a block whose base class
|
|
2033
|
+
* draws a border still draws one. It says the Look is not
|
|
2034
|
+
* asking the site style for a card.
|
|
2035
|
+
* - `open` — boxless but marked (a rule or accent edge, no enclosing box)
|
|
2036
|
+
* - `default` — the site's quiet everyday card
|
|
2037
|
+
* - `alternative` — the statement card carrying the site's personality
|
|
2038
|
+
*/
|
|
2039
|
+
const cardRoleValues = [...surfaceCardRoleValues, boxlessCardVariantValue];
|
|
2238
2040
|
const cardSpacingSchema = z.enum([
|
|
2239
2041
|
"none",
|
|
2240
2042
|
"compact",
|
|
@@ -2243,6 +2045,17 @@ const cardSpacingSchema = z.enum([
|
|
|
2243
2045
|
"comfortable",
|
|
2244
2046
|
"spacious"
|
|
2245
2047
|
]);
|
|
2048
|
+
/** Per-axis padding, for boxless cards whose inline padding differs from block. */
|
|
2049
|
+
const cardSpacingAxesSchema = z.object({
|
|
2050
|
+
block: cardSpacingSchema,
|
|
2051
|
+
inline: cardSpacingSchema
|
|
2052
|
+
});
|
|
2053
|
+
/**
|
|
2054
|
+
* A card's content padding: one value for both axes, or one per axis. Two
|
|
2055
|
+
* fields would let a variant say both and leave the reader to guess, so this is
|
|
2056
|
+
* a union — the legacy `spacingAxes` key is lifted into it on parse.
|
|
2057
|
+
*/
|
|
2058
|
+
const cardSpacingValueSchema = z.union([cardSpacingSchema, cardSpacingAxesSchema]);
|
|
2246
2059
|
const gradientDirectionSchema = z.enum([
|
|
2247
2060
|
"to-r",
|
|
2248
2061
|
"to-l",
|
|
@@ -2253,15 +2066,33 @@ const gradientDirectionSchema = z.enum([
|
|
|
2253
2066
|
"to-br",
|
|
2254
2067
|
"to-bl"
|
|
2255
2068
|
]);
|
|
2256
|
-
|
|
2257
|
-
const
|
|
2069
|
+
z.enum(cardVariantRoleValues);
|
|
2070
|
+
const surfaceCardRoleSchema = z.enum(surfaceCardRoleValues);
|
|
2071
|
+
const cardRoleSchema = z.enum(cardRoleValues);
|
|
2258
2072
|
function isCardVariantRole(value) {
|
|
2259
2073
|
return typeof value === "string" && cardVariantRoleValues.includes(value);
|
|
2260
2074
|
}
|
|
2261
2075
|
function normalizeCardVariantRole(value) {
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2076
|
+
return isCardVariantRole(value) ? value : null;
|
|
2077
|
+
}
|
|
2078
|
+
/** The one untrusted-input boundary for the closed role vocabulary. */
|
|
2079
|
+
function normalizeCardRole(value) {
|
|
2080
|
+
if (value === "none") return boxlessCardVariantValue;
|
|
2081
|
+
if (value === "open") return openCardRoleValue;
|
|
2082
|
+
return normalizeCardVariantRole(value);
|
|
2083
|
+
}
|
|
2084
|
+
const PRIORITY_ROLE_INFERENCE = {
|
|
2085
|
+
1: "default",
|
|
2086
|
+
2: "alternative"
|
|
2087
|
+
};
|
|
2088
|
+
/**
|
|
2089
|
+
* Role inference for legacy card systems authored before variants carried a
|
|
2090
|
+
* `role`. Priority 1 is the everyday card, priority 2 the statement card —
|
|
2091
|
+
* which is how variants are surfaced today. `open` is never inferred: a site
|
|
2092
|
+
* style has to opt into it.
|
|
2093
|
+
*/
|
|
2094
|
+
function inferCardVariantRoleFromPriority(priority) {
|
|
2095
|
+
return PRIORITY_ROLE_INFERENCE[priority] ?? null;
|
|
2265
2096
|
}
|
|
2266
2097
|
const cardBackgroundSchema = z.discriminatedUnion("type", [
|
|
2267
2098
|
z.object({
|
|
@@ -2288,17 +2119,19 @@ const cardCornerValueSchema = z.enum([
|
|
|
2288
2119
|
"pill",
|
|
2289
2120
|
"expressive"
|
|
2290
2121
|
]);
|
|
2122
|
+
const cardEdgeSchema = z.enum([
|
|
2123
|
+
"left",
|
|
2124
|
+
"top",
|
|
2125
|
+
"right",
|
|
2126
|
+
"bottom"
|
|
2127
|
+
]);
|
|
2291
2128
|
/**
|
|
2292
|
-
*
|
|
2293
|
-
*
|
|
2129
|
+
* Legacy single accented card edge (e.g. a left accent bar). Persisted and
|
|
2130
|
+
* curated data may still carry it; it lifts into a one-element `decorations`
|
|
2131
|
+
* list at the parse boundary and has no representation after that.
|
|
2294
2132
|
*/
|
|
2295
2133
|
const cardAccentEdgeSchema = z.object({
|
|
2296
|
-
edge:
|
|
2297
|
-
"left",
|
|
2298
|
-
"top",
|
|
2299
|
-
"right",
|
|
2300
|
-
"bottom"
|
|
2301
|
-
]),
|
|
2134
|
+
edge: cardEdgeSchema,
|
|
2302
2135
|
colorToken: themeColorTokenSchema,
|
|
2303
2136
|
width: z.enum([
|
|
2304
2137
|
"thin",
|
|
@@ -2307,13 +2140,43 @@ const cardAccentEdgeSchema = z.object({
|
|
|
2307
2140
|
"heavy"
|
|
2308
2141
|
])
|
|
2309
2142
|
});
|
|
2143
|
+
/** `hairline` (1px) is the widening the boxless `open` role needs. */
|
|
2144
|
+
const cardEdgeRuleWidthSchema = z.enum([
|
|
2145
|
+
"hairline",
|
|
2146
|
+
"thin",
|
|
2147
|
+
"medium",
|
|
2148
|
+
"thick",
|
|
2149
|
+
"heavy"
|
|
2150
|
+
]);
|
|
2151
|
+
const cardEdgeRuleLengthSchema = z.enum(["full", "short"]);
|
|
2152
|
+
const cardEdgeRuleAlignSchema = z.enum([
|
|
2153
|
+
"start",
|
|
2154
|
+
"center",
|
|
2155
|
+
"end"
|
|
2156
|
+
]);
|
|
2157
|
+
/**
|
|
2158
|
+
* Decorations are edge rules today. The alias exists so the list can grow into
|
|
2159
|
+
* a discriminated union without every call site changing.
|
|
2160
|
+
*/
|
|
2161
|
+
const cardDecorationSchema = z.object({
|
|
2162
|
+
edge: cardEdgeSchema,
|
|
2163
|
+
colorToken: themeColorTokenSchema,
|
|
2164
|
+
width: cardEdgeRuleWidthSchema,
|
|
2165
|
+
/** Defaults to `full`. */
|
|
2166
|
+
length: cardEdgeRuleLengthSchema.optional(),
|
|
2167
|
+
/** Where a `short` rule sits along its edge. Defaults to `start`. */
|
|
2168
|
+
align: cardEdgeRuleAlignSchema.optional(),
|
|
2169
|
+
/** Opacity applied to `colorToken`, 0–1. Scoped here, not on the token. */
|
|
2170
|
+
alpha: z.number().min(0).max(1).optional()
|
|
2171
|
+
});
|
|
2172
|
+
const cardDecorationsSchema = z.array(cardDecorationSchema).max(2);
|
|
2310
2173
|
const cardCornerRadiiSchema = z.object({
|
|
2311
2174
|
topLeft: cardCornerValueSchema.optional(),
|
|
2312
2175
|
topRight: cardCornerValueSchema.optional(),
|
|
2313
2176
|
bottomLeft: cardCornerValueSchema.optional(),
|
|
2314
2177
|
bottomRight: cardCornerValueSchema.optional()
|
|
2315
2178
|
});
|
|
2316
|
-
const
|
|
2179
|
+
const cardVariantInputSchema = z.object({
|
|
2317
2180
|
id: z.string(),
|
|
2318
2181
|
name: z.string().min(1).max(20),
|
|
2319
2182
|
enabled: z.boolean(),
|
|
@@ -2322,8 +2185,10 @@ const cardVariantSchema = z.object({
|
|
|
2322
2185
|
z.literal(2),
|
|
2323
2186
|
z.literal(3)
|
|
2324
2187
|
]),
|
|
2188
|
+
role: surfaceCardRoleSchema.optional(),
|
|
2325
2189
|
background: cardBackgroundSchema,
|
|
2326
|
-
spacing:
|
|
2190
|
+
spacing: cardSpacingValueSchema,
|
|
2191
|
+
spacingAxes: cardSpacingAxesSchema.optional(),
|
|
2327
2192
|
foregroundToken: themeColorTokenSchema.optional(),
|
|
2328
2193
|
shadow: z.object({
|
|
2329
2194
|
elevation: z.enum([
|
|
@@ -2347,9 +2212,91 @@ const cardVariantSchema = z.object({
|
|
|
2347
2212
|
]).optional(),
|
|
2348
2213
|
cornerRadii: cardCornerRadiiSchema.optional(),
|
|
2349
2214
|
border: cardBorderSchema.optional(),
|
|
2215
|
+
decorations: cardDecorationsSchema.optional(),
|
|
2350
2216
|
accentEdge: cardAccentEdgeSchema.optional()
|
|
2351
2217
|
});
|
|
2352
|
-
|
|
2218
|
+
/**
|
|
2219
|
+
* Lift a legacy `accentEdge` into the decoration list. The old emitter reset
|
|
2220
|
+
* `border: 0` implicitly whenever an accent edge was present; conversion drops
|
|
2221
|
+
* the border instead, so the output is unchanged and the data says so.
|
|
2222
|
+
*/
|
|
2223
|
+
function normalizeLegacyAccentEdge(variant) {
|
|
2224
|
+
const { accentEdge, ...rest } = normalizeLegacySpacingAxes(variant);
|
|
2225
|
+
if (!accentEdge) return rest;
|
|
2226
|
+
const { border: _droppedByAccentEdgeReset, ...withoutBorder } = rest;
|
|
2227
|
+
return {
|
|
2228
|
+
...withoutBorder,
|
|
2229
|
+
decorations: [{
|
|
2230
|
+
...accentEdge,
|
|
2231
|
+
length: "full"
|
|
2232
|
+
}]
|
|
2233
|
+
};
|
|
2234
|
+
}
|
|
2235
|
+
/**
|
|
2236
|
+
* Lift a legacy `spacingAxes` into `spacing`. It always won over the flat value
|
|
2237
|
+
* when both were set, so the lift preserves the emitted padding exactly.
|
|
2238
|
+
*/
|
|
2239
|
+
function normalizeLegacySpacingAxes(variant) {
|
|
2240
|
+
const { spacingAxes, ...rest } = variant;
|
|
2241
|
+
return spacingAxes ? {
|
|
2242
|
+
...rest,
|
|
2243
|
+
spacing: spacingAxes
|
|
2244
|
+
} : variant;
|
|
2245
|
+
}
|
|
2246
|
+
function validateSingleDecorationSource(variant, ctx) {
|
|
2247
|
+
if (!variant.accentEdge || !variant.decorations) return;
|
|
2248
|
+
ctx.addIssue({
|
|
2249
|
+
code: "custom",
|
|
2250
|
+
path: ["decorations"],
|
|
2251
|
+
message: "A card variant carries either the legacy `accentEdge` or `decorations`, never both."
|
|
2252
|
+
});
|
|
2253
|
+
}
|
|
2254
|
+
const cardVariantSchema = cardVariantInputSchema.superRefine(validateSingleDecorationSource).transform(normalizeLegacyAccentEdge);
|
|
2255
|
+
/**
|
|
2256
|
+
* Fill in roles for legacy systems whose variants declare none. Inference is
|
|
2257
|
+
* collision-tolerant on purpose: first claimant wins and a later variant that
|
|
2258
|
+
* would infer a taken role simply gets no role. Legacy data is not obliged to
|
|
2259
|
+
* be well-formed, and a card system that fails to parse takes the whole theme
|
|
2260
|
+
* down with it.
|
|
2261
|
+
*/
|
|
2262
|
+
function withInferredRoles(variants) {
|
|
2263
|
+
const claimed = new Set(variants.flatMap((variant) => variant.role ? [variant.role] : []));
|
|
2264
|
+
return variants.map((variant) => {
|
|
2265
|
+
if (variant.role) return variant;
|
|
2266
|
+
const inferred = inferCardVariantRoleFromPriority(variant.priority);
|
|
2267
|
+
if (!inferred || claimed.has(inferred)) return variant;
|
|
2268
|
+
claimed.add(inferred);
|
|
2269
|
+
return {
|
|
2270
|
+
...variant,
|
|
2271
|
+
role: inferred
|
|
2272
|
+
};
|
|
2273
|
+
});
|
|
2274
|
+
}
|
|
2275
|
+
/**
|
|
2276
|
+
* Only *declared* roles are validated — a site style saying "these two
|
|
2277
|
+
* variants are both the default card" is an authoring error worth rejecting.
|
|
2278
|
+
*/
|
|
2279
|
+
function validateUniqueDeclaredCardVariantRoles(system, ctx) {
|
|
2280
|
+
const declared = /* @__PURE__ */ new Set();
|
|
2281
|
+
system.variants.forEach((variant, index) => {
|
|
2282
|
+
const role = variant.role;
|
|
2283
|
+
if (!role) return;
|
|
2284
|
+
if (declared.has(role)) {
|
|
2285
|
+
ctx.addIssue({
|
|
2286
|
+
code: "custom",
|
|
2287
|
+
path: [
|
|
2288
|
+
"variants",
|
|
2289
|
+
index,
|
|
2290
|
+
"role"
|
|
2291
|
+
],
|
|
2292
|
+
message: `Card role "${role}" is already implemented by another variant.`
|
|
2293
|
+
});
|
|
2294
|
+
return;
|
|
2295
|
+
}
|
|
2296
|
+
declared.add(role);
|
|
2297
|
+
});
|
|
2298
|
+
}
|
|
2299
|
+
const cardSystemSchema = z.object({ variants: z.array(cardVariantSchema).min(1).max(3) }).superRefine(validateUniqueDeclaredCardVariantRoles).transform((system) => ({ variants: withInferredRoles(system.variants) }));
|
|
2353
2300
|
//#endregion
|
|
2354
2301
|
//#region ../theme-core/src/accordions/types.ts
|
|
2355
2302
|
/**
|
|
@@ -3267,6 +3214,58 @@ function resolveOnColorForThemeToken(token) {
|
|
|
3267
3214
|
if (!shade) return rgbColorValue(`on${normalizedRole.charAt(0).toUpperCase() + normalizedRole.slice(1)}`);
|
|
3268
3215
|
return shade <= 400 ? "#000000" : "#FFFFFF";
|
|
3269
3216
|
}
|
|
3217
|
+
//#endregion
|
|
3218
|
+
//#region ../theme-core/src/header/legacyHeaderVariant.ts
|
|
3219
|
+
/**
|
|
3220
|
+
* The header variants the system actually renders.
|
|
3221
|
+
*
|
|
3222
|
+
* Each one has a layout row in the site-header block and a paint target in
|
|
3223
|
+
* `paintTargets.ts`. This is the canonical list: the block transform's variant
|
|
3224
|
+
* class allowlist and the AI theme generator's enum both derive from it, so
|
|
3225
|
+
* they cannot drift.
|
|
3226
|
+
*/
|
|
3227
|
+
const headerVariantValues = [
|
|
3228
|
+
"classic",
|
|
3229
|
+
"centered",
|
|
3230
|
+
"floating"
|
|
3231
|
+
];
|
|
3232
|
+
z.enum(headerVariantValues);
|
|
3233
|
+
/**
|
|
3234
|
+
* Header variant spellings that were once authorable but no longer name a
|
|
3235
|
+
* layout of their own, and the variant they read as now.
|
|
3236
|
+
*
|
|
3237
|
+
* `transparent` was an overlay header with no CSS of its own: everything it
|
|
3238
|
+
* did (transparent root background, overlay content flow) is what `floating`
|
|
3239
|
+
* already does, and it had zero persisted usage in production or locally when
|
|
3240
|
+
* it was retired. It survives here as a one-boundary alias so a theme authored
|
|
3241
|
+
* against the old vocabulary still parses.
|
|
3242
|
+
*
|
|
3243
|
+
* This matters because the theme schema is strict and has no per-field
|
|
3244
|
+
* `.catch()`: an out-of-enum variant fails `themeSchema.safeParse` for the
|
|
3245
|
+
* *whole* theme, which silently swaps the site's theme for
|
|
3246
|
+
* `modernMinimalTheme`. Aliasing here keeps that from happening.
|
|
3247
|
+
*/
|
|
3248
|
+
const legacyHeaderVariants = { transparent: "floating" };
|
|
3249
|
+
const legacyHeaderVariantValues = Object.keys(legacyHeaderVariants);
|
|
3250
|
+
/**
|
|
3251
|
+
* The header variant boundary for themes that go through `themeSchema`:
|
|
3252
|
+
* canonical variants pass through, legacy spellings normalize to the variant
|
|
3253
|
+
* they meant, everything else fails the parse.
|
|
3254
|
+
*
|
|
3255
|
+
* Deliberately an enum plus a transform rather than a `z.preprocess`, so the
|
|
3256
|
+
* schema's *input* type stays an accurate union (the legacy spelling is still
|
|
3257
|
+
* accepted on the wire) instead of widening to `unknown`. `SdkThemeWire` in
|
|
3258
|
+
* `@riverbankcms/api` is `z.input<typeof themeSchema>`, so a widened input here
|
|
3259
|
+
* would leak straight into a public type.
|
|
3260
|
+
*
|
|
3261
|
+
* Not every read of a persisted theme goes through the schema:
|
|
3262
|
+
* `resolveRuntimeTheme` in
|
|
3263
|
+
* `apps/dashboard/src/server/services/sites/runtimeSiteResponse.ts` returns the
|
|
3264
|
+
* raw database JSON asserted as `Theme` with no parse, so a theme still
|
|
3265
|
+
* carrying a legacy spelling reaches the theme editor un-aliased. That gap
|
|
3266
|
+
* predates this alias and is harmless while persisted usage is zero.
|
|
3267
|
+
*/
|
|
3268
|
+
const headerVariantWithLegacyAliasSchema = z.enum([...headerVariantValues, ...legacyHeaderVariantValues]).transform((value) => value in legacyHeaderVariants ? legacyHeaderVariants[value] : value);
|
|
3270
3269
|
const BREAKPOINT_LG = 1024;
|
|
3271
3270
|
const BREAKPOINT_XL = 1280;
|
|
3272
3271
|
const BREAKPOINT_LG_DOWN = BREAKPOINT_LG - 1;
|
|
@@ -3583,15 +3582,7 @@ const cardStylesOverrideSchema = z.object({
|
|
|
3583
3582
|
spacing: semanticSpacingSchema.nullable().optional(),
|
|
3584
3583
|
raised: z.boolean().nullable().optional(),
|
|
3585
3584
|
rounded: boxRoundedSchema.nullable().optional(),
|
|
3586
|
-
|
|
3587
|
-
"accent-quote",
|
|
3588
|
-
"editorial-rule",
|
|
3589
|
-
"soft-panel",
|
|
3590
|
-
"editorial-serif-quote",
|
|
3591
|
-
"editorial-open",
|
|
3592
|
-
"color-blocked"
|
|
3593
|
-
]).nullable().optional(),
|
|
3594
|
-
cardVariant: boxStylesCardVariantSchema.nullable().optional()
|
|
3585
|
+
role: cardRoleSchema.nullable().optional()
|
|
3595
3586
|
});
|
|
3596
3587
|
const blockStyleOverridesSchema = z.object({
|
|
3597
3588
|
sectionStyles: sectionStylesOverrideSchema.nullable().optional(),
|
|
@@ -3696,30 +3687,6 @@ const motion = z.object({
|
|
|
3696
3687
|
]).nullable()
|
|
3697
3688
|
});
|
|
3698
3689
|
z.object({ shape: corners });
|
|
3699
|
-
z.object({
|
|
3700
|
-
elevation: z.enum([
|
|
3701
|
-
"none",
|
|
3702
|
-
"low",
|
|
3703
|
-
"medium",
|
|
3704
|
-
"high"
|
|
3705
|
-
]),
|
|
3706
|
-
border: z.enum([
|
|
3707
|
-
"none",
|
|
3708
|
-
"subtle",
|
|
3709
|
-
"defined"
|
|
3710
|
-
]),
|
|
3711
|
-
shape: corners,
|
|
3712
|
-
headerStyle: z.enum([
|
|
3713
|
-
"plain",
|
|
3714
|
-
"accentBar",
|
|
3715
|
-
"subtleBg"
|
|
3716
|
-
]).nullable(),
|
|
3717
|
-
mediaTreatment: z.enum([
|
|
3718
|
-
"square",
|
|
3719
|
-
"rounded",
|
|
3720
|
-
"bleed"
|
|
3721
|
-
]).nullable()
|
|
3722
|
-
});
|
|
3723
3690
|
const inputStyle = z.object({
|
|
3724
3691
|
shape: corners,
|
|
3725
3692
|
border: z.enum([
|
|
@@ -3734,12 +3701,6 @@ const inputStyle = z.object({
|
|
|
3734
3701
|
]),
|
|
3735
3702
|
label: z.enum(["inside", "above"])
|
|
3736
3703
|
});
|
|
3737
|
-
const headerVariant = z.enum([
|
|
3738
|
-
"classic",
|
|
3739
|
-
"centered",
|
|
3740
|
-
"transparent",
|
|
3741
|
-
"floating"
|
|
3742
|
-
]);
|
|
3743
3704
|
const headerPositioning = z.enum([
|
|
3744
3705
|
"static",
|
|
3745
3706
|
"sticky",
|
|
@@ -3883,7 +3844,7 @@ const headerBackgroundSchema = z.object({
|
|
|
3883
3844
|
textColor: tokenOrCssColorValueSchema.nullable().optional()
|
|
3884
3845
|
});
|
|
3885
3846
|
const headerSchema = z.object({
|
|
3886
|
-
variant:
|
|
3847
|
+
variant: headerVariantWithLegacyAliasSchema,
|
|
3887
3848
|
positioning: headerPositioning,
|
|
3888
3849
|
shrinkOnScroll: z.boolean(),
|
|
3889
3850
|
maxWidth: headerMaxWidth,
|
|
@@ -4179,29 +4140,6 @@ z.object({
|
|
|
4179
4140
|
themes: z.array(themeSchema).length(3)
|
|
4180
4141
|
});
|
|
4181
4142
|
//#endregion
|
|
4182
|
-
//#region ../theme-core/src/palette/utils/colorConversion.ts
|
|
4183
|
-
function hexToRgb(hex) {
|
|
4184
|
-
const h = hex.replace(/^#/, "");
|
|
4185
|
-
const m = h.length === 3 ? h.split("").map((c) => c + c).join("") : h;
|
|
4186
|
-
if (m.length !== 6) throw new Error("Bad hex");
|
|
4187
|
-
const int = parseInt(m, 16);
|
|
4188
|
-
return {
|
|
4189
|
-
r: int >> 16 & 255,
|
|
4190
|
-
g: int >> 8 & 255,
|
|
4191
|
-
b: int & 255
|
|
4192
|
-
};
|
|
4193
|
-
}
|
|
4194
|
-
function srgbToLinear(u) {
|
|
4195
|
-
const x = u / 255;
|
|
4196
|
-
return x <= .04045 ? x / 12.92 : Math.pow((x + .055) / 1.055, 2.4);
|
|
4197
|
-
}
|
|
4198
|
-
//#endregion
|
|
4199
|
-
//#region ../theme-core/src/palette/utils/contrast.ts
|
|
4200
|
-
function relativeLuminance(r, g, b) {
|
|
4201
|
-
const R = srgbToLinear(r), G = srgbToLinear(g), B = srgbToLinear(b);
|
|
4202
|
-
return .2126 * R + .7152 * G + .0722 * B;
|
|
4203
|
-
}
|
|
4204
|
-
//#endregion
|
|
4205
4143
|
//#region ../theme-core/src/buttons/classNames.ts
|
|
4206
4144
|
function themeButtonVariantClassNames(variant) {
|
|
4207
4145
|
if (variant === "default") return [variant];
|
|
@@ -4273,13 +4211,7 @@ function shadeBackgroundEffect(config) {
|
|
|
4273
4211
|
buttonSizeNameSchema.options;
|
|
4274
4212
|
//#endregion
|
|
4275
4213
|
//#region ../theme-core/src/buttons/styles/domain.ts
|
|
4276
|
-
const PUBLIC_BUTTON_ROLES =
|
|
4277
|
-
"primary",
|
|
4278
|
-
"secondary",
|
|
4279
|
-
"outline",
|
|
4280
|
-
"ghost",
|
|
4281
|
-
"accent"
|
|
4282
|
-
];
|
|
4214
|
+
const PUBLIC_BUTTON_ROLES = VARIANT_ROLES;
|
|
4283
4215
|
function defineButtonStyleRecipe(recipe) {
|
|
4284
4216
|
return recipe;
|
|
4285
4217
|
}
|
|
@@ -4375,6 +4307,14 @@ const BUTTON_STYLE_IDS = [
|
|
|
4375
4307
|
"quiet-arrow"
|
|
4376
4308
|
];
|
|
4377
4309
|
const quietArrowParametersSchema = z.object({ secondaryTreatment: z.enum(["outlined", "solid-accent"]) }).strict();
|
|
4310
|
+
const flatInkHoverTreatmentSchema = z.enum([
|
|
4311
|
+
"contextual",
|
|
4312
|
+
"secondary",
|
|
4313
|
+
"accent"
|
|
4314
|
+
]);
|
|
4315
|
+
const flatInkHoverPreferencesShape = Object.fromEntries(VARIANT_ROLES.map((role) => [role, flatInkHoverTreatmentSchema.optional()]));
|
|
4316
|
+
const flatInkHoverPreferencesSchema = z.strictObject(flatInkHoverPreferencesShape);
|
|
4317
|
+
const flatInkParametersSchema = z.strictObject({ hoverPreferences: flatInkHoverPreferencesSchema.optional() });
|
|
4378
4318
|
const emptyParametersSchema$1 = z.object({}).strict();
|
|
4379
4319
|
function selectionBranch(styleId, parameters) {
|
|
4380
4320
|
return z.object({
|
|
@@ -4389,7 +4329,7 @@ z.discriminatedUnion("styleId", [
|
|
|
4389
4329
|
selectionBranch("editorial-link", emptyParametersSchema$1),
|
|
4390
4330
|
selectionBranch("pebble", emptyParametersSchema$1),
|
|
4391
4331
|
selectionBranch("ink-stamp", emptyParametersSchema$1),
|
|
4392
|
-
selectionBranch("flat-ink",
|
|
4332
|
+
selectionBranch("flat-ink", flatInkParametersSchema),
|
|
4393
4333
|
selectionBranch("brushed-wash", emptyParametersSchema$1),
|
|
4394
4334
|
selectionBranch("showtime-pill", emptyParametersSchema$1),
|
|
4395
4335
|
selectionBranch("joy-stamp", emptyParametersSchema$1),
|
|
@@ -4526,6 +4466,189 @@ const quietArrowRecipe = defineButtonStyleRecipe({
|
|
|
4526
4466
|
})
|
|
4527
4467
|
});
|
|
4528
4468
|
//#endregion
|
|
4469
|
+
//#region ../theme-core/src/buttons/styles/recipes/flatInk.ts
|
|
4470
|
+
const contextualRoleConfig = {
|
|
4471
|
+
primary: {
|
|
4472
|
+
contextualSeedToken: unsafeAsOpaqueButtonColourToken("primary"),
|
|
4473
|
+
fallbackDirection: "darker"
|
|
4474
|
+
},
|
|
4475
|
+
secondary: {
|
|
4476
|
+
contextualSeedToken: unsafeAsOpaqueButtonColourToken("surfaceAlt"),
|
|
4477
|
+
fallbackDirection: "darker"
|
|
4478
|
+
},
|
|
4479
|
+
outline: {
|
|
4480
|
+
contextualSeedToken: unsafeAsOpaqueButtonColourToken("surfaceAlt"),
|
|
4481
|
+
fallbackDirection: "darker"
|
|
4482
|
+
},
|
|
4483
|
+
ghost: {
|
|
4484
|
+
contextualSeedToken: unsafeAsOpaqueButtonColourToken("surfaceAlt"),
|
|
4485
|
+
fallbackDirection: "darker"
|
|
4486
|
+
},
|
|
4487
|
+
accent: {
|
|
4488
|
+
contextualSeedToken: unsafeAsOpaqueButtonColourToken("accent"),
|
|
4489
|
+
fallbackDirection: "darker"
|
|
4490
|
+
}
|
|
4491
|
+
};
|
|
4492
|
+
const hoverControl = {
|
|
4493
|
+
kind: "button-hover-by-role",
|
|
4494
|
+
parameter: "hoverPreferences",
|
|
4495
|
+
label: "Button hover",
|
|
4496
|
+
roles: contextualRoleConfig,
|
|
4497
|
+
options: [
|
|
4498
|
+
{
|
|
4499
|
+
value: "contextual",
|
|
4500
|
+
label: "Contextual shade shift"
|
|
4501
|
+
},
|
|
4502
|
+
{
|
|
4503
|
+
value: "secondary",
|
|
4504
|
+
label: "Secondary button colour"
|
|
4505
|
+
},
|
|
4506
|
+
{
|
|
4507
|
+
value: "accent",
|
|
4508
|
+
label: "Accent button colour"
|
|
4509
|
+
}
|
|
4510
|
+
]
|
|
4511
|
+
};
|
|
4512
|
+
const lift = { effectId: "lift" };
|
|
4513
|
+
const flatInkRecipe = defineButtonStyleRecipe({
|
|
4514
|
+
id: "flat-ink",
|
|
4515
|
+
accessibilityLabel: "Flat rounded buttons with arrow affordances",
|
|
4516
|
+
tags: {
|
|
4517
|
+
tone: "classic",
|
|
4518
|
+
energy: "calm",
|
|
4519
|
+
motion: "subtle",
|
|
4520
|
+
era: "editorial"
|
|
4521
|
+
},
|
|
4522
|
+
parameterSchema: flatInkParametersSchema,
|
|
4523
|
+
defaultParameters: {},
|
|
4524
|
+
controls: [hoverControl],
|
|
4525
|
+
defineSystem: (parameters) => ({
|
|
4526
|
+
global: {
|
|
4527
|
+
cornerStyle: "rounded",
|
|
4528
|
+
textTransform: "none",
|
|
4529
|
+
fontWeight: 600,
|
|
4530
|
+
typography: "body",
|
|
4531
|
+
letterSpacing: "tight",
|
|
4532
|
+
paddingPreset: "default",
|
|
4533
|
+
hoverTransform: "lift",
|
|
4534
|
+
hoverColor: "none"
|
|
4535
|
+
},
|
|
4536
|
+
sizes: {
|
|
4537
|
+
sm: {
|
|
4538
|
+
padding: "0.625rem 1.125rem",
|
|
4539
|
+
fontSize: "text-sm"
|
|
4540
|
+
},
|
|
4541
|
+
md: { padding: "0.8125rem 1.375rem" },
|
|
4542
|
+
lg: {
|
|
4543
|
+
padding: "0.9375rem 1.625rem",
|
|
4544
|
+
fontSize: "text-lg"
|
|
4545
|
+
},
|
|
4546
|
+
xl: {
|
|
4547
|
+
padding: "1.0625rem 2rem",
|
|
4548
|
+
fontSize: "text-xl"
|
|
4549
|
+
}
|
|
4550
|
+
},
|
|
4551
|
+
roles: {
|
|
4552
|
+
primary: {
|
|
4553
|
+
kind: "complete",
|
|
4554
|
+
appearance: {
|
|
4555
|
+
background: {
|
|
4556
|
+
type: "solid",
|
|
4557
|
+
colorToken: unsafeAsOpaqueButtonColourToken("primary")
|
|
4558
|
+
},
|
|
4559
|
+
borderRadius: "rounded-lg",
|
|
4560
|
+
affordance: { iconId: "ArrowRight" },
|
|
4561
|
+
...hoverAppearance("primary", parameters, [lift, {
|
|
4562
|
+
effectId: "background-on-hover",
|
|
4563
|
+
options: { colorToken: unsafeAsOpaqueButtonColourToken("secondary") }
|
|
4564
|
+
}])
|
|
4565
|
+
}
|
|
4566
|
+
},
|
|
4567
|
+
secondary: {
|
|
4568
|
+
kind: "complete",
|
|
4569
|
+
appearance: {
|
|
4570
|
+
background: {
|
|
4571
|
+
type: "surface",
|
|
4572
|
+
role: "link"
|
|
4573
|
+
},
|
|
4574
|
+
borderRadius: "rounded-lg",
|
|
4575
|
+
border: { widthClass: "border" },
|
|
4576
|
+
...hoverAppearance("secondary", parameters, [lift, {
|
|
4577
|
+
effectId: "background-on-hover",
|
|
4578
|
+
options: { colorToken: unsafeAsOpaqueButtonColourToken("surfaceAlt") }
|
|
4579
|
+
}])
|
|
4580
|
+
}
|
|
4581
|
+
},
|
|
4582
|
+
outline: {
|
|
4583
|
+
kind: "complete",
|
|
4584
|
+
appearance: {
|
|
4585
|
+
background: {
|
|
4586
|
+
type: "surface",
|
|
4587
|
+
role: "link"
|
|
4588
|
+
},
|
|
4589
|
+
borderRadius: "rounded-lg",
|
|
4590
|
+
border: { widthClass: "border" },
|
|
4591
|
+
...hoverAppearance("outline", parameters, [lift, {
|
|
4592
|
+
effectId: "background-on-hover",
|
|
4593
|
+
options: { colorToken: unsafeAsOpaqueButtonColourToken("surfaceAlt") }
|
|
4594
|
+
}])
|
|
4595
|
+
}
|
|
4596
|
+
},
|
|
4597
|
+
ghost: {
|
|
4598
|
+
kind: "complete",
|
|
4599
|
+
appearance: {
|
|
4600
|
+
background: {
|
|
4601
|
+
type: "surface",
|
|
4602
|
+
role: "link"
|
|
4603
|
+
},
|
|
4604
|
+
borderRadius: "rounded-lg",
|
|
4605
|
+
...hoverAppearance("ghost", parameters, [lift])
|
|
4606
|
+
}
|
|
4607
|
+
},
|
|
4608
|
+
accent: {
|
|
4609
|
+
kind: "complete",
|
|
4610
|
+
appearance: {
|
|
4611
|
+
background: {
|
|
4612
|
+
type: "solid",
|
|
4613
|
+
colorToken: unsafeAsOpaqueButtonColourToken("accent")
|
|
4614
|
+
},
|
|
4615
|
+
borderRadius: "rounded-lg",
|
|
4616
|
+
affordance: { iconId: "ArrowRight" },
|
|
4617
|
+
...hoverAppearance("accent", parameters, [lift])
|
|
4618
|
+
}
|
|
4619
|
+
}
|
|
4620
|
+
}
|
|
4621
|
+
})
|
|
4622
|
+
});
|
|
4623
|
+
function hoverAppearance(role, parameters, recommended) {
|
|
4624
|
+
const preference = parameters.hoverPreferences?.[role];
|
|
4625
|
+
if (preference === void 0) return { effects: { hover: [...recommended] } };
|
|
4626
|
+
if (preference === "contextual") {
|
|
4627
|
+
const config = contextualRoleConfig[role];
|
|
4628
|
+
return {
|
|
4629
|
+
effects: { hover: [lift] },
|
|
4630
|
+
contextualHover: {
|
|
4631
|
+
kind: "shade-shift",
|
|
4632
|
+
seedToken: config.contextualSeedToken,
|
|
4633
|
+
fallbackDirection: config.fallbackDirection
|
|
4634
|
+
}
|
|
4635
|
+
};
|
|
4636
|
+
}
|
|
4637
|
+
const config = contextualRoleConfig[role];
|
|
4638
|
+
return {
|
|
4639
|
+
effects: { hover: [lift] },
|
|
4640
|
+
contextualHover: {
|
|
4641
|
+
kind: "shade-shift",
|
|
4642
|
+
seedToken: config.contextualSeedToken,
|
|
4643
|
+
fallbackDirection: config.fallbackDirection,
|
|
4644
|
+
preferredToken: unsafeAsOpaqueButtonColourToken(paletteRole(preference))
|
|
4645
|
+
}
|
|
4646
|
+
};
|
|
4647
|
+
}
|
|
4648
|
+
function paletteRole(preference) {
|
|
4649
|
+
return preference;
|
|
4650
|
+
}
|
|
4651
|
+
//#endregion
|
|
4529
4652
|
//#region ../theme-core/src/buttons/styles/recipes/defineStaticButtonStyleRecipe.ts
|
|
4530
4653
|
const emptyParametersSchema = z.object({}).strict();
|
|
4531
4654
|
function defineStaticButtonStyleRecipe(input) {
|
|
@@ -5252,159 +5375,24 @@ const inkStampRecipe = defineStaticButtonStyleRecipe({
|
|
|
5252
5375
|
fontWeight: 600,
|
|
5253
5376
|
hoverTransform: "none",
|
|
5254
5377
|
hoverColor: "none",
|
|
5255
|
-
letterSpacing: "loose"
|
|
5256
|
-
},
|
|
5257
|
-
sizes: {
|
|
5258
|
-
sm: {
|
|
5259
|
-
padding: "0.5rem 1.25rem",
|
|
5260
|
-
fontSize: "text-xs"
|
|
5261
|
-
},
|
|
5262
|
-
md: {
|
|
5263
|
-
padding: "0.75rem 1.75rem",
|
|
5264
|
-
fontSize: "text-sm"
|
|
5265
|
-
},
|
|
5266
|
-
lg: {
|
|
5267
|
-
padding: "0.875rem 2.25rem",
|
|
5268
|
-
fontSize: "text-base"
|
|
5269
|
-
},
|
|
5270
|
-
xl: {
|
|
5271
|
-
padding: "1.125rem 2.75rem",
|
|
5272
|
-
fontSize: "text-lg"
|
|
5273
|
-
}
|
|
5274
|
-
},
|
|
5275
|
-
roles: {
|
|
5276
|
-
primary: {
|
|
5277
|
-
kind: "complete",
|
|
5278
|
-
appearance: {
|
|
5279
|
-
background: {
|
|
5280
|
-
type: "solid",
|
|
5281
|
-
colorToken: "primary"
|
|
5282
|
-
},
|
|
5283
|
-
borderRadius: "rounded-md",
|
|
5284
|
-
effects: {
|
|
5285
|
-
hover: [{
|
|
5286
|
-
effectId: "drop-shadow",
|
|
5287
|
-
options: { intensity: "medium" }
|
|
5288
|
-
}, {
|
|
5289
|
-
effectId: "scale-up",
|
|
5290
|
-
options: { scale: "1.02" }
|
|
5291
|
-
}],
|
|
5292
|
-
active: [{
|
|
5293
|
-
effectId: "scale-down",
|
|
5294
|
-
options: { scale: "0.98" }
|
|
5295
|
-
}]
|
|
5296
|
-
}
|
|
5297
|
-
}
|
|
5298
|
-
},
|
|
5299
|
-
secondary: {
|
|
5300
|
-
kind: "complete",
|
|
5301
|
-
appearance: {
|
|
5302
|
-
background: {
|
|
5303
|
-
type: "surface",
|
|
5304
|
-
role: "link"
|
|
5305
|
-
},
|
|
5306
|
-
borderRadius: "rounded-md",
|
|
5307
|
-
border: { widthClass: "border-2" },
|
|
5308
|
-
effects: { hover: [{
|
|
5309
|
-
effectId: "background-on-hover",
|
|
5310
|
-
options: { colorToken: unsafeAsOpaqueButtonColourToken("surface") }
|
|
5311
|
-
}] }
|
|
5312
|
-
}
|
|
5313
|
-
},
|
|
5314
|
-
outline: {
|
|
5315
|
-
kind: "complete",
|
|
5316
|
-
appearance: {
|
|
5317
|
-
background: {
|
|
5318
|
-
type: "surface",
|
|
5319
|
-
role: "link"
|
|
5320
|
-
},
|
|
5321
|
-
borderRadius: "rounded-md",
|
|
5322
|
-
border: { widthClass: "border-2" },
|
|
5323
|
-
effects: { hover: [{
|
|
5324
|
-
effectId: "background-on-hover",
|
|
5325
|
-
options: { colorToken: unsafeAsOpaqueButtonColourToken("surface") }
|
|
5326
|
-
}] }
|
|
5327
|
-
}
|
|
5328
|
-
},
|
|
5329
|
-
ghost: {
|
|
5330
|
-
kind: "complete",
|
|
5331
|
-
appearance: {
|
|
5332
|
-
background: {
|
|
5333
|
-
type: "surface",
|
|
5334
|
-
role: "link"
|
|
5335
|
-
},
|
|
5336
|
-
borderRadius: "rounded-none",
|
|
5337
|
-
sizes: {
|
|
5338
|
-
sm: {
|
|
5339
|
-
padding: "0.375rem 0",
|
|
5340
|
-
fontSize: "text-xs"
|
|
5341
|
-
},
|
|
5342
|
-
md: {
|
|
5343
|
-
padding: "0.5rem 0",
|
|
5344
|
-
fontSize: "text-sm"
|
|
5345
|
-
},
|
|
5346
|
-
lg: {
|
|
5347
|
-
padding: "0.625rem 0",
|
|
5348
|
-
fontSize: "text-base"
|
|
5349
|
-
},
|
|
5350
|
-
xl: {
|
|
5351
|
-
padding: "0.75rem 0",
|
|
5352
|
-
fontSize: "text-lg"
|
|
5353
|
-
}
|
|
5354
|
-
},
|
|
5355
|
-
effects: { base: [{
|
|
5356
|
-
effectId: "border-bottom-grow",
|
|
5357
|
-
options: {
|
|
5358
|
-
height: 1,
|
|
5359
|
-
origin: "left"
|
|
5360
|
-
}
|
|
5361
|
-
}] }
|
|
5362
|
-
}
|
|
5363
|
-
},
|
|
5364
|
-
accent: {
|
|
5365
|
-
kind: "derive",
|
|
5366
|
-
from: "primary",
|
|
5367
|
-
overrides: { background: {
|
|
5368
|
-
type: "solid",
|
|
5369
|
-
colorToken: "accent"
|
|
5370
|
-
} }
|
|
5371
|
-
}
|
|
5372
|
-
}
|
|
5373
|
-
}
|
|
5374
|
-
});
|
|
5375
|
-
const flatInkRecipe = defineStaticButtonStyleRecipe({
|
|
5376
|
-
id: "flat-ink",
|
|
5377
|
-
accessibilityLabel: "Flat rounded buttons with arrow affordances",
|
|
5378
|
-
tags: {
|
|
5379
|
-
tone: "classic",
|
|
5380
|
-
energy: "calm",
|
|
5381
|
-
motion: "subtle",
|
|
5382
|
-
era: "editorial"
|
|
5383
|
-
},
|
|
5384
|
-
system: {
|
|
5385
|
-
global: {
|
|
5386
|
-
cornerStyle: "rounded",
|
|
5387
|
-
textTransform: "none",
|
|
5388
|
-
fontWeight: 600,
|
|
5389
|
-
typography: "body",
|
|
5390
|
-
letterSpacing: "tight",
|
|
5391
|
-
paddingPreset: "default",
|
|
5392
|
-
hoverTransform: "lift",
|
|
5393
|
-
hoverColor: "none"
|
|
5378
|
+
letterSpacing: "loose"
|
|
5394
5379
|
},
|
|
5395
5380
|
sizes: {
|
|
5396
5381
|
sm: {
|
|
5397
|
-
padding: "0.
|
|
5382
|
+
padding: "0.5rem 1.25rem",
|
|
5383
|
+
fontSize: "text-xs"
|
|
5384
|
+
},
|
|
5385
|
+
md: {
|
|
5386
|
+
padding: "0.75rem 1.75rem",
|
|
5398
5387
|
fontSize: "text-sm"
|
|
5399
5388
|
},
|
|
5400
|
-
md: { padding: "0.8125rem 1.375rem" },
|
|
5401
5389
|
lg: {
|
|
5402
|
-
padding: "0.
|
|
5403
|
-
fontSize: "text-
|
|
5390
|
+
padding: "0.875rem 2.25rem",
|
|
5391
|
+
fontSize: "text-base"
|
|
5404
5392
|
},
|
|
5405
5393
|
xl: {
|
|
5406
|
-
padding: "1.
|
|
5407
|
-
fontSize: "text-
|
|
5394
|
+
padding: "1.125rem 2.75rem",
|
|
5395
|
+
fontSize: "text-lg"
|
|
5408
5396
|
}
|
|
5409
5397
|
},
|
|
5410
5398
|
roles: {
|
|
@@ -5415,12 +5403,20 @@ const flatInkRecipe = defineStaticButtonStyleRecipe({
|
|
|
5415
5403
|
type: "solid",
|
|
5416
5404
|
colorToken: "primary"
|
|
5417
5405
|
},
|
|
5418
|
-
borderRadius: "rounded-
|
|
5419
|
-
|
|
5420
|
-
|
|
5421
|
-
|
|
5422
|
-
|
|
5423
|
-
|
|
5406
|
+
borderRadius: "rounded-md",
|
|
5407
|
+
effects: {
|
|
5408
|
+
hover: [{
|
|
5409
|
+
effectId: "drop-shadow",
|
|
5410
|
+
options: { intensity: "medium" }
|
|
5411
|
+
}, {
|
|
5412
|
+
effectId: "scale-up",
|
|
5413
|
+
options: { scale: "1.02" }
|
|
5414
|
+
}],
|
|
5415
|
+
active: [{
|
|
5416
|
+
effectId: "scale-down",
|
|
5417
|
+
options: { scale: "0.98" }
|
|
5418
|
+
}]
|
|
5419
|
+
}
|
|
5424
5420
|
}
|
|
5425
5421
|
},
|
|
5426
5422
|
secondary: {
|
|
@@ -5430,11 +5426,11 @@ const flatInkRecipe = defineStaticButtonStyleRecipe({
|
|
|
5430
5426
|
type: "surface",
|
|
5431
5427
|
role: "link"
|
|
5432
5428
|
},
|
|
5433
|
-
borderRadius: "rounded-
|
|
5434
|
-
border: { widthClass: "border" },
|
|
5435
|
-
effects: { hover: [{
|
|
5429
|
+
borderRadius: "rounded-md",
|
|
5430
|
+
border: { widthClass: "border-2" },
|
|
5431
|
+
effects: { hover: [{
|
|
5436
5432
|
effectId: "background-on-hover",
|
|
5437
|
-
options: { colorToken: unsafeAsOpaqueButtonColourToken("
|
|
5433
|
+
options: { colorToken: unsafeAsOpaqueButtonColourToken("surface") }
|
|
5438
5434
|
}] }
|
|
5439
5435
|
}
|
|
5440
5436
|
},
|
|
@@ -5445,11 +5441,11 @@ const flatInkRecipe = defineStaticButtonStyleRecipe({
|
|
|
5445
5441
|
type: "surface",
|
|
5446
5442
|
role: "link"
|
|
5447
5443
|
},
|
|
5448
|
-
borderRadius: "rounded-
|
|
5449
|
-
border: { widthClass: "border" },
|
|
5450
|
-
effects: { hover: [{
|
|
5444
|
+
borderRadius: "rounded-md",
|
|
5445
|
+
border: { widthClass: "border-2" },
|
|
5446
|
+
effects: { hover: [{
|
|
5451
5447
|
effectId: "background-on-hover",
|
|
5452
|
-
options: { colorToken: unsafeAsOpaqueButtonColourToken("
|
|
5448
|
+
options: { colorToken: unsafeAsOpaqueButtonColourToken("surface") }
|
|
5453
5449
|
}] }
|
|
5454
5450
|
}
|
|
5455
5451
|
},
|
|
@@ -5460,21 +5456,41 @@ const flatInkRecipe = defineStaticButtonStyleRecipe({
|
|
|
5460
5456
|
type: "surface",
|
|
5461
5457
|
role: "link"
|
|
5462
5458
|
},
|
|
5463
|
-
borderRadius: "rounded-
|
|
5464
|
-
|
|
5459
|
+
borderRadius: "rounded-none",
|
|
5460
|
+
sizes: {
|
|
5461
|
+
sm: {
|
|
5462
|
+
padding: "0.375rem 0",
|
|
5463
|
+
fontSize: "text-xs"
|
|
5464
|
+
},
|
|
5465
|
+
md: {
|
|
5466
|
+
padding: "0.5rem 0",
|
|
5467
|
+
fontSize: "text-sm"
|
|
5468
|
+
},
|
|
5469
|
+
lg: {
|
|
5470
|
+
padding: "0.625rem 0",
|
|
5471
|
+
fontSize: "text-base"
|
|
5472
|
+
},
|
|
5473
|
+
xl: {
|
|
5474
|
+
padding: "0.75rem 0",
|
|
5475
|
+
fontSize: "text-lg"
|
|
5476
|
+
}
|
|
5477
|
+
},
|
|
5478
|
+
effects: { base: [{
|
|
5479
|
+
effectId: "border-bottom-grow",
|
|
5480
|
+
options: {
|
|
5481
|
+
height: 1,
|
|
5482
|
+
origin: "left"
|
|
5483
|
+
}
|
|
5484
|
+
}] }
|
|
5465
5485
|
}
|
|
5466
5486
|
},
|
|
5467
5487
|
accent: {
|
|
5468
|
-
kind: "
|
|
5469
|
-
|
|
5470
|
-
|
|
5471
|
-
|
|
5472
|
-
|
|
5473
|
-
|
|
5474
|
-
borderRadius: "rounded-lg",
|
|
5475
|
-
affordance: { iconId: "ArrowRight" },
|
|
5476
|
-
effects: { hover: [{ effectId: "lift" }] }
|
|
5477
|
-
}
|
|
5488
|
+
kind: "derive",
|
|
5489
|
+
from: "primary",
|
|
5490
|
+
overrides: { background: {
|
|
5491
|
+
type: "solid",
|
|
5492
|
+
colorToken: "accent"
|
|
5493
|
+
} }
|
|
5478
5494
|
}
|
|
5479
5495
|
}
|
|
5480
5496
|
}
|
|
@@ -5939,6 +5955,7 @@ const unsupportedEventRegistrationPageSurfaceSubjectSchema = z.object({
|
|
|
5939
5955
|
reason: z.enum([
|
|
5940
5956
|
"unsupportedSubject",
|
|
5941
5957
|
"invalidEventSeriesId",
|
|
5958
|
+
"invalidEventSeriesBookingScope",
|
|
5942
5959
|
"invalidEventOfferingId"
|
|
5943
5960
|
])
|
|
5944
5961
|
});
|
|
@@ -5991,13 +6008,9 @@ function resolveEventRegistrationScopedEvents(events, context) {
|
|
|
5991
6008
|
}
|
|
5992
6009
|
//#endregion
|
|
5993
6010
|
//#region ../blocks/src/system/runtime/nodes/course-registration.interactive.ts
|
|
5994
|
-
const
|
|
5995
|
-
siteId: z.string().optional(),
|
|
5996
|
-
apiBaseUrl: z.string().optional(),
|
|
5997
|
-
portalToken: z.string().nullable().optional(),
|
|
6011
|
+
const courseRegistrationHydrationSchemaShape = {
|
|
5998
6012
|
subject: eventRegistrationPageSurfaceSubjectSchema.nullable().optional(),
|
|
5999
|
-
courses: z.array(
|
|
6000
|
-
className: z.string().nullable().optional(),
|
|
6013
|
+
courses: z.array(publicWholeSeriesOfferingSchema).nullable().optional(),
|
|
6001
6014
|
showSessions: z.boolean().optional(),
|
|
6002
6015
|
showPrice: z.boolean().optional(),
|
|
6003
6016
|
showCapacity: z.boolean().optional(),
|
|
@@ -6005,8 +6018,15 @@ const courseRegistrationSourceSchema = z.object({
|
|
|
6005
6018
|
successMessage: z.string().optional(),
|
|
6006
6019
|
waitlistMessage: z.string().optional(),
|
|
6007
6020
|
membershipMessage: z.string().optional(),
|
|
6021
|
+
buttonVariant: registrationButtonVariantSchema.optional()
|
|
6022
|
+
};
|
|
6023
|
+
const courseRegistrationSourceSchema = z.object({
|
|
6024
|
+
siteId: z.string().optional(),
|
|
6025
|
+
apiBaseUrl: z.string().optional(),
|
|
6026
|
+
portalToken: z.string().nullable().optional(),
|
|
6027
|
+
...courseRegistrationHydrationSchemaShape,
|
|
6028
|
+
className: z.string().nullable().optional(),
|
|
6008
6029
|
buttonText: z.string().nullable().optional(),
|
|
6009
|
-
buttonVariant: registrationButtonVariantSchema.optional(),
|
|
6010
6030
|
stage: previewStageSchema.optional()
|
|
6011
6031
|
});
|
|
6012
6032
|
const courseRegistrationDisplaySchema = z.object({
|
|
@@ -6015,18 +6035,7 @@ const courseRegistrationDisplaySchema = z.object({
|
|
|
6015
6035
|
className: z.string().nullable(),
|
|
6016
6036
|
summaryButtonText: z.string()
|
|
6017
6037
|
});
|
|
6018
|
-
const courseRegistrationHydrationSchema = z.object(
|
|
6019
|
-
subject: eventRegistrationPageSurfaceSubjectSchema.nullable().optional(),
|
|
6020
|
-
courses: z.array(publicCourseSchema).nullable().optional(),
|
|
6021
|
-
showSessions: z.boolean().optional(),
|
|
6022
|
-
showPrice: z.boolean().optional(),
|
|
6023
|
-
showCapacity: z.boolean().optional(),
|
|
6024
|
-
showVenue: z.boolean().optional(),
|
|
6025
|
-
successMessage: z.string().optional(),
|
|
6026
|
-
waitlistMessage: z.string().optional(),
|
|
6027
|
-
membershipMessage: z.string().optional(),
|
|
6028
|
-
buttonVariant: registrationButtonVariantSchema.optional()
|
|
6029
|
-
});
|
|
6038
|
+
const courseRegistrationHydrationSchema = z.object(courseRegistrationHydrationSchemaShape);
|
|
6030
6039
|
const courseRegistrationRenderSchema = z.object({
|
|
6031
6040
|
display: courseRegistrationDisplaySchema,
|
|
6032
6041
|
hydration: courseRegistrationHydrationSchema
|
|
@@ -6162,6 +6171,7 @@ const eventPresetSchema = z.enum([
|
|
|
6162
6171
|
"event",
|
|
6163
6172
|
"class",
|
|
6164
6173
|
"course",
|
|
6174
|
+
"term",
|
|
6165
6175
|
"workshop",
|
|
6166
6176
|
"retreat",
|
|
6167
6177
|
"performance"
|
|
@@ -6220,57 +6230,49 @@ z.enum([
|
|
|
6220
6230
|
*/
|
|
6221
6231
|
const accessRestrictionSchema = z.enum(["none", "category"]);
|
|
6222
6232
|
z.enum(["single", "ticket_types"]);
|
|
6233
|
+
const freePriceDisplaySchema = z.object({
|
|
6234
|
+
kind: z.literal("free"),
|
|
6235
|
+
currency: z.string()
|
|
6236
|
+
});
|
|
6237
|
+
const exactPriceDisplaySchema = z.object({
|
|
6238
|
+
kind: z.literal("exact"),
|
|
6239
|
+
amount: z.number(),
|
|
6240
|
+
currency: z.string()
|
|
6241
|
+
});
|
|
6242
|
+
const fromPriceDisplaySchema = z.object({
|
|
6243
|
+
kind: z.literal("from"),
|
|
6244
|
+
amount: z.number(),
|
|
6245
|
+
currency: z.string()
|
|
6246
|
+
});
|
|
6247
|
+
const unavailablePriceDisplaySchema = z.object({
|
|
6248
|
+
kind: z.literal("unavailable"),
|
|
6249
|
+
currency: z.string()
|
|
6250
|
+
});
|
|
6251
|
+
const rangePriceDisplaySchema = z.object({
|
|
6252
|
+
kind: z.literal("range"),
|
|
6253
|
+
minAmount: z.number(),
|
|
6254
|
+
maxAmount: z.number(),
|
|
6255
|
+
currency: z.string()
|
|
6256
|
+
});
|
|
6257
|
+
const mixedPriceDisplaySchema = z.object({
|
|
6258
|
+
kind: z.literal("mixed"),
|
|
6259
|
+
paidFromAmount: z.number(),
|
|
6260
|
+
paidToAmount: z.number(),
|
|
6261
|
+
currency: z.string()
|
|
6262
|
+
});
|
|
6223
6263
|
const publicCoursePriceDisplaySchema = z.discriminatedUnion("kind", [
|
|
6224
|
-
|
|
6225
|
-
|
|
6226
|
-
|
|
6227
|
-
|
|
6228
|
-
z.object({
|
|
6229
|
-
kind: z.literal("exact"),
|
|
6230
|
-
amount: z.number(),
|
|
6231
|
-
currency: z.string()
|
|
6232
|
-
}),
|
|
6233
|
-
z.object({
|
|
6234
|
-
kind: z.literal("from"),
|
|
6235
|
-
amount: z.number(),
|
|
6236
|
-
currency: z.string()
|
|
6237
|
-
}),
|
|
6238
|
-
z.object({
|
|
6239
|
-
kind: z.literal("unavailable"),
|
|
6240
|
-
currency: z.string()
|
|
6241
|
-
})
|
|
6264
|
+
freePriceDisplaySchema,
|
|
6265
|
+
exactPriceDisplaySchema,
|
|
6266
|
+
fromPriceDisplaySchema,
|
|
6267
|
+
unavailablePriceDisplaySchema
|
|
6242
6268
|
]);
|
|
6243
6269
|
z.discriminatedUnion("kind", [
|
|
6244
|
-
|
|
6245
|
-
|
|
6246
|
-
|
|
6247
|
-
|
|
6248
|
-
|
|
6249
|
-
|
|
6250
|
-
amount: z.number(),
|
|
6251
|
-
currency: z.string()
|
|
6252
|
-
}),
|
|
6253
|
-
z.object({
|
|
6254
|
-
kind: z.literal("from"),
|
|
6255
|
-
amount: z.number(),
|
|
6256
|
-
currency: z.string()
|
|
6257
|
-
}),
|
|
6258
|
-
z.object({
|
|
6259
|
-
kind: z.literal("range"),
|
|
6260
|
-
minAmount: z.number(),
|
|
6261
|
-
maxAmount: z.number(),
|
|
6262
|
-
currency: z.string()
|
|
6263
|
-
}),
|
|
6264
|
-
z.object({
|
|
6265
|
-
kind: z.literal("mixed"),
|
|
6266
|
-
paidFromAmount: z.number(),
|
|
6267
|
-
paidToAmount: z.number(),
|
|
6268
|
-
currency: z.string()
|
|
6269
|
-
}),
|
|
6270
|
-
z.object({
|
|
6271
|
-
kind: z.literal("unavailable"),
|
|
6272
|
-
currency: z.string()
|
|
6273
|
-
}),
|
|
6270
|
+
freePriceDisplaySchema,
|
|
6271
|
+
exactPriceDisplaySchema,
|
|
6272
|
+
fromPriceDisplaySchema,
|
|
6273
|
+
rangePriceDisplaySchema,
|
|
6274
|
+
mixedPriceDisplaySchema,
|
|
6275
|
+
unavailablePriceDisplaySchema,
|
|
6274
6276
|
z.object({
|
|
6275
6277
|
kind: z.literal("external"),
|
|
6276
6278
|
label: z.string()
|
|
@@ -6281,36 +6283,12 @@ z.discriminatedUnion("kind", [
|
|
|
6281
6283
|
})
|
|
6282
6284
|
]);
|
|
6283
6285
|
const publicEventTicketTypePriceDisplaySchema = z.union([
|
|
6284
|
-
|
|
6285
|
-
|
|
6286
|
-
|
|
6287
|
-
|
|
6288
|
-
|
|
6289
|
-
|
|
6290
|
-
amount: z.number(),
|
|
6291
|
-
currency: z.string()
|
|
6292
|
-
}),
|
|
6293
|
-
z.object({
|
|
6294
|
-
kind: z.literal("from"),
|
|
6295
|
-
amount: z.number(),
|
|
6296
|
-
currency: z.string()
|
|
6297
|
-
}),
|
|
6298
|
-
z.object({
|
|
6299
|
-
kind: z.literal("range"),
|
|
6300
|
-
minAmount: z.number(),
|
|
6301
|
-
maxAmount: z.number(),
|
|
6302
|
-
currency: z.string()
|
|
6303
|
-
}),
|
|
6304
|
-
z.object({
|
|
6305
|
-
kind: z.literal("mixed"),
|
|
6306
|
-
paidFromAmount: z.number(),
|
|
6307
|
-
paidToAmount: z.number(),
|
|
6308
|
-
currency: z.string()
|
|
6309
|
-
}),
|
|
6310
|
-
z.object({
|
|
6311
|
-
kind: z.literal("unavailable"),
|
|
6312
|
-
currency: z.string()
|
|
6313
|
-
})
|
|
6286
|
+
freePriceDisplaySchema,
|
|
6287
|
+
exactPriceDisplaySchema,
|
|
6288
|
+
fromPriceDisplaySchema,
|
|
6289
|
+
rangePriceDisplaySchema,
|
|
6290
|
+
mixedPriceDisplaySchema,
|
|
6291
|
+
unavailablePriceDisplaySchema
|
|
6314
6292
|
]);
|
|
6315
6293
|
const publicEventAttendanceModeSchema = z.enum(["in_person", "online"]);
|
|
6316
6294
|
const publicEventAttendanceModeAvailabilitySchema = z.object({
|
|
@@ -6424,6 +6402,22 @@ const publicTeamMemberSummarySchema = z.object({
|
|
|
6424
6402
|
summary: z.string().nullable(),
|
|
6425
6403
|
profilePath: z.string().nullable()
|
|
6426
6404
|
});
|
|
6405
|
+
const publicEventBookingAvailabilitySchema = z.discriminatedUnion("kind", [z.object({ kind: z.literal("open") }), z.object({
|
|
6406
|
+
kind: z.literal("closed"),
|
|
6407
|
+
reason: z.enum([
|
|
6408
|
+
"occurrence_cancelled",
|
|
6409
|
+
"occurrence_completed",
|
|
6410
|
+
"series_draft",
|
|
6411
|
+
"series_cancelled",
|
|
6412
|
+
"series_completed",
|
|
6413
|
+
"series_archived",
|
|
6414
|
+
"parent_archived",
|
|
6415
|
+
"parent_inconsistent",
|
|
6416
|
+
"not_public",
|
|
6417
|
+
"already_started",
|
|
6418
|
+
"enrollment_closed"
|
|
6419
|
+
])
|
|
6420
|
+
})]);
|
|
6427
6421
|
/**
|
|
6428
6422
|
* Zod schema for public event data
|
|
6429
6423
|
*/
|
|
@@ -6448,6 +6442,7 @@ const publicEventSchema = z.object({
|
|
|
6448
6442
|
path: z.string().nullable(),
|
|
6449
6443
|
destination: publicEventDestinationSchema,
|
|
6450
6444
|
requiresRegistration: z.boolean(),
|
|
6445
|
+
bookingAvailability: publicEventBookingAvailabilitySchema,
|
|
6451
6446
|
deliveryMode: z.enum([
|
|
6452
6447
|
"in_person",
|
|
6453
6448
|
"online",
|
|
@@ -6466,6 +6461,8 @@ const publicEventSchema = z.object({
|
|
|
6466
6461
|
status: z.enum([
|
|
6467
6462
|
"active",
|
|
6468
6463
|
"draft",
|
|
6464
|
+
"cancelled",
|
|
6465
|
+
"completed",
|
|
6469
6466
|
"archived"
|
|
6470
6467
|
]).optional(),
|
|
6471
6468
|
timeZone: z.string(),
|
|
@@ -6478,7 +6475,7 @@ const publicEventSchema = z.object({
|
|
|
6478
6475
|
acceptsMemberships: z.boolean().optional(),
|
|
6479
6476
|
wholeSeries: z.object({
|
|
6480
6477
|
eventSeriesId: z.string(),
|
|
6481
|
-
pricing:
|
|
6478
|
+
pricing: wholeSeriesPricingSchema,
|
|
6482
6479
|
currency: z.string(),
|
|
6483
6480
|
enrollmentOpen: z.boolean()
|
|
6484
6481
|
}).nullable().optional()
|
|
@@ -6502,13 +6499,7 @@ function normalizeIdList(parts) {
|
|
|
6502
6499
|
}
|
|
6503
6500
|
//#endregion
|
|
6504
6501
|
//#region ../blocks/src/system/blocks/events/shared/filtering.ts
|
|
6505
|
-
const eventSurfacePresetValues =
|
|
6506
|
-
"course",
|
|
6507
|
-
"class",
|
|
6508
|
-
"workshop",
|
|
6509
|
-
"retreat",
|
|
6510
|
-
"performance"
|
|
6511
|
-
];
|
|
6502
|
+
const eventSurfacePresetValues = SURFACE_EVENT_PRESET_VALUES;
|
|
6512
6503
|
const eventSurfaceScopeValues = [
|
|
6513
6504
|
"all",
|
|
6514
6505
|
"regularClassSchedule",
|
|
@@ -6648,6 +6639,43 @@ function groupItemsByDate(items, accessors) {
|
|
|
6648
6639
|
}
|
|
6649
6640
|
return grouped;
|
|
6650
6641
|
}
|
|
6642
|
+
/**
|
|
6643
|
+
* Canonical responsive ladder for a user-configured column count: 1 column at
|
|
6644
|
+
* base, 2 from `sm`, 3 from `lg` (when the count allows), and the full count
|
|
6645
|
+
* from `xl`. This matches the events blocks' COLUMN_CLASSES ladder — the two
|
|
6646
|
+
* are derived from this single function.
|
|
6647
|
+
*/
|
|
6648
|
+
function gridUserColumnLadder(count) {
|
|
6649
|
+
const capped = Number.isFinite(count) ? Math.max(1, Math.min(4, Math.floor(count))) : 3;
|
|
6650
|
+
const ladder = { base: 1 };
|
|
6651
|
+
if (capped >= 2) ladder.sm = 2;
|
|
6652
|
+
if (capped >= 3) ladder.lg = 3;
|
|
6653
|
+
if (capped >= 4) ladder.xl = capped;
|
|
6654
|
+
return ladder;
|
|
6655
|
+
}
|
|
6656
|
+
/** The ladder as a space-separated `rb-*` utility class string. */
|
|
6657
|
+
function gridUserColumnClasses(count) {
|
|
6658
|
+
const ladder = gridUserColumnLadder(count);
|
|
6659
|
+
return GRID_BREAKPOINTS.flatMap((bp) => {
|
|
6660
|
+
const value = ladder[bp];
|
|
6661
|
+
return typeof value === "number" ? [COL_COUNT_CLASS[bp](value)] : [];
|
|
6662
|
+
}).join(" ");
|
|
6663
|
+
}
|
|
6664
|
+
/** Utility class for a numeric column COUNT at a given breakpoint. */
|
|
6665
|
+
const COL_COUNT_CLASS = {
|
|
6666
|
+
base: (n) => `rb-grid-cols-${n}`,
|
|
6667
|
+
sm: (n) => `rb-sm-grid-cols-${n}`,
|
|
6668
|
+
md: (n) => `rb-md-grid-cols-${n}`,
|
|
6669
|
+
lg: (n) => `rb-lg-grid-cols-${n}`,
|
|
6670
|
+
xl: (n) => `rb-xl-grid-cols-${n}`
|
|
6671
|
+
};
|
|
6672
|
+
const GRID_BREAKPOINTS = [
|
|
6673
|
+
"base",
|
|
6674
|
+
"sm",
|
|
6675
|
+
"md",
|
|
6676
|
+
"lg",
|
|
6677
|
+
"xl"
|
|
6678
|
+
];
|
|
6651
6679
|
//#endregion
|
|
6652
6680
|
//#region ../blocks/src/system/runtime/nodes/events/shared/eventCapacity.ts
|
|
6653
6681
|
/**
|
|
@@ -6898,11 +6926,14 @@ function readAmount(value) {
|
|
|
6898
6926
|
/**
|
|
6899
6927
|
* Shared utility functions for event blocks
|
|
6900
6928
|
*/
|
|
6901
|
-
/**
|
|
6929
|
+
/**
|
|
6930
|
+
* Column class mappings for grid layouts, derived from the canonical
|
|
6931
|
+
* responsive column ladder (see gridUserColumnLadder).
|
|
6932
|
+
*/
|
|
6902
6933
|
const COLUMN_CLASSES = {
|
|
6903
|
-
"2":
|
|
6904
|
-
"3":
|
|
6905
|
-
"4":
|
|
6934
|
+
"2": gridUserColumnClasses(2),
|
|
6935
|
+
"3": gridUserColumnClasses(3),
|
|
6936
|
+
"4": gridUserColumnClasses(4)
|
|
6906
6937
|
};
|
|
6907
6938
|
/**
|
|
6908
6939
|
* Build container class based on layout mode
|
|
@@ -6914,7 +6945,7 @@ function getContainerClass(layout, columns) {
|
|
|
6914
6945
|
if (layout === "compact") return "event-listing-compact-container rb-flex rb-flex-col";
|
|
6915
6946
|
if (layout === "stack") return "rb-flex rb-flex-col rb-gap-6";
|
|
6916
6947
|
const fallbackColumnClass = COLUMN_CLASSES["3"] ?? "";
|
|
6917
|
-
return `rb-grid rb-items-stretch rb-
|
|
6948
|
+
return `rb-grid rb-items-stretch rb-gap-6 ${COLUMN_CLASSES[columns] ?? fallbackColumnClass}`;
|
|
6918
6949
|
}
|
|
6919
6950
|
/**
|
|
6920
6951
|
* Get card orientation based on layout mode
|
|
@@ -7047,6 +7078,22 @@ function formatEventPrice(event) {
|
|
|
7047
7078
|
function formatEventPriceDisplay(pricing) {
|
|
7048
7079
|
return formatEventPricing(pricing, { decimals: "auto" });
|
|
7049
7080
|
}
|
|
7081
|
+
function closedEventBookingLabel(reason) {
|
|
7082
|
+
switch (reason) {
|
|
7083
|
+
case "occurrence_cancelled":
|
|
7084
|
+
case "series_cancelled": return "Cancelled";
|
|
7085
|
+
case "occurrence_completed":
|
|
7086
|
+
case "series_completed": return "Completed";
|
|
7087
|
+
case "series_draft":
|
|
7088
|
+
case "series_archived":
|
|
7089
|
+
case "parent_archived":
|
|
7090
|
+
case "parent_inconsistent":
|
|
7091
|
+
case "not_public":
|
|
7092
|
+
case "already_started":
|
|
7093
|
+
case "enrollment_closed": return "Registration closed";
|
|
7094
|
+
default: return assertNever$2(reason);
|
|
7095
|
+
}
|
|
7096
|
+
}
|
|
7050
7097
|
function resolveEventHref(event) {
|
|
7051
7098
|
const destination = resolveRuntimeEventDestination(event);
|
|
7052
7099
|
return destination.kind === "external" ? destination.url : destination.path;
|
|
@@ -7071,6 +7118,15 @@ function resolveEventCta(event, buttonText) {
|
|
|
7071
7118
|
const defaultButtonText = isExternal ? destination.label : event.bookingScope === "whole_series" ? "Book course" : "Book";
|
|
7072
7119
|
const effectiveButtonText = buttonText ?? defaultButtonText;
|
|
7073
7120
|
const href = resolveEventHref(event);
|
|
7121
|
+
if (event.bookingAvailability.kind === "closed") {
|
|
7122
|
+
const linksToClosedWholeSeriesDetails = event.bookingAvailability.reason === "enrollment_closed" && !isExternal;
|
|
7123
|
+
return {
|
|
7124
|
+
label: closedEventBookingLabel(event.bookingAvailability.reason),
|
|
7125
|
+
href,
|
|
7126
|
+
external: isExternal,
|
|
7127
|
+
hidden: !linksToClosedWholeSeriesDetails
|
|
7128
|
+
};
|
|
7129
|
+
}
|
|
7074
7130
|
if (!isExternal && isSoldOut) return {
|
|
7075
7131
|
label: "Sold out",
|
|
7076
7132
|
href,
|
|
@@ -7078,7 +7134,7 @@ function resolveEventCta(event, buttonText) {
|
|
|
7078
7134
|
hidden: true
|
|
7079
7135
|
};
|
|
7080
7136
|
return {
|
|
7081
|
-
label:
|
|
7137
|
+
label: effectiveButtonText,
|
|
7082
7138
|
href,
|
|
7083
7139
|
external: isExternal,
|
|
7084
7140
|
hidden: false
|
|
@@ -7209,6 +7265,7 @@ const eventCollectionSourceSchemaShape = {
|
|
|
7209
7265
|
showVenue: z.boolean().nullable().optional(),
|
|
7210
7266
|
showMap: z.boolean().nullable().optional(),
|
|
7211
7267
|
showCapacity: z.boolean().nullable().optional(),
|
|
7268
|
+
cardRole: cardRoleSchema.optional(),
|
|
7212
7269
|
buttonVariant: eventButtonVariantSchema.optional(),
|
|
7213
7270
|
buttonText: z.string().optional(),
|
|
7214
7271
|
emptyMessage: z.string().optional(),
|
|
@@ -7236,6 +7293,7 @@ const eventCollectionDisplaySchemaShape = {
|
|
|
7236
7293
|
showVenue: z.boolean(),
|
|
7237
7294
|
showMap: z.boolean(),
|
|
7238
7295
|
showCapacity: z.boolean(),
|
|
7296
|
+
cardRole: cardRoleSchema,
|
|
7239
7297
|
buttonVariant: eventButtonVariantSchema,
|
|
7240
7298
|
buttonText: z.string(),
|
|
7241
7299
|
emptyMessage: z.string()
|
|
@@ -7285,6 +7343,7 @@ function buildEventCollectionPresentationDisplay(source) {
|
|
|
7285
7343
|
showVenue: source.showVenue ?? true,
|
|
7286
7344
|
showMap: source.showMap ?? true,
|
|
7287
7345
|
showCapacity: source.showCapacity ?? true,
|
|
7346
|
+
cardRole: source.cardRole ?? "default",
|
|
7288
7347
|
buttonVariant: source.buttonVariant ?? "primary",
|
|
7289
7348
|
buttonText: source.buttonText ?? "Book",
|
|
7290
7349
|
emptyMessage: source.emptyMessage ?? "No upcoming events scheduled."
|
|
@@ -7310,7 +7369,7 @@ function buildEventCollectionListingDisplay(display, prefetchedEvents, className
|
|
|
7310
7369
|
emptyMessage: display.emptyMessage,
|
|
7311
7370
|
loadingMessage: "Loading events…",
|
|
7312
7371
|
containerClass: getContainerClass(display.listLayout, display.listColumns),
|
|
7313
|
-
|
|
7372
|
+
cardRole: display.cardRole,
|
|
7314
7373
|
buttonVariant: display.buttonVariant,
|
|
7315
7374
|
buttonText: display.buttonText,
|
|
7316
7375
|
showVenue: display.showVenue,
|
|
@@ -7322,8 +7381,6 @@ function buildEventCollectionListingDisplay(display, prefetchedEvents, className
|
|
|
7322
7381
|
}
|
|
7323
7382
|
//#endregion
|
|
7324
7383
|
//#region ../blocks/src/system/runtime/nodes/events/EventListing.interactive.ts
|
|
7325
|
-
const legacyEventCardVariantSchema = z.enum(["variant1", "variant2"]);
|
|
7326
|
-
const eventCardVariantInputSchema = z.union([cardVariantRoleSchema, legacyEventCardVariantSchema]);
|
|
7327
7384
|
const cardOrientationSchema = z.enum(["vertical", "horizontal"]);
|
|
7328
7385
|
const eventSurfaceScopeSchema = z.enum(eventSurfaceScopeValues);
|
|
7329
7386
|
const eventScheduleScopeSchema = z.enum(eventScheduleScopeValues);
|
|
@@ -7338,7 +7395,7 @@ const eventListingSourceSchema = z.object({
|
|
|
7338
7395
|
paginationMode: z.enum(["loadMore", "seeAllLink"]).optional(),
|
|
7339
7396
|
seeAllUrl: z.string().optional(),
|
|
7340
7397
|
loadMoreText: z.string().optional(),
|
|
7341
|
-
|
|
7398
|
+
cardRole: cardRoleSchema.optional(),
|
|
7342
7399
|
buttonVariant: eventButtonVariantSchema.optional(),
|
|
7343
7400
|
buttonText: z.string().optional(),
|
|
7344
7401
|
showVenue: z.boolean().optional(),
|
|
@@ -7360,7 +7417,7 @@ const eventListingDisplaySchema = z.object({
|
|
|
7360
7417
|
emptyMessage: z.string(),
|
|
7361
7418
|
loadingMessage: z.string(),
|
|
7362
7419
|
containerClass: z.string(),
|
|
7363
|
-
|
|
7420
|
+
cardRole: cardRoleSchema,
|
|
7364
7421
|
buttonVariant: eventButtonVariantSchema,
|
|
7365
7422
|
buttonText: z.string(),
|
|
7366
7423
|
showVenue: z.boolean(),
|
|
@@ -7417,7 +7474,7 @@ const eventListingInteractiveIslandPropsCodec = createInteractiveIslandCodec({
|
|
|
7417
7474
|
emptyMessage: source.emptyMessage ?? "No upcoming events scheduled.",
|
|
7418
7475
|
loadingMessage: "Loading events…",
|
|
7419
7476
|
containerClass: getContainerClass(layout, source.columns ?? "3"),
|
|
7420
|
-
|
|
7477
|
+
cardRole: source.cardRole ?? "default",
|
|
7421
7478
|
buttonVariant: source.buttonVariant ?? "primary",
|
|
7422
7479
|
buttonText: source.buttonText ?? "Book",
|
|
7423
7480
|
showVenue: source.showVenue ?? true,
|
|
@@ -7852,6 +7909,104 @@ function createBackgroundOverlayNode(path, className = "background-overlay rb-ab
|
|
|
7852
7909
|
//#endregion
|
|
7853
7910
|
//#region ../blocks/src/system/spacing.ts
|
|
7854
7911
|
/**
|
|
7912
|
+
* Type-safe spacing system for sections and containers.
|
|
7913
|
+
*
|
|
7914
|
+
* This module provides:
|
|
7915
|
+
* - Semantic spacing values (none, compact, cozy, medium, comfortable, spacious)
|
|
7916
|
+
* - Type-safe mappings to CSS class tokens
|
|
7917
|
+
* - Runtime validation via type guards
|
|
7918
|
+
* - Separate handling for section (vertical) vs container (all-sides) spacing
|
|
7919
|
+
*
|
|
7920
|
+
* Type Safety Guarantees:
|
|
7921
|
+
* - Type is derived from data (single source of truth)
|
|
7922
|
+
* - Maps are validated for completeness at compile time
|
|
7923
|
+
* - Runtime validation available via isSemanticSpacing()
|
|
7924
|
+
*/
|
|
7925
|
+
/**
|
|
7926
|
+
* Single source of truth for semantic spacing values.
|
|
7927
|
+
* The SemanticSpacing type is derived from this array to ensure they stay in sync.
|
|
7928
|
+
*
|
|
7929
|
+
* Adding a new spacing value:
|
|
7930
|
+
* 1. Add it to this array
|
|
7931
|
+
* 2. TypeScript will error until you update both spacing maps
|
|
7932
|
+
* 3. No way to get out of sync
|
|
7933
|
+
*/
|
|
7934
|
+
const SEMANTIC_SPACING_VALUES = [
|
|
7935
|
+
"none",
|
|
7936
|
+
"compact",
|
|
7937
|
+
"cozy",
|
|
7938
|
+
"medium",
|
|
7939
|
+
"comfortable",
|
|
7940
|
+
"spacious"
|
|
7941
|
+
];
|
|
7942
|
+
/**
|
|
7943
|
+
* Runtime type guard for validating spacing values.
|
|
7944
|
+
* Use this at system boundaries where data enters from external sources.
|
|
7945
|
+
*
|
|
7946
|
+
* @param value - Unknown value to validate
|
|
7947
|
+
* @returns true if value is a valid SemanticSpacing, with type narrowing
|
|
7948
|
+
*
|
|
7949
|
+
* @example
|
|
7950
|
+
* const userInput = 'medium';
|
|
7951
|
+
* if (isSemanticSpacing(userInput)) {
|
|
7952
|
+
* // TypeScript knows userInput is SemanticSpacing here
|
|
7953
|
+
* const classes = resolveSpacing(userInput, 'y');
|
|
7954
|
+
* }
|
|
7955
|
+
*/
|
|
7956
|
+
function isSemanticSpacing(value) {
|
|
7957
|
+
return typeof value === "string" && SEMANTIC_SPACING_VALUES.includes(value);
|
|
7958
|
+
}
|
|
7959
|
+
/**
|
|
7960
|
+
* Type-safe mapping from semantic spacing to CSS classes for sections (y-axis).
|
|
7961
|
+
*
|
|
7962
|
+
* Sections use vertical padding only to control spacing between blocks.
|
|
7963
|
+
* Horizontal padding (px-6) is handled separately via baseClass.
|
|
7964
|
+
*
|
|
7965
|
+
* The `satisfies` operator ensures all SemanticSpacing values are present at compile time.
|
|
7966
|
+
* TypeScript will error if any spacing value is missing or if extra keys exist.
|
|
7967
|
+
*/
|
|
7968
|
+
const SECTION_SPACING_MAP = {
|
|
7969
|
+
none: "rb-section-pad-none",
|
|
7970
|
+
compact: "rb-section-pad-compact",
|
|
7971
|
+
cozy: "rb-section-pad-cozy",
|
|
7972
|
+
medium: "rb-section-pad-medium",
|
|
7973
|
+
comfortable: "rb-section-pad-comfortable",
|
|
7974
|
+
spacious: "rb-section-pad-spacious"
|
|
7975
|
+
};
|
|
7976
|
+
/**
|
|
7977
|
+
* Type-safe mapping from semantic spacing to CSS classes for containers (all sides).
|
|
7978
|
+
*
|
|
7979
|
+
* Containers use padding on all sides for internal content spacing.
|
|
7980
|
+
*
|
|
7981
|
+
* The `satisfies` operator ensures all SemanticSpacing values are present at compile time.
|
|
7982
|
+
*/
|
|
7983
|
+
const CONTAINER_SPACING_MAP = {
|
|
7984
|
+
none: "rb-container-pad-none",
|
|
7985
|
+
compact: "rb-container-pad-compact",
|
|
7986
|
+
cozy: "rb-container-pad-cozy",
|
|
7987
|
+
medium: "rb-container-pad-medium",
|
|
7988
|
+
comfortable: "rb-container-pad-comfortable",
|
|
7989
|
+
spacious: "rb-container-pad-spacious"
|
|
7990
|
+
};
|
|
7991
|
+
/**
|
|
7992
|
+
* Resolve semantic spacing to CSS classes based on axis.
|
|
7993
|
+
*
|
|
7994
|
+
* This function guarantees that valid SemanticSpacing values always return a result.
|
|
7995
|
+
* Since spacing is typed, there's no need for fallback logic.
|
|
7996
|
+
*
|
|
7997
|
+
* @param spacing - Semantic spacing value (validated at compile time)
|
|
7998
|
+
* @param axis - Which axis to apply padding ('y' for sections, 'all' for containers)
|
|
7999
|
+
* @returns CSS class token string
|
|
8000
|
+
*
|
|
8001
|
+
* @example
|
|
8002
|
+
* resolveSpacing('medium', 'y') // => 'rb-section-pad-medium'
|
|
8003
|
+
* resolveSpacing('medium', 'all') // => 'rb-container-pad-medium'
|
|
8004
|
+
* resolveSpacing('compact') // => 'rb-section-pad-compact' (defaults to 'y' axis)
|
|
8005
|
+
*/
|
|
8006
|
+
function resolveSpacing(spacing, axis = "y") {
|
|
8007
|
+
return (axis === "y" ? SECTION_SPACING_MAP : CONTAINER_SPACING_MAP)[spacing];
|
|
8008
|
+
}
|
|
8009
|
+
/**
|
|
7855
8010
|
* Default spacing value for sections when not explicitly configured.
|
|
7856
8011
|
*/
|
|
7857
8012
|
const DEFAULT_SECTION_SPACING = "medium";
|
|
@@ -9746,6 +9901,22 @@ createBlockManifest({
|
|
|
9746
9901
|
defaultValue: true,
|
|
9747
9902
|
ui: { intent: "display" }
|
|
9748
9903
|
},
|
|
9904
|
+
{
|
|
9905
|
+
id: "showTitle",
|
|
9906
|
+
type: "boolean",
|
|
9907
|
+
label: "Show event title",
|
|
9908
|
+
required: false,
|
|
9909
|
+
defaultValue: false,
|
|
9910
|
+
ui: { intent: "display" }
|
|
9911
|
+
},
|
|
9912
|
+
{
|
|
9913
|
+
id: "showDescription",
|
|
9914
|
+
type: "boolean",
|
|
9915
|
+
label: "Show event description",
|
|
9916
|
+
required: false,
|
|
9917
|
+
defaultValue: false,
|
|
9918
|
+
ui: { intent: "display" }
|
|
9919
|
+
},
|
|
9749
9920
|
{
|
|
9750
9921
|
id: "showMap",
|
|
9751
9922
|
type: "boolean",
|
|
@@ -9782,10 +9953,22 @@ createBlockManifest({
|
|
|
9782
9953
|
{
|
|
9783
9954
|
value: "10",
|
|
9784
9955
|
label: "10 dates"
|
|
9956
|
+
},
|
|
9957
|
+
{
|
|
9958
|
+
value: "all",
|
|
9959
|
+
label: "All dates"
|
|
9785
9960
|
}
|
|
9786
9961
|
],
|
|
9787
9962
|
ui: { intent: "display" }
|
|
9788
9963
|
},
|
|
9964
|
+
{
|
|
9965
|
+
id: "showCapacity",
|
|
9966
|
+
type: "boolean",
|
|
9967
|
+
label: "Show capacity",
|
|
9968
|
+
required: false,
|
|
9969
|
+
defaultValue: false,
|
|
9970
|
+
ui: { intent: "display" }
|
|
9971
|
+
},
|
|
9789
9972
|
{
|
|
9790
9973
|
id: "showCost",
|
|
9791
9974
|
type: "boolean",
|
|
@@ -9828,6 +10011,8 @@ createBlockManifest({
|
|
|
9828
10011
|
} },
|
|
9829
10012
|
events: { $bind: { from: "data.eventDetailsData.events" } },
|
|
9830
10013
|
showVenue: { $bind: { from: "content.showVenue" } },
|
|
10014
|
+
showTitle: { $bind: { from: "content.showTitle" } },
|
|
10015
|
+
showDescription: { $bind: { from: "content.showDescription" } },
|
|
9831
10016
|
showMap: { $bind: { from: "content.showMap" } },
|
|
9832
10017
|
showOtherDates: { $bind: { from: "content.showOtherDates" } },
|
|
9833
10018
|
otherDatesLimit: { $bind: {
|
|
@@ -9838,6 +10023,10 @@ createBlockManifest({
|
|
|
9838
10023
|
from: "content.showCost",
|
|
9839
10024
|
fallback: true
|
|
9840
10025
|
} },
|
|
10026
|
+
showCapacity: { $bind: {
|
|
10027
|
+
from: "content.showCapacity",
|
|
10028
|
+
fallback: false
|
|
10029
|
+
} },
|
|
9841
10030
|
showAcceptedPasses: { $bind: {
|
|
9842
10031
|
from: "content.showAcceptedPasses",
|
|
9843
10032
|
fallback: true
|
|
@@ -9932,6 +10121,9 @@ const eventDetailsIslandSchema = z.object({
|
|
|
9932
10121
|
showOtherDates: z.boolean().optional(),
|
|
9933
10122
|
otherDatesLimit: z.string().optional(),
|
|
9934
10123
|
showCost: z.boolean().optional(),
|
|
10124
|
+
showTitle: z.boolean().optional(),
|
|
10125
|
+
showDescription: z.boolean().optional(),
|
|
10126
|
+
showCapacity: z.boolean().optional(),
|
|
9935
10127
|
showAcceptedPasses: z.boolean().optional(),
|
|
9936
10128
|
showAcceptedMemberships: z.boolean().optional(),
|
|
9937
10129
|
sitePasses: publicPassProductCollectionSchema.nullable().optional(),
|
|
@@ -10240,8 +10432,8 @@ const eventRegistrationHydrationSchemaShape = {
|
|
|
10240
10432
|
occurrenceContext: occurrenceContextSchema.optional(),
|
|
10241
10433
|
subject: eventRegistrationPageSurfaceSubjectSchema.nullable().optional(),
|
|
10242
10434
|
events: z.array(eventRegistrationPublicEventSchema).nullable().optional(),
|
|
10243
|
-
wholeSeriesOfferings:
|
|
10244
|
-
wholeSeriesOffering:
|
|
10435
|
+
wholeSeriesOfferings: publicWholeSeriesOfferingsArraySchema.nullable().optional(),
|
|
10436
|
+
wholeSeriesOffering: publicWholeSeriesOfferingSchema.nullable().optional(),
|
|
10245
10437
|
maxTickets: z.string().optional(),
|
|
10246
10438
|
showVenue: z.boolean().optional(),
|
|
10247
10439
|
showCapacity: z.boolean().optional(),
|
|
@@ -10263,12 +10455,13 @@ const eventRegistrationSourceSchema = z.object({
|
|
|
10263
10455
|
portalToken: z.string().nullable().optional(),
|
|
10264
10456
|
previewToken: z.string().nullable().optional(),
|
|
10265
10457
|
...eventRegistrationHydrationSchemaShape,
|
|
10458
|
+
subjectWholeSeriesOffering: publicWholeSeriesOfferingSchema.nullable().optional(),
|
|
10266
10459
|
className: z.string().nullable().optional(),
|
|
10267
10460
|
buttonText: z.string().nullable().optional(),
|
|
10268
10461
|
maxTickets: z.string().nullable().optional(),
|
|
10269
10462
|
stage: previewStageSchema.optional()
|
|
10270
10463
|
});
|
|
10271
|
-
const eventRegistrationDisplaySchema = z.object({
|
|
10464
|
+
const eventRegistrationDisplaySchema = z.discriminatedUnion("state", [z.object({
|
|
10272
10465
|
kind: z.literal("event-registration"),
|
|
10273
10466
|
state: z.literal("generic-shell"),
|
|
10274
10467
|
className: z.string().nullable(),
|
|
@@ -10276,7 +10469,13 @@ const eventRegistrationDisplaySchema = z.object({
|
|
|
10276
10469
|
bodyText: z.string(),
|
|
10277
10470
|
stepLabels: z.array(z.enum(EVENT_REGISTRATION_SHELL_STEP_LABELS)).min(1),
|
|
10278
10471
|
summaryButtonText: z.string()
|
|
10279
|
-
})
|
|
10472
|
+
}), z.object({
|
|
10473
|
+
kind: z.literal("event-registration"),
|
|
10474
|
+
state: z.literal("registration-closed"),
|
|
10475
|
+
className: z.string().nullable(),
|
|
10476
|
+
titleText: z.string(),
|
|
10477
|
+
bodyText: z.string()
|
|
10478
|
+
})]);
|
|
10280
10479
|
const eventRegistrationHydrationSchema = z.object(eventRegistrationHydrationSchemaShape);
|
|
10281
10480
|
const eventRegistrationRenderSchema = z.object({
|
|
10282
10481
|
display: eventRegistrationDisplaySchema,
|
|
@@ -10291,6 +10490,13 @@ const eventRegistrationIslandMetaCodec = createZodCodec(z.object({
|
|
|
10291
10490
|
}));
|
|
10292
10491
|
const eventRegistrationIslandMetaKeys = defineInteractiveIslandMetaKeys("siteId", "apiBaseUrl", "portalToken", "previewToken", "stage");
|
|
10293
10492
|
function buildEventRegistrationDisplay(source) {
|
|
10493
|
+
if (resolveWholeSeriesOffering(source)?.enrollmentOpen === false) return {
|
|
10494
|
+
kind: "event-registration",
|
|
10495
|
+
state: "registration-closed",
|
|
10496
|
+
className: source.className ?? null,
|
|
10497
|
+
titleText: "Registration closed",
|
|
10498
|
+
bodyText: "This run is no longer open for bookings."
|
|
10499
|
+
};
|
|
10294
10500
|
const stepLabels = buildEventRegistrationShellStepLabels(source);
|
|
10295
10501
|
return {
|
|
10296
10502
|
kind: "event-registration",
|
|
@@ -10302,6 +10508,9 @@ function buildEventRegistrationDisplay(source) {
|
|
|
10302
10508
|
summaryButtonText: source.buttonText?.trim() || "Register"
|
|
10303
10509
|
};
|
|
10304
10510
|
}
|
|
10511
|
+
function resolveWholeSeriesOffering(source) {
|
|
10512
|
+
return source.wholeSeriesOffering ?? source.subjectWholeSeriesOffering ?? null;
|
|
10513
|
+
}
|
|
10305
10514
|
function buildEventRegistrationShellStepLabels(source) {
|
|
10306
10515
|
const scopedEvents = scopeEventRegistrationEvents(source);
|
|
10307
10516
|
if (scopedEvents.length === 0) return EVENT_REGISTRATION_GENERIC_SHELL_STEP_LABELS;
|
|
@@ -10359,7 +10568,7 @@ const eventRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
|
|
|
10359
10568
|
subject: source.subject ?? null,
|
|
10360
10569
|
events: source.events ?? null,
|
|
10361
10570
|
wholeSeriesOfferings: source.wholeSeriesOfferings ?? null,
|
|
10362
|
-
wholeSeriesOffering: source
|
|
10571
|
+
wholeSeriesOffering: resolveWholeSeriesOffering(source),
|
|
10363
10572
|
maxTickets: source.maxTickets ?? void 0,
|
|
10364
10573
|
showVenue: source.showVenue,
|
|
10365
10574
|
showCapacity: source.showCapacity,
|
|
@@ -11849,4 +12058,4 @@ function defineIslandPropsDecoder(kind) {
|
|
|
11849
12058
|
};
|
|
11850
12059
|
}
|
|
11851
12060
|
//#endregion
|
|
11852
|
-
export {
|
|
12061
|
+
export { resolveEventRegistrationScopedEvents as $, getEventRuntimeFiltersKey as A, formatBookingDate as At, formatTime as B, parseEventPageSurfaceSubject as Bt, getWizardStepsForContext as C, clearWorkflowFeedback as Ct, isSemanticSpacing as D, reportWorkflowError as Dt, SEMANTIC_SPACING_VALUES as E, okWith as Et, formatEventCompactDateRail as F, getBookingLocalDateKey as Ft, resolveEventLinkProps as G, publicEventScalarPrice as Gt, getContainerClass as H, publicEventPricingCurrency as Ht, formatEventDateParts as I, parseBookingLocalDate as It, getEventAvailabilityStatus as J, assertNever$2 as Jt, resolveRuntimeEventPricing as K, publicEventTicketTypes as Kt, formatEventPrice as L, resolveBookingTimeZoneId as Lt, normalizeCsvString as M, formatBookingInstant as Mt, normalizeOptionalId as N, formatBookingTime as Nt, resolveSpacing as O, reportWorkflowSuccess as Ot, formatDate as P, formatLocalScheduleDate as Pt, isRecord$3 as Q, formatEventPriceDisplay as R, toBookingTimeZone as Rt, getStepNumber as S, assertNever$1 as St, staticHeaderChromeRuntime as T, ok as Tt, groupEventsByDate as U, publicEventPricingMode as Ut, getCardOrientation as V, formatBookingPriceDisplay as Vt, resolveEventCta as W, publicEventPricingType as Wt, getLocalMinuteOfDay as X, getLocalDateKey as Y, RichTextDocSchema as Z, findPreSelectedEvent as _, resolveBookingPaymentStep as _t, buildProductDetailDisplay as a, normalizeCardRole as at, resolveRegistrationTarget as b, toSelectedCollectionOptionKind as bt, EMPTY_COMMERCE_CART_STATE as c, formatBookingCentsAsCurrencyInput as ct, deriveCommerceCheckoutState as d, getBookingServiceSlidingScale as dt, themeButtonClassName as et, parseStoredCommerceCartState as f, getBookingSuccessMessage as ft, findEventByOccurrenceId as g, resolveAppointmentCheckoutVerificationState as gt, toRegistrationEvents as h, prepareBookingSubmission as ht, buildProductCardDisplay as i, resolveTokenOrCssColorValue as it, normalizeCsvIds as j, formatBookingDateTime as jt, buildEventRuntimeFilters as k, addLocalScheduleDays as kt, buildPassCartItem as l, formatBookingSubmissionPreparationError as lt, reduceCommerceCart as m, parseBookingCurrencyInputToCents as mt, getShopDisplayForItems as n, isCssColorLiteral as nt, formatCommercePrice as o, logger as ot, productItemKey as p, isBookingServiceSlidingAmountInRange as pt, getEventAvailability as q, formatCurrencyAmount as qt, buildCartDisplay as r, resolveOnColorForThemeToken as rt, formatInterval as s, deriveBookingFormViewState as st, defineIslandPropsDecoder as t, boxBackgroundSchema as tt, buildProductCartItem as u, getBookingRedirectStateFromLocation as ut, resolveDiscountContext as v, resolveBookingSiteId as vt, buildEventCalendarListingRender as w, err as wt, WIZARD_STEPS as x, BOOKING_FORM_DATA_RESERVED_KEYS as xt, resolveEventRequiresPayment as y, resolveDefaultBookingServiceId as yt, formatEventTeacherLine as z, toScheduledBookingDateTime as zt };
|