@llmnative/react 1.20.0 → 1.21.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
@@ -938,6 +938,7 @@ var Kt = {
938
938
  overlayClassName: "shadow-xl",
939
939
  headerClassName: "border-b border-border/60 px-1.5 py-2",
940
940
  navClassName: "px-1.5 py-2",
941
+ bottomNavClassName: "border-t border-border/60 px-1.5 py-2",
941
942
  footerClassName: "border-t border-border/60 px-1.5 py-2",
942
943
  groupLabelClassName: "text-[10.5px] font-semibold uppercase tracking-widest text-muted-foreground/60 select-none",
943
944
  groupDividerClassName: "bg-border/50",
@@ -1492,6 +1493,7 @@ var Kt = {
1492
1493
  overlayClassName: "shadow-lg",
1493
1494
  headerClassName: "border-b border-border px-1.5 py-2",
1494
1495
  navClassName: "px-1.5 py-2",
1496
+ bottomNavClassName: "border-t border-border px-1.5 py-2",
1495
1497
  footerClassName: "border-t border-border px-1.5 py-2",
1496
1498
  groupLabelClassName: "text-[10px] font-semibold uppercase tracking-[0.16em] text-muted-foreground/70 select-none",
1497
1499
  groupDividerClassName: "bg-border/60",
@@ -2043,6 +2045,7 @@ var Kt = {
2043
2045
  overlayClassName: "shadow-[0_0_32px_rgba(16,185,129,0.18)]",
2044
2046
  headerClassName: "border-b border-border px-1.5 py-2",
2045
2047
  navClassName: "px-1.5 py-2",
2048
+ bottomNavClassName: "border-t border-border px-1.5 py-2",
2046
2049
  footerClassName: "border-t border-border px-1.5 py-2",
2047
2050
  groupLabelClassName: "text-[10px] font-semibold uppercase tracking-[0.18em] text-muted-foreground/70 select-none",
2048
2051
  groupDividerClassName: "bg-border/70",
@@ -13980,6 +13983,7 @@ function sp({ children: e, open: n }) {
13980
13983
  return /* @__PURE__ */ t.createElement(v, {
13981
13984
  key: e.path,
13982
13985
  to: e.path,
13986
+ "aria-current": n ? "page" : void 0,
13983
13987
  className: X("flex items-center rounded-md pl-9 pr-3 py-[6px] text-sm transition-colors", i.SideNav.subItemClassName, n ? i.SideNav.subItemActiveClassName : i.SideNav.subItemInactiveClassName)
13984
13988
  }, /* @__PURE__ */ t.createElement("span", { className: "flex-1 truncate" }, e.title), e.badge !== void 0 && /* @__PURE__ */ t.createElement(op, { value: e.badge }));
13985
13989
  })));
