asma-ui-core 3.138.0 → 3.138.2

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.
@@ -1,48 +1,48 @@
1
- import { cn as s } from "../../../helpers/cn.js";
1
+ import { cn as n } from "../../../helpers/cn.js";
2
2
  import { resolveSx as K } from "../../../helpers/sx.js";
3
- import { ChevronRightIcon as M } from "../../icons/chevron-right-icon/ChevronRightIcon.js";
4
- import { ChevronLeftIcon as V } from "../../icons/chevron-left-icon/ChevronLeftIcon.js";
5
- import { consumerOverrides as q } from "../../../helpers/classOverride.js";
6
- import { TabsContext as z } from "./TabsContext.js";
7
- import { Children as F, cloneElement as G, isValidElement as J, useCallback as b, useLayoutEffect as Q, useMemo as U, useRef as E, useState as A } from "react";
8
- import { jsx as l, jsxs as B } from "react/jsx-runtime";
9
- var I = 120, le = ({ value: n, onChange: m, variant: g = "standard", scrollButtons: w = "auto", centered: j, size: f = "default", className: p, sx: N, children: x }) => {
10
- const i = E(null), a = E(/* @__PURE__ */ new Map()), [h, O] = A({
3
+ import { ChevronRightIcon as V } from "../../icons/chevron-right-icon/ChevronRightIcon.js";
4
+ import { ChevronLeftIcon as q } from "../../icons/chevron-left-icon/ChevronLeftIcon.js";
5
+ import { consumerOverrides as z } from "../../../helpers/classOverride.js";
6
+ import { TabsContext as F } from "./TabsContext.js";
7
+ import { Children as G, cloneElement as J, isValidElement as Q, useCallback as m, useLayoutEffect as U, useMemo as X, useRef as A, useState as B } from "react";
8
+ import { jsx as l, jsxs as I } from "react/jsx-runtime";
9
+ var j = 120, se = ({ value: i, onChange: b, variant: g = "standard", scrollButtons: w = "auto", centered: N, size: f = "default", className: x, sx: O, children: p }) => {
10
+ const a = A(null), s = A(/* @__PURE__ */ new Map()), [h, W] = B({
11
11
  left: 0,
12
12
  width: 0,
13
13
  disabled: !1
14
- }), [c, W] = A({
14
+ }), [c, _] = B({
15
15
  left: !1,
16
16
  right: !1
17
- }), y = g === "scrollable", v = b((e, t) => {
18
- t ? a.current.set(e, t) : a.current.delete(e);
19
- }, []), S = b((e, t) => m?.(e, t), [m]), d = b(() => {
20
- const e = a.current.get(n), t = i.current;
21
- if (e && O({
17
+ }), y = g === "scrollable", v = m((e, t) => {
18
+ t ? s.current.set(e, t) : s.current.delete(e);
19
+ }, []), S = m((e, t) => b?.(e, t), [b]), d = m(() => {
20
+ const e = s.current.get(i), t = a.current;
21
+ if (e && W({
22
22
  left: e.offsetLeft,
23
23
  width: e.offsetWidth,
24
24
  disabled: e.disabled || e.getAttribute("aria-disabled") === "true"
25
25
  }), t) {
26
- const { scrollLeft: o, scrollWidth: r, clientWidth: u } = t;
27
- W({
26
+ const { scrollLeft: o, clientWidth: r } = t, u = Math.max(0, ...Array.from(s.current.values(), (E) => E.offsetLeft + E.offsetWidth));
27
+ _({
28
28
  left: o > 1,
29
- right: o + u < r - 1
29
+ right: o + r < u - 1
30
30
  });
31
31
  }
32
- }, [n]);
33
- Q(() => {
32
+ }, [i]);
33
+ U(() => {
34
34
  d();
35
- const e = i.current;
35
+ const e = a.current;
36
36
  if (!e) return;
37
37
  const t = new ResizeObserver(d);
38
38
  return t.observe(e), () => t.disconnect();
39
- }, [d, x]);
39
+ }, [d, p]);
40
40
  const k = (e) => {
41
- i.current?.scrollBy({
41
+ a.current?.scrollBy({
42
42
  left: e,
43
43
  behavior: "smooth"
44
44
  });
45
- }, _ = (e) => {
45
+ }, D = (e) => {
46
46
  if (![
47
47
  "ArrowRight",
48
48
  "ArrowLeft",
@@ -50,49 +50,49 @@ var I = 120, le = ({ value: n, onChange: m, variant: g = "standard", scrollButto
50
50
  "End"
51
51
  ].includes(e.key)) return;
52
52
  e.preventDefault();
53
- const t = Array.from(a.current.values());
53
+ const t = Array.from(s.current.values());
54
54
  if (t.length === 0) return;
55
55
  const o = t.findIndex((u) => u === document.activeElement);
56
56
  let r = o;
57
57
  e.key === "ArrowRight" ? r = (o + 1) % t.length : e.key === "ArrowLeft" ? r = (o - 1 + t.length) % t.length : e.key === "Home" ? r = 0 : e.key === "End" && (r = t.length - 1), t[r]?.focus();
58
- }, L = y && w !== !1, R = w === !0, D = L && (R || c.left), P = L && (R || c.right), T = q(p, "padding-x"), H = U(() => ({
59
- value: n,
58
+ }, L = y && w !== !1, R = w === !0, M = L && (R || c.left), P = L && (R || c.right), T = z(x, "padding-x"), H = X(() => ({
59
+ value: i,
60
60
  size: f,
61
61
  onSelect: S,
62
62
  register: v
63
63
  }), [
64
- n,
64
+ i,
65
65
  f,
66
66
  S,
67
67
  v
68
68
  ]), C = "flex h-10 w-10 shrink-0 items-center justify-center self-center rounded-[10%] border border-solid border-delta-500 text-delta-700 transition-colors hover:bg-gama-50 disabled:invisible";
69
- return /* @__PURE__ */ l(z.Provider, {
69
+ return /* @__PURE__ */ l(F.Provider, {
70
70
  value: H,
71
- children: /* @__PURE__ */ B("div", {
72
- className: s("relative flex items-center rounded-t-lg bg-white", !T && "px-4", p),
73
- style: K(N),
71
+ children: /* @__PURE__ */ I("div", {
72
+ className: n("relative flex items-center rounded-t-lg bg-white", !T && "px-4", x),
73
+ style: K(O),
74
74
  children: [
75
- D && /* @__PURE__ */ l("button", {
75
+ M && /* @__PURE__ */ l("button", {
76
76
  type: "button",
77
77
  "aria-label": "scroll tabs left",
78
- className: s(C, "mr-2"),
78
+ className: n(C, "mr-2"),
79
79
  disabled: !c.left,
80
- onClick: () => k(-I),
81
- children: /* @__PURE__ */ l(V, {
80
+ onClick: () => k(-j),
81
+ children: /* @__PURE__ */ l(q, {
82
82
  width: 24,
83
83
  height: 24
84
84
  })
85
85
  }),
86
- /* @__PURE__ */ B("div", {
87
- ref: i,
86
+ /* @__PURE__ */ I("div", {
87
+ ref: a,
88
88
  role: "tablist",
89
89
  "aria-orientation": "horizontal",
90
- onKeyDown: _,
90
+ onKeyDown: D,
91
91
  onScroll: d,
92
- className: s("relative flex bg-[linear-gradient(to_top,var(--colors-delta-200)_1px,transparent_1px)] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden", y ? "flex-1 overflow-x-auto" : "w-full", g === "fullWidth" && "[&>*]:flex-1", j && "justify-center", f === "small" && "min-h-9"),
93
- children: [F.map(x, (e, t) => J(e) ? G(e, { index: t }) : e), /* @__PURE__ */ l("span", {
92
+ className: n("relative flex bg-[linear-gradient(to_top,var(--colors-delta-200)_1px,transparent_1px)] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden", y ? "flex-1 overflow-x-auto" : "w-full", g === "fullWidth" && "[&>*]:flex-1", N && "justify-center", f === "small" && "min-h-9"),
93
+ children: [G.map(p, (e, t) => Q(e) ? J(e, { index: t }) : e), /* @__PURE__ */ l("span", {
94
94
  "aria-hidden": !0,
95
- className: s("absolute bottom-0 h-[3px] transition-all duration-300", h.disabled ? "bg-delta-300" : "bg-gama-500"),
95
+ className: n("absolute bottom-0 h-[3px] transition-all duration-300", h.disabled ? "bg-delta-300" : "bg-gama-500"),
96
96
  style: {
97
97
  left: h.left,
98
98
  width: h.width
@@ -102,10 +102,10 @@ var I = 120, le = ({ value: n, onChange: m, variant: g = "standard", scrollButto
102
102
  P && /* @__PURE__ */ l("button", {
103
103
  type: "button",
104
104
  "aria-label": "scroll tabs right",
105
- className: s(C, "ml-2"),
105
+ className: n(C, "ml-2"),
106
106
  disabled: !c.right,
107
- onClick: () => k(I),
108
- children: /* @__PURE__ */ l(M, {
107
+ onClick: () => k(j),
108
+ children: /* @__PURE__ */ l(V, {
109
109
  width: 24,
110
110
  height: 24
111
111
  })
@@ -115,5 +115,5 @@ var I = 120, le = ({ value: n, onChange: m, variant: g = "standard", scrollButto
115
115
  });
116
116
  };
117
117
  export {
118
- le as StyledTabs
118
+ se as StyledTabs
119
119
  };
@@ -21,7 +21,7 @@ export interface ColumnLayoutDefaults {
21
21
  export interface ColumnSettingsInstance {
22
22
  /**
23
23
  * Reset columns (ASMA-8597): puts the column order and the widths back to the table's defaults, and the
24
- * sorting too when the table saves it (a `uniqueKey`, unless `persistSorting={false}` or the app owns the sorting). It removes the saved entries of what it resets. On a table
24
+ * sorting too when the table has `persistSorting`. It removes the saved entries of what it resets. On a table
25
25
  * with `persistColumnLayout` (ASMA-8695, OQ-02) it also puts the visibility back to the default, unhiding what
26
26
  * the user hid and hiding what is hidden by default; any other table never touches visibility. Set by
27
27
  * `StyledTable`, which knows the defaults.
@@ -2,7 +2,6 @@ import { Table } from '@tanstack/react-table';
2
2
  /**
3
3
  * Saves the column order under `key` when it changes. An order that is `[]` or that matches the live
4
4
  * definition order removes the entry instead (ASMA-8597, REQ-004), so a table the user has put back to its
5
- * defaults stores nothing. Mounting never writes. A table with no key does no work per render (ASMA-8698), and whether the
6
- * order is the default is worked out only when it is about to be saved.
5
+ * defaults stores nothing. Mounting never writes.
7
6
  */
8
7
  export declare function usePersistColumnOrder<TData = unknown>(table: Table<TData>, key?: string | null): void;
@@ -1,27 +1,5 @@
1
1
  import { OnChangeFn, SortingState } from '@tanstack/react-table';
2
2
  export declare const getSortingStorageKey: (uniqueKey?: string) => string | undefined;
3
- /** What decides whether `StyledTable` saves a table's sorting: the props that matter, read from the table's own. */
4
- export interface SortingPersistenceInput {
5
- uniqueKey?: string;
6
- /** The `persistSorting` prop as the app wrote it; `undefined` when it did not. */
7
- persistSorting?: boolean;
8
- /**
9
- * The app owns the sorting state: it passes `state.sorting`, or `onSortingChange`. TanStack hands every change to that
10
- * handler instead of updating the table's own state, so a handler alone is as much the app's state as `state.sorting`.
11
- */
12
- controlled: boolean;
13
- }
14
- /**
15
- * Whether `StyledTable` reads and writes the sorting under `${uniqueKey}:sorting` (ASMA-8698, DEC-8698-OPTOUT).
16
- *
17
- * - No `uniqueKey`: never.
18
- * - `persistSorting={false}`: never, the opt-out for tables whose order is the user's own (drag and drop).
19
- * - `persistSorting={true}`: yes, even when the app owns the sorting state. That is how such an app lets `StyledTable` be the
20
- * only writer of the sort it reads back with `usePersistedSorting`.
21
- * - Not written: yes, unless the app owns the sorting state. A saved sort could not be applied to a state the table does not
22
- * own, and an app that persists its own sort would have two writers fighting over it.
23
- */
24
- export declare const savesSorting: ({ uniqueKey, persistSorting, controlled }: SortingPersistenceInput) => boolean;
25
3
  /** What a saved sort is checked against: the columns that can sort, and the multi-sort rules. */
26
4
  export interface SortingRules {
27
5
  sortableColumns: readonly {
@@ -49,7 +27,7 @@ export interface PersistedSortingOptions {
49
27
  maxMultiSortColCount?: number;
50
28
  }
51
29
  /**
52
- * Reads the sorting `StyledTable` saved for `uniqueKey`, checked against the columns
30
+ * Reads the sorting `StyledTable` saved for `uniqueKey` (with `persistSorting`), checked against the columns
53
31
  * the caller can sort by. Synchronous and pure, so a table that owns its sorting state (for example because
54
32
  * the server sorts) can use the saved sort for its first request. Returns `undefined` when nothing valid is
55
33
  * saved, and `[]` when the user turned sorting off.
@@ -58,8 +36,8 @@ export declare const readPersistedSorting: (uniqueKey: string | undefined, optio
58
36
  /**
59
37
  * Sorting state for a table that owns `state.sorting`: the saved sort on the first render (before the first
60
38
  * request), `defaultSorting` when nothing valid is saved, and the new key's sort after `uniqueKey` changes.
61
- * It never writes: `StyledTable` is the only writer, and it saves a sort the app owns only with `persistSorting` written
62
- * on the table (see `savesSorting`). It takes the same default from `initialState.sorting`, which Reset columns restores.
39
+ * It never writes: `StyledTable` with `persistSorting` is the only writer, and it takes the same default
40
+ * from `initialState.sorting`, which Reset columns restores.
63
41
  *
64
42
  * ```tsx
65
43
  * const { sorting, onSortingChange } = usePersistedSorting({ uniqueKey, defaultSorting, sortableColumnIds })
@@ -25,10 +25,6 @@ interface PersistedStateWriterOptions<T> {
25
25
  * entry is never touched, so the old value can't be copied over the new key.
26
26
  * - When the key goes away (`undefined`), the table goes back to the app's defaults and writes nothing, so
27
27
  * one user's values are not left on screen for whoever is shown next.
28
- *
29
- * It costs a table that does not save the setting nothing per render (ASMA-8698): the value's signature is computed only
30
- * while there is a key (the render that loses the key reads it in the layout effect), and the default's only when a write
31
- * or a reset needs it.
32
28
  */
33
29
  export declare const usePersistedStateWriter: <T>(options: PersistedStateWriterOptions<T>) => void;
34
30
  export {};
@@ -158,21 +158,10 @@ export type StyledTableProps<TData, TCustomData> = {
158
158
  */
159
159
  uniqueKey?: string;
160
160
  /**
161
- * Whether the table saves and restores its sorting under `${uniqueKey}:sorting`, and lets Reset columns reset it
162
- * (ASMA-8698). It does by default: a table with a `uniqueKey` remembers each user's sort, like their column widths. Without
163
- * `uniqueKey` nothing is saved.
164
- *
165
- * - `false` is the opt-out, for a table whose order is the user's own (drag and drop rows) or that must always open as the
166
- * app declares it. Nothing is read or written for sorting then.
167
- * - Leaving it out, or `true`, saves a sort that `StyledTable` owns. `true` is the default spelled out: nothing changes
168
- * for a table that has it (it will not be removed before the next major version).
169
- * - A table whose app owns the sorting state (`state.sorting`, or `onSortingChange`, which TanStack calls instead of
170
- * updating the table's own state) is **not** saved by default: the saved sort could not be applied to a state the table
171
- * does not own, and an app with its own persistence would have two writers. Such a table that wants it saved writes
172
- * `persistSorting` (`true`), makes `StyledTable` the only writer, and reads the sort back with `usePersistedSorting`.
173
- *
174
- * A saved sort of a column that is gone or cannot sort is ignored, and so is storage that is corrupt, full or blocked: the
175
- * table opens with its `initialState.sorting`, which Reset columns also returns to.
161
+ * Temporary opt-in (ASMA-8597, owner decision D1, 2026-10-27): save and restore this table's
162
+ * sorting under `${uniqueKey}:sorting`, and let Reset columns reset it. Needs `uniqueKey`;
163
+ * ignored without it. Off by default until UX and privacy approve the fleet rollout, which
164
+ * makes `uniqueKey` alone enough and retires this prop (follow-up ASMA-8698).
176
165
  */
177
166
  persistSorting?: boolean;
178
167
  /**
@@ -1,16 +1,16 @@
1
- import { tableStorage as s } from "../../helpers/tableStorage.js";
2
- import { isDefaultColumnOrder as c } from "./columnLayout.js";
3
- import { useEffect as i, useRef as f } from "react";
4
- function g(n, r) {
5
- const o = n.getState().columnOrder, t = r ? JSON.stringify(o ?? []) : "", u = f(r), e = f(t);
6
- i(() => {
7
- if (u.current !== r) {
8
- u.current = r, e.current = t;
1
+ import { tableStorage as u } from "../../helpers/tableStorage.js";
2
+ import { isDefaultColumnOrder as i } from "./columnLayout.js";
3
+ import { useEffect as m, useRef as f } from "react";
4
+ function d(n, r) {
5
+ const o = n.getState().columnOrder, t = JSON.stringify(o ?? []), c = !o?.length || i(n), s = f(r), e = f(t);
6
+ m(() => {
7
+ if (s.current !== r) {
8
+ s.current = r, e.current = t;
9
9
  return;
10
10
  }
11
- !r || t === e.current || (e.current = t, !o?.length || c(n) ? s.remove(r) : s.set(r, t));
11
+ !r || t === e.current || (e.current = t, c ? u.remove(r) : u.set(r, t));
12
12
  }, [t, r]);
13
13
  }
14
14
  export {
15
- g as usePersistColumnOrder
15
+ d as usePersistColumnOrder
16
16
  };
@@ -16,30 +16,30 @@ var F = ":column-order", M = ":column-visibility", f = 1, k = (e) => e ? `${e}${
16
16
  const i = C(e);
17
17
  return i.length > 0 ? i : void 0;
18
18
  }, T = (e, i, t) => {
19
- if (!S(e) || !Object.values(e).every((s) => typeof s == "boolean")) return;
20
- const r = K(Object.fromEntries(Object.entries(e).filter(([s]) => p(s, i))), t);
19
+ if (!S(e) || !Object.values(e).every((o) => typeof o == "boolean")) return;
20
+ const r = K(Object.fromEntries(Object.entries(e).filter(([o]) => p(o, i))), t);
21
21
  return Object.keys(r).length > 0 ? r : void 0;
22
22
  }, U = (e) => {
23
- const { enabled: i, uniqueKey: t, legacyOrderKey: r, legacyVisibilityKey: s, columns: o, defaultOrder: g, defaultVisibility: n } = e, d = i ? k(t) : void 0, a = i ? E(t) : void 0, l = o.map((y) => y.id), c = [];
23
+ const { enabled: i, uniqueKey: t, legacyOrderKey: r, legacyVisibilityKey: o, columns: s, defaultOrder: g, defaultVisibility: d } = e, n = i ? k(t) : void 0, a = i ? E(t) : void 0, y = s.map((l) => l.id), c = [];
24
24
  let b, u;
25
- if (d) {
26
- if (v.get(d) !== null) b = D(O(d));
25
+ if (n) {
26
+ if (v.get(n) !== null) b = D(O(n));
27
27
  else if (r && v.get(r) !== null) {
28
- const y = x(O(r)), I = y === void 0 || m(j(y, l), l).join() === m(g, l).join();
29
- y && !I && (b = y), c.push({
28
+ const l = x(O(r)), I = l === void 0 || m(j(l, y), y).join() === m(g, y).join();
29
+ l && !I && (b = l), c.push({
30
30
  legacyKey: r,
31
- ...y && !I && { write: {
32
- key: d,
31
+ ...l && !I && { write: {
32
+ key: n,
33
33
  value: JSON.stringify({
34
34
  v: f,
35
- order: y
35
+ order: l
36
36
  })
37
37
  } }
38
38
  });
39
39
  }
40
40
  }
41
- return a && (v.get(a) !== null ? u = $(O(a), o) : s && v.get(s) !== null && (u = T(O(s), o, n), c.push({
42
- legacyKey: s,
41
+ return a && (v.get(a) !== null ? u = $(O(a), s) : o && v.get(o) !== null && (u = T(O(o), s, d), c.push({
42
+ legacyKey: o,
43
43
  ...u && { write: {
44
44
  key: a,
45
45
  value: JSON.stringify({
@@ -48,18 +48,18 @@ var F = ":column-order", M = ":column-visibility", f = 1, k = (e) => e ? `${e}${
48
48
  })
49
49
  } }
50
50
  }))), {
51
- orderKey: d,
51
+ orderKey: n,
52
52
  visibilityKey: a,
53
53
  order: b,
54
54
  visibility: u,
55
55
  migration: c
56
56
  };
57
57
  }, W = (e, i, t) => {
58
- const r = e.visibility && Object.fromEntries(Object.entries(e.visibility).filter(([s]) => p(s, i)));
58
+ const r = e.visibility && Object.fromEntries(Object.entries(e.visibility).filter(([o]) => p(o, i)));
59
59
  return {
60
60
  orderKey: e.orderKey,
61
61
  visibilityKey: e.visibilityKey,
62
- order: e.order && j(e.order, i.map((s) => s.id)),
62
+ order: e.order && j(e.order, i.map((o) => o.id)),
63
63
  visibility: r && Object.keys(r).length > 0 ? {
64
64
  ...t,
65
65
  ...r
@@ -77,41 +77,41 @@ var F = ":column-order", M = ":column-visibility", f = 1, k = (e) => e ? `${e}${
77
77
  r && !v.set(r.key, r.value) || v.remove(t);
78
78
  }, [i]), W(i, e.columns, e.defaultVisibility);
79
79
  }, V = /* @__PURE__ */ new WeakMap(), Y = (e, i) => [.../* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(i)])].every((t) => (e[t] ?? !0) === (i[t] ?? !0)), G = (e, i) => {
80
- const { enabled: t, definitionIds: r, defaultOrder: s, defaultVisibility: o, controlledVisibility: g } = i, n = {
81
- signature: t ? JSON.stringify([
80
+ const { enabled: t, definitionIds: r, defaultOrder: o, defaultVisibility: s, controlledVisibility: g } = i, d = {
81
+ signature: JSON.stringify([
82
82
  r,
83
- s,
84
- Object.entries(o).sort()
85
- ]) : "",
83
+ o,
84
+ Object.entries(s).sort()
85
+ ]),
86
86
  definitionIds: r,
87
- defaultOrder: s,
88
- defaultVisibility: o
89
- }, d = V.get(e) ?? n, a = t && d.signature !== "" && d.signature !== n.signature;
87
+ defaultOrder: o,
88
+ defaultVisibility: s
89
+ }, n = V.get(e) ?? d, a = t && n.signature !== d.signature;
90
90
  return R(() => {
91
- const l = V.get(e);
92
- if (V.set(e, n), !t || !l || l.signature === "" || l.signature === n.signature) return;
93
- const c = e.getState().columnOrder, b = m(c, l.definitionIds).join() === m(l.defaultOrder, l.definitionIds).join() ? s : j(c, r);
91
+ const y = V.get(e);
92
+ if (V.set(e, d), !t || !y || y.signature === d.signature) return;
93
+ const c = e.getState().columnOrder, b = m(c, y.definitionIds).join() === m(y.defaultOrder, y.definitionIds).join() ? o : j(c, r);
94
94
  if (e.setColumnOrder(b), !g) {
95
- const u = e.getState().columnVisibility, y = {
96
- ...o,
97
- ...K(u, l.defaultVisibility)
95
+ const u = e.getState().columnVisibility, l = {
96
+ ...s,
97
+ ...K(u, y.defaultVisibility)
98
98
  };
99
- Y(y, u) || e.setColumnVisibility(y);
99
+ Y(l, u) || e.setColumnVisibility(l);
100
100
  }
101
101
  }, [
102
102
  e,
103
103
  t,
104
- n.signature
104
+ d.signature
105
105
  ]), a;
106
106
  }, Q = (e, i) => {
107
- const { saved: t, reconciling: r, defaultOrder: s, defaultVisibility: o, controlledVisibility: g } = i;
107
+ const { saved: t, reconciling: r, defaultOrder: o, defaultVisibility: s, controlledVisibility: g } = i, d = A(e);
108
108
  L({
109
109
  storageKey: t.orderKey,
110
110
  state: e.getState().columnOrder,
111
- defaultValue: s,
111
+ defaultValue: o,
112
112
  saved: t.order,
113
113
  settled: !r,
114
- toSignature: (n) => JSON.stringify(m(n, A(e))),
114
+ toSignature: (n) => JSON.stringify(m(n, d)),
115
115
  toStorage: (n) => JSON.stringify({
116
116
  v: f,
117
117
  order: C(n)
@@ -120,14 +120,14 @@ var F = ":column-order", M = ":column-visibility", f = 1, k = (e) => e ? `${e}${
120
120
  }), L({
121
121
  storageKey: t.visibilityKey,
122
122
  state: e.getState().columnVisibility,
123
- defaultValue: o,
123
+ defaultValue: s,
124
124
  saved: t.visibility,
125
125
  settled: !r,
126
126
  controlled: g,
127
- toSignature: (n) => h(n, o),
127
+ toSignature: (n) => h(n, s),
128
128
  toStorage: (n) => JSON.stringify({
129
129
  v: f,
130
- visibility: K(n, o)
130
+ visibility: K(n, s)
131
131
  }),
132
132
  applyState: (n) => e.setColumnVisibility(n)
133
133
  });
@@ -1,30 +1,30 @@
1
- import { readJson as S } from "../helpers/tableStorage.js";
2
- import { useCallback as f, useState as u } from "react";
1
+ import { readJson as l } from "../helpers/tableStorage.js";
2
+ import { useCallback as f, useState as m } from "react";
3
3
  import { functionalUpdate as v } from "@tanstack/react-table";
4
- var m = ":sorting", l = 1, p = [], y = (t) => t ? `${t}${m}` : void 0, R = ({ uniqueKey: t, persistSorting: r, controlled: o }) => !t || r === !1 ? !1 : r === !0 || !o, d = (t) => typeof t == "object" && t !== null && !Array.isArray(t), O = (t, r) => {
5
- if (!d(t) || t.v !== l || !Array.isArray(t.sorting)) return;
4
+ var p = ":sorting", S = 1, u = [], y = (t) => t ? `${t}${p}` : void 0, d = (t) => typeof t == "object" && t !== null && !Array.isArray(t), O = (t, r) => {
5
+ if (!d(t) || t.v !== S || !Array.isArray(t.sorting)) return;
6
6
  const o = t.sorting;
7
7
  if (o.length === 0) return [];
8
- const s = new Map(r.sortableColumns.map((n) => [n.id, n])), a = /* @__PURE__ */ new Set(), i = [];
8
+ const s = new Map(r.sortableColumns.map((n) => [n.id, n])), a = /* @__PURE__ */ new Set(), e = [];
9
9
  for (const n of o) {
10
10
  if (!d(n) || typeof n.id != "string" || typeof n.desc != "boolean") continue;
11
11
  const g = s.get(n.id);
12
- !g || a.has(n.id) || i.length > 0 && (r.enableMultiSort === !1 || !g.canMultiSort) || (a.add(n.id), i.push({
12
+ !g || a.has(n.id) || e.length > 0 && (r.enableMultiSort === !1 || !g.canMultiSort) || (a.add(n.id), e.push({
13
13
  id: n.id,
14
14
  desc: n.desc
15
15
  }));
16
16
  }
17
- const e = r.maxMultiSortColCount, c = e !== void 0 && Number.isFinite(e) && e >= 1 ? i.slice(0, Math.floor(e)) : i;
17
+ const i = r.maxMultiSortColCount, c = i !== void 0 && Number.isFinite(i) && i >= 1 ? e.slice(0, Math.floor(i)) : e;
18
18
  return c.length > 0 ? c : void 0;
19
- }, A = (t) => JSON.stringify({
20
- v: l,
19
+ }, R = (t) => JSON.stringify({
20
+ v: S,
21
21
  sorting: t.map(({ id: r, desc: o }) => ({
22
22
  id: r,
23
23
  desc: o
24
24
  }))
25
- }), I = (t) => JSON.stringify(t.map(({ id: r, desc: o }) => [r, o])), N = (t, r) => {
25
+ }), A = (t) => JSON.stringify(t.map(({ id: r, desc: o }) => [r, o])), N = (t, r) => {
26
26
  const o = y(t);
27
- return o ? O(S(o), r) : void 0;
27
+ return o ? O(l(o), r) : void 0;
28
28
  }, b = ({ sortableColumnIds: t, enableMultiSort: r, maxMultiSortColCount: o }) => ({
29
29
  sortableColumns: t.map((s) => ({
30
30
  id: s,
@@ -32,19 +32,19 @@ var m = ":sorting", l = 1, p = [], y = (t) => t ? `${t}${m}` : void 0, R = ({ un
32
32
  })),
33
33
  enableMultiSort: r,
34
34
  maxMultiSortColCount: o
35
- }), h = (t, r) => N(t, b(r)), _ = ({ uniqueKey: t, defaultSorting: r = p, ...o }) => {
35
+ }), h = (t, r) => N(t, b(r)), I = ({ uniqueKey: t, defaultSorting: r = u, ...o }) => {
36
36
  const s = () => ({
37
37
  key: t,
38
38
  sorting: h(t, o) ?? r
39
- }), [a, i] = u(s);
40
- let e = a;
41
- a.key !== t && (e = s(), i(e));
42
- const c = f((n) => i((g) => ({
39
+ }), [a, e] = m(s);
40
+ let i = a;
41
+ a.key !== t && (i = s(), e(i));
42
+ const c = f((n) => e((g) => ({
43
43
  ...g,
44
44
  sorting: v(n, g.sorting)
45
45
  })), []);
46
46
  return {
47
- sorting: e.sorting,
47
+ sorting: i.sorting,
48
48
  onSortingChange: c
49
49
  };
50
50
  };
@@ -52,8 +52,7 @@ export {
52
52
  y as getSortingStorageKey,
53
53
  h as readPersistedSorting,
54
54
  N as readSortingFromStorage,
55
- R as savesSorting,
56
- A as serializeSorting,
57
- I as sortingSignature,
58
- _ as usePersistedSorting
55
+ R as serializeSorting,
56
+ A as sortingSignature,
57
+ I as usePersistedSorting
59
58
  };
@@ -1,30 +1,30 @@
1
- import { tableStorage as m } from "../helpers/tableStorage.js";
2
- import { useEffect as v, useLayoutEffect as R, useRef as l } from "react";
3
- var E = (a) => {
4
- const { storageKey: t, state: s, defaultValue: o, saved: y, settled: f = !0, controlled: i = !1 } = a, { toSignature: n, toStorage: p, applyState: d } = a, e = t !== void 0 ? n(s) : "", g = l(t), c = l(e), u = l(null);
5
- R(() => {
6
- if (g.current === t) return;
7
- if (g.current = t, u.current = null, c.current = e, !t) {
8
- !i && n(s) !== n(o) && d(o);
1
+ import { tableStorage as y } from "../helpers/tableStorage.js";
2
+ import { useEffect as b, useLayoutEffect as v, useRef as s } from "react";
3
+ var K = (a) => {
4
+ const { storageKey: t, state: l, defaultValue: c, saved: p, settled: f = !0, controlled: i = !1 } = a, { toSignature: o, toStorage: R, applyState: d } = a, e = o(l), g = o(c), S = s(t), u = s(e), n = s(null);
5
+ v(() => {
6
+ if (S.current === t) return;
7
+ if (S.current = t, n.current = null, u.current = e, !t) {
8
+ !i && e !== g && d(c);
9
9
  return;
10
10
  }
11
- const r = y ?? o, S = n(r);
12
- u.current = {
11
+ const r = p ?? c, m = o(r);
12
+ n.current = {
13
13
  stale: e,
14
- loaded: S
15
- }, !i && S !== e && d(r);
16
- }, [t]), v(() => {
14
+ loaded: m
15
+ }, !i && m !== e && d(r);
16
+ }, [t]), b(() => {
17
17
  if (!t || !f) return;
18
- const r = u.current;
18
+ const r = n.current;
19
19
  if (r) {
20
20
  if (e === r.loaded) {
21
- u.current = null, c.current = e;
21
+ n.current = null, u.current = e;
22
22
  return;
23
23
  }
24
24
  if (e === r.stale) return;
25
- u.current = null;
25
+ n.current = null;
26
26
  }
27
- e !== c.current && (c.current = e, e === n(o) ? m.remove(t) : m.set(t, p(s)));
27
+ e !== u.current && (u.current = e, e === g ? y.remove(t) : y.set(t, R(l)));
28
28
  }, [
29
29
  e,
30
30
  t,
@@ -32,5 +32,5 @@ var E = (a) => {
32
32
  ]);
33
33
  };
34
34
  export {
35
- E as usePersistedStateWriter
35
+ K as usePersistedStateWriter
36
36
  };
@@ -1,175 +1,170 @@
1
- import { SELECT_COLUMN_ID as W } from "../types.js";
2
- import { ExpandedRowsFeature as $ } from "../custom-features/expand-rows/ExpandRowsFeature.js";
3
- import { FocusedRowsFeature as ee } from "../custom-features/focus-rows/FocusRowsFeature.js";
4
- import { OrderColumnsFeature as te } from "../custom-features/order-columns/OrderColumnsFeature.js";
5
- import { tableStorage as H } from "../helpers/tableStorage.js";
6
- import { normalizeDefaultColumnOrder as oe } from "../custom-features/order-columns/columnLayout.js";
7
- import { usePersistColumnOrder as ie } from "../custom-features/order-columns/usePersistColumnOrder.js";
8
- import { usePersistedColumnOrder as ne } from "../custom-features/order-columns/usePersistedColumnOrder.js";
9
- import { getPersistedPageSizeKey as re, usePersistedPageSize as le } from "./usePersistedPageSize.js";
10
- import { columnSizingSignature as se, getColumnSizingStorageKey as ae, serializeColumnSizing as ue, usePersistedColumnSizing as de } from "./useColumnSizingPersistence.js";
11
- import { getSortingStorageKey as ge, readSortingFromStorage as me, savesSorting as ce, serializeSorting as Se, sortingSignature as fe } from "./usePersistedSorting.js";
12
- import { usePersistedStateWriter as G } from "./usePersistedStateWriter.js";
13
- import { useColumnLayoutReconcile as ye, useColumnLayoutWriter as Ce, useSavedColumnLayout as be } from "./useColumnLayoutPersistence.js";
14
- import { RowSelectionTooltipFeature as pe } from "../custom-features/row-selection-tooltip/RowSelectionTooltipFeature.js";
15
- import { getLeafColumnInfos as ve } from "../helpers/columnIds.js";
16
- import { resolveColumnSizingDefaults as ze } from "../helpers/columnSizingDefaults.js";
17
- import { STYLED_DEFAULT_SORTING_FN as Re, createStyledDefaultSortingFn as Oe, resolveSortUndefinedDefaults as Ke } from "../helpers/defaultSortingFn.js";
18
- import { useEffect as C, useMemo as b, useRef as p } from "react";
19
- import { getCoreRowModel as Ve, getExpandedRowModel as Me, getFilteredRowModel as Ie, getPaginationRowModel as Le, getSortedRowModel as Fe, useReactTable as we } from "@tanstack/react-table";
20
- var Pe = [], _e = {}, De = [], Ne = { [W]: !1 }, et = (v) => {
21
- const { columns: z, data: A, initialState: u, pageSize: B, enableRowSelection: Y, tableInstanceRef: F, locale: j, persistColumnOrderKey: m, uniqueKey: r, persistSorting: q, persistColumnLayout: J, legacyColumnVisibilityKey: w, defaultColumn: l, ...t } = v, P = u?.sorting ?? Pe, R = u?.columnSizing ?? _e, O = v.enableColumnResizing ?? !0, Z = v.enableColumnResizing === !0, k = b(() => Ke(ze(z, {
22
- defaultColumn: l,
1
+ import { SELECT_COLUMN_ID as H } from "../types.js";
2
+ import { ExpandedRowsFeature as Q } from "../custom-features/expand-rows/ExpandRowsFeature.js";
3
+ import { FocusedRowsFeature as X } from "../custom-features/focus-rows/FocusRowsFeature.js";
4
+ import { OrderColumnsFeature as $ } from "../custom-features/order-columns/OrderColumnsFeature.js";
5
+ import { tableStorage as h } from "../helpers/tableStorage.js";
6
+ import { normalizeDefaultColumnOrder as ee } from "../custom-features/order-columns/columnLayout.js";
7
+ import { usePersistColumnOrder as te } from "../custom-features/order-columns/usePersistColumnOrder.js";
8
+ import { usePersistedColumnOrder as oe } from "../custom-features/order-columns/usePersistedColumnOrder.js";
9
+ import { getPersistedPageSizeKey as ie, usePersistedPageSize as ne } from "./usePersistedPageSize.js";
10
+ import { columnSizingSignature as re, getColumnSizingStorageKey as le, serializeColumnSizing as se, usePersistedColumnSizing as ae } from "./useColumnSizingPersistence.js";
11
+ import { getSortingStorageKey as ue, readSortingFromStorage as de, serializeSorting as ge, sortingSignature as me } from "./usePersistedSorting.js";
12
+ import { usePersistedStateWriter as U } from "./usePersistedStateWriter.js";
13
+ import { useColumnLayoutReconcile as Se, useColumnLayoutWriter as ce, useSavedColumnLayout as fe } from "./useColumnLayoutPersistence.js";
14
+ import { RowSelectionTooltipFeature as ye } from "../custom-features/row-selection-tooltip/RowSelectionTooltipFeature.js";
15
+ import { getLeafColumnInfos as Ce } from "../helpers/columnIds.js";
16
+ import { resolveColumnSizingDefaults as be } from "../helpers/columnSizingDefaults.js";
17
+ import { STYLED_DEFAULT_SORTING_FN as pe, createStyledDefaultSortingFn as ve, resolveSortUndefinedDefaults as ze } from "../helpers/defaultSortingFn.js";
18
+ import { useEffect as C, useMemo as b, useRef as I } from "react";
19
+ import { getCoreRowModel as Re, getExpandedRowModel as Oe, getFilteredRowModel as Ke, getPaginationRowModel as Ve, getSortedRowModel as Me, useReactTable as Ie } from "@tanstack/react-table";
20
+ var Le = [], Fe = {}, we = [], _e = { [H]: !1 }, Qe = (p) => {
21
+ const { columns: v, data: G, initialState: s, pageSize: W, enableRowSelection: A, tableInstanceRef: L, locale: B, persistColumnOrderKey: g, uniqueKey: a, persistSorting: Y, persistColumnLayout: j, legacyColumnVisibilityKey: F, defaultColumn: r, ...t } = p, w = s?.sorting ?? Le, z = s?.columnSizing ?? Fe, R = p.enableColumnResizing ?? !0, q = p.enableColumnResizing === !0, J = b(() => ze(be(v, {
22
+ defaultColumn: r,
23
23
  enableSorting: t.enableSorting,
24
- canResize: O
25
- }), l), [
26
- z,
27
- l,
24
+ canResize: R
25
+ }), r), [
26
+ v,
27
+ r,
28
28
  t.enableSorting,
29
- O
30
- ]), K = ve(z, {
31
- defaultColumn: l,
29
+ R
30
+ ]), O = Ce(v, {
31
+ defaultColumn: r,
32
32
  enableSorting: t.enableSorting,
33
33
  enableMultiSort: t.enableMultiSort,
34
34
  enableHiding: t.enableHiding
35
- }), i = J === !0, _ = K.map((o) => o.id), s = oe(u?.columnOrder ?? De, _), c = u?.columnVisibility ?? Ne, n = be({
35
+ }), i = j === !0, _ = O.map((o) => o.id), l = ee(s?.columnOrder ?? we, _), m = s?.columnVisibility ?? _e, n = fe({
36
36
  enabled: i,
37
- uniqueKey: r,
38
- legacyOrderKey: m,
39
- legacyVisibilityKey: w,
40
- columns: K,
41
- defaultOrder: s,
42
- defaultVisibility: c
43
- }), D = ne(i ? void 0 : m), N = Z ? r : void 0, T = ae(N), V = de(N, R), E = t.state?.sorting !== void 0 || t.onSortingChange !== void 0, S = ce({
44
- uniqueKey: r,
45
- persistSorting: q,
46
- controlled: E
47
- }) ? ge(r) : void 0, M = b(() => S ? me(r, {
48
- sortableColumns: K.filter((o) => o.canSort),
37
+ uniqueKey: a,
38
+ legacyOrderKey: g,
39
+ legacyVisibilityKey: F,
40
+ columns: O,
41
+ defaultOrder: l,
42
+ defaultVisibility: m
43
+ }), D = oe(i ? void 0 : g), P = q ? a : void 0, N = le(P), K = ae(P, z), S = Y ? ue(a) : void 0, V = b(() => S ? de(a, {
44
+ sortableColumns: O.filter((o) => o.canSort),
49
45
  maxMultiSortColCount: t.maxMultiSortColCount
50
- }) : void 0, [S]), d = le(r) ?? B ?? 50, x = p(void 0), Q = b(() => Oe(() => x.current), []), X = b(() => ({
51
- ...l,
52
- sortingFn: l?.sortingFn ?? "styledDefault"
53
- }), [l]), e = we({
46
+ }) : void 0, [S]), u = ne(a) ?? W ?? 50, T = I(void 0), Z = b(() => ve(() => T.current), []), k = b(() => ({
47
+ ...r,
48
+ sortingFn: r?.sortingFn ?? "styledDefault"
49
+ }), [r]), e = Ie({
54
50
  _features: [
51
+ Q,
52
+ X,
55
53
  $,
56
- ee,
57
- te,
58
- pe
54
+ ye
59
55
  ],
60
- columns: k,
61
- data: A,
56
+ columns: J,
57
+ data: G,
62
58
  meta: {
63
- locale: j ?? "en",
59
+ locale: B ?? "en",
64
60
  hideHeader: !!t.hideHeader
65
61
  },
66
62
  initialState: {
67
63
  pagination: {
68
64
  pageIndex: 0,
69
- pageSize: d
65
+ pageSize: u
70
66
  },
71
67
  columnVisibility: {
72
- ...u?.columnVisibility,
73
- [W]: !1
68
+ ...s?.columnVisibility,
69
+ [H]: !1
74
70
  },
75
71
  ...D && { columnOrder: D },
76
- ...u,
77
- ...i && s.length > 0 && { columnOrder: s },
72
+ ...s,
73
+ ...i && l.length > 0 && { columnOrder: l },
78
74
  ...n.order && { columnOrder: n.order },
79
75
  ...n.visibility && { columnVisibility: n.visibility },
80
- ...V && { columnSizing: V },
81
- ...M !== void 0 && { sorting: M }
76
+ ...K && { columnSizing: K },
77
+ ...V !== void 0 && { sorting: V }
82
78
  },
83
- enableRowSelection: Y,
84
- getCoreRowModel: Ve(),
85
- getExpandedRowModel: Me(),
86
- getFilteredRowModel: Ie(),
87
- getSortedRowModel: Fe(),
88
- getPaginationRowModel: Le(),
89
- getRowId: t.getRowId ?? ((o, U, f) => f ? [f.id, o.id].join(".") : o.id.toString()),
90
- defaultColumn: X,
79
+ enableRowSelection: A,
80
+ getCoreRowModel: Re(),
81
+ getExpandedRowModel: Oe(),
82
+ getFilteredRowModel: Ke(),
83
+ getSortedRowModel: Me(),
84
+ getPaginationRowModel: Ve(),
85
+ getRowId: t.getRowId ?? ((o, x, c) => c ? [c.id, o.id].join(".") : o.id.toString()),
86
+ defaultColumn: k,
91
87
  ...t,
92
- enableColumnResizing: O,
88
+ enableColumnResizing: R,
93
89
  sortingFns: {
94
- [Re]: Q,
90
+ [pe]: Z,
95
91
  ...t.sortingFns
96
92
  }
97
93
  });
98
- x.current = e;
99
- const y = e.options.meta?.locale, h = p(y);
94
+ T.current = e;
95
+ const f = e.options.meta?.locale, E = I(f);
100
96
  C(() => {
101
- h.current !== y && (h.current = y, e.getState().sorting.length > 0 && e.setSorting((o) => [...o]));
102
- }, [y, e]), F && (F.current = e), ie(e, i ? void 0 : m), Ce(e, {
97
+ E.current !== f && (E.current = f, e.getState().sorting.length > 0 && e.setSorting((o) => [...o]));
98
+ }, [f, e]), L && (L.current = e), te(e, i ? void 0 : g), ce(e, {
103
99
  saved: n,
104
- reconciling: ye(e, {
100
+ reconciling: Se(e, {
105
101
  enabled: i,
106
102
  definitionIds: _,
107
- defaultOrder: s,
108
- defaultVisibility: c,
103
+ defaultOrder: l,
104
+ defaultVisibility: m,
109
105
  controlledVisibility: t.state?.columnVisibility !== void 0
110
106
  }),
111
- defaultOrder: s,
112
- defaultVisibility: c,
107
+ defaultOrder: l,
108
+ defaultVisibility: m,
113
109
  controlledVisibility: t.state?.columnVisibility !== void 0
114
110
  }), C(() => {
115
- }, [i, t.state?.columnVisibility !== void 0 || t.onColumnVisibilityChange !== void 0]), G({
111
+ }, [i, t.state?.columnVisibility !== void 0 || t.onColumnVisibilityChange !== void 0]), U({
116
112
  storageKey: S,
117
113
  state: e.getState().sorting,
118
- defaultValue: P,
119
- saved: M,
120
- controlled: E,
121
- toSignature: fe,
122
- toStorage: Se,
114
+ defaultValue: w,
115
+ saved: V,
116
+ controlled: t.state?.sorting !== void 0,
117
+ toSignature: me,
118
+ toStorage: ge,
123
119
  applyState: (o) => e.setSorting(o)
124
- }), G({
125
- storageKey: T,
120
+ }), U({
121
+ storageKey: N,
126
122
  state: e.getState().columnSizing,
127
- defaultValue: R,
128
- saved: V,
123
+ defaultValue: z,
124
+ saved: K,
129
125
  settled: !e.getState().columnSizingInfo.isResizingColumn,
130
- toSignature: se,
131
- toStorage: ue,
126
+ toSignature: re,
127
+ toStorage: se,
132
128
  applyState: (o) => e.setColumnSizing(o)
133
129
  }), e.columnLayoutDefaults = i ? {
134
- order: s,
135
- visibility: c
130
+ order: l,
131
+ visibility: m
136
132
  } : void 0, e.resetColumnSettings = () => {
137
- e.setColumnOrder(i ? s : []), e.setColumnSizing(R), i && e.setColumnVisibility(c), S && e.setSorting(P);
133
+ e.setColumnOrder(i ? l : []), e.setColumnSizing(z), i && e.setColumnVisibility(m), S && e.setSorting(w);
138
134
  const o = i && n.orderKey !== void 0 ? [
139
135
  n.orderKey,
140
136
  n.visibilityKey,
141
- m,
142
- w
143
- ] : [], U = i ? void 0 : m;
144
- for (const f of [
137
+ g,
138
+ F
139
+ ] : [], x = i ? void 0 : g;
140
+ for (const c of [
145
141
  S,
146
- T,
147
- U,
142
+ N,
143
+ x,
148
144
  ...o
149
- ]) f && H.remove(f);
145
+ ]) c && h.remove(c);
150
146
  };
151
- const g = re(r), a = e.getState().pagination?.pageSize, I = p(void 0), L = p(void 0);
147
+ const d = ie(a), y = e.getState().pagination?.pageSize, M = I(void 0);
152
148
  return C(() => {
153
- I.current = void 0, e.getState().pagination?.pageSize !== d && (e.setPageIndex(0), e.setPageSize(d));
149
+ M.current = void 0, e.getState().pagination?.pageSize !== u && (e.setPageIndex(0), e.setPageSize(u));
154
150
  }, [
151
+ u,
155
152
  d,
156
- g,
157
153
  e
158
154
  ]), C(() => {
159
- if (!(!g || a == null)) {
160
- if (I.current !== g) {
161
- if (a !== d) return;
162
- I.current = g, L.current = a;
163
- return;
155
+ if (!(!d || y == null)) {
156
+ if (M.current !== d) {
157
+ if (y !== u) return;
158
+ M.current = d;
164
159
  }
165
- a !== L.current && (L.current = a, H.set(g, JSON.stringify(a)));
160
+ h.set(d, JSON.stringify(y));
166
161
  }
167
162
  }, [
168
- a,
169
- d,
170
- g
163
+ y,
164
+ u,
165
+ d
171
166
  ]), { table: e };
172
167
  };
173
168
  export {
174
- et as useStyledTable
169
+ Qe as useStyledTable
175
170
  };
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "3.138.0",
6
+ "version": "3.138.2",
7
7
  "type": "module",
8
8
  "sideEffects": [
9
9
  "**/*.css",