react-native-ariel 0.1.0-dev.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/Ariel.podspec +44 -0
  2. package/LICENSE +20 -0
  3. package/README.md +349 -0
  4. package/android/CMakeLists.txt +79 -0
  5. package/android/build.gradle +144 -0
  6. package/android/cpp-adapter.cpp +43 -0
  7. package/android/generated/android/app/build/generated/source/codegen/java/com/facebook/fbreact/specs/NativeArielSpec.java +41 -0
  8. package/android/generated/android/app/build/generated/source/codegen/jni/ArielSpec-generated.cpp +38 -0
  9. package/android/generated/android/app/build/generated/source/codegen/jni/ArielSpec.h +31 -0
  10. package/android/generated/android/app/build/generated/source/codegen/jni/CMakeLists.txt +28 -0
  11. package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/ArielSpec/ArielSpecJSI.h +45 -0
  12. package/android/src/main/AndroidManifest.xml +5 -0
  13. package/android/src/main/java/com/ariel/ArielModule.kt +43 -0
  14. package/android/src/main/java/com/ariel/ArielPackage.kt +34 -0
  15. package/android/src/main/jniLibs/arm64-v8a/libmermaid_wrapper.a +0 -0
  16. package/android/src/main/jniLibs/armeabi-v7a/libmermaid_wrapper.a +0 -0
  17. package/android/src/main/jniLibs/x86/libmermaid_wrapper.a +0 -0
  18. package/android/src/main/jniLibs/x86_64/libmermaid_wrapper.a +0 -0
  19. package/cpp/mermaid_wrapper.cpp +2368 -0
  20. package/cpp/mermaid_wrapper.hpp +77 -0
  21. package/cpp/react-native-ariel.cpp +16 -0
  22. package/cpp/react-native-ariel.h +15 -0
  23. package/ios/Ariel.h +16 -0
  24. package/ios/Ariel.mm +66 -0
  25. package/ios/generated/build/generated/ios/ReactCodegen/ArielSpec/ArielSpec-generated.mm +46 -0
  26. package/ios/generated/build/generated/ios/ReactCodegen/ArielSpec/ArielSpec.h +63 -0
  27. package/ios/generated/build/generated/ios/ReactCodegen/ArielSpecJSI.h +45 -0
  28. package/lib/module/NativeAriel.js +7 -0
  29. package/lib/module/NativeAriel.js.map +1 -0
  30. package/lib/module/generated/rn/mermaid_wrapper-ffi.js +47 -0
  31. package/lib/module/generated/rn/mermaid_wrapper-ffi.js.map +1 -0
  32. package/lib/module/generated/rn/mermaid_wrapper.js +487 -0
  33. package/lib/module/generated/rn/mermaid_wrapper.js.map +1 -0
  34. package/lib/module/generated/web/mermaid_wrapper.js +532 -0
  35. package/lib/module/generated/web/mermaid_wrapper.js.map +1 -0
  36. package/lib/module/index.js +43 -0
  37. package/lib/module/index.js.map +1 -0
  38. package/lib/module/index.web.js +28 -0
  39. package/lib/module/index.web.js.map +2 -0
  40. package/lib/module/package.json +1 -0
  41. package/lib/typescript/package.json +1 -0
  42. package/lib/typescript/src/NativeAriel.d.ts +8 -0
  43. package/lib/typescript/src/NativeAriel.d.ts.map +1 -0
  44. package/lib/typescript/src/generated/rn/mermaid_wrapper-ffi.d.ts +102 -0
  45. package/lib/typescript/src/generated/rn/mermaid_wrapper-ffi.d.ts.map +1 -0
  46. package/lib/typescript/src/generated/rn/mermaid_wrapper.d.ts +291 -0
  47. package/lib/typescript/src/generated/rn/mermaid_wrapper.d.ts.map +1 -0
  48. package/lib/typescript/src/generated/web/mermaid_wrapper.d.ts +291 -0
  49. package/lib/typescript/src/generated/web/mermaid_wrapper.d.ts.map +1 -0
  50. package/lib/typescript/src/index.d.ts +8 -0
  51. package/lib/typescript/src/index.d.ts.map +1 -0
  52. package/lib/typescript/src/index.web.d.ts +8 -0
  53. package/lib/typescript/src/index.web.d.ts.map +1 -0
  54. package/package.json +146 -0
  55. package/react-native.config.js +15 -0
  56. package/src/NativeAriel.ts +10 -0
  57. package/src/generated/rn/mermaid_wrapper-ffi.ts +161 -0
  58. package/src/generated/rn/mermaid_wrapper.ts +765 -0
  59. package/src/generated/web/mermaid_wrapper.ts +771 -0
  60. package/src/index.tsx +41 -0
  61. package/src/index.web.ts +26 -0
  62. package/src/index.web.tsx +17 -0
