react-native-ariel 0.1.0-dev.13 → 0.1.0-dev.20

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.
@@ -40,14 +40,9 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
40
40
  # Set linker flags for 16KB page size alignment (required for Android 15+)
41
41
  set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,max-page-size=16384")
42
42
 
43
- # ARIEL_DIR is passed from build.gradle via -DARIEL_DIR=${projectDir}
44
- # This avoids using CMAKE_SOURCE_DIR which resolves to the app root when
45
- # the library is linked via add_subdirectory.
46
- cmake_path(
47
- SET MY_RUST_LIB
48
- ${ARIEL_DIR}/src/main/jniLibs/${ANDROID_ABI}/libmermaid_wrapper.a
49
- NORMALIZE
50
- )
43
+ # CMAKE_CURRENT_LIST_DIR always resolves to the directory of this file (android/)
44
+ # regardless of how it is included (direct build or add_subdirectory).
45
+ file(TO_CMAKE_PATH "${CMAKE_CURRENT_LIST_DIR}/src/main/jniLibs/${ANDROID_ABI}/libmermaid_wrapper.a" MY_RUST_LIB)
51
46
  add_library(my_rust_lib STATIC IMPORTED)
52
47
  set_target_properties(my_rust_lib PROPERTIES IMPORTED_LOCATION ${MY_RUST_LIB})
53
48
 
@@ -74,9 +74,7 @@ android {
74
74
  }
75
75
  externalNativeBuild {
76
76
  cmake {
77
- // ARIEL_DIR passes the library root to CMake so Rust libs can be found.
78
- // Cannot use CMAKE_SOURCE_DIR in CMake — it resolves to the app when linked via add_subdirectory.
79
- arguments '-DANDROID_STL=c++_shared', "-DARIEL_DIR=${projectDir}"
77
+ arguments '-DANDROID_STL=c++_shared'
80
78
  abiFilters (*reactNativeArchitectures())
81
79
  }
82
80
  }
@@ -3,10 +3,6 @@
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.
10
6
  import * as mermaid_wrapper from "./generated/web/mermaid_wrapper.js";
11
7
  import initAsync from './generated/web/wasm-bindgen/react_native_ariel.js';
12
8
  import wasmPath from './generated/web/wasm-bindgen/react_native_ariel_bg.wasm';
@@ -14,6 +10,12 @@ export async function uniffiInitAsync() {
14
10
  await initAsync({
15
11
  module_or_path: wasmPath
16
12
  });
13
+ mermaid_wrapper.default.initialize();
14
+ }
15
+ export default {
16
+ mermaid_wrapper
17
+ };
18
+ //# sourceMappingURL=index.web.js.map});
17
19
 
18
20
  // Initialize the generated bindings: mostly checksums, but also callbacks.
19
21
  // - the boolean flag ensures this loads exactly once, even if the JS code
@@ -1 +1,2 @@
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":[]}
1
+ {"version":3,"names":["mermaid_wrapper","initAsync","wasmPath","uniffiInitAsync","module_or_path","default","initialize"],"sourceRoot":"../../src","sources":["index.web.tsx"],"mappings":";;AAAA;AACA;AACA,cAAc,oCAAiC;AAE/C,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;EAC7CF,eAAe,CAACK,OAAO,CAACC,UAAU,CAAC,CAAC;AACtC;AAEA,eAAe;EACbN;AACF,CAAC","ignoreList":[]}
2
+ Ae;EACbN;AACF,CAAC","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-ariel",
3
- "version": "0.1.0-dev.13",
3
+ "version": "0.1.0-dev.20",
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",