@riverbankcms/sdk 0.136.0 → 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.
Files changed (160) hide show
  1. package/CHANGELOG.md +101 -0
  2. package/dist/{PreviewEditorSidebar-BU5ZlhQR.mjs → PreviewEditorSidebar-Bn6cONPa.mjs} +8 -8
  3. package/dist/{PreviewEditorUI-9XkHL-bC.mjs → PreviewEditorUI-LAwXZPSx.mjs} +3 -3
  4. package/dist/{PreviewQueryProvider-wbEpXryy.mjs → PreviewQueryProvider-ztQUdsNo.mjs} +1 -1
  5. package/dist/{SdkPreviewModeRuntime-CnWmj-2B.mjs → SdkPreviewModeRuntime-BbbGsI_v.mjs} +596 -164
  6. package/dist/{SiteChromeCustomizeContext-B6d5zkog.mjs → SiteChromeCustomizeContext-BbkNSt5a.mjs} +2888 -1404
  7. package/dist/_dts/ai/src/contracts/proposals.d.ts +12 -298
  8. package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +21 -14
  9. package/dist/_dts/ai/src/designer/themePatch.d.ts +5 -10
  10. package/dist/_dts/api/src/accessAdmin.d.ts +1 -9
  11. package/dist/_dts/api/src/accountApi.d.ts +49 -2
  12. package/dist/_dts/api/src/contentRuntime.d.ts +1 -4
  13. package/dist/_dts/api/src/domainConnection.d.ts +41 -0
  14. package/dist/_dts/api/src/endpoints.d.ts +194 -181
  15. package/dist/_dts/api/src/index.d.ts +4 -3
  16. package/dist/_dts/api/src/media.d.ts +19 -2
  17. package/dist/_dts/api/src/sdkContracts.d.ts +2 -15
  18. package/dist/_dts/api/src/sdkMediaContracts.d.ts +40 -0
  19. package/dist/_dts/api/src/sdkMediaEndpointDefinitions.d.ts +61 -0
  20. package/dist/_dts/api/src/sdkThemeWire.d.ts +15 -4
  21. package/dist/_dts/api/src/siteInfrastructure.d.ts +17 -23
  22. package/dist/_dts/api/src/siteManagementEndpoints.d.ts +7 -21
  23. package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +27 -3
  24. package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +37 -17
  25. package/dist/_dts/api/src/types.d.ts +1 -1
  26. package/dist/_dts/blocks/src/PageRenderer.d.ts +2 -2
  27. package/dist/_dts/blocks/src/index.d.ts +1 -1
  28. package/dist/_dts/blocks/src/pageRenderAdmission.d.ts +9 -0
  29. package/dist/_dts/blocks/src/pageRendererBlockSupport.d.ts +75 -0
  30. package/dist/_dts/blocks/src/pageRendererBoundaries.d.ts +2 -0
  31. package/dist/_dts/blocks/src/server.d.ts +1 -1
  32. package/dist/_dts/blocks/src/system/blocks/event-registration.d.ts +1 -1
  33. package/dist/_dts/blocks/src/system/runtime/api/client.d.ts +2 -1
  34. package/dist/_dts/blocks/src/system/runtime/hooks/useCalendarEvents.d.ts +3 -3
  35. package/dist/_dts/blocks/src/system/runtime/hooks/useCalendarEvents.state.d.ts +34 -22
  36. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/ErrorStep.d.ts +3 -5
  37. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.contract.d.ts +2 -0
  38. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.planning.d.ts +1 -1
  39. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/hooks.d.ts +2 -0
  40. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationErrorPresentation.d.ts +5 -0
  41. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationErrorRecovery.d.ts +25 -0
  42. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationWizardContext.d.ts +4 -0
  43. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationStripeReturn.d.ts +7 -3
  44. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationSubmit.d.ts +2 -0
  45. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +5 -2
  46. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useWaitlistClaimRestoration.d.ts +2 -0
  47. package/dist/_dts/blocks/src/system/runtime/nodes/events/domain/capacity.d.ts +164 -0
  48. package/dist/_dts/blocks/src/system/runtime/nodes/events/domain/cta.d.ts +29 -0
  49. package/dist/_dts/blocks/src/system/runtime/nodes/events/domain/dates.d.ts +47 -0
  50. package/dist/_dts/blocks/src/system/runtime/nodes/events/domain/index.d.ts +14 -0
  51. package/dist/_dts/blocks/src/system/runtime/nodes/events/domain/people.d.ts +6 -0
  52. package/dist/_dts/blocks/src/system/runtime/nodes/events/domain/pricing.d.ts +31 -0
  53. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/OfferingTitle.d.ts +11 -0
  54. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/WeekAgendaView.d.ts +1 -1
  55. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/WeekBoardView.d.ts +1 -1
  56. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/index.d.ts +3 -1
  57. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/listingLayout.d.ts +23 -0
  58. package/dist/_dts/commerce/src/purchase/event-registration-errors.d.ts +57 -0
  59. package/dist/_dts/commerce/src/purchase/index.d.ts +1 -0
  60. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +8 -40
  61. package/dist/_dts/db/src/index.d.ts +1 -0
  62. package/dist/_dts/db/src/utils/postgrestFilter.d.ts +2 -0
  63. package/dist/_dts/media-core/src/bulkDeletePlanning.d.ts +4 -0
  64. package/dist/_dts/media-core/src/fileDomain.d.ts +3 -0
  65. package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +1 -0
  66. package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +1 -0
  67. package/dist/_dts/preview-next/src/client/preview/SiteChromeCustomizeContext.d.ts +3 -2
  68. package/dist/_dts/preview-next/src/client/preview/siteChromeBrandPreferences.d.ts +1 -1
  69. package/dist/_dts/preview-next/src/client/preview/siteChromeQuickControlHistoryState.d.ts +2 -0
  70. package/dist/_dts/preview-next/src/client/preview/siteChromeQuickControlSaveRequest.d.ts +51 -0
  71. package/dist/_dts/preview-next/src/client/preview/siteChromeSavePlan.d.ts +24 -2
  72. package/dist/_dts/preview-next/src/client/preview/siteStylePreviewPlanner.d.ts +23 -1
  73. package/dist/_dts/preview-next/src/client/preview/usePersistedHeaderPreferences.d.ts +8 -0
  74. package/dist/_dts/sdk/src/public-api/contracts.d.ts +2 -1
  75. package/dist/_dts/sdk/src/version.d.ts +1 -1
  76. package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
  77. package/dist/_dts/theme-core/src/gradients/types.d.ts +5 -0
  78. package/dist/_dts/theme-core/src/header/interactionPalette.d.ts +25 -2
  79. package/dist/_dts/theme-core/src/mock-themes/all.d.ts +3 -3
  80. package/dist/_dts/theme-core/src/schema.d.ts +12 -11
  81. package/dist/_dts/theme-core/src/site-styles/compilationPlan.d.ts +43 -3
  82. package/dist/_dts/theme-core/src/site-styles/curatedSiteStyles.d.ts +10 -0
  83. package/dist/_dts/theme-core/src/site-styles/headerBrandPresentation.d.ts +63 -0
  84. package/dist/_dts/theme-core/src/site-styles/headerBytesComparison.d.ts +30 -0
  85. package/dist/_dts/theme-core/src/site-styles/headerInteractionPalette.d.ts +50 -1
  86. package/dist/_dts/theme-core/src/site-styles/headerLayoutCatalog.d.ts +48 -9
  87. package/dist/_dts/theme-core/src/site-styles/headerPreferences.d.ts +162 -0
  88. package/dist/_dts/theme-core/src/site-styles/headerPreferencesPersistence.d.ts +73 -0
  89. package/dist/_dts/theme-core/src/site-styles/headerRecompile.d.ts +118 -0
  90. package/dist/_dts/theme-core/src/site-styles/headerStyleCompiler.d.ts +10 -1
  91. package/dist/_dts/theme-core/src/site-styles/headerStyleDefaults.d.ts +1 -1
  92. package/dist/_dts/theme-core/src/site-styles/headerStyleRecipe.d.ts +7 -0
  93. package/dist/_dts/theme-core/src/site-styles/index.d.ts +5 -0
  94. package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +1 -1
  95. package/dist/_dts/theme-core/src/site-styles/siteChromeBackgrounds.d.ts +20 -1
  96. package/dist/_dts/theme-core/src/site-styles/siteChromeNavPreferences.d.ts +43 -2
  97. package/dist/client/{BookingConsentAgreement-DCch21a6.mjs → BookingConsentAgreement--_fUCZe-.mjs} +2 -2
  98. package/dist/client/{DiscountCodeDisclosure-DIj1T59K.mjs → DiscountCodeDisclosure-BMipSoDJ.mjs} +1 -1
  99. package/dist/client/{EventCombined.client-BWVNlXTx.mjs → EventCombined.client-CwJOxn7A.mjs} +154 -178
  100. package/dist/client/{EventListing.client-DVFCDe3i.mjs → EventListing.client-eVwiylPW.mjs} +2 -2
  101. package/dist/client/{LeafletStaticMap-BY5mIHw9.mjs → LeafletStaticMap-IKenna5u.mjs} +1 -1
  102. package/dist/client/{accordion-CK29E8rG.mjs → accordion-MGAO3PuE.mjs} +1 -1
  103. package/dist/client/{bookingForm-DFvnet-N.mjs → bookingForm-CudlQPUu.mjs} +5 -5
  104. package/dist/client/bookings.mjs +418 -79
  105. package/dist/client/capacity-BW00PO7s.mjs +271 -0
  106. package/dist/client/{carousel-BVU5NQlb.mjs → carousel-BrbGJ2Jl.mjs} +1 -1
  107. package/dist/client/{cart-BNItcZVa.mjs → cart-Bq5eU0xZ.mjs} +3 -3
  108. package/dist/client/{checkout-Bu6iCdkP.mjs → checkout-BAFVRdrK.mjs} +3 -3
  109. package/dist/client/client.mjs +2919 -1918
  110. package/dist/client/{context-BImarOAq.mjs → context-DCkiHVdD.mjs} +8 -5
  111. package/dist/client/dates-2RPXHQy4.mjs +264 -0
  112. package/dist/client/{eventCalendar-DS2h-UXD.mjs → eventCalendar-B0O-hPF7.mjs} +10 -17
  113. package/dist/client/{eventCombined-Drt4Oq9p.mjs → eventCombined-DCkDaoDI.mjs} +3 -3
  114. package/dist/client/{eventDetails-Bl2vWgTX.mjs → eventDetails-D8GG2dnD.mjs} +5 -3
  115. package/dist/client/{eventListing-CS7PHY7v.mjs → eventListing-3ssV_bxz.mjs} +3 -3
  116. package/dist/client/{eventRegistration-D-j8eNy2.mjs → eventRegistration-bPQo3kVw.mjs} +562 -309
  117. package/dist/client/{form-RMpoLTyr.mjs → form-qMv8RDkk.mjs} +2 -2
  118. package/dist/client/{headerSection-BYE3Lb3k.mjs → headerSection-CH0Sc5hX.mjs} +2 -2
  119. package/dist/client/hooks.mjs +289 -32
  120. package/dist/client/{locationMap-BxSr7Kkh.mjs → locationMap-0_xlBnNI.mjs} +2 -2
  121. package/dist/client/{newsletterForm-DerbXwFC.mjs → newsletterForm-NUW7m9RI.mjs} +2 -2
  122. package/dist/client/{productDetail-4SZCLhAf.mjs → productDetail-FBEOM7jW.mjs} +3 -3
  123. package/dist/client/{productList-D7AP4GNq.mjs → productList-R0OSGhnn.mjs} +3 -3
  124. package/dist/client/{propsDecoder-pzBeCh14.mjs → propsDecoder-pYvx_Srl.mjs} +88 -380
  125. package/dist/client/rendering/client.mjs +2616 -1637
  126. package/dist/client/rendering/islands.mjs +17 -17
  127. package/dist/client/rendering.mjs +2710 -1702
  128. package/dist/client/{scrollToBlock-CduAKf8T.mjs → scrollToBlock-ByQv96M2.mjs} +1 -1
  129. package/dist/client/{shop-Cp5p_kGe.mjs → shop-RUG9DmRE.mjs} +6 -6
  130. package/dist/client/{shop-commerce-DicXYaYX.mjs → shop-commerce-B76Jz23B.mjs} +5 -5
  131. package/dist/client/{shop-commerce-store-CGWnpY4K.mjs → shop-commerce-store-QuQNdDsD.mjs} +1 -1
  132. package/dist/client/{shopShared-BDf9ljkm.mjs → shopShared-vXU1omwJ.mjs} +3 -3
  133. package/dist/client/{useEventFilters-DeeyGYuk.mjs → useEventFilters-ByuU6HLA.mjs} +33 -18
  134. package/dist/preview-next/before-render.mjs +79 -51
  135. package/dist/preview-next/client/runtime.mjs +4 -4
  136. package/dist/preview-next/keepAlive.mjs +79 -51
  137. package/dist/preview-next/middleware.mjs +79 -51
  138. package/dist/{previewAuthStore-DbqBol0V.mjs → previewAuthStore-L_cKW8Sb.mjs} +79 -51
  139. package/dist/{sdk-runtime-19MO27F0.mjs → sdk-runtime-sUMr5d70.mjs} +2 -2
  140. package/dist/{separator-DaPLtJ1f.mjs → separator-BIHkie5i.mjs} +1 -1
  141. package/dist/server/components.mjs +2077 -1274
  142. package/dist/server/config-validation.mjs +289 -32
  143. package/dist/server/config.mjs +289 -32
  144. package/dist/server/data.mjs +289 -32
  145. package/dist/server/index.mjs +80 -52
  146. package/dist/server/next.mjs +1822 -1111
  147. package/dist/server/page-converter.mjs +167 -31
  148. package/dist/server/prebuild.mjs +1 -1
  149. package/dist/server/rendering/server.mjs +1988 -1286
  150. package/dist/server/rendering.mjs +1943 -1182
  151. package/dist/server/routing.mjs +351 -86
  152. package/dist/server/server.mjs +293 -128
  153. package/dist/server/theme-bridge.mjs +52 -8
  154. package/dist/server/theme.mjs +27 -8
  155. package/dist/styles/index.css +15 -0
  156. package/package.json +1 -1
  157. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCapacity.d.ts +0 -48
  158. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/pricing.d.ts +0 -17
  159. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/utils.d.ts +0 -100
  160. /package/dist/_dts/blocks/src/system/runtime/nodes/events/{shared → domain}/destination.d.ts +0 -0
