@navecss/tokens 0.2.0 → 0.3.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/README.md CHANGED
@@ -22,7 +22,7 @@ pnpm add @navecss/tokens
22
22
  @import url('@navecss/tokens/css');
23
23
  ```
24
24
 
25
- This emits the token layer's custom properties (`--nave-*`) inside `@layer tokens.defaults`. Keep the `/css`: unlike `@navecss/core`, whose bare package name is its stylesheet, the bare `@navecss/tokens` is the JavaScript entry point. `@navecss/core` imports this automatically; install `@navecss/tokens` on its own only if you are building without `@navecss/core` (for example, on top of Base UI or Radix UI directly).
25
+ This emits the token layer's custom properties (`--nave-*`) inside `@layer tokens.defaults`. Keep the `/css`: unlike `@navecss/core`, whose bare package name is its stylesheet, the bare `@navecss/tokens` is the JavaScript entry point. `@navecss/core` imports this automatically; install `@navecss/tokens` on its own only if you are building without `@navecss/core` (for example, with Radix UI, or with [`@navecss/base-ui`](https://github.com/navecss/navecss/tree/main/packages/base-ui#readme), which styles Base UI's components from these tokens and does not need core).
26
26
 
27
27
  ## What ships
28
28
 
@@ -99,7 +99,7 @@ Write `--flag=value` and not `--flag value`. A `#rrggbb` seed passed as a
99
99
  separate word begins a shell comment, so the rest of the command is discarded
100
100
  and you get a usage error rather than a wrong colour.
101
101
 
102
- 0.1.0 ships no consumer contrast-threshold input. No flag of this entry point sets one, and the build reads none. This is the absence of an input, not a limit on the consumer: a consumer may hold whatever contrast target they choose and check their palette against it with their own tooling. Where a check Nave ships runs in a consumer's build over the consumer's values, it reports and does not fail. A consumer-settable target is deliberately out of 0.1.0 rather than overlooked.
102
+ 0.1.0 ships no consumer contrast-threshold input. No flag of this entry point sets one, and the build reads none. This is the absence of an input, not a limit on the consumer: a consumer may hold whatever contrast target they choose and check their palette against it with their own tooling. No contrast check this entry point runs over a consumer's values can fail the build, and none prints or returns a result. A consumer-settable target is deliberately out of 0.1.0 rather than overlooked.
103
103
 
