dowel-ui 0.24.0 → 0.26.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/dist/theme.css CHANGED
@@ -169,6 +169,44 @@
169
169
  --heat-4: #608ccd;
170
170
  --heat-5: #73a0e2;
171
171
 
172
+ /* Syntax, for code shown inside a product.
173
+ *
174
+ * Eight kinds rather than the fifty a highlighter's theme names, because
175
+ * these are the distinctions that survive across languages: a keyword, a
176
+ * literal string, a number, a comment, an identifier, a type, punctuation,
177
+ * and the metadata around the code (a decorator, an attribute, a prompt).
178
+ * Anything finer is a grammar's own vocabulary and does not travel.
179
+ *
180
+ * Fixed, like the series and the heat ramps, and for the same reason: code
181
+ * is not a property of the product showing it, and `if` should not be
182
+ * magenta in kilna and cobalt in kasl-server.
183
+ *
184
+ * Chosen against the surface code actually sits on - `--soft` over `--bg`,
185
+ * which is what CodeBlock and `.prose pre` draw - and every slot clears
186
+ * 4.5:1 AS TEXT in both themes. That threshold, not the 3:1 the series are
187
+ * held to, is the whole reason these exist separately: the series palette
188
+ * was measured here first and five of its eight light values sat under 3:1,
189
+ * one at 1.90:1. A filled bar can be pale; a 12px glyph cannot.
190
+ *
191
+ * These are deliberately NOT held to the colour-blind floor the series are.
192
+ * A series colour is the identity of its mark - lose the hue and the data is
193
+ * gone. Syntax colour is a second reading of what the text already says in
194
+ * full: a keyword is a keyword by its spelling, and CodeBlock's default
195
+ * renders no colour at all and stays readable. `syntax.test.ts` says so in
196
+ * place, so the omission is not mistaken for an oversight.
197
+ *
198
+ * `comment` is the quietest on purpose - it is the one kind a reader is
199
+ * meant to be able to skip - and still clears the threshold.
200
+ */
201
+ --syntax-keyword: #c792ea;
202
+ --syntax-string: #9ccc65;
203
+ --syntax-number: #f78c6c;
204
+ --syntax-comment: #9e99a6;
205
+ --syntax-name: #82aaff;
206
+ --syntax-type: #4dd0b1;
207
+ --syntax-punctuation: #c4bfcb;
208
+ --syntax-meta: #f0a868;
209
+
172
210
  /* Elevation, three steps. The products had one shadow and used it for
173
211
  * everything that leaves the flow - a toast, a dropdown and a modal all
174
212
  * floated by the same amount, so a modal never felt further away than the
@@ -264,6 +302,19 @@
264
302
  --heat-4: #4c6cbb;
265
303
  --heat-5: #3b58a6;
266
304
 
305
+ /* The same eight kinds chosen again for the light ground - not the dark
306
+ * values darkened. Each clears 4.5:1 as text against `--soft` over this
307
+ * theme's `--bg`; the dark block says why syntax is its own palette and
308
+ * why it is not held to the colour-blind floor. */
309
+ --syntax-keyword: #7c3aad;
310
+ --syntax-string: #276c2b;
311
+ --syntax-number: #b5451b;
312
+ --syntax-comment: #6f6b78;
313
+ --syntax-name: #1a5fb4;
314
+ --syntax-type: #00695c;
315
+ --syntax-punctuation: #4a4753;
316
+ --syntax-meta: #9c4a00;
317
+
267
318
  --shadow-lift: 0 2px 8px rgb(30 24 38 / 0.08);
268
319
  --shadow-raise: 0 10px 30px rgb(30 24 38 / 0.14);
269
320
  --shadow-float: 0 24px 60px rgb(30 24 38 / 0.18);
@@ -335,6 +386,19 @@
335
386
  --heat-4: #4c6cbb;
336
387
  --heat-5: #3b58a6;
337
388
 
389
+ /* The same eight kinds chosen again for the light ground - not the dark
390
+ * values darkened. Each clears 4.5:1 as text against `--soft` over this
391
+ * theme's `--bg`; the dark block says why syntax is its own palette and
392
+ * why it is not held to the colour-blind floor. */
393
+ --syntax-keyword: #7c3aad;
394
+ --syntax-string: #276c2b;
395
+ --syntax-number: #b5451b;
396
+ --syntax-comment: #6f6b78;
397
+ --syntax-name: #1a5fb4;
398
+ --syntax-type: #00695c;
399
+ --syntax-punctuation: #4a4753;
400
+ --syntax-meta: #9c4a00;
401
+
338
402
  --shadow-lift: 0 2px 8px rgb(30 24 38 / 0.08);
339
403
  --shadow-raise: 0 10px 30px rgb(30 24 38 / 0.14);
340
404
  --shadow-float: 0 24px 60px rgb(30 24 38 / 0.18);
@@ -455,6 +519,19 @@
455
519
  --color-heat-4: var(--heat-4);
456
520
  --color-heat-5: var(--heat-5);
457
521
 
522
+ /* Syntax, so a highlighted token is written `text-syntax-keyword` like every
523
+ * other colour in the system, and `dowel/no-raw-color` can hold it to that.
524
+ * A highlighter's own stylesheet - which writes hex values into class names
525
+ * of its own choosing - is what this replaces. */
526
+ --color-syntax-keyword: var(--syntax-keyword);
527
+ --color-syntax-string: var(--syntax-string);
528
+ --color-syntax-number: var(--syntax-number);
529
+ --color-syntax-comment: var(--syntax-comment);
530
+ --color-syntax-name: var(--syntax-name);
531
+ --color-syntax-type: var(--syntax-type);
532
+ --color-syntax-punctuation: var(--syntax-punctuation);
533
+ --color-syntax-meta: var(--syntax-meta);
534
+
458
535
  /* Kept because they are not palette choices: a hairline is `transparent`,
459
536
  * an SVG follows `currentColor`, and pure black and white are what an
460
537
  * overlay scrim and a print sheet are made of. */
