jazz-tools 0.14.21 → 0.14.23

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.
@@ -1,5 +1,5 @@
1
1
 
2
- > jazz-tools@0.14.21 build /home/runner/_work/jazz/jazz/packages/jazz-tools
2
+ > jazz-tools@0.14.23 build /home/runner/_work/jazz/jazz/packages/jazz-tools
3
3
  > tsup && pnpm types
4
4
 
5
5
  CLI Building entry: {"index":"src/index.ts","testing":"src/testing.ts"}
@@ -11,12 +11,12 @@
11
11
  ESM Build start
12
12
  ESM dist/index.js 11.11 KB
13
13
  ESM dist/testing.js 6.31 KB
14
- ESM dist/chunk-DAOCWHIV.js 136.09 KB
14
+ ESM dist/chunk-LCH2NPSZ.js 136.28 KB
15
15
  ESM dist/index.js.map 18.38 KB
16
16
  ESM dist/testing.js.map 12.57 KB
17
- ESM dist/chunk-DAOCWHIV.js.map 311.39 KB
18
- ESM ⚡️ Build success in 52ms
17
+ ESM dist/chunk-LCH2NPSZ.js.map 311.94 KB
18
+ ESM ⚡️ Build success in 46ms
19
19
 
20
- > jazz-tools@0.14.21 types /home/runner/_work/jazz/jazz/packages/jazz-tools
20
+ > jazz-tools@0.14.23 types /home/runner/_work/jazz/jazz/packages/jazz-tools
21
21
  > tsc --outDir dist
22
22
 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # jazz-tools
2
2
 
3
+ ## 0.14.23
4
+
5
+ ### Patch Changes
6
+
7
+ - 9177579: Fixs coText applyDiff out of bounds insertion with emoji
8
+ - Updated dependencies [1ca9299]
9
+ - cojson@0.14.23
10
+
11
+ ## 0.14.22
12
+
13
+ ### Patch Changes
14
+
15
+ - 048ac1d: Fix: Ensure the types on withMigration expect a shallowly loaded Account
16
+ - Updated dependencies [57fb69f]
17
+ - cojson@0.14.22
18
+
3
19
  ## 0.14.21
4
20
 
5
21
  ### Patch Changes
@@ -2407,12 +2407,15 @@ var CoPlainText = class extends String {
2407
2407
  */
2408
2408
  applyDiff(other) {
2409
2409
  const current = this._raw.toString();
2410
- for (const [from, to, insert] of [...calcPatch2(current, other)].reverse()) {
2410
+ const currentGraphemes = this._raw.toGraphemes(current);
2411
+ const otherGraphemes = this._raw.toGraphemes(other);
2412
+ const patches = [...calcPatch2(currentGraphemes, otherGraphemes)];
2413
+ for (const [from, to, insert] of patches.reverse()) {
2411
2414
  if (to > from) {
2412
2415
  this.deleteRange({ from, to });
2413
2416
  }
2414
2417
  if (insert.length > 0) {
2415
- this.insertBefore(from, insert);
2418
+ this.insertBefore(from, this._raw.fromGraphemes(insert));
2416
2419
  }
2417
2420
  }
2418
2421
  }
@@ -4795,4 +4798,4 @@ export {
4795
4798
  JazzContextManager
4796
4799
  };
4797
4800
  /* istanbul ignore file -- @preserve */
4798
- //# sourceMappingURL=chunk-DAOCWHIV.js.map
4801
+ //# sourceMappingURL=chunk-LCH2NPSZ.js.map