Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ target/
*.podspec
rust_modules/
*.a
cpp/
cpp/generated/*
*.podspec
src/gen/
*.tgz
27,432 changes: 0 additions & 27,432 deletions cpp/generated/loro.cpp

This file was deleted.

2,706 changes: 0 additions & 2,706 deletions cpp/generated/loro.hpp

This file was deleted.

8 changes: 4 additions & 4 deletions loro-rs/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion loro-rs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ name = "uniffi-bindgen"
path = "src/uniffi-bindgen.rs"

[dependencies]
loro-ffi = { version = "1.5.9" }
loro-ffi = { version = "1.5.10" }
uniffi = { version = "0.28.3" }

[build-dependencies]
Expand Down
15 changes: 15 additions & 0 deletions src/generated/loro-ffi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1745,6 +1745,18 @@ interface NativeModuleInterface {
ptr: bigint,
uniffi_out_err: UniffiRustCallStatus
): number;
ubrn_uniffi_loro_ffi_fn_method_undomanager_group_end(
ptr: bigint,
uniffi_out_err: UniffiRustCallStatus
): void;
ubrn_uniffi_loro_ffi_fn_method_undomanager_group_start(
ptr: bigint,
uniffi_out_err: UniffiRustCallStatus
): void;
ubrn_uniffi_loro_ffi_fn_method_undomanager_peer(
ptr: bigint,
uniffi_out_err: UniffiRustCallStatus
): bigint;
ubrn_uniffi_loro_ffi_fn_method_undomanager_record_new_checkpoint(
ptr: bigint,
uniffi_out_err: UniffiRustCallStatus
Expand Down Expand Up @@ -2300,6 +2312,9 @@ interface NativeModuleInterface {
ubrn_uniffi_loro_ffi_checksum_method_undomanager_add_exclude_origin_prefix(): number;
ubrn_uniffi_loro_ffi_checksum_method_undomanager_can_redo(): number;
ubrn_uniffi_loro_ffi_checksum_method_undomanager_can_undo(): number;
ubrn_uniffi_loro_ffi_checksum_method_undomanager_group_end(): number;
ubrn_uniffi_loro_ffi_checksum_method_undomanager_group_start(): number;
ubrn_uniffi_loro_ffi_checksum_method_undomanager_peer(): number;
ubrn_uniffi_loro_ffi_checksum_method_undomanager_record_new_checkpoint(): number;
ubrn_uniffi_loro_ffi_checksum_method_undomanager_redo(): number;
ubrn_uniffi_loro_ffi_checksum_method_undomanager_redo_count(): number;
Expand Down
96 changes: 96 additions & 0 deletions src/generated/loro.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17031,6 +17031,23 @@ export interface UndoManagerInterface {
* Whether the undo manager can undo.
*/
canUndo(): boolean;
/**
* Ends the current group, calling UndoManager::undo() after this will
* undo all changes that occurred during the group.
*/
groupEnd(): void;
/**
* Will start a new group of changes, all subsequent changes will be merged
* into a new item on the undo stack. If we receive remote changes, we determine
* wether or not they are conflicting. If the remote changes are conflicting
* we split the undo item and close the group. If there are no conflict
* in changed container ids we continue the group merge.
*/
groupStart() /*throws*/ : void;
/**
* Get the peer id of the undo manager
*/
peer(): /*u64*/ bigint;
/**
* Record a new checkpoint.
*/
Expand Down Expand Up @@ -17148,6 +17165,61 @@ export class UndoManager
);
}

/**
* Ends the current group, calling UndoManager::undo() after this will
* undo all changes that occurred during the group.
*/
public groupEnd(): void {
uniffiCaller.rustCall(
/*caller:*/ (callStatus) => {
nativeModule().ubrn_uniffi_loro_ffi_fn_method_undomanager_group_end(
uniffiTypeUndoManagerObjectFactory.clonePointer(this),
callStatus
);
},
/*liftString:*/ FfiConverterString.lift
);
}

/**
* Will start a new group of changes, all subsequent changes will be merged
* into a new item on the undo stack. If we receive remote changes, we determine
* wether or not they are conflicting. If the remote changes are conflicting
* we split the undo item and close the group. If there are no conflict
* in changed container ids we continue the group merge.
*/
public groupStart(): void /*throws*/ {
uniffiCaller.rustCallWithError(
/*liftError:*/ FfiConverterTypeLoroError.lift.bind(
FfiConverterTypeLoroError
),
/*caller:*/ (callStatus) => {
nativeModule().ubrn_uniffi_loro_ffi_fn_method_undomanager_group_start(
uniffiTypeUndoManagerObjectFactory.clonePointer(this),
callStatus
);
},
/*liftString:*/ FfiConverterString.lift
);
}

/**
* Get the peer id of the undo manager
*/
public peer(): /*u64*/ bigint {
return FfiConverterUInt64.lift(
uniffiCaller.rustCall(
/*caller:*/ (callStatus) => {
return nativeModule().ubrn_uniffi_loro_ffi_fn_method_undomanager_peer(
uniffiTypeUndoManagerObjectFactory.clonePointer(this),
callStatus
);
},
/*liftString:*/ FfiConverterString.lift
)
);
}

/**
* Record a new checkpoint.
*/
Expand Down Expand Up @@ -21126,6 +21198,30 @@ function uniffiEnsureInitialized() {
'uniffi_loro_ffi_checksum_method_undomanager_can_undo'
);
}
if (
nativeModule().ubrn_uniffi_loro_ffi_checksum_method_undomanager_group_end() !==
37541
) {
throw new UniffiInternalError.ApiChecksumMismatch(
'uniffi_loro_ffi_checksum_method_undomanager_group_end'
);
}
if (
nativeModule().ubrn_uniffi_loro_ffi_checksum_method_undomanager_group_start() !==
64372
) {
throw new UniffiInternalError.ApiChecksumMismatch(
'uniffi_loro_ffi_checksum_method_undomanager_group_start'
);
}
if (
nativeModule().ubrn_uniffi_loro_ffi_checksum_method_undomanager_peer() !==
45180
) {
throw new UniffiInternalError.ApiChecksumMismatch(
'uniffi_loro_ffi_checksum_method_undomanager_peer'
);
}
if (
nativeModule().ubrn_uniffi_loro_ffi_checksum_method_undomanager_record_new_checkpoint() !==
12209
Expand Down
Loading