react-native-unistyles 1.0.0 → 2.0.0-alpha.1
Sign up to get free protection for your applications and to get access to all the features.
package/README.md
CHANGED
@@ -11,6 +11,7 @@
|
|
11
11
|
![Platform - Android and iOS](https://img.shields.io/badge/platform-Android%20%7C%20iOS%20%7C%20RNWeb-blue.svg?style=for-the-badge)
|
12
12
|
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg?style=for-the-badge)](https://opensource.org/licenses/MIT)
|
13
13
|
|
14
|
+
|
14
15
|
## Features
|
15
16
|
- ⚡ Blazing fast, adds around ~3ms on top of StyleSheet*
|
16
17
|
- 🎳 Share up to 100% of your styles across platforms in monorepo
|
@@ -26,7 +27,7 @@
|
|
26
27
|
## Installation
|
27
28
|
|
28
29
|
```cmd
|
29
|
-
yarn add react-native-unistyles
|
30
|
+
yarn add react-native-unistyles
|
30
31
|
```
|
31
32
|
|
32
33
|
## [Documentation](https://reactnativeunistyles.vercel.app/)
|
@@ -34,6 +35,18 @@ yarn add react-native-unistyles@rc
|
|
34
35
|
- [References](https://reactnativeunistyles.vercel.app/reference/create-stylesheet/)
|
35
36
|
- [Examples](https://reactnativeunistyles.vercel.app/example/breakpoints/)
|
36
37
|
|
38
|
+
## Faster, better and simpler - v.2.0 🚀
|
39
|
+
|
40
|
+
There is ongoing work on branch [2.0](https://github.com/jpudysz/react-native-unistyles/tree/2.0).
|
41
|
+
|
42
|
+
---
|
43
|
+
|
44
|
+
Join early testers and discussion [here](https://github.com/jpudysz/react-native-unistyles/discussions/41)
|
45
|
+
|
46
|
+
```cmd
|
47
|
+
yarn add react-native-unistyles@next
|
48
|
+
```
|
49
|
+
|
37
50
|
## Blog post
|
38
51
|
|
39
52
|
Read about what drove me to create this library in this blog post [here](https://www.reactnativecrossroads.com/posts/level-up-react-native-styles).
|
@@ -5,8 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
});
|
6
6
|
exports.UnistylesTheme = exports.UnistylesContext = void 0;
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
8
|
-
function _getRequireWildcardCache(
|
9
|
-
function _interopRequireWildcard(
|
8
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
9
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
10
10
|
const UnistylesContext = exports.UnistylesContext = /*#__PURE__*/(0, _react.createContext)({});
|
11
11
|
const UnistylesTheme = _ref => {
|
12
12
|
let {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_getRequireWildcardCache","
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","UnistylesContext","exports","createContext","UnistylesTheme","_ref","theme","children","createElement","Provider","value"],"sourceRoot":"../../src","sources":["UnistylesTheme.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAA4C,SAAAC,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAH,wBAAAG,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA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ED
@@ -1,15 +1,14 @@
|
|
1
1
|
{
|
2
2
|
"name": "react-native-unistyles",
|
3
|
-
"version": "
|
3
|
+
"version": "2.0.0-alpha.1",
|
4
4
|
"description": "Level up your React Native StyleSheet",
|
5
5
|
"scripts": {
|
6
6
|
"test": "jest",
|
7
7
|
"tsc": "node_modules/typescript/bin/tsc --noEmit",
|
8
8
|
"lint": "eslint . --ext .ts,.tsx",
|
9
|
-
"clean": "del-cli lib",
|
10
9
|
"prepare": "husky install && bob build",
|
11
10
|
"precommit": "concurrently 'yarn tsc' 'yarn lint' 'yarn test'",
|
12
|
-
"release": "release-it"
|
11
|
+
"release": "release-it patch --preRelease=alpha --npm.tag=next"
|
13
12
|
},
|
14
13
|
"main": "lib/commonjs/index",
|
15
14
|
"module": "lib/module/index",
|
@@ -40,9 +39,9 @@
|
|
40
39
|
"devDependencies": {
|
41
40
|
"@commitlint/config-conventional": "17.8.0",
|
42
41
|
"@react-native/eslint-config": "0.74.0",
|
43
|
-
"@release-it/conventional-changelog": "
|
42
|
+
"@release-it/conventional-changelog": "7.0.2",
|
44
43
|
"@testing-library/react-hooks": "8.0.1",
|
45
|
-
"@types/jest": "29.5.
|
44
|
+
"@types/jest": "29.5.6",
|
46
45
|
"@types/react": "18.2.28",
|
47
46
|
"@types/react-native": "0.72.3",
|
48
47
|
"@typescript-eslint/eslint-plugin": "6.8.0",
|
@@ -50,7 +49,6 @@
|
|
50
49
|
"@typescript-eslint/parser": "6.8.0",
|
51
50
|
"commitlint": "17.8.0",
|
52
51
|
"concurrently": "8.2.1",
|
53
|
-
"del-cli": "5.1.0",
|
54
52
|
"eslint": "8.51.0",
|
55
53
|
"eslint-config-codemask": "1.1.7",
|
56
54
|
"eslint-plugin-functional": "6.0.0",
|
@@ -113,11 +111,13 @@
|
|
113
111
|
"publish": true
|
114
112
|
},
|
115
113
|
"github": {
|
116
|
-
"release":
|
114
|
+
"release": false
|
117
115
|
},
|
118
116
|
"plugins": {
|
119
117
|
"@release-it/conventional-changelog": {
|
120
|
-
"preset":
|
118
|
+
"preset": {
|
119
|
+
"name": "conventionalcommits"
|
120
|
+
}
|
121
121
|
}
|
122
122
|
}
|
123
123
|
},
|