hextimator 0.11.0 → 0.12.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.
- package/CHANGELOG.md +20 -0
- package/README.md +4 -0
- package/dist/{HextimatePaletteBuilder-CPteKnVL.d.ts → HextimatePaletteBuilder-REeEsEOu.d.ts} +5 -1
- package/dist/{chunk-TF34PRUI.js → chunk-SG5HNU7M.js} +75 -3
- package/dist/cli.js +97 -21
- package/dist/{index-doqaWzrz.d.ts → index-DSfF_JsR.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/package.json +9 -23
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,23 @@
|
|
|
1
|
+
## 0.12.1
|
|
2
|
+
|
|
3
|
+
### Patch Changes
|
|
4
|
+
|
|
5
|
+
- [#152](https://github.com/fgrgic/hextimator/pull/152) [`5de9e29`](https://github.com/fgrgic/hextimator/commit/5de9e2933cf57f2f323aa283c6eea15678665edc) Thanks [@fgrgic](https://github.com/fgrgic)! - trims the keywords of the package
|
|
6
|
+
|
|
7
|
+
- [#157](https://github.com/fgrgic/hextimator/pull/157) [`0fe89fa`](https://github.com/fgrgic/hextimator/commit/0fe89fa52a472f271b649360abeac6f2cbd80ffd) Thanks [@fgrgic](https://github.com/fgrgic)! - Fix `-f json` double-encoding in the CLI. With the default `--theme both`, the `light` and `dark` values were emitted as escaped JSON strings nested inside JSON, breaking `jq` pipelines. The CLI now emits a single, correctly-encoded JSON document with `light`/`dark` as real objects.
|
|
8
|
+
|
|
9
|
+
## 0.12.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#150](https://github.com/fgrgic/hextimator/pull/150) [`b7800b9`](https://github.com/fgrgic/hextimator/commit/b7800b9fac32fe3ef245f60ed39c954c63e73785) Thanks [@fgrgic](https://github.com/fgrgic)! - Adds foreground anchored variants
|
|
14
|
+
|
|
15
|
+
You can add a new variant from foreground now. By default it will be the one that has the lowest still in rangecontrast ratio with its surface.
|
|
16
|
+
|
|
17
|
+
The generation logic can also be overwritten by providing custom `emphasis` value (e.g. `emphasis: -0.1`)
|
|
18
|
+
|
|
19
|
+
If more than one variant is 'foreground-anchored', by default it will be the same as the one it's branching from. You'll need to provide custom emphasis value to make them distinct.
|
|
20
|
+
|
|
1
21
|
## 0.11.0
|
|
2
22
|
|
|
3
23
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -10,6 +10,8 @@ Per-tenant themes from a single brand color: Runtime theming for B2B2C and white
|
|
|
10
10
|
|
|
11
11
|
Your customers pick a brand color. Your app looks good. Every time. No per-customer design reviews, no manual tuning, no edge cases where "that shade of yellow" breaks your UI.
|
|
12
12
|
|
|
13
|
+
Each call adds well under a millisecond (~0.4ms [^perf]) and is fully deterministic: the same color and options always produce identical tokens. Therefore, it is safe to run on the request path and trivial to cache.
|
|
14
|
+
|
|
13
15
|
Try it in the playground: **[hextimator.com](https://hextimator.com)**
|
|
14
16
|
|
|
15
17
|
## Why `hextimator` exists
|
|
@@ -92,3 +94,5 @@ Plus **`brand-exact`** (your input color, unmodified) and **`brand-exact-foregro
|
|
|
92
94
|
## Contributing
|
|
93
95
|
|
|
94
96
|
Issues and PRs are welcome at [github.com/fgrgic/hextimator](https://github.com/fgrgic/hextimator/issues).
|
|
97
|
+
|
|
98
|
+
[^perf]: Measured on a MacBook with Apple Silicon (M2 Max) under Bun. Treat it as a ballpark; your hardware and runtime will vary.
|
package/dist/{HextimatePaletteBuilder-CPteKnVL.d.ts → HextimatePaletteBuilder-REeEsEOu.d.ts}
RENAMED
|
@@ -343,8 +343,10 @@ interface HextimateResult<F = FormatResult> {
|
|
|
343
343
|
}
|
|
344
344
|
/**
|
|
345
345
|
* Where to place a new variant relative to existing ones.
|
|
346
|
-
* - `{ from: "strong" }` — one step past
|
|
346
|
+
* - `{ from: "strong" }` — one step past strong, redistributed
|
|
347
347
|
* - `{ from: "weak", chroma: -0.02 }` — one step past weak, with a chroma offset
|
|
348
|
+
* - `{ from: "foreground" }` — softest foreground that still meets contrast
|
|
349
|
+
* - `{ from: "foreground", emphasis: -0.1 }` — foreground, placed 0.1 weaker (theme-aware: positive = more contrast)
|
|
348
350
|
* - `{ between: ["DEFAULT", "weak"] }` — midpoint between two variants
|
|
349
351
|
*/
|
|
350
352
|
type VariantPlacement = {
|
|
@@ -397,6 +399,7 @@ declare class HextimatePaletteBuilder {
|
|
|
397
399
|
private readonly standaloneTokens;
|
|
398
400
|
private readonly weakSideVariants;
|
|
399
401
|
private readonly strongSideVariants;
|
|
402
|
+
private readonly foregroundAnchoredVariants;
|
|
400
403
|
private readonly betweenVariants;
|
|
401
404
|
private presetFormatDefaults?;
|
|
402
405
|
constructor(color: Color);
|
|
@@ -535,6 +538,7 @@ declare class HextimatePaletteBuilder {
|
|
|
535
538
|
private buildInvertedEntries;
|
|
536
539
|
private applyRole;
|
|
537
540
|
private applyVariant;
|
|
541
|
+
private applyAnchoredVariant;
|
|
538
542
|
private applyToken;
|
|
539
543
|
private resolveStandaloneTokens;
|
|
540
544
|
private resolveTokenValue;
|
|
@@ -1708,6 +1708,7 @@ var HextimatePaletteBuilder = class _HextimatePaletteBuilder {
|
|
|
1708
1708
|
standaloneTokens = [];
|
|
1709
1709
|
weakSideVariants = ["weak"];
|
|
1710
1710
|
strongSideVariants = ["strong"];
|
|
1711
|
+
foregroundAnchoredVariants = /* @__PURE__ */ new Set();
|
|
1711
1712
|
betweenVariants = [];
|
|
1712
1713
|
presetFormatDefaults;
|
|
1713
1714
|
constructor(color) {
|
|
@@ -1742,6 +1743,7 @@ var HextimatePaletteBuilder = class _HextimatePaletteBuilder {
|
|
|
1742
1743
|
this.weakSideVariants.push("weak");
|
|
1743
1744
|
this.strongSideVariants.length = 0;
|
|
1744
1745
|
this.strongSideVariants.push("strong");
|
|
1746
|
+
this.foregroundAnchoredVariants.clear();
|
|
1745
1747
|
this.betweenVariants.length = 0;
|
|
1746
1748
|
this.presetFormatDefaults = void 0;
|
|
1747
1749
|
this.applyToken("brand-exact", this.inputColor);
|
|
@@ -2078,6 +2080,50 @@ var HextimatePaletteBuilder = class _HextimatePaletteBuilder {
|
|
|
2078
2080
|
applyVariant(name, placement) {
|
|
2079
2081
|
if ("from" in placement) {
|
|
2080
2082
|
const edge = placement.from;
|
|
2083
|
+
const chromaOffset = placement.chroma ?? 0;
|
|
2084
|
+
const hueOffset = placement.hue ?? 0;
|
|
2085
|
+
const edgeIsForegroundAnchored = edge === "foreground" || this.foregroundAnchoredVariants.has(edge);
|
|
2086
|
+
if (placement.emphasis !== void 0) {
|
|
2087
|
+
this.applyAnchoredVariant(
|
|
2088
|
+
name,
|
|
2089
|
+
edge,
|
|
2090
|
+
placement.emphasis,
|
|
2091
|
+
chromaOffset,
|
|
2092
|
+
hueOffset,
|
|
2093
|
+
edgeIsForegroundAnchored
|
|
2094
|
+
);
|
|
2095
|
+
if (edgeIsForegroundAnchored) {
|
|
2096
|
+
this.foregroundAnchoredVariants.add(name);
|
|
2097
|
+
}
|
|
2098
|
+
return;
|
|
2099
|
+
}
|
|
2100
|
+
if (edge === "foreground") {
|
|
2101
|
+
const contrastTarget = resolveContrastRatio(this.options.minContrastRatio) + 0.15;
|
|
2102
|
+
for (const palette of [this.lightPalette, this.darkPalette]) {
|
|
2103
|
+
for (const role of Object.keys(palette)) {
|
|
2104
|
+
const scale = palette[role];
|
|
2105
|
+
const foreground = convert(parse(scale.foreground), "oklch");
|
|
2106
|
+
const boundaryL = findContrastBoundaryLightness(
|
|
2107
|
+
parse(scale.foreground),
|
|
2108
|
+
parse(scale.DEFAULT),
|
|
2109
|
+
contrastTarget
|
|
2110
|
+
);
|
|
2111
|
+
scale[name] = {
|
|
2112
|
+
...foreground,
|
|
2113
|
+
l: boundaryL ?? foreground.l,
|
|
2114
|
+
c: Math.max(0, foreground.c + chromaOffset),
|
|
2115
|
+
h: wrapHue(foreground.h + hueOffset)
|
|
2116
|
+
};
|
|
2117
|
+
}
|
|
2118
|
+
}
|
|
2119
|
+
this.foregroundAnchoredVariants.add(name);
|
|
2120
|
+
return;
|
|
2121
|
+
}
|
|
2122
|
+
if (this.foregroundAnchoredVariants.has(edge)) {
|
|
2123
|
+
this.applyAnchoredVariant(name, edge, 0, chromaOffset, hueOffset, true);
|
|
2124
|
+
this.foregroundAnchoredVariants.add(name);
|
|
2125
|
+
return;
|
|
2126
|
+
}
|
|
2081
2127
|
for (const palette of [this.lightPalette, this.darkPalette]) {
|
|
2082
2128
|
for (const role of Object.keys(palette)) {
|
|
2083
2129
|
const scale = palette[role];
|
|
@@ -2090,15 +2136,15 @@ var HextimatePaletteBuilder = class _HextimatePaletteBuilder {
|
|
|
2090
2136
|
this.redistributeAllScales(sideVariants);
|
|
2091
2137
|
this.recomputeBetweenVariants();
|
|
2092
2138
|
}
|
|
2093
|
-
if (
|
|
2139
|
+
if (chromaOffset || hueOffset) {
|
|
2094
2140
|
for (const palette of [this.lightPalette, this.darkPalette]) {
|
|
2095
2141
|
for (const role of Object.keys(palette)) {
|
|
2096
2142
|
const scale = palette[role];
|
|
2097
2143
|
const oklch = convert(parse(scale[name]), "oklch");
|
|
2098
2144
|
scale[name] = {
|
|
2099
2145
|
...oklch,
|
|
2100
|
-
c: Math.max(0, oklch.c +
|
|
2101
|
-
h: wrapHue(oklch.h +
|
|
2146
|
+
c: Math.max(0, oklch.c + chromaOffset),
|
|
2147
|
+
h: wrapHue(oklch.h + hueOffset)
|
|
2102
2148
|
};
|
|
2103
2149
|
}
|
|
2104
2150
|
}
|
|
@@ -2117,6 +2163,32 @@ var HextimatePaletteBuilder = class _HextimatePaletteBuilder {
|
|
|
2117
2163
|
}
|
|
2118
2164
|
}
|
|
2119
2165
|
}
|
|
2166
|
+
applyAnchoredVariant(name, edge, emphasis, chromaOffset, hueOffset, anchorIsForeground) {
|
|
2167
|
+
for (const [palette, themeType] of [
|
|
2168
|
+
[this.lightPalette, "light"],
|
|
2169
|
+
[this.darkPalette, "dark"]
|
|
2170
|
+
]) {
|
|
2171
|
+
const themeDirection = themeType === "light" ? -1 : 1;
|
|
2172
|
+
for (const role of Object.keys(palette)) {
|
|
2173
|
+
const scale = palette[role];
|
|
2174
|
+
const anchor = convert(parse(scale[edge]), "oklch");
|
|
2175
|
+
let contrastDirection = themeDirection;
|
|
2176
|
+
if (anchorIsForeground) {
|
|
2177
|
+
const baseL = convert(parse(scale.DEFAULT), "oklch").l;
|
|
2178
|
+
contrastDirection = anchor.l >= baseL ? 1 : -1;
|
|
2179
|
+
}
|
|
2180
|
+
scale[name] = {
|
|
2181
|
+
...anchor,
|
|
2182
|
+
l: Math.max(
|
|
2183
|
+
0,
|
|
2184
|
+
Math.min(1, anchor.l + emphasis * contrastDirection)
|
|
2185
|
+
),
|
|
2186
|
+
c: Math.max(0, anchor.c + chromaOffset),
|
|
2187
|
+
h: wrapHue(anchor.h + hueOffset)
|
|
2188
|
+
};
|
|
2189
|
+
}
|
|
2190
|
+
}
|
|
2191
|
+
}
|
|
2120
2192
|
applyToken(name, value) {
|
|
2121
2193
|
this.standaloneTokens.push({ name, value });
|
|
2122
2194
|
}
|
package/dist/cli.js
CHANGED
|
@@ -1716,6 +1716,7 @@ var HextimatePaletteBuilder = class _HextimatePaletteBuilder {
|
|
|
1716
1716
|
standaloneTokens = [];
|
|
1717
1717
|
weakSideVariants = ["weak"];
|
|
1718
1718
|
strongSideVariants = ["strong"];
|
|
1719
|
+
foregroundAnchoredVariants = /* @__PURE__ */ new Set();
|
|
1719
1720
|
betweenVariants = [];
|
|
1720
1721
|
presetFormatDefaults;
|
|
1721
1722
|
constructor(color) {
|
|
@@ -1750,6 +1751,7 @@ var HextimatePaletteBuilder = class _HextimatePaletteBuilder {
|
|
|
1750
1751
|
this.weakSideVariants.push("weak");
|
|
1751
1752
|
this.strongSideVariants.length = 0;
|
|
1752
1753
|
this.strongSideVariants.push("strong");
|
|
1754
|
+
this.foregroundAnchoredVariants.clear();
|
|
1753
1755
|
this.betweenVariants.length = 0;
|
|
1754
1756
|
this.presetFormatDefaults = void 0;
|
|
1755
1757
|
this.applyToken("brand-exact", this.inputColor);
|
|
@@ -2086,6 +2088,50 @@ var HextimatePaletteBuilder = class _HextimatePaletteBuilder {
|
|
|
2086
2088
|
applyVariant(name, placement) {
|
|
2087
2089
|
if ("from" in placement) {
|
|
2088
2090
|
const edge = placement.from;
|
|
2091
|
+
const chromaOffset = placement.chroma ?? 0;
|
|
2092
|
+
const hueOffset = placement.hue ?? 0;
|
|
2093
|
+
const edgeIsForegroundAnchored = edge === "foreground" || this.foregroundAnchoredVariants.has(edge);
|
|
2094
|
+
if (placement.emphasis !== void 0) {
|
|
2095
|
+
this.applyAnchoredVariant(
|
|
2096
|
+
name,
|
|
2097
|
+
edge,
|
|
2098
|
+
placement.emphasis,
|
|
2099
|
+
chromaOffset,
|
|
2100
|
+
hueOffset,
|
|
2101
|
+
edgeIsForegroundAnchored
|
|
2102
|
+
);
|
|
2103
|
+
if (edgeIsForegroundAnchored) {
|
|
2104
|
+
this.foregroundAnchoredVariants.add(name);
|
|
2105
|
+
}
|
|
2106
|
+
return;
|
|
2107
|
+
}
|
|
2108
|
+
if (edge === "foreground") {
|
|
2109
|
+
const contrastTarget = resolveContrastRatio(this.options.minContrastRatio) + 0.15;
|
|
2110
|
+
for (const palette of [this.lightPalette, this.darkPalette]) {
|
|
2111
|
+
for (const role of Object.keys(palette)) {
|
|
2112
|
+
const scale = palette[role];
|
|
2113
|
+
const foreground = convert(parse(scale.foreground), "oklch");
|
|
2114
|
+
const boundaryL = findContrastBoundaryLightness(
|
|
2115
|
+
parse(scale.foreground),
|
|
2116
|
+
parse(scale.DEFAULT),
|
|
2117
|
+
contrastTarget
|
|
2118
|
+
);
|
|
2119
|
+
scale[name] = {
|
|
2120
|
+
...foreground,
|
|
2121
|
+
l: boundaryL ?? foreground.l,
|
|
2122
|
+
c: Math.max(0, foreground.c + chromaOffset),
|
|
2123
|
+
h: wrapHue(foreground.h + hueOffset)
|
|
2124
|
+
};
|
|
2125
|
+
}
|
|
2126
|
+
}
|
|
2127
|
+
this.foregroundAnchoredVariants.add(name);
|
|
2128
|
+
return;
|
|
2129
|
+
}
|
|
2130
|
+
if (this.foregroundAnchoredVariants.has(edge)) {
|
|
2131
|
+
this.applyAnchoredVariant(name, edge, 0, chromaOffset, hueOffset, true);
|
|
2132
|
+
this.foregroundAnchoredVariants.add(name);
|
|
2133
|
+
return;
|
|
2134
|
+
}
|
|
2089
2135
|
for (const palette of [this.lightPalette, this.darkPalette]) {
|
|
2090
2136
|
for (const role of Object.keys(palette)) {
|
|
2091
2137
|
const scale = palette[role];
|
|
@@ -2098,15 +2144,15 @@ var HextimatePaletteBuilder = class _HextimatePaletteBuilder {
|
|
|
2098
2144
|
this.redistributeAllScales(sideVariants);
|
|
2099
2145
|
this.recomputeBetweenVariants();
|
|
2100
2146
|
}
|
|
2101
|
-
if (
|
|
2147
|
+
if (chromaOffset || hueOffset) {
|
|
2102
2148
|
for (const palette of [this.lightPalette, this.darkPalette]) {
|
|
2103
2149
|
for (const role of Object.keys(palette)) {
|
|
2104
2150
|
const scale = palette[role];
|
|
2105
2151
|
const oklch = convert(parse(scale[name]), "oklch");
|
|
2106
2152
|
scale[name] = {
|
|
2107
2153
|
...oklch,
|
|
2108
|
-
c: Math.max(0, oklch.c +
|
|
2109
|
-
h: wrapHue(oklch.h +
|
|
2154
|
+
c: Math.max(0, oklch.c + chromaOffset),
|
|
2155
|
+
h: wrapHue(oklch.h + hueOffset)
|
|
2110
2156
|
};
|
|
2111
2157
|
}
|
|
2112
2158
|
}
|
|
@@ -2125,6 +2171,32 @@ var HextimatePaletteBuilder = class _HextimatePaletteBuilder {
|
|
|
2125
2171
|
}
|
|
2126
2172
|
}
|
|
2127
2173
|
}
|
|
2174
|
+
applyAnchoredVariant(name, edge, emphasis, chromaOffset, hueOffset, anchorIsForeground) {
|
|
2175
|
+
for (const [palette, themeType] of [
|
|
2176
|
+
[this.lightPalette, "light"],
|
|
2177
|
+
[this.darkPalette, "dark"]
|
|
2178
|
+
]) {
|
|
2179
|
+
const themeDirection = themeType === "light" ? -1 : 1;
|
|
2180
|
+
for (const role of Object.keys(palette)) {
|
|
2181
|
+
const scale = palette[role];
|
|
2182
|
+
const anchor = convert(parse(scale[edge]), "oklch");
|
|
2183
|
+
let contrastDirection = themeDirection;
|
|
2184
|
+
if (anchorIsForeground) {
|
|
2185
|
+
const baseL = convert(parse(scale.DEFAULT), "oklch").l;
|
|
2186
|
+
contrastDirection = anchor.l >= baseL ? 1 : -1;
|
|
2187
|
+
}
|
|
2188
|
+
scale[name] = {
|
|
2189
|
+
...anchor,
|
|
2190
|
+
l: Math.max(
|
|
2191
|
+
0,
|
|
2192
|
+
Math.min(1, anchor.l + emphasis * contrastDirection)
|
|
2193
|
+
),
|
|
2194
|
+
c: Math.max(0, anchor.c + chromaOffset),
|
|
2195
|
+
h: wrapHue(anchor.h + hueOffset)
|
|
2196
|
+
};
|
|
2197
|
+
}
|
|
2198
|
+
}
|
|
2199
|
+
}
|
|
2128
2200
|
applyToken(name, value) {
|
|
2129
2201
|
this.standaloneTokens.push({ name, value });
|
|
2130
2202
|
}
|
|
@@ -2786,7 +2858,9 @@ function run() {
|
|
|
2786
2858
|
const preset = AVAILABLE_PRESETS[name];
|
|
2787
2859
|
if (!preset) {
|
|
2788
2860
|
console.error(
|
|
2789
|
-
`Error: unknown preset "${name}". Available: ${Object.keys(
|
|
2861
|
+
`Error: unknown preset "${name}". Available: ${Object.keys(
|
|
2862
|
+
AVAILABLE_PRESETS
|
|
2863
|
+
).join(", ")}`
|
|
2790
2864
|
);
|
|
2791
2865
|
process.exit(1);
|
|
2792
2866
|
}
|
|
@@ -2889,18 +2963,7 @@ function run() {
|
|
|
2889
2963
|
if (values.selector) {
|
|
2890
2964
|
formatOptions.selector = values.selector;
|
|
2891
2965
|
}
|
|
2892
|
-
const
|
|
2893
|
-
const themeFilter = values.theme;
|
|
2894
|
-
let output;
|
|
2895
|
-
if (typeof result === "string") {
|
|
2896
|
-
output = result;
|
|
2897
|
-
} else if (themeFilter === "light") {
|
|
2898
|
-
output = serialize(result.light);
|
|
2899
|
-
} else if (themeFilter === "dark") {
|
|
2900
|
-
output = serialize(result.dark);
|
|
2901
|
-
} else {
|
|
2902
|
-
output = serialize({ light: result.light, dark: result.dark });
|
|
2903
|
-
}
|
|
2966
|
+
const output = renderOutput(builder, formatOptions, values.theme);
|
|
2904
2967
|
if (values.output) {
|
|
2905
2968
|
writeFileSync(values.output, `${output}
|
|
2906
2969
|
`);
|
|
@@ -2908,13 +2971,26 @@ function run() {
|
|
|
2908
2971
|
console.log(output);
|
|
2909
2972
|
}
|
|
2910
2973
|
}
|
|
2974
|
+
function renderOutput(builder, formatOptions, themeFilter) {
|
|
2975
|
+
if (formatOptions.as === "json") formatOptions.as = "object";
|
|
2976
|
+
const result = builder.format(formatOptions);
|
|
2977
|
+
if (typeof result === "string") return result;
|
|
2978
|
+
if (themeFilter === "light") return serialize(result.light);
|
|
2979
|
+
if (themeFilter === "dark") return serialize(result.dark);
|
|
2980
|
+
return serialize({ light: result.light, dark: result.dark });
|
|
2981
|
+
}
|
|
2911
2982
|
function serialize(value) {
|
|
2912
2983
|
if (typeof value === "string") return value;
|
|
2913
2984
|
return JSON.stringify(value, null, 2);
|
|
2914
2985
|
}
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2986
|
+
if (process.argv[1] === fileURLToPath(import.meta.url)) {
|
|
2987
|
+
try {
|
|
2988
|
+
run();
|
|
2989
|
+
} catch (err) {
|
|
2990
|
+
console.error(`Error: ${err instanceof Error ? err.message : String(err)}`);
|
|
2991
|
+
process.exit(1);
|
|
2992
|
+
}
|
|
2920
2993
|
}
|
|
2994
|
+
export {
|
|
2995
|
+
renderOutput
|
|
2996
|
+
};
|
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 HextimatePreset, h as HextimateResult, i as HextimateStyleOptions, N as NestedTokenMap, T as ThemeAdjustments, j 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-REeEsEOu.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-REeEsEOu.js';
|
|
3
|
+
export { i as presets } from './index-DSfF_JsR.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 { g 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-DSfF_JsR.js';
|
|
2
|
+
export { g as HextimatePreset } from './HextimatePaletteBuilder-REeEsEOu.js';
|
package/dist/react.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as HextimateStyleOptions, g as HextimatePreset, H as HextimatePaletteBuilder, h as HextimateResult, F as FlatTokenMap, f as HextimateFormatOptions } from './HextimatePaletteBuilder-
|
|
1
|
+
import { i as HextimateStyleOptions, g as HextimatePreset, H as HextimatePaletteBuilder, h as HextimateResult, F as FlatTokenMap, f as HextimateFormatOptions } from './HextimatePaletteBuilder-REeEsEOu.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/package.json
CHANGED
|
@@ -1,32 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hextimator",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.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
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"per-tenant",
|
|
9
|
-
"wcag",
|
|
10
|
-
"b2b2c",
|
|
11
|
-
"b2b",
|
|
12
|
-
"saas-theming",
|
|
13
|
-
"white-label",
|
|
14
|
-
"no-code",
|
|
15
|
-
"cms",
|
|
16
|
-
"design-system",
|
|
17
|
-
"multi-brand",
|
|
18
|
-
"color",
|
|
19
|
-
"palette",
|
|
20
|
-
"generator",
|
|
21
|
-
"creator",
|
|
22
|
-
"oklch",
|
|
23
|
-
"theme",
|
|
6
|
+
"color-palette",
|
|
7
|
+
"palette-generator",
|
|
24
8
|
"design-tokens",
|
|
25
|
-
"
|
|
26
|
-
"
|
|
9
|
+
"theme",
|
|
10
|
+
"oklch",
|
|
11
|
+
"wcag",
|
|
27
12
|
"contrast",
|
|
28
|
-
"
|
|
29
|
-
"
|
|
13
|
+
"multi-tenant",
|
|
14
|
+
"runtime-theming",
|
|
15
|
+
"tailwind"
|
|
30
16
|
],
|
|
31
17
|
"homepage": "https://hextimator.com",
|
|
32
18
|
"bugs": {
|