@vegastack/design 0.12.3 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-FTYGS5BK.js → chunk-BH6QPBFT.js} +31 -0
- package/dist/create-animated-icon.cjs +29 -0
- package/dist/create-animated-icon.js +1 -1
- package/dist/icons/index.cjs +29 -0
- package/dist/icons/index.js +1 -1
- package/dist/index.cjs +35 -2
- package/dist/index.d.cts +46 -1
- package/dist/index.d.ts +46 -1
- package/dist/index.js +7 -3
- package/package.json +1 -1
- package/skills/vegastack-design-system/SKILL.md +8 -0
- package/skills/vegastack-design-system/references/components.md +5 -1
|
@@ -124,6 +124,31 @@ var proseDocument = {
|
|
|
124
124
|
// a 24px row, 44px on a coarse pointer.
|
|
125
125
|
blocks: "[&_[data-slot=callout]]:my-4 [&_[data-slot=code-block]]:my-4 [&_details]:my-4 [&_video]:my-4 [&_audio]:my-4 [&_summary]:min-h-6 pointer-coarse:[&_summary]:min-h-11"
|
|
126
126
|
};
|
|
127
|
+
var proseReading = {
|
|
128
|
+
/** Body: 14/24 on a fine pointer, 16/26 on a coarse pointer or below the `sm` width. */
|
|
129
|
+
root: "text-sm/6 pointer-coarse:text-base/6.5 max-sm:text-base/6.5",
|
|
130
|
+
// Headings: the compact steps with more room above than below. On 16px body text `###` steps up
|
|
131
|
+
// to 16 with it, so a heading never reads smaller than the text under it.
|
|
132
|
+
h1: "[&_h1]:mt-6 [&_h1]:mb-2",
|
|
133
|
+
h2: "[&_h2]:mt-5 [&_h2]:mb-2",
|
|
134
|
+
h3: "[&_h3]:mt-4 [&_h3]:mb-1.5 pointer-coarse:[&_h3]:text-base max-sm:[&_h3]:text-base",
|
|
135
|
+
h4: "[&_h4]:mt-4 [&_h4]:mb-1 [&_h4]:font-semibold pointer-coarse:[&_h4]:text-base max-sm:[&_h4]:text-base",
|
|
136
|
+
// A 12px gap between paragraphs; none before the first or after the last.
|
|
137
|
+
p: "[&_p]:my-3",
|
|
138
|
+
// Lists 12 from their neighbours, items 4 apart, a nested list 4 below its item's text.
|
|
139
|
+
ul: "[&_ul]:my-3",
|
|
140
|
+
ol: "[&_ol]:my-3",
|
|
141
|
+
li: "[&_li_ul]:mt-1 [&_li_ul]:mb-0 [&_li_ol]:mt-1 [&_li_ol]:mb-0",
|
|
142
|
+
blockquote: "[&_blockquote]:my-3",
|
|
143
|
+
// Inline code at the body's size on a coarse pointer too (on a fine pointer both are 14).
|
|
144
|
+
code: "pointer-coarse:[&_code]:text-base max-sm:[&_code]:text-base",
|
|
145
|
+
pre: "[&_pre:not([data-slot='code-block-pre'])]:my-3",
|
|
146
|
+
hr: "[&_hr]:my-5",
|
|
147
|
+
// Tables: the body's size, 12 from their neighbours; the header tint and cell padding are the
|
|
148
|
+
// base recipe's (`bg-muted/50`, 12 × 8).
|
|
149
|
+
table: "[&_[data-slot=markdown-table]]:my-3",
|
|
150
|
+
blocks: "[&_[data-slot=callout]]:my-3 [&_[data-slot=code-block]]:my-3 [&_details]:my-3"
|
|
151
|
+
};
|
|
127
152
|
|
|
128
153
|
// src/index.ts
|
|
129
154
|
var twMerge = tailwindMerge;
|
|
@@ -169,6 +194,10 @@ var proseDocumentClassName = cn(
|
|
|
169
194
|
proseClassName,
|
|
170
195
|
Object.values(proseDocument).join(" ")
|
|
171
196
|
);
|
|
197
|
+
var proseReadingClassName = cn(
|
|
198
|
+
proseClassName,
|
|
199
|
+
Object.values(proseReading).join(" ")
|
|
200
|
+
);
|
|
172
201
|
function mergeRefs(...refs) {
|
|
173
202
|
return (node) => {
|
|
174
203
|
const cleanups = refs.map((ref) => {
|
|
@@ -204,9 +233,11 @@ export {
|
|
|
204
233
|
prose,
|
|
205
234
|
proseClassName,
|
|
206
235
|
proseDocument,
|
|
236
|
+
proseReading,
|
|
207
237
|
cn,
|
|
208
238
|
TIMINGS,
|
|
209
239
|
FLOATING,
|
|
210
240
|
proseDocumentClassName,
|
|
241
|
+
proseReadingClassName,
|
|
211
242
|
mergeRefs
|
|
212
243
|
};
|
|
@@ -164,6 +164,31 @@ var proseDocument = {
|
|
|
164
164
|
// a 24px row, 44px on a coarse pointer.
|
|
165
165
|
blocks: "[&_[data-slot=callout]]:my-4 [&_[data-slot=code-block]]:my-4 [&_details]:my-4 [&_video]:my-4 [&_audio]:my-4 [&_summary]:min-h-6 pointer-coarse:[&_summary]:min-h-11"
|
|
166
166
|
};
|
|
167
|
+
var proseReading = {
|
|
168
|
+
/** Body: 14/24 on a fine pointer, 16/26 on a coarse pointer or below the `sm` width. */
|
|
169
|
+
root: "text-sm/6 pointer-coarse:text-base/6.5 max-sm:text-base/6.5",
|
|
170
|
+
// Headings: the compact steps with more room above than below. On 16px body text `###` steps up
|
|
171
|
+
// to 16 with it, so a heading never reads smaller than the text under it.
|
|
172
|
+
h1: "[&_h1]:mt-6 [&_h1]:mb-2",
|
|
173
|
+
h2: "[&_h2]:mt-5 [&_h2]:mb-2",
|
|
174
|
+
h3: "[&_h3]:mt-4 [&_h3]:mb-1.5 pointer-coarse:[&_h3]:text-base max-sm:[&_h3]:text-base",
|
|
175
|
+
h4: "[&_h4]:mt-4 [&_h4]:mb-1 [&_h4]:font-semibold pointer-coarse:[&_h4]:text-base max-sm:[&_h4]:text-base",
|
|
176
|
+
// A 12px gap between paragraphs; none before the first or after the last.
|
|
177
|
+
p: "[&_p]:my-3",
|
|
178
|
+
// Lists 12 from their neighbours, items 4 apart, a nested list 4 below its item's text.
|
|
179
|
+
ul: "[&_ul]:my-3",
|
|
180
|
+
ol: "[&_ol]:my-3",
|
|
181
|
+
li: "[&_li_ul]:mt-1 [&_li_ul]:mb-0 [&_li_ol]:mt-1 [&_li_ol]:mb-0",
|
|
182
|
+
blockquote: "[&_blockquote]:my-3",
|
|
183
|
+
// Inline code at the body's size on a coarse pointer too (on a fine pointer both are 14).
|
|
184
|
+
code: "pointer-coarse:[&_code]:text-base max-sm:[&_code]:text-base",
|
|
185
|
+
pre: "[&_pre:not([data-slot='code-block-pre'])]:my-3",
|
|
186
|
+
hr: "[&_hr]:my-5",
|
|
187
|
+
// Tables: the body's size, 12 from their neighbours; the header tint and cell padding are the
|
|
188
|
+
// base recipe's (`bg-muted/50`, 12 × 8).
|
|
189
|
+
table: "[&_[data-slot=markdown-table]]:my-3",
|
|
190
|
+
blocks: "[&_[data-slot=callout]]:my-3 [&_[data-slot=code-block]]:my-3 [&_details]:my-3"
|
|
191
|
+
};
|
|
167
192
|
|
|
168
193
|
// src/index.ts
|
|
169
194
|
var twMerge = import_tailwind_merge.twMerge;
|
|
@@ -174,6 +199,10 @@ var proseDocumentClassName = cn(
|
|
|
174
199
|
proseClassName,
|
|
175
200
|
Object.values(proseDocument).join(" ")
|
|
176
201
|
);
|
|
202
|
+
var proseReadingClassName = cn(
|
|
203
|
+
proseClassName,
|
|
204
|
+
Object.values(proseReading).join(" ")
|
|
205
|
+
);
|
|
177
206
|
|
|
178
207
|
// src/icons/create-animated-icon.tsx
|
|
179
208
|
var import_jsx_runtime = require("react/jsx-runtime");
|
package/dist/icons/index.cjs
CHANGED
|
@@ -178,6 +178,31 @@ var proseDocument = {
|
|
|
178
178
|
// a 24px row, 44px on a coarse pointer.
|
|
179
179
|
blocks: "[&_[data-slot=callout]]:my-4 [&_[data-slot=code-block]]:my-4 [&_details]:my-4 [&_video]:my-4 [&_audio]:my-4 [&_summary]:min-h-6 pointer-coarse:[&_summary]:min-h-11"
|
|
180
180
|
};
|
|
181
|
+
var proseReading = {
|
|
182
|
+
/** Body: 14/24 on a fine pointer, 16/26 on a coarse pointer or below the `sm` width. */
|
|
183
|
+
root: "text-sm/6 pointer-coarse:text-base/6.5 max-sm:text-base/6.5",
|
|
184
|
+
// Headings: the compact steps with more room above than below. On 16px body text `###` steps up
|
|
185
|
+
// to 16 with it, so a heading never reads smaller than the text under it.
|
|
186
|
+
h1: "[&_h1]:mt-6 [&_h1]:mb-2",
|
|
187
|
+
h2: "[&_h2]:mt-5 [&_h2]:mb-2",
|
|
188
|
+
h3: "[&_h3]:mt-4 [&_h3]:mb-1.5 pointer-coarse:[&_h3]:text-base max-sm:[&_h3]:text-base",
|
|
189
|
+
h4: "[&_h4]:mt-4 [&_h4]:mb-1 [&_h4]:font-semibold pointer-coarse:[&_h4]:text-base max-sm:[&_h4]:text-base",
|
|
190
|
+
// A 12px gap between paragraphs; none before the first or after the last.
|
|
191
|
+
p: "[&_p]:my-3",
|
|
192
|
+
// Lists 12 from their neighbours, items 4 apart, a nested list 4 below its item's text.
|
|
193
|
+
ul: "[&_ul]:my-3",
|
|
194
|
+
ol: "[&_ol]:my-3",
|
|
195
|
+
li: "[&_li_ul]:mt-1 [&_li_ul]:mb-0 [&_li_ol]:mt-1 [&_li_ol]:mb-0",
|
|
196
|
+
blockquote: "[&_blockquote]:my-3",
|
|
197
|
+
// Inline code at the body's size on a coarse pointer too (on a fine pointer both are 14).
|
|
198
|
+
code: "pointer-coarse:[&_code]:text-base max-sm:[&_code]:text-base",
|
|
199
|
+
pre: "[&_pre:not([data-slot='code-block-pre'])]:my-3",
|
|
200
|
+
hr: "[&_hr]:my-5",
|
|
201
|
+
// Tables: the body's size, 12 from their neighbours; the header tint and cell padding are the
|
|
202
|
+
// base recipe's (`bg-muted/50`, 12 × 8).
|
|
203
|
+
table: "[&_[data-slot=markdown-table]]:my-3",
|
|
204
|
+
blocks: "[&_[data-slot=callout]]:my-3 [&_[data-slot=code-block]]:my-3 [&_details]:my-3"
|
|
205
|
+
};
|
|
181
206
|
|
|
182
207
|
// src/index.ts
|
|
183
208
|
var twMerge = import_tailwind_merge.twMerge;
|
|
@@ -188,6 +213,10 @@ var proseDocumentClassName = cn(
|
|
|
188
213
|
proseClassName,
|
|
189
214
|
Object.values(proseDocument).join(" ")
|
|
190
215
|
);
|
|
216
|
+
var proseReadingClassName = cn(
|
|
217
|
+
proseClassName,
|
|
218
|
+
Object.values(proseReading).join(" ")
|
|
219
|
+
);
|
|
191
220
|
|
|
192
221
|
// src/icons/brand-icon.tsx
|
|
193
222
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
package/dist/icons/index.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -27,7 +27,9 @@ __export(src_exports, {
|
|
|
27
27
|
prose: () => prose,
|
|
28
28
|
proseClassName: () => proseClassName,
|
|
29
29
|
proseDocument: () => proseDocument,
|
|
30
|
-
proseDocumentClassName: () => proseDocumentClassName
|
|
30
|
+
proseDocumentClassName: () => proseDocumentClassName,
|
|
31
|
+
proseReading: () => proseReading,
|
|
32
|
+
proseReadingClassName: () => proseReadingClassName
|
|
31
33
|
});
|
|
32
34
|
module.exports = __toCommonJS(src_exports);
|
|
33
35
|
var import_clsx = require("clsx");
|
|
@@ -155,6 +157,31 @@ var proseDocument = {
|
|
|
155
157
|
// a 24px row, 44px on a coarse pointer.
|
|
156
158
|
blocks: "[&_[data-slot=callout]]:my-4 [&_[data-slot=code-block]]:my-4 [&_details]:my-4 [&_video]:my-4 [&_audio]:my-4 [&_summary]:min-h-6 pointer-coarse:[&_summary]:min-h-11"
|
|
157
159
|
};
|
|
160
|
+
var proseReading = {
|
|
161
|
+
/** Body: 14/24 on a fine pointer, 16/26 on a coarse pointer or below the `sm` width. */
|
|
162
|
+
root: "text-sm/6 pointer-coarse:text-base/6.5 max-sm:text-base/6.5",
|
|
163
|
+
// Headings: the compact steps with more room above than below. On 16px body text `###` steps up
|
|
164
|
+
// to 16 with it, so a heading never reads smaller than the text under it.
|
|
165
|
+
h1: "[&_h1]:mt-6 [&_h1]:mb-2",
|
|
166
|
+
h2: "[&_h2]:mt-5 [&_h2]:mb-2",
|
|
167
|
+
h3: "[&_h3]:mt-4 [&_h3]:mb-1.5 pointer-coarse:[&_h3]:text-base max-sm:[&_h3]:text-base",
|
|
168
|
+
h4: "[&_h4]:mt-4 [&_h4]:mb-1 [&_h4]:font-semibold pointer-coarse:[&_h4]:text-base max-sm:[&_h4]:text-base",
|
|
169
|
+
// A 12px gap between paragraphs; none before the first or after the last.
|
|
170
|
+
p: "[&_p]:my-3",
|
|
171
|
+
// Lists 12 from their neighbours, items 4 apart, a nested list 4 below its item's text.
|
|
172
|
+
ul: "[&_ul]:my-3",
|
|
173
|
+
ol: "[&_ol]:my-3",
|
|
174
|
+
li: "[&_li_ul]:mt-1 [&_li_ul]:mb-0 [&_li_ol]:mt-1 [&_li_ol]:mb-0",
|
|
175
|
+
blockquote: "[&_blockquote]:my-3",
|
|
176
|
+
// Inline code at the body's size on a coarse pointer too (on a fine pointer both are 14).
|
|
177
|
+
code: "pointer-coarse:[&_code]:text-base max-sm:[&_code]:text-base",
|
|
178
|
+
pre: "[&_pre:not([data-slot='code-block-pre'])]:my-3",
|
|
179
|
+
hr: "[&_hr]:my-5",
|
|
180
|
+
// Tables: the body's size, 12 from their neighbours; the header tint and cell padding are the
|
|
181
|
+
// base recipe's (`bg-muted/50`, 12 × 8).
|
|
182
|
+
table: "[&_[data-slot=markdown-table]]:my-3",
|
|
183
|
+
blocks: "[&_[data-slot=callout]]:my-3 [&_[data-slot=code-block]]:my-3 [&_details]:my-3"
|
|
184
|
+
};
|
|
158
185
|
|
|
159
186
|
// src/index.ts
|
|
160
187
|
var twMerge = import_tailwind_merge.twMerge;
|
|
@@ -200,6 +227,10 @@ var proseDocumentClassName = cn(
|
|
|
200
227
|
proseClassName,
|
|
201
228
|
Object.values(proseDocument).join(" ")
|
|
202
229
|
);
|
|
230
|
+
var proseReadingClassName = cn(
|
|
231
|
+
proseClassName,
|
|
232
|
+
Object.values(proseReading).join(" ")
|
|
233
|
+
);
|
|
203
234
|
function mergeRefs(...refs) {
|
|
204
235
|
return (node) => {
|
|
205
236
|
const cleanups = refs.map((ref) => {
|
|
@@ -239,5 +270,7 @@ function mergeRefs(...refs) {
|
|
|
239
270
|
prose,
|
|
240
271
|
proseClassName,
|
|
241
272
|
proseDocument,
|
|
242
|
-
proseDocumentClassName
|
|
273
|
+
proseDocumentClassName,
|
|
274
|
+
proseReading,
|
|
275
|
+
proseReadingClassName
|
|
243
276
|
});
|
package/dist/index.d.cts
CHANGED
|
@@ -136,6 +136,42 @@ declare const proseDocument: {
|
|
|
136
136
|
};
|
|
137
137
|
/** The element roles the document overlay covers. */
|
|
138
138
|
type ProseDocumentElement = keyof typeof proseDocument;
|
|
139
|
+
/**
|
|
140
|
+
* THE reading type scale — `typeScale="reading"` on `MarkdownView` (TYP-20's reading overlay, MK
|
|
141
|
+
* 2026-11-10, "Agent chat, ground up"). Long-form text an agent or an AI wrote, read in a column
|
|
142
|
+
* beside the work: a chat answer, an Ask AI answer, a generated summary. The body is the document
|
|
143
|
+
* body (14/24 on a fine pointer, 16/26 on a coarse pointer or a narrow window) so every long read
|
|
144
|
+
* in the product shares one rhythm, while headings stay on the app's compact steps (`#` 18 · `##` 16
|
|
145
|
+
* · `###` body size, semibold) because an answer is not a page. Paragraphs and lists sit 12 apart,
|
|
146
|
+
* list items 4, and quotes, tables and inline code read at the body's size.
|
|
147
|
+
*
|
|
148
|
+
* Like `proseDocument` it is an OVERLAY on `prose`: compose it after the base recipe through `cn`,
|
|
149
|
+
* or use `proseReadingClassName`, which is that composition done once. A person's message beside an
|
|
150
|
+
* answer reads at the same metrics through `proseReading.root` (`MessageBubble`).
|
|
151
|
+
*
|
|
152
|
+
* @example
|
|
153
|
+
* <div className={proseReadingClassName}>…</div>
|
|
154
|
+
*/
|
|
155
|
+
declare const proseReading: {
|
|
156
|
+
/** Body: 14/24 on a fine pointer, 16/26 on a coarse pointer or below the `sm` width. */
|
|
157
|
+
readonly root: "text-sm/6 pointer-coarse:text-base/6.5 max-sm:text-base/6.5";
|
|
158
|
+
readonly h1: "[&_h1]:mt-6 [&_h1]:mb-2";
|
|
159
|
+
readonly h2: "[&_h2]:mt-5 [&_h2]:mb-2";
|
|
160
|
+
readonly h3: "[&_h3]:mt-4 [&_h3]:mb-1.5 pointer-coarse:[&_h3]:text-base max-sm:[&_h3]:text-base";
|
|
161
|
+
readonly h4: "[&_h4]:mt-4 [&_h4]:mb-1 [&_h4]:font-semibold pointer-coarse:[&_h4]:text-base max-sm:[&_h4]:text-base";
|
|
162
|
+
readonly p: "[&_p]:my-3";
|
|
163
|
+
readonly ul: "[&_ul]:my-3";
|
|
164
|
+
readonly ol: "[&_ol]:my-3";
|
|
165
|
+
readonly li: "[&_li_ul]:mt-1 [&_li_ul]:mb-0 [&_li_ol]:mt-1 [&_li_ol]:mb-0";
|
|
166
|
+
readonly blockquote: "[&_blockquote]:my-3";
|
|
167
|
+
readonly code: "pointer-coarse:[&_code]:text-base max-sm:[&_code]:text-base";
|
|
168
|
+
readonly pre: "[&_pre:not([data-slot='code-block-pre'])]:my-3";
|
|
169
|
+
readonly hr: "[&_hr]:my-5";
|
|
170
|
+
readonly table: "[&_[data-slot=markdown-table]]:my-3";
|
|
171
|
+
readonly blocks: "[&_[data-slot=callout]]:my-3 [&_[data-slot=code-block]]:my-3 [&_details]:my-3";
|
|
172
|
+
};
|
|
173
|
+
/** The element roles the reading overlay covers. */
|
|
174
|
+
type ProseReadingElement = keyof typeof proseReading;
|
|
139
175
|
|
|
140
176
|
/**
|
|
141
177
|
* Merges Tailwind CSS class names with intelligent conflict resolution.
|
|
@@ -230,6 +266,15 @@ declare const FLOATING: {
|
|
|
230
266
|
* <article className={proseDocumentClassName}>…</article>
|
|
231
267
|
*/
|
|
232
268
|
declare const proseDocumentClassName: string;
|
|
269
|
+
/**
|
|
270
|
+
* The reading type scale as one class string: the base `prose` recipe with the `proseReading`
|
|
271
|
+
* overlay merged over it — what `MarkdownView` wears with `typeScale="reading"` (a chat answer, an
|
|
272
|
+
* Ask AI answer, a generated summary). Merged once here, through `cn`.
|
|
273
|
+
*
|
|
274
|
+
* @example
|
|
275
|
+
* <div className={proseReadingClassName}>…</div>
|
|
276
|
+
*/
|
|
277
|
+
declare const proseReadingClassName: string;
|
|
233
278
|
/**
|
|
234
279
|
* Fan one DOM node out to several refs — a forwarded `ref` prop plus one or more internal
|
|
235
280
|
* refs — as a single ref callback. Skips `null`/`undefined` entries, so an optional
|
|
@@ -260,4 +305,4 @@ declare const proseDocumentClassName: string;
|
|
|
260
305
|
*/
|
|
261
306
|
declare function mergeRefs<T>(...refs: Array<React.Ref<T> | null | undefined>): React.RefCallback<T>;
|
|
262
307
|
|
|
263
|
-
export { FLOATING, type ProseDocumentElement, type ProseElement, TIMINGS, cn, mergeRefs, prose, proseClassName, proseDocument, proseDocumentClassName };
|
|
308
|
+
export { FLOATING, type ProseDocumentElement, type ProseElement, type ProseReadingElement, TIMINGS, cn, mergeRefs, prose, proseClassName, proseDocument, proseDocumentClassName, proseReading, proseReadingClassName };
|
package/dist/index.d.ts
CHANGED
|
@@ -136,6 +136,42 @@ declare const proseDocument: {
|
|
|
136
136
|
};
|
|
137
137
|
/** The element roles the document overlay covers. */
|
|
138
138
|
type ProseDocumentElement = keyof typeof proseDocument;
|
|
139
|
+
/**
|
|
140
|
+
* THE reading type scale — `typeScale="reading"` on `MarkdownView` (TYP-20's reading overlay, MK
|
|
141
|
+
* 2026-11-10, "Agent chat, ground up"). Long-form text an agent or an AI wrote, read in a column
|
|
142
|
+
* beside the work: a chat answer, an Ask AI answer, a generated summary. The body is the document
|
|
143
|
+
* body (14/24 on a fine pointer, 16/26 on a coarse pointer or a narrow window) so every long read
|
|
144
|
+
* in the product shares one rhythm, while headings stay on the app's compact steps (`#` 18 · `##` 16
|
|
145
|
+
* · `###` body size, semibold) because an answer is not a page. Paragraphs and lists sit 12 apart,
|
|
146
|
+
* list items 4, and quotes, tables and inline code read at the body's size.
|
|
147
|
+
*
|
|
148
|
+
* Like `proseDocument` it is an OVERLAY on `prose`: compose it after the base recipe through `cn`,
|
|
149
|
+
* or use `proseReadingClassName`, which is that composition done once. A person's message beside an
|
|
150
|
+
* answer reads at the same metrics through `proseReading.root` (`MessageBubble`).
|
|
151
|
+
*
|
|
152
|
+
* @example
|
|
153
|
+
* <div className={proseReadingClassName}>…</div>
|
|
154
|
+
*/
|
|
155
|
+
declare const proseReading: {
|
|
156
|
+
/** Body: 14/24 on a fine pointer, 16/26 on a coarse pointer or below the `sm` width. */
|
|
157
|
+
readonly root: "text-sm/6 pointer-coarse:text-base/6.5 max-sm:text-base/6.5";
|
|
158
|
+
readonly h1: "[&_h1]:mt-6 [&_h1]:mb-2";
|
|
159
|
+
readonly h2: "[&_h2]:mt-5 [&_h2]:mb-2";
|
|
160
|
+
readonly h3: "[&_h3]:mt-4 [&_h3]:mb-1.5 pointer-coarse:[&_h3]:text-base max-sm:[&_h3]:text-base";
|
|
161
|
+
readonly h4: "[&_h4]:mt-4 [&_h4]:mb-1 [&_h4]:font-semibold pointer-coarse:[&_h4]:text-base max-sm:[&_h4]:text-base";
|
|
162
|
+
readonly p: "[&_p]:my-3";
|
|
163
|
+
readonly ul: "[&_ul]:my-3";
|
|
164
|
+
readonly ol: "[&_ol]:my-3";
|
|
165
|
+
readonly li: "[&_li_ul]:mt-1 [&_li_ul]:mb-0 [&_li_ol]:mt-1 [&_li_ol]:mb-0";
|
|
166
|
+
readonly blockquote: "[&_blockquote]:my-3";
|
|
167
|
+
readonly code: "pointer-coarse:[&_code]:text-base max-sm:[&_code]:text-base";
|
|
168
|
+
readonly pre: "[&_pre:not([data-slot='code-block-pre'])]:my-3";
|
|
169
|
+
readonly hr: "[&_hr]:my-5";
|
|
170
|
+
readonly table: "[&_[data-slot=markdown-table]]:my-3";
|
|
171
|
+
readonly blocks: "[&_[data-slot=callout]]:my-3 [&_[data-slot=code-block]]:my-3 [&_details]:my-3";
|
|
172
|
+
};
|
|
173
|
+
/** The element roles the reading overlay covers. */
|
|
174
|
+
type ProseReadingElement = keyof typeof proseReading;
|
|
139
175
|
|
|
140
176
|
/**
|
|
141
177
|
* Merges Tailwind CSS class names with intelligent conflict resolution.
|
|
@@ -230,6 +266,15 @@ declare const FLOATING: {
|
|
|
230
266
|
* <article className={proseDocumentClassName}>…</article>
|
|
231
267
|
*/
|
|
232
268
|
declare const proseDocumentClassName: string;
|
|
269
|
+
/**
|
|
270
|
+
* The reading type scale as one class string: the base `prose` recipe with the `proseReading`
|
|
271
|
+
* overlay merged over it — what `MarkdownView` wears with `typeScale="reading"` (a chat answer, an
|
|
272
|
+
* Ask AI answer, a generated summary). Merged once here, through `cn`.
|
|
273
|
+
*
|
|
274
|
+
* @example
|
|
275
|
+
* <div className={proseReadingClassName}>…</div>
|
|
276
|
+
*/
|
|
277
|
+
declare const proseReadingClassName: string;
|
|
233
278
|
/**
|
|
234
279
|
* Fan one DOM node out to several refs — a forwarded `ref` prop plus one or more internal
|
|
235
280
|
* refs — as a single ref callback. Skips `null`/`undefined` entries, so an optional
|
|
@@ -260,4 +305,4 @@ declare const proseDocumentClassName: string;
|
|
|
260
305
|
*/
|
|
261
306
|
declare function mergeRefs<T>(...refs: Array<React.Ref<T> | null | undefined>): React.RefCallback<T>;
|
|
262
307
|
|
|
263
|
-
export { FLOATING, type ProseDocumentElement, type ProseElement, TIMINGS, cn, mergeRefs, prose, proseClassName, proseDocument, proseDocumentClassName };
|
|
308
|
+
export { FLOATING, type ProseDocumentElement, type ProseElement, type ProseReadingElement, TIMINGS, cn, mergeRefs, prose, proseClassName, proseDocument, proseDocumentClassName, proseReading, proseReadingClassName };
|
package/dist/index.js
CHANGED
|
@@ -6,8 +6,10 @@ import {
|
|
|
6
6
|
prose,
|
|
7
7
|
proseClassName,
|
|
8
8
|
proseDocument,
|
|
9
|
-
proseDocumentClassName
|
|
10
|
-
|
|
9
|
+
proseDocumentClassName,
|
|
10
|
+
proseReading,
|
|
11
|
+
proseReadingClassName
|
|
12
|
+
} from "./chunk-BH6QPBFT.js";
|
|
11
13
|
export {
|
|
12
14
|
FLOATING,
|
|
13
15
|
TIMINGS,
|
|
@@ -16,5 +18,7 @@ export {
|
|
|
16
18
|
prose,
|
|
17
19
|
proseClassName,
|
|
18
20
|
proseDocument,
|
|
19
|
-
proseDocumentClassName
|
|
21
|
+
proseDocumentClassName,
|
|
22
|
+
proseReading,
|
|
23
|
+
proseReadingClassName
|
|
20
24
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vegastack/design",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.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": {
|
|
@@ -302,6 +302,14 @@ descendant rules (`[&_h1]:…`), which means an element-level class on a child *
|
|
|
302
302
|
by setting a class on the rendered element. Under the page's own headings, `MarkdownView headingOffset={n}` moves every
|
|
303
303
|
heading down `n` levels (capped at h6) so the outline never skips back up.
|
|
304
304
|
|
|
305
|
+
**Pick the type scale by what the text is.** `MarkdownView typeScale="compact"` (the default) for a
|
|
306
|
+
comment, a card or a short message; `"document"` for a page; `"reading"` for long-form text an agent
|
|
307
|
+
or an AI wrote, read beside the work (a chat answer, an Ask AI answer, a summary). Pass `streaming`
|
|
308
|
+
while an answer arrives. A conversation is built from `message-parts`: `MessageBubble` for the
|
|
309
|
+
person, `MessageActivity` for thinking and steps, `MessageSourceList` for cited pages, `MessageTime`,
|
|
310
|
+
`MessageActions`; the AI disclaimer goes once under `ChatComposer` (`hint`), and notices attach to
|
|
311
|
+
its top (`notice`). A `[[n]]` citation never navigates on click — its card's link does.
|
|
312
|
+
|
|
305
313
|
**Markdown is read with `MarkdownView` and edited with `TextEdit format="markdown"`** — never a
|
|
306
314
|
textarea, a local prose class, or a hand-rolled editor. For in-place editing, swap the view for
|
|
307
315
|
`<TextEdit format="markdown" variant="document" onCommit={save} />` for inline document editing.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<!-- GENERATED — do not hand-edit. Regenerated from the design system's component contract,
|
|
4
4
|
which is the authority for membership and counts. -->
|
|
5
5
|
|
|
6
|
-
**
|
|
6
|
+
**202 components**, plus 467 animated-icon items, 18 hooks (`use-animation-replay`, `use-announcer`, `use-async-search`, `use-drag-reorder`, `use-file-drop`, `use-grid-selection`, `use-inline-edit`, `use-list-nav`, `use-media-query`, `use-mobile`, `use-modal-inert`, `use-optimistic-action`, `use-overflow-fold`, `use-overflow`, `use-platform`, `use-record-peek-row`, `use-tabs-swipe`, `use-view-transition`), 15 starter blocks (`app-shell-01`, `board-01`, `issue-detail-01`, `page-editor-01`, `command-search-01`, `list-page-01`, `library-01`, `login-01`, `notifications-01`, `review-split-01`, `settings-01`, `settings-02`, `status-pages-01`, `email-kit`, `share-01`), 68 chart blocks across 7 families, and 22 data libs (`code-highlight`, `date-time`, `grid-clipboard`, `geo-data`, `emoji-data`, `drag-item`, `text-anchor`, `text-anchor-doc`, `text-edit-grammar`, `embed-providers`, `text-edit-schema`, `text-edit-markdown`, `file-kind`, `upload-progress`, `media-probe`, `page-layout`, `tile-overlay`, `disclosure-trigger`, `icon-data`, `icon-components`, `picker-search`, `picker-preferences`) — 792 registry items in total.
|
|
7
7
|
|
|
8
8
|
Install any of them with `shadcn add @vegastack/<name>`. Animated icons install as
|
|
9
9
|
`@vegastack/icon-<name>`; the bare name is reserved for components, so a component whose name
|
|
@@ -222,9 +222,13 @@ starts with `icon-` is a component and never an icon.
|
|
|
222
222
|
|
|
223
223
|
- **`agent-edit-banner`** — The strip under a document's header after an agent changed it: the agent's hexagon, "Edited by Claude for Manoj · 3 changes · 2m ago", View changes, Approve, Undo and a dismiss — with the approving, undoing, refused, created and read-only states and the other agents behind +N.
|
|
224
224
|
- **`agent-panel`** — An agent on a record: identity, acting for, state with its actions, instructions, latest, reply and runs with Undo; plus slot, chip, badge, ring and hover card.
|
|
225
|
+
- **`agent-question-form`** — An agent asks one to five questions at once: options with their descriptions in view, the first recommended, own words and a note per question, previews, steps and a review; and the read-only answers.
|
|
225
226
|
- **`approval-card`** — An agent asks its owner to approve a risky action: who asks, the action in words, the records it touches, its reason, a reassurance, the expiry, and one Approve / Decline for the whole request — then the outcome.
|
|
227
|
+
- **`chat-composer`** — The box a person talks to an agent in: chips for what travels with the message, the text with mentions, and Send, which turns into Stop while the agent answers.
|
|
226
228
|
- **`cited-list`** — An answer as numbered points, each a sentence followed by its sources as small muted chips — links by default, or any element through render.
|
|
227
229
|
- **`delegate-popover`** — Delegate a record or rows to an agent: search agents (disabled with a reason), instructions, When finished, Connect an agent; bulk, empty and loading states.
|
|
230
|
+
- **`message-parts`** — What an agent's answer is made of beyond its text: steps, a plan checklist, status and notice lines, changes with Undo, a hand-off divider, sources, the disclaimer, actions, a version switch and a fold.
|
|
231
|
+
- **`suggestion-card`** — An agent offers one person a next step, in a card only they see: items with optional ticks, the host's own buttons, a menu, a footnote, its outcomes and a compact row.
|
|
228
232
|
- **`tool-call-chip`** — An agent-activity chip — tool action label + muted result meta, optionally rendered as a button.
|
|
229
233
|
|
|
230
234
|
## Communication
|