azoxjs 1.0.0 → 1.0.1

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/README.md CHANGED
@@ -11,7 +11,7 @@ third-party CLI dependencies, no borrowed syntax from React, Vue, or
11
11
  Next.js. It compiles `.azox` components directly into fine-grained,
12
12
  signal-driven DOM updates.
13
13
 
14
- > Status: stable (v1.0.0). The template syntax, the reactivity exports
14
+ > Status: stable (v1.0.1). The template syntax, the reactivity exports
15
15
  > and the shape of the build output will not change without a 2.0. What
16
16
  > Azox does **not** do is listed in
17
17
  > [Limitations](https://azox.dev/docs/limitations) — those are stopping
@@ -555,7 +555,14 @@ function emitKeyedEach(node, statements) {
555
555
  // bindings dead and its onCleanup callbacks fired.
556
556
  statements.push(` const _scope = untracked(() => effect(() => {`);
557
557
  for (const line of bodyLines) statements.push(` ${line}`);
558
- statements.push(` _nodes = [${roots.filter((r) => r !== 'null').join(', ')}];`);
558
+ // A root may be a DocumentFragment — a component with several roots
559
+ // returns one. A fragment empties when it is inserted and has no
560
+ // .remove(), so its children are recorded instead; otherwise removing
561
+ // the row threw and left it on screen with its cleanups unrun.
562
+ statements.push(
563
+ ` _nodes = [${roots.filter((r) => r !== 'null').join(', ')}]` +
564
+ `.flatMap((_n) => (_n instanceof DocumentFragment ? [..._n.childNodes] : [_n]));`
565
+ );
559
566
  statements.push(` }));`);
560
567
  statements.push(` return { nodes: _nodes, scope: _scope };`);
561
568
  statements.push(`};`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "azoxjs",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Azox Framework — The Sound of Future Web",
5
5
  "type": "module",
6
6
  "license": "MIT",