@riverbankcms/sdk 0.126.0 → 0.128.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/dist/{PreviewEditorSidebar-DcYJxTgc.mjs → PreviewEditorSidebar-Dbvb7GIr.mjs} +64 -68
- package/dist/{PreviewEditorUI-Ctt1yTJr.mjs → PreviewEditorUI-e9O9l20X.mjs} +3 -3
- package/dist/{PreviewQueryProvider-DgFDIwvK.mjs → PreviewQueryProvider-B1kbhaJD.mjs} +1 -1
- package/dist/SdkPreviewModeRuntime-BZHt6e9w.mjs +11006 -0
- package/dist/{SiteChromeCustomizeContext-C87qlKWw.mjs → SiteChromeCustomizeContext-CvuGbHJX.mjs} +51247 -20733
- package/dist/_dts/ai/src/contracts/proposals.d.ts +486 -36
- package/dist/_dts/api/src/bookingClosures.d.ts +19 -3
- package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +4 -3
- package/dist/_dts/api/src/bookingRecords.d.ts +0 -13
- package/dist/_dts/api/src/commercePortalEndpoints.d.ts +2 -2
- package/dist/_dts/api/src/communications.d.ts +2 -1
- package/dist/_dts/api/src/contactFormSummary.d.ts +15 -0
- package/dist/_dts/api/src/contentRuntime.d.ts +3 -10
- package/dist/_dts/api/src/endpoints.d.ts +1 -1
- package/dist/_dts/api/src/footerSettings.d.ts +11 -0
- package/dist/_dts/api/src/index.d.ts +2 -1
- package/dist/_dts/api/src/occurrenceScheduling.d.ts +48 -0
- package/dist/_dts/api/src/participantMessaging.d.ts +5 -3
- package/dist/_dts/api/src/publicExperience/siteEndpoints.d.ts +7 -0
- package/dist/_dts/api/src/sdkContracts.d.ts +7 -5
- package/dist/_dts/api/src/siteOperations.d.ts +12 -3
- package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +3 -2
- 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/client/form.d.ts +1 -0
- package/dist/_dts/blocks/src/client/newsletter-form.d.ts +1 -0
- package/dist/_dts/blocks/src/client/site-chrome.d.ts +1 -0
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +4 -8
- 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/rendering/server.d.ts +1 -1
- package/dist/_dts/blocks/src/system/blocks/event-registration.d.ts +41 -0
- package/dist/_dts/blocks/src/system/blocks/newsletter-signup-destination.d.ts +14 -23
- package/dist/_dts/blocks/src/system/blocks/newsletter-signup.d.ts +1 -1
- package/dist/_dts/blocks/src/system/blocks/site-footer-runtime.d.ts +109 -23
- package/dist/_dts/blocks/src/system/constants/buttonRoles.d.ts +0 -13
- package/dist/_dts/blocks/src/system/data/loaderEndpoints.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +42 -108
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +21 -54
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details/logic.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationSurface.d.ts +26 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +21 -0
- 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/newsletter-form.interactive.d.ts +29 -78
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.server.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.submission.d.ts +3 -6
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.types.d.ts +27 -8
- package/dist/_dts/blocks/src/system/runtime/nodes/shared/contract-schemas.d.ts +2 -2
- package/dist/_dts/content-editor/src/FooterComposerOverview.d.ts +21 -0
- package/dist/_dts/content-editor/src/FooterComposerPanel.d.ts +3 -1
- package/dist/_dts/content-editor/src/FooterEngagementEditorFields.d.ts +31 -0
- package/dist/_dts/content-editor/src/FooterEngagementEditorPanel.d.ts +17 -0
- package/dist/_dts/content-editor/src/footerComposer.d.ts +3 -0
- package/dist/_dts/content-editor/src/footerEngagementDraft.d.ts +57 -0
- package/dist/_dts/content-editor/src/footerEngagementEditor.d.ts +11 -0
- package/dist/_dts/content-editor/src/footerPreviewRuntime.d.ts +13 -0
- package/dist/_dts/content-editor/src/index.d.ts +1 -0
- 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/content-editor/src/useFooterComposerState.d.ts +35 -0
- package/dist/_dts/core/src/footer-arrangement.d.ts +2 -0
- package/dist/_dts/core/src/footer-composition-types.d.ts +118 -0
- package/dist/_dts/core/src/footer-composition.d.ts +7 -116
- package/dist/_dts/core/src/footer-engagement.d.ts +30 -0
- package/dist/_dts/core/src/index.d.ts +4 -0
- package/dist/_dts/core/src/newsletter-signup-destination.d.ts +38 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +200 -159
- package/dist/_dts/db/src/index.d.ts +1 -0
- package/dist/_dts/db/src/schemas/forms.d.ts +72 -2
- package/dist/_dts/db/src/schemas/standard-contact.d.ts +114 -0
- 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/blocks/previewBatchLoaderParams.d.ts +6 -0
- package/dist/_dts/preview-next/src/client/index.d.ts +2 -0
- package/dist/_dts/preview-next/src/client/preview/EntryEditorPanel.d.ts +2 -5
- package/dist/_dts/preview-next/src/client/preview/EntrySlotBlockEditorPanel.d.ts +2 -5
- package/dist/_dts/preview-next/src/client/preview/HeaderMenuControls.d.ts +12 -0
- package/dist/_dts/preview-next/src/client/preview/PageBlockEditorPanel.d.ts +2 -5
- package/dist/_dts/preview-next/src/client/preview/PreviewEditorSidebar.d.ts +2 -4
- package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +13 -2
- package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +8 -4
- package/dist/_dts/preview-next/src/client/preview/SiteChromeCustomizeContext.d.ts +4 -49
- 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/widgets/widgetOverrides.d.ts +6 -5
- package/dist/_dts/sdk/src/cli/commands/push/execute/footer.d.ts +9 -0
- package/dist/_dts/sdk/src/cli/content/footerFile.d.ts +10 -0
- package/dist/_dts/sdk/src/cli/content/reader.d.ts +3 -5
- package/dist/_dts/sdk/src/cli/site-commands/footerCommands.d.ts +15 -3
- package/dist/_dts/sdk/src/client/combineAbortSignals.d.ts +2 -0
- package/dist/_dts/sdk/src/client/management/types.d.ts +6 -15
- package/dist/_dts/sdk/src/client/types.d.ts +10 -2
- package/dist/_dts/sdk/src/client/wholeSeriesReadOperations.d.ts +11 -0
- package/dist/_dts/sdk/src/config/types.d.ts +1 -1
- package/dist/_dts/sdk/src/config/validation.d.ts +3 -0
- package/dist/_dts/sdk/src/contracts/event-registration-content.d.ts +16 -0
- package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +4 -15
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +4 -18
- package/dist/_dts/sdk/src/public-api/teamMemberContracts.d.ts +17 -0
- package/dist/_dts/sdk/src/public-api/wholeSeriesContracts.d.ts +2 -0
- package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +7 -0
- package/dist/_dts/sdk/src/rendering/index.d.ts +5 -3
- package/dist/_dts/sdk/src/rendering/islands/types.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/mediaAssets.d.ts +8 -2
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/site-commands/src/commandContract.d.ts +8 -1
- package/dist/_dts/site-commands/src/commands.d.ts +16 -2
- 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 +31 -0
- package/dist/_dts/theme-core/src/header/scrollTreatment.d.ts +11 -0
- package/dist/_dts/theme-core/src/header/surfaceRules.d.ts +8 -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/schema.d.ts +67 -19
- 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 +1 -1
- package/dist/_dts/theme-core/src/site-styles/siteChromeNavPreferences.d.ts +4 -1
- package/dist/cli/index.mjs +6272 -5706
- package/dist/client/{courseRegistration-BcemLAdN.mjs → CourseRegistrationWizard-xRmA7REV.mjs} +329 -49
- package/dist/client/{DiscountCodeDisclosure-DS0AuFWW.mjs → DiscountCodeDisclosure-B9vriL5C.mjs} +1 -1
- package/dist/client/{EventCombined.client-DtMxLr7q.mjs → EventCombined.client-BgVnVTlz.mjs} +2 -2
- package/dist/client/{EventListing.client-BdLSRNg1.mjs → EventListing.client-CqdsO7jO.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-BrpC6vsT.mjs → LeafletStaticMap-CKPxot9M.mjs} +1 -1
- package/dist/client/{StepIndicator-CBYPFVoy.mjs → StepIndicator-DGCYuBJ1.mjs} +2 -2
- package/dist/client/{accordion-BqqwPJWM.mjs → accordion-BfN5Eqd-.mjs} +1 -1
- package/dist/client/{bookingForm-SneP3yxC.mjs → bookingForm-DOvCpBFP.mjs} +5 -5
- package/dist/client/bookings.mjs +126 -23
- package/dist/client/{carousel-BTIR9L3I.mjs → carousel-DPNmiH0f.mjs} +1 -1
- package/dist/client/{cart-bqiqd8SX.mjs → cart--egVXlrR.mjs} +3 -3
- package/dist/client/{checkout-WbTFV5v4.mjs → checkout-DywWtMcq.mjs} +3 -3
- package/dist/client/client.mjs +6111 -5794
- package/dist/client/courseRegistration-Dk9qFVwt.mjs +46 -0
- package/dist/client/{eventCalendar-CsxIw0V_.mjs → eventCalendar-Bkz2HjlS.mjs} +4 -4
- package/dist/client/{eventCombined-B6XMoHfa.mjs → eventCombined-D4kipYWg.mjs} +2 -2
- package/dist/client/{eventDetails-BJaoPPfo.mjs → eventDetails-Dz_5ix2Q.mjs} +56 -35
- package/dist/client/{eventListing-DgwdYHRT.mjs → eventListing-D0vm-zST.mjs} +2 -2
- package/dist/client/{eventRegistration-C0O3folu.mjs → eventRegistration-Cw1E4Q4p.mjs} +58 -6
- package/dist/client/{form-Bk9txGFt.mjs → form-C2Zf1n3K.mjs} +1 -1
- package/dist/client/{headerSection-yIBt0yTv.mjs → headerSection-CP05gzdc.mjs} +2 -2
- package/dist/client/hooks.mjs +1013 -935
- package/dist/client/{locationMap-C-3KIpv-.mjs → locationMap-Cl3x9PYJ.mjs} +2 -2
- package/dist/client/{newsletterForm-CzB8g8h2.mjs → newsletterForm-DyEJoClm.mjs} +26 -20
- package/dist/client/{pricing-C1QeDes_.mjs → pricing-DGuNR1W4.mjs} +1 -1
- package/dist/client/{productDetail-w7SBp5uc.mjs → productDetail-Cq-HrGew.mjs} +3 -3
- package/dist/client/{productList-D0tGKHGf.mjs → productList-DbB3jwqd.mjs} +3 -3
- package/dist/client/{propsDecoder-Bcin2DB3.mjs → propsDecoder-CiTuhUwY.mjs} +257 -142
- package/dist/client/rendering/client.mjs +1342 -1122
- package/dist/client/rendering/islands.mjs +18 -18
- package/dist/client/rendering.mjs +6622 -6321
- package/dist/client/{scrollToBlock-h-o_STf_.mjs → scrollToBlock-CShkRqab.mjs} +1 -1
- package/dist/client/{shop-BGzmL8O_.mjs → shop-Cu4Ib-ZA.mjs} +5 -5
- package/dist/client/{shop-commerce-lX8QxjX-.mjs → shop-commerce-BzpsOdh7.mjs} +4 -4
- package/dist/client/{shop-commerce-store-CEurARtu.mjs → shop-commerce-store-DaE7Fhj8.mjs} +1 -1
- package/dist/client/{shopShared-DXxH8xxw.mjs → shopShared-cF0c20vB.mjs} +2 -2
- package/dist/client/{useEventFilters-B591g9vd.mjs → useEventFilters-QZ3HMgaJ.mjs} +2 -2
- package/dist/client/{usePolling-BvnChV4m.mjs → usePolling-BKf0GcE-.mjs} +2 -2
- package/dist/preview-next/before-render.mjs +1 -1
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/middleware.mjs +1 -1
- package/dist/{previewAuthStore-Dev9CdG9.mjs → previewAuthStore-BesgU5Xu.mjs} +1 -1
- package/dist/{sdk-runtime-M__i3Jce.mjs → sdk-runtime-Cn_QSCOg.mjs} +2 -2
- package/dist/{separator-VSlnI9bc.mjs → separator-CEoGABRc.mjs} +1 -1
- package/dist/server/components.mjs +1750 -1614
- package/dist/server/config-validation.mjs +1010 -935
- package/dist/server/config.mjs +1010 -935
- package/dist/server/data.mjs +1013 -935
- package/dist/server/index.mjs +40 -16
- package/dist/server/next.mjs +1790 -1632
- package/dist/server/page-converter.mjs +1012 -938
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +1746 -1601
- package/dist/server/rendering.mjs +1759 -1615
- package/dist/server/routing.mjs +1123 -975
- package/dist/server/server.mjs +1053 -951
- package/dist/server/theme-bridge.mjs +151 -118
- package/dist/server/theme.mjs +111 -23
- package/package.json +1 -1
- package/dist/SdkPreviewModeRuntime-CvW1vdQ4.mjs +0 -39468
- package/dist/_dts/editor-blocks/src/widgets/rich-text/ensureRichTextImageAssetIdentifier.d.ts +0 -8
- package/dist/client/MagicLinkForm-Bt3IuLMy.mjs +0 -327
|
@@ -303,7 +303,7 @@ function canonicalPaletteHashInput(colors, mode) {
|
|
|
303
303
|
return `${mode}|${paletteColorFingerprint(colors)}`;
|
|
304
304
|
}
|
|
305
305
|
/**
|
|
306
|
-
*
|
|
306
|
+
* Stable curated-catalogue identity. Do not reorder roles: the order comes
|
|
307
307
|
* from PALETTE_TOKEN_NAMES through canonicalPaletteHashInput.
|
|
308
308
|
*/
|
|
309
309
|
function paletteValueKey(colors, mode) {
|
|
@@ -378,8 +378,6 @@ const VARIANT_ROLES = [
|
|
|
378
378
|
"secondary",
|
|
379
379
|
"outline",
|
|
380
380
|
"ghost",
|
|
381
|
-
"link",
|
|
382
|
-
"tertiary",
|
|
383
381
|
"accent"
|
|
384
382
|
];
|
|
385
383
|
/**
|
|
@@ -388,7 +386,7 @@ const VARIANT_ROLES = [
|
|
|
388
386
|
* IDs become class selectors, so keep the contract deliberately narrower than
|
|
389
387
|
* an arbitrary string and shared with every authoring/runtime boundary.
|
|
390
388
|
*/
|
|
391
|
-
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" });
|
|
392
390
|
function parseOpaqueButtonColourToken(value) {
|
|
393
391
|
const token = parseThemeColorToken(value);
|
|
394
392
|
if (token === null) return null;
|
|
@@ -1388,6 +1386,59 @@ function interpolateHex(startHex, endHex, position) {
|
|
|
1388
1386
|
const channel = (from, to) => Math.round(from + (to - from) * position).toString(16).padStart(2, "0");
|
|
1389
1387
|
return `#${channel(start.r, end.r)}${channel(start.g, end.g)}${channel(start.b, end.b)}`;
|
|
1390
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
|
+
}
|
|
1391
1442
|
//#endregion
|
|
1392
1443
|
//#region ../theme-core/src/buttons/resolvedButtonCss.ts
|
|
1393
1444
|
/**
|
|
@@ -4257,6 +4308,60 @@ function cssVarValue(token) {
|
|
|
4257
4308
|
* palette context and happens in `parseThemeColorReference`.
|
|
4258
4309
|
*/
|
|
4259
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
|
+
]);
|
|
4260
4365
|
//#endregion
|
|
4261
4366
|
//#region ../theme-core/src/schema.ts
|
|
4262
4367
|
const axesSchema = z$1.object({
|
|
@@ -4666,25 +4771,6 @@ const navFontWeight = z$1.enum([
|
|
|
4666
4771
|
]);
|
|
4667
4772
|
const headerMaxWidth = z$1.enum(["container", "full"]);
|
|
4668
4773
|
const headerBarFrame = z$1.enum(["full-bleed", "inset-shell"]);
|
|
4669
|
-
const headerContainerSchema = z$1.object({
|
|
4670
|
-
rounded: z$1.enum([
|
|
4671
|
-
"none",
|
|
4672
|
-
"sm",
|
|
4673
|
-
"md",
|
|
4674
|
-
"lg",
|
|
4675
|
-
"xl",
|
|
4676
|
-
"2xl"
|
|
4677
|
-
]).default("xl"),
|
|
4678
|
-
border: z$1.boolean().default(true),
|
|
4679
|
-
shadow: z$1.boolean().default(true),
|
|
4680
|
-
padding: z$1.enum([
|
|
4681
|
-
"sm",
|
|
4682
|
-
"md",
|
|
4683
|
-
"lg"
|
|
4684
|
-
]).default("md"),
|
|
4685
|
-
tint: z$1.string().nullable().optional(),
|
|
4686
|
-
opacity: z$1.number().min(0).max(1).default(.12)
|
|
4687
|
-
}).optional();
|
|
4688
4774
|
const headerBorderSchema = componentBorderSchema.extend({ position: z$1.enum([
|
|
4689
4775
|
"bottom",
|
|
4690
4776
|
"top",
|
|
@@ -4811,6 +4897,7 @@ const headerSchema = z$1.object({
|
|
|
4811
4897
|
shrinkOnScroll: z$1.boolean(),
|
|
4812
4898
|
maxWidth: headerMaxWidth,
|
|
4813
4899
|
barFrame: headerBarFrame.optional(),
|
|
4900
|
+
scrollTreatment: headerScrollTreatmentSchema,
|
|
4814
4901
|
logoOverride: mediaSchema.nullable().optional(),
|
|
4815
4902
|
background: headerBackgroundSchema.default({
|
|
4816
4903
|
type: "color",
|
|
@@ -4823,6 +4910,7 @@ const headerSchema = z$1.object({
|
|
|
4823
4910
|
navFontRole: z$1.enum(["body", "heading"]).optional(),
|
|
4824
4911
|
navTypography: z$1.enum(["body", "heading"]).optional(),
|
|
4825
4912
|
navTextSize: navLinkStyleSchema.shape.textSize,
|
|
4913
|
+
interactionPalette: headerInteractionPaletteSchema.optional(),
|
|
4826
4914
|
navPlacement: z$1.enum(["end", "center"]).optional(),
|
|
4827
4915
|
container: headerContainerSchema,
|
|
4828
4916
|
border: headerBorderSchema,
|
|
@@ -7130,6 +7218,38 @@ function resolveHeaderCtaVariant(theme, treatment) {
|
|
|
7130
7218
|
}
|
|
7131
7219
|
}
|
|
7132
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
|
|
7133
7253
|
//#region ../theme-core/src/site-styles/headerLooks.ts
|
|
7134
7254
|
function asHeaderLookId(value) {
|
|
7135
7255
|
return value;
|
|
@@ -7263,7 +7383,7 @@ const overlayLogoAccommodations = [
|
|
|
7263
7383
|
* optional nested styling fields that would otherwise leak from another Look.
|
|
7264
7384
|
*/
|
|
7265
7385
|
function baseHeader(theme) {
|
|
7266
|
-
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;
|
|
7267
7387
|
return {
|
|
7268
7388
|
...header,
|
|
7269
7389
|
navContainer: {
|
|
@@ -7278,7 +7398,6 @@ const headerLayoutCatalog = defineExactCatalog()([
|
|
|
7278
7398
|
id: asHeaderLayoutId("classic"),
|
|
7279
7399
|
label: "Classic",
|
|
7280
7400
|
description: "Logo and navigation in one practical horizontal row.",
|
|
7281
|
-
structure: "inline-classic",
|
|
7282
7401
|
variant: "classic",
|
|
7283
7402
|
defaultPositioning: "sticky",
|
|
7284
7403
|
shrinkOnScroll: false
|
|
@@ -7287,7 +7406,6 @@ const headerLayoutCatalog = defineExactCatalog()([
|
|
|
7287
7406
|
id: asHeaderLayoutId("centered"),
|
|
7288
7407
|
label: "Centered",
|
|
7289
7408
|
description: "Logo centered above a balanced navigation row.",
|
|
7290
|
-
structure: "centered-stack",
|
|
7291
7409
|
variant: "centered",
|
|
7292
7410
|
defaultPositioning: "static",
|
|
7293
7411
|
shrinkOnScroll: false,
|
|
@@ -7303,7 +7421,6 @@ const headerLayoutCatalog = defineExactCatalog()([
|
|
|
7303
7421
|
id: asHeaderLayoutId("floating"),
|
|
7304
7422
|
label: "Floating",
|
|
7305
7423
|
description: "Detached header chrome that sits over the opening section.",
|
|
7306
|
-
structure: "floating-shell",
|
|
7307
7424
|
variant: "floating",
|
|
7308
7425
|
defaultPositioning: "sticky",
|
|
7309
7426
|
shrinkOnScroll: true,
|
|
@@ -7465,10 +7582,13 @@ const headerStyleCatalog = defineExactCatalog()([
|
|
|
7465
7582
|
label: "Clear Split",
|
|
7466
7583
|
description: "Floating logo with transparent navigation and no shared shell.",
|
|
7467
7584
|
supportedLayoutIds: supportedLayouts(["floating"]),
|
|
7468
|
-
navInteraction: "
|
|
7585
|
+
navInteraction: "pill-background",
|
|
7469
7586
|
surface: "floating",
|
|
7470
|
-
defaultDepth: "
|
|
7587
|
+
defaultDepth: "line",
|
|
7471
7588
|
navTypography: "plain",
|
|
7589
|
+
openingForegroundTarget: "all",
|
|
7590
|
+
scrollTreatment: "contrast-glass",
|
|
7591
|
+
interactionPalette: clearSplitInteractionPalette,
|
|
7472
7592
|
moods: ["editorial", "calm"]
|
|
7473
7593
|
},
|
|
7474
7594
|
{
|
|
@@ -7491,6 +7611,7 @@ const headerStyleCatalog = defineExactCatalog()([
|
|
|
7491
7611
|
surface: "floating",
|
|
7492
7612
|
defaultDepth: "shadow",
|
|
7493
7613
|
navTypography: "quiet-caps",
|
|
7614
|
+
openingForegroundTarget: "brand-only",
|
|
7494
7615
|
moods: ["expressive"]
|
|
7495
7616
|
},
|
|
7496
7617
|
{
|
|
@@ -7502,6 +7623,7 @@ const headerStyleCatalog = defineExactCatalog()([
|
|
|
7502
7623
|
surface: "floating",
|
|
7503
7624
|
defaultDepth: "shadow",
|
|
7504
7625
|
navTypography: "heading",
|
|
7626
|
+
openingForegroundTarget: "brand-only",
|
|
7505
7627
|
moods: ["calm", "editorial"]
|
|
7506
7628
|
}
|
|
7507
7629
|
]);
|
|
@@ -8003,13 +8125,6 @@ const headerLookCatalog = defineExactCatalog()([
|
|
|
8003
8125
|
{
|
|
8004
8126
|
id: asHeaderLookId("clean-base"),
|
|
8005
8127
|
label: "Clean base",
|
|
8006
|
-
visualTreatment: "solid-neutral",
|
|
8007
|
-
layoutBehavior: "sticky",
|
|
8008
|
-
configuration: {
|
|
8009
|
-
structure: "inline-classic",
|
|
8010
|
-
treatment: "solid-neutral",
|
|
8011
|
-
behavior: "sticky"
|
|
8012
|
-
},
|
|
8013
8128
|
openingRequirement: "none",
|
|
8014
8129
|
logoAccommodations: inlineClassicLogoAccommodations,
|
|
8015
8130
|
compile: cleanBaseHeader
|
|
@@ -8017,13 +8132,6 @@ const headerLookCatalog = defineExactCatalog()([
|
|
|
8017
8132
|
{
|
|
8018
8133
|
id: asHeaderLookId("classic-centered-nav"),
|
|
8019
8134
|
label: "Centered nav",
|
|
8020
|
-
visualTreatment: "solid-neutral",
|
|
8021
|
-
layoutBehavior: "sticky",
|
|
8022
|
-
configuration: {
|
|
8023
|
-
structure: "inline-classic",
|
|
8024
|
-
treatment: "solid-neutral",
|
|
8025
|
-
behavior: "sticky"
|
|
8026
|
-
},
|
|
8027
8135
|
openingRequirement: "none",
|
|
8028
8136
|
maxRecommendedNavItems: 6,
|
|
8029
8137
|
logoAccommodations: inlineClassicLogoAccommodations,
|
|
@@ -8032,13 +8140,6 @@ const headerLookCatalog = defineExactCatalog()([
|
|
|
8032
8140
|
{
|
|
8033
8141
|
id: asHeaderLookId("brand-solid"),
|
|
8034
8142
|
label: "Brand solid",
|
|
8035
|
-
visualTreatment: "solid-brand",
|
|
8036
|
-
layoutBehavior: "sticky-shrink",
|
|
8037
|
-
configuration: {
|
|
8038
|
-
structure: "inline-classic",
|
|
8039
|
-
treatment: "solid-brand",
|
|
8040
|
-
behavior: "sticky-shrink"
|
|
8041
|
-
},
|
|
8042
8143
|
openingRequirement: "none",
|
|
8043
8144
|
logoAccommodations: inlineClassicLogoAccommodations,
|
|
8044
8145
|
compile: solidBrandHeader
|
|
@@ -8046,13 +8147,6 @@ const headerLookCatalog = defineExactCatalog()([
|
|
|
8046
8147
|
{
|
|
8047
8148
|
id: asHeaderLookId("serif-line"),
|
|
8048
8149
|
label: "Serif line",
|
|
8049
|
-
visualTreatment: "light-serif",
|
|
8050
|
-
layoutBehavior: "sticky",
|
|
8051
|
-
configuration: {
|
|
8052
|
-
structure: "centered-stack",
|
|
8053
|
-
treatment: "light-serif",
|
|
8054
|
-
behavior: "sticky"
|
|
8055
|
-
},
|
|
8056
8150
|
openingRequirement: "none",
|
|
8057
8151
|
maxRecommendedNavItems: 6,
|
|
8058
8152
|
logoAccommodations: centeredLogoAccommodations,
|
|
@@ -8061,13 +8155,6 @@ const headerLookCatalog = defineExactCatalog()([
|
|
|
8061
8155
|
{
|
|
8062
8156
|
id: asHeaderLookId("centered-calm"),
|
|
8063
8157
|
label: "Centered calm",
|
|
8064
|
-
visualTreatment: "light-serif",
|
|
8065
|
-
layoutBehavior: "normal-flow",
|
|
8066
|
-
configuration: {
|
|
8067
|
-
structure: "centered-stack",
|
|
8068
|
-
treatment: "light-serif",
|
|
8069
|
-
behavior: "normal-flow"
|
|
8070
|
-
},
|
|
8071
8158
|
openingRequirement: "none",
|
|
8072
8159
|
maxRecommendedNavItems: 5,
|
|
8073
8160
|
logoAccommodations: centeredLogoAccommodations,
|
|
@@ -8076,13 +8163,6 @@ const headerLookCatalog = defineExactCatalog()([
|
|
|
8076
8163
|
{
|
|
8077
8164
|
id: asHeaderLookId("practical-utility"),
|
|
8078
8165
|
label: "Practical utility",
|
|
8079
|
-
visualTreatment: "solid-neutral",
|
|
8080
|
-
layoutBehavior: "sticky-shrink",
|
|
8081
|
-
configuration: {
|
|
8082
|
-
structure: "inline-classic",
|
|
8083
|
-
treatment: "solid-neutral",
|
|
8084
|
-
behavior: "sticky-shrink"
|
|
8085
|
-
},
|
|
8086
8166
|
openingRequirement: "none",
|
|
8087
8167
|
requiresProminentCta: true,
|
|
8088
8168
|
logoAccommodations: inlineClassicLogoAccommodations,
|
|
@@ -8091,13 +8171,6 @@ const headerLookCatalog = defineExactCatalog()([
|
|
|
8091
8171
|
{
|
|
8092
8172
|
id: asHeaderLookId("minimal-transparent"),
|
|
8093
8173
|
label: "Minimal transparent",
|
|
8094
|
-
visualTreatment: "minimal-transparent",
|
|
8095
|
-
layoutBehavior: "normal-flow",
|
|
8096
|
-
configuration: {
|
|
8097
|
-
structure: "inline-classic",
|
|
8098
|
-
treatment: "minimal-transparent",
|
|
8099
|
-
behavior: "normal-flow"
|
|
8100
|
-
},
|
|
8101
8174
|
openingRequirement: "reserved-space-ok",
|
|
8102
8175
|
logoAccommodations: inlineClassicLogoAccommodations,
|
|
8103
8176
|
compile: minimalTransparentHeader
|
|
@@ -8105,13 +8178,6 @@ const headerLookCatalog = defineExactCatalog()([
|
|
|
8105
8178
|
{
|
|
8106
8179
|
id: asHeaderLookId("transparent-overlay"),
|
|
8107
8180
|
label: "Transparent overlay",
|
|
8108
|
-
visualTreatment: "transparent-overlay",
|
|
8109
|
-
layoutBehavior: "fixed-overlay",
|
|
8110
|
-
configuration: {
|
|
8111
|
-
structure: "inline-classic",
|
|
8112
|
-
treatment: "transparent-overlay",
|
|
8113
|
-
behavior: "fixed-overlay"
|
|
8114
|
-
},
|
|
8115
8181
|
openingRequirement: "requires-image-hero-with-contrast-overlay",
|
|
8116
8182
|
maxRecommendedNavItems: 5,
|
|
8117
8183
|
logoAccommodations: overlayLogoAccommodations,
|
|
@@ -8120,24 +8186,13 @@ const headerLookCatalog = defineExactCatalog()([
|
|
|
8120
8186
|
{
|
|
8121
8187
|
id: asHeaderLookId("floating-glass"),
|
|
8122
8188
|
label: "Floating glass",
|
|
8123
|
-
visualTreatment: "floating-glass",
|
|
8124
|
-
layoutBehavior: "fixed-floating",
|
|
8125
|
-
configuration: {
|
|
8126
|
-
structure: "floating-shell",
|
|
8127
|
-
treatment: "floating-glass",
|
|
8128
|
-
behavior: "fixed-floating"
|
|
8129
|
-
},
|
|
8130
8189
|
openingRequirement: "requires-image-hero-with-contrast-overlay",
|
|
8131
8190
|
maxRecommendedNavItems: 5,
|
|
8132
8191
|
logoAccommodations: overlayLogoAccommodations,
|
|
8133
8192
|
compile: floatingGlassHeader
|
|
8134
8193
|
}
|
|
8135
8194
|
]);
|
|
8136
|
-
new Set(headerLookCatalog.map((look) => headerConfigurationKey(look.configuration)));
|
|
8137
8195
|
new Map(headerLookCatalog.map((look) => [look.id, look]));
|
|
8138
|
-
function headerConfigurationKey(configuration) {
|
|
8139
|
-
return `${configuration.structure}:${configuration.treatment}:${configuration.behavior}`;
|
|
8140
|
-
}
|
|
8141
8196
|
//#endregion
|
|
8142
8197
|
//#region ../theme-core/src/site-styles/footerLooks.ts
|
|
8143
8198
|
function asFooterLookId(value) {
|
|
@@ -10705,28 +10760,6 @@ const curatedSiteStyles = [
|
|
|
10705
10760
|
})
|
|
10706
10761
|
];
|
|
10707
10762
|
new Map(curatedSiteStyles.map((style) => [style.id, style]));
|
|
10708
|
-
const BREAKPOINT_LG = 1024;
|
|
10709
|
-
const BREAKPOINT_XL = 1280;
|
|
10710
|
-
const BREAKPOINT_LG_DOWN = BREAKPOINT_LG - 1;
|
|
10711
|
-
function mqUp(px) {
|
|
10712
|
-
return `(min-width: ${px}px)`;
|
|
10713
|
-
}
|
|
10714
|
-
function mqDown(px) {
|
|
10715
|
-
return `(max-width: ${px}px)`;
|
|
10716
|
-
}
|
|
10717
|
-
function mqBetween(minPx, maxPx) {
|
|
10718
|
-
return `${mqUp(minPx)} and ${mqDown(maxPx)}`;
|
|
10719
|
-
}
|
|
10720
|
-
mqUp(640);
|
|
10721
|
-
mqUp(768);
|
|
10722
|
-
mqUp(BREAKPOINT_LG);
|
|
10723
|
-
mqUp(BREAKPOINT_XL);
|
|
10724
|
-
mqDown(639);
|
|
10725
|
-
mqDown(767);
|
|
10726
|
-
mqDown(BREAKPOINT_LG_DOWN);
|
|
10727
|
-
mqBetween(640, BREAKPOINT_LG_DOWN);
|
|
10728
|
-
mqDown(640);
|
|
10729
|
-
mqDown(768);
|
|
10730
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>");
|
|
10731
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>");
|
|
10732
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>");
|
package/dist/server/theme.mjs
CHANGED
|
@@ -581,7 +581,7 @@ function canonicalPaletteHashInput(colors, mode) {
|
|
|
581
581
|
return `${mode}|${paletteColorFingerprint(colors)}`;
|
|
582
582
|
}
|
|
583
583
|
/**
|
|
584
|
-
*
|
|
584
|
+
* Stable curated-catalogue identity. Do not reorder roles: the order comes
|
|
585
585
|
* from PALETTE_TOKEN_NAMES through canonicalPaletteHashInput.
|
|
586
586
|
*/
|
|
587
587
|
function paletteValueKey(colors, mode) {
|
|
@@ -713,8 +713,6 @@ const VARIANT_ROLES = [
|
|
|
713
713
|
"secondary",
|
|
714
714
|
"outline",
|
|
715
715
|
"ghost",
|
|
716
|
-
"link",
|
|
717
|
-
"tertiary",
|
|
718
716
|
"accent"
|
|
719
717
|
];
|
|
720
718
|
/**
|
|
@@ -723,7 +721,7 @@ const VARIANT_ROLES = [
|
|
|
723
721
|
* IDs become class selectors, so keep the contract deliberately narrower than
|
|
724
722
|
* an arbitrary string and shared with every authoring/runtime boundary.
|
|
725
723
|
*/
|
|
726
|
-
const buttonVariantIdSchema = z$1.string().min(1).max(50).regex(/^[a-z0-9-]+$/, "Button variant IDs may contain lowercase letters, numbers, and hyphens only");
|
|
724
|
+
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" });
|
|
727
725
|
function parseOpaqueButtonColourToken(value) {
|
|
728
726
|
const token = parseThemeColorToken(value);
|
|
729
727
|
if (token === null) return null;
|
|
@@ -1638,6 +1636,59 @@ function parseThemeForPersistence(value) {
|
|
|
1638
1636
|
value: theme
|
|
1639
1637
|
};
|
|
1640
1638
|
}
|
|
1639
|
+
shadeBackgroundEffect({
|
|
1640
|
+
id: "darken-background",
|
|
1641
|
+
name: "Darken on Hover",
|
|
1642
|
+
description: "Darkens the background color on hover",
|
|
1643
|
+
label: "Darken Amount (shade step)",
|
|
1644
|
+
shadeDirection: 1
|
|
1645
|
+
});
|
|
1646
|
+
shadeBackgroundEffect({
|
|
1647
|
+
id: "lighten-background",
|
|
1648
|
+
name: "Lighten on Hover",
|
|
1649
|
+
description: "Lightens the background color on hover",
|
|
1650
|
+
label: "Lighten Amount (shade step)",
|
|
1651
|
+
shadeDirection: -1
|
|
1652
|
+
});
|
|
1653
|
+
function shadeBackgroundEffect(config) {
|
|
1654
|
+
return {
|
|
1655
|
+
id: config.id,
|
|
1656
|
+
name: config.name,
|
|
1657
|
+
description: config.description,
|
|
1658
|
+
category: "background",
|
|
1659
|
+
pseudoElement: "none",
|
|
1660
|
+
applicableTo: ["button"],
|
|
1661
|
+
customizableOption: {
|
|
1662
|
+
name: "amount",
|
|
1663
|
+
type: "select",
|
|
1664
|
+
label: config.label,
|
|
1665
|
+
default: 100,
|
|
1666
|
+
options: [
|
|
1667
|
+
0,
|
|
1668
|
+
100,
|
|
1669
|
+
200,
|
|
1670
|
+
300,
|
|
1671
|
+
400,
|
|
1672
|
+
500,
|
|
1673
|
+
600,
|
|
1674
|
+
700,
|
|
1675
|
+
800,
|
|
1676
|
+
900
|
|
1677
|
+
]
|
|
1678
|
+
},
|
|
1679
|
+
isApplicable: (buttonConfig) => buttonConfig.background.type === "solid",
|
|
1680
|
+
generateCSS: ({ themeId, variantId, options, tokens, buttonConfig }) => {
|
|
1681
|
+
if (buttonConfig.background.type !== "solid") return "";
|
|
1682
|
+
const amount = (options.amount || 100) * config.shadeDirection;
|
|
1683
|
+
const baseToken = buttonConfig.background.colorToken ?? "primary-500";
|
|
1684
|
+
return `
|
|
1685
|
+
:where([data-theme-scope="${themeId}"]) .${variantId}:hover {
|
|
1686
|
+
background-color: ${tokens.getColor(tokens.adjustShade(baseToken, amount))};
|
|
1687
|
+
}
|
|
1688
|
+
`;
|
|
1689
|
+
}
|
|
1690
|
+
};
|
|
1691
|
+
}
|
|
1641
1692
|
buttonSizeNameSchema.options;
|
|
1642
1693
|
//#endregion
|
|
1643
1694
|
//#region ../theme-core/src/buttons/styles/domain.ts
|
|
@@ -4187,6 +4238,60 @@ const siteChromeBackgroundOverrideOwner = "site-chrome-editor";
|
|
|
4187
4238
|
* palette context and happens in `parseThemeColorReference`.
|
|
4188
4239
|
*/
|
|
4189
4240
|
const tokenOrCssColorValueSchema = z$1.string();
|
|
4241
|
+
const BREAKPOINT_LG = 1024;
|
|
4242
|
+
const BREAKPOINT_XL = 1280;
|
|
4243
|
+
const BREAKPOINT_LG_DOWN = BREAKPOINT_LG - 1;
|
|
4244
|
+
function mqUp(px) {
|
|
4245
|
+
return `(min-width: ${px}px)`;
|
|
4246
|
+
}
|
|
4247
|
+
function mqDown(px) {
|
|
4248
|
+
return `(max-width: ${px}px)`;
|
|
4249
|
+
}
|
|
4250
|
+
function mqBetween(minPx, maxPx) {
|
|
4251
|
+
return `${mqUp(minPx)} and ${mqDown(maxPx)}`;
|
|
4252
|
+
}
|
|
4253
|
+
mqUp(640);
|
|
4254
|
+
mqUp(768);
|
|
4255
|
+
mqUp(BREAKPOINT_LG);
|
|
4256
|
+
mqUp(BREAKPOINT_XL);
|
|
4257
|
+
mqDown(639);
|
|
4258
|
+
mqDown(767);
|
|
4259
|
+
mqDown(BREAKPOINT_LG_DOWN);
|
|
4260
|
+
mqBetween(640, BREAKPOINT_LG_DOWN);
|
|
4261
|
+
mqDown(640);
|
|
4262
|
+
mqDown(768);
|
|
4263
|
+
//#endregion
|
|
4264
|
+
//#region ../theme-core/src/header/scrollTreatment.ts
|
|
4265
|
+
const headerScrollTreatmentSchema = z$1.discriminatedUnion("kind", [z$1.object({
|
|
4266
|
+
kind: z$1.literal("contrast-glass"),
|
|
4267
|
+
backgroundTone: z$1.enum(["light", "dark"])
|
|
4268
|
+
})]).optional();
|
|
4269
|
+
//#endregion
|
|
4270
|
+
//#region ../theme-core/src/header/containerSchema.ts
|
|
4271
|
+
const headerContainerSchema = z$1.object({
|
|
4272
|
+
rounded: z$1.enum([
|
|
4273
|
+
"none",
|
|
4274
|
+
"sm",
|
|
4275
|
+
"md",
|
|
4276
|
+
"lg",
|
|
4277
|
+
"xl",
|
|
4278
|
+
"2xl"
|
|
4279
|
+
]).default("xl"),
|
|
4280
|
+
border: z$1.boolean().default(true),
|
|
4281
|
+
shadow: z$1.boolean().default(true),
|
|
4282
|
+
padding: z$1.enum([
|
|
4283
|
+
"sm",
|
|
4284
|
+
"md",
|
|
4285
|
+
"lg"
|
|
4286
|
+
]).default("md"),
|
|
4287
|
+
tint: z$1.string().nullable().optional(),
|
|
4288
|
+
opacity: z$1.number().min(0).max(1).default(.12)
|
|
4289
|
+
}).optional();
|
|
4290
|
+
const headerInteractionPaletteSchema = z$1.enum([
|
|
4291
|
+
"primary",
|
|
4292
|
+
"secondary",
|
|
4293
|
+
"accent"
|
|
4294
|
+
]);
|
|
4190
4295
|
//#endregion
|
|
4191
4296
|
//#region ../theme-core/src/schema.ts
|
|
4192
4297
|
const axesSchema = z$1.object({
|
|
@@ -4596,25 +4701,6 @@ const navFontWeight = z$1.enum([
|
|
|
4596
4701
|
]);
|
|
4597
4702
|
const headerMaxWidth = z$1.enum(["container", "full"]);
|
|
4598
4703
|
const headerBarFrame = z$1.enum(["full-bleed", "inset-shell"]);
|
|
4599
|
-
const headerContainerSchema = z$1.object({
|
|
4600
|
-
rounded: z$1.enum([
|
|
4601
|
-
"none",
|
|
4602
|
-
"sm",
|
|
4603
|
-
"md",
|
|
4604
|
-
"lg",
|
|
4605
|
-
"xl",
|
|
4606
|
-
"2xl"
|
|
4607
|
-
]).default("xl"),
|
|
4608
|
-
border: z$1.boolean().default(true),
|
|
4609
|
-
shadow: z$1.boolean().default(true),
|
|
4610
|
-
padding: z$1.enum([
|
|
4611
|
-
"sm",
|
|
4612
|
-
"md",
|
|
4613
|
-
"lg"
|
|
4614
|
-
]).default("md"),
|
|
4615
|
-
tint: z$1.string().nullable().optional(),
|
|
4616
|
-
opacity: z$1.number().min(0).max(1).default(.12)
|
|
4617
|
-
}).optional();
|
|
4618
4704
|
const headerBorderSchema = componentBorderSchema.extend({ position: z$1.enum([
|
|
4619
4705
|
"bottom",
|
|
4620
4706
|
"top",
|
|
@@ -4741,6 +4827,7 @@ const headerSchema = z$1.object({
|
|
|
4741
4827
|
shrinkOnScroll: z$1.boolean(),
|
|
4742
4828
|
maxWidth: headerMaxWidth,
|
|
4743
4829
|
barFrame: headerBarFrame.optional(),
|
|
4830
|
+
scrollTreatment: headerScrollTreatmentSchema,
|
|
4744
4831
|
logoOverride: mediaSchema.nullable().optional(),
|
|
4745
4832
|
background: headerBackgroundSchema.default({
|
|
4746
4833
|
type: "color",
|
|
@@ -4753,6 +4840,7 @@ const headerSchema = z$1.object({
|
|
|
4753
4840
|
navFontRole: z$1.enum(["body", "heading"]).optional(),
|
|
4754
4841
|
navTypography: z$1.enum(["body", "heading"]).optional(),
|
|
4755
4842
|
navTextSize: navLinkStyleSchema.shape.textSize,
|
|
4843
|
+
interactionPalette: headerInteractionPaletteSchema.optional(),
|
|
4756
4844
|
navPlacement: z$1.enum(["end", "center"]).optional(),
|
|
4757
4845
|
container: headerContainerSchema,
|
|
4758
4846
|
border: headerBorderSchema,
|