@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.
@@ -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: "py-1.5", children: body.categories.map((cat) => /* @__PURE__ */ jsxRuntime.jsx(CategoryBlock, { category: cat, onNavigate }, cat.key)) });
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-5WTQR3BR.cjs.map
3464
- //# sourceMappingURL=DocsLayout-5WTQR3BR.cjs.map
3469
+ //# sourceMappingURL=DocsLayout-PLWQJBGU.cjs.map
3470
+ //# sourceMappingURL=DocsLayout-PLWQJBGU.cjs.map