@llmnative/react 1.18.0 → 1.18.1

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
@@ -14786,12 +14786,14 @@ var dm = ({ children: e, name: n, onChange: r = void 0, onAdd: i = void 0, onRem
14786
14786
  content: /* @__PURE__ */ t.createElement("div", { className: mf() }, w)
14787
14787
  }));
14788
14788
  }, fm = ({ records: e, children: n, limit: r = void 0, page: i = void 0, maxPageButtons: a = void 0, appendTo: o = void 0, before: s = void 0, after: c = void 0, className: u = void 0, wrapperClassName: d = void 0, scrollToTopOnChange: f = void 0, scrollBehavior: m = void 0, align: g = void 0, sticky: _ = void 0 }) => {
14789
- let v = Y("pagination"), y = Fn("common"), [b, x] = h(i || 1), S = r || e.length, C = Math.ceil(e.length / S), w = (b - 1) * S, T = w + S, E = p(() => e.slice(w, T), [
14789
+ let v = Y("pagination"), y = Fn("common"), [b, x] = h(i || 1), [S, C] = h(e.length);
14790
+ e.length !== S && (C(e.length), x(1));
14791
+ let w = r || e.length, T = Math.ceil(e.length / w), E = (b - 1) * w, D = E + w, O = p(() => e.slice(E, D), [
14790
14792
  e,
14791
- w,
14792
- T
14793
- ]), D = (e) => {
14794
- e >= 1 && e <= C && x(e);
14793
+ E,
14794
+ D
14795
+ ]), k = (e) => {
14796
+ e >= 1 && e <= T && x(e);
14795
14797
  };
14796
14798
  l(() => {
14797
14799
  (f || v.Pagination.scrollToTop) && window.scrollTo({
@@ -14803,52 +14805,52 @@ var dm = ({ children: e, name: n, onChange: r = void 0, onAdd: i = void 0, onRem
14803
14805
  f,
14804
14806
  m
14805
14807
  ]);
14806
- let O = p(() => {
14807
- let e = Math.min(a || v.Pagination.maxItems, C), t = Math.max(1, b - Math.floor(e / 2)), n = t + e - 1;
14808
- return n > C && (n = C, t = Math.max(1, n - e + 1)), Array.from({ length: n - t + 1 }, (e, n) => t + n);
14808
+ let A = p(() => {
14809
+ let e = Math.min(a || v.Pagination.maxItems, T), t = Math.max(1, b - Math.floor(e / 2)), n = t + e - 1;
14810
+ return n > T && (n = T, t = Math.max(1, n - e + 1)), Array.from({ length: n - t + 1 }, (e, n) => t + n);
14809
14811
  }, [
14810
14812
  b,
14811
14813
  a,
14812
- C
14813
- ]), k = b === 1 ? "disabled" : "", A = b === C ? "disabled" : "", M = {
14814
+ T
14815
+ ]), M = b === 1 ? "disabled" : "", N = b === T ? "disabled" : "", P = {
14814
14816
  start: "justify-start",
14815
14817
  center: "justify-center",
14816
14818
  end: "justify-end"
14817
- }[g || v.Pagination.align] || "justify-end", N = e.length > S && (_ ?? v.Pagination.sticky), P = /* @__PURE__ */ t.createElement(Z, {
14818
- className: (d || v.Pagination.wrapperClassName) + (N ? ` ${v.Pagination.stickyClassName}` : ""),
14819
- style: N ? {
14819
+ }[g || v.Pagination.align] || "justify-end", F = e.length > w && (_ ?? v.Pagination.sticky), I = /* @__PURE__ */ t.createElement(Z, {
14820
+ className: (d || v.Pagination.wrapperClassName) + (F ? ` ${v.Pagination.stickyClassName}` : ""),
14821
+ style: F ? {
14820
14822
  backdropFilter: "blur(10px)",
14821
14823
  backgroundColor: "rgba(255, 255, 255, 0.1)"
14822
14824
  } : {}
14823
- }, s, e.length > S && /* @__PURE__ */ t.createElement("nav", {
14825
+ }, s, e.length > w && /* @__PURE__ */ t.createElement("nav", {
14824
14826
  "aria-label": y.pageNavigation,
14825
- className: `${u || v.Pagination.className} flex w-full ${M}`
14827
+ className: `${u || v.Pagination.className} flex w-full ${P}`
14826
14828
  }, /* @__PURE__ */ t.createElement("ul", { className: "flex items-center gap-1" }, /* @__PURE__ */ t.createElement("li", { className: "mr-2" }, /* @__PURE__ */ t.createElement("button", {
14827
14829
  type: "button",
14828
- onClick: () => D(1),
14829
- disabled: k === "disabled",
14830
- className: X("inline-flex h-9 min-w-[2.25rem] items-center justify-center rounded-md border bg-background px-3 text-sm transition-colors", k === "disabled" ? "pointer-events-none opacity-40" : "cursor-pointer hover:bg-accent hover:text-accent-foreground")
14830
+ onClick: () => k(1),
14831
+ disabled: M === "disabled",
14832
+ className: X("inline-flex h-9 min-w-[2.25rem] items-center justify-center rounded-md border bg-background px-3 text-sm transition-colors", M === "disabled" ? "pointer-events-none opacity-40" : "cursor-pointer hover:bg-accent hover:text-accent-foreground")
14831
14833
  }, /* @__PURE__ */ t.createElement("span", null, "«"))), /* @__PURE__ */ t.createElement("li", null, /* @__PURE__ */ t.createElement("button", {
14832
14834
  type: "button",
14833
- disabled: k === "disabled",
14834
- className: X("inline-flex h-9 min-w-[2.25rem] items-center justify-center rounded-md border bg-background px-3 text-sm transition-colors", k === "disabled" ? "pointer-events-none opacity-40" : "cursor-pointer hover:bg-accent hover:text-accent-foreground"),
14835
- onClick: () => D(b - 1)
14836
- }, /* @__PURE__ */ t.createElement("span", null, "‹"))), O.map((e) => /* @__PURE__ */ t.createElement("li", { key: e }, /* @__PURE__ */ t.createElement("button", {
14835
+ disabled: M === "disabled",
14836
+ className: X("inline-flex h-9 min-w-[2.25rem] items-center justify-center rounded-md border bg-background px-3 text-sm transition-colors", M === "disabled" ? "pointer-events-none opacity-40" : "cursor-pointer hover:bg-accent hover:text-accent-foreground"),
14837
+ onClick: () => k(b - 1)
14838
+ }, /* @__PURE__ */ t.createElement("span", null, "‹"))), A.map((e) => /* @__PURE__ */ t.createElement("li", { key: e }, /* @__PURE__ */ t.createElement("button", {
14837
14839
  type: "button",
14838
- onClick: () => D(e),
14840
+ onClick: () => k(e),
14839
14841
  className: X("inline-flex h-9 min-w-[2.25rem] items-center justify-center rounded-md border bg-background px-3 text-sm transition-colors cursor-pointer hover:bg-accent hover:text-accent-foreground", b === e && "border-primary bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground")
14840
14842
  }, e))), /* @__PURE__ */ t.createElement("li", { className: "ml-2" }, /* @__PURE__ */ t.createElement("button", {
14841
14843
  type: "button",
14842
- disabled: A === "disabled",
14843
- className: X("inline-flex h-9 min-w-[2.25rem] items-center justify-center rounded-md border bg-background px-3 text-sm transition-colors", A === "disabled" ? "pointer-events-none opacity-40" : "cursor-pointer hover:bg-accent hover:text-accent-foreground"),
14844
- onClick: () => D(b + 1)
14844
+ disabled: N === "disabled",
14845
+ className: X("inline-flex h-9 min-w-[2.25rem] items-center justify-center rounded-md border bg-background px-3 text-sm transition-colors", N === "disabled" ? "pointer-events-none opacity-40" : "cursor-pointer hover:bg-accent hover:text-accent-foreground"),
14846
+ onClick: () => k(b + 1)
14845
14847
  }, /* @__PURE__ */ t.createElement("span", null, "›"))), /* @__PURE__ */ t.createElement("li", null, /* @__PURE__ */ t.createElement("button", {
14846
14848
  type: "button",
14847
- onClick: () => D(C),
14848
- disabled: A === "disabled",
14849
- className: X("inline-flex h-9 min-w-[2.25rem] items-center justify-center rounded-md border bg-background px-3 text-sm transition-colors", A === "disabled" ? "pointer-events-none opacity-40" : "cursor-pointer hover:bg-accent hover:text-accent-foreground")
14849
+ onClick: () => k(T),
14850
+ disabled: N === "disabled",
14851
+ className: X("inline-flex h-9 min-w-[2.25rem] items-center justify-center rounded-md border bg-background px-3 text-sm transition-colors", N === "disabled" ? "pointer-events-none opacity-40" : "cursor-pointer hover:bg-accent hover:text-accent-foreground")
14850
14852
  }, /* @__PURE__ */ t.createElement("span", null, "»"))))), c);
14851
- return /* @__PURE__ */ t.createElement(t.Fragment, null, n(E, w), o ? j(P, o) : o === void 0 && P);
14853
+ return /* @__PURE__ */ t.createElement(t.Fragment, null, n(O, E), o ? j(I, o) : o === void 0 && I);
14852
14854
  }, pm = ({ records: e = void 0, header: n = void 0, footer: r = void 0, overlays: i = void 0, renderItem: a = void 0, onRowClick: o = void 0, onSelectionChange: c = void 0, sortable: u = !1, pagination: d = void 0, gap: f = void 0, columns: g = void 0, groupBy: _ = void 0, selectedKeys: v = void 0, before: y = void 0, after: b = void 0, wrapperClassName: x = void 0, className: S = void 0, headerClassName: C = void 0, scrollClassName: w = void 0, bodyClassName: T = void 0, footerClassName: E = void 0, selectedClassName: D = void 0 }) => {
14853
14855
  let O = Y("gallery"), k = Fn("gallery"), A = Fn("common"), j = D || O.Gallery.selectedClassName, [M, N] = h(null), P = s((e) => {
14854
14856
  e && N(e);