104
104
  ```bash
105
105
  navecss-tokens validate --source=src/styles/nave/tokens.css
package/TOKENS.md CHANGED
@@ -88,6 +88,7 @@ non-colour value is exactly what its name says.
88
88
  | `--nave-border-width-none` |
89
89
  | `--nave-border-width-sm` |
90
90
  | `--nave-border-width-focus` |
91
+ | `--nave-border-width-mark` |
91
92
  | `--nave-border-width-lg` |
92
93
 
93
94
  ## Radius
@@ -2,7 +2,7 @@
2
2
  "formatVersion": 1,
3
3
  "producer": {
4
4
  "name": "@navecss/core",
5
- "version": "0.2.0"
5
+ "version": "0.3.0"
6
6
  },
7
7
  "tokens": [
8
8
  "--nave-border-width-focus",
@@ -8,6 +8,6 @@ export declare function assertDescriptionsAreClean(...descriptionMaps: readonly
8
8
  export declare const RETHEMING_NOTICE = "Changing this changes everything Nave derives from it. The contrast of the resulting palette follows from what you set, and checking it is yours.";
9
9
  export declare function assertNoticeIsClean(notice?: string, noticeLabel?: string): void;
10
10
  export declare const FEEDBACK_SHARED_IDENTITY_NOTICE = "warning, success and info, and their -foreground variants, resolve to one shared value here; only danger differs. Colour alone therefore cannot tell those three states apart, so wherever a feedback token carries meaning, give it a text label naming the state and a distinct icon or shape that differs per state.";
11
- export declare const NO_CONSUMER_CONTRAST_THRESHOLD_INPUT = "0.1.0 ships no consumer contrast-threshold input. No flag of this entry point sets one, and the build reads none. This is the absence of an input, not a limit on the consumer: a consumer may hold whatever contrast target they choose and check their palette against it with their own tooling. Where a check Nave ships runs in a consumer's build over the consumer's values, it reports and does not fail. A consumer-settable target is deliberately out of 0.1.0 rather than overlooked.";
11
+ export declare const NO_CONSUMER_CONTRAST_THRESHOLD_INPUT = "0.1.0 ships no consumer contrast-threshold input. No flag of this entry point sets one, and the build reads none. This is the absence of an input, not a limit on the consumer: a consumer may hold whatever contrast target they choose and check their palette against it with their own tooling. No contrast check this entry point runs over a consumer's values can fail the build, and none prints or returns a result. A consumer-settable target is deliberately out of 0.1.0 rather than overlooked.";
12
12
  export declare function assertNoticeIsEmitted(css: string, notice: string, noticeLabel: string): void;
13
13
  export declare function assertHarnessFramingIsClean(): void;
@@ -47,7 +47,7 @@ export function assertNoticeIsClean(notice = RETHEMING_NOTICE, noticeLabel = 'Re
47
47
  }
48
48
  }
49
49
  export const FEEDBACK_SHARED_IDENTITY_NOTICE = 'warning, success and info, and their -foreground variants, resolve to one shared value here; only danger differs. Colour alone therefore cannot tell those three states apart, so wherever a feedback token carries meaning, give it a text label naming the state and a distinct icon or shape that differs per state.';
50
- export const NO_CONSUMER_CONTRAST_THRESHOLD_INPUT = "0.1.0 ships no consumer contrast-threshold input. No flag of this entry point sets one, and the build reads none. This is the absence of an input, not a limit on the consumer: a consumer may hold whatever contrast target they choose and check their palette against it with their own tooling. Where a check Nave ships runs in a consumer's build over the consumer's values, it reports and does not fail. A consumer-settable target is deliberately out of 0.1.0 rather than overlooked.";
50
+ export const NO_CONSUMER_CONTRAST_THRESHOLD_INPUT = "0.1.0 ships no consumer contrast-threshold input. No flag of this entry point sets one, and the build reads none. This is the absence of an input, not a limit on the consumer: a consumer may hold whatever contrast target they choose and check their palette against it with their own tooling. No contrast check this entry point runs over a consumer's values can fail the build, and none prints or returns a result. A consumer-settable target is deliberately out of 0.1.0 rather than overlooked.";
51
51
  export function assertNoticeIsEmitted(css, notice, noticeLabel) {
52
52
  if (!css.includes(notice)) {
53
53
  throw new Error(`${noticeLabel} violation: the notice is not present, verbatim, in the emitted CSS. Restore it exactly as authored.`);
@@ -34,7 +34,7 @@ export function emitCss(result, layer = 'tokens.defaults') {
34
34
  h: result.records.primary.usedSeed.h,
35
35
  });
36
36
  const lines = [
37
- '/* Nave theming — generated, do not edit. See this package\'s README ("Theming"). */',
37
+ '/* Nave theming — generated, do not edit. See the @navecss/tokens README ("Theming"). */',
38
38
  '',
39
39
  `@property ${TINT_PROPERTY} {`,
40
40
  ` syntax: '<color>';`,
@@ -1,4 +1,4 @@
1
- export declare const R6_CONSUMER_ARTIFACTS: readonly ["tokens.css", "tokens.js", "tokens.d.ts", "breakpoints.js", "breakpoints.d.ts", "palette-record.json", "build-record.json"];
1
+ export declare const CONSUMER_ARTIFACTS: readonly ["tokens.css", "tokens.js", "tokens.d.ts", "breakpoints.js", "breakpoints.d.ts", "palette-record.json", "build-record.json"];
2
2
  export interface ProvenanceArtifact {
3
3
  path: string;
4
4
  content: string;
@@ -1,4 +1,4 @@
1
- export const R6_CONSUMER_ARTIFACTS = [
1
+ export const CONSUMER_ARTIFACTS = [
2
2
  'tokens.css',
3
3
  'tokens.js',
4
4
  'tokens.d.ts',
package/dist/tokens.css CHANGED
@@ -167,6 +167,12 @@
167
167
  initial-value: 2px;
168
168
  }
169
169
 
170
+ @property --nave-border-width-mark {
171
+ syntax: '<length>';
172
+ inherits: true;
173
+ initial-value: 2px;
174
+ }
175
+
170
176
  @property --nave-border-width-lg {
171
177
  syntax: '<length>';
172
178
  inherits: true;
@@ -339,6 +345,7 @@
339
345
  --nave-border-width-none: 0px;
340
346
  --nave-border-width-sm: 1px;
341
347
  --nave-border-width-focus: 2px;
348
+ --nave-border-width-mark: 2px;
342
349
  --nave-border-width-lg: 4px;
343
350
  --nave-radius-none: 0px;
344
351
  --nave-radius-sm: 4px;
@@ -380,7 +387,7 @@
380
387
  }
381
388
  }
382
389
 
383
- /* Nave theming — generated, do not edit. See this package's README ("Theming"). */
390
+ /* Nave theming — generated, do not edit. See the @navecss/tokens README ("Theming"). */
384
391
 
385
392
  @property --nave-color-tint {
386
393
  syntax: '<color>';
package/dist/tokens.d.ts CHANGED
@@ -61,6 +61,7 @@ export declare const tokens: {
61
61
  '--nave-border-width-none': string
62
62
  '--nave-border-width-sm': string
63
63
  '--nave-border-width-focus': string
64
+ '--nave-border-width-mark': string
64
65
  '--nave-border-width-lg': string
65
66
  '--nave-radius-none': string
66
67
  '--nave-radius-sm': string
package/dist/tokens.js CHANGED
@@ -62,6 +62,7 @@ export const tokens = {
62
62
  '--nave-border-width-none': "0px",
63
63
  '--nave-border-width-sm': "1px",
64
64
  '--nave-border-width-focus': "2px",
65
+ '--nave-border-width-mark': "2px",
65
66
  '--nave-border-width-lg': "4px",
66
67
  '--nave-radius-none': "0px",
67
68
  '--nave-radius-sm': "4px",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@navecss/tokens",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "DTCG 2025.10 design tokens for Nave: seed-derived semantic colours, typography, spacing, and the rest of the token layer, built by a first-party DTCG 2025.10 reader.",
5
5
  "keywords": [
6
6
  "css",
@@ -51,11 +51,11 @@
51
51
  "TOKENS.md"
52
52
  ],
53
53
  "devDependencies": {
54
- "@types/node": "^26.6.2",
55
- "@vitest/coverage-v8": "5.0.1",
54
+ "@types/node": "^26.6.4",
55
+ "@vitest/coverage-v8": "5.0.3",
56
56
  "prettier": "3.9.9",
57
57
  "typescript": "6.0.3",
58
- "vitest": "5.0.1"
58
+ "vitest": "5.0.3"
59
59
  },
60
60
  "engines": {
61
61
  "node": ">=22.18"
@@ -79,7 +79,6 @@
79
79
  "lint": "eslint build.ts generate-tokens-doc.ts src test --max-warnings 0",
80
80
  "lint:fix": "eslint build.ts generate-tokens-doc.ts src test --fix",
81
81
  "test": "vitest run",
82
- "test:coverage": "vitest run --coverage",
83
82
  "check:pack": "node ../../scripts/without-dry-run.mjs publint && node ../../scripts/without-dry-run.mjs attw --pack . --profile esm-only --exclude-entrypoints css"
84
83
  }
85
84
  }
package/tokens.json CHANGED
@@ -33,12 +33,24 @@
33
33
  {
34
34
  "against": "surface.sunken",
35
35
  "class": "text"
36
+ },
37
+ {
38
+ "against": "surface.overlay",
39
+ "class": "text"
36
40
  }
37
41
  ],
38
42
  "content.secondary": [
39
43
  {
40
44
  "against": "surface.base",
41
45
  "class": "text"
46
+ },
47
+ {
48
+ "against": "surface.raised",
49
+ "class": "text"
50
+ },
51
+ {
52
+ "against": "surface.overlay",
53
+ "class": "text"
42
54
  }
43
55
  ],
44
56
  "content.tertiary": [
@@ -49,6 +61,14 @@
49
61
  {
50
62
  "against": "surface.sunken",
51
63
  "class": "text"
64
+ },
65
+ {
66
+ "against": "surface.raised",
67
+ "class": "text"
68
+ },
69
+ {
70
+ "against": "surface.overlay",
71
+ "class": "text"
52
72
  }
53
73
  ],
54
74
  "content.inverse": [
@@ -67,6 +87,14 @@
67
87
  {
68
88
  "against": "surface.base",
69
89
  "class": "text"
90
+ },
91
+ {
92
+ "against": "surface.raised",
93
+ "class": "text"
94
+ },
95
+ {
96
+ "against": "surface.overlay",
97
+ "class": "text"
70
98
  }
71
99
  ],
72
100
  "on-action.primary": [
@@ -155,12 +183,28 @@
155
183
  {
156
184
  "against": "surface.base",
157
185
  "class": "non-text"
186
+ },
187
+ {
188
+ "against": "surface.raised",
189
+ "class": "non-text"
190
+ },
191
+ {
192
+ "against": "surface.overlay",
193
+ "class": "non-text"
158
194
  }
159
195
  ],
160
196
  "feedback.danger": [
161
197
  {
162
198
  "against": "surface.base",
163
199
  "class": "non-text"
200
+ },
201
+ {
202
+ "against": "surface.raised",
203
+ "class": "non-text"
204
+ },
205
+ {
206
+ "against": "surface.overlay",
207
+ "class": "non-text"
164
208
  }
165
209
  ],
166
210
  "feedback.warning": [
@@ -173,6 +217,18 @@
173
217
  {
174
218
  "against": "surface.base",
175
219
  "class": "non-text"
220
+ },
221
+ {
222
+ "against": "surface.base",
223
+ "class": "text"
224
+ },
225
+ {
226
+ "against": "surface.raised",
227
+ "class": "text"
228
+ },
229
+ {
230
+ "against": "surface.overlay",
231
+ "class": "text"
176
232
  }
177
233
  ]
178
234
  }
@@ -597,6 +653,14 @@
597
653
  "$type": "dimension",
598
654
  "$description": "Focus ring indicator outline width"
599
655
  },
656
+ "mark": {
657
+ "$value": {
658
+ "value": 2,
659
+ "unit": "px"
660
+ },
661
+ "$type": "dimension",
662
+ "$description": "Strokes of glyphs drawn in CSS: check marks, indeterminate bars"
663
+ },
600
664
  "lg": {
601
665
  "$value": {
602
666
  "value": 4,
@@ -626,7 +690,7 @@
626
690
  "unit": "px"
627
691
  },
628
692
  "$type": "dimension",
629
- "$description": "Inputs, buttons, tags"
693
+ "$description": "Inputs, buttons, tags, and the popovers, menus and select lists anchored to a control"
630
694
  },
631
695
  "card": {
632
696
  "$value": {