browsertrack 0.1.2 → 0.2.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 +4 -2
- package/dist/{chunk-ILRYKMME.js → chunk-3HOXPTM2.js} +97 -3
- package/dist/chunk-3HOXPTM2.js.map +1 -0
- package/dist/{chunk-SPCIROIU.js → chunk-7OCOQGDN.js} +24 -5
- package/dist/chunk-7OCOQGDN.js.map +1 -0
- package/dist/{chunk-G2Y3CXCY.js → chunk-UP5JKCFY.js} +84 -2
- package/dist/chunk-UP5JKCFY.js.map +1 -0
- package/dist/{chunk-SKCMT2DE.js → chunk-WB7ZKWK7.js} +453 -152
- package/dist/chunk-WB7ZKWK7.js.map +1 -0
- package/dist/cli/index.js +200 -5
- package/dist/cli/index.js.map +1 -1
- package/dist/client/index.cjs +452 -151
- package/dist/client/index.d.ts +28 -9
- package/dist/client/index.js +1 -1
- package/dist/client.iife.js +185 -29
- package/dist/core/index.d.ts +2 -2
- package/dist/daemon/index.d.ts +3 -3
- package/dist/daemon/index.js +2 -2
- package/dist/{engine-CeT9URuN.d.ts → engine-B43IohQY.d.ts} +13 -2
- package/dist/index.d.ts +4 -4
- package/dist/index.js +4 -4
- package/dist/mcp/index.d.ts +4 -4
- package/dist/mcp/index.js +2 -2
- package/dist/{notes-CBvN91Wf.d.ts → notes-BMnonq46.d.ts} +24 -1
- package/dist/{projects-CY8ungMt.d.ts → projects-D5J-egVN.d.ts} +1 -1
- package/dist/{server-Dd8NX2Mk.d.ts → server-BztYp1Zc.d.ts} +1 -1
- package/docs/index.md +2 -1
- package/docs/mcp-reference.md +14 -1
- package/docs/scenarios-flows.md +86 -0
- package/package.json +1 -1
- package/packages/client/src/notes/inspector.ts +533 -161
- package/packages/core/src/types/notes.ts +25 -0
- package/packages/daemon/src/notes/engine.ts +6 -0
- package/packages/daemon/src/server/ws.ts +23 -1
- package/packages/daemon/src/storage/db.ts +106 -3
- package/packages/mcp/src/handlers.ts +58 -0
- package/packages/mcp/src/tools.ts +28 -0
- package/test/client/interceptors.test.ts +64 -0
- package/test/daemon/scenario-storage.test.ts +158 -0
- package/dist/chunk-G2Y3CXCY.js.map +0 -1
- package/dist/chunk-ILRYKMME.js.map +0 -1
- package/dist/chunk-SKCMT2DE.js.map +0 -1
- package/dist/chunk-SPCIROIU.js.map +0 -1
package/dist/client/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as Breadcrumb, i as ElementSummary, b as ClientCommand, d as CommandResponse,
|
|
1
|
+
import { B as Breadcrumb, i as ElementSummary, b as ClientCommand, d as CommandResponse, v as VisualNote, R as RegionContext } from '../notes-BMnonq46.js';
|
|
2
2
|
|
|
3
3
|
interface BrowserDiagClientOptions {
|
|
4
4
|
daemonUrl?: string;
|
|
@@ -142,15 +142,21 @@ interface InspectorOptions {
|
|
|
142
142
|
showToolbar?: boolean;
|
|
143
143
|
onNoteCreated?: (note: Partial<VisualNote>) => void;
|
|
144
144
|
}
|
|
145
|
+
interface ActiveScenarioState {
|
|
146
|
+
id: string;
|
|
147
|
+
title: string;
|
|
148
|
+
stepNumber: number;
|
|
149
|
+
}
|
|
145
150
|
/**
|
|
146
|
-
* Isolated Visual Note Inspector rendering in Shadow DOM.
|
|
151
|
+
* Isolated Visual Note & Multi-Step Scenario Inspector rendering in Shadow DOM.
|
|
147
152
|
* Supports:
|
|
148
153
|
* 1. Element selection (hover highlight & click)
|
|
149
154
|
* 2. Region / Area selection (drag-and-drop rectangle on screen with cancel banner)
|
|
150
155
|
* 3. Whole page note
|
|
151
|
-
* 4.
|
|
152
|
-
* 5.
|
|
153
|
-
* 6.
|
|
156
|
+
* 4. Multi-Step Flow / Scenario Recording (sequential 'Save & Next Step' continuous capture)
|
|
157
|
+
* 5. Real-time Saved Note & Step Markers (pins with step sequencing numbers)
|
|
158
|
+
* 6. Interactive Note & Step Detail Card (with previous/next step walk-through navigation)
|
|
159
|
+
* 7. Floating quick dock / toolbar in bottom-right corner with Notes count and Flow controls
|
|
154
160
|
*/
|
|
155
161
|
declare class NoteInspector {
|
|
156
162
|
private transport;
|
|
@@ -166,7 +172,9 @@ declare class NoteInspector {
|
|
|
166
172
|
private toolbarElement;
|
|
167
173
|
private modalOverlay;
|
|
168
174
|
private cardOverlay;
|
|
175
|
+
private toastContainer;
|
|
169
176
|
private activeMode;
|
|
177
|
+
private activeScenario;
|
|
170
178
|
private hoveredElement;
|
|
171
179
|
private selectedElement;
|
|
172
180
|
private selectedRegion;
|
|
@@ -179,6 +187,9 @@ declare class NoteInspector {
|
|
|
179
187
|
constructor(transport: WebSocketTransport, screenshotDriver: ScreenshotDriver, options?: InspectorOptions);
|
|
180
188
|
init(): void;
|
|
181
189
|
syncNotes(notes: VisualNote[]): void;
|
|
190
|
+
showToast(message: string, icon?: string, durationMs?: number): void;
|
|
191
|
+
startScenario(title?: string): void;
|
|
192
|
+
finishScenario(): void;
|
|
182
193
|
setMode(mode: NoteInspectMode): void;
|
|
183
194
|
private ensureContainer;
|
|
184
195
|
private createToolbar;
|
|
@@ -195,10 +206,18 @@ declare class NoteInspector {
|
|
|
195
206
|
openNoteEditor(el?: HTMLElement, noteType?: 'element' | 'page'): void;
|
|
196
207
|
openRegionNoteEditor(region: RegionContext): void;
|
|
197
208
|
private renderNoteModal;
|
|
198
|
-
saveVisualNote(targetEl: HTMLElement, message: string, noteType?: 'element' | 'page'
|
|
199
|
-
|
|
200
|
-
|
|
209
|
+
saveVisualNote(targetEl: HTMLElement, message: string, noteType?: 'element' | 'page', scenario?: {
|
|
210
|
+
scenarioId?: string;
|
|
211
|
+
stepNumber?: number;
|
|
212
|
+
scenarioTitle?: string;
|
|
213
|
+
}): Promise<void>;
|
|
214
|
+
saveRegionVisualNote(region: RegionContext, message: string, scenario?: {
|
|
215
|
+
scenarioId?: string;
|
|
216
|
+
stepNumber?: number;
|
|
217
|
+
scenarioTitle?: string;
|
|
218
|
+
}): Promise<void>;
|
|
201
219
|
private extractElementContext;
|
|
220
|
+
private cropDataUrl;
|
|
202
221
|
destroy(): void;
|
|
203
222
|
}
|
|
204
223
|
|
|
@@ -208,4 +227,4 @@ declare class NoteInspector {
|
|
|
208
227
|
declare function init(options?: BrowserDiagClientOptions): BrowserTrackClient;
|
|
209
228
|
declare function getClient(): BrowserTrackClient | null;
|
|
210
229
|
|
|
211
|
-
export { BreadcrumbBuffer, type BrowserDiagClientOptions, BrowserScriptScreenshotDriver, BrowserTrackClient, DEFAULT_OPTIONS, type InspectorOptions, type NoteInspectMode, NoteInspector, type ScreenshotDriver, type ScreenshotResult, getClient, init };
|
|
230
|
+
export { type ActiveScenarioState, BreadcrumbBuffer, type BrowserDiagClientOptions, BrowserScriptScreenshotDriver, BrowserTrackClient, DEFAULT_OPTIONS, type InspectorOptions, type NoteInspectMode, NoteInspector, type ScreenshotDriver, type ScreenshotResult, getClient, init };
|