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