hextimator 0.9.0 → 0.10.1

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.
@@ -1,4 +1,4 @@
1
- import { h as HextimatePreset } from './HextimatePaletteBuilder-doYcUGMD.js';
1
+ import { g as HextimatePreset } from './HextimatePaletteBuilder-CPteKnVL.js';
2
2
 
3
3
  /**
4
4
  * Darker accents on light themes, lighter accents on dark themes.
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { C as Color, a as CVDType, O as OKLCH, b as ColorSpace, c as ColorInSpace, d as ColorInput, H as HextimatePaletteBuilder } from './HextimatePaletteBuilder-doYcUGMD.js';
2
- export { D as DerivedToken, F as FlatTokenMap, e as FormatResult, f as HextimateFormatOptions, g as HextimateOptions, h as HextimatePreset, i as HextimateResult, j as HextimateStyleOptions, N as NestedTokenMap, T as ThemeAdjustments, k as TokenValue, V as VariantPlacement } from './HextimatePaletteBuilder-doYcUGMD.js';
3
- export { i as presets } from './index-rFqBuFuF.js';
1
+ import { C as Color, a as CVDType, O as OKLCH, b as ColorSpace, c as ColorInSpace, d as ColorInput, H as HextimatePaletteBuilder } from './HextimatePaletteBuilder-CPteKnVL.js';
2
+ export { D as DerivedToken, F as FlatTokenMap, e as FormatResult, f as HextimateFormatOptions, g as HextimatePreset, h as HextimateResult, i as HextimateStyleOptions, N as NestedTokenMap, T as ThemeAdjustments, j as TokenValue, V as VariantPlacement } from './HextimatePaletteBuilder-CPteKnVL.js';
3
+ export { i as presets } from './index-doqaWzrz.js';
4
4
 
5
5
  /**
6
6
  * Daltonize a color for a specific type of color vision deficiency (CVD).
package/dist/index.js CHANGED
@@ -6,10 +6,10 @@ import {
6
6
  hextimate,
7
7
  parse,
8
8
  simulateColor
9
- } from "./chunk-PJSNOIIB.js";
9
+ } from "./chunk-64DBUA5U.js";
10
10
  import {
11
11
  presets_exports
12
- } from "./chunk-NTF3K3U3.js";
12
+ } from "./chunk-TEZ2I4CJ.js";
13
13
  export {
14
14
  HextimateError,
15
15
  HextimatePaletteBuilder,
package/dist/presets.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export { b as bold, m as mui, a as muted, s as shadcn, t as tinted, v as vibrant } from './index-rFqBuFuF.js';
2
- export { h as HextimatePreset } from './HextimatePaletteBuilder-doYcUGMD.js';
1
+ export { b as bold, m as mui, a as muted, s as shadcn, t as tinted, v as vibrant } from './index-doqaWzrz.js';
2
+ export { g as HextimatePreset } from './HextimatePaletteBuilder-CPteKnVL.js';
package/dist/presets.js CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  shadcn,
6
6
  tinted,
7
7
  vibrant
8
- } from "./chunk-NTF3K3U3.js";
8
+ } from "./chunk-TEZ2I4CJ.js";
9
9
  export {
10
10
  bold,
11
11
  mui,
package/dist/react.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { j as HextimateStyleOptions, h as HextimatePreset, H as HextimatePaletteBuilder, i as HextimateResult, F as FlatTokenMap, f as HextimateFormatOptions } from './HextimatePaletteBuilder-doYcUGMD.js';
1
+ import { i as HextimateStyleOptions, g as HextimatePreset, H as HextimatePaletteBuilder, h as HextimateResult, F as FlatTokenMap, f as HextimateFormatOptions } from './HextimatePaletteBuilder-CPteKnVL.js';
2
2
  import * as react_jsx_runtime from 'react/jsx-runtime';
3
3
  import { PropsWithChildren, RefObject, CSSProperties, ReactNode } from 'react';
4
4
 
package/dist/react.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  hextimate
3
- } from "./chunk-PJSNOIIB.js";
4
- import "./chunk-NTF3K3U3.js";
3
+ } from "./chunk-64DBUA5U.js";
4
+ import "./chunk-TEZ2I4CJ.js";
5
5
 
6
6
  // src/react/hextimator-provider.tsx
7
7
  import {
package/fallback.css CHANGED
@@ -3,22 +3,22 @@
3
3
  --surface-strong: #fcfcfc;
4
4
  --surface-weak: #ebebeb;
5
5
  --surface-foreground: #030303;
6
- --accent: #aeaeae;
7
- --accent-strong: #989898;
8
- --accent-weak: #cecece;
9
- --accent-foreground: #030303;
10
- --positive: #aeaeae;
11
- --positive-strong: #989898;
12
- --positive-weak: #cecece;
13
- --positive-foreground: #030303;
14
- --negative: #aeaeae;
15
- --negative-strong: #989898;
16
- --negative-weak: #cecece;
17
- --negative-foreground: #030303;
18
- --warning: #aeaeae;
19
- --warning-strong: #989898;
20
- --warning-weak: #cecece;
21
- --warning-foreground: #030303;
6
+ --accent: #454545;
7
+ --accent-strong: #383838;
8
+ --accent-weak: #525252;
9
+ --accent-foreground: #f5f5f5;
10
+ --positive: #454545;
11
+ --positive-strong: #383838;
12
+ --positive-weak: #525252;
13
+ --positive-foreground: #f5f5f5;
14
+ --negative: #454545;
15
+ --negative-strong: #383838;
16
+ --negative-weak: #525252;
17
+ --negative-foreground: #f5f5f5;
18
+ --caution: #454545;
19
+ --caution-strong: #383838;
20
+ --caution-weak: #525252;
21
+ --caution-foreground: #f5f5f5;
22
22
  --brand-exact: #737373;
23
23
  --brand-exact-foreground: #f5f5f5;
24
24
  }
@@ -28,22 +28,22 @@
28
28
  --surface-strong: #030303;
29
29
  --surface-weak: #2e2e2e;
30
30
  --surface-foreground: #f5f5f5;
31
- --accent: #a8a8a8;
32
- --accent-strong: #b7b7b7;
33
- --accent-weak: #989898;
34
- --accent-foreground: #030303;
35
- --positive: #a8a8a8;
36
- --positive-strong: #b7b7b7;
37
- --positive-weak: #989898;
38
- --positive-foreground: #030303;
39
- --negative: #a8a8a8;
40
- --negative-strong: #b7b7b7;
41
- --negative-weak: #989898;
42
- --negative-foreground: #030303;
43
- --warning: #a8a8a8;
44
- --warning-strong: #b7b7b7;
45
- --warning-weak: #989898;
46
- --warning-foreground: #030303;
31
+ --accent: #454545;
32
+ --accent-strong: #525252;
33
+ --accent-weak: #2b2b2b;
34
+ --accent-foreground: #f5f5f5;
35
+ --positive: #454545;
36
+ --positive-strong: #525252;
37
+ --positive-weak: #2b2b2b;
38
+ --positive-foreground: #f5f5f5;
39
+ --negative: #454545;
40
+ --negative-strong: #525252;
41
+ --negative-weak: #2b2b2b;
42
+ --negative-foreground: #f5f5f5;
43
+ --caution: #454545;
44
+ --caution-strong: #525252;
45
+ --caution-weak: #2b2b2b;
46
+ --caution-foreground: #f5f5f5;
47
47
  --brand-exact: #737373;
48
48
  --brand-exact-foreground: #f5f5f5;
49
49
  }
@@ -53,22 +53,22 @@
53
53
  --surface-strong: #030303;
54
54
  --surface-weak: #2e2e2e;
55
55
  --surface-foreground: #f5f5f5;
56
- --accent: #a8a8a8;
57
- --accent-strong: #b7b7b7;
58
- --accent-weak: #989898;
59
- --accent-foreground: #030303;
60
- --positive: #a8a8a8;
61
- --positive-strong: #b7b7b7;
62
- --positive-weak: #989898;
63
- --positive-foreground: #030303;
64
- --negative: #a8a8a8;
65
- --negative-strong: #b7b7b7;
66
- --negative-weak: #989898;
67
- --negative-foreground: #030303;
68
- --warning: #a8a8a8;
69
- --warning-strong: #b7b7b7;
70
- --warning-weak: #989898;
71
- --warning-foreground: #030303;
56
+ --accent: #454545;
57
+ --accent-strong: #525252;
58
+ --accent-weak: #2b2b2b;
59
+ --accent-foreground: #f5f5f5;
60
+ --positive: #454545;
61
+ --positive-strong: #525252;
62
+ --positive-weak: #2b2b2b;
63
+ --positive-foreground: #f5f5f5;
64
+ --negative: #454545;
65
+ --negative-strong: #525252;
66
+ --negative-weak: #2b2b2b;
67
+ --negative-foreground: #f5f5f5;
68
+ --caution: #454545;
69
+ --caution-strong: #525252;
70
+ --caution-weak: #2b2b2b;
71
+ --caution-foreground: #f5f5f5;
72
72
  --brand-exact: #737373;
73
73
  --brand-exact-foreground: #f5f5f5;
74
74
  }
package/llms.txt CHANGED
@@ -80,12 +80,12 @@ Pick the dark wrapper with `darkMode`: `"media"` (default) wraps dark tokens in
80
80
  | `surfaceColor` | color input | auto-derived | Override surface/neutral baseline color |
81
81
  | `surfaceHueShift` | degrees | `0` | Rotate surface hue relative to accent. Ignored if `surfaceColor` set |
82
82
  | `invertDarkModeSurfaceAccent` | boolean | `false` | Swap surface/accent hues in dark mode. Useful when the accent should become the background in dark mode. Requires `surfaceColor` |
83
- | `semanticColors` | `{ positive?, negative?, warning? }` | auto | Override semantic colors (green/red/amber) |
84
- | `semanticColorRanges` | `{ positive?: [start,end], ... }` | `positive: [120,160]`, `negative: [5,30]`, `warning: [45,70]` | OKLCH hue degree arcs for picking semantic bases (clockwise; `[350,10]` wraps) |
83
+ | `semanticColors` | `{ positive?, negative?, caution? }` | auto | Override semantic colors (green/red/amber) |
84
+ | `semanticColorRanges` | `{ positive?: [start,end], ... }` | `positive: [120,160]`, `negative: [5,30]`, `caution: [45,70]` | OKLCH hue degree arcs for picking semantic bases (clockwise; `[350,10]` wraps) |
85
85
  | `surfaceMaxChroma` | number | `0.01` | Max chroma for surface colors |
86
86
  | `foregroundMaxChroma` | number | `0.01` | Max chroma for foreground colors |
87
- | `light` | `{ baseLightness?, maxChroma? }` | `{ baseLightness: 0.7 }` | Light theme adjustments. `baseLightness` is the absolute OKLCH anchor for the accent (distinct from the relative `lightness` offset on derived tokens) |
88
- | `dark` | `{ baseLightness?, maxChroma? }` | `{ baseLightness: 0.6 }` | Dark theme adjustments |
87
+ | `light` | `{ baseLightness?, maxChroma? }` | **0.10.0+:** input OKLCH `l` (clamped). **≤0.9.x:** implicit `0.7` when omitted. | Light theme adjustments. `baseLightness` is the absolute OKLCH anchor for the accent when set; otherwise the default above applies (distinct from the relative `lightness` offset on derived tokens) |
88
+ | `dark` | `{ baseLightness?, maxChroma? }` | Same seed as light (**0.10.0+**) or implicit `0.6` (**≤0.9.x**) when omitted unless `dark.baseLightness` is set | Dark theme adjustments |
89
89
  | `minContrastRatio` | `"AAA"`, `"AA"`, or number | `"AAA"` | WCAG contrast target (AAA=7, AA=4.5) |
90
90
  | `hueShift` | degrees | `0` | Per-variant hue rotation |
91
91
 
@@ -93,7 +93,7 @@ Pick the dark wrapper with `darkMode`: `"media"` (default) wraps dark tokens in
93
93
 
94
94
  Every palette includes 5 roles x 4 variants + 2 brand tokens = 22 tokens:
95
95
 
96
- - Roles: `surface`, `accent`, `positive`, `negative`, `warning`
96
+ - Roles: `surface`, `accent`, `positive`, `negative`, `caution`
97
97
  - Variants: `DEFAULT` (no suffix), `strong`, `weak`, `foreground`
98
98
  - Brand tokens: `brand-exact` (the exact input color, unmodified), `brand-exact-foreground` (best-contrast foreground for that color)
99
99
 
@@ -245,7 +245,7 @@ const asScss = hextimate("#6366F1").preset(myPreset).format({ as: "scss" });
245
245
  2. Map each token to a hextimator source: which built-in role/variant is it closest to?
246
246
  3. Use `roleNames`/`variantNames` to rename the 20 built-in tokens to match the app's naming
247
247
  4. Use `tokens` for any extra tokens not covered by the built-in 5x4 grid, deriving them with `from` + `emphasis`/`lightness`/`chroma`/`hue` offsets
248
- 5. Use `roles` if the app has color categories beyond surface/accent/positive/negative/warning
248
+ 5. Use `roles` if the app has color categories beyond surface/accent/positive/negative/caution
249
249
  6. Set `format` defaults to match what the app expects (CSS vars, object, etc.)
250
250
 
251
251
  ### Standalone tokens with per-theme values
@@ -313,15 +313,18 @@ Both commands are identical. Use whichever you prefer.
313
313
  | `--hue-shift` | Per-variant hue shift | `0` |
314
314
  | `--surface-max-chroma` | Max chroma for surface | `0.01` |
315
315
  | `--fg-max-chroma` | Max chroma for foreground | `0.01` |
316
- | `--light-lightness` | Light theme lightness 0-1 | `0.7` |
316
+ | `--light-lightness` | Sets `light.baseLightness` | Omit: **0.10.0+** derives from input OKLCH `l`; **≤0.9.x** `0.7` |
317
+ | `--light-base-lightness-range` | Sets `light.baseLightnessRange` as `min,max` (OKLCH 0–1) | default light `0.4,0.9` |
318
+ | `--base-lightness-range` | Sets top-level `baseLightnessRange` for both themes (`min,max`) | per-theme defaults or overridden by `--light-*` / `--dark-*` |
317
319
  | `--light-max-chroma` | Light theme max chroma | — |
318
- | `--dark-lightness` | Dark theme lightness 0-1 | `0.6` |
320
+ | `--dark-lightness` | Sets `dark.baseLightness` | Omit: **0.10.0+** derives from input OKLCH `l`; **≤0.9.x** `0.6` |
321
+ | `--dark-base-lightness-range` | Sets `dark.baseLightnessRange` as `min,max` (OKLCH 0–1) | default dark `0.2,0.8` |
319
322
  | `--dark-max-chroma` | Dark theme max chroma | — |
320
323
  | `--min-contrast` | `AAA`, `AA`, or number | `AAA` |
321
324
  | `--invert-dark` | Swap surface/accent hues in dark mode (requires --surface-color) | — |
322
325
  | `--positive` | Override positive/success color | auto |
323
326
  | `--negative` | Override negative/error color | auto |
324
- | `--warning` | Override warning color | auto |
327
+ | `--caution` | Override caution color | auto |
325
328
  | `--simulate` | Simulate CVD: `protanopia`, `deuteranopia`, `tritanopia`, `achromatopsia` | — |
326
329
  | `--adapt` | Adapt palette for CVD type | — |
327
330
  | `--cvd-severity` | CVD severity 0-1 | `1` |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hextimator",
3
- "version": "0.9.0",
3
+ "version": "0.10.1",
4
4
  "description": "Runtime theming for multi-tenant apps: per-tenant branded themes from a single brand color, with WCAG contrast guarantees.",
5
5
  "keywords": [
6
6
  "runtime-theming",
@@ -15,8 +15,8 @@
15
15
  --color-negative-strong-inverted: var(--negative-strong-inverted);
16
16
  --color-negative-weak-inverted: var(--negative-weak-inverted);
17
17
  --color-negative-foreground-inverted: var(--negative-foreground-inverted);
18
- --color-warning-inverted: var(--warning-inverted);
19
- --color-warning-strong-inverted: var(--warning-strong-inverted);
20
- --color-warning-weak-inverted: var(--warning-weak-inverted);
21
- --color-warning-foreground-inverted: var(--warning-foreground-inverted);
18
+ --color-caution-inverted: var(--caution-inverted);
19
+ --color-caution-strong-inverted: var(--caution-strong-inverted);
20
+ --color-caution-weak-inverted: var(--caution-weak-inverted);
21
+ --color-caution-foreground-inverted: var(--caution-foreground-inverted);
22
22
  }
package/tailwind.css CHANGED
@@ -15,10 +15,10 @@
15
15
  --color-negative-strong: var(--negative-strong);
16
16
  --color-negative-weak: var(--negative-weak);
17
17
  --color-negative-foreground: var(--negative-foreground);
18
- --color-warning: var(--warning);
19
- --color-warning-strong: var(--warning-strong);
20
- --color-warning-weak: var(--warning-weak);
21
- --color-warning-foreground: var(--warning-foreground);
18
+ --color-caution: var(--caution);
19
+ --color-caution-strong: var(--caution-strong);
20
+ --color-caution-weak: var(--caution-weak);
21
+ --color-caution-foreground: var(--caution-foreground);
22
22
  --color-brand-exact: var(--brand-exact);
23
23
  --color-brand-exact-foreground: var(--brand-exact-foreground);
24
24
  }