Skip to content

Commit ee20c92

Browse files
committed
feat: loro 1.8.1
1 parent 953288b commit ee20c92

File tree

3 files changed

+121
-19
lines changed

3 files changed

+121
-19
lines changed

Sources/Loro/LoroFFI.swift

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9496,6 +9496,26 @@ public protocol UndoManagerProtocol : AnyObject {
94969496
*/
94979497
func setOnPush(onPush: OnPush?)
94989498

9499+
/**
9500+
* Get the metadata of the top redo stack item, if any.
9501+
*/
9502+
func topRedoMeta() -> UndoItemMeta?
9503+
9504+
/**
9505+
* Get the value associated with the top redo stack item, if any.
9506+
*/
9507+
func topRedoValue() -> LoroValue?
9508+
9509+
/**
9510+
* Get the metadata of the top undo stack item, if any.
9511+
*/
9512+
func topUndoMeta() -> UndoItemMeta?
9513+
9514+
/**
9515+
* Get the value associated with the top undo stack item, if any.
9516+
*/
9517+
func topUndoValue() -> LoroValue?
9518+
94999519
/**
95009520
* Undo the last change made by the peer.
95019521
*/
@@ -9702,6 +9722,46 @@ open func setOnPush(onPush: OnPush?) {try! rustCall() {
97029722
FfiConverterOptionTypeOnPush.lower(onPush),$0
97039723
)
97049724
}
9725+
}
9726+
9727+
/**
9728+
* Get the metadata of the top redo stack item, if any.
9729+
*/
9730+
open func topRedoMeta() -> UndoItemMeta? {
9731+
return try! FfiConverterOptionTypeUndoItemMeta.lift(try! rustCall() {
9732+
uniffi_loro_ffi_fn_method_undomanager_top_redo_meta(self.uniffiClonePointer(),$0
9733+
)
9734+
})
9735+
}
9736+
9737+
/**
9738+
* Get the value associated with the top redo stack item, if any.
9739+
*/
9740+
open func topRedoValue() -> LoroValue? {
9741+
return try! FfiConverterOptionTypeLoroValue.lift(try! rustCall() {
9742+
uniffi_loro_ffi_fn_method_undomanager_top_redo_value(self.uniffiClonePointer(),$0
9743+
)
9744+
})
9745+
}
9746+
9747+
/**
9748+
* Get the metadata of the top undo stack item, if any.
9749+
*/
9750+
open func topUndoMeta() -> UndoItemMeta? {
9751+
return try! FfiConverterOptionTypeUndoItemMeta.lift(try! rustCall() {
9752+
uniffi_loro_ffi_fn_method_undomanager_top_undo_meta(self.uniffiClonePointer(),$0
9753+
)
9754+
})
9755+
}
9756+
9757+
/**
9758+
* Get the value associated with the top undo stack item, if any.
9759+
*/
9760+
open func topUndoValue() -> LoroValue? {
9761+
return try! FfiConverterOptionTypeLoroValue.lift(try! rustCall() {
9762+
uniffi_loro_ffi_fn_method_undomanager_top_undo_value(self.uniffiClonePointer(),$0
9763+
)
9764+
})
97059765
}
97069766

97079767
/**
@@ -15365,6 +15425,30 @@ fileprivate struct FfiConverterOptionTypeStyleConfig: FfiConverterRustBuffer {
1536515425
}
1536615426
}
1536715427

15428+
#if swift(>=5.8)
15429+
@_documentation(visibility: private)
15430+
#endif
15431+
fileprivate struct FfiConverterOptionTypeUndoItemMeta: FfiConverterRustBuffer {
15432+
typealias SwiftType = UndoItemMeta?
15433+
15434+
public static func write(_ value: SwiftType, into buf: inout [UInt8]) {
15435+
guard let value = value else {
15436+
writeInt(&buf, Int8(0))
15437+
return
15438+
}
15439+
writeInt(&buf, Int8(1))
15440+
FfiConverterTypeUndoItemMeta.write(value, into: &buf)
15441+
}
15442+
15443+
public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SwiftType {
15444+
switch try readInt(&buf) as Int8 {
15445+
case 0: return nil
15446+
case 1: return try FfiConverterTypeUndoItemMeta.read(from: &buf)
15447+
default: throw UniffiInternalError.unexpectedOptionalTag
15448+
}
15449+
}
15450+
}
15451+
1536815452
#if swift(>=5.8)
1536915453
@_documentation(visibility: private)
1537015454
#endif
@@ -17124,6 +17208,18 @@ private var initializationResult: InitializationResult = {
1712417208
if (uniffi_loro_ffi_checksum_method_undomanager_set_on_push() != 23722) {
1712517209
return InitializationResult.apiChecksumMismatch
1712617210
}
17211+
if (uniffi_loro_ffi_checksum_method_undomanager_top_redo_meta() != 15306) {
17212+
return InitializationResult.apiChecksumMismatch
17213+
}
17214+
if (uniffi_loro_ffi_checksum_method_undomanager_top_redo_value() != 57224) {
17215+
return InitializationResult.apiChecksumMismatch
17216+
}
17217+
if (uniffi_loro_ffi_checksum_method_undomanager_top_undo_meta() != 26343) {
17218+
return InitializationResult.apiChecksumMismatch
17219+
}
17220+
if (uniffi_loro_ffi_checksum_method_undomanager_top_undo_value() != 42818) {
17221+
return InitializationResult.apiChecksumMismatch
17222+
}
1712717223
if (uniffi_loro_ffi_checksum_method_undomanager_undo() != 51407) {
1712817224
return InitializationResult.apiChecksumMismatch
1712917225
}

loro-swift/Cargo.lock

Lines changed: 24 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

loro-swift/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ name = "uniffi-bindgen"
1111
path = "src/uniffi-bindgen.rs"
1212

1313
[dependencies]
14-
loro-ffi = { version = "1.6.0" }
14+
loro-ffi = { version = "1.8.1" }
1515
uniffi = { version = "0.28.3" }
1616

1717
[build-dependencies]

0 commit comments

Comments
 (0)