@navecss/core 0.4.0 → 0.5.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@navecss/core",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "description": "Nave design system — layer architecture, reset, atomic utilities, and the Vite, PostCSS and Lightning CSS adapters and a command line for the @nave directive",
@@ -19,11 +19,26 @@
19
19
  "access": "public"
20
20
  },
21
21
  "exports": {
22
- ".": "./dist/index.css",
23
- "./layers": "./dist/layers.css",
24
- "./no-tokens": "./dist/no-tokens.css",
25
- "./reset": "./dist/reset.css",
26
- "./atomic": "./dist/atomic.css",
22
+ ".": {
23
+ "types": "./dist/css.d.ts",
24
+ "default": "./dist/index.css"
25
+ },
26
+ "./layers": {
27
+ "types": "./dist/css.d.ts",
28
+ "default": "./dist/layers.css"
29
+ },
30
+ "./no-tokens": {
31
+ "types": "./dist/css.d.ts",
32
+ "default": "./dist/no-tokens.css"
33
+ },
34
+ "./reset": {
35
+ "types": "./dist/css.d.ts",
36
+ "default": "./dist/reset.css"
37
+ },
38
+ "./atomic": {
39
+ "types": "./dist/css.d.ts",
40
+ "default": "./dist/atomic.css"
41
+ },
27
42
  "./cx": {
28
43
  "types": "./dist/cx.d.ts",
29
44
  "import": "./dist/cx.js"
@@ -50,7 +65,10 @@
50
65
  "types": "./dist/lightningcss.d.ts",
51
66
  "import": "./dist/lightningcss.js"
52
67
  },
53
- "./standalone": "./dist/standalone.css",
68
+ "./standalone": {
69
+ "types": "./dist/css.d.ts",
70
+ "default": "./dist/standalone.css"
71
+ },
54
72
  "./check": {
55
73
  "types": "./dist/check.d.ts",
56
74
  "import": "./dist/check.js"
@@ -80,31 +98,40 @@
80
98
  }
81
99
  },
82
100
  "dependencies": {
83
- "@navecss/tokens": "^0.4.0"
101
+ "@navecss/tokens": "^0.5.0"
84
102
  },
85
103
  "devDependencies": {
104
+ "@astrojs/node": "11.1.9",
105
+ "@astrojs/react": "7.1.2",
86
106
  "@rmenke/css-tokenizer-tests": "1.4.0",
87
107
  "@sveltejs/vite-plugin-svelte": "7.3.1",
88
- "@types/node": "^26.6.4",
89
- "@vitejs/plugin-vue": "6.0.9",
90
- "@vitest/browser": "5.0.3",
91
- "@vitest/browser-playwright": "5.0.3",
92
- "@vitest/coverage-v8": "5.0.3",
108
+ "@types/node": "^26.6.6",
109
+ "@vitejs/plugin-vue": "6.0.10",
110
+ "@vitest/browser": "5.0.5",
111
+ "@vitest/browser-playwright": "5.0.5",
112
+ "@vitest/coverage-v8": "5.0.5",
113
+ "astro": "7.4.0",
93
114
  "lightningcss": "1.33.0",
94
115
  "lightningcss-1-24": "npm:lightningcss@1.24.1",
95
- "playwright": "1.63.0",
96
- "postcss": "^8.5.28",
97
- "prettier": "3.9.9",
98
- "sass": "1.105.1",
116
+ "mdn-data": "2.37.2",
117
+ "playwright": "1.64.1",
118
+ "postcss": "^8.5.32",
119
+ "prettier": "3.9.10",
120
+ "react": "^19.3.0",
121
+ "react-dom": "^19.3.0",
122
+ "sass": "1.107.1",
99
123
  "source-map": "^0.8.0",
100
- "svelte": "5.57.2",
101
- "tsup": "^8.5.1",
124
+ "stylelint": "17.16.0",
125
+ "stylelint-16-16": "npm:stylelint@16.16.0",
126
+ "stylelint-16-17": "npm:stylelint@16.17.0",
127
+ "svelte": "5.57.3",
128
+ "tsup": "^9.0.0",
102
129
  "typescript": "6.0.3",
103
- "vite": "8.3.3",
130
+ "vite": "8.3.5",
104
131
  "vite-floor": "npm:vite@8.2.1",
105
- "vitest": "5.0.3",
132
+ "vitest": "5.0.5",
106
133
  "vscode-css-languageservice": "6.3.10",
107
- "vue": "3.5.43"
134
+ "vue": "3.5.44"
108
135
  },
