loro-crdt 1.2.4 → 1.2.6

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/CHANGELOG.md CHANGED
@@ -1,10 +1,23 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.2.6
4
+
5
+ ### Patch Changes
6
+
7
+ - d552955: Make getByPath work for "tree/0/key"
8
+ - df81aec: Better event ordering
9
+
10
+ ## 1.2.5
11
+
12
+ ### Patch Changes
13
+
14
+ - 9faa149: Fix detach + attach error
15
+
3
16
  ## 1.2.4
4
17
 
5
18
  ### Patch Changes
6
19
 
7
- - 5aa7985: Fixed incorrect subscript calculation when moving a child in the current parent
20
+ - 5aa7985: Fixed LoroTree's incorrect index when moving a node within its current parent
8
21
 
9
22
  ## 1.2.3
10
23
 
package/README.md CHANGED
@@ -126,6 +126,13 @@ test('sync example', () => {
126
126
  });
127
127
  ```
128
128
 
129
+ # Blog
130
+
131
+ - [Loro 1.0](https://loro.dev/blog/v1.0)
132
+ - [Movable tree CRDTs and Loro's implementation](https://loro.dev/blog/movable-tree)
133
+ - [Introduction to Loro's Rich Text CRDT](https://loro.dev/blog/loro-richtext)
134
+ - [Loro: Reimagine State Management with CRDTs](https://loro.dev/blog/loro-now-open-source)
135
+
129
136
  # Credits
130
137
 
131
138
  Loro draws inspiration from the innovative work of the following projects and individuals:
package/base64/index.js CHANGED
@@ -2359,6 +2359,21 @@ class LoroDoc {
2359
2359
  /**
2360
2360
  * Get the value or container at the given path
2361
2361
  *
2362
+ * The path can be specified in different ways depending on the container type:
2363
+ *
2364
+ * For Tree:
2365
+ * 1. Using node IDs: `tree/{node_id}/property`
2366
+ * 2. Using indices: `tree/0/1/property`
2367
+ *
2368
+ * For List and MovableList:
2369
+ * - Using indices: `list/0` or `list/1/property`
2370
+ *
2371
+ * For Map:
2372
+ * - Using keys: `map/key` or `map/nested/property`
2373
+ *
2374
+ * For tree structures, index-based paths follow depth-first traversal order.
2375
+ * The indices start from 0 and represent the position of a node among its siblings.
2376
+ *
2362
2377
  * @example
2363
2378
  * ```ts
2364
2379
  * import { LoroDoc } from "loro-crdt";
@@ -6438,7 +6453,7 @@ var imports = /*#__PURE__*/Object.freeze({
6438
6453
  // Without this patch, Cloudflare Worker would raise issue like: "Uncaught TypeError: wasm2.__wbindgen_start is not a function"
6439
6454
 
6440
6455
 
6441
- import loro_wasm_bg_js from './loro_wasm_bg-d78efef9.js';
6456
+ import loro_wasm_bg_js from './loro_wasm_bg-982aff63.js';
6442
6457
  const instance = new WebAssembly.Instance(loro_wasm_bg_js(), {
6443
6458
  "./loro_wasm_bg.js": imports,
6444
6459
  });
@@ -2099,6 +2099,21 @@ export class LoroDoc {
2099
2099
  /**
2100
2100
  * Get the value or container at the given path
2101
2101
  *
2102
+ * The path can be specified in different ways depending on the container type:
2103
+ *
2104
+ * For Tree:
2105
+ * 1. Using node IDs: `tree/{node_id}/property`
2106
+ * 2. Using indices: `tree/0/1/property`
2107
+ *
2108
+ * For List and MovableList:
2109
+ * - Using indices: `list/0` or `list/1/property`
2110
+ *
2111
+ * For Map:
2112
+ * - Using keys: `map/key` or `map/nested/property`
2113
+ *
2114
+ * For tree structures, index-based paths follow depth-first traversal order.
2115
+ * The indices start from 0 and represent the position of a node among its siblings.
2116
+ *
2102
2117
  * @example
2103
2118
  * ```ts
2104
2119
  * import { LoroDoc } from "loro-crdt";