react-native-unistyles 2.8.0-rc.2 → 2.8.0-rc.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -39,9 +39,9 @@
39
39
 
40
40
  - (void)makeShared:(void*)runtime {
41
41
  self.unistylesRuntime = runtime;
42
-
42
+
43
43
  auto unistylesRuntime = ((UnistylesRuntime*)self.unistylesRuntime);
44
-
44
+
45
45
  unistylesRuntime->setScreenDimensionsCallback([self](){
46
46
  return [self getScreenDimensions];
47
47
  });
@@ -49,15 +49,19 @@
49
49
  unistylesRuntime->setColorSchemeCallback([](){
50
50
  return getColorScheme();
51
51
  });
52
-
52
+
53
53
  unistylesRuntime->setContentSizeCategoryCallback([](){
54
54
  return getContentSizeCategory();
55
55
  });
56
-
56
+
57
57
  dispatch_async(dispatch_get_main_queue(), ^{
58
- unistylesRuntime->screen = [self getScreenDimensions];
58
+ Screen screen = [self getScreenDimensions];
59
+
60
+ unistylesRuntime->screen = Dimensions({screen.width, screen.height});
59
61
  unistylesRuntime->contentSizeCategory = getContentSizeCategory();
60
62
  unistylesRuntime->colorScheme = getColorScheme();
63
+ unistylesRuntime->pixelRatio = screen.pixelRatio;
64
+ unistylesRuntime->fontScale = screen.fontScale;
61
65
  });
62
66
  }
63
67
 
@@ -73,11 +77,14 @@
73
77
  }
74
78
  }
75
79
 
