react-native-unistyles 2.0.0-alpha.13 → 2.0.0-alpha.15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (122) hide show
  1. package/cxx/UnistylesRuntime.h +6 -6
  2. package/lib/commonjs/common.js +15 -15
  3. package/lib/commonjs/common.js.map +1 -1
  4. package/lib/commonjs/core/UnistyleRegistry.js +3 -2
  5. package/lib/commonjs/core/UnistyleRegistry.js.map +1 -1
  6. package/lib/commonjs/core/UnistylesRuntime.js +1 -1
  7. package/lib/commonjs/core/UnistylesRuntime.js.map +1 -1
  8. package/lib/commonjs/createStyleSheet.js +1 -6
  9. package/lib/commonjs/createStyleSheet.js.map +1 -1
  10. package/lib/commonjs/hooks/index.js +7 -0
  11. package/lib/commonjs/hooks/index.js.map +1 -1
  12. package/lib/commonjs/hooks/useUnistyles.js +4 -7
  13. package/lib/commonjs/hooks/useUnistyles.js.map +1 -1
  14. package/lib/commonjs/hooks/useVariants.js +24 -0
  15. package/lib/commonjs/hooks/useVariants.js.map +1 -0
  16. package/lib/commonjs/plugins/normalizer/normalizer.js +1 -1
  17. package/lib/commonjs/plugins/normalizer/normalizer.js.map +1 -1
  18. package/lib/commonjs/plugins/withPlugins.js +2 -6
  19. package/lib/commonjs/plugins/withPlugins.js.map +1 -1
  20. package/lib/commonjs/types/stylesheet.js +6 -0
  21. package/lib/commonjs/types/stylesheet.js.map +1 -0
  22. package/lib/commonjs/useStyles.js +8 -11
  23. package/lib/commonjs/useStyles.js.map +1 -1
  24. package/lib/commonjs/utils/index.js +22 -5
  25. package/lib/commonjs/utils/index.js.map +1 -1
  26. package/lib/commonjs/utils/mq.js +42 -28
  27. package/lib/commonjs/utils/mq.js.map +1 -1
  28. package/lib/commonjs/utils/styles.js +19 -23
  29. package/lib/commonjs/utils/styles.js.map +1 -1
  30. package/lib/commonjs/utils/variants.js +43 -8
  31. package/lib/commonjs/utils/variants.js.map +1 -1
  32. package/lib/module/common.js +14 -14
  33. package/lib/module/common.js.map +1 -1
  34. package/lib/module/core/UnistyleRegistry.js +4 -3
  35. package/lib/module/core/UnistyleRegistry.js.map +1 -1
  36. package/lib/module/core/UnistylesRuntime.js +1 -1
  37. package/lib/module/core/UnistylesRuntime.js.map +1 -1
  38. package/lib/module/createStyleSheet.js +1 -6
  39. package/lib/module/createStyleSheet.js.map +1 -1
  40. package/lib/module/hooks/index.js +1 -0
  41. package/lib/module/hooks/index.js.map +1 -1
  42. package/lib/module/hooks/useUnistyles.js +5 -8
  43. package/lib/module/hooks/useUnistyles.js.map +1 -1
  44. package/lib/module/hooks/useVariants.js +17 -0
  45. package/lib/module/hooks/useVariants.js.map +1 -0
  46. package/lib/module/plugins/normalizer/normalizer.js +1 -1
  47. package/lib/module/plugins/normalizer/normalizer.js.map +1 -1
  48. package/lib/module/plugins/withPlugins.js +2 -6
  49. package/lib/module/plugins/withPlugins.js.map +1 -1
  50. package/lib/module/types/stylesheet.js +2 -0
  51. package/lib/module/types/stylesheet.js.map +1 -0
  52. package/lib/module/useStyles.js +9 -12
  53. package/lib/module/useStyles.js.map +1 -1
  54. package/lib/module/utils/index.js +1 -2
  55. package/lib/module/utils/index.js.map +1 -1
  56. package/lib/module/utils/mq.js +41 -27
  57. package/lib/module/utils/mq.js.map +1 -1
  58. package/lib/module/utils/styles.js +20 -24
  59. package/lib/module/utils/styles.js.map +1 -1
  60. package/lib/module/utils/variants.js +41 -6
  61. package/lib/module/utils/variants.js.map +1 -1
  62. package/lib/typescript/src/common.d.ts +10 -10
  63. package/lib/typescript/src/common.d.ts.map +1 -1
  64. package/lib/typescript/src/core/UnistyleRegistry.d.ts.map +1 -1
  65. package/lib/typescript/src/createStyleSheet.d.ts +2 -2
  66. package/lib/typescript/src/createStyleSheet.d.ts.map +1 -1
  67. package/lib/typescript/src/global.d.ts.map +1 -1
  68. package/lib/typescript/src/hooks/index.d.ts +1 -0
  69. package/lib/typescript/src/hooks/index.d.ts.map +1 -1
  70. package/lib/typescript/src/hooks/useUnistyles.d.ts.map +1 -1
  71. package/lib/typescript/src/hooks/useVariants.d.ts +3 -0
  72. package/lib/typescript/src/hooks/useVariants.d.ts.map +1 -0
  73. package/lib/typescript/src/plugins/normalizer/normalizer.d.ts.map +1 -1
  74. package/lib/typescript/src/plugins/withPlugins.d.ts +3 -2
  75. package/lib/typescript/src/plugins/withPlugins.d.ts.map +1 -1
  76. package/lib/typescript/src/types/breakpoints.d.ts +20 -14
  77. package/lib/typescript/src/types/breakpoints.d.ts.map +1 -1
  78. package/lib/typescript/src/types/core.d.ts +3 -26
  79. package/lib/typescript/src/types/core.d.ts.map +1 -1
  80. package/lib/typescript/src/types/index.d.ts +2 -1
  81. package/lib/typescript/src/types/index.d.ts.map +1 -1
  82. package/lib/typescript/src/types/mq.d.ts +2 -2
  83. package/lib/typescript/src/types/mq.d.ts.map +1 -1
  84. package/lib/typescript/src/types/stylesheet.d.ts +47 -0
  85. package/lib/typescript/src/types/stylesheet.d.ts.map +1 -0
  86. package/lib/typescript/src/types/unistyles.d.ts +5 -6
  87. package/lib/typescript/src/types/unistyles.d.ts.map +1 -1
  88. package/lib/typescript/src/types/variants.d.ts +13 -7
  89. package/lib/typescript/src/types/variants.d.ts.map +1 -1
  90. package/lib/typescript/src/useStyles.d.ts +3 -3
  91. package/lib/typescript/src/useStyles.d.ts.map +1 -1
  92. package/lib/typescript/src/utils/index.d.ts +1 -2
  93. package/lib/typescript/src/utils/index.d.ts.map +1 -1
  94. package/lib/typescript/src/utils/mq.d.ts +19 -13
  95. package/lib/typescript/src/utils/mq.d.ts.map +1 -1
  96. package/lib/typescript/src/utils/styles.d.ts +4 -4
  97. package/lib/typescript/src/utils/styles.d.ts.map +1 -1
  98. package/lib/typescript/src/utils/variants.d.ts +2 -2
  99. package/lib/typescript/src/utils/variants.d.ts.map +1 -1
  100. package/package.json +14 -14
  101. package/src/common.ts +10 -10
  102. package/src/core/UnistyleRegistry.ts +6 -3
  103. package/src/core/UnistylesRuntime.ts +1 -1
  104. package/src/createStyleSheet.ts +2 -8
  105. package/src/global.ts +1 -0
  106. package/src/hooks/index.ts +1 -0
  107. package/src/hooks/useUnistyles.ts +5 -8
  108. package/src/hooks/useVariants.ts +23 -0
  109. package/src/plugins/normalizer/normalizer.ts +3 -3
  110. package/src/plugins/withPlugins.ts +13 -15
  111. package/src/types/breakpoints.ts +47 -26
  112. package/src/types/core.ts +6 -42
  113. package/src/types/index.ts +1 -1
  114. package/src/types/mq.ts +2 -2
  115. package/src/types/stylesheet.ts +56 -0
  116. package/src/types/unistyles.ts +5 -6
  117. package/src/types/variants.ts +17 -9
  118. package/src/useStyles.ts +22 -16
  119. package/src/utils/index.ts +1 -2
  120. package/src/utils/mq.ts +56 -41
  121. package/src/utils/styles.ts +28 -45
  122. package/src/utils/variants.ts +55 -7
