kerfjs 5.0.0-beta.85 → 5.0.0-beta.86

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/ai/manifest.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "kerfjsVersion": "5.0.0-beta.85",
2
+ "kerfjsVersion": "5.0.0-beta.86",
3
3
  "files": [
4
4
  {
5
5
  "name": "skill",
@@ -111,11 +111,18 @@ function _hasGranularIndexShift(previousBindingCount, patches) {
111
111
  const rendered = [];
112
112
  for (let i = 0; i < previousBindingCount; i++) rendered.push(i);
113
113
  for (const patch of patches) {
114
- if (patch.type === "insert") rendered.splice(patch.index, 0, patch.index);
115
- else if (patch.type === "remove") rendered.splice(patch.index, 1);
116
- else if (patch.type === "move") {
117
- const [moved] = rendered.splice(patch.from, 1);
118
- rendered.splice(patch.to, 0, moved);
114
+ switch (patch.type) {
115
+ case "insert":
116
+ rendered.splice(patch.index, 0, patch.index);
117
+ break;
118
+ case "remove":
119
+ rendered.splice(patch.index, 1);
120
+ break;
121
+ case "move": {
122
+ const [moved] = rendered.splice(patch.from, 1);
123
+ rendered.splice(patch.to, 0, moved);
124
+ break;
125
+ }
119
126
  }
120
127
  }
121
128
  return rendered.some((renderedAt, index) => renderedAt !== index);
@@ -1514,4 +1521,4 @@ function resultToSegment(result) {
1514
1521
 
1515
1522
  export { captureFocus, each, morph, mount, moveNode, restoreFocus };
1516
1523
 
1517
- //# sourceMappingURL=chunk-TLL3KXT6.js.map
1524
+ //# sourceMappingURL=chunk-T33U7SRR.js.map