react-native-ariel 0.1.0-dev.29 → 0.1.0-dev.31
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.
|
@@ -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/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
|
package/package.json
CHANGED