@veluai/velu 0.2.49 → 0.2.50
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/components/ApiSidebar.jsx +5 -3
- package/runtime/velu-ui/components/api.css +9 -1
- package/runtime/velu-ui/components/docs-layout.css +3 -0
- package/runtime/velu-ui/themes/nila.css +1 -1
- package/runtime/velu-ui/themes/thulir.css +2 -2
- package/src/runtime/App.jsx +2 -1
package/package.json
CHANGED
|
@@ -34,7 +34,8 @@ import MethodBadge from './MethodBadge.jsx';
|
|
|
34
34
|
*
|
|
35
35
|
* @typedef {Object} ApiEndpoint
|
|
36
36
|
* @property {string} method HTTP method — drives the MethodBadge color
|
|
37
|
-
* @property {string} label
|
|
37
|
+
* @property {string} [label] endpoint display name
|
|
38
|
+
* @property {string} [name] alias for label (accepted for back-compat)
|
|
38
39
|
* @property {string} [href]
|
|
39
40
|
* @property {boolean} [active]
|
|
40
41
|
*
|
|
@@ -56,7 +57,8 @@ function Icon({ icon }) {
|
|
|
56
57
|
|
|
57
58
|
function Endpoint({ endpoint }) {
|
|
58
59
|
const { activeHref, Link } = React.useContext(Ctx);
|
|
59
|
-
const { method, label, href = '#', active, icon } = endpoint;
|
|
60
|
+
const { method, label, name, href = '#', active, icon } = endpoint;
|
|
61
|
+
const title = label || name;
|
|
60
62
|
const isActive = Boolean(
|
|
61
63
|
active || (href != null && href === activeHref),
|
|
62
64
|
);
|
|
@@ -74,7 +76,7 @@ function Endpoint({ endpoint }) {
|
|
|
74
76
|
aria-current={isActive ? 'page' : undefined}
|
|
75
77
|
>
|
|
76
78
|
{method ? <MethodBadge method={method} /> : <Icon icon={icon} />}
|
|
77
|
-
<span className="velu-api-sidebar__label">{
|
|
79
|
+
<span className="velu-api-sidebar__label">{title}</span>
|
|
78
80
|
</Link>
|
|
79
81
|
</li>
|
|
80
82
|
);
|
|
@@ -611,12 +611,15 @@
|
|
|
611
611
|
margin-block-start: var(--s2);
|
|
612
612
|
}
|
|
613
613
|
|
|
614
|
-
/* Endpoint row — method pill + name.
|
|
614
|
+
/* Endpoint row — method pill + name. Keep rows inside the scroll
|
|
615
|
+
content box so the active/hover tint never paints over the gutter. */
|
|
615
616
|
.velu-api-sidebar__item {
|
|
616
617
|
display: flex;
|
|
617
618
|
align-items: center;
|
|
618
619
|
gap: 10px;
|
|
619
620
|
min-height: 36px;
|
|
621
|
+
max-inline-size: 100%;
|
|
622
|
+
box-sizing: border-box;
|
|
620
623
|
padding: 6px var(--s0);
|
|
621
624
|
border-radius: 12px;
|
|
622
625
|
color: var(--text-color);
|
|
@@ -637,7 +640,12 @@
|
|
|
637
640
|
background: var(--method-cta);
|
|
638
641
|
}
|
|
639
642
|
.velu-api-sidebar__label {
|
|
643
|
+
flex: 1;
|
|
644
|
+
min-inline-size: 0;
|
|
640
645
|
font: inherit;
|
|
646
|
+
overflow: hidden;
|
|
647
|
+
text-overflow: ellipsis;
|
|
648
|
+
white-space: nowrap;
|
|
641
649
|
}
|
|
642
650
|
|
|
643
651
|
/* Compact method pill — colored label on the method tint, not a filled
|
|
@@ -130,9 +130,12 @@
|
|
|
130
130
|
.velu-docs-nav-scroll {
|
|
131
131
|
flex: 1 1 auto;
|
|
132
132
|
min-block-size: 0;
|
|
133
|
+
min-inline-size: 0;
|
|
133
134
|
/* Always reserve the scrollbar gutter (see always-on track styles
|
|
134
135
|
further below) instead of only appearing when content overflows. */
|
|
135
136
|
overflow-y: scroll;
|
|
137
|
+
/* Keep active/hover row tints out of the scrollbar track. */
|
|
138
|
+
scrollbar-gutter: stable;
|
|
136
139
|
/* Clear sticky section headings when scrolling the active item into view. */
|
|
137
140
|
scroll-padding-block-start: 2.75rem;
|
|
138
141
|
}
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
[data-site-theme='nila'] .velu-docs-context:not(:has(.velu-docs-anchors)) { display: none !important; }
|
|
38
38
|
[data-site-theme='nila'] .velu-header { height: 96px; }
|
|
39
39
|
[data-site-theme='nila'] .velu-docs-layout__aside--left { left: 0; top: 96px; bottom: 0; width: 308px; padding: 16px 20px; border-right: 1px solid var(--border-color); }
|
|
40
|
-
[data-site-theme='nila'] .velu-sidebar { width:
|
|
40
|
+
[data-site-theme='nila'] .velu-sidebar { width: 100%; max-inline-size: 100%; box-sizing: border-box; }
|
|
41
41
|
[data-site-theme='nila'] .velu-docs-layout__center { margin-left: 308px; margin-right: 324px; }
|
|
42
42
|
[data-site-theme='nila'] .velu-docs-layout__main { padding: 44px 32px 0; }
|
|
43
43
|
[data-site-theme='nila'] .velu-docs-layout__article { max-inline-size: 632px; margin-inline: auto; }
|
|
@@ -154,7 +154,7 @@
|
|
|
154
154
|
[data-site-theme='thulir'] .velu-docs-nav-scroll::-webkit-scrollbar { display: none; }
|
|
155
155
|
|
|
156
156
|
/* Navigation: 14/24 type, plain group labels, and a rounded active tint. */
|
|
157
|
-
:is([data-site-theme='thulir'],[data-site-theme='aalam'],[data-site-theme='nila'],[data-site-theme='kadhir']) .velu-sidebar { margin: 0; width:
|
|
157
|
+
:is([data-site-theme='thulir'],[data-site-theme='aalam'],[data-site-theme='nila'],[data-site-theme='kadhir']) .velu-sidebar { margin: 0; width: 100%; max-inline-size: 100%; box-sizing: border-box; }
|
|
158
158
|
:is([data-site-theme='thulir'],[data-site-theme='aalam'],[data-site-theme='nila'],[data-site-theme='kadhir']) .velu-sidebar__indicator { inset-inline-end: 0; border-radius: 12px; background: rgb(from var(--accent-color) r g b / 10%); }
|
|
159
159
|
:is([data-site-theme='thulir'],[data-site-theme='aalam'],[data-site-theme='nila'],[data-site-theme='kadhir']) .velu-sidebar__indicator::before { display: none; }
|
|
160
160
|
:is([data-site-theme='thulir'],[data-site-theme='aalam'],[data-site-theme='nila'],[data-site-theme='kadhir']) :is(.velu-sidebar__section,.velu-api-sidebar__section) {
|
|
@@ -177,7 +177,7 @@
|
|
|
177
177
|
:is([data-site-theme='thulir'],[data-site-theme='aalam'],[data-site-theme='nila'],[data-site-theme='kadhir']) :is(.velu-sidebar__item--active,.velu-api-sidebar__item--active) { color: var(--accent-color); font-weight: 600; border: 0; }
|
|
178
178
|
:is([data-site-theme='thulir'],[data-site-theme='aalam'],[data-site-theme='nila'],[data-site-theme='kadhir']) :is(.velu-sidebar__list,.velu-api-sidebar__list) { gap: 0 !important; }
|
|
179
179
|
:is([data-site-theme='thulir'],[data-site-theme='aalam'],[data-site-theme='nila'],[data-site-theme='kadhir']) .velu-sidebar > sidebar-group { gap: 0 !important; margin-bottom: 28px; }
|
|
180
|
-
:is([data-site-theme='thulir'],[data-site-theme='aalam'],[data-site-theme='nila'],[data-site-theme='kadhir']) .velu-api-sidebar { margin: 0; border: 0; width:
|
|
180
|
+
:is([data-site-theme='thulir'],[data-site-theme='aalam'],[data-site-theme='nila'],[data-site-theme='kadhir']) .velu-api-sidebar { margin: 0; border: 0; width: 100%; max-inline-size: 100%; box-sizing: border-box; gap: 0 !important; }
|
|
181
181
|
:is([data-site-theme='thulir'],[data-site-theme='aalam'],[data-site-theme='nila'],[data-site-theme='kadhir']) .velu-api-sidebar__list + .velu-api-sidebar__section { margin-top: 28px; }
|
|
182
182
|
:is([data-site-theme='thulir'],[data-site-theme='aalam'],[data-site-theme='nila'],[data-site-theme='kadhir']) .velu-api-sidebar__item--active { background: rgb(from var(--accent-color) r g b / 10%); }
|
|
183
183
|
:is([data-site-theme='thulir'],[data-site-theme='aalam'],[data-site-theme='nila'],[data-site-theme='kadhir']) .velu-api-sidebar__item--active .velu-method-badge { color: #fff; background: var(--method-cta); }
|