hextimator 0.14.1 → 0.14.3
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 +14 -0
- package/dist/cli.js +14 -10
- package/llms.txt +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## 0.14.3
|
|
2
|
+
|
|
3
|
+
### Patch Changes
|
|
4
|
+
|
|
5
|
+
- [#182](https://github.com/fgrgic/hextimator/pull/182) [`b01e908`](https://github.com/fgrgic/hextimator/commit/b01e90847e747502bab743e61c14f9b9e47a6e9b) Thanks [@fgrgic](https://github.com/fgrgic)! - Fix the `hextimator` and `hextimate` CLI commands producing no output when invoked through `npx`.
|
|
6
|
+
|
|
7
|
+
- [#182](https://github.com/fgrgic/hextimator/pull/182) [`b01e908`](https://github.com/fgrgic/hextimator/commit/b01e90847e747502bab743e61c14f9b9e47a6e9b) Thanks [@fgrgic](https://github.com/fgrgic)! - Fix the `hextimator` and `hextimate` CLI commands producing no output when invoked through `npx`.
|
|
8
|
+
|
|
9
|
+
## 0.14.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#180](https://github.com/fgrgic/hextimator/pull/180) [`4783af1`](https://github.com/fgrgic/hextimator/commit/4783af1270f6e8104a7fb8b902caf4410276cf27) Thanks [@fgrgic](https://github.com/fgrgic)! - Adds missing foreground-weak variant to llms.txt
|
|
14
|
+
|
|
1
15
|
## 0.14.1
|
|
2
16
|
|
|
3
17
|
### Patch Changes
|
package/dist/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
// src/cli.ts
|
|
4
|
-
import { readFileSync, writeFileSync } from "fs";
|
|
4
|
+
import { readFileSync, realpathSync, writeFileSync } from "fs";
|
|
5
5
|
import { dirname, join } from "path";
|
|
6
6
|
import { fileURLToPath } from "url";
|
|
7
7
|
import { parseArgs } from "util";
|
|
@@ -2810,7 +2810,7 @@ function parseBaseLightnessRange(raw) {
|
|
|
2810
2810
|
if (!Number.isFinite(lo) || !Number.isFinite(hi)) return void 0;
|
|
2811
2811
|
return [lo, hi];
|
|
2812
2812
|
}
|
|
2813
|
-
function
|
|
2813
|
+
function runCli() {
|
|
2814
2814
|
const { values, positionals } = parseArgs({
|
|
2815
2815
|
allowPositionals: true,
|
|
2816
2816
|
options: {
|
|
@@ -3042,6 +3042,14 @@ function run() {
|
|
|
3042
3042
|
console.log(output);
|
|
3043
3043
|
}
|
|
3044
3044
|
}
|
|
3045
|
+
function run() {
|
|
3046
|
+
try {
|
|
3047
|
+
runCli();
|
|
3048
|
+
} catch (err) {
|
|
3049
|
+
console.error(`Error: ${err instanceof Error ? err.message : String(err)}`);
|
|
3050
|
+
process.exit(1);
|
|
3051
|
+
}
|
|
3052
|
+
}
|
|
3045
3053
|
function renderOutput(builder, formatOptions, themeFilter) {
|
|
3046
3054
|
if (formatOptions.as === "json") formatOptions.as = "object";
|
|
3047
3055
|
const result = builder.format(formatOptions);
|
|
@@ -3054,14 +3062,10 @@ function serialize(value) {
|
|
|
3054
3062
|
if (typeof value === "string") return value;
|
|
3055
3063
|
return JSON.stringify(value, null, 2);
|
|
3056
3064
|
}
|
|
3057
|
-
if (process.argv[1] === fileURLToPath(import.meta.url)) {
|
|
3058
|
-
|
|
3059
|
-
run();
|
|
3060
|
-
} catch (err) {
|
|
3061
|
-
console.error(`Error: ${err instanceof Error ? err.message : String(err)}`);
|
|
3062
|
-
process.exit(1);
|
|
3063
|
-
}
|
|
3065
|
+
if (realpathSync(process.argv[1]) === fileURLToPath(import.meta.url)) {
|
|
3066
|
+
run();
|
|
3064
3067
|
}
|
|
3065
3068
|
export {
|
|
3066
|
-
renderOutput
|
|
3069
|
+
renderOutput,
|
|
3070
|
+
run
|
|
3067
3071
|
};
|
package/llms.txt
CHANGED
|
@@ -82,7 +82,7 @@ const sheet = hextimate("#6366f1").format({ as: "css", colors: "oklch" });
|
|
|
82
82
|
|------|------|
|
|
83
83
|
| `.preset(p)` | Apply preset(s); call multiple times, later wins on conflicts |
|
|
84
84
|
| `.style(partial)` | Merge `HextimateStyleOptions` (contrast, surfaces, semantics, etc.) |
|
|
85
|
-
| `.addRole(name, color)` | New role with default / strong / weak / foreground |
|
|
85
|
+
| `.addRole(name, color)` | New role with default / strong / weak / foreground / foreground-weak |
|
|
86
86
|
| `.addVariant(name, placement)` | Extra lightness step on every role |
|
|
87
87
|
| `.addToken(name, value)` | Standalone derived token |
|
|
88
88
|
| `.fork(color?)` | Clone for another brand / tenant |
|
|
@@ -104,7 +104,7 @@ const sheet = hextimate("#6366f1").format({ as: "css", colors: "oklch" });
|
|
|
104
104
|
|
|
105
105
|
### Default token grid
|
|
106
106
|
|
|
107
|
-
Roles: `surface`, `accent`, `positive`, `negative`, `caution`. Variants: default (no suffix), `strong`, `weak`, `foreground
|
|
107
|
+
Roles: `surface`, `accent`, `positive`, `negative`, `caution`. Variants: default (no suffix), `strong`, `weak`, `foreground`, `foreground-weak` (softest text that still meets the contrast target vs DEFAULT). Plus `brand-exact` and `brand-exact-foreground`.
|
|
108
108
|
|
|
109
109
|
### Utilities
|
|
110
110
|
|