package/dist/tokens.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "$description": "The dowel token vocabulary: the scales every product of the lacodda line is drawn on. Most colours are omitted - they are derived per product from its own accent - except the chart series and the magnitude scale, which are fixed for the whole line.",
2
+ "$description": "The dowel token vocabulary: the scales every product of the lacodda line is drawn on. Most colours are omitted - they are derived per product from its own accent - except the five that are fixed for the whole line: the chart series, the magnitude scale, the status hues, the heat ramp and the syntax colours.",
3
3
  "radius": {
4
4
  "$type": "dimension",
5
5
  "$description": "Corner radius. `md` is the control radius: inputs, buttons, list rows.",
@@ -146,6 +146,132 @@
146
146
  }
147
147
  }
148
148
  },
149
+ "status": {
150
+ "$type": "color",
151
+ "$description": "Meaning rather than decoration, and the same in every product of the line. Never the only carrier: a badge shows an icon and a word as well, so the message survives a monochrome screen.",
152
+ "dark": {
153
+ "good": {
154
+ "$value": "#45d18f"
155
+ },
156
+ "warn": {
157
+ "$value": "#e8b13f"
158
+ },
159
+ "bad": {
160
+ "$value": "#ef6a6a"
161
+ },
162
+ "info": {
163
+ "$value": "#4cc4e0"
164
+ }
165
+ },
166
+ "light": {
167
+ "good": {
168
+ "$value": "#0c8554"
169
+ },
170
+ "warn": {
171
+ "$value": "#9a6b0c"
172
+ },
173
+ "bad": {
174
+ "$value": "#c93b3b"
175
+ },
176
+ "info": {
177
+ "$value": "#0d7f9c"
178
+ }
179
+ }
180
+ },
181
+ "heat": {
182
+ "$type": "color",
183
+ "$description": "Heat: five ordinal steps for a grid where colour is the only thing carrying the value. Its own ramp rather than a slice of the scale, because the faintest step has to stay distinct from an empty cell.",
184
+ "dark": {
185
+ "heat-1": {
186
+ "$value": "#28528e"
187
+ },
188
+ "heat-2": {
189
+ "$value": "#3a65a3"
190
+ },
191
+ "heat-3": {
192
+ "$value": "#4d78b7"
193
+ },
194
+ "heat-4": {
195
+ "$value": "#608ccd"
196
+ },
197
+ "heat-5": {
198
+ "$value": "#73a0e2"
199
+ }
200
+ },
201
+ "light": {
202
+ "heat-1": {
203
+ "$value": "#84a8fd"
204
+ },
205
+ "heat-2": {
206
+ "$value": "#7193e7"
207
+ },
208
+ "heat-3": {
209
+ "$value": "#5e7fd1"
210
+ },
211
+ "heat-4": {
212
+ "$value": "#4c6cbb"
213
+ },
214
+ "heat-5": {
215
+ "$value": "#3b58a6"
216
+ }
217
+ }
218
+ },
219
+ "syntax": {
220
+ "$type": "color",
221
+ "$description": "The eight kinds in a piece of code worth telling apart in every language. Measured as text against the hardest surface a code block sits on, which is why they are not the series palette.",
222
+ "dark": {
223
+ "syntax-keyword": {
224
+ "$value": "#c792ea"
225
+ },
226
+ "syntax-string": {
227
+ "$value": "#9ccc65"
228
+ },
229
+ "syntax-number": {
230
+ "$value": "#f78c6c"
231
+ },
232
+ "syntax-comment": {
233
+ "$value": "#9e99a6"
234
+ },
235
+ "syntax-name": {
236
+ "$value": "#82aaff"
237
+ },
238
+ "syntax-type": {
239
+ "$value": "#4dd0b1"
240
+ },
241
+ "syntax-punctuation": {
242
+ "$value": "#c4bfcb"
243
+ },
244
+ "syntax-meta": {
245
+ "$value": "#f0a868"
246
+ }
247
+ },
248
+ "light": {
249
+ "syntax-keyword": {
250
+ "$value": "#7c3aad"
251
+ },
252
+ "syntax-string": {
253
+ "$value": "#276c2b"
254
+ },
255
+ "syntax-number": {
256
+ "$value": "#b5451b"
257
+ },
258
+ "syntax-comment": {
259
+ "$value": "#6f6b78"
260
+ },
261
+ "syntax-name": {
262
+ "$value": "#1a5fb4"
263
+ },
264
+ "syntax-type": {
265
+ "$value": "#00695c"
266
+ },
267
+ "syntax-punctuation": {
268
+ "$value": "#4a4753"
269
+ },
270
+ "syntax-meta": {
271
+ "$value": "#9c4a00"
272
+ }
273
+ }
274
+ },
149
275
  "typography": {
150
276
  "$type": "typography",
151
277
  "$description": "Type steps, each with the line height it is set on.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dowel-ui",
3
- "version": "0.24.0",
3
+ "version": "0.26.0",
4
4
  "description": "The lacodda line design system: theme tokens and React primitives, distributed as a shadcn-compatible registry.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -46,6 +46,7 @@
46
46
  "import": "./dist/cli/index.js"
47
47
  },
48
48
  "./theme.css": "./dist/theme.css",
49
+ "./prose.css": "./dist/prose.css",
49
50
  "./tokens.json": "./dist/tokens.json",
50
51
  "./registry.json": "./dist/registry.json",
51
52
  "./accents/*.css": "./dist/accents/*.css"