@tarojs/rn-style-transformer 4.0.1 → 4.0.3-alpah.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/LICENSE +8 -8
  2. package/README.md +36 -21
  3. package/dist/index.d.ts +8 -0
  4. package/dist/index.js +5 -5
  5. package/dist/index.js.map +1 -1
  6. package/dist/transforms/StyleSheet/ColorPropType.d.ts +10 -0
  7. package/dist/transforms/StyleSheet/ColorPropType.js.map +1 -1
  8. package/dist/transforms/StyleSheet/ImageResizeMode.d.ts +6 -0
  9. package/dist/transforms/StyleSheet/ImageStylePropTypes.d.ts +128 -0
  10. package/dist/transforms/StyleSheet/ImageStylePropTypes.js +1 -1
  11. package/dist/transforms/StyleSheet/ImageStylePropTypes.js.map +1 -1
  12. package/dist/transforms/StyleSheet/LayoutPropTypes.d.ts +388 -0
  13. package/dist/transforms/StyleSheet/ShadowPropTypesIOS.d.ts +45 -0
  14. package/dist/transforms/StyleSheet/ShadowPropTypesIOS.js +1 -1
  15. package/dist/transforms/StyleSheet/ShadowPropTypesIOS.js.map +1 -1
  16. package/dist/transforms/StyleSheet/StyleSheetValidation.d.ts +15 -0
  17. package/dist/transforms/StyleSheet/StyleSheetValidation.js +1 -1
  18. package/dist/transforms/StyleSheet/StyleSheetValidation.js.map +1 -1
  19. package/dist/transforms/StyleSheet/TextStylePropTypes.d.ts +191 -0
  20. package/dist/transforms/StyleSheet/TextStylePropTypes.js +1 -1
  21. package/dist/transforms/StyleSheet/TextStylePropTypes.js.map +1 -1
  22. package/dist/transforms/StyleSheet/TransformPropTypes.d.ts +67 -0
  23. package/dist/transforms/StyleSheet/TransformPropTypes.js.map +1 -1
  24. package/dist/transforms/StyleSheet/ViewStylePropTypes.d.ts +136 -0
  25. package/dist/transforms/StyleSheet/ViewStylePropTypes.js +1 -1
  26. package/dist/transforms/StyleSheet/ViewStylePropTypes.js.map +1 -1
  27. package/dist/transforms/StyleSheet/deprecatedPropType.d.ts +13 -0
  28. package/dist/transforms/StyleSheet/deprecatedPropType.js.map +1 -1
  29. package/dist/transforms/StyleSheet/index.d.ts +2 -0
  30. package/dist/transforms/StyleSheet/normalizeColor.d.ts +10 -0
  31. package/dist/transforms/StyleSheet/normalizeColor.js.map +1 -1
  32. package/dist/transforms/index.d.ts +56 -0
  33. package/dist/transforms/index.js +6 -6
  34. package/dist/transforms/index.js.map +1 -1
  35. package/dist/transforms/less.d.ts +2 -0
  36. package/dist/transforms/less.js +1 -1
  37. package/dist/transforms/less.js.map +1 -1
  38. package/dist/transforms/postcss.d.ts +13 -0
  39. package/dist/transforms/postcss.js +17 -5
  40. package/dist/transforms/postcss.js.map +1 -1
  41. package/dist/transforms/sass.d.ts +2 -0
  42. package/dist/transforms/sass.js +2 -2
  43. package/dist/transforms/sass.js.map +1 -1
  44. package/dist/transforms/stylus.d.ts +3 -0
  45. package/dist/transforms/stylus.js +1 -1
  46. package/dist/transforms/stylus.js.map +1 -1
  47. package/dist/types/index.d.ts +206 -0
  48. package/dist/utils/index.d.ts +21 -0
  49. package/dist/utils/index.js +2 -2
  50. package/dist/utils/index.js.map +1 -1
  51. package/dist/utils/lessImport.d.ts +5 -0
  52. package/dist/utils/reporterSkip.d.ts +7 -0
  53. package/dist/utils/reporterSkip.js.map +1 -1
  54. package/package.json +34 -31
  55. package/.eslintrc.js +0 -8
  56. package/__tests__/config.spec.js +0 -203
  57. package/__tests__/index.spec.js +0 -252
  58. package/__tests__/platform.spec.js +0 -78
  59. package/__tests__/styles/b.css +0 -3
  60. package/__tests__/styles/b.less +0 -3
  61. package/__tests__/styles/b.rn.css +0 -3
  62. package/__tests__/styles/b.scss +0 -3
  63. package/__tests__/styles/b.styl +0 -3
  64. package/__tests__/styles/c.css +0 -3
  65. package/__tests__/styles/c.less +0 -5
  66. package/__tests__/styles/c.rn.scss +0 -5
  67. package/__tests__/styles/c.scss +0 -5
  68. package/__tests__/styles/d.rn.scss +0 -3
  69. package/__tests__/styles/d.scss +0 -3
  70. package/__tests__/styles/mixins.scss +0 -18
  71. package/__tests__/styles/nest.rn.less +0 -3
  72. package/__tests__/styles/variable.scss +0 -1
  73. package/babel.config.js +0 -12
  74. package/jest.config.js +0 -8
  75. package/src/config/rn-stylelint.json +0 -5
  76. package/src/index.ts +0 -52
  77. package/src/transforms/StyleSheet/ColorPropType.ts +0 -76
  78. package/src/transforms/StyleSheet/ImageResizeMode.ts +0 -50
  79. package/src/transforms/StyleSheet/ImageStylePropTypes.ts +0 -62
  80. package/src/transforms/StyleSheet/LayoutPropTypes.ts +0 -559
  81. package/src/transforms/StyleSheet/ShadowPropTypesIOS.ts +0 -48
  82. package/src/transforms/StyleSheet/StyleSheetValidation.ts +0 -81
  83. package/src/transforms/StyleSheet/TextStylePropTypes.ts +0 -123
  84. package/src/transforms/StyleSheet/TransformPropTypes.ts +0 -109
  85. package/src/transforms/StyleSheet/ViewStylePropTypes.ts +0 -61
  86. package/src/transforms/StyleSheet/deprecatedPropType.ts +0 -31
  87. package/src/transforms/StyleSheet/index.ts +0 -5
  88. package/src/transforms/StyleSheet/normalizeColor.ts +0 -369
  89. package/src/transforms/index.ts +0 -231
  90. package/src/transforms/less.ts +0 -50
  91. package/src/transforms/postcss.ts +0 -96
  92. package/src/transforms/sass.ts +0 -151
  93. package/src/transforms/stylus.ts +0 -124
  94. package/src/types/index.ts +0 -242
  95. package/src/utils/index.ts +0 -229
  96. package/src/utils/lessImport.ts +0 -50
  97. package/src/utils/reporterSkip.ts +0 -27
  98. package/tsconfig.json +0 -12