@@ -0,0 +1,73 @@
1
+ import { z } from 'zod';
2
+ import { type SiteChromeBackgroundColorToken } from './siteChromeBackgrounds';
3
+ import type { HeaderPreferences } from './headerPreferences';
4
+ /**
5
+ * The persisted shape of `HeaderPreferences`, closed at every field.
6
+ *
7
+ * `.strict()` throughout is deliberate: an unknown key in the stored blob means
8
+ * the writer knew about a field this reader does not, and silently dropping it
9
+ * would let a save round-trip away someone else's intent. Every field is
10
+ * required for the same reason a default would be a hidden authority: a stored
11
+ * record that omits one is not a record this reader may complete.
12
+ */
13
+ export declare const headerPreferencesSchema: z.ZodType<HeaderPreferences>;
14
+ /** Only controls the client can edit may cross the write boundary. */
15
+ export declare const headerPreferencesWireSchema: z.ZodObject<{
16
+ background: z.ZodDiscriminatedUnion<[z.ZodObject<{
17
+ kind: z.ZodLiteral<"default">;
18
+ }, z.core.$strict>, z.ZodObject<{
19
+ kind: z.ZodLiteral<"color">;
20
+ token: z.ZodType<SiteChromeBackgroundColorToken, unknown, z.core.$ZodTypeInternals<SiteChromeBackgroundColorToken, unknown>>;
21
+ }, z.core.$strict>], "kind">;
22
+ navTextSize: z.ZodEnum<{
23
+ base: "base";
24
+ sm: "sm";
25
+ lg: "lg";
26
+ xl: "xl";
27
+ inherit: "inherit";
28
+ }>;
29
+ navFontRole: z.ZodEnum<{
30
+ heading: "heading";
31
+ body: "body";
32
+ inherit: "inherit";
33
+ }>;
34
+ interactionPalette: z.ZodUnion<readonly [z.ZodLiteral<"recommended">, z.ZodEnum<{
35
+ accent: "accent";
36
+ primary: "primary";
37
+ secondary: "secondary";
38
+ quiet: "quiet";
39
+ }>]>;
40
+ brandDisplay: z.ZodEnum<{
41
+ auto: "auto";
42
+ "logo-only": "logo-only";
43
+ "logo-plus-title": "logo-plus-title";
44
+ "title-only": "title-only";
45
+ }>;
46
+ logoSize: z.ZodEnum<{
47
+ auto: "auto";
48
+ display: "display";
49
+ standard: "standard";
50
+ compact: "compact";
51
+ generous: "generous";
52
+ }>;
53
+ }, z.core.$strict>;
54
+ /**
55
+ * The read boundary for `site_theme_selections.header_preferences`.
56
+ *
57
+ * Three outcomes, never a throw and never a silent default: the column is
58
+ * nullable while the Phase 4c backfill is outstanding, so "absent" is a real
59
+ * and expected state that a caller must handle by deriving from the legacy
60
+ * theme with `readHeaderPreferences`. "Invalid" is separate from "absent"
61
+ * because the two want different responses — one is a backlog item, the other
62
+ * is a bug or a hand-edited row.
63
+ */
64
+ export type PersistedHeaderPreferences = Readonly<{
65
+ kind: 'present';
66
+ preferences: HeaderPreferences;
67
+ }> | Readonly<{
68
+ kind: 'absent';
69
+ }> | Readonly<{
70
+ kind: 'invalid';
71
+ issues: readonly string[];
72
+ }>;
73
+ export declare function parsePersistedHeaderPreferences(value: unknown): PersistedHeaderPreferences;
@@ -0,0 +1,118 @@
1
+ import type { Theme, ThemeHeader } from '../schema';
2
+ import { type CuratedSiteStyle } from './curatedSiteStyles';
3
+ import { type HeaderLayoutStyleResolution, type HeaderLayoutStyleSelection } from './headerLayoutStyles';
4
+ import { type HeaderPreferences } from './headerPreferences';
5
+ import { type HeaderInteractionPaletteBytesClassification, type HeaderInteractionPaletteOptionGroup } from './headerInteractionPalette';
6
+ import { type HeaderBrandPresentationBytesClassification } from './headerBrandPresentation';
7
+ import type { HeaderInteractionPalettePreference } from '../header/interactionPalette';
8
+ import type { HeaderBrandPresentationSelection } from './logoBranding';
9
+ import type { ReplacementBrandPresentation } from './compilationPlan';
10
+ export type CuratedHeaderSelectionRepair = Readonly<{
11
+ kind: 'exact';
12
+ }> | Readonly<{
13
+ kind: 'repaired';
14
+ reason: 'style-not-curated-for-layout' | 'layout-not-curated-for-site-style';
15
+ }>;
16
+ export type CuratedHeaderSelectionResolution = Readonly<{
17
+ resolution: HeaderLayoutStyleResolution;
18
+ repair: CuratedHeaderSelectionRepair;
19
+ }>;
20
+ /**
21
+ * Curated repair followed by catalogue repair — the first two steps of the
22
+ * header compilation pipeline, in one place so no caller re-derives them.
23
+ */
24
+ export declare function resolveCuratedHeaderSelection(siteStyle: CuratedSiteStyle, requested: HeaderLayoutStyleSelection): CuratedHeaderSelectionResolution;
25
+ /**
26
+ * Which interaction palette a compilation should use.
27
+ *
28
+ * `derive-from-persisted-bytes` is the backfill's answer, and it is a request
29
+ * rather than a value because the derivation needs the option list the resolved
30
+ * recipe offers, which only the compilation knows. It mirrors
31
+ * `ReplacementBrandPresentation`: the caller states what it wants, the
32
+ * composition resolves it.
33
+ */
34
+ export type HeaderInteractionPaletteRequest = Readonly<{
35
+ kind: 'preference';
36
+ preference: HeaderInteractionPalettePreference;
37
+ }> | Readonly<{
38
+ kind: 'derive-from-persisted-bytes';
39
+ }>;
40
+ export type CompiledCuratedHeader = Readonly<{
41
+ /** Recipe and interaction palette only — the structure-derivation baseline. */
42
+ baseline: ThemeHeader;
43
+ /** `baseline` with the brand presentation applied, when there is one. */
44
+ header: ThemeHeader;
45
+ /** The presentation the request resolved to against the chosen layout. */
46
+ brandPresentation: HeaderBrandPresentationSelection | null;
47
+ /**
48
+ * The palette the resolved recipe offers, so a caller deriving intent from
49
+ * persisted bytes has the option list without re-resolving the recipe or
50
+ * guessing at it (#1318 Phase 4c decision 2).
51
+ */
52
+ interactionPalette: HeaderInteractionPaletteOptionGroup | undefined;
53
+ resolution: HeaderLayoutStyleResolution;
54
+ repair: CuratedHeaderSelectionRepair;
55
+ }>;
56
+ /**
57
+ * Curated repair → catalogue repair → recipe → interaction palette → brand
58
+ * presentation. Everything that runs before the preference record, in one
59
+ * place: `previewCompiler.compileHeaderDirective` and the recompile below are
60
+ * both callers, so the middle of the pipeline has a single composition.
61
+ *
62
+ * `baseline` and `header` are both returned because they answer different
63
+ * questions. `header` is what a preview wants to render. `baseline` is what
64
+ * `readHeaderPreferences` compares the persisted bytes against for every field
65
+ * the presentation does not touch.
66
+ *
67
+ * The interaction-palette preference is threaded in through `theme.header`
68
+ * because that is where `compileHeaderLayoutStyleSelection` reads it from
69
+ * today; 4b can pass it explicitly once the preferences column exists.
70
+ */
71
+ export declare function compileHeaderForCuratedSelection(theme: Theme, siteStyle: CuratedSiteStyle, requested: HeaderLayoutStyleSelection, requestedBrandPresentation: ReplacementBrandPresentation, requestedInteractionPalette: HeaderInteractionPaletteRequest): CompiledCuratedHeader;
72
+ export type RecompileSiteChromeHeaderInput = Readonly<{
73
+ theme: Theme;
74
+ siteStyle: CuratedSiteStyle;
75
+ requested: HeaderLayoutStyleSelection;
76
+ preferences: HeaderPreferences;
77
+ brandPresentation: ReplacementBrandPresentation;
78
+ }>;
79
+ export type RecompiledSiteChromeHeader = Readonly<{
80
+ header: ThemeHeader;
81
+ resolution: HeaderLayoutStyleResolution;
82
+ repair: CuratedHeaderSelectionRepair;
83
+ }>;
84
+ /**
85
+ * The whole header pipeline, in one named function so 4b, 4c and 4d cannot
86
+ * drift into three orders (#1318 Phase 4):
87
+ *
88
+ * curated repair → catalogue repair → recipe → layout defaults
89
+ * → interaction palette → structure preferences → brand presentation
90
+ * → nav/logo/background preferences
91
+ */
92
+ export declare function recompileSiteChromeHeader(input: RecompileSiteChromeHeaderInput): RecompiledSiteChromeHeader;
93
+ /**
94
+ * The read-then-recompile round trip: derive the row's intent from its own
95
+ * persisted bytes, then rebuild the header from that intent. On a row whose
96
+ * bytes are compiler output this returns the persisted header unchanged, which
97
+ * is what the Phase 4c divergence report measures.
98
+ */
99
+ export declare function recompileSiteChromeHeaderFromPersistedIntent(theme: Theme, siteStyle: CuratedSiteStyle, requested: HeaderLayoutStyleSelection, brandPresentation: ReplacementBrandPresentation): Readonly<{
100
+ recompiled: RecompiledSiteChromeHeader;
101
+ preferences: HeaderPreferences;
102
+ /**
103
+ * How the row's own bytes answered the interaction-palette question. Reported
104
+ * rather than folded into `preferences`, because `'unrecognised'` has no
105
+ * representation there: the record falls back to the marker field, and a
106
+ * caller that cares — the Phase 4c divergence report — needs to say so rather
107
+ * than let a pill nobody recognises be dropped on the next recompile.
108
+ */
109
+ interactionPaletteBytes: HeaderInteractionPaletteBytesClassification;
110
+ /**
111
+ * How the row's own bytes answered the brand-presentation question, reported
112
+ * for the same reason as the palette: `'unrecognised'` has no representation
113
+ * in the record, and a caller that cares — the Phase 4c divergence report and
114
+ * the repair generator — must be able to say so rather than let a logo
115
+ * treatment nobody recognises be written or dropped.
116
+ */
117
+ brandPresentationBytes: HeaderBrandPresentationBytesClassification;
118
+ }>;
@@ -1,4 +1,5 @@
1
1
  import type { Theme } from '../schema';
