ddd-react 1.10.4 → 1.10.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +156 -146
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as c, e as m, a as
|
|
1
|
+
import { D as c, e as m, a as R, A as g, b as x, h as B, c as U } from "./h-BbaMkkC7.mjs";
|
|
2
2
|
import { d as Pt, f as Ot } from "./h-BbaMkkC7.mjs";
|
|
3
3
|
function b(e, t) {
|
|
4
4
|
if (e === null || t === null || e === void 0 || t === void 0)
|
|
@@ -31,8 +31,8 @@ function b(e, t) {
|
|
|
31
31
|
if (!Object.prototype.hasOwnProperty.call(t, r[n]))
|
|
32
32
|
return !1;
|
|
33
33
|
for (let n = 0; n < r.length; ++n) {
|
|
34
|
-
const
|
|
35
|
-
if (!(
|
|
34
|
+
const o = r[n];
|
|
35
|
+
if (!(o === "_owner" && e.$$typeof) && !b(e[o], t[o]))
|
|
36
36
|
return !1;
|
|
37
37
|
}
|
|
38
38
|
return !0;
|
|
@@ -40,17 +40,17 @@ function b(e, t) {
|
|
|
40
40
|
return !1;
|
|
41
41
|
}
|
|
42
42
|
function N(e, t, r, n = null) {
|
|
43
|
-
function
|
|
44
|
-
const
|
|
45
|
-
n ? t.call(n,
|
|
43
|
+
function o(i) {
|
|
44
|
+
const s = i;
|
|
45
|
+
n ? t.call(n, s) : t(s);
|
|
46
46
|
}
|
|
47
|
-
return r.addEventListener(e,
|
|
47
|
+
return r.addEventListener(e, o), o;
|
|
48
48
|
}
|
|
49
49
|
function I(e = {}, t, r = null) {
|
|
50
50
|
const n = {};
|
|
51
|
-
return Object.entries(e).forEach(([
|
|
52
|
-
n[
|
|
53
|
-
|
|
51
|
+
return Object.entries(e).forEach(([o, i]) => {
|
|
52
|
+
n[o] = N(
|
|
53
|
+
o,
|
|
54
54
|
i,
|
|
55
55
|
t,
|
|
56
56
|
r
|
|
@@ -95,8 +95,8 @@ function q(e) {
|
|
|
95
95
|
t && t.remove();
|
|
96
96
|
}
|
|
97
97
|
function G(e) {
|
|
98
|
-
const { el: t, children: r, listeners: n, props:
|
|
99
|
-
|
|
98
|
+
const { el: t, children: r, listeners: n, props: o } = e;
|
|
99
|
+
o?.ref && typeof o.ref == "object" && "current" in o.ref && (o.ref.current = null), t && t.remove(), r && r.forEach(p), n && t && ($(n, t), delete e.listeners);
|
|
100
100
|
}
|
|
101
101
|
function _(e) {
|
|
102
102
|
const { children: t } = e;
|
|
@@ -113,12 +113,12 @@ function J(e, t) {
|
|
|
113
113
|
e.style[t] = null;
|
|
114
114
|
}
|
|
115
115
|
function K(e, t) {
|
|
116
|
-
const { class: r, style: n, ...
|
|
117
|
-
r && W(e, r), n && Object.entries(n).forEach(([i,
|
|
118
|
-
M(e, i,
|
|
116
|
+
const { class: r, style: n, ...o } = t;
|
|
117
|
+
r && W(e, r), n && Object.entries(n).forEach(([i, s]) => {
|
|
118
|
+
M(e, i, s);
|
|
119
119
|
});
|
|
120
|
-
for (const [i,
|
|
121
|
-
w(e, i,
|
|
120
|
+
for (const [i, s] of Object.entries(o))
|
|
121
|
+
w(e, i, s);
|
|
122
122
|
}
|
|
123
123
|
function W(e, t) {
|
|
124
124
|
if (e instanceof SVGElement) {
|
|
@@ -181,8 +181,8 @@ function h(e, t, r = null, n = null) {
|
|
|
181
181
|
}
|
|
182
182
|
case c.COMPONENT: {
|
|
183
183
|
tt(e, t, r, n);
|
|
184
|
-
const
|
|
185
|
-
|
|
184
|
+
const o = e.component;
|
|
185
|
+
o && d(() => o.didMount());
|
|
186
186
|
break;
|
|
187
187
|
}
|
|
188
188
|
case c.PORTAL: {
|
|
@@ -194,28 +194,32 @@ function h(e, t, r = null, n = null) {
|
|
|
194
194
|
}
|
|
195
195
|
}
|
|
196
196
|
function z(e, t, r) {
|
|
197
|
-
const { value: n } = e,
|
|
198
|
-
e.el =
|
|
197
|
+
const { value: n } = e, o = document.createTextNode(n);
|
|
198
|
+
e.el = o, L(o, t, r);
|
|
199
199
|
}
|
|
200
200
|
function Q(e, t, r, n) {
|
|
201
|
-
const { children:
|
|
202
|
-
e.el = t,
|
|
203
|
-
h(i, t, r != null ? r +
|
|
201
|
+
const { children: o } = e;
|
|
202
|
+
e.el = t, o?.forEach((i, s) => {
|
|
203
|
+
h(i, t, r != null ? r + s : null, n);
|
|
204
204
|
});
|
|
205
205
|
}
|
|
206
206
|
function Z(e, t, r, n) {
|
|
207
|
-
const { tag:
|
|
208
|
-
V(
|
|
209
|
-
h(a,
|
|
210
|
-
}), L(
|
|
207
|
+
const { tag: o, children: i } = e, u = o === "svg" || t instanceof SVGElement ? document.createElementNS("http://www.w3.org/2000/svg", o) : document.createElement(o);
|
|
208
|
+
V(u, e, n), e.el = u, i?.forEach((a) => {
|
|
209
|
+
h(a, u, null, n);
|
|
210
|
+
}), L(u, t, r);
|
|
211
211
|
}
|
|
212
212
|
function V(e, t, r) {
|
|
213
|
-
const { props: n, events:
|
|
214
|
-
n.ref && typeof n.ref == "object" && "current" in n.ref && (n.ref.current = e, delete n.ref), t.listeners = I(
|
|
213
|
+
const { props: n, events: o } = A(t);
|
|
214
|
+
n.ref && typeof n.ref == "object" && "current" in n.ref && (n.ref.current = e, delete n.ref), t.listeners = I(o, e, r), K(e, n);
|
|
215
215
|
}
|
|
216
216
|
function tt(e, t, r, n) {
|
|
217
|
-
const
|
|
218
|
-
|
|
217
|
+
const o = e.tag, { props: i } = A(e), s = new o(i, n);
|
|
218
|
+
try {
|
|
219
|
+
s.mount(t, r), e.component = s, e.el = s.firstElement || null;
|
|
220
|
+
} catch {
|
|
221
|
+
s.vdom && (e.component = s);
|
|
222
|
+
}
|
|
219
223
|
}
|
|
220
224
|
function L(e, t, r) {
|
|
221
225
|
if (r == null) {
|
|
@@ -229,8 +233,8 @@ function L(e, t, r) {
|
|
|
229
233
|
}
|
|
230
234
|
function et(e, t) {
|
|
231
235
|
const { children: r, container: n } = e;
|
|
232
|
-
r?.forEach((
|
|
233
|
-
h(
|
|
236
|
+
r?.forEach((o) => {
|
|
237
|
+
h(o, n, null, t);
|
|
234
238
|
});
|
|
235
239
|
}
|
|
236
240
|
function j(e, t) {
|
|
@@ -238,17 +242,17 @@ function j(e, t) {
|
|
|
238
242
|
return !1;
|
|
239
243
|
if (e.type === c.ELEMENT) {
|
|
240
244
|
const r = e, n = t, {
|
|
241
|
-
tag:
|
|
245
|
+
tag: o,
|
|
242
246
|
props: { key: i }
|
|
243
247
|
} = r, {
|
|
244
|
-
tag:
|
|
245
|
-
props: { key:
|
|
248
|
+
tag: s,
|
|
249
|
+
props: { key: u }
|
|
246
250
|
} = n;
|
|
247
|
-
return
|
|
251
|
+
return o === s && i === u;
|
|
248
252
|
}
|
|
249
253
|
if (e.type === c.COMPONENT) {
|
|
250
|
-
const r = e, n = t, { tag:
|
|
251
|
-
return
|
|
254
|
+
const r = e, n = t, { tag: o } = r, { tag: i } = n;
|
|
255
|
+
return o === i;
|
|
252
256
|
}
|
|
253
257
|
if (e.type === c.PORTAL) {
|
|
254
258
|
const r = e, n = t;
|
|
@@ -256,32 +260,32 @@ function j(e, t) {
|
|
|
256
260
|
}
|
|
257
261
|
return !0;
|
|
258
262
|
}
|
|
259
|
-
function
|
|
260
|
-
const r = Object.keys(e), n = Object.keys(t),
|
|
261
|
-
for (const
|
|
262
|
-
|
|
263
|
+
function C(e, t) {
|
|
264
|
+
const r = Object.keys(e), n = Object.keys(t), o = [], i = [];
|
|
265
|
+
for (const s of n)
|
|
266
|
+
s in e ? e[s] !== t[s] && i.push(s) : o.push(s);
|
|
263
267
|
return {
|
|
264
|
-
added:
|
|
265
|
-
removed: r.filter((
|
|
268
|
+
added: o,
|
|
269
|
+
removed: r.filter((s) => !(s in t)),
|
|
266
270
|
updated: i
|
|
267
271
|
};
|
|
268
272
|
}
|
|
269
273
|
function rt(e) {
|
|
270
274
|
return e !== "";
|
|
271
275
|
}
|
|
272
|
-
function
|
|
276
|
+
function S(e) {
|
|
273
277
|
return rt(e.trim());
|
|
274
278
|
}
|
|
275
279
|
function y(e, t, r, n = null) {
|
|
276
280
|
if (!j(e, t)) {
|
|
277
|
-
const
|
|
278
|
-
return p(e), h(t, r,
|
|
281
|
+
const o = nt(r, e.el);
|
|
282
|
+
return p(e), h(t, r, o, n), t;
|
|
279
283
|
}
|
|
280
284
|
switch (t.el = e.el, t.type) {
|
|
281
285
|
case c.TEXT:
|
|
282
|
-
return
|
|
286
|
+
return ot(e, t), t;
|
|
283
287
|
case c.ELEMENT: {
|
|
284
|
-
|
|
288
|
+
st(e, t, n);
|
|
285
289
|
break;
|
|
286
290
|
}
|
|
287
291
|
case c.COMPONENT: {
|
|
@@ -293,104 +297,104 @@ function y(e, t, r, n = null) {
|
|
|
293
297
|
break;
|
|
294
298
|
}
|
|
295
299
|
}
|
|
296
|
-
return
|
|
300
|
+
return F(e, t, n), t;
|
|
297
301
|
}
|
|
298
302
|
function nt(e, t) {
|
|
299
303
|
if (!t) return null;
|
|
300
304
|
const r = Array.from(e.childNodes).indexOf(t);
|
|
301
305
|
return r < 0 ? null : r;
|
|
302
306
|
}
|
|
303
|
-
function
|
|
304
|
-
const r = e.el, { value: n } = e, { value:
|
|
305
|
-
n !==
|
|
307
|
+
function ot(e, t) {
|
|
308
|
+
const r = e.el, { value: n } = e, { value: o } = t;
|
|
309
|
+
n !== o && r && (r.nodeValue = o);
|
|
306
310
|
}
|
|
307
|
-
function
|
|
311
|
+
function st(e, t, r) {
|
|
308
312
|
const n = e.el, {
|
|
309
|
-
class:
|
|
313
|
+
class: o,
|
|
310
314
|
style: i,
|
|
311
|
-
on:
|
|
312
|
-
...
|
|
315
|
+
on: s,
|
|
316
|
+
...u
|
|
313
317
|
} = e.props ?? {}, {
|
|
314
318
|
class: a,
|
|
315
|
-
style:
|
|
319
|
+
style: l,
|
|
316
320
|
on: f,
|
|
317
321
|
...E
|
|
318
322
|
} = t.props ?? {}, { listeners: v } = e;
|
|
319
|
-
it(n,
|
|
323
|
+
it(n, u, E), ct(n, o, a), ut(
|
|
320
324
|
n,
|
|
321
325
|
i,
|
|
322
|
-
|
|
326
|
+
l
|
|
323
327
|
), t.listeners = lt(
|
|
324
328
|
n,
|
|
325
329
|
v,
|
|
326
|
-
|
|
330
|
+
s ?? {},
|
|
327
331
|
f ?? {},
|
|
328
332
|
r
|
|
329
333
|
);
|
|
330
334
|
}
|
|
331
335
|
function it(e, t = {}, r = {}) {
|
|
332
|
-
const n = t.ref,
|
|
333
|
-
n !==
|
|
334
|
-
const i = { ...t },
|
|
335
|
-
delete i.ref, delete
|
|
336
|
-
const { added:
|
|
336
|
+
const n = t.ref, o = r.ref;
|
|
337
|
+
n !== o && (n && typeof n == "object" && "current" in n && (n.current = null), o && typeof o == "object" && "current" in o && (o.current = e));
|
|
338
|
+
const i = { ...t }, s = { ...r };
|
|
339
|
+
delete i.ref, delete s.ref;
|
|
340
|
+
const { added: u, removed: a, updated: l } = C(i, s);
|
|
337
341
|
for (const f of a)
|
|
338
342
|
D(e, f);
|
|
339
|
-
for (const f of
|
|
340
|
-
w(e, f,
|
|
343
|
+
for (const f of u.concat(l))
|
|
344
|
+
w(e, f, s[f]);
|
|
341
345
|
}
|
|
342
346
|
function ct(e, t, r) {
|
|
343
|
-
const n =
|
|
344
|
-
|
|
347
|
+
const n = k(t), o = k(r), { added: i, removed: s } = x(n, o);
|
|
348
|
+
s.length > 0 && e.classList.remove(...s), i.length > 0 && e.classList.add(...i);
|
|
345
349
|
}
|
|
346
|
-
function
|
|
347
|
-
return Array.isArray(e) ? e.filter(
|
|
350
|
+
function k(e = "") {
|
|
351
|
+
return Array.isArray(e) ? e.filter(S) : String(e).split(/(\s+)/).filter(S);
|
|
348
352
|
}
|
|
349
353
|
function ut(e, t = {}, r = {}) {
|
|
350
|
-
const { added: n, removed:
|
|
351
|
-
for (const
|
|
352
|
-
J(e,
|
|
353
|
-
for (const
|
|
354
|
-
M(e,
|
|
355
|
-
}
|
|
356
|
-
function lt(e, t = {}, r = {}, n = {},
|
|
357
|
-
const { removed: i, added:
|
|
358
|
-
for (const
|
|
359
|
-
const f = t?.[
|
|
360
|
-
f && e.removeEventListener(
|
|
354
|
+
const { added: n, removed: o, updated: i } = C(t, r);
|
|
355
|
+
for (const s of o)
|
|
356
|
+
J(e, s);
|
|
357
|
+
for (const s of n.concat(i))
|
|
358
|
+
M(e, s, r[s]);
|
|
359
|
+
}
|
|
360
|
+
function lt(e, t = {}, r = {}, n = {}, o = null) {
|
|
361
|
+
const { removed: i, added: s, updated: u } = C(r, n);
|
|
362
|
+
for (const l of i.concat(u)) {
|
|
363
|
+
const f = t?.[l];
|
|
364
|
+
f && e.removeEventListener(l, f);
|
|
361
365
|
}
|
|
362
366
|
const a = {};
|
|
363
|
-
for (const
|
|
364
|
-
a[
|
|
365
|
-
|
|
366
|
-
n[
|
|
367
|
+
for (const l of s.concat(u))
|
|
368
|
+
a[l] = N(
|
|
369
|
+
l,
|
|
370
|
+
n[l],
|
|
367
371
|
e,
|
|
368
|
-
|
|
372
|
+
o
|
|
369
373
|
);
|
|
370
374
|
return a;
|
|
371
375
|
}
|
|
372
|
-
function
|
|
373
|
-
const n = m(e),
|
|
374
|
-
for (const a of
|
|
376
|
+
function F(e, t, r) {
|
|
377
|
+
const n = m(e), o = m(t), i = e.el, s = R(n, o, j), u = r?.offset ?? 0;
|
|
378
|
+
for (const a of s)
|
|
375
379
|
if (a.op === g.NOOP) {
|
|
376
|
-
const { originalIndex:
|
|
377
|
-
y(n[
|
|
380
|
+
const { originalIndex: l, index: f } = a;
|
|
381
|
+
y(n[l], o[f], i, r);
|
|
378
382
|
}
|
|
379
|
-
for (const a of
|
|
383
|
+
for (const a of s)
|
|
380
384
|
switch (a.op) {
|
|
381
385
|
case g.MOVE: {
|
|
382
|
-
const { from:
|
|
383
|
-
E && (i.insertBefore(E, v), y(n[
|
|
386
|
+
const { from: l, index: f } = a, E = n[l].el, v = i.childNodes[f + u];
|
|
387
|
+
E && (i.insertBefore(E, v), y(n[l], o[f], i, r));
|
|
384
388
|
break;
|
|
385
389
|
}
|
|
386
390
|
case g.REMOVE: {
|
|
387
|
-
const { item:
|
|
388
|
-
p(
|
|
391
|
+
const { item: l } = a;
|
|
392
|
+
p(l);
|
|
389
393
|
break;
|
|
390
394
|
}
|
|
391
395
|
case g.ADD: {
|
|
392
|
-
const { index:
|
|
393
|
-
h(f, i,
|
|
396
|
+
const { index: l, item: f } = a;
|
|
397
|
+
h(f, i, l + u, r);
|
|
394
398
|
break;
|
|
395
399
|
}
|
|
396
400
|
}
|
|
@@ -404,10 +408,10 @@ function ft(e, t, r) {
|
|
|
404
408
|
p(e), h(t, document.body, null, r);
|
|
405
409
|
return;
|
|
406
410
|
}
|
|
407
|
-
|
|
411
|
+
F(e, t, r);
|
|
408
412
|
}
|
|
409
413
|
const ht = (e) => e.isProvider, dt = (e) => e.isConsumer;
|
|
410
|
-
class
|
|
414
|
+
class T {
|
|
411
415
|
isMounted = !1;
|
|
412
416
|
vdom = null;
|
|
413
417
|
hostEl = null;
|
|
@@ -470,8 +474,8 @@ class k {
|
|
|
470
474
|
return this.vdom?.type === c.FRAGMENT && this.hostEl && this.firstElement ? Array.from(this.hostEl.children).indexOf(this.firstElement) : 0;
|
|
471
475
|
}
|
|
472
476
|
updateProps(t) {
|
|
473
|
-
const n = { ...this.getDefaultProps(), ...this.props, ...t },
|
|
474
|
-
this.props = n, !this.shouldComponentUpdate(
|
|
477
|
+
const n = { ...this.getDefaultProps(), ...this.props, ...t }, o = this.props;
|
|
478
|
+
this.props = n, !this.shouldComponentUpdate(o, n) && (ht(this) && this.notify(), this.patch(o, this.state));
|
|
475
479
|
}
|
|
476
480
|
setState(t) {
|
|
477
481
|
const r = this.state;
|
|
@@ -485,7 +489,7 @@ class k {
|
|
|
485
489
|
throw new Error("Component is already mounted");
|
|
486
490
|
dt(this) && !this.subscribedProvider && this.subscribeToProvider(), this.updateContext();
|
|
487
491
|
try {
|
|
488
|
-
this.vdom = this.render(), h(this.vdom, t, r, this), this.
|
|
492
|
+
this.vdom = this.render(), this.hostEl = t, h(this.vdom, t, r, this), this.isMounted = !0;
|
|
489
493
|
} catch (n) {
|
|
490
494
|
this.handleError(n, "mount");
|
|
491
495
|
}
|
|
@@ -538,36 +542,42 @@ class k {
|
|
|
538
542
|
handleError(t, r) {
|
|
539
543
|
console.log("handleError");
|
|
540
544
|
const n = this.findClosestErrorBoundary();
|
|
541
|
-
if (console.log("errorBoundary", n),
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
545
|
+
if (console.log("errorBoundary", n), n) {
|
|
546
|
+
console.log("Found error boundary");
|
|
547
|
+
const i = n.constructor;
|
|
548
|
+
if (i.getDerivedStateFromError) {
|
|
549
|
+
console.log("Calling getDerivedStateFromError");
|
|
550
|
+
const s = i.getDerivedStateFromError(t);
|
|
551
|
+
n.state = { ...n.state, ...s };
|
|
552
|
+
}
|
|
553
|
+
if ((r === "patch" || n.isMounted) && (console.log("Calling componentDidCatch"), n.didCatch(t, {
|
|
554
|
+
phase: r,
|
|
555
|
+
failedComponent: this.constructor.name,
|
|
556
|
+
componentStack: this.getComponentStack()
|
|
557
|
+
})), n.hostEl) {
|
|
558
|
+
console.log("Rendering fallback UI");
|
|
559
|
+
try {
|
|
560
|
+
const s = n.render();
|
|
561
|
+
if (s)
|
|
562
|
+
if (n.vdom)
|
|
563
|
+
console.log("Patching ErrorBoundary"), y(n.vdom, s, n.hostEl, n);
|
|
564
|
+
else {
|
|
565
|
+
console.log("Mounting ErrorBoundary fallback");
|
|
566
|
+
const u = n.parent?.offset || 0;
|
|
567
|
+
n.hostEl && n.hostEl.children.length > 0 && Array.from(n.hostEl.children).forEach((a) => {
|
|
568
|
+
a.remove();
|
|
569
|
+
}), h(s, n.hostEl, u, n.parent), n.vdom = s, n.isMounted = !0;
|
|
570
|
+
}
|
|
571
|
+
} catch (s) {
|
|
572
|
+
console.error("Error during ErrorBoundary recovery:", s), n.parent && n.parent.handleError(s, r);
|
|
563
573
|
}
|
|
564
574
|
}
|
|
565
575
|
return;
|
|
566
576
|
}
|
|
567
|
-
console.log(
|
|
568
|
-
const
|
|
569
|
-
if (
|
|
570
|
-
const i =
|
|
577
|
+
console.log("No error boundary found, handling locally");
|
|
578
|
+
const o = this.constructor;
|
|
579
|
+
if (o.getDerivedStateFromError) {
|
|
580
|
+
const i = o.getDerivedStateFromError(t);
|
|
571
581
|
this.state = { ...this.state, ...i };
|
|
572
582
|
}
|
|
573
583
|
d(() => {
|
|
@@ -604,31 +614,31 @@ class k {
|
|
|
604
614
|
}
|
|
605
615
|
}
|
|
606
616
|
function yt(e) {
|
|
607
|
-
class t extends
|
|
617
|
+
class t extends T {
|
|
608
618
|
isProvider = !0;
|
|
609
619
|
render() {
|
|
610
|
-
let
|
|
611
|
-
return Array.isArray(this.props.children) ?
|
|
620
|
+
let o = [];
|
|
621
|
+
return Array.isArray(this.props.children) ? o = this.props.children : this.props.children ? o = [this.props.children] : o = [], B(o);
|
|
612
622
|
}
|
|
613
623
|
}
|
|
614
|
-
class r extends
|
|
624
|
+
class r extends T {
|
|
615
625
|
static contextType = {
|
|
616
626
|
Provider: t,
|
|
617
627
|
defaultValue: e
|
|
618
628
|
};
|
|
619
629
|
isConsumer = !0;
|
|
620
630
|
render() {
|
|
621
|
-
let
|
|
622
|
-
if (Array.isArray(
|
|
623
|
-
if (
|
|
624
|
-
|
|
631
|
+
let o = this.props.children;
|
|
632
|
+
if (Array.isArray(o))
|
|
633
|
+
if (o.length === 1 && typeof o[0] == "function")
|
|
634
|
+
o = o[0];
|
|
625
635
|
else
|
|
626
636
|
throw new Error(
|
|
627
637
|
"Consumer: expected single function child, got array"
|
|
628
638
|
);
|
|
629
|
-
if (typeof
|
|
639
|
+
if (typeof o != "function")
|
|
630
640
|
throw new Error("Consumer: children is not a function");
|
|
631
|
-
return
|
|
641
|
+
return o(this.context);
|
|
632
642
|
}
|
|
633
643
|
}
|
|
634
644
|
return {
|
|
@@ -649,15 +659,15 @@ function gt(e = null) {
|
|
|
649
659
|
}
|
|
650
660
|
function vt(e, t) {
|
|
651
661
|
const r = Array.isArray(e) ? e : [e];
|
|
652
|
-
return
|
|
662
|
+
return U(r, t);
|
|
653
663
|
}
|
|
654
664
|
export {
|
|
655
|
-
|
|
665
|
+
T as Component,
|
|
656
666
|
yt as createContext,
|
|
657
667
|
vt as createPortal,
|
|
658
668
|
gt as createRef,
|
|
659
669
|
Pt as h,
|
|
660
|
-
|
|
670
|
+
B as hFragment,
|
|
661
671
|
Ot as hString,
|
|
662
672
|
Et as render
|
|
663
673
|
};
|