@object-ui/plugin-kanban 2.0.0 → 3.0.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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @object-ui/plugin-kanban@2.0.0 build /home/runner/work/objectui/objectui/packages/plugin-kanban
2
+ > @object-ui/plugin-kanban@3.0.1 build /home/runner/work/objectui/objectui/packages/plugin-kanban
3
3
  > vite build
4
4
 
5
5
  vite v7.3.1 building client environment for production...
@@ -10,11 +10,11 @@ rendering chunks...
10
10
  [vite:dts] Start generate declaration files...
11
11
  computing gzip size...
12
12
  dist/index.js  0.28 kB │ gzip: 0.17 kB
13
- dist/KanbanImpl--kTNN_B8.js  5.41 kB │ gzip: 1.93 kB
14
- dist/index-a4_RI-v7.js 17.91 kB │ gzip: 5.22 kB
15
- dist/KanbanEnhanced-BMreTWOT.js 32.18 kB │ gzip: 9.20 kB
16
- dist/sortable.esm-ZHwgFQIO.js 73.13 kB │ gzip: 19.36 kB
17
- [vite:dts] Declaration files built in 23587ms.
13
+ dist/KanbanImpl-BfOKAnJS.js  7.48 kB │ gzip: 2.48 kB
14
+ dist/index-CWGTi2xn.js 18.95 kB │ gzip: 5.57 kB
15
+ dist/KanbanEnhanced-BPIKjTDv.js 32.18 kB │ gzip: 9.20 kB
16
+ dist/sortable.esm-CNNHgHk5.js 73.15 kB │ gzip: 19.37 kB
17
+ [vite:dts] Declaration files built in 25103ms.
18
18
  
19
- dist/index.umd.cjs 85.87 kB │ gzip: 28.09 kB
20
- ✓ built in 37.59s
19
+ dist/index.umd.cjs 88.03 kB │ gzip: 28.95 kB
20
+ ✓ built in 39.12s
package/CHANGELOG.md CHANGED
@@ -1,5 +1,35 @@
1
1
  # @object-ui/plugin-kanban
2
2
 
3
+ ## 3.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [adf2cc0]
8
+ - @object-ui/react@3.0.1
9
+ - @object-ui/components@3.0.1
10
+ - @object-ui/types@3.0.1
11
+ - @object-ui/core@3.0.1
12
+
13
+ ## 3.0.0
14
+
15
+ ### Minor Changes
16
+
17
+ - 87979c3: Upgrade to @objectstack v3.0.0 and console bundle optimization
18
+ - Upgraded all @objectstack/\* packages from ^2.0.7 to ^3.0.0
19
+ - Breaking change migrations: Hub → Cloud namespace, definePlugin removed, PaginatedResult.value → .records, PaginatedResult.count → .total, client.meta.getObject() → client.meta.getItem()
20
+ - Console bundle optimization: split monolithic 3.7 MB chunk into 17 granular cacheable chunks (95% main entry reduction)
21
+ - Added gzip + brotli pre-compression via vite-plugin-compression2
22
+ - Lazy MSW loading for build:server (~150 KB gzip saved)
23
+ - Added bundle analysis with rollup-plugin-visualizer
24
+
25
+ ### Patch Changes
26
+
27
+ - Updated dependencies [87979c3]
28
+ - @object-ui/types@3.0.0
29
+ - @object-ui/core@3.0.0
30
+ - @object-ui/react@3.0.0
31
+ - @object-ui/components@3.0.0
32
+
3
33
  ## 2.0.0
4
34
 
5
35
  ### Major Changes
@@ -1,8 +1,8 @@
1
- import { j as h } from "./index-a4_RI-v7.js";
1
+ import { j as h } from "./index-CWGTi2xn.js";
2
2
  import * as C from "react";
3
3
  import { forwardRef as K, createElement as R } from "react";
4
4
  import { flushSync as J } from "react-dom";
