@thyn/core 0.0.272 → 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 CHANGED
@@ -4,16 +4,20 @@ export function mount(app, parent) {
4
4
  }
5
5
  let collectingHead;
6
6
  export function collectEffect(effectFn) {
7
- effectFn.next = collectingHead;
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)
15
+ if (n) {
14
16
  n.nodeValue = v();
15
- else
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
- let existing = e.$fx;
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 next;
40
- while ((next = existing.next)) {
41
- existing = next;
43
+ let tail = existing;
44
+ while (tail.next) {
45
+ tail = tail.next;
42
46
  }
43
- existing.next = collectingHead;
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 = false;
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 = false;
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.appendChild(startBookend);
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
- for (let i = 0; i < nextItems.length; i++) {
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
- for (let i = start; i < nextItems.length; i++) {
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
- for (let i = 0, len = prevItems.length; i < len; i++) {
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
- for (let i = 0; i < nextItems.length; i++) {
428
- parent.insertBefore(render(nextItems[i]), endBookend);
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
- let node = startBookend;
437
- while (node = node.nextSibling) {
438
- shallowTeardown(node);
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
- for (let i = start; i < nextItems.length; i++) {
450
- parent.insertBefore(render(nextItems[i]), endBookend);
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 removeCount = oldLength - nextItems.length;
458
- while (removeCount > 0) {
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
- let removeCount = oldLength - start;
470
- let node = childNodeList[start + 1];
471
- while (removeCount > 0) {
472
- const next = node.nextSibling;
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
- if (start === 0 && oldLength === prevItems.length - 1) {
489
- let allRemove = true;
490
- for (let i = 0; i <= oldLength; i++) {
491
- if (nextKeys.has(prevItems[i])) {
492
- allRemove = false;
493
- break;
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
- if (allRemove) {
497
- let node = startBookend;
498
- while (node = node.nextSibling) {
499
- shallowTeardown(node);
500
- }
501
- parent.textContent = "";
502
- parent.appendChild(startBookend);
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
- const item = prevItems[i];
516
- if (!nextKeys.has(item)) {
517
- const next = currentNode.nextSibling;
518
- shallowTeardown(currentNode);
519
- currentNode.remove();
520
- currentNode = next;
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 } from "./signals.js";
2
+ export { $effect, $signal, staticEffect, type Signal } from "./signals.js";
package/dist/router.d.ts CHANGED
@@ -1,5 +1,11 @@
1
1
  export declare const router: {
2
- path: import("./signals.js").Signal<string>;
2
+ path: {
3
+ subs: Set<any>;
4
+ value: string;
5
+ get(): string;
6
+ set(value: string): void;
7
+ update(action: (prev: string) => string): void;
8
+ };
3
9
  param: (name: string) => string | undefined;
4
10
  };
5
11
  interface Route {
package/dist/signals.d.ts CHANGED
@@ -3,16 +3,16 @@ export type Signal<T> = {
3
3
  set(value: T): void;
4
4
  update(updater: (prev: T) => T): void;
5
5
  };
6
- export declare function $signal<T>(value: T): Signal<T>;
7
- type EffectTeardown = (() => void) | {
8
- delete: (v: any) => void;
9
- };
10
- type EffectFn = (() => (() => void) | void) & {
11
- mv?: boolean;
12
- dyn?: boolean;
13
- td?: EffectTeardown | EffectTeardown[];
14
- };
6
+ declare class SignalImpl<T> {
7
+ value: T;
8
+ subs: Set<any>;
9
+ constructor(value: T);
10
+ get(): T;
11
+ set(value: T): void;
12
+ update(action: (prev: T) => T): void;
13
+ }
14
+ export declare function $signal<T>(value: T): SignalImpl<T>;
15
15
  export declare function $effect(fn: (() => (() => void) | void) & any): any;
16
16
  export declare function staticEffect(fn: (() => (() => void) | void) & any): any;
17
- export declare function cleanup(ef: EffectFn): void;
17
+ export declare function cleanup(ef: any): void;
18
18
  export {};
package/dist/signals.js CHANGED
@@ -25,107 +25,39 @@ function scheduleEffect(effectFn) {
25
25
  }
26
26
  }
27
27
  class SignalImpl {
28
- constructor(initial) {
29
- this.subscribers = null; // null | single EffectFn | head of linked list
30
- this.value = initial;
28
+ constructor(value) {
29
+ this.value = value;
30
+ this.subs = new Set();
31
31
  }
32
32
  get() {
33
33
  if (currentEffect) {
34
- const node = { effect: currentEffect, next: null };
35
- if (!this.subscribers) {
36
- this.subscribers = currentEffect; // single case - direct reference (fast)
37
- }
38
- else if (typeof this.subscribers === "function") {
39
- // 2nd subscriber → upgrade to linked list
40
- if (this.subscribers !== currentEffect) {
41
- this.subscribers = {
42
- effect: this.subscribers,
43
- next: node,
44
- };
45
- }
46
- // else: already tracked → no-op
47
- }
48
- else {
49
- // already a linked list → push front (fastest allocation pattern)
50
- node.next = this.subscribers;
51
- this.subscribers = node;
52
- }
53
- // Track dependencies for cleanup
54
- if (!currentEffect.td) {
55
- currentEffect.td = this;
34
+ this.subs.add(currentEffect);
35
+ const td = currentEffect.td;
36
+ if (!td) {
37
+ currentEffect.td = this.subs;
56
38
  }
57
- else if (Array.isArray(currentEffect.td)) {
58
- currentEffect.td.push(this);
39
+ else if (Array.isArray(td)) {
40
+ td.push(this.subs);
59
41
  }
60
42
  else {
61
- currentEffect.td = [currentEffect.td, this];
43
+ currentEffect.td = [td, this.subs];
62
44
  }
63
45
  }
64
46
  return this.value;
65
47
  }
66
- notify() {
67
- if (!this.subscribers)
68
- return;
69
- if (typeof this.subscribers === "function") {
70
- scheduleEffect(this.subscribers);
71
- }
72
- else {
73
- // Walk the linked list
74
- let current = this.subscribers;
75
- while (current) {
76
- scheduleEffect(current.effect);
77
- current = current.next;
78
- }
79
- }
80
- }
81
48
  set(value) {
82
- if (Object.is(value, this.value))
83
- return; // === is not enough for NaN/Object.is is better
84
- this.value = value;
85
- this.notify();
86
- }
87
- update(updater) {
88
- this.set(updater(this.value));
89
- }
90
- // For cleanup - O(n) worst case, but usually rare compared to updates
91
- delete(effect) {
92
- if (!this.subscribers)
93
- return;
94
- if (typeof this.subscribers === "function") {
95
- if (this.subscribers === effect) {
96
- this.subscribers = null;
97
- }
98
- return;
99
- }
100
- // Linked list removal
101
- let current = this.subscribers;
102
- let prev = null;
103
- while (current) {
104
- if (current.effect === effect) {
105
- if (prev) {
106
- prev.next = current.next;
107
- }
108
- else {
109
- // removing head
110
- this.subscribers = current.next;
111
- if (typeof this.subscribers === "function") {
112
- // downgrade to single
113
- }
114
- else if (!this.subscribers) {
115
- this.subscribers = null;
116
- }
117
- }
118
- return;
119
- }
120
- prev = current;
121
- current = current.next;
49
+ if (value !== this.value) {
50
+ this.value = value;
51
+ this.subs.forEach(scheduleEffect);
122
52
  }
123
53
  }
54
+ update(action) {
55
+ this.set(action(this.value));
56
+ }
124
57
  }
125
58
  export function $signal(value) {
126
59
  return new SignalImpl(value);
127
60
  }
128
- // ──────────────────────────────────────────────────────────────────────────────
129
61
  function runEffectFn(ef) {
130
62
  const td = ef();
131
63
  if (td) {
@@ -152,29 +84,20 @@ export function $effect(fn) {
152
84
  return fn;
153
85
  }
154
86
  export function staticEffect(fn) {
87
+ fn.td = null;
155
88
  const prev = currentEffect;
156
89
  currentEffect = fn;
157
90
  fn();
158
91
  currentEffect = prev;
159
- // collectEffect(fn); ← Consider removing if most staticEffects don't need cleanup
92
+ collectEffect(fn);
160
93
  return fn;
161
94
  }
162
95
  export function cleanup(ef) {
163
- if (!ef.td)
164
- return;
165
- if (typeof ef.td === "function") {
166
- ef.td();
167
- }
168
- else if ("delete" in ef.td) {
169
- ef.td.delete(ef);
96
+ if (Array.isArray(ef.td)) {
97
+ for (const f of ef.td)
98
+ typeof f === "function" ? f() : f.delete(ef);
170
99
  }
171
100
  else {
172
- for (const t of ef.td) {
173
- if (typeof t === "function")
174
- t();
175
- else
176
- t.delete(ef);
177
- }
101
+ typeof ef.td === "function" ? ef.td() : ef.td.delete(ef);
178
102
  }
179
- ef.td = undefined;
180
103
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thyn/core",
3
- "version": "0.0.272",
3
+ "version": "0.0.281",
4
4
  "scripts": {
5
5
  "build": "tsc",
6
6
  "pub": "tsc && npm version patch -f && npm -f publish --access=public",
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
- effectFn.next = collectingHead;
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) n.nodeValue = v();
17
- else n = document.createTextNode(v());
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
- let existing = e.$fx;
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 next;
43
- while ((next = existing.next)) {
44
- existing = next;
48
+ let tail = existing;
49
+ while (tail.next) {
50
+ tail = tail.next;
45
51
  }
46
- existing.next = collectingHead;
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 = false;
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 = false;
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.appendChild(startBookend);
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
- for (let i = 0; i < nextItems.length; i++) {
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
- for (let i = start; i < nextItems.length; i++) {
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
- for (let i = 0, len = prevItems.length; i < len; i++) {
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
- for (let i = 0; i < nextItems.length; i++) {
455
- parent.insertBefore(render(nextItems[i]), endBookend);
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
- let node = startBookend;
464
- while (node = node.nextSibling) {
465
- shallowTeardown(node);
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
- for (let i = start; i < nextItems.length; i++) {
478
- parent.insertBefore(render(nextItems[i]), endBookend);
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 removeCount = oldLength - nextItems.length;
487
- while (removeCount > 0) {
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
- let removeCount = oldLength - start;
500
- let node = childNodeList[start + 1];
501
- while (removeCount > 0) {
502
- const next = node.nextSibling;
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
- if (start === 0 && oldLength === prevItems.length - 1) {
525
- let allRemove = true;
526
- for (let i = 0; i <= oldLength; i++) {
527
- if (nextKeys.has(prevItems[i])) {
528
- allRemove = false;
529
- break;
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
- if (allRemove) {
533
- let node = startBookend;
534
- while (node = node.nextSibling) {
535
- shallowTeardown(node);
536
- }
537
- parent.textContent = "";
538
- parent.appendChild(startBookend);
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
- const item = prevItems[i];
553
- if (!nextKeys.has(item)) {
554
- const next = currentNode.nextSibling;
555
- shallowTeardown(currentNode);
556
- currentNode.remove();
557
- currentNode = next;
558
- } else {
559
- if (currentNode && (!nextItems[i] || item !== nextItems[i])) {
560
- keyMap.set(item, {
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 } from "./signals.js";
14
+ export { $effect, $signal, staticEffect, type Signal } from "./signals.js";
19
15
 
package/src/signals.ts CHANGED
@@ -3,7 +3,7 @@ import { collectEffect } from "./element.js";
3
3
  let currentEffect: any;
4
4
 
5
5
  let isBatching: boolean | undefined;
6
- const pendingEffects: EffectFn[] = [];
6
+ const pendingEffects = [];
7
7
 
8
8
  function scheduleEffect(effectFn: EffectFn) {
9
9
  pendingEffects.push(effectFn);
@@ -27,137 +27,54 @@ function scheduleEffect(effectFn: EffectFn) {
27
27
  }
28
28
  }
29
29
 
30
- // ──────────────────────────────────────────────────────────────────────────────
31
-
32
30
  export type Signal<T> = {
33
31
  get(): T;
34
32
  set(value: T): void;
35
33
  update(updater: (prev: T) => T): void;
36
34
  };
37
35
 
38
- type SubscriberNode = {
39
- effect: EffectFn;
40
- next: SubscriberNode | null;
41
- };
42
-
43
36
  class SignalImpl<T> {
44
- private value: T;
45
- private subscribers: SubscriberNode | EffectFn | null = null; // null | single EffectFn | head of linked list
37
+ subs = new Set<any>();
46
38
 
47
- constructor(initial: T) {
48
- this.value = initial;
49
- }
39
+ constructor(public value: T) { }
50
40
 
51
41
  get(): T {
52
42
  if (currentEffect) {
53
- const node: SubscriberNode = { effect: currentEffect, next: null };
54
-
55
- if (!this.subscribers) {
56
- this.subscribers = currentEffect; // single case - direct reference (fast)
57
- }
58
- else if (typeof this.subscribers === "function") {
59
- // 2nd subscriber → upgrade to linked list
60
- if (this.subscribers !== currentEffect) {
61
- this.subscribers = {
62
- effect: this.subscribers,
63
- next: node,
64
- };
65
- }
66
- // else: already tracked → no-op
67
- }
68
- else {
69
- // already a linked list → push front (fastest allocation pattern)
70
- node.next = this.subscribers;
71
- this.subscribers = node;
72
- }
73
-
74
- // Track dependencies for cleanup
75
- if (!currentEffect.td) {
76
- currentEffect.td = this;
77
- } else if (Array.isArray(currentEffect.td)) {
78
- 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);
79
49
  } else {
80
- currentEffect.td = [currentEffect.td, this];
50
+ currentEffect.td = [td, this.subs];
81
51
  }
82
52
  }
83
-
84
53
  return this.value;
85
54
  }
86
55
 
87
- private notify() {
88
- if (!this.subscribers) return;
89
-
90
- if (typeof this.subscribers === "function") {
91
- scheduleEffect(this.subscribers);
92
- } else {
93
- // Walk the linked list
94
- let current: SubscriberNode | null = this.subscribers;
95
- while (current) {
96
- scheduleEffect(current.effect);
97
- current = current.next;
98
- }
99
- }
100
- }
101
-
102
56
  set(value: T): void {
103
- if (Object.is(value, this.value)) return; // === is not enough for NaN/Object.is is better
104
-
105
- this.value = value;
106
- this.notify();
57
+ if (value !== this.value) {
58
+ this.value = value;
59
+ this.subs.forEach(scheduleEffect);
60
+ }
107
61
  }
108
62
 
109
- update(updater: (prev: T) => T): void {
110
- this.set(updater(this.value));
111
- }
112
-
113
- // For cleanup - O(n) worst case, but usually rare compared to updates
114
- delete(effect: EffectFn): void {
115
- if (!this.subscribers) return;
116
-
117
- if (typeof this.subscribers === "function") {
118
- if (this.subscribers === effect) {
119
- this.subscribers = null;
120
- }
121
- return;
122
- }
123
-
124
- // Linked list removal
125
- let current: SubscriberNode | null = this.subscribers;
126
- let prev: SubscriberNode | null = null;
127
-
128
- while (current) {
129
- if (current.effect === effect) {
130
- if (prev) {
131
- prev.next = current.next;
132
- } else {
133
- // removing head
134
- this.subscribers = current.next;
135
- if (typeof this.subscribers === "function") {
136
- // downgrade to single
137
- } else if (!this.subscribers) {
138
- this.subscribers = null;
139
- }
140
- }
141
- return;
142
- }
143
- prev = current;
144
- current = current.next;
145
- }
63
+ update(action: (prev: T) => T): void {
64
+ this.set(action(this.value));
146
65
  }
147
66
  }
148
67
 
149
- export function $signal<T>(value: T): Signal<T> {
68
+ export function $signal<T>(value: T): SignalImpl<T> {
150
69
  return new SignalImpl(value);
151
70
  }
152
71
 
153
- // ──────────────────────────────────────────────────────────────────────────────
154
-
155
72
  function runEffectFn(ef: EffectFn) {
156
73
  const td = ef();
157
74
  if (td) {
158
75
  if (ef.td) {
159
76
  if (Array.isArray(ef.td)) {
160
- ef.td.push(td);
77
+ ef.td.push(td)
161
78
  } else {
162
79
  ef.td = [ef.td, td];
163
80
  }
@@ -171,7 +88,7 @@ type EffectTeardown = (() => void) | { delete: (v: any) => void };
171
88
  type EffectFn = (() => (() => void) | void) & {
172
89
  mv?: boolean;
173
90
  dyn?: boolean;
174
- td?: EffectTeardown | EffectTeardown[];
91
+ td: EffectTeardown | EffectTeardown[];
175
92
  }
176
93
 
177
94
  export function $effect(fn: (() => (() => void) | void) & any) {
@@ -185,26 +102,19 @@ export function $effect(fn: (() => (() => void) | void) & any) {
185
102
  }
186
103
 
187
104
  export function staticEffect(fn: (() => (() => void) | void) & any) {
105
+ fn.td = null;
188
106
  const prev = currentEffect;
189
107
  currentEffect = fn;
190
108
  fn();
191
109
  currentEffect = prev;
192
- // collectEffect(fn); ← Consider removing if most staticEffects don't need cleanup
110
+ collectEffect(fn);
193
111
  return fn;
194
112
  }
195
113
 
196
- export function cleanup(ef: EffectFn) {
197
- if (!ef.td) return;
198
-
199
- if (typeof ef.td === "function") {
200
- ef.td();
201
- } else if ("delete" in ef.td) {
202
- ef.td.delete(ef);
114
+ export function cleanup(ef) {
115
+ if (Array.isArray(ef.td)) {
116
+ for (const f of ef.td) typeof f === "function" ? f() : f.delete(ef);
203
117
  } else {
204
- for (const t of ef.td) {
205
- if (typeof t === "function") t();
206
- else t.delete(ef);
207
- }
118
+ typeof ef.td === "function" ? ef.td() : ef.td.delete(ef);
208
119
  }
209
- ef.td = undefined;
210
- }
120
+ }
@@ -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":"589b03ae7f263fff1f36b72909045b0deeed895643a62f9eca66edffa9dcce90","signature":"7a7ae1ab8bd1e314d617534642247a6db0e7df00a17d844437a1e61e7f042470"},{"version":"ea2816684ad892b056facb0b021ac7eb438b34f0582987d5e47afc408d578be4","signature":"f3ddd3670c33381859688f604378a0028cafa5b52cc936da9a225933eb464387"},{"version":"17c210e47841877c5c6e6d64cf41277596f65faa6cf3ec35c482c3c2231bb21b","signature":"12fd8be483df752ac04ae85347f9c397954ac2390e0de50612bf8b9899d7767d"},{"version":"a155e9ebe821846c43103394346639a6a19a7f844be4892bbe4352aa20ee6707","signature":"a32c52a25b47067dac589266e7667623ea1ef2b0c1f9c4fd41adbc7b67a59eee"},{"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"}