react-native-yoga-jsi 0.1.1 → 0.1.2
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/README.md +11 -2
- package/android/CMakeLists.txt +1 -1
- package/cpp/macros.h +0 -13
- package/package.json +1 -1
package/README.md
CHANGED
@@ -18,6 +18,15 @@ This library aims to expose Yoga APIs to javascript, enabling advanced layout fu
|
|
18
18
|
|
19
19
|
---
|
20
20
|
|
21
|
+
## Installation
|
22
|
+
|
23
|
+
To install this library, use the following command:
|
24
|
+
|
25
|
+
```bash
|
26
|
+
npm i react-native-yoga-jsi
|
27
|
+
```
|
28
|
+
___
|
29
|
+
|
21
30
|
## APIs
|
22
31
|
|
23
32
|
### Core API
|
@@ -58,11 +67,11 @@ The derived API is structured to feel like the standard React Native style API.
|
|
58
67
|
|
59
68
|
Here are a few examples demonstrating the use of this library:
|
60
69
|
|
61
|
-
### Example 1: Text Layout
|
70
|
+
### Example 1: Text Layout
|
62
71
|
|
63
72
|
[View Example](./testProj/src/navigators/children/TextLayout/TextLayout.tsx)
|
64
73
|
|
65
|
-
### Example 2: Animated Layout
|
74
|
+
### Example 2: Animated Layout
|
66
75
|
|
67
76
|
[View Example](./testProj/src/navigators/children/AnimatedExample/AnimatedExample.tsx)
|
68
77
|
|
package/android/CMakeLists.txt
CHANGED
@@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.10.2)
|
|
4
4
|
set(PACKAGE_NAME "reactnativeyogajsi")
|
5
5
|
set(BUILD_DIR ${CMAKE_SOURCE_DIR}/build)
|
6
6
|
set(CMAKE_VERBOSE_MAKEFILE ON)
|
7
|
-
set(CMAKE_CXX_STANDARD
|
7
|
+
set(CMAKE_CXX_STANDARD 20)
|
8
8
|
|
9
9
|
# set (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g")
|
10
10
|
# set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g")
|
package/cpp/macros.h
CHANGED
@@ -1,19 +1,6 @@
|
|
1
1
|
#ifndef RN_YOGA_MACROS_H
|
2
2
|
#define RN_YOGA_MACROS_H
|
3
3
|
|
4
|
-
// #define CREATE_INSTALL_HOST_FUN(funcName, argCount, scopeVar, rt, where, body) \
|
5
|
-
// auto funcName = Function::createFromHostFunction(rt, \
|
6
|
-
// PropNameID::forAscii(rt, #funcName), \
|
7
|
-
// argCount, \
|
8
|
-
// [scopeVar](Runtime & runtime, const Value &thisValue, const Value *arguments, size_t count) -> Value body); \
|
9
|
-
// where.setProperty(rt, #funcName, move(funcName));
|
10
|
-
|
11
|
-
// #define INSTALL_HOST_FUN_TO_CONFIG(funcName, argCount, body) \
|
12
|
-
// CREATE_INSTALL_HOST_FUN(funcName, argCount, body, config, jsiRuntime, configObject)
|
13
|
-
|
14
|
-
// // #define INSTALL_HOST_FUN(funcName, argCount, body) \
|
15
|
-
// // CREATE_INSTALL_HOST_FUN(funcName, argCount, body, node, runtime, nodeObject)
|
16
|
-
|
17
4
|
#define SET_AUTO_PERCENT_NUMBER(autoSetter, percentSetter, numberSetter) \
|
18
5
|
if (arguments[0].isString()) \
|
19
6
|
{ \
|