5
- import { u as Q, a as X, P as ee, D as te, c as se, b as ne, d as ie, e as Z, S as re, v as oe, C as le } from "./sortable.esm-ZHwgFQIO.js";
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
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
7
  function N(n, l, e) {
8
8
  let s = e.initialDeps ?? [], t, i = !0;
@@ -814,7 +814,7 @@ function He({
814
814
  d(a);
815
815
  }, [a]);
816
816
  const v = Q(
817
- X(ee, {
817
+ X(ie, {
818
818
  activationConstraint: {
819
819
  distance: 8
820
820
  }
@@ -830,7 +830,7 @@ function He({
830
830
  const M = p(x), I = p(z) || y(z);
831
831
  if (!(!M || !I))
832
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 = ie(O, j, D);
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
834
  d(
835
835
  (S) => S.map(
836
836
  (A) => A.id === M.id ? { ...A, cards: V } : A
@@ -863,10 +863,10 @@ function He({
863
863
  ), e?.(f, g);
864
864
  }, [e]);
865
865
  return /* @__PURE__ */ h.jsxs(
866
- te,
866
+ ee,
867
867
  {
868
868
  sensors: v,
869
- collisionDetection: se,
869
+ collisionDetection: te,
870
870
  onDragStart: u,
871
871
  onDragEnd: b,
872
872
  children: [
@@ -883,7 +883,7 @@ function He({
883
883
  f.id
884
884
  );
885
885
  }) }),
886
- /* @__PURE__ */ h.jsx(ne, { children: o ? /* @__PURE__ */ h.jsx(W, { card: o }) : null })
886
+ /* @__PURE__ */ h.jsx(se, { children: o ? /* @__PURE__ */ h.jsx(W, { card: o }) : null })
887
887
  ]
888
888
  }
889
889
  );
@@ -0,0 +1,194 @@
1
+ import { j as e } from "./index-CWGTi2xn.js";
2
+ import * as h from "react";
3
+ import { u as H, a as B, D as L, c as q, b as z, d as G, T as J, P as M, e as E, S as Q, v as U, C as V } from "./sortable.esm-CNNHgHk5.js";
4
+ import { Badge as K, ScrollArea as W, Card as X, CardHeader as Y, CardTitle as Z, CardDescription as _, CardContent as ee } from "@object-ui/components";
5
+ import { useHasDndProvider as se, useDnd as re } from "@object-ui/react";
6
+ const R = (...s) => s.filter(Boolean).join(" ");
7
+ function T({ card: s, onCardClick: i }) {
8
+ const {
9
+ attributes: x,
10
+ listeners: n,
11
+ setNodeRef: t,
12
+ transform: d,
13
+ transition: c,
14
+ isDragging: C
15
+ } = E({ id: s.id }), o = {
16
+ transform: V.Transform.toString(d),
17
+ transition: c,
18
+ opacity: C ? 0.5 : void 0
19
+ };
20
+ return /* @__PURE__ */ e.jsx(
21
+ "div",
22
+ {
23
+ ref: t,
24
+ style: o,
25
+ ...x,
26
+ ...n,
27
+ role: "listitem",
28
+ "aria-label": s.title,
29
+ onClick: () => i?.(s),
30
+ children: /* @__PURE__ */ e.jsxs(X, { 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 touch-manipulation", children: [
31
+ /* @__PURE__ */ e.jsxs(Y, { className: "p-2 sm:p-4", children: [
32
+ /* @__PURE__ */ e.jsx(Z, { className: "text-xs sm:text-sm font-medium font-mono tracking-tight text-foreground group-hover:text-primary transition-colors", children: s.title }),
33
+ s.description && /* @__PURE__ */ e.jsx(_, { className: "text-xs text-muted-foreground font-mono line-clamp-2 sm:line-clamp-none", children: s.description })
34
+ ] }),
35
+ s.badges && s.badges.length > 0 && /* @__PURE__ */ e.jsx(ee, { className: "p-2 sm:p-4 pt-0", children: /* @__PURE__ */ e.jsx("div", { className: "flex flex-wrap gap-1", children: s.badges.map((b, S) => /* @__PURE__ */ e.jsx(K, { variant: b.variant || "default", className: "text-xs", children: b.label }, S)) }) })
36
+ ] })
37
+ }
38
+ );
39
+ }
40
+ function te({
41
+ column: s,
42
+ cards: i,
43
+ onCardClick: x
44
+ }) {
45
+ const n = i || [], { setNodeRef: t } = E({
46
+ id: s.id,
47
+ data: {
48
+ type: "column"
49
+ }
50
+ }), d = s.limit && n.length >= s.limit;
51
+ return /* @__PURE__ */ e.jsxs(
52
+ "div",
53
+ {
54
+ ref: t,
55
+ role: "group",
56
+ "aria-label": s.title,
57
+ className: R(
58
+ "flex flex-col w-[85vw] sm:w-80 flex-shrink-0 rounded-lg border border-border bg-card/20 backdrop-blur-sm shadow-xl snap-start",
59
+ s.className
60
+ ),
61
+ children: [
62
+ /* @__PURE__ */ e.jsx("div", { className: "p-3 sm:p-4 border-b border-border/50 bg-muted/20", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between", children: [
63
+ /* @__PURE__ */ e.jsx("h3", { id: `kanban-col-${s.id}`, className: "font-mono text-xs sm:text-sm font-semibold tracking-wider text-primary/90 uppercase truncate", children: s.title }),
64
+ /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
65
+ /* @__PURE__ */ e.jsxs("span", { className: "font-mono text-xs text-muted-foreground", "aria-label": `${n.length} cards${s.limit ? ` of ${s.limit} maximum` : ""}`, children: [
66
+ n.length,
67
+ s.limit && ` / ${s.limit}`
68
+ ] }),
69
+ d && /* @__PURE__ */ e.jsx(K, { variant: "destructive", className: "text-xs", children: "Full" })
70
+ ] })
71
+ ] }) }),
72
+ /* @__PURE__ */ e.jsx(W, { className: "flex-1 p-4", children: /* @__PURE__ */ e.jsx(
73
+ Q,
74
+ {
75
+ items: n.map((c) => c.id),
76
+ strategy: U,
77
+ children: /* @__PURE__ */ e.jsx("div", { className: "space-y-2", role: "list", "aria-label": `${s.title} cards`, children: n.map((c) => /* @__PURE__ */ e.jsx(T, { card: c, onCardClick: x }, c.id)) })
78
+ }
79
+ ) })
80
+ ]
81
+ }
82
+ );
83
+ }
84
+ function ae({ children: s }) {
85
+ const i = re();
86
+ return /* @__PURE__ */ e.jsx(e.Fragment, { children: s(i) });
87
+ }
88
+ function le({ columns: s, onCardMove: i, onCardClick: x, className: n }) {
89
+ return se() ? /* @__PURE__ */ e.jsx(ae, { children: (d) => /* @__PURE__ */ e.jsx($, { columns: s, onCardMove: i, onCardClick: x, className: n, dnd: d }) }) : /* @__PURE__ */ e.jsx($, { columns: s, onCardMove: i, onCardClick: x, className: n, dnd: null });
90
+ }
91
+ function $({ columns: s, onCardMove: i, onCardClick: x, className: n, dnd: t }) {
92
+ const [d, c] = h.useState(null), C = h.useMemo(() => (s || []).map((r) => ({
93
+ ...r,
94
+ cards: r.cards || []
95
+ })), [s]), [o, b] = h.useState(C);
96
+ h.useEffect(() => {
97
+ b(C);
98
+ }, [C]);
99
+ const S = H(
100
+ B(M, {
101
+ activationConstraint: {
102
+ distance: 5
103
+ }
104
+ }),
105
+ B(J, {
106
+ activationConstraint: {
107
+ delay: 200,
108
+ tolerance: 5
109
+ }
110
+ })
111
+ ), O = (r) => {
112
+ const { active: m } = r, a = A(m.id);
113
+ if (c(a), t && a) {
114
+ const l = w(a.id);
115
+ l && t.startDrag({ id: a.id, type: "kanban-card", data: a, sourceId: l.id });
116
+ }
117
+ }, P = (r) => {
118
+ const { active: m, over: a } = r;
119
+ if (c(null), !a) {
120
+ t && t.endDrag();
121
+ return;
122
+ }
123
+ const l = m.id, v = a.id;
124
+ if (l === v) {
125
+ t && t.endDrag();
126
+ return;
127
+ }
128
+ const u = w(l), p = w(v) || F(v);
129
+ if (!u || !p) {
130
+ t && t.endDrag();
131
+ return;
132
+ }
133
+ if (u.id === p.id) {
134
+ const g = [...u.cards], j = g.findIndex((f) => f.id === l), I = g.findIndex((f) => f.id === v), k = G(g, j, I);
135
+ b(
136
+ (f) => f.map(
137
+ (D) => D.id === u.id ? { ...D, cards: k } : D
138
+ )
139
+ );
140
+ } else {
141
+ const g = [...u.cards], j = [...p.cards], I = g.findIndex((N) => N.id === l), f = v === p.id ? j.length : j.findIndex((N) => N.id === v), [D] = g.splice(I, 1);
142
+ j.splice(f, 0, D), b(
143
+ (N) => N.map((y) => y.id === u.id ? { ...y, cards: g } : y.id === p.id ? { ...y, cards: j } : y)
144
+ ), i && i(l, u.id, p.id, f);
145
+ }
146
+ t && t.endDrag(p.id);
147
+ }, A = h.useCallback(
148
+ (r) => {
149
+ for (const m of o) {
150
+ const a = m.cards.find((l) => l.id === r);
151
+ if (a) return a;
152
+ }
153
+ return null;
154
+ },
155
+ [o]
156
+ ), w = h.useCallback(
157
+ (r) => o.find((m) => m.cards.some((a) => a.id === r)) || null,
158
+ [o]
159
+ ), F = h.useCallback(
160
+ (r) => o.find((m) => m.id === r) || null,
161
+ [o]
162
+ );
163
+ return /* @__PURE__ */ e.jsxs(
164
+ L,
165
+ {
166
+ sensors: S,
167
+ collisionDetection: q,
168
+ onDragStart: O,
169
+ onDragEnd: P,
170
+ children: [
171
+ /* @__PURE__ */ e.jsxs("div", { className: "flex sm:hidden items-center justify-between px-3 pb-2 text-xs text-muted-foreground", children: [
172
+ /* @__PURE__ */ e.jsxs("span", { children: [
173
+ o.length,
174
+ " columns"
175
+ ] }),
176
+ /* @__PURE__ */ e.jsx("span", { children: "← Swipe to navigate →" })
177
+ ] }),
178
+ /* @__PURE__ */ e.jsx("div", { className: R("flex gap-3 sm:gap-4 overflow-x-auto snap-x snap-mandatory p-2 sm:p-4 [-webkit-overflow-scrolling:touch]", n), role: "region", "aria-label": "Kanban board", children: o.map((r) => /* @__PURE__ */ e.jsx(
179
+ te,
180
+ {
181
+ column: r,
182
+ cards: r.cards,
183
+ onCardClick: x
184
+ },
185
+ r.id
186
+ )) }),
187
+ /* @__PURE__ */ e.jsx(z, { children: /* @__PURE__ */ e.jsx("div", { "aria-live": "assertive", "aria-label": d ? `Dragging ${d.title}` : void 0, children: d ? /* @__PURE__ */ e.jsx(T, { card: d }) : null }) })
188
+ ]
189
+ }
190
+ );
191
+ }
192
+ export {
193
+ le as default
194
+ };