flux-md 0.20.2 → 0.20.3

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/client.d.ts CHANGED
@@ -293,8 +293,11 @@ export declare class FluxClient {
293
293
  * - identical committed block (html + kind + open + speculative) → the OLD
294
294
  * block object, so its id and reference survive the swap and the block
295
295
  * never re-renders (blocksEqual / the DOM keyed reconcile hold);
296
- * - changed committed block → the new block, its id offset into this
297
- * generation's namespace (adopted old ids and raw new ids could collide);
296
+ * - changed committed block → the new block CARRYING THE OLD BLOCK'S id, so
297
+ * the same keyed component re-renders in place and its state (pagination,
298
+ * expansion…) survives the swap; only a NET-NEW position (past the old
299
+ * document's end) takes a namespace-offset id, where a raw parser id
300
+ * could genuinely collide with a retained old id;
298
301
  * - still-open block over old content → the old block (never a shrinking
299
302
  * partial where complete content was already on screen); past the old
300
303
  * document's end the live tail streams in as-is;
package/dist/client.js CHANGED
@@ -551,8 +551,11 @@ class FluxClient {
551
551
  * - identical committed block (html + kind + open + speculative) → the OLD
552
552
  * block object, so its id and reference survive the swap and the block
553
553
  * never re-renders (blocksEqual / the DOM keyed reconcile hold);
554
- * - changed committed block → the new block, its id offset into this
555
- * generation's namespace (adopted old ids and raw new ids could collide);
554
+ * - changed committed block → the new block CARRYING THE OLD BLOCK'S id, so
555
+ * the same keyed component re-renders in place and its state (pagination,
556
+ * expansion…) survives the swap; only a NET-NEW position (past the old
557
+ * document's end) takes a namespace-offset id, where a raw parser id
558
+ * could genuinely collide with a retained old id;
556
559
  * - still-open block over old content → the old block (never a shrinking
557
560
  * partial where complete content was already on screen); past the old
558
561
  * document's end the live tail streams in as-is;
@@ -590,6 +593,8 @@ class FluxClient {
590
593
  view[i] = ob;
591
594
  continue;
592
595
  }
596
+ view[i] = { ...nb, id: ob.id };
597
+ continue;
593
598
  }
594
599
  view[i] = { ...nb, id: this.idNamespace + nb.id };
595
600
  }
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flux-md",
3
- "version": "0.20.2",
3
+ "version": "0.20.3",
4
4
  "description": "Zero-dep streaming markdown for the browser. Rust→WASM core, Web Worker per stream, incremental parse with speculative closure.",
5
5
  "type": "module",
6
6
  "sideEffects": ["./dist/worker.js", "./dist/styles.css"],