@builder.io/dev-tools 1.24.0-dev.202602060949.9613162d0 → 1.24.0-dev.202602061409.e623db468
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 +339 -108
- package/cli/index.cjs.map +2 -2
- package/core/index.cjs +1 -1
- package/core/index.mjs +1 -1
- package/node/index.cjs +1 -1
- package/node/index.mjs +1 -1
- package/package.json +3 -3
- package/server/index.cjs +2 -2
- package/server/index.mjs +2 -2
- package/types/_tests_/utils.d.ts +48 -35
- package/types/cli/abort-signal-any.d.ts +3 -1
- package/types/cli/auth/auth-utils.d.ts +3 -1
- package/types/cli/auth/auth.d.ts +5 -1
- package/types/cli/backup.d.ts +114 -60
- package/types/cli/builder-add/interface.d.ts +21 -4
- package/types/cli/code-file-utils.d.ts +11 -8
- package/types/cli/code.d.ts +13 -3
- package/types/cli/codegen.d.ts +8 -0
- package/types/cli/credentials.d.ts +61 -45
- package/types/cli/detectors/nextjs.d.ts +4 -1
- package/types/cli/detectors/svelte.d.ts +4 -1
- package/types/cli/detectors/vue.d.ts +4 -1
- package/types/cli/download.d.ts +9 -4
- package/types/cli/dsi-mcp.d.ts +4 -1
- package/types/cli/fetch.d.ts +7 -2
- package/types/cli/figma-publish.d.ts +34 -17
- package/types/cli/figma-utils.d.ts +51 -21
- package/types/cli/figma.d.ts +9 -2
- package/types/cli/generate.d.ts +14 -11
- package/types/cli/incremental-tsc.d.ts +19 -7
- package/types/cli/index.d.ts +154 -154
- package/types/cli/launch/InitStateMachine.d.ts +156 -89
- package/types/cli/launch/config.d.ts +13 -3
- package/types/cli/launch/dry-run-backup.d.ts +14 -7
- package/types/cli/launch/errors.d.ts +7 -2
- package/types/cli/launch/grafana.d.ts +5 -1
- package/types/cli/launch/helpers.d.ts +19 -10
- package/types/cli/launch/machine-health.d.ts +8 -3
- package/types/cli/launch/proxy.d.ts +11 -4
- package/types/cli/launch/server.d.ts +19 -12
- package/types/cli/launch/vscode-tunnel-manager.d.ts +77 -68
- package/types/cli/launch.d.ts +109 -106
- package/types/cli/prettier.d.ts +9 -2
- package/types/cli/repo-connect/env-collector.d.ts +16 -11
- package/types/cli/repo-connect/file-collector.d.ts +22 -15
- package/types/cli/repo-connect/git-detector.d.ts +13 -11
- package/types/cli/repo-connect/install-runner.d.ts +8 -5
- package/types/cli/repo-connect/package-detector.d.ts +12 -8
- package/types/cli/repo-connect/repo-connect.d.ts +4 -1
- package/types/cli/repo-indexing/component-discovery.d.ts +30 -17
- package/types/cli/repo-indexing/icons.d.ts +36 -24
- package/types/cli/repo-indexing/installation.d.ts +22 -14
- package/types/cli/repo-indexing/repo-indexing-utils.d.ts +138 -79
- package/types/cli/repo-indexing/repo-indexing.d.ts +37 -17
- package/types/cli/repo-indexing/repo-indexing.mock.d.ts +3 -3
- package/types/cli/repo-indexing/tokens.d.ts +44 -25
- package/types/cli/repo-indexing/types.d.ts +2 -0
- package/types/cli/repo-metrics-utils.d.ts +13 -5
- package/types/cli/repo-metrics.d.ts +4 -1
- package/types/cli/report/figma-report.d.ts +63 -36
- package/types/cli/server-ws.d.ts +40 -32
- package/types/cli/spinner.d.ts +4 -4
- package/types/cli/track.d.ts +4 -1
- package/types/cli/utils/agent-discovery.d.ts +10 -5
- package/types/cli/utils/codegen-utils.d.ts +9 -0
- package/types/cli/utils/component-group-mdx-prompt.d.ts +2 -1
- package/types/cli/utils/discovery-test-utils.d.ts +3 -1
- package/types/cli/utils/env-capture.d.ts +21 -15
- package/types/cli/utils/env-substitution.d.ts +4 -1
- package/types/cli/utils/feature-flags.d.ts +3 -1
- package/types/cli/utils/file-overrides-manager.d.ts +39 -23
- package/types/cli/utils/git.d.ts +28 -16
- package/types/cli/utils/hosts-file-manager.d.ts +7 -4
- package/types/cli/utils/lock-file.d.ts +10 -7
- package/types/cli/utils/parseGitDiff.d.ts +4 -1
- package/types/cli/utils/process-tracker.d.ts +85 -51
- package/types/cli/utils/repo-indexing-agent-prompt.d.ts +1 -1
- package/types/cli/utils/rules-discovery.d.ts +10 -5
- package/types/cli/utils/rules-parser.d.ts +5 -1
- package/types/cli/utils/terminal-buffer.d.ts +23 -23
- package/types/cli/utils/workspace-path-resolver.d.ts +23 -16
- package/types/cli/utils/yaml-frontmatter.d.ts +10 -6
- package/types/client/client-api.d.ts +42 -10
- package/types/client/edit-button/document-listeners.d.ts +3 -1
- package/types/client/edit-button/index.d.ts +6 -6
- package/types/client/menu/index.d.ts +3 -3
- package/types/client/menu/pages/component-detail.d.ts +8 -2
- package/types/client/menu/pages/component-input.d.ts +5 -1
- package/types/client/menu/pages/component-list.d.ts +4 -1
- package/types/client/menu/toggle/menu-toggle.d.ts +4 -1
- package/types/client/setup-ui/overview.d.ts +2 -2
- package/types/client/tracking.d.ts +11 -11
- package/types/client/utils.d.ts +5 -3
- package/types/common/ast/app-dependencies.d.ts +8 -2
- package/types/common/ast/component-info.d.ts +26 -6
- package/types/common/ast/component-input-types.d.ts +28 -9
- package/types/common/ast/component-registry.d.ts +23 -8
- package/types/common/ast/convert-values.d.ts +40 -8
- package/types/common/ast/ensure-array-statement.d.ts +7 -3
- package/types/common/ast/ensure-comments.d.ts +5 -1
- package/types/common/ast/ensure-imports.d.ts +10 -5
- package/types/common/ast/exported-statements.d.ts +8 -4
- package/types/common/ast/imported-statements.d.ts +5 -1
- package/types/common/ast/normalize-statements.d.ts +12 -3
- package/types/common/ast/remove-unused-imports.d.ts +4 -1
- package/types/common/ast/transform.d.ts +13 -3
- package/types/common/ast/utils.d.ts +42 -19
- package/types/common/builder/builder-api.d.ts +32 -23
- package/types/common/builder/builder-sdks.d.ts +10 -8
- package/types/common/builder/content-generation.d.ts +10 -7
- package/types/common/builder/content-ids.d.ts +2 -1
- package/types/common/cache.d.ts +4 -1
- package/types/common/constants.d.ts +2 -1
- package/types/common/dotenv.d.ts +24 -5
- package/types/common/errors.d.ts +50 -22
- package/types/common/fs.d.ts +17 -4
- package/types/common/interactive-select-files.d.ts +16 -2
- package/types/common/mem-sys.d.ts +7 -5
- package/types/common/node-request.d.ts +4 -4
- package/types/common/path.d.ts +1 -3
- package/types/common/test-utils.d.ts +21 -7
- package/types/common/typescript.d.ts +26 -7
- package/types/common/utils.d.ts +36 -8
- package/types/core/adapters/angular/angular-api-key.d.ts +29 -6
- package/types/core/adapters/angular/angular-app-module-imports.d.ts +12 -2
- package/types/core/adapters/angular/angular-app-routes-update.d.ts +6 -1
- package/types/core/adapters/angular/angular-components.d.ts +40 -12
- package/types/core/adapters/angular/angular-ensure-builder-setup.d.ts +9 -3
- package/types/core/adapters/angular/angular-ensure-config-plugin.d.ts +16 -4
- package/types/core/adapters/angular/angular-fix-tsconfig.d.ts +3 -1
- package/types/core/adapters/angular/angular-registry-parse.d.ts +22 -10
- package/types/core/adapters/angular/angular-registry.d.ts +15 -2
- package/types/core/adapters/angular/angular-test-utils.d.ts +8 -4
- package/types/core/adapters/angular/index.d.ts +20 -12
- package/types/core/adapters/angular/types.d.ts +5 -5
- package/types/core/adapters/next/index.d.ts +26 -18
- package/types/core/adapters/next/next-api-key.d.ts +4 -1
- package/types/core/adapters/next/next-component-info.d.ts +9 -2
- package/types/core/adapters/next/next-components.d.ts +4 -1
- package/types/core/adapters/next/next-ensure-builder-setup.d.ts +6 -2
- package/types/core/adapters/next/next-ensure-config-plugin.d.ts +5 -1
- package/types/core/adapters/next/next-registry-parse.d.ts +21 -8
- package/types/core/adapters/next/next-registry.d.ts +15 -2
- package/types/core/adapters/next/next-test-utils.d.ts +21 -11
- package/types/core/adapters/qwik-city/index.d.ts +14 -6
- package/types/core/adapters/qwik-city/qwik-api-key.d.ts +4 -1
- package/types/core/adapters/qwik-city/qwik-component-source-inputs.d.ts +4 -1
- package/types/core/adapters/qwik-city/qwik-components.d.ts +23 -8
- package/types/core/adapters/qwik-city/qwik-ensure-builder-setup.d.ts +6 -2
- package/types/core/adapters/qwik-city/qwik-ensure-config-plugin.d.ts +5 -1
- package/types/core/adapters/qwik-city/qwik-registry-parse.d.ts +22 -10
- package/types/core/adapters/qwik-city/qwik-registry.d.ts +15 -2
- package/types/core/adapters/qwik-city/qwik-test-utils.d.ts +8 -4
- package/types/core/adapters/qwik-city/qwik-ts-program.d.ts +3 -1
- package/types/core/adapters/react/index.d.ts +19 -11
- package/types/core/adapters/react/react-api-key.d.ts +4 -1
- package/types/core/adapters/react/react-builder-sdk-setup.d.ts +3 -1
- package/types/core/adapters/react/react-component-info.d.ts +9 -2
- package/types/core/adapters/react/react-components.d.ts +37 -11
- package/types/core/adapters/react/react-ensure-builder-setup.d.ts +6 -2
- package/types/core/adapters/react/react-registry-parse.d.ts +21 -8
- package/types/core/adapters/react/react-registry.d.ts +15 -2
- package/types/core/adapters/react/react-test-utils.d.ts +11 -5
- package/types/core/adapters/react/react-ts-program.d.ts +3 -1
- package/types/core/adapters/remix/index.d.ts +19 -11
- package/types/core/adapters/remix/remix-api-key.d.ts +4 -1
- package/types/core/adapters/remix/remix-components.d.ts +4 -1
- package/types/core/adapters/remix/remix-ensure-builder-setup.d.ts +9 -3
- package/types/core/adapters/remix/remix-ensure-config-plugin.d.ts +5 -1
- package/types/core/adapters/remix/remix-registry-parse.d.ts +22 -10
- package/types/core/adapters/remix/remix-registry.d.ts +15 -2
- package/types/core/adapters/remix/remix-test-utils.d.ts +11 -5
- package/types/core/adapters/vite/vite-ensure-config-plugin.d.ts +12 -2
- package/types/core/adapters/vue/index.d.ts +20 -12
- package/types/core/adapters/vue/vue-api-key.d.ts +4 -1
- package/types/core/adapters/vue/vue-components.d.ts +10 -2
- package/types/core/adapters/vue/vue-ensure-builder-setup.d.ts +7 -3
- package/types/core/adapters/vue/vue-registry-parse.d.ts +19 -9
- package/types/core/adapters/vue/vue-registry.d.ts +6 -3
- package/types/core/adapters/webpack/webpack-config-helpers.d.ts +8 -3
- package/types/core/adapters/webpack/webpack-ensure-config-plugin.d.ts +5 -1
- package/types/core/create-dev-tools.d.ts +4 -1
- package/types/core/detect-frameworks.d.ts +7 -2
- package/types/core/ensure-config-plugin.d.ts +6 -2
- package/types/core/find-dependencies.d.ts +6 -3
- package/types/core/import-export-registry.d.ts +9 -2
- package/types/core/index.d.ts +18 -3
- package/types/figma/index.d.ts +95 -64
- package/types/node/node-sys.d.ts +13 -6
- package/types/remix/index.d.ts +5 -3
- package/types/server/auth.d.ts +4 -1
- package/types/server/builder-connect.d.ts +21 -6
- package/types/server/client-script.d.ts +6 -2
- package/types/server/create-dev-tools-server.d.ts +3 -1
- package/types/server/dev-tools-api.d.ts +4 -1
- package/types/server/dev-tools-http-server.d.ts +3 -1
- package/types/server/index.d.ts +28 -1
- package/types/server/request-handler.d.ts +6 -1
- package/types/tsconfig.tsbuildinfo +1 -1
- package/types/types/codegen-server.d.ts +1 -1
- package/types/types/connection-tracker.d.ts +34 -34
- package/types/types/proxy-middleware.d.ts +25 -15
- package/types/types/websocket-types.d.ts +9 -7
- package/types/types.d.ts +387 -358
- package/types/vite/main.d.ts +1 -1
- package/types/webpack/main.d.ts +5 -5
- package/types/cli/code-tools.test.d.ts +0 -1
- package/types/cli/github-cli.test.d.ts +0 -1
- package/vendors/darwin-arm64/complete/rg.bash +0 -783
- package/vendors/darwin-arm64/complete/rg.fish +0 -175
- package/vendors/darwin-arm64/doc/rg.1 +0 -2178
- package/vendors/darwin-arm64/rg +0 -0
- package/vendors/darwin-x64/complete/rg.bash +0 -783
- package/vendors/darwin-x64/complete/rg.fish +0 -175
- package/vendors/darwin-x64/doc/rg.1 +0 -2178
- package/vendors/darwin-x64/rg +0 -0
- package/vendors/linux-arm64/complete/rg.bash +0 -783
- package/vendors/linux-arm64/complete/rg.fish +0 -175
- package/vendors/linux-arm64/doc/rg.1 +0 -2178
- package/vendors/linux-arm64/rg +0 -0
- package/vendors/linux-x64/complete/rg.bash +0 -783
- package/vendors/linux-x64/complete/rg.fish +0 -175
- package/vendors/linux-x64/doc/rg.1 +0 -2178
- package/vendors/linux-x64/rg +0 -0
- package/vendors/win32-x64/rg.exe +0 -0
- package/vendors/win32-x64/ripgrep-14.1.0-x86_64-pc-windows-msvc/COPYING +0 -3
- package/vendors/win32-x64/ripgrep-14.1.0-x86_64-pc-windows-msvc/LICENSE-MIT +0 -21
- package/vendors/win32-x64/ripgrep-14.1.0-x86_64-pc-windows-msvc/README.md +0 -516
- package/vendors/win32-x64/ripgrep-14.1.0-x86_64-pc-windows-msvc/UNLICENSE +0 -24
- package/vendors/win32-x64/ripgrep-14.1.0-x86_64-pc-windows-msvc/complete/_rg +0 -665
- package/vendors/win32-x64/ripgrep-14.1.0-x86_64-pc-windows-msvc/complete/_rg.ps1 +0 -213
- package/vendors/win32-x64/ripgrep-14.1.0-x86_64-pc-windows-msvc/complete/rg.bash +0 -783
- package/vendors/win32-x64/ripgrep-14.1.0-x86_64-pc-windows-msvc/complete/rg.fish +0 -175
- package/vendors/win32-x64/ripgrep-14.1.0-x86_64-pc-windows-msvc/doc/CHANGELOG.md +0 -1689
- package/vendors/win32-x64/ripgrep-14.1.0-x86_64-pc-windows-msvc/doc/FAQ.md +0 -1046
- package/vendors/win32-x64/ripgrep-14.1.0-x86_64-pc-windows-msvc/doc/GUIDE.md +0 -1022
- package/vendors/win32-x64/ripgrep-14.1.0-x86_64-pc-windows-msvc/doc/rg.1 +0 -2178
- package/vendors/win32-x64/ripgrep-14.1.0-x86_64-pc-windows-msvc/rg.exe +0 -0
|
@@ -3,27 +3,27 @@
|
|
|
3
3
|
* to properly represent what would be shown in a real terminal
|
|
4
4
|
*/
|
|
5
5
|
export declare class TerminalBuffer {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
6
|
+
private lines;
|
|
7
|
+
private currentLine;
|
|
8
|
+
private currentColumn;
|
|
9
|
+
private maxLines;
|
|
10
|
+
private maxColumns;
|
|
11
|
+
private chunks;
|
|
12
|
+
constructor(maxLines?: number, maxColumns?: number);
|
|
13
|
+
write(data: string): void;
|
|
14
|
+
private ensureLineExists;
|
|
15
|
+
getWrite(): string;
|
|
16
|
+
getContent(): string;
|
|
17
|
+
clear(): void;
|
|
18
|
+
/**
|
|
19
|
+
* Get current cursor position for testing/debugging
|
|
20
|
+
*/
|
|
21
|
+
getCursorPosition(): {
|
|
22
|
+
line: number;
|
|
23
|
+
column: number;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Get the current number of lines for testing/debugging
|
|
27
|
+
*/
|
|
28
|
+
getLineCount(): number;
|
|
29
29
|
}
|
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type {
|
|
2
|
+
WorkspaceFolder,
|
|
3
|
+
WorkspaceConfiguration,
|
|
4
|
+
} from "@builder.io/ai-utils";
|
|
2
5
|
import type { DevToolsSys } from "../../types";
|
|
3
6
|
export interface ResolveWorkspacePathOptions {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
filePath: string;
|
|
8
|
+
forceWorkspace?: boolean;
|
|
9
|
+
workspace?: WorkspaceConfiguration;
|
|
10
|
+
workingDirectory: string;
|
|
11
|
+
sys: DevToolsSys;
|
|
12
|
+
canCollapseWorkspace?: boolean;
|
|
10
13
|
}
|
|
11
14
|
export interface ResolveWorkspacePathResult {
|
|
12
|
-
|
|
13
|
-
|
|
15
|
+
resolvedPath: string;
|
|
16
|
+
workspaceFolder?: WorkspaceFolder;
|
|
14
17
|
}
|
|
15
18
|
/**
|
|
16
19
|
* Resolves a workspace file path to its actual file system path.
|
|
@@ -49,13 +52,15 @@ export interface ResolveWorkspacePathResult {
|
|
|
49
52
|
* // }
|
|
50
53
|
* ```
|
|
51
54
|
*/
|
|
52
|
-
export declare function resolveWorkspacePath(
|
|
55
|
+
export declare function resolveWorkspacePath(
|
|
56
|
+
options: ResolveWorkspacePathOptions,
|
|
57
|
+
): ResolveWorkspacePathResult;
|
|
53
58
|
export interface AbsolutePathToWorkspaceUrlOptions {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
+
absolutePath: string;
|
|
60
|
+
workspace?: WorkspaceConfiguration;
|
|
61
|
+
workingDirectory: string;
|
|
62
|
+
sys: DevToolsSys;
|
|
63
|
+
canCollapseWorkspace?: boolean;
|
|
59
64
|
}
|
|
60
65
|
/**
|
|
61
66
|
* Converts an absolute file system path to a workspace URL if possible.
|
|
@@ -89,4 +94,6 @@ export interface AbsolutePathToWorkspaceUrlOptions {
|
|
|
89
94
|
* // Returns: 'frontend/src/components/Button.tsx'
|
|
90
95
|
* ```
|
|
91
96
|
*/
|
|
92
|
-
export declare function absolutePathToWorkspaceUrl(
|
|
97
|
+
export declare function absolutePathToWorkspaceUrl(
|
|
98
|
+
options: AbsolutePathToWorkspaceUrlOptions,
|
|
99
|
+
): string | undefined;
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* Supports both simple key-value pairs and arrays
|
|
4
4
|
*/
|
|
5
5
|
export interface YamlFrontmatterResult<T = Record<string, any>> {
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
frontmatter: T;
|
|
7
|
+
body: string;
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
10
|
* Checks if content has YAML frontmatter
|
|
@@ -14,19 +14,23 @@ export declare function hasYamlFrontmatter(content: string): boolean;
|
|
|
14
14
|
* Parses YAML frontmatter from a string
|
|
15
15
|
* Handles simple YAML: key-value pairs, arrays, and comments
|
|
16
16
|
*/
|
|
17
|
-
export declare function parseYamlFrontmatter(
|
|
17
|
+
export declare function parseYamlFrontmatter(
|
|
18
|
+
yamlContent: string,
|
|
19
|
+
): Record<string, any>;
|
|
18
20
|
/**
|
|
19
21
|
* Extracts YAML frontmatter and body from Markdown content
|
|
20
22
|
* @param content - The raw Markdown content with frontmatter
|
|
21
23
|
* @returns Object with frontmatter and body, or null if no frontmatter found
|
|
22
24
|
*/
|
|
23
25
|
export declare function extractYamlFrontmatter(content: string): {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
+
frontmatterContent: string;
|
|
27
|
+
body: string;
|
|
26
28
|
} | null;
|
|
27
29
|
/**
|
|
28
30
|
* Parse Markdown file with YAML frontmatter
|
|
29
31
|
* @param content - The raw file content
|
|
30
32
|
* @returns Parsed frontmatter and body
|
|
31
33
|
*/
|
|
32
|
-
export declare function parseMarkdownWithYaml<T = Record<string, any>>(
|
|
34
|
+
export declare function parseMarkdownWithYaml<T = Record<string, any>>(
|
|
35
|
+
content: string,
|
|
36
|
+
): YamlFrontmatterResult<T>;
|
|
@@ -1,12 +1,44 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
1
|
+
import type {
|
|
2
|
+
ComponentRegistry,
|
|
3
|
+
ConnectedBuilder,
|
|
4
|
+
GetRegistryOptions,
|
|
5
|
+
LaunchEditorFile,
|
|
6
|
+
LoadComponentOptions,
|
|
7
|
+
LocalConfig,
|
|
8
|
+
RegisterComponentOptions,
|
|
9
|
+
SetComponentInfoOptions,
|
|
10
|
+
SetComponentInputOptions,
|
|
11
|
+
UnregisterComponentOptions,
|
|
12
|
+
ValidatedBuilder,
|
|
13
|
+
} from "../types";
|
|
14
|
+
export declare const apiConnectBuilder: (
|
|
15
|
+
publicApiKey: string,
|
|
16
|
+
privateAuthKey: string,
|
|
17
|
+
kind: string | null,
|
|
18
|
+
) => Promise<ConnectedBuilder>;
|
|
3
19
|
export declare const apiValidateBuilder: () => Promise<ValidatedBuilder>;
|
|
4
|
-
export declare const apiLaunchEditor: (
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export declare const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export declare const
|
|
11
|
-
|
|
20
|
+
export declare const apiLaunchEditor: (
|
|
21
|
+
file: LaunchEditorFile,
|
|
22
|
+
) => Promise<unknown>;
|
|
23
|
+
export declare const apiRegistry: (
|
|
24
|
+
opts?: GetRegistryOptions,
|
|
25
|
+
) => Promise<ComponentRegistry>;
|
|
26
|
+
export declare const apiLoadComponent: (
|
|
27
|
+
opts: LoadComponentOptions,
|
|
28
|
+
) => Promise<ComponentRegistry>;
|
|
29
|
+
export declare const apiRegisterComponent: (
|
|
30
|
+
opts: RegisterComponentOptions,
|
|
31
|
+
) => Promise<ComponentRegistry>;
|
|
32
|
+
export declare const apiSetComponentInfo: (
|
|
33
|
+
opts: SetComponentInfoOptions,
|
|
34
|
+
) => Promise<ComponentRegistry>;
|
|
35
|
+
export declare const apiSetComponentInput: (
|
|
36
|
+
opts: SetComponentInputOptions,
|
|
37
|
+
) => Promise<ComponentRegistry>;
|
|
38
|
+
export declare const apiUnregisterComponent: (
|
|
39
|
+
opts: UnregisterComponentOptions,
|
|
40
|
+
) => Promise<ComponentRegistry>;
|
|
41
|
+
export declare const apiDevToolsEnabled: (
|
|
42
|
+
enabled: boolean,
|
|
43
|
+
) => Promise<ComponentRegistry>;
|
|
12
44
|
export declare const apiLocalConfig: () => Promise<LocalConfig>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export declare class BuilderDevToolsEditButton extends HTMLElement {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
openInBuilder: HTMLAnchorElement | null;
|
|
3
|
+
block: HTMLElement | null;
|
|
4
|
+
constructor();
|
|
5
|
+
connectedCallback(): void;
|
|
6
|
+
show(contentElm: HTMLElement, blockElm: HTMLElement): string | null;
|
|
7
|
+
hide(): void;
|
|
8
8
|
}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import type { ComponentInfo } from "../../../types";
|
|
2
2
|
export declare function initComponentDetailSection(shadow: ShadowRoot): void;
|
|
3
|
-
export declare function loadComponentDetail(
|
|
4
|
-
|
|
3
|
+
export declare function loadComponentDetail(
|
|
4
|
+
shadow: ShadowRoot,
|
|
5
|
+
opt: "load" | "update",
|
|
6
|
+
): Promise<void>;
|
|
7
|
+
export declare function renderComponentDetail(
|
|
8
|
+
shadow: ShadowRoot,
|
|
9
|
+
cmpId: string,
|
|
10
|
+
): ComponentInfo | null;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
import type { ComponentInput } from "../../../types";
|
|
2
2
|
export declare function initComponentInputSection(shadow: ShadowRoot): void;
|
|
3
|
-
export declare function renderComponentInput(
|
|
3
|
+
export declare function renderComponentInput(
|
|
4
|
+
shadow: ShadowRoot,
|
|
5
|
+
cmpId: string,
|
|
6
|
+
propName: string,
|
|
7
|
+
): ComponentInput | null;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import type { ComponentInfo } from "../../../types";
|
|
2
2
|
export declare function initComponentListSection(shadow: ShadowRoot): void;
|
|
3
3
|
export declare function loadComponentsSection(shadow: ShadowRoot): void;
|
|
4
|
-
export declare function renderComponentList(
|
|
4
|
+
export declare function renderComponentList(
|
|
5
|
+
shadow: ShadowRoot,
|
|
6
|
+
filteredComponents?: ComponentInfo[],
|
|
7
|
+
): void;
|
|
@@ -6,17 +6,17 @@ export declare const getTracking: () => ClientTracking;
|
|
|
6
6
|
export declare const hasCTA: (ctaName: string) => boolean;
|
|
7
7
|
export declare const setCTA: (ctaName: string) => ClientTracking;
|
|
8
8
|
interface ClientTracking {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
9
|
+
/**
|
|
10
|
+
* first time visit timestamp
|
|
11
|
+
*/
|
|
12
|
+
firstVisitTs: number;
|
|
13
|
+
/**
|
|
14
|
+
* Name of the call to actions and timestamps when they happened
|
|
15
|
+
*/
|
|
16
|
+
ctas: {
|
|
17
|
+
[ctaName: string]: number;
|
|
18
|
+
};
|
|
19
|
+
builderUserId: string;
|
|
20
20
|
}
|
|
21
21
|
export type TriggerName = "init" | "menuOpen" | "menuClose" | "registryUpdate";
|
|
22
22
|
export {};
|
package/types/client/utils.d.ts
CHANGED
|
@@ -6,9 +6,11 @@ export declare const closeToasts: (shadow: ShadowRoot) => void;
|
|
|
6
6
|
export declare const isEditEnabled: () => boolean;
|
|
7
7
|
export declare const enableEdit: (enable: boolean) => void;
|
|
8
8
|
export declare const getEditorUrl: () => string;
|
|
9
|
-
export declare const getBuilderContentUrl: (
|
|
9
|
+
export declare const getBuilderContentUrl: (
|
|
10
|
+
contentId?: string | null,
|
|
11
|
+
blockId?: string | null,
|
|
12
|
+
) => string;
|
|
10
13
|
export declare const DEV_TOOLS_URL = "__DEV_TOOLS_URL__";
|
|
11
14
|
export declare const APP_STATE: AppState;
|
|
12
15
|
export declare const updateAppState: (registry: ComponentRegistry) => void;
|
|
13
|
-
export interface AppState extends ComponentRegistry {
|
|
14
|
-
}
|
|
16
|
+
export interface AppState extends ComponentRegistry {}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import type { AppDependency, ComponentInfo, DevToolsSys } from "../../types";
|
|
2
2
|
import type ts from "typescript";
|
|
3
|
-
export declare function getSourceDependencies(
|
|
4
|
-
|
|
3
|
+
export declare function getSourceDependencies(
|
|
4
|
+
sys: DevToolsSys,
|
|
5
|
+
typeChecker: ts.TypeChecker | null,
|
|
6
|
+
fnNode: ts.Node,
|
|
7
|
+
): AppDependency[] | undefined;
|
|
8
|
+
export declare function getAppDependencies(
|
|
9
|
+
cmps: ComponentInfo[],
|
|
10
|
+
): AppDependency[];
|
|
@@ -1,9 +1,29 @@
|
|
|
1
1
|
import type ts from "typescript";
|
|
2
2
|
import type { ComponentInfo, ComponentInput, DevToolsSys } from "../../types";
|
|
3
|
-
export declare function parseRegisteredComponentInfo(
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
export declare function parseRegisteredComponentInfo(
|
|
4
|
+
sys: DevToolsSys,
|
|
5
|
+
cmpInfo: ComponentInfo,
|
|
6
|
+
cmpObjLit: ts.ObjectLiteralExpression,
|
|
7
|
+
): ComponentInfo;
|
|
8
|
+
export declare function updateComponentObjLiteralInfoProperties(
|
|
9
|
+
sys: DevToolsSys,
|
|
10
|
+
cmpObjExp: ts.ObjectLiteralExpression,
|
|
11
|
+
cmpInfo: ComponentInfo,
|
|
12
|
+
): ts.ObjectLiteralExpression;
|
|
13
|
+
export declare function updateComponentInputsArrayLiteralExp(
|
|
14
|
+
sys: DevToolsSys,
|
|
15
|
+
arrExp: ts.ArrayLiteralExpression,
|
|
16
|
+
inputs: ComponentInput[],
|
|
17
|
+
): ts.ArrayLiteralExpression;
|
|
18
|
+
export declare function mergeComponentInputs(
|
|
19
|
+
cmp: ComponentInfo,
|
|
20
|
+
inputs: ComponentInput[],
|
|
21
|
+
): void;
|
|
7
22
|
export declare function componentAcceptsChildren(cmp: ComponentInfo): boolean;
|
|
8
|
-
export declare function normalizeComponentInput(
|
|
9
|
-
|
|
23
|
+
export declare function normalizeComponentInput(
|
|
24
|
+
input: ComponentInput,
|
|
25
|
+
): ComponentInput;
|
|
26
|
+
export declare function componentHasAcceptChildrenProp(
|
|
27
|
+
sys: DevToolsSys,
|
|
28
|
+
cmpObjLit: ts.ObjectLiteralExpression,
|
|
29
|
+
): boolean;
|
|
@@ -1,24 +1,43 @@
|
|
|
1
1
|
import type ts from "typescript";
|
|
2
2
|
import type { ComponentInput, DevToolsSys } from "../../types";
|
|
3
|
-
export declare function parseComponentSourcePropsFromNode(
|
|
3
|
+
export declare function parseComponentSourcePropsFromNode(
|
|
4
|
+
sys: DevToolsSys,
|
|
5
|
+
typeChecker: ts.TypeChecker,
|
|
6
|
+
fnNode: ts.Node | undefined,
|
|
7
|
+
): ComponentInput[];
|
|
4
8
|
export declare function normalizeBuilderInputType(t: string): {
|
|
5
|
-
|
|
6
|
-
|
|
9
|
+
builderType: string;
|
|
10
|
+
knownType: boolean;
|
|
7
11
|
};
|
|
8
12
|
/**
|
|
9
13
|
* https://www.builder.io/c/docs/custom-components-input-types
|
|
10
14
|
*/
|
|
11
15
|
export declare const INPUT_TYPES: {
|
|
12
|
-
|
|
13
|
-
|
|
16
|
+
value: string;
|
|
17
|
+
text: string;
|
|
14
18
|
}[];
|
|
15
19
|
export declare const STRING_TYPES: string[];
|
|
16
20
|
export declare const NUMBER_TYPES: string[];
|
|
17
21
|
export declare const BOOLEAN_TYPES: string[];
|
|
18
22
|
export declare const ARRAY_TYPES: string[];
|
|
19
23
|
export declare const OBJECT_TYPES: string[];
|
|
20
|
-
export declare function getPrimitiveType(
|
|
24
|
+
export declare function getPrimitiveType(
|
|
25
|
+
t: string,
|
|
26
|
+
): "string" | "boolean" | "object" | "number" | "array";
|
|
21
27
|
export declare function removeQuotes(text: string): string;
|
|
22
|
-
export declare const resolveType: (
|
|
23
|
-
|
|
24
|
-
|
|
28
|
+
export declare const resolveType: (
|
|
29
|
+
sys: DevToolsSys,
|
|
30
|
+
checker: ts.TypeChecker,
|
|
31
|
+
type: ts.Type,
|
|
32
|
+
) => string[] | undefined;
|
|
33
|
+
export declare const typeToString: (
|
|
34
|
+
sys: DevToolsSys,
|
|
35
|
+
checker: ts.TypeChecker,
|
|
36
|
+
type: ts.Type,
|
|
37
|
+
) => string;
|
|
38
|
+
export declare const parseDocsType: (
|
|
39
|
+
sys: DevToolsSys,
|
|
40
|
+
checker: ts.TypeChecker,
|
|
41
|
+
type: ts.Type,
|
|
42
|
+
parts: Set<string>,
|
|
43
|
+
) => void;
|
|
@@ -1,9 +1,24 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import type {
|
|
2
|
+
ComponentInfo,
|
|
3
|
+
SetComponentInfoOptions,
|
|
4
|
+
SetComponentInputOptions,
|
|
5
|
+
} from "../../types";
|
|
6
|
+
export declare function updateRegistry(
|
|
7
|
+
cmpId: string,
|
|
8
|
+
srcCmps: ComponentInfo[],
|
|
9
|
+
regCmps: ComponentInfo[],
|
|
10
|
+
registerCmp: boolean,
|
|
11
|
+
unregisterCmp: boolean,
|
|
12
|
+
setCmpInfo: SetComponentInfoOptions | null,
|
|
13
|
+
setCmpInput: SetComponentInputOptions | null,
|
|
14
|
+
): {
|
|
15
|
+
addCmpToRegistry: ComponentInfo | null;
|
|
16
|
+
removeCmpFromRegistry: ComponentInfo | null;
|
|
17
|
+
updateRegisteredCmp: ComponentInfo | null;
|
|
18
|
+
nodeIndex: number;
|
|
19
|
+
components: ComponentInfo[];
|
|
8
20
|
};
|
|
9
|
-
export declare function mergeComponents(
|
|
21
|
+
export declare function mergeComponents(
|
|
22
|
+
sourceComponents: ComponentInfo[],
|
|
23
|
+
registeredCmps: ComponentInfo[],
|
|
24
|
+
): ComponentInfo[];
|
|
@@ -1,11 +1,43 @@
|
|
|
1
1
|
import type ts from "typescript";
|
|
2
2
|
import type { DevToolsSys } from "../../types";
|
|
3
|
-
export declare function setObjectExpressionProperty(
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
export declare function setObjectExpressionProperty(
|
|
4
|
+
sys: DevToolsSys,
|
|
5
|
+
obj: ts.ObjectLiteralExpression,
|
|
6
|
+
propName: string,
|
|
7
|
+
propValue: any,
|
|
8
|
+
deleteIfNullOrUndefined?: boolean,
|
|
9
|
+
): ts.ObjectLiteralExpression;
|
|
10
|
+
export declare function getObjLiteralPropertyIndex(
|
|
11
|
+
sys: DevToolsSys,
|
|
12
|
+
obj: ts.ObjectLiteralExpression,
|
|
13
|
+
propName: string,
|
|
14
|
+
): number;
|
|
15
|
+
export declare function expressionToValue(
|
|
16
|
+
sys: DevToolsSys,
|
|
17
|
+
exp: ts.Expression,
|
|
18
|
+
): any;
|
|
19
|
+
export declare function objectExpressionToObjectValue(
|
|
20
|
+
sys: DevToolsSys,
|
|
21
|
+
objectLiteral: ts.ObjectLiteralExpression,
|
|
22
|
+
): {
|
|
23
|
+
[key: string]: any;
|
|
8
24
|
};
|
|
9
|
-
export declare function convertArrayExpressionToJsArray(
|
|
10
|
-
|
|
11
|
-
|
|
25
|
+
export declare function convertArrayExpressionToJsArray(
|
|
26
|
+
sys: DevToolsSys,
|
|
27
|
+
arr: ts.ArrayLiteralExpression,
|
|
28
|
+
): any[];
|
|
29
|
+
export declare function getTextOfPropertyName(
|
|
30
|
+
sys: DevToolsSys,
|
|
31
|
+
prop: ts.PropertyAssignment | ts.ObjectLiteralElementLike | undefined,
|
|
32
|
+
): string | undefined;
|
|
33
|
+
export declare function valueToExpression(
|
|
34
|
+
sys: DevToolsSys,
|
|
35
|
+
val: any,
|
|
36
|
+
):
|
|
37
|
+
| ts.ObjectLiteralExpression
|
|
38
|
+
| ts.Identifier
|
|
39
|
+
| ts.StringLiteral
|
|
40
|
+
| ts.NumericLiteral
|
|
41
|
+
| ts.TrueLiteral
|
|
42
|
+
| ts.FalseLiteral
|
|
43
|
+
| ts.ArrayLiteralExpression;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import type ts from "typescript";
|
|
2
2
|
import type { DevToolsSys } from "../../types";
|
|
3
|
-
export declare function ensureArrayStatement(
|
|
3
|
+
export declare function ensureArrayStatement(
|
|
4
|
+
sys: DevToolsSys,
|
|
5
|
+
sourceFile: ts.SourceFile,
|
|
6
|
+
opts: EnsureArrayStatementOptions,
|
|
7
|
+
): ts.SourceFile;
|
|
4
8
|
export interface EnsureArrayStatementOptions {
|
|
5
|
-
|
|
6
|
-
|
|
9
|
+
variableName: string;
|
|
10
|
+
arrayType?: string;
|
|
7
11
|
}
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import type ts from "typescript";
|
|
2
2
|
import type { DevToolsSys, ModuleFormat } from "../../types";
|
|
3
|
-
export declare function ensureImport(
|
|
3
|
+
export declare function ensureImport(
|
|
4
|
+
sys: DevToolsSys,
|
|
5
|
+
sourceFile: ts.SourceFile,
|
|
6
|
+
opts: EnsureImportOptions,
|
|
7
|
+
moduleType?: ModuleFormat,
|
|
8
|
+
): ts.SourceFile;
|
|
4
9
|
export interface EnsureImportOptions {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
10
|
+
defaultImport?: string;
|
|
11
|
+
namedImports?: string[];
|
|
12
|
+
importPath: string;
|
|
13
|
+
isTypeOnly?: boolean;
|
|
9
14
|
}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import type ts from "typescript";
|
|
2
2
|
import type { DevToolsSys, ModuleFormat } from "../../types";
|
|
3
|
-
export declare function getExportedStatements(
|
|
3
|
+
export declare function getExportedStatements(
|
|
4
|
+
sys: DevToolsSys,
|
|
5
|
+
sourceFile: ts.SourceFile,
|
|
6
|
+
moduleType?: ModuleFormat,
|
|
7
|
+
): ExportedStatement[];
|
|
4
8
|
export interface ExportedStatement {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
9
|
+
isDefaultExport: boolean;
|
|
10
|
+
statement: ts.Statement;
|
|
11
|
+
node: ts.Node;
|
|
8
12
|
}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import type ts from "typescript";
|
|
2
2
|
import type { DevToolsSys, ModuleFormat } from "../../types";
|
|
3
3
|
import type { ExportedStatement } from "./exported-statements";
|
|
4
|
-
export declare function getImportedStatements(
|
|
4
|
+
export declare function getImportedStatements(
|
|
5
|
+
sys: DevToolsSys,
|
|
6
|
+
sourceFile: ts.SourceFile,
|
|
7
|
+
moduleType?: ModuleFormat,
|
|
8
|
+
): ExportedStatement[];
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
import type ts from "typescript";
|
|
2
2
|
import type { DevToolsSys } from "../../types";
|
|
3
|
-
export declare function normalizeImports(
|
|
3
|
+
export declare function normalizeImports(
|
|
4
|
+
sys: DevToolsSys,
|
|
5
|
+
sourceFile: ts.SourceFile,
|
|
6
|
+
): ts.SourceFile;
|
|
4
7
|
export declare function normalizeLineBreaks(code: string): string;
|
|
5
8
|
export declare function ensureUseClientStringLiteral(code: string): string;
|
|
6
|
-
export declare function removeUseClientStringLiteral(
|
|
7
|
-
|
|
9
|
+
export declare function removeUseClientStringLiteral(
|
|
10
|
+
sys: DevToolsSys,
|
|
11
|
+
sourceFile: ts.SourceFile,
|
|
12
|
+
): ts.SourceFile;
|
|
13
|
+
export declare function normalizeRegisteredArrayElements(
|
|
14
|
+
sys: DevToolsSys,
|
|
15
|
+
elements: ts.Expression[],
|
|
16
|
+
): ts.Expression[];
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import type ts from "typescript";
|
|
2
2
|
import type { DevToolsSys } from "../../types";
|
|
3
|
-
export declare function removeUnusedImports(
|
|
3
|
+
export declare function removeUnusedImports(
|
|
4
|
+
sys: DevToolsSys,
|
|
5
|
+
sourceFile: ts.SourceFile,
|
|
6
|
+
): ts.SourceFile;
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
import type ts from "typescript";
|
|
2
2
|
import type { DevToolsSys } from "../../types";
|
|
3
|
-
export declare function codeToSource(
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
export declare function codeToSource(
|
|
4
|
+
sys: DevToolsSys,
|
|
5
|
+
code?: string | null,
|
|
6
|
+
): ts.SourceFile;
|
|
7
|
+
export declare function codeToStatement(
|
|
8
|
+
sys: DevToolsSys,
|
|
9
|
+
code?: string | null,
|
|
10
|
+
): ts.Statement;
|
|
11
|
+
export declare function sourceToCode(
|
|
12
|
+
sys: DevToolsSys,
|
|
13
|
+
node: ts.Node | null | undefined,
|
|
14
|
+
removeComments?: boolean,
|
|
15
|
+
): string;
|