dowel-ui 0.12.0 → 0.13.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
@@ -175,6 +175,22 @@ Development goes in versions; each one is a single coherent theme, and ends in a
175
175
  - [Getting started](https://lacodda.github.io/dowel/getting-started/), [the lint rules](https://lacodda.github.io/dowel/guides/linting/) and [what a component has to pass](https://lacodda.github.io/dowel/guides/gates/)
176
176
  - [Components](https://lacodda.github.io/dowel/components/button/)
177
177
  - [Tokens](https://lacodda.github.io/dowel/reference/tokens/), [scales](https://lacodda.github.io/dowel/reference/scales/) and [accents](https://lacodda.github.io/dowel/reference/accents/)
178
+ - [The vocabulary](https://lacodda.github.io/dowel/concepts/vocabulary/) this system uses for its own parts, and [the mistakes](https://lacodda.github.io/dowel/concepts/anti-patterns/) that actually get made against it
179
+
180
+ ## For a machine
181
+
182
+ The documentation is also served in the form an agent reads, generated from the
183
+ same sources the site is built from:
184
+
185
+ - [llms.txt](https://lacodda.github.io/dowel/llms.txt) - the index, and
186
+ [llms-full.txt](https://lacodda.github.io/dowel/llms-full.txt) for all of it
187
+ in one request
188
+ - any page as plain Markdown, by appending `.md` to its URL
189
+ - [a JSON Schema](https://lacodda.github.io/dowel/r/schema.json) of a registry
190
+ item, validated against every item the registry serves
191
+ - an [`AGENTS.md`](https://lacodda.github.io/dowel/r/agents.json) a consumer
192
+ installs like any other item, so a product on dowel can tell its own agents
193
+ what its code cannot
178
194
 
179
195
  ## License
180
196
 
@@ -222,7 +222,7 @@
222
222
  "description": "A message that stays on the screen, in the flow of the page, about the thing next to it: this field could not be saved, this profile has no axes yet, this export is out of date.",
223
223
  "dependencies": [
224
224
  "class-variance-authority",
225
- "dowel-ui@^0.12.0"
225
+ "dowel-ui@^0.13.0"
226
226
  ],
227
227
  "registryDependencies": [],
228
228
  "files": [
@@ -241,7 +241,7 @@
241
241
  "description": "A small piece of state attached to something else: a count, a status, a label. It is not a button and never was - if it can be clicked it is a Chip.",
242
242
  "dependencies": [
243
243
  "class-variance-authority",
244
- "dowel-ui@^0.12.0"
244
+ "dowel-ui@^0.13.0"
245
245
  ],
246
246
  "registryDependencies": [],
247
247
  "files": [
@@ -260,7 +260,7 @@
260
260
  "description": "A strip across the top of the application, about the application: you are offline, this build is a preview, your licence expires on Friday, a new version is ready to install.",
261
261
  "dependencies": [
262
262
  "class-variance-authority",
263
- "dowel-ui@^0.12.0"
263
+ "dowel-ui@^0.13.0"
264
264
  ],
265
265
  "registryDependencies": [],
266
266
  "files": [
@@ -280,7 +280,7 @@
280
280
  "dependencies": [
281
281
  "@base-ui/react",
282
282
  "class-variance-authority",
283
- "dowel-ui@^0.12.0"
283
+ "dowel-ui@^0.13.0"
284
284
  ],
285
285
  "registryDependencies": [],
286
286
  "files": [
@@ -299,7 +299,7 @@
299
299
  "description": "A badge you can act on: a filter that can be removed, a tag with a count, a selected value in a field. The difference from a Badge is entirely about whether something happens when you click it - and if something does, that part is a real `<button>` with a real label, not a decorative cross.",
300
300
  "dependencies": [
301
301
  "class-variance-authority",
302
- "dowel-ui@^0.12.0"
302
+ "dowel-ui@^0.13.0"
303
303
  ],
304
304
  "registryDependencies": [],
305
305
  "files": [
@@ -319,7 +319,7 @@
319
319
  "dependencies": [
320
320
  "@base-ui/react",
321
321
  "class-variance-authority",
322
- "dowel-ui@^0.12.0"
322
+ "dowel-ui@^0.13.0"
323
323
  ],
324
324
  "registryDependencies": [
325
325
  "https://lacodda.github.io/dowel/r/input.json",
@@ -342,7 +342,7 @@
342
342
  "dependencies": [
343
343
  "@base-ui/react",
344
344
  "class-variance-authority",
345
- "dowel-ui@^0.12.0"
345
+ "dowel-ui@^0.13.0"
346
346
  ],
347
347
  "registryDependencies": [
348
348
  "https://lacodda.github.io/dowel/r/combobox.json",
@@ -365,7 +365,7 @@
365
365
  "dependencies": [
366
366
  "@base-ui/react",
367
367
  "class-variance-authority",
368
- "dowel-ui@^0.12.0"
368
+ "dowel-ui@^0.13.0"
369
369
  ],
370
370
  "registryDependencies": [],
371
371
  "files": [
@@ -384,7 +384,7 @@
384
384
  "description": "The same list of actions as Menu, opened the other way round: by right click, or by a long press on a touch screen, over an *area* rather than from a button. So the trigger is not a control - it is the region the menu belongs to, a row, a canvas, a file tile - and it renders a `<div>`.",
385
385
  "dependencies": [
386
386
  "@base-ui/react",
387
- "dowel-ui@^0.12.0"
387
+ "dowel-ui@^0.13.0"
388
388
  ],
389
389
  "registryDependencies": [
390
390
  "https://lacodda.github.io/dowel/r/menu.json"
@@ -404,7 +404,7 @@
404
404
  "title": "Copyable",
405
405
  "description": "Any text that someone will eventually want to copy - an id, a path, a hash, a token - copied with one click. The rule comes from nitid: if a value is worth showing, it is worth being able to take away, and selecting a monospaced id by hand is a small daily tax.",
406
406
  "dependencies": [
407
- "dowel-ui@^0.12.0"
407
+ "dowel-ui@^0.13.0"
408
408
  ],
409
409
  "registryDependencies": [],
410
410
  "files": [
@@ -424,7 +424,7 @@
424
424
  "dependencies": [
425
425
  "@base-ui/react",
426
426
  "class-variance-authority",
427
- "dowel-ui@^0.12.0"
427
+ "dowel-ui@^0.13.0"
428
428
  ],
429
429
  "registryDependencies": [],
430
430
  "files": [
@@ -444,7 +444,7 @@
444
444
  "dependencies": [
445
445
  "@base-ui/react",
446
446
  "class-variance-authority",
447
- "dowel-ui@^0.12.0"
447
+ "dowel-ui@^0.13.0"
448
448
  ],
449
449
  "registryDependencies": [],
450
450
  "files": [
@@ -462,7 +462,7 @@
462
462
  "title": "Input",
463
463
  "description": "A single-line field. It is a plain `<input>` with the line's clothes on, so everything a browser gives an input for free - autofill, spellcheck, the right keyboard on a phone, `type=\"email\"` validation - still works.",
464
464
  "dependencies": [
465
- "dowel-ui@^0.12.0"
465
+ "dowel-ui@^0.13.0"
466
466
  ],
467
467
  "registryDependencies": [],
468
468
  "files": [
@@ -480,7 +480,7 @@
480
480
  "title": "Kbd",
481
481
  "description": "A key, as printed in a menu or a hint: `Ctrl` `K`. It is a `<kbd>` element because that is what the element is for - a screen reader announces it as keyboard input rather than reading a stray capital letter.",
482
482
  "dependencies": [
483
- "dowel-ui@^0.12.0"
483
+ "dowel-ui@^0.13.0"
484
484
  ],
485
485
  "registryDependencies": [],
486
486
  "files": [
@@ -500,7 +500,7 @@
500
500
  "dependencies": [
501
501
  "@base-ui/react",
502
502
  "class-variance-authority",
503
- "dowel-ui@^0.12.0"
503
+ "dowel-ui@^0.13.0"
504
504
  ],
505
505
  "registryDependencies": [],
506
506
  "files": [
@@ -519,7 +519,7 @@
519
519
  "description": "The raised surface everything else sits on. It is the one place a screen gets its structure from, so it stays deliberately plain: a ground, a hairline, a corner.",
520
520
  "dependencies": [
521
521
  "class-variance-authority",
522
- "dowel-ui@^0.12.0"
522
+ "dowel-ui@^0.13.0"
523
523
  ],
524
524
  "registryDependencies": [],
525
525
  "files": [
@@ -539,7 +539,7 @@
539
539
  "dependencies": [
540
540
  "@base-ui/react",
541
541
  "class-variance-authority",
542
- "dowel-ui@^0.12.0"
542
+ "dowel-ui@^0.13.0"
543
543
  ],
544
544
  "registryDependencies": [],
545
545
  "files": [
@@ -559,7 +559,7 @@
559
559
  "dependencies": [
560
560
  "@base-ui/react",
561
561
  "class-variance-authority",
562
- "dowel-ui@^0.12.0"
562
+ "dowel-ui@^0.13.0"
563
563
  ],
564
564
  "registryDependencies": [],
565
565
  "files": [
@@ -577,7 +577,7 @@
577
577
  "title": "Search-field",
578
578
  "description": "An Input that knows it is a search box, which is three small things the products kept not doing:\n * - a magnifier, so the field is recognisable before it is read; - a way to clear it that is not \"select all and delete\" - and one that a keyboard can reach, which a decorative `<span>` cannot; - the shortcut that focuses it, shown in the field rather than learned.",
579
579
  "dependencies": [
580
- "dowel-ui@^0.12.0"
580
+ "dowel-ui@^0.13.0"
581
581
  ],
582
582
  "registryDependencies": [
583
583
  "https://lacodda.github.io/dowel/r/input.json",
@@ -601,7 +601,7 @@
601
601
  "dependencies": [
602
602
  "@base-ui/react",
603
603
  "class-variance-authority",
604
- "dowel-ui@^0.12.0"
604
+ "dowel-ui@^0.13.0"
605
605
  ],
606
606
  "registryDependencies": [
607
607
  "https://lacodda.github.io/dowel/r/input.json"
@@ -638,7 +638,7 @@
638
638
  "description": "Something is happening and the answer has not arrived. It carries no text of its own - what is loading is the product's word, not the system's - but it does have to say *something* to a screen reader, or a page that is busy is silently identical to a page that is empty.",
639
639
  "dependencies": [
640
640
  "class-variance-authority",
641
- "dowel-ui@^0.12.0"
641
+ "dowel-ui@^0.13.0"
642
642
  ],
643
643
  "registryDependencies": [],
644
644
  "files": [
@@ -656,7 +656,7 @@
656
656
  "title": "Textarea",
657
657
  "description": "A multi-line field that can grow with what is typed into it, which is the only interesting part: a fixed box makes someone scroll inside a scroll, and a box that grows without limit pushes the button they are trying to reach off the screen. `autoResize` grows it; `maxRows` says when to stop and let it scroll after all.",
658
658
  "dependencies": [
659
- "dowel-ui@^0.12.0"
659
+ "dowel-ui@^0.13.0"
660
660
  ],
661
661
  "registryDependencies": [
662
662
  "https://lacodda.github.io/dowel/r/input.json"
@@ -678,7 +678,7 @@
678
678
  "dependencies": [
679
679
  "@base-ui/react",
680
680
  "class-variance-authority",
681
- "dowel-ui@^0.12.0"
681
+ "dowel-ui@^0.13.0"
682
682
  ],
683
683
  "registryDependencies": [],
684
684
  "files": [
@@ -698,7 +698,7 @@
698
698
  "dependencies": [
699
699
  "@base-ui/react",
700
700
  "class-variance-authority",
701
- "dowel-ui@^0.12.0"
701
+ "dowel-ui@^0.13.0"
702
702
  ],
703
703
  "registryDependencies": [],
704
704
  "files": [
@@ -716,7 +716,7 @@
716
716
  "title": "Truncate",
717
717
  "description": "Text that does not fit, cut with an ellipsis - and, importantly, still readable in full: the element carries its own text as a `title`, so hovering shows what was cut. Every product wrote the one-line version of this and none of them remembered the title.",
718
718
  "dependencies": [
719
- "dowel-ui@^0.12.0"
719
+ "dowel-ui@^0.13.0"
720
720
  ],
721
721
  "registryDependencies": [],
722
722
  "files": [
@@ -780,6 +780,21 @@
780
780
  "https://lacodda.github.io/dowel/r/toast.json"
781
781
  ],
782
782
  "docs": "Which of the four to reach for is the harder question: see https://lacodda.github.io/dowel/guides/overlays/"
783
+ },
784
+ {
785
+ "name": "agents",
786
+ "type": "registry:file",
787
+ "title": "Agent briefing",
788
+ "description": "What an agent working in a product on dowel has to know: that components are copied rather than installed, that no colour is ever written down, and where to look things up. Lands at the project root as AGENTS.md.",
789
+ "files": [
790
+ {
791
+ "path": "files/AGENTS.md",
792
+ "target": "~/AGENTS.md",
793
+ "type": "registry:file",
794
+ "content": "# Working on the UI of this project\n\nThis project's interface is built on [dowel](https://lacodda.github.io/dowel),\nthe lacodda line design system. What follows is what an agent — or a person new\nto the codebase — has to know before touching a component.\n\n## Where the components come from\n\nThey were **copied in**, not installed. `npx shadcn add <url>` writes a file\ninto `components/ui/` and from that moment it belongs to this project.\n\n- Editing one is normal. It is this project's file.\n- Re-running `add` for a component **overwrites it, edits included**. There is\n no merge. Before re-adding, check whether the local copy was changed.\n- Adding a new one: `npx shadcn@latest add https://lacodda.github.io/dowel/r/<name>.json`\n\nThe catalogue of what exists is at\n[`/r/registry.json`](https://lacodda.github.io/dowel/r/registry.json), and also\noffline at `node_modules/dowel-ui/registry.json` — the version this project\nactually has. Check there before writing a component from scratch.\n\n## The rules that are not negotiable here\n\n**No colour is ever written down.** Not a hex, not `rgb()`, not a stock Tailwind\ncolour like `zinc-800`, not `bg-white`. Every colour goes through a token:\n`bg-bg`, `bg-raise`, `text-text`, `text-dim`, `border-line`, `bg-accent`,\n`text-on-accent`. The full vocabulary:\n<https://lacodda.github.io/dowel/reference/tokens/>\n\n**No `dark:` utility.** A component does not know which theme it is in — the\ntheme swaps the token underneath. A `dark:` in a component means a token is\nmissing; that is the thing to fix.\n\n*(A translucent black or white is not a colour but a veil: `bg-black/50` over an\nimage is fine.)*\n\n**No native `<select>`.** Use the `Select` or `Combobox` component. The browser\ndraws a native select's popup in the operating system's own chrome, where no\nstylesheet reaches.\n\nBoth rules are enforced by ESLint (`dowel-ui/eslint`), so a violation fails the\nlint, not a review.\n\n## The theme\n\nOne import, plus this product's own colour:\n\n```css\n@import 'tailwindcss';\n@import 'dowel-ui/theme.css';\n@import 'dowel-ui/accents/<product>.css';\n```\n\nEverything else is derived from that one accent — the hover shade, the soft\nfill, the focus ring, and what colour text has to be on an accent fill. **Do not\noverride a derived token** (`--on-accent` especially): it is calculated for\ncontrast, and setting it by hand is how unreadable buttons ship.\n\n## Where to look things up\n\n- Components, one page each: <https://lacodda.github.io/dowel/components/button/>\n- Every component live, in both themes: <https://lacodda.github.io/dowel/stand/>\n- The words this system uses: <https://lacodda.github.io/dowel/concepts/vocabulary/>\n- Mistakes that are actually made against it: <https://lacodda.github.io/dowel/concepts/anti-patterns/>\n- For a machine reader: <https://lacodda.github.io/dowel/llms.txt>, and any page\n as Markdown by appending `.md` to its URL.\n\n## What to do when a component does not fit\n\nIn order:\n\n1. **Check its parts.** dowel exposes them (`DialogPopup`, `DialogTitle`,\n `DialogActions`) rather than hiding them behind props. Most \"it does not fit\"\n is a part that was not reached for.\n2. **Wrap it.** A local wrapper that fixes this product's conventions around a\n dowel component keeps the component upgradable.\n3. **Edit the copy.** It is this project's file. Note that the next `add` will\n overwrite it.\n\nWriting a second component that does the same thing is the option that costs\nlater, and it is the one that happens by default.\n"
795
+ }
796
+ ],
797
+ "docs": "Replace `<product>` in the accent import with your own, and add whatever else your project expects of an agent."
783
798
  }
784
799
  ]
785
800
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dowel-ui",
3
- "version": "0.12.0",
3
+ "version": "0.13.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",
@@ -44,7 +44,7 @@
44
44
  "./accents/*.css": "./dist/accents/*.css"
45
45
  },
46
46
  "scripts": {
47
- "build": "tsc && node ../../tools/copy-theme.mjs && node ../../tools/build-tokens-json.mjs && node ../../tools/build-accents.mjs && node ../../tools/build-registry.mjs",
47
+ "build": "tsc && node ../../tools/copy-theme.mjs && node ../../tools/build-tokens-json.mjs && node ../../tools/build-accents.mjs && node ../../tools/build-registry.mjs && node ../../tools/build-schema.mjs && node ../../tools/build-llms.mjs",
48
48
  "typecheck": "tsc --noEmit",
49
49
  "prepack": "node ../../tools/copy-readme.mjs"
50
50
  },