ddd-react 1.10.11 → 1.10.12

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.
Files changed (2) hide show
  1. package/dist/index.mjs +173 -188
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { D as u, e as m, a as R, A as g, b as x, h as U, c as B } from "./h-BbaMkkC7.mjs";
1
+ import { D as c, e as m, a as R, A as g, b as x, h as U, c as B } 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,27 +31,27 @@ 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 o = r[n];
35
- if (!(o === "_owner" && e.$$typeof) && !b(e[o], t[o]))
34
+ const s = r[n];
35
+ if (!(s === "_owner" && e.$$typeof) && !b(e[s], t[s]))
36
36
  return !1;
37
37
  }
38
38
  return !0;
39
39
  }
40
40
  return !1;
41
41
  }
42
- function M(e, t, r, n = null) {
43
- function o(s) {
44
- const i = s;
45
- n ? t.call(n, i) : t(i);
42
+ function N(e, t, r, n = null) {
43
+ function s(i) {
44
+ const o = i;
45
+ n ? t.call(n, o) : t(o);
46
46
  }
47
- return r.addEventListener(e, o), o;
47
+ return r.addEventListener(e, s), s;
48
48
  }
49
49
  function I(e = {}, t, r = null) {
50
50
  const n = {};
51
- return Object.entries(e).forEach(([o, s]) => {
52
- n[o] = M(
53
- o,
51
+ return Object.entries(e).forEach(([s, i]) => {
52
+ n[s] = N(
54
53
  s,
54
+ i,
55
55
  t,
56
56
  r
57
57
  );
@@ -65,23 +65,23 @@ function $(e = {}, t) {
65
65
  function p(e) {
66
66
  const { type: t } = e;
67
67
  switch (t) {
68
- case u.TEXT: {
68
+ case c.TEXT: {
69
69
  q(e);
70
70
  break;
71
71
  }
72
- case u.ELEMENT: {
72
+ case c.ELEMENT: {
73
73
  G(e);
74
74
  break;
75
75
  }
76
- case u.FRAGMENT: {
76
+ case c.FRAGMENT: {
77
77
  _(e);
78
78
  break;
79
79
  }
80
- case u.COMPONENT: {
80
+ case c.COMPONENT: {
81
81
  e.component?.unmount();
82
82
  break;
83
83
  }
84
- case u.PORTAL: {
84
+ case c.PORTAL: {
85
85
  X(e);
86
86
  break;
87
87
  }
@@ -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: 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);
98
+ const { el: t, children: r, listeners: n, props: s } = e;
99
+ s?.ref && typeof s.ref == "object" && "current" in s.ref && (s.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;
@@ -106,19 +106,19 @@ function X(e) {
106
106
  const { children: t } = e;
107
107
  t && t.forEach(p);
108
108
  }
109
- function N(e, t, r) {
109
+ function M(e, t, r) {
110
110
  e.style[t] = r.toString();
111
111
  }
112
112
  function J(e, t) {
113
113
  e.style[t] = null;
114
114
  }
115
115
  function K(e, t) {
116
- const { class: r, style: n, ...o } = t;
117
- r && W(e, r), n && Object.entries(n).forEach(([s, i]) => {
118
- N(e, s, i);
116
+ const { class: r, style: n, ...s } = t;
117
+ r && W(e, r), n && Object.entries(n).forEach(([i, o]) => {
118
+ M(e, i, o);
119
119
  });
120
- for (const [s, i] of Object.entries(o))
121
- w(e, s, i);
120
+ for (const [i, o] of Object.entries(s))
121
+ w(e, i, o);
122
122
  }
123
123
  function W(e, t) {
124
124
  if (e instanceof SVGElement) {
@@ -161,31 +161,31 @@ function H() {
161
161
  }
162
162
  P = !1;
163
163
  }
164
- function C(e) {
164
+ function A(e) {
165
165
  const { on: t = {}, ...r } = e.props;
166
166
  return delete r.key, { props: r, events: t };
167
167
  }
168
168
  function h(e, t, r = null, n = null) {
169
169
  switch (e.type) {
170
- case u.TEXT: {
170
+ case c.TEXT: {
171
171
  z(e, t, r);
172
172
  break;
173
173
  }
174
- case u.ELEMENT: {
174
+ case c.ELEMENT: {
175
175
  Z(e, t, r, n);
176
176
  break;
177
177
  }
178
- case u.FRAGMENT: {
178
+ case c.FRAGMENT: {
179
179
  Q(e, t, r, n);
180
180
  break;
181
181
  }
182
- case u.COMPONENT: {
182
+ case c.COMPONENT: {
183
183
  tt(e, t, r, n);
184
- const o = e.component;
185
- o && d(() => o.didMount());
184
+ const s = e.component;
185
+ s && d(() => s.didMount());
186
186
  break;
187
187
  }
188
- case u.PORTAL: {
188
+ case c.PORTAL: {
189
189
  et(e, n);
190
190
  break;
191
191
  }
@@ -194,28 +194,28 @@ function h(e, t, r = null, n = null) {
194
194
  }
195
195
  }
196
196
  function z(e, t, r) {
197
- const { value: n } = e, o = document.createTextNode(n);
198
- e.el = o, L(o, t, r);
197
+ const { value: n } = e, s = document.createTextNode(n);
198
+ e.el = s, L(s, t, r);
199
199
  }
200
200
  function Q(e, t, r, n) {
201
- const { children: o } = e;
202
- e.el = t, o?.forEach((s, i) => {
203
- h(s, t, r != null ? r + i : null, n);
201
+ const { children: s } = e;
202
+ e.el = t, s?.forEach((i, o) => {
203
+ h(i, t, r != null ? r + o : null, n);
204
204
  });
205
205
  }
206
206
  function Z(e, t, r, n) {
207
- const { tag: o, children: s } = e, c = o === "svg" || t instanceof SVGElement ? document.createElementNS("http://www.w3.org/2000/svg", o) : document.createElement(o);
208
- V(c, e, n), e.el = c, s?.forEach((a) => {
209
- h(a, c, null, n);
210
- }), L(c, t, r);
207
+ const { tag: s, children: i } = e, a = s === "svg" || t instanceof SVGElement ? document.createElementNS("http://www.w3.org/2000/svg", s) : document.createElement(s);
208
+ V(a, e, n), e.el = a, i?.forEach((l) => {
209
+ h(l, a, null, n);
210
+ }), L(a, t, r);
211
211
  }
212
212
  function V(e, t, r) {
213
- const { props: n, events: o } = C(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);
213
+ const { props: n, events: s } = A(t);
214
+ n.ref && typeof n.ref == "object" && "current" in n.ref && (n.ref.current = e, delete n.ref), t.listeners = I(s, e, r), K(e, n);
215
215
  }
216
216
  function tt(e, t, r, n) {
217
- const o = e.tag, { props: s } = C(e), i = new o(s, n);
218
- i.mount(t, r), e.component = i, e.el = i.firstElement || null;
217
+ const s = e.tag, { props: i } = A(e), o = new s(i, n);
218
+ o.mount(t, r), e.component = o, e.el = o.firstElement || null;
219
219
  }
220
220
  function L(e, t, r) {
221
221
  if (r == null) {
@@ -229,66 +229,66 @@ function L(e, t, r) {
229
229
  }
230
230
  function et(e, t) {
231
231
  const { children: r, container: n } = e;
232
- r?.forEach((o) => {
233
- h(o, n, null, t);
232
+ r?.forEach((s) => {
233
+ h(s, n, null, t);
234
234
  });
235
235
  }
236
236
  function j(e, t) {
237
237
  if (e.type !== t.type)
238
238
  return !1;
239
- if (e.type === u.ELEMENT) {
239
+ if (e.type === c.ELEMENT) {
240
240
  const r = e, n = t, {
241
- tag: o,
242
- props: { key: s }
241
+ tag: s,
242
+ props: { key: i }
243
243
  } = r, {
244
- tag: i,
245
- props: { key: c }
244
+ tag: o,
245
+ props: { key: a }
246
246
  } = n;
247
- return o === i && s === c;
247
+ return s === o && i === a;
248
248
  }
249
- if (e.type === u.COMPONENT) {
250
- const r = e, n = t, { tag: o } = r, { tag: s } = n;
251
- return o === s;
249
+ if (e.type === c.COMPONENT) {
250
+ const r = e, n = t, { tag: s } = r, { tag: i } = n;
251
+ return s === i;
252
252
  }
253
- if (e.type === u.PORTAL) {
253
+ if (e.type === c.PORTAL) {
254
254
  const r = e, n = t;
255
255
  return r.container === n.container;
256
256
  }
257
257
  return !0;
258
258
  }
259
259
  function S(e, t) {
260
- const r = Object.keys(e), n = Object.keys(t), o = [], s = [];
261
- for (const i of n)
262
- i in e ? e[i] !== t[i] && s.push(i) : o.push(i);
260
+ const r = Object.keys(e), n = Object.keys(t), s = [], i = [];
261
+ for (const o of n)
262
+ o in e ? e[o] !== t[o] && i.push(o) : s.push(o);
263
263
  return {
264
- added: o,
265
- removed: r.filter((i) => !(i in t)),
266
- updated: s
264
+ added: s,
265
+ removed: r.filter((o) => !(o in t)),
266
+ updated: i
267
267
  };
268
268
  }
269
269
  function rt(e) {
270
270
  return e !== "";
271
271
  }
272
- function A(e) {
272
+ function C(e) {
273
273
  return rt(e.trim());
274
274
  }
275
275
  function y(e, t, r, n = null) {
276
276
  if (!j(e, t)) {
277
- const o = nt(r, e.el);
278
- return p(e), h(t, r, o, n), t;
277
+ const s = nt(r, e.el);
278
+ return p(e), h(t, r, s, n), t;
279
279
  }
280
280
  switch (t.el = e.el, t.type) {
281
- case u.TEXT:
282
- return ot(e, t), t;
283
- case u.ELEMENT: {
284
- st(e, t, n);
281
+ case c.TEXT:
282
+ return st(e, t), t;
283
+ case c.ELEMENT: {
284
+ ot(e, t, n);
285
285
  break;
286
286
  }
287
- case u.COMPONENT: {
288
- at(e, t);
287
+ case c.COMPONENT: {
288
+ lt(e, t);
289
289
  break;
290
290
  }
291
- case u.PORTAL: {
291
+ case c.PORTAL: {
292
292
  ft(e, t, n);
293
293
  break;
294
294
  }
@@ -300,103 +300,103 @@ function nt(e, t) {
300
300
  const r = Array.from(e.childNodes).indexOf(t);
301
301
  return r < 0 ? null : r;
302
302
  }
303
- function ot(e, t) {
304
- const r = e.el, { value: n } = e, { value: o } = t;
305
- n !== o && r && (r.nodeValue = o);
303
+ function st(e, t) {
304
+ const r = e.el, { value: n } = e, { value: s } = t;
305
+ n !== s && r && (r.nodeValue = s);
306
306
  }
307
- function st(e, t, r) {
307
+ function ot(e, t, r) {
308
308
  const n = e.el, {
309
- class: o,
310
- style: s,
311
- on: i,
312
- ...c
309
+ class: s,
310
+ style: i,
311
+ on: o,
312
+ ...a
313
313
  } = e.props ?? {}, {
314
- class: a,
315
- style: l,
314
+ class: l,
315
+ style: u,
316
316
  on: f,
317
317
  ...E
318
318
  } = t.props ?? {}, { listeners: v } = e;
319
- it(n, c, E), ct(n, o, a), ut(
319
+ it(n, a, E), ct(n, s, l), ut(
320
320
  n,
321
- s,
322
- l
323
- ), t.listeners = lt(
321
+ i,
322
+ u
323
+ ), t.listeners = at(
324
324
  n,
325
325
  v,
326
- i ?? {},
326
+ o ?? {},
327
327
  f ?? {},
328
328
  r
329
329
  );
330
330
  }
331
331
  function it(e, t = {}, r = {}) {
332
- const n = t.ref, o = r.ref;
333
- n !== o && (n && typeof n == "object" && "current" in n && (n.current = null), o && typeof o == "object" && "current" in o && (o.current = e));
334
- const s = { ...t }, i = { ...r };
335
- delete s.ref, delete i.ref;
336
- const { added: c, removed: a, updated: l } = S(s, i);
337
- for (const f of a)
332
+ const n = t.ref, s = r.ref;
333
+ n !== s && (n && typeof n == "object" && "current" in n && (n.current = null), s && typeof s == "object" && "current" in s && (s.current = e));
334
+ const i = { ...t }, o = { ...r };
335
+ delete i.ref, delete o.ref;
336
+ const { added: a, removed: l, updated: u } = S(i, o);
337
+ for (const f of l)
338
338
  D(e, f);
339
- for (const f of c.concat(l))
340
- w(e, f, i[f]);
339
+ for (const f of a.concat(u))
340
+ w(e, f, o[f]);
341
341
  }
342
342
  function ct(e, t, r) {
343
- const n = k(t), o = k(r), { added: s, removed: i } = x(n, o);
344
- i.length > 0 && e.classList.remove(...i), s.length > 0 && e.classList.add(...s);
343
+ const n = T(t), s = T(r), { added: i, removed: o } = x(n, s);
344
+ o.length > 0 && e.classList.remove(...o), i.length > 0 && e.classList.add(...i);
345
345
  }
346
- function k(e = "") {
347
- return Array.isArray(e) ? e.filter(A) : String(e).split(/(\s+)/).filter(A);
346
+ function T(e = "") {
347
+ return Array.isArray(e) ? e.filter(C) : String(e).split(/(\s+)/).filter(C);
348
348
  }
349
349
  function ut(e, t = {}, r = {}) {
350
- const { added: n, removed: o, updated: s } = S(t, r);
351
- for (const i of o)
352
- J(e, i);
353
- for (const i of n.concat(s))
354
- N(e, i, r[i]);
355
- }
356
- function lt(e, t = {}, r = {}, n = {}, o = null) {
357
- const { removed: s, added: i, updated: c } = S(r, n);
358
- for (const l of s.concat(c)) {
359
- const f = t?.[l];
360
- f && e.removeEventListener(l, f);
361
- }
362
- const a = {};
363
- for (const l of i.concat(c))
364
- a[l] = M(
365
- l,
366
- n[l],
350
+ const { added: n, removed: s, updated: i } = S(t, r);
351
+ for (const o of s)
352
+ J(e, o);
353
+ for (const o of n.concat(i))
354
+ M(e, o, r[o]);
355
+ }
356
+ function at(e, t = {}, r = {}, n = {}, s = null) {
357
+ const { removed: i, added: o, updated: a } = S(r, n);
358
+ for (const u of i.concat(a)) {
359
+ const f = t?.[u];
360
+ f && e.removeEventListener(u, f);
361
+ }
362
+ const l = {};
363
+ for (const u of o.concat(a))
364
+ l[u] = N(
365
+ u,
366
+ n[u],
367
367
  e,
368
- o
368
+ s
369
369
  );
370
- return a;
370
+ return l;
371
371
  }
372
372
  function F(e, t, r) {
373
- const n = m(e), o = m(t), s = e.el, i = R(n, o, j), c = r?.offset ?? 0;
374
- for (const a of i)
375
- if (a.op === g.NOOP) {
376
- const { originalIndex: l, index: f } = a;
377
- y(n[l], o[f], s, r);
373
+ const n = m(e), s = m(t), i = e.el, o = R(n, s, j), a = r?.offset ?? 0;
374
+ for (const l of o)
375
+ if (l.op === g.NOOP) {
376
+ const { originalIndex: u, index: f } = l;
377
+ y(n[u], s[f], i, r);
378
378
  }
379
- for (const a of i)
380
- switch (a.op) {
379
+ for (const l of o)
380
+ switch (l.op) {
381
381
  case g.MOVE: {
382
- const { from: l, index: f } = a, E = n[l].el, v = s.childNodes[f + c];
383
- E && (s.insertBefore(E, v), y(n[l], o[f], s, r));
382
+ const { from: u, index: f } = l, E = n[u].el, v = i.childNodes[f + a];
383
+ E && (i.insertBefore(E, v), y(n[u], s[f], i, r));
384
384
  break;
385
385
  }
386
386
  case g.REMOVE: {
387
- const { item: l } = a;
388
- p(l);
387
+ const { item: u } = l;
388
+ p(u);
389
389
  break;
390
390
  }
391
391
  case g.ADD: {
392
- const { index: l, item: f } = a;
393
- h(f, s, l + c, r);
392
+ const { index: u, item: f } = l;
393
+ h(f, i, u + a, r);
394
394
  break;
395
395
  }
396
396
  }
397
397
  }
398
- function at(e, t) {
399
- const { component: r } = e, { props: n } = C(t);
398
+ function lt(e, t) {
399
+ const { component: r } = e, { props: n } = A(t);
400
400
  r.updateProps(n), t.component = r, t.el = r.firstElement;
401
401
  }
402
402
  function ft(e, t, r) {
@@ -407,7 +407,7 @@ function ft(e, t, r) {
407
407
  F(e, t, r);
408
408
  }
409
409
  const dt = (e) => e.isProvider, ht = (e) => e.isConsumer;
410
- class T {
410
+ class k {
411
411
  isMounted = !1;
412
412
  vdom = null;
413
413
  hostEl = null;
@@ -461,17 +461,17 @@ class T {
461
461
  return b(t, r);
462
462
  }
463
463
  get elements() {
464
- return this.vdom == null ? [] : this.vdom.type === u.FRAGMENT ? m(this.vdom).flatMap((t) => t.type === u.COMPONENT && t.component ? t.component.elements : t.el ? [t.el] : []) : this.vdom.el ? [this.vdom.el] : [];
464
+ return this.vdom == null ? [] : this.vdom.type === c.FRAGMENT ? m(this.vdom).flatMap((t) => t.type === c.COMPONENT && t.component ? t.component.elements : t.el ? [t.el] : []) : this.vdom.el ? [this.vdom.el] : [];
465
465
  }
466
466
  get firstElement() {
467
467
  return this.elements[0];
468
468
  }
469
469
  get offset() {
470
- return this.vdom?.type === u.FRAGMENT && this.hostEl && this.firstElement ? Array.from(this.hostEl.children).indexOf(this.firstElement) : 0;
470
+ return this.vdom?.type === c.FRAGMENT && this.hostEl && this.firstElement ? Array.from(this.hostEl.children).indexOf(this.firstElement) : 0;
471
471
  }
472
472
  updateProps(t) {
473
- const n = { ...this.getDefaultProps(), ...this.props, ...t }, o = this.props;
474
- this.props = n, !this.shouldComponentUpdate(o, n) && (dt(this) && this.notify(), this.patch(o, this.state));
473
+ const n = { ...this.getDefaultProps(), ...this.props, ...t }, s = this.props;
474
+ this.props = n, !this.shouldComponentUpdate(s, n) && (dt(this) && this.notify(), this.patch(s, this.state));
475
475
  }
476
476
  setState(t) {
477
477
  const r = this.state;
@@ -540,49 +540,34 @@ class T {
540
540
  const n = this.findClosestErrorBoundary();
541
541
  if (console.log("errorBoundary", n), n) {
542
542
  console.log("Found error boundary");
543
- const s = n.constructor, i = { ...n.state };
544
- if (s.getDerivedStateFromError) {
543
+ const i = n.constructor;
544
+ if (i.getDerivedStateFromError) {
545
545
  console.log("Calling getDerivedStateFromError");
546
- const c = s.getDerivedStateFromError(t);
547
- n.state = { ...n.state, ...c };
546
+ const o = i.getDerivedStateFromError(t);
547
+ n.state = { ...n.state, ...o };
548
548
  }
549
- if (n.hostEl) {
549
+ if (n.hostEl && n.isMounted) {
550
550
  console.log("Rendering fallback UI");
551
551
  try {
552
- const c = n.render();
553
- if (c)
554
- if (n.vdom) {
555
- console.log("ErrorBoundary already mounted, patching");
556
- const a = n.vdom;
557
- n.vdom = y(a, c, n.hostEl, n), d(() => {
558
- n.didCatch(t, {
559
- phase: r,
560
- failedComponent: this.constructor.name,
561
- componentStack: this.getComponentStack()
562
- }), n.didUpdate(n.props, i);
563
- });
564
- } else {
565
- for (console.log("Mounting ErrorBoundary fallback (first time)"); n.hostEl.firstChild; )
566
- n.hostEl.removeChild(n.hostEl.firstChild);
567
- h(c, n.hostEl, null, n.parent), n.vdom = c, n.isMounted = !0, d(() => {
568
- n.didCatch(t, {
569
- phase: r,
570
- failedComponent: this.constructor.name,
571
- componentStack: this.getComponentStack()
572
- }), n.didMount();
573
- });
574
- }
575
- } catch (c) {
576
- console.error("Error during ErrorBoundary recovery:", c), n.parent && n.parent.handleError(c, r);
552
+ const o = n.render();
553
+ o && (n.vdom = y(n.vdom, o, n.hostEl, n), d(() => {
554
+ n.didCatch(t, {
555
+ phase: r,
556
+ failedComponent: this.constructor.name,
557
+ componentStack: this.getComponentStack()
558
+ });
559
+ }));
560
+ } catch (o) {
561
+ console.error("Error during ErrorBoundary recovery:", o), n.parent && n.parent.handleError(o, r);
577
562
  }
578
563
  }
579
564
  return;
580
565
  }
581
566
  console.log("No error boundary found, handling locally");
582
- const o = this.constructor;
583
- if (o.getDerivedStateFromError) {
584
- const s = o.getDerivedStateFromError(t);
585
- this.state = { ...this.state, ...s };
567
+ const s = this.constructor;
568
+ if (s.getDerivedStateFromError) {
569
+ const i = s.getDerivedStateFromError(t);
570
+ this.state = { ...this.state, ...i };
586
571
  }
587
572
  d(() => {
588
573
  if (this.didCatch(t, {
@@ -590,10 +575,10 @@ class T {
590
575
  componentStack: this.getComponentStack()
591
576
  }), this.hostEl && this.isMounted)
592
577
  try {
593
- const s = this.render();
594
- s && y(this.vdom, s, this.hostEl, this);
595
- } catch (s) {
596
- console.error("Error during error recovery render:", s);
578
+ const i = this.render();
579
+ i && y(this.vdom, i, this.hostEl, this);
580
+ } catch (i) {
581
+ console.error("Error during error recovery render:", i);
597
582
  }
598
583
  });
599
584
  }
@@ -618,31 +603,31 @@ class T {
618
603
  }
619
604
  }
620
605
  function yt(e) {
621
- class t extends T {
606
+ class t extends k {
622
607
  isProvider = !0;
623
608
  render() {
624
- let o = [];
625
- return Array.isArray(this.props.children) ? o = this.props.children : this.props.children ? o = [this.props.children] : o = [], U(o);
609
+ let s = [];
610
+ return Array.isArray(this.props.children) ? s = this.props.children : this.props.children ? s = [this.props.children] : s = [], U(s);
626
611
  }
627
612
  }
628
- class r extends T {
613
+ class r extends k {
629
614
  static contextType = {
630
615
  Provider: t,
631
616
  defaultValue: e
632
617
  };
633
618
  isConsumer = !0;
634
619
  render() {
635
- let o = this.props.children;
636
- if (Array.isArray(o))
637
- if (o.length === 1 && typeof o[0] == "function")
638
- o = o[0];
620
+ let s = this.props.children;
621
+ if (Array.isArray(s))
622
+ if (s.length === 1 && typeof s[0] == "function")
623
+ s = s[0];
639
624
  else
640
625
  throw new Error(
641
626
  "Consumer: expected single function child, got array"
642
627
  );
643
- if (typeof o != "function")
628
+ if (typeof s != "function")
644
629
  throw new Error("Consumer: children is not a function");
645
- return o(this.context);
630
+ return s(this.context);
646
631
  }
647
632
  }
648
633
  return {
@@ -666,7 +651,7 @@ function vt(e, t) {
666
651
  return B(r, t);
667
652
  }
668
653
  export {
669
- T as Component,
654
+ k as Component,
670
655
  yt as createContext,
671
656
  vt as createPortal,
672
657
  gt as createRef,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ddd-react",
3
- "version": "1.10.11",
3
+ "version": "1.10.12",
4
4
  "scripts": {
5
5
  "test": "echo \"Error: no test specified\" && exit 1",
6
6
  "type-check": "tsc --noEmit",