react-native-unistyles 2.0.0-alpha.10 → 2.0.0-alpha.12
Sign up to get free protection for your applications and to get access to all the features.
- package/cxx/UnistylesRuntime.cpp +55 -1
- package/cxx/UnistylesRuntime.h +10 -4
- package/ios/UnistylesModule.mm +12 -2
- package/lib/commonjs/common.js +19 -6
- package/lib/commonjs/common.js.map +1 -1
- package/lib/commonjs/core/UnistyleRegistry.js +49 -1
- package/lib/commonjs/core/UnistyleRegistry.js.map +1 -1
- package/lib/commonjs/core/UnistylesRuntime.js +12 -16
- package/lib/commonjs/core/UnistylesRuntime.js.map +1 -1
- package/lib/commonjs/hooks/useUnistyles.js +8 -2
- package/lib/commonjs/hooks/useUnistyles.js.map +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/plugins/index.js +45 -0
- package/lib/commonjs/plugins/index.js.map +1 -0
- package/lib/commonjs/plugins/normalizeWebStylesPlugin.js +12 -0
- package/lib/commonjs/plugins/normalizeWebStylesPlugin.js.map +1 -0
- package/lib/commonjs/plugins/normalizer/index.js +32 -0
- package/lib/commonjs/plugins/normalizer/index.js.map +1 -0
- package/lib/commonjs/plugins/normalizer/module.d.js.map +1 -0
- package/lib/commonjs/{utils/normalizeStyles.web.js → plugins/normalizer/normalizeStyle.js} +5 -5
- package/lib/commonjs/plugins/normalizer/normalizeStyle.js.map +1 -0
- package/lib/commonjs/plugins/normalizer/normalizer.js.map +1 -0
- package/lib/commonjs/plugins/withPlugins.js +18 -0
- package/lib/commonjs/plugins/withPlugins.js.map +1 -0
- package/lib/commonjs/types/plugin.js +6 -0
- package/lib/{module/utils/module.d.js.map → commonjs/types/plugin.js.map} +1 -1
- package/lib/commonjs/types/variants.js +2 -0
- package/lib/commonjs/{utils/module.d.js.map → types/variants.js.map} +1 -1
- package/lib/commonjs/useStyles.js +5 -4
- package/lib/commonjs/useStyles.js.map +1 -1
- package/lib/commonjs/utils/breakpoints.js +15 -70
- package/lib/commonjs/utils/breakpoints.js.map +1 -1
- package/lib/commonjs/utils/index.js +12 -52
- package/lib/commonjs/utils/index.js.map +1 -1
- package/lib/commonjs/utils/mq.js +1 -1
- package/lib/commonjs/utils/mq.js.map +1 -1
- package/lib/commonjs/utils/mqParser.js +4 -1
- package/lib/commonjs/utils/mqParser.js.map +1 -1
- package/lib/commonjs/utils/styles.js +22 -11
- package/lib/commonjs/utils/styles.js.map +1 -1
- package/lib/commonjs/utils/variants.js +2 -5
- package/lib/commonjs/utils/variants.js.map +1 -1
- package/lib/module/common.js +17 -7
- package/lib/module/common.js.map +1 -1
- package/lib/module/core/UnistyleRegistry.js +49 -1
- package/lib/module/core/UnistyleRegistry.js.map +1 -1
- package/lib/module/core/UnistylesRuntime.js +12 -16
- package/lib/module/core/UnistylesRuntime.js.map +1 -1
- package/lib/module/hooks/useUnistyles.js +8 -2
- package/lib/module/hooks/useUnistyles.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/plugins/index.js +4 -0
- package/lib/module/plugins/index.js.map +1 -0
- package/lib/module/plugins/normalizeWebStylesPlugin.js +6 -0
- package/lib/module/plugins/normalizeWebStylesPlugin.js.map +1 -0
- package/lib/module/plugins/normalizer/index.js +3 -0
- package/lib/module/plugins/normalizer/index.js.map +1 -0
- package/lib/module/plugins/normalizer/module.d.js.map +1 -0
- package/lib/module/{utils/normalizeStyles.web.js → plugins/normalizer/normalizeStyle.js} +3 -3
- package/lib/module/plugins/normalizer/normalizeStyle.js.map +1 -0
- package/lib/module/plugins/normalizer/normalizer.js.map +1 -0
- package/lib/module/plugins/withPlugins.js +11 -0
- package/lib/module/plugins/withPlugins.js.map +1 -0
- package/lib/module/types/plugin.js +2 -0
- package/lib/module/types/plugin.js.map +1 -0
- package/lib/module/types/variants.js +2 -0
- package/lib/module/types/variants.js.map +1 -0
- package/lib/module/useStyles.js +5 -4
- package/lib/module/useStyles.js.map +1 -1
- package/lib/module/utils/breakpoints.js +13 -66
- package/lib/module/utils/breakpoints.js.map +1 -1
- package/lib/module/utils/index.js +2 -5
- package/lib/module/utils/index.js.map +1 -1
- package/lib/module/utils/mq.js +1 -1
- package/lib/module/utils/mq.js.map +1 -1
- package/lib/module/utils/mqParser.js +3 -3
- package/lib/module/utils/mqParser.js.map +1 -1
- package/lib/module/utils/styles.js +23 -12
- package/lib/module/utils/styles.js.map +1 -1
- package/lib/module/utils/variants.js +2 -5
- package/lib/module/utils/variants.js.map +1 -1
- package/lib/typescript/src/common.d.ts +16 -6
- package/lib/typescript/src/common.d.ts.map +1 -1
- package/lib/typescript/src/core/UnistyleRegistry.d.ts +7 -2
- package/lib/typescript/src/core/UnistyleRegistry.d.ts.map +1 -1
- package/lib/typescript/src/core/UnistylesRuntime.d.ts +7 -8
- package/lib/typescript/src/core/UnistylesRuntime.d.ts.map +1 -1
- package/lib/typescript/src/core/index.d.ts +1 -0
- package/lib/typescript/src/core/index.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useUnistyles.d.ts +2 -1
- package/lib/typescript/src/hooks/useUnistyles.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +4 -3
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/plugins/index.d.ts +4 -0
- package/lib/typescript/src/plugins/index.d.ts.map +1 -0
- package/lib/typescript/src/plugins/normalizeWebStylesPlugin.d.ts +3 -0
- package/lib/typescript/src/plugins/normalizeWebStylesPlugin.d.ts.map +1 -0
- package/lib/typescript/src/plugins/normalizer/index.d.ts +3 -0
- package/lib/typescript/src/plugins/normalizer/index.d.ts.map +1 -0
- package/lib/typescript/src/plugins/normalizer/normalizeStyle.d.ts +3 -0
- package/lib/typescript/src/plugins/normalizer/normalizeStyle.d.ts.map +1 -0
- package/lib/typescript/src/{utils → plugins/normalizer}/normalizer.d.ts +1 -1
- package/lib/typescript/src/plugins/normalizer/normalizer.d.ts.map +1 -0
- package/lib/typescript/src/plugins/withPlugins.d.ts +3 -0
- package/lib/typescript/src/plugins/withPlugins.d.ts.map +1 -0
- package/lib/typescript/src/types/breakpoints.d.ts +3 -4
- package/lib/typescript/src/types/breakpoints.d.ts.map +1 -1
- package/lib/typescript/src/types/core.d.ts +4 -9
- package/lib/typescript/src/types/core.d.ts.map +1 -1
- package/lib/typescript/src/types/index.d.ts +3 -1
- package/lib/typescript/src/types/index.d.ts.map +1 -1
- package/lib/typescript/src/types/plugin.d.ts +7 -0
- package/lib/typescript/src/types/plugin.d.ts.map +1 -0
- package/lib/typescript/src/types/unistyles.d.ts +11 -2
- package/lib/typescript/src/types/unistyles.d.ts.map +1 -1
- package/lib/typescript/src/types/variants.d.ts +8 -0
- package/lib/typescript/src/types/variants.d.ts.map +1 -0
- package/lib/typescript/src/useStyles.d.ts +2 -2
- package/lib/typescript/src/useStyles.d.ts.map +1 -1
- package/lib/typescript/src/utils/breakpoints.d.ts +2 -5
- package/lib/typescript/src/utils/breakpoints.d.ts.map +1 -1
- package/lib/typescript/src/utils/index.d.ts +2 -5
- package/lib/typescript/src/utils/index.d.ts.map +1 -1
- package/lib/typescript/src/utils/mqParser.d.ts +12 -0
- package/lib/typescript/src/utils/mqParser.d.ts.map +1 -1
- package/lib/typescript/src/utils/styles.d.ts +3 -3
- package/lib/typescript/src/utils/styles.d.ts.map +1 -1
- package/lib/typescript/src/utils/variants.d.ts +1 -1
- package/lib/typescript/src/utils/variants.d.ts.map +1 -1
- package/package.json +4 -1
- package/src/__tests__/mocks.ts +24 -0
- package/src/common.ts +22 -7
- package/src/core/UnistyleRegistry.ts +46 -2
- package/src/core/UnistylesRuntime.ts +14 -20
- package/src/core/index.ts +1 -0
- package/src/hooks/useUnistyles.ts +7 -2
- package/src/index.ts +3 -1
- package/src/plugins/index.ts +3 -0
- package/src/plugins/normalizeWebStylesPlugin.ts +7 -0
- package/src/plugins/normalizer/index.ts +2 -0
- package/src/{utils/normalizeStyles.web.ts → plugins/normalizer/normalizeStyle.ts} +3 -3
- package/src/{utils → plugins/normalizer}/normalizer.ts +1 -1
- package/src/plugins/withPlugins.ts +17 -0
- package/src/types/breakpoints.ts +5 -4
- package/src/types/core.ts +5 -10
- package/src/types/index.ts +12 -1
- package/src/types/plugin.ts +7 -0
- package/src/types/unistyles.ts +14 -4
- package/src/types/variants.ts +11 -0
- package/src/useStyles.ts +12 -6
- package/src/utils/breakpoints.ts +10 -75
- package/src/utils/index.ts +2 -5
- package/src/utils/mq.ts +1 -1
- package/src/utils/mqParser.ts +4 -4
- package/src/utils/styles.ts +35 -20
- package/src/utils/variants.ts +5 -9
- package/lib/commonjs/utils/common.js +0 -25
- package/lib/commonjs/utils/common.js.map +0 -1
- package/lib/commonjs/utils/normalizeStyles.js +0 -10
- package/lib/commonjs/utils/normalizeStyles.js.map +0 -1
- package/lib/commonjs/utils/normalizeStyles.web.js.map +0 -1
- package/lib/commonjs/utils/normalizer.js.map +0 -1
- package/lib/module/utils/common.js +0 -17
- package/lib/module/utils/common.js.map +0 -1
- package/lib/module/utils/normalizeStyles.js +0 -3
- package/lib/module/utils/normalizeStyles.js.map +0 -1
- package/lib/module/utils/normalizeStyles.web.js.map +0 -1
- package/lib/module/utils/normalizer.js.map +0 -1
- package/lib/typescript/src/utils/common.d.ts +0 -12
- package/lib/typescript/src/utils/common.d.ts.map +0 -1
- package/lib/typescript/src/utils/normalizeStyles.d.ts +0 -2
- package/lib/typescript/src/utils/normalizeStyles.d.ts.map +0 -1
- package/lib/typescript/src/utils/normalizeStyles.web.d.ts +0 -5
- package/lib/typescript/src/utils/normalizeStyles.web.d.ts.map +0 -1
- package/lib/typescript/src/utils/normalizer.d.ts.map +0 -1
- package/src/utils/common.ts +0 -20
- package/src/utils/normalizeStyles.ts +0 -2
- /package/lib/commonjs/{utils → plugins/normalizer}/module.d.js +0 -0
- /package/lib/commonjs/{utils → plugins/normalizer}/normalizer.js +0 -0
- /package/lib/module/{utils → plugins/normalizer}/module.d.js +0 -0
- /package/lib/module/{utils → plugins/normalizer}/normalizer.js +0 -0
- /package/src/{utils → plugins/normalizer}/module.d.ts +0 -0
package/src/utils/styles.ts
CHANGED
@@ -1,16 +1,18 @@
|
|
1
|
-
import type { CustomNamedStyles, ScreenSize, NestedStyle } from '../types'
|
2
|
-
import {
|
3
|
-
import { normalizeStyles } from './normalizeStyles'
|
1
|
+
import type { CustomNamedStyles, ScreenSize, NestedStyle, RNStyle } from '../types'
|
2
|
+
import { getValueForBreakpoint } from './breakpoints'
|
4
3
|
import type { UnistylesBreakpoints } from '../global'
|
5
|
-
import { isAndroid, isIOS
|
4
|
+
import { isAndroid, isIOS } from '../common'
|
5
|
+
import { getKeyForVariant } from './variants'
|
6
|
+
import { withPlugins } from '../plugins'
|
6
7
|
|
7
8
|
export const proxifyFunction = (
|
9
|
+
key: string,
|
8
10
|
fn: Function, breakpoint: keyof UnistylesBreakpoints & string,
|
9
11
|
screenSize: ScreenSize,
|
10
12
|
variant?: string
|
11
13
|
): Function => new Proxy(fn, {
|
12
14
|
apply: (target, thisArg, argumentsList) =>
|
13
|
-
parseStyle(target.apply(thisArg, argumentsList), breakpoint, screenSize, variant)
|
15
|
+
parseStyle(key, target.apply(thisArg, argumentsList), breakpoint, screenSize, variant)
|
14
16
|
})
|
15
17
|
|
16
18
|
export const isPlatformColor = <T extends {}>(value: T): boolean => {
|
@@ -21,16 +23,34 @@ export const isPlatformColor = <T extends {}>(value: T): boolean => {
|
|
21
23
|
return isAndroid && 'resource_paths' in value && typeof value.resource_paths === 'object'
|
22
24
|
}
|
23
25
|
|
24
|
-
export const parseStyle = <T>(
|
26
|
+
export const parseStyle = <T extends RNStyle>(
|
27
|
+
key: string,
|
25
28
|
style: CustomNamedStyles<T>,
|
26
29
|
breakpoint: keyof UnistylesBreakpoints & string,
|
27
30
|
screenSize: ScreenSize,
|
28
31
|
variant?: string
|
29
32
|
): T => {
|
30
|
-
const entries = Object
|
31
|
-
keyof T,
|
32
|
-
|
33
|
-
|
33
|
+
const entries = (Object
|
34
|
+
.entries(style || {}) as Array<[keyof T, CustomNamedStyles<T> | NestedStyle]>)
|
35
|
+
.map(([key, value]) => {
|
36
|
+
if (key !== 'variants') {
|
37
|
+
return [key, value]
|
38
|
+
}
|
39
|
+
|
40
|
+
const variantKey = getKeyForVariant(
|
41
|
+
value as NestedStyle,
|
42
|
+
variant
|
43
|
+
)
|
44
|
+
|
45
|
+
if (!variantKey) {
|
46
|
+
return undefined
|
47
|
+
}
|
48
|
+
|
49
|
+
return Object
|
50
|
+
.entries(value[variantKey as keyof typeof value] as NestedStyle)
|
51
|
+
.flat()
|
52
|
+
})
|
53
|
+
.filter(Boolean) as Array<[keyof T, CustomNamedStyles<T> | NestedStyle]>
|
34
54
|
|
35
55
|
const parsedStyles = Object
|
36
56
|
.fromEntries(entries
|
@@ -40,7 +60,7 @@ export const parseStyle = <T>(
|
|
40
60
|
if (hasNestedProperties) {
|
41
61
|
return [
|
42
62
|
key,
|
43
|
-
parseStyle(value as CustomNamedStyles<T>, breakpoint, screenSize, variant)
|
63
|
+
parseStyle(key, value as CustomNamedStyles<T>, breakpoint, screenSize, variant)
|
44
64
|
]
|
45
65
|
}
|
46
66
|
|
@@ -49,7 +69,7 @@ export const parseStyle = <T>(
|
|
49
69
|
if (isTransform && Array.isArray(value)) {
|
50
70
|
return [
|
51
71
|
key,
|
52
|
-
value.map(value => parseStyle(value, breakpoint, screenSize, variant))
|
72
|
+
value.map(value => parseStyle(key, value, breakpoint, screenSize, variant))
|
53
73
|
]
|
54
74
|
}
|
55
75
|
|
@@ -62,15 +82,10 @@ export const parseStyle = <T>(
|
|
62
82
|
|
63
83
|
return [
|
64
84
|
key,
|
65
|
-
|
66
|
-
value as NestedStyle,
|
67
|
-
variant
|
68
|
-
)
|
85
|
+
getValueForBreakpoint(value as NestedStyle)
|
69
86
|
]
|
70
87
|
})
|
71
|
-
)
|
88
|
+
) as T
|
72
89
|
|
73
|
-
return
|
74
|
-
? normalizeStyles(parsedStyles)
|
75
|
-
: parsedStyles
|
90
|
+
return withPlugins(key, parsedStyles) as T
|
76
91
|
}
|
package/src/utils/variants.ts
CHANGED
@@ -1,16 +1,12 @@
|
|
1
1
|
import type { Optional, NestedStyle } from '../types'
|
2
2
|
|
3
|
-
export const getKeyForVariant = (value: NestedStyle, variant?: string): Optional<
|
4
|
-
if (
|
5
|
-
return
|
3
|
+
export const getKeyForVariant = (value: NestedStyle, variant?: string): Optional<string> => {
|
4
|
+
if (variant && variant in value) {
|
5
|
+
return variant
|
6
6
|
}
|
7
7
|
|
8
|
-
if (
|
9
|
-
return
|
10
|
-
}
|
11
|
-
|
12
|
-
if ('default' in value.variants) {
|
13
|
-
return 'default' as keyof typeof value
|
8
|
+
if ('default' in value) {
|
9
|
+
return 'default'
|
14
10
|
}
|
15
11
|
|
16
12
|
return undefined
|
@@ -1,25 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.warn = exports.throwError = exports.isWeb = exports.isServer = exports.isMobile = exports.isIOS = exports.isAndroid = exports.Orientation = void 0;
|
7
|
-
var _reactNative = require("react-native");
|
8
|
-
const throwError = message => {
|
9
|
-
throw new Error(`🦄 [react-native-unistyles]: ${message}`);
|
10
|
-
};
|
11
|
-
exports.throwError = throwError;
|
12
|
-
const warn = message => {
|
13
|
-
console.warn(`🦄 [react-native-unistyles]: ${message}`);
|
14
|
-
};
|
15
|
-
exports.warn = warn;
|
16
|
-
const isMobile = exports.isMobile = _reactNative.Platform.OS === 'android' || _reactNative.Platform.OS === 'ios';
|
17
|
-
const isWeb = exports.isWeb = _reactNative.Platform.OS === 'web';
|
18
|
-
const isIOS = exports.isIOS = _reactNative.Platform.OS === 'ios';
|
19
|
-
const isAndroid = exports.isAndroid = _reactNative.Platform.OS === 'android';
|
20
|
-
const isServer = exports.isServer = typeof window === 'undefined';
|
21
|
-
const Orientation = exports.Orientation = {
|
22
|
-
Landscape: 'landscape',
|
23
|
-
Portrait: 'portrait'
|
24
|
-
};
|
25
|
-
//# sourceMappingURL=common.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["_reactNative","require","throwError","message","Error","exports","warn","console","isMobile","Platform","OS","isWeb","isIOS","isAndroid","isServer","window","Orientation","Landscape","Portrait"],"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,QAAQ,GAAAH,OAAA,CAAAG,QAAA,GAAGC,qBAAQ,CAACC,EAAE,KAAK,SAAS,IAAID,qBAAQ,CAACC,EAAE,KAAK,KAAK;AACnE,MAAMC,KAAK,GAAAN,OAAA,CAAAM,KAAA,GAAGF,qBAAQ,CAACC,EAAE,KAAK,KAAK;AACnC,MAAME,KAAK,GAAAP,OAAA,CAAAO,KAAA,GAAGH,qBAAQ,CAACC,EAAE,KAAK,KAAK;AACnC,MAAMG,SAAS,GAAAR,OAAA,CAAAQ,SAAA,GAAGJ,qBAAQ,CAACC,EAAE,KAAK,SAAS;AAC3C,MAAMI,QAAQ,GAAAT,OAAA,CAAAS,QAAA,GAAG,OAAOC,MAAM,KAAK,WAAW;AAE9C,MAAMC,WAAW,GAAAX,OAAA,CAAAW,WAAA,GAAG;EACvBC,SAAS,EAAE,WAAW;EACtBC,QAAQ,EAAE;AACd,CAAU"}
|
@@ -1,10 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.normalizeStyles = void 0;
|
7
|
-
// nothing to do here
|
8
|
-
const normalizeStyles = styles => styles;
|
9
|
-
exports.normalizeStyles = normalizeStyles;
|
10
|
-
//# sourceMappingURL=normalizeStyles.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["normalizeStyles","styles","exports"],"sourceRoot":"../../../src","sources":["utils/normalizeStyles.ts"],"mappings":";;;;;;AAAA;AACO,MAAMA,eAAe,GAAOC,MAAS,IAAKA,MAAW;AAAAC,OAAA,CAAAF,eAAA,GAAAA,eAAA"}
|
@@ -1 +0,0 @@
|
|
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,YAA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AAmB,CAAC,GAAG,CAAC,CAAC;EAEjD,OAAO;IACH,GAAGA,KAAK;IACR,GAAGsB,mBAAmB;IACtB,GAAGK,mBAAmB;IACtB,GAAGC;EACP,CAAC;AACL,CAAC;AAAAC,OAAA,CAAAR,eAAA,GAAAA,eAAA"}
|
@@ -1 +0,0 @@
|
|
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,MAA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AAA,GAAG;EACtCtB,qBAAqB;EACrBU,oBAAoB;EACpBK;AACJ,CAAC"}
|
@@ -1,17 +0,0 @@
|
|
1
|
-
import { Platform } from 'react-native';
|
2
|
-
export const throwError = message => {
|
3
|
-
throw new Error(`🦄 [react-native-unistyles]: ${message}`);
|
4
|
-
};
|
5
|
-
export const warn = message => {
|
6
|
-
console.warn(`🦄 [react-native-unistyles]: ${message}`);
|
7
|
-
};
|
8
|
-
export const isMobile = Platform.OS === 'android' || Platform.OS === 'ios';
|
9
|
-
export const isWeb = Platform.OS === 'web';
|
10
|
-
export const isIOS = Platform.OS === 'ios';
|
11
|
-
export const isAndroid = Platform.OS === 'android';
|
12
|
-
export const isServer = typeof window === 'undefined';
|
13
|
-
export const Orientation = {
|
14
|
-
Landscape: 'landscape',
|
15
|
-
Portrait: 'portrait'
|
16
|
-
};
|
17
|
-
//# sourceMappingURL=common.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["Platform","throwError","message","Error","warn","console","isMobile","OS","isWeb","isIOS","isAndroid","isServer","window","Orientation","Landscape","Portrait"],"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,QAAQ,GAAGN,QAAQ,CAACO,EAAE,KAAK,SAAS,IAAIP,QAAQ,CAACO,EAAE,KAAK,KAAK;AAC1E,OAAO,MAAMC,KAAK,GAAGR,QAAQ,CAACO,EAAE,KAAK,KAAK;AAC1C,OAAO,MAAME,KAAK,GAAGT,QAAQ,CAACO,EAAE,KAAK,KAAK;AAC1C,OAAO,MAAMG,SAAS,GAAGV,QAAQ,CAACO,EAAE,KAAK,SAAS;AAClD,OAAO,MAAMI,QAAQ,GAAG,OAAOC,MAAM,KAAK,WAAW;AAErD,OAAO,MAAMC,WAAW,GAAG;EACvBC,SAAS,EAAE,WAAW;EACtBC,QAAQ,EAAE;AACd,CAAU"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["normalizeStyles","styles"],"sourceRoot":"../../../src","sources":["utils/normalizeStyles.ts"],"mappings":"AAAA;AACA,OAAO,MAAMA,eAAe,GAAOC,MAAS,IAAKA,MAAW"}
|
@@ -1 +0,0 @@
|
|
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,o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A,KAAK,IAC3B,kBAAkB,IAAIA,KAAK,GAC3BY,mBAAmB,CAACZ,KAAmB,CAAC,GAAG,CAAC,CAAC;EAEjD,OAAO;IACH,GAAGA,KAAK;IACR,GAAGoB,mBAAmB;IACtB,GAAGK,mBAAmB;IACtB,GAAGC;EACP,CAAC;AACL,CAAC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["normalizeColors","normalizeColor","color","opacity","arguments","length","undefined","integer","hex","toString","padStart","r","g","b","a","split","map","x","parseInt","filter","num","isNaN","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":"AAAA;AACA;AACA,OAAOA,eAAe,MAAM,gCAAgC;AAS5D,OAAO,MAAMC,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,GAAGP,eAAe,CAACE,KAAK,CAAkB;;EAEvD;EACA,IAAIK,OAAO,KAAK,IAAI,EAAE;IAClB,OAAOL,KAAK;EAChB;EAEA,MAAMM,GAAG,GAAGD,OAAO,CAACE,QAAQ,CAAC,EAAE,CAAC,CAACC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC;EAEjD,IAAIF,GAAG,CAACH,MAAM,KAAK,CAAC,EAAE;IAClB,MAAM,CAACM,CAAC,GAAG,CAAC,EAAEC,CAAC,GAAG,CAAC,EAAEC,CAAC,GAAG,CAAC,EAAEC,CAAC,GAAG,CAAC,CAAC,GAAGN,GAAG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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,MAAMvC,KAAK,GAAGD,cAAc,CAACqC,WAAW,EAAYE,aAAuB,CAAC;EAE5E,OAAQ,GAAER,OAAQ,IAAGE,OAAQ,IAAGE,MAAO,IAAGlC,KAAM,EAAC;AACrD,CAAC;AAED,MAAMwC,oBAAoB,GAAIC,UAAsB,IAAKA,UAAU,CAC9D3B,GAAG,CAAC4B,SAAS,IAAI;EACd,MAAM,CAACnB,GAAG,CAAC,GAAGoB,MAAM,CAACC,IAAI,CAACF,SAAS,CAAC;EAEpC,IAAI,CAACnB,GAAG,EAAE;IACN,OAAOnB,SAAS;EACpB;EAEA,MAAMiB,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,CACDJ,MAAM,CAAC6B,OAAO,CAAC,CACfD,IAAI,CAAC,GAAG,CAAC;AAEd,OAAO,MAAME,YAA0B,GAAG;EACtCtB,qBAAqB;EACrBU,oBAAoB;EACpBK;AACJ,CAAC"}
|
@@ -1,12 +0,0 @@
|
|
1
|
-
export declare const throwError: (message: string) => never;
|
2
|
-
export declare const warn: (message: string) => void;
|
3
|
-
export declare const isMobile: boolean;
|
4
|
-
export declare const isWeb: boolean;
|
5
|
-
export declare const isIOS: boolean;
|
6
|
-
export declare const isAndroid: boolean;
|
7
|
-
export declare const isServer: boolean;
|
8
|
-
export declare const Orientation: {
|
9
|
-
readonly Landscape: "landscape";
|
10
|
-
readonly Portrait: "portrait";
|
11
|
-
};
|
12
|
-
//# sourceMappingURL=common.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../src/utils/common.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,YAAa,MAAM,UAEzC,CAAA;AAED,eAAO,MAAM,IAAI,YAAa,MAAM,SAEnC,CAAA;AAED,eAAO,MAAM,QAAQ,SAAqD,CAAA;AAC1E,eAAO,MAAM,KAAK,SAAwB,CAAA;AAC1C,eAAO,MAAM,KAAK,SAAwB,CAAA;AAC1C,eAAO,MAAM,SAAS,SAA4B,CAAA;AAClD,eAAO,MAAM,QAAQ,SAAgC,CAAA;AAErD,eAAO,MAAM,WAAW;;;CAGd,CAAA"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"normalizeStyles.d.ts","sourceRoot":"","sources":["../../../../src/utils/normalizeStyles.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,eAAe,qBAAgC,CAAA"}
|
@@ -1,5 +0,0 @@
|
|
1
|
-
import type { Transforms } from '../types';
|
2
|
-
export declare const normalizeStyles: <T extends Required<import("react-native").ShadowStyleIOS> | Required<Pick<import("react-native").TextStyle, "textShadowColor" | "textShadowOffset" | "textShadowRadius">> | {
|
3
|
-
transform: Transforms;
|
4
|
-
}>(style: T) => T;
|
5
|
-
//# sourceMappingURL=normalizeStyles.web.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"normalizeStyles.web.d.ts","sourceRoot":"","sources":["../../../../src/utils/normalizeStyles.web.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAoE,UAAU,EAAE,MAAM,UAAU,CAAA;AAuD5G,eAAO,MAAM,eAAe;;iBAwB3B,CAAA"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"normalizer.d.ts","sourceRoot":"","sources":["../../../../src/utils/normalizer.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAEjE,KAAK,YAAY,GAAG;IAChB,qBAAqB,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAAC;IACjD,oBAAoB,CAAC,KAAK,EAAE,QAAQ,CAAC,SAAS,CAAC,GAAG,MAAM,CAAC;IACzD,oBAAoB,CAAC,UAAU,EAAE,QAAQ,CAAC,UAAU,CAAC,GAAG,MAAM,CAAC;CAClE,CAAA;AAED,eAAO,MAAM,cAAc,UAAW,MAAM,YAAW,MAAM,WAyB5D,CAAA;AAED,eAAO,MAAM,qBAAqB,UAAW,MAAM,oBAAiC,CAAA;AAwDpF,eAAO,MAAM,YAAY,EAAE,YAI1B,CAAA"}
|
package/src/utils/common.ts
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
import { Platform } from 'react-native'
|
2
|
-
|
3
|
-
export const throwError = (message: string) => {
|
4
|
-
throw new Error(`🦄 [react-native-unistyles]: ${message}`)
|
5
|
-
}
|
6
|
-
|
7
|
-
export const warn = (message: string) => {
|
8
|
-
console.warn(`🦄 [react-native-unistyles]: ${message}`)
|
9
|
-
}
|
10
|
-
|
11
|
-
export const isMobile = Platform.OS === 'android' || Platform.OS === 'ios'
|
12
|
-
export const isWeb = Platform.OS === 'web'
|
13
|
-
export const isIOS = Platform.OS === 'ios'
|
14
|
-
export const isAndroid = Platform.OS === 'android'
|
15
|
-
export const isServer = typeof window === 'undefined'
|
16
|
-
|
17
|
-
export const Orientation = {
|
18
|
-
Landscape: 'landscape',
|
19
|
-
Portrait: 'portrait'
|
20
|
-
} as const
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|