@djangocfg/ui-tools 2.1.292 → 2.1.294
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/README.md +2 -1
- 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
|
@@ -893,10 +893,16 @@ var EndpointRow = React12__default.default.memo(/* @__PURE__ */ chunkWGEGR3DF_cj
|
|
|
893
893
|
onNavigate
|
|
894
894
|
}) {
|
|
895
895
|
const displayLabel = row.label.replace(/\.$/, "");
|
|
896
|
+
const buttonRef = React12.useRef(null);
|
|
897
|
+
React12.useEffect(() => {
|
|
898
|
+
if (!row.isActive || !buttonRef.current) return;
|
|
899
|
+
buttonRef.current.scrollIntoView({ block: "nearest", inline: "nearest" });
|
|
900
|
+
}, [row.isActive]);
|
|
896
901
|
return /* @__PURE__ */ jsxRuntime.jsxs(components.Tooltip, { delayDuration: 350, children: [
|
|
897
902
|
/* @__PURE__ */ jsxRuntime.jsx(components.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
898
903
|
"button",
|
|
899
904
|
{
|
|
905
|
+
ref: buttonRef,
|
|
900
906
|
onClick: () => onNavigate(row.anchor, row.schemaId),
|
|
901
907
|
"aria-current": row.isActive ? "location" : void 0,
|
|
902
908
|
className: lib.cn(
|
|
@@ -944,7 +950,7 @@ function SidebarBody({ body, onNavigate }) {
|
|
|
944
950
|
if (body.categories.length === 0) {
|
|
945
951
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "py-10 px-4 text-center text-xs text-muted-foreground", children: body.emptyText });
|
|
946
952
|
}
|
|
947
|
-
return /* @__PURE__ */ jsxRuntime.jsx("nav", { className: "
|
|
953
|
+
return /* @__PURE__ */ jsxRuntime.jsx("nav", { className: "pt-1.5 pb-[10vh]", children: body.categories.map((cat) => /* @__PURE__ */ jsxRuntime.jsx(CategoryBlock, { category: cat, onNavigate }, cat.key)) });
|
|
948
954
|
}
|
|
949
955
|
if (body.sections.length === 0) {
|
|
950
956
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "py-10 px-4 text-center text-xs text-muted-foreground", children: body.emptyText });
|
|
@@ -3460,5 +3466,5 @@ var DocsLayout = /* @__PURE__ */ chunkWGEGR3DF_cjs.__name(() => {
|
|
|
3460
3466
|
}, "DocsLayout");
|
|
3461
3467
|
|
|
3462
3468
|
exports.DocsLayout = DocsLayout;
|
|
3463
|
-
//# sourceMappingURL=DocsLayout-
|
|
3464
|
-
//# sourceMappingURL=DocsLayout-
|
|
3469
|
+
//# sourceMappingURL=DocsLayout-PLWQJBGU.cjs.map
|
|
3470
|
+
//# sourceMappingURL=DocsLayout-PLWQJBGU.cjs.map
|