react-native-unistyles 2.0.0-rc.4 → 2.0.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,15 @@
|
|
11
11
|
[![platform - ssr](https://img.shields.io/badge/SSR-black?style=for-the-badge&logo=next.js&logoColor=white)](https://nextjs.org/)
|
12
12
|
[![platform - android](https://img.shields.io/badge/Android-44CD11?style=for-the-badge&logo=android&logoColor=white)](https://developer.android.com/)
|
13
13
|
|
14
|
+
<a href="https://github.com/jpudysz?tab=followers">
|
15
|
+
<img src="https://img.shields.io/github/followers/jpudysz?label=Follow%20%40jpudysz&style=social" />
|
16
|
+
</a>
|
17
|
+
<br/>
|
18
|
+
<a href="https://twitter.com/jpudysz">
|
19
|
+
<img src="https://img.shields.io/twitter/follow/jpudysz?label=Follow%20%40jpudysz&style=social" />
|
20
|
+
</a>
|
21
|
+
|
22
|
+
|
14
23
|
## [Documentation](https://reactnativeunistyles.vercel.app/)
|
15
24
|
- [Start here](https://reactnativeunistyles.vercel.app/start/introduction/)
|
16
25
|
- [API](https://reactnativeunistyles.vercel.app/reference/create-stylesheet/)
|
@@ -32,13 +41,29 @@
|
|
32
41
|
- ⚔️ No 3rd party dependencies
|
33
42
|
- and much much more!
|
34
43
|
|
44
|
+
## Sponsors
|
45
|
+
|
46
|
+
[How to become a sponsor?](https://reactnativeunistyles.vercel.app/other/for-sponsors/)
|
47
|
+
|
48
|
+
<a href="https://codemask.com">
|
49
|
+
<img src="https://avatars.githubusercontent.com/u/51229884?s=200&v=4" height="70px" width="70px" />
|
50
|
+
</a>
|
51
|
+
<a href="https://galaxies.dev">
|
52
|
+
<img src="https://avatars.githubusercontent.com/u/118431096?s=200&v=4" height="70px" width="70px" />
|
53
|
+
</a>
|
54
|
+
|
55
|
+
|
35
56
|
## Installation
|
36
57
|
|
37
58
|
```shell
|
38
|
-
|
39
|
-
yarn add react-native-unistyles@next
|
59
|
+
yarn add react-native-unistyles
|
40
60
|
```
|
41
61
|
|
62
|
+
## Benchmarks
|
63
|
+
|
64
|
+
<img src="https://reactnativeunistyles.vercel.app/_astro/benchmark-2.jAtWyu0v.png" />
|
65
|
+
|
66
|
+
|
42
67
|
## Discord
|
43
68
|
Looking for help or you want to chat with me?
|
44
69
|
|
@@ -35,7 +35,7 @@ const useStyles = (stylesheet, variantsMap) => {
|
|
35
35
|
...acc,
|
36
36
|
[key]: (0, _utils.withPlugins)(key, (0, _utils.parseStyle)(value, variants, !_common.isWeb || !_core.unistyles.registry.config.experimentalCSSMediaQueries))
|
37
37
|
});
|
38
|
-
}, {}), [parsedStyles, variants, plugins]);
|
38
|
+
}, {}), [parsedStyles, variants, plugins, layout]);
|
39
39
|
(0, _hooks.useCSS)(dynamicStyleSheet);
|
40
40
|
return {
|
41
41
|
theme,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNative","_utils","_hooks","_core","_common","useStyles","stylesheet","variantsMap","theme","layout","plugins","useUnistyles","variants","useVariants","parsedStyles","useMemo","dynamicStyleSheet","Object","entries","reduce","acc","key","value","proxifyFunction","StyleSheet","create","withPlugins","parseStyle","isWeb","unistyles","registry","config","experimentalCSSMediaQueries","useCSS","breakpoint","styles","exports"],"sourceRoot":"../../src","sources":["useStyles.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAGA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AAQA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMM,SAAS,GAAGA,CACrBC,UAAe,EACfC,WAAoD,KAC7B;EACvB,MAAM;IAAEC,KAAK;IAAEC,MAAM;IAAEC;EAAQ,CAAC,GAAG,IAAAC,mBAAY,EAAC,CAAC;EACjD,MAAMC,QAAQ,GAAG,IAAAC,kBAAW,EAACN,WAAW,CAAC;EACzC,MAAMO,YAAY,GAAG,IAAAC,cAAO,EAAC,MAAM,OAAOT,UAAU,KAAK,UAAU,GAC7DA,UAAU,CAACE,KAAK,CAAC,GACjBF,UAAU,EAAE,CAACE,KAAK,EAAEF,UAAU,EAAEG,MAAM,CAAC,CAAC;EAE9C,MAAMO,iBAAiB,GAAG,IAAAD,cAAO,EAAC,MAAME,MAAM,CACzCC,OAAO,CAACJ,YAAY,IAAI,CAAC,CAAC,CAAC,CAC3BK,MAAM,CAAC,CAACC,GAAG,EAAE,CAACC,GAAG,EAAEC,KAAK,CAAC,KAAK;IAC3B,IAAI,OAAOA,KAAK,KAAK,UAAU,EAAE;MAC7B,OAAO;QACH,GAAGF,GAAG;QACN,CAACC,GAAG,GAAG,IAAAE,sBAAe,EAACF,GAAG,EAAEC,KAAK,EAAEV,QAAQ;MAC/C,CAAC;IACL;IAEA,OAAOY,uBAAU,CAACC,MAAM,CAAC;MACrB,GAAGL,GAAG;MACN,CAACC,GAAG,GAAG,IAAAK,kBAAW,EAACL,GAAG,EAAE,IAAAM,iBAAU,EAC9BL,KAAK,EACLV,QAAQ,EACR,CAACgB,aAAK,IAAI,CAACC,eAAS,CAACC,QAAQ,CAACC,MAAM,CAACC,2BAA2B,CACpE;IACJ,CAAC,CAAC;EACN,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAClB,YAAY,EAAEF,QAAQ,EAAEF,OAAO,
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_utils","_hooks","_core","_common","useStyles","stylesheet","variantsMap","theme","layout","plugins","useUnistyles","variants","useVariants","parsedStyles","useMemo","dynamicStyleSheet","Object","entries","reduce","acc","key","value","proxifyFunction","StyleSheet","create","withPlugins","parseStyle","isWeb","unistyles","registry","config","experimentalCSSMediaQueries","useCSS","breakpoint","styles","exports"],"sourceRoot":"../../src","sources":["useStyles.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAC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ED,IAAAwB,aAAM,EAACjB,iBAA8C,CAAC;EAEtD,OAAO;IACHR,KAAK;IACL0B,UAAU,EAAEzB,MAAM,CAACyB,UAAU;IAC7BC,MAAM,EAAEnB;EACZ,CAAC;AACL,CAAC;AAAAoB,OAAA,CAAA/B,SAAA,GAAAA,SAAA"}
|
package/lib/module/useStyles.js
CHANGED
@@ -29,7 +29,7 @@ export const useStyles = (stylesheet, variantsMap) => {
|
|
29
29
|
...acc,
|
30
30
|
[key]: withPlugins(key, parseStyle(value, variants, !isWeb || !unistyles.registry.config.experimentalCSSMediaQueries))
|
31
31
|
});
|
32
|
-
}, {}), [parsedStyles, variants, plugins]);
|
32
|
+
}, {}), [parsedStyles, variants, plugins, layout]);
|
33
33
|
useCSS(dynamicStyleSheet);
|
34
34
|
return {
|
35
35
|
theme,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["useMemo","StyleSheet","parseStyle","proxifyFunction","withPlugins","useCSS","useUnistyles","useVariants","unistyles","isWeb","useStyles","stylesheet","variantsMap","theme","layout","plugins","variants","parsedStyles","dynamicStyleSheet","Object","entries","reduce","acc","key","value","create","registry","config","experimentalCSSMediaQueries","breakpoint","styles"],"sourceRoot":"../../src","sources":["useStyles.ts"],"mappings":"AAAA,SAASA,OAAO,QAAQ,OAAO;AAC/B,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,UAAU,EAAEC,eAAe,EAAEC,WAAW,QAAQ,SAAS;AAClE,SAASC,MAAM,EAAEC,YAAY,EAAEC,WAAW,QAAQ,SAAS;AAG3D,SAASC,SAAS,QAAQ,QAAQ;AAClC,SAASC,KAAK,QAAQ,UAAU;AAQhC;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,SAAS,GAAGA,CACrBC,UAAe,EACfC,WAAoD,KAC7B;EACvB,MAAM;IAAEC,KAAK;IAAEC,MAAM;IAAEC;EAAQ,CAAC,GAAGT,YAAY,CAAC,CAAC;EACjD,MAAMU,QAAQ,GAAGT,WAAW,CAACK,WAAW,CAAC;EACzC,MAAMK,YAAY,GAAGjB,OAAO,CAAC,MAAM,OAAOW,UAAU,KAAK,UAAU,GAC7DA,UAAU,CAACE,KAAK,CAAC,GACjBF,UAAU,EAAE,CAACE,KAAK,EAAEF,UAAU,EAAEG,MAAM,CAAC,CAAC;EAE9C,MAAMI,iBAAiB,GAAGlB,OAAO,CAAC,MAAMmB,MAAM,CACzCC,OAAO,CAACH,YAAY,IAAI,CAAC,CAAC,CAAC,CAC3BI,MAAM,CAAC,CAACC,GAAG,EAAE,CAACC,GAAG,EAAEC,KAAK,CAAC,KAAK;IAC3B,IAAI,OAAOA,KAAK,KAAK,UAAU,EAAE;MAC7B,OAAO;QACH,GAAGF,GAAG;QACN,CAACC,GAAG,GAAGpB,eAAe,CAACoB,GAAG,EAAEC,KAAK,EAAER,QAAQ;MAC/C,CAAC;IACL;IAEA,OAAOf,UAAU,CAACwB,MAAM,CAAC;MACrB,GAAGH,GAAG;MACN,CAACC,GAAG,GAAGnB,WAAW,CAACmB,GAAG,EAAErB,UAAU,CAC9BsB,KAAK,EACLR,QAAQ,EACR,CAACP,KAAK,IAAI,CAACD,SAAS,CAACkB,QAAQ,CAACC,MAAM,CAACC,2BAA2B,CACpE;IACJ,CAAC,CAAC;EACN,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAACX,YAAY,EAAED,QAAQ,EAAED,OAAO,
|
1
|
+
{"version":3,"names":["useMemo","StyleSheet","parseStyle","proxifyFunction","withPlugins","useCSS","useUnistyles","useVariants","unistyles","isWeb","useStyles","stylesheet","variantsMap","theme","layout","plugins","variants","parsedStyles","dynamicStyleSheet","Object","entries","reduce","acc","key","value","create","registry","config","experimentalCSSMediaQueries","breakpoint","styles"],"sourceRoot":"../../src","sources":["useStyles.ts"],"mappings":"AAAA,SAASA,OAAO,QAAQ,OAAO;AAC/B,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,UAAU,EAAEC,eAAe,EAAEC,WAAW,QAAQ,SAAS;A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M,CAACa,iBAA8C,CAAC;EAEtD,OAAO;IACHL,KAAK;IACLgB,UAAU,EAAEf,MAAM,CAACe,UAAU;IAC7BC,MAAM,EAAEZ;EACZ,CAAC;AACL,CAAC"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "react-native-unistyles",
|
3
|
-
"version": "2.0.
|
3
|
+
"version": "2.0.1",
|
4
4
|
"description": "Level up your React Native StyleSheet",
|
5
5
|
"scripts": {
|
6
6
|
"test": "jest",
|
@@ -9,7 +9,7 @@
|
|
9
9
|
"lint": "eslint . --ext .ts,.tsx",
|
10
10
|
"prepare": "husky install && bob build",
|
11
11
|
"precommit": "concurrently 'yarn tsc' 'yarn lint' 'yarn test'",
|
12
|
-
"release": "release-it
|
12
|
+
"release": "release-it"
|
13
13
|
},
|
14
14
|
"main": "lib/commonjs/index",
|
15
15
|
"module": "lib/module/index",
|
@@ -59,17 +59,17 @@
|
|
59
59
|
"@release-it/conventional-changelog": "8.0.1",
|
60
60
|
"@testing-library/react-hooks": "8.0.1",
|
61
61
|
"@types/jest": "29.5.11",
|
62
|
-
"@types/react": "18.2.
|
63
|
-
"@typescript-eslint/eslint-plugin": "6.
|
64
|
-
"@typescript-eslint/eslint-plugin-tslint": "6.
|
65
|
-
"@typescript-eslint/parser": "6.
|
62
|
+
"@types/react": "18.2.46",
|
63
|
+
"@typescript-eslint/eslint-plugin": "6.16.0",
|
64
|
+
"@typescript-eslint/eslint-plugin-tslint": "6.16.0",
|
65
|
+
"@typescript-eslint/parser": "6.16.0",
|
66
66
|
"commitlint": "18.4.3",
|
67
67
|
"concurrently": "8.2.2",
|
68
68
|
"eslint": "8.56.0",
|
69
69
|
"eslint-config-codemask": "1.1.7",
|
70
70
|
"eslint-plugin-functional": "6.0.0",
|
71
71
|
"eslint-plugin-import": "2.29.1",
|
72
|
-
"eslint-plugin-jsdoc": "46.
|
72
|
+
"eslint-plugin-jsdoc": "46.10.1",
|
73
73
|
"eslint-plugin-jsx-a11y": "6.8.0",
|
74
74
|
"eslint-plugin-nested-if": "1.0.0",
|
75
75
|
"eslint-plugin-no-else": "0.2.2",
|
package/src/useStyles.ts
CHANGED
@@ -47,7 +47,7 @@ export const useStyles = <ST extends StyleSheetWithSuperPowers>(
|
|
47
47
|
!isWeb || !unistyles.registry.config.experimentalCSSMediaQueries)
|
48
48
|
)
|
49
49
|
})
|
50
|
-
}, {}), [parsedStyles, variants, plugins]
|
50
|
+
}, {}), [parsedStyles, variants, plugins, layout]
|
51
51
|
)
|
52
52
|
|
53
53
|
useCSS(dynamicStyleSheet as ReactNativeStyleSheet<ST>)
|