@stylexjs/babel-plugin 0.17.0 → 0.17.1

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 (54) hide show
  1. package/lib/index.js +159 -76
  2. package/lib/shared/common-types.d.ts +1 -0
  3. package/lib/shared/common-types.js.flow +9 -0
  4. package/lib/shared/hash.d.ts +3 -0
  5. package/lib/shared/index.d.ts +12 -0
  6. package/lib/shared/messages.d.ts +32 -0
  7. package/lib/shared/physical-rtl/generate-ltr.d.ts +1 -1
  8. package/lib/shared/physical-rtl/generate-ltr.js.flow +1 -1
  9. package/lib/shared/physical-rtl/generate-rtl.d.ts +1 -1
  10. package/lib/shared/physical-rtl/generate-rtl.js.flow +1 -1
  11. package/lib/shared/preprocess-rules/application-order.d.ts +35 -34
  12. package/lib/shared/preprocess-rules/application-order.js.flow +35 -29
  13. package/lib/shared/preprocess-rules/basic-validation.d.ts +1 -1
  14. package/lib/shared/preprocess-rules/basic-validation.js.flow +1 -1
  15. package/lib/shared/preprocess-rules/legacy-expand-shorthands.d.ts +22 -15
  16. package/lib/shared/preprocess-rules/legacy-expand-shorthands.js.flow +14 -14
  17. package/lib/shared/preprocess-rules/property-specificity.d.ts +12 -11
  18. package/lib/shared/preprocess-rules/property-specificity.js.flow +12 -6
  19. package/lib/shared/stylex-define-consts.d.ts +1 -1
  20. package/lib/shared/stylex-keyframes.d.ts +1 -1
  21. package/lib/shared/stylex-keyframes.js.flow +1 -1
  22. package/lib/shared/stylex-position-try.d.ts +1 -1
  23. package/lib/shared/stylex-position-try.js.flow +1 -1
  24. package/lib/shared/stylex-vars-utils.d.ts +2 -2
  25. package/lib/shared/stylex-vars-utils.js.flow +3 -3
  26. package/lib/shared/stylex-view-transition-class.d.ts +1 -1
  27. package/lib/shared/stylex-view-transition-class.js.flow +1 -1
  28. package/lib/shared/types/index.d.ts +14 -0
  29. package/lib/shared/utils/convert-to-className.d.ts +1 -1
  30. package/lib/shared/utils/convert-to-className.js.flow +1 -1
  31. package/lib/shared/utils/default-options.d.ts +1 -0
  32. package/lib/shared/utils/file-based-identifier.js.flow +1 -1
  33. package/lib/shared/utils/generate-css-rule.d.ts +1 -1
  34. package/lib/shared/utils/generate-css-rule.js.flow +1 -1
  35. package/lib/shared/utils/normalize-value.js.flow +1 -1
  36. package/lib/shared/utils/object-utils.d.ts +10 -8
  37. package/lib/shared/utils/object-utils.js.flow +1 -1
  38. package/lib/shared/utils/rule-utils.d.ts +2 -0
  39. package/lib/shared/utils/transform-value.d.ts +2 -0
  40. package/lib/shared/validate.js.flow +3 -1
  41. package/lib/shared/when/when.d.ts +5 -5
  42. package/lib/shared/when/when.js.flow +5 -5
  43. package/lib/utils/evaluate-path.d.ts +2 -2
  44. package/lib/utils/evaluate-path.js.flow +2 -2
  45. package/lib/utils/evaluation-errors.d.ts +15 -0
  46. package/lib/utils/state-manager.d.ts +40 -35
  47. package/lib/utils/state-manager.js.flow +4 -0
  48. package/lib/utils/validate.d.ts +18 -3
  49. package/lib/utils/validate.js.flow +5 -3
  50. package/lib/visitors/parse-stylex-create-arg.d.ts +1 -1
  51. package/lib/visitors/parse-stylex-create-arg.js.flow +1 -1
  52. package/lib/visitors/stylex-default-target.d.ts +20 -0
  53. package/lib/visitors/stylex-default-target.js.flow +21 -0
  54. package/package.json +5 -5
@@ -115,69 +115,70 @@ declare const shorthands: Readonly<{
115
115
  [key: string]: ($$PARAM_0$$: TStyleValue) => TReturn;
116
116
  }>;
