@object-ui/plugin-kanban 3.0.3 → 3.1.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.
Files changed (44) hide show
  1. package/.turbo/turbo-build.log +9 -9
  2. package/dist/{KanbanEnhanced-BPIKjTDv.js → KanbanEnhanced-CXDSLlGR.js} +338 -324
  3. package/dist/KanbanImpl-4dgoNPtI.js +350 -0
  4. package/dist/index-CyNcIIS1.js +1077 -0
  5. package/dist/index.js +9 -4
  6. package/dist/index.umd.cjs +4 -4
  7. package/dist/src/CardTemplates.d.ts +25 -0
  8. package/dist/src/CardTemplates.d.ts.map +1 -0
  9. package/dist/src/InlineQuickAdd.d.ts +29 -0
  10. package/dist/src/InlineQuickAdd.d.ts.map +1 -0
  11. package/dist/src/KanbanEnhanced.d.ts +12 -1
  12. package/dist/src/KanbanEnhanced.d.ts.map +1 -1
  13. package/dist/src/KanbanImpl.d.ts +15 -1
  14. package/dist/src/KanbanImpl.d.ts.map +1 -1
  15. package/dist/src/ObjectKanban.d.ts.map +1 -1
  16. package/dist/src/index.d.ts +22 -1
  17. package/dist/src/index.d.ts.map +1 -1
  18. package/dist/src/types.d.ts +97 -1
  19. package/dist/src/types.d.ts.map +1 -1
  20. package/dist/src/useColumnWidths.d.ts +30 -0
  21. package/dist/src/useColumnWidths.d.ts.map +1 -0
  22. package/dist/src/useCrossSwimlaneMove.d.ts +46 -0
  23. package/dist/src/useCrossSwimlaneMove.d.ts.map +1 -0
  24. package/dist/src/useQuickAddReorder.d.ts +28 -0
  25. package/dist/src/useQuickAddReorder.d.ts.map +1 -0
  26. package/package.json +9 -9
  27. package/src/CardTemplates.tsx +123 -0
  28. package/src/InlineQuickAdd.tsx +189 -0
  29. package/src/KanbanEnhanced.tsx +140 -9
  30. package/src/KanbanImpl.tsx +266 -23
  31. package/src/ObjectKanban.tsx +39 -24
  32. package/src/__tests__/KanbanGrouping.test.tsx +164 -0
  33. package/src/__tests__/KanbanSwimlanes.test.tsx +194 -0
  34. package/src/__tests__/ObjectKanbanTitle.test.tsx +93 -0
  35. package/src/__tests__/SwimlanePersistence.test.tsx +159 -0
  36. package/src/__tests__/performance-benchmark.test.tsx +14 -14
  37. package/src/__tests__/phase13-features.test.tsx +387 -0
  38. package/src/index.tsx +49 -6
  39. package/src/types.ts +106 -1
  40. package/src/useColumnWidths.ts +125 -0
  41. package/src/useCrossSwimlaneMove.ts +116 -0
  42. package/src/useQuickAddReorder.ts +107 -0
  43. package/dist/KanbanImpl-BfOKAnJS.js +0 -194
  44. package/dist/index-CWGTi2xn.js +0 -600
