@stylexjs/babel-plugin 0.7.5 → 0.9.0-beta.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.
|
@@ -11,6 +11,19 @@ import type { NodePath } from '@babel/traverse';
|
|
|
11
11
|
import * as t from '@babel/types';
|
|
12
12
|
import StateManager from '../../utils/state-manager';
|
|
13
13
|
import { type FunctionConfig } from '../../utils/evaluate-path';
|
|
14
|
+
type TInlineStyles = {
|
|
15
|
+
[$$Key$$: string]: {
|
|
16
|
+
readonly path: ReadonlyArray<string>;
|
|
17
|
+
readonly originalExpression: t.Expression;
|
|
18
|
+
readonly expression: t.Expression | t.PatternLike;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
type DynamicFns = {
|
|
22
|
+
[$$Key$$: string]: readonly [
|
|
23
|
+
params: Array<t.Identifier>,
|
|
24
|
+
inlineStyles: Readonly<TInlineStyles>,
|
|
25
|
+
];
|
|
26
|
+
};
|
|
14
27
|
export declare function evaluateStyleXCreateArg(
|
|
15
28
|
path: NodePath,
|
|
16
29
|
traversalState: StateManager,
|
|
@@ -19,10 +32,5 @@ export declare function evaluateStyleXCreateArg(
|
|
|
19
32
|
confident: boolean;
|
|
20
33
|
value: any;
|
|
21
34
|
deopt?: null | NodePath;
|
|
22
|
-
fns?:
|
|
23
|
-
[$$Key$$: string]: [
|
|
24
|
-
Array<t.Identifier>,
|
|
25
|
-
{ readonly [$$Key$$: string]: t.Expression | t.PatternLike },
|
|
26
|
-
];
|
|
27
|
-
};
|
|
35
|
+
fns?: DynamicFns;
|
|
28
36
|
}>;
|
|
@@ -12,6 +12,21 @@ import type { NodePath } from '../../../flow_modules/@babel/traverse';
|
|
|
12
12
|
import * as t from '../../../flow_modules/@babel/types';
|
|
13
13
|
import StateManager from '../../utils/state-manager';
|
|
14
14
|
import { type FunctionConfig } from '../../utils/evaluate-path';
|
|
15
|
+
type TInlineStyles = {
|
|
16
|
+
[string]: {
|
|
17
|
+
+path: $ReadOnlyArray<string>,
|
|
18
|
+
+originalExpression: t.Expression,
|
|
19
|
+
+expression: t.Expression | t.PatternLike,
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
type DynamicFns = {
|
|
24
|
+
[string]: [
|
|
25
|
+
+params: Array<t.Identifier>,
|
|
26
|
+
+inlineStyles: $ReadOnly<TInlineStyles>,
|
|
27
|
+
],
|
|
28
|
+
};
|
|
29
|
+
|
|
15
30
|
// This
|
|
16
31
|
declare export function evaluateStyleXCreateArg(
|
|
17
32
|
path: NodePath<>,
|
|
@@ -21,10 +36,5 @@ declare export function evaluateStyleXCreateArg(
|
|
|
21
36
|
confident: boolean,
|
|
22
37
|
value: any,
|
|
23
38
|
deopt?: null | NodePath<>,
|
|
24
|
-
fns?:
|
|
25
|
-
[string]: [
|
|
26
|
-
Array<t.Identifier>,
|
|
27
|
-
{ +[string]: t.Expression | t.PatternLike },
|
|
28
|
-
],
|
|
29
|
-
},
|
|
39
|
+
fns?: DynamicFns,
|
|
30
40
|
}>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stylexjs/babel-plugin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0-beta.1",
|
|
4
4
|
"description": "StyleX babel plugin.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"repository": "https://github.com/facebook/stylex",
|
|
@@ -14,11 +14,12 @@
|
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@babel/helper-module-imports": "^7.22.15",
|
|
17
|
-
"@stylexjs/shared": "0.
|
|
18
|
-
"@stylexjs/stylex": "0.
|
|
19
|
-
"@babel/core": "^7.
|
|
20
|
-
"@babel/traverse": "^7.
|
|
21
|
-
"@babel/types": "^7.
|
|
17
|
+
"@stylexjs/shared": "0.9.0-beta.1",
|
|
18
|
+
"@stylexjs/stylex": "0.9.0-beta.1",
|
|
19
|
+
"@babel/core": "^7.25.8",
|
|
20
|
+
"@babel/traverse": "^7.25.7",
|
|
21
|
+
"@babel/types": "^7.25.8",
|
|
22
|
+
"esm-resolve": "^1.0.11"
|
|
22
23
|
},
|
|
23
24
|
"jest": {
|
|
24
25
|
"verbose": true,
|