@thyn/core 0.0.274 → 0.0.281
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/element.js +74 -79
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/router.d.ts +1 -2
- package/dist/signals.d.ts +1 -11
- package/dist/signals.js +15 -72
- package/package.json +1 -1
- package/src/element.ts +80 -81
- package/src/index.ts +2 -6
- package/src/signals.ts +17 -68
- package/tsconfig.tsbuildinfo +1 -1
package/dist/element.js
CHANGED
|
@@ -4,16 +4,20 @@ export function mount(app, parent) {
|
|
|
4
4
|
}
|
|
5
5
|
let collectingHead;
|
|
6
6
|
export function collectEffect(effectFn) {
|
|
7
|
-
|
|
7
|
+
if (collectingHead) {
|
|
8
|
+
effectFn.next = collectingHead;
|
|
9
|
+
}
|
|
8
10
|
collectingHead = effectFn;
|
|
9
11
|
}
|
|
10
12
|
export function createReactiveTextNode(v) {
|
|
11
13
|
let n;
|
|
12
14
|
staticEffect(() => {
|
|
13
|
-
if (n)
|
|
14
|
-
n.
|
|
15
|
-
|
|
15
|
+
if (n) {
|
|
16
|
+
n.nodeValue = v();
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
16
19
|
n = document.createTextNode(v());
|
|
20
|
+
}
|
|
17
21
|
});
|
|
18
22
|
return n;
|
|
19
23
|
}
|
|
@@ -21,7 +25,7 @@ export function component(name, props) {
|
|
|
21
25
|
const prevHead = collectingHead;
|
|
22
26
|
collectingHead = null;
|
|
23
27
|
const e = name(props);
|
|
24
|
-
|
|
28
|
+
const existing = e.$fx;
|
|
25
29
|
if (existing) {
|
|
26
30
|
let current = existing;
|
|
27
31
|
while (current) {
|
|
@@ -36,11 +40,11 @@ export function component(name, props) {
|
|
|
36
40
|
current = current.next;
|
|
37
41
|
}
|
|
38
42
|
if (collectingHead) {
|
|
39
|
-
let
|
|
40
|
-
while (
|
|
41
|
-
|
|
43
|
+
let tail = existing;
|
|
44
|
+
while (tail.next) {
|
|
45
|
+
tail = tail.next;
|
|
42
46
|
}
|
|
43
|
-
|
|
47
|
+
tail.next = collectingHead;
|
|
44
48
|
}
|
|
45
49
|
}
|
|
46
50
|
else {
|
|
@@ -68,7 +72,7 @@ export function setProperty(el, key, val) {
|
|
|
68
72
|
return el;
|
|
69
73
|
}
|
|
70
74
|
export function setReactiveAttribute(el, key, val) {
|
|
71
|
-
let ran
|
|
75
|
+
let ran;
|
|
72
76
|
return addEffect(el, staticEffect(() => {
|
|
73
77
|
const v = val();
|
|
74
78
|
if (ran) {
|
|
@@ -84,7 +88,7 @@ export function setReactiveAttribute(el, key, val) {
|
|
|
84
88
|
}));
|
|
85
89
|
}
|
|
86
90
|
export function setReactiveProperty(el, key, val) {
|
|
87
|
-
let ran =
|
|
91
|
+
let ran = true;
|
|
88
92
|
return addEffect(el, staticEffect(() => {
|
|
89
93
|
const v = val();
|
|
90
94
|
if (ran) {
|
|
@@ -260,20 +264,14 @@ export function list(props, terminal = false) {
|
|
|
260
264
|
parent = startBookend.parentNode;
|
|
261
265
|
if (!parent) {
|
|
262
266
|
prevItems = props.items();
|
|
263
|
-
outlet.
|
|
264
|
-
for (let i = 0, len = prevItems.length; i < len; i++) {
|
|
265
|
-
outlet.appendChild(render(prevItems[i]));
|
|
266
|
-
}
|
|
267
|
-
outlet.appendChild(endBookend);
|
|
267
|
+
outlet.append(startBookend, ...prevItems.map(render), endBookend);
|
|
268
268
|
return;
|
|
269
269
|
}
|
|
270
270
|
let nextItems = props.items();
|
|
271
271
|
let newLength = nextItems.length;
|
|
272
272
|
let oldLength = prevItems.length;
|
|
273
273
|
if (!oldLength && newLength) {
|
|
274
|
-
|
|
275
|
-
parent.insertBefore(render(nextItems[i]), endBookend);
|
|
276
|
-
}
|
|
274
|
+
endBookend.before(...nextItems.map(render));
|
|
277
275
|
prevItems = nextItems;
|
|
278
276
|
nextItems = null;
|
|
279
277
|
return;
|
|
@@ -298,9 +296,7 @@ export function list(props, terminal = false) {
|
|
|
298
296
|
}
|
|
299
297
|
let start = nextItems.findIndex((item, index) => prevItems[index] !== item);
|
|
300
298
|
if (start === oldLength) {
|
|
301
|
-
|
|
302
|
-
parent.insertBefore(render(nextItems[i]), endBookend);
|
|
303
|
-
}
|
|
299
|
+
endBookend.before(...nextItems.slice(start).map(render));
|
|
304
300
|
prevItems = nextItems;
|
|
305
301
|
nextItems = null;
|
|
306
302
|
return;
|
|
@@ -414,7 +410,8 @@ export function isolatedTerminalList(props) {
|
|
|
414
410
|
if (!parent) {
|
|
415
411
|
prevItems = props.items();
|
|
416
412
|
outlet.appendChild(startBookend);
|
|
417
|
-
|
|
413
|
+
const len = prevItems.length;
|
|
414
|
+
for (let i = 0; i < len; i++) {
|
|
418
415
|
outlet.appendChild(render(prevItems[i]));
|
|
419
416
|
}
|
|
420
417
|
outlet.appendChild(endBookend);
|
|
@@ -424,8 +421,9 @@ export function isolatedTerminalList(props) {
|
|
|
424
421
|
let newLength = nextItems.length;
|
|
425
422
|
let oldLength = prevItems.length;
|
|
426
423
|
if (!oldLength && newLength) {
|
|
427
|
-
|
|
428
|
-
|
|
424
|
+
const len = nextItems.length;
|
|
425
|
+
for (let i = 0; i < len; i++) {
|
|
426
|
+
outlet.appendChild(render(nextItems[i]));
|
|
429
427
|
}
|
|
430
428
|
prevItems = nextItems;
|
|
431
429
|
nextItems = null;
|
|
@@ -433,9 +431,9 @@ export function isolatedTerminalList(props) {
|
|
|
433
431
|
}
|
|
434
432
|
const childNodeList = parent.childNodes;
|
|
435
433
|
if (!newLength) {
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
shallowTeardown(
|
|
434
|
+
const end = childNodeList.length - 1;
|
|
435
|
+
for (let i = 1; i < end; i++) {
|
|
436
|
+
shallowTeardown(childNodeList[i]);
|
|
439
437
|
}
|
|
440
438
|
parent.textContent = "";
|
|
441
439
|
parent.appendChild(startBookend);
|
|
@@ -446,37 +444,35 @@ export function isolatedTerminalList(props) {
|
|
|
446
444
|
}
|
|
447
445
|
let start = nextItems.findIndex((item, index) => prevItems[index] !== item);
|
|
448
446
|
if (start === oldLength) {
|
|
449
|
-
|
|
450
|
-
|
|
447
|
+
const len = nextItems.length;
|
|
448
|
+
for (let i = start; i < len; i++) {
|
|
449
|
+
outlet.appendChild(render(nextItems[i]));
|
|
451
450
|
}
|
|
452
451
|
prevItems = nextItems;
|
|
453
452
|
nextItems = null;
|
|
454
453
|
return;
|
|
455
454
|
}
|
|
455
|
+
let childNodes = Array.from(childNodeList);
|
|
456
456
|
if (start < 0) {
|
|
457
|
-
let
|
|
458
|
-
|
|
459
|
-
const e = endBookend.previousSibling;
|
|
457
|
+
for (let i = nextItems.length; i < oldLength; i++) {
|
|
458
|
+
const e = childNodes[1 + --oldLength];
|
|
460
459
|
shallowTeardown(e);
|
|
461
460
|
e.remove();
|
|
462
|
-
removeCount--;
|
|
463
461
|
}
|
|
464
462
|
prevItems = nextItems;
|
|
465
463
|
nextItems = null;
|
|
464
|
+
childNodes = null;
|
|
466
465
|
return;
|
|
467
466
|
}
|
|
468
467
|
if (start >= newLength) {
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
shallowTeardown(node);
|
|
474
|
-
node.remove();
|
|
475
|
-
node = next;
|
|
476
|
-
removeCount--;
|
|
468
|
+
while (start < oldLength) {
|
|
469
|
+
const e = childNodes[1 + --oldLength];
|
|
470
|
+
shallowTeardown(e);
|
|
471
|
+
e.remove();
|
|
477
472
|
}
|
|
478
473
|
prevItems = nextItems;
|
|
479
474
|
nextItems = null;
|
|
475
|
+
childNodes = null;
|
|
480
476
|
return;
|
|
481
477
|
}
|
|
482
478
|
// suffix
|
|
@@ -485,48 +481,46 @@ export function isolatedTerminalList(props) {
|
|
|
485
481
|
nextItems[newLength] === prevItems[oldLength]; oldLength--, newLength--)
|
|
486
482
|
;
|
|
487
483
|
const nextKeys = new Set(nextItems);
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
484
|
+
const removalQueue = [];
|
|
485
|
+
for (let i = start; i <= oldLength; i++) {
|
|
486
|
+
if (!nextKeys.has(prevItems[i])) {
|
|
487
|
+
const ch = childNodes[i + 1];
|
|
488
|
+
shallowTeardown(ch);
|
|
489
|
+
removalQueue.push(ch);
|
|
490
|
+
childNodes[i + 1] = null;
|
|
495
491
|
}
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
for (let i = 0; i < nextItems.length; i++) {
|
|
504
|
-
parent.appendChild(render(nextItems[i]));
|
|
505
|
-
}
|
|
506
|
-
parent.appendChild(endBookend);
|
|
507
|
-
prevItems = nextItems;
|
|
508
|
-
nextItems = null;
|
|
509
|
-
return;
|
|
492
|
+
}
|
|
493
|
+
if (removalQueue.length === prevItems.length) {
|
|
494
|
+
parent.textContent = "";
|
|
495
|
+
outlet.appendChild(startBookend);
|
|
496
|
+
const len = nextItems.length;
|
|
497
|
+
for (let i = 0; i < len; i++) {
|
|
498
|
+
outlet.appendChild(render(nextItems[i]));
|
|
510
499
|
}
|
|
500
|
+
outlet.appendChild(endBookend);
|
|
501
|
+
prevItems = nextItems;
|
|
502
|
+
nextItems = null;
|
|
503
|
+
childNodes = null;
|
|
504
|
+
return;
|
|
505
|
+
}
|
|
506
|
+
for (const e of removalQueue) {
|
|
507
|
+
e.remove();
|
|
508
|
+
}
|
|
509
|
+
if (oldLength - start === removalQueue.length) {
|
|
510
|
+
prevItems = nextItems;
|
|
511
|
+
nextItems = null;
|
|
512
|
+
childNodes = null;
|
|
513
|
+
return;
|
|
511
514
|
}
|
|
512
515
|
let keyMap = new Map();
|
|
513
|
-
let currentNode = childNodeList[start + 1];
|
|
514
516
|
for (let i = start; i <= oldLength; i++) {
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
else {
|
|
523
|
-
if (currentNode && (!nextItems[i] || item !== nextItems[i])) {
|
|
524
|
-
keyMap.set(item, {
|
|
525
|
-
el: currentNode,
|
|
526
|
-
item: item,
|
|
527
|
-
});
|
|
528
|
-
}
|
|
529
|
-
currentNode = currentNode.nextSibling;
|
|
517
|
+
if (childNodes[i + 1] &&
|
|
518
|
+
(!nextItems[i] ||
|
|
519
|
+
prevItems[i] !== nextItems[i])) {
|
|
520
|
+
keyMap.set(prevItems[i], {
|
|
521
|
+
el: childNodes[i + 1],
|
|
522
|
+
item: prevItems[i],
|
|
523
|
+
});
|
|
530
524
|
}
|
|
531
525
|
}
|
|
532
526
|
while (start <= newLength) {
|
|
@@ -567,6 +561,7 @@ export function isolatedTerminalList(props) {
|
|
|
567
561
|
keyMap = null;
|
|
568
562
|
prevItems = nextItems;
|
|
569
563
|
nextItems = null;
|
|
564
|
+
childNodes = null;
|
|
570
565
|
});
|
|
571
566
|
return outlet;
|
|
572
567
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { addChildren, addEffect, component, createReactiveTextNode, fixedComponent, isolatedTerminalList, list, markAsReactive, mount, setAttribute, setProperty, setReactiveAttribute, setReactiveProperty, show, terminalList } from "./element.js";
|
|
2
|
-
export { $effect, $signal, staticEffect,
|
|
2
|
+
export { $effect, $signal, staticEffect, type Signal } from "./signals.js";
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { addChildren, addEffect, component, createReactiveTextNode, fixedComponent, isolatedTerminalList, list, markAsReactive, mount, setAttribute, setProperty, setReactiveAttribute, setReactiveProperty, show, terminalList } from "./element.js";
|
|
2
|
-
export { $effect, $signal, staticEffect
|
|
2
|
+
export { $effect, $signal, staticEffect } from "./signals.js";
|
package/dist/router.d.ts
CHANGED
package/dist/signals.d.ts
CHANGED
|
@@ -5,10 +5,9 @@ export type Signal<T> = {
|
|
|
5
5
|
};
|
|
6
6
|
declare class SignalImpl<T> {
|
|
7
7
|
value: T;
|
|
8
|
-
subs: any
|
|
8
|
+
subs: Set<any>;
|
|
9
9
|
constructor(value: T);
|
|
10
10
|
get(): T;
|
|
11
|
-
delete(ef: any): void;
|
|
12
11
|
set(value: T): void;
|
|
13
12
|
update(action: (prev: T) => T): void;
|
|
14
13
|
}
|
|
@@ -16,13 +15,4 @@ export declare function $signal<T>(value: T): SignalImpl<T>;
|
|
|
16
15
|
export declare function $effect(fn: (() => (() => void) | void) & any): any;
|
|
17
16
|
export declare function staticEffect(fn: (() => (() => void) | void) & any): any;
|
|
18
17
|
export declare function cleanup(ef: any): void;
|
|
19
|
-
declare class TextNodeEffect {
|
|
20
|
-
node: Text;
|
|
21
|
-
signal: Signal<any>;
|
|
22
|
-
next: any;
|
|
23
|
-
td: any;
|
|
24
|
-
constructor(node: Text, signal: Signal<any>);
|
|
25
|
-
run(): void;
|
|
26
|
-
}
|
|
27
|
-
export declare function staticTextNodeEffect(node: Text, signal: Signal<any>): TextNodeEffect;
|
|
28
18
|
export {};
|
package/dist/signals.js
CHANGED
|
@@ -16,7 +16,7 @@ function scheduleEffect(effectFn) {
|
|
|
16
16
|
currentEffect = prev;
|
|
17
17
|
}
|
|
18
18
|
else {
|
|
19
|
-
|
|
19
|
+
ef();
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
pendingEffects.length = 0;
|
|
@@ -27,63 +27,28 @@ function scheduleEffect(effectFn) {
|
|
|
27
27
|
class SignalImpl {
|
|
28
28
|
constructor(value) {
|
|
29
29
|
this.value = value;
|
|
30
|
-
this.subs =
|
|
30
|
+
this.subs = new Set();
|
|
31
31
|
}
|
|
32
32
|
get() {
|
|
33
33
|
if (currentEffect) {
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
this.subs.add(currentEffect);
|
|
35
|
+
const td = currentEffect.td;
|
|
36
|
+
if (!td) {
|
|
37
|
+
currentEffect.td = this.subs;
|
|
36
38
|
}
|
|
37
|
-
else if (
|
|
38
|
-
|
|
39
|
-
const oldEffect = this.subs;
|
|
40
|
-
this.subs = new Set();
|
|
41
|
-
this.subs.add(oldEffect);
|
|
42
|
-
this.subs.add(currentEffect);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
else {
|
|
46
|
-
this.subs.add(currentEffect);
|
|
47
|
-
}
|
|
48
|
-
if (!currentEffect.td) {
|
|
49
|
-
currentEffect.td = this;
|
|
50
|
-
}
|
|
51
|
-
else if (Array.isArray(currentEffect.td)) {
|
|
52
|
-
currentEffect.td.push(this);
|
|
39
|
+
else if (Array.isArray(td)) {
|
|
40
|
+
td.push(this.subs);
|
|
53
41
|
}
|
|
54
42
|
else {
|
|
55
|
-
currentEffect.td = [
|
|
43
|
+
currentEffect.td = [td, this.subs];
|
|
56
44
|
}
|
|
57
45
|
}
|
|
58
46
|
return this.value;
|
|
59
47
|
}
|
|
60
|
-
delete(ef) {
|
|
61
|
-
if (this.subs === ef) {
|
|
62
|
-
this.subs = undefined;
|
|
63
|
-
}
|
|
64
|
-
else if (typeof this.subs === "object" && this.subs.delete) {
|
|
65
|
-
this.subs.delete(ef);
|
|
66
|
-
if (this.subs.size === 0) {
|
|
67
|
-
this.subs = undefined;
|
|
68
|
-
}
|
|
69
|
-
else if (this.subs.size === 1) {
|
|
70
|
-
this.subs = this.subs.values().next().value;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
48
|
set(value) {
|
|
75
49
|
if (value !== this.value) {
|
|
76
50
|
this.value = value;
|
|
77
|
-
|
|
78
|
-
if (typeof this.subs === "function" || !this.subs.add) {
|
|
79
|
-
scheduleEffect(this.subs);
|
|
80
|
-
}
|
|
81
|
-
else {
|
|
82
|
-
for (const ef of this.subs) {
|
|
83
|
-
scheduleEffect(ef);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
}
|
|
51
|
+
this.subs.forEach(scheduleEffect);
|
|
87
52
|
}
|
|
88
53
|
}
|
|
89
54
|
update(action) {
|
|
@@ -94,7 +59,7 @@ export function $signal(value) {
|
|
|
94
59
|
return new SignalImpl(value);
|
|
95
60
|
}
|
|
96
61
|
function runEffectFn(ef) {
|
|
97
|
-
const td =
|
|
62
|
+
const td = ef();
|
|
98
63
|
if (td) {
|
|
99
64
|
if (ef.td) {
|
|
100
65
|
if (Array.isArray(ef.td)) {
|
|
@@ -119,6 +84,7 @@ export function $effect(fn) {
|
|
|
119
84
|
return fn;
|
|
120
85
|
}
|
|
121
86
|
export function staticEffect(fn) {
|
|
87
|
+
fn.td = null;
|
|
122
88
|
const prev = currentEffect;
|
|
123
89
|
currentEffect = fn;
|
|
124
90
|
fn();
|
|
@@ -127,34 +93,11 @@ export function staticEffect(fn) {
|
|
|
127
93
|
return fn;
|
|
128
94
|
}
|
|
129
95
|
export function cleanup(ef) {
|
|
130
|
-
if (
|
|
131
|
-
ef.td();
|
|
132
|
-
}
|
|
133
|
-
else if (ef.td.delete) {
|
|
134
|
-
ef.td.delete(ef);
|
|
135
|
-
}
|
|
136
|
-
else {
|
|
96
|
+
if (Array.isArray(ef.td)) {
|
|
137
97
|
for (const f of ef.td)
|
|
138
98
|
typeof f === "function" ? f() : f.delete(ef);
|
|
139
99
|
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
constructor(node, signal) {
|
|
143
|
-
this.node = node;
|
|
144
|
-
this.signal = signal;
|
|
145
|
-
this.next = undefined;
|
|
146
|
-
this.td = undefined;
|
|
147
|
-
}
|
|
148
|
-
run() {
|
|
149
|
-
this.node.data = this.signal.get();
|
|
100
|
+
else {
|
|
101
|
+
typeof ef.td === "function" ? ef.td() : ef.td.delete(ef);
|
|
150
102
|
}
|
|
151
103
|
}
|
|
152
|
-
export function staticTextNodeEffect(node, signal) {
|
|
153
|
-
const ef = new TextNodeEffect(node, signal);
|
|
154
|
-
const prev = currentEffect;
|
|
155
|
-
currentEffect = ef;
|
|
156
|
-
ef.run();
|
|
157
|
-
currentEffect = prev;
|
|
158
|
-
collectEffect(ef);
|
|
159
|
-
return ef;
|
|
160
|
-
}
|
package/package.json
CHANGED
package/src/element.ts
CHANGED
|
@@ -5,16 +5,22 @@ export function mount(app, parent) {
|
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
let collectingHead;
|
|
8
|
+
|
|
8
9
|
export function collectEffect(effectFn) {
|
|
9
|
-
|
|
10
|
+
if (collectingHead) {
|
|
11
|
+
effectFn.next = collectingHead;
|
|
12
|
+
}
|
|
10
13
|
collectingHead = effectFn;
|
|
11
14
|
}
|
|
12
15
|
|
|
13
16
|
export function createReactiveTextNode(v) {
|
|
14
17
|
let n;
|
|
15
18
|
staticEffect(() => {
|
|
16
|
-
if (n)
|
|
17
|
-
|
|
19
|
+
if (n) {
|
|
20
|
+
n.nodeValue = v();
|
|
21
|
+
} else {
|
|
22
|
+
n = document.createTextNode(v());
|
|
23
|
+
}
|
|
18
24
|
});
|
|
19
25
|
return n;
|
|
20
26
|
}
|
|
@@ -23,7 +29,7 @@ export function component(name, props?: any) {
|
|
|
23
29
|
const prevHead = collectingHead;
|
|
24
30
|
collectingHead = null;
|
|
25
31
|
const e = name(props);
|
|
26
|
-
|
|
32
|
+
const existing = e.$fx;
|
|
27
33
|
|
|
28
34
|
if (existing) {
|
|
29
35
|
let current = existing;
|
|
@@ -39,11 +45,11 @@ export function component(name, props?: any) {
|
|
|
39
45
|
current = current.next;
|
|
40
46
|
}
|
|
41
47
|
if (collectingHead) {
|
|
42
|
-
let
|
|
43
|
-
while (
|
|
44
|
-
|
|
48
|
+
let tail = existing;
|
|
49
|
+
while (tail.next) {
|
|
50
|
+
tail = tail.next;
|
|
45
51
|
}
|
|
46
|
-
|
|
52
|
+
tail.next = collectingHead;
|
|
47
53
|
}
|
|
48
54
|
} else {
|
|
49
55
|
e.$fx = collectingHead;
|
|
@@ -66,12 +72,14 @@ export function setAttribute(el, key, val) {
|
|
|
66
72
|
if (val) el.setAttribute(key, val);
|
|
67
73
|
return el;
|
|
68
74
|
}
|
|
75
|
+
|
|
69
76
|
export function setProperty(el, key, val) {
|
|
70
77
|
if (val) el[key] = val;
|
|
71
78
|
return el;
|
|
72
79
|
}
|
|
80
|
+
|
|
73
81
|
export function setReactiveAttribute(el, key, val) {
|
|
74
|
-
let ran
|
|
82
|
+
let ran;
|
|
75
83
|
return addEffect(
|
|
76
84
|
el,
|
|
77
85
|
staticEffect(() => {
|
|
@@ -87,7 +95,7 @@ export function setReactiveAttribute(el, key, val) {
|
|
|
87
95
|
);
|
|
88
96
|
}
|
|
89
97
|
export function setReactiveProperty(el, key, val) {
|
|
90
|
-
let ran =
|
|
98
|
+
let ran = true;
|
|
91
99
|
return addEffect(
|
|
92
100
|
el,
|
|
93
101
|
staticEffect(() => {
|
|
@@ -276,20 +284,14 @@ export function list(props, terminal = false) {
|
|
|
276
284
|
parent = startBookend.parentNode;
|
|
277
285
|
if (!parent) {
|
|
278
286
|
prevItems = props.items();
|
|
279
|
-
outlet.
|
|
280
|
-
for (let i = 0, len = prevItems.length; i < len; i++) {
|
|
281
|
-
outlet.appendChild(render(prevItems[i]));
|
|
282
|
-
}
|
|
283
|
-
outlet.appendChild(endBookend);
|
|
287
|
+
outlet.append(startBookend, ...prevItems.map(render), endBookend);
|
|
284
288
|
return;
|
|
285
289
|
}
|
|
286
290
|
let nextItems = props.items();
|
|
287
291
|
let newLength = nextItems.length;
|
|
288
292
|
let oldLength = prevItems.length;
|
|
289
293
|
if (!oldLength && newLength) {
|
|
290
|
-
|
|
291
|
-
parent.insertBefore(render(nextItems[i]), endBookend);
|
|
292
|
-
}
|
|
294
|
+
endBookend.before(...nextItems.map(render))
|
|
293
295
|
prevItems = nextItems;
|
|
294
296
|
nextItems = null;
|
|
295
297
|
return;
|
|
@@ -315,9 +317,7 @@ export function list(props, terminal = false) {
|
|
|
315
317
|
|
|
316
318
|
let start = nextItems.findIndex((item, index) => prevItems[index] !== item);
|
|
317
319
|
if (start === oldLength) {
|
|
318
|
-
|
|
319
|
-
parent.insertBefore(render(nextItems[i]), endBookend);
|
|
320
|
-
}
|
|
320
|
+
endBookend.before(...nextItems.slice(start).map(render));
|
|
321
321
|
prevItems = nextItems;
|
|
322
322
|
nextItems = null;
|
|
323
323
|
return;
|
|
@@ -385,7 +385,6 @@ export function list(props, terminal = false) {
|
|
|
385
385
|
});
|
|
386
386
|
}
|
|
387
387
|
}
|
|
388
|
-
|
|
389
388
|
while (start <= newLength) {
|
|
390
389
|
const newChd = nextItems[start];
|
|
391
390
|
const oldChd = prevItems[start];
|
|
@@ -441,7 +440,8 @@ export function isolatedTerminalList(props) {
|
|
|
441
440
|
if (!parent) {
|
|
442
441
|
prevItems = props.items();
|
|
443
442
|
outlet.appendChild(startBookend);
|
|
444
|
-
|
|
443
|
+
const len = prevItems.length;
|
|
444
|
+
for (let i = 0; i < len; i++) {
|
|
445
445
|
outlet.appendChild(render(prevItems[i]));
|
|
446
446
|
}
|
|
447
447
|
outlet.appendChild(endBookend);
|
|
@@ -451,8 +451,9 @@ export function isolatedTerminalList(props) {
|
|
|
451
451
|
let newLength = nextItems.length;
|
|
452
452
|
let oldLength = prevItems.length;
|
|
453
453
|
if (!oldLength && newLength) {
|
|
454
|
-
|
|
455
|
-
|
|
454
|
+
const len = nextItems.length;
|
|
455
|
+
for (let i = 0; i < len; i++) {
|
|
456
|
+
outlet.appendChild(render(nextItems[i]));
|
|
456
457
|
}
|
|
457
458
|
prevItems = nextItems;
|
|
458
459
|
nextItems = null;
|
|
@@ -460,12 +461,12 @@ export function isolatedTerminalList(props) {
|
|
|
460
461
|
}
|
|
461
462
|
const childNodeList = parent.childNodes as NodeListOf<ChildNode>;
|
|
462
463
|
if (!newLength) {
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
shallowTeardown(
|
|
464
|
+
const end = childNodeList.length - 1;
|
|
465
|
+
for (let i = 1; i < end; i++) {
|
|
466
|
+
shallowTeardown(childNodeList[i]);
|
|
466
467
|
}
|
|
467
468
|
parent.textContent = "";
|
|
468
|
-
parent.appendChild(startBookend)
|
|
469
|
+
parent.appendChild(startBookend)
|
|
469
470
|
parent.appendChild(endBookend);
|
|
470
471
|
prevItems = nextItems;
|
|
471
472
|
nextItems = null;
|
|
@@ -474,39 +475,37 @@ export function isolatedTerminalList(props) {
|
|
|
474
475
|
|
|
475
476
|
let start = nextItems.findIndex((item, index) => prevItems[index] !== item);
|
|
476
477
|
if (start === oldLength) {
|
|
477
|
-
|
|
478
|
-
|
|
478
|
+
const len = nextItems.length;
|
|
479
|
+
for (let i = start; i < len; i++) {
|
|
480
|
+
outlet.appendChild(render(nextItems[i]));
|
|
479
481
|
}
|
|
480
482
|
prevItems = nextItems;
|
|
481
483
|
nextItems = null;
|
|
482
484
|
return;
|
|
483
485
|
}
|
|
484
486
|
|
|
487
|
+
let childNodes = Array.from(childNodeList);
|
|
485
488
|
if (start < 0) {
|
|
486
|
-
let
|
|
487
|
-
|
|
488
|
-
const e = endBookend.previousSibling;
|
|
489
|
+
for (let i = nextItems.length; i < oldLength; i++) {
|
|
490
|
+
const e = childNodes[1 + --oldLength];
|
|
489
491
|
shallowTeardown(e);
|
|
490
492
|
e.remove();
|
|
491
|
-
removeCount--;
|
|
492
493
|
}
|
|
493
494
|
prevItems = nextItems;
|
|
494
495
|
nextItems = null;
|
|
496
|
+
childNodes = null;
|
|
495
497
|
return;
|
|
496
498
|
}
|
|
497
499
|
|
|
498
500
|
if (start >= newLength) {
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
shallowTeardown(node);
|
|
504
|
-
node.remove();
|
|
505
|
-
node = next;
|
|
506
|
-
removeCount--;
|
|
501
|
+
while (start < oldLength) {
|
|
502
|
+
const e = childNodes[1 + --oldLength];
|
|
503
|
+
shallowTeardown(e);
|
|
504
|
+
e.remove();
|
|
507
505
|
}
|
|
508
506
|
prevItems = nextItems;
|
|
509
507
|
nextItems = null;
|
|
508
|
+
childNodes = null;
|
|
510
509
|
return;
|
|
511
510
|
}
|
|
512
511
|
|
|
@@ -520,49 +519,48 @@ export function isolatedTerminalList(props) {
|
|
|
520
519
|
);
|
|
521
520
|
|
|
522
521
|
const nextKeys = new Set(nextItems);
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
}
|
|
522
|
+
const removalQueue = [];
|
|
523
|
+
for (let i = start; i <= oldLength; i++) {
|
|
524
|
+
if (!nextKeys.has(prevItems[i])) {
|
|
525
|
+
const ch = childNodes[i + 1];
|
|
526
|
+
shallowTeardown(ch);
|
|
527
|
+
removalQueue.push(ch);
|
|
528
|
+
childNodes[i + 1] = null;
|
|
531
529
|
}
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
for (let i = 0; i < nextItems.length; i++) {
|
|
540
|
-
parent.appendChild(render(nextItems[i]));
|
|
541
|
-
}
|
|
542
|
-
parent.appendChild(endBookend);
|
|
543
|
-
prevItems = nextItems;
|
|
544
|
-
nextItems = null;
|
|
545
|
-
return;
|
|
530
|
+
}
|
|
531
|
+
if (removalQueue.length === prevItems.length) {
|
|
532
|
+
parent.textContent = "";
|
|
533
|
+
outlet.appendChild(startBookend);
|
|
534
|
+
const len = nextItems.length;
|
|
535
|
+
for (let i = 0; i < len; i++) {
|
|
536
|
+
outlet.appendChild(render(nextItems[i]));
|
|
546
537
|
}
|
|
538
|
+
outlet.appendChild(endBookend);
|
|
539
|
+
prevItems = nextItems;
|
|
540
|
+
nextItems = null;
|
|
541
|
+
childNodes = null;
|
|
542
|
+
return;
|
|
543
|
+
}
|
|
544
|
+
for (const e of removalQueue) {
|
|
545
|
+
e.remove();
|
|
546
|
+
}
|
|
547
|
+
if (oldLength - start === removalQueue.length) {
|
|
548
|
+
prevItems = nextItems;
|
|
549
|
+
nextItems = null;
|
|
550
|
+
childNodes = null;
|
|
551
|
+
return;
|
|
547
552
|
}
|
|
548
|
-
|
|
549
553
|
let keyMap = new Map();
|
|
550
|
-
let currentNode = childNodeList[start + 1];
|
|
551
554
|
for (let i = start; i <= oldLength; i++) {
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
el: currentNode,
|
|
562
|
-
item: item,
|
|
563
|
-
});
|
|
564
|
-
}
|
|
565
|
-
currentNode = currentNode.nextSibling;
|
|
555
|
+
if (
|
|
556
|
+
childNodes[i + 1] &&
|
|
557
|
+
(!nextItems[i] ||
|
|
558
|
+
prevItems[i] !== nextItems[i])
|
|
559
|
+
) {
|
|
560
|
+
keyMap.set(prevItems[i], {
|
|
561
|
+
el: childNodes[i + 1],
|
|
562
|
+
item: prevItems[i],
|
|
563
|
+
});
|
|
566
564
|
}
|
|
567
565
|
}
|
|
568
566
|
|
|
@@ -602,6 +600,7 @@ export function isolatedTerminalList(props) {
|
|
|
602
600
|
keyMap = null;
|
|
603
601
|
prevItems = nextItems;
|
|
604
602
|
nextItems = null;
|
|
603
|
+
childNodes = null;
|
|
605
604
|
});
|
|
606
605
|
return outlet;
|
|
607
606
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
export {
|
|
2
2
|
addChildren,
|
|
3
3
|
addEffect,
|
|
4
|
-
component,
|
|
5
|
-
createReactiveTextNode,
|
|
6
|
-
fixedComponent,
|
|
7
|
-
isolatedTerminalList,
|
|
8
|
-
list,
|
|
4
|
+
component, createReactiveTextNode, fixedComponent, isolatedTerminalList, list,
|
|
9
5
|
markAsReactive,
|
|
10
6
|
mount,
|
|
11
7
|
setAttribute,
|
|
@@ -15,5 +11,5 @@ export {
|
|
|
15
11
|
show,
|
|
16
12
|
terminalList
|
|
17
13
|
} from "./element.js";
|
|
18
|
-
export { $effect, $signal, staticEffect,
|
|
14
|
+
export { $effect, $signal, staticEffect, type Signal } from "./signals.js";
|
|
19
15
|
|
package/src/signals.ts
CHANGED
|
@@ -18,7 +18,7 @@ function scheduleEffect(effectFn: EffectFn) {
|
|
|
18
18
|
runEffectFn(ef);
|
|
19
19
|
currentEffect = prev;
|
|
20
20
|
} else {
|
|
21
|
-
|
|
21
|
+
ef();
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
pendingEffects.length = 0;
|
|
@@ -34,60 +34,29 @@ export type Signal<T> = {
|
|
|
34
34
|
};
|
|
35
35
|
|
|
36
36
|
class SignalImpl<T> {
|
|
37
|
-
subs
|
|
37
|
+
subs = new Set<any>();
|
|
38
38
|
|
|
39
39
|
constructor(public value: T) { }
|
|
40
40
|
|
|
41
41
|
get(): T {
|
|
42
42
|
if (currentEffect) {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
this.subs.add(oldEffect);
|
|
50
|
-
this.subs.add(currentEffect);
|
|
51
|
-
}
|
|
52
|
-
} else {
|
|
53
|
-
this.subs.add(currentEffect);
|
|
54
|
-
}
|
|
55
|
-
if (!currentEffect.td) {
|
|
56
|
-
currentEffect.td = this;
|
|
57
|
-
} else if (Array.isArray(currentEffect.td)) {
|
|
58
|
-
currentEffect.td.push(this);
|
|
43
|
+
this.subs.add(currentEffect);
|
|
44
|
+
const td = currentEffect.td;
|
|
45
|
+
if (!td) {
|
|
46
|
+
currentEffect.td = this.subs;
|
|
47
|
+
} else if (Array.isArray(td)) {
|
|
48
|
+
td.push(this.subs);
|
|
59
49
|
} else {
|
|
60
|
-
currentEffect.td = [
|
|
50
|
+
currentEffect.td = [td, this.subs];
|
|
61
51
|
}
|
|
62
52
|
}
|
|
63
53
|
return this.value;
|
|
64
54
|
}
|
|
65
55
|
|
|
66
|
-
delete(ef: any): void {
|
|
67
|
-
if (this.subs === ef) {
|
|
68
|
-
this.subs = undefined;
|
|
69
|
-
} else if (typeof this.subs === "object" && this.subs.delete) {
|
|
70
|
-
this.subs.delete(ef);
|
|
71
|
-
if (this.subs.size === 0) {
|
|
72
|
-
this.subs = undefined;
|
|
73
|
-
} else if (this.subs.size === 1) {
|
|
74
|
-
this.subs = this.subs.values().next().value;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
56
|
set(value: T): void {
|
|
80
57
|
if (value !== this.value) {
|
|
81
58
|
this.value = value;
|
|
82
|
-
|
|
83
|
-
if (typeof this.subs === "function" || !this.subs.add) {
|
|
84
|
-
scheduleEffect(this.subs);
|
|
85
|
-
} else {
|
|
86
|
-
for (const ef of this.subs) {
|
|
87
|
-
scheduleEffect(ef);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
59
|
+
this.subs.forEach(scheduleEffect);
|
|
91
60
|
}
|
|
92
61
|
}
|
|
93
62
|
|
|
@@ -101,7 +70,7 @@ export function $signal<T>(value: T): SignalImpl<T> {
|
|
|
101
70
|
}
|
|
102
71
|
|
|
103
72
|
function runEffectFn(ef: EffectFn) {
|
|
104
|
-
const td =
|
|
73
|
+
const td = ef();
|
|
105
74
|
if (td) {
|
|
106
75
|
if (ef.td) {
|
|
107
76
|
if (Array.isArray(ef.td)) {
|
|
@@ -116,11 +85,11 @@ function runEffectFn(ef: EffectFn) {
|
|
|
116
85
|
}
|
|
117
86
|
|
|
118
87
|
type EffectTeardown = (() => void) | { delete: (v: any) => void };
|
|
119
|
-
type EffectFn = ((
|
|
88
|
+
type EffectFn = (() => (() => void) | void) & {
|
|
120
89
|
mv?: boolean;
|
|
121
90
|
dyn?: boolean;
|
|
122
91
|
td: EffectTeardown | EffectTeardown[];
|
|
123
|
-
}
|
|
92
|
+
}
|
|
124
93
|
|
|
125
94
|
export function $effect(fn: (() => (() => void) | void) & any) {
|
|
126
95
|
const prev = currentEffect;
|
|
@@ -133,6 +102,7 @@ export function $effect(fn: (() => (() => void) | void) & any) {
|
|
|
133
102
|
}
|
|
134
103
|
|
|
135
104
|
export function staticEffect(fn: (() => (() => void) | void) & any) {
|
|
105
|
+
fn.td = null;
|
|
136
106
|
const prev = currentEffect;
|
|
137
107
|
currentEffect = fn;
|
|
138
108
|
fn();
|
|
@@ -142,30 +112,9 @@ export function staticEffect(fn: (() => (() => void) | void) & any) {
|
|
|
142
112
|
}
|
|
143
113
|
|
|
144
114
|
export function cleanup(ef) {
|
|
145
|
-
if (
|
|
146
|
-
ef.td();
|
|
147
|
-
} else if (ef.td.delete) {
|
|
148
|
-
ef.td.delete(ef);
|
|
149
|
-
} else {
|
|
115
|
+
if (Array.isArray(ef.td)) {
|
|
150
116
|
for (const f of ef.td) typeof f === "function" ? f() : f.delete(ef);
|
|
117
|
+
} else {
|
|
118
|
+
typeof ef.td === "function" ? ef.td() : ef.td.delete(ef);
|
|
151
119
|
}
|
|
152
120
|
}
|
|
153
|
-
|
|
154
|
-
class TextNodeEffect {
|
|
155
|
-
next: any = undefined;
|
|
156
|
-
td: any = undefined;
|
|
157
|
-
constructor(public node: Text, public signal: Signal<any>) { }
|
|
158
|
-
run() {
|
|
159
|
-
this.node.data = this.signal.get();
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
export function staticTextNodeEffect(node: Text, signal: Signal<any>) {
|
|
164
|
-
const ef = new TextNodeEffect(node, signal);
|
|
165
|
-
const prev = currentEffect;
|
|
166
|
-
currentEffect = ef;
|
|
167
|
-
ef.run();
|
|
168
|
-
currentEffect = prev;
|
|
169
|
-
collectEffect(ef);
|
|
170
|
-
return ef;
|
|
171
|
-
}
|
package/tsconfig.tsbuildinfo
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"fileNames":["./node_modules/typescript/lib/lib.es5.d.ts","./node_modules/typescript/lib/lib.es2015.d.ts","./node_modules/typescript/lib/lib.es2016.d.ts","./node_modules/typescript/lib/lib.es2017.d.ts","./node_modules/typescript/lib/lib.es2018.d.ts","./node_modules/typescript/lib/lib.es2019.d.ts","./node_modules/typescript/lib/lib.es2020.d.ts","./node_modules/typescript/lib/lib.dom.d.ts","./node_modules/typescript/lib/lib.dom.iterable.d.ts","./node_modules/typescript/lib/lib.dom.asynciterable.d.ts","./node_modules/typescript/lib/lib.webworker.importscripts.d.ts","./node_modules/typescript/lib/lib.scripthost.d.ts","./node_modules/typescript/lib/lib.es2015.core.d.ts","./node_modules/typescript/lib/lib.es2015.collection.d.ts","./node_modules/typescript/lib/lib.es2015.generator.d.ts","./node_modules/typescript/lib/lib.es2015.iterable.d.ts","./node_modules/typescript/lib/lib.es2015.promise.d.ts","./node_modules/typescript/lib/lib.es2015.proxy.d.ts","./node_modules/typescript/lib/lib.es2015.reflect.d.ts","./node_modules/typescript/lib/lib.es2015.symbol.d.ts","./node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","./node_modules/typescript/lib/lib.es2016.array.include.d.ts","./node_modules/typescript/lib/lib.es2016.intl.d.ts","./node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","./node_modules/typescript/lib/lib.es2017.date.d.ts","./node_modules/typescript/lib/lib.es2017.object.d.ts","./node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","./node_modules/typescript/lib/lib.es2017.string.d.ts","./node_modules/typescript/lib/lib.es2017.intl.d.ts","./node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","./node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","./node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","./node_modules/typescript/lib/lib.es2018.intl.d.ts","./node_modules/typescript/lib/lib.es2018.promise.d.ts","./node_modules/typescript/lib/lib.es2018.regexp.d.ts","./node_modules/typescript/lib/lib.es2019.array.d.ts","./node_modules/typescript/lib/lib.es2019.object.d.ts","./node_modules/typescript/lib/lib.es2019.string.d.ts","./node_modules/typescript/lib/lib.es2019.symbol.d.ts","./node_modules/typescript/lib/lib.es2019.intl.d.ts","./node_modules/typescript/lib/lib.es2020.bigint.d.ts","./node_modules/typescript/lib/lib.es2020.date.d.ts","./node_modules/typescript/lib/lib.es2020.promise.d.ts","./node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","./node_modules/typescript/lib/lib.es2020.string.d.ts","./node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","./node_modules/typescript/lib/lib.es2020.intl.d.ts","./node_modules/typescript/lib/lib.es2020.number.d.ts","./node_modules/typescript/lib/lib.decorators.d.ts","./node_modules/typescript/lib/lib.decorators.legacy.d.ts","./node_modules/typescript/lib/lib.es2020.full.d.ts","./src/signals.ts","./src/element.ts","./src/index.ts","./src/router.ts","./node_modules/@types/deep-eql/index.d.ts","./node_modules/assertion-error/index.d.ts","./node_modules/@types/chai/index.d.ts","./node_modules/@types/estree/index.d.ts"],"fileIdsList":[[56,57],[52],[52,53],[53]],"fileInfos":[{"version":"c430d44666289dae81f30fa7b2edebf186ecc91a2d4c71266ea6ae76388792e1","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"080941d9f9ff9307f7e27a83bcd888b7c8270716c39af943532438932ec1d0b9","affectsGlobalScope":true,"impliedFormat":1},{"version":"2e80ee7a49e8ac312cc11b77f1475804bee36b3b2bc896bead8b6e1266befb43","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7a3c8b952931daebdfc7a2897c53c0a1c73624593fa070e46bd537e64dcd20a","affectsGlobalScope":true,"impliedFormat":1},{"version":"80e18897e5884b6723488d4f5652167e7bb5024f946743134ecc4aa4ee731f89","affectsGlobalScope":true,"impliedFormat":1},{"version":"cd034f499c6cdca722b60c04b5b1b78e058487a7085a8e0d6fb50809947ee573","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb0f136d372979348d59b3f5020b4cdb81b5504192b1cacff5d1fbba29378aa1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a680117f487a4d2f30ea46f1b4b7f58bef1480456e18ba53ee85c2746eeca012","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"1305d1e76ca44e30fb8b2b8075fa522b83f60c0bcf5d4326a9d2cf79b53724f8","impliedFormat":1},{"version":"da6bbb589a24c878053b7beefd8a4bc8d495f4ef74c997352ed1fcecff10bc6f","signature":"8ac4d9babe8281389bf23517f2318bb7a0a65ffcfa7b58c9394198e0288f4a94"},{"version":"d7da8f79ad96a031b21785ec0fb8545c9364067c7825f2d95cbfae19bb7f45da","signature":"f3ddd3670c33381859688f604378a0028cafa5b52cc936da9a225933eb464387"},{"version":"3b08b0d35aa0cf2bdddf8cc47bdbd483ef9ceea3efedfd2e43abd1adc978ff3b","signature":"d95a6bb2d3c7794648e8733fdec0b0c027bd1f12615c5c7ac9d2140e2b090651"},{"version":"a155e9ebe821846c43103394346639a6a19a7f844be4892bbe4352aa20ee6707","signature":"58b2b60f8aae88fb4b926c3f9700b21a56e0b0f4016e56ab9fa879550cbdb294"},{"version":"427fe2004642504828c1476d0af4270e6ad4db6de78c0b5da3e4c5ca95052a99","impliedFormat":1},{"version":"2eeffcee5c1661ddca53353929558037b8cf305ffb86a803512982f99bcab50d","impliedFormat":99},{"version":"9afb4cb864d297e4092a79ee2871b5d3143ea14153f62ef0bb04ede25f432030","affectsGlobalScope":true,"impliedFormat":99},{"version":"151ff381ef9ff8da2da9b9663ebf657eac35c4c9a19183420c05728f31a6761d","impliedFormat":1}],"root":[[52,55]],"options":{"allowJs":true,"checkJs":false,"composite":true,"esModuleInterop":true,"module":99,"outDir":"./dist","rootDir":"./src","skipLibCheck":true,"target":7},"referencedMap":[[58,1],[53,2],[54,3],[55,3],[52,4]],"latestChangedDtsFile":"./dist/router.d.ts","version":"5.9.3"}
|
|
1
|
+
{"fileNames":["./node_modules/typescript/lib/lib.es5.d.ts","./node_modules/typescript/lib/lib.es2015.d.ts","./node_modules/typescript/lib/lib.es2016.d.ts","./node_modules/typescript/lib/lib.es2017.d.ts","./node_modules/typescript/lib/lib.es2018.d.ts","./node_modules/typescript/lib/lib.es2019.d.ts","./node_modules/typescript/lib/lib.es2020.d.ts","./node_modules/typescript/lib/lib.dom.d.ts","./node_modules/typescript/lib/lib.dom.iterable.d.ts","./node_modules/typescript/lib/lib.dom.asynciterable.d.ts","./node_modules/typescript/lib/lib.webworker.importscripts.d.ts","./node_modules/typescript/lib/lib.scripthost.d.ts","./node_modules/typescript/lib/lib.es2015.core.d.ts","./node_modules/typescript/lib/lib.es2015.collection.d.ts","./node_modules/typescript/lib/lib.es2015.generator.d.ts","./node_modules/typescript/lib/lib.es2015.iterable.d.ts","./node_modules/typescript/lib/lib.es2015.promise.d.ts","./node_modules/typescript/lib/lib.es2015.proxy.d.ts","./node_modules/typescript/lib/lib.es2015.reflect.d.ts","./node_modules/typescript/lib/lib.es2015.symbol.d.ts","./node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","./node_modules/typescript/lib/lib.es2016.array.include.d.ts","./node_modules/typescript/lib/lib.es2016.intl.d.ts","./node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","./node_modules/typescript/lib/lib.es2017.date.d.ts","./node_modules/typescript/lib/lib.es2017.object.d.ts","./node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","./node_modules/typescript/lib/lib.es2017.string.d.ts","./node_modules/typescript/lib/lib.es2017.intl.d.ts","./node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","./node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","./node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","./node_modules/typescript/lib/lib.es2018.intl.d.ts","./node_modules/typescript/lib/lib.es2018.promise.d.ts","./node_modules/typescript/lib/lib.es2018.regexp.d.ts","./node_modules/typescript/lib/lib.es2019.array.d.ts","./node_modules/typescript/lib/lib.es2019.object.d.ts","./node_modules/typescript/lib/lib.es2019.string.d.ts","./node_modules/typescript/lib/lib.es2019.symbol.d.ts","./node_modules/typescript/lib/lib.es2019.intl.d.ts","./node_modules/typescript/lib/lib.es2020.bigint.d.ts","./node_modules/typescript/lib/lib.es2020.date.d.ts","./node_modules/typescript/lib/lib.es2020.promise.d.ts","./node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","./node_modules/typescript/lib/lib.es2020.string.d.ts","./node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","./node_modules/typescript/lib/lib.es2020.intl.d.ts","./node_modules/typescript/lib/lib.es2020.number.d.ts","./node_modules/typescript/lib/lib.decorators.d.ts","./node_modules/typescript/lib/lib.decorators.legacy.d.ts","./node_modules/typescript/lib/lib.es2020.full.d.ts","./src/signals.ts","./src/element.ts","./src/index.ts","./src/router.ts","./node_modules/@types/deep-eql/index.d.ts","./node_modules/assertion-error/index.d.ts","./node_modules/@types/chai/index.d.ts","./node_modules/@types/estree/index.d.ts"],"fileIdsList":[[56,57],[52],[52,53],[53]],"fileInfos":[{"version":"c430d44666289dae81f30fa7b2edebf186ecc91a2d4c71266ea6ae76388792e1","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"080941d9f9ff9307f7e27a83bcd888b7c8270716c39af943532438932ec1d0b9","affectsGlobalScope":true,"impliedFormat":1},{"version":"2e80ee7a49e8ac312cc11b77f1475804bee36b3b2bc896bead8b6e1266befb43","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7a3c8b952931daebdfc7a2897c53c0a1c73624593fa070e46bd537e64dcd20a","affectsGlobalScope":true,"impliedFormat":1},{"version":"80e18897e5884b6723488d4f5652167e7bb5024f946743134ecc4aa4ee731f89","affectsGlobalScope":true,"impliedFormat":1},{"version":"cd034f499c6cdca722b60c04b5b1b78e058487a7085a8e0d6fb50809947ee573","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb0f136d372979348d59b3f5020b4cdb81b5504192b1cacff5d1fbba29378aa1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a680117f487a4d2f30ea46f1b4b7f58bef1480456e18ba53ee85c2746eeca012","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"1305d1e76ca44e30fb8b2b8075fa522b83f60c0bcf5d4326a9d2cf79b53724f8","impliedFormat":1},{"version":"ccf3c55b2212f44b6e65960a692c486b4c8eaabb2fa8fb14751a8d29138a9897","signature":"a53dff95094f1f7fee261ff1879f5909cd440f02aa68ff6893d017b2343181d1"},{"version":"8ef52c56857a8df1daaa330ae11ccb676c29355467d5b89e1207b54de0091b8c","signature":"f3ddd3670c33381859688f604378a0028cafa5b52cc936da9a225933eb464387"},{"version":"5b043e65efd2643d5a0411d776a1a5c63fc51ac893c4f5409a89b314d600b98a","signature":"bbc6084bc812a40382d7197dde1bd55fbc08bd63dee323addb1e9a4d1283d98d"},{"version":"a155e9ebe821846c43103394346639a6a19a7f844be4892bbe4352aa20ee6707","signature":"166554555b2dc6392155b045bb33ce964f7d5f092f50fada34eb4d5828d7740e"},{"version":"427fe2004642504828c1476d0af4270e6ad4db6de78c0b5da3e4c5ca95052a99","impliedFormat":1},{"version":"2eeffcee5c1661ddca53353929558037b8cf305ffb86a803512982f99bcab50d","impliedFormat":99},{"version":"9afb4cb864d297e4092a79ee2871b5d3143ea14153f62ef0bb04ede25f432030","affectsGlobalScope":true,"impliedFormat":99},{"version":"151ff381ef9ff8da2da9b9663ebf657eac35c4c9a19183420c05728f31a6761d","impliedFormat":1}],"root":[[52,55]],"options":{"allowJs":true,"checkJs":false,"composite":true,"esModuleInterop":true,"module":99,"outDir":"./dist","rootDir":"./src","skipLibCheck":true,"target":7},"referencedMap":[[58,1],[53,2],[54,3],[55,3],[52,4]],"latestChangedDtsFile":"./dist/index.d.ts","version":"5.9.3"}
|