@stylexjs/shared 0.2.0-beta.9 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (182) hide show
  1. package/lib/common-types.d.ts +50 -0
  2. package/lib/common-types.js.flow +65 -0
  3. package/lib/convert-to-className.d.ts +16 -0
  4. package/lib/convert-to-className.js +17 -26
  5. package/lib/convert-to-className.js.flow +23 -0
  6. package/lib/generate-css-rule.d.ts +17 -0
  7. package/lib/generate-css-rule.js +6 -17
  8. package/lib/generate-css-rule.js.flow +17 -0
  9. package/lib/hash.d.ts +11 -0
  10. package/lib/hash.js +3 -27
  11. package/lib/hash.js.flow +10 -0
  12. package/lib/index.d.ts +42 -85
  13. package/lib/index.js +19 -27
  14. package/lib/index.js.flow +57 -3
  15. package/lib/messages.d.ts +36 -0
  16. package/lib/messages.js +28 -53
  17. package/lib/messages.js.flow +39 -0
  18. package/lib/physical-rtl/generate-ltr.d.ts +11 -0
  19. package/lib/physical-rtl/generate-ltr.js +18 -46
  20. package/lib/physical-rtl/generate-ltr.js.flow +12 -0
  21. package/lib/physical-rtl/generate-rtl.d.ts +13 -0
  22. package/lib/physical-rtl/generate-rtl.js +18 -50
  23. package/lib/physical-rtl/generate-rtl.js.flow +12 -0
  24. package/lib/preprocess-rules/PreRule.d.ts +52 -0
  25. package/lib/preprocess-rules/PreRule.js +87 -0
  26. package/lib/preprocess-rules/PreRule.js.flow +64 -0
  27. package/lib/preprocess-rules/application-order.d.ts +290 -0
  28. package/lib/preprocess-rules/application-order.js +59 -125
  29. package/lib/preprocess-rules/application-order.js.flow +241 -0
  30. package/lib/preprocess-rules/basic-validation.d.ts +13 -0
  31. package/lib/preprocess-rules/basic-validation.js +83 -0
  32. package/lib/preprocess-rules/basic-validation.js.flow +13 -0
  33. package/lib/preprocess-rules/flatten-raw-style-obj.d.ts +25 -0
  34. package/lib/preprocess-rules/flatten-raw-style-obj.js +120 -0
  35. package/lib/preprocess-rules/flatten-raw-style-obj.js.flow +27 -0
  36. package/lib/preprocess-rules/index.d.ts +18 -0
  37. package/lib/preprocess-rules/index.js +0 -9
  38. package/lib/preprocess-rules/index.js.flow +19 -0
  39. package/lib/preprocess-rules/legacy-expand-shorthands.d.ts +200 -0
  40. package/lib/preprocess-rules/legacy-expand-shorthands.js +90 -123
  41. package/lib/preprocess-rules/legacy-expand-shorthands.js.flow +179 -0
  42. package/lib/preprocess-rules/property-specificity.d.ts +89 -0
  43. package/lib/preprocess-rules/property-specificity.js +46 -74
  44. package/lib/preprocess-rules/property-specificity.js.flow +98 -0
  45. package/lib/properties/CSS Animations.json +445 -0
  46. package/lib/properties/CSS Backgrounds and Borders.json +1085 -0
  47. package/lib/properties/CSS Basic User Interface.json +365 -0
  48. package/lib/properties/CSS Box Alignment.json +245 -0
  49. package/lib/properties/CSS Box Model.json +501 -0
  50. package/lib/properties/CSS Color.json +100 -0
  51. package/lib/properties/CSS Columns.json +185 -0
  52. package/lib/properties/CSS Containment.json +203 -0
  53. package/lib/properties/CSS Counter Styles.json +56 -0
  54. package/lib/properties/CSS Display.json +20 -0
  55. package/lib/properties/CSS Flexible Box Layout.json +167 -0
  56. package/lib/properties/CSS Fonts.json +684 -0
  57. package/lib/properties/CSS Fragmentation.json +110 -0
  58. package/lib/properties/CSS Generated Content.json +38 -0
  59. package/lib/properties/CSS Grid Layout.json +500 -0
  60. package/lib/properties/CSS Images.json +91 -0
  61. package/lib/properties/CSS Inline.json +38 -0
  62. package/lib/properties/CSS Lists and Counters.json +86 -0
  63. package/lib/properties/CSS Logical Properties.json +1086 -0
  64. package/lib/properties/CSS Masking.json +399 -0
  65. package/lib/properties/CSS Miscellaneous.json +38 -0
  66. package/lib/properties/CSS Motion Path.json +132 -0
  67. package/lib/properties/CSS Overflow.json +216 -0
  68. package/lib/properties/CSS Pages.json +83 -0
  69. package/lib/properties/CSS Positioning.json +166 -0
  70. package/lib/properties/CSS Ruby.json +55 -0
  71. package/lib/properties/CSS Scroll Anchoring.json +19 -0
  72. package/lib/properties/CSS Scroll Snap.json +604 -0
  73. package/lib/properties/CSS Scrollbars.json +38 -0
  74. package/lib/properties/CSS Shapes.json +56 -0
  75. package/lib/properties/CSS Speech.json +20 -0
  76. package/lib/properties/CSS Table.json +115 -0
  77. package/lib/properties/CSS Text Decoration.json +312 -0
  78. package/lib/properties/CSS Text.json +415 -0
  79. package/lib/properties/CSS Transforms.json +188 -0
  80. package/lib/properties/CSS Transitions.json +122 -0
  81. package/lib/properties/CSS Variables.json +20 -0
  82. package/lib/properties/CSS View Transitions.json +20 -0
  83. package/lib/properties/CSS Will Change.json +20 -0
  84. package/lib/properties/CSS Writing Modes.json +92 -0
  85. package/lib/properties/Compositing and Blending.json +62 -0
  86. package/lib/properties/Filter Effects.json +38 -0
  87. package/lib/properties/MathML.json +56 -0
  88. package/lib/properties/Microsoft Extensions.json +885 -0
  89. package/lib/properties/Mozilla Extensions.json +607 -0
  90. package/lib/properties/Pointer Events.json +20 -0
  91. package/lib/properties/WebKit Extensions.json +707 -0
  92. package/lib/properties.json +10122 -0
  93. package/lib/stylex-create-theme.d.ts +26 -0
  94. package/lib/stylex-create-theme.js +62 -0
  95. package/lib/stylex-create-theme.js.flow +19 -0
  96. package/lib/stylex-create.d.ts +23 -0
  97. package/lib/stylex-create.js +30 -146
  98. package/lib/stylex-create.js.flow +30 -0
  99. package/lib/stylex-define-vars.d.ts +36 -0
  100. package/lib/stylex-define-vars.js +72 -0
  101. package/lib/stylex-define-vars.js.flow +28 -0
  102. package/lib/stylex-first-that-works.d.ts +13 -0
  103. package/lib/stylex-first-that-works.js +0 -10
  104. package/lib/stylex-first-that-works.js.flow +12 -0
  105. package/lib/stylex-include.d.ts +18 -0
  106. package/lib/stylex-include.js +0 -10
  107. package/lib/stylex-include.js.flow +20 -0
  108. package/lib/stylex-keyframes.d.ts +17 -0
  109. package/lib/stylex-keyframes.js +6 -26
  110. package/lib/stylex-keyframes.js.flow +20 -0
  111. package/lib/transform-value.d.ts +22 -0
  112. package/lib/transform-value.js +9 -23
  113. package/lib/transform-value.js.flow +25 -0
  114. package/lib/types/index.d.ts +205 -0
  115. package/lib/types/index.js +191 -0
  116. package/lib/types/index.js.flow +241 -0
  117. package/lib/utils/Rule.d.ts +58 -0
  118. package/lib/utils/Rule.js +0 -21
  119. package/lib/utils/Rule.js.flow +64 -0
  120. package/lib/utils/dashify.d.ts +11 -0
  121. package/lib/utils/dashify.js +0 -8
  122. package/lib/utils/dashify.js.flow +10 -0
  123. package/lib/utils/default-options.d.ts +11 -0
  124. package/lib/utils/default-options.js +14 -0
  125. package/lib/utils/default-options.js.flow +25 -0
  126. package/lib/utils/file-based-identifier.d.ts +15 -0
  127. package/lib/utils/file-based-identifier.js +14 -0
  128. package/lib/utils/file-based-identifier.js.flow +14 -0
  129. package/lib/utils/genCSSRule.d.ts +15 -0
  130. package/lib/utils/genCSSRule.js +9 -18
  131. package/lib/utils/genCSSRule.js.flow +15 -0
  132. package/lib/utils/normalize-value.d.ts +16 -0
  133. package/lib/utils/normalize-value.js +8 -15
  134. package/lib/utils/normalize-value.js.flow +16 -0
  135. package/lib/utils/normalizers/convert-camel-case-transition-props.d.ts +14 -0
  136. package/lib/utils/normalizers/convert-camel-case-transition-props.js +23 -0
  137. package/lib/utils/normalizers/convert-camel-case-transition-props.js.flow +13 -0
  138. package/lib/utils/normalizers/convert-camel-case-values.d.ts +14 -0
  139. package/lib/utils/normalizers/convert-camel-case-values.js +23 -0
  140. package/lib/utils/normalizers/convert-camel-case-values.js.flow +13 -0
  141. package/lib/utils/normalizers/detect-unclosed-fns.d.ts +17 -0
  142. package/lib/utils/normalizers/detect-unclosed-fns.js +0 -12
  143. package/lib/utils/normalizers/detect-unclosed-fns.js.flow +16 -0
  144. package/lib/utils/normalizers/font-size-px-to-rem.d.ts +19 -0
  145. package/lib/utils/normalizers/font-size-px-to-rem.js +9 -19
  146. package/lib/utils/normalizers/font-size-px-to-rem.js.flow +18 -0
  147. package/lib/utils/normalizers/leading-zero.d.ts +17 -0
  148. package/lib/utils/normalizers/leading-zero.js +0 -12
  149. package/lib/utils/normalizers/leading-zero.js.flow +16 -0
  150. package/lib/utils/normalizers/quotes.d.ts +18 -0
  151. package/lib/utils/normalizers/quotes.js +0 -13
  152. package/lib/utils/normalizers/quotes.js.flow +17 -0
  153. package/lib/utils/normalizers/timings.d.ts +18 -0
  154. package/lib/utils/normalizers/timings.js +0 -14
  155. package/lib/utils/normalizers/timings.js.flow +17 -0
  156. package/lib/utils/normalizers/whitespace.d.ts +19 -0
  157. package/lib/utils/normalizers/whitespace.js +0 -15
  158. package/lib/utils/normalizers/whitespace.js.flow +18 -0
  159. package/lib/utils/normalizers/zero-dimensions.d.ts +19 -0
  160. package/lib/utils/normalizers/zero-dimensions.js +0 -15
  161. package/lib/utils/normalizers/zero-dimensions.js.flow +18 -0
  162. package/lib/utils/object-utils.d.ts +66 -0
  163. package/lib/utils/object-utils.js +21 -13
  164. package/lib/utils/object-utils.js.flow +77 -0
  165. package/lib/utils/property-priorities.d.ts +11 -0
  166. package/lib/utils/property-priorities.js +516 -101
  167. package/lib/utils/property-priorities.js.flow +10 -0
  168. package/lib/utils/split-css-value.d.ts +14 -0
  169. package/lib/utils/split-css-value.js +0 -14
  170. package/lib/utils/split-css-value.js.flow +15 -0
  171. package/lib/validate.d.ts +12 -0
  172. package/lib/validate.js +1 -10
  173. package/lib/validate.js.flow +12 -0
  174. package/package.json +4 -5
  175. package/lib/expand-shorthands.d.ts +0 -5
  176. package/lib/expand-shorthands.js +0 -330
  177. package/lib/namespace-transforms/__tests__/preflatten.test.js +0 -120
  178. package/lib/namespace-transforms/preflatten.js +0 -89
  179. package/lib/preprocess-rules/expand-shorthands.js +0 -156
  180. package/lib/preprocess-rules/null-out-longhand.js +0 -310
  181. package/lib/preprocess-rules/react-native-web.js +0 -142
  182. package/lib/stylex-defaultValue.js +0 -397
