@topol.io/editor-react 0.0.0-alfa.2 → 0.0.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.
|
@@ -1,33 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
var
|
|
3
|
-
/**
|
|
4
|
-
* @license React
|
|
5
|
-
* react-jsx-runtime.production.min.js
|
|
6
|
-
*
|
|
7
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the MIT license found in the
|
|
10
|
-
* LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/
|
|
12
|
-
var _e;
|
|
13
|
-
function sr() {
|
|
14
|
-
if (_e)
|
|
15
|
-
return D;
|
|
16
|
-
_e = 1;
|
|
17
|
-
var t = Se, u = Symbol.for("react.element"), g = Symbol.for("react.fragment"), l = Object.prototype.hasOwnProperty, f = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, m = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
18
|
-
function j(T, h, O) {
|
|
19
|
-
var E, R = {}, P = null, $ = null;
|
|
20
|
-
O !== void 0 && (P = "" + O), h.key !== void 0 && (P = "" + h.key), h.ref !== void 0 && ($ = h.ref);
|
|
21
|
-
for (E in h)
|
|
22
|
-
l.call(h, E) && !m.hasOwnProperty(E) && (R[E] = h[E]);
|
|
23
|
-
if (T && T.defaultProps)
|
|
24
|
-
for (E in h = T.defaultProps, h)
|
|
25
|
-
R[E] === void 0 && (R[E] = h[E]);
|
|
26
|
-
return { $$typeof: u, type: T, key: P, ref: $, props: R, _owner: f.current };
|
|
27
|
-
}
|
|
28
|
-
return D.Fragment = g, D.jsx = j, D.jsxs = j, D;
|
|
29
|
-
}
|
|
30
|
-
var I = {};
|
|
1
|
+
import Ce, { useEffect as cr } from "react";
|
|
2
|
+
var Z = { exports: {} }, D = {};
|
|
31
3
|
/**
|
|
32
4
|
* @license React
|
|
33
5
|
* react-jsx-runtime.development.js
|
|
@@ -37,14 +9,14 @@ var I = {};
|
|
|
37
9
|
* This source code is licensed under the MIT license found in the
|
|
38
10
|
* LICENSE file in the root directory of this source tree.
|
|
39
11
|
*/
|
|
40
|
-
var
|
|
41
|
-
function
|
|
42
|
-
return
|
|
43
|
-
var t =
|
|
44
|
-
function
|
|
12
|
+
var Te;
|
|
13
|
+
function fr() {
|
|
14
|
+
return Te || (Te = 1, process.env.NODE_ENV !== "production" && function() {
|
|
15
|
+
var t = Ce, u = Symbol.for("react.element"), g = Symbol.for("react.portal"), l = Symbol.for("react.fragment"), f = Symbol.for("react.strict_mode"), m = Symbol.for("react.profiler"), j = Symbol.for("react.provider"), T = Symbol.for("react.context"), h = Symbol.for("react.forward_ref"), O = Symbol.for("react.suspense"), E = Symbol.for("react.suspense_list"), R = Symbol.for("react.memo"), P = Symbol.for("react.lazy"), $ = Symbol.for("react.offscreen"), Q = Symbol.iterator, ke = "@@iterator";
|
|
16
|
+
function xe(e) {
|
|
45
17
|
if (e === null || typeof e != "object")
|
|
46
18
|
return null;
|
|
47
|
-
var r =
|
|
19
|
+
var r = Q && e[Q] || e[ke];
|
|
48
20
|
return typeof r == "function" ? r : null;
|
|
49
21
|
}
|
|
50
22
|
var C = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
@@ -52,10 +24,10 @@ function cr() {
|
|
|
52
24
|
{
|
|
53
25
|
for (var r = arguments.length, n = new Array(r > 1 ? r - 1 : 0), a = 1; a < r; a++)
|
|
54
26
|
n[a - 1] = arguments[a];
|
|
55
|
-
|
|
27
|
+
je("error", e, n);
|
|
56
28
|
}
|
|
57
29
|
}
|
|
58
|
-
function
|
|
30
|
+
function je(e, r, n) {
|
|
59
31
|
{
|
|
60
32
|
var a = C.ReactDebugCurrentFrame, s = a.getStackAddendum();
|
|
61
33
|
s !== "" && (r += "%s", n = n.concat([s]));
|
|
@@ -65,23 +37,23 @@ function cr() {
|
|
|
65
37
|
c.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, c);
|
|
66
38
|
}
|
|
67
39
|
}
|
|
68
|
-
var
|
|
69
|
-
|
|
70
|
-
function
|
|
71
|
-
return !!(typeof e == "string" || typeof e == "function" || e === l || e === m ||
|
|
40
|
+
var Ae = !1, Fe = !1, De = !1, Ie = !1, $e = !1, ee;
|
|
41
|
+
ee = Symbol.for("react.module.reference");
|
|
42
|
+
function We(e) {
|
|
43
|
+
return !!(typeof e == "string" || typeof e == "function" || e === l || e === m || $e || e === f || e === O || e === E || Ie || e === $ || Ae || Fe || De || typeof e == "object" && e !== null && (e.$$typeof === P || e.$$typeof === R || e.$$typeof === j || e.$$typeof === T || e.$$typeof === h || // This needs to include all possible module reference object
|
|
72
44
|
// types supported by any Flight configuration anywhere since
|
|
73
45
|
// we don't know which Flight build this will end up being used
|
|
74
46
|
// with.
|
|
75
|
-
e.$$typeof ===
|
|
47
|
+
e.$$typeof === ee || e.getModuleId !== void 0));
|
|
76
48
|
}
|
|
77
|
-
function
|
|
49
|
+
function Be(e, r, n) {
|
|
78
50
|
var a = e.displayName;
|
|
79
51
|
if (a)
|
|
80
52
|
return a;
|
|
81
53
|
var s = r.displayName || r.name || "";
|
|
82
54
|
return s !== "" ? n + "(" + s + ")" : n;
|
|
83
55
|
}
|
|
84
|
-
function
|
|
56
|
+
function re(e) {
|
|
85
57
|
return e.displayName || "Context";
|
|
86
58
|
}
|
|
87
59
|
function _(e) {
|
|
@@ -109,12 +81,12 @@ function cr() {
|
|
|
109
81
|
switch (e.$$typeof) {
|
|
110
82
|
case T:
|
|
111
83
|
var r = e;
|
|
112
|
-
return
|
|
84
|
+
return re(r) + ".Consumer";
|
|
113
85
|
case j:
|
|
114
86
|
var n = e;
|
|
115
|
-
return
|
|
87
|
+
return re(n._context) + ".Provider";
|
|
116
88
|
case h:
|
|
117
|
-
return
|
|
89
|
+
return Be(e, e.render, "ForwardRef");
|
|
118
90
|
case R:
|
|
119
91
|
var a = e.displayName || null;
|
|
120
92
|
return a !== null ? a : _(e.type) || "Memo";
|
|
@@ -129,18 +101,18 @@ function cr() {
|
|
|
129
101
|
}
|
|
130
102
|
return null;
|
|
131
103
|
}
|
|
132
|
-
var S = Object.assign, A = 0,
|
|
133
|
-
function
|
|
104
|
+
var S = Object.assign, A = 0, ne, te, ae, oe, ie, ue, le;
|
|
105
|
+
function se() {
|
|
134
106
|
}
|
|
135
|
-
|
|
136
|
-
function
|
|
107
|
+
se.__reactDisabledLog = !0;
|
|
108
|
+
function Le() {
|
|
137
109
|
{
|
|
138
110
|
if (A === 0) {
|
|
139
|
-
|
|
111
|
+
ne = console.log, te = console.info, ae = console.warn, oe = console.error, ie = console.group, ue = console.groupCollapsed, le = console.groupEnd;
|
|
140
112
|
var e = {
|
|
141
113
|
configurable: !0,
|
|
142
114
|
enumerable: !0,
|
|
143
|
-
value:
|
|
115
|
+
value: se,
|
|
144
116
|
writable: !0
|
|
145
117
|
};
|
|
146
118
|
Object.defineProperties(console, {
|
|
@@ -156,7 +128,7 @@ function cr() {
|
|
|
156
128
|
A++;
|
|
157
129
|
}
|
|
158
130
|
}
|
|
159
|
-
function
|
|
131
|
+
function Me() {
|
|
160
132
|
{
|
|
161
133
|
if (A--, A === 0) {
|
|
162
134
|
var e = {
|
|
@@ -166,25 +138,25 @@ function cr() {
|
|
|
166
138
|
};
|
|
167
139
|
Object.defineProperties(console, {
|
|
168
140
|
log: S({}, e, {
|
|
169
|
-
value:
|
|
141
|
+
value: ne
|
|
170
142
|
}),
|
|
171
143
|
info: S({}, e, {
|
|
172
|
-
value:
|
|
144
|
+
value: te
|
|
173
145
|
}),
|
|
174
146
|
warn: S({}, e, {
|
|
175
|
-
value:
|
|
147
|
+
value: ae
|
|
176
148
|
}),
|
|
177
149
|
error: S({}, e, {
|
|
178
|
-
value:
|
|
150
|
+
value: oe
|
|
179
151
|
}),
|
|
180
152
|
group: S({}, e, {
|
|
181
|
-
value:
|
|
153
|
+
value: ie
|
|
182
154
|
}),
|
|
183
155
|
groupCollapsed: S({}, e, {
|
|
184
|
-
value:
|
|
156
|
+
value: ue
|
|
185
157
|
}),
|
|
186
158
|
groupEnd: S({}, e, {
|
|
187
|
-
value:
|
|
159
|
+
value: le
|
|
188
160
|
})
|
|
189
161
|
});
|
|
190
162
|
}
|
|
@@ -207,10 +179,10 @@ function cr() {
|
|
|
207
179
|
}
|
|
208
180
|
var V = !1, B;
|
|
209
181
|
{
|
|
210
|
-
var
|
|
211
|
-
B = new
|
|
182
|
+
var Ye = typeof WeakMap == "function" ? WeakMap : Map;
|
|
183
|
+
B = new Ye();
|
|
212
184
|
}
|
|
213
|
-
function
|
|
185
|
+
function ce(e, r) {
|
|
214
186
|
if (!e || V)
|
|
215
187
|
return "";
|
|
216
188
|
{
|
|
@@ -223,7 +195,7 @@ function cr() {
|
|
|
223
195
|
var s = Error.prepareStackTrace;
|
|
224
196
|
Error.prepareStackTrace = void 0;
|
|
225
197
|
var c;
|
|
226
|
-
c = N.current, N.current = null,
|
|
198
|
+
c = N.current, N.current = null, Le();
|
|
227
199
|
try {
|
|
228
200
|
if (r) {
|
|
229
201
|
var i = function() {
|
|
@@ -276,23 +248,23 @@ function cr() {
|
|
|
276
248
|
}
|
|
277
249
|
}
|
|
278
250
|
} finally {
|
|
279
|
-
V = !1, N.current = c,
|
|
251
|
+
V = !1, N.current = c, Me(), Error.prepareStackTrace = s;
|
|
280
252
|
}
|
|
281
|
-
var x = e ? e.displayName || e.name : "",
|
|
282
|
-
return typeof e == "function" && B.set(e,
|
|
253
|
+
var x = e ? e.displayName || e.name : "", we = x ? W(x) : "";
|
|
254
|
+
return typeof e == "function" && B.set(e, we), we;
|
|
283
255
|
}
|
|
284
|
-
function
|
|
285
|
-
return
|
|
256
|
+
function Ne(e, r, n) {
|
|
257
|
+
return ce(e, !1);
|
|
286
258
|
}
|
|
287
|
-
function
|
|
259
|
+
function Ue(e) {
|
|
288
260
|
var r = e.prototype;
|
|
289
261
|
return !!(r && r.isReactComponent);
|
|
290
262
|
}
|
|
291
|
-
function
|
|
263
|
+
function L(e, r, n) {
|
|
292
264
|
if (e == null)
|
|
293
265
|
return "";
|
|
294
266
|
if (typeof e == "function")
|
|
295
|
-
return
|
|
267
|
+
return ce(e, Ue(e));
|
|
296
268
|
if (typeof e == "string")
|
|
297
269
|
return W(e);
|
|
298
270
|
switch (e) {
|
|
@@ -304,30 +276,30 @@ function cr() {
|
|
|
304
276
|
if (typeof e == "object")
|
|
305
277
|
switch (e.$$typeof) {
|
|
306
278
|
case h:
|
|
307
|
-
return
|
|
279
|
+
return Ne(e.render);
|
|
308
280
|
case R:
|
|
309
|
-
return
|
|
281
|
+
return L(e.type, r, n);
|
|
310
282
|
case P: {
|
|
311
283
|
var a = e, s = a._payload, c = a._init;
|
|
312
284
|
try {
|
|
313
|
-
return
|
|
285
|
+
return L(c(s), r, n);
|
|
314
286
|
} catch {
|
|
315
287
|
}
|
|
316
288
|
}
|
|
317
289
|
}
|
|
318
290
|
return "";
|
|
319
291
|
}
|
|
320
|
-
var
|
|
321
|
-
function
|
|
292
|
+
var M = Object.prototype.hasOwnProperty, fe = {}, de = C.ReactDebugCurrentFrame;
|
|
293
|
+
function Y(e) {
|
|
322
294
|
if (e) {
|
|
323
|
-
var r = e._owner, n =
|
|
324
|
-
|
|
295
|
+
var r = e._owner, n = L(e.type, e._source, r ? r.type : null);
|
|
296
|
+
de.setExtraStackFrame(n);
|
|
325
297
|
} else
|
|
326
|
-
|
|
298
|
+
de.setExtraStackFrame(null);
|
|
327
299
|
}
|
|
328
|
-
function
|
|
300
|
+
function Ve(e, r, n, a, s) {
|
|
329
301
|
{
|
|
330
|
-
var c = Function.call.bind(
|
|
302
|
+
var c = Function.call.bind(M);
|
|
331
303
|
for (var i in e)
|
|
332
304
|
if (c(e, i)) {
|
|
333
305
|
var o = void 0;
|
|
@@ -340,67 +312,67 @@ function cr() {
|
|
|
340
312
|
} catch (d) {
|
|
341
313
|
o = d;
|
|
342
314
|
}
|
|
343
|
-
o && !(o instanceof Error) && (
|
|
315
|
+
o && !(o instanceof Error) && (Y(s), p("%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).", a || "React class", n, i, typeof o), Y(null)), o instanceof Error && !(o.message in fe) && (fe[o.message] = !0, Y(s), p("Failed %s type: %s", n, o.message), Y(null));
|
|
344
316
|
}
|
|
345
317
|
}
|
|
346
318
|
}
|
|
347
|
-
var
|
|
319
|
+
var ze = Array.isArray;
|
|
348
320
|
function z(e) {
|
|
349
|
-
return
|
|
321
|
+
return ze(e);
|
|
350
322
|
}
|
|
351
|
-
function
|
|
323
|
+
function qe(e) {
|
|
352
324
|
{
|
|
353
325
|
var r = typeof Symbol == "function" && Symbol.toStringTag, n = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
354
326
|
return n;
|
|
355
327
|
}
|
|
356
328
|
}
|
|
357
|
-
function
|
|
329
|
+
function Je(e) {
|
|
358
330
|
try {
|
|
359
|
-
return
|
|
331
|
+
return ve(e), !1;
|
|
360
332
|
} catch {
|
|
361
333
|
return !0;
|
|
362
334
|
}
|
|
363
335
|
}
|
|
364
|
-
function
|
|
336
|
+
function ve(e) {
|
|
365
337
|
return "" + e;
|
|
366
338
|
}
|
|
367
|
-
function
|
|
368
|
-
if (
|
|
369
|
-
return p("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",
|
|
339
|
+
function ge(e) {
|
|
340
|
+
if (Je(e))
|
|
341
|
+
return p("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", qe(e)), ve(e);
|
|
370
342
|
}
|
|
371
|
-
var F = C.ReactCurrentOwner,
|
|
343
|
+
var F = C.ReactCurrentOwner, Ge = {
|
|
372
344
|
key: !0,
|
|
373
345
|
ref: !0,
|
|
374
346
|
__self: !0,
|
|
375
347
|
__source: !0
|
|
376
|
-
},
|
|
348
|
+
}, he, pe, q;
|
|
377
349
|
q = {};
|
|
378
|
-
function
|
|
379
|
-
if (
|
|
350
|
+
function He(e) {
|
|
351
|
+
if (M.call(e, "ref")) {
|
|
380
352
|
var r = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
381
353
|
if (r && r.isReactWarning)
|
|
382
354
|
return !1;
|
|
383
355
|
}
|
|
384
356
|
return e.ref !== void 0;
|
|
385
357
|
}
|
|
386
|
-
function
|
|
387
|
-
if (
|
|
358
|
+
function Ke(e) {
|
|
359
|
+
if (M.call(e, "key")) {
|
|
388
360
|
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
389
361
|
if (r && r.isReactWarning)
|
|
390
362
|
return !1;
|
|
391
363
|
}
|
|
392
364
|
return e.key !== void 0;
|
|
393
365
|
}
|
|
394
|
-
function
|
|
366
|
+
function Xe(e, r) {
|
|
395
367
|
if (typeof e.ref == "string" && F.current && r && F.current.stateNode !== r) {
|
|
396
368
|
var n = _(F.current.type);
|
|
397
369
|
q[n] || (p('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', _(F.current.type), e.ref), q[n] = !0);
|
|
398
370
|
}
|
|
399
371
|
}
|
|
400
|
-
function
|
|
372
|
+
function Ze(e, r) {
|
|
401
373
|
{
|
|
402
374
|
var n = function() {
|
|
403
|
-
|
|
375
|
+
he || (he = !0, p("%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));
|
|
404
376
|
};
|
|
405
377
|
n.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
406
378
|
get: n,
|
|
@@ -408,10 +380,10 @@ function cr() {
|
|
|
408
380
|
});
|
|
409
381
|
}
|
|
410
382
|
}
|
|
411
|
-
function
|
|
383
|
+
function Qe(e, r) {
|
|
412
384
|
{
|
|
413
385
|
var n = function() {
|
|
414
|
-
|
|
386
|
+
pe || (pe = !0, p("%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));
|
|
415
387
|
};
|
|
416
388
|
n.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
417
389
|
get: n,
|
|
@@ -419,7 +391,7 @@ function cr() {
|
|
|
419
391
|
});
|
|
420
392
|
}
|
|
421
393
|
}
|
|
422
|
-
var
|
|
394
|
+
var er = function(e, r, n, a, s, c, i) {
|
|
423
395
|
var o = {
|
|
424
396
|
// This tag allows us to uniquely identify this as a React Element
|
|
425
397
|
$$typeof: u,
|
|
@@ -448,12 +420,12 @@ function cr() {
|
|
|
448
420
|
value: s
|
|
449
421
|
}), Object.freeze && (Object.freeze(o.props), Object.freeze(o)), o;
|
|
450
422
|
};
|
|
451
|
-
function
|
|
423
|
+
function rr(e, r, n, a, s) {
|
|
452
424
|
{
|
|
453
425
|
var c, i = {}, o = null, y = null;
|
|
454
|
-
n !== void 0 && (
|
|
426
|
+
n !== void 0 && (ge(n), o = "" + n), Ke(r) && (ge(r.key), o = "" + r.key), He(r) && (y = r.ref, Xe(r, s));
|
|
455
427
|
for (c in r)
|
|
456
|
-
|
|
428
|
+
M.call(r, c) && !Ge.hasOwnProperty(c) && (i[c] = r[c]);
|
|
457
429
|
if (e && e.defaultProps) {
|
|
458
430
|
var d = e.defaultProps;
|
|
459
431
|
for (c in d)
|
|
@@ -461,25 +433,25 @@ function cr() {
|
|
|
461
433
|
}
|
|
462
434
|
if (o || y) {
|
|
463
435
|
var v = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
464
|
-
o &&
|
|
436
|
+
o && Ze(i, v), y && Qe(i, v);
|
|
465
437
|
}
|
|
466
|
-
return
|
|
438
|
+
return er(e, o, y, s, a, F.current, i);
|
|
467
439
|
}
|
|
468
440
|
}
|
|
469
|
-
var J = C.ReactCurrentOwner,
|
|
441
|
+
var J = C.ReactCurrentOwner, ye = C.ReactDebugCurrentFrame;
|
|
470
442
|
function k(e) {
|
|
471
443
|
if (e) {
|
|
472
|
-
var r = e._owner, n =
|
|
473
|
-
|
|
444
|
+
var r = e._owner, n = L(e.type, e._source, r ? r.type : null);
|
|
445
|
+
ye.setExtraStackFrame(n);
|
|
474
446
|
} else
|
|
475
|
-
|
|
447
|
+
ye.setExtraStackFrame(null);
|
|
476
448
|
}
|
|
477
449
|
var G;
|
|
478
450
|
G = !1;
|
|
479
451
|
function H(e) {
|
|
480
452
|
return typeof e == "object" && e !== null && e.$$typeof === u;
|
|
481
453
|
}
|
|
482
|
-
function
|
|
454
|
+
function Ee() {
|
|
483
455
|
{
|
|
484
456
|
if (J.current) {
|
|
485
457
|
var e = _(J.current.type);
|
|
@@ -491,7 +463,7 @@ Check the render method of \`` + e + "`.";
|
|
|
491
463
|
return "";
|
|
492
464
|
}
|
|
493
465
|
}
|
|
494
|
-
function
|
|
466
|
+
function nr(e) {
|
|
495
467
|
{
|
|
496
468
|
if (e !== void 0) {
|
|
497
469
|
var r = e.fileName.replace(/^.*[\\\/]/, ""), n = e.lineNumber;
|
|
@@ -502,10 +474,10 @@ Check your code at ` + r + ":" + n + ".";
|
|
|
502
474
|
return "";
|
|
503
475
|
}
|
|
504
476
|
}
|
|
505
|
-
var
|
|
506
|
-
function
|
|
477
|
+
var be = {};
|
|
478
|
+
function tr(e) {
|
|
507
479
|
{
|
|
508
|
-
var r =
|
|
480
|
+
var r = Ee();
|
|
509
481
|
if (!r) {
|
|
510
482
|
var n = typeof e == "string" ? e : e.displayName || e.name;
|
|
511
483
|
n && (r = `
|
|
@@ -515,39 +487,39 @@ Check the top-level render call using <` + n + ">.");
|
|
|
515
487
|
return r;
|
|
516
488
|
}
|
|
517
489
|
}
|
|
518
|
-
function
|
|
490
|
+
function me(e, r) {
|
|
519
491
|
{
|
|
520
492
|
if (!e._store || e._store.validated || e.key != null)
|
|
521
493
|
return;
|
|
522
494
|
e._store.validated = !0;
|
|
523
|
-
var n =
|
|
524
|
-
if (
|
|
495
|
+
var n = tr(r);
|
|
496
|
+
if (be[n])
|
|
525
497
|
return;
|
|
526
|
-
|
|
498
|
+
be[n] = !0;
|
|
527
499
|
var a = "";
|
|
528
500
|
e && e._owner && e._owner !== J.current && (a = " It was passed a child from " + _(e._owner.type) + "."), k(e), p('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', n, a), k(null);
|
|
529
501
|
}
|
|
530
502
|
}
|
|
531
|
-
function
|
|
503
|
+
function Re(e, r) {
|
|
532
504
|
{
|
|
533
505
|
if (typeof e != "object")
|
|
534
506
|
return;
|
|
535
507
|
if (z(e))
|
|
536
508
|
for (var n = 0; n < e.length; n++) {
|
|
537
509
|
var a = e[n];
|
|
538
|
-
H(a) &&
|
|
510
|
+
H(a) && me(a, r);
|
|
539
511
|
}
|
|
540
512
|
else if (H(e))
|
|
541
513
|
e._store && (e._store.validated = !0);
|
|
542
514
|
else if (e) {
|
|
543
|
-
var s =
|
|
515
|
+
var s = xe(e);
|
|
544
516
|
if (typeof s == "function" && s !== e.entries)
|
|
545
517
|
for (var c = s.call(e), i; !(i = c.next()).done; )
|
|
546
|
-
H(i.value) &&
|
|
518
|
+
H(i.value) && me(i.value, r);
|
|
547
519
|
}
|
|
548
520
|
}
|
|
549
521
|
}
|
|
550
|
-
function
|
|
522
|
+
function ar(e) {
|
|
551
523
|
{
|
|
552
524
|
var r = e.type;
|
|
553
525
|
if (r == null || typeof r == "string")
|
|
@@ -563,7 +535,7 @@ Check the top-level render call using <` + n + ">.");
|
|
|
563
535
|
return;
|
|
564
536
|
if (n) {
|
|
565
537
|
var a = _(r);
|
|
566
|
-
|
|
538
|
+
Ve(n, e.props, "prop", a, e);
|
|
567
539
|
} else if (r.PropTypes !== void 0 && !G) {
|
|
568
540
|
G = !0;
|
|
569
541
|
var s = _(r);
|
|
@@ -572,7 +544,7 @@ Check the top-level render call using <` + n + ">.");
|
|
|
572
544
|
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && p("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
573
545
|
}
|
|
574
546
|
}
|
|
575
|
-
function
|
|
547
|
+
function or(e) {
|
|
576
548
|
{
|
|
577
549
|
for (var r = Object.keys(e.props), n = 0; n < r.length; n++) {
|
|
578
550
|
var a = r[n];
|
|
@@ -584,18 +556,18 @@ Check the top-level render call using <` + n + ">.");
|
|
|
584
556
|
e.ref !== null && (k(e), p("Invalid attribute `ref` supplied to `React.Fragment`."), k(null));
|
|
585
557
|
}
|
|
586
558
|
}
|
|
587
|
-
function
|
|
559
|
+
function _e(e, r, n, a, s, c) {
|
|
588
560
|
{
|
|
589
|
-
var i =
|
|
561
|
+
var i = We(e);
|
|
590
562
|
if (!i) {
|
|
591
563
|
var o = "";
|
|
592
564
|
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (o += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
593
|
-
var y =
|
|
594
|
-
y ? o += y : o +=
|
|
565
|
+
var y = nr(s);
|
|
566
|
+
y ? o += y : o += Ee();
|
|
595
567
|
var d;
|
|
596
568
|
e === null ? d = "null" : z(e) ? d = "array" : e !== void 0 && e.$$typeof === u ? (d = "<" + (_(e.type) || "Unknown") + " />", o = " Did you accidentally export a JSX literal instead of a component?") : d = typeof e, p("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", d, o);
|
|
597
569
|
}
|
|
598
|
-
var v =
|
|
570
|
+
var v = rr(e, r, n, s, c);
|
|
599
571
|
if (v == null)
|
|
600
572
|
return v;
|
|
601
573
|
if (i) {
|
|
@@ -604,69 +576,97 @@ Check the top-level render call using <` + n + ">.");
|
|
|
604
576
|
if (a)
|
|
605
577
|
if (z(b)) {
|
|
606
578
|
for (var x = 0; x < b.length; x++)
|
|
607
|
-
|
|
579
|
+
Re(b[x], e);
|
|
608
580
|
Object.freeze && Object.freeze(b);
|
|
609
581
|
} else
|
|
610
582
|
p("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
611
583
|
else
|
|
612
|
-
|
|
584
|
+
Re(b, e);
|
|
613
585
|
}
|
|
614
|
-
return e === l ?
|
|
586
|
+
return e === l ? or(v) : ar(v), v;
|
|
615
587
|
}
|
|
616
588
|
}
|
|
617
|
-
function
|
|
618
|
-
return
|
|
589
|
+
function ir(e, r, n) {
|
|
590
|
+
return _e(e, r, n, !0);
|
|
619
591
|
}
|
|
620
|
-
function
|
|
621
|
-
return
|
|
592
|
+
function ur(e, r, n) {
|
|
593
|
+
return _e(e, r, n, !1);
|
|
622
594
|
}
|
|
623
|
-
var
|
|
624
|
-
|
|
625
|
-
}()),
|
|
595
|
+
var lr = ur, sr = ir;
|
|
596
|
+
D.Fragment = l, D.jsx = lr, D.jsxs = sr;
|
|
597
|
+
}()), D;
|
|
626
598
|
}
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
599
|
+
var I = {};
|
|
600
|
+
/**
|
|
601
|
+
* @license React
|
|
602
|
+
* react-jsx-runtime.production.min.js
|
|
603
|
+
*
|
|
604
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
605
|
+
*
|
|
606
|
+
* This source code is licensed under the MIT license found in the
|
|
607
|
+
* LICENSE file in the root directory of this source tree.
|
|
608
|
+
*/
|
|
609
|
+
var Pe;
|
|
610
|
+
function dr() {
|
|
611
|
+
if (Pe)
|
|
612
|
+
return I;
|
|
613
|
+
Pe = 1;
|
|
614
|
+
var t = Ce, u = Symbol.for("react.element"), g = Symbol.for("react.fragment"), l = Object.prototype.hasOwnProperty, f = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, m = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
615
|
+
function j(T, h, O) {
|
|
616
|
+
var E, R = {}, P = null, $ = null;
|
|
617
|
+
O !== void 0 && (P = "" + O), h.key !== void 0 && (P = "" + h.key), h.ref !== void 0 && ($ = h.ref);
|
|
618
|
+
for (E in h)
|
|
619
|
+
l.call(h, E) && !m.hasOwnProperty(E) && (R[E] = h[E]);
|
|
620
|
+
if (T && T.defaultProps)
|
|
621
|
+
for (E in h = T.defaultProps, h)
|
|
622
|
+
R[E] === void 0 && (R[E] = h[E]);
|
|
623
|
+
return { $$typeof: u, type: T, key: P, ref: $, props: R, _owner: f.current };
|
|
624
|
+
}
|
|
625
|
+
return I.Fragment = g, I.jsx = j, I.jsxs = j, I;
|
|
626
|
+
}
|
|
627
|
+
process.env.NODE_ENV === "production" ? Z.exports = dr() : Z.exports = fr();
|
|
628
|
+
var vr = Z.exports;
|
|
629
|
+
function gr(t) {
|
|
630
630
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
631
631
|
}
|
|
632
|
-
var
|
|
632
|
+
var hr = function(t, u, g) {
|
|
633
633
|
var l = document.head || document.getElementsByTagName("head")[0], f = document.createElement("script");
|
|
634
634
|
typeof u == "function" && (g = u, u = {}), u = u || {}, g = g || function() {
|
|
635
|
-
}, f.type = u.type || "text/javascript", f.charset = u.charset || "utf8", f.async = "async" in u ? !!u.async : !0, f.src = t, u.attrs &&
|
|
636
|
-
var m = "onload" in f ?
|
|
637
|
-
m(f, g), f.onload ||
|
|
635
|
+
}, f.type = u.type || "text/javascript", f.charset = u.charset || "utf8", f.async = "async" in u ? !!u.async : !0, f.src = t, u.attrs && pr(f, u.attrs), u.text && (f.text = "" + u.text);
|
|
636
|
+
var m = "onload" in f ? Se : yr;
|
|
637
|
+
m(f, g), f.onload || Se(f, g), l.appendChild(f);
|
|
638
638
|
};
|
|
639
|
-
function
|
|
639
|
+
function pr(t, u) {
|
|
640
640
|
for (var g in u)
|
|
641
641
|
t.setAttribute(g, u[g]);
|
|
642
642
|
}
|
|
643
|
-
function
|
|
643
|
+
function Se(t, u) {
|
|
644
644
|
t.onload = function() {
|
|
645
645
|
this.onerror = this.onload = null, u(null, t);
|
|
646
646
|
}, t.onerror = function() {
|
|
647
647
|
this.onerror = this.onload = null, u(new Error("Failed to load " + this.src), t);
|
|
648
648
|
};
|
|
649
649
|
}
|
|
650
|
-
function
|
|
650
|
+
function yr(t, u) {
|
|
651
651
|
t.onreadystatechange = function() {
|
|
652
652
|
this.readyState != "complete" && this.readyState != "loaded" || (this.onreadystatechange = null, u(null, t));
|
|
653
653
|
};
|
|
654
654
|
}
|
|
655
|
-
const
|
|
656
|
-
function
|
|
655
|
+
const Er = /* @__PURE__ */ gr(hr), br = "https://d5aoblv5p04cg.cloudfront.net/editor-3/loader/build.js", mr = "https://d5aoblv5p04cg.cloudfront.net/develop/loader/build.js", Rr = "https://d5aoblv5p04cg.cloudfront.net/staging/loader/build.js";
|
|
656
|
+
function _r(t = "production") {
|
|
657
657
|
switch (t) {
|
|
658
658
|
case "dev":
|
|
659
|
-
return
|
|
659
|
+
return mr;
|
|
660
660
|
case "staging":
|
|
661
|
-
return
|
|
661
|
+
return Rr;
|
|
662
662
|
default:
|
|
663
|
-
return
|
|
663
|
+
return br;
|
|
664
664
|
}
|
|
665
665
|
}
|
|
666
|
-
const
|
|
666
|
+
const Oe = {
|
|
667
667
|
init: (t, u) => new Promise((g, l) => {
|
|
668
|
-
const f =
|
|
669
|
-
|
|
668
|
+
const f = _r(u == null ? void 0 : u.stage);
|
|
669
|
+
Er(f, (m) => {
|
|
670
670
|
m !== null && l(m), window.TopolPlugin.init(t), g(!0);
|
|
671
671
|
});
|
|
672
672
|
}),
|
|
@@ -709,8 +709,9 @@ const Pe = {
|
|
|
709
709
|
destroy: () => {
|
|
710
710
|
window.TopolPlugin.destroy();
|
|
711
711
|
}
|
|
712
|
-
},
|
|
713
|
-
|
|
712
|
+
}, wr = "editor";
|
|
713
|
+
let K = !1, X = !1;
|
|
714
|
+
function Pr(t) {
|
|
714
715
|
const u = () => {
|
|
715
716
|
const g = {
|
|
716
717
|
onSave(l, f) {
|
|
@@ -738,7 +739,7 @@ function wr(t) {
|
|
|
738
739
|
t.onBlockEdit !== void 0 && t.onBlockEdit(l);
|
|
739
740
|
},
|
|
740
741
|
onInit() {
|
|
741
|
-
t.onInit !== void 0 && t.onInit();
|
|
742
|
+
t.onInit !== void 0 && t.onInit(), K = !1, X = !0;
|
|
742
743
|
},
|
|
743
744
|
onUndoChange(l) {
|
|
744
745
|
t.onUndoChange !== void 0 && t.onUndoChange(l);
|
|
@@ -753,16 +754,17 @@ function wr(t) {
|
|
|
753
754
|
t.onAlert !== void 0 && t.onAlert(l);
|
|
754
755
|
}
|
|
755
756
|
};
|
|
756
|
-
return { id: "#" +
|
|
757
|
+
return { id: "#" + wr, ...t.options, callbacks: { ...g } };
|
|
757
758
|
};
|
|
758
|
-
return
|
|
759
|
+
return cr(() => (K || (async () => {
|
|
760
|
+
K = !0;
|
|
759
761
|
const l = u();
|
|
760
|
-
await
|
|
762
|
+
await Oe.init(l, { stage: t.stage || "production" });
|
|
761
763
|
})(), () => {
|
|
762
|
-
|
|
763
|
-
}), []), /* @__PURE__ */
|
|
764
|
+
X && (Oe.destroy(), X = !1);
|
|
765
|
+
}), []), /* @__PURE__ */ vr.jsx("div", { id: "editor", style: { position: "absolute", height: "100vh", width: "100%" } });
|
|
764
766
|
}
|
|
765
767
|
export {
|
|
766
|
-
|
|
767
|
-
|
|
768
|
+
Oe as TopolPlugin,
|
|
769
|
+
Pr as default
|
|
768
770
|
};
|
|
@@ -1,12 +1,4 @@
|
|
|
1
1
|
(function(w,P){typeof exports=="object"&&typeof module<"u"?P(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],P):(w=typeof globalThis<"u"?globalThis:w||self,P(w["topol-editor-react"]={},w.React))})(this,function(w,P){"use strict";var $={exports:{}},F={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react-jsx-runtime.production.min.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var ee;function Ce(){if(ee)return F;ee=1;var t=P,u=Symbol.for("react.element"),g=Symbol.for("react.fragment"),l=Object.prototype.hasOwnProperty,f=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,m={key:!0,ref:!0,__self:!0,__source:!0};function I(S,h,k){var b,R={},O=null,B=null;k!==void 0&&(O=""+k),h.key!==void 0&&(O=""+h.key),h.ref!==void 0&&(B=h.ref);for(b in h)l.call(h,b)&&!m.hasOwnProperty(b)&&(R[b]=h[b]);if(S&&S.defaultProps)for(b in h=S.defaultProps,h)R[b]===void 0&&(R[b]=h[b]);return{$$typeof:u,type:S,key:O,ref:B,props:R,_owner:f.current}}return F.Fragment=g,F.jsx=I,F.jsxs=I,F}var D={};/**
|
|
10
2
|
* @license React
|
|
11
3
|
* react-jsx-runtime.development.js
|
|
12
4
|
*
|
|
@@ -14,14 +6,22 @@
|
|
|
14
6
|
*
|
|
15
7
|
* This source code is licensed under the MIT license found in the
|
|
16
8
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
18
|
-
`+
|
|
9
|
+
*/var ne;function je(){return ne||(ne=1,process.env.NODE_ENV!=="production"&&function(){var t=P,u=Symbol.for("react.element"),g=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),f=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),I=Symbol.for("react.provider"),S=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),k=Symbol.for("react.suspense"),b=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),B=Symbol.for("react.offscreen"),ae=Symbol.iterator,$e="@@iterator";function ze(e){if(e===null||typeof e!="object")return null;var r=ae&&e[ae]||e[$e];return typeof r=="function"?r:null}var j=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function p(e){{for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];Je("error",e,n)}}function Je(e,r,n){{var o=j.ReactDebugCurrentFrame,s=o.getStackAddendum();s!==""&&(r+="%s",n=n.concat([s]));var c=n.map(function(i){return String(i)});c.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,c)}}var qe=!1,Ge=!1,He=!1,Ke=!1,Xe=!1,ie;ie=Symbol.for("react.module.reference");function Ze(e){return!!(typeof e=="string"||typeof e=="function"||e===l||e===m||Xe||e===f||e===k||e===b||Ke||e===B||qe||Ge||He||typeof e=="object"&&e!==null&&(e.$$typeof===O||e.$$typeof===R||e.$$typeof===I||e.$$typeof===S||e.$$typeof===h||e.$$typeof===ie||e.getModuleId!==void 0))}function Qe(e,r,n){var o=e.displayName;if(o)return o;var s=r.displayName||r.name||"";return s!==""?n+"("+s+")":n}function ue(e){return e.displayName||"Context"}function _(e){if(e==null)return null;if(typeof e.tag=="number"&&p("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case l:return"Fragment";case g:return"Portal";case m:return"Profiler";case f:return"StrictMode";case k:return"Suspense";case b:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case S:var r=e;return ue(r)+".Consumer";case I:var n=e;return ue(n._context)+".Provider";case h:return Qe(e,e.render,"ForwardRef");case R:var o=e.displayName||null;return o!==null?o:_(e.type)||"Memo";case O:{var s=e,c=s._payload,i=s._init;try{return _(i(c))}catch{return null}}}return null}var C=Object.assign,M=0,le,se,ce,fe,de,ve,ge;function he(){}he.__reactDisabledLog=!0;function er(){{if(M===0){le=console.log,se=console.info,ce=console.warn,fe=console.error,de=console.group,ve=console.groupCollapsed,ge=console.groupEnd;var e={configurable:!0,enumerable:!0,value:he,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}M++}}function rr(){{if(M--,M===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:C({},e,{value:le}),info:C({},e,{value:se}),warn:C({},e,{value:ce}),error:C({},e,{value:fe}),group:C({},e,{value:de}),groupCollapsed:C({},e,{value:ve}),groupEnd:C({},e,{value:ge})})}M<0&&p("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var G=j.ReactCurrentDispatcher,H;function L(e,r,n){{if(H===void 0)try{throw Error()}catch(s){var o=s.stack.trim().match(/\n( *(at )?)/);H=o&&o[1]||""}return`
|
|
10
|
+
`+H+e}}var K=!1,Y;{var nr=typeof WeakMap=="function"?WeakMap:Map;Y=new nr}function pe(e,r){if(!e||K)return"";{var n=Y.get(e);if(n!==void 0)return n}var o;K=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var c;c=G.current,G.current=null,er();try{if(r){var i=function(){throw Error()};if(Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(T){o=T}Reflect.construct(e,[],i)}else{try{i.call()}catch(T){o=T}e.call(i.prototype)}}else{try{throw Error()}catch(T){o=T}e()}}catch(T){if(T&&o&&typeof T.stack=="string"){for(var a=T.stack.split(`
|
|
19
11
|
`),y=o.stack.split(`
|
|
20
12
|
`),d=a.length-1,v=y.length-1;d>=1&&v>=0&&a[d]!==y[v];)v--;for(;d>=1&&v>=0;d--,v--)if(a[d]!==y[v]){if(d!==1||v!==1)do if(d--,v--,v<0||a[d]!==y[v]){var E=`
|
|
21
|
-
`+a[d].replace(" at new "," at ");return e.displayName&&E.includes("<anonymous>")&&(E=E.replace("<anonymous>",e.displayName)),typeof e=="function"&&
|
|
13
|
+
`+a[d].replace(" at new "," at ");return e.displayName&&E.includes("<anonymous>")&&(E=E.replace("<anonymous>",e.displayName)),typeof e=="function"&&Y.set(e,E),E}while(d>=1&&v>=0);break}}}finally{K=!1,G.current=c,rr(),Error.prepareStackTrace=s}var A=e?e.displayName||e.name:"",ke=A?L(A):"";return typeof e=="function"&&Y.set(e,ke),ke}function tr(e,r,n){return pe(e,!1)}function or(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function N(e,r,n){if(e==null)return"";if(typeof e=="function")return pe(e,or(e));if(typeof e=="string")return L(e);switch(e){case k:return L("Suspense");case b:return L("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case h:return tr(e.render);case R:return N(e.type,r,n);case O:{var o=e,s=o._payload,c=o._init;try{return N(c(s),r,n)}catch{}}}return""}var U=Object.prototype.hasOwnProperty,ye={},be=j.ReactDebugCurrentFrame;function V(e){if(e){var r=e._owner,n=N(e.type,e._source,r?r.type:null);be.setExtraStackFrame(n)}else be.setExtraStackFrame(null)}function ar(e,r,n,o,s){{var c=Function.call.bind(U);for(var i in e)if(c(e,i)){var a=void 0;try{if(typeof e[i]!="function"){var y=Error((o||"React class")+": "+n+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[i]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw y.name="Invariant Violation",y}a=e[i](r,i,o,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(d){a=d}a&&!(a instanceof Error)&&(V(s),p("%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).",o||"React class",n,i,typeof a),V(null)),a instanceof Error&&!(a.message in ye)&&(ye[a.message]=!0,V(s),p("Failed %s type: %s",n,a.message),V(null))}}}var ir=Array.isArray;function X(e){return ir(e)}function ur(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,n=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return n}}function lr(e){try{return Ee(e),!1}catch{return!0}}function Ee(e){return""+e}function me(e){if(lr(e))return p("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",ur(e)),Ee(e)}var W=j.ReactCurrentOwner,sr={key:!0,ref:!0,__self:!0,__source:!0},Re,_e,Z;Z={};function cr(e){if(U.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function fr(e){if(U.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function dr(e,r){if(typeof e.ref=="string"&&W.current&&r&&W.current.stateNode!==r){var n=_(W.current.type);Z[n]||(p('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',_(W.current.type),e.ref),Z[n]=!0)}}function vr(e,r){{var n=function(){Re||(Re=!0,p("%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))};n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}}function gr(e,r){{var n=function(){_e||(_e=!0,p("%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))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}}var hr=function(e,r,n,o,s,c,i){var a={$$typeof:u,type:e,key:r,ref:n,props:i,_owner:c};return a._store={},Object.defineProperty(a._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(a,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(a,"_source",{configurable:!1,enumerable:!1,writable:!1,value:s}),Object.freeze&&(Object.freeze(a.props),Object.freeze(a)),a};function pr(e,r,n,o,s){{var c,i={},a=null,y=null;n!==void 0&&(me(n),a=""+n),fr(r)&&(me(r.key),a=""+r.key),cr(r)&&(y=r.ref,dr(r,s));for(c in r)U.call(r,c)&&!sr.hasOwnProperty(c)&&(i[c]=r[c]);if(e&&e.defaultProps){var d=e.defaultProps;for(c in d)i[c]===void 0&&(i[c]=d[c])}if(a||y){var v=typeof e=="function"?e.displayName||e.name||"Unknown":e;a&&vr(i,v),y&&gr(i,v)}return hr(e,a,y,s,o,W.current,i)}}var Q=j.ReactCurrentOwner,Te=j.ReactDebugCurrentFrame;function x(e){if(e){var r=e._owner,n=N(e.type,e._source,r?r.type:null);Te.setExtraStackFrame(n)}else Te.setExtraStackFrame(null)}var ee;ee=!1;function re(e){return typeof e=="object"&&e!==null&&e.$$typeof===u}function we(){{if(Q.current){var e=_(Q.current.type);if(e)return`
|
|
22
14
|
|
|
23
|
-
Check the render method of \``+e+"`."}return""}}function
|
|
15
|
+
Check the render method of \``+e+"`."}return""}}function yr(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),n=e.lineNumber;return`
|
|
24
16
|
|
|
25
|
-
Check your code at `+r+":"+n+"."}return""}}var
|
|
17
|
+
Check your code at `+r+":"+n+"."}return""}}var Pe={};function br(e){{var r=we();if(!r){var n=typeof e=="string"?e:e.displayName||e.name;n&&(r=`
|
|
26
18
|
|
|
27
|
-
Check the top-level render call using <`+n+">.")}return r}}function
|
|
19
|
+
Check the top-level render call using <`+n+">.")}return r}}function Se(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var n=br(r);if(Pe[n])return;Pe[n]=!0;var o="";e&&e._owner&&e._owner!==Q.current&&(o=" It was passed a child from "+_(e._owner.type)+"."),x(e),p('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',n,o),x(null)}}function Oe(e,r){{if(typeof e!="object")return;if(X(e))for(var n=0;n<e.length;n++){var o=e[n];re(o)&&Se(o,r)}else if(re(e))e._store&&(e._store.validated=!0);else if(e){var s=ze(e);if(typeof s=="function"&&s!==e.entries)for(var c=s.call(e),i;!(i=c.next()).done;)re(i.value)&&Se(i.value,r)}}}function Er(e){{var r=e.type;if(r==null||typeof r=="string")return;var n;if(typeof r=="function")n=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===h||r.$$typeof===R))n=r.propTypes;else return;if(n){var o=_(r);ar(n,e.props,"prop",o,e)}else if(r.PropTypes!==void 0&&!ee){ee=!0;var s=_(r);p("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",s||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&p("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function mr(e){{for(var r=Object.keys(e.props),n=0;n<r.length;n++){var o=r[n];if(o!=="children"&&o!=="key"){x(e),p("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",o),x(null);break}}e.ref!==null&&(x(e),p("Invalid attribute `ref` supplied to `React.Fragment`."),x(null))}}function Ce(e,r,n,o,s,c){{var i=Ze(e);if(!i){var a="";(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.");var y=yr(s);y?a+=y:a+=we();var d;e===null?d="null":X(e)?d="array":e!==void 0&&e.$$typeof===u?(d="<"+(_(e.type)||"Unknown")+" />",a=" Did you accidentally export a JSX literal instead of a component?"):d=typeof e,p("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)}var v=pr(e,r,n,s,c);if(v==null)return v;if(i){var E=r.children;if(E!==void 0)if(o)if(X(E)){for(var A=0;A<E.length;A++)Oe(E[A],e);Object.freeze&&Object.freeze(E)}else p("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Oe(E,e)}return e===l?mr(v):Er(v),v}}function Rr(e,r,n){return Ce(e,r,n,!0)}function _r(e,r,n){return Ce(e,r,n,!1)}var Tr=_r,wr=Rr;F.Fragment=l,F.jsx=Tr,F.jsxs=wr}()),F}var D={};/**
|
|
20
|
+
* @license React
|
|
21
|
+
* react-jsx-runtime.production.min.js
|
|
22
|
+
*
|
|
23
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
24
|
+
*
|
|
25
|
+
* This source code is licensed under the MIT license found in the
|
|
26
|
+
* LICENSE file in the root directory of this source tree.
|
|
27
|
+
*/var te;function xe(){if(te)return D;te=1;var t=P,u=Symbol.for("react.element"),g=Symbol.for("react.fragment"),l=Object.prototype.hasOwnProperty,f=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,m={key:!0,ref:!0,__self:!0,__source:!0};function I(S,h,k){var b,R={},O=null,B=null;k!==void 0&&(O=""+k),h.key!==void 0&&(O=""+h.key),h.ref!==void 0&&(B=h.ref);for(b in h)l.call(h,b)&&!m.hasOwnProperty(b)&&(R[b]=h[b]);if(S&&S.defaultProps)for(b in h=S.defaultProps,h)R[b]===void 0&&(R[b]=h[b]);return{$$typeof:u,type:S,key:O,ref:B,props:R,_owner:f.current}}return D.Fragment=g,D.jsx=I,D.jsxs=I,D}process.env.NODE_ENV==="production"?$.exports=xe():$.exports=je();var Ae=$.exports;function Fe(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var De=function(t,u,g){var l=document.head||document.getElementsByTagName("head")[0],f=document.createElement("script");typeof u=="function"&&(g=u,u={}),u=u||{},g=g||function(){},f.type=u.type||"text/javascript",f.charset=u.charset||"utf8",f.async="async"in u?!!u.async:!0,f.src=t,u.attrs&&Ie(f,u.attrs),u.text&&(f.text=""+u.text);var m="onload"in f?oe:Me;m(f,g),f.onload||oe(f,g),l.appendChild(f)};function Ie(t,u){for(var g in u)t.setAttribute(g,u[g])}function oe(t,u){t.onload=function(){this.onerror=this.onload=null,u(null,t)},t.onerror=function(){this.onerror=this.onload=null,u(new Error("Failed to load "+this.src),t)}}function Me(t,u){t.onreadystatechange=function(){this.readyState!="complete"&&this.readyState!="loaded"||(this.onreadystatechange=null,u(null,t))}}const We=Fe(De),Be="https://d5aoblv5p04cg.cloudfront.net/editor-3/loader/build.js",Le="https://d5aoblv5p04cg.cloudfront.net/develop/loader/build.js",Ye="https://d5aoblv5p04cg.cloudfront.net/staging/loader/build.js";function Ne(t="production"){switch(t){case"dev":return Le;case"staging":return Ye;default:return Be}}const z={init:(t,u)=>new Promise((g,l)=>{const f=Ne(u==null?void 0:u.stage);We(f,m=>{m!==null&&l(m),window.TopolPlugin.init(t),g(!0)})}),save:()=>{window.TopolPlugin.save()},load:t=>{window.TopolPlugin.load(t)},togglePreview:()=>{window.TopolPlugin.togglePreview()},togglePreviewSize:()=>{window.TopolPlugin.togglePreviewSize()},chooseFile:t=>{window.TopolPlugin.chooseFile(t)},undo:()=>{window.TopolPlugin.undo()},redo:()=>{window.TopolPlugin.redo()},setSavedBlocks:t=>{window.TopolPlugin.setSavedBlocks(t)},createNotification:t=>{window.TopolPlugin.createNotification(t)},changeEmailToMobile:()=>{window.TopolPlugin.changeEmailToMobile()},changeEmailToDesktop:()=>{window.TopolPlugin.changeEmailToDesktop()},toggleBlocksAndStructuresVisibility:()=>{window.TopolPlugin.toggleBlocksAndStructuresVisibility()},destroy:()=>{window.TopolPlugin.destroy()}},Ue="editor";let J=!1,q=!1;function Ve(t){const u=()=>{const g={onSave(l,f){t.onSave!==void 0&&t.onSave(l,f)},onSaveAndClose(l,f){t.onSaveAndClose!==void 0&&t.onSaveAndClose(l,f)},onTestSend(l,f,m){t.onTestSend!==void 0&&t.onTestSend(l,f,m)},onOpenFileManager(){t.onOpenFileManager!==void 0&&t.onOpenFileManager()},onLoaded(){t.onLoaded!==void 0&&t.onLoaded()},onBlockSave(l){t.onBlockSave!==void 0&&t.onBlockSave(l)},onBlockRemove(l){t.onBlockRemove!==void 0&&t.onBlockRemove(l)},onBlockEdit(l){t.onBlockEdit!==void 0&&t.onBlockEdit(l)},onInit(){t.onInit!==void 0&&t.onInit(),J=!1,q=!0},onUndoChange(l){t.onUndoChange!==void 0&&t.onUndoChange(l)},onRedoChange(l){t.onRedoChange!==void 0&&t.onRedoChange(l)},onPreview(l){t.onPreview!==void 0&&t.onPreview(l)},onAlert(l){t.onAlert!==void 0&&t.onAlert(l)}};return{id:"#"+Ue,...t.options,callbacks:{...g}}};return P.useEffect(()=>(J||(async()=>{J=!0;const l=u();await z.init(l,{stage:t.stage||"production"})})(),()=>{q&&(z.destroy(),q=!1)}),[]),Ae.jsx("div",{id:"editor",style:{position:"absolute",height:"100vh",width:"100%"}})}w.TopolPlugin=z,w.default=Ve,Object.defineProperties(w,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ITopolOptions } from
|
|
1
|
+
import { ITopolOptions } from '@topol.io/editor';
|
|
2
2
|
export type IReactTopolOptions = Omit<ITopolOptions, 'id'>;
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"email-react",
|
|
12
12
|
"email templates"
|
|
13
13
|
],
|
|
14
|
-
"version": "0.0.0
|
|
14
|
+
"version": "0.0.0",
|
|
15
15
|
"author": "Topol.io",
|
|
16
16
|
"homepage": "https://topol.io",
|
|
17
17
|
"license": "Apache-2.0",
|
|
@@ -28,25 +28,25 @@
|
|
|
28
28
|
"types": "./dist/types/src/TopolEditor.d.ts"
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
|
-
"scripts": {
|
|
32
|
-
"dev": "vite",
|
|
33
|
-
"build": "vite build && yarn run build:types",
|
|
34
|
-
"build:types": "tsc -p tsconfig.prod.json"
|
|
35
|
-
},
|
|
36
31
|
"dependencies": {
|
|
37
|
-
"@topol.io/editor": "
|
|
32
|
+
"@topol.io/editor": "0.0.0"
|
|
38
33
|
},
|
|
39
34
|
"devDependencies": {
|
|
40
35
|
"@types/node": "^20.7.0",
|
|
41
|
-
"@types/react": "^18.2.
|
|
42
|
-
"@types/react-dom": "^18.2.
|
|
43
|
-
"@vitejs/plugin-react": "^4.1
|
|
36
|
+
"@types/react": "^18.2.43",
|
|
37
|
+
"@types/react-dom": "^18.2.17",
|
|
38
|
+
"@vitejs/plugin-react": "^4.2.1",
|
|
44
39
|
"react": "^18.2.0",
|
|
45
40
|
"react-dom": "^18.2.0",
|
|
46
41
|
"typescript": "^5.2.2",
|
|
47
|
-
"vite": "^
|
|
42
|
+
"vite": "^5.0.8"
|
|
48
43
|
},
|
|
49
44
|
"publishConfig": {
|
|
50
45
|
"access": "public"
|
|
46
|
+
},
|
|
47
|
+
"scripts": {
|
|
48
|
+
"dev": "vite",
|
|
49
|
+
"build": "vite build && pnpm run build:types",
|
|
50
|
+
"build:types": "tsc -p tsconfig.prod.json"
|
|
51
51
|
}
|
|
52
|
-
}
|
|
52
|
+
}
|