2
+ import type { HeaderInteractionPalettePreference } from '../header/interactionPalette';
2
3
  import type { HeaderLayoutStyleResolution } from './headerLayoutTypes';
3
4
  import { type HeaderStyleRecipeOwner } from './headerStyleDefaults';
4
5
  /**
@@ -13,5 +14,13 @@ import { type HeaderStyleRecipeOwner } from './headerStyleDefaults';
13
14
  * site style has to say so, because silently falling back to the catalogue
14
15
  * default is exactly the ownership leak this slice closes. Pass `null` when
15
16
  * there genuinely is no site style (initial site provisioning).
17
+ *
18
+ * `interactionPalette` is a parameter rather than a read off
19
+ * `theme.header.interactionPalette` (#1318 Phase 4c). The marker field on the
20
+ * header is where the preference is *persisted*, but taking it from there made
21
+ * the palette the one preference the compiler could not be told about — which
22
+ * is invisible while the marker always equals what was compiled and wrong the
23
+ * moment a backfill supplies a different one. The caller that owns the
24
+ * preference record now says which palette to compile.
16
25
  */
17
- export declare function compileHeaderLayoutStyleSelection(theme: Theme, resolution: HeaderLayoutStyleResolution, siteStyle: HeaderStyleRecipeOwner | null): Theme['header'];
26
+ export declare function compileHeaderLayoutStyleSelection(theme: Theme, resolution: HeaderLayoutStyleResolution, siteStyle: HeaderStyleRecipeOwner | null, interactionPalette: HeaderInteractionPalettePreference): Theme['header'];
@@ -372,7 +372,7 @@ export declare const defaultHeaderStyleRecipes: {
372
372
  id: "interaction-palette";
373
373
  label: string;
374
374
  options: readonly [import("../../../blocks/src/index").HeaderInteractionPaletteOption, ...import("../../../blocks/src/index").HeaderInteractionPaletteOption[]];
375
- defaultOptionId: "accent" | "primary" | "secondary";
375
+ defaultOptionId: "accent" | "primary" | "secondary" | "quiet";
376
376
  }>;
