@memobit/libs 3.19.0 → 3.19.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.
@@ -23,7 +23,7 @@ var r = (i) => {
23
23
  const o = {
24
24
  ...i,
25
25
  lib: d,
26
- libBuildNumber: 579,
26
+ libBuildNumber: 581,
27
27
  libCommit: n,
28
28
  libBuildDate: t
29
29
  };
@@ -1,11 +1,16 @@
1
- import { useCallback as g, useState as e } from "react";
2
- var l = () => {
3
- const [t, h] = e([]);
4
- return {
1
+ import { HIGHLIGHT_WAIT_MS as h } from "./useListMotion.js";
2
+ import { useCallback as s, useEffect as o, useState as g } from "react";
3
+ var m = () => {
4
+ const [t, i] = g([]), r = s((...e) => i(e), []);
5
+ return o(() => {
6
+ if (t.length === 0) return;
7
+ const e = setTimeout(() => i([]), h);
8
+ return () => clearTimeout(e);
9
+ }, [t]), {
5
10
  highlightIds: t,
6
- highlight: g((...i) => h(i), [])
11
+ highlight: r
7
12
  };
8
13
  };
9
14
  export {
10
- l as useHighlight
15
+ m as useHighlight
11
16
  };
@@ -48,8 +48,8 @@ var Q = "data-motion-key", z = "data-motion-root", Z = "list-motion-ghost", k =
48
48
  ghost: c,
49
49
  host: u
50
50
  };
51
- }, fe = (t, o = {}) => {
52
- const { enabled: a = !0, flashEntering: u = !0, highlightKeys: c, maxMembershipChanges: y = 10, maxReorderMoves: p = 40 } = o, h = T(null), b = T("normal"), v = T(/* @__PURE__ */ new Set()), S = T(/* @__PURE__ */ new Set()), I = T(/* @__PURE__ */ new Map()), w = T(null), V = T(c), N = t.current;
51
+ }, de = (t, o = {}) => {
52
+ const { enabled: a = !0, flashEntering: u = !0, highlightKeys: c, maxMembershipChanges: y = 10, maxReorderMoves: p = 40 } = o, h = T(null), b = T("normal"), v = T(/* @__PURE__ */ new Set()), S = T(/* @__PURE__ */ new Set()), I = T(/* @__PURE__ */ new Map()), w = T(null), V = T(void 0), N = t.current;
53
53
  if (N?.hasAttribute(z)) {
54
54
  const e = J(N);
55
55
  h.current = e.length > Y ? null : D(N, e);
@@ -88,24 +88,24 @@ var Q = "data-motion-key", z = "data-motion-root", Z = "list-motion-ghost", k =
88
88
  if (!x && P > y) return;
89
89
  const O = [];
90
90
  if (i.order.forEach((l) => {
91
- const r = s.items.get(l), f = i.items.get(l);
92
- if (!r || !f) return;
93
- const d = r.box.left - f.box.left, g = r.box.top - f.box.top;
94
- (Math.abs(d) > 0.5 || Math.abs(g) > 0.5) && O.push({
95
- dx: d,
91
+ const r = s.items.get(l), d = i.items.get(l);
92
+ if (!r || !d) return;
93
+ const f = r.box.left - d.box.left, g = r.box.top - d.box.top;
94
+ (Math.abs(f) > 0.5 || Math.abs(g) > 0.5) && O.push({
95
+ dx: f,
96
96
  dy: g,
97
- item: f
97
+ item: d
98
98
  });
99
99
  }), !(!x && P === 0 && O.length > p)) {
100
100
  if (n.move > 0) {
101
101
  const l = A.length > 0 ? n.exit / 2 : 0;
102
- O.forEach(({ dx: r, dy: f, item: d }) => {
103
- const g = H(e, d.box), m = {
102
+ O.forEach(({ dx: r, dy: d, item: f }) => {
103
+ const g = H(e, f.box), m = {
104
104
  ...g,
105
105
  left: g.left + r,
106
- top: g.top + f
106
+ top: g.top + d
107
107
  };
108
- !L(m) && !L(g) || R(d.element.animate([{ transform: `translate(${r}px, ${f}px)` }, { transform: "translate(0, 0)" }], {
108
+ !L(m) && !L(g) || R(f.element.animate([{ transform: `translate(${r}px, ${d}px)` }, { transform: "translate(0, 0)" }], {
109
109
  delay: l,
110
110
  duration: n.move,
111
111
  easing: n.easing,
@@ -117,28 +117,28 @@ var Q = "data-motion-key", z = "data-motion-root", Z = "list-motion-ghost", k =
117
117
  const l = A.map((r) => s.items.get(r)).filter((r) => r !== void 0);
118
118
  l.forEach((r) => {
119
119
  if (l.some((j) => j !== r && j.element.contains(r.element)) || r.element.isConnected) return;
120
- const f = H(e, r.box);
121
- if (!L(f)) return;
122
- const d = r.element.cloneNode(!0);
123
- if (!(d instanceof HTMLElement)) return;
124
- d.removeAttribute(Q), d.classList.remove(k);
125
- const g = d instanceof HTMLTableRowElement ? ce(d, r.parent) : {
126
- ghost: d,
120
+ const d = H(e, r.box);
121
+ if (!L(d)) return;
122
+ const f = r.element.cloneNode(!0);
123
+ if (!(f instanceof HTMLElement)) return;
124
+ f.removeAttribute(Q), f.classList.remove(k);
125
+ const g = f instanceof HTMLTableRowElement ? ce(f, r.parent) : {
126
+ ghost: f,
127
127
  host: r.parent?.isConnected ? r.parent : e
128
128
  };
129
129
  if (!g) return;
130
130
  const { ghost: m, host: te } = g;
131
131
  m.classList.add(Z), Object.assign(m.style, {
132
132
  boxSizing: "border-box",
133
- height: `${f.height}px`,
133
+ height: `${d.height}px`,
134
134
  left: "0px",
135
135
  margin: "0px",
136
136
  position: "absolute",
137
137
  top: "0px",
138
- width: `${f.width}px`
138
+ width: `${d.width}px`
139
139
  }), te.append(m);
140
140
  const U = m.getBoundingClientRect();
141
- m.style.left = `${f.left - U.left}px`, m.style.top = `${f.top - U.top}px`, S.current.add(m);
141
+ m.style.left = `${d.left - U.left}px`, m.style.top = `${d.top - U.top}px`, S.current.add(m);
142
142
  const X = () => {
143
143
  m.remove(), S.current.delete(m);
144
144
  };
@@ -223,6 +223,7 @@ var Q = "data-motion-key", z = "data-motion-root", Z = "list-motion-ghost", k =
223
223
  }), [F, K]);
224
224
  };
225
225
  export {
226
+ ne as HIGHLIGHT_WAIT_MS,
226
227
  Q as LIST_MOTION_KEY_ATTRIBUTE,
227
- fe as useListMotion
228
+ de as useListMotion
228
229
  };
package/dist/index.js CHANGED
@@ -55,8 +55,8 @@ import { CopyButton as yo } from "./components/CopyButton/CopyButton2.js";
55
55
  import { Flag as bo } from "./components/Flag/Flag2.js";
56
56
  import { CountryWithFlag as Oo } from "./components/CountryWithFlag/CountryWithFlag2.js";
57
57
  import { getResultsCount as Ho } from "./helpers/Pagination.js";
58
- import { useHighlight as Uo } from "./hooks/useListMotion/useHighlight.js";
59
- import { LIST_MOTION_KEY_ATTRIBUTE as Vo, useListMotion as Wo } from "./hooks/useListMotion/useListMotion.js";
58
+ import { LIST_MOTION_KEY_ATTRIBUTE as Uo, useListMotion as wo } from "./hooks/useListMotion/useListMotion.js";
59
+ import { useHighlight as Wo } from "./hooks/useListMotion/useHighlight.js";
60
60
  import { EmptyState as Ko } from "./components/EmptyState/EmptyState2.js";
61
61
  import { Pagination as Go } from "./components/Pagination/Pagination2.js";
62
62
  import { calculateTimelineMarkers as Yo } from "./components/TimelineMarkers/calculateTimelineMarkers.js";
@@ -246,7 +246,7 @@ export {
246
246
  Ip as LIB_BUILD_NUMBER,
247
247
  Sp as LIB_COMMIT,
248
248
  Ap as LIB_VERSION,
249
- Vo as LIST_MOTION_KEY_ATTRIBUTE,
249
+ Uo as LIST_MOTION_KEY_ATTRIBUTE,
250
250
  Pm as List,
251
251
  kt as Loading,
252
252
  hm as MenuHamburger,
@@ -391,8 +391,8 @@ export {
391
391
  s as useComponentEffect,
392
392
  Po as useControlPanel,
393
393
  Do as useControlPanelContext,
394
- Uo as useHighlight,
395
- Wo as useListMotion,
394
+ Wo as useHighlight,
395
+ wo as useListMotion,
396
396
  Kr as usePopover,
397
397
  gi as useSidebar,
398
398
  pt as useSwipe,
package/dist/version.js CHANGED
@@ -1,4 +1,4 @@
1
- var I = "3.19.0", B = 579, L = "cce6bd8", _ = "2026-10-25T19:43:59.131Z", r = "579";
1
+ var I = "3.19.1", B = 581, L = "3420e57", _ = "2026-10-25T20:41:59.675Z", r = "581";
2
2
  export {
3
3
  _ as LIB_BUILD_DATE,
4
4
  r as LIB_BUILD_ID,
package/dist/version.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
- "version": "3.19.0",
3
- "buildNumber": 579,
4
- "commit": "cce6bd8",
5
- "buildDate": "2026-10-25T19:43:59.131Z"
2
+ "version": "3.19.1",
3
+ "buildNumber": 581,
4
+ "commit": "3420e57",
5
+ "buildDate": "2026-10-25T20:41:59.675Z"
6
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memobit/libs",
3
- "version": "3.19.0",
3
+ "version": "3.19.1",
4
4
  "description": "React component library powering the Memobit apps — 100+ components, helpers and hooks. Icons ship as @memobit/icons and themes as @memobit/themes. TypeScript-first, ESM-only, React 19.",
5
5
  "keywords": [
6
6
  "react",