@misoto22/design 0.3.1 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/dist/article.css +393 -0
  2. package/dist/components/AppShell/AppShell.d.ts +15 -1
  3. package/dist/components/AppShell/AppShell.js +8 -4
  4. package/dist/components/AppShell/AppShell.js.map +1 -1
  5. package/dist/components/Article/Article.d.ts +51 -0
  6. package/dist/components/Article/Article.js +21 -0
  7. package/dist/components/Article/Article.js.map +1 -0
  8. package/dist/components/Button/Button.js +2 -2
  9. package/dist/components/Button/Button.js.map +1 -1
  10. package/dist/components/Calendar/Calendar.d.ts +1 -1
  11. package/dist/components/Calendar/Calendar.js +259 -24
  12. package/dist/components/Calendar/Calendar.js.map +1 -1
  13. package/dist/components/Checkbox/Checkbox.js +1 -1
  14. package/dist/components/Checkbox/Checkbox.js.map +1 -1
  15. package/dist/components/Collapsible/Collapsible.d.ts +15 -1
  16. package/dist/components/Collapsible/Collapsible.js +18 -0
  17. package/dist/components/Collapsible/Collapsible.js.map +1 -1
  18. package/dist/components/Combobox/Combobox.js +1 -1
  19. package/dist/components/Combobox/Combobox.js.map +1 -1
  20. package/dist/components/Command/Command.js +7 -7
  21. package/dist/components/Command/Command.js.map +1 -1
  22. package/dist/components/ContextMenu/ContextMenu.js +2 -2
  23. package/dist/components/ContextMenu/ContextMenu.js.map +1 -1
  24. package/dist/components/Diagram/Diagram.d.ts +81 -0
  25. package/dist/components/Diagram/Diagram.js +139 -0
  26. package/dist/components/Diagram/Diagram.js.map +1 -0
  27. package/dist/components/Dialog/Dialog.js +1 -1
  28. package/dist/components/Dialog/Dialog.js.map +1 -1
  29. package/dist/components/DropdownMenu/DropdownMenu.js +2 -2
  30. package/dist/components/DropdownMenu/DropdownMenu.js.map +1 -1
  31. package/dist/components/FigureBand/FigureBand.js +41 -30
  32. package/dist/components/FigureBand/FigureBand.js.map +1 -1
  33. package/dist/components/Popover/Popover.js +1 -1
  34. package/dist/components/Popover/Popover.js.map +1 -1
  35. package/dist/components/Select/Select.js +2 -2
  36. package/dist/components/Select/Select.js.map +1 -1
  37. package/dist/components/Sheet/Sheet.js +1 -1
  38. package/dist/components/Sheet/Sheet.js.map +1 -1
  39. package/dist/components/Slider/Slider.js +1 -1
  40. package/dist/components/Slider/Slider.js.map +1 -1
  41. package/dist/components/Steps/Steps.d.ts +65 -0
  42. package/dist/components/Steps/Steps.js +55 -0
  43. package/dist/components/Steps/Steps.js.map +1 -0
  44. package/dist/components/Switch/Switch.js +1 -1
  45. package/dist/components/Switch/Switch.js.map +1 -1
  46. package/dist/components/Tooltip/Tooltip.js +1 -1
  47. package/dist/components/Tooltip/Tooltip.js.map +1 -1
  48. package/dist/index.d.ts +4 -1
  49. package/dist/index.js +3 -0
  50. package/dist/index.js.map +1 -1
  51. package/dist/lib/useSelectionIndicator.js +14 -10
  52. package/dist/lib/useSelectionIndicator.js.map +1 -1
  53. package/dist/styles.css +1 -1
  54. package/dist/themes.css +53 -7
  55. package/dist/tokens.css +75 -10
  56. package/dist/tokens.d.ts +8 -0
  57. package/dist/tokens.js +53 -8
  58. package/dist/tokens.json +53 -8
  59. package/package.json +22 -19
package/dist/tokens.json CHANGED
@@ -269,29 +269,58 @@
269
269
  "category": "space",
270
270
  "light": "clamp(40px, calc(5 * var(--fluid)), 68px)"
271
271
  },
