@ztwoint/z-ui 0.1.60 → 0.1.62

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 (73) hide show
  1. package/dist/_virtual/bind-all.js +4 -0
  2. package/dist/_virtual/bind.js +4 -0
  3. package/dist/_virtual/index.js +5 -0
  4. package/dist/_virtual/index2.js +4 -0
  5. package/dist/components/assets/icons/drag-handle.js +18 -0
  6. package/dist/components/assets/icons/minus.js +28 -0
  7. package/dist/components/column-reorder/column-reorder.hook.js +47 -0
  8. package/dist/components/column-reorder/column-reorder.js +26 -0
  9. package/dist/components/column-reorder/components/column-item/column-item.hook.js +78 -0
  10. package/dist/components/column-reorder/components/column-item/column-item.js +79 -0
  11. package/dist/components/column-reorder/components/column-item/column-item.util.js +12 -0
  12. package/dist/components/select/z2-select.js +1 -1
  13. package/dist/components/table/components/cell/avatar-cell.js +9 -6
  14. package/dist/components/table/table-provider.js +3 -0
  15. package/dist/components/table-card/table-card.js +32 -29
  16. package/dist/index.d.ts +1 -0
  17. package/dist/index.js +37 -35
  18. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/adapter/element-adapter-native-data-key.js +4 -0
  19. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/adapter/element-adapter.js +127 -0
  20. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/honey-pot-fix/get-element-from-point-without-honey-pot.js +9 -0
  21. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/honey-pot-fix/honey-pot-data-attribute.js +4 -0
  22. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/honey-pot-fix/is-honey-pot-element.js +7 -0
  23. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/honey-pot-fix/make-honey-pot-fix.js +226 -0
  24. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/ledger/dispatch-consumer-event.js +107 -0
  25. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/ledger/lifecycle-manager.js +195 -0
  26. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/ledger/usage-ledger.js +21 -0
  27. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/make-adapter/make-adapter.js +43 -0
  28. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/make-adapter/make-drop-target.js +253 -0
  29. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/make-adapter/make-monitor.js +121 -0
  30. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/public-utils/combine.js +12 -0
  31. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/public-utils/element/custom-native-drag-preview/center-under-pointer.js +10 -0
  32. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/public-utils/element/custom-native-drag-preview/pointer-outside-of-preview.js +31 -0
  33. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/public-utils/element/custom-native-drag-preview/set-custom-native-drag-preview.js +66 -0
  34. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/public-utils/once.js +17 -0
  35. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/public-utils/reorder.js +11 -0
  36. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/add-attribute.js +9 -0
  37. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/android.js +8 -0
  38. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/changing-window/count-events-for-safari.js +57 -0
  39. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/changing-window/is-from-another-window.js +9 -0
  40. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/changing-window/is-leaving-window.js +13 -0
  41. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/detect-broken-drag.js +47 -0
  42. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/get-input.js +17 -0
  43. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/is-firefox.js +7 -0
  44. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/is-safari-on-ios.js +8 -0
  45. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/is-safari.js +10 -0
  46. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/max-z-index.js +4 -0
  47. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/media-types/text-media-type.js +4 -0
  48. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/media-types/url-media-type.js +4 -0
  49. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop-flourish/dist/esm/trigger-post-move-flash.js +20 -0
  50. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop-flourish/node_modules/@atlaskit/motion/dist/esm/utils/durations.js +6 -0
  51. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop-hitbox/dist/esm/closest-edge.js +58 -0
  52. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop-hitbox/dist/esm/get-reorder-destination-index.js +12 -0
  53. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop-hitbox/dist/esm/reorder-with-edge.js +18 -0
  54. package/dist/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js +8 -0
  55. package/dist/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js +6 -0
  56. package/dist/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js +7 -0
  57. package/dist/node_modules/@babel/runtime/helpers/esm/defineProperty.js +12 -0
  58. package/dist/node_modules/@babel/runtime/helpers/esm/iterableToArray.js +6 -0
  59. package/dist/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js +24 -0
  60. package/dist/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js +7 -0
  61. package/dist/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js +7 -0
  62. package/dist/node_modules/@babel/runtime/helpers/esm/slicedToArray.js +10 -0
  63. package/dist/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js +10 -0
  64. package/dist/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +14 -0
  65. package/dist/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js +9 -0
  66. package/dist/node_modules/@babel/runtime/helpers/esm/typeof.js +11 -0
  67. package/dist/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +11 -0
  68. package/dist/node_modules/bind-event-listener/dist/bind-all.js +45 -0
  69. package/dist/node_modules/bind-event-listener/dist/bind.js +16 -0
  70. package/dist/node_modules/bind-event-listener/dist/index.js +20 -0
  71. package/dist/node_modules/raf-schd/dist/raf-schd.esm.js +15 -0
  72. package/dist/types/index.d.ts +1 -0
  73. package/package.json +1 -1
@@ -0,0 +1,195 @@
1
+ import E from "../../../../../@babel/runtime/helpers/esm/toConsumableArray.js";
2
+ import { d as x } from "../../../../../../_virtual/index.js";
3
+ import { getElementFromPointWithoutHoneypot as S } from "../honey-pot-fix/get-element-from-point-without-honey-pot.js";
4
+ import { isHoneyPotElement as A } from "../honey-pot-fix/is-honey-pot-element.js";
5
+ import { isLeavingWindow as O } from "../util/changing-window/is-leaving-window.js";
6
+ import { getBindingsForBrokenDrags as b } from "../util/detect-broken-drag.js";
7
+ import { getInput as d } from "../util/get-input.js";
8
+ import { makeDispatch as P } from "./dispatch-consumer-event.js";
9
+ var v = {
10
+ isActive: !1
11
+ };
12
+ function y() {
13
+ return !v.isActive;
14
+ }
15
+ function F(r) {
16
+ return r.dataTransfer ? r.dataTransfer.setDragImage.bind(r.dataTransfer) : null;
17
+ }
18
+ function I(r) {
19
+ var a = r.current, n = r.next;
20
+ if (a.length !== n.length)
21
+ return !0;
22
+ for (var i = 0; i < a.length; i++)
23
+ if (a[i].element !== n[i].element)
24
+ return !0;
25
+ return !1;
26
+ }
27
+ function w(r) {
28
+ var a = r.event, n = r.dragType, i = r.getDropTargetsOver, u = r.dispatchEvent;
29
+ if (!y())
30
+ return;
31
+ var p = C({
32
+ event: a,
33
+ dragType: n,
34
+ getDropTargetsOver: i
35
+ });
36
+ v.isActive = !0;
37
+ var e = {
38
+ current: p
39
+ };
40
+ f({
41
+ event: a,
42
+ current: p.dropTargets
43
+ });
44
+ var c = P({
45
+ source: n.payload,
46
+ dispatchEvent: u,
47
+ initial: p
48
+ });
49
+ function g(o) {
50
+ var t = I({
51
+ current: e.current.dropTargets,
52
+ next: o.dropTargets
53
+ });
54
+ e.current = o, t && c.dragUpdate({
55
+ current: e.current
56
+ });
57
+ }
58
+ function T(o) {
59
+ var t = d(o), D = A(o.target) ? S({
60
+ x: t.clientX,
61
+ y: t.clientY
62
+ }) : o.target, l = i({
63
+ target: D,
64
+ input: t,
65
+ source: n.payload,
66
+ current: e.current.dropTargets
67
+ });
68
+ l.length && (o.preventDefault(), f({
69
+ event: o,
70
+ current: l
71
+ })), g({
72
+ dropTargets: l,
73
+ input: t
74
+ });
75
+ }
76
+ function s() {
77
+ e.current.dropTargets.length && g({
78
+ dropTargets: [],
79
+ input: e.current.input
80
+ }), c.drop({
81
+ current: e.current,
82
+ updatedSourcePayload: null
83
+ }), m();
84
+ }
85
+ function m() {
86
+ v.isActive = !1, h();
87
+ }
88
+ var h = x.bindAll(
89
+ window,
90
+ [{
91
+ // 👋 Note: we are repurposing the `dragover` event as our `drag` event
92
+ // this is because firefox does not publish pointer coordinates during
93
+ // a `drag` event, but does for every other type of drag event
94
+ // `dragover` fires on all elements that are being dragged over
95
+ // Because we are binding to `window` - our `dragover` is effectively the same as a `drag`
96
+ // 🦊😤
97
+ type: "dragover",
98
+ listener: function(t) {
99
+ T(t), c.drag({
100
+ current: e.current
101
+ });
102
+ }
103
+ }, {
104
+ type: "dragenter",
105
+ listener: T
106
+ }, {
107
+ type: "dragleave",
108
+ listener: function(t) {
109
+ O({
110
+ dragLeave: t
111
+ }) && (g({
112
+ input: e.current.input,
113
+ dropTargets: []
114
+ }), n.startedFrom === "external" && s());
115
+ }
116
+ }, {
117
+ // A "drop" can only happen if the browser allowed the drop
118
+ type: "drop",
119
+ listener: function(t) {
120
+ if (e.current = {
121
+ dropTargets: e.current.dropTargets,
122
+ input: d(t)
123
+ }, !e.current.dropTargets.length) {
124
+ s();
125
+ return;
126
+ }
127
+ t.preventDefault(), f({
128
+ event: t,
129
+ current: e.current.dropTargets
130
+ }), c.drop({
131
+ current: e.current,
132
+ // When dropping something native, we need to extract the latest
133
+ // `.items` from the "drop" event as it is now accessible
134
+ updatedSourcePayload: n.type === "external" ? n.getDropPayload(t) : null
135
+ }), m();
136
+ }
137
+ }, {
138
+ // "dragend" fires when on the drag source (eg a draggable element)
139
+ // when the drag is finished.
140
+ // "dragend" will fire after "drop" (if there was a successful drop)
141
+ // "dragend" does not fire if the draggable source has been removed during the drag
142
+ // or for external drag sources (eg files)
143
+ // This "dragend" listener will not fire if there was a successful drop
144
+ // as we will have already removed the event listener
145
+ type: "dragend",
146
+ listener: function(t) {
147
+ e.current = {
148
+ dropTargets: e.current.dropTargets,
149
+ input: d(t)
150
+ }, s();
151
+ }
152
+ }].concat(E(b({
153
+ onDragEnd: s
154
+ }))),
155
+ // Once we have started a managed drag operation it is important that we see / own all drag events
156
+ // We got one adoption bug pop up where some code was stopping (`event.stopPropagation()`)
157
+ // all "drop" events in the bubble phase on the `document.body`.
158
+ // This meant that we never saw the "drop" event.
159
+ {
160
+ capture: !0
161
+ }
162
+ );
163
+ c.start({
164
+ nativeSetDragImage: F(a)
165
+ });
166
+ }
167
+ function f(r) {
168
+ var a, n = r.event, i = r.current, u = (a = i[0]) === null || a === void 0 ? void 0 : a.dropEffect;
169
+ u != null && n.dataTransfer && (n.dataTransfer.dropEffect = u);
170
+ }
171
+ function C(r) {
172
+ var a = r.event, n = r.dragType, i = r.getDropTargetsOver, u = d(a);
173
+ if (n.startedFrom === "external")
174
+ return {
175
+ input: u,
176
+ dropTargets: []
177
+ };
178
+ var p = i({
179
+ input: u,
180
+ source: n.payload,
181
+ target: a.target,
182
+ current: []
183
+ });
184
+ return {
185
+ input: u,
186
+ dropTargets: p
187
+ };
188
+ }
189
+ var X = {
190
+ canStart: y,
191
+ start: w
192
+ };
193
+ export {
194
+ X as lifecycle
195
+ };
@@ -0,0 +1,21 @@
1
+ var u = /* @__PURE__ */ new Map();
2
+ function a(t) {
3
+ var e = t.typeKey, r = t.mount, n = u.get(e);
4
+ if (n)
5
+ return n.usageCount++, n;
6
+ var o = {
7
+ typeKey: e,
8
+ unmount: r(),
9
+ usageCount: 1
10
+ };
11
+ return u.set(e, o), o;
12
+ }
13
+ function i(t) {
14
+ var e = a(t);
15
+ return function() {
16
+ e.usageCount--, !(e.usageCount > 0) && (e.unmount(), u.delete(t.typeKey));
17
+ };
18
+ }
19
+ export {
20
+ i as register
21
+ };
@@ -0,0 +1,43 @@
1
+ import { lifecycle as c } from "../ledger/lifecycle-manager.js";
2
+ import { register as g } from "../ledger/usage-ledger.js";
3
+ import { makeDropTarget as y } from "./make-drop-target.js";
4
+ import { makeMonitor as T } from "./make-monitor.js";
5
+ function A(e) {
6
+ var p = e.typeKey, s = e.mount, r = e.dispatchEventToSource, o = e.onPostDispatch, u = e.defaultDropEffect, i = T(), n = y({
7
+ typeKey: p,
8
+ defaultDropEffect: u
9
+ });
10
+ function m(t) {
11
+ r == null || r(t), n.dispatchEvent(t), i.dispatchEvent(t), o == null || o(t);
12
+ }
13
+ function d(t) {
14
+ var a = t.event, f = t.dragType;
15
+ c.start({
16
+ event: a,
17
+ dragType: f,
18
+ getDropTargetsOver: n.getIsOver,
19
+ dispatchEvent: m
20
+ });
21
+ }
22
+ function v() {
23
+ function t() {
24
+ var a = {
25
+ canStart: c.canStart,
26
+ start: d
27
+ };
28
+ return s(a);
29
+ }
30
+ return g({
31
+ typeKey: p,
32
+ mount: t
33
+ });
34
+ }
35
+ return {
36
+ registerUsage: v,
37
+ dropTarget: n.dropTargetForConsumers,
38
+ monitor: i.monitorForConsumers
39
+ };
40
+ }
41
+ export {
42
+ A as makeAdapter
43
+ };
@@ -0,0 +1,253 @@
1
+ import U from "../../../../../@babel/runtime/helpers/esm/defineProperty.js";
2
+ import V from "../../../../../@babel/runtime/helpers/esm/toConsumableArray.js";
3
+ import { combine as Y } from "../public-utils/combine.js";
4
+ import { once as q } from "../public-utils/once.js";
5
+ import { addAttribute as z } from "../util/add-attribute.js";
6
+ function M(e, o) {
7
+ var t = Object.keys(e);
8
+ if (Object.getOwnPropertySymbols) {
9
+ var a = Object.getOwnPropertySymbols(e);
10
+ o && (a = a.filter(function(T) {
11
+ return Object.getOwnPropertyDescriptor(e, T).enumerable;
12
+ })), t.push.apply(t, a);
13
+ }
14
+ return t;
15
+ }
16
+ function E(e) {
17
+ for (var o = 1; o < arguments.length; o++) {
18
+ var t = arguments[o] != null ? arguments[o] : {};
19
+ o % 2 ? M(Object(t), !0).forEach(function(a) {
20
+ U(e, a, t[a]);
21
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : M(Object(t)).forEach(function(a) {
22
+ Object.defineProperty(e, a, Object.getOwnPropertyDescriptor(t, a));
23
+ });
24
+ }
25
+ return e;
26
+ }
27
+ function I(e, o) {
28
+ var t = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
29
+ if (!t) {
30
+ if (Array.isArray(e) || (t = B(e)) || o) {
31
+ t && (e = t);
32
+ var a = 0, T = function() {
33
+ };
34
+ return { s: T, n: function() {
35
+ return a >= e.length ? { done: !0 } : { done: !1, value: e[a++] };
36
+ }, e: function(b) {
37
+ throw b;
38
+ }, f: T };
39
+ }
40
+ throw new TypeError(`Invalid attempt to iterate non-iterable instance.
41
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
42
+ }
43
+ var S, k = !0, C = !1;
44
+ return { s: function() {
45
+ t = t.call(e);
46
+ }, n: function() {
47
+ var b = t.next();
48
+ return k = b.done, b;
49
+ }, e: function(b) {
50
+ C = !0, S = b;
51
+ }, f: function() {
52
+ try {
53
+ k || t.return == null || t.return();
54
+ } finally {
55
+ if (C) throw S;
56
+ }
57
+ } };
58
+ }
59
+ function B(e, o) {
60
+ if (e) {
61
+ if (typeof e == "string") return H(e, o);
62
+ var t = {}.toString.call(e).slice(8, -1);
63
+ return t === "Object" && e.constructor && (t = e.constructor.name), t === "Map" || t === "Set" ? Array.from(e) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? H(e, o) : void 0;
64
+ }
65
+ }
66
+ function H(e, o) {
67
+ (o == null || o > e.length) && (o = e.length);
68
+ for (var t = 0, a = Array(o); t < o; t++) a[t] = e[t];
69
+ return a;
70
+ }
71
+ function N(e) {
72
+ return e.slice(0).reverse();
73
+ }
74
+ function F(e) {
75
+ var o = e.typeKey, t = e.defaultDropEffect, a = /* @__PURE__ */ new WeakMap(), T = "data-drop-target-for-".concat(o), S = "[".concat(T, "]");
76
+ function k(r) {
77
+ return a.set(r.element, r), function() {
78
+ return a.delete(r.element);
79
+ };
80
+ }
81
+ function C(r) {
82
+ if (process.env.NODE_ENV !== "production") {
83
+ var p = a.get(r.element);
84
+ p && console.warn("You have already registered a [".concat(o, "] dropTarget on the same element"), {
85
+ existing: p,
86
+ proposed: r
87
+ }), r.element instanceof HTMLIFrameElement && console.warn(`
88
+ We recommend not registering <iframe> elements as drop targets
89
+ as it can result in some strange browser event ordering.
90
+ `.replace(/\s{2,}/g, " ").trim());
91
+ }
92
+ var i = Y(z(r.element, {
93
+ attribute: T,
94
+ value: "true"
95
+ }), k(r));
96
+ return q(i);
97
+ }
98
+ function g(r) {
99
+ var p, i, s, d, l = r.source, c = r.target, v = r.input, f = r.result, n = f === void 0 ? [] : f;
100
+ if (c == null)
101
+ return n;
102
+ if (!(c instanceof Element))
103
+ return c instanceof Node ? g({
104
+ source: l,
105
+ target: c.parentElement,
106
+ input: v,
107
+ result: n
108
+ }) : n;
109
+ var y = c.closest(S);
110
+ if (y == null)
111
+ return n;
112
+ var u = a.get(y);
113
+ if (u == null)
114
+ return n;
115
+ var h = {
116
+ input: v,
117
+ source: l,
118
+ element: u.element
119
+ };
120
+ if (u.canDrop && !u.canDrop(h))
121
+ return g({
122
+ source: l,
123
+ target: u.element.parentElement,
124
+ input: v,
125
+ result: n
126
+ });
127
+ var O = (p = (i = u.getData) === null || i === void 0 ? void 0 : i.call(u, h)) !== null && p !== void 0 ? p : {}, D = (s = (d = u.getDropEffect) === null || d === void 0 ? void 0 : d.call(u, h)) !== null && s !== void 0 ? s : t, m = {
128
+ data: O,
129
+ element: u.element,
130
+ dropEffect: D,
131
+ // we are collecting _actual_ drop targets, so these are
132
+ // being applied _not_ due to stickiness
133
+ isActiveDueToStickiness: !1
134
+ };
135
+ return g({
136
+ source: l,
137
+ target: u.element.parentElement,
138
+ input: v,
139
+ // Using bubble ordering. Same ordering as `event.getPath()`
140
+ result: [].concat(V(n), [m])
141
+ });
142
+ }
143
+ function b(r) {
144
+ var p = r.eventName, i = r.payload, s = I(i.location.current.dropTargets), d;
145
+ try {
146
+ for (s.s(); !(d = s.n()).done; ) {
147
+ var l, c = d.value, v = a.get(c.element), f = E(E({}, i), {}, {
148
+ self: c
149
+ });
150
+ v == null || (l = v[p]) === null || l === void 0 || l.call(
151
+ v,
152
+ // I cannot seem to get the types right here.
153
+ // TS doesn't seem to like that one event can need `nativeSetDragImage`
154
+ // @ts-expect-error
155
+ f
156
+ );
157
+ }
158
+ } catch (n) {
159
+ s.e(n);
160
+ } finally {
161
+ s.f();
162
+ }
163
+ }
164
+ var R = {
165
+ onGenerateDragPreview: b,
166
+ onDrag: b,
167
+ onDragStart: b,
168
+ onDrop: b,
169
+ onDropTargetChange: function(p) {
170
+ var i = p.payload, s = new Set(i.location.current.dropTargets.map(function(A) {
171
+ return A.element;
172
+ })), d = /* @__PURE__ */ new Set(), l = I(i.location.previous.dropTargets), c;
173
+ try {
174
+ for (l.s(); !(c = l.n()).done; ) {
175
+ var v, f = c.value;
176
+ d.add(f.element);
177
+ var n = a.get(f.element), y = s.has(f.element), u = E(E({}, i), {}, {
178
+ self: f
179
+ });
180
+ if (n == null || (v = n.onDropTargetChange) === null || v === void 0 || v.call(n, u), !y) {
181
+ var h;
182
+ n == null || (h = n.onDragLeave) === null || h === void 0 || h.call(n, u);
183
+ }
184
+ }
185
+ } catch (A) {
186
+ l.e(A);
187
+ } finally {
188
+ l.f();
189
+ }
190
+ var O = I(i.location.current.dropTargets), D;
191
+ try {
192
+ for (O.s(); !(D = O.n()).done; ) {
193
+ var m, j, P = D.value;
194
+ if (!d.has(P.element)) {
195
+ var K = E(E({}, i), {}, {
196
+ self: P
197
+ }), w = a.get(P.element);
198
+ w == null || (m = w.onDropTargetChange) === null || m === void 0 || m.call(w, K), w == null || (j = w.onDragEnter) === null || j === void 0 || j.call(w, K);
199
+ }
200
+ }
201
+ } catch (A) {
202
+ O.e(A);
203
+ } finally {
204
+ O.f();
205
+ }
206
+ }
207
+ };
208
+ function W(r) {
209
+ R[r.eventName](r);
210
+ }
211
+ function G(r) {
212
+ var p = r.source, i = r.target, s = r.input, d = r.current, l = g({
213
+ source: p,
214
+ target: i,
215
+ input: s
216
+ });
217
+ if (l.length >= d.length)
218
+ return l;
219
+ for (var c = N(d), v = N(l), f = [], n = 0; n < c.length; n++) {
220
+ var y, u = c[n], h = v[n];
221
+ if (h != null) {
222
+ f.push(h);
223
+ continue;
224
+ }
225
+ var O = f[n - 1], D = c[n - 1];
226
+ if ((O == null ? void 0 : O.element) !== (D == null ? void 0 : D.element))
227
+ break;
228
+ var m = a.get(u.element);
229
+ if (!m)
230
+ break;
231
+ var j = {
232
+ input: s,
233
+ source: p,
234
+ element: m.element
235
+ };
236
+ if (m.canDrop && !m.canDrop(j) || !((y = m.getIsSticky) !== null && y !== void 0 && y.call(m, j)))
237
+ break;
238
+ f.push(E(E({}, u), {}, {
239
+ // making it clear to consumers this drop target is active due to stickiness
240
+ isActiveDueToStickiness: !0
241
+ }));
242
+ }
243
+ return N(f);
244
+ }
245
+ return {
246
+ dropTargetForConsumers: C,
247
+ getIsOver: G,
248
+ dispatchEvent: W
249
+ };
250
+ }
251
+ export {
252
+ F as makeDropTarget
253
+ };
@@ -0,0 +1,121 @@
1
+ import O from "../../../../../@babel/runtime/helpers/esm/defineProperty.js";
2
+ import { once as h } from "../public-utils/once.js";
3
+ function j(e, t) {
4
+ var r = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
5
+ if (!r) {
6
+ if (Array.isArray(e) || (r = w(e)) || t) {
7
+ r && (e = r);
8
+ var n = 0, f = function() {
9
+ };
10
+ return { s: f, n: function() {
11
+ return n >= e.length ? { done: !0 } : { done: !1, value: e[n++] };
12
+ }, e: function(c) {
13
+ throw c;
14
+ }, f };
15
+ }
16
+ throw new TypeError(`Invalid attempt to iterate non-iterable instance.
17
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
18
+ }
19
+ var o, a = !0, u = !1;
20
+ return { s: function() {
21
+ r = r.call(e);
22
+ }, n: function() {
23
+ var c = r.next();
24
+ return a = c.done, c;
25
+ }, e: function(c) {
26
+ u = !0, o = c;
27
+ }, f: function() {
28
+ try {
29
+ a || r.return == null || r.return();
30
+ } finally {
31
+ if (u) throw o;
32
+ }
33
+ } };
34
+ }
35
+ function w(e, t) {
36
+ if (e) {
37
+ if (typeof e == "string") return p(e, t);
38
+ var r = {}.toString.call(e).slice(8, -1);
39
+ return r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set" ? Array.from(e) : r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? p(e, t) : void 0;
40
+ }
41
+ }
42
+ function p(e, t) {
43
+ (t == null || t > e.length) && (t = e.length);
44
+ for (var r = 0, n = Array(t); r < t; r++) n[r] = e[r];
45
+ return n;
46
+ }
47
+ function d(e, t) {
48
+ var r = Object.keys(e);
49
+ if (Object.getOwnPropertySymbols) {
50
+ var n = Object.getOwnPropertySymbols(e);
51
+ t && (n = n.filter(function(f) {
52
+ return Object.getOwnPropertyDescriptor(e, f).enumerable;
53
+ })), r.push.apply(r, n);
54
+ }
55
+ return r;
56
+ }
57
+ function A(e) {
58
+ for (var t = 1; t < arguments.length; t++) {
59
+ var r = arguments[t] != null ? arguments[t] : {};
60
+ t % 2 ? d(Object(r), !0).forEach(function(n) {
61
+ O(e, n, r[n]);
62
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : d(Object(r)).forEach(function(n) {
63
+ Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
64
+ });
65
+ }
66
+ return e;
67
+ }
68
+ function D() {
69
+ var e = /* @__PURE__ */ new Set(), t = null;
70
+ function r(o) {
71
+ t && (!o.canMonitor || o.canMonitor(t.canMonitorArgs)) && t.active.add(o);
72
+ }
73
+ function n(o) {
74
+ var a = A({}, o);
75
+ e.add(a), r(a);
76
+ function u() {
77
+ e.delete(a), t && t.active.delete(a);
78
+ }
79
+ return h(u);
80
+ }
81
+ function f(o) {
82
+ var a = o.eventName, u = o.payload;
83
+ if (a === "onGenerateDragPreview") {
84
+ t = {
85
+ canMonitorArgs: {
86
+ initial: u.location.initial,
87
+ source: u.source
88
+ },
89
+ active: /* @__PURE__ */ new Set()
90
+ };
91
+ var i = j(e), c;
92
+ try {
93
+ for (i.s(); !(c = i.n()).done; ) {
94
+ var b = c.value;
95
+ r(b);
96
+ }
97
+ } catch (m) {
98
+ i.e(m);
99
+ } finally {
100
+ i.f();
101
+ }
102
+ }
103
+ if (t) {
104
+ for (var g = Array.from(t.active), l = 0, v = g; l < v.length; l++) {
105
+ var s = v[l];
106
+ if (t.active.has(s)) {
107
+ var y;
108
+ (y = s[a]) === null || y === void 0 || y.call(s, u);
109
+ }
110
+ }
111
+ a === "onDrop" && (t.active.clear(), t = null);
112
+ }
113
+ }
114
+ return {
115
+ dispatchEvent: f,
116
+ monitorForConsumers: n
117
+ };
118
+ }
119
+ export {
120
+ D as makeMonitor
121
+ };
@@ -0,0 +1,12 @@
1
+ function a() {
2
+ for (var r = arguments.length, t = new Array(r), n = 0; n < r; n++)
3
+ t[n] = arguments[n];
4
+ return function() {
5
+ t.forEach(function(u) {
6
+ return u();
7
+ });
8
+ };
9
+ }
10
+ export {
11
+ a as combine
12
+ };
@@ -0,0 +1,10 @@
1
+ var i = function(n) {
2
+ var r = n.container, e = r.getBoundingClientRect();
3
+ return {
4
+ x: e.width / 2,
5
+ y: e.height / 2
6
+ };
7
+ };
8
+ export {
9
+ i as centerUnderPointer
10
+ };
@@ -0,0 +1,31 @@
1
+ import { isAndroid as o } from "../../../util/android.js";
2
+ import { isSafariOnIOS as a } from "../../../util/is-safari-on-ios.js";
3
+ import { centerUnderPointer as c } from "./center-under-pointer.js";
4
+ function p(t) {
5
+ return function(e) {
6
+ var r = e.container;
7
+ if (a() || o())
8
+ return c({
9
+ container: r
10
+ });
11
+ Object.assign(r.style, {
12
+ borderInlineStart: "".concat(t.x, " solid transparent"),
13
+ borderTop: "".concat(t.y, " solid transparent")
14
+ });
15
+ var n = window.getComputedStyle(r);
16
+ if (n.direction === "rtl") {
17
+ var i = r.getBoundingClientRect();
18
+ return {
19
+ x: i.width,
20
+ y: 0
21
+ };
22
+ }
23
+ return {
24
+ x: 0,
25
+ y: 0
26
+ };
27
+ };
28
+ }
29
+ export {
30
+ p as pointerOutsideOfPreview
31
+ };