loro-crdt 1.5.13 → 1.7.0
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 +29 -0
- package/base64/index.js +30 -5
- package/base64/loro_wasm.d.ts +17 -0
- package/base64/loro_wasm_bg-ce6cdb00.js +64 -0
- package/bundler/loro_wasm.d.ts +17 -0
- package/bundler/loro_wasm.js +1 -1
- package/bundler/loro_wasm_bg.js +26 -1
- package/bundler/loro_wasm_bg.wasm +0 -0
- package/bundler/loro_wasm_bg.wasm.d.ts +2 -0
- package/nodejs/loro_wasm.d.ts +17 -0
- package/nodejs/loro_wasm.js +26 -1
- package/nodejs/loro_wasm_bg.wasm +0 -0
- package/nodejs/loro_wasm_bg.wasm.d.ts +2 -0
- package/package.json +1 -1
- package/web/loro_wasm.d.ts +19 -0
- package/web/loro_wasm.js +26 -1
- package/web/loro_wasm_bg.wasm +0 -0
- package/web/loro_wasm_bg.wasm.d.ts +2 -0
- package/base64/loro_wasm_bg-6c4ca318.js +0 -64
package/bundler/loro_wasm.d.ts
CHANGED
|
@@ -2001,6 +2001,13 @@ export class LoroDoc {
|
|
|
2001
2001
|
* the largest existing timestamp will be used instead.
|
|
2002
2002
|
*
|
|
2003
2003
|
* NOTE: The `origin` will not be persisted, but the `message` will.
|
|
2004
|
+
*
|
|
2005
|
+
* Behavior on empty commits:
|
|
2006
|
+
* - This method is an explicit commit. If the pending transaction is empty, any provided
|
|
2007
|
+
* options (message/timestamp/origin) are swallowed and will not carry over to the next commit.
|
|
2008
|
+
* - Implicit commits triggered by `export`/`checkout` act as processing barriers. If the
|
|
2009
|
+
* transaction is empty in those cases, `message`/`timestamp`/`origin` are preserved for the
|
|
2010
|
+
* next commit.
|
|
2004
2011
|
*/
|
|
2005
2012
|
commit(options?: { origin?: string, timestamp?: number, message?: string } | null): void;
|
|
2006
2013
|
/**
|
|
@@ -3621,6 +3628,16 @@ export class UndoManager {
|
|
|
3621
3628
|
* Can redo the last operation.
|
|
3622
3629
|
*/
|
|
3623
3630
|
canRedo(): boolean;
|
|
3631
|
+
/**
|
|
3632
|
+
* Get the value associated with the top undo stack item, if any.
|
|
3633
|
+
* Returns `undefined` if there is no undo item.
|
|
3634
|
+
*/
|
|
3635
|
+
topUndoValue(): Value | undefined;
|
|
3636
|
+
/**
|
|
3637
|
+
* Get the value associated with the top redo stack item, if any.
|
|
3638
|
+
* Returns `undefined` if there is no redo item.
|
|
3639
|
+
*/
|
|
3640
|
+
topRedoValue(): Value | undefined;
|
|
3624
3641
|
/**
|
|
3625
3642
|
* The number of max undo steps.
|
|
3626
3643
|
* If the number of undo steps exceeds this number, the oldest undo step will be removed.
|
package/bundler/loro_wasm.js
CHANGED
|
@@ -6,7 +6,7 @@ import * as imports from "./loro_wasm_bg.js";
|
|
|
6
6
|
if (wasm.__wbindgen_start) {
|
|
7
7
|
imports.__wbg_set_wasm(wasm);
|
|
8
8
|
wasm.__wbindgen_start();
|
|
9
|
-
} else {
|
|
9
|
+
} else if (!('Bun' in globalThis)) {
|
|
10
10
|
const wkmod = await import("./loro_wasm_bg.wasm");
|
|
11
11
|
const instance = new WebAssembly.Instance(wkmod.default, {
|
|
12
12
|
"./loro_wasm_bg.js": imports,
|
package/bundler/loro_wasm_bg.js
CHANGED
|
@@ -1683,6 +1683,13 @@ export class LoroDoc {
|
|
|
1683
1683
|
* the largest existing timestamp will be used instead.
|
|
1684
1684
|
*
|
|
1685
1685
|
* NOTE: The `origin` will not be persisted, but the `message` will.
|
|
1686
|
+
*
|
|
1687
|
+
* Behavior on empty commits:
|
|
1688
|
+
* - This method is an explicit commit. If the pending transaction is empty, any provided
|
|
1689
|
+
* options (message/timestamp/origin) are swallowed and will not carry over to the next commit.
|
|
1690
|
+
* - Implicit commits triggered by `export`/`checkout` act as processing barriers. If the
|
|
1691
|
+
* transaction is empty in those cases, `message`/`timestamp`/`origin` are preserved for the
|
|
1692
|
+
* next commit.
|
|
1686
1693
|
* @param {{ origin?: string, timestamp?: number, message?: string } | null} [options]
|
|
1687
1694
|
*/
|
|
1688
1695
|
commit(options) {
|
|
@@ -6222,6 +6229,24 @@ export class UndoManager {
|
|
|
6222
6229
|
const ret = wasm.undomanager_canRedo(this.__wbg_ptr);
|
|
6223
6230
|
return ret !== 0;
|
|
6224
6231
|
}
|
|
6232
|
+
/**
|
|
6233
|
+
* Get the value associated with the top undo stack item, if any.
|
|
6234
|
+
* Returns `undefined` if there is no undo item.
|
|
6235
|
+
* @returns {Value | undefined}
|
|
6236
|
+
*/
|
|
6237
|
+
topUndoValue() {
|
|
6238
|
+
const ret = wasm.undomanager_topUndoValue(this.__wbg_ptr);
|
|
6239
|
+
return takeObject(ret);
|
|
6240
|
+
}
|
|
6241
|
+
/**
|
|
6242
|
+
* Get the value associated with the top redo stack item, if any.
|
|
6243
|
+
* Returns `undefined` if there is no redo item.
|
|
6244
|
+
* @returns {Value | undefined}
|
|
6245
|
+
*/
|
|
6246
|
+
topRedoValue() {
|
|
6247
|
+
const ret = wasm.undomanager_topRedoValue(this.__wbg_ptr);
|
|
6248
|
+
return takeObject(ret);
|
|
6249
|
+
}
|
|
6225
6250
|
/**
|
|
6226
6251
|
* The number of max undo steps.
|
|
6227
6252
|
* If the number of undo steps exceeds this number, the oldest undo step will be removed.
|
|
@@ -6824,7 +6849,7 @@ export function __wbg_node_02999533c4ea02e3(arg0) {
|
|
|
6824
6849
|
return addHeapObject(ret);
|
|
6825
6850
|
};
|
|
6826
6851
|
|
|
6827
|
-
export function
|
|
6852
|
+
export function __wbg_now_bbd8229e4a52638e() {
|
|
6828
6853
|
const ret = Date.now();
|
|
6829
6854
|
return ret;
|
|
6830
6855
|
};
|
|
Binary file
|
|
@@ -285,6 +285,8 @@ export const undomanager_groupStart: (a: number, b: number) => void;
|
|
|
285
285
|
export const undomanager_groupEnd: (a: number) => void;
|
|
286
286
|
export const undomanager_canUndo: (a: number) => number;
|
|
287
287
|
export const undomanager_canRedo: (a: number) => number;
|
|
288
|
+
export const undomanager_topUndoValue: (a: number) => number;
|
|
289
|
+
export const undomanager_topRedoValue: (a: number) => number;
|
|
288
290
|
export const undomanager_setMaxUndoSteps: (a: number, b: number) => void;
|
|
289
291
|
export const undomanager_setMergeInterval: (a: number, b: number) => void;
|
|
290
292
|
export const undomanager_addExcludeOriginPrefix: (a: number, b: number, c: number) => void;
|
package/nodejs/loro_wasm.d.ts
CHANGED
|
@@ -2001,6 +2001,13 @@ export class LoroDoc {
|
|
|
2001
2001
|
* the largest existing timestamp will be used instead.
|
|
2002
2002
|
*
|
|
2003
2003
|
* NOTE: The `origin` will not be persisted, but the `message` will.
|
|
2004
|
+
*
|
|
2005
|
+
* Behavior on empty commits:
|
|
2006
|
+
* - This method is an explicit commit. If the pending transaction is empty, any provided
|
|
2007
|
+
* options (message/timestamp/origin) are swallowed and will not carry over to the next commit.
|
|
2008
|
+
* - Implicit commits triggered by `export`/`checkout` act as processing barriers. If the
|
|
2009
|
+
* transaction is empty in those cases, `message`/`timestamp`/`origin` are preserved for the
|
|
2010
|
+
* next commit.
|
|
2004
2011
|
*/
|
|
2005
2012
|
commit(options?: { origin?: string, timestamp?: number, message?: string } | null): void;
|
|
2006
2013
|
/**
|
|
@@ -3621,6 +3628,16 @@ export class UndoManager {
|
|
|
3621
3628
|
* Can redo the last operation.
|
|
3622
3629
|
*/
|
|
3623
3630
|
canRedo(): boolean;
|
|
3631
|
+
/**
|
|
3632
|
+
* Get the value associated with the top undo stack item, if any.
|
|
3633
|
+
* Returns `undefined` if there is no undo item.
|
|
3634
|
+
*/
|
|
3635
|
+
topUndoValue(): Value | undefined;
|
|
3636
|
+
/**
|
|
3637
|
+
* Get the value associated with the top redo stack item, if any.
|
|
3638
|
+
* Returns `undefined` if there is no redo item.
|
|
3639
|
+
*/
|
|
3640
|
+
topRedoValue(): Value | undefined;
|
|
3624
3641
|
/**
|
|
3625
3642
|
* The number of max undo steps.
|
|
3626
3643
|
* If the number of undo steps exceeds this number, the oldest undo step will be removed.
|
package/nodejs/loro_wasm.js
CHANGED
|
@@ -1684,6 +1684,13 @@ class LoroDoc {
|
|
|
1684
1684
|
* the largest existing timestamp will be used instead.
|
|
1685
1685
|
*
|
|
1686
1686
|
* NOTE: The `origin` will not be persisted, but the `message` will.
|
|
1687
|
+
*
|
|
1688
|
+
* Behavior on empty commits:
|
|
1689
|
+
* - This method is an explicit commit. If the pending transaction is empty, any provided
|
|
1690
|
+
* options (message/timestamp/origin) are swallowed and will not carry over to the next commit.
|
|
1691
|
+
* - Implicit commits triggered by `export`/`checkout` act as processing barriers. If the
|
|
1692
|
+
* transaction is empty in those cases, `message`/`timestamp`/`origin` are preserved for the
|
|
1693
|
+
* next commit.
|
|
1687
1694
|
* @param {{ origin?: string, timestamp?: number, message?: string } | null} [options]
|
|
1688
1695
|
*/
|
|
1689
1696
|
commit(options) {
|
|
@@ -6230,6 +6237,24 @@ class UndoManager {
|
|
|
6230
6237
|
const ret = wasm.undomanager_canRedo(this.__wbg_ptr);
|
|
6231
6238
|
return ret !== 0;
|
|
6232
6239
|
}
|
|
6240
|
+
/**
|
|
6241
|
+
* Get the value associated with the top undo stack item, if any.
|
|
6242
|
+
* Returns `undefined` if there is no undo item.
|
|
6243
|
+
* @returns {Value | undefined}
|
|
6244
|
+
*/
|
|
6245
|
+
topUndoValue() {
|
|
6246
|
+
const ret = wasm.undomanager_topUndoValue(this.__wbg_ptr);
|
|
6247
|
+
return takeObject(ret);
|
|
6248
|
+
}
|
|
6249
|
+
/**
|
|
6250
|
+
* Get the value associated with the top redo stack item, if any.
|
|
6251
|
+
* Returns `undefined` if there is no redo item.
|
|
6252
|
+
* @returns {Value | undefined}
|
|
6253
|
+
*/
|
|
6254
|
+
topRedoValue() {
|
|
6255
|
+
const ret = wasm.undomanager_topRedoValue(this.__wbg_ptr);
|
|
6256
|
+
return takeObject(ret);
|
|
6257
|
+
}
|
|
6233
6258
|
/**
|
|
6234
6259
|
* The number of max undo steps.
|
|
6235
6260
|
* If the number of undo steps exceeds this number, the oldest undo step will be removed.
|
|
@@ -6834,7 +6859,7 @@ module.exports.__wbg_node_02999533c4ea02e3 = function(arg0) {
|
|
|
6834
6859
|
return addHeapObject(ret);
|
|
6835
6860
|
};
|
|
6836
6861
|
|
|
6837
|
-
module.exports.
|
|
6862
|
+
module.exports.__wbg_now_bbd8229e4a52638e = function() {
|
|
6838
6863
|
const ret = Date.now();
|
|
6839
6864
|
return ret;
|
|
6840
6865
|
};
|
package/nodejs/loro_wasm_bg.wasm
CHANGED
|
Binary file
|
|
@@ -285,6 +285,8 @@ export const undomanager_groupStart: (a: number, b: number) => void;
|
|
|
285
285
|
export const undomanager_groupEnd: (a: number) => void;
|
|
286
286
|
export const undomanager_canUndo: (a: number) => number;
|
|
287
287
|
export const undomanager_canRedo: (a: number) => number;
|
|
288
|
+
export const undomanager_topUndoValue: (a: number) => number;
|
|
289
|
+
export const undomanager_topRedoValue: (a: number) => number;
|
|
288
290
|
export const undomanager_setMaxUndoSteps: (a: number, b: number) => void;
|
|
289
291
|
export const undomanager_setMergeInterval: (a: number, b: number) => void;
|
|
290
292
|
export const undomanager_addExcludeOriginPrefix: (a: number, b: number, c: number) => void;
|
package/package.json
CHANGED
package/web/loro_wasm.d.ts
CHANGED
|
@@ -2001,6 +2001,13 @@ export class LoroDoc {
|
|
|
2001
2001
|
* the largest existing timestamp will be used instead.
|
|
2002
2002
|
*
|
|
2003
2003
|
* NOTE: The `origin` will not be persisted, but the `message` will.
|
|
2004
|
+
*
|
|
2005
|
+
* Behavior on empty commits:
|
|
2006
|
+
* - This method is an explicit commit. If the pending transaction is empty, any provided
|
|
2007
|
+
* options (message/timestamp/origin) are swallowed and will not carry over to the next commit.
|
|
2008
|
+
* - Implicit commits triggered by `export`/`checkout` act as processing barriers. If the
|
|
2009
|
+
* transaction is empty in those cases, `message`/`timestamp`/`origin` are preserved for the
|
|
2010
|
+
* next commit.
|
|
2004
2011
|
*/
|
|
2005
2012
|
commit(options?: { origin?: string, timestamp?: number, message?: string } | null): void;
|
|
2006
2013
|
/**
|
|
@@ -3621,6 +3628,16 @@ export class UndoManager {
|
|
|
3621
3628
|
* Can redo the last operation.
|
|
3622
3629
|
*/
|
|
3623
3630
|
canRedo(): boolean;
|
|
3631
|
+
/**
|
|
3632
|
+
* Get the value associated with the top undo stack item, if any.
|
|
3633
|
+
* Returns `undefined` if there is no undo item.
|
|
3634
|
+
*/
|
|
3635
|
+
topUndoValue(): Value | undefined;
|
|
3636
|
+
/**
|
|
3637
|
+
* Get the value associated with the top redo stack item, if any.
|
|
3638
|
+
* Returns `undefined` if there is no redo item.
|
|
3639
|
+
*/
|
|
3640
|
+
topRedoValue(): Value | undefined;
|
|
3624
3641
|
/**
|
|
3625
3642
|
* The number of max undo steps.
|
|
3626
3643
|
* If the number of undo steps exceeds this number, the oldest undo step will be removed.
|
|
@@ -3979,6 +3996,8 @@ export interface InitOutput {
|
|
|
3979
3996
|
readonly undomanager_groupEnd: (a: number) => void;
|
|
3980
3997
|
readonly undomanager_canUndo: (a: number) => number;
|
|
3981
3998
|
readonly undomanager_canRedo: (a: number) => number;
|
|
3999
|
+
readonly undomanager_topUndoValue: (a: number) => number;
|
|
4000
|
+
readonly undomanager_topRedoValue: (a: number) => number;
|
|
3982
4001
|
readonly undomanager_setMaxUndoSteps: (a: number, b: number) => void;
|
|
3983
4002
|
readonly undomanager_setMergeInterval: (a: number, b: number) => void;
|
|
3984
4003
|
readonly undomanager_addExcludeOriginPrefix: (a: number, b: number, c: number) => void;
|
package/web/loro_wasm.js
CHANGED
|
@@ -1675,6 +1675,13 @@ export class LoroDoc {
|
|
|
1675
1675
|
* the largest existing timestamp will be used instead.
|
|
1676
1676
|
*
|
|
1677
1677
|
* NOTE: The `origin` will not be persisted, but the `message` will.
|
|
1678
|
+
*
|
|
1679
|
+
* Behavior on empty commits:
|
|
1680
|
+
* - This method is an explicit commit. If the pending transaction is empty, any provided
|
|
1681
|
+
* options (message/timestamp/origin) are swallowed and will not carry over to the next commit.
|
|
1682
|
+
* - Implicit commits triggered by `export`/`checkout` act as processing barriers. If the
|
|
1683
|
+
* transaction is empty in those cases, `message`/`timestamp`/`origin` are preserved for the
|
|
1684
|
+
* next commit.
|
|
1678
1685
|
* @param {{ origin?: string, timestamp?: number, message?: string } | null} [options]
|
|
1679
1686
|
*/
|
|
1680
1687
|
commit(options) {
|
|
@@ -6214,6 +6221,24 @@ export class UndoManager {
|
|
|
6214
6221
|
const ret = wasm.undomanager_canRedo(this.__wbg_ptr);
|
|
6215
6222
|
return ret !== 0;
|
|
6216
6223
|
}
|
|
6224
|
+
/**
|
|
6225
|
+
* Get the value associated with the top undo stack item, if any.
|
|
6226
|
+
* Returns `undefined` if there is no undo item.
|
|
6227
|
+
* @returns {Value | undefined}
|
|
6228
|
+
*/
|
|
6229
|
+
topUndoValue() {
|
|
6230
|
+
const ret = wasm.undomanager_topUndoValue(this.__wbg_ptr);
|
|
6231
|
+
return takeObject(ret);
|
|
6232
|
+
}
|
|
6233
|
+
/**
|
|
6234
|
+
* Get the value associated with the top redo stack item, if any.
|
|
6235
|
+
* Returns `undefined` if there is no redo item.
|
|
6236
|
+
* @returns {Value | undefined}
|
|
6237
|
+
*/
|
|
6238
|
+
topRedoValue() {
|
|
6239
|
+
const ret = wasm.undomanager_topRedoValue(this.__wbg_ptr);
|
|
6240
|
+
return takeObject(ret);
|
|
6241
|
+
}
|
|
6217
6242
|
/**
|
|
6218
6243
|
* The number of max undo steps.
|
|
6219
6244
|
* If the number of undo steps exceeds this number, the oldest undo step will be removed.
|
|
@@ -6793,7 +6818,7 @@ function __wbg_get_imports() {
|
|
|
6793
6818
|
const ret = getObject(arg0).node;
|
|
6794
6819
|
return addHeapObject(ret);
|
|
6795
6820
|
};
|
|
6796
|
-
imports.wbg.
|
|
6821
|
+
imports.wbg.__wbg_now_bbd8229e4a52638e = function() {
|
|
6797
6822
|
const ret = Date.now();
|
|
6798
6823
|
return ret;
|
|
6799
6824
|
};
|
package/web/loro_wasm_bg.wasm
CHANGED
|
Binary file
|
|
@@ -285,6 +285,8 @@ export const undomanager_groupStart: (a: number, b: number) => void;
|
|
|
285
285
|
export const undomanager_groupEnd: (a: number) => void;
|
|
286
286
|
export const undomanager_canUndo: (a: number) => number;
|
|
287
287
|
export const undomanager_canRedo: (a: number) => number;
|
|
288
|
+
export const undomanager_topUndoValue: (a: number) => number;
|
|
289
|
+
export const undomanager_topRedoValue: (a: number) => number;
|
|
288
290
|
export const undomanager_setMaxUndoSteps: (a: number, b: number) => void;
|
|
289
291
|
export const undomanager_setMergeInterval: (a: number, b: number) => void;
|
|
290
292
|
export const undomanager_addExcludeOriginPrefix: (a: number, b: number, c: number) => void;
|