377
377
  };
378
378
  readonly 'soft-shell': {
@@ -156,6 +156,13 @@ export type HeaderStyleRecipe = HeaderStyleRecipeCore & Readonly<{
156
156
  /**
157
157
  * The single header interpreter. Pure and total: same `(theme, layout, recipe)`
158
158
  * in, same object out, no throws of its own.
159
+ *
160
+ * It **constructs** a `ThemeHeader` rather than starting from one (#1318 Phase
161
+ * 4e). `theme` is read for the palette-dependent facets only — the themed
162
+ * shadow and the CTA variant — never for `theme.header`, so no value can
163
+ * survive a recompile by accident. Every required field of `headerSchema` is
164
+ * produced by a named branch here or in `headerForLayout`; the type is the
165
+ * check.
159
166
  */
160
167
  export declare function compileHeaderRecipe(theme: Theme, layout: HeaderLayoutDefinition, recipe: HeaderStyleRecipe): ThemeHeader;
161
168
  export {};
@@ -16,6 +16,11 @@ export * from './generatedSchemas';
16
16
  export * from './generatedDesignPipeline';
17
17
  export * from './headerLayoutStyles';
18
18
  export * from './headerInteractionPalette';
19
+ export * from './headerBrandPresentation';
20
+ export { applyHeaderPreferences, defaultHeaderPreferences, defaultHeaderStructurePreferences, type HeaderLogoTextIntent, type HeaderPreferences, type HeaderQuickControlPreferences, type HeaderStructurePreferences, } from './headerPreferences';
21
+ export { headerPreferencesSchema, headerPreferencesWireSchema, parsePersistedHeaderPreferences, type PersistedHeaderPreferences, } from './headerPreferencesPersistence';
22
+ export { compareCompiledHeaders, type CompiledHeaderComparison, type HeaderFieldDiff, } from './headerBytesComparison';
23
+ export { compileHeaderForCuratedSelection, recompileSiteChromeHeader, recompileSiteChromeHeaderFromPersistedIntent, type CuratedHeaderSelectionRepair, type CompiledCuratedHeader, type HeaderInteractionPaletteRequest, type RecompileSiteChromeHeaderInput, type RecompiledSiteChromeHeader, } from './headerRecompile';
19
24
  export * from './headerOpeningForeground';
20
25
  export * from './headerOpeningSection';
21
26
  export * from './lookResolution';
@@ -4,7 +4,7 @@ import { type ButtonStyleSelection } from '../buttons/styles';
4
4
  import { type CuratedSiteStyle } from './curatedSiteStyles';
5
5
  import { type FooterLookId } from './footerLooks';
6
6
  import type { SiteThemeCompilationPlan } from './compilationPlan';
7
- import { type HeaderLayoutStyleSelection } from './headerLayoutStyles';
7
+ import type { HeaderLayoutStyleSelection } from './headerLayoutStyles';
8
8
  import { type CompiledBlockRuntimeFields, type CompiledBoundaryRuntime, type CompiledPageRuntime, type ComponentRuntimeRules, type DesignRuntimeRules, type SemanticSpacing, type SurfaceResolutionContext } from './runtimeCompiler';
9
9
  import { type AppearancePresetId, type DesignBlockId, type SiteStyleId } from './types';
10
10
  import { type CuratedSiteStyleTheme } from './siteStyleThemeCompiler';
@@ -1,4 +1,4 @@
1
- import type { Theme } from '../schema';
1
+ import type { Theme, ThemeFooter, ThemeHeader } from '../schema';
2
2
  import type { ThemeColorToken } from '../tokens';
3
3
  export type SiteChromeSurface = 'header' | 'footer';
4
4
  export type SiteChromeBackgroundColorToken = ThemeColorToken & {
@@ -28,3 +28,22 @@ export declare function siteChromeBackgroundOverrideLabel(override: SiteChromeBa
28
28
  export declare function formatSiteChromeBackgroundTokenLabel(token: SiteChromeBackgroundColorToken): string;
29
29
  export declare function siteChromeBackgroundOverrideEquals(left: SiteChromeBackgroundOverride, right: SiteChromeBackgroundOverride): boolean;
30
30
  export declare function cycleSiteChromeBackgroundOverride(current: SiteChromeBackgroundOverride, direction: SiteChromeBackgroundCycleDirection): SiteChromeBackgroundOverride;
31
+ /**
32
+ * Reads the header background override back out of persisted bytes. Exported
33
+ * for `readHeaderPreferences`, which needs the header half on its own.
34
+ */
35
+ export declare function siteChromeBackgroundOverrideFromHeader(header: ThemeHeader): SiteChromeBackgroundOverride;
36
+ /**
37
+ * Header-only background applier. Exported so the header preference pipeline
38
+ * can apply the header override without going through
39
+ * `applySiteChromeBackgroundPreferences`, which also writes the footer and
40
+ * would clobber footer intent (#1318 Correction 20).
41
+ */
42
+ export declare function applyHeaderBackgroundOverride(theme: Theme, header: ThemeHeader, override: SiteChromeBackgroundOverride): ThemeHeader;
43
+ /**
44
+ * Footer-only background applier, the counterpart of
45
+ * `applyHeaderBackgroundOverride`. Exported so a caller that owns one surface
46
+ * can write that surface rather than passing a no-op override for the other
47
+ * (#1318 Correction 20).
48
+ */
49
+ export declare function applyFooterBackgroundOverride(theme: Theme, footer: ThemeFooter, override: SiteChromeBackgroundOverride): ThemeFooter;
@@ -1,6 +1,6 @@
1
1
  import type { NavLinkStyle, NavLinkTextSize } from '../navigation/types';
2
- import type { Theme } from '../schema';
3
- import type { HeaderInteractionPalettePreference } from '../header/interactionPalette';
2
+ import type { Theme, ThemeHeader } from '../schema';
3
+ import { type HeaderInteractionPalettePreference } from '../header/interactionPalette';
4
4
  export declare const headerNavTypographyPreferenceValues: readonly ["inherit", "body", "heading"];
5
5
  export type HeaderNavTypographyPreference = (typeof headerNavTypographyPreferenceValues)[number];
6
6
  export declare const headerNavFontSizePreferenceValues: readonly ["inherit", "sm", "base", "lg", "xl"];
@@ -61,3 +61,44 @@ export declare function withHeaderNavThemePreferences(theme: Theme, preferences:
61
61
  */
62
62
  export declare function mergeHeaderNavTypographyPreference(style: NavLinkStyle, preferences: Pick<HeaderNavPreferences, 'typography' | 'fontSize'>): NavLinkStyle;
63
63
  export declare function readHeaderNavFontSizePreference(value: NavLinkTextSize | undefined): HeaderNavFontSizePreference;
64
+ /**
65
+ * `navTextSize` derived as a preference by baseline comparison (#1318 Phase 4c
66
+ * decision 1) — the same rule the structure fields already use: compare the
67
+ * persisted value against what the row's own (layout, recipe) compiles, emit
68
+ * `'inherit'` when they agree and the explicit value when they do not.
69
+ *
70
+ * The reason it needs the rule at all is that nav size is one of the fields a
71
+ * pre-preferences row could only express by carrying it in the compiled bytes:
72
+ * `heart-led-yoga` and `therese-millar-yoga` persist `navLinkStyle.textSize:
73
+ * 'lg'` under a `serif-line` recipe that compiles no size, which is a user's
74
+ * choice sitting in the wrong place. Reading only `header.navTextSize` derives
75
+ * `'inherit'` there and a recompile would shrink their nav.
76
+ *
77
+ * Backfilling the derived value is pixel-preserving because the CSS merge above
78
+ * makes `{navTextSize: 'lg'}` over a size-less nav link style render exactly
79
+ * what `{navLinkStyle: {textSize: 'lg'}}` renders.
80
+ *
81
+ * **Two cases lose information, and both are accepted rather than accidental.**
82
+ * The preference vocabulary is `inherit | sm | base | lg | xl` — there is no
83
+ * value meaning "no size at all" — so `'inherit'` has to carry both of them:
84
+ *
85
+ * 1. *Persisted size equals the baseline.* Nothing in the bytes distinguishes
86
+ * "chose the size the recipe already compiles" from "never chose", so the
87
+ * marker field is dropped on recompile. **Pixel-neutral**: the recipe puts
88
+ * the same size back.
89
+ * 2. *Persisted has no size and the baseline compiles one.* The row renders at
90
+ * the browser default and the recipe wants, say, `'sm'`; `'inherit'` is the
91
+ * only representable answer, so **the recompile adopts the baseline size and
92
+ * the row's sizeless-ness is lost**. This one is *not* pixel-neutral, and
93
+ * representing it properly would mean adding a `'none'` arm to the
94
+ * preference the way `HeaderStructurePreferences.logoText` has one.
95
+ *
96
+ * Case 2 is not silent. Adopting the baseline size is a byte change, so such a
97
+ * row shows up as divergent in the Phase 4c report (`navLinkStyle.textSize
98
+ * undefined -> "sm"`) and cannot reach Phase 4e unclassified — the report's
99
+ * zero-rows gate is the safety net for exactly this. No row in either corpus is
100
+ * in that state today; if one appears, it is a classification decision (widen
101
+ * the vocabulary, or accept the size) rather than something this function may
102
+ * guess at.
103
+ */
104
+ export declare function readHeaderNavFontSizeAgainstBaseline(persisted: ThemeHeader, compiled: ThemeHeader): HeaderNavFontSizePreference;
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { D as clsx } from "./colorStyles-CrxJrPjJ.mjs";
3
- import { At as assertNever$2, tn as formatCurrencyAmount } from "./propsDecoder-pzBeCh14.mjs";
4
- import { a as CheckIcon } from "./scrollToBlock-CduAKf8T.mjs";
3
+ import { Kt as formatCurrencyAmount, yt as assertNever$2 } from "./propsDecoder-pYvx_Srl.mjs";
4
+ import { a as CheckIcon } from "./scrollToBlock-ByQv96M2.mjs";
5
5
  import { n as RichText } from "./checkoutUrls-BuseL0dw.mjs";
6
6
  import { useCallback, useEffect, useReducer, useRef } from "react";
7
7
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { st as themeButtonClassName } from "./propsDecoder-pzBeCh14.mjs";
2
+ import { X as themeButtonClassName } from "./propsDecoder-pYvx_Srl.mjs";
3
3
  import { useId } from "react";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
5
  //#region ../blocks/src/system/runtime/api/types/discounts.ts