react-timelane 1.2.4 → 1.2.5

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,4 @@
1
- import { __require as r } from "../node_modules/react-dom/index.js";
2
- var o = r();
1
+ var r = {};
3
2
  export {
4
- o as r
3
+ r as __exports
5
4
  };
@@ -1,4 +1,5 @@
1
- var r = {};
1
+ import { __require as r } from "../node_modules/react-dom/index.js";
2
+ var o = r();
2
3
  export {
3
- r as __exports
4
+ o as r
4
5
  };
@@ -11,10 +11,10 @@ import { getInput as S } from "../util/get-input.js";
11
11
  import { textMediaType as h } from "../util/media-types/text-media-type.js";
12
12
  import { URLMediaType as V } from "../util/media-types/url-media-type.js";
13
13
  import { elementAdapterNativeDataKey as K } from "./element-adapter-native-data-key.js";
14
- var i = /* @__PURE__ */ new WeakMap();
14
+ var l = /* @__PURE__ */ new WeakMap();
15
15
  function L(t) {
16
- return i.set(t.element, t), function() {
17
- i.delete(t.element);
16
+ return l.set(t.element, t), function() {
17
+ l.delete(t.element);
18
18
  };
19
19
  }
20
20
  var b = w(), v = A({
@@ -24,7 +24,7 @@ var b = w(), v = A({
24
24
  return H(b.bindEvents(), k.bind(document, {
25
25
  type: "dragstart",
26
26
  listener: function(e) {
27
- var l, o, d, u, m, s;
27
+ var i, o, d, m, s, u;
28
28
  if (r.canStart(e) && !e.defaultPrevented) {
29
29
  if (!e.dataTransfer) {
30
30
  process.env.NODE_ENV !== "production" && console.warn(`
@@ -39,53 +39,57 @@ var b = w(), v = A({
39
39
  return;
40
40
  }
41
41
  var y = e.target;
42
- if (!(y instanceof HTMLElement))
43
- return null;
44
- var a = i.get(y);
45
- if (!a)
46
- return null;
47
- var g = S(e), p = {
48
- element: a.element,
49
- dragHandle: (l = a.dragHandle) !== null && l !== void 0 ? l : null,
50
- input: g
51
- };
52
- if (a.canDrag && !a.canDrag(p))
53
- return e.preventDefault(), null;
54
- if (a.dragHandle) {
55
- var I = _({
56
- x: g.clientX,
57
- y: g.clientY
58
- });
59
- if (!a.dragHandle.contains(I))
60
- return e.preventDefault(), null;
61
- }
62
- var D = (o = (d = a.getInitialDataForExternal) === null || d === void 0 ? void 0 : d.call(a, p)) !== null && o !== void 0 ? o : null;
63
- if (D)
64
- for (var c = 0, E = Object.entries(D); c < E.length; c++) {
65
- var T = P(E[c], 2), N = T[0], f = T[1];
66
- e.dataTransfer.setData(N, f ?? "");
42
+ if (y instanceof HTMLElement) {
43
+ var a = l.get(y);
44
+ if (a) {
45
+ var g = S(e), p = {
46
+ element: a.element,
47
+ dragHandle: (i = a.dragHandle) !== null && i !== void 0 ? i : null,
48
+ input: g
49
+ };
50
+ if (a.canDrag && !a.canDrag(p)) {
51
+ e.preventDefault();
52
+ return;
53
+ }
54
+ if (a.dragHandle) {
55
+ var I = _({
56
+ x: g.clientX,
57
+ y: g.clientY
58
+ });
59
+ if (!a.dragHandle.contains(I)) {
60
+ e.preventDefault();
61
+ return;
62
+ }
63
+ }
64
+ var D = (o = (d = a.getInitialDataForExternal) === null || d === void 0 ? void 0 : d.call(a, p)) !== null && o !== void 0 ? o : null;
65
+ if (D)
66
+ for (var c = 0, E = Object.entries(D); c < E.length; c++) {
67
+ var T = P(E[c], 2), N = T[0], f = T[1];
68
+ e.dataTransfer.setData(N, f ?? "");
69
+ }
70
+ M() && !e.dataTransfer.types.includes(h) && !e.dataTransfer.types.includes(V) && e.dataTransfer.setData(h, O), e.dataTransfer.setData(K, "");
71
+ var x = {
72
+ element: a.element,
73
+ dragHandle: (m = a.dragHandle) !== null && m !== void 0 ? m : null,
74
+ data: (s = (u = a.getInitialData) === null || u === void 0 ? void 0 : u.call(a, p)) !== null && s !== void 0 ? s : {}
75
+ }, F = {
76
+ type: "element",
77
+ payload: x,
78
+ startedFrom: "internal"
79
+ };
80
+ r.start({
81
+ event: e,
82
+ dragType: F
83
+ });
67
84
  }
68
- M() && !e.dataTransfer.types.includes(h) && !e.dataTransfer.types.includes(V) && e.dataTransfer.setData(h, O), e.dataTransfer.setData(K, "");
69
- var x = {
70
- element: a.element,
71
- dragHandle: (u = a.dragHandle) !== null && u !== void 0 ? u : null,
72
- data: (m = (s = a.getInitialData) === null || s === void 0 ? void 0 : s.call(a, p)) !== null && m !== void 0 ? m : {}
73
- }, F = {
74
- type: "element",
75
- payload: x,
76
- startedFrom: "internal"
77
- };
78
- r.start({
79
- event: e,
80
- dragType: F
81
- });
85
+ }
82
86
  }
83
87
  }
84
88
  }));
85
89
  },
86
90
  dispatchEventToSource: function(r) {
87
- var n, e, l = r.eventName, o = r.payload;
88
- (n = i.get(o.source.element)) === null || n === void 0 || (e = n[l]) === null || e === void 0 || e.call(
91
+ var n, e, i = r.eventName, o = r.payload;
92
+ (n = l.get(o.source.element)) === null || n === void 0 || (e = n[i]) === null || e === void 0 || e.call(
89
93
  n,
90
94
  // I cannot seem to get the types right here.
91
95
  // TS doesn't seem to like that one event can need `nativeSetDragImage`
@@ -100,7 +104,7 @@ function ae(t) {
100
104
  element: t.element,
101
105
  dragHandle: t.dragHandle
102
106
  }), process.env.NODE_ENV !== "production") {
103
- var r = i.get(t.element);
107
+ var r = l.get(t.element);
104
108
  r && console.warn("You have already registered a `draggable` on the same element", {
105
109
  existing: r,
106
110
  proposed: t
@@ -1,7 +1,7 @@
1
1
  import p from "../../../../../raf-schd/dist/raf-schd.esm.js";
2
2
  var s = p(function(a) {
3
3
  return a();
4
- }), d = /* @__PURE__ */ function() {
4
+ }), d = /* @__PURE__ */ (function() {
5
5
  var a = null;
6
6
  function n(l) {
7
7
  var o = requestAnimationFrame(function() {
@@ -19,7 +19,7 @@ var s = p(function(a) {
19
19
  schedule: n,
20
20
  flush: t
21
21
  };
22
- }();
22
+ })();
23
23
  function g(a) {
24
24
  var n = a.source, t = a.initial, l = a.dispatchEvent, o = {
25
25
  dropTargets: []
@@ -21,7 +21,7 @@ function o(e) {
21
21
  // The most I've seen is 3
22
22
  {
23
23
  type: "pointermove",
24
- listener: /* @__PURE__ */ function() {
24
+ listener: /* @__PURE__ */ (function() {
25
25
  var r = 0;
26
26
  return function() {
27
27
  if (r < 20) {
@@ -30,7 +30,7 @@ function o(e) {
30
30
  }
31
31
  n();
32
32
  };
33
- }()
33
+ })()
34
34
  },
35
35
  // ### Second detection: "pointerdown" events
36
36
  // If we receive this event then we know that a drag operation has finished
@@ -1,9 +1,9 @@
1
- import { __exports as r } from "../../../_virtual/index3.js";
1
+ import { __exports as r } from "../../../_virtual/index2.js";
2
2
  import { __require as u } from "./bind.js";
3
3
  import { __require as d } from "./bind-all.js";
4
4
  var i;
5
5
  function _() {
6
- return i ? r : (i = 1, function(e) {
6
+ return i ? r : (i = 1, (function(e) {
7
7
  Object.defineProperty(e, "__esModule", { value: !0 }), e.bindAll = e.bind = void 0;
8
8
  var n = /* @__PURE__ */ u();
9
9
  Object.defineProperty(e, "bind", { enumerable: !0, get: function() {
@@ -13,7 +13,7 @@ function _() {
13
13
  Object.defineProperty(e, "bindAll", { enumerable: !0, get: function() {
14
14
  return t.bindAll;
15
15
  } });
16
- }(r), r);
16
+ })(r), r);
17
17
  }
18
18
  export {
19
19
  _ as __require
@@ -1,8 +1,8 @@
1
1
  import { jsx as A, jsxs as V } from "react/jsx-runtime";
2
2
  import { PureComponent as Z } from "react";
3
- import { r as q } from "../../../_virtual/index2.js";
3
+ import { r as q } from "../../../_virtual/index3.js";
4
4
  import { Resizer as J } from "./resizer.js";
5
- var K = /* @__PURE__ */ function() {
5
+ var K = /* @__PURE__ */ (function() {
6
6
  var r = function(o, t) {
7
7
  return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, i) {
8
8
  e.__proto__ = i;
@@ -19,7 +19,7 @@ var K = /* @__PURE__ */ function() {
19
19
  }
20
20
  o.prototype = t === null ? Object.create(t) : (e.prototype = t.prototype, new e());
21
21
  };
22
- }(), z = function() {
22
+ })(), z = function() {
23
23
  return z = Object.assign || function(r) {
24
24
  for (var o, t = 1, e = arguments.length; t < e; t++) {
25
25
  o = arguments[t];
@@ -110,7 +110,7 @@ var K = /* @__PURE__ */ function() {
110
110
  "snapGap"
111
111
  ], F = "__resizable_base__", ht = (
112
112
  /** @class */
113
- function(r) {
113
+ (function(r) {
114
114
  K(o, r);
115
115
  function o(t) {
116
116
  var e, i, n, a, s = r.call(this, t) || this;
@@ -417,7 +417,7 @@ var K = /* @__PURE__ */ function() {
417
417
  resizeRatio: 1,
418
418
  snapGap: 0
419
419
  }, o;
420
- }(Z)
420
+ })(Z)
421
421
  );
422
422
  export {
423
423
  ht as Resizable
@@ -11,7 +11,7 @@ import _ from "react";
11
11
  */
12
12
  var p;
13
13
  function S() {
14
- return p ? n : (p = 1, process.env.NODE_ENV !== "production" && function() {
14
+ return p ? n : (p = 1, process.env.NODE_ENV !== "production" && (function() {
15
15
  function s() {
16
16
  }
17
17
  function g(t) {
@@ -219,8 +219,8 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
219
219
  return y().useFormState(t, e, r);
220
220
  }, n.useFormStatus = function() {
221
221
  return y().useHostTransitionStatus();
222
- }, n.version = "19.1.0", typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
223
- }(), n);
222
+ }, n.version = "19.2.3", typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
223
+ })(), n);
224
224
  }
225
225
  export {
226
226
  S as __require
@@ -140,7 +140,7 @@ function O() {
140
140
  return c.H.useFormState(e, r, t);
141
141
  }, i.useFormStatus = function() {
142
142
  return c.H.useHostTransitionStatus();
143
- }, i.version = "19.1.0", i;
143
+ }, i.version = "19.2.3", i;
144
144
  }
145
145
  export {
146
146
  O as __require
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-timelane",
3
- "version": "1.2.4",
3
+ "version": "1.2.5",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "vite",