@ttoss/fsl-theme 2.1.1 → 2.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/dist/{Types-a_sfpbha.d.cts → Types-8o6d09ll.d.cts} +23 -24
  2. package/dist/{Types-a_sfpbha.d.mts → Types-8o6d09ll.d.mts} +23 -24
  3. package/dist/{baseBundle-CXdxj_re.mjs → baseBundle-C6RP-2Qb.mjs} +1 -1
  4. package/dist/{baseBundle-a9LDsqYy.cjs → baseBundle-C6yVk4x0.cjs} +1 -1
  5. package/dist/{createTheme-B7H0xSVp.cjs → createTheme-BzlJdFAG.cjs} +18 -18
  6. package/dist/{createTheme-Bm9LVQ4w.mjs → createTheme-gTjIryKH.mjs} +18 -18
  7. package/dist/css-BVePVvTJ.mjs +96 -0
  8. package/dist/css-CKvOE4mT.cjs +113 -0
  9. package/dist/css.cjs +5 -41
  10. package/dist/css.d.cts +22 -2
  11. package/dist/css.d.mts +22 -2
  12. package/dist/css.mjs +3 -41
  13. package/dist/dataviz/index.cjs +2 -2
  14. package/dist/dataviz/index.d.cts +1 -1
  15. package/dist/dataviz/index.d.mts +1 -1
  16. package/dist/dataviz/index.mjs +1 -1
  17. package/dist/dtcg.cjs +11 -16
  18. package/dist/dtcg.d.cts +3 -3
  19. package/dist/dtcg.d.mts +3 -3
  20. package/dist/dtcg.mjs +11 -16
  21. package/dist/{index-BmZQVd3G.d.cts → index-CIkVRaGC.d.cts} +1 -1
  22. package/dist/{index-XZsRrMTF.d.mts → index-OP4B-9hU.d.mts} +1 -1
  23. package/dist/index.cjs +1 -1
  24. package/dist/index.d.cts +3 -3
  25. package/dist/index.d.mts +3 -3
  26. package/dist/index.mjs +1 -1
  27. package/dist/{react-DQErMGJz.cjs → react-C1WRCOFF.cjs} +43 -9
  28. package/dist/{react-BwnHHvJj.d.mts → react-C9QSshf3.d.mts} +30 -3
  29. package/dist/{react-2D_CNVF2.d.cts → react-CZDLBN6v.d.cts} +30 -3
  30. package/dist/react.cjs +2 -1
  31. package/dist/react.d.cts +2 -2
  32. package/dist/react.d.mts +2 -2
  33. package/dist/react.mjs +38 -10
  34. package/dist/themes/bruttal.cjs +2 -2
  35. package/dist/themes/bruttal.d.cts +1 -1
  36. package/dist/themes/bruttal.d.mts +1 -1
  37. package/dist/themes/bruttal.mjs +2 -2
  38. package/dist/{toCssVars-CWTlp9St.mjs → toCssVars-CTGqZ_t3.mjs} +5 -5
  39. package/dist/{toCssVars-D0BR23cP.cjs → toCssVars-NGi4K2Oc.cjs} +5 -5
  40. package/dist/vars.cjs +2 -2
  41. package/dist/vars.d.cts +1 -1
  42. package/dist/vars.d.mts +1 -1
  43. package/dist/vars.mjs +2 -2
  44. package/dist/{withDataviz-DrUtw8cc.cjs → withDataviz-B-XQ1MDT.cjs} +1 -1
  45. package/dist/{withDataviz-Ln3sEwb7.mjs → withDataviz-B3mEhBPh.mjs} +1 -1
  46. package/llms.txt +10 -10
  47. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  /** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
2
- import { a as darkAlternate, n as createTheme } from "../createTheme-Bm9LVQ4w.mjs";
2
+ import { a as darkAlternate, n as createTheme } from "../createTheme-gTjIryKH.mjs";
3
3
  import { r as deepMerge } from "../helpers-BXaKe2s3.mjs";
4
- import { t as withDataviz } from "../withDataviz-Ln3sEwb7.mjs";
4
+ import { t as withDataviz } from "../withDataviz-B3mEhBPh.mjs";
5
5
 
6
6
  //#region src/themes/bruttal.ts
7
7
  /**
@@ -130,13 +130,13 @@ var buildReducedMotionVars = theme => {
130
130
  * contains the coarse overrides, to be emitted inside
131
131
  * `@media (any-pointer: coarse)`.
132
132
  *
133
- * Derives every `*.coarse.*` path from `core.sizing.hit.coarse` dynamically,
134
- * so adding a new step to `CoreSizeHitScale` never silently omits it here.
133
+ * `hit` is a single floor per pointer profile: the coarse override maps
134
+ * `semantic.sizing.hit` to `core.sizing.hit.coarse`.
135
135
  */
