react-native-unistyles 2.2.0 → 2.3.0-beta.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cxx/UnistylesRuntime.cpp +1 -0
- package/lib/commonjs/core/UnistylesModule.windows.js +11 -0
- package/lib/commonjs/core/UnistylesModule.windows.js.map +1 -0
- package/lib/module/core/UnistylesModule.windows.js +5 -0
- package/lib/module/core/UnistylesModule.windows.js.map +1 -0
- package/lib/typescript/src/core/UnistylesModule.windows.d.ts +6 -0
- package/lib/typescript/src/core/UnistylesModule.windows.d.ts.map +1 -0
- package/package.json +7 -2
- package/src/core/UnistylesModule.windows.ts +9 -0
package/cxx/UnistylesRuntime.cpp
CHANGED
@@ -0,0 +1,11 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.UnistylesModule = void 0;
|
7
|
+
var _reactNative = require("react-native");
|
8
|
+
// while debugging modules will default to NativeModules
|
9
|
+
// without debugging/in release mode module will be available in TurboModules
|
10
|
+
const UnistylesModule = exports.UnistylesModule = _reactNative.TurboModuleRegistry.getEnforcing('Unistyles') ?? _reactNative.NativeModules?.Unistyles;
|
11
|
+
//# sourceMappingURL=UnistylesModule.windows.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["_reactNative","require","UnistylesModule","exports","TurboModuleRegistry","getEnforcing","NativeModules","Unistyles"],"sourceRoot":"../../../src","sources":["core/UnistylesModule.windows.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAMA;AACA;AACO,MAAMC,eAAe,GAAAC,OAAA,CAAAD,eAAA,GAAIE,gCAAmB,CAACC,YAAY,CAAC,WAAW,CAAC,IAAIC,0BAAa,EAAEC,SAAmC"}
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import { NativeModules, TurboModuleRegistry } from 'react-native';
|
2
|
+
// while debugging modules will default to NativeModules
|
3
|
+
// without debugging/in release mode module will be available in TurboModules
|
4
|
+
export const UnistylesModule = TurboModuleRegistry.getEnforcing('Unistyles') ?? NativeModules?.Unistyles;
|
5
|
+
//# sourceMappingURL=UnistylesModule.windows.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["NativeModules","TurboModuleRegistry","UnistylesModule","getEnforcing","Unistyles"],"sourceRoot":"../../../src","sources":["core/UnistylesModule.windows.ts"],"mappings":"AAAA,SAASA,aAAa,EAAEC,mBAAmB,QAAQ,cAAc;AAMjE;AACA;AACA,OAAO,MAAMC,eAAe,GAAID,mBAAmB,CAACE,YAAY,CAAC,WAAW,CAAC,IAAIH,aAAa,EAAEI,SAAmC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"UnistylesModule.windows.d.ts","sourceRoot":"","sources":["../../../../src/core/UnistylesModule.windows.ts"],"names":[],"mappings":"AAEA,KAAK,qBAAqB,GAAG;IACzB,OAAO,IAAI,OAAO,CAAA;CACrB,CAAA;AAID,eAAO,MAAM,eAAe,uBAAuG,CAAA"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "react-native-unistyles",
|
3
|
-
"version": "2.
|
3
|
+
"version": "2.3.0-beta.0",
|
4
4
|
"description": "Level up your React Native StyleSheet",
|
5
5
|
"scripts": {
|
6
6
|
"test": "jest",
|
@@ -92,7 +92,8 @@
|
|
92
92
|
"react": "*",
|
93
93
|
"react-native": "*",
|
94
94
|
"react-native-macos": "*",
|
95
|
-
"react-native-web": "*"
|
95
|
+
"react-native-web": "*",
|
96
|
+
"react-native-windows": "*"
|
96
97
|
},
|
97
98
|
"peerDependenciesMeta": {
|
98
99
|
"react-native-macos": {
|
@@ -100,11 +101,15 @@
|
|
100
101
|
},
|
101
102
|
"react-native-web": {
|
102
103
|
"optional": true
|
104
|
+
},
|
105
|
+
"react-native-windows": {
|
106
|
+
"optional": true
|
103
107
|
}
|
104
108
|
},
|
105
109
|
"workspaces": [
|
106
110
|
"examples/expo",
|
107
111
|
"examples/macos",
|
112
|
+
"examples/win",
|
108
113
|
"docs"
|
109
114
|
],
|
110
115
|
"packageManager": "yarn@3.6.1",
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { NativeModules, TurboModuleRegistry } from 'react-native'
|
2
|
+
|
3
|
+
type UnistylesNativeModule = {
|
4
|
+
install(): boolean
|
5
|
+
}
|
6
|
+
|
7
|
+
// while debugging modules will default to NativeModules
|
8
|
+
// without debugging/in release mode module will be available in TurboModules
|
9
|
+
export const UnistylesModule = (TurboModuleRegistry.getEnforcing('Unistyles') ?? NativeModules?.Unistyles) as UnistylesNativeModule
|