@riverbankcms/sdk 0.125.0 → 0.127.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/README.md +3 -1
- package/dist/{PreviewEditorSidebar-BezDOtQ7.mjs → PreviewEditorSidebar-BXtfF7tp.mjs} +122 -301
- package/dist/{PreviewEditorUI-CgSqmfo2.mjs → PreviewEditorUI-Dou73Q0K.mjs} +3 -3
- package/dist/{PreviewQueryProvider-BH-3-jSj.mjs → PreviewQueryProvider-DgFDIwvK.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-Co3AHfj0.mjs → SdkPreviewModeRuntime-B0HPXr-l.mjs} +141 -63
- package/dist/{SiteChromeCustomizeContext-BHF-KANn.mjs → SiteChromeCustomizeContext-DZiDBAYu.mjs} +5330 -5841
- package/dist/_dts/ai/src/contracts/proposals.d.ts +1552 -202
- package/dist/_dts/api/src/common/envelope.d.ts +1 -1
- package/dist/_dts/api/src/contentRuntime.d.ts +1 -7
- package/dist/_dts/api/src/endpoints.d.ts +0 -7
- package/dist/_dts/api/src/sdk-event-upsert.d.ts +42 -0
- package/dist/_dts/api/src/sdkContracts.d.ts +11 -9
- package/dist/_dts/api/src/siteOperations.d.ts +18 -1
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +1 -14
- package/dist/_dts/block-form/src/backend/store-backend.d.ts +2 -1
- package/dist/_dts/block-form/src/blockDraftSaveability.d.ts +1 -0
- package/dist/_dts/blocks/src/index.d.ts +3 -2
- package/dist/_dts/blocks/src/lib/media.d.ts +267 -0
- package/dist/_dts/blocks/src/system/constants/buttonRoles.d.ts +0 -13
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationStripeReturn.d.ts +15 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +4 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/mergeResolveImageUrlContexts.d.ts +7 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/shared/contract-schemas.d.ts +2 -2
- package/dist/_dts/content-editor/src/ui/blockValidationManifestRegistry.d.ts +17 -0
- package/dist/_dts/content-editor/src/ui/blockValidationView.d.ts +1 -1
- package/dist/_dts/content-editor/src/ui/editorUiStore.d.ts +4 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +322 -171
- package/dist/_dts/editor-blocks/src/BlockEditor.d.ts +4 -0
- package/dist/_dts/editor-blocks/src/block-editor/hooks/useBlockValidationManifests.d.ts +26 -0
- package/dist/_dts/editor-blocks/src/widgets/rich-text/imageInsert.d.ts +3 -3
- package/dist/_dts/media-editor/src/MediaEditor.d.ts +2 -2
- package/dist/_dts/media-editor/src/context.d.ts +1 -2
- package/dist/_dts/media-editor/src/index.d.ts +3 -1
- package/dist/_dts/media-editor/src/mediaSelection.d.ts +32 -0
- package/dist/_dts/media-editor/src/types.d.ts +3 -1
- package/dist/_dts/media-editor/src/useMediaSelection.d.ts +26 -0
- package/dist/_dts/preview-next/src/client/index.d.ts +2 -0
- package/dist/_dts/preview-next/src/client/preview/HeaderMenuControls.d.ts +12 -0
- package/dist/_dts/preview-next/src/client/preview/PreviewEditorSidebar.d.ts +1 -2
- package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +13 -3
- package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +7 -2
- package/dist/_dts/preview-next/src/client/preview/SiteChromeCustomizeContext.d.ts +6 -60
- package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.d.ts +3 -13
- package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.state.d.ts +8 -100
- package/dist/_dts/preview-next/src/client/preview/headerInteractionPaletteSurfaceState.d.ts +8 -0
- package/dist/_dts/preview-next/src/client/preview/previewThemeRoles.d.ts +15 -0
- package/dist/_dts/preview-next/src/client/preview/siteChromeCustomizeTypes.d.ts +54 -0
- package/dist/_dts/preview-next/src/client/preview/siteChromeLookRows.d.ts +13 -3
- package/dist/_dts/preview-next/src/client/preview/siteChromeNavQuickControlHistory.d.ts +3 -0
- package/dist/_dts/preview-next/src/client/preview/siteChromeQuickControlHistoryState.d.ts +6 -3
- package/dist/_dts/preview-next/src/client/preview/siteStylePreviewPlanner.d.ts +1 -4
- package/dist/_dts/preview-next/src/client/preview/styleConfiguratorApplyPayload.d.ts +1 -15
- package/dist/_dts/preview-next/src/client/preview/styleConfiguratorSnapshot.d.ts +11 -21
- package/dist/_dts/sdk/src/cli/commands/event.d.ts +2 -2
- package/dist/_dts/sdk/src/cli/commands/eventOccurrenceSchedule.d.ts +12 -0
- package/dist/_dts/sdk/src/cli/commands/push/pushAllExtras.d.ts +6 -0
- package/dist/_dts/sdk/src/cli/commands/style.d.ts +1 -1
- package/dist/_dts/sdk/src/cli/content/legacyEventScheduleShapeError.d.ts +5 -0
- package/dist/_dts/sdk/src/cli/content/localEventSchedule.d.ts +17 -0
- package/dist/_dts/sdk/src/cli/content/reader.d.ts +5 -10
- package/dist/_dts/sdk/src/cli/migrations/events.d.ts +1 -1
- package/dist/_dts/sdk/src/cli/site-commands/eventScheduleCompiler.d.ts +24 -0
- package/dist/_dts/sdk/src/client/management/http.d.ts +1 -1
- package/dist/_dts/sdk/src/client/management/types.d.ts +3 -28
- package/dist/_dts/sdk/src/config/index.d.ts +1 -1
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +5 -20
- package/dist/_dts/sdk/src/rendering/index.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/islands/types.d.ts +2 -2
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/site-commands/src/commandContract.d.ts +33 -5
- package/dist/_dts/site-commands/src/commandDomain.d.ts +2 -2
- package/dist/_dts/site-commands/src/commands.d.ts +38 -9
- package/dist/_dts/site-commands/src/siteStyleCommandSchema.d.ts +28 -1
- package/dist/_dts/site-commands/src/siteStyleSelectionSchemaBuilder.d.ts +4 -4
- package/dist/_dts/theme-core/src/buttons/effects/presets/background.d.ts +1 -1
- package/dist/_dts/theme-core/src/buttons/styles/registry.d.ts +0 -18
- package/dist/_dts/theme-core/src/buttons/types.d.ts +1 -3
- package/dist/_dts/theme-core/src/header/containerSchema.d.ts +20 -0
- package/dist/_dts/theme-core/src/header/generateHeaderCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/header/interactionPalette.d.ts +14 -0
- package/dist/_dts/theme-core/src/header/legacyNavLinkStyle.d.ts +3 -0
- package/dist/_dts/theme-core/src/header/paintTargets.d.ts +25 -0
- package/dist/_dts/theme-core/src/header/scrollTreatment.d.ts +11 -0
- package/dist/_dts/theme-core/src/header/surfaceRules.d.ts +9 -0
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +15 -0
- package/dist/_dts/theme-core/src/palette/colors.d.ts +1 -1
- package/dist/_dts/theme-core/src/palette/concretePalette.d.ts +20 -0
- package/dist/_dts/theme-core/src/palette/curated/index.d.ts +2 -17
- package/dist/_dts/theme-core/src/palette/index.d.ts +1 -6
- package/dist/_dts/theme-core/src/palette/schema.d.ts +39 -0
- package/dist/_dts/theme-core/src/schema.d.ts +105 -45
- package/dist/_dts/theme-core/src/site-styles/appearancePresetCatalog.d.ts +3 -51
- package/dist/_dts/theme-core/src/site-styles/appearancePresetTypes.d.ts +4 -11
- package/dist/_dts/theme-core/src/site-styles/blockAppearancePresets.d.ts +3 -51
- package/dist/_dts/theme-core/src/site-styles/headerInteractionPalette.d.ts +32 -0
- package/dist/_dts/theme-core/src/site-styles/headerLooks.d.ts +19 -106
- package/dist/_dts/theme-core/src/site-styles/headerOpeningForeground.d.ts +22 -0
- package/dist/_dts/theme-core/src/site-styles/headerOpeningSection.d.ts +2 -0
- package/dist/_dts/theme-core/src/site-styles/headerStyleParts.d.ts +4 -0
- package/dist/_dts/theme-core/src/site-styles/index.d.ts +3 -0
- package/dist/_dts/theme-core/src/site-styles/lookOptionGroups.d.ts +24 -0
- package/dist/_dts/theme-core/src/site-styles/lookResolution.d.ts +1 -2
- package/dist/_dts/theme-core/src/site-styles/pageDesignEditorModel.d.ts +4 -22
- package/dist/_dts/theme-core/src/site-styles/pageDesignEditorOptions.d.ts +21 -0
- package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +5 -7
- package/dist/_dts/theme-core/src/site-styles/runtimeCompiler.d.ts +5 -6
- package/dist/_dts/theme-core/src/site-styles/siteChromeNavPreferences.d.ts +4 -1
- package/dist/cli/index.mjs +1583 -1601
- package/dist/cli/init-docs/content/cli-reference.md +6 -3
- package/dist/cli/init-docs/content/content-management.md +24 -13
- package/dist/client/{DiscountCodeDisclosure-CyPpekBp.mjs → DiscountCodeDisclosure-BDFRp8Y7.mjs} +1 -1
- package/dist/client/{EventCombined.client-zywit-60.mjs → EventCombined.client-DJgF1_lf.mjs} +2 -2
- package/dist/client/{EventListing.client-J2nLhkKT.mjs → EventListing.client-CnWGNjOr.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-CSubXWt6.mjs → LeafletStaticMap-BISs9Bl7.mjs} +1 -1
- package/dist/client/{MagicLinkForm-DDLIfiq9.mjs → MagicLinkForm-b5E_HoG9.mjs} +1 -1
- package/dist/client/{StepIndicator-DE8EvHIp.mjs → StepIndicator-D8gVYkK-.mjs} +2 -2
- package/dist/client/{accordion-Ct5T5NiA.mjs → accordion-DFDajgDz.mjs} +1 -1
- package/dist/client/{bookingForm-DMxtLPxw.mjs → bookingForm-Bdqj9-52.mjs} +5 -6
- package/dist/client/bookings.mjs +315 -46
- package/dist/client/{carousel--FMqgvob.mjs → carousel-Cvqf-kN8.mjs} +1 -1
- package/dist/client/{cart-BKX1bWiU.mjs → cart-CuH2TJXP.mjs} +3 -3
- package/dist/client/{checkout-B_jxi4WW.mjs → checkout-CMNPpejZ.mjs} +3 -3
- package/dist/client/client.mjs +1381 -1427
- package/dist/client/{courseRegistration-DH4MlkRD.mjs → courseRegistration-DTEYWL6Z.mjs} +6 -7
- package/dist/client/{eventCalendar-BQILwAcL.mjs → eventCalendar-BW-XoxZ0.mjs} +4 -4
- package/dist/client/{eventCombined-DFFW_Vmo.mjs → eventCombined-Bpn7s0y9.mjs} +2 -2
- package/dist/client/{eventDetails-B045CTSJ.mjs → eventDetails-D2uUSTMH.mjs} +3 -3
- package/dist/client/{eventListing-BDMYNVzS.mjs → eventListing-CVr1c094.mjs} +2 -2
- package/dist/client/{eventRegistration-CQ2-BSnB.mjs → eventRegistration-Dv4AvkMw.mjs} +30 -22
- package/dist/client/{form-DJKuyZgN.mjs → form-DxdKf9fs.mjs} +1 -1
- package/dist/client/{headerSection-DeTjfiDo.mjs → headerSection-BaXI5Sro.mjs} +2 -2
- package/dist/client/hooks.mjs +851 -976
- package/dist/client/{locationMap-i2wDA8gB.mjs → locationMap-BEtW2fKz.mjs} +2 -2
- package/dist/client/{newsletterForm-DKiueauk.mjs → newsletterForm-BKKs0S4R.mjs} +1 -1
- package/dist/client/{pricing-C01J3Epx.mjs → pricing-ClkqcElA.mjs} +1 -1
- package/dist/client/{productDetail-Dfc1sZaX.mjs → productDetail-H-ru8dyy.mjs} +3 -3
- package/dist/client/{productList-BXbvXWTF.mjs → productList-Buyi5c0C.mjs} +3 -3
- package/dist/client/{propsDecoder-CIR5DQ1l.mjs → propsDecoder-BF7i6Ijg.mjs} +293 -65
- package/dist/client/rendering/client.mjs +1145 -1190
- package/dist/client/rendering/islands.mjs +18 -18
- package/dist/client/rendering.mjs +1257 -1298
- package/dist/client/{useDiscountCodeUi-Bcyh4508.mjs → scrollToBlock-D_7t8yWb.mjs} +18 -2
- package/dist/client/{shop-BbNwPKM-.mjs → shop-CF7SZQNX.mjs} +5 -6
- package/dist/client/{shop-commerce-XO-XMFEt.mjs → shop-commerce-DA7_Rq5p.mjs} +4 -4
- package/dist/client/{shop-commerce-store-Byh6OUGK.mjs → shop-commerce-store-BmLqW7Gh.mjs} +1 -1
- package/dist/client/{shopShared-Bbq39mwr.mjs → shopShared-WL-E1znM.mjs} +2 -2
- package/dist/client/{useEventFilters-C8OOJ3el.mjs → useEventFilters-rc8VLeLV.mjs} +2 -2
- package/dist/client/{usePolling-CyJVo9kF.mjs → usePolling-1ncrfd4S.mjs} +2 -2
- package/dist/preview-next/before-render.mjs +0 -7
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/middleware.mjs +0 -7
- package/dist/{previewAuthStore-CJX21dGi.mjs → previewAuthStore-Dev9CdG9.mjs} +0 -7
- package/dist/{sdk-runtime-BGhyuE-E.mjs → sdk-runtime-BnrCCFJq.mjs} +2 -2
- package/dist/{separator-BFs-Kmv5.mjs → separator-CFvBx2yl.mjs} +1 -1
- package/dist/server/components.mjs +1389 -1489
- package/dist/server/config-validation.mjs +851 -976
- package/dist/server/config.mjs +851 -976
- package/dist/server/data.mjs +851 -976
- package/dist/server/index.mjs +1 -8
- package/dist/server/next.mjs +1393 -1500
- package/dist/server/page-converter.mjs +851 -976
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +1346 -1446
- package/dist/server/rendering.mjs +1390 -1490
- package/dist/server/routing.mjs +939 -1041
- package/dist/server/server.mjs +852 -984
- package/dist/server/theme-bridge.mjs +322 -279
- package/dist/server/theme.mjs +277 -33
- package/package.json +1 -1
- package/dist/_dts/editor-blocks/src/widgets/rich-text/ensureRichTextImageAssetIdentifier.d.ts +0 -8
- package/dist/_dts/theme-core/src/palette/editorState.d.ts +0 -75
- package/dist/_dts/theme-core/src/palette/libraryModel.d.ts +0 -64
- package/dist/_dts/theme-core/src/palette/persistenceReadSource.d.ts +0 -81
- package/dist/_dts/theme-core/src/palette/resolveSelection.d.ts +0 -75
- package/dist/_dts/theme-core/src/palette/selection.d.ts +0 -74
- package/dist/_dts/theme-core/src/palette/sitePalettePersistence.d.ts +0 -34
- package/dist/client/scrollToBlock-C86BYkyV.mjs +0 -17
|
@@ -195,6 +195,177 @@ function parseThemeColorToken(value) {
|
|
|
195
195
|
}
|
|
196
196
|
const themeColorTokenSchema = z$1.string().min(1).refine((value) => Boolean(isThemeColorToken(value)), "Expected a known Theme V2 color token");
|
|
197
197
|
//#endregion
|
|
198
|
+
//#region ../theme-core/src/palette/colors.ts
|
|
199
|
+
const HEX_COLOR_REGEX = /^#[0-9a-f]{6}$/;
|
|
200
|
+
const NORMALIZABLE_HEX_REGEX = /^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;
|
|
201
|
+
const THEME_PALETTE_COLOR_ORDER = [
|
|
202
|
+
"primary",
|
|
203
|
+
"secondary",
|
|
204
|
+
"accent",
|
|
205
|
+
"success",
|
|
206
|
+
"warning",
|
|
207
|
+
"destructive",
|
|
208
|
+
"background",
|
|
209
|
+
"surface",
|
|
210
|
+
"surfaceAlt",
|
|
211
|
+
"muted",
|
|
212
|
+
"text",
|
|
213
|
+
"primaryForeground",
|
|
214
|
+
"border"
|
|
215
|
+
];
|
|
216
|
+
const hexColorSchema = z$1.string().regex(HEX_COLOR_REGEX, "Hex must be #RRGGBB (lowercase)").transform((value) => value);
|
|
217
|
+
const paletteModeSchema = z$1.enum(["light", "dark"]);
|
|
218
|
+
const PALETTE_VALUE_KEY_PREFIX = "palette-value:v1|";
|
|
219
|
+
z$1.string().regex(/^[0-9a-f]{64}$/, "Palette hash must be a lowercase SHA-256 value").transform((value) => value);
|
|
220
|
+
const paletteColorsSchema = z$1.object({
|
|
221
|
+
primary: hexColorSchema,
|
|
222
|
+
primaryForeground: hexColorSchema,
|
|
223
|
+
secondary: hexColorSchema,
|
|
224
|
+
accent: hexColorSchema,
|
|
225
|
+
success: hexColorSchema,
|
|
226
|
+
warning: hexColorSchema,
|
|
227
|
+
destructive: hexColorSchema,
|
|
228
|
+
background: hexColorSchema,
|
|
229
|
+
surface: hexColorSchema,
|
|
230
|
+
surfaceAlt: hexColorSchema,
|
|
231
|
+
muted: hexColorSchema,
|
|
232
|
+
text: hexColorSchema,
|
|
233
|
+
border: hexColorSchema
|
|
234
|
+
}).strict().transform((value) => value);
|
|
235
|
+
function normalizePaletteHex(value) {
|
|
236
|
+
if (!NORMALIZABLE_HEX_REGEX.test(value)) return null;
|
|
237
|
+
const normalized = value.toLowerCase();
|
|
238
|
+
if (normalized.length === 7) return normalized;
|
|
239
|
+
const triplet = normalized.slice(1);
|
|
240
|
+
const red = triplet.charAt(0);
|
|
241
|
+
const green = triplet.charAt(1);
|
|
242
|
+
const blue = triplet.charAt(2);
|
|
243
|
+
return `#${red}${red}${green}${green}${blue}${blue}`;
|
|
244
|
+
}
|
|
245
|
+
function paletteColorsFromEntries(entries) {
|
|
246
|
+
const values = {};
|
|
247
|
+
for (const entry of entries) {
|
|
248
|
+
const parsedRole = paletteTokenNameSchema.safeParse(entry.name);
|
|
249
|
+
if (!parsedRole.success) return {
|
|
250
|
+
ok: false,
|
|
251
|
+
error: {
|
|
252
|
+
kind: "unknown-role",
|
|
253
|
+
role: entry.name
|
|
254
|
+
}
|
|
255
|
+
};
|
|
256
|
+
const role = parsedRole.data;
|
|
257
|
+
if (values[role] !== void 0) return {
|
|
258
|
+
ok: false,
|
|
259
|
+
error: {
|
|
260
|
+
kind: "duplicate-role",
|
|
261
|
+
role
|
|
262
|
+
}
|
|
263
|
+
};
|
|
264
|
+
const hex = normalizePaletteHex(entry.hex);
|
|
265
|
+
if (!hex) return {
|
|
266
|
+
ok: false,
|
|
267
|
+
error: {
|
|
268
|
+
kind: "invalid-color",
|
|
269
|
+
role,
|
|
270
|
+
value: entry.hex
|
|
271
|
+
}
|
|
272
|
+
};
|
|
273
|
+
values[role] = hex;
|
|
274
|
+
}
|
|
275
|
+
const missing = PALETTE_TOKEN_NAMES.filter((role) => values[role] === void 0);
|
|
276
|
+
if (missing.length > 0) return {
|
|
277
|
+
ok: false,
|
|
278
|
+
error: {
|
|
279
|
+
kind: "missing-roles",
|
|
280
|
+
roles: missing
|
|
281
|
+
}
|
|
282
|
+
};
|
|
283
|
+
return {
|
|
284
|
+
ok: true,
|
|
285
|
+
colors: paletteColorsSchema.parse(values)
|
|
286
|
+
};
|
|
287
|
+
}
|
|
288
|
+
function requirePaletteColorsFromEntries(entries) {
|
|
289
|
+
const result = paletteColorsFromEntries(entries);
|
|
290
|
+
if (result.ok) return result.colors;
|
|
291
|
+
throw new Error(`Invalid complete palette: ${result.error.kind}`);
|
|
292
|
+
}
|
|
293
|
+
function paletteColorEntries(colors) {
|
|
294
|
+
return THEME_PALETTE_COLOR_ORDER.map((name) => ({
|
|
295
|
+
name,
|
|
296
|
+
hex: colors[name]
|
|
297
|
+
}));
|
|
298
|
+
}
|
|
299
|
+
function paletteColorFingerprint(colors) {
|
|
300
|
+
return PALETTE_TOKEN_NAMES.map((name) => `${name}:${colors[name]}`).join("|");
|
|
301
|
+
}
|
|
302
|
+
function canonicalPaletteHashInput(colors, mode) {
|
|
303
|
+
return `${mode}|${paletteColorFingerprint(colors)}`;
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
* Stable curated-catalogue identity. Do not reorder roles: the order comes
|
|
307
|
+
* from PALETTE_TOKEN_NAMES through canonicalPaletteHashInput.
|
|
308
|
+
*/
|
|
309
|
+
function paletteValueKey(colors, mode) {
|
|
310
|
+
return `${PALETTE_VALUE_KEY_PREFIX}${canonicalPaletteHashInput(colors, mode)}`;
|
|
311
|
+
}
|
|
312
|
+
/** Parses only the exact v1 canonical form emitted by paletteValueKey. */
|
|
313
|
+
function parsePaletteValueKey(value) {
|
|
314
|
+
if (typeof value !== "string" || !value.startsWith(PALETTE_VALUE_KEY_PREFIX)) return null;
|
|
315
|
+
const [rawMode, ...rawRoles] = value.slice(17).split("|");
|
|
316
|
+
const mode = paletteModeSchema.safeParse(rawMode);
|
|
317
|
+
if (!mode.success || rawRoles.length !== PALETTE_TOKEN_NAMES.length) return null;
|
|
318
|
+
const colors = paletteColorsFromEntries(rawRoles.map((roleValue) => {
|
|
319
|
+
const separator = roleValue.indexOf(":");
|
|
320
|
+
return separator === -1 ? {
|
|
321
|
+
name: "",
|
|
322
|
+
hex: ""
|
|
323
|
+
} : {
|
|
324
|
+
name: roleValue.slice(0, separator),
|
|
325
|
+
hex: roleValue.slice(separator + 1)
|
|
326
|
+
};
|
|
327
|
+
}));
|
|
328
|
+
if (!colors.ok || paletteValueKey(colors.colors, mode.data) !== value) return null;
|
|
329
|
+
return value;
|
|
330
|
+
}
|
|
331
|
+
const paletteValueKeySchema = z$1.string().transform((value, ctx) => {
|
|
332
|
+
const parsed = parsePaletteValueKey(value);
|
|
333
|
+
if (parsed) return parsed;
|
|
334
|
+
ctx.addIssue({
|
|
335
|
+
code: "custom",
|
|
336
|
+
message: "Invalid canonical palette value key"
|
|
337
|
+
});
|
|
338
|
+
return z$1.NEVER;
|
|
339
|
+
});
|
|
340
|
+
//#endregion
|
|
341
|
+
//#region ../theme-core/src/palette/schema.ts
|
|
342
|
+
const colourHexString = z$1.string().regex(/^#([0-9A-Fa-f]{3}){1,2}$/);
|
|
343
|
+
const paletteColorSchema = z$1.object({
|
|
344
|
+
name: z$1.string().min(1),
|
|
345
|
+
hex: colourHexString
|
|
346
|
+
});
|
|
347
|
+
const paletteMetaSchema = z$1.object({ mode: z$1.enum(["light", "dark"]) });
|
|
348
|
+
const paletteSchema = z$1.object({
|
|
349
|
+
colors: z$1.array(paletteColorSchema),
|
|
350
|
+
meta: paletteMetaSchema
|
|
351
|
+
}).transform((palette, ctx) => {
|
|
352
|
+
const colors = paletteColorsFromEntries(palette.colors);
|
|
353
|
+
if (!colors.ok) {
|
|
354
|
+
ctx.addIssue({
|
|
355
|
+
code: "custom",
|
|
356
|
+
message: `Invalid complete palette: ${colors.error.kind}`
|
|
357
|
+
});
|
|
358
|
+
return z$1.NEVER;
|
|
359
|
+
}
|
|
360
|
+
return {
|
|
361
|
+
colors: paletteColorEntries(colors.colors).map(({ name, hex }) => ({
|
|
362
|
+
name: String(name),
|
|
363
|
+
hex: String(hex)
|
|
364
|
+
})),
|
|
365
|
+
meta: palette.meta
|
|
366
|
+
};
|
|
367
|
+
});
|
|
368
|
+
//#endregion
|
|
198
369
|
//#region ../theme-core/src/buttons/types.ts
|
|
199
370
|
/**
|
|
200
371
|
* Standard semantic variant roles a theme exposes.
|
|
@@ -207,8 +378,6 @@ const VARIANT_ROLES = [
|
|
|
207
378
|
"secondary",
|
|
208
379
|
"outline",
|
|
209
380
|
"ghost",
|
|
210
|
-
"link",
|
|
211
|
-
"tertiary",
|
|
212
381
|
"accent"
|
|
213
382
|
];
|
|
214
383
|
/**
|
|
@@ -217,7 +386,7 @@ const VARIANT_ROLES = [
|
|
|
217
386
|
* IDs become class selectors, so keep the contract deliberately narrower than
|
|
218
387
|
* an arbitrary string and shared with every authoring/runtime boundary.
|
|
219
388
|
*/
|
|
220
|
-
const buttonVariantIdSchema = z$1.string().min(1).max(50).regex(/^[a-z0-9-]+$/, "Button variant IDs may contain lowercase letters, numbers, and hyphens only");
|
|
389
|
+
const buttonVariantIdSchema = z$1.string().min(1).max(50).regex(/^[a-z0-9-]+$/, "Button variant IDs may contain lowercase letters, numbers, and hyphens only").refine((value) => value !== "link" && value !== "tertiary", { message: "Retired button role IDs are not valid variant IDs" });
|
|
221
390
|
function parseOpaqueButtonColourToken(value) {
|
|
222
391
|
const token = parseThemeColorToken(value);
|
|
223
392
|
if (token === null) return null;
|
|
@@ -1217,6 +1386,59 @@ function interpolateHex(startHex, endHex, position) {
|
|
|
1217
1386
|
const channel = (from, to) => Math.round(from + (to - from) * position).toString(16).padStart(2, "0");
|
|
1218
1387
|
return `#${channel(start.r, end.r)}${channel(start.g, end.g)}${channel(start.b, end.b)}`;
|
|
1219
1388
|
}
|
|
1389
|
+
shadeBackgroundEffect({
|
|
1390
|
+
id: "darken-background",
|
|
1391
|
+
name: "Darken on Hover",
|
|
1392
|
+
description: "Darkens the background color on hover",
|
|
1393
|
+
label: "Darken Amount (shade step)",
|
|
1394
|
+
shadeDirection: 1
|
|
1395
|
+
});
|
|
1396
|
+
shadeBackgroundEffect({
|
|
1397
|
+
id: "lighten-background",
|
|
1398
|
+
name: "Lighten on Hover",
|
|
1399
|
+
description: "Lightens the background color on hover",
|
|
1400
|
+
label: "Lighten Amount (shade step)",
|
|
1401
|
+
shadeDirection: -1
|
|
1402
|
+
});
|
|
1403
|
+
function shadeBackgroundEffect(config) {
|
|
1404
|
+
return {
|
|
1405
|
+
id: config.id,
|
|
1406
|
+
name: config.name,
|
|
1407
|
+
description: config.description,
|
|
1408
|
+
category: "background",
|
|
1409
|
+
pseudoElement: "none",
|
|
1410
|
+
applicableTo: ["button"],
|
|
1411
|
+
customizableOption: {
|
|
1412
|
+
name: "amount",
|
|
1413
|
+
type: "select",
|
|
1414
|
+
label: config.label,
|
|
1415
|
+
default: 100,
|
|
1416
|
+
options: [
|
|
1417
|
+
0,
|
|
1418
|
+
100,
|
|
1419
|
+
200,
|
|
1420
|
+
300,
|
|
1421
|
+
400,
|
|
1422
|
+
500,
|
|
1423
|
+
600,
|
|
1424
|
+
700,
|
|
1425
|
+
800,
|
|
1426
|
+
900
|
|
1427
|
+
]
|
|
1428
|
+
},
|
|
1429
|
+
isApplicable: (buttonConfig) => buttonConfig.background.type === "solid",
|
|
1430
|
+
generateCSS: ({ themeId, variantId, options, tokens, buttonConfig }) => {
|
|
1431
|
+
if (buttonConfig.background.type !== "solid") return "";
|
|
1432
|
+
const amount = (options.amount || 100) * config.shadeDirection;
|
|
1433
|
+
const baseToken = buttonConfig.background.colorToken ?? "primary-500";
|
|
1434
|
+
return `
|
|
1435
|
+
:where([data-theme-scope="${themeId}"]) .${variantId}:hover {
|
|
1436
|
+
background-color: ${tokens.getColor(tokens.adjustShade(baseToken, amount))};
|
|
1437
|
+
}
|
|
1438
|
+
`;
|
|
1439
|
+
}
|
|
1440
|
+
};
|
|
1441
|
+
}
|
|
1220
1442
|
//#endregion
|
|
1221
1443
|
//#region ../theme-core/src/buttons/resolvedButtonCss.ts
|
|
1222
1444
|
/**
|
|
@@ -4086,6 +4308,60 @@ function cssVarValue(token) {
|
|
|
4086
4308
|
* palette context and happens in `parseThemeColorReference`.
|
|
4087
4309
|
*/
|
|
4088
4310
|
const tokenOrCssColorValueSchema = z$1.string();
|
|
4311
|
+
const BREAKPOINT_LG = 1024;
|
|
4312
|
+
const BREAKPOINT_XL = 1280;
|
|
4313
|
+
const BREAKPOINT_LG_DOWN = BREAKPOINT_LG - 1;
|
|
4314
|
+
function mqUp(px) {
|
|
4315
|
+
return `(min-width: ${px}px)`;
|
|
4316
|
+
}
|
|
4317
|
+
function mqDown(px) {
|
|
4318
|
+
return `(max-width: ${px}px)`;
|
|
4319
|
+
}
|
|
4320
|
+
function mqBetween(minPx, maxPx) {
|
|
4321
|
+
return `${mqUp(minPx)} and ${mqDown(maxPx)}`;
|
|
4322
|
+
}
|
|
4323
|
+
mqUp(640);
|
|
4324
|
+
mqUp(768);
|
|
4325
|
+
mqUp(BREAKPOINT_LG);
|
|
4326
|
+
mqUp(BREAKPOINT_XL);
|
|
4327
|
+
mqDown(639);
|
|
4328
|
+
mqDown(767);
|
|
4329
|
+
mqDown(BREAKPOINT_LG_DOWN);
|
|
4330
|
+
mqBetween(640, BREAKPOINT_LG_DOWN);
|
|
4331
|
+
mqDown(640);
|
|
4332
|
+
mqDown(768);
|
|
4333
|
+
//#endregion
|
|
4334
|
+
//#region ../theme-core/src/header/scrollTreatment.ts
|
|
4335
|
+
const headerScrollTreatmentSchema = z$1.discriminatedUnion("kind", [z$1.object({
|
|
4336
|
+
kind: z$1.literal("contrast-glass"),
|
|
4337
|
+
backgroundTone: z$1.enum(["light", "dark"])
|
|
4338
|
+
})]).optional();
|
|
4339
|
+
//#endregion
|
|
4340
|
+
//#region ../theme-core/src/header/containerSchema.ts
|
|
4341
|
+
const headerContainerSchema = z$1.object({
|
|
4342
|
+
rounded: z$1.enum([
|
|
4343
|
+
"none",
|
|
4344
|
+
"sm",
|
|
4345
|
+
"md",
|
|
4346
|
+
"lg",
|
|
4347
|
+
"xl",
|
|
4348
|
+
"2xl"
|
|
4349
|
+
]).default("xl"),
|
|
4350
|
+
border: z$1.boolean().default(true),
|
|
4351
|
+
shadow: z$1.boolean().default(true),
|
|
4352
|
+
padding: z$1.enum([
|
|
4353
|
+
"sm",
|
|
4354
|
+
"md",
|
|
4355
|
+
"lg"
|
|
4356
|
+
]).default("md"),
|
|
4357
|
+
tint: z$1.string().nullable().optional(),
|
|
4358
|
+
opacity: z$1.number().min(0).max(1).default(.12)
|
|
4359
|
+
}).optional();
|
|
4360
|
+
const headerInteractionPaletteSchema = z$1.enum([
|
|
4361
|
+
"primary",
|
|
4362
|
+
"secondary",
|
|
4363
|
+
"accent"
|
|
4364
|
+
]);
|
|
4089
4365
|
//#endregion
|
|
4090
4366
|
//#region ../theme-core/src/schema.ts
|
|
4091
4367
|
const axesSchema = z$1.object({
|
|
@@ -4116,16 +4392,6 @@ const axesSchema = z$1.object({
|
|
|
4116
4392
|
"expressive"
|
|
4117
4393
|
])
|
|
4118
4394
|
});
|
|
4119
|
-
const colourHexString = z$1.string().regex(/^#([0-9A-Fa-f]{3}){1,2}$/);
|
|
4120
|
-
const paletteColorSchema = z$1.object({
|
|
4121
|
-
name: z$1.string().min(1),
|
|
4122
|
-
hex: colourHexString
|
|
4123
|
-
});
|
|
4124
|
-
const paletteMetaSchema = z$1.object({ mode: z$1.enum(["light", "dark"]) });
|
|
4125
|
-
const paletteSchema = z$1.object({
|
|
4126
|
-
colors: z$1.array(paletteColorSchema),
|
|
4127
|
-
meta: paletteMetaSchema
|
|
4128
|
-
});
|
|
4129
4395
|
const typographyStyleSchema = z$1.object({
|
|
4130
4396
|
family: z$1.string().min(1),
|
|
4131
4397
|
weight: z$1.enum([
|
|
@@ -4505,25 +4771,6 @@ const navFontWeight = z$1.enum([
|
|
|
4505
4771
|
]);
|
|
4506
4772
|
const headerMaxWidth = z$1.enum(["container", "full"]);
|
|
4507
4773
|
const headerBarFrame = z$1.enum(["full-bleed", "inset-shell"]);
|
|
4508
|
-
const headerContainerSchema = z$1.object({
|
|
4509
|
-
rounded: z$1.enum([
|
|
4510
|
-
"none",
|
|
4511
|
-
"sm",
|
|
4512
|
-
"md",
|
|
4513
|
-
"lg",
|
|
4514
|
-
"xl",
|
|
4515
|
-
"2xl"
|
|
4516
|
-
]).default("xl"),
|
|
4517
|
-
border: z$1.boolean().default(true),
|
|
4518
|
-
shadow: z$1.boolean().default(true),
|
|
4519
|
-
padding: z$1.enum([
|
|
4520
|
-
"sm",
|
|
4521
|
-
"md",
|
|
4522
|
-
"lg"
|
|
4523
|
-
]).default("md"),
|
|
4524
|
-
tint: z$1.string().nullable().optional(),
|
|
4525
|
-
opacity: z$1.number().min(0).max(1).default(.12)
|
|
4526
|
-
}).optional();
|
|
4527
4774
|
const headerBorderSchema = componentBorderSchema.extend({ position: z$1.enum([
|
|
4528
4775
|
"bottom",
|
|
4529
4776
|
"top",
|
|
@@ -4650,6 +4897,7 @@ const headerSchema = z$1.object({
|
|
|
4650
4897
|
shrinkOnScroll: z$1.boolean(),
|
|
4651
4898
|
maxWidth: headerMaxWidth,
|
|
4652
4899
|
barFrame: headerBarFrame.optional(),
|
|
4900
|
+
scrollTreatment: headerScrollTreatmentSchema,
|
|
4653
4901
|
logoOverride: mediaSchema.nullable().optional(),
|
|
4654
4902
|
background: headerBackgroundSchema.default({
|
|
4655
4903
|
type: "color",
|
|
@@ -4662,6 +4910,7 @@ const headerSchema = z$1.object({
|
|
|
4662
4910
|
navFontRole: z$1.enum(["body", "heading"]).optional(),
|
|
4663
4911
|
navTypography: z$1.enum(["body", "heading"]).optional(),
|
|
4664
4912
|
navTextSize: navLinkStyleSchema.shape.textSize,
|
|
4913
|
+
interactionPalette: headerInteractionPaletteSchema.optional(),
|
|
4665
4914
|
navPlacement: z$1.enum(["end", "center"]).optional(),
|
|
4666
4915
|
container: headerContainerSchema,
|
|
4667
4916
|
border: headerBorderSchema,
|
|
@@ -5030,128 +5279,6 @@ function generateShadowCssVars(theme) {
|
|
|
5030
5279
|
};
|
|
5031
5280
|
}
|
|
5032
5281
|
//#endregion
|
|
5033
|
-
//#region ../theme-core/src/palette/colors.ts
|
|
5034
|
-
const HEX_COLOR_REGEX = /^#[0-9a-f]{6}$/;
|
|
5035
|
-
const NORMALIZABLE_HEX_REGEX = /^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;
|
|
5036
|
-
const hexColorSchema = z$1.string().regex(HEX_COLOR_REGEX, "Hex must be #RRGGBB (lowercase)").transform((value) => value);
|
|
5037
|
-
const paletteModeSchema = z$1.enum(["light", "dark"]);
|
|
5038
|
-
const PALETTE_VALUE_KEY_PREFIX = "palette-value:v1|";
|
|
5039
|
-
z$1.string().regex(/^[0-9a-f]{64}$/, "Palette hash must be a lowercase SHA-256 value").transform((value) => value);
|
|
5040
|
-
const paletteColorsSchema = z$1.object({
|
|
5041
|
-
primary: hexColorSchema,
|
|
5042
|
-
primaryForeground: hexColorSchema,
|
|
5043
|
-
secondary: hexColorSchema,
|
|
5044
|
-
accent: hexColorSchema,
|
|
5045
|
-
success: hexColorSchema,
|
|
5046
|
-
warning: hexColorSchema,
|
|
5047
|
-
destructive: hexColorSchema,
|
|
5048
|
-
background: hexColorSchema,
|
|
5049
|
-
surface: hexColorSchema,
|
|
5050
|
-
surfaceAlt: hexColorSchema,
|
|
5051
|
-
muted: hexColorSchema,
|
|
5052
|
-
text: hexColorSchema,
|
|
5053
|
-
border: hexColorSchema
|
|
5054
|
-
}).strict().transform((value) => value);
|
|
5055
|
-
function normalizePaletteHex(value) {
|
|
5056
|
-
if (!NORMALIZABLE_HEX_REGEX.test(value)) return null;
|
|
5057
|
-
const normalized = value.toLowerCase();
|
|
5058
|
-
if (normalized.length === 7) return normalized;
|
|
5059
|
-
const triplet = normalized.slice(1);
|
|
5060
|
-
const red = triplet.charAt(0);
|
|
5061
|
-
const green = triplet.charAt(1);
|
|
5062
|
-
const blue = triplet.charAt(2);
|
|
5063
|
-
return `#${red}${red}${green}${green}${blue}${blue}`;
|
|
5064
|
-
}
|
|
5065
|
-
function paletteColorsFromEntries(entries) {
|
|
5066
|
-
const values = {};
|
|
5067
|
-
for (const entry of entries) {
|
|
5068
|
-
const parsedRole = paletteTokenNameSchema.safeParse(entry.name);
|
|
5069
|
-
if (!parsedRole.success) return {
|
|
5070
|
-
ok: false,
|
|
5071
|
-
error: {
|
|
5072
|
-
kind: "unknown-role",
|
|
5073
|
-
role: entry.name
|
|
5074
|
-
}
|
|
5075
|
-
};
|
|
5076
|
-
const role = parsedRole.data;
|
|
5077
|
-
if (values[role] !== void 0) return {
|
|
5078
|
-
ok: false,
|
|
5079
|
-
error: {
|
|
5080
|
-
kind: "duplicate-role",
|
|
5081
|
-
role
|
|
5082
|
-
}
|
|
5083
|
-
};
|
|
5084
|
-
const hex = normalizePaletteHex(entry.hex);
|
|
5085
|
-
if (!hex) return {
|
|
5086
|
-
ok: false,
|
|
5087
|
-
error: {
|
|
5088
|
-
kind: "invalid-color",
|
|
5089
|
-
role,
|
|
5090
|
-
value: entry.hex
|
|
5091
|
-
}
|
|
5092
|
-
};
|
|
5093
|
-
values[role] = hex;
|
|
5094
|
-
}
|
|
5095
|
-
const missing = PALETTE_TOKEN_NAMES.filter((role) => values[role] === void 0);
|
|
5096
|
-
if (missing.length > 0) return {
|
|
5097
|
-
ok: false,
|
|
5098
|
-
error: {
|
|
5099
|
-
kind: "missing-roles",
|
|
5100
|
-
roles: missing
|
|
5101
|
-
}
|
|
5102
|
-
};
|
|
5103
|
-
return {
|
|
5104
|
-
ok: true,
|
|
5105
|
-
colors: paletteColorsSchema.parse(values)
|
|
5106
|
-
};
|
|
5107
|
-
}
|
|
5108
|
-
function requirePaletteColorsFromEntries(entries) {
|
|
5109
|
-
const result = paletteColorsFromEntries(entries);
|
|
5110
|
-
if (result.ok) return result.colors;
|
|
5111
|
-
throw new Error(`Invalid complete palette: ${result.error.kind}`);
|
|
5112
|
-
}
|
|
5113
|
-
function paletteColorFingerprint(colors) {
|
|
5114
|
-
return PALETTE_TOKEN_NAMES.map((name) => `${name}:${colors[name]}`).join("|");
|
|
5115
|
-
}
|
|
5116
|
-
function canonicalPaletteHashInput(colors, mode) {
|
|
5117
|
-
return `${mode}|${paletteColorFingerprint(colors)}`;
|
|
5118
|
-
}
|
|
5119
|
-
/**
|
|
5120
|
-
* The shared TypeScript/SQL protocol. Do not reorder roles: the order comes
|
|
5121
|
-
* from PALETTE_TOKEN_NAMES through canonicalPaletteHashInput.
|
|
5122
|
-
*/
|
|
5123
|
-
function paletteValueKey(colors, mode) {
|
|
5124
|
-
return `${PALETTE_VALUE_KEY_PREFIX}${canonicalPaletteHashInput(colors, mode)}`;
|
|
5125
|
-
}
|
|
5126
|
-
/** Parses only the exact v1 canonical form emitted by paletteValueKey. */
|
|
5127
|
-
function parsePaletteValueKey(value) {
|
|
5128
|
-
if (typeof value !== "string" || !value.startsWith(PALETTE_VALUE_KEY_PREFIX)) return null;
|
|
5129
|
-
const [rawMode, ...rawRoles] = value.slice(17).split("|");
|
|
5130
|
-
const mode = paletteModeSchema.safeParse(rawMode);
|
|
5131
|
-
if (!mode.success || rawRoles.length !== PALETTE_TOKEN_NAMES.length) return null;
|
|
5132
|
-
const colors = paletteColorsFromEntries(rawRoles.map((roleValue) => {
|
|
5133
|
-
const separator = roleValue.indexOf(":");
|
|
5134
|
-
return separator === -1 ? {
|
|
5135
|
-
name: "",
|
|
5136
|
-
hex: ""
|
|
5137
|
-
} : {
|
|
5138
|
-
name: roleValue.slice(0, separator),
|
|
5139
|
-
hex: roleValue.slice(separator + 1)
|
|
5140
|
-
};
|
|
5141
|
-
}));
|
|
5142
|
-
if (!colors.ok || paletteValueKey(colors.colors, mode.data) !== value) return null;
|
|
5143
|
-
return value;
|
|
5144
|
-
}
|
|
5145
|
-
const paletteValueKeySchema = z$1.string().transform((value, ctx) => {
|
|
5146
|
-
const parsed = parsePaletteValueKey(value);
|
|
5147
|
-
if (parsed) return parsed;
|
|
5148
|
-
ctx.addIssue({
|
|
5149
|
-
code: "custom",
|
|
5150
|
-
message: "Invalid canonical palette value key"
|
|
5151
|
-
});
|
|
5152
|
-
return z$1.NEVER;
|
|
5153
|
-
});
|
|
5154
|
-
//#endregion
|
|
5155
5282
|
//#region ../theme-core/src/site-styles/styleTags.ts
|
|
5156
5283
|
/**
|
|
5157
5284
|
* Descriptive style-axis metadata for button personalities and palette
|
|
@@ -6443,13 +6570,6 @@ const warmDarkKirtanGold = defineCuratedPalette({
|
|
|
6443
6570
|
});
|
|
6444
6571
|
//#endregion
|
|
6445
6572
|
//#region ../theme-core/src/palette/curated/index.ts
|
|
6446
|
-
/**
|
|
6447
|
-
* Curated palette library.
|
|
6448
|
-
*
|
|
6449
|
-
* Authoring keys are readable source aliases. Value keys are derived from the
|
|
6450
|
-
* complete mode and semantic colours and are the only curated identity used at
|
|
6451
|
-
* persistence and runtime boundaries.
|
|
6452
|
-
*/
|
|
6453
6573
|
function admitCuratedPaletteDefinition(definition) {
|
|
6454
6574
|
return {
|
|
6455
6575
|
...definition,
|
|
@@ -6476,11 +6596,8 @@ const curatedPalettes = [
|
|
|
6476
6596
|
admitCuratedPaletteDefinition(warmDarkEmber),
|
|
6477
6597
|
admitCuratedPaletteDefinition(warmDarkKirtanGold)
|
|
6478
6598
|
];
|
|
6479
|
-
|
|
6599
|
+
new Map(curatedPalettes.map((palette) => [palette.valueKey, palette]));
|
|
6480
6600
|
const curatedPalettesByAuthoringKey = new Map(curatedPalettes.map((palette) => [palette.authoringKey, palette]));
|
|
6481
|
-
function findCuratedPalette(valueKey) {
|
|
6482
|
-
return curatedPalettesByValueKey.get(valueKey);
|
|
6483
|
-
}
|
|
6484
6601
|
function findCuratedPaletteByAuthoringKey(authoringKey) {
|
|
6485
6602
|
return curatedPalettesByAuthoringKey.get(authoringKey);
|
|
6486
6603
|
}
|
|
@@ -6489,25 +6606,6 @@ function requireCuratedPaletteValueKey(authoringKey) {
|
|
|
6489
6606
|
if (!palette) throw new Error(`Unknown curated palette authoring key "${authoringKey}"`);
|
|
6490
6607
|
return palette.valueKey;
|
|
6491
6608
|
}
|
|
6492
|
-
z$1.string().transform((value, ctx) => {
|
|
6493
|
-
const valueKey = parsePaletteValueKey(value);
|
|
6494
|
-
if (!valueKey) {
|
|
6495
|
-
ctx.addIssue({
|
|
6496
|
-
code: "custom",
|
|
6497
|
-
message: "Invalid canonical palette value key"
|
|
6498
|
-
});
|
|
6499
|
-
return z$1.NEVER;
|
|
6500
|
-
}
|
|
6501
|
-
const palette = findCuratedPalette(valueKey);
|
|
6502
|
-
if (!palette) {
|
|
6503
|
-
ctx.addIssue({
|
|
6504
|
-
code: "custom",
|
|
6505
|
-
message: "Unknown curated palette value key"
|
|
6506
|
-
});
|
|
6507
|
-
return z$1.NEVER;
|
|
6508
|
-
}
|
|
6509
|
-
return palette.valueKey;
|
|
6510
|
-
});
|
|
6511
6609
|
//#endregion
|
|
6512
6610
|
//#region ../theme-core/src/accordions/siteStyleDefaults.ts
|
|
6513
6611
|
/**
|
|
@@ -7120,6 +7218,38 @@ function resolveHeaderCtaVariant(theme, treatment) {
|
|
|
7120
7218
|
}
|
|
7121
7219
|
}
|
|
7122
7220
|
//#endregion
|
|
7221
|
+
//#region ../theme-core/src/site-styles/lookOptionGroups.ts
|
|
7222
|
+
function defineLookOptionGroup(group) {
|
|
7223
|
+
defaultOption(group);
|
|
7224
|
+
return group;
|
|
7225
|
+
}
|
|
7226
|
+
function defaultOption(group) {
|
|
7227
|
+
const option = group.options.find((candidate) => candidate.id === group.defaultOptionId);
|
|
7228
|
+
if (option) return option;
|
|
7229
|
+
throw new Error(`Look option group "${group.id}" defaults to missing option "${group.defaultOptionId}".`);
|
|
7230
|
+
}
|
|
7231
|
+
//#endregion
|
|
7232
|
+
//#region ../theme-core/src/site-styles/headerInteractionPalette.ts
|
|
7233
|
+
const clearSplitInteractionPalette = defineLookOptionGroup({
|
|
7234
|
+
id: "interaction-palette",
|
|
7235
|
+
label: "Hover colour",
|
|
7236
|
+
defaultOptionId: "accent",
|
|
7237
|
+
options: [
|
|
7238
|
+
{
|
|
7239
|
+
id: "accent",
|
|
7240
|
+
label: "Accent"
|
|
7241
|
+
},
|
|
7242
|
+
{
|
|
7243
|
+
id: "primary",
|
|
7244
|
+
label: "Primary"
|
|
7245
|
+
},
|
|
7246
|
+
{
|
|
7247
|
+
id: "secondary",
|
|
7248
|
+
label: "Secondary"
|
|
7249
|
+
}
|
|
7250
|
+
]
|
|
7251
|
+
});
|
|
7252
|
+
//#endregion
|
|
7123
7253
|
//#region ../theme-core/src/site-styles/headerLooks.ts
|
|
7124
7254
|
function asHeaderLookId(value) {
|
|
7125
7255
|
return value;
|
|
@@ -7253,7 +7383,7 @@ const overlayLogoAccommodations = [
|
|
|
7253
7383
|
* optional nested styling fields that would otherwise leak from another Look.
|
|
7254
7384
|
*/
|
|
7255
7385
|
function baseHeader(theme) {
|
|
7256
|
-
const { navLinkStyle: _navLinkStyle, navFontRole: _navFontRole, navTypography: _navTypography, navTextSize: _navTextSize, dropdownStyle: _dropdownStyle, ctaVariant: _ctaVariant, navContainer: _navContainer, container: _container, shadow: _shadow, logo: _logo, logoText: _logoText, border: _border, ...header } = theme.header;
|
|
7386
|
+
const { navLinkStyle: _navLinkStyle, navFontRole: _navFontRole, navTypography: _navTypography, navTextSize: _navTextSize, interactionPalette: _interactionPalette, dropdownStyle: _dropdownStyle, ctaVariant: _ctaVariant, navContainer: _navContainer, container: _container, shadow: _shadow, logo: _logo, logoText: _logoText, border: _border, ...header } = theme.header;
|
|
7257
7387
|
return {
|
|
7258
7388
|
...header,
|
|
7259
7389
|
navContainer: {
|
|
@@ -7268,7 +7398,6 @@ const headerLayoutCatalog = defineExactCatalog()([
|
|
|
7268
7398
|
id: asHeaderLayoutId("classic"),
|
|
7269
7399
|
label: "Classic",
|
|
7270
7400
|
description: "Logo and navigation in one practical horizontal row.",
|
|
7271
|
-
structure: "inline-classic",
|
|
7272
7401
|
variant: "classic",
|
|
7273
7402
|
defaultPositioning: "sticky",
|
|
7274
7403
|
shrinkOnScroll: false
|
|
@@ -7277,7 +7406,6 @@ const headerLayoutCatalog = defineExactCatalog()([
|
|
|
7277
7406
|
id: asHeaderLayoutId("centered"),
|
|
7278
7407
|
label: "Centered",
|
|
7279
7408
|
description: "Logo centered above a balanced navigation row.",
|
|
7280
|
-
structure: "centered-stack",
|
|
7281
7409
|
variant: "centered",
|
|
7282
7410
|
defaultPositioning: "static",
|
|
7283
7411
|
shrinkOnScroll: false,
|
|
@@ -7293,7 +7421,6 @@ const headerLayoutCatalog = defineExactCatalog()([
|
|
|
7293
7421
|
id: asHeaderLayoutId("floating"),
|
|
7294
7422
|
label: "Floating",
|
|
7295
7423
|
description: "Detached header chrome that sits over the opening section.",
|
|
7296
|
-
structure: "floating-shell",
|
|
7297
7424
|
variant: "floating",
|
|
7298
7425
|
defaultPositioning: "sticky",
|
|
7299
7426
|
shrinkOnScroll: true,
|
|
@@ -7455,10 +7582,13 @@ const headerStyleCatalog = defineExactCatalog()([
|
|
|
7455
7582
|
label: "Clear Split",
|
|
7456
7583
|
description: "Floating logo with transparent navigation and no shared shell.",
|
|
7457
7584
|
supportedLayoutIds: supportedLayouts(["floating"]),
|
|
7458
|
-
navInteraction: "
|
|
7585
|
+
navInteraction: "pill-background",
|
|
7459
7586
|
surface: "floating",
|
|
7460
|
-
defaultDepth: "
|
|
7587
|
+
defaultDepth: "line",
|
|
7461
7588
|
navTypography: "plain",
|
|
7589
|
+
openingForegroundTarget: "all",
|
|
7590
|
+
scrollTreatment: "contrast-glass",
|
|
7591
|
+
interactionPalette: clearSplitInteractionPalette,
|
|
7462
7592
|
moods: ["editorial", "calm"]
|
|
7463
7593
|
},
|
|
7464
7594
|
{
|
|
@@ -7481,6 +7611,7 @@ const headerStyleCatalog = defineExactCatalog()([
|
|
|
7481
7611
|
surface: "floating",
|
|
7482
7612
|
defaultDepth: "shadow",
|
|
7483
7613
|
navTypography: "quiet-caps",
|
|
7614
|
+
openingForegroundTarget: "brand-only",
|
|
7484
7615
|
moods: ["expressive"]
|
|
7485
7616
|
},
|
|
7486
7617
|
{
|
|
@@ -7492,6 +7623,7 @@ const headerStyleCatalog = defineExactCatalog()([
|
|
|
7492
7623
|
surface: "floating",
|
|
7493
7624
|
defaultDepth: "shadow",
|
|
7494
7625
|
navTypography: "heading",
|
|
7626
|
+
openingForegroundTarget: "brand-only",
|
|
7495
7627
|
moods: ["calm", "editorial"]
|
|
7496
7628
|
}
|
|
7497
7629
|
]);
|
|
@@ -7993,13 +8125,6 @@ const headerLookCatalog = defineExactCatalog()([
|
|
|
7993
8125
|
{
|
|
7994
8126
|
id: asHeaderLookId("clean-base"),
|
|
7995
8127
|
label: "Clean base",
|
|
7996
|
-
visualTreatment: "solid-neutral",
|
|
7997
|
-
layoutBehavior: "sticky",
|
|
7998
|
-
configuration: {
|
|
7999
|
-
structure: "inline-classic",
|
|
8000
|
-
treatment: "solid-neutral",
|
|
8001
|
-
behavior: "sticky"
|
|
8002
|
-
},
|
|
8003
8128
|
openingRequirement: "none",
|
|
8004
8129
|
logoAccommodations: inlineClassicLogoAccommodations,
|
|
8005
8130
|
compile: cleanBaseHeader
|
|
@@ -8007,13 +8132,6 @@ const headerLookCatalog = defineExactCatalog()([
|
|
|
8007
8132
|
{
|
|
8008
8133
|
id: asHeaderLookId("classic-centered-nav"),
|
|
8009
8134
|
label: "Centered nav",
|
|
8010
|
-
visualTreatment: "solid-neutral",
|
|
8011
|
-
layoutBehavior: "sticky",
|
|
8012
|
-
configuration: {
|
|
8013
|
-
structure: "inline-classic",
|
|
8014
|
-
treatment: "solid-neutral",
|
|
8015
|
-
behavior: "sticky"
|
|
8016
|
-
},
|
|
8017
8135
|
openingRequirement: "none",
|
|
8018
8136
|
maxRecommendedNavItems: 6,
|
|
8019
8137
|
logoAccommodations: inlineClassicLogoAccommodations,
|
|
@@ -8022,13 +8140,6 @@ const headerLookCatalog = defineExactCatalog()([
|
|
|
8022
8140
|
{
|
|
8023
8141
|
id: asHeaderLookId("brand-solid"),
|
|
8024
8142
|
label: "Brand solid",
|
|
8025
|
-
visualTreatment: "solid-brand",
|
|
8026
|
-
layoutBehavior: "sticky-shrink",
|
|
8027
|
-
configuration: {
|
|
8028
|
-
structure: "inline-classic",
|
|
8029
|
-
treatment: "solid-brand",
|
|
8030
|
-
behavior: "sticky-shrink"
|
|
8031
|
-
},
|
|
8032
8143
|
openingRequirement: "none",
|
|
8033
8144
|
logoAccommodations: inlineClassicLogoAccommodations,
|
|
8034
8145
|
compile: solidBrandHeader
|
|
@@ -8036,13 +8147,6 @@ const headerLookCatalog = defineExactCatalog()([
|
|
|
8036
8147
|
{
|
|
8037
8148
|
id: asHeaderLookId("serif-line"),
|
|
8038
8149
|
label: "Serif line",
|
|
8039
|
-
visualTreatment: "light-serif",
|
|
8040
|
-
layoutBehavior: "sticky",
|
|
8041
|
-
configuration: {
|
|
8042
|
-
structure: "centered-stack",
|
|
8043
|
-
treatment: "light-serif",
|
|
8044
|
-
behavior: "sticky"
|
|
8045
|
-
},
|
|
8046
8150
|
openingRequirement: "none",
|
|
8047
8151
|
maxRecommendedNavItems: 6,
|
|
8048
8152
|
logoAccommodations: centeredLogoAccommodations,
|
|
@@ -8051,13 +8155,6 @@ const headerLookCatalog = defineExactCatalog()([
|
|
|
8051
8155
|
{
|
|
8052
8156
|
id: asHeaderLookId("centered-calm"),
|
|
8053
8157
|
label: "Centered calm",
|
|
8054
|
-
visualTreatment: "light-serif",
|
|
8055
|
-
layoutBehavior: "normal-flow",
|
|
8056
|
-
configuration: {
|
|
8057
|
-
structure: "centered-stack",
|
|
8058
|
-
treatment: "light-serif",
|
|
8059
|
-
behavior: "normal-flow"
|
|
8060
|
-
},
|
|
8061
8158
|
openingRequirement: "none",
|
|
8062
8159
|
maxRecommendedNavItems: 5,
|
|
8063
8160
|
logoAccommodations: centeredLogoAccommodations,
|
|
@@ -8066,13 +8163,6 @@ const headerLookCatalog = defineExactCatalog()([
|
|
|
8066
8163
|
{
|
|
8067
8164
|
id: asHeaderLookId("practical-utility"),
|
|
8068
8165
|
label: "Practical utility",
|
|
8069
|
-
visualTreatment: "solid-neutral",
|
|
8070
|
-
layoutBehavior: "sticky-shrink",
|
|
8071
|
-
configuration: {
|
|
8072
|
-
structure: "inline-classic",
|
|
8073
|
-
treatment: "solid-neutral",
|
|
8074
|
-
behavior: "sticky-shrink"
|
|
8075
|
-
},
|
|
8076
8166
|
openingRequirement: "none",
|
|
8077
8167
|
requiresProminentCta: true,
|
|
8078
8168
|
logoAccommodations: inlineClassicLogoAccommodations,
|
|
@@ -8081,13 +8171,6 @@ const headerLookCatalog = defineExactCatalog()([
|
|
|
8081
8171
|
{
|
|
8082
8172
|
id: asHeaderLookId("minimal-transparent"),
|
|
8083
8173
|
label: "Minimal transparent",
|
|
8084
|
-
visualTreatment: "minimal-transparent",
|
|
8085
|
-
layoutBehavior: "normal-flow",
|
|
8086
|
-
configuration: {
|
|
8087
|
-
structure: "inline-classic",
|
|
8088
|
-
treatment: "minimal-transparent",
|
|
8089
|
-
behavior: "normal-flow"
|
|
8090
|
-
},
|
|
8091
8174
|
openingRequirement: "reserved-space-ok",
|
|
8092
8175
|
logoAccommodations: inlineClassicLogoAccommodations,
|
|
8093
8176
|
compile: minimalTransparentHeader
|
|
@@ -8095,13 +8178,6 @@ const headerLookCatalog = defineExactCatalog()([
|
|
|
8095
8178
|
{
|
|
8096
8179
|
id: asHeaderLookId("transparent-overlay"),
|
|
8097
8180
|
label: "Transparent overlay",
|
|
8098
|
-
visualTreatment: "transparent-overlay",
|
|
8099
|
-
layoutBehavior: "fixed-overlay",
|
|
8100
|
-
configuration: {
|
|
8101
|
-
structure: "inline-classic",
|
|
8102
|
-
treatment: "transparent-overlay",
|
|
8103
|
-
behavior: "fixed-overlay"
|
|
8104
|
-
},
|
|
8105
8181
|
openingRequirement: "requires-image-hero-with-contrast-overlay",
|
|
8106
8182
|
maxRecommendedNavItems: 5,
|
|
8107
8183
|
logoAccommodations: overlayLogoAccommodations,
|
|
@@ -8110,24 +8186,13 @@ const headerLookCatalog = defineExactCatalog()([
|
|
|
8110
8186
|
{
|
|
8111
8187
|
id: asHeaderLookId("floating-glass"),
|
|
8112
8188
|
label: "Floating glass",
|
|
8113
|
-
visualTreatment: "floating-glass",
|
|
8114
|
-
layoutBehavior: "fixed-floating",
|
|
8115
|
-
configuration: {
|
|
8116
|
-
structure: "floating-shell",
|
|
8117
|
-
treatment: "floating-glass",
|
|
8118
|
-
behavior: "fixed-floating"
|
|
8119
|
-
},
|
|
8120
8189
|
openingRequirement: "requires-image-hero-with-contrast-overlay",
|
|
8121
8190
|
maxRecommendedNavItems: 5,
|
|
8122
8191
|
logoAccommodations: overlayLogoAccommodations,
|
|
8123
8192
|
compile: floatingGlassHeader
|
|
8124
8193
|
}
|
|
8125
8194
|
]);
|
|
8126
|
-
new Set(headerLookCatalog.map((look) => headerConfigurationKey(look.configuration)));
|
|
8127
8195
|
new Map(headerLookCatalog.map((look) => [look.id, look]));
|
|
8128
|
-
function headerConfigurationKey(configuration) {
|
|
8129
|
-
return `${configuration.structure}:${configuration.treatment}:${configuration.behavior}`;
|
|
8130
|
-
}
|
|
8131
8196
|
//#endregion
|
|
8132
8197
|
//#region ../theme-core/src/site-styles/footerLooks.ts
|
|
8133
8198
|
function asFooterLookId(value) {
|
|
@@ -10695,28 +10760,6 @@ const curatedSiteStyles = [
|
|
|
10695
10760
|
})
|
|
10696
10761
|
];
|
|
10697
10762
|
new Map(curatedSiteStyles.map((style) => [style.id, style]));
|
|
10698
|
-
const BREAKPOINT_LG = 1024;
|
|
10699
|
-
const BREAKPOINT_XL = 1280;
|
|
10700
|
-
const BREAKPOINT_LG_DOWN = BREAKPOINT_LG - 1;
|
|
10701
|
-
function mqUp(px) {
|
|
10702
|
-
return `(min-width: ${px}px)`;
|
|
10703
|
-
}
|
|
10704
|
-
function mqDown(px) {
|
|
10705
|
-
return `(max-width: ${px}px)`;
|
|
10706
|
-
}
|
|
10707
|
-
function mqBetween(minPx, maxPx) {
|
|
10708
|
-
return `${mqUp(minPx)} and ${mqDown(maxPx)}`;
|
|
10709
|
-
}
|
|
10710
|
-
mqUp(640);
|
|
10711
|
-
mqUp(768);
|
|
10712
|
-
mqUp(BREAKPOINT_LG);
|
|
10713
|
-
mqUp(BREAKPOINT_XL);
|
|
10714
|
-
mqDown(639);
|
|
10715
|
-
mqDown(767);
|
|
10716
|
-
mqDown(BREAKPOINT_LG_DOWN);
|
|
10717
|
-
mqBetween(640, BREAKPOINT_LG_DOWN);
|
|
10718
|
-
mqDown(640);
|
|
10719
|
-
mqDown(768);
|
|
10720
10763
|
svgDataUrl("<svg viewBox='0 0 1440 72' xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none'><path d='M0 72V46C130 55 260 24 420 30C590 36 690 62 860 42C1035 21 1160 47 1305 36C1365 31 1415 33 1440 38V72H0Z' fill='white'/></svg>");
|
|
10721
10764
|
svgDataUrl("<svg viewBox='0 0 1440 72' xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none'><path d='M0 72V42C120 24 240 24 360 42C480 60 600 60 720 42C840 24 960 24 1080 42C1200 60 1320 60 1440 42V72H0Z' fill='white'/></svg>");
|
|
10722
10765
|
svgDataUrl("<svg viewBox='0 0 1440 72' xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none'><path d='M0 72V43C180 32 300 32 480 43C660 54 780 54 960 43C1140 32 1260 32 1440 43V72H0Z' fill='white'/></svg>");
|