@llmnative/react 1.10.3 → 1.11.0

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/index.mjs CHANGED
@@ -13798,39 +13798,46 @@ function zf({ group: e, expanded: n, openItems: r, showIcons: i, onToggle: a })
13798
13798
  onToggle: a
13799
13799
  }))));
13800
13800
  }
13801
- function Bf({ menuKey: e, items: n, defaultCollapsed: r = !1, showIcons: i = !0, showCollapseButton: a = !0, footer: o, header: c, embedded: u = !1 }) {
13802
- let { pathname: d } = x(), f = Y("sideNav"), p = Uh(e ?? ""), g = n ?? (e ? Nf(p) : []), [_, v] = h(r), [y, b] = h(!1), [S, C] = h(/* @__PURE__ */ new Set()), w = m(null), T = !_ || y;
13801
+ function Bf({ menuKey: e, items: n, defaultCollapsed: r = !1, collapsed: i, onCollapsedChange: a, showIcons: o = !0, showCollapseButton: c = !0, footer: u, header: d, embedded: f = !1 }) {
13802
+ let { pathname: p } = x(), g = Y("sideNav"), _ = Uh(e ?? ""), v = n ?? (e ? Nf(_) : []), y = i !== void 0, [b, S] = h(r), C = i === void 0 ? b : i, w = s((e) => {
13803
+ let t = typeof e == "function" ? e(C) : e;
13804
+ y ? a?.(t) : S(t);
13805
+ }, [
13806
+ y,
13807
+ C,
13808
+ a
13809
+ ]), [T, E] = h(!1), [D, O] = h(/* @__PURE__ */ new Set()), k = m(null), A = !C || T;
13803
13810
  l(() => {
13804
- C((e) => {
13811
+ O((e) => {
13805
13812
  let t = new Set(e);
13806
- return g.forEach((e) => {
13807
- e.children?.some((e) => Pf(d, e.path, e.end)) && t.add(e.path);
13813
+ return v.forEach((e) => {
13814
+ e.children?.some((e) => Pf(p, e.path, e.end)) && t.add(e.path);
13808
13815
  }), t;
13809
13816
  });
13810
- }, [d]);
13811
- let E = s((e) => {
13812
- C((t) => {
13817
+ }, [p]);
13818
+ let j = s((e) => {
13819
+ O((t) => {
13813
13820
  let n = new Set(t);
13814
13821
  return n.has(e) ? n.delete(e) : n.add(e), n;
13815
13822
  });
13816
- }, []), D = () => {
13817
- _ && (w.current && clearTimeout(w.current), b(!0));
13818
- }, O = () => {
13819
- _ && (w.current = setTimeout(() => b(!1), 80));
13823
+ }, []), M = () => {
13824
+ C && (k.current && clearTimeout(k.current), E(!0));
13825
+ }, N = () => {
13826
+ C && (k.current = setTimeout(() => E(!1), 80));
13820
13827
  };
13821
- if (g.length === 0) return null;
13822
- let k = Ff(g);
13823
- return u ? /* @__PURE__ */ t.createElement("nav", { className: X("px-1.5 py-2", f.SideNav.navClassName) }, k.map((e) => /* @__PURE__ */ t.createElement(zf, {
13828
+ if (v.length === 0) return null;
13829
+ let P = Ff(v);
13830
+ return f ? /* @__PURE__ */ t.createElement("nav", { className: X("px-1.5 py-2", g.SideNav.navClassName) }, P.map((e) => /* @__PURE__ */ t.createElement(zf, {
13824
13831
  key: e.key,
13825
13832
  group: e,
13826
13833
  expanded: !0,
13827
- openItems: S,
13828
- showIcons: i,
13829
- onToggle: E
13834
+ openItems: D,
13835
+ showIcons: o,
13836
+ onToggle: j
13830
13837
  }))) : /* @__PURE__ */ t.createElement("div", {
13831
- className: X("min-h-0", f.SideNav.wrapperClassName),
13838
+ className: X("min-h-0", g.SideNav.wrapperClassName),
13832
13839
  style: {
13833
- width: _ ? Mf : jf,
13840
+ width: C ? Mf : jf,
13834
13841
  height: "100%",
13835
13842
  transition: "width 220ms cubic-bezier(0.4,0,0.2,1)",
13836
13843
  flexShrink: 0,
@@ -13838,51 +13845,51 @@ function Bf({ menuKey: e, items: n, defaultCollapsed: r = !1, showIcons: i = !0,
13838
13845
  }
13839
13846
  }, /* @__PURE__ */ t.createElement("aside", {
13840
13847
  style: {
13841
- width: T ? jf : Mf,
13848
+ width: A ? jf : Mf,
13842
13849
  transition: "width 220ms cubic-bezier(0.4,0,0.2,1)",
13843
- position: _ ? "absolute" : "sticky",
13850
+ position: C ? "absolute" : "sticky",
13844
13851
  top: 0,
13845
- zIndex: _ && y ? 50 : 10,
13846
- boxShadow: _ && y ? "4px 0 24px rgba(0,0,0,0.10)" : "none",
13852
+ zIndex: C && T ? 50 : 10,
13853
+ boxShadow: C && T ? "4px 0 24px rgba(0,0,0,0.10)" : "none",
13847
13854
  height: "100%",
13848
13855
  overflowX: "hidden",
13849
13856
  overflowY: "hidden"
13850
13857
  },
13851
- className: X("flex min-h-0 flex-col border-r bg-background", f.SideNav.shellClassName, _ && y && f.SideNav.overlayClassName),
13852
- onMouseEnter: D,
13853
- onMouseLeave: O
13854
- }, c && /* @__PURE__ */ t.createElement("div", {
13855
- className: X("flex h-14 shrink-0 items-center border-b px-1.5", f.SideNav.headerClassName),
13858
+ className: X("flex min-h-0 flex-col border-r bg-background", g.SideNav.shellClassName, C && T && g.SideNav.overlayClassName),
13859
+ onMouseEnter: M,
13860
+ onMouseLeave: N
13861
+ }, d && /* @__PURE__ */ t.createElement("div", {
13862
+ className: X("flex h-14 shrink-0 items-center border-b px-1.5", g.SideNav.headerClassName),
13856
13863
  style: {
13857
- opacity: +!!T,
13858
- maxWidth: T ? "100%" : "0px",
13864
+ opacity: +!!A,
13865
+ maxWidth: A ? "100%" : "0px",
13859
13866
  overflow: "hidden",
13860
13867
  transition: "opacity 150ms ease, max-width 200ms ease"
13861
13868
  }
13862
- }, /* @__PURE__ */ t.createElement("div", { className: "min-w-0 flex-1" }, c)), /* @__PURE__ */ t.createElement("nav", { className: X("min-h-0 flex-1 overflow-y-auto overflow-x-hidden px-1.5 py-2", f.SideNav.navClassName) }, k.map((e) => /* @__PURE__ */ t.createElement(zf, {
13869
+ }, /* @__PURE__ */ t.createElement("div", { className: "min-w-0 flex-1" }, d)), /* @__PURE__ */ t.createElement("nav", { className: X("min-h-0 flex-1 overflow-y-auto overflow-x-hidden px-1.5 py-2", g.SideNav.navClassName) }, P.map((e) => /* @__PURE__ */ t.createElement(zf, {
13863
13870
  key: e.key,
13864
13871
  group: e,
13865
- expanded: T,
13866
- openItems: S,
13867
- showIcons: i,
13868
- onToggle: E
13869
- }))), (a || o) && /* @__PURE__ */ t.createElement("div", { className: X("shrink-0 border-t px-1.5 py-2 flex items-center gap-1", f.SideNav.footerClassName) }, a && /* @__PURE__ */ t.createElement("button", {
13872
+ expanded: A,
13873
+ openItems: D,
13874
+ showIcons: o,
13875
+ onToggle: j
13876
+ }))), (c || u) && /* @__PURE__ */ t.createElement("div", { className: X("shrink-0 border-t px-1.5 py-2 flex items-center gap-1", g.SideNav.footerClassName) }, c && /* @__PURE__ */ t.createElement("button", {
13870
13877
  onClick: () => {
13871
- v((e) => !e), b(!1);
13878
+ w((e) => !e), E(!1);
13872
13879
  },
13873
- title: _ ? "Expand sidebar" : "Collapse sidebar",
13874
- className: X("shrink-0 flex items-center justify-center rounded-md w-8 h-8 transition-colors text-muted-foreground hover:text-foreground hover:bg-accent", f.SideNav.collapseButtonClassName)
13880
+ title: C ? "Expand sidebar" : "Collapse sidebar",
13881
+ className: X("shrink-0 flex items-center justify-center rounded-md w-8 h-8 transition-colors text-muted-foreground hover:text-foreground hover:bg-accent", g.SideNav.collapseButtonClassName)
13875
13882
  }, /* @__PURE__ */ t.createElement(Q, {
13876
- name: _ ? "chevrons-right" : "chevrons-left",
13883
+ name: C ? "chevrons-right" : "chevrons-left",
13877
13884
  size: 16
13878
- })), o && /* @__PURE__ */ t.createElement("div", { style: {
13885
+ })), u && /* @__PURE__ */ t.createElement("div", { style: {
13879
13886
  flex: 1,
13880
13887
  minWidth: 0,
13881
- opacity: +!!T,
13882
- maxWidth: T ? "100%" : "0px",
13888
+ opacity: +!!A,
13889
+ maxWidth: A ? "100%" : "0px",
13883
13890
  overflow: "hidden",
13884
13891
  transition: "opacity 150ms ease, max-width 200ms ease"
13885
- } }, o))));
13892
+ } }, u))));
13886
13893
  }
13887
13894
  //#endregion
13888
13895
  //#region src/components/widgets/grid-core/useGridDBRecords.ts