@booki-aui/styles 0.3.2 → 0.4.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": "@booki-aui/styles",
3
- "version": "0.3.2",
3
+ "version": "0.4.0",
4
4
  "description": "Booki default look — Paper and Ink tokens and data-slot styles, with the agent cursor. Optional.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -9,7 +9,7 @@
9
9
  "url": "git+https://github.com/Walgermo/booki.git",
10
10
  "directory": "packages/styles"
11
11
  },
12
- "homepage": "https://github.com/Walgermo/booki#readme",
12
+ "homepage": "https://booki.dev/docs/installation",
13
13
  "bugs": {
14
14
  "url": "https://github.com/Walgermo/booki/issues"
15
15
  },
@@ -66,6 +66,7 @@
66
66
  "lightningcss": "1.33.0"
67
67
  },
68
68
  "scripts": {
69
- "build": "node ./scripts/build.mjs"
69
+ "build": "node ./scripts/build.mjs",
70
+ "test": "node --test scripts/*.test.mjs"
70
71
  }
71
72
  }
package/src/booki.css CHANGED
@@ -10,7 +10,8 @@
10
10
 
11
11
  :root,
12
12
  [data-bk-theme="light"] {
13
- color-scheme: light;
13
+ /* Keep the host's native color scheme when only the tokens are loaded. */
14
+ --bk-scheme: light;
14
15
 
15
16
  /* Paper */
16
17
  --bk-bg: oklch(0.973 0.003 100);
@@ -113,7 +114,7 @@
113
114
  * the agent's colour.
114
115
  */
115
116
  [data-bk-theme="dark"] {
116
- color-scheme: dark;
117
+ --bk-scheme: dark;
117
118
 
118
119
  --bk-bg: oklch(0.175 0.014 262);
119
120
  --bk-card: oklch(0.215 0.016 262);
@@ -160,6 +161,12 @@
160
161
  --bk-shadow-md: 0 0 0 1px oklch(1 0 0 / 0.13);
161
162
  }
162
163
 
164
+ /* Theme wrappers opt in to native form chrome, including when nested. */
165
+ [data-bk-theme="light"],
166
+ [data-bk-theme="dark"] {
167
+ color-scheme: var(--bk-scheme);
168
+ }
169
+
163
170
  /* ── Base text inside FIN surfaces ───────────────────────────────────── */
164
171
 
165
172
  :where(
@@ -198,6 +205,8 @@
198
205
  }
199
206
 
200
207
  :where([data-slot]) {
208
+ color-scheme: var(--bk-scheme);
209
+
201
210
  & :is(label) {
202
211
  display: grid;
203
212
  gap: 0.35rem;