@navecss/tokens 0.4.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/TOKENS.md CHANGED
@@ -167,6 +167,8 @@ non-colour value is exactly what its name says.
167
167
  | `--nave-color-action-primary-active` | no |
168
168
  | `--nave-color-on-action-primary` | yes |
169
169
  | `--nave-color-action-secondary` | yes |
170
+ | `--nave-color-action-secondary-hover` | yes |
171
+ | `--nave-color-action-secondary-active` | yes |
170
172
  | `--nave-color-action-highlight` | yes |
171
173
  | `--nave-color-feedback-danger` | no |
172
174
  | `--nave-color-feedback-danger-foreground` | no |
@@ -2,7 +2,7 @@
2
2
  "formatVersion": 1,
3
3
  "producer": {
4
4
  "name": "@navecss/core",
5
- "version": "0.4.0"
5
+ "version": "0.6.0"
6
6
  },
7
7
  "tokens": [
8
8
  "--nave-border-width-focus",
package/dist/css.d.ts ADDED
@@ -0,0 +1 @@
1
+ export {}
@@ -2,7 +2,7 @@ import { type Adjacency } from './adjacency-source.ts';
2
2
  import { type SlotMapping } from './semantics.ts';
3
3
  export type { Adjacency, MeasuredOpenSlots, OrphanCheckResult } from './adjacency-source.ts';
4
4
  export { ADJACENCY, ADJACENCY_EXCLUSIONS, ADJACENCY_OPEN, assertNoOrphanedSemanticSlot, } from './adjacency-source.ts';
5
- declare const MINIMUM_COVERAGE_CATEGORIES: readonly ["contentOnSurface", "inversePair", "onActionOnAction", "textOnFeedback", "sunken", "borderControl", "borderFocus", "filledAction", "filledFeedback"];
5
+ declare const MINIMUM_COVERAGE_CATEGORIES: readonly ["contentOnSurface", "inversePair", "onActionOnAction", "textOnFeedback", "sunken", "borderControl", "borderFocus", "filledAction", "filledFeedback", "secondaryForegroundOnStates"];
6
6
  export type CoverageCategory = (typeof MINIMUM_COVERAGE_CATEGORIES)[number];
7
7
  export declare function coverageCategories(adjacency?: readonly Adjacency[]): Record<CoverageCategory, boolean>;
8
8
  export declare function assertCoverageFloor(adjacency?: readonly Adjacency[]): void;
@@ -12,7 +12,9 @@ const MINIMUM_COVERAGE_CATEGORIES = [
12
12
  'borderFocus',
13
13
  'filledAction',
14
14
  'filledFeedback',
15
+ 'secondaryForegroundOnStates',
15
16
  ];
17
+ const ACTION_SECONDARY_STATE_FILLS = ['action.secondary.hover', 'action.secondary.active'];
16
18
  export function coverageCategories(adjacency = ADJACENCY) {
17
19
  return {
18
20
  contentOnSurface: adjacency.some((a) => a.subject.startsWith('content.') && a.against.startsWith('surface.')),
@@ -24,6 +26,7 @@ export function coverageCategories(adjacency = ADJACENCY) {
24
26
  borderFocus: adjacency.some((a) => a.subject === 'border.focus'),
25
27
  filledAction: adjacency.some((a) => a.subject === 'action.primary' && a.class === 'non-text'),
26
28
  filledFeedback: adjacency.some((a) => a.subject === 'feedback.danger' && a.class === 'non-text'),
29
+ secondaryForegroundOnStates: ACTION_SECONDARY_STATE_FILLS.every((fill) => adjacency.some((a) => a.subject === 'action.secondary.foreground' && a.against === fill && a.class === 'text')),
27
30
  };
28
31
  }
29
32
  const COVERAGE_FLOOR_VIOLATION_REASON = 'missing from the declared adjacency set. This set has a required minimum: every ' +
@@ -35,6 +35,8 @@ export const CHROMATIC_MAPPING = {
35
35
  'action.primary.active': { light: ref('primary', 800), dark: ref('primary', 150) },
36
36
  'on-action.primary': { light: ref('neutral', 0), dark: ref('neutral', 900) },
37
37
  'action.secondary': { light: ref('neutral', 100), dark: ref('neutral', 800) },
38
+ 'action.secondary.hover': { light: ref('neutral', 150), dark: ref('neutral', 700) },
39
+ 'action.secondary.active': { light: ref('neutral', 200), dark: ref('neutral', 850) },
38
40
  'action.highlight': { light: ref('neutral', 100), dark: ref('neutral', 700) },
39
41
  'feedback.danger': { light: ref('danger', 600), dark: ref('danger', 300) },
40
42
  'feedback.danger.foreground': { light: ref('danger', 600), dark: ref('danger', 300) },
@@ -180,6 +180,22 @@
180
180
  "$type": "color",
181
181
  "$value": "oklch(from var(--nave-color-tint) 0.27 0.0067 h / 1)"
182
182
  },
183
+ "color.action.secondary.hover.light": {
184
+ "$type": "color",
185
+ "$value": "oklch(from var(--nave-color-tint) 0.94 0.0067 h / 1)"
186
+ },
187
+ "color.action.secondary.hover.dark": {
188
+ "$type": "color",
189
+ "$value": "oklch(from var(--nave-color-tint) 0.37 0.0067 h / 1)"
190
+ },
191
+ "color.action.secondary.active.light": {
192
+ "$type": "color",
193
+ "$value": "oklch(from var(--nave-color-tint) 0.905 0.0067 h / 1)"
194
+ },
195
+ "color.action.secondary.active.dark": {
196
+ "$type": "color",
197
+ "$value": "oklch(from var(--nave-color-tint) 0.225 0.0067 h / 1)"
198
+ },
183
199
  "color.action.highlight.light": {
184
200
  "$type": "color",
185
201
  "$value": "oklch(from var(--nave-color-tint) 0.965 0.0067 h / 1)",
package/dist/tokens.css CHANGED
@@ -423,6 +423,8 @@
423
423
  --nave-color-action-primary-active: light-dark(oklch(0.27 0.0398 186.17), oklch(0.94 0.0574 186.17));
424
424
  --nave-color-on-action-primary: light-dark(oklch(from var(--nave-color-tint) 1 0 h / 1), oklch(from var(--nave-color-tint) 0.18 0.0067 h / 1));
425
425
  --nave-color-action-secondary: light-dark(oklch(from var(--nave-color-tint) 0.965 0.0067 h / 1), oklch(from var(--nave-color-tint) 0.27 0.0067 h / 1));
426
+ --nave-color-action-secondary-hover: light-dark(oklch(from var(--nave-color-tint) 0.94 0.0067 h / 1), oklch(from var(--nave-color-tint) 0.37 0.0067 h / 1));
427
+ --nave-color-action-secondary-active: light-dark(oklch(from var(--nave-color-tint) 0.905 0.0067 h / 1), oklch(from var(--nave-color-tint) 0.225 0.0067 h / 1));
426
428
  --nave-color-action-highlight: light-dark(oklch(from var(--nave-color-tint) 0.965 0.0067 h / 1), oklch(from var(--nave-color-tint) 0.37 0.0067 h / 1));
427
429
  --nave-color-feedback-danger: light-dark(oklch(0.47 0.1455 15.02), oklch(0.835 0.0661 15.02));
428
430
  --nave-color-feedback-danger-foreground: light-dark(oklch(0.47 0.1455 15.02), oklch(0.835 0.0661 15.02));
package/dist/tokens.d.ts CHANGED
@@ -104,6 +104,8 @@ export declare type ColorPropertyName =
104
104
  | '--nave-color-action-primary-active'
105
105
  | '--nave-color-action-primary-hover'
106
106
  | '--nave-color-action-secondary'
107
+ | '--nave-color-action-secondary-active'
108
+ | '--nave-color-action-secondary-hover'
107
109
  | '--nave-color-backdrop-modal'
108
110
  | '--nave-color-border-control'
109
111
  | '--nave-color-border-default'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@navecss/tokens",
3
- "version": "0.4.0",
3
+ "version": "0.6.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",
@@ -24,7 +24,10 @@
24
24
  "import": "./dist/tokens.js",
25
25
  "default": "./dist/tokens.js"
26
26
  },
27
- "./css": "./dist/tokens.css",
27
+ "./css": {
28
+ "types": "./dist/css.d.ts",
29
+ "default": "./dist/tokens.css"
30
+ },
28
31
  "./js": {
29
32
  "types": "./dist/tokens.d.ts",
30
33
  "import": "./dist/tokens.js",
@@ -51,11 +54,11 @@
51
54
  "TOKENS.md"
52
55
  ],
53
56
  "devDependencies": {
54
- "@types/node": "^26.6.4",
55
- "@vitest/coverage-v8": "5.0.3",
56
- "prettier": "3.9.9",
57
+ "@types/node": "^26.6.6",
58
+ "@vitest/coverage-v8": "5.1.0",
59
+ "prettier": "3.9.10",
57
60
  "typescript": "6.0.3",
58
- "vitest": "5.0.3"
61
+ "vitest": "5.1.0"
59
62
  },
60
63
  "engines": {
61
64
  "node": ">=22.18"
@@ -79,6 +82,6 @@
79
82
  "lint": "eslint build.ts generate-tokens-doc.ts src test --max-warnings 0",
80
83
  "lint:fix": "eslint build.ts generate-tokens-doc.ts src test --fix",
81
84
  "test": "vitest run",
82
- "check:pack": "node ../../scripts/without-dry-run.mjs publint && node ../../scripts/without-dry-run.mjs attw --pack . --profile esm-only --exclude-entrypoints css"
85
+ "check:pack": "node ../../scripts/without-dry-run.mjs publint && node ../../scripts/without-dry-run.mjs attw --pack . --profile esm-only"
83
86
  }
84
87
  }
package/tokens.json CHANGED
@@ -89,6 +89,14 @@
89
89
  {
90
90
  "against": "action.secondary",
91
91
  "class": "text"
92
+ },
93
+ {
94
+ "against": "action.secondary.hover",
95
+ "class": "text"
96
+ },
97
+ {
98
+ "against": "action.secondary.active",
99
+ "class": "text"
92
100
  }
93
101
  ],
94
102
  "content.link": [