@riverbankcms/sdk 0.76.0 → 0.77.1
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/{PreviewEditorSidebar-X2HWXFOL.mjs → PreviewEditorSidebar-DVUG7GK4.mjs} +1019 -442
- package/dist/{PreviewEditorUI-AQXIXPOH.mjs → PreviewEditorUI-P7RN4CDS.mjs} +2 -2
- package/dist/SdkPreviewModeRuntime-KLPX47SE.mjs +8 -0
- package/dist/_dts/ai/src/contracts/proposals.d.ts +538 -20
- package/dist/_dts/api/src/contentRuntime.d.ts +5 -0
- package/dist/_dts/api/src/siteAssets.d.ts +1 -0
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +26 -2
- package/dist/_dts/block-form/src/blockDraftSaveability.d.ts +28 -0
- package/dist/_dts/block-form/src/client/index.d.ts +2 -2
- package/dist/_dts/block-form/src/index.d.ts +2 -1
- package/dist/_dts/block-form/src/widgets/DateField/dateFieldSchema.d.ts +1 -1
- package/dist/_dts/block-form/src/widgets/DateTimeField/dateTimeFieldSchema.d.ts +1 -1
- package/dist/_dts/block-form/src/widgets/TimeField/timeFieldSchema.d.ts +1 -1
- package/dist/_dts/blocks/src/PageRenderer.d.ts +10 -10
- package/dist/_dts/blocks/src/client/site-chrome.d.ts +22 -0
- package/dist/_dts/blocks/src/customBlockRegistry.d.ts +57 -0
- package/dist/_dts/blocks/src/index.d.ts +2 -0
- package/dist/_dts/blocks/src/system/blocks/faq.d.ts +20 -2
- package/dist/_dts/blocks/src/system/blocks/feature-cards.d.ts +25 -0
- package/dist/_dts/blocks/src/system/blocks/index.d.ts +2 -0
- package/dist/_dts/blocks/src/system/blocks/intro.d.ts +24 -0
- package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +3 -34
- package/dist/_dts/blocks/src/system/blocks/site-header.d.ts +2 -2
- package/dist/_dts/blocks/src/system/constants/blockKinds.d.ts +1 -1
- package/dist/_dts/blocks/src/system/fields/aspectRatio.d.ts +30 -0
- package/dist/_dts/blocks/src/system/fields/boxStyles.d.ts +4 -1
- package/dist/_dts/blocks/src/system/fields/ctas.d.ts +7 -0
- package/dist/_dts/blocks/src/system/manifest/fieldValidation/index.d.ts +16 -2
- package/dist/_dts/blocks/src/system/node/validation-constants.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/components/multi-step/runtimeFormValidation.d.ts +28 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/accordion.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/accordion.server.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/accordionIconTreatment.d.ts +5 -0
- package/dist/_dts/blocks/src/system/transforms/registry/layout.d.ts +5 -4
- package/dist/_dts/blocks/src/system/transforms/typed.d.ts +2 -1
- package/dist/_dts/content-editor/src/controller/EntryControllerProvider.d.ts +2 -0
- package/dist/_dts/content-editor/src/hooks/blockDraftLifecycle.d.ts +48 -0
- package/dist/_dts/content-editor/src/hooks/invalidBlockSelectors.d.ts +4 -0
- package/dist/_dts/content-editor/src/hooks/publishability.d.ts +47 -0
- package/dist/_dts/content-editor/src/index.d.ts +1 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +20 -0
- package/dist/_dts/editor-blocks/src/BlockEditor.d.ts +2 -1
- package/dist/_dts/editor-blocks/src/block-editor/SortableBlockItem.d.ts +2 -1
- package/dist/_dts/editor-blocks/src/block-editor/customBlockRegistry.d.ts +2 -0
- package/dist/_dts/editor-blocks/src/block-editor/sdkBlockMerger.d.ts +9 -37
- package/dist/_dts/editor-blocks/src/index.d.ts +2 -2
- package/dist/_dts/preview-next/src/client/index.d.ts +3 -0
- package/dist/_dts/preview-next/src/client/layout/PreviewLayoutContext.d.ts +5 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewDesignCoordinatorContext.d.ts +20 -0
- package/dist/_dts/preview-next/src/client/preview/PreviewEditorSidebar.d.ts +7 -2
- package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +7 -2
- package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +7 -2
- package/dist/_dts/preview-next/src/client/preview/PreviewThemedSiteDocument.d.ts +18 -0
- package/dist/_dts/preview-next/src/client/preview/SiteChromeCustomizeContext.d.ts +20 -3
- package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.d.ts +6 -1
- package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.state.d.ts +14 -4
- package/dist/_dts/preview-next/src/client/preview/previewDesignCoordinator.d.ts +73 -0
- package/dist/_dts/preview-next/src/client/preview/siteChromeLookRows.d.ts +12 -4
- package/dist/_dts/preview-next/src/client/preview/siteStylePreviewPlanner.d.ts +46 -0
- package/dist/_dts/preview-next/src/client/preview/styleConfiguratorSnapshot.d.ts +6 -1
- package/dist/_dts/preview-next/src/client/preview/typographySelectionInput.d.ts +14 -0
- package/dist/_dts/preview-next/src/client/sdk/SdkPreviewModeRuntime.d.ts +1 -1
- package/dist/_dts/sdk/src/cli/commands/style.d.ts +8 -0
- package/dist/_dts/sdk/src/client/management/types.d.ts +6 -1
- package/dist/_dts/sdk/src/client/types.d.ts +9 -0
- package/dist/_dts/sdk/src/client.d.ts +1 -1
- package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +35 -0
- package/dist/_dts/sdk/src/contracts/theme.d.ts +1 -1
- package/dist/_dts/sdk/src/index.d.ts +2 -1
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +5 -0
- package/dist/_dts/sdk/src/rendering/components/Layout.d.ts +2 -2
- package/dist/_dts/sdk/src/types/block-kinds.d.ts +1 -1
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/site-commands/src/commands.d.ts +15 -0
- package/dist/_dts/theme-core/src/buttons/personalities/earth-pill.d.ts +16 -0
- package/dist/_dts/theme-core/src/buttons/personalities/index.d.ts +11 -0
- package/dist/_dts/theme-core/src/fonts/types.d.ts +1 -1
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +72 -27
- package/dist/_dts/theme-core/src/palette/variants/index.d.ts +15 -0
- package/dist/_dts/theme-core/src/palette/variants/warm-neutral.d.ts +16 -0
- package/dist/_dts/theme-core/src/schema.d.ts +306 -30
- package/dist/_dts/theme-core/src/site-styles/appearancePresetCatalog.d.ts +81 -0
- package/dist/_dts/theme-core/src/site-styles/appearancePresetTypes.d.ts +6 -4
- package/dist/_dts/theme-core/src/site-styles/blockAppearancePresets.d.ts +81 -0
- package/dist/_dts/theme-core/src/site-styles/curatedSiteStyles.d.ts +119 -3
- package/dist/_dts/theme-core/src/site-styles/designState.d.ts +4 -4
- package/dist/_dts/theme-core/src/site-styles/footerLooks.d.ts +13 -0
- package/dist/_dts/theme-core/src/site-styles/generatedSchemas.d.ts +4 -2
- package/dist/_dts/theme-core/src/site-styles/headerLooks.d.ts +402 -13
- package/dist/_dts/theme-core/src/site-styles/headerOpeningSection.d.ts +6 -0
- package/dist/_dts/theme-core/src/site-styles/index.d.ts +2 -0
- package/dist/_dts/theme-core/src/site-styles/persistedIdParseResult.d.ts +9 -0
- package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +20 -4
- package/dist/_dts/theme-core/src/site-styles/types.d.ts +74 -2
- package/dist/_dts/theme-core/src/site-styles/typographyPresets.d.ts +189 -0
- package/dist/{chunk-Q4OLG66B.mjs → chunk-2SPENC5M.mjs} +476 -153
- package/dist/{chunk-Z7JLNTJR.mjs → chunk-6SMUFTXD.mjs} +2 -1
- package/dist/{chunk-TW2Y4RR5.mjs → chunk-IENWFSLO.mjs} +365 -52
- package/dist/{chunk-LYI7TEMH.mjs → chunk-KWJPDZH2.mjs} +4682 -1463
- package/dist/{chunk-V5VORNEJ.mjs → chunk-ZYEJLCTN.mjs} +1 -1
- package/dist/cli/index.mjs +2314 -267
- package/dist/client/{accordion-2YHIBOZH.mjs → accordion-RZMQSYLR.mjs} +1 -1
- package/dist/client/{bookingForm-35IBDWAS.mjs → bookingForm-NF4ASVNV.mjs} +2 -2
- package/dist/client/bookings.mjs +92 -0
- package/dist/client/{carousel-K6XG7NZQ.mjs → carousel-LDX47ZIK.mjs} +1 -1
- package/dist/client/{cart-HCFYUTTU.mjs → cart-RGXDS5F4.mjs} +3 -3
- package/dist/client/{checkout-J3U4XR7K.mjs → checkout-P7WWSNNY.mjs} +3 -3
- package/dist/client/{chunk-BOIHIU7E.mjs → chunk-E2TDNXCL.mjs} +1 -1
- package/dist/client/{chunk-PFBX3IQL.mjs → chunk-GMVTOKYG.mjs} +2 -2
- package/dist/client/{chunk-FGUIVT2B.mjs → chunk-JNC7CGHX.mjs} +1 -1
- package/dist/client/{chunk-SNSWVZEP.mjs → chunk-L3DNHIJX.mjs} +3 -3
- package/dist/client/{chunk-7UOSCYY4.mjs → chunk-R56FQ3RR.mjs} +92 -0
- package/dist/client/{chunk-J227A3CQ.mjs → chunk-UFSWADAO.mjs} +1 -1
- package/dist/client/client.mjs +3579 -1351
- package/dist/client/{courseRegistration-ZBXS7VGI.mjs → courseRegistration-7F65K5ZR.mjs} +2 -2
- package/dist/client/{eventCalendar-EQQZHJBA.mjs → eventCalendar-GLSC5KTL.mjs} +4 -4
- package/dist/client/{eventCombined-JCFTGBFQ.mjs → eventCombined-ZHK4WKUR.mjs} +4 -4
- package/dist/client/{eventDetails-HLUTQSYY.mjs → eventDetails-E3PJYBIN.mjs} +4 -4
- package/dist/client/{eventListing-FG4MICVB.mjs → eventListing-EMS3WC3E.mjs} +4 -4
- package/dist/client/{eventRegistration-GUEB7LBT.mjs → eventRegistration-NZOTVNPI.mjs} +4 -4
- package/dist/client/{form-YQEW4YIT.mjs → form-ETFZFATW.mjs} +1 -1
- package/dist/client/{headerSection-GTR3TTRM.mjs → headerSection-4LBP7ULT.mjs} +2 -2
- package/dist/client/hooks.mjs +2226 -402
- package/dist/client/{locationMap-SPC7VGUH.mjs → locationMap-5M655YSJ.mjs} +1 -1
- package/dist/client/{newsletterForm-4IW5BLID.mjs → newsletterForm-QOUYW44O.mjs} +1 -1
- package/dist/client/{productDetail-KP5H2WJO.mjs → productDetail-O4DOCWQG.mjs} +3 -3
- package/dist/client/{productList-3M3M72XZ.mjs → productList-A5RO5WIS.mjs} +3 -3
- package/dist/client/rendering/client.mjs +198 -32
- package/dist/client/rendering/islands.mjs +18 -18
- package/dist/client/rendering.mjs +3573 -1355
- package/dist/client/{shop-ACQKVGOM.mjs → shop-L4MZH4I2.mjs} +3 -3
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/{sdk-runtime-K7HNB4U2.mjs → sdk-runtime-6UT2S7KZ.mjs} +5 -5
- package/dist/server/components.mjs +3497 -1333
- package/dist/server/config-validation.mjs +2229 -402
- package/dist/server/config.mjs +2229 -402
- package/dist/server/data.mjs +2226 -402
- package/dist/server/index.mjs +31 -2
- package/dist/server/next.mjs +3503 -1329
- package/dist/server/page-converter.mjs +2213 -403
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +3497 -1333
- package/dist/server/rendering.mjs +3497 -1333
- package/dist/server/routing.mjs +2250 -363
- package/dist/server/server.mjs +2243 -400
- package/dist/server/theme-bridge.mjs +1313 -1035
- package/dist/server/theme.mjs +237 -12
- package/dist/styles/index.css +1081 -1028
- package/package.json +1 -1
- package/dist/SdkPreviewModeRuntime-ZQNDCASH.mjs +0 -8
|
@@ -192,6 +192,44 @@ export declare const tileTreatmentValues: readonly ["default", "quiet", "brand-d
|
|
|
192
192
|
export type TileTreatment = (typeof tileTreatmentValues)[number];
|
|
193
193
|
export declare const eyebrowTreatmentValues: readonly ["plain", "pill", "accent-pill", "pill-bounce", "accent-pill-bounce"];
|
|
194
194
|
export type EyebrowTreatment = (typeof eyebrowTreatmentValues)[number];
|
|
195
|
+
export declare const headingDecorationFamilyValues: readonly ["none", "organic-squiggle", "short-center-rule"];
|
|
196
|
+
export type HeadingDecorationFamily = (typeof headingDecorationFamilyValues)[number];
|
|
197
|
+
export type VisibleHeadingDecorationFamily = Exclude<HeadingDecorationFamily, 'none'>;
|
|
198
|
+
export declare const visibleHeadingDecorationFamilyValues: readonly ["organic-squiggle", "short-center-rule"];
|
|
199
|
+
export declare const headingDecorationPlacementValues: readonly ["none", "after-heading", "between-heading-and-body", "under-centered-heading"];
|
|
200
|
+
export type HeadingDecorationPlacement = (typeof headingDecorationPlacementValues)[number];
|
|
201
|
+
export type VisibleHeadingDecorationPlacement = Exclude<HeadingDecorationPlacement, 'none'>;
|
|
202
|
+
export declare const visibleHeadingDecorationPlacementValues: readonly ["after-heading", "between-heading-and-body", "under-centered-heading"];
|
|
203
|
+
export declare const headingDecorationOverrideValues: readonly ["site-default", "on", "off"];
|
|
204
|
+
export type HeadingDecorationOverride = (typeof headingDecorationOverrideValues)[number];
|
|
205
|
+
export declare const headingDecorationColorTokenValues: readonly ["text", "primary", "secondary", "accent", "border", "muted"];
|
|
206
|
+
export type HeadingDecorationColorToken = (typeof headingDecorationColorTokenValues)[number];
|
|
207
|
+
export type NoHeadingDecoration = Readonly<{
|
|
208
|
+
family: 'none';
|
|
209
|
+
placement: 'none';
|
|
210
|
+
}>;
|
|
211
|
+
export type VisibleHeadingDecoration = Readonly<{
|
|
212
|
+
family: VisibleHeadingDecorationFamily;
|
|
213
|
+
placement: VisibleHeadingDecorationPlacement;
|
|
214
|
+
colorToken?: HeadingDecorationColorToken;
|
|
215
|
+
}>;
|
|
216
|
+
export type HeadingDecoration = NoHeadingDecoration | VisibleHeadingDecoration;
|
|
217
|
+
export declare const noHeadingDecoration: {
|
|
218
|
+
readonly family: "none";
|
|
219
|
+
readonly placement: "none";
|
|
220
|
+
};
|
|
221
|
+
export declare const accordionIconSetValues: readonly ["plus", "chevron", "caret", "minimal-cross"];
|
|
222
|
+
export type AccordionIconSet = (typeof accordionIconSetValues)[number];
|
|
223
|
+
export declare const accordionIconColorTokenValues: readonly ["text", "muted", "primary", "secondary", "accent", "current"];
|
|
224
|
+
export type AccordionIconColorToken = (typeof accordionIconColorTokenValues)[number];
|
|
225
|
+
export declare const accordionIconMotionValues: readonly ["none", "rotate", "swap"];
|
|
226
|
+
export type AccordionIconMotion = (typeof accordionIconMotionValues)[number];
|
|
227
|
+
export type AccordionIconTreatment = Readonly<{
|
|
228
|
+
iconSet: AccordionIconSet;
|
|
229
|
+
colorToken: AccordionIconColorToken;
|
|
230
|
+
openColorToken?: AccordionIconColorToken;
|
|
231
|
+
motion: AccordionIconMotion;
|
|
232
|
+
}>;
|
|
195
233
|
export type GeneratedMediaCompositionIntent = Extract<MediaCompositionIntent, 'none' | 'supporting' | 'dominant'>;
|
|
196
234
|
export type UserMediaCompositionIntent = MediaCompositionIntent;
|
|
197
235
|
export type AdvancedMediaCompositionIntent = MediaCompositionIntent | AdvancedDetachedDesignValue;
|
|
@@ -346,6 +384,8 @@ export type BlockDesignPlan<TBlockId extends string = DesignBlockId, TPurpose ex
|
|
|
346
384
|
testimonialCardTreatment?: TestimonialCardTreatment;
|
|
347
385
|
tileTreatment?: TileTreatment;
|
|
348
386
|
eyebrowTreatment?: EyebrowTreatment;
|
|
387
|
+
headingDecoration?: HeadingDecoration;
|
|
388
|
+
accordionIconTreatment?: AccordionIconTreatment | null;
|
|
349
389
|
}>;
|
|
350
390
|
export type ResolvedBlockDesignPlan<TBlockId extends string = DesignBlockId, TPurpose extends string = string> = Readonly<BlockDesignPlan<TBlockId, TPurpose> & {
|
|
351
391
|
appliedSectionSurface: SiteStyleSurfaceIntent;
|
|
@@ -359,6 +399,8 @@ export type ResolvedBlockDesignPlan<TBlockId extends string = DesignBlockId, TPu
|
|
|
359
399
|
appliedTestimonialCardTreatment: TestimonialCardTreatment;
|
|
360
400
|
appliedTileTreatment: TileTreatment;
|
|
361
401
|
appliedEyebrowTreatment: EyebrowTreatment;
|
|
402
|
+
appliedHeadingDecoration: HeadingDecoration;
|
|
403
|
+
appliedAccordionIconTreatment: AccordionIconTreatment | null;
|
|
362
404
|
}>;
|
|
363
405
|
export type PageDesignState<TBlockId extends string = DesignBlockId, TPurpose extends string = string> = Readonly<{
|
|
364
406
|
schemaVersion: 1;
|
|
@@ -379,6 +421,8 @@ export type DesignedBlockDesignCapabilityInput = Readonly<{
|
|
|
379
421
|
testimonialCardTreatments?: NonEmptyReadonlyArray<TestimonialCardTreatment>;
|
|
380
422
|
tileTreatments?: NonEmptyReadonlyArray<TileTreatment>;
|
|
381
423
|
eyebrowTreatments?: NonEmptyReadonlyArray<EyebrowTreatment>;
|
|
424
|
+
headingDecorations?: NonEmptyReadonlyArray<VisibleHeadingDecorationFamily>;
|
|
425
|
+
accordionIconSets?: NonEmptyReadonlyArray<AccordionIconSet>;
|
|
382
426
|
}>;
|
|
383
427
|
export type DesignedBlockDesignCapability = Readonly<{
|
|
384
428
|
kind: 'designed';
|
|
@@ -391,6 +435,8 @@ export type DesignedBlockDesignCapability = Readonly<{
|
|
|
391
435
|
testimonialCardTreatments: NonEmptyReadonlyArray<TestimonialCardTreatment>;
|
|
392
436
|
tileTreatments: NonEmptyReadonlyArray<TileTreatment>;
|
|
393
437
|
eyebrowTreatments: NonEmptyReadonlyArray<EyebrowTreatment>;
|
|
438
|
+
headingDecorations?: NonEmptyReadonlyArray<VisibleHeadingDecorationFamily>;
|
|
439
|
+
accordionIconSets?: NonEmptyReadonlyArray<AccordionIconSet>;
|
|
394
440
|
}>;
|
|
395
441
|
export type UnsupportedBlockDesignCapabilityReason = 'site-chrome' | 'transactional' | 'placeholder' | 'legacy-layout' | 'custom-runtime';
|
|
396
442
|
export type NoBlockDesignCapability = Readonly<{
|
|
@@ -401,7 +447,7 @@ export type BlockDesignCapability = DesignedBlockDesignCapability | NoBlockDesig
|
|
|
401
447
|
export type BlockDesignCapabilityMap = Readonly<Partial<Record<string, BlockDesignCapability>>>;
|
|
402
448
|
export declare function defineBlockDesignCapability(capability: DesignedBlockDesignCapabilityInput): DesignedBlockDesignCapability;
|
|
403
449
|
export declare function defineNoBlockDesignCapability(reason: UnsupportedBlockDesignCapabilityReason): NoBlockDesignCapability;
|
|
404
|
-
export type DesignRepairAction = 'fallback-block-design' | 'fallback-section-surface' | 'fallback-content-frame' | 'fallback-item-surface' | 'fallback-section-height' | 'fallback-image-surface-treatment' | 'fallback-image-surface-motion' | 'fallback-testimonial-card-treatment' | 'fallback-tile-treatment' | 'fallback-eyebrow-treatment' | 'remove-hero-legibility' | 'remove-transition' | 'fallback-hero-legibility' | 'reduce-accent-density' | 'reduce-panel-density' | 'reduce-transition-mix' | 'reduce-primary-ctas' | 'reduce-media-density' | 'reduce-decorative-repetition';
|
|
450
|
+
export type DesignRepairAction = 'fallback-block-design' | 'fallback-section-surface' | 'fallback-content-frame' | 'fallback-item-surface' | 'fallback-section-height' | 'fallback-image-surface-treatment' | 'fallback-image-surface-motion' | 'fallback-testimonial-card-treatment' | 'fallback-tile-treatment' | 'fallback-eyebrow-treatment' | 'fallback-heading-decoration' | 'fallback-accordion-icon-treatment' | 'remove-hero-legibility' | 'remove-transition' | 'fallback-hero-legibility' | 'reduce-accent-density' | 'reduce-panel-density' | 'reduce-transition-mix' | 'reduce-primary-ctas' | 'reduce-media-density' | 'reduce-decorative-repetition';
|
|
405
451
|
export type UnsupportedSectionSurfaceIssue<TBlockId extends string = DesignBlockId, TPurpose extends string = string> = Readonly<{
|
|
406
452
|
kind: 'unsupported-section-surface';
|
|
407
453
|
blockId: TBlockId;
|
|
@@ -503,6 +549,28 @@ export type UnsupportedEyebrowTreatmentIssue<TBlockId extends string = DesignBlo
|
|
|
503
549
|
severity: DesignIssueSeverity;
|
|
504
550
|
allowedRepairActions: readonly ['fallback-eyebrow-treatment'];
|
|
505
551
|
}>;
|
|
552
|
+
export type UnsupportedHeadingDecorationIssue<TBlockId extends string = DesignBlockId, TPurpose extends string = string> = Readonly<{
|
|
553
|
+
kind: 'unsupported-heading-decoration';
|
|
554
|
+
blockId: TBlockId;
|
|
555
|
+
blockKind: string;
|
|
556
|
+
purpose: TPurpose;
|
|
557
|
+
requested: HeadingDecoration;
|
|
558
|
+
fallback: NoHeadingDecoration;
|
|
559
|
+
policy: DesignResolutionPolicy;
|
|
560
|
+
severity: DesignIssueSeverity;
|
|
561
|
+
allowedRepairActions: readonly ['fallback-heading-decoration'];
|
|
562
|
+
}>;
|
|
563
|
+
export type UnsupportedAccordionIconTreatmentIssue<TBlockId extends string = DesignBlockId, TPurpose extends string = string> = Readonly<{
|
|
564
|
+
kind: 'unsupported-accordion-icon-treatment';
|
|
565
|
+
blockId: TBlockId;
|
|
566
|
+
blockKind: string;
|
|
567
|
+
purpose: TPurpose;
|
|
568
|
+
requested: AccordionIconTreatment;
|
|
569
|
+
fallback: null;
|
|
570
|
+
policy: DesignResolutionPolicy;
|
|
571
|
+
severity: DesignIssueSeverity;
|
|
572
|
+
allowedRepairActions: readonly ['fallback-accordion-icon-treatment'];
|
|
573
|
+
}>;
|
|
506
574
|
export type ImageSurfaceTreatmentWithoutImageSurfaceIssue<TBlockId extends string = DesignBlockId, TPurpose extends string = string> = Readonly<{
|
|
507
575
|
kind: 'image-surface-treatment-without-image-surface';
|
|
508
576
|
blockId: TBlockId;
|
|
@@ -550,6 +618,8 @@ export type BlockDesignCapabilityRequest = Readonly<{
|
|
|
550
618
|
testimonialCardTreatment?: TestimonialCardTreatment;
|
|
551
619
|
tileTreatment?: TileTreatment;
|
|
552
620
|
eyebrowTreatment?: EyebrowTreatment;
|
|
621
|
+
headingDecoration?: HeadingDecoration;
|
|
622
|
+
accordionIconTreatment?: AccordionIconTreatment | null;
|
|
553
623
|
}>;
|
|
554
624
|
export type BlockDesignCapabilityFallback = Readonly<{
|
|
555
625
|
sectionSurface: 'base';
|
|
@@ -565,6 +635,8 @@ export type BlockDesignCapabilityFallback = Readonly<{
|
|
|
565
635
|
testimonialCardTreatment: 'default';
|
|
566
636
|
tileTreatment: 'default';
|
|
567
637
|
eyebrowTreatment: 'plain';
|
|
638
|
+
headingDecoration: NoHeadingDecoration;
|
|
639
|
+
accordionIconTreatment: null;
|
|
568
640
|
}>;
|
|
569
641
|
export type MissingBlockDesignCapabilityIssue<TBlockId extends string = DesignBlockId, TPurpose extends string = string> = Readonly<{
|
|
570
642
|
kind: 'missing-block-design-capability';
|
|
@@ -611,7 +683,7 @@ export type HeroImageWithoutLegibilityIssue<TBlockId extends string = DesignBloc
|
|
|
611
683
|
severity: DesignIssueSeverity;
|
|
612
684
|
allowedRepairActions: readonly ['fallback-hero-legibility'];
|
|
613
685
|
}>;
|
|
614
|
-
export type DesignResolutionIssue<TBlockId extends string = DesignBlockId, TPurpose extends string = string> = UnsupportedSectionSurfaceIssue<TBlockId, TPurpose> | UnsupportedContentFrameIssue<TBlockId, TPurpose> | UnsupportedItemSurfaceIssue<TBlockId, TPurpose> | UnsupportedSectionHeightIssue<TBlockId, TPurpose> | UnsupportedImageSurfaceTreatmentIssue<TBlockId, TPurpose> | UnsupportedImageSurfaceMotionIssue<TBlockId, TPurpose> | UnsupportedTestimonialCardTreatmentIssue<TBlockId, TPurpose> | UnsupportedTileTreatmentIssue<TBlockId, TPurpose> | UnsupportedEyebrowTreatmentIssue<TBlockId, TPurpose> | ImageSurfaceTreatmentWithoutImageSurfaceIssue<TBlockId, TPurpose> | ImageSurfaceMotionWithoutImageSurfaceIssue<TBlockId, TPurpose> | HeroLegibilityOverriddenByImageSurfaceTreatmentIssue<TBlockId, TPurpose> | MissingBlockDesignCapabilityIssue<TBlockId, TPurpose> | UnsupportedBlockDesignCapabilityIssue<TBlockId, TPurpose> | RemovedTransitionForFlushFrameIssue<TBlockId, TPurpose> | HeroImageWithoutLegibilityIssue<TBlockId, TPurpose>;
|
|
686
|
+
export type DesignResolutionIssue<TBlockId extends string = DesignBlockId, TPurpose extends string = string> = UnsupportedSectionSurfaceIssue<TBlockId, TPurpose> | UnsupportedContentFrameIssue<TBlockId, TPurpose> | UnsupportedItemSurfaceIssue<TBlockId, TPurpose> | UnsupportedSectionHeightIssue<TBlockId, TPurpose> | UnsupportedImageSurfaceTreatmentIssue<TBlockId, TPurpose> | UnsupportedImageSurfaceMotionIssue<TBlockId, TPurpose> | UnsupportedTestimonialCardTreatmentIssue<TBlockId, TPurpose> | UnsupportedTileTreatmentIssue<TBlockId, TPurpose> | UnsupportedEyebrowTreatmentIssue<TBlockId, TPurpose> | UnsupportedHeadingDecorationIssue<TBlockId, TPurpose> | UnsupportedAccordionIconTreatmentIssue<TBlockId, TPurpose> | ImageSurfaceTreatmentWithoutImageSurfaceIssue<TBlockId, TPurpose> | ImageSurfaceMotionWithoutImageSurfaceIssue<TBlockId, TPurpose> | HeroLegibilityOverriddenByImageSurfaceTreatmentIssue<TBlockId, TPurpose> | MissingBlockDesignCapabilityIssue<TBlockId, TPurpose> | UnsupportedBlockDesignCapabilityIssue<TBlockId, TPurpose> | RemovedTransitionForFlushFrameIssue<TBlockId, TPurpose> | HeroImageWithoutLegibilityIssue<TBlockId, TPurpose>;
|
|
615
687
|
export type DesignRepairResultForIssue<TIssue extends DesignResolutionIssue<string, string>> = {
|
|
616
688
|
[TKind in TIssue['kind']]: Readonly<{
|
|
617
689
|
kind: TKind extends 'removed-transition-for-flush-frame' ? 'repaired' : 'fallbackApplied';
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import type { Theme } from '../schema';
|
|
2
|
+
import type { Brand, NonEmptyReadonlyArray } from './types';
|
|
3
|
+
import type { PersistedIdParseResult } from './persistedIdParseResult';
|
|
4
|
+
export type TypographyPresetId = Brand<string, 'TypographyPresetId'>;
|
|
5
|
+
export declare const typographyPresetIdValues: readonly ["typography-preset:modern-sans", "typography-preset:warm-rounded", "typography-preset:editorial-serif", "typography-preset:classic-serif", "typography-preset:luxe-contrast", "typography-preset:bold-display"];
|
|
6
|
+
export type KnownTypographyPresetIdValue = typeof typographyPresetIdValues[number];
|
|
7
|
+
export type KnownTypographyPresetId = TypographyPresetId & KnownTypographyPresetIdValue;
|
|
8
|
+
export type TypographyFontSlot = 'body' | 'heading';
|
|
9
|
+
export type GoogleFontCategory = 'serif' | 'sans-serif' | 'display' | 'handwriting' | 'monospace';
|
|
10
|
+
export type TypographyFontCapability = Readonly<{
|
|
11
|
+
source: 'google' | 'uploaded' | 'unknown';
|
|
12
|
+
family: string;
|
|
13
|
+
category: GoogleFontCategory | 'unknown';
|
|
14
|
+
variants: readonly string[];
|
|
15
|
+
variableWeightRange?: Readonly<{
|
|
16
|
+
min: number;
|
|
17
|
+
max: number;
|
|
18
|
+
}> | null;
|
|
19
|
+
}>;
|
|
20
|
+
export type TypographyFontSlotPolicy = Readonly<{
|
|
21
|
+
recommendedCategories: readonly GoogleFontCategory[];
|
|
22
|
+
allowedCategories: readonly GoogleFontCategory[];
|
|
23
|
+
requiresItalicForBody?: boolean;
|
|
24
|
+
requiresBoldForBody?: boolean;
|
|
25
|
+
}>;
|
|
26
|
+
export type TypographyFontSlotFit = Readonly<{
|
|
27
|
+
kind: 'recommended';
|
|
28
|
+
reason: string;
|
|
29
|
+
}> | Readonly<{
|
|
30
|
+
kind: 'compatible';
|
|
31
|
+
reason: string;
|
|
32
|
+
}> | Readonly<{
|
|
33
|
+
kind: 'limited';
|
|
34
|
+
reason: string;
|
|
35
|
+
}> | Readonly<{
|
|
36
|
+
kind: 'risky';
|
|
37
|
+
reason: string;
|
|
38
|
+
}> | Readonly<{
|
|
39
|
+
kind: 'unknown';
|
|
40
|
+
reason: string;
|
|
41
|
+
}>;
|
|
42
|
+
export type TypographyPreset = Readonly<{
|
|
43
|
+
id: KnownTypographyPresetId;
|
|
44
|
+
name: string;
|
|
45
|
+
description: string;
|
|
46
|
+
defaultFonts: Readonly<{
|
|
47
|
+
body: string;
|
|
48
|
+
heading: string;
|
|
49
|
+
}>;
|
|
50
|
+
recommendedFonts: Readonly<{
|
|
51
|
+
body: NonEmptyReadonlyArray<string>;
|
|
52
|
+
heading: NonEmptyReadonlyArray<string>;
|
|
53
|
+
}>;
|
|
54
|
+
slotPolicies: Readonly<Record<TypographyFontSlot, TypographyFontSlotPolicy>>;
|
|
55
|
+
typography: Theme['typography'];
|
|
56
|
+
heroTypography?: NonNullable<NonNullable<Theme['hero']>['typography']>;
|
|
57
|
+
}>;
|
|
58
|
+
export type TypographySelection = Readonly<{
|
|
59
|
+
kind: 'preset';
|
|
60
|
+
presetId: TypographyPresetId | null;
|
|
61
|
+
bodyFontOverride: string | null;
|
|
62
|
+
headingFontOverride: string | null;
|
|
63
|
+
}> | Readonly<{
|
|
64
|
+
kind: 'custom';
|
|
65
|
+
typography: Theme['typography'];
|
|
66
|
+
}>;
|
|
67
|
+
export type CompiledTypographySelection = Readonly<{
|
|
68
|
+
themeTypography: Theme['typography'];
|
|
69
|
+
heroTypography?: NonNullable<NonNullable<Theme['hero']>['typography']>;
|
|
70
|
+
resolvedSelection: Readonly<{
|
|
71
|
+
kind: 'preset';
|
|
72
|
+
presetId: KnownTypographyPresetId;
|
|
73
|
+
bodyFontOverride: string | null;
|
|
74
|
+
headingFontOverride: string | null;
|
|
75
|
+
}> | Readonly<{
|
|
76
|
+
kind: 'custom';
|
|
77
|
+
}>;
|
|
78
|
+
}>;
|
|
79
|
+
export type TypographyPresetResolutionWarning = Readonly<{
|
|
80
|
+
kind: 'rejected-typography-preset';
|
|
81
|
+
requested: string;
|
|
82
|
+
fellBackTo: KnownTypographyPresetId;
|
|
83
|
+
reason: 'unknown' | 'not-curated-for-style';
|
|
84
|
+
}>;
|
|
85
|
+
export declare function asTypographyPresetId(value: KnownTypographyPresetIdValue): KnownTypographyPresetId;
|
|
86
|
+
export declare function asTypographyPresetId(value: string): TypographyPresetId;
|
|
87
|
+
export declare const typographyPresets: readonly [Readonly<{
|
|
88
|
+
id: KnownTypographyPresetId;
|
|
89
|
+
name: string;
|
|
90
|
+
description: string;
|
|
91
|
+
defaultFonts: Readonly<{
|
|
92
|
+
body: string;
|
|
93
|
+
heading: string;
|
|
94
|
+
}>;
|
|
95
|
+
recommendedFonts: Readonly<{
|
|
96
|
+
body: NonEmptyReadonlyArray<string>;
|
|
97
|
+
heading: NonEmptyReadonlyArray<string>;
|
|
98
|
+
}>;
|
|
99
|
+
slotPolicies: Readonly<Record<TypographyFontSlot, TypographyFontSlotPolicy>>;
|
|
100
|
+
typography: Theme["typography"];
|
|
101
|
+
heroTypography?: NonNullable<NonNullable<Theme["hero"]>["typography"]>;
|
|
102
|
+
}>, Readonly<{
|
|
103
|
+
id: KnownTypographyPresetId;
|
|
104
|
+
name: string;
|
|
105
|
+
description: string;
|
|
106
|
+
defaultFonts: Readonly<{
|
|
107
|
+
body: string;
|
|
108
|
+
heading: string;
|
|
109
|
+
}>;
|
|
110
|
+
recommendedFonts: Readonly<{
|
|
111
|
+
body: NonEmptyReadonlyArray<string>;
|
|
112
|
+
heading: NonEmptyReadonlyArray<string>;
|
|
113
|
+
}>;
|
|
114
|
+
slotPolicies: Readonly<Record<TypographyFontSlot, TypographyFontSlotPolicy>>;
|
|
115
|
+
typography: Theme["typography"];
|
|
116
|
+
heroTypography?: NonNullable<NonNullable<Theme["hero"]>["typography"]>;
|
|
117
|
+
}>, Readonly<{
|
|
118
|
+
id: KnownTypographyPresetId;
|
|
119
|
+
name: string;
|
|
120
|
+
description: string;
|
|
121
|
+
defaultFonts: Readonly<{
|
|
122
|
+
body: string;
|
|
123
|
+
heading: string;
|
|
124
|
+
}>;
|
|
125
|
+
recommendedFonts: Readonly<{
|
|
126
|
+
body: NonEmptyReadonlyArray<string>;
|
|
127
|
+
heading: NonEmptyReadonlyArray<string>;
|
|
128
|
+
}>;
|
|
129
|
+
slotPolicies: Readonly<Record<TypographyFontSlot, TypographyFontSlotPolicy>>;
|
|
130
|
+
typography: Theme["typography"];
|
|
131
|
+
heroTypography?: NonNullable<NonNullable<Theme["hero"]>["typography"]>;
|
|
132
|
+
}>, Readonly<{
|
|
133
|
+
id: KnownTypographyPresetId;
|
|
134
|
+
name: string;
|
|
135
|
+
description: string;
|
|
136
|
+
defaultFonts: Readonly<{
|
|
137
|
+
body: string;
|
|
138
|
+
heading: string;
|
|
139
|
+
}>;
|
|
140
|
+
recommendedFonts: Readonly<{
|
|
141
|
+
body: NonEmptyReadonlyArray<string>;
|
|
142
|
+
heading: NonEmptyReadonlyArray<string>;
|
|
143
|
+
}>;
|
|
144
|
+
slotPolicies: Readonly<Record<TypographyFontSlot, TypographyFontSlotPolicy>>;
|
|
145
|
+
typography: Theme["typography"];
|
|
146
|
+
heroTypography?: NonNullable<NonNullable<Theme["hero"]>["typography"]>;
|
|
147
|
+
}>, Readonly<{
|
|
148
|
+
id: KnownTypographyPresetId;
|
|
149
|
+
name: string;
|
|
150
|
+
description: string;
|
|
151
|
+
defaultFonts: Readonly<{
|
|
152
|
+
body: string;
|
|
153
|
+
heading: string;
|
|
154
|
+
}>;
|
|
155
|
+
recommendedFonts: Readonly<{
|
|
156
|
+
body: NonEmptyReadonlyArray<string>;
|
|
157
|
+
heading: NonEmptyReadonlyArray<string>;
|
|
158
|
+
}>;
|
|
159
|
+
slotPolicies: Readonly<Record<TypographyFontSlot, TypographyFontSlotPolicy>>;
|
|
160
|
+
typography: Theme["typography"];
|
|
161
|
+
heroTypography?: NonNullable<NonNullable<Theme["hero"]>["typography"]>;
|
|
162
|
+
}>, Readonly<{
|
|
163
|
+
id: KnownTypographyPresetId;
|
|
164
|
+
name: string;
|
|
165
|
+
description: string;
|
|
166
|
+
defaultFonts: Readonly<{
|
|
167
|
+
body: string;
|
|
168
|
+
heading: string;
|
|
169
|
+
}>;
|
|
170
|
+
recommendedFonts: Readonly<{
|
|
171
|
+
body: NonEmptyReadonlyArray<string>;
|
|
172
|
+
heading: NonEmptyReadonlyArray<string>;
|
|
173
|
+
}>;
|
|
174
|
+
slotPolicies: Readonly<Record<TypographyFontSlot, TypographyFontSlotPolicy>>;
|
|
175
|
+
typography: Theme["typography"];
|
|
176
|
+
heroTypography?: NonNullable<NonNullable<Theme["hero"]>["typography"]>;
|
|
177
|
+
}>];
|
|
178
|
+
export declare function findTypographyPreset(id: TypographyPresetId): TypographyPreset | undefined;
|
|
179
|
+
export declare function parsePersistedTypographyPresetId(value: string | null | undefined): PersistedIdParseResult<KnownTypographyPresetId>;
|
|
180
|
+
export declare function compileTypographySelection(input: Readonly<{
|
|
181
|
+
selection: TypographySelection | null | undefined;
|
|
182
|
+
defaultPresetId: KnownTypographyPresetId;
|
|
183
|
+
}>): CompiledTypographySelection;
|
|
184
|
+
export declare function applyTypographyFontOverrides(typography: Theme['typography'], bodyFontOverride: string | null, headingFontOverride: string | null): Theme['typography'];
|
|
185
|
+
export declare function evaluateTypographyFontSlot(input: Readonly<{
|
|
186
|
+
slot: TypographyFontSlot;
|
|
187
|
+
policy: TypographyFontSlotPolicy;
|
|
188
|
+
capability: TypographyFontCapability;
|
|
189
|
+
}>): TypographyFontSlotFit;
|