@btst/stack 1.11.0 → 1.12.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 (163) hide show
  1. package/dist/node_modules/.pnpm/@dnd-kit_core@6.3.1_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@dnd-kit/core/dist/core.esm.cjs +1 -1
  2. package/dist/node_modules/.pnpm/@dnd-kit_core@6.3.1_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@dnd-kit/core/dist/core.esm.mjs +1 -1
  3. package/dist/node_modules/.pnpm/@dnd-kit_sortable@10.0.0_@dnd-kit_core@6.3.1_react-dom@19.2.0_react@19.2.0__react@19.2.0__react@19.2.0/node_modules/@dnd-kit/sortable/dist/sortable.esm.cjs +77 -0
  4. package/dist/node_modules/.pnpm/@dnd-kit_sortable@10.0.0_@dnd-kit_core@6.3.1_react-dom@19.2.0_react@19.2.0__react@19.2.0__react@19.2.0/node_modules/@dnd-kit/sortable/dist/sortable.esm.mjs +79 -3
  5. package/dist/node_modules/.pnpm/@radix-ui_react-avatar@1.1.11_@types_react-dom@19.2.3_@types_react@19.2.6__@types_react_850cfbef1935a6e49a6ad6c93c7ca70d/node_modules/@radix-ui/react-avatar/dist/index.cjs +140 -0
  6. package/dist/node_modules/.pnpm/@radix-ui_react-avatar@1.1.11_@types_react-dom@19.2.3_@types_react@19.2.6__@types_react_850cfbef1935a6e49a6ad6c93c7ca70d/node_modules/@radix-ui/react-avatar/dist/index.mjs +119 -0
  7. package/dist/node_modules/.pnpm/@radix-ui_react-context@1.1.3_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-context/dist/index.cjs +80 -0
  8. package/dist/node_modules/.pnpm/@radix-ui_react-context@1.1.3_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-context/dist/index.mjs +64 -0
  9. package/dist/node_modules/.pnpm/@radix-ui_react-use-is-hydrated@0.1.0_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-use-is-hydrated/dist/index.cjs +18 -0
  10. package/dist/node_modules/.pnpm/@radix-ui_react-use-is-hydrated@0.1.0_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-use-is-hydrated/dist/index.mjs +16 -0
  11. package/dist/packages/better-stack/src/plugins/kanban/api/plugin.cjs +846 -0
  12. package/dist/packages/better-stack/src/plugins/kanban/api/plugin.mjs +844 -0
  13. package/dist/packages/better-stack/src/plugins/kanban/client/components/forms/board-form.cjs +85 -0
  14. package/dist/packages/better-stack/src/plugins/kanban/client/components/forms/board-form.mjs +83 -0
  15. package/dist/packages/better-stack/src/plugins/kanban/client/components/forms/column-form.cjs +72 -0
  16. package/dist/packages/better-stack/src/plugins/kanban/client/components/forms/column-form.mjs +70 -0
  17. package/dist/packages/better-stack/src/plugins/kanban/client/components/forms/task-form.cjs +200 -0
  18. package/dist/packages/better-stack/src/plugins/kanban/client/components/forms/task-form.mjs +198 -0
  19. package/dist/packages/better-stack/src/plugins/kanban/client/components/loading/board-skeleton.cjs +47 -0
  20. package/dist/packages/better-stack/src/plugins/kanban/client/components/loading/board-skeleton.mjs +45 -0
  21. package/dist/packages/better-stack/src/plugins/kanban/client/components/loading/boards-list-skeleton.cjs +30 -0
  22. package/dist/packages/better-stack/src/plugins/kanban/client/components/loading/boards-list-skeleton.mjs +28 -0
  23. package/dist/packages/better-stack/src/plugins/kanban/client/components/pages/404-page.cjs +27 -0
  24. package/dist/packages/better-stack/src/plugins/kanban/client/components/pages/404-page.mjs +25 -0
  25. package/dist/packages/better-stack/src/plugins/kanban/client/components/pages/board-page.cjs +31 -0
  26. package/dist/packages/better-stack/src/plugins/kanban/client/components/pages/board-page.internal.cjs +458 -0
  27. package/dist/packages/better-stack/src/plugins/kanban/client/components/pages/board-page.internal.mjs +456 -0
  28. package/dist/packages/better-stack/src/plugins/kanban/client/components/pages/board-page.mjs +29 -0
  29. package/dist/packages/better-stack/src/plugins/kanban/client/components/pages/boards-list-page.cjs +30 -0
  30. package/dist/packages/better-stack/src/plugins/kanban/client/components/pages/boards-list-page.internal.cjs +72 -0
  31. package/dist/packages/better-stack/src/plugins/kanban/client/components/pages/boards-list-page.internal.mjs +70 -0
  32. package/dist/packages/better-stack/src/plugins/kanban/client/components/pages/boards-list-page.mjs +28 -0
  33. package/dist/packages/better-stack/src/plugins/kanban/client/components/pages/new-board-page.cjs +30 -0
  34. package/dist/packages/better-stack/src/plugins/kanban/client/components/pages/new-board-page.internal.cjs +51 -0
  35. package/dist/packages/better-stack/src/plugins/kanban/client/components/pages/new-board-page.internal.mjs +49 -0
  36. package/dist/packages/better-stack/src/plugins/kanban/client/components/pages/new-board-page.mjs +28 -0
  37. package/dist/packages/better-stack/src/plugins/kanban/client/components/shared/column-content.cjs +76 -0
  38. package/dist/packages/better-stack/src/plugins/kanban/client/components/shared/column-content.mjs +74 -0
  39. package/dist/packages/better-stack/src/plugins/kanban/client/components/shared/default-error.cjs +27 -0
  40. package/dist/packages/better-stack/src/plugins/kanban/client/components/shared/default-error.mjs +25 -0
  41. package/dist/packages/better-stack/src/plugins/kanban/client/components/shared/empty-state.cjs +32 -0
  42. package/dist/packages/better-stack/src/plugins/kanban/client/components/shared/empty-state.mjs +30 -0
  43. package/dist/packages/better-stack/src/plugins/kanban/client/components/shared/kanban-board.cjs +78 -0
  44. package/dist/packages/better-stack/src/plugins/kanban/client/components/shared/kanban-board.mjs +76 -0
  45. package/dist/packages/better-stack/src/plugins/kanban/client/components/shared/page-wrapper.cjs +15 -0
  46. package/dist/packages/better-stack/src/plugins/kanban/client/components/shared/page-wrapper.mjs +13 -0
  47. package/dist/packages/better-stack/src/plugins/kanban/client/components/shared/task-card.cjs +68 -0
  48. package/dist/packages/better-stack/src/plugins/kanban/client/components/shared/task-card.mjs +66 -0
  49. package/dist/packages/better-stack/src/plugins/kanban/client/components/shared/user-avatar.cjs +32 -0
  50. package/dist/packages/better-stack/src/plugins/kanban/client/components/shared/user-avatar.mjs +30 -0
  51. package/dist/packages/better-stack/src/plugins/kanban/client/hooks/kanban-hooks.cjs +391 -0
  52. package/dist/packages/better-stack/src/plugins/kanban/client/hooks/kanban-hooks.mjs +381 -0
  53. package/dist/packages/better-stack/src/plugins/kanban/client/plugin.cjs +290 -0
  54. package/dist/packages/better-stack/src/plugins/kanban/client/plugin.mjs +288 -0
  55. package/dist/packages/better-stack/src/plugins/kanban/db.cjs +125 -0
  56. package/dist/packages/better-stack/src/plugins/kanban/db.mjs +123 -0
  57. package/dist/packages/better-stack/src/plugins/kanban/schemas.cjs +117 -0
  58. package/dist/packages/better-stack/src/plugins/kanban/schemas.mjs +102 -0
  59. package/dist/packages/better-stack/src/plugins/kanban/utils.cjs +49 -0
  60. package/dist/packages/better-stack/src/plugins/kanban/utils.mjs +45 -0
  61. package/dist/packages/ui/src/components/avatar.cjs +58 -0
  62. package/dist/packages/ui/src/components/avatar.mjs +54 -0
  63. package/dist/packages/ui/src/components/command.cjs +3 -3
  64. package/dist/packages/ui/src/components/command.mjs +3 -3
  65. package/dist/packages/ui/src/components/form-builder/index.mjs +2 -2
  66. package/dist/packages/ui/src/components/kanban.cjs +835 -0
  67. package/dist/packages/ui/src/components/kanban.mjs +805 -0
  68. package/dist/packages/ui/src/components/popover.cjs +8 -3
  69. package/dist/packages/ui/src/components/popover.mjs +9 -4
  70. package/dist/packages/ui/src/components/search-select.cjs +75 -0
  71. package/dist/packages/ui/src/components/search-select.mjs +73 -0
  72. package/dist/packages/ui/src/lib/compose-refs.cjs +56 -0
  73. package/dist/packages/ui/src/lib/compose-refs.mjs +39 -0
  74. package/dist/plugins/blog/api/index.d.cts +1 -1
  75. package/dist/plugins/blog/api/index.d.mts +1 -1
  76. package/dist/plugins/blog/api/index.d.ts +1 -1
  77. package/dist/plugins/blog/client/hooks/index.d.cts +2 -2
  78. package/dist/plugins/blog/client/hooks/index.d.mts +2 -2
  79. package/dist/plugins/blog/client/hooks/index.d.ts +2 -2
  80. package/dist/plugins/blog/client/index.d.cts +1 -1
  81. package/dist/plugins/blog/client/index.d.mts +1 -1
  82. package/dist/plugins/blog/client/index.d.ts +1 -1
  83. package/dist/plugins/blog/query-keys.d.cts +2 -2
  84. package/dist/plugins/blog/query-keys.d.mts +2 -2
  85. package/dist/plugins/blog/query-keys.d.ts +2 -2
  86. package/dist/plugins/kanban/api/index.cjs +7 -0
  87. package/dist/plugins/kanban/api/index.d.cts +403 -0
  88. package/dist/plugins/kanban/api/index.d.mts +403 -0
  89. package/dist/plugins/kanban/api/index.d.ts +403 -0
  90. package/dist/plugins/kanban/api/index.mjs +1 -0
  91. package/dist/plugins/kanban/client/components/index.cjs +35 -0
  92. package/dist/plugins/kanban/client/components/index.d.cts +102 -0
  93. package/dist/plugins/kanban/client/components/index.d.mts +102 -0
  94. package/dist/plugins/kanban/client/components/index.d.ts +102 -0
  95. package/dist/plugins/kanban/client/components/index.mjs +15 -0
  96. package/dist/plugins/kanban/client/hooks/index.cjs +15 -0
  97. package/dist/plugins/kanban/client/hooks/index.d.cts +143 -0
  98. package/dist/plugins/kanban/client/hooks/index.d.mts +143 -0
  99. package/dist/plugins/kanban/client/hooks/index.d.ts +143 -0
  100. package/dist/plugins/kanban/client/hooks/index.mjs +1 -0
  101. package/dist/plugins/kanban/client/index.cjs +7 -0
  102. package/dist/plugins/kanban/client/index.d.cts +196 -0
  103. package/dist/plugins/kanban/client/index.d.mts +196 -0
  104. package/dist/plugins/kanban/client/index.d.ts +196 -0
  105. package/dist/plugins/kanban/client/index.mjs +1 -0
  106. package/dist/plugins/kanban/client.css +68 -0
  107. package/dist/plugins/kanban/query-keys.cjs +105 -0
  108. package/dist/plugins/kanban/query-keys.d.cts +59 -0
  109. package/dist/plugins/kanban/query-keys.d.mts +59 -0
  110. package/dist/plugins/kanban/query-keys.d.ts +59 -0
  111. package/dist/plugins/kanban/query-keys.mjs +103 -0
  112. package/dist/plugins/kanban/style.css +7 -0
  113. package/dist/plugins/ui-builder/style.css +6 -0
  114. package/dist/shared/stack.DKDMI-QO.d.cts +70 -0
  115. package/dist/shared/stack.DKDMI-QO.d.mts +70 -0
  116. package/dist/shared/stack.DKDMI-QO.d.ts +70 -0
  117. package/dist/shared/stack.FeaWkglm.d.cts +190 -0
  118. package/dist/shared/stack.FeaWkglm.d.mts +190 -0
  119. package/dist/shared/stack.FeaWkglm.d.ts +190 -0
  120. package/package.json +56 -2
  121. package/src/plugins/kanban/api/index.ts +6 -0
  122. package/src/plugins/kanban/api/plugin.ts +1245 -0
  123. package/src/plugins/kanban/client/components/forms/board-form.tsx +108 -0
  124. package/src/plugins/kanban/client/components/forms/column-form.tsx +97 -0
  125. package/src/plugins/kanban/client/components/forms/task-form.tsx +274 -0
  126. package/src/plugins/kanban/client/components/index.tsx +21 -0
  127. package/src/plugins/kanban/client/components/loading/board-skeleton.tsx +49 -0
  128. package/src/plugins/kanban/client/components/loading/boards-list-skeleton.tsx +34 -0
  129. package/src/plugins/kanban/client/components/loading/index.tsx +2 -0
  130. package/src/plugins/kanban/client/components/pages/404-page.tsx +28 -0
  131. package/src/plugins/kanban/client/components/pages/board-page.internal.tsx +575 -0
  132. package/src/plugins/kanban/client/components/pages/board-page.tsx +31 -0
  133. package/src/plugins/kanban/client/components/pages/boards-list-page.internal.tsx +101 -0
  134. package/src/plugins/kanban/client/components/pages/boards-list-page.tsx +26 -0
  135. package/src/plugins/kanban/client/components/pages/new-board-page.internal.tsx +65 -0
  136. package/src/plugins/kanban/client/components/pages/new-board-page.tsx +26 -0
  137. package/src/plugins/kanban/client/components/shared/column-content.tsx +108 -0
  138. package/src/plugins/kanban/client/components/shared/default-error.tsx +32 -0
  139. package/src/plugins/kanban/client/components/shared/empty-state.tsx +37 -0
  140. package/src/plugins/kanban/client/components/shared/kanban-board.tsx +87 -0
  141. package/src/plugins/kanban/client/components/shared/page-wrapper.tsx +20 -0
  142. package/src/plugins/kanban/client/components/shared/task-card.tsx +79 -0
  143. package/src/plugins/kanban/client/components/shared/user-avatar.tsx +63 -0
  144. package/src/plugins/kanban/client/hooks/index.tsx +11 -0
  145. package/src/plugins/kanban/client/hooks/kanban-hooks.tsx +560 -0
  146. package/src/plugins/kanban/client/index.ts +8 -0
  147. package/src/plugins/kanban/client/localization/index.ts +28 -0
  148. package/src/plugins/kanban/client/localization/kanban-common.ts +69 -0
  149. package/src/plugins/kanban/client/localization/kanban-forms.ts +70 -0
  150. package/src/plugins/kanban/client/localization/kanban-list.ts +36 -0
  151. package/src/plugins/kanban/client/overrides.ts +145 -0
  152. package/src/plugins/kanban/client/plugin.tsx +463 -0
  153. package/src/plugins/kanban/client.css +68 -0
  154. package/src/plugins/kanban/db.ts +125 -0
  155. package/src/plugins/kanban/query-keys.ts +154 -0
  156. package/src/plugins/kanban/schemas.ts +143 -0
  157. package/src/plugins/kanban/style.css +7 -0
  158. package/src/plugins/kanban/types.ts +106 -0
  159. package/src/plugins/kanban/utils.ts +107 -0
  160. package/src/plugins/ui-builder/style.css +6 -0
  161. package/dist/shared/{stack.DLhzx1-D.d.cts → stack.CcI4sYJP.d.cts} +1 -1
  162. package/dist/shared/{stack.DLhzx1-D.d.mts → stack.CcI4sYJP.d.mts} +1 -1
  163. package/dist/shared/{stack.DLhzx1-D.d.ts → stack.CcI4sYJP.d.ts} +1 -1
