@pie-players/pie-tool-line-reader 0.1.10 → 0.3.0
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/tool-line-reader.js +118 -95
- package/package.json +5 -5
package/dist/tool-line-reader.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
var
|
|
1
|
+
var Er = Object.defineProperty;
|
|
2
2
|
var Fi = (t) => {
|
|
3
3
|
throw TypeError(t);
|
|
4
4
|
};
|
|
5
|
-
var kr = (t, e, i) => e in t ?
|
|
5
|
+
var kr = (t, e, i) => e in t ? Er(t, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[e] = i;
|
|
6
6
|
var b = (t, e, i) => kr(t, typeof e != "symbol" ? e + "" : e, i), ei = (t, e, i) => e.has(t) || Fi("Cannot " + i);
|
|
7
7
|
var c = (t, e, i) => (ei(t, e, "read from private field"), i ? i.call(t) : e.get(t)), w = (t, e, i) => e.has(t) ? Fi("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, i), _ = (t, e, i, n) => (ei(t, e, "write to private field"), n ? n.call(t, i) : e.set(t, i), i), j = (t, e, i) => (ei(t, e, "access private method"), i);
|
|
8
8
|
var cn;
|
|
@@ -21,7 +21,7 @@ function hn() {
|
|
|
21
21
|
});
|
|
22
22
|
return { promise: i, resolve: t, reject: e };
|
|
23
23
|
}
|
|
24
|
-
const P = 2, yt = 4, Yt = 8, pn = 1 << 24, Ae = 16, he = 32, Pe = 64, ni = 128, X = 512, N = 1024, D = 2048, ne = 4096, ue = 8192,
|
|
24
|
+
const P = 2, yt = 4, Yt = 8, pn = 1 << 24, Ae = 16, he = 32, Pe = 64, ni = 128, X = 512, N = 1024, D = 2048, ne = 4096, ue = 8192, Se = 16384, dt = 32768, at = 65536, zi = 1 << 17, vn = 1 << 18, We = 1 << 19, Dr = 1 << 20, Ke = 65536, ri = 1 << 21, bi = 1 << 22, Ve = 1 << 23, Ct = /* @__PURE__ */ Symbol("$state"), xr = /* @__PURE__ */ Symbol("legacy props"), De = new class extends Error {
|
|
25
25
|
constructor() {
|
|
26
26
|
super(...arguments);
|
|
27
27
|
b(this, "name", "StaleReactionError");
|
|
@@ -67,36 +67,36 @@ function Kt(t) {
|
|
|
67
67
|
function Xr() {
|
|
68
68
|
console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
|
|
69
69
|
}
|
|
70
|
-
let
|
|
70
|
+
let E = !1;
|
|
71
71
|
function Je(t) {
|
|
72
|
-
|
|
72
|
+
E = t;
|
|
73
73
|
}
|
|
74
|
-
let
|
|
74
|
+
let S;
|
|
75
75
|
function re(t) {
|
|
76
76
|
if (t === null)
|
|
77
77
|
throw Kt(), ot;
|
|
78
|
-
return
|
|
78
|
+
return S = t;
|
|
79
79
|
}
|
|
80
80
|
function yi() {
|
|
81
|
-
return re(/* @__PURE__ */ Re(
|
|
81
|
+
return re(/* @__PURE__ */ Re(S));
|
|
82
82
|
}
|
|
83
83
|
function Bi(t) {
|
|
84
|
-
if (
|
|
85
|
-
if (/* @__PURE__ */ Re(
|
|
84
|
+
if (E) {
|
|
85
|
+
if (/* @__PURE__ */ Re(S) !== null)
|
|
86
86
|
throw Kt(), ot;
|
|
87
|
-
|
|
87
|
+
S = t;
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
function gn(t = 1) {
|
|
91
|
-
if (
|
|
92
|
-
for (var e = t, i =
|
|
91
|
+
if (E) {
|
|
92
|
+
for (var e = t, i = S; e--; )
|
|
93
93
|
i = /** @type {TemplateNode} */
|
|
94
94
|
/* @__PURE__ */ Re(i);
|
|
95
|
-
|
|
95
|
+
S = i;
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
function mn(t = !0) {
|
|
99
|
-
for (var e = 0, i =
|
|
99
|
+
for (var e = 0, i = S; ; ) {
|
|
100
100
|
if (i.nodeType === Ut) {
|
|
101
101
|
var n = (
|
|
102
102
|
/** @type {Comment} */
|
|
@@ -220,12 +220,12 @@ function $n(t) {
|
|
|
220
220
|
e.deps
|
|
221
221
|
));
|
|
222
222
|
}
|
|
223
|
-
function
|
|
223
|
+
function Sn(t, e, i) {
|
|
224
224
|
(t.f & D) !== 0 ? e.add(t) : (t.f & ne) !== 0 && i.add(t), $n(t.deps), L(t, N);
|
|
225
225
|
}
|
|
226
226
|
const Vt = /* @__PURE__ */ new Set();
|
|
227
227
|
let R = null, ee = null, F = [], Wt = null, si = !1, mt = !1;
|
|
228
|
-
var Ze, et, He, tt, $t,
|
|
228
|
+
var Ze, et, He, tt, $t, St, ze, be, it, de, oi, li, En;
|
|
229
229
|
const Li = class Li {
|
|
230
230
|
constructor() {
|
|
231
231
|
w(this, de);
|
|
@@ -271,7 +271,7 @@ const Li = class Li {
|
|
|
271
271
|
* Deferred effects (which run after async work has completed) that are DIRTY
|
|
272
272
|
* @type {Set<Effect>}
|
|
273
273
|
*/
|
|
274
|
-
w(this,
|
|
274
|
+
w(this, St, /* @__PURE__ */ new Set());
|
|
275
275
|
/**
|
|
276
276
|
* Deferred effects that are MAYBE_DIRTY
|
|
277
277
|
* @type {Set<Effect>}
|
|
@@ -328,7 +328,7 @@ const Li = class Li {
|
|
|
328
328
|
On(r, s);
|
|
329
329
|
} else {
|
|
330
330
|
for (const r of c(this, Ze)) r();
|
|
331
|
-
c(this, Ze).clear(), c(this, He) === 0 && j(this, de,
|
|
331
|
+
c(this, Ze).clear(), c(this, He) === 0 && j(this, de, En).call(this), R = null, Gi(n), Gi(i), c(this, $t)?.resolve();
|
|
332
332
|
}
|
|
333
333
|
ee = null;
|
|
334
334
|
}
|
|
@@ -375,7 +375,7 @@ const Li = class Li {
|
|
|
375
375
|
}));
|
|
376
376
|
}
|
|
377
377
|
revive() {
|
|
378
|
-
for (const e of c(this,
|
|
378
|
+
for (const e of c(this, St))
|
|
379
379
|
c(this, ze).delete(e), L(e, D), te(e);
|
|
380
380
|
for (const e of c(this, ze))
|
|
381
381
|
L(e, ne), te(e);
|
|
@@ -404,7 +404,7 @@ const Li = class Li {
|
|
|
404
404
|
apply() {
|
|
405
405
|
}
|
|
406
406
|
};
|
|
407
|
-
Ze = new WeakMap(), et = new WeakMap(), He = new WeakMap(), tt = new WeakMap(), $t = new WeakMap(),
|
|
407
|
+
Ze = new WeakMap(), et = new WeakMap(), He = new WeakMap(), tt = new WeakMap(), $t = new WeakMap(), St = new WeakMap(), ze = new WeakMap(), be = new WeakMap(), it = new WeakMap(), de = new WeakSet(), /**
|
|
408
408
|
* Traverse the effect tree, executing effects or stashing
|
|
409
409
|
* them for later execution as appropriate
|
|
410
410
|
* @param {Effect} root
|
|
@@ -438,8 +438,8 @@ oi = function(e, i, n) {
|
|
|
438
438
|
*/
|
|
439
439
|
li = function(e) {
|
|
440
440
|
for (var i = 0; i < e.length; i += 1)
|
|
441
|
-
|
|
442
|
-
},
|
|
441
|
+
Sn(e[i], c(this, St), c(this, ze));
|
|
442
|
+
}, En = function() {
|
|
443
443
|
var r;
|
|
444
444
|
if (Vt.size > 1) {
|
|
445
445
|
this.previous.clear();
|
|
@@ -480,7 +480,7 @@ li = function(e) {
|
|
|
480
480
|
}
|
|
481
481
|
this.committed = !0, Vt.delete(this);
|
|
482
482
|
};
|
|
483
|
-
let
|
|
483
|
+
let Ee = Li;
|
|
484
484
|
function ai(t) {
|
|
485
485
|
var e = mt;
|
|
486
486
|
mt = !0;
|
|
@@ -500,7 +500,7 @@ function kn() {
|
|
|
500
500
|
var t = null;
|
|
501
501
|
try {
|
|
502
502
|
for (var e = 0; F.length > 0; ) {
|
|
503
|
-
var i =
|
|
503
|
+
var i = Ee.ensure();
|
|
504
504
|
if (e++ > 1e3) {
|
|
505
505
|
var n, r;
|
|
506
506
|
ns();
|
|
@@ -524,17 +524,17 @@ function Gi(t) {
|
|
|
524
524
|
if (e !== 0) {
|
|
525
525
|
for (var i = 0; i < e; ) {
|
|
526
526
|
var n = t[i++];
|
|
527
|
-
if ((n.f & (
|
|
527
|
+
if ((n.f & (Se | ue)) === 0 && Ot(n) && (_e = /* @__PURE__ */ new Set(), ft(n), n.deps === null && n.first === null && n.nodes === null && n.teardown === null && n.ac === null && Yn(n), _e?.size > 0)) {
|
|
528
528
|
Ne.clear();
|
|
529
529
|
for (const r of _e) {
|
|
530
|
-
if ((r.f & (
|
|
530
|
+
if ((r.f & (Se | ue)) !== 0) continue;
|
|
531
531
|
const s = [r];
|
|
532
532
|
let o = r.parent;
|
|
533
533
|
for (; o !== null; )
|
|
534
534
|
_e.has(o) && (_e.delete(o), s.push(o)), o = o.parent;
|
|
535
535
|
for (let l = s.length - 1; l >= 0; l--) {
|
|
536
536
|
const a = s[l];
|
|
537
|
-
(a.f & (
|
|
537
|
+
(a.f & (Se | ue)) === 0 && ft(a);
|
|
538
538
|
}
|
|
539
539
|
}
|
|
540
540
|
_e.clear();
|
|
@@ -603,7 +603,7 @@ function On(t, e) {
|
|
|
603
603
|
function rs(t) {
|
|
604
604
|
let e = 0, i = Rt(0), n;
|
|
605
605
|
return () => {
|
|
606
|
-
|
|
606
|
+
Ei() && (d(i), ki(() => (e === 0 && (n = Ri(() => t(() => _t(i)))), e += 1, () => {
|
|
607
607
|
qe(() => {
|
|
608
608
|
e -= 1, e === 0 && (n?.(), n = void 0, _t(i));
|
|
609
609
|
});
|
|
@@ -614,7 +614,7 @@ var ss = at | We;
|
|
|
614
614
|
function os(t, e, i) {
|
|
615
615
|
new ls(t, e, i);
|
|
616
616
|
}
|
|
617
|
-
var K,
|
|
617
|
+
var K, Et, ye, Be, oe, le, G, ae, we, Ge, Me, nt, rt, st, Te, Bt, x, Ln, Mn, ci, Pt, ui;
|
|
618
618
|
class ls {
|
|
619
619
|
/**
|
|
620
620
|
* @param {TemplateNode} node
|
|
@@ -629,7 +629,7 @@ class ls {
|
|
|
629
629
|
/** @type {TemplateNode} */
|
|
630
630
|
w(this, K);
|
|
631
631
|
/** @type {TemplateNode | null} */
|
|
632
|
-
w(this,
|
|
632
|
+
w(this, Et, E ? S : null);
|
|
633
633
|
/** @type {BoundaryProps} */
|
|
634
634
|
w(this, ye);
|
|
635
635
|
/** @type {((anchor: Node) => void)} */
|
|
@@ -670,22 +670,22 @@ class ls {
|
|
|
670
670
|
s.b = this, s.f |= ni, n(r);
|
|
671
671
|
}), this.parent = /** @type {Effect} */
|
|
672
672
|
$.b, _(this, oe, Bn(() => {
|
|
673
|
-
if (
|
|
673
|
+
if (E) {
|
|
674
674
|
const r = (
|
|
675
675
|
/** @type {Comment} */
|
|
676
|
-
c(this,
|
|
676
|
+
c(this, Et)
|
|
677
677
|
);
|
|
678
678
|
yi(), r.data === _i ? j(this, x, Mn).call(this) : j(this, x, Ln).call(this);
|
|
679
679
|
} else
|
|
680
680
|
j(this, x, ci).call(this);
|
|
681
|
-
}, ss)),
|
|
681
|
+
}, ss)), E && _(this, K, S);
|
|
682
682
|
}
|
|
683
683
|
/**
|
|
684
684
|
* Defer an effect inside a pending boundary until the boundary resolves
|
|
685
685
|
* @param {Effect} effect
|
|
686
686
|
*/
|
|
687
687
|
defer_effect(e) {
|
|
688
|
-
|
|
688
|
+
Sn(e, c(this, rt), c(this, st));
|
|
689
689
|
}
|
|
690
690
|
/**
|
|
691
691
|
* Returns `false` if the effect exists inside a boundary whose pending snippet is shown
|
|
@@ -720,9 +720,9 @@ class ls {
|
|
|
720
720
|
let n = c(this, ye).failed;
|
|
721
721
|
if (!i && !n)
|
|
722
722
|
throw e;
|
|
723
|
-
c(this, le) && (z(c(this, le)), _(this, le, null)), c(this, G) && (z(c(this, G)), _(this, G, null)), c(this, ae) && (z(c(this, ae)), _(this, ae, null)),
|
|
723
|
+
c(this, le) && (z(c(this, le)), _(this, le, null)), c(this, G) && (z(c(this, G)), _(this, G, null)), c(this, ae) && (z(c(this, ae)), _(this, ae, null)), E && (re(
|
|
724
724
|
/** @type {TemplateNode} */
|
|
725
|
-
c(this,
|
|
725
|
+
c(this, Et)
|
|
726
726
|
), gn(), re(mn()));
|
|
727
727
|
var r = !1, s = !1;
|
|
728
728
|
const o = () => {
|
|
@@ -733,7 +733,7 @@ class ls {
|
|
|
733
733
|
r = !0, s && Wr(), c(this, ae) !== null && bt(c(this, ae), () => {
|
|
734
734
|
_(this, ae, null);
|
|
735
735
|
}), j(this, x, Pt).call(this, () => {
|
|
736
|
-
|
|
736
|
+
Ee.ensure(), j(this, x, ci).call(this);
|
|
737
737
|
});
|
|
738
738
|
};
|
|
739
739
|
qe(() => {
|
|
@@ -743,7 +743,7 @@ class ls {
|
|
|
743
743
|
ut(l, c(this, oe) && c(this, oe).parent);
|
|
744
744
|
}
|
|
745
745
|
n && _(this, ae, j(this, x, Pt).call(this, () => {
|
|
746
|
-
|
|
746
|
+
Ee.ensure();
|
|
747
747
|
try {
|
|
748
748
|
return Le(() => {
|
|
749
749
|
var l = (
|
|
@@ -767,7 +767,7 @@ class ls {
|
|
|
767
767
|
});
|
|
768
768
|
}
|
|
769
769
|
}
|
|
770
|
-
K = new WeakMap(),
|
|
770
|
+
K = new WeakMap(), Et = new WeakMap(), ye = new WeakMap(), Be = new WeakMap(), oe = new WeakMap(), le = new WeakMap(), G = new WeakMap(), ae = new WeakMap(), we = new WeakMap(), Ge = new WeakMap(), Me = new WeakMap(), nt = new WeakMap(), rt = new WeakMap(), st = new WeakMap(), Te = new WeakMap(), Bt = new WeakMap(), x = new WeakSet(), Ln = function() {
|
|
771
771
|
try {
|
|
772
772
|
_(this, le, Le(() => c(this, Be).call(this, c(this, K))));
|
|
773
773
|
} catch (e) {
|
|
@@ -777,7 +777,7 @@ K = new WeakMap(), St = new WeakMap(), ye = new WeakMap(), Be = new WeakMap(), o
|
|
|
777
777
|
const e = c(this, ye).pending;
|
|
778
778
|
e && (this.is_pending = !0, _(this, G, Le(() => e(c(this, K)))), qe(() => {
|
|
779
779
|
var i = _(this, we, document.createDocumentFragment()), n = ke();
|
|
780
|
-
i.append(n), _(this, le, j(this, x, Pt).call(this, () => (
|
|
780
|
+
i.append(n), _(this, le, j(this, x, Pt).call(this, () => (Ee.ensure(), Le(() => c(this, Be).call(this, n))))), c(this, Me) === 0 && (c(this, K).before(i), _(this, we, null), bt(
|
|
781
781
|
/** @type {Effect} */
|
|
782
782
|
c(this, G),
|
|
783
783
|
() => {
|
|
@@ -854,7 +854,7 @@ function as(t, e, i, n) {
|
|
|
854
854
|
try {
|
|
855
855
|
n(h);
|
|
856
856
|
} catch (v) {
|
|
857
|
-
(l.f &
|
|
857
|
+
(l.f & Se) === 0 && ut(v, l);
|
|
858
858
|
}
|
|
859
859
|
o?.deactivate(), fi();
|
|
860
860
|
}
|
|
@@ -981,7 +981,7 @@ function fs(t) {
|
|
|
981
981
|
function ds(t) {
|
|
982
982
|
for (var e = t.parent; e !== null; ) {
|
|
983
983
|
if ((e.f & P) === 0)
|
|
984
|
-
return (e.f &
|
|
984
|
+
return (e.f & Se) === 0 ? (
|
|
985
985
|
/** @type {Effect} */
|
|
986
986
|
e
|
|
987
987
|
) : null;
|
|
@@ -1005,7 +1005,7 @@ function Vn(t) {
|
|
|
1005
1005
|
L(t, N);
|
|
1006
1006
|
return;
|
|
1007
1007
|
}
|
|
1008
|
-
Ce || (ee !== null ? (
|
|
1008
|
+
Ce || (ee !== null ? (Ei() || R?.is_fork) && ee.set(t, e) : wi(t));
|
|
1009
1009
|
}
|
|
1010
1010
|
function hs(t) {
|
|
1011
1011
|
if (t.effects !== null)
|
|
@@ -1053,7 +1053,7 @@ function zt(t, e) {
|
|
|
1053
1053
|
if (!t.equals(e)) {
|
|
1054
1054
|
var i = t.v;
|
|
1055
1055
|
Ce ? Ne.set(t, e) : Ne.set(t, i), t.v = e;
|
|
1056
|
-
var n =
|
|
1056
|
+
var n = Ee.ensure();
|
|
1057
1057
|
if (n.capture(t, i), (t.f & P) !== 0) {
|
|
1058
1058
|
const r = (
|
|
1059
1059
|
/** @type {Derived} */
|
|
@@ -1249,50 +1249,50 @@ function Re(t) {
|
|
|
1249
1249
|
);
|
|
1250
1250
|
}
|
|
1251
1251
|
function Ui(t, e) {
|
|
1252
|
-
if (!
|
|
1252
|
+
if (!E)
|
|
1253
1253
|
return /* @__PURE__ */ wt(t);
|
|
1254
|
-
var i = /* @__PURE__ */ wt(
|
|
1254
|
+
var i = /* @__PURE__ */ wt(S);
|
|
1255
1255
|
if (i === null)
|
|
1256
|
-
i =
|
|
1256
|
+
i = S.appendChild(ke());
|
|
1257
1257
|
else if (e && i.nodeType !== qt) {
|
|
1258
1258
|
var n = ke();
|
|
1259
1259
|
return i?.before(n), re(n), n;
|
|
1260
1260
|
}
|
|
1261
|
-
return e &&
|
|
1261
|
+
return e && Si(
|
|
1262
1262
|
/** @type {Text} */
|
|
1263
1263
|
i
|
|
1264
1264
|
), re(i), i;
|
|
1265
1265
|
}
|
|
1266
1266
|
function ti(t, e = !1) {
|
|
1267
|
-
if (!
|
|
1267
|
+
if (!E) {
|
|
1268
1268
|
var i = /* @__PURE__ */ wt(t);
|
|
1269
1269
|
return i instanceof Comment && i.data === "" ? /* @__PURE__ */ Re(i) : i;
|
|
1270
1270
|
}
|
|
1271
1271
|
if (e) {
|
|
1272
|
-
if (
|
|
1272
|
+
if (S?.nodeType !== qt) {
|
|
1273
1273
|
var n = ke();
|
|
1274
|
-
return
|
|
1274
|
+
return S?.before(n), re(n), n;
|
|
1275
1275
|
}
|
|
1276
|
-
|
|
1276
|
+
Si(
|
|
1277
1277
|
/** @type {Text} */
|
|
1278
|
-
|
|
1278
|
+
S
|
|
1279
1279
|
);
|
|
1280
1280
|
}
|
|
1281
|
-
return
|
|
1281
|
+
return S;
|
|
1282
1282
|
}
|
|
1283
1283
|
function vt(t, e = 1, i = !1) {
|
|
1284
|
-
let n =
|
|
1284
|
+
let n = E ? S : t;
|
|
1285
1285
|
for (var r; e--; )
|
|
1286
1286
|
r = n, n = /** @type {TemplateNode} */
|
|
1287
1287
|
/* @__PURE__ */ Re(n);
|
|
1288
|
-
if (!
|
|
1288
|
+
if (!E)
|
|
1289
1289
|
return n;
|
|
1290
1290
|
if (i) {
|
|
1291
1291
|
if (n?.nodeType !== qt) {
|
|
1292
1292
|
var s = ke();
|
|
1293
1293
|
return n === null ? r?.after(s) : n.before(s), re(s), s;
|
|
1294
1294
|
}
|
|
1295
|
-
|
|
1295
|
+
Si(
|
|
1296
1296
|
/** @type {Text} */
|
|
1297
1297
|
n
|
|
1298
1298
|
);
|
|
@@ -1311,7 +1311,7 @@ function $i(t, e, i) {
|
|
|
1311
1311
|
document.createElementNS(fn, t, void 0)
|
|
1312
1312
|
);
|
|
1313
1313
|
}
|
|
1314
|
-
function
|
|
1314
|
+
function Si(t) {
|
|
1315
1315
|
if (
|
|
1316
1316
|
/** @type {string} */
|
|
1317
1317
|
t.nodeValue.length < 65536
|
|
@@ -1375,7 +1375,7 @@ function pe(t, e, i) {
|
|
|
1375
1375
|
}
|
|
1376
1376
|
return r;
|
|
1377
1377
|
}
|
|
1378
|
-
function
|
|
1378
|
+
function Ei() {
|
|
1379
1379
|
return T !== null && !ie;
|
|
1380
1380
|
}
|
|
1381
1381
|
function ys(t) {
|
|
@@ -1401,14 +1401,14 @@ function Hn(t) {
|
|
|
1401
1401
|
return pe(yt | Dr, t, !1);
|
|
1402
1402
|
}
|
|
1403
1403
|
function ws(t) {
|
|
1404
|
-
|
|
1404
|
+
Ee.ensure();
|
|
1405
1405
|
const e = pe(Pe | We, t, !0);
|
|
1406
1406
|
return () => {
|
|
1407
1407
|
z(e);
|
|
1408
1408
|
};
|
|
1409
1409
|
}
|
|
1410
1410
|
function Ts(t) {
|
|
1411
|
-
|
|
1411
|
+
Ee.ensure();
|
|
1412
1412
|
const e = pe(Pe | We, t, !0);
|
|
1413
1413
|
return (i = {}) => new Promise((n) => {
|
|
1414
1414
|
i.outro ? bt(e, () => {
|
|
@@ -1468,11 +1468,11 @@ function $s(t) {
|
|
|
1468
1468
|
}
|
|
1469
1469
|
function z(t, e = !0) {
|
|
1470
1470
|
var i = !1;
|
|
1471
|
-
(e || (t.f & vn) !== 0) && t.nodes !== null && t.nodes.end !== null && (
|
|
1471
|
+
(e || (t.f & vn) !== 0) && t.nodes !== null && t.nodes.end !== null && (Ss(
|
|
1472
1472
|
t.nodes.start,
|
|
1473
1473
|
/** @type {TemplateNode} */
|
|
1474
1474
|
t.nodes.end
|
|
1475
|
-
), i = !0), Ai(t, e && !i), Tt(t, 0), L(t,
|
|
1475
|
+
), i = !0), Ai(t, e && !i), Tt(t, 0), L(t, Se);
|
|
1476
1476
|
var n = t.nodes && t.nodes.t;
|
|
1477
1477
|
if (n !== null)
|
|
1478
1478
|
for (const s of n)
|
|
@@ -1481,7 +1481,7 @@ function z(t, e = !0) {
|
|
|
1481
1481
|
var r = t.parent;
|
|
1482
1482
|
r !== null && r.first !== null && Yn(t), t.next = t.prev = t.teardown = t.ctx = t.deps = t.fn = t.nodes = t.ac = null;
|
|
1483
1483
|
}
|
|
1484
|
-
function
|
|
1484
|
+
function Ss(t, e) {
|
|
1485
1485
|
for (; t !== null; ) {
|
|
1486
1486
|
var i = t === e ? null : /* @__PURE__ */ Re(t);
|
|
1487
1487
|
t.remove(), t = i;
|
|
@@ -1520,7 +1520,7 @@ function qn(t, e, i) {
|
|
|
1520
1520
|
}
|
|
1521
1521
|
}
|
|
1522
1522
|
}
|
|
1523
|
-
function
|
|
1523
|
+
function Es(t) {
|
|
1524
1524
|
Un(t, !0);
|
|
1525
1525
|
}
|
|
1526
1526
|
function Un(t, e) {
|
|
@@ -1633,7 +1633,7 @@ function Zn(t) {
|
|
|
1633
1633
|
h[B + g] = H[g];
|
|
1634
1634
|
else
|
|
1635
1635
|
t.deps = h = H;
|
|
1636
|
-
if (
|
|
1636
|
+
if (Ei() && (t.f & X) !== 0)
|
|
1637
1637
|
for (g = B; g < h.length; g++)
|
|
1638
1638
|
((I = h[g]).reactions ?? (I.reactions = [])).push(t);
|
|
1639
1639
|
} else !v && h !== null && B < h.length && (Tt(t, B), h.length = B);
|
|
@@ -1690,7 +1690,7 @@ function Tt(t, e) {
|
|
|
1690
1690
|
}
|
|
1691
1691
|
function ft(t) {
|
|
1692
1692
|
var e = t.f;
|
|
1693
|
-
if ((e &
|
|
1693
|
+
if ((e & Se) === 0) {
|
|
1694
1694
|
L(t, N);
|
|
1695
1695
|
var i = $, n = Dt;
|
|
1696
1696
|
$ = t, Dt = !0;
|
|
@@ -1708,7 +1708,7 @@ function ft(t) {
|
|
|
1708
1708
|
function d(t) {
|
|
1709
1709
|
var e = t.f, i = (e & P) !== 0;
|
|
1710
1710
|
if (T !== null && !ie) {
|
|
1711
|
-
var n = $ !== null && ($.f &
|
|
1711
|
+
var n = $ !== null && ($.f & Se) !== 0;
|
|
1712
1712
|
if (!n && (J === null || !lt.call(J, t))) {
|
|
1713
1713
|
var r = T.deps;
|
|
1714
1714
|
if ((T.f & ri) !== 0)
|
|
@@ -1870,8 +1870,8 @@ function It(t, e) {
|
|
|
1870
1870
|
function nr(t, e) {
|
|
1871
1871
|
var i = (e & Ar) !== 0, n, r = !t.startsWith("<!>");
|
|
1872
1872
|
return () => {
|
|
1873
|
-
if (
|
|
1874
|
-
return It(
|
|
1873
|
+
if (E)
|
|
1874
|
+
return It(S, null), S;
|
|
1875
1875
|
n === void 0 && (n = Ms(r ? t : "<!>" + t, !0));
|
|
1876
1876
|
var s = (
|
|
1877
1877
|
/** @type {TemplateNode} */
|
|
@@ -1891,18 +1891,18 @@ function nr(t, e) {
|
|
|
1891
1891
|
};
|
|
1892
1892
|
}
|
|
1893
1893
|
function Vs() {
|
|
1894
|
-
if (
|
|
1895
|
-
return It(
|
|
1894
|
+
if (E)
|
|
1895
|
+
return It(S, null), S;
|
|
1896
1896
|
var t = document.createDocumentFragment(), e = document.createComment(""), i = ke();
|
|
1897
1897
|
return t.append(e, i), It(e, i), t;
|
|
1898
1898
|
}
|
|
1899
1899
|
function xt(t, e) {
|
|
1900
|
-
if (
|
|
1900
|
+
if (E) {
|
|
1901
1901
|
var i = (
|
|
1902
1902
|
/** @type {Effect & { nodes: EffectNodes }} */
|
|
1903
1903
|
$
|
|
1904
1904
|
);
|
|
1905
|
-
((i.f & dt) === 0 || i.nodes.end === null) && (i.nodes.end =
|
|
1905
|
+
((i.f & dt) === 0 || i.nodes.end === null) && (i.nodes.end = S), yi();
|
|
1906
1906
|
return;
|
|
1907
1907
|
}
|
|
1908
1908
|
t !== null && t.before(
|
|
@@ -1923,7 +1923,7 @@ function rr(t, e) {
|
|
|
1923
1923
|
}
|
|
1924
1924
|
function Ds(t, e) {
|
|
1925
1925
|
hi(), e.intro = e.intro ?? !1;
|
|
1926
|
-
const i = e.target, n =
|
|
1926
|
+
const i = e.target, n = E, r = S;
|
|
1927
1927
|
try {
|
|
1928
1928
|
for (var s = /* @__PURE__ */ wt(i); s && (s.nodeType !== Ut || /** @type {Comment} */
|
|
1929
1929
|
s.data !== mi); )
|
|
@@ -1964,12 +1964,12 @@ function sr(t, { target: e, anchor: i, props: n = {}, events: r, context: s, int
|
|
|
1964
1964
|
/** @type {ComponentContext} */
|
|
1965
1965
|
q
|
|
1966
1966
|
);
|
|
1967
|
-
if (s && (v.c = s), r && (n.$$events = r),
|
|
1967
|
+
if (s && (v.c = s), r && (n.$$events = r), E && It(
|
|
1968
1968
|
/** @type {TemplateNode} */
|
|
1969
1969
|
h,
|
|
1970
1970
|
null
|
|
1971
|
-
), l = t(h, n) || {},
|
|
1972
|
-
|
|
1971
|
+
), l = t(h, n) || {}, E && ($.nodes.end = S, S === null || S.nodeType !== Ut || /** @type {Comment} */
|
|
1972
|
+
S.data !== un))
|
|
1973
1973
|
throw Kt(), ot;
|
|
1974
1974
|
yn();
|
|
1975
1975
|
}
|
|
@@ -2064,7 +2064,7 @@ class js {
|
|
|
2064
2064
|
c(this, Z).get(e)
|
|
2065
2065
|
), n = c(this, ce).get(i);
|
|
2066
2066
|
if (n)
|
|
2067
|
-
|
|
2067
|
+
Es(n), c(this, Ye).delete(i);
|
|
2068
2068
|
else {
|
|
2069
2069
|
var r = c(this, Y).get(i);
|
|
2070
2070
|
r && (c(this, ce).set(i, r.effect), c(this, Y).delete(i), r.fragment.lastChild.remove(), this.anchor.before(r.fragment), n = r.effect);
|
|
@@ -2129,7 +2129,7 @@ class js {
|
|
|
2129
2129
|
l === e ? n.unskip_effect(a.effect) : n.skip_effect(a.effect);
|
|
2130
2130
|
n.oncommit(c(this, At)), n.ondiscard(c(this, Gt));
|
|
2131
2131
|
} else
|
|
2132
|
-
|
|
2132
|
+
E && (this.anchor = S), c(this, At).call(this);
|
|
2133
2133
|
}
|
|
2134
2134
|
}
|
|
2135
2135
|
Z = new WeakMap(), ce = new WeakMap(), Y = new WeakMap(), Ye = new WeakMap(), kt = new WeakMap(), At = new WeakMap(), Gt = new WeakMap();
|
|
@@ -2143,10 +2143,10 @@ function Fs(t) {
|
|
|
2143
2143
|
});
|
|
2144
2144
|
}
|
|
2145
2145
|
function en(t, e, i = !1) {
|
|
2146
|
-
|
|
2146
|
+
E && yi();
|
|
2147
2147
|
var n = new js(t), r = i ? at : 0;
|
|
2148
2148
|
function s(o, l) {
|
|
2149
|
-
if (
|
|
2149
|
+
if (E) {
|
|
2150
2150
|
const f = Jr(t);
|
|
2151
2151
|
var a;
|
|
2152
2152
|
if (f === mi ? a = 0 : f === _i ? a = !1 : a = parseInt(f.substring(1)), o !== a) {
|
|
@@ -2204,9 +2204,9 @@ function Bs(t, e) {
|
|
|
2204
2204
|
}
|
|
2205
2205
|
function Gs(t, e, i, n, r, s) {
|
|
2206
2206
|
var o = t.__className;
|
|
2207
|
-
if (
|
|
2207
|
+
if (E || o !== i || o === void 0) {
|
|
2208
2208
|
var l = zs(i, n, s);
|
|
2209
|
-
(!
|
|
2209
|
+
(!E || l !== t.getAttribute("class")) && (l == null ? t.removeAttribute("class") : t.className = l), t.__className = i;
|
|
2210
2210
|
} else if (s && r !== s)
|
|
2211
2211
|
for (var a in s) {
|
|
2212
2212
|
var u = !!s[a];
|
|
@@ -2216,16 +2216,16 @@ function Gs(t, e, i, n, r, s) {
|
|
|
2216
2216
|
}
|
|
2217
2217
|
function Xe(t, e, i, n) {
|
|
2218
2218
|
var r = t.__style;
|
|
2219
|
-
if (
|
|
2219
|
+
if (E || r !== e) {
|
|
2220
2220
|
var s = Bs(e);
|
|
2221
|
-
(!
|
|
2221
|
+
(!E || s !== t.getAttribute("style")) && (s == null ? t.removeAttribute("style") : t.style.cssText = s), t.__style = e;
|
|
2222
2222
|
}
|
|
2223
2223
|
return n;
|
|
2224
2224
|
}
|
|
2225
2225
|
const Ys = /* @__PURE__ */ Symbol("is custom element"), qs = /* @__PURE__ */ Symbol("is html");
|
|
2226
2226
|
function Us(t, e, i, n) {
|
|
2227
2227
|
var r = Ks(t);
|
|
2228
|
-
|
|
2228
|
+
E && (r[e] = t.getAttribute(e)), r[e] !== (r[e] = i) && (i == null ? t.removeAttribute(e) : typeof i != "string" && Ws(t).includes(e) ? t[e] = i : t.setAttribute(e, i));
|
|
2229
2229
|
}
|
|
2230
2230
|
function Ks(t) {
|
|
2231
2231
|
return (
|
|
@@ -2294,7 +2294,7 @@ function sn(t, e, i, n) {
|
|
|
2294
2294
|
const g = v ? d(f) : h;
|
|
2295
2295
|
return A(f, g), u = !0, r !== void 0 && (r = g), h;
|
|
2296
2296
|
}
|
|
2297
|
-
return Ce && u || (p.f &
|
|
2297
|
+
return Ce && u || (p.f & Se) !== 0 ? f.v : d(f);
|
|
2298
2298
|
})
|
|
2299
2299
|
);
|
|
2300
2300
|
}
|
|
@@ -2789,6 +2789,24 @@ class uo {
|
|
|
2789
2789
|
getToolsByLevel(e) {
|
|
2790
2790
|
return this.getAllTools().filter((i) => i.supportedLevels.includes(e));
|
|
2791
2791
|
}
|
|
2792
|
+
/**
|
|
2793
|
+
* Resolve tool activation with backward-compatible defaults.
|
|
2794
|
+
*/
|
|
2795
|
+
getToolActivation(e) {
|
|
2796
|
+
return this.get(e)?.activation || "toolbar-toggle";
|
|
2797
|
+
}
|
|
2798
|
+
/**
|
|
2799
|
+
* Resolve singleton scope for a tool when present.
|
|
2800
|
+
*/
|
|
2801
|
+
getToolSingletonScope(e) {
|
|
2802
|
+
return this.get(e)?.singletonScope || null;
|
|
2803
|
+
}
|
|
2804
|
+
/**
|
|
2805
|
+
* Filter tool IDs by activation type.
|
|
2806
|
+
*/
|
|
2807
|
+
filterToolIdsByActivation(e, i) {
|
|
2808
|
+
return e.filter((n) => this.getToolActivation(n) === i);
|
|
2809
|
+
}
|
|
2792
2810
|
/**
|
|
2793
2811
|
* Filter tools by visibility in a given context
|
|
2794
2812
|
*
|
|
@@ -2828,7 +2846,9 @@ class uo {
|
|
|
2828
2846
|
name: e.name,
|
|
2829
2847
|
description: e.description,
|
|
2830
2848
|
pnpSupportIds: e.pnpSupportIds || [],
|
|
2831
|
-
supportedLevels: e.supportedLevels
|
|
2849
|
+
supportedLevels: e.supportedLevels,
|
|
2850
|
+
activation: e.activation || "toolbar-toggle",
|
|
2851
|
+
singletonScope: e.singletonScope || null
|
|
2832
2852
|
}));
|
|
2833
2853
|
}
|
|
2834
2854
|
/**
|
|
@@ -3184,7 +3204,7 @@ const bo = /* @__PURE__ */ new Set([
|
|
|
3184
3204
|
}
|
|
3185
3205
|
};
|
|
3186
3206
|
}
|
|
3187
|
-
},
|
|
3207
|
+
}, So = {
|
|
3188
3208
|
toolId: "textToSpeech",
|
|
3189
3209
|
name: "Text to Speech",
|
|
3190
3210
|
description: "Read content aloud",
|
|
@@ -3318,7 +3338,7 @@ const bo = /* @__PURE__ */ new Set([
|
|
|
3318
3338
|
}
|
|
3319
3339
|
};
|
|
3320
3340
|
}
|
|
3321
|
-
},
|
|
3341
|
+
}, Eo = {
|
|
3322
3342
|
toolId: "ruler",
|
|
3323
3343
|
name: "Ruler",
|
|
3324
3344
|
description: "On-screen ruler for measurements",
|
|
@@ -3469,6 +3489,7 @@ const bo = /* @__PURE__ */ new Set([
|
|
|
3469
3489
|
name: "Highlighter",
|
|
3470
3490
|
description: "Highlight text",
|
|
3471
3491
|
icon: "highlighter",
|
|
3492
|
+
activation: "toolbar-toggle",
|
|
3472
3493
|
// Highlighter appears at passage, rubric, item, and element levels
|
|
3473
3494
|
supportedLevels: ["passage", "rubric", "item", "element"],
|
|
3474
3495
|
// PNP support IDs
|
|
@@ -3617,6 +3638,8 @@ const bo = /* @__PURE__ */ new Set([
|
|
|
3617
3638
|
name: "Highlighter",
|
|
3618
3639
|
description: "Highlight and annotate text",
|
|
3619
3640
|
icon: "highlighter",
|
|
3641
|
+
activation: "selection-gateway",
|
|
3642
|
+
singletonScope: "section",
|
|
3620
3643
|
// Annotation appears where there's text content
|
|
3621
3644
|
supportedLevels: ["passage", "rubric", "item", "element"],
|
|
3622
3645
|
// PNP support IDs
|
|
@@ -3772,7 +3795,7 @@ function Po(t = {}) {
|
|
|
3772
3795
|
toolComponentFactory: t.toolComponentFactory,
|
|
3773
3796
|
toolComponentFactories: t.toolComponentFactories
|
|
3774
3797
|
}, n = (r) => t.overrides?.[r.toolId] || r;
|
|
3775
|
-
return e.register(n($o)), e.register(n(
|
|
3798
|
+
return e.register(n($o)), e.register(n(So)), e.register(n(Eo)), e.register(n(ko)), e.register(n(Ao)), e.register(n(Ro)), e.register(n(Oo)), e.register(n(Mo)), e.register(n(Vo)), e.register(n(No)), e.register(n(Co)), t.toolModuleLoaders && Object.keys(t.toolModuleLoaders).length > 0 && e.setToolModuleLoaders(t.toolModuleLoaders), e.setComponentOverrides(i), e;
|
|
3776
3799
|
}
|
|
3777
3800
|
function Do() {
|
|
3778
3801
|
const t = Po(), e = /* @__PURE__ */ new Set();
|
|
@@ -4132,8 +4155,8 @@ function zo(t, e) {
|
|
|
4132
4155
|
var wr = (me) => {
|
|
4133
4156
|
var Mt = jo(), Di = ti(Mt), xi = vt(Di, 2), ji = vt(xi, 2), Ir = vt(ji, 2);
|
|
4134
4157
|
Ki(
|
|
4135
|
-
($r,
|
|
4136
|
-
Xe(Di, `height: ${$r ?? ""}px;`), Xe(xi, `top: ${d(f).y + d(p).height / 2}px;`), Xe(ji, `top: ${d(f).y - d(p).height / 2}px; height: ${d(p).height ?? ""}px; width: ${
|
|
4158
|
+
($r, Sr) => {
|
|
4159
|
+
Xe(Di, `height: ${$r ?? ""}px;`), Xe(xi, `top: ${d(f).y + d(p).height / 2}px;`), Xe(ji, `top: ${d(f).y - d(p).height / 2}px; height: ${d(p).height ?? ""}px; width: ${Sr ?? ""}px;`), Xe(Ir, `top: ${d(f).y - d(p).height / 2}px; height: ${d(p).height ?? ""}px; left: ${d(f).x + d(p).width / 2}px;`);
|
|
4137
4160
|
},
|
|
4138
4161
|
[
|
|
4139
4162
|
() => Math.max(0, d(f).y - d(p).height / 2),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-players/pie-tool-line-reader",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Reading guide overlay tool for PIE assessment player",
|
|
6
6
|
"repository": {
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
"unpkg": "./dist/tool-line-reader.js",
|
|
42
42
|
"jsdelivr": "./dist/tool-line-reader.js",
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@pie-players/pie-assessment-toolkit": "0.
|
|
45
|
-
"@pie-players/pie-context": "0.
|
|
46
|
-
"@pie-players/pie-players-shared": "0.
|
|
44
|
+
"@pie-players/pie-assessment-toolkit": "0.3.0",
|
|
45
|
+
"@pie-players/pie-context": "0.3.0",
|
|
46
|
+
"@pie-players/pie-players-shared": "0.3.0",
|
|
47
47
|
"daisyui": "^5.5.18"
|
|
48
48
|
},
|
|
49
49
|
"types": "./dist/index.d.ts",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"url": "https://github.com/pie-framework/pie-players/issues"
|
|
67
67
|
},
|
|
68
68
|
"engines": {
|
|
69
|
-
"node": ">=
|
|
69
|
+
"node": ">=20.0.0"
|
|
70
70
|
},
|
|
71
71
|
"sideEffects": true
|
|
72
72
|
}
|