@stylexjs/stylex 0.14.0 → 0.14.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/types/StyleXTypes.d.ts +52 -51
- package/lib/es/types/StyleXTypes.d.ts +52 -51
- package/package.json +2 -2
|
@@ -94,56 +94,56 @@ export type Keyframes = Readonly<{ [name: string]: CSSProperties }>;
|
|
|
94
94
|
|
|
95
95
|
export type PositionTry = Readonly<{
|
|
96
96
|
// Anchor Positioning Properties
|
|
97
|
-
positionAnchor?: CSSProperties['positionAnchor']
|
|
98
|
-
positionArea?: CSSProperties['positionArea']
|
|
97
|
+
positionAnchor?: CSSProperties['positionAnchor'];
|
|
98
|
+
positionArea?: CSSProperties['positionArea'];
|
|
99
99
|
// inset Properties
|
|
100
|
-
top?: CSSProperties['top']
|
|
101
|
-
right?: CSSProperties['right']
|
|
102
|
-
bottom?: CSSProperties['bottom']
|
|
103
|
-
left?: CSSProperties['left']
|
|
104
|
-
inset?: CSSProperties['inset']
|
|
105
|
-
insetBlock?: CSSProperties['insetBlock']
|
|
106
|
-
insetBlockEnd?: CSSProperties['insetBlockEnd']
|
|
107
|
-
insetBlockStart?: CSSProperties['insetBlockStart']
|
|
108
|
-
insetInline?: CSSProperties['insetInline']
|
|
109
|
-
insetInlineEnd?: CSSProperties['insetInlineEnd']
|
|
110
|
-
insetInlineStart?: CSSProperties['insetInlineStart']
|
|
100
|
+
top?: CSSProperties['top'];
|
|
101
|
+
right?: CSSProperties['right'];
|
|
102
|
+
bottom?: CSSProperties['bottom'];
|
|
103
|
+
left?: CSSProperties['left'];
|
|
104
|
+
inset?: CSSProperties['inset'];
|
|
105
|
+
insetBlock?: CSSProperties['insetBlock'];
|
|
106
|
+
insetBlockEnd?: CSSProperties['insetBlockEnd'];
|
|
107
|
+
insetBlockStart?: CSSProperties['insetBlockStart'];
|
|
108
|
+
insetInline?: CSSProperties['insetInline'];
|
|
109
|
+
insetInlineEnd?: CSSProperties['insetInlineEnd'];
|
|
110
|
+
insetInlineStart?: CSSProperties['insetInlineStart'];
|
|
111
111
|
// margin Properties
|
|
112
|
-
margin?: CSSProperties['margin']
|
|
113
|
-
marginBlock?: CSSProperties['marginBlock']
|
|
114
|
-
marginBlockEnd?: CSSProperties['marginBlockEnd']
|
|
115
|
-
marginBlockStart?: CSSProperties['marginBlockStart']
|
|
116
|
-
marginInline?: CSSProperties['marginInline']
|
|
117
|
-
marginInlineEnd?: CSSProperties['marginInlineEnd']
|
|
118
|
-
marginInlineStart?: CSSProperties['marginInlineStart']
|
|
119
|
-
marginTop?: CSSProperties['marginTop']
|
|
120
|
-
marginBottom?: CSSProperties['marginBottom']
|
|
121
|
-
marginLeft?: CSSProperties['marginLeft']
|
|
122
|
-
marginRight?: CSSProperties['marginRight']
|
|
112
|
+
margin?: CSSProperties['margin'];
|
|
113
|
+
marginBlock?: CSSProperties['marginBlock'];
|
|
114
|
+
marginBlockEnd?: CSSProperties['marginBlockEnd'];
|
|
115
|
+
marginBlockStart?: CSSProperties['marginBlockStart'];
|
|
116
|
+
marginInline?: CSSProperties['marginInline'];
|
|
117
|
+
marginInlineEnd?: CSSProperties['marginInlineEnd'];
|
|
118
|
+
marginInlineStart?: CSSProperties['marginInlineStart'];
|
|
119
|
+
marginTop?: CSSProperties['marginTop'];
|
|
120
|
+
marginBottom?: CSSProperties['marginBottom'];
|
|
121
|
+
marginLeft?: CSSProperties['marginLeft'];
|
|
122
|
+
marginRight?: CSSProperties['marginRight'];
|
|
123
123
|
// size properties
|
|
124
|
-
width?: CSSProperties['width']
|
|
125
|
-
height?: CSSProperties['height']
|
|
126
|
-
minWidth?: CSSProperties['minWidth']
|
|
127
|
-
minHeight?: CSSProperties['minHeight']
|
|
128
|
-
maxWidth?: CSSProperties['maxWidth']
|
|
129
|
-
maxHeight?: CSSProperties['maxHeight']
|
|
130
|
-
blockSize?: CSSProperties['blockSize']
|
|
131
|
-
inlineSize?: CSSProperties['inlineSize']
|
|
132
|
-
minBlockSize?: CSSProperties['minBlockSize']
|
|
133
|
-
minInlineSize?: CSSProperties['minInlineSize']
|
|
134
|
-
maxBlockSize?: CSSProperties['maxBlockSize']
|
|
135
|
-
maxInlineSize?: CSSProperties['maxInlineSize']
|
|
124
|
+
width?: CSSProperties['width'];
|
|
125
|
+
height?: CSSProperties['height'];
|
|
126
|
+
minWidth?: CSSProperties['minWidth'];
|
|
127
|
+
minHeight?: CSSProperties['minHeight'];
|
|
128
|
+
maxWidth?: CSSProperties['maxWidth'];
|
|
129
|
+
maxHeight?: CSSProperties['maxHeight'];
|
|
130
|
+
blockSize?: CSSProperties['blockSize'];
|
|
131
|
+
inlineSize?: CSSProperties['inlineSize'];
|
|
132
|
+
minBlockSize?: CSSProperties['minBlockSize'];
|
|
133
|
+
minInlineSize?: CSSProperties['minInlineSize'];
|
|
134
|
+
maxBlockSize?: CSSProperties['maxBlockSize'];
|
|
135
|
+
maxInlineSize?: CSSProperties['maxInlineSize'];
|
|
136
136
|
// self alignment properties
|
|
137
|
-
alignSelf?: CSSProperties['alignSelf']
|
|
138
|
-
justifySelf?: CSSProperties['justifySelf']
|
|
139
|
-
placeSelf?: CSSProperties['placeSelf']
|
|
137
|
+
alignSelf?: CSSProperties['alignSelf'];
|
|
138
|
+
justifySelf?: CSSProperties['justifySelf'];
|
|
139
|
+
placeSelf?: CSSProperties['placeSelf'];
|
|
140
140
|
}>;
|
|
141
141
|
|
|
142
142
|
export type ViewTransitionClass = Readonly<{
|
|
143
|
-
group?: CSSProperties
|
|
144
|
-
imagePair?: CSSProperties
|
|
145
|
-
old?: CSSProperties
|
|
146
|
-
new?: CSSProperties
|
|
143
|
+
group?: CSSProperties;
|
|
144
|
+
imagePair?: CSSProperties;
|
|
145
|
+
old?: CSSProperties;
|
|
146
|
+
new?: CSSProperties;
|
|
147
147
|
}>;
|
|
148
148
|
|
|
149
149
|
export type LegacyThemeStyles = Readonly<{ [constantName: string]: string }>;
|
|
@@ -193,7 +193,9 @@ export type CompiledStyles =
|
|
|
193
193
|
|
|
194
194
|
declare const StyleXInlineStylesTag: unique symbol;
|
|
195
195
|
|
|
196
|
-
export type InlineStyles =
|
|
196
|
+
export type InlineStyles = {
|
|
197
|
+
_opaque: typeof StyleXInlineStylesTag;
|
|
198
|
+
};
|
|
197
199
|
|
|
198
200
|
type _GenStylePropType<CSS extends UserAuthoredStyles> = Readonly<{
|
|
199
201
|
[Key in keyof CSS]: StyleXClassNameFor<Key, Readonly<CSS[Key]>>;
|
|
@@ -242,11 +244,13 @@ export type VarGroup<
|
|
|
242
244
|
|
|
243
245
|
export type TokensFromVarGroup<T extends VarGroup<{}>> = T['__tokens'];
|
|
244
246
|
|
|
245
|
-
export type IDFromVarGroup<T extends VarGroup<{}>> =
|
|
246
|
-
T['__opaqueId'];
|
|
247
|
+
export type IDFromVarGroup<T extends VarGroup<{}>> = T['__opaqueId'];
|
|
247
248
|
|
|
248
249
|
type TTokens = Readonly<{
|
|
249
|
-
[key: string]:
|
|
250
|
+
[key: string]:
|
|
251
|
+
| CSSType<null | string | number>
|
|
252
|
+
| string
|
|
253
|
+
| { [key: string]: string };
|
|
250
254
|
}>;
|
|
251
255
|
|
|
252
256
|
type UnwrapVars<T> = T extends StyleXVar<infer U> ? U : T;
|
|
@@ -280,10 +284,7 @@ export type StyleX$DefineVars = <
|
|
|
280
284
|
declare class ThemeKey<out VG extends VarGroup<{}>> extends String {
|
|
281
285
|
private varGroup: VG;
|
|
282
286
|
}
|
|
283
|
-
export type Theme<
|
|
284
|
-
T extends VarGroup<{}>,
|
|
285
|
-
Tag extends symbol = symbol,
|
|
286
|
-
> = Tag &
|
|
287
|
+
export type Theme<T extends VarGroup<{}>, Tag extends symbol = symbol> = Tag &
|
|
287
288
|
Readonly<{
|
|
288
289
|
theme: StyleXClassNameFor<ThemeKey<T>, IDFromVarGroup<T>>;
|
|
289
290
|
}>;
|
|
@@ -94,56 +94,56 @@ export type Keyframes = Readonly<{ [name: string]: CSSProperties }>;
|
|
|
94
94
|
|
|
95
95
|
export type PositionTry = Readonly<{
|
|
96
96
|
// Anchor Positioning Properties
|
|
97
|
-
positionAnchor?: CSSProperties['positionAnchor']
|
|
98
|
-
positionArea?: CSSProperties['positionArea']
|
|
97
|
+
positionAnchor?: CSSProperties['positionAnchor'];
|
|
98
|
+
positionArea?: CSSProperties['positionArea'];
|
|
99
99
|
// inset Properties
|
|
100
|
-
top?: CSSProperties['top']
|
|
101
|
-
right?: CSSProperties['right']
|
|
102
|
-
bottom?: CSSProperties['bottom']
|
|
103
|
-
left?: CSSProperties['left']
|
|
104
|
-
inset?: CSSProperties['inset']
|
|
105
|
-
insetBlock?: CSSProperties['insetBlock']
|
|
106
|
-
insetBlockEnd?: CSSProperties['insetBlockEnd']
|
|
107
|
-
insetBlockStart?: CSSProperties['insetBlockStart']
|
|
108
|
-
insetInline?: CSSProperties['insetInline']
|
|
109
|
-
insetInlineEnd?: CSSProperties['insetInlineEnd']
|
|
110
|
-
insetInlineStart?: CSSProperties['insetInlineStart']
|
|
100
|
+
top?: CSSProperties['top'];
|
|
101
|
+
right?: CSSProperties['right'];
|
|
102
|
+
bottom?: CSSProperties['bottom'];
|
|
103
|
+
left?: CSSProperties['left'];
|
|
104
|
+
inset?: CSSProperties['inset'];
|
|
105
|
+
insetBlock?: CSSProperties['insetBlock'];
|
|
106
|
+
insetBlockEnd?: CSSProperties['insetBlockEnd'];
|
|
107
|
+
insetBlockStart?: CSSProperties['insetBlockStart'];
|
|
108
|
+
insetInline?: CSSProperties['insetInline'];
|
|
109
|
+
insetInlineEnd?: CSSProperties['insetInlineEnd'];
|
|
110
|
+
insetInlineStart?: CSSProperties['insetInlineStart'];
|
|
111
111
|
// margin Properties
|
|
112
|
-
margin?: CSSProperties['margin']
|
|
113
|
-
marginBlock?: CSSProperties['marginBlock']
|
|
114
|
-
marginBlockEnd?: CSSProperties['marginBlockEnd']
|
|
115
|
-
marginBlockStart?: CSSProperties['marginBlockStart']
|
|
116
|
-
marginInline?: CSSProperties['marginInline']
|
|
117
|
-
marginInlineEnd?: CSSProperties['marginInlineEnd']
|
|
118
|
-
marginInlineStart?: CSSProperties['marginInlineStart']
|
|
119
|
-
marginTop?: CSSProperties['marginTop']
|
|
120
|
-
marginBottom?: CSSProperties['marginBottom']
|
|
121
|
-
marginLeft?: CSSProperties['marginLeft']
|
|
122
|
-
marginRight?: CSSProperties['marginRight']
|
|
112
|
+
margin?: CSSProperties['margin'];
|
|
113
|
+
marginBlock?: CSSProperties['marginBlock'];
|
|
114
|
+
marginBlockEnd?: CSSProperties['marginBlockEnd'];
|
|
115
|
+
marginBlockStart?: CSSProperties['marginBlockStart'];
|
|
116
|
+
marginInline?: CSSProperties['marginInline'];
|
|
117
|
+
marginInlineEnd?: CSSProperties['marginInlineEnd'];
|
|
118
|
+
marginInlineStart?: CSSProperties['marginInlineStart'];
|
|
119
|
+
marginTop?: CSSProperties['marginTop'];
|
|
120
|
+
marginBottom?: CSSProperties['marginBottom'];
|
|
121
|
+
marginLeft?: CSSProperties['marginLeft'];
|
|
122
|
+
marginRight?: CSSProperties['marginRight'];
|
|
123
123
|
// size properties
|
|
124
|
-
width?: CSSProperties['width']
|
|
125
|
-
height?: CSSProperties['height']
|
|
126
|
-
minWidth?: CSSProperties['minWidth']
|
|
127
|
-
minHeight?: CSSProperties['minHeight']
|
|
128
|
-
maxWidth?: CSSProperties['maxWidth']
|
|
129
|
-
maxHeight?: CSSProperties['maxHeight']
|
|
130
|
-
blockSize?: CSSProperties['blockSize']
|
|
131
|
-
inlineSize?: CSSProperties['inlineSize']
|
|
132
|
-
minBlockSize?: CSSProperties['minBlockSize']
|
|
133
|
-
minInlineSize?: CSSProperties['minInlineSize']
|
|
134
|
-
maxBlockSize?: CSSProperties['maxBlockSize']
|
|
135
|
-
maxInlineSize?: CSSProperties['maxInlineSize']
|
|
124
|
+
width?: CSSProperties['width'];
|
|
125
|
+
height?: CSSProperties['height'];
|
|
126
|
+
minWidth?: CSSProperties['minWidth'];
|
|
127
|
+
minHeight?: CSSProperties['minHeight'];
|
|
128
|
+
maxWidth?: CSSProperties['maxWidth'];
|
|
129
|
+
maxHeight?: CSSProperties['maxHeight'];
|
|
130
|
+
blockSize?: CSSProperties['blockSize'];
|
|
131
|
+
inlineSize?: CSSProperties['inlineSize'];
|
|
132
|
+
minBlockSize?: CSSProperties['minBlockSize'];
|
|
133
|
+
minInlineSize?: CSSProperties['minInlineSize'];
|
|
134
|
+
maxBlockSize?: CSSProperties['maxBlockSize'];
|
|
135
|
+
maxInlineSize?: CSSProperties['maxInlineSize'];
|
|
136
136
|
// self alignment properties
|
|
137
|
-
alignSelf?: CSSProperties['alignSelf']
|
|
138
|
-
justifySelf?: CSSProperties['justifySelf']
|
|
139
|
-
placeSelf?: CSSProperties['placeSelf']
|
|
137
|
+
alignSelf?: CSSProperties['alignSelf'];
|
|
138
|
+
justifySelf?: CSSProperties['justifySelf'];
|
|
139
|
+
placeSelf?: CSSProperties['placeSelf'];
|
|
140
140
|
}>;
|
|
141
141
|
|
|
142
142
|
export type ViewTransitionClass = Readonly<{
|
|
143
|
-
group?: CSSProperties
|
|
144
|
-
imagePair?: CSSProperties
|
|
145
|
-
old?: CSSProperties
|
|
146
|
-
new?: CSSProperties
|
|
143
|
+
group?: CSSProperties;
|
|
144
|
+
imagePair?: CSSProperties;
|
|
145
|
+
old?: CSSProperties;
|
|
146
|
+
new?: CSSProperties;
|
|
147
147
|
}>;
|
|
148
148
|
|
|
149
149
|
export type LegacyThemeStyles = Readonly<{ [constantName: string]: string }>;
|
|
@@ -193,7 +193,9 @@ export type CompiledStyles =
|
|
|
193
193
|
|
|
194
194
|
declare const StyleXInlineStylesTag: unique symbol;
|
|
195
195
|
|
|
196
|
-
export type InlineStyles =
|
|
196
|
+
export type InlineStyles = {
|
|
197
|
+
_opaque: typeof StyleXInlineStylesTag;
|
|
198
|
+
};
|
|
197
199
|
|
|
198
200
|
type _GenStylePropType<CSS extends UserAuthoredStyles> = Readonly<{
|
|
199
201
|
[Key in keyof CSS]: StyleXClassNameFor<Key, Readonly<CSS[Key]>>;
|
|
@@ -242,11 +244,13 @@ export type VarGroup<
|
|
|
242
244
|
|
|
243
245
|
export type TokensFromVarGroup<T extends VarGroup<{}>> = T['__tokens'];
|
|
244
246
|
|
|
245
|
-
export type IDFromVarGroup<T extends VarGroup<{}>> =
|
|
246
|
-
T['__opaqueId'];
|
|
247
|
+
export type IDFromVarGroup<T extends VarGroup<{}>> = T['__opaqueId'];
|
|
247
248
|
|
|
248
249
|
type TTokens = Readonly<{
|
|
249
|
-
[key: string]:
|
|
250
|
+
[key: string]:
|
|
251
|
+
| CSSType<null | string | number>
|
|
252
|
+
| string
|
|
253
|
+
| { [key: string]: string };
|
|
250
254
|
}>;
|
|
251
255
|
|
|
252
256
|
type UnwrapVars<T> = T extends StyleXVar<infer U> ? U : T;
|
|
@@ -280,10 +284,7 @@ export type StyleX$DefineVars = <
|
|
|
280
284
|
declare class ThemeKey<out VG extends VarGroup<{}>> extends String {
|
|
281
285
|
private varGroup: VG;
|
|
282
286
|
}
|
|
283
|
-
export type Theme<
|
|
284
|
-
T extends VarGroup<{}>,
|
|
285
|
-
Tag extends symbol = symbol,
|
|
286
|
-
> = Tag &
|
|
287
|
+
export type Theme<T extends VarGroup<{}>, Tag extends symbol = symbol> = Tag &
|
|
287
288
|
Readonly<{
|
|
288
289
|
theme: StyleXClassNameFor<ThemeKey<T>, IDFromVarGroup<T>>;
|
|
289
290
|
}>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stylexjs/stylex",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.2",
|
|
4
4
|
"description": "A library for defining styles for optimized user interfaces.",
|
|
5
5
|
"main": "./lib/cjs/stylex.js",
|
|
6
6
|
"module": "./lib/es/stylex.mjs",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"cross-env": "^7.0.3",
|
|
57
57
|
"rimraf": "^5.0.10",
|
|
58
58
|
"rollup": "^4.24.0",
|
|
59
|
-
"scripts": "0.14.
|
|
59
|
+
"scripts": "0.14.2"
|
|
60
60
|
},
|
|
61
61
|
"files": [
|
|
62
62
|
"lib/*"
|