@riverbankcms/sdk 0.135.1 → 0.136.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 (152) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +4 -8
  3. package/dist/{PreviewEditorSidebar-D4p_5TdY.mjs → PreviewEditorSidebar-BU5ZlhQR.mjs} +4 -4
  4. package/dist/{PreviewEditorUI-D0cRoTX1.mjs → PreviewEditorUI-9XkHL-bC.mjs} +3 -3
  5. package/dist/{PreviewQueryProvider-DcgaESkm.mjs → PreviewQueryProvider-wbEpXryy.mjs} +1 -1
  6. package/dist/{SdkPreviewModeRuntime-BKLtM3Nz.mjs → SdkPreviewModeRuntime-CnWmj-2B.mjs} +50 -99
  7. package/dist/{SiteChromeCustomizeContext-61X2m7QV.mjs → SiteChromeCustomizeContext-B6d5zkog.mjs} +2299 -1149
  8. package/dist/_dts/ai/src/contracts/proposals.d.ts +8 -554
  9. package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +401 -2312
  10. package/dist/_dts/api/src/contentRuntime.d.ts +6 -0
  11. package/dist/_dts/api/src/endpoints.d.ts +7 -0
  12. package/dist/_dts/api/src/index.d.ts +1 -0
  13. package/dist/_dts/api/src/publicEventEndpointDefinitions.d.ts +7 -0
  14. package/dist/_dts/api/src/publicExperience/eventEndpoints.d.ts +26 -0
  15. package/dist/_dts/api/src/sdkBlockContentAdmission.d.ts +5 -0
  16. package/dist/_dts/api/src/sdkThemeWire.d.ts +6 -432
  17. package/dist/_dts/block-form/src/blockDraftSaveability.d.ts +2 -3
  18. package/dist/_dts/block-form/src/utils/slug.d.ts +6 -0
  19. package/dist/_dts/blocks/src/PageRenderer.d.ts +12 -6
  20. package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +48 -0
  21. package/dist/_dts/blocks/src/definitions.d.ts +14 -0
  22. package/dist/_dts/blocks/src/index.d.ts +4 -3
  23. package/dist/_dts/blocks/src/pageRenderAdmission.d.ts +40 -0
  24. package/dist/_dts/blocks/src/server.d.ts +2 -2
  25. package/dist/_dts/blocks/src/system/data/index.d.ts +2 -0
  26. package/dist/_dts/blocks/src/system/data/publicLoaderCachePolicy.d.ts +78 -0
  27. package/dist/_dts/blocks/src/system/manifest/fieldValidation/index.d.ts +2 -18
  28. package/dist/_dts/blocks/src/system/manifest/validation.d.ts +103 -16
  29. package/dist/_dts/blocks/src/system/node/validation-constants.d.ts +1 -1
  30. package/dist/_dts/blocks/src/system/runtime/api/client.d.ts +2 -1
  31. package/dist/_dts/blocks/src/system/runtime/api/endpoints.d.ts +8 -0
  32. package/dist/_dts/blocks/src/system/runtime/api/index.d.ts +1 -1
  33. package/dist/_dts/blocks/src/system/runtime/api/types/events.d.ts +19 -0
  34. package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +52 -0
  35. package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +24 -0
  36. package/dist/_dts/blocks/src/system/runtime/hooks/useCalendarEvents.d.ts +44 -18
  37. package/dist/_dts/blocks/src/system/runtime/hooks/useCalendarEvents.state.d.ts +20 -3
  38. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/VerifyingTimeoutStep.d.ts +3 -1
  39. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationStripeReturn.d.ts +1 -0
  40. package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCalendar.client.d.ts +2 -2
  41. package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCalendar.interactive.d.ts +40 -0
  42. package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.client.d.ts +2 -0
  43. package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.interactive.d.ts +43 -0
  44. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/CalendarDayCell.d.ts +3 -1
  45. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/CalendarNavigationChevron.d.ts +4 -0
  46. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/DayEventsModal.d.ts +2 -1
  47. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventModalContext.d.ts +3 -2
  48. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/WeekAgendaView.d.ts +3 -0
  49. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/WeekBoardView.d.ts +31 -3
  50. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/WeekTimetableView.d.ts +3 -1
  51. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +9 -1
  52. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/timetableModel.d.ts +4 -3
  53. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/utils.d.ts +3 -3
  54. package/dist/_dts/blocks/src/system/transforms/registry/layout.d.ts +0 -1
  55. package/dist/_dts/calendar/src/grid.d.ts +24 -66
  56. package/dist/_dts/calendar/src/index.d.ts +2 -2
  57. package/dist/_dts/calendar/src/timetable.d.ts +5 -9
  58. package/dist/_dts/commerce/src/purchase/allocation.d.ts +11 -0
  59. package/dist/_dts/commerce/src/purchase/index.d.ts +2 -0
  60. package/dist/_dts/commerce/src/purchase/settlement.d.ts +33 -0
  61. package/dist/_dts/commerce/src/purchase/stripeCheckoutReturnUrl.d.ts +8 -0
  62. package/dist/_dts/content-model/src/templates/defaults.d.ts +6 -0
  63. package/dist/_dts/core/src/slug.d.ts +20 -5
  64. package/dist/_dts/preview-next/src/client/blocks/EditablePageRenderer.d.ts +1 -1
  65. package/dist/_dts/preview-next/src/client/preview/headerInteractionPaletteSurfaceState.d.ts +2 -1
  66. package/dist/_dts/sdk/src/client/publicLoaderCacheAccess.d.ts +6 -0
  67. package/dist/_dts/sdk/src/public-api/contracts.d.ts +5 -1
  68. package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +10 -6
  69. package/dist/_dts/sdk/src/rendering/components/Block.shared.d.ts +0 -1
  70. package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +4 -4
  71. package/dist/_dts/sdk/src/rendering/helpers/footerPageOutline.d.ts +3 -0
  72. package/dist/_dts/sdk/src/rendering/helpers/loadContent.d.ts +3 -0
  73. package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +1 -1
  74. package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +17 -0
  75. package/dist/_dts/sdk/src/rendering/helpers/templateContent.d.ts +9 -3
  76. package/dist/_dts/sdk/src/rendering/hooks/usePage.d.ts +1 -1
  77. package/dist/_dts/sdk/src/rendering/index.d.ts +2 -2
  78. package/dist/_dts/sdk/src/rendering/overrideResolution.d.ts +7 -4
  79. package/dist/_dts/sdk/src/version.d.ts +1 -1
  80. package/dist/_dts/theme-core/src/cards/types.d.ts +8 -8
  81. package/dist/_dts/theme-core/src/data.d.ts +12 -0
  82. package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
  83. package/dist/_dts/theme-core/src/header/legacyHeaderVariant.d.ts +2 -6
  84. package/dist/_dts/theme-core/src/mock-themes/all.d.ts +6 -807
  85. package/dist/_dts/theme-core/src/schema.d.ts +452 -1278
  86. package/dist/_dts/theme-core/src/site-styles/curatedSiteStyles.d.ts +213 -1
  87. package/dist/_dts/theme-core/src/site-styles/headerLayoutCatalog.d.ts +0 -29
  88. package/dist/_dts/theme-core/src/site-styles/headerLayoutStyles.d.ts +10 -0
  89. package/dist/_dts/theme-core/src/site-styles/headerLayoutTypes.d.ts +8 -5
  90. package/dist/_dts/theme-core/src/site-styles/headerOpeningForeground.d.ts +4 -4
  91. package/dist/_dts/theme-core/src/site-styles/headerStyleCompiler.d.ts +16 -2
  92. package/dist/_dts/theme-core/src/site-styles/headerStyleDefaults.d.ts +465 -0
  93. package/dist/_dts/theme-core/src/site-styles/headerStyleRecipe.d.ts +161 -0
  94. package/dist/client/{BookingConsentAgreement-Bz9znbpn.mjs → BookingConsentAgreement-DCch21a6.mjs} +2 -2
  95. package/dist/client/{DiscountCodeDisclosure-35Ru8yB9.mjs → DiscountCodeDisclosure-DIj1T59K.mjs} +1 -1
  96. package/dist/client/{EventCombined.client-BKB0ZxRR.mjs → EventCombined.client-BWVNlXTx.mjs} +226 -206
  97. package/dist/client/{EventListing.client-Dx8I21ok.mjs → EventListing.client-DVFCDe3i.mjs} +2 -2
  98. package/dist/client/{LeafletStaticMap-CEWx-Bhe.mjs → LeafletStaticMap-BY5mIHw9.mjs} +1 -1
  99. package/dist/client/{accordion-KIDsKTwS.mjs → accordion-CK29E8rG.mjs} +1 -1
  100. package/dist/client/{bookingForm-D96Rmp-5.mjs → bookingForm-DFvnet-N.mjs} +5 -5
  101. package/dist/client/bookings.mjs +86 -47
  102. package/dist/client/{carousel-YwUgyL66.mjs → carousel-BVU5NQlb.mjs} +1 -1
  103. package/dist/client/{cart-BbwuNrUT.mjs → cart-BNItcZVa.mjs} +3 -3
  104. package/dist/client/{checkout-hp1ucmEY.mjs → checkout-Bu6iCdkP.mjs} +3 -3
  105. package/dist/client/client.mjs +1950 -1031
  106. package/dist/client/{context-DljQn8L5.mjs → context-BImarOAq.mjs} +12 -0
  107. package/dist/client/{eventCalendar-DU4iNLpo.mjs → eventCalendar-DS2h-UXD.mjs} +256 -114
  108. package/dist/client/{eventCombined-CZuupW8m.mjs → eventCombined-Drt4Oq9p.mjs} +3 -3
  109. package/dist/client/{eventDetails-DPQWwCIi.mjs → eventDetails-Bl2vWgTX.mjs} +4 -3
  110. package/dist/client/{eventListing-C7oMidwS.mjs → eventListing-CS7PHY7v.mjs} +3 -3
  111. package/dist/client/{eventRegistration-zEiunlUs.mjs → eventRegistration-D-j8eNy2.mjs} +85 -41
  112. package/dist/client/{form-D2KIyCVJ.mjs → form-RMpoLTyr.mjs} +2 -2
  113. package/dist/client/{headerSection-CK5uChUK.mjs → headerSection-BYE3Lb3k.mjs} +2 -2
  114. package/dist/client/hooks.mjs +2225 -276
  115. package/dist/client/{locationMap-DLQNH1ln.mjs → locationMap-BxSr7Kkh.mjs} +2 -2
  116. package/dist/client/{newsletterForm-ZuhIG7fZ.mjs → newsletterForm-DerbXwFC.mjs} +2 -2
  117. package/dist/client/{productDetail-7hIcGeae.mjs → productDetail-4SZCLhAf.mjs} +3 -3
  118. package/dist/client/{productList-T4Cii1ot.mjs → productList-D7AP4GNq.mjs} +3 -3
  119. package/dist/client/{propsDecoder-mB0aC_Fi.mjs → propsDecoder-pzBeCh14.mjs} +94 -24
  120. package/dist/client/rendering/client.mjs +758 -464
  121. package/dist/client/rendering/islands.mjs +17 -17
  122. package/dist/client/rendering.mjs +2126 -1244
  123. package/dist/client/{scrollToBlock-Du5mHgvL.mjs → scrollToBlock-CduAKf8T.mjs} +1 -1
  124. package/dist/client/{shop-B5zAcKZn.mjs → shop-Cp5p_kGe.mjs} +6 -6
  125. package/dist/client/{shop-commerce-BKBZB6l5.mjs → shop-commerce-DicXYaYX.mjs} +5 -5
  126. package/dist/client/{shop-commerce-store-Cq4qlNtQ.mjs → shop-commerce-store-CGWnpY4K.mjs} +1 -1
  127. package/dist/client/{shopShared-DYGzEs9D.mjs → shopShared-BDf9ljkm.mjs} +3 -3
  128. package/dist/client/{useEventFilters-Bphkda8m.mjs → useEventFilters-DeeyGYuk.mjs} +3 -3
  129. package/dist/preview-next/before-render.mjs +7 -0
  130. package/dist/preview-next/client/runtime.mjs +4 -4
  131. package/dist/preview-next/keepAlive.mjs +7 -0
  132. package/dist/preview-next/middleware.mjs +7 -0
  133. package/dist/{previewAuthStore-C7ksxt5b.mjs → previewAuthStore-DbqBol0V.mjs} +7 -0
  134. package/dist/{sdk-runtime-BbIC8G4J.mjs → sdk-runtime-19MO27F0.mjs} +2 -2
  135. package/dist/{separator-CadhAtI7.mjs → separator-DaPLtJ1f.mjs} +1 -1
  136. package/dist/server/components.mjs +1527 -893
  137. package/dist/server/config-validation.mjs +65 -113
  138. package/dist/server/config.mjs +65 -113
  139. package/dist/server/data.mjs +65 -112
  140. package/dist/server/index.mjs +122 -4
  141. package/dist/server/manifest.mjs +0 -1
  142. package/dist/server/next.mjs +1432 -708
  143. package/dist/server/page-converter.mjs +58 -91
  144. package/dist/server/prebuild.mjs +1 -1
  145. package/dist/server/rendering/server.mjs +1682 -915
  146. package/dist/server/rendering.mjs +1694 -1020
  147. package/dist/server/routing.mjs +3230 -1843
  148. package/dist/server/server.mjs +21710 -19779
  149. package/dist/server/theme-bridge.mjs +656 -264
  150. package/dist/server/theme.mjs +2 -17
  151. package/dist/styles/index.css +609 -181
  152. package/package.json +1 -1
