Skip to content

Releases: loro-dev/loro

[email protected]

09 Jan 10:23
483a7f9

Choose a tag to compare

Patch Changes

  • 864b5ca: perf(loro-internal): remove quadratic slow paths in text import/checkout #895
  • a34134d: perf: rm the event calling wrapper for ops that will not trigger events

[email protected]

09 Jan 10:23
483a7f9

Choose a tag to compare

Patch Changes

  • 864b5ca: perf(loro-internal): remove quadratic slow paths in text import/checkout #895
  • a34134d: perf: rm the event calling wrapper for ops that will not trigger events

[email protected]

08 Dec 13:59
e628eea

Choose a tag to compare

Patch Changes

[email protected]

08 Dec 13:59
e628eea

Choose a tag to compare

Patch Changes

[email protected]

27 Nov 09:07

Choose a tag to compare

Patch Changes

  • 53635dd: fix: toDelta should ignore null style entries #875

[email protected]

27 Nov 03:59

Choose a tag to compare

Patch Changes

[email protected]

27 Nov 09:07

Choose a tag to compare

Patch Changes

  • 53635dd: fix: toDelta should ignore null style entries #875

[email protected]

27 Nov 03:59

Choose a tag to compare

Patch Changes

[email protected]

21 Nov 03:34

Choose a tag to compare

Minor Changes

  • ce16b52: feat: add sliceDelta method to slice a span of richtext #862

    Use text.sliceDelta(start, end) when you need a Quill-style delta for only part of a rich text field (for example, to copy a styled snippet). The method takes UTF-16 indices; use sliceDeltaUtf8 if you want to slice by UTF-8 byte offsets instead.

    import { LoroDoc } from "loro-crdt";
    
    const doc = new LoroDoc();
    doc.configTextStyle({
      bold: { expand: "after" },
      comment: { expand: "none" },
    });
    const text = doc.getText("text");
    
    text.insert(0, "Hello World!");
    text.mark({ start: 0, end: 5 }, "bold", true);
    text.mark({ start: 6, end: 11 }, "comment", "greeting");
    
    const snippet = text.sliceDelta(1, 8);
    console.log(snippet);
    // [
    //   { insert: "ello", attributes: { bold: true } },
    //   { insert: " " },
    //   { insert: "Wo", attributes: { comment: "greeting" } },
    // ]

Patch Changes

  • a78d70f: fix: avoid convert panic #858
  • ee94ee4: fix: EphemeralStore apply should ignore timeout entries #865
  • 9e0a613: fix: Reject symbol-keyed map objects in wasm conversion #855

[email protected]

21 Nov 03:34

Choose a tag to compare

Minor Changes

  • ce16b52: feat: add sliceDelta method to slice a span of richtext #862

    Use text.sliceDelta(start, end) when you need a Quill-style delta for only part of a rich text field (for example, to copy a styled snippet). The method takes UTF-16 indices; use sliceDeltaUtf8 if you want to slice by UTF-8 byte offsets instead.

    import { LoroDoc } from "loro-crdt";
    
    const doc = new LoroDoc();
    doc.configTextStyle({
      bold: { expand: "after" },
      comment: { expand: "none" },
    });
    const text = doc.getText("text");
    
    text.insert(0, "Hello World!");
    text.mark({ start: 0, end: 5 }, "bold", true);
    text.mark({ start: 6, end: 11 }, "comment", "greeting");
    
    const snippet = text.sliceDelta(1, 8);
    console.log(snippet);
    // [
    //   { insert: "ello", attributes: { bold: true } },
    //   { insert: " " },
    //   { insert: "Wo", attributes: { comment: "greeting" } },
    // ]

Patch Changes

  • a78d70f: fix: avoid convert panic #858
  • ee94ee4: fix: EphemeralStore apply should ignore timeout entries #865
  • 9e0a613: fix: Reject symbol-keyed map objects in wasm conversion #855