109
136
  "engines": {
110
137
  "node": ">=22.18"
@@ -123,12 +150,15 @@
123
150
  "scripts": {
124
151
  "build": "node scripts/build-css.ts && tsup",
125
152
  "dev": "tsup --watch",
153
+ "generate:migration-old-placement": "node scripts/generate-migration-old-placement.ts",
154
+ "generate:property-table": "node scripts/generate-property-table.ts",
126
155
  "clean": "rm -rf dist",
127
156
  "typecheck": "tsc --noEmit && tsc --noEmit -p test/browser/tsconfig.json",
128
157
  "lint": "eslint src scripts \"test/**/*.ts\" --max-warnings 0 && stylelint \"src/**/*.css\" --max-warnings 0",
129
158
  "lint:fix": "eslint src scripts \"test/**/*.ts\" --fix && stylelint \"src/**/*.css\" --fix",
130
159
  "test": "node scripts/generate-consumer-theming-fixtures.ts && node scripts/generate-vite-plugin-fixtures.ts && vitest run",
131
- "test:browser": "node scripts/generate-consumer-theming-fixtures.ts && node scripts/generate-vite-plugin-fixtures.ts && node scripts/generate-lightningcss-fixtures.ts && node scripts/generate-no-bundler-fixture.ts && vitest run --config vitest.browser.config.ts && vitest run --config vitest.chromium.config.ts",
132
- "check:pack": "node ../../scripts/without-dry-run.mjs publint && node ../../scripts/without-dry-run.mjs attw --pack . --profile esm-only --exclude-entrypoints . layers no-tokens reset atomic standalone"
160
+ "test:browser": "node scripts/generate-consumer-theming-fixtures.ts && node scripts/generate-vite-plugin-fixtures.ts && node scripts/generate-lightningcss-fixtures.ts && node scripts/generate-native-order-lightningcss-fixture.ts && node scripts/generate-no-bundler-fixture.ts && vitest run --config vitest.browser.config.ts && vitest run --config vitest.chromium.config.ts && pnpm run test:browser:engines",
161
+ "test:browser:engines": "node scripts/generate-native-order-engine-fixtures.ts && vitest run --config vitest.browser.engines.config.ts",
162
+ "check:pack": "node ../../scripts/without-dry-run.mjs publint && node ../../scripts/without-dry-run.mjs attw --pack . --profile esm-only"
133
163
  }
134
164
  }
@@ -48,6 +48,18 @@ Consumer rules go in `@layer components.consumer`, and a deliberate exception in
48
48
  `@layer overrides`; never write an unlayered rule. Atom names are the camelCase keys listed
49
49
  under Atoms below (`focusRing`, `justifyBetween`), never the `nave-` class they emit.
50
50
 
51
+ `@nave a b;` expands in place, atom by atom, each atom's pseudo-class, `@media` and `@container`
52
+ blocks right after its declarations, and what the rule says after the directive comes after all of
53
+ it. A later declaration overrides an atom's declarations and its `@media` and `@container` blocks.
54
+ Over a pseudo-class block, such as the `:focus-visible` of `focusRing`, a later nested block such
55
+ as `&:focus { ... }` wins too, but a plain declaration does not, because the block's selector is
56
+ more specific. Name responsive and state atoms (`hide*`, `*PhoneOnly`, `focusRing`) after the atoms
57
+ they adjust, and write a declaration that should give way to them above the directive. When the
58
+ build warns that something later in the rule overrides an atom's block, make the move or
59
+ reorder the warning names. Where it names neither, write the atom the task wants to win
60
+ last and add the marker the warning then prints; otherwise add a `nave-allow-override`
61
+ marker only when the override is what the task asks for.
62
+
51
63
  See where `@nave` is valid (nesting depth, `@media`/`@container`, `@keyframes`) in
52
64
  [the package README](../../README.md#where-nave-is-valid).
53
65
 
@@ -194,6 +206,8 @@ renders nothing.
194
206
  - `--nave-color-action-primary-active`
195
207
  - `--nave-color-action-primary-hover`
196
208
  - `--nave-color-action-secondary`
209
+ - `--nave-color-action-secondary-active`
210
+ - `--nave-color-action-secondary-hover`
197
211
  - `--nave-color-backdrop-modal`: Translucent layer between a modal panel and the page, which it recedes. Only behind a fully modal panel; never under text, a control or a focus indicator the reader can reach.
198
212
  - `--nave-color-border-control`: Identifying boundary for a control (inputs, form boundaries, and the secondary action control).
199
213
  - `--nave-color-border-default`: Decorative dividers and card edges.