dowel-ui 0.24.0 → 0.25.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.
@@ -14,11 +14,27 @@
14
14
  "path": "dowel/theme.css",
15
15
  "target": "~/dowel/theme.css",
16
16
  "type": "registry:file",
17
- "content": "/*\n * dowel theme - the token vocabulary every product of the lacodda line shares.\n *\n * The vocabulary comes from the products themselves: kilna and kasl-server\n * already ship the same token names (bg / raise / soft / line / text / dim /\n * accent / good / warn / bad / info) and differ only in values. That is the\n * contract this file freezes. Names are the mockup's own words rather than\n * stock component-library names, so a screen can be checked against a mockup\n * in the mockup's words.\n *\n * Two things are parametric, and everything else is derived from them:\n *\n * --accent-base the product's hue from the brand-line registry\n * --neutral-base the hue the greys are tinted with (the accent, by default)\n *\n * Tinting the neutrals is not decoration - it is what the two live products do\n * by hand: kilna's greys lean magenta, kasl-server's lean gold. Here that lean\n * is one declaration instead of thirty hand-picked hex values.\n *\n * Soft variants are mixed from their own base with `color-mix`, so a product\n * that overrides `--accent-base` gets a matching `--accent-soft` for free and\n * cannot pick one that disagrees with it.\n *\n * Theme selection: no class on the root element follows the operating system,\n * an explicit `light` or `dark` class pins the theme. Components never use\n * `dark:` utilities - every colour goes through a token, and the theme swaps\n * the token underneath.\n */\n\n:root {\n /* The two parameters. `--accent-base` is overridden per product by an accent\n * file; `--neutral-base` follows it unless a product says otherwise. */\n --accent-base: #e8862d;\n --neutral-base: var(--accent-base);\n\n /* Ink and ground of the dark theme, before the neutral tint is mixed in.\n * Kept as their own tokens so the tint amount is the only thing that\n * changes when a product wants greyer or warmer chrome. */\n --ground: #131316;\n --ink: #ece9ef;\n\n /* How much of `--neutral-base` bleeds into the greys. The live products sit\n * at roughly this much: enough that the chrome belongs to the product,\n * little enough that it still reads as grey. */\n --neutral-tint: 6%;\n --neutral-tint-strong: 9%;\n\n color-scheme: dark;\n\n --bg: color-mix(in oklab, var(--neutral-base) var(--neutral-tint), var(--ground));\n --raise: color-mix(in oklab, var(--neutral-base) var(--neutral-tint), #1c1c21);\n\n /* Surfaces that lift by translucency rather than by their own colour: they\n * must work over `--bg` and over `--raise` alike. */\n --soft: rgb(255 255 255 / 0.045);\n --softer: rgb(255 255 255 / 0.025);\n --line: rgb(255 255 255 / 0.08);\n --line-2: rgb(255 255 255 / 0.15);\n\n --text: color-mix(in oklab, var(--neutral-base) var(--neutral-tint), var(--ink));\n --dim: color-mix(in oklab, var(--neutral-base) var(--neutral-tint-strong), #a7a2ad);\n --faint: color-mix(in oklab, var(--neutral-base) var(--neutral-tint-strong), #6e6a76);\n\n --accent: var(--accent-base);\n /* The hover/active partner: lighter on dark, where the ground is what the\n * accent has to separate from. */\n --accent-2: color-mix(in oklab, white 22%, var(--accent-base));\n --accent-soft: color-mix(in oklab, var(--accent-base) 16%, transparent);\n\n /* Status hues are the line's own and do not follow the product accent: a\n * green that shifted per product would stop meaning \"good\". Meaning never\n * rests on colour alone - a badge carries an icon and a word - so these\n * exist for emphasis, not as the message. */\n --good: #45d18f;\n --warn: #e8b13f;\n --bad: #ef6a6a;\n --info: #4cc4e0;\n --good-soft: color-mix(in oklab, var(--good) 14%, transparent);\n --warn-soft: color-mix(in oklab, var(--warn) 14%, transparent);\n --bad-soft: color-mix(in oklab, var(--bad) 14%, transparent);\n --info-soft: color-mix(in oklab, var(--info) 15%, transparent);\n\n /* Series colours, for charts.\n *\n * Like the status hues and unlike everything else here, these do NOT follow\n * the product accent - and that is the whole decision. A series is a\n * property of the data, not of the product showing it; a palette derived\n * from the accent would paint the same series differently in kilna and in\n * kasl-server, which is the one thing a series colour must never do.\n *\n * Deriving them from the accent was measured, not guessed: rotating the hue\n * by fixed angles put the best candidate at Delta-E 12.1 from the product's\n * own accent with adjacent pairs at 9.8, and threw 46 of 152 colours outside\n * sRGB. The fixed palette does better on both counts.\n *\n * The cost of fixing them is stated plainly: 13 of the line's 19 accents sit\n * within Delta-E 8 of some slot (lyrid 2.7, atlas 3.1, turnout 3.2). A chart\n * shows one accent, so this is survivable - but it is exactly why identity is\n * carried by the legend and by direct labels, never by hue on its own. The\n * components of this block enforce that; it is not advice.\n *\n * Assigned in order, 1..8, and never cycled: a ninth series folds into\n * \"other\", or the chart becomes small multiples. The order is the\n * colour-blind-safety mechanism - the worst adjacent pair is Delta-E 8.4\n * under simulated protanopia - so re-ordering these breaks a gate.\n *\n * Slot 8 is the line's own value rather than the reference palette's. The\n * reference red sat Delta-E 1.9 from `--bad`, which would have let a series\n * impersonate a status; this one clears every status by 15 and costs\n * nothing, the worst adjacent pair being unchanged.\n *\n * Some slots sit below 3:1 against the surface. That is allowed only because\n * the relief ships with them: visible values, or the table view.\n */\n --series-1: #3987e5;\n --series-2: #d95926;\n --series-3: #199e70;\n --series-4: #c98500;\n --series-5: #d55181;\n --series-6: #008300;\n --series-7: #9085e9;\n --series-8: #a3215a;\n\n /* Magnitude rather than identity: one hue, light to dark. A heatmap cell\n * reads this. The lightest step is allowed to recede toward the surface,\n * because \"near zero\" should; an ordered-but-discrete scale (tiers, funnel\n * stages) starts at 300 instead, where the contrast still holds. */\n --scale-100: #0d366b;\n --scale-200: #184f95;\n --scale-300: #256abf;\n --scale-400: #2a78d6;\n --scale-500: #3987e5;\n --scale-600: #5598e7;\n --scale-700: #86b6ef;\n\n /* The chart's own furniture. A gridline that competes with the data is drawn\n * wrong, so it is quieter than `--line`; the axis is the one that may be\n * seen. */\n --chart-grid: rgb(255 255 255 / 0.06);\n --chart-axis: rgb(255 255 255 / 0.14);\n\n /* Heat, for a grid of cells where colour is the only thing carrying the\n * value - a year of activity, a month of a team's hours.\n *\n * Five discrete steps rather than the seven of `--scale-*`, and a separate\n * set rather than a slice of them, because the two answer different\n * questions. `--scale-*` is sequential: a continuous magnitude, where the\n * lightest step means \"near zero\" and may recede toward the surface.\n * Heat is ordinal: five shades a reader tells apart at a glance and matches\n * against a legend, which needs wider gaps between them (no slice of\n * `--scale-*` clears the 0.06 lightness step - they sit 0.047 apart) and a\n * bottom step that stays distinct from an empty cell.\n *\n * That last one is the whole point. A heatmap cell has more meanings than a\n * number: nothing recorded, a day still running, a day outside the data, and\n * a value. If the faintest value looks like the empty cell, the grid says\n * somebody did nothing on a day nobody reported - and `--heat-1` clears the\n * empty square by 2.1:1 so it cannot.\n *\n * Fixed, like the series and unlike almost everything else here. Derived\n * from the accent - as the first consumer did - the faintest step sat 1.3:1\n * from the empty cell for half the line, and pinning lightness instead ran\n * out of sRGB: the darkest accents cannot reach the top of the ramp at their\n * own chroma.\n */\n --heat-1: #28528e;\n --heat-2: #3a65a3;\n --heat-3: #4d78b7;\n --heat-4: #608ccd;\n --heat-5: #73a0e2;\n\n /* Elevation, three steps. The products had one shadow and used it for\n * everything that leaves the flow - a toast, a dropdown and a modal all\n * floated by the same amount, so a modal never felt further away than the\n * menu it covered. `raise` keeps its original value, so nothing shifts under\n * the products already using it; the other two are the steps either side. */\n --shadow-lift: 0 2px 8px rgb(0 0 0 / 0.3);\n --shadow-raise: 0 10px 34px rgb(0 0 0 / 0.45);\n --shadow-float: 0 24px 60px rgb(0 0 0 / 0.55);\n}\n\n/*\n * Light theme, twice: once for the operating system's preference, once for the\n * explicit `light` class. The declarations are identical - only the selector\n * differs - so that a product can pin a theme against the system setting.\n */\n@media (prefers-color-scheme: light) {\n :root:not(.dark) {\n color-scheme: light;\n\n --ground: #f6f5f7;\n --ink: #232027;\n\n --bg: color-mix(in oklab, var(--neutral-base) var(--neutral-tint), var(--ground));\n --raise: #ffffff;\n\n /* Tinted, and translucent - which took two goes to get right.\n *\n * `color-mix` mixes the alpha along with the colour, so mixing 60% of an\n * opaque accent into a 5%-opaque grey gives a surface 62% opaque: twelve\n * times denser than the hairline it was meant to be. It went unnoticed for\n * ten versions because `bg-soft` was only ever used for a hover, where a\n * flash of colour reads as feedback rather than as a mistake. The first\n * component to sit on it permanently - Alert - made it obvious.\n *\n * `oklch(from … / alpha)` keeps the alpha out of the mix: the hue comes\n * from the tinted colour, the transparency is stated. */\n --soft: oklch(from color-mix(in oklab, var(--neutral-base) 45%, #181420) l c h / 0.05);\n --softer: oklch(from color-mix(in oklab, var(--neutral-base) 45%, #181420) l c h / 0.03);\n --line: oklch(from color-mix(in oklab, var(--neutral-base) 30%, #181420) l c h / 0.11);\n --line-2: oklch(from color-mix(in oklab, var(--neutral-base) 30%, #181420) l c h / 0.2);\n\n --text: color-mix(in oklab, var(--neutral-base) var(--neutral-tint), var(--ink));\n --dim: color-mix(in oklab, var(--neutral-base) var(--neutral-tint-strong), #63606b);\n --faint: color-mix(in oklab, var(--neutral-base) var(--neutral-tint-strong), #8a8692);\n\n /* On a light ground the accent has to darken to stay legible as text and\n * as a fill. It darkens *to* a lightness rather than *by* an amount: how\n * far a hue has to travel depends on where it starts, and a fixed step\n * that suits magenta leaves lime and gold short. Pinning the lightness and\n * keeping the hue and chroma clears 5:1 for every accent in the line. */\n --accent: oklch(from var(--accent-base) 0.5 c h);\n --accent-2: oklch(from var(--accent-base) 0.4 c h);\n --accent-soft: color-mix(in oklab, var(--accent-base) 12%, transparent);\n\n --good: #0c8554;\n --warn: #9a6b0c;\n --bad: #c93b3b;\n --info: #0d7f9c;\n --good-soft: color-mix(in oklab, var(--good) 12%, transparent);\n --warn-soft: color-mix(in oklab, var(--warn) 14%, transparent);\n --bad-soft: color-mix(in oklab, var(--bad) 12%, transparent);\n --info-soft: color-mix(in oklab, var(--info) 11%, transparent);\n\n /* Series and scale, stepped for the light surface - the same eight hues\n * chosen again against this ground, not the dark values lightened. The dark\n * block says why these do not follow the product accent. */\n --series-1: #2a78d6;\n --series-2: #eb6834;\n --series-3: #1baf7a;\n --series-4: #eda100;\n --series-5: #e87ba4;\n --series-6: #008300;\n --series-7: #4a3aa7;\n --series-8: #85284d;\n\n --scale-100: #cde2fb;\n --scale-200: #9ec5f4;\n --scale-300: #6da7ec;\n --scale-400: #3987e5;\n --scale-500: #2a78d6;\n --scale-600: #1c5cab;\n --scale-700: #104281;\n\n --chart-grid: oklch(from color-mix(in oklab, var(--neutral-base) 30%, #181420) l c h / 0.08);\n --chart-axis: oklch(from color-mix(in oklab, var(--neutral-base) 30%, #181420) l c h / 0.18);\n\n /* The same five steps chosen again for the light ground, running the other\n * way: here \"more\" is darker. See the dark block for why heat is its own\n * ramp and not a slice of `--scale-*`. */\n --heat-1: #84a8fd;\n --heat-2: #7193e7;\n --heat-3: #5e7fd1;\n --heat-4: #4c6cbb;\n --heat-5: #3b58a6;\n\n --shadow-lift: 0 2px 8px rgb(30 24 38 / 0.08);\n --shadow-raise: 0 10px 30px rgb(30 24 38 / 0.14);\n --shadow-float: 0 24px 60px rgb(30 24 38 / 0.18);\n }\n}\n\n:root.light {\n color-scheme: light;\n\n --ground: #f6f5f7;\n --ink: #232027;\n\n --bg: color-mix(in oklab, var(--neutral-base) var(--neutral-tint), var(--ground));\n --raise: #ffffff;\n\n /* The same surfaces as above; see the note there. */\n --soft: oklch(from color-mix(in oklab, var(--neutral-base) 45%, #181420) l c h / 0.05);\n --softer: oklch(from color-mix(in oklab, var(--neutral-base) 45%, #181420) l c h / 0.03);\n --line: oklch(from color-mix(in oklab, var(--neutral-base) 30%, #181420) l c h / 0.11);\n --line-2: oklch(from color-mix(in oklab, var(--neutral-base) 30%, #181420) l c h / 0.2);\n\n --text: color-mix(in oklab, var(--neutral-base) var(--neutral-tint), var(--ink));\n --dim: color-mix(in oklab, var(--neutral-base) var(--neutral-tint-strong), #63606b);\n --faint: color-mix(in oklab, var(--neutral-base) var(--neutral-tint-strong), #8a8692);\n\n /* Darkened to a lightness, not by an amount - see the note above. */\n --accent: oklch(from var(--accent-base) 0.5 c h);\n --accent-2: oklch(from var(--accent-base) 0.4 c h);\n --accent-soft: color-mix(in oklab, var(--accent-base) 12%, transparent);\n\n --good: #0c8554;\n --warn: #9a6b0c;\n --bad: #c93b3b;\n --info: #0d7f9c;\n --good-soft: color-mix(in oklab, var(--good) 12%, transparent);\n --warn-soft: color-mix(in oklab, var(--warn) 14%, transparent);\n --bad-soft: color-mix(in oklab, var(--bad) 12%, transparent);\n --info-soft: color-mix(in oklab, var(--info) 11%, transparent);\n\n /* Series and scale, stepped for the light surface - the same eight hues\n * chosen again against this ground, not the dark values lightened. The dark\n * block says why these do not follow the product accent. */\n --series-1: #2a78d6;\n --series-2: #eb6834;\n --series-3: #1baf7a;\n --series-4: #eda100;\n --series-5: #e87ba4;\n --series-6: #008300;\n --series-7: #4a3aa7;\n --series-8: #85284d;\n\n --scale-100: #cde2fb;\n --scale-200: #9ec5f4;\n --scale-300: #6da7ec;\n --scale-400: #3987e5;\n --scale-500: #2a78d6;\n --scale-600: #1c5cab;\n --scale-700: #104281;\n\n --chart-grid: oklch(from color-mix(in oklab, var(--neutral-base) 30%, #181420) l c h / 0.08);\n --chart-axis: oklch(from color-mix(in oklab, var(--neutral-base) 30%, #181420) l c h / 0.18);\n\n /* The same five steps chosen again for the light ground, running the other\n * way: here \"more\" is darker. See the dark block for why heat is its own\n * ramp and not a slice of `--scale-*`. */\n --heat-1: #84a8fd;\n --heat-2: #7193e7;\n --heat-3: #5e7fd1;\n --heat-4: #4c6cbb;\n --heat-5: #3b58a6;\n\n --shadow-lift: 0 2px 8px rgb(30 24 38 / 0.08);\n --shadow-raise: 0 10px 30px rgb(30 24 38 / 0.14);\n --shadow-float: 0 24px 60px rgb(30 24 38 / 0.18);\n}\n\n/*\n * `--on-accent` - what sits on top of an accent fill.\n *\n * A light accent (gold, lime, amber) needs dark glyphs; a dark one needs\n * white. The live products picked this by hand and wrote the answer into the\n * theme; here the theme works it out, by the same rule the brand-line S tile\n * uses.\n *\n * `contrast-color()` is the direct way to say it and is used where supported.\n * The fallback covers browsers that lack it. Relative colour syntax exposes\n * the accent's own lightness as `l`; `clamp()` turns that into a hard switch,\n * because the multiplication drives the middle term far past either bound\n * everywhere except within a hair of the threshold. Below it the accent is\n * dark and the result is 1 (white); above it, 0 (black). Chroma is dropped to\n * zero, so what comes out is neutral rather than a tinted grey.\n *\n * The threshold is 0.58, and it is deliberately far below the midpoint an eye\n * would guess. Contrast is not symmetric about it: a mid-lightness colour is\n * still much closer to white than to black in luminance, so black wins well\n * before the colour looks light. Checked against all fourteen accents of the\n * line - every one of them reads better with dark glyphs, the closest being\n * cobalt at 4.86:1 against 4.32:1 for white. A higher threshold is what puts\n * white text on magenta at 3.6:1, which is the defect this rule exists to\n * prevent.\n */\n:root {\n --on-accent: oklch(from var(--accent) clamp(0, (0.58 - l) * 1000, 1) 0 0);\n\n /*\n * The same question for the status fills, and it has to be asked separately:\n * `--on-accent` is derived from the accent, so using it on a `--warn` fill\n * is only ever right by coincidence. The line's first consumer did exactly\n * that - a count on a yellow badge, drawn in white at 1.95:1 - and it read\n * as correct for as long as the product happened to pin white.\n *\n * The status hues do not follow the product accent, so these four are the\n * same for every product; they are still derived rather than written down,\n * because the status colours themselves change between the themes.\n */\n --on-good: oklch(from var(--good) clamp(0, (0.58 - l) * 1000, 1) 0 0);\n --on-warn: oklch(from var(--warn) clamp(0, (0.58 - l) * 1000, 1) 0 0);\n --on-bad: oklch(from var(--bad) clamp(0, (0.58 - l) * 1000, 1) 0 0);\n --on-info: oklch(from var(--info) clamp(0, (0.58 - l) * 1000, 1) 0 0);\n}\n\n@supports (color: contrast-color(red)) {\n :root {\n --on-accent: contrast-color(var(--accent));\n --on-good: contrast-color(var(--good));\n --on-warn: contrast-color(var(--warn));\n --on-bad: contrast-color(var(--bad));\n --on-info: contrast-color(var(--info));\n }\n}\n\n/*\n * The Tailwind 4 surface. `--color-*: initial` drops the stock palette on\n * purpose: a raw `bg-zinc-800` in a product should not compile, because the\n * only colours that exist here are the line's own.\n */\n@theme inline {\n --color-*: initial;\n --color-bg: var(--bg);\n --color-raise: var(--raise);\n --color-soft: var(--soft);\n --color-softer: var(--softer);\n --color-line: var(--line);\n --color-line-2: var(--line-2);\n --color-text: var(--text);\n --color-dim: var(--dim);\n --color-faint: var(--faint);\n --color-accent: var(--accent);\n --color-accent-2: var(--accent-2);\n --color-accent-soft: var(--accent-soft);\n --color-on-accent: var(--on-accent);\n --color-on-good: var(--on-good);\n --color-on-warn: var(--on-warn);\n --color-on-bad: var(--on-bad);\n --color-on-info: var(--on-info);\n --color-good: var(--good);\n --color-good-soft: var(--good-soft);\n --color-warn: var(--warn);\n --color-warn-soft: var(--warn-soft);\n --color-bad: var(--bad);\n --color-bad-soft: var(--bad-soft);\n --color-info: var(--info);\n --color-info-soft: var(--info-soft);\n\n /* Charts. `bg-series-3`, `fill-series-3`, `stroke-scale-500` - the same\n * utilities the rest of the vocabulary gets, so a chart is written in\n * tokens like everything else and `dowel/no-raw-color` can hold it to\n * that. */\n --color-series-1: var(--series-1);\n --color-series-2: var(--series-2);\n --color-series-3: var(--series-3);\n --color-series-4: var(--series-4);\n --color-series-5: var(--series-5);\n --color-series-6: var(--series-6);\n --color-series-7: var(--series-7);\n --color-series-8: var(--series-8);\n --color-scale-100: var(--scale-100);\n --color-scale-200: var(--scale-200);\n --color-scale-300: var(--scale-300);\n --color-scale-400: var(--scale-400);\n --color-scale-500: var(--scale-500);\n --color-scale-600: var(--scale-600);\n --color-scale-700: var(--scale-700);\n --color-chart-grid: var(--chart-grid);\n --color-chart-axis: var(--chart-axis);\n --color-heat-1: var(--heat-1);\n --color-heat-2: var(--heat-2);\n --color-heat-3: var(--heat-3);\n --color-heat-4: var(--heat-4);\n --color-heat-5: var(--heat-5);\n\n /* Kept because they are not palette choices: a hairline is `transparent`,\n * an SVG follows `currentColor`, and pure black and white are what an\n * overlay scrim and a print sheet are made of. */\n --color-transparent: transparent;\n --color-current: currentColor;\n --color-white: #fff;\n --color-black: #000;\n\n /*\n * Type. System stacks on purpose: a downloaded face costs a network round\n * trip before the first word appears, and the line's products are desktop\n * tools where the operating system's own face is the one the user already\n * reads everything else in.\n */\n --font-sans: 'Segoe UI Variable Text', 'Segoe UI', system-ui, -apple-system, sans-serif;\n --font-mono: ui-monospace, 'Cascadia Code', 'SF Mono', Consolas, monospace;\n\n /*\n * Radius. Taken from what the products actually draw, not from a ratio:\n * `rounded-[9px]` appears twenty times and `rounded-[10px]` twelve, because\n * a control and the primary button were tuned by eye and then copied. The\n * scale keeps the cluster they landed in and gives it names.\n *\n * `md` is the control radius - inputs, buttons, list rows. That the primary\n * button was one pixel rounder than every other variant is not preserved:\n * the products differ from themselves there, and buttons of the same size\n * sitting side by side should not have mismatched corners.\n */\n --radius-xs: 4px;\n --radius-sm: 6px;\n --radius-md: 9px;\n --radius-lg: 12px;\n --radius-xl: 16px;\n --radius-2xl: 20px;\n\n /*\n * A radius nested inside another has to be smaller by the gap between them,\n * or the inner corner looks wrong against the outer one. The products did\n * this by hand once - 18px outside, 17px inside - and nowhere else.\n */\n --radius-inner: calc(var(--radius-lg) - 1px);\n\n /*\n * Type scale. The products live between 10px and 14px: `text-sm` and\n * `text-xs` together account for nine tenths of every size in both, and the\n * rest scattered across 9, 9.5, 10, 10.5, 11, 11.5, 12.5 and 13 - nine steps\n * inside four pixels, which no eye distinguishes and no reason justifies.\n * This is the same range with the noise removed.\n */\n --text-2xs: 10px;\n --text-2xs--line-height: 14px;\n --text-xs: 11px;\n --text-xs--line-height: 15px;\n --text-sm: 12px;\n --text-sm--line-height: 16px;\n --text-base: 14px;\n --text-base--line-height: 20px;\n --text-lg: 16px;\n --text-lg--line-height: 22px;\n --text-xl: 18px;\n --text-xl--line-height: 24px;\n --text-2xl: 21px;\n --text-2xl--line-height: 28px;\n\n /* Weights. `semibold` is what both products use for anything emphasised;\n * `bold` appears in neither, and the one `font-[650]` in a page title is the\n * kind of value a scale exists to absorb. */\n --font-weight-normal: 400;\n --font-weight-medium: 500;\n --font-weight-semibold: 600;\n\n /* Tracking. The uppercase caption is the only place the products track at\n * all - and they do it at 0.08em in six files and 0.09em in three, a\n * difference nobody can see. One name settles it. */\n --tracking-caption: 0.085em;\n --tracking-tight: -0.01em;\n\n /* Easing. `out` for anything the user asked for - it arrives fast and\n * settles, which reads as responsive. `in-out` for something moving on its\n * own. `in` is deliberately absent: it starts slowly, which on a control\n * reads as lag. */\n --ease-out: cubic-bezier(0.2, 0, 0, 1);\n --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);\n\n /*\n * Elevation. Three steps, because the products had one and used it for a\n * toast, a dropdown and a modal alike - so a modal never sat further from\n * the page than the menu it covered.\n */\n --shadow-lift: var(--shadow-lift);\n --shadow-raise: var(--shadow-raise);\n --shadow-float: var(--shadow-float);\n}\n\n/*\n * Stacking order.\n *\n * Not in `@theme`: Tailwind has no z-index namespace, so `z-50` is a literal\n * fifty and a named step would not compile. These are custom properties a\n * component reads directly - `z-index: var(--z-modal)`.\n *\n * The order is the products' own, with the gaps closed. They ran 10 for an\n * in-flow popup, 20 sticky, 30 menu, 40 for a floating button, 50 for modals\n * and drawers, then jumped to 70 and 80 for the command palette - which had to\n * clear the modal layer and had no name to do it with.\n */\n:root {\n /*\n * Motion. One duration existed before this - 160ms on a route change - and\n * everything else rode Tailwind's default. These are the steps around it:\n * `quick` for a colour or an opacity that should feel immediate, `base` for\n * something that moves, `slow` for something arriving from off-screen.\n *\n * Not in `@theme`: Tailwind's `duration-*` utility takes a literal number,\n * not a named step, so these are read directly - `transition-duration:\n * var(--duration-base)`. The easing curves opposite them ARE a namespace,\n * so `ease-out` is a class.\n *\n * Every duration here is for people who want motion: `prefers-reduced-\n * motion` cuts them to nothing further down.\n */\n --duration-quick: 120ms;\n --duration-base: 160ms;\n --duration-slow: 240ms;\n\n --z-popup: 10;\n --z-sticky: 20;\n --z-menu: 30;\n --z-floating: 40;\n --z-overlay: 50;\n --z-modal: 60;\n --z-palette: 70;\n --z-toast: 80;\n}\n\n/*\n * Base layer: what every product would otherwise write again. Scoped to\n * elements and to `:focus-visible`, never to a class, so nothing here can\n * collide with a component.\n */\nbody {\n margin: 0;\n background-color: var(--bg);\n color: var(--text);\n font-family: var(--font-sans);\n -webkit-font-smoothing: antialiased;\n}\n\n/*\n * In `@layer base`, so a component can turn it off.\n *\n * Unlayered, this rule has the same specificity as `focus-visible:outline-none`\n * from Tailwind - both are one pseudo-class - and wins on source order alone,\n * because the theme is imported before the utilities. Every component that\n * draws its own focus ring got this one on top of it: the command palette's\n * field had an accent outline it had explicitly opted out of, and a combobox\n * with chips drew two rings, one around the box and one around the input\n * inside it.\n *\n * A layered rule loses to any unlayered one regardless of specificity, which\n * is the whole point of cascade layers - the base layer states a default and\n * a component overrides it by saying so.\n */\n@layer base {\n :focus-visible {\n outline: 2px solid var(--accent);\n outline-offset: 2px;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n *,\n *::before,\n *::after {\n transition-duration: 0.01ms !important;\n animation-duration: 0.01ms !important;\n animation-iteration-count: 1 !important;\n scroll-behavior: auto !important;\n }\n}\n\n/*\n * Scrollbars. A browser's default bar is a piece of someone else's chrome\n * sitting in the middle of the product - full width, with step arrows. These\n * are the line's own: thin, in the palette, drawn only where something\n * actually scrolls.\n */\n* {\n scrollbar-width: thin;\n scrollbar-color: var(--line-2) transparent;\n}\n\n*::-webkit-scrollbar {\n width: 10px;\n height: 10px;\n}\n\n*::-webkit-scrollbar-track {\n background: transparent;\n}\n\n*::-webkit-scrollbar-thumb {\n border: 3px solid transparent;\n border-radius: 999px;\n background: var(--line-2);\n background-clip: content-box;\n /* The thumb is drawn proportional to how much of the document fits on\n * screen, so a long one collapses it to a few pixels: still visible, no\n * longer catchable by a pointer. This is the floor below which it stops\n * being a control. */\n min-height: 2.5rem;\n}\n\n*::-webkit-scrollbar-thumb:hover {\n background: var(--dim);\n background-clip: content-box;\n}\n\n*::-webkit-scrollbar-corner {\n background: transparent;\n}\n\n*::-webkit-scrollbar-button {\n display: none;\n}\n"
17
+ "content": "/*\n * dowel theme - the token vocabulary every product of the lacodda line shares.\n *\n * The vocabulary comes from the products themselves: kilna and kasl-server\n * already ship the same token names (bg / raise / soft / line / text / dim /\n * accent / good / warn / bad / info) and differ only in values. That is the\n * contract this file freezes. Names are the mockup's own words rather than\n * stock component-library names, so a screen can be checked against a mockup\n * in the mockup's words.\n *\n * Two things are parametric, and everything else is derived from them:\n *\n * --accent-base the product's hue from the brand-line registry\n * --neutral-base the hue the greys are tinted with (the accent, by default)\n *\n * Tinting the neutrals is not decoration - it is what the two live products do\n * by hand: kilna's greys lean magenta, kasl-server's lean gold. Here that lean\n * is one declaration instead of thirty hand-picked hex values.\n *\n * Soft variants are mixed from their own base with `color-mix`, so a product\n * that overrides `--accent-base` gets a matching `--accent-soft` for free and\n * cannot pick one that disagrees with it.\n *\n * Theme selection: no class on the root element follows the operating system,\n * an explicit `light` or `dark` class pins the theme. Components never use\n * `dark:` utilities - every colour goes through a token, and the theme swaps\n * the token underneath.\n */\n\n:root {\n /* The two parameters. `--accent-base` is overridden per product by an accent\n * file; `--neutral-base` follows it unless a product says otherwise. */\n --accent-base: #e8862d;\n --neutral-base: var(--accent-base);\n\n /* Ink and ground of the dark theme, before the neutral tint is mixed in.\n * Kept as their own tokens so the tint amount is the only thing that\n * changes when a product wants greyer or warmer chrome. */\n --ground: #131316;\n --ink: #ece9ef;\n\n /* How much of `--neutral-base` bleeds into the greys. The live products sit\n * at roughly this much: enough that the chrome belongs to the product,\n * little enough that it still reads as grey. */\n --neutral-tint: 6%;\n --neutral-tint-strong: 9%;\n\n color-scheme: dark;\n\n --bg: color-mix(in oklab, var(--neutral-base) var(--neutral-tint), var(--ground));\n --raise: color-mix(in oklab, var(--neutral-base) var(--neutral-tint), #1c1c21);\n\n /* Surfaces that lift by translucency rather than by their own colour: they\n * must work over `--bg` and over `--raise` alike. */\n --soft: rgb(255 255 255 / 0.045);\n --softer: rgb(255 255 255 / 0.025);\n --line: rgb(255 255 255 / 0.08);\n --line-2: rgb(255 255 255 / 0.15);\n\n --text: color-mix(in oklab, var(--neutral-base) var(--neutral-tint), var(--ink));\n --dim: color-mix(in oklab, var(--neutral-base) var(--neutral-tint-strong), #a7a2ad);\n --faint: color-mix(in oklab, var(--neutral-base) var(--neutral-tint-strong), #6e6a76);\n\n --accent: var(--accent-base);\n /* The hover/active partner: lighter on dark, where the ground is what the\n * accent has to separate from. */\n --accent-2: color-mix(in oklab, white 22%, var(--accent-base));\n --accent-soft: color-mix(in oklab, var(--accent-base) 16%, transparent);\n\n /* Status hues are the line's own and do not follow the product accent: a\n * green that shifted per product would stop meaning \"good\". Meaning never\n * rests on colour alone - a badge carries an icon and a word - so these\n * exist for emphasis, not as the message. */\n --good: #45d18f;\n --warn: #e8b13f;\n --bad: #ef6a6a;\n --info: #4cc4e0;\n --good-soft: color-mix(in oklab, var(--good) 14%, transparent);\n --warn-soft: color-mix(in oklab, var(--warn) 14%, transparent);\n --bad-soft: color-mix(in oklab, var(--bad) 14%, transparent);\n --info-soft: color-mix(in oklab, var(--info) 15%, transparent);\n\n /* Series colours, for charts.\n *\n * Like the status hues and unlike everything else here, these do NOT follow\n * the product accent - and that is the whole decision. A series is a\n * property of the data, not of the product showing it; a palette derived\n * from the accent would paint the same series differently in kilna and in\n * kasl-server, which is the one thing a series colour must never do.\n *\n * Deriving them from the accent was measured, not guessed: rotating the hue\n * by fixed angles put the best candidate at Delta-E 12.1 from the product's\n * own accent with adjacent pairs at 9.8, and threw 46 of 152 colours outside\n * sRGB. The fixed palette does better on both counts.\n *\n * The cost of fixing them is stated plainly: 13 of the line's 19 accents sit\n * within Delta-E 8 of some slot (lyrid 2.7, atlas 3.1, turnout 3.2). A chart\n * shows one accent, so this is survivable - but it is exactly why identity is\n * carried by the legend and by direct labels, never by hue on its own. The\n * components of this block enforce that; it is not advice.\n *\n * Assigned in order, 1..8, and never cycled: a ninth series folds into\n * \"other\", or the chart becomes small multiples. The order is the\n * colour-blind-safety mechanism - the worst adjacent pair is Delta-E 8.4\n * under simulated protanopia - so re-ordering these breaks a gate.\n *\n * Slot 8 is the line's own value rather than the reference palette's. The\n * reference red sat Delta-E 1.9 from `--bad`, which would have let a series\n * impersonate a status; this one clears every status by 15 and costs\n * nothing, the worst adjacent pair being unchanged.\n *\n * Some slots sit below 3:1 against the surface. That is allowed only because\n * the relief ships with them: visible values, or the table view.\n */\n --series-1: #3987e5;\n --series-2: #d95926;\n --series-3: #199e70;\n --series-4: #c98500;\n --series-5: #d55181;\n --series-6: #008300;\n --series-7: #9085e9;\n --series-8: #a3215a;\n\n /* Magnitude rather than identity: one hue, light to dark. A heatmap cell\n * reads this. The lightest step is allowed to recede toward the surface,\n * because \"near zero\" should; an ordered-but-discrete scale (tiers, funnel\n * stages) starts at 300 instead, where the contrast still holds. */\n --scale-100: #0d366b;\n --scale-200: #184f95;\n --scale-300: #256abf;\n --scale-400: #2a78d6;\n --scale-500: #3987e5;\n --scale-600: #5598e7;\n --scale-700: #86b6ef;\n\n /* The chart's own furniture. A gridline that competes with the data is drawn\n * wrong, so it is quieter than `--line`; the axis is the one that may be\n * seen. */\n --chart-grid: rgb(255 255 255 / 0.06);\n --chart-axis: rgb(255 255 255 / 0.14);\n\n /* Heat, for a grid of cells where colour is the only thing carrying the\n * value - a year of activity, a month of a team's hours.\n *\n * Five discrete steps rather than the seven of `--scale-*`, and a separate\n * set rather than a slice of them, because the two answer different\n * questions. `--scale-*` is sequential: a continuous magnitude, where the\n * lightest step means \"near zero\" and may recede toward the surface.\n * Heat is ordinal: five shades a reader tells apart at a glance and matches\n * against a legend, which needs wider gaps between them (no slice of\n * `--scale-*` clears the 0.06 lightness step - they sit 0.047 apart) and a\n * bottom step that stays distinct from an empty cell.\n *\n * That last one is the whole point. A heatmap cell has more meanings than a\n * number: nothing recorded, a day still running, a day outside the data, and\n * a value. If the faintest value looks like the empty cell, the grid says\n * somebody did nothing on a day nobody reported - and `--heat-1` clears the\n * empty square by 2.1:1 so it cannot.\n *\n * Fixed, like the series and unlike almost everything else here. Derived\n * from the accent - as the first consumer did - the faintest step sat 1.3:1\n * from the empty cell for half the line, and pinning lightness instead ran\n * out of sRGB: the darkest accents cannot reach the top of the ramp at their\n * own chroma.\n */\n --heat-1: #28528e;\n --heat-2: #3a65a3;\n --heat-3: #4d78b7;\n --heat-4: #608ccd;\n --heat-5: #73a0e2;\n\n /* Syntax, for code shown inside a product.\n *\n * Eight kinds rather than the fifty a highlighter's theme names, because\n * these are the distinctions that survive across languages: a keyword, a\n * literal string, a number, a comment, an identifier, a type, punctuation,\n * and the metadata around the code (a decorator, an attribute, a prompt).\n * Anything finer is a grammar's own vocabulary and does not travel.\n *\n * Fixed, like the series and the heat ramps, and for the same reason: code\n * is not a property of the product showing it, and `if` should not be\n * magenta in kilna and cobalt in kasl-server.\n *\n * Chosen against the surface code actually sits on - `--soft` over `--bg`,\n * which is what CodeBlock and `.prose pre` draw - and every slot clears\n * 4.5:1 AS TEXT in both themes. That threshold, not the 3:1 the series are\n * held to, is the whole reason these exist separately: the series palette\n * was measured here first and five of its eight light values sat under 3:1,\n * one at 1.90:1. A filled bar can be pale; a 12px glyph cannot.\n *\n * These are deliberately NOT held to the colour-blind floor the series are.\n * A series colour is the identity of its mark - lose the hue and the data is\n * gone. Syntax colour is a second reading of what the text already says in\n * full: a keyword is a keyword by its spelling, and CodeBlock's default\n * renders no colour at all and stays readable. `syntax.test.ts` says so in\n * place, so the omission is not mistaken for an oversight.\n *\n * `comment` is the quietest on purpose - it is the one kind a reader is\n * meant to be able to skip - and still clears the threshold.\n */\n --syntax-keyword: #c792ea;\n --syntax-string: #9ccc65;\n --syntax-number: #f78c6c;\n --syntax-comment: #9e99a6;\n --syntax-name: #82aaff;\n --syntax-type: #4dd0b1;\n --syntax-punctuation: #c4bfcb;\n --syntax-meta: #f0a868;\n\n /* Elevation, three steps. The products had one shadow and used it for\n * everything that leaves the flow - a toast, a dropdown and a modal all\n * floated by the same amount, so a modal never felt further away than the\n * menu it covered. `raise` keeps its original value, so nothing shifts under\n * the products already using it; the other two are the steps either side. */\n --shadow-lift: 0 2px 8px rgb(0 0 0 / 0.3);\n --shadow-raise: 0 10px 34px rgb(0 0 0 / 0.45);\n --shadow-float: 0 24px 60px rgb(0 0 0 / 0.55);\n}\n\n/*\n * Light theme, twice: once for the operating system's preference, once for the\n * explicit `light` class. The declarations are identical - only the selector\n * differs - so that a product can pin a theme against the system setting.\n */\n@media (prefers-color-scheme: light) {\n :root:not(.dark) {\n color-scheme: light;\n\n --ground: #f6f5f7;\n --ink: #232027;\n\n --bg: color-mix(in oklab, var(--neutral-base) var(--neutral-tint), var(--ground));\n --raise: #ffffff;\n\n /* Tinted, and translucent - which took two goes to get right.\n *\n * `color-mix` mixes the alpha along with the colour, so mixing 60% of an\n * opaque accent into a 5%-opaque grey gives a surface 62% opaque: twelve\n * times denser than the hairline it was meant to be. It went unnoticed for\n * ten versions because `bg-soft` was only ever used for a hover, where a\n * flash of colour reads as feedback rather than as a mistake. The first\n * component to sit on it permanently - Alert - made it obvious.\n *\n * `oklch(from … / alpha)` keeps the alpha out of the mix: the hue comes\n * from the tinted colour, the transparency is stated. */\n --soft: oklch(from color-mix(in oklab, var(--neutral-base) 45%, #181420) l c h / 0.05);\n --softer: oklch(from color-mix(in oklab, var(--neutral-base) 45%, #181420) l c h / 0.03);\n --line: oklch(from color-mix(in oklab, var(--neutral-base) 30%, #181420) l c h / 0.11);\n --line-2: oklch(from color-mix(in oklab, var(--neutral-base) 30%, #181420) l c h / 0.2);\n\n --text: color-mix(in oklab, var(--neutral-base) var(--neutral-tint), var(--ink));\n --dim: color-mix(in oklab, var(--neutral-base) var(--neutral-tint-strong), #63606b);\n --faint: color-mix(in oklab, var(--neutral-base) var(--neutral-tint-strong), #8a8692);\n\n /* On a light ground the accent has to darken to stay legible as text and\n * as a fill. It darkens *to* a lightness rather than *by* an amount: how\n * far a hue has to travel depends on where it starts, and a fixed step\n * that suits magenta leaves lime and gold short. Pinning the lightness and\n * keeping the hue and chroma clears 5:1 for every accent in the line. */\n --accent: oklch(from var(--accent-base) 0.5 c h);\n --accent-2: oklch(from var(--accent-base) 0.4 c h);\n --accent-soft: color-mix(in oklab, var(--accent-base) 12%, transparent);\n\n --good: #0c8554;\n --warn: #9a6b0c;\n --bad: #c93b3b;\n --info: #0d7f9c;\n --good-soft: color-mix(in oklab, var(--good) 12%, transparent);\n --warn-soft: color-mix(in oklab, var(--warn) 14%, transparent);\n --bad-soft: color-mix(in oklab, var(--bad) 12%, transparent);\n --info-soft: color-mix(in oklab, var(--info) 11%, transparent);\n\n /* Series and scale, stepped for the light surface - the same eight hues\n * chosen again against this ground, not the dark values lightened. The dark\n * block says why these do not follow the product accent. */\n --series-1: #2a78d6;\n --series-2: #eb6834;\n --series-3: #1baf7a;\n --series-4: #eda100;\n --series-5: #e87ba4;\n --series-6: #008300;\n --series-7: #4a3aa7;\n --series-8: #85284d;\n\n --scale-100: #cde2fb;\n --scale-200: #9ec5f4;\n --scale-300: #6da7ec;\n --scale-400: #3987e5;\n --scale-500: #2a78d6;\n --scale-600: #1c5cab;\n --scale-700: #104281;\n\n --chart-grid: oklch(from color-mix(in oklab, var(--neutral-base) 30%, #181420) l c h / 0.08);\n --chart-axis: oklch(from color-mix(in oklab, var(--neutral-base) 30%, #181420) l c h / 0.18);\n\n /* The same five steps chosen again for the light ground, running the other\n * way: here \"more\" is darker. See the dark block for why heat is its own\n * ramp and not a slice of `--scale-*`. */\n --heat-1: #84a8fd;\n --heat-2: #7193e7;\n --heat-3: #5e7fd1;\n --heat-4: #4c6cbb;\n --heat-5: #3b58a6;\n\n /* The same eight kinds chosen again for the light ground - not the dark\n * values darkened. Each clears 4.5:1 as text against `--soft` over this\n * theme's `--bg`; the dark block says why syntax is its own palette and\n * why it is not held to the colour-blind floor. */\n --syntax-keyword: #7c3aad;\n --syntax-string: #276c2b;\n --syntax-number: #b5451b;\n --syntax-comment: #6f6b78;\n --syntax-name: #1a5fb4;\n --syntax-type: #00695c;\n --syntax-punctuation: #4a4753;\n --syntax-meta: #9c4a00;\n\n --shadow-lift: 0 2px 8px rgb(30 24 38 / 0.08);\n --shadow-raise: 0 10px 30px rgb(30 24 38 / 0.14);\n --shadow-float: 0 24px 60px rgb(30 24 38 / 0.18);\n }\n}\n\n:root.light {\n color-scheme: light;\n\n --ground: #f6f5f7;\n --ink: #232027;\n\n --bg: color-mix(in oklab, var(--neutral-base) var(--neutral-tint), var(--ground));\n --raise: #ffffff;\n\n /* The same surfaces as above; see the note there. */\n --soft: oklch(from color-mix(in oklab, var(--neutral-base) 45%, #181420) l c h / 0.05);\n --softer: oklch(from color-mix(in oklab, var(--neutral-base) 45%, #181420) l c h / 0.03);\n --line: oklch(from color-mix(in oklab, var(--neutral-base) 30%, #181420) l c h / 0.11);\n --line-2: oklch(from color-mix(in oklab, var(--neutral-base) 30%, #181420) l c h / 0.2);\n\n --text: color-mix(in oklab, var(--neutral-base) var(--neutral-tint), var(--ink));\n --dim: color-mix(in oklab, var(--neutral-base) var(--neutral-tint-strong), #63606b);\n --faint: color-mix(in oklab, var(--neutral-base) var(--neutral-tint-strong), #8a8692);\n\n /* Darkened to a lightness, not by an amount - see the note above. */\n --accent: oklch(from var(--accent-base) 0.5 c h);\n --accent-2: oklch(from var(--accent-base) 0.4 c h);\n --accent-soft: color-mix(in oklab, var(--accent-base) 12%, transparent);\n\n --good: #0c8554;\n --warn: #9a6b0c;\n --bad: #c93b3b;\n --info: #0d7f9c;\n --good-soft: color-mix(in oklab, var(--good) 12%, transparent);\n --warn-soft: color-mix(in oklab, var(--warn) 14%, transparent);\n --bad-soft: color-mix(in oklab, var(--bad) 12%, transparent);\n --info-soft: color-mix(in oklab, var(--info) 11%, transparent);\n\n /* Series and scale, stepped for the light surface - the same eight hues\n * chosen again against this ground, not the dark values lightened. The dark\n * block says why these do not follow the product accent. */\n --series-1: #2a78d6;\n --series-2: #eb6834;\n --series-3: #1baf7a;\n --series-4: #eda100;\n --series-5: #e87ba4;\n --series-6: #008300;\n --series-7: #4a3aa7;\n --series-8: #85284d;\n\n --scale-100: #cde2fb;\n --scale-200: #9ec5f4;\n --scale-300: #6da7ec;\n --scale-400: #3987e5;\n --scale-500: #2a78d6;\n --scale-600: #1c5cab;\n --scale-700: #104281;\n\n --chart-grid: oklch(from color-mix(in oklab, var(--neutral-base) 30%, #181420) l c h / 0.08);\n --chart-axis: oklch(from color-mix(in oklab, var(--neutral-base) 30%, #181420) l c h / 0.18);\n\n /* The same five steps chosen again for the light ground, running the other\n * way: here \"more\" is darker. See the dark block for why heat is its own\n * ramp and not a slice of `--scale-*`. */\n --heat-1: #84a8fd;\n --heat-2: #7193e7;\n --heat-3: #5e7fd1;\n --heat-4: #4c6cbb;\n --heat-5: #3b58a6;\n\n /* The same eight kinds chosen again for the light ground - not the dark\n * values darkened. Each clears 4.5:1 as text against `--soft` over this\n * theme's `--bg`; the dark block says why syntax is its own palette and\n * why it is not held to the colour-blind floor. */\n --syntax-keyword: #7c3aad;\n --syntax-string: #276c2b;\n --syntax-number: #b5451b;\n --syntax-comment: #6f6b78;\n --syntax-name: #1a5fb4;\n --syntax-type: #00695c;\n --syntax-punctuation: #4a4753;\n --syntax-meta: #9c4a00;\n\n --shadow-lift: 0 2px 8px rgb(30 24 38 / 0.08);\n --shadow-raise: 0 10px 30px rgb(30 24 38 / 0.14);\n --shadow-float: 0 24px 60px rgb(30 24 38 / 0.18);\n}\n\n/*\n * `--on-accent` - what sits on top of an accent fill.\n *\n * A light accent (gold, lime, amber) needs dark glyphs; a dark one needs\n * white. The live products picked this by hand and wrote the answer into the\n * theme; here the theme works it out, by the same rule the brand-line S tile\n * uses.\n *\n * `contrast-color()` is the direct way to say it and is used where supported.\n * The fallback covers browsers that lack it. Relative colour syntax exposes\n * the accent's own lightness as `l`; `clamp()` turns that into a hard switch,\n * because the multiplication drives the middle term far past either bound\n * everywhere except within a hair of the threshold. Below it the accent is\n * dark and the result is 1 (white); above it, 0 (black). Chroma is dropped to\n * zero, so what comes out is neutral rather than a tinted grey.\n *\n * The threshold is 0.58, and it is deliberately far below the midpoint an eye\n * would guess. Contrast is not symmetric about it: a mid-lightness colour is\n * still much closer to white than to black in luminance, so black wins well\n * before the colour looks light. Checked against all fourteen accents of the\n * line - every one of them reads better with dark glyphs, the closest being\n * cobalt at 4.86:1 against 4.32:1 for white. A higher threshold is what puts\n * white text on magenta at 3.6:1, which is the defect this rule exists to\n * prevent.\n */\n:root {\n --on-accent: oklch(from var(--accent) clamp(0, (0.58 - l) * 1000, 1) 0 0);\n\n /*\n * The same question for the status fills, and it has to be asked separately:\n * `--on-accent` is derived from the accent, so using it on a `--warn` fill\n * is only ever right by coincidence. The line's first consumer did exactly\n * that - a count on a yellow badge, drawn in white at 1.95:1 - and it read\n * as correct for as long as the product happened to pin white.\n *\n * The status hues do not follow the product accent, so these four are the\n * same for every product; they are still derived rather than written down,\n * because the status colours themselves change between the themes.\n */\n --on-good: oklch(from var(--good) clamp(0, (0.58 - l) * 1000, 1) 0 0);\n --on-warn: oklch(from var(--warn) clamp(0, (0.58 - l) * 1000, 1) 0 0);\n --on-bad: oklch(from var(--bad) clamp(0, (0.58 - l) * 1000, 1) 0 0);\n --on-info: oklch(from var(--info) clamp(0, (0.58 - l) * 1000, 1) 0 0);\n}\n\n@supports (color: contrast-color(red)) {\n :root {\n --on-accent: contrast-color(var(--accent));\n --on-good: contrast-color(var(--good));\n --on-warn: contrast-color(var(--warn));\n --on-bad: contrast-color(var(--bad));\n --on-info: contrast-color(var(--info));\n }\n}\n\n/*\n * The Tailwind 4 surface. `--color-*: initial` drops the stock palette on\n * purpose: a raw `bg-zinc-800` in a product should not compile, because the\n * only colours that exist here are the line's own.\n */\n@theme inline {\n --color-*: initial;\n --color-bg: var(--bg);\n --color-raise: var(--raise);\n --color-soft: var(--soft);\n --color-softer: var(--softer);\n --color-line: var(--line);\n --color-line-2: var(--line-2);\n --color-text: var(--text);\n --color-dim: var(--dim);\n --color-faint: var(--faint);\n --color-accent: var(--accent);\n --color-accent-2: var(--accent-2);\n --color-accent-soft: var(--accent-soft);\n --color-on-accent: var(--on-accent);\n --color-on-good: var(--on-good);\n --color-on-warn: var(--on-warn);\n --color-on-bad: var(--on-bad);\n --color-on-info: var(--on-info);\n --color-good: var(--good);\n --color-good-soft: var(--good-soft);\n --color-warn: var(--warn);\n --color-warn-soft: var(--warn-soft);\n --color-bad: var(--bad);\n --color-bad-soft: var(--bad-soft);\n --color-info: var(--info);\n --color-info-soft: var(--info-soft);\n\n /* Charts. `bg-series-3`, `fill-series-3`, `stroke-scale-500` - the same\n * utilities the rest of the vocabulary gets, so a chart is written in\n * tokens like everything else and `dowel/no-raw-color` can hold it to\n * that. */\n --color-series-1: var(--series-1);\n --color-series-2: var(--series-2);\n --color-series-3: var(--series-3);\n --color-series-4: var(--series-4);\n --color-series-5: var(--series-5);\n --color-series-6: var(--series-6);\n --color-series-7: var(--series-7);\n --color-series-8: var(--series-8);\n --color-scale-100: var(--scale-100);\n --color-scale-200: var(--scale-200);\n --color-scale-300: var(--scale-300);\n --color-scale-400: var(--scale-400);\n --color-scale-500: var(--scale-500);\n --color-scale-600: var(--scale-600);\n --color-scale-700: var(--scale-700);\n --color-chart-grid: var(--chart-grid);\n --color-chart-axis: var(--chart-axis);\n --color-heat-1: var(--heat-1);\n --color-heat-2: var(--heat-2);\n --color-heat-3: var(--heat-3);\n --color-heat-4: var(--heat-4);\n --color-heat-5: var(--heat-5);\n\n /* Syntax, so a highlighted token is written `text-syntax-keyword` like every\n * other colour in the system, and `dowel/no-raw-color` can hold it to that.\n * A highlighter's own stylesheet - which writes hex values into class names\n * of its own choosing - is what this replaces. */\n --color-syntax-keyword: var(--syntax-keyword);\n --color-syntax-string: var(--syntax-string);\n --color-syntax-number: var(--syntax-number);\n --color-syntax-comment: var(--syntax-comment);\n --color-syntax-name: var(--syntax-name);\n --color-syntax-type: var(--syntax-type);\n --color-syntax-punctuation: var(--syntax-punctuation);\n --color-syntax-meta: var(--syntax-meta);\n\n /* Kept because they are not palette choices: a hairline is `transparent`,\n * an SVG follows `currentColor`, and pure black and white are what an\n * overlay scrim and a print sheet are made of. */\n --color-transparent: transparent;\n --color-current: currentColor;\n --color-white: #fff;\n --color-black: #000;\n\n /*\n * Type. System stacks on purpose: a downloaded face costs a network round\n * trip before the first word appears, and the line's products are desktop\n * tools where the operating system's own face is the one the user already\n * reads everything else in.\n */\n --font-sans: 'Segoe UI Variable Text', 'Segoe UI', system-ui, -apple-system, sans-serif;\n --font-mono: ui-monospace, 'Cascadia Code', 'SF Mono', Consolas, monospace;\n\n /*\n * Radius. Taken from what the products actually draw, not from a ratio:\n * `rounded-[9px]` appears twenty times and `rounded-[10px]` twelve, because\n * a control and the primary button were tuned by eye and then copied. The\n * scale keeps the cluster they landed in and gives it names.\n *\n * `md` is the control radius - inputs, buttons, list rows. That the primary\n * button was one pixel rounder than every other variant is not preserved:\n * the products differ from themselves there, and buttons of the same size\n * sitting side by side should not have mismatched corners.\n */\n --radius-xs: 4px;\n --radius-sm: 6px;\n --radius-md: 9px;\n --radius-lg: 12px;\n --radius-xl: 16px;\n --radius-2xl: 20px;\n\n /*\n * A radius nested inside another has to be smaller by the gap between them,\n * or the inner corner looks wrong against the outer one. The products did\n * this by hand once - 18px outside, 17px inside - and nowhere else.\n */\n --radius-inner: calc(var(--radius-lg) - 1px);\n\n /*\n * Type scale. The products live between 10px and 14px: `text-sm` and\n * `text-xs` together account for nine tenths of every size in both, and the\n * rest scattered across 9, 9.5, 10, 10.5, 11, 11.5, 12.5 and 13 - nine steps\n * inside four pixels, which no eye distinguishes and no reason justifies.\n * This is the same range with the noise removed.\n */\n --text-2xs: 10px;\n --text-2xs--line-height: 14px;\n --text-xs: 11px;\n --text-xs--line-height: 15px;\n --text-sm: 12px;\n --text-sm--line-height: 16px;\n --text-base: 14px;\n --text-base--line-height: 20px;\n --text-lg: 16px;\n --text-lg--line-height: 22px;\n --text-xl: 18px;\n --text-xl--line-height: 24px;\n --text-2xl: 21px;\n --text-2xl--line-height: 28px;\n\n /* Weights. `semibold` is what both products use for anything emphasised;\n * `bold` appears in neither, and the one `font-[650]` in a page title is the\n * kind of value a scale exists to absorb. */\n --font-weight-normal: 400;\n --font-weight-medium: 500;\n --font-weight-semibold: 600;\n\n /* Tracking. The uppercase caption is the only place the products track at\n * all - and they do it at 0.08em in six files and 0.09em in three, a\n * difference nobody can see. One name settles it. */\n --tracking-caption: 0.085em;\n --tracking-tight: -0.01em;\n\n /* Easing. `out` for anything the user asked for - it arrives fast and\n * settles, which reads as responsive. `in-out` for something moving on its\n * own. `in` is deliberately absent: it starts slowly, which on a control\n * reads as lag. */\n --ease-out: cubic-bezier(0.2, 0, 0, 1);\n --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);\n\n /*\n * Elevation. Three steps, because the products had one and used it for a\n * toast, a dropdown and a modal alike - so a modal never sat further from\n * the page than the menu it covered.\n */\n --shadow-lift: var(--shadow-lift);\n --shadow-raise: var(--shadow-raise);\n --shadow-float: var(--shadow-float);\n}\n\n/*\n * Stacking order.\n *\n * Not in `@theme`: Tailwind has no z-index namespace, so `z-50` is a literal\n * fifty and a named step would not compile. These are custom properties a\n * component reads directly - `z-index: var(--z-modal)`.\n *\n * The order is the products' own, with the gaps closed. They ran 10 for an\n * in-flow popup, 20 sticky, 30 menu, 40 for a floating button, 50 for modals\n * and drawers, then jumped to 70 and 80 for the command palette - which had to\n * clear the modal layer and had no name to do it with.\n */\n:root {\n /*\n * Motion. One duration existed before this - 160ms on a route change - and\n * everything else rode Tailwind's default. These are the steps around it:\n * `quick` for a colour or an opacity that should feel immediate, `base` for\n * something that moves, `slow` for something arriving from off-screen.\n *\n * Not in `@theme`: Tailwind's `duration-*` utility takes a literal number,\n * not a named step, so these are read directly - `transition-duration:\n * var(--duration-base)`. The easing curves opposite them ARE a namespace,\n * so `ease-out` is a class.\n *\n * Every duration here is for people who want motion: `prefers-reduced-\n * motion` cuts them to nothing further down.\n */\n --duration-quick: 120ms;\n --duration-base: 160ms;\n --duration-slow: 240ms;\n\n --z-popup: 10;\n --z-sticky: 20;\n --z-menu: 30;\n --z-floating: 40;\n --z-overlay: 50;\n --z-modal: 60;\n --z-palette: 70;\n --z-toast: 80;\n}\n\n/*\n * Base layer: what every product would otherwise write again. Scoped to\n * elements and to `:focus-visible`, never to a class, so nothing here can\n * collide with a component.\n */\nbody {\n margin: 0;\n background-color: var(--bg);\n color: var(--text);\n font-family: var(--font-sans);\n -webkit-font-smoothing: antialiased;\n}\n\n/*\n * In `@layer base`, so a component can turn it off.\n *\n * Unlayered, this rule has the same specificity as `focus-visible:outline-none`\n * from Tailwind - both are one pseudo-class - and wins on source order alone,\n * because the theme is imported before the utilities. Every component that\n * draws its own focus ring got this one on top of it: the command palette's\n * field had an accent outline it had explicitly opted out of, and a combobox\n * with chips drew two rings, one around the box and one around the input\n * inside it.\n *\n * A layered rule loses to any unlayered one regardless of specificity, which\n * is the whole point of cascade layers - the base layer states a default and\n * a component overrides it by saying so.\n */\n@layer base {\n :focus-visible {\n outline: 2px solid var(--accent);\n outline-offset: 2px;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n *,\n *::before,\n *::after {\n transition-duration: 0.01ms !important;\n animation-duration: 0.01ms !important;\n animation-iteration-count: 1 !important;\n scroll-behavior: auto !important;\n }\n}\n\n/*\n * Scrollbars. A browser's default bar is a piece of someone else's chrome\n * sitting in the middle of the product - full width, with step arrows. These\n * are the line's own: thin, in the palette, drawn only where something\n * actually scrolls.\n */\n* {\n scrollbar-width: thin;\n scrollbar-color: var(--line-2) transparent;\n}\n\n*::-webkit-scrollbar {\n width: 10px;\n height: 10px;\n}\n\n*::-webkit-scrollbar-track {\n background: transparent;\n}\n\n*::-webkit-scrollbar-thumb {\n border: 3px solid transparent;\n border-radius: 999px;\n background: var(--line-2);\n background-clip: content-box;\n /* The thumb is drawn proportional to how much of the document fits on\n * screen, so a long one collapses it to a few pixels: still visible, no\n * longer catchable by a pointer. This is the floor below which it stops\n * being a control. */\n min-height: 2.5rem;\n}\n\n*::-webkit-scrollbar-thumb:hover {\n background: var(--dim);\n background-clip: content-box;\n}\n\n*::-webkit-scrollbar-corner {\n background: transparent;\n}\n\n*::-webkit-scrollbar-button {\n display: none;\n}\n"
18
18
  }
