@htyf-mp/taro-rn-style-transformer 0.0.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 (69) hide show
  1. package/README.md +174 -0
  2. package/dist/config/rn-stylelint.json +4 -0
  3. package/dist/index.d.ts +8 -0
  4. package/dist/index.js +86 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/transforms/StyleSheet/ColorPropType.d.ts +10 -0
  7. package/dist/transforms/StyleSheet/ColorPropType.js +76 -0
  8. package/dist/transforms/StyleSheet/ColorPropType.js.map +1 -0
  9. package/dist/transforms/StyleSheet/ImageResizeMode.d.ts +6 -0
  10. package/dist/transforms/StyleSheet/ImageResizeMode.js +54 -0
  11. package/dist/transforms/StyleSheet/ImageResizeMode.js.map +1 -0
  12. package/dist/transforms/StyleSheet/ImageStylePropTypes.d.ts +106 -0
  13. package/dist/transforms/StyleSheet/ImageStylePropTypes.js +81 -0
  14. package/dist/transforms/StyleSheet/ImageStylePropTypes.js.map +1 -0
  15. package/dist/transforms/StyleSheet/LayoutPropTypes.d.ts +399 -0
  16. package/dist/transforms/StyleSheet/LayoutPropTypes.js +566 -0
  17. package/dist/transforms/StyleSheet/LayoutPropTypes.js.map +1 -0
  18. package/dist/transforms/StyleSheet/ShadowPropTypesIOS.d.ts +32 -0
  19. package/dist/transforms/StyleSheet/ShadowPropTypesIOS.js +86 -0
  20. package/dist/transforms/StyleSheet/ShadowPropTypesIOS.js.map +1 -0
  21. package/dist/transforms/StyleSheet/StyleSheetValidation.d.ts +15 -0
  22. package/dist/transforms/StyleSheet/StyleSheetValidation.js +71 -0
  23. package/dist/transforms/StyleSheet/StyleSheetValidation.js.map +1 -0
  24. package/dist/transforms/StyleSheet/TextStylePropTypes.d.ts +154 -0
  25. package/dist/transforms/StyleSheet/TextStylePropTypes.js +127 -0
  26. package/dist/transforms/StyleSheet/TextStylePropTypes.js.map +1 -0
  27. package/dist/transforms/StyleSheet/TransformPropTypes.d.ts +45 -0
  28. package/dist/transforms/StyleSheet/TransformPropTypes.js +129 -0
  29. package/dist/transforms/StyleSheet/TransformPropTypes.js.map +1 -0
  30. package/dist/transforms/StyleSheet/ViewStylePropTypes.d.ts +126 -0
  31. package/dist/transforms/StyleSheet/ViewStylePropTypes.js +72 -0
  32. package/dist/transforms/StyleSheet/ViewStylePropTypes.js.map +1 -0
  33. package/dist/transforms/StyleSheet/deprecatedPropType.d.ts +13 -0
  34. package/dist/transforms/StyleSheet/deprecatedPropType.js +32 -0
  35. package/dist/transforms/StyleSheet/deprecatedPropType.js.map +1 -0
  36. package/dist/transforms/StyleSheet/index.d.ts +2 -0
  37. package/dist/transforms/StyleSheet/index.js +9 -0
  38. package/dist/transforms/StyleSheet/index.js.map +1 -0
  39. package/dist/transforms/StyleSheet/normalizeColor.d.ts +10 -0
  40. package/dist/transforms/StyleSheet/normalizeColor.js +341 -0
  41. package/dist/transforms/StyleSheet/normalizeColor.js.map +1 -0
  42. package/dist/transforms/index.d.ts +56 -0
  43. package/dist/transforms/index.js +221 -0
  44. package/dist/transforms/index.js.map +1 -0
  45. package/dist/transforms/less.d.ts +2 -0
  46. package/dist/transforms/less.js +70 -0
  47. package/dist/transforms/less.js.map +1 -0
  48. package/dist/transforms/postcss.d.ts +13 -0
  49. package/dist/transforms/postcss.js +135 -0
  50. package/dist/transforms/postcss.js.map +1 -0
  51. package/dist/transforms/sass.d.ts +2 -0
  52. package/dist/transforms/sass.js +162 -0
  53. package/dist/transforms/sass.js.map +1 -0
  54. package/dist/transforms/stylus.d.ts +3 -0
  55. package/dist/transforms/stylus.js +110 -0
  56. package/dist/transforms/stylus.js.map +1 -0
  57. package/dist/types/index.d.ts +205 -0
  58. package/dist/types/index.js +6 -0
  59. package/dist/types/index.js.map +1 -0
  60. package/dist/utils/index.d.ts +21 -0
  61. package/dist/utils/index.js +240 -0
  62. package/dist/utils/index.js.map +1 -0
  63. package/dist/utils/lessImport.d.ts +5 -0
  64. package/dist/utils/lessImport.js +45 -0
  65. package/dist/utils/lessImport.js.map +1 -0
  66. package/dist/utils/reporterSkip.d.ts +7 -0
  67. package/dist/utils/reporterSkip.js +27 -0
  68. package/dist/utils/reporterSkip.js.map +1 -0
  69. package/package.json +56 -0