@@ -0,0 +1,835 @@
1
+ "use client";
2
+ 'use strict';
3
+
4
+ const jsxRuntime = require('react/jsx-runtime');
5
+ const core_esm = require('../../../../node_modules/.pnpm/@dnd-kit_core@6.3.1_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@dnd-kit/core/dist/core.esm.cjs');
6
+ const sortable_esm = require('../../../../node_modules/.pnpm/@dnd-kit_sortable@10.0.0_@dnd-kit_core@6.3.1_react-dom@19.2.0_react@19.2.0__react@19.2.0__react@19.2.0/node_modules/@dnd-kit/sortable/dist/sortable.esm.cjs');
7
+ const utilities_esm = require('../../../../node_modules/.pnpm/@dnd-kit_utilities@3.2.2_react@19.2.0/node_modules/@dnd-kit/utilities/dist/utilities.esm.cjs');
8
+ const reactSlot = require('@radix-ui/react-slot');
9
+ const React = require('react');
10
+ const ReactDOM = require('react-dom');
11
+ const composeRefs = require('../lib/compose-refs.cjs');
12
+ const utils = require('../lib/utils.cjs');
13
+
14
+ function _interopNamespaceCompat(e) {
15
+ if (e && typeof e === 'object' && 'default' in e) return e;
16
+ const n = Object.create(null);
17
+ if (e) {
18
+ for (const k in e) {
19
+ n[k] = e[k];
20
+ }
21
+ }
22
+ n.default = e;
23
+ return n;
24
+ }
25
+
26
+ const React__namespace = /*#__PURE__*/_interopNamespaceCompat(React);
27
+ const ReactDOM__namespace = /*#__PURE__*/_interopNamespaceCompat(ReactDOM);
28
+
29
+ const directions = [
30
+ core_esm.KeyboardCode.Down,
31
+ core_esm.KeyboardCode.Right,
32
+ core_esm.KeyboardCode.Up,
33
+ core_esm.KeyboardCode.Left
34
+ ];
35
+ const coordinateGetter = (event, { context }) => {
36
+ const { active, droppableRects, droppableContainers, collisionRect } = context;
37
+ if (directions.includes(event.code)) {
38
+ event.preventDefault();
39
+ if (!active || !collisionRect) return;
40
+ const filteredContainers = [];
41
+ for (const entry of droppableContainers.getEnabled()) {
42
+ if (!entry || entry?.disabled) return;
43
+ const rect = droppableRects.get(entry.id);
44
+ if (!rect) return;
45
+ const data = entry.data.current;
46
+ if (data) {
47
+ const { type, children } = data;
48
+ if (type === "container" && children?.length > 0) {
49
+ if (active.data.current?.type !== "container") {
50
+ return;
51
+ }
52
+ }
53
+ }
54
+ switch (event.code) {
55
+ case core_esm.KeyboardCode.Down:
56
+ if (collisionRect.top < rect.top) {
57
+ filteredContainers.push(entry);
58
+ }
59
+ break;
60
+ case core_esm.KeyboardCode.Up:
61
+ if (collisionRect.top > rect.top) {
62
+ filteredContainers.push(entry);
63
+ }
64
+ break;
65
+ case core_esm.KeyboardCode.Left:
66
+ if (collisionRect.left >= rect.left + rect.width) {
67
+ filteredContainers.push(entry);
68
+ }
69
+ break;
70
+ case core_esm.KeyboardCode.Right:
71
+ if (collisionRect.left + collisionRect.width <= rect.left) {
72
+ filteredContainers.push(entry);
73
+ }
74
+ break;
75
+ }
76
+ }
77
+ const collisions = core_esm.closestCorners({
78
+ collisionRect,
79
+ droppableRects,
80
+ droppableContainers: filteredContainers});
81
+ const closestId = core_esm.getFirstCollision(collisions, "id");
82
+ if (closestId != null) {
83
+ const newDroppable = droppableContainers.get(closestId);
84
+ const newNode = newDroppable?.node.current;
85
+ const newRect = newDroppable?.rect.current;
86
+ if (newNode && newRect) {
87
+ if (newDroppable.id === "placeholder") {
88
+ return {
89
+ x: newRect.left + (newRect.width - collisionRect.width) / 2,
90
+ y: newRect.top + (newRect.height - collisionRect.height) / 2
91
+ };
92
+ }
93
+ if (newDroppable.data.current?.type === "container") {
94
+ return {
95
+ x: newRect.left + 20,
96
+ y: newRect.top + 74
97
+ };
98
+ }
99
+ return {
100
+ x: newRect.left,
101
+ y: newRect.top
102
+ };
103
+ }
104
+ }
105
+ }
106
+ return void 0;
107
+ };
108
+ const ROOT_NAME = "Kanban";
109
+ const BOARD_NAME = "KanbanBoard";
110
+ const COLUMN_NAME = "KanbanColumn";
111
+ const COLUMN_HANDLE_NAME = "KanbanColumnHandle";
112
+ const ITEM_NAME = "KanbanItem";
113
+ const ITEM_HANDLE_NAME = "KanbanItemHandle";
114
+ const OVERLAY_NAME = "KanbanOverlay";
115
+ const KanbanContext = React__namespace.createContext(
116
+ null
117
+ );
118
+ KanbanContext.displayName = ROOT_NAME;
119
+ function useKanbanContext(consumerName) {
120
+ const context = React__namespace.useContext(KanbanContext);
121
+ if (!context) {
122
+ throw new Error(`\`${consumerName}\` must be used within \`${ROOT_NAME}\``);
123
+ }
124
+ return context;
125
+ }
126
+ function KanbanRoot(props) {
127
+ const {
128
+ value,
129
+ onValueChange,
130
+ modifiers,
131
+ strategy = sortable_esm.verticalListSortingStrategy,
132
+ orientation = "horizontal",
133
+ onMove,
134
+ getItemValue: getItemValueProp,
135
+ accessibility,
136
+ flatCursor = false,
137
+ ...kanbanProps
138
+ } = props;
139
+ const id = React__namespace.useId();
140
+ const [activeId, setActiveId] = React__namespace.useState(null);
141
+ const lastOverIdRef = React__namespace.useRef(null);
142
+ const hasMovedRef = React__namespace.useRef(false);
143
+ const sensors = core_esm.useSensors(
144
+ core_esm.useSensor(core_esm.MouseSensor),
145
+ core_esm.useSensor(core_esm.TouchSensor),
146
+ core_esm.useSensor(core_esm.KeyboardSensor, {
147
+ coordinateGetter
148
+ })
149
+ );
150
+ const getItemValue = React__namespace.useCallback(
151
+ (item) => {
152
+ if (typeof item === "object" && !getItemValueProp) {
153
+ throw new Error("getItemValue is required when using array of objects");
154
+ }
155
+ return getItemValueProp ? getItemValueProp(item) : item;
156
+ },
157
+ [getItemValueProp]
158
+ );
159
+ const getColumn = React__namespace.useCallback(
160
+ (id2) => {
161
+ if (id2 in value) return id2;
162
+ for (const [columnId, items] of Object.entries(value)) {
163
+ if (items.some((item) => getItemValue(item) === id2)) {
164
+ return columnId;
165
+ }
166
+ }
167
+ return null;
168
+ },
169
+ [value, getItemValue]
170
+ );
171
+ const collisionDetection = React__namespace.useCallback(
172
+ (args) => {
173
+ if (activeId && activeId in value) {
174
+ return core_esm.closestCenter({
175
+ ...args,
176
+ droppableContainers: args.droppableContainers.filter(
177
+ (container) => container.id in value
178
+ )
179
+ });
180
+ }
181
+ const pointerIntersections = core_esm.pointerWithin(args);
182
+ const intersections = pointerIntersections.length > 0 ? pointerIntersections : core_esm.rectIntersection(args);
183
+ let overId = core_esm.getFirstCollision(intersections, "id");
184
+ if (!overId) {
185
+ if (hasMovedRef.current) {
186
+ lastOverIdRef.current = activeId;
187
+ }
188
+ return lastOverIdRef.current ? [{ id: lastOverIdRef.current }] : [];
189
+ }
190
+ if (overId in value) {
191
+ const containerItems = value[overId];
192
+ if (containerItems && containerItems.length > 0) {
193
+ const closestItem = core_esm.closestCenter({
194
+ ...args,
195
+ droppableContainers: args.droppableContainers.filter(
196
+ (container) => container.id !== overId && containerItems.some(
197
+ (item) => getItemValue(item) === container.id
198
+ )
199
+ )
200
+ });
201
+ if (closestItem.length > 0) {
202
+ overId = closestItem[0]?.id ?? overId;
203
+ }
204
+ }
205
+ }
206
+ lastOverIdRef.current = overId;
207
+ return [{ id: overId }];
208
+ },
209
+ [activeId, value, getItemValue]
210
+ );
211
+ const onDragStart = React__namespace.useCallback(
212
+ (event) => {
213
+ kanbanProps.onDragStart?.(event);
214
+ if (event.activatorEvent.defaultPrevented) return;
215
+ setActiveId(event.active.id);
216
+ },
217
+ // eslint-disable-next-line react-hooks/exhaustive-deps
218
+ [kanbanProps.onDragStart]
219
+ );
220
+ const onDragOver = React__namespace.useCallback(
221
+ (event) => {
222
+ kanbanProps.onDragOver?.(event);
223
+ if (event.activatorEvent.defaultPrevented) return;
224
+ const { active, over } = event;
225
+ if (!over) return;
226
+ const activeColumn = getColumn(active.id);
227
+ const overColumn = getColumn(over.id);
228
+ if (!activeColumn || !overColumn) return;
229
+ if (activeColumn === overColumn) {
230
+ const items = value[activeColumn];
231
+ if (!items) return;
232
+ const activeIndex = items.findIndex(
233
+ (item) => getItemValue(item) === active.id
234
+ );
235
+ const overIndex = items.findIndex(
236
+ (item) => getItemValue(item) === over.id
237
+ );
238
+ if (activeIndex !== overIndex) {
239
+ const newColumns = { ...value };
240
+ newColumns[activeColumn] = sortable_esm.arrayMove(items, activeIndex, overIndex);
241
+ onValueChange?.(newColumns);
242
+ }
243
+ } else {
244
+ const activeItems = value[activeColumn];
245
+ const overItems = value[overColumn];
246
+ if (!activeItems || !overItems) return;
247
+ const activeIndex = activeItems.findIndex(
248
+ (item) => getItemValue(item) === active.id
249
+ );
250
+ if (activeIndex === -1) return;
251
+ const activeItem = activeItems[activeIndex];
252
+ if (!activeItem) return;
253
+ const updatedItems = {
254
+ ...value,
255
+ [activeColumn]: activeItems.filter(
256
+ (item) => getItemValue(item) !== active.id
257
+ ),
258
+ [overColumn]: [...overItems, activeItem]
259
+ };
260
+ onValueChange?.(updatedItems);
261
+ hasMovedRef.current = true;
262
+ }
263
+ },
264
+ // eslint-disable-next-line react-hooks/exhaustive-deps
265
+ [value, getColumn, getItemValue, onValueChange, kanbanProps.onDragOver]
266
+ );
267
+ const onDragEnd = React__namespace.useCallback(
268
+ (event) => {
269
+ kanbanProps.onDragEnd?.(event);
270
+ if (event.activatorEvent.defaultPrevented) return;
271
+ const { active, over } = event;
272
+ if (!over) {
273
+ setActiveId(null);
274
+ return;
275
+ }
276
+ if (active.id in value && over.id in value) {
277
+ const activeIndex = Object.keys(value).indexOf(active.id);
278
+ const overIndex = Object.keys(value).indexOf(over.id);
279
+ if (activeIndex !== overIndex) {
280
+ const orderedColumns = Object.keys(value);
281
+ const newOrder = sortable_esm.arrayMove(orderedColumns, activeIndex, overIndex);
282
+ const newColumns = {};
283
+ for (const key of newOrder) {
284
+ const items = value[key];
285
+ if (items) {
286
+ newColumns[key] = items;
287
+ }
288
+ }
289
+ if (onMove) {
290
+ onMove({ ...event, activeIndex, overIndex });
291
+ } else {
292
+ onValueChange?.(newColumns);
293
+ }
294
+ }
295
+ } else {
296
+ const activeColumn = getColumn(active.id);
297
+ const overColumn = getColumn(over.id);
298
+ if (!activeColumn || !overColumn) {
299
+ setActiveId(null);
300
+ return;
301
+ }
302
+ if (activeColumn === overColumn) {
303
+ const items = value[activeColumn];
304
+ if (!items) {
305
+ setActiveId(null);
306
+ return;
307
+ }
308
+ const activeIndex = items.findIndex(
309
+ (item) => getItemValue(item) === active.id
310
+ );
311
+ const overIndex = items.findIndex(
312
+ (item) => getItemValue(item) === over.id
313
+ );
314
+ if (activeIndex !== overIndex) {
315
+ const newColumns = { ...value };
316
+ newColumns[activeColumn] = sortable_esm.arrayMove(items, activeIndex, overIndex);
317
+ if (onMove) {
318
+ onMove({
319
+ ...event,
320
+ activeIndex,
321
+ overIndex
322
+ });
323
+ } else {
324
+ onValueChange?.(newColumns);
325
+ }
326
+ }
327
+ }
328
+ }
329
+ setActiveId(null);
330
+ hasMovedRef.current = false;
331
+ },
332
+ // eslint-disable-next-line react-hooks/exhaustive-deps
333
+ [
334
+ value,
335
+ getColumn,
336
+ getItemValue,
337
+ onValueChange,
338
+ onMove,
339
+ kanbanProps.onDragEnd
340
+ ]
341
+ );
342
+ const onDragCancel = React__namespace.useCallback(
343
+ (event) => {
344
+ kanbanProps.onDragCancel?.(event);
345
+ if (event.activatorEvent.defaultPrevented) return;
346
+ setActiveId(null);
347
+ hasMovedRef.current = false;
348
+ },
349
+ // eslint-disable-next-line react-hooks/exhaustive-deps
350
+ [kanbanProps.onDragCancel]
351
+ );
352
+ const announcements = React__namespace.useMemo(
353
+ () => ({
354
+ onDragStart({ active }) {
355
+ const isColumn = active.id in value;
356
+ const itemType = isColumn ? "column" : "item";
357
+ const position = isColumn ? Object.keys(value).indexOf(active.id) + 1 : (() => {
358
+ const column = getColumn(active.id);
359
+ if (!column || !value[column]) return 1;
360
+ return value[column].findIndex(
361
+ (item) => getItemValue(item) === active.id
362
+ ) + 1;
363
+ })();
364
+ const total = isColumn ? Object.keys(value).length : (() => {
365
+ const column = getColumn(active.id);
366
+ return column ? value[column]?.length ?? 0 : 0;
367
+ })();
368
+ return `Picked up ${itemType} at position ${position} of ${total}`;
369
+ },
370
+ onDragOver({ active, over }) {
371
+ if (!over) return;
372
+ const isColumn = active.id in value;
373
+ const itemType = isColumn ? "column" : "item";
374
+ const position = isColumn ? Object.keys(value).indexOf(over.id) + 1 : (() => {
375
+ const column = getColumn(over.id);
376
+ if (!column || !value[column]) return 1;
377
+ return value[column].findIndex(
378
+ (item) => getItemValue(item) === over.id
379
+ ) + 1;
380
+ })();
381
+ const total = isColumn ? Object.keys(value).length : (() => {
382
+ const column = getColumn(over.id);
383
+ return column ? value[column]?.length ?? 0 : 0;
384
+ })();
385
+ const overColumn = getColumn(over.id);
386
+ const activeColumn = getColumn(active.id);
387
+ if (isColumn) {
388
+ return `${itemType} is now at position ${position} of ${total}`;
389
+ }
390
+ if (activeColumn !== overColumn) {
391
+ return `${itemType} is now at position ${position} of ${total} in ${overColumn}`;
392
+ }
393
+ return `${itemType} is now at position ${position} of ${total}`;
394
+ },
395
+ onDragEnd({ active, over }) {
396
+ if (!over) return;
397
+ const isColumn = active.id in value;
398
+ const itemType = isColumn ? "column" : "item";
399
+ const position = isColumn ? Object.keys(value).indexOf(over.id) + 1 : (() => {
400
+ const column = getColumn(over.id);
401
+ if (!column || !value[column]) return 1;
402
+ return value[column].findIndex(
403
+ (item) => getItemValue(item) === over.id
404
+ ) + 1;
405
+ })();
406
+ const total = isColumn ? Object.keys(value).length : (() => {
407
+ const column = getColumn(over.id);
408
+ return column ? value[column]?.length ?? 0 : 0;
409
+ })();
410
+ const overColumn = getColumn(over.id);
411
+ const activeColumn = getColumn(active.id);
412
+ if (isColumn) {
413
+ return `${itemType} was dropped at position ${position} of ${total}`;
414
+ }
415
+ if (activeColumn !== overColumn) {
416
+ return `${itemType} was dropped at position ${position} of ${total} in ${overColumn}`;
417
+ }
418
+ return `${itemType} was dropped at position ${position} of ${total}`;
419
+ },
420
+ onDragCancel({ active }) {
421
+ const isColumn = active.id in value;
422
+ const itemType = isColumn ? "column" : "item";
423
+ return `Dragging was cancelled. ${itemType} was dropped.`;
424
+ }
425
+ }),
426
+ [value, getColumn, getItemValue]
427
+ );
428
+ const contextValue = React__namespace.useMemo(
429
+ () => ({
430
+ id,
431
+ items: value,
432
+ modifiers,
433
+ strategy,
434
+ orientation,
435
+ activeId,
436
+ setActiveId,
437
+ getItemValue,
438
+ flatCursor
439
+ }),
440
+ [
441
+ id,
442
+ value,
443
+ activeId,
444
+ modifiers,
445
+ strategy,
446
+ orientation,
447
+ getItemValue,
448
+ flatCursor
449
+ ]
450
+ );
451
+ return /* @__PURE__ */ jsxRuntime.jsx(KanbanContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx(
452
+ core_esm.DndContext,
453
+ {
454
+ collisionDetection,
455
+ modifiers,
456
+ sensors,
457
+ ...kanbanProps,
458
+ id,
459
+ measuring: {
460
+ droppable: {
461
+ strategy: core_esm.MeasuringStrategy.Always
462
+ }
463
+ },
464
+ onDragStart,
465
+ onDragOver,
466
+ onDragEnd,
467
+ onDragCancel,
468
+ accessibility: {
469
+ announcements,
470
+ screenReaderInstructions: {
471
+ draggable: `
472
+ To pick up a kanban item or column, press space or enter.
473
+ While dragging, use the arrow keys to move the item.
474
+ Press space or enter again to drop the item in its new position, or press escape to cancel.
475
+ `
476
+ },
477
+ ...accessibility
478
+ }
479
+ }
480
+ ) });
481
+ }
482
+ const KanbanBoardContext = React__namespace.createContext(false);
483
+ KanbanBoardContext.displayName = BOARD_NAME;
484
+ const KanbanBoard = React__namespace.forwardRef(
485
+ (props, forwardedRef) => {
486
+ const { asChild, className, ...boardProps } = props;
487
+ const context = useKanbanContext(BOARD_NAME);
488
+ const columns = React__namespace.useMemo(() => {
489
+ return Object.keys(context.items);
490
+ }, [context.items]);
491
+ const BoardPrimitive = asChild ? reactSlot.Slot : "div";
492
+ return /* @__PURE__ */ jsxRuntime.jsx(KanbanBoardContext.Provider, { value: true, children: /* @__PURE__ */ jsxRuntime.jsx(
493
+ sortable_esm.SortableContext,
494
+ {
495
+ items: columns,
496
+ strategy: context.orientation === "horizontal" ? sortable_esm.horizontalListSortingStrategy : sortable_esm.verticalListSortingStrategy,
497
+ children: /* @__PURE__ */ jsxRuntime.jsx(
498
+ BoardPrimitive,
499
+ {
500
+ "aria-orientation": context.orientation,
501
+ "data-orientation": context.orientation,
502
+ "data-slot": "kanban-board",
503
+ ...boardProps,
504
+ ref: forwardedRef,
505
+ className: utils.cn(
506
+ "flex size-full gap-4",
507
+ context.orientation === "horizontal" ? "flex-row" : "flex-col",
508
+ className
509
+ )
510
+ }
511
+ )
512
+ }
513
+ ) });
514
+ }
515
+ );
516
+ KanbanBoard.displayName = BOARD_NAME;
517
+ const KanbanColumnContext = React__namespace.createContext(null);
518
+ KanbanColumnContext.displayName = COLUMN_NAME;
519
+ function useKanbanColumnContext(consumerName) {
520
+ const context = React__namespace.useContext(KanbanColumnContext);
521
+ if (!context) {
522
+ throw new Error(
523
+ `\`${consumerName}\` must be used within \`${COLUMN_NAME}\``
524
+ );
525
+ }
526
+ return context;
527
+ }
528
+ const animateLayoutChanges = (args) => sortable_esm.defaultAnimateLayoutChanges({ ...args, wasDragging: true });
529
+ const KanbanColumn = React__namespace.forwardRef(
530
+ (props, forwardedRef) => {
531
+ const {
532
+ value,
533
+ asChild,
534
+ asHandle,
535
+ disabled,
536
+ className,
537
+ style,
538
+ ...columnProps
539
+ } = props;
540
+ const id = React__namespace.useId();
541
+ const context = useKanbanContext(COLUMN_NAME);
542
+ const inBoard = React__namespace.useContext(KanbanBoardContext);
543
+ const inOverlay = React__namespace.useContext(KanbanOverlayContext);
544
+ if (!inBoard && !inOverlay) {
545
+ throw new Error(
546
+ `\`${COLUMN_NAME}\` must be used within \`${BOARD_NAME}\` or \`${OVERLAY_NAME}\``
547
+ );
548
+ }
549
+ if (value === "") {
550
+ throw new Error(`\`${COLUMN_NAME}\` value cannot be an empty string`);
551
+ }
552
+ const {
553
+ attributes,
554
+ listeners,
555
+ setNodeRef,
556
+ setActivatorNodeRef,
557
+ transform,
558
+ transition,
559
+ isDragging
560
+ } = sortable_esm.useSortable({
561
+ id: value,
562
+ disabled,
563
+ animateLayoutChanges
564
+ });
565
+ const composedRef = composeRefs.useComposedRefs(forwardedRef, (node) => {
566
+ if (disabled) return;
567
+ setNodeRef(node);
568
+ });
569
+ const composedStyle = React__namespace.useMemo(() => {
570
+ return {
571
+ transform: utilities_esm.CSS.Transform.toString(transform),
572
+ transition,
573
+ ...style
574
+ };
575
+ }, [transform, transition, style]);
576
+ const items = React__namespace.useMemo(() => {
577
+ const items2 = context.items[value] ?? [];
578
+ return items2.map((item) => context.getItemValue(item));
579
+ }, [context.items, value, context.getItemValue]);
580
+ const columnContext = React__namespace.useMemo(
581
+ () => ({
582
+ id,
583
+ attributes,
584
+ listeners,
585
+ setActivatorNodeRef,
586
+ isDragging,
587
+ disabled
588
+ }),
589
+ [id, attributes, listeners, setActivatorNodeRef, isDragging, disabled]
590
+ );
591
+ const ColumnPrimitive = asChild ? reactSlot.Slot : "div";
592
+ return /* @__PURE__ */ jsxRuntime.jsx(KanbanColumnContext.Provider, { value: columnContext, children: /* @__PURE__ */ jsxRuntime.jsx(
593
+ sortable_esm.SortableContext,
594
+ {
595
+ items,
596
+ strategy: context.orientation === "horizontal" ? sortable_esm.horizontalListSortingStrategy : sortable_esm.verticalListSortingStrategy,
597
+ children: /* @__PURE__ */ jsxRuntime.jsx(
598
+ ColumnPrimitive,
599
+ {
600
+ id,
601
+ "data-disabled": disabled,
602
+ "data-dragging": isDragging ? "" : void 0,
603
+ "data-slot": "kanban-column",
604
+ ...columnProps,
605
+ ...asHandle && !disabled ? attributes : {},
606
+ ...asHandle && !disabled ? listeners : {},
607
+ ref: composedRef,
608
+ style: composedStyle,
609
+ className: utils.cn(
610
+ "flex size-full min-w-0 flex-col gap-2 rounded-lg border bg-zinc-100 p-2.5 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:bg-zinc-900",
611
+ {
612
+ "touch-none select-none": asHandle,
613
+ "cursor-default": context.flatCursor,
614
+ "data-dragging:cursor-grabbing": !context.flatCursor,
615
+ "cursor-grab": !isDragging && asHandle && !context.flatCursor,
616
+ "opacity-50": isDragging,
617
+ "pointer-events-none opacity-50": disabled
618
+ },
619
+ className
620
+ )
621
+ }
622
+ )
623
+ }
624
+ ) });
625
+ }
626
+ );
627
+ KanbanColumn.displayName = COLUMN_NAME;
628
+ const KanbanColumnHandle = React__namespace.forwardRef((props, forwardedRef) => {
629
+ const { asChild, disabled, className, ...columnHandleProps } = props;
630
+ const context = useKanbanContext(COLUMN_NAME);
631
+ const columnContext = useKanbanColumnContext(COLUMN_HANDLE_NAME);
632
+ const isDisabled = disabled ?? columnContext.disabled;
633
+ const composedRef = composeRefs.useComposedRefs(forwardedRef, (node) => {
634
+ if (isDisabled) return;
635
+ columnContext.setActivatorNodeRef(node);
636
+ });
637
+ const HandlePrimitive = asChild ? reactSlot.Slot : "button";
638
+ return /* @__PURE__ */ jsxRuntime.jsx(
639
+ HandlePrimitive,
640
+ {
641
+ type: "button",
642
+ "aria-controls": columnContext.id,
643
+ "data-disabled": isDisabled,
644
+ "data-dragging": columnContext.isDragging ? "" : void 0,
645
+ "data-slot": "kanban-column-handle",
646
+ ...columnHandleProps,
647
+ ...isDisabled ? {} : columnContext.attributes,
648
+ ...isDisabled ? {} : columnContext.listeners,
649
+ ref: composedRef,
650
+ className: utils.cn(
651
+ "select-none disabled:pointer-events-none disabled:opacity-50",
652
+ context.flatCursor ? "cursor-default" : "cursor-grab data-dragging:cursor-grabbing",
653
+ className
654
+ ),
655
+ disabled: isDisabled
656
+ }
657
+ );
658
+ });
659
+ KanbanColumnHandle.displayName = COLUMN_HANDLE_NAME;
660
+ const KanbanItemContext = React__namespace.createContext(
661
+ null
662
+ );
663
+ KanbanItemContext.displayName = ITEM_NAME;
664
+ function useKanbanItemContext(consumerName) {
665
+ const context = React__namespace.useContext(KanbanItemContext);
666
+ if (!context) {
667
+ throw new Error(`\`${consumerName}\` must be used within \`${ITEM_NAME}\``);
668
+ }
669
+ return context;
670
+ }
671
+ const KanbanItem = React__namespace.forwardRef(
672
+ (props, forwardedRef) => {
673
+ const {
674
+ value,
675
+ style,
676
+ asHandle,
677
+ asChild,
678
+ disabled,
679
+ className,
680
+ ...itemProps
681
+ } = props;
682
+ const id = React__namespace.useId();
683
+ const context = useKanbanContext(ITEM_NAME);
684
+ const inBoard = React__namespace.useContext(KanbanBoardContext);
685
+ const inOverlay = React__namespace.useContext(KanbanOverlayContext);
686
+ if (!inBoard && !inOverlay) {
687
+ throw new Error(`\`${ITEM_NAME}\` must be used within \`${BOARD_NAME}\``);
688
+ }
689
+ const {
690
+ attributes,
691
+ listeners,
692
+ setNodeRef,
693
+ setActivatorNodeRef,
694
+ transform,
695
+ transition,
696
+ isDragging
697
+ } = sortable_esm.useSortable({ id: value, disabled });
698
+ if (value === "") {
699
+ throw new Error(`\`${ITEM_NAME}\` value cannot be an empty string`);
700
+ }
701
+ const composedRef = composeRefs.useComposedRefs(forwardedRef, (node) => {
702
+ if (disabled) return;
703
+ setNodeRef(node);
704
+ });
705
+ const composedStyle = React__namespace.useMemo(() => {
706
+ return {
707
+ transform: utilities_esm.CSS.Transform.toString(transform),
708
+ transition,
709
+ ...style
710
+ };
711
+ }, [transform, transition, style]);
712
+ const itemContext = React__namespace.useMemo(
713
+ () => ({
714
+ id,
715
+ attributes,
716
+ listeners,
717
+ setActivatorNodeRef,
718
+ isDragging,
719
+ disabled
720
+ }),
721
+ [id, attributes, listeners, setActivatorNodeRef, isDragging, disabled]
722
+ );
723
+ const ItemPrimitive = asChild ? reactSlot.Slot : "div";
724
+ return /* @__PURE__ */ jsxRuntime.jsx(KanbanItemContext.Provider, { value: itemContext, children: /* @__PURE__ */ jsxRuntime.jsx(
725
+ ItemPrimitive,
726
+ {
727
+ id,
728
+ "data-disabled": disabled,
729
+ "data-dragging": isDragging ? "" : void 0,
730
+ "data-slot": "kanban-item",
731
+ ...itemProps,
732
+ ...asHandle && !disabled ? attributes : {},
733
+ ...asHandle && !disabled ? listeners : {},
734
+ ref: composedRef,
735
+ style: composedStyle,
736
+ className: utils.cn(
737
+ "focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1",
738
+ {
739
+ "touch-none select-none": asHandle,
740
+ "cursor-default": context.flatCursor,
741
+ "data-dragging:cursor-grabbing": !context.flatCursor,
742
+ "cursor-grab": !isDragging && asHandle && !context.flatCursor,
743
+ "opacity-50": isDragging,
744
+ "pointer-events-none opacity-50": disabled
745
+ },
746
+ className
747
+ )
748
+ }
749
+ ) });
750
+ }
751
+ );
752
+ KanbanItem.displayName = ITEM_NAME;
753
+ const KanbanItemHandle = React__namespace.forwardRef((props, forwardedRef) => {
754
+ const { asChild, disabled, className, ...itemHandleProps } = props;
755
+ const context = useKanbanContext(ITEM_HANDLE_NAME);
756
+ const itemContext = useKanbanItemContext(ITEM_HANDLE_NAME);
757
+ const isDisabled = disabled ?? itemContext.disabled;
758
+ const composedRef = composeRefs.useComposedRefs(forwardedRef, (node) => {
759
+ if (isDisabled) return;
760
+ itemContext.setActivatorNodeRef(node);
761
+ });
762
+ const HandlePrimitive = asChild ? reactSlot.Slot : "button";
763
+ return /* @__PURE__ */ jsxRuntime.jsx(
764
+ HandlePrimitive,
765
+ {
766
+ type: "button",
767
+ "aria-controls": itemContext.id,
768
+ "data-disabled": isDisabled,
769
+ "data-dragging": itemContext.isDragging ? "" : void 0,
770
+ "data-slot": "kanban-item-handle",
771
+ ...itemHandleProps,
772
+ ...isDisabled ? {} : itemContext.attributes,
773
+ ...isDisabled ? {} : itemContext.listeners,
774
+ ref: composedRef,
775
+ className: utils.cn(
776
+ "select-none disabled:pointer-events-none disabled:opacity-50",
777
+ context.flatCursor ? "cursor-default" : "cursor-grab data-dragging:cursor-grabbing",
778
+ className
779
+ ),
780
+ disabled: isDisabled
781
+ }
782
+ );
783
+ });
784
+ KanbanItemHandle.displayName = ITEM_HANDLE_NAME;
785
+ const KanbanOverlayContext = React__namespace.createContext(false);
786
+ KanbanOverlayContext.displayName = OVERLAY_NAME;
787
+ const dropAnimation = {
788
+ sideEffects: core_esm.defaultDropAnimationSideEffects({
789
+ styles: {
790
+ active: {
791
+ opacity: "0.4"
792
+ }
793
+ }
794
+ })
795
+ };
796
+ function KanbanOverlay(props) {
797
+ const { container: containerProp, children, ...overlayProps } = props;
798
+ const context = useKanbanContext(OVERLAY_NAME);
799
+ const [mounted, setMounted] = React__namespace.useState(false);
800
+ React__namespace.useLayoutEffect(() => setMounted(true), []);
801
+ const container = containerProp ?? (mounted ? globalThis.document?.body : null);
802
+ if (!container) return null;
803
+ const variant = context.activeId && context.activeId in context.items ? "column" : "item";
804
+ return ReactDOM__namespace.createPortal(
805
+ /* @__PURE__ */ jsxRuntime.jsx(
806
+ core_esm.DragOverlay,
807
+ {
808
+ dropAnimation,
809
+ modifiers: context.modifiers,
810
+ className: utils.cn(!context.flatCursor && "cursor-grabbing"),
811
+ ...overlayProps,
812
+ children: /* @__PURE__ */ jsxRuntime.jsx(KanbanOverlayContext.Provider, { value: true, children: context.activeId && children ? typeof children === "function" ? children({
813
+ value: context.activeId,
814
+ variant
815
+ }) : children : null })
816
+ }
817
+ ),
818
+ container
819
+ );
820
+ }
821
+
822
+ exports.Board = KanbanBoard;
823
+ exports.Column = KanbanColumn;
824
+ exports.ColumnHandle = KanbanColumnHandle;
825
+ exports.Item = KanbanItem;
826
+ exports.ItemHandle = KanbanItemHandle;
827
+ exports.Kanban = KanbanRoot;
828
+ exports.KanbanBoard = KanbanBoard;
829
+ exports.KanbanColumn = KanbanColumn;
830
+ exports.KanbanColumnHandle = KanbanColumnHandle;
831
+ exports.KanbanItem = KanbanItem;
832
+ exports.KanbanItemHandle = KanbanItemHandle;
833
+ exports.KanbanOverlay = KanbanOverlay;
834
+ exports.Overlay = KanbanOverlay;
835
+ exports.Root = KanbanRoot;