@stylexjs/stylex 0.17.2 → 0.17.4
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/inject.d.ts +8 -6
- package/lib/cjs/inject.js +7 -1
- package/lib/cjs/inject.js.flow +6 -3
- package/lib/cjs/types/StyleXTypes.d.ts +2 -1
- package/lib/es/inject.d.ts +8 -6
- package/lib/es/inject.js.flow +6 -3
- package/lib/es/inject.mjs +7 -1
- package/lib/es/types/StyleXTypes.d.ts +2 -1
- package/package.json +2 -2
package/lib/cjs/inject.d.ts
CHANGED
|
@@ -7,10 +7,12 @@
|
|
|
7
7
|
*
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
type InjectArgs = Readonly<{
|
|
11
|
+
ltr: string;
|
|
12
|
+
rtl?: null | undefined | string;
|
|
13
|
+
priority: number;
|
|
14
|
+
constKey?: string;
|
|
15
|
+
constVal?: string | number;
|
|
16
|
+
}>;
|
|
17
|
+
declare function inject(args: InjectArgs): string;
|
|
16
18
|
export default inject;
|
package/lib/cjs/inject.js
CHANGED
|
@@ -314,7 +314,13 @@ function updateDependentRules(constKey) {
|
|
|
314
314
|
sheet.update(oldText, newText, priority);
|
|
315
315
|
});
|
|
316
316
|
}
|
|
317
|
-
function inject(
|
|
317
|
+
function inject(args) {
|
|
318
|
+
const {
|
|
319
|
+
ltr: cssText,
|
|
320
|
+
priority,
|
|
321
|
+
constKey,
|
|
322
|
+
constVal
|
|
323
|
+
} = args;
|
|
318
324
|
if (constKey !== undefined && constVal !== undefined) {
|
|
319
325
|
const hadPreviousValue = constants[constKey] !== undefined;
|
|
320
326
|
const valueChanged = hadPreviousValue && constants[constKey] !== constVal;
|
package/lib/cjs/inject.js.flow
CHANGED
|
@@ -7,9 +7,12 @@
|
|
|
7
7
|
* @flow strict
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
type InjectArgs = $ReadOnly<{
|
|
11
|
+
ltr: string,
|
|
12
|
+
rtl?: ?string,
|
|
12
13
|
priority: number,
|
|
13
14
|
constKey?: string,
|
|
14
15
|
constVal?: string | number,
|
|
15
|
-
|
|
16
|
+
}>;
|
|
17
|
+
|
|
18
|
+
declare export default function inject(args: InjectArgs): string;
|
|
@@ -86,7 +86,8 @@ export type NestedCSSPropTypes = Partial<
|
|
|
86
86
|
}>
|
|
87
87
|
>;
|
|
88
88
|
|
|
89
|
-
type
|
|
89
|
+
type NotUndefined = {} | null;
|
|
90
|
+
type UserAuthoredStyles = CSSPropertiesWithExtras | { [key: string]: NotUndefined };
|
|
90
91
|
export type StyleXSingleStyle = false | (null | undefined | NestedCSSPropTypes);
|
|
91
92
|
// NOTE: `XStyle` has been deprecated in favor of `StaticStyles` and `StyleXStyles`.
|
|
92
93
|
|
package/lib/es/inject.d.ts
CHANGED
|
@@ -7,10 +7,12 @@
|
|
|
7
7
|
*
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
type InjectArgs = Readonly<{
|
|
11
|
+
ltr: string;
|
|
12
|
+
rtl?: null | undefined | string;
|
|
13
|
+
priority: number;
|
|
14
|
+
constKey?: string;
|
|
15
|
+
constVal?: string | number;
|
|
16
|
+
}>;
|
|
17
|
+
declare function inject(args: InjectArgs): string;
|
|
16
18
|
export default inject;
|
package/lib/es/inject.js.flow
CHANGED
|
@@ -7,9 +7,12 @@
|
|
|
7
7
|
* @flow strict
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
type InjectArgs = $ReadOnly<{
|
|
11
|
+
ltr: string,
|
|
12
|
+
rtl?: ?string,
|
|
12
13
|
priority: number,
|
|
13
14
|
constKey?: string,
|
|
14
15
|
constVal?: string | number,
|
|
15
|
-
|
|
16
|
+
}>;
|
|
17
|
+
|
|
18
|
+
declare export default function inject(args: InjectArgs): string;
|
package/lib/es/inject.mjs
CHANGED
|
@@ -312,7 +312,13 @@ function updateDependentRules(constKey) {
|
|
|
312
312
|
sheet.update(oldText, newText, priority);
|
|
313
313
|
});
|
|
314
314
|
}
|
|
315
|
-
function inject(
|
|
315
|
+
function inject(args) {
|
|
316
|
+
const {
|
|
317
|
+
ltr: cssText,
|
|
318
|
+
priority,
|
|
319
|
+
constKey,
|
|
320
|
+
constVal
|
|
321
|
+
} = args;
|
|
316
322
|
if (constKey !== undefined && constVal !== undefined) {
|
|
317
323
|
const hadPreviousValue = constants[constKey] !== undefined;
|
|
318
324
|
const valueChanged = hadPreviousValue && constants[constKey] !== constVal;
|
|
@@ -86,7 +86,8 @@ export type NestedCSSPropTypes = Partial<
|
|
|
86
86
|
}>
|
|
87
87
|
>;
|
|
88
88
|
|
|
89
|
-
type
|
|
89
|
+
type NotUndefined = {} | null;
|
|
90
|
+
type UserAuthoredStyles = CSSPropertiesWithExtras | { [key: string]: NotUndefined };
|
|
90
91
|
export type StyleXSingleStyle = false | (null | undefined | NestedCSSPropTypes);
|
|
91
92
|
// NOTE: `XStyle` has been deprecated in favor of `StaticStyles` and `StyleXStyles`.
|
|
92
93
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stylexjs/stylex",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.4",
|
|
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": "^10.1.0",
|
|
62
62
|
"rimraf": "^6.1.2",
|
|
63
63
|
"rollup": "^4.24.0",
|
|
64
|
-
"scripts": "0.17.
|
|
64
|
+
"scripts": "0.17.4"
|
|
65
65
|
},
|
|
66
66
|
"files": [
|
|
67
67
|
"lib/*"
|