@@ -0,0 +1,399 @@
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
+ * strict
9
+ */
10
+ /**
11
+ * React Native's layout system is based on Flexbox and is powered both
12
+ * on iOS and Android by an open source project called `Yoga`:
13
+ * https://github.com/facebook/yoga
14
+ *
15
+ * The implementation in Yoga is slightly different from what the
16
+ * Flexbox spec defines - for example, we chose more sensible default
17
+ * values. Since our layout docs are generated from the comments in this
18
+ * file, please keep a brief comment describing each prop type.
19
+ *
20
+ * These properties are a subset of our styles that are consumed by the layout
21
+ * algorithm and affect the positioning and sizing of views.
22
+ */
23
+ declare const LayoutPropTypes: {
24
+ /** `display` sets the display type of this component.
25
+ *
26
+ * It works similarly to `display` in CSS, but only support 'flex' and 'none'.
27
+ * 'flex' is the default.
28
+ */
29
+ display: any;
30
+ /** `width` sets the width of this component.
31
+ *
32
+ * It works similarly to `width` in CSS, but in React Native you
33
+ * must use points or percentages. Ems and other units are not supported.
34
+ * See https://developer.mozilla.org/en-US/docs/Web/CSS/width for more details.
35
+ */
36
+ width: any;
37
+ /** `height` sets the height of this component.
38
+ *
39
+ * It works similarly to `height` in CSS, but in React Native you
40
+ * must use points or percentages. Ems and other units are not supported.
41
+ * See https://developer.mozilla.org/en-US/docs/Web/CSS/height for more details.
42
+ */
43
+ height: any;
44
+ /**
45
+ * When the direction is `ltr`, `start` is equivalent to `left`.
46
+ * When the direction is `rtl`, `start` is equivalent to `right`.
47
+ *
48
+ * This style takes precedence over the `left`, `right`, and `end` styles.
49
+ */
50
+ start: any;
51
+ /**
52
+ * When the direction is `ltr`, `end` is equivalent to `right`.
53
+ * When the direction is `rtl`, `end` is equivalent to `left`.
54
+ *
55
+ * This style takes precedence over the `left` and `right` styles.
56
+ */
57
+ end: any;
58
+ /** `top` is the number of logical pixels to offset the top edge of
59
+ * this component.
60
+ *
61
+ * It works similarly to `top` in CSS, but in React Native you
62
+ * must use points or percentages. Ems and other units are not supported.
63
+ *
64
+ * See https://developer.mozilla.org/en-US/docs/Web/CSS/top
65
+ * for more details of how `top` affects layout.
66
+ */
67
+ top: any;
68
+ /** `left` is the number of logical pixels to offset the left edge of
69
+ * this component.
70
+ *
71
+ * It works similarly to `left` in CSS, but in React Native you
72
+ * must use points or percentages. Ems and other units are not supported.
73
+ *
74
+ * See https://developer.mozilla.org/en-US/docs/Web/CSS/left
75
+ * for more details of how `left` affects layout.
76
+ */
77
+ left: any;
78
+ /** `right` is the number of logical pixels to offset the right edge of
79
+ * this component.
80
+ *
81
+ * It works similarly to `right` in CSS, but in React Native you
82
+ * must use points or percentages. Ems and other units are not supported.
83
+ *
84
+ * See https://developer.mozilla.org/en-US/docs/Web/CSS/right
85
+ * for more details of how `right` affects layout.
86
+ */
87
+ right: any;
88
+ /** `bottom` is the number of logical pixels to offset the bottom edge of
89
+ * this component.
90
+ *
91
+ * It works similarly to `bottom` in CSS, but in React Native you
92
+ * must use points or percentages. Ems and other units are not supported.
93
+ *
94
+ * See https://developer.mozilla.org/en-US/docs/Web/CSS/bottom
95
+ * for more details of how `bottom` affects layout.
96
+ */
97
+ bottom: any;
98
+ /** `minWidth` is the minimum width for this component, in logical pixels.
99
+ *
100
+ * It works similarly to `min-width` in CSS, but in React Native you
101
+ * must use points or percentages. Ems and other units are not supported.
102
+ *
103
+ * See https://developer.mozilla.org/en-US/docs/Web/CSS/min-width
104
+ * for more details.
105
+ */
106
+ minWidth: any;
107
+ /** `maxWidth` is the maximum width for this component, in logical pixels.
108
+ *
109
+ * It works similarly to `max-width` in CSS, but in React Native you
110
+ * must use points or percentages. Ems and other units are not supported.
111
+ *
112
+ * See https://developer.mozilla.org/en-US/docs/Web/CSS/max-width
113
+ * for more details.
114
+ */
115
+ maxWidth: any;
116
+ /** `minHeight` is the minimum height for this component, in logical pixels.
117
+ *
118
+ * It works similarly to `min-height` in CSS, but in React Native you
119
+ * must use points or percentages. Ems and other units are not supported.
120
+ *
121
+ * See https://developer.mozilla.org/en-US/docs/Web/CSS/min-height
122
+ * for more details.
123
+ */
124
+ minHeight: any;
125
+ /** `maxHeight` is the maximum height for this component, in logical pixels.
126
+ *
127
+ * It works similarly to `max-height` in CSS, but in React Native you
128
+ * must use points or percentages. Ems and other units are not supported.
129
+ *
130
+ * See https://developer.mozilla.org/en-US/docs/Web/CSS/max-height
131
+ * for more details.
132
+ */
133
+ maxHeight: any;
134
+ /** Setting `margin` has the same effect as setting each of
135
+ * `marginTop`, `marginLeft`, `marginBottom`, and `marginRight`.
136
+ * See https://developer.mozilla.org/en-US/docs/Web/CSS/margin
137
+ * for more details.
138
+ */
139
+ margin: any;
140
+ /** Setting `marginVertical` has the same effect as setting both
141
+ * `marginTop` and `marginBottom`.
142
+ */
143
+ marginVertical: any;
144
+ /** Setting `marginHorizontal` has the same effect as setting
145
+ * both `marginLeft` and `marginRight`.
146
+ */
147
+ marginHorizontal: any;
148
+ /** `marginTop` works like `margin-top` in CSS.
149
+ * See https://developer.mozilla.org/en-US/docs/Web/CSS/margin-top
150
+ * for more details.
151
+ */
152
+ marginTop: any;
153
+ /** `marginBottom` works like `margin-bottom` in CSS.
154
+ * See https://developer.mozilla.org/en-US/docs/Web/CSS/margin-bottom
155
+ * for more details.
156
+ */
157
+ marginBottom: any;
158
+ /** `marginLeft` works like `margin-left` in CSS.
159
+ * See https://developer.mozilla.org/en-US/docs/Web/CSS/margin-left
160
+ * for more details.
161
+ */
162
+ marginLeft: any;
163
+ /** `marginRight` works like `margin-right` in CSS.
164
+ * See https://developer.mozilla.org/en-US/docs/Web/CSS/margin-right
165
+ * for more details.
166
+ */
167
+ marginRight: any;
168
+ /**
169
+ * When direction is `ltr`, `marginStart` is equivalent to `marginLeft`.
170
+ * When direction is `rtl`, `marginStart` is equivalent to `marginRight`.
171
+ */
172
+ marginStart: any;
173
+ /**
174
+ * When direction is `ltr`, `marginEnd` is equivalent to `marginRight`.
175
+ * When direction is `rtl`, `marginEnd` is equivalent to `marginLeft`.
176
+ */
177
+ marginEnd: any;
178
+ /** Setting `padding` has the same effect as setting each of
179
+ * `paddingTop`, `paddingBottom`, `paddingLeft`, and `paddingRight`.
180
+ * See https://developer.mozilla.org/en-US/docs/Web/CSS/padding
181
+ * for more details.
182
+ */
183
+ padding: any;
184
+ /** Setting `paddingVertical` is like setting both of
185
+ * `paddingTop` and `paddingBottom`.
186
+ */
187
+ paddingVertical: any;
188
+ /** Setting `paddingHorizontal` is like setting both of
189
+ * `paddingLeft` and `paddingRight`.
190
+ */
191
+ paddingHorizontal: any;
192
+ /** `paddingTop` works like `padding-top` in CSS.
193
+ * See https://developer.mozilla.org/en-US/docs/Web/CSS/padding-top
194
+ * for more details.
195
+ */
196
+ paddingTop: any;
197
+ /** `paddingBottom` works like `padding-bottom` in CSS.
198
+ * See https://developer.mozilla.org/en-US/docs/Web/CSS/padding-bottom
199
+ * for more details.
200
+ */
201
+ paddingBottom: any;
202
+ /** `paddingLeft` works like `padding-left` in CSS.
203
+ * See https://developer.mozilla.org/en-US/docs/Web/CSS/padding-left
204
+ * for more details.
205
+ */
206
+ paddingLeft: any;
207
+ /** `paddingRight` works like `padding-right` in CSS.
208
+ * See https://developer.mozilla.org/en-US/docs/Web/CSS/padding-right
209
+ * for more details.
210
+ */
211
+ paddingRight: any;
212
+ /**
213
+ * When direction is `ltr`, `paddingStart` is equivalent to `paddingLeft`.
214
+ * When direction is `rtl`, `paddingStart` is equivalent to `paddingRight`.
215
+ */
216
+ paddingStart: any;
217
+ /**
218
+ * When direction is `ltr`, `paddingEnd` is equivalent to `paddingRight`.
219
+ * When direction is `rtl`, `paddingEnd` is equivalent to `paddingLeft`.
220
+ */
221
+ paddingEnd: any;
222
+ /** `borderWidth` works like `border-width` in CSS.
223
+ * See https://developer.mozilla.org/en-US/docs/Web/CSS/border-width
224
+ * for more details.
225
+ */
226
+ borderWidth: any;
227
+ /** `borderTopWidth` works like `border-top-width` in CSS.
228
+ * See https://developer.mozilla.org/en-US/docs/Web/CSS/border-top-width
229
+ * for more details.
230
+ */
231
+ borderTopWidth: any;
232
+ /**
233
+ * When direction is `ltr`, `borderStartWidth` is equivalent to `borderLeftWidth`.
234
+ * When direction is `rtl`, `borderStartWidth` is equivalent to `borderRightWidth`.
235
+ */
236
+ borderStartWidth: any;
237
+ /**
238
+ * When direction is `ltr`, `borderEndWidth` is equivalent to `borderRightWidth`.
239
+ * When direction is `rtl`, `borderEndWidth` is equivalent to `borderLeftWidth`.
240
+ */
241
+ borderEndWidth: any;
242
+ /** `borderRightWidth` works like `border-right-width` in CSS.
243
+ * See https://developer.mozilla.org/en-US/docs/Web/CSS/border-right-width
244
+ * for more details.
245
+ */
246
+ borderRightWidth: any;
247
+ /** `borderBottomWidth` works like `border-bottom-width` in CSS.
248
+ * See https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-width
249
+ * for more details.
250
+ */
251
+ borderBottomWidth: any;
252
+ /** `borderLeftWidth` works like `border-left-width` in CSS.
253
+ * See https://developer.mozilla.org/en-US/docs/Web/CSS/border-left-width
254
+ * for more details.
255
+ */
256
+ borderLeftWidth: any;
257
+ /** `position` in React Native is similar to regular CSS, but
258
+ * everything is set to `relative` by default, so `absolute`
259
+ * positioning is always just relative to the parent.
260
+ *
261
+ * If you want to position a child using specific numbers of logical
262
+ * pixels relative to its parent, set the child to have `absolute`
263
+ * position.
264
+ *
265
+ * If you want to position a child relative to something
266
+ * that is not its parent, just don't use styles for that. Use the
267
+ * component tree.
268
+ *
269
+ * See https://github.com/facebook/yoga
270
+ * for more details on how `position` differs between React Native
271
+ * and CSS.
272
+ */
273
+ position: any;
274
+ /** `flexDirection` controls which directions children of a container go.
275
+ * `row` goes left to right, `column` goes top to bottom, and you may
276
+ * be able to guess what the other two do. It works like `flex-direction`
277
+ * in CSS, except the default is `column`.
278
+ * See https://developer.mozilla.org/en-US/docs/Web/CSS/flex-direction
279
+ * for more details.
280
+ */
281
+ flexDirection: any;
282
+ /** `flexWrap` controls whether children can wrap around after they
283
+ * hit the end of a flex container.
284
+ * It works like `flex-wrap` in CSS (default: nowrap).
285
+ * See https://developer.mozilla.org/en-US/docs/Web/CSS/flex-wrap
286
+ * for more details.
287
+ */
288
+ flexWrap: any;
289
+ /** `justifyContent` aligns children in the main direction.
290
+ * For example, if children are flowing vertically, `justifyContent`
291
+ * controls how they align vertically.
292
+ * It works like `justify-content` in CSS (default: flex-start).
293
+ * See https://developer.mozilla.org/en-US/docs/Web/CSS/justify-content
294
+ * for more details.
295
+ */
296
+ justifyContent: any;
297
+ /** `alignItems` aligns children in the cross direction.
298
+ * For example, if children are flowing vertically, `alignItems`
299
+ * controls how they align horizontally.
300
+ * It works like `align-items` in CSS (default: stretch).
301
+ * See https://developer.mozilla.org/en-US/docs/Web/CSS/align-items
302
+ * for more details.
303
+ */
304
+ alignItems: any;
305
+ /** `alignSelf` controls how a child aligns in the cross direction,
306
+ * overriding the `alignItems` of the parent. It works like `align-self`
307
+ * in CSS (default: auto).
308
+ * See https://developer.mozilla.org/en-US/docs/Web/CSS/align-self
309
+ * for more details.
310
+ */
311
+ alignSelf: any;
312
+ /** `alignContent` controls how rows align in the cross direction,
313
+ * overriding the `alignContent` of the parent.
314
+ * See https://developer.mozilla.org/en-US/docs/Web/CSS/align-content
315
+ * for more details.
316
+ */
317
+ alignContent: any;
318
+ /** `overflow` controls how children are measured and displayed.
319
+ * `overflow: hidden` causes views to be clipped while `overflow: scroll`
320
+ * causes views to be measured independently of their parents main axis.
321
+ * It works like `overflow` in CSS (default: visible).
322
+ * See https://developer.mozilla.org/en/docs/Web/CSS/overflow
323
+ * for more details.
324
+ * `overflow: visible` only works on iOS. On Android, all views will clip
325
+ * their children.
326
+ */
327
+ overflow: any;
328
+ /** In React Native `flex` does not work the same way that it does in CSS.
329
+ * `flex` is a number rather than a string, and it works
330
+ * according to the `Yoga` library
331
+ * at https://github.com/facebook/yoga
332
+ *
333
+ * When `flex` is a positive number, it makes the component flexible
334
+ * and it will be sized proportional to its flex value. So a
335
+ * component with `flex` set to 2 will take twice the space as a
336
+ * component with `flex` set to 1.
337
+ *
338
+ * When `flex` is 0, the component is sized according to `width`
339
+ * and `height` and it is inflexible.
340
+ *
341
+ * When `flex` is -1, the component is normally sized according
342
+ * `width` and `height`. However, if there's not enough space,
343
+ * the component will shrink to its `minWidth` and `minHeight`.
344
+ *
345
+ * flexGrow, flexShrink, and flexBasis work the same as in CSS.
346
+ */
347
+ flex: any;
348
+ flexGrow: any;
349
+ flexShrink: any;
350
+ flexBasis: any;
351
+ /**
352
+ * Aspect ratio control the size of the undefined dimension of a node. Aspect ratio is a
353
+ * non-standard property only available in react native and not CSS.
354
+ *
355
+ * - On a node with a set width/height aspect ratio control the size of the unset dimension
356
+ * - On a node with a set flex basis aspect ratio controls the size of the node in the cross axis
357
+ * if unset
358
+ * - On a node with a measure function aspect ratio works as though the measure function measures
359
+ * the flex basis
360
+ * - On a node with flex grow/shrink aspect ratio controls the size of the node in the cross axis
361
+ * if unset
362
+ * - Aspect ratio takes min/max dimensions into account
363
+ */
364
+ aspectRatio: any;
365
+ /** `zIndex` controls which components display on top of others.
366
+ * Normally, you don't use `zIndex`. Components render according to
367
+ * their order in the document tree, so later components draw over
368
+ * earlier ones. `zIndex` may be useful if you have animations or custom
369
+ * modal interfaces where you don't want this behavior.
370
+ *
371
+ * It works like the CSS `z-index` property - components with a larger
372
+ * `zIndex` will render on top. Think of the z-direction like it's
373
+ * pointing from the phone into your eyeball.
374
+ * See https://developer.mozilla.org/en-US/docs/Web/CSS/z-index for
375
+ * more details.
376
+ */
377
+ zIndex: any;
378
+ /** `direction` specifies the directional flow of the user interface.
379
+ * The default is `inherit`, except for root node which will have
380
+ * value based on the current locale.
381
+ * See https://facebook.github.io/yoga/docs/rtl/
382
+ * for more details.
383
+ * @platform ios
384
+ */
385
+ direction: any;
386
+ /**
387
+ * In React Native, gap works the same way it does in CSS.
388
+ * If there are two or more children in a container, they will be separated from each other
389
+ * by the value of the gap - but the children will not be separated from the edges of their parent container.
390
+ * For horizontal gaps, use columnGap, for vertical gaps, use rowGap, and to apply both at the same time, it's gap.
391
+ * When align-content or justify-content are set to space-between or space-around, the separation
392
+ * between children may be larger than the gap value.
393
+ * See https://developer.mozilla.org/en-US/docs/Web/CSS/gap for more details.
394
+ */
395
+ rowGap: any;
396
+ columnGap: any;
397
+ gap: any;
398
+ };
399
+ export default LayoutPropTypes;