loro-crdt
Advanced tools
Comparing version 0.15.4 to 0.15.5-alpha.0
@@ -484,7 +484,26 @@ import { Value, AwarenessWasm, PeerID as PeerID$1, Container, ContainerID, TreeID, OpId, Delta, LoroText, LoroMap, LoroTree, LoroList } from 'loro-wasm'; | ||
new (): LoroTree<T>; | ||
createNode(parent: TreeID | undefined): LoroTreeNode<T>; | ||
move(target: TreeID, parent: TreeID | undefined): void; | ||
/** | ||
* Create a new tree node as the child of parent and return a `LoroTreeNode` instance. | ||
* If the parent is undefined, the tree node will be a root node. | ||
* | ||
* If the index is not provided, the new node will be appended to the end. | ||
* | ||
* @example | ||
* ```ts | ||
* import { Loro } from "loro-crdt"; | ||
* | ||
* const doc = new Loro(); | ||
* const tree = doc.getTree("tree"); | ||
* const root = tree.createNode(); | ||
* ``` | ||
*/ | ||
createNode(parent?: TreeID): LoroTreeNode<T>; | ||
move(target: TreeID, parent?: TreeID): void; | ||
delete(target: TreeID): void; | ||
has(target: TreeID): boolean; | ||
getNodeByID(target: TreeID): LoroTreeNode; | ||
/** | ||
* Get LoroTreeNode by the TreeID. | ||
*/ | ||
getNodeByID(target: TreeID): LoroTreeNode<T>; | ||
subscribe(listener: Listener): number; | ||
@@ -497,2 +516,17 @@ } | ||
readonly data: LoroMap<T>; | ||
/** | ||
* Create a new node as the child of the current node and | ||
* return an instance of `LoroTreeNode`. | ||
* | ||
* If the index is not provided, the new node will be appended to the end. | ||
* | ||
* @example | ||
* ```typescript | ||
* import { Loro } from "loro-crdt"; | ||
* | ||
* let doc = new Loro(); | ||
* let tree = doc.getTree("tree"); | ||
* let root = tree.createNode(); | ||
* ``` | ||
*/ | ||
createNode(): LoroTreeNode<T>; | ||
@@ -502,2 +536,8 @@ setAsRoot(): void; | ||
parent(): LoroTreeNode<T> | undefined; | ||
/** | ||
* Get the children of this node. | ||
* | ||
* The objects returned are new js objects each time because they need to cross | ||
* the WASM boundary. | ||
*/ | ||
children(): Array<LoroTreeNode<T>>; | ||
@@ -504,0 +544,0 @@ } |
{ | ||
"name": "loro-crdt", | ||
"version": "0.15.4", | ||
"version": "0.15.5-alpha.0", | ||
"description": "Loro CRDTs is a high-performance CRDT framework that makes your app state synchronized, collaborative and maintainable effortlessly.", | ||
@@ -20,3 +20,3 @@ "keywords": [ | ||
"dependencies": { | ||
"loro-wasm": "0.15.4" | ||
"loro-wasm": "0.15.5-alpha.0" | ||
}, | ||
@@ -23,0 +23,0 @@ "devDependencies": { |
@@ -534,7 +534,26 @@ export * from "loro-wasm"; | ||
new (): LoroTree<T>; | ||
createNode(parent: TreeID | undefined): LoroTreeNode<T>; | ||
move(target: TreeID, parent: TreeID | undefined): void; | ||
/** | ||
* Create a new tree node as the child of parent and return a `LoroTreeNode` instance. | ||
* If the parent is undefined, the tree node will be a root node. | ||
* | ||
* If the index is not provided, the new node will be appended to the end. | ||
* | ||
* @example | ||
* ```ts | ||
* import { Loro } from "loro-crdt"; | ||
* | ||
* const doc = new Loro(); | ||
* const tree = doc.getTree("tree"); | ||
* const root = tree.createNode(); | ||
* ``` | ||
*/ | ||
createNode(parent?: TreeID): LoroTreeNode<T>; | ||
move(target: TreeID, parent?: TreeID): void; | ||
delete(target: TreeID): void; | ||
has(target: TreeID): boolean; | ||
getNodeByID(target: TreeID): LoroTreeNode; | ||
/** | ||
* Get LoroTreeNode by the TreeID. | ||
*/ | ||
getNodeByID(target: TreeID): LoroTreeNode<T>; | ||
subscribe(listener: Listener): number; | ||
@@ -550,2 +569,17 @@ } | ||
readonly data: LoroMap<T>; | ||
/** | ||
* Create a new node as the child of the current node and | ||
* return an instance of `LoroTreeNode`. | ||
* | ||
* If the index is not provided, the new node will be appended to the end. | ||
* | ||
* @example | ||
* ```typescript | ||
* import { Loro } from "loro-crdt"; | ||
* | ||
* let doc = new Loro(); | ||
* let tree = doc.getTree("tree"); | ||
* let root = tree.createNode(); | ||
* ``` | ||
*/ | ||
createNode(): LoroTreeNode<T>; | ||
@@ -555,2 +589,8 @@ setAsRoot(): void; | ||
parent(): LoroTreeNode<T> | undefined; | ||
/** | ||
* Get the children of this node. | ||
* | ||
* The objects returned are new js objects each time because they need to cross | ||
* the WASM boundary. | ||
*/ | ||
children(): Array<LoroTreeNode<T>>; | ||
@@ -557,0 +597,0 @@ } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
177956
1612
+ Addedloro-wasm@0.15.5-alpha.0(transitive)
- Removedloro-wasm@0.15.4(transitive)
Updatedloro-wasm@0.15.5-alpha.0