package/LICENSE CHANGED
@@ -154,15 +154,8 @@ See `/LICENSE` for details of the license.
154
154
 
155
155
  ==================
156
156
 
157
- MIT (stencil-vue2-output-target):
158
- The following files embed [stencil-vue2-output-target](https://github.com/diondree/stencil-vue2-output-target) MIT:
159
- `/packages/taro-components-library-vue2/src/vue-component-lib/utils.ts`
160
- See `/LICENSE` for details of the license.
161
-
162
- ==================
163
-
164
157
  MIT (weui):
165
- The following files embed [stencil-vue2-output-target](https://github.com/Tencent/weui) MIT:
158
+ The following files embed [weui](https://github.com/Tencent/weui) MIT:
166
159
  `/packages/taro-components/src/components/*.scss`
167
160
  See `/LICENSE.txt` for details of the license.
168
161
 
@@ -172,3 +165,10 @@ Apache-2.0 (intersection-observer):
172
165
  The following files embed [intersection-observer](https://github.com/GoogleChromeLabs/intersection-observer) Apache-2.0:
173
166
  `/packages/taro-api/src/polyfill/intersection-observer.ts`
174
167
  See `/LICENSE.txt` for details of the license.
168
+
169
+ ==================
170
+
171
+ MIT (babel-plugin-jsx-dom-expressions):
172
+ The following files embed [babel-plugin-jsx-dom-expressions](https://github.com/ryansolid/dom-expressions/blob/main/packages/babel-plugin-jsx-dom-expressions) MIT:
173
+ `/packages/babel-plugin-transform-solid-jsx/src/*`
174
+ See `/LICENSE` for details of the license.
package/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  `object`
8
8
 
9
- `postcss` 相关配置,其他样式语言预处理后经过此配置。
9
+ `postcss` 相关配置,其他样式语言预处理后经过此配置。
10
10
 
11
11
  ```js
12
12
  module.exports = {
@@ -15,19 +15,30 @@ module.exports = {
15
15
  // ...
16
16
  postcss: {
17
17
  // postcss 配置,参考 https://github.com/postcss/postcss#options
18
- options: { /* ... */ },
18
+ options: {
19
+ /* ... */
20
+ },
19
21
  // 默认true,控制是否对 css value 进行 scalePx2dp 转换,pxtransform配置 enable 才生效
20
22
  scalable: boolean,
21
23
  pxtransform: {
22
24
  enable: boolean, // 默认true
23
- config: { /* ... */ } // 插件 pxtransform 配置项,参考尺寸章节
25
+ config: {
26
+ /* ... */
27
+ }, // 插件 pxtransform 配置项,参考尺寸章节
24
28
  },
25
29
  // 跟其他端 css module 配置保持统一
26
30
  cssModules: {
27
31
  enable: true, // 默认为 false,如需使用 css modules 功能,则设为 true
28
- }
32
+ },
33
+ // postcss-css-variables 配置,样式变量编译相关
34
+ 'postcss-css-variables': {
35
+ enable: boolean, // 默认 true
36
+ config: {
37
+ /* ... */
38
+ }, // 插件 postcss-css-variables 配置项,参考 https://github.com/MadLittleMods/postcss-css-variables?tab=readme-ov-file#options
39
+ },
29
40
  },
30
- }
41
+ },
31
42
  }
32
43
  ```
33
44
 
@@ -35,7 +46,7 @@ module.exports = {
35
46
 
36
47
  `object`
37
48
 
38
- `sass` 相关配置。`options` 配置项参考[官方文档](https://github.com/sass/node-sass#options)。
49
+ `sass` 相关配置。`options` 配置项参考[官方文档](https://github.com/sass/node-sass#options)。
39
50
 
40
51
  ```js
41
52
  module.exports = {
@@ -43,11 +54,13 @@ module.exports = {
43
54
  rn: {
44
55
  // ...
45
56
  sass: {
46
- options: { /* ... */ },
47
- // 加入到脚本注入的每个 sass 文件头部,在 config.sass 之前
57
+ options: {
58
+ /* ... */
59
+ },
60
+ // 加入到脚本注入的每个 sass 文件头部,在 config.sass 之前
48
61
  additionalData: '', // {String|Function}
49
- }
50
- }
62
+ },
63
+ },
51
64
  }
52
65
  ```
53
66
 
@@ -63,10 +76,12 @@ module.exports = {
63
76
  rn: {
64
77
  // ...
65
78
  less: {
66
- options: { /* ... */ },
79
+ options: {
80
+ /* ... */
81
+ },
67
82
  additionalData: '', // {String|Function}
68
- }
69
- }
83
+ },
84
+ },
70
85
  }
71
86
  ```
72
87
 
@@ -74,7 +89,7 @@ module.exports = {
74
89
 
75
90
  `object`
76
91
 
77
- `stylus` 相关配置。`options` 配置项如下。
92
+ `stylus` 相关配置。`options` 配置项如下。
78
93
 
79
94
  ```js
80
95
  module.exports = {
@@ -89,7 +104,7 @@ module.exports = {
89
104
  * @type {(string|Function)[]}
90
105
  * @default []
91
106
  */
92
- use: ["nib"],
107
+ use: ['nib'],
93
108
 
94
109
  /**
95
110
  * Add path(s) to the import lookup paths.
@@ -97,7 +112,7 @@ module.exports = {
97
112
  * @type {string[]}
98
113
  * @default []
99
114
  */
100
- include: [path.join(__dirname, "src/styl/config")],
115
+ include: [path.join(__dirname, 'src/styl/config')],
101
116
 
102
117
  /**
103
118
  * Import the specified Stylus files/paths.
@@ -105,7 +120,7 @@ module.exports = {
105
120
  * @type {string[]}
106
121
  * @default []
107
122
  */
108
- import: ["nib", path.join(__dirname, "src/styl/mixins")],
123
+ import: ['nib', path.join(__dirname, 'src/styl/mixins')],
109
124
 
110
125
  /**
111
126
  * Define Stylus variables or functions.
@@ -115,8 +130,8 @@ module.exports = {
115
130
  */
116
131
  // Array is the recommended syntax: [key, value, raw]
117
132
  define: [
118
- ["$development", process.env.NODE_ENV === "development"],
119
- ["rawVar", 42, true],
133
+ ['$development', process.env.NODE_ENV === 'development'],
134
+ ['rawVar', 42, true],
120
135
  ],
121
136
  // Object is deprecated syntax (there is no possibility to specify "raw')
122
137
  // define: {
@@ -153,7 +168,7 @@ module.exports = {
153
168
  hoistAtrules: true,
154
169
  },
155
170
  additionalData: '', // {String|Function}
156
- }
157
- }
171
+ },
172
+ },
158
173
  }
159
174
  ```
@@ -0,0 +1,8 @@
1
+ import { TransformOptions } from './types';
2
+ export declare function transform(src: string, filename: string, options: TransformOptions): Promise<any>;
3
+ export declare function rollupTransform(options: TransformOptions): {
4
+ name: string;
5
+ transform(src: string, filename: string): Promise<{
6
+ code: string;
7
+ } | undefined>;
8
+ };
package/dist/index.js CHANGED
@@ -27,10 +27,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.rollupTransform = exports.transform = void 0;
30
- const path = __importStar(require("path"));
30
+ const path = __importStar(require("node:path"));
31
31
  const transforms_1 = __importDefault(require("./transforms"));
32
32
  const RN_CSS_EXT = ['.css', '.scss', '.sass', '.less', '.styl', '.stylus'];
33
- const upstreamTransformer = require('metro-react-native-babel-transformer');
33
+ const upstreamTransformer = require('@react-native/metro-babel-transformer');
34
34
  const getSingleStyleTransform = styleTransformIns();
35
35
  function styleTransformIns() {
36
36
  let styleTransform = null;
@@ -49,7 +49,7 @@ async function transform(src, filename, options) {
49
49
  }
50
50
  const ext = path.extname(filename);
51
51
  if (RN_CSS_EXT.includes(ext)) {
52
- const styleTransform = getSingleStyleTransform(options.config);
52
+ const styleTransform = getSingleStyleTransform(options.config || {});
53
53
  const styles = await styleTransform.transform(src, filename, options);
54
54
  return upstreamTransformer.transform({
55
55
  src: styles,
@@ -62,11 +62,11 @@ async function transform(src, filename, options) {
62
62
  exports.transform = transform;
63
63
  function rollupTransform(options) {
64
64
  return {
65
- name: 'rn-style-transformer',
65
+ name: 'rn-style-transformer', // this name will show up in warnings and errors
66
66
  async transform(src, filename) {
67
67
  const ext = path.extname(filename);
68
68
  if (RN_CSS_EXT.includes(ext)) {
69
- const styleTransform = getSingleStyleTransform(options.config);
69
+ const styleTransform = getSingleStyleTransform(options.config || {});
70
70
  const code = await styleTransform.transform(src, filename, options);
71
71
  return { code };
72
72
  }
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA4B;AAE5B,8DAAyC;AAGzC,MAAM,UAAU,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,CAAC,CAAA;AAC1E,MAAM,mBAAmB,GAAG,OAAO,CAAC,sCAAsC,CAAC,CAAA;AAE3E,MAAM,uBAAuB,GAAG,iBAAiB,EAAE,CAAA;AAEnD,SAAS,iBAAiB;IACxB,IAAI,cAAc,GAA0B,IAAI,CAAA;IAChD,OAAO,UAAU,MAAc;QAC7B,aAAa;QACb,IAAI,CAAC,cAAc,EAAE;YACnB,cAAc,GAAG,IAAI,oBAAc,CAAC,MAAM,CAAC,CAAA;SAC5C;QACD,OAAO,cAAc,CAAA;IACvB,CAAC,CAAA;AACH,CAAC;AAEM,KAAK,UAAU,SAAS,CAAE,GAAW,EAAE,QAAgB,EAAE,OAAyB;IACvF,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;QAC3B,o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AgBC;AAED,SAAgB,eAAe,CAAE,OAAyB;IACxD,OAAO;QACL,IAAI,EAAE,sBAAsB,EAAE,gDAAgD;QAC9E,KAAK,CAAC,SAAS,CAAE,GAAW,EAAE,QAAgB;YAC5C,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;YAClC,IAAI,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;gBAC7B,MAAM,cAAc,GAAG,uBAAuB,CAAC,OAAO,CAAC,MAAM,IAAI,EAAE,CAAC,CAAA;gBACpE,MAAM,IAAI,GAAG,MAAM,cAAc,CAAC,SAAS,CAAC,GAAG,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAA;gBACnE,OAAO,EAAE,IAAI,EAAE,CAAA;YACjB,CAAC;QACH,CAAC;KACF,CAAA;AACH,CAAC;AAZD,0CAYC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Copyright (c) 2015-present, Facebook, Inc.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ * @format
8
+ */
9
+ declare const ColorPropType: any;
10
+ export default ColorPropType;
@@ -1 +1 @@
1
- {"version":3,"file":"ColorPropType.js","sourceRoot":"","sources":["../../../src/transforms/StyleSheet/ColorPropType.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,YAAY,CAAA;;;;;AAEZ,sEAA6C;AAE7C,MAAM,aAAa,GAAG,UACpB,UAAU,EACV,KAAK,EACL,QAAQ,EACR,aAAa,EACb,QAAQ,EACR,YAAY;IAEZ,MAAM,KAAK,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAA;IAC7B,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,EAAE;QACzC,IAAI,UAAU,EAAE;YACd,OAAO,IAAI,KAAK,CACd,WAAW;gBACT,QAAQ;gBACR,IAAI;gBACJ,CAAC,YAAY,IAAI,QAAQ,CAAC;gBAC1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AM;IACR,CAAC;IAED,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,qEAAqE;QACrE,2EAA2E;QAC3E,6CAA6C;QAC7C,OAAM;IACR,CAAC;IAED,IAAI,IAAA,wBAAc,EAAC,KAAK,CAAC,KAAK,IAAI,EAAE,CAAC;QACnC,OAAO,IAAI,KAAK,CACd,UAAU;YACR,QAAQ;YACR,IAAI;YACJ,CAAC,YAAY,IAAI,QAAQ,CAAC;YAC1B,iBAAiB;YACjB,aAAa;YACb,KAAK;YACL,KAAK;YACL,IAAI;YACJ;;;;;;;;;;;;CAYP,CACI,CAAA;IACH,CAAC;AACH,CAAC,CAAA;AAED,MAAM,aAAa,GAAG,aAAa,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAA;AACtE,aAAa,CAAC,UAAU,GAAG,aAAa,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAA;AAE1E,kBAAe,aAAa,CAAA"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * ImageResizeMode - Enum for different image resizing modes, set via
3
+ * `resizeMode` style property on `<Image>` components.
4
+ */
5
+ declare const ImageResizeMode: any;
6
+ export default ImageResizeMode;
@@ -0,0 +1,128 @@
1
+ import * as ReactPropTypes from 'prop-types';
2
+ declare const ImageStylePropTypes: {
3
+ resizeMode: ReactPropTypes.Requireable<string>;
4
+ backfaceVisibility: ReactPropTypes.Requireable<string>;
5
+ backgroundColor: any;
6
+ borderColor: any;
7
+ borderWidth: ReactPropTypes.Requireable<number>;
8
+ borderRadius: ReactPropTypes.Requireable<number>;
9
+ overflow: ReactPropTypes.Requireable<string>;
10
+ /**
11
+ * Changes the color of all the non-transparent pixels to the tintColor.
12
+ */
13
+ tintColor: any;
14
+ opacity: ReactPropTypes.Requireable<number>;
15
+ /**
16
+ * When the image has rounded corners, specifying an overlayColor will
17
+ * cause the remaining space in the corners to be filled with a solid color.
18
+ * This is useful in cases which are not supported by the Android
19
+ * implementation of rounded corners:
20
+ * - Certain resize modes, such as 'contain'
21
+ * - Animated GIFs
22
+ *
23
+ * A typical way to use this prop is with images displayed on a solid
24
+ * background and setting the `overlayColor` to the same color
25
+ * as the background.
26
+ *
27
+ * For details of how this works under the hood, see
28
+ * http://frescolib.org/docs/rounded-corners-and-circles.html
29
+ *
30
+ * @platform android
31
+ */
32
+ overlayColor: ReactPropTypes.Requireable<string>;
33
+ borderTopLeftRadius: ReactPropTypes.Requireable<number>;
34
+ borderTopRightRadius: ReactPropTypes.Requireable<number>;
35
+ borderBottomLeftRadius: ReactPropTypes.Requireable<number>;
36
+ borderBottomRightRadius: ReactPropTypes.Requireable<number>;
37
+ transform: ReactPropTypes.Requireable<(NonNullable<ReactPropTypes.InferProps<{
38
+ perspective: ReactPropTypes.Requireable<number>;
39
+ }> | ReactPropTypes.InferProps<{
40
+ rotate: ReactPropTypes.Requireable<string>;
41
+ }> | ReactPropTypes.InferProps<{
42
+ rotateX: ReactPropTypes.Requireable<string>;
43
+ }> | ReactPropTypes.InferProps<{
44
+ rotateY: ReactPropTypes.Requireable<string>;
45
+ }> | ReactPropTypes.InferProps<{
46
+ rotateZ: ReactPropTypes.Requireable<string>;
47
+ }> | ReactPropTypes.InferProps<{
48
+ scale: ReactPropTypes.Requireable<number>;
49
+ }> | ReactPropTypes.InferProps<{
50
+ scaleX: ReactPropTypes.Requireable<number>;
51
+ }> | ReactPropTypes.InferProps<{
52
+ scaleY: ReactPropTypes.Requireable<number>;
53
+ }> | ReactPropTypes.InferProps<{
54
+ translateX: ReactPropTypes.Requireable<number>;
55
+ }> | ReactPropTypes.InferProps<{
56
+ translateY: ReactPropTypes.Requireable<number>;
57
+ }> | ReactPropTypes.InferProps<{
58
+ skewX: ReactPropTypes.Requireable<string>;
59
+ }> | ReactPropTypes.InferProps<{
60
+ skewY: ReactPropTypes.Requireable<string>;
61
+ }> | null | undefined> | null | undefined)[]>;
62
+ transformMatrix: (props: any, propName: any, _componentName: any) => Error | undefined;
63
+ decomposedMatrix: (props: any, propName: any, _componentName: any) => Error | undefined;
64
+ scaleX: (props: any, propName: any, componentName: any, ...rest: any[]) => any;
65
+ scaleY: (props: any, propName: any, componentName: any, ...rest: any[]) => any;
66
+ rotation: (props: any, propName: any, componentName: any, ...rest: any[]) => any;
67
+ translateX: (props: any, propName: any, componentName: any, ...rest: any[]) => any;
68
+ translateY: (props: any, propName: any, componentName: any, ...rest: any[]) => any;
69
+ shadowColor: any;
70
+ shadowOffset: ReactPropTypes.Requireable<ReactPropTypes.InferProps<{
71
+ width: ReactPropTypes.Requireable<number>;
72
+ height: ReactPropTypes.Requireable<number>;
73
+ }>>;
74
+ shadowOpacity: ReactPropTypes.Requireable<number>;
75
+ shadowRadius: ReactPropTypes.Requireable<number>;
76
+ display: ReactPropTypes.Requireable<string>;
77
+ width: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
78
+ height: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
79
+ start: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
80
+ end: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
81
+ top: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
82
+ left: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
83
+ right: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
84
+ bottom: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
85
+ minWidth: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
86
+ maxWidth: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
87
+ minHeight: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
88
+ maxHeight: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
89
+ margin: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
90
+ marginVertical: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
91
+ marginHorizontal: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
92
+ marginTop: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
93
+ marginBottom: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
94
+ marginLeft: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
95
+ marginRight: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
96
+ marginStart: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
97
+ marginEnd: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
98
+ padding: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
99
+ paddingVertical: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
100
+ paddingHorizontal: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
101
+ paddingTop: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
102
+ paddingBottom: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
103
+ paddingLeft: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
104
+ paddingRight: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
105
+ paddingStart: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
106
+ paddingEnd: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
107
+ borderTopWidth: ReactPropTypes.Requireable<number>;
108
+ borderStartWidth: ReactPropTypes.Requireable<number>;
109
+ borderEndWidth: ReactPropTypes.Requireable<number>;
110
+ borderRightWidth: ReactPropTypes.Requireable<number>;
111
+ borderBottomWidth: ReactPropTypes.Requireable<number>;
112
+ borderLeftWidth: ReactPropTypes.Requireable<number>;
113
+ position: ReactPropTypes.Requireable<string>;
114
+ flexDirection: ReactPropTypes.Requireable<string>;
115
+ flexWrap: ReactPropTypes.Requireable<string>;
116
+ justifyContent: ReactPropTypes.Requireable<string>;
117
+ alignItems: ReactPropTypes.Requireable<string>;
118
+ alignSelf: ReactPropTypes.Requireable<string>;
119
+ alignContent: ReactPropTypes.Requireable<string>;
120
+ flex: ReactPropTypes.Requireable<number>;
121
+ flexGrow: ReactPropTypes.Requireable<number>;
122
+ flexShrink: ReactPropTypes.Requireable<number>;
123
+ flexBasis: ReactPropTypes.Requireable<NonNullable<string | number | null | undefined>>;
124
+ aspectRatio: ReactPropTypes.Requireable<number>;
125
+ zIndex: ReactPropTypes.Requireable<number>;
126
+ direction: ReactPropTypes.Requireable<string>;
127
+ };
128
+ export default ImageStylePropTypes;
@@ -35,10 +35,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
35
35
  return (mod && mod.__esModule) ? mod : { "default": mod };
36
36
  };
37
37
  Object.defineProperty(exports, "__esModule", { value: true });
38
+ const ReactPropTypes = __importStar(require("prop-types"));
38
39
  const ColorPropType_1 = __importDefault(require("./ColorPropType"));
39
40
  const ImageResizeMode_1 = __importDefault(require("./ImageResizeMode"));
40
41
  const LayoutPropTypes_1 = __importDefault(require("./LayoutPropTypes"));
41
- const ReactPropTypes = __importStar(require("prop-types"));
42
42
  const ShadowPropTypesIOS_1 = __importDefault(require("./ShadowPropTypesIOS"));
43
43
  const TransformPropTypes_1 = __importDefault(require("./TransformPropTypes"));
44
44
  const ImageStylePropTypes = Object.assign(Object.assign(Object.assign(Object.assign({}, LayoutPropTypes_1.default), ShadowPropTypesIOS_1.default), TransformPropTypes_1.default), { resizeMode: ReactPropTypes.oneOf(Object.keys(ImageResizeMode_1.default)), backfaceVisibility: ReactPropTypes.oneOf(['visible', 'hidden']), backgroundColor: ColorPropType_1.default, borderColor: ColorPropType_1.default, borderWidth: ReactPropTypes.number, borderRadius: ReactPropTypes.number, overflow: ReactPropTypes.oneOf(['visible', 'hidden']),
@@ -1 +1 @@
1
- {"version":3,"file":"ImageStylePropTypes.js","sourceRoot":"","sources":["../../../src/transforms/StyleSheet/ImageStylePropTypes.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,YAAY,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEZ,o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