@@ -1,34 +1,45 @@
1
- import { j as h } from "./index-CWGTi2xn.js";
2
- import * as C from "react";
3
- import { forwardRef as K, createElement as R } from "react";
4
- import { flushSync as J } from "react-dom";
5
- import { u as Q, a as X, D as ee, c as te, b as se, d as ne, P as ie, e as Z, S as re, v as oe, C as le } from "./sortable.esm-CNNHgHk5.js";
6
- import { Button as ae, Badge as F, Card as ce, CardHeader as he, CardTitle as de, CardDescription as ue, CardContent as fe } from "@object-ui/components";
7
- function N(n, l, e) {
1
+ import { c as U, j as a, C as Q, P as X } from "./index-CyNcIIS1.js";
2
+ import * as v from "react";
3
+ import { flushSync as Z } from "react-dom";
4
+ import { u as ee, a as te, D as se, c as ne, b as ie, d as re, P as oe, e as Y, S as le, v as ae, C as ce } from "./sortable.esm-CNNHgHk5.js";
5
+ import { Button as G, Badge as L, Card as de, CardHeader as he, CardTitle as ue, CardDescription as fe, CardContent as me, Input as ge } from "@object-ui/components";
6
+ const pe = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], ve = U("chevron-right", pe);
7
+ const xe = [
8
+ [
9
+ "path",
10
+ {
11
+ d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",
12
+ key: "wmoenq"
13
+ }
14
+ ],
15
+ ["path", { d: "M12 9v4", key: "juzpu7" }],
16
+ ["path", { d: "M12 17h.01", key: "p32p05" }]
17
+ ], be = U("triangle-alert", xe);
18
+ function A(n, l, e) {
8
19
  let s = e.initialDeps ?? [], t, i = !0;
9
20
  function o() {
10
- var r, a, c;
11
- let d;
12
- e.key && ((r = e.debug) != null && r.call(e)) && (d = Date.now());
13
- const v = n();
14
- if (!(v.length !== s.length || v.some((w, p) => s[p] !== w)))
21
+ var r, d, h;
22
+ let u;
23
+ e.key && ((r = e.debug) != null && r.call(e)) && (u = Date.now());
24
+ const m = n();
25
+ if (!(m.length !== s.length || m.some((w, p) => s[p] !== w)))
15
26
  return t;
16
- s = v;
17
- let b;
18
- if (e.key && ((a = e.debug) != null && a.call(e)) && (b = Date.now()), t = l(...v), e.key && ((c = e.debug) != null && c.call(e))) {
19
- const w = Math.round((Date.now() - d) * 100) / 100, p = Math.round((Date.now() - b) * 100) / 100, y = p / 16, E = (f, g) => {
20
- for (f = String(f); f.length < g; )
21
- f = " " + f;
22
- return f;
27
+ s = m;
28
+ let g;
29
+ if (e.key && ((d = e.debug) != null && d.call(e)) && (g = Date.now()), t = l(...m), e.key && ((h = e.debug) != null && h.call(e))) {
30
+ const w = Math.round((Date.now() - u) * 100) / 100, p = Math.round((Date.now() - g) * 100) / 100, E = p / 16, z = (C, D) => {
31
+ for (C = String(C); C.length < D; )
32
+ C = " " + C;
33
+ return C;
23
34
  };
24
35
  console.info(
25
- `%c⏱ ${E(p, 5)} /${E(w, 5)} ms`,
36
+ `%c⏱ ${z(p, 5)} /${z(w, 5)} ms`,
26
37
  `
27
38
  font-size: .6rem;
28
39
  font-weight: bold;
29
40
  color: hsl(${Math.max(
30
41
  0,
31
- Math.min(120 - 120 * y, 120)
42
+ Math.min(120 - 120 * E, 120)
32
43
  )}deg 100% 31%);`,
33
44
  e?.key
34
45
  );
@@ -39,25 +50,25 @@ function N(n, l, e) {
39
50
  s = r;
40
51
  }, o;
41
52
  }
42
- function B(n, l) {
53
+ function P(n, l) {
43
54
  if (n === void 0)
44
55
  throw new Error("Unexpected undefined");
45
56
  return n;
46
57
  }
47
- const me = (n, l) => Math.abs(n - l) < 1.01, ge = (n, l, e) => {
58
+ const Ce = (n, l) => Math.abs(n - l) < 1.01, ye = (n, l, e) => {
48
59
  let s;
49
60
  return function(...t) {
50
61
  n.clearTimeout(s), s = n.setTimeout(() => l.apply(this, t), e);
51
62
  };
52
- }, $ = (n) => {
63
+ }, H = (n) => {
53
64
  const { offsetWidth: l, offsetHeight: e } = n;
54
65
  return { width: l, height: e };
55
- }, pe = (n) => n, ve = (n) => {
66
+ }, we = (n) => n, Se = (n) => {
56
67
  const l = Math.max(n.startIndex - n.overscan, 0), e = Math.min(n.endIndex + n.overscan, n.count - 1), s = [];
57
68
  for (let t = l; t <= e; t++)
58
69
  s.push(t);
59
70
  return s;
60
- }, xe = (n, l) => {
71
+ }, Ee = (n, l) => {
61
72
  const e = n.scrollElement;
62
73
  if (!e)
63
74
  return;
@@ -65,32 +76,32 @@ const me = (n, l) => Math.abs(n - l) < 1.01, ge = (n, l, e) => {
65
76
  if (!s)
66
77
  return;
67
78
  const t = (o) => {
68
- const { width: r, height: a } = o;
69
- l({ width: Math.round(r), height: Math.round(a) });
79
+ const { width: r, height: d } = o;
80
+ l({ width: Math.round(r), height: Math.round(d) });
70
81
  };
71
- if (t($(e)), !s.ResizeObserver)
82
+ if (t(H(e)), !s.ResizeObserver)
72
83
  return () => {
73
84
  };
74
85
  const i = new s.ResizeObserver((o) => {
75
86
  const r = () => {
76
- const a = o[0];
77
- if (a?.borderBoxSize) {
78
- const c = a.borderBoxSize[0];
79
- if (c) {
80
- t({ width: c.inlineSize, height: c.blockSize });
87
+ const d = o[0];
88
+ if (d?.borderBoxSize) {
89
+ const h = d.borderBoxSize[0];
90
+ if (h) {
91
+ t({ width: h.inlineSize, height: h.blockSize });
81
92
  return;
82
93
  }
83
94
  }
84
- t($(e));
95
+ t(H(e));
85
96
  };
86
97
  n.options.useAnimationFrameWithResizeObserver ? requestAnimationFrame(r) : r();
87
98
  });
88
99
  return i.observe(e, { box: "border-box" }), () => {
89
100
  i.unobserve(e);
90
101
  };
91
- }, P = {
102
+ }, $ = {
92
103
  passive: !0
93
- }, H = typeof window > "u" ? !0 : "onscrollend" in window, be = (n, l) => {
104
+ }, q = typeof window > "u" ? !0 : "onscrollend" in window, Ie = (n, l) => {
94
105
  const e = n.scrollElement;
95
106
  if (!e)
96
107
  return;
@@ -98,23 +109,23 @@ const me = (n, l) => Math.abs(n - l) < 1.01, ge = (n, l, e) => {
98
109
  if (!s)
99
110
  return;
100
111
  let t = 0;
101
- const i = n.options.useScrollendEvent && H ? () => {
102
- } : ge(
112
+ const i = n.options.useScrollendEvent && q ? () => {
113
+ } : ye(
103
114
  s,
104
115
  () => {
105
116
  l(t, !1);
106
117
  },
107
118
  n.options.isScrollingResetDelay
108
- ), o = (d) => () => {
109
- const { horizontal: v, isRtl: u } = n.options;
110
- t = v ? e.scrollLeft * (u && -1 || 1) : e.scrollTop, i(), l(t, d);
111
- }, r = o(!0), a = o(!1);
112
- e.addEventListener("scroll", r, P);
113
- const c = n.options.useScrollendEvent && H;
114
- return c && e.addEventListener("scrollend", a, P), () => {
115
- e.removeEventListener("scroll", r), c && e.removeEventListener("scrollend", a);
119
+ ), o = (u) => () => {
120
+ const { horizontal: m, isRtl: c } = n.options;
121
+ t = m ? e.scrollLeft * (c && -1 || 1) : e.scrollTop, i(), l(t, u);
122
+ }, r = o(!0), d = o(!1);
123
+ e.addEventListener("scroll", r, $);
124
+ const h = n.options.useScrollendEvent && q;
125
+ return h && e.addEventListener("scrollend", d, $), () => {
126
+ e.removeEventListener("scroll", r), h && e.removeEventListener("scrollend", d);
116
127
  };
117
- }, Ce = (n, l, e) => {
128
+ }, ze = (n, l, e) => {
118
129
  if (l?.borderBoxSize) {
119
130
  const s = l.borderBoxSize[0];
120
131
  if (s)
@@ -123,7 +134,7 @@ const me = (n, l) => Math.abs(n - l) < 1.01, ge = (n, l, e) => {
123
134
  );
124
135
  }
125
136
  return n[e.options.horizontal ? "offsetWidth" : "offsetHeight"];
126
- }, we = (n, {
137
+ }, Me = (n, {
127
138
  adjustments: l = 0,
128
139
  behavior: e
129
140
  }, s) => {
@@ -134,7 +145,7 @@ const me = (n, l) => Math.abs(n - l) < 1.01, ge = (n, l, e) => {
134
145
  behavior: e
135
146
  });
136
147
  };
137
- class ye {
148
+ class Oe {
138
149
  constructor(l) {
139
150
  this.unsubs = [], this.scrollElement = null, this.targetWindow = null, this.isScrolling = !1, this.currentScrollToIndex = null, this.measurementsCache = [], this.itemSizeCache = /* @__PURE__ */ new Map(), this.laneAssignments = /* @__PURE__ */ new Map(), this.pendingMeasuredCacheIndexes = [], this.prevLanes = void 0, this.lanesChangedFlag = !1, this.lanesSettling = !1, this.scrollRect = null, this.scrollOffset = null, this.scrollDirection = null, this.scrollAdjustments = 0, this.elementsCache = /* @__PURE__ */ new Map(), this.observer = /* @__PURE__ */ (() => {
140
151
  let e = null;
@@ -172,11 +183,11 @@ class ye {
172
183
  scrollPaddingStart: 0,
173
184
  scrollPaddingEnd: 0,
174
185
  horizontal: !1,
175
- getItemKey: pe,
176
- rangeExtractor: ve,
186
+ getItemKey: we,
187
+ rangeExtractor: Se,
177
188
  onChange: () => {
178
189
  },
179
- measureElement: Ce,
190
+ measureElement: ze,
180
191
  initialRect: { width: 0, height: 0 },
181
192
  scrollMargin: 0,
182
193
  gap: 0,
@@ -193,7 +204,7 @@ class ye {
193
204
  }, this.notify = (e) => {
194
205
  var s, t;
195
206
  (t = (s = this.options).onChange) == null || t.call(s, this, e);
196
- }, this.maybeNotify = N(
207
+ }, this.maybeNotify = A(
197
208
  () => (this.calculateRange(), [
198
209
  this.isScrolling,
199
210
  this.range ? this.range.startIndex : null,
@@ -244,14 +255,14 @@ class ye {
244
255
  const r = e[o];
245
256
  if (t.has(r.lane))
246
257
  continue;
247
- const a = i.get(
258
+ const d = i.get(
248
259
  r.lane
249
260
  );
250
- if (a == null || r.end > a.end ? i.set(r.lane, r) : r.end < a.end && t.set(r.lane, !0), t.size === this.options.lanes)
261
+ if (d == null || r.end > d.end ? i.set(r.lane, r) : r.end < d.end && t.set(r.lane, !0), t.size === this.options.lanes)
251
262
  break;
252
263
  }
253
264
  return i.size === this.options.lanes ? Array.from(i.values()).sort((o, r) => o.end === r.end ? o.index - r.index : o.end - r.end)[0] : void 0;
254
- }, this.getMeasurementOptions = N(
265
+ }, this.getMeasurementOptions = A(
255
266
  () => [
256
267
  this.options.count,
257
268
  this.options.paddingStart,
@@ -271,61 +282,61 @@ class ye {
271
282
  {
272
283
  key: !1
273
284
  }
274
- ), this.getMeasurements = N(
285
+ ), this.getMeasurements = A(
275
286
  () => [this.getMeasurementOptions(), this.itemSizeCache],
276
- ({ count: e, paddingStart: s, scrollMargin: t, getItemKey: i, enabled: o, lanes: r }, a) => {
287
+ ({ count: e, paddingStart: s, scrollMargin: t, getItemKey: i, enabled: o, lanes: r }, d) => {
277
288
  if (!o)
278
289
  return this.measurementsCache = [], this.itemSizeCache.clear(), this.laneAssignments.clear(), [];
279
290
  if (this.laneAssignments.size > e)
280
- for (const u of this.laneAssignments.keys())
281
- u >= e && this.laneAssignments.delete(u);
282
- this.lanesChangedFlag && (this.lanesChangedFlag = !1, this.lanesSettling = !0, this.measurementsCache = [], this.itemSizeCache.clear(), this.laneAssignments.clear(), this.pendingMeasuredCacheIndexes = []), this.measurementsCache.length === 0 && !this.lanesSettling && (this.measurementsCache = this.options.initialMeasurementsCache, this.measurementsCache.forEach((u) => {
283
- this.itemSizeCache.set(u.key, u.size);
291
+ for (const c of this.laneAssignments.keys())
292
+ c >= e && this.laneAssignments.delete(c);
293
+ this.lanesChangedFlag && (this.lanesChangedFlag = !1, this.lanesSettling = !0, this.measurementsCache = [], this.itemSizeCache.clear(), this.laneAssignments.clear(), this.pendingMeasuredCacheIndexes = []), this.measurementsCache.length === 0 && !this.lanesSettling && (this.measurementsCache = this.options.initialMeasurementsCache, this.measurementsCache.forEach((c) => {
294
+ this.itemSizeCache.set(c.key, c.size);
284
295
  }));
285
- const c = this.lanesSettling ? 0 : this.pendingMeasuredCacheIndexes.length > 0 ? Math.min(...this.pendingMeasuredCacheIndexes) : 0;
296
+ const h = this.lanesSettling ? 0 : this.pendingMeasuredCacheIndexes.length > 0 ? Math.min(...this.pendingMeasuredCacheIndexes) : 0;
286
297
  this.pendingMeasuredCacheIndexes = [], this.lanesSettling && this.measurementsCache.length === e && (this.lanesSettling = !1);
287
- const d = this.measurementsCache.slice(0, c), v = new Array(r).fill(
298
+ const u = this.measurementsCache.slice(0, h), m = new Array(r).fill(
288
299
  void 0
289
300
  );
290
- for (let u = 0; u < c; u++) {
291
- const b = d[u];
292
- b && (v[b.lane] = u);
301
+ for (let c = 0; c < h; c++) {
302
+ const g = u[c];
303
+ g && (m[g.lane] = c);
293
304
  }
294
- for (let u = c; u < e; u++) {
295
- const b = i(u), w = this.laneAssignments.get(u);
296
- let p, y;
305
+ for (let c = h; c < e; c++) {
306
+ const g = i(c), w = this.laneAssignments.get(c);
307
+ let p, E;
297
308
  if (w !== void 0 && this.options.lanes > 1) {
298
309
  p = w;
299
- const m = v[p], x = m !== void 0 ? d[m] : void 0;
300
- y = x ? x.end + this.options.gap : s + t;
310
+ const S = m[p], f = S !== void 0 ? u[S] : void 0;
311
+ E = f ? f.end + this.options.gap : s + t;
301
312
  } else {
302
- const m = this.options.lanes === 1 ? d[u - 1] : this.getFurthestMeasurement(d, u);
303
- y = m ? m.end + this.options.gap : s + t, p = m ? m.lane : u % this.options.lanes, this.options.lanes > 1 && this.laneAssignments.set(u, p);
313
+ const S = this.options.lanes === 1 ? u[c - 1] : this.getFurthestMeasurement(u, c);
314
+ E = S ? S.end + this.options.gap : s + t, p = S ? S.lane : c % this.options.lanes, this.options.lanes > 1 && this.laneAssignments.set(c, p);
304
315
  }
305
- const E = a.get(b), f = typeof E == "number" ? E : this.options.estimateSize(u), g = y + f;
306
- d[u] = {
307
- index: u,
308
- start: y,
309
- size: f,
310
- end: g,
311
- key: b,
316
+ const z = d.get(g), C = typeof z == "number" ? z : this.options.estimateSize(c), D = E + C;
317
+ u[c] = {
318
+ index: c,
319
+ start: E,
320
+ size: C,
321
+ end: D,
322
+ key: g,
312
323
  lane: p
313
- }, v[p] = u;
324
+ }, m[p] = c;
314
325
  }
315
- return this.measurementsCache = d, d;
326
+ return this.measurementsCache = u, u;
316
327
  },
317
328
  {
318
329
  key: process.env.NODE_ENV !== "production" && "getMeasurements",
319
330
  debug: () => this.options.debug
320
331
  }
321
- ), this.calculateRange = N(
332
+ ), this.calculateRange = A(
322
333
  () => [
323
334
  this.getMeasurements(),
324
335
  this.getSize(),
325
336
  this.getScrollOffset(),
326
337
  this.options.lanes
327
338
  ],
328
- (e, s, t, i) => this.range = e.length > 0 && s > 0 ? Se({
339
+ (e, s, t, i) => this.range = e.length > 0 && s > 0 ? je({
329
340
  measurements: e,
330
341
  outerSize: s,
331
342
  scrollOffset: t,
@@ -335,7 +346,7 @@ class ye {
335
346
  key: process.env.NODE_ENV !== "production" && "calculateRange",
336
347
  debug: () => this.options.debug
337
348
  }
338
- ), this.getVirtualIndexes = N(
349
+ ), this.getVirtualIndexes = A(
339
350
  () => {
340
351
  let e = null, s = null;
341
352
  const t = this.calculateRange();
@@ -385,13 +396,13 @@ class ye {
385
396
  return;
386
397
  }
387
398
  this._measureElement(e, void 0);
388
- }, this.getVirtualItems = N(
399
+ }, this.getVirtualItems = A(
389
400
  () => [this.getVirtualIndexes(), this.getMeasurements()],
390
401
  (e, s) => {
391
402
  const t = [];
392
403
  for (let i = 0, o = e.length; i < o; i++) {
393
- const r = e[i], a = s[r];
394
- t.push(a);
404
+ const r = e[i], d = s[r];
405
+ t.push(d);
395
406
  }
396
407
  return t;
397
408
  },
@@ -402,11 +413,11 @@ class ye {
402
413
  ), this.getVirtualItemForOffset = (e) => {
403
414
  const s = this.getMeasurements();
404
415
  if (s.length !== 0)
405
- return B(
406
- s[Y(
416
+ return P(
417
+ s[J(
407
418
  0,
408
419
  s.length - 1,
409
- (t) => B(s[t]).start,
420
+ (t) => P(s[t]).start,
410
421
  e
411
422
  )]
412
423
  );
@@ -456,28 +467,29 @@ class ye {
456
467
  "The `smooth` scroll behavior is not fully supported with dynamic size."
457
468
  ), e = Math.max(0, Math.min(e, this.options.count - 1)), this.currentScrollToIndex = e;
458
469
  let i = 0;
459
- const o = 10, r = (c) => {
470
+ const o = 10, r = (h) => {
460
471
  if (!this.targetWindow) return;
461
- const d = this.getOffsetForIndex(e, c);
462
- if (!d) {
472
+ const u = this.getOffsetForIndex(e, h);
473
+ if (!u) {
463
474
  console.warn("Failed to get offset for index:", e);
464
475
  return;
465
476
  }
466
- const [v, u] = d;
467
- this._scrollToOffset(v, { adjustments: void 0, behavior: t }), this.targetWindow.requestAnimationFrame(() => {
468
- const b = () => {
477
+ const [m, c] = u;
478
+ this._scrollToOffset(m, { adjustments: void 0, behavior: t }), this.targetWindow.requestAnimationFrame(() => {
479
+ if (!this.targetWindow) return;
480
+ const g = () => {
469
481
  if (this.currentScrollToIndex !== e) return;
470
- const w = this.getScrollOffset(), p = this.getOffsetForIndex(e, u);
482
+ const w = this.getScrollOffset(), p = this.getOffsetForIndex(e, c);
471
483
  if (!p) {
472
484
  console.warn("Failed to get offset for index:", e);
473
485
  return;
474
486
  }
475
- me(p[0], w) || a(u);
487
+ Ce(p[0], w) || d(c);
476
488
  };
477
- this.isDynamicMode() ? this.targetWindow.requestAnimationFrame(b) : b();
489
+ this.isDynamicMode() ? this.targetWindow.requestAnimationFrame(g) : g();
478
490
  });
479
- }, a = (c) => {
480
- this.targetWindow && this.currentScrollToIndex === e && (i++, i < o ? (process.env.NODE_ENV !== "production" && this.options.debug && console.info("Schedule retry", i, o), this.targetWindow.requestAnimationFrame(() => r(c))) : console.warn(
491
+ }, d = (h) => {
492
+ this.targetWindow && this.currentScrollToIndex === e && (i++, i < o ? (process.env.NODE_ENV !== "production" && this.options.debug && console.info("Schedule retry", i, o), this.targetWindow.requestAnimationFrame(() => r(h))) : console.warn(
481
493
  `Failed to scroll to index ${e} after ${o} attempts.`
482
494
  ));
483
495
  };
@@ -520,7 +532,7 @@ class ye {
520
532
  }, this.setOptions(l);
521
533
  }
522
534
  }
523
- const Y = (n, l, e, s) => {
535
+ const J = (n, l, e, s) => {
524
536
  for (; n <= l; ) {
525
537
  const t = (n + l) / 2 | 0, i = e(t);
526
538
  if (i < s)
@@ -532,19 +544,19 @@ const Y = (n, l, e, s) => {
532
544
  }
533
545
  return n > 0 ? n - 1 : 0;
534
546
  };
535
- function Se({
547
+ function je({
536
548
  measurements: n,
537
549
  outerSize: l,
538
550
  scrollOffset: e,
539
551
  lanes: s
540
552
  }) {
541
- const t = n.length - 1, i = (a) => n[a].start;
553
+ const t = n.length - 1, i = (d) => n[d].start;
542
554
  if (n.length <= s)
543
555
  return {
544
556
  startIndex: 0,
545
557
  endIndex: t
546
558
  };
547
- let o = Y(
559
+ let o = J(
548
560
  0,
549
561
  t,
550
562
  i,
@@ -554,167 +566,122 @@ function Se({
554
566
  for (; r < t && n[r].end < e + l; )
555
567
  r++;
556
568
  else if (s > 1) {
557
- const a = Array(s).fill(0);
558
- for (; r < t && a.some((d) => d < e + l); ) {
559
- const d = n[r];
560
- a[d.lane] = d.end, r++;
569
+ const d = Array(s).fill(0);
570
+ for (; r < t && d.some((u) => u < e + l); ) {
571
+ const u = n[r];
572
+ d[u.lane] = u.end, r++;
561
573
  }
562
- const c = Array(s).fill(e + l);
563
- for (; o >= 0 && c.some((d) => d >= e); ) {
564
- const d = n[o];
565
- c[d.lane] = d.start, o--;
574
+ const h = Array(s).fill(e + l);
575
+ for (; o >= 0 && h.some((u) => u >= e); ) {
576
+ const u = n[o];
577
+ h[u.lane] = u.start, o--;
566
578
  }
567
579
  o = Math.max(0, o - o % s), r = Math.min(t, r + (s - 1 - r % s));
568
580
  }
569
581
  return { startIndex: o, endIndex: r };
570
582
  }
571
- const q = typeof document < "u" ? C.useLayoutEffect : C.useEffect;
572
- function Ee({
583
+ const K = typeof document < "u" ? v.useLayoutEffect : v.useEffect;
584
+ function Ne({
573
585
  useFlushSync: n = !0,
574
586
  ...l
575
587
  }) {
576
- const e = C.useReducer(() => ({}), {})[1], s = {
588
+ const e = v.useReducer(() => ({}), {})[1], s = {
577
589
  ...l,
578
590
  onChange: (i, o) => {
579
591
  var r;
580
- n && o ? J(e) : e(), (r = l.onChange) == null || r.call(l, i, o);
592
+ n && o ? Z(e) : e(), (r = l.onChange) == null || r.call(l, i, o);
581
593
  }
582
- }, [t] = C.useState(
583
- () => new ye(s)
594
+ }, [t] = v.useState(
595
+ () => new Oe(s)
584
596
  );
585
- return t.setOptions(s), q(() => t._didMount(), []), q(() => t._willUpdate()), t;
597
+ return t.setOptions(s), K(() => t._didMount(), []), K(() => t._willUpdate()), t;
586
598
  }
587
- function Me(n) {
588
- return Ee({
589
- observeElementRect: xe,
590
- observeElementOffset: be,
591
- scrollToFn: we,
599
+ function ke(n) {
600
+ return Ne({
601
+ observeElementRect: Ee,
602
+ observeElementOffset: Ie,
603
+ scrollToFn: Me,
592
604
  ...n
593
605
  });
594
606
  }
595
- const G = (...n) => n.filter((l, e, s) => !!l && l.trim() !== "" && s.indexOf(l) === e).join(" ").trim();
596
- const Oe = (n) => n.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
597
- const ze = (n) => n.replace(
598
- /^([A-Z])|[\s-_]+(\w)/g,
599
- (l, e, s) => s ? s.toUpperCase() : e.toLowerCase()
600
- );
601
- const U = (n) => {
602
- const l = ze(n);
603
- return l.charAt(0).toUpperCase() + l.slice(1);
604
- };
605
- var Ie = {
606
- xmlns: "http://www.w3.org/2000/svg",
607
- width: 24,
608
- height: 24,
609
- viewBox: "0 0 24 24",
610
- fill: "none",
611
- stroke: "currentColor",
612
- strokeWidth: 2,
613
- strokeLinecap: "round",
614
- strokeLinejoin: "round"
615
- };
616
- const je = (n) => {
617
- for (const l in n)
618
- if (l.startsWith("aria-") || l === "role" || l === "title")
619
- return !0;
620
- return !1;
621
- };
622
- const Ne = K(
623
- ({
624
- color: n = "currentColor",
625
- size: l = 24,
626
- strokeWidth: e = 2,
627
- absoluteStrokeWidth: s,
628
- className: t = "",
629
- children: i,
630
- iconNode: o,
631
- ...r
632
- }, a) => R(
633
- "svg",
634
- {
635
- ref: a,
636
- ...Ie,
637
- width: l,
638
- height: l,
639
- stroke: n,
640
- strokeWidth: s ? Number(e) * 24 / Number(l) : e,
641
- className: G("lucide", t),
642
- ...!i && !je(r) && { "aria-hidden": "true" },
643
- ...r
644
- },
645
- [
646
- ...o.map(([c, d]) => R(c, d)),
647
- ...Array.isArray(i) ? i : [i]
648
- ]
649
- )
650
- );
651
- const L = (n, l) => {
652
- const e = K(
653
- ({ className: s, ...t }, i) => R(Ne, {
654
- ref: i,
655
- iconNode: l,
656
- className: G(
657
- `lucide-${Oe(U(n))}`,
658
- `lucide-${n}`,
659
- s
660
- ),
661
- ...t
662
- })
663
- );
664
- return e.displayName = U(n), e;
665
- };
666
- const Ae = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]], ke = L("chevron-down", Ae);
667
- const _e = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], De = L("chevron-right", _e);
668
- const Re = [
669
- [
670
- "path",
671
- {
672
- d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",
673
- key: "wmoenq"
607
+ const V = (...n) => n.filter(Boolean).join(" ");
608
+ function Ae(n, l) {
609
+ if (!l || l.length === 0) return {};
610
+ for (const e of l) {
611
+ const s = n[e.field];
612
+ if (s == null) continue;
613
+ let t = !1;
614
+ const i = String(s);
615
+ switch (e.operator) {
616
+ case "equals":
617
+ t = i === String(e.value);
618
+ break;
619
+ case "not_equals":
620
+ t = i !== String(e.value);
621
+ break;
622
+ case "contains":
623
+ t = i.toLowerCase().includes(String(e.value).toLowerCase());
624
+ break;
625
+ case "in":
626
+ t = Array.isArray(e.value) && e.value.includes(i);
627
+ break;
674
628
  }
675
- ],
676
- ["path", { d: "M12 9v4", key: "juzpu7" }],
677
- ["path", { d: "M12 17h.01", key: "p32p05" }]
678
- ], Fe = L("triangle-alert", Re), T = (...n) => n.filter(Boolean).join(" ");
679
- function W({ card: n }) {
629
+ if (t)
630
+ return {
631
+ ...e.backgroundColor ? { backgroundColor: e.backgroundColor } : {},
632
+ ...e.borderColor ? { borderColor: e.borderColor } : {}
633
+ };
634
+ }
635
+ return {};
636
+ }
637
+ function W({ card: n, conditionalFormatting: l }) {
680
638
  const {
681
- attributes: l,
682
- listeners: e,
683
- setNodeRef: s,
684
- transform: t,
685
- transition: i,
686
- isDragging: o
687
- } = Z({ id: n.id }), r = {
688
- transform: le.Transform.toString(t),
689
- transition: i,
690
- opacity: o ? 0.5 : void 0
691
- };
692
- return /* @__PURE__ */ h.jsx("div", { ref: s, style: r, ...l, ...e, children: /* @__PURE__ */ h.jsxs(ce, { className: "mb-2 cursor-grab active:cursor-grabbing border-border bg-card/60 hover:border-primary/40 hover:shadow-lg hover:shadow-primary/10 transition-all duration-300 group", children: [
693
- /* @__PURE__ */ h.jsxs(he, { className: "p-4", children: [
694
- /* @__PURE__ */ h.jsx(de, { className: "text-sm font-medium font-mono tracking-tight text-foreground group-hover:text-primary transition-colors", children: n.title }),
695
- n.description && /* @__PURE__ */ h.jsx(ue, { className: "text-xs text-muted-foreground font-mono", children: n.description })
639
+ attributes: e,
640
+ listeners: s,
641
+ setNodeRef: t,
642
+ transform: i,
643
+ transition: o,
644
+ isDragging: r
645
+ } = Y({ id: n.id }), d = {
646
+ transform: ce.Transform.toString(i),
647
+ transition: o,
648
+ opacity: r ? 0.5 : void 0
649
+ }, h = Ae(n, l);
650
+ return /* @__PURE__ */ a.jsx("div", { ref: t, style: d, ...e, ...s, children: /* @__PURE__ */ a.jsxs(de, { className: "mb-2 cursor-grab active:cursor-grabbing border-border bg-card/60 hover:border-primary/40 hover:shadow-lg hover:shadow-primary/10 transition-all duration-300 group", style: h, children: [
651
+ n.coverImage && /* @__PURE__ */ a.jsx("div", { className: "w-full h-32 overflow-hidden rounded-t-lg", children: /* @__PURE__ */ a.jsx(
652
+ "img",
653
+ {
654
+ src: n.coverImage,
655
+ alt: "",
656
+ className: "w-full h-full object-cover",
657
+ loading: "lazy"
658
+ }
659
+ ) }),
660
+ /* @__PURE__ */ a.jsxs(he, { className: "p-4", children: [
661
+ /* @__PURE__ */ a.jsx(ue, { className: "text-sm font-medium font-mono tracking-tight text-foreground group-hover:text-primary transition-colors", children: n.title }),
662
+ n.description && /* @__PURE__ */ a.jsx(fe, { className: "text-xs text-muted-foreground font-mono", children: n.description })
696
663
  ] }),
697
- n.badges && n.badges.length > 0 && /* @__PURE__ */ h.jsx(fe, { className: "p-4 pt-0", children: /* @__PURE__ */ h.jsx("div", { className: "flex flex-wrap gap-1", children: n.badges.map((a, c) => /* @__PURE__ */ h.jsx(F, { variant: a.variant || "default", className: "text-xs", children: a.label }, c)) }) })
664
+ n.badges && n.badges.length > 0 && /* @__PURE__ */ a.jsx(me, { className: "p-4 pt-0", children: /* @__PURE__ */ a.jsx("div", { className: "flex flex-wrap gap-1", children: n.badges.map((u, m) => /* @__PURE__ */ a.jsx(L, { variant: u.variant || "default", className: "text-xs", children: u.label }, m)) }) })
698
665
  ] }) });
699
666
  }
700
- function Te({ cards: n, parentRef: l }) {
701
- const e = Me({
667
+ function De({ cards: n, parentRef: l, conditionalFormatting: e }) {
668
+ const s = ke({
702
669
  count: n.length,
703
670
  getScrollElement: () => l.current,
704
671
  estimateSize: () => 120,
705
672
  overscan: 5
706
673
  });
707
- return /* @__PURE__ */ h.jsx(
674
+ return /* @__PURE__ */ a.jsx(
708
675
  "div",
709
676
  {
710
677
  style: {
711
- height: `${e.getTotalSize()}px`,
678
+ height: `${s.getTotalSize()}px`,
712
679
  width: "100%",
713
680
  position: "relative"
714
681
  },
715
- children: e.getVirtualItems().map((s) => {
716
- const t = n[s.index];
717
- return /* @__PURE__ */ h.jsx(
682
+ children: s.getVirtualItems().map((t) => {
683
+ const i = n[t.index];
684
+ return /* @__PURE__ */ a.jsx(
718
685
  "div",
719
686
  {
720
687
  style: {
@@ -722,173 +689,220 @@ function Te({ cards: n, parentRef: l }) {
722
689
  top: 0,
723
690
  left: 0,
724
691
  width: "100%",
725
- transform: `translateY(${s.start}px)`
692
+ transform: `translateY(${t.start}px)`
726
693
  },
727
- children: /* @__PURE__ */ h.jsx(W, { card: t })
694
+ children: /* @__PURE__ */ a.jsx(W, { card: i, conditionalFormatting: e })
728
695
  },
729
- t.id
696
+ i.id
730
697
  );
731
698
  })
732
699
  }
733
700
  );
734
701
  }
735
- function Le({
702
+ function Re({ columnId: n, onAdd: l }) {
703
+ const [e, s] = v.useState(!1), [t, i] = v.useState(""), o = v.useRef(null), r = () => {
704
+ const h = t.trim();
705
+ h && (l(n, h), i("")), s(!1);
706
+ }, d = (h) => {
707
+ h.key === "Enter" ? (h.preventDefault(), r()) : h.key === "Escape" && (i(""), s(!1));
708
+ };
709
+ return e ? /* @__PURE__ */ a.jsx("div", { className: "mt-2 space-y-2", children: /* @__PURE__ */ a.jsx(
710
+ ge,
711
+ {
712
+ ref: o,
713
+ value: t,
714
+ onChange: (h) => i(h.target.value),
715
+ onKeyDown: d,
716
+ onBlur: r,
717
+ placeholder: "Enter card title...",
718
+ className: "text-sm",
719
+ autoFocus: !0
720
+ }
721
+ ) }) : /* @__PURE__ */ a.jsxs(
722
+ G,
723
+ {
724
+ variant: "ghost",
725
+ size: "sm",
726
+ className: "w-full mt-2 text-muted-foreground hover:text-foreground",
727
+ onClick: () => {
728
+ s(!0), setTimeout(() => o.current?.focus(), 0);
729
+ },
730
+ children: [
731
+ /* @__PURE__ */ a.jsx(X, { className: "h-4 w-4 mr-1" }),
732
+ "Add Card"
733
+ ]
734
+ }
735
+ );
736
+ }
737
+ function _e({
736
738
  column: n,
737
739
  cards: l,
738
740
  onToggle: e,
739
- enableVirtual: s
741
+ enableVirtual: s,
742
+ quickAdd: t,
743
+ onQuickAdd: i,
744
+ conditionalFormatting: o
740
745
  }) {
741
- const t = l || [], i = C.useRef(null), { setNodeRef: o } = Z({
746
+ const r = l || [], d = v.useRef(null), { setNodeRef: h } = Y({
742
747
  id: n.id,
743
748
  data: {
744
749
  type: "column"
745
750
  }
746
- }), r = n.limit && t.length >= n.limit, a = n.limit && t.length >= n.limit * 0.8;
747
- return /* @__PURE__ */ h.jsxs(
751
+ }), u = n.limit && r.length >= n.limit, m = n.limit && r.length >= n.limit * 0.8;
752
+ return /* @__PURE__ */ a.jsxs(
748
753
  "div",
749
754
  {
750
- ref: o,
751
- className: T(
755
+ ref: h,
756
+ className: V(
752
757
  "flex flex-col flex-shrink-0 rounded-lg border border-border bg-card/20 backdrop-blur-sm shadow-xl transition-all",
753
758
  n.collapsed ? "w-16" : "w-80",
754
759
  n.className
755
760
  ),
756
761
  children: [
757
- /* @__PURE__ */ h.jsxs("div", { className: "p-4 border-b border-border/50 bg-muted/20 flex items-center justify-between", children: [
758
- /* @__PURE__ */ h.jsxs("div", { className: "flex items-center gap-2 flex-1 min-w-0", children: [
759
- /* @__PURE__ */ h.jsx(
760
- ae,
762
+ /* @__PURE__ */ a.jsxs("div", { className: "p-4 border-b border-border/50 bg-muted/20 flex items-center justify-between", children: [
763
+ /* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-2 flex-1 min-w-0", children: [
764
+ /* @__PURE__ */ a.jsx(
765
+ G,
761
766
  {
762
767
  variant: "ghost",
763
768
  size: "sm",
764
769
  className: "h-6 w-6 p-0",
765
770
  onClick: () => e(!n.collapsed),
766
- children: n.collapsed ? /* @__PURE__ */ h.jsx(De, { className: "h-4 w-4" }) : /* @__PURE__ */ h.jsx(ke, { className: "h-4 w-4" })
771
+ children: n.collapsed ? /* @__PURE__ */ a.jsx(ve, { className: "h-4 w-4" }) : /* @__PURE__ */ a.jsx(Q, { className: "h-4 w-4" })
767
772
  }
768
773
  ),
769
- !n.collapsed && /* @__PURE__ */ h.jsxs(h.Fragment, { children: [
770
- /* @__PURE__ */ h.jsx("h3", { className: "font-mono text-sm font-semibold tracking-wider text-primary/90 uppercase truncate", children: n.title }),
771
- /* @__PURE__ */ h.jsxs("div", { className: "flex items-center gap-2", children: [
772
- /* @__PURE__ */ h.jsxs("span", { className: T(
774
+ !n.collapsed && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
775
+ /* @__PURE__ */ a.jsx("h3", { className: "font-mono text-sm font-semibold tracking-wider text-primary/90 uppercase truncate", children: n.title }),
776
+ /* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-2", children: [
777
+ /* @__PURE__ */ a.jsxs("span", { className: V(
773
778
  "font-mono text-xs",
774
- r ? "text-destructive" : a ? "text-yellow-500" : "text-muted-foreground"
779
+ u ? "text-destructive" : m ? "text-yellow-500" : "text-muted-foreground"
775
780
  ), children: [
776
- t.length,
781
+ r.length,
777
782
  n.limit && ` / ${n.limit}`
778
783
  ] }),
779
- r && /* @__PURE__ */ h.jsx(F, { variant: "destructive", className: "text-xs", children: "Full" }),
780
- a && !r && /* @__PURE__ */ h.jsx(Fe, { className: "h-3 w-3 text-yellow-500" })
784
+ u && /* @__PURE__ */ a.jsx(L, { variant: "destructive", className: "text-xs", children: "Full" }),
785
+ m && !u && /* @__PURE__ */ a.jsx(be, { className: "h-3 w-3 text-yellow-500" })
781
786
  ] })
782
787
  ] })
783
788
  ] }),
784
- n.collapsed && /* @__PURE__ */ h.jsxs("div", { className: "flex flex-col items-center gap-1", children: [
785
- /* @__PURE__ */ h.jsx("span", { className: "font-mono text-xs font-bold text-primary/90 [writing-mode:vertical-rl] rotate-180", children: n.title }),
786
- /* @__PURE__ */ h.jsx(F, { variant: "secondary", className: "text-xs", children: t.length })
789
+ n.collapsed && /* @__PURE__ */ a.jsxs("div", { className: "flex flex-col items-center gap-1", children: [
790
+ /* @__PURE__ */ a.jsx("span", { className: "font-mono text-xs font-bold text-primary/90 [writing-mode:vertical-rl] rotate-180", children: n.title }),
791
+ /* @__PURE__ */ a.jsx(L, { variant: "secondary", className: "text-xs", children: r.length })
787
792
  ] })
788
793
  ] }),
789
- !n.collapsed && /* @__PURE__ */ h.jsx("div", { ref: i, className: "flex-1 p-4 overflow-y-auto", style: { maxHeight: "600px" }, children: /* @__PURE__ */ h.jsx(
790
- re,
791
- {
792
- items: t.map((c) => c.id),
793
- strategy: oe,
794
- children: s ? /* @__PURE__ */ h.jsx(Te, { cards: t, parentRef: i }) : /* @__PURE__ */ h.jsx("div", { className: "space-y-2", children: t.map((c) => /* @__PURE__ */ h.jsx(W, { card: c }, c.id)) })
795
- }
796
- ) })
794
+ !n.collapsed && /* @__PURE__ */ a.jsxs("div", { ref: d, className: "flex-1 p-4 overflow-y-auto", style: { maxHeight: "600px" }, children: [
795
+ /* @__PURE__ */ a.jsx(
796
+ le,
797
+ {
798
+ items: r.map((c) => c.id),
799
+ strategy: ae,
800
+ children: s ? /* @__PURE__ */ a.jsx(De, { cards: r, parentRef: d, conditionalFormatting: o }) : /* @__PURE__ */ a.jsx("div", { className: "space-y-2", children: r.map((c) => /* @__PURE__ */ a.jsx(W, { card: c, conditionalFormatting: o }, c.id)) })
801
+ }
802
+ ),
803
+ t && i && /* @__PURE__ */ a.jsx(Re, { columnId: n.id, onAdd: i })
804
+ ] })
797
805
  ]
798
806
  }
799
807
  );
800
808
  }
801
- function He({
809
+ function We({
802
810
  columns: n,
803
811
  onCardMove: l,
804
812
  onColumnToggle: e,
805
813
  enableVirtualScrolling: s = !1,
806
814
  virtualScrollThreshold: t = 50,
807
- className: i
815
+ className: i,
816
+ quickAdd: o,
817
+ onQuickAdd: r,
818
+ conditionalFormatting: d
808
819
  }) {
809
- const [o, r] = C.useState(null), a = C.useMemo(() => (n || []).map((f) => ({
820
+ const [h, u] = v.useState(null), m = v.useMemo(() => (n || []).map((f) => ({
810
821
  ...f,
811
822
  cards: f.cards || []
812
- })), [n]), [c, d] = C.useState(a);
813
- C.useEffect(() => {
814
- d(a);
815
- }, [a]);
816
- const v = Q(
817
- X(ie, {
823
+ })), [n]), [c, g] = v.useState(m);
824
+ v.useEffect(() => {
825
+ g(m);
826
+ }, [m]);
827
+ const w = ee(
828
+ te(oe, {
818
829
  activationConstraint: {
819
830
  distance: 8
820
831
  }
821
832
  })
822
- ), u = (f) => {
823
- const { active: g } = f, m = w(g.id);
824
- r(m);
825
- }, b = (f) => {
826
- const { active: g, over: m } = f;
827
- if (r(null), !m) return;
828
- const x = g.id, z = m.id;
829
- if (x === z) return;
830
- const M = p(x), I = p(z) || y(z);
831
- if (!(!M || !I))
832
- if (M.id === I.id) {
833
- const O = [...M.cards], j = O.findIndex((S) => S.id === x), D = O.findIndex((S) => S.id === z), V = ne(O, j, D);
834
- d(
835
- (S) => S.map(
836
- (A) => A.id === M.id ? { ...A, cards: V } : A
833
+ ), p = (f) => {
834
+ const { active: x } = f, b = z(x.id);
835
+ u(b);
836
+ }, E = (f) => {
837
+ const { active: x, over: b } = f;
838
+ if (u(null), !b) return;
839
+ const y = x.id, j = b.id;
840
+ if (y === j) return;
841
+ const M = C(y), N = C(j) || D(j);
842
+ if (!(!M || !N))
843
+ if (M.id === N.id) {
844
+ const O = [...M.cards], k = O.findIndex((I) => I.id === y), T = O.findIndex((I) => I.id === j), B = re(O, k, T);
845
+ g(
846
+ (I) => I.map(
847
+ (R) => R.id === M.id ? { ...R, cards: B } : R
837
848
  )
838
849
  );
839
850
  } else {
840
- const O = [...M.cards], j = [...I.cards], D = O.findIndex((k) => k.id === x), S = z === I.id ? j.length : j.findIndex((k) => k.id === z), [A] = O.splice(D, 1);
841
- j.splice(S, 0, A), d(
842
- (k) => k.map((_) => _.id === M.id ? { ..._, cards: O } : _.id === I.id ? { ..._, cards: j } : _)
843
- ), l && l(x, M.id, I.id, S);
851
+ const O = [...M.cards], k = [...N.cards], T = O.findIndex((_) => _.id === y), I = j === N.id ? k.length : k.findIndex((_) => _.id === j), [R] = O.splice(T, 1);
852
+ k.splice(I, 0, R), g(
853
+ (_) => _.map((F) => F.id === M.id ? { ...F, cards: O } : F.id === N.id ? { ...F, cards: k } : F)
854
+ ), l && l(y, M.id, N.id, I);
844
855
  }
845
- }, w = C.useCallback(
856
+ }, z = v.useCallback(
846
857
  (f) => {
847
- for (const g of c) {
848
- const m = g.cards.find((x) => x.id === f);
849
- if (m) return m;
858
+ for (const x of c) {
859
+ const b = x.cards.find((y) => y.id === f);
860
+ if (b) return b;
850
861
  }
851
862
  return null;
852
863
  },
853
864
  [c]
854
- ), p = C.useCallback(
855
- (f) => c.find((g) => g.cards.some((m) => m.id === f)) || null,
865
+ ), C = v.useCallback(
866
+ (f) => c.find((x) => x.cards.some((b) => b.id === f)) || null,
856
867
  [c]
857
- ), y = C.useCallback(
858
- (f) => c.find((g) => g.id === f) || null,
868
+ ), D = v.useCallback(
869
+ (f) => c.find((x) => x.id === f) || null,
859
870
  [c]
860
- ), E = C.useCallback((f, g) => {
861
- d(
862
- (m) => m.map((x) => x.id === f ? { ...x, collapsed: g } : x)
863
- ), e?.(f, g);
871
+ ), S = v.useCallback((f, x) => {
872
+ g(
873
+ (b) => b.map((y) => y.id === f ? { ...y, collapsed: x } : y)
874
+ ), e?.(f, x);
864
875
  }, [e]);
865
- return /* @__PURE__ */ h.jsxs(
866
- ee,
876
+ return /* @__PURE__ */ a.jsxs(
877
+ se,
867
878
  {
868
- sensors: v,
869
- collisionDetection: te,
870
- onDragStart: u,
871
- onDragEnd: b,
879
+ sensors: w,
880
+ collisionDetection: ne,
881
+ onDragStart: p,
882
+ onDragEnd: E,
872
883
  children: [
873
- /* @__PURE__ */ h.jsx("div", { className: T("flex gap-4 overflow-x-auto p-4", i), children: c.map((f) => {
874
- const g = s && f.cards.length > t;
875
- return /* @__PURE__ */ h.jsx(
876
- Le,
884
+ /* @__PURE__ */ a.jsx("div", { className: V("flex gap-4 overflow-x-auto p-4", i), children: c.map((f) => {
885
+ const x = s && f.cards.length > t;
886
+ return /* @__PURE__ */ a.jsx(
887
+ _e,
877
888
  {
878
889
  column: f,
879
890
  cards: f.cards,
880
- onToggle: (m) => E(f.id, m),
881
- enableVirtual: g
891
+ onToggle: (b) => S(f.id, b),
892
+ enableVirtual: x,
893
+ quickAdd: o,
894
+ onQuickAdd: r,
895
+ conditionalFormatting: d
882
896
  },
883
897
  f.id
884
898
  );
885
899
  }) }),
886
- /* @__PURE__ */ h.jsx(se, { children: o ? /* @__PURE__ */ h.jsx(W, { card: o }) : null })
900
+ /* @__PURE__ */ a.jsx(ie, { children: h ? /* @__PURE__ */ a.jsx(W, { card: h, conditionalFormatting: d }) : null })
887
901
  ]
888
902
  }
889
903
  );
890
904
  }
891
905
  export {
892
- He as KanbanEnhanced,
893
- He as default
906
+ We as KanbanEnhanced,
907
+ We as default
894
908
  };