@riverbankcms/sdk 0.149.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/dist/EventEmbeddedCheckoutStep-D00Kc8Zj.mjs +285 -0
- package/dist/{PreviewEditorSidebar-DBKln68M.mjs → PreviewEditorSidebar-7ZhmmnBB.mjs} +3 -3
- package/dist/{PreviewEditorUI-DpRX4Mum.mjs → PreviewEditorUI-BIJucTRd.mjs} +2 -2
- package/dist/{SdkPreviewModeRuntime-DJPmPY-r.mjs → SdkPreviewModeRuntime-tj45gmCX.mjs} +4 -3
- package/dist/{SiteChromeCustomizeContext-JYA0cJ_Z.mjs → SiteChromeCustomizeContext-BFOt0ss-.mjs} +4454 -4059
- 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/contentRuntime.d.ts +5 -1
- 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 +1 -1
- 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/publicExperience/eventEndpoints.d.ts +9 -173
- 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/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/rendering/server.d.ts +1 -1
- 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/events.d.ts +38 -18
- 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/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 +2 -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/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 +90 -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/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/checkoutCopy.d.ts +10 -0
- package/dist/_dts/commerce/src/purchase/checkoutPresentation.d.ts +49 -0
- package/dist/_dts/commerce/src/purchase/checkoutSessionMetadata.d.ts +4 -4
- package/dist/_dts/commerce/src/purchase/checkoutStripeFinalizationPlanning.d.ts +5 -1
- package/dist/_dts/commerce/src/purchase/event-registration-errors.d.ts +9 -0
- package/dist/_dts/commerce/src/purchase/index.d.ts +2 -0
- package/dist/_dts/commerce/src/purchase/orderItemMetadata.d.ts +1 -0
- package/dist/_dts/commerce/src/purchase/stripeCheckoutReturnUrl.d.ts +9 -2
- package/dist/_dts/commerce/src/purchase/types.d.ts +5 -6
- package/dist/_dts/content-editor/src/FooterComposerOverview.d.ts +3 -2
- package/dist/_dts/content-editor/src/footerPreviewRuntime.d.ts +6 -1
- package/dist/_dts/content-editor/src/useFooterComposerState.d.ts +7 -0
- package/dist/_dts/core/src/index.d.ts +1 -0
- package/dist/_dts/core/src/patch/index.d.ts +30 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +30 -1
- 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/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/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/client/{BookingMailingListNote-Cr3EeTP5.mjs → BookingMailingListNote-CYHOufsI.mjs} +10 -440
- package/dist/client/{CheckboxChoice-B33MqoUo.mjs → CheckboxChoice-M-3HycLw.mjs} +1 -1
- package/dist/client/{DemoBookingPortalAccess-BFGB1Fay.mjs → DemoBookingPortalAccess-Cvr9O_ca.mjs} +2 -2
- package/dist/client/{EventCombined.client-DKYV0_ft.mjs → EventCombined.client-m5UZIobP.mjs} +7 -7
- package/dist/client/EventEmbeddedCheckoutStep-DL6zFAkA.mjs +289 -0
- package/dist/client/{EventListing.client-B9UIcEYc.mjs → EventListing.client-DeMfCM04.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-CFLPkP0K.mjs → LeafletStaticMap-CvZ3gOdD.mjs} +1 -1
- package/dist/client/{checkoutUrls-CXhko2Rv.mjs → RichText-BtfNvQV6.mjs} +2 -29
- package/dist/client/{TerminalPanel-JjmgxEsR.mjs → TerminalPanel-CUCNEwlH.mjs} +2 -18
- package/dist/client/{ThemedButton-CKV1Jh2m.mjs → ThemedButton-C7WhXuRl.mjs} +2 -2
- package/dist/client/{accordion-DXWIfT3T.mjs → accordion-cQm5mjqs.mjs} +1 -1
- package/dist/client/{bookingForm-CjZgHNvv.mjs → bookingForm-BVPJE5RQ.mjs} +11 -10
- package/dist/client/bookings.mjs +2668 -1134
- package/dist/client/{carousel-DSLikmvZ.mjs → carousel-3vgnY7LC.mjs} +2 -2
- package/dist/client/{carousel.client-A2lG-9od.mjs → carousel.client-CISsdZvg.mjs} +1 -1
- package/dist/client/{cart-HDjWReFt.mjs → cart-BGK4oOjm.mjs} +3 -3
- package/dist/client/{checkout-CUvRZA3W.mjs → checkout-GsBLUNJD.mjs} +3 -3
- package/dist/client/checkoutUrls-ChxwaNtO.mjs +28 -0
- package/dist/client/client.mjs +3042 -1868
- package/dist/client/{colorStyles-j5U9v5JA.mjs → colorStyles-D-32xHZh.mjs} +2 -30
- package/dist/client/{context-DFmaZa-Q.mjs → context-D_8s12Fp.mjs} +1 -1
- package/dist/client/{dates-BBep1JnF.mjs → dates-DeJQbQ9T.mjs} +2 -2
- package/dist/client/{eventCalendar-zEobhxo4.mjs → eventCalendar-cmucD4NR.mjs} +10 -10
- package/dist/client/{eventCombined-Dp7bz5k-.mjs → eventCombined-ku3E9FTl.mjs} +4 -4
- package/dist/client/{eventDetails-FE-zqTt7.mjs → eventDetails-CyKZ61sF.mjs} +5 -5
- package/dist/client/{eventListing-BMt5snal.mjs → eventListing-B7yxGIhX.mjs} +4 -4
- package/dist/client/{eventRegistration-O6ZxHfOb.mjs → eventRegistration-BoXfSFgZ.mjs} +1403 -857
- package/dist/client/{form-DFa1D8vt.mjs → form-CNQOWhJo.mjs} +5 -5
- package/dist/client/{headerSection-CmjHLR-N.mjs → headerSection-DahaBJGQ.mjs} +3 -3
- package/dist/client/hooks.mjs +123 -64
- package/dist/client/{locationMap-BXKP_lGh.mjs → locationMap-BoDjqYlW.mjs} +4 -4
- package/dist/client/{media-Cl38iOMI.mjs → media-BFY0y2rb.mjs} +2 -1
- package/dist/client/{newsletterForm-CU-HmxGx.mjs → newsletterForm-DtzXDklw.mjs} +4 -4
- package/dist/client/{pricing-KEAEsibq.mjs → pricing-DXEh2Lhh.mjs} +1 -1
- package/dist/client/{productDetail-Ckp7MGnt.mjs → productDetail-D7cPa-00.mjs} +3 -3
- package/dist/client/{productList-D91V0sYa.mjs → productList-D1XMap66.mjs} +3 -3
- package/dist/client/{propsDecoder-DZd6RJeA.mjs → propsDecoder-DiIeBopB.mjs} +758 -245
- package/dist/client/rendering/client.mjs +4381 -2892
- package/dist/client/rendering/islands.mjs +19 -19
- package/dist/client/rendering.mjs +3026 -1852
- package/dist/client/result-DRW7JWXz.mjs +30 -0
- package/dist/client/{routeIslandApiConfig-E1EkhhYY.mjs → routeIslandApiConfig-wzR4lKAY.mjs} +1 -1
- package/dist/client/scrollToBlock-C86BYkyV.mjs +17 -0
- package/dist/client/{shop-4F2jLQPI.mjs → shop-CYT5P-S5.mjs} +8 -8
- package/dist/client/{shop-commerce-store-vicweP2K.mjs → shop-commerce-store-wKhsJQxI.mjs} +1 -1
- package/dist/client/{shop-commerce-BbfCJjB3.mjs → shop-commerce-ypBu_dx4.mjs} +9 -9
- package/dist/client/{shopShared-DlONJt0T.mjs → shopShared-DFGhYrf2.mjs} +52 -6
- package/dist/client/{useEventFilters-COYyL3m7.mjs → useEventFilters-blSbN5o7.mjs} +8 -8
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/{sdk-runtime-CwvFFjB-.mjs → sdk-runtime-2p8uQk1V.mjs} +1 -1
- package/dist/{separator-ByL72zUT.mjs → separator-Cvvzk0Oo.mjs} +1 -1
- package/dist/server/components.mjs +4066 -3765
- package/dist/server/config-validation.mjs +185 -126
- package/dist/server/config.mjs +185 -126
- package/dist/server/data.mjs +123 -64
- package/dist/server/index.mjs +1 -1
- package/dist/server/next.mjs +615 -314
- package/dist/server/page-converter.mjs +100 -56
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +4041 -3751
- package/dist/server/rendering.mjs +4069 -3768
- package/dist/server/routing.mjs +149 -72
- package/dist/server/server.mjs +124 -65
- 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/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/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[];
|
|
@@ -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[];
|