@@ -13998,6 +14002,7 @@ function cp({ item: e, expanded: n, open: r, showIcons: i, onToggle: a }) {
13998
14002
  return l ? /* @__PURE__ */ t.createElement("div", null, /* @__PURE__ */ t.createElement("div", { className: "flex items-center gap-0.5" }, /* @__PURE__ */ t.createElement(v, {
13999
14003
  to: e.path,
14000
14004
  title: n ? void 0 : e.title,
14005
+ "aria-current": u ? "page" : void 0,
14001
14006
  className: X("flex-1 flex items-center gap-2.5 rounded-md px-2 py-[7px] text-sm transition-colors", s.SideNav.itemClassName, f)
14002
14007
  }, p, /* @__PURE__ */ t.createElement("span", {
14003
14008
  style: m,
@@ -14019,6 +14024,7 @@ function cp({ item: e, expanded: n, open: r, showIcons: i, onToggle: a }) {
14019
14024
  })) : /* @__PURE__ */ t.createElement(v, {
14020
14025
  to: e.path,
14021
14026
  title: n ? void 0 : e.title,
14027
+ "aria-current": u ? "page" : void 0,
14022
14028
  className: X(h, f)
14023
14029
  }, p, /* @__PURE__ */ t.createElement("span", {
14024
14030
  style: m,
@@ -14039,46 +14045,46 @@ function lp({ group: e, expanded: n, openItems: r, showIcons: i, onToggle: a })
14039
14045
  onToggle: a
14040
14046
  }))));
14041
14047
  }
14042
- function up({ menuKey: e, items: n, defaultCollapsed: r = !1, collapsed: i, onCollapsedChange: a, showIcons: o = !0, showCollapseButton: c = !0, footer: u, header: d, embedded: f = !1 }) {
14043
- let { pathname: p } = x(), g = Y("sideNav"), _ = Fn("sideNav"), v = Ig(e ?? ""), y = n ?? (e ? rp(v) : []), b = i !== void 0, [S, C] = h(r), w = i === void 0 ? S : i, T = s((e) => {
14044
- let t = typeof e == "function" ? e(w) : e;
14045
- b ? a?.(t) : C(t);
14048
+ function up({ menuKey: e, items: n, bottomItems: r = [], defaultCollapsed: i = !1, collapsed: a, onCollapsedChange: o, showIcons: c = !0, showCollapseButton: u = !0, footer: d, header: f, embedded: p = !1 }) {
14049
+ let { pathname: g } = x(), _ = Y("sideNav"), v = Fn("sideNav"), y = Ig(e ?? ""), b = n ?? (e ? rp(y) : []), S = a !== void 0, [C, w] = h(i), T = a === void 0 ? C : a, E = s((e) => {
14050
+ let t = typeof e == "function" ? e(T) : e;
14051
+ S ? o?.(t) : w(t);
14046
14052
  }, [
14047
- b,
14048
- w,
14049
- a
14050
- ]), [E, D] = h(!1), [O, k] = h(/* @__PURE__ */ new Set()), A = m(null), j = !w || E;
14053
+ S,
14054
+ T,
14055
+ o
14056
+ ]), [D, O] = h(!1), [k, A] = h(/* @__PURE__ */ new Set()), j = m(null), M = !T || D;
14051
14057
  l(() => {
14052
- k((e) => {
14058
+ A((e) => {
14053
14059
  let t = new Set(e);
14054
- return y.forEach((e) => {
14055
- e.children?.some((e) => ip(p, e.path, e.end)) && t.add(e.path);
14060
+ return [...b, ...r].forEach((e) => {
14061
+ e.children?.some((e) => ip(g, e.path, e.end)) && t.add(e.path);
14056
14062
  }), t;
14057
14063
  });
14058
- }, [p]);
14059
- let M = s((e) => {
14060
- k((t) => {
14064
+ }, [g]);
14065
+ let N = s((e) => {
14066
+ A((t) => {
14061
14067
  let n = new Set(t);
14062
14068
  return n.has(e) ? n.delete(e) : n.add(e), n;
14063
14069
  });
14064
- }, []), N = () => {
14065
- w && (A.current && clearTimeout(A.current), D(!0));
14066
- }, P = () => {
14067
- w && (A.current = setTimeout(() => D(!1), 80));
14070
+ }, []), P = () => {
14071
+ T && (j.current && clearTimeout(j.current), O(!0));
14072
+ }, F = () => {
14073
+ T && (j.current = setTimeout(() => O(!1), 80));
14068
14074
  };
14069
- if (y.length === 0) return null;
14070
- let F = ap(y);
14071
- return f ? /* @__PURE__ */ t.createElement("nav", { className: X("px-1.5 py-2", g.SideNav.navClassName) }, F.map((e) => /* @__PURE__ */ t.createElement(lp, {
14075
+ if (b.length === 0 && r.length === 0) return null;
14076
+ let I = ap(b), L = ap(r), R = (e, n) => e.map((e) => /* @__PURE__ */ t.createElement(lp, {
14072
14077
  key: e.key,
14073
14078
  group: e,
14074
- expanded: !0,
14075
- openItems: O,
14076
- showIcons: o,
14077
- onToggle: M
14078
- }))) : /* @__PURE__ */ t.createElement("div", {
14079
- className: X("min-h-0", g.SideNav.wrapperClassName),
14079
+ expanded: n,
14080
+ openItems: k,
14081
+ showIcons: c,
14082
+ onToggle: N
14083
+ }));
14084
+ return p ? /* @__PURE__ */ t.createElement("nav", { className: X("px-1.5 py-2", _.SideNav.navClassName) }, R(I, !0), L.length > 0 && /* @__PURE__ */ t.createElement("div", { className: X("mt-2 border-t pt-2", _.SideNav.bottomNavClassName) }, R(L, !0))) : /* @__PURE__ */ t.createElement("div", {
14085
+ className: X("min-h-0", _.SideNav.wrapperClassName),
14080
14086
  style: {
14081
- width: w ? np : tp,
14087
+ width: T ? np : tp,
14082
14088
  height: "100%",
14083
14089
  transition: "width 220ms cubic-bezier(0.4,0,0.2,1)",
14084
14090
  flexShrink: 0,
@@ -14086,52 +14092,45 @@ function up({ menuKey: e, items: n, defaultCollapsed: r = !1, collapsed: i, onCo
14086
14092
  }
14087
14093
  }, /* @__PURE__ */ t.createElement("aside", {
14088
14094
  style: {
14089
- width: j ? tp : np,
14095
+ width: M ? tp : np,
14090
14096
  transition: "width 220ms cubic-bezier(0.4,0,0.2,1)",
14091
- position: w ? "absolute" : "sticky",
14097
+ position: T ? "absolute" : "sticky",
14092
14098
  top: 0,
14093
- zIndex: w && E ? 50 : 10,
14094
- boxShadow: w && E ? "4px 0 24px rgba(0,0,0,0.10)" : "none",
14099
+ zIndex: T && D ? 50 : 10,
14100
+ boxShadow: T && D ? "4px 0 24px rgba(0,0,0,0.10)" : "none",
14095
14101
  height: "100%",
14096
14102
  overflowX: "hidden",
14097
14103
  overflowY: "hidden"
14098
14104
  },
14099
- className: X("flex min-h-0 flex-col border-r bg-background", g.SideNav.shellClassName, w && E && g.SideNav.overlayClassName),
14100
- onMouseEnter: N,
14101
- onMouseLeave: P
14102
- }, d && /* @__PURE__ */ t.createElement("div", {
14103
- className: X("flex h-14 shrink-0 items-center border-b px-1.5", g.SideNav.headerClassName),
14105
+ className: X("flex min-h-0 flex-col border-r bg-background", _.SideNav.shellClassName, T && D && _.SideNav.overlayClassName),
14106
+ onMouseEnter: P,
14107
+ onMouseLeave: F
14108
+ }, f && /* @__PURE__ */ t.createElement("div", {
14109
+ className: X("flex h-14 shrink-0 items-center border-b px-1.5", _.SideNav.headerClassName),
14104
14110
  style: {
14105
- opacity: +!!j,
14106
- maxWidth: j ? "100%" : "0px",
14111
+ opacity: +!!M,
14112
+ maxWidth: M ? "100%" : "0px",
14107
14113
  overflow: "hidden",
14108
14114
  transition: "opacity 150ms ease, max-width 200ms ease"
14109
14115
  }
14110
- }, /* @__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) }, F.map((e) => /* @__PURE__ */ t.createElement(lp, {
14111
- key: e.key,
14112
- group: e,
14113
- expanded: j,
14114
- openItems: O,
14115
- showIcons: o,
14116
- onToggle: M
14117
- }))), (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", {
14116
+ }, /* @__PURE__ */ t.createElement("div", { className: "min-w-0 flex-1" }, f)), /* @__PURE__ */ t.createElement("nav", { className: X("min-h-0 flex-1 overflow-y-auto overflow-x-hidden px-1.5 py-2", _.SideNav.navClassName) }, R(I, M)), L.length > 0 && /* @__PURE__ */ t.createElement("div", { className: X("shrink-0 border-t px-1.5 py-2", _.SideNav.bottomNavClassName) }, R(L, M)), (u || d) && /* @__PURE__ */ t.createElement("div", { className: X("shrink-0 border-t px-1.5 py-2 flex items-center gap-1", _.SideNav.footerClassName) }, u && /* @__PURE__ */ t.createElement("button", {
14118
14117
  onClick: () => {
14119
- T((e) => !e), D(!1);
14118
+ E((e) => !e), O(!1);
14120
14119
  },
14121
- title: w ? _.expandSidebar : _.collapseSidebar,
14122
- "aria-label": w ? _.expandSidebar : _.collapseSidebar,
14123
- 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)
14120
+ title: T ? v.expandSidebar : v.collapseSidebar,
14121
+ "aria-label": T ? v.expandSidebar : v.collapseSidebar,
14122
+ 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", _.SideNav.collapseButtonClassName)
14124
14123
  }, /* @__PURE__ */ t.createElement(Q, {
14125
- name: w ? "chevrons-right" : "chevrons-left",
14124
+ name: T ? "chevrons-right" : "chevrons-left",
14126
14125
  size: 16
14127
- })), u && /* @__PURE__ */ t.createElement("div", { style: {
14126
+ })), d && /* @__PURE__ */ t.createElement("div", { style: {
14128
14127
  flex: 1,
14129
14128
  minWidth: 0,
14130
- opacity: +!!j,
14131
- maxWidth: j ? "100%" : "0px",
14129
+ opacity: +!!M,
14130
+ maxWidth: M ? "100%" : "0px",
14132
14131
  overflow: "hidden",
14133
14132
  transition: "opacity 150ms ease, max-width 200ms ease"
14134
- } }, u))));
14133
+ } }, d))));
14135
14134
  }
14136
14135
  //#endregion
14137
14136
  //#region src/components/widgets/grid-core/useGridDBRecords.ts