272
+ "radius-factor": {
273
+ "layer": "tokens",
274
+ "category": "radius",
275
+ "light": "1"
276
+ },
277
+ "radius-gate": {
278
+ "layer": "tokens",
279
+ "category": "radius",
280
+ "light": "min(1, var(--radius-factor))",
281
+ "comment": "Clamps the factor at 1 for the ADDING direction only. A frame's air is a fixed number of pixels, so `--radius-lg + 16px` would leave a rounded frame around a square panel the moment the theme went square; gated, it collapses to nothing along with everything else."
282
+ },
283
+ "radius-xs": {
284
+ "layer": "tokens",
285
+ "category": "radius",
286
+ "light": "calc(4px * var(--radius-factor))",
287
+ "comment": "The numbers are the ones the rest of the industry settled on, and that is the argument for them: 8px for a control, 12px for a panel, and 4/6 for the small marks inside one. Tailwind's own scale, shadcn's `--radius` ± 2 and ± 4, Radix Themes' steps 3 and 4, and Material's `xs`/`sm`/`md` all agree within a pixel of this. The previous 2/4/6/10 was a step tighter than any of them, which is what made a card read as a rectangle with the corners shaved rather than as a rounded panel."
288
+ },
272
289
  "radius-sm": {
273
290
  "layer": "tokens",
274
291
  "category": "radius",
275
- "light": "6px",
276
- "comment": "─── Radius ───────────────────────────────────────────────────────────── Four steps, and there is no fifth. The old law was \"0 everywhere\"; the White Reset replaces that with a scale small enough to stay quiet on a white page. A 50% circle is geometry rather than a corner and is not a step here."
292
+ "light": "calc(6px * var(--radius-factor))",
293
+ "comment": "a mark inside a tight box"
277
294
  },
278
295
  "radius": {
279
296
  "layer": "tokens",
280
297
  "category": "radius",
281
- "light": "8px",
282
- "comment": "images, thumbnails, media frames"
298
+ "light": "calc(8px * var(--radius-factor))",
299
+ "comment": "chips, keys, list rows"
283
300
  },
284
301
  "radius-lg": {
285
302
  "layer": "tokens",
286
303
  "category": "radius",
287
- "light": "14px",
288
- "comment": "inputs, buttons, small plates"
304
+ "light": "calc(12px * var(--radius-factor))",
305
+ "comment": "inputs, code, small plates"
289
306
  },
290
307
  "radius-pill": {
291
308
  "layer": "tokens",
292
309
  "category": "radius",
293
- "light": "999px",
294
- "comment": "feature panels, dark plates"
310
+ "light": "calc(999px * var(--radius-factor))",
311
+ "comment": "cards, dialogs, menu panels"
312
+ },
313
+ "radius-row": {
314
+ "layer": "tokens",
315
+ "category": "radius",
316
+ "light": "max(0px, calc(var(--radius-lg) - 0.375rem))",
317
+ "comment": "The nesting law, applied to the two insets this system actually uses."
318
+ },
319
+ "radius-frame": {
320
+ "layer": "tokens",
321
+ "category": "radius",
322
+ "light": "calc(var(--radius-lg) + 1rem * var(--radius-gate))",
323
+ "comment": "a row in a 6px-padded panel"
295
324
  },
296
325
  "control-h-sm": {
297
326
  "layer": "tokens",
@@ -367,6 +396,22 @@
367
396
  "light": "0px",
368
397
  "comment": "`0px`, not `0`. The cell rule adds to this inside a calc, and a unitless zero makes `calc(0 + 1.5rem)` invalid at computed-value time — the whole declaration is dropped and every column loses its gutter in silence."
369
398
  },
399
+ "panel-bg": {
400
+ "layer": "tokens",
401
+ "category": "other",
402
+ "light": "var(--paper)",
403
+ "comment": "─── Floating surfaces ────────────────────────────────────────────────── What a panel that FLOATS fills with, and what it does to whatever is behind it. A dialog, a menu, a popover, a palette — the surfaces that sit OVER the page rather than in it, and therefore the only ones with anything behind them to treat. Both default to the plain surface and cost nothing. `--panel-filter: none` matters more than it looks: a `backdrop-filter` of any value, `blur(0px)` included, promotes its element to its own compositing layer and makes it a containing block for fixed descendants. Paid on every menu in the system, for a theme most readers will never turn on. `none` is not a blur of zero; it is no filter at all. A card is deliberately NOT on this list. It sits on the page ground, so there is nothing behind it to see through, and a card that blurs its own background is drawing an effect rather than an object."
404
+ },
405
+ "panel-border": {
406
+ "layer": "tokens",
407
+ "category": "other",
408
+ "light": "var(--rule-2)"
409
+ },
410
+ "panel-filter": {
411
+ "layer": "tokens",
412
+ "category": "other",
413
+ "light": "none"
414
+ },
370
415
  "ease": {
371
416
  "layer": "tokens",
372
417
  "category": "motion",
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@misoto22/design",
3
- "version": "0.3.1",
3
+ "version": "0.5.0",
4
4
  "private": false,
5
- "description": "Monochrome design system \u2014 CSS tokens and accessible React primitives",
5
+ "description": "Monochrome design system CSS tokens and accessible React primitives",
6
6
  "license": "MIT",
7
7
  "author": "Henry Chen",
8
8
  "type": "module",
@@ -29,23 +29,11 @@
29
29
  "types": "./dist/tokens.d.ts",
30
30
  "import": "./dist/tokens.js"
31
31
  },
32
- "./themes.css": "./dist/themes.css"
32
+ "./themes.css": "./dist/themes.css",
33
+ "./article.css": "./dist/article.css"
33
34
  },
34
35
  "main": "./dist/index.js",
35
36
  "types": "./dist/index.d.ts",
36
- "scripts": {
37
- "build:fonts": "node scripts/vendor-fonts.mjs",
38
- "build:js": "NODE_OPTIONS=--max-old-space-size=6144 tsup",
39
- "build:css": "tailwindcss -i ./src/styles/index.css -o ./dist/styles.css --minify && node scripts/copy-portable-css.mjs && node scripts/emit-tokens.mjs",
40
- "build": "pnpm run build:fonts && pnpm run build:js && pnpm run build:css",
41
- "dev": "tsup --watch",
42
- "typecheck": "tsc --noEmit",
43
- "lint": "eslint src",
44
- "test": "vitest run",
45
- "test:watch": "vitest",
46
- "clean": "rm -rf dist",
47
- "check:size": "node scripts/check-size.mjs"
48
- },
49
37
  "peerDependencies": {
50
38
  "react": "^19.0.0",
51
39
  "react-dom": "^19.0.0"
@@ -78,6 +66,7 @@
78
66
  "tailwind-merge": "^3.4.0"
79
67
  },
80
68
  "devDependencies": {
69
+ "@arethetypeswrong/cli": "^0.18.5",
81
70
  "@fontsource/hanken-grotesk": "^5.2.5",
82
71
  "@fontsource/ibm-plex-mono": "^5.2.5",
83
72
  "@fontsource/newsreader": "^5.2.5",
@@ -94,6 +83,7 @@
94
83
  "esbuild": "^0.28.2",
95
84
  "esbuild-fix-imports-plugin": "^1.0.23",
96
85
  "jsdom": "^29.1.1",
86
+ "publint": "^0.3.24",
97
87
  "react": "^19.2.8",
98
88
  "react-dom": "^19.2.8",
99
89
  "tailwindcss": "4.3.3",
@@ -105,10 +95,9 @@
105
95
  "node": ">=24",
106
96
  "pnpm": ">=11"
107
97
  },
108
- "packageManager": "pnpm@11.9.0",
109
98
  "repository": {
110
99
  "type": "git",
111
- "url": "https://github.com/Misoto22/misoto22-design.git",
100
+ "url": "git+https://github.com/Misoto22/misoto22-design.git",
112
101
  "directory": "packages/design"
113
102
  },
114
103
  "keywords": [
@@ -126,5 +115,19 @@
126
115
  },
127
116
  "publishConfig": {
128
117
  "access": "public"
118
+ },
119
+ "scripts": {
120
+ "build:fonts": "node scripts/vendor-fonts.mjs",
121
+ "build:js": "NODE_OPTIONS=--max-old-space-size=6144 tsup",
122
+ "build:css": "tailwindcss -i ./src/styles/index.css -o ./dist/styles.css --minify && node scripts/copy-portable-css.mjs && node scripts/emit-tokens.mjs",
123
+ "build": "pnpm run build:fonts && pnpm run build:js && pnpm run build:css",
124
+ "dev": "tsup --watch",
125
+ "typecheck": "tsc --noEmit",
126
+ "lint": "eslint src",
127
+ "test": "vitest run",
128
+ "test:watch": "vitest",
129
+ "clean": "rm -rf dist",
130
+ "check:size": "node scripts/check-size.mjs",
131
+ "check:publish": "node scripts/check-publish.mjs"
129
132
  }
130
- }
133
+ }