@stylexjs/babel-plugin 0.15.0 → 0.15.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/babel-path-utils.d.ts +1100 -0
- package/lib/babel-path-utils.js.flow +1108 -0
- package/lib/index.js +151 -98
- package/lib/shared/utils/genCSSRule.d.ts +15 -0
- package/lib/shared/utils/genCSSRule.js.flow +15 -0
- package/lib/utils/ast-helpers.d.ts +37 -0
- package/lib/utils/ast-helpers.js.flow +44 -0
- package/lib/utils/state-manager.d.ts +0 -16
- package/lib/utils/state-manager.js.flow +0 -18
- package/lib/visitors/stylex-attrs.d.ts +21 -0
- package/lib/visitors/stylex-attrs.js.flow +25 -0
- package/lib/visitors/stylex-create/index.d.ts +17 -0
- package/lib/visitors/stylex-create/index.js.flow +24 -0
- package/lib/visitors/stylex-create/parse-stylex-create-arg.d.ts +37 -0
- package/lib/visitors/stylex-create/parse-stylex-create-arg.js.flow +41 -0
- package/package.json +4 -5
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
* @flow strict
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/* eslint-disable no-unused-vars */
|
|
11
|
+
import type { NodePath } from '../../../flow_modules/@babel/traverse';
|
|
12
|
+
import * as t from '../../../flow_modules/@babel/types';
|
|
13
|
+
import StateManager from '../../utils/state-manager';
|
|
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
|
+
|
|
30
|
+
// This
|
|
31
|
+
declare export function evaluateStyleXCreateArg(
|
|
32
|
+
path: NodePath<>,
|
|
33
|
+
traversalState: StateManager,
|
|
34
|
+
functions: FunctionConfig,
|
|
35
|
+
): $ReadOnly<{
|
|
36
|
+
confident: boolean,
|
|
37
|
+
value: any,
|
|
38
|
+
deopt?: null | NodePath<>,
|
|
39
|
+
reason?: string,
|
|
40
|
+
fns?: DynamicFns,
|
|
41
|
+
}>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stylexjs/babel-plugin",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.2",
|
|
4
4
|
"description": "StyleX babel plugin.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"repository": {
|
|
@@ -21,9 +21,8 @@
|
|
|
21
21
|
"@babel/traverse": "^7.26.8",
|
|
22
22
|
"@babel/types": "^7.26.8",
|
|
23
23
|
"@dual-bundle/import-meta-resolve": "^4.1.0",
|
|
24
|
-
"@stylexjs/stylex": "0.15.
|
|
25
|
-
"postcss-value-parser": "^4.1.0"
|
|
26
|
-
"style-value-parser": "0.15.0"
|
|
24
|
+
"@stylexjs/stylex": "0.15.2",
|
|
25
|
+
"postcss-value-parser": "^4.1.0"
|
|
27
26
|
},
|
|
28
27
|
"devDependencies": {
|
|
29
28
|
"@rollup/plugin-alias": "^5.1.1",
|
|
@@ -34,7 +33,7 @@
|
|
|
34
33
|
"@rollup/plugin-replace": "^6.0.1",
|
|
35
34
|
"babel-plugin-syntax-hermes-parser": "^0.26.0",
|
|
36
35
|
"rollup": "^4.24.0",
|
|
37
|
-
"scripts": "0.15.
|
|
36
|
+
"scripts": "0.15.2"
|
|
38
37
|
},
|
|
39
38
|
"files": [
|
|
40
39
|
"flow_modules/*",
|