@@ -1,11 +1,15 @@
1
1
  import { unistyles } from '../core';
2
2
  export const MQSymbol = Symbol('unistyles-mq');
3
+ export const MQWidth = Symbol('unistyles-mq-width');
4
+ export const MQHeight = Symbol('unistyles-mq-height');
5
+ export const MQWidthAndHeight = Symbol('unistyles-mq-width-and-height');
6
+ export const MQHeightAndWidth = Symbol('unistyles-mq-height-and-width');
3
7
  var MQProp = /*#__PURE__*/function (MQProp) {
4
8
  MQProp["toString"] = "toString";
5
9
  MQProp["width"] = "width";
6
10
  MQProp["height"] = "height";
7
- MQProp["shortW"] = "w";
8
- MQProp["shortH"] = "h";
11
+ MQProp["only"] = "only";
12
+ MQProp["and"] = "and";
9
13
  return MQProp;
10
14
  }(MQProp || {});
11
15
  const getMQValue = value => {
@@ -25,18 +29,20 @@ const widthHandler = function () {
25
29
  if (prop === Symbol.toPrimitive || prop === MQProp.toString) {
26
30
  return () => `:h[${getMQValue(hMin)}, ${getMQValue(hMax)}]`;
27
31
  }
28
- if (prop === MQProp.width || prop === MQProp.shortW) {
29
- return function () {
30
- let wMin = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
31
- let wMax = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Infinity;
32
- return new Proxy({}, {
33
- get: (target, prop, receiver) => {
34
- if (prop === Symbol.toPrimitive || prop === MQProp.toString) {
35
- return () => `:w[${getMQValue(wMin)}, ${getMQValue(wMax)}]:h[${getMQValue(hMin)}, ${getMQValue(hMax)}]`;
32
+ if (prop === MQProp.and) {
33
+ return {
34
+ width: function () {
35
+ let wMin = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
36
+ let wMax = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Infinity;
37
+ return new Proxy({}, {
38
+ get: (target, prop, receiver) => {
39
+ if (prop === Symbol.toPrimitive || prop === MQProp.toString) {
40
+ return () => `:w[${getMQValue(wMin)}, ${getMQValue(wMax)}]:h[${getMQValue(hMin)}, ${getMQValue(hMax)}]`;
41
+ }
42
+ return Reflect.get(target, prop, receiver);
36
43
  }
37
- return Reflect.get(target, prop, receiver);
38
- }
39
- });
44
+ });
45
+ }
40
46
  };
41
47
  }
42
48
  return Reflect.get(target, prop, receiver);
@@ -51,18 +57,20 @@ const heightHandler = function () {
51
57
  if (prop === Symbol.toPrimitive || prop === MQProp.toString) {
52
58
  return () => `:w[${getMQValue(wMin)}, ${getMQValue(wMax)}]`;
53
59
  }
54
- if (prop === MQProp.height || prop === MQProp.shortH) {
55
- return function () {
56
- let hMin = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
57
- let hMax = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Infinity;
58
- return new Proxy({}, {
59
- get: (target, prop, receiver) => {
60
- if (prop === Symbol.toPrimitive || prop === MQProp.toString) {
61
- return () => `:w[${getMQValue(wMin)}, ${getMQValue(wMax)}]:h[${getMQValue(hMin)}, ${getMQValue(hMax)}]`;
60
+ if (prop === MQProp.and) {
61
+ return {
62
+ height: function () {
63
+ let hMin = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
64
+ let hMax = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Infinity;
65
+ return new Proxy({}, {
66
+ get: (target, prop, receiver) => {
67
+ if (prop === Symbol.toPrimitive || prop === MQProp.toString) {
68
+ return () => `:w[${getMQValue(wMin)}, ${getMQValue(wMax)}]:h[${getMQValue(hMin)}, ${getMQValue(hMax)}]`;
69
+ }
70
+ return Reflect.get(target, prop, receiver);
62
71
  }
63
- return Reflect.get(target, prop, receiver);
64
- }
65
- });
72
+ });
73
+ }
66
74
  };
67
75
  }
68
76
  return Reflect.get(target, prop, receiver);
@@ -71,12 +79,18 @@ const heightHandler = function () {
71
79
  };
72
80
  export const mq = new Proxy({}, {
73
81
  get: (target, prop, receiver) => {
74
- if (prop === MQProp.shortW || prop === MQProp.width) {
75
- return heightHandler;
82
+ if (prop === MQProp.only) {
83
+ return {
84
+ width: heightHandler,
85
+ height: widthHandler
86
+ };
76
87
  }
77
- if (prop === MQProp.shortH || prop === MQProp.height) {
88
+ if (prop === MQProp.height) {
78
89
  return widthHandler;
79
90
  }
91
+ if (prop === MQProp.width) {
92
+ return heightHandler;
93
+ }
80
94
  return Reflect.get(target, prop, receiver);
81
95
  }
82
96
  });
@@ -1 +1 @@
1
- {"version":3,"names":["unistyles","MQSymbol","Symbol","MQProp","getMQValue","value","registry","breakpoints","widthHandler","hMin","arguments","length","undefined","hMax","Infinity","Proxy","get","target","prop","receiver","toPrimitive","toString","width","shortW","wMin","wMax","Reflect","heightHandler","height","shortH","mq"],"sourceRoot":"../../../src","sources":["utils/mq.ts"],"mappings":"AAEA,SAASA,SAAS,QAAQ,SAAS;AAEnC,OAAO,MAAMC,QAAQ,GAAGC,MAAM,CAAC,cAAc,CAAC;AAAA,IAyBzCC,MAAM,0BAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAAA,OAANA,MAAM;AAAA,EAANA,MAAM;AAQX,MAAMC,UAAU,GAAIC,KAAwB,IAAK;EAC7C,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE;IAC3B,OAAOA,KAAK;EAChB;EAEA,IAAIA,KAAK,KAAK,IAAI,EAAE;IACh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A,CAACC,MAAM,EAAEC,IAAI,EAAEC,QAAQ,KAAK;cAC7B,IAAID,IAAI,KAAKhB,MAAM,CAACkB,WAAW,IAAIF,IAAI,KAAKf,MAAM,CAACkB,QAAQ,EAAE;gBACzD,OAAO,MAAO,MAAKjB,UAAU,CAACoB,IAAI,CAAE,KAAIpB,UAAU,CAACqB,IAAI,CAAE,OAAMrB,UAAU,CAACK,IAAI,CAAE,KAAIL,UAAU,CAACS,IAAI,CAAE,GAAE;cAC3G;cAEA,OAAOa,OAAO,CAACV,GAAG,CAACC,MAAM,EAAEC,IAAI,EAAEC,QAAQ,CAAC;YAC9C;UACJ,CAAC,CAAC;QAAA;MACN;MAEA,OAAOO,OAAO,CAACV,GAAG,CAACC,MAAM,EAAEC,IAAI,EAAEC,QAAQ,CAAC;IAC9C;EACJ,CAAC,CAAC;AAAA;AAEF,OAAO,MAAMW,EAAE,GAAG,IAAIf,KAAK,CAAC,CAAC,CAAC,EAAe;EACzCC,GAAG,EAAEA,CAACC,MAAM,EAAEC,IAAI,EAAEC,QAAQ,KAAK;IAC7B,IAAID,IAAI,KAAKf,MAAM,CAACoB,MAAM,IAAIL,IAAI,KAAKf,MAAM,CAACmB,KAAK,EAAE;MACjD,OAAOK,aAAa;IACxB;IAEA,IAAIT,IAAI,KAAKf,MAAM,CAAC0B,MAAM,IAAIX,IAAI,KAAKf,MAAM,CAACyB,MAAM,EAAE;MAClD,OAAOpB,YAAY;IACvB;IAEA,OAAOkB,OAAO,CAACV,GAAG,CAACC,MAAM,EAAEC,IAAI,EAAEC,QAAQ,CAAC;EAC9C;AACJ,CAAC,CAAC"}
1
+ {"version":3,"names":["unistyles","MQSymbol","Symbol","MQWidth","MQHeight","MQWidthAndHeight","MQHeightAndWidth","MQProp","getMQValue","value","registry","breakpoints","widthHandler","hMin","arguments","length","undefined","hMax","Infinity","Proxy","get","target","prop","receiver","toPrimitive","toString","and","width","wMin","wMax","Reflect","heightHandler","height","mq","only"],"sourceRoot":"../../../src","sources":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Ae;EACpDC,GAAG,EAAEA,CAACC,MAAM,EAAEC,IAAI,EAAEC,QAAQ,KAAK;IAC7B,IAAID,IAAI,KAAKf,MAAM,CAAC2B,IAAI,EAAE;MACtB,OAAO;QACHP,KAAK,EAAEI,aAAa;QACpBC,MAAM,EAAEpB;MACZ,CAAC;IACL;IAEA,IAAIU,IAAI,KAAKf,MAAM,CAACyB,MAAM,EAAE;MACxB,OAAOpB,YAAY;IACvB;IAEA,IAAIU,IAAI,KAAKf,MAAM,CAACoB,KAAK,EAAE;MACvB,OAAOI,aAAa;IACxB;IAEA,OAAOD,OAAO,CAACV,GAAG,CAACC,MAAM,EAAEC,IAAI,EAAEC,QAAQ,CAAC;EAC9C;AACJ,CAAC,CAAC"}
@@ -1,9 +1,9 @@
1
1
  import { getValueForBreakpoint } from './breakpoints';
2
2
  import { isAndroid, isIOS } from '../common';
3
- import { getKeyForVariant } from './variants';
3
+ import { getStyleWithVariants } from './variants';
4
4
  import { withPlugins } from '../plugins';
5
- export const proxifyFunction = (key, fn, breakpoint, screenSize, variant) => new Proxy(fn, {
6
- apply: (target, thisArg, argumentsList) => parseStyle(key, target.apply(thisArg, argumentsList), breakpoint, screenSize, variant)
5
+ export const proxifyFunction = (key, fn, plugins, runtime, variant) => new Proxy(fn, {
6
+ apply: (target, thisArg, argumentsList) => parseStyle(key, target.apply(thisArg, argumentsList), plugins, runtime, variant)
7
7
  });
8
8
  export const isPlatformColor = value => {
9
9
  if (isIOS) {
@@ -11,35 +11,31 @@ export const isPlatformColor = value => {
11
11
  }
12
12
  return isAndroid && 'resource_paths' in value && typeof value.resource_paths === 'object';
13
13
  };
14
- export const parseStyle = (key, style, breakpoint, screenSize, variant) => {
15
- const entries = Object.entries(style || {}).map(_ref => {
14
+ export const parseStyle = (key, style, plugins, runtime, variant) => {
15
+ const entries = Object.entries(getStyleWithVariants(style || {}, variant));
16
+ const parsedStyles = Object.fromEntries(entries.map(_ref => {
16
17
  let [key, value] = _ref;
17
- if (key !== 'variants') {
18
+ // dynamic functions
19
+ if (typeof value === 'function') {
18
20
  return [key, value];
19
21
  }
20
- const variantKey = getKeyForVariant(value, variant);
21
- if (!variantKey) {
22
- return undefined;
22
+
23
+ // nested objects
24
+ if (key === 'shadowOffset' || key === 'textShadowOffset') {
25
+ return [key, parseStyle(key, value, plugins, runtime, variant)];
23
26
  }
24
- return Object.entries(value[variantKey]).flat();
25
- }).filter(Boolean);
26
- const parsedStyles = Object.fromEntries(entries.map(_ref2 => {
27
- let [key, value] = _ref2;
28
- const hasNestedProperties = key === 'shadowOffset' || key === 'textShadowOffset';
29
- if (hasNestedProperties) {
30
- return [key, parseStyle(key, value, breakpoint, screenSize, variant)];
27
+
28
+ // transforms
29
+ if (key === 'transform' && Array.isArray(value)) {
30
+ return [key, value.map(value => parseStyle(key, value, plugins, runtime, variant))];
31
31
  }
32
- const isTransform = key === 'transform';
33
- if (isTransform && Array.isArray(value)) {
34
- return [key, value.map(value => parseStyle(key, value, breakpoint, screenSize, variant))];
35
- }
36
- const isDynamicFunction = typeof value === 'function';
37
- const isValidStyle = typeof value !== 'object' || isPlatformColor(value);
38
- if (isDynamicFunction || isValidStyle) {
32
+
33
+ // values or platform colors
34
+ if (typeof value !== 'object' || isPlatformColor(value)) {
39
35
  return [key, value];
40
36
  }
41
37
  return [key, getValueForBreakpoint(value)];
42
38
  }));
43
- return withPlugins(key, parsedStyles);
39
+ return withPlugins(key, parsedStyles, plugins, runtime);
44
40
  };
45
41
  //# sourceMappingURL=styles.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["getValueForBreakpoint","isAndroid","isIOS","getKeyForVariant","withPlugins","proxifyFunction","key","fn","breakpoint","screenSize","variant","Proxy","apply","target","thisArg","argumentsList","parseStyle","isPlatformColor","value","semantic","resource_paths","style","entries","Object","map","_ref","variantKey","undefined","flat","filter","Boolean","parsedStyles","fromEntries","_ref2","hasNestedProperties","isTransform","Array","isArray","isDynamicFunction","isValidStyle"],"sourceRoot":"../../../src","sources":["utils/styles.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getValueForBreakpoint","isAndroid","isIOS","getStyleWithVariants","withPlugins","proxifyFunction","key","fn","plugins","runtime","variant","Proxy","apply","target","thisArg","argumentsList","parseStyle","isPlatformColor","value","semantic","resource_paths","style","entries","Object","parsedStyles","fromEntries","map","_ref","Array","isArray"],"sourceRoot":"../../../src","sources":["utils/styles.ts"],"mappings":"AACA,SAASA,qBAAqB,QAAQ,eAAe;AAErD,SAASC,SAAS,EAAEC,KAAK,QAAQ,WAAW;AAC5C,SAASC,oBAAoB,QAAQ,YAAY;AACjD,SAASC,WAAW,QAAQ,YAAY;AAExC,OAAO,MAAMC,eAAe,GAAGA,CAC3BC,GAAW,EACXC,EAAY,EACZC,OAA+B,EAC/BC,OAAyB,EACzBC,OAA0C,KAC/B,IAAIC,KAAK,CAACJ,EAAE,EAAE;EACzBK,KAAK,EAAEA,CAACC,MAAM,EAAEC,OAAO,EAAEC,aAAa,KAClCC,UAAU,CAACV,GAAG,EAAEO,MAAM,CAACD,KAAK,CAACE,OAAO,EAAEC,aAAa,CAAC,EAAEP,OAAO,EAAEC,OAAO,EAAEC,OAAO;AACvF,CAAC,CAAC;AAEF,OAAO,MAAMO,eAAe,GAAkBC,KAAQ,IAAc;EAChE,IAAIhB,KAAK,EAAE;IACP,OAAO,UAAU,IAAIgB,KAAK,IAAI,OAAOA,KAAK,CAACC,QAAQ,KAAK,QAAQ;EACpE;EAEA,OAAOlB,SAAS,IAAI,gBAAgB,IAAIiB,KAAK,IAAI,OAAOA,KAAK,CAACE,cAAc,KAAK,QAAQ;AAC7F,CAAC;AAED,OAAO,MAAMJ,UAAU,GAAGA,CACtBV,GAAW,EACXe,KAAQ,EACRb,OAA+B,EAC/BC,OAAyB,EACzBC,OAA0C,KACtC;EACJ,MAAMY,OAAO,GAAGC,MAAM,CACjBD,OAAO,CAACnB,oBAAoB,CAACkB,KAAK,IAAI,CAAC,CAAC,EAAEX,OAAO,CAAC,CAAiC;EAExF,MAAMc,YAAY,GAAGD,MAAM,CACtBE,WAAW,CAACH,OAAO,CACfI,GAAG,CAACC,IAAA,IAAkB;IAAA,IAAjB,CAACrB,GAAG,EAAEY,KAAK,CAAC,GAAAS,IAAA;IACd;IACA,IAAI,OAAOT,KAAK,KAAK,UAAU,EAAE;MAC7B,OAAO,CAACZ,GAAG,EAAEY,KAAK,CAAC;IACvB;;IAEA;IACA,IAAIZ,GAAG,KAAK,cAAc,IAAIA,GAAG,KAAK,kBAAkB,EAAE;MACtD,OAAO,CACHA,GAAG,EACHU,UAAU,CAACV,GAAG,EAAEY,KAAK,EAAEV,OAAO,EAAEC,OAAO,EAAEC,OAAO,CAAC,CACpD;IACL;;IAEA;IACA,IAAIJ,GAAG,KAAK,WAAW,IAAIsB,KAAK,CAACC,OAAO,CAACX,KAAK,CAAC,EAAE;MAC7C,OAAO,CACHZ,GAAG,EACHY,KAAK,CAACQ,GAAG,CAACR,KAAK,IAAIF,UAAU,CAACV,GAAG,EAAEY,KAAK,EAAEV,OAAO,EAAEC,OAAO,EAAEC,OAAO,CAAC,CAAC,CACxE;IACL;;IAEA;IACA,IAAI,OAAOQ,KAAK,KAAK,QAAQ,IAAID,eAAe,CAACC,KAAK,CAAC,EAAE;MACrD,OAAO,CAACZ,GAAG,EAAEY,KAAK,CAAC;IACvB;IAEA,OAAO,CACHZ,GAAG,EACHN,qBAAqB,CAACkB,KAAoB,CAAC,CAC9C;EACL,CAAC,CACL,CAAM;EAEV,OAAOd,WAAW,CAACE,GAAG,EAAEkB,YAAY,EAAEhB,OAAO,EAAEC,OAAO,CAAC;AAC3D,CAAC"}
@@ -1,10 +1,45 @@
1
- export const getKeyForVariant = (value, variant) => {
2
- if (variant && variant in value) {
3
- return variant;
1
+ const getKeysForVariants = (value, variants) => {
2
+ // case for no specified variants by user, we should fallback to 'default'
3
+ if (!variants.length) {
4
+ return Object.entries(value).map(_ref => {
5
+ let [key, value] = _ref;
6
+ if ('default' in value) {
7
+ return [key, 'default'];
8
+ }
9
+ return undefined;
10
+ }).filter(Boolean);
4
11
  }
5
- if ('default' in value) {
6
- return 'default';
12
+ return variants.map(_ref2 => {
13
+ let [variantKey, variantValue] = _ref2;
14
+ const variantStyle = value[variantKey];
15
+ if (variantStyle && variantValue && variantValue in variantStyle) {
16
+ return [variantKey, variantValue];
17
+ }
18
+ if (variantStyle && 'default' in variantStyle) {
19
+ return [variantKey, 'default'];
20
+ }
21
+ return undefined;
22
+ }).filter(Boolean);
23
+ };
24
+ export const getStyleWithVariants = (style, variantValues) => {
25
+ if (!('variants' in style)) {
26
+ return style;
7
27
  }
8
- return undefined;
28
+ const keys = getKeysForVariants(style.variants, Object.entries(variantValues || {}));
29
+ const variantsValues = keys.map(_ref3 => {
30
+ let [key, nestedKey] = _ref3;
31
+ return style.variants[key][nestedKey];
32
+ }).reduce((acc, styles) => ({
33
+ ...acc,
34
+ ...styles
35
+ }), {});
36
+ const {
37
+ variants,
38
+ ...otherStyles
39
+ } = style;
40
+ return {
41
+ ...otherStyles,
42
+ ...variantsValues
43
+ };
9
44
  };
10
45
  //# sourceMappingURL=variants.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["getKeyForVariant","value","variant","undefined"],"sourceRoot":"../../../src","sources":["utils/variants.ts"],"mappings":"AAEA,OAAO,MAAMA,gBAAgB,GAAGA,CAACC,KAAkB,EAAEC,OAAgB,KAAuB;EACxF,IAAIA,OAAO,IAAIA,OAAO,IAAID,KAAK,EAAE;IAC7B,OAAOC,OAAO;EAClB;EAEA,IAAI,SAAS,IAAID,KAAK,EAAE;IACpB,OAAO,SAAS;EACpB;EAEA,OAAOE,SAAS;AACpB,CAAC"}
1
+ {"version":3,"names":["getKeysForVariants","value","variants","length","Object","entries","map","_ref","key","undefined","filter","Boolean","_ref2","variantKey","variantValue","variantStyle","getStyleWithVariants","style","variantValues","keys","variantsValues","_ref3","nestedKey","reduce","acc","styles","otherStyles"],"sourceRoot":"../../../src","sources":["utils/variants.ts"],"mappings":"AAEA,MAAMA,kBAAkB,GAAGA,CACvBC,KAAkC,EAClCC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AQ,CAAiDM,GAAG,CAAC,CAAiCc,SAAS,CAAC;EAAA,EAAC,CAC3IC,MAAM,CAAC,CAACC,GAAG,EAAEC,MAAM,MAAM;IAAE,GAAGD,GAAG;IAAE,GAAGC;EAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;EAEzD,MAAM;IAAEvB,QAAQ;IAAE,GAAGwB;EAAY,CAAC,GAAGT,KAAK;EAE1C,OAAO;IACH,GAAGS,WAAW;IACd,GAAGN;EACP,CAAC;AACL,CAAC"}
@@ -8,20 +8,20 @@ export declare const ScreenOrientation: {
8
8
  readonly Landscape: "landscape";
9
9
  readonly Portrait: "portrait";
10
10
  };
11
- export declare enum CxxUnistylesEventTypes {
11
+ export declare enum UnistylesEventType {
12
12
  Theme = "theme",
13
13
  Layout = "layout",
14
14
  Plugin = "plugin"
15
15
  }
16
16
  export declare enum UnistylesError {
17
- RuntimeUnavailable = "UNISTYLES_ERROR_RUNTIME_UNAVAILABLE",
18
- ThemeNotFound = "UNISTYLES_ERROR_THEME_NOT_FOUND",
19
- ThemeNotRegistered = "UNISTYLES_ERROR_THEME_NOT_REGISTERED",
20
- ThemesCannotBeEmpty = "UNISTYLES_ERROR_THEMES_CANNOT_BE_EMPTY",
21
- BreakpointsCannotBeEmpty = "UNISTYLES_ERROR_BREAKPOINTS_CANNOT_BE_EMPTY",
22
- BreakpointsMustStartFromZero = "UNISTYLES_ERROR_BREAKPOINTS_MUST_START_FROM_ZERO",
23
- InvalidPluginName = "UNISTYLES_ERROR_INVALID_PLUGIN_NAME",
24
- DuplicatePluginName = "UNISTYLES_ERROR_DUPLICATE_PLUGIN_NAME",
25
- CantRemoveInternalPlugin = "UNISTYLES_ERROR_CANT_REMOVE_INTERNAL_PLUGIN"
17
+ RuntimeUnavailable = "Unistyles runtime is not available. Make sure you followed the installation instructions.",
18
+ ThemeNotFound = "You are trying to get a theme that is not registered.",
19
+ ThemeNotRegistered = "You are trying to set a theme that is not registered.",
20
+ ThemesCannotBeEmpty = "You are trying to register an empty themes object.",
21
+ BreakpointsCannotBeEmpty = "You are trying to register an empty breakpoints object.",
22
+ BreakpointsMustStartFromZero = "One breakpoint must start from 0.",
23
+ InvalidPluginName = "Plugin name can't start from reserved prefix. Use another name.",
24
+ DuplicatePluginName = "You are trying to register a plugin with a name that is already registered.",
25
+ CantRemoveInternalPlugin = "You are trying to remove an internal unistyles plugin."
26
26
  }
27
27
  //# sourceMappingURL=common.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/common.ts"],"names":[],"mappings":"AAEA,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,iBAAiB;;;CAGpB,CAAA;AAEV,oBAAY,sBAAsB;IAC9B,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,MAAM,WAAW;CACpB;AAED,oBAAY,cAAc;IACtB,kBAAkB,wCAAwC;IAC1D,aAAa,oCAAoC;IACjD,kBAAkB,yCAAyC;IAC3D,mBAAmB,2CAA2C;IAC9D,wBAAwB,gDAAgD;IACxE,4BAA4B,qDAAqD;IACjF,iBAAiB,wCAAwC;IACzD,mBAAmB,0CAA0C;IAC7D,wBAAwB,gDAAgD;CAC3E"}
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/common.ts"],"names":[],"mappings":"AAEA,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;AA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AAe,UAO7C;IAEM,QAAQ,SAAU,MAAM,eAAe,aAAwB;CACzE"}
1
+ {"version":3,"file":"UnistyleRegistry.d.ts","sourceRoot":"","sources":["../../../../src/core/UnistyleRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AACjF,OAAO,KAAK,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAItE,qBAAa,gBAAgB;IAUb,OAAO,CAAC,eAAe;IAT5B,MAAM,EAAE,eAAe,CAAK;IAC5B,OAAO,EAAE,KAAK,CAAC,eAAe,CAAC,CAE9B;IACD,UAAU,EAAE,KAAK,CAAC,MAAM,eAAe,CAAC,CAAK;IAC7C,MAAM,EAAE,eAAe,CAAwB;IAC/C,WAAW,EAAE,oBAAoB,CAA6B;IAC9D,qBAAqB,EAAE,KAAK,CAAC,CAAC,MAAM,oBAAoB,EAAE,oBAAoB,CAAC,MAAM,oBAAoB,CAAC,CAAC,CAAC,CAAK;gBAEpG,eAAe,EAAE,eAAe;IAE7C,SAAS,WAAY,eAAe,UAS1C;IAEM,cAAc,gBAAiB,oBAAoB,UAMzD;IAEM,SAAS,WAAY,eAAe,UAc1C;IAEM,QAAQ,YAAa,MAAM,eAAe,WAUhD;IAEM,SAAS,WAAY,eAAe,WAAU,OAAO,UAW3D;IAEM,YAAY,WAAY,eAAe,UAO7C;IAEM,QAAQ,SAAU,MAAM,eAAe,aAAwB;CACzE"}
@@ -1,3 +1,3 @@
1
- import type { CustomNamedStyles, UnistylesTheme } from './types';
2
- export declare const createStyleSheet: <S, X>(styles: S | X | CustomNamedStyles<S> | ((theme: UnistylesTheme) => X | CustomNamedStyles<X>)) => S | X;
1
+ import type { StyleSheetWithSuperPowers } from './types';
2
+ export declare const createStyleSheet: <S extends StyleSheetWithSuperPowers>(stylesheet: S) => S;
3
3
  //# sourceMappingURL=createStyleSheet.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"createStyleSheet.d.ts","sourceRoot":"","sources":["../../../src/createStyleSheet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAEhE,eAAO,MAAM,gBAAgB,yDAA0D,cAAc,wCAMpG,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,eAAO,MAAM,gBAAgB,2DAAwE,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"global.d.ts","sourceRoot":"","sources":["../../../src/global.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;CAAG;AACnC,MAAM,WAAW,oBAAoB;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB"}
1
+ {"version":3,"file":"global.d.ts","sourceRoot":"","sources":["../../../src/global.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;CAAG;AACnC,MAAM,WAAW,oBAAoB;IAEjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB"}
@@ -1,3 +1,4 @@
1
1
  export { useInitialTheme } from './useInitialTheme';
2
2
  export { useUnistyles } from './useUnistyles';
3
+ export { useVariants } from './useVariants';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"useUnistyles.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useUnistyles.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,YAAY;;;;;;;;;;;CAmDxB,CAAA"}
1
+ {"version":3,"file":"useUnistyles.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useUnistyles.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,YAAY;;;;;;;;;;;CAgDxB,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { Optional } from '../types';
2
+ export declare const useVariants: (variantsMap?: Record<string, Optional<string>>) => Optional<Record<string, Optional<string>>>;
3
+ //# sourceMappingURL=useVariants.d.ts.map
@@ -0,0 +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;AAaxC,eAAO,MAAM,WAAW,iBAAkB,OAAO,MAAM,EAAE,SAAS,MAAM,CAAC,CAAC,+CAQzE,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"normalizer.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/normalizer/normalizer.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAEpE,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"}
1
+ {"version":3,"file":"normalizer.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/normalizer/normalizer.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAY,MAAM,aAAa,CAAA;AAE9E,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"}
@@ -1,3 +1,4 @@
1
- import type { RNStyle } from '../types';
2
- export declare const withPlugins: (key: string, style: RNStyle) => RNStyle;
1
+ import type { RNStyle, UnistylesPlugin } from '../types';
2
+ import type { UnistylesRuntime } from '../core';
3
+ export declare const withPlugins: (key: string, style: RNStyle, plugins: Array<UnistylesPlugin>, runtime: UnistylesRuntime) => RNStyle;
3
4
  //# sourceMappingURL=withPlugins.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"withPlugins.d.ts","sourceRoot":"","sources":["../../../../src/plugins/withPlugins.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AASvC,eAAO,MAAM,WAAW,QAAS,MAAM,SAAS,OAAO,YAO1C,CAAA"}
1
+ {"version":3,"file":"withPlugins.d.ts","sourceRoot":"","sources":["../../../../src/plugins/withPlugins.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AACxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAE/C,eAAO,MAAM,WAAW,QACf,MAAM,SACJ,OAAO,WACL,MAAM,eAAe,CAAC,WACtB,gBAAgB,YAOpB,CAAA"}
@@ -1,18 +1,24 @@
1
- import type { OpaqueColorValue } from 'react-native';
2
- import type { UnistylesBreakpoints } from '../global';
3
- import type { MediaQuery } from './mq';
1
+ import type { ColorValue, OpaqueColorValue } from 'react-native';
2
+ import type { UnistylesTheme } from '../types';
3
+ import type { AllAvailableKeys, BreakpointsOrMediaQueries } from './stylesheet';
4
4
  type WithEmptyObject<V> = keyof V extends never ? {} : V;
5
- type ExtractBreakpoints<T> = T extends Partial<Record<keyof UnistylesBreakpoints & string, infer V>> ? WithEmptyObject<V> : T extends (...args: infer A) => infer R ? (...args: A) => ExtractBreakpoints<R> : {
6
- [K in keyof T]: T[K] extends (...args: infer A) => infer R ? (...args: A) => ExtractBreakpoints<R> : T[K] extends object ? ExtractBreakpoints<T[K]> : T[K];
5
+ type ExtractBreakpoints<T> = T extends Partial<Record<BreakpointsOrMediaQueries, infer R>> ? WithEmptyObject<R> : {
6
+ [K in keyof T]: T[K] extends object ? T[K] extends OpaqueColorValue ? ColorValue : ExtractBreakpoints<T[K]> : T[K];
7
7
  };
8
- type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never;
9
- type RemoveKeysWithPrefix<T> = T extends (...args: Array<any>) => infer R ? (...args: Parameters<T>) => RemoveKeysWithPrefix<R> : T extends object ? T extends OpaqueColorValue ? string : T extends Record<string, infer _V> ? T extends {
10
- variants: infer _V;
11
- } ? Omit<T, 'variants'> & UnionToIntersection<_V[keyof _V]> : {
12
- [K in keyof T as K extends MediaQuery ? keyof UnistylesBreakpoints & string : K]: RemoveKeysWithPrefix<T[K]>;
13
- } : {
14
- [K in keyof T]: RemoveKeysWithPrefix<T[K]>;
15
- } : T;
16
- export type ReactNativeStyleSheet<T> = ExtractBreakpoints<RemoveKeysWithPrefix<T>>;
8
+ type ParseNestedObject<T> = T extends (...args: infer A) => infer R ? (...args: A) => ParseNestedObject<R> : keyof T extends AllAvailableKeys ? ExtractBreakpoints<T> : T extends {
9
+ variants: infer R;
10
+ } ? ParseVariants<FlattenVariants<R>> & ParseNestedObject<Omit<T, 'variants'>> : {
11
+ [K in keyof T]: T[K] extends object ? T[K] extends OpaqueColorValue ? ColorValue : ExtractBreakpoints<T[K]> : T[K];
12
+ };
13
+ type FlattenVariants<T> = T extends object ? {
14
+ [K in keyof T]: T[K] extends object ? {
15
+ [key in keyof T[K]]: T[K][key] extends object ? ParseNestedObject<T[K][key]> : never;
16
+ } : never;
17
+ } : never;
18
+ type ParseVariants<T> = T extends object ? T[keyof T] extends object ? ParseVariants<T[keyof T]> : T : T;
19
+ type ParseStyleKeys<T> = T extends object ? {
20
+ [K in keyof T]: ParseNestedObject<T[K]>;
21
+ } : never;
22
+ export type ReactNativeStyleSheet<T> = T extends (theme: UnistylesTheme) => infer R ? ParseStyleKeys<R> : ParseStyleKeys<T>;
17
23
  export {};
18
24
  //# sourceMappingURL=breakpoints.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"breakpoints.d.ts","sourceRoot":"","sources":["../../../../src/types/breakpoints.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AACpD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAA;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAA;AAEtC,KAAK,eAAe,CAAC,CAAC,IAAI,MAAM,CAAC,SAAS,KAAK,GAAG,EAAE,GAAG,CAAC,CAAA;AAExD,KAAK,kBAAkB,CAAC,CAAC,IAAI,CAAC,SA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AC,CAAC,CAAC,CAAC,CAAC;CAAE,GAC3C,KAAK,CAAA;AAEX,MAAM,MAAM,qBAAqB,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,cAAc,KAAK,MAAM,CAAC,GAC7E,cAAc,CAAC,CAAC,CAAC,GACjB,cAAc,CAAC,CAAC,CAAC,CAAA"}
@@ -2,42 +2,19 @@ import type { MatrixTransform, PerpectiveTransform, RotateTransform, RotateXTran
2
2
  import type { ImageStyle, TextStyle, ViewStyle } from 'react-native';
3
3
  import type { UnistylesBreakpoints, UnistylesThemes } from '../global';
4
4
  import type { MediaQuery } from './mq';
5
- type ShadowOffset = {
5
+ export type ShadowOffset = {
6
6
  width: number;
7
7
  height: number;
8
8
  };
9
+ export type TransformStyles = PerpectiveTransform & RotateTransform & RotateXTransform & RotateYTransform & RotateZTransform & ScaleTransform & ScaleXTransform & ScaleYTransform & TranslateXTransform & TranslateYTransform & SkewXTransform & SkewYTransform & MatrixTransform;
9
10
  export type ScreenSize = {
10
11
  width: number;
11
12
  height: number;
12
13
  };
13
- type TransformStyles = PerpectiveTransform & RotateTransform & RotateXTransform & RotateYTransform & RotateZTransform & ScaleTransform & ScaleXTransform & ScaleYTransform & TranslateXTransform & TranslateYTransform & SkewXTransform & SkewYTransform & MatrixTransform;
14
- type UnistyleNested = {
15
- shadowOffset?: DeepUniStyle<ShadowOffset>;
16
- textShadowOffset?: DeepUniStyle<ShadowOffset>;
17
- transform?: Array<DeepUniStyle<TransformStyles>>;
18
- variants?: Record<string, UnistyleView | UnistyleText | UnistyleImage & Omit<UnistyleNested, 'variants'>>;
19
- };
20
- type UniStyle<V> = {
21
- [innerKey in keyof UnistylesBreakpoints]?: V;
22
- } | {
23
- [innerKey in MediaQuery]: V;
24
- };
25
- type DeepUniStyle<T> = {
26
- [K in keyof T]?: UniStyle<T[K]> | T[K];
27
- };
28
- type NestedTypes = 'shadowOffset' | 'transform' | 'textShadowOffset';
29
- type UnistyleView = DeepUniStyle<Omit<ViewStyle, NestedTypes>>;
30
- type UnistyleText = DeepUniStyle<Omit<TextStyle, NestedTypes>>;
31
- type UnistyleImage = DeepUniStyle<Omit<ImageStyle, NestedTypes>>;
32
- export type StaticStyles = UnistyleView | UnistyleText | UnistyleImage & UnistyleNested;
33
- export type CustomNamedStyles<T> = {
34
- [K in keyof T]: T[K] extends (...args: infer A) => StaticStyles ? (...args: A) => StaticStyles : StaticStyles;
35
- };
36
14
  export type RNStyle = ViewStyle | TextStyle | ImageStyle;
37
15
  export type RNValue = number | string | undefined;
38
16
  export type NestedStyle = Record<keyof UnistylesBreakpoints | MediaQuery, RNValue>;
39
17
  export type NestedStylePairs = Array<[keyof UnistylesBreakpoints | MediaQuery, RNValue]>;
40
18
  export type UnistylesTheme = UnistylesThemes[keyof UnistylesThemes];
41
- export type CreateStylesFactory<ST, Theme> = (theme: Theme) => ST;
42
- export {};
19
+ export type CreateStylesFactory<ST> = (theme: UnistylesTheme) => ST;
43
20
  //# sourceMappingURL=core.d.ts.map
@@ -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;AACtE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAA;AAEtC,KAAK,YAAY,GAAG;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,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B,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AACtE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAA;AAEtC,MAAM,MAAM,YAAY,GAAG;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,eAAe,GACrB,mBAAmB,GACnB,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,MAAM,GAAG,MAAM,GAAG,SAAS,CAAA;AACjD,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,oBAAoB,GAAG,UAAU,EAAE,OAAO,CAAC,CAAA;AAClF,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC,CAAC,MAAM,oBAAoB,GAAG,UAAU,EAAE,OAAO,CAAC,CAAC,CAAA;AACxF,MAAM,MAAM,cAAc,GAAG,eAAe,CAAC,MAAM,eAAe,CAAC,CAAA;AACnE,MAAM,MAAM,mBAAmB,CAAC,EAAE,IAAI,CAAC,KAAK,EAAE,cAAc,KAAK,EAAE,CAAA"}
@@ -2,7 +2,8 @@ export * from './normalizer';
2
2
  export * from './unistyles';
3
3
  export type { Optional, Nullable } from './common';
4
4
  export type { MediaQuery } from './mq';
5
- export type { CustomNamedStyles, NestedStylePairs, UnistylesTheme, CreateStylesFactory, ScreenSize, NestedStyle, RNValue, RNStyle } from './core';
5
+ export type { NestedStylePairs, UnistylesTheme, CreateStylesFactory, ScreenSize, NestedStyle, RNValue, RNStyle } from './core';
6
+ export type { StyleSheetWithSuperPowers, StyleSheet } from './stylesheet';
6
7
  export type { ReactNativeStyleSheet } from './breakpoints';
7
8
  export type { ExtractVariantNames } from './variants';
8
9
  export type { UnistylesPlugin } from './plugin';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAClD,YAAY,EAAE,UAAU,EAAE,MAAM,MAAM,CAAA;AACtC,YAAY,EACR,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,EACd,mBAAmB,EACnB,UAAU,EACV,WAAW,EACX,OAAO,EACP,OAAO,EACV,MAAM,QAAQ,CAAA;AACf,YAAY,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAA;AAC1D,YAAY,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA;AACrD,YAAY,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAClD,YAAY,EAAE,UAAU,EAAE,MAAM,MAAM,CAAA;AACtC,YAAY,EACR,gBAAgB,EAChB,cAAc,EACd,mBAAmB,EACnB,UAAU,EACV,WAAW,EACX,OAAO,EACP,OAAO,EACV,MAAM,QAAQ,CAAA;AACf,YAAY,EAAE,yBAAyB,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzE,YAAY,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAA;AAC1D,YAAY,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA;AACrD,YAAY,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA"}
@@ -1,3 +1,3 @@
1
- import { MQSymbol } from '../utils';
2
- export type MediaQuery = typeof MQSymbol;
1
+ import { MQSymbol, MQHeight, MQHeightAndWidth, MQWidth, MQWidthAndHeight } from '../utils';
2
+ export type MediaQuery = typeof MQSymbol | typeof MQHeight | typeof MQWidth | typeof MQHeightAndWidth | typeof MQWidthAndHeight;
3
3
  //# sourceMappingURL=mq.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mq.d.ts","sourceRoot":"","sources":["../../../../src/types/mq.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAEnC,MAAM,MAAM,UAAU,GAAG,OAAO,QAAQ,CAAA"}
1
+ {"version":3,"file":"mq.d.ts","sourceRoot":"","sources":["../../../../src/types/mq.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,gBAAgB,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAE1F,MAAM,MAAM,UAAU,GAAG,OAAO,QAAQ,GAAG,OAAO,QAAQ,GAAG,OAAO,OAAO,GAAG,OAAO,gBAAgB,GAAG,OAAO,gBAAgB,CAAA"}
@@ -0,0 +1,47 @@
1
+ import type { ImageStyle, TextStyle, ViewStyle } from 'react-native';
2
+ import type { ShadowOffset, TransformStyles, UnistylesTheme } from './core';
3
+ import type { UnistylesBreakpoints } from '../global';
4
+ import type { MediaQuery } from './mq';
5
+ type NestedTypes = 'shadowOffset' | 'transform' | 'textShadowOffset';
6
+ type UnistyleView = Omit<ViewStyle, NestedTypes>;
7
+ type UnistyleText = Omit<TextStyle, NestedTypes>;
8
+ type UnistyleImage = Omit<ImageStyle, NestedTypes>;
9
+ type UnistyleNestedStyles = {
10
+ shadowOffset?: ToDeepUnistyles<ShadowOffset>;
11
+ textShadowOffset?: ToDeepUnistyles<ShadowOffset>;
12
+ transform?: Array<ToDeepUnistyles<TransformStyles>>;
13
+ };
14
+ type Variants = {
15
+ variants?: {
16
+ [variantName: string]: {
17
+ [variant: string]: {
18
+ [propName in AllAvailableKeys]?: AllAvailableStyles[propName] | {
19
+ [key in BreakpointsOrMediaQueries]?: AllAvailableStyles[propName];
20
+ } & {
21
+ [propName in NestedTypes]?: UnistyleNestedStyles[propName];
22
+ };
23
+ };
24
+ };
25
+ };
26
+ };
27
+ type ToDeepUnistyles<T> = {
28
+ [K in keyof T]?: T[K] | {
29
+ [key in BreakpointsOrMediaQueries]?: T[K];
30
+ };
31
+ };
32
+ type AllAvailableStyles = UnistyleView & UnistyleText & UnistyleImage & UnistyleNestedStyles;
33
+ export type AllAvailableKeys = keyof (UnistyleView & UnistyleText & UnistyleImage);
34
+ export type BreakpointsOrMediaQueries = keyof UnistylesBreakpoints | MediaQuery;
35
+ export type UnistylesValues = {
36
+ [propName in AllAvailableKeys]?: AllAvailableStyles[propName] | {
37
+ [key in BreakpointsOrMediaQueries]?: AllAvailableStyles[propName];
38
+ };
39
+ } & Variants & {
40
+ [propName in NestedTypes]?: UnistyleNestedStyles[propName];
41
+ };
42
+ export type StyleSheet = {
43
+ [styleName: string]: UnistylesValues | ((...args: any) => UnistylesValues);
44
+ };
45
+ export type StyleSheetWithSuperPowers = ((theme: UnistylesTheme) => StyleSheet) | StyleSheet;
46
+ export {};
47
+ //# sourceMappingURL=stylesheet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stylesheet.d.ts","sourceRoot":"","sources":["../../../../src/types/stylesheet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAA;AAC3E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAA;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAA;AAGtC,KAAK,W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