@veluai/velu 0.2.28 → 0.2.30
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/package.json +1 -1
- package/runtime/velu-ui/base.css +104 -0
- package/src/runtime/App.jsx +7 -0
package/package.json
CHANGED
package/runtime/velu-ui/base.css
CHANGED
|
@@ -243,6 +243,110 @@
|
|
|
243
243
|
margin-block-start: var(--s5);
|
|
244
244
|
}
|
|
245
245
|
|
|
246
|
+
/* ── Prose block elements ─────────────────────────────────────────────────
|
|
247
|
+
MDX compiles Markdown tables, lists, blockquotes, inline code, and links to
|
|
248
|
+
bare HTML elements. The rhythm rules above only handle spacing + headings,
|
|
249
|
+
so without these an authored table renders borderless and body links fall
|
|
250
|
+
back to the browser default. Scoped to .velu-prose so component internals
|
|
251
|
+
keep their own styling. */
|
|
252
|
+
|
|
253
|
+
/* Tables — hairline grid with a shaded header. GitHub-style block scroll so a
|
|
254
|
+
wide table scrolls horizontally instead of breaking the reading column. */
|
|
255
|
+
.velu-prose table {
|
|
256
|
+
display: block;
|
|
257
|
+
width: max-content;
|
|
258
|
+
max-width: 100%;
|
|
259
|
+
overflow-x: auto;
|
|
260
|
+
/* `separate` (not `collapse`): collapsed borders round a 0.5px hairline up
|
|
261
|
+
to a full device pixel, so the grid would read heavier than the component
|
|
262
|
+
boxes (cards, code blocks) that use the same --border-width. Separate mode
|
|
263
|
+
draws each line as a normal element border, matching them exactly. */
|
|
264
|
+
border-collapse: separate;
|
|
265
|
+
border-spacing: 0;
|
|
266
|
+
border: var(--border-width) solid var(--border-color);
|
|
267
|
+
/* Rounded corners to match the component boxes (code blocks, accordions).
|
|
268
|
+
`overflow-x: auto` clips the header shading to the radius. */
|
|
269
|
+
border-radius: var(--radius-sm);
|
|
270
|
+
font-size: var(--f-body);
|
|
271
|
+
}
|
|
272
|
+
/* Each cell draws only its top + inline-start line; the table's own border
|
|
273
|
+
closes the outer top/left edges. Shared single lines → no doubling. */
|
|
274
|
+
.velu-prose :is(th, td) {
|
|
275
|
+
padding: var(--s-1) var(--s0);
|
|
276
|
+
border-block-start: var(--border-width) solid var(--border-color);
|
|
277
|
+
border-inline-start: var(--border-width) solid var(--border-color);
|
|
278
|
+
text-align: start;
|
|
279
|
+
vertical-align: top;
|
|
280
|
+
}
|
|
281
|
+
.velu-prose tr:first-child > :is(th, td) {
|
|
282
|
+
border-block-start: 0;
|
|
283
|
+
}
|
|
284
|
+
.velu-prose :is(th, td):first-child {
|
|
285
|
+
border-inline-start: 0;
|
|
286
|
+
}
|
|
287
|
+
.velu-prose thead th {
|
|
288
|
+
background: var(--surface-color);
|
|
289
|
+
font-weight: var(--weight-semibold);
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
/* Lists — markers + indentation and a comfortable per-item rhythm. */
|
|
293
|
+
.velu-prose :is(ul, ol) {
|
|
294
|
+
padding-inline-start: var(--s3);
|
|
295
|
+
}
|
|
296
|
+
.velu-prose ul {
|
|
297
|
+
list-style: disc;
|
|
298
|
+
}
|
|
299
|
+
.velu-prose ol {
|
|
300
|
+
list-style: decimal;
|
|
301
|
+
}
|
|
302
|
+
.velu-prose li::marker {
|
|
303
|
+
color: var(--muted-color);
|
|
304
|
+
}
|
|
305
|
+
.velu-prose li + li {
|
|
306
|
+
margin-block-start: var(--s-1);
|
|
307
|
+
}
|
|
308
|
+
.velu-prose li > :is(ul, ol) {
|
|
309
|
+
margin-block-start: var(--s-1);
|
|
310
|
+
}
|
|
311
|
+
/* GFM task lists — drop the bullet so the checkbox is the only marker. */
|
|
312
|
+
.velu-prose :is(ul, ol).contains-task-list {
|
|
313
|
+
padding-inline-start: var(--s0);
|
|
314
|
+
}
|
|
315
|
+
.velu-prose .task-list-item {
|
|
316
|
+
list-style: none;
|
|
317
|
+
}
|
|
318
|
+
.velu-prose .task-list-item input[type='checkbox'] {
|
|
319
|
+
margin-inline-end: var(--s-2);
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
/* Inline code — a subtle chip, distinct from fenced <pre> code blocks. */
|
|
323
|
+
.velu-prose :not(pre) > code {
|
|
324
|
+
padding: 0.12em 0.4em;
|
|
325
|
+
border-radius: var(--radius-sm);
|
|
326
|
+
background: var(--surface-color);
|
|
327
|
+
font-size: 0.88em;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
/* Links in body text — accent-coloured. Scoped to text containers so
|
|
331
|
+
component internals (cards, callouts, …) keep their own link styling. */
|
|
332
|
+
.velu-prose :is(p, li, td, th) a {
|
|
333
|
+
color: var(--accent-color);
|
|
334
|
+
text-decoration: underline;
|
|
335
|
+
text-underline-offset: 0.15em;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
/* Blockquotes + horizontal rules. */
|
|
339
|
+
.velu-prose blockquote {
|
|
340
|
+
margin-inline: 0;
|
|
341
|
+
padding-inline-start: var(--s1);
|
|
342
|
+
border-inline-start: 2px solid var(--border-color);
|
|
343
|
+
color: var(--muted-color);
|
|
344
|
+
}
|
|
345
|
+
.velu-prose hr {
|
|
346
|
+
border: none;
|
|
347
|
+
border-block-start: var(--border-width) solid var(--border-color);
|
|
348
|
+
}
|
|
349
|
+
|
|
246
350
|
/* Discreet thin scrollbar with a tokenised colour in every state — applied
|
|
247
351
|
GLOBALLY (the `*` selector) so every scrollable element inherits it by
|
|
248
352
|
default: the chatbot, dialogs, and any future component, with no
|
package/src/runtime/App.jsx
CHANGED
|
@@ -943,6 +943,13 @@ function DocsPage() {
|
|
|
943
943
|
React.useEffect(() => {
|
|
944
944
|
setDrawerOpen(false);
|
|
945
945
|
setNavOpen(false);
|
|
946
|
+
// Reset scroll to the top of the new page. Client-side navigation (sidebar,
|
|
947
|
+
// prev/next, breadcrumbs) otherwise keeps the previous scroll position, so a
|
|
948
|
+
// new page opens part-way down. Skip when the URL carries a hash so a deep
|
|
949
|
+
// link to a section still lands on that heading.
|
|
950
|
+
if (typeof window !== 'undefined' && !window.location.hash) {
|
|
951
|
+
window.scrollTo(0, 0);
|
|
952
|
+
}
|
|
946
953
|
}, [pathname]);
|
|
947
954
|
// Mobile drawer's section picker = the resolved tabs (top-level
|
|
948
955
|
// navigation), so it mirrors the desktop tabs row instead of a
|