@stylexjs/babel-plugin 0.11.1 → 0.13.0
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.
- package/lib/index.d.ts +2 -1
- package/lib/index.js +3797 -2229
- package/lib/index.js.flow +11 -1
- package/lib/shared/common-types.d.ts +57 -0
- package/lib/shared/common-types.js.flow +71 -0
- package/lib/shared/hash.d.ts +12 -0
- package/lib/shared/hash.js.flow +12 -0
- package/lib/shared/index.d.ts +57 -0
- package/lib/shared/index.js.flow +66 -0
- package/lib/shared/messages.d.ts +35 -0
- package/lib/shared/messages.js.flow +40 -0
- package/lib/shared/physical-rtl/generate-ltr.d.ts +13 -0
- package/lib/shared/physical-rtl/generate-ltr.js.flow +12 -0
- package/lib/shared/physical-rtl/generate-rtl.d.ts +13 -0
- package/lib/shared/physical-rtl/generate-rtl.js.flow +12 -0
- package/lib/shared/preprocess-rules/PreRule.d.ts +51 -0
- package/lib/shared/preprocess-rules/PreRule.js.flow +63 -0
- package/lib/shared/preprocess-rules/application-order.d.ts +183 -0
- package/lib/shared/preprocess-rules/application-order.js.flow +134 -0
- package/lib/shared/preprocess-rules/basic-validation.d.ts +13 -0
- package/lib/shared/preprocess-rules/basic-validation.js.flow +13 -0
- package/lib/shared/preprocess-rules/flatten-raw-style-obj.d.ts +20 -0
- package/lib/shared/preprocess-rules/flatten-raw-style-obj.js.flow +23 -0
- package/lib/shared/preprocess-rules/index.d.ts +18 -0
- package/lib/shared/preprocess-rules/index.js.flow +22 -0
- package/lib/shared/preprocess-rules/legacy-expand-shorthands.d.ts +165 -0
- package/lib/shared/preprocess-rules/legacy-expand-shorthands.js.flow +144 -0
- package/lib/shared/preprocess-rules/property-specificity.d.ts +78 -0
- package/lib/shared/preprocess-rules/property-specificity.js.flow +87 -0
- package/lib/shared/stylex-consts-utils.d.ts +11 -0
- package/lib/shared/stylex-consts-utils.js.flow +14 -0
- package/lib/shared/stylex-create-theme.d.ts +26 -0
- package/lib/shared/stylex-create-theme.js.flow +19 -0
- package/lib/shared/stylex-create.d.ts +27 -0
- package/lib/shared/stylex-create.js.flow +37 -0
- package/lib/shared/stylex-define-consts.d.ts +23 -0
- package/lib/shared/stylex-define-consts.js.flow +19 -0
- package/lib/shared/stylex-define-vars.d.ts +28 -0
- package/lib/shared/stylex-define-vars.js.flow +26 -0
- package/lib/shared/stylex-first-that-works.d.ts +13 -0
- package/lib/shared/stylex-first-that-works.js.flow +12 -0
- package/lib/shared/stylex-keyframes.d.ts +17 -0
- package/lib/shared/stylex-keyframes.js.flow +20 -0
- package/lib/shared/stylex-position-try.d.ts +15 -0
- package/lib/shared/stylex-position-try.js.flow +18 -0
- package/lib/shared/stylex-vars-utils.d.ts +27 -0
- package/lib/shared/stylex-vars-utils.js.flow +31 -0
- package/lib/shared/types/index.d.ts +240 -0
- package/lib/shared/types/index.js.flow +280 -0
- package/lib/shared/utils/Rule.d.ts +58 -0
- package/lib/shared/utils/Rule.js.flow +64 -0
- package/lib/shared/utils/convert-to-className.d.ts +21 -0
- package/lib/shared/utils/convert-to-className.js.flow +29 -0
- package/lib/shared/utils/dashify.d.ts +11 -0
- package/lib/shared/utils/dashify.js.flow +10 -0
- package/lib/shared/utils/default-options.d.ts +11 -0
- package/lib/shared/utils/default-options.js.flow +12 -0
- package/lib/shared/utils/file-based-identifier.d.ts +15 -0
- package/lib/shared/utils/file-based-identifier.js.flow +14 -0
- package/lib/shared/utils/generate-css-rule.d.ts +18 -0
- package/lib/shared/utils/generate-css-rule.js.flow +19 -0
- package/lib/shared/utils/normalize-value.d.ts +16 -0
- package/lib/shared/utils/normalize-value.js.flow +16 -0
- package/lib/shared/utils/normalizers/convert-camel-case-values.d.ts +14 -0
- package/lib/shared/utils/normalizers/convert-camel-case-values.js.flow +13 -0
- package/lib/shared/utils/normalizers/detect-unclosed-fns.d.ts +17 -0
- package/lib/shared/utils/normalizers/detect-unclosed-fns.js.flow +16 -0
- package/lib/shared/utils/normalizers/font-size-px-to-rem.d.ts +19 -0
- package/lib/shared/utils/normalizers/font-size-px-to-rem.js.flow +18 -0
- package/lib/shared/utils/normalizers/leading-zero.d.ts +17 -0
- package/lib/shared/utils/normalizers/leading-zero.js.flow +16 -0
- package/lib/shared/utils/normalizers/quotes.d.ts +18 -0
- package/lib/shared/utils/normalizers/quotes.js.flow +17 -0
- package/lib/shared/utils/normalizers/timings.d.ts +18 -0
- package/lib/shared/utils/normalizers/timings.js.flow +17 -0
- package/lib/shared/utils/normalizers/whitespace.d.ts +19 -0
- package/lib/shared/utils/normalizers/whitespace.js.flow +18 -0
- package/lib/shared/utils/normalizers/zero-dimensions.d.ts +19 -0
- package/lib/shared/utils/normalizers/zero-dimensions.js.flow +18 -0
- package/lib/shared/utils/object-utils.d.ts +66 -0
- package/lib/shared/utils/object-utils.js.flow +78 -0
- package/lib/shared/utils/property-priorities.d.ts +17 -0
- package/lib/shared/utils/property-priorities.js.flow +78 -0
- package/lib/shared/utils/rule-utils.d.ts +15 -0
- package/lib/shared/utils/rule-utils.js.flow +16 -0
- package/lib/shared/utils/split-css-value.d.ts +14 -0
- package/lib/shared/utils/split-css-value.js.flow +15 -0
- package/lib/shared/utils/transform-value.d.ts +22 -0
- package/lib/shared/utils/transform-value.js.flow +25 -0
- package/lib/shared/validate.d.ts +12 -0
- package/lib/shared/validate.js.flow +12 -0
- package/lib/utils/add-sourcemap-data.d.ts +1 -1
- package/lib/utils/add-sourcemap-data.js.flow +1 -1
- package/lib/utils/dev-classname.d.ts +1 -1
- package/lib/utils/dev-classname.js.flow +2 -1
- package/lib/utils/evaluate-path.d.ts +19 -0
- package/lib/utils/evaluate-path.js.flow +26 -0
- package/lib/utils/js-to-ast.d.ts +1 -1
- package/lib/utils/js-to-ast.js.flow +1 -1
- package/lib/utils/state-manager.d.ts +36 -6
- package/lib/utils/state-manager.js.flow +35 -5
- package/lib/visitors/imports.d.ts +1 -1
- package/lib/visitors/imports.js.flow +2 -1
- package/lib/visitors/{stylex-create/parse-stylex-create-arg.d.ts → parse-stylex-create-arg.d.ts} +2 -2
- package/lib/visitors/{stylex-create/parse-stylex-create-arg.js.flow → parse-stylex-create-arg.js.flow} +5 -4
- package/lib/visitors/stylex-create-theme.d.ts +1 -1
- package/lib/visitors/stylex-create-theme.js.flow +1 -1
- package/lib/visitors/{stylex-create/index.d.ts → stylex-create.d.ts} +2 -2
- package/lib/visitors/{stylex-create/index.js.flow → stylex-create.js.flow} +3 -3
- package/lib/visitors/{stylex-attrs.d.ts → stylex-define-consts.d.ts} +3 -7
- package/lib/visitors/stylex-define-consts.js.flow +25 -0
- package/lib/visitors/stylex-define-vars.d.ts +1 -1
- package/lib/visitors/stylex-define-vars.js.flow +1 -1
- package/lib/visitors/stylex-keyframes.d.ts +1 -1
- package/lib/visitors/stylex-keyframes.js.flow +1 -1
- package/lib/visitors/stylex-position-try.d.ts +17 -0
- package/lib/visitors/stylex-position-try.js.flow +22 -0
- package/package.json +11 -12
- package/lib/babel-path-utils.d.ts +0 -1100
- package/lib/babel-path-utils.js.flow +0 -1108
- package/lib/visitors/stylex-attrs.js.flow +0 -25
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
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
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import type { TStyleValue } from '../common-types';
|
|
11
|
+
/**
|
|
12
|
+
* Shorthand properties:
|
|
13
|
+
* - [x] all - Should be banned
|
|
14
|
+
* - [x] animation
|
|
15
|
+
* - [x] background
|
|
16
|
+
* - [x] border
|
|
17
|
+
* - [x] border-block-end
|
|
18
|
+
* - [x] border-block-start
|
|
19
|
+
* - [x] border-bottom
|
|
20
|
+
* - [x] border-color
|
|
21
|
+
* - [x] border-image
|
|
22
|
+
* - [x] border-inline-end
|
|
23
|
+
* - [x] border-inline-start
|
|
24
|
+
* - [x] border-left
|
|
25
|
+
* - [x] border-radius
|
|
26
|
+
* - [x] border-right
|
|
27
|
+
* - [x] border-style
|
|
28
|
+
* - [x] border-top
|
|
29
|
+
* - [x] border-width
|
|
30
|
+
* - [x] column-rule
|
|
31
|
+
* - [x] columns
|
|
32
|
+
* - [x] container
|
|
33
|
+
* - [x] flex
|
|
34
|
+
* - [x] flex-flow
|
|
35
|
+
* - [x] font
|
|
36
|
+
* - [x] gap
|
|
37
|
+
* - [x] grid
|
|
38
|
+
* - [x] grid-area
|
|
39
|
+
* - [x] grid-column
|
|
40
|
+
* - [x] grid-row
|
|
41
|
+
* - [x] grid-template
|
|
42
|
+
* - [x] inset
|
|
43
|
+
* - [x] inset-block
|
|
44
|
+
* - [x] inset-inline
|
|
45
|
+
* - [x] list-style
|
|
46
|
+
* - [x] margin
|
|
47
|
+
* - [x] mask
|
|
48
|
+
* - [x] offset
|
|
49
|
+
* - [x] outline
|
|
50
|
+
* - [x] overflow
|
|
51
|
+
* - [x] padding
|
|
52
|
+
* - [x] place-content
|
|
53
|
+
* - [x] place-items
|
|
54
|
+
* - [x] place-self
|
|
55
|
+
* - [x] scroll-margin
|
|
56
|
+
* - [x] scroll-padding
|
|
57
|
+
* - [x] text-decoration
|
|
58
|
+
* - [x] text-emphasis
|
|
59
|
+
* - [x] transition
|
|
60
|
+
*/
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Shorthand properties:
|
|
64
|
+
* - [x] all - Should be banned
|
|
65
|
+
* - [x] animation
|
|
66
|
+
* - [x] background
|
|
67
|
+
* - [x] border
|
|
68
|
+
* - [x] border-block-end
|
|
69
|
+
* - [x] border-block-start
|
|
70
|
+
* - [x] border-bottom
|
|
71
|
+
* - [x] border-color
|
|
72
|
+
* - [x] border-image
|
|
73
|
+
* - [x] border-inline-end
|
|
74
|
+
* - [x] border-inline-start
|
|
75
|
+
* - [x] border-left
|
|
76
|
+
* - [x] border-radius
|
|
77
|
+
* - [x] border-right
|
|
78
|
+
* - [x] border-style
|
|
79
|
+
* - [x] border-top
|
|
80
|
+
* - [x] border-width
|
|
81
|
+
* - [x] column-rule
|
|
82
|
+
* - [x] columns
|
|
83
|
+
* - [x] container
|
|
84
|
+
* - [x] flex
|
|
85
|
+
* - [x] flex-flow
|
|
86
|
+
* - [x] font
|
|
87
|
+
* - [x] gap
|
|
88
|
+
* - [x] grid
|
|
89
|
+
* - [x] grid-area
|
|
90
|
+
* - [x] grid-column
|
|
91
|
+
* - [x] grid-row
|
|
92
|
+
* - [x] grid-template
|
|
93
|
+
* - [x] inset
|
|
94
|
+
* - [x] inset-block
|
|
95
|
+
* - [x] inset-inline
|
|
96
|
+
* - [x] list-style
|
|
97
|
+
* - [x] margin
|
|
98
|
+
* - [x] mask
|
|
99
|
+
* - [x] offset
|
|
100
|
+
* - [x] outline
|
|
101
|
+
* - [x] overflow
|
|
102
|
+
* - [x] padding
|
|
103
|
+
* - [x] place-content
|
|
104
|
+
* - [x] place-items
|
|
105
|
+
* - [x] place-self
|
|
106
|
+
* - [x] scroll-margin
|
|
107
|
+
* - [x] scroll-padding
|
|
108
|
+
* - [x] text-decoration
|
|
109
|
+
* - [x] text-emphasis
|
|
110
|
+
* - [x] transition
|
|
111
|
+
*/
|
|
112
|
+
|
|
113
|
+
type TReturn = ReadonlyArray<[string, TStyleValue]>;
|
|
114
|
+
declare const shorthands: Readonly<{
|
|
115
|
+
[key: string]: ($$PARAM_0$$: TStyleValue) => TReturn;
|
|
116
|
+
}>;
|
|
117
|
+
declare const aliases: {
|
|
118
|
+
borderHorizontal: any;
|
|
119
|
+
borderVertical: any;
|
|
120
|
+
borderBlockStart: any;
|
|
121
|
+
borderEnd: any;
|
|
122
|
+
borderBlockEnd: any;
|
|
123
|
+
borderStart: any;
|
|
124
|
+
blockSize: (val: TStyleValue) => TReturn;
|
|
125
|
+
inlineSize: (val: TStyleValue) => TReturn;
|
|
126
|
+
minBlockSize: (val: TStyleValue) => TReturn;
|
|
127
|
+
minInlineSize: (val: TStyleValue) => TReturn;
|
|
128
|
+
maxBlockSize: (val: TStyleValue) => TReturn;
|
|
129
|
+
maxInlineSize: (val: TStyleValue) => TReturn;
|
|
130
|
+
borderHorizontalWidth: any;
|
|
131
|
+
borderHorizontalStyle: any;
|
|
132
|
+
borderHorizontalColor: any;
|
|
133
|
+
borderVerticalWidth: any;
|
|
134
|
+
borderVerticalStyle: any;
|
|
135
|
+
borderVerticalColor: any;
|
|
136
|
+
borderBlockStartColor: (value: TStyleValue) => TReturn;
|
|
137
|
+
borderBlockEndColor: (value: TStyleValue) => TReturn;
|
|
138
|
+
borderBlockStartStyle: (value: TStyleValue) => TReturn;
|
|
139
|
+
borderBlockEndStyle: (value: TStyleValue) => TReturn;
|
|
140
|
+
borderBlockStartWidth: (value: TStyleValue) => TReturn;
|
|
141
|
+
borderBlockEndWidth: (value: TStyleValue) => TReturn;
|
|
142
|
+
borderStartColor: any;
|
|
143
|
+
borderEndColor: any;
|
|
144
|
+
borderStartStyle: any;
|
|
145
|
+
borderEndStyle: any;
|
|
146
|
+
borderStartWidth: any;
|
|
147
|
+
borderEndWidth: any;
|
|
148
|
+
borderTopStartRadius: (value: TStyleValue) => TReturn;
|
|
149
|
+
borderTopEndRadius: (value: TStyleValue) => TReturn;
|
|
150
|
+
borderBottomStartRadius: (value: TStyleValue) => TReturn;
|
|
151
|
+
borderBottomEndRadius: (value: TStyleValue) => TReturn;
|
|
152
|
+
containIntrinsicBlockSize: (value: TStyleValue) => TReturn;
|
|
153
|
+
containIntrinsicInlineSize: (value: TStyleValue) => TReturn;
|
|
154
|
+
gridGap: any;
|
|
155
|
+
gridRowGap: (value: TStyleValue) => TReturn;
|
|
156
|
+
gridColumnGap: (value: TStyleValue) => TReturn;
|
|
157
|
+
marginBlockStart: (value: TStyleValue) => TReturn;
|
|
158
|
+
marginBlockEnd: (value: TStyleValue) => TReturn;
|
|
159
|
+
marginStart: any;
|
|
160
|
+
marginEnd: any;
|
|
161
|
+
marginHorizontal: any;
|
|
162
|
+
marginVertical: any;
|
|
163
|
+
overflowBlock: (value: TStyleValue) => TReturn;
|
|
164
|
+
overflowInline: (value: TStyleValue) => TReturn;
|
|
165
|
+
paddingBlockStart: (rawValue: TStyleValue) => TReturn;
|
|
166
|
+
paddingBlockEnd: (rawValue: TStyleValue) => TReturn;
|
|
167
|
+
paddingStart: any;
|
|
168
|
+
paddingEnd: any;
|
|
169
|
+
paddingHorizontal: any;
|
|
170
|
+
paddingVertical: any;
|
|
171
|
+
scrollMarginBlockStart: (value: TStyleValue) => TReturn;
|
|
172
|
+
scrollMarginBlockEnd: (value: TStyleValue) => TReturn;
|
|
173
|
+
insetBlockStart: (value: TStyleValue) => TReturn;
|
|
174
|
+
insetBlockEnd: (value: TStyleValue) => TReturn;
|
|
175
|
+
start: any;
|
|
176
|
+
end: any;
|
|
177
|
+
};
|
|
178
|
+
declare const $$EXPORT_DEFAULT_DECLARATION$$: Readonly</**
|
|
179
|
+
* > 132 | ...typeof shorthands,
|
|
180
|
+
* | ^^^^^^^^^^^^^^^^^^^^ Unsupported feature: Translating "object types with complex spreads" is currently not supported.
|
|
181
|
+
**/
|
|
182
|
+
any>;
|
|
183
|
+
export default $$EXPORT_DEFAULT_DECLARATION$$;
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
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
|
+
* @flow strict
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import type { TStyleValue } from '../common-types';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Shorthand properties:
|
|
14
|
+
* - [x] all - Should be banned
|
|
15
|
+
* - [x] animation
|
|
16
|
+
* - [x] background
|
|
17
|
+
* - [x] border
|
|
18
|
+
* - [x] border-block-end
|
|
19
|
+
* - [x] border-block-start
|
|
20
|
+
* - [x] border-bottom
|
|
21
|
+
* - [x] border-color
|
|
22
|
+
* - [x] border-image
|
|
23
|
+
* - [x] border-inline-end
|
|
24
|
+
* - [x] border-inline-start
|
|
25
|
+
* - [x] border-left
|
|
26
|
+
* - [x] border-radius
|
|
27
|
+
* - [x] border-right
|
|
28
|
+
* - [x] border-style
|
|
29
|
+
* - [x] border-top
|
|
30
|
+
* - [x] border-width
|
|
31
|
+
* - [x] column-rule
|
|
32
|
+
* - [x] columns
|
|
33
|
+
* - [x] container
|
|
34
|
+
* - [x] flex
|
|
35
|
+
* - [x] flex-flow
|
|
36
|
+
* - [x] font
|
|
37
|
+
* - [x] gap
|
|
38
|
+
* - [x] grid
|
|
39
|
+
* - [x] grid-area
|
|
40
|
+
* - [x] grid-column
|
|
41
|
+
* - [x] grid-row
|
|
42
|
+
* - [x] grid-template
|
|
43
|
+
* - [x] inset
|
|
44
|
+
* - [x] inset-block
|
|
45
|
+
* - [x] inset-inline
|
|
46
|
+
* - [x] list-style
|
|
47
|
+
* - [x] margin
|
|
48
|
+
* - [x] mask
|
|
49
|
+
* - [x] offset
|
|
50
|
+
* - [x] outline
|
|
51
|
+
* - [x] overflow
|
|
52
|
+
* - [x] padding
|
|
53
|
+
* - [x] place-content
|
|
54
|
+
* - [x] place-items
|
|
55
|
+
* - [x] place-self
|
|
56
|
+
* - [x] scroll-margin
|
|
57
|
+
* - [x] scroll-padding
|
|
58
|
+
* - [x] text-decoration
|
|
59
|
+
* - [x] text-emphasis
|
|
60
|
+
* - [x] transition
|
|
61
|
+
*/
|
|
62
|
+
|
|
63
|
+
type TReturn = $ReadOnlyArray<[string, TStyleValue]>;
|
|
64
|
+
|
|
65
|
+
declare const shorthands: $ReadOnly<{
|
|
66
|
+
[key: string]: (TStyleValue) => TReturn,
|
|
67
|
+
}>;
|
|
68
|
+
|
|
69
|
+
declare const aliases: {
|
|
70
|
+
borderHorizontal: $FlowFixMe,
|
|
71
|
+
borderVertical: $FlowFixMe,
|
|
72
|
+
borderBlockStart: $FlowFixMe,
|
|
73
|
+
borderEnd: $FlowFixMe,
|
|
74
|
+
borderBlockEnd: $FlowFixMe,
|
|
75
|
+
borderStart: $FlowFixMe,
|
|
76
|
+
blockSize: (val: TStyleValue) => TReturn,
|
|
77
|
+
inlineSize: (val: TStyleValue) => TReturn,
|
|
78
|
+
minBlockSize: (val: TStyleValue) => TReturn,
|
|
79
|
+
minInlineSize: (val: TStyleValue) => TReturn,
|
|
80
|
+
maxBlockSize: (val: TStyleValue) => TReturn,
|
|
81
|
+
maxInlineSize: (val: TStyleValue) => TReturn,
|
|
82
|
+
borderHorizontalWidth: $FlowFixMe,
|
|
83
|
+
borderHorizontalStyle: $FlowFixMe,
|
|
84
|
+
borderHorizontalColor: $FlowFixMe,
|
|
85
|
+
borderVerticalWidth: $FlowFixMe,
|
|
86
|
+
borderVerticalStyle: $FlowFixMe,
|
|
87
|
+
borderVerticalColor: $FlowFixMe,
|
|
88
|
+
borderBlockStartColor: (value: TStyleValue) => TReturn,
|
|
89
|
+
borderBlockEndColor: (value: TStyleValue) => TReturn,
|
|
90
|
+
borderBlockStartStyle: (value: TStyleValue) => TReturn,
|
|
91
|
+
borderBlockEndStyle: (value: TStyleValue) => TReturn,
|
|
92
|
+
borderBlockStartWidth: (value: TStyleValue) => TReturn,
|
|
93
|
+
borderBlockEndWidth: (value: TStyleValue) => TReturn,
|
|
94
|
+
borderStartColor: $FlowFixMe,
|
|
95
|
+
borderEndColor: $FlowFixMe,
|
|
96
|
+
borderStartStyle: $FlowFixMe,
|
|
97
|
+
borderEndStyle: $FlowFixMe,
|
|
98
|
+
borderStartWidth: $FlowFixMe,
|
|
99
|
+
borderEndWidth: $FlowFixMe,
|
|
100
|
+
borderTopStartRadius: (value: TStyleValue) => TReturn,
|
|
101
|
+
borderTopEndRadius: (value: TStyleValue) => TReturn,
|
|
102
|
+
borderBottomStartRadius: (value: TStyleValue) => TReturn,
|
|
103
|
+
borderBottomEndRadius: (value: TStyleValue) => TReturn,
|
|
104
|
+
containIntrinsicBlockSize: (value: TStyleValue) => TReturn,
|
|
105
|
+
containIntrinsicInlineSize: (value: TStyleValue) => TReturn,
|
|
106
|
+
gridGap: $FlowFixMe,
|
|
107
|
+
gridRowGap: (value: TStyleValue) => TReturn,
|
|
108
|
+
gridColumnGap: (value: TStyleValue) => TReturn,
|
|
109
|
+
marginBlockStart: (value: TStyleValue) => TReturn,
|
|
110
|
+
marginBlockEnd: (value: TStyleValue) => TReturn,
|
|
111
|
+
marginStart: $FlowFixMe,
|
|
112
|
+
marginEnd: $FlowFixMe,
|
|
113
|
+
marginHorizontal: $FlowFixMe,
|
|
114
|
+
marginVertical: $FlowFixMe,
|
|
115
|
+
overflowBlock: (value: TStyleValue) => TReturn,
|
|
116
|
+
overflowInline: (value: TStyleValue) => TReturn,
|
|
117
|
+
paddingBlockStart: (rawValue: TStyleValue) => TReturn,
|
|
118
|
+
paddingBlockEnd: (rawValue: TStyleValue) => TReturn,
|
|
119
|
+
paddingStart: $FlowFixMe,
|
|
120
|
+
paddingEnd: $FlowFixMe,
|
|
121
|
+
paddingHorizontal: $FlowFixMe,
|
|
122
|
+
paddingVertical: $FlowFixMe,
|
|
123
|
+
scrollMarginBlockStart: (value: TStyleValue) => TReturn,
|
|
124
|
+
scrollMarginBlockEnd: (value: TStyleValue) => TReturn,
|
|
125
|
+
insetBlockStart: (value: TStyleValue) => TReturn,
|
|
126
|
+
insetBlockEnd: (value: TStyleValue) => TReturn,
|
|
127
|
+
start: $FlowFixMe,
|
|
128
|
+
end: $FlowFixMe,
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
declare export default $ReadOnly<{
|
|
132
|
+
...typeof shorthands,
|
|
133
|
+
...typeof aliases,
|
|
134
|
+
}>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
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
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
export declare function validateNamespace(
|
|
11
|
+
namespace: unknown,
|
|
12
|
+
conditions: ReadonlyArray<string>,
|
|
13
|
+
): void;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
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
|
+
* @flow strict
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
declare export function validateNamespace(
|
|
11
|
+
namespace: mixed,
|
|
12
|
+
conditions: $ReadOnlyArray<string>,
|
|
13
|
+
): void;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
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
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import type { RawStyles, StyleXOptions } from '../common-types';
|
|
11
|
+
import { type AnyPreRule, type IPreRule } from './PreRule';
|
|
12
|
+
export declare function flattenRawStyleObject(
|
|
13
|
+
style: RawStyles,
|
|
14
|
+
options: StyleXOptions,
|
|
15
|
+
): ReadonlyArray<Readonly<[string, IPreRule]>>;
|
|
16
|
+
export declare function _flattenRawStyleObject(
|
|
17
|
+
style: RawStyles,
|
|
18
|
+
keyPath: ReadonlyArray<string>,
|
|
19
|
+
options: StyleXOptions,
|
|
20
|
+
): Array<Readonly<[string, AnyPreRule]>>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
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
|
+
* @flow strict
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import type { RawStyles, StyleXOptions } from '../common-types';
|
|
11
|
+
|
|
12
|
+
import { type AnyPreRule, type IPreRule } from './PreRule';
|
|
13
|
+
|
|
14
|
+
declare export function flattenRawStyleObject(
|
|
15
|
+
style: RawStyles,
|
|
16
|
+
options: StyleXOptions,
|
|
17
|
+
): $ReadOnlyArray<$ReadOnly<[string, IPreRule]>>;
|
|
18
|
+
|
|
19
|
+
declare export function _flattenRawStyleObject(
|
|
20
|
+
style: RawStyles,
|
|
21
|
+
keyPath: $ReadOnlyArray<string>,
|
|
22
|
+
options: StyleXOptions,
|
|
23
|
+
): Array<$ReadOnly<[string, AnyPreRule]>>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
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
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import type { StyleXOptions, TStyleValue } from '../common-types';
|
|
11
|
+
export declare function getExpandedKeys(
|
|
12
|
+
options: StyleXOptions,
|
|
13
|
+
): ReadonlyArray<string>;
|
|
14
|
+
declare function flatMapExpandedShorthands(
|
|
15
|
+
objEntry: Readonly<[string, TStyleValue]>,
|
|
16
|
+
options: Readonly<{ styleResolution: StyleXOptions['styleResolution'] }>,
|
|
17
|
+
): ReadonlyArray<[string, TStyleValue]>;
|
|
18
|
+
export default flatMapExpandedShorthands;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
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
|
+
* @flow strict
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import type { StyleXOptions, TStyleValue } from '../common-types';
|
|
11
|
+
|
|
12
|
+
declare export function getExpandedKeys(
|
|
13
|
+
options: StyleXOptions,
|
|
14
|
+
): $ReadOnlyArray<string>;
|
|
15
|
+
|
|
16
|
+
declare export default function flatMapExpandedShorthands(
|
|
17
|
+
objEntry: $ReadOnly<[string, TStyleValue]>,
|
|
18
|
+
options: $ReadOnly<{
|
|
19
|
+
styleResolution: StyleXOptions['styleResolution'],
|
|
20
|
+
...
|
|
21
|
+
}>,
|
|
22
|
+
): $ReadOnlyArray<[string, TStyleValue]>;
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
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
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import type { TStyleValue } from '../common-types';
|
|
11
|
+
/**
|
|
12
|
+
* Shorthand properties:
|
|
13
|
+
* - [x] all - Should be banned
|
|
14
|
+
* - [ ] animation
|
|
15
|
+
* - [ ] background
|
|
16
|
+
* - [-] border
|
|
17
|
+
* - [x] border-block-end
|
|
18
|
+
* - [x] border-block-start
|
|
19
|
+
* - [ ] border-bottom
|
|
20
|
+
* - [x] border-color
|
|
21
|
+
* - [x] border-image
|
|
22
|
+
* - [x] border-inline-end
|
|
23
|
+
* - [x] border-inline-start
|
|
24
|
+
* - [ ] border-left
|
|
25
|
+
* - [x] border-radius
|
|
26
|
+
* - [ ] border-right
|
|
27
|
+
* - [x] border-style
|
|
28
|
+
* - [ ] border-top
|
|
29
|
+
* - [x] border-width
|
|
30
|
+
* - [ ] column-rule
|
|
31
|
+
* - [ ] columns
|
|
32
|
+
* - [ ] flex
|
|
33
|
+
* - [ ] flex-flow
|
|
34
|
+
* - [ ] font
|
|
35
|
+
* - [ ] gap
|
|
36
|
+
* - [ ] grid
|
|
37
|
+
* - [ ] grid-area
|
|
38
|
+
* - [ ] grid-column
|
|
39
|
+
* - [ ] grid-row
|
|
40
|
+
* - [ ] grid-template
|
|
41
|
+
* - [ ] list-style
|
|
42
|
+
* - [x] margin
|
|
43
|
+
* - [ ] mask
|
|
44
|
+
* - [ ] offset
|
|
45
|
+
* - [ ] outline
|
|
46
|
+
* - [x] overflow
|
|
47
|
+
* - [x] padding
|
|
48
|
+
* - [ ] place-content
|
|
49
|
+
* - [ ] place-items
|
|
50
|
+
* - [ ] place-self
|
|
51
|
+
* - [ ] scroll-margin
|
|
52
|
+
* - [ ] scroll-padding
|
|
53
|
+
* - [ ] text-decoration
|
|
54
|
+
* - [ ] text-emphasis
|
|
55
|
+
* - [ ] transition
|
|
56
|
+
*/
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Shorthand properties:
|
|
60
|
+
* - [x] all - Should be banned
|
|
61
|
+
* - [ ] animation
|
|
62
|
+
* - [ ] background
|
|
63
|
+
* - [-] border
|
|
64
|
+
* - [x] border-block-end
|
|
65
|
+
* - [x] border-block-start
|
|
66
|
+
* - [ ] border-bottom
|
|
67
|
+
* - [x] border-color
|
|
68
|
+
* - [x] border-image
|
|
69
|
+
* - [x] border-inline-end
|
|
70
|
+
* - [x] border-inline-start
|
|
71
|
+
* - [ ] border-left
|
|
72
|
+
* - [x] border-radius
|
|
73
|
+
* - [ ] border-right
|
|
74
|
+
* - [x] border-style
|
|
75
|
+
* - [ ] border-top
|
|
76
|
+
* - [x] border-width
|
|
77
|
+
* - [ ] column-rule
|
|
78
|
+
* - [ ] columns
|
|
79
|
+
* - [ ] flex
|
|
80
|
+
* - [ ] flex-flow
|
|
81
|
+
* - [ ] font
|
|
82
|
+
* - [ ] gap
|
|
83
|
+
* - [ ] grid
|
|
84
|
+
* - [ ] grid-area
|
|
85
|
+
* - [ ] grid-column
|
|
86
|
+
* - [ ] grid-row
|
|
87
|
+
* - [ ] grid-template
|
|
88
|
+
* - [ ] list-style
|
|
89
|
+
* - [x] margin
|
|
90
|
+
* - [ ] mask
|
|
91
|
+
* - [ ] offset
|
|
92
|
+
* - [ ] outline
|
|
93
|
+
* - [x] overflow
|
|
94
|
+
* - [x] padding
|
|
95
|
+
* - [ ] place-content
|
|
96
|
+
* - [ ] place-items
|
|
97
|
+
* - [ ] place-self
|
|
98
|
+
* - [ ] scroll-margin
|
|
99
|
+
* - [ ] scroll-padding
|
|
100
|
+
* - [ ] text-decoration
|
|
101
|
+
* - [ ] text-emphasis
|
|
102
|
+
* - [ ] transition
|
|
103
|
+
*/
|
|
104
|
+
|
|
105
|
+
type TReturn = ReadonlyArray<[string, TStyleValue]>;
|
|
106
|
+
declare const shorthands: Readonly<{
|
|
107
|
+
[key: string]: ($$PARAM_0$$: TStyleValue) => TReturn;
|
|
108
|
+
}>;
|
|
109
|
+
declare const aliases: {
|
|
110
|
+
insetBlockStart: (val: TStyleValue) => TReturn;
|
|
111
|
+
insetBlockEnd: (val: TStyleValue) => TReturn;
|
|
112
|
+
insetInlineStart: any;
|
|
113
|
+
insetInlineEnd: any;
|
|
114
|
+
blockSize: (val: TStyleValue) => TReturn;
|
|
115
|
+
inlineSize: (val: TStyleValue) => TReturn;
|
|
116
|
+
minBlockSize: (val: TStyleValue) => TReturn;
|
|
117
|
+
minInlineSize: (val: TStyleValue) => TReturn;
|
|
118
|
+
maxBlockSize: (val: TStyleValue) => TReturn;
|
|
119
|
+
maxInlineSize: (val: TStyleValue) => TReturn;
|
|
120
|
+
borderBlockWidth: any;
|
|
121
|
+
borderBlockStyle: any;
|
|
122
|
+
borderBlockColor: any;
|
|
123
|
+
borderBlockStartWidth: (val: TStyleValue) => TReturn;
|
|
124
|
+
borderBlockStartStyle: (val: TStyleValue) => TReturn;
|
|
125
|
+
borderBlockStartColor: (val: TStyleValue) => TReturn;
|
|
126
|
+
borderBlockEndWidth: (val: TStyleValue) => TReturn;
|
|
127
|
+
borderBlockEndStyle: (val: TStyleValue) => TReturn;
|
|
128
|
+
borderBlockEndColor: (val: TStyleValue) => TReturn;
|
|
129
|
+
borderInlineWidth: any;
|
|
130
|
+
borderInlineStyle: any;
|
|
131
|
+
borderInlineColor: any;
|
|
132
|
+
borderInlineStartWidth: (val: TStyleValue) => TReturn;
|
|
133
|
+
borderInlineStartStyle: (val: TStyleValue) => TReturn;
|
|
134
|
+
borderInlineStartColor: (val: TStyleValue) => TReturn;
|
|
135
|
+
borderInlineEndWidth: (val: TStyleValue) => TReturn;
|
|
136
|
+
borderInlineEndStyle: (val: TStyleValue) => TReturn;
|
|
137
|
+
borderInlineEndColor: (val: TStyleValue) => TReturn;
|
|
138
|
+
borderStartStartRadius: (val: TStyleValue) => TReturn;
|
|
139
|
+
borderStartEndRadius: (val: TStyleValue) => TReturn;
|
|
140
|
+
borderEndStartRadius: (val: TStyleValue) => TReturn;
|
|
141
|
+
borderEndEndRadius: (val: TStyleValue) => TReturn;
|
|
142
|
+
gridGap: any;
|
|
143
|
+
gridRowGap: (value: TStyleValue) => TReturn;
|
|
144
|
+
gridColumnGap: (value: TStyleValue) => TReturn;
|
|
145
|
+
marginBlock: any;
|
|
146
|
+
marginBlockStart: (val: TStyleValue) => TReturn;
|
|
147
|
+
marginBlockEnd: (val: TStyleValue) => TReturn;
|
|
148
|
+
marginInline: any;
|
|
149
|
+
marginInlineStart: (val: TStyleValue) => TReturn;
|
|
150
|
+
marginInlineEnd: (val: TStyleValue) => TReturn;
|
|
151
|
+
overflowBlock: (value: TStyleValue) => TReturn;
|
|
152
|
+
overflowInline: (value: TStyleValue) => TReturn;
|
|
153
|
+
paddingBlock: any;
|
|
154
|
+
paddingBlockStart: (val: TStyleValue) => TReturn;
|
|
155
|
+
paddingBlockEnd: (val: TStyleValue) => TReturn;
|
|
156
|
+
paddingInline: any;
|
|
157
|
+
paddingInlineStart: (val: TStyleValue) => TReturn;
|
|
158
|
+
paddingInlineEnd: (val: TStyleValue) => TReturn;
|
|
159
|
+
scrollMarginBlockStart: (value: TStyleValue) => TReturn;
|
|
160
|
+
scrollMarginBlockEnd: (value: TStyleValue) => TReturn;
|
|
161
|
+
};
|
|
162
|
+
declare const expansions: Omit<shorthands, keyof (aliases | {})> &
|
|
163
|
+
Omit<aliases, keyof ({})> & {};
|
|
164
|
+
declare const $$EXPORT_DEFAULT_DECLARATION$$: typeof expansions;
|
|
165
|
+
export default $$EXPORT_DEFAULT_DECLARATION$$;
|