117
117
  declare const aliases: {
118
- borderHorizontal: any;
119
- borderVertical: any;
120
- borderBlockStart: any;
121
- borderEnd: any;
122
- borderBlockEnd: any;
123
- borderStart: any;
118
+ borderHorizontal: typeof shorthands.borderInline;
119
+ borderVertical: typeof shorthands.borderBlock;
120
+ borderBlockStart: typeof shorthands.borderTop;
121
+ borderEnd: typeof shorthands.borderInlineEnd;
122
+ borderBlockEnd: typeof shorthands.borderBottom;
123
+ borderStart: typeof shorthands.borderInlineStart;
124
124
  blockSize: (val: TStyleValue) => TReturn;
125
125
  inlineSize: (val: TStyleValue) => TReturn;
126
126
  minBlockSize: (val: TStyleValue) => TReturn;
127
127
  minInlineSize: (val: TStyleValue) => TReturn;
128
128
  maxBlockSize: (val: TStyleValue) => TReturn;
129
129
  maxInlineSize: (val: TStyleValue) => TReturn;
130
- borderHorizontalWidth: any;
131
- borderHorizontalStyle: any;
132
- borderHorizontalColor: any;
133
- borderVerticalWidth: any;
134
- borderVerticalStyle: any;
135
- borderVerticalColor: any;
130
+ borderHorizontalWidth: typeof shorthands.borderInlineWidth;
131
+ borderHorizontalStyle: typeof shorthands.borderInlineStyle;
132
+ borderHorizontalColor: typeof shorthands.borderInlineColor;
133
+ borderVerticalWidth: typeof shorthands.borderBlockWidth;
134
+ borderVerticalStyle: typeof shorthands.borderBlockStyle;
135
+ borderVerticalColor: typeof shorthands.borderBlockColor;
136
136
  borderBlockStartColor: (value: TStyleValue) => TReturn;
137
137
  borderBlockEndColor: (value: TStyleValue) => TReturn;
138
138
  borderBlockStartStyle: (value: TStyleValue) => TReturn;
139
139
  borderBlockEndStyle: (value: TStyleValue) => TReturn;
140
140
  borderBlockStartWidth: (value: TStyleValue) => TReturn;
141
141
  borderBlockEndWidth: (value: TStyleValue) => TReturn;
142
- borderStartColor: any;
143
- borderEndColor: any;
144
- borderStartStyle: any;
145
- borderEndStyle: any;
146
- borderStartWidth: any;
147
- borderEndWidth: any;
142
+ borderStartColor: typeof shorthands.borderInlineStartColor;
143
+ borderEndColor: typeof shorthands.borderInlineEndColor;
144
+ borderStartStyle: typeof shorthands.borderInlineStartStyle;
145
+ borderEndStyle: typeof shorthands.borderInlineEndStyle;
146
+ borderStartWidth: typeof shorthands.borderInlineStartWidth;
147
+ borderEndWidth: typeof shorthands.borderInlineEndWidth;
148
148
  borderTopStartRadius: (value: TStyleValue) => TReturn;
149
149
  borderTopEndRadius: (value: TStyleValue) => TReturn;
150
150
  borderBottomStartRadius: (value: TStyleValue) => TReturn;
151
151
  borderBottomEndRadius: (value: TStyleValue) => TReturn;
152
152
  containIntrinsicBlockSize: (value: TStyleValue) => TReturn;
153
153
  containIntrinsicInlineSize: (value: TStyleValue) => TReturn;
154
- gridGap: any;
154
+ gridGap: typeof shorthands.gap;
155
155
  gridRowGap: (value: TStyleValue) => TReturn;
156
156
  gridColumnGap: (value: TStyleValue) => TReturn;
157
157
  marginBlockStart: (value: TStyleValue) => TReturn;
158
158
  marginBlockEnd: (value: TStyleValue) => TReturn;
159
- marginStart: any;
160
- marginEnd: any;
161
- marginHorizontal: any;
162
- marginVertical: any;
159
+ marginStart: typeof shorthands.marginInlineStart;
160
+ marginEnd: typeof shorthands.marginInlineEnd;
161
+ marginHorizontal: typeof shorthands.marginInline;
162
+ marginVertical: typeof shorthands.marginBlock;
163
163
  overflowBlock: (value: TStyleValue) => TReturn;
164
164
  overflowInline: (value: TStyleValue) => TReturn;
165
165
  paddingBlockStart: (rawValue: TStyleValue) => TReturn;
166
166
  paddingBlockEnd: (rawValue: TStyleValue) => TReturn;
167
- paddingStart: any;
168
- paddingEnd: any;
169
- paddingHorizontal: any;
170
- paddingVertical: any;
167
+ paddingStart: typeof shorthands.paddingInlineStart;
168
+ paddingEnd: typeof shorthands.paddingInlineEnd;
169
+ paddingHorizontal: typeof shorthands.paddingInline;
170
+ paddingVertical: typeof shorthands.paddingBlock;
171
171
  scrollMarginBlockStart: (value: TStyleValue) => TReturn;
172
172
  scrollMarginBlockEnd: (value: TStyleValue) => TReturn;
173
173
  insetBlockStart: (value: TStyleValue) => TReturn;
174
174
  insetBlockEnd: (value: TStyleValue) => TReturn;
175
- start: any;
176
- end: any;
175
+ start: typeof shorthands.insetInlineStart;
176
+ end: typeof shorthands.insetInlineEnd;
177
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>;
178
+ declare const $$EXPORT_DEFAULT_DECLARATION$$: Readonly<
179
+ Omit<typeof shorthands, keyof typeof aliases | keyof {}> &
180
+ Omit<typeof aliases, keyof {}> & {}
181
+ >;
182
+ declare type $$EXPORT_DEFAULT_DECLARATION$$ =
183
+ typeof $$EXPORT_DEFAULT_DECLARATION$$;
183
184
  export default $$EXPORT_DEFAULT_DECLARATION$$;
@@ -67,65 +67,71 @@ declare const shorthands: $ReadOnly<{
67
67
  }>;
68
68
 
69
69
  declare const aliases: {
70
- borderHorizontal: $FlowFixMe,
71
- borderVertical: $FlowFixMe,
72
- borderBlockStart: $FlowFixMe,
73
- borderEnd: $FlowFixMe,
74
- borderBlockEnd: $FlowFixMe,
75
- borderStart: $FlowFixMe,
70
+ // @Deprecated
71
+ borderHorizontal: typeof shorthands.borderInline,
72
+ // @Deprecated
73
+ borderVertical: typeof shorthands.borderBlock,
74
+ // @Deprecated
75
+ borderBlockStart: typeof shorthands.borderTop,
76
+ // @Deprecated
77
+ borderEnd: typeof shorthands.borderInlineEnd,
78
+ // @Deprecated
79
+ borderBlockEnd: typeof shorthands.borderBottom,
80
+ // @Deprecated
81
+ borderStart: typeof shorthands.borderInlineStart,
76
82
  blockSize: (val: TStyleValue) => TReturn,
77
83
  inlineSize: (val: TStyleValue) => TReturn,
78
84
  minBlockSize: (val: TStyleValue) => TReturn,
79
85
  minInlineSize: (val: TStyleValue) => TReturn,
80
86
  maxBlockSize: (val: TStyleValue) => TReturn,
81
87
  maxInlineSize: (val: TStyleValue) => TReturn,
82
- borderHorizontalWidth: $FlowFixMe,
83
- borderHorizontalStyle: $FlowFixMe,
84
- borderHorizontalColor: $FlowFixMe,
85
- borderVerticalWidth: $FlowFixMe,
86
- borderVerticalStyle: $FlowFixMe,
87
- borderVerticalColor: $FlowFixMe,
88
+ borderHorizontalWidth: typeof shorthands.borderInlineWidth,
89
+ borderHorizontalStyle: typeof shorthands.borderInlineStyle,
90
+ borderHorizontalColor: typeof shorthands.borderInlineColor,
91
+ borderVerticalWidth: typeof shorthands.borderBlockWidth,
92
+ borderVerticalStyle: typeof shorthands.borderBlockStyle,
93
+ borderVerticalColor: typeof shorthands.borderBlockColor,
88
94
  borderBlockStartColor: (value: TStyleValue) => TReturn,
89
95
  borderBlockEndColor: (value: TStyleValue) => TReturn,
90
96
  borderBlockStartStyle: (value: TStyleValue) => TReturn,
91
97
  borderBlockEndStyle: (value: TStyleValue) => TReturn,
92
98
  borderBlockStartWidth: (value: TStyleValue) => TReturn,
93
99
  borderBlockEndWidth: (value: TStyleValue) => TReturn,
94
- borderStartColor: $FlowFixMe,
95
- borderEndColor: $FlowFixMe,
96
- borderStartStyle: $FlowFixMe,
97
- borderEndStyle: $FlowFixMe,
98
- borderStartWidth: $FlowFixMe,
99
- borderEndWidth: $FlowFixMe,
100
+ borderStartColor: typeof shorthands.borderInlineStartColor,
101
+ borderEndColor: typeof shorthands.borderInlineEndColor,
102
+ borderStartStyle: typeof shorthands.borderInlineStartStyle,
103
+ borderEndStyle: typeof shorthands.borderInlineEndStyle,
104
+ borderStartWidth: typeof shorthands.borderInlineStartWidth,
105
+ borderEndWidth: typeof shorthands.borderInlineEndWidth,
100
106
  borderTopStartRadius: (value: TStyleValue) => TReturn,
101
107
  borderTopEndRadius: (value: TStyleValue) => TReturn,
102
108
  borderBottomStartRadius: (value: TStyleValue) => TReturn,
103
109
  borderBottomEndRadius: (value: TStyleValue) => TReturn,
104
110
  containIntrinsicBlockSize: (value: TStyleValue) => TReturn,
105
111
  containIntrinsicInlineSize: (value: TStyleValue) => TReturn,
106
- gridGap: $FlowFixMe,
112
+ gridGap: typeof shorthands.gap,
107
113
  gridRowGap: (value: TStyleValue) => TReturn,
108
114
  gridColumnGap: (value: TStyleValue) => TReturn,
109
115
  marginBlockStart: (value: TStyleValue) => TReturn,
110
116
  marginBlockEnd: (value: TStyleValue) => TReturn,
111
- marginStart: $FlowFixMe,
112
- marginEnd: $FlowFixMe,
113
- marginHorizontal: $FlowFixMe,
114
- marginVertical: $FlowFixMe,
117
+ marginStart: typeof shorthands.marginInlineStart,
118
+ marginEnd: typeof shorthands.marginInlineEnd,
119
+ marginHorizontal: typeof shorthands.marginInline,
120
+ marginVertical: typeof shorthands.marginBlock,
115
121
  overflowBlock: (value: TStyleValue) => TReturn,
116
122
  overflowInline: (value: TStyleValue) => TReturn,
117
123
  paddingBlockStart: (rawValue: TStyleValue) => TReturn,
118
124
  paddingBlockEnd: (rawValue: TStyleValue) => TReturn,
119
- paddingStart: $FlowFixMe,
120
- paddingEnd: $FlowFixMe,
121
- paddingHorizontal: $FlowFixMe,
122
- paddingVertical: $FlowFixMe,
125
+ paddingStart: typeof shorthands.paddingInlineStart,
126
+ paddingEnd: typeof shorthands.paddingInlineEnd,
127
+ paddingHorizontal: typeof shorthands.paddingInline,
128
+ paddingVertical: typeof shorthands.paddingBlock,
123
129
  scrollMarginBlockStart: (value: TStyleValue) => TReturn,
124
130
  scrollMarginBlockEnd: (value: TStyleValue) => TReturn,
125
131
  insetBlockStart: (value: TStyleValue) => TReturn,
126
132
  insetBlockEnd: (value: TStyleValue) => TReturn,
127
- start: $FlowFixMe,
128
- end: $FlowFixMe,
133
+ start: typeof shorthands.insetInlineStart,
134
+ end: typeof shorthands.insetInlineEnd,
129
135
  };
130
136
 
131
137
  declare export default $ReadOnly<{
@@ -9,5 +9,5 @@
9
9
 
10
10
  export declare function validateNamespace(
11
11
  namespace: unknown,
12
- conditions: ReadonlyArray<string>,
12
+ conditions?: ReadonlyArray<string>,
13
13
  ): void;
@@ -9,5 +9,5 @@
9
9
 
10
10
  declare export function validateNamespace(
11
11
  namespace: mixed,
12
- conditions: $ReadOnlyArray<string>,
12
+ conditions?: $ReadOnlyArray<string>,
13
13
  ): void;
@@ -9,7 +9,9 @@
9
9
 
10
10
  import type { TStyleValue } from '../common-types';
11
11
  export declare const LOGICAL_FLOAT_START_VAR: '--stylex-logical-start';
12
+ export declare type LOGICAL_FLOAT_START_VAR = typeof LOGICAL_FLOAT_START_VAR;
12
13
  export declare const LOGICAL_FLOAT_END_VAR: '--stylex-logical-end';
14
+ export declare type LOGICAL_FLOAT_END_VAR = typeof LOGICAL_FLOAT_END_VAR;
13
15
  /**
14
16
  * Shorthand properties:
15
17
  * - [x] all - Should be banned
@@ -111,8 +113,8 @@ declare const shorthands: Readonly<{
111
113
  declare const aliases: {
112
114
  insetBlockStart: (val: TStyleValue) => TReturn;
113
115
  insetBlockEnd: (val: TStyleValue) => TReturn;
114
- insetInlineStart: any;
115
- insetInlineEnd: any;
116
+ insetInlineStart: typeof shorthands.start;
117
+ insetInlineEnd: typeof shorthands.end;
116
118
  blockSize: (val: TStyleValue) => TReturn;
117
119
  inlineSize: (val: TStyleValue) => TReturn;
118
120
  minBlockSize: (val: TStyleValue) => TReturn;
@@ -121,41 +123,46 @@ declare const aliases: {
121
123
  maxInlineSize: (val: TStyleValue) => TReturn;
122
124
  borderStart: (val: TStyleValue) => TReturn;
123
125
  borderEnd: (val: TStyleValue) => TReturn;
124
- borderBlockWidth: any;
125
- borderBlockStyle: any;
126
- borderBlockColor: any;
126
+ borderBlockWidth: typeof shorthands.borderVerticalWidth;
127
+ borderBlockStyle: typeof shorthands.borderVerticalStyle;
128
+ borderBlockColor: typeof shorthands.borderVerticalColor;
127
129
  borderBlockStartWidth: (val: TStyleValue) => TReturn;
128
130
  borderBlockStartStyle: (val: TStyleValue) => TReturn;
129
131
  borderBlockStartColor: (val: TStyleValue) => TReturn;
130
132
  borderBlockEndWidth: (val: TStyleValue) => TReturn;
131
133
  borderBlockEndStyle: (val: TStyleValue) => TReturn;
132
134
  borderBlockEndColor: (val: TStyleValue) => TReturn;
133
- borderInlineWidth: any;
134
- borderInlineStyle: any;
135
- borderInlineColor: any;
135
+ borderInlineWidth: typeof shorthands.borderHorizontalWidth;
136
+ borderInlineStyle: typeof shorthands.borderHorizontalStyle;
137
+ borderInlineColor: typeof shorthands.borderHorizontalColor;
136
138
  borderTopStartRadius: (val: TStyleValue) => TReturn;
137
139
  borderTopEndRadius: (val: TStyleValue) => TReturn;
138
140
  borderBottomStartRadius: (val: TStyleValue) => TReturn;
139
141
  borderBottomEndRadius: (val: TStyleValue) => TReturn;
140
- gridGap: any;
142
+ gridGap: typeof shorthands.gap;
141
143
  gridRowGap: (value: TStyleValue) => TReturn;
142
144
  gridColumnGap: (value: TStyleValue) => TReturn;
143
- marginBlock: any;
145
+ marginBlock: typeof shorthands.marginVertical;
144
146
  marginBlockStart: (val: TStyleValue) => TReturn;
145
147
  marginBlockEnd: (val: TStyleValue) => TReturn;
146
- marginInline: any;
148
+ marginInline: typeof shorthands.marginHorizontal;
147
149
  overflowBlock: (value: TStyleValue) => TReturn;
148
150
  overflowInline: (value: TStyleValue) => TReturn;
149
- paddingBlock: any;
151
+ paddingBlock: typeof shorthands.paddingVertical;
150
152
  paddingBlockStart: (val: TStyleValue) => TReturn;
151
153
  paddingBlockEnd: (val: TStyleValue) => TReturn;
152
- paddingInline: any;
154
+ paddingInline: typeof shorthands.paddingHorizontal;
153
155
  scrollMarginBlockStart: (value: TStyleValue) => TReturn;
154
156
  scrollMarginBlockEnd: (value: TStyleValue) => TReturn;
155
157
  float: (value: TStyleValue) => TReturn;
156
158
  clear: (value: TStyleValue) => TReturn;
157
159
  };
158
- declare const expansions: Omit<shorthands, keyof (aliases | {})> &
159
- Omit<aliases, keyof ({})> & {};
160
+ declare const expansions: Omit<
161
+ typeof shorthands,
162
+ keyof typeof aliases | keyof {}
163
+ > &
164
+ Omit<typeof aliases, keyof {}> & {};
160
165
  declare const $$EXPORT_DEFAULT_DECLARATION$$: typeof expansions;
166
+ declare type $$EXPORT_DEFAULT_DECLARATION$$ =
167
+ typeof $$EXPORT_DEFAULT_DECLARATION$$;
161
168
  export default $$EXPORT_DEFAULT_DECLARATION$$;
@@ -91,8 +91,8 @@ declare const shorthands: $ReadOnly<{
91
91
  declare const aliases: {
92
92
  insetBlockStart: (val: TStyleValue) => TReturn,
93
93
  insetBlockEnd: (val: TStyleValue) => TReturn,
94
- insetInlineStart: $FlowFixMe,
95
- insetInlineEnd: $FlowFixMe,
94
+ insetInlineStart: typeof shorthands.start,
95
+ insetInlineEnd: typeof shorthands.end,
96
96
  blockSize: (val: TStyleValue) => TReturn,
97
97
  inlineSize: (val: TStyleValue) => TReturn,
98
98
  minBlockSize: (val: TStyleValue) => TReturn,
@@ -101,41 +101,41 @@ declare const aliases: {
101
101
  maxInlineSize: (val: TStyleValue) => TReturn,
102
102
  borderStart: (val: TStyleValue) => TReturn,
103
103
  borderEnd: (val: TStyleValue) => TReturn,
104
- borderBlockWidth: $FlowFixMe,
105
- borderBlockStyle: $FlowFixMe,
106
- borderBlockColor: $FlowFixMe,
104
+ borderBlockWidth: typeof shorthands.borderVerticalWidth,
105
+ borderBlockStyle: typeof shorthands.borderVerticalStyle,
106
+ borderBlockColor: typeof shorthands.borderVerticalColor,
107
107
  borderBlockStartWidth: (val: TStyleValue) => TReturn,
108
108
  borderBlockStartStyle: (val: TStyleValue) => TReturn,
109
109
  borderBlockStartColor: (val: TStyleValue) => TReturn,
110
110
  borderBlockEndWidth: (val: TStyleValue) => TReturn,
111
111
  borderBlockEndStyle: (val: TStyleValue) => TReturn,
112
112
  borderBlockEndColor: (val: TStyleValue) => TReturn,
113
- borderInlineWidth: $FlowFixMe,
114
- borderInlineStyle: $FlowFixMe,
115
- borderInlineColor: $FlowFixMe,
113
+ borderInlineWidth: typeof shorthands.borderHorizontalWidth,
114
+ borderInlineStyle: typeof shorthands.borderHorizontalStyle,
115
+ borderInlineColor: typeof shorthands.borderHorizontalColor,
116
116
  borderTopStartRadius: (val: TStyleValue) => TReturn,
117
117
  borderTopEndRadius: (val: TStyleValue) => TReturn,
118
118
  borderBottomStartRadius: (val: TStyleValue) => TReturn,
119
119
  borderBottomEndRadius: (val: TStyleValue) => TReturn,
120
- gridGap: $FlowFixMe,
120
+ gridGap: typeof shorthands.gap,
121
121
  gridRowGap: (value: TStyleValue) => TReturn,
122
122
  gridColumnGap: (value: TStyleValue) => TReturn,
123
- marginBlock: $FlowFixMe,
123
+ marginBlock: typeof shorthands.marginVertical,
124
124
  marginBlockStart: (val: TStyleValue) => TReturn,
125
125
  marginBlockEnd: (val: TStyleValue) => TReturn,
126
- marginInline: $FlowFixMe,
126
+ marginInline: typeof shorthands.marginHorizontal,
127
127
  overflowBlock: (value: TStyleValue) => TReturn,
128
128
  overflowInline: (value: TStyleValue) => TReturn,
129
- paddingBlock: $FlowFixMe,
129
+ paddingBlock: typeof shorthands.paddingVertical,
130
130
  paddingBlockStart: (val: TStyleValue) => TReturn,
131
131
  paddingBlockEnd: (val: TStyleValue) => TReturn,
132
- paddingInline: $FlowFixMe,
132
+ paddingInline: typeof shorthands.paddingHorizontal,
133
133
  scrollMarginBlockStart: (value: TStyleValue) => TReturn,
134
134
  scrollMarginBlockEnd: (value: TStyleValue) => TReturn,
135
135
  float: (value: TStyleValue) => TReturn,
136
136
  clear: (value: TStyleValue) => TReturn,
137
137
  };
138
138
 
139
- declare const expansions: { ...shorthands, ...aliases };
139
+ declare const expansions: { ...typeof shorthands, ...typeof aliases };
140
140
 
141
141
  declare export default typeof expansions;
@@ -13,12 +13,12 @@ declare const shorthands: Readonly<{
13
13
  [key: string]: ($$PARAM_0$$: TStyleValue) => TReturn;
14
14
  }>;
15
15
  declare const aliases: {
16
- borderHorizontal: any;
17
- borderVertical: any;
18
- borderBlockStart: any;
19
- borderEnd: any;
20
- borderBlockEnd: any;
21
- borderStart: any;
16
+ borderHorizontal: typeof shorthands.borderInline;
17
+ borderVertical: typeof shorthands.borderBlock;
18
+ borderBlockStart: typeof shorthands.borderTop;
19
+ borderEnd: typeof shorthands.borderInlineEnd;
20
+ borderBlockEnd: typeof shorthands.borderBottom;
21
+ borderStart: typeof shorthands.borderInlineStart;
22
22
  blockSize: (val: TStyleValue) => TReturn;
23
23
  inlineSize: (val: TStyleValue) => TReturn;
24
24
  minBlockSize: (val: TStyleValue) => TReturn;
@@ -70,9 +70,10 @@ declare const aliases: {
70
70
  start: (val: TStyleValue) => TReturn;
71
71
  end: (val: TStyleValue) => TReturn;
72
72
  };
73
- declare const $$EXPORT_DEFAULT_DECLARATION$$: Readonly</**
74
- * > 85 | ...typeof shorthands,
75
- * | ^^^^^^^^^^^^^^^^^^^^ Unsupported feature: Translating "object types with complex spreads" is currently not supported.
76
- **/
77
- any>;
73
+ declare const $$EXPORT_DEFAULT_DECLARATION$$: Readonly<
74
+ Omit<typeof shorthands, keyof typeof aliases | keyof {}> &
75
+ Omit<typeof aliases, keyof {}> & {}
76
+ >;
77
+ declare type $$EXPORT_DEFAULT_DECLARATION$$ =
78
+ typeof $$EXPORT_DEFAULT_DECLARATION$$;
78
79
  export default $$EXPORT_DEFAULT_DECLARATION$$;
@@ -23,12 +23,18 @@ declare const shorthands: $ReadOnly<{
23
23
  }>;
24
24
 
25
25
  declare const aliases: {
26
- borderHorizontal: $FlowFixMe,
27
- borderVertical: $FlowFixMe,
28
- borderBlockStart: $FlowFixMe,
29
- borderEnd: $FlowFixMe,
30
- borderBlockEnd: $FlowFixMe,
31
- borderStart: $FlowFixMe,
26
+ // @Deprecated
27
+ borderHorizontal: typeof shorthands.borderInline,
28
+ // @Deprecated
29
+ borderVertical: typeof shorthands.borderBlock,
30
+ // @Deprecated
31
+ borderBlockStart: typeof shorthands.borderTop,
32
+ // @Deprecated
33
+ borderEnd: typeof shorthands.borderInlineEnd,
34
+ // @Deprecated
35
+ borderBlockEnd: typeof shorthands.borderBottom,
36
+ // @Deprecated
37
+ borderStart: typeof shorthands.borderInlineStart,
32
38
  blockSize: (val: TStyleValue) => TReturn,
33
39
  inlineSize: (val: TStyleValue) => TReturn,
34
40
  minBlockSize: (val: TStyleValue) => TReturn,
@@ -12,7 +12,7 @@ import type { ConstsConfig } from './stylex-consts-utils';
12
12
  declare function styleXDefineConsts<Vars extends ConstsConfig>(
13
13
  constants: Vars,
14
14
  options: Readonly<
15
- Omit<Partial<StyleXOptions>, keyof ({ exportId: string })> & {
15
+ Omit<Partial<StyleXOptions>, keyof { exportId: string }> & {
16
16
  exportId: string;
17
17
  }
18
18
  >,
@@ -12,6 +12,6 @@ declare function styleXKeyframes(
12
12
  frames: {
13
13
  readonly [$$Key$$: string]: { readonly [$$Key$$: string]: string | number };
14
14
  },
15
- options: StyleXOptions,
15
+ options?: StyleXOptions,
16
16
  ): [string, InjectableStyle];
17
17
  export default styleXKeyframes;
@@ -16,5 +16,5 @@ import type { InjectableStyle, StyleXOptions } from './common-types';
16
16
  // `stylex.create`.
17
17
  declare export default function styleXKeyframes(
18
18
  frames: { +[string]: { +[string]: string | number } },
19
- options: StyleXOptions,
19
+ options?: StyleXOptions,
20
20
  ): [string, InjectableStyle];
@@ -10,6 +10,6 @@
10
10
  import type { InjectableStyle, StyleXOptions } from './common-types';
11
11
  declare function styleXPositionTry(
12
12
  styles: { readonly [$$Key$$: string]: string | number },
13
- options: StyleXOptions,
13
+ options?: StyleXOptions,
14
14
  ): [string, InjectableStyle];
15
15
  export default styleXPositionTry;
@@ -14,5 +14,5 @@ import type { InjectableStyle, StyleXOptions } from './common-types';
14
14
  // The generated string must be prefixed with -- for anchor positioning
15
15
  declare export default function styleXPositionTry(
16
16
  styles: { +[string]: string | number },
17
- options: StyleXOptions,
17
+ options?: StyleXOptions,
18
18
  ): [string, InjectableStyle];
@@ -17,8 +17,8 @@ export type VarsConfig = Readonly<{
17
17
  export declare function collectVarsByAtRule(
18
18
  key: string,
19
19
  $$PARAM_1$$: { readonly nameHash: string; readonly value: VarsConfigValue },
20
- collection: { [$$Key$$: string]: Array<string> },
21
- atRules: Array<string>,
20
+ collection?: { [$$Key$$: string]: Array<string> },
21
+ atRules?: Array<string>,
22
22
  ): void;
23
23
  export declare function wrapWithAtRules(ltr: string, atRule: string): string;
24
24
  export declare function priorityForAtRule(atRule: string): number;
@@ -19,9 +19,9 @@ export type VarsConfig = $ReadOnly<{
19
19
 
20
20
  declare export function collectVarsByAtRule(
21
21
  key: string,
22
- { +nameHash: string, +value: VarsConfigValue },
23
- collection: { [string]: Array<string> },
24
- atRules: Array<string>,
22
+ $$PARAM_1$$: { +nameHash: string, +value: VarsConfigValue },
23
+ collection?: { [string]: Array<string> },
24
+ atRules?: Array<string>,
25
25
  ): void;
26
26
 
27
27
  declare export function wrapWithAtRules(ltr: string, atRule: string): string;
@@ -17,6 +17,6 @@ type StyleObj = {
17
17
  };
18
18
  declare function styleXViewTransitionClass(
19
19
  styles: StyleObj,
20
- options: StyleXOptions,
20
+ options?: StyleXOptions,
21
21
  ): [string, InjectableStyle];
22
22
  export default styleXViewTransitionClass;
@@ -19,5 +19,5 @@ type StyleObj = {
19
19
 
20
20
  declare export default function styleXViewTransitionClass(
21
21
  styles: StyleObj,
22
- options: StyleXOptions,
22
+ options?: StyleXOptions,
23
23
  ): [string, InjectableStyle];
@@ -49,6 +49,7 @@ export interface CSSType<_T extends string | number = string | number> {
49
49
  export declare const isCSSType: (
50
50
  value: unknown,
51
51
  ) => value is CSSType<string | number>;
52
+ export declare type isCSSType = typeof isCSSType;
52
53
  type AngleValue = string;
53
54
  export declare class Angle<T extends AngleValue>
54
55
  extends BaseCSSType
@@ -64,6 +65,7 @@ export declare class Angle<T extends AngleValue>
64
65
  export declare const angle: <T extends AngleValue = AngleValue>(
65
66
  value: ValueWithDefault,
66
67
  ) => Angle<T>;
68
+ export declare type angle = typeof angle;
67
69
  type ColorValue = string;
68
70
  export declare class Color<T extends ColorValue>
69
71
  extends BaseCSSType
@@ -78,6 +80,7 @@ export declare class Color<T extends ColorValue>
78
80
  export declare const color: <T extends ColorValue = ColorValue>(
79
81
  value: ValueWithDefault,
80
82
  ) => Color<T>;
83
+ export declare type color = typeof color;
81
84
  type URLValue = string;
82
85
  export declare class Url<T extends URLValue>
83
86
  extends BaseCSSType
@@ -90,6 +93,7 @@ export declare class Url<T extends URLValue>
90
93
  export declare const url: <T extends URLValue = URLValue>(
91
94
  value: ValueWithDefault,
92
95
  ) => Url<T>;
96
+ export declare type url = typeof url;
93
97
  type ImageValue = string;
94
98
  export declare class Image<T extends ImageValue>
95
99
  extends Url<T>
@@ -105,6 +109,7 @@ export declare class Image<T extends ImageValue>
105
109
  export declare const image: <T extends ImageValue = ImageValue>(
106
110
  value: ValueWithDefault,
107
111
  ) => Image<T>;
112
+ export declare type image = typeof image;
108
113
  type IntegerValue = number;
109
114
  export declare class Integer<T extends IntegerValue>
110
115
  extends BaseCSSType
@@ -117,6 +122,7 @@ export declare class Integer<T extends IntegerValue>
117
122
  export declare const integer: <T extends IntegerValue = IntegerValue>(
118
123
  value: T,
119
124
  ) => Integer<T>;
125
+ export declare type integer = typeof integer;
120
126
  type LengthPercentageValue = string;
121
127
  export declare class LengthPercentage<_T extends LengthPercentageValue>
122
128
  extends BaseCSSType
@@ -136,6 +142,7 @@ export declare const lengthPercentage: <
136
142
  >(
137
143
  value: ValueWithDefault,
138
144
  ) => LengthPercentage<string>;
145
+ export declare type lengthPercentage = typeof lengthPercentage;
139
146
  type LengthValue = number | string;
140
147
  export declare class Length<_T extends LengthValue>
141
148
  extends LengthPercentage<string>
@@ -150,6 +157,7 @@ export declare class Length<_T extends LengthValue>
150
157
  export declare const length: <T extends LengthValue = LengthValue>(
151
158
  value: NestedWithNumbers,
152
159
  ) => Length<T>;
160
+ export declare type length = typeof length;
153
161
  type PercentageValue = string | number;
154
162
  export declare class Percentage<_T extends PercentageValue>
155
163
  extends LengthPercentage<string>
@@ -164,6 +172,7 @@ export declare class Percentage<_T extends PercentageValue>
164
172
  export declare const percentage: <T extends PercentageValue = PercentageValue>(
165
173
  value: NestedWithNumbers,
166
174
  ) => Percentage<T>;
175
+ export declare type percentage = typeof percentage;
167
176
  type NumberValue = number;
168
177
  export declare class Num<T extends NumberValue>
169
178
  extends BaseCSSType
@@ -178,6 +187,7 @@ export declare class Num<T extends NumberValue>
178
187
  export declare const number: <T extends NumberValue = NumberValue>(
179
188
  value: NestedWithNumbers,
180
189
  ) => Num<T>;
190
+ export declare type number = typeof number;
181
191
  type ResolutionValue = string | 0;
182
192
  export declare class Resolution<T extends ResolutionValue>
183
193
  extends BaseCSSType
@@ -192,6 +202,7 @@ export declare class Resolution<T extends ResolutionValue>
192
202
  export declare const resolution: <T extends ResolutionValue = ResolutionValue>(
193
203
  value: ValueWithDefault,
194
204
  ) => Resolution<T>;
205
+ export declare type resolution = typeof resolution;
195
206
  type TimeValue = string | 0;
196
207
  export declare class Time<T extends TimeValue>
197
208
  extends BaseCSSType
@@ -206,6 +217,7 @@ export declare class Time<T extends TimeValue>
206
217
  export declare const time: <T extends TimeValue = TimeValue>(
207
218
  value: ValueWithDefault,
208
219
  ) => Time<T>;
220
+ export declare type time = typeof time;
209
221
  type TransformFunctionValue = string;
210
222
  export declare class TransformFunction<T extends TransformFunctionValue>
211
223
  extends BaseCSSType
@@ -222,6 +234,7 @@ export declare const transformFunction: <
222
234
  >(
223
235
  value: ValueWithDefault,
224
236
  ) => TransformFunction<T>;
237
+ export declare type transformFunction = typeof transformFunction;
225
238
  type TransformListValue = string;
226
239
  export declare class TransformList<T extends TransformListValue>
227
240
  extends BaseCSSType
@@ -238,3 +251,4 @@ export declare const transformList: <
238
251
  >(
239
252
  value: ValueWithDefault,
240
253
  ) => TransformList<T>;
254
+ export declare type transformList = typeof transformList;
@@ -13,7 +13,7 @@ export declare function convertStyleToClassName(
13
13
  pseudos: ReadonlyArray<string>,
14
14
  atRules: ReadonlyArray<string>,
15
15
  constRules: ReadonlyArray<string>,
16
- options: StyleXOptions,
16
+ options?: StyleXOptions,
17
17
  ): StyleRule;
18
18
  declare function variableFallbacks(
19
19
  values: ReadonlyArray<string>,
@@ -21,7 +21,7 @@ declare export function convertStyleToClassName(
21
21
  pseudos: $ReadOnlyArray<string>,
22
22
  atRules: $ReadOnlyArray<string>,
23
23
  constRules: $ReadOnlyArray<string>,
24
- options: StyleXOptions,
24
+ options?: StyleXOptions,
25
25
  ): StyleRule;
26
26
 
27
27
  declare export default function variableFallbacks(
@@ -9,3 +9,4 @@
9
9
 
10
10
  import type { StyleXOptions } from '../common-types';
11
11
  export declare const defaultOptions: StyleXOptions;
12
+ export declare type defaultOptions = typeof defaultOptions;