@opencraw/studio 0.0.7 → 0.0.8
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/index.esm.js +3239 -901
- package/dist/src/document-view/deck-view.mapper.d.ts +70 -0
- package/dist/src/document-view/index.d.ts +11 -0
- package/dist/src/document-view/pdf-view.mapper.d.ts +47 -0
- package/dist/src/document-view/table-preview.use-case.d.ts +152 -0
- package/dist/src/document-view/tree-view.mapper.d.ts +47 -0
- package/dist/src/document-view/workbook-view.mapper.d.ts +51 -0
- package/dist/src/flow-recording/action-to-step.mapper.d.ts +16 -0
- package/dist/src/flow-recording/index.d.ts +13 -0
- package/dist/src/flow-recording/next-link.policy.d.ts +27 -0
- package/dist/src/flow-recording/recorded-action.contract.d.ts +114 -0
- package/dist/src/flow-recording/recorder-script.client.d.ts +48 -0
- package/dist/src/flow-recording/recorder-session.use-case.d.ts +67 -0
- package/dist/src/flow-recording/secret-field.policy.d.ts +33 -0
- package/dist/src/flow-recording/wait-insertion.policy.d.ts +26 -0
- package/dist/src/index.d.ts +2 -2
- package/dist/src/page-inspector/dom-tree.mapper.d.ts +32 -0
- package/dist/src/page-inspector/index.d.ts +7 -0
- package/dist/src/page-inspector/page-data.algorithm.d.ts +39 -0
- package/dist/src/page-inspector/responses-seen.use-case.d.ts +36 -0
- package/dist/src/page-snapshot/index.d.ts +3 -0
- package/dist/src/page-snapshot/pdf-bytes.use-case.d.ts +16 -0
- package/dist/src/page-snapshot/reread-csv.use-case.d.ts +22 -0
- package/dist/src/page-snapshot/take-snapshot.use-case.d.ts +26 -1
- package/dist/src/studio-api/command.contract.d.ts +300 -0
- package/dist/src/studio-api/deck-preview-view.contract.d.ts +28 -0
- package/dist/src/studio-api/deck-view.contract.d.ts +127 -0
- package/dist/src/studio-api/document-tree-view.contract.d.ts +26 -0
- package/dist/src/studio-api/event.contract.d.ts +45 -0
- package/dist/src/studio-api/grid-preview-view.contract.d.ts +26 -0
- package/dist/src/studio-api/grid-view.contract.d.ts +75 -0
- package/dist/src/studio-api/index.d.ts +22 -4
- package/dist/src/studio-api/inspect-view.contract.d.ts +62 -0
- package/dist/src/studio-api/pdf-view.contract.d.ts +66 -0
- package/dist/src/studio-api/responses-seen-view.contract.d.ts +20 -0
- package/dist/src/studio-api/snapshot-view.contract.d.ts +22 -1
- package/dist/src/studio-api/table-preview-view.contract.d.ts +65 -0
- package/dist/src/studio-server/deck-preview.handler.d.ts +17 -0
- package/dist/src/studio-server/deck-view.handler.d.ts +15 -0
- package/dist/src/studio-server/document-tree.handler.d.ts +14 -0
- package/dist/src/studio-server/grid-preview.handler.d.ts +17 -0
- package/dist/src/studio-server/grid-view.handler.d.ts +20 -0
- package/dist/src/studio-server/inspect-page.handler.d.ts +18 -0
- package/dist/src/studio-server/pdf-bytes.handler.d.ts +17 -0
- package/dist/src/studio-server/pdf-view.handler.d.ts +14 -0
- package/dist/src/studio-server/recording.handler.d.ts +33 -0
- package/dist/src/studio-server/responses-seen.handler.d.ts +16 -0
- package/dist/src/studio-server/studio-http.use-case.d.ts +3 -1
- package/dist/src/studio-server/table-preview.handler.d.ts +16 -0
- package/dist/src/studio-server/workspace.store.d.ts +6 -2
- package/dist/ui/assets/index-DdiGdaTN.js +13 -0
- package/dist/ui/assets/pdf-lqXfRfkR.js +56 -0
- package/dist/ui/assets/pdf.worker.min-BmVo14Nb.mjs +28 -0
- package/dist/ui/assets/pdf.worker.min-D7i8o3wR.js +1 -0
- package/dist/ui/index.html +1 -1
- package/package.json +3 -2
- package/dist/ui/assets/index-DV8i4Zza.js +0 -13
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** One cell's value, and the type the grid shows it as — mirrors `document-view/workbook-view.mapper.ts`'s `GridCellView`, the wire shape for the UI (studio plan §3.4, issue #94's 5c). */
|
|
3
|
+
export declare const gridCellViewSchema: z.ZodObject<{
|
|
4
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
|
|
5
|
+
type: z.ZodEnum<{
|
|
6
|
+
string: "string";
|
|
7
|
+
number: "number";
|
|
8
|
+
boolean: "boolean";
|
|
9
|
+
date: "date";
|
|
10
|
+
}>;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
/** One merged range, 0-based and inclusive. */
|
|
13
|
+
export declare const gridMergeViewSchema: z.ZodObject<{
|
|
14
|
+
ref: z.ZodString;
|
|
15
|
+
top: z.ZodNumber;
|
|
16
|
+
left: z.ZodNumber;
|
|
17
|
+
bottom: z.ZodNumber;
|
|
18
|
+
right: z.ZodNumber;
|
|
19
|
+
}, z.core.$strip>;
|
|
20
|
+
export declare const gridSheetViewSchema: z.ZodObject<{
|
|
21
|
+
name: z.ZodString;
|
|
22
|
+
hidden: z.ZodBoolean;
|
|
23
|
+
hiddenRows: z.ZodArray<z.ZodNumber>;
|
|
24
|
+
columnCount: z.ZodNumber;
|
|
25
|
+
rows: z.ZodArray<z.ZodArray<z.ZodObject<{
|
|
26
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
|
|
27
|
+
type: z.ZodEnum<{
|
|
28
|
+
string: "string";
|
|
29
|
+
number: "number";
|
|
30
|
+
boolean: "boolean";
|
|
31
|
+
date: "date";
|
|
32
|
+
}>;
|
|
33
|
+
}, z.core.$strip>>>;
|
|
34
|
+
merges: z.ZodArray<z.ZodObject<{
|
|
35
|
+
ref: z.ZodString;
|
|
36
|
+
top: z.ZodNumber;
|
|
37
|
+
left: z.ZodNumber;
|
|
38
|
+
bottom: z.ZodNumber;
|
|
39
|
+
right: z.ZodNumber;
|
|
40
|
+
}, z.core.$strip>>;
|
|
41
|
+
}, z.core.$strip>;
|
|
42
|
+
/** What `grid-view` answers with (studio plan §3.4, issue #94's 5c): every sheet's cells, typed, with hidden sheets/rows marked and merged ranges resolved, for the grid canvas to draw. */
|
|
43
|
+
export declare const workbookDocumentViewSchema: z.ZodObject<{
|
|
44
|
+
sheets: z.ZodArray<z.ZodObject<{
|
|
45
|
+
name: z.ZodString;
|
|
46
|
+
hidden: z.ZodBoolean;
|
|
47
|
+
hiddenRows: z.ZodArray<z.ZodNumber>;
|
|
48
|
+
columnCount: z.ZodNumber;
|
|
49
|
+
rows: z.ZodArray<z.ZodArray<z.ZodObject<{
|
|
50
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
|
|
51
|
+
type: z.ZodEnum<{
|
|
52
|
+
string: "string";
|
|
53
|
+
number: "number";
|
|
54
|
+
boolean: "boolean";
|
|
55
|
+
date: "date";
|
|
56
|
+
}>;
|
|
57
|
+
}, z.core.$strip>>>;
|
|
58
|
+
merges: z.ZodArray<z.ZodObject<{
|
|
59
|
+
ref: z.ZodString;
|
|
60
|
+
top: z.ZodNumber;
|
|
61
|
+
left: z.ZodNumber;
|
|
62
|
+
bottom: z.ZodNumber;
|
|
63
|
+
right: z.ZodNumber;
|
|
64
|
+
}, z.core.$strip>>;
|
|
65
|
+
}, z.core.$strip>>;
|
|
66
|
+
csv: z.ZodOptional<z.ZodObject<{
|
|
67
|
+
encoding: z.ZodString;
|
|
68
|
+
delimiter: z.ZodString;
|
|
69
|
+
}, z.core.$strip>>;
|
|
70
|
+
}, z.core.$strip>;
|
|
71
|
+
export type GridCellView = z.infer<typeof gridCellViewSchema>;
|
|
72
|
+
export type GridMergeView = z.infer<typeof gridMergeViewSchema>;
|
|
73
|
+
export type GridSheetView = z.infer<typeof gridSheetViewSchema>;
|
|
74
|
+
export type WorkbookDocumentView = z.infer<typeof workbookDocumentViewSchema>;
|
|
75
|
+
//# sourceMappingURL=grid-view.contract.d.ts.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export { sampleBudgetSchema, openWorkspaceCommandSchema, runSampleCommandSchema, stopRunCommandSchema, saveRecipeCommandSchema, fetchStartPageCommandSchema, saveOutlineCommandSchema, takeSnapshotCommandSchema, verifySelectorCommandSchema, inferSelectorCommandSchema, missingWhyTargetSchema, rejectedWhyTargetSchema, whyTargetSchema, explainWhyCommandSchema, studioCommandSchema } from './command.contract.js';
|
|
2
|
-
export type { SampleBudget, OpenWorkspaceCommand, RunSampleCommand, StopRunCommand, SaveRecipeCommand, FetchStartPageCommand, SaveOutlineCommand, TakeSnapshotCommand, VerifySelectorCommand, InferSelectorCommand, MissingWhyTarget, RejectedWhyTarget, WhyTarget, ExplainWhyCommand, StudioCommand } from './command.contract.js';
|
|
1
|
+
export { sampleBudgetSchema, openWorkspaceCommandSchema, runSampleCommandSchema, stopRunCommandSchema, saveRecipeCommandSchema, fetchStartPageCommandSchema, saveOutlineCommandSchema, takeSnapshotCommandSchema, verifySelectorCommandSchema, inferSelectorCommandSchema, missingWhyTargetSchema, rejectedWhyTargetSchema, whyTargetSchema, explainWhyCommandSchema, inspectPageCommandSchema, responsesSeenCommandSchema, documentTreeCommandSchema, pdfViewCommandSchema, tablePreviewOptionsSchema, tablePreviewCommandSchema, gridViewCommandSchema, gridPreviewOptionsSchema, gridPreviewCommandSchema, deckViewCommandSchema, deckPreviewOptionsSchema, deckPreviewCommandSchema, startRecordingCommandSchema, stopRecordingCommandSchema, studioCommandSchema } from './command.contract.js';
|
|
2
|
+
export type { SampleBudget, OpenWorkspaceCommand, RunSampleCommand, StopRunCommand, SaveRecipeCommand, FetchStartPageCommand, SaveOutlineCommand, TakeSnapshotCommand, VerifySelectorCommand, InferSelectorCommand, MissingWhyTarget, RejectedWhyTarget, WhyTarget, ExplainWhyCommand, InspectPageCommand, ResponsesSeenCommand, DocumentTreeCommand, PdfViewCommand, TablePreviewOptions, TablePreviewCommand, GridViewCommand, GridPreviewOptions, GridPreviewCommand, DeckViewCommand, DeckPreviewOptions, DeckPreviewCommand, StartRecordingCommand, StopRecordingCommand, StudioCommand } from './command.contract.js';
|
|
3
3
|
export { snapshotViewSchema } from './snapshot-view.contract.js';
|
|
4
4
|
export type { SnapshotView } from './snapshot-view.contract.js';
|
|
5
5
|
export { verifySelectorViewSchema } from './verify-selector-view.contract.js';
|
|
6
6
|
export type { VerifySelectorView } from './verify-selector-view.contract.js';
|
|
7
7
|
export { fieldPickSchema, inferSelectorViewSchema } from './infer-selector-view.contract.js';
|
|
8
8
|
export type { FieldPick, InferSelectorView } from './infer-selector-view.contract.js';
|
|
9
|
-
export { stoppedBySchema, fieldTraceSchema, traceLineEventSchema, recordEventSchema, recordRejectedEventSchema, runFinishedEventSchema, workspaceChangedEventSchema, studioEventSchema } from './event.contract.js';
|
|
10
|
-
export type { StoppedBy, FieldTraceView, TraceLineEvent, RecordEvent, RecordRejectedEvent, RunFinishedEvent, WorkspaceChangedEvent, StudioEvent } from './event.contract.js';
|
|
9
|
+
export { stoppedBySchema, fieldTraceSchema, traceLineEventSchema, recordEventSchema, recordRejectedEventSchema, runFinishedEventSchema, workspaceChangedEventSchema, recordingCardEventSchema, recordingNoteEventSchema, recordingStoppedEventSchema, studioEventSchema } from './event.contract.js';
|
|
10
|
+
export type { StoppedBy, FieldTraceView, TraceLineEvent, RecordEvent, RecordRejectedEvent, RunFinishedEvent, WorkspaceChangedEvent, RecordingCardEvent, RecordingNoteEvent, RecordingStoppedEvent, StudioEvent } from './event.contract.js';
|
|
11
11
|
export { recipeIssueSchema, recipeListingSchema, workspaceViewSchema } from './workspace-view.contract.js';
|
|
12
12
|
export type { RecipeIssue, RecipeListing, WorkspaceView } from './workspace-view.contract.js';
|
|
13
13
|
export { sampleRunRecordSchema, sampleRunViewSchema } from './sample-run-view.contract.js';
|
|
@@ -18,4 +18,22 @@ export { sentencePartSchema, outlineCardSchema, outlineBracketSchema, outlineNod
|
|
|
18
18
|
export type { SentencePart, OutlineCard, OutlineBracket, OutlineNode, OutlineView } from './outline-view.contract.js';
|
|
19
19
|
export { whyViewSchema } from './why-view.contract.js';
|
|
20
20
|
export type { WhyView } from './why-view.contract.js';
|
|
21
|
+
export { domTreeNodeViewSchema, pageDataFindingSchema, inspectViewSchema } from './inspect-view.contract.js';
|
|
22
|
+
export type { DomTreeNodeView, PageDataKind, PageDataFindingView, InspectView } from './inspect-view.contract.js';
|
|
23
|
+
export { observedResponseSchema, responsesSeenViewSchema } from './responses-seen-view.contract.js';
|
|
24
|
+
export type { ObservedResponseView, ResponsesSeenView } from './responses-seen-view.contract.js';
|
|
25
|
+
export { documentTreeNodeViewSchema, documentTreeViewSchema } from './document-tree-view.contract.js';
|
|
26
|
+
export type { DocumentTreeNodeView, DocumentTreeView } from './document-tree-view.contract.js';
|
|
27
|
+
export { pdfCellViewSchema, pdfRowViewSchema, pdfPageViewSchema, pdfDocumentViewSchema } from './pdf-view.contract.js';
|
|
28
|
+
export type { PdfCellView, PdfRowView, PdfPageView, PdfDocumentView } from './pdf-view.contract.js';
|
|
29
|
+
export { tablePreviewTableSchema, tablePreviewBandSchema, tablePreviewMatchSchema, tablePreviewViewSchema } from './table-preview-view.contract.js';
|
|
30
|
+
export type { TablePreviewTableView, TablePreviewBandView, TablePreviewMatchView, TablePreviewView } from './table-preview-view.contract.js';
|
|
31
|
+
export { gridCellViewSchema, gridMergeViewSchema, gridSheetViewSchema, workbookDocumentViewSchema } from './grid-view.contract.js';
|
|
32
|
+
export type { GridCellView, GridMergeView, GridSheetView, WorkbookDocumentView } from './grid-view.contract.js';
|
|
33
|
+
export { gridTablePreviewMatchSchema, gridTablePreviewViewSchema } from './grid-preview-view.contract.js';
|
|
34
|
+
export type { GridTablePreviewMatchView, GridTablePreviewView } from './grid-preview-view.contract.js';
|
|
35
|
+
export { deckShapeViewSchema, deckChartSeriesViewSchema, deckChartViewSchema, deckSlideViewSchema, deckDocumentViewSchema } from './deck-view.contract.js';
|
|
36
|
+
export type { DeckShapeView, DeckChartSeriesView, DeckChartView, DeckSlideView, DeckDocumentView } from './deck-view.contract.js';
|
|
37
|
+
export { deckTablePreviewMatchSchema, deckTablePreviewViewSchema } from './deck-preview-view.contract.js';
|
|
38
|
+
export type { DeckTablePreviewMatchView, DeckTablePreviewView } from './deck-preview-view.contract.js';
|
|
21
39
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** One row of the Inspect panel's DOM tree — mirrors `page-inspector/dom-tree.mapper.ts`'s `DomTreeNode`, the wire shape for the UI (issue #93). */
|
|
3
|
+
export interface DomTreeNodeView {
|
|
4
|
+
nodeId: string;
|
|
5
|
+
tag: string;
|
|
6
|
+
id?: string;
|
|
7
|
+
classes?: string[];
|
|
8
|
+
attributes: Record<string, string>;
|
|
9
|
+
text?: string;
|
|
10
|
+
hidden: boolean;
|
|
11
|
+
children: DomTreeNodeView[];
|
|
12
|
+
repeatCount?: number;
|
|
13
|
+
repeatNodeIds?: string[];
|
|
14
|
+
}
|
|
15
|
+
export declare const domTreeNodeViewSchema: z.ZodType<DomTreeNodeView>;
|
|
16
|
+
declare const pageDataKindSchema: z.ZodEnum<{
|
|
17
|
+
link: "link";
|
|
18
|
+
"ld-json": "ld-json";
|
|
19
|
+
"json-script": "json-script";
|
|
20
|
+
"inline-state": "inline-state";
|
|
21
|
+
meta: "meta";
|
|
22
|
+
}>;
|
|
23
|
+
/** One "data in the page" entry — mirrors `page-inspector/page-data.algorithm.ts`'s `PageDataFinding`. */
|
|
24
|
+
export declare const pageDataFindingSchema: z.ZodObject<{
|
|
25
|
+
kind: z.ZodEnum<{
|
|
26
|
+
link: "link";
|
|
27
|
+
"ld-json": "ld-json";
|
|
28
|
+
"json-script": "json-script";
|
|
29
|
+
"inline-state": "inline-state";
|
|
30
|
+
meta: "meta";
|
|
31
|
+
}>;
|
|
32
|
+
label: z.ZodString;
|
|
33
|
+
selector: z.ZodString;
|
|
34
|
+
selectorKind: z.ZodLiteral<"css">;
|
|
35
|
+
matches: z.ZodNumber;
|
|
36
|
+
keys: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
37
|
+
attribute: z.ZodOptional<z.ZodString>;
|
|
38
|
+
}, z.core.$strip>;
|
|
39
|
+
export type PageDataKind = z.infer<typeof pageDataKindSchema>;
|
|
40
|
+
export type PageDataFindingView = z.infer<typeof pageDataFindingSchema>;
|
|
41
|
+
/** What `inspect-page` answers with (studio plan §3.3, issue #93): the DOM tree and the data-in-the-page findings, in one round trip — both come from the same cached snapshot/raw capture, so there is no reason to ask twice. */
|
|
42
|
+
export declare const inspectViewSchema: z.ZodObject<{
|
|
43
|
+
tree: z.ZodType<DomTreeNodeView, unknown, z.core.$ZodTypeInternals<DomTreeNodeView, unknown>>;
|
|
44
|
+
pageData: z.ZodArray<z.ZodObject<{
|
|
45
|
+
kind: z.ZodEnum<{
|
|
46
|
+
link: "link";
|
|
47
|
+
"ld-json": "ld-json";
|
|
48
|
+
"json-script": "json-script";
|
|
49
|
+
"inline-state": "inline-state";
|
|
50
|
+
meta: "meta";
|
|
51
|
+
}>;
|
|
52
|
+
label: z.ZodString;
|
|
53
|
+
selector: z.ZodString;
|
|
54
|
+
selectorKind: z.ZodLiteral<"css">;
|
|
55
|
+
matches: z.ZodNumber;
|
|
56
|
+
keys: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
57
|
+
attribute: z.ZodOptional<z.ZodString>;
|
|
58
|
+
}, z.core.$strip>>;
|
|
59
|
+
}, z.core.$strip>;
|
|
60
|
+
export type InspectView = z.infer<typeof inspectViewSchema>;
|
|
61
|
+
export {};
|
|
62
|
+
//# sourceMappingURL=inspect-view.contract.d.ts.map
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** One text cell, in PDF points — mirrors `document-view/pdf-view.mapper.ts`'s `PdfCellView`, the wire shape for the UI (studio plan §3.4, issue #94's 5b). */
|
|
3
|
+
export declare const pdfCellViewSchema: z.ZodObject<{
|
|
4
|
+
x: z.ZodNumber;
|
|
5
|
+
y: z.ZodNumber;
|
|
6
|
+
width: z.ZodNumber;
|
|
7
|
+
height: z.ZodNumber;
|
|
8
|
+
text: z.ZodString;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
export declare const pdfRowViewSchema: z.ZodObject<{
|
|
11
|
+
top: z.ZodNumber;
|
|
12
|
+
bottom: z.ZodNumber;
|
|
13
|
+
cells: z.ZodArray<z.ZodObject<{
|
|
14
|
+
x: z.ZodNumber;
|
|
15
|
+
y: z.ZodNumber;
|
|
16
|
+
width: z.ZodNumber;
|
|
17
|
+
height: z.ZodNumber;
|
|
18
|
+
text: z.ZodString;
|
|
19
|
+
}, z.core.$strip>>;
|
|
20
|
+
}, z.core.$strip>;
|
|
21
|
+
export declare const pdfPageViewSchema: z.ZodObject<{
|
|
22
|
+
number: z.ZodNumber;
|
|
23
|
+
width: z.ZodNumber;
|
|
24
|
+
height: z.ZodNumber;
|
|
25
|
+
rows: z.ZodArray<z.ZodObject<{
|
|
26
|
+
top: z.ZodNumber;
|
|
27
|
+
bottom: z.ZodNumber;
|
|
28
|
+
cells: z.ZodArray<z.ZodObject<{
|
|
29
|
+
x: z.ZodNumber;
|
|
30
|
+
y: z.ZodNumber;
|
|
31
|
+
width: z.ZodNumber;
|
|
32
|
+
height: z.ZodNumber;
|
|
33
|
+
text: z.ZodString;
|
|
34
|
+
}, z.core.$strip>>;
|
|
35
|
+
}, z.core.$strip>>;
|
|
36
|
+
rowCount: z.ZodNumber;
|
|
37
|
+
cellCount: z.ZodNumber;
|
|
38
|
+
hasTextLayer: z.ZodBoolean;
|
|
39
|
+
}, z.core.$strip>;
|
|
40
|
+
/** What `pdf-view` answers with (studio plan §3.4, issue #94's 5b): every page's cells and rows, for the PDF canvas to draw over its own `pdf.js` rendering. */
|
|
41
|
+
export declare const pdfDocumentViewSchema: z.ZodObject<{
|
|
42
|
+
pages: z.ZodArray<z.ZodObject<{
|
|
43
|
+
number: z.ZodNumber;
|
|
44
|
+
width: z.ZodNumber;
|
|
45
|
+
height: z.ZodNumber;
|
|
46
|
+
rows: z.ZodArray<z.ZodObject<{
|
|
47
|
+
top: z.ZodNumber;
|
|
48
|
+
bottom: z.ZodNumber;
|
|
49
|
+
cells: z.ZodArray<z.ZodObject<{
|
|
50
|
+
x: z.ZodNumber;
|
|
51
|
+
y: z.ZodNumber;
|
|
52
|
+
width: z.ZodNumber;
|
|
53
|
+
height: z.ZodNumber;
|
|
54
|
+
text: z.ZodString;
|
|
55
|
+
}, z.core.$strip>>;
|
|
56
|
+
}, z.core.$strip>>;
|
|
57
|
+
rowCount: z.ZodNumber;
|
|
58
|
+
cellCount: z.ZodNumber;
|
|
59
|
+
hasTextLayer: z.ZodBoolean;
|
|
60
|
+
}, z.core.$strip>>;
|
|
61
|
+
}, z.core.$strip>;
|
|
62
|
+
export type PdfCellView = z.infer<typeof pdfCellViewSchema>;
|
|
63
|
+
export type PdfRowView = z.infer<typeof pdfRowViewSchema>;
|
|
64
|
+
export type PdfPageView = z.infer<typeof pdfPageViewSchema>;
|
|
65
|
+
export type PdfDocumentView = z.infer<typeof pdfDocumentViewSchema>;
|
|
66
|
+
//# sourceMappingURL=pdf-view.contract.d.ts.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** One JSON response seen — mirrors `page-inspector/responses-seen.use-case.ts`'s `ObservedResponse`. */
|
|
3
|
+
export declare const observedResponseSchema: z.ZodObject<{
|
|
4
|
+
url: z.ZodString;
|
|
5
|
+
status: z.ZodNumber;
|
|
6
|
+
size: z.ZodNumber;
|
|
7
|
+
shape: z.ZodString;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
export type ObservedResponseView = z.infer<typeof observedResponseSchema>;
|
|
10
|
+
/** What `responses-seen` answers with (studio plan §3.3, issue #93): the JSON responses the page fetched while it rendered, for the panel's "responses seen" list. */
|
|
11
|
+
export declare const responsesSeenViewSchema: z.ZodObject<{
|
|
12
|
+
responses: z.ZodArray<z.ZodObject<{
|
|
13
|
+
url: z.ZodString;
|
|
14
|
+
status: z.ZodNumber;
|
|
15
|
+
size: z.ZodNumber;
|
|
16
|
+
shape: z.ZodString;
|
|
17
|
+
}, z.core.$strip>>;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
export type ResponsesSeenView = z.infer<typeof responsesSeenViewSchema>;
|
|
20
|
+
//# sourceMappingURL=responses-seen-view.contract.d.ts.map
|
|
@@ -1,9 +1,30 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* What `take-snapshot` answers with: the rewritten document ready for the
|
|
4
|
+
* content pane's sandboxed iframe (studio plan §3.1, issue #91). `format`
|
|
5
|
+
* (api mode only; absent in web mode, whose document is always HTML) is
|
|
6
|
+
* what the content pane uses to choose a canvas — the snapshot iframe for
|
|
7
|
+
* `html` (and `docx`/`markdown`, already turned into HTML), else
|
|
8
|
+
* `document-view`'s tree/pdf/grid/deck canvas (studio plan §3.4, issue #94).
|
|
9
|
+
*/
|
|
3
10
|
export declare const snapshotViewSchema: z.ZodObject<{
|
|
4
11
|
html: z.ZodString;
|
|
5
12
|
nodeCount: z.ZodNumber;
|
|
6
13
|
baseUrl: z.ZodString;
|
|
14
|
+
format: z.ZodOptional<z.ZodEnum<{
|
|
15
|
+
text: "text";
|
|
16
|
+
html: "html";
|
|
17
|
+
json: "json";
|
|
18
|
+
jsonl: "jsonl";
|
|
19
|
+
pdf: "pdf";
|
|
20
|
+
csv: "csv";
|
|
21
|
+
xlsx: "xlsx";
|
|
22
|
+
pptx: "pptx";
|
|
23
|
+
yaml: "yaml";
|
|
24
|
+
markdown: "markdown";
|
|
25
|
+
xml: "xml";
|
|
26
|
+
docx: "docx";
|
|
27
|
+
}>>;
|
|
7
28
|
}, z.core.$strip>;
|
|
8
29
|
export type SnapshotView = z.infer<typeof snapshotViewSchema>;
|
|
9
30
|
//# sourceMappingURL=snapshot-view.contract.d.ts.map
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** One table matched by a `table` extract's options — mirrors `@opencraw/core`'s `PdfTable`. */
|
|
3
|
+
export declare const tablePreviewTableSchema: z.ZodObject<{
|
|
4
|
+
page: z.ZodNumber;
|
|
5
|
+
title: z.ZodString;
|
|
6
|
+
header: z.ZodArray<z.ZodString>;
|
|
7
|
+
rows: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
/** One column band a matched table's body clustered into — mirrors `@opencraw/core`'s `TableBandDiagnostics`. */
|
|
10
|
+
export declare const tablePreviewBandSchema: z.ZodObject<{
|
|
11
|
+
start: z.ZodNumber;
|
|
12
|
+
end: z.ZodNumber;
|
|
13
|
+
column: z.ZodNumber;
|
|
14
|
+
name: z.ZodString;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
/** One matched table, with the exact page rows to highlight — mirrors `document-view/table-preview.use-case.ts`'s `TablePreviewMatch`. */
|
|
17
|
+
export declare const tablePreviewMatchSchema: z.ZodObject<{
|
|
18
|
+
page: z.ZodNumber;
|
|
19
|
+
headerRowIndex: z.ZodNumber;
|
|
20
|
+
matchedRowIndices: z.ZodArray<z.ZodNumber>;
|
|
21
|
+
bands: z.ZodArray<z.ZodObject<{
|
|
22
|
+
start: z.ZodNumber;
|
|
23
|
+
end: z.ZodNumber;
|
|
24
|
+
column: z.ZodNumber;
|
|
25
|
+
name: z.ZodString;
|
|
26
|
+
}, z.core.$strip>>;
|
|
27
|
+
bandTolerance: z.ZodNumber;
|
|
28
|
+
table: z.ZodObject<{
|
|
29
|
+
page: z.ZodNumber;
|
|
30
|
+
title: z.ZodString;
|
|
31
|
+
header: z.ZodArray<z.ZodString>;
|
|
32
|
+
rows: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
33
|
+
}, z.core.$strip>;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
/**
|
|
36
|
+
* What `table-preview` answers with (studio plan §3.4, issue #94's 5b: the
|
|
37
|
+
* live preview): every match, or `error` when a pattern in the options does
|
|
38
|
+
* not compile — expected while the person is still typing it, not thrown.
|
|
39
|
+
*/
|
|
40
|
+
export declare const tablePreviewViewSchema: z.ZodObject<{
|
|
41
|
+
matches: z.ZodArray<z.ZodObject<{
|
|
42
|
+
page: z.ZodNumber;
|
|
43
|
+
headerRowIndex: z.ZodNumber;
|
|
44
|
+
matchedRowIndices: z.ZodArray<z.ZodNumber>;
|
|
45
|
+
bands: z.ZodArray<z.ZodObject<{
|
|
46
|
+
start: z.ZodNumber;
|
|
47
|
+
end: z.ZodNumber;
|
|
48
|
+
column: z.ZodNumber;
|
|
49
|
+
name: z.ZodString;
|
|
50
|
+
}, z.core.$strip>>;
|
|
51
|
+
bandTolerance: z.ZodNumber;
|
|
52
|
+
table: z.ZodObject<{
|
|
53
|
+
page: z.ZodNumber;
|
|
54
|
+
title: z.ZodString;
|
|
55
|
+
header: z.ZodArray<z.ZodString>;
|
|
56
|
+
rows: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
57
|
+
}, z.core.$strip>;
|
|
58
|
+
}, z.core.$strip>>;
|
|
59
|
+
error: z.ZodOptional<z.ZodString>;
|
|
60
|
+
}, z.core.$strip>;
|
|
61
|
+
export type TablePreviewTableView = z.infer<typeof tablePreviewTableSchema>;
|
|
62
|
+
export type TablePreviewBandView = z.infer<typeof tablePreviewBandSchema>;
|
|
63
|
+
export type TablePreviewMatchView = z.infer<typeof tablePreviewMatchSchema>;
|
|
64
|
+
export type TablePreviewView = z.infer<typeof tablePreviewViewSchema>;
|
|
65
|
+
//# sourceMappingURL=table-preview-view.contract.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { DeckPreviewCommand, DeckTablePreviewView } from '../studio-api/index.js';
|
|
2
|
+
import type { StudioState } from './workspace.store.js';
|
|
3
|
+
/**
|
|
4
|
+
* Handles `deck-preview`: the deck canvas's live preview of a `table`
|
|
5
|
+
* extract's options (`document-view`'s `table-preview.use-case.ts`'s
|
|
6
|
+
* `previewDeckTable`, studio plan §3.4, issue #94's 5d), off the same cached
|
|
7
|
+
* snapshot `take-snapshot`/`deck-view` already captured — a pure computation
|
|
8
|
+
* over it, so this answers instantly on every option change, no re-fetch or
|
|
9
|
+
* re-parse.
|
|
10
|
+
*
|
|
11
|
+
* @param state - The server state.
|
|
12
|
+
* @param command - The command; `command.path` must already have a cached snapshot (call `take-snapshot` first).
|
|
13
|
+
* @returns The matched tables, or `error` when an option's pattern does not compile.
|
|
14
|
+
* @throws Error when no workspace is open, or `command.path` has no cached snapshot yet.
|
|
15
|
+
*/
|
|
16
|
+
export declare function handleDeckPreview(state: StudioState, command: DeckPreviewCommand): DeckTablePreviewView;
|
|
17
|
+
//# sourceMappingURL=deck-preview.handler.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { DeckDocumentView, DeckViewCommand } from '../studio-api/index.js';
|
|
2
|
+
import type { StudioState } from './workspace.store.js';
|
|
3
|
+
/**
|
|
4
|
+
* Handles `deck-view`: the deck canvas's slides, shapes, tables, charts and
|
|
5
|
+
* notes (`document-view`'s `deck-view.mapper.ts`, studio plan §3.4, issue
|
|
6
|
+
* #94's 5d), off the same cached snapshot `take-snapshot`/`document-tree`
|
|
7
|
+
* already use.
|
|
8
|
+
*
|
|
9
|
+
* @param state - The server state.
|
|
10
|
+
* @param command - The command; `command.path` must already have a cached snapshot (call `take-snapshot` first).
|
|
11
|
+
* @returns The document's view.
|
|
12
|
+
* @throws Error when no workspace is open, `command.path` has no cached snapshot yet, or the snapshot's document is not a read deck.
|
|
13
|
+
*/
|
|
14
|
+
export declare function handleDeckView(state: StudioState, command: DeckViewCommand): DeckDocumentView;
|
|
15
|
+
//# sourceMappingURL=deck-view.handler.d.ts.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { DocumentTreeCommand, DocumentTreeView } from '../studio-api/index.js';
|
|
2
|
+
import type { StudioState } from './workspace.store.js';
|
|
3
|
+
/**
|
|
4
|
+
* Handles `document-tree`: the content pane's tree canvas for a JSON, YAML
|
|
5
|
+
* or XML document (`document-view`, studio plan §3.4, issue #94's 5a), off
|
|
6
|
+
* the same cached snapshot `take-snapshot`/`inspect-page` already use.
|
|
7
|
+
*
|
|
8
|
+
* @param state - The server state.
|
|
9
|
+
* @param command - The command; `command.path` must already have a cached snapshot (call `take-snapshot` first).
|
|
10
|
+
* @returns The tree.
|
|
11
|
+
* @throws Error when no workspace is open, `command.path` has no cached snapshot yet, or the snapshot's document is not JSON/YAML/XML (no parsed body at all in web mode; PDF/workbook/deck in api mode — see `documentTreeView`'s own doc comment).
|
|
12
|
+
*/
|
|
13
|
+
export declare function handleDocumentTree(state: StudioState, command: DocumentTreeCommand): DocumentTreeView;
|
|
14
|
+
//# sourceMappingURL=document-tree.handler.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { GridPreviewCommand, GridTablePreviewView } from '../studio-api/index.js';
|
|
2
|
+
import type { StudioState } from './workspace.store.js';
|
|
3
|
+
/**
|
|
4
|
+
* Handles `grid-preview`: the grid canvas's live preview of a `table`
|
|
5
|
+
* extract's options (`document-view`'s `table-preview.use-case.ts`'s
|
|
6
|
+
* `previewGridTable`, studio plan §3.4, issue #94's 5c), off the same
|
|
7
|
+
* cached snapshot `take-snapshot`/`grid-view` already captured — a pure
|
|
8
|
+
* computation over it, so this answers instantly on every option change, no
|
|
9
|
+
* re-fetch or re-parse.
|
|
10
|
+
*
|
|
11
|
+
* @param state - The server state.
|
|
12
|
+
* @param command - The command; `command.path` must already have a cached snapshot (call `take-snapshot` first).
|
|
13
|
+
* @returns The matched tables, or `error` when an option's pattern does not compile.
|
|
14
|
+
* @throws Error when no workspace is open, or `command.path` has no cached snapshot yet.
|
|
15
|
+
*/
|
|
16
|
+
export declare function handleGridPreview(state: StudioState, command: GridPreviewCommand): GridTablePreviewView;
|
|
17
|
+
//# sourceMappingURL=grid-preview.handler.d.ts.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { GridViewCommand, WorkbookDocumentView } from '../studio-api/index.js';
|
|
2
|
+
import type { StudioState } from './workspace.store.js';
|
|
3
|
+
/**
|
|
4
|
+
* Handles `grid-view`: the grid canvas's sheets and cells (`document-view`'s
|
|
5
|
+
* `workbook-view.mapper.ts`, studio plan §3.4, issue #94's 5c), off the same
|
|
6
|
+
* cached snapshot `take-snapshot`/`document-tree`/`pdf-view` already use.
|
|
7
|
+
*
|
|
8
|
+
* `delimiter`/`encoding` re-read a CSV with the override applied
|
|
9
|
+
* (`page-snapshot`'s `rereadCsv`) and replace the cached snapshot's body with
|
|
10
|
+
* the fresh reading, so a following `grid-preview` (and another `grid-view`
|
|
11
|
+
* with no override) sees the same one — the override sticks until
|
|
12
|
+
* `take-snapshot` recaptures.
|
|
13
|
+
*
|
|
14
|
+
* @param state - The server state.
|
|
15
|
+
* @param command - The command; `command.path` must already have a cached snapshot (call `take-snapshot` first).
|
|
16
|
+
* @returns The document's view.
|
|
17
|
+
* @throws Error when no workspace is open, `command.path` has no cached snapshot yet, an override is given for a snapshot that is not a CSV, or the snapshot's document is not a read workbook.
|
|
18
|
+
*/
|
|
19
|
+
export declare function handleGridView(state: StudioState, command: GridViewCommand): Promise<WorkbookDocumentView>;
|
|
20
|
+
//# sourceMappingURL=grid-view.handler.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { InspectPageCommand, InspectView } from '../studio-api/index.js';
|
|
2
|
+
import type { StudioState } from './workspace.store.js';
|
|
3
|
+
/**
|
|
4
|
+
* Handles `inspect-page`: the Inspect panel's DOM tree and data-in-the-page
|
|
5
|
+
* findings, off the same cached snapshot `take-snapshot`/`infer-selector`
|
|
6
|
+
* already use (`page-inspector`, issue #93). `domTree` reads the cached,
|
|
7
|
+
* rewritten snapshot (the same markup the content pane's iframe shows, so a
|
|
8
|
+
* tree row's `nodeId` lines up with it exactly); `pageData` reads the raw
|
|
9
|
+
* capture (`SnapshotResult.rawHtml`), since the display snapshot has had its
|
|
10
|
+
* `<script>` tags stripped for the sandboxed iframe.
|
|
11
|
+
*
|
|
12
|
+
* @param state - The server state.
|
|
13
|
+
* @param command - The command; `command.path` must already have a cached snapshot (call `take-snapshot` first).
|
|
14
|
+
* @returns The tree and the data-in-the-page findings.
|
|
15
|
+
* @throws Error when no workspace is open, or `command.path` has no cached snapshot yet.
|
|
16
|
+
*/
|
|
17
|
+
export declare function handleInspectPage(state: StudioState, command: InspectPageCommand): InspectView;
|
|
18
|
+
//# sourceMappingURL=inspect-page.handler.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { StudioState } from './workspace.store.js';
|
|
2
|
+
/**
|
|
3
|
+
* Handles `GET /api/pdf-bytes`: the raw bytes of a cached PDF snapshot, for
|
|
4
|
+
* the PDF canvas's `pdf.js` to render in the browser (studio plan §3.4,
|
|
5
|
+
* issue #94's 5b). Not a `studio-api` command — the other commands all
|
|
6
|
+
* answer JSON, and pdf.js wants the file itself — so this is its own route,
|
|
7
|
+
* read directly by `studio-http.use-case.ts` (mirrors `static-file.handler.ts`'s
|
|
8
|
+
* own reach outside the command dispatch).
|
|
9
|
+
*
|
|
10
|
+
* @param state - The server state.
|
|
11
|
+
* @param recipeId - The recipe.
|
|
12
|
+
* @param path - The step path; must already have a cached PDF snapshot (call `take-snapshot` first).
|
|
13
|
+
* @returns The raw PDF bytes.
|
|
14
|
+
* @throws Error when `path` has no cached snapshot yet, or the snapshot's document is not a PDF.
|
|
15
|
+
*/
|
|
16
|
+
export declare function handlePdfBytes(state: StudioState, recipeId: string, path: string): Promise<Uint8Array>;
|
|
17
|
+
//# sourceMappingURL=pdf-bytes.handler.d.ts.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { PdfDocumentView, PdfViewCommand } from '../studio-api/index.js';
|
|
2
|
+
import type { StudioState } from './workspace.store.js';
|
|
3
|
+
/**
|
|
4
|
+
* Handles `pdf-view`: the PDF canvas's cells and rows (`document-view`'s
|
|
5
|
+
* `pdf-view.mapper.ts`, studio plan §3.4, issue #94's 5b), off the same
|
|
6
|
+
* cached snapshot `take-snapshot`/`document-tree` already use.
|
|
7
|
+
*
|
|
8
|
+
* @param state - The server state.
|
|
9
|
+
* @param command - The command; `command.path` must already have a cached snapshot (call `take-snapshot` first).
|
|
10
|
+
* @returns The document's view.
|
|
11
|
+
* @throws Error when no workspace is open, `command.path` has no cached snapshot yet, or the snapshot's document is not a read PDF.
|
|
12
|
+
*/
|
|
13
|
+
export declare function handlePdfView(state: StudioState, command: PdfViewCommand): PdfDocumentView;
|
|
14
|
+
//# sourceMappingURL=pdf-view.handler.d.ts.map
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { StartRecordingCommand, StopRecordingCommand } from '../studio-api/index.js';
|
|
2
|
+
import type { StudioState } from './workspace.store.js';
|
|
3
|
+
/**
|
|
4
|
+
* Handles `start-recording`: opens the studio's own headed browser window
|
|
5
|
+
* on the named recipe's start point (issue #95, phase 6) and streams
|
|
6
|
+
* `recording-card`/`recording-note` events as the person drives it. One
|
|
7
|
+
* recording at a time, like one sample run at a time: a second
|
|
8
|
+
* `start-recording` stops whatever was already open first.
|
|
9
|
+
*
|
|
10
|
+
* @param state - The server state: `folder` must already be set, `recorderProfileDir` names the studio's own recorder profile (never a crawl's own, never the person's default browser).
|
|
11
|
+
* @param command - The command.
|
|
12
|
+
* @returns `{ started: true }` once the window is open.
|
|
13
|
+
* @throws Error when no workspace is open, or the recipe cannot be found or loaded.
|
|
14
|
+
*/
|
|
15
|
+
export declare function handleStartRecording(state: StudioState, command: StartRecordingCommand): Promise<{
|
|
16
|
+
started: true;
|
|
17
|
+
}>;
|
|
18
|
+
/**
|
|
19
|
+
* Handles `stop-recording`: closes the recording window, if one is open,
|
|
20
|
+
* and answers with every step recorded, in order — enough for the caller to
|
|
21
|
+
* build "make this the login" (`session.bootstrap`) or "keep as steps"
|
|
22
|
+
* without asking the server again. Also broadcasts `recording-stopped`, so
|
|
23
|
+
* every connected client (not only the one that asked) knows the window
|
|
24
|
+
* closed.
|
|
25
|
+
*
|
|
26
|
+
* @param state - The server state holding the active recording, if any.
|
|
27
|
+
* @param _command - The command (carries nothing beyond its type).
|
|
28
|
+
* @returns Every step recorded, in order; empty when nothing was recording.
|
|
29
|
+
*/
|
|
30
|
+
export declare function handleStopRecording(state: StudioState, _command: StopRecordingCommand): Promise<{
|
|
31
|
+
steps: Record<string, unknown>[];
|
|
32
|
+
}>;
|
|
33
|
+
//# sourceMappingURL=recording.handler.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ResponsesSeenCommand, ResponsesSeenView } from '../studio-api/index.js';
|
|
2
|
+
import type { StudioState } from './workspace.store.js';
|
|
3
|
+
/**
|
|
4
|
+
* Handles `responses-seen`: the JSON responses observed while a recipe's
|
|
5
|
+
* start page rendered (`page-inspector`'s `responses-seen.use-case.ts`,
|
|
6
|
+
* issue #93), for the Inspect panel's "responses seen" list — picking one
|
|
7
|
+
* is the seam the UI uses to switch the recipe to api mode (issue #93's
|
|
8
|
+
* acceptance; the JSON tree canvas that follows is phase 5's).
|
|
9
|
+
*
|
|
10
|
+
* @param state - The server state: `folder` must already be set.
|
|
11
|
+
* @param command - The command.
|
|
12
|
+
* @returns The observed responses.
|
|
13
|
+
* @throws Error when no workspace is open, or the recipe cannot be found or loaded.
|
|
14
|
+
*/
|
|
15
|
+
export declare function handleResponsesSeen(state: StudioState, command: ResponsesSeenCommand): Promise<ResponsesSeenView>;
|
|
16
|
+
//# sourceMappingURL=responses-seen.handler.d.ts.map
|
|
@@ -12,8 +12,10 @@ export interface StudioServerOptions {
|
|
|
12
12
|
* the folder reaches it through the URL's `folder` query param).
|
|
13
13
|
*/
|
|
14
14
|
initialFolder?: string;
|
|
15
|
-
/** Browser launch settings every web-mode command shares (`take-snapshot`, `verify-selector`, `run-sample`); an executable path override (e.g. `OPENCRAW_CHROMIUM`, read by the caller — the server itself has no opinion on env vars) for a sandbox with no full Playwright install. Default: Playwright's own bundled browser. */
|
|
15
|
+
/** Browser launch settings every web-mode command shares (`take-snapshot`, `verify-selector`, `run-sample`, `start-recording`); an executable path override (e.g. `OPENCRAW_CHROMIUM`, read by the caller — the server itself has no opinion on env vars) for a sandbox with no full Playwright install. Default: Playwright's own bundled browser. `start-recording` always forces `headless: false` regardless of what this sets. */
|
|
16
16
|
browser?: BrowserSessionConfig;
|
|
17
|
+
/** Where the studio's own recorder profile lives (issue #95); default: a fixed directory under the OS temp folder, never a crawl's own profile directory, never the person's default browser. */
|
|
18
|
+
recorderProfileDir?: string;
|
|
17
19
|
}
|
|
18
20
|
/** The running server: its URL (token included, ready to open), the token alone, and how to stop it. */
|
|
19
21
|
export interface StudioServer {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { TablePreviewCommand, TablePreviewView } from '../studio-api/index.js';
|
|
2
|
+
import type { StudioState } from './workspace.store.js';
|
|
3
|
+
/**
|
|
4
|
+
* Handles `table-preview`: the PDF canvas's live preview of a `table`
|
|
5
|
+
* extract's options (`document-view`'s `table-preview.use-case.ts`, studio
|
|
6
|
+
* plan §3.4, issue #94's 5b), off the same cached snapshot `take-snapshot`
|
|
7
|
+
* already captured — a pure computation over it, so this answers instantly
|
|
8
|
+
* on every option change, no re-fetch or re-parse.
|
|
9
|
+
*
|
|
10
|
+
* @param state - The server state.
|
|
11
|
+
* @param command - The command; `command.path` must already have a cached snapshot (call `take-snapshot` first).
|
|
12
|
+
* @returns The matches, or `error` when an option's pattern does not compile.
|
|
13
|
+
* @throws Error when no workspace is open, or `command.path` has no cached snapshot yet.
|
|
14
|
+
*/
|
|
15
|
+
export declare function handleTablePreview(state: StudioState, command: TablePreviewCommand): TablePreviewView;
|
|
16
|
+
//# sourceMappingURL=table-preview.handler.d.ts.map
|
|
@@ -1,19 +1,23 @@
|
|
|
1
1
|
import type { BrowserSessionConfig } from '@opencraw/core';
|
|
2
|
+
import type { RecorderSessionHandle } from '../flow-recording/index.js';
|
|
2
3
|
import type { SnapshotCache } from '../page-snapshot/index.js';
|
|
3
4
|
import type { LastRunCache, SampleRunHandle } from '../sample-run/index.js';
|
|
4
5
|
import type { StudioEvent } from '../studio-api/index.js';
|
|
5
6
|
import type { WsConnection } from './websocket.client.js';
|
|
6
|
-
/** The server's mutable state: the opened folder, the run in progress (if any), the connected event sockets, the per-recipe snapshot cache `take-snapshot`/`verify-selector`/`infer-selector` share, each recipe's last finished sample run (`explain-why`, issue #92),
|
|
7
|
+
/** The server's mutable state: the opened folder, the run in progress (if any), the recording in progress (if any, issue #95), the connected event sockets, the per-recipe snapshot cache `take-snapshot`/`verify-selector`/`infer-selector` share, each recipe's last finished sample run (`explain-why`, issue #92), the browser launch settings every web-mode command (`take-snapshot`, `verify-selector`, `run-sample`, `start-recording`) shares, and where the studio's own recorder profile lives. */
|
|
7
8
|
export interface StudioState {
|
|
8
9
|
folder?: string;
|
|
9
10
|
activeRun?: SampleRunHandle;
|
|
11
|
+
activeRecording?: RecorderSessionHandle;
|
|
10
12
|
sockets: Set<WsConnection>;
|
|
11
13
|
snapshots: SnapshotCache;
|
|
12
14
|
lastRuns: LastRunCache;
|
|
13
15
|
/** Set once at server start (`StudioServerOptions.browser`); every web-mode command reads it from here rather than each accepting its own. */
|
|
14
16
|
browser?: BrowserSessionConfig;
|
|
17
|
+
/** Set once at server start (`StudioServerOptions.recorderProfileDir`), else `defaultRecorderProfileDir()`. */
|
|
18
|
+
recorderProfileDir: string;
|
|
15
19
|
}
|
|
16
|
-
/** @returns Fresh state for a new server instance: no workspace open, no run, no sockets, an empty snapshot cache, no last runs, Playwright's own default browser. */
|
|
20
|
+
/** @returns Fresh state for a new server instance: no workspace open, no run, no recording, no sockets, an empty snapshot cache, no last runs, Playwright's own default browser, the default recorder profile directory. */
|
|
17
21
|
export declare function createStudioState(): StudioState;
|
|
18
22
|
/**
|
|
19
23
|
* Sends one event to every connected client. A socket that errors while
|