@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 Se, { useEffect as lr } from "react";
2
- var K = { exports: {} }, D = {};
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 we;
41
- function cr() {
42
- return we || (we = 1, process.env.NODE_ENV !== "production" && function() {
43
- var t = Se, 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"), X = Symbol.iterator, Oe = "@@iterator";
44
- function Ce(e) {
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 = X && e[X] || e[Oe];
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
- ke("error", e, n);
27
+ je("error", e, n);
56
28
  }
57
29
  }
58
- function ke(e, r, n) {
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 xe = !1, je = !1, Ae = !1, Fe = !1, De = !1, Z;
69
- Z = Symbol.for("react.module.reference");
70
- function Ie(e) {
71
- return !!(typeof e == "string" || typeof e == "function" || e === l || e === m || De || e === f || e === O || e === E || Fe || e === $ || xe || je || Ae || 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
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 === Z || e.getModuleId !== void 0));
47
+ e.$$typeof === ee || e.getModuleId !== void 0));
76
48
  }
77
- function $e(e, r, n) {
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 Q(e) {
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 Q(r) + ".Consumer";
84
+ return re(r) + ".Consumer";
113
85
  case j:
114
86
  var n = e;
115
- return Q(n._context) + ".Provider";
87
+ return re(n._context) + ".Provider";
116
88
  case h:
117
- return $e(e, e.render, "ForwardRef");
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, ee, re, ne, te, ae, oe, ie;
133
- function ue() {
104
+ var S = Object.assign, A = 0, ne, te, ae, oe, ie, ue, le;
105
+ function se() {
134
106
  }
135
- ue.__reactDisabledLog = !0;
136
- function We() {
107
+ se.__reactDisabledLog = !0;
108
+ function Le() {
137
109
  {
138
110
  if (A === 0) {
139
- ee = console.log, re = console.info, ne = console.warn, te = console.error, ae = console.group, oe = console.groupCollapsed, ie = console.groupEnd;
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: ue,
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 Be() {
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: ee
141
+ value: ne
170
142
  }),
171
143
  info: S({}, e, {
172
- value: re
144
+ value: te
173
145
  }),
174
146
  warn: S({}, e, {
175
- value: ne
147
+ value: ae
176
148
  }),
177
149
  error: S({}, e, {
178
- value: te
150
+ value: oe
179
151
  }),
180
152
  group: S({}, e, {
181
- value: ae
153
+ value: ie
182
154
  }),
183
155
  groupCollapsed: S({}, e, {
184
- value: oe
156
+ value: ue
185
157
  }),
186
158
  groupEnd: S({}, e, {
187
- value: ie
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 Me = typeof WeakMap == "function" ? WeakMap : Map;
211
- B = new Me();
182
+ var Ye = typeof WeakMap == "function" ? WeakMap : Map;
183
+ B = new Ye();
212
184
  }
213
- function le(e, r) {
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, We();
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, Be(), Error.prepareStackTrace = s;
251
+ V = !1, N.current = c, Me(), Error.prepareStackTrace = s;
280
252
  }
281
- var x = e ? e.displayName || e.name : "", Re = x ? W(x) : "";
282
- return typeof e == "function" && B.set(e, Re), Re;
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 Ye(e, r, n) {
285
- return le(e, !1);
256
+ function Ne(e, r, n) {
257
+ return ce(e, !1);
286
258
  }
287
- function Le(e) {
259
+ function Ue(e) {
288
260
  var r = e.prototype;
289
261
  return !!(r && r.isReactComponent);
290
262
  }
291
- function M(e, r, n) {
263
+ function L(e, r, n) {
292
264
  if (e == null)
293
265
  return "";
294
266
  if (typeof e == "function")
295
- return le(e, Le(e));
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 Ye(e.render);
279
+ return Ne(e.render);
308
280
  case R:
309
- return M(e.type, r, n);
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 M(c(s), r, n);
285
+ return L(c(s), r, n);
314
286
  } catch {
315
287
  }
316
288
  }
317
289
  }
318
290
  return "";
319
291
  }
320
- var Y = Object.prototype.hasOwnProperty, se = {}, ce = C.ReactDebugCurrentFrame;
321
- function L(e) {
292
+ var M = Object.prototype.hasOwnProperty, fe = {}, de = C.ReactDebugCurrentFrame;
293
+ function Y(e) {
322
294
  if (e) {
323
- var r = e._owner, n = M(e.type, e._source, r ? r.type : null);
324
- ce.setExtraStackFrame(n);
295
+ var r = e._owner, n = L(e.type, e._source, r ? r.type : null);
296
+ de.setExtraStackFrame(n);
325
297
  } else
326
- ce.setExtraStackFrame(null);
298
+ de.setExtraStackFrame(null);
327
299
  }
328
- function Ne(e, r, n, a, s) {
300
+ function Ve(e, r, n, a, s) {
329
301
  {
330
- var c = Function.call.bind(Y);
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) && (L(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), L(null)), o instanceof Error && !(o.message in se) && (se[o.message] = !0, L(s), p("Failed %s type: %s", n, o.message), L(null));
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 Ue = Array.isArray;
319
+ var ze = Array.isArray;
348
320
  function z(e) {
349
- return Ue(e);
321
+ return ze(e);
350
322
  }
351
- function Ve(e) {
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 ze(e) {
329
+ function Je(e) {
358
330
  try {
359
- return fe(e), !1;
331
+ return ve(e), !1;
360
332
  } catch {
361
333
  return !0;
362
334
  }
363
335
  }
364
- function fe(e) {
336
+ function ve(e) {
365
337
  return "" + e;
366
338
  }
367
- function de(e) {
368
- if (ze(e))
369
- return p("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ve(e)), fe(e);
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, qe = {
343
+ var F = C.ReactCurrentOwner, Ge = {
372
344
  key: !0,
373
345
  ref: !0,
374
346
  __self: !0,
375
347
  __source: !0
376
- }, ve, ge, q;
348
+ }, he, pe, q;
377
349
  q = {};
378
- function Je(e) {
379
- if (Y.call(e, "ref")) {
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 Ge(e) {
387
- if (Y.call(e, "key")) {
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 He(e, r) {
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 Ke(e, r) {
372
+ function Ze(e, r) {
401
373
  {
402
374
  var n = function() {
403
- ve || (ve = !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));
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 Xe(e, r) {
383
+ function Qe(e, r) {
412
384
  {
413
385
  var n = function() {
414
- ge || (ge = !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));
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 Ze = function(e, r, n, a, s, c, i) {
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 Qe(e, r, n, a, s) {
423
+ function rr(e, r, n, a, s) {
452
424
  {
453
425
  var c, i = {}, o = null, y = null;
454
- n !== void 0 && (de(n), o = "" + n), Ge(r) && (de(r.key), o = "" + r.key), Je(r) && (y = r.ref, He(r, s));
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
- Y.call(r, c) && !qe.hasOwnProperty(c) && (i[c] = r[c]);
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 && Ke(i, v), y && Xe(i, v);
436
+ o && Ze(i, v), y && Qe(i, v);
465
437
  }
466
- return Ze(e, o, y, s, a, F.current, i);
438
+ return er(e, o, y, s, a, F.current, i);
467
439
  }
468
440
  }
469
- var J = C.ReactCurrentOwner, he = C.ReactDebugCurrentFrame;
441
+ var J = C.ReactCurrentOwner, ye = C.ReactDebugCurrentFrame;
470
442
  function k(e) {
471
443
  if (e) {
472
- var r = e._owner, n = M(e.type, e._source, r ? r.type : null);
473
- he.setExtraStackFrame(n);
444
+ var r = e._owner, n = L(e.type, e._source, r ? r.type : null);
445
+ ye.setExtraStackFrame(n);
474
446
  } else
475
- he.setExtraStackFrame(null);
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 pe() {
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 er(e) {
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 ye = {};
506
- function rr(e) {
477
+ var be = {};
478
+ function tr(e) {
507
479
  {
508
- var r = pe();
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 Ee(e, r) {
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 = rr(r);
524
- if (ye[n])
495
+ var n = tr(r);
496
+ if (be[n])
525
497
  return;
526
- ye[n] = !0;
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 be(e, r) {
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) && Ee(a, r);
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 = Ce(e);
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) && Ee(i.value, r);
518
+ H(i.value) && me(i.value, r);
547
519
  }
548
520
  }
549
521
  }
550
- function nr(e) {
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
- Ne(n, e.props, "prop", a, e);
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 tr(e) {
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 me(e, r, n, a, s, c) {
559
+ function _e(e, r, n, a, s, c) {
588
560
  {
589
- var i = Ie(e);
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 = er(s);
594
- y ? o += y : o += pe();
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 = Qe(e, r, n, s, c);
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
- be(b[x], e);
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
- be(b, e);
584
+ Re(b, e);
613
585
  }
614
- return e === l ? tr(v) : nr(v), v;
586
+ return e === l ? or(v) : ar(v), v;
615
587
  }
616
588
  }
617
- function ar(e, r, n) {
618
- return me(e, r, n, !0);
589
+ function ir(e, r, n) {
590
+ return _e(e, r, n, !0);
619
591
  }
620
- function or(e, r, n) {
621
- return me(e, r, n, !1);
592
+ function ur(e, r, n) {
593
+ return _e(e, r, n, !1);
622
594
  }
623
- var ir = or, ur = ar;
624
- I.Fragment = l, I.jsx = ir, I.jsxs = ur;
625
- }()), I;
595
+ var lr = ur, sr = ir;
596
+ D.Fragment = l, D.jsx = lr, D.jsxs = sr;
597
+ }()), D;
626
598
  }
627
- process.env.NODE_ENV === "production" ? K.exports = sr() : K.exports = cr();
628
- var fr = K.exports;
629
- function dr(t) {
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 vr = function(t, u, g) {
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 && gr(f, u.attrs), u.text && (f.text = "" + u.text);
636
- var m = "onload" in f ? Te : hr;
637
- m(f, g), f.onload || Te(f, g), l.appendChild(f);
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 gr(t, u) {
639
+ function pr(t, u) {
640
640
  for (var g in u)
641
641
  t.setAttribute(g, u[g]);
642
642
  }
643
- function Te(t, u) {
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 hr(t, u) {
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 pr = /* @__PURE__ */ dr(vr), yr = "https://d5aoblv5p04cg.cloudfront.net/editor-3/loader/build.js", Er = "https://d5aoblv5p04cg.cloudfront.net/develop/loader/build.js", br = "https://d5aoblv5p04cg.cloudfront.net/staging/loader/build.js";
656
- function mr(t = "production") {
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 Er;
659
+ return mr;
660
660
  case "staging":
661
- return br;
661
+ return Rr;
662
662
  default:
663
- return yr;
663
+ return br;
664
664
  }
665
665
  }
666
- const Pe = {
666
+ const Oe = {
667
667
  init: (t, u) => new Promise((g, l) => {
668
- const f = mr(u == null ? void 0 : u.stage);
669
- pr(f, (m) => {
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
- }, Rr = "editor";
713
- function wr(t) {
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: "#" + Rr, ...t.options, callbacks: { ...g } };
757
+ return { id: "#" + wr, ...t.options, callbacks: { ...g } };
757
758
  };
758
- return lr(() => ((async () => {
759
+ return cr(() => (K || (async () => {
760
+ K = !0;
759
761
  const l = u();
760
- await Pe.init(l, { stage: t.stage || "production" });
762
+ await Oe.init(l, { stage: t.stage || "production" });
761
763
  })(), () => {
762
- Pe.destroy();
763
- }), []), /* @__PURE__ */ fr.jsx("div", { id: "editor", style: { position: "absolute", height: "100vh", width: "100%" } });
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
- Pe as TopolPlugin,
767
- wr as default
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 re;function ke(){return re||(re=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"),te=Symbol.iterator,Ue="@@iterator";function Ve(e){if(e===null||typeof e!="object")return null;var r=te&&e[te]||e[Ue];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];$e("error",e,n)}}function $e(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 ze=!1,Je=!1,qe=!1,Ge=!1,He=!1,oe;oe=Symbol.for("react.module.reference");function Ke(e){return!!(typeof e=="string"||typeof e=="function"||e===l||e===m||He||e===f||e===k||e===b||Ge||e===B||ze||Je||qe||typeof e=="object"&&e!==null&&(e.$$typeof===O||e.$$typeof===R||e.$$typeof===I||e.$$typeof===S||e.$$typeof===h||e.$$typeof===oe||e.getModuleId!==void 0))}function Xe(e,r,n){var o=e.displayName;if(o)return o;var s=r.displayName||r.name||"";return s!==""?n+"("+s+")":n}function ae(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 ae(r)+".Consumer";case I:var n=e;return ae(n._context)+".Provider";case h:return Xe(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,ie,ue,le,se,ce,fe,de;function ve(){}ve.__reactDisabledLog=!0;function Ze(){{if(M===0){ie=console.log,ue=console.info,le=console.warn,se=console.error,ce=console.group,fe=console.groupCollapsed,de=console.groupEnd;var e={configurable:!0,enumerable:!0,value:ve,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}M++}}function Qe(){{if(M--,M===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:C({},e,{value:ie}),info:C({},e,{value:ue}),warn:C({},e,{value:le}),error:C({},e,{value:se}),group:C({},e,{value:ce}),groupCollapsed:C({},e,{value:fe}),groupEnd:C({},e,{value:de})})}M<0&&p("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var J=j.ReactCurrentDispatcher,q;function Y(e,r,n){{if(q===void 0)try{throw Error()}catch(s){var o=s.stack.trim().match(/\n( *(at )?)/);q=o&&o[1]||""}return`
18
- `+q+e}}var G=!1,L;{var er=typeof WeakMap=="function"?WeakMap:Map;L=new er}function ge(e,r){if(!e||G)return"";{var n=L.get(e);if(n!==void 0)return n}var o;G=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var c;c=J.current,J.current=null,Ze();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(`
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"&&L.set(e,E),E}while(d>=1&&v>=0);break}}}finally{G=!1,J.current=c,Qe(),Error.prepareStackTrace=s}var A=e?e.displayName||e.name:"",Oe=A?Y(A):"";return typeof e=="function"&&L.set(e,Oe),Oe}function rr(e,r,n){return ge(e,!1)}function nr(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function N(e,r,n){if(e==null)return"";if(typeof e=="function")return ge(e,nr(e));if(typeof e=="string")return Y(e);switch(e){case k:return Y("Suspense");case b:return Y("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case h:return rr(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,he={},pe=j.ReactDebugCurrentFrame;function V(e){if(e){var r=e._owner,n=N(e.type,e._source,r?r.type:null);pe.setExtraStackFrame(n)}else pe.setExtraStackFrame(null)}function tr(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 he)&&(he[a.message]=!0,V(s),p("Failed %s type: %s",n,a.message),V(null))}}}var or=Array.isArray;function H(e){return or(e)}function ar(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,n=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return n}}function ir(e){try{return ye(e),!1}catch{return!0}}function ye(e){return""+e}function be(e){if(ir(e))return p("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",ar(e)),ye(e)}var W=j.ReactCurrentOwner,ur={key:!0,ref:!0,__self:!0,__source:!0},Ee,me,K;K={};function lr(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 sr(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 cr(e,r){if(typeof e.ref=="string"&&W.current&&r&&W.current.stateNode!==r){var n=_(W.current.type);K[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),K[n]=!0)}}function fr(e,r){{var n=function(){Ee||(Ee=!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 dr(e,r){{var n=function(){me||(me=!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 vr=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 gr(e,r,n,o,s){{var c,i={},a=null,y=null;n!==void 0&&(be(n),a=""+n),sr(r)&&(be(r.key),a=""+r.key),lr(r)&&(y=r.ref,cr(r,s));for(c in r)U.call(r,c)&&!ur.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&&fr(i,v),y&&dr(i,v)}return vr(e,a,y,s,o,W.current,i)}}var X=j.ReactCurrentOwner,Re=j.ReactDebugCurrentFrame;function x(e){if(e){var r=e._owner,n=N(e.type,e._source,r?r.type:null);Re.setExtraStackFrame(n)}else Re.setExtraStackFrame(null)}var Z;Z=!1;function Q(e){return typeof e=="object"&&e!==null&&e.$$typeof===u}function _e(){{if(X.current){var e=_(X.current.type);if(e)return`
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 hr(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),n=e.lineNumber;return`
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 Te={};function pr(e){{var r=_e();if(!r){var n=typeof e=="string"?e:e.displayName||e.name;n&&(r=`
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 we(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var n=pr(r);if(Te[n])return;Te[n]=!0;var o="";e&&e._owner&&e._owner!==X.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 Pe(e,r){{if(typeof e!="object")return;if(H(e))for(var n=0;n<e.length;n++){var o=e[n];Q(o)&&we(o,r)}else if(Q(e))e._store&&(e._store.validated=!0);else if(e){var s=Ve(e);if(typeof s=="function"&&s!==e.entries)for(var c=s.call(e),i;!(i=c.next()).done;)Q(i.value)&&we(i.value,r)}}}function yr(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);tr(n,e.props,"prop",o,e)}else if(r.PropTypes!==void 0&&!Z){Z=!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 br(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 Se(e,r,n,o,s,c){{var i=Ke(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=hr(s);y?a+=y:a+=_e();var d;e===null?d="null":H(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=gr(e,r,n,s,c);if(v==null)return v;if(i){var E=r.children;if(E!==void 0)if(o)if(H(E)){for(var A=0;A<E.length;A++)Pe(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 Pe(E,e)}return e===l?br(v):yr(v),v}}function Er(e,r,n){return Se(e,r,n,!0)}function mr(e,r,n){return Se(e,r,n,!1)}var Rr=mr,_r=Er;D.Fragment=l,D.jsx=Rr,D.jsxs=_r}()),D}process.env.NODE_ENV==="production"?$.exports=Ce():$.exports=ke();var je=$.exports;function xe(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Ae=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&&Fe(f,u.attrs),u.text&&(f.text=""+u.text);var m="onload"in f?ne:De;m(f,g),f.onload||ne(f,g),l.appendChild(f)};function Fe(t,u){for(var g in u)t.setAttribute(g,u[g])}function ne(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 De(t,u){t.onreadystatechange=function(){this.readyState!="complete"&&this.readyState!="loaded"||(this.onreadystatechange=null,u(null,t))}}const Ie=xe(Ae),Me="https://d5aoblv5p04cg.cloudfront.net/editor-3/loader/build.js",We="https://d5aoblv5p04cg.cloudfront.net/develop/loader/build.js",Be="https://d5aoblv5p04cg.cloudfront.net/staging/loader/build.js";function Ye(t="production"){switch(t){case"dev":return We;case"staging":return Be;default:return Me}}const z={init:(t,u)=>new Promise((g,l)=>{const f=Ye(u==null?void 0:u.stage);Ie(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()}},Le="editor";function Ne(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()},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:"#"+Le,...t.options,callbacks:{...g}}};return P.useEffect(()=>((async()=>{const l=u();await z.init(l,{stage:t.stage||"production"})})(),()=>{z.destroy()}),[]),je.jsx("div",{id:"editor",style:{position:"absolute",height:"100vh",width:"100%"}})}w.TopolPlugin=z,w.default=Ne,Object.defineProperties(w,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
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 "@topol.io/editor";
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-alfa.2",
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": "^0.0.0-alfa.23"
32
+ "@topol.io/editor": "0.0.0"
38
33
  },
39
34
  "devDependencies": {
40
35
  "@types/node": "^20.7.0",
41
- "@types/react": "^18.2.22",
42
- "@types/react-dom": "^18.2.7",
43
- "@vitejs/plugin-react": "^4.1.0",
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": "^4.4.9"
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
+ }