136
136
  var buildCoarseHitVars = theme => {
137
- const vars = {};
138
- for (const [key, value] of Object.entries(theme.core.sizing.hit.coarse)) if (typeof value === "string") vars[toCssVarName(`semantic.sizing.hit.${key}`)] = value;
139
- return vars;
137
+ return {
138
+ [toCssVarName("semantic.sizing.hit")]: theme.core.sizing.hit.coarse
139
+ };
140
140
  };
141
141
  /**
142
142
  * Render a complete scoped CSS block from a vars record.
@@ -130,13 +130,13 @@ var buildReducedMotionVars = theme => {
130
130
  * contains the coarse overrides, to be emitted inside
131
131
  * `@media (any-pointer: coarse)`.
132
132
  *
133
- * Derives every `*.coarse.*` path from `core.sizing.hit.coarse` dynamically,
134
- * so adding a new step to `CoreSizeHitScale` never silently omits it here.
133
+ * `hit` is a single floor per pointer profile: the coarse override maps
134
+ * `semantic.sizing.hit` to `core.sizing.hit.coarse`.
135
135
  */
136
136
  var buildCoarseHitVars = theme => {
137
- const vars = {};
138
- for (const [key, value] of Object.entries(theme.core.sizing.hit.coarse)) if (typeof value === "string") vars[toCssVarName(`semantic.sizing.hit.${key}`)] = value;
139
- return vars;
137
+ return {
138
+ [toCssVarName("semantic.sizing.hit")]: theme.core.sizing.hit.coarse
139
+ };
140
140
  };