@@ -0,0 +1,465 @@
1
+ import type { HeaderStyleIdValue } from './headerLayoutTypes';
2
+ import type { HeaderStyleRecipe } from './headerStyleRecipe';
3
+ /**
4
+ * A site style's optional take-over of specific header recipes.
5
+ *
6
+ * Structural rather than importing `CuratedSiteStyle`, which would close an
7
+ * import cycle: the curated table already imports the header vocabulary.
8
+ */
9
+ export type HeaderStyleRecipeOverrides = Partial<Record<HeaderStyleIdValue, HeaderStyleRecipe>>;
10
+ export type HeaderStyleRecipeOwner = Readonly<{
11
+ headerStyleRecipes?: HeaderStyleRecipeOverrides;
12
+ }>;
13
+ /**
14
+ * A style either takes the default recipe or authors a complete one. This is
15
+ * deliberately not a deep merge: the same "declare the variant or fall back"
16
+ * rule cards use, so a half-authored recipe cannot exist.
17
+ */
18
+ export declare function resolveHeaderStyleRecipe(siteStyle: HeaderStyleRecipeOwner | null, styleId: HeaderStyleIdValue): HeaderStyleRecipe;
19
+ /**
20
+ * The default header appearance for every catalogue style id (#1318).
21
+ *
22
+ * This is the only id-keyed structure in the header appearance pipeline, and it
23
+ * is data rather than dispatch — the same shape `cards/siteStyleDefaults.ts`
24
+ * uses. A site style that wants a different header takes over an entry here
25
+ * with its own recipe; it does not add a branch anywhere.
26
+ *
27
+ * `navWeight` (the bar) and `navLinkWeight` (the link text) are separate fields
28
+ * and they disagree on five styles. That disagreement is real and pre-existing;
29
+ * it is spelled out here rather than left implicit in a helper default. See the
30
+ * note on `HeaderStyleRecipeCore.navLinkWeight`.
31
+ */
32
+ export declare const defaultHeaderStyleRecipes: {
33
+ readonly minimal: {
34
+ readonly tone: "neutral";
35
+ readonly background: {
36
+ readonly kind: "token";
37
+ readonly token: "surface";
38
+ };
39
+ readonly nav: {
40
+ readonly kind: "minimal";
41
+ readonly hoverColorToken: "primary";
42
+ };
43
+ readonly navWeight: "medium";
44
+ readonly navLinkWeight: "medium";
45
+ readonly navTypography: "plain";
46
+ readonly border: "none";
47
+ readonly shadow: {
48
+ readonly kind: "absent";
49
+ };
50
+ readonly frame: {
51
+ readonly kind: "none";
52
+ };
53
+ readonly cta: {
54
+ readonly treatment: "default";
55
+ };
56
+ };
57
+ readonly 'fine-line': {
58
+ readonly tone: "neutral";
59
+ readonly background: {
60
+ readonly kind: "token";
61
+ readonly token: "surface";
62
+ };
63
+ readonly nav: {
64
+ readonly kind: "underline";
65
+ readonly hover: "underline";
66
+ };
67
+ readonly navWeight: "medium";
68
+ readonly navLinkWeight: "medium";
69
+ readonly navTypography: "plain";
70
+ readonly border: "none";
71
+ readonly shadow: {
72
+ readonly kind: "absent";
73
+ };
74
+ readonly frame: {
75
+ readonly kind: "none";
76
+ };
77
+ readonly cta: {
78
+ readonly treatment: "outline";
79
+ };
80
+ };
81
+ readonly 'soft-bar': {
82
+ readonly tone: "neutral";
83
+ readonly background: {
84
+ readonly kind: "token";
85
+ readonly token: "surfaceAlt";
86
+ };
87
+ readonly nav: {
88
+ readonly kind: "pill";
89
+ readonly backing: "capsule";
90
+ readonly hoverColorToken: "primary";
91
+ readonly hoverAlpha: 8;
92
+ };
93
+ readonly navWeight: "medium";
94
+ readonly navLinkWeight: "medium";
95
+ readonly navTypography: "plain";
96
+ readonly border: "bottom";
97
+ readonly shadow: {
98
+ readonly kind: "absent";
99
+ };
100
+ readonly frame: {
101
+ readonly kind: "none";
102
+ };
103
+ readonly cta: {
104
+ readonly treatment: "default";
105
+ };
106
+ };
107
+ readonly 'pill-nav': {
108
+ readonly tone: "neutral";
109
+ readonly background: {
110
+ readonly kind: "token";
111
+ readonly token: "surface";
112
+ };
113
+ readonly nav: {
114
+ readonly kind: "pill";
115
+ readonly backing: "capsule";
116
+ readonly hoverColorToken: "primary";
117
+ readonly hoverAlpha: 10;
118
+ };
119
+ readonly navWeight: "medium";
120
+ readonly navLinkWeight: "medium";
121
+ readonly navTypography: "plain";
122
+ readonly border: "none";
123
+ readonly shadow: {
124
+ readonly kind: "absent";
125
+ };
126
+ readonly frame: {
127
+ readonly kind: "nav-container";
128
+ readonly type: "pill";
129
+ readonly tint: "surfaceAlt";
130
+ readonly opacity: 0.7;
131
+ };
132
+ readonly cta: {
133
+ readonly treatment: "default";
134
+ };
135
+ };
136
+ readonly 'brand-bar': {
137
+ readonly tone: "brand";
138
+ readonly background: {
139
+ readonly kind: "token";
140
+ readonly token: "primary";
141
+ };
142
+ readonly nav: {
143
+ readonly kind: "minimal";
144
+ readonly hoverColorToken: "secondary";
145
+ };
146
+ readonly navWeight: "semibold";
147
+ readonly navLinkWeight: "medium";
148
+ readonly navTypography: "brand-caps";
149
+ readonly border: "none";
150
+ readonly shadow: {
151
+ readonly kind: "absent";
152
+ };
153
+ readonly frame: {
154
+ readonly kind: "none";
155
+ };
156
+ readonly cta: {
157
+ readonly treatment: "inverted";
158
+ };
159
+ };
160
+ /**
161
+ * Ledger D13 + D14. The catalogue look changes here, deliberately and once:
162
+ * bold links (the recipe used to set a bold bar over medium links), a hover
163
+ * that changes colour *and* underlines, and a compact CTA gap. No production
164
+ * site has `brand-underline` selected, so this changes zero live sites — and
165
+ * it is what lets `south-west-twerk-school` reach its current appearance
166
+ * through shared vocabulary instead of a site-style override.
167
+ */
168
+ readonly 'brand-underline': {
169
+ readonly tone: "brand";
170
+ readonly background: {
171
+ readonly kind: "token";
172
+ readonly token: "primary";
173
+ };
174
+ readonly nav: {
175
+ readonly kind: "underline";
176
+ readonly hover: "both";
177
+ readonly hoverColorToken: "secondary";
178
+ readonly underlineColorToken: "secondary";
179
+ };
180
+ readonly navWeight: "bold";
181
+ readonly navLinkWeight: "bold";
182
+ readonly navTypography: "brand-caps";
183
+ readonly border: "none";
184
+ readonly shadow: {
185
+ readonly kind: "absent";
186
+ };
187
+ readonly frame: {
188
+ readonly kind: "none";
189
+ };
190
+ readonly cta: {
191
+ readonly treatment: "inverted";
192
+ readonly gap: "compact";
193
+ };
194
+ };
195
+ readonly 'brand-pill': {
196
+ readonly tone: "brand";
197
+ readonly background: {
198
+ readonly kind: "token";
199
+ readonly token: "primary";
200
+ };
201
+ readonly nav: {
202
+ readonly kind: "pill";
203
+ readonly backing: "capsule";
204
+ readonly hoverColorToken: "primaryForeground";
205
+ readonly hoverAlpha: 14;
206
+ };
207
+ readonly navWeight: "semibold";
208
+ readonly navLinkWeight: "medium";
209
+ readonly navTypography: "brand-caps";
210
+ readonly border: "none";
211
+ readonly shadow: {
212
+ readonly kind: "absent";
213
+ };
214
+ readonly frame: {
215
+ readonly kind: "none";
216
+ };
217
+ readonly cta: {
218
+ readonly treatment: "inverted";
219
+ };
220
+ readonly onFloating: {
221
+ readonly background: {
222
+ readonly kind: "transparent";
223
+ };
224
+ readonly frame: {
225
+ readonly kind: "container";
226
+ readonly rounded: "2xl";
227
+ readonly padding: "sm";
228
+ readonly tint: "primary";
229
+ readonly opacity: 0.95;
230
+ };
231
+ };
232
+ };
233
+ readonly 'brand-capsule': {
234
+ readonly tone: "brand";
235
+ readonly background: {
236
+ readonly kind: "token";
237
+ readonly token: "primary";
238
+ };
239
+ readonly nav: {
240
+ readonly kind: "pill";
241
+ readonly backing: "capsule";
242
+ readonly hoverColorToken: "primaryForeground";
243
+ readonly hoverAlpha: 16;
244
+ };
245
+ readonly navWeight: "semibold";
246
+ readonly navLinkWeight: "medium";
247
+ readonly navTypography: "quiet-caps";
248
+ readonly border: "none";
249
+ readonly shadow: {
250
+ readonly kind: "fixed";
251
+ readonly elevation: "md";
252
+ };
253
+ readonly frame: {
254
+ readonly kind: "none";
255
+ };
256
+ readonly cta: {
257
+ readonly treatment: "inverted";
258
+ };
259
+ };
260
+ readonly 'serif-line': {
261
+ readonly tone: "neutral";
262
+ readonly background: {
263
+ readonly kind: "token";
264
+ readonly token: "background";
265
+ };
266
+ readonly nav: {
267
+ readonly kind: "underline";
268
+ readonly hover: "underline";
269
+ };
270
+ readonly navWeight: "medium";
271
+ readonly navLinkWeight: "medium";
272
+ readonly navTypography: "heading";
273
+ readonly border: "none";
274
+ readonly shadow: {
275
+ readonly kind: "explicit-none";
276
+ };
277
+ readonly frame: {
278
+ readonly kind: "none";
279
+ };
280
+ readonly cta: {
281
+ readonly treatment: "outline";
282
+ readonly gap: "relaxed";
283
+ };
284
+ readonly logo: {
285
+ readonly fontFamily: "heading";
286
+ readonly letterSpacing: "wide";
287
+ readonly gradient: false;
288
+ };
289
+ };
290
+ readonly 'flat-tabs': {
291
+ readonly tone: "neutral";
292
+ readonly background: {
293
+ readonly kind: "token";
294
+ readonly token: "surface";
295
+ };
296
+ readonly nav: {
297
+ readonly kind: "flat-tab";
298
+ };
299
+ readonly navWeight: "semibold";
300
+ readonly navLinkWeight: "semibold";
301
+ readonly navTypography: "quiet-caps";
302
+ readonly border: "bottom";
303
+ readonly shadow: {
304
+ readonly kind: "themed";
305
+ };
306
+ readonly frame: {
307
+ readonly kind: "none";
308
+ };
309
+ readonly cta: {
310
+ readonly treatment: "primary";
311
+ readonly gap: "compact";
312
+ };
313
+ };
314
+ readonly glass: {
315
+ readonly tone: "neutral";
316
+ readonly background: {
317
+ readonly kind: "transparent";
318
+ };
319
+ readonly nav: {
320
+ readonly kind: "pill";
321
+ readonly backing: "frosted";
322
+ readonly hoverColorToken: "primary";
323
+ readonly hoverAlpha: 8;
324
+ };
325
+ readonly navWeight: "semibold";
326
+ readonly navLinkWeight: "medium";
327
+ readonly navTypography: "plain";
328
+ readonly border: "none";
329
+ readonly shadow: {
330
+ readonly kind: "absent";
331
+ };
332
+ readonly frame: {
333
+ readonly kind: "container";
334
+ readonly rounded: "2xl";
335
+ readonly padding: "sm";
336
+ readonly tint: "surface";
337
+ readonly opacity: 0.4;
338
+ };
339
+ readonly cta: {
340
+ readonly treatment: "default";
341
+ };
342
+ };
343
+ readonly 'minimal-surface': {
344
+ readonly tone: "neutral";
345
+ readonly background: {
346
+ readonly kind: "transparent";
347
+ };
348
+ readonly nav: {
349
+ readonly kind: "minimal";
350
+ readonly hoverColorToken: "primary";
351
+ };
352
+ readonly navWeight: "medium";
353
+ readonly navLinkWeight: "medium";
354
+ readonly navTypography: "plain";
355
+ readonly border: "none";
356
+ readonly shadow: {
357
+ readonly kind: "absent";
358
+ };
359
+ readonly frame: {
360
+ readonly kind: "none";
361
+ };
362
+ readonly cta: {
363
+ readonly treatment: "default";
364
+ };
365
+ readonly navLinkExtras: {
366
+ readonly textSize: "lg";
367
+ readonly contrastTreatment: "soft-glow";
368
+ };
369
+ readonly openingForeground: "all";
370
+ readonly scrollTreatment: "contrast-glass";
371
+ readonly interactionPalette: Readonly<{
372
+ id: "interaction-palette";
373
+ label: string;
374
+ options: readonly [import("../../../blocks/src/index").HeaderInteractionPaletteOption, ...import("../../../blocks/src/index").HeaderInteractionPaletteOption[]];
375
+ defaultOptionId: "accent" | "primary" | "secondary";
376
+ }>;
377
+ };
378
+ readonly 'soft-shell': {
379
+ readonly tone: "neutral";
380
+ readonly background: {
381
+ readonly kind: "transparent";
382
+ };
383
+ readonly nav: {
384
+ readonly kind: "pill";
385
+ readonly backing: "capsule";
386
+ readonly hoverColorToken: "primary";
387
+ readonly hoverAlpha: 8;
388
+ };
389
+ readonly navWeight: "medium";
390
+ readonly navLinkWeight: "medium";
391
+ readonly navTypography: "plain";
392
+ readonly border: "none";
393
+ readonly shadow: {
394
+ readonly kind: "absent";
395
+ };
396
+ readonly frame: {
397
+ readonly kind: "container";
398
+ readonly rounded: "2xl";
399
+ readonly padding: "md";
400
+ readonly tint: "surfaceAlt";
401
+ readonly opacity: 0.95;
402
+ };
403
+ readonly cta: {
404
+ readonly treatment: "default";
405
+ };
406
+ };
407
+ readonly 'split-glass': {
408
+ readonly tone: "neutral";
409
+ readonly background: {
410
+ readonly kind: "transparent";
411
+ };
412
+ readonly nav: {
413
+ readonly kind: "pill";
414
+ readonly backing: "frosted";
415
+ readonly hoverColorToken: "primary";
416
+ readonly hoverAlpha: 8;
417
+ };
418
+ readonly navWeight: "semibold";
419
+ readonly navLinkWeight: "medium";
420
+ readonly navTypography: "quiet-caps";
421
+ readonly border: "none";
422
+ readonly shadow: {
423
+ readonly kind: "absent";
424
+ };
425
+ readonly frame: {
426
+ readonly kind: "nav-container";
427
+ readonly type: "glass";
428
+ readonly tint: "surface";
429
+ readonly opacity: 0.4;
430
+ };
431
+ readonly cta: {
432
+ readonly treatment: "default";
433
+ };
434
+ readonly openingForeground: "brand-only";
435
+ };
436
+ readonly 'split-pill': {
437
+ readonly tone: "neutral";
438
+ readonly background: {
439
+ readonly kind: "transparent";
440
+ };
441
+ readonly nav: {
442
+ readonly kind: "pill";
443
+ readonly backing: "capsule";
444
+ readonly hoverColorToken: "primary";
445
+ readonly hoverAlpha: 10;
446
+ };
447
+ readonly navWeight: "medium";
448
+ readonly navLinkWeight: "medium";
449
+ readonly navTypography: "heading";
450
+ readonly border: "none";
451
+ readonly shadow: {
452
+ readonly kind: "absent";
453
+ };
454
+ readonly frame: {
455
+ readonly kind: "nav-container";
456
+ readonly type: "pill";
457
+ readonly tint: "surface";
458
+ readonly opacity: 0.94;
459
+ };
460
+ readonly cta: {
461
+ readonly treatment: "default";
462
+ };
463
+ readonly openingForeground: "brand-only";
464
+ };
465
+ };
@@ -0,0 +1,161 @@
1
+ import type { NavLinkStyle } from '../navigation/types';
2
+ import type { HeaderCtaGap, LogoStyle, NavFontWeight, Theme, ThemeHeader } from '../schema';
3
+ import type { PaletteTokenName } from '../tokens/themeColorTokens';
4
+ import { type HeaderCtaTreatment } from './headerCtaVariants';
5
+ import type { HeaderInteractionPaletteOptionGroup } from './headerInteractionPalette';
6
+ import { type HeaderLayoutDefinition, type HeaderStyleNavTypography } from './headerLayoutTypes';
7
+ /**
8
+ * The closed vocabulary a header appearance is authored in (#1318).
9
+ *
10
+ * Everything here is data: no closures, no `Theme` argument, no header style id.
11
+ * `compileHeaderRecipe` is the single interpreter, and every switch in it is
12
+ * over a facet kind ending in `assertNever` — never over a style id. That is
13
+ * what lets a site style own header appearance the way it already owns cards:
14
+ * it hands over a different recipe, not a different branch.
15
+ *
16
+ * Tokens are typed as `PaletteTokenName` rather than `ThemeColorToken`. The
17
+ * latter is a branded `string` that a literal cannot satisfy without a cast, so
18
+ * it would push every recipe through a parse; the palette role names are the
19
+ * closed 13-role vocabulary these recipes actually draw from.
20
+ */
21
+ type HeaderShadowElevation = NonNullable<ThemeHeader['shadow']>['elevation'];
22
+ type HeaderContainerFrame = NonNullable<ThemeHeader['container']>;
23
+ type HeaderNavContainerFrame = NonNullable<ThemeHeader['navContainer']>;
24
+ type HeaderNavLinkTextSize = NavLinkStyle['textSize'];
25
+ type HeaderNavLinkContrastTreatment = NavLinkStyle['contrastTreatment'];
26
+ /** Drives textColor, navColor, dropdownStyle and the nav link's own colour. Nothing else. */
27
+ export type HeaderToneRecipe = 'neutral' | 'brand';
28
+ /** Drives background only. Deliberately a separate axis from tone: floating
29
+ * `brand-pill` is brand content tone on a transparent background, which a
30
+ * single coupled union cannot express in either direction. */
31
+ export type HeaderBackgroundRecipe = Readonly<{
32
+ kind: 'token';
33
+ token: 'surface' | 'surfaceAlt' | 'background' | 'primary';
34
+ }> | Readonly<{
35
+ kind: 'transparent';
36
+ }>;
37
+ /**
38
+ * Nav treatment, split by hover affordance so no invalid state is representable.
39
+ *
40
+ * - `minimal` — colour change on hover, plus a top-level `hoverColorToken`.
41
+ * - `underline` with `hover: 'underline'` — one `nav-underline` effect and *no*
42
+ * top-level `hoverColorToken`.
43
+ * - `underline` with `hover: 'colour' | 'both'` — requires the token, because a
44
+ * colour change without one is a state the interpreter could only answer with
45
+ * a throw or a silent fallback.
46
+ * - `pill` — background-alpha hover, with the active state at `hoverAlpha + 5`.
47
+ * `backing` is explicit because it is not derivable: `glass` and `split-glass`
48
+ * use the same pill nav link over `navStyle: 'frosted'`, everything else over
49
+ * `'capsule'`.
50
+ * - `flat-tab` — the Swiss block treatment; its tokens are fixed by the helper.
51
+ */
52
+ export type HeaderNavRecipe = Readonly<{
53
+ kind: 'minimal';
54
+ hoverColorToken: PaletteTokenName;
55
+ }> | Readonly<{
56
+ kind: 'underline';
57
+ hover: 'underline';
58
+ underlineColorToken?: PaletteTokenName;
59
+ }> | Readonly<{
60
+ kind: 'underline';
61
+ hover: 'colour' | 'both';
62
+ hoverColorToken: PaletteTokenName;
63
+ underlineColorToken?: PaletteTokenName;
64
+ }> | Readonly<{
65
+ kind: 'pill';
66
+ backing: 'capsule' | 'frosted';
67
+ hoverColorToken: PaletteTokenName;
68
+ hoverAlpha: 8 | 10 | 14 | 16;
69
+ }> | Readonly<{
70
+ kind: 'flat-tab';
71
+ }>;
72
+ /**
73
+ * `absent` and `explicit-none` are distinct because they are distinct bytes:
74
+ * `serif-line` persists `{elevation: 'none'}` as a present key, every other
75
+ * neutral style omits `shadow` entirely, and `themed` resolves against the
76
+ * theme's own elevation and can itself come back absent.
77
+ */
78
+ export type HeaderShadowRecipe = Readonly<{
79
+ kind: 'absent';
80
+ }> | Readonly<{
81
+ kind: 'explicit-none';
82
+ }> | Readonly<{
83
+ kind: 'fixed';
84
+ elevation: HeaderShadowElevation;
85
+ }> | Readonly<{
86
+ kind: 'themed';
87
+ }>;
88
+ export type HeaderFrameRecipe = Readonly<{
89
+ kind: 'none';
90
+ }> | (Readonly<{
91
+ kind: 'container';
92
+ }> & Pick<HeaderContainerFrame, 'rounded' | 'padding' | 'tint' | 'opacity'>) | (Readonly<{
93
+ kind: 'nav-container';
94
+ }> & Readonly<{
95
+ type: Exclude<HeaderNavContainerFrame['type'], 'none'>;
96
+ }> & Pick<HeaderNavContainerFrame, 'tint' | 'opacity'>);
97
+ export type HeaderStyleRecipeCore = Readonly<{
98
+ tone: HeaderToneRecipe;
99
+ background: HeaderBackgroundRecipe;
100
+ nav: HeaderNavRecipe;
101
+ /** `header.navWeight` — the weight of the nav bar as a whole. */
102
+ navWeight: NavFontWeight;
103
+ /**
104
+ * `navLinkStyle.fontWeight` — the weight of the link text itself.
105
+ *
106
+ * The plan for #1318 proposed one field driving both, on the grounds that
107
+ * `brand-underline` sets `navWeight: 'bold'` over a link left at `'medium'`.
108
+ * That is true, but it is not unique: `brand-bar`, `brand-pill`,
109
+ * `brand-capsule`, `glass` and `split-glass` all pair a `'semibold'` bar with
110
+ * `'medium'` links today, so collapsing the two would change bytes for five
111
+ * styles that no ledger row covers. Two required fields keep every recipe
112
+ * byte-identical *and* put the disagreement in the table where a reviewer can
113
+ * see it, rather than splitting it across two files.
114
+ */
115
+ navLinkWeight: NavFontWeight;
116
+ navTypography: HeaderStyleNavTypography;
117
+ border: 'none' | 'bottom';
118
+ shadow: HeaderShadowRecipe;
119
+ frame: HeaderFrameRecipe;
120
+ cta: Readonly<{
121
+ treatment: HeaderCtaTreatment;
122
+ gap?: HeaderCtaGap;
123
+ }>;
124
+ logo?: LogoStyle;
125
+ /**
126
+ * Which parts of the header adopt the opening section's foreground, for
127
+ * styles that float over it. `'brand-only'` recolours the wordmark;
128
+ * `'all'` recolours nav and border too and enables `scrollTreatment`.
129
+ * Absent means the header does not read its opening section at all, which is
130
+ * also what makes the style available without a known opening foreground.
131
+ */
132
+ openingForeground?: 'brand-only' | 'all';
133
+ /** Contrast treatment once the page scrolls under a floating header. */
134
+ scrollTreatment?: 'contrast-glass';
135
+ /**
136
+ * The hover-colour choice this style offers the user. Data, not a closure —
137
+ * a `LookOptionGroup` of ids and labels.
138
+ */
139
+ interactionPalette?: HeaderInteractionPaletteOptionGroup;
140
+ navLinkExtras?: Readonly<{
141
+ textSize?: HeaderNavLinkTextSize;
142
+ contrastTreatment?: HeaderNavLinkContrastTreatment;
143
+ }>;
144
+ }>;
145
+ export type HeaderStyleRecipe = HeaderStyleRecipeCore & Readonly<{
146
+ /**
147
+ * The one layout-conditional adjustment in the catalogue: floating
148
+ * `brand-pill` swaps to a transparent background inside a tinted container.
149
+ * Narrowed to the two facets it actually adjusts, so a layout cannot reach
150
+ * tone or nav and no "used at most once" test is needed to police it.
151
+ * Keyed on the floating layout because layout id and `header.variant` are
152
+ * 1:1 (asserted in `headerCompilationParity.test.ts`).
153
+ */
154
+ onFloating?: Pick<HeaderStyleRecipeCore, 'background' | 'frame'>;
155
+ }>;
156
+ /**
157
+ * The single header interpreter. Pure and total: same `(theme, layout, recipe)`
158
+ * in, same object out, no throws of its own.
159
+ */
160
+ export declare function compileHeaderRecipe(theme: Theme, layout: HeaderLayoutDefinition, recipe: HeaderStyleRecipe): ThemeHeader;
161
+ export {};
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { D as clsx } from "./colorStyles-CrxJrPjJ.mjs";
3
- import { $t as formatCurrencyAmount, At as assertNever$2 } from "./propsDecoder-mB0aC_Fi.mjs";
4
- import { a as CheckIcon } from "./scrollToBlock-Du5mHgvL.mjs";
3
+ import { At as assertNever$2, tn as formatCurrencyAmount } from "./propsDecoder-pzBeCh14.mjs";
4
+ import { a as CheckIcon } from "./scrollToBlock-CduAKf8T.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-mB0aC_Fi.mjs";
2
+ import { st as themeButtonClassName } from "./propsDecoder-pzBeCh14.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