@@ -0,0 +1,77 @@
1
+ // This file was autogenerated by some hot garbage in the `uniffi-bindgen-react-native` crate.
2
+ // Trust me, you don't want to mess with it!
3
+ #pragma once
4
+ #include <jsi/jsi.h>
5
+ #include <iostream>
6
+ #include <map>
7
+ #include <memory>
8
+ #include <ReactCommon/CallInvoker.h>
9
+ #include "UniffiCallInvoker.h"
10
+
11
+ namespace react = facebook::react;
12
+ namespace jsi = facebook::jsi;
13
+
14
+ class NativeMermaidWrapper : public jsi::HostObject {
15
+ private:
16
+ // For calling back into JS from Rust.
17
+ std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker;
18
+
19
+ protected:
20
+ std::map<std::string,jsi::Value> props;
21
+ jsi::Value cpp_uniffi_internal_fn_func_ffi__string_to_byte_length(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
22
+ jsi::Value cpp_uniffi_internal_fn_func_ffi__string_to_arraybuffer(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
23
+ jsi::Value cpp_uniffi_internal_fn_func_ffi__arraybuffer_to_string(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
24
+ jsi::Value cpp_uniffi_mermaid_wrapper_fn_clone_ariellayout(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
25
+ jsi::Value cpp_uniffi_mermaid_wrapper_fn_free_ariellayout(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
26
+ jsi::Value cpp_uniffi_mermaid_wrapper_fn_clone_arielparseddiagram(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
27
+ jsi::Value cpp_uniffi_mermaid_wrapper_fn_free_arielparseddiagram(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
28
+ jsi::Value cpp_uniffi_mermaid_wrapper_fn_clone_arieltheme(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
29
+ jsi::Value cpp_uniffi_mermaid_wrapper_fn_free_arieltheme(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
30
+ jsi::Value cpp_uniffi_mermaid_wrapper_fn_constructor_arieltheme_mermaid_default(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
31
+ jsi::Value cpp_uniffi_mermaid_wrapper_fn_constructor_arieltheme_modern(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
32
+ jsi::Value cpp_uniffi_mermaid_wrapper_fn_func_compute_diagram_layout(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
33
+ jsi::Value cpp_uniffi_mermaid_wrapper_fn_func_parse_diagram(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
34
+ jsi::Value cpp_uniffi_mermaid_wrapper_fn_func_render_mermaid(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
35
+ jsi::Value cpp_uniffi_mermaid_wrapper_fn_func_render_mermaid_with_options(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
36
+ jsi::Value cpp_uniffi_mermaid_wrapper_fn_func_render_mermaid_with_timing(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
37
+ jsi::Value cpp_uniffi_mermaid_wrapper_fn_func_render_svg_from_layout(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
38
+ jsi::Value cpp_uniffi_mermaid_wrapper_fn_func_set_timing_logs(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
39
+ jsi::Value cpp_uniffi_mermaid_wrapper_checksum_func_compute_diagram_layout(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
40
+ jsi::Value cpp_uniffi_mermaid_wrapper_checksum_func_parse_diagram(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
41
+ jsi::Value cpp_uniffi_mermaid_wrapper_checksum_func_render_mermaid(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
42
+ jsi::Value cpp_uniffi_mermaid_wrapper_checksum_func_render_mermaid_with_options(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
43
+ jsi::Value cpp_uniffi_mermaid_wrapper_checksum_func_render_mermaid_with_timing(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
44
+ jsi::Value cpp_uniffi_mermaid_wrapper_checksum_func_render_svg_from_layout(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
45
+ jsi::Value cpp_uniffi_mermaid_wrapper_checksum_func_set_timing_logs(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
46
+ jsi::Value cpp_uniffi_mermaid_wrapper_checksum_constructor_arieltheme_mermaid_default(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
47
+ jsi::Value cpp_uniffi_mermaid_wrapper_checksum_constructor_arieltheme_modern(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
48
+ jsi::Value cpp_ffi_mermaid_wrapper_uniffi_contract_version(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
49
+ jsi::Value cpp_uniffi_internal_fn_method_ariellayout_ffi__bless_pointer(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
50
+ jsi::Value cpp_uniffi_internal_fn_method_arielparseddiagram_ffi__bless_pointer(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
51
+ jsi::Value cpp_uniffi_internal_fn_method_arieltheme_ffi__bless_pointer(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
52
+
53
+ public:
54
+ NativeMermaidWrapper(jsi::Runtime &rt, std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker);
55
+ virtual ~NativeMermaidWrapper();
56
+
57
+ /**
58
+ * The entry point into the crate.
59
+ *
60
+ * React Native must call `NativeMermaidWrapper.registerModule(rt, callInvoker)` before using
61
+ * the Javascript interface.
62
+ */
63
+ static void registerModule(jsi::Runtime &rt, std::shared_ptr<react::CallInvoker> callInvoker);
64
+
65
+ /**
66
+ * Some cleanup into the crate goes here.
67
+ *
68
+ * Current implementation is empty, however, this is not guaranteed to always be the case.
69
+ *
70
+ * Clients should call `NativeMermaidWrapper.unregisterModule(rt)` after final use where possible.
71
+ */
72
+ static void unregisterModule(jsi::Runtime &rt);
73
+
74
+ virtual jsi::Value get(jsi::Runtime& rt, const jsi::PropNameID& name);
75
+ virtual void set(jsi::Runtime& rt,const jsi::PropNameID& name,const jsi::Value& value);
76
+ virtual std::vector<jsi::PropNameID> getPropertyNames(jsi::Runtime& rt);
77
+ };
@@ -0,0 +1,16 @@
1
+ // Generated by uniffi-bindgen-react-native
2
+ #include "react-native-ariel.h"
3
+ #include "generated/mermaid_wrapper.hpp"
4
+
5
+ namespace ariel {
6
+ using namespace facebook;
7
+
8
+ uint8_t installRustCrate(jsi::Runtime &runtime, std::shared_ptr<react::CallInvoker> callInvoker) {
9
+ NativeMermaidWrapper::registerModule(runtime, callInvoker);
10
+ return true;
11
+ }
12
+
13
+ uint8_t cleanupRustCrate(jsi::Runtime &runtime) {
14
+ return false;
15
+ }
16
+ }
@@ -0,0 +1,15 @@
1
+ #ifndef ARIEL_H
2
+ #define ARIEL_H
3
+ // Generated by uniffi-bindgen-react-native
4
+ #include <cstdint>
5
+ #include <jsi/jsi.h>
6
+ #include <ReactCommon/CallInvoker.h>
7
+
8
+ namespace ariel {
9
+ using namespace facebook;
10
+
11
+ uint8_t installRustCrate(jsi::Runtime &runtime, std::shared_ptr<react::CallInvoker> callInvoker);
12
+ uint8_t cleanupRustCrate(jsi::Runtime &runtime);
13
+ }
14
+
15
+ #endif /* ARIEL_H */
package/ios/Ariel.h ADDED
@@ -0,0 +1,16 @@
1
+ // Generated by uniffi-bindgen-react-native
2
+ #ifdef __cplusplus
3
+ #import "react-native-ariel.h"
4
+ #endif
5
+
6
+ #ifdef RCT_NEW_ARCH_ENABLED
7
+ #import "ArielSpec.h"
8
+
9
+ @interface Ariel : NSObject <NativeArielSpec>
10
+ #else
11
+ #import <React/RCTBridgeModule.h>
12
+
13
+ @interface Ariel : NSObject <RCTBridgeModule>
14
+ #endif
15
+
16
+ @end
package/ios/Ariel.mm ADDED
@@ -0,0 +1,66 @@
1
+ // Generated by uniffi-bindgen-react-native
2
+ #import "Ariel.h"
3
+
4
+ namespace uniffi_generated {
5
+ using namespace facebook::react;
6
+ /**
7
+ * ObjC++ class for module 'NativeAriel'
8
+ */
9
+ class JSI_EXPORT NativeArielSpecJSI : public ObjCTurboModule {
10
+ public:
11
+ NativeArielSpecJSI(const ObjCTurboModule::InitParams &params);
12
+ std::shared_ptr<CallInvoker> callInvoker;
13
+ };
14
+
15
+ static facebook::jsi::Value __hostFunction_Ariel_installRustCrate(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
16
+ auto& tm = static_cast<NativeArielSpecJSI&>(turboModule);
17
+ auto jsInvoker = tm.callInvoker;
18
+ uint8_t result = ariel::installRustCrate(rt, jsInvoker);
19
+ return facebook::jsi::Value(rt, result);
20
+ }
21
+ static facebook::jsi::Value __hostFunction_Ariel_cleanupRustCrate(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
22
+ uint8_t result = ariel::cleanupRustCrate(rt);
23
+ return facebook::jsi::Value(rt, result);
24
+ }
25
+
26
+ NativeArielSpecJSI::NativeArielSpecJSI(const ObjCTurboModule::InitParams &params)
27
+ : ObjCTurboModule(params), callInvoker(params.jsInvoker) {
28
+ this->methodMap_["installRustCrate"] = MethodMetadata {1, __hostFunction_Ariel_installRustCrate};
29
+ this->methodMap_["cleanupRustCrate"] = MethodMetadata {1, __hostFunction_Ariel_cleanupRustCrate};
30
+ }
31
+ } // namespace uniffi_generated
32
+
33
+ @implementation Ariel
34
+ RCT_EXPORT_MODULE()
35
+
36
+ // Don't compile this code when we build for the old architecture.
37
+ #ifdef RCT_NEW_ARCH_ENABLED
38
+
39
+ // Automated testing checks ariel
40
+ // by comparing the whole line here.
41
+ /*
42
+ - (NSNumber *)multiply:(double)a b:(double)b {
43
+ NSNumber *result = @(ariel::multiply(a, b));
44
+ }
45
+ */
46
+
47
+ - (NSNumber *)installRustCrate {
48
+ @throw [NSException exceptionWithName:@"UnreachableException"
49
+ reason:@"This method should never be called."
50
+ userInfo:nil];
51
+ }
52
+
53
+ - (NSNumber *)cleanupRustCrate {
54
+ @throw [NSException exceptionWithName:@"UnreachableException"
55
+ reason:@"This method should never be called."
56
+ userInfo:nil];
57
+ }
58
+
59
+ - (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:
60
+ (const facebook::react::ObjCTurboModule::InitParams &)params
61
+ {
62
+ return std::make_shared<uniffi_generated::NativeArielSpecJSI>(params);
63
+ }
64
+ #endif
65
+
66
+ @end
@@ -0,0 +1,46 @@
1
+ /**
2
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
3
+ *
4
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
5
+ * once the code is regenerated.
6
+ *
7
+ * @generated by codegen project: GenerateModuleObjCpp
8
+ *
9
+ * We create an umbrella header (and corresponding implementation) here since
10
+ * Cxx compilation in BUCK has a limitation: source-code producing genrule()s
11
+ * must have a single output. More files => more genrule()s => slower builds.
12
+ */
13
+
14
+ #import "ArielSpec.h"
15
+
16
+
17
+ @implementation NativeArielSpecBase
18
+
19
+
20
+ - (void)setEventEmitterCallback:(EventEmitterCallbackWrapper *)eventEmitterCallbackWrapper
21
+ {
22
+ _eventEmitterCallback = std::move(eventEmitterCallbackWrapper->_eventEmitterCallback);
23
+ }
24
+ @end
25
+
26
+
27
+ namespace facebook::react {
28
+
29
+ static facebook::jsi::Value __hostFunction_NativeArielSpecJSI_installRustCrate(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
30
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, BooleanKind, "installRustCrate", @selector(installRustCrate), args, count);
31
+ }
32
+
33
+ static facebook::jsi::Value __hostFunction_NativeArielSpecJSI_cleanupRustCrate(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
34
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, BooleanKind, "cleanupRustCrate", @selector(cleanupRustCrate), args, count);
35
+ }
36
+
37
+ NativeArielSpecJSI::NativeArielSpecJSI(const ObjCTurboModule::InitParams &params)
38
+ : ObjCTurboModule(params) {
39
+
40
+ methodMap_["installRustCrate"] = MethodMetadata {0, __hostFunction_NativeArielSpecJSI_installRustCrate};
41
+
42
+
43
+ methodMap_["cleanupRustCrate"] = MethodMetadata {0, __hostFunction_NativeArielSpecJSI_cleanupRustCrate};
44
+
45
+ }
46
+ } // namespace facebook::react
@@ -0,0 +1,63 @@
1
+ /**
2
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
3
+ *
4
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
5
+ * once the code is regenerated.
6
+ *
7
+ * @generated by codegen project: GenerateModuleObjCpp
8
+ *
9
+ * We create an umbrella header (and corresponding implementation) here since
10
+ * Cxx compilation in BUCK has a limitation: source-code producing genrule()s
11
+ * must have a single output. More files => more genrule()s => slower builds.
12
+ */
13
+
14
+ #ifndef __cplusplus
15
+ #error This file must be compiled as Obj-C++. If you are importing it, you must change your file extension to .mm.
16
+ #endif
17
+
18
+ // Avoid multiple includes of ArielSpec symbols
19
+ #ifndef ArielSpec_H
20
+ #define ArielSpec_H
21
+
22
+ #import <Foundation/Foundation.h>
23
+ #import <RCTRequired/RCTRequired.h>
24
+ #import <RCTTypeSafety/RCTConvertHelpers.h>
25
+ #import <RCTTypeSafety/RCTTypedModuleConstants.h>
26
+ #import <React/RCTBridgeModule.h>
27
+ #import <React/RCTCxxConvert.h>
28
+ #import <React/RCTManagedPointer.h>
29
+ #import <ReactCommon/RCTTurboModule.h>
30
+ #import <optional>
31
+ #import <vector>
32
+
33
+
34
+ NS_ASSUME_NONNULL_BEGIN
35
+
36
+ @protocol NativeArielSpec <RCTBridgeModule, RCTTurboModule>
37
+
38
+ - (NSNumber *)installRustCrate;
39
+ - (NSNumber *)cleanupRustCrate;
40
+
41
+ @end
42
+
43
+ @interface NativeArielSpecBase : NSObject {
44
+ @protected
45
+ facebook::react::EventEmitterCallback _eventEmitterCallback;
46
+ }
47
+ - (void)setEventEmitterCallback:(EventEmitterCallbackWrapper *)eventEmitterCallbackWrapper;
48
+
49
+
50
+ @end
51
+
52
+ namespace facebook::react {
53
+ /**
54
+ * ObjC++ class for module 'NativeAriel'
55
+ */
56
+ class JSI_EXPORT NativeArielSpecJSI : public ObjCTurboModule {
57
+ public:
58
+ NativeArielSpecJSI(const ObjCTurboModule::InitParams &params);
59
+ };
60
+ } // namespace facebook::react
61
+
62
+ NS_ASSUME_NONNULL_END
63
+ #endif // ArielSpec_H
@@ -0,0 +1,45 @@
1
+ /**
2
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
3
+ *
4
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
5
+ * once the code is regenerated.
6
+ *
7
+ * @generated by codegen project: GenerateModuleH.js
8
+ */
9
+
10
+ #pragma once
11
+
12
+ #include <ReactCommon/TurboModule.h>
13
+ #include <react/bridging/Bridging.h>
14
+
15
+ namespace facebook::react {
16
+
17
+
18
+ template <typename T>
19
+ class JSI_EXPORT NativeArielCxxSpec : public TurboModule {
20
+ public:
21
+ static constexpr std::string_view kModuleName = "Ariel";
22
+
23
+ protected:
24
+ NativeArielCxxSpec(std::shared_ptr<CallInvoker> jsInvoker) : TurboModule(std::string{NativeArielCxxSpec::kModuleName}, jsInvoker) {
25
+ methodMap_["installRustCrate"] = MethodMetadata {.argCount = 0, .invoker = __installRustCrate};
26
+ methodMap_["cleanupRustCrate"] = MethodMetadata {.argCount = 0, .invoker = __cleanupRustCrate};
27
+ }
28
+
29
+ private:
30
+ static jsi::Value __installRustCrate(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* /*args*/, size_t /*count*/) {
31
+ static_assert(
32
+ bridging::getParameterCount(&T::installRustCrate) == 1,
33
+ "Expected installRustCrate(...) to have 1 parameters");
34
+ return bridging::callFromJs<bool>(rt, &T::installRustCrate, static_cast<NativeArielCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule));
35
+ }
36
+
37
+ static jsi::Value __cleanupRustCrate(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* /*args*/, size_t /*count*/) {
38
+ static_assert(
39
+ bridging::getParameterCount(&T::cleanupRustCrate) == 1,
40
+ "Expected cleanupRustCrate(...) to have 1 parameters");
41
+ return bridging::callFromJs<bool>(rt, &T::cleanupRustCrate, static_cast<NativeArielCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule));
42
+ }
43
+ };
44
+
45
+ } // namespace facebook::react
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+
3
+ // Generated by uniffi-bindgen-react-native
4
+
5
+ import { TurboModuleRegistry } from 'react-native';
6
+ export default TurboModuleRegistry.getEnforcing('Ariel');
7
+ //# sourceMappingURL=NativeAriel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../src","sources":["NativeAriel.ts"],"mappings":";;AAAA;;AAEA,SAASA,mBAAmB,QAAQ,cAAc;AAOlD,eAAeA,mBAAmB,CAACC,YAAY,CAAO,OAAO,CAAC","ignoreList":[]}
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+
3
+ // This file was autogenerated by some hot garbage in the `uniffi-bindgen-react-native` crate.
4
+ // Trust me, you don't want to mess with it!
5
+
6
+ /* tslint:disable */
7
+ /* eslint-disable */
8
+ // @ts-nocheck
9
+
10
+ // Casting globalThis to any allows us to look for `NativeMermaidWrapper`
11
+ // if it was added via JSI.
12
+ //
13
+ // We use a getter here rather than simply `globalThis.NativeMermaidWrapper` so that
14
+ // if/when the startup sequence isn't just so, an empty value isn't inadvertantly cached.
15
+ const getter = () => globalThis.NativeMermaidWrapper;
16
+ export default getter;
17
+
18
+ // Structs and function types for calling back into Typescript from Rust.
19
+
20
+ // UniffiRustFutureContinuationCallback is generated as part of the component interface's
21
+ // ffi_definitions. However, we need it in the runtime.
22
+ // We could:
23
+ // (a) do some complicated template logic to ensure the declaration is not generated here (possible)
24
+ // (b) import the generated declaration into the runtime (m a y b e) or…
25
+ // (c) generate the declaration anyway, and use a different declaration in the runtime.
26
+ //
27
+ // We chose (c) here as the simplest. In addition, we perform a compile time check that
28
+ // the two versions of `UniffiRustFutureContinuationCallback` are structurally equivalent.
29
+ //
30
+ // If you see the error:
31
+ // ```
32
+ // Type 'true' is not assignable to type 'false'.(2322)
33
+ // ```
34
+ // Then a new version of uniffi has changed the signature of the callback. Most likely, code in
35
+ // `typescript/src/async-rust-call.ts` will need to be changed.
36
+ //
37
+ // If you see the error:
38
+ // ```
39
+ // Cannot find name 'UniffiRustFutureContinuationCallback'. Did you mean 'RuntimeUniffiRustFutureContinuationCallback'?(2552)
40
+ // ```
41
+ // then you may not be using callbacks or promises, and uniffi is now not generating Futures and callbacks.
42
+ // You should not generate this if that is the case.
43
+ //
44
+ // ('You' being the bindings generator maintainer).
45
+ const isRustFutureContinuationCallbackTypeCompatible = true;
46
+ const isUniffiForeignFutureTypeCompatible = true;
47
+ //# sourceMappingURL=mermaid_wrapper-ffi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["getter","globalThis","NativeMermaidWrapper","isRustFutureContinuationCallbackTypeCompatible","isUniffiForeignFutureTypeCompatible"],"sourceRoot":"../../../../src","sources":["generated/rn/mermaid_wrapper-ffi.ts"],"mappings":";;AAAA;AACA;;AAEA;AACA;AACA;;AA6CA;AACA;AACA;AACA;AACA;AACA,MAAMA,MAAmC,GAAGA,CAAA,KAAOC,UAAU,CAASC,oBAAoB;AAC1F,eAAeF,MAAM;;AAErB;;AAsEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMG,8CAGL,GAAG,IAAI;AACR,MAAMC,mCAGL,GAAG,IAAI","ignoreList":[]}