react-native-unistyles 1.0.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +16 -3
- package/lib/commonjs/UnistylesTheme.js +2 -2
- package/lib/commonjs/UnistylesTheme.js.map +1 -1
- package/lib/commonjs/hooks/useDimensions.web.js +3 -2
- package/lib/commonjs/hooks/useDimensions.web.js.map +1 -1
- package/lib/commonjs/types/index.js +15 -0
- package/lib/commonjs/types/index.js.map +1 -1
- package/lib/commonjs/types/normalizer.js +6 -0
- package/lib/commonjs/types/normalizer.js.map +1 -0
- package/lib/commonjs/utils/common.js +3 -3
- package/lib/commonjs/utils/common.js.map +1 -1
- package/lib/commonjs/utils/index.js +34 -0
- package/lib/commonjs/utils/index.js.map +1 -1
- package/lib/commonjs/utils/module.d.js +2 -0
- package/lib/commonjs/utils/module.d.js.map +1 -0
- package/lib/commonjs/utils/normalizeStyles.web.js +13 -13
- package/lib/commonjs/utils/normalizeStyles.web.js.map +1 -1
- package/lib/commonjs/utils/normalizer.js +89 -0
- package/lib/commonjs/utils/normalizer.js.map +1 -0
- package/lib/commonjs/utils/styles.js +1 -1
- package/lib/commonjs/utils/styles.js.map +1 -1
- package/lib/module/hooks/useDimensions.web.js +3 -2
- package/lib/module/hooks/useDimensions.web.js.map +1 -1
- package/lib/module/types/index.js +1 -1
- package/lib/module/types/index.js.map +1 -1
- package/lib/module/types/normalizer.js +2 -0
- package/lib/module/types/normalizer.js.map +1 -0
- package/lib/module/utils/common.js +2 -1
- package/lib/module/utils/common.js.map +1 -1
- package/lib/module/utils/index.js +2 -0
- package/lib/module/utils/index.js.map +1 -1
- package/lib/module/utils/module.d.js +2 -0
- package/lib/module/utils/module.d.js.map +1 -0
- package/lib/module/utils/normalizeStyles.web.js +13 -13
- package/lib/module/utils/normalizeStyles.web.js.map +1 -1
- package/lib/module/utils/normalizer.js +79 -0
- package/lib/module/utils/normalizer.js.map +1 -0
- package/lib/module/utils/styles.js +1 -1
- package/lib/module/utils/styles.js.map +1 -1
- package/lib/typescript/examples/expo/src/App.d.ts +3 -0
- package/lib/typescript/examples/expo/src/App.d.ts.map +1 -0
- package/lib/typescript/examples/expo/src/examples/Breakpoints.d.ts +3 -0
- package/lib/typescript/examples/expo/src/examples/Breakpoints.d.ts.map +1 -0
- package/lib/typescript/examples/expo/src/examples/EmptyStyles.d.ts +3 -0
- package/lib/typescript/examples/expo/src/examples/EmptyStyles.d.ts.map +1 -0
- package/lib/typescript/examples/expo/src/examples/Extreme.d.ts +7 -0
- package/lib/typescript/examples/expo/src/examples/Extreme.d.ts.map +1 -0
- package/lib/typescript/examples/expo/src/examples/MediaQueries.d.ts +3 -0
- package/lib/typescript/examples/expo/src/examples/MediaQueries.d.ts.map +1 -0
- package/lib/typescript/examples/expo/src/examples/Memoization.d.ts +3 -0
- package/lib/typescript/examples/expo/src/examples/Memoization.d.ts.map +1 -0
- package/lib/typescript/examples/expo/src/examples/Minimal.d.ts +3 -0
- package/lib/typescript/examples/expo/src/examples/Minimal.d.ts.map +1 -0
- package/lib/typescript/examples/expo/src/examples/MinimalWithCreateStyleSheet.d.ts +3 -0
- package/lib/typescript/examples/expo/src/examples/MinimalWithCreateStyleSheet.d.ts.map +1 -0
- package/lib/typescript/examples/expo/src/examples/Theme.d.ts +3 -0
- package/lib/typescript/examples/expo/src/examples/Theme.d.ts.map +1 -0
- package/lib/typescript/examples/expo/src/examples/index.d.ts +8 -0
- package/lib/typescript/examples/expo/src/examples/index.d.ts.map +1 -0
- package/lib/typescript/examples/expo/src/index.d.ts +2 -0
- package/lib/typescript/examples/expo/src/index.d.ts.map +1 -0
- package/lib/typescript/examples/expo/src/styles/breakpoints.d.ts +8 -0
- package/lib/typescript/examples/expo/src/styles/breakpoints.d.ts.map +1 -0
- package/lib/typescript/examples/expo/src/styles/index.d.ts +46 -0
- package/lib/typescript/examples/expo/src/styles/index.d.ts.map +1 -0
- package/lib/typescript/examples/expo/src/styles/theme.d.ts +24 -0
- package/lib/typescript/examples/expo/src/styles/theme.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useDimensions.web.d.ts.map +1 -1
- package/lib/typescript/src/types/index.d.ts +1 -0
- package/lib/typescript/src/types/index.d.ts.map +1 -1
- package/lib/typescript/src/types/normalizer.d.ts +20 -0
- package/lib/typescript/src/types/normalizer.d.ts.map +1 -0
- package/lib/typescript/src/utils/common.d.ts +2 -1
- package/lib/typescript/src/utils/common.d.ts.map +1 -1
- package/lib/typescript/src/utils/index.d.ts +2 -0
- package/lib/typescript/src/utils/index.d.ts.map +1 -1
- package/lib/typescript/src/utils/normalizeStyles.web.d.ts +4 -1
- package/lib/typescript/src/utils/normalizeStyles.web.d.ts.map +1 -1
- package/lib/typescript/src/utils/normalizer.d.ts +11 -0
- package/lib/typescript/src/utils/normalizer.d.ts.map +1 -0
- package/package.json +10 -3
- package/src/hooks/useDimensions.web.ts +3 -2
- package/src/types/index.ts +1 -0
- package/src/types/normalizer.ts +29 -0
- package/src/utils/common.ts +2 -1
- package/src/utils/index.ts +2 -0
- package/src/utils/module.d.ts +3 -0
- package/src/utils/normalizeStyles.web.ts +21 -42
- package/src/utils/normalizer.ts +99 -0
- package/src/utils/styles.ts +1 -1
package/README.md
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
|
9
9
|
![GitHub package.json version](https://img.shields.io/github/package-json/v/jpudysz/react-native-unistyles?style=for-the-badge)
|
10
10
|
[![npm downloads](https://img.shields.io/npm/dm/react-native-unistyles.svg?style=for-the-badge)](https://www.npmjs.com/package/react-native-unistyles)
|
11
|
-
![Platform - Android and iOS](https://img.shields.io/badge/platform-Android%20%7C%
|
11
|
+
![Platform - Android and iOS](https://img.shields.io/badge/platform-Android%20%7C%20IOS%20%7C%20SSR%20%7C%20Web-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
|
## Features
|
@@ -18,7 +18,8 @@
|
|
18
18
|
- 🖥️ Supports custom breakpoints and css-like media queries
|
19
19
|
- 🎨 Access theme in your StyleSheets and components
|
20
20
|
- 🪄 Supports dynamic functions to access values from JSX
|
21
|
-
- 🥳 Compatible with Expo, Expo Go, Bare React Native
|
21
|
+
- 🥳 Compatible with Expo, Expo Go, Bare React Native, React Native Web and SSR
|
22
|
+
- 🛡️ ~99% Test coverage
|
22
23
|
- ⚔️ No 3rd party dependencies
|
23
24
|
|
24
25
|
*-based on this [benchmark](https://github.com/efstathiosntonas/react-native-style-libraries-benchmark)
|
@@ -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,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WA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require("react");
|
8
|
+
var _utils = require("../utils");
|
8
9
|
const useDimensions = () => {
|
9
10
|
const timerRef = (0, _react.useRef)();
|
10
11
|
const [screenSize, setScreenSize] = (0, _react.useState)({
|
11
|
-
width: window.innerWidth,
|
12
|
-
height: window.innerHeight
|
12
|
+
width: _utils.isServer ? 0 : window.innerWidth,
|
13
|
+
height: _utils.isServer ? 0 : window.innerHeight
|
13
14
|
});
|
14
15
|
(0, _react.useEffect)(() => {
|
15
16
|
const handleResize = () => {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_react","require","useDimensions","timerRef","useRef","screenSize","setScreenSize","useState","width","window","innerWidth","height","innerHeight","useEffect","handleResize","clearTimeout","current","setTimeout","addEventListener","removeEventListener","exports"],"sourceRoot":"../../../src","sources":["hooks/useDimensions.web.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;
|
1
|
+
{"version":3,"names":["_react","require","_utils","useDimensions","timerRef","useRef","screenSize","setScreenSize","useState","width","isServer","window","innerWidth","height","innerHeight","useEffect","handleResize","clearTimeout","current","setTimeout","addEventListener","removeEventListener","exports"],"sourceRoot":"../../../src","sources":["hooks/useDimensions.web.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AAEO,MAAME,aAAa,GAAGA,CAAA,KAAkB;EAC3C,MAAMC,QAAQ,GAAG,IAAAC,aAAM,EAAgC,CAAC;EACxD,MAAM,CAACC,UAAU,EAAEC,aAAa,CAAC,GAAG,IAAAC,eAAQ,EAAa;IACrDC,KAAK,EAAEC,eAAQ,GAAG,CAAC,GAAGC,MAAM,CAACC,UAAU;IACvCC,MAAM,EAAEH,eAAQ,GAAG,CAAC,GAAGC,MAAM,CAACG;EAClC,CAAC,CAAC;EAEF,IAAAC,gBAAS,EAAC,MAAM;IACZ,MAAMC,YAAY,GAAGA,CAAA,KAAM;MACvBC,YAAY,CAACb,QAAQ,CAACc,OAAO,CAAC;MAE9Bd,QAAQ,CAACc,OAAO,GAAGC,UAAU,CAAC,MAAMZ,aAAa,CAAC;QAC9CE,KAAK,EAAEE,MAAM,CAACC,UAAU;QACxBC,MAAM,EAAEF,MAAM,CAACG;MACnB,CAAC,CAAC,EAAE,GAAG,CAAC;IACZ,CAAC;IAEDH,MAAM,CAACS,gBAAgB,CAAC,QAAQ,EAAEJ,YAAY,CAAC;IAE/C,OAAO,MAAM;MACTL,MAAM,CAACU,mBAAmB,CAAC,QAAQ,EAAEL,YAAY,CAAC;MAClDC,YAAY,CAACb,QAAQ,CAACc,OAAO,CAAC;IAClC,CAAC;EACL,CAAC,EAAE,EAAE,CAAC;EAEN,OAAOZ,UAAU;AACrB,CAAC;AAAAgB,OAAA,CAAAnB,aAAA,GAAAA,aAAA"}
|
@@ -1,2 +1,17 @@
|
|
1
1
|
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
var _normalizer = require("./normalizer");
|
7
|
+
Object.keys(_normalizer).forEach(function (key) {
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
9
|
+
if (key in exports && exports[key] === _normalizer[key]) return;
|
10
|
+
Object.defineProperty(exports, key, {
|
11
|
+
enumerable: true,
|
12
|
+
get: function () {
|
13
|
+
return _normalizer[key];
|
14
|
+
}
|
15
|
+
});
|
16
|
+
});
|
2
17
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/index.ts"],"mappings":""}
|
1
|
+
{"version":3,"names":["_normalizer","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sourceRoot":"../../../src","sources":["types/index.ts"],"mappings":";;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,WAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,WAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,WAAA,CAAAK,GAAA;IAAA;EAAA;AAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/normalizer.ts"],"mappings":""}
|
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.warn = exports.throwError = exports.isWeb = void 0;
|
6
|
+
exports.warn = exports.throwError = exports.isWeb = exports.isServer = void 0;
|
7
7
|
var _reactNative = require("react-native");
|
8
8
|
const throwError = message => {
|
9
9
|
throw new Error(`🦄 [react-native-unistyles]: ${message}`);
|
@@ -13,6 +13,6 @@ const warn = message => {
|
|
13
13
|
console.warn(`🦄 [react-native-unistyles]: ${message}`);
|
14
14
|
};
|
15
15
|
exports.warn = warn;
|
16
|
-
const isWeb =
|
17
|
-
exports.
|
16
|
+
const isWeb = exports.isWeb = _reactNative.Platform.OS === 'web';
|
17
|
+
const isServer = exports.isServer = typeof window === 'undefined';
|
18
18
|
//# sourceMappingURL=common.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_reactNative","require","throwError","message","Error","exports","warn","console","isWeb","Platform","OS"],"sourceRoot":"../../../src","sources":["utils/common.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEO,MAAMC,UAAU,GAAIC,OAAe,IAAK;EAC3C,MAAM,IAAIC,KAAK,CAAE,gCAA+BD,OAAQ,EAAC,CAAC;AAC9D,CAAC;AAAAE,OAAA,CAAAH,UAAA,GAAAA,UAAA;AAEM,MAAMI,IAAI,GAAIH,OAAe,IAAK;EACrCI,OAAO,CAACD,IAAI,CAAE,gCAA+BH,OAAQ,EAAC,CAAC;AAC3D,CAAC;AAAAE,OAAA,CAAAC,IAAA,GAAAA,IAAA;AAEM,MAAME,KAAK,
|
1
|
+
{"version":3,"names":["_reactNative","require","throwError","message","Error","exports","warn","console","isWeb","Platform","OS","isServer","window"],"sourceRoot":"../../../src","sources":["utils/common.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEO,MAAMC,UAAU,GAAIC,OAAe,IAAK;EAC3C,MAAM,IAAIC,KAAK,CAAE,gCAA+BD,OAAQ,EAAC,CAAC;AAC9D,CAAC;AAAAE,OAAA,CAAAH,UAAA,GAAAA,UAAA;AAEM,MAAMI,IAAI,GAAIH,OAAe,IAAK;EACrCI,OAAO,CAACD,IAAI,CAAE,gCAA+BH,OAAQ,EAAC,CAAC;AAC3D,CAAC;AAAAE,OAAA,CAAAC,IAAA,GAAAA,IAAA;AAEM,MAAME,KAAK,GAAAH,OAAA,CAAAG,KAAA,GAAGC,qBAAQ,CAACC,EAAE,KAAK,KAAK;AACnC,MAAMC,QAAQ,GAAAN,OAAA,CAAAM,QAAA,GAAG,OAAOC,MAAM,KAAK,WAAW"}
|
@@ -3,6 +3,21 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
+
var _exportNames = {
|
7
|
+
normalizeStyles: true,
|
8
|
+
getBreakpointFromScreenWidth: true,
|
9
|
+
sortAndValidateBreakpoints: true,
|
10
|
+
getValueForBreakpoint: true,
|
11
|
+
proxifyFunction: true,
|
12
|
+
parseStyle: true,
|
13
|
+
isServer: true,
|
14
|
+
extractValues: true,
|
15
|
+
getKeyForCustomMediaQuery: true,
|
16
|
+
isMediaQuery: true,
|
17
|
+
isWithinTheHeight: true,
|
18
|
+
isWithinTheWidth: true,
|
19
|
+
isWithinTheWidthAndHeight: true
|
20
|
+
};
|
6
21
|
Object.defineProperty(exports, "extractValues", {
|
7
22
|
enumerable: true,
|
8
23
|
get: function () {
|
@@ -33,6 +48,12 @@ Object.defineProperty(exports, "isMediaQuery", {
|
|
33
48
|
return _mediaQueries.isMediaQuery;
|
34
49
|
}
|
35
50
|
});
|
51
|
+
Object.defineProperty(exports, "isServer", {
|
52
|
+
enumerable: true,
|
53
|
+
get: function () {
|
54
|
+
return _common.isServer;
|
55
|
+
}
|
56
|
+
});
|
36
57
|
Object.defineProperty(exports, "isWithinTheHeight", {
|
37
58
|
enumerable: true,
|
38
59
|
get: function () {
|
@@ -76,7 +97,20 @@ Object.defineProperty(exports, "sortAndValidateBreakpoints", {
|
|
76
97
|
}
|
77
98
|
});
|
78
99
|
var _normalizeStyles = require("./normalizeStyles");
|
100
|
+
var _normalizer = require("./normalizer");
|
101
|
+
Object.keys(_normalizer).forEach(function (key) {
|
102
|
+
if (key === "default" || key === "__esModule") return;
|
103
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
104
|
+
if (key in exports && exports[key] === _normalizer[key]) return;
|
105
|
+
Object.defineProperty(exports, key, {
|
106
|
+
enumerable: true,
|
107
|
+
get: function () {
|
108
|
+
return _normalizer[key];
|
109
|
+
}
|
110
|
+
});
|
111
|
+
});
|
79
112
|
var _breakpoints = require("./breakpoints");
|
80
113
|
var _styles = require("./styles");
|
114
|
+
var _common = require("./common");
|
81
115
|
var _mediaQueries = require("./mediaQueries");
|
82
116
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_normalizeStyles","require","_breakpoints","_styles","_mediaQueries"],"sourceRoot":"../../../src","sources":["utils/index.ts"],"mappings":"
|
1
|
+
{"version":3,"names":["_normalizeStyles","require","_normalizer","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_breakpoints","_styles","_common","_mediaQueries"],"sourceRoot":"../../../src","sources":["utils/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,gBAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAF,WAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,WAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAZ,WAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AACA,IAAAS,YAAA,GAAAd,OAAA;AACA,IAAAe,OAAA,GAAAf,OAAA;AACA,IAAAgB,OAAA,GAAAhB,OAAA;AACA,IAAAiB,aAAA,GAAAjB,OAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["utils/module.d.ts"],"mappings":""}
|
@@ -5,10 +5,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
});
|
6
6
|
exports.normalizeStyles = void 0;
|
7
7
|
var _common = require("./common");
|
8
|
-
|
9
|
-
const normalizeBoxShadow =
|
8
|
+
var _normalizer = require("./normalizer");
|
9
|
+
const normalizeBoxShadow = style => {
|
10
10
|
const requiredBoxShadowProperties = ['shadowColor', 'shadowOffset', 'shadowOpacity', 'shadowRadius'];
|
11
|
-
if (!requiredBoxShadowProperties.every(prop => prop in
|
11
|
+
if (!requiredBoxShadowProperties.every(prop => prop in style)) {
|
12
12
|
(0, _common.warn)(`can't apply box shadow as you miss at least one of these properties: ${requiredBoxShadowProperties.join(', ')}`);
|
13
13
|
return {
|
14
14
|
shadowColor: undefined,
|
@@ -18,16 +18,16 @@ const normalizeBoxShadow = styles => {
|
|
18
18
|
};
|
19
19
|
}
|
20
20
|
return {
|
21
|
-
boxShadow: preprocessor.createBoxShadowValue(
|
21
|
+
boxShadow: _normalizer.preprocessor.createBoxShadowValue(style),
|
22
22
|
shadowColor: undefined,
|
23
23
|
shadowOffset: undefined,
|
24
24
|
shadowOpacity: undefined,
|
25
25
|
shadowRadius: undefined
|
26
26
|
};
|
27
27
|
};
|
28
|
-
const normalizeTextShadow =
|
28
|
+
const normalizeTextShadow = style => {
|
29
29
|
const requiredTextShadowProperties = ['textShadowColor', 'textShadowOffset', 'textShadowRadius'];
|
30
|
-
if (!requiredTextShadowProperties.every(prop => prop in
|
30
|
+
if (!requiredTextShadowProperties.every(prop => prop in style)) {
|
31
31
|
(0, _common.warn)(`can't apply text shadow as you miss at least one of these properties: ${requiredTextShadowProperties.join(', ')}`);
|
32
32
|
return {
|
33
33
|
textShadowColor: undefined,
|
@@ -36,20 +36,20 @@ const normalizeTextShadow = styles => {
|
|
36
36
|
};
|
37
37
|
}
|
38
38
|
return {
|
39
|
-
textShadow: preprocessor.createTextShadowValue(
|
39
|
+
textShadow: _normalizer.preprocessor.createTextShadowValue(style),
|
40
40
|
textShadowColor: undefined,
|
41
41
|
textShadowOffset: undefined,
|
42
42
|
textShadowRadius: undefined
|
43
43
|
};
|
44
44
|
};
|
45
|
-
const normalizeStyles =
|
46
|
-
const normalizedTransform = 'transform' in
|
47
|
-
transform: preprocessor.createTransformValue(
|
45
|
+
const normalizeStyles = style => {
|
46
|
+
const normalizedTransform = 'transform' in style && Array.isArray(style.transform) ? {
|
47
|
+
transform: _normalizer.preprocessor.createTransformValue(style.transform)
|
48
48
|
} : {};
|
49
|
-
const normalizedBoxShadow = 'shadowColor' in
|
50
|
-
const normalizedTextShadow = 'textShadowColor' in
|
49
|
+
const normalizedBoxShadow = 'shadowColor' in style || 'shadowOffset' in style || 'shadowOpacity' in style || 'shadowRadius' in style ? normalizeBoxShadow(style) : {};
|
50
|
+
const normalizedTextShadow = 'textShadowColor' in style || 'textShadowOffset' in style || 'textShadowRadius' in style ? normalizeTextShadow(style) : {};
|
51
51
|
return {
|
52
|
-
...
|
52
|
+
...style,
|
53
53
|
...normalizedTransform,
|
54
54
|
...normalizedBoxShadow,
|
55
55
|
...normalizedTextShadow
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_common","require","
|
1
|
+
{"version":3,"names":["_common","require","_normalizer","normalizeBoxShadow","style","requiredBoxShadowProperties","every","prop","warn","join","shadowColor","undefined","shadowOffset","shadowOpacity","shadowRadius","boxShadow","preprocessor","createBoxShadowValue","normalizeTextShadow","requiredTextShadowProperties","textShadowColor","textShadowOffset","textShadowRadius","textShadow","createTextShadowValue","normalizeStyles","normalizedTransform","Array","isArray","transform","createTransformValue","normalizedBoxShadow","normalizedTextShadow","exports"],"sourceRoot":"../../../src","sources":["utils/normalizeStyles.web.ts"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAGA,MAAME,kBAAkB,GAAyBC,KAAQ,IAA0B;EAC/E,MAAMC,2BAA2B,GAAG,CAChC,aAAa,EACb,cAAc,EACd,eAAe,EACf,cAAc,CACjB;EAED,IAAI,CAACA,2BAA2B,CAACC,KAAK,CAACC,IAAI,IAAIA,IAAI,IAAIH,KAAK,CAAC,EAAE;IAC3D,IAAAI,YAAI,EAAE,wEAAuEH,2BAA2B,CAACI,IAAI,CAAC,IAAI,CAAE,EAAC,CAAC;IAEtH,OAAO;MACHC,WAAW,EAAEC,SAAS;MACtBC,YAAY,EAAED,SAAS;MACvBE,aAAa,EAAEF,SAAS;MACxBG,YAAY,EAAEH;IAClB,CAAC;EACL;EAEA,OAAO;IACHI,SAAS,EAAEC,wBAAY,CAACC,oBAAoB,CAACb,KAAK,CAAC;IACnDM,WAAW,EAAEC,SAAS;IACtBC,YAAY,EAAED,SAAS;IACvBE,aAAa,EAAEF,SAAS;IACxBG,YAAY,EAAEH;EAClB,C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AGsB,mBAAmB;IACtB,GAAGK,mBAAmB;IACtB,GAAGC;EACP,CAAC;AACL,CAAC;AAAAC,OAAA,CAAAR,eAAA,GAAAA,eAAA"}
|
@@ -0,0 +1,89 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.preprocessor = exports.normalizeNumericValue = exports.normalizeColor = void 0;
|
7
|
+
var _normalizeColors = _interopRequireDefault(require("@react-native/normalize-colors"));
|
8
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
9
|
+
// based on react-native-web normalizer
|
10
|
+
// https://github.com/necolas/react-native-web
|
11
|
+
|
12
|
+
const normalizeColor = function (color) {
|
13
|
+
let opacity = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
14
|
+
// If the opacity is 1 there's no need to normalize the color
|
15
|
+
if (opacity === 1) {
|
16
|
+
return color;
|
17
|
+
}
|
18
|
+
const integer = (0, _normalizeColors.default)(color);
|
19
|
+
|
20
|
+
// If the colour is an unknown format, the return value is null
|
21
|
+
if (integer === null) {
|
22
|
+
return color;
|
23
|
+
}
|
24
|
+
const hex = integer.toString(16).padStart(8, '0');
|
25
|
+
if (hex.length === 8) {
|
26
|
+
const [r = 0, g = 0, b = 0, a = 1] = hex.split(/(?=(?:..)*$)/).map(x => parseInt(x, 16)).filter(num => !isNaN(num));
|
27
|
+
return `rgba(${r},${g},${b},${a / 255 * opacity})`;
|
28
|
+
}
|
29
|
+
return color;
|
30
|
+
};
|
31
|
+
exports.normalizeColor = normalizeColor;
|
32
|
+
const normalizeNumericValue = value => value ? `${value}px` : value;
|
33
|
+
exports.normalizeNumericValue = normalizeNumericValue;
|
34
|
+
const normalizeTransform = (key, value) => {
|
35
|
+
if (key.includes('scale')) {
|
36
|
+
return value;
|
37
|
+
}
|
38
|
+
if (typeof value === 'number') {
|
39
|
+
return normalizeNumericValue(value);
|
40
|
+
}
|
41
|
+
return value;
|
42
|
+
};
|
43
|
+
const createTextShadowValue = style => {
|
44
|
+
// at this point every prop is present
|
45
|
+
const {
|
46
|
+
textShadowColor,
|
47
|
+
textShadowOffset,
|
48
|
+
textShadowRadius
|
49
|
+
} = style;
|
50
|
+
const offsetX = normalizeNumericValue(textShadowOffset.width);
|
51
|
+
const offsetY = normalizeNumericValue(textShadowOffset.height);
|
52
|
+
const radius = normalizeNumericValue(textShadowRadius);
|
53
|
+
const color = normalizeColor(textShadowColor);
|
54
|
+
return `${offsetX} ${offsetY} ${radius} ${color}`;
|
55
|
+
};
|
56
|
+
const createBoxShadowValue = style => {
|
57
|
+
// at this point every prop is present
|
58
|
+
const {
|
59
|
+
shadowColor,
|
60
|
+
shadowOffset,
|
61
|
+
shadowOpacity,
|
62
|
+
shadowRadius
|
63
|
+
} = style;
|
64
|
+
const offsetX = normalizeNumericValue(shadowOffset.width);
|
65
|
+
const offsetY = normalizeNumericValue(shadowOffset.height);
|
66
|
+
const radius = normalizeNumericValue(shadowRadius);
|
67
|
+
const color = normalizeColor(shadowColor, shadowOpacity);
|
68
|
+
return `${offsetX} ${offsetY} ${radius} ${color}`;
|
69
|
+
};
|
70
|
+
const createTransformValue = transforms => transforms.map(transform => {
|
71
|
+
const [key] = Object.keys(transform);
|
72
|
+
if (!key) {
|
73
|
+
return undefined;
|
74
|
+
}
|
75
|
+
const value = transform[key];
|
76
|
+
switch (key) {
|
77
|
+
case 'matrix':
|
78
|
+
case 'matrix3d':
|
79
|
+
return `${key}(${value.join(',')})`;
|
80
|
+
default:
|
81
|
+
return `${key}(${normalizeTransform(key, value)})`;
|
82
|
+
}
|
83
|
+
}).filter(Boolean).join(' ');
|
84
|
+
const preprocessor = exports.preprocessor = {
|
85
|
+
createTextShadowValue,
|
86
|
+
createBoxShadowValue,
|
87
|
+
createTransformValue
|
88
|
+
};
|
89
|
+
//# sourceMappingURL=normalizer.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["_normalizeColors","_interopRequireDefault","require","obj","__esModule","default","normalizeColor","color","opacity","arguments","length","undefined","integer","normalizeColors","hex","toString","padStart","r","g","b","a","split","map","x","parseInt","filter","num","isNaN","exports","normalizeNumericValue","value","normalizeTransform","key","includes","createTextShadowValue","style","textShadowColor","textShadowOffset","textShadowRadius","offsetX","width","offsetY","height","radius","createBoxShadowValue","shadowColor","shadowOffset","shadowOpacity","shadowRadius","createTransformValue","transforms","transform","Object","keys","join","Boolean","preprocessor"],"sourceRoot":"../../../src","sources":["utils/normalizer.ts"],"mappings":";;;;;;AAEA,IAAAA,gBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA4D,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAF5D;AACA;;AAUO,MAAMG,cAAc,GAAG,SAAAA,CAACC,KAAa,EAA0B;EAAA,IAAxBC,OAAe,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC;EAC7D;EACA,IAAID,OAAO,KAAK,CAAC,EAAE;IACf,OAAOD,KAAK;EAChB;EAEA,MAAMK,OAAO,GAAG,IAAAC,wBAAe,EAACN,KAAK,CAAkB;;EAEvD;EACA,IAAIK,OAAO,KAAK,IAAI,EAAE;IAClB,OAAOL,KAAK;EAChB;EAEA,MAAMO,GAAG,GAAGF,OAAO,CAACG,QAAQ,CAAC,EAAE,CAAC,CAACC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC;EAEjD,IAAIF,GAAG,CAACJ,MAAM,KAAK,CAAC,EAAE;IAClB,MAAM,CAACO,CAAC,GAAG,CAAC,EAAEC,CAAC,GAAG,CAAC,EAAEC,CAAC,GAAG,CAAC,EAAEC,CAAC,GAAG,CAAC,CAAC,GAAGN,GAAG,CACnCO,KAAK,CAAC,cAAc,CAAC,CACrBC,GAAG,CAACC,CAAC,IAAIC,QAAQ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C,aAAa;IAAEC;EAAa,CAAC,GAAGb,KAAK;EACxE,MAAMI,OAAO,GAAGV,qBAAqB,CAACiB,YAAY,CAACN,KAAK,CAAC;EACzD,MAAMC,OAAO,GAAGZ,qBAAqB,CAACiB,YAAY,CAACJ,MAAM,CAAC;EAC1D,MAAMC,MAAM,GAAGd,qBAAqB,CAACmB,YAAY,CAAC;EAClD,MAAMzC,KAAK,GAAGD,cAAc,CAACuC,WAAW,EAAYE,aAAuB,CAAC;EAE5E,OAAQ,GAAER,OAAQ,IAAGE,OAAQ,IAAGE,MAAO,IAAGpC,KAAM,EAAC;AACrD,CAAC;AAED,MAAM0C,oBAAoB,GAAIC,UAAsB,IAAKA,UAAU,CAC9D5B,GAAG,CAAC6B,SAAS,IAAI;EACd,MAAM,CAACnB,GAAG,CAAC,GAAGoB,MAAM,CAACC,IAAI,CAACF,SAAS,CAAC;EAEpC,IAAI,CAACnB,GAAG,EAAE;IACN,OAAOrB,SAAS;EACpB;EAEA,MAAMmB,KAAK,GAAGqB,SAAS,CAACnB,GAAG,CAA2B;EAEtD,QAAOA,GAAG;IACN,KAAK,QAAQ;IACb,KAAK,UAAU;MACX,OAAQ,GAAEA,GAAI,IAAIF,KAAK,CAAmBwB,IAAI,CAAC,GAAG,CAAE,GAAE;IAC1D;MACI,OAAQ,GAAEtB,GAAI,IAAGD,kBAAkB,CAACC,GAAG,EAAEF,KAAK,CAAE,GAAE;EAC1D;AACJ,CAAC,CAAC,CACDL,MAAM,CAAC8B,OAAO,CAAC,CACfD,IAAI,CAAC,GAAG,CAAC;AAEP,MAAME,YAA0B,GAAA5B,OAAA,CAAA4B,YAAA,GAAG;EACtCtB,qBAAqB;EACrBU,oBAAoB;EACpBK;AACJ,CAAC"}
|
@@ -77,7 +77,7 @@ const parseStyle = (style, breakpoint, screenSize, breakpointPairs) => {
|
|
77
77
|
}
|
78
78
|
return [key, (0, _breakpoints.getValueForBreakpoint)(value, breakpoint, screenSize, breakpointPairs)];
|
79
79
|
}));
|
80
|
-
return
|
80
|
+
return _common.isWeb ? (0, _normalizeStyles.normalizeStyles)(parsedStyles) : parsedStyles;
|
81
81
|
};
|
82
82
|
exports.parseStyle = parseStyle;
|
83
83
|
//# sourceMappingURL=styles.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_breakpoints","require","_normalizeStyles","_common","proxifyFunction","fn","breakpoint","screenSize","breakpointPairs","Proxy","apply","target","thisArg","argumentsList","parseStyle","exports","style","entries","Object","parsedStyles","fromEntries","map","_ref","key","value","hasNestedProperties","isTransform","Array","isArray","isDynamicFunction","isValidStyle","getValueForBreakpoint","isWeb","normalizeStyles"],"sourceRoot":"../../../src","sources":["utils/styles.ts"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMG,eAAe,GAAGA,CAC3BC,EAAY,EAAEC,UAA4B,EAC1CC,UAAsB,EACtBC,eAA2C,KAChC,IAAIC,KAAK,CAACJ,EAAE,EAAE;EACzBK,KAAK,EAAEA,CAACC,MAAM,EAAEC,OAAO,EAAEC,aAAa,KAClCC,UAAU,CAACH,MAAM,CAACD,KAAK,CAACE,OAAO,EAAEC,aAAa,CAAC,EAAEP,UAAU,EAAEC,UAAU,EAAEC,eAAe;AAChG,CAAC,CAAC;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAxBAO,OAAA,CAAAX,eAAA,GAAAA,eAAA;AAyBO,MAAMU,UAAU,GAAGA,CACtBE,KAA8B,EAC9BV,UAA4B,EAC5BC,UAAsB,EACtBC,eAA2C,KACvC;EACJ,MAAMS,OAAO,GAAGC,MAAM,CAACD,OAAO,CAACD,KAAK,CAGnC;EAED,MAAMG,YAAY,GAAGD,MAAM,CACtBE,WAAW,CAACH,OAAO,CACfI,GAAG,CAACC,IAAA,IAAkB;IAAA,IAAjB,CAACC,GAAG,EAAEC,KAAK,CAAC,GAAAF,IAAA;IACd,MAAMG,mBAAmB,GAAGF,GAAG,KAAK,cAAc,IAAIA,GAAG,KAAK,kBAAkB;IAEhF,IAAIE,mBAAmB,EAAE;MACrB,OAAO,CACHF,GAAG,EACHT,UAAU,CAACU,KAAK,EAA6BlB,UAAU,EAAEC,UAAU,EAAEC,eAAe,CAAC,CACxF;IACL;IAEA,MAAMkB,WAAW,GAAGH,GAAG,KAAK,WAAW;IAEvC,IAAIG,WAAW,IAAIC,KAAK,CAACC,OAAO,CAACJ,KAAK,CAAC,EAAE;MACrC,OAAO,CACHD,GAAG,EACHC,KAAK,CAACH,GAAG,CAACG,KAAK,IAAIV,UAAU,CAACU,KAAK,EAAElB,UAAU,EAAEC,UAAU,EAAEC,eAAe,CAAC,CAAC,CACjF;IACL;IAEA,MAAMqB,iBAAiB,GAAG,OAAOL,KAAK,KAAK,UAAU;IACrD,MAAMM,YAAY,GAAG,OAAON,KAAK,KAAK,QAAQ;IAE9C,IAAIK,iBAAiB,IAAIC,YAAY,EAAE;MACnC,OAAO,CAACP,GAAG,EAAEC,KAAK,CAAC;IACvB;IAEA,OAAO,CACHD,GAAG,EACH,IAAAQ,kCAAqB,EACjBP,KAAK,EACLlB,UAAU,EACVC,UAAU,EACVC,eACJ,CAAC,CACJ;EACL,CAAC,CACL,CAAC;EAEL,
|
1
|
+
{"version":3,"names":["_breakpoints","require","_normalizeStyles","_common","proxifyFunction","fn","breakpoint","screenSize","breakpointPairs","Proxy","apply","target","thisArg","argumentsList","parseStyle","exports","style","entries","Object","parsedStyles","fromEntries","map","_ref","key","value","hasNestedProperties","isTransform","Array","isArray","isDynamicFunction","isValidStyle","getValueForBreakpoint","isWeb","normalizeStyles"],"sourceRoot":"../../../src","sources":["utils/styles.ts"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMG,eAAe,GAAGA,CAC3BC,EAAY,EAAEC,UAA4B,EAC1CC,UAAsB,EACtBC,eAA2C,KAChC,IAAIC,KAAK,CAACJ,EAAE,EAAE;EACzBK,KAAK,EAAEA,CAACC,MAAM,EAAEC,OAAO,EAAEC,aAAa,KAClCC,UAAU,CAACH,MAAM,CAACD,KAAK,CAACE,OAAO,EAAEC,aAAa,CAAC,EAAEP,UAAU,EAAEC,UAAU,EAAEC,eAAe;AAChG,CAAC,CAAC;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAxBAO,OAAA,CAAAX,eAAA,GAAAA,eAAA;AAyBO,MAAMU,UAAU,GAAGA,CACtBE,KAA8B,EAC9BV,UAA4B,EAC5BC,UAAsB,EACtBC,eAA2C,KACvC;EACJ,MAAMS,OAAO,GAAGC,MAAM,CAACD,OAAO,CAACD,KAAK,CAGnC;EAED,MAAMG,YAAY,GAAGD,MAAM,CACtBE,WAAW,CAACH,OAAO,CACfI,GAAG,CAACC,IAAA,IAAkB;IAAA,IAAjB,CAACC,GAAG,EAAEC,KAAK,CAAC,GAAAF,IAAA;IACd,MAAMG,mBAAmB,GAAGF,GAAG,KAAK,cAAc,IAAIA,GAAG,KAAK,kBAAkB;IAEhF,IAAIE,mBAAmB,EAAE;MACrB,OAAO,CACHF,GAAG,EACHT,UAAU,CAACU,KAAK,EAA6BlB,UAAU,EAAEC,UAAU,EAAEC,eAAe,CAAC,CACxF;IACL;IAEA,MAAMkB,WAAW,GAAGH,GAAG,KAAK,WAAW;IAEvC,IAAIG,WAAW,IAAIC,KAAK,CAACC,OAAO,CAACJ,KAAK,CAAC,EAAE;MACrC,OAAO,CACHD,GAAG,EACHC,KAAK,CAACH,GAAG,CAACG,KAAK,IAAIV,UAAU,CAACU,KAAK,EAAElB,UAAU,EAAEC,UAAU,EAAEC,eAAe,CAAC,CAAC,CACjF;IACL;IAEA,MAAMqB,iBAAiB,GAAG,OAAOL,KAAK,KAAK,UAAU;IACrD,MAAMM,YAAY,GAAG,OAAON,KAAK,KAAK,QAAQ;IAE9C,IAAIK,iBAAiB,IAAIC,YAAY,EAAE;MACnC,OAAO,CAACP,GAAG,EAAEC,KAAK,CAAC;IACvB;IAEA,OAAO,CACHD,GAAG,EACH,IAAAQ,kCAAqB,EACjBP,KAAK,EACLlB,UAAU,EACVC,UAAU,EACVC,eACJ,CAAC,CACJ;EACL,CAAC,CACL,CAAC;EAEL,OAAOwB,aAAK,GACN,IAAAC,gCAAe,EAACd,YAAY,CAAC,GAC7BA,YAAY;AACtB,CAAC;AAAAJ,OAAA,CAAAD,UAAA,GAAAA,UAAA"}
|
@@ -1,9 +1,10 @@
|
|
1
1
|
import { useEffect, useRef, useState } from 'react';
|
2
|
+
import { isServer } from '../utils';
|
2
3
|
export const useDimensions = () => {
|
3
4
|
const timerRef = useRef();
|
4
5
|
const [screenSize, setScreenSize] = useState({
|
5
|
-
width: window.innerWidth,
|
6
|
-
height: window.innerHeight
|
6
|
+
width: isServer ? 0 : window.innerWidth,
|
7
|
+
height: isServer ? 0 : window.innerHeight
|
7
8
|
});
|
8
9
|
useEffect(() => {
|
9
10
|
const handleResize = () => {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["useEffect","useRef","useState","useDimensions","timerRef","screenSize","setScreenSize","width","window","innerWidth","height","innerHeight","handleResize","clearTimeout","current","setTimeout","addEventListener","removeEventListener"],"sourceRoot":"../../../src","sources":["hooks/useDimensions.web.ts"],"mappings":"AAAA,SAASA,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;
|
1
|
+
{"version":3,"names":["useEffect","useRef","useState","isServer","useDimensions","timerRef","screenSize","setScreenSize","width","window","innerWidth","height","innerHeight","handleResize","clearTimeout","current","setTimeout","addEventListener","removeEventListener"],"sourceRoot":"../../../src","sources":["hooks/useDimensions.web.ts"],"mappings":"AAAA,SAASA,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAEnD,SAASC,QAAQ,QAAQ,UAAU;AAEnC,OAAO,MAAMC,aAAa,GAAGA,CAAA,KAAkB;EAC3C,MAAMC,QAAQ,GAAGJ,MAAM,CAAgC,CAAC;EACxD,MAAM,CAACK,UAAU,EAAEC,aAAa,CAAC,GAAGL,QAAQ,CAAa;IACrDM,KAAK,EAAEL,QAAQ,GAAG,CAAC,GAAGM,MAAM,CAACC,UAAU;IACvCC,MAAM,EAAER,QAAQ,GAAG,CAAC,GAAGM,MAAM,CAACG;EAClC,CAAC,CAAC;EAEFZ,SAAS,CAAC,MAAM;IACZ,MAAMa,YAAY,GAAGA,CAAA,KAAM;MACvBC,YAAY,CAACT,QAAQ,CAACU,OAAO,CAAC;MAE9BV,QAAQ,CAACU,OAAO,GAAGC,UAAU,CAAC,MAAMT,aAAa,CAAC;QAC9CC,KAAK,EAAEC,MAAM,CAACC,UAAU;QACxBC,MAAM,EAAEF,MAAM,CAACG;MACnB,CAAC,CAAC,EAAE,GAAG,CAAC;IACZ,CAAC;IAEDH,MAAM,CAACQ,gBAAgB,CAAC,QAAQ,EAAEJ,YAAY,CAAC;IAE/C,OAAO,MAAM;MACTJ,MAAM,CAACS,mBAAmB,CAAC,QAAQ,EAAEL,YAAY,CAAC;MAClDC,YAAY,CAACT,QAAQ,CAACU,OAAO,CAAC;IAClC,CAAC;EACL,CAAC,EAAE,EAAE,CAAC;EAEN,OAAOT,UAAU;AACrB,CAAC"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
|
1
|
+
export * from './normalizer';
|
2
2
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/index.ts"],"mappings":""}
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/index.ts"],"mappings":"AAAA,cAAc,cAAc"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/normalizer.ts"],"mappings":""}
|
@@ -5,5 +5,6 @@ export const throwError = message => {
|
|
5
5
|
export const warn = message => {
|
6
6
|
console.warn(`🦄 [react-native-unistyles]: ${message}`);
|
7
7
|
};
|
8
|
-
export const isWeb =
|
8
|
+
export const isWeb = Platform.OS === 'web';
|
9
|
+
export const isServer = typeof window === 'undefined';
|
9
10
|
//# sourceMappingURL=common.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["Platform","throwError","message","Error","warn","console","isWeb","OS"],"sourceRoot":"../../../src","sources":["utils/common.ts"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,cAAc;AAEvC,OAAO,MAAMC,UAAU,GAAIC,OAAe,IAAK;EAC3C,MAAM,IAAIC,KAAK,CAAE,gCAA+BD,OAAQ,EAAC,CAAC;AAC9D,CAAC;AAED,OAAO,MAAME,IAAI,GAAIF,OAAe,IAAK;EACrCG,OAAO,CAACD,IAAI,CAAE,gCAA+BF,OAAQ,EAAC,CAAC;AAC3D,CAAC;AAED,OAAO,MAAMI,KAAK,
|
1
|
+
{"version":3,"names":["Platform","throwError","message","Error","warn","console","isWeb","OS","isServer","window"],"sourceRoot":"../../../src","sources":["utils/common.ts"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,cAAc;AAEvC,OAAO,MAAMC,UAAU,GAAIC,OAAe,IAAK;EAC3C,MAAM,IAAIC,KAAK,CAAE,gCAA+BD,OAAQ,EAAC,CAAC;AAC9D,CAAC;AAED,OAAO,MAAME,IAAI,GAAIF,OAAe,IAAK;EACrCG,OAAO,CAACD,IAAI,CAAE,gCAA+BF,OAAQ,EAAC,CAAC;AAC3D,CAAC;AAED,OAAO,MAAMI,KAAK,GAAGN,QAAQ,CAACO,EAAE,KAAK,KAAK;AAC1C,OAAO,MAAMC,QAAQ,GAAG,OAAOC,MAAM,KAAK,WAAW"}
|
@@ -1,5 +1,7 @@
|
|
1
1
|
export { normalizeStyles } from './normalizeStyles';
|
2
|
+
export * from './normalizer';
|
2
3
|
export { getBreakpointFromScreenWidth, sortAndValidateBreakpoints, getValueForBreakpoint } from './breakpoints';
|
3
4
|
export { proxifyFunction, parseStyle } from './styles';
|
5
|
+
export { isServer } from './common';
|
4
6
|
export { extractValues, getKeyForCustomMediaQuery, isMediaQuery, isWithinTheHeight, isWithinTheWidth, isWithinTheWidthAndHeight } from './mediaQueries';
|
5
7
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["normalizeStyles","getBreakpointFromScreenWidth","sortAndValidateBreakpoints","getValueForBreakpoint","proxifyFunction","parseStyle","extractValues","getKeyForCustomMediaQuery","isMediaQuery","isWithinTheHeight","isWithinTheWidth","isWithinTheWidthAndHeight"],"sourceRoot":"../../../src","sources":["utils/index.ts"],"mappings":"AAAA,SAASA,eAAe,QAAQ,mBAAmB;AACnD,SAASC,4BAA4B,EAAEC,0BAA0B,EAAEC,qBAAqB,QAAQ,eAAe;AAC/G,SAASC,eAAe,EAAEC,UAAU,QAAQ,UAAU;AACtD,SACIC,aAAa,EACbC,yBAAyB,EACzBC,YAAY,EACZC,iBAAiB,EACjBC,gBAAgB,EAChBC,yBAAyB,QACtB,gBAAgB"}
|
1
|
+
{"version":3,"names":["normalizeStyles","getBreakpointFromScreenWidth","sortAndValidateBreakpoints","getValueForBreakpoint","proxifyFunction","parseStyle","isServer","extractValues","getKeyForCustomMediaQuery","isMediaQuery","isWithinTheHeight","isWithinTheWidth","isWithinTheWidthAndHeight"],"sourceRoot":"../../../src","sources":["utils/index.ts"],"mappings":"AAAA,SAASA,eAAe,QAAQ,mBAAmB;AACnD,cAAc,cAAc;AAC5B,SAASC,4BAA4B,EAAEC,0BAA0B,EAAEC,qBAAqB,QAAQ,eAAe;AAC/G,SAASC,eAAe,EAAEC,UAAU,QAAQ,UAAU;AACtD,SAASC,QAAQ,QAAQ,UAAU;AACnC,SACIC,aAAa,EACbC,yBAAyB,EACzBC,YAAY,EACZC,iBAAiB,EACjBC,gBAAgB,EAChBC,yBAAyB,QACtB,gBAAgB"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["utils/module.d.ts"],"mappings":""}
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { warn } from './common';
|
2
|
-
|
3
|
-
const normalizeBoxShadow =
|
2
|
+
import { preprocessor } from './normalizer';
|
3
|
+
const normalizeBoxShadow = style => {
|
4
4
|
const requiredBoxShadowProperties = ['shadowColor', 'shadowOffset', 'shadowOpacity', 'shadowRadius'];
|
5
|
-
if (!requiredBoxShadowProperties.every(prop => prop in
|
5
|
+
if (!requiredBoxShadowProperties.every(prop => prop in style)) {
|
6
6
|
warn(`can't apply box shadow as you miss at least one of these properties: ${requiredBoxShadowProperties.join(', ')}`);
|
7
7
|
return {
|
8
8
|
shadowColor: undefined,
|
@@ -12,16 +12,16 @@ const normalizeBoxShadow = styles => {
|
|
12
12
|
};
|
13
13
|
}
|
14
14
|
return {
|
15
|
-
boxShadow: preprocessor.createBoxShadowValue(
|
15
|
+
boxShadow: preprocessor.createBoxShadowValue(style),
|
16
16
|
shadowColor: undefined,
|
17
17
|
shadowOffset: undefined,
|
18
18
|
shadowOpacity: undefined,
|
19
19
|
shadowRadius: undefined
|
20
20
|
};
|
21
21
|
};
|
22
|
-
const normalizeTextShadow =
|
22
|
+
const normalizeTextShadow = style => {
|
23
23
|
const requiredTextShadowProperties = ['textShadowColor', 'textShadowOffset', 'textShadowRadius'];
|
24
|
-
if (!requiredTextShadowProperties.every(prop => prop in
|
24
|
+
if (!requiredTextShadowProperties.every(prop => prop in style)) {
|
25
25
|
warn(`can't apply text shadow as you miss at least one of these properties: ${requiredTextShadowProperties.join(', ')}`);
|
26
26
|
return {
|
27
27
|
textShadowColor: undefined,
|
@@ -30,20 +30,20 @@ const normalizeTextShadow = styles => {
|
|
30
30
|
};
|
31
31
|
}
|
32
32
|
return {
|
33
|
-
textShadow: preprocessor.createTextShadowValue(
|
33
|
+
textShadow: preprocessor.createTextShadowValue(style),
|
34
34
|
textShadowColor: undefined,
|
35
35
|
textShadowOffset: undefined,
|
36
36
|
textShadowRadius: undefined
|
37
37
|
};
|
38
38
|
};
|
39
|
-
export const normalizeStyles =
|
40
|
-
const normalizedTransform = 'transform' in
|
41
|
-
transform: preprocessor.createTransformValue(
|
39
|
+
export const normalizeStyles = style => {
|
40
|
+
const normalizedTransform = 'transform' in style && Array.isArray(style.transform) ? {
|
41
|
+
transform: preprocessor.createTransformValue(style.transform)
|
42
42
|
} : {};
|
43
|
-
const normalizedBoxShadow = 'shadowColor' in
|
44
|
-
const normalizedTextShadow = 'textShadowColor' in
|
43
|
+
const normalizedBoxShadow = 'shadowColor' in style || 'shadowOffset' in style || 'shadowOpacity' in style || 'shadowRadius' in style ? normalizeBoxShadow(style) : {};
|
44
|
+
const normalizedTextShadow = 'textShadowColor' in style || 'textShadowOffset' in style || 'textShadowRadius' in style ? normalizeTextShadow(style) : {};
|
45
45
|
return {
|
46
|
-
...
|
46
|
+
...style,
|
47
47
|
...normalizedTransform,
|
48
48
|
...normalizedBoxShadow,
|
49
49
|
...normalizedTextShadow
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["warn","preprocessor","
|
1
|
+
{"version":3,"names":["warn","preprocessor","normalizeBoxShadow","style","requiredBoxShadowProperties","every","prop","join","shadowColor","undefined","shadowOffset","shadowOpacity","shadowRadius","boxShadow","createBoxShadowValue","normalizeTextShadow","requiredTextShadowProperties","textShadowColor","textShadowOffset","textShadowRadius","textShadow","createTextShadowValue","normalizeStyles","normalizedTransform","Array","isArray","transform","createTransformValue","normalizedBoxShadow","normalizedTextShadow"],"sourceRoot":"../../../src","sources":["utils/normalizeStyles.web.ts"],"mappings":"AAAA,SAASA,IAAI,QAAQ,UAAU;AAC/B,SAASC,YAAY,QAAQ,cAAc;AAG3C,MAAMC,kBAAkB,GAAyBC,KAAQ,IAA0B;EAC/E,MAAMC,2BAA2B,GAAG,CAChC,aAAa,EACb,cAAc,EACd,eAAe,EACf,cAAc,CACjB;EAED,IAAI,CAACA,2BAA2B,CAACC,KAAK,CAACC,IAAI,IAAIA,IAAI,IAAIH,KAAK,CAAC,EAAE;IAC3DH,IAAI,CAAE,wEAAuEI,2BAA2B,CAACG,IAAI,CAAC,IAAI,CAAE,EAAC,CAAC;IAEtH,OAAO;MACHC,WAAW,EAAEC,SAAS;MACtBC,YAAY,EAAED,SAAS;MACvBE,aAAa,EAAEF,SAAS;MACxBG,YAAY,EAAEH;IAClB,CAAC;EACL;EAEA,OAAO;IACHI,SAAS,EAAEZ,YAAY,CAACa,oBAAoB,CAACX,KAAK,CAAC;IACnDK,WAAW,EAAEC,SAAS;IACtBC,YAAY,EAAED,SAAS;IACvBE,aAAa,EAAEF,SAAS;IACxBG,YAAY,EAAEH;EAClB,CAAC;AACL,CAAC;AAED,MAAMM,mBAAmB,GAA0BZ,KAAQ,IAA2B;EAClF,MAAMa,4BAA4B,GAAG,CACjC,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,CACrB;EAED,IAAI,CAACA,4BAA4B,CAACX,KAAK,CAACC,IAAI,IAAIA,IAAI,IAAIH,KAAK,CAAC,EAAE;IAC5DH,IAAI,CAAE,yEAAwEgB,4BAA4B,CAACT,IAAI,CAAC,IAAI,CAAE,EAAC,CAAC;IAExH,OAAO;MACHU,eAAe,EAAER,SAAS;MAC1BS,gBAAgB,EAAET,SAAS;MAC3BU,gBAAgB,EAAEV;IACtB,CAAC;EACL;EAEA,OAAO;IACHW,UAAU,EAAEnB,YAAY,CAACoB,qBAA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