diff --git a/.gitmodules b/.gitmodules index ff36dfc..e69de29 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +0,0 @@ -[submodule "loro-ffi"] - path = loro-ffi - url = https://github.com/loro-dev/loro-ffi.git diff --git a/android/src/main/java/com/loro/lororeactnative/LoroReactNativeModule.kt b/android/src/main/java/com/loro/lororeactnative/LoroReactNativeModule.kt deleted file mode 100644 index 5e0b5ab..0000000 --- a/android/src/main/java/com/loro/lororeactnative/LoroReactNativeModule.kt +++ /dev/null @@ -1,43 +0,0 @@ -// Generated by uniffi-bindgen-react-native -package com.loro.lororeactnative - -import com.facebook.react.bridge.ReactApplicationContext -import com.facebook.react.module.annotations.ReactModule -import com.facebook.react.turbomodule.core.interfaces.CallInvokerHolder - -@ReactModule(name = LoroReactNativeModule.NAME) -class LoroReactNativeModule(reactContext: ReactApplicationContext) : - NativeLoroReactNativeSpec(reactContext) { - - override fun getName(): String { - return NAME - } - - // Two native methods implemented in cpp-adapter.cpp, and ultimately - // loro-react-native.cpp - - external fun nativeInstallRustCrate(runtimePointer: Long, callInvoker: CallInvokerHolder): Boolean - external fun nativeCleanupRustCrate(runtimePointer: Long): Boolean - - override fun installRustCrate(): Boolean { - val context = this.reactApplicationContext - return nativeInstallRustCrate( - context.javaScriptContextHolder!!.get(), - context.jsCallInvokerHolder!! - ) - } - - override fun cleanupRustCrate(): Boolean { - return nativeCleanupRustCrate( - this.reactApplicationContext.javaScriptContextHolder!!.get() - ) - } - - companion object { - const val NAME = "LoroReactNative" - - init { - System.loadLibrary("loro-react-native") - } - } -} \ No newline at end of file diff --git a/android/src/main/java/com/loro/lororeactnative/LoroReactNativePackage.kt b/android/src/main/java/com/loro/lororeactnative/LoroReactNativePackage.kt deleted file mode 100644 index c4d638e..0000000 --- a/android/src/main/java/com/loro/lororeactnative/LoroReactNativePackage.kt +++ /dev/null @@ -1,34 +0,0 @@ -// Generated by uniffi-bindgen-react-native -package com.loro.lororeactnative - -import com.facebook.react.TurboReactPackage -import com.facebook.react.bridge.NativeModule -import com.facebook.react.bridge.ReactApplicationContext -import com.facebook.react.module.model.ReactModuleInfo -import com.facebook.react.module.model.ReactModuleInfoProvider -import java.util.HashMap - -class LoroReactNativePackage : TurboReactPackage() { - override fun getModule(name: String, reactContext: ReactApplicationContext): NativeModule? { - return if (name == LoroReactNativeModule.NAME) { - LoroReactNativeModule(reactContext) - } else { - null - } - } - - override fun getReactModuleInfoProvider(): ReactModuleInfoProvider { - return ReactModuleInfoProvider { - val moduleInfos: MutableMap = HashMap() - moduleInfos[LoroReactNativeModule.NAME] = ReactModuleInfo( - LoroReactNativeModule.NAME, - LoroReactNativeModule.NAME, - false, // canOverrideExistingModule - false, // needsEagerInit - false, // isCxxModule - true // isTurboModule - ) - moduleInfos - } - } -} \ No newline at end of file diff --git a/cpp/generated/loro.cpp b/cpp/generated/loro.cpp index 06d77a6..8680dec 100644 --- a/cpp/generated/loro.cpp +++ b/cpp/generated/loro.cpp @@ -448,6 +448,9 @@ int8_t uniffi_loro_ffi_fn_method_lorocounter_is_attached( void *ptr, RustCallStatus *uniffi_out_err); int8_t uniffi_loro_ffi_fn_method_lorocounter_is_deleted( void *ptr, RustCallStatus *uniffi_out_err); +RustBuffer +uniffi_loro_ffi_fn_method_lorocounter_subscribe(void *ptr, void *subscriber, + RustCallStatus *uniffi_out_err); void *uniffi_loro_ffi_fn_clone_lorodoc(void *ptr, RustCallStatus *uniffi_out_err); void uniffi_loro_ffi_fn_free_lorodoc(void *ptr, RustCallStatus *uniffi_out_err); @@ -707,6 +710,9 @@ uniffi_loro_ffi_fn_method_lorolist_pop(void *ptr, void uniffi_loro_ffi_fn_method_lorolist_push(void *ptr, void *v, RustCallStatus *uniffi_out_err); RustBuffer +uniffi_loro_ffi_fn_method_lorolist_subscribe(void *ptr, void *subscriber, + RustCallStatus *uniffi_out_err); +RustBuffer uniffi_loro_ffi_fn_method_lorolist_to_vec(void *ptr, RustCallStatus *uniffi_out_err); void *uniffi_loro_ffi_fn_clone_loromap(void *ptr, @@ -778,6 +784,9 @@ uniffi_loro_ffi_fn_method_loromap_keys(void *ptr, uint32_t uniffi_loro_ffi_fn_method_loromap_len(void *ptr, RustCallStatus *uniffi_out_err); RustBuffer +uniffi_loro_ffi_fn_method_loromap_subscribe(void *ptr, void *subscriber, + RustCallStatus *uniffi_out_err); +RustBuffer uniffi_loro_ffi_fn_method_loromap_values(void *ptr, RustCallStatus *uniffi_out_err); void *uniffi_loro_ffi_fn_clone_loromovablelist(void *ptr, @@ -857,6 +866,8 @@ void *uniffi_loro_ffi_fn_method_loromovablelist_set_text_container( void *ptr, uint32_t pos, void *child, RustCallStatus *uniffi_out_err); void *uniffi_loro_ffi_fn_method_loromovablelist_set_tree_container( void *ptr, uint32_t pos, void *child, RustCallStatus *uniffi_out_err); +RustBuffer uniffi_loro_ffi_fn_method_loromovablelist_subscribe( + void *ptr, void *subscriber, RustCallStatus *uniffi_out_err); RustBuffer uniffi_loro_ffi_fn_method_loromovablelist_to_vec( void *ptr, RustCallStatus *uniffi_out_err); void *uniffi_loro_ffi_fn_clone_lorotext(void *ptr, @@ -867,6 +878,9 @@ void * uniffi_loro_ffi_fn_constructor_lorotext_new(RustCallStatus *uniffi_out_err); void uniffi_loro_ffi_fn_method_lorotext_apply_delta( void *ptr, RustBuffer delta, RustCallStatus *uniffi_out_err); +RustBuffer +uniffi_loro_ffi_fn_method_lorotext_char_at(void *ptr, uint32_t pos, + RustCallStatus *uniffi_out_err); void uniffi_loro_ffi_fn_method_lorotext_delete(void *ptr, uint32_t pos, uint32_t len, RustCallStatus *uniffi_out_err); @@ -925,6 +939,9 @@ uniffi_loro_ffi_fn_method_lorotext_splice(void *ptr, uint32_t pos, uint32_t len, RustBuffer s, RustCallStatus *uniffi_out_err); RustBuffer +uniffi_loro_ffi_fn_method_lorotext_subscribe(void *ptr, void *subscriber, + RustCallStatus *uniffi_out_err); +RustBuffer uniffi_loro_ffi_fn_method_lorotext_to_delta(void *ptr, RustCallStatus *uniffi_out_err); RustBuffer @@ -1019,6 +1036,9 @@ uniffi_loro_ffi_fn_method_lorotree_parent(void *ptr, RustBuffer target, RustBuffer uniffi_loro_ffi_fn_method_lorotree_roots(void *ptr, RustCallStatus *uniffi_out_err); +RustBuffer +uniffi_loro_ffi_fn_method_lorotree_subscribe(void *ptr, void *subscriber, + RustCallStatus *uniffi_out_err); void *uniffi_loro_ffi_fn_clone_lorounknown(void *ptr, RustCallStatus *uniffi_out_err); void uniffi_loro_ffi_fn_free_lorounknown(void *ptr, @@ -1412,6 +1432,7 @@ uint16_t uniffi_loro_ffi_checksum_method_lorocounter_id(); uint16_t uniffi_loro_ffi_checksum_method_lorocounter_increment(); uint16_t uniffi_loro_ffi_checksum_method_lorocounter_is_attached(); uint16_t uniffi_loro_ffi_checksum_method_lorocounter_is_deleted(); +uint16_t uniffi_loro_ffi_checksum_method_lorocounter_subscribe(); uint16_t uniffi_loro_ffi_checksum_method_lorodoc_apply_diff(); uint16_t uniffi_loro_ffi_checksum_method_lorodoc_attach(); uint16_t uniffi_loro_ffi_checksum_method_lorodoc_check_state_correctness_slow(); @@ -1522,6 +1543,7 @@ uint16_t uniffi_loro_ffi_checksum_method_lorolist_is_empty(); uint16_t uniffi_loro_ffi_checksum_method_lorolist_len(); uint16_t uniffi_loro_ffi_checksum_method_lorolist_pop(); uint16_t uniffi_loro_ffi_checksum_method_lorolist_push(); +uint16_t uniffi_loro_ffi_checksum_method_lorolist_subscribe(); uint16_t uniffi_loro_ffi_checksum_method_lorolist_to_vec(); uint16_t uniffi_loro_ffi_checksum_method_loromap_clear(); uint16_t uniffi_loro_ffi_checksum_method_loromap_delete(); @@ -1553,6 +1575,7 @@ uint16_t uniffi_loro_ffi_checksum_method_loromap_is_deleted(); uint16_t uniffi_loro_ffi_checksum_method_loromap_is_empty(); uint16_t uniffi_loro_ffi_checksum_method_loromap_keys(); uint16_t uniffi_loro_ffi_checksum_method_loromap_len(); +uint16_t uniffi_loro_ffi_checksum_method_loromap_subscribe(); uint16_t uniffi_loro_ffi_checksum_method_loromap_values(); uint16_t uniffi_loro_ffi_checksum_method_loromovablelist_clear(); uint16_t uniffi_loro_ffi_checksum_method_loromovablelist_delete(); @@ -1594,8 +1617,10 @@ uint16_t uniffi_loro_ffi_checksum_method_loromovablelist_set_movable_list_container(); uint16_t uniffi_loro_ffi_checksum_method_loromovablelist_set_text_container(); uint16_t uniffi_loro_ffi_checksum_method_loromovablelist_set_tree_container(); +uint16_t uniffi_loro_ffi_checksum_method_loromovablelist_subscribe(); uint16_t uniffi_loro_ffi_checksum_method_loromovablelist_to_vec(); uint16_t uniffi_loro_ffi_checksum_method_lorotext_apply_delta(); +uint16_t uniffi_loro_ffi_checksum_method_lorotext_char_at(); uint16_t uniffi_loro_ffi_checksum_method_lorotext_delete(); uint16_t uniffi_loro_ffi_checksum_method_lorotext_delete_utf8(); uint16_t uniffi_loro_ffi_checksum_method_lorotext_doc(); @@ -1616,6 +1641,7 @@ uint16_t uniffi_loro_ffi_checksum_method_lorotext_mark(); uint16_t uniffi_loro_ffi_checksum_method_lorotext_push_str(); uint16_t uniffi_loro_ffi_checksum_method_lorotext_slice(); uint16_t uniffi_loro_ffi_checksum_method_lorotext_splice(); +uint16_t uniffi_loro_ffi_checksum_method_lorotext_subscribe(); uint16_t uniffi_loro_ffi_checksum_method_lorotext_to_delta(); uint16_t uniffi_loro_ffi_checksum_method_lorotext_to_string(); uint16_t uniffi_loro_ffi_checksum_method_lorotext_unmark(); @@ -1648,6 +1674,7 @@ uint16_t uniffi_loro_ffi_checksum_method_lorotree_mov_to(); uint16_t uniffi_loro_ffi_checksum_method_lorotree_nodes(); uint16_t uniffi_loro_ffi_checksum_method_lorotree_parent(); uint16_t uniffi_loro_ffi_checksum_method_lorotree_roots(); +uint16_t uniffi_loro_ffi_checksum_method_lorotree_subscribe(); uint16_t uniffi_loro_ffi_checksum_method_lorounknown_id(); uint16_t uniffi_loro_ffi_checksum_method_lorovaluelike_as_loro_value(); uint16_t uniffi_loro_ffi_checksum_method_onpop_on_pop(); @@ -9315,6 +9342,17 @@ NativeLoro::NativeLoro( return this->cpp_uniffi_loro_ffi_fn_method_lorocounter_is_deleted( rt, thisVal, args, count); }); + props["ubrn_uniffi_loro_ffi_fn_method_lorocounter_subscribe"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_loro_ffi_fn_method_lorocounter_subscribe"), + 2, + [this](jsi::Runtime &rt, const jsi::Value &thisVal, + const jsi::Value *args, size_t count) -> jsi::Value { + return this->cpp_uniffi_loro_ffi_fn_method_lorocounter_subscribe( + rt, thisVal, args, count); + }); props["ubrn_uniffi_loro_ffi_fn_clone_lorodoc"] = jsi::Function::createFromHostFunction( rt, @@ -10611,6 +10649,17 @@ NativeLoro::NativeLoro( return this->cpp_uniffi_loro_ffi_fn_method_lorolist_push( rt, thisVal, args, count); }); + props["ubrn_uniffi_loro_ffi_fn_method_lorolist_subscribe"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_loro_ffi_fn_method_lorolist_subscribe"), + 2, + [this](jsi::Runtime &rt, const jsi::Value &thisVal, + const jsi::Value *args, size_t count) -> jsi::Value { + return this->cpp_uniffi_loro_ffi_fn_method_lorolist_subscribe( + rt, thisVal, args, count); + }); props["ubrn_uniffi_loro_ffi_fn_method_lorolist_to_vec"] = jsi::Function::createFromHostFunction( rt, @@ -10967,6 +11016,17 @@ NativeLoro::NativeLoro( return this->cpp_uniffi_loro_ffi_fn_method_loromap_len(rt, thisVal, args, count); }); + props["ubrn_uniffi_loro_ffi_fn_method_loromap_subscribe"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_loro_ffi_fn_method_loromap_subscribe"), + 2, + [this](jsi::Runtime &rt, const jsi::Value &thisVal, + const jsi::Value *args, size_t count) -> jsi::Value { + return this->cpp_uniffi_loro_ffi_fn_method_loromap_subscribe( + rt, thisVal, args, count); + }); props["ubrn_uniffi_loro_ffi_fn_method_loromap_values"] = jsi::Function::createFromHostFunction( rt, @@ -11400,6 +11460,18 @@ NativeLoro::NativeLoro( ->cpp_uniffi_loro_ffi_fn_method_loromovablelist_set_tree_container( rt, thisVal, args, count); }); + props["ubrn_uniffi_loro_ffi_fn_method_loromovablelist_subscribe"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_loro_ffi_fn_method_loromovablelist_subscribe"), + 2, + [this](jsi::Runtime &rt, const jsi::Value &thisVal, + const jsi::Value *args, size_t count) -> jsi::Value { + return this + ->cpp_uniffi_loro_ffi_fn_method_loromovablelist_subscribe( + rt, thisVal, args, count); + }); props["ubrn_uniffi_loro_ffi_fn_method_loromovablelist_to_vec"] = jsi::Function::createFromHostFunction( rt, @@ -11455,6 +11527,17 @@ NativeLoro::NativeLoro( return this->cpp_uniffi_loro_ffi_fn_method_lorotext_apply_delta( rt, thisVal, args, count); }); + props["ubrn_uniffi_loro_ffi_fn_method_lorotext_char_at"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_loro_ffi_fn_method_lorotext_char_at"), + 2, + [this](jsi::Runtime &rt, const jsi::Value &thisVal, + const jsi::Value *args, size_t count) -> jsi::Value { + return this->cpp_uniffi_loro_ffi_fn_method_lorotext_char_at( + rt, thisVal, args, count); + }); props["ubrn_uniffi_loro_ffi_fn_method_lorotext_delete"] = jsi::Function::createFromHostFunction( rt, @@ -11677,6 +11760,17 @@ NativeLoro::NativeLoro( return this->cpp_uniffi_loro_ffi_fn_method_lorotext_splice( rt, thisVal, args, count); }); + props["ubrn_uniffi_loro_ffi_fn_method_lorotext_subscribe"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_loro_ffi_fn_method_lorotext_subscribe"), + 2, + [this](jsi::Runtime &rt, const jsi::Value &thisVal, + const jsi::Value *args, size_t count) -> jsi::Value { + return this->cpp_uniffi_loro_ffi_fn_method_lorotext_subscribe( + rt, thisVal, args, count); + }); props["ubrn_uniffi_loro_ffi_fn_method_lorotext_to_delta"] = jsi::Function::createFromHostFunction( rt, @@ -12069,6 +12163,17 @@ NativeLoro::NativeLoro( return this->cpp_uniffi_loro_ffi_fn_method_lorotree_roots( rt, thisVal, args, count); }); + props["ubrn_uniffi_loro_ffi_fn_method_lorotree_subscribe"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_loro_ffi_fn_method_lorotree_subscribe"), + 2, + [this](jsi::Runtime &rt, const jsi::Value &thisVal, + const jsi::Value *args, size_t count) -> jsi::Value { + return this->cpp_uniffi_loro_ffi_fn_method_lorotree_subscribe( + rt, thisVal, args, count); + }); props["ubrn_uniffi_loro_ffi_fn_clone_lorounknown"] = jsi::Function::createFromHostFunction( rt, @@ -13733,6 +13838,18 @@ NativeLoro::NativeLoro( ->cpp_uniffi_loro_ffi_checksum_method_lorocounter_is_deleted( rt, thisVal, args, count); }); + props["ubrn_uniffi_loro_ffi_checksum_method_lorocounter_subscribe"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_loro_ffi_checksum_method_lorocounter_subscribe"), + 0, + [this](jsi::Runtime &rt, const jsi::Value &thisVal, + const jsi::Value *args, size_t count) -> jsi::Value { + return this + ->cpp_uniffi_loro_ffi_checksum_method_lorocounter_subscribe( + rt, thisVal, args, count); + }); props["ubrn_uniffi_loro_ffi_checksum_method_lorodoc_apply_diff"] = jsi::Function::createFromHostFunction( rt, @@ -14987,6 +15104,17 @@ NativeLoro::NativeLoro( return this->cpp_uniffi_loro_ffi_checksum_method_lorolist_push( rt, thisVal, args, count); }); + props["ubrn_uniffi_loro_ffi_checksum_method_lorolist_subscribe"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_loro_ffi_checksum_method_lorolist_subscribe"), + 0, + [this](jsi::Runtime &rt, const jsi::Value &thisVal, + const jsi::Value *args, size_t count) -> jsi::Value { + return this->cpp_uniffi_loro_ffi_checksum_method_lorolist_subscribe( + rt, thisVal, args, count); + }); props["ubrn_uniffi_loro_ffi_checksum_method_lorolist_to_vec"] = jsi::Function::createFromHostFunction( rt, @@ -15314,6 +15442,17 @@ NativeLoro::NativeLoro( return this->cpp_uniffi_loro_ffi_checksum_method_loromap_len( rt, thisVal, args, count); }); + props["ubrn_uniffi_loro_ffi_checksum_method_loromap_subscribe"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_loro_ffi_checksum_method_loromap_subscribe"), + 0, + [this](jsi::Runtime &rt, const jsi::Value &thisVal, + const jsi::Value *args, size_t count) -> jsi::Value { + return this->cpp_uniffi_loro_ffi_checksum_method_loromap_subscribe( + rt, thisVal, args, count); + }); props["ubrn_uniffi_loro_ffi_checksum_method_loromap_values"] = jsi::Function::createFromHostFunction( rt, @@ -15726,6 +15865,19 @@ NativeLoro::NativeLoro( ->cpp_uniffi_loro_ffi_checksum_method_loromovablelist_set_tree_container( rt, thisVal, args, count); }); + props["ubrn_uniffi_loro_ffi_checksum_method_loromovablelist_subscribe"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, + "ubrn_uniffi_loro_ffi_checksum_method_loromovablelist_subscribe"), + 0, + [this](jsi::Runtime &rt, const jsi::Value &thisVal, + const jsi::Value *args, size_t count) -> jsi::Value { + return this + ->cpp_uniffi_loro_ffi_checksum_method_loromovablelist_subscribe( + rt, thisVal, args, count); + }); props["ubrn_uniffi_loro_ffi_checksum_method_loromovablelist_to_vec"] = jsi::Function::createFromHostFunction( rt, @@ -15751,6 +15903,17 @@ NativeLoro::NativeLoro( ->cpp_uniffi_loro_ffi_checksum_method_lorotext_apply_delta( rt, thisVal, args, count); }); + props["ubrn_uniffi_loro_ffi_checksum_method_lorotext_char_at"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_loro_ffi_checksum_method_lorotext_char_at"), + 0, + [this](jsi::Runtime &rt, const jsi::Value &thisVal, + const jsi::Value *args, size_t count) -> jsi::Value { + return this->cpp_uniffi_loro_ffi_checksum_method_lorotext_char_at( + rt, thisVal, args, count); + }); props["ubrn_uniffi_loro_ffi_checksum_method_lorotext_delete"] = jsi::Function::createFromHostFunction( rt, @@ -15980,6 +16143,17 @@ NativeLoro::NativeLoro( return this->cpp_uniffi_loro_ffi_checksum_method_lorotext_splice( rt, thisVal, args, count); }); + props["ubrn_uniffi_loro_ffi_checksum_method_lorotext_subscribe"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_loro_ffi_checksum_method_lorotext_subscribe"), + 0, + [this](jsi::Runtime &rt, const jsi::Value &thisVal, + const jsi::Value *args, size_t count) -> jsi::Value { + return this->cpp_uniffi_loro_ffi_checksum_method_lorotext_subscribe( + rt, thisVal, args, count); + }); props["ubrn_uniffi_loro_ffi_checksum_method_lorotext_to_delta"] = jsi::Function::createFromHostFunction( rt, @@ -16349,6 +16523,17 @@ NativeLoro::NativeLoro( return this->cpp_uniffi_loro_ffi_checksum_method_lorotree_roots( rt, thisVal, args, count); }); + props["ubrn_uniffi_loro_ffi_checksum_method_lorotree_subscribe"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_loro_ffi_checksum_method_lorotree_subscribe"), + 0, + [this](jsi::Runtime &rt, const jsi::Value &thisVal, + const jsi::Value *args, size_t count) -> jsi::Value { + return this->cpp_uniffi_loro_ffi_checksum_method_lorotree_subscribe( + rt, thisVal, args, count); + }); props["ubrn_uniffi_loro_ffi_checksum_method_lorounknown_id"] = jsi::Function::createFromHostFunction( rt, @@ -19744,6 +19929,19 @@ jsi::Value NativeLoro::cpp_uniffi_loro_ffi_fn_method_lorocounter_is_deleted( return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } +jsi::Value NativeLoro::cpp_uniffi_loro_ffi_fn_method_lorocounter_subscribe( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + RustCallStatus status = + uniffi::loro::Bridging::rustSuccess(rt); + auto value = uniffi_loro_ffi_fn_method_lorocounter_subscribe( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[1]), &status); + uniffi::loro::Bridging::copyIntoJs(rt, callInvoker, status, + args[count - 1]); + + return uniffi::loro::Bridging::toJs(rt, callInvoker, value); +} jsi::Value NativeLoro::cpp_uniffi_loro_ffi_fn_clone_lorodoc( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { @@ -21235,6 +21433,19 @@ jsi::Value NativeLoro::cpp_uniffi_loro_ffi_fn_method_lorolist_push( return jsi::Value::undefined(); } +jsi::Value NativeLoro::cpp_uniffi_loro_ffi_fn_method_lorolist_subscribe( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + RustCallStatus status = + uniffi::loro::Bridging::rustSuccess(rt); + auto value = uniffi_loro_ffi_fn_method_lorolist_subscribe( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[1]), &status); + uniffi::loro::Bridging::copyIntoJs(rt, callInvoker, status, + args[count - 1]); + + return uniffi::loro::Bridging::toJs(rt, callInvoker, value); +} jsi::Value NativeLoro::cpp_uniffi_loro_ffi_fn_method_lorolist_to_vec( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { @@ -21654,6 +21865,19 @@ jsi::Value NativeLoro::cpp_uniffi_loro_ffi_fn_method_loromap_len( return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } +jsi::Value NativeLoro::cpp_uniffi_loro_ffi_fn_method_loromap_subscribe( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + RustCallStatus status = + uniffi::loro::Bridging::rustSuccess(rt); + auto value = uniffi_loro_ffi_fn_method_loromap_subscribe( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[1]), &status); + uniffi::loro::Bridging::copyIntoJs(rt, callInvoker, status, + args[count - 1]); + + return uniffi::loro::Bridging::toJs(rt, callInvoker, value); +} jsi::Value NativeLoro::cpp_uniffi_loro_ffi_fn_method_loromap_values( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { @@ -22167,6 +22391,19 @@ NativeLoro::cpp_uniffi_loro_ffi_fn_method_loromovablelist_set_tree_container( return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } +jsi::Value NativeLoro::cpp_uniffi_loro_ffi_fn_method_loromovablelist_subscribe( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + RustCallStatus status = + uniffi::loro::Bridging::rustSuccess(rt); + auto value = uniffi_loro_ffi_fn_method_loromovablelist_subscribe( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[1]), &status); + uniffi::loro::Bridging::copyIntoJs(rt, callInvoker, status, + args[count - 1]); + + return uniffi::loro::Bridging::toJs(rt, callInvoker, value); +} jsi::Value NativeLoro::cpp_uniffi_loro_ffi_fn_method_loromovablelist_to_vec( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { @@ -22228,6 +22465,20 @@ jsi::Value NativeLoro::cpp_uniffi_loro_ffi_fn_method_lorotext_apply_delta( return jsi::Value::undefined(); } +jsi::Value NativeLoro::cpp_uniffi_loro_ffi_fn_method_lorotext_char_at( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + RustCallStatus status = + uniffi::loro::Bridging::rustSuccess(rt); + auto value = uniffi_loro_ffi_fn_method_lorotext_char_at( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[1]), + &status); + uniffi::loro::Bridging::copyIntoJs(rt, callInvoker, status, + args[count - 1]); + + return uniffi::loro::Bridging::toJs(rt, callInvoker, value); +} jsi::Value NativeLoro::cpp_uniffi_loro_ffi_fn_method_lorotext_delete( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { @@ -22500,6 +22751,19 @@ jsi::Value NativeLoro::cpp_uniffi_loro_ffi_fn_method_lorotext_splice( return uniffi::loro::Bridging::toJs(rt, callInvoker, value); } +jsi::Value NativeLoro::cpp_uniffi_loro_ffi_fn_method_lorotext_subscribe( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + RustCallStatus status = + uniffi::loro::Bridging::rustSuccess(rt); + auto value = uniffi_loro_ffi_fn_method_lorotext_subscribe( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[1]), &status); + uniffi::loro::Bridging::copyIntoJs(rt, callInvoker, status, + args[count - 1]); + + return uniffi::loro::Bridging::toJs(rt, callInvoker, value); +} jsi::Value NativeLoro::cpp_uniffi_loro_ffi_fn_method_lorotext_to_delta( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { @@ -22970,6 +23234,19 @@ jsi::Value NativeLoro::cpp_uniffi_loro_ffi_fn_method_lorotree_roots( return uniffi::loro::Bridging::toJs(rt, callInvoker, value); } +jsi::Value NativeLoro::cpp_uniffi_loro_ffi_fn_method_lorotree_subscribe( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + RustCallStatus status = + uniffi::loro::Bridging::rustSuccess(rt); + auto value = uniffi_loro_ffi_fn_method_lorotree_subscribe( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[1]), &status); + uniffi::loro::Bridging::copyIntoJs(rt, callInvoker, status, + args[count - 1]); + + return uniffi::loro::Bridging::toJs(rt, callInvoker, value); +} jsi::Value NativeLoro::cpp_uniffi_loro_ffi_fn_clone_lorounknown( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { @@ -24562,6 +24839,14 @@ NativeLoro::cpp_uniffi_loro_ffi_checksum_method_lorocounter_is_deleted( return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } +jsi::Value +NativeLoro::cpp_uniffi_loro_ffi_checksum_method_lorocounter_subscribe( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_loro_ffi_checksum_method_lorocounter_subscribe(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} jsi::Value NativeLoro::cpp_uniffi_loro_ffi_checksum_method_lorodoc_apply_diff( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { @@ -25379,6 +25664,13 @@ jsi::Value NativeLoro::cpp_uniffi_loro_ffi_checksum_method_lorolist_push( return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } +jsi::Value NativeLoro::cpp_uniffi_loro_ffi_checksum_method_lorolist_subscribe( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_loro_ffi_checksum_method_lorolist_subscribe(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} jsi::Value NativeLoro::cpp_uniffi_loro_ffi_checksum_method_lorolist_to_vec( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { @@ -25597,6 +25889,13 @@ jsi::Value NativeLoro::cpp_uniffi_loro_ffi_checksum_method_loromap_len( return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } +jsi::Value NativeLoro::cpp_uniffi_loro_ffi_checksum_method_loromap_subscribe( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_loro_ffi_checksum_method_loromap_subscribe(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} jsi::Value NativeLoro::cpp_uniffi_loro_ffi_checksum_method_loromap_values( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { @@ -25875,6 +26174,14 @@ jsi::Value NativeLoro:: return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value +NativeLoro::cpp_uniffi_loro_ffi_checksum_method_loromovablelist_subscribe( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_loro_ffi_checksum_method_loromovablelist_subscribe(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} +jsi::Value NativeLoro::cpp_uniffi_loro_ffi_checksum_method_loromovablelist_to_vec( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { @@ -25889,6 +26196,13 @@ jsi::Value NativeLoro::cpp_uniffi_loro_ffi_checksum_method_lorotext_apply_delta( return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } +jsi::Value NativeLoro::cpp_uniffi_loro_ffi_checksum_method_lorotext_char_at( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_loro_ffi_checksum_method_lorotext_char_at(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} jsi::Value NativeLoro::cpp_uniffi_loro_ffi_checksum_method_lorotext_delete( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { @@ -26033,6 +26347,13 @@ jsi::Value NativeLoro::cpp_uniffi_loro_ffi_checksum_method_lorotext_splice( return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } +jsi::Value NativeLoro::cpp_uniffi_loro_ffi_checksum_method_lorotext_subscribe( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_loro_ffi_checksum_method_lorotext_subscribe(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} jsi::Value NativeLoro::cpp_uniffi_loro_ffi_checksum_method_lorotext_to_delta( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { @@ -26270,6 +26591,13 @@ jsi::Value NativeLoro::cpp_uniffi_loro_ffi_checksum_method_lorotree_roots( return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } +jsi::Value NativeLoro::cpp_uniffi_loro_ffi_checksum_method_lorotree_subscribe( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_loro_ffi_checksum_method_lorotree_subscribe(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} jsi::Value NativeLoro::cpp_uniffi_loro_ffi_checksum_method_lorounknown_id( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { diff --git a/cpp/generated/loro.hpp b/cpp/generated/loro.hpp index 668809b..f57c6bd 100644 --- a/cpp/generated/loro.hpp +++ b/cpp/generated/loro.hpp @@ -311,6 +311,9 @@ class NativeLoro : public jsi::HostObject { jsi::Value cpp_uniffi_loro_ffi_fn_method_lorocounter_is_deleted( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); + jsi::Value cpp_uniffi_loro_ffi_fn_method_lorocounter_subscribe( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); jsi::Value cpp_uniffi_loro_ffi_fn_clone_lorodoc(jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, @@ -655,6 +658,9 @@ class NativeLoro : public jsi::HostObject { jsi::Value cpp_uniffi_loro_ffi_fn_method_lorolist_push( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); + jsi::Value cpp_uniffi_loro_ffi_fn_method_lorolist_subscribe( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); jsi::Value cpp_uniffi_loro_ffi_fn_method_lorolist_to_vec( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); @@ -754,6 +760,9 @@ class NativeLoro : public jsi::HostObject { jsi::Value cpp_uniffi_loro_ffi_fn_method_loromap_len( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); + jsi::Value cpp_uniffi_loro_ffi_fn_method_loromap_subscribe( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); jsi::Value cpp_uniffi_loro_ffi_fn_method_loromap_values( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); @@ -872,6 +881,9 @@ class NativeLoro : public jsi::HostObject { jsi::Value cpp_uniffi_loro_ffi_fn_method_loromovablelist_set_tree_container( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); + jsi::Value cpp_uniffi_loro_ffi_fn_method_loromovablelist_subscribe( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); jsi::Value cpp_uniffi_loro_ffi_fn_method_loromovablelist_to_vec( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); @@ -889,6 +901,9 @@ class NativeLoro : public jsi::HostObject { jsi::Value cpp_uniffi_loro_ffi_fn_method_lorotext_apply_delta( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); + jsi::Value cpp_uniffi_loro_ffi_fn_method_lorotext_char_at( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); jsi::Value cpp_uniffi_loro_ffi_fn_method_lorotext_delete( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); @@ -949,6 +964,9 @@ class NativeLoro : public jsi::HostObject { jsi::Value cpp_uniffi_loro_ffi_fn_method_lorotext_splice( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); + jsi::Value cpp_uniffi_loro_ffi_fn_method_lorotext_subscribe( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); jsi::Value cpp_uniffi_loro_ffi_fn_method_lorotext_to_delta( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); @@ -1056,6 +1074,9 @@ class NativeLoro : public jsi::HostObject { jsi::Value cpp_uniffi_loro_ffi_fn_method_lorotree_roots( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); + jsi::Value cpp_uniffi_loro_ffi_fn_method_lorotree_subscribe( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); jsi::Value cpp_uniffi_loro_ffi_fn_clone_lorounknown(jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, @@ -1509,6 +1530,9 @@ class NativeLoro : public jsi::HostObject { jsi::Value cpp_uniffi_loro_ffi_checksum_method_lorocounter_is_deleted( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); + jsi::Value cpp_uniffi_loro_ffi_checksum_method_lorocounter_subscribe( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); jsi::Value cpp_uniffi_loro_ffi_checksum_method_lorodoc_apply_diff( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); @@ -1843,6 +1867,9 @@ class NativeLoro : public jsi::HostObject { jsi::Value cpp_uniffi_loro_ffi_checksum_method_lorolist_push( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); + jsi::Value cpp_uniffi_loro_ffi_checksum_method_lorolist_subscribe( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); jsi::Value cpp_uniffi_loro_ffi_checksum_method_lorolist_to_vec( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); @@ -1935,6 +1962,9 @@ class NativeLoro : public jsi::HostObject { jsi::Value cpp_uniffi_loro_ffi_checksum_method_loromap_len( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); + jsi::Value cpp_uniffi_loro_ffi_checksum_method_loromap_subscribe( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); jsi::Value cpp_uniffi_loro_ffi_checksum_method_loromap_values( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); @@ -2051,12 +2081,18 @@ class NativeLoro : public jsi::HostObject { cpp_uniffi_loro_ffi_checksum_method_loromovablelist_set_tree_container( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); + jsi::Value cpp_uniffi_loro_ffi_checksum_method_loromovablelist_subscribe( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); jsi::Value cpp_uniffi_loro_ffi_checksum_method_loromovablelist_to_vec( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value cpp_uniffi_loro_ffi_checksum_method_lorotext_apply_delta( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); + jsi::Value cpp_uniffi_loro_ffi_checksum_method_lorotext_char_at( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); jsi::Value cpp_uniffi_loro_ffi_checksum_method_lorotext_delete( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); @@ -2118,6 +2154,9 @@ class NativeLoro : public jsi::HostObject { jsi::Value cpp_uniffi_loro_ffi_checksum_method_lorotext_splice( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); + jsi::Value cpp_uniffi_loro_ffi_checksum_method_lorotext_subscribe( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); jsi::Value cpp_uniffi_loro_ffi_checksum_method_lorotext_to_delta( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); @@ -2217,6 +2256,9 @@ class NativeLoro : public jsi::HostObject { jsi::Value cpp_uniffi_loro_ffi_checksum_method_lorotree_roots( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); + jsi::Value cpp_uniffi_loro_ffi_checksum_method_lorotree_subscribe( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); jsi::Value cpp_uniffi_loro_ffi_checksum_method_lorounknown_id( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 72d55c6..b0d39ec 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -8,7 +8,7 @@ PODS: - hermes-engine (0.79.2): - hermes-engine/Pre-built (= 0.79.2) - hermes-engine/Pre-built (0.79.2) - - loro-react-native (1.5.0-alpha.5): + - loro-react-native (1.5.0): - DoubleConversion - glog - hermes-engine @@ -1917,73 +1917,73 @@ SPEC CHECKSUMS: fmt: a40bb5bd0294ea969aaaba240a927bd33d878cdd glog: 5683914934d5b6e4240e497e0f4a3b42d1854183 hermes-engine: 314be5250afa5692b57b4dd1705959e1973a8ebe - loro-react-native: 2dbd52290bfb19fb07351c1f3de950889d67ffd8 + loro-react-native: bdefaefce31f86a66009f3521ae2d1e2b952441d RCT-Folly: 36fe2295e44b10d831836cc0d1daec5f8abcf809 RCTDeprecation: 83ffb90c23ee5cea353bd32008a7bca100908f8c RCTRequired: eb7c0aba998009f47a540bec9e9d69a54f68136e RCTTypeSafety: 659ae318c09de0477fd27bbc9e140071c7ea5c93 React: c2d3aa44c49bb34e4dfd49d3ee92da5ebacc1c1c React-callinvoker: 1bdfb7549b5af266d85757193b5069f60659ef9d - React-Core: 10597593fdbae06f0089881e025a172e51d4a769 - React-CoreModules: 6907b255529dd46895cf687daa67b24484a612c2 - React-cxxreact: a9f5b8180d6955bc3f6a3fcd657c4d9b4d95c1f6 + React-Core: 7150cf9b6a5af063b37003062689f1691e79c020 + React-CoreModules: 15a85e6665d61678942da6ae485b351f4c699049 + React-cxxreact: 74f9de59259ac951923f5726aa14f0398f167af9 React-debug: e74e76912b91e08d580c481c34881899ccf63da9 - React-defaultsnativemodule: 11f6ee2cf69bf3af9d0f28a6253def33d21b5266 - React-domnativemodule: f940bbc4fa9e134190acbf3a4a9f95621b5a8f51 - React-Fabric: 6f5c357bf3a42ff11f8844ad3fc7a1eb04f4b9de - React-FabricComponents: 10e0c0209822ac9e69412913a8af1ca33573379b - React-FabricImage: f582e764072dfa4715ae8c42979a5bace9cbcc12 + React-defaultsnativemodule: 628285212bbd65417d40ad6a9f8781830fda6c98 + React-domnativemodule: 185d9808198405c176784aaf33403d713bd24fb7 + React-Fabric: c814804affbe1952e16149ddd20256e1bccae67e + React-FabricComponents: 81ef47d596966121784afec9924f9562a29b1691 + React-FabricImage: f14f371d678aa557101def954ac3ba27e48948ff React-featureflags: d5facceff8f8f6de430e0acecf4979a9a0839ba9 - React-featureflagsnativemodule: a7dd141f1ef4b7c1331af0035689fbc742a49ff4 - React-graphics: 36ae3407172c1c77cea29265d2b12b90aaef6aa0 - React-hermes: 9116d4e6d07abeb519a2852672de087f44da8f12 - React-idlecallbacksnativemodule: ae7f5ffc6cf2d2058b007b78248e5b08172ad5c3 - React-ImageManager: 9daee0dc99ad6a001d4b9e691fbf37107e2b7b54 - React-jserrorhandler: 1e6211581071edaf4ecd5303147328120c73f4dc - React-jsi: 753ba30c902f3a41fa7f956aca8eea3317a44ee6 - React-jsiexecutor: 47520714aa7d9589c51c0f3713dfbfca4895d4f9 - React-jsinspector: cfd27107f6d6f1076a57d88c932401251560fe5f - React-jsinspectortracing: 76a7d791f3c0c09a0d2bf6f46dfb0e79a4fcc0ac - React-jsitooling: 995e826570dd58f802251490486ebd3244a037ab - React-jsitracing: 094ae3d8c123cea67b50211c945b7c0443d3e97b - React-logger: 8edfcedc100544791cd82692ca5a574240a16219 - React-Mapbuffer: c3f4b608e4a59dd2f6a416ef4d47a14400194468 - React-microtasksnativemodule: 054f34e9b82f02bd40f09cebd4083828b5b2beb6 - React-NativeModulesApple: 2c4377e139522c3d73f5df582e4f051a838ff25e + React-featureflagsnativemodule: 96f0ab285382d95c90f663e02526a5ceefa95a11 + React-graphics: 1a66ee0a3f093b125b853f6370296fadcaf6f233 + React-hermes: 8b86e5f54a65ecb69cdf22b3a00a11562eda82d2 + React-idlecallbacksnativemodule: 5c25ab145c602264d00cb26a397ab52e0efa031c + React-ImageManager: 15e34bd5ef1ac4a18e96660817ef70a7f99ee8c2 + React-jserrorhandler: 02cdf2cd45350108be1ffd2b164578936dbbdff7 + React-jsi: 6af1987cfbb1b6621664fdbf6c7b62bd4d38c923 + React-jsiexecutor: 51f372998e0303585cb0317232b938d694663cbd + React-jsinspector: 3539ad976d073bfaa8a7d2fa9bef35e70e55033e + React-jsinspectortracing: e8dbacaf67c201f23052ca1c2bae2f7b84dec443 + React-jsitooling: 95a34f41e3c249d42181de13b4f8d854f178ca9f + React-jsitracing: 25b029cf5cad488252d46da19dd8c4c134fd5fe4 + React-logger: 368570a253f00879a1e4fea24ed4047e72e7bbf3 + React-Mapbuffer: c04fcda1c6281fc0a6824c7dcc1633dd217ac1ec + React-microtasksnativemodule: ca2804a25fdcefffa0aa942aa23ab53b99614a34 + React-NativeModulesApple: 452b86b29fae99ed0a4015dca3ad9cd222f88abf React-oscompat: ef5df1c734f19b8003e149317d041b8ce1f7d29c - React-perflogger: 9a151e0b4c933c9205fd648c246506a83f31395d - React-performancetimeline: 5b0dfc0acba29ea0269ddb34cd6dd59d3b8a1c66 + React-perflogger: 6fd2f6811533e9c19a61e855c3033eecbf4ad2a0 + React-performancetimeline: abf31259d794c9274b3ea19c5016186925eec6c4 React-RCTActionSheet: a499b0d6d9793886b67ba3e16046a3fef2cdbbc3 - React-RCTAnimation: cc64adc259aabc3354b73065e2231d796dfce576 - React-RCTAppDelegate: 9d523da768f1c9e84c5f3b7e3624d097dfb0e16b - React-RCTBlob: e727f53eeefded7e6432eb76bd22b57bc880e5d1 - React-RCTFabric: 58590aa4fdb4ad546c06a7449b486cf6844e991f - React-RCTFBReactNativeSpec: 9064c63d99e467a3893e328ba3612745c3c3a338 - React-RCTImage: 7159cbdbb18a09d97ba1a611416eced75b3ccb29 - React-RCTLinking: 46293afdb859bccc63e1d3dedc6901a3c04ef360 - React-RCTNetwork: 4a6cd18f5bcd0363657789c64043123a896b1170 - React-RCTRuntime: 5ab904fd749aa52f267ef771d265612582a17880 - React-RCTSettings: 61e361dc85136d1cb0e148b7541993d2ee950ea7 - React-RCTText: abd1e196c3167175e6baef18199c6d9d8ac54b4e - React-RCTVibration: 490e0dcb01a3fe4a0dfb7bc51ad5856d8b84f343 + React-RCTAnimation: 2595dcb10a82216a511b54742f8c28d793852ac6 + React-RCTAppDelegate: f03604b70f57c9469a84a159d8abecf793a5bcff + React-RCTBlob: e00f9b4e2f151938f4d9864cf33ebf24ac03328a + React-RCTFabric: 3945d116fd271598db262d4e6ed5691d431ed9e8 + React-RCTFBReactNativeSpec: 0f4d4f0da938101f2ca9d5333a8f46e527ad2819 + React-RCTImage: dac5e9f8ec476aefe6e60ee640ebc1dfaf1a4dbe + React-RCTLinking: 494b785a40d952a1dfbe712f43214376e5f0e408 + React-RCTNetwork: b3d7c30cd21793e268db107dd0980cb61b3c1c44 + React-RCTRuntime: a8ff419d437228e7b8a793b14f9d711e1cbb82af + React-RCTSettings: a060c7e381a3896104761b8eed7e284d95e37df3 + React-RCTText: 4f272b72dbb61f390d8c8274528f9fdbff983806 + React-RCTVibration: 0e5326220719aca12473d703aa46693e3b4ce67a React-rendererconsistency: 351fdbc5c1fe4da24243d939094a80f0e149c7a1 - React-renderercss: 3438814bee838ae7840a633ab085ac81699fd5cf - React-rendererdebug: 0ac2b9419ad6f88444f066d4b476180af311fb1e + React-renderercss: d333f2ada83969591100d91ec6b23ca2e17e1507 + React-rendererdebug: 039e5949b72ba63c703de020701e3fd152434c61 React-rncore: 57ed480649bb678d8bdc386d20fee8bf2b0c307c - React-RuntimeApple: 8b7a9788f31548298ba1990620fe06b40de65ad7 - React-RuntimeCore: e03d96fbd57ce69fd9bca8c925942194a5126dbc + React-RuntimeApple: 344a5e1105256000afabaa8df12c3e4cab880340 + React-RuntimeCore: 0e48fb5e5160acc0334c7a723a42d42cef4b58b6 React-runtimeexecutor: d60846710facedd1edb70c08b738119b3ee2c6c2 - React-RuntimeHermes: aab794755d9f6efd249b61f3af4417296904e3ba - React-runtimescheduler: c3cd124fa5db7c37f601ee49ca0d97019acd8788 + React-RuntimeHermes: 064286a03871d932c99738e0f8ef854962ab4b99 + React-runtimescheduler: e917ab17ae08c204af1ebf8f669b7e411b0220c8 React-timing: a90f4654cbda9c628614f9bee68967f1768bd6a5 - React-utils: a612d50555b6f0f90c74b7d79954019ad47f5de6 - ReactAppDependencyProvider: 04d5eb15eb46be6720e17a4a7fa92940a776e584 - ReactCodegen: 0d60a2f57ada297a8e66b512ef5c92227a475e72 - ReactCommon: 76d2dc87136d0a667678668b86f0fca0c16fdeb0 + React-utils: 51c4e71608b8133fecc9a15801d244ae7bdf3758 + ReactAppDependencyProvider: d5dcc564f129632276bd3184e60f053fcd574d6b + ReactCodegen: b9c6802762046e8000655cee5ba22f6422620f03 + ReactCommon: 4d0da92a5eb8da86c08e3ec34bd23ab439fb2461 SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748 uniffi-bindgen-react-native: 018090e6c342b31e1189eb4d098860e9d44caa86 Yoga: c758bfb934100bb4bf9cbaccb52557cee35e8bdf PODFILE CHECKSUM: a5ca260180a96f18394d1d29176689cad6469ad8 -COCOAPODS: 1.15.2 +COCOAPODS: 1.16.2 diff --git a/example/src/App.tsx b/example/src/App.tsx index 7d441a9..eabadc8 100644 --- a/example/src/App.tsx +++ b/example/src/App.tsx @@ -8,22 +8,18 @@ import { type LoroValueLike, loroValueToJsValue, } from "../../src"; -String.prototype.asContainerId = function (ty: ContainerType): ContainerId { - return new ContainerId.Root({ - name: this as string, - containerType: ty, - }); -}; + export default function App() { const doc = new LoroDoc(); const sub = doc.subscribeRoot((e) => { - console.log(e); + console.log("doc sub", e); }); const text = doc.getText("text"); text.insert(0, "Hello, world!"); const map = doc.getMap("map"); const list = map.insertContainer("container", new LoroList()); list.insert(0, true); + map.subscribe((e) => { console.log("map sub", e) }) list.insert(1, 123); map.insert("number", 123); map.insert("bool", true); diff --git a/loro-ffi b/loro-ffi deleted file mode 160000 index 42dfaec..0000000 --- a/loro-ffi +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 42dfaec19b1b08e16f20d561a0eee643c1f09b02 diff --git a/loro-react-native.podspec b/loro-react-native.podspec index fa7c4ec..a650a75 100644 --- a/loro-react-native.podspec +++ b/loro-react-native.podspec @@ -16,7 +16,7 @@ Pod::Spec.new do |s| s.source = { :git => "https://github.com/Leeeon233/loro-react-native.git", :tag => "#{s.version}" } s.source_files = "ios/**/*.{h,m,mm,swift}", "ios/generated/**/*.{h,m,mm}", "cpp/**/*.{hpp,cpp,c,h}", "cpp/generated/**/*.{hpp,cpp,c,h}" - s.vendored_frameworks = "build/RustFramework.xcframework" + s.vendored_frameworks = "build/LoroFfiFramework.xcframework" s.dependency "uniffi-bindgen-react-native", "0.28.3-5" # Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0. diff --git a/loro-rs/Cargo.lock b/loro-rs/Cargo.lock new file mode 100644 index 0000000..63b64c3 --- /dev/null +++ b/loro-rs/Cargo.lock @@ -0,0 +1,2049 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "ahash" +version = "0.8.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" +dependencies = [ + "cfg-if", + "getrandom 0.3.3", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + +[[package]] +name = "anstream" +version = "0.6.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "301af1932e46185686725e0fad2f8f2aa7da69dd70bf6ecc44d6b703844a3933" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "862ed96ca487e809f1c8e5a8447f6ee2cf102f846893800b20cebdf541fc6bbd" + +[[package]] +name = "anstyle-parse" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c8bdeb6047d8983be085bab0ba1472e6dc604e7041dbf6fcd5e71523014fae9" +dependencies = [ + "windows-sys", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "403f75924867bb1033c59fbf0797484329750cfbe3c4325cd33127941fabc882" +dependencies = [ + "anstyle", + "once_cell_polyfill", + "windows-sys", +] + +[[package]] +name = "anyhow" +version = "1.0.98" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" + +[[package]] +name = "append-only-bytes" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac436601d6bdde674a0d7fb593e829ffe7b3387c351b356dd20e2d40f5bf3ee5" + +[[package]] +name = "arbitrary" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dde20b3d026af13f561bdd0f15edf01fc734f0dafcedbaf42bba506a9517f223" +dependencies = [ + "derive_arbitrary", +] + +[[package]] +name = "arrayvec" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" + +[[package]] +name = "arref" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ccd462b64c3c72f1be8305905a85d85403d768e8690c9b8bd3b9009a5761679" + +[[package]] +name = "askama" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b79091df18a97caea757e28cd2d5fda49c6cd4bd01ddffd7ff01ace0c0ad2c28" +dependencies = [ + "askama_derive", + "askama_escape", +] + +[[package]] +name = "askama_derive" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19fe8d6cb13c4714962c072ea496f3392015f0989b1a2847bb4b2d9effd71d83" +dependencies = [ + "askama_parser", + "basic-toml", + "mime", + "mime_guess", + "proc-macro2", + "quote", + "serde", + "syn 2.0.103", +] + +[[package]] +name = "askama_escape" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "619743e34b5ba4e9703bba34deac3427c72507c7159f5fd030aea8cac0cfe341" + +[[package]] +name = "askama_parser" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acb1161c6b64d1c3d83108213c2a2533a342ac225aabd0bda218278c2ddb00c0" +dependencies = [ + "nom", +] + +[[package]] +name = "atomic-polyfill" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8cf2bce30dfe09ef0bfaef228b9d414faaf7e563035494d7fe092dba54b300f4" +dependencies = [ + "critical-section", +] + +[[package]] +name = "autocfg" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" + +[[package]] +name = "basic-toml" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba62675e8242a4c4e806d12f11d136e626e6c8361d6b829310732241652a178a" +dependencies = [ + "serde", +] + +[[package]] +name = "bincode" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +dependencies = [ + "serde", +] + +[[package]] +name = "bitflags" +version = "2.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" + +[[package]] +name = "bitmaps" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "031043d04099746d8db04daf1fa424b2bc8bd69d92b25962dcde24da39ab64a2" +dependencies = [ + "typenum", +] + +[[package]] +name = "bumpalo" +version = "3.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db76d6187cd04dff33004d8e6c9cc4e05cd330500379d2394209271b4aeee" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" + +[[package]] +name = "camino" +version = "1.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0da45bc31171d8d6960122e222a67740df867c1dd53b4d51caa297084c185cab" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo-platform" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e35af189006b9c0f00a064685c727031e3ed2d8020f7ba284d78cc2671bd36ea" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo_metadata" +version = "0.15.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eee4243f1f26fc7a42710e7439c149e2b10b05472f88090acce52632f231a73a" +dependencies = [ + "camino", + "cargo-platform", + "semver", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "cc" +version = "1.2.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d487aa071b5f64da6f19a3e848e3578944b726ee5a4854b82172f02aa876bfdc" +dependencies = [ + "shlex", +] + +[[package]] +name = "cfg-if" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268" + +[[package]] +name = "clap" +version = "4.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40b6887a1d8685cebccf115538db5c0efe625ccac9696ad45c409d96566e910f" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0c66c08ce9f0c698cbce5c0279d0bb6ac936d8674174fe48f736533b964f59e" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", +] + +[[package]] +name = "clap_derive" +version = "4.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2c7947ae4cc3d851207c1adb5b5e260ff0cca11446b1d6d1423788e442257ce" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "syn 2.0.103", +] + +[[package]] +name = "clap_lex" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b94f61472cee1439c0b966b47e3aca9ae07e45d070759512cd390ea2bebc6675" + +[[package]] +name = "cobs" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67ba02a97a2bd10f4b59b25c7973101c79642302776489e030cd13cdab09ed15" + +[[package]] +name = "colorchoice" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" + +[[package]] +name = "critical-section" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "790eea4361631c5e7d22598ecd5723ff611904e3344ce8720784c93e3d83d40b" + +[[package]] +name = "darling" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d00b9596d185e565c2207a0b01f8bd1a135483d02d9b7b0a54b11da8d53412e" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.103", +] + +[[package]] +name = "darling_macro" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" +dependencies = [ + "darling_core", + "quote", + "syn 2.0.103", +] + +[[package]] +name = "derive_arbitrary" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30542c1ad912e0e3d22a1935c290e12e8a29d704a420177a31faad4a601a0800" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.103", +] + +[[package]] +name = "diff" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" + +[[package]] +name = "either" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" + +[[package]] +name = "embedded-io" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef1a6892d9eef45c8fa6b9e0086428a2cca8491aca8f787c534a3d6d0bcb3ced" + +[[package]] +name = "embedded-io" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edd0f118536f44f5ccd48bcb8b111bdc3de888b58c74639dfb034a357d0f206d" + +[[package]] +name = "ensure-cov" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33753185802e107b8fa907192af1f0eca13b1fb33327a59266d650fef29b2b4e" + +[[package]] +name = "enum-as-inner" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9720bba047d567ffc8a3cba48bf19126600e249ab7f128e9233e6376976a116" +dependencies = [ + "heck 0.4.1", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "enum-as-inner" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1e6a265c649f3f5979b601d26f1d05ada116434c87741c9493cb56218f76cbc" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "syn 2.0.103", +] + +[[package]] +name = "enum_dispatch" +version = "0.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa18ce2bc66555b3218614519ac839ddb759a7d6720732f979ef8d13be147ecd" +dependencies = [ + "once_cell", + "proc-macro2", + "quote", + "syn 2.0.103", +] + +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "fs-err" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88a41f105fe1d5b6b34b2055e3dc59bb79b46b48b2040b9e6c7b4b5de097aa41" +dependencies = [ + "autocfg", +] + +[[package]] +name = "fxhash" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" +dependencies = [ + "byteorder", +] + +[[package]] +name = "generator" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d18470a76cb7f8ff746cf1f7470914f900252ec36bbc40b569d74b1258446827" +dependencies = [ + "cc", + "cfg-if", + "libc", + "log", + "rustversion", + "windows", +] + +[[package]] +name = "generic-btree" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "210507e6dec78bb1304e52a174bd99efdd83894219bf20d656a066a0ce2fedc5" +dependencies = [ + "arref", + "fxhash", + "heapless 0.7.17", + "itertools 0.11.0", + "loro-thunderdome", + "proc-macro2", +] + +[[package]] +name = "getrandom" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi 0.11.1+wasi-snapshot-preview1", + "wasm-bindgen", +] + +[[package]] +name = "getrandom" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" +dependencies = [ + "cfg-if", + "libc", + "r-efi", + "wasi 0.14.2+wasi-0.2.4", +] + +[[package]] +name = "glob" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" + +[[package]] +name = "goblin" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b363a30c165f666402fe6a3024d3bec7ebc898f96a4a23bd1c99f8dbf3f4f47" +dependencies = [ + "log", + "plain", + "scroll", +] + +[[package]] +name = "hash32" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0c35f58762feb77d74ebe43bdbc3210f09be9fe6742234d573bacc26ed92b67" +dependencies = [ + "byteorder", +] + +[[package]] +name = "hash32" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47d60b12902ba28e2730cd37e95b8c9223af2808df9e902d4df49588d1470606" +dependencies = [ + "byteorder", +] + +[[package]] +name = "hashbrown" +version = "0.15.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5971ac85611da7067dbfcabef3c70ebb5606018acd9e2a3903a0da507521e0d5" + +[[package]] +name = "heapless" +version = "0.7.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdc6457c0eb62c71aac4bc17216026d8410337c4126773b9c5daba343f17964f" +dependencies = [ + "atomic-polyfill", + "hash32 0.2.1", + "rustc_version", + "serde", + "spin", + "stable_deref_trait", +] + +[[package]] +name = "heapless" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bfb9eb618601c89945a70e254898da93b13be0388091d42117462b265bb3fad" +dependencies = [ + "hash32 0.3.1", + "stable_deref_trait", +] + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "im" +version = "15.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0acd33ff0285af998aaf9b57342af478078f53492322fafc47450e09397e0e9" +dependencies = [ + "bitmaps", + "rand_core", + "rand_xoshiro", + "serde", + "sized-chunks", + "typenum", + "version_check", +] + +[[package]] +name = "is_terminal_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" + +[[package]] +name = "itertools" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" + +[[package]] +name = "js-sys" +version = "0.3.77" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" +dependencies = [ + "once_cell", + "wasm-bindgen", +] + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" + +[[package]] +name = "leb128" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" + +[[package]] +name = "libc" +version = "0.2.174" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776" + +[[package]] +name = "lock_api" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96936507f153605bddfcda068dd804796c84324ed2510809e5b2a624c81da765" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" + +[[package]] +name = "loom" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "419e0dc8046cb947daa77eb95ae174acfbddb7673b4151f56d1eed8e93fbfaca" +dependencies = [ + "cfg-if", + "generator", + "scoped-tls", + "serde", + "serde_json", + "tracing", + "tracing-subscriber", +] + +[[package]] +name = "loro" +version = "1.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053d0eb248ff645aeba2b3d88ca5bca4404ae1be4f7819185e21d1762682440f" +dependencies = [ + "enum-as-inner 0.6.1", + "fxhash", + "generic-btree", + "loro-common", + "loro-delta", + "loro-internal", + "loro-kv-store", + "tracing", +] + +[[package]] +name = "loro-common" +version = "1.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0b84787030d7925d43f125841d3ce7e4850ffac80d2687cdaa9fd571e67129b" +dependencies = [ + "arbitrary", + "enum-as-inner 0.6.1", + "fxhash", + "leb128", + "loro-rle", + "nonmax", + "serde", + "serde_columnar", + "serde_json", + "thiserror", +] + +[[package]] +name = "loro-delta" +version = "1.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9b920ad564430b2e392ac6f0e8f97ef5745960cc40edc482be57a407db1c243" +dependencies = [ + "arrayvec", + "enum-as-inner 0.5.1", + "generic-btree", + "heapless 0.8.0", +] + +[[package]] +name = "loro-ffi" +version = "1.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0d35f3cd147018877a374edac0f57725aaa29db25adb65de3729c7b69ced863" +dependencies = [ + "loro", + "serde_json", + "uniffi", +] + +[[package]] +name = "loro-internal" +version = "1.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1467b6b499e3d41909cbf524a5000bcbbc21af1205d2ee20290bed140395124b" +dependencies = [ + "append-only-bytes", + "arref", + "bytes", + "either", + "ensure-cov", + "enum-as-inner 0.6.1", + "enum_dispatch", + "fxhash", + "generic-btree", + "getrandom 0.2.16", + "im", + "itertools 0.12.1", + "leb128", + "loom", + "loro-common", + "loro-delta", + "loro-kv-store", + "loro-rle", + "loro_fractional_index", + "md5", + "nonmax", + "num", + "num-traits", + "once_cell", + "postcard", + "pretty_assertions", + "rand", + "serde", + "serde_columnar", + "serde_json", + "smallvec", + "thiserror", + "thread_local", + "tracing", + "wasm-bindgen", + "xxhash-rust", +] + +[[package]] +name = "loro-kv-store" +version = "1.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa1e5fe58c0245e62775784b6ac69cbe04a081f3348ec3b9742ecc7901085c18" +dependencies = [ + "bytes", + "ensure-cov", + "fxhash", + "loro-common", + "lz4_flex", + "once_cell", + "quick_cache", + "tracing", + "xxhash-rust", +] + +[[package]] +name = "loro-rle" +version = "1.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "077b51e4eac04e7f18574f7e6ac0201ffd98ff65015343eee3702bc3e7c49dc8" +dependencies = [ + "append-only-bytes", + "num", + "smallvec", +] + +[[package]] +name = "loro-rs" +version = "0.1.0" +dependencies = [ + "loro-ffi", + "uniffi", +] + +[[package]] +name = "loro-thunderdome" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f3d053a135388e6b1df14e8af1212af5064746e9b87a06a345a7a779ee9695a" + +[[package]] +name = "loro_fractional_index" +version = "1.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e387a04d7d6a74ebb3434c906c84ddcae4413e5ef8bcd8e7d5138959d416a512" +dependencies = [ + "once_cell", + "rand", + "serde", +] + +[[package]] +name = "lz4_flex" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c592ad9fbc1b7838633b3ae55ce69b17d01150c72fcef229fbb819d39ee51ee" +dependencies = [ + "twox-hash", +] + +[[package]] +name = "matchers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +dependencies = [ + "regex-automata 0.1.10", +] + +[[package]] +name = "md5" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "490cc448043f947bae3cbee9c203358d62dbee0db12107a74be5c30ccfd09771" + +[[package]] +name = "memchr" +version = "2.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "mime_guess" +version = "2.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" +dependencies = [ + "mime", + "unicase", +] + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "nonmax" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "610a5acd306ec67f907abe5567859a3c693fb9886eb1f012ab8f2a47bef3db51" + +[[package]] +name = "nu-ansi-term" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +dependencies = [ + "overload", + "winapi", +] + +[[package]] +name = "num" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" +dependencies = [ + "num-bigint", + "num-complex", + "num-integer", + "num-iter", + "num-rational", + "num-traits", +] + +[[package]] +name = "num-bigint" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "num-complex" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-iter" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" +dependencies = [ + "num-bigint", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[package]] +name = "once_cell" +version = "1.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" + +[[package]] +name = "once_cell_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4895175b425cb1f87721b59f0f286c2092bd4af812243672510e1ac53e2e0ad" + +[[package]] +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + +[[package]] +name = "parking_lot" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70d58bf43669b5795d1576d0641cfb6fbb2057bf629506267a92807158584a13" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc838d2a56b5b1a6c25f55575dfc605fabb63bb2365f6c2353ef9159aa69e4a5" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets", +] + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "pin-project-lite" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" + +[[package]] +name = "plain" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" + +[[package]] +name = "postcard" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "170a2601f67cc9dba8edd8c4870b15f71a6a2dc196daec8c83f72b59dff628a8" +dependencies = [ + "cobs", + "embedded-io 0.4.0", + "embedded-io 0.6.1", + "heapless 0.7.17", + "serde", +] + +[[package]] +name = "ppv-lite86" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "pretty_assertions" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ae130e2f271fbc2ac3a40fb1d07180839cdbbe443c7a27e1e3c13c5cac0116d" +dependencies = [ + "diff", + "yansi", +] + +[[package]] +name = "proc-macro2" +version = "1.0.95" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quick_cache" +version = "0.6.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b450dad8382b1b95061d5ca1eb792081fb082adf48c678791fe917509596d5f" +dependencies = [ + "ahash", + "equivalent", + "hashbrown", + "parking_lot", +] + +[[package]] +name = "quote" +version = "1.0.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.16", +] + +[[package]] +name = "rand_xoshiro" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f97cdb2a36ed4183de61b2f824cc45c9f1037f28afe0a322e9fff4c108b5aaa" +dependencies = [ + "rand_core", +] + +[[package]] +name = "redox_syscall" +version = "0.5.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d04b7d0ee6b4a0207a0a7adb104d23ecb0b47d6beae7152d0fa34b692b29fd6" +dependencies = [ + "bitflags", +] + +[[package]] +name = "regex" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata 0.4.9", + "regex-syntax 0.8.5", +] + +[[package]] +name = "regex-automata" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +dependencies = [ + "regex-syntax 0.6.29", +] + +[[package]] +name = "regex-automata" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax 0.8.5", +] + +[[package]] +name = "regex-syntax" +version = "0.6.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" + +[[package]] +name = "regex-syntax" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" + +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + +[[package]] +name = "rustversion" +version = "1.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a0d197bd2c9dc6e53b84da9556a69ba4cdfab8619eb41a8bd1cc2027a0f6b1d" + +[[package]] +name = "ryu" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" + +[[package]] +name = "scoped-tls" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "scroll" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ab8598aa408498679922eff7fa985c25d58a90771bd6be794434c5277eab1a6" +dependencies = [ + "scroll_derive", +] + +[[package]] +name = "scroll_derive" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1783eabc414609e28a5ba76aee5ddd52199f7107a0b24c2e9746a1ecc34a683d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.103", +] + +[[package]] +name = "semver" +version = "1.0.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0" +dependencies = [ + "serde", +] + +[[package]] +name = "serde" +version = "1.0.219" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_columnar" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5910a00acc21b3f106b9e3977cabf8d4c15b62ea585664f08ec6fedb118d88e0" +dependencies = [ + "itertools 0.11.0", + "postcard", + "serde", + "serde_columnar_derive", + "thiserror", +] + +[[package]] +name = "serde_columnar_derive" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44cea1995b758f1b344f484e77a02d9d85c8a62c9ce0e5f1850e27e2f7eebbc9" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.103", +] + +[[package]] +name = "serde_derive" +version = "1.0.219" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.103", +] + +[[package]] +name = "serde_json" +version = "1.0.140" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" +dependencies = [ + "itoa", + "memchr", + "ryu", + "serde", +] + +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "siphasher" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" + +[[package]] +name = "sized-chunks" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16d69225bde7a69b235da73377861095455d298f2b970996eec25ddbb42b3d1e" +dependencies = [ + "bitmaps", + "typenum", +] + +[[package]] +name = "smallvec" +version = "1.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" +dependencies = [ + "serde", +] + +[[package]] +name = "smawk" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7c388c1b5e93756d0c740965c41e8822f866621d41acbdf6336a6a168f8840c" + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +dependencies = [ + "lock_api", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.103" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4307e30089d6fd6aff212f2da3a1f9e32f3223b1f010fb09b7c95f90f3ca1e8" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "textwrap" +version = "0.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c13547615a44dc9c452a8a534638acdf07120d4b6847c8178705da06306a3057" +dependencies = [ + "smawk", +] + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.103", +] + +[[package]] +name = "thread_local" +version = "1.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "toml" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +dependencies = [ + "serde", +] + +[[package]] +name = "tracing" +version = "0.1.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" +dependencies = [ + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.103", +] + +[[package]] +name = "tracing-core" +version = "0.1.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" +dependencies = [ + "once_cell", + "valuable", +] + +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" +dependencies = [ + "matchers", + "nu-ansi-term", + "once_cell", + "regex", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", +] + +[[package]] +name = "twox-hash" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b907da542cbced5261bd3256de1b3a1bf340a3d37f93425a07362a1d687de56" + +[[package]] +name = "typenum" +version = "1.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f" + +[[package]] +name = "unicase" +version = "2.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539" + +[[package]] +name = "unicode-ident" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" + +[[package]] +name = "uniffi" +version = "0.28.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cb08c58c7ed7033150132febe696bef553f891b1ede57424b40d87a89e3c170" +dependencies = [ + "anyhow", + "camino", + "cargo_metadata", + "clap", + "uniffi_bindgen", + "uniffi_build", + "uniffi_core", + "uniffi_macros", +] + +[[package]] +name = "uniffi_bindgen" +version = "0.28.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cade167af943e189a55020eda2c314681e223f1e42aca7c4e52614c2b627698f" +dependencies = [ + "anyhow", + "askama", + "camino", + "cargo_metadata", + "fs-err", + "glob", + "goblin", + "heck 0.5.0", + "once_cell", + "paste", + "serde", + "textwrap", + "toml", + "uniffi_meta", + "uniffi_udl", +] + +[[package]] +name = "uniffi_build" +version = "0.28.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7cf32576e08104b7dc2a6a5d815f37616e66c6866c2a639fe16e6d2286b75b" +dependencies = [ + "anyhow", + "camino", + "uniffi_bindgen", +] + +[[package]] +name = "uniffi_checksum_derive" +version = "0.28.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "802d2051a700e3ec894c79f80d2705b69d85844dafbbe5d1a92776f8f48b563a" +dependencies = [ + "quote", + "syn 2.0.103", +] + +[[package]] +name = "uniffi_core" +version = "0.28.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc7687007d2546c454d8ae609b105daceb88175477dac280707ad6d95bcd6f1f" +dependencies = [ + "anyhow", + "bytes", + "log", + "once_cell", + "paste", + "static_assertions", +] + +[[package]] +name = "uniffi_macros" +version = "0.28.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12c65a5b12ec544ef136693af8759fb9d11aefce740fb76916721e876639033b" +dependencies = [ + "bincode", + "camino", + "fs-err", + "once_cell", + "proc-macro2", + "quote", + "serde", + "syn 2.0.103", + "toml", + "uniffi_meta", +] + +[[package]] +name = "uniffi_meta" +version = "0.28.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a74ed96c26882dac1ca9b93ca23c827e284bacbd7ec23c6f0b0372f747d59e4" +dependencies = [ + "anyhow", + "bytes", + "siphasher", + "uniffi_checksum_derive", +] + +[[package]] +name = "uniffi_testing" +version = "0.28.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6f984f0781f892cc864a62c3a5c60361b1ccbd68e538e6c9fbced5d82268ac" +dependencies = [ + "anyhow", + "camino", + "cargo_metadata", + "fs-err", + "once_cell", +] + +[[package]] +name = "uniffi_udl" +version = "0.28.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "037820a4cfc4422db1eaa82f291a3863c92c7d1789dc513489c36223f9b4cdfc" +dependencies = [ + "anyhow", + "textwrap", + "uniffi_meta", + "uniffi_testing", + "weedle2", +] + +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + +[[package]] +name = "valuable" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasi" +version = "0.14.2+wasi-0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" +dependencies = [ + "wit-bindgen-rt", +] + +[[package]] +name = "wasm-bindgen" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" +dependencies = [ + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" +dependencies = [ + "bumpalo", + "log", + "proc-macro2", + "quote", + "syn 2.0.103", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.103", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "weedle2" +version = "5.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "998d2c24ec099a87daf9467808859f9d82b61f1d9c9701251aea037f514eae0e" +dependencies = [ + "nom", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows" +version = "0.61.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9babd3a767a4c1aef6900409f85f5d53ce2544ccdfaa86dad48c91782c6d6893" +dependencies = [ + "windows-collections", + "windows-core", + "windows-future", + "windows-link", + "windows-numerics", +] + +[[package]] +name = "windows-collections" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3beeceb5e5cfd9eb1d76b381630e82c4241ccd0d27f1a39ed41b2760b255c5e8" +dependencies = [ + "windows-core", +] + +[[package]] +name = "windows-core" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-link", + "windows-result", + "windows-strings", +] + +[[package]] +name = "windows-future" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc6a41e98427b19fe4b73c550f060b59fa592d7d686537eebf9385621bfbad8e" +dependencies = [ + "windows-core", + "windows-link", + "windows-threading", +] + +[[package]] +name = "windows-implement" +version = "0.60.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.103", +] + +[[package]] +name = "windows-interface" +version = "0.59.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.103", +] + +[[package]] +name = "windows-link" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" + +[[package]] +name = "windows-numerics" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1" +dependencies = [ + "windows-core", + "windows-link", +] + +[[package]] +name = "windows-result" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-strings" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows-threading" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b66463ad2e0ea3bbf808b7f1d371311c80e115c0b71d60efc142cafbcfb057a6" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "wit-bindgen-rt" +version = "0.39.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" +dependencies = [ + "bitflags", +] + +[[package]] +name = "xxhash-rust" +version = "0.8.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdd20c5420375476fbd4394763288da7eb0cc0b8c11deed431a91562af7335d3" + +[[package]] +name = "yansi" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" + +[[package]] +name = "zerocopy" +version = "0.8.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1039dd0d3c310cf05de012d8a39ff557cb0d23087fd44cad61df08fc31907a2f" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ecf5b4cc5364572d7f4c329661bcc82724222973f2cab6f050a4e5c22f75181" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.103", +] diff --git a/loro-rs/Cargo.toml b/loro-rs/Cargo.toml new file mode 100644 index 0000000..2b97540 --- /dev/null +++ b/loro-rs/Cargo.toml @@ -0,0 +1,21 @@ +[package] +name = "loro-rs" +version = "0.1.0" +edition = "2021" + +[lib] +crate-type = ["cdylib", "staticlib"] + +[[bin]] +name = "uniffi-bindgen" +path = "src/uniffi-bindgen.rs" + +[dependencies] +loro-ffi = { version = "1.5.9" } +uniffi = { version = "0.28.3" } + +[build-dependencies] +uniffi = { version = "0.28.3", features = ["build"] } + +[features] +cli = ["uniffi/cli"] diff --git a/loro-rs/src/lib.rs b/loro-rs/src/lib.rs new file mode 100644 index 0000000..45802d8 --- /dev/null +++ b/loro-rs/src/lib.rs @@ -0,0 +1 @@ +loro_ffi::uniffi_reexport_scaffolding!(); diff --git a/loro-rs/src/uniffi-bindgen.rs b/loro-rs/src/uniffi-bindgen.rs new file mode 100644 index 0000000..dbb99cc --- /dev/null +++ b/loro-rs/src/uniffi-bindgen.rs @@ -0,0 +1,4 @@ +fn main() { + #[cfg(feature = "cli")] + uniffi::uniffi_bindgen_main() +} diff --git a/src/extension.ts b/src/extension.ts index d3ae7b1..cb0c813 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -39,6 +39,8 @@ declare module "./generated/loro" { subscribeFirstCommitFromPeer(cb: (payload: FirstCommitFromPeerPayload) => void): SubscriptionInterface; subscribePreCommit(cb: (payload: PreCommitCallbackPayload) => void): SubscriptionInterface; toJSON(): any; + oplogVersion(): VersionVector; + version(): VersionVector; getValue(): Value; getDeepValue(): Value; getDeepValueWithId(): Value; @@ -49,7 +51,9 @@ declare module "./generated/loro" { insertContainer(key: string, container: T): T; getOrCreateContainer(key: string, container: T): T; getValue(): Value; + set(key: string, value: Value): void; getDeepValue(): Value; + subscribe(cb: (diff: DiffEvent) => void): SubscriptionInterface | undefined; } interface LoroList { @@ -61,6 +65,7 @@ declare module "./generated/loro" { getDeepValue(): Value; pop(): Value | undefined; toVec(): Value[]; + subscribe(cb: (diff: DiffEvent) => void): SubscriptionInterface | undefined; } interface LoroMovableList { @@ -73,16 +78,19 @@ declare module "./generated/loro" { getDeepValue(): Value; pop(): Value | undefined; toVec(): Value[]; + subscribe(cb: (diff: DiffEvent) => void): SubscriptionInterface | undefined; } interface LoroText { mark(from: number, to: number, key: string, value: Value): void; getRichtextValue(): Value; + subscribe(cb: (diff: DiffEvent) => void): SubscriptionInterface | undefined; } interface LoroTree { getValue(): Value; getValueWithMeta(): Value; + subscribe(cb: (diff: DiffEvent) => void): SubscriptionInterface | undefined; } interface UndoManager { @@ -263,6 +271,14 @@ LoroDoc.prototype.subscribePreCommit = function (cb: (payload: PreCommitCallback return originalSubscribePreCommit.call(this, { onPreCommit: cb }) } +LoroDoc.prototype.version = function (): VersionVector { + return this.stateVv(); +} + +LoroDoc.prototype.oplogVersion = function (): VersionVector { + return this.oplogVv(); +} + LoroDoc.prototype.toJSON = function (): any { return this.getDeepValue(); } @@ -283,6 +299,20 @@ addAsLoroValueMethod(LoroMap.prototype); addAsLoroValueMethod(LoroTree.prototype); addAsLoroValueMethod(LoroMovableList.prototype); +function addSubscribeMethod void): SubscriptionInterface | undefined }>(prototype: T): void { + const oriSubscribe = prototype.subscribe; + (prototype as any).subscribe = function (cb: (diff: DiffEvent) => void): SubscriptionInterface | undefined { + return oriSubscribe.call(this, { onDiff: cb }); + } +} + +addSubscribeMethod(LoroText.prototype); +addSubscribeMethod(LoroCounter.prototype); +addSubscribeMethod(LoroList.prototype); +addSubscribeMethod(LoroMap.prototype); +addSubscribeMethod(LoroTree.prototype); +addSubscribeMethod(LoroMovableList.prototype); + const originalInsert = LoroMap.prototype.insert; LoroMap.prototype.insert = function (key: string, value: Value): void { return originalInsert.call(this, key, jsValueToLoroValue(value)); @@ -325,6 +355,12 @@ LoroMap.prototype.getOrCreateContainer = function (key: str } } +LoroMap.prototype.set = function (key: string, value: Value): void { + return this.insert(key, value); +} + + + const originalListInsert = LoroList.prototype.insert; LoroList.prototype.insert = function (pos: number, value: Value): void { return originalListInsert.call(this, pos, jsValueToLoroValue(value)); diff --git a/src/generated/loro-ffi.ts b/src/generated/loro-ffi.ts index 2bc7129..ea927c7 100644 --- a/src/generated/loro-ffi.ts +++ b/src/generated/loro-ffi.ts @@ -406,6 +406,11 @@ interface NativeModuleInterface { ptr: bigint, uniffi_out_err: UniffiRustCallStatus ): number; + ubrn_uniffi_loro_ffi_fn_method_lorocounter_subscribe( + ptr: bigint, + subscriber: bigint, + uniffi_out_err: UniffiRustCallStatus + ): Uint8Array; ubrn_uniffi_loro_ffi_fn_clone_lorodoc( ptr: bigint, uniffi_out_err: UniffiRustCallStatus @@ -937,6 +942,11 @@ interface NativeModuleInterface { v: bigint, uniffi_out_err: UniffiRustCallStatus ): void; + ubrn_uniffi_loro_ffi_fn_method_lorolist_subscribe( + ptr: bigint, + subscriber: bigint, + uniffi_out_err: UniffiRustCallStatus + ): Uint8Array; ubrn_uniffi_loro_ffi_fn_method_lorolist_to_vec( ptr: bigint, uniffi_out_err: UniffiRustCallStatus @@ -1089,6 +1099,11 @@ interface NativeModuleInterface { ptr: bigint, uniffi_out_err: UniffiRustCallStatus ): number; + ubrn_uniffi_loro_ffi_fn_method_loromap_subscribe( + ptr: bigint, + subscriber: bigint, + uniffi_out_err: UniffiRustCallStatus + ): Uint8Array; ubrn_uniffi_loro_ffi_fn_method_loromap_values( ptr: bigint, uniffi_out_err: UniffiRustCallStatus @@ -1275,6 +1290,11 @@ interface NativeModuleInterface { child: bigint, uniffi_out_err: UniffiRustCallStatus ): bigint; + ubrn_uniffi_loro_ffi_fn_method_loromovablelist_subscribe( + ptr: bigint, + subscriber: bigint, + uniffi_out_err: UniffiRustCallStatus + ): Uint8Array; ubrn_uniffi_loro_ffi_fn_method_loromovablelist_to_vec( ptr: bigint, uniffi_out_err: UniffiRustCallStatus @@ -1295,6 +1315,11 @@ interface NativeModuleInterface { delta: Uint8Array, uniffi_out_err: UniffiRustCallStatus ): void; + ubrn_uniffi_loro_ffi_fn_method_lorotext_char_at( + ptr: bigint, + pos: number, + uniffi_out_err: UniffiRustCallStatus + ): Uint8Array; ubrn_uniffi_loro_ffi_fn_method_lorotext_delete( ptr: bigint, pos: number, @@ -1396,6 +1421,11 @@ interface NativeModuleInterface { s: Uint8Array, uniffi_out_err: UniffiRustCallStatus ): Uint8Array; + ubrn_uniffi_loro_ffi_fn_method_lorotext_subscribe( + ptr: bigint, + subscriber: bigint, + uniffi_out_err: UniffiRustCallStatus + ): Uint8Array; ubrn_uniffi_loro_ffi_fn_method_lorotext_to_delta( ptr: bigint, uniffi_out_err: UniffiRustCallStatus @@ -1564,6 +1594,11 @@ interface NativeModuleInterface { ptr: bigint, uniffi_out_err: UniffiRustCallStatus ): Uint8Array; + ubrn_uniffi_loro_ffi_fn_method_lorotree_subscribe( + ptr: bigint, + subscriber: bigint, + uniffi_out_err: UniffiRustCallStatus + ): Uint8Array; ubrn_uniffi_loro_ffi_fn_clone_lorounknown( ptr: bigint, uniffi_out_err: UniffiRustCallStatus @@ -2023,6 +2058,7 @@ interface NativeModuleInterface { ubrn_uniffi_loro_ffi_checksum_method_lorocounter_increment(): number; ubrn_uniffi_loro_ffi_checksum_method_lorocounter_is_attached(): number; ubrn_uniffi_loro_ffi_checksum_method_lorocounter_is_deleted(): number; + ubrn_uniffi_loro_ffi_checksum_method_lorocounter_subscribe(): number; ubrn_uniffi_loro_ffi_checksum_method_lorodoc_apply_diff(): number; ubrn_uniffi_loro_ffi_checksum_method_lorodoc_attach(): number; ubrn_uniffi_loro_ffi_checksum_method_lorodoc_check_state_correctness_slow(): number; @@ -2129,6 +2165,7 @@ interface NativeModuleInterface { ubrn_uniffi_loro_ffi_checksum_method_lorolist_len(): number; ubrn_uniffi_loro_ffi_checksum_method_lorolist_pop(): number; ubrn_uniffi_loro_ffi_checksum_method_lorolist_push(): number; + ubrn_uniffi_loro_ffi_checksum_method_lorolist_subscribe(): number; ubrn_uniffi_loro_ffi_checksum_method_lorolist_to_vec(): number; ubrn_uniffi_loro_ffi_checksum_method_loromap_clear(): number; ubrn_uniffi_loro_ffi_checksum_method_loromap_delete(): number; @@ -2157,6 +2194,7 @@ interface NativeModuleInterface { ubrn_uniffi_loro_ffi_checksum_method_loromap_is_empty(): number; ubrn_uniffi_loro_ffi_checksum_method_loromap_keys(): number; ubrn_uniffi_loro_ffi_checksum_method_loromap_len(): number; + ubrn_uniffi_loro_ffi_checksum_method_loromap_subscribe(): number; ubrn_uniffi_loro_ffi_checksum_method_loromap_values(): number; ubrn_uniffi_loro_ffi_checksum_method_loromovablelist_clear(): number; ubrn_uniffi_loro_ffi_checksum_method_loromovablelist_delete(): number; @@ -2191,8 +2229,10 @@ interface NativeModuleInterface { ubrn_uniffi_loro_ffi_checksum_method_loromovablelist_set_movable_list_container(): number; ubrn_uniffi_loro_ffi_checksum_method_loromovablelist_set_text_container(): number; ubrn_uniffi_loro_ffi_checksum_method_loromovablelist_set_tree_container(): number; + ubrn_uniffi_loro_ffi_checksum_method_loromovablelist_subscribe(): number; ubrn_uniffi_loro_ffi_checksum_method_loromovablelist_to_vec(): number; ubrn_uniffi_loro_ffi_checksum_method_lorotext_apply_delta(): number; + ubrn_uniffi_loro_ffi_checksum_method_lorotext_char_at(): number; ubrn_uniffi_loro_ffi_checksum_method_lorotext_delete(): number; ubrn_uniffi_loro_ffi_checksum_method_lorotext_delete_utf8(): number; ubrn_uniffi_loro_ffi_checksum_method_lorotext_doc(): number; @@ -2213,6 +2253,7 @@ interface NativeModuleInterface { ubrn_uniffi_loro_ffi_checksum_method_lorotext_push_str(): number; ubrn_uniffi_loro_ffi_checksum_method_lorotext_slice(): number; ubrn_uniffi_loro_ffi_checksum_method_lorotext_splice(): number; + ubrn_uniffi_loro_ffi_checksum_method_lorotext_subscribe(): number; ubrn_uniffi_loro_ffi_checksum_method_lorotext_to_delta(): number; ubrn_uniffi_loro_ffi_checksum_method_lorotext_to_string(): number; ubrn_uniffi_loro_ffi_checksum_method_lorotext_unmark(): number; @@ -2245,6 +2286,7 @@ interface NativeModuleInterface { ubrn_uniffi_loro_ffi_checksum_method_lorotree_nodes(): number; ubrn_uniffi_loro_ffi_checksum_method_lorotree_parent(): number; ubrn_uniffi_loro_ffi_checksum_method_lorotree_roots(): number; + ubrn_uniffi_loro_ffi_checksum_method_lorotree_subscribe(): number; ubrn_uniffi_loro_ffi_checksum_method_lorounknown_id(): number; ubrn_uniffi_loro_ffi_checksum_method_lorovaluelike_as_loro_value(): number; ubrn_uniffi_loro_ffi_checksum_method_onpop_on_pop(): number; diff --git a/src/generated/loro.ts b/src/generated/loro.ts index 27327d4..759361c 100644 --- a/src/generated/loro.ts +++ b/src/generated/loro.ts @@ -8712,6 +8712,20 @@ export interface LoroCounterInterface { * Whether the container is deleted. */ isDeleted(): boolean; + /** + * Subscribe the events of a container. + * + * The callback will be invoked when the container is changed. + * Returns a subscription that can be used to unsubscribe. + * + * The events will be emitted after a transaction is committed. A transaction is committed when: + * + * - `doc.commit()` is called. + * - `doc.export(mode)` is called. + * - `doc.import(data)` is called. + * - `doc.checkout(version)` is called. + */ + subscribe(subscriber: Subscriber): SubscriptionInterface | undefined; } export class LoroCounter @@ -8882,6 +8896,34 @@ export class LoroCounter ); } + /** + * Subscribe the events of a container. + * + * The callback will be invoked when the container is changed. + * Returns a subscription that can be used to unsubscribe. + * + * The events will be emitted after a transaction is committed. A transaction is committed when: + * + * - `doc.commit()` is called. + * - `doc.export(mode)` is called. + * - `doc.import(data)` is called. + * - `doc.checkout(version)` is called. + */ + public subscribe(subscriber: Subscriber): SubscriptionInterface | undefined { + return FfiConverterOptionalTypeSubscription.lift( + uniffiCaller.rustCall( + /*caller:*/ (callStatus) => { + return nativeModule().ubrn_uniffi_loro_ffi_fn_method_lorocounter_subscribe( + uniffiTypeLoroCounterObjectFactory.clonePointer(this), + FfiConverterTypeSubscriber.lower(subscriber), + callStatus + ); + }, + /*liftString:*/ FfiConverterString.lift + ) + ); + } + /** * {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy} */ @@ -11556,6 +11598,20 @@ export interface LoroListInterface { */ pop() /*throws*/ : LoroValue | undefined; push(v: LoroValueLike) /*throws*/ : void; + /** + * Subscribe the events of a container. + * + * The callback will be invoked when the container is changed. + * Returns a subscription that can be used to unsubscribe. + * + * The events will be emitted after a transaction is committed. A transaction is committed when: + * + * - `doc.commit()` is called. + * - `doc.export(mode)` is called. + * - `doc.import(data)` is called. + * - `doc.checkout(version)` is called. + */ + subscribe(subscriber: Subscriber): SubscriptionInterface | undefined; /** * Converts the LoroList to a Vec of LoroValue. * @@ -12026,6 +12082,34 @@ export class LoroList ); } + /** + * Subscribe the events of a container. + * + * The callback will be invoked when the container is changed. + * Returns a subscription that can be used to unsubscribe. + * + * The events will be emitted after a transaction is committed. A transaction is committed when: + * + * - `doc.commit()` is called. + * - `doc.export(mode)` is called. + * - `doc.import(data)` is called. + * - `doc.checkout(version)` is called. + */ + public subscribe(subscriber: Subscriber): SubscriptionInterface | undefined { + return FfiConverterOptionalTypeSubscription.lift( + uniffiCaller.rustCall( + /*caller:*/ (callStatus) => { + return nativeModule().ubrn_uniffi_loro_ffi_fn_method_lorolist_subscribe( + uniffiTypeLoroListObjectFactory.clonePointer(this), + FfiConverterTypeSubscriber.lower(subscriber), + callStatus + ); + }, + /*liftString:*/ FfiConverterString.lift + ) + ); + } + /** * Converts the LoroList to a Vec of LoroValue. * @@ -12246,6 +12330,20 @@ export interface LoroMapInterface { * Get the length of the map. */ len(): /*u32*/ number; + /** + * Subscribe the events of a container. + * + * The callback will be invoked when the container is changed. + * Returns a subscription that can be used to unsubscribe. + * + * The events will be emitted after a transaction is committed. A transaction is committed when: + * + * - `doc.commit()` is called. + * - `doc.export(mode)` is called. + * - `doc.import(data)` is called. + * - `doc.checkout(version)` is called. + */ + subscribe(subscriber: Subscriber): SubscriptionInterface | undefined; /** * Get the values of the map. */ @@ -12810,6 +12908,34 @@ export class LoroMap extends UniffiAbstractObject implements LoroMapInterface { ); } + /** + * Subscribe the events of a container. + * + * The callback will be invoked when the container is changed. + * Returns a subscription that can be used to unsubscribe. + * + * The events will be emitted after a transaction is committed. A transaction is committed when: + * + * - `doc.commit()` is called. + * - `doc.export(mode)` is called. + * - `doc.import(data)` is called. + * - `doc.checkout(version)` is called. + */ + public subscribe(subscriber: Subscriber): SubscriptionInterface | undefined { + return FfiConverterOptionalTypeSubscription.lift( + uniffiCaller.rustCall( + /*caller:*/ (callStatus) => { + return nativeModule().ubrn_uniffi_loro_ffi_fn_method_loromap_subscribe( + uniffiTypeLoroMapObjectFactory.clonePointer(this), + FfiConverterTypeSubscriber.lower(subscriber), + callStatus + ); + }, + /*liftString:*/ FfiConverterString.lift + ) + ); + } + /** * Get the values of the map. */ @@ -13048,6 +13174,20 @@ export interface LoroMovableListInterface { pos: /*u32*/ number, child: LoroTreeInterface ) /*throws*/ : LoroTreeInterface; + /** + * Subscribe the events of a container. + * + * The callback will be invoked when the container is changed. + * Returns a subscription that can be used to unsubscribe. + * + * The events will be emitted after a transaction is committed. A transaction is committed when: + * + * - `doc.commit()` is called. + * - `doc.export(mode)` is called. + * - `doc.import(data)` is called. + * - `doc.checkout(version)` is called. + */ + subscribe(subscriber: Subscriber): SubscriptionInterface | undefined; /** * Get the elements of the list as a vector of LoroValues. * @@ -13739,6 +13879,34 @@ export class LoroMovableList ); } + /** + * Subscribe the events of a container. + * + * The callback will be invoked when the container is changed. + * Returns a subscription that can be used to unsubscribe. + * + * The events will be emitted after a transaction is committed. A transaction is committed when: + * + * - `doc.commit()` is called. + * - `doc.export(mode)` is called. + * - `doc.import(data)` is called. + * - `doc.checkout(version)` is called. + */ + public subscribe(subscriber: Subscriber): SubscriptionInterface | undefined { + return FfiConverterOptionalTypeSubscription.lift( + uniffiCaller.rustCall( + /*caller:*/ (callStatus) => { + return nativeModule().ubrn_uniffi_loro_ffi_fn_method_loromovablelist_subscribe( + uniffiTypeLoroMovableListObjectFactory.clonePointer(this), + FfiConverterTypeSubscriber.lower(subscriber), + callStatus + ); + }, + /*liftString:*/ FfiConverterString.lift + ) + ); + } + /** * Get the elements of the list as a vector of LoroValues. * @@ -13850,6 +14018,10 @@ export interface LoroTextInterface { * Apply a [delta](https://quilljs.com/docs/delta/) to the text container. */ applyDelta(delta: Array) /*throws*/ : void; + /** + * Get the characters at given unicode position. + */ + charAt(pos: /*u32*/ number) /*throws*/ : string; /** * Delete a range of text at the given unicode position with unicode length. */ @@ -13970,6 +14142,20 @@ export interface LoroTextInterface { len: /*u32*/ number, s: string ) /*throws*/ : string; + /** + * Subscribe the events of a container. + * + * The callback will be invoked when the container is changed. + * Returns a subscription that can be used to unsubscribe. + * + * The events will be emitted after a transaction is committed. A transaction is committed when: + * + * - `doc.commit()` is called. + * - `doc.export(mode)` is called. + * - `doc.import(data)` is called. + * - `doc.checkout(version)` is called. + */ + subscribe(subscriber: Subscriber): SubscriptionInterface | undefined; /** * Get the text in [Delta](https://quilljs.com/docs/delta/) format. */ @@ -14066,6 +14252,27 @@ export class LoroText ); } + /** + * Get the characters at given unicode position. + */ + public charAt(pos: /*u32*/ number): string /*throws*/ { + return FfiConverterString.lift( + uniffiCaller.rustCallWithError( + /*liftError:*/ FfiConverterTypeLoroError.lift.bind( + FfiConverterTypeLoroError + ), + /*caller:*/ (callStatus) => { + return nativeModule().ubrn_uniffi_loro_ffi_fn_method_lorotext_char_at( + uniffiTypeLoroTextObjectFactory.clonePointer(this), + FfiConverterUInt32.lower(pos), + callStatus + ); + }, + /*liftString:*/ FfiConverterString.lift + ) + ); + } + /** * Delete a range of text at the given unicode position with unicode length. */ @@ -14484,6 +14691,34 @@ export class LoroText ); } + /** + * Subscribe the events of a container. + * + * The callback will be invoked when the container is changed. + * Returns a subscription that can be used to unsubscribe. + * + * The events will be emitted after a transaction is committed. A transaction is committed when: + * + * - `doc.commit()` is called. + * - `doc.export(mode)` is called. + * - `doc.import(data)` is called. + * - `doc.checkout(version)` is called. + */ + public subscribe(subscriber: Subscriber): SubscriptionInterface | undefined { + return FfiConverterOptionalTypeSubscription.lift( + uniffiCaller.rustCall( + /*caller:*/ (callStatus) => { + return nativeModule().ubrn_uniffi_loro_ffi_fn_method_lorotext_subscribe( + uniffiTypeLoroTextObjectFactory.clonePointer(this), + FfiConverterTypeSubscriber.lower(subscriber), + callStatus + ); + }, + /*liftString:*/ FfiConverterString.lift + ) + ); + } + /** * Get the text in [Delta](https://quilljs.com/docs/delta/) format. */ @@ -14839,6 +15074,20 @@ export interface LoroTreeInterface { * Get the root nodes of the forest. */ roots(): Array; + /** + * Subscribe the events of a container. + * + * The callback will be invoked when the container is changed. + * Returns a subscription that can be used to unsubscribe. + * + * The events will be emitted after a transaction is committed. A transaction is committed when: + * + * - `doc.commit()` is called. + * - `doc.export(mode)` is called. + * - `doc.import(data)` is called. + * - `doc.checkout(version)` is called. + */ + subscribe(subscriber: Subscriber): SubscriptionInterface | undefined; } export class LoroTree @@ -15409,6 +15658,34 @@ export class LoroTree ); } + /** + * Subscribe the events of a container. + * + * The callback will be invoked when the container is changed. + * Returns a subscription that can be used to unsubscribe. + * + * The events will be emitted after a transaction is committed. A transaction is committed when: + * + * - `doc.commit()` is called. + * - `doc.export(mode)` is called. + * - `doc.import(data)` is called. + * - `doc.checkout(version)` is called. + */ + public subscribe(subscriber: Subscriber): SubscriptionInterface | undefined { + return FfiConverterOptionalTypeSubscription.lift( + uniffiCaller.rustCall( + /*caller:*/ (callStatus) => { + return nativeModule().ubrn_uniffi_loro_ffi_fn_method_lorotree_subscribe( + uniffiTypeLoroTreeObjectFactory.clonePointer(this), + FfiConverterTypeSubscriber.lower(subscriber), + callStatus + ); + }, + /*liftString:*/ FfiConverterString.lift + ) + ); + } + /** * {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy} */ @@ -18455,6 +18732,11 @@ const FfiConverterOptionalTypeOnPush = new FfiConverterOptional( FfiConverterTypeOnPush ); +// FfiConverter for SubscriptionInterface | undefined +const FfiConverterOptionalTypeSubscription = new FfiConverterOptional( + FfiConverterTypeSubscription +); + // FfiConverter for ValueOrContainerInterface | undefined const FfiConverterOptionalTypeValueOrContainer = new FfiConverterOptional( FfiConverterTypeValueOrContainer @@ -18926,6 +19208,14 @@ function uniffiEnsureInitialized() { 'uniffi_loro_ffi_checksum_method_lorocounter_is_deleted' ); } + if ( + nativeModule().ubrn_uniffi_loro_ffi_checksum_method_lorocounter_subscribe() !== + 60261 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_loro_ffi_checksum_method_lorocounter_subscribe' + ); + } if ( nativeModule().ubrn_uniffi_loro_ffi_checksum_method_lorodoc_apply_diff() !== 15296 @@ -19767,6 +20057,14 @@ function uniffiEnsureInitialized() { 'uniffi_loro_ffi_checksum_method_lorolist_push' ); } + if ( + nativeModule().ubrn_uniffi_loro_ffi_checksum_method_lorolist_subscribe() !== + 37781 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_loro_ffi_checksum_method_lorolist_subscribe' + ); + } if ( nativeModule().ubrn_uniffi_loro_ffi_checksum_method_lorolist_to_vec() !== 48551 @@ -19986,6 +20284,14 @@ function uniffiEnsureInitialized() { 'uniffi_loro_ffi_checksum_method_loromap_len' ); } + if ( + nativeModule().ubrn_uniffi_loro_ffi_checksum_method_loromap_subscribe() !== + 52134 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_loro_ffi_checksum_method_loromap_subscribe' + ); + } if ( nativeModule().ubrn_uniffi_loro_ffi_checksum_method_loromap_values() !== 59291 @@ -20258,6 +20564,14 @@ function uniffiEnsureInitialized() { 'uniffi_loro_ffi_checksum_method_loromovablelist_set_tree_container' ); } + if ( + nativeModule().ubrn_uniffi_loro_ffi_checksum_method_loromovablelist_subscribe() !== + 31212 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_loro_ffi_checksum_method_loromovablelist_subscribe' + ); + } if ( nativeModule().ubrn_uniffi_loro_ffi_checksum_method_loromovablelist_to_vec() !== 22764 @@ -20274,6 +20588,14 @@ function uniffiEnsureInitialized() { 'uniffi_loro_ffi_checksum_method_lorotext_apply_delta' ); } + if ( + nativeModule().ubrn_uniffi_loro_ffi_checksum_method_lorotext_char_at() !== + 49891 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_loro_ffi_checksum_method_lorotext_char_at' + ); + } if ( nativeModule().ubrn_uniffi_loro_ffi_checksum_method_lorotext_delete() !== 50707 @@ -20432,6 +20754,14 @@ function uniffiEnsureInitialized() { 'uniffi_loro_ffi_checksum_method_lorotext_splice' ); } + if ( + nativeModule().ubrn_uniffi_loro_ffi_checksum_method_lorotext_subscribe() !== + 55608 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_loro_ffi_checksum_method_lorotext_subscribe' + ); + } if ( nativeModule().ubrn_uniffi_loro_ffi_checksum_method_lorotext_to_delta() !== 49666 @@ -20685,6 +21015,14 @@ function uniffiEnsureInitialized() { 'uniffi_loro_ffi_checksum_method_lorotree_roots' ); } + if ( + nativeModule().ubrn_uniffi_loro_ffi_checksum_method_lorotree_subscribe() !== + 4481 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_loro_ffi_checksum_method_lorotree_subscribe' + ); + } if ( nativeModule().ubrn_uniffi_loro_ffi_checksum_method_lorounknown_id() !== 45333 diff --git a/ubrn.config.yaml b/ubrn.config.yaml index 297dfd1..5b9b33a 100644 --- a/ubrn.config.yaml +++ b/ubrn.config.yaml @@ -1,8 +1,8 @@ rust: - directory: ./loro-ffi + directory: ./loro-rs ios: - frameworkName: build/RustFramework + frameworkName: build/LoroFfiFramework targets: - aarch64-apple-ios - aarch64-apple-ios-sim