@@ -0,0 +1,64 @@
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 { InjectableStyle, StyleXOptions } from '../common-types';
11
+ import type { IncludedStyles } from '../stylex-include';
12
+
13
+ export type ComputedStyle = null | $ReadOnly<[string, InjectableStyle]>;
14
+
15
+ // The classes in this file are used to represent objects that
16
+ // can be compiled into one or CSS rules.
17
+ //
18
+ // These are thin wrappers around the "values" in Raw Style Objects
19
+ // with all the metadata needed to compile them into CSS.
20
+ export interface IPreRule {
21
+ compiled(
22
+ options: StyleXOptions,
23
+ ): IncludedStyles | $ReadOnlyArray<ComputedStyle>;
24
+ equals(other: IPreRule): boolean;
25
+ }
26
+
27
+ export type AnyPreRule = NullPreRule | PreRule | PreRuleSet;
28
+
29
+ declare export class NullPreRule implements IPreRule {
30
+ compiled(_options: StyleXOptions): [null];
31
+ equals(other: IPreRule): boolean;
32
+ }
33
+
34
+ declare export class PreIncludedStylesRule implements IPreRule {
35
+ +includedStyles: IncludedStyles;
36
+ constructor(IncludedStyles: IncludedStyles): void;
37
+ equals(other: IPreRule): boolean;
38
+ compiled(_options: StyleXOptions): IncludedStyles;
39
+ }
40
+
41
+ declare export class PreRule implements IPreRule {
42
+ +property: string;
43
+ +value: string | number | $ReadOnlyArray<string | number>;
44
+ +pseudos: $ReadOnlyArray<string>;
45
+ +atRules: $ReadOnlyArray<string>;
46
+ constructor(
47
+ property: string,
48
+ value: string | number | $ReadOnlyArray<string | number>,
49
+ pseudos?: ?$ReadOnlyArray<string>,
50
+ atRules?: ?$ReadOnlyArray<string>,
51
+ ): void;
52
+ compiled(options: StyleXOptions): $ReadOnlyArray<[string, InjectableStyle]>;
53
+ equals(other: IPreRule): boolean;
54
+ }
55
+
56
+ declare export class PreRuleSet implements IPreRule {
57
+ +rules: $ReadOnlyArray<PreRule | NullPreRule>;
58
+ constructor(rules: $ReadOnlyArray<PreRule | NullPreRule>): void;
59
+ static create(
60
+ rules: $ReadOnlyArray<PreRule | NullPreRule | PreRuleSet>,
61
+ ): AnyPreRule;
62
+ compiled(options: StyleXOptions): $ReadOnlyArray<ComputedStyle>;
63
+ equals(other: IPreRule): boolean;
64
+ }
@@ -0,0 +1,290 @@
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: {
115
+ all: (_: TStyleValue) => TReturn;
116
+ animation: (value: TStyleValue) => Array<[string, TStyleValue]>;
117
+ animationRange: (value: TStyleValue) => TReturn;
118
+ background: (value: TStyleValue) => TReturn;
119
+ backgroundPosition: (value: TStyleValue) => TReturn;
120
+ border: (rawValue: TStyleValue) => TReturn;
121
+ borderInline: (rawValue: TStyleValue) => TReturn;
122
+ borderBlock: (rawValue: TStyleValue) => TReturn;
123
+ borderTop: (rawValue: TStyleValue) => TReturn;
124
+ borderInlineEnd: (rawValue: TStyleValue) => TReturn;
125
+ borderRight: (rawValue: TStyleValue) => TReturn;
126
+ borderBottom: (rawValue: TStyleValue) => TReturn;
127
+ borderInlineStart: (_rawValue: TStyleValue) => TReturn;
128
+ borderLeft: (_rawValue: TStyleValue) => TReturn;
129
+ borderInlineWidth: (rawValue: TStyleValue) => TReturn;
130
+ borderInlineStyle: (rawValue: TStyleValue) => TReturn;
131
+ borderInlineColor: (rawValue: TStyleValue) => TReturn;
132
+ borderBlockWidth: (rawValue: TStyleValue) => TReturn;
133
+ borderBlockStyle: (rawValue: TStyleValue) => TReturn;
134
+ borderBlockColor: (rawValue: TStyleValue) => TReturn;
135
+ borderColor: (value: TStyleValue) => TReturn;
136
+ borderStyle: (value: TStyleValue) => TReturn;
137
+ borderWidth: (value: TStyleValue) => TReturn;
138
+ borderInlineStartColor: (value: TStyleValue) => TReturn;
139
+ borderInlineEndColor: (value: TStyleValue) => TReturn;
140
+ borderInlineStartStyle: (value: TStyleValue) => TReturn;
141
+ borderInlineEndStyle: (value: TStyleValue) => TReturn;
142
+ borderInlineStartWidth: (value: TStyleValue) => TReturn;
143
+ borderInlineEndWidth: (value: TStyleValue) => TReturn;
144
+ borderLeftColor: (value: TStyleValue) => TReturn;
145
+ borderRightColor: (value: TStyleValue) => TReturn;
146
+ borderLeftStyle: (value: TStyleValue) => TReturn;
147
+ borderRightStyle: (value: TStyleValue) => TReturn;
148
+ borderLeftWidth: (value: TStyleValue) => TReturn;
149
+ borderRightWidth: (value: TStyleValue) => TReturn;
150
+ borderRadius: (value: TStyleValue) => TReturn;
151
+ borderStartStartRadius: (value: TStyleValue) => TReturn;
152
+ borderStartEndRadius: (value: TStyleValue) => TReturn;
153
+ borderEndStartRadius: (value: TStyleValue) => TReturn;
154
+ borderEndEndRadius: (value: TStyleValue) => TReturn;
155
+ borderTopLeftRadius: (value: TStyleValue) => TReturn;
156
+ borderTopRightRadius: (value: TStyleValue) => TReturn;
157
+ borderBottomLeftRadius: (value: TStyleValue) => TReturn;
158
+ borderBottomRightRadius: (value: TStyleValue) => TReturn;
159
+ borderImage: (value: TStyleValue) => TReturn;
160
+ columnRule: (value: TStyleValue) => TReturn;
161
+ columns: (value: TStyleValue) => TReturn;
162
+ container: (value: TStyleValue) => TReturn;
163
+ containIntrinsicSize: (value: TStyleValue) => TReturn;
164
+ flex: (value: TStyleValue) => TReturn;
165
+ flexFlow: (value: TStyleValue) => TReturn;
166
+ font: (value: TStyleValue) => TReturn;
167
+ fontVariant: (value: TStyleValue) => TReturn;
168
+ gap: (value: TStyleValue) => TReturn;
169
+ grid: (value: TStyleValue) => TReturn;
170
+ gridArea: (value: TStyleValue) => TReturn;
171
+ gridRow: (value: TStyleValue) => TReturn;
172
+ gridColumn: (value: TStyleValue) => TReturn;
173
+ gridTemplate: (value: TStyleValue) => TReturn;
174
+ inset: (value: TStyleValue) => TReturn;
175
+ insetInline: (value: TStyleValue) => TReturn;
176
+ insetBlock: (value: TStyleValue) => TReturn;
177
+ insetInlineStart: (value: TStyleValue) => TReturn;
178
+ insetInlineEnd: (value: TStyleValue) => TReturn;
179
+ left: (value: TStyleValue) => TReturn;
180
+ right: (value: TStyleValue) => TReturn;
181
+ listStyle: (value: TStyleValue) => TReturn;
182
+ margin: (value: TStyleValue) => TReturn;
183
+ marginInline: (value: TStyleValue) => TReturn;
184
+ marginBlock: (value: TStyleValue) => TReturn;
185
+ marginInlineStart: (value: TStyleValue) => TReturn;
186
+ marginInlineEnd: (value: TStyleValue) => TReturn;
187
+ marginLeft: (value: TStyleValue) => TReturn;
188
+ marginRight: (value: TStyleValue) => TReturn;
189
+ mask: (value: TStyleValue) => TReturn;
190
+ maskBorder: (value: TStyleValue) => TReturn;
191
+ offset: (value: TStyleValue) => TReturn;
192
+ outline: (value: TStyleValue) => TReturn;
193
+ overflow: (value: TStyleValue) => TReturn;
194
+ padding: (rawValue: TStyleValue) => TReturn;
195
+ paddingInline: (rawValue: TStyleValue) => TReturn;
196
+ paddingBlock: (rawValue: TStyleValue) => TReturn;
197
+ paddingInlineStart: (value: TStyleValue) => TReturn;
198
+ paddingInlineEnd: (value: TStyleValue) => TReturn;
199
+ paddingLeft: (value: TStyleValue) => TReturn;
200
+ paddingRight: (value: TStyleValue) => TReturn;
201
+ placeContent: (value: TStyleValue) => TReturn;
202
+ placeItems: (value: TStyleValue) => TReturn;
203
+ placeSelf: (value: TStyleValue) => TReturn;
204
+ scrollMargin: (value: TStyleValue) => TReturn;
205
+ scrollMarginBlock: (value: TStyleValue) => TReturn;
206
+ scrollMarginInline: (value: TStyleValue) => TReturn;
207
+ scrollMarginInlineStart: (value: TStyleValue) => TReturn;
208
+ scrollMarginInlineEnd: (value: TStyleValue) => TReturn;
209
+ scrollMarginLeft: (value: TStyleValue) => TReturn;
210
+ scrollMarginRight: (value: TStyleValue) => TReturn;
211
+ scrollPadding: (value: TStyleValue) => TReturn;
212
+ scrollPaddingBlock: (value: TStyleValue) => TReturn;
213
+ scrollPaddingInline: (value: TStyleValue) => TReturn;
214
+ scrollPaddingInlineStart: (value: TStyleValue) => TReturn;
215
+ scrollPaddingInlineEnd: (value: TStyleValue) => TReturn;
216
+ scrollPaddingLeft: (value: TStyleValue) => TReturn;
217
+ scrollPaddingRight: (value: TStyleValue) => TReturn;
218
+ scrollSnapType: (value: TStyleValue) => TReturn;
219
+ scrollTimeline: (value: TStyleValue) => TReturn;
220
+ textDecoration: (value: TStyleValue) => TReturn;
221
+ textEmphasis: (value: TStyleValue) => TReturn;
222
+ transition: (value: TStyleValue) => TReturn;
223
+ };
224
+ declare const aliases: {
225
+ borderHorizontal: any;
226
+ borderVertical: any;
227
+ borderBlockStart: any;
228
+ borderEnd: any;
229
+ borderBlockEnd: any;
230
+ borderStart: any;
231
+ blockSize: (val: TStyleValue) => TReturn;
232
+ inlineSize: (val: TStyleValue) => TReturn;
233
+ minBlockSize: (val: TStyleValue) => TReturn;
234
+ minInlineSize: (val: TStyleValue) => TReturn;
235
+ maxBlockSize: (val: TStyleValue) => TReturn;
236
+ maxInlineSize: (val: TStyleValue) => TReturn;
237
+ borderHorizontalWidth: any;
238
+ borderHorizontalStyle: any;
239
+ borderHorizontalColor: any;
240
+ borderVerticalWidth: any;
241
+ borderVerticalStyle: any;
242
+ borderVerticalColor: any;
243
+ borderBlockStartColor: (value: TStyleValue) => TReturn;
244
+ borderBlockEndColor: (value: TStyleValue) => TReturn;
245
+ borderBlockStartStyle: (value: TStyleValue) => TReturn;
246
+ borderBlockEndStyle: (value: TStyleValue) => TReturn;
247
+ borderBlockStartWidth: (value: TStyleValue) => TReturn;
248
+ borderBlockEndWidth: (value: TStyleValue) => TReturn;
249
+ borderStartColor: any;
250
+ borderEndColor: any;
251
+ borderStartStyle: any;
252
+ borderEndStyle: any;
253
+ borderStartWidth: any;
254
+ borderEndWidth: any;
255
+ borderTopStartRadius: (value: TStyleValue) => TReturn;
256
+ borderTopEndRadius: (value: TStyleValue) => TReturn;
257
+ borderBottomStartRadius: (value: TStyleValue) => TReturn;
258
+ borderBottomEndRadius: (value: TStyleValue) => TReturn;
259
+ containIntrinsicBlockSize: (value: TStyleValue) => TReturn;
260
+ containIntrinsicInlineSize: (value: TStyleValue) => TReturn;
261
+ gridGap: any;
262
+ gridRowGap: (value: TStyleValue) => TReturn;
263
+ gridColumnGap: (value: TStyleValue) => TReturn;
264
+ marginBlockStart: (value: TStyleValue) => TReturn;
265
+ marginBlockEnd: (value: TStyleValue) => TReturn;
266
+ marginStart: any;
267
+ marginEnd: any;
268
+ marginHorizontal: any;
269
+ marginVertical: any;
270
+ overflowBlock: (value: TStyleValue) => TReturn;
271
+ overflowInline: (value: TStyleValue) => TReturn;
272
+ paddingBlockStart: (rawValue: TStyleValue) => TReturn;
273
+ paddingBlockEnd: (rawValue: TStyleValue) => TReturn;
274
+ paddingStart: any;
275
+ paddingEnd: any;
276
+ paddingHorizontal: any;
277
+ paddingVertical: any;
278
+ scrollMarginBlockStart: (value: TStyleValue) => TReturn;
279
+ scrollMarginBlockEnd: (value: TStyleValue) => TReturn;
280
+ insetBlockStart: (value: TStyleValue) => TReturn;
281
+ insetBlockEnd: (value: TStyleValue) => TReturn;
282
+ start: any;
283
+ end: any;
284
+ };
285
+ declare const $$EXPORT_DEFAULT_DECLARATION$$: Readonly</**
286
+ * > 239 | ...typeof shorthands,
287
+ * | ^^^^^^^^^^^^^^^^^^^^ Unsupported feature: Translating "object types with complex spreads" is currently not supported.
288
+ **/
289
+ any>;
290
+ export default $$EXPORT_DEFAULT_DECLARATION$$;
@@ -6,96 +6,32 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = void 0;
7
7
  var _splitCssValue = _interopRequireDefault(require("../utils/split-css-value"));
