@riverbankcms/sdk 0.135.1 → 0.137.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +114 -0
- package/README.md +4 -8
- package/dist/{PreviewEditorSidebar-D4p_5TdY.mjs → PreviewEditorSidebar-Bn6cONPa.mjs} +8 -8
- package/dist/{PreviewEditorUI-D0cRoTX1.mjs → PreviewEditorUI-LAwXZPSx.mjs} +3 -3
- package/dist/{PreviewQueryProvider-DcgaESkm.mjs → PreviewQueryProvider-ztQUdsNo.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-BKLtM3Nz.mjs → SdkPreviewModeRuntime-BbbGsI_v.mjs} +621 -238
- package/dist/{SiteChromeCustomizeContext-61X2m7QV.mjs → SiteChromeCustomizeContext-BbkNSt5a.mjs} +5041 -2407
- package/dist/_dts/ai/src/contracts/proposals.d.ts +18 -850
- package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +412 -2316
- package/dist/_dts/ai/src/designer/themePatch.d.ts +5 -10
- package/dist/_dts/api/src/accessAdmin.d.ts +1 -9
- package/dist/_dts/api/src/accountApi.d.ts +49 -2
- package/dist/_dts/api/src/contentRuntime.d.ts +7 -4
- package/dist/_dts/api/src/domainConnection.d.ts +41 -0
- package/dist/_dts/api/src/endpoints.d.ts +201 -181
- package/dist/_dts/api/src/index.d.ts +5 -3
- package/dist/_dts/api/src/media.d.ts +19 -2
- package/dist/_dts/api/src/publicEventEndpointDefinitions.d.ts +7 -0
- package/dist/_dts/api/src/publicExperience/eventEndpoints.d.ts +26 -0
- package/dist/_dts/api/src/sdkBlockContentAdmission.d.ts +5 -0
- package/dist/_dts/api/src/sdkContracts.d.ts +2 -15
- package/dist/_dts/api/src/sdkMediaContracts.d.ts +40 -0
- package/dist/_dts/api/src/sdkMediaEndpointDefinitions.d.ts +61 -0
- package/dist/_dts/api/src/sdkThemeWire.d.ts +21 -436
- package/dist/_dts/api/src/siteInfrastructure.d.ts +17 -23
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +7 -21
- package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +27 -3
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +37 -17
- package/dist/_dts/api/src/types.d.ts +1 -1
- package/dist/_dts/block-form/src/blockDraftSaveability.d.ts +2 -3
- package/dist/_dts/block-form/src/utils/slug.d.ts +6 -0
- package/dist/_dts/blocks/src/PageRenderer.d.ts +13 -7
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +48 -0
- package/dist/_dts/blocks/src/definitions.d.ts +14 -0
- package/dist/_dts/blocks/src/index.d.ts +4 -3
- package/dist/_dts/blocks/src/pageRenderAdmission.d.ts +49 -0
- package/dist/_dts/blocks/src/pageRendererBlockSupport.d.ts +75 -0
- package/dist/_dts/blocks/src/pageRendererBoundaries.d.ts +2 -0
- package/dist/_dts/blocks/src/server.d.ts +2 -2
- package/dist/_dts/blocks/src/system/blocks/event-registration.d.ts +1 -1
- package/dist/_dts/blocks/src/system/data/index.d.ts +2 -0
- package/dist/_dts/blocks/src/system/data/publicLoaderCachePolicy.d.ts +78 -0
- package/dist/_dts/blocks/src/system/manifest/fieldValidation/index.d.ts +2 -18
- package/dist/_dts/blocks/src/system/manifest/validation.d.ts +103 -16
- package/dist/_dts/blocks/src/system/node/validation-constants.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/api/client.d.ts +4 -2
- package/dist/_dts/blocks/src/system/runtime/api/endpoints.d.ts +8 -0
- 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 +19 -0
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +52 -0
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +24 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useCalendarEvents.d.ts +47 -21
- package/dist/_dts/blocks/src/system/runtime/hooks/useCalendarEvents.state.d.ts +38 -9
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/ErrorStep.d.ts +3 -5
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/VerifyingTimeoutStep.d.ts +3 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.contract.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.planning.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/hooks.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationErrorPresentation.d.ts +5 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationErrorRecovery.d.ts +25 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationWizardContext.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationStripeReturn.d.ts +8 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationSubmit.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +5 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useWaitlistClaimRestoration.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCalendar.client.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCalendar.interactive.d.ts +40 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.client.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.interactive.d.ts +43 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/domain/capacity.d.ts +164 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/domain/cta.d.ts +29 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/domain/dates.d.ts +47 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/domain/index.d.ts +14 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/domain/people.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/domain/pricing.d.ts +31 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/CalendarDayCell.d.ts +3 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/CalendarNavigationChevron.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/DayEventsModal.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventModalContext.d.ts +3 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/OfferingTitle.d.ts +11 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/WeekAgendaView.d.ts +4 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/WeekBoardView.d.ts +31 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/WeekTimetableView.d.ts +3 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +9 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/index.d.ts +3 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/listingLayout.d.ts +23 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/timetableModel.d.ts +4 -3
- package/dist/_dts/blocks/src/system/transforms/registry/layout.d.ts +0 -1
- package/dist/_dts/calendar/src/grid.d.ts +24 -66
- package/dist/_dts/calendar/src/index.d.ts +2 -2
- package/dist/_dts/calendar/src/timetable.d.ts +5 -9
- package/dist/_dts/commerce/src/purchase/allocation.d.ts +11 -0
- package/dist/_dts/commerce/src/purchase/event-registration-errors.d.ts +57 -0
- package/dist/_dts/commerce/src/purchase/index.d.ts +3 -0
- package/dist/_dts/commerce/src/purchase/settlement.d.ts +33 -0
- package/dist/_dts/commerce/src/purchase/stripeCheckoutReturnUrl.d.ts +8 -0
- package/dist/_dts/content-model/src/templates/defaults.d.ts +6 -0
- package/dist/_dts/core/src/slug.d.ts +20 -5
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +8 -40
- package/dist/_dts/db/src/index.d.ts +1 -0
- package/dist/_dts/db/src/utils/postgrestFilter.d.ts +2 -0
- package/dist/_dts/media-core/src/bulkDeletePlanning.d.ts +4 -0
- package/dist/_dts/media-core/src/fileDomain.d.ts +3 -0
- package/dist/_dts/preview-next/src/client/blocks/EditablePageRenderer.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +1 -0
- package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +1 -0
- package/dist/_dts/preview-next/src/client/preview/SiteChromeCustomizeContext.d.ts +3 -2
- package/dist/_dts/preview-next/src/client/preview/headerInteractionPaletteSurfaceState.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/siteChromeBrandPreferences.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/preview/siteChromeQuickControlHistoryState.d.ts +2 -0
- package/dist/_dts/preview-next/src/client/preview/siteChromeQuickControlSaveRequest.d.ts +51 -0
- package/dist/_dts/preview-next/src/client/preview/siteChromeSavePlan.d.ts +24 -2
- package/dist/_dts/preview-next/src/client/preview/siteStylePreviewPlanner.d.ts +23 -1
- package/dist/_dts/preview-next/src/client/preview/usePersistedHeaderPreferences.d.ts +8 -0
- package/dist/_dts/sdk/src/client/publicLoaderCacheAccess.d.ts +6 -0
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +7 -2
- package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +10 -6
- package/dist/_dts/sdk/src/rendering/components/Block.shared.d.ts +0 -1
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +4 -4
- package/dist/_dts/sdk/src/rendering/helpers/footerPageOutline.d.ts +3 -0
- package/dist/_dts/sdk/src/rendering/helpers/loadContent.d.ts +3 -0
- package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +17 -0
- package/dist/_dts/sdk/src/rendering/helpers/templateContent.d.ts +9 -3
- package/dist/_dts/sdk/src/rendering/hooks/usePage.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/index.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/overrideResolution.d.ts +7 -4
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/theme-core/src/cards/types.d.ts +8 -8
- package/dist/_dts/theme-core/src/data.d.ts +12 -0
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/gradients/types.d.ts +5 -0
- package/dist/_dts/theme-core/src/header/interactionPalette.d.ts +25 -2
- package/dist/_dts/theme-core/src/header/legacyHeaderVariant.d.ts +2 -6
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +9 -810
- package/dist/_dts/theme-core/src/schema.d.ts +460 -1285
- package/dist/_dts/theme-core/src/site-styles/compilationPlan.d.ts +43 -3
- package/dist/_dts/theme-core/src/site-styles/curatedSiteStyles.d.ts +223 -1
- package/dist/_dts/theme-core/src/site-styles/headerBrandPresentation.d.ts +63 -0
- package/dist/_dts/theme-core/src/site-styles/headerBytesComparison.d.ts +30 -0
- package/dist/_dts/theme-core/src/site-styles/headerInteractionPalette.d.ts +50 -1
- package/dist/_dts/theme-core/src/site-styles/headerLayoutCatalog.d.ts +48 -38
- package/dist/_dts/theme-core/src/site-styles/headerLayoutStyles.d.ts +10 -0
- package/dist/_dts/theme-core/src/site-styles/headerLayoutTypes.d.ts +8 -5
- package/dist/_dts/theme-core/src/site-styles/headerOpeningForeground.d.ts +4 -4
- package/dist/_dts/theme-core/src/site-styles/headerPreferences.d.ts +162 -0
- package/dist/_dts/theme-core/src/site-styles/headerPreferencesPersistence.d.ts +73 -0
- package/dist/_dts/theme-core/src/site-styles/headerRecompile.d.ts +118 -0
- package/dist/_dts/theme-core/src/site-styles/headerStyleCompiler.d.ts +25 -2
- package/dist/_dts/theme-core/src/site-styles/headerStyleDefaults.d.ts +465 -0
- package/dist/_dts/theme-core/src/site-styles/headerStyleRecipe.d.ts +168 -0
- package/dist/_dts/theme-core/src/site-styles/index.d.ts +5 -0
- package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +1 -1
- package/dist/_dts/theme-core/src/site-styles/siteChromeBackgrounds.d.ts +20 -1
- package/dist/_dts/theme-core/src/site-styles/siteChromeNavPreferences.d.ts +43 -2
- package/dist/client/{BookingConsentAgreement-Bz9znbpn.mjs → BookingConsentAgreement--_fUCZe-.mjs} +2 -2
- package/dist/client/{DiscountCodeDisclosure-35Ru8yB9.mjs → DiscountCodeDisclosure-BMipSoDJ.mjs} +1 -1
- package/dist/client/{EventCombined.client-BKB0ZxRR.mjs → EventCombined.client-CwJOxn7A.mjs} +274 -278
- package/dist/client/{EventListing.client-Dx8I21ok.mjs → EventListing.client-eVwiylPW.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-CEWx-Bhe.mjs → LeafletStaticMap-IKenna5u.mjs} +1 -1
- package/dist/client/{accordion-KIDsKTwS.mjs → accordion-MGAO3PuE.mjs} +1 -1
- package/dist/client/{bookingForm-D96Rmp-5.mjs → bookingForm-CudlQPUu.mjs} +5 -5
- package/dist/client/bookings.mjs +476 -98
- package/dist/client/capacity-BW00PO7s.mjs +271 -0
- package/dist/client/{carousel-YwUgyL66.mjs → carousel-BrbGJ2Jl.mjs} +1 -1
- package/dist/client/{cart-BbwuNrUT.mjs → cart-Bq5eU0xZ.mjs} +3 -3
- package/dist/client/{checkout-hp1ucmEY.mjs → checkout-BAFVRdrK.mjs} +3 -3
- package/dist/client/client.mjs +4641 -2721
- package/dist/client/{context-DljQn8L5.mjs → context-DCkiHVdD.mjs} +20 -5
- package/dist/client/dates-2RPXHQy4.mjs +264 -0
- package/dist/client/{eventCalendar-DU4iNLpo.mjs → eventCalendar-B0O-hPF7.mjs} +261 -126
- package/dist/client/{eventCombined-CZuupW8m.mjs → eventCombined-DCkDaoDI.mjs} +3 -3
- package/dist/client/{eventDetails-DPQWwCIi.mjs → eventDetails-D8GG2dnD.mjs} +7 -4
- package/dist/client/{eventListing-C7oMidwS.mjs → eventListing-3ssV_bxz.mjs} +3 -3
- package/dist/client/{eventRegistration-zEiunlUs.mjs → eventRegistration-bPQo3kVw.mjs} +610 -313
- package/dist/client/{form-D2KIyCVJ.mjs → form-qMv8RDkk.mjs} +2 -2
- package/dist/client/{headerSection-CK5uChUK.mjs → headerSection-CH0Sc5hX.mjs} +2 -2
- package/dist/client/hooks.mjs +2514 -308
- package/dist/client/{locationMap-DLQNH1ln.mjs → locationMap-0_xlBnNI.mjs} +2 -2
- package/dist/client/{newsletterForm-ZuhIG7fZ.mjs → newsletterForm-NUW7m9RI.mjs} +2 -2
- package/dist/client/{productDetail-7hIcGeae.mjs → productDetail-FBEOM7jW.mjs} +3 -3
- package/dist/client/{productList-T4Cii1ot.mjs → productList-R0OSGhnn.mjs} +3 -3
- package/dist/client/{propsDecoder-mB0aC_Fi.mjs → propsDecoder-pYvx_Srl.mjs} +179 -401
- package/dist/client/rendering/client.mjs +3496 -2223
- package/dist/client/rendering/islands.mjs +17 -17
- package/dist/client/rendering.mjs +4400 -2510
- package/dist/client/{scrollToBlock-Du5mHgvL.mjs → scrollToBlock-ByQv96M2.mjs} +1 -1
- package/dist/client/{shop-B5zAcKZn.mjs → shop-RUG9DmRE.mjs} +6 -6
- package/dist/client/{shop-commerce-BKBZB6l5.mjs → shop-commerce-B76Jz23B.mjs} +5 -5
- package/dist/client/{shop-commerce-store-Cq4qlNtQ.mjs → shop-commerce-store-QuQNdDsD.mjs} +1 -1
- package/dist/client/{shopShared-DYGzEs9D.mjs → shopShared-vXU1omwJ.mjs} +3 -3
- package/dist/client/{useEventFilters-Bphkda8m.mjs → useEventFilters-ByuU6HLA.mjs} +33 -18
- package/dist/preview-next/before-render.mjs +86 -51
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/keepAlive.mjs +86 -51
- package/dist/preview-next/middleware.mjs +86 -51
- package/dist/{previewAuthStore-C7ksxt5b.mjs → previewAuthStore-L_cKW8Sb.mjs} +86 -51
- package/dist/{sdk-runtime-BbIC8G4J.mjs → sdk-runtime-sUMr5d70.mjs} +2 -2
- package/dist/{separator-CadhAtI7.mjs → separator-BIHkie5i.mjs} +1 -1
- package/dist/server/components.mjs +4397 -2960
- package/dist/server/config-validation.mjs +354 -145
- package/dist/server/config.mjs +354 -145
- package/dist/server/data.mjs +354 -144
- package/dist/server/index.mjs +201 -55
- package/dist/server/manifest.mjs +0 -1
- package/dist/server/next.mjs +4046 -2611
- package/dist/server/page-converter.mjs +225 -122
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +4105 -2636
- package/dist/server/rendering.mjs +4522 -3087
- package/dist/server/routing.mjs +3289 -1637
- package/dist/server/server.mjs +23175 -21079
- package/dist/server/theme-bridge.mjs +708 -272
- package/dist/server/theme.mjs +29 -25
- package/dist/styles/index.css +624 -181
- package/package.json +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCapacity.d.ts +0 -48
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/pricing.d.ts +0 -17
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/utils.d.ts +0 -100
- /package/dist/_dts/blocks/src/system/runtime/nodes/events/{shared → domain}/destination.d.ts +0 -0
|
@@ -4,6 +4,7 @@ import type { ButtonStyleSelection } from '../buttons/styles/selection';
|
|
|
4
4
|
import type { HeaderLayoutStyleSelection, HeaderLogoContext } from './headerLayoutStyles';
|
|
5
5
|
import type { FooterLookId } from './footerLooks';
|
|
6
6
|
import type { BrandDisplayMode, LogoSizePolicy } from './logoBranding';
|
|
7
|
+
import type { HeaderPreferences } from './headerPreferences';
|
|
7
8
|
export type HeaderBrandPreferences = Readonly<{
|
|
8
9
|
brandDisplay: BrandDisplayMode;
|
|
9
10
|
logoSize: LogoSizePolicy;
|
|
@@ -15,10 +16,42 @@ export type HeaderRecompileDirective = Readonly<{
|
|
|
15
16
|
selection: HeaderLayoutStyleSelection;
|
|
16
17
|
brandPresentation: ReplacementBrandPresentation;
|
|
17
18
|
}>;
|
|
18
|
-
|
|
19
|
+
/**
|
|
20
|
+
* "Leave the header as the user last chose it", expressed as intent rather
|
|
21
|
+
* than as bytes (#1318 Phase 4d).
|
|
22
|
+
*
|
|
23
|
+
* Until 4d this arm carried `header: Theme['header']` and the compiler returned
|
|
24
|
+
* it verbatim, which was a fourth authority over `theme.header`: bytes reached
|
|
25
|
+
* persistence without passing through a recipe. It now names the row whose
|
|
26
|
+
* intent is to be honoured, and the compiler recompiles from
|
|
27
|
+
* `(stored selection, preferences)` — the same pipeline every other write uses.
|
|
28
|
+
*
|
|
29
|
+
* `preferences` is the stored record when the caller holds one and `null` while
|
|
30
|
+
* the Phase 4c backfill has not reached the row, in which case the intent is
|
|
31
|
+
* read back out of `persistedTheme`'s own bytes by the Phase 4a reader. It is
|
|
32
|
+
* never "the defaults": a default here would be the hidden authority this slice
|
|
33
|
+
* removes.
|
|
34
|
+
*/
|
|
35
|
+
export type HeaderPreserveDirective = Readonly<{
|
|
19
36
|
kind: 'preserve';
|
|
20
|
-
|
|
21
|
-
|
|
37
|
+
/** The row's own persisted theme. Its intent is read; its bytes are not copied. */
|
|
38
|
+
persistedTheme: Theme;
|
|
39
|
+
preferences: HeaderPreferences | null;
|
|
40
|
+
/**
|
|
41
|
+
* Always the logo context, never `use-compiled-defaults` — which is why this
|
|
42
|
+
* is narrowed to the one arm rather than taking the whole union.
|
|
43
|
+
*
|
|
44
|
+
* The intent on this path is derived from the row's own bytes, and that
|
|
45
|
+
* derivation compares the persisted `logo` against **both** compiled
|
|
46
|
+
* candidates. Withholding the context leaves it one, so a `'recommended'` row
|
|
47
|
+
* classifies as `'plain'` and silently loses its logo treatment. Which mode
|
|
48
|
+
* then wins is `applyHeaderPreferences`'s business, from the record (D24).
|
|
49
|
+
*/
|
|
50
|
+
brandPresentation: Extract<ReplacementBrandPresentation, {
|
|
51
|
+
kind: 'apply-logo-context';
|
|
52
|
+
}>;
|
|
53
|
+
}>;
|
|
54
|
+
export type HeaderCompilationDirective = HeaderPreserveDirective | HeaderRecompileDirective;
|
|
22
55
|
export type FooterCompilationDirective = Readonly<{
|
|
23
56
|
kind: 'preserve';
|
|
24
57
|
footer: Theme['footer'];
|
|
@@ -69,3 +102,10 @@ export declare function replaceSiteStyleCompilationPlan(input: Readonly<{
|
|
|
69
102
|
}>): Extract<SiteThemeCompilationPlan, {
|
|
70
103
|
kind: 'replace-site-style';
|
|
71
104
|
}>;
|
|
105
|
+
/**
|
|
106
|
+
* Writes the brand display / logo size preference onto the header's logo style.
|
|
107
|
+
*
|
|
108
|
+
* Moved here from preview-next in #1318 Phase 4a so the header preference
|
|
109
|
+
* pipeline can be composed once, in theme-core, rather than half in the client.
|
|
110
|
+
*/
|
|
111
|
+
export declare function withHeaderBrandThemePreferences(theme: Theme, preferences: HeaderBrandPreferences): Theme;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { type ButtonStyleSelection } from '../buttons/styles';
|
|
2
2
|
import { type KnownCuratedPaletteValueKey } from '../palette/curated';
|
|
3
3
|
import type { Theme } from '../schema';
|
|
4
|
-
import { type HeaderLayoutId, type HeaderLayoutStyleSelection, type HeaderStyleId } from './headerLayoutStyles';
|
|
4
|
+
import { type HeaderLayoutId, type HeaderLayoutStyleSelection, type HeaderStyleId, type HeaderStyleIdValue } from './headerLayoutStyles';
|
|
5
5
|
import { type FooterLookId } from './footerLooks';
|
|
6
|
+
import { type HeaderStyleRecipeOverrides } from './headerStyleDefaults';
|
|
7
|
+
import type { HeaderStyleRecipe } from './headerStyleRecipe';
|
|
6
8
|
import { type CuratedChoice } from './curatedChoices';
|
|
7
9
|
import { type AppearancePresetId, type DesignSystemTemplate, type HeadingDecoration, type NonEmptyReadonlyArray, type SiteStyleId } from './types';
|
|
8
10
|
import { type SiteStyleHeroTypography } from './siteStyleTypography';
|
|
@@ -121,6 +123,16 @@ export type CuratedSiteStyle = Readonly<{
|
|
|
121
123
|
headingDecoration: HeadingDecoration;
|
|
122
124
|
recommendedAppearancePresetIds: readonly AppearancePresetId[];
|
|
123
125
|
headerCuration: HeaderCuration;
|
|
126
|
+
/**
|
|
127
|
+
* Header appearance this style owns outright, keyed by catalogue style id.
|
|
128
|
+
* Absent entries take `defaultHeaderStyleRecipes`; a present entry is a whole
|
|
129
|
+
* recipe, never a partial merge. Mirrors `themeOverrides.cards`.
|
|
130
|
+
*
|
|
131
|
+
* No curated style authors one yet (ledger D5): the seam ships empty and
|
|
132
|
+
* adoption follows real site work, per the "do not pre-author" rule in
|
|
133
|
+
* docs/guides/site-styles.md.
|
|
134
|
+
*/
|
|
135
|
+
headerStyleRecipes?: HeaderStyleRecipeOverrides;
|
|
124
136
|
recommendedFooterLookIds: readonly FooterLookId[];
|
|
125
137
|
/** Authored picker choices. First item is the default/fallback. */
|
|
126
138
|
buttonStyleChoices: NonEmptyReadonlyArray<ButtonStyleChoice>;
|
|
@@ -134,6 +146,16 @@ export type CuratedSiteStyle = Readonly<{
|
|
|
134
146
|
export declare function defaultButtonStyleSelectionForSiteStyle(siteStyle: CuratedSiteStyle): ButtonStyleSelection;
|
|
135
147
|
export declare function defaultPaletteForSiteStyle(siteStyle: CuratedSiteStyle): KnownCuratedPaletteValueKey;
|
|
136
148
|
export declare function defaultHeaderSelectionForSiteStyle(siteStyle: CuratedSiteStyle): HeaderLayoutStyleSelection;
|
|
149
|
+
/**
|
|
150
|
+
* The curated default selection together with the style choices that belong to
|
|
151
|
+
* it. Carrying the styles alongside the ids is what lets a caller fall back to
|
|
152
|
+
* the default layout without a second, nullable lookup that can never actually
|
|
153
|
+
* miss — the source of an unreachable throw before #1318 Phase 4a.
|
|
154
|
+
*/
|
|
155
|
+
export declare function defaultHeaderCurationForSiteStyle(siteStyle: CuratedSiteStyle): Readonly<{
|
|
156
|
+
selection: HeaderLayoutStyleSelection;
|
|
157
|
+
styles: NonEmptyReadonlyArray<HeaderStyleChoice>;
|
|
158
|
+
}>;
|
|
137
159
|
export declare function headerLayoutChoicesForSiteStyle(siteStyle: CuratedSiteStyle): NonEmptyReadonlyArray<HeaderLayoutChoice>;
|
|
138
160
|
export declare function headerStyleChoicesForLayout(siteStyle: CuratedSiteStyle, layoutId: HeaderLayoutId): NonEmptyReadonlyArray<HeaderStyleChoice> | null;
|
|
139
161
|
/**
|
|
@@ -167,6 +189,16 @@ export declare const curatedSiteStyles: readonly [Readonly<{
|
|
|
167
189
|
headingDecoration: HeadingDecoration;
|
|
168
190
|
recommendedAppearancePresetIds: readonly AppearancePresetId[];
|
|
169
191
|
headerCuration: HeaderCuration;
|
|
192
|
+
/**
|
|
193
|
+
* Header appearance this style owns outright, keyed by catalogue style id.
|
|
194
|
+
* Absent entries take `defaultHeaderStyleRecipes`; a present entry is a whole
|
|
195
|
+
* recipe, never a partial merge. Mirrors `themeOverrides.cards`.
|
|
196
|
+
*
|
|
197
|
+
* No curated style authors one yet (ledger D5): the seam ships empty and
|
|
198
|
+
* adoption follows real site work, per the "do not pre-author" rule in
|
|
199
|
+
* docs/guides/site-styles.md.
|
|
200
|
+
*/
|
|
201
|
+
headerStyleRecipes?: HeaderStyleRecipeOverrides;
|
|
170
202
|
recommendedFooterLookIds: readonly FooterLookId[];
|
|
171
203
|
/** Authored picker choices. First item is the default/fallback. */
|
|
172
204
|
buttonStyleChoices: NonEmptyReadonlyArray<ButtonStyleChoice>;
|
|
@@ -202,6 +234,16 @@ export declare const curatedSiteStyles: readonly [Readonly<{
|
|
|
202
234
|
headingDecoration: HeadingDecoration;
|
|
203
235
|
recommendedAppearancePresetIds: readonly AppearancePresetId[];
|
|
204
236
|
headerCuration: HeaderCuration;
|
|
237
|
+
/**
|
|
238
|
+
* Header appearance this style owns outright, keyed by catalogue style id.
|
|
239
|
+
* Absent entries take `defaultHeaderStyleRecipes`; a present entry is a whole
|
|
240
|
+
* recipe, never a partial merge. Mirrors `themeOverrides.cards`.
|
|
241
|
+
*
|
|
242
|
+
* No curated style authors one yet (ledger D5): the seam ships empty and
|
|
243
|
+
* adoption follows real site work, per the "do not pre-author" rule in
|
|
244
|
+
* docs/guides/site-styles.md.
|
|
245
|
+
*/
|
|
246
|
+
headerStyleRecipes?: HeaderStyleRecipeOverrides;
|
|
205
247
|
recommendedFooterLookIds: readonly FooterLookId[];
|
|
206
248
|
/** Authored picker choices. First item is the default/fallback. */
|
|
207
249
|
buttonStyleChoices: NonEmptyReadonlyArray<ButtonStyleChoice>;
|
|
@@ -237,6 +279,16 @@ export declare const curatedSiteStyles: readonly [Readonly<{
|
|
|
237
279
|
headingDecoration: HeadingDecoration;
|
|
238
280
|
recommendedAppearancePresetIds: readonly AppearancePresetId[];
|
|
239
281
|
headerCuration: HeaderCuration;
|
|
282
|
+
/**
|
|
283
|
+
* Header appearance this style owns outright, keyed by catalogue style id.
|
|
284
|
+
* Absent entries take `defaultHeaderStyleRecipes`; a present entry is a whole
|
|
285
|
+
* recipe, never a partial merge. Mirrors `themeOverrides.cards`.
|
|
286
|
+
*
|
|
287
|
+
* No curated style authors one yet (ledger D5): the seam ships empty and
|
|
288
|
+
* adoption follows real site work, per the "do not pre-author" rule in
|
|
289
|
+
* docs/guides/site-styles.md.
|
|
290
|
+
*/
|
|
291
|
+
headerStyleRecipes?: HeaderStyleRecipeOverrides;
|
|
240
292
|
recommendedFooterLookIds: readonly FooterLookId[];
|
|
241
293
|
/** Authored picker choices. First item is the default/fallback. */
|
|
242
294
|
buttonStyleChoices: NonEmptyReadonlyArray<ButtonStyleChoice>;
|
|
@@ -272,6 +324,16 @@ export declare const curatedSiteStyles: readonly [Readonly<{
|
|
|
272
324
|
headingDecoration: HeadingDecoration;
|
|
273
325
|
recommendedAppearancePresetIds: readonly AppearancePresetId[];
|
|
274
326
|
headerCuration: HeaderCuration;
|
|
327
|
+
/**
|
|
328
|
+
* Header appearance this style owns outright, keyed by catalogue style id.
|
|
329
|
+
* Absent entries take `defaultHeaderStyleRecipes`; a present entry is a whole
|
|
330
|
+
* recipe, never a partial merge. Mirrors `themeOverrides.cards`.
|
|
331
|
+
*
|
|
332
|
+
* No curated style authors one yet (ledger D5): the seam ships empty and
|
|
333
|
+
* adoption follows real site work, per the "do not pre-author" rule in
|
|
334
|
+
* docs/guides/site-styles.md.
|
|
335
|
+
*/
|
|
336
|
+
headerStyleRecipes?: HeaderStyleRecipeOverrides;
|
|
275
337
|
recommendedFooterLookIds: readonly FooterLookId[];
|
|
276
338
|
/** Authored picker choices. First item is the default/fallback. */
|
|
277
339
|
buttonStyleChoices: NonEmptyReadonlyArray<ButtonStyleChoice>;
|
|
@@ -307,6 +369,16 @@ export declare const curatedSiteStyles: readonly [Readonly<{
|
|
|
307
369
|
headingDecoration: HeadingDecoration;
|
|
308
370
|
recommendedAppearancePresetIds: readonly AppearancePresetId[];
|
|
309
371
|
headerCuration: HeaderCuration;
|
|
372
|
+
/**
|
|
373
|
+
* Header appearance this style owns outright, keyed by catalogue style id.
|
|
374
|
+
* Absent entries take `defaultHeaderStyleRecipes`; a present entry is a whole
|
|
375
|
+
* recipe, never a partial merge. Mirrors `themeOverrides.cards`.
|
|
376
|
+
*
|
|
377
|
+
* No curated style authors one yet (ledger D5): the seam ships empty and
|
|
378
|
+
* adoption follows real site work, per the "do not pre-author" rule in
|
|
379
|
+
* docs/guides/site-styles.md.
|
|
380
|
+
*/
|
|
381
|
+
headerStyleRecipes?: HeaderStyleRecipeOverrides;
|
|
310
382
|
recommendedFooterLookIds: readonly FooterLookId[];
|
|
311
383
|
/** Authored picker choices. First item is the default/fallback. */
|
|
312
384
|
buttonStyleChoices: NonEmptyReadonlyArray<ButtonStyleChoice>;
|
|
@@ -342,6 +414,16 @@ export declare const curatedSiteStyles: readonly [Readonly<{
|
|
|
342
414
|
headingDecoration: HeadingDecoration;
|
|
343
415
|
recommendedAppearancePresetIds: readonly AppearancePresetId[];
|
|
344
416
|
headerCuration: HeaderCuration;
|
|
417
|
+
/**
|
|
418
|
+
* Header appearance this style owns outright, keyed by catalogue style id.
|
|
419
|
+
* Absent entries take `defaultHeaderStyleRecipes`; a present entry is a whole
|
|
420
|
+
* recipe, never a partial merge. Mirrors `themeOverrides.cards`.
|
|
421
|
+
*
|
|
422
|
+
* No curated style authors one yet (ledger D5): the seam ships empty and
|
|
423
|
+
* adoption follows real site work, per the "do not pre-author" rule in
|
|
424
|
+
* docs/guides/site-styles.md.
|
|
425
|
+
*/
|
|
426
|
+
headerStyleRecipes?: HeaderStyleRecipeOverrides;
|
|
345
427
|
recommendedFooterLookIds: readonly FooterLookId[];
|
|
346
428
|
/** Authored picker choices. First item is the default/fallback. */
|
|
347
429
|
buttonStyleChoices: NonEmptyReadonlyArray<ButtonStyleChoice>;
|
|
@@ -377,6 +459,16 @@ export declare const curatedSiteStyles: readonly [Readonly<{
|
|
|
377
459
|
headingDecoration: HeadingDecoration;
|
|
378
460
|
recommendedAppearancePresetIds: readonly AppearancePresetId[];
|
|
379
461
|
headerCuration: HeaderCuration;
|
|
462
|
+
/**
|
|
463
|
+
* Header appearance this style owns outright, keyed by catalogue style id.
|
|
464
|
+
* Absent entries take `defaultHeaderStyleRecipes`; a present entry is a whole
|
|
465
|
+
* recipe, never a partial merge. Mirrors `themeOverrides.cards`.
|
|
466
|
+
*
|
|
467
|
+
* No curated style authors one yet (ledger D5): the seam ships empty and
|
|
468
|
+
* adoption follows real site work, per the "do not pre-author" rule in
|
|
469
|
+
* docs/guides/site-styles.md.
|
|
470
|
+
*/
|
|
471
|
+
headerStyleRecipes?: HeaderStyleRecipeOverrides;
|
|
380
472
|
recommendedFooterLookIds: readonly FooterLookId[];
|
|
381
473
|
/** Authored picker choices. First item is the default/fallback. */
|
|
382
474
|
buttonStyleChoices: NonEmptyReadonlyArray<ButtonStyleChoice>;
|
|
@@ -412,6 +504,16 @@ export declare const curatedSiteStyles: readonly [Readonly<{
|
|
|
412
504
|
headingDecoration: HeadingDecoration;
|
|
413
505
|
recommendedAppearancePresetIds: readonly AppearancePresetId[];
|
|
414
506
|
headerCuration: HeaderCuration;
|
|
507
|
+
/**
|
|
508
|
+
* Header appearance this style owns outright, keyed by catalogue style id.
|
|
509
|
+
* Absent entries take `defaultHeaderStyleRecipes`; a present entry is a whole
|
|
510
|
+
* recipe, never a partial merge. Mirrors `themeOverrides.cards`.
|
|
511
|
+
*
|
|
512
|
+
* No curated style authors one yet (ledger D5): the seam ships empty and
|
|
513
|
+
* adoption follows real site work, per the "do not pre-author" rule in
|
|
514
|
+
* docs/guides/site-styles.md.
|
|
515
|
+
*/
|
|
516
|
+
headerStyleRecipes?: HeaderStyleRecipeOverrides;
|
|
415
517
|
recommendedFooterLookIds: readonly FooterLookId[];
|
|
416
518
|
/** Authored picker choices. First item is the default/fallback. */
|
|
417
519
|
buttonStyleChoices: NonEmptyReadonlyArray<ButtonStyleChoice>;
|
|
@@ -447,6 +549,16 @@ export declare const curatedSiteStyles: readonly [Readonly<{
|
|
|
447
549
|
headingDecoration: HeadingDecoration;
|
|
448
550
|
recommendedAppearancePresetIds: readonly AppearancePresetId[];
|
|
449
551
|
headerCuration: HeaderCuration;
|
|
552
|
+
/**
|
|
553
|
+
* Header appearance this style owns outright, keyed by catalogue style id.
|
|
554
|
+
* Absent entries take `defaultHeaderStyleRecipes`; a present entry is a whole
|
|
555
|
+
* recipe, never a partial merge. Mirrors `themeOverrides.cards`.
|
|
556
|
+
*
|
|
557
|
+
* No curated style authors one yet (ledger D5): the seam ships empty and
|
|
558
|
+
* adoption follows real site work, per the "do not pre-author" rule in
|
|
559
|
+
* docs/guides/site-styles.md.
|
|
560
|
+
*/
|
|
561
|
+
headerStyleRecipes?: HeaderStyleRecipeOverrides;
|
|
450
562
|
recommendedFooterLookIds: readonly FooterLookId[];
|
|
451
563
|
/** Authored picker choices. First item is the default/fallback. */
|
|
452
564
|
buttonStyleChoices: NonEmptyReadonlyArray<ButtonStyleChoice>;
|
|
@@ -482,6 +594,16 @@ export declare const curatedSiteStyles: readonly [Readonly<{
|
|
|
482
594
|
headingDecoration: HeadingDecoration;
|
|
483
595
|
recommendedAppearancePresetIds: readonly AppearancePresetId[];
|
|
484
596
|
headerCuration: HeaderCuration;
|
|
597
|
+
/**
|
|
598
|
+
* Header appearance this style owns outright, keyed by catalogue style id.
|
|
599
|
+
* Absent entries take `defaultHeaderStyleRecipes`; a present entry is a whole
|
|
600
|
+
* recipe, never a partial merge. Mirrors `themeOverrides.cards`.
|
|
601
|
+
*
|
|
602
|
+
* No curated style authors one yet (ledger D5): the seam ships empty and
|
|
603
|
+
* adoption follows real site work, per the "do not pre-author" rule in
|
|
604
|
+
* docs/guides/site-styles.md.
|
|
605
|
+
*/
|
|
606
|
+
headerStyleRecipes?: HeaderStyleRecipeOverrides;
|
|
485
607
|
recommendedFooterLookIds: readonly FooterLookId[];
|
|
486
608
|
/** Authored picker choices. First item is the default/fallback. */
|
|
487
609
|
buttonStyleChoices: NonEmptyReadonlyArray<ButtonStyleChoice>;
|
|
@@ -517,6 +639,16 @@ export declare const curatedSiteStyles: readonly [Readonly<{
|
|
|
517
639
|
headingDecoration: HeadingDecoration;
|
|
518
640
|
recommendedAppearancePresetIds: readonly AppearancePresetId[];
|
|
519
641
|
headerCuration: HeaderCuration;
|
|
642
|
+
/**
|
|
643
|
+
* Header appearance this style owns outright, keyed by catalogue style id.
|
|
644
|
+
* Absent entries take `defaultHeaderStyleRecipes`; a present entry is a whole
|
|
645
|
+
* recipe, never a partial merge. Mirrors `themeOverrides.cards`.
|
|
646
|
+
*
|
|
647
|
+
* No curated style authors one yet (ledger D5): the seam ships empty and
|
|
648
|
+
* adoption follows real site work, per the "do not pre-author" rule in
|
|
649
|
+
* docs/guides/site-styles.md.
|
|
650
|
+
*/
|
|
651
|
+
headerStyleRecipes?: HeaderStyleRecipeOverrides;
|
|
520
652
|
recommendedFooterLookIds: readonly FooterLookId[];
|
|
521
653
|
/** Authored picker choices. First item is the default/fallback. */
|
|
522
654
|
buttonStyleChoices: NonEmptyReadonlyArray<ButtonStyleChoice>;
|
|
@@ -552,6 +684,16 @@ export declare const curatedSiteStyles: readonly [Readonly<{
|
|
|
552
684
|
headingDecoration: HeadingDecoration;
|
|
553
685
|
recommendedAppearancePresetIds: readonly AppearancePresetId[];
|
|
554
686
|
headerCuration: HeaderCuration;
|
|
687
|
+
/**
|
|
688
|
+
* Header appearance this style owns outright, keyed by catalogue style id.
|
|
689
|
+
* Absent entries take `defaultHeaderStyleRecipes`; a present entry is a whole
|
|
690
|
+
* recipe, never a partial merge. Mirrors `themeOverrides.cards`.
|
|
691
|
+
*
|
|
692
|
+
* No curated style authors one yet (ledger D5): the seam ships empty and
|
|
693
|
+
* adoption follows real site work, per the "do not pre-author" rule in
|
|
694
|
+
* docs/guides/site-styles.md.
|
|
695
|
+
*/
|
|
696
|
+
headerStyleRecipes?: HeaderStyleRecipeOverrides;
|
|
555
697
|
recommendedFooterLookIds: readonly FooterLookId[];
|
|
556
698
|
/** Authored picker choices. First item is the default/fallback. */
|
|
557
699
|
buttonStyleChoices: NonEmptyReadonlyArray<ButtonStyleChoice>;
|
|
@@ -587,6 +729,16 @@ export declare const curatedSiteStyles: readonly [Readonly<{
|
|
|
587
729
|
headingDecoration: HeadingDecoration;
|
|
588
730
|
recommendedAppearancePresetIds: readonly AppearancePresetId[];
|
|
589
731
|
headerCuration: HeaderCuration;
|
|
732
|
+
/**
|
|
733
|
+
* Header appearance this style owns outright, keyed by catalogue style id.
|
|
734
|
+
* Absent entries take `defaultHeaderStyleRecipes`; a present entry is a whole
|
|
735
|
+
* recipe, never a partial merge. Mirrors `themeOverrides.cards`.
|
|
736
|
+
*
|
|
737
|
+
* No curated style authors one yet (ledger D5): the seam ships empty and
|
|
738
|
+
* adoption follows real site work, per the "do not pre-author" rule in
|
|
739
|
+
* docs/guides/site-styles.md.
|
|
740
|
+
*/
|
|
741
|
+
headerStyleRecipes?: HeaderStyleRecipeOverrides;
|
|
590
742
|
recommendedFooterLookIds: readonly FooterLookId[];
|
|
591
743
|
/** Authored picker choices. First item is the default/fallback. */
|
|
592
744
|
buttonStyleChoices: NonEmptyReadonlyArray<ButtonStyleChoice>;
|
|
@@ -622,6 +774,16 @@ export declare const curatedSiteStyles: readonly [Readonly<{
|
|
|
622
774
|
headingDecoration: HeadingDecoration;
|
|
623
775
|
recommendedAppearancePresetIds: readonly AppearancePresetId[];
|
|
624
776
|
headerCuration: HeaderCuration;
|
|
777
|
+
/**
|
|
778
|
+
* Header appearance this style owns outright, keyed by catalogue style id.
|
|
779
|
+
* Absent entries take `defaultHeaderStyleRecipes`; a present entry is a whole
|
|
780
|
+
* recipe, never a partial merge. Mirrors `themeOverrides.cards`.
|
|
781
|
+
*
|
|
782
|
+
* No curated style authors one yet (ledger D5): the seam ships empty and
|
|
783
|
+
* adoption follows real site work, per the "do not pre-author" rule in
|
|
784
|
+
* docs/guides/site-styles.md.
|
|
785
|
+
*/
|
|
786
|
+
headerStyleRecipes?: HeaderStyleRecipeOverrides;
|
|
625
787
|
recommendedFooterLookIds: readonly FooterLookId[];
|
|
626
788
|
/** Authored picker choices. First item is the default/fallback. */
|
|
627
789
|
buttonStyleChoices: NonEmptyReadonlyArray<ButtonStyleChoice>;
|
|
@@ -657,6 +819,16 @@ export declare const curatedSiteStyles: readonly [Readonly<{
|
|
|
657
819
|
headingDecoration: HeadingDecoration;
|
|
658
820
|
recommendedAppearancePresetIds: readonly AppearancePresetId[];
|
|
659
821
|
headerCuration: HeaderCuration;
|
|
822
|
+
/**
|
|
823
|
+
* Header appearance this style owns outright, keyed by catalogue style id.
|
|
824
|
+
* Absent entries take `defaultHeaderStyleRecipes`; a present entry is a whole
|
|
825
|
+
* recipe, never a partial merge. Mirrors `themeOverrides.cards`.
|
|
826
|
+
*
|
|
827
|
+
* No curated style authors one yet (ledger D5): the seam ships empty and
|
|
828
|
+
* adoption follows real site work, per the "do not pre-author" rule in
|
|
829
|
+
* docs/guides/site-styles.md.
|
|
830
|
+
*/
|
|
831
|
+
headerStyleRecipes?: HeaderStyleRecipeOverrides;
|
|
660
832
|
recommendedFooterLookIds: readonly FooterLookId[];
|
|
661
833
|
/** Authored picker choices. First item is the default/fallback. */
|
|
662
834
|
buttonStyleChoices: NonEmptyReadonlyArray<ButtonStyleChoice>;
|
|
@@ -692,6 +864,16 @@ export declare const curatedSiteStyles: readonly [Readonly<{
|
|
|
692
864
|
headingDecoration: HeadingDecoration;
|
|
693
865
|
recommendedAppearancePresetIds: readonly AppearancePresetId[];
|
|
694
866
|
headerCuration: HeaderCuration;
|
|
867
|
+
/**
|
|
868
|
+
* Header appearance this style owns outright, keyed by catalogue style id.
|
|
869
|
+
* Absent entries take `defaultHeaderStyleRecipes`; a present entry is a whole
|
|
870
|
+
* recipe, never a partial merge. Mirrors `themeOverrides.cards`.
|
|
871
|
+
*
|
|
872
|
+
* No curated style authors one yet (ledger D5): the seam ships empty and
|
|
873
|
+
* adoption follows real site work, per the "do not pre-author" rule in
|
|
874
|
+
* docs/guides/site-styles.md.
|
|
875
|
+
*/
|
|
876
|
+
headerStyleRecipes?: HeaderStyleRecipeOverrides;
|
|
695
877
|
recommendedFooterLookIds: readonly FooterLookId[];
|
|
696
878
|
/** Authored picker choices. First item is the default/fallback. */
|
|
697
879
|
buttonStyleChoices: NonEmptyReadonlyArray<ButtonStyleChoice>;
|
|
@@ -727,6 +909,16 @@ export declare const curatedSiteStyles: readonly [Readonly<{
|
|
|
727
909
|
headingDecoration: HeadingDecoration;
|
|
728
910
|
recommendedAppearancePresetIds: readonly AppearancePresetId[];
|
|
729
911
|
headerCuration: HeaderCuration;
|
|
912
|
+
/**
|
|
913
|
+
* Header appearance this style owns outright, keyed by catalogue style id.
|
|
914
|
+
* Absent entries take `defaultHeaderStyleRecipes`; a present entry is a whole
|
|
915
|
+
* recipe, never a partial merge. Mirrors `themeOverrides.cards`.
|
|
916
|
+
*
|
|
917
|
+
* No curated style authors one yet (ledger D5): the seam ships empty and
|
|
918
|
+
* adoption follows real site work, per the "do not pre-author" rule in
|
|
919
|
+
* docs/guides/site-styles.md.
|
|
920
|
+
*/
|
|
921
|
+
headerStyleRecipes?: HeaderStyleRecipeOverrides;
|
|
730
922
|
recommendedFooterLookIds: readonly FooterLookId[];
|
|
731
923
|
/** Authored picker choices. First item is the default/fallback. */
|
|
732
924
|
buttonStyleChoices: NonEmptyReadonlyArray<ButtonStyleChoice>;
|
|
@@ -762,6 +954,16 @@ export declare const curatedSiteStyles: readonly [Readonly<{
|
|
|
762
954
|
headingDecoration: HeadingDecoration;
|
|
763
955
|
recommendedAppearancePresetIds: readonly AppearancePresetId[];
|
|
764
956
|
headerCuration: HeaderCuration;
|
|
957
|
+
/**
|
|
958
|
+
* Header appearance this style owns outright, keyed by catalogue style id.
|
|
959
|
+
* Absent entries take `defaultHeaderStyleRecipes`; a present entry is a whole
|
|
960
|
+
* recipe, never a partial merge. Mirrors `themeOverrides.cards`.
|
|
961
|
+
*
|
|
962
|
+
* No curated style authors one yet (ledger D5): the seam ships empty and
|
|
963
|
+
* adoption follows real site work, per the "do not pre-author" rule in
|
|
964
|
+
* docs/guides/site-styles.md.
|
|
965
|
+
*/
|
|
966
|
+
headerStyleRecipes?: HeaderStyleRecipeOverrides;
|
|
765
967
|
recommendedFooterLookIds: readonly FooterLookId[];
|
|
766
968
|
/** Authored picker choices. First item is the default/fallback. */
|
|
767
969
|
buttonStyleChoices: NonEmptyReadonlyArray<ButtonStyleChoice>;
|
|
@@ -798,6 +1000,16 @@ export declare const curatedSiteStylesById: Map<SiteStyleId, Readonly<{
|
|
|
798
1000
|
headingDecoration: HeadingDecoration;
|
|
799
1001
|
recommendedAppearancePresetIds: readonly AppearancePresetId[];
|
|
800
1002
|
headerCuration: HeaderCuration;
|
|
1003
|
+
/**
|
|
1004
|
+
* Header appearance this style owns outright, keyed by catalogue style id.
|
|
1005
|
+
* Absent entries take `defaultHeaderStyleRecipes`; a present entry is a whole
|
|
1006
|
+
* recipe, never a partial merge. Mirrors `themeOverrides.cards`.
|
|
1007
|
+
*
|
|
1008
|
+
* No curated style authors one yet (ledger D5): the seam ships empty and
|
|
1009
|
+
* adoption follows real site work, per the "do not pre-author" rule in
|
|
1010
|
+
* docs/guides/site-styles.md.
|
|
1011
|
+
*/
|
|
1012
|
+
headerStyleRecipes?: HeaderStyleRecipeOverrides;
|
|
801
1013
|
recommendedFooterLookIds: readonly FooterLookId[];
|
|
802
1014
|
/** Authored picker choices. First item is the default/fallback. */
|
|
803
1015
|
buttonStyleChoices: NonEmptyReadonlyArray<ButtonStyleChoice>;
|
|
@@ -808,6 +1020,16 @@ export declare const curatedSiteStylesById: Map<SiteStyleId, Readonly<{
|
|
|
808
1020
|
/** Optional concrete hero typography applied with the site style. */
|
|
809
1021
|
heroTypography?: SiteStyleHeroTypography;
|
|
810
1022
|
}>>;
|
|
1023
|
+
/**
|
|
1024
|
+
* The header appearance a persisted theme actually renders: the catalogue
|
|
1025
|
+
* recipe unless the theme's own site style has taken that id over (#1318).
|
|
1026
|
+
*
|
|
1027
|
+
* Consumers that hold a theme and a selected style id — the public frontend and
|
|
1028
|
+
* the chrome customiser — go through here rather than reading the style
|
|
1029
|
+
* definition, so a site-style override is visible to every reader rather than
|
|
1030
|
+
* only to the compiler.
|
|
1031
|
+
*/
|
|
1032
|
+
export declare function headerStyleRecipeForTheme(theme: Pick<Theme, 'siteStyleId'> | null | undefined, styleId: HeaderStyleIdValue): HeaderStyleRecipe;
|
|
811
1033
|
export declare function getCuratedSiteStyle(id: SiteStyleId): CuratedSiteStyle | null;
|
|
812
1034
|
export declare function designRuntimeRulesForSiteStyle(siteStyle: CuratedSiteStyle | null | undefined): DesignRuntimeRules;
|
|
813
1035
|
export declare function designRuntimeRulesForTheme(theme: Pick<Theme, 'siteStyleId'> | null | undefined): DesignRuntimeRules;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { ThemeHeader } from '../schema';
|
|
2
|
+
/**
|
|
3
|
+
* Whether the header wears a brand presentation at all (#1318 Phase 4c).
|
|
4
|
+
*
|
|
5
|
+
* `applyHeaderBrandPresentation` is unconditional today: given a logo context
|
|
6
|
+
* it always writes a `logo` object carrying a resolved display, size and
|
|
7
|
+
* accommodation. That makes "this header has no brand presentation block" —
|
|
8
|
+
* which is what several live sites persist, including one whose site *does*
|
|
9
|
+
* have a logo asset — a state the preference record could not express, so a
|
|
10
|
+
* recompile would silently give the site a logo treatment it has never
|
|
11
|
+
* rendered.
|
|
12
|
+
*
|
|
13
|
+
* This is the third field in this phase with that shape, after the interaction
|
|
14
|
+
* palette and the nav text size: the persisted bytes carry intent the reader
|
|
15
|
+
* cannot say, so the recompile "corrects" it. The fix is the same one — widen
|
|
16
|
+
* the closed vocabulary with a named member and derive it by baseline
|
|
17
|
+
* comparison — and it is a *widening*, not a restyle: `'recommended'` is the
|
|
18
|
+
* default and reproduces today's behaviour exactly, so no row whose bytes carry
|
|
19
|
+
* a presentation compiles differently for `'plain'` existing.
|
|
20
|
+
*
|
|
21
|
+
* `'plain'` is deliberately not "preserve whatever bytes are there". It is a
|
|
22
|
+
* constructive instruction — *write no presentation block* — so Phase 4e's
|
|
23
|
+
* compiler, which builds the header from nothing, can produce it.
|
|
24
|
+
*/
|
|
25
|
+
export declare const headerBrandPresentationValues: readonly ["recommended", "plain"];
|
|
26
|
+
export type HeaderBrandPresentationPreference = (typeof headerBrandPresentationValues)[number];
|
|
27
|
+
export declare const defaultHeaderBrandPresentation: HeaderBrandPresentationPreference;
|
|
28
|
+
/**
|
|
29
|
+
* What the row's own bytes say about the presentation mode.
|
|
30
|
+
*
|
|
31
|
+
* `unrecognised` is its own state for the same reason it is on the interaction
|
|
32
|
+
* palette: the record has no way to represent "a logo block nobody's rule
|
|
33
|
+
* produces", and answering `'plain'` for one would drop a treatment the site
|
|
34
|
+
* renders. An unrecognised row falls back to `'recommended'` in the record and
|
|
35
|
+
* is reported by the divergence report, which blocks the Phase 4e gate.
|
|
36
|
+
*/
|
|
37
|
+
export type HeaderBrandPresentationBytesClassification = Readonly<{
|
|
38
|
+
kind: 'recommended';
|
|
39
|
+
}> | Readonly<{
|
|
40
|
+
kind: 'plain';
|
|
41
|
+
}> | Readonly<{
|
|
42
|
+
kind: 'unrecognised';
|
|
43
|
+
}>;
|
|
44
|
+
/**
|
|
45
|
+
* Which mode reproduces this row's persisted logo bytes.
|
|
46
|
+
*
|
|
47
|
+
* Both candidates are supplied rather than reconstructed here, because both are
|
|
48
|
+
* the compilation's own output and rebuilding either would be a second
|
|
49
|
+
* authority on what the modes mean. `'recommended'` is tested first so that a
|
|
50
|
+
* row the resolver already agrees with keeps the live mode; `'plain'` is the
|
|
51
|
+
* answer for the rows that carry no presentation — an absent block, or a block
|
|
52
|
+
* holding only the recipe's own brand typography.
|
|
53
|
+
*/
|
|
54
|
+
export declare function classifyHeaderBrandPresentationBytes(persisted: ThemeHeader,
|
|
55
|
+
/** The header `'recommended'` produces for this row — presentation applied. */
|
|
56
|
+
recommended: ThemeHeader,
|
|
57
|
+
/** The header `'plain'` produces — the presentation step skipped. */
|
|
58
|
+
plain: ThemeHeader): HeaderBrandPresentationBytesClassification;
|
|
59
|
+
/**
|
|
60
|
+
* The preference the bytes express, or `null` when they express none the record
|
|
61
|
+
* can carry. `null` is the caller's cue to fall back to the default and say so.
|
|
62
|
+
*/
|
|
63
|
+
export declare function readHeaderBrandPresentationFromBytes(persisted: ThemeHeader, recommended: ThemeHeader, plain: ThemeHeader): HeaderBrandPresentationPreference | null;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { ThemeHeader } from '../schema';
|
|
2
|
+
export type HeaderFieldDiff = Readonly<{
|
|
3
|
+
path: string;
|
|
4
|
+
left: unknown;
|
|
5
|
+
right: unknown;
|
|
6
|
+
}>;
|
|
7
|
+
/**
|
|
8
|
+
* Structural diff by JSON path. Values are compared through
|
|
9
|
+
* `JSON.stringify`, so a key present with the value `undefined` and an absent
|
|
10
|
+
* key read as the same thing — which is what `jsonb` does to them anyway
|
|
11
|
+
* (#1318 Correction 5).
|
|
12
|
+
*/
|
|
13
|
+
export declare function diffJsonPaths(left: unknown, right: unknown, path?: string): readonly HeaderFieldDiff[];
|
|
14
|
+
export type CompiledHeaderComparison = Readonly<{
|
|
15
|
+
kind: 'equal';
|
|
16
|
+
}> | Readonly<{
|
|
17
|
+
kind: 'different';
|
|
18
|
+
diffs: readonly HeaderFieldDiff[];
|
|
19
|
+
differingPaths: readonly string[];
|
|
20
|
+
}>;
|
|
21
|
+
/**
|
|
22
|
+
* The Phase 4b equality assertion: does the header a client compiled match the
|
|
23
|
+
* one the server compiles from the same `(selection, preferences)`?
|
|
24
|
+
*
|
|
25
|
+
* Both sides go through a JSON round trip first, because the persisted form is
|
|
26
|
+
* `jsonb` and an in-memory `ctaVariant: undefined` is not a difference the
|
|
27
|
+
* database could ever store (#1318 Correction 5). Comparing the in-memory
|
|
28
|
+
* objects directly would report a mismatch that no save could produce.
|
|
29
|
+
*/
|
|
30
|
+
export declare function compareCompiledHeaders(left: ThemeHeader, right: ThemeHeader): CompiledHeaderComparison;
|
|
@@ -10,7 +10,7 @@ export declare const clearSplitInteractionPalette: Readonly<{
|
|
|
10
10
|
id: "interaction-palette";
|
|
11
11
|
label: string;
|
|
12
12
|
options: readonly [HeaderInteractionPaletteOption, ...HeaderInteractionPaletteOption[]];
|
|
13
|
-
defaultOptionId: "accent" | "primary" | "secondary";
|
|
13
|
+
defaultOptionId: "accent" | "primary" | "secondary" | "quiet";
|
|
14
14
|
}>;
|
|
15
15
|
export type HeaderInteractionPaletteControlState = Readonly<{
|
|
16
16
|
kind: 'unavailable';
|
|
@@ -30,3 +30,52 @@ export type HeaderInteractionPaletteControlState = Readonly<{
|
|
|
30
30
|
}>;
|
|
31
31
|
export declare function resolveHeaderInteractionPaletteControl(group: HeaderInteractionPaletteOptionGroup | undefined, preference: HeaderInteractionPalettePreference): HeaderInteractionPaletteControlState;
|
|
32
32
|
export declare function applyHeaderInteractionPalette(header: ThemeHeader, group: HeaderInteractionPaletteOptionGroup | undefined, preference: HeaderInteractionPalettePreference): ThemeHeader;
|
|
33
|
+
/**
|
|
34
|
+
* What a persisted header's nav link style says about the palette.
|
|
35
|
+
*
|
|
36
|
+
* `'unrecognised'` is the arm that matters. `'quiet'` writes nothing and is
|
|
37
|
+
* therefore a fixed point of *every* header, so a fixed-point search alone
|
|
38
|
+
* would answer `'quiet'` for a pill nobody in the group produces — and a
|
|
39
|
+
* recompile under `'quiet'` would then drop that pill. Reporting the state
|
|
40
|
+
* instead means a row like that reaches a human through the Phase 4c report
|
|
41
|
+
* rather than losing its hover treatment quietly.
|
|
42
|
+
*/
|
|
43
|
+
export type HeaderInteractionPaletteBytesClassification = Readonly<{
|
|
44
|
+
kind: 'derived';
|
|
45
|
+
preference: HeaderInteractionPalettePreference;
|
|
46
|
+
}> | Readonly<{
|
|
47
|
+
kind: 'unrecognised';
|
|
48
|
+
}> | Readonly<{
|
|
49
|
+
kind: 'no-palette';
|
|
50
|
+
}>;
|
|
51
|
+
/**
|
|
52
|
+
* Which option of `group` a persisted header's nav link style is the output of
|
|
53
|
+
* (#1318 Phase 4c decision 2).
|
|
54
|
+
*
|
|
55
|
+
* This is a baseline comparison rather than a pattern match on effect bytes.
|
|
56
|
+
* The palette overwrites its four fields unconditionally, so applying an option
|
|
57
|
+
* to a header leaves that header unchanged exactly when the header is already
|
|
58
|
+
* that option's output — which makes "which option produced these bytes" a
|
|
59
|
+
* fixed-point search over the closed option list.
|
|
60
|
+
*
|
|
61
|
+
* Order is load-bearing twice over:
|
|
62
|
+
*
|
|
63
|
+
* - `'recommended'` is tried first, so a row compiled from the recommendation
|
|
64
|
+
* derives the sentinel rather than the default option's own id. As with the
|
|
65
|
+
* structure rule, an explicit choice that happens to equal the default
|
|
66
|
+
* collapses to the sentinel; nothing in the bytes distinguishes the two.
|
|
67
|
+
* - `'quiet'` is tried last, because it writes nothing and is therefore a fixed
|
|
68
|
+
* point of every header. Reaching it means no pill option produced these
|
|
69
|
+
* bytes — which is what "this row renders no pill" means, *provided the row
|
|
70
|
+
* carries no pill*. `carriesPaletteShapedEffect` is that proviso: a
|
|
71
|
+
* palette-shaped nav link that no option reproduces is `'unrecognised'`, not
|
|
72
|
+
* `'quiet'`.
|
|
73
|
+
*/
|
|
74
|
+
export declare function classifyHeaderInteractionPaletteBytes(header: ThemeHeader, group: HeaderInteractionPaletteOptionGroup | undefined): HeaderInteractionPaletteBytesClassification;
|
|
75
|
+
/**
|
|
76
|
+
* The preference `classifyHeaderInteractionPaletteBytes` derived, or `null`
|
|
77
|
+
* when the bytes express none — either because the style offers no palette or
|
|
78
|
+
* because they match no option it does offer. Callers that need to tell those
|
|
79
|
+
* two apart use the classification directly.
|
|
80
|
+
*/
|
|
81
|
+
export declare function readHeaderInteractionPaletteFromBytes(header: ThemeHeader, group: HeaderInteractionPaletteOptionGroup | undefined): HeaderInteractionPalettePreference | null;
|