@designtools/tokens 0.5.0 → 0.6.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 +10 -0
- package/LICENSE +21 -0
- package/README.md +41 -10
- package/dist/{chunk-D6675UF5.js → chunk-UW2HXSV4.js} +31 -1
- package/dist/cli.js +4 -1
- package/dist/index.d.ts +8 -2
- package/dist/index.js +5 -1
- package/package.json +27 -15
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
Notable changes to `@designtools/tokens`. Dates are release dates; versions follow semver, with breaking changes in the minor slot while the package is pre-1.0.
|
|
4
4
|
|
|
5
|
+
## 0.6.0
|
|
6
|
+
|
|
7
|
+
### Minor Changes
|
|
8
|
+
|
|
9
|
+
- 620b0a1: MIT licensed, maintained in madebymany/designtools, and APCA is now optional. Output is unchanged from 0.5.0.
|
|
10
|
+
|
|
11
|
+
`apca-w3` moves from a dependency to an optional peer dependency, because its licence is not MIT. It permits contrast checking of web content under WCAG and puts any other use under AGPL v3. A default install no longer includes it. `--contrast apca`, and the library's APCA functions, need it installed alongside: `npm install apca-w3`, or `npx -p apca-w3 -p @designtools/tokens generate-tokens --contrast apca`. Without it they fail with a message saying what to install. `isAPCAAvailable()` and `APCAUnavailableError` are exported so code can check first.
|
|
12
|
+
|
|
13
|
+
`--check` reports the version change until a project regenerates. Only the provenance header differs.
|
|
14
|
+
|
|
5
15
|
## 0.4.0
|
|
6
16
|
|
|
7
17
|
Partial regeneration, and the bug that made it necessary.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Made by Many Ltd
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -111,7 +111,7 @@ For wide-gamut displays there is [`--gamut p3`](#--gamut--which-displays).
|
|
|
111
111
|
For every background it generates, the tool computes real contrast against each candidate shade and picks the one **closest to a comfortable target among those clearing your floor** — not the first that scrapes past, which would hand you the least legible passing option every time. If nothing in the colour's own scale qualifies it falls back to the neutral scale, then to black or white.
|
|
112
112
|
|
|
113
113
|
- **WCAG 2.x** (default) — `(L₁ + 0.05) / (L₂ + 0.05)`, with floors of 3:1 (`--target aa-large`), 4.5:1 (`aa`) and 7:1 (`aaa`). Widely adopted and legally referenced, but it treats dark-on-light and light-on-dark identically and has no concept of text size.
|
|
114
|
-
- **APCA** (`--contrast apca`) — models how contrast is actually perceived, so the same two colours score differently depending on which one is the text. Bands at Lc 45 (large text), Lc 60 (larger content), Lc 75 (body text), Lc 90 (fluent reading).
|
|
114
|
+
- **APCA** (`--contrast apca`) — models how contrast is actually perceived, so the same two colours score differently depending on which one is the text. Bands at Lc 45 (large text), Lc 60 (larger content), Lc 75 (body text), Lc 90 (fluent reading). Needs [`apca-w3`](#apca-is-optional) installed.
|
|
115
115
|
|
|
116
116
|
### Dark mode is derived, not inverted
|
|
117
117
|
|
|
@@ -212,6 +212,15 @@ So an agent's contract is *scope, merge, verify* — and a bad merge is caught r
|
|
|
212
212
|
|
|
213
213
|
`destructive`/`red`, `success`/`green` and `warning`/`yellow` are two names for one scale, so overriding either moves both. Without that, `--color destructive=…` would leave `bg-red-500` on the old colour and the two names would silently disagree inside the same file.
|
|
214
214
|
|
|
215
|
+
## Upgrading to 0.6.0
|
|
216
|
+
|
|
217
|
+
0.6.0 generates the same output as 0.5.0. Two things change around it:
|
|
218
|
+
|
|
219
|
+
- **It is MIT licensed**, and now lives in [madebymany/designtools](https://github.com/madebymany/designtools).
|
|
220
|
+
- **APCA is optional.** `apca-w3` is no longer installed with the package. If you use `--contrast apca`, or call the APCA functions from code, install it yourself: see [APCA is optional](#apca-is-optional). Without it, those calls fail with a message saying what to install. WCAG, the default, needs nothing extra.
|
|
221
|
+
|
|
222
|
+
The provenance header records the generator version, so `--check` reports the version change until you regenerate. Only that header line differs.
|
|
223
|
+
|
|
215
224
|
## Upgrading to 0.5.0
|
|
216
225
|
|
|
217
226
|
0.5.0 changes output for any saturated seed, so `--check` will report the version change until you regenerate. What moves:
|
|
@@ -243,6 +252,8 @@ const tokens = generateTokens(
|
|
|
243
252
|
const css = exportTokens(tokens, "css", { colorFormat: "oklch", ...anchors });
|
|
244
253
|
```
|
|
245
254
|
|
|
255
|
+
`isAPCAAvailable()` says whether APCA contrast can be measured. When it cannot, anything that measures APCA throws an `APCAUnavailableError`.
|
|
256
|
+
|
|
246
257
|
With `gamut: "p3"`, the wide-gamut tiers are on `tokens.p3`, and the checks take the gamut to measure on: `checkSemanticContrast(tokens.p3.semantic.light, "p3")`.
|
|
247
258
|
|
|
248
259
|
## Output formats
|
|
@@ -294,7 +305,7 @@ A seed file:
|
|
|
294
305
|
|
|
295
306
|
| Flag | Values | Default | What it does |
|
|
296
307
|
|---|---|---|---|
|
|
297
|
-
| `--contrast` | `wcag` · `apca` | `wcag` | Which algorithm picks foregrounds. |
|
|
308
|
+
| `--contrast` | `wcag` · `apca` | `wcag` | Which algorithm picks foregrounds. `apca` needs [`apca-w3`](#apca-is-optional) installed. |
|
|
298
309
|
| `--target` | `aa-large` · `aa` · `aaa` | `aa` | Minimum the foreground search must clear. |
|
|
299
310
|
| `--lightness` | `fixed` · `perceptual` | `fixed` | How lightness is spread across the steps. |
|
|
300
311
|
| `--seed-shade` | `25`…`950` | `500` | Which step your primary lands on. |
|
|
@@ -524,19 +535,39 @@ If you find yourself hand-writing a colour beside the generated file, that is th
|
|
|
524
535
|
- **Deterministic.** Same inputs and version produce byte-identical output. No randomness, clocks, or environment reads. (A grey has no meaningful hue, so `hsl` output prints it as 0 rather than float noise that differs across engines.)
|
|
525
536
|
- **Displayable.** Every value is inside sRGB, so the colour in the file is the colour on the page, and contrast is measured on the colour a browser paints. With `--gamut p3`, the wide layer is inside Display P3.
|
|
526
537
|
- **Two test tiers.** Golden fixtures pin the bytes; structural invariants pin what a fixture cannot — chiefly that every `var(--x)` an export emits resolves to a `--x:` the same output defines. Bytes can be stable and still be incoherent CSS.
|
|
527
|
-
- **
|
|
538
|
+
- **One dependency**, pure JS: `culori` (colour maths). APCA contrast uses the optional `apca-w3`.
|
|
528
539
|
- **ESM**, Node 18+.
|
|
529
540
|
|
|
541
|
+
## APCA is optional
|
|
542
|
+
|
|
543
|
+
APCA contrast comes from [`apca-w3`](https://github.com/Myndex/apca-w3), which is an optional peer dependency rather than a dependency, because it is not MIT licensed. Its licence permits contrast checking of web content under WCAG, and puts any other use under AGPL v3 with further restrictions. Read it before you install it: [LICENSE.md](https://github.com/Myndex/apca-w3/blob/master/LICENSE.md).
|
|
544
|
+
|
|
545
|
+
A default install never loads it. To use `--contrast apca`, install it beside the package:
|
|
546
|
+
|
|
547
|
+
```bash
|
|
548
|
+
npm install @designtools/tokens apca-w3
|
|
549
|
+
```
|
|
550
|
+
|
|
551
|
+
or name both packages with npx:
|
|
552
|
+
|
|
553
|
+
```bash
|
|
554
|
+
npx -p apca-w3 -p @designtools/tokens generate-tokens --primary "#4e9caf" --contrast apca
|
|
555
|
+
```
|
|
556
|
+
|
|
557
|
+
`--lightness perceptual` is tuned for APCA but does not call it, so it works without `apca-w3`.
|
|
558
|
+
|
|
559
|
+
If you bundle the library for a browser without `apca-w3`, mark it as external, since the bundler will otherwise fail to resolve the optional import.
|
|
560
|
+
|
|
530
561
|
## Development
|
|
531
562
|
|
|
532
|
-
Part of the [designtools](https://github.com/
|
|
563
|
+
Part of the [designtools](https://github.com/madebymany/designtools) monorepo. From the repo root:
|
|
533
564
|
|
|
534
565
|
```bash
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
566
|
+
pnpm --filter @designtools/tokens cli --primary "#4e9caf" # run from source
|
|
567
|
+
pnpm --filter @designtools/tokens build # tsup -> dist
|
|
568
|
+
pnpm --filter @designtools/tokens typecheck
|
|
569
|
+
pnpm --filter @designtools/tokens fixtures # regenerate goldens
|
|
570
|
+
pnpm --filter @designtools/tokens test # vitest
|
|
540
571
|
```
|
|
541
572
|
|
|
542
573
|
```
|
|
@@ -550,4 +581,4 @@ test/ fixture parity, export invariants, shade behaviour, gamut, public API
|
|
|
550
581
|
|
|
551
582
|
## Licence
|
|
552
583
|
|
|
553
|
-
CC-BY-NC-4.0
|
|
584
|
+
[MIT](LICENSE), © Made by Many Ltd. Versions up to and including 0.5.0 were published under CC-BY-NC-4.0.
|
|
@@ -1,3 +1,31 @@
|
|
|
1
|
+
// src/apca.ts
|
|
2
|
+
var APCA_PACKAGE = "apca-w3";
|
|
3
|
+
var APCAUnavailableError = class extends Error {
|
|
4
|
+
constructor() {
|
|
5
|
+
super(
|
|
6
|
+
`APCA contrast needs the ${APCA_PACKAGE} package, which is not installed. Install it beside @designtools/tokens (npm install ${APCA_PACKAGE}), or with npx: npx -p ${APCA_PACKAGE} -p @designtools/tokens generate-tokens --contrast apca \u2026. ${APCA_PACKAGE} has its own licence, which permits WCAG contrast checking of web content only: https://github.com/Myndex/apca-w3/blob/master/LICENSE.md`
|
|
7
|
+
);
|
|
8
|
+
this.name = "APCAUnavailableError";
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
function isMissing(error) {
|
|
12
|
+
const { code, message } = error ?? {};
|
|
13
|
+
return code === "ERR_MODULE_NOT_FOUND" && typeof message === "string" && message.includes(APCA_PACKAGE);
|
|
14
|
+
}
|
|
15
|
+
var apca = null;
|
|
16
|
+
try {
|
|
17
|
+
apca = await import("apca-w3");
|
|
18
|
+
} catch (error) {
|
|
19
|
+
if (!isMissing(error)) throw error;
|
|
20
|
+
}
|
|
21
|
+
function isAPCAAvailable() {
|
|
22
|
+
return apca !== null;
|
|
23
|
+
}
|
|
24
|
+
function requireAPCA() {
|
|
25
|
+
if (!apca) throw new APCAUnavailableError();
|
|
26
|
+
return apca;
|
|
27
|
+
}
|
|
28
|
+
|
|
1
29
|
// src/types.ts
|
|
2
30
|
var VALID_SHADES = [25, 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
|
|
3
31
|
|
|
@@ -73,7 +101,6 @@ import {
|
|
|
73
101
|
inGamut,
|
|
74
102
|
clampChroma
|
|
75
103
|
} from "culori";
|
|
76
|
-
import { APCAcontrast, sRGBtoY, displayP3toY } from "apca-w3";
|
|
77
104
|
var toOklch = converter("oklch");
|
|
78
105
|
var toHslConverter = converter("hsl");
|
|
79
106
|
var GAMUT_SPACE = { srgb: "rgb", p3: "p3" };
|
|
@@ -250,6 +277,7 @@ function meetsWCAG_AAA(ratio, isLargeText = false) {
|
|
|
250
277
|
return isLargeText ? ratio >= 4.5 : ratio >= 7;
|
|
251
278
|
}
|
|
252
279
|
function getAPCAContrast(foreground, background, gamut = "srgb") {
|
|
280
|
+
const { APCAcontrast, sRGBtoY, displayP3toY } = requireAPCA();
|
|
253
281
|
const fg = displayed(foreground, gamut);
|
|
254
282
|
const bg = displayed(background, gamut);
|
|
255
283
|
const toY = (c) => gamut === "p3" ? displayP3toY([c.r, c.g, c.b]) : sRGBtoY([c.r * 255, c.g * 255, c.b * 255]);
|
|
@@ -1764,6 +1792,8 @@ function withJsonProvenance(json, p) {
|
|
|
1764
1792
|
}
|
|
1765
1793
|
|
|
1766
1794
|
export {
|
|
1795
|
+
APCAUnavailableError,
|
|
1796
|
+
isAPCAAvailable,
|
|
1767
1797
|
VALID_SHADES,
|
|
1768
1798
|
DEFAULT_SEED_SHADE,
|
|
1769
1799
|
TAILWIND_SHADES,
|
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
|
+
APCAUnavailableError,
|
|
3
4
|
DEFAULT_NEUTRAL_COLOR,
|
|
4
5
|
SECTIONED_FORMATS,
|
|
5
6
|
SHADE_PRESETS,
|
|
@@ -15,6 +16,7 @@ import {
|
|
|
15
16
|
extendedBridgeShades,
|
|
16
17
|
externalReferences,
|
|
17
18
|
generateTokens,
|
|
19
|
+
isAPCAAvailable,
|
|
18
20
|
isInGamut,
|
|
19
21
|
mergeSlice,
|
|
20
22
|
overrideContract,
|
|
@@ -28,7 +30,7 @@ import {
|
|
|
28
30
|
snapShade,
|
|
29
31
|
tokenFamilies,
|
|
30
32
|
withJsonProvenance
|
|
31
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-UW2HXSV4.js";
|
|
32
34
|
|
|
33
35
|
// src/cli.ts
|
|
34
36
|
import { parseArgs } from "util";
|
|
@@ -275,6 +277,7 @@ for (const entry of values.color ?? []) {
|
|
|
275
277
|
additionalColors[name] = validateColor(`color ${name}`, colour);
|
|
276
278
|
}
|
|
277
279
|
var contrastAlgorithm = validateChoice("contrast", values.contrast ?? seed.contrastAlgorithm, ["wcag", "apca"], "wcag");
|
|
280
|
+
if (contrastAlgorithm === "apca" && !isAPCAAvailable()) fail(new APCAUnavailableError().message);
|
|
278
281
|
var contrastTarget = validateChoice("target", values.target ?? seed.contrastTarget, ["aa-large", "aa", "aaa"], "aa");
|
|
279
282
|
var lightnessStrategy = validateChoice("lightness", values.lightness ?? seed.lightnessStrategy, ["fixed", "perceptual"], "fixed");
|
|
280
283
|
var gamut = validateChoice("gamut", values.gamut ?? seed.gamut, ["srgb", "p3"], "srgb");
|
package/dist/index.d.ts
CHANGED
|
@@ -794,7 +794,7 @@ declare function chromaShadeFor(index: number, seedShade: ShadeNumber): ShadeNum
|
|
|
794
794
|
* hand-edited the output".
|
|
795
795
|
*
|
|
796
796
|
* No imports on purpose: this stays usable in a browser alongside the rest of
|
|
797
|
-
* the library, and the dependency list stays culori
|
|
797
|
+
* the library, and the dependency list stays culori (plus the optional apca-w3).
|
|
798
798
|
*/
|
|
799
799
|
|
|
800
800
|
declare const GENERATOR_NAME = "@designtools/tokens";
|
|
@@ -826,4 +826,10 @@ declare function parseProvenance(text: string): Provenance | null;
|
|
|
826
826
|
/** Attach provenance to a JSON document as a `$designtools` key */
|
|
827
827
|
declare function withJsonProvenance(json: string, p: Provenance): string;
|
|
828
828
|
|
|
829
|
-
|
|
829
|
+
declare class APCAUnavailableError extends Error {
|
|
830
|
+
constructor();
|
|
831
|
+
}
|
|
832
|
+
/** Whether apca-w3 is installed, so APCA contrast can be measured. */
|
|
833
|
+
declare function isAPCAAvailable(): boolean;
|
|
834
|
+
|
|
835
|
+
export { ALIAS_PAIRS, type APCAContrastResult, APCAUnavailableError, type BrandColors, type CVDType, type ColorFormat, type ColorScale, type ContrastAlgorithm, type ContrastTarget, DEFAULT_NEUTRAL_COLOR, DEFAULT_SEED_SHADE, type Declaration, type ExportFormat, type ExportOptions, type ExtendedSemanticColor, type ForegroundRef, GENERATOR_NAME, type Gamut, type GamutTokens, type GenerationOptions, type LightnessStrategy, type MergeResult, type PaletteOptions, type PrimitivePalette, type Provenance, SECTIONED_FORMATS, SHADE_PRESETS, type SavedConfig, type ScaleOptions, type SeedFile, type SelectedTokens, type SemanticColorPair, type SemanticGamuts, type SemanticShadeOverrides, type SemanticTokens, type ShadeNumber, type SliceDiff, type SurfaceRef, type SurfaceShadeOverrides, type SurfaceTokens, TAILWIND_SHADES, TOKEN_SECTIONS, type TokenSection, type TokenSystem, type UtilityShadeOverrides, type UtilityTokens, VALID_SHADES, type VariantShadeOverrides, type WCAGContrastResult, WIDE_GAMUT_QUERY, adjustChroma, adjustLightness, aliasOf, checkRampChroma, checkSemanticContrast, checkSemanticContrastAPCA, checkSurfaceContrast, chromaShadeFor, classifyAPCALevel, computeAccessibilityScore, diffSlice, exportToCss, exportToDtcg, exportToTailwindV3, exportToTailwindV4, exportTokens, externalReferences, familySeedShade, findContrastingColorAPCA, fingerprint, formatColorAs, formatColorShort, formatOklchInGamut, generateColorScale, generateColorScaleAPCA, generatePrimitivePalette, generateSemanticTokens, generateSurfaceTokens, generateTokens, generateUtilityTokens, getAPCAContrast, getContrastRatio, getOklchString, getRelativeLuminance, getShade, isAPCAAvailable, isInGamut, meetsWCAG_AA, meetsWCAG_AAA, mergeSlice, oklchToHex, parseProvenance, parseToOklch, provenanceComment, readDeclarations, reanchorFactors, resolveShades, seedFingerprint, selectTokenSections, simulateCVD, snapShade, stableStringify, tokenFamilies, withJsonProvenance };
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ALIAS_PAIRS,
|
|
3
|
+
APCAUnavailableError,
|
|
3
4
|
DEFAULT_NEUTRAL_COLOR,
|
|
4
5
|
DEFAULT_SEED_SHADE,
|
|
5
6
|
GENERATOR_NAME,
|
|
@@ -44,6 +45,7 @@ import {
|
|
|
44
45
|
getOklchString,
|
|
45
46
|
getRelativeLuminance,
|
|
46
47
|
getShade,
|
|
48
|
+
isAPCAAvailable,
|
|
47
49
|
isInGamut,
|
|
48
50
|
meetsWCAG_AA,
|
|
49
51
|
meetsWCAG_AAA,
|
|
@@ -62,9 +64,10 @@ import {
|
|
|
62
64
|
stableStringify,
|
|
63
65
|
tokenFamilies,
|
|
64
66
|
withJsonProvenance
|
|
65
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-UW2HXSV4.js";
|
|
66
68
|
export {
|
|
67
69
|
ALIAS_PAIRS,
|
|
70
|
+
APCAUnavailableError,
|
|
68
71
|
DEFAULT_NEUTRAL_COLOR,
|
|
69
72
|
DEFAULT_SEED_SHADE,
|
|
70
73
|
GENERATOR_NAME,
|
|
@@ -109,6 +112,7 @@ export {
|
|
|
109
112
|
getOklchString,
|
|
110
113
|
getRelativeLuminance,
|
|
111
114
|
getShade,
|
|
115
|
+
isAPCAAvailable,
|
|
112
116
|
isInGamut,
|
|
113
117
|
meetsWCAG_AA,
|
|
114
118
|
meetsWCAG_AAA,
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@designtools/tokens",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Turn one brand colour into a complete design-token system: perceptual OKLCH ramps, contrast-checked semantic tokens (WCAG or APCA), light and dark, as CSS custom properties, Tailwind v4/v3 or DTCG. Deterministic CLI, safe for agents.",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"license": "
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"author": "Made by Many",
|
|
7
8
|
"repository": {
|
|
8
9
|
"type": "git",
|
|
9
|
-
"url": "git+https://github.com/
|
|
10
|
+
"url": "git+https://github.com/madebymany/designtools.git",
|
|
10
11
|
"directory": "packages/tokens"
|
|
11
12
|
},
|
|
12
13
|
"main": "dist/index.js",
|
|
@@ -23,27 +24,31 @@
|
|
|
23
24
|
"files": [
|
|
24
25
|
"dist",
|
|
25
26
|
"README.md",
|
|
26
|
-
"CHANGELOG.md"
|
|
27
|
+
"CHANGELOG.md",
|
|
28
|
+
"LICENSE"
|
|
27
29
|
],
|
|
28
30
|
"engines": {
|
|
29
31
|
"node": ">=18"
|
|
30
32
|
},
|
|
31
|
-
"scripts": {
|
|
32
|
-
"build": "tsup src/index.ts src/cli.ts --format esm --dts --clean",
|
|
33
|
-
"typecheck": "tsc --noEmit",
|
|
34
|
-
"cli": "tsx src/cli.ts",
|
|
35
|
-
"fixtures": "tsx test/generate-fixtures.ts"
|
|
36
|
-
},
|
|
37
33
|
"dependencies": {
|
|
38
|
-
"apca-w3": "^0.1.9",
|
|
39
34
|
"culori": "^4.0.2"
|
|
40
35
|
},
|
|
36
|
+
"peerDependencies": {
|
|
37
|
+
"apca-w3": "^0.1.9"
|
|
38
|
+
},
|
|
39
|
+
"peerDependenciesMeta": {
|
|
40
|
+
"apca-w3": {
|
|
41
|
+
"optional": true
|
|
42
|
+
}
|
|
43
|
+
},
|
|
41
44
|
"devDependencies": {
|
|
42
45
|
"@types/culori": "^4.0.1",
|
|
43
46
|
"@types/node": "^24.13.3",
|
|
47
|
+
"apca-w3": "^0.1.9",
|
|
44
48
|
"tsup": "^8.0.0",
|
|
45
49
|
"tsx": "^4.19.0",
|
|
46
|
-
"typescript": "^5.9.3"
|
|
50
|
+
"typescript": "^5.9.3",
|
|
51
|
+
"vitest": "^4.1.11"
|
|
47
52
|
},
|
|
48
53
|
"keywords": [
|
|
49
54
|
"design-tokens",
|
|
@@ -74,8 +79,15 @@
|
|
|
74
79
|
"generator",
|
|
75
80
|
"deterministic"
|
|
76
81
|
],
|
|
77
|
-
"homepage": "https://github.com/
|
|
82
|
+
"homepage": "https://github.com/madebymany/designtools/tree/main/packages/tokens#readme",
|
|
78
83
|
"bugs": {
|
|
79
|
-
"url": "https://github.com/
|
|
84
|
+
"url": "https://github.com/madebymany/designtools/issues"
|
|
85
|
+
},
|
|
86
|
+
"scripts": {
|
|
87
|
+
"build": "tsup src/index.ts src/cli.ts --format esm --dts --clean",
|
|
88
|
+
"typecheck": "tsc --noEmit",
|
|
89
|
+
"cli": "tsx src/cli.ts",
|
|
90
|
+
"fixtures": "tsx test/generate-fixtures.ts",
|
|
91
|
+
"test": "vitest run"
|
|
80
92
|
}
|
|
81
|
-
}
|
|
93
|
+
}
|