19
19
  ],
20
20
  "docs": "Import the theme, then your product accent:\n\n @import './dowel/theme.css';\n @import './dowel/accents/kilna.css';\n\nOutside the line, set the colour directly instead:\n\n :root { --accent-base: #2f7d6b; }"
21
21
  },
22
+ {
23
+ "extends": "none",
24
+ "name": "prose",
25
+ "type": "registry:style",
26
+ "title": "dowel prose",
27
+ "description": "The shape of text a product did not write by hand: rendered markdown, a description from a CMS, a model's reply. One class on the container, and the tags inside it - headings, lists, code, tables, quotes - are drawn in the line's tokens.",
28
+ "files": [
29
+ {
30
+ "path": "dowel/prose.css",
31
+ "target": "~/dowel/prose.css",
32
+ "type": "registry:file",
33
+ "content": "/*\n * dowel prose - the shape of text a product did not write by hand.\n *\n * Every other rule in this system is applied by a component, because a\n * component owns the element it draws. Rendered markdown is the case where\n * that is impossible: the product hands the DOM a string of HTML - from\n * `marked`, from a CMS, from a model's reply - and there is no React element\n * to hang a class on. The tags arrive already made. Only a descendant selector\n * reaches them.\n *\n * kilna proved the shape before this file existed, as thirty `[&_h1]:mt-4`\n * arbitrary variants inside one `className` string. It works and it is a\n * paragraph of unreadable text that no second product can share, which is the\n * whole argument for moving it here.\n *\n * Scoped to `.prose`, so nothing leaks: a stylesheet that styled `h2`\n * globally would reach into every component that happens to render one.\n *\n * WHY NOT A TYPOGRAPHY PLUGIN. `@tailwindcss/typography` answers the same\n * question and brings its own answer to a different one - its own type scale,\n * its own greys, its own idea of measure. Installing it next to this theme\n * means two vocabularies describing the same text, and the one that wins is\n * whichever loaded last. Every value below is a token from `theme.css`; there\n * is not a single colour or size written down here.\n *\n * WHAT THIS IS NOT FOR. Interface text - a label, a row, a button - is styled\n * by the component that draws it. `.prose` is for a reading column: a note, a\n * description, an article, a chat reply. Wrapping a form in it is how a screen\n * ends up with two competing ideas of what `text-sm` means.\n *\n * Import after the theme:\n *\n * @import 'tailwindcss';\n * @import './dowel/theme.css';\n * @import './dowel/prose.css';\n */\n\n.prose {\n /*\n * The reading size is `--text-base`, not the `--text-sm` the interface runs\n * at, and the two are different on purpose. Chrome is scanned - a label is\n * recognised rather than read - and it packs tighter the less of it there\n * is. Prose is read word by word, and 12px of continuous text is where a\n * reader starts leaning in. The products already knew this and did it by\n * hand: kilna's rendered markdown sets `text-sm` (12px) against an interface\n * of 11px, the same one-step lift.\n */\n font-size: var(--text-base);\n\n /*\n * Line height is set here rather than inherited from the size token, which\n * carries 20px for 14px text - right for a label, tight for a paragraph.\n * 1.65 is the ratio the eye returns to the start of the next line with; it\n * is a ratio rather than a length so a product that scales the size up for a\n * reading view keeps the proportion.\n */\n line-height: 1.65;\n color: var(--text);\n\n /*\n * A measure, not a width. Prose is unreadable across a wide window - the eye\n * loses the line it is returning from - and `ch` is the unit that says so in\n * the terms the limit is actually about: characters, at whatever size the\n * text is drawn. 68 is inside the 45-75 the typographic literature agrees\n * on, at the wide end because these are technical texts with code and long\n * identifiers in them.\n *\n * A product that has its own column - a chat bubble, a card - overrides\n * `max-width` and loses nothing else.\n */\n max-width: 68ch;\n\n /*\n * The shell of a desktop app usually turns selection off, so that dragging\n * inside a window moves the window. Text someone came to READ has to hand it\n * back, or the one thing a reader wants to do with a paragraph - take a\n * sentence out of it - is the thing the app forbids.\n */\n user-select: text;\n -webkit-user-select: text;\n}\n\n/*\n * Vertical rhythm.\n *\n * Margins collapse between siblings, so stating both a top and a bottom on\n * every block would double the gap at some joins and not others depending on\n * which value was larger. Instead: one bottom margin on everything, and the\n * top margin belongs to the headings alone, which are the only elements that\n * need more space above them than below - a heading belongs to what follows\n * it, and sitting equidistant between two paragraphs it appears to belong to\n * neither.\n */\n.prose > * {\n margin-block: 0 0.75em;\n}\n\n/* The first and last child never push the container open: a rendered note\n * inside a bordered card would otherwise have a gap at the top that the card's\n * own padding did not put there. */\n.prose > :first-child {\n margin-block-start: 0;\n}\n.prose > :last-child {\n margin-block-end: 0;\n}\n\n/*\n * Headings.\n *\n * The scale is the theme's, stepped down from a document's h1 - and it starts\n * lower than a web page's would, because prose here is almost always a section\n * INSIDE a screen that already has a title. An h1 drawn at 21px next to a page\n * heading of 18px makes the note look like the more important thing on screen.\n *\n * `text-wrap: balance` on headings only: it is expensive on long text and\n * makes a two-line heading break in the middle rather than leaving one word\n * alone on the second line.\n */\n.prose :is(h1, h2, h3, h4, h5, h6) {\n margin-block: 1.6em 0.5em;\n font-weight: var(--font-weight-semibold);\n line-height: 1.3;\n text-wrap: balance;\n /* A heading that ends up at the top of a scrolled container should not be\n * flush against its edge. */\n scroll-margin-block-start: 1rem;\n}\n\n.prose h1 {\n font-size: var(--text-xl);\n letter-spacing: var(--tracking-tight);\n}\n.prose h2 {\n font-size: var(--text-lg);\n letter-spacing: var(--tracking-tight);\n}\n.prose h3 {\n font-size: var(--text-base);\n}\n\n/*\n * h4 and below stop growing and start differentiating by other means: a\n * document nested six levels deep has run out of sizes long before it runs out\n * of levels, and inventing two more steps inside four pixels is the noise the\n * type scale exists to remove. They are the body size, set apart by weight and\n * by colour.\n */\n.prose :is(h4, h5, h6) {\n font-size: var(--text-base);\n color: var(--dim);\n}\n\n/* A heading directly after another has nothing between them to separate. */\n.prose :is(h1, h2, h3, h4, h5, h6) + :is(h1, h2, h3, h4, h5, h6) {\n margin-block-start: 0.8em;\n}\n\n/*\n * Lists.\n *\n * Tailwind's preflight strips the markers, which is right for the interface -\n * a menu is a `ul` and must not have bullets - and wrong here, where a list is\n * a list. They are put back, and `outside` so the marker hangs in the indent\n * and the text of a wrapped item lines up with itself rather than with the\n * bullet.\n */\n.prose :is(ul, ol) {\n padding-inline-start: 1.5em;\n}\n.prose ul {\n list-style: disc;\n}\n.prose ol {\n list-style: decimal;\n}\n/*\n * `--dim`, not `--faint`, and that was measured rather than chosen.\n *\n * A bullet looks like furniture, so the faintest token is the instinct. But\n * the marker is what says \"this is a list\" - drop it and an ordered list loses\n * its numbers, which are content. On the stand it came out at 3.17:1 against\n * the surface, below the 4.5:1 that anything carrying meaning has to clear,\n * and it read as a smudge at the size a bullet actually is. `--dim` puts it at\n * 6.2:1 and still sits back from the text.\n */\n.prose li::marker {\n color: var(--dim);\n}\n.prose li {\n margin-block: 0.25em;\n}\n\n/* A nested list belongs to the item above it, not to the gap after it. */\n.prose li > :is(ul, ol) {\n margin-block: 0.25em;\n}\n\n/* A task list from markdown: the checkbox replaces the marker, so the bullet\n * beside it would be a second one saying the same thing. */\n.prose li:has(> input[type='checkbox']:first-child) {\n list-style: none;\n margin-inline-start: -1.25em;\n}\n.prose li > input[type='checkbox'] {\n margin-inline-end: 0.4em;\n accent-color: var(--accent);\n}\n\n/*\n * Inline code.\n *\n * `0.9em` rather than a token: a monospaced face at the same nominal size as\n * the text around it looks larger, because its lowercase letters are taller\n * relative to the em. The correction is proportional to whatever size the\n * surrounding text happens to be, which a fixed token could not follow.\n */\n.prose code {\n font-family: var(--font-mono);\n font-size: 0.9em;\n background-color: var(--soft);\n border-radius: var(--radius-xs);\n padding: 0.15em 0.35em;\n /* A long identifier in the middle of a sentence must be allowed to break,\n * or it pushes the whole column wider than its measure. */\n overflow-wrap: anywhere;\n}\n\n/*\n * A code block is not a big inline code. The padding, background and radius\n * belong to the `pre`; the `code` inside it gives them all up, or the block\n * gets a second inset panel drawn inside itself - which is exactly what\n * happens when a typography plugin's inline rule is left to apply here.\n *\n * `overflow-x: auto` rather than wrapping: a wrapped line of code is a line\n * that lies about where it ends, and indentation is how code is read.\n */\n.prose pre {\n font-family: var(--font-mono);\n font-size: var(--text-sm);\n line-height: 1.55;\n background-color: var(--soft);\n border: 1px solid var(--line);\n border-radius: var(--radius-md);\n padding: 0.75rem 0.85rem;\n overflow-x: auto;\n /* `tab-size: 2` is the line's own indent; the browser default of 8 turns a\n * tab-indented file into a horizontal scroll for nothing. */\n tab-size: 2;\n}\n\n.prose pre code {\n background-color: transparent;\n border-radius: 0;\n padding: 0;\n font-size: inherit;\n /* Inside a scrolling block, breaking a long line would defeat the scroll. */\n overflow-wrap: normal;\n}\n\n/*\n * Links.\n *\n * `--accent-2` rather than `--accent`: on the dark theme the accent is the\n * product's own colour at full strength, which against body text reads as a\n * button that failed to draw. The partner shade is the one the products use\n * for a link, and it is also the one with room to darken on hover.\n *\n * Underlined, always. Colour alone is not a link - a reader who does not see\n * the hue gets no signal at all - and this is the one place in the system\n * where the rule \"meaning never rests on colour\" has a standard answer.\n */\n.prose a {\n color: var(--accent-2);\n text-decoration: underline;\n /* The underline drops below the descenders instead of striking through\n * them, which is the difference between a link and a crossed-out word. */\n text-underline-offset: 0.2em;\n text-decoration-thickness: from-font;\n overflow-wrap: anywhere;\n}\n\n.prose a:hover {\n color: var(--accent);\n}\n\n/*\n * A quotation.\n *\n * A rule on the left and dimmed text, rather than italics: a blockquote is\n * frequently a paragraph or more, and a long passage in italic is slower to\n * read for everyone and materially harder for some dyslexic readers.\n */\n.prose blockquote {\n border-inline-start: 2px solid var(--line-2);\n padding-inline-start: 0.9em;\n color: var(--dim);\n}\n\n/*\n * A table inside prose.\n *\n * `display: block` with its own scroll, because the one thing a table must not\n * do in a reading column is set the column's width: a note with a six-column\n * table in it would push every paragraph around it out to the table's width.\n * The cost is stated - a block-level table no longer participates in the\n * column's own layout - and it is the right trade for text.\n */\n.prose table {\n display: block;\n max-width: 100%;\n overflow-x: auto;\n border-collapse: collapse;\n font-size: var(--text-sm);\n}\n\n.prose :is(th, td) {\n border: 1px solid var(--line);\n padding: 0.3em 0.55em;\n text-align: start;\n vertical-align: top;\n}\n\n.prose th {\n background-color: var(--soft);\n font-weight: var(--font-weight-semibold);\n}\n\n/*\n * A horizontal rule is a section break, so the space around it is the point;\n * a hairline with a paragraph's gap either side reads as a mistake.\n */\n.prose hr {\n border: 0;\n border-block-start: 1px solid var(--line);\n margin-block: 2em;\n}\n\n.prose :is(strong, b) {\n font-weight: var(--font-weight-semibold);\n color: var(--text);\n}\n\n.prose :is(em, i) {\n font-style: italic;\n}\n\n.prose :is(s, del) {\n color: var(--dim);\n}\n\n.prose mark {\n background-color: var(--accent-soft);\n color: inherit;\n border-radius: var(--radius-xs);\n padding: 0.05em 0.2em;\n}\n\n/*\n * An image in prose is never wider than the column, and keeps its ratio when\n * it is constrained. `display: block` because an inline image sits on the text\n * baseline and leaves a strip of descender space under it that looks like a\n * broken margin.\n */\n.prose img {\n display: block;\n max-width: 100%;\n height: auto;\n border-radius: var(--radius-sm);\n}\n\n/*\n * `kbd` is drawn as a key rather than as code: a reader who sees `Ctrl` in the\n * same grey box as a variable name has to work out which it is. This matches\n * the Kbd primitive, so a key looks the same whether a component drew it or\n * markdown did.\n */\n.prose kbd {\n font-family: var(--font-mono);\n font-size: 0.85em;\n background-color: var(--raise);\n border: 1px solid var(--line-2);\n border-block-end-width: 2px;\n border-radius: var(--radius-xs);\n padding: 0.1em 0.35em;\n color: var(--dim);\n}\n\n/*\n * A definition list, which markdown does not produce but a CMS does.\n */\n.prose dt {\n font-weight: var(--font-weight-semibold);\n margin-block-start: 0.75em;\n}\n.prose dd {\n margin-inline-start: 1.5em;\n color: var(--dim);\n}\n\n/*\n * A footnote reference and the notes at the bottom - what `remark-gfm`\n * produces. Smaller and dimmer, because a footnote that reads at the weight of\n * the text interrupts the sentence carrying it.\n */\n.prose sup a {\n text-decoration: none;\n font-size: 0.8em;\n}\n.prose .footnotes {\n font-size: var(--text-sm);\n color: var(--dim);\n border-block-start: 1px solid var(--line);\n margin-block-start: 2em;\n padding-block-start: 0.75em;\n}\n\n/*\n * Tight: the same prose in a place that has no room for a reading column - a\n * chat bubble, a table cell, a hover card. The rhythm compresses and the\n * measure is given up to the container, because in a bubble the container IS\n * the measure. Nothing else changes: the same tags, the same tokens.\n */\n.prose-tight {\n font-size: var(--text-sm);\n line-height: 1.55;\n max-width: none;\n}\n\n.prose-tight > * {\n margin-block: 0 0.5em;\n}\n\n.prose-tight :is(h1, h2, h3, h4, h5, h6) {\n margin-block: 1em 0.35em;\n}\n\n.prose-tight :is(h1, h2) {\n font-size: var(--text-base);\n}\n\n.prose-tight h3 {\n font-size: var(--text-sm);\n}\n\n.prose-tight hr {\n margin-block: 1.2em;\n}\n"
34
+ }
35
+ ],
36
+ "docs": "Import it after the theme, then put the class on whatever holds the HTML:\n\n @import './dowel/theme.css';\n @import './dowel/prose.css';\n\n <div className=\"prose\" dangerouslySetInnerHTML={{ __html: html }} />\n\n`prose-tight` is the same rules with the rhythm compressed and the measure\ngiven up - for a chat bubble, a table cell, a hover card.\n\nSanitise the HTML before it reaches the DOM. This stylesheet draws markup;\nit does not make it safe."
37
+ },
22
38
  {
23
39
  "name": "accent-kasl",
24
40
  "type": "registry:file",
@@ -293,7 +309,7 @@
293
309
  "dependencies": [
294
310
  "@base-ui/react",
295
311
  "class-variance-authority",
296
- "dowel-ui@^0.24.0"
312
+ "dowel-ui@^0.25.0"
297
313
  ],
298
314
  "registryDependencies": [],
299
315
  "files": [
@@ -312,7 +328,7 @@
312
328
  "description": "The shape everyone recognises: weeks as columns, weekdays as rows, time running left to right, and a value carried by how dark a square is. Two products of the line asked for it by name before it existed.",
313
329
  "dependencies": [
314
330
  "class-variance-authority",
315
- "dowel-ui@^0.24.0"
331
+ "dowel-ui@^0.25.0"
316
332
  ],
317
333
  "registryDependencies": [
318
334
  "https://lacodda.github.io/dowel/r/activity-weeks.json"
@@ -332,7 +348,7 @@
332
348
  "title": "Activity-legend",
333
349
  "description": "Separate from the grid because a caller showing three grids on one screen wants one legend, and because the words in it are the product's.",
334
350
  "dependencies": [
335
- "dowel-ui@^0.24.0"
351
+ "dowel-ui@^0.25.0"
336
352
  ],
337
353
  "registryDependencies": [
338
354
  "https://lacodda.github.io/dowel/r/activity-heatmap.json",
@@ -370,7 +386,7 @@
370
386
  "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.",
371
387
  "dependencies": [
372
388
  "class-variance-authority",
373
- "dowel-ui@^0.24.0"
389
+ "dowel-ui@^0.25.0"
374
390
  ],
375
391
  "registryDependencies": [],
376
392
  "files": [
@@ -389,7 +405,7 @@
389
405
  "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.",
390
406
  "dependencies": [
391
407
  "class-variance-authority",
392
- "dowel-ui@^0.24.0"
408
+ "dowel-ui@^0.25.0"
393
409
  ],
394
410
  "registryDependencies": [],
395
411
  "files": [
@@ -408,7 +424,7 @@
408
424
  "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.",
409
425
  "dependencies": [
410
426
  "class-variance-authority",
411
- "dowel-ui@^0.24.0"
427
+ "dowel-ui@^0.25.0"
412
428
  ],
413
429
  "registryDependencies": [],
414
430
  "files": [
@@ -427,7 +443,7 @@
427
443
  "description": "Bars rather than a line, and the distinction is the data's not the drawing's: a line says the value exists between the points, a column says each period is its own sum. Hours worked in a week is a sum - there is no \"Wednesday afternoon\" reading between two weeks - so it is a column.",
428
444
  "dependencies": [
429
445
  "class-variance-authority",
430
- "dowel-ui@^0.24.0"
446
+ "dowel-ui@^0.25.0"
431
447
  ],
432
448
  "registryDependencies": [],
433
449
  "files": [
@@ -447,7 +463,7 @@
447
463
  "dependencies": [
448
464
  "@base-ui/react",
449
465
  "class-variance-authority",
450
- "dowel-ui@^0.24.0"
466
+ "dowel-ui@^0.25.0"
451
467
  ],
452
468
  "registryDependencies": [],
453
469
  "files": [
@@ -481,7 +497,7 @@
481
497
  "title": "Calendar",
482
498
  "description": "The sums live next door in `calendar-math`, which has no React in it; this is the grid that draws them and the keyboard that moves around it.",
483
499
  "dependencies": [
484
- "dowel-ui@^0.24.0"
500
+ "dowel-ui@^0.25.0"
485
501
  ],
486
502
  "registryDependencies": [
487
503
  "https://lacodda.github.io/dowel/r/calendar-math.json"
@@ -502,7 +518,7 @@
502
518
  "description": "The interesting part is the words. A checkbox on its own is a nine-pixel target that says nothing; wired to a label it is the whole row, and the row is what a finger and a pointer both aim at. So the label is part of the component rather than something a caller remembers to add - the commonest bug in a hand-rolled checkbox is a `<label>` that is next to the input instead of tied to it, which looks identical and does nothing.",
503
519
  "dependencies": [
504
520
  "@base-ui/react",
505
- "dowel-ui@^0.24.0"
521
+ "dowel-ui@^0.25.0"
506
522
  ],
507
523
  "registryDependencies": [],
508
524
  "files": [
@@ -521,7 +537,7 @@
521
537
  "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.",
522
538
  "dependencies": [
523
539
  "class-variance-authority",
524
- "dowel-ui@^0.24.0"
540
+ "dowel-ui@^0.25.0"
525
541
  ],
526
542
  "registryDependencies": [],
527
543
  "files": [
@@ -533,13 +549,34 @@
533
549
  }
534
550
  ]
535
551
  },
552
+ {
553
+ "name": "code-block",
554
+ "type": "registry:ui",
555
+ "title": "Code-block",
556
+ "description": "The frame around a piece of code is the same everywhere and is written again in every product: the scroll that must not wrap, the gutter of line numbers that must not be selectable, the copy button, the caption saying which file this is, and the marking of the lines the reader was sent here to look at.",
557
+ "dependencies": [
558
+ "class-variance-authority",
559
+ "dowel-ui@^0.25.0"
560
+ ],
561
+ "registryDependencies": [
562
+ "https://lacodda.github.io/dowel/r/copy-button.json"
563
+ ],
564
+ "files": [
565
+ {
566
+ "path": "ui/code-block.tsx",
567
+ "target": "@ui/code-block.tsx",
568
+ "type": "registry:ui",
569
+ "content": "import type { HTMLAttributes } from 'react'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { cn } from 'dowel-ui'\nimport { CopyButton } from './copy-button'\n\n/*\n * Code, shown inside a product.\n *\n * The frame around a piece of code is the same everywhere and is written again\n * in every product: the scroll that must not wrap, the gutter of line numbers\n * that must not be selectable, the copy button, the caption saying which file\n * this is, and the marking of the lines the reader was sent here to look at.\n * All of that is here.\n *\n * WHAT IS DELIBERATELY NOT HERE IS THE HIGHLIGHTER. A registry component is\n * copied into a product and becomes its file, so whatever this imports becomes\n * that product's dependency for good. Shiki is over a megabyte of grammars\n * before a language is chosen and resolves asynchronously, which would give\n * this component a loading state for text already in memory; Prism is\n * synchronous and mutates globals. Either one decides, on the product's\n * behalf, which languages it ships - which is not a primitive's decision to\n * make.\n *\n * So the split is: this draws, the product colours. `tokens` takes lines of\n * `{ text, kind }` from any highlighter - a mapping is about twenty lines -\n * and the eight kinds are the ones that mean the same thing in every language.\n * Without `tokens` the block renders the plain string and is completely\n * usable, which is the honest default: most code in an interface is four lines\n * of a command, where colour adds nothing.\n *\n * The colours are `--syntax-*`, fixed like the series palette: `if` should not\n * be magenta in one product and cobalt in another. They are measured as TEXT,\n * against the hardest surface a block sits on rather than the typical one -\n * every one clears 4.5:1 in both themes. That is why they are not the series\n * palette, whose light values sink to 1.90:1 at this size.\n */\n\nexport const codeBlockVariants = cva(\n // `group` so the copy button reveals on hover of the whole block rather than\n // only once the pointer has found a button it cannot see; `relative` because\n // a block with no caption has nowhere to put that button but over the code.\n 'group relative overflow-hidden rounded-md border border-line bg-soft font-mono',\n {\n variants: {\n size: {\n sm: 'text-2xs',\n md: 'text-sm',\n },\n },\n defaultVariants: { size: 'md' },\n },\n)\n\n/** The eight distinctions worth drawing in every language. A highlighter's own\n * theme names fifty; the rest are one grammar's vocabulary and do not travel,\n * so they fold into the nearest of these. */\nexport type TokenKind =\n | 'keyword'\n | 'string'\n | 'number'\n | 'comment'\n /** An identifier: a variable, a function, a property. */\n | 'name'\n /** A type name, a class, a constructor. */\n | 'type'\n | 'punctuation'\n /** What surrounds the code rather than being it: a decorator, an attribute,\n * a shell prompt, a diff marker. */\n | 'meta'\n\nexport interface CodeToken {\n text: string\n /** Left out for text that takes the ordinary foreground - whitespace,\n * anything the highlighter had no opinion about. */\n kind?: TokenKind\n}\n\n/* A record rather than a template string, because Tailwind reads class names\n * out of the source: `text-syntax-${kind}` compiles to nothing, and the block\n * would render in the default colour with no error anywhere. */\nconst tokenColor: Record<TokenKind, string> = {\n keyword: 'text-syntax-keyword',\n string: 'text-syntax-string',\n number: 'text-syntax-number',\n comment: 'text-syntax-comment',\n name: 'text-syntax-name',\n type: 'text-syntax-type',\n punctuation: 'text-syntax-punctuation',\n meta: 'text-syntax-meta',\n}\n\nexport interface CodeBlockProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'onCopy'>,\n VariantProps<typeof codeBlockVariants> {\n /** The code, as it should land on the clipboard. Always required, even when\n * `tokens` is given: what is copied is the text, not a reassembly of the\n * highlighting. */\n code: string\n /** The same code, coloured. Lines of tokens - one array per line, and the\n * newlines are the array boundaries rather than characters in the text.\n * Left out, the block draws `code` in one colour. */\n tokens?: CodeToken[][]\n /** Shown above the code: a file name, a path, a language. It is what brings\n * the header; without one the copy button floats over the code instead,\n * because a strip holding nothing but a button that hides until hover is\n * empty furniture. */\n caption?: string\n /** Numbers down the left. Off by default: they are for code a reader is\n * meant to refer to, and on a two-line command they are furniture. */\n numbered?: boolean\n /** Where the numbering starts, for an excerpt lifted out of a file. */\n firstLine?: number\n /** Lines to mark, in the same numbering the reader sees. */\n highlight?: readonly number[]\n /** Brings the copy button, and names it for a screen reader. Required to\n * have one, and deliberately without a default: a string this component\n * invents is a string the product cannot translate. */\n copyLabel?: string\n /** Announced after a successful copy. Required alongside `copyLabel`. */\n copiedLabel?: string\n /** Told what happened, for a product that wants its own toast. */\n onCopy?: (ok: boolean) => void\n /**\n * Let long lines wrap instead of scrolling.\n *\n * Off by default, and that is the right default for code: a wrapped line\n * lies about where it ends, and indentation is how code is read. It exists\n * for the case where the \"code\" is really a long single-line value - a URL,\n * a token, a stack frame - which scrolls forever and reads no better for it.\n */\n wrap?: boolean\n}\n\nexport function CodeBlock({\n code,\n tokens,\n caption,\n numbered = false,\n firstLine = 1,\n highlight,\n copyLabel,\n copiedLabel,\n onCopy,\n wrap = false,\n size,\n className,\n ...props\n}: CodeBlockProps) {\n /* The trailing newline almost every file ends with would draw an empty final\n * row - and, with numbering on, a number against nothing. It is stripped for\n * drawing only; `code` is what gets copied, unchanged. */\n const lines: CodeToken[][] =\n tokens ?? code.replace(/\\n$/, '').split('\\n').map((text) => [{ text }])\n const marked = new Set(highlight ?? [])\n\n /* Built once. Where it lands is the only thing that differs: inside the\n * header when there is one, and over the code when there is not - which is\n * why the block is `relative`. */\n const copy =\n copyLabel === undefined ? null : (\n <CopyButton\n value={code}\n label={copyLabel}\n copiedLabel={copiedLabel ?? copyLabel}\n onCopy={onCopy}\n className={caption === undefined ? 'absolute right-1.5 top-1.5 z-10 bg-raise' : undefined}\n />\n )\n\n return (\n <div className={cn(codeBlockVariants({ size }), className)} {...props}>\n {/*\n * The header exists for the caption. The copy button goes in it when\n * there is one, and over the code when there is not.\n *\n * The first version drew a header whenever there was EITHER, and a live\n * run showed what that is: a block holding a command, with no caption,\n * got a 34px strip containing one button that is invisible until hover.\n * Empty furniture on the commonest shape there is.\n *\n * Not `<figcaption>`: this is a div, and a caption claiming to be one\n * without a `<figure>` around it is a lie to a screen reader.\n */}\n {caption === undefined ? (\n copy\n ) : (\n <div className=\"flex items-center gap-2 border-b border-line bg-softer px-3 py-1.5\">\n <span className=\"grow truncate text-2xs text-dim\">{caption}</span>\n {copy}\n </div>\n )}\n\n {/*\n * `<pre>` inside the scroller rather than around it, so the horizontal\n * scrollbar belongs to the code and the header stays put above it.\n *\n * `tabIndex={0}` is not decoration: a region that scrolls has to be\n * reachable by the keyboard, or a reader who does not use a pointer\n * cannot see the right-hand end of a long line. It carries a role and a\n * label for the same reason.\n */}\n <pre\n tabIndex={0}\n className={cn(\n 'overflow-x-auto py-2 leading-relaxed',\n // Restored here because a product's shell usually turns selection\n // off - and code that cannot be selected cannot be taken away.\n 'select-text',\n 'focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-accent',\n )}\n >\n <code className=\"block\">\n {lines.map((line, index) => {\n const number = firstLine + index\n return (\n <span\n key={number}\n className={cn(\n 'flex px-3',\n /* A left rule as well as a tint: a marked line that says so\n * only by a wash of accent is a line nobody notices, and one\n * that a reader who does not see the hue never notices at\n * all. */\n marked.has(number) &&\n 'border-l-2 border-accent bg-accent-soft pl-[calc(0.75rem-2px)]',\n )}\n >\n {numbered && (\n /*\n * `user-select: none` is the whole reason the numbers are\n * drawn here rather than in a counter or a background: a\n * reader who selects the block to copy it must not get \"1\"\n * welded to the front of every line. That is the defect this\n * gutter exists to avoid, and it is invisible until someone\n * pastes.\n */\n <span\n className=\"mr-3 shrink-0 select-none text-right tabular-nums text-faint\"\n style={{ width: `${String(firstLine + lines.length - 1).length}ch` }}\n aria-hidden\n >\n {number}\n </span>\n )}\n {/* `break-words` alongside the wrapping, not instead of it.\n * `pre-wrap` breaks at spaces, and the case `wrap` exists for\n * - a URL, a token, a stack frame - has none: a live run\n * showed a JWT sitting 320px outside a block that had asked\n * to wrap. Only `overflow-wrap` breaks inside a word. */}\n <span\n className={cn(\n 'min-w-0',\n wrap ? 'whitespace-pre-wrap break-words' : 'whitespace-pre',\n )}\n >\n {/* A line with nothing on it still needs its height, or a\n * blank line between two paragraphs of code closes up and\n * the numbering drifts away from the file. */}\n {line.length === 0 ? (\n '\\n'\n ) : (\n line.map((token, at) => (\n <span\n key={at}\n className={token.kind === undefined ? undefined : tokenColor[token.kind]}\n >\n {token.text}\n </span>\n ))\n )}\n </span>\n </span>\n )\n })}\n </code>\n </pre>\n </div>\n )\n}\n"
570
+ }
571
+ ]
572
+ },
536
573
  {
537
574
  "name": "color-field",
538
575
  "type": "registry:ui",
539
576
  "title": "Color-field",
540
577
  "description": "Picking a colour for something the product stores: a tag, a project, a calendar. Note what that is *not* - it is not choosing the appearance of the interface. The theme decides that, from one accent, and a field that let a reader repaint the chrome would undo the argument the whole system rests on.",
541
578
  "dependencies": [
542
- "dowel-ui@^0.24.0"
579
+ "dowel-ui@^0.25.0"
543
580
  ],
544
581
  "registryDependencies": [
545
582
  "https://lacodda.github.io/dowel/r/input.json"
@@ -561,7 +598,7 @@
561
598
  "dependencies": [
562
599
  "@base-ui/react",
563
600
  "class-variance-authority",
564
- "dowel-ui@^0.24.0"
601
+ "dowel-ui@^0.25.0"
565
602
  ],
566
603
  "registryDependencies": [
567
604
  "https://lacodda.github.io/dowel/r/input.json",
@@ -584,7 +621,7 @@
584
621
  "dependencies": [
585
622
  "@base-ui/react",
586
623
  "class-variance-authority",
587
- "dowel-ui@^0.24.0"
624
+ "dowel-ui@^0.25.0"
588
625
  ],
589
626
  "registryDependencies": [
590
627
  "https://lacodda.github.io/dowel/r/combobox.json",
@@ -607,7 +644,7 @@
607
644
  "dependencies": [
608
645
  "@base-ui/react",
609
646
  "class-variance-authority",
610
- "dowel-ui@^0.24.0"
647
+ "dowel-ui@^0.25.0"
611
648
  ],
612
649
  "registryDependencies": [],
613
650
  "files": [
@@ -626,7 +663,7 @@
626
663
  "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>`.",
627
664
  "dependencies": [
628
665
  "@base-ui/react",
629
- "dowel-ui@^0.24.0"
666
+ "dowel-ui@^0.25.0"
630
667
  ],
631
668
  "registryDependencies": [
632
669
  "https://lacodda.github.io/dowel/r/menu.json"
@@ -640,13 +677,31 @@
640
677
  }
641
678
  ]
642
679
  },
680
+ {
681
+ "name": "copy-button",
682
+ "type": "registry:ui",
683
+ "title": "Copy-button",
684
+ "description": "Whatever a product shows in a panel - code, a payload, a log, one side of a comparison - somebody eventually wants to take it away, and the button that lets them is written again every time with the same three things missed.",
685
+ "dependencies": [
686
+ "dowel-ui@^0.25.0"
687
+ ],
688
+ "registryDependencies": [],
689
+ "files": [
690
+ {
691
+ "path": "ui/copy-button.tsx",
692
+ "target": "@ui/copy-button.tsx",
693
+ "type": "registry:ui",
694
+ "content": "import { useCallback, useEffect, useRef, useState, type ButtonHTMLAttributes } from 'react'\nimport { cn } from 'dowel-ui'\n\n/*\n * The copy affordance in the corner of a block.\n *\n * Whatever a product shows in a panel - code, a payload, a log, one side of a\n * comparison - somebody eventually wants to take it away, and the button that\n * lets them is written again every time with the same three things missed.\n *\n * **It confirms only after the clipboard does.** The write can be refused:\n * it needs a secure context and, in some browsers, a permission. A tick\n * drawn on click is a lie in exactly the case the reader most needs the\n * truth.\n *\n * **It says so as well as showing it.** A tick that appears silently tells a\n * sighted reader it worked and tells nobody else. The live region is the\n * part that actually reports.\n *\n * **It stays reachable without a pointer.** Revealed on hover, which is\n * right - a permanent button in the corner of every block is clutter - and\n * on its own that makes it unreachable by keyboard. It is visible whenever\n * it has focus too, and that pairing is the whole trick.\n *\n * Copyable is the other shape of this, and the two are not interchangeable:\n * that one is a value sitting in a sentence - inline, truncating, showing the\n * text it copies - and this one is a control beside content already on screen,\n * so it carries an icon and no words.\n */\n\nexport interface CopyButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'onCopy'> {\n /** What lands on the clipboard. */\n value: string\n /** What the button is called, for a screen reader. Required, and\n * deliberately without a default: a string this component invents is a\n * string the product cannot translate, and it would ship in English to\n * every reader who does not read English. */\n label: string\n /** What is announced after a successful copy. Required for the same\n * reason. */\n copiedLabel: string\n /** Told what happened, for a product that wants its own toast. `false` means\n * the clipboard refused. */\n onCopy?: (ok: boolean) => void\n}\n\nexport function CopyButton({\n value,\n label,\n copiedLabel,\n onCopy,\n className,\n ...props\n}: CopyButtonProps) {\n const [copied, setCopied] = useState(false)\n const timer = useRef<ReturnType<typeof setTimeout>>(undefined)\n\n // A component that sets state on a timer has to stop when it goes away, or\n // it wakes up in a tree that no longer exists.\n useEffect(() => () => clearTimeout(timer.current), [])\n\n const copy = useCallback(async () => {\n try {\n await navigator.clipboard.writeText(value)\n setCopied(true)\n onCopy?.(true)\n clearTimeout(timer.current)\n timer.current = setTimeout(() => setCopied(false), 1600)\n } catch {\n onCopy?.(false)\n }\n }, [value, onCopy])\n\n return (\n <>\n <button\n type=\"button\"\n onClick={copy}\n aria-label={copied ? copiedLabel : label}\n className={cn(\n 'shrink-0 rounded-sm p-1 text-faint transition-colors',\n 'hover:bg-soft hover:text-text',\n /* `group-hover` rather than a hover of its own: the button is in the\n * corner of a block, and it has to appear when the pointer is\n * anywhere over that block rather than only once it has found the\n * button. The container carries `group`. */\n 'opacity-0 group-hover:opacity-100 focus-visible:opacity-100',\n 'focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-accent',\n copied && 'text-good opacity-100',\n className,\n )}\n {...props}\n >\n {copied ? <Tick /> : <Clipboard />}\n </button>\n\n {/* The drawn tick is invisible to a screen reader; this is the part that\n * reports the copy. Outside the button, because its content changes and\n * a live region inside a labelled control is announced twice. */}\n <span role=\"status\" aria-live=\"polite\" className=\"sr-only\">\n {copied ? copiedLabel : ''}\n </span>\n </>\n )\n}\n\nfunction Clipboard() {\n return (\n <svg viewBox=\"0 0 16 16\" width=\"13\" height=\"13\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.4\" aria-hidden>\n <rect x=\"5.5\" y=\"2.5\" width=\"8\" height=\"10\" rx=\"1.5\" />\n <path d=\"M10.5 2.5v-.5a1 1 0 0 0-1-1h-6a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h.5\" />\n </svg>\n )\n}\n\nfunction Tick() {\n return (\n <svg viewBox=\"0 0 16 16\" width=\"13\" height=\"13\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" aria-hidden>\n <path d=\"M3 8.5l3.5 3.5L13 5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n )\n}\n"
695
+ }
696
+ ]
697
+ },
643
698
  {
644
699
  "name": "copyable",
645
700
  "type": "registry:ui",
646
701
  "title": "Copyable",
647
702
  "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.",
648
703
  "dependencies": [
649
- "dowel-ui@^0.24.0"
704
+ "dowel-ui@^0.25.0"
650
705
  ],
651
706
  "registryDependencies": [],
652
707
  "files": [
@@ -664,7 +719,7 @@
664
719
  "title": "Date-picker",
665
720
  "description": "The trigger is a button rather than a text input, and that is the decision worth stating. A typable date field has to answer \"what does `03/04/26` mean\" in a locale it cannot be sure of, and it answers wrong for half the world; a button showing the date spelled out has no such question. Where typing genuinely matters - a birth date, forty years back - the calendar is the wrong control anyway and a product should reach for a plain field.",
666
721
  "dependencies": [
667
- "dowel-ui@^0.24.0"
722
+ "dowel-ui@^0.25.0"
668
723
  ],
669
724
  "registryDependencies": [
670
725
  "https://lacodda.github.io/dowel/r/calendar.json",
@@ -687,7 +742,7 @@
687
742
  "title": "Date-range-picker",
688
743
  "description": "The interesting part is the state between them. After the first click there is a start and no end, and that is not an incomplete range to be hidden or a range of one day - it is the normal middle of the interaction, and the calendar has to show it: the first day marked, the days under the pointer shading as the reader moves, the popup staying open. Products that skip it end up with a picker that seems to do nothing until the second click.",
689
744
  "dependencies": [
690
- "dowel-ui@^0.24.0"
745
+ "dowel-ui@^0.25.0"
691
746
  ],
692
747
  "registryDependencies": [
693
748
  "https://lacodda.github.io/dowel/r/calendar.json",
@@ -712,7 +767,7 @@
712
767
  "dependencies": [
713
768
  "@base-ui/react",
714
769
  "class-variance-authority",
715
- "dowel-ui@^0.24.0"
770
+ "dowel-ui@^0.25.0"
716
771
  ],
717
772
  "registryDependencies": [],
718
773
  "files": [
@@ -724,6 +779,44 @@
724
779
  }
725
780
  ]
726
781
  },
782
+ {
783
+ "name": "diff-lines",
784
+ "type": "registry:ui",
785
+ "title": "Diff-lines",
786
+ "description": "Split out like `line-scale` and `table-sort`: a product that wants to know how much moved between two drafts - to put a number in a list, to decide whether to offer the comparison at all - should not have to render a component to find out.",
787
+ "dependencies": [],
788
+ "registryDependencies": [],
789
+ "files": [
790
+ {
791
+ "path": "ui/diff-lines.tsx",
792
+ "target": "@ui/diff-lines.tsx",
793
+ "type": "registry:ui",
794
+ "content": "/*\n * The comparison behind DiffView, with no React in it.\n *\n * Split out like `line-scale` and `table-sort`: a product that wants to know\n * how much moved between two drafts - to put a number in a list, to decide\n * whether to offer the comparison at all - should not have to render a\n * component to find out.\n *\n * Lines rather than words, and that is a choice about the subject. The text\n * being compared here is prose someone wrote and revised - a draft, a note, a\n * configuration file - and prose is revised BY THE LINE. A word-level diff of\n * a rewritten paragraph is confetti: technically accurate, and it answers a\n * question nobody asked. Where the subject really is word-level - a title, a\n * single sentence - a product compares the two strings itself.\n *\n * Plain longest-common-subsequence. The bodies are a page or two, so the exact\n * O(n·m) answer costs nothing and there is no reason to reach for a heuristic.\n *\n * Taken from kilna, which had it first, with the arithmetic unchanged and the\n * pairing added: `rows` is the part the donor did not have, and its absence is\n * what made the donor's two columns drift out of step.\n */\n\n/** One step through the comparison. */\nexport type Change =\n | { kind: 'same'; text: string }\n | { kind: 'added'; text: string }\n | { kind: 'removed'; text: string }\n\n/**\n * One row of a side-by-side comparison: what stands on each side of it.\n *\n * `null` is a side with nothing there - the gap opposite an inserted line -\n * and it is deliberately not an empty string. An empty string is a line\n * somebody wrote that happens to have no characters on it, and a comparison\n * that cannot tell those apart draws a blank line as a deletion.\n */\nexport interface DiffRow {\n before: string | null\n after: string | null\n kind: Change['kind']\n /** Line numbers in each text, 1-based, for a gutter. `null` on the side that\n * has nothing. */\n beforeLine: number | null\n afterLine: number | null\n}\n\n/** How many lines each side may have before the comparison gives up. A table\n * of 2000×2000 is four million cells; past that the honest answer is \"too long\n * to compare\", not a frozen window. */\nexport const LIMIT = 2000\n\nexport function diffLines(before: string, after: string): Change[] {\n const a = before.split('\\n')\n const b = after.split('\\n')\n\n if (a.length > LIMIT || b.length > LIMIT) {\n return [\n { kind: 'removed', text: before },\n { kind: 'added', text: after },\n ]\n }\n\n // lcs[i][j] - the length of the longest common subsequence of a[i..] and\n // b[j..]. Filled backwards so the walk forwards can be greedy.\n const lcs: number[][] = Array.from({ length: a.length + 1 }, () =>\n Array.from({ length: b.length + 1 }, () => 0),\n )\n\n for (let i = a.length - 1; i >= 0; i -= 1) {\n for (let j = b.length - 1; j >= 0; j -= 1) {\n lcs[i]![j] = a[i] === b[j] ? lcs[i + 1]![j + 1]! + 1 : Math.max(lcs[i + 1]![j]!, lcs[i]![j + 1]!)\n }\n }\n\n const changes: Change[] = []\n let i = 0\n let j = 0\n\n while (i < a.length && j < b.length) {\n if (a[i] === b[j]) {\n changes.push({ kind: 'same', text: a[i]! })\n i += 1\n j += 1\n } else if (lcs[i + 1]![j]! >= lcs[i]![j + 1]!) {\n changes.push({ kind: 'removed', text: a[i]! })\n i += 1\n } else {\n changes.push({ kind: 'added', text: b[j]! })\n j += 1\n }\n }\n\n while (i < a.length) {\n changes.push({ kind: 'removed', text: a[i]! })\n i += 1\n }\n while (j < b.length) {\n changes.push({ kind: 'added', text: b[j]! })\n j += 1\n }\n\n return changes\n}\n\n/**\n * The changes as rows of two columns - the thing that makes side-by-side mean\n * anything.\n *\n * The obvious way to draw two columns is to filter the change list twice: keep\n * everything that is not `added` on the left, everything that is not `removed`\n * on the right. Both columns come out individually correct and they stop\n * lining up at the first insertion, because from there on they hold different\n * numbers of rows. The reader then compares line 4 against line 3 for the rest\n * of the screen, and nothing about the drawing looks wrong - which is why the\n * defect survived in the product this was taken from.\n *\n * Pairing instead makes the alignment structural: a row is one object with two\n * sides, so the columns are the same height by construction rather than by two\n * filters happening to agree.\n *\n * A removal immediately followed by an insertion is paired into ONE row rather\n * than two. That is the common shape of an edit - a line was rewritten - and\n * showing the old and the new opposite each other is the whole point of the\n * comparison. Left as separate rows, a rewritten line reads as a deletion\n * followed by an unrelated addition, with a gap opposite each.\n */\nexport function rows(changes: readonly Change[]): DiffRow[] {\n const out: DiffRow[] = []\n let beforeLine = 1\n let afterLine = 1\n\n for (let at = 0; at < changes.length; at += 1) {\n const change = changes[at]!\n\n if (change.kind === 'same') {\n out.push({\n before: change.text,\n after: change.text,\n kind: 'same',\n beforeLine: beforeLine++,\n afterLine: afterLine++,\n })\n continue\n }\n\n if (change.kind === 'removed') {\n // A removal with an insertion right behind it is a rewrite: pair them,\n // so the reader sees what the line became rather than two separate\n // events with a gap opposite each.\n const next = changes[at + 1]\n if (next?.kind === 'added') {\n out.push({\n before: change.text,\n after: next.text,\n kind: 'removed',\n beforeLine: beforeLine++,\n afterLine: afterLine++,\n })\n at += 1\n continue\n }\n out.push({\n before: change.text,\n after: null,\n kind: 'removed',\n beforeLine: beforeLine++,\n afterLine: null,\n })\n continue\n }\n\n out.push({\n before: null,\n after: change.text,\n kind: 'added',\n beforeLine: null,\n afterLine: afterLine++,\n })\n }\n\n return out\n}\n\n/** How much moved, for the one line above a comparison - or for a list that\n * wants to say \"12 lines changed\" without drawing anything. */\nexport function countChanges(changes: readonly Change[]): { added: number; removed: number } {\n let added = 0\n let removed = 0\n for (const change of changes) {\n if (change.kind === 'added') added += 1\n else if (change.kind === 'removed') removed += 1\n }\n return { added, removed }\n}\n"
795
+ }
796
+ ]
797
+ },
798
+ {
799
+ "name": "diff-view",
800
+ "type": "registry:ui",
801
+ "title": "Diff-view",
802
+ "description": "The question this answers is \"how did this read before, and how does it read now\" - a version against the one before it, a proposal against what is there, a file against what is on disk. Not a code review: there is no staging, no comment, nothing to accept. It is for looking.",
803
+ "dependencies": [
804
+ "class-variance-authority",
805
+ "dowel-ui@^0.25.0"
806
+ ],
807
+ "registryDependencies": [
808
+ "https://lacodda.github.io/dowel/r/copy-button.json",
809
+ "https://lacodda.github.io/dowel/r/diff-lines.json"
810
+ ],
811
+ "files": [
812
+ {
813
+ "path": "ui/diff-view.tsx",
814
+ "target": "@ui/diff-view.tsx",
815
+ "type": "registry:ui",
816
+ "content": "import { useMemo, type HTMLAttributes, type ReactNode } from 'react'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { cn } from 'dowel-ui'\nimport { CopyButton } from './copy-button'\nimport { countChanges, diffLines, rows, type DiffRow } from './diff-lines'\n\n/*\n * Two drafts of the same text, with what moved between them shown.\n *\n * The question this answers is \"how did this read before, and how does it read\n * now\" - a version against the one before it, a proposal against what is\n * there, a file against what is on disk. Not a code review: there is no\n * staging, no comment, nothing to accept. It is for looking.\n *\n * SIDE BY SIDE, AND THE ALIGNMENT IS THE WHOLE THING. The obvious way to draw\n * two columns is to filter the change list twice - keep what is not `added` on\n * the left, what is not `removed` on the right - and it is what the product\n * this came from did. Both columns come out individually correct, and they\n * stop lining up at the first insertion: from there the reader is comparing\n * line 4 against line 3, with nothing looking wrong. `rows` in `diff-lines`\n * pairs the changes instead, so the two sides are one list and cannot drift.\n *\n * The alignment has a second half, in the drawing rather than the data: ONE\n * scrolling region holds both columns, and a row is a single grid row spanning\n * them. Two scrollers - the shape this was first written with - come apart the\n * moment a reader touches one of them, which undoes the pairing at the point\n * it matters most. It also means a row is as tall as its taller side, so a\n * wrapped line on the left keeps its partner beside it instead of pushing the\n * two texts out of step.\n *\n * Below a certain width the pair stacks - the \"after\" line under the \"before\"\n * one - because two columns each too narrow to hold a line of text answer\n * nothing: every line wraps into three and the comparison is worse than one\n * column would have been. The breakpoint is on the component rather than the\n * viewport (`@container`), since a diff in a side panel is narrow on a wide\n * screen.\n *\n * STACKS, not hides. This drew `hidden @3xl:flex` on the after side for a\n * while, under a comment that said \"stacked\" - so a narrow reader saw a line\n * marked `~` as rewritten and nothing to compare it with, on a screen that\n * looked finished. Every test passed: they count cells in the DOM, and jsdom\n * does not resolve a container query. Half a comparison is worse than none.\n *\n * Colour is never the message. A changed line carries a marker glyph in the\n * gutter - `+`, `-`, `~` - so the comparison reads without hue, in a\n * screenshot, and for the eighth of men who would otherwise see two tinted\n * greys.\n */\n\nexport const diffViewVariants = cva('@container flex flex-col gap-2 text-sm', {\n variants: {\n size: {\n sm: '[--diff-max:16rem]',\n md: '[--diff-max:28rem]',\n /** No ceiling: the comparison is as tall as it is, and the page scrolls.\n * For a diff that IS the screen rather than sitting on one. */\n full: '[--diff-max:none]',\n },\n },\n defaultVariants: { size: 'md' },\n})\n\nexport interface DiffViewProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'onCopy'>,\n VariantProps<typeof diffViewVariants> {\n before: string\n after: string\n /** What each side is called - a version name, a date, \"on disk\". */\n beforeLabel: string\n afterLabel: string\n /** The line above the comparison: how much moved. The component counts, the\n * product says it in words - a count is a plural, and a plural belongs to a\n * language the component does not know. Given the two numbers, and left out\n * entirely when there is nothing to say. */\n summary?: (counts: { added: number; removed: number }) => ReactNode\n /** Numbers down each side. On by default: a comparison is usually read in\n * order to go and change something, and the number is how the reader finds\n * the place. */\n numbered?: boolean\n /**\n * Brings a copy button to each side's header, and names it.\n *\n * A function of the side's label rather than a string, because the two\n * buttons need distinguishable names - \"Copy\" twice on one screen tells a\n * reader using them which is which only by where they are, which is what a\n * label exists to avoid. Sticking the two together here (`${copy}: ${side}`)\n * would invent a phrase in a grammar this component does not know.\n */\n copyLabel?: (side: string) => string\n /** Announced after a successful copy. Required alongside `copyLabel`. */\n copiedLabel?: string\n /** Told what happened, for a product that wants its own toast. */\n onCopy?: (ok: boolean) => void\n}\n\nexport function DiffView({\n before,\n after,\n beforeLabel,\n afterLabel,\n summary,\n numbered = true,\n copyLabel,\n copiedLabel = '',\n onCopy,\n size,\n className,\n ...props\n}: DiffViewProps) {\n const changes = useMemo(() => diffLines(before, after), [before, after])\n const paired = useMemo(() => rows(changes), [changes])\n const counts = useMemo(() => countChanges(changes), [changes])\n\n /* Wide enough for the largest number either side will show. Sized from the\n * row count rather than from each column's own last number, so the two\n * gutters are the same width and the texts start at the same offset. */\n const width = String(paired.length).length\n\n return (\n <div className={cn(diffViewVariants({ size }), className)} {...props}>\n {summary !== undefined && <p className=\"text-xs text-dim\">{summary(counts)}</p>}\n\n <div className=\"overflow-hidden rounded-lg border border-line\">\n {/*\n * The headers sit outside the scroller, in the same two tracks, so\n * they stay put while the text moves under them.\n *\n * In one column they sit side by side instead of stacking, with an\n * arrow between them: stacked, they would be two labels separated by\n * the whole of the left-hand text, which labels nothing. Both are\n * always drawn - a comparison that names one of its two sides is one\n * the reader has to guess at.\n */}\n <div className=\"group flex items-center gap-2 border-b border-line bg-softer px-3 py-1 text-2xs font-medium text-dim @3xl:grid @3xl:grid-cols-2 @3xl:gap-0 @3xl:px-0 @3xl:py-0\">\n <span className=\"flex min-w-0 items-center gap-2 @3xl:grow @3xl:px-3 @3xl:py-1\">\n <span className=\"truncate @3xl:grow\">{beforeLabel}</span>\n {copyLabel !== undefined && (\n <CopyButton\n value={before}\n label={copyLabel(beforeLabel)}\n copiedLabel={copiedLabel}\n onCopy={onCopy}\n />\n )}\n </span>\n {/* Only while the two labels share a line. In two columns the tracks\n * say which is which. */}\n <span className=\"shrink-0 text-faint @3xl:hidden\" aria-hidden>\n {'\\u2192'}\n </span>\n <span className=\"flex min-w-0 items-center gap-2 @3xl:border-l @3xl:border-line @3xl:px-3 @3xl:py-1\">\n <span className=\"truncate @3xl:grow\">{afterLabel}</span>\n {copyLabel !== undefined && (\n <CopyButton\n value={after}\n label={copyLabel(afterLabel)}\n copiedLabel={copiedLabel}\n onCopy={onCopy}\n />\n )}\n </span>\n </div>\n\n <div\n /* The one scrolling region. Focusable because it scrolls: a region a\n * pointer can reach and a keyboard cannot is the usual way a long\n * diff hides its end. */\n tabIndex={0}\n className={cn(\n 'max-h-[var(--diff-max)] overflow-auto py-1 font-mono text-xs leading-relaxed',\n // A desktop shell turns selection off; a comparison is read in\n // order to copy something out of it.\n 'select-text',\n 'focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-accent',\n )}\n >\n <div className=\"grid grid-cols-1 @3xl:grid-cols-2\">\n {paired.map((row, index) => (\n // Lines repeat and reorder, so the text is not an identity; the\n // list is rebuilt whole whenever either side changes.\n <Row key={index} row={row} numbered={numbered} width={width} />\n ))}\n </div>\n </div>\n </div>\n </div>\n )\n}\n\n/* The glyph in the gutter, per side. A deletion is only a deletion on the left\n * - on the right that same row is a gap - so the marker depends on which\n * column is being drawn, not on the change alone. `~` for a rewritten line,\n * which is one event with a side each. */\nexport function marker(row: DiffRow, side: 'before' | 'after'): string {\n const text = side === 'before' ? row.before : row.after\n if (row.kind === 'same' || text === null) return ' '\n if (row.kind === 'removed' && row.after !== null) return '~'\n return side === 'before' ? '-' : '+'\n}\n\n/*\n * One row, as its two cells.\n *\n * They are siblings in the grid rather than a wrapper holding both, because a\n * wrapper would become the grid item and the columns would stop being columns.\n * `display: contents` would do it too and is worse: it removes the element\n * from the accessibility tree in several browsers, taking any grouping with\n * it.\n */\nfunction Row({ row, numbered, width }: { row: DiffRow; numbered: boolean; width: number }) {\n return (\n <>\n <Side row={row} side=\"before\" numbered={numbered} width={width} />\n <Side row={row} side=\"after\" numbered={numbered} width={width} />\n </>\n )\n}\n\nfunction Side({\n row,\n side,\n numbered,\n width,\n}: {\n row: DiffRow\n side: 'before' | 'after'\n numbered: boolean\n width: number\n}) {\n const text = side === 'before' ? row.before : row.after\n const line = side === 'before' ? row.beforeLine : row.afterLine\n const changed = row.kind !== 'same' && text !== null\n\n return (\n <div\n className={cn(\n 'flex px-2',\n // The rule between the columns belongs to the right-hand cells, so it\n // runs the full height of the text rather than stopping at the last\n // row of a short column. Gone while stacked, where there is no second\n // column for it to divide.\n /*\n * On the right in two columns; UNDER its partner in one.\n *\n * Never hidden, and that is the whole note. This read `hidden\n * @3xl:flex` for a while, under a comment saying the comparison\n * \"stacks\" - it did not stack, it dropped the after side entirely, so\n * a narrow reader saw a line marked `~` and nothing to compare it\n * with. A screen that looks finished and withholds half the answer is\n * worse than one that admits it has no room.\n *\n * Stacking needs no rule of its own: the cells are already siblings of\n * a grid that is one column until `@3xl`, so they fall under each\n * other by themselves. What the narrow layout does need is the rule\n * BETWEEN the pair, which is a top border there and a left border in\n * two columns.\n */\n side === 'after' && 'border-t border-line @3xl:border-t-0 @3xl:border-l',\n changed && (side === 'before' ? 'bg-bad-soft text-bad' : 'bg-good-soft text-good'),\n )}\n >\n {numbered && (\n // Never part of a selection: a reader copying a column wants the text,\n // not the text with a number welded to the front of every line.\n <span\n className=\"mr-2 shrink-0 select-none text-right tabular-nums text-faint\"\n style={{ width: `${width}ch` }}\n aria-hidden\n >\n {line ?? ''}\n </span>\n )}\n\n {/* The second channel, so the comparison reads without colour.\n * `aria-hidden` because a screen reader is told what changed by the\n * text itself; a spoken \"minus\" before every removed line is noise. */}\n <span className=\"mr-1.5 shrink-0 select-none\" aria-hidden>\n {marker(row, side)}\n </span>\n\n <span className=\"min-w-0 whitespace-pre-wrap break-words\">\n {/* A blank line still needs its height, or a gap opposite an insertion\n * collapses and the two columns come out of step by exactly the thing\n * the pairing prevented. */}\n {text === null || text === '' ? ' ' : text}\n </span>\n </div>\n )\n}\n"
817
+ }
818
+ ]
819
+ },
727
820
  {
728
821
  "name": "drawer",
729
822
  "type": "registry:ui",
@@ -732,7 +825,7 @@
732
825
  "dependencies": [
733
826
  "@base-ui/react",
734
827
  "class-variance-authority",
735
- "dowel-ui@^0.24.0"
828
+ "dowel-ui@^0.25.0"
736
829
  ],
737
830
  "registryDependencies": [],
738
831
  "files": [
@@ -750,7 +843,7 @@
750
843
  "title": "Duration-field",
751
844
  "description": "The alternative is what products keep building: two number boxes labelled \"hours\" and \"minutes\", which means two tab stops, two validations, and a reader who has to divide 90 minutes in their head before typing. Here they write `1h 30m`, or `90m`, or `1.5h`, and it means the same thing.",
752
845
  "dependencies": [
753
- "dowel-ui@^0.24.0"
846
+ "dowel-ui@^0.25.0"
754
847
  ],
755
848
  "registryDependencies": [
756
849
  "https://lacodda.github.io/dowel/r/input.json"
@@ -771,7 +864,7 @@
771
864
  "description": "Three kinds of nothing, and a product that draws the same panel for all three is telling the reader the wrong thing twice:\n * **empty** - there is nothing here yet, and that is normal. The panel says what would be here and offers the one action that makes it appear.",
772
865
  "dependencies": [
773
866
  "class-variance-authority",
774
- "dowel-ui@^0.24.0"
867
+ "dowel-ui@^0.25.0"
775
868
  ],
776
869
  "registryDependencies": [],
777
870
  "files": [
@@ -809,7 +902,7 @@
809
902
  "description": "Every form is the same four parts repeated: a name for the control, the control, sometimes a hint, and sometimes an error. Written by hand each time, they drift - the label loses its `htmlFor`, the hint is a `<div>` no screen reader mentions, the error appears in red and is announced by nothing at all. This is that arrangement, once.",
810
903
  "dependencies": [
811
904
  "@base-ui/react",
812
- "dowel-ui@^0.24.0"
905
+ "dowel-ui@^0.25.0"
813
906
  ],
814
907
  "registryDependencies": [],
815
908
  "files": [
@@ -827,7 +920,7 @@
827
920
  "title": "File-drop",
828
921
  "description": "A place to put files: drag them onto it, or press it and pick them. It takes files and hands them over - it does not upload them. Where they go, with which credentials, retried how - that is the product's transport, and a primitive that owned it would be wrong for every product whose upload does not look like the one it guessed.",
829
922
  "dependencies": [
830
- "dowel-ui@^0.24.0"
923
+ "dowel-ui@^0.25.0"
831
924
  ],
832
925
  "registryDependencies": [],
833
926
  "files": [
@@ -845,7 +938,7 @@
845
938
  "title": "Input",
846
939
  "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.",
847
940
  "dependencies": [
848
- "dowel-ui@^0.24.0"
941
+ "dowel-ui@^0.25.0"
849
942
  ],
850
943
  "registryDependencies": [],
851
944
  "files": [
@@ -857,13 +950,49 @@
857
950
  }
858
951
  ]
859
952
  },
953
+ {
954
+ "name": "json-rows",
955
+ "type": "registry:ui",
956
+ "title": "Json-rows",
957
+ "description": "The sibling of `tree-rows`, built the same way and for the same reason: a product that wants to count the rows before drawing any of them - to put a viewer inside a VirtualList, to say \"1,204 entries\" - imports this and never the component.",
958
+ "dependencies": [],
959
+ "registryDependencies": [],
960
+ "files": [
961
+ {
962
+ "path": "ui/json-rows.tsx",
963
+ "target": "@ui/json-rows.tsx",
964
+ "type": "registry:ui",
965
+ "content": "/*\n * What a JSON value looks like as a list of rows, with no React in it.\n *\n * The sibling of `tree-rows`, built the same way and for the same reason: a\n * product that wants to count the rows before drawing any of them - to put a\n * viewer inside a VirtualList, to say \"1,204 entries\" - imports this and never\n * the component.\n *\n * Flattening is also what makes the keyboard simple. Down is the next row of\n * this list and Up the previous, whatever the nesting; a recursive walk at\n * every keystroke asks the same question and answers it differently at each\n * depth.\n */\n\n/** What a value is, for drawing and for deciding whether it opens.\n *\n * `null` is its own kind rather than an absence: in JSON it is a value\n * somebody wrote, and a viewer that shows it as an empty cell says the key is\n * missing when it is present and null - a distinction that decides bugs. */\nexport type JsonKind = 'object' | 'array' | 'string' | 'number' | 'boolean' | 'null'\n\n/** Any value `JSON.parse` can return. */\nexport type JsonValue = null | boolean | number | string | JsonValue[] | { [key: string]: JsonValue }\n\nexport interface JsonRow {\n /**\n * Where this sits, in JSONPath: `$.items[3].name`.\n *\n * The identity of a row, and deliberately not its index: a row's index\n * changes when a branch above it opens, and anything remembered by index -\n * which rows are open, which is selected - would jump to a different value\n * the moment something above it moved. It is also what a reader copies when\n * they want to point at this value from somewhere else.\n */\n path: string\n /** The key, or the index as written in the path. `null` only for the root. */\n key: string | null\n /** True when the key is an array index rather than an object's name - drawn\n * differently, because `0` as a name and `0` as a position are not the same\n * thing. */\n index: boolean\n kind: JsonKind\n /** The value itself, for a leaf. A branch has none: what it holds is in the\n * rows below it. */\n value?: string | number | boolean | null\n depth: number\n /** How many entries a branch holds, so a closed one can say so without being\n * opened. */\n size?: number\n /** The path of the branch this row sits in, if any. What Left uses to get\n * out of a deep branch in one press. */\n parent?: string\n}\n\nexport function kindOf(value: JsonValue): JsonKind {\n if (value === null) return 'null'\n if (Array.isArray(value)) return 'array'\n return typeof value as JsonKind\n}\n\nexport function isBranch(kind: JsonKind): boolean {\n return kind === 'object' || kind === 'array'\n}\n\n/*\n * A key as it appears in a path.\n *\n * Dot notation where the key is an ordinary identifier, brackets otherwise -\n * which is not decoration. `$.user name` is not a path anything can resolve,\n * and a key containing a dot (`$.a.b` for the single key `\"a.b\"`) is a path\n * that resolves to the WRONG value silently. Both are common in real data:\n * configuration files and anything exported from a spreadsheet.\n */\nfunction step(key: string): string {\n return /^[A-Za-z_$][A-Za-z0-9_$]*$/.test(key)\n ? `.${key}`\n : `[${JSON.stringify(key)}]`\n}\n\n/**\n * The rows a value shows, in the order the eye and the keyboard travel.\n *\n * Only what is visible: a closed branch contributes its own row and nothing\n * below it. That is what keeps a viewer of a large document cheap - a\n * thousand-entry array that nobody opened costs one row.\n */\nexport function visibleRows(\n value: JsonValue,\n open: ReadonlySet<string>,\n { root = '$' }: { root?: string } = {},\n): JsonRow[] {\n const rows: JsonRow[] = []\n\n const walk = (\n node: JsonValue,\n path: string,\n key: string | null,\n index: boolean,\n depth: number,\n parent?: string,\n ): void => {\n const kind = kindOf(node)\n\n if (!isBranch(kind)) {\n rows.push({ path, key, index, kind, value: node as string | number | boolean | null, depth, parent })\n return\n }\n\n const entries: [string, JsonValue][] = Array.isArray(node)\n ? node.map((item, at) => [String(at), item])\n : Object.entries(node as { [key: string]: JsonValue })\n\n rows.push({ path, key, index, kind, depth, size: entries.length, parent })\n\n if (!open.has(path)) return\n\n for (const [childKey, child] of entries) {\n walk(\n child,\n Array.isArray(node) ? `${path}[${childKey}]` : `${path}${step(childKey)}`,\n childKey,\n Array.isArray(node),\n depth + 1,\n path,\n )\n }\n }\n\n walk(value, root, null, false, 0)\n return rows\n}\n\n/**\n * The paths to open so a document arrives readable.\n *\n * Bounded twice, by depth AND by size, and the second bound is the one that\n * does the work. A depth bound alone reads as sufficient and is not: the cost\n * of opening is measured in ROWS, while depth counts LEVELS, and those track\n * each other only while the branches are small - which is the case nobody\n * needed protecting from.\n *\n * Measured, not reasoned: a payload holding `assets: [1204 entries]` at its\n * top level rendered 1216 rows and 24,000 pixels of scroll on arrival under a\n * depth-2 bound, because the array sits AT depth 2. That is exactly the freeze\n * the bound exists to prevent, produced by the bound itself. The shape that\n * hurts is one huge branch near the surface, and a level count is blindest to\n * precisely that shape.\n *\n * So a branch opens when it is shallow enough AND holds fewer than `size`\n * entries. A branch left shut is not descended through either - what is inside\n * something the reader cannot see does not need deciding about.\n */\nexport function branchPaths(\n value: JsonValue,\n {\n root = '$',\n depth = 2,\n /** How many entries a branch may hold and still open by itself. Twenty is\n * about a screen: enough that a settings file arrives open, few enough\n * that a list of records arrives as a list of records. */\n size = 20,\n }: { root?: string; depth?: number; size?: number } = {},\n): Set<string> {\n const paths = new Set<string>()\n\n const walk = (node: JsonValue, path: string, level: number): void => {\n const kind = kindOf(node)\n if (!isBranch(kind) || level > depth) return\n\n const entries: [string, JsonValue][] = Array.isArray(node)\n ? node.map((item, at) => [String(at), item])\n : Object.entries(node as { [key: string]: JsonValue })\n\n // Too big to open, so it stays shut - and nothing below it is considered:\n // those rows are not going to be drawn either way.\n if (entries.length > size) return\n\n paths.add(path)\n\n for (const [key, child] of entries) {\n walk(child, Array.isArray(node) ? `${path}[${key}]` : `${path}${step(key)}`, level + 1)\n }\n }\n\n walk(value, root, 1)\n return paths\n}\n\n/**\n * What a closed branch says about itself: `{ 4 }` or `[ 1204 ]`.\n *\n * The count rather than a preview of the contents. A preview of the first\n * entries reads as though those are all of them, which is the one thing a\n * closed branch must not imply.\n */\nexport function summarise(row: JsonRow): string {\n if (row.kind === 'array') return `[ ${row.size ?? 0} ]`\n return `{ ${row.size ?? 0} }`\n}\n"
966
+ }
967
+ ]
968
+ },
969
+ {
970
+ "name": "json-viewer",
971
+ "type": "registry:ui",
972
+ "title": "Json-viewer",
973
+ "description": "What a product reaches for when it has to show a response, a settings file, a webhook payload - data the reader needs to understand, not edit. The alternative it replaces is `JSON.stringify(value, null, 2)` inside a `<pre>`, which is fine for twenty lines and useless for two hundred: nothing folds, nothing is findable, and the shape of the document is somewhere inside the indentation.",
974
+ "dependencies": [
975
+ "dowel-ui@^0.25.0"
976
+ ],
977
+ "registryDependencies": [
978
+ "https://lacodda.github.io/dowel/r/json-rows.json"
979
+ ],
980
+ "files": [
981
+ {
982
+ "path": "ui/json-viewer.tsx",
983
+ "target": "@ui/json-viewer.tsx",
984
+ "type": "registry:ui",
985
+ "content": "import { useMemo, useState, type KeyboardEvent } from 'react'\nimport { cn } from 'dowel-ui'\nimport {\n branchPaths,\n isBranch,\n summarise,\n visibleRows,\n type JsonRow,\n type JsonValue,\n} from './json-rows'\n\n/*\n * A JSON value, read rather than parsed by eye.\n *\n * What a product reaches for when it has to show a response, a settings file,\n * a webhook payload - data the reader needs to understand, not edit. The\n * alternative it replaces is `JSON.stringify(value, null, 2)` inside a `<pre>`,\n * which is fine for twenty lines and useless for two hundred: nothing folds,\n * nothing is findable, and the shape of the document is somewhere inside the\n * indentation.\n *\n * It is a TREE, and it deliberately does not reuse TreeView. A row here is a\n * key AND a value, and TreeView's row is one `ReactNode` label - pouring JSON\n * into it means the component can no longer colour a value by its type, tell\n * an array index from a name, or offer the two things a reader actually wants\n * (the value at this row, the path to it). What is genuinely shared is the\n * arithmetic of which rows are visible, and that is shared: `json-rows` is the\n * sibling of `tree-rows`, both with no React in them.\n *\n * The keyboard is the ARIA tree pattern, for the reason TreeView states it:\n *\n * **One tab stop, not one per row.** A document of four hundred rows with a\n * `tabIndex` on each is four hundred stops between whatever is above it and\n * whatever is below.\n *\n * **Right and Left do different things depending on where the cursor is.**\n * Right opens a closed branch, steps into an open one, does nothing on a\n * leaf; Left closes an open branch and otherwise jumps to the parent, which\n * is how a reader gets out of a deep branch without walking back up through\n * every sibling.\n *\n * Values are coloured with `--syntax-*`, the same tokens a CodeBlock uses, so\n * a string is the same green in both. Colour is never the only signal: a\n * string is quoted, a branch says how many it holds, and null is the word.\n */\n\nexport interface JsonViewerProps {\n value: JsonValue\n /** Which branches are open, by path. Uncontrolled if omitted, starting with\n * the top two levels open - the shape of an answer rather than the whole\n * document. */\n open?: ReadonlySet<string>\n onOpenChange?: (open: Set<string>) => void\n /** Told which row was activated, with its path and its value. What a product\n * hangs \"copy this\" or \"go to this setting\" on. */\n onActivate?: (row: JsonRow) => void\n /** What a screen reader calls it. Required, and without a default: a string\n * this component invents is a string the product cannot translate. */\n label: string\n /** The path the document starts at, for a viewer showing one field of a\n * larger record. Paths are then written so they still mean something in that\n * record. */\n root?: string\n className?: string\n}\n\nexport function JsonViewer({\n value,\n open: openProp,\n onOpenChange,\n onActivate,\n label,\n root = '$',\n className,\n}: JsonViewerProps) {\n const [openState, setOpenState] = useState(() => branchPaths(value, { root }))\n const open = openProp ?? openState\n\n const rows = useMemo(() => visibleRows(value, open, { root }), [value, open, root])\n\n /* The cursor is a path, not an index. An index would point at a different\n * value the moment a branch above it opened - the cursor would appear to\n * jump on its own. */\n const [cursor, setCursor] = useState<string>(root)\n const at = Math.max(\n 0,\n rows.findIndex((row) => row.path === cursor),\n )\n\n const setOpen = (next: Set<string>) => {\n if (openProp === undefined) setOpenState(next)\n onOpenChange?.(next)\n }\n\n const toggle = (path: string) => {\n const next = new Set(open)\n if (next.has(path)) next.delete(path)\n else next.add(path)\n setOpen(next)\n }\n\n const move = (to: number) => {\n const row = rows[Math.min(Math.max(to, 0), rows.length - 1)]\n if (row !== undefined) setCursor(row.path)\n }\n\n const onKeyDown = (event: KeyboardEvent<HTMLDivElement>) => {\n const row = rows[at]\n if (row === undefined) return\n\n switch (event.key) {\n case 'ArrowDown':\n move(at + 1)\n break\n case 'ArrowUp':\n move(at - 1)\n break\n case 'ArrowRight':\n // Open a closed branch; step into an open one. On a leaf, nothing -\n // rather than falling through to the next row, which would make Right\n // a second Down and lose the reader their place in the nesting.\n if (isBranch(row.kind) && !open.has(row.path)) toggle(row.path)\n else if (isBranch(row.kind)) move(at + 1)\n else return\n break\n case 'ArrowLeft':\n // Close what is open; otherwise leave the branch. The second half is\n // what makes a deep document navigable at all.\n if (isBranch(row.kind) && open.has(row.path)) toggle(row.path)\n else if (row.parent !== undefined) setCursor(row.parent)\n else return\n break\n case 'Home':\n move(0)\n break\n case 'End':\n move(rows.length - 1)\n break\n case 'Enter':\n case ' ':\n if (isBranch(row.kind)) toggle(row.path)\n onActivate?.(row)\n break\n default:\n return\n }\n // Only for a key this component handled: swallowing every keystroke would\n // take Tab and the browser's own shortcuts with it.\n event.preventDefault()\n }\n\n return (\n <div\n role=\"tree\"\n aria-label={label}\n // The one tab stop. The arrows move a cursor inside it - the arrangement\n // a radio group has, and for the same reason.\n tabIndex={0}\n onKeyDown={onKeyDown}\n className={cn(\n 'overflow-auto rounded-md border border-line bg-soft py-1 font-mono text-xs leading-relaxed',\n // A desktop shell turns selection off; this is data someone came to\n // take away.\n 'select-text',\n 'focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-accent',\n className,\n )}\n >\n {rows.map((row) => {\n const branch = isBranch(row.kind)\n const expanded = branch ? open.has(row.path) : undefined\n\n return (\n <div\n key={row.path}\n role=\"treeitem\"\n aria-level={row.depth + 1}\n aria-expanded={expanded}\n aria-selected={row.path === cursor}\n onClick={() => {\n setCursor(row.path)\n if (branch) toggle(row.path)\n onActivate?.(row)\n }}\n className={cn(\n 'flex cursor-default items-baseline gap-1.5 px-2 py-px',\n 'hover:bg-softer',\n row.path === cursor && 'bg-accent-soft',\n )}\n // Indentation as padding rather than nested elements: a row four\n // levels down is still a sibling of every other row, which is what\n // lets the whole list be windowed.\n style={{ paddingLeft: `${row.depth * 0.9 + 0.5}rem` }}\n >\n {/* The twisty. A fixed-width slot even on a leaf, so the keys of a\n * branch and a leaf at the same level line up - without it the\n * eye reads the indentation wrong. */}\n <span className={cn('w-2 shrink-0 text-faint', !branch && 'invisible')} aria-hidden>\n {expanded === true ? '▾' : '▸'}\n </span>\n\n {row.key !== null && (\n <>\n <span className={row.index ? 'text-faint tabular-nums' : 'text-syntax-name'}>\n {row.index ? row.key : `\"${row.key}\"`}\n </span>\n <span className=\"text-syntax-punctuation\" aria-hidden>\n :\n </span>\n </>\n )}\n\n {branch ? (\n /* A closed branch says how many it holds; an open one says it\n * too, because the count is still the fastest answer to \"how big\n * is this\" once the reader has scrolled past the first entries. */\n <span className=\"text-faint\">{summarise(row)}</span>\n ) : (\n <Leaf row={row} />\n )}\n </div>\n )\n })}\n </div>\n )\n}\n\n/*\n * A value, drawn as what it is.\n *\n * Quotes on a string are not decoration: `\"1\"` and `1` are different values,\n * and a viewer that draws them alike hides the commonest bug in any JSON\n * payload - a number that arrived as a string. Colour says the same thing\n * faster for those who see it; the quotes say it to everyone.\n */\nfunction Leaf({ row }: { row: JsonRow }) {\n if (row.kind === 'string') {\n return (\n <span className=\"min-w-0 break-all text-syntax-string\">{`\"${String(row.value)}\"`}</span>\n )\n }\n if (row.kind === 'number') {\n return <span className=\"text-syntax-number tabular-nums\">{String(row.value)}</span>\n }\n if (row.kind === 'boolean') {\n return <span className=\"text-syntax-keyword\">{String(row.value)}</span>\n }\n // `null` in the same colour as a comment: present, and nothing there. Drawn\n // as the word rather than as an empty cell, which would read as a key with\n // no value at all.\n return <span className=\"text-syntax-comment\">null</span>\n}\n"
986
+ }
987
+ ]
988
+ },
860
989
  {
861
990
  "name": "kbd",
862
991
  "type": "registry:ui",
863
992
  "title": "Kbd",
864
993
  "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.",
865
994
  "dependencies": [
866
- "dowel-ui@^0.24.0"
995
+ "dowel-ui@^0.25.0"
867
996
  ],
868
997
  "registryDependencies": [],
869
998
  "files": [
@@ -882,7 +1011,7 @@
882
1011
  "description": "The shape every product builds out of two `<div>`s in a flex row, and the reason it is worth having once: it is a `<dl>`, and the pairing is what a screen reader announces. Two divs read as four unrelated pieces of text - \"Created\", \"2 hours ago\", \"Owner\", \"Ines\" - and nothing says which value belongs to which name. The right element says it for free.",
883
1012
  "dependencies": [
884
1013
  "class-variance-authority",
885
- "dowel-ui@^0.24.0"
1014
+ "dowel-ui@^0.25.0"
886
1015
  ],
887
1016
  "registryDependencies": [],
888
1017
  "files": [
@@ -901,7 +1030,7 @@
901
1030
  "description": "The distinction against its neighbours is the data's, not the drawing's. A column says each period is its own sum - hours worked in a week, and there is no Wednesday-afternoon figure between two weeks. A line says the value existed the whole time and was sampled: an account balance, a price, a temperature. Drawing a sum as a line claims readings nobody took; drawing a level as columns throws away the thing being watched.",
902
1031
  "dependencies": [
903
1032
  "class-variance-authority",
904
- "dowel-ui@^0.24.0"
1033
+ "dowel-ui@^0.25.0"
905
1034
  ],
906
1035
  "registryDependencies": [
907
1036
  "https://lacodda.github.io/dowel/r/line-scale.json"
@@ -939,7 +1068,7 @@
939
1068
  "dependencies": [
940
1069
  "@base-ui/react",
941
1070
  "class-variance-authority",
942
- "dowel-ui@^0.24.0"
1071
+ "dowel-ui@^0.25.0"
943
1072
  ],
944
1073
  "registryDependencies": [],
945
1074
  "files": [
@@ -958,7 +1087,7 @@
958
1087
  "description": "A number typed into a text input is a string that happens to look like a number, and every product then writes the same four fixes: strip the letters, clamp to a range, round to a step, and decide what an empty box means. This is those four, once, plus the stepper - because a value with a small range is faster nudged than typed.",
959
1088
  "dependencies": [
960
1089
  "@base-ui/react",
961
- "dowel-ui@^0.24.0"
1090
+ "dowel-ui@^0.25.0"
962
1091
  ],
963
1092
  "registryDependencies": [
964
1093
  "https://lacodda.github.io/dowel/r/input.json"
@@ -978,7 +1107,7 @@
978
1107
  "title": "Number-format",
979
1108
  "description": "Two things, and the second is the reason this is a component rather than a call to `toLocaleString` at each site.",
980
1109
  "dependencies": [
981
- "dowel-ui@^0.24.0"
1110
+ "dowel-ui@^0.25.0"
982
1111
  ],
983
1112
  "registryDependencies": [],
984
1113
  "files": [
@@ -996,7 +1125,7 @@
996
1125
  "title": "Page-size",
997
1126
  "description": "Its own file rather than a part of `Pagination`, because the two are needed apart often enough: a list that scrolls for ever wants \"how many to load at a time\" and no page buttons, and a table with a fixed page size wants the buttons and no choice. Together they were also over the size gate, which asked the right question.",
998
1127
  "dependencies": [
999
- "dowel-ui@^0.24.0"
1128
+ "dowel-ui@^0.25.0"
1000
1129
  ],
1001
1130
  "registryDependencies": [
1002
1131
  "https://lacodda.github.io/dowel/r/select.json"
@@ -1016,7 +1145,7 @@
1016
1145
  "title": "Pagination",
1017
1146
  "description": "The arithmetic is exported separately from the component for the same reason `table-sort` is a file of its own: a product that pages on the server needs the page numbers and not the buttons, and computing them a second time in a different place is how the two disagree about where the last page ends.",
1018
1147
  "dependencies": [
1019
- "dowel-ui@^0.24.0"
1148
+ "dowel-ui@^0.25.0"
1020
1149
  ],
1021
1150
  "registryDependencies": [
1022
1151
  "https://lacodda.github.io/dowel/r/button.json"
@@ -1037,7 +1166,7 @@
1037
1166
  "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.",
1038
1167
  "dependencies": [
1039
1168
  "class-variance-authority",
1040
- "dowel-ui@^0.24.0"
1169
+ "dowel-ui@^0.25.0"
1041
1170
  ],
1042
1171
  "registryDependencies": [],
1043
1172
  "files": [
@@ -1055,7 +1184,7 @@
1055
1184
  "title": "Password-field",
1056
1185
  "description": "The reveal is the whole component, and it is not a convenience. A masked field is the only one in a form where a typo cannot be seen, so people either paste (fine) or type slowly and get it wrong anyway; the toggle is what turns an unverifiable field into a checkable one, and it is why long passphrases became usable at all.",
1057
1186
  "dependencies": [
1058
- "dowel-ui@^0.24.0"
1187
+ "dowel-ui@^0.25.0"
1059
1188
  ],
1060
1189
  "registryDependencies": [
1061
1190
  "https://lacodda.github.io/dowel/r/input.json"
@@ -1077,7 +1206,7 @@
1077
1206
  "dependencies": [
1078
1207
  "@base-ui/react",
1079
1208
  "class-variance-authority",
1080
- "dowel-ui@^0.24.0"
1209
+ "dowel-ui@^0.25.0"
1081
1210
  ],
1082
1211
  "registryDependencies": [],
1083
1212
  "files": [
@@ -1097,7 +1226,7 @@
1097
1226
  "dependencies": [
1098
1227
  "@base-ui/react",
1099
1228
  "class-variance-authority",
1100
- "dowel-ui@^0.24.0"
1229
+ "dowel-ui@^0.25.0"
1101
1230
  ],
1102
1231
  "registryDependencies": [],
1103
1232
  "files": [
@@ -1117,7 +1246,7 @@
1117
1246
  "dependencies": [
1118
1247
  "@base-ui/react",
1119
1248
  "class-variance-authority",
1120
- "dowel-ui@^0.24.0"
1249
+ "dowel-ui@^0.25.0"
1121
1250
  ],
1122
1251
  "registryDependencies": [],
1123
1252
  "files": [
@@ -1156,7 +1285,7 @@
1156
1285
  "dependencies": [
1157
1286
  "@base-ui/react",
1158
1287
  "class-variance-authority",
1159
- "dowel-ui@^0.24.0"
1288
+ "dowel-ui@^0.25.0"
1160
1289
  ],
1161
1290
  "registryDependencies": [],
1162
1291
  "files": [
@@ -1174,7 +1303,7 @@
1174
1303
  "title": "Rating-scale",
1175
1304
  "description": "Generalised from kilna, where it is how a work is scored on each of its axes. The shape is a row of marks rather than stars: stars carry a meaning of their own - a review, a public verdict - and this is as often \"how hard was this\" or \"how finished is it\" as it is \"how good\".",
1176
1305
  "dependencies": [
1177
- "dowel-ui@^0.24.0"
1306
+ "dowel-ui@^0.25.0"
1178
1307
  ],
1179
1308
  "registryDependencies": [],
1180
1309
  "files": [
@@ -1192,7 +1321,7 @@
1192
1321
  "title": "Relative-time",
1193
1322
  "description": "The relative-time primitive.",
1194
1323
  "dependencies": [
1195
- "dowel-ui@^0.24.0"
1324
+ "dowel-ui@^0.25.0"
1196
1325
  ],
1197
1326
  "registryDependencies": [],
1198
1327
  "files": [
@@ -1210,7 +1339,7 @@
1210
1339
  "title": "Save-state",
1211
1340
  "description": "The quiet line beside a field that saves itself: \"saving…\", then a tick that fades. It exists because a form without a Save button has to say what it did anyway - otherwise the reader is left guessing whether their edit survived, and the usual answer to that guess is to press Ctrl+S at a page that has no such thing.",
1212
1341
  "dependencies": [
1213
- "dowel-ui@^0.24.0"
1342
+ "dowel-ui@^0.25.0"
1214
1343
  ],
1215
1344
  "registryDependencies": [
1216
1345
  "https://lacodda.github.io/dowel/r/spinner.json"
@@ -1230,7 +1359,7 @@
1230
1359
  "title": "Search-field",
1231
1360
  "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.",
1232
1361
  "dependencies": [
1233
- "dowel-ui@^0.24.0"
1362
+ "dowel-ui@^0.25.0"
1234
1363
  ],
1235
1364
  "registryDependencies": [
1236
1365
  "https://lacodda.github.io/dowel/r/input.json",
@@ -1254,7 +1383,7 @@
1254
1383
  "dependencies": [
1255
1384
  "@base-ui/react",
1256
1385
  "class-variance-authority",
1257
- "dowel-ui@^0.24.0"
1386
+ "dowel-ui@^0.25.0"
1258
1387
  ],
1259
1388
  "registryDependencies": [
1260
1389
  "https://lacodda.github.io/dowel/r/input.json"
@@ -1290,7 +1419,7 @@
1290
1419
  "title": "Skeleton",
1291
1420
  "description": "The rule the component is built on, and the reason it takes a shape rather than filling the space:\n * **A skeleton of the wrong shape is worse than no skeleton.**\n * It promises something the content does not keep, and the promise is paid for in a jump: the page settles, the scrollbar appears, and whatever the reader was about to click has moved. Measured rather than assumed - the line's own calendar showed a list of four short lines where a six-row month grid was about to land, and the skeleton was itself the jump it existed to prevent.",
1292
1421
  "dependencies": [
1293
- "dowel-ui@^0.24.0"
1422
+ "dowel-ui@^0.25.0"
1294
1423
  ],
1295
1424
  "registryDependencies": [],
1296
1425
  "files": [
@@ -1309,7 +1438,7 @@
1309
1438
  "description": "The case for it over a NumberField is that the number does not matter much: a volume, an opacity, a weight in a search filter. Where the exact figure does matter, a slider is a worse field with more pixels - it cannot be typed into, it cannot be pasted into, and it has no state for \"empty\".",
1310
1439
  "dependencies": [
1311
1440
  "@base-ui/react",
1312
- "dowel-ui@^0.24.0"
1441
+ "dowel-ui@^0.25.0"
1313
1442
  ],
1314
1443
  "registryDependencies": [],
1315
1444
  "files": [
@@ -1328,7 +1457,7 @@
1328
1457
  "description": "The shape of a history, not a chart of it: no axes, no gridlines, no ticks.",
1329
1458
  "dependencies": [
1330
1459
  "class-variance-authority",
1331
- "dowel-ui@^0.24.0"
1460
+ "dowel-ui@^0.25.0"
1332
1461
  ],
1333
1462
  "registryDependencies": [],
1334
1463
  "files": [
@@ -1347,7 +1476,7 @@
1347
1476
  "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.",
1348
1477
  "dependencies": [
1349
1478
  "class-variance-authority",
1350
- "dowel-ui@^0.24.0"
1479
+ "dowel-ui@^0.25.0"
1351
1480
  ],
1352
1481
  "registryDependencies": [],
1353
1482
  "files": [
@@ -1366,7 +1495,7 @@
1366
1495
  "description": "The smallest thing on a dashboard and the one every product writes itself: a label above, a number below, sometimes a word about which way it moved.",
1367
1496
  "dependencies": [
1368
1497
  "class-variance-authority",
1369
- "dowel-ui@^0.24.0"
1498
+ "dowel-ui@^0.25.0"
1370
1499
  ],
1371
1500
  "registryDependencies": [],
1372
1501
  "files": [
@@ -1385,7 +1514,7 @@
1385
1514
  "description": "The difference from Checkbox is not how it looks, and getting it wrong is the commonest mistake in the pair. A checkbox is an answer collected now and submitted later, with the rest of the form; a switch is a setting that applies the moment it moves. Put a switch in a form with a Save button and the reader cannot tell whether anything happened - they flipped it, and nothing said so.",
1386
1515
  "dependencies": [
1387
1516
  "@base-ui/react",
1388
- "dowel-ui@^0.24.0"
1517
+ "dowel-ui@^0.25.0"
1389
1518
  ],
1390
1519
  "registryDependencies": [],
1391
1520
  "files": [
@@ -1420,7 +1549,7 @@
1420
1549
  "description": "Parts rather than a `columns` prop, and that is the decision worth stating: a `<DataTable columns={…} rows={…} />` is quicker to write for the first table and then owns every cell in the product forever. The moment one column needs a Badge, another a link, and a third the row's own menu, the prop grows a `render` for each - at which point it is JSX with extra steps, spelt in a shape only this component understands.",
1421
1550
  "dependencies": [
1422
1551
  "class-variance-authority",
1423
- "dowel-ui@^0.24.0"
1552
+ "dowel-ui@^0.25.0"
1424
1553
  ],
1425
1554
  "registryDependencies": [
1426
1555
  "https://lacodda.github.io/dowel/r/table-sort.json"
@@ -1441,7 +1570,7 @@
1441
1570
  "description": "Free text turned into a list: type a word, press Enter, it becomes a chip.",
1442
1571
  "dependencies": [
1443
1572
  "class-variance-authority",
1444
- "dowel-ui@^0.24.0"
1573
+ "dowel-ui@^0.25.0"
1445
1574
  ],
1446
1575
  "registryDependencies": [
1447
1576
  "https://lacodda.github.io/dowel/r/chip.json",
@@ -1462,7 +1591,7 @@
1462
1591
  "title": "Textarea",
1463
1592
  "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.",
1464
1593
  "dependencies": [
1465
- "dowel-ui@^0.24.0"
1594
+ "dowel-ui@^0.25.0"
1466
1595
  ],
1467
1596
  "registryDependencies": [
1468
1597
  "https://lacodda.github.io/dowel/r/input.json"
@@ -1482,7 +1611,7 @@
1482
1611
  "title": "Time-field",
1483
1612
  "description": "No donor for this one: neither product of the line had a time field, so this is written from the same shape as DurationField, and for the same reason. Anything a person plausibly types is accepted - `9`, `9:30`, `930`, `9.30`, `9pm`, `21:30` - and what comes back is always `HH:MM`.",
1484
1613
  "dependencies": [
1485
- "dowel-ui@^0.24.0"
1614
+ "dowel-ui@^0.25.0"
1486
1615
  ],
1487
1616
  "registryDependencies": [
1488
1617
  "https://lacodda.github.io/dowel/r/input.json"
@@ -1504,7 +1633,7 @@
1504
1633
  "dependencies": [
1505
1634
  "@base-ui/react",
1506
1635
  "class-variance-authority",
1507
- "dowel-ui@^0.24.0"
1636
+ "dowel-ui@^0.25.0"
1508
1637
  ],
1509
1638
  "registryDependencies": [],
1510
1639
  "files": [
@@ -1524,7 +1653,7 @@
1524
1653
  "dependencies": [
1525
1654
  "@base-ui/react",
1526
1655
  "class-variance-authority",
1527
- "dowel-ui@^0.24.0"
1656
+ "dowel-ui@^0.25.0"
1528
1657
  ],
1529
1658
  "registryDependencies": [],
1530
1659
  "files": [
@@ -1559,7 +1688,7 @@
1559
1688
  "description": "Two products had written this independently and arrived at the same construction - a rounded track, segments positioned absolutely by percent, a floor under the segment width so a short one does not vanish - differing only in what a segment meant. One drew the tiers of a rubric with the score standing among them; the other drew a working day as alternating work and breaks. Neither could be built from the other, and each knew something the other did not: the tiers had the marker and the three-state reading of a segment (passed, standing in, still ahead), the day had the minimum width and the difference between an empty track and an unknown one.",
1560
1689
  "dependencies": [
1561
1690
  "class-variance-authority",
1562
- "dowel-ui@^0.24.0"
1691
+ "dowel-ui@^0.25.0"
1563
1692
  ],
1564
1693
  "registryDependencies": [
1565
1694
  "https://lacodda.github.io/dowel/r/track-segments.json"
@@ -1595,7 +1724,7 @@
1595
1724
  "title": "Tree-view",
1596
1725
  "description": "The shape products reach for and then get wrong in the same place every time. A tree is not a nest of lists with click handlers - it is one control with a cursor in it, and the difference is the whole component:\n * **One tab stop, not one per node.** A tree of four hundred files with a `tabIndex` on each is four hundred stops between the sidebar and the editor. The container is what the keyboard reaches, and the arrows move a cursor inside it - the arrangement a `RadioGroup` has, for the same reason.",
1597
1726
  "dependencies": [
1598
- "dowel-ui@^0.24.0"
1727
+ "dowel-ui@^0.25.0"
1599
1728
  ],
1600
1729
  "registryDependencies": [
1601
1730
  "https://lacodda.github.io/dowel/r/tree-rows.json"
@@ -1615,7 +1744,7 @@
1615
1744
  "title": "Truncate",
1616
1745
  "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.",
1617
1746
  "dependencies": [
1618
- "dowel-ui@^0.24.0"
1747
+ "dowel-ui@^0.25.0"
1619
1748
  ],
1620
1749
  "registryDependencies": [],
1621
1750
  "files": [
@@ -1633,7 +1762,7 @@
1633
1762
  "title": "Virtual-list",
1634
1763
  "description": "The browser is fine with long lists until it is not: a hundred thousand `<div>`s is a layout the machine recomputes on every change, and the page stops responding while it does. What is drawn instead is the window the reader can actually see, held in place by a tall spacer, so the scrollbar still says how much there is.",
1635
1764
  "dependencies": [
1636
- "dowel-ui@^0.24.0"
1765
+ "dowel-ui@^0.25.0"
1637
1766
  ],
1638
1767
  "registryDependencies": [],
1639
1768
  "files": [