@djangocfg/ui-tools 2.1.292 → 2.1.293
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/{DocsLayout-5WTQR3BR.cjs → DocsLayout-PLWQJBGU.cjs} +9 -3
- package/dist/DocsLayout-PLWQJBGU.cjs.map +1 -0
- package/dist/{DocsLayout-YZR5RLCJ.mjs → DocsLayout-XB55R7YG.mjs} +10 -4
- package/dist/{DocsLayout-YZR5RLCJ.mjs.map → DocsLayout-XB55R7YG.mjs.map} +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +6 -6
- package/src/tools/OpenapiViewer/components/DocsLayout/Sidebar/EndpointRow.tsx +12 -1
- package/src/tools/OpenapiViewer/components/DocsLayout/Sidebar/SidebarBody.tsx +1 -1
- package/dist/DocsLayout-5WTQR3BR.cjs.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -263,7 +263,7 @@ function OpenapiLoadingFallback() {
|
|
|
263
263
|
}
|
|
264
264
|
chunkWGEGR3DF_cjs.__name(OpenapiLoadingFallback, "OpenapiLoadingFallback");
|
|
265
265
|
var LazyDocsLayout = createLazyComponent(
|
|
266
|
-
() => import('./DocsLayout-
|
|
266
|
+
() => import('./DocsLayout-PLWQJBGU.cjs').then((mod) => ({ default: mod.DocsLayout })),
|
|
267
267
|
{
|
|
268
268
|
displayName: "LazyDocsLayout",
|
|
269
269
|
fallback: /* @__PURE__ */ jsxRuntime.jsx(OpenapiLoadingFallback, {})
|
|
@@ -418,7 +418,7 @@ function LottiePlayer(props) {
|
|
|
418
418
|
}
|
|
419
419
|
chunkWGEGR3DF_cjs.__name(LottiePlayer, "LottiePlayer");
|
|
420
420
|
var DocsLayout = React.lazy(
|
|
421
|
-
() => import('./DocsLayout-
|
|
421
|
+
() => import('./DocsLayout-PLWQJBGU.cjs').then((mod) => ({ default: mod.DocsLayout }))
|
|
422
422
|
);
|
|
423
423
|
var LoadingFallback7 = /* @__PURE__ */ chunkWGEGR3DF_cjs.__name(() => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center min-h-[400px]", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-muted-foreground", children: "Loading API Playground..." }) }), "LoadingFallback");
|
|
424
424
|
var Playground = /* @__PURE__ */ chunkWGEGR3DF_cjs.__name(({ config }) => {
|
package/dist/index.mjs
CHANGED
|
@@ -238,7 +238,7 @@ function OpenapiLoadingFallback() {
|
|
|
238
238
|
}
|
|
239
239
|
__name(OpenapiLoadingFallback, "OpenapiLoadingFallback");
|
|
240
240
|
var LazyDocsLayout = createLazyComponent(
|
|
241
|
-
() => import('./DocsLayout-
|
|
241
|
+
() => import('./DocsLayout-XB55R7YG.mjs').then((mod) => ({ default: mod.DocsLayout })),
|
|
242
242
|
{
|
|
243
243
|
displayName: "LazyDocsLayout",
|
|
244
244
|
fallback: /* @__PURE__ */ jsx(OpenapiLoadingFallback, {})
|
|
@@ -393,7 +393,7 @@ function LottiePlayer(props) {
|
|
|
393
393
|
}
|
|
394
394
|
__name(LottiePlayer, "LottiePlayer");
|
|
395
395
|
var DocsLayout = lazy(
|
|
396
|
-
() => import('./DocsLayout-
|
|
396
|
+
() => import('./DocsLayout-XB55R7YG.mjs').then((mod) => ({ default: mod.DocsLayout }))
|
|
397
397
|
);
|
|
398
398
|
var LoadingFallback7 = /* @__PURE__ */ __name(() => /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center min-h-[400px]", children: /* @__PURE__ */ jsx("div", { className: "text-muted-foreground", children: "Loading API Playground..." }) }), "LoadingFallback");
|
|
399
399
|
var Playground = /* @__PURE__ */ __name(({ config }) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@djangocfg/ui-tools",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.293",
|
|
4
4
|
"description": "Heavy React tools with lazy loading - for Electron, Vite, CRA, Next.js apps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ui-tools",
|
|
@@ -91,8 +91,8 @@
|
|
|
91
91
|
"check": "tsc --noEmit"
|
|
92
92
|
},
|
|
93
93
|
"peerDependencies": {
|
|
94
|
-
"@djangocfg/i18n": "^2.1.
|
|
95
|
-
"@djangocfg/ui-core": "^2.1.
|
|
94
|
+
"@djangocfg/i18n": "^2.1.293",
|
|
95
|
+
"@djangocfg/ui-core": "^2.1.293",
|
|
96
96
|
"consola": "^3.4.2",
|
|
97
97
|
"lodash-es": "^4.18.1",
|
|
98
98
|
"lucide-react": "^0.545.0",
|
|
@@ -140,10 +140,10 @@
|
|
|
140
140
|
"@maplibre/maplibre-gl-geocoder": "^1.7.0"
|
|
141
141
|
},
|
|
142
142
|
"devDependencies": {
|
|
143
|
-
"@djangocfg/i18n": "^2.1.
|
|
143
|
+
"@djangocfg/i18n": "^2.1.293",
|
|
144
144
|
"@djangocfg/playground": "workspace:*",
|
|
145
|
-
"@djangocfg/typescript-config": "^2.1.
|
|
146
|
-
"@djangocfg/ui-core": "^2.1.
|
|
145
|
+
"@djangocfg/typescript-config": "^2.1.293",
|
|
146
|
+
"@djangocfg/ui-core": "^2.1.293",
|
|
147
147
|
"@types/lodash-es": "^4.17.12",
|
|
148
148
|
"@types/mapbox__mapbox-gl-draw": "^1.4.8",
|
|
149
149
|
"@types/node": "^24.7.2",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import React from 'react';
|
|
3
|
+
import React, { useEffect, useRef } from 'react';
|
|
4
4
|
|
|
5
5
|
import { Tooltip, TooltipContent, TooltipTrigger } from '@djangocfg/ui-core/components';
|
|
6
6
|
import { cn } from '@djangocfg/ui-core/lib';
|
|
@@ -35,10 +35,21 @@ export const EndpointRow = React.memo(function EndpointRow({
|
|
|
35
35
|
// in ``.`` which looks like punctuation noise when stacked in a list.
|
|
36
36
|
const displayLabel = row.label.replace(/\.$/, '');
|
|
37
37
|
|
|
38
|
+
// Keep the active row visible inside the sidebar's scroll container.
|
|
39
|
+
// ``block: 'nearest'`` is a no-op when the row is already in view,
|
|
40
|
+
// so this only fires when the user scrolled the docs far enough to
|
|
41
|
+
// push the highlighted endpoint above/below the sidebar viewport.
|
|
42
|
+
const buttonRef = useRef<HTMLButtonElement | null>(null);
|
|
43
|
+
useEffect(() => {
|
|
44
|
+
if (!row.isActive || !buttonRef.current) return;
|
|
45
|
+
buttonRef.current.scrollIntoView({ block: 'nearest', inline: 'nearest' });
|
|
46
|
+
}, [row.isActive]);
|
|
47
|
+
|
|
38
48
|
return (
|
|
39
49
|
<Tooltip delayDuration={350}>
|
|
40
50
|
<TooltipTrigger asChild>
|
|
41
51
|
<button
|
|
52
|
+
ref={buttonRef}
|
|
42
53
|
onClick={() => onNavigate(row.anchor, row.schemaId)}
|
|
43
54
|
aria-current={row.isActive ? 'location' : undefined}
|
|
44
55
|
className={cn(
|
|
@@ -24,7 +24,7 @@ export function SidebarBody({ body, onNavigate }: SidebarBodyProps) {
|
|
|
24
24
|
);
|
|
25
25
|
}
|
|
26
26
|
return (
|
|
27
|
-
<nav className="
|
|
27
|
+
<nav className="pt-1.5 pb-[10vh]">
|
|
28
28
|
{body.categories.map((cat) => (
|
|
29
29
|
<CategoryBlock key={cat.key} category={cat} onNavigate={onNavigate} />
|
|
30
30
|
))}
|