@riverbankcms/sdk 0.148.0 → 0.150.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/README.md +1 -1
- package/dist/EventEmbeddedCheckoutStep-D00Kc8Zj.mjs +285 -0
- package/dist/{PreviewEditorSidebar-DvEPG3Z2.mjs → PreviewEditorSidebar-7ZhmmnBB.mjs} +103 -66
- package/dist/{PreviewEditorUI-D6eb6fkx.mjs → PreviewEditorUI-BIJucTRd.mjs} +3 -6
- package/dist/{PreviewQueryProvider-5znTyJuz.mjs → PreviewQueryProvider-C0mndwHB.mjs} +3 -3
- package/dist/{SdkPreviewModeRuntime-DJ6utQ_R.mjs → SdkPreviewModeRuntime-tj45gmCX.mjs} +96 -67
- package/dist/{SiteChromeCustomizeContext-CFJYh6vo.mjs → SiteChromeCustomizeContext-BFOt0ss-.mjs} +4804 -4161
- package/dist/_dts/ai/src/contracts/proposals.d.ts +660 -0
- package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +510 -0
- package/dist/_dts/api/src/billing.d.ts +2 -2
- package/dist/_dts/api/src/bookingConfig.d.ts +33 -48
- package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +2 -6
- package/dist/_dts/api/src/bookingOperations.d.ts +5 -7
- package/dist/_dts/api/src/bookingRecords.d.ts +15 -11
- package/dist/_dts/api/src/bookingRefundOutcomes.d.ts +5 -5
- package/dist/_dts/api/src/clientErrorReporting.d.ts +11 -0
- package/dist/_dts/api/src/commercePortalEndpoints.d.ts +0 -2
- package/dist/_dts/api/src/common/cancellation.d.ts +23 -0
- package/dist/_dts/api/src/contentRuntime.d.ts +5 -1
- package/dist/_dts/api/src/customerMembershipOutcomes.d.ts +1 -1
- package/dist/_dts/api/src/endpoints.d.ts +2 -10
- package/dist/_dts/api/src/eventManagementContracts.d.ts +4 -7
- package/dist/_dts/api/src/footerCompositionContracts.d.ts +9 -0
- package/dist/_dts/api/src/footerSettings.d.ts +3 -3
- package/dist/_dts/api/src/index.d.ts +4 -4
- package/dist/_dts/api/src/navigation/bookingPortalLink.d.ts +13 -0
- package/dist/_dts/api/src/navigation.d.ts +1 -0
- package/dist/_dts/api/src/publicAppointmentBookingContracts.d.ts +2 -2
- package/dist/_dts/api/src/publicExperience/commerceEndpoints.d.ts +2 -29
- package/dist/_dts/api/src/publicExperience/eventEndpoints.d.ts +9 -173
- package/dist/_dts/api/src/request.d.ts +1 -1
- package/dist/_dts/api/src/sdk-event-upsert.d.ts +1 -1
- package/dist/_dts/api/src/sdkPullEventContracts.d.ts +1 -1
- package/dist/_dts/api/src/sdkThemeWire.d.ts +12 -0
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +3 -3
- package/dist/_dts/api/src/siteOperations.d.ts +6 -2
- package/dist/_dts/api/src/siteSettings.d.ts +2 -0
- package/dist/_dts/blocks/src/client/site-chrome.d.ts +1 -1
- package/dist/_dts/blocks/src/client.d.ts +2 -1
- package/dist/_dts/blocks/src/contracts/index.d.ts +1 -1
- package/dist/_dts/blocks/src/contracts/non-block-islands.d.ts +2 -2
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +38 -10
- package/dist/_dts/blocks/src/portal/types.d.ts +9 -6
- package/dist/_dts/blocks/src/rendering/server.d.ts +1 -1
- package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +24 -24
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +1 -1
- package/dist/_dts/blocks/src/system/blocks/shared/bookingPaymentTerms.d.ts +84 -160
- package/dist/_dts/blocks/src/system/blocks/shop.d.ts +2 -2
- package/dist/_dts/blocks/src/system/blocks/shop.shared.d.ts +31 -4
- package/dist/_dts/blocks/src/system/blocks/site-footer-runtime.d.ts +30 -3
- package/dist/_dts/blocks/src/system/designCapabilities.d.ts +10 -1
- package/dist/_dts/blocks/src/system/runtime/api/index.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/api/types/appointments.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/api/types/core.d.ts +3 -1
- package/dist/_dts/blocks/src/system/runtime/api/types/events.d.ts +38 -18
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +48 -6
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +24 -3
- package/dist/_dts/blocks/src/system/runtime/hooks/useBookingNowIso.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessEventRegistrationFlow.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.server.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.state.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/commerce/shared/display.d.ts +9 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details/presentation.d.ts +14 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventEmbeddedCheckoutStep.d.ts +13 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationPayment.d.ts +15 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationWizardActions.d.ts +0 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/FullyBookedStep.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/PaymentBlockingPanel.d.ts +3 -0
- 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/event-registration.headless.contract.d.ts +15 -5
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.planning.d.ts +4 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/eventPaymentOptions.d.ts +3 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/paymentLocation.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/paymentResponse.d.ts +72 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationCompletion.d.ts +66 -5
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationErrorRecovery.d.ts +1 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationStateMachine.d.ts +13 -5
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/sessionStorage.d.ts +11 -52
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +19 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationStripeReturn.d.ts +7 -42
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationSubmit.d.ts +7 -8
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +94 -24
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useGuestRegistrationRecovery.d.ts +30 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/usePaymentStatusRecovery.d.ts +24 -12
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useRegistrationAdmission.d.ts +18 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/wizardSteps.d.ts +6 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +24 -24
- package/dist/_dts/blocks/src/system/runtime/nodes/shop.interactive.d.ts +41 -6
- package/dist/_dts/blocks/src/system/runtime/shared/bookingPaymentOptions.d.ts +7 -2
- package/dist/_dts/blocks/src/system/runtime/shared/stripe/browserStripe.d.ts +8 -0
- package/dist/_dts/blocks/src/system/transforms/registry/eventCalendar.d.ts +8 -0
- package/dist/_dts/commerce/src/purchase/bookingPaymentSelection.d.ts +54 -0
- package/dist/_dts/commerce/src/purchase/checkoutCommitPlan.d.ts +58 -13
- package/dist/_dts/commerce/src/purchase/checkoutCopy.d.ts +10 -0
- package/dist/_dts/commerce/src/purchase/checkoutErrorCodes.d.ts +1 -1
- package/dist/_dts/commerce/src/purchase/checkoutPaymentPlanPlanning.d.ts +16 -21
- package/dist/_dts/commerce/src/purchase/checkoutPaymentTerms.d.ts +23 -40
- package/dist/_dts/commerce/src/purchase/checkoutPresentation.d.ts +49 -0
- package/dist/_dts/commerce/src/purchase/checkoutSessionMetadata.d.ts +6 -6
- package/dist/_dts/commerce/src/purchase/checkoutStripeFinalizationPlanning.d.ts +5 -1
- package/dist/_dts/commerce/src/purchase/checkoutStripeSessionPlanning.d.ts +5 -4
- package/dist/_dts/commerce/src/purchase/event-registration-errors.d.ts +9 -0
- package/dist/_dts/commerce/src/purchase/index.d.ts +3 -3
- package/dist/_dts/commerce/src/purchase/membershipOrderItemMetadata.d.ts +4 -0
- package/dist/_dts/commerce/src/purchase/oneTimeCheckoutPlanning.d.ts +9 -4
- package/dist/_dts/commerce/src/purchase/orderInstalmentClosure.d.ts +13 -1
- package/dist/_dts/commerce/src/purchase/orderInstalmentLifecycle.d.ts +5 -0
- package/dist/_dts/commerce/src/purchase/orderItemMetadata.d.ts +4 -1
- package/dist/_dts/commerce/src/purchase/orderTypes.d.ts +7 -1
- package/dist/_dts/commerce/src/purchase/refundRailSplit.d.ts +1 -1
- package/dist/_dts/commerce/src/purchase/stateTransitions.d.ts +2 -2
- package/dist/_dts/commerce/src/purchase/stripeCheckoutReturnUrl.d.ts +9 -2
- package/dist/_dts/commerce/src/purchase/stripeMinimumCharge.d.ts +6 -0
- package/dist/_dts/commerce/src/purchase/types.d.ts +7 -7
- package/dist/_dts/content-editor/src/FooterComposerOverview.d.ts +3 -2
- package/dist/_dts/content-editor/src/controller/editLeaseHandover.d.ts +30 -0
- package/dist/_dts/content-editor/src/footerPreviewRuntime.d.ts +6 -1
- package/dist/_dts/content-editor/src/lib/browserStorage.d.ts +5 -0
- package/dist/_dts/content-editor/src/useFooterComposerState.d.ts +7 -0
- package/dist/_dts/core/src/booking-flexible-balance.d.ts +2 -2
- package/dist/_dts/core/src/booking-instalment-deposit.d.ts +20 -0
- package/dist/_dts/core/src/booking-live-payment-terms.d.ts +72 -0
- package/dist/_dts/core/src/booking-payment-options.d.ts +24 -0
- package/dist/_dts/core/src/booking-payment-schemas.d.ts +522 -0
- package/dist/_dts/core/src/branded.d.ts +3 -0
- package/dist/_dts/core/src/edit-lease.d.ts +5 -0
- package/dist/_dts/core/src/index.d.ts +4 -0
- package/dist/_dts/core/src/patch/index.d.ts +30 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +326 -36
- package/dist/_dts/media-editor/src/MediaPickerDialog.d.ts +3 -1
- package/dist/_dts/media-editor/src/MediaPickerMiniDialog.d.ts +10 -0
- package/dist/_dts/media-editor/src/index.d.ts +2 -0
- package/dist/_dts/preview-next/src/client/preview/PreviewEntryControllerProvider.d.ts +0 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/previewAuthStore.d.ts +7 -0
- package/dist/_dts/preview-next/src/constants.d.ts +4 -0
- package/dist/_dts/preview-next/src/keepAlive.d.ts +1 -0
- package/dist/_dts/sdk/src/bookings/index.d.ts +2 -1
- package/dist/_dts/sdk/src/bookings/types.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/islands/types.d.ts +2 -12
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/theme-core/src/blocks/index.d.ts +1 -0
- package/dist/_dts/theme-core/src/blocks/opaquePanels.d.ts +147 -0
- package/dist/_dts/theme-core/src/boxBackgroundSchema.d.ts +22 -0
- package/dist/_dts/theme-core/src/buttons/buttonSurfaceContext.d.ts +22 -0
- package/dist/_dts/theme-core/src/cards/roles.d.ts +12 -0
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +198 -0
- package/dist/_dts/theme-core/src/palette/utils/index.d.ts +2 -0
- package/dist/_dts/theme-core/src/palette/utils/scrimContrast.d.ts +22 -0
- package/dist/_dts/theme-core/src/runtime/bridgeColourTokens.d.ts +10 -0
- package/dist/_dts/theme-core/src/schema.d.ts +330 -0
- package/dist/_dts/theme-core/src/site-styles/appearancePresetCatalog.d.ts +0 -51
- package/dist/_dts/theme-core/src/site-styles/blockAppearancePresets.d.ts +0 -51
- package/dist/_dts/theme-core/src/site-styles/lookResolution.d.ts +11 -0
- package/dist/_dts/theme-core/src/site-styles/pageDesignEditorCapabilities.d.ts +7 -1
- package/dist/_dts/theme-core/src/site-styles/pageDesignEditorModel.d.ts +7 -1
- package/dist/_dts/theme-core/src/site-styles/pageDesignIntent.d.ts +0 -5
- package/dist/_dts/theme-core/src/site-styles/previewRuntimeCapabilities.d.ts +12 -6
- package/dist/_dts/theme-core/src/site-styles/runtimeCompiler.d.ts +7 -4
- package/dist/_dts/theme-core/src/site-styles/sectionSurfaceBackgrounds.d.ts +65 -0
- package/dist/_dts/theme-core/src/site-styles/types.d.ts +17 -0
- package/dist/_dts/theme-core/src/surfaces/opaqueSurface.d.ts +43 -0
- package/dist/_dts/ui/src/color-picker.d.ts +1 -1
- package/dist/_dts/ui/src/palette/useHexDraft.d.ts +7 -0
- package/dist/client/{BookingMailingListNote-CzRt2dF_.mjs → BookingMailingListNote-CYHOufsI.mjs} +33 -124
- package/dist/client/{CheckboxChoice-B33MqoUo.mjs → CheckboxChoice-M-3HycLw.mjs} +1 -1
- package/dist/client/{DemoBookingPortalAccess-mxqwap3f.mjs → DemoBookingPortalAccess-Cvr9O_ca.mjs} +2 -2
- package/dist/client/{EventCombined.client-CDb11igO.mjs → EventCombined.client-m5UZIobP.mjs} +7 -7
- package/dist/client/EventEmbeddedCheckoutStep-DL6zFAkA.mjs +289 -0
- package/dist/client/{EventListing.client-EgYhzKPa.mjs → EventListing.client-DeMfCM04.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-gtmtaA2b.mjs → LeafletStaticMap-CvZ3gOdD.mjs} +1 -1
- package/dist/client/{checkoutUrls-CXhko2Rv.mjs → RichText-BtfNvQV6.mjs} +2 -29
- package/dist/client/{TerminalPanel-DvNUP5ot.mjs → TerminalPanel-CUCNEwlH.mjs} +2 -18
- package/dist/client/{ThemedButton-C7CeUJjW.mjs → ThemedButton-C7WhXuRl.mjs} +2 -2
- package/dist/client/{accordion-kjvt49rA.mjs → accordion-cQm5mjqs.mjs} +1 -1
- package/dist/client/{bookingForm-pbRZordh.mjs → bookingForm-BVPJE5RQ.mjs} +15 -11
- package/dist/client/bookings.mjs +2860 -1222
- package/dist/client/{carousel-f4Zbmicv.mjs → carousel-3vgnY7LC.mjs} +2 -2
- package/dist/client/{carousel.client-A2lG-9od.mjs → carousel.client-CISsdZvg.mjs} +1 -1
- package/dist/client/{cart-DO20An50.mjs → cart-BGK4oOjm.mjs} +3 -3
- package/dist/client/{checkout-Du5amDR_.mjs → checkout-GsBLUNJD.mjs} +3 -3
- package/dist/client/checkoutUrls-ChxwaNtO.mjs +28 -0
- package/dist/client/client.mjs +3324 -2053
- package/dist/client/{colorStyles-j5U9v5JA.mjs → colorStyles-D-32xHZh.mjs} +2 -30
- package/dist/client/{context-eW97E945.mjs → context-D_8s12Fp.mjs} +1 -1
- package/dist/client/{dates-jPCirRea.mjs → dates-DeJQbQ9T.mjs} +2 -2
- package/dist/client/{eventCalendar-C2M-iE4j.mjs → eventCalendar-cmucD4NR.mjs} +10 -10
- package/dist/client/{eventCombined-W6ns3LHg.mjs → eventCombined-ku3E9FTl.mjs} +4 -4
- package/dist/client/{eventDetails-CR-GT0f0.mjs → eventDetails-CyKZ61sF.mjs} +5 -5
- package/dist/client/{eventListing-BK8AfYZz.mjs → eventListing-B7yxGIhX.mjs} +4 -4
- package/dist/client/{eventRegistration-BJSd4KUu.mjs → eventRegistration-BoXfSFgZ.mjs} +1455 -1184
- package/dist/client/{form-BvpfbQaT.mjs → form-CNQOWhJo.mjs} +5 -5
- package/dist/client/{headerSection-I5sUQ8x-.mjs → headerSection-DahaBJGQ.mjs} +3 -3
- package/dist/client/hooks.mjs +283 -193
- package/dist/client/{locationMap-BLvwf9_f.mjs → locationMap-BoDjqYlW.mjs} +4 -4
- package/dist/client/{media-Cl38iOMI.mjs → media-BFY0y2rb.mjs} +2 -1
- package/dist/client/{newsletterForm-DrQ2weE8.mjs → newsletterForm-DtzXDklw.mjs} +4 -4
- package/dist/client/{pricing-BES87mrR.mjs → pricing-DXEh2Lhh.mjs} +1 -1
- package/dist/client/{productDetail-Url9jcc5.mjs → productDetail-D7cPa-00.mjs} +3 -3
- package/dist/client/{productList-DE7ngEZJ.mjs → productList-D1XMap66.mjs} +3 -3
- package/dist/client/{propsDecoder-D1OtGXDV.mjs → propsDecoder-DiIeBopB.mjs} +913 -322
- package/dist/client/rendering/client.mjs +3913 -2260
- package/dist/client/rendering/islands.mjs +19 -19
- package/dist/client/rendering.mjs +3302 -2013
- package/dist/client/result-DRW7JWXz.mjs +30 -0
- package/dist/client/{routeIslandApiConfig-BG9Y-SHg.mjs → routeIslandApiConfig-wzR4lKAY.mjs} +1 -1
- package/dist/client/scrollToBlock-C86BYkyV.mjs +17 -0
- package/dist/client/{shop-CJkuySJ3.mjs → shop-CYT5P-S5.mjs} +13 -14
- package/dist/client/{shop-commerce-store-Bxm75Pg6.mjs → shop-commerce-store-wKhsJQxI.mjs} +1 -1
- package/dist/client/{shop-commerce-4rKj5n9h.mjs → shop-commerce-ypBu_dx4.mjs} +9 -9
- package/dist/client/{shopShared-DpoQDWfz.mjs → shopShared-DFGhYrf2.mjs} +52 -6
- package/dist/client/{useEventFilters-D8HliSqR.mjs → useEventFilters-blSbN5o7.mjs} +8 -8
- package/dist/preview-next/before-render.mjs +15 -22
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/constants.mjs +5 -1
- package/dist/preview-next/index.mjs +5 -1
- package/dist/preview-next/keepAlive.mjs +149 -82
- package/dist/preview-next/middleware.mjs +15 -22
- package/dist/{previewAuthStore-BXXF3hhW.mjs → previewAuthStore-BBmV7UsW.mjs} +49 -29
- package/dist/{sdk-runtime-C2a05WjL.mjs → sdk-runtime-2p8uQk1V.mjs} +2 -2
- package/dist/{separator-CuNhBAhS.mjs → separator-Cvvzk0Oo.mjs} +1 -1
- package/dist/server/components.mjs +4041 -3704
- package/dist/server/config-validation.mjs +345 -255
- package/dist/server/config.mjs +345 -255
- package/dist/server/data.mjs +283 -193
- package/dist/server/index.mjs +20 -27
- package/dist/server/next.mjs +788 -469
- package/dist/server/page-converter.mjs +245 -121
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +4018 -3690
- package/dist/server/rendering.mjs +4044 -3707
- package/dist/server/routing.mjs +314 -190
- package/dist/server/server.mjs +290 -218
- package/dist/server/theme-bridge.mjs +1122 -310
- package/dist/server/theme.mjs +126 -116
- package/dist/spinner-CDo6AkDz.mjs +658 -0
- package/dist/styles/index.css +75 -212
- package/package.json +1 -1
- package/dist/_dts/api/src/bookingPaymentTermSchemas.d.ts +0 -123
- package/dist/_dts/billing/src/checkout/platform.d.ts +0 -77
- package/dist/_dts/billing/src/config/env.d.ts +0 -29
- package/dist/_dts/billing/src/stripe/client.d.ts +0 -29
- package/dist/_dts/blocks/src/system/runtime/hooks/usePaymentVerification.d.ts +0 -63
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventCheckoutHandoffRestore.d.ts +0 -9
- package/dist/_dts/commerce/src/purchase/checkoutPaymentTermPlanning.d.ts +0 -10
- package/dist/_dts/commerce/src/purchase/checkoutValidatedItemPlanning.d.ts +0 -55
- package/dist/_dts/commerce/src/purchase/orderInstalmentPayoff.d.ts +0 -24
- package/dist/client/urlParams-D71VXFGx.mjs +0 -47
|
@@ -516,18 +516,6 @@ export declare const blockAppearancePresets: readonly [import("../../../blocks/s
|
|
|
516
516
|
readonly treatment: "framed-programme";
|
|
517
517
|
};
|
|
518
518
|
};
|
|
519
|
-
}>, import("../../../blocks/src/index").WithResolvedCardRole<{
|
|
520
|
-
readonly id: "feature-cards-soft-panels";
|
|
521
|
-
readonly target: "feature-cards";
|
|
522
|
-
readonly label: "Soft tinted panels";
|
|
523
|
-
readonly blockKinds: readonly ["block.feature-cards"];
|
|
524
|
-
readonly design: {
|
|
525
|
-
readonly sectionSurface: "base";
|
|
526
|
-
readonly contentFrame: {
|
|
527
|
-
readonly kind: "plain";
|
|
528
|
-
};
|
|
529
|
-
readonly cardRole: "alternative";
|
|
530
|
-
};
|
|
531
519
|
}>, import("../../../blocks/src/index").WithResolvedCardRole<{
|
|
532
520
|
readonly id: "feature-cards-editorial-diptych";
|
|
533
521
|
readonly target: "feature-cards";
|
|
@@ -543,33 +531,6 @@ export declare const blockAppearancePresets: readonly [import("../../../blocks/s
|
|
|
543
531
|
};
|
|
544
532
|
readonly cardRole: "default";
|
|
545
533
|
};
|
|
546
|
-
}>, import("../../../blocks/src/index").WithResolvedCardRole<{
|
|
547
|
-
readonly id: "feature-cards-editorial-pathways";
|
|
548
|
-
readonly target: "feature-cards";
|
|
549
|
-
readonly label: "Editorial pathways";
|
|
550
|
-
readonly blockKinds: readonly ["block.feature-cards"];
|
|
551
|
-
readonly constraints: {
|
|
552
|
-
readonly layoutVariantKeys: readonly ["editorial-pathways"];
|
|
553
|
-
};
|
|
554
|
-
readonly design: {
|
|
555
|
-
readonly sectionSurface: "base";
|
|
556
|
-
readonly contentFrame: {
|
|
557
|
-
readonly kind: "plain";
|
|
558
|
-
};
|
|
559
|
-
readonly cardRole: "default";
|
|
560
|
-
};
|
|
561
|
-
}>, import("../../../blocks/src/index").WithResolvedCardRole<{
|
|
562
|
-
readonly id: "feature-cards-photo-tiles";
|
|
563
|
-
readonly target: "feature-cards";
|
|
564
|
-
readonly label: "Photo tiles";
|
|
565
|
-
readonly blockKinds: readonly ["block.feature-cards"];
|
|
566
|
-
readonly design: {
|
|
567
|
-
readonly sectionSurface: "base";
|
|
568
|
-
readonly contentFrame: {
|
|
569
|
-
readonly kind: "plain";
|
|
570
|
-
};
|
|
571
|
-
readonly cardRole: "default";
|
|
572
|
-
};
|
|
573
534
|
}>, import("../../../blocks/src/index").WithResolvedCardRole<{
|
|
574
535
|
readonly id: "events-lined-panel";
|
|
575
536
|
readonly target: "events";
|
|
@@ -681,18 +642,6 @@ export declare const blockAppearancePresets: readonly [import("../../../blocks/s
|
|
|
681
642
|
}>;
|
|
682
643
|
readonly cardRole: "default";
|
|
683
644
|
};
|
|
684
|
-
}>, import("../../../blocks/src/index").WithResolvedCardRole<{
|
|
685
|
-
readonly id: "testimonials-default-cards";
|
|
686
|
-
readonly target: "testimonials";
|
|
687
|
-
readonly label: "Default cards";
|
|
688
|
-
readonly blockKinds: readonly ["block.testimonials"];
|
|
689
|
-
readonly design: {
|
|
690
|
-
readonly sectionSurface: "base";
|
|
691
|
-
readonly contentFrame: {
|
|
692
|
-
readonly kind: "plain";
|
|
693
|
-
};
|
|
694
|
-
readonly cardRole: "default";
|
|
695
|
-
};
|
|
696
645
|
}>, import("../../../blocks/src/index").WithResolvedCardRole<{
|
|
697
646
|
readonly id: "testimonials-statement-cards";
|
|
698
647
|
readonly target: "testimonials";
|
|
@@ -12,6 +12,17 @@ export declare function blockAppearancePresetSupportsLayoutProfile(preset: Block
|
|
|
12
12
|
allowLayoutConstrainedPresetWithoutProfile?: boolean;
|
|
13
13
|
}>): boolean;
|
|
14
14
|
export declare function resolveBlockAppearancePreset(preset: BlockAppearancePreset, layoutProfile?: BlockLayoutDesignProfile | null): ResolvedBlockAppearancePreset;
|
|
15
|
+
/**
|
|
16
|
+
* Whether a site style can draw what a Look asks of it. A Look names a card
|
|
17
|
+
* role and leaves the surface to the site style, so a Look whose role the
|
|
18
|
+
* style only reaches by fallback (see `cardSystemDefinesRole`) would render as
|
|
19
|
+
* a different Look under a misleading name. Such Looks are not offered.
|
|
20
|
+
*
|
|
21
|
+
* This is the one availability rule derived from style capability; the
|
|
22
|
+
* catalogue and `recommendedAppearancePresetIds` never list per-style
|
|
23
|
+
* exceptions by hand.
|
|
24
|
+
*/
|
|
25
|
+
export declare function siteStyleSupportsLookDesign(siteStyle: CuratedSiteStyle, design: Pick<BlockAppearanceDesign, 'cardRole'>): boolean;
|
|
15
26
|
export declare function getCompatibleBlockAppearancePresets(input: Readonly<{
|
|
16
27
|
blockKind: string;
|
|
17
28
|
layoutProfile?: BlockLayoutDesignProfile | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type BlockDesignCapability, type CardRoleCapability, type UnsupportedBlockDesignCapabilityReason } from './types';
|
|
1
|
+
import { type BlockDesignCapability, type CardRoleCapability, type SectionBackgroundPaint, type UnsupportedBlockDesignCapabilityReason } from './types';
|
|
2
2
|
/**
|
|
3
3
|
* How a block's declared design capability reads to the page-design editor and
|
|
4
4
|
* to everything compiled from its read model.
|
|
@@ -11,6 +11,11 @@ export type PageDesignEditorBackgroundSupport = Readonly<{
|
|
|
11
11
|
reason: UnsupportedBlockDesignCapabilityReason | 'section-surfaces-unsupported' | 'missing-design-capability';
|
|
12
12
|
}>;
|
|
13
13
|
export declare function cardRoleCapabilityOf(capability: BlockDesignCapability | null): CardRoleCapability;
|
|
14
|
+
/**
|
|
15
|
+
* The section background paints a block admits. A block with no designed
|
|
16
|
+
* capability (a custom or SDK block) is not gated: it admits every paint.
|
|
17
|
+
*/
|
|
18
|
+
export declare function sectionBackgroundPaintsOf(capability: BlockDesignCapability | null): readonly SectionBackgroundPaint[];
|
|
14
19
|
export declare function backgroundSupportForCapability(capability: BlockDesignCapability | null): PageDesignEditorBackgroundSupport;
|
|
15
20
|
/**
|
|
16
21
|
* The capability-derived half of a block's editor read model, in one call so
|
|
@@ -19,4 +24,5 @@ export declare function backgroundSupportForCapability(capability: BlockDesignCa
|
|
|
19
24
|
export declare function capabilitySupportFor(capability: BlockDesignCapability | null): Readonly<{
|
|
20
25
|
backgroundSupport: PageDesignEditorBackgroundSupport;
|
|
21
26
|
cardRoles: CardRoleCapability;
|
|
27
|
+
sectionBackgroundPaints: readonly SectionBackgroundPaint[];
|
|
22
28
|
}>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type PageDesignEditorBackgroundSupport } from './pageDesignEditorCapabilities';
|
|
2
2
|
import type { BlockDesignMetadata } from './blockFlow';
|
|
3
3
|
import { type PageDesignDecisions } from './pageDesignIntent';
|
|
4
|
-
import { type AppearancePresetId, type BlockDesignCapability, type CardRoleCapability, type BoundaryOptionId, type DesignBlockId, type DesignBoundaryId, type LayoutVariantKey, type NonEmptyReadonlyArray, type PageFlowPresetId, type SiteStyleId } from './types';
|
|
4
|
+
import { type AppearancePresetId, type BlockDesignCapability, type CardRoleCapability, type SectionBackgroundPaint, type BoundaryOptionId, type DesignBlockId, type DesignBoundaryId, type LayoutVariantKey, type NonEmptyReadonlyArray, type PageFlowPresetId, type SiteStyleId } from './types';
|
|
5
5
|
import type { BoundaryOption } from './sectionTransitions';
|
|
6
6
|
import { type PageFlowPreset } from './pageFlowPresets';
|
|
7
7
|
import type { PageDesignDefaultJoinSource } from './joinTreatment';
|
|
@@ -61,6 +61,12 @@ export type PageDesignEditorBlock<TBlockId extends DesignBlockId = DesignBlockId
|
|
|
61
61
|
* swap its card surface at render time.
|
|
62
62
|
*/
|
|
63
63
|
cardRoles: CardRoleCapability;
|
|
64
|
+
/**
|
|
65
|
+
* The section background paints the block's own `_sectionStyles` admits,
|
|
66
|
+
* carried from its declared capability for the same reason as `cardRoles`.
|
|
67
|
+
* Absent means every paint (older fixtures and SDK read models).
|
|
68
|
+
*/
|
|
69
|
+
sectionBackgroundPaints?: readonly SectionBackgroundPaint[];
|
|
64
70
|
contentRevision?: PageDesignEditorBlockContentRevision;
|
|
65
71
|
layout: PageDesignEditorSelection<LayoutVariantKey> | null;
|
|
66
72
|
availableLayouts: readonly PageDesignEditorLayoutOption[];
|
|
@@ -58,11 +58,6 @@ export type PageDesignStructureEvent<TBlockId extends DesignBlockId = DesignBloc
|
|
|
58
58
|
}> | Readonly<{
|
|
59
59
|
kind: 'blocks-reordered';
|
|
60
60
|
orderedBlockIds: readonly TBlockId[];
|
|
61
|
-
}> | Readonly<{
|
|
62
|
-
kind: 'block-kind-changed';
|
|
63
|
-
blockId: TBlockId;
|
|
64
|
-
nextBlockKind: string;
|
|
65
|
-
compatiblePinnedLookPresetIds: readonly AppearancePresetId[];
|
|
66
61
|
}> | Readonly<{
|
|
67
62
|
kind: 'block-duplicated';
|
|
68
63
|
sourceBlockId: TBlockId;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import type { PageDesignEditorBlock } from './pageDesignEditorModel';
|
|
2
|
-
import { type BlockDesignCapabilityMap, type BlockDesignPlan, type CardRoleCapability, type DesignBlockId } from './types';
|
|
3
|
-
|
|
2
|
+
import { type BlockDesignCapabilityMap, type BlockDesignPlan, type CardRoleCapability, type DesignBlockId, type SectionBackgroundPaint } from './types';
|
|
3
|
+
/** What a block's renderer can take, which the design plan alone cannot say. */
|
|
4
|
+
export type RendererCapability = Readonly<{
|
|
5
|
+
cardRoles: CardRoleCapability;
|
|
6
|
+
sectionBackgroundPaints?: readonly SectionBackgroundPaint[];
|
|
7
|
+
}>;
|
|
8
|
+
export declare function rendererCapabilitiesByBlockKind(blocks: readonly PageDesignEditorBlock<DesignBlockId>[]): ReadonlyMap<string, RendererCapability>;
|
|
4
9
|
/**
|
|
5
10
|
* The capability map this compiler resolves against is *synthesized from the
|
|
6
11
|
* plan itself*: every axis is set to exactly what the block already asked for,
|
|
@@ -8,12 +13,13 @@ export declare function cardRoleCapabilitiesByBlockKind(blocks: readonly PageDes
|
|
|
8
13
|
* declared capability and re-gating them here would only re-run the same
|
|
9
14
|
* decision with less information.
|
|
10
15
|
*
|
|
11
|
-
* `cardRoles`
|
|
12
|
-
* declaration.
|
|
13
|
-
* which card path
|
|
16
|
+
* `cardRoles` and `sectionBackgroundPaints` are the exceptions and must be
|
|
17
|
+
* threaded through from the declaration. They do not describe a choice the
|
|
18
|
+
* plan made — they describe which card path and which section background
|
|
19
|
+
* paints the block's *renderer* accepts. Synthesizing
|
|
14
20
|
* `'supported'` would compile `_cardStyles.role` for blocks that render no
|
|
15
21
|
* card at all, so a Look could hand a surface to a block with nowhere to put
|
|
16
22
|
* it. This compiler is not preview-only: it also serves published ordinary
|
|
17
23
|
* pages and published template/entry pages.
|
|
18
24
|
*/
|
|
19
|
-
export declare function runtimeCapabilitiesForBlocks(blocks: readonly BlockDesignPlan<DesignBlockId, string>[],
|
|
25
|
+
export declare function runtimeCapabilitiesForBlocks(blocks: readonly BlockDesignPlan<DesignBlockId, string>[], rendererCapabilitiesByKind: ReadonlyMap<string, RendererCapability>): BlockDesignCapabilityMap;
|
|
@@ -5,10 +5,10 @@ import { type RuntimeStyleWriteResultForFields, type StyleAuthority } from './de
|
|
|
5
5
|
import { type ContentFrameIntent, type BlockCompositionIntent, type EyebrowTreatment, type FlushFrameTreatment, type DesignBlockId, type PanelFrameTreatment, type ResolvedBlockDesignPlan, type ResolvedPageDesignPlan, type SiteStyleSurfaceIntent, type ThemeTokenRecipes } from './types';
|
|
6
6
|
import { type PageRuntimeJoin } from './joinTreatment';
|
|
7
7
|
import { type ThemeColorToken } from '../tokens';
|
|
8
|
-
import {
|
|
8
|
+
import type { GradientPresetId } from '../gradients';
|
|
9
9
|
export type SemanticSpacing = 'none' | 'compact' | 'cozy' | 'medium' | 'comfortable' | 'spacious';
|
|
10
10
|
export type SectionPaddingX = 'normal' | 'none';
|
|
11
|
-
type SectionBackgroundOverride = NonNullable<SectionStylesOverride['background']>;
|
|
11
|
+
export type SectionBackgroundOverride = NonNullable<SectionStylesOverride['background']>;
|
|
12
12
|
type ColorSectionBackgroundOverride = Extract<SectionBackgroundOverride, {
|
|
13
13
|
type: 'color';
|
|
14
14
|
}>;
|
|
@@ -19,9 +19,12 @@ type SectionForegroundRuntimeTokenKey = 'textColor' | 'headingColor' | 'linkColo
|
|
|
19
19
|
export type SectionForegroundRuntimeTokens = {
|
|
20
20
|
readonly [TKey in SectionForegroundRuntimeTokenKey]: ThemeColorToken;
|
|
21
21
|
};
|
|
22
|
+
export type CompiledSectionForegroundTokens = {
|
|
23
|
+
readonly [TKey in SectionForegroundRuntimeTokenKey]: NonNullable<SectionBackgroundOverride[TKey]>;
|
|
24
|
+
};
|
|
22
25
|
export declare function defineSectionForegroundRuntimeTokens(input: Readonly<Record<SectionForegroundRuntimeTokenKey, unknown>>): SectionForegroundRuntimeTokens;
|
|
23
|
-
type NonGradientSectionRuntimeBackground = ColorSectionBackgroundOverride | ImageSectionBackgroundOverride;
|
|
24
|
-
type GradientSectionRuntimeBackground = Readonly<{
|
|
26
|
+
export type NonGradientSectionRuntimeBackground = ColorSectionBackgroundOverride | ImageSectionBackgroundOverride;
|
|
27
|
+
export type GradientSectionRuntimeBackground = Readonly<{
|
|
25
28
|
type: 'gradient';
|
|
26
29
|
gradientPresetId: GradientPresetId;
|
|
27
30
|
opacity?: number;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { ExpandedPalette } from '../palette/expandPalette';
|
|
2
|
+
import type { DesignRuntimeRules, GradientSectionRuntimeBackground, NonGradientSectionRuntimeBackground, SectionBackgroundOverride, SectionForegroundRuntimeTokens, SectionSurfaceRuntimeRule, SurfaceResolutionContext } from './runtimeCompiler';
|
|
3
|
+
import type { SectionBackgroundPaint, SiteStyleSurfaceIntent } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* Section surface backgrounds, compiled so their text stays legible whatever
|
|
6
|
+
* actually paints: the paint the block can admit, the site style's foreground
|
|
7
|
+
* checked against that paint, and the scrim the surface becomes when authored
|
|
8
|
+
* media replaces it.
|
|
9
|
+
*/
|
|
10
|
+
type ForegroundRole = 'textColor' | 'headingColor' | 'linkColor' | 'supportingColor';
|
|
11
|
+
type SectionForeground = Readonly<Record<ForegroundRole, string>>;
|
|
12
|
+
export declare function compileGradientSectionBackground(background: GradientSectionRuntimeBackground, foreground: SectionForegroundRuntimeTokens, palette: ExpandedPalette): SectionBackgroundOverride;
|
|
13
|
+
export declare function compileColorSectionBackground(surface: SiteStyleSurfaceIntent, background: NonGradientSectionRuntimeBackground | undefined, foreground: Partial<SectionForegroundRuntimeTokens> | undefined, surfaceResolutionContext: SurfaceResolutionContext): SectionBackgroundOverride | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* The surface rule the block can actually paint. A site style may dress a
|
|
16
|
+
* surface in a gradient or a photo, but a block whose own section background
|
|
17
|
+
* field refuses that paint would be dropped at render admission, so it gets
|
|
18
|
+
* the surface's plain colour rule instead: the same band, resolved through
|
|
19
|
+
* the accessible-surface contract. A surface with no admissible paint at all
|
|
20
|
+
* compiles no background and inherits the page's.
|
|
21
|
+
*/
|
|
22
|
+
export declare function admissibleSurfaceRule(input: Readonly<{
|
|
23
|
+
surface: SiteStyleSurfaceIntent;
|
|
24
|
+
rules: DesignRuntimeRules;
|
|
25
|
+
plainRules: DesignRuntimeRules;
|
|
26
|
+
admitted: readonly SectionBackgroundPaint[] | undefined;
|
|
27
|
+
}>): SectionSurfaceRuntimeRule;
|
|
28
|
+
/**
|
|
29
|
+
* A site style's foreground tokens for a colour surface are candidates, not
|
|
30
|
+
* authority: they go through the surface contract the renderer applies
|
|
31
|
+
* (`resolveSurfaceForeground`), so the compiled tokens are the ones that
|
|
32
|
+
* actually render — and the ones that must stay legible if the band becomes a
|
|
33
|
+
* scrim over media.
|
|
34
|
+
*/
|
|
35
|
+
export declare function validatedSectionForeground(backgroundToken: string, candidates: SectionForeground, palette: ExpandedPalette): SectionForeground;
|
|
36
|
+
/**
|
|
37
|
+
* The scrim a colour surface needs when authored media replaces it: the
|
|
38
|
+
* surface colour itself, at the smallest opacity that keeps every foreground
|
|
39
|
+
* role at body-text AA over any pixel. The surface's text is legible on the
|
|
40
|
+
* band colour, so an opaque scrim always passes; the solver only finds how
|
|
41
|
+
* much of the photo can still show.
|
|
42
|
+
*/
|
|
43
|
+
export declare function mediaScrimForColorSurface(backgroundToken: string, foreground: Readonly<Partial<Record<ForegroundRole, unknown>>>, palette: ExpandedPalette): Readonly<{
|
|
44
|
+
type: 'color';
|
|
45
|
+
color: string;
|
|
46
|
+
opacity: number;
|
|
47
|
+
}> | null;
|
|
48
|
+
/**
|
|
49
|
+
* Over media a gradient band is its own scrim, at the opacity its weakest stop
|
|
50
|
+
* needs to keep the foreground legible over any pixel. When any stop has no
|
|
51
|
+
* legible scrim (the foreground clashes with that stop even fully opaque) the
|
|
52
|
+
* band cannot back the foreground, so there is no scrim and authored media
|
|
53
|
+
* keeps its own presentation.
|
|
54
|
+
*/
|
|
55
|
+
export declare function gradientMediaScrim(input: Readonly<{
|
|
56
|
+
gradient: string;
|
|
57
|
+
stopTokens: readonly string[];
|
|
58
|
+
foreground: Readonly<Partial<Record<ForegroundRole, unknown>>>;
|
|
59
|
+
palette: ExpandedPalette;
|
|
60
|
+
}>): Readonly<{
|
|
61
|
+
type: 'gradient';
|
|
62
|
+
gradient: string;
|
|
63
|
+
opacity: number;
|
|
64
|
+
}> | null;
|
|
65
|
+
export {};
|
|
@@ -100,6 +100,15 @@ export type DesignResolutionPolicy = 'generated' | 'user' | 'admin' | 'sdk';
|
|
|
100
100
|
export type DesignIssueSeverity = 'blocking' | 'repairable' | 'advisory';
|
|
101
101
|
export declare function designIssueSeverityForPolicy(policy: DesignResolutionPolicy): DesignIssueSeverity;
|
|
102
102
|
export type SiteStyleSurfaceIntent = 'base' | 'muted-band' | 'accent-band' | 'brand-depth-band' | 'hero-image';
|
|
103
|
+
/**
|
|
104
|
+
* What a block's own section background field admits, read from its manifest.
|
|
105
|
+
* A site style's surface rule may paint a gradient or a photo; a block whose
|
|
106
|
+
* `_sectionStyles.background` refuses that paint would be dropped at render
|
|
107
|
+
* admission, so the runtime compiler paints the surface's colour equivalent
|
|
108
|
+
* instead (see `compileSectionBackground`).
|
|
109
|
+
*/
|
|
110
|
+
export declare const sectionBackgroundPaintValues: readonly ["color", "gradient", "image"];
|
|
111
|
+
export type SectionBackgroundPaint = (typeof sectionBackgroundPaintValues)[number];
|
|
103
112
|
export type SiteStyleSectionTransitionIntent = 'none' | 'soft-fade-short' | 'soft-fade-long' | 'soft-fade-expansive' | 'wave-edge' | 'wave-edge-balanced' | 'wave-edge-gentle' | 'wave-edge-bold' | 'wave-edge-drift' | 'angle-edge' | 'angle-edge-subtle' | 'angle-edge-steep';
|
|
104
113
|
export type SiteStyleEmphasis = 'low' | 'medium' | 'high';
|
|
105
114
|
export type SectionHeightIntent = 'default' | 'banner' | 'hero' | 'immersive';
|
|
@@ -457,6 +466,11 @@ export type ResolvedBlockDesignPlan<TBlockId extends string = DesignBlockId, TPu
|
|
|
457
466
|
* site-style card is applied; the block renders its own composition.
|
|
458
467
|
*/
|
|
459
468
|
appliedCardRole?: CardRole | null;
|
|
469
|
+
/**
|
|
470
|
+
* The section background paints the block admits, carried from its
|
|
471
|
+
* capability. Absent (legacy JS-shaped plans) means every paint.
|
|
472
|
+
*/
|
|
473
|
+
appliedSectionBackgroundPaints?: readonly SectionBackgroundPaint[];
|
|
460
474
|
appliedSectionHeight: SectionHeightIntent;
|
|
461
475
|
appliedHeroLegibility: HeroLegibilityStrategy;
|
|
462
476
|
appliedImageSurfaceTreatment: ImageSurfaceTreatment;
|
|
@@ -496,6 +510,8 @@ export type DesignedBlockDesignCapabilityInput = Readonly<{
|
|
|
496
510
|
sectionSurfaces: 'supported' | 'unsupported';
|
|
497
511
|
/** Rich backgrounds require an explicit block-level legibility contract. */
|
|
498
512
|
richBackgrounds?: 'supported';
|
|
513
|
+
/** Section background paints the block admits; absent means all of them. */
|
|
514
|
+
sectionBackgroundPaints?: readonly SectionBackgroundPaint[];
|
|
499
515
|
contentFrames: FrameCapability;
|
|
500
516
|
cardRoles: CardRoleCapability;
|
|
501
517
|
sectionHeights?: NonEmptyReadonlyArray<SectionHeightIntent>;
|
|
@@ -516,6 +532,7 @@ export type DesignedBlockDesignCapability = Readonly<{
|
|
|
516
532
|
looks: 'supported' | 'not-applicable';
|
|
517
533
|
sectionSurfaces: 'supported' | 'unsupported';
|
|
518
534
|
richBackgrounds?: 'supported';
|
|
535
|
+
sectionBackgroundPaints: readonly SectionBackgroundPaint[];
|
|
519
536
|
contentFrames: FrameCapability;
|
|
520
537
|
cardRoles: CardRoleCapability;
|
|
521
538
|
sectionHeights: NonEmptyReadonlyArray<SectionHeightIntent>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { Theme } from '../schema';
|
|
2
|
+
import type { ButtonSystem } from '../buttons/types';
|
|
3
|
+
/**
|
|
4
|
+
* What an element paints behind its own content.
|
|
5
|
+
*
|
|
6
|
+
* - `solid`: a palette token. The element is a surface: it publishes the
|
|
7
|
+
* foreground contract and the button context resolved against that token.
|
|
8
|
+
* - `gradient`: a surface whose colour cannot be proven for buttons; it still
|
|
9
|
+
* publishes its foreground and resets the button context.
|
|
10
|
+
* - `transparent`: the element paints nothing, so it hands back whatever the
|
|
11
|
+
* surrounding surface published (used where a treatment turns a card class
|
|
12
|
+
* into a boxless row).
|
|
13
|
+
*/
|
|
14
|
+
export type OpaqueSurfacePaint = Readonly<{
|
|
15
|
+
kind: 'solid';
|
|
16
|
+
token: string;
|
|
17
|
+
foregroundToken?: string;
|
|
18
|
+
}> | Readonly<{
|
|
19
|
+
kind: 'gradient';
|
|
20
|
+
foregroundToken?: string;
|
|
21
|
+
}> | Readonly<{
|
|
22
|
+
kind: 'transparent';
|
|
23
|
+
}>;
|
|
24
|
+
/**
|
|
25
|
+
* What a surface needs from its theme to publish its contract. Both the full
|
|
26
|
+
* theme runtime and the SDK theme bridge build one, so every runtime publishes
|
|
27
|
+
* the same contract for the same paint.
|
|
28
|
+
*/
|
|
29
|
+
export type OpaqueSurfaceContext = Readonly<{
|
|
30
|
+
/** Token name → opaque hex. */
|
|
31
|
+
palette: Readonly<Record<string, string>>;
|
|
32
|
+
/** Without one, nested surfaces reset the band's button context. */
|
|
33
|
+
buttonSystem: ButtonSystem | undefined;
|
|
34
|
+
linkHoverToken?: string;
|
|
35
|
+
}>;
|
|
36
|
+
export declare function opaqueSurfaceContextFromTheme(theme: Theme): OpaqueSurfaceContext;
|
|
37
|
+
/**
|
|
38
|
+
* The declarations that make an element own its surface: `color`, every
|
|
39
|
+
* `--rb-surface-*` role and every `--rb-action-*` variable. Card roles and
|
|
40
|
+
* opaque block panels both publish through this, so a nested surface can never
|
|
41
|
+
* inherit a band's light text or its band-resolved buttons.
|
|
42
|
+
*/
|
|
43
|
+
export declare function opaqueSurfaceDeclarations(paint: OpaqueSurfacePaint, context: OpaqueSurfaceContext): readonly string[];
|
|
@@ -5,5 +5,5 @@ interface ColorPickerProps {
|
|
|
5
5
|
onBlur?: () => void;
|
|
6
6
|
label?: string;
|
|
7
7
|
}
|
|
8
|
-
declare const ColorPicker: import("react").ForwardRefExoticComponent<Omit<ButtonProps, "value" | "onBlur" | "onChange"> & ColorPickerProps &
|
|
8
|
+
declare const ColorPicker: import("react").ForwardRefExoticComponent<Omit<ButtonProps, "value" | "onBlur" | "onChange"> & ColorPickerProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
9
9
|
export { ColorPicker };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Keeps incomplete text local while sending only complete colors to consumers. */
|
|
2
|
+
export declare function useHexDraft(value: string, onChange: (hex: string) => void): {
|
|
3
|
+
draft: string;
|
|
4
|
+
changeDraft: (next: string) => void;
|
|
5
|
+
finishDraft: () => void;
|
|
6
|
+
setDraft: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
7
|
+
};
|
package/dist/client/{BookingMailingListNote-CzRt2dF_.mjs → BookingMailingListNote-CYHOufsI.mjs}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { Cn as formatCurrencyAmount, Wt as assertNever$
|
|
3
|
-
import {
|
|
2
|
+
import { Cn as getBookingInstalmentDepositRefundability, Nn as formatCurrencyAmount, Wt as assertNever$1, in as resolveBookingInitialInstalmentAmountCents, rn as buildBookingInstalmentSchedule, wn as getBookingInstalmentPlanIntervalCount } from "./propsDecoder-DiIeBopB.mjs";
|
|
3
|
+
import { r as CheckIcon } from "./TerminalPanel-CUCNEwlH.mjs";
|
|
4
4
|
import { n as getBookingMailingListNoteCopy } from "./mailingListSignupCopy-DZSHZrm6.mjs";
|
|
5
|
-
import {
|
|
6
|
-
import { useCallback, useEffect, useReducer, useRef } from "react";
|
|
5
|
+
import { t as RichText } from "./RichText-BtfNvQV6.mjs";
|
|
6
|
+
import { useCallback, useEffect, useReducer, useRef, useState } from "react";
|
|
7
7
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
//#region ../core/src/date-math.ts
|
|
9
9
|
function addDaysToDate(date, dayCount) {
|
|
@@ -31,71 +31,24 @@ function resolveFlexibleBalanceDueAt(input) {
|
|
|
31
31
|
switch (input.dueDateRule.kind) {
|
|
32
32
|
case "relative_to_start_date": return subtractDaysFromIso(input.bookingStartAt, input.dueDateRule.daysBeforeStart);
|
|
33
33
|
case "fixed_calendar_date": return input.dueDateRule.dueAt;
|
|
34
|
-
default: return assertNever
|
|
34
|
+
default: return assertNever(input.dueDateRule);
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
function assertNever
|
|
37
|
+
function assertNever(value) {
|
|
38
38
|
throw new Error(`Unexpected value: ${String(value)}`);
|
|
39
39
|
}
|
|
40
40
|
//#endregion
|
|
41
|
-
//#region ../
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
return
|
|
52
|
-
}
|
|
53
|
-
function clampConfiguredAmount(amountCents, totalAmountCents) {
|
|
54
|
-
return Math.max(0, Math.min(amountCents, totalAmountCents));
|
|
55
|
-
}
|
|
56
|
-
function splitAmountWithRemainderInFirst(totalAmountCents, partCount) {
|
|
57
|
-
if (partCount <= 0) return [];
|
|
58
|
-
const baseAmountCents = Math.floor(totalAmountCents / partCount);
|
|
59
|
-
const remainderCents = totalAmountCents - baseAmountCents * partCount;
|
|
60
|
-
return Array.from({ length: partCount }, (_, index) => index === 0 ? baseAmountCents + remainderCents : baseAmountCents);
|
|
61
|
-
}
|
|
62
|
-
function addIntervalPreservingMonthAnchor(isoString, intervalCount, intervalUnit) {
|
|
63
|
-
const date = new Date(isoString);
|
|
64
|
-
if (!Number.isFinite(date.getTime())) return isoString;
|
|
65
|
-
switch (intervalUnit) {
|
|
66
|
-
case "day":
|
|
67
|
-
date.setUTCDate(date.getUTCDate() + intervalCount);
|
|
68
|
-
return date.toISOString();
|
|
69
|
-
case "week":
|
|
70
|
-
date.setUTCDate(date.getUTCDate() + intervalCount * 7);
|
|
71
|
-
return date.toISOString();
|
|
72
|
-
case "month": return addMonthsPreservingAnchorDay(date, intervalCount).toISOString();
|
|
73
|
-
default: return assertNever(intervalUnit);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
function getBookingInstalmentPlanIntervalCount(plan) {
|
|
77
|
-
switch (plan.kind) {
|
|
78
|
-
case "deposit_plus_one_remainder": return plan.remainderDueCount;
|
|
79
|
-
case "deposit_plus_scheduled_instalments":
|
|
80
|
-
case "equal_scheduled_instalments": return plan.intervalCount;
|
|
81
|
-
default: return assertNever(plan);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
function omitZeroAmountFutureRows(rows) {
|
|
85
|
-
if (rows.length <= 1) return rows;
|
|
86
|
-
const firstRow = rows[0];
|
|
87
|
-
if (firstRow === void 0) return [];
|
|
88
|
-
return [firstRow, ...rows.slice(1).filter((row) => row.amountCents > 0)];
|
|
89
|
-
}
|
|
90
|
-
function addMonthsPreservingAnchorDay(date, intervalCount) {
|
|
91
|
-
const anchorDay = date.getUTCDate();
|
|
92
|
-
const nextMonth = new Date(Date.UTC(date.getUTCFullYear(), date.getUTCMonth() + intervalCount, 1, date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds(), date.getUTCMilliseconds()));
|
|
93
|
-
const lastDayOfTargetMonth = new Date(Date.UTC(nextMonth.getUTCFullYear(), nextMonth.getUTCMonth() + 1, 0)).getUTCDate();
|
|
94
|
-
nextMonth.setUTCDate(Math.min(anchorDay, lastDayOfTargetMonth));
|
|
95
|
-
return nextMonth;
|
|
96
|
-
}
|
|
97
|
-
function assertNever(value) {
|
|
98
|
-
throw new Error(`Unexpected value: ${String(value)}`);
|
|
41
|
+
//#region ../blocks/src/system/runtime/hooks/useBookingNowIso.ts
|
|
42
|
+
/**
|
|
43
|
+
* The moment a booking or registration flow opened, as an ISO timestamp.
|
|
44
|
+
*
|
|
45
|
+
* Payment previews take this as their "now" so the pure view-model builders
|
|
46
|
+
* never read the clock themselves. It's captured once per mount, which keeps
|
|
47
|
+
* memoised previews stable across renders.
|
|
48
|
+
*/
|
|
49
|
+
function useBookingNowIso() {
|
|
50
|
+
const [nowIso] = useState(() => (/* @__PURE__ */ new Date()).toISOString());
|
|
51
|
+
return nowIso;
|
|
99
52
|
}
|
|
100
53
|
//#endregion
|
|
101
54
|
//#region ../blocks/src/system/runtime/shared/bookingPaymentOptionCopy.ts
|
|
@@ -164,16 +117,15 @@ function resolveBookingPaymentDueNowCents(input) {
|
|
|
164
117
|
switch (input.option.kind) {
|
|
165
118
|
case "upfront": return input.totalCents;
|
|
166
119
|
case "deferred_manual": return 0;
|
|
167
|
-
case "instalment_plan": return
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
})[0]?.amountCents ?? input.totalCents;
|
|
120
|
+
case "instalment_plan": return resolveBookingInitialInstalmentAmountCents({
|
|
121
|
+
totalAmountCents: input.totalCents,
|
|
122
|
+
plan: input.option.plan
|
|
123
|
+
});
|
|
172
124
|
case "flexible_balance": return resolveFlexibleBalanceInitialPaymentCents({
|
|
173
125
|
totalAmountCents: input.totalCents,
|
|
174
126
|
config: input.option.config
|
|
175
127
|
});
|
|
176
|
-
default: return assertNever$
|
|
128
|
+
default: return assertNever$1(input.option);
|
|
177
129
|
}
|
|
178
130
|
}
|
|
179
131
|
function buildBookingPaymentSelectionViewModel(input) {
|
|
@@ -190,6 +142,7 @@ function buildBookingPaymentSelectionViewModel(input) {
|
|
|
190
142
|
totalCents,
|
|
191
143
|
currency,
|
|
192
144
|
bookingStartAt: input.bookingStartAt,
|
|
145
|
+
nowIso: input.nowIso,
|
|
193
146
|
locale: input.locale
|
|
194
147
|
}))
|
|
195
148
|
};
|
|
@@ -232,17 +185,12 @@ function buildBookingPaymentOptionViewModel(input) {
|
|
|
232
185
|
};
|
|
233
186
|
}
|
|
234
187
|
case "instalment_plan": {
|
|
235
|
-
const
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
});
|
|
240
|
-
const dueToday = resolveBookingPaymentDueNowCents({
|
|
241
|
-
option: input.option,
|
|
242
|
-
totalCents: input.totalCents,
|
|
243
|
-
bookingStartAt: input.bookingStartAt
|
|
188
|
+
const [firstRow, ...futureRows] = buildBookingInstalmentSchedule({
|
|
189
|
+
anchorAt: input.nowIso,
|
|
190
|
+
totalAmountCents: input.totalCents,
|
|
191
|
+
plan: input.option.plan
|
|
244
192
|
});
|
|
245
|
-
const
|
|
193
|
+
const dueToday = firstRow?.amountCents ?? 0;
|
|
246
194
|
const formattedTotal = formatPrice(input.totalCents, input.currency, input.locale);
|
|
247
195
|
const formattedDueToday = formatPrice(dueToday, input.currency, input.locale);
|
|
248
196
|
const depositRefundability = getBookingInstalmentDepositRefundability(input.option.plan);
|
|
@@ -289,7 +237,7 @@ function buildBookingPaymentOptionViewModel(input) {
|
|
|
289
237
|
const formattedDueToday = formatPrice(dueToday, input.currency, input.locale);
|
|
290
238
|
const formattedRemainingBalance = formatPrice(remainingBalance, input.currency, input.locale);
|
|
291
239
|
const dueAt = resolveFlexibleBalanceDueAt({
|
|
292
|
-
bookingStartAt: input.bookingStartAt ??
|
|
240
|
+
bookingStartAt: input.bookingStartAt ?? input.nowIso,
|
|
293
241
|
dueDateRule: input.option.config.dueDateRule
|
|
294
242
|
});
|
|
295
243
|
const copy = buildFlexibleBalanceBookingPaymentOptionCopy({
|
|
@@ -327,43 +275,7 @@ function buildBookingPaymentOptionViewModel(input) {
|
|
|
327
275
|
ctaLabel: copy.ctaLabel
|
|
328
276
|
};
|
|
329
277
|
}
|
|
330
|
-
default: return assertNever$
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
function buildInstalmentSchedulePreview(input) {
|
|
334
|
-
const startAt = input.bookingStartAt ?? (/* @__PURE__ */ new Date()).toISOString();
|
|
335
|
-
switch (input.option.plan.kind) {
|
|
336
|
-
case "deposit_plus_one_remainder": {
|
|
337
|
-
const deposit = clampConfiguredAmount(input.option.plan.depositAmountCents, input.totalCents);
|
|
338
|
-
const remainder = Math.max(0, input.totalCents - deposit);
|
|
339
|
-
return compactSchedulePreview([{
|
|
340
|
-
dueAt: startAt,
|
|
341
|
-
amountCents: deposit
|
|
342
|
-
}, {
|
|
343
|
-
dueAt: addIntervalPreservingMonthAnchor(startAt, input.option.plan.remainderDueCount, input.option.plan.intervalUnit),
|
|
344
|
-
amountCents: remainder
|
|
345
|
-
}]);
|
|
346
|
-
}
|
|
347
|
-
case "deposit_plus_scheduled_instalments": {
|
|
348
|
-
const plan = input.option.plan;
|
|
349
|
-
const deposit = clampConfiguredAmount(plan.depositAmountCents, input.totalCents);
|
|
350
|
-
const instalments = splitAmountWithRemainderInFirst(Math.max(0, input.totalCents - deposit), plan.instalmentCount);
|
|
351
|
-
return compactSchedulePreview([{
|
|
352
|
-
dueAt: startAt,
|
|
353
|
-
amountCents: deposit
|
|
354
|
-
}, ...instalments.map((amountCents, index) => ({
|
|
355
|
-
dueAt: addIntervalPreservingMonthAnchor(startAt, plan.intervalCount * (index + 1), plan.intervalUnit),
|
|
356
|
-
amountCents
|
|
357
|
-
}))]);
|
|
358
|
-
}
|
|
359
|
-
case "equal_scheduled_instalments": {
|
|
360
|
-
const plan = input.option.plan;
|
|
361
|
-
return compactSchedulePreview(splitAmountWithRemainderInFirst(input.totalCents, plan.instalmentCount).map((amountCents, index) => ({
|
|
362
|
-
dueAt: index === 0 ? startAt : addIntervalPreservingMonthAnchor(startAt, plan.intervalCount * index, plan.intervalUnit),
|
|
363
|
-
amountCents
|
|
364
|
-
})));
|
|
365
|
-
}
|
|
366
|
-
default: return assertNever$2(input.option.plan);
|
|
278
|
+
default: return assertNever$1(input.option);
|
|
367
279
|
}
|
|
368
280
|
}
|
|
369
281
|
function getPaymentCadenceLabel(plan) {
|
|
@@ -371,9 +283,6 @@ function getPaymentCadenceLabel(plan) {
|
|
|
371
283
|
const unitLabel = intervalCount === 1 ? plan.intervalUnit : `${plan.intervalUnit}s`;
|
|
372
284
|
return intervalCount === 1 ? unitLabel : `every ${intervalCount} ${unitLabel}`;
|
|
373
285
|
}
|
|
374
|
-
function compactSchedulePreview(schedule) {
|
|
375
|
-
return omitZeroAmountFutureRows(schedule);
|
|
376
|
-
}
|
|
377
286
|
function formatScheduleDate(isoString, locale) {
|
|
378
287
|
const date = new Date(isoString);
|
|
379
288
|
if (!Number.isFinite(date.getTime())) return isoString;
|
|
@@ -425,14 +334,14 @@ function pollingReducer(state, action) {
|
|
|
425
334
|
case "completed":
|
|
426
335
|
case "failed":
|
|
427
336
|
case "timeout": return state;
|
|
428
|
-
default: return assertNever$
|
|
337
|
+
default: return assertNever$1(state);
|
|
429
338
|
}
|
|
430
339
|
case "polling-timed-out": return {
|
|
431
340
|
tag: "timeout",
|
|
432
341
|
result: state.result,
|
|
433
342
|
error: /* @__PURE__ */ new Error("Polling timed out")
|
|
434
343
|
};
|
|
435
|
-
default: return assertNever$
|
|
344
|
+
default: return assertNever$1(action);
|
|
436
345
|
}
|
|
437
346
|
}
|
|
438
347
|
//#endregion
|
|
@@ -710,4 +619,4 @@ function BookingMailingListNote(props) {
|
|
|
710
619
|
});
|
|
711
620
|
}
|
|
712
621
|
//#endregion
|
|
713
|
-
export { buildBookingPaymentSelectionViewModel as a, usePolling as i, BookingConsentAgreement as n, resolveBookingPaymentDueNowCents as o, StepIndicator as r, formatPrice as s, BookingMailingListNote as t };
|
|
622
|
+
export { buildBookingPaymentSelectionViewModel as a, useBookingNowIso as c, usePolling as i, BookingConsentAgreement as n, resolveBookingPaymentDueNowCents as o, StepIndicator as r, formatPrice as s, BookingMailingListNote as t };
|
package/dist/client/{DemoBookingPortalAccess-mxqwap3f.mjs → DemoBookingPortalAccess-Cvr9O_ca.mjs}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { t as ThemedButton } from "./ThemedButton-C7WhXuRl.mjs";
|
|
3
|
+
import { n as useBlockApi, r as BlockApiError } from "./context-D_8s12Fp.mjs";
|
|
4
4
|
import React, { useId } from "react";
|
|
5
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
//#region ../blocks/src/system/runtime/shared/utils/demoBookingPassStorage.ts
|