react-native-ariel 0.1.0-dev.5 → 0.1.0-dev.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Ariel.podspec +2 -2
- package/README.md +10 -65
- package/android/CMakeLists.txt +12 -12
- package/android/build.gradle +11 -9
- package/android/generated/{android/app/build/generated/source/codegen/java/com/facebook/fbreact/specs → java/com/ariel}/NativeArielSpec.java +1 -1
- package/android/generated/{android/app/build/generated/source/codegen/jni → jni}/CMakeLists.txt +9 -1
- package/android/generated/jni/react/renderer/components/ArielSpec/ArielSpecJSI-generated.cpp +32 -0
- package/android/generated/jni/react/renderer/components/ArielSpec/ArielSpecJSI.h +80 -0
- package/android/proguard-rules.pro +4 -0
- package/android/src/main/java/com/ariel/ArielModule.kt +11 -1
- package/cpp/generated/mermaid_wrapper.cpp +2369 -0
- package/cpp/generated/mermaid_wrapper.hpp +77 -0
- package/cpp/mermaid_wrapper.cpp +1 -0
- package/ios/generated/ArielSpecJSI-generated.cpp +32 -0
- package/ios/generated/ArielSpecJSI.h +80 -0
- package/lib/module/index.web.js +4 -6
- package/lib/module/index.web.js.map +1 -2
- package/package.json +31 -25
- package/react-native.config.js +0 -1
- package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/ArielSpec/ArielSpecJSI.h +0 -45
- package/ios/generated/build/generated/ios/ReactCodegen/ArielSpecJSI.h +0 -45
- package/lib/typescript/src/index.web.d.ts +0 -8
- package/lib/typescript/src/index.web.d.ts.map +0 -1
- package/src/generated/web/wasm-bindgen/package.json +0 -15
- /package/android/generated/{android/app/build/generated/source/codegen/jni → jni}/ArielSpec-generated.cpp +0 -0
- /package/android/generated/{android/app/build/generated/source/codegen/jni → jni}/ArielSpec.h +0 -0
- /package/ios/generated/{build/generated/ios/ReactCodegen/ArielSpec → ArielSpec}/ArielSpec-generated.mm +0 -0
- /package/ios/generated/{build/generated/ios/ReactCodegen/ArielSpec → ArielSpec}/ArielSpec.h +0 -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
|
+
};
|
package/cpp/mermaid_wrapper.cpp
CHANGED
|
@@ -0,0 +1,32 @@
|
|
|
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: GenerateModuleCpp.js
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
#include "ArielSpecJSI.h"
|
|
11
|
+
|
|
12
|
+
namespace facebook::react {
|
|
13
|
+
|
|
14
|
+
static jsi::Value __hostFunction_NativeArielCxxSpecJSI_installRustCrate(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
15
|
+
return static_cast<NativeArielCxxSpecJSI *>(&turboModule)->installRustCrate(
|
|
16
|
+
rt
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
static jsi::Value __hostFunction_NativeArielCxxSpecJSI_cleanupRustCrate(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
20
|
+
return static_cast<NativeArielCxxSpecJSI *>(&turboModule)->cleanupRustCrate(
|
|
21
|
+
rt
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
NativeArielCxxSpecJSI::NativeArielCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker)
|
|
26
|
+
: TurboModule("Ariel", jsInvoker) {
|
|
27
|
+
methodMap_["installRustCrate"] = MethodMetadata {0, __hostFunction_NativeArielCxxSpecJSI_installRustCrate};
|
|
28
|
+
methodMap_["cleanupRustCrate"] = MethodMetadata {0, __hostFunction_NativeArielCxxSpecJSI_cleanupRustCrate};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
} // namespace facebook::react
|
|
@@ -0,0 +1,80 @@
|
|
|
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
|
+
class JSI_EXPORT NativeArielCxxSpecJSI : public TurboModule {
|
|
19
|
+
protected:
|
|
20
|
+
NativeArielCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
|
|
21
|
+
|
|
22
|
+
public:
|
|
23
|
+
virtual bool installRustCrate(jsi::Runtime &rt) = 0;
|
|
24
|
+
virtual bool cleanupRustCrate(jsi::Runtime &rt) = 0;
|
|
25
|
+
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
template <typename T>
|
|
29
|
+
class JSI_EXPORT NativeArielCxxSpec : public TurboModule {
|
|
30
|
+
public:
|
|
31
|
+
jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override {
|
|
32
|
+
return delegate_.create(rt, propName);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
std::vector<jsi::PropNameID> getPropertyNames(jsi::Runtime& runtime) override {
|
|
36
|
+
return delegate_.getPropertyNames(runtime);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
static constexpr std::string_view kModuleName = "Ariel";
|
|
40
|
+
|
|
41
|
+
protected:
|
|
42
|
+
NativeArielCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
43
|
+
: TurboModule(std::string{NativeArielCxxSpec::kModuleName}, jsInvoker),
|
|
44
|
+
delegate_(reinterpret_cast<T*>(this), jsInvoker) {}
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
private:
|
|
48
|
+
class Delegate : public NativeArielCxxSpecJSI {
|
|
49
|
+
public:
|
|
50
|
+
Delegate(T *instance, std::shared_ptr<CallInvoker> jsInvoker) :
|
|
51
|
+
NativeArielCxxSpecJSI(std::move(jsInvoker)), instance_(instance) {
|
|
52
|
+
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
bool installRustCrate(jsi::Runtime &rt) override {
|
|
56
|
+
static_assert(
|
|
57
|
+
bridging::getParameterCount(&T::installRustCrate) == 1,
|
|
58
|
+
"Expected installRustCrate(...) to have 1 parameters");
|
|
59
|
+
|
|
60
|
+
return bridging::callFromJs<bool>(
|
|
61
|
+
rt, &T::installRustCrate, jsInvoker_, instance_);
|
|
62
|
+
}
|
|
63
|
+
bool cleanupRustCrate(jsi::Runtime &rt) override {
|
|
64
|
+
static_assert(
|
|
65
|
+
bridging::getParameterCount(&T::cleanupRustCrate) == 1,
|
|
66
|
+
"Expected cleanupRustCrate(...) to have 1 parameters");
|
|
67
|
+
|
|
68
|
+
return bridging::callFromJs<bool>(
|
|
69
|
+
rt, &T::cleanupRustCrate, jsInvoker_, instance_);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
private:
|
|
73
|
+
friend class NativeArielCxxSpec;
|
|
74
|
+
T *instance_;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
Delegate delegate_;
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
} // namespace facebook::react
|
package/lib/module/index.web.js
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
// Generated by uniffi-bindgen-react-native
|
|
4
4
|
// Export the generated bindings to the app.
|
|
5
5
|
export * from "./generated/web/mermaid_wrapper.js";
|
|
6
|
+
|
|
7
|
+
// Now import the bindings so we can:
|
|
8
|
+
// - intialize them
|
|
9
|
+
// - export them as namespaced objects as the default export.
|
|
6
10
|
import * as mermaid_wrapper from "./generated/web/mermaid_wrapper.js";
|
|
7
11
|
import initAsync from './generated/web/wasm-bindgen/react_native_ariel.js';
|
|
8
12
|
import wasmPath from './generated/web/wasm-bindgen/react_native_ariel_bg.wasm';
|
|
@@ -10,12 +14,6 @@ export async function uniffiInitAsync() {
|
|
|
10
14
|
await initAsync({
|
|
11
15
|
module_or_path: wasmPath
|
|
12
16
|
});
|
|
13
|
-
mermaid_wrapper.default.initialize();
|
|
14
|
-
}
|
|
15
|
-
export default {
|
|
16
|
-
mermaid_wrapper
|
|
17
|
-
};
|
|
18
|
-
//# sourceMappingURL=index.web.js.map});
|
|
19
17
|
|
|
20
18
|
// Initialize the generated bindings: mostly checksums, but also callbacks.
|
|
21
19
|
// - the boolean flag ensures this loads exactly once, even if the JS code
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
{"version":3,"names":["mermaid_wrapper","initAsync","wasmPath","uniffiInitAsync","module_or_path","default","initialize"],"sourceRoot":"../../src","sources":["index.web.
|
|
2
|
-
Ae;EACbN;AACF,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["mermaid_wrapper","initAsync","wasmPath","uniffiInitAsync","module_or_path","default","initialize"],"sourceRoot":"../../src","sources":["index.web.ts"],"mappings":";;AAAA;AACA;AACA,cAAc,oCAAiC;;AAE/C;AACA;AACA;AACA,OAAO,KAAKA,eAAe,MAAM,oCAAiC;AAElE,OAAOC,SAAS,MAAM,oDAAoD;AAC1E,OAAOC,QAAQ,MAAM,yDAAyD;AAE9E,OAAO,eAAeC,eAAeA,CAAA,EAAG;EACtC,MAAMF,SAAS,CAAC;IAAEG,cAAc,EAAEF;EAAS,CAAC,CAAC;;EAE7C;EACA;EACA;EACAF,eAAe,CAACK,OAAO,CAACC,UAAU,CAAC,CAAC;AACtC;;AAEA;AACA,eAAe;EACbN;AACF,CAAC","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-ariel",
|
|
3
|
-
"version": "0.1.0-dev.
|
|
3
|
+
"version": "0.1.0-dev.50",
|
|
4
4
|
"description": "Mermaid diagrams for React Native and React Native Web. No DOM. No WebView. Pure Rust.",
|
|
5
5
|
"main": "./lib/module/index.js",
|
|
6
6
|
"source": "./src/index.tsx",
|
|
7
7
|
"types": "./lib/typescript/src/index.d.ts",
|
|
8
8
|
"exports": {
|
|
9
9
|
".": {
|
|
10
|
+
"browser": "./lib/module/index.web.js",
|
|
10
11
|
"source": "./src/index.tsx",
|
|
11
12
|
"types": "./lib/typescript/src/index.d.ts",
|
|
12
13
|
"default": "./lib/module/index.js"
|
|
@@ -33,15 +34,11 @@
|
|
|
33
34
|
"!**/.*"
|
|
34
35
|
],
|
|
35
36
|
"scripts": {
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"example:ios": "yarn workspace react-native-ariel-example ios",
|
|
39
|
-
"example:web": "yarn workspace react-native-ariel-example web",
|
|
40
|
-
"clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib",
|
|
41
|
-
"prepare": "bob build",
|
|
37
|
+
"clean": "del-cli android/build lib",
|
|
38
|
+
"prepare": "bob build && node scripts/copy-wasm-to-lib.js",
|
|
42
39
|
"typecheck": "tsc",
|
|
43
40
|
"test": "jest",
|
|
44
|
-
"ubrn:ios": "ubrn build ios
|
|
41
|
+
"ubrn:ios": "ubrn build ios",
|
|
45
42
|
"ubrn:ios-ci": "ubrn build ios",
|
|
46
43
|
"ubrn:android": "ubrn build android",
|
|
47
44
|
"ubrn:web": "wasm-pack build rust_modules/wasm --target web --out-dir ../../src/generated/web/wasm-bindgen && node scripts/patch-wasm.js",
|
|
@@ -53,44 +50,51 @@
|
|
|
53
50
|
"keywords": [
|
|
54
51
|
"react-native",
|
|
55
52
|
"ios",
|
|
56
|
-
"android"
|
|
53
|
+
"android",
|
|
54
|
+
"mermaid",
|
|
55
|
+
"mermaid-js",
|
|
56
|
+
"svg",
|
|
57
|
+
"diagram",
|
|
58
|
+
"flowchart",
|
|
59
|
+
"rust",
|
|
60
|
+
"wasm",
|
|
61
|
+
"web",
|
|
62
|
+
"no-webview",
|
|
63
|
+
"turbo-module",
|
|
64
|
+
"jsi"
|
|
57
65
|
],
|
|
58
66
|
"repository": {
|
|
59
67
|
"type": "git",
|
|
60
|
-
"url": "git+https://github.com/
|
|
68
|
+
"url": "git+https://github.com/rinfimate/ariel.git"
|
|
61
69
|
},
|
|
62
|
-
"author": "Rochanglien Infimate <r.infimate@gmail.com> (https://github.com/
|
|
70
|
+
"author": "Rochanglien Infimate <r.infimate@gmail.com> (https://github.com/rinfimate)",
|
|
63
71
|
"license": "MIT",
|
|
64
72
|
"bugs": {
|
|
65
|
-
"url": "https://github.com/
|
|
73
|
+
"url": "https://github.com/rinfimate/ariel/issues"
|
|
66
74
|
},
|
|
67
|
-
"homepage": "https://github.com/
|
|
75
|
+
"homepage": "https://github.com/rinfimate/ariel#readme",
|
|
68
76
|
"publishConfig": {
|
|
69
77
|
"registry": "https://registry.npmjs.org/"
|
|
70
78
|
},
|
|
71
79
|
"devDependencies": {
|
|
72
80
|
"@jest/globals": "^30.0.0",
|
|
73
81
|
"@react-native-community/cli": "20.1.0",
|
|
74
|
-
"@react-native/babel-preset": "0.
|
|
75
|
-
"@react
|
|
76
|
-
"@types/react": "^19.2.0",
|
|
82
|
+
"@react-native/babel-preset": "0.77.0",
|
|
83
|
+
"@types/react": "^18.3.0",
|
|
77
84
|
"del-cli": "^7.0.0",
|
|
78
85
|
"jest": "^30.3.0",
|
|
79
86
|
"prettier": "^3.8.3",
|
|
80
|
-
"react": "
|
|
81
|
-
"react-native": "0.
|
|
87
|
+
"react": "18.3.1",
|
|
88
|
+
"react-native": "0.77.0",
|
|
82
89
|
"react-native-builder-bob": "^0.41.0",
|
|
83
90
|
"turbo": "^2.8.21",
|
|
84
91
|
"typescript": "^6.0.2"
|
|
85
92
|
},
|
|
86
93
|
"peerDependencies": {
|
|
87
94
|
"react": "*",
|
|
88
|
-
"react-native": "
|
|
95
|
+
"react-native": ">=0.73.0",
|
|
89
96
|
"react-native-svg": ">=13.0.0"
|
|
90
97
|
},
|
|
91
|
-
"workspaces": [
|
|
92
|
-
"example"
|
|
93
|
-
],
|
|
94
98
|
"packageManager": "yarn@4.11.0",
|
|
95
99
|
"react-native-builder-bob": {
|
|
96
100
|
"source": "src",
|
|
@@ -123,12 +127,14 @@
|
|
|
123
127
|
"android": {
|
|
124
128
|
"javaPackageName": "com.ariel"
|
|
125
129
|
},
|
|
126
|
-
"includesGeneratedCode":
|
|
130
|
+
"includesGeneratedCode": true
|
|
127
131
|
},
|
|
128
132
|
"jest": {
|
|
129
|
-
"
|
|
133
|
+
"testEnvironment": "node",
|
|
134
|
+
"transform": {
|
|
135
|
+
"^.+\\.(ts|tsx|js|jsx)$": "babel-jest"
|
|
136
|
+
},
|
|
130
137
|
"modulePathIgnorePatterns": [
|
|
131
|
-
"<rootDir>/example/node_modules",
|
|
132
138
|
"<rootDir>/lib/"
|
|
133
139
|
]
|
|
134
140
|
},
|
package/react-native.config.js
CHANGED
|
@@ -1,45 +0,0 @@
|
|
|
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
|
|
@@ -1,45 +0,0 @@
|
|
|
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
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export * from './generated/web/mermaid_wrapper';
|
|
2
|
-
import * as mermaid_wrapper from './generated/web/mermaid_wrapper';
|
|
3
|
-
export declare function uniffiInitAsync(): Promise<void>;
|
|
4
|
-
declare const _default: {
|
|
5
|
-
mermaid_wrapper: typeof mermaid_wrapper;
|
|
6
|
-
};
|
|
7
|
-
export default _default;
|
|
8
|
-
//# sourceMappingURL=index.web.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../src/index.web.ts"],"names":[],"mappings":"AAEA,cAAc,iCAAiC,CAAC;AAKhD,OAAO,KAAK,eAAe,MAAM,iCAAiC,CAAC;AAKnE,wBAAsB,eAAe,kBAOpC;;;;AAGD,wBAEE"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "react-native-ariel",
|
|
3
|
-
"type": "module",
|
|
4
|
-
"version": "0.1.0",
|
|
5
|
-
"files": [
|
|
6
|
-
"react_native_ariel_bg.wasm",
|
|
7
|
-
"react_native_ariel.js",
|
|
8
|
-
"react_native_ariel.d.ts"
|
|
9
|
-
],
|
|
10
|
-
"main": "react_native_ariel.js",
|
|
11
|
-
"types": "react_native_ariel.d.ts",
|
|
12
|
-
"sideEffects": [
|
|
13
|
-
"./snippets/*"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
File without changes
|
/package/android/generated/{android/app/build/generated/source/codegen/jni → jni}/ArielSpec.h
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|