@stylexjs/stylex 0.16.0 → 0.16.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.
|
@@ -248,9 +248,9 @@ export type IDFromVarGroup<T extends VarGroup<{}>> = T['__opaqueId'];
|
|
|
248
248
|
|
|
249
249
|
type TTokens = Readonly<{
|
|
250
250
|
[key: string]:
|
|
251
|
-
|
|
|
252
|
-
| string
|
|
253
|
-
|
|
|
251
|
+
| NestedVarObject<null | string | number>
|
|
252
|
+
| StyleXVar<null | string | number>
|
|
253
|
+
| CSSType<null | string | number>;
|
|
254
254
|
}>;
|
|
255
255
|
|
|
256
256
|
type UnwrapVars<T> = T extends StyleXVar<infer U> ? U : T;
|
|
@@ -264,15 +264,16 @@ type NestedVarObject<T> =
|
|
|
264
264
|
| T
|
|
265
265
|
| Readonly<{
|
|
266
266
|
default: NestedVarObject<T>;
|
|
267
|
-
[key:
|
|
267
|
+
[key: AtRuleStr]: NestedVarObject<T>;
|
|
268
268
|
}>;
|
|
269
269
|
|
|
270
270
|
export type StyleX$DefineConsts = <
|
|
271
|
-
DefaultTokens extends
|
|
272
|
-
|
|
271
|
+
DefaultTokens extends {
|
|
272
|
+
[key: string]: number | string;
|
|
273
|
+
},
|
|
273
274
|
>(
|
|
274
275
|
tokens: DefaultTokens,
|
|
275
|
-
) =>
|
|
276
|
+
) => DefaultTokens;
|
|
276
277
|
|
|
277
278
|
export type StyleX$DefineVars = <
|
|
278
279
|
DefaultTokens extends TTokens,
|
|
@@ -223,9 +223,11 @@ export type StyleX$DefineVars = <DefaultTokens: TTokens, ID: string = string>(
|
|
|
223
223
|
tokens: DefaultTokens,
|
|
224
224
|
) => VarGroup<FlattenTokens<DefaultTokens>, ID>;
|
|
225
225
|
|
|
226
|
-
export type StyleX$DefineConsts = <
|
|
226
|
+
export type StyleX$DefineConsts = <
|
|
227
|
+
DefaultTokens: { +[string]: number | string },
|
|
228
|
+
>(
|
|
227
229
|
tokens: DefaultTokens,
|
|
228
|
-
) =>
|
|
230
|
+
) => DefaultTokens;
|
|
229
231
|
|
|
230
232
|
// opaque type ThemeKey<+_VG: VarGroup<{ +[string]: mixed }>>: string = string;
|
|
231
233
|
declare export opaque type Theme<
|
|
@@ -248,9 +248,9 @@ export type IDFromVarGroup<T extends VarGroup<{}>> = T['__opaqueId'];
|
|
|
248
248
|
|
|
249
249
|
type TTokens = Readonly<{
|
|
250
250
|
[key: string]:
|
|
251
|
-
|
|
|
252
|
-
| string
|
|
253
|
-
|
|
|
251
|
+
| NestedVarObject<null | string | number>
|
|
252
|
+
| StyleXVar<null | string | number>
|
|
253
|
+
| CSSType<null | string | number>;
|
|
254
254
|
}>;
|
|
255
255
|
|
|
256
256
|
type UnwrapVars<T> = T extends StyleXVar<infer U> ? U : T;
|
|
@@ -264,15 +264,16 @@ type NestedVarObject<T> =
|
|
|
264
264
|
| T
|
|
265
265
|
| Readonly<{
|
|
266
266
|
default: NestedVarObject<T>;
|
|
267
|
-
[key:
|
|
267
|
+
[key: AtRuleStr]: NestedVarObject<T>;
|
|
268
268
|
}>;
|
|
269
269
|
|
|
270
270
|
export type StyleX$DefineConsts = <
|
|
271
|
-
DefaultTokens extends
|
|
272
|
-
|
|
271
|
+
DefaultTokens extends {
|
|
272
|
+
[key: string]: number | string;
|
|
273
|
+
},
|
|
273
274
|
>(
|
|
274
275
|
tokens: DefaultTokens,
|
|
275
|
-
) =>
|
|
276
|
+
) => DefaultTokens;
|
|
276
277
|
|
|
277
278
|
export type StyleX$DefineVars = <
|
|
278
279
|
DefaultTokens extends TTokens,
|
|
@@ -223,9 +223,11 @@ export type StyleX$DefineVars = <DefaultTokens: TTokens, ID: string = string>(
|
|
|
223
223
|
tokens: DefaultTokens,
|
|
224
224
|
) => VarGroup<FlattenTokens<DefaultTokens>, ID>;
|
|
225
225
|
|
|
226
|
-
export type StyleX$DefineConsts = <
|
|
226
|
+
export type StyleX$DefineConsts = <
|
|
227
|
+
DefaultTokens: { +[string]: number | string },
|
|
228
|
+
>(
|
|
227
229
|
tokens: DefaultTokens,
|
|
228
|
-
) =>
|
|
230
|
+
) => DefaultTokens;
|
|
229
231
|
|
|
230
232
|
// opaque type ThemeKey<+_VG: VarGroup<{ +[string]: mixed }>>: string = string;
|
|
231
233
|
declare export opaque type Theme<
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stylexjs/stylex",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.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",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"cross-env": "^7.0.3",
|
|
62
62
|
"rimraf": "^5.0.10",
|
|
63
63
|
"rollup": "^4.24.0",
|
|
64
|
-
"scripts": "0.16.
|
|
64
|
+
"scripts": "0.16.2"
|
|
65
65
|
},
|
|
66
66
|
"files": [
|
|
67
67
|
"lib/*"
|