@weavetab/mcp 2.5.0-beta.0
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/AGENTS.md +48 -0
- package/ARCHITECTURE.md +590 -0
- package/LICENSE +631 -0
- package/README.md +909 -0
- package/SECURITY.md +196 -0
- package/TROUBLESHOOTING.md +365 -0
- package/dist/anticaptcha/detector.d.ts +49 -0
- package/dist/anticaptcha/detector.js +465 -0
- package/dist/anticaptcha/integration.d.ts +36 -0
- package/dist/anticaptcha/integration.js +123 -0
- package/dist/anticaptcha/solver.d.ts +27 -0
- package/dist/anticaptcha/solver.js +552 -0
- package/dist/audit/logger.d.ts +13 -0
- package/dist/audit/logger.js +177 -0
- package/dist/audit/telemetry.d.ts +36 -0
- package/dist/audit/telemetry.js +162 -0
- package/dist/cdp/bridge.d.ts +16 -0
- package/dist/cdp/bridge.js +826 -0
- package/dist/cdp/confirm.d.ts +26 -0
- package/dist/cdp/confirm.js +79 -0
- package/dist/cdp/connector.d.ts +37 -0
- package/dist/cdp/connector.js +661 -0
- package/dist/cdp/extension.d.ts +36 -0
- package/dist/cdp/extension.js +118 -0
- package/dist/cdp/finder.d.ts +1 -0
- package/dist/cdp/finder.js +2 -0
- package/dist/cdp/helpers.d.ts +11 -0
- package/dist/cdp/helpers.js +195 -0
- package/dist/cdp/label_cache.d.ts +12 -0
- package/dist/cdp/label_cache.js +51 -0
- package/dist/cdp/lock.d.ts +33 -0
- package/dist/cdp/lock.js +206 -0
- package/dist/cdp/omni_broker.d.ts +17 -0
- package/dist/cdp/omni_broker.js +119 -0
- package/dist/cdp/profiles.d.ts +1 -0
- package/dist/cdp/profiles.js +87 -0
- package/dist/cdp/pruner.d.ts +41 -0
- package/dist/cdp/pruner.js +263 -0
- package/dist/cdp/ref_cache.d.ts +101 -0
- package/dist/cdp/ref_cache.js +234 -0
- package/dist/cdp/retry.d.ts +5 -0
- package/dist/cdp/retry.js +39 -0
- package/dist/cdp/retry_enhanced.d.ts +44 -0
- package/dist/cdp/retry_enhanced.js +102 -0
- package/dist/cdp/security.d.ts +50 -0
- package/dist/cdp/security.js +237 -0
- package/dist/cdp/verify.d.ts +39 -0
- package/dist/cdp/verify.js +143 -0
- package/dist/cdp/walker.d.ts +91 -0
- package/dist/cdp/walker.js +896 -0
- package/dist/cdp/walker.test.d.ts +2 -0
- package/dist/cdp/walker.test.js +172 -0
- package/dist/cdp/websocket_transport.d.ts +15 -0
- package/dist/cdp/websocket_transport.js +118 -0
- package/dist/cli/plugin.d.ts +9 -0
- package/dist/cli/plugin.js +1134 -0
- package/dist/cli/updater.d.ts +1 -0
- package/dist/cli/updater.js +72 -0
- package/dist/config/loader.d.ts +120 -0
- package/dist/config/loader.js +704 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1248 -0
- package/dist/intelligence/hints.d.ts +11 -0
- package/dist/intelligence/hints.js +39 -0
- package/dist/intelligence/intent.d.ts +33 -0
- package/dist/intelligence/intent.js +171 -0
- package/dist/intelligence/sessionMemory.d.ts +66 -0
- package/dist/intelligence/sessionMemory.js +284 -0
- package/dist/intelligence/sessionMemory.test.d.ts +2 -0
- package/dist/intelligence/sessionMemory.test.js +62 -0
- package/dist/intelligence/trail.d.ts +64 -0
- package/dist/intelligence/trail.js +233 -0
- package/dist/intelligence/trail.test.d.ts +2 -0
- package/dist/intelligence/trail.test.js +110 -0
- package/dist/intelligence/vision.d.ts +24 -0
- package/dist/intelligence/vision.js +151 -0
- package/dist/lifecycle/mission_manager.d.ts +16 -0
- package/dist/lifecycle/mission_manager.js +44 -0
- package/dist/overlay/bubble.d.ts +16 -0
- package/dist/overlay/bubble.js +37 -0
- package/dist/overlay/ghost.d.ts +35 -0
- package/dist/overlay/ghost.js +508 -0
- package/dist/overlay/injector.d.ts +22 -0
- package/dist/overlay/injector.js +198 -0
- package/dist/plugin/interface.d.ts +134 -0
- package/dist/plugin/interface.js +1 -0
- package/dist/plugin/loader.d.ts +18 -0
- package/dist/plugin/loader.js +155 -0
- package/dist/plugin/registry.d.ts +50 -0
- package/dist/plugin/registry.js +234 -0
- package/dist/security/blacklist.d.ts +24 -0
- package/dist/security/blacklist.js +80 -0
- package/dist/security/filter.d.ts +2 -0
- package/dist/security/filter.js +20 -0
- package/dist/security/guard.d.ts +8 -0
- package/dist/security/guard.js +35 -0
- package/dist/security/ratelimit.d.ts +11 -0
- package/dist/security/ratelimit.js +57 -0
- package/dist/security/secrets.d.ts +75 -0
- package/dist/security/secrets.js +365 -0
- package/dist/sensors/actionability.d.ts +81 -0
- package/dist/sensors/actionability.js +303 -0
- package/dist/sensors/guard.d.ts +25 -0
- package/dist/sensors/guard.js +168 -0
- package/dist/sensors/mutations.d.ts +23 -0
- package/dist/sensors/mutations.js +93 -0
- package/dist/sensors/network.d.ts +67 -0
- package/dist/sensors/network.js +193 -0
- package/dist/sensors/operation_monitor.d.ts +80 -0
- package/dist/sensors/operation_monitor.js +203 -0
- package/dist/sensors/pacing.d.ts +44 -0
- package/dist/sensors/pacing.js +111 -0
- package/dist/sensors/thoughts.d.ts +2 -0
- package/dist/sensors/thoughts.js +59 -0
- package/dist/sensors/wait.d.ts +12 -0
- package/dist/sensors/wait.js +44 -0
- package/dist/server.d.ts +7 -0
- package/dist/server.js +1687 -0
- package/dist/state/agent.d.ts +36 -0
- package/dist/state/agent.js +101 -0
- package/dist/state/cache.d.ts +16 -0
- package/dist/state/cache.js +92 -0
- package/dist/state/cache.test.d.ts +2 -0
- package/dist/state/cache.test.js +76 -0
- package/dist/state/delta.d.ts +71 -0
- package/dist/state/delta.js +234 -0
- package/dist/state/delta.test.d.ts +2 -0
- package/dist/state/delta.test.js +279 -0
- package/dist/state/groups.d.ts +15 -0
- package/dist/state/groups.js +80 -0
- package/dist/state/session.d.ts +30 -0
- package/dist/state/session.js +155 -0
- package/dist/tools/accessibility.d.ts +14 -0
- package/dist/tools/accessibility.js +32 -0
- package/dist/tools/ask.d.ts +14 -0
- package/dist/tools/ask.js +49 -0
- package/dist/tools/automation.d.ts +36 -0
- package/dist/tools/automation.js +218 -0
- package/dist/tools/browser_detect.d.ts +13 -0
- package/dist/tools/browser_detect.js +73 -0
- package/dist/tools/burst.d.ts +35 -0
- package/dist/tools/burst.js +344 -0
- package/dist/tools/canvas.d.ts +25 -0
- package/dist/tools/canvas.js +132 -0
- package/dist/tools/captcha.d.ts +38 -0
- package/dist/tools/captcha.js +209 -0
- package/dist/tools/click.d.ts +36 -0
- package/dist/tools/click.js +561 -0
- package/dist/tools/click_and_wait.d.ts +33 -0
- package/dist/tools/click_and_wait.js +149 -0
- package/dist/tools/clipboard.d.ts +29 -0
- package/dist/tools/clipboard.js +279 -0
- package/dist/tools/console.d.ts +21 -0
- package/dist/tools/console.js +107 -0
- package/dist/tools/cookies.d.ts +67 -0
- package/dist/tools/cookies.js +121 -0
- package/dist/tools/design_extract.d.ts +109 -0
- package/dist/tools/design_extract.js +641 -0
- package/dist/tools/dialog.d.ts +24 -0
- package/dist/tools/dialog.js +109 -0
- package/dist/tools/drag.d.ts +15 -0
- package/dist/tools/drag.js +29 -0
- package/dist/tools/emulation.d.ts +33 -0
- package/dist/tools/emulation.js +69 -0
- package/dist/tools/eval.d.ts +20 -0
- package/dist/tools/eval.js +92 -0
- package/dist/tools/fill.d.ts +41 -0
- package/dist/tools/fill.js +667 -0
- package/dist/tools/find.d.ts +30 -0
- package/dist/tools/find.js +60 -0
- package/dist/tools/geo.d.ts +19 -0
- package/dist/tools/geo.js +29 -0
- package/dist/tools/github/analyze.d.ts +4 -0
- package/dist/tools/github/analyze.js +113 -0
- package/dist/tools/github/cache.d.ts +21 -0
- package/dist/tools/github/cache.js +28 -0
- package/dist/tools/github/index.d.ts +4 -0
- package/dist/tools/github/index.js +4 -0
- package/dist/tools/github/issues.d.ts +9 -0
- package/dist/tools/github/issues.js +88 -0
- package/dist/tools/github/pr.d.ts +5 -0
- package/dist/tools/github/pr.js +88 -0
- package/dist/tools/github/rateLimiter.d.ts +4 -0
- package/dist/tools/github/rateLimiter.js +46 -0
- package/dist/tools/github/read.d.ts +34 -0
- package/dist/tools/github/read.js +74 -0
- package/dist/tools/github/repoContext.d.ts +20 -0
- package/dist/tools/github/repoContext.js +129 -0
- package/dist/tools/highlight.d.ts +20 -0
- package/dist/tools/highlight.js +140 -0
- package/dist/tools/hover.d.ts +19 -0
- package/dist/tools/hover.js +57 -0
- package/dist/tools/inspect.d.ts +17 -0
- package/dist/tools/inspect.js +125 -0
- package/dist/tools/integration.test.d.ts +2 -0
- package/dist/tools/integration.test.js +96 -0
- package/dist/tools/key.d.ts +25 -0
- package/dist/tools/key.js +173 -0
- package/dist/tools/macro_compiler.d.ts +7 -0
- package/dist/tools/macro_compiler.js +82 -0
- package/dist/tools/mouse.d.ts +21 -0
- package/dist/tools/mouse.js +62 -0
- package/dist/tools/navigate.d.ts +16 -0
- package/dist/tools/navigate.js +188 -0
- package/dist/tools/network_intercept.d.ts +17 -0
- package/dist/tools/network_intercept.js +151 -0
- package/dist/tools/office/index.d.ts +9 -0
- package/dist/tools/office/index.js +7 -0
- package/dist/tools/office/list.d.ts +15 -0
- package/dist/tools/office/list.js +41 -0
- package/dist/tools/office/parse.d.ts +20 -0
- package/dist/tools/office/parse.js +172 -0
- package/dist/tools/pdf.d.ts +22 -0
- package/dist/tools/pdf.js +42 -0
- package/dist/tools/performance.d.ts +12 -0
- package/dist/tools/performance.js +47 -0
- package/dist/tools/performance_test.d.ts +70 -0
- package/dist/tools/performance_test.js +128 -0
- package/dist/tools/plan.d.ts +39 -0
- package/dist/tools/plan.js +161 -0
- package/dist/tools/pointer.d.ts +35 -0
- package/dist/tools/pointer.js +522 -0
- package/dist/tools/read.d.ts +30 -0
- package/dist/tools/read.js +488 -0
- package/dist/tools/recording.d.ts +45 -0
- package/dist/tools/recording.js +124 -0
- package/dist/tools/response.d.ts +129 -0
- package/dist/tools/response.js +5 -0
- package/dist/tools/scrape.d.ts +24 -0
- package/dist/tools/scrape.js +140 -0
- package/dist/tools/screenshot.d.ts +40 -0
- package/dist/tools/screenshot.js +79 -0
- package/dist/tools/scroll.d.ts +23 -0
- package/dist/tools/scroll.js +196 -0
- package/dist/tools/select.d.ts +13 -0
- package/dist/tools/select.js +217 -0
- package/dist/tools/snapshot.d.ts +27 -0
- package/dist/tools/snapshot.js +99 -0
- package/dist/tools/storage.d.ts +18 -0
- package/dist/tools/storage.js +29 -0
- package/dist/tools/tabs.d.ts +77 -0
- package/dist/tools/tabs.js +342 -0
- package/dist/tools/thought.d.ts +16 -0
- package/dist/tools/thought.js +79 -0
- package/dist/tools/type.d.ts +65 -0
- package/dist/tools/type.js +1061 -0
- package/dist/tools/type_secret.d.ts +23 -0
- package/dist/tools/type_secret.js +229 -0
- package/dist/tools/upload.d.ts +19 -0
- package/dist/tools/upload.js +103 -0
- package/dist/tools/video_compiler.d.ts +24 -0
- package/dist/tools/video_compiler.js +199 -0
- package/dist/tools/viewport.d.ts +44 -0
- package/dist/tools/viewport.js +230 -0
- package/dist/tools/wait.d.ts +19 -0
- package/dist/tools/wait.js +202 -0
- package/dist/tools/wait_for.d.ts +23 -0
- package/dist/tools/wait_for.js +30 -0
- package/dist/tools/windows.d.ts +22 -0
- package/dist/tools/windows.js +57 -0
- package/dist/ui/index.d.ts +1 -0
- package/dist/ui/index.js +12 -0
- package/docs/DEV_MODE.md +68 -0
- package/docs/DOCUMENTATION.md +532 -0
- package/docs/PLUGINS.md +538 -0
- package/docs/TOOLS.md +104 -0
- package/docs/dev_plugin.md +310 -0
- package/ext-dist/background.js +467 -0
- package/ext-dist/content.js +3089 -0
- package/ext-dist/dashboard.html +583 -0
- package/ext-dist/hud/hud.js +73 -0
- package/ext-dist/hud/index.html +20 -0
- package/ext-dist/manifest.json +77 -0
- package/ext-dist/sidepanel/sidepanel.js +25 -0
- package/ext-dist/sidepanel.html +547 -0
- package/ext-dist/styles.css +218 -0
- package/icon.png +0 -0
- package/mcp.json +796 -0
- package/package.json +113 -0
- package/server.json +23 -0
- package/smithery.yaml +11 -0
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
export async function browserCookies(session, args, _config) {
|
|
2
|
+
if (args.action === "get") {
|
|
3
|
+
// Get current page URL for scoping
|
|
4
|
+
const { frameTree } = await session.Page.getFrameTree();
|
|
5
|
+
const pageUrl = args.url ?? frameTree.frame.url;
|
|
6
|
+
const { cookies } = await session.Network.getCookies({ urls: [pageUrl] });
|
|
7
|
+
let mapped = cookies.map(c => ({
|
|
8
|
+
name: c.name,
|
|
9
|
+
value: c.value,
|
|
10
|
+
domain: c.domain,
|
|
11
|
+
path: c.path,
|
|
12
|
+
expires: c.expires,
|
|
13
|
+
httpOnly: c.httpOnly,
|
|
14
|
+
secure: c.secure,
|
|
15
|
+
sameSite: c.sameSite,
|
|
16
|
+
}));
|
|
17
|
+
// Honor the name filter
|
|
18
|
+
let found;
|
|
19
|
+
let message;
|
|
20
|
+
if (args.name) {
|
|
21
|
+
mapped = mapped.filter(c => c.name === args.name);
|
|
22
|
+
found = mapped.length > 0;
|
|
23
|
+
if (!found) {
|
|
24
|
+
message = `Cookie with name '${args.name}' was not found for the given URL.`;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return {
|
|
28
|
+
success: true,
|
|
29
|
+
action: "get",
|
|
30
|
+
cookies: mapped,
|
|
31
|
+
count: mapped.length,
|
|
32
|
+
...(found !== undefined ? { found } : {}),
|
|
33
|
+
...(message ? { message } : {})
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
if (args.action === "set") {
|
|
37
|
+
if (!args.name)
|
|
38
|
+
throw new Error("browser_cookies set: 'name' is required");
|
|
39
|
+
if (args.value === undefined)
|
|
40
|
+
throw new Error("browser_cookies set: 'value' is required");
|
|
41
|
+
// Resolve domain from current page if not provided
|
|
42
|
+
let domain = args.domain;
|
|
43
|
+
let pageUrl = args.url;
|
|
44
|
+
if (!domain || args.secure === undefined) {
|
|
45
|
+
const { frameTree } = await session.Page.getFrameTree();
|
|
46
|
+
pageUrl = pageUrl ?? frameTree.frame.url;
|
|
47
|
+
try {
|
|
48
|
+
const u = new URL(pageUrl);
|
|
49
|
+
if (!domain)
|
|
50
|
+
domain = u.hostname;
|
|
51
|
+
// Default secure to true for https pages
|
|
52
|
+
if (args.secure === undefined && u.protocol === "https:") {
|
|
53
|
+
args.secure = true;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
catch {
|
|
57
|
+
if (!domain)
|
|
58
|
+
throw new Error("browser_cookies set: could not determine domain — provide 'domain' explicitly.");
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
await session.Network.setCookie({
|
|
62
|
+
name: args.name,
|
|
63
|
+
value: args.value,
|
|
64
|
+
domain,
|
|
65
|
+
path: args.path ?? "/",
|
|
66
|
+
expires: args.expires,
|
|
67
|
+
httpOnly: args.httpOnly ?? false,
|
|
68
|
+
secure: args.secure ?? false,
|
|
69
|
+
sameSite: args.sameSite,
|
|
70
|
+
});
|
|
71
|
+
return { success: true, action: "set", name: args.name };
|
|
72
|
+
}
|
|
73
|
+
if (args.action === "delete") {
|
|
74
|
+
if (!args.name)
|
|
75
|
+
throw new Error("browser_cookies delete: 'name' is required");
|
|
76
|
+
// Resolve the URL to scope the cookie lookup
|
|
77
|
+
let pageUrl = args.url;
|
|
78
|
+
if (!pageUrl) {
|
|
79
|
+
const { frameTree } = await session.Page.getFrameTree();
|
|
80
|
+
pageUrl = frameTree.frame.url;
|
|
81
|
+
}
|
|
82
|
+
if (args.domain) {
|
|
83
|
+
await session.Network.deleteCookies({
|
|
84
|
+
name: args.name,
|
|
85
|
+
domain: args.domain,
|
|
86
|
+
path: args.path ?? "/",
|
|
87
|
+
});
|
|
88
|
+
return { success: true, action: "delete", name: args.name };
|
|
89
|
+
}
|
|
90
|
+
// deleteCookies requires the domain to match exactly how the cookie was
|
|
91
|
+
// stored (e.g. ".github.com" with a leading dot). Fetch all matching
|
|
92
|
+
// cookies and delete each using its exact stored domain and path.
|
|
93
|
+
try {
|
|
94
|
+
const { cookies: existing } = await session.Network.getCookies({ urls: [pageUrl] });
|
|
95
|
+
const matches = existing.filter(c => c.name === args.name);
|
|
96
|
+
if (matches.length > 0) {
|
|
97
|
+
for (const cookie of matches) {
|
|
98
|
+
await session.Network.deleteCookies({
|
|
99
|
+
name: cookie.name,
|
|
100
|
+
domain: cookie.domain,
|
|
101
|
+
path: cookie.path,
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
else {
|
|
106
|
+
// Fallback: derive hostname; won't work for subdomain cookies but attempts a best-effort deletion.
|
|
107
|
+
const domain = new URL(pageUrl).hostname;
|
|
108
|
+
await session.Network.deleteCookies({
|
|
109
|
+
name: args.name,
|
|
110
|
+
domain,
|
|
111
|
+
path: args.path ?? "/",
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
catch {
|
|
116
|
+
throw new Error("browser_cookies delete: could not determine domain — provide 'domain' explicitly.");
|
|
117
|
+
}
|
|
118
|
+
return { success: true, action: "delete", name: args.name };
|
|
119
|
+
}
|
|
120
|
+
throw new Error(`browser_cookies: unknown action "${args.action}"`);
|
|
121
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Weavetab — tools/design_extract.ts
|
|
3
|
+
* browser_extract_design: Extract design tokens, typography, color palette,
|
|
4
|
+
* clean semantic HTML, and CSS from the current page into structured files
|
|
5
|
+
* and a compact LLM design blueprint.
|
|
6
|
+
*
|
|
7
|
+
* Saves to configured designDir (e.g. ~/.weavetab/designs/ or custom workspace directory).
|
|
8
|
+
*
|
|
9
|
+
* Weavetab by fy2ne
|
|
10
|
+
*/
|
|
11
|
+
import CDP from "chrome-remote-interface";
|
|
12
|
+
import type { Config } from "../config/loader.js";
|
|
13
|
+
export interface ExtractDesignOptions {
|
|
14
|
+
/** CSS selector of the container to extract (default: 'main', falls back to 'body') */
|
|
15
|
+
selector?: string;
|
|
16
|
+
/** Format preset: 'tailwind' generates tailwind.theme.json, 'vanilla_css' generates scoped styles, 'tokens_only' extracts design tokens */
|
|
17
|
+
format?: "tailwind" | "vanilla_css" | "tokens_only";
|
|
18
|
+
/** Optional custom folder path to write extracted files into. If omitted, uses configured designDir */
|
|
19
|
+
outputDir?: string;
|
|
20
|
+
/** Optional custom name for the design bundle folder (e.g. 'resend-hero') */
|
|
21
|
+
name?: string;
|
|
22
|
+
/** Whether to capture SVG icons and image asset references (default: true) */
|
|
23
|
+
includeAssets?: boolean;
|
|
24
|
+
/** If false, keeps Weavetab overlay visible during capture (default: true -> hidden) */
|
|
25
|
+
hideOverlay?: boolean;
|
|
26
|
+
}
|
|
27
|
+
export interface DesignTokens {
|
|
28
|
+
meta: {
|
|
29
|
+
url: string;
|
|
30
|
+
title: string;
|
|
31
|
+
extractedAt: string;
|
|
32
|
+
selector: string;
|
|
33
|
+
viewport: {
|
|
34
|
+
width: number;
|
|
35
|
+
height: number;
|
|
36
|
+
};
|
|
37
|
+
isDarkMode: boolean;
|
|
38
|
+
};
|
|
39
|
+
cssVariables: Record<string, string>;
|
|
40
|
+
palette: {
|
|
41
|
+
backgrounds: string[];
|
|
42
|
+
text: string[];
|
|
43
|
+
borders: string[];
|
|
44
|
+
accents: string[];
|
|
45
|
+
};
|
|
46
|
+
typography: {
|
|
47
|
+
fontFamilies: string[];
|
|
48
|
+
headings: Record<string, {
|
|
49
|
+
fontFamily: string;
|
|
50
|
+
fontSize: string;
|
|
51
|
+
fontWeight: string;
|
|
52
|
+
lineHeight: string;
|
|
53
|
+
letterSpacing: string;
|
|
54
|
+
color: string;
|
|
55
|
+
}>;
|
|
56
|
+
body: {
|
|
57
|
+
fontFamily: string;
|
|
58
|
+
fontSize: string;
|
|
59
|
+
fontWeight: string;
|
|
60
|
+
lineHeight: string;
|
|
61
|
+
color: string;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
effects: {
|
|
65
|
+
shadows: string[];
|
|
66
|
+
radii: string[];
|
|
67
|
+
backdropBlurs: string[];
|
|
68
|
+
};
|
|
69
|
+
layout: {
|
|
70
|
+
displayTypes: string[];
|
|
71
|
+
gapValues: string[];
|
|
72
|
+
paddingValues: string[];
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Pretty-print and format raw HTML with clean 2-space indentation and semantic readability.
|
|
77
|
+
*/
|
|
78
|
+
export declare function beautifyHtml(rawHtml: string): string;
|
|
79
|
+
export declare function browserExtractDesign(session: CDP.Client, options: ExtractDesignOptions | undefined, config: Config): Promise<{
|
|
80
|
+
success: boolean;
|
|
81
|
+
data: {
|
|
82
|
+
outputDirectory: string;
|
|
83
|
+
files: {
|
|
84
|
+
tokens: string;
|
|
85
|
+
html?: string;
|
|
86
|
+
css?: string;
|
|
87
|
+
tailwind?: string;
|
|
88
|
+
readme: string;
|
|
89
|
+
};
|
|
90
|
+
tokensSummary: {
|
|
91
|
+
colors: {
|
|
92
|
+
backgrounds: string[];
|
|
93
|
+
text: string[];
|
|
94
|
+
accents: string[];
|
|
95
|
+
borders: string[];
|
|
96
|
+
};
|
|
97
|
+
fonts: string[];
|
|
98
|
+
radii: string[];
|
|
99
|
+
shadows: string[];
|
|
100
|
+
cssVariablesCount: number;
|
|
101
|
+
};
|
|
102
|
+
htmlMetrics?: {
|
|
103
|
+
nodeCount: number;
|
|
104
|
+
svgCount: number;
|
|
105
|
+
htmlBytes: number;
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
message: string;
|
|
109
|
+
}>;
|