autokap 1.0.2 → 1.0.3
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/dist/cli-config.d.ts +13 -0
- package/dist/cli-config.js +42 -0
- package/dist/cli-utils.d.ts +0 -19
- package/dist/cli-utils.js +2 -65
- package/dist/cli.d.ts +0 -1
- package/dist/cli.js +266 -305
- package/package.json +23 -16
- package/assets/chrome/ios-statusbar-comparison-reference.jpg +0 -0
- package/assets/chrome/ios-statusbar-dark-reference.jpg +0 -0
- package/assets/chrome/ios-statusbar-light-reference.jpg +0 -0
- package/assets/devices/ipad-pro-11-m4.json +0 -52
- package/assets/devices/iphone-16-pro.json +0 -53
- package/assets/devices/macbook-air-13.json +0 -45
- package/assets/frames/MacBook Air 13.svg +0 -242
- package/assets/frames/Status bar - iPhone.png +0 -0
- package/assets/frames/Status bar and Menu bar- iPad.png +0 -0
- package/assets/frames/iPad Pro M4 11_.png +0 -0
- package/assets/frames/iPhone 16 Pro.png +0 -0
- package/assets/icons/Cellular Connection.svg +0 -3
- package/assets/icons/Union.svg +0 -6
- package/assets/icons/Wifi.svg +0 -3
- package/assets/icons/battery.svg +0 -5
- package/assets/icons/battery_charging.svg +0 -8
- package/dist/abort.d.ts +0 -5
- package/dist/abort.js +0 -44
- package/dist/agent.d.ts +0 -142
- package/dist/agent.js +0 -4504
- package/dist/browser-bar.d.ts +0 -40
- package/dist/browser-bar.js +0 -147
- package/dist/clip-orchestrator.d.ts +0 -148
- package/dist/clip-orchestrator.js +0 -950
- package/dist/clip-postprocess.d.ts +0 -42
- package/dist/clip-postprocess.js +0 -192
- package/dist/credential-templates.d.ts +0 -5
- package/dist/credential-templates.js +0 -60
- package/dist/element-capture.d.ts +0 -53
- package/dist/element-capture.js +0 -766
- package/dist/hybrid-navigator.d.ts +0 -138
- package/dist/hybrid-navigator.js +0 -468
- package/dist/index.d.ts +0 -15
- package/dist/index.js +0 -11
- package/dist/llm-usage.d.ts +0 -17
- package/dist/llm-usage.js +0 -45
- package/dist/mockup-html.d.ts +0 -119
- package/dist/mockup-html.js +0 -253
- package/dist/mockup.d.ts +0 -94
- package/dist/mockup.js +0 -604
- package/dist/mouse-animation.d.ts +0 -46
- package/dist/mouse-animation.js +0 -100
- package/dist/overlay-utils.d.ts +0 -14
- package/dist/overlay-utils.js +0 -13
- package/dist/posthog.d.ts +0 -4
- package/dist/posthog.js +0 -26
- package/dist/prompt-cache.d.ts +0 -10
- package/dist/prompt-cache.js +0 -24
- package/dist/prompts.d.ts +0 -167
- package/dist/prompts.js +0 -1165
- package/dist/security.d.ts +0 -20
- package/dist/security.js +0 -569
- package/dist/session-profile.d.ts +0 -86
- package/dist/session-profile.js +0 -1471
- package/dist/sf-pro-fonts.d.ts +0 -4
- package/dist/sf-pro-fonts.js +0 -7
- package/dist/status-bar-l10n.d.ts +0 -14
- package/dist/status-bar-l10n.js +0 -177
- package/dist/status-bar.d.ts +0 -44
- package/dist/status-bar.js +0 -336
- package/dist/tools.d.ts +0 -4
- package/dist/tools.js +0 -578
- package/dist/video-agent.d.ts +0 -143
- package/dist/video-agent.js +0 -4783
- package/dist/video-observation.d.ts +0 -36
- package/dist/video-observation.js +0 -192
- package/dist/video-planner.d.ts +0 -12
- package/dist/video-planner.js +0 -500
- package/dist/video-prompts.d.ts +0 -37
- package/dist/video-prompts.js +0 -554
- package/dist/video-tools.d.ts +0 -3
- package/dist/video-tools.js +0 -59
- package/dist/video-variant-state.d.ts +0 -29
- package/dist/video-variant-state.js +0 -80
- package/dist/vision-model.d.ts +0 -17
- package/dist/vision-model.js +0 -74
package/dist/browser-bar.d.ts
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Chrome macOS browser bar — pixel-perfect from toolbar4.svg.
|
|
3
|
-
*
|
|
4
|
-
* Inlines the real Chrome SVG (cleaned), with dynamic width support:
|
|
5
|
-
* right-anchored elements (tab overflow, star, profile, extensions)
|
|
6
|
-
* and address bar width are computed from the target width.
|
|
7
|
-
*
|
|
8
|
-
* Dynamic content (page title, URL, favicon) overlaid as HTML.
|
|
9
|
-
* SF Pro embedded fonts for cross-OS rendering.
|
|
10
|
-
*
|
|
11
|
-
* Reference: 2160×129 @ 1.5× (toolbar4.svg)
|
|
12
|
-
*/
|
|
13
|
-
export interface BrowserBarConfig {
|
|
14
|
-
url?: string;
|
|
15
|
-
pageTitle?: string;
|
|
16
|
-
tabIconUrl?: string;
|
|
17
|
-
colorScheme?: 'light' | 'dark';
|
|
18
|
-
}
|
|
19
|
-
export interface BrowserBarZoneRect {
|
|
20
|
-
x: number;
|
|
21
|
-
y: number;
|
|
22
|
-
width: number;
|
|
23
|
-
height: number;
|
|
24
|
-
fontSize?: number;
|
|
25
|
-
fontWeight?: number | string;
|
|
26
|
-
textAlign?: 'left' | 'center' | 'right';
|
|
27
|
-
}
|
|
28
|
-
export interface BrowserBarZones {
|
|
29
|
-
favicon?: BrowserBarZoneRect;
|
|
30
|
-
pageTitle?: BrowserBarZoneRect;
|
|
31
|
-
url?: BrowserBarZoneRect;
|
|
32
|
-
}
|
|
33
|
-
export interface BrowserBarRenderOptions {
|
|
34
|
-
config: BrowserBarConfig;
|
|
35
|
-
width: number;
|
|
36
|
-
height: number;
|
|
37
|
-
scale: number;
|
|
38
|
-
pixelScale?: number;
|
|
39
|
-
}
|
|
40
|
-
export declare function generateBrowserBarHtml(options: BrowserBarRenderOptions): string;
|
package/dist/browser-bar.js
DELETED
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Chrome macOS browser bar — pixel-perfect from toolbar4.svg.
|
|
3
|
-
*
|
|
4
|
-
* Inlines the real Chrome SVG (cleaned), with dynamic width support:
|
|
5
|
-
* right-anchored elements (tab overflow, star, profile, extensions)
|
|
6
|
-
* and address bar width are computed from the target width.
|
|
7
|
-
*
|
|
8
|
-
* Dynamic content (page title, URL, favicon) overlaid as HTML.
|
|
9
|
-
* SF Pro embedded fonts for cross-OS rendering.
|
|
10
|
-
*
|
|
11
|
-
* Reference: 2160×129 @ 1.5× (toolbar4.svg)
|
|
12
|
-
*/
|
|
13
|
-
import { SF_PRO_TEXT_REGULAR, SF_PRO_TEXT_SEMIBOLD, } from './sf-pro-fonts.js';
|
|
14
|
-
// ── SF Pro ───────────────────────────────────────────────────────────────
|
|
15
|
-
const SF = `<style>
|
|
16
|
-
@font-face{font-family:'SF Pro Text';src:local('SF Pro Text'),local('.SFNSText'),url('${SF_PRO_TEXT_REGULAR}') format('woff2');font-weight:400;font-style:normal}
|
|
17
|
-
@font-face{font-family:'SF Pro Text';src:local('SF Pro Text Semibold'),local('.SFNSText-Semibold'),url('${SF_PRO_TEXT_SEMIBOLD}') format('woff2');font-weight:600;font-style:normal}
|
|
18
|
-
</style>`;
|
|
19
|
-
const FF = "'SF Pro Text',-apple-system,BlinkMacSystemFont,system-ui,sans-serif";
|
|
20
|
-
// ── Reference ────────────────────────────────────────────────────────────
|
|
21
|
-
const REF_W = 2160;
|
|
22
|
-
const REF_H = 129; // SVG viewBox height (includes 1.5px bottom border)
|
|
23
|
-
// Right margins (distance from right edge at ref width 2160)
|
|
24
|
-
const TAB_OVERFLOW_MR = 51; // tab overflow rect x=2109 → margin 51
|
|
25
|
-
const ADDR_BAR_ML = 174; // address bar left x (was 234 with home icon)
|
|
26
|
-
const ADDR_BAR_MR = 126; // address bar right margin (2160-2034)
|
|
27
|
-
const PROFILE_MR = 102; // profile rect x=2058 → margin 102
|
|
28
|
-
const EAR_R_MR = 16.5; // right ear margin
|
|
29
|
-
// ── Generator ────────────────────────────────────────────────────────────
|
|
30
|
-
export function generateBrowserBarHtml(options) {
|
|
31
|
-
const { config, width, height, pixelScale = 1 } = options;
|
|
32
|
-
const title = esc(config.pageTitle || 'New Tab');
|
|
33
|
-
const rawUrl = config.url || 'example.com';
|
|
34
|
-
const url = esc(rawUrl.replace(/^https?:\/\//, '').replace(/\/$/, ''));
|
|
35
|
-
const icon = config.tabIconUrl;
|
|
36
|
-
const isDark = config.colorScheme === 'dark';
|
|
37
|
-
// Scale: fit reference height into target height
|
|
38
|
-
const s = height / REF_H;
|
|
39
|
-
const iw = Math.round(width / s); // internal width at reference scale
|
|
40
|
-
const ts = s * pixelScale;
|
|
41
|
-
// Dynamic right-anchored positions
|
|
42
|
-
const dx = iw - REF_W; // offset for right-anchored elements
|
|
43
|
-
const tabOverflowX = iw - TAB_OVERFLOW_MR;
|
|
44
|
-
const addrBarW = iw - ADDR_BAR_ML - ADDR_BAR_MR;
|
|
45
|
-
const profileX = iw - PROFILE_MR;
|
|
46
|
-
const earRX = iw - EAR_R_MR;
|
|
47
|
-
// Color tokens: light ↔ dark
|
|
48
|
-
const tabStripBg = isDark ? '#1F2020' : '#DEDEDE';
|
|
49
|
-
const tabBg = isDark ? '#3C3C3C' : '#FFFFFF';
|
|
50
|
-
const toolbarBg = isDark ? '#3C3C3C' : '#FFFFFF';
|
|
51
|
-
const addrBarBg = isDark ? '#282828' : '#F1F1F1';
|
|
52
|
-
const addrIconBg = isDark ? '#3C3C3C' : '#FFFFFF';
|
|
53
|
-
const borderColor = isDark ? '#454746' : '#CFCFCF';
|
|
54
|
-
const textColor = isDark ? '#E3E3E3' : '#1D1D1D';
|
|
55
|
-
const textSec = isDark ? '#C7C7C7' : '#5F6368';
|
|
56
|
-
const iconActive = isDark ? '#C7C7C7' : '#5F6368';
|
|
57
|
-
const iconDis = isDark ? '#7B7B7B' : '#BBBFC4';
|
|
58
|
-
// Tab favicon overlay — aligned with close X center (y=30, icon 24px → top=18)
|
|
59
|
-
const tabFaviconOverlay = icon
|
|
60
|
-
? `<div style="position:absolute;left:152px;top:18px;width:24px;height:24px;display:flex;align-items:center;justify-content:center"><img src="${attr(icon)}" style="width:21px;height:21px;border-radius:4px;object-fit:contain" alt=""></div>`
|
|
61
|
-
: `<div style="position:absolute;left:152px;top:18px;width:24px;height:24px;display:flex;align-items:center;justify-content:center"><svg width="21" height="21" viewBox="0 0 16 16" fill="none"><circle cx="8" cy="8" r="6.5" stroke="${iconActive}" stroke-width="1.2"/><ellipse cx="8" cy="8" rx="3" ry="6.5" stroke="${iconActive}" stroke-width="1.2"/><line x1="1.5" y1="8" x2="14.5" y2="8" stroke="${iconActive}" stroke-width="1.2"/></svg></div>`;
|
|
62
|
-
return `${SF}<div style="width:${iw}px;height:${REF_H}px;position:relative;transform:scale(${ts});transform-origin:top left;font-family:${FF};overflow:hidden">
|
|
63
|
-
<svg width="${iw}" height="${REF_H}" viewBox="0 0 ${iw} ${REF_H}" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
64
|
-
<!-- TAB STRIP -->
|
|
65
|
-
<g>
|
|
66
|
-
<rect width="${iw}" height="60" fill="${tabStripBg}"/>
|
|
67
|
-
<!-- Traffic lights -->
|
|
68
|
-
<circle cx="40.5" cy="30.75" r="9" fill="#EC6A5E"/>
|
|
69
|
-
<circle cx="40.5" cy="30.75" r="8.25" stroke="#1F1F1F" stroke-opacity="0.06" stroke-width="1.5"/>
|
|
70
|
-
<circle cx="70.5" cy="30.75" r="9" fill="#F4BF4F"/>
|
|
71
|
-
<circle cx="70.5" cy="30.75" r="8.25" stroke="#1F1F1F" stroke-opacity="0.06" stroke-width="1.5"/>
|
|
72
|
-
<circle cx="100.5" cy="30.75" r="9" fill="#61C554"/>
|
|
73
|
-
<circle cx="100.5" cy="30.75" r="8.25" stroke="#1F1F1F" stroke-opacity="0.06" stroke-width="1.5"/>
|
|
74
|
-
<!-- Left ear -->
|
|
75
|
-
<path d="M120 60C129.941 60 138 51.9411 138 42V60H120Z" fill="${tabBg}"/>
|
|
76
|
-
<!-- Active tab -->
|
|
77
|
-
<path d="M138 24C138 15.7157 144.716 9 153 9H471C479.284 9 486 15.7157 486 24V60H138V24Z" fill="${tabBg}"/>
|
|
78
|
-
<!-- Close X -->
|
|
79
|
-
<path d="M457.668 35.5689L456.431 34.3314L460.762 30.0001L456.431 25.6689L457.668 24.4314L461.999 28.7626L466.331 24.4314L467.568 25.6689L463.237 30.0001L467.568 34.3314L466.331 35.5689L461.999 31.2376L457.668 35.5689Z" fill="${textColor}"/>
|
|
80
|
-
<!-- Right ear -->
|
|
81
|
-
<path d="M504 60C494.059 60 486 51.9411 486 42V60H504Z" fill="${tabBg}"/>
|
|
82
|
-
<!-- New tab + -->
|
|
83
|
-
<path d="M513.327 31.1749H506.877V28.8249H513.327V22.3499H515.677V28.8249H522.152V31.1749H515.677V37.6249H513.327V31.1749Z" fill="${iconActive}"/>
|
|
84
|
-
<!-- Tab overflow (right-anchored) -->
|
|
85
|
-
<rect x="${tabOverflowX}" y="9" width="42" height="42" rx="15" fill="${tabBg}"/>
|
|
86
|
-
<path d="M${tabOverflowX + 21} 33.95L${tabOverflowX + 14.4} 27.35L${tabOverflowX + 16.07} 25.675L${tabOverflowX + 21} 30.625L${tabOverflowX + 25.92} 25.7L${tabOverflowX + 27.6} 27.375L${tabOverflowX + 21} 33.95Z" fill="${textColor}"/>
|
|
87
|
-
</g>
|
|
88
|
-
<!-- BOTTOM EARS -->
|
|
89
|
-
<path d="M16.5 60C7.3873 60 0 67.3873 0 76.5V60H16.5Z" fill="${tabStripBg}"/>
|
|
90
|
-
<path d="M${earRX} 60C${earRX + 9.11} 60 ${iw} 67.3873 ${iw} 76.5V60H${earRX}Z" fill="${tabStripBg}"/>
|
|
91
|
-
<!-- TOOLBAR -->
|
|
92
|
-
<g clip-path="url(#bb_clip_toolbar)">
|
|
93
|
-
<path d="M0 76C0 67.1634 7.16344 60 16 60H${iw - 16}C${iw - 7.16} 60 ${iw} 67.1634 ${iw} 76V129H0V76Z" fill="${toolbarBg}"/>
|
|
94
|
-
<!-- Back arrow -->
|
|
95
|
-
<path d="M28.3125 95.625L34.5938 101.906L33 103.5L24 94.5L33 85.5L34.5938 87.0938L28.3125 93.375H42V95.625H28.3125Z" fill="${iconDis}"/>
|
|
96
|
-
<!-- Forward arrow -->
|
|
97
|
-
<path d="M91.6875 95.625L85.4062 101.906L87 103.5L96 94.5L87 85.5L85.4062 87.0938L91.6875 93.375H78V95.625H91.6875Z" fill="${iconDis}"/>
|
|
98
|
-
<!-- Reload -->
|
|
99
|
-
<path d="M141 103.5C138.5 103.5 136.375 102.625 134.625 100.875C132.875 99.125 132 97 132 94.5C132 92 132.875 89.875 134.625 88.125C136.375 86.375 138.5 85.5 141 85.5C142.354 85.5 143.609 85.7812 144.766 86.3438C145.922 86.9062 146.917 87.6562 147.75 88.5938V85.5H150V93H142.5V90.75H146.594C145.99 89.8333 145.198 89.1042 144.219 88.5625C143.24 88.0208 142.167 87.75 141 87.75C139.125 87.75 137.531 88.4062 136.219 89.7188C134.906 91.0312 134.25 92.625 134.25 94.5C134.25 96.375 134.906 97.9688 136.219 99.2812C137.531 100.594 139.125 101.25 141 101.25C142.75 101.25 144.25 100.672 145.5 99.5156C146.75 98.3594 147.469 96.9375 147.656 95.25H149.969C149.781 97.5833 148.833 99.5417 147.125 101.125C145.417 102.708 143.375 103.5 141 103.5Z" fill="${iconActive}"/>
|
|
100
|
-
<!-- Address bar pill (dynamic width) -->
|
|
101
|
-
<rect x="${ADDR_BAR_ML}" y="69" width="${addrBarW}" height="51" rx="25.5" fill="${addrBarBg}"/>
|
|
102
|
-
<!-- Site icon circle -->
|
|
103
|
-
<rect x="${ADDR_BAR_ML + 7.5}" y="76.5" width="36" height="36" rx="18" fill="${addrIconBg}"/>
|
|
104
|
-
<!-- Control center / sliders icon (from Union.svg, scaled to 18×18 and centered in the 36×36 circle) -->
|
|
105
|
-
<g transform="translate(${ADDR_BAR_ML + 16.5},${76.5 + 9}) scale(1.5)">
|
|
106
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.5 6.70898C10.8806 6.70898 11.9998 7.82848 12 9.20898C12 10.5897 10.8807 11.709 9.5 11.709C8.11929 11.709 7 10.5897 7 9.20898C7.00024 7.82848 8.11944 6.70898 9.5 6.70898ZM9.5 8.20898C8.94786 8.20898 8.50024 8.6569 8.5 9.20898C8.5 9.76127 8.94772 10.209 9.5 10.209C10.0523 10.209 10.5 9.76127 10.5 9.20898C10.4998 8.6569 10.0521 8.20898 9.5 8.20898Z" fill="${iconActive}"/>
|
|
107
|
-
<path d="M6 10H0V8.5H6V10Z" fill="${iconActive}"/>
|
|
108
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M2.5 0C3.88071 0 5 1.11929 5 2.5C5 3.88071 3.88071 5 2.5 5C1.11929 5 0 3.88071 0 2.5C0 1.11929 1.11929 0 2.5 0ZM2.5 1.5C1.94772 1.5 1.5 1.94772 1.5 2.5C1.5 3.05228 1.94772 3.5 2.5 3.5C3.05228 3.5 3.5 3.05228 3.5 2.5C3.5 1.94772 3.05228 1.5 2.5 1.5Z" fill="${iconActive}"/>
|
|
109
|
-
<path d="M12 3.20898H6V1.70898H12V3.20898Z" fill="${iconActive}"/>
|
|
110
|
-
</g>
|
|
111
|
-
<!-- Star (right-anchored) -->
|
|
112
|
-
<path transform="translate(${dx},0)" d="M1994 100.344L1998 97.9688L2002.03 100.344L2000.97 95.8438L2004.44 92.875L1999.84 92.4688L1998 88.1875L1996.16 92.4688L1991.56 92.875L1995.06 95.8438L1994 100.344ZM1990.59 105L1992.56 96.6875L1986 91.0938L1994.62 90.3438L1998 82.5L2001.38 90.375L2010 91.0938L2003.44 96.6875L2005.41 105L1998 100.594L1990.59 105Z" fill="${iconActive}"/>
|
|
113
|
-
<!-- Profile avatar (right-anchored) -->
|
|
114
|
-
<rect x="${profileX}" y="79.5" width="30" height="30" rx="15" fill="url(#bb_profile_grad)"/>
|
|
115
|
-
<rect x="${profileX + 0.75}" y="80.25" width="28.5" height="28.5" rx="14.25" stroke="#1F1F1F" stroke-opacity="0.06" stroke-width="1.5"/>
|
|
116
|
-
<!-- Extensions dots (right-anchored) -->
|
|
117
|
-
<path transform="translate(${dx},0)" d="M2127 105.404C2126.38 105.404 2125.85 105.183 2125.41 104.743C2124.97 104.302 2124.75 103.773 2124.75 103.154C2124.75 102.535 2124.97 102.005 2125.41 101.565C2125.85 101.124 2126.38 100.904 2127 100.904C2127.62 100.904 2128.15 101.124 2128.59 101.565C2129.03 102.005 2129.25 102.535 2129.25 103.154C2129.25 103.773 2129.03 104.302 2128.59 104.743C2128.15 105.183 2127.62 105.404 2127 105.404ZM2127 96.7499C2126.38 96.7499 2125.85 96.5296 2125.41 96.089C2124.97 95.6484 2124.75 95.1187 2124.75 94.5C2124.75 93.8812 2124.97 93.3516 2125.41 92.9109C2125.85 92.4703 2126.38 92.25 2127 92.25C2127.62 92.25 2128.15 92.4703 2128.59 92.9109C2129.03 93.3516 2129.25 93.8812 2129.25 94.5C2129.25 95.1187 2129.03 95.6484 2128.59 96.089C2128.15 96.5296 2127.62 96.7499 2127 96.7499ZM2127 88.0961C2126.38 88.0961 2125.85 87.8758 2125.41 87.4351C2124.97 86.9945 2124.75 86.4649 2124.75 85.8461C2124.75 85.2274 2124.97 84.6977 2125.41 84.2571C2125.85 83.8165 2126.38 83.5962 2127 83.5962C2127.62 83.5962 2128.15 83.8165 2128.59 84.2571C2129.03 84.6977 2129.25 85.2274 2129.25 85.8461C2129.25 86.4649 2129.03 86.9945 2128.59 87.4351C2128.15 87.8758 2127.62 88.0961 2127 88.0961Z" fill="${iconActive}"/>
|
|
118
|
-
</g>
|
|
119
|
-
<!-- TOOLBAR BORDER -->
|
|
120
|
-
<path d="M0 60H${iw}H0M${iw} 130.5H0V127.5H${iw}V130.5ZM${iw} 127.5M0 129V60V129M0 129M${iw} 60V129V60" fill="${borderColor}" mask="url(#bb_mask_toolbar)"/>
|
|
121
|
-
<!-- DEFS -->
|
|
122
|
-
<defs>
|
|
123
|
-
<linearGradient id="bb_profile_grad" x1="${profileX + 15}" y1="109.5" x2="${profileX + 15}" y2="79.5" gradientUnits="userSpaceOnUse">
|
|
124
|
-
<stop stop-color="#D5D8E4"/><stop offset="0.45" stop-color="#D1CAD6"/><stop offset="1" stop-color="#B7BAD1"/>
|
|
125
|
-
</linearGradient>
|
|
126
|
-
<mask id="bb_mask_toolbar" fill="white">
|
|
127
|
-
<path d="M0 76C0 67.1634 7.16344 60 16 60H${iw - 16}C${iw - 7.16} 60 ${iw} 67.1634 ${iw} 76V129H0V76Z"/>
|
|
128
|
-
</mask>
|
|
129
|
-
<clipPath id="bb_clip_toolbar">
|
|
130
|
-
<path d="M0 76C0 67.1634 7.16344 60 16 60H${iw - 16}C${iw - 7.16} 60 ${iw} 67.1634 ${iw} 76V129H0V76Z"/>
|
|
131
|
-
</clipPath>
|
|
132
|
-
</defs>
|
|
133
|
-
</svg>
|
|
134
|
-
<!-- DYNAMIC OVERLAYS -->
|
|
135
|
-
${tabFaviconOverlay}
|
|
136
|
-
<div style="position:absolute;left:187px;top:15px;width:260px;height:30px;display:flex;align-items:center;overflow:hidden;-webkit-mask-image:linear-gradient(to right,#000 85%,transparent 100%);mask-image:linear-gradient(to right,#000 85%,transparent 100%)"><span style="font-size:18px;font-weight:400;color:${textColor};white-space:nowrap;line-height:30px">${title}</span></div>
|
|
137
|
-
<div style="position:absolute;left:${ADDR_BAR_ML + 58}px;top:69px;right:${iw - (ADDR_BAR_ML + addrBarW - 18)}px;height:51px;display:flex;align-items:center;overflow:hidden"><span style="font-size:19.5px;font-weight:400;color:${textSec};white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:30px">${url}</span></div>
|
|
138
|
-
</div>`;
|
|
139
|
-
}
|
|
140
|
-
// ── Helpers ───────────────────────────────────────────────────────────────
|
|
141
|
-
function esc(s) {
|
|
142
|
-
return s.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"');
|
|
143
|
-
}
|
|
144
|
-
function attr(s) {
|
|
145
|
-
return s.replace(/&/g, '&').replace(/"/g, '"');
|
|
146
|
-
}
|
|
147
|
-
//# sourceMappingURL=browser-bar.js.map
|
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
import type { ClipDefinition, ClipOptions, LoginCredentials, VideoPlan, StepUsage, VideoPhase } from './types.js';
|
|
2
|
-
export interface ClipTarget {
|
|
3
|
-
id: string;
|
|
4
|
-
label: string;
|
|
5
|
-
viewport: {
|
|
6
|
-
width: number;
|
|
7
|
-
height: number;
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
export interface ClipOrchestratorConfig {
|
|
11
|
-
url: string;
|
|
12
|
-
clips: ClipDefinition[];
|
|
13
|
-
targets: ClipTarget[];
|
|
14
|
-
outputScale?: number;
|
|
15
|
-
langs: string[];
|
|
16
|
-
themes: Array<'light' | 'dark'>;
|
|
17
|
-
clipOptions?: ClipOptions;
|
|
18
|
-
credentials?: LoginCredentials;
|
|
19
|
-
model: string;
|
|
20
|
-
apiKey: string;
|
|
21
|
-
runId: string;
|
|
22
|
-
presetId?: string;
|
|
23
|
-
projectId?: string;
|
|
24
|
-
langInstructions?: string;
|
|
25
|
-
themeInstructions?: string;
|
|
26
|
-
navigationInstructions?: string;
|
|
27
|
-
abortSignal?: AbortSignal;
|
|
28
|
-
/** Fallback model used when the primary model fails to produce tool calls (e.g. in repair lane). */
|
|
29
|
-
fallbackModel?: string;
|
|
30
|
-
/** Per-clip timeout in milliseconds. Default: 180_000 (3 minutes). */
|
|
31
|
-
perClipTimeoutMs?: number;
|
|
32
|
-
}
|
|
33
|
-
export interface ClipVariantResult {
|
|
34
|
-
clipId: string;
|
|
35
|
-
clipName: string;
|
|
36
|
-
clipScript: string;
|
|
37
|
-
targetId: string;
|
|
38
|
-
targetLabel: string;
|
|
39
|
-
viewportWidth: number;
|
|
40
|
-
viewportHeight: number;
|
|
41
|
-
lang: string;
|
|
42
|
-
theme: string;
|
|
43
|
-
success: boolean;
|
|
44
|
-
gifPath?: string;
|
|
45
|
-
mp4Path?: string;
|
|
46
|
-
thumbnailPath?: string;
|
|
47
|
-
durationMs: number;
|
|
48
|
-
fileSizeBytes?: number;
|
|
49
|
-
plan?: VideoPlan;
|
|
50
|
-
stepsExecuted: number;
|
|
51
|
-
assessment: string;
|
|
52
|
-
failedPhase?: 'preflight' | 'planning' | 'dry_run' | 'recording' | 'postprocess';
|
|
53
|
-
failedStepIndex?: number;
|
|
54
|
-
failedSubphase?: string;
|
|
55
|
-
usage: StepUsage[];
|
|
56
|
-
}
|
|
57
|
-
export interface ClipOrchestratorResult {
|
|
58
|
-
results: ClipVariantResult[];
|
|
59
|
-
totalClips: number;
|
|
60
|
-
successCount: number;
|
|
61
|
-
}
|
|
62
|
-
export interface ClipOrchestratorCallbacks {
|
|
63
|
-
onClipStart?: (data: {
|
|
64
|
-
clipId: string;
|
|
65
|
-
clipName: string;
|
|
66
|
-
variantId: string;
|
|
67
|
-
target: {
|
|
68
|
-
width: number;
|
|
69
|
-
height: number;
|
|
70
|
-
};
|
|
71
|
-
lang: string;
|
|
72
|
-
theme: string;
|
|
73
|
-
clipIndex: number;
|
|
74
|
-
totalClips: number;
|
|
75
|
-
}) => void;
|
|
76
|
-
onClipPhase?: (data: {
|
|
77
|
-
clipId: string;
|
|
78
|
-
variantId: string;
|
|
79
|
-
phase: VideoPhase;
|
|
80
|
-
}) => void;
|
|
81
|
-
onClipStep?: (data: {
|
|
82
|
-
clipId: string;
|
|
83
|
-
variantId: string;
|
|
84
|
-
stepIndex: number;
|
|
85
|
-
total: number;
|
|
86
|
-
description: string;
|
|
87
|
-
phase: 'dry_run' | 'recording';
|
|
88
|
-
}) => void;
|
|
89
|
-
onClipStepResult?: (data: {
|
|
90
|
-
clipId: string;
|
|
91
|
-
variantId: string;
|
|
92
|
-
stepIndex: number;
|
|
93
|
-
ok: boolean;
|
|
94
|
-
reason?: string;
|
|
95
|
-
}) => void;
|
|
96
|
-
onClipRecordingDone?: (data: {
|
|
97
|
-
clipId: string;
|
|
98
|
-
variantId: string;
|
|
99
|
-
success: boolean;
|
|
100
|
-
gifPath?: string;
|
|
101
|
-
mp4Path?: string;
|
|
102
|
-
thumbnailPath?: string;
|
|
103
|
-
durationMs: number;
|
|
104
|
-
fileSizeBytes?: number;
|
|
105
|
-
lang: string;
|
|
106
|
-
theme: string;
|
|
107
|
-
targetId: string;
|
|
108
|
-
targetLabel: string;
|
|
109
|
-
assessment?: string;
|
|
110
|
-
failedPhase?: 'preflight' | 'planning' | 'dry_run' | 'recording' | 'postprocess';
|
|
111
|
-
failedStepIndex?: number;
|
|
112
|
-
failedSubphase?: string;
|
|
113
|
-
}) => void;
|
|
114
|
-
onClipPostprocessStart?: (data: {
|
|
115
|
-
clipId: string;
|
|
116
|
-
variantId: string;
|
|
117
|
-
}) => void;
|
|
118
|
-
onClipPostprocessDone?: (data: {
|
|
119
|
-
clipId: string;
|
|
120
|
-
variantId: string;
|
|
121
|
-
success: boolean;
|
|
122
|
-
gifPath?: string;
|
|
123
|
-
mp4Path?: string;
|
|
124
|
-
}) => void;
|
|
125
|
-
onClipsAllDone?: (data: {
|
|
126
|
-
totalClips: number;
|
|
127
|
-
successCount: number;
|
|
128
|
-
}) => void;
|
|
129
|
-
onLog?: (entry: {
|
|
130
|
-
level: string;
|
|
131
|
-
message: string;
|
|
132
|
-
timestamp: number;
|
|
133
|
-
}) => void;
|
|
134
|
-
/** Emit a live Playwright screenshot (base64 JPEG) for real-time preview in the UI. */
|
|
135
|
-
onScreenshot?: (base64: string) => void;
|
|
136
|
-
}
|
|
137
|
-
/**
|
|
138
|
-
* Run the clip capture pipeline for all clips × targets × langs × themes.
|
|
139
|
-
*
|
|
140
|
-
* Hybrid pipeline:
|
|
141
|
-
* 1. For each (clip, target, lang) — navigate once with the screenshot agent
|
|
142
|
-
* 2. Share the navigation session across theme variants (light/dark)
|
|
143
|
-
* 3. For each variant: plan → validate selectors → record → post-process
|
|
144
|
-
*
|
|
145
|
-
* Navigation sharing: themes only affect `colorScheme` (a Playwright setting),
|
|
146
|
-
* so the same navigation session (cookies, localStorage, URL) is reused.
|
|
147
|
-
*/
|
|
148
|
-
export declare function runClipOrchestrator(config: ClipOrchestratorConfig, callbacks?: ClipOrchestratorCallbacks): Promise<ClipOrchestratorResult>;
|