hextimator 0.8.0 → 0.9.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/CHANGELOG.md +7 -2
- package/dist/{HextimatePaletteBuilder-CNjOKwbY.d.ts → HextimatePaletteBuilder-doYcUGMD.d.ts} +3 -3
- package/dist/{chunk-KFH2N7CF.js → chunk-PJSNOIIB.js} +3 -3
- package/dist/cli.js +3 -3
- package/dist/{index-kecVj5cB.d.ts → index-rFqBuFuF.d.ts} +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -1
- package/dist/presets.d.ts +2 -2
- package/dist/react.d.ts +1 -1
- package/dist/react.js +1 -1
- package/llms.txt +5 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
##
|
|
1
|
+
## 0.9.0 (Latest)
|
|
2
|
+
|
|
3
|
+
- Widens default semantic hue ranges (`positive` [120,160], `negative` [5,30], `warning` [45,70] OKLCH arcs). Themes using library defaults may get different semantic scales.
|
|
4
|
+
|
|
5
|
+
## 0.8.0
|
|
2
6
|
|
|
3
7
|
- Adds optional `keyPrefix` on `HextimateFormatOptions` for flat `as: "object"` and `as: "json"` output (CLI: `--key-prefix`). Use `keyPrefix: "--"` when you want CSS custom property names as object keys without using stylesheet output.
|
|
4
8
|
|
|
5
|
-
## 0.7.0
|
|
9
|
+
## 0.7.0
|
|
6
10
|
|
|
7
11
|
- Adds an opt-in `invertedVariants: true` format option that emits an -inverted copy of every token holding the opposite mode's value, plus a companion hextimator/tailwind-inverted.css so utilities like `bg-surface-inverted` just work.
|
|
8
12
|
|
|
@@ -68,6 +72,7 @@ Migration checklist: [migration.md](https://github.com/fgrgic/hextimator/blob/ma
|
|
|
68
72
|
## 0.3.2
|
|
69
73
|
|
|
70
74
|
- [#99](https://github.com/fgrgic/hextimator/pull/99): Adds option to chain presets. Presets are merged, last added wins if both touch the same tokens.
|
|
75
|
+
|
|
71
76
|
- For example: `hextimate("#ff6677").preset(shadcn).preset(muted);`
|
|
72
77
|
- It also works with cli: `npx hextimate "#ff6677" -p shadcn -p vibrant`
|
|
73
78
|
|
package/dist/{HextimatePaletteBuilder-CNjOKwbY.d.ts → HextimatePaletteBuilder-doYcUGMD.d.ts}
RENAMED
|
@@ -158,9 +158,9 @@ interface HextimateStyleOptions {
|
|
|
158
158
|
* Degree ranges for the semantic colors.
|
|
159
159
|
* Determines where to look for "green", "red", "yellow" in the color space.
|
|
160
160
|
* If not provided, the default ranges will be used:
|
|
161
|
-
* - positive: [
|
|
162
|
-
* - negative: [5,
|
|
163
|
-
* - warning: [45,
|
|
161
|
+
* - positive: [120, 160] greens
|
|
162
|
+
* - negative: [5, 30] reds
|
|
163
|
+
* - warning: [45, 70] ambers
|
|
164
164
|
*/
|
|
165
165
|
semanticColorRanges?: {
|
|
166
166
|
positive?: [number, number];
|
|
@@ -1269,9 +1269,9 @@ function generateAccent(accent, themeType, options) {
|
|
|
1269
1269
|
}
|
|
1270
1270
|
|
|
1271
1271
|
// src/generate/generateSemanticColors.ts
|
|
1272
|
-
var POSITIVE_RANGE = [
|
|
1273
|
-
var NEGATIVE_RANGE = [5,
|
|
1274
|
-
var WARNING_RANGE = [45,
|
|
1272
|
+
var POSITIVE_RANGE = [120, 160];
|
|
1273
|
+
var NEGATIVE_RANGE = [5, 30];
|
|
1274
|
+
var WARNING_RANGE = [45, 70];
|
|
1275
1275
|
function generateSemanticColors(color, themeType, options) {
|
|
1276
1276
|
const positiveBaseColor = parse(
|
|
1277
1277
|
options?.semanticColors?.positive ?? _determineBaseColorFromRange(
|
package/dist/cli.js
CHANGED
|
@@ -1277,9 +1277,9 @@ function generateAccent(accent, themeType, options) {
|
|
|
1277
1277
|
}
|
|
1278
1278
|
|
|
1279
1279
|
// src/generate/generateSemanticColors.ts
|
|
1280
|
-
var POSITIVE_RANGE = [
|
|
1281
|
-
var NEGATIVE_RANGE = [5,
|
|
1282
|
-
var WARNING_RANGE = [45,
|
|
1280
|
+
var POSITIVE_RANGE = [120, 160];
|
|
1281
|
+
var NEGATIVE_RANGE = [5, 30];
|
|
1282
|
+
var WARNING_RANGE = [45, 70];
|
|
1283
1283
|
function generateSemanticColors(color, themeType, options) {
|
|
1284
1284
|
const positiveBaseColor = parse(
|
|
1285
1285
|
options?.semanticColors?.positive ?? _determineBaseColorFromRange(
|
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-
|
|
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-
|
|
3
|
-
export { i as presets } from './index-
|
|
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';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Daltonize a color for a specific type of color vision deficiency (CVD).
|
package/dist/index.js
CHANGED
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-
|
|
2
|
-
export { h as HextimatePreset } from './HextimatePaletteBuilder-
|
|
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';
|
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-
|
|
1
|
+
import { j as HextimateStyleOptions, h as HextimatePreset, H as HextimatePaletteBuilder, i as HextimateResult, F as FlatTokenMap, f as HextimateFormatOptions } from './HextimatePaletteBuilder-doYcUGMD.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
package/llms.txt
CHANGED
|
@@ -81,7 +81,7 @@ Pick the dark wrapper with `darkMode`: `"media"` (default) wraps dark tokens in
|
|
|
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
83
|
| `semanticColors` | `{ positive?, negative?, warning? }` | auto | Override semantic colors (green/red/amber) |
|
|
84
|
-
| `semanticColorRanges` | `{ positive?: [start,end], ... }` |
|
|
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) |
|
|
85
85
|
| `surfaceMaxChroma` | number | `0.01` | Max chroma for surface colors |
|
|
86
86
|
| `foregroundMaxChroma` | number | `0.01` | Max chroma for foreground colors |
|
|
87
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) |
|
|
@@ -182,6 +182,10 @@ const myPreset: HextimatePreset = {
|
|
|
182
182
|
// Derive a secondary role by rotating the accent hue
|
|
183
183
|
{ name: "secondary", color: { from: "accent", hue: 180 } },
|
|
184
184
|
],
|
|
185
|
+
variants: [
|
|
186
|
+
{ name: "muted", placement: { from: "weak" } },
|
|
187
|
+
{ name: "emphasis", placement: { from: "strong" } },
|
|
188
|
+
],
|
|
185
189
|
tokens: [
|
|
186
190
|
// Canvas tokens derived from surface
|
|
187
191
|
{ name: "canvas", value: { from: "surface" } },
|
package/package.json
CHANGED