141
141
  /**
142
142
  * Render a complete scoped CSS block from a vars record.
package/dist/vars.cjs CHANGED
@@ -3,8 +3,8 @@ Object.defineProperty(exports, Symbol.toStringTag, {
3
3
  value: 'Module'
4
4
  });
5
5
  const require_helpers = require('./helpers-BU40JvFA.cjs');
6
- const require_baseBundle = require('./baseBundle-a9LDsqYy.cjs');
7
- const require_toCssVars = require('./toCssVars-D0BR23cP.cjs');
6
+ const require_baseBundle = require('./baseBundle-C6yVk4x0.cjs');
7
+ const require_toCssVars = require('./toCssVars-NGi4K2Oc.cjs');
8
8
 
9
9
  //#region src/roots/toVars.ts
10
10
  /**
package/dist/vars.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
 
2
- import { a as ThemeTokens, n as SemanticTokens } from "./Types-a_sfpbha.cjs";
2
+ import { a as ThemeTokens, n as SemanticTokens } from "./Types-8o6d09ll.cjs";
3
3
 
4
4
  //#region src/roots/toVars.d.ts
5
5
  /**
package/dist/vars.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
 
2
- import { a as ThemeTokens, n as SemanticTokens } from "./Types-a_sfpbha.mjs";
2
+ import { a as ThemeTokens, n as SemanticTokens } from "./Types-8o6d09ll.mjs";
3
3
 
4
4
  //#region src/roots/toVars.d.ts
5
5
  /**
package/dist/vars.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  /** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
2
2
  import { o as isPlainObject } from "./helpers-BXaKe2s3.mjs";
3
- import { t as baseBundle } from "./baseBundle-CXdxj_re.mjs";
4
- import { t as toCssVarName } from "./toCssVars-CWTlp9St.mjs";
3
+ import { t as baseBundle } from "./baseBundle-C6RP-2Qb.mjs";
4
+ import { t as toCssVarName } from "./toCssVars-CTGqZ_t3.mjs";
5
5
 
6
6
  //#region src/roots/toVars.ts
7
7
  /**
@@ -1,5 +1,5 @@
1
1
  /** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
2
- const require_createTheme = require('./createTheme-B7H0xSVp.cjs');
2
+ const require_createTheme = require('./createTheme-BzlJdFAG.cjs');
3
3
 
4
4
  //#region src/dataviz/baseTheme.ts
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  /** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
2
- import { t as buildTheme } from "./createTheme-Bm9LVQ4w.mjs";
2
+ import { t as buildTheme } from "./createTheme-gTjIryKH.mjs";
3
3
 
4
4
  //#region src/dataviz/baseTheme.ts
5
5
  /**
package/llms.txt CHANGED
@@ -77,7 +77,7 @@ Components consume **only** `semantic.*`. Core values never change between light
77
77
  | `semantic.colors.` | `--tt-colors-` | `vars.colors.action.primary.background.default` → `var(--tt-colors-action-primary-background-default)` |
78
78
  | `semantic.text.` | `--tt-text-` | `vars.text.body.md.fontSize` → `var(--tt-text-body-md-fontSize)` |
79
79
  | `semantic.spacing.` | `--tt-spacing-` | `vars.spacing.inset.control.md` → `var(--tt-spacing-inset-control-md)` |
80
- | `semantic.sizing.` | `--tt-sizing-` | `vars.sizing.hit.base` → `var(--tt-sizing-hit-base)` |
80
+ | `semantic.sizing.` | `--tt-sizing-` | `vars.sizing.hit` → `var(--tt-sizing-hit)` |
81
81
  | `semantic.radii.` | `--tt-radii-` | `vars.radii.control` → `var(--tt-radii-control)` |
82
82
  | `semantic.border.` | `--tt-border-` | `vars.border.outline.control.width` → `var(--tt-border-outline-control-width)` |
83
83
  | `semantic.focus.` | `--tt-focus-` | `vars.focus.ring.color` → `var(--tt-focus-ring-color)` |
@@ -139,7 +139,7 @@ Valid `{ux, state}` combinations: see [Color state legality](#color-state-legali
139
139
  | | `vars.spacing.gutter.{page,section}` | CSS length / `clamp()` |
140
140
  | | `vars.spacing.separation.interactive.min` | CSS length |
141
141
  | **text** | `vars.text.{display,headline,title,body,label,code}.{lg,md,sm}` | TextStyle (object — see below) |
142
- | **sizing** | `vars.sizing.hit.{min,base,prominent}` | CSS length |
142
+ | **sizing** | `vars.sizing.hit` | CSS length |
143
143
  | | `vars.sizing.icon.{sm,md,lg}` | CSS length |
144
144
  | | `vars.sizing.identity.{sm,md,lg,xl}` | CSS length |
145
145
  | | `vars.sizing.measure.reading` | CSS `ch` / `clamp()` |
@@ -215,7 +215,7 @@ Available fields: `fontFamily` · `fontSize` · `fontWeight` · `lineHeight` ·
215
215
 
216
216
  **`width` / `height` / `min-width` / `min-height` → `sizing`**
217
217
 
218
- - Interactive area (hit target) → `vars.sizing.hit.{min|base|prominent}` (apply via `min-width`/`min-height`, not visual size)
218
+ - Interactive area (hit target) → `vars.sizing.hit` (apply via `min-width`/`min-height`, not visual size)
219
219
  - Icon glyph → `vars.sizing.icon.{sm|md|lg}`
220
220
  - Avatar / identity → `vars.sizing.identity.{sm|md|lg|xl}`
221
221
  - Reading line length → `vars.sizing.measure.reading` (use as `max-width`)
@@ -313,7 +313,7 @@ Never both. Never neither.
313
313
 
314
314
  **§3 — `opacity.disabled` is for visual media only.** Disabled controls and disabled text **must** use `vars.colors.{ux}.{role}.{dimension}.disabled` color tokens (which carry contrast guarantees). `vars.opacity.disabled` is exclusive to images, avatars, illustrations — assets without a color contract.
315
315
 
316
- **§4 — `sizing.hit.*` is enforced via `min-*`, not visual size.** Apply as `min-width` / `min-height`. The CSS layer auto-injects coarse-pointer overrides under `@media (any-pointer: coarse)` — do not write that media query yourself.
316
+ **§4 — `sizing.hit` is enforced via `min-*`, not visual size.** Apply as `min-width` / `min-height`. The CSS layer auto-injects coarse-pointer overrides under `@media (any-pointer: coarse)` — do not write that media query yourself. `hit` is a single ergonomic floor (not a `min`/`base`/`prominent` scale) — see ADR-020.
317
317
 
318
318
  **§5 — `tonal` elevation requires its shadow counterpart.** Using `vars.elevation.tonal.raised` is only valid when `vars.elevation.surface.raised` is also applied to the same element. Tonal alone breaks depth perception when the theme switches modes.
319
319
 
@@ -408,7 +408,7 @@ function PrimaryButton({
408
408
  : vars.colors.action.primary.text.default,
409
409
  // §6 — density uniform: inset / sizing / typography all md
410
410
  padding: `0 ${vars.spacing.inset.control.md}`,
411
- minHeight: vars.sizing.hit.base, // §4: min-height enforces hit target
411
+ minHeight: vars.sizing.hit, // §4: min-height enforces hit target
412
412
  // typography — each TextStyle field is its own var() string
413
413
  fontFamily: vars.text.label.md.fontFamily,
414
414
  fontSize: vars.text.label.md.fontSize,
@@ -463,7 +463,7 @@ function TextField({
463
463
  borderWidth: vars.border.outline.control.width,
464
464
  borderStyle: vars.border.outline.control.style,
465
465
  borderRadius: vars.radii.control,
466
- minHeight: vars.sizing.hit.base,
466
+ minHeight: vars.sizing.hit,
467
467
  padding: `0 ${vars.spacing.inset.control.md}`,
468
468
  fontSize: vars.text.body.md.fontSize,
469
469
  lineHeight: vars.text.body.md.lineHeight,
@@ -540,7 +540,7 @@ For every component you generate, verify:
540
540
  2. **Focus** (§1) — every focusable element has *exactly one* of: per-ux `{ux}.{role}.border.focused`, system `focus.ring.*`, or valence-aware input override. Never both. Never neither.
541
541
  3. **Pairing** (§2) — every `colors.{ux}.{role}.background.{state}` is paired with `colors.{ux}.{role}.text.{state}` at the same state.
542
542
  4. **Disabled** (§3) — disabled controls and text use `colors.{ux}.{role}.{dimension}.disabled`; `opacity.disabled` appears only on `<img>`, `<Avatar>`, illustrations.
543
- 5. **Hit target** (§4) — interactive elements set `minWidth` or `minHeight` (not `width`/`height`) to `vars.sizing.hit.*`.
543
+ 5. **Hit target** (§4) — interactive elements set `minWidth` or `minHeight` (not `width`/`height`) to `vars.sizing.hit`.
544
544
  6. **Density** (§6) — the same step (`sm`/`md`/`lg`) is used across `spacing.inset.*`, `spacing.gap.*`, `sizing.icon.*`, and `text.label.*` within the component.
545
545
  7. **Validation** — invalid inputs use `input.negative.*` *role*, never `input.primary.*` + a fictitious `invalid` state.
546
546
  8. **Stateful CSS** — `:hover`, `:focus-visible`, `:active`, `:disabled` are written in a `.css` file or CSS-in-JS; inline `style` cannot express pseudo-classes.
@@ -594,7 +594,7 @@ const NativeButton = ({ disabled }: { disabled?: boolean }) => {
594
594
 
595
595
  `useResolvedTokens()` automatically applies coarse-pointer hit target overrides — mirrors the `@media (any-pointer: coarse)` block that `toCssVars` injects for CSS consumers.
596
596
 
597
- ⚠ **CSS-coupled tokens stay unresolved** (model.md §8): spacing steps (`calc(N * var(--tt-core-spacing-engine-unit))`), fluid `text.*.fontSize` / `sizing.hit.*` (`clamp()` + `cqi`), `sizing.viewport.*` (`dvh`/`dvw`), `sizing.measure.reading` (`ch`), and `spacing.gutter.*` are CSS expressions and are **not usable** outside a CSS engine. In non-CSS environments, consume colors, opacity, z-index, font weights/leading, and other scalar tokens — derive dimensional values from your platform's layout system.
597
+ ⚠ **CSS-coupled tokens stay unresolved** (model.md §8): spacing steps (`calc(N * var(--tt-core-spacing-engine-unit))`), fluid `text.*.fontSize` (`clamp()` + `cqi`), `sizing.hit` (`clamp()` + `rem`), `sizing.viewport.*` (`dvh`/`dvw`), `sizing.measure.reading` (`ch`), and `spacing.gutter.*` are CSS expressions and are **not usable** outside a CSS engine. In non-CSS environments, consume colors, opacity, z-index, font weights/leading, and other scalar tokens — derive dimensional values from your platform's layout system.
598
598
 
599
599
  ---
600
600
 
@@ -644,12 +644,12 @@ createTheme({
644
644
 
645
645
  **Override paths (all together):**
646
646
  - `core.spacing.{1..16}` — base spacing scale steps
647
- - `core.sizing.hit.fine.{min,base,prominent}` — fine-pointer hit targets
647
+ - `core.sizing.hit.fine` — fine-pointer hit targets
648
648
  - `core.sizing.icon.*` — icon ramp
649
649
  - `core.font.size.*` (optional) — type scale
650
650
 
651
651
  **Invariants:**
652
- - Touch targets (`core.sizing.hit.coarse.*`) must remain ≥ 44px regardless of fine-pointer values (a11y minimum).
652
+ - Touch targets (`core.sizing.hit.coarse`) must remain ≥ 44px regardless of fine-pointer values (a11y minimum).
653
653
  - Density propagates uniformly: if you reduce `core.spacing.4` by 25%, reduce other spacing steps proportionally to preserve the scale ratios.
654
654
  - Hit target floors in `clamp()` expressions must remain ergonomic (≥ 32px for fine pointer).
655
655
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ttoss/fsl-theme",
3
- "version": "2.1.1",
3
+ "version": "2.1.2",
4
4
  "description": "ttoss theme provider for UI.",
5
5
  "keywords": [
6
6
  "css-variables",