@jsenv/plugin-toolbar 1.2.10 → 1.2.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.
- package/dist/css/toolbar.css +8 -8
- package/dist/js/toolbar_core.js +165 -163
- package/package.json +2 -2
package/dist/css/toolbar.css
CHANGED
|
@@ -32,10 +32,6 @@ button:focus, a:focus, input:focus, [data-contains-hidden-input] input:focus + *
|
|
|
32
32
|
outline-width: 4px;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
[data-contains-hidden-input] input:focus-visible + * {
|
|
36
|
-
outline-style: auto;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
35
|
button:focus-visible {
|
|
40
36
|
outline-style: auto;
|
|
41
37
|
}
|
|
@@ -48,27 +44,31 @@ input:focus-visible {
|
|
|
48
44
|
outline-style: auto;
|
|
49
45
|
}
|
|
50
46
|
|
|
47
|
+
[data-contains-hidden-input] input:focus-visible + * {
|
|
48
|
+
outline-style: auto;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
51
|
[data-contains-hidden-input] input:focus-visible + * {
|
|
52
52
|
outline-color: #0096ff;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
@-moz-document url-prefix() {
|
|
56
|
-
|
|
56
|
+
button:focus-visible {
|
|
57
57
|
outline-offset: 0;
|
|
58
58
|
outline: 2px solid #0096ff;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
a:focus-visible {
|
|
62
62
|
outline-offset: 0;
|
|
63
63
|
outline: 2px solid #0096ff;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
|
|
66
|
+
input:focus-visible {
|
|
67
67
|
outline-offset: 0;
|
|
68
68
|
outline: 2px solid #0096ff;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
input:focus-visible {
|
|
71
|
+
[data-input-customized] input:focus-visible + * {
|
|
72
72
|
outline-offset: 0;
|
|
73
73
|
outline: 2px solid #0096ff;
|
|
74
74
|
}
|
package/dist/js/toolbar_core.js
CHANGED
|
@@ -14,10 +14,10 @@ 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,
|
|
18
18
|
u$1,
|
|
19
19
|
i$1,
|
|
20
|
-
o
|
|
20
|
+
o = 0,
|
|
21
21
|
f = [],
|
|
22
22
|
c$2 = [],
|
|
23
23
|
e$1 = l$2.__b,
|
|
@@ -26,8 +26,8 @@ var t$1,
|
|
|
26
26
|
l$1 = l$2.__c,
|
|
27
27
|
m = l$2.unmount;
|
|
28
28
|
function d$2(t, u) {
|
|
29
|
-
l$2.__h && l$2.__h(r
|
|
30
|
-
var i = r
|
|
29
|
+
l$2.__h && l$2.__h(r, t, o || u), o = 0;
|
|
30
|
+
var i = r.__H || (r.__H = {
|
|
31
31
|
__: [],
|
|
32
32
|
__h: []
|
|
33
33
|
});
|
|
@@ -47,19 +47,19 @@ function b$1() {
|
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
l$2.__b = function (n) {
|
|
50
|
-
r
|
|
50
|
+
r = null, e$1 && e$1(n);
|
|
51
51
|
}, l$2.__r = function (n) {
|
|
52
52
|
a$1 && a$1(n), t$1 = 0;
|
|
53
|
-
var i = (r
|
|
54
|
-
i && (u$1 === r
|
|
53
|
+
var i = (r = n.__c).__H;
|
|
54
|
+
i && (u$1 === r ? (i.__h = [], r.__h = [], i.__.forEach(function (n) {
|
|
55
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
|
|
56
|
+
})) : (i.__h.forEach(k), i.__h.forEach(w$1), i.__h = [], t$1 = 0)), u$1 = r;
|
|
57
57
|
}, l$2.diffed = function (t) {
|
|
58
58
|
v$2 && v$2(t);
|
|
59
59
|
var o = t.__c;
|
|
60
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
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
|
|
62
|
+
})), u$1 = r = null;
|
|
63
63
|
}, l$2.__c = function (t, r) {
|
|
64
64
|
r.some(function (t) {
|
|
65
65
|
try {
|
|
@@ -94,13 +94,13 @@ function j(n) {
|
|
|
94
94
|
g$1 && (t = requestAnimationFrame(r));
|
|
95
95
|
}
|
|
96
96
|
function k(n) {
|
|
97
|
-
var t = r
|
|
97
|
+
var t = r,
|
|
98
98
|
u = n.__c;
|
|
99
|
-
"function" == typeof u && (n.__c = void 0, u()), r
|
|
99
|
+
"function" == typeof u && (n.__c = void 0, u()), r = t;
|
|
100
100
|
}
|
|
101
101
|
function w$1(n) {
|
|
102
|
-
var t = r
|
|
103
|
-
n.__c = n.__(), r
|
|
102
|
+
var t = r;
|
|
103
|
+
n.__c = n.__(), r = t;
|
|
104
104
|
}
|
|
105
105
|
function z(n, t) {
|
|
106
106
|
return !n || n.length !== t.length || t.some(function (t, r) {
|
|
@@ -111,22 +111,23 @@ function z(n, t) {
|
|
|
111
111
|
function i() {
|
|
112
112
|
throw new Error("Cycle detected");
|
|
113
113
|
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
114
|
+
const t = Symbol.for("preact-signals");
|
|
115
|
+
function n() {
|
|
116
|
+
if (e > 1) {
|
|
117
|
+
e--;
|
|
117
118
|
return;
|
|
118
119
|
}
|
|
119
120
|
let i,
|
|
120
121
|
t = !1;
|
|
121
|
-
while (void 0 !==
|
|
122
|
-
let n =
|
|
123
|
-
|
|
124
|
-
|
|
122
|
+
while (void 0 !== h$1) {
|
|
123
|
+
let n = h$1;
|
|
124
|
+
h$1 = void 0;
|
|
125
|
+
c$1++;
|
|
125
126
|
while (void 0 !== n) {
|
|
126
127
|
const o = n.o;
|
|
127
128
|
n.o = void 0;
|
|
128
129
|
n.f &= -3;
|
|
129
|
-
if (!(8 & n.f) &&
|
|
130
|
+
if (!(8 & n.f) && a(n)) try {
|
|
130
131
|
n.c();
|
|
131
132
|
} catch (n) {
|
|
132
133
|
if (!t) {
|
|
@@ -137,64 +138,65 @@ function t() {
|
|
|
137
138
|
n = o;
|
|
138
139
|
}
|
|
139
140
|
}
|
|
140
|
-
|
|
141
|
-
|
|
141
|
+
c$1 = 0;
|
|
142
|
+
e--;
|
|
142
143
|
if (t) throw i;
|
|
143
144
|
}
|
|
144
|
-
let
|
|
145
|
-
|
|
146
|
-
let
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
function
|
|
150
|
-
if (void 0 ===
|
|
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;
|
|
151
152
|
let t = i.n;
|
|
152
|
-
if (void 0 === t || t.t !==
|
|
153
|
+
if (void 0 === t || t.t !== s) {
|
|
153
154
|
t = {
|
|
154
155
|
i: 0,
|
|
155
156
|
S: i,
|
|
156
|
-
p:
|
|
157
|
+
p: s.s,
|
|
157
158
|
n: void 0,
|
|
158
|
-
t:
|
|
159
|
+
t: s,
|
|
159
160
|
e: void 0,
|
|
160
161
|
x: void 0,
|
|
161
162
|
r: t
|
|
162
163
|
};
|
|
163
|
-
if (void 0 !==
|
|
164
|
-
|
|
164
|
+
if (void 0 !== s.s) s.s.n = t;
|
|
165
|
+
s.s = t;
|
|
165
166
|
i.n = t;
|
|
166
|
-
if (32 &
|
|
167
|
+
if (32 & s.f) i.S(t);
|
|
167
168
|
return t;
|
|
168
169
|
} else if (-1 === t.i) {
|
|
169
170
|
t.i = 0;
|
|
170
171
|
if (void 0 !== t.n) {
|
|
171
172
|
t.n.p = t.p;
|
|
172
173
|
if (void 0 !== t.p) t.p.n = t.n;
|
|
173
|
-
t.p =
|
|
174
|
+
t.p = s.s;
|
|
174
175
|
t.n = void 0;
|
|
175
|
-
|
|
176
|
-
|
|
176
|
+
s.s.n = t;
|
|
177
|
+
s.s = t;
|
|
177
178
|
}
|
|
178
179
|
return t;
|
|
179
180
|
}
|
|
180
181
|
}
|
|
181
|
-
function
|
|
182
|
+
function v$1(i) {
|
|
182
183
|
this.v = i;
|
|
183
184
|
this.i = 0;
|
|
184
185
|
this.n = void 0;
|
|
185
186
|
this.t = void 0;
|
|
186
187
|
}
|
|
187
|
-
|
|
188
|
+
v$1.prototype.brand = t;
|
|
189
|
+
v$1.prototype.h = function () {
|
|
188
190
|
return !0;
|
|
189
191
|
};
|
|
190
|
-
|
|
192
|
+
v$1.prototype.S = function (i) {
|
|
191
193
|
if (this.t !== i && void 0 === i.e) {
|
|
192
194
|
i.x = this.t;
|
|
193
195
|
if (void 0 !== this.t) this.t.e = i;
|
|
194
196
|
this.t = i;
|
|
195
197
|
}
|
|
196
198
|
};
|
|
197
|
-
|
|
199
|
+
v$1.prototype.U = function (i) {
|
|
198
200
|
if (void 0 !== this.t) {
|
|
199
201
|
const t = i.e,
|
|
200
202
|
n = i.x;
|
|
@@ -209,9 +211,9 @@ d$1.prototype.U = function (i) {
|
|
|
209
211
|
if (i === this.t) this.t = n;
|
|
210
212
|
}
|
|
211
213
|
};
|
|
212
|
-
|
|
214
|
+
v$1.prototype.subscribe = function (i) {
|
|
213
215
|
const t = this;
|
|
214
|
-
return
|
|
216
|
+
return O(function () {
|
|
215
217
|
const n = t.value,
|
|
216
218
|
o = 32 & this.f;
|
|
217
219
|
this.f &= -33;
|
|
@@ -222,50 +224,50 @@ d$1.prototype.subscribe = function (i) {
|
|
|
222
224
|
}
|
|
223
225
|
});
|
|
224
226
|
};
|
|
225
|
-
|
|
227
|
+
v$1.prototype.valueOf = function () {
|
|
226
228
|
return this.value;
|
|
227
229
|
};
|
|
228
|
-
|
|
230
|
+
v$1.prototype.toString = function () {
|
|
229
231
|
return this.value + "";
|
|
230
232
|
};
|
|
231
|
-
|
|
233
|
+
v$1.prototype.toJSON = function () {
|
|
232
234
|
return this.value;
|
|
233
235
|
};
|
|
234
|
-
|
|
236
|
+
v$1.prototype.peek = function () {
|
|
235
237
|
return this.v;
|
|
236
238
|
};
|
|
237
|
-
Object.defineProperty(
|
|
239
|
+
Object.defineProperty(v$1.prototype, "value", {
|
|
238
240
|
get() {
|
|
239
|
-
const i =
|
|
241
|
+
const i = d$1(this);
|
|
240
242
|
if (void 0 !== i) i.i = this.i;
|
|
241
243
|
return this.v;
|
|
242
244
|
},
|
|
243
|
-
set(
|
|
244
|
-
if (
|
|
245
|
+
set(t) {
|
|
246
|
+
if (s instanceof _) !function () {
|
|
245
247
|
throw new Error("Computed cannot have side-effects");
|
|
246
248
|
}();
|
|
247
|
-
if (
|
|
248
|
-
if (
|
|
249
|
-
this.v =
|
|
249
|
+
if (t !== this.v) {
|
|
250
|
+
if (c$1 > 100) i();
|
|
251
|
+
this.v = t;
|
|
250
252
|
this.i++;
|
|
251
|
-
|
|
252
|
-
|
|
253
|
+
u++;
|
|
254
|
+
e++;
|
|
253
255
|
try {
|
|
254
256
|
for (let i = this.t; void 0 !== i; i = i.x) i.t.N();
|
|
255
257
|
} finally {
|
|
256
|
-
|
|
258
|
+
n();
|
|
257
259
|
}
|
|
258
260
|
}
|
|
259
261
|
}
|
|
260
262
|
});
|
|
261
|
-
function v$1(i) {
|
|
262
|
-
return new d$1(i);
|
|
263
|
-
}
|
|
264
263
|
function l(i) {
|
|
264
|
+
return new v$1(i);
|
|
265
|
+
}
|
|
266
|
+
function a(i) {
|
|
265
267
|
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;
|
|
266
268
|
return !1;
|
|
267
269
|
}
|
|
268
|
-
function
|
|
270
|
+
function y(i) {
|
|
269
271
|
for (let t = i.s; void 0 !== t; t = t.n) {
|
|
270
272
|
const n = t.S.n;
|
|
271
273
|
if (void 0 !== n) t.r = n;
|
|
@@ -293,29 +295,29 @@ function w(i) {
|
|
|
293
295
|
}
|
|
294
296
|
i.s = t;
|
|
295
297
|
}
|
|
296
|
-
function
|
|
297
|
-
|
|
298
|
+
function _(i) {
|
|
299
|
+
v$1.call(this, void 0);
|
|
298
300
|
this.x = i;
|
|
299
301
|
this.s = void 0;
|
|
300
|
-
this.g =
|
|
302
|
+
this.g = u - 1;
|
|
301
303
|
this.f = 4;
|
|
302
304
|
}
|
|
303
|
-
(
|
|
305
|
+
(_.prototype = new v$1()).h = function () {
|
|
304
306
|
this.f &= -3;
|
|
305
307
|
if (1 & this.f) return !1;
|
|
306
308
|
if (32 == (36 & this.f)) return !0;
|
|
307
309
|
this.f &= -5;
|
|
308
|
-
if (this.g ===
|
|
309
|
-
this.g =
|
|
310
|
+
if (this.g === u) return !0;
|
|
311
|
+
this.g = u;
|
|
310
312
|
this.f |= 1;
|
|
311
|
-
if (this.i > 0 && !
|
|
313
|
+
if (this.i > 0 && !a(this)) {
|
|
312
314
|
this.f &= -2;
|
|
313
315
|
return !0;
|
|
314
316
|
}
|
|
315
|
-
const i =
|
|
317
|
+
const i = s;
|
|
316
318
|
try {
|
|
317
|
-
|
|
318
|
-
|
|
319
|
+
y(this);
|
|
320
|
+
s = this;
|
|
319
321
|
const i = this.x();
|
|
320
322
|
if (16 & this.f || this.v !== i || 0 === this.i) {
|
|
321
323
|
this.v = i;
|
|
@@ -327,93 +329,93 @@ function y(i) {
|
|
|
327
329
|
this.f |= 16;
|
|
328
330
|
this.i++;
|
|
329
331
|
}
|
|
330
|
-
|
|
332
|
+
s = i;
|
|
331
333
|
w(this);
|
|
332
334
|
this.f &= -2;
|
|
333
335
|
return !0;
|
|
334
336
|
};
|
|
335
|
-
|
|
337
|
+
_.prototype.S = function (i) {
|
|
336
338
|
if (void 0 === this.t) {
|
|
337
339
|
this.f |= 36;
|
|
338
340
|
for (let i = this.s; void 0 !== i; i = i.n) i.S.S(i);
|
|
339
341
|
}
|
|
340
|
-
|
|
342
|
+
v$1.prototype.S.call(this, i);
|
|
341
343
|
};
|
|
342
|
-
|
|
344
|
+
_.prototype.U = function (i) {
|
|
343
345
|
if (void 0 !== this.t) {
|
|
344
|
-
|
|
346
|
+
v$1.prototype.U.call(this, i);
|
|
345
347
|
if (void 0 === this.t) {
|
|
346
348
|
this.f &= -33;
|
|
347
349
|
for (let i = this.s; void 0 !== i; i = i.n) i.S.U(i);
|
|
348
350
|
}
|
|
349
351
|
}
|
|
350
352
|
};
|
|
351
|
-
|
|
353
|
+
_.prototype.N = function () {
|
|
352
354
|
if (!(2 & this.f)) {
|
|
353
355
|
this.f |= 6;
|
|
354
356
|
for (let i = this.t; void 0 !== i; i = i.x) i.t.N();
|
|
355
357
|
}
|
|
356
358
|
};
|
|
357
|
-
|
|
359
|
+
_.prototype.peek = function () {
|
|
358
360
|
if (!this.h()) i();
|
|
359
361
|
if (16 & this.f) throw this.v;
|
|
360
362
|
return this.v;
|
|
361
363
|
};
|
|
362
|
-
Object.defineProperty(
|
|
364
|
+
Object.defineProperty(_.prototype, "value", {
|
|
363
365
|
get() {
|
|
364
366
|
if (1 & this.f) i();
|
|
365
|
-
const t =
|
|
367
|
+
const t = d$1(this);
|
|
366
368
|
this.h();
|
|
367
369
|
if (void 0 !== t) t.i = this.i;
|
|
368
370
|
if (16 & this.f) throw this.v;
|
|
369
371
|
return this.v;
|
|
370
372
|
}
|
|
371
373
|
});
|
|
372
|
-
function _(i) {
|
|
373
|
-
return new y(i);
|
|
374
|
-
}
|
|
375
374
|
function p$1(i) {
|
|
376
|
-
|
|
375
|
+
return new _(i);
|
|
376
|
+
}
|
|
377
|
+
function g(i) {
|
|
378
|
+
const t = i.u;
|
|
377
379
|
i.u = void 0;
|
|
378
|
-
if ("function" == typeof
|
|
379
|
-
|
|
380
|
-
const
|
|
381
|
-
|
|
380
|
+
if ("function" == typeof t) {
|
|
381
|
+
e++;
|
|
382
|
+
const o = s;
|
|
383
|
+
s = void 0;
|
|
382
384
|
try {
|
|
383
|
-
|
|
385
|
+
t();
|
|
384
386
|
} catch (t) {
|
|
385
387
|
i.f &= -2;
|
|
386
388
|
i.f |= 8;
|
|
387
|
-
|
|
389
|
+
b(i);
|
|
388
390
|
throw t;
|
|
389
391
|
} finally {
|
|
390
|
-
|
|
391
|
-
|
|
392
|
+
s = o;
|
|
393
|
+
n();
|
|
392
394
|
}
|
|
393
395
|
}
|
|
394
396
|
}
|
|
395
|
-
function
|
|
397
|
+
function b(i) {
|
|
396
398
|
for (let t = i.s; void 0 !== t; t = t.n) t.S.U(t);
|
|
397
399
|
i.x = void 0;
|
|
398
400
|
i.s = void 0;
|
|
399
|
-
|
|
401
|
+
g(i);
|
|
400
402
|
}
|
|
401
|
-
function
|
|
402
|
-
if (
|
|
403
|
+
function x(i) {
|
|
404
|
+
if (s !== this) throw new Error("Out-of-order effect");
|
|
403
405
|
w(this);
|
|
404
|
-
|
|
406
|
+
s = i;
|
|
405
407
|
this.f &= -2;
|
|
406
|
-
if (8 & this.f)
|
|
407
|
-
|
|
408
|
+
if (8 & this.f) b(this);
|
|
409
|
+
n();
|
|
408
410
|
}
|
|
409
|
-
function
|
|
411
|
+
function E(i) {
|
|
410
412
|
this.x = i;
|
|
411
413
|
this.u = void 0;
|
|
412
414
|
this.s = void 0;
|
|
413
415
|
this.o = void 0;
|
|
414
416
|
this.f = 32;
|
|
415
417
|
}
|
|
416
|
-
|
|
418
|
+
E.prototype.c = function () {
|
|
417
419
|
const i = this.S();
|
|
418
420
|
try {
|
|
419
421
|
if (8 & this.f) return;
|
|
@@ -424,30 +426,30 @@ x.prototype.c = function () {
|
|
|
424
426
|
i();
|
|
425
427
|
}
|
|
426
428
|
};
|
|
427
|
-
|
|
429
|
+
E.prototype.S = function () {
|
|
428
430
|
if (1 & this.f) i();
|
|
429
431
|
this.f |= 1;
|
|
430
432
|
this.f &= -9;
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
const t =
|
|
435
|
-
|
|
436
|
-
return
|
|
437
|
-
};
|
|
438
|
-
|
|
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 () {
|
|
439
441
|
if (!(2 & this.f)) {
|
|
440
442
|
this.f |= 2;
|
|
441
|
-
this.o =
|
|
442
|
-
|
|
443
|
+
this.o = h$1;
|
|
444
|
+
h$1 = this;
|
|
443
445
|
}
|
|
444
446
|
};
|
|
445
|
-
|
|
447
|
+
E.prototype.d = function () {
|
|
446
448
|
this.f |= 8;
|
|
447
|
-
if (!(1 & this.f))
|
|
449
|
+
if (!(1 & this.f)) b(this);
|
|
448
450
|
};
|
|
449
|
-
function
|
|
450
|
-
const t = new
|
|
451
|
+
function O(i) {
|
|
452
|
+
const t = new E(i);
|
|
451
453
|
try {
|
|
452
454
|
t.c();
|
|
453
455
|
} catch (i) {
|
|
@@ -483,7 +485,7 @@ function p({
|
|
|
483
485
|
this.setState({});
|
|
484
486
|
}
|
|
485
487
|
};
|
|
486
|
-
return
|
|
488
|
+
return p$1(() => {
|
|
487
489
|
let t = i.value.value;
|
|
488
490
|
return 0 === t ? 0 : !0 === t ? "" : t || "";
|
|
489
491
|
});
|
|
@@ -491,7 +493,7 @@ function p({
|
|
|
491
493
|
return o.value;
|
|
492
494
|
}
|
|
493
495
|
p.displayName = "_st";
|
|
494
|
-
Object.defineProperties(
|
|
496
|
+
Object.defineProperties(v$1.prototype, {
|
|
495
497
|
constructor: {
|
|
496
498
|
configurable: !0,
|
|
497
499
|
value: void 0
|
|
@@ -520,7 +522,7 @@ c("__b", (t, i) => {
|
|
|
520
522
|
for (let n in e) {
|
|
521
523
|
if ("children" === n) continue;
|
|
522
524
|
let o = e[n];
|
|
523
|
-
if (o instanceof
|
|
525
|
+
if (o instanceof v$1) {
|
|
524
526
|
if (!t) i.__np = t = {};
|
|
525
527
|
t[n] = o;
|
|
526
528
|
e[n] = o.peek();
|
|
@@ -538,7 +540,7 @@ c("__r", (t, i) => {
|
|
|
538
540
|
e = n.__$u;
|
|
539
541
|
if (void 0 === e) n.__$u = e = function (t) {
|
|
540
542
|
let i;
|
|
541
|
-
|
|
543
|
+
O(function () {
|
|
542
544
|
i = this;
|
|
543
545
|
});
|
|
544
546
|
i.c = () => {
|
|
@@ -587,13 +589,13 @@ c("diffed", (t, i) => {
|
|
|
587
589
|
});
|
|
588
590
|
function v(t, i, e, n) {
|
|
589
591
|
const o = i in t && void 0 === t.ownerSVGElement,
|
|
590
|
-
r =
|
|
592
|
+
r = l(e);
|
|
591
593
|
return {
|
|
592
594
|
o: (t, i) => {
|
|
593
595
|
r.value = t;
|
|
594
596
|
n = i;
|
|
595
597
|
},
|
|
596
|
-
d:
|
|
598
|
+
d: O(() => {
|
|
597
599
|
const e = r.value.value;
|
|
598
600
|
if (n[i] !== e) {
|
|
599
601
|
n[i] = e;
|
|
@@ -632,7 +634,7 @@ c("__h", (t, i, e, n) => {
|
|
|
632
634
|
t(i, e, n);
|
|
633
635
|
});
|
|
634
636
|
function useSignal(t) {
|
|
635
|
-
return F(() =>
|
|
637
|
+
return F(() => l(t), []);
|
|
636
638
|
}
|
|
637
639
|
|
|
638
640
|
const paramsFromParentWindow = {};
|
|
@@ -644,9 +646,9 @@ const parentWindowReloader = window.parent.__reloader__;
|
|
|
644
646
|
|
|
645
647
|
const stateFromLocalStorage = localStorage.hasOwnProperty("jsenv_toolbar") ? JSON.parse(localStorage.getItem("jsenv_toolbar")) : {};
|
|
646
648
|
|
|
647
|
-
const animationsEnabledSignal =
|
|
649
|
+
const animationsEnabledSignal = l(typeof stateFromLocalStorage.animationsEnabled === "boolean" ? stateFromLocalStorage.animationsEnabled : typeof paramsFromParentWindow.animationsEnabled === "boolean" ? paramsFromParentWindow.animationsEnabled : false);
|
|
648
650
|
|
|
649
|
-
|
|
651
|
+
O(() => {
|
|
650
652
|
const animationsEnabled = animationsEnabledSignal.value;
|
|
651
653
|
if (animationsEnabled) {
|
|
652
654
|
document.documentElement.removeAttribute("data-animation-disabled");
|
|
@@ -655,11 +657,11 @@ E(() => {
|
|
|
655
657
|
}
|
|
656
658
|
});
|
|
657
659
|
|
|
658
|
-
const executionTooltipOpenedSignal =
|
|
659
|
-
const executionSignal =
|
|
660
|
+
const executionTooltipOpenedSignal = l(false);
|
|
661
|
+
const executionSignal = l({
|
|
660
662
|
status: "running"
|
|
661
663
|
});
|
|
662
|
-
const previousExecutionSignal =
|
|
664
|
+
const previousExecutionSignal = l(sessionStorage.hasOwnProperty(window.location.href) ? JSON.parse(sessionStorage.getItem(window.location.href)) : null);
|
|
663
665
|
window.parent.__supervisor__.getDocumentExecutionResult().then(({
|
|
664
666
|
status,
|
|
665
667
|
startTime,
|
|
@@ -674,8 +676,8 @@ window.parent.__supervisor__.getDocumentExecutionResult().then(({
|
|
|
674
676
|
|
|
675
677
|
const notificationAPIDetected = typeof window.Notification === "function";
|
|
676
678
|
|
|
677
|
-
const notificationsEnabledSignal =
|
|
678
|
-
const notificationPermissionSignal =
|
|
679
|
+
const notificationsEnabledSignal = l(typeof stateFromLocalStorage.notificationsEnabled === "boolean" ? stateFromLocalStorage.notificationsEnabled : typeof paramsFromParentWindow.notificationsEnabled === "boolean" ? paramsFromParentWindow.notificationsEnabled : false);
|
|
680
|
+
const notificationPermissionSignal = l(Notification.permission);
|
|
679
681
|
|
|
680
682
|
const enableNotifications = () => {
|
|
681
683
|
notificationsEnabledSignal.value = true;
|
|
@@ -781,13 +783,13 @@ const getFaviconHref = () => {
|
|
|
781
783
|
return link ? link.href : undefined;
|
|
782
784
|
};
|
|
783
785
|
|
|
784
|
-
|
|
786
|
+
O(() => {
|
|
785
787
|
const execution = executionSignal.value;
|
|
786
788
|
if (execution) {
|
|
787
789
|
sessionStorage.setItem(window.location.href, JSON.stringify(execution));
|
|
788
790
|
}
|
|
789
791
|
});
|
|
790
|
-
|
|
792
|
+
O(() => {
|
|
791
793
|
const execution = executionSignal.value;
|
|
792
794
|
const previousExecution = previousExecutionSignal.value;
|
|
793
795
|
if (execution) {
|
|
@@ -795,7 +797,7 @@ E(() => {
|
|
|
795
797
|
}
|
|
796
798
|
});
|
|
797
799
|
|
|
798
|
-
|
|
800
|
+
O(() => {
|
|
799
801
|
const notificationsEnabled = notificationsEnabledSignal.value;
|
|
800
802
|
if (!notificationsEnabled) {
|
|
801
803
|
closeAllNotifications();
|
|
@@ -841,8 +843,8 @@ const disableAutoreload = () => {
|
|
|
841
843
|
parentWindowReloader.autoreload.disable();
|
|
842
844
|
};
|
|
843
845
|
|
|
844
|
-
const serverTooltipOpenedSignal =
|
|
845
|
-
const serverConnectionSignal =
|
|
846
|
+
const serverTooltipOpenedSignal = l(false);
|
|
847
|
+
const serverConnectionSignal = l("default");
|
|
846
848
|
const serverEvents$1 = window.__server_events__;
|
|
847
849
|
if (serverEvents$1) {
|
|
848
850
|
serverEvents$1.readyState.onchange = () => {
|
|
@@ -863,7 +865,7 @@ const closeAllTooltips = () => {
|
|
|
863
865
|
closeServerTooltip();
|
|
864
866
|
};
|
|
865
867
|
|
|
866
|
-
const openedSignal =
|
|
868
|
+
const openedSignal = l(typeof stateFromLocalStorage.opened === "boolean" ? stateFromLocalStorage.opened : typeof paramsFromParentWindow.opened === "boolean" ? paramsFromParentWindow.opened : false);
|
|
867
869
|
|
|
868
870
|
const getToolbarIframe = () => {
|
|
869
871
|
const iframes = Array.from(window.parent.document.querySelectorAll("iframe"));
|
|
@@ -955,7 +957,7 @@ const startJavaScriptAnimation = ({
|
|
|
955
957
|
};
|
|
956
958
|
|
|
957
959
|
const initToolbarOpening = () => {
|
|
958
|
-
|
|
960
|
+
O(() => {
|
|
959
961
|
const opened = openedSignal.value;
|
|
960
962
|
if (opened) {
|
|
961
963
|
showToolbar();
|
|
@@ -1198,7 +1200,7 @@ const closeOverflowMenu = () => {
|
|
|
1198
1200
|
document.querySelector("#menu_overflow").removeAttribute("data-animate");
|
|
1199
1201
|
};
|
|
1200
1202
|
|
|
1201
|
-
const settingsOpenedSignal =
|
|
1203
|
+
const settingsOpenedSignal = l(false);
|
|
1202
1204
|
|
|
1203
1205
|
const openSettings = () => {
|
|
1204
1206
|
settingsOpenedSignal.value = true;
|
|
@@ -1207,7 +1209,7 @@ const closeSettings = () => {
|
|
|
1207
1209
|
settingsOpenedSignal.value = false;
|
|
1208
1210
|
};
|
|
1209
1211
|
|
|
1210
|
-
const changesTooltipOpenedSignal =
|
|
1212
|
+
const changesTooltipOpenedSignal = l(false);
|
|
1211
1213
|
|
|
1212
1214
|
const renderToolbarOverlay = () => {
|
|
1213
1215
|
const toolbarOverlay = document.querySelector("#toolbar_overlay");
|
|
@@ -1215,7 +1217,7 @@ const renderToolbarOverlay = () => {
|
|
|
1215
1217
|
closeAllTooltips();
|
|
1216
1218
|
closeSettings();
|
|
1217
1219
|
};
|
|
1218
|
-
|
|
1220
|
+
O(() => {
|
|
1219
1221
|
if (!window.parent) {
|
|
1220
1222
|
// can happen while parent iframe reloads
|
|
1221
1223
|
return;
|
|
@@ -1342,11 +1344,11 @@ const renameAttribute = (node, name, newName) => {
|
|
|
1342
1344
|
const executionIndicator = document.querySelector("#document_execution_indicator");
|
|
1343
1345
|
const renderDocumentExecutionIndicator = async () => {
|
|
1344
1346
|
removeForceHideElement(document.querySelector("#document_execution_indicator"));
|
|
1345
|
-
|
|
1347
|
+
O(() => {
|
|
1346
1348
|
const execution = executionSignal.value;
|
|
1347
1349
|
updateExecutionIndicator(execution);
|
|
1348
1350
|
});
|
|
1349
|
-
|
|
1351
|
+
O(() => {
|
|
1350
1352
|
const executionTooltipOpened = executionTooltipOpenedSignal.value;
|
|
1351
1353
|
if (executionTooltipOpened) {
|
|
1352
1354
|
executionIndicator.setAttribute("data-tooltip-visible", "");
|
|
@@ -1397,9 +1399,9 @@ const computeText = ({
|
|
|
1397
1399
|
return "";
|
|
1398
1400
|
};
|
|
1399
1401
|
|
|
1400
|
-
const autoreloadEnabledSignal =
|
|
1401
|
-
const reloaderStatusSignal =
|
|
1402
|
-
const changesSignal =
|
|
1402
|
+
const autoreloadEnabledSignal = l(false);
|
|
1403
|
+
const reloaderStatusSignal = l("idle");
|
|
1404
|
+
const changesSignal = l(0);
|
|
1403
1405
|
if (parentWindowReloader) {
|
|
1404
1406
|
autoreloadEnabledSignal.value = parentWindowReloader.autoreload.enabled;
|
|
1405
1407
|
parentWindowReloader.autoreload.onchange = () => {
|
|
@@ -1426,7 +1428,7 @@ const closeChangesToolip = () => {
|
|
|
1426
1428
|
|
|
1427
1429
|
const changesIndicator = document.querySelector("#changes_indicator");
|
|
1428
1430
|
const renderChangesIndicator = () => {
|
|
1429
|
-
|
|
1431
|
+
O(() => {
|
|
1430
1432
|
const autoreloadEnabled = autoreloadEnabledSignal.value;
|
|
1431
1433
|
const changes = changesSignal.value;
|
|
1432
1434
|
const changeCount = changes.length;
|
|
@@ -1448,7 +1450,7 @@ const renderChangesIndicator = () => {
|
|
|
1448
1450
|
changesIndicator.querySelector(".tooltip_action").onclick = () => {
|
|
1449
1451
|
parentWindowReloader.reload();
|
|
1450
1452
|
};
|
|
1451
|
-
|
|
1453
|
+
O(() => {
|
|
1452
1454
|
const changesTooltipOpened = changesTooltipOpenedSignal.value;
|
|
1453
1455
|
if (changesTooltipOpened) {
|
|
1454
1456
|
changesIndicator.setAttribute("data-tooltip-visible", "");
|
|
@@ -1481,11 +1483,11 @@ const serverEvents = window.__server_events__;
|
|
|
1481
1483
|
const serverIndicator = document.querySelector("#server_indicator");
|
|
1482
1484
|
const renderServerIndicator = () => {
|
|
1483
1485
|
removeForceHideElement(document.querySelector("#server_indicator"));
|
|
1484
|
-
|
|
1486
|
+
O(() => {
|
|
1485
1487
|
const serverConnection = serverConnectionSignal.value;
|
|
1486
1488
|
updateServerIndicator(serverConnection);
|
|
1487
1489
|
});
|
|
1488
|
-
|
|
1490
|
+
O(() => {
|
|
1489
1491
|
const serverTooltipOpened = serverTooltipOpenedSignal.value;
|
|
1490
1492
|
if (serverTooltipOpened) {
|
|
1491
1493
|
serverIndicator.setAttribute("data-tooltip-visible", "");
|
|
@@ -1531,7 +1533,7 @@ const renderToolbarAutoreloadSetting = () => {
|
|
|
1531
1533
|
return;
|
|
1532
1534
|
}
|
|
1533
1535
|
const autoreloadCheckbox = document.querySelector("#toggle_autoreload");
|
|
1534
|
-
|
|
1536
|
+
O(() => {
|
|
1535
1537
|
const autoreloadEnabled = autoreloadEnabledSignal.value;
|
|
1536
1538
|
if (autoreloadEnabled) {
|
|
1537
1539
|
autoreloadCheckbox.checked = true;
|
|
@@ -1598,7 +1600,7 @@ const disableAnimations = () => {
|
|
|
1598
1600
|
|
|
1599
1601
|
const renderToolbarAnimationSetting = () => {
|
|
1600
1602
|
const animCheckbox = document.querySelector("#toggle_anims");
|
|
1601
|
-
|
|
1603
|
+
O(() => {
|
|
1602
1604
|
const animationsEnabled = animationsEnabledSignal.value;
|
|
1603
1605
|
animCheckbox.checked = animationsEnabled;
|
|
1604
1606
|
});
|
|
@@ -1617,11 +1619,11 @@ const renderToolbarAnimationSetting = () => {
|
|
|
1617
1619
|
|
|
1618
1620
|
const notifCheckbox = document.querySelector("#toggle_notifs");
|
|
1619
1621
|
const renderToolbarNotificationSetting = () => {
|
|
1620
|
-
|
|
1622
|
+
O(() => {
|
|
1621
1623
|
const notificationsEnabled = notificationsEnabledSignal.value;
|
|
1622
1624
|
notifCheckbox.checked = notificationsEnabled;
|
|
1623
1625
|
});
|
|
1624
|
-
|
|
1626
|
+
O(() => {
|
|
1625
1627
|
const notificationPermission = notificationPermissionSignal.value;
|
|
1626
1628
|
if (!notificationAPIDetected) {
|
|
1627
1629
|
applyNotificationNotAvailableEffects();
|
|
@@ -1683,7 +1685,7 @@ const applyNotificationNOTGrantedEffects = () => {
|
|
|
1683
1685
|
};
|
|
1684
1686
|
};
|
|
1685
1687
|
|
|
1686
|
-
const themeSignal =
|
|
1688
|
+
const themeSignal = l(typeof stateFromLocalStorage.theme === "string" ? stateFromLocalStorage.theme : typeof paramsFromParentWindow.theme === "string" ? paramsFromParentWindow.theme : "dark");
|
|
1687
1689
|
|
|
1688
1690
|
const switchToLightTheme = () => {
|
|
1689
1691
|
themeSignal.value = "light";
|
|
@@ -1704,7 +1706,7 @@ const renderToolbarThemeSetting = () => {
|
|
|
1704
1706
|
};
|
|
1705
1707
|
};
|
|
1706
1708
|
|
|
1707
|
-
const ribbonDisplayedSignal =
|
|
1709
|
+
const ribbonDisplayedSignal = l(typeof stateFromLocalStorage.ribbonDisplayed === "boolean" ? stateFromLocalStorage.ribbonDisplayed : true);
|
|
1708
1710
|
|
|
1709
1711
|
const ribbonBox = document.querySelector("#ribbon_box");
|
|
1710
1712
|
const ribbonCheckbox = ribbonBox.querySelector("input");
|
|
@@ -1712,7 +1714,7 @@ const renderToolbarRibbonSetting = () => {
|
|
|
1712
1714
|
const ribbonContainer = window.parent.document.querySelector("#jsenv_ribbon_container");
|
|
1713
1715
|
if (ribbonContainer) {
|
|
1714
1716
|
ribbonBox.style.display = "block";
|
|
1715
|
-
|
|
1717
|
+
O(() => {
|
|
1716
1718
|
const ribbonDisplayed = ribbonDisplayedSignal.value;
|
|
1717
1719
|
ribbonCheckbox.checked = ribbonDisplayed;
|
|
1718
1720
|
if (ribbonDisplayed) {
|
|
@@ -1740,7 +1742,7 @@ const renderToolbarSettings = () => {
|
|
|
1740
1742
|
renderToolbarNotificationSetting();
|
|
1741
1743
|
renderToolbarThemeSetting();
|
|
1742
1744
|
renderToolbarRibbonSetting();
|
|
1743
|
-
|
|
1745
|
+
O(() => {
|
|
1744
1746
|
const settingsOpened = settingsOpenedSignal.value;
|
|
1745
1747
|
if (settingsOpened) {
|
|
1746
1748
|
activateToolbarSection(document.querySelector("#settings"));
|
|
@@ -1808,14 +1810,14 @@ addExternalCommandCallback("initToolbar", () => {
|
|
|
1808
1810
|
});
|
|
1809
1811
|
sendEventToParent("toolbar_ready");
|
|
1810
1812
|
|
|
1811
|
-
|
|
1813
|
+
O(() => {
|
|
1812
1814
|
const serverConnection = serverConnectionSignal.value;
|
|
1813
1815
|
if (serverConnection === "connecting" || serverConnection === "closed") {
|
|
1814
1816
|
openServerTooltip();
|
|
1815
1817
|
}
|
|
1816
1818
|
});
|
|
1817
1819
|
|
|
1818
|
-
|
|
1820
|
+
O(() => {
|
|
1819
1821
|
const theme = themeSignal.value;
|
|
1820
1822
|
document.querySelector("html").setAttribute("data-theme", theme);
|
|
1821
1823
|
});
|
|
@@ -1823,7 +1825,7 @@ E(() => {
|
|
|
1823
1825
|
addExternalCommandCallback("openToolbar", openToolbar);
|
|
1824
1826
|
addExternalCommandCallback("closeToolbar", closeToolbar);
|
|
1825
1827
|
|
|
1826
|
-
const toolbarStateSignal =
|
|
1828
|
+
const toolbarStateSignal = p$1(() => {
|
|
1827
1829
|
const opened = openedSignal.value;
|
|
1828
1830
|
const theme = themeSignal.value;
|
|
1829
1831
|
const animationsEnabled = animationsEnabledSignal.value;
|
|
@@ -1838,7 +1840,7 @@ const toolbarStateSignal = _(() => {
|
|
|
1838
1840
|
};
|
|
1839
1841
|
});
|
|
1840
1842
|
|
|
1841
|
-
|
|
1843
|
+
O(() => {
|
|
1842
1844
|
const toolbarState = toolbarStateSignal.value;
|
|
1843
1845
|
localStorage.setItem("jsenv_toolbar", JSON.stringify(toolbarState));
|
|
1844
1846
|
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.
|
|
3
|
+
"version": "1.2.12",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"/src/"
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@jsenv/ast": "5.
|
|
29
|
+
"@jsenv/ast": "5.2.0",
|
|
30
30
|
"@preact/signals": "1.2.1"
|
|
31
31
|
},
|
|
32
32
|
"scripts": {
|