@loworbitstudio/visor-theme-engine 0.34.1 → 0.37.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 +2 -2
- package/dist/{chunk-AULV4PDD.js → chunk-VXZMP552.js} +71 -3
- package/dist/index.d.ts +35 -2
- package/dist/index.js +36 -1
- package/dist/{types-C7nWZ5fB.d.ts → types-Cz2u5kQs.d.ts} +7 -7
- package/package.json +1 -1
- package/src/visor-theme.schema.json +33 -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-Cz2u5kQs.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Adapter types for the Visor theme engine.
|
package/dist/adapters/index.js
CHANGED
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
resolveThemeBrand,
|
|
30
30
|
resolveThemeFonts,
|
|
31
31
|
sectionComment
|
|
32
|
-
} from "../chunk-
|
|
32
|
+
} from "../chunk-VXZMP552.js";
|
|
33
33
|
|
|
34
34
|
// src/adapters/brand-passthrough.ts
|
|
35
35
|
var SENTINEL_COLOR = "#ff00ff";
|
|
@@ -584,7 +584,7 @@ function generateTypographyDecls(config, aliases) {
|
|
|
584
584
|
decls.push(`--font-heading: ${fontStack(headingFamily, aliases)};`);
|
|
585
585
|
decls.push(`--font-body: ${fontStack(config.typography.body.family, aliases)};`);
|
|
586
586
|
decls.push(`--font-mono: ${fontStack(config.typography.mono.family, aliases)};`);
|
|
587
|
-
decls.push(...generateFontSizeDecls(config.typography.scale));
|
|
587
|
+
decls.push(...generateFontSizeDecls(config.typography.scale, config.typography.floor));
|
|
588
588
|
decls.push(...generateFontMetricDecls(config.typography.body.family));
|
|
589
589
|
decls.push(...generateFontWeightDecls(config.typography));
|
|
590
590
|
decls.push(...generateFontTextTransformDecls(config.typography));
|
|
@@ -1275,11 +1275,15 @@ var TEXT = "components/ui/text/text.module.css";
|
|
|
1275
1275
|
var INLINE_EDIT = "components/ui/inline-edit/inline-edit.module.css";
|
|
1276
1276
|
var SAVE_STATUS = "components/ui/save-status/save-status.module.css";
|
|
1277
1277
|
var SEGMENTED_CONTROL = "components/ui/segmented-control/segmented-control.module.css";
|
|
1278
|
+
var LAYER_CHART = "components/ui/layer-chart/layer-chart.module.css";
|
|
1279
|
+
var PROPORTION_BAR = "components/ui/proportion-bar/proportion-bar.module.css";
|
|
1278
1280
|
var TOGGLE_GROUP = "components/ui/toggle-group/toggle-group.module.css";
|
|
1279
1281
|
var RADIO_GROUP = "components/ui/radio-group/radio-group.module.css";
|
|
1280
1282
|
var TOOLTIP = "components/ui/tooltip/tooltip.module.css";
|
|
1281
1283
|
var ACTION_ROW = "components/ui/action-row/action-row.module.css";
|
|
1282
1284
|
var DIALOG_FIELD = "blocks/dialog-field/dialog-field.module.css";
|
|
1285
|
+
var ADMIN_SHELL = "blocks/admin-shell/admin-shell.module.css";
|
|
1286
|
+
var BILLING_SLIDER = "components/ui/billing-slider/billing-slider.module.css";
|
|
1283
1287
|
function at(file, fallback) {
|
|
1284
1288
|
return [{ file, fallback }];
|
|
1285
1289
|
}
|
|
@@ -1606,6 +1610,32 @@ var sidebarFamily = {
|
|
|
1606
1610
|
{ key: "item-active-font-weight", property: "font-weight", description: "Active nav-item weight.", consumers: at(SIDEBAR, "var(--font-weight-medium, 500)") }
|
|
1607
1611
|
]
|
|
1608
1612
|
};
|
|
1613
|
+
var adminShellFamily = {
|
|
1614
|
+
family: "admin-shell",
|
|
1615
|
+
prefix: "admin-shell",
|
|
1616
|
+
description: "AdminShell block chrome. Every rule the shell draws is a token, so a theme that separates surfaces by tone (Paper) sets them to `none` and gets a borderless shell.",
|
|
1617
|
+
tokens: [
|
|
1618
|
+
{ key: "sidebar-border", property: "border-right", description: "Rule between the sidebar and the body.", consumers: at(ADMIN_SHELL, "1px solid var(--border-default, #e5e7eb)") },
|
|
1619
|
+
{ key: "sidebar-header-border", property: "border-bottom", description: "Rule under the sidebar header.", consumers: at(ADMIN_SHELL, "1px solid var(--border-muted, #e5e7eb)") },
|
|
1620
|
+
{ key: "sidebar-footer-border", property: "border-top", description: "Rule above the sidebar footer.", consumers: at(ADMIN_SHELL, "1px solid var(--border-muted, #e5e7eb)") },
|
|
1621
|
+
{ key: "topbar-bg", property: "background", description: "Topbar fill.", consumers: at(ADMIN_SHELL, "var(--surface-card, #ffffff)") },
|
|
1622
|
+
{ key: "topbar-border", property: "border-bottom", description: "Rule under the topbar.", consumers: at(ADMIN_SHELL, "1px solid var(--border-default, #e5e7eb)") },
|
|
1623
|
+
{ key: "rail-width", property: "width", description: "Sidebar width when a collapsible shell folds to its icon rail.", consumers: at(ADMIN_SHELL, "4.25rem") },
|
|
1624
|
+
{ key: "rail-duration", property: "transition-duration", description: "How long the sidebar takes to fold to the rail and back.", consumers: at(ADMIN_SHELL, "var(--motion-duration-slow, 500ms)") },
|
|
1625
|
+
{ key: "rail-easing", property: "transition-timing-function", description: "Easing of the fold to the rail and back.", consumers: at(ADMIN_SHELL, "var(--motion-easing-default, ease)") }
|
|
1626
|
+
]
|
|
1627
|
+
};
|
|
1628
|
+
var billingSliderFamily = {
|
|
1629
|
+
family: "billing-slider",
|
|
1630
|
+
prefix: "billing-slider",
|
|
1631
|
+
description: "BillingSlider \u2014 the empty track, the thumb's pill and grip lines, and the striped money-at-stake gap between the thumb and the evidence tick.",
|
|
1632
|
+
tokens: [
|
|
1633
|
+
{ key: "track-bg", property: "background", description: "The empty track.", consumers: at(BILLING_SLIDER, "color-mix(in srgb, var(--text-primary, #111827) 7%, transparent)") },
|
|
1634
|
+
{ key: "thumb-bg", property: "background", description: "The thumb's pill.", consumers: at(BILLING_SLIDER, "var(--surface-popover, #ffffff)") },
|
|
1635
|
+
{ key: "thumb-grip", property: "background", description: "The two grip lines down the pill.", consumers: at(BILLING_SLIDER, "color-mix(in srgb, var(--_ink) 45%, transparent)") },
|
|
1636
|
+
{ key: "gap-color", property: "background (striped band)", description: "The gap's stripes: undecided, and worked past what it bills (money at stake).", consumers: at(BILLING_SLIDER, "var(--color-success-600, #16a34a)") }
|
|
1637
|
+
]
|
|
1638
|
+
};
|
|
1609
1639
|
var tabsFamily = {
|
|
1610
1640
|
family: "tabs",
|
|
1611
1641
|
prefix: "tabs",
|
|
@@ -2241,6 +2271,24 @@ var hairlineFamily = {
|
|
|
2241
2271
|
}
|
|
2242
2272
|
]
|
|
2243
2273
|
};
|
|
2274
|
+
var proportionBarFamily = {
|
|
2275
|
+
family: "proportion-bar",
|
|
2276
|
+
prefix: "proportion-bar",
|
|
2277
|
+
description: "ProportionBar \u2014 the default part fills by position, the built-in hatched, striped and alert fills, the alert's legend text and the empty track.",
|
|
2278
|
+
tokens: [
|
|
2279
|
+
{ key: "fill-1", property: "background", description: "First part's fill when it sets none (then every fourth).", consumers: at(PROPORTION_BAR, "var(--chart-1, #2563eb)") },
|
|
2280
|
+
{ key: "fill-2", property: "background", description: "Second part's default fill.", consumers: at(PROPORTION_BAR, "var(--chart-2, #16a34a)") },
|
|
2281
|
+
{ key: "fill-3", property: "background", description: "Third part's default fill.", consumers: at(PROPORTION_BAR, "var(--chart-3, #d97706)") },
|
|
2282
|
+
{ key: "fill-4", property: "background", description: "Fourth part's default fill.", consumers: at(PROPORTION_BAR, "var(--chart-4, #0891b2)") },
|
|
2283
|
+
{ key: "hatch-color", property: "background (hatched stroke)", description: "Stroke of the `hatched` fill (not billable, written off).", consumers: at(PROPORTION_BAR, "var(--text-tertiary, #9ca3af)") },
|
|
2284
|
+
{ key: "hatch-gap", property: "background (hatched gap)", description: "Ground between the hatch strokes.", consumers: at(PROPORTION_BAR, "color-mix(in srgb, var(--surface-card, #ffffff) 70%, transparent)") },
|
|
2285
|
+
{ key: "stripe-a", property: "background (striped band)", description: "First band of the `striped` fill (earned, not yet collected).", consumers: at(PROPORTION_BAR, "var(--color-success-500, #22c55e)") },
|
|
2286
|
+
{ key: "stripe-b", property: "background (striped band)", description: "Second band of the `striped` fill.", consumers: at(PROPORTION_BAR, "var(--color-success-600, #16a34a)") },
|
|
2287
|
+
{ key: "alert-bg", property: "background", description: "The `alert` fill: the one part that needs a decision.", consumers: at(PROPORTION_BAR, "var(--interactive-destructive-bg, #dc2626)") },
|
|
2288
|
+
{ key: "alert-text", property: "color", description: "The alert part's legend label and value.", consumers: at(PROPORTION_BAR, "var(--text-error, #b91c1c)") },
|
|
2289
|
+
{ key: "track-bg", property: "background", description: "The one neutral track drawn when nothing is measured.", consumers: at(PROPORTION_BAR, "var(--surface-muted, #e5e7eb)") }
|
|
2290
|
+
]
|
|
2291
|
+
};
|
|
2244
2292
|
var segmentedControlFamily = {
|
|
2245
2293
|
family: "segmented-control",
|
|
2246
2294
|
prefix: "segmented-control",
|
|
@@ -2316,6 +2364,22 @@ var adminUiFamily = {
|
|
|
2316
2364
|
}
|
|
2317
2365
|
]
|
|
2318
2366
|
};
|
|
2367
|
+
var layerChartFamily = {
|
|
2368
|
+
family: "layer-chart",
|
|
2369
|
+
prefix: "layer-chart",
|
|
2370
|
+
description: 'LayerChart and SpanStrip \u2014 the investment hue (`hue="tide"`), the unresolved fill and its ink, the opening motion, and the ground between blocks.',
|
|
2371
|
+
tokens: [
|
|
2372
|
+
{ key: "investment-fill", property: "background (palest layer)", description: "The investment hue's pale fill: its deepest blocks and its band.", consumers: at(LAYER_CHART, "var(--surface-muted, #f3f4f6)") },
|
|
2373
|
+
{ key: "investment-fill-strong", property: "background (top layer)", description: "The investment hue's strong fill: its top-level block.", consumers: at(LAYER_CHART, "var(--surface-interactive-active, #e5e7eb)") },
|
|
2374
|
+
{ key: "investment-ink", property: "color", description: "Text on the investment hue's fills, and a call in its span strip.", consumers: at(LAYER_CHART, "var(--text-primary, #111827)") },
|
|
2375
|
+
{ key: "investment-solid", property: "background (span cells)", description: "The investment hue's solid, mixed into its span cells.", consumers: at(LAYER_CHART, "var(--text-secondary, #4b5563)") },
|
|
2376
|
+
{ key: "alert-fill", property: "background", description: "An unresolved block: the chart's only coral.", consumers: at(LAYER_CHART, "color-mix(in srgb, var(--color-error-500, #ef4444) 35%, var(--surface-page, #ffffff))") },
|
|
2377
|
+
{ key: "alert-text", property: "color", description: "Text on an unresolved block.", consumers: at(LAYER_CHART, "var(--text-error, #b91c1c)") },
|
|
2378
|
+
{ key: "duration", property: "transition-duration", description: "How long a block takes to open (none under reduced motion).", consumers: at(LAYER_CHART, "480ms") },
|
|
2379
|
+
{ key: "easing", property: "transition-timing-function", description: "The opening ease.", consumers: at(LAYER_CHART, "cubic-bezier(0.2, 0.8, 0.2, 1)") },
|
|
2380
|
+
{ 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)") }
|
|
2381
|
+
]
|
|
2382
|
+
};
|
|
2319
2383
|
var COMPONENT_TOKEN_FAMILIES = [
|
|
2320
2384
|
tableFamily,
|
|
2321
2385
|
dataTableFamily,
|
|
@@ -2327,6 +2391,8 @@ var COMPONENT_TOKEN_FAMILIES = [
|
|
|
2327
2391
|
emptyStateFamily,
|
|
2328
2392
|
bannerFamily,
|
|
2329
2393
|
sidebarFamily,
|
|
2394
|
+
adminShellFamily,
|
|
2395
|
+
billingSliderFamily,
|
|
2330
2396
|
tabsFamily,
|
|
2331
2397
|
skeletonFamily,
|
|
2332
2398
|
spinnerFamily,
|
|
@@ -2342,6 +2408,7 @@ var COMPONENT_TOKEN_FAMILIES = [
|
|
|
2342
2408
|
textFamily,
|
|
2343
2409
|
switchFamily,
|
|
2344
2410
|
saveStatusFamily,
|
|
2411
|
+
proportionBarFamily,
|
|
2345
2412
|
segmentedControlFamily,
|
|
2346
2413
|
toggleGroupFamily,
|
|
2347
2414
|
radioCardFamily,
|
|
@@ -2350,6 +2417,7 @@ var COMPONENT_TOKEN_FAMILIES = [
|
|
|
2350
2417
|
inputAffixFamily,
|
|
2351
2418
|
separatorFamily,
|
|
2352
2419
|
alertFamily,
|
|
2420
|
+
layerChartFamily,
|
|
2353
2421
|
adminUiFamily
|
|
2354
2422
|
];
|
|
2355
2423
|
var COMPONENT_TOKEN_FAMILY_BY_NAME = new Map(
|
|
@@ -2855,9 +2923,9 @@ var FONT_SIZE_RAMP_PX = {
|
|
|
2855
2923
|
"3xl": 30,
|
|
2856
2924
|
"4xl": 36
|
|
2857
2925
|
};
|
|
2858
|
-
function generateFontSizeDecls(scale) {
|
|
2926
|
+
function generateFontSizeDecls(scale, floor = 0) {
|
|
2859
2927
|
return Object.entries(FONT_SIZE_RAMP_PX).map(([name, px]) => {
|
|
2860
|
-
const scaled = px * scale;
|
|
2928
|
+
const scaled = Math.max(px * scale, floor);
|
|
2861
2929
|
const rem = Number((scaled / 16).toFixed(5));
|
|
2862
2930
|
return `--font-size-${name}: ${rem}rem; /* ${Number(scaled.toFixed(2))}px */`;
|
|
2863
2931
|
});
|
|
@@ -2877,7 +2945,7 @@ function generateTypographyPrimitives(config, aliases = EMPTY_ALIASES) {
|
|
|
2877
2945
|
decls.push(`--font-sans: ${fontStack(config.typography.body.family, aliases)};`);
|
|
2878
2946
|
decls.push(`--font-body: ${fontStack(config.typography.body.family, aliases)};`);
|
|
2879
2947
|
decls.push(`--font-mono: ${fontStack(config.typography.mono.family, aliases)};`);
|
|
2880
|
-
decls.push(...generateFontSizeDecls(config.typography.scale));
|
|
2948
|
+
decls.push(...generateFontSizeDecls(config.typography.scale, config.typography.floor));
|
|
2881
2949
|
decls.push(...generateFontMetricDecls(config.typography.body.family));
|
|
2882
2950
|
decls.push(...generateFontWeightDecls(config.typography));
|
|
2883
2951
|
decls.push(...generateFontTextTransformDecls(config.typography));
|
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-Cz2u5kQs.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-Cz2u5kQs.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Font resolver — maps font family names to loadable font resources.
|
|
@@ -643,6 +643,11 @@ var properties = {
|
|
|
643
643
|
type: "number",
|
|
644
644
|
description: "Type scale multiplier applied to the font-size ramp: every --font-size-* step is multiplied by it, and the page inherits the scaled --font-size-base. Default: 1. CSS adapters only — the Flutter adapter emits Material 3 slot sizes verbatim and ignores this field."
|
|
645
645
|
},
|
|
646
|
+
floor: {
|
|
647
|
+
type: "number",
|
|
648
|
+
minimum: 0,
|
|
649
|
+
description: "VI-754: smallest size in px any --font-size-* step may emit. A step that scales below it is raised to it (Paper sets 13, so --font-size-xs is 13px). Unset: no floor. CSS adapters only."
|
|
650
|
+
},
|
|
646
651
|
"text-on-light": {
|
|
647
652
|
type: "string",
|
|
648
653
|
description: "VI-375: text color placed on a LIGHT interactive background. Auto-picked for interactive *-text tokens whose paired *-bg has relative luminance > 0.5. Defaults to #FFFFFF (which deliberately still fails AA on a bright bg so the contrast validator flags it); set a readable near-black (e.g. #1E1F21) to clear the warning. Per-token overrides (overrides.{mode}.interactive-*-text) still win."
|
|
@@ -1156,6 +1161,20 @@ var properties = {
|
|
|
1156
1161
|
$ref: "#/$defs/componentTokenBinding"
|
|
1157
1162
|
}
|
|
1158
1163
|
},
|
|
1164
|
+
"admin-shell": {
|
|
1165
|
+
type: "object",
|
|
1166
|
+
description: "AdminShell block chrome. Every rule the shell draws is a token, so a theme that separates surfaces by tone (Paper) sets them to `none` and gets a borderless shell. Keys: sidebar-border, sidebar-header-border, sidebar-footer-border, topbar-bg, topbar-border, rail-width, rail-duration, rail-easing.",
|
|
1167
|
+
additionalProperties: {
|
|
1168
|
+
$ref: "#/$defs/componentTokenBinding"
|
|
1169
|
+
}
|
|
1170
|
+
},
|
|
1171
|
+
"billing-slider": {
|
|
1172
|
+
type: "object",
|
|
1173
|
+
description: "BillingSlider — the empty track, the thumb's pill and grip lines, and the striped money-at-stake gap between the thumb and the evidence tick. Keys: track-bg, thumb-bg, thumb-grip, gap-color.",
|
|
1174
|
+
additionalProperties: {
|
|
1175
|
+
$ref: "#/$defs/componentTokenBinding"
|
|
1176
|
+
}
|
|
1177
|
+
},
|
|
1159
1178
|
tabs: {
|
|
1160
1179
|
type: "object",
|
|
1161
1180
|
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.",
|
|
@@ -1191,6 +1210,13 @@ var properties = {
|
|
|
1191
1210
|
$ref: "#/$defs/componentTokenBinding"
|
|
1192
1211
|
}
|
|
1193
1212
|
},
|
|
1213
|
+
"layer-chart": {
|
|
1214
|
+
type: "object",
|
|
1215
|
+
description: "LayerChart and SpanStrip — the investment hue (`hue=\"tide\"`), the unresolved fill and its ink, the opening motion, and the ground between blocks. Keys: investment-fill, investment-fill-strong, investment-ink, investment-solid, alert-fill, alert-text, duration, easing, ground.",
|
|
1216
|
+
additionalProperties: {
|
|
1217
|
+
$ref: "#/$defs/componentTokenBinding"
|
|
1218
|
+
}
|
|
1219
|
+
},
|
|
1194
1220
|
textarea: {
|
|
1195
1221
|
type: "object",
|
|
1196
1222
|
description: "Textarea shape at the default `md` size. Keys: padding, radius.",
|
|
@@ -1268,6 +1294,13 @@ var properties = {
|
|
|
1268
1294
|
$ref: "#/$defs/componentTokenBinding"
|
|
1269
1295
|
}
|
|
1270
1296
|
},
|
|
1297
|
+
"proportion-bar": {
|
|
1298
|
+
type: "object",
|
|
1299
|
+
description: "ProportionBar — the default part fills by position, the built-in hatched, striped and alert fills, the alert's legend text and the empty track. Keys: fill-1, fill-2, fill-3, fill-4, hatch-color, hatch-gap, stripe-a, stripe-b, alert-bg, alert-text, track-bg.",
|
|
1300
|
+
additionalProperties: {
|
|
1301
|
+
$ref: "#/$defs/componentTokenBinding"
|
|
1302
|
+
}
|
|
1303
|
+
},
|
|
1271
1304
|
"segmented-control": {
|
|
1272
1305
|
type: "object",
|
|
1273
1306
|
description: "SegmentedControl — the well, its corner radius, the sliding pill, the ink and the state edge on it. The resting edge is the shared `control` edge. Keys: track-bg, radius, indicator-bg, indicator-text, indicator-edge, inactive-text, active-weight.",
|
package/dist/index.js
CHANGED
|
@@ -68,7 +68,7 @@ import {
|
|
|
68
68
|
rgbToOklch,
|
|
69
69
|
serializeColor,
|
|
70
70
|
validateComponentBindings
|
|
71
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-VXZMP552.js";
|
|
72
72
|
|
|
73
73
|
// src/fonts/validate-coverage.ts
|
|
74
74
|
var FONT_VAR_RE = /--font-(heading|display|body|sans|mono)\s*:\s*([^;]+);/g;
|
|
@@ -840,6 +840,11 @@ var visor_theme_schema_default = {
|
|
|
840
840
|
type: "number",
|
|
841
841
|
description: "Type scale multiplier applied to the font-size ramp: every --font-size-* step is multiplied by it, and the page inherits the scaled --font-size-base. Default: 1. CSS adapters only \u2014 the Flutter adapter emits Material 3 slot sizes verbatim and ignores this field."
|
|
842
842
|
},
|
|
843
|
+
floor: {
|
|
844
|
+
type: "number",
|
|
845
|
+
minimum: 0,
|
|
846
|
+
description: "VI-754: smallest size in px any --font-size-* step may emit. A step that scales below it is raised to it (Paper sets 13, so --font-size-xs is 13px). Unset: no floor. CSS adapters only."
|
|
847
|
+
},
|
|
843
848
|
"text-on-light": {
|
|
844
849
|
type: "string",
|
|
845
850
|
description: "VI-375: text color placed on a LIGHT interactive background. Auto-picked for interactive *-text tokens whose paired *-bg has relative luminance > 0.5. Defaults to #FFFFFF (which deliberately still fails AA on a bright bg so the contrast validator flags it); set a readable near-black (e.g. #1E1F21) to clear the warning. Per-token overrides (overrides.{mode}.interactive-*-text) still win."
|
|
@@ -1177,6 +1182,20 @@ var visor_theme_schema_default = {
|
|
|
1177
1182
|
$ref: "#/$defs/componentTokenBinding"
|
|
1178
1183
|
}
|
|
1179
1184
|
},
|
|
1185
|
+
"admin-shell": {
|
|
1186
|
+
type: "object",
|
|
1187
|
+
description: "AdminShell block chrome. Every rule the shell draws is a token, so a theme that separates surfaces by tone (Paper) sets them to `none` and gets a borderless shell. Keys: sidebar-border, sidebar-header-border, sidebar-footer-border, topbar-bg, topbar-border, rail-width, rail-duration, rail-easing.",
|
|
1188
|
+
additionalProperties: {
|
|
1189
|
+
$ref: "#/$defs/componentTokenBinding"
|
|
1190
|
+
}
|
|
1191
|
+
},
|
|
1192
|
+
"billing-slider": {
|
|
1193
|
+
type: "object",
|
|
1194
|
+
description: "BillingSlider \u2014 the empty track, the thumb's pill and grip lines, and the striped money-at-stake gap between the thumb and the evidence tick. Keys: track-bg, thumb-bg, thumb-grip, gap-color.",
|
|
1195
|
+
additionalProperties: {
|
|
1196
|
+
$ref: "#/$defs/componentTokenBinding"
|
|
1197
|
+
}
|
|
1198
|
+
},
|
|
1180
1199
|
tabs: {
|
|
1181
1200
|
type: "object",
|
|
1182
1201
|
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.",
|
|
@@ -1212,6 +1231,13 @@ var visor_theme_schema_default = {
|
|
|
1212
1231
|
$ref: "#/$defs/componentTokenBinding"
|
|
1213
1232
|
}
|
|
1214
1233
|
},
|
|
1234
|
+
"layer-chart": {
|
|
1235
|
+
type: "object",
|
|
1236
|
+
description: 'LayerChart and SpanStrip \u2014 the investment hue (`hue="tide"`), the unresolved fill and its ink, the opening motion, and the ground between blocks. Keys: investment-fill, investment-fill-strong, investment-ink, investment-solid, alert-fill, alert-text, duration, easing, ground.',
|
|
1237
|
+
additionalProperties: {
|
|
1238
|
+
$ref: "#/$defs/componentTokenBinding"
|
|
1239
|
+
}
|
|
1240
|
+
},
|
|
1215
1241
|
textarea: {
|
|
1216
1242
|
type: "object",
|
|
1217
1243
|
description: "Textarea shape at the default `md` size. Keys: padding, radius.",
|
|
@@ -1289,6 +1315,13 @@ var visor_theme_schema_default = {
|
|
|
1289
1315
|
$ref: "#/$defs/componentTokenBinding"
|
|
1290
1316
|
}
|
|
1291
1317
|
},
|
|
1318
|
+
"proportion-bar": {
|
|
1319
|
+
type: "object",
|
|
1320
|
+
description: "ProportionBar \u2014 the default part fills by position, the built-in hatched, striped and alert fills, the alert's legend text and the empty track. Keys: fill-1, fill-2, fill-3, fill-4, hatch-color, hatch-gap, stripe-a, stripe-b, alert-bg, alert-text, track-bg.",
|
|
1321
|
+
additionalProperties: {
|
|
1322
|
+
$ref: "#/$defs/componentTokenBinding"
|
|
1323
|
+
}
|
|
1324
|
+
},
|
|
1292
1325
|
"segmented-control": {
|
|
1293
1326
|
type: "object",
|
|
1294
1327
|
description: "SegmentedControl \u2014 the well, its corner radius, the sliding pill, the ink and the state edge on it. The resting edge is the shared `control` edge. Keys: track-bg, radius, indicator-bg, indicator-text, indicator-edge, inactive-text, active-weight.",
|
|
@@ -1651,6 +1684,7 @@ var KNOWN_TYPOGRAPHY_KEYS = /* @__PURE__ */ new Set([
|
|
|
1651
1684
|
"mono",
|
|
1652
1685
|
"letter-spacing",
|
|
1653
1686
|
"scale",
|
|
1687
|
+
"floor",
|
|
1654
1688
|
"slots",
|
|
1655
1689
|
"cdn-overrides",
|
|
1656
1690
|
// VI-375: default text colors for interactive backgrounds (auto-picked by
|
|
@@ -2230,6 +2264,7 @@ function resolveConfig(config) {
|
|
|
2230
2264
|
"colors-dark": config["colors-dark"],
|
|
2231
2265
|
typography: {
|
|
2232
2266
|
scale: config.typography?.scale ?? DEFAULTS.typography.scale,
|
|
2267
|
+
...config.typography?.floor !== void 0 && { floor: config.typography.floor },
|
|
2233
2268
|
"text-on-light": config.typography?.["text-on-light"] ?? DEFAULTS.typography["text-on-light"],
|
|
2234
2269
|
"text-on-dark": config.typography?.["text-on-dark"] ?? DEFAULTS.typography["text-on-dark"],
|
|
2235
2270
|
heading: {
|
|
@@ -553,13 +553,6 @@ interface ComponentTokenFamily {
|
|
|
553
553
|
}
|
|
554
554
|
/** Emitted custom-property name (without the leading `--`) for a family key. */
|
|
555
555
|
declare function componentTokenName(family: ComponentTokenFamily, key: string): string;
|
|
556
|
-
/**
|
|
557
|
-
* The full contract, in the D2 priority order the retro measured.
|
|
558
|
-
*
|
|
559
|
-
* Adding a family here is the ONLY registration step: the schema validator, the
|
|
560
|
-
* CSS emitter, the docs page test and the fallback-parity test all read this
|
|
561
|
-
* array.
|
|
562
|
-
*/
|
|
563
556
|
declare const COMPONENT_TOKEN_FAMILIES: readonly ComponentTokenFamily[];
|
|
564
557
|
/** Family lookup by `.visor.yaml` key. */
|
|
565
558
|
declare const COMPONENT_TOKEN_FAMILY_BY_NAME: ReadonlyMap<string, ComponentTokenFamily>;
|
|
@@ -687,6 +680,11 @@ interface VisorThemeConfig {
|
|
|
687
680
|
* Material 3 slot sizes verbatim. Default: 1.
|
|
688
681
|
*/
|
|
689
682
|
scale?: number;
|
|
683
|
+
/**
|
|
684
|
+
* Smallest size, in px, any `--font-size-*` step may emit (VI-754). A step
|
|
685
|
+
* that scales below it is raised to it. CSS adapters only. Unset: no floor.
|
|
686
|
+
*/
|
|
687
|
+
floor?: number;
|
|
690
688
|
/**
|
|
691
689
|
* VI-375: text color placed on a LIGHT interactive background. Auto-picked
|
|
692
690
|
* for interactive `*-text` tokens whose paired `*-bg` resolves to a light
|
|
@@ -902,6 +900,8 @@ interface ResolvedThemeConfig {
|
|
|
902
900
|
* Material 3 slot sizes verbatim. Default: 1.
|
|
903
901
|
*/
|
|
904
902
|
scale: number;
|
|
903
|
+
/** Smallest `--font-size-*` step in px (VI-754). Unset: no floor. */
|
|
904
|
+
floor?: number;
|
|
905
905
|
/**
|
|
906
906
|
* VI-375: resolved default text color for LIGHT interactive backgrounds.
|
|
907
907
|
* Always present (defaults to `#1E1F21`); theme-overridable.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loworbitstudio/visor-theme-engine",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.37.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",
|
|
@@ -219,6 +219,11 @@
|
|
|
219
219
|
"type": "number",
|
|
220
220
|
"description": "Type scale multiplier applied to the font-size ramp: every --font-size-* step is multiplied by it, and the page inherits the scaled --font-size-base. Default: 1. CSS adapters only — the Flutter adapter emits Material 3 slot sizes verbatim and ignores this field."
|
|
221
221
|
},
|
|
222
|
+
"floor": {
|
|
223
|
+
"type": "number",
|
|
224
|
+
"minimum": 0,
|
|
225
|
+
"description": "VI-754: smallest size in px any --font-size-* step may emit. A step that scales below it is raised to it (Paper sets 13, so --font-size-xs is 13px). Unset: no floor. CSS adapters only."
|
|
226
|
+
},
|
|
222
227
|
"text-on-light": {
|
|
223
228
|
"type": "string",
|
|
224
229
|
"description": "VI-375: text color placed on a LIGHT interactive background. Auto-picked for interactive *-text tokens whose paired *-bg has relative luminance > 0.5. Defaults to #FFFFFF (which deliberately still fails AA on a bright bg so the contrast validator flags it); set a readable near-black (e.g. #1E1F21) to clear the warning. Per-token overrides (overrides.{mode}.interactive-*-text) still win."
|
|
@@ -556,6 +561,20 @@
|
|
|
556
561
|
"$ref": "#/$defs/componentTokenBinding"
|
|
557
562
|
}
|
|
558
563
|
},
|
|
564
|
+
"admin-shell": {
|
|
565
|
+
"type": "object",
|
|
566
|
+
"description": "AdminShell block chrome. Every rule the shell draws is a token, so a theme that separates surfaces by tone (Paper) sets them to `none` and gets a borderless shell. Keys: sidebar-border, sidebar-header-border, sidebar-footer-border, topbar-bg, topbar-border, rail-width, rail-duration, rail-easing.",
|
|
567
|
+
"additionalProperties": {
|
|
568
|
+
"$ref": "#/$defs/componentTokenBinding"
|
|
569
|
+
}
|
|
570
|
+
},
|
|
571
|
+
"billing-slider": {
|
|
572
|
+
"type": "object",
|
|
573
|
+
"description": "BillingSlider — the empty track, the thumb's pill and grip lines, and the striped money-at-stake gap between the thumb and the evidence tick. Keys: track-bg, thumb-bg, thumb-grip, gap-color.",
|
|
574
|
+
"additionalProperties": {
|
|
575
|
+
"$ref": "#/$defs/componentTokenBinding"
|
|
576
|
+
}
|
|
577
|
+
},
|
|
559
578
|
"tabs": {
|
|
560
579
|
"type": "object",
|
|
561
580
|
"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.",
|
|
@@ -591,6 +610,13 @@
|
|
|
591
610
|
"$ref": "#/$defs/componentTokenBinding"
|
|
592
611
|
}
|
|
593
612
|
},
|
|
613
|
+
"layer-chart": {
|
|
614
|
+
"type": "object",
|
|
615
|
+
"description": "LayerChart and SpanStrip \u2014 the investment hue (`hue=\"tide\"`), the unresolved fill and its ink, the opening motion, and the ground between blocks. Keys: investment-fill, investment-fill-strong, investment-ink, investment-solid, alert-fill, alert-text, duration, easing, ground.",
|
|
616
|
+
"additionalProperties": {
|
|
617
|
+
"$ref": "#/$defs/componentTokenBinding"
|
|
618
|
+
}
|
|
619
|
+
},
|
|
594
620
|
"textarea": {
|
|
595
621
|
"type": "object",
|
|
596
622
|
"description": "Textarea shape at the default `md` size. Keys: padding, radius.",
|
|
@@ -668,6 +694,13 @@
|
|
|
668
694
|
"$ref": "#/$defs/componentTokenBinding"
|
|
669
695
|
}
|
|
670
696
|
},
|
|
697
|
+
"proportion-bar": {
|
|
698
|
+
"type": "object",
|
|
699
|
+
"description": "ProportionBar \u2014 the default part fills by position, the built-in hatched, striped and alert fills, the alert's legend text and the empty track. Keys: fill-1, fill-2, fill-3, fill-4, hatch-color, hatch-gap, stripe-a, stripe-b, alert-bg, alert-text, track-bg.",
|
|
700
|
+
"additionalProperties": {
|
|
701
|
+
"$ref": "#/$defs/componentTokenBinding"
|
|
702
|
+
}
|
|
703
|
+
},
|
|
671
704
|
"segmented-control": {
|
|
672
705
|
"type": "object",
|
|
673
706
|
"description": "SegmentedControl \u2014 the well, its corner radius, the sliding pill, the ink and the state edge on it. The resting edge is the shared `control` edge. Keys: track-bg, radius, indicator-bg, indicator-text, indicator-edge, inactive-text, active-weight.",
|