76
- - (Dimensions)getScreenDimensions {
80
+ - (Screen)getScreenDimensions {
77
81
  UIScreen *screen = [UIScreen mainScreen];
78
- Dimensions screenDimension = {(int)screen.bounds.size.width, (int)screen.bounds.size.height};
79
-
80
- return screenDimension;
82
+ int width = (int)screen.bounds.size.width;
83
+ int height = (int)screen.bounds.size.height;
84
+ float pixelRatio = screen.scale;
85
+ float fontScale = getFontScale();
86
+
87
+ return Screen({width, height, pixelRatio, fontScale});
81
88
  }
82
89
 
83
90
  @end
@@ -1 +1 @@
1
- {"version":3,"file":"UnistylesModule.native.d.ts","sourceRoot":"","sources":["../../../../src/core/UnistylesModule.native.ts"],"names":[],"mappings":"AAEA,KAAK,qBAAqB,GAAG;IACzB,OAAO,IAAI,OAAO,CAAA;CACrB,CAAA;AAED,eAAO,MAAM,eAAe,uBAAoD,CAAA"}
1
+ {"version":3,"file":"UnistylesModule.native.d.ts","sourceRoot":"","sources":["../../../../src/core/UnistylesModule.native.ts"],"names":[],"mappings":"AAEA,KAAK,qBAAqB,GAAG;IACzB,OAAO,IAAI,OAAO,CAAA;CACrB,CAAA;AAED,eAAO,MAAM,eAAe,EAA+B,qBAAqB,CAAA"}
@@ -1 +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"}
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,EAAkF,qBAAqB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"UnistylesRuntime.d.ts","sourceRoot":"","sources":["../../../../src/core/UnistylesRuntime.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AACvE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAChD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAG1D;;GAEG;AACH,qBAAa,gBAAgB;IACb,OAAO,CAAC,eAAe;IAAmB,OAAO,CAAC,iBAAiB;gBAA3D,eAAe,EAAE,eAAe,EAAU,iBAAiB,EAAE,gBAAgB;IAEjG;;;OAGG;IACH,IAAW,WAAW;;;;;;;;;;;;;;;;;;;MAkBrB;IAED;;;OAGG;IACH,IAAW,WAAW,uCAErB;IAED;;;OAGG;IACH,IAAW,iBAAiB,YAE3B;IAED;;;OAGG;IACH,IAAW,SAAS,UAEnB;IAED;;;OAGG;IACH,IAAW,mBAAmB,gGAE7B;IAED;;;OAGG;IACH,IAAW,UAAU,mDAEpB;IAED;;;OAGG;IACH,IAAW,WAAW,6CAErB;IAED;;;OAGG;IACH,IAAW,cAAc,aAExB;IAED;;;OAGG;IACH,IAAW,MAAM;;;MAKhB;IAED;;;OAGG;IACH,IAAW,MAAM,oCAEhB;IAED;;;OAGG;IACH,IAAW,SAAS;;;2BAIO,KAAK,UAAU,MAAM;4BAKpB,OAAO;MAElC;IAED;;;OAGG;IACH,IAAW,aAAa;;;2BAIG,KAAK,UAAU,MAAM;4BAKpB,OAAO;MAElC;IAED;;;OAGG;IACH,IAAW,WAAW,6BAQrB;IAED;;;OAGG;IACH,IAAW,UAAU,WAEpB;IAED;;;OAGG;IACH,IAAW,SAAS,eAInB;IAED;;;OAGG;IACI,gBAAgB,CAAC,SAAS,EAAE,OAAO;IAI1C;;;;OAIG;IACI,0BAA0B,WAAY,KAAK,UAAU,MAAM,UAIjE;IAED;;;;OAIG;IACI,QAAQ,SAAU,MAAM,eAAe,sBAY7C;IAED;;;;;OAKG;IACI,WAAW,SAAU,MAAM,eAAe,mBAAmB,eAAe,CAAC,MAAM,eAAe,CAAC,KAAK,eAAe,CAAC,MAAM,eAAe,CAAC,UAEpJ;IAED;;;OAGG;IACI,iBAAiB,WAAY,OAAO,UAE1C;IAED;;;OAGG;IACI,SAAS,WAAY,eAAe,UAE1C;IAED;;;OAGG;IACI,YAAY,WAAY,eAAe,UAE7C;CACJ"}
1
+ {"version":3,"file":"UnistylesRuntime.d.ts","sourceRoot":"","sources":["../../../../src/core/UnistylesRuntime.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AACvE,OAAO,KAAK,EAAE,eAAe,EAAE,MA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OAAO,UAE1C;IAED;;;OAGG;IACI,SAAS,WAAY,eAAe,UAE1C;IAED;;;OAGG;IACI,YAAY,WAAY,eAAe,UAE7C;CACJ"}
@@ -1 +1 @@
1
- {"version":3,"file":"createStyleSheet.d.ts","sourceRoot":"","sources":["../../../src/createStyleSheet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAA;AAExD;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,2DAAwE,CAAA"}
1
+ {"version":3,"file":"createStyleSheet.d.ts","sourceRoot":"","sources":["../../../src/createStyleSheet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAA;AAExD;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,GAAI,CAAC,SAAS,yBAAyB,cAAc,CAAC,KAAG,CAAe,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"useCSS.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useCSS.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAA;AAGrD,eAAO,MAAM,MAAM,mDA6ClB,CAAA"}
1
+ {"version":3,"file":"useCSS.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useCSS.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAA;AAGrD,eAAO,MAAM,MAAM,GAAI,CAAC,cAAc,qBAAqB,CAAC,CAAC,CAAC,SA6C7D,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"useCSS.native.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useCSS.native.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAA;AAErD,eAAO,MAAM,MAAM,gDAA+C,IAAU,CAAA"}
1
+ {"version":3,"file":"useCSS.native.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useCSS.native.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAA;AAErD,eAAO,MAAM,MAAM,GAAI,CAAC,eAAe,qBAAqB,CAAC,CAAC,CAAC,KAAG,IAAU,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"useVariants.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useVariants.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAExC,eAAO,MAAM,WAAW,iBAAkB,OAAO,MAAM,EAAE,SAAS,MAAM,CAAC,CAAC,+CAMzE,CAAA"}
1
+ {"version":3,"file":"useVariants.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useVariants.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAExC,eAAO,MAAM,WAAW,iBAAkB,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,+CAMzE,CAAA"}
@@ -23,10 +23,7 @@ declare const UnistylesRegistry: {
23
23
  };
24
24
  };
25
25
  addConfig: (config: import("./types").UnistylesConfig) => {
26
- addBreakpoints: (breakpoints: UnistylesBreakpoints) => {
27
- addThemes: any;
28
- addConfig: any;
29
- };
26
+ addBreakpoints: any;
30
27
  addThemes: any;
31
28
  };
32
29
  };
@@ -44,10 +41,7 @@ declare const UnistylesRegistry: {
44
41
  };
45
42
  addConfig: (config: import("./types").UnistylesConfig) => {
46
43
  addBreakpoints: any;
47
- addThemes: (themes: UnistylesThemes) => {
48
- addBreakpoints: any;
49
- addConfig: any;
50
- };
44
+ addThemes: any;
51
45
  };
52
46
  };
53
47
  /**
@@ -63,10 +57,7 @@ declare const UnistylesRegistry: {
63
57
  addConfig: any;
64
58
  };
65
59
  addThemes: (themes: UnistylesThemes) => {
66
- addBreakpoints: (breakpoints: UnistylesBreakpoints) => {
67
- addThemes: any;
68
- addConfig: any;
69
- };
60
+ addBreakpoints: any;
70
61
  addConfig: any;
71
62
  };
72
63
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAA;AAC5B,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AACzC,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AACpF,OAAO,KAAK,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AACrE,OAAO,EAAE,iBAAiB,EAAE,0BAA0B,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAA;AAChG,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAErD;;;GAGG;AACH,QAAA,MAAM,iBAAiB;IACnB;;;OAGG;;;;;;;;;;;;;;;;;IAEH;;;OAGG;;;;;;;;;;;;;;;;;IAEH;;;OAGG;;;;;;;;;;;;;;;;;CAEN,CAAA;AAED,QAAA,MAAM,gBAAgB,mCAAoB,CAAA;AAE1C,OAAO,EACH,EAAE,EACF,SAAS,EACT,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,0BAA0B,EAC1B,sBAAsB,EACtB,iBAAiB,EACjB,gBAAgB,EACnB,CAAA;AAED,YAAY,EACR,eAAe,EACf,oBAAoB,EACpB,eAAe,EACf,eAAe,EACf,mBAAmB,IAAI,iBAAiB,EAC3C,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAA;AAC5B,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AACzC,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AACpF,OAAO,KAAK,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AACrE,OAAO,EAAE,iBAAiB,EAAE,0BAA0B,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAA;AAChG,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAErD;;;GAGG;AACH,QAAA,MAAM,iBAAiB;IACnB;;;OAGG;;;;;;;;;;;;;;IAEH;;;OAGG;;;;;;;;;;;;;;IAEH;;;OAGG;;;;;;;;;;;;;;CAEN,CAAA;AAED,QAAA,MAAM,gBAAgB,mCAAoB,CAAA;AAE1C,OAAO,EACH,EAAE,EACF,SAAS,EACT,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,0BAA0B,EAC1B,sBAAsB,EACtB,iBAAiB,EACjB,gBAAgB,EACnB,CAAA;AAED,YAAY,EACR,eAAe,EACf,oBAAoB,EACpB,eAAe,EACf,eAAe,EACf,mBAAmB,IAAI,iBAAiB,EAC3C,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"normalizeStyle.d.ts","sourceRoot":"","sources":["../../../../src/normalizer/normalizeStyle.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAoE,OAAO,EAAE,MAAM,UAAU,CAAA;AAuDzG,eAAO,MAAM,cAAc,oCAwB1B,CAAA"}
1
+ {"version":3,"file":"normalizeStyle.d.ts","sourceRoot":"","sources":["../../../../src/normalizer/normalizeStyle.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAoE,OAAO,EAAE,MAAM,UAAU,CAAA;AAuDzG,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,OAAO,SAAS,CAAC,KAAG,CAwB5D,CAAA"}
@@ -1,11 +1,11 @@
1
- import type { MatrixTransform, PerpectiveTransform, RotateTransform, RotateXTransform, RotateYTransform, RotateZTransform, ScaleTransform, ScaleXTransform, ScaleYTransform, SkewXTransform, SkewYTransform, TranslateXTransform, TranslateYTransform } from 'react-native/Libraries/StyleSheet/StyleSheetTypes';
1
+ import type { MatrixTransform, PerspectiveTransform, RotateTransform, RotateXTransform, RotateYTransform, RotateZTransform, ScaleTransform, ScaleXTransform, ScaleYTransform, SkewXTransform, SkewYTransform, TranslateXTransform, TranslateYTransform } from 'react-native/Libraries/StyleSheet/StyleSheetTypes';
2
2
  import type { ImageStyle, TextStyle, ViewStyle } from 'react-native';
3
3
  import type { UnistylesBreakpoints, UnistylesThemes } from '../global';
4
4
  export type ShadowOffset = {
5
5
  width: number;
6
6
  height: number;
7
7
  };
8
- export type TransformStyles = PerpectiveTransform & RotateTransform & RotateXTransform & RotateYTransform & RotateZTransform & ScaleTransform & ScaleXTransform & ScaleYTransform & TranslateXTransform & TranslateYTransform & SkewXTransform & SkewYTransform & MatrixTransform;
8
+ export type TransformStyles = PerspectiveTransform & RotateTransform & RotateXTransform & RotateYTransform & RotateZTransform & ScaleTransform & ScaleXTransform & ScaleYTransform & TranslateXTransform & TranslateYTransform & SkewXTransform & SkewYTransform & MatrixTransform;
9
9
  export type ScreenSize = {
10
10
  width: number;
11
11
  height: number;
@@ -1 +1 @@
1
- {"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../../../src/types/core.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,eAAe,EACf,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,eAAe,EACf,cAAc,EACd,cAAc,EACd,mBAAmB,EACnB,mBAAmB,EACtB,MAAM,mDAAmD,CAAA;AAC1D,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACpE,OAAO,KAAK,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAEtE,MAAM,MAAM,YAAY,GAAG;IACvB,KAAK,EAAE,MAAM,CAA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AA;AAEtE,MAAM,MAAM,YAAY,GAAG;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,eAAe,GACrB,oBAAoB,GACpB,eAAe,GACf,gBAAgB,GAChB,gBAAgB,GAChB,gBAAgB,GAChB,cAAc,GACd,eAAe,GACf,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,cAAc,GACd,cAAc,GACd,eAAe,CAAA;AAErB,MAAM,MAAM,UAAU,GAAG;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,CAAA;AACxD,MAAM,MAAM,OAAO,GAAG,SAAS,CAAC,MAAM,SAAS,CAAC,GAAG,SAAS,CAAC,MAAM,SAAS,CAAC,GAAG,UAAU,CAAC,MAAM,UAAU,CAAC,CAAA;AAC5G,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,EAAE,OAAO,CAAC,CAAA;AAC9E,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC,CAAC,MAAM,oBAAoB,GAAG,MAAM,EAAE,OAAO,CAAC,CAAC,CAAA;AACpF,MAAM,MAAM,cAAc,GAAG,eAAe,CAAC,MAAM,eAAe,CAAC,CAAA"}
@@ -11,6 +11,6 @@ type ParsedStylesheet<ST extends StyleSheetWithSuperPowers> = {
11
11
  * @param variantsMap - The map of variants to be used
12
12
  * @returns - The theme, current breakpoint and RN compatible styles
13
13
  */
14
- export declare const useStyles: <ST extends StyleSheetWithSuperPowers>(stylesheet?: ST | undefined, variantsMap?: ExtractVariantNames<ST> | undefined) => ParsedStylesheet<ST>;
14
+ export declare const useStyles: <ST extends StyleSheetWithSuperPowers>(stylesheet?: ST, variantsMap?: ExtractVariantNames<typeof stylesheet>) => ParsedStylesheet<ST>;
15
15
  export {};
16
16
  //# sourceMappingURL=useStyles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useStyles.d.ts","sourceRoot":"","sources":["../../../src/useStyles.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AACpD,OAAO,KAAK,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAIpH,KAAK,gBAAgB,CAAC,EAAE,SAAS,yBAAyB,IAAI;IAC1D,KAAK,EAAE,cAAc,CAAC;IACtB,UAAU,EAAE,MAAM,oBAAoB,CAAC;IACvC,MAAM,EAAE,qBAAqB,CAAC,EAAE,CAAC,CAAA;CACpC,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,SAAS,gJAsCrB,CAAA"}
1
+ {"version":3,"file":"useStyles.d.ts","sourceRoot":"","sources":["../../../src/useStyles.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AACpD,OAAO,KAAK,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAIpH,KAAK,gBAAgB,CAAC,EAAE,SAAS,yBAAyB,IAAI;IAC1D,KAAK,EAAE,cAAc,CAAC;IACtB,UAAU,EAAE,MAAM,oBAAoB,CAAC;IACvC,MAAM,EAAE,qBAAqB,CAAC,EAAE,CAAC,CAAA;CACpC,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,SAAS,GAAI,EAAE,SAAS,yBAAyB,eAC7C,EAAE,gBACD,mBAAmB,CAAC,OAAO,UAAU,CAAC,KACrD,gBAAgB,CAAC,EAAE,CAmCrB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"breakpoints.d.ts","sourceRoot":"","sources":["../../../../src/utils/breakpoints.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAKjD,eAAO,MAAM,qBAAqB,UAAW,OAAO,MAAM,EAAE,OAAO,CAAC,KAAG,SAAS,OAAO,CAqCtF,CAAA"}
1
+ {"version":3,"file":"breakpoints.d.ts","sourceRoot":"","sources":["../../../../src/utils/breakpoints.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAKjD,eAAO,MAAM,qBAAqB,UAAW,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAG,QAAQ,CAAC,OAAO,CAqCtF,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"mqParser.d.ts","sourceRoot":"","sources":["../../../../src/utils/mqParser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAM7D,KAAK,iBAAiB,GAAG;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAA;CACb,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC5B,KAAK,CAAC,EAAE,iBAAiB,CAAC;IAC1B,MAAM,CAAC,EAAE,iBAAiB,CAAA;CAC7B,CAAA;AAED,eAAO,MAAM,OAAO,OAAQ,MAAM,KAAG,iBAcpC,CAAA;AAED,eAAO,MAAM,aAAa,OAAQ,MAAM,YAAgC,CAAA;AAExE,eAAO,MAAM,SAAS,aAAc,iBAAiB,YAgBpD,CAAA;AAED,eAAO,MAAM,yBAAyB,aAAc,iBAAiB,cAAc,UAAU,KAAG,OAgB/F,CAAA;AAcD,eAAO,MAAM,4BAA4B,iBAAkB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,cAAc,UAAU,KAAG,SAAS,MAAM,CAgB5H,CAAA"}
1
+ {"version":3,"file":"mqParser.d.ts","sourceRoot":"","sources":["../../../../src/utils/mqParser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAM7D,KAAK,iBAAiB,GAAG;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAA;CACb,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC5B,KAAK,CAAC,EAAE,iBAAiB,CAAC;IAC1B,MAAM,CAAC,EAAE,iBAAiB,CAAA;CAC7B,CAAA;AAED,eAAO,MAAM,OAAO,OAAQ,MAAM,KAAG,iBAcpC,CAAA;AAED,eAAO,MAAM,aAAa,OAAQ,MAAM,YAAgC,CAAA;AAExE,eAAO,MAAM,SAAS,aAAc,iBAAiB,YAgBpD,CAAA;AAED,eAAO,MAAM,yBAAyB,aAAc,iBAAiB,cAAc,UAAU,KAAG,OAgB/F,CAAA;AAcD,eAAO,MAAM,4BAA4B,iBAAkB,KAAK,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,cAAc,UAAU,KAAG,QAAQ,CAAC,MAAM,CAgB5H,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/utils/styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAW,MAAM,UAAU,CAAA;AAK1D,eAAO,MAAM,eAAe,QACnB,MAAM,MACP,QAAQ,YACF,OAAO,MAAM,EAAE,SAAS,MAAM,CAAC,CAAC,KAC3C,QAED,CAAA;AAEF,eAAO,MAAM,eAAe,8BAA6B,OAMxD,CAAA;AAED,eAAO,MAAM,UAAU,0CAEV,OAAO,MAAM,EAAE,SAAS,MAAM,CAAC,CAAC,mCAyD9B,CAAA"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/utils/styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAW,MAAM,UAAU,CAAA;AAK1D,eAAO,MAAM,eAAe,QACnB,MAAM,MACP,QAAQ,YACF,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,KAC3C,QAED,CAAA;AAEF,eAAO,MAAM,eAAe,GAAI,CAAC,SAAS,EAAE,SAAS,CAAC,KAAG,OAMxD,CAAA;AAED,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,OAAO,SACjC,CAAC,YACC,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,kCAE1C,CAuDY,CAAA"}
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "react-native-unistyles",
3
- "version": "2.8.0-rc.2",
3
+ "version": "2.8.0-rc.3",
4
4
  "description": "Level up your React Native StyleSheet",
5
5
  "scripts": {
6
6
  "test": "jest",
7
7
  "test:coverage": "jest --coverage",
8
8
  "tsc": "node_modules/typescript/bin/tsc --noEmit",
9
9
  "lint": "eslint . --ext .ts,.tsx",
10
- "prepare": "husky install && bob build",
10
+ "prepare": "husky && bob build",
11
11
  "precommit": "concurrently 'yarn tsc' 'yarn lint' 'yarn test'",
12
12
  "release": "release-it"
13
13
  },
@@ -58,40 +58,40 @@
58
58
  "registry": "https://registry.npmjs.org/"
59
59
  },
60
60
  "devDependencies": {
61
- "@commitlint/config-conventional": "18.4.3",
62
- "@react-native/eslint-config": "0.74.0",
63
- "@react-native/normalize-colors": "0.74.1",
61
+ "@commitlint/config-conventional": "19.2.2",
62
+ "@react-native/eslint-config": "0.74.84",
63
+ "@react-native/normalize-colors": "0.74.84",
64
64
  "@release-it/conventional-changelog": "8.0.1",
65
65
  "@testing-library/react-hooks": "8.0.1",
66
- "@types/jest": "29.5.11",
67
- "@types/react": "18.2.71",
68
- "@typescript-eslint/eslint-plugin": "6.16.0",
69
- "@typescript-eslint/eslint-plugin-tslint": "6.16.0",
70
- "@typescript-eslint/parser": "6.16.0",
71
- "commitlint": "18.4.3",
66
+ "@types/jest": "29.5.12",
67
+ "@types/react": "18.3.3",
68
+ "@typescript-eslint/eslint-plugin": "6.21.0",
69
+ "@typescript-eslint/eslint-plugin-tslint": "6.21.0",
70
+ "@typescript-eslint/parser": "6.21.0",
71
+ "commitlint": "19.3.0",
72
72
  "concurrently": "8.2.2",
73
- "eslint": "8.56.0",
73
+ "eslint": "8.57.0",
74
74
  "eslint-config-codemask": "1.1.7",
75
- "eslint-plugin-functional": "6.0.0",
75
+ "eslint-plugin-functional": "6.6.0",
76
76
  "eslint-plugin-import": "2.29.1",
77
77
  "eslint-plugin-jsdoc": "46.10.1",
78
- "eslint-plugin-jsx-a11y": "6.8.0",
78
+ "eslint-plugin-jsx-a11y": "6.9.0",
79
79
  "eslint-plugin-nested-if": "1.0.0",
80
80
  "eslint-plugin-no-else": "0.2.2",
81
- "eslint-plugin-no-loops": "0.3.0",
81
+ "eslint-plugin-no-loops": "0.4.0",
82
82
  "eslint-plugin-prefer-arrow": "1.2.3",
83
- "eslint-plugin-react": "7.33.2",
84
- "eslint-plugin-react-hooks": "4.6.0",
85
- "husky": "8.0.3",
83
+ "eslint-plugin-react": "7.34.3",
84
+ "eslint-plugin-react-hooks": "4.6.2",
85
+ "husky": "9.0.11",
86
86
  "jest": "29.7.0",
87
87
  "metro-react-native-babel-preset": "0.77.0",
88
- "react": "18.2.0",
89
- "react-native": "0.72.7",
88
+ "react": "18.3.1",
89
+ "react-native": "0.74.2",
90
90
  "react-native-builder-bob": "0.23.2",
91
- "react-native-web": "0.19.9",
92
- "react-test-renderer": "18.2.0",
93
- "release-it": "17.0.1",
94
- "typescript": "5.3.3"
91
+ "react-native-web": "0.19.12",
92
+ "react-test-renderer": "18.3.1",
93
+ "release-it": "17.4.0",
94
+ "typescript": "5.5.2"
95
95
  },
96
96
  "peerDependencies": {
97
97
  "@react-native/normalize-colors": "*",
package/src/types/core.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type {
2
2
  MatrixTransform,
3
- PerpectiveTransform,
3
+ PerspectiveTransform,
4
4
  RotateTransform,
5
5
  RotateXTransform,
6
6
  RotateYTransform,
@@ -22,7 +22,7 @@ export type ShadowOffset = {
22
22
  }
23
23
 
24
24
  export type TransformStyles =
25
- & PerpectiveTransform
25
+ & PerspectiveTransform
26
26
  & RotateTransform
27
27
  & RotateXTransform
28
28
  & RotateYTransform