8
8
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
- /**
10
- * Copyright (c) Meta Platforms, Inc. and affiliates.
11
- *
12
- * This source code is licensed under the MIT license found in the
13
- * LICENSE file in the root directory of this source tree.
14
- *
15
- *
16
- */
17
-
18
9
  const shorthands = {
19
10
  all: _ => {
20
11
  throw new Error('all is not supported');
21
12
  },
22
- animation: value => [['animation', value], ['animationName', null], ['animationDuration', null], ['animationTimingFunction', null], ['animationDelay', null], ['animationIterationCount', null], ['animationDirection', null], ['animationFillMode', null], ['animationPlayState', null]],
23
- background: value => [['background', value], ['backgroundAttachment', null], ['backgroundClip', null], ['backgroundColor', null], ['backgroundImage', null], ['backgroundOrigin', null], ['backgroundPosition', null], ['backgroundRepeat', null], ['backgroundSize', null]],
24
- // These will be removed later, matching the properties with React Native.
25
- // For now, we're compiling them to the React Native properties.
26
- // @Deprecated
27
- border: rawValue => {
28
- if (typeof rawValue === 'number') {
29
- return shorthands.borderWidth(rawValue);
30
- }
31
- const [width, style, color] = (0, _splitCssValue.default)(rawValue);
32
- return [...shorthands.borderWidth(width), ...shorthands.borderStyle(style), ...shorthands.borderColor(color)];
33
- },
34
- // @Deprecated
35
- borderInline: rawValue => {
36
- if (typeof rawValue === 'number') {
37
- return [['borderInlineWidth', rawValue], ['borderInlineStartWidth', null], ['borderInlineEndWidth', null]];
38
- }
39
- const [width, style, color] = (0, _splitCssValue.default)(rawValue);
40
- return [...shorthands.borderInlineWidth(width), ...shorthands.borderInlineStyle(style), ...shorthands.borderInlineColor(color)];
41
- },
42
- // @Deprecated
43
- borderBlock: rawValue => {
44
- if (typeof rawValue === 'number') {
45
- return [['borderBlockWidth', rawValue], ['borderTopWidth', null], ['borderBottomWidth', null]];
46
- }
47
- const [width, style, color] = (0, _splitCssValue.default)(rawValue);
48
- return [...shorthands.borderBlockWidth(width), ...shorthands.borderBlockStyle(style), ...shorthands.borderBlockColor(color)];
49
- },
50
- // @Deprecated
51
- borderTop: rawValue => {
52
- if (typeof rawValue === 'number') {
53
- return [['borderTopWidth', rawValue]];
54
- }
55
- const [width, style, color] = (0, _splitCssValue.default)(rawValue);
56
- return [['borderTopWidth', width], ['borderTopStyle', style], ['borderTopColor', color]];
57
- },
58
- // @Deprecated
59
- borderInlineEnd: rawValue => {
60
- if (typeof rawValue === 'number') {
61
- return [['borderInlineEndWidth', rawValue]];
62
- }
63
- const [width, style, color] = (0, _splitCssValue.default)(rawValue);
64
- return [['borderInlineEndWidth', width], ['borderInlineEndStyle', style], ['borderInlineEndColor', color]];
65
- },
66
- // @Deprecated
67
- borderRight: rawValue => {
68
- throw new Error(['`borderRight` is not supported.', 'You could use `borderRightWidth`, `borderRightStyle` and `borderRightColor`,', 'but it is preferable to use `borderInlineEndWidth`, `borderInlineEndStyle` and `borderInlineEndColor`.'].join(' '));
69
- },
70
- // @Deprecated
71
- borderBottom: rawValue => {
72
- if (typeof rawValue === 'number') {
73
- return [['borderBottomWidth', rawValue]];
74
- }
75
- const [width, style, color] = (0, _splitCssValue.default)(rawValue);
76
- return [['borderBottomWidth', width], ['borderBottomStyle', style], ['borderBottomColor', color]];
77
- },
78
- // @Deprecated
79
- borderInlineStart: rawValue => {
80
- if (typeof rawValue === 'number') {
81
- return [['borderInlineStartWidth', rawValue]];
82
- }
83
- const [width, style, color] = (0, _splitCssValue.default)(rawValue);
84
- return [['borderInlineStartWidth', width], ['borderInlineStartStyle', style], ['borderInlineStartColor', color]];
85
- },
86
- // @Deprecated
87
- borderLeft: rawValue => {
88
- throw new Error(['`borderLeft` is not supported.', 'You could use `borderLeftWidth`, `borderLeftStyle` and `borderLeftColor`,', 'but it is preferable to use `borderInlineStartWidth`, `borderInlineStartStyle` and `borderInlineStartColor`.'].join(' '));
89
- },
13
+ animation: value => [['animation', value], ['animationComposition', null], ['animationName', null], ['animationDuration', null], ['animationTimingFunction', null], ['animationDelay', null], ['animationIterationCount', null], ['animationDirection', null], ['animationFillMode', null], ['animationPlayState', null], ...shorthands.animationRange(null), ['animationTimeline', null]],
14
+ animationRange: value => [['animationRange', value], ['animationRangeEnd', null], ['animationRangeStart', null]],
15
+ background: value => [['background', value], ['backgroundAttachment', null], ['backgroundClip', null], ['backgroundColor', null], ['backgroundImage', null], ['backgroundOrigin', null], ...shorthands.backgroundPosition(null), ['backgroundRepeat', null], ['backgroundSize', null]],
16
+ backgroundPosition: value => [['backgroundPosition', value], ['backgroundPositionX', null], ['backgroundPositionY', null]],
17
+ border: rawValue => [['border', rawValue], ...shorthands.borderWidth(null), ...shorthands.borderStyle(null), ...shorthands.borderColor(null)],
18
+ borderInline: rawValue => [['borderInline', rawValue], ...shorthands.borderInlineWidth(null), ...shorthands.borderInlineStyle(null), ...shorthands.borderInlineColor(null)],
19
+ borderBlock: rawValue => [['borderBlock', rawValue], ...shorthands.borderBlockWidth(null), ...shorthands.borderBlockStyle(null), ...shorthands.borderBlockColor(null)],
20
+ borderTop: rawValue => [['borderTop', rawValue], ['borderTopWidth', null], ['borderTopStyle', null], ['borderTopColor', null]],
21
+ borderInlineEnd: rawValue => [['borderInlineEnd', rawValue], ...shorthands.borderInlineEndWidth(null), ...shorthands.borderInlineEndStyle(null), ...shorthands.borderInlineEndColor(null)],
22
+ borderRight: rawValue => [['borderRight', rawValue], ...shorthands.borderRightWidth(null), ...shorthands.borderRightStyle(null), ...shorthands.borderRightColor(null)],
23
+ borderBottom: rawValue => [['borderBottom', rawValue], ['borderBottomWidth', null], ['borderBottomStyle', null], ['borderBottomColor', null]],
24
+ borderInlineStart: _rawValue => [['borderInlineStart', null], ...shorthands.borderInlineStartWidth(null), ...shorthands.borderInlineStartStyle(null), ...shorthands.borderInlineStartColor(null)],
25
+ borderLeft: _rawValue => [['borderLeft', null], ...shorthands.borderLeftWidth(null), ...shorthands.borderLeftStyle(null), ...shorthands.borderLeftColor(null)],
90
26
  borderInlineWidth: rawValue => [['borderInlineWidth', rawValue], ['borderInlineStartWidth', null], ['borderLeftWidth', null], ['borderInlineEndWidth', null], ['borderRightWidth', null]],
91
27
  borderInlineStyle: rawValue => [['borderInlineStyle', rawValue], ['borderInlineStartStyle', null], ['borderLeftStyle', null], ['borderInlineEndStyle', null], ['borderRightStyle', null]],
92
28
  borderInlineColor: rawValue => [['borderInlineColor', rawValue], ['borderInlineStartColor', null], ['borderLeftColor', null], ['borderInlineEndColor', null], ['borderRightColor', null]],
93
29
  borderBlockWidth: rawValue => [['borderBlockWidth', rawValue], ['borderTopWidth', null], ['borderBottomWidth', null]],
94
30
  borderBlockStyle: rawValue => [['borderBlockStyle', rawValue], ['borderTopStyle', null], ['borderBottomStyle', null]],
95
31
  borderBlockColor: rawValue => [['borderBlockColor', rawValue], ['borderTopColor', null], ['borderBottomColor', null]],
96
- borderColor: value => [['borderColor', value], ['borderTopColor', null], ['borderInlineEndColor', null], ['borderRightColor', null], ['borderBottomColor', null], ['borderInlineStartColor', null], ['borderLeftColor', null]],
97
- borderStyle: value => [['borderStyle', value], ['borderTopStyle', null], ['borderInlineEndStyle', null], ['borderRightStyle', null], ['borderBottomStyle', null], ['borderInlineStartStyle', null], ['borderLeftStyle', null]],
98
- borderWidth: value => [['borderWidth', value], ['borderTopWidth', null], ['borderInlineEndWidth', null], ['borderRightWidth', null], ['borderBottomWidth', null], ['borderInlineStartWidth', null], ['borderLeftWidth', null]],
32
+ borderColor: value => [['borderColor', value], ...shorthands.borderInlineColor(null), ...shorthands.borderBlockColor(null)],
33
+ borderStyle: value => [['borderStyle', value], ...shorthands.borderInlineStyle(null), ...shorthands.borderBlockStyle(null)],
34
+ borderWidth: value => [['borderWidth', value], ...shorthands.borderInlineWidth(null), ...shorthands.borderBlockWidth(null)],
99
35
  borderInlineStartColor: value => [['borderInlineStartColor', value], ['borderLeftColor', null], ['borderRightColor', null]],
100
36
  borderInlineEndColor: value => [['borderInlineEndColor', value], ['borderLeftColor', null], ['borderRightColor', null]],
101
37
  borderInlineStartStyle: value => [['borderInlineStartStyle', value], ['borderLeftStyle', null], ['borderRightStyle', null]],
@@ -108,24 +44,7 @@ const shorthands = {
108
44
  borderRightStyle: value => [['borderRightStyle', value], ['borderInlineStartStyle', null], ['borderInlineEndStyle', null]],
109
45
  borderLeftWidth: value => [['borderLeftWidth', value], ['borderInlineStartWidth', null], ['borderInlineEndWidth', null]],
110
46
  borderRightWidth: value => [['borderRightWidth', value], ['borderInlineStartWidth', null], ['borderInlineEndWidth', null]],
111
- borderRadius: value => {
112
- const values = typeof value === 'number' ? [value] : (0, _splitCssValue.default)(value);
113
- if (values.length === 1) {
114
- return [['borderRadius', value],
115
- // // logical constituents
116
- ['borderStartStartRadius', null], ['borderStartEndRadius', null], ['borderEndStartRadius', null], ['borderEndEndRadius', null],
117
- // physical constituents
118
- ['borderTopLeftRadius', null], ['borderTopRightRadius', null], ['borderBottomLeftRadius', null], ['borderBottomRightRadius', null]];
119
- }
120
-
121
- // @Deprecated
122
- const [startStart, startEnd = startStart, endEnd = startStart, endStart = startEnd] = values;
123
- return [
124
- // split into logical consituents
125
- ['borderStartStartRadius', startStart], ['borderStartEndRadius', startEnd], ['borderEndEndRadius', endEnd], ['borderEndStartRadius', endStart],
126
- // unset physical consituents
127
- ['borderTopLeftRadius', null], ['borderTopRightRadius', null], ['borderBottomLeftRadius', null], ['borderBottomRightRadius', null]];
128
- },
47
+ borderRadius: value => [['borderRadius', value], ['borderStartStartRadius', null], ['borderStartEndRadius', null], ['borderEndStartRadius', null], ['borderEndEndRadius', null], ['borderTopLeftRadius', null], ['borderTopRightRadius', null], ['borderBottomLeftRadius', null], ['borderBottomRightRadius', null]],
129
48
  borderStartStartRadius: value => [['borderStartStartRadius', value], ['borderTopLeftRadius', null], ['borderTopRightRadius', null]],
130
49
  borderStartEndRadius: value => [['borderStartEndRadius', value], ['borderTopLeftRadius', null], ['borderTopRightRadius', null]],
131
50
  borderEndStartRadius: value => [['borderEndStartRadius', value], ['borderBottomLeftRadius', null], ['borderBottomRightRadius', null]],
@@ -134,20 +53,22 @@ const shorthands = {
134
53
  borderTopRightRadius: value => [['borderTopRightRadius', value], ['borderStartStartRadius', null], ['borderStartEndRadius', null]],
135
54
  borderBottomLeftRadius: value => [['borderBottomLeftRadius', value], ['borderEndStartRadius', null], ['borderEndEndRadius', null]],
136
55
  borderBottomRightRadius: value => [['borderBottomRightRadius', value], ['borderEndStartRadius', null], ['borderEndEndRadius', null]],
137
- columnRule: value => [['columnRule', value], ['columnRuleWidth', null], ['columnRuleStyle', null], ['columnRuleColor', null]],
56
+ borderImage: value => [['borderImage', value], ['borderImageOutset', null], ['borderImageRepeat', null], ['borderImageSlice', null], ['borderImageSource', null], ['borderImageWidth', null]],
57
+ columnRule: value => [['columnRule', value], ['columnRuleColor', null], ['columnRuleStyle', null], ['columnRuleWidth', null]],
138
58
  columns: value => [['columns', value], ['columnCount', null], ['columnWidth', null]],
139
59
  container: value => [['container', value], ['containerName', null], ['containerType', null]],
60
+ containIntrinsicSize: value => [['containIntrinsicSize', value], ['containIntrinsicWidth', null], ['containIntrinsicHeight', null]],
140
61
  flex: value => [['flex', value], ['flexGrow', null], ['flexShrink', null], ['flexBasis', null]],
141
62
  flexFlow: value => [['flexFlow', value], ['flexDirection', null], ['flexWrap', null]],
142
- // @Deprecated ?
143
- font: value => [['font', value], ['fontFamily', null], ['fontSize', null], ['fontStretch', null], ['fontStyle', null], ['fontVariant', null], ['fontWeight', null], ['lineHeight', null]],
63
+ font: value => [['font', value], ['fontFamily', null], ['fontSize', null], ['fontStretch', null], ['fontStyle', null], ...shorthands.fontVariant(null), ['fontWeight', null], ['lineHeight', null]],
64
+ fontVariant: value => [['fontVariant', value], ['fontVariantAlternates', null], ['fontVariantCaps', null], ['fontVariantEastAsian', null], ['fontVariantEmoji', null], ['fontVariantLigatures', null], ['fontVariantNumeric', null], ['fontVariantPosition', null]],
144
65
  gap: value => [['gap', value], ['rowGap', null], ['columnGap', null]],
145
- grid: value => [['grid', value], ['gridTemplate', null], ['gridTemplateAreas', null], ['gridTemplateColumns', null], ['gridTemplateRows', null], ['gridAutoRows', null], ['gridAutoColumns', null], ['gridAutoFlow', null]],
66
+ grid: value => [['grid', value], ...shorthands.gridTemplate(null), ['gridAutoRows', null], ['gridAutoColumns', null], ['gridAutoFlow', null]],
146
67
  gridArea: value => [['gridArea', value], ['gridRow', null], ['gridRowStart', null], ['gridRowEnd', null], ['gridColumn', null], ['gridColumnStart', null], ['gridColumnEnd', null]],
147
68
  gridRow: value => [['gridRow', value], ['gridRowStart', null], ['gridRowEnd', null]],
148
69
  gridColumn: value => [['gridColumn', value], ['gridColumnStart', null], ['gridColumnEnd', null]],
149
70
  gridTemplate: value => [['gridTemplate', value], ['gridTemplateAreas', null], ['gridTemplateColumns', null], ['gridTemplateRows', null]],
150
- inset: value => [['inset', value], ['insetInline', null], ['insetBlock', null], ['insetInlineStart', null], ['insetInlineEnd', null], ['top', null], ['right', null], ['bottom', null], ['left', null]],
71
+ inset: value => [['inset', value], ...shorthands.insetInline(null), ...shorthands.insetBlock(null)],
151
72
  insetInline: value => [['insetInline', value], ['insetInlineStart', null], ['insetInlineEnd', null], ['left', null], ['right', null]],
152
73
  insetBlock: value => [['insetBlock', value], ['top', null], ['bottom', null]],
153
74
  insetInlineStart: value => [['insetInlineStart', value], ['left', null], ['right', null]],
@@ -155,15 +76,7 @@ const shorthands = {
155
76
  left: value => [['left', value], ['insetInlineStart', null], ['insetInlineEnd', null]],
156
77
  right: value => [['right', value], ['insetInlineStart', null], ['insetInlineEnd', null]],
157
78
  listStyle: value => [['listStyle', value], ['listStyleImage', null], ['listStylePosition', null], ['listStyleType', null]],
158
- margin: value => {
159
- const values = typeof value === 'number' ? [value] : (0, _splitCssValue.default)(value);
160
- if (values.length === 1) {
161
- return [['margin', values[0]], ['marginInlineStart', null], ['marginLeft', null], ['marginInlineEnd', null], ['marginRight', null], ['marginTop', null], ['marginBottom', null]];
162
- }
163
- // @Deprecated
164
- const [top, right = top, bottom = top, left = right] = values;
165
- return [['marginTop', top], ['marginInlineEnd', right], ['marginBottom', bottom], ['marginInlineStart', left], ['marginLeft', null], ['marginRight', null]];
166
- },
79
+ margin: value => [['margin', value], ...shorthands.marginInline(null), ...shorthands.marginBlock(null)],
167
80
  marginInline: value => [['marginInline', value], ['marginInlineStart', null], ['marginLeft', null], ['marginInlineEnd', null], ['marginRight', null]],
168
81
  marginBlock: value => [['marginBlock', value], ['marginTop', null], ['marginBottom', null]],
169
82
  marginInlineStart: value => [['marginInlineStart', value], ['marginLeft', null], ['marginRight', null]],
@@ -171,15 +84,15 @@ const shorthands = {
171
84
  marginLeft: value => [['marginLeft', value], ['marginInlineStart', null], ['marginInlineEnd', null]],
172
85
  marginRight: value => [['marginRight', value], ['marginInlineStart', null], ['marginInlineEnd', null]],
173
86
  mask: value => [['mask', value], ['maskClip', null], ['maskComposite', null], ['maskImage', null], ['maskMode', null], ['maskOrigin', null], ['maskPosition', null], ['maskRepeat', null], ['maskSize', null]],
87
+ maskBorder: value => [['maskBorder', value], ['maskBorderMode', null], ['maskBorderOutset', null], ['maskBorderRepeat', null], ['maskBorderSlice', null], ['maskBorderSource', null], ['maskBorderWidth', null]],
174
88
  offset: value => [['offset', value], ['offsetAnchor', null], ['offsetDistance', null], ['offsetPath', null], ['offsetPosition', null], ['offsetRotate', null]],
175
- outline: value => [['outline', value], ['outlineColor', null], ['outlineStyle', null], ['outlineWidth', null]],
89
+ outline: value => [['outline', value], ['outlineColor', null], ['outlineOffset', null], ['outlineStyle', null], ['outlineWidth', null]],
176
90
  overflow: value => [['overflow', value], ['overflowX', null], ['overflowY', null]],
177
91
  padding: rawValue => {
178
92
  const values = typeof rawValue === 'number' ? [rawValue] : (0, _splitCssValue.default)(rawValue);
179
93
  if (values.length === 1) {
180
94
  return [['padding', values[0]], ['paddingStart', null], ['paddingLeft', null], ['paddingEnd', null], ['paddingRight', null], ['paddingTop', null], ['paddingBottom', null]];
181
95
  }
182
- // @Deprecated
183
96
  const [top, right = top, bottom = top, left = right] = values;
184
97
  return [['paddingTop', top], ['paddingEnd', right], ['paddingBottom', bottom], ['paddingStart', left]];
185
98
  },
@@ -192,26 +105,39 @@ const shorthands = {
192
105
  placeContent: value => [['placeContent', value], ['alignContent', null], ['justifyContent', null]],
193
106
  placeItems: value => [['placeItems', value], ['alignItems', null], ['justifyItems', null]],
194
107
  placeSelf: value => [['placeSelf', value], ['alignSelf', null], ['justifySelf', null]],
195
- scrollMargin: value => [['scrollMargin', value], ['scrollMarginBottom', null], ['scrollMarginLeft', null], ['scrollMarginStart', null], ['scrollMarginRight', null], ['scrollMarginEnd', null], ['scrollMarginTop', null]],
196
- scrollPadding: value => [['scrollPadding', value], ['scrollPaddingBottom', null], ['scrollPaddingLeft', null], ['scrollPaddingStart', null], ['scrollPaddingRight', null], ['scrollPaddingEnd', null], ['scrollPaddingTop', null]],
108
+ scrollMargin: value => [['scrollMargin', value], ...shorthands.scrollMarginBlock(null), ...shorthands.scrollMarginInline(null)],
109
+ scrollMarginBlock: value => [['scrollMarginBlock', value], ['scrollMarginTop', null], ['scrollMarginBottom', null]],
110
+ scrollMarginInline: value => [['scrollMarginInline', value], ['scrollMarginInlineStart', null], ['scrollMarginInlineEnd', null], ['scrollMarginLeft', null], ['scrollMarginRight', null]],
111
+ scrollMarginInlineStart: value => [['scrollMarginInlineStart', value], ['scrollMarginLeft', null], ['scrollMarginRight', null]],
112
+ scrollMarginInlineEnd: value => [['scrollMarginInlineEnd', value], ['scrollMarginLeft', null], ['scrollMarginRight', null]],
113
+ scrollMarginLeft: value => [['scrollMarginLeft', value], ['scrollMarginInlineStart', null], ['scrollMarginInlineEnd', null]],
114
+ scrollMarginRight: value => [['scrollMarginRight', value], ['scrollMarginInlineStart', null], ['scrollMarginInlineEnd', null]],
115
+ scrollPadding: value => [['scrollPadding', value], ...shorthands.scrollPaddingBlock(null), ...shorthands.scrollPaddingInline(null)],
116
+ scrollPaddingBlock: value => [['scrollPaddingBlock', value], ['scrollPaddingTop', null], ['scrollPaddingBottom', null]],
117
+ scrollPaddingInline: value => [['scrollPaddingInline', value], ['scrollPaddingInlineStart', null], ['scrollPaddingInlineEnd', null], ['scrollPaddingLeft', null], ['scrollPaddingRight', null]],
118
+ scrollPaddingInlineStart: value => [['scrollPaddingInlineStart', value], ['scrollPaddingLeft', null], ['scrollPaddingRight', null]],
119
+ scrollPaddingInlineEnd: value => [['scrollPaddingInlineEnd', value], ['scrollPaddingLeft', null], ['scrollPaddingRight', null]],
120
+ scrollPaddingLeft: value => [['scrollPaddingLeft', value], ['scrollPaddingInlineStart', null], ['scrollPaddingInlineEnd', null]],
121
+ scrollPaddingRight: value => [['scrollPaddingRight', value], ['scrollPaddingInlineStart', null], ['scrollPaddingInlineEnd', null]],
122
+ scrollSnapType: value => [['scrollSnapType', value], ['scrollSnapTypeX', null], ['scrollSnapTypeY', null]],
197
123
  scrollTimeline: value => [['scrollTimeline', value], ['scrollTimelineName', null], ['scrollTimelineAxis', null]],
198
124
  textDecoration: value => [['textDecoration', value], ['textDecorationColor', null], ['textDecorationLine', null], ['textDecorationStyle', null], ['textDecorationThickness', null]],
199
125
  textEmphasis: value => [['textEmphasis', value], ['textEmphasisColor', null], ['textEmphasisStyle', null]],
200
- transition: value => [['transition', value], ['transitionDelay', null], ['transitionDuration', null], ['transitionProperty', null], ['transitionTimingFunction', null]]
126
+ transition: value => [['transition', value], ['transitionBehavior', null], ['transitionDelay', null], ['transitionDuration', null], ['transitionProperty', null], ['transitionTimingFunction', null]]
201
127
  };
202
128
  const aliases = {
203
- // @Deprecated
204
129
  borderHorizontal: shorthands.borderInline,
205
- // @Deprecated
206
130
  borderVertical: shorthands.borderBlock,
207
- // @Deprecated
208
131
  borderBlockStart: shorthands.borderTop,
209
- // @Deprecated
210
132
  borderEnd: shorthands.borderInlineEnd,
211
- // @Deprecated
212
133
  borderBlockEnd: shorthands.borderBottom,
213
- // @Deprecated
214
134
  borderStart: shorthands.borderInlineStart,
135
+ blockSize: val => [['height', val]],
136
+ inlineSize: val => [['width', val]],
137
+ minBlockSize: val => [['minHeight', val]],
138
+ minInlineSize: val => [['minWidth', val]],
139
+ maxBlockSize: val => [['maxHeight', val]],
140
+ maxInlineSize: val => [['maxWidth', val]],
215
141
  borderHorizontalWidth: shorthands.borderInlineWidth,
216
142
  borderHorizontalStyle: shorthands.borderInlineStyle,
217
143
  borderHorizontalColor: shorthands.borderInlineColor,
@@ -234,18 +160,27 @@ const aliases = {
234
160
  borderTopEndRadius: value => [['borderStartEndRadius', value]],
235
161
  borderBottomStartRadius: value => [['borderEndStartRadius', value]],
236
162
  borderBottomEndRadius: value => [['borderEndEndRadius', value]],
163
+ containIntrinsicBlockSize: value => [['containIntrinsicHeight', value]],
164
+ containIntrinsicInlineSize: value => [['containIntrinsicWidth', value]],
165
+ gridGap: shorthands.gap,
166
+ gridRowGap: value => [['rowGap', value]],
167
+ gridColumnGap: value => [['columnGap', value]],
237
168
  marginBlockStart: value => [['marginTop', value]],
238
169
  marginBlockEnd: value => [['marginBottom', value]],
239
170
  marginStart: shorthands.marginInlineStart,
240
171
  marginEnd: shorthands.marginInlineEnd,
241
172
  marginHorizontal: shorthands.marginInline,
242
173
  marginVertical: shorthands.marginBlock,
174
+ overflowBlock: value => [['overflowY', value]],
175
+ overflowInline: value => [['overflowX', value]],
243
176
  paddingBlockStart: rawValue => [['paddingTop', rawValue]],
244
177
  paddingBlockEnd: rawValue => [['paddingBottom', rawValue]],
245
178
  paddingStart: shorthands.paddingInlineStart,
246
179
  paddingEnd: shorthands.paddingInlineEnd,
247
180
  paddingHorizontal: shorthands.paddingInline,
248
181
  paddingVertical: shorthands.paddingBlock,
182
+ scrollMarginBlockStart: value => [['scrollMarginTop', value]],
183
+ scrollMarginBlockEnd: value => [['scrollMarginBottom', value]],
249
184
  insetBlockStart: value => [['top', value]],
250
185
  insetBlockEnd: value => [['bottom', value]],
251
186
  start: shorthands.insetInlineStart,
@@ -255,5 +190,4 @@ const expansions = {
255
190
  ...shorthands,
256
191
  ...aliases
257
192
  };
258
- var _default = expansions;
259
- exports.default = _default;
193
+ var _default = exports.default = expansions;