@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.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +52 -45
- package/dist/index.mjs.map +1 -1
- package/dist/types/src/components/blocks/SideNav.d.ts +18 -1
- package/package.json +1 -1
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,
|
|
13802
|
-
let { pathname:
|
|
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
|
-
|
|
13811
|
+
O((e) => {
|
|
13805
13812
|
let t = new Set(e);
|
|
13806
|
-
return
|
|
13807
|
-
e.children?.some((e) => Pf(
|
|
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
|
-
}, [
|
|
13811
|
-
let
|
|
13812
|
-
|
|
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
|
-
}, []),
|
|
13817
|
-
|
|
13818
|
-
},
|
|
13819
|
-
|
|
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 (
|
|
13822
|
-
let
|
|
13823
|
-
return
|
|
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:
|
|
13828
|
-
showIcons:
|
|
13829
|
-
onToggle:
|
|
13834
|
+
openItems: D,
|
|
13835
|
+
showIcons: o,
|
|
13836
|
+
onToggle: j
|
|
13830
13837
|
}))) : /* @__PURE__ */ t.createElement("div", {
|
|
13831
|
-
className: X("min-h-0",
|
|
13838
|
+
className: X("min-h-0", g.SideNav.wrapperClassName),
|
|
13832
13839
|
style: {
|
|
13833
|
-
width:
|
|
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:
|
|
13848
|
+
width: A ? jf : Mf,
|
|
13842
13849
|
transition: "width 220ms cubic-bezier(0.4,0,0.2,1)",
|
|
13843
|
-
position:
|
|
13850
|
+
position: C ? "absolute" : "sticky",
|
|
13844
13851
|
top: 0,
|
|
13845
|
-
zIndex:
|
|
13846
|
-
boxShadow:
|
|
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",
|
|
13852
|
-
onMouseEnter:
|
|
13853
|
-
onMouseLeave:
|
|
13854
|
-
},
|
|
13855
|
-
className: X("flex h-14 shrink-0 items-center border-b px-1.5",
|
|
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: +!!
|
|
13858
|
-
maxWidth:
|
|
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" },
|
|
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:
|
|
13866
|
-
openItems:
|
|
13867
|
-
showIcons:
|
|
13868
|
-
onToggle:
|
|
13869
|
-
}))), (
|
|
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
|
-
|
|
13878
|
+
w((e) => !e), E(!1);
|
|
13872
13879
|
},
|
|
13873
|
-
title:
|
|
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",
|
|
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:
|
|
13883
|
+
name: C ? "chevrons-right" : "chevrons-left",
|
|
13877
13884
|
size: 16
|
|
13878
|
-
})),
|
|
13885
|
+
})), u && /* @__PURE__ */ t.createElement("div", { style: {
|
|
13879
13886
|
flex: 1,
|
|
13880
13887
|
minWidth: 0,
|
|
13881
|
-
opacity: +!!
|
|
13882
|
-
maxWidth:
|
|
13888
|
+
opacity: +!!A,
|
|
13889
|
+
maxWidth: A ? "100%" : "0px",
|
|
13883
13890
|
overflow: "hidden",
|
|
13884
13891
|
transition: "opacity 150ms ease, max-width 200ms ease"
|
|
13885
|
-
} },
|
|
13892
|
+
} }, u))));
|
|
13886
13893
|
}
|
|
13887
13894
|
//#endregion
|
|
13888
13895
|
//#region src/components/widgets/grid-core/useGridDBRecords.ts
|