@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
package/dist/server/theme.mjs
CHANGED
|
@@ -312,6 +312,25 @@ const nonShadeablePaletteRoleNames = /* @__PURE__ */ new Set([
|
|
|
312
312
|
"warning",
|
|
313
313
|
"destructive"
|
|
314
314
|
]);
|
|
315
|
+
/**
|
|
316
|
+
* Status role aliases the persisted palette does not carry itself.
|
|
317
|
+
*
|
|
318
|
+
* Generators reference `--tb-error` (the site-style-owned input error border)
|
|
319
|
+
* and `--tb-info` (`.alert-info`, `.status-info`, the field-note rule), but the
|
|
320
|
+
* palette schema only defines `destructive` and has no `info` role at all.
|
|
321
|
+
* Without these aliases those declarations name variables that are never
|
|
322
|
+
* defined and browsers drop them. The SDK bridge resolves the same pair via
|
|
323
|
+
* TOKEN_ALIASES, so both runtimes agree on what a status token means.
|
|
324
|
+
*
|
|
325
|
+
* Runs after the danger → destructive promotion above, so `destructive` is
|
|
326
|
+
* already the single source of truth for the error colour.
|
|
327
|
+
*/
|
|
328
|
+
function statusAliasTokens(expanded) {
|
|
329
|
+
const aliases = {};
|
|
330
|
+
if (expanded.destructive) aliases.error = expanded.destructive;
|
|
331
|
+
if (expanded.accent) aliases.info = expanded.accent;
|
|
332
|
+
return aliases;
|
|
333
|
+
}
|
|
315
334
|
function expandPalette(palette) {
|
|
316
335
|
const base = colorsToMap(palette);
|
|
317
336
|
const expanded = { ...base };
|
|
@@ -330,6 +349,7 @@ function expandPalette(palette) {
|
|
|
330
349
|
}
|
|
331
350
|
if (base.text) expanded.body = base.text;
|
|
332
351
|
if (base.danger && !base.destructive) expanded.destructive = base.danger;
|
|
352
|
+
Object.assign(expanded, statusAliasTokens(expanded));
|
|
333
353
|
const isDark = base.background ? isBackgroundDark(base.background) : false;
|
|
334
354
|
expanded.mutedText = palette.meta?.mode === "dark" || isDark ? expanded["neutral-600"] ?? "#666" : expanded["neutral-500"] ?? "#888";
|
|
335
355
|
for (const [token, hex] of Object.entries({ ...expanded })) {
|
|
@@ -763,6 +783,12 @@ const opaqueButtonColourTokenSchema = themeColorTokenSchema.refine((value) => pa
|
|
|
763
783
|
if (token === null) throw new Error("Invariant: opaque button token passed its schema");
|
|
764
784
|
return token;
|
|
765
785
|
});
|
|
786
|
+
const contextualButtonHoverSchema = z.strictObject({
|
|
787
|
+
kind: z.literal("shade-shift"),
|
|
788
|
+
seedToken: opaqueButtonColourTokenSchema,
|
|
789
|
+
fallbackDirection: z.enum(["lighter", "darker"]),
|
|
790
|
+
preferredToken: opaqueButtonColourTokenSchema.optional()
|
|
791
|
+
});
|
|
766
792
|
const buttonShadeAmountSchema = z.number().finite().min(0).max(900).multipleOf(100);
|
|
767
793
|
const buttonShadowIntensitySchema = z.enum([
|
|
768
794
|
"subtle",
|
|
@@ -1102,6 +1128,7 @@ const buttonVariantSchema = z.strictObject({
|
|
|
1102
1128
|
shadow: variantShadowSchema.optional(),
|
|
1103
1129
|
border: buttonBorderSchema.optional(),
|
|
1104
1130
|
hoverBackgroundToken: opaqueButtonColourTokenSchema.optional(),
|
|
1131
|
+
contextualHover: contextualButtonHoverSchema.optional(),
|
|
1105
1132
|
effects: variantEffectsSchema.optional(),
|
|
1106
1133
|
sizes: variantSizeOverridesSchema.optional(),
|
|
1107
1134
|
affordance: buttonVariantAffordanceSchema.optional()
|
|
@@ -1341,6 +1368,139 @@ function validateButtonTextContrast(input) {
|
|
|
1341
1368
|
};
|
|
1342
1369
|
}
|
|
1343
1370
|
//#endregion
|
|
1371
|
+
//#region ../theme-core/src/buttons/contextualHover.ts
|
|
1372
|
+
function resolveContextualHoverPreference(input) {
|
|
1373
|
+
const preferred = input.instruction.preferredToken;
|
|
1374
|
+
if (preferred && isSafeCandidate(preferred, input.palette, input.surface)) return {
|
|
1375
|
+
kind: "resolved",
|
|
1376
|
+
token: preferred,
|
|
1377
|
+
repair: null
|
|
1378
|
+
};
|
|
1379
|
+
const contextual = resolveContextualHover(input);
|
|
1380
|
+
return contextual.kind === "resolved" ? {
|
|
1381
|
+
kind: "resolved",
|
|
1382
|
+
token: contextual.token,
|
|
1383
|
+
repair: preferred ? {
|
|
1384
|
+
kind: "preferred-token-replaced",
|
|
1385
|
+
preferredToken: preferred,
|
|
1386
|
+
contextualToken: contextual.token
|
|
1387
|
+
} : null
|
|
1388
|
+
} : contextual;
|
|
1389
|
+
}
|
|
1390
|
+
/**
|
|
1391
|
+
* Resolves semantic shade movement from real palette steps. The persisted
|
|
1392
|
+
* instruction owns the colour family and deterministic unknown-surface
|
|
1393
|
+
* fallback; a proven surface may select the opposite direction when it gives
|
|
1394
|
+
* the button stronger separation while retaining the shared contrast contract.
|
|
1395
|
+
*/
|
|
1396
|
+
function resolveContextualHover(input) {
|
|
1397
|
+
const candidates = shadeCandidates(input.instruction.seedToken, input.palette);
|
|
1398
|
+
if (candidates.length === 0) return {
|
|
1399
|
+
kind: "unavailable",
|
|
1400
|
+
reason: "no-distinct-shade"
|
|
1401
|
+
};
|
|
1402
|
+
const textSafe = candidates.filter((candidate) => hasSafeTextContrast(candidate.token, input.palette));
|
|
1403
|
+
if (textSafe.length === 0) return {
|
|
1404
|
+
kind: "unavailable",
|
|
1405
|
+
reason: "no-text-safe-candidate"
|
|
1406
|
+
};
|
|
1407
|
+
if (!input.surface) {
|
|
1408
|
+
const selected = textSafe.find((candidate) => candidate.direction === input.instruction.fallbackDirection) ?? textSafe[0];
|
|
1409
|
+
return selected ? {
|
|
1410
|
+
kind: "resolved",
|
|
1411
|
+
token: selected.token,
|
|
1412
|
+
direction: selected.direction,
|
|
1413
|
+
evidence: "fallback-direction"
|
|
1414
|
+
} : {
|
|
1415
|
+
kind: "unavailable",
|
|
1416
|
+
reason: "no-text-safe-candidate"
|
|
1417
|
+
};
|
|
1418
|
+
}
|
|
1419
|
+
const selected = textSafe.map((candidate) => ({
|
|
1420
|
+
...candidate,
|
|
1421
|
+
surfaceContrast: contrastRatio(input.palette[candidate.token] ?? "", input.surface?.backgroundHex ?? "")
|
|
1422
|
+
})).filter((candidate) => candidate.surfaceContrast !== null && candidate.surfaceContrast >= BUTTON_CONTRAST_POLICY.nonTextMinimumRatio).sort((left, right) => {
|
|
1423
|
+
const distanceDifference = left.distance - right.distance;
|
|
1424
|
+
if (distanceDifference !== 0) return distanceDifference;
|
|
1425
|
+
const contrastDifference = (right.surfaceContrast ?? 0) - (left.surfaceContrast ?? 0);
|
|
1426
|
+
if (contrastDifference !== 0) return contrastDifference;
|
|
1427
|
+
if (left.direction === right.direction) return left.token.localeCompare(right.token);
|
|
1428
|
+
return left.direction === input.instruction.fallbackDirection ? -1 : 1;
|
|
1429
|
+
})[0];
|
|
1430
|
+
return selected ? {
|
|
1431
|
+
kind: "resolved",
|
|
1432
|
+
token: selected.token,
|
|
1433
|
+
direction: selected.direction,
|
|
1434
|
+
evidence: "known-surface"
|
|
1435
|
+
} : {
|
|
1436
|
+
kind: "unavailable",
|
|
1437
|
+
reason: "no-surface-safe-candidate"
|
|
1438
|
+
};
|
|
1439
|
+
}
|
|
1440
|
+
function shadeCandidates(seedToken, palette) {
|
|
1441
|
+
const match = String(seedToken).match(/^(.*?)(?:-(\d{2,3}))?$/);
|
|
1442
|
+
const family = match?.[1] ?? String(seedToken);
|
|
1443
|
+
const currentShade = match?.[2] ? Number(match[2]) : 500;
|
|
1444
|
+
const seedHex = palette[seedToken];
|
|
1445
|
+
const shades = Object.keys(palette).flatMap((token) => {
|
|
1446
|
+
const shade = token.match(new RegExp(`^${escapeRegExp(family)}-(\\d{2,3})$`));
|
|
1447
|
+
return shade?.[1] ? [Number(shade[1])] : [];
|
|
1448
|
+
}).filter((shade) => Number.isFinite(shade)).sort((left, right) => left - right);
|
|
1449
|
+
const lower = [...shades].filter((shade) => shade < currentShade).sort((left, right) => right - left);
|
|
1450
|
+
const higher = shades.filter((shade) => shade > currentShade);
|
|
1451
|
+
return [...lower.map((shade) => candidate(family, shade, currentShade, "lighter", seedHex, palette)), ...higher.map((shade) => candidate(family, shade, currentShade, "darker", seedHex, palette))].filter((value) => value !== null);
|
|
1452
|
+
}
|
|
1453
|
+
function candidate(family, shade, currentShade, direction, seedHex, palette) {
|
|
1454
|
+
const token = parseOpaqueButtonColourToken(`${family}-${shade}`);
|
|
1455
|
+
if (token === null) return null;
|
|
1456
|
+
const candidateHex = palette[token];
|
|
1457
|
+
if (!candidateHex || candidateHex === seedHex) return null;
|
|
1458
|
+
return {
|
|
1459
|
+
token,
|
|
1460
|
+
direction,
|
|
1461
|
+
distance: Math.abs(shade - currentShade),
|
|
1462
|
+
surfaceContrast: null
|
|
1463
|
+
};
|
|
1464
|
+
}
|
|
1465
|
+
function hasSafeTextContrast(token, palette) {
|
|
1466
|
+
const background = palette[token];
|
|
1467
|
+
const foreground = palette[onColorTokenName(token)];
|
|
1468
|
+
return typeof background === "string" && typeof foreground === "string" && contrastRatio(background, foreground) >= BUTTON_CONTRAST_POLICY.textMinimumRatio;
|
|
1469
|
+
}
|
|
1470
|
+
function isSafeCandidate(token, palette, surface) {
|
|
1471
|
+
if (!hasSafeTextContrast(token, palette)) return false;
|
|
1472
|
+
return surface ? contrastRatio(palette[token] ?? "", surface.backgroundHex) >= BUTTON_CONTRAST_POLICY.nonTextMinimumRatio : true;
|
|
1473
|
+
}
|
|
1474
|
+
function escapeRegExp(value) {
|
|
1475
|
+
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
1476
|
+
}
|
|
1477
|
+
//#endregion
|
|
1478
|
+
//#region ../theme-core/src/buttons/resolveButtonHoverTreatment.ts
|
|
1479
|
+
function resolveButtonHoverTreatment(input) {
|
|
1480
|
+
if (input.variant.contextualHover) {
|
|
1481
|
+
const contextual = resolveContextualHoverPreference({
|
|
1482
|
+
instruction: input.variant.contextualHover,
|
|
1483
|
+
palette: input.palette,
|
|
1484
|
+
surface: input.surface
|
|
1485
|
+
});
|
|
1486
|
+
if (contextual.kind === "resolved") return {
|
|
1487
|
+
treatment: {
|
|
1488
|
+
type: "solid",
|
|
1489
|
+
colorToken: contextual.token
|
|
1490
|
+
},
|
|
1491
|
+
repair: contextual.repair
|
|
1492
|
+
};
|
|
1493
|
+
}
|
|
1494
|
+
const token = input.variant.hoverBackgroundToken ?? (input.global.hoverColor === "token" ? input.global.hoverColorToken : void 0);
|
|
1495
|
+
return {
|
|
1496
|
+
treatment: token === void 0 ? input.fallback : {
|
|
1497
|
+
type: "solid",
|
|
1498
|
+
colorToken: token
|
|
1499
|
+
},
|
|
1500
|
+
repair: null
|
|
1501
|
+
};
|
|
1502
|
+
}
|
|
1503
|
+
//#endregion
|
|
1344
1504
|
//#region ../theme-core/src/buttons/resolveButtonColourStates.ts
|
|
1345
1505
|
function compileButtonColourStates(input) {
|
|
1346
1506
|
const baseTransition = applyColourEffects({
|
|
@@ -1351,9 +1511,16 @@ function compileButtonColourStates(input) {
|
|
|
1351
1511
|
palette: input.palette
|
|
1352
1512
|
});
|
|
1353
1513
|
if (!baseTransition.ok) return baseTransition;
|
|
1514
|
+
const hover = resolveButtonHoverTreatment({
|
|
1515
|
+
variant: input.variant,
|
|
1516
|
+
global: input.global,
|
|
1517
|
+
fallback: baseTransition.treatment,
|
|
1518
|
+
palette: input.palette,
|
|
1519
|
+
surface: input.surface
|
|
1520
|
+
});
|
|
1354
1521
|
const stateTreatments = {
|
|
1355
1522
|
base: baseTransition.treatment,
|
|
1356
|
-
hover:
|
|
1523
|
+
hover: hover.treatment,
|
|
1357
1524
|
focus: baseTransition.treatment,
|
|
1358
1525
|
active: baseTransition.treatment,
|
|
1359
1526
|
disabled: baseTransition.treatment
|
|
@@ -1392,14 +1559,8 @@ function compileButtonColourStates(input) {
|
|
|
1392
1559
|
ok: true,
|
|
1393
1560
|
states: resolved,
|
|
1394
1561
|
focusIndicator: resolveFocusIndicator(resolved.focus),
|
|
1395
|
-
nonColourEffects
|
|
1396
|
-
|
|
1397
|
-
}
|
|
1398
|
-
function hoverTreatment(variant, global, fallback) {
|
|
1399
|
-
const token = variant.hoverBackgroundToken ?? (global.hoverColor === "token" ? global.hoverColorToken : void 0);
|
|
1400
|
-
return token === void 0 ? fallback : {
|
|
1401
|
-
type: "solid",
|
|
1402
|
-
colorToken: token
|
|
1562
|
+
nonColourEffects,
|
|
1563
|
+
contextualHoverRepair: hover.repair
|
|
1403
1564
|
};
|
|
1404
1565
|
}
|
|
1405
1566
|
function applyColourEffects(input) {
|
|
@@ -1813,13 +1974,7 @@ const tokenOrCssColorValueSchema = z.string();
|
|
|
1813
1974
|
buttonSizeNameSchema.options;
|
|
1814
1975
|
//#endregion
|
|
1815
1976
|
//#region ../theme-core/src/buttons/styles/domain.ts
|
|
1816
|
-
const PUBLIC_BUTTON_ROLES =
|
|
1817
|
-
"primary",
|
|
1818
|
-
"secondary",
|
|
1819
|
-
"outline",
|
|
1820
|
-
"ghost",
|
|
1821
|
-
"accent"
|
|
1822
|
-
];
|
|
1977
|
+
const PUBLIC_BUTTON_ROLES = VARIANT_ROLES;
|
|
1823
1978
|
function defineButtonStyleRecipe(recipe) {
|
|
1824
1979
|
return recipe;
|
|
1825
1980
|
}
|
|
@@ -1915,6 +2070,14 @@ const BUTTON_STYLE_IDS = [
|
|
|
1915
2070
|
"quiet-arrow"
|
|
1916
2071
|
];
|
|
1917
2072
|
const quietArrowParametersSchema = z.object({ secondaryTreatment: z.enum(["outlined", "solid-accent"]) }).strict();
|
|
2073
|
+
const flatInkHoverTreatmentSchema = z.enum([
|
|
2074
|
+
"contextual",
|
|
2075
|
+
"secondary",
|
|
2076
|
+
"accent"
|
|
2077
|
+
]);
|
|
2078
|
+
const flatInkHoverPreferencesShape = Object.fromEntries(VARIANT_ROLES.map((role) => [role, flatInkHoverTreatmentSchema.optional()]));
|
|
2079
|
+
const flatInkHoverPreferencesSchema = z.strictObject(flatInkHoverPreferencesShape);
|
|
2080
|
+
const flatInkParametersSchema = z.strictObject({ hoverPreferences: flatInkHoverPreferencesSchema.optional() });
|
|
1918
2081
|
const emptyParametersSchema$1 = z.object({}).strict();
|
|
1919
2082
|
function selectionBranch(styleId, parameters) {
|
|
1920
2083
|
return z.object({
|
|
@@ -1929,7 +2092,7 @@ z.discriminatedUnion("styleId", [
|
|
|
1929
2092
|
selectionBranch("editorial-link", emptyParametersSchema$1),
|
|
1930
2093
|
selectionBranch("pebble", emptyParametersSchema$1),
|
|
1931
2094
|
selectionBranch("ink-stamp", emptyParametersSchema$1),
|
|
1932
|
-
selectionBranch("flat-ink",
|
|
2095
|
+
selectionBranch("flat-ink", flatInkParametersSchema),
|
|
1933
2096
|
selectionBranch("brushed-wash", emptyParametersSchema$1),
|
|
1934
2097
|
selectionBranch("showtime-pill", emptyParametersSchema$1),
|
|
1935
2098
|
selectionBranch("joy-stamp", emptyParametersSchema$1),
|
|
@@ -2066,6 +2229,189 @@ const quietArrowRecipe = defineButtonStyleRecipe({
|
|
|
2066
2229
|
})
|
|
2067
2230
|
});
|
|
2068
2231
|
//#endregion
|
|
2232
|
+
//#region ../theme-core/src/buttons/styles/recipes/flatInk.ts
|
|
2233
|
+
const contextualRoleConfig = {
|
|
2234
|
+
primary: {
|
|
2235
|
+
contextualSeedToken: unsafeAsOpaqueButtonColourToken("primary"),
|
|
2236
|
+
fallbackDirection: "darker"
|
|
2237
|
+
},
|
|
2238
|
+
secondary: {
|
|
2239
|
+
contextualSeedToken: unsafeAsOpaqueButtonColourToken("surfaceAlt"),
|
|
2240
|
+
fallbackDirection: "darker"
|
|
2241
|
+
},
|
|
2242
|
+
outline: {
|
|
2243
|
+
contextualSeedToken: unsafeAsOpaqueButtonColourToken("surfaceAlt"),
|
|
2244
|
+
fallbackDirection: "darker"
|
|
2245
|
+
},
|
|
2246
|
+
ghost: {
|
|
2247
|
+
contextualSeedToken: unsafeAsOpaqueButtonColourToken("surfaceAlt"),
|
|
2248
|
+
fallbackDirection: "darker"
|
|
2249
|
+
},
|
|
2250
|
+
accent: {
|
|
2251
|
+
contextualSeedToken: unsafeAsOpaqueButtonColourToken("accent"),
|
|
2252
|
+
fallbackDirection: "darker"
|
|
2253
|
+
}
|
|
2254
|
+
};
|
|
2255
|
+
const hoverControl = {
|
|
2256
|
+
kind: "button-hover-by-role",
|
|
2257
|
+
parameter: "hoverPreferences",
|
|
2258
|
+
label: "Button hover",
|
|
2259
|
+
roles: contextualRoleConfig,
|
|
2260
|
+
options: [
|
|
2261
|
+
{
|
|
2262
|
+
value: "contextual",
|
|
2263
|
+
label: "Contextual shade shift"
|
|
2264
|
+
},
|
|
2265
|
+
{
|
|
2266
|
+
value: "secondary",
|
|
2267
|
+
label: "Secondary button colour"
|
|
2268
|
+
},
|
|
2269
|
+
{
|
|
2270
|
+
value: "accent",
|
|
2271
|
+
label: "Accent button colour"
|
|
2272
|
+
}
|
|
2273
|
+
]
|
|
2274
|
+
};
|
|
2275
|
+
const lift = { effectId: "lift" };
|
|
2276
|
+
const flatInkRecipe = defineButtonStyleRecipe({
|
|
2277
|
+
id: "flat-ink",
|
|
2278
|
+
accessibilityLabel: "Flat rounded buttons with arrow affordances",
|
|
2279
|
+
tags: {
|
|
2280
|
+
tone: "classic",
|
|
2281
|
+
energy: "calm",
|
|
2282
|
+
motion: "subtle",
|
|
2283
|
+
era: "editorial"
|
|
2284
|
+
},
|
|
2285
|
+
parameterSchema: flatInkParametersSchema,
|
|
2286
|
+
defaultParameters: {},
|
|
2287
|
+
controls: [hoverControl],
|
|
2288
|
+
defineSystem: (parameters) => ({
|
|
2289
|
+
global: {
|
|
2290
|
+
cornerStyle: "rounded",
|
|
2291
|
+
textTransform: "none",
|
|
2292
|
+
fontWeight: 600,
|
|
2293
|
+
typography: "body",
|
|
2294
|
+
letterSpacing: "tight",
|
|
2295
|
+
paddingPreset: "default",
|
|
2296
|
+
hoverTransform: "lift",
|
|
2297
|
+
hoverColor: "none"
|
|
2298
|
+
},
|
|
2299
|
+
sizes: {
|
|
2300
|
+
sm: {
|
|
2301
|
+
padding: "0.625rem 1.125rem",
|
|
2302
|
+
fontSize: "text-sm"
|
|
2303
|
+
},
|
|
2304
|
+
md: { padding: "0.8125rem 1.375rem" },
|
|
2305
|
+
lg: {
|
|
2306
|
+
padding: "0.9375rem 1.625rem",
|
|
2307
|
+
fontSize: "text-lg"
|
|
2308
|
+
},
|
|
2309
|
+
xl: {
|
|
2310
|
+
padding: "1.0625rem 2rem",
|
|
2311
|
+
fontSize: "text-xl"
|
|
2312
|
+
}
|
|
2313
|
+
},
|
|
2314
|
+
roles: {
|
|
2315
|
+
primary: {
|
|
2316
|
+
kind: "complete",
|
|
2317
|
+
appearance: {
|
|
2318
|
+
background: {
|
|
2319
|
+
type: "solid",
|
|
2320
|
+
colorToken: unsafeAsOpaqueButtonColourToken("primary")
|
|
2321
|
+
},
|
|
2322
|
+
borderRadius: "rounded-lg",
|
|
2323
|
+
affordance: { iconId: "ArrowRight" },
|
|
2324
|
+
...hoverAppearance("primary", parameters, [lift, {
|
|
2325
|
+
effectId: "background-on-hover",
|
|
2326
|
+
options: { colorToken: unsafeAsOpaqueButtonColourToken("secondary") }
|
|
2327
|
+
}])
|
|
2328
|
+
}
|
|
2329
|
+
},
|
|
2330
|
+
secondary: {
|
|
2331
|
+
kind: "complete",
|
|
2332
|
+
appearance: {
|
|
2333
|
+
background: {
|
|
2334
|
+
type: "surface",
|
|
2335
|
+
role: "link"
|
|
2336
|
+
},
|
|
2337
|
+
borderRadius: "rounded-lg",
|
|
2338
|
+
border: { widthClass: "border" },
|
|
2339
|
+
...hoverAppearance("secondary", parameters, [lift, {
|
|
2340
|
+
effectId: "background-on-hover",
|
|
2341
|
+
options: { colorToken: unsafeAsOpaqueButtonColourToken("surfaceAlt") }
|
|
2342
|
+
}])
|
|
2343
|
+
}
|
|
2344
|
+
},
|
|
2345
|
+
outline: {
|
|
2346
|
+
kind: "complete",
|
|
2347
|
+
appearance: {
|
|
2348
|
+
background: {
|
|
2349
|
+
type: "surface",
|
|
2350
|
+
role: "link"
|
|
2351
|
+
},
|
|
2352
|
+
borderRadius: "rounded-lg",
|
|
2353
|
+
border: { widthClass: "border" },
|
|
2354
|
+
...hoverAppearance("outline", parameters, [lift, {
|
|
2355
|
+
effectId: "background-on-hover",
|
|
2356
|
+
options: { colorToken: unsafeAsOpaqueButtonColourToken("surfaceAlt") }
|
|
2357
|
+
}])
|
|
2358
|
+
}
|
|
2359
|
+
},
|
|
2360
|
+
ghost: {
|
|
2361
|
+
kind: "complete",
|
|
2362
|
+
appearance: {
|
|
2363
|
+
background: {
|
|
2364
|
+
type: "surface",
|
|
2365
|
+
role: "link"
|
|
2366
|
+
},
|
|
2367
|
+
borderRadius: "rounded-lg",
|
|
2368
|
+
...hoverAppearance("ghost", parameters, [lift])
|
|
2369
|
+
}
|
|
2370
|
+
},
|
|
2371
|
+
accent: {
|
|
2372
|
+
kind: "complete",
|
|
2373
|
+
appearance: {
|
|
2374
|
+
background: {
|
|
2375
|
+
type: "solid",
|
|
2376
|
+
colorToken: unsafeAsOpaqueButtonColourToken("accent")
|
|
2377
|
+
},
|
|
2378
|
+
borderRadius: "rounded-lg",
|
|
2379
|
+
affordance: { iconId: "ArrowRight" },
|
|
2380
|
+
...hoverAppearance("accent", parameters, [lift])
|
|
2381
|
+
}
|
|
2382
|
+
}
|
|
2383
|
+
}
|
|
2384
|
+
})
|
|
2385
|
+
});
|
|
2386
|
+
function hoverAppearance(role, parameters, recommended) {
|
|
2387
|
+
const preference = parameters.hoverPreferences?.[role];
|
|
2388
|
+
if (preference === void 0) return { effects: { hover: [...recommended] } };
|
|
2389
|
+
if (preference === "contextual") {
|
|
2390
|
+
const config = contextualRoleConfig[role];
|
|
2391
|
+
return {
|
|
2392
|
+
effects: { hover: [lift] },
|
|
2393
|
+
contextualHover: {
|
|
2394
|
+
kind: "shade-shift",
|
|
2395
|
+
seedToken: config.contextualSeedToken,
|
|
2396
|
+
fallbackDirection: config.fallbackDirection
|
|
2397
|
+
}
|
|
2398
|
+
};
|
|
2399
|
+
}
|
|
2400
|
+
const config = contextualRoleConfig[role];
|
|
2401
|
+
return {
|
|
2402
|
+
effects: { hover: [lift] },
|
|
2403
|
+
contextualHover: {
|
|
2404
|
+
kind: "shade-shift",
|
|
2405
|
+
seedToken: config.contextualSeedToken,
|
|
2406
|
+
fallbackDirection: config.fallbackDirection,
|
|
2407
|
+
preferredToken: unsafeAsOpaqueButtonColourToken(paletteRole(preference))
|
|
2408
|
+
}
|
|
2409
|
+
};
|
|
2410
|
+
}
|
|
2411
|
+
function paletteRole(preference) {
|
|
2412
|
+
return preference;
|
|
2413
|
+
}
|
|
2414
|
+
//#endregion
|
|
2069
2415
|
//#region ../theme-core/src/buttons/styles/recipes/defineStaticButtonStyleRecipe.ts
|
|
2070
2416
|
const emptyParametersSchema = z.object({}).strict();
|
|
2071
2417
|
function defineStaticButtonStyleRecipe(input) {
|
|
@@ -2912,113 +3258,6 @@ const inkStampRecipe = defineStaticButtonStyleRecipe({
|
|
|
2912
3258
|
}
|
|
2913
3259
|
}
|
|
2914
3260
|
});
|
|
2915
|
-
const flatInkRecipe = defineStaticButtonStyleRecipe({
|
|
2916
|
-
id: "flat-ink",
|
|
2917
|
-
accessibilityLabel: "Flat rounded buttons with arrow affordances",
|
|
2918
|
-
tags: {
|
|
2919
|
-
tone: "classic",
|
|
2920
|
-
energy: "calm",
|
|
2921
|
-
motion: "subtle",
|
|
2922
|
-
era: "editorial"
|
|
2923
|
-
},
|
|
2924
|
-
system: {
|
|
2925
|
-
global: {
|
|
2926
|
-
cornerStyle: "rounded",
|
|
2927
|
-
textTransform: "none",
|
|
2928
|
-
fontWeight: 600,
|
|
2929
|
-
typography: "body",
|
|
2930
|
-
letterSpacing: "tight",
|
|
2931
|
-
paddingPreset: "default",
|
|
2932
|
-
hoverTransform: "lift",
|
|
2933
|
-
hoverColor: "none"
|
|
2934
|
-
},
|
|
2935
|
-
sizes: {
|
|
2936
|
-
sm: {
|
|
2937
|
-
padding: "0.625rem 1.125rem",
|
|
2938
|
-
fontSize: "text-sm"
|
|
2939
|
-
},
|
|
2940
|
-
md: { padding: "0.8125rem 1.375rem" },
|
|
2941
|
-
lg: {
|
|
2942
|
-
padding: "0.9375rem 1.625rem",
|
|
2943
|
-
fontSize: "text-lg"
|
|
2944
|
-
},
|
|
2945
|
-
xl: {
|
|
2946
|
-
padding: "1.0625rem 2rem",
|
|
2947
|
-
fontSize: "text-xl"
|
|
2948
|
-
}
|
|
2949
|
-
},
|
|
2950
|
-
roles: {
|
|
2951
|
-
primary: {
|
|
2952
|
-
kind: "complete",
|
|
2953
|
-
appearance: {
|
|
2954
|
-
background: {
|
|
2955
|
-
type: "solid",
|
|
2956
|
-
colorToken: "primary"
|
|
2957
|
-
},
|
|
2958
|
-
borderRadius: "rounded-lg",
|
|
2959
|
-
affordance: { iconId: "ArrowRight" },
|
|
2960
|
-
effects: { hover: [{ effectId: "lift" }, {
|
|
2961
|
-
effectId: "background-on-hover",
|
|
2962
|
-
options: { colorToken: unsafeAsOpaqueButtonColourToken("secondary") }
|
|
2963
|
-
}] }
|
|
2964
|
-
}
|
|
2965
|
-
},
|
|
2966
|
-
secondary: {
|
|
2967
|
-
kind: "complete",
|
|
2968
|
-
appearance: {
|
|
2969
|
-
background: {
|
|
2970
|
-
type: "surface",
|
|
2971
|
-
role: "link"
|
|
2972
|
-
},
|
|
2973
|
-
borderRadius: "rounded-lg",
|
|
2974
|
-
border: { widthClass: "border" },
|
|
2975
|
-
effects: { hover: [{ effectId: "lift" }, {
|
|
2976
|
-
effectId: "background-on-hover",
|
|
2977
|
-
options: { colorToken: unsafeAsOpaqueButtonColourToken("surfaceAlt") }
|
|
2978
|
-
}] }
|
|
2979
|
-
}
|
|
2980
|
-
},
|
|
2981
|
-
outline: {
|
|
2982
|
-
kind: "complete",
|
|
2983
|
-
appearance: {
|
|
2984
|
-
background: {
|
|
2985
|
-
type: "surface",
|
|
2986
|
-
role: "link"
|
|
2987
|
-
},
|
|
2988
|
-
borderRadius: "rounded-lg",
|
|
2989
|
-
border: { widthClass: "border" },
|
|
2990
|
-
effects: { hover: [{ effectId: "lift" }, {
|
|
2991
|
-
effectId: "background-on-hover",
|
|
2992
|
-
options: { colorToken: unsafeAsOpaqueButtonColourToken("surfaceAlt") }
|
|
2993
|
-
}] }
|
|
2994
|
-
}
|
|
2995
|
-
},
|
|
2996
|
-
ghost: {
|
|
2997
|
-
kind: "complete",
|
|
2998
|
-
appearance: {
|
|
2999
|
-
background: {
|
|
3000
|
-
type: "surface",
|
|
3001
|
-
role: "link"
|
|
3002
|
-
},
|
|
3003
|
-
borderRadius: "rounded-lg",
|
|
3004
|
-
effects: { hover: [{ effectId: "lift" }] }
|
|
3005
|
-
}
|
|
3006
|
-
},
|
|
3007
|
-
accent: {
|
|
3008
|
-
kind: "complete",
|
|
3009
|
-
appearance: {
|
|
3010
|
-
background: {
|
|
3011
|
-
type: "solid",
|
|
3012
|
-
colorToken: "accent"
|
|
3013
|
-
},
|
|
3014
|
-
borderRadius: "rounded-lg",
|
|
3015
|
-
affordance: { iconId: "ArrowRight" },
|
|
3016
|
-
effects: { hover: [{ effectId: "lift" }] }
|
|
3017
|
-
}
|
|
3018
|
-
}
|
|
3019
|
-
}
|
|
3020
|
-
}
|
|
3021
|
-
});
|
|
3022
3261
|
const showtimePillRecipe = defineStaticButtonStyleRecipe({
|
|
3023
3262
|
id: "showtime-pill",
|
|
3024
3263
|
accessibilityLabel: "Bold uppercase pill buttons with playful movement",
|
|
@@ -3433,6 +3672,26 @@ function presetCategory(recipe) {
|
|
|
3433
3672
|
//#region ../theme-core/src/cards/types.ts
|
|
3434
3673
|
const cardVariantRoleValues = ["default", "alternative"];
|
|
3435
3674
|
const boxlessCardVariantValue = "none";
|
|
3675
|
+
const openCardRoleValue = "open";
|
|
3676
|
+
/**
|
|
3677
|
+
* The roles a site style implements with an actual card variant. `none` is
|
|
3678
|
+
* deliberately absent: it is a role value only, never a variant.
|
|
3679
|
+
*/
|
|
3680
|
+
const surfaceCardRoleValues = [...cardVariantRoleValues, openCardRoleValue];
|
|
3681
|
+
/**
|
|
3682
|
+
* The closed role vocabulary Looks and blocks use for surfaced and boxless
|
|
3683
|
+
* card choices.
|
|
3684
|
+
*
|
|
3685
|
+
* - `none` — no site-style card surface; the block's own composition and
|
|
3686
|
+
* the author's own card fields govern the item. This is *not*
|
|
3687
|
+
* a promise of visible boxlessness: a block whose base class
|
|
3688
|
+
* draws a border still draws one. It says the Look is not
|
|
3689
|
+
* asking the site style for a card.
|
|
3690
|
+
* - `open` — boxless but marked (a rule or accent edge, no enclosing box)
|
|
3691
|
+
* - `default` — the site's quiet everyday card
|
|
3692
|
+
* - `alternative` — the statement card carrying the site's personality
|
|
3693
|
+
*/
|
|
3694
|
+
const cardRoleValues = [...surfaceCardRoleValues, boxlessCardVariantValue];
|
|
3436
3695
|
const cardSpacingSchema = z.enum([
|
|
3437
3696
|
"none",
|
|
3438
3697
|
"compact",
|
|
@@ -3441,6 +3700,17 @@ const cardSpacingSchema = z.enum([
|
|
|
3441
3700
|
"comfortable",
|
|
3442
3701
|
"spacious"
|
|
3443
3702
|
]);
|
|
3703
|
+
/** Per-axis padding, for boxless cards whose inline padding differs from block. */
|
|
3704
|
+
const cardSpacingAxesSchema = z.object({
|
|
3705
|
+
block: cardSpacingSchema,
|
|
3706
|
+
inline: cardSpacingSchema
|
|
3707
|
+
});
|
|
3708
|
+
/**
|
|
3709
|
+
* A card's content padding: one value for both axes, or one per axis. Two
|
|
3710
|
+
* fields would let a variant say both and leave the reader to guess, so this is
|
|
3711
|
+
* a union — the legacy `spacingAxes` key is lifted into it on parse.
|
|
3712
|
+
*/
|
|
3713
|
+
const cardSpacingValueSchema = z.union([cardSpacingSchema, cardSpacingAxesSchema]);
|
|
3444
3714
|
const gradientDirectionSchema = z.enum([
|
|
3445
3715
|
"to-r",
|
|
3446
3716
|
"to-l",
|
|
@@ -3452,7 +3722,21 @@ const gradientDirectionSchema = z.enum([
|
|
|
3452
3722
|
"to-bl"
|
|
3453
3723
|
]);
|
|
3454
3724
|
z.enum(cardVariantRoleValues);
|
|
3455
|
-
const
|
|
3725
|
+
const surfaceCardRoleSchema = z.enum(surfaceCardRoleValues);
|
|
3726
|
+
const cardRoleSchema = z.enum(cardRoleValues);
|
|
3727
|
+
const PRIORITY_ROLE_INFERENCE = {
|
|
3728
|
+
1: "default",
|
|
3729
|
+
2: "alternative"
|
|
3730
|
+
};
|
|
3731
|
+
/**
|
|
3732
|
+
* Role inference for legacy card systems authored before variants carried a
|
|
3733
|
+
* `role`. Priority 1 is the everyday card, priority 2 the statement card —
|
|
3734
|
+
* which is how variants are surfaced today. `open` is never inferred: a site
|
|
3735
|
+
* style has to opt into it.
|
|
3736
|
+
*/
|
|
3737
|
+
function inferCardVariantRoleFromPriority(priority) {
|
|
3738
|
+
return PRIORITY_ROLE_INFERENCE[priority] ?? null;
|
|
3739
|
+
}
|
|
3456
3740
|
const cardBackgroundSchema = z.discriminatedUnion("type", [
|
|
3457
3741
|
z.object({
|
|
3458
3742
|
type: z.literal("solid"),
|
|
@@ -3478,17 +3762,19 @@ const cardCornerValueSchema = z.enum([
|
|
|
3478
3762
|
"pill",
|
|
3479
3763
|
"expressive"
|
|
3480
3764
|
]);
|
|
3765
|
+
const cardEdgeSchema = z.enum([
|
|
3766
|
+
"left",
|
|
3767
|
+
"top",
|
|
3768
|
+
"right",
|
|
3769
|
+
"bottom"
|
|
3770
|
+
]);
|
|
3481
3771
|
/**
|
|
3482
|
-
*
|
|
3483
|
-
*
|
|
3772
|
+
* Legacy single accented card edge (e.g. a left accent bar). Persisted and
|
|
3773
|
+
* curated data may still carry it; it lifts into a one-element `decorations`
|
|
3774
|
+
* list at the parse boundary and has no representation after that.
|
|
3484
3775
|
*/
|
|
3485
3776
|
const cardAccentEdgeSchema = z.object({
|
|
3486
|
-
edge:
|
|
3487
|
-
"left",
|
|
3488
|
-
"top",
|
|
3489
|
-
"right",
|
|
3490
|
-
"bottom"
|
|
3491
|
-
]),
|
|
3777
|
+
edge: cardEdgeSchema,
|
|
3492
3778
|
colorToken: themeColorTokenSchema,
|
|
3493
3779
|
width: z.enum([
|
|
3494
3780
|
"thin",
|
|
@@ -3497,13 +3783,43 @@ const cardAccentEdgeSchema = z.object({
|
|
|
3497
3783
|
"heavy"
|
|
3498
3784
|
])
|
|
3499
3785
|
});
|
|
3786
|
+
/** `hairline` (1px) is the widening the boxless `open` role needs. */
|
|
3787
|
+
const cardEdgeRuleWidthSchema = z.enum([
|
|
3788
|
+
"hairline",
|
|
3789
|
+
"thin",
|
|
3790
|
+
"medium",
|
|
3791
|
+
"thick",
|
|
3792
|
+
"heavy"
|
|
3793
|
+
]);
|
|
3794
|
+
const cardEdgeRuleLengthSchema = z.enum(["full", "short"]);
|
|
3795
|
+
const cardEdgeRuleAlignSchema = z.enum([
|
|
3796
|
+
"start",
|
|
3797
|
+
"center",
|
|
3798
|
+
"end"
|
|
3799
|
+
]);
|
|
3800
|
+
/**
|
|
3801
|
+
* Decorations are edge rules today. The alias exists so the list can grow into
|
|
3802
|
+
* a discriminated union without every call site changing.
|
|
3803
|
+
*/
|
|
3804
|
+
const cardDecorationSchema = z.object({
|
|
3805
|
+
edge: cardEdgeSchema,
|
|
3806
|
+
colorToken: themeColorTokenSchema,
|
|
3807
|
+
width: cardEdgeRuleWidthSchema,
|
|
3808
|
+
/** Defaults to `full`. */
|
|
3809
|
+
length: cardEdgeRuleLengthSchema.optional(),
|
|
3810
|
+
/** Where a `short` rule sits along its edge. Defaults to `start`. */
|
|
3811
|
+
align: cardEdgeRuleAlignSchema.optional(),
|
|
3812
|
+
/** Opacity applied to `colorToken`, 0–1. Scoped here, not on the token. */
|
|
3813
|
+
alpha: z.number().min(0).max(1).optional()
|
|
3814
|
+
});
|
|
3815
|
+
const cardDecorationsSchema = z.array(cardDecorationSchema).max(2);
|
|
3500
3816
|
const cardCornerRadiiSchema = z.object({
|
|
3501
3817
|
topLeft: cardCornerValueSchema.optional(),
|
|
3502
3818
|
topRight: cardCornerValueSchema.optional(),
|
|
3503
3819
|
bottomLeft: cardCornerValueSchema.optional(),
|
|
3504
3820
|
bottomRight: cardCornerValueSchema.optional()
|
|
3505
3821
|
});
|
|
3506
|
-
const
|
|
3822
|
+
const cardVariantInputSchema = z.object({
|
|
3507
3823
|
id: z.string(),
|
|
3508
3824
|
name: z.string().min(1).max(20),
|
|
3509
3825
|
enabled: z.boolean(),
|
|
@@ -3512,8 +3828,10 @@ const cardVariantSchema = z.object({
|
|
|
3512
3828
|
z.literal(2),
|
|
3513
3829
|
z.literal(3)
|
|
3514
3830
|
]),
|
|
3831
|
+
role: surfaceCardRoleSchema.optional(),
|
|
3515
3832
|
background: cardBackgroundSchema,
|
|
3516
|
-
spacing:
|
|
3833
|
+
spacing: cardSpacingValueSchema,
|
|
3834
|
+
spacingAxes: cardSpacingAxesSchema.optional(),
|
|
3517
3835
|
foregroundToken: themeColorTokenSchema.optional(),
|
|
3518
3836
|
shadow: z.object({
|
|
3519
3837
|
elevation: z.enum([
|
|
@@ -3537,9 +3855,91 @@ const cardVariantSchema = z.object({
|
|
|
3537
3855
|
]).optional(),
|
|
3538
3856
|
cornerRadii: cardCornerRadiiSchema.optional(),
|
|
3539
3857
|
border: cardBorderSchema.optional(),
|
|
3858
|
+
decorations: cardDecorationsSchema.optional(),
|
|
3540
3859
|
accentEdge: cardAccentEdgeSchema.optional()
|
|
3541
3860
|
});
|
|
3542
|
-
|
|
3861
|
+
/**
|
|
3862
|
+
* Lift a legacy `accentEdge` into the decoration list. The old emitter reset
|
|
3863
|
+
* `border: 0` implicitly whenever an accent edge was present; conversion drops
|
|
3864
|
+
* the border instead, so the output is unchanged and the data says so.
|
|
3865
|
+
*/
|
|
3866
|
+
function normalizeLegacyAccentEdge(variant) {
|
|
3867
|
+
const { accentEdge, ...rest } = normalizeLegacySpacingAxes(variant);
|
|
3868
|
+
if (!accentEdge) return rest;
|
|
3869
|
+
const { border: _droppedByAccentEdgeReset, ...withoutBorder } = rest;
|
|
3870
|
+
return {
|
|
3871
|
+
...withoutBorder,
|
|
3872
|
+
decorations: [{
|
|
3873
|
+
...accentEdge,
|
|
3874
|
+
length: "full"
|
|
3875
|
+
}]
|
|
3876
|
+
};
|
|
3877
|
+
}
|
|
3878
|
+
/**
|
|
3879
|
+
* Lift a legacy `spacingAxes` into `spacing`. It always won over the flat value
|
|
3880
|
+
* when both were set, so the lift preserves the emitted padding exactly.
|
|
3881
|
+
*/
|
|
3882
|
+
function normalizeLegacySpacingAxes(variant) {
|
|
3883
|
+
const { spacingAxes, ...rest } = variant;
|
|
3884
|
+
return spacingAxes ? {
|
|
3885
|
+
...rest,
|
|
3886
|
+
spacing: spacingAxes
|
|
3887
|
+
} : variant;
|
|
3888
|
+
}
|
|
3889
|
+
function validateSingleDecorationSource(variant, ctx) {
|
|
3890
|
+
if (!variant.accentEdge || !variant.decorations) return;
|
|
3891
|
+
ctx.addIssue({
|
|
3892
|
+
code: "custom",
|
|
3893
|
+
path: ["decorations"],
|
|
3894
|
+
message: "A card variant carries either the legacy `accentEdge` or `decorations`, never both."
|
|
3895
|
+
});
|
|
3896
|
+
}
|
|
3897
|
+
const cardVariantSchema = cardVariantInputSchema.superRefine(validateSingleDecorationSource).transform(normalizeLegacyAccentEdge);
|
|
3898
|
+
/**
|
|
3899
|
+
* Fill in roles for legacy systems whose variants declare none. Inference is
|
|
3900
|
+
* collision-tolerant on purpose: first claimant wins and a later variant that
|
|
3901
|
+
* would infer a taken role simply gets no role. Legacy data is not obliged to
|
|
3902
|
+
* be well-formed, and a card system that fails to parse takes the whole theme
|
|
3903
|
+
* down with it.
|
|
3904
|
+
*/
|
|
3905
|
+
function withInferredRoles(variants) {
|
|
3906
|
+
const claimed = new Set(variants.flatMap((variant) => variant.role ? [variant.role] : []));
|
|
3907
|
+
return variants.map((variant) => {
|
|
3908
|
+
if (variant.role) return variant;
|
|
3909
|
+
const inferred = inferCardVariantRoleFromPriority(variant.priority);
|
|
3910
|
+
if (!inferred || claimed.has(inferred)) return variant;
|
|
3911
|
+
claimed.add(inferred);
|
|
3912
|
+
return {
|
|
3913
|
+
...variant,
|
|
3914
|
+
role: inferred
|
|
3915
|
+
};
|
|
3916
|
+
});
|
|
3917
|
+
}
|
|
3918
|
+
/**
|
|
3919
|
+
* Only *declared* roles are validated — a site style saying "these two
|
|
3920
|
+
* variants are both the default card" is an authoring error worth rejecting.
|
|
3921
|
+
*/
|
|
3922
|
+
function validateUniqueDeclaredCardVariantRoles(system, ctx) {
|
|
3923
|
+
const declared = /* @__PURE__ */ new Set();
|
|
3924
|
+
system.variants.forEach((variant, index) => {
|
|
3925
|
+
const role = variant.role;
|
|
3926
|
+
if (!role) return;
|
|
3927
|
+
if (declared.has(role)) {
|
|
3928
|
+
ctx.addIssue({
|
|
3929
|
+
code: "custom",
|
|
3930
|
+
path: [
|
|
3931
|
+
"variants",
|
|
3932
|
+
index,
|
|
3933
|
+
"role"
|
|
3934
|
+
],
|
|
3935
|
+
message: `Card role "${role}" is already implemented by another variant.`
|
|
3936
|
+
});
|
|
3937
|
+
return;
|
|
3938
|
+
}
|
|
3939
|
+
declared.add(role);
|
|
3940
|
+
});
|
|
3941
|
+
}
|
|
3942
|
+
const cardSystemSchema = z.object({ variants: z.array(cardVariantSchema).min(1).max(3) }).superRefine(validateUniqueDeclaredCardVariantRoles).transform((system) => ({ variants: withInferredRoles(system.variants) }));
|
|
3543
3943
|
//#endregion
|
|
3544
3944
|
//#region ../theme-core/src/accordions/types.ts
|
|
3545
3945
|
/**
|
|
@@ -4352,6 +4752,58 @@ new Set(themeV2NormalEditorRawStyleFieldNames);
|
|
|
4352
4752
|
[...themeV2RuntimeStyleFieldNames, ...themeV2BlockSpecificRawStyleFieldNames];
|
|
4353
4753
|
const pageDesignEditorBackgroundOverrideOwner = "page-design-editor";
|
|
4354
4754
|
const siteChromeBackgroundOverrideOwner = "site-chrome-editor";
|
|
4755
|
+
//#endregion
|
|
4756
|
+
//#region ../theme-core/src/header/legacyHeaderVariant.ts
|
|
4757
|
+
/**
|
|
4758
|
+
* The header variants the system actually renders.
|
|
4759
|
+
*
|
|
4760
|
+
* Each one has a layout row in the site-header block and a paint target in
|
|
4761
|
+
* `paintTargets.ts`. This is the canonical list: the block transform's variant
|
|
4762
|
+
* class allowlist and the AI theme generator's enum both derive from it, so
|
|
4763
|
+
* they cannot drift.
|
|
4764
|
+
*/
|
|
4765
|
+
const headerVariantValues = [
|
|
4766
|
+
"classic",
|
|
4767
|
+
"centered",
|
|
4768
|
+
"floating"
|
|
4769
|
+
];
|
|
4770
|
+
z.enum(headerVariantValues);
|
|
4771
|
+
/**
|
|
4772
|
+
* Header variant spellings that were once authorable but no longer name a
|
|
4773
|
+
* layout of their own, and the variant they read as now.
|
|
4774
|
+
*
|
|
4775
|
+
* `transparent` was an overlay header with no CSS of its own: everything it
|
|
4776
|
+
* did (transparent root background, overlay content flow) is what `floating`
|
|
4777
|
+
* already does, and it had zero persisted usage in production or locally when
|
|
4778
|
+
* it was retired. It survives here as a one-boundary alias so a theme authored
|
|
4779
|
+
* against the old vocabulary still parses.
|
|
4780
|
+
*
|
|
4781
|
+
* This matters because the theme schema is strict and has no per-field
|
|
4782
|
+
* `.catch()`: an out-of-enum variant fails `themeSchema.safeParse` for the
|
|
4783
|
+
* *whole* theme, which silently swaps the site's theme for
|
|
4784
|
+
* `modernMinimalTheme`. Aliasing here keeps that from happening.
|
|
4785
|
+
*/
|
|
4786
|
+
const legacyHeaderVariants = { transparent: "floating" };
|
|
4787
|
+
const legacyHeaderVariantValues = Object.keys(legacyHeaderVariants);
|
|
4788
|
+
/**
|
|
4789
|
+
* The header variant boundary for themes that go through `themeSchema`:
|
|
4790
|
+
* canonical variants pass through, legacy spellings normalize to the variant
|
|
4791
|
+
* they meant, everything else fails the parse.
|
|
4792
|
+
*
|
|
4793
|
+
* Deliberately an enum plus a transform rather than a `z.preprocess`, so the
|
|
4794
|
+
* schema's *input* type stays an accurate union (the legacy spelling is still
|
|
4795
|
+
* accepted on the wire) instead of widening to `unknown`. `SdkThemeWire` in
|
|
4796
|
+
* `@riverbankcms/api` is `z.input<typeof themeSchema>`, so a widened input here
|
|
4797
|
+
* would leak straight into a public type.
|
|
4798
|
+
*
|
|
4799
|
+
* Not every read of a persisted theme goes through the schema:
|
|
4800
|
+
* `resolveRuntimeTheme` in
|
|
4801
|
+
* `apps/dashboard/src/server/services/sites/runtimeSiteResponse.ts` returns the
|
|
4802
|
+
* raw database JSON asserted as `Theme` with no parse, so a theme still
|
|
4803
|
+
* carrying a legacy spelling reaches the theme editor un-aliased. That gap
|
|
4804
|
+
* predates this alias and is harmless while persisted usage is zero.
|
|
4805
|
+
*/
|
|
4806
|
+
const headerVariantWithLegacyAliasSchema = z.enum([...headerVariantValues, ...legacyHeaderVariantValues]).transform((value) => value in legacyHeaderVariants ? legacyHeaderVariants[value] : value);
|
|
4355
4807
|
const BREAKPOINT_LG = 1024;
|
|
4356
4808
|
const BREAKPOINT_XL = 1280;
|
|
4357
4809
|
const BREAKPOINT_LG_DOWN = BREAKPOINT_LG - 1;
|
|
@@ -4668,15 +5120,7 @@ const cardStylesOverrideSchema = z.object({
|
|
|
4668
5120
|
spacing: semanticSpacingSchema.nullable().optional(),
|
|
4669
5121
|
raised: z.boolean().nullable().optional(),
|
|
4670
5122
|
rounded: boxRoundedSchema.nullable().optional(),
|
|
4671
|
-
|
|
4672
|
-
"accent-quote",
|
|
4673
|
-
"editorial-rule",
|
|
4674
|
-
"soft-panel",
|
|
4675
|
-
"editorial-serif-quote",
|
|
4676
|
-
"editorial-open",
|
|
4677
|
-
"color-blocked"
|
|
4678
|
-
]).nullable().optional(),
|
|
4679
|
-
cardVariant: boxStylesCardVariantSchema.nullable().optional()
|
|
5123
|
+
role: cardRoleSchema.nullable().optional()
|
|
4680
5124
|
});
|
|
4681
5125
|
const blockStyleOverridesSchema = z.object({
|
|
4682
5126
|
sectionStyles: sectionStylesOverrideSchema.nullable().optional(),
|
|
@@ -4781,30 +5225,6 @@ const motion = z.object({
|
|
|
4781
5225
|
]).nullable()
|
|
4782
5226
|
});
|
|
4783
5227
|
z.object({ shape: corners });
|
|
4784
|
-
z.object({
|
|
4785
|
-
elevation: z.enum([
|
|
4786
|
-
"none",
|
|
4787
|
-
"low",
|
|
4788
|
-
"medium",
|
|
4789
|
-
"high"
|
|
4790
|
-
]),
|
|
4791
|
-
border: z.enum([
|
|
4792
|
-
"none",
|
|
4793
|
-
"subtle",
|
|
4794
|
-
"defined"
|
|
4795
|
-
]),
|
|
4796
|
-
shape: corners,
|
|
4797
|
-
headerStyle: z.enum([
|
|
4798
|
-
"plain",
|
|
4799
|
-
"accentBar",
|
|
4800
|
-
"subtleBg"
|
|
4801
|
-
]).nullable(),
|
|
4802
|
-
mediaTreatment: z.enum([
|
|
4803
|
-
"square",
|
|
4804
|
-
"rounded",
|
|
4805
|
-
"bleed"
|
|
4806
|
-
]).nullable()
|
|
4807
|
-
});
|
|
4808
5228
|
const inputStyle = z.object({
|
|
4809
5229
|
shape: corners,
|
|
4810
5230
|
border: z.enum([
|
|
@@ -4819,12 +5239,6 @@ const inputStyle = z.object({
|
|
|
4819
5239
|
]),
|
|
4820
5240
|
label: z.enum(["inside", "above"])
|
|
4821
5241
|
});
|
|
4822
|
-
const headerVariant = z.enum([
|
|
4823
|
-
"classic",
|
|
4824
|
-
"centered",
|
|
4825
|
-
"transparent",
|
|
4826
|
-
"floating"
|
|
4827
|
-
]);
|
|
4828
5242
|
const headerPositioning = z.enum([
|
|
4829
5243
|
"static",
|
|
4830
5244
|
"sticky",
|
|
@@ -4968,7 +5382,7 @@ const headerBackgroundSchema = z.object({
|
|
|
4968
5382
|
textColor: tokenOrCssColorValueSchema.nullable().optional()
|
|
4969
5383
|
});
|
|
4970
5384
|
const headerSchema = z.object({
|
|
4971
|
-
variant:
|
|
5385
|
+
variant: headerVariantWithLegacyAliasSchema,
|
|
4972
5386
|
positioning: headerPositioning,
|
|
4973
5387
|
shrinkOnScroll: z.boolean(),
|
|
4974
5388
|
maxWidth: headerMaxWidth,
|