ddd-react 1.6.1 → 1.6.2

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 +33 -33
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -205,8 +205,8 @@ function Q(e, t, r, n) {
205
205
  }
206
206
  function Z(e, t, r, n) {
207
207
  const { tag: s, children: i } = e, f = s === "svg" || t instanceof SVGElement ? document.createElementNS("http://www.w3.org/2000/svg", s) : document.createElement(s);
208
- V(f, e, n), e.el = f, i?.forEach((a) => {
209
- h(a, f, null, n);
208
+ V(f, e, n), e.el = f, i?.forEach((l) => {
209
+ h(l, f, null, n);
210
210
  }), j(f, t, r);
211
211
  }
212
212
  function V(e, t, r) {
@@ -285,11 +285,11 @@ function m(e, t, r, n = null) {
285
285
  break;
286
286
  }
287
287
  case c.COMPONENT: {
288
- at(e, t);
288
+ lt(e, t);
289
289
  break;
290
290
  }
291
291
  case c.PORTAL: {
292
- lt(e, t, n);
292
+ at(e, t, n);
293
293
  break;
294
294
  }
295
295
  }
@@ -311,12 +311,12 @@ function it(e, t, r) {
311
311
  on: o,
312
312
  ...f
313
313
  } = e.props ?? {}, {
314
- class: a,
314
+ class: l,
315
315
  style: u,
316
- on: l,
316
+ on: a,
317
317
  ...d
318
318
  } = t.props ?? {}, { listeners: E } = e;
319
- ot(n, f, d), ct(n, s, a), ut(
319
+ ot(n, f, d), ct(n, s, l), ut(
320
320
  n,
321
321
  i,
322
322
  u
@@ -324,7 +324,7 @@ function it(e, t, r) {
324
324
  n,
325
325
  E,
326
326
  o ?? {},
327
- l ?? {},
327
+ a ?? {},
328
328
  r
329
329
  );
330
330
  }
@@ -333,11 +333,11 @@ function ot(e, t = {}, r = {}) {
333
333
  n !== s && (n && typeof n == "object" && "current" in n && (n.current = null), s && typeof s == "object" && "current" in s && (s.current = e));
334
334
  const i = { ...t }, o = { ...r };
335
335
  delete i.ref, delete o.ref;
336
- const { added: f, removed: a, updated: u } = T(i, o);
337
- for (const l of a)
338
- w(e, l);
339
- for (const l of f.concat(u))
340
- L(e, l, o[l]);
336
+ const { added: f, removed: l, updated: u } = T(i, o);
337
+ for (const a of l)
338
+ w(e, a);
339
+ for (const a of f.concat(u))
340
+ L(e, a, o[a]);
341
341
  }
342
342
  function ct(e, t, r) {
343
343
  const n = M(t), s = M(r), { added: i, removed: o } = F(n, s);
@@ -356,50 +356,50 @@ function ut(e, t = {}, r = {}) {
356
356
  function ft(e, t = {}, r = {}, n = {}, s = null) {
357
357
  const { removed: i, added: o, updated: f } = T(r, n);
358
358
  for (const u of i.concat(f)) {
359
- const l = t?.[u];
360
- l && e.removeEventListener(u, l);
359
+ const a = t?.[u];
360
+ a && e.removeEventListener(u, a);
361
361
  }
362
- const a = {};
362
+ const l = {};
363
363
  for (const u of o.concat(f))
364
- a[u] = S(
364
+ l[u] = S(
365
365
  u,
366
366
  n[u],
367
367
  e,
368
368
  s
369
369
  );
370
- return a;
370
+ return l;
371
371
  }
372
372
  function R(e, t, r) {
373
373
  const n = v(e), s = v(t), i = e.el, o = x(n, s, D), f = r?.offset ?? 0;
374
- for (const a of o)
375
- if (a.op === y.NOOP) {
376
- const { originalIndex: u, index: l } = a;
377
- m(n[u], s[l], i, r);
374
+ for (const l of o)
375
+ if (l.op === y.NOOP) {
376
+ const { originalIndex: u, index: a } = l;
377
+ m(n[u], s[a], i, r);
378
378
  }
379
- for (const a of o)
380
- switch (a.op) {
379
+ for (const l of o)
380
+ switch (l.op) {
381
381
  case y.MOVE: {
382
- const { from: u, index: l } = a, d = n[u].el, E = i.childNodes[l + f];
383
- d && (i.insertBefore(d, E), m(n[u], s[l], i, r));
382
+ const { from: u, index: a } = l, d = n[u].el, E = i.childNodes[a + f];
383
+ d && (i.insertBefore(d, E), m(n[u], s[a], i, r));
384
384
  break;
385
385
  }
386
386
  case y.REMOVE: {
387
- const { item: u } = a;
387
+ const { item: u } = l;
388
388
  p(u);
389
389
  break;
390
390
  }
391
391
  case y.ADD: {
392
- const { index: u, item: l } = a;
393
- h(l, i, u + f, r);
392
+ const { index: u, item: a } = l;
393
+ h(a, i, u + f, r);
394
394
  break;
395
395
  }
396
396
  }
397
397
  }
398
- function at(e, t) {
398
+ function lt(e, t) {
399
399
  const { component: r } = e, { props: n } = A(t);
400
400
  r.updateProps(n), t.component = r, t.el = r.firstElement;
401
401
  }
402
- function lt(e, t, r) {
402
+ function at(e, t, r) {
403
403
  if (e.container !== t.container) {
404
404
  p(e), h(t, document.body, null, r);
405
405
  return;
@@ -475,9 +475,9 @@ class k {
475
475
  }
476
476
  updateContext() {
477
477
  const t = Object.getPrototypeOf(this).constructor.contextType;
478
- if (t !== null) {
478
+ if (t != null) {
479
479
  if (this.subscribedProvider)
480
- return this.context = this.subscribedProvider.props.value, !0;
480
+ return console.log("this.subscribedProvider", this.subscribedProvider), this.context = this.subscribedProvider.props.value, !0;
481
481
  this.context = t.defaultValue;
482
482
  }
483
483
  return !1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ddd-react",
3
- "version": "1.6.1",
3
+ "version": "1.6.2",
4
4
  "scripts": {
5
5
  "test": "echo \"Error: no test specified\" && exit 1",
6
6
  "type-check": "tsc --noEmit",