@loworbitstudio/visor-theme-engine 0.40.0 → 0.42.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/adapters/index.d.ts +1 -1
- package/dist/adapters/index.js +17 -4
- package/dist/{chunk-FJAD536B.js → chunk-C6RLV7WM.js} +93 -22
- package/dist/index.d.ts +53 -2
- package/dist/index.js +81 -5
- package/dist/{types-Cz2u5kQs.d.ts → types-PXhSooKd.d.ts} +31 -0
- package/package.json +1 -1
- package/src/visor-theme.schema.json +48 -0
package/dist/adapters/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { k as GeneratedPrimitives, s as SemanticTokens, R as ResolvedThemeConfig } from '../types-
|
|
1
|
+
import { k as GeneratedPrimitives, s as SemanticTokens, R as ResolvedThemeConfig } from '../types-PXhSooKd.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Adapter types for the Visor theme engine.
|
package/dist/adapters/index.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
|
+
CORNER_SHAPE_BINDING,
|
|
3
|
+
DEFAULT_EASING_OUT,
|
|
2
4
|
FULL_SHADE_STEPS,
|
|
3
5
|
MATERIAL_TEXT_SLOTS,
|
|
4
6
|
SELECTIVE_SHADE_STEPS,
|
|
@@ -10,6 +12,7 @@ import {
|
|
|
10
12
|
collectBrandPassthrough,
|
|
11
13
|
collectDeclaredProperties,
|
|
12
14
|
fontStack,
|
|
15
|
+
generateCornerShapeDecls,
|
|
13
16
|
generateDarkCss,
|
|
14
17
|
generateFontMetricDecls,
|
|
15
18
|
generateFontSizeDecls,
|
|
@@ -18,6 +21,7 @@ import {
|
|
|
18
21
|
generateHairlineDecls,
|
|
19
22
|
generateIntentDecls,
|
|
20
23
|
generateLightCss,
|
|
24
|
+
generateOptInMotionDurationDecls,
|
|
21
25
|
generatePrimitivesCss,
|
|
22
26
|
generateSemanticAliasDecls,
|
|
23
27
|
generateShadeScale,
|
|
@@ -29,7 +33,7 @@ import {
|
|
|
29
33
|
resolveThemeBrand,
|
|
30
34
|
resolveThemeFonts,
|
|
31
35
|
sectionComment
|
|
32
|
-
} from "../chunk-
|
|
36
|
+
} from "../chunk-C6RLV7WM.js";
|
|
33
37
|
|
|
34
38
|
// src/adapters/brand-passthrough.ts
|
|
35
39
|
var SENTINEL_COLOR = "#ff00ff";
|
|
@@ -229,6 +233,11 @@ function nextjsAdapter(input, options) {
|
|
|
229
233
|
"background: var(--surface-page, var(--surface-background));"
|
|
230
234
|
])
|
|
231
235
|
);
|
|
236
|
+
if (input.config.corners === "squircle") {
|
|
237
|
+
baseLines.push("");
|
|
238
|
+
baseLines.push(sectionComment("Base: corner shape"));
|
|
239
|
+
baseLines.push(CORNER_SHAPE_BINDING);
|
|
240
|
+
}
|
|
232
241
|
lines.push(wrapInLayer("visor-base", baseLines.join("\n").trim()));
|
|
233
242
|
lines.push("");
|
|
234
243
|
}
|
|
@@ -573,7 +582,8 @@ function generateRadiusDecls(config) {
|
|
|
573
582
|
`--radius-xl: ${config.radius.xl / 16}rem; /* ${config.radius.xl}px */`,
|
|
574
583
|
`--radius-2xl: ${config.radius.xl * 1.333 / 16}rem; /* ${Math.round(config.radius.xl * 1.333)}px */`,
|
|
575
584
|
`--radius-3xl: ${config.radius.xl * 2 / 16}rem; /* ${config.radius.xl * 2}px */`,
|
|
576
|
-
`--radius-full: ${config.radius.pill}px
|
|
585
|
+
`--radius-full: ${config.radius.pill}px;`,
|
|
586
|
+
...generateCornerShapeDecls(config)
|
|
577
587
|
];
|
|
578
588
|
}
|
|
579
589
|
function generateTypographyDecls(config, aliases) {
|
|
@@ -628,9 +638,10 @@ function generateMotionDecls(config) {
|
|
|
628
638
|
`--motion-duration-500: ${config.motion["duration-slow"]};`,
|
|
629
639
|
"--motion-duration-800: 800ms;",
|
|
630
640
|
"--motion-duration-1500: 1500ms;",
|
|
641
|
+
...generateOptInMotionDurationDecls(config),
|
|
631
642
|
"--motion-easing-linear: linear;",
|
|
632
643
|
"--motion-easing-ease-in: cubic-bezier(0.4, 0, 1, 1);",
|
|
633
|
-
|
|
644
|
+
`--motion-easing-ease-out: ${config.motion["easing-out"] ?? DEFAULT_EASING_OUT};`,
|
|
634
645
|
`--motion-easing-ease-in-out: ${config.motion.easing};`,
|
|
635
646
|
"--motion-easing-spring: cubic-bezier(0.34, 1.56, 0.64, 1);"
|
|
636
647
|
];
|
|
@@ -960,7 +971,9 @@ ${inner.split("\n").map((l) => ` ${l}`).join("\n")}
|
|
|
960
971
|
const brandLayerBody = [brandResult.css, passthroughCss].filter(Boolean).join("\n\n");
|
|
961
972
|
const brandLayer = wrapInLayer("visor-brand", brandLayerBody);
|
|
962
973
|
const head = fontLines.length > 0 ? fontLines.join("\n") + "\n" : "";
|
|
963
|
-
const
|
|
974
|
+
const baseLayer = input.config.corners === "squircle" ? wrapInLayer("visor-base", `${sectionComment2("Base: corner shape")}
|
|
975
|
+
${CORNER_SHAPE_BINDING}`) : "";
|
|
976
|
+
const layerBlocks = [baseLayer, semanticLayer, brandLayer, adaptiveLayer].filter(Boolean);
|
|
964
977
|
return head + LAYER_ORDER + "\n\n" + layerBlocks.join("\n\n") + "\n";
|
|
965
978
|
}
|
|
966
979
|
|
|
@@ -1286,6 +1286,7 @@ var ADMIN_SHELL = "blocks/admin-shell/admin-shell.module.css";
|
|
|
1286
1286
|
var BILLING_SLIDER = "components/ui/billing-slider/billing-slider.module.css";
|
|
1287
1287
|
var RESIZABLE_SPLIT = "components/ui/resizable-split/resizable-split.module.css";
|
|
1288
1288
|
var DIALOG = "components/ui/dialog/dialog.module.css";
|
|
1289
|
+
var STAT_CARD = "components/ui/stat-card/stat-card.module.css";
|
|
1289
1290
|
function at(file, fallback) {
|
|
1290
1291
|
return [{ file, fallback }];
|
|
1291
1292
|
}
|
|
@@ -1670,6 +1671,24 @@ var dialogFamily = {
|
|
|
1670
1671
|
{ key: "overlay-blur", property: "backdrop-filter: blur()", description: "How much the scrim blurs the page, a length.", consumers: [{ file: DIALOG, fallback: "4px" }, { file: DIALOG, fallback: "2px" }] }
|
|
1671
1672
|
]
|
|
1672
1673
|
};
|
|
1674
|
+
var glassFamily = {
|
|
1675
|
+
family: "glass",
|
|
1676
|
+
prefix: "glass",
|
|
1677
|
+
description: 'The glass layer over a photo: surface fill, blur, edge, lift, shadow and on-photo ink, plus the glass values controls read. Draws only inside `data-glass="on"`; elsewhere components keep their solid surface and border.',
|
|
1678
|
+
tokens: [
|
|
1679
|
+
{ key: "fill", property: "background", description: "Glass surface fill, see-through.", consumers: [], recommended: "color-mix(in srgb, var(--text-primary) 5%, transparent)" },
|
|
1680
|
+
{ key: "blur", property: "backdrop-filter", description: "Filter on the photo behind a glass surface.", consumers: [], recommended: "blur(32px) saturate(110%)" },
|
|
1681
|
+
{ key: "edge", property: "border-color", description: "Edge colour, drawn with `mix-blend-mode: soft-light`.", consumers: [], recommended: "color-mix(in srgb, var(--text-primary) 25%, transparent)" },
|
|
1682
|
+
{ key: "lift", property: "background", description: "White lift laid over the fill, e.g. `rgb(255 255 255 / 0.45)` in light.", consumers: [], recommended: "transparent" },
|
|
1683
|
+
{ key: "shadow", property: "box-shadow", description: "Glass surface shadow.", consumers: [], recommended: "var(--shadow-xl)" },
|
|
1684
|
+
{ key: "ink", property: "color", description: "Text colour on glass over a photo.", consumers: [], recommended: "var(--text-primary)" },
|
|
1685
|
+
{ key: "control-fill", property: "background", description: "Glass control fill (icon buttons, toggles).", consumers: [], recommended: "color-mix(in srgb, var(--text-primary) 14%, transparent)" },
|
|
1686
|
+
{ key: "control-hover-fill", property: "background", description: "Glass control fill on hover.", consumers: [], recommended: "color-mix(in srgb, var(--text-primary) 24%, transparent)" },
|
|
1687
|
+
{ key: "control-ring", property: "box-shadow (inset ring)", description: "Glass control ring colour.", consumers: [], recommended: "color-mix(in srgb, var(--text-primary) 16%, transparent)" },
|
|
1688
|
+
{ key: "control-ink", property: "color", description: "Glass control icon and label colour.", consumers: [], recommended: "var(--text-primary)" },
|
|
1689
|
+
{ key: "control-blur", property: "backdrop-filter", description: "Filter on the photo behind a glass control.", consumers: [], recommended: "blur(16px)" }
|
|
1690
|
+
]
|
|
1691
|
+
};
|
|
1673
1692
|
var tabsFamily = {
|
|
1674
1693
|
family: "tabs",
|
|
1675
1694
|
prefix: "tabs",
|
|
@@ -2503,6 +2522,32 @@ var layerChartFamily = {
|
|
|
2503
2522
|
{ key: "ground", property: "background (mixes)", description: "The ground blocks are mixed toward (covered, today, the palest layer) and the span lanes' track.", consumers: at(LAYER_CHART, "var(--surface-page, #ffffff)") }
|
|
2504
2523
|
]
|
|
2505
2524
|
};
|
|
2525
|
+
var statCardFamily = {
|
|
2526
|
+
family: "stat-card",
|
|
2527
|
+
prefix: "stat-card",
|
|
2528
|
+
description: "StatCard \u2014 the card's edge, corners, elevation and inset, the rule above the footer, and the label, value and footer type.",
|
|
2529
|
+
tokens: [
|
|
2530
|
+
{ key: "border", property: "border", description: "Card edge \u2014 `0` draws a borderless card.", consumers: at(STAT_CARD, "1px solid var(--border-default, #e5e7eb)") },
|
|
2531
|
+
{ key: "radius", property: "border-radius", description: "Card corner rounding.", consumers: at(STAT_CARD, "var(--radius-lg, 0.75rem)") },
|
|
2532
|
+
{ key: "shadow", property: "box-shadow", description: "Card elevation.", consumers: at(STAT_CARD, "var(--shadow-xs, 0 1px 2px 0 rgb(0 0 0 / 0.05))") },
|
|
2533
|
+
{ key: "padding", property: "padding", description: "Card inset.", consumers: at(STAT_CARD, "var(--spacing-5, 1.25rem)") },
|
|
2534
|
+
{ key: "footer-border", property: "border-top", description: "Rule above the footer \u2014 `0` drops it.", consumers: at(STAT_CARD, "1px solid var(--border-default, #e5e7eb)") },
|
|
2535
|
+
{ key: "footer-font-size", property: "font-size", description: "Footer type size.", consumers: at(STAT_CARD, "var(--font-size-sm, 0.875rem)") },
|
|
2536
|
+
{ key: "footer-font-weight", property: "font-weight", description: "Footer weight.", consumers: at(STAT_CARD, "inherit") },
|
|
2537
|
+
{ key: "footer-line-height", property: "line-height", description: "Footer line height.", consumers: at(STAT_CARD, "var(--line-height-normal, 1.5)") },
|
|
2538
|
+
{ key: "footer-color", property: "color", description: "Footer colour.", consumers: at(STAT_CARD, "var(--text-secondary, #6b7280)") },
|
|
2539
|
+
{ key: "value-font-family", property: "font-family", description: "Value family.", consumers: at(STAT_CARD, "var(--font-family-heading, inherit)") },
|
|
2540
|
+
{ key: "value-font-size", property: "font-size", description: "Value type size.", consumers: at(STAT_CARD, "var(--font-size-3xl, 1.875rem)") },
|
|
2541
|
+
{ key: "value-font-weight", property: "font-weight", description: "Value weight.", consumers: at(STAT_CARD, "var(--font-weight-semibold, 600)") },
|
|
2542
|
+
{ key: "value-line-height", property: "line-height", description: "Value line height.", consumers: at(STAT_CARD, "var(--line-height-tight, 1.1)") },
|
|
2543
|
+
{ key: "value-letter-spacing", property: "letter-spacing", description: "Value tracking.", consumers: at(STAT_CARD, "var(--letter-spacing-tight, -0.02em)") },
|
|
2544
|
+
{ key: "label-font-size", property: "font-size", description: "Label type size.", consumers: at(STAT_CARD, "var(--font-size-xs, 0.75rem)") },
|
|
2545
|
+
{ key: "label-font-weight", property: "font-weight", description: "Label weight.", consumers: at(STAT_CARD, "var(--font-weight-semibold, 600)") },
|
|
2546
|
+
{ key: "label-line-height", property: "line-height", description: "Label line height.", consumers: at(STAT_CARD, "var(--line-height-tight, 1.25)") },
|
|
2547
|
+
{ key: "label-letter-spacing", property: "letter-spacing", description: "Label tracking.", consumers: at(STAT_CARD, "var(--letter-spacing-wide, 0.05em)") },
|
|
2548
|
+
{ key: "label-color", property: "color", description: "Label colour.", consumers: at(STAT_CARD, "var(--text-tertiary, #6b7280)") }
|
|
2549
|
+
]
|
|
2550
|
+
};
|
|
2506
2551
|
var COMPONENT_TOKEN_FAMILIES = [
|
|
2507
2552
|
tableFamily,
|
|
2508
2553
|
dataTableFamily,
|
|
@@ -2518,6 +2563,7 @@ var COMPONENT_TOKEN_FAMILIES = [
|
|
|
2518
2563
|
billingSliderFamily,
|
|
2519
2564
|
resizableSplitFamily,
|
|
2520
2565
|
dialogFamily,
|
|
2566
|
+
glassFamily,
|
|
2521
2567
|
tabsFamily,
|
|
2522
2568
|
skeletonFamily,
|
|
2523
2569
|
spinnerFamily,
|
|
@@ -2543,6 +2589,7 @@ var COMPONENT_TOKEN_FAMILIES = [
|
|
|
2543
2589
|
separatorFamily,
|
|
2544
2590
|
alertFamily,
|
|
2545
2591
|
layerChartFamily,
|
|
2592
|
+
statCardFamily,
|
|
2546
2593
|
adminUiFamily
|
|
2547
2594
|
];
|
|
2548
2595
|
var COMPONENT_TOKEN_FAMILY_BY_NAME = new Map(
|
|
@@ -2942,6 +2989,34 @@ function generateFontWeightDecls(typography) {
|
|
|
2942
2989
|
return decls;
|
|
2943
2990
|
}
|
|
2944
2991
|
|
|
2992
|
+
// src/types.ts
|
|
2993
|
+
var OPT_IN_MOTION_DURATION_KEYS = [
|
|
2994
|
+
"duration-enter",
|
|
2995
|
+
"duration-exit",
|
|
2996
|
+
"duration-page",
|
|
2997
|
+
"duration-stagger",
|
|
2998
|
+
"duration-enter-delay"
|
|
2999
|
+
];
|
|
3000
|
+
var TEXT_TRANSFORMS = ["none", "uppercase", "lowercase", "capitalize"];
|
|
3001
|
+
var MATERIAL_TEXT_SLOTS = [
|
|
3002
|
+
"displayLarge",
|
|
3003
|
+
"displayMedium",
|
|
3004
|
+
"displaySmall",
|
|
3005
|
+
"headlineLarge",
|
|
3006
|
+
"headlineMedium",
|
|
3007
|
+
"headlineSmall",
|
|
3008
|
+
"titleLarge",
|
|
3009
|
+
"titleMedium",
|
|
3010
|
+
"titleSmall",
|
|
3011
|
+
"bodyLarge",
|
|
3012
|
+
"bodyMedium",
|
|
3013
|
+
"bodySmall",
|
|
3014
|
+
"labelLarge",
|
|
3015
|
+
"labelMedium",
|
|
3016
|
+
"labelSmall",
|
|
3017
|
+
"labelXSmall"
|
|
3018
|
+
];
|
|
3019
|
+
|
|
2945
3020
|
// src/fonts/theme-alias.ts
|
|
2946
3021
|
var EMPTY_ALIASES = /* @__PURE__ */ new Map();
|
|
2947
3022
|
function aliasFamily(family, themeSlug) {
|
|
@@ -3027,8 +3102,19 @@ function generateRadiusPrimitives(config) {
|
|
|
3027
3102
|
`--radius-3xl: ${config.radius.xl * 2 / 16}rem; /* ${config.radius.xl * 2}px */`
|
|
3028
3103
|
);
|
|
3029
3104
|
decls.push(`--radius-full: ${config.radius.pill}px;`);
|
|
3105
|
+
decls.push(...generateCornerShapeDecls(config));
|
|
3030
3106
|
return decls;
|
|
3031
3107
|
}
|
|
3108
|
+
function generateCornerShapeDecls(config) {
|
|
3109
|
+
return config.corners === "squircle" ? ["--corner-shape: squircle;"] : [];
|
|
3110
|
+
}
|
|
3111
|
+
var CORNER_SHAPE_BINDING = "*, *::before, *::after {\n corner-shape: var(--corner-shape);\n}";
|
|
3112
|
+
var DEFAULT_EASING_OUT = "cubic-bezier(0, 0, 0.2, 1)";
|
|
3113
|
+
function generateOptInMotionDurationDecls(config) {
|
|
3114
|
+
return OPT_IN_MOTION_DURATION_KEYS.filter((key) => config.motion[key] !== void 0).map(
|
|
3115
|
+
(key) => `--motion-${key}: ${config.motion[key]};`
|
|
3116
|
+
);
|
|
3117
|
+
}
|
|
3032
3118
|
function generateShadowPrimitives(config) {
|
|
3033
3119
|
return [
|
|
3034
3120
|
`--shadow-xs: ${config.shadows.xs};`,
|
|
@@ -3096,9 +3182,10 @@ function generateMotionPrimitives(config) {
|
|
|
3096
3182
|
decls.push(`--motion-duration-500: ${config.motion["duration-slow"]};`);
|
|
3097
3183
|
decls.push("--motion-duration-800: 800ms;");
|
|
3098
3184
|
decls.push("--motion-duration-1500: 1500ms;");
|
|
3185
|
+
decls.push(...generateOptInMotionDurationDecls(config));
|
|
3099
3186
|
decls.push("--motion-easing-linear: linear;");
|
|
3100
3187
|
decls.push("--motion-easing-ease-in: cubic-bezier(0.4, 0, 1, 1);");
|
|
3101
|
-
decls.push(
|
|
3188
|
+
decls.push(`--motion-easing-ease-out: ${config.motion["easing-out"] ?? DEFAULT_EASING_OUT};`);
|
|
3102
3189
|
decls.push(`--motion-easing-ease-in-out: ${config.motion.easing};`);
|
|
3103
3190
|
decls.push(
|
|
3104
3191
|
"--motion-easing-spring: cubic-bezier(0.34, 1.56, 0.64, 1);"
|
|
@@ -3525,27 +3612,6 @@ function generateSemanticAliasDecls(declared, options = {}) {
|
|
|
3525
3612
|
return decls;
|
|
3526
3613
|
}
|
|
3527
3614
|
|
|
3528
|
-
// src/types.ts
|
|
3529
|
-
var TEXT_TRANSFORMS = ["none", "uppercase", "lowercase", "capitalize"];
|
|
3530
|
-
var MATERIAL_TEXT_SLOTS = [
|
|
3531
|
-
"displayLarge",
|
|
3532
|
-
"displayMedium",
|
|
3533
|
-
"displaySmall",
|
|
3534
|
-
"headlineLarge",
|
|
3535
|
-
"headlineMedium",
|
|
3536
|
-
"headlineSmall",
|
|
3537
|
-
"titleLarge",
|
|
3538
|
-
"titleMedium",
|
|
3539
|
-
"titleSmall",
|
|
3540
|
-
"bodyLarge",
|
|
3541
|
-
"bodyMedium",
|
|
3542
|
-
"bodySmall",
|
|
3543
|
-
"labelLarge",
|
|
3544
|
-
"labelMedium",
|
|
3545
|
-
"labelSmall",
|
|
3546
|
-
"labelXSmall"
|
|
3547
|
-
];
|
|
3548
|
-
|
|
3549
3615
|
export {
|
|
3550
3616
|
googleFontsCatalog,
|
|
3551
3617
|
lookupGoogleFont,
|
|
@@ -3583,6 +3649,7 @@ export {
|
|
|
3583
3649
|
isValidColor,
|
|
3584
3650
|
compositeOverBackground,
|
|
3585
3651
|
serializeColor,
|
|
3652
|
+
OPT_IN_MOTION_DURATION_KEYS,
|
|
3586
3653
|
TEXT_TRANSFORMS,
|
|
3587
3654
|
MATERIAL_TEXT_SLOTS,
|
|
3588
3655
|
componentTokenName,
|
|
@@ -3613,6 +3680,10 @@ export {
|
|
|
3613
3680
|
header,
|
|
3614
3681
|
sectionComment,
|
|
3615
3682
|
block2 as block,
|
|
3683
|
+
generateCornerShapeDecls,
|
|
3684
|
+
CORNER_SHAPE_BINDING,
|
|
3685
|
+
DEFAULT_EASING_OUT,
|
|
3686
|
+
generateOptInMotionDurationDecls,
|
|
3616
3687
|
generateFontSizeDecls,
|
|
3617
3688
|
generateFontTextTransformDecls,
|
|
3618
3689
|
generatePrimitivesCss,
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as FontResolveOptions, a as FontResolution, V as VisorTypography, b as FontDisplayStrategy, T as ThemeFontResult, G as GoogleFontEntry, c as VisorBrand, B as BrandSlot, d as BrandSource, e as BrandResolution, C as ColorScheme, f as ThemeBrandResult, g as BrandStrategy, h as BrandStrategyContext, i as BrandStrategyIssue, j as BrandStrategyValidationResult, S as SerializedBrandStrategy, R as ResolvedThemeConfig, k as GeneratedPrimitives, l as ThemeOutput, m as ThemeData, n as VisorThemeConfig, o as FullShadeScale, p as ColorRole, q as SelectiveShadeScale, r as RGB, P as ParsedColor, O as OKLCH, s as SemanticTokens, t as ShadeStep } from './types-
|
|
2
|
-
export { u as BRAND_VARIANTS, v as BRAND_VISIBILITIES, w as BrandAccessibility, x as BrandArchetype, y as BrandBoilerplate, z as BrandColorPairing, A as BrandColorUsage, D as BrandContrastTarget, E as BrandGoverns, H as BrandLexiconEntry, I as BrandMessaging, J as BrandPersonalityTrait, K as BrandPillar, L as BrandPositioning, M as BrandStrategyIssueSeverity, N as BrandToneEntry, Q as BrandVariant, U as BrandVisibility, W as BrandVoice, X as BrandVoiceTrait, Y as COMPONENT_TOKEN_FAMILIES, Z as COMPONENT_TOKEN_FAMILY_BY_NAME, _ as ColorFormat, $ as ComponentTokenBinding, a0 as ComponentTokenBindings, a1 as ComponentTokenConsumer, a2 as ComponentTokenFamily, a3 as ComponentTokenSpec, a4 as DEFAULT_BRAND_STRATEGY_SURFACES, a5 as DEFAULT_BRAND_STRATEGY_TONE_STATES, a6 as FontSource, a7 as GOVERNS_WILDCARD, a8 as RGBA, a9 as ResolvedComponentTokens, aa as SemanticTokenValue, ab as allComponentTokenNames, ac as componentTokenName, ad as hasComponentBindings, ae as resolveComponentBindings, af as validateComponentBindings } from './types-
|
|
1
|
+
import { F as FontResolveOptions, a as FontResolution, V as VisorTypography, b as FontDisplayStrategy, T as ThemeFontResult, G as GoogleFontEntry, c as VisorBrand, B as BrandSlot, d as BrandSource, e as BrandResolution, C as ColorScheme, f as ThemeBrandResult, g as BrandStrategy, h as BrandStrategyContext, i as BrandStrategyIssue, j as BrandStrategyValidationResult, S as SerializedBrandStrategy, R as ResolvedThemeConfig, k as GeneratedPrimitives, l as ThemeOutput, m as ThemeData, n as VisorThemeConfig, o as FullShadeScale, p as ColorRole, q as SelectiveShadeScale, r as RGB, P as ParsedColor, O as OKLCH, s as SemanticTokens, t as ShadeStep } from './types-PXhSooKd.js';
|
|
2
|
+
export { u as BRAND_VARIANTS, v as BRAND_VISIBILITIES, w as BrandAccessibility, x as BrandArchetype, y as BrandBoilerplate, z as BrandColorPairing, A as BrandColorUsage, D as BrandContrastTarget, E as BrandGoverns, H as BrandLexiconEntry, I as BrandMessaging, J as BrandPersonalityTrait, K as BrandPillar, L as BrandPositioning, M as BrandStrategyIssueSeverity, N as BrandToneEntry, Q as BrandVariant, U as BrandVisibility, W as BrandVoice, X as BrandVoiceTrait, Y as COMPONENT_TOKEN_FAMILIES, Z as COMPONENT_TOKEN_FAMILY_BY_NAME, _ as ColorFormat, $ as ComponentTokenBinding, a0 as ComponentTokenBindings, a1 as ComponentTokenConsumer, a2 as ComponentTokenFamily, a3 as ComponentTokenSpec, a4 as DEFAULT_BRAND_STRATEGY_SURFACES, a5 as DEFAULT_BRAND_STRATEGY_TONE_STATES, a6 as FontSource, a7 as GOVERNS_WILDCARD, a8 as RGBA, a9 as ResolvedComponentTokens, aa as SemanticTokenValue, ab as allComponentTokenNames, ac as componentTokenName, ad as hasComponentBindings, ae as resolveComponentBindings, af as validateComponentBindings } from './types-PXhSooKd.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Font resolver — maps font family names to loadable font resources.
|
|
@@ -416,6 +416,14 @@ var properties = {
|
|
|
416
416
|
],
|
|
417
417
|
description: "The one switch for hairlines (VI-680). 'off' sets --hairline-width to 0, so every hairline rule, divider and ring disappears. Shorthand for components.hairline.width: \"0\" (an explicit binding there wins). Independent of 'edges'. Defaults to 'on'. Optional."
|
|
418
418
|
},
|
|
419
|
+
corners: {
|
|
420
|
+
type: "string",
|
|
421
|
+
"enum": [
|
|
422
|
+
"round",
|
|
423
|
+
"squircle"
|
|
424
|
+
],
|
|
425
|
+
description: "The one switch for corner shape (VI-796). 'squircle' emits --corner-shape: squircle and binds corner-shape to every element, so each border-radius draws as a squircle; browsers without corner-shape draw round. Set --corner-shape: round on any ancestor to keep a part round. Defaults to 'round' (nothing emitted). Optional."
|
|
426
|
+
},
|
|
419
427
|
colors: {
|
|
420
428
|
type: "object",
|
|
421
429
|
description: "Color definitions for light mode. Only primary is required — all others have sensible defaults.",
|
|
@@ -1062,6 +1070,35 @@ var properties = {
|
|
|
1062
1070
|
easing: {
|
|
1063
1071
|
type: "string",
|
|
1064
1072
|
description: "Default easing curve as a CSS timing function."
|
|
1073
|
+
},
|
|
1074
|
+
"easing-out": {
|
|
1075
|
+
type: "string",
|
|
1076
|
+
description: "Out curve as a CSS timing function (VI-796). Emits --motion-easing-ease-out, which --motion-easing-enter reads. Default: cubic-bezier(0, 0, 0.2, 1)."
|
|
1077
|
+
},
|
|
1078
|
+
"duration-enter": {
|
|
1079
|
+
type: "string",
|
|
1080
|
+
pattern: "^\\d+ms$",
|
|
1081
|
+
description: "Opt-in duration for entrances (VI-796). Emits --motion-duration-enter only when set. No default."
|
|
1082
|
+
},
|
|
1083
|
+
"duration-exit": {
|
|
1084
|
+
type: "string",
|
|
1085
|
+
pattern: "^\\d+ms$",
|
|
1086
|
+
description: "Opt-in duration for exits (VI-796). Emits --motion-duration-exit only when set. No default."
|
|
1087
|
+
},
|
|
1088
|
+
"duration-page": {
|
|
1089
|
+
type: "string",
|
|
1090
|
+
pattern: "^\\d+ms$",
|
|
1091
|
+
description: "Opt-in duration for page transitions (VI-796). Emits --motion-duration-page only when set. No default."
|
|
1092
|
+
},
|
|
1093
|
+
"duration-stagger": {
|
|
1094
|
+
type: "string",
|
|
1095
|
+
pattern: "^\\d+ms$",
|
|
1096
|
+
description: "Opt-in duration for the gap between staggered items (VI-796). Emits --motion-duration-stagger only when set. No default."
|
|
1097
|
+
},
|
|
1098
|
+
"duration-enter-delay": {
|
|
1099
|
+
type: "string",
|
|
1100
|
+
pattern: "^\\d+ms$",
|
|
1101
|
+
description: "Opt-in duration for the delay before an entrance starts (VI-796). Emits --motion-duration-enter-delay only when set. No default."
|
|
1065
1102
|
}
|
|
1066
1103
|
}
|
|
1067
1104
|
},
|
|
@@ -1189,6 +1226,13 @@ var properties = {
|
|
|
1189
1226
|
$ref: "#/$defs/componentTokenBinding"
|
|
1190
1227
|
}
|
|
1191
1228
|
},
|
|
1229
|
+
glass: {
|
|
1230
|
+
type: "object",
|
|
1231
|
+
description: "The glass layer over a photo: surface fill, blur, edge, lift, shadow and on-photo ink, plus the glass values controls read. Draws only inside `data-glass=\"on\"`; elsewhere components keep their solid surface and border. Keys: fill, blur, edge, lift, shadow, ink, control-fill, control-hover-fill, control-ring, control-ink, control-blur.",
|
|
1232
|
+
additionalProperties: {
|
|
1233
|
+
$ref: "#/$defs/componentTokenBinding"
|
|
1234
|
+
}
|
|
1235
|
+
},
|
|
1192
1236
|
tabs: {
|
|
1193
1237
|
type: "object",
|
|
1194
1238
|
description: "Tab rail and trigger treatment, for both the segmented (`default`) and underlined (`line`) variants. Keys: list-radius, list-height, list-padding, list-color, list-bg, line-border-bottom, trigger-radius, trigger-padding, trigger-font-size, trigger-font-weight, trigger-letter-spacing, trigger-text-transform, trigger-color, trigger-active-bg, trigger-active-color, trigger-active-shadow, indicator-height, indicator-color.",
|
|
@@ -1231,6 +1275,13 @@ var properties = {
|
|
|
1231
1275
|
$ref: "#/$defs/componentTokenBinding"
|
|
1232
1276
|
}
|
|
1233
1277
|
},
|
|
1278
|
+
"stat-card": {
|
|
1279
|
+
type: "object",
|
|
1280
|
+
description: "StatCard — the card's edge, corners, elevation and inset, the rule above the footer, and the label, value and footer type. Keys: border, radius, shadow, padding, footer-border, footer-font-size, footer-font-weight, footer-line-height, footer-color, value-font-family, value-font-size, value-font-weight, value-line-height, value-letter-spacing, label-font-size, label-font-weight, label-line-height, label-letter-spacing, label-color.",
|
|
1281
|
+
additionalProperties: {
|
|
1282
|
+
$ref: "#/$defs/componentTokenBinding"
|
|
1283
|
+
}
|
|
1284
|
+
},
|
|
1234
1285
|
textarea: {
|
|
1235
1286
|
type: "object",
|
|
1236
1287
|
description: "Textarea shape at the default `md` size. Keys: padding, radius.",
|
package/dist/index.js
CHANGED
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
FONT_WEIGHT_ALIASES,
|
|
8
8
|
MATERIAL_TEXT_SLOTS,
|
|
9
9
|
MODE_DEPENDENT_SEMANTIC_ALIASES,
|
|
10
|
+
OPT_IN_MOTION_DURATION_KEYS,
|
|
10
11
|
TAILWIND_GRAY,
|
|
11
12
|
TEXT_TRANSFORMS,
|
|
12
13
|
VISOR_BRANDS_CDN,
|
|
@@ -68,7 +69,7 @@ import {
|
|
|
68
69
|
rgbToOklch,
|
|
69
70
|
serializeColor,
|
|
70
71
|
validateComponentBindings
|
|
71
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-C6RLV7WM.js";
|
|
72
73
|
|
|
73
74
|
// src/fonts/validate-coverage.ts
|
|
74
75
|
var FONT_VAR_RE = /--font-(heading|display|body|sans|mono)\s*:\s*([^;]+);/g;
|
|
@@ -665,6 +666,11 @@ var visor_theme_schema_default = {
|
|
|
665
666
|
enum: ["on", "off"],
|
|
666
667
|
description: `The one switch for hairlines (VI-680). 'off' sets --hairline-width to 0, so every hairline rule, divider and ring disappears. Shorthand for components.hairline.width: "0" (an explicit binding there wins). Independent of 'edges'. Defaults to 'on'. Optional.`
|
|
667
668
|
},
|
|
669
|
+
corners: {
|
|
670
|
+
type: "string",
|
|
671
|
+
enum: ["round", "squircle"],
|
|
672
|
+
description: "The one switch for corner shape (VI-796). 'squircle' emits --corner-shape: squircle and binds corner-shape to every element, so each border-radius draws as a squircle; browsers without corner-shape draw round. Set --corner-shape: round on any ancestor to keep a part round. Defaults to 'round' (nothing emitted). Optional."
|
|
673
|
+
},
|
|
668
674
|
colors: {
|
|
669
675
|
type: "object",
|
|
670
676
|
description: "Color definitions for light mode. Only primary is required \u2014 all others have sensible defaults.",
|
|
@@ -1087,6 +1093,35 @@ var visor_theme_schema_default = {
|
|
|
1087
1093
|
easing: {
|
|
1088
1094
|
type: "string",
|
|
1089
1095
|
description: "Default easing curve as a CSS timing function."
|
|
1096
|
+
},
|
|
1097
|
+
"easing-out": {
|
|
1098
|
+
type: "string",
|
|
1099
|
+
description: "Out curve as a CSS timing function (VI-796). Emits --motion-easing-ease-out, which --motion-easing-enter reads. Default: cubic-bezier(0, 0, 0.2, 1)."
|
|
1100
|
+
},
|
|
1101
|
+
"duration-enter": {
|
|
1102
|
+
type: "string",
|
|
1103
|
+
pattern: "^\\d+ms$",
|
|
1104
|
+
description: "Opt-in duration for entrances (VI-796). Emits --motion-duration-enter only when set. No default."
|
|
1105
|
+
},
|
|
1106
|
+
"duration-exit": {
|
|
1107
|
+
type: "string",
|
|
1108
|
+
pattern: "^\\d+ms$",
|
|
1109
|
+
description: "Opt-in duration for exits (VI-796). Emits --motion-duration-exit only when set. No default."
|
|
1110
|
+
},
|
|
1111
|
+
"duration-page": {
|
|
1112
|
+
type: "string",
|
|
1113
|
+
pattern: "^\\d+ms$",
|
|
1114
|
+
description: "Opt-in duration for page transitions (VI-796). Emits --motion-duration-page only when set. No default."
|
|
1115
|
+
},
|
|
1116
|
+
"duration-stagger": {
|
|
1117
|
+
type: "string",
|
|
1118
|
+
pattern: "^\\d+ms$",
|
|
1119
|
+
description: "Opt-in duration for the gap between staggered items (VI-796). Emits --motion-duration-stagger only when set. No default."
|
|
1120
|
+
},
|
|
1121
|
+
"duration-enter-delay": {
|
|
1122
|
+
type: "string",
|
|
1123
|
+
pattern: "^\\d+ms$",
|
|
1124
|
+
description: "Opt-in duration for the delay before an entrance starts (VI-796). Emits --motion-duration-enter-delay only when set. No default."
|
|
1090
1125
|
}
|
|
1091
1126
|
}
|
|
1092
1127
|
},
|
|
@@ -1210,6 +1245,13 @@ var visor_theme_schema_default = {
|
|
|
1210
1245
|
$ref: "#/$defs/componentTokenBinding"
|
|
1211
1246
|
}
|
|
1212
1247
|
},
|
|
1248
|
+
glass: {
|
|
1249
|
+
type: "object",
|
|
1250
|
+
description: 'The glass layer over a photo: surface fill, blur, edge, lift, shadow and on-photo ink, plus the glass values controls read. Draws only inside `data-glass="on"`; elsewhere components keep their solid surface and border. Keys: fill, blur, edge, lift, shadow, ink, control-fill, control-hover-fill, control-ring, control-ink, control-blur.',
|
|
1251
|
+
additionalProperties: {
|
|
1252
|
+
$ref: "#/$defs/componentTokenBinding"
|
|
1253
|
+
}
|
|
1254
|
+
},
|
|
1213
1255
|
tabs: {
|
|
1214
1256
|
type: "object",
|
|
1215
1257
|
description: "Tab rail and trigger treatment, for both the segmented (`default`) and underlined (`line`) variants. Keys: list-radius, list-height, list-padding, list-color, list-bg, line-border-bottom, trigger-radius, trigger-padding, trigger-font-size, trigger-font-weight, trigger-letter-spacing, trigger-text-transform, trigger-color, trigger-active-bg, trigger-active-color, trigger-active-shadow, indicator-height, indicator-color.",
|
|
@@ -1252,6 +1294,13 @@ var visor_theme_schema_default = {
|
|
|
1252
1294
|
$ref: "#/$defs/componentTokenBinding"
|
|
1253
1295
|
}
|
|
1254
1296
|
},
|
|
1297
|
+
"stat-card": {
|
|
1298
|
+
type: "object",
|
|
1299
|
+
description: "StatCard \u2014 the card's edge, corners, elevation and inset, the rule above the footer, and the label, value and footer type. Keys: border, radius, shadow, padding, footer-border, footer-font-size, footer-font-weight, footer-line-height, footer-color, value-font-family, value-font-size, value-font-weight, value-line-height, value-letter-spacing, label-font-size, label-font-weight, label-line-height, label-letter-spacing, label-color.",
|
|
1300
|
+
additionalProperties: {
|
|
1301
|
+
$ref: "#/$defs/componentTokenBinding"
|
|
1302
|
+
}
|
|
1303
|
+
},
|
|
1255
1304
|
textarea: {
|
|
1256
1305
|
type: "object",
|
|
1257
1306
|
description: "Textarea shape at the default `md` size. Keys: padding, radius.",
|
|
@@ -1678,7 +1727,8 @@ var KNOWN_TOP_LEVEL_KEYS = /* @__PURE__ */ new Set([
|
|
|
1678
1727
|
"overrides",
|
|
1679
1728
|
"components",
|
|
1680
1729
|
"edges",
|
|
1681
|
-
"hairlines"
|
|
1730
|
+
"hairlines",
|
|
1731
|
+
"corners"
|
|
1682
1732
|
]);
|
|
1683
1733
|
var KNOWN_COLOR_KEYS = /* @__PURE__ */ new Set([
|
|
1684
1734
|
"primary",
|
|
@@ -1725,7 +1775,15 @@ var KNOWN_SPACING_KEYS = /* @__PURE__ */ new Set(["base"]);
|
|
|
1725
1775
|
var KNOWN_RADIUS_KEYS = /* @__PURE__ */ new Set(["sm", "md", "lg", "xl", "pill"]);
|
|
1726
1776
|
var KNOWN_SHADOW_KEYS = /* @__PURE__ */ new Set(["xs", "sm", "md", "lg", "xl"]);
|
|
1727
1777
|
var KNOWN_STROKE_WIDTH_KEYS = /* @__PURE__ */ new Set(["thin", "regular", "medium", "thick"]);
|
|
1728
|
-
var KNOWN_MOTION_KEYS = /* @__PURE__ */ new Set([
|
|
1778
|
+
var KNOWN_MOTION_KEYS = /* @__PURE__ */ new Set([
|
|
1779
|
+
"duration-fast",
|
|
1780
|
+
"duration-normal",
|
|
1781
|
+
"duration-slow",
|
|
1782
|
+
"easing",
|
|
1783
|
+
"easing-overshoot",
|
|
1784
|
+
"easing-out",
|
|
1785
|
+
...OPT_IN_MOTION_DURATION_KEYS
|
|
1786
|
+
]);
|
|
1729
1787
|
var KNOWN_OVERRIDES_KEYS = /* @__PURE__ */ new Set(["light", "dark"]);
|
|
1730
1788
|
var KNOWN_BRAND_KEYS = /* @__PURE__ */ new Set([
|
|
1731
1789
|
"org",
|
|
@@ -1964,6 +2022,9 @@ function validateConfig(config) {
|
|
|
1964
2022
|
if (obj.hairlines !== void 0 && obj.hairlines !== "on" && obj.hairlines !== "off") {
|
|
1965
2023
|
errors.push("'hairlines' must be either 'on' or 'off'");
|
|
1966
2024
|
}
|
|
2025
|
+
if (obj.corners !== void 0 && obj.corners !== "round" && obj.corners !== "squircle") {
|
|
2026
|
+
errors.push("'corners' must be either 'round' or 'squircle'");
|
|
2027
|
+
}
|
|
1967
2028
|
if (typeof obj.colors !== "object" || obj.colors === null) {
|
|
1968
2029
|
errors.push("'colors' is required and must be an object");
|
|
1969
2030
|
return { valid: false, errors };
|
|
@@ -2006,7 +2067,7 @@ function validateConfig(config) {
|
|
|
2006
2067
|
}
|
|
2007
2068
|
if (obj.motion && typeof obj.motion === "object") {
|
|
2008
2069
|
const motion = obj.motion;
|
|
2009
|
-
for (const key of ["duration-fast", "duration-normal", "duration-slow"]) {
|
|
2070
|
+
for (const key of ["duration-fast", "duration-normal", "duration-slow", ...OPT_IN_MOTION_DURATION_KEYS]) {
|
|
2010
2071
|
if (motion[key] !== void 0) {
|
|
2011
2072
|
if (typeof motion[key] !== "string" || !/^\d+ms$/.test(motion[key])) {
|
|
2012
2073
|
errors.push(`'motion.${key}' must match pattern "Nms" (e.g., "200ms")`);
|
|
@@ -2350,8 +2411,16 @@ function resolveConfig(config) {
|
|
|
2350
2411
|
easing: config.motion?.easing ?? DEFAULTS.motion.easing,
|
|
2351
2412
|
// VI-451 (drive-by): pass through opt-in bouncy easing when set; absent
|
|
2352
2413
|
// themes leave this undefined and fall through to --motion-easing-spring.
|
|
2353
|
-
...config.motion?.["easing-overshoot"] !== void 0 ? { "easing-overshoot": config.motion["easing-overshoot"] } : {}
|
|
2414
|
+
...config.motion?.["easing-overshoot"] !== void 0 ? { "easing-overshoot": config.motion["easing-overshoot"] } : {},
|
|
2415
|
+
// VI-796: opt-in out curve and role durations, passed through only when set.
|
|
2416
|
+
...Object.fromEntries(
|
|
2417
|
+
["easing-out", ...OPT_IN_MOTION_DURATION_KEYS].filter((key) => config.motion?.[key] !== void 0).map((key) => [
|
|
2418
|
+
key,
|
|
2419
|
+
config.motion[key]
|
|
2420
|
+
])
|
|
2421
|
+
)
|
|
2354
2422
|
},
|
|
2423
|
+
...config.corners === "squircle" ? { corners: "squircle" } : {},
|
|
2355
2424
|
overrides: config.overrides,
|
|
2356
2425
|
// VI-625: component bindings pass through untouched — the contract in
|
|
2357
2426
|
// component-tokens.ts owns their shape, there is nothing to default.
|
|
@@ -3106,9 +3175,16 @@ function exportTheme(primitives, config) {
|
|
|
3106
3175
|
if (config.motion["easing-overshoot"] !== void 0) {
|
|
3107
3176
|
motion["easing-overshoot"] = config.motion["easing-overshoot"];
|
|
3108
3177
|
}
|
|
3178
|
+
for (const key of ["easing-out", ...OPT_IN_MOTION_DURATION_KEYS]) {
|
|
3179
|
+
const val = config.motion[key];
|
|
3180
|
+
if (val !== void 0) motion[key] = val;
|
|
3181
|
+
}
|
|
3109
3182
|
if (Object.keys(motion).length > 0) {
|
|
3110
3183
|
output.motion = motion;
|
|
3111
3184
|
}
|
|
3185
|
+
if (config.corners) {
|
|
3186
|
+
output.corners = config.corners;
|
|
3187
|
+
}
|
|
3112
3188
|
if (config.overrides) {
|
|
3113
3189
|
const overrides = {};
|
|
3114
3190
|
if (config.overrides.light && Object.keys(config.overrides.light).length > 0) {
|
|
@@ -819,6 +819,20 @@ interface VisorThemeConfig {
|
|
|
819
819
|
* when set; absent themes fall through to the default `--motion-easing-spring`.
|
|
820
820
|
*/
|
|
821
821
|
"easing-overshoot"?: string;
|
|
822
|
+
/**
|
|
823
|
+
* VI-796: the out curve, emitted as `--motion-easing-ease-out` (which the
|
|
824
|
+
* semantic `--motion-easing-enter` reads). Default: `cubic-bezier(0, 0, 0.2, 1)`.
|
|
825
|
+
*/
|
|
826
|
+
"easing-out"?: string;
|
|
827
|
+
/**
|
|
828
|
+
* VI-796: opt-in role durations (`Nms`). Each emits
|
|
829
|
+
* `--motion-duration-<role>` only when set, the way `easing-overshoot` does.
|
|
830
|
+
*/
|
|
831
|
+
"duration-enter"?: string;
|
|
832
|
+
"duration-exit"?: string;
|
|
833
|
+
"duration-page"?: string;
|
|
834
|
+
"duration-stagger"?: string;
|
|
835
|
+
"duration-enter-delay"?: string;
|
|
822
836
|
};
|
|
823
837
|
overrides?: {
|
|
824
838
|
light?: Record<string, string>;
|
|
@@ -850,6 +864,13 @@ interface VisorThemeConfig {
|
|
|
850
864
|
* neither switch touches the other's tokens. Default: `on`.
|
|
851
865
|
*/
|
|
852
866
|
hairlines?: "on" | "off";
|
|
867
|
+
/**
|
|
868
|
+
* VI-796: the one switch for corner shape. `squircle` emits
|
|
869
|
+
* `--corner-shape: squircle` and binds `corner-shape` to every element, so
|
|
870
|
+
* each `border-radius` draws as a squircle. Browsers without `corner-shape`
|
|
871
|
+
* drop the declaration and draw round. Default: `round` (nothing emitted).
|
|
872
|
+
*/
|
|
873
|
+
corners?: "round" | "squircle";
|
|
853
874
|
/**
|
|
854
875
|
* Migration metadata — optional, additive, consumed by `visor migrate` commands.
|
|
855
876
|
* Does not affect CSS generation or theme application.
|
|
@@ -1007,7 +1028,17 @@ interface ResolvedThemeConfig {
|
|
|
1007
1028
|
easing: string;
|
|
1008
1029
|
/** VI-451 (drive-by): opt-in bouncy easing for marker pops / scale-in entrances. */
|
|
1009
1030
|
"easing-overshoot"?: string;
|
|
1031
|
+
/** VI-796: opt-in out curve; emitters fall back to `cubic-bezier(0, 0, 0.2, 1)`. */
|
|
1032
|
+
"easing-out"?: string;
|
|
1033
|
+
/** VI-796: opt-in role durations, emitted only when set. */
|
|
1034
|
+
"duration-enter"?: string;
|
|
1035
|
+
"duration-exit"?: string;
|
|
1036
|
+
"duration-page"?: string;
|
|
1037
|
+
"duration-stagger"?: string;
|
|
1038
|
+
"duration-enter-delay"?: string;
|
|
1010
1039
|
};
|
|
1040
|
+
/** VI-796: present only when the theme sets `corners: squircle`. */
|
|
1041
|
+
corners?: "squircle";
|
|
1011
1042
|
overrides?: {
|
|
1012
1043
|
light?: Record<string, string>;
|
|
1013
1044
|
dark?: Record<string, string>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loworbitstudio/visor-theme-engine",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.42.0",
|
|
4
4
|
"description": "Theme engine for the Visor design system — shade generation, token mapping, font resolution, and import/export for .visor.yaml themes.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -44,6 +44,11 @@
|
|
|
44
44
|
"enum": ["on", "off"],
|
|
45
45
|
"description": "The one switch for hairlines (VI-680). 'off' sets --hairline-width to 0, so every hairline rule, divider and ring disappears. Shorthand for components.hairline.width: \"0\" (an explicit binding there wins). Independent of 'edges'. Defaults to 'on'. Optional."
|
|
46
46
|
},
|
|
47
|
+
"corners": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"enum": ["round", "squircle"],
|
|
50
|
+
"description": "The one switch for corner shape (VI-796). 'squircle' emits --corner-shape: squircle and binds corner-shape to every element, so each border-radius draws as a squircle; browsers without corner-shape draw round. Set --corner-shape: round on any ancestor to keep a part round. Defaults to 'round' (nothing emitted). Optional."
|
|
51
|
+
},
|
|
47
52
|
"colors": {
|
|
48
53
|
"type": "object",
|
|
49
54
|
"description": "Color definitions for light mode. Only primary is required — all others have sensible defaults.",
|
|
@@ -466,6 +471,35 @@
|
|
|
466
471
|
"easing": {
|
|
467
472
|
"type": "string",
|
|
468
473
|
"description": "Default easing curve as a CSS timing function."
|
|
474
|
+
},
|
|
475
|
+
"easing-out": {
|
|
476
|
+
"type": "string",
|
|
477
|
+
"description": "Out curve as a CSS timing function (VI-796). Emits --motion-easing-ease-out, which --motion-easing-enter reads. Default: cubic-bezier(0, 0, 0.2, 1)."
|
|
478
|
+
},
|
|
479
|
+
"duration-enter": {
|
|
480
|
+
"type": "string",
|
|
481
|
+
"pattern": "^\\d+ms$",
|
|
482
|
+
"description": "Opt-in duration for entrances (VI-796). Emits --motion-duration-enter only when set. No default."
|
|
483
|
+
},
|
|
484
|
+
"duration-exit": {
|
|
485
|
+
"type": "string",
|
|
486
|
+
"pattern": "^\\d+ms$",
|
|
487
|
+
"description": "Opt-in duration for exits (VI-796). Emits --motion-duration-exit only when set. No default."
|
|
488
|
+
},
|
|
489
|
+
"duration-page": {
|
|
490
|
+
"type": "string",
|
|
491
|
+
"pattern": "^\\d+ms$",
|
|
492
|
+
"description": "Opt-in duration for page transitions (VI-796). Emits --motion-duration-page only when set. No default."
|
|
493
|
+
},
|
|
494
|
+
"duration-stagger": {
|
|
495
|
+
"type": "string",
|
|
496
|
+
"pattern": "^\\d+ms$",
|
|
497
|
+
"description": "Opt-in duration for the gap between staggered items (VI-796). Emits --motion-duration-stagger only when set. No default."
|
|
498
|
+
},
|
|
499
|
+
"duration-enter-delay": {
|
|
500
|
+
"type": "string",
|
|
501
|
+
"pattern": "^\\d+ms$",
|
|
502
|
+
"description": "Opt-in duration for the delay before an entrance starts (VI-796). Emits --motion-duration-enter-delay only when set. No default."
|
|
469
503
|
}
|
|
470
504
|
}
|
|
471
505
|
},
|
|
@@ -589,6 +623,13 @@
|
|
|
589
623
|
"$ref": "#/$defs/componentTokenBinding"
|
|
590
624
|
}
|
|
591
625
|
},
|
|
626
|
+
"glass": {
|
|
627
|
+
"type": "object",
|
|
628
|
+
"description": "The glass layer over a photo: surface fill, blur, edge, lift, shadow and on-photo ink, plus the glass values controls read. Draws only inside `data-glass=\"on\"`; elsewhere components keep their solid surface and border. Keys: fill, blur, edge, lift, shadow, ink, control-fill, control-hover-fill, control-ring, control-ink, control-blur.",
|
|
629
|
+
"additionalProperties": {
|
|
630
|
+
"$ref": "#/$defs/componentTokenBinding"
|
|
631
|
+
}
|
|
632
|
+
},
|
|
592
633
|
"tabs": {
|
|
593
634
|
"type": "object",
|
|
594
635
|
"description": "Tab rail and trigger treatment, for both the segmented (`default`) and underlined (`line`) variants. Keys: list-radius, list-height, list-padding, list-color, list-bg, line-border-bottom, trigger-radius, trigger-padding, trigger-font-size, trigger-font-weight, trigger-letter-spacing, trigger-text-transform, trigger-color, trigger-active-bg, trigger-active-color, trigger-active-shadow, indicator-height, indicator-color.",
|
|
@@ -631,6 +672,13 @@
|
|
|
631
672
|
"$ref": "#/$defs/componentTokenBinding"
|
|
632
673
|
}
|
|
633
674
|
},
|
|
675
|
+
"stat-card": {
|
|
676
|
+
"type": "object",
|
|
677
|
+
"description": "StatCard \u2014 the card's edge, corners, elevation and inset, the rule above the footer, and the label, value and footer type. Keys: border, radius, shadow, padding, footer-border, footer-font-size, footer-font-weight, footer-line-height, footer-color, value-font-family, value-font-size, value-font-weight, value-line-height, value-letter-spacing, label-font-size, label-font-weight, label-line-height, label-letter-spacing, label-color.",
|
|
678
|
+
"additionalProperties": {
|
|
679
|
+
"$ref": "#/$defs/componentTokenBinding"
|
|
680
|
+
}
|
|
681
|
+
},
|
|
634
682
|
"textarea": {
|
|
635
683
|
"type": "object",
|
|
636
684
|
"description": "Textarea shape at the default `md` size. Keys: padding, radius.",
|