builder.io 1.1.40 → 1.1.42
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/cli/index.cjs +295 -293
- package/cli/index.cjs.map +4 -4
- package/core/index.cjs +58 -58
- package/core/index.mjs +58 -58
- package/figma/index.cjs +1 -1
- package/node/index.cjs +30 -30
- package/node/index.mjs +17 -17
- package/package.json +1 -1
- package/server/index.cjs +6 -6
- package/server/index.mjs +5 -5
- package/types/common/ast/imported-statements.d.ts +4 -0
- package/types/common/ast/imported-statements.unit.d.ts +1 -0
- package/types/common/typescript.d.ts +1 -1
- package/types/common/utils.d.ts +1 -0
- package/types/core/adapters/react/react-components.d.ts +4 -4
- package/types/figma/index.d.ts +7 -0
- package/types/types.d.ts +3 -1
|
@@ -2,10 +2,10 @@ import type ts from "typescript";
|
|
|
2
2
|
import type { AppDependency, ComponentInfo, DevToolsSys } from "../../../types";
|
|
3
3
|
import type { ReactDevToolsSys } from "./index";
|
|
4
4
|
export declare function parseReactAllComponentSourceInputs(sys: DevToolsSys, components: ComponentInfo[]): Promise<ComponentInfo[]>;
|
|
5
|
-
export declare function parseReactComponentSourceInputs(sys: DevToolsSys, srcCmp: ReactComponentSource, tsProgram: ts.Program | null): Promise<import("../../../types").ComponentInput[]>;
|
|
6
|
-
export declare function getReactComponentsFromPath(sys: DevToolsSys, filePath: string): Promise<ReactComponentSource[] | null>;
|
|
7
|
-
export declare function getReactComponentsFromCode(sys: DevToolsSys, filePath: string, code: string): Promise<ReactComponentSource[]>;
|
|
8
|
-
export declare function getReactComponentsFromSourceFile(sys: DevToolsSys, typeChecker: ts.TypeChecker | null, filePath: string, sourceFile: ts.SourceFile): Promise<ReactComponentSource[]>;
|
|
5
|
+
export declare function parseReactComponentSourceInputs(sys: DevToolsSys, srcCmp: ReactComponentSource, tsProgram: ts.Program | null, includeImports: boolean): Promise<import("../../../types").ComponentInput[]>;
|
|
6
|
+
export declare function getReactComponentsFromPath(sys: DevToolsSys, filePath: string, includeImports: boolean): Promise<ReactComponentSource[] | null>;
|
|
7
|
+
export declare function getReactComponentsFromCode(sys: DevToolsSys, filePath: string, code: string, includeImports?: boolean): Promise<ReactComponentSource[]>;
|
|
8
|
+
export declare function getReactComponentsFromSourceFile(sys: DevToolsSys, typeChecker: ts.TypeChecker | null, filePath: string, sourceFile: ts.SourceFile, includeImports: boolean): Promise<ReactComponentSource[]>;
|
|
9
9
|
export declare function getReactSourceComponentsFromDir(sys: ReactDevToolsSys, tsProgram: ts.Program): Promise<ReactComponentSource[]>;
|
|
10
10
|
export interface ReactComponentSourceNode {
|
|
11
11
|
name: string;
|
package/types/figma/index.d.ts
CHANGED
|
@@ -74,4 +74,11 @@ export interface FigmaTokenMapper {
|
|
|
74
74
|
}
|
|
75
75
|
export declare function figmaMapping<T extends BaseFigmaProps = FigmaProps>(_config: FigmaMappingWithKeyMapper<T> | FigmaMappingWithUrlMapper<T> | FigmaGenericMapper | FigmaTokenMapper): void;
|
|
76
76
|
export declare function explicitFalse(value: any): any;
|
|
77
|
+
export interface ChildElement<P = any> {
|
|
78
|
+
type: any;
|
|
79
|
+
props: P;
|
|
80
|
+
key: string | null;
|
|
81
|
+
}
|
|
82
|
+
export type ChildrenNode = ChildElement | string | number | Iterable<ChildrenNode> | boolean | null | undefined;
|
|
83
|
+
export type ComponentProps<T> = T extends (props: infer P) => any ? P : any;
|
|
77
84
|
export {};
|
package/types/types.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import type { spawnSync } from "node:child_process";
|
|
1
3
|
export interface DevToolsPath {
|
|
2
4
|
basename: (path: string, suffix?: string) => string;
|
|
3
5
|
extname: (path: string) => string;
|
|
@@ -25,7 +27,7 @@ export interface DevToolsSys extends DevToolsPath {
|
|
|
25
27
|
readdirSync: (path: string) => string[];
|
|
26
28
|
readFile: (filePath: string) => Promise<string | null>;
|
|
27
29
|
readFileSync: (filePath: string) => string | null;
|
|
28
|
-
|
|
30
|
+
spawnSync: typeof spawnSync | undefined;
|
|
29
31
|
stat: (path: string) => Promise<{
|
|
30
32
|
isDirectory: () => boolean;
|
|
31
33
|
isFile: () => boolean;
|