@vegastack/design 0.16.0 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/doctor.mjs +26 -0
- package/dist/{chunk-BH6QPBFT.js → chunk-BJGPQLMW.js} +23 -8
- package/dist/create-animated-icon.cjs +22 -7
- package/dist/create-animated-icon.js +1 -1
- package/dist/icons/index.cjs +22 -7
- package/dist/icons/index.js +1 -1
- package/dist/index.cjs +22 -7
- package/dist/index.d.cts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/skills/vegastack-design-audit/SKILL.md +8 -2
- package/skills/vegastack-design-system/SKILL.md +11 -6
package/bin/doctor.mjs
CHANGED
|
@@ -310,6 +310,32 @@ export const RETIRED_VOCABULARY = [
|
|
|
310
310
|
hint: () => "shadow-md (a popover) or shadow-lg (a modal)",
|
|
311
311
|
declared: () => "--shadow-overlay",
|
|
312
312
|
},
|
|
313
|
+
{
|
|
314
|
+
// BRD-12 (ours, operator 2026-11-16): `rounded-chat-card` and `--chat-card-radius` retired into
|
|
315
|
+
// the `card` role.
|
|
316
|
+
id: "rounded-chat-card",
|
|
317
|
+
re: new RegExp(
|
|
318
|
+
`${B}(?:rounded(?:-[tbserl]{1,2})?-chat-card|--chat-card-radius|--radius-chat-card)${E}`,
|
|
319
|
+
"g",
|
|
320
|
+
),
|
|
321
|
+
hint: (m) =>
|
|
322
|
+
m.startsWith("--")
|
|
323
|
+
? "var(--corner-card)"
|
|
324
|
+
: m.replace("chat-card", "card"),
|
|
325
|
+
declared: () => ["--chat-card-radius", "--radius-chat-card"],
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
// BRD-12: a corner is a role, never a size. A ramp step or an arbitrary radius in app code is
|
|
329
|
+
// off the system the registry now speaks; bare `rounded` is left alone because it is also a word.
|
|
330
|
+
id: "off-role corner",
|
|
331
|
+
re: new RegExp(
|
|
332
|
+
String.raw`(?<![\w-])rounded(?:-(?:t|r|b|l|s|e|tl|tr|br|bl|ss|se|es|ee))?-(?:xs|sm|md|lg|xl|2xl|3xl|4xl|\[(?!inherit\])[^\]\s]+\]|\(--[\w-]+\))(?![\w-])`,
|
|
333
|
+
"g",
|
|
334
|
+
),
|
|
335
|
+
hint: () =>
|
|
336
|
+
"the role the element plays: rounded-control (single-line control), -icon (icon-only button), -chip, -inline (token in text), -mark, -item (row with a fill, tooltip), -block, -card, -bubble, -overlay, -tile (square media); row-fill on a table row",
|
|
337
|
+
declared: () => null,
|
|
338
|
+
},
|
|
313
339
|
{
|
|
314
340
|
id: "backdrop-blur-glass",
|
|
315
341
|
re: new RegExp(`${B}backdrop-blur-glass${E}`, "g"),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/index.ts
|
|
2
2
|
import { clsx } from "clsx";
|
|
3
|
-
import {
|
|
3
|
+
import { extendTailwindMerge } from "tailwind-merge";
|
|
4
4
|
|
|
5
5
|
// src/prose.ts
|
|
6
6
|
var prose = {
|
|
@@ -45,7 +45,7 @@ var prose = {
|
|
|
45
45
|
em: "[&_em]:italic",
|
|
46
46
|
del: "[&_del]:line-through [&_s]:line-through",
|
|
47
47
|
// A highlight (`==text==`): its colour's subtle tag fill behind body ink, kept on paper too.
|
|
48
|
-
mark: "[&_mark]:rounded-
|
|
48
|
+
mark: "[&_mark]:rounded-mark [&_mark]:bg-tag-yellow-subtle [&_mark]:px-0.5 [&_mark]:text-inherit [&_mark]:box-decoration-clone [&_mark]:[print-color-adjust:exact] [&_mark[data-color=green]]:bg-tag-green-subtle [&_mark[data-color=blue]]:bg-tag-blue-subtle [&_mark[data-color=purple]]:bg-tag-purple-subtle [&_mark[data-color=pink]]:bg-tag-pink-subtle [&_mark[data-color=red]]:bg-tag-red-subtle",
|
|
49
49
|
// Lists. Items and markers are body text: family, size and ink inherit (a `::marker` takes the
|
|
50
50
|
// item's font), so `1.` and `•` never read as a second typeface or a second colour. One thing
|
|
51
51
|
// does NOT inherit: the user-agent stylesheet gives `::marker` `font-variant-numeric:
|
|
@@ -71,11 +71,11 @@ var prose = {
|
|
|
71
71
|
// is undone at higher specificity (`[&_pre_code]` is (0,1,2) against the chip's (0,1,1)).
|
|
72
72
|
// Slack/Notion: a neutral grey chip with orange text (the syntax palette's literal colour), so
|
|
73
73
|
// inline code reads apart from prose in both themes; `tag-orange-text` on `muted` clears AA.
|
|
74
|
-
code: "[&_code]:rounded-
|
|
74
|
+
code: "[&_code]:rounded-inline [&_code]:bg-muted [&_code]:px-1.5 [&_code]:py-0.5 [&_code]:font-mono [&_code]:text-sm [&_code]:text-tag-orange-text",
|
|
75
75
|
// A bare `<pre>` wears `CodeBlock`'s surface — the same sunken panel, one vocabulary (B4-09).
|
|
76
76
|
// `CodeBlock`'s own `pre` is excluded: it already sits inside a `figure` carrying the border,
|
|
77
77
|
// radius and ground, and re-applying them here would draw a second panel inside the first.
|
|
78
|
-
pre: "[&_pre:not([data-slot='code-block-pre'])]:my-2 [&_pre:not([data-slot='code-block-pre'])]:overflow-x-auto [&_pre:not([data-slot='code-block-pre'])]:rounded-
|
|
78
|
+
pre: "[&_pre:not([data-slot='code-block-pre'])]:my-2 [&_pre:not([data-slot='code-block-pre'])]:overflow-x-auto [&_pre:not([data-slot='code-block-pre'])]:rounded-block [&_pre:not([data-slot='code-block-pre'])]:border [&_pre:not([data-slot='code-block-pre'])]:border-border [&_pre:not([data-slot='code-block-pre'])]:bg-muted [&_pre:not([data-slot='code-block-pre'])]:p-4 [&_pre:not([data-slot='code-block-pre'])]:text-foreground",
|
|
79
79
|
preCode: "[&_pre_code]:bg-transparent [&_pre_code]:p-0 [&_pre_code]:font-mono [&_pre_code]:text-sm [&_pre_code]:text-foreground",
|
|
80
80
|
hr: "[&_hr]:my-4 [&_hr]:border-border",
|
|
81
81
|
// GFM tables, Notion's simple table: a rounded outer border, a rule between every cell, and a
|
|
@@ -89,10 +89,10 @@ var prose = {
|
|
|
89
89
|
// in its box rather than crushing to one character per line.
|
|
90
90
|
// A table a component draws inside prose (an embedded DataGrid in a live block) is its own:
|
|
91
91
|
// anything under `[data-prose="off"]` is left alone by every table rule here.
|
|
92
|
-
table: "[&_table:not([data-prose=off]_*)]:w-full [&_table:not([data-prose=off]_*)]:border-separate [&_table:not([data-prose=off]_*)]:border-spacing-0 [&_table:not([data-prose=off]_*)]:rounded-
|
|
93
|
-
tableRules: "[&_th:not([data-prose=off]_*)]:border-e [&_th:not([data-prose=off]_*)]:border-b [&_th:not([data-prose=off]_*)]:border-border [&_td:not([data-prose=off]_*)]:border-e [&_td:not([data-prose=off]_*)]:border-b [&_td:not([data-prose=off]_*)]:border-border [&_tr:not([data-prose=off]_*)>*:last-child]:border-e-0 [&_tbody:not([data-prose=off]_*)>tr:last-child>*]:border-b-0 [&_tr:not([data-prose=off]_*):first-child>*:first-child]:rounded-ss-
|
|
92
|
+
table: "[&_table:not([data-prose=off]_*)]:w-full [&_table:not([data-prose=off]_*)]:border-separate [&_table:not([data-prose=off]_*)]:border-spacing-0 [&_table:not([data-prose=off]_*)]:rounded-block [&_table:not([data-prose=off]_*)]:border [&_table:not([data-prose=off]_*)]:border-border",
|
|
93
|
+
tableRules: "[&_th:not([data-prose=off]_*)]:border-e [&_th:not([data-prose=off]_*)]:border-b [&_th:not([data-prose=off]_*)]:border-border [&_td:not([data-prose=off]_*)]:border-e [&_td:not([data-prose=off]_*)]:border-b [&_td:not([data-prose=off]_*)]:border-border [&_tr:not([data-prose=off]_*)>*:last-child]:border-e-0 [&_tbody:not([data-prose=off]_*)>tr:last-child>*]:border-b-0 [&_tr:not([data-prose=off]_*):first-child>*:first-child]:rounded-ss-block [&_tr:not([data-prose=off]_*):first-child>*:last-child]:rounded-se-block [&_tbody:not([data-prose=off]_*)>tr:last-child>*:first-child]:rounded-es-block [&_tbody:not([data-prose=off]_*)>tr:last-child>*:last-child]:rounded-ee-block",
|
|
94
94
|
tableCells: "[&_th:not([data-prose=off]_*)]:bg-muted/50 [&_th:not([data-prose=off]_*)]:px-3 [&_th:not([data-prose=off]_*)]:py-2 [&_th:not([data-prose=off]_*)]:text-start [&_th:not([data-prose=off]_*)]:align-top [&_th:not([data-prose=off]_*)]:font-medium [&_td:not([data-prose=off]_*)]:px-3 [&_td:not([data-prose=off]_*)]:py-2 [&_td:not([data-prose=off]_*)]:align-top [&_td_p:not([data-prose=off]_*)]:my-0 [&_th_p:not([data-prose=off]_*)]:my-0 [&_th:not([data-prose=off]_*)]:wrap-break-word [&_td:not([data-prose=off]_*)]:wrap-break-word",
|
|
95
|
-
img: "[&_img]:my-2 [&_img]:max-w-full [&_img]:rounded-
|
|
95
|
+
img: "[&_img]:my-2 [&_img]:max-w-full [&_img]:rounded-block [&_img]:border [&_img]:border-border"
|
|
96
96
|
};
|
|
97
97
|
var proseClassName = Object.values(prose).join(" ");
|
|
98
98
|
var proseDocument = {
|
|
@@ -151,7 +151,22 @@ var proseReading = {
|
|
|
151
151
|
};
|
|
152
152
|
|
|
153
153
|
// src/index.ts
|
|
154
|
-
var
|
|
154
|
+
var CORNER_ROLES = [
|
|
155
|
+
"control",
|
|
156
|
+
"icon",
|
|
157
|
+
"chip",
|
|
158
|
+
"inline",
|
|
159
|
+
"mark",
|
|
160
|
+
"item",
|
|
161
|
+
"block",
|
|
162
|
+
"card",
|
|
163
|
+
"bubble",
|
|
164
|
+
"overlay",
|
|
165
|
+
"tile"
|
|
166
|
+
];
|
|
167
|
+
var twMerge = extendTailwindMerge({
|
|
168
|
+
extend: { theme: { radius: [...CORNER_ROLES] } }
|
|
169
|
+
});
|
|
155
170
|
function cn(...inputs) {
|
|
156
171
|
return twMerge(clsx(inputs));
|
|
157
172
|
}
|
|
@@ -85,7 +85,7 @@ var prose = {
|
|
|
85
85
|
em: "[&_em]:italic",
|
|
86
86
|
del: "[&_del]:line-through [&_s]:line-through",
|
|
87
87
|
// A highlight (`==text==`): its colour's subtle tag fill behind body ink, kept on paper too.
|
|
88
|
-
mark: "[&_mark]:rounded-
|
|
88
|
+
mark: "[&_mark]:rounded-mark [&_mark]:bg-tag-yellow-subtle [&_mark]:px-0.5 [&_mark]:text-inherit [&_mark]:box-decoration-clone [&_mark]:[print-color-adjust:exact] [&_mark[data-color=green]]:bg-tag-green-subtle [&_mark[data-color=blue]]:bg-tag-blue-subtle [&_mark[data-color=purple]]:bg-tag-purple-subtle [&_mark[data-color=pink]]:bg-tag-pink-subtle [&_mark[data-color=red]]:bg-tag-red-subtle",
|
|
89
89
|
// Lists. Items and markers are body text: family, size and ink inherit (a `::marker` takes the
|
|
90
90
|
// item's font), so `1.` and `•` never read as a second typeface or a second colour. One thing
|
|
91
91
|
// does NOT inherit: the user-agent stylesheet gives `::marker` `font-variant-numeric:
|
|
@@ -111,11 +111,11 @@ var prose = {
|
|
|
111
111
|
// is undone at higher specificity (`[&_pre_code]` is (0,1,2) against the chip's (0,1,1)).
|
|
112
112
|
// Slack/Notion: a neutral grey chip with orange text (the syntax palette's literal colour), so
|
|
113
113
|
// inline code reads apart from prose in both themes; `tag-orange-text` on `muted` clears AA.
|
|
114
|
-
code: "[&_code]:rounded-
|
|
114
|
+
code: "[&_code]:rounded-inline [&_code]:bg-muted [&_code]:px-1.5 [&_code]:py-0.5 [&_code]:font-mono [&_code]:text-sm [&_code]:text-tag-orange-text",
|
|
115
115
|
// A bare `<pre>` wears `CodeBlock`'s surface — the same sunken panel, one vocabulary (B4-09).
|
|
116
116
|
// `CodeBlock`'s own `pre` is excluded: it already sits inside a `figure` carrying the border,
|
|
117
117
|
// radius and ground, and re-applying them here would draw a second panel inside the first.
|
|
118
|
-
pre: "[&_pre:not([data-slot='code-block-pre'])]:my-2 [&_pre:not([data-slot='code-block-pre'])]:overflow-x-auto [&_pre:not([data-slot='code-block-pre'])]:rounded-
|
|
118
|
+
pre: "[&_pre:not([data-slot='code-block-pre'])]:my-2 [&_pre:not([data-slot='code-block-pre'])]:overflow-x-auto [&_pre:not([data-slot='code-block-pre'])]:rounded-block [&_pre:not([data-slot='code-block-pre'])]:border [&_pre:not([data-slot='code-block-pre'])]:border-border [&_pre:not([data-slot='code-block-pre'])]:bg-muted [&_pre:not([data-slot='code-block-pre'])]:p-4 [&_pre:not([data-slot='code-block-pre'])]:text-foreground",
|
|
119
119
|
preCode: "[&_pre_code]:bg-transparent [&_pre_code]:p-0 [&_pre_code]:font-mono [&_pre_code]:text-sm [&_pre_code]:text-foreground",
|
|
120
120
|
hr: "[&_hr]:my-4 [&_hr]:border-border",
|
|
121
121
|
// GFM tables, Notion's simple table: a rounded outer border, a rule between every cell, and a
|
|
@@ -129,10 +129,10 @@ var prose = {
|
|
|
129
129
|
// in its box rather than crushing to one character per line.
|
|
130
130
|
// A table a component draws inside prose (an embedded DataGrid in a live block) is its own:
|
|
131
131
|
// anything under `[data-prose="off"]` is left alone by every table rule here.
|
|
132
|
-
table: "[&_table:not([data-prose=off]_*)]:w-full [&_table:not([data-prose=off]_*)]:border-separate [&_table:not([data-prose=off]_*)]:border-spacing-0 [&_table:not([data-prose=off]_*)]:rounded-
|
|
133
|
-
tableRules: "[&_th:not([data-prose=off]_*)]:border-e [&_th:not([data-prose=off]_*)]:border-b [&_th:not([data-prose=off]_*)]:border-border [&_td:not([data-prose=off]_*)]:border-e [&_td:not([data-prose=off]_*)]:border-b [&_td:not([data-prose=off]_*)]:border-border [&_tr:not([data-prose=off]_*)>*:last-child]:border-e-0 [&_tbody:not([data-prose=off]_*)>tr:last-child>*]:border-b-0 [&_tr:not([data-prose=off]_*):first-child>*:first-child]:rounded-ss-
|
|
132
|
+
table: "[&_table:not([data-prose=off]_*)]:w-full [&_table:not([data-prose=off]_*)]:border-separate [&_table:not([data-prose=off]_*)]:border-spacing-0 [&_table:not([data-prose=off]_*)]:rounded-block [&_table:not([data-prose=off]_*)]:border [&_table:not([data-prose=off]_*)]:border-border",
|
|
133
|
+
tableRules: "[&_th:not([data-prose=off]_*)]:border-e [&_th:not([data-prose=off]_*)]:border-b [&_th:not([data-prose=off]_*)]:border-border [&_td:not([data-prose=off]_*)]:border-e [&_td:not([data-prose=off]_*)]:border-b [&_td:not([data-prose=off]_*)]:border-border [&_tr:not([data-prose=off]_*)>*:last-child]:border-e-0 [&_tbody:not([data-prose=off]_*)>tr:last-child>*]:border-b-0 [&_tr:not([data-prose=off]_*):first-child>*:first-child]:rounded-ss-block [&_tr:not([data-prose=off]_*):first-child>*:last-child]:rounded-se-block [&_tbody:not([data-prose=off]_*)>tr:last-child>*:first-child]:rounded-es-block [&_tbody:not([data-prose=off]_*)>tr:last-child>*:last-child]:rounded-ee-block",
|
|
134
134
|
tableCells: "[&_th:not([data-prose=off]_*)]:bg-muted/50 [&_th:not([data-prose=off]_*)]:px-3 [&_th:not([data-prose=off]_*)]:py-2 [&_th:not([data-prose=off]_*)]:text-start [&_th:not([data-prose=off]_*)]:align-top [&_th:not([data-prose=off]_*)]:font-medium [&_td:not([data-prose=off]_*)]:px-3 [&_td:not([data-prose=off]_*)]:py-2 [&_td:not([data-prose=off]_*)]:align-top [&_td_p:not([data-prose=off]_*)]:my-0 [&_th_p:not([data-prose=off]_*)]:my-0 [&_th:not([data-prose=off]_*)]:wrap-break-word [&_td:not([data-prose=off]_*)]:wrap-break-word",
|
|
135
|
-
img: "[&_img]:my-2 [&_img]:max-w-full [&_img]:rounded-
|
|
135
|
+
img: "[&_img]:my-2 [&_img]:max-w-full [&_img]:rounded-block [&_img]:border [&_img]:border-border"
|
|
136
136
|
};
|
|
137
137
|
var proseClassName = Object.values(prose).join(" ");
|
|
138
138
|
var proseDocument = {
|
|
@@ -191,7 +191,22 @@ var proseReading = {
|
|
|
191
191
|
};
|
|
192
192
|
|
|
193
193
|
// src/index.ts
|
|
194
|
-
var
|
|
194
|
+
var CORNER_ROLES = [
|
|
195
|
+
"control",
|
|
196
|
+
"icon",
|
|
197
|
+
"chip",
|
|
198
|
+
"inline",
|
|
199
|
+
"mark",
|
|
200
|
+
"item",
|
|
201
|
+
"block",
|
|
202
|
+
"card",
|
|
203
|
+
"bubble",
|
|
204
|
+
"overlay",
|
|
205
|
+
"tile"
|
|
206
|
+
];
|
|
207
|
+
var twMerge = (0, import_tailwind_merge.extendTailwindMerge)({
|
|
208
|
+
extend: { theme: { radius: [...CORNER_ROLES] } }
|
|
209
|
+
});
|
|
195
210
|
function cn(...inputs) {
|
|
196
211
|
return twMerge((0, import_clsx.clsx)(inputs));
|
|
197
212
|
}
|
package/dist/icons/index.cjs
CHANGED
|
@@ -99,7 +99,7 @@ var prose = {
|
|
|
99
99
|
em: "[&_em]:italic",
|
|
100
100
|
del: "[&_del]:line-through [&_s]:line-through",
|
|
101
101
|
// A highlight (`==text==`): its colour's subtle tag fill behind body ink, kept on paper too.
|
|
102
|
-
mark: "[&_mark]:rounded-
|
|
102
|
+
mark: "[&_mark]:rounded-mark [&_mark]:bg-tag-yellow-subtle [&_mark]:px-0.5 [&_mark]:text-inherit [&_mark]:box-decoration-clone [&_mark]:[print-color-adjust:exact] [&_mark[data-color=green]]:bg-tag-green-subtle [&_mark[data-color=blue]]:bg-tag-blue-subtle [&_mark[data-color=purple]]:bg-tag-purple-subtle [&_mark[data-color=pink]]:bg-tag-pink-subtle [&_mark[data-color=red]]:bg-tag-red-subtle",
|
|
103
103
|
// Lists. Items and markers are body text: family, size and ink inherit (a `::marker` takes the
|
|
104
104
|
// item's font), so `1.` and `•` never read as a second typeface or a second colour. One thing
|
|
105
105
|
// does NOT inherit: the user-agent stylesheet gives `::marker` `font-variant-numeric:
|
|
@@ -125,11 +125,11 @@ var prose = {
|
|
|
125
125
|
// is undone at higher specificity (`[&_pre_code]` is (0,1,2) against the chip's (0,1,1)).
|
|
126
126
|
// Slack/Notion: a neutral grey chip with orange text (the syntax palette's literal colour), so
|
|
127
127
|
// inline code reads apart from prose in both themes; `tag-orange-text` on `muted` clears AA.
|
|
128
|
-
code: "[&_code]:rounded-
|
|
128
|
+
code: "[&_code]:rounded-inline [&_code]:bg-muted [&_code]:px-1.5 [&_code]:py-0.5 [&_code]:font-mono [&_code]:text-sm [&_code]:text-tag-orange-text",
|
|
129
129
|
// A bare `<pre>` wears `CodeBlock`'s surface — the same sunken panel, one vocabulary (B4-09).
|
|
130
130
|
// `CodeBlock`'s own `pre` is excluded: it already sits inside a `figure` carrying the border,
|
|
131
131
|
// radius and ground, and re-applying them here would draw a second panel inside the first.
|
|
132
|
-
pre: "[&_pre:not([data-slot='code-block-pre'])]:my-2 [&_pre:not([data-slot='code-block-pre'])]:overflow-x-auto [&_pre:not([data-slot='code-block-pre'])]:rounded-
|
|
132
|
+
pre: "[&_pre:not([data-slot='code-block-pre'])]:my-2 [&_pre:not([data-slot='code-block-pre'])]:overflow-x-auto [&_pre:not([data-slot='code-block-pre'])]:rounded-block [&_pre:not([data-slot='code-block-pre'])]:border [&_pre:not([data-slot='code-block-pre'])]:border-border [&_pre:not([data-slot='code-block-pre'])]:bg-muted [&_pre:not([data-slot='code-block-pre'])]:p-4 [&_pre:not([data-slot='code-block-pre'])]:text-foreground",
|
|
133
133
|
preCode: "[&_pre_code]:bg-transparent [&_pre_code]:p-0 [&_pre_code]:font-mono [&_pre_code]:text-sm [&_pre_code]:text-foreground",
|
|
134
134
|
hr: "[&_hr]:my-4 [&_hr]:border-border",
|
|
135
135
|
// GFM tables, Notion's simple table: a rounded outer border, a rule between every cell, and a
|
|
@@ -143,10 +143,10 @@ var prose = {
|
|
|
143
143
|
// in its box rather than crushing to one character per line.
|
|
144
144
|
// A table a component draws inside prose (an embedded DataGrid in a live block) is its own:
|
|
145
145
|
// anything under `[data-prose="off"]` is left alone by every table rule here.
|
|
146
|
-
table: "[&_table:not([data-prose=off]_*)]:w-full [&_table:not([data-prose=off]_*)]:border-separate [&_table:not([data-prose=off]_*)]:border-spacing-0 [&_table:not([data-prose=off]_*)]:rounded-
|
|
147
|
-
tableRules: "[&_th:not([data-prose=off]_*)]:border-e [&_th:not([data-prose=off]_*)]:border-b [&_th:not([data-prose=off]_*)]:border-border [&_td:not([data-prose=off]_*)]:border-e [&_td:not([data-prose=off]_*)]:border-b [&_td:not([data-prose=off]_*)]:border-border [&_tr:not([data-prose=off]_*)>*:last-child]:border-e-0 [&_tbody:not([data-prose=off]_*)>tr:last-child>*]:border-b-0 [&_tr:not([data-prose=off]_*):first-child>*:first-child]:rounded-ss-
|
|
146
|
+
table: "[&_table:not([data-prose=off]_*)]:w-full [&_table:not([data-prose=off]_*)]:border-separate [&_table:not([data-prose=off]_*)]:border-spacing-0 [&_table:not([data-prose=off]_*)]:rounded-block [&_table:not([data-prose=off]_*)]:border [&_table:not([data-prose=off]_*)]:border-border",
|
|
147
|
+
tableRules: "[&_th:not([data-prose=off]_*)]:border-e [&_th:not([data-prose=off]_*)]:border-b [&_th:not([data-prose=off]_*)]:border-border [&_td:not([data-prose=off]_*)]:border-e [&_td:not([data-prose=off]_*)]:border-b [&_td:not([data-prose=off]_*)]:border-border [&_tr:not([data-prose=off]_*)>*:last-child]:border-e-0 [&_tbody:not([data-prose=off]_*)>tr:last-child>*]:border-b-0 [&_tr:not([data-prose=off]_*):first-child>*:first-child]:rounded-ss-block [&_tr:not([data-prose=off]_*):first-child>*:last-child]:rounded-se-block [&_tbody:not([data-prose=off]_*)>tr:last-child>*:first-child]:rounded-es-block [&_tbody:not([data-prose=off]_*)>tr:last-child>*:last-child]:rounded-ee-block",
|
|
148
148
|
tableCells: "[&_th:not([data-prose=off]_*)]:bg-muted/50 [&_th:not([data-prose=off]_*)]:px-3 [&_th:not([data-prose=off]_*)]:py-2 [&_th:not([data-prose=off]_*)]:text-start [&_th:not([data-prose=off]_*)]:align-top [&_th:not([data-prose=off]_*)]:font-medium [&_td:not([data-prose=off]_*)]:px-3 [&_td:not([data-prose=off]_*)]:py-2 [&_td:not([data-prose=off]_*)]:align-top [&_td_p:not([data-prose=off]_*)]:my-0 [&_th_p:not([data-prose=off]_*)]:my-0 [&_th:not([data-prose=off]_*)]:wrap-break-word [&_td:not([data-prose=off]_*)]:wrap-break-word",
|
|
149
|
-
img: "[&_img]:my-2 [&_img]:max-w-full [&_img]:rounded-
|
|
149
|
+
img: "[&_img]:my-2 [&_img]:max-w-full [&_img]:rounded-block [&_img]:border [&_img]:border-border"
|
|
150
150
|
};
|
|
151
151
|
var proseClassName = Object.values(prose).join(" ");
|
|
152
152
|
var proseDocument = {
|
|
@@ -205,7 +205,22 @@ var proseReading = {
|
|
|
205
205
|
};
|
|
206
206
|
|
|
207
207
|
// src/index.ts
|
|
208
|
-
var
|
|
208
|
+
var CORNER_ROLES = [
|
|
209
|
+
"control",
|
|
210
|
+
"icon",
|
|
211
|
+
"chip",
|
|
212
|
+
"inline",
|
|
213
|
+
"mark",
|
|
214
|
+
"item",
|
|
215
|
+
"block",
|
|
216
|
+
"card",
|
|
217
|
+
"bubble",
|
|
218
|
+
"overlay",
|
|
219
|
+
"tile"
|
|
220
|
+
];
|
|
221
|
+
var twMerge = (0, import_tailwind_merge.extendTailwindMerge)({
|
|
222
|
+
extend: { theme: { radius: [...CORNER_ROLES] } }
|
|
223
|
+
});
|
|
209
224
|
function cn(...inputs) {
|
|
210
225
|
return twMerge((0, import_clsx.clsx)(inputs));
|
|
211
226
|
}
|
package/dist/icons/index.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -78,7 +78,7 @@ var prose = {
|
|
|
78
78
|
em: "[&_em]:italic",
|
|
79
79
|
del: "[&_del]:line-through [&_s]:line-through",
|
|
80
80
|
// A highlight (`==text==`): its colour's subtle tag fill behind body ink, kept on paper too.
|
|
81
|
-
mark: "[&_mark]:rounded-
|
|
81
|
+
mark: "[&_mark]:rounded-mark [&_mark]:bg-tag-yellow-subtle [&_mark]:px-0.5 [&_mark]:text-inherit [&_mark]:box-decoration-clone [&_mark]:[print-color-adjust:exact] [&_mark[data-color=green]]:bg-tag-green-subtle [&_mark[data-color=blue]]:bg-tag-blue-subtle [&_mark[data-color=purple]]:bg-tag-purple-subtle [&_mark[data-color=pink]]:bg-tag-pink-subtle [&_mark[data-color=red]]:bg-tag-red-subtle",
|
|
82
82
|
// Lists. Items and markers are body text: family, size and ink inherit (a `::marker` takes the
|
|
83
83
|
// item's font), so `1.` and `•` never read as a second typeface or a second colour. One thing
|
|
84
84
|
// does NOT inherit: the user-agent stylesheet gives `::marker` `font-variant-numeric:
|
|
@@ -104,11 +104,11 @@ var prose = {
|
|
|
104
104
|
// is undone at higher specificity (`[&_pre_code]` is (0,1,2) against the chip's (0,1,1)).
|
|
105
105
|
// Slack/Notion: a neutral grey chip with orange text (the syntax palette's literal colour), so
|
|
106
106
|
// inline code reads apart from prose in both themes; `tag-orange-text` on `muted` clears AA.
|
|
107
|
-
code: "[&_code]:rounded-
|
|
107
|
+
code: "[&_code]:rounded-inline [&_code]:bg-muted [&_code]:px-1.5 [&_code]:py-0.5 [&_code]:font-mono [&_code]:text-sm [&_code]:text-tag-orange-text",
|
|
108
108
|
// A bare `<pre>` wears `CodeBlock`'s surface — the same sunken panel, one vocabulary (B4-09).
|
|
109
109
|
// `CodeBlock`'s own `pre` is excluded: it already sits inside a `figure` carrying the border,
|
|
110
110
|
// radius and ground, and re-applying them here would draw a second panel inside the first.
|
|
111
|
-
pre: "[&_pre:not([data-slot='code-block-pre'])]:my-2 [&_pre:not([data-slot='code-block-pre'])]:overflow-x-auto [&_pre:not([data-slot='code-block-pre'])]:rounded-
|
|
111
|
+
pre: "[&_pre:not([data-slot='code-block-pre'])]:my-2 [&_pre:not([data-slot='code-block-pre'])]:overflow-x-auto [&_pre:not([data-slot='code-block-pre'])]:rounded-block [&_pre:not([data-slot='code-block-pre'])]:border [&_pre:not([data-slot='code-block-pre'])]:border-border [&_pre:not([data-slot='code-block-pre'])]:bg-muted [&_pre:not([data-slot='code-block-pre'])]:p-4 [&_pre:not([data-slot='code-block-pre'])]:text-foreground",
|
|
112
112
|
preCode: "[&_pre_code]:bg-transparent [&_pre_code]:p-0 [&_pre_code]:font-mono [&_pre_code]:text-sm [&_pre_code]:text-foreground",
|
|
113
113
|
hr: "[&_hr]:my-4 [&_hr]:border-border",
|
|
114
114
|
// GFM tables, Notion's simple table: a rounded outer border, a rule between every cell, and a
|
|
@@ -122,10 +122,10 @@ var prose = {
|
|
|
122
122
|
// in its box rather than crushing to one character per line.
|
|
123
123
|
// A table a component draws inside prose (an embedded DataGrid in a live block) is its own:
|
|
124
124
|
// anything under `[data-prose="off"]` is left alone by every table rule here.
|
|
125
|
-
table: "[&_table:not([data-prose=off]_*)]:w-full [&_table:not([data-prose=off]_*)]:border-separate [&_table:not([data-prose=off]_*)]:border-spacing-0 [&_table:not([data-prose=off]_*)]:rounded-
|
|
126
|
-
tableRules: "[&_th:not([data-prose=off]_*)]:border-e [&_th:not([data-prose=off]_*)]:border-b [&_th:not([data-prose=off]_*)]:border-border [&_td:not([data-prose=off]_*)]:border-e [&_td:not([data-prose=off]_*)]:border-b [&_td:not([data-prose=off]_*)]:border-border [&_tr:not([data-prose=off]_*)>*:last-child]:border-e-0 [&_tbody:not([data-prose=off]_*)>tr:last-child>*]:border-b-0 [&_tr:not([data-prose=off]_*):first-child>*:first-child]:rounded-ss-
|
|
125
|
+
table: "[&_table:not([data-prose=off]_*)]:w-full [&_table:not([data-prose=off]_*)]:border-separate [&_table:not([data-prose=off]_*)]:border-spacing-0 [&_table:not([data-prose=off]_*)]:rounded-block [&_table:not([data-prose=off]_*)]:border [&_table:not([data-prose=off]_*)]:border-border",
|
|
126
|
+
tableRules: "[&_th:not([data-prose=off]_*)]:border-e [&_th:not([data-prose=off]_*)]:border-b [&_th:not([data-prose=off]_*)]:border-border [&_td:not([data-prose=off]_*)]:border-e [&_td:not([data-prose=off]_*)]:border-b [&_td:not([data-prose=off]_*)]:border-border [&_tr:not([data-prose=off]_*)>*:last-child]:border-e-0 [&_tbody:not([data-prose=off]_*)>tr:last-child>*]:border-b-0 [&_tr:not([data-prose=off]_*):first-child>*:first-child]:rounded-ss-block [&_tr:not([data-prose=off]_*):first-child>*:last-child]:rounded-se-block [&_tbody:not([data-prose=off]_*)>tr:last-child>*:first-child]:rounded-es-block [&_tbody:not([data-prose=off]_*)>tr:last-child>*:last-child]:rounded-ee-block",
|
|
127
127
|
tableCells: "[&_th:not([data-prose=off]_*)]:bg-muted/50 [&_th:not([data-prose=off]_*)]:px-3 [&_th:not([data-prose=off]_*)]:py-2 [&_th:not([data-prose=off]_*)]:text-start [&_th:not([data-prose=off]_*)]:align-top [&_th:not([data-prose=off]_*)]:font-medium [&_td:not([data-prose=off]_*)]:px-3 [&_td:not([data-prose=off]_*)]:py-2 [&_td:not([data-prose=off]_*)]:align-top [&_td_p:not([data-prose=off]_*)]:my-0 [&_th_p:not([data-prose=off]_*)]:my-0 [&_th:not([data-prose=off]_*)]:wrap-break-word [&_td:not([data-prose=off]_*)]:wrap-break-word",
|
|
128
|
-
img: "[&_img]:my-2 [&_img]:max-w-full [&_img]:rounded-
|
|
128
|
+
img: "[&_img]:my-2 [&_img]:max-w-full [&_img]:rounded-block [&_img]:border [&_img]:border-border"
|
|
129
129
|
};
|
|
130
130
|
var proseClassName = Object.values(prose).join(" ");
|
|
131
131
|
var proseDocument = {
|
|
@@ -184,7 +184,22 @@ var proseReading = {
|
|
|
184
184
|
};
|
|
185
185
|
|
|
186
186
|
// src/index.ts
|
|
187
|
-
var
|
|
187
|
+
var CORNER_ROLES = [
|
|
188
|
+
"control",
|
|
189
|
+
"icon",
|
|
190
|
+
"chip",
|
|
191
|
+
"inline",
|
|
192
|
+
"mark",
|
|
193
|
+
"item",
|
|
194
|
+
"block",
|
|
195
|
+
"card",
|
|
196
|
+
"bubble",
|
|
197
|
+
"overlay",
|
|
198
|
+
"tile"
|
|
199
|
+
];
|
|
200
|
+
var twMerge = (0, import_tailwind_merge.extendTailwindMerge)({
|
|
201
|
+
extend: { theme: { radius: [...CORNER_ROLES] } }
|
|
202
|
+
});
|
|
188
203
|
function cn(...inputs) {
|
|
189
204
|
return twMerge((0, import_clsx.clsx)(inputs));
|
|
190
205
|
}
|
package/dist/index.d.cts
CHANGED
|
@@ -72,20 +72,20 @@ declare const prose: {
|
|
|
72
72
|
readonly strong: "[&_strong]:font-semibold";
|
|
73
73
|
readonly em: "[&_em]:italic";
|
|
74
74
|
readonly del: "[&_del]:line-through [&_s]:line-through";
|
|
75
|
-
readonly mark: "[&_mark]:rounded-
|
|
75
|
+
readonly mark: "[&_mark]:rounded-mark [&_mark]:bg-tag-yellow-subtle [&_mark]:px-0.5 [&_mark]:text-inherit [&_mark]:box-decoration-clone [&_mark]:[print-color-adjust:exact] [&_mark[data-color=green]]:bg-tag-green-subtle [&_mark[data-color=blue]]:bg-tag-blue-subtle [&_mark[data-color=purple]]:bg-tag-purple-subtle [&_mark[data-color=pink]]:bg-tag-pink-subtle [&_mark[data-color=red]]:bg-tag-red-subtle";
|
|
76
76
|
readonly ul: "[&_ul]:my-2 [&_ul]:ms-5 [&_ul]:list-disc [&_ul.contains-task-list]:list-none";
|
|
77
77
|
readonly ol: "[&_ol]:my-2 [&_ol]:ms-5 [&_ol]:list-decimal";
|
|
78
78
|
readonly li: "[&_li]:mt-1 [&_li]:marker:normal-nums [&_li]:marker:text-inherit [&_li_p]:my-0";
|
|
79
79
|
readonly taskList: "[&_ul[data-type=taskList]]:ms-0 [&_ul[data-type=taskList]]:list-none [&_li[data-type=taskItem]]:mt-1.5 [&_li[data-type=taskItem]]:flex [&_li[data-type=taskItem]]:items-start [&_li[data-type=taskItem]]:gap-2 [&_li[data-type=taskItem]_[data-slot=checkbox]]:mt-0.5 [&_li[data-type=taskItem]_[data-slot=checkbox]]:me-0 [&_li[data-type=taskItem]_[data-slot=checkbox]]:after:-inset-y-1.25 [&_[data-slot=task-item-content]]:min-w-0 [&_[data-slot=task-item-content]]:flex-1";
|
|
80
80
|
readonly blockquote: "[&_blockquote]:my-2 [&_blockquote]:border-s-2 [&_blockquote]:border-border [&_blockquote]:ps-3";
|
|
81
|
-
readonly code: "[&_code]:rounded-
|
|
82
|
-
readonly pre: "[&_pre:not([data-slot='code-block-pre'])]:my-2 [&_pre:not([data-slot='code-block-pre'])]:overflow-x-auto [&_pre:not([data-slot='code-block-pre'])]:rounded-
|
|
81
|
+
readonly code: "[&_code]:rounded-inline [&_code]:bg-muted [&_code]:px-1.5 [&_code]:py-0.5 [&_code]:font-mono [&_code]:text-sm [&_code]:text-tag-orange-text";
|
|
82
|
+
readonly pre: "[&_pre:not([data-slot='code-block-pre'])]:my-2 [&_pre:not([data-slot='code-block-pre'])]:overflow-x-auto [&_pre:not([data-slot='code-block-pre'])]:rounded-block [&_pre:not([data-slot='code-block-pre'])]:border [&_pre:not([data-slot='code-block-pre'])]:border-border [&_pre:not([data-slot='code-block-pre'])]:bg-muted [&_pre:not([data-slot='code-block-pre'])]:p-4 [&_pre:not([data-slot='code-block-pre'])]:text-foreground";
|
|
83
83
|
readonly preCode: "[&_pre_code]:bg-transparent [&_pre_code]:p-0 [&_pre_code]:font-mono [&_pre_code]:text-sm [&_pre_code]:text-foreground";
|
|
84
84
|
readonly hr: "[&_hr]:my-4 [&_hr]:border-border";
|
|
85
|
-
readonly table: "[&_table:not([data-prose=off]_*)]:w-full [&_table:not([data-prose=off]_*)]:border-separate [&_table:not([data-prose=off]_*)]:border-spacing-0 [&_table:not([data-prose=off]_*)]:rounded-
|
|
86
|
-
readonly tableRules: "[&_th:not([data-prose=off]_*)]:border-e [&_th:not([data-prose=off]_*)]:border-b [&_th:not([data-prose=off]_*)]:border-border [&_td:not([data-prose=off]_*)]:border-e [&_td:not([data-prose=off]_*)]:border-b [&_td:not([data-prose=off]_*)]:border-border [&_tr:not([data-prose=off]_*)>*:last-child]:border-e-0 [&_tbody:not([data-prose=off]_*)>tr:last-child>*]:border-b-0 [&_tr:not([data-prose=off]_*):first-child>*:first-child]:rounded-ss-
|
|
85
|
+
readonly table: "[&_table:not([data-prose=off]_*)]:w-full [&_table:not([data-prose=off]_*)]:border-separate [&_table:not([data-prose=off]_*)]:border-spacing-0 [&_table:not([data-prose=off]_*)]:rounded-block [&_table:not([data-prose=off]_*)]:border [&_table:not([data-prose=off]_*)]:border-border";
|
|
86
|
+
readonly tableRules: "[&_th:not([data-prose=off]_*)]:border-e [&_th:not([data-prose=off]_*)]:border-b [&_th:not([data-prose=off]_*)]:border-border [&_td:not([data-prose=off]_*)]:border-e [&_td:not([data-prose=off]_*)]:border-b [&_td:not([data-prose=off]_*)]:border-border [&_tr:not([data-prose=off]_*)>*:last-child]:border-e-0 [&_tbody:not([data-prose=off]_*)>tr:last-child>*]:border-b-0 [&_tr:not([data-prose=off]_*):first-child>*:first-child]:rounded-ss-block [&_tr:not([data-prose=off]_*):first-child>*:last-child]:rounded-se-block [&_tbody:not([data-prose=off]_*)>tr:last-child>*:first-child]:rounded-es-block [&_tbody:not([data-prose=off]_*)>tr:last-child>*:last-child]:rounded-ee-block";
|
|
87
87
|
readonly tableCells: "[&_th:not([data-prose=off]_*)]:bg-muted/50 [&_th:not([data-prose=off]_*)]:px-3 [&_th:not([data-prose=off]_*)]:py-2 [&_th:not([data-prose=off]_*)]:text-start [&_th:not([data-prose=off]_*)]:align-top [&_th:not([data-prose=off]_*)]:font-medium [&_td:not([data-prose=off]_*)]:px-3 [&_td:not([data-prose=off]_*)]:py-2 [&_td:not([data-prose=off]_*)]:align-top [&_td_p:not([data-prose=off]_*)]:my-0 [&_th_p:not([data-prose=off]_*)]:my-0 [&_th:not([data-prose=off]_*)]:wrap-break-word [&_td:not([data-prose=off]_*)]:wrap-break-word";
|
|
88
|
-
readonly img: "[&_img]:my-2 [&_img]:max-w-full [&_img]:rounded-
|
|
88
|
+
readonly img: "[&_img]:my-2 [&_img]:max-w-full [&_img]:rounded-block [&_img]:border [&_img]:border-border";
|
|
89
89
|
};
|
|
90
90
|
/** The element roles the prose recipe covers. */
|
|
91
91
|
type ProseElement = keyof typeof prose;
|
package/dist/index.d.ts
CHANGED
|
@@ -72,20 +72,20 @@ declare const prose: {
|
|
|
72
72
|
readonly strong: "[&_strong]:font-semibold";
|
|
73
73
|
readonly em: "[&_em]:italic";
|
|
74
74
|
readonly del: "[&_del]:line-through [&_s]:line-through";
|
|
75
|
-
readonly mark: "[&_mark]:rounded-
|
|
75
|
+
readonly mark: "[&_mark]:rounded-mark [&_mark]:bg-tag-yellow-subtle [&_mark]:px-0.5 [&_mark]:text-inherit [&_mark]:box-decoration-clone [&_mark]:[print-color-adjust:exact] [&_mark[data-color=green]]:bg-tag-green-subtle [&_mark[data-color=blue]]:bg-tag-blue-subtle [&_mark[data-color=purple]]:bg-tag-purple-subtle [&_mark[data-color=pink]]:bg-tag-pink-subtle [&_mark[data-color=red]]:bg-tag-red-subtle";
|
|
76
76
|
readonly ul: "[&_ul]:my-2 [&_ul]:ms-5 [&_ul]:list-disc [&_ul.contains-task-list]:list-none";
|
|
77
77
|
readonly ol: "[&_ol]:my-2 [&_ol]:ms-5 [&_ol]:list-decimal";
|
|
78
78
|
readonly li: "[&_li]:mt-1 [&_li]:marker:normal-nums [&_li]:marker:text-inherit [&_li_p]:my-0";
|
|
79
79
|
readonly taskList: "[&_ul[data-type=taskList]]:ms-0 [&_ul[data-type=taskList]]:list-none [&_li[data-type=taskItem]]:mt-1.5 [&_li[data-type=taskItem]]:flex [&_li[data-type=taskItem]]:items-start [&_li[data-type=taskItem]]:gap-2 [&_li[data-type=taskItem]_[data-slot=checkbox]]:mt-0.5 [&_li[data-type=taskItem]_[data-slot=checkbox]]:me-0 [&_li[data-type=taskItem]_[data-slot=checkbox]]:after:-inset-y-1.25 [&_[data-slot=task-item-content]]:min-w-0 [&_[data-slot=task-item-content]]:flex-1";
|
|
80
80
|
readonly blockquote: "[&_blockquote]:my-2 [&_blockquote]:border-s-2 [&_blockquote]:border-border [&_blockquote]:ps-3";
|
|
81
|
-
readonly code: "[&_code]:rounded-
|
|
82
|
-
readonly pre: "[&_pre:not([data-slot='code-block-pre'])]:my-2 [&_pre:not([data-slot='code-block-pre'])]:overflow-x-auto [&_pre:not([data-slot='code-block-pre'])]:rounded-
|
|
81
|
+
readonly code: "[&_code]:rounded-inline [&_code]:bg-muted [&_code]:px-1.5 [&_code]:py-0.5 [&_code]:font-mono [&_code]:text-sm [&_code]:text-tag-orange-text";
|
|
82
|
+
readonly pre: "[&_pre:not([data-slot='code-block-pre'])]:my-2 [&_pre:not([data-slot='code-block-pre'])]:overflow-x-auto [&_pre:not([data-slot='code-block-pre'])]:rounded-block [&_pre:not([data-slot='code-block-pre'])]:border [&_pre:not([data-slot='code-block-pre'])]:border-border [&_pre:not([data-slot='code-block-pre'])]:bg-muted [&_pre:not([data-slot='code-block-pre'])]:p-4 [&_pre:not([data-slot='code-block-pre'])]:text-foreground";
|
|
83
83
|
readonly preCode: "[&_pre_code]:bg-transparent [&_pre_code]:p-0 [&_pre_code]:font-mono [&_pre_code]:text-sm [&_pre_code]:text-foreground";
|
|
84
84
|
readonly hr: "[&_hr]:my-4 [&_hr]:border-border";
|
|
85
|
-
readonly table: "[&_table:not([data-prose=off]_*)]:w-full [&_table:not([data-prose=off]_*)]:border-separate [&_table:not([data-prose=off]_*)]:border-spacing-0 [&_table:not([data-prose=off]_*)]:rounded-
|
|
86
|
-
readonly tableRules: "[&_th:not([data-prose=off]_*)]:border-e [&_th:not([data-prose=off]_*)]:border-b [&_th:not([data-prose=off]_*)]:border-border [&_td:not([data-prose=off]_*)]:border-e [&_td:not([data-prose=off]_*)]:border-b [&_td:not([data-prose=off]_*)]:border-border [&_tr:not([data-prose=off]_*)>*:last-child]:border-e-0 [&_tbody:not([data-prose=off]_*)>tr:last-child>*]:border-b-0 [&_tr:not([data-prose=off]_*):first-child>*:first-child]:rounded-ss-
|
|
85
|
+
readonly table: "[&_table:not([data-prose=off]_*)]:w-full [&_table:not([data-prose=off]_*)]:border-separate [&_table:not([data-prose=off]_*)]:border-spacing-0 [&_table:not([data-prose=off]_*)]:rounded-block [&_table:not([data-prose=off]_*)]:border [&_table:not([data-prose=off]_*)]:border-border";
|
|
86
|
+
readonly tableRules: "[&_th:not([data-prose=off]_*)]:border-e [&_th:not([data-prose=off]_*)]:border-b [&_th:not([data-prose=off]_*)]:border-border [&_td:not([data-prose=off]_*)]:border-e [&_td:not([data-prose=off]_*)]:border-b [&_td:not([data-prose=off]_*)]:border-border [&_tr:not([data-prose=off]_*)>*:last-child]:border-e-0 [&_tbody:not([data-prose=off]_*)>tr:last-child>*]:border-b-0 [&_tr:not([data-prose=off]_*):first-child>*:first-child]:rounded-ss-block [&_tr:not([data-prose=off]_*):first-child>*:last-child]:rounded-se-block [&_tbody:not([data-prose=off]_*)>tr:last-child>*:first-child]:rounded-es-block [&_tbody:not([data-prose=off]_*)>tr:last-child>*:last-child]:rounded-ee-block";
|
|
87
87
|
readonly tableCells: "[&_th:not([data-prose=off]_*)]:bg-muted/50 [&_th:not([data-prose=off]_*)]:px-3 [&_th:not([data-prose=off]_*)]:py-2 [&_th:not([data-prose=off]_*)]:text-start [&_th:not([data-prose=off]_*)]:align-top [&_th:not([data-prose=off]_*)]:font-medium [&_td:not([data-prose=off]_*)]:px-3 [&_td:not([data-prose=off]_*)]:py-2 [&_td:not([data-prose=off]_*)]:align-top [&_td_p:not([data-prose=off]_*)]:my-0 [&_th_p:not([data-prose=off]_*)]:my-0 [&_th:not([data-prose=off]_*)]:wrap-break-word [&_td:not([data-prose=off]_*)]:wrap-break-word";
|
|
88
|
-
readonly img: "[&_img]:my-2 [&_img]:max-w-full [&_img]:rounded-
|
|
88
|
+
readonly img: "[&_img]:my-2 [&_img]:max-w-full [&_img]:rounded-block [&_img]:border [&_img]:border-border";
|
|
89
89
|
};
|
|
90
90
|
/** The element roles the prose recipe covers. */
|
|
91
91
|
type ProseElement = keyof typeof prose;
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vegastack/design",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0",
|
|
4
4
|
"description": "VegaStack design system — cn utility, icon runtime, Tailwind v4 preset, and the vegastack-design CLI (tokens ship separately as @vegastack/design-tokens)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"test": "node test/compare.test.mjs && node test/check-updates.test.mjs && node test/skills-install.test.mjs && node test/doctor.test.mjs && node --test test/merge-refs.test.mjs test/registry-credentials.test.mjs test/registry-fetch.test.mjs"
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
|
-
"@vegastack/design-tokens": "^0.
|
|
73
|
+
"@vegastack/design-tokens": "^0.18.0",
|
|
74
74
|
"clsx": "^2.1.1",
|
|
75
75
|
"tailwind-merge": "^3.6.0",
|
|
76
76
|
"tsconfig-paths": "^4.2.0",
|
|
@@ -62,8 +62,14 @@ rg -n 'style=\{\{' --glob '!components/ui/**'
|
|
|
62
62
|
- **raw palette** — a Tailwind palette class. Use `bg-primary`, `text-muted-foreground`,
|
|
63
63
|
`border-border`, or a status family. **error**
|
|
64
64
|
- **hardcoded dimension** — an arbitrary px/rem value where a stock utility says the same thing
|
|
65
|
-
(`h-[32px]` for `h-8
|
|
65
|
+
(`h-[32px]` for `h-8`). An arbitrary value that no utility
|
|
66
66
|
expresses is not a finding; upstream writes several itself. **warning**
|
|
67
|
+
- **off-role corner** — a corner that is not a role (BRD-12): `rounded-sm|md|lg|xl|2xl|3xl|4xl`,
|
|
68
|
+
bare `rounded`, `rounded-[…]`, `rounded-(--…)` or the retired `rounded-chat-card`. Name the role
|
|
69
|
+
the element plays: `rounded-control` (single-line control), `-icon` (icon-only button), `-chip`,
|
|
70
|
+
`-inline` (token in text), `-mark`, `-item` (row with a fill, tooltip), `-block`, `-card`,
|
|
71
|
+
`-bubble`, `-overlay`, `-tile` (square media); `row-fill` on a table row. A square hover fill on
|
|
72
|
+
an inset row is the same finding. **error**
|
|
67
73
|
- **inline style** — allowed only when every key is a `--*` custom property. Any direct visual
|
|
68
74
|
property is a finding. **error**
|
|
69
75
|
|
|
@@ -91,7 +97,7 @@ rg -n '(focus|focus-visible|focus-within|data-focused|popup-open)[^ "]*:border-(
|
|
|
91
97
|
- a raw `<svg>` used as an icon — use lucide or `Icon`/`BrandIcon`. **error**
|
|
92
98
|
- `React.forwardRef` — React 19 takes `ref` as a normal prop. **error**
|
|
93
99
|
|
|
94
|
-
**Things that are NOT findings any more**, and reporting them is noise: `
|
|
100
|
+
**Things that are NOT findings any more**, and reporting them is noise: `shadow-md`,
|
|
95
101
|
`text-4xl`, `font-semibold`, `transition-all`, `transition-colors`, `duration-100`, `ease-in-out`,
|
|
96
102
|
`z-50`, `opacity-50`, a raw `/NN` alpha, `h-8`/`size-4`, `cursor-default` on a menu row, an
|
|
97
103
|
arbitrary `h-[18.4px]`, and a `hover:` with no `active:` beside it. Every one of those is upstream's
|
|
@@ -97,7 +97,7 @@ overflow="menu"`) left; the search, then the tools — Filter (n), Sort (`SortMe
|
|
|
97
97
|
(List | Board | Grid icons), Display (`DisplayMenu`: row height, columns, group) and ⋯ — right;
|
|
98
98
|
it measures itself and folds tools into Display and ⋯ when tight. The Filter tool opens a
|
|
99
99
|
`FilterRow`: `+ Filter` (`AddFilterMenu`), the pinned `ListFacet` / `PeopleFacet` /
|
|
100
|
-
`DateRangeFilter` chips (compact
|
|
100
|
+
`DateRangeFilter` chips (compact pills, dashed while unset, tinted when set), the other
|
|
101
101
|
chips, Clear; people facets take `itemToSecondaryLabel={(p) => p.email}`. Tables are `DataList` with `sortable` columns (`compare`, `sortFirst`,
|
|
102
102
|
`sortMode="client"`) and `rowActions` (the ⋯ column, always last); row links are never underlined.
|
|
103
103
|
- **`alert`** for an in-content notice — `variant` is `default · destructive · success · warning ·
|
|
@@ -250,7 +250,7 @@ on shadcn's `neutral` base. Always use the utility, never a raw value.
|
|
|
250
250
|
| Text | `text-foreground` · `text-muted-foreground` · `text-{primary,secondary,accent,card,popover}-foreground` |
|
|
251
251
|
| Status | `bg-{destructive,success,warning,info}` · `-foreground` (ink ON the fill) · `-text` (ink on the page or on the family's own tint) |
|
|
252
252
|
| Border | `border-border` · `border-input` — there are no rings; focus is a global background tint (Tabs included) |
|
|
253
|
-
| Radius | `rounded-{
|
|
253
|
+
| Radius | a role, never a size: `rounded-{control,icon,chip,inline,mark,item,block,card,bubble,overlay,tile}` · `row-fill` on table rows (BRD-12) |
|
|
254
254
|
| Type | Tailwind's own `text-{xs…7xl}`. `text-sm` is 14px, `text-base` is 16px. Line-height and letter-spacing above `text-base` come from the theme — never write `tracking-*`, an arbitrary `text-[13px]`, or `uppercase` |
|
|
255
255
|
| Font | `font-sans` `font-mono` `font-serif` `font-heading` |
|
|
256
256
|
| Motion | `duration-{fast,base,slow}` · `ease-{standard,emphasized,exit,spring}` — or Tailwind's own steps |
|
|
@@ -264,7 +264,7 @@ opaque `hover:bg-muted`/`hover:bg-accent` (lint rejects it):
|
|
|
264
264
|
|
|
265
265
|
```tsx
|
|
266
266
|
// Any clickable surface — a row, a chip, a ghost control: hover AND press from one utility.
|
|
267
|
-
<button className="rounded-
|
|
267
|
+
<button className="rounded-item px-2 state-layer" />;
|
|
268
268
|
|
|
269
269
|
// Selected / current / open: the selected step (weight 500 on a current row). Over a filled
|
|
270
270
|
// part (a card, an outline button) use the layer form so the fill survives.
|
|
@@ -272,7 +272,7 @@ opaque `hover:bg-muted`/`hover:bg-accent` (lint rejects it):
|
|
|
272
272
|
<div className="bg-card state-layer data-selected:layer-selected" />;
|
|
273
273
|
|
|
274
274
|
// A tile inside a row: translucent, so it stays one step above the row in every state.
|
|
275
|
-
<span className="size-7 rounded-
|
|
275
|
+
<span className="size-7 rounded-tile bg-state-tile" />;
|
|
276
276
|
|
|
277
277
|
// A solid steps its own fill; a status tint keeps its `-text` ink.
|
|
278
278
|
<button className="bg-primary text-primary-foreground hover:bg-primary/80 active:bg-primary/70" />;
|
|
@@ -416,8 +416,13 @@ contract.
|
|
|
416
416
|
right-align a numeric column. `font-mono` is for code and identifiers (`SYS-1042`) only.
|
|
417
417
|
- Title a page with `PageHeader` (`font-heading text-2xl font-semibold`); a section heading is
|
|
418
418
|
`font-heading text-base font-medium`, a group label `text-xs font-medium text-muted-foreground`.
|
|
419
|
-
-
|
|
420
|
-
`
|
|
419
|
+
- Give every corner its ROLE, never a size (BRD-12): `rounded-control` for a single-line control,
|
|
420
|
+
`rounded-icon` for an icon-only button, `rounded-chip`, `rounded-inline` for a token inside text,
|
|
421
|
+
`rounded-mark`, `rounded-item` for a row with a fill or a tooltip, `rounded-block`,
|
|
422
|
+
`rounded-card`, `rounded-bubble`, `rounded-overlay`, `rounded-tile` for square media; `row-fill`
|
|
423
|
+
on a table row. Never `rounded-sm|md|lg|xl…`, bare `rounded` or `rounded-[…]`.
|
|
424
|
+
- Reach for a plain Tailwind utility for size, shadow, z-index, alpha, weight and motion:
|
|
425
|
+
`h-8`, `size-4`, `shadow-md`, `z-50`, `bg-foreground/10`, `opacity-50`,
|
|
421
426
|
`font-semibold`, `transition-colors duration-100 ease-in-out` are all on-system now.
|
|
422
427
|
|
|
423
428
|
**Don't**
|