@veluai/velu 0.2.40 → 0.2.42
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/docs/kadhir.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Kadhir
|
|
2
|
+
|
|
3
|
+
Kadhir is Velu's independently implemented Luma equivalent. Mintlify migration maps `theme: "luma"` to `theme: "kadhir"`; native Velu sites can select Kadhir directly.
|
|
4
|
+
|
|
5
|
+
The implementation uses the existing Velu component and navigation infrastructure, with a new single-row 48px desktop header, pill tabs, compact search, a 248px sidebar, a 648px reading column, and a separate API sample rail. Mobile uses the accessible left drawer and on-page TOC. Pagination has 48px separation from content.
|
|
6
|
+
|
|
7
|
+
Reference: the cached npm renderer `@mintlify/client@0.0.3566`. Luma-specific classes were inspected in `.next/server/chunks/ssr/_6753cfba._.js` and `_450d9e92._.js`. These are reference inputs, not distributed code. Reference API data was generated using `@mintlify/validation@0.1.849` and its `openApiToSchemaGraph` export.
|
|
8
|
+
|
|
9
|
+
## Local comparison
|
|
10
|
+
|
|
11
|
+
The fresh fixture is `.incoming/kadhir/source`. It contains 220 pages, three products, two versions, API operations, component examples, and a custom stylesheet/script. The migrated output is `.incoming/kadhir/final`.
|
|
12
|
+
|
|
13
|
+
```powershell
|
|
14
|
+
node packages/velu-cli/scripts/build.mjs
|
|
15
|
+
node packages/velu-cli/dist/cli.js migrate mintlify .incoming/kadhir/source --out .incoming/kadhir/fresh-output
|
|
16
|
+
$env:PORT='8476'
|
|
17
|
+
node packages/velu-cli/dist/cli.js dev .incoming/kadhir/fresh-output
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Browser tests expect that fixture on port 8476:
|
|
21
|
+
|
|
22
|
+
```powershell
|
|
23
|
+
node --test packages/velu-cli/test/kadhir.test.mjs
|
|
24
|
+
node packages/velu-cli/test/kadhir-tabs-browser.mjs
|
|
25
|
+
node packages/velu-cli/test/kadhir-navigation-browser.mjs
|
|
26
|
+
node packages/velu-cli/test/kadhir-mobile-browser.mjs
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Tests cover tab clicks, API content, products/versions, reloads, long sidebars, drawer keyboard behavior, TOC clearance, and overflow. Screenshots and reference preparation scripts are under `.incoming/kadhir/`.
|
|
30
|
+
|
|
31
|
+
This is not a pixel-perfect guarantee. Icon artwork, syntax highlighting, generated response examples, component spacing, and arbitrary custom DOM selectors can differ. The fixture migration reports compatibility warnings for endpoint snapshots, component adapters, and CSS selectors; review those before deploying a migrated site.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veluai/velu",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.42",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": "./dist/cli.js",
|
|
6
6
|
"publishConfig": {
|
|
@@ -21,7 +21,8 @@
|
|
|
21
21
|
"docs/vepa.md",
|
|
22
22
|
"docs/thulir.md",
|
|
23
23
|
"docs/aalam.md",
|
|
24
|
-
"docs/nila.md"
|
|
24
|
+
"docs/nila.md",
|
|
25
|
+
"docs/kadhir.md"
|
|
25
26
|
],
|
|
26
27
|
"scripts": {
|
|
27
28
|
"build": "node scripts/build.mjs",
|
|
@@ -48,8 +48,27 @@ import Logo from './Logo.jsx';
|
|
|
48
48
|
* linkComponent?: React.ElementType, className?: string }} props
|
|
49
49
|
*/
|
|
50
50
|
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
/* Velu brand mark. Color: --accent-color via the wrapping wordmark
|
|
52
|
+
span; the path uses currentColor. Exported so consumers (e.g. the
|
|
53
|
+
mobile nav drawer) can render the mark alongside its own chrome.
|
|
54
|
+
Only the default theme shows it — the vepa / thulir / aalam / nila
|
|
55
|
+
presets hide it via CSS (text-only branding). */
|
|
56
|
+
export function VeluMark() {
|
|
57
|
+
return (
|
|
58
|
+
<svg
|
|
59
|
+
className="velu-header__mark"
|
|
60
|
+
viewBox="0 0 32 24"
|
|
61
|
+
fill="currentColor"
|
|
62
|
+
aria-hidden="true"
|
|
63
|
+
>
|
|
64
|
+
<path
|
|
65
|
+
fillRule="evenodd"
|
|
66
|
+
clipRule="evenodd"
|
|
67
|
+
d="M29.6564 14.1534C29.5739 14.5616 29.3507 14.9288 29.0248 15.1926C28.699 15.4565 28.2907 15.6007 27.8694 15.6006H21.3702C20.5341 15.6006 19.8051 16.1627 19.6031 16.9638L18.1671 22.6368C18.0685 23.0263 17.8409 23.372 17.5205 23.619C17.2002 23.866 16.8054 24.0001 16.399 24H10.4378C10.1609 24.0001 9.88759 23.9378 9.63868 23.8179C9.38976 23.6979 9.1718 23.5235 9.00135 23.3079C8.8309 23.0923 8.71245 22.8412 8.65499 22.5736C8.59754 22.306 8.6026 22.029 8.66978 21.7636L10.1888 15.7636C10.2874 15.3743 10.5148 15.0287 10.835 14.7817C11.1551 14.5347 11.5496 14.4005 11.9559 14.4004H18.3931C19.2621 14.4004 20.0101 13.7949 20.1801 12.9532L22.3882 2.04774C22.4705 1.63945 22.6936 1.27198 23.0195 1.00793C23.3453 0.74388 23.7538 0.599578 24.1752 0.599605H30.1774C30.4471 0.599529 30.7134 0.658587 30.9572 0.772515C31.201 0.886444 31.4161 1.0524 31.5871 1.25842C31.758 1.46443 31.8806 1.70535 31.9458 1.96383C32.0111 2.2223 32.0175 2.49185 31.9645 2.75305L29.6564 14.1534ZM9.61081 13.5538C9.52825 13.962 9.30507 14.3292 8.97924 14.593C8.65341 14.857 8.24508 15.0011 7.82375 15.001H1.82257C1.55289 15.0011 1.28656 14.942 1.04279 14.8281C0.79902 14.7141 0.583892 14.5482 0.412928 14.3422C0.241965 14.1362 0.11943 13.8952 0.0541639 13.6368C-0.0111017 13.3783 -0.0174699 13.1087 0.0355186 12.8475L2.34359 1.44715C2.42614 1.03904 2.64933 0.671798 2.97516 0.407944C3.30099 0.144089 3.70932 -7.24082e-05 4.13064 7.25899e-08H10.1318C10.4015 -7.55792e-05 10.6678 0.0589818 10.9116 0.172911C11.1554 0.286839 11.3705 0.453799 11.5415 0.659813C11.7124 0.864828 11.835 1.10576 11.9002 1.36423C11.9655 1.62269 11.9719 1.89225 11.9189 2.15344L9.61081 13.5538Z"
|
|
68
|
+
/>
|
|
69
|
+
</svg>
|
|
70
|
+
);
|
|
71
|
+
}
|
|
53
72
|
|
|
54
73
|
function ActionButton({ action, Link, id }) {
|
|
55
74
|
const { label, icon, kind = 'outlined', href, onClick, external, component } = action;
|
|
@@ -265,6 +284,7 @@ export default function PageHeader({
|
|
|
265
284
|
<Logo logo={brand.logo} alt={brandLabel} />
|
|
266
285
|
) : (
|
|
267
286
|
<>
|
|
287
|
+
<VeluMark />
|
|
268
288
|
<span className="velu-header__wordmark">{brandLabel}</span>
|
|
269
289
|
</>
|
|
270
290
|
)}
|
|
@@ -427,7 +427,11 @@
|
|
|
427
427
|
opacity 0.15s ease,
|
|
428
428
|
transform 0.15s ease,
|
|
429
429
|
visibility 0s linear 0.15s;
|
|
430
|
-
z-index: 1
|
|
430
|
+
/* Above the sidebar nav: its items are `z-index: 1` and sticky
|
|
431
|
+
section headers `z-index: 2` (sidebar.css), all in the same
|
|
432
|
+
stacking context as this menu (the drawer aside), so a tie would
|
|
433
|
+
let the nav paint OVER the dropdown and show through it. */
|
|
434
|
+
z-index: 30;
|
|
431
435
|
}
|
|
432
436
|
.velu-docs-layout__drawer-docselect[data-open='true']
|
|
433
437
|
.velu-docs-layout__drawer-docselect-menu {
|
|
@@ -835,6 +839,16 @@
|
|
|
835
839
|
display: none;
|
|
836
840
|
}
|
|
837
841
|
|
|
842
|
+
/* Center mode (changelogs) hides the aside above; at mobile the aside
|
|
843
|
+
IS the nav drawer, so re-show it there — otherwise changelog pages
|
|
844
|
+
have no way to reach the navigation. Must come after the page-mode
|
|
845
|
+
hide rule above (same specificity, later source order wins). */
|
|
846
|
+
@container docs (max-width: 640px) {
|
|
847
|
+
.velu-docs-layout[data-page-mode='center'] .velu-docs-layout__aside--left {
|
|
848
|
+
display: flex;
|
|
849
|
+
}
|
|
850
|
+
}
|
|
851
|
+
|
|
838
852
|
/* Custom / frame are a landing canvas: center a max-w-4xl column.
|
|
839
853
|
Frame keeps the sidebar; custom does not. */
|
|
840
854
|
.velu-docs-layout[data-page-mode='custom'] .velu-docs-layout__main,
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/* Kadhir: independent Luma layout, measured with @mintlify/client 0.0.3566.
|
|
2
|
+
Shared reading components and accessible drawer behavior use thulir.css. */
|
|
3
|
+
[data-site-theme='kadhir'] .velu-pagenav { margin-block: 48px 64px; }
|
|
4
|
+
[data-site-theme='kadhir'] .velu-hero h1 { font-size: 36px; line-height: 36px; font-weight: 500; letter-spacing: -.8px; }
|
|
5
|
+
[data-site-theme='kadhir'] .velu-sidebar__item { background: transparent; min-height: 32px; padding-right: 12px; }
|
|
6
|
+
[data-site-theme='kadhir'] .velu-sidebar__item--active { font-weight: 400; }
|
|
7
|
+
/* Mint Luma marks the selected API endpoint with accent text only — no
|
|
8
|
+
persistent tint band (thulir.css paints one for the whole family). */
|
|
9
|
+
[data-site-theme='kadhir'] .velu-api-sidebar__item--active { background: transparent; font-weight: 400; }
|
|
10
|
+
/* Mint Luma hover: text shifts to accent, no background wash
|
|
11
|
+
(thulir.css paints a surface-color bg for the whole family). */
|
|
12
|
+
[data-site-theme='kadhir'] :is(.velu-sidebar__item, .velu-api-sidebar__item):hover { background: transparent; color: var(--accent-color); }
|
|
13
|
+
[data-site-theme='kadhir'] .velu-sidebar__label { white-space: normal; overflow-wrap: anywhere; }
|
|
14
|
+
[data-site-theme='kadhir'] .velu-sidebar__indicator { display: none; }
|
|
15
|
+
[data-site-theme='kadhir'] .velu-sidebar__section { text-transform: capitalize; font-size: 12px; font-weight: 600; }
|
|
16
|
+
[data-site-theme='kadhir'] .velu-docs-nav-scroll { overflow-x: hidden; }
|
|
17
|
+
[data-site-theme='kadhir'] .velu-sidebar__section { padding-inline: 0; }
|
|
18
|
+
[data-site-theme='kadhir'] .velu-docs-nav-scroll { background-image: none; scrollbar-width: thin; scrollbar-color: transparent transparent; }
|
|
19
|
+
[data-site-theme='kadhir'] .velu-docs-nav-scroll:hover { scrollbar-color: var(--border-color) transparent; }
|
|
20
|
+
[data-site-theme='kadhir'] .velu-header__action { border-radius: 999px; }
|
|
21
|
+
[data-site-theme='kadhir'] .velu-header__action--primary { background: var(--accent-color); padding-inline: 16px; }
|
|
22
|
+
[data-site-theme='kadhir'] .velu-header__action--primary::after { display: none; }
|
|
23
|
+
[data-site-theme='kadhir'] .velu-header__action:not(.velu-header__action--primary) { border: 1px solid var(--border-color); padding: 7px 16px; }
|
|
24
|
+
[data-site-theme='kadhir'] .velu-vepa-toc { padding-top: 16px; width: 100%; }
|
|
25
|
+
@container docs (min-width: 1024px) {
|
|
26
|
+
[data-site-theme='kadhir'] .velu-header { display: grid !important; grid-template-columns: 248px minmax(0,1fr) 36px auto; align-items: center; gap: 8px !important; height: 48px; padding: 0 36px; border-bottom: 1px solid var(--border-color); }
|
|
27
|
+
[data-site-theme='kadhir'] .velu-header__top { display: contents; }
|
|
28
|
+
[data-site-theme='kadhir'] .velu-header__top::after { display: none; }
|
|
29
|
+
[data-site-theme='kadhir'] .velu-header__col--brand { grid-column: 1; grid-row: 1; flex-wrap: nowrap !important; }
|
|
30
|
+
[data-site-theme='kadhir'] .velu-header__col--brand > .velu-hide-on-mobile { display: flex; gap: 28px; }
|
|
31
|
+
[data-site-theme='kadhir'] .velu-header .velu-nav-select__btn { border: 0; padding: 4px 8px; background: transparent; font-size: 14px; }
|
|
32
|
+
[data-site-theme='kadhir'] .velu-header .velu-nav-select__btn-icon { display: none; }
|
|
33
|
+
[data-site-theme='kadhir'] .velu-docs-context:not(:has(.velu-docs-anchors)) { display: none !important; }
|
|
34
|
+
[data-site-theme='kadhir'] .velu-header__col--center { grid-column: 3; grid-row: 1; width: 36px; }
|
|
35
|
+
[data-site-theme='kadhir'] .velu-header__col--actions { grid-column: 4; grid-row: 1; gap: 8px !important; }
|
|
36
|
+
[data-site-theme='kadhir'] .velu-header__actions-list { gap: 8px !important; }
|
|
37
|
+
[data-site-theme='kadhir'] .velu-header__tabs { grid-column: 2; grid-row: 1; padding: 0; height: 48px; justify-content: safe center !important; gap: 4px !important; overflow-x: auto; flex-wrap: nowrap !important; }
|
|
38
|
+
[data-site-theme='kadhir'] .velu-header__tab { padding: 8px 16px; height: 36px; border-radius: 999px; flex: none; }
|
|
39
|
+
[data-site-theme='kadhir'] .velu-header__tab::after { display: none; }
|
|
40
|
+
[data-site-theme='kadhir'] .velu-header__tab--active { background: var(--surface-color); font-weight: 500; border-bottom-color: transparent; }
|
|
41
|
+
[data-site-theme='kadhir'] .velu-search__trigger { width: 36px !important; height: 36px; border-radius: 50%; padding: 0; justify-content: center; border: 0; background: var(--surface-color); font-size: 0; gap: 0; }
|
|
42
|
+
[data-site-theme='kadhir'] .velu-search__trigger .velu-search__kbd { display: none; }
|
|
43
|
+
[data-site-theme='kadhir'] .velu-search__trigger-label { display: none; }
|
|
44
|
+
[data-site-theme='kadhir'] .velu-search__trigger-icon { font-size: 12px; }
|
|
45
|
+
[data-site-theme='kadhir'] .velu-docs-layout__aside--left { top: 48px; bottom: 0; left: 0; width: 248px; padding: 16px 20px 24px 20px; }
|
|
46
|
+
[data-site-theme='kadhir'] .velu-sidebar { width: 100%; }
|
|
47
|
+
[data-site-theme='kadhir'] .velu-docs-layout__center { margin-left: 248px; margin-right: 224px; }
|
|
48
|
+
[data-site-theme='kadhir'] .velu-docs-layout__main { padding: 28px 24px 0; }
|
|
49
|
+
[data-site-theme='kadhir'] .velu-docs-layout__article { max-inline-size: 648px; margin-inline: auto; }
|
|
50
|
+
[data-site-theme='kadhir'] .velu-docs-layout__aside--right { top: 48px; right: 20px; width: 236px; }
|
|
51
|
+
[data-site-theme='kadhir'] > [data-velu-footer] { margin-left: 248px; }
|
|
52
|
+
[data-site-theme='kadhir'] .velu-toc-bar { inset-block-start: 48px; }
|
|
53
|
+
}
|
|
54
|
+
@container docs (min-width: 1280px) {
|
|
55
|
+
[data-site-theme='kadhir'][data-api='true'] .velu-docs-layout__center { margin-right: 496px; }
|
|
56
|
+
[data-site-theme='kadhir'][data-api='true'] .velu-docs-layout__article { max-inline-size: 648px; }
|
|
57
|
+
[data-site-theme='kadhir'][data-api='true'] .velu-docs-layout__main { padding-inline: 48px 24px; }
|
|
58
|
+
[data-site-theme='kadhir'][data-api='true'] .velu-docs-layout__aside--right { right: 24px; width: 448px; padding-top: 24px; }
|
|
59
|
+
}
|
|
60
|
+
@container docs (min-width: 1024px) and (max-width: 1279px) {
|
|
61
|
+
[data-site-theme='kadhir'] .velu-docs-layout__center { margin-right: 0; }
|
|
62
|
+
[data-site-theme='kadhir'] .velu-header { grid-template-columns: 300px minmax(0,1fr) 36px auto; padding-inline: 20px; }
|
|
63
|
+
[data-site-theme='kadhir'] .velu-header__tab { padding-inline: 10px; }
|
|
64
|
+
}
|
|
65
|
+
@container docs (max-width: 1023px) {
|
|
66
|
+
[data-site-theme='kadhir'] .velu-hero h1 { font-size: 30px; line-height: 36px; }
|
|
67
|
+
[data-site-theme='kadhir'] .velu-hide-on-mobile { display: none; }
|
|
68
|
+
[data-site-theme='kadhir'] .velu-show-on-mobile { display: contents; }
|
|
69
|
+
[data-site-theme='kadhir'] .velu-docs-context { padding-inline: 16px; }
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
package/src/runtime/App.jsx
CHANGED
|
@@ -1388,7 +1388,11 @@ function DocsPage() {
|
|
|
1388
1388
|
? undefined
|
|
1389
1389
|
: languageSwitcher || undefined
|
|
1390
1390
|
}
|
|
1391
|
-
onMenuClick={
|
|
1391
|
+
onMenuClick={
|
|
1392
|
+
chrome.sidebar || chrome.mode === 'center'
|
|
1393
|
+
? () => setDrawerOpen((v) => !v)
|
|
1394
|
+
: undefined
|
|
1395
|
+
}
|
|
1392
1396
|
menuOpen={drawerOpen}
|
|
1393
1397
|
menuId={site.theme === 'vepa' ? 'sidebar-content' : 'sidebar'}
|
|
1394
1398
|
breadcrumb={
|