@jsenv/plugin-toolbar 1.4.28 → 1.4.29

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.
@@ -15,19 +15,19 @@ l$2 = {
15
15
 
16
16
  var t$1,
17
17
  r$1,
18
- u$2,
18
+ u$1,
19
19
  i$1,
20
- o = 0,
20
+ o$1 = 0,
21
21
  f$1 = [],
22
22
  c$1 = l$2,
23
23
  e$1 = c$1.__b,
24
- a$1 = c$1.__r,
24
+ a$2 = c$1.__r,
25
25
  v$2 = c$1.diffed,
26
26
  l$1 = c$1.__c,
27
- m = c$1.unmount,
27
+ m$1 = c$1.unmount,
28
28
  s$1 = c$1.__;
29
29
  function d$2(n, t) {
30
- c$1.__h && c$1.__h(r$1, n, o || t), o = 0;
30
+ c$1.__h && c$1.__h(r$1, n, o$1 || t), o$1 = 0;
31
31
  var u = r$1.__H || (r$1.__H = {
32
32
  __: [],
33
33
  __h: []
@@ -50,17 +50,17 @@ c$1.__b = function (n) {
50
50
  }, c$1.__ = function (n, t) {
51
51
  n && t.__k && t.__k.__m && (n.__m = t.__k.__m), s$1 && s$1(n, t);
52
52
  }, c$1.__r = function (n) {
53
- a$1 && a$1(n), t$1 = 0;
53
+ a$2 && a$2(n), t$1 = 0;
54
54
  var i = (r$1 = n.__c).__H;
55
- i && (u$2 === r$1 ? (i.__h = [], r$1.__h = [], i.__.forEach(function (n) {
55
+ i && (u$1 === r$1 ? (i.__h = [], r$1.__h = [], i.__.forEach(function (n) {
56
56
  n.__N && (n.__ = n.__N), n.i = n.__N = void 0;
57
- })) : (i.__h.forEach(z), i.__h.forEach(B), i.__h = [], t$1 = 0)), u$2 = r$1;
57
+ })) : (i.__h.forEach(z), i.__h.forEach(B), i.__h = [], t$1 = 0)), u$1 = r$1;
58
58
  }, c$1.diffed = function (n) {
59
59
  v$2 && v$2(n);
60
60
  var t = n.__c;
61
61
  t && t.__H && (t.__H.__h.length && (1 !== f$1.push(t) && i$1 === c$1.requestAnimationFrame || ((i$1 = c$1.requestAnimationFrame) || w$1)(j)), t.__H.__.forEach(function (n) {
62
62
  n.i && (n.__H = n.i), n.i = void 0;
63
- })), u$2 = r$1 = null;
63
+ })), u$1 = r$1 = null;
64
64
  }, c$1.__c = function (n, t) {
65
65
  t.some(function (n) {
66
66
  try {
@@ -74,7 +74,7 @@ c$1.__b = function (n) {
74
74
  }
75
75
  }), l$1 && l$1(n, t);
76
76
  }, c$1.unmount = function (n) {
77
- m && m(n);
77
+ m$1 && m$1(n);
78
78
  var t,
79
79
  r = n.__c;
80
80
  r && r.__H && (r.__H.__.forEach(function (n) {
@@ -140,6 +140,15 @@ function t() {
140
140
  r--;
141
141
  if (t) throw i;
142
142
  }
143
+ function o(i) {
144
+ if (r > 0) return i();
145
+ r++;
146
+ try {
147
+ return i();
148
+ } finally {
149
+ t();
150
+ }
151
+ }
143
152
  let n, s;
144
153
  let r = 0,
145
154
  f = 0,
@@ -176,24 +185,24 @@ function c(i) {
176
185
  return t;
177
186
  }
178
187
  }
179
- function u$1(i) {
188
+ function u(i) {
180
189
  this.v = i;
181
190
  this.i = 0;
182
191
  this.n = void 0;
183
192
  this.t = void 0;
184
193
  }
185
- u$1.prototype.brand = i;
186
- u$1.prototype.h = function () {
194
+ u.prototype.brand = i;
195
+ u.prototype.h = function () {
187
196
  return !0;
188
197
  };
189
- u$1.prototype.S = function (i) {
198
+ u.prototype.S = function (i) {
190
199
  if (this.t !== i && void 0 === i.e) {
191
200
  i.x = this.t;
192
201
  if (void 0 !== this.t) this.t.e = i;
193
202
  this.t = i;
194
203
  }
195
204
  };
196
- u$1.prototype.U = function (i) {
205
+ u.prototype.U = function (i) {
197
206
  if (void 0 !== this.t) {
198
207
  const t = i.e,
199
208
  o = i.x;
@@ -208,7 +217,7 @@ u$1.prototype.U = function (i) {
208
217
  if (i === this.t) this.t = o;
209
218
  }
210
219
  };
211
- u$1.prototype.subscribe = function (i) {
220
+ u.prototype.subscribe = function (i) {
212
221
  return E(() => {
213
222
  const t = this.value,
214
223
  o = n;
@@ -220,16 +229,16 @@ u$1.prototype.subscribe = function (i) {
220
229
  }
221
230
  });
222
231
  };
223
- u$1.prototype.valueOf = function () {
232
+ u.prototype.valueOf = function () {
224
233
  return this.value;
225
234
  };
226
- u$1.prototype.toString = function () {
235
+ u.prototype.toString = function () {
227
236
  return this.value + "";
228
237
  };
229
- u$1.prototype.toJSON = function () {
238
+ u.prototype.toJSON = function () {
230
239
  return this.value;
231
240
  };
232
- u$1.prototype.peek = function () {
241
+ u.prototype.peek = function () {
233
242
  const i = n;
234
243
  n = void 0;
235
244
  try {
@@ -238,7 +247,7 @@ u$1.prototype.peek = function () {
238
247
  n = i;
239
248
  }
240
249
  };
241
- Object.defineProperty(u$1.prototype, "value", {
250
+ Object.defineProperty(u.prototype, "value", {
242
251
  get() {
243
252
  const i = c(this);
244
253
  if (void 0 !== i) i.i = this.i;
@@ -260,7 +269,7 @@ Object.defineProperty(u$1.prototype, "value", {
260
269
  }
261
270
  });
262
271
  function d$1(i) {
263
- return new u$1(i);
272
+ return new u(i);
264
273
  }
265
274
  function v$1(i) {
266
275
  for (let t = i.s; void 0 !== t; t = t.n) if (t.S.i !== t.i || !t.S.h() || t.S.i !== t.i) return !0;
@@ -278,7 +287,7 @@ function l(i) {
278
287
  }
279
288
  }
280
289
  }
281
- function y(i) {
290
+ function y$1(i) {
282
291
  let t,
283
292
  o = i.s;
284
293
  while (void 0 !== o) {
@@ -294,14 +303,14 @@ function y(i) {
294
303
  }
295
304
  i.s = t;
296
305
  }
297
- function a(i) {
298
- u$1.call(this, void 0);
306
+ function a$1(i) {
307
+ u.call(this, void 0);
299
308
  this.x = i;
300
309
  this.s = void 0;
301
310
  this.g = e - 1;
302
311
  this.f = 4;
303
312
  }
304
- (a.prototype = new u$1()).h = function () {
313
+ (a$1.prototype = new u()).h = function () {
305
314
  this.f &= -3;
306
315
  if (1 & this.f) return !1;
307
316
  if (32 == (36 & this.f)) return !0;
@@ -329,33 +338,33 @@ function a(i) {
329
338
  this.i++;
330
339
  }
331
340
  n = i;
332
- y(this);
341
+ y$1(this);
333
342
  this.f &= -2;
334
343
  return !0;
335
344
  };
336
- a.prototype.S = function (i) {
345
+ a$1.prototype.S = function (i) {
337
346
  if (void 0 === this.t) {
338
347
  this.f |= 36;
339
348
  for (let i = this.s; void 0 !== i; i = i.n) i.S.S(i);
340
349
  }
341
- u$1.prototype.S.call(this, i);
350
+ u.prototype.S.call(this, i);
342
351
  };
343
- a.prototype.U = function (i) {
352
+ a$1.prototype.U = function (i) {
344
353
  if (void 0 !== this.t) {
345
- u$1.prototype.U.call(this, i);
354
+ u.prototype.U.call(this, i);
346
355
  if (void 0 === this.t) {
347
356
  this.f &= -33;
348
357
  for (let i = this.s; void 0 !== i; i = i.n) i.S.U(i);
349
358
  }
350
359
  }
351
360
  };
352
- a.prototype.N = function () {
361
+ a$1.prototype.N = function () {
353
362
  if (!(2 & this.f)) {
354
363
  this.f |= 6;
355
364
  for (let i = this.t; void 0 !== i; i = i.x) i.t.N();
356
365
  }
357
366
  };
358
- Object.defineProperty(a.prototype, "value", {
367
+ Object.defineProperty(a$1.prototype, "value", {
359
368
  get() {
360
369
  if (1 & this.f) throw new Error("Cycle detected");
361
370
  const i = c(this);
@@ -366,9 +375,9 @@ Object.defineProperty(a.prototype, "value", {
366
375
  }
367
376
  });
368
377
  function w(i) {
369
- return new a(i);
378
+ return new a$1(i);
370
379
  }
371
- function _(i) {
380
+ function _$1(i) {
372
381
  const o = i.u;
373
382
  i.u = void 0;
374
383
  if ("function" == typeof o) {
@@ -392,24 +401,24 @@ function g(i) {
392
401
  for (let t = i.s; void 0 !== t; t = t.n) t.S.U(t);
393
402
  i.x = void 0;
394
403
  i.s = void 0;
395
- _(i);
404
+ _$1(i);
396
405
  }
397
406
  function p$1(i) {
398
407
  if (n !== this) throw new Error("Out-of-order effect");
399
- y(this);
408
+ y$1(this);
400
409
  n = i;
401
410
  this.f &= -2;
402
411
  if (8 & this.f) g(this);
403
412
  t();
404
413
  }
405
- function b(i) {
414
+ function b$1(i) {
406
415
  this.x = i;
407
416
  this.u = void 0;
408
417
  this.s = void 0;
409
418
  this.o = void 0;
410
419
  this.f = 32;
411
420
  }
412
- b.prototype.c = function () {
421
+ b$1.prototype.c = function () {
413
422
  const i = this.S();
414
423
  try {
415
424
  if (8 & this.f) return;
@@ -420,30 +429,30 @@ b.prototype.c = function () {
420
429
  i();
421
430
  }
422
431
  };
423
- b.prototype.S = function () {
432
+ b$1.prototype.S = function () {
424
433
  if (1 & this.f) throw new Error("Cycle detected");
425
434
  this.f |= 1;
426
435
  this.f &= -9;
427
- _(this);
436
+ _$1(this);
428
437
  l(this);
429
438
  r++;
430
439
  const i = n;
431
440
  n = this;
432
441
  return p$1.bind(this, i);
433
442
  };
434
- b.prototype.N = function () {
443
+ b$1.prototype.N = function () {
435
444
  if (!(2 & this.f)) {
436
445
  this.f |= 2;
437
446
  this.o = s;
438
447
  s = this;
439
448
  }
440
449
  };
441
- b.prototype.d = function () {
450
+ b$1.prototype.d = function () {
442
451
  this.f |= 8;
443
452
  if (!(1 & this.f)) g(this);
444
453
  };
445
454
  function E(i) {
446
- const t = new b(i);
455
+ const t = new b$1(i);
447
456
  try {
448
457
  t.c();
449
458
  } catch (i) {
@@ -453,51 +462,59 @@ function E(i) {
453
462
  return t.d.bind(t);
454
463
  }
455
464
 
456
- function u(t, e) {
465
+ function a(t, e) {
457
466
  l$2[t] = e.bind(null, l$2[t] || (() => {}));
458
467
  }
459
468
  let d;
460
- function h(t) {
469
+ function p(t) {
461
470
  if (d) d();
462
471
  d = t && t.S();
463
472
  }
464
- function p({
473
+ function v({
465
474
  data: t
466
475
  }) {
467
476
  const i = useSignal(t);
468
477
  i.value = t;
469
478
  const o = T(() => {
470
- let t = this.__v;
471
- while (t = t.__) if (t.__c) {
472
- t.__c.__$f |= 4;
479
+ let t = this,
480
+ n = this.__v;
481
+ while (n = n.__) if (n.__c) {
482
+ n.__c.__$f |= 4;
473
483
  break;
474
484
  }
485
+ const f = w(function () {
486
+ let t = i.value.value;
487
+ return 0 === t ? 0 : !0 === t ? "" : t || "";
488
+ }),
489
+ r = w(() => {
490
+ var t;
491
+ return t$2(f.value) || 3 !== (null == (t = this.base) ? void 0 : t.nodeType);
492
+ });
475
493
  this.__$u.c = () => {
476
494
  var t;
477
- const i = this.__$u.S(),
478
- n = o.value;
479
- i();
480
- if (t$2(n) || 3 !== (null == (t = this.base) ? void 0 : t.nodeType)) {
495
+ if (!t$2(o.peek()) && 3 === (null == (t = this.base) ? void 0 : t.nodeType)) this.base.data = o.peek();else {
481
496
  this.__$f |= 1;
482
497
  this.setState({});
483
- } else this.base.data = n;
498
+ }
484
499
  };
485
- return w(() => {
486
- let t = i.value.value;
487
- return 0 === t ? 0 : !0 === t ? "" : t || "";
500
+ E(function () {
501
+ if (!m) m = this.N;
502
+ this.N = A;
503
+ if (r.value && t.base) t.base.data = f.value;
488
504
  });
505
+ return f;
489
506
  }, []);
490
507
  return o.value;
491
508
  }
492
- p.displayName = "_st";
493
- Object.defineProperties(u$1.prototype, {
509
+ v.displayName = "_st";
510
+ Object.defineProperties(u.prototype, {
494
511
  constructor: {
495
512
  configurable: !0,
496
513
  value: void 0
497
514
  },
498
515
  type: {
499
516
  configurable: !0,
500
- value: p
517
+ value: v
501
518
  },
502
519
  props: {
503
520
  configurable: !0,
@@ -512,14 +529,14 @@ Object.defineProperties(u$1.prototype, {
512
529
  value: 1
513
530
  }
514
531
  });
515
- u("__b", (t, i) => {
532
+ a("__b", (t, i) => {
516
533
  if ("string" == typeof i.type) {
517
534
  let t,
518
535
  e = i.props;
519
536
  for (let n in e) {
520
537
  if ("children" === n) continue;
521
538
  let o = e[n];
522
- if (o instanceof u$1) {
539
+ if (o instanceof u) {
523
540
  if (!t) i.__np = t = {};
524
541
  t[n] = o;
525
542
  e[n] = o.peek();
@@ -528,8 +545,8 @@ u("__b", (t, i) => {
528
545
  }
529
546
  t(i);
530
547
  });
531
- u("__r", (t, i) => {
532
- h();
548
+ a("__r", (t, i) => {
549
+ p();
533
550
  let e,
534
551
  n = i.__c;
535
552
  if (n) {
@@ -547,15 +564,15 @@ u("__r", (t, i) => {
547
564
  return i;
548
565
  }();
549
566
  }
550
- h(e);
567
+ p(e);
551
568
  t(i);
552
569
  });
553
- u("__e", (t, i, e, n) => {
554
- h();
570
+ a("__e", (t, i, e, n) => {
571
+ p();
555
572
  t(i, e, n);
556
573
  });
557
- u("diffed", (t, i) => {
558
- h();
574
+ a("diffed", (t, i) => {
575
+ p();
559
576
  let e;
560
577
  if ("string" == typeof i.type && (e = i.__e)) {
561
578
  let t = i.__np,
@@ -573,27 +590,29 @@ u("diffed", (t, i) => {
573
590
  e.U = i;
574
591
  }
575
592
  for (let o in t) {
576
- let r = i[o],
577
- f = t[o];
578
- if (void 0 === r) {
579
- r = v(e, o, f, n);
580
- i[o] = r;
581
- } else r.o(f, n);
593
+ let f = i[o],
594
+ r = t[o];
595
+ if (void 0 === f) {
596
+ f = _(e, o, r, n);
597
+ i[o] = f;
598
+ } else f.o(r, n);
582
599
  }
583
600
  }
584
601
  }
585
602
  t(i);
586
603
  });
587
- function v(t, i, e, n) {
604
+ function _(t, i, e, n) {
588
605
  const o = i in t && void 0 === t.ownerSVGElement,
589
- r = d$1(e);
606
+ f = d$1(e);
590
607
  return {
591
608
  o: (t, i) => {
592
- r.value = t;
609
+ f.value = t;
593
610
  n = i;
594
611
  },
595
- d: E(() => {
596
- const e = r.value.value;
612
+ d: E(function () {
613
+ if (!m) m = this.N;
614
+ this.N = A;
615
+ const e = f.value.value;
597
616
  if (n[i] !== e) {
598
617
  n[i] = e;
599
618
  if (o) t[i] = e;else if (e) t.setAttribute(i, e);else t.removeAttribute(i);
@@ -601,7 +620,7 @@ function v(t, i, e, n) {
601
620
  })
602
621
  };
603
622
  }
604
- u("unmount", (t, i) => {
623
+ a("unmount", (t, i) => {
605
624
  if ("string" == typeof i.type) {
606
625
  let t = i.__e;
607
626
  if (t) {
@@ -626,13 +645,29 @@ u("unmount", (t, i) => {
626
645
  }
627
646
  t(i);
628
647
  });
629
- u("__h", (t, i, e, n) => {
648
+ a("__h", (t, i, e, n) => {
630
649
  if (n < 3 || 9 === n) i.__$f |= 2;
631
650
  t(i, e, n);
632
651
  });
633
652
  function useSignal(t) {
634
653
  return T(() => d$1(t), []);
635
654
  }
655
+ let m,
656
+ b = [];
657
+ const y = t => {
658
+ queueMicrotask(() => {
659
+ queueMicrotask(t);
660
+ });
661
+ };
662
+ function x() {
663
+ o(() => {
664
+ let t;
665
+ while (t = b.shift()) m.call(t);
666
+ });
667
+ }
668
+ function A() {
669
+ if (1 === b.push(this)) (l$2.requestAnimationFrame || y)(x);
670
+ }
636
671
 
637
672
  const paramsFromParentWindow = {};
638
673
  const searchParams = new URLSearchParams(window.location.search);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/plugin-toolbar",
3
- "version": "1.4.28",
3
+ "version": "1.4.29",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -27,7 +27,7 @@
27
27
  ],
28
28
  "dependencies": {
29
29
  "@jsenv/ast": "6.4.1",
30
- "@preact/signals": "1.3.1"
30
+ "@preact/signals": "2.0.0"
31
31
  },
32
32
  "scripts": {
33
33
  "eslint": "npx eslint . --ext=.js,.mjs,.cjs,.html",