@seed-hypermedia/client 0.0.130 → 0.0.131

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.
@@ -68,13 +68,23 @@ export declare function matchBlockIds(oldNodes: APIBlockNode[], newNodes: BlockN
68
68
  */
69
69
  export declare function rebindTableIdentities(oldNodes: APIBlockNode[], newNodes: BlockNode[]): BlockNode[];
70
70
  /**
71
- * Compare the new block tree against the old blocks map and produce
72
- * the minimal set of DocumentOperations:
71
+ * Compare the new block tree against the old blocks map and produce the
72
+ * DocumentOperations that turn one into the other:
73
73
  *
74
- * - ReplaceBlock for new or content-changed blocks
75
- * - MoveBlocks for positioning (new blocks or position changes)
74
+ * - ReplaceBlock for new or content-changed blocks (an unchanged block gets none)
75
+ * - MoveBlocks for a level whose order changed (an unchanged level gets none)
76
76
  * - DeleteBlocks for blocks removed from the document
77
77
  *
78
+ * The replaces are minimal; the moves are not. A native MoveBlocks carries no
79
+ * anchor: it places its blocks at the start of the parent's children, in the
80
+ * order listed. So a level whose order changed in any way (a block added,
81
+ * removed or moved) is listed whole, the blocks already in place included.
82
+ * An update sent through `PrepareDocumentChange` (documentUpdateBlobs)
83
+ * drops the moves that change nothing, so the stored Change is minimal there;
84
+ * a Change built from these ops directly (createChangeOps) stores them all.
85
+ * Skipping unchanged blocks here still matters on the daemon path: it writes
86
+ * a block with a whole-number attribute again even when it is equal.
87
+ *
78
88
  * The delete pass is global: every old block whose id does not appear
79
89
  * anywhere in the new tree is deleted, including descendants of deleted
80
90
  * blocks (so removing a table row also removes its cells, leaving no
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seed-hypermedia/client",
3
- "version": "0.0.130",
3
+ "version": "0.0.131",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/seed-hypermedia/seed",