@ebay/nice-dag-react 1.0.8 → 1.0.9
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.
- package/lib/index.cjs +8 -8
- package/lib/index.d.ts +5 -0
- package/lib/index.js +299 -284
- package/lib/index.umd.cjs +9 -9
- package/package.json +2 -2
package/lib/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import M, { useCallback as A, useRef as K, useState as dr, useMemo as vr, useEffect as Ne } from "react";
|
|
2
|
+
import ie from "react-dom";
|
|
3
3
|
import pr from "@ebay/nice-dag-core";
|
|
4
|
-
var
|
|
4
|
+
var ue = { exports: {} }, V = {};
|
|
5
5
|
/**
|
|
6
6
|
* @license React
|
|
7
7
|
* react-jsx-runtime.production.min.js
|
|
@@ -11,25 +11,25 @@ var oe = { exports: {} }, W = {};
|
|
|
11
11
|
* This source code is licensed under the MIT license found in the
|
|
12
12
|
* LICENSE file in the root directory of this source tree.
|
|
13
13
|
*/
|
|
14
|
-
var
|
|
14
|
+
var Fe;
|
|
15
15
|
function gr() {
|
|
16
|
-
if (
|
|
17
|
-
return
|
|
18
|
-
|
|
19
|
-
var
|
|
20
|
-
function
|
|
21
|
-
var
|
|
22
|
-
|
|
23
|
-
for (
|
|
24
|
-
|
|
25
|
-
if (
|
|
26
|
-
for (
|
|
27
|
-
|
|
28
|
-
return { $$typeof: l, type:
|
|
16
|
+
if (Fe)
|
|
17
|
+
return V;
|
|
18
|
+
Fe = 1;
|
|
19
|
+
var s = M, l = Symbol.for("react.element"), T = Symbol.for("react.fragment"), m = Object.prototype.hasOwnProperty, y = s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, P = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
20
|
+
function _(w, p, O) {
|
|
21
|
+
var g, u = {}, C = null, R = null;
|
|
22
|
+
O !== void 0 && (C = "" + O), p.key !== void 0 && (C = "" + p.key), p.ref !== void 0 && (R = p.ref);
|
|
23
|
+
for (g in p)
|
|
24
|
+
m.call(p, g) && !P.hasOwnProperty(g) && (u[g] = p[g]);
|
|
25
|
+
if (w && w.defaultProps)
|
|
26
|
+
for (g in p = w.defaultProps, p)
|
|
27
|
+
u[g] === void 0 && (u[g] = p[g]);
|
|
28
|
+
return { $$typeof: l, type: w, key: C, ref: R, props: u, _owner: y.current };
|
|
29
29
|
}
|
|
30
|
-
return
|
|
30
|
+
return V.Fragment = T, V.jsx = _, V.jsxs = _, V;
|
|
31
31
|
}
|
|
32
|
-
var
|
|
32
|
+
var L = {};
|
|
33
33
|
/**
|
|
34
34
|
* @license React
|
|
35
35
|
* react-jsx-runtime.development.js
|
|
@@ -39,50 +39,50 @@ var Y = {};
|
|
|
39
39
|
* This source code is licensed under the MIT license found in the
|
|
40
40
|
* LICENSE file in the root directory of this source tree.
|
|
41
41
|
*/
|
|
42
|
-
var
|
|
42
|
+
var Ae;
|
|
43
43
|
function hr() {
|
|
44
|
-
return
|
|
45
|
-
var
|
|
46
|
-
function
|
|
44
|
+
return Ae || (Ae = 1, process.env.NODE_ENV !== "production" && function() {
|
|
45
|
+
var s = M, l = Symbol.for("react.element"), T = Symbol.for("react.portal"), m = Symbol.for("react.fragment"), y = Symbol.for("react.strict_mode"), P = Symbol.for("react.profiler"), _ = Symbol.for("react.provider"), w = Symbol.for("react.context"), p = Symbol.for("react.forward_ref"), O = Symbol.for("react.suspense"), g = Symbol.for("react.suspense_list"), u = Symbol.for("react.memo"), C = Symbol.for("react.lazy"), R = Symbol.for("react.offscreen"), D = Symbol.iterator, H = "@@iterator";
|
|
46
|
+
function U(e) {
|
|
47
47
|
if (e === null || typeof e != "object")
|
|
48
48
|
return null;
|
|
49
|
-
var r =
|
|
49
|
+
var r = D && e[D] || e[H];
|
|
50
50
|
return typeof r == "function" ? r : null;
|
|
51
51
|
}
|
|
52
|
-
var
|
|
52
|
+
var E = s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
53
53
|
function f(e) {
|
|
54
54
|
{
|
|
55
55
|
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++)
|
|
56
56
|
t[n - 1] = arguments[n];
|
|
57
|
-
|
|
57
|
+
S("error", e, t);
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
function
|
|
60
|
+
function S(e, r, t) {
|
|
61
61
|
{
|
|
62
|
-
var n =
|
|
63
|
-
|
|
64
|
-
var
|
|
62
|
+
var n = E.ReactDebugCurrentFrame, i = n.getStackAddendum();
|
|
63
|
+
i !== "" && (r += "%s", t = t.concat([i]));
|
|
64
|
+
var c = t.map(function(o) {
|
|
65
65
|
return String(o);
|
|
66
66
|
});
|
|
67
|
-
|
|
67
|
+
c.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, c);
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
-
var
|
|
71
|
-
|
|
70
|
+
var X = !1, $ = !1, Ie = !1, $e = !1, We = !1, ce;
|
|
71
|
+
ce = Symbol.for("react.module.reference");
|
|
72
72
|
function Ye(e) {
|
|
73
|
-
return !!(typeof e == "string" || typeof e == "function" || e ===
|
|
73
|
+
return !!(typeof e == "string" || typeof e == "function" || e === m || e === P || We || e === y || e === O || e === g || $e || e === R || X || $ || Ie || typeof e == "object" && e !== null && (e.$$typeof === C || e.$$typeof === u || e.$$typeof === _ || e.$$typeof === w || e.$$typeof === p || e.$$typeof === ce || e.getModuleId !== void 0));
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function Ve(e, r, t) {
|
|
76
76
|
var n = e.displayName;
|
|
77
77
|
if (n)
|
|
78
78
|
return n;
|
|
79
|
-
var
|
|
80
|
-
return
|
|
79
|
+
var i = r.displayName || r.name || "";
|
|
80
|
+
return i !== "" ? t + "(" + i + ")" : t;
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
function le(e) {
|
|
83
83
|
return e.displayName || "Context";
|
|
84
84
|
}
|
|
85
|
-
function
|
|
85
|
+
function x(e) {
|
|
86
86
|
if (e == null)
|
|
87
87
|
return null;
|
|
88
88
|
if (typeof e.tag == "number" && f("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
@@ -90,36 +90,36 @@ function hr() {
|
|
|
90
90
|
if (typeof e == "string")
|
|
91
91
|
return e;
|
|
92
92
|
switch (e) {
|
|
93
|
-
case
|
|
93
|
+
case m:
|
|
94
94
|
return "Fragment";
|
|
95
95
|
case T:
|
|
96
96
|
return "Portal";
|
|
97
|
-
case
|
|
97
|
+
case P:
|
|
98
98
|
return "Profiler";
|
|
99
|
-
case
|
|
99
|
+
case y:
|
|
100
100
|
return "StrictMode";
|
|
101
|
-
case
|
|
101
|
+
case O:
|
|
102
102
|
return "Suspense";
|
|
103
|
-
case
|
|
103
|
+
case g:
|
|
104
104
|
return "SuspenseList";
|
|
105
105
|
}
|
|
106
106
|
if (typeof e == "object")
|
|
107
107
|
switch (e.$$typeof) {
|
|
108
|
-
case
|
|
108
|
+
case w:
|
|
109
109
|
var r = e;
|
|
110
|
-
return
|
|
111
|
-
case
|
|
110
|
+
return le(r) + ".Consumer";
|
|
111
|
+
case _:
|
|
112
112
|
var t = e;
|
|
113
|
-
return
|
|
113
|
+
return le(t._context) + ".Provider";
|
|
114
114
|
case p:
|
|
115
|
-
return
|
|
116
|
-
case
|
|
115
|
+
return Ve(e, e.render, "ForwardRef");
|
|
116
|
+
case u:
|
|
117
117
|
var n = e.displayName || null;
|
|
118
|
-
return n !== null ? n :
|
|
119
|
-
case
|
|
120
|
-
var
|
|
118
|
+
return n !== null ? n : x(e.type) || "Memo";
|
|
119
|
+
case C: {
|
|
120
|
+
var i = e, c = i._payload, o = i._init;
|
|
121
121
|
try {
|
|
122
|
-
return
|
|
122
|
+
return x(o(c));
|
|
123
123
|
} catch {
|
|
124
124
|
return null;
|
|
125
125
|
}
|
|
@@ -127,18 +127,18 @@ function hr() {
|
|
|
127
127
|
}
|
|
128
128
|
return null;
|
|
129
129
|
}
|
|
130
|
-
var
|
|
131
|
-
function
|
|
130
|
+
var k = Object.assign, W = 0, fe, de, ve, pe, ge, he, me;
|
|
131
|
+
function Ee() {
|
|
132
132
|
}
|
|
133
|
-
|
|
134
|
-
function
|
|
133
|
+
Ee.__reactDisabledLog = !0;
|
|
134
|
+
function Le() {
|
|
135
135
|
{
|
|
136
|
-
if (
|
|
137
|
-
|
|
136
|
+
if (W === 0) {
|
|
137
|
+
fe = console.log, de = console.info, ve = console.warn, pe = console.error, ge = console.group, he = console.groupCollapsed, me = console.groupEnd;
|
|
138
138
|
var e = {
|
|
139
139
|
configurable: !0,
|
|
140
140
|
enumerable: !0,
|
|
141
|
-
value:
|
|
141
|
+
value: Ee,
|
|
142
142
|
writable: !0
|
|
143
143
|
};
|
|
144
144
|
Object.defineProperties(console, {
|
|
@@ -151,77 +151,77 @@ function hr() {
|
|
|
151
151
|
groupEnd: e
|
|
152
152
|
});
|
|
153
153
|
}
|
|
154
|
-
|
|
154
|
+
W++;
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
|
-
function
|
|
157
|
+
function Me() {
|
|
158
158
|
{
|
|
159
|
-
if (
|
|
159
|
+
if (W--, W === 0) {
|
|
160
160
|
var e = {
|
|
161
161
|
configurable: !0,
|
|
162
162
|
enumerable: !0,
|
|
163
163
|
writable: !0
|
|
164
164
|
};
|
|
165
165
|
Object.defineProperties(console, {
|
|
166
|
-
log:
|
|
167
|
-
value: se
|
|
168
|
-
}),
|
|
169
|
-
info: j({}, e, {
|
|
170
|
-
value: ce
|
|
171
|
-
}),
|
|
172
|
-
warn: j({}, e, {
|
|
166
|
+
log: k({}, e, {
|
|
173
167
|
value: fe
|
|
174
168
|
}),
|
|
175
|
-
|
|
176
|
-
value: le
|
|
177
|
-
}),
|
|
178
|
-
group: j({}, e, {
|
|
169
|
+
info: k({}, e, {
|
|
179
170
|
value: de
|
|
180
171
|
}),
|
|
181
|
-
|
|
172
|
+
warn: k({}, e, {
|
|
182
173
|
value: ve
|
|
183
174
|
}),
|
|
184
|
-
|
|
175
|
+
error: k({}, e, {
|
|
185
176
|
value: pe
|
|
177
|
+
}),
|
|
178
|
+
group: k({}, e, {
|
|
179
|
+
value: ge
|
|
180
|
+
}),
|
|
181
|
+
groupCollapsed: k({}, e, {
|
|
182
|
+
value: he
|
|
183
|
+
}),
|
|
184
|
+
groupEnd: k({}, e, {
|
|
185
|
+
value: me
|
|
186
186
|
})
|
|
187
187
|
});
|
|
188
188
|
}
|
|
189
|
-
|
|
189
|
+
W < 0 && f("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
|
-
var
|
|
193
|
-
function
|
|
192
|
+
var Z = E.ReactCurrentDispatcher, Q;
|
|
193
|
+
function B(e, r, t) {
|
|
194
194
|
{
|
|
195
|
-
if (
|
|
195
|
+
if (Q === void 0)
|
|
196
196
|
try {
|
|
197
197
|
throw Error();
|
|
198
|
-
} catch (
|
|
199
|
-
var n =
|
|
200
|
-
|
|
198
|
+
} catch (i) {
|
|
199
|
+
var n = i.stack.trim().match(/\n( *(at )?)/);
|
|
200
|
+
Q = n && n[1] || "";
|
|
201
201
|
}
|
|
202
202
|
return `
|
|
203
|
-
` +
|
|
203
|
+
` + Q + e;
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
|
-
var
|
|
206
|
+
var ee = !1, q;
|
|
207
207
|
{
|
|
208
208
|
var Ue = typeof WeakMap == "function" ? WeakMap : Map;
|
|
209
|
-
|
|
209
|
+
q = new Ue();
|
|
210
210
|
}
|
|
211
|
-
function
|
|
212
|
-
if (!e ||
|
|
211
|
+
function Re(e, r) {
|
|
212
|
+
if (!e || ee)
|
|
213
213
|
return "";
|
|
214
214
|
{
|
|
215
|
-
var t =
|
|
215
|
+
var t = q.get(e);
|
|
216
216
|
if (t !== void 0)
|
|
217
217
|
return t;
|
|
218
218
|
}
|
|
219
219
|
var n;
|
|
220
|
-
|
|
221
|
-
var
|
|
220
|
+
ee = !0;
|
|
221
|
+
var i = Error.prepareStackTrace;
|
|
222
222
|
Error.prepareStackTrace = void 0;
|
|
223
|
-
var
|
|
224
|
-
|
|
223
|
+
var c;
|
|
224
|
+
c = Z.current, Z.current = null, Le();
|
|
225
225
|
try {
|
|
226
226
|
if (r) {
|
|
227
227
|
var o = function() {
|
|
@@ -234,29 +234,29 @@ function hr() {
|
|
|
234
234
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
235
235
|
try {
|
|
236
236
|
Reflect.construct(o, []);
|
|
237
|
-
} catch (
|
|
238
|
-
n =
|
|
237
|
+
} catch (j) {
|
|
238
|
+
n = j;
|
|
239
239
|
}
|
|
240
240
|
Reflect.construct(e, [], o);
|
|
241
241
|
} else {
|
|
242
242
|
try {
|
|
243
243
|
o.call();
|
|
244
|
-
} catch (
|
|
245
|
-
n =
|
|
244
|
+
} catch (j) {
|
|
245
|
+
n = j;
|
|
246
246
|
}
|
|
247
247
|
e.call(o.prototype);
|
|
248
248
|
}
|
|
249
249
|
} else {
|
|
250
250
|
try {
|
|
251
251
|
throw Error();
|
|
252
|
-
} catch (
|
|
253
|
-
n =
|
|
252
|
+
} catch (j) {
|
|
253
|
+
n = j;
|
|
254
254
|
}
|
|
255
255
|
e();
|
|
256
256
|
}
|
|
257
|
-
} catch (
|
|
258
|
-
if (
|
|
259
|
-
for (var a =
|
|
257
|
+
} catch (j) {
|
|
258
|
+
if (j && n && typeof j.stack == "string") {
|
|
259
|
+
for (var a = j.stack.split(`
|
|
260
260
|
`), h = n.stack.split(`
|
|
261
261
|
`), d = a.length - 1, v = h.length - 1; d >= 1 && v >= 0 && a[d] !== h[v]; )
|
|
262
262
|
v--;
|
|
@@ -265,69 +265,69 @@ function hr() {
|
|
|
265
265
|
if (d !== 1 || v !== 1)
|
|
266
266
|
do
|
|
267
267
|
if (d--, v--, v < 0 || a[d] !== h[v]) {
|
|
268
|
-
var
|
|
268
|
+
var b = `
|
|
269
269
|
` + a[d].replace(" at new ", " at ");
|
|
270
|
-
return e.displayName &&
|
|
270
|
+
return e.displayName && b.includes("<anonymous>") && (b = b.replace("<anonymous>", e.displayName)), typeof e == "function" && q.set(e, b), b;
|
|
271
271
|
}
|
|
272
272
|
while (d >= 1 && v >= 0);
|
|
273
273
|
break;
|
|
274
274
|
}
|
|
275
275
|
}
|
|
276
276
|
} finally {
|
|
277
|
-
|
|
277
|
+
ee = !1, Z.current = c, Me(), Error.prepareStackTrace = i;
|
|
278
278
|
}
|
|
279
|
-
var
|
|
280
|
-
return typeof e == "function" &&
|
|
279
|
+
var F = e ? e.displayName || e.name : "", ke = F ? B(F) : "";
|
|
280
|
+
return typeof e == "function" && q.set(e, ke), ke;
|
|
281
281
|
}
|
|
282
282
|
function Be(e, r, t) {
|
|
283
|
-
return
|
|
283
|
+
return Re(e, !1);
|
|
284
284
|
}
|
|
285
285
|
function qe(e) {
|
|
286
286
|
var r = e.prototype;
|
|
287
287
|
return !!(r && r.isReactComponent);
|
|
288
288
|
}
|
|
289
|
-
function
|
|
289
|
+
function J(e, r, t) {
|
|
290
290
|
if (e == null)
|
|
291
291
|
return "";
|
|
292
292
|
if (typeof e == "function")
|
|
293
|
-
return
|
|
293
|
+
return Re(e, qe(e));
|
|
294
294
|
if (typeof e == "string")
|
|
295
|
-
return
|
|
295
|
+
return B(e);
|
|
296
296
|
switch (e) {
|
|
297
|
-
case
|
|
298
|
-
return
|
|
299
|
-
case
|
|
300
|
-
return
|
|
297
|
+
case O:
|
|
298
|
+
return B("Suspense");
|
|
299
|
+
case g:
|
|
300
|
+
return B("SuspenseList");
|
|
301
301
|
}
|
|
302
302
|
if (typeof e == "object")
|
|
303
303
|
switch (e.$$typeof) {
|
|
304
304
|
case p:
|
|
305
305
|
return Be(e.render);
|
|
306
|
-
case
|
|
307
|
-
return
|
|
308
|
-
case
|
|
309
|
-
var n = e,
|
|
306
|
+
case u:
|
|
307
|
+
return J(e.type, r, t);
|
|
308
|
+
case C: {
|
|
309
|
+
var n = e, i = n._payload, c = n._init;
|
|
310
310
|
try {
|
|
311
|
-
return
|
|
311
|
+
return J(c(i), r, t);
|
|
312
312
|
} catch {
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
315
|
}
|
|
316
316
|
return "";
|
|
317
317
|
}
|
|
318
|
-
var
|
|
319
|
-
function
|
|
318
|
+
var G = Object.prototype.hasOwnProperty, be = {}, ye = E.ReactDebugCurrentFrame;
|
|
319
|
+
function z(e) {
|
|
320
320
|
if (e) {
|
|
321
|
-
var r = e._owner, t =
|
|
322
|
-
|
|
321
|
+
var r = e._owner, t = J(e.type, e._source, r ? r.type : null);
|
|
322
|
+
ye.setExtraStackFrame(t);
|
|
323
323
|
} else
|
|
324
|
-
|
|
324
|
+
ye.setExtraStackFrame(null);
|
|
325
325
|
}
|
|
326
|
-
function Je(e, r, t, n,
|
|
326
|
+
function Je(e, r, t, n, i) {
|
|
327
327
|
{
|
|
328
|
-
var
|
|
328
|
+
var c = Function.call.bind(G);
|
|
329
329
|
for (var o in e)
|
|
330
|
-
if (
|
|
330
|
+
if (c(e, o)) {
|
|
331
331
|
var a = void 0;
|
|
332
332
|
try {
|
|
333
333
|
if (typeof e[o] != "function") {
|
|
@@ -338,12 +338,12 @@ function hr() {
|
|
|
338
338
|
} catch (d) {
|
|
339
339
|
a = d;
|
|
340
340
|
}
|
|
341
|
-
a && !(a instanceof Error) && (
|
|
341
|
+
a && !(a instanceof Error) && (z(i), f("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", n || "React class", t, o, typeof a), z(null)), a instanceof Error && !(a.message in be) && (be[a.message] = !0, z(i), f("Failed %s type: %s", t, a.message), z(null));
|
|
342
342
|
}
|
|
343
343
|
}
|
|
344
344
|
}
|
|
345
345
|
var Ge = Array.isArray;
|
|
346
|
-
function
|
|
346
|
+
function re(e) {
|
|
347
347
|
return Ge(e);
|
|
348
348
|
}
|
|
349
349
|
function ze(e) {
|
|
@@ -354,27 +354,27 @@ function hr() {
|
|
|
354
354
|
}
|
|
355
355
|
function Ke(e) {
|
|
356
356
|
try {
|
|
357
|
-
return
|
|
357
|
+
return _e(e), !1;
|
|
358
358
|
} catch {
|
|
359
359
|
return !0;
|
|
360
360
|
}
|
|
361
361
|
}
|
|
362
|
-
function
|
|
362
|
+
function _e(e) {
|
|
363
363
|
return "" + e;
|
|
364
364
|
}
|
|
365
|
-
function
|
|
365
|
+
function Ce(e) {
|
|
366
366
|
if (Ke(e))
|
|
367
|
-
return f("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", ze(e)),
|
|
367
|
+
return f("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", ze(e)), _e(e);
|
|
368
368
|
}
|
|
369
|
-
var
|
|
369
|
+
var Y = E.ReactCurrentOwner, He = {
|
|
370
370
|
key: !0,
|
|
371
371
|
ref: !0,
|
|
372
372
|
__self: !0,
|
|
373
373
|
__source: !0
|
|
374
|
-
},
|
|
375
|
-
|
|
374
|
+
}, Te, Pe, te;
|
|
375
|
+
te = {};
|
|
376
376
|
function Xe(e) {
|
|
377
|
-
if (
|
|
377
|
+
if (G.call(e, "ref")) {
|
|
378
378
|
var r = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
379
379
|
if (r && r.isReactWarning)
|
|
380
380
|
return !1;
|
|
@@ -382,7 +382,7 @@ function hr() {
|
|
|
382
382
|
return e.ref !== void 0;
|
|
383
383
|
}
|
|
384
384
|
function Ze(e) {
|
|
385
|
-
if (
|
|
385
|
+
if (G.call(e, "key")) {
|
|
386
386
|
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
387
387
|
if (r && r.isReactWarning)
|
|
388
388
|
return !1;
|
|
@@ -390,15 +390,15 @@ function hr() {
|
|
|
390
390
|
return e.key !== void 0;
|
|
391
391
|
}
|
|
392
392
|
function Qe(e, r) {
|
|
393
|
-
if (typeof e.ref == "string" &&
|
|
394
|
-
var t =
|
|
395
|
-
|
|
393
|
+
if (typeof e.ref == "string" && Y.current && r && Y.current.stateNode !== r) {
|
|
394
|
+
var t = x(Y.current.type);
|
|
395
|
+
te[t] || (f('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', x(Y.current.type), e.ref), te[t] = !0);
|
|
396
396
|
}
|
|
397
397
|
}
|
|
398
398
|
function er(e, r) {
|
|
399
399
|
{
|
|
400
400
|
var t = function() {
|
|
401
|
-
|
|
401
|
+
Te || (Te = !0, f("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
|
|
402
402
|
};
|
|
403
403
|
t.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
404
404
|
get: t,
|
|
@@ -409,7 +409,7 @@ function hr() {
|
|
|
409
409
|
function rr(e, r) {
|
|
410
410
|
{
|
|
411
411
|
var t = function() {
|
|
412
|
-
|
|
412
|
+
Pe || (Pe = !0, f("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
|
|
413
413
|
};
|
|
414
414
|
t.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
415
415
|
get: t,
|
|
@@ -417,14 +417,14 @@ function hr() {
|
|
|
417
417
|
});
|
|
418
418
|
}
|
|
419
419
|
}
|
|
420
|
-
var tr = function(e, r, t, n,
|
|
420
|
+
var tr = function(e, r, t, n, i, c, o) {
|
|
421
421
|
var a = {
|
|
422
422
|
$$typeof: l,
|
|
423
423
|
type: e,
|
|
424
424
|
key: r,
|
|
425
425
|
ref: t,
|
|
426
426
|
props: o,
|
|
427
|
-
_owner:
|
|
427
|
+
_owner: c
|
|
428
428
|
};
|
|
429
429
|
return a._store = {}, Object.defineProperty(a._store, "validated", {
|
|
430
430
|
configurable: !1,
|
|
@@ -440,44 +440,44 @@ function hr() {
|
|
|
440
440
|
configurable: !1,
|
|
441
441
|
enumerable: !1,
|
|
442
442
|
writable: !1,
|
|
443
|
-
value:
|
|
443
|
+
value: i
|
|
444
444
|
}), Object.freeze && (Object.freeze(a.props), Object.freeze(a)), a;
|
|
445
445
|
};
|
|
446
|
-
function nr(e, r, t, n,
|
|
446
|
+
function nr(e, r, t, n, i) {
|
|
447
447
|
{
|
|
448
|
-
var
|
|
449
|
-
t !== void 0 && (
|
|
450
|
-
for (
|
|
451
|
-
|
|
448
|
+
var c, o = {}, a = null, h = null;
|
|
449
|
+
t !== void 0 && (Ce(t), a = "" + t), Ze(r) && (Ce(r.key), a = "" + r.key), Xe(r) && (h = r.ref, Qe(r, i));
|
|
450
|
+
for (c in r)
|
|
451
|
+
G.call(r, c) && !He.hasOwnProperty(c) && (o[c] = r[c]);
|
|
452
452
|
if (e && e.defaultProps) {
|
|
453
453
|
var d = e.defaultProps;
|
|
454
|
-
for (
|
|
455
|
-
o[
|
|
454
|
+
for (c in d)
|
|
455
|
+
o[c] === void 0 && (o[c] = d[c]);
|
|
456
456
|
}
|
|
457
457
|
if (a || h) {
|
|
458
458
|
var v = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
459
459
|
a && er(o, v), h && rr(o, v);
|
|
460
460
|
}
|
|
461
|
-
return tr(e, a, h,
|
|
461
|
+
return tr(e, a, h, i, n, Y.current, o);
|
|
462
462
|
}
|
|
463
463
|
}
|
|
464
|
-
var
|
|
465
|
-
function
|
|
464
|
+
var ne = E.ReactCurrentOwner, we = E.ReactDebugCurrentFrame;
|
|
465
|
+
function N(e) {
|
|
466
466
|
if (e) {
|
|
467
|
-
var r = e._owner, t =
|
|
468
|
-
|
|
467
|
+
var r = e._owner, t = J(e.type, e._source, r ? r.type : null);
|
|
468
|
+
we.setExtraStackFrame(t);
|
|
469
469
|
} else
|
|
470
|
-
|
|
470
|
+
we.setExtraStackFrame(null);
|
|
471
471
|
}
|
|
472
|
-
var
|
|
473
|
-
|
|
474
|
-
function
|
|
472
|
+
var ae;
|
|
473
|
+
ae = !1;
|
|
474
|
+
function oe(e) {
|
|
475
475
|
return typeof e == "object" && e !== null && e.$$typeof === l;
|
|
476
476
|
}
|
|
477
|
-
function
|
|
477
|
+
function Oe() {
|
|
478
478
|
{
|
|
479
|
-
if (
|
|
480
|
-
var e =
|
|
479
|
+
if (ne.current) {
|
|
480
|
+
var e = x(ne.current.type);
|
|
481
481
|
if (e)
|
|
482
482
|
return `
|
|
483
483
|
|
|
@@ -497,10 +497,10 @@ Check your code at ` + r + ":" + t + ".";
|
|
|
497
497
|
return "";
|
|
498
498
|
}
|
|
499
499
|
}
|
|
500
|
-
var
|
|
500
|
+
var De = {};
|
|
501
501
|
function or(e) {
|
|
502
502
|
{
|
|
503
|
-
var r =
|
|
503
|
+
var r = Oe();
|
|
504
504
|
if (!r) {
|
|
505
505
|
var t = typeof e == "string" ? e : e.displayName || e.name;
|
|
506
506
|
t && (r = `
|
|
@@ -510,35 +510,35 @@ Check the top-level render call using <` + t + ">.");
|
|
|
510
510
|
return r;
|
|
511
511
|
}
|
|
512
512
|
}
|
|
513
|
-
function
|
|
513
|
+
function Se(e, r) {
|
|
514
514
|
{
|
|
515
515
|
if (!e._store || e._store.validated || e.key != null)
|
|
516
516
|
return;
|
|
517
517
|
e._store.validated = !0;
|
|
518
518
|
var t = or(r);
|
|
519
|
-
if (
|
|
519
|
+
if (De[t])
|
|
520
520
|
return;
|
|
521
|
-
|
|
521
|
+
De[t] = !0;
|
|
522
522
|
var n = "";
|
|
523
|
-
e && e._owner && e._owner !==
|
|
523
|
+
e && e._owner && e._owner !== ne.current && (n = " It was passed a child from " + x(e._owner.type) + "."), N(e), f('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, n), N(null);
|
|
524
524
|
}
|
|
525
525
|
}
|
|
526
|
-
function
|
|
526
|
+
function xe(e, r) {
|
|
527
527
|
{
|
|
528
528
|
if (typeof e != "object")
|
|
529
529
|
return;
|
|
530
|
-
if (
|
|
530
|
+
if (re(e))
|
|
531
531
|
for (var t = 0; t < e.length; t++) {
|
|
532
532
|
var n = e[t];
|
|
533
|
-
|
|
533
|
+
oe(n) && Se(n, r);
|
|
534
534
|
}
|
|
535
|
-
else if (
|
|
535
|
+
else if (oe(e))
|
|
536
536
|
e._store && (e._store.validated = !0);
|
|
537
537
|
else if (e) {
|
|
538
|
-
var
|
|
539
|
-
if (typeof
|
|
540
|
-
for (var
|
|
541
|
-
|
|
538
|
+
var i = U(e);
|
|
539
|
+
if (typeof i == "function" && i !== e.entries)
|
|
540
|
+
for (var c = i.call(e), o; !(o = c.next()).done; )
|
|
541
|
+
oe(o.value) && Se(o.value, r);
|
|
542
542
|
}
|
|
543
543
|
}
|
|
544
544
|
}
|
|
@@ -550,17 +550,17 @@ Check the top-level render call using <` + t + ">.");
|
|
|
550
550
|
var t;
|
|
551
551
|
if (typeof r == "function")
|
|
552
552
|
t = r.propTypes;
|
|
553
|
-
else if (typeof r == "object" && (r.$$typeof === p || r.$$typeof ===
|
|
553
|
+
else if (typeof r == "object" && (r.$$typeof === p || r.$$typeof === u))
|
|
554
554
|
t = r.propTypes;
|
|
555
555
|
else
|
|
556
556
|
return;
|
|
557
557
|
if (t) {
|
|
558
|
-
var n =
|
|
558
|
+
var n = x(r);
|
|
559
559
|
Je(t, e.props, "prop", n, e);
|
|
560
|
-
} else if (r.PropTypes !== void 0 && !
|
|
561
|
-
|
|
562
|
-
var
|
|
563
|
-
f("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",
|
|
560
|
+
} else if (r.PropTypes !== void 0 && !ae) {
|
|
561
|
+
ae = !0;
|
|
562
|
+
var i = x(r);
|
|
563
|
+
f("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", i || "Unknown");
|
|
564
564
|
}
|
|
565
565
|
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && f("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
566
566
|
}
|
|
@@ -570,179 +570,194 @@ Check the top-level render call using <` + t + ">.");
|
|
|
570
570
|
for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
|
|
571
571
|
var n = r[t];
|
|
572
572
|
if (n !== "children" && n !== "key") {
|
|
573
|
-
|
|
573
|
+
N(e), f("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), N(null);
|
|
574
574
|
break;
|
|
575
575
|
}
|
|
576
576
|
}
|
|
577
|
-
e.ref !== null && (
|
|
577
|
+
e.ref !== null && (N(e), f("Invalid attribute `ref` supplied to `React.Fragment`."), N(null));
|
|
578
578
|
}
|
|
579
579
|
}
|
|
580
|
-
function
|
|
580
|
+
function je(e, r, t, n, i, c) {
|
|
581
581
|
{
|
|
582
582
|
var o = Ye(e);
|
|
583
583
|
if (!o) {
|
|
584
584
|
var a = "";
|
|
585
585
|
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (a += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
586
|
-
var h = ar(
|
|
587
|
-
h ? a += h : a +=
|
|
586
|
+
var h = ar(i);
|
|
587
|
+
h ? a += h : a += Oe();
|
|
588
588
|
var d;
|
|
589
|
-
e === null ? d = "null" :
|
|
589
|
+
e === null ? d = "null" : re(e) ? d = "array" : e !== void 0 && e.$$typeof === l ? (d = "<" + (x(e.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : d = typeof e, f("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", d, a);
|
|
590
590
|
}
|
|
591
|
-
var v = nr(e, r, t,
|
|
591
|
+
var v = nr(e, r, t, i, c);
|
|
592
592
|
if (v == null)
|
|
593
593
|
return v;
|
|
594
594
|
if (o) {
|
|
595
|
-
var
|
|
596
|
-
if (
|
|
595
|
+
var b = r.children;
|
|
596
|
+
if (b !== void 0)
|
|
597
597
|
if (n)
|
|
598
|
-
if (
|
|
599
|
-
for (var
|
|
600
|
-
|
|
601
|
-
Object.freeze && Object.freeze(
|
|
598
|
+
if (re(b)) {
|
|
599
|
+
for (var F = 0; F < b.length; F++)
|
|
600
|
+
xe(b[F], e);
|
|
601
|
+
Object.freeze && Object.freeze(b);
|
|
602
602
|
} else
|
|
603
603
|
f("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
604
604
|
else
|
|
605
|
-
|
|
605
|
+
xe(b, e);
|
|
606
606
|
}
|
|
607
|
-
return e ===
|
|
607
|
+
return e === m ? ur(v) : ir(v), v;
|
|
608
608
|
}
|
|
609
609
|
}
|
|
610
610
|
function sr(e, r, t) {
|
|
611
|
-
return
|
|
611
|
+
return je(e, r, t, !0);
|
|
612
612
|
}
|
|
613
613
|
function cr(e, r, t) {
|
|
614
|
-
return
|
|
614
|
+
return je(e, r, t, !1);
|
|
615
615
|
}
|
|
616
|
-
var
|
|
617
|
-
|
|
618
|
-
}()),
|
|
616
|
+
var lr = cr, fr = sr;
|
|
617
|
+
L.Fragment = m, L.jsx = lr, L.jsxs = fr;
|
|
618
|
+
}()), L;
|
|
619
619
|
}
|
|
620
|
-
(function(
|
|
621
|
-
process.env.NODE_ENV === "production" ?
|
|
622
|
-
})(
|
|
623
|
-
const
|
|
624
|
-
class mr extends
|
|
620
|
+
(function(s) {
|
|
621
|
+
process.env.NODE_ENV === "production" ? s.exports = gr() : s.exports = hr();
|
|
622
|
+
})(ue);
|
|
623
|
+
const se = ue.exports.Fragment, I = ue.exports.jsx;
|
|
624
|
+
class mr extends M.Component {
|
|
625
625
|
render() {
|
|
626
626
|
if (this.props.niceDag && this.props.node.ref) {
|
|
627
627
|
const l = this.props.niceDag.getElementByNodeId(this.props.node.id);
|
|
628
628
|
if (l)
|
|
629
|
-
return
|
|
629
|
+
return ie.createPortal(/* @__PURE__ */ I(se, {
|
|
630
630
|
children: this.props.render(this.props)
|
|
631
631
|
}), l);
|
|
632
632
|
}
|
|
633
633
|
return null;
|
|
634
634
|
}
|
|
635
635
|
}
|
|
636
|
-
class Er extends
|
|
636
|
+
class Er extends M.Component {
|
|
637
637
|
render() {
|
|
638
|
-
return this.props.niceDag && this.props.edge.ref ?
|
|
638
|
+
return this.props.niceDag && this.props.edge.ref ? ie.createPortal(/* @__PURE__ */ I(se, {
|
|
639
639
|
children: this.props.render(this.props)
|
|
640
640
|
}), this.props.edge.ref) : null;
|
|
641
641
|
}
|
|
642
642
|
}
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
643
|
+
class Rr extends M.Component {
|
|
644
|
+
render() {
|
|
645
|
+
if (this.props.niceDag) {
|
|
646
|
+
const l = this.props.niceDag.getRootContentElement();
|
|
647
|
+
return ie.createPortal(/* @__PURE__ */ I(se, {
|
|
648
|
+
children: this.props.render(this.props.niceDag)
|
|
649
|
+
}), l);
|
|
650
|
+
}
|
|
651
|
+
return null;
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
function Tr(s) {
|
|
655
|
+
const l = A(() => {
|
|
656
|
+
s.remove();
|
|
657
|
+
}, [s]), T = A((m, y = 40) => {
|
|
658
|
+
s.insertNodes(m, y);
|
|
659
|
+
}, [s]);
|
|
649
660
|
return {
|
|
650
661
|
onEdgeRemove: l,
|
|
651
662
|
onNodeInsert: T
|
|
652
663
|
};
|
|
653
664
|
}
|
|
654
|
-
function
|
|
655
|
-
node:
|
|
665
|
+
function Pr({
|
|
666
|
+
node: s,
|
|
656
667
|
niceDag: l
|
|
657
668
|
}) {
|
|
658
|
-
const T =
|
|
659
|
-
|
|
660
|
-
}, [
|
|
661
|
-
l.startEdgeDragging(
|
|
662
|
-
}, [l,
|
|
663
|
-
l.startNodeDragging(
|
|
664
|
-
}, [l,
|
|
669
|
+
const T = A(() => {
|
|
670
|
+
s.remove();
|
|
671
|
+
}, [s]), m = A((P) => {
|
|
672
|
+
l.startEdgeDragging(s, P);
|
|
673
|
+
}, [l, s]), y = A((P) => {
|
|
674
|
+
l.startNodeDragging(s, P);
|
|
675
|
+
}, [l, s]);
|
|
665
676
|
return {
|
|
666
677
|
onNodeRemove: T,
|
|
667
|
-
startEdgeDragging:
|
|
668
|
-
startNodeDragging:
|
|
678
|
+
startEdgeDragging: m,
|
|
679
|
+
startNodeDragging: y
|
|
669
680
|
};
|
|
670
681
|
}
|
|
671
|
-
function br(
|
|
682
|
+
function br(s) {
|
|
672
683
|
const {
|
|
673
684
|
initNodes: l
|
|
674
|
-
} =
|
|
685
|
+
} = s;
|
|
675
686
|
if (!l)
|
|
676
687
|
throw new Error("initNodes can't be undefined!");
|
|
677
688
|
}
|
|
678
|
-
function
|
|
679
|
-
br(
|
|
689
|
+
function wr(s) {
|
|
690
|
+
br(s);
|
|
680
691
|
const {
|
|
681
692
|
onMount: l,
|
|
682
693
|
renderNode: T,
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
694
|
+
renderRootView: m,
|
|
695
|
+
renderEdge: y,
|
|
696
|
+
scrollPosition: P,
|
|
697
|
+
initNodes: _,
|
|
698
|
+
minimapConfig: w,
|
|
699
|
+
...p
|
|
700
|
+
} = s, O = K(null), g = K(null), u = K(null), C = K(), [R, D] = dr(0), H = A(() => {
|
|
701
|
+
u.current && u.current.destory();
|
|
702
|
+
}, [D]), U = vr(() => ({
|
|
691
703
|
onChange: () => {
|
|
692
|
-
|
|
693
|
-
}
|
|
694
|
-
}), [
|
|
695
|
-
return
|
|
696
|
-
if (
|
|
697
|
-
if (!
|
|
698
|
-
const
|
|
699
|
-
container:
|
|
700
|
-
minimapContainer:
|
|
701
|
-
minimapConfig:
|
|
702
|
-
...
|
|
703
|
-
},
|
|
704
|
-
|
|
704
|
+
D(R + 1);
|
|
705
|
+
}
|
|
706
|
+
}), [D, R]);
|
|
707
|
+
return Ne(() => {
|
|
708
|
+
if (C.current !== _) {
|
|
709
|
+
if (!u.current) {
|
|
710
|
+
const E = pr.init({
|
|
711
|
+
container: O.current,
|
|
712
|
+
minimapContainer: g.current,
|
|
713
|
+
minimapConfig: w,
|
|
714
|
+
...p
|
|
715
|
+
}, s.editable);
|
|
716
|
+
u.current = E;
|
|
705
717
|
}
|
|
706
|
-
|
|
718
|
+
u.current.withNodes(_).render(), D(R + 1), C.current = _, l && l();
|
|
707
719
|
}
|
|
708
|
-
return
|
|
709
|
-
|
|
720
|
+
return u.current.addNiceDagChangeListener(U), () => {
|
|
721
|
+
u.current.removeNiceDagChangeListener(U);
|
|
710
722
|
};
|
|
711
|
-
}, [
|
|
712
|
-
|
|
723
|
+
}, [_, D, R, l]), Ne(() => (u.current && u.current.isDestoried && (u.current.withNodes(_).render(), D(R + 1)), () => {
|
|
724
|
+
u.current && u.current.destory();
|
|
713
725
|
}), []), {
|
|
714
|
-
niceDag:
|
|
715
|
-
niceDagEl:
|
|
716
|
-
minimapEl:
|
|
726
|
+
niceDag: u.current,
|
|
727
|
+
niceDagEl: O,
|
|
728
|
+
minimapEl: g,
|
|
717
729
|
render: () => {
|
|
718
|
-
if (
|
|
719
|
-
const
|
|
720
|
-
let
|
|
730
|
+
if (u.current) {
|
|
731
|
+
const E = u.current.getAllNodes();
|
|
732
|
+
let f = (E == null ? void 0 : E.length) > 0 ? E.map((S) => /* @__PURE__ */ I(mr, {
|
|
721
733
|
render: T,
|
|
722
|
-
node:
|
|
723
|
-
niceDag:
|
|
724
|
-
patchVersion:
|
|
725
|
-
},
|
|
726
|
-
if (
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
+
node: S,
|
|
735
|
+
niceDag: u.current,
|
|
736
|
+
patchVersion: R
|
|
737
|
+
}, S.id)) : null;
|
|
738
|
+
if (m && (f = [...f, /* @__PURE__ */ I(Rr, {
|
|
739
|
+
niceDag: u.current,
|
|
740
|
+
render: m
|
|
741
|
+
})]), y) {
|
|
742
|
+
const S = u.current.getAllEdges(), X = (S == null ? void 0 : S.length) > 0 ? S.map(($) => /* @__PURE__ */ I(Er, {
|
|
743
|
+
render: y,
|
|
744
|
+
edge: $,
|
|
745
|
+
patchVersion: R,
|
|
746
|
+
niceDag: u.current
|
|
747
|
+
}, `edge-${$.source.id}-${$.target.id}`)) : [];
|
|
748
|
+
f = [...f, ...X];
|
|
734
749
|
}
|
|
735
|
-
return
|
|
750
|
+
return f;
|
|
736
751
|
}
|
|
737
752
|
return null;
|
|
738
753
|
},
|
|
739
|
-
reset:
|
|
754
|
+
reset: H
|
|
740
755
|
};
|
|
741
756
|
}
|
|
742
757
|
export {
|
|
743
758
|
Er as NiceDagEdge,
|
|
744
759
|
mr as NiceDagNode,
|
|
745
|
-
|
|
760
|
+
wr as useNiceDag,
|
|
746
761
|
Tr as useNiceDagEdge,
|
|
747
|
-
|
|
762
|
+
Pr as useNiceDagNode
|
|
748
763
|
};
|