@jsenv/plugin-toolbar 1.2.8 → 1.2.10

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,4 +1,5 @@
1
- var l$2;
1
+ var l$2,
2
+ t$2;
2
3
  l$2 = {
3
4
  __e: function (n, l, u, t) {
4
5
  for (var i, o, r; l = l.__;) if ((i = l.__c) && !i.__) try {
@@ -8,6 +9,8 @@ l$2 = {
8
9
  }
9
10
  throw n;
10
11
  }
12
+ }, t$2 = function (n) {
13
+ return null != n && void 0 === n.constructor;
11
14
  }, "function" == typeof Promise ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout;
12
15
 
13
16
  var t$1,
@@ -15,11 +18,11 @@ var t$1,
15
18
  u$1,
16
19
  i$1,
17
20
  o$1 = 0,
18
- f$1 = [],
21
+ f = [],
19
22
  c$2 = [],
20
23
  e$1 = l$2.__b,
21
- a$2 = l$2.__r,
22
- v$1 = l$2.diffed,
24
+ a$1 = l$2.__r,
25
+ v$2 = l$2.diffed,
23
26
  l$1 = l$2.__c,
24
27
  m = l$2.unmount;
25
28
  function d$2(t, u) {
@@ -37,7 +40,7 @@ function F(n, r) {
37
40
  return z(u.__H, r) ? (u.__V = n(), u.i = r, u.__h = n, u.__V) : u.__;
38
41
  }
39
42
  function b$1() {
40
- for (var t; t = f$1.shift();) if (t.__P && t.__H) try {
43
+ for (var t; t = f.shift();) if (t.__P && t.__H) try {
41
44
  t.__H.__h.forEach(k), t.__H.__h.forEach(w$1), t.__H.__h = [];
42
45
  } catch (r) {
43
46
  t.__H.__h = [], l$2.__e(r, t.__v);
@@ -46,15 +49,15 @@ function b$1() {
46
49
  l$2.__b = function (n) {
47
50
  r$1 = null, e$1 && e$1(n);
48
51
  }, l$2.__r = function (n) {
49
- a$2 && a$2(n), t$1 = 0;
52
+ a$1 && a$1(n), t$1 = 0;
50
53
  var i = (r$1 = n.__c).__H;
51
54
  i && (u$1 === r$1 ? (i.__h = [], r$1.__h = [], i.__.forEach(function (n) {
52
55
  n.__N && (n.__ = n.__N), n.__V = c$2, n.__N = n.i = void 0;
53
56
  })) : (i.__h.forEach(k), i.__h.forEach(w$1), i.__h = [], t$1 = 0)), u$1 = r$1;
54
57
  }, l$2.diffed = function (t) {
55
- v$1 && v$1(t);
58
+ v$2 && v$2(t);
56
59
  var o = t.__c;
57
- o && o.__H && (o.__H.__h.length && (1 !== f$1.push(o) && i$1 === l$2.requestAnimationFrame || ((i$1 = l$2.requestAnimationFrame) || j)(b$1)), o.__H.__.forEach(function (n) {
60
+ o && o.__H && (o.__H.__h.length && (1 !== f.push(o) && i$1 === l$2.requestAnimationFrame || ((i$1 = l$2.requestAnimationFrame) || j)(b$1)), o.__H.__.forEach(function (n) {
58
61
  n.i && (n.__H = n.i), n.__V !== c$2 && (n.__ = n.__V), n.i = void 0, n.__V = c$2;
59
62
  })), u$1 = r$1 = null;
60
63
  }, l$2.__c = function (t, r) {
@@ -109,8 +112,8 @@ function i() {
109
112
  throw new Error("Cycle detected");
110
113
  }
111
114
  function t() {
112
- if (h$1 > 1) {
113
- h$1--;
115
+ if (r > 1) {
116
+ r--;
114
117
  return;
115
118
  }
116
119
  let i,
@@ -118,12 +121,12 @@ function t() {
118
121
  while (void 0 !== s) {
119
122
  let n = s;
120
123
  s = void 0;
121
- f++;
124
+ e++;
122
125
  while (void 0 !== n) {
123
126
  const o = n.o;
124
127
  n.o = void 0;
125
128
  n.f &= -3;
126
- if (!(8 & n.f) && d$1(n)) try {
129
+ if (!(8 & n.f) && l(n)) try {
127
130
  n.c();
128
131
  } catch (n) {
129
132
  if (!t) {
@@ -134,16 +137,16 @@ function t() {
134
137
  n = o;
135
138
  }
136
139
  }
137
- f = 0;
138
- h$1--;
140
+ e = 0;
141
+ r--;
139
142
  if (t) throw i;
140
143
  }
141
144
  let o,
142
- s,
143
- h$1 = 0,
144
- f = 0,
145
- r = 0;
146
- function e(i) {
145
+ s;
146
+ let r = 0,
147
+ e = 0,
148
+ c$1 = 0;
149
+ function u(i) {
147
150
  if (void 0 === o) return;
148
151
  let t = i.n;
149
152
  if (void 0 === t || t.t !== o) {
@@ -175,23 +178,23 @@ function e(i) {
175
178
  return t;
176
179
  }
177
180
  }
178
- function c$1(i) {
181
+ function d$1(i) {
179
182
  this.v = i;
180
183
  this.i = 0;
181
184
  this.n = void 0;
182
185
  this.t = void 0;
183
186
  }
184
- c$1.prototype.h = function () {
187
+ d$1.prototype.h = function () {
185
188
  return !0;
186
189
  };
187
- c$1.prototype.S = function (i) {
190
+ d$1.prototype.S = function (i) {
188
191
  if (this.t !== i && void 0 === i.e) {
189
192
  i.x = this.t;
190
193
  if (void 0 !== this.t) this.t.e = i;
191
194
  this.t = i;
192
195
  }
193
196
  };
194
- c$1.prototype.U = function (i) {
197
+ d$1.prototype.U = function (i) {
195
198
  if (void 0 !== this.t) {
196
199
  const t = i.e,
197
200
  n = i.x;
@@ -206,9 +209,9 @@ c$1.prototype.U = function (i) {
206
209
  if (i === this.t) this.t = n;
207
210
  }
208
211
  };
209
- c$1.prototype.subscribe = function (i) {
212
+ d$1.prototype.subscribe = function (i) {
210
213
  const t = this;
211
- return b(function () {
214
+ return E(function () {
212
215
  const n = t.value,
213
216
  o = 32 & this.f;
214
217
  this.f &= -33;
@@ -219,34 +222,34 @@ c$1.prototype.subscribe = function (i) {
219
222
  }
220
223
  });
221
224
  };
222
- c$1.prototype.valueOf = function () {
225
+ d$1.prototype.valueOf = function () {
223
226
  return this.value;
224
227
  };
225
- c$1.prototype.toString = function () {
228
+ d$1.prototype.toString = function () {
226
229
  return this.value + "";
227
230
  };
228
- c$1.prototype.toJSON = function () {
231
+ d$1.prototype.toJSON = function () {
229
232
  return this.value;
230
233
  };
231
- c$1.prototype.peek = function () {
234
+ d$1.prototype.peek = function () {
232
235
  return this.v;
233
236
  };
234
- Object.defineProperty(c$1.prototype, "value", {
237
+ Object.defineProperty(d$1.prototype, "value", {
235
238
  get() {
236
- const i = e(this);
239
+ const i = u(this);
237
240
  if (void 0 !== i) i.i = this.i;
238
241
  return this.v;
239
242
  },
240
243
  set(n) {
241
- if (o instanceof a$1) !function () {
244
+ if (o instanceof y) !function () {
242
245
  throw new Error("Computed cannot have side-effects");
243
246
  }();
244
247
  if (n !== this.v) {
245
- if (f > 100) i();
248
+ if (e > 100) i();
246
249
  this.v = n;
247
250
  this.i++;
251
+ c$1++;
248
252
  r++;
249
- h$1++;
250
253
  try {
251
254
  for (let i = this.t; void 0 !== i; i = i.x) i.t.N();
252
255
  } finally {
@@ -255,14 +258,14 @@ Object.defineProperty(c$1.prototype, "value", {
255
258
  }
256
259
  }
257
260
  });
258
- function u(i) {
259
- return new c$1(i);
261
+ function v$1(i) {
262
+ return new d$1(i);
260
263
  }
261
- function d$1(i) {
264
+ function l(i) {
262
265
  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;
263
266
  return !1;
264
267
  }
265
- function v(i) {
268
+ function a(i) {
266
269
  for (let t = i.s; void 0 !== t; t = t.n) {
267
270
  const n = t.S.n;
268
271
  if (void 0 !== n) t.r = n;
@@ -274,7 +277,7 @@ function v(i) {
274
277
  }
275
278
  }
276
279
  }
277
- function l(i) {
280
+ function w(i) {
278
281
  let t,
279
282
  n = i.s;
280
283
  while (void 0 !== n) {
@@ -290,28 +293,28 @@ function l(i) {
290
293
  }
291
294
  i.s = t;
292
295
  }
293
- function a$1(i) {
294
- c$1.call(this, void 0);
296
+ function y(i) {
297
+ d$1.call(this, void 0);
295
298
  this.x = i;
296
299
  this.s = void 0;
297
- this.g = r - 1;
300
+ this.g = c$1 - 1;
298
301
  this.f = 4;
299
302
  }
300
- (a$1.prototype = new c$1()).h = function () {
303
+ (y.prototype = new d$1()).h = function () {
301
304
  this.f &= -3;
302
305
  if (1 & this.f) return !1;
303
306
  if (32 == (36 & this.f)) return !0;
304
307
  this.f &= -5;
305
- if (this.g === r) return !0;
306
- this.g = r;
308
+ if (this.g === c$1) return !0;
309
+ this.g = c$1;
307
310
  this.f |= 1;
308
- if (this.i > 0 && !d$1(this)) {
311
+ if (this.i > 0 && !l(this)) {
309
312
  this.f &= -2;
310
313
  return !0;
311
314
  }
312
315
  const i = o;
313
316
  try {
314
- v(this);
317
+ a(this);
315
318
  o = this;
316
319
  const i = this.x();
317
320
  if (16 & this.f || this.v !== i || 0 === this.i) {
@@ -325,55 +328,55 @@ function a$1(i) {
325
328
  this.i++;
326
329
  }
327
330
  o = i;
328
- l(this);
331
+ w(this);
329
332
  this.f &= -2;
330
333
  return !0;
331
334
  };
332
- a$1.prototype.S = function (i) {
335
+ y.prototype.S = function (i) {
333
336
  if (void 0 === this.t) {
334
337
  this.f |= 36;
335
338
  for (let i = this.s; void 0 !== i; i = i.n) i.S.S(i);
336
339
  }
337
- c$1.prototype.S.call(this, i);
340
+ d$1.prototype.S.call(this, i);
338
341
  };
339
- a$1.prototype.U = function (i) {
342
+ y.prototype.U = function (i) {
340
343
  if (void 0 !== this.t) {
341
- c$1.prototype.U.call(this, i);
344
+ d$1.prototype.U.call(this, i);
342
345
  if (void 0 === this.t) {
343
346
  this.f &= -33;
344
347
  for (let i = this.s; void 0 !== i; i = i.n) i.S.U(i);
345
348
  }
346
349
  }
347
350
  };
348
- a$1.prototype.N = function () {
351
+ y.prototype.N = function () {
349
352
  if (!(2 & this.f)) {
350
353
  this.f |= 6;
351
354
  for (let i = this.t; void 0 !== i; i = i.x) i.t.N();
352
355
  }
353
356
  };
354
- a$1.prototype.peek = function () {
357
+ y.prototype.peek = function () {
355
358
  if (!this.h()) i();
356
359
  if (16 & this.f) throw this.v;
357
360
  return this.v;
358
361
  };
359
- Object.defineProperty(a$1.prototype, "value", {
362
+ Object.defineProperty(y.prototype, "value", {
360
363
  get() {
361
364
  if (1 & this.f) i();
362
- const t = e(this);
365
+ const t = u(this);
363
366
  this.h();
364
367
  if (void 0 !== t) t.i = this.i;
365
368
  if (16 & this.f) throw this.v;
366
369
  return this.v;
367
370
  }
368
371
  });
369
- function w(i) {
370
- return new a$1(i);
372
+ function _(i) {
373
+ return new y(i);
371
374
  }
372
- function y(i) {
375
+ function p$1(i) {
373
376
  const n = i.u;
374
377
  i.u = void 0;
375
378
  if ("function" == typeof n) {
376
- h$1++;
379
+ r++;
377
380
  const s = o;
378
381
  o = void 0;
379
382
  try {
@@ -381,7 +384,7 @@ function y(i) {
381
384
  } catch (t) {
382
385
  i.f &= -2;
383
386
  i.f |= 8;
384
- _(i);
387
+ g(i);
385
388
  throw t;
386
389
  } finally {
387
390
  o = s;
@@ -389,28 +392,28 @@ function y(i) {
389
392
  }
390
393
  }
391
394
  }
392
- function _(i) {
395
+ function g(i) {
393
396
  for (let t = i.s; void 0 !== t; t = t.n) t.S.U(t);
394
397
  i.x = void 0;
395
398
  i.s = void 0;
396
- y(i);
399
+ p$1(i);
397
400
  }
398
- function p$1(i) {
401
+ function b(i) {
399
402
  if (o !== this) throw new Error("Out-of-order effect");
400
- l(this);
403
+ w(this);
401
404
  o = i;
402
405
  this.f &= -2;
403
- if (8 & this.f) _(this);
406
+ if (8 & this.f) g(this);
404
407
  t();
405
408
  }
406
- function g(i) {
409
+ function x(i) {
407
410
  this.x = i;
408
411
  this.u = void 0;
409
412
  this.s = void 0;
410
413
  this.o = void 0;
411
414
  this.f = 32;
412
415
  }
413
- g.prototype.c = function () {
416
+ x.prototype.c = function () {
414
417
  const i = this.S();
415
418
  try {
416
419
  if (8 & this.f) return;
@@ -421,30 +424,30 @@ g.prototype.c = function () {
421
424
  i();
422
425
  }
423
426
  };
424
- g.prototype.S = function () {
427
+ x.prototype.S = function () {
425
428
  if (1 & this.f) i();
426
429
  this.f |= 1;
427
430
  this.f &= -9;
428
- y(this);
429
- v(this);
430
- h$1++;
431
+ p$1(this);
432
+ a(this);
433
+ r++;
431
434
  const t = o;
432
435
  o = this;
433
- return p$1.bind(this, t);
436
+ return b.bind(this, t);
434
437
  };
435
- g.prototype.N = function () {
438
+ x.prototype.N = function () {
436
439
  if (!(2 & this.f)) {
437
440
  this.f |= 2;
438
441
  this.o = s;
439
442
  s = this;
440
443
  }
441
444
  };
442
- g.prototype.d = function () {
445
+ x.prototype.d = function () {
443
446
  this.f |= 8;
444
- if (!(1 & this.f)) _(this);
447
+ if (!(1 & this.f)) g(this);
445
448
  };
446
- function b(i) {
447
- const t = new g(i);
449
+ function E(i) {
450
+ const t = new x(i);
448
451
  try {
449
452
  t.c();
450
453
  } catch (i) {
@@ -457,34 +460,38 @@ function b(i) {
457
460
  function c(t, e) {
458
461
  l$2[t] = e.bind(null, l$2[t] || (() => {}));
459
462
  }
460
- let a;
461
- function d(t) {
462
- if (a) a();
463
- a = t && t.S();
463
+ let d;
464
+ function h(t) {
465
+ if (d) d();
466
+ d = t && t.S();
464
467
  }
465
468
  function p({
466
469
  data: t
467
470
  }) {
468
471
  const i = useSignal(t);
469
472
  i.value = t;
470
- const n = F(() => {
473
+ const o = F(() => {
471
474
  let t = this.__v;
472
475
  while (t = t.__) if (t.__c) {
473
476
  t.__c.__$f |= 4;
474
477
  break;
475
478
  }
476
479
  this.__$u.c = () => {
477
- this.base.data = n.peek();
480
+ var t;
481
+ if (!t$2(o.peek()) && 3 === (null == (t = this.base) ? void 0 : t.nodeType)) this.base.data = o.peek();else {
482
+ this.__$f |= 1;
483
+ this.setState({});
484
+ }
478
485
  };
479
- return w(() => {
486
+ return _(() => {
480
487
  let t = i.value.value;
481
488
  return 0 === t ? 0 : !0 === t ? "" : t || "";
482
489
  });
483
490
  }, []);
484
- return n.value;
491
+ return o.value;
485
492
  }
486
493
  p.displayName = "_st";
487
- Object.defineProperties(c$1.prototype, {
494
+ Object.defineProperties(d$1.prototype, {
488
495
  constructor: {
489
496
  configurable: !0,
490
497
  value: void 0
@@ -513,7 +520,7 @@ c("__b", (t, i) => {
513
520
  for (let n in e) {
514
521
  if ("children" === n) continue;
515
522
  let o = e[n];
516
- if (o instanceof c$1) {
523
+ if (o instanceof d$1) {
517
524
  if (!t) i.__np = t = {};
518
525
  t[n] = o;
519
526
  e[n] = o.peek();
@@ -523,7 +530,7 @@ c("__b", (t, i) => {
523
530
  t(i);
524
531
  });
525
532
  c("__r", (t, i) => {
526
- d();
533
+ h();
527
534
  let e,
528
535
  n = i.__c;
529
536
  if (n) {
@@ -531,7 +538,7 @@ c("__r", (t, i) => {
531
538
  e = n.__$u;
532
539
  if (void 0 === e) n.__$u = e = function (t) {
533
540
  let i;
534
- b(function () {
541
+ E(function () {
535
542
  i = this;
536
543
  });
537
544
  i.c = () => {
@@ -541,15 +548,15 @@ c("__r", (t, i) => {
541
548
  return i;
542
549
  }();
543
550
  }
544
- d(e);
551
+ h(e);
545
552
  t(i);
546
553
  });
547
554
  c("__e", (t, i, e, n) => {
548
- d();
555
+ h();
549
556
  t(i, e, n);
550
557
  });
551
558
  c("diffed", (t, i) => {
552
- d();
559
+ h();
553
560
  let e;
554
561
  if ("string" == typeof i.type && (e = i.__e)) {
555
562
  let t = i.__np,
@@ -570,7 +577,7 @@ c("diffed", (t, i) => {
570
577
  let r = i[o],
571
578
  f = t[o];
572
579
  if (void 0 === r) {
573
- r = h(e, o, f, n);
580
+ r = v(e, o, f, n);
574
581
  i[o] = r;
575
582
  } else r.o(f, n);
576
583
  }
@@ -578,15 +585,15 @@ c("diffed", (t, i) => {
578
585
  }
579
586
  t(i);
580
587
  });
581
- function h(t, i, e, n) {
588
+ function v(t, i, e, n) {
582
589
  const o = i in t && void 0 === t.ownerSVGElement,
583
- r = u(e);
590
+ r = v$1(e);
584
591
  return {
585
592
  o: (t, i) => {
586
593
  r.value = t;
587
594
  n = i;
588
595
  },
589
- d: b(() => {
596
+ d: E(() => {
590
597
  const e = r.value.value;
591
598
  if (n[i] !== e) {
592
599
  n[i] = e;
@@ -625,7 +632,7 @@ c("__h", (t, i, e, n) => {
625
632
  t(i, e, n);
626
633
  });
627
634
  function useSignal(t) {
628
- return F(() => u(t), []);
635
+ return F(() => v$1(t), []);
629
636
  }
630
637
 
631
638
  const paramsFromParentWindow = {};
@@ -637,9 +644,9 @@ const parentWindowReloader = window.parent.__reloader__;
637
644
 
638
645
  const stateFromLocalStorage = localStorage.hasOwnProperty("jsenv_toolbar") ? JSON.parse(localStorage.getItem("jsenv_toolbar")) : {};
639
646
 
640
- const animationsEnabledSignal = u(typeof stateFromLocalStorage.animationsEnabled === "boolean" ? stateFromLocalStorage.animationsEnabled : typeof paramsFromParentWindow.animationsEnabled === "boolean" ? paramsFromParentWindow.animationsEnabled : false);
647
+ const animationsEnabledSignal = v$1(typeof stateFromLocalStorage.animationsEnabled === "boolean" ? stateFromLocalStorage.animationsEnabled : typeof paramsFromParentWindow.animationsEnabled === "boolean" ? paramsFromParentWindow.animationsEnabled : false);
641
648
 
642
- b(() => {
649
+ E(() => {
643
650
  const animationsEnabled = animationsEnabledSignal.value;
644
651
  if (animationsEnabled) {
645
652
  document.documentElement.removeAttribute("data-animation-disabled");
@@ -648,11 +655,11 @@ b(() => {
648
655
  }
649
656
  });
650
657
 
651
- const executionTooltipOpenedSignal = u(false);
652
- const executionSignal = u({
658
+ const executionTooltipOpenedSignal = v$1(false);
659
+ const executionSignal = v$1({
653
660
  status: "running"
654
661
  });
655
- const previousExecutionSignal = u(sessionStorage.hasOwnProperty(window.location.href) ? JSON.parse(sessionStorage.getItem(window.location.href)) : null);
662
+ const previousExecutionSignal = v$1(sessionStorage.hasOwnProperty(window.location.href) ? JSON.parse(sessionStorage.getItem(window.location.href)) : null);
656
663
  window.parent.__supervisor__.getDocumentExecutionResult().then(({
657
664
  status,
658
665
  startTime,
@@ -667,8 +674,8 @@ window.parent.__supervisor__.getDocumentExecutionResult().then(({
667
674
 
668
675
  const notificationAPIDetected = typeof window.Notification === "function";
669
676
 
670
- const notificationsEnabledSignal = u(typeof stateFromLocalStorage.notificationsEnabled === "boolean" ? stateFromLocalStorage.notificationsEnabled : typeof paramsFromParentWindow.notificationsEnabled === "boolean" ? paramsFromParentWindow.notificationsEnabled : false);
671
- const notificationPermissionSignal = u(Notification.permission);
677
+ const notificationsEnabledSignal = v$1(typeof stateFromLocalStorage.notificationsEnabled === "boolean" ? stateFromLocalStorage.notificationsEnabled : typeof paramsFromParentWindow.notificationsEnabled === "boolean" ? paramsFromParentWindow.notificationsEnabled : false);
678
+ const notificationPermissionSignal = v$1(Notification.permission);
672
679
 
673
680
  const enableNotifications = () => {
674
681
  notificationsEnabledSignal.value = true;
@@ -774,13 +781,13 @@ const getFaviconHref = () => {
774
781
  return link ? link.href : undefined;
775
782
  };
776
783
 
777
- b(() => {
784
+ E(() => {
778
785
  const execution = executionSignal.value;
779
786
  if (execution) {
780
787
  sessionStorage.setItem(window.location.href, JSON.stringify(execution));
781
788
  }
782
789
  });
783
- b(() => {
790
+ E(() => {
784
791
  const execution = executionSignal.value;
785
792
  const previousExecution = previousExecutionSignal.value;
786
793
  if (execution) {
@@ -788,7 +795,7 @@ b(() => {
788
795
  }
789
796
  });
790
797
 
791
- b(() => {
798
+ E(() => {
792
799
  const notificationsEnabled = notificationsEnabledSignal.value;
793
800
  if (!notificationsEnabled) {
794
801
  closeAllNotifications();
@@ -834,8 +841,8 @@ const disableAutoreload = () => {
834
841
  parentWindowReloader.autoreload.disable();
835
842
  };
836
843
 
837
- const serverTooltipOpenedSignal = u(false);
838
- const serverConnectionSignal = u("default");
844
+ const serverTooltipOpenedSignal = v$1(false);
845
+ const serverConnectionSignal = v$1("default");
839
846
  const serverEvents$1 = window.__server_events__;
840
847
  if (serverEvents$1) {
841
848
  serverEvents$1.readyState.onchange = () => {
@@ -856,7 +863,7 @@ const closeAllTooltips = () => {
856
863
  closeServerTooltip();
857
864
  };
858
865
 
859
- const openedSignal = u(typeof stateFromLocalStorage.opened === "boolean" ? stateFromLocalStorage.opened : typeof paramsFromParentWindow.opened === "boolean" ? paramsFromParentWindow.opened : false);
866
+ const openedSignal = v$1(typeof stateFromLocalStorage.opened === "boolean" ? stateFromLocalStorage.opened : typeof paramsFromParentWindow.opened === "boolean" ? paramsFromParentWindow.opened : false);
860
867
 
861
868
  const getToolbarIframe = () => {
862
869
  const iframes = Array.from(window.parent.document.querySelectorAll("iframe"));
@@ -948,7 +955,7 @@ const startJavaScriptAnimation = ({
948
955
  };
949
956
 
950
957
  const initToolbarOpening = () => {
951
- b(() => {
958
+ E(() => {
952
959
  const opened = openedSignal.value;
953
960
  if (opened) {
954
961
  showToolbar();
@@ -1191,7 +1198,7 @@ const closeOverflowMenu = () => {
1191
1198
  document.querySelector("#menu_overflow").removeAttribute("data-animate");
1192
1199
  };
1193
1200
 
1194
- const settingsOpenedSignal = u(false);
1201
+ const settingsOpenedSignal = v$1(false);
1195
1202
 
1196
1203
  const openSettings = () => {
1197
1204
  settingsOpenedSignal.value = true;
@@ -1200,7 +1207,7 @@ const closeSettings = () => {
1200
1207
  settingsOpenedSignal.value = false;
1201
1208
  };
1202
1209
 
1203
- const changesTooltipOpenedSignal = u(false);
1210
+ const changesTooltipOpenedSignal = v$1(false);
1204
1211
 
1205
1212
  const renderToolbarOverlay = () => {
1206
1213
  const toolbarOverlay = document.querySelector("#toolbar_overlay");
@@ -1208,7 +1215,7 @@ const renderToolbarOverlay = () => {
1208
1215
  closeAllTooltips();
1209
1216
  closeSettings();
1210
1217
  };
1211
- b(() => {
1218
+ E(() => {
1212
1219
  if (!window.parent) {
1213
1220
  // can happen while parent iframe reloads
1214
1221
  return;
@@ -1335,11 +1342,11 @@ const renameAttribute = (node, name, newName) => {
1335
1342
  const executionIndicator = document.querySelector("#document_execution_indicator");
1336
1343
  const renderDocumentExecutionIndicator = async () => {
1337
1344
  removeForceHideElement(document.querySelector("#document_execution_indicator"));
1338
- b(() => {
1345
+ E(() => {
1339
1346
  const execution = executionSignal.value;
1340
1347
  updateExecutionIndicator(execution);
1341
1348
  });
1342
- b(() => {
1349
+ E(() => {
1343
1350
  const executionTooltipOpened = executionTooltipOpenedSignal.value;
1344
1351
  if (executionTooltipOpened) {
1345
1352
  executionIndicator.setAttribute("data-tooltip-visible", "");
@@ -1390,9 +1397,9 @@ const computeText = ({
1390
1397
  return "";
1391
1398
  };
1392
1399
 
1393
- const autoreloadEnabledSignal = u(false);
1394
- const reloaderStatusSignal = u("idle");
1395
- const changesSignal = u(0);
1400
+ const autoreloadEnabledSignal = v$1(false);
1401
+ const reloaderStatusSignal = v$1("idle");
1402
+ const changesSignal = v$1(0);
1396
1403
  if (parentWindowReloader) {
1397
1404
  autoreloadEnabledSignal.value = parentWindowReloader.autoreload.enabled;
1398
1405
  parentWindowReloader.autoreload.onchange = () => {
@@ -1419,7 +1426,7 @@ const closeChangesToolip = () => {
1419
1426
 
1420
1427
  const changesIndicator = document.querySelector("#changes_indicator");
1421
1428
  const renderChangesIndicator = () => {
1422
- b(() => {
1429
+ E(() => {
1423
1430
  const autoreloadEnabled = autoreloadEnabledSignal.value;
1424
1431
  const changes = changesSignal.value;
1425
1432
  const changeCount = changes.length;
@@ -1441,7 +1448,7 @@ const renderChangesIndicator = () => {
1441
1448
  changesIndicator.querySelector(".tooltip_action").onclick = () => {
1442
1449
  parentWindowReloader.reload();
1443
1450
  };
1444
- b(() => {
1451
+ E(() => {
1445
1452
  const changesTooltipOpened = changesTooltipOpenedSignal.value;
1446
1453
  if (changesTooltipOpened) {
1447
1454
  changesIndicator.setAttribute("data-tooltip-visible", "");
@@ -1474,11 +1481,11 @@ const serverEvents = window.__server_events__;
1474
1481
  const serverIndicator = document.querySelector("#server_indicator");
1475
1482
  const renderServerIndicator = () => {
1476
1483
  removeForceHideElement(document.querySelector("#server_indicator"));
1477
- b(() => {
1484
+ E(() => {
1478
1485
  const serverConnection = serverConnectionSignal.value;
1479
1486
  updateServerIndicator(serverConnection);
1480
1487
  });
1481
- b(() => {
1488
+ E(() => {
1482
1489
  const serverTooltipOpened = serverTooltipOpenedSignal.value;
1483
1490
  if (serverTooltipOpened) {
1484
1491
  serverIndicator.setAttribute("data-tooltip-visible", "");
@@ -1524,7 +1531,7 @@ const renderToolbarAutoreloadSetting = () => {
1524
1531
  return;
1525
1532
  }
1526
1533
  const autoreloadCheckbox = document.querySelector("#toggle_autoreload");
1527
- b(() => {
1534
+ E(() => {
1528
1535
  const autoreloadEnabled = autoreloadEnabledSignal.value;
1529
1536
  if (autoreloadEnabled) {
1530
1537
  autoreloadCheckbox.checked = true;
@@ -1591,7 +1598,7 @@ const disableAnimations = () => {
1591
1598
 
1592
1599
  const renderToolbarAnimationSetting = () => {
1593
1600
  const animCheckbox = document.querySelector("#toggle_anims");
1594
- b(() => {
1601
+ E(() => {
1595
1602
  const animationsEnabled = animationsEnabledSignal.value;
1596
1603
  animCheckbox.checked = animationsEnabled;
1597
1604
  });
@@ -1610,11 +1617,11 @@ const renderToolbarAnimationSetting = () => {
1610
1617
 
1611
1618
  const notifCheckbox = document.querySelector("#toggle_notifs");
1612
1619
  const renderToolbarNotificationSetting = () => {
1613
- b(() => {
1620
+ E(() => {
1614
1621
  const notificationsEnabled = notificationsEnabledSignal.value;
1615
1622
  notifCheckbox.checked = notificationsEnabled;
1616
1623
  });
1617
- b(() => {
1624
+ E(() => {
1618
1625
  const notificationPermission = notificationPermissionSignal.value;
1619
1626
  if (!notificationAPIDetected) {
1620
1627
  applyNotificationNotAvailableEffects();
@@ -1676,7 +1683,7 @@ const applyNotificationNOTGrantedEffects = () => {
1676
1683
  };
1677
1684
  };
1678
1685
 
1679
- const themeSignal = u(typeof stateFromLocalStorage.theme === "string" ? stateFromLocalStorage.theme : typeof paramsFromParentWindow.theme === "string" ? paramsFromParentWindow.theme : "dark");
1686
+ const themeSignal = v$1(typeof stateFromLocalStorage.theme === "string" ? stateFromLocalStorage.theme : typeof paramsFromParentWindow.theme === "string" ? paramsFromParentWindow.theme : "dark");
1680
1687
 
1681
1688
  const switchToLightTheme = () => {
1682
1689
  themeSignal.value = "light";
@@ -1697,7 +1704,7 @@ const renderToolbarThemeSetting = () => {
1697
1704
  };
1698
1705
  };
1699
1706
 
1700
- const ribbonDisplayedSignal = u(typeof stateFromLocalStorage.ribbonDisplayed === "boolean" ? stateFromLocalStorage.ribbonDisplayed : true);
1707
+ const ribbonDisplayedSignal = v$1(typeof stateFromLocalStorage.ribbonDisplayed === "boolean" ? stateFromLocalStorage.ribbonDisplayed : true);
1701
1708
 
1702
1709
  const ribbonBox = document.querySelector("#ribbon_box");
1703
1710
  const ribbonCheckbox = ribbonBox.querySelector("input");
@@ -1705,7 +1712,7 @@ const renderToolbarRibbonSetting = () => {
1705
1712
  const ribbonContainer = window.parent.document.querySelector("#jsenv_ribbon_container");
1706
1713
  if (ribbonContainer) {
1707
1714
  ribbonBox.style.display = "block";
1708
- b(() => {
1715
+ E(() => {
1709
1716
  const ribbonDisplayed = ribbonDisplayedSignal.value;
1710
1717
  ribbonCheckbox.checked = ribbonDisplayed;
1711
1718
  if (ribbonDisplayed) {
@@ -1733,7 +1740,7 @@ const renderToolbarSettings = () => {
1733
1740
  renderToolbarNotificationSetting();
1734
1741
  renderToolbarThemeSetting();
1735
1742
  renderToolbarRibbonSetting();
1736
- b(() => {
1743
+ E(() => {
1737
1744
  const settingsOpened = settingsOpenedSignal.value;
1738
1745
  if (settingsOpened) {
1739
1746
  activateToolbarSection(document.querySelector("#settings"));
@@ -1801,14 +1808,14 @@ addExternalCommandCallback("initToolbar", () => {
1801
1808
  });
1802
1809
  sendEventToParent("toolbar_ready");
1803
1810
 
1804
- b(() => {
1811
+ E(() => {
1805
1812
  const serverConnection = serverConnectionSignal.value;
1806
1813
  if (serverConnection === "connecting" || serverConnection === "closed") {
1807
1814
  openServerTooltip();
1808
1815
  }
1809
1816
  });
1810
1817
 
1811
- b(() => {
1818
+ E(() => {
1812
1819
  const theme = themeSignal.value;
1813
1820
  document.querySelector("html").setAttribute("data-theme", theme);
1814
1821
  });
@@ -1816,7 +1823,7 @@ b(() => {
1816
1823
  addExternalCommandCallback("openToolbar", openToolbar);
1817
1824
  addExternalCommandCallback("closeToolbar", closeToolbar);
1818
1825
 
1819
- const toolbarStateSignal = w(() => {
1826
+ const toolbarStateSignal = _(() => {
1820
1827
  const opened = openedSignal.value;
1821
1828
  const theme = themeSignal.value;
1822
1829
  const animationsEnabled = animationsEnabledSignal.value;
@@ -1831,7 +1838,7 @@ const toolbarStateSignal = w(() => {
1831
1838
  };
1832
1839
  });
1833
1840
 
1834
- b(() => {
1841
+ E(() => {
1835
1842
  const toolbarState = toolbarStateSignal.value;
1836
1843
  localStorage.setItem("jsenv_toolbar", JSON.stringify(toolbarState));
1837
1844
  sendEventToParent("toolbar_state_change", toolbarState);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/plugin-toolbar",
3
- "version": "1.2.8",
3
+ "version": "1.2.10",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -26,8 +26,8 @@
26
26
  "/src/"
27
27
  ],
28
28
  "dependencies": {
29
- "@jsenv/ast": "5.1.2",
30
- "@preact/signals": "1.1.5"
29
+ "@jsenv/ast": "5.1.3",
30
+ "@preact/signals": "1.2.1"
31
31
  },
32
32
  "scripts": {
33
33
  "eslint": "npx eslint . --ext=.js,.mjs,.cjs,.html",