builder.io 1.6.15 → 1.6.16
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 +211 -218
- package/cli/index.cjs.map +4 -4
- package/core/index.cjs +1 -1
- package/core/index.mjs +1 -1
- package/figma/index.cjs +1 -1
- package/figma/index.mjs +1 -1
- package/node/index.cjs +1 -1
- package/node/index.mjs +1 -1
- package/package.json +5 -6
- package/server/index.cjs +101 -111
- package/server/index.mjs +102 -112
- package/types/_tests_/dev-tools.e2e.d.ts +1 -0
- package/types/cli/code.d.ts +1 -12
- package/types/cli/figma-publish.d.ts +1 -4
- package/types/cli/figma-utils.d.ts +1 -21
- package/types/cli/generate.d.ts +5 -6
- package/types/figma/index.d.ts +1 -10
- package/types/tsconfig.tsbuildinfo +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/types/cli/code.d.ts
CHANGED
|
@@ -1,17 +1,6 @@
|
|
|
1
1
|
import type { DevToolsSys } from "../types";
|
|
2
2
|
import type { CLIArgs } from "./index";
|
|
3
|
-
|
|
4
|
-
client: string;
|
|
5
|
-
clientVersion: string;
|
|
6
|
-
nodeVersion: string;
|
|
7
|
-
systemPlatform: string;
|
|
8
|
-
systemEOL: string;
|
|
9
|
-
systemArch: string;
|
|
10
|
-
frameworks: string[];
|
|
11
|
-
systemShell?: string;
|
|
12
|
-
inGitRepo?: boolean;
|
|
13
|
-
[key: string]: string[] | string | boolean | undefined;
|
|
14
|
-
}
|
|
3
|
+
import type { UserContext } from "$/ai-utils";
|
|
15
4
|
export interface CustomInstruction {
|
|
16
5
|
id: string;
|
|
17
6
|
name: string;
|
|
@@ -2,13 +2,10 @@ import ts from "typescript";
|
|
|
2
2
|
import type { DevTools, DevToolsSys, RepoInfo } from "../types";
|
|
3
3
|
import type { CLIArgs } from "./index";
|
|
4
4
|
import { type FigmaBuilderLink } from "./figma-utils";
|
|
5
|
-
import {
|
|
5
|
+
import type { UserContext } from "$/ai-utils";
|
|
6
6
|
export declare const runFigmaPublish: (sys: DevToolsSys, args: CLIArgs) => Promise<undefined>;
|
|
7
7
|
export declare const FIGMA_CONNECT_CALL = "figmaMapping";
|
|
8
8
|
export declare function findAllMappingFiles(sys: DevToolsSys): Promise<string[]>;
|
|
9
|
-
export interface FigmaBuilderData {
|
|
10
|
-
figmaBuilderLinks: FigmaBuilderLink[];
|
|
11
|
-
}
|
|
12
9
|
export declare function setPublicKey(sys: DevToolsSys, publicKey: string, devTools: DevTools | undefined, ensureFigmaImportPage?: boolean): Promise<boolean>;
|
|
13
10
|
export interface PublishedMapping {
|
|
14
11
|
repoInfo: RepoInfo | undefined;
|
|
@@ -1,16 +1,7 @@
|
|
|
1
1
|
import { type Credentials, type FigmaAuth } from "./credentials";
|
|
2
2
|
import type { DevToolsSys, ExportType } from "../types";
|
|
3
3
|
import type { CLIArgs } from "./index";
|
|
4
|
-
|
|
5
|
-
id: string;
|
|
6
|
-
name: string;
|
|
7
|
-
value?: any;
|
|
8
|
-
type: string;
|
|
9
|
-
baseType: "text" | "variant" | "boolean" | "slot";
|
|
10
|
-
variantOptions?: string[];
|
|
11
|
-
isDefault: boolean;
|
|
12
|
-
ref?: string;
|
|
13
|
-
}
|
|
4
|
+
import type { FigmaComponentInfo } from "$/ai-utils";
|
|
14
5
|
export interface FigmaBuilderLink {
|
|
15
6
|
builderName: string;
|
|
16
7
|
figmaName: string;
|
|
@@ -24,17 +15,6 @@ export interface FigmaBuilderLink {
|
|
|
24
15
|
source: string;
|
|
25
16
|
loc?: string;
|
|
26
17
|
}
|
|
27
|
-
export interface FigmaComponentInfo {
|
|
28
|
-
documentName: string;
|
|
29
|
-
key: string;
|
|
30
|
-
tree: string;
|
|
31
|
-
jsx: string;
|
|
32
|
-
name: string;
|
|
33
|
-
inputs: FigmaComponentInput[];
|
|
34
|
-
description: string;
|
|
35
|
-
documentationLinks: string[];
|
|
36
|
-
instanceId: string;
|
|
37
|
-
}
|
|
38
18
|
export declare const REMOVE_EMOJI: RegExp;
|
|
39
19
|
export declare const parseFigmaURL: (str: string) => {
|
|
40
20
|
fileID: string;
|
package/types/cli/generate.d.ts
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import type { ComponentInfo, ComponentRegistry, DevToolsSys } from "../types";
|
|
2
2
|
import type { CLIArgs } from "./index";
|
|
3
|
-
import {
|
|
4
|
-
import { type FigmaComponentInfo } from "./figma-utils";
|
|
3
|
+
import type { FigmaComponentInfo, UserContext } from "$/ai-utils";
|
|
5
4
|
export declare const runFigmaGenerate: (sys: DevToolsSys, args: CLIArgs) => Promise<undefined>;
|
|
6
5
|
export interface MappingCodeV3 {
|
|
7
|
-
figmaNode
|
|
8
|
-
registry
|
|
6
|
+
figmaNode?: FigmaComponentInfo;
|
|
7
|
+
registry?: ComponentRegistry;
|
|
9
8
|
userContext?: UserContext;
|
|
10
|
-
figmaUrl
|
|
9
|
+
figmaUrl?: string;
|
|
11
10
|
docsUrl?: string;
|
|
12
|
-
registeredCmp
|
|
11
|
+
registeredCmp?: ComponentInfo;
|
|
13
12
|
previousCompletion?: string;
|
|
14
13
|
userPrompt?: string;
|
|
15
14
|
token?: string;
|
package/types/figma/index.d.ts
CHANGED
|
@@ -1,14 +1,5 @@
|
|
|
1
|
+
import type { FigmaComponentInput } from "$/ai-utils";
|
|
1
2
|
export type FigmaNodeType = "COMPONENT" | "ELLIPSE" | "FRAME" | "GROUP" | "INSTANCE" | "LINE" | "POLYGON" | "RECTANGLE" | "STAR" | "TEXT" | "VECTOR";
|
|
2
|
-
export interface FigmaComponentInput {
|
|
3
|
-
id: string;
|
|
4
|
-
name: string;
|
|
5
|
-
value?: any;
|
|
6
|
-
type: string;
|
|
7
|
-
baseType: "text" | "variant" | "boolean" | "slot";
|
|
8
|
-
variantOptions?: string[];
|
|
9
|
-
isDefault: boolean;
|
|
10
|
-
ref?: string;
|
|
11
|
-
}
|
|
12
3
|
export interface FigmaNode {
|
|
13
4
|
"@type": "passedNode";
|
|
14
5
|
$id: string;
|