@opencraw/studio 0.0.18 → 0.0.19
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/browser-provisioning/ensure-browser-launch.use-case.d.ts +12 -0
- package/dist/browser-provisioning/index.d.ts +2 -0
- package/dist/browser-provisioning/install-chromium.use-case.d.ts +2 -0
- package/dist/browser-provisioning/missing-browser.policy.d.ts +3 -0
- package/dist/document-view/deck-view.mapper.d.ts +70 -0
- package/dist/document-view/index.d.ts +13 -0
- package/dist/document-view/pdf-view.mapper.d.ts +47 -0
- package/dist/document-view/region-preview.use-case.d.ts +30 -0
- package/dist/document-view/table-preview.use-case.d.ts +152 -0
- package/dist/document-view/tree-view.mapper.d.ts +47 -0
- package/dist/document-view/workbook-view.mapper.d.ts +51 -0
- package/dist/explain-why/index.d.ts +5 -0
- package/dist/explain-why/item-hint.algorithm.d.ts +13 -0
- package/dist/explain-why/why-sentence.mapper.d.ts +48 -0
- package/dist/explain-why/why.use-case.d.ts +26 -0
- package/dist/flow-recording/action-to-step.mapper.d.ts +16 -0
- package/dist/flow-recording/index.d.ts +13 -0
- package/dist/flow-recording/next-link.policy.d.ts +27 -0
- package/dist/flow-recording/recorded-action.contract.d.ts +114 -0
- package/dist/flow-recording/recorder-script.client.d.ts +48 -0
- package/dist/flow-recording/recorder-session.use-case.d.ts +67 -0
- package/dist/flow-recording/secret-field.policy.d.ts +33 -0
- package/dist/flow-recording/wait-insertion.policy.d.ts +26 -0
- package/dist/index.d.ts +14 -1
- package/dist/main.d.ts +18 -0
- package/dist/page-inspector/dom-tree.mapper.d.ts +32 -0
- package/dist/page-inspector/index.d.ts +7 -0
- package/dist/page-inspector/page-data.algorithm.d.ts +39 -0
- package/dist/page-inspector/responses-seen.use-case.d.ts +36 -0
- package/dist/page-snapshot/fetch-start-page.use-case.d.ts +20 -0
- package/dist/page-snapshot/hidden-marks.algorithm.d.ts +23 -0
- package/dist/page-snapshot/index.d.ts +13 -0
- package/dist/page-snapshot/invalidate-stale-snapshot.use-case.d.ts +12 -0
- package/dist/page-snapshot/pdf-bytes.use-case.d.ts +16 -0
- package/dist/page-snapshot/reread-csv.use-case.d.ts +22 -0
- package/dist/page-snapshot/rewrite-document.mapper.d.ts +27 -0
- package/dist/page-snapshot/snapshot.store.d.ts +14 -0
- package/dist/page-snapshot/start-point.policy.d.ts +12 -0
- package/dist/page-snapshot/take-snapshot.use-case.d.ts +60 -0
- package/dist/recipe-workspace/import-document.use-case.d.ts +22 -0
- package/dist/recipe-workspace/index.d.ts +5 -0
- package/dist/recipe-workspace/open-workspace.use-case.d.ts +15 -0
- package/dist/recipe-workspace/save-recipe.use-case.d.ts +21 -0
- package/dist/sample-run/index.d.ts +8 -0
- package/dist/sample-run/last-run.store.d.ts +17 -0
- package/dist/sample-run/load-recipe-pair.use-case.d.ts +18 -0
- package/dist/sample-run/run-sample.use-case.d.ts +40 -0
- package/dist/sample-run/sample-run-record.contract.d.ts +48 -0
- package/dist/scope-outline/card-sentence.mapper.d.ts +18 -0
- package/dist/scope-outline/index.d.ts +8 -0
- package/dist/scope-outline/outline-to-recipe.mapper.d.ts +17 -0
- package/dist/scope-outline/outline.model.d.ts +57 -0
- package/dist/scope-outline/recipe-to-outline.mapper.d.ts +14 -0
- package/dist/scope-outline/scope-at-path.algorithm.d.ts +19 -0
- package/dist/selector-inference/class-token.policy.d.ts +35 -0
- package/dist/selector-inference/dom-path.model.d.ts +73 -0
- package/dist/selector-inference/index.d.ts +12 -0
- package/dist/selector-inference/list-inference.algorithm.d.ts +43 -0
- package/dist/selector-inference/selector-candidates.algorithm.d.ts +22 -0
- package/dist/selector-inference/selector-ranking.policy.d.ts +27 -0
- package/dist/selector-inference/shadow-dom.error.d.ts +11 -0
- package/dist/selector-inference/take-kind.policy.d.ts +12 -0
- package/dist/studio-api/command.contract.d.ts +531 -0
- package/dist/studio-api/deck-preview-view.contract.d.ts +28 -0
- package/dist/studio-api/deck-view.contract.d.ts +127 -0
- package/dist/studio-api/document-tree-view.contract.d.ts +26 -0
- package/dist/studio-api/event.contract.d.ts +155 -0
- package/dist/studio-api/grid-preview-view.contract.d.ts +26 -0
- package/dist/studio-api/grid-view.contract.d.ts +75 -0
- package/dist/studio-api/import-document-view.contract.d.ts +8 -0
- package/dist/studio-api/index.d.ts +43 -0
- package/dist/studio-api/infer-selector-view.contract.d.ts +68 -0
- package/dist/studio-api/inspect-view.contract.d.ts +62 -0
- package/dist/studio-api/outline-view.contract.d.ts +37 -0
- package/dist/studio-api/pdf-view.contract.d.ts +66 -0
- package/dist/studio-api/region-preview-view.contract.d.ts +53 -0
- package/dist/studio-api/responses-seen-view.contract.d.ts +20 -0
- package/dist/studio-api/sample-run-view.contract.d.ts +28 -0
- package/dist/studio-api/snapshot-view.contract.d.ts +30 -0
- package/dist/studio-api/start-page-view.contract.d.ts +7 -0
- package/dist/studio-api/table-preview-view.contract.d.ts +65 -0
- package/dist/studio-api/verify-selector-view.contract.d.ts +18 -0
- package/dist/studio-api/why-view.contract.d.ts +16 -0
- package/dist/studio-api/workspace-view.contract.d.ts +67 -0
- package/dist/studio-server/access-token.policy.d.ts +26 -0
- package/dist/studio-server/deck-preview.handler.d.ts +17 -0
- package/dist/studio-server/deck-view.handler.d.ts +15 -0
- package/dist/studio-server/document-tree.handler.d.ts +14 -0
- package/dist/studio-server/explain-why.handler.d.ts +14 -0
- package/dist/studio-server/fetch-start-page.handler.d.ts +14 -0
- package/dist/studio-server/grid-preview.handler.d.ts +17 -0
- package/dist/studio-server/grid-view.handler.d.ts +20 -0
- package/dist/studio-server/import-document.handler.d.ts +14 -0
- package/dist/studio-server/index.d.ts +3 -0
- package/dist/studio-server/infer-selector.handler.d.ts +18 -0
- package/dist/studio-server/inspect-page.handler.d.ts +18 -0
- package/dist/studio-server/open-workspace.handler.d.ts +20 -0
- package/dist/studio-server/pdf-bytes.handler.d.ts +17 -0
- package/dist/studio-server/pdf-view.handler.d.ts +14 -0
- package/dist/studio-server/recording.handler.d.ts +36 -0
- package/dist/studio-server/region-preview.handler.d.ts +17 -0
- package/dist/studio-server/responses-seen.handler.d.ts +16 -0
- package/dist/studio-server/run-sample.handler.d.ts +28 -0
- package/dist/studio-server/save-outline.handler.d.ts +18 -0
- package/dist/studio-server/save-recipe.handler.d.ts +15 -0
- package/dist/studio-server/static-file.handler.d.ts +14 -0
- package/dist/studio-server/studio-http.use-case.d.ts +40 -0
- package/dist/studio-server/table-preview.handler.d.ts +16 -0
- package/dist/studio-server/take-snapshot.handler.d.ts +16 -0
- package/dist/studio-server/verify-selector.handler.d.ts +18 -0
- package/dist/studio-server/websocket.client.d.ts +22 -0
- package/dist/studio-server/workspace.store.d.ts +36 -0
- package/dist/trusted-plugins/index.d.ts +2 -0
- package/dist/trusted-plugins/trusted-plugins.contract.d.ts +14 -0
- package/package.json +3 -3
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** One text box on a slide, in points — mirrors `document-view/deck-view.mapper.ts`'s `DeckShapeView`, the wire shape for the UI (studio plan §3.4, issue #94's 5d). */
|
|
3
|
+
export declare const deckShapeViewSchema: z.ZodObject<{
|
|
4
|
+
x: z.ZodNumber;
|
|
5
|
+
y: z.ZodNumber;
|
|
6
|
+
width: z.ZodNumber;
|
|
7
|
+
height: z.ZodNumber;
|
|
8
|
+
text: z.ZodString;
|
|
9
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
export declare const deckChartSeriesViewSchema: z.ZodObject<{
|
|
12
|
+
name: z.ZodString;
|
|
13
|
+
categories: z.ZodArray<z.ZodString>;
|
|
14
|
+
values: z.ZodArray<z.ZodUnion<readonly [z.ZodNumber, z.ZodNull]>>;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
export declare const deckChartViewSchema: z.ZodObject<{
|
|
17
|
+
type: z.ZodString;
|
|
18
|
+
title: z.ZodOptional<z.ZodString>;
|
|
19
|
+
series: z.ZodArray<z.ZodObject<{
|
|
20
|
+
name: z.ZodString;
|
|
21
|
+
categories: z.ZodArray<z.ZodString>;
|
|
22
|
+
values: z.ZodArray<z.ZodUnion<readonly [z.ZodNumber, z.ZodNull]>>;
|
|
23
|
+
}, z.core.$strip>>;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
export declare const deckSlideViewSchema: z.ZodObject<{
|
|
26
|
+
number: z.ZodNumber;
|
|
27
|
+
title: z.ZodOptional<z.ZodString>;
|
|
28
|
+
hidden: z.ZodBoolean;
|
|
29
|
+
shapes: z.ZodArray<z.ZodObject<{
|
|
30
|
+
x: z.ZodNumber;
|
|
31
|
+
y: z.ZodNumber;
|
|
32
|
+
width: z.ZodNumber;
|
|
33
|
+
height: z.ZodNumber;
|
|
34
|
+
text: z.ZodString;
|
|
35
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
36
|
+
}, z.core.$strip>>;
|
|
37
|
+
shapeRows: z.ZodArray<z.ZodArray<z.ZodNumber>>;
|
|
38
|
+
tables: z.ZodArray<z.ZodObject<{
|
|
39
|
+
name: z.ZodString;
|
|
40
|
+
hidden: z.ZodBoolean;
|
|
41
|
+
hiddenRows: z.ZodArray<z.ZodNumber>;
|
|
42
|
+
columnCount: z.ZodNumber;
|
|
43
|
+
rows: z.ZodArray<z.ZodArray<z.ZodObject<{
|
|
44
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
|
|
45
|
+
type: z.ZodEnum<{
|
|
46
|
+
boolean: "boolean";
|
|
47
|
+
date: "date";
|
|
48
|
+
number: "number";
|
|
49
|
+
string: "string";
|
|
50
|
+
}>;
|
|
51
|
+
}, z.core.$strip>>>;
|
|
52
|
+
merges: z.ZodArray<z.ZodObject<{
|
|
53
|
+
ref: z.ZodString;
|
|
54
|
+
top: z.ZodNumber;
|
|
55
|
+
left: z.ZodNumber;
|
|
56
|
+
bottom: z.ZodNumber;
|
|
57
|
+
right: z.ZodNumber;
|
|
58
|
+
}, z.core.$strip>>;
|
|
59
|
+
}, z.core.$strip>>;
|
|
60
|
+
charts: z.ZodArray<z.ZodObject<{
|
|
61
|
+
type: z.ZodString;
|
|
62
|
+
title: z.ZodOptional<z.ZodString>;
|
|
63
|
+
series: z.ZodArray<z.ZodObject<{
|
|
64
|
+
name: z.ZodString;
|
|
65
|
+
categories: z.ZodArray<z.ZodString>;
|
|
66
|
+
values: z.ZodArray<z.ZodUnion<readonly [z.ZodNumber, z.ZodNull]>>;
|
|
67
|
+
}, z.core.$strip>>;
|
|
68
|
+
}, z.core.$strip>>;
|
|
69
|
+
notes: z.ZodString;
|
|
70
|
+
}, z.core.$strip>;
|
|
71
|
+
/** What `deck-view` answers with (studio plan §3.4, issue #94's 5d): the slide size in points and every slide's shapes, tables, charts and notes, for the deck canvas to draw and pick from. */
|
|
72
|
+
export declare const deckDocumentViewSchema: z.ZodObject<{
|
|
73
|
+
width: z.ZodNumber;
|
|
74
|
+
height: z.ZodNumber;
|
|
75
|
+
slides: z.ZodArray<z.ZodObject<{
|
|
76
|
+
number: z.ZodNumber;
|
|
77
|
+
title: z.ZodOptional<z.ZodString>;
|
|
78
|
+
hidden: z.ZodBoolean;
|
|
79
|
+
shapes: z.ZodArray<z.ZodObject<{
|
|
80
|
+
x: z.ZodNumber;
|
|
81
|
+
y: z.ZodNumber;
|
|
82
|
+
width: z.ZodNumber;
|
|
83
|
+
height: z.ZodNumber;
|
|
84
|
+
text: z.ZodString;
|
|
85
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
86
|
+
}, z.core.$strip>>;
|
|
87
|
+
shapeRows: z.ZodArray<z.ZodArray<z.ZodNumber>>;
|
|
88
|
+
tables: z.ZodArray<z.ZodObject<{
|
|
89
|
+
name: z.ZodString;
|
|
90
|
+
hidden: z.ZodBoolean;
|
|
91
|
+
hiddenRows: z.ZodArray<z.ZodNumber>;
|
|
92
|
+
columnCount: z.ZodNumber;
|
|
93
|
+
rows: z.ZodArray<z.ZodArray<z.ZodObject<{
|
|
94
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
|
|
95
|
+
type: z.ZodEnum<{
|
|
96
|
+
boolean: "boolean";
|
|
97
|
+
date: "date";
|
|
98
|
+
number: "number";
|
|
99
|
+
string: "string";
|
|
100
|
+
}>;
|
|
101
|
+
}, z.core.$strip>>>;
|
|
102
|
+
merges: z.ZodArray<z.ZodObject<{
|
|
103
|
+
ref: z.ZodString;
|
|
104
|
+
top: z.ZodNumber;
|
|
105
|
+
left: z.ZodNumber;
|
|
106
|
+
bottom: z.ZodNumber;
|
|
107
|
+
right: z.ZodNumber;
|
|
108
|
+
}, z.core.$strip>>;
|
|
109
|
+
}, z.core.$strip>>;
|
|
110
|
+
charts: z.ZodArray<z.ZodObject<{
|
|
111
|
+
type: z.ZodString;
|
|
112
|
+
title: z.ZodOptional<z.ZodString>;
|
|
113
|
+
series: z.ZodArray<z.ZodObject<{
|
|
114
|
+
name: z.ZodString;
|
|
115
|
+
categories: z.ZodArray<z.ZodString>;
|
|
116
|
+
values: z.ZodArray<z.ZodUnion<readonly [z.ZodNumber, z.ZodNull]>>;
|
|
117
|
+
}, z.core.$strip>>;
|
|
118
|
+
}, z.core.$strip>>;
|
|
119
|
+
notes: z.ZodString;
|
|
120
|
+
}, z.core.$strip>>;
|
|
121
|
+
}, z.core.$strip>;
|
|
122
|
+
export type DeckShapeView = z.infer<typeof deckShapeViewSchema>;
|
|
123
|
+
export type DeckChartSeriesView = z.infer<typeof deckChartSeriesViewSchema>;
|
|
124
|
+
export type DeckChartView = z.infer<typeof deckChartViewSchema>;
|
|
125
|
+
export type DeckSlideView = z.infer<typeof deckSlideViewSchema>;
|
|
126
|
+
export type DeckDocumentView = z.infer<typeof deckDocumentViewSchema>;
|
|
127
|
+
//# sourceMappingURL=deck-view.contract.d.ts.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** One row of the document tree — mirrors `document-view/tree-view.mapper.ts`'s `DocumentTreeNode`, the wire shape for the UI (studio plan §3.4, issue #94's 5a). */
|
|
3
|
+
export interface DocumentTreeNodeView {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
valueType: 'object' | 'array' | 'string' | 'number' | 'boolean' | 'null' | 'element';
|
|
7
|
+
preview?: string;
|
|
8
|
+
jsonpath?: string;
|
|
9
|
+
xpath?: string;
|
|
10
|
+
listPath?: string;
|
|
11
|
+
listCount?: number;
|
|
12
|
+
attributes?: Record<string, string>;
|
|
13
|
+
children: DocumentTreeNodeView[];
|
|
14
|
+
}
|
|
15
|
+
export declare const documentTreeNodeViewSchema: z.ZodType<DocumentTreeNodeView>;
|
|
16
|
+
/** What `document-tree` answers with (studio plan §3.4, issue #94's 5a): the parsed JSON/XML document as a tree, and, for XML, the namespace prefixes a pick's `extract` can use in `namespaces`. */
|
|
17
|
+
export declare const documentTreeViewSchema: z.ZodObject<{
|
|
18
|
+
format: z.ZodEnum<{
|
|
19
|
+
json: "json";
|
|
20
|
+
xml: "xml";
|
|
21
|
+
}>;
|
|
22
|
+
root: z.ZodType<DocumentTreeNodeView, unknown, z.core.$ZodTypeInternals<DocumentTreeNodeView, unknown>>;
|
|
23
|
+
namespaces: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
export type DocumentTreeView = z.infer<typeof documentTreeViewSchema>;
|
|
26
|
+
//# sourceMappingURL=document-tree-view.contract.d.ts.map
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** Why a sample run stopped before finishing on its own; mirrors `@opencraw/core`'s `RecipeReport.stoppedBy`. */
|
|
3
|
+
export declare const stoppedBySchema: z.ZodEnum<{
|
|
4
|
+
"sample-maxMs": "sample-maxMs";
|
|
5
|
+
"sample-maxPages": "sample-maxPages";
|
|
6
|
+
"sample-maxRecords": "sample-maxRecords";
|
|
7
|
+
}>;
|
|
8
|
+
/** One line of the engine's own trace output (`traceLine`), streamed as a sample run proceeds. */
|
|
9
|
+
export declare const traceLineEventSchema: z.ZodObject<{
|
|
10
|
+
type: z.ZodLiteral<"trace-line">;
|
|
11
|
+
line: z.ZodString;
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
/** One entry of a mapping trace field: what a rule's `from` read, and the value after each transform, in order (`@opencraw/core`'s `FieldTrace`). */
|
|
14
|
+
export declare const fieldTraceSchema: z.ZodObject<{
|
|
15
|
+
from: z.ZodUnknown;
|
|
16
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
17
|
+
op: z.ZodString;
|
|
18
|
+
value: z.ZodUnknown;
|
|
19
|
+
}, z.core.$strip>>;
|
|
20
|
+
}, z.core.$strip>;
|
|
21
|
+
/** One record a sample run emitted: `scope` (what it was mapped from) and `mapping` (each field's trace) ride along, so the Record tab (#92) can show a transform chain's real values without a second round trip. */
|
|
22
|
+
export declare const recordEventSchema: z.ZodObject<{
|
|
23
|
+
type: z.ZodLiteral<"record">;
|
|
24
|
+
recipeId: z.ZodString;
|
|
25
|
+
key: z.ZodNullable<z.ZodString>;
|
|
26
|
+
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
27
|
+
scope: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
28
|
+
mapping: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
29
|
+
from: z.ZodUnknown;
|
|
30
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
31
|
+
op: z.ZodString;
|
|
32
|
+
value: z.ZodUnknown;
|
|
33
|
+
}, z.core.$strip>>;
|
|
34
|
+
}, z.core.$strip>>>;
|
|
35
|
+
}, z.core.$strip>;
|
|
36
|
+
/** One record a sample run rejected (a field's `skip-record` policy on a missing or uncoercible value). */
|
|
37
|
+
export declare const recordRejectedEventSchema: z.ZodObject<{
|
|
38
|
+
type: z.ZodLiteral<"record-rejected">;
|
|
39
|
+
recipeId: z.ZodString;
|
|
40
|
+
field: z.ZodString;
|
|
41
|
+
reason: z.ZodString;
|
|
42
|
+
scope: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
43
|
+
}, z.core.$strip>;
|
|
44
|
+
/** A sample run ended: how many records, and why it stopped when it did not finish on its own. */
|
|
45
|
+
export declare const runFinishedEventSchema: z.ZodObject<{
|
|
46
|
+
type: z.ZodLiteral<"run-finished">;
|
|
47
|
+
recipeId: z.ZodString;
|
|
48
|
+
emitted: z.ZodNumber;
|
|
49
|
+
rejected: z.ZodNumber;
|
|
50
|
+
duplicates: z.ZodNumber;
|
|
51
|
+
durationMs: z.ZodNumber;
|
|
52
|
+
error: z.ZodOptional<z.ZodString>;
|
|
53
|
+
stoppedBy: z.ZodOptional<z.ZodEnum<{
|
|
54
|
+
"sample-maxMs": "sample-maxMs";
|
|
55
|
+
"sample-maxPages": "sample-maxPages";
|
|
56
|
+
"sample-maxRecords": "sample-maxRecords";
|
|
57
|
+
}>>;
|
|
58
|
+
}, z.core.$strip>;
|
|
59
|
+
/** The workspace's recipes changed on disk (a save, or a future watcher) and should be re-fetched. */
|
|
60
|
+
export declare const workspaceChangedEventSchema: z.ZodObject<{
|
|
61
|
+
type: z.ZodLiteral<"workspace-changed">;
|
|
62
|
+
}, z.core.$strip>;
|
|
63
|
+
/**
|
|
64
|
+
* One recorded action landed as a step (issue #95): the card it becomes
|
|
65
|
+
* (`scope-outline`'s own `OutlineCard`/`OutlineBracket` shape — the wire
|
|
66
|
+
* form `outline-view.contract.ts` already defines, never a second card
|
|
67
|
+
* format) and whether its value is a secret placeholder, for the secret
|
|
68
|
+
* pill styling.
|
|
69
|
+
*/
|
|
70
|
+
export declare const recordingCardEventSchema: z.ZodObject<{
|
|
71
|
+
type: z.ZodLiteral<"recording-card">;
|
|
72
|
+
node: z.ZodType<import("./outline-view.contract").OutlineNode, unknown, z.core.$ZodTypeInternals<import("./outline-view.contract").OutlineNode, unknown>>;
|
|
73
|
+
secret: z.ZodBoolean;
|
|
74
|
+
}, z.core.$strip>;
|
|
75
|
+
/** A notice from the recording session that is not itself a step: a "next" link offer, or an unsupported iframe/shadow-DOM report. */
|
|
76
|
+
export declare const recordingNoteEventSchema: z.ZodObject<{
|
|
77
|
+
type: z.ZodLiteral<"recording-note">;
|
|
78
|
+
kind: z.ZodEnum<{
|
|
79
|
+
info: "info";
|
|
80
|
+
"next-link": "next-link";
|
|
81
|
+
unsupported: "unsupported";
|
|
82
|
+
}>;
|
|
83
|
+
message: z.ZodString;
|
|
84
|
+
}, z.core.$strip>;
|
|
85
|
+
/** The recording window closed — `stop-recording` completed, or the window was closed some other way. `steps` is every step recorded, in order, exactly as `stop-recording`'s own response carries them. */
|
|
86
|
+
export declare const recordingStoppedEventSchema: z.ZodObject<{
|
|
87
|
+
type: z.ZodLiteral<"recording-stopped">;
|
|
88
|
+
steps: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
89
|
+
}, z.core.$strip>;
|
|
90
|
+
export declare const studioEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
91
|
+
type: z.ZodLiteral<"trace-line">;
|
|
92
|
+
line: z.ZodString;
|
|
93
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
94
|
+
type: z.ZodLiteral<"record">;
|
|
95
|
+
recipeId: z.ZodString;
|
|
96
|
+
key: z.ZodNullable<z.ZodString>;
|
|
97
|
+
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
98
|
+
scope: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
99
|
+
mapping: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
100
|
+
from: z.ZodUnknown;
|
|
101
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
102
|
+
op: z.ZodString;
|
|
103
|
+
value: z.ZodUnknown;
|
|
104
|
+
}, z.core.$strip>>;
|
|
105
|
+
}, z.core.$strip>>>;
|
|
106
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
107
|
+
type: z.ZodLiteral<"record-rejected">;
|
|
108
|
+
recipeId: z.ZodString;
|
|
109
|
+
field: z.ZodString;
|
|
110
|
+
reason: z.ZodString;
|
|
111
|
+
scope: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
112
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
113
|
+
type: z.ZodLiteral<"run-finished">;
|
|
114
|
+
recipeId: z.ZodString;
|
|
115
|
+
emitted: z.ZodNumber;
|
|
116
|
+
rejected: z.ZodNumber;
|
|
117
|
+
duplicates: z.ZodNumber;
|
|
118
|
+
durationMs: z.ZodNumber;
|
|
119
|
+
error: z.ZodOptional<z.ZodString>;
|
|
120
|
+
stoppedBy: z.ZodOptional<z.ZodEnum<{
|
|
121
|
+
"sample-maxMs": "sample-maxMs";
|
|
122
|
+
"sample-maxPages": "sample-maxPages";
|
|
123
|
+
"sample-maxRecords": "sample-maxRecords";
|
|
124
|
+
}>>;
|
|
125
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
126
|
+
type: z.ZodLiteral<"workspace-changed">;
|
|
127
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
128
|
+
type: z.ZodLiteral<"recording-card">;
|
|
129
|
+
node: z.ZodType<import("./outline-view.contract").OutlineNode, unknown, z.core.$ZodTypeInternals<import("./outline-view.contract").OutlineNode, unknown>>;
|
|
130
|
+
secret: z.ZodBoolean;
|
|
131
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
132
|
+
type: z.ZodLiteral<"recording-note">;
|
|
133
|
+
kind: z.ZodEnum<{
|
|
134
|
+
info: "info";
|
|
135
|
+
"next-link": "next-link";
|
|
136
|
+
unsupported: "unsupported";
|
|
137
|
+
}>;
|
|
138
|
+
message: z.ZodString;
|
|
139
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
140
|
+
type: z.ZodLiteral<"recording-stopped">;
|
|
141
|
+
steps: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
142
|
+
}, z.core.$strip>], "type">;
|
|
143
|
+
export type StoppedBy = z.infer<typeof stoppedBySchema>;
|
|
144
|
+
export type TraceLineEvent = z.infer<typeof traceLineEventSchema>;
|
|
145
|
+
export type FieldTraceView = z.infer<typeof fieldTraceSchema>;
|
|
146
|
+
export type RecordEvent = z.infer<typeof recordEventSchema>;
|
|
147
|
+
export type RecordRejectedEvent = z.infer<typeof recordRejectedEventSchema>;
|
|
148
|
+
export type RunFinishedEvent = z.infer<typeof runFinishedEventSchema>;
|
|
149
|
+
export type WorkspaceChangedEvent = z.infer<typeof workspaceChangedEventSchema>;
|
|
150
|
+
export type RecordingCardEvent = z.infer<typeof recordingCardEventSchema>;
|
|
151
|
+
export type RecordingNoteEvent = z.infer<typeof recordingNoteEventSchema>;
|
|
152
|
+
export type RecordingStoppedEvent = z.infer<typeof recordingStoppedEventSchema>;
|
|
153
|
+
/** Every event the server pushes to the UI over the WebSocket. */
|
|
154
|
+
export type StudioEvent = z.infer<typeof studioEventSchema>;
|
|
155
|
+
//# sourceMappingURL=event.contract.d.ts.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** One table matched by a `table` extract's options against a workbook — mirrors `@opencraw/core`'s `GridTable`. */
|
|
3
|
+
export declare const gridTablePreviewMatchSchema: z.ZodObject<{
|
|
4
|
+
sheet: z.ZodString;
|
|
5
|
+
title: z.ZodString;
|
|
6
|
+
header: z.ZodArray<z.ZodString>;
|
|
7
|
+
rows: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
/**
|
|
10
|
+
* What `grid-preview` answers with (studio plan §3.4, issue #94's 5c: the
|
|
11
|
+
* live preview): every matched table, or `error` when a pattern in the
|
|
12
|
+
* options does not compile — expected while the person is still typing it,
|
|
13
|
+
* not thrown.
|
|
14
|
+
*/
|
|
15
|
+
export declare const gridTablePreviewViewSchema: z.ZodObject<{
|
|
16
|
+
matches: z.ZodArray<z.ZodObject<{
|
|
17
|
+
sheet: z.ZodString;
|
|
18
|
+
title: z.ZodString;
|
|
19
|
+
header: z.ZodArray<z.ZodString>;
|
|
20
|
+
rows: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
21
|
+
}, z.core.$strip>>;
|
|
22
|
+
error: z.ZodOptional<z.ZodString>;
|
|
23
|
+
}, z.core.$strip>;
|
|
24
|
+
export type GridTablePreviewMatchView = z.infer<typeof gridTablePreviewMatchSchema>;
|
|
25
|
+
export type GridTablePreviewView = z.infer<typeof gridTablePreviewViewSchema>;
|
|
26
|
+
//# sourceMappingURL=grid-preview-view.contract.d.ts.map
|
|
@@ -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
|
+
boolean: "boolean";
|
|
7
|
+
date: "date";
|
|
8
|
+
number: "number";
|
|
9
|
+
string: "string";
|
|
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
|
+
boolean: "boolean";
|
|
29
|
+
date: "date";
|
|
30
|
+
number: "number";
|
|
31
|
+
string: "string";
|
|
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
|
+
boolean: "boolean";
|
|
53
|
+
date: "date";
|
|
54
|
+
number: "number";
|
|
55
|
+
string: "string";
|
|
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
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** `import-document`'s answer: where the copy landed, and the `file:` URL a recipe's `start.url` points at it with. */
|
|
3
|
+
export declare const importDocumentViewSchema: z.ZodObject<{
|
|
4
|
+
path: z.ZodString;
|
|
5
|
+
url: z.ZodString;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
export type ImportDocumentView = z.infer<typeof importDocumentViewSchema>;
|
|
8
|
+
//# sourceMappingURL=import-document-view.contract.d.ts.map
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export { sampleBudgetSchema, openWorkspaceCommandSchema, importDocumentCommandSchema, runSampleCommandSchema, stopRunCommandSchema, saveRecipeCommandSchema, fetchStartPageCommandSchema, saveOutlineCommandSchema, takeSnapshotCommandSchema, verifySelectorCommandSchema, inferSelectorCommandSchema, missingWhyTargetSchema, rejectedWhyTargetSchema, whyTargetSchema, explainWhyCommandSchema, inspectPageCommandSchema, responsesSeenCommandSchema, documentTreeCommandSchema, pdfViewCommandSchema, tablePreviewOptionsSchema, tablePreviewCommandSchema, regionPreviewCommandSchema, gridViewCommandSchema, gridPreviewOptionsSchema, gridPreviewCommandSchema, deckViewCommandSchema, deckPreviewOptionsSchema, deckPreviewCommandSchema, startRecordingCommandSchema, stopRecordingCommandSchema, studioCommandSchema } from './command.contract';
|
|
2
|
+
export type { SampleBudget, OpenWorkspaceCommand, ImportDocumentCommand, RunSampleCommand, StopRunCommand, SaveRecipeCommand, FetchStartPageCommand, SaveOutlineCommand, TakeSnapshotCommand, VerifySelectorCommand, InferSelectorCommand, MissingWhyTarget, RejectedWhyTarget, WhyTarget, ExplainWhyCommand, InspectPageCommand, ResponsesSeenCommand, DocumentTreeCommand, PdfViewCommand, TablePreviewOptions, TablePreviewCommand, RegionPreviewCommand, GridViewCommand, GridPreviewOptions, GridPreviewCommand, DeckViewCommand, DeckPreviewOptions, DeckPreviewCommand, StartRecordingCommand, StopRecordingCommand, StudioCommand } from './command.contract';
|
|
3
|
+
export { snapshotViewSchema } from './snapshot-view.contract';
|
|
4
|
+
export type { SnapshotView } from './snapshot-view.contract';
|
|
5
|
+
export { verifySelectorViewSchema } from './verify-selector-view.contract';
|
|
6
|
+
export type { VerifySelectorView } from './verify-selector-view.contract';
|
|
7
|
+
export { fieldPickSchema, inferSelectorViewSchema } from './infer-selector-view.contract';
|
|
8
|
+
export type { FieldPick, InferSelectorView } from './infer-selector-view.contract';
|
|
9
|
+
export { stoppedBySchema, fieldTraceSchema, traceLineEventSchema, recordEventSchema, recordRejectedEventSchema, runFinishedEventSchema, workspaceChangedEventSchema, recordingCardEventSchema, recordingNoteEventSchema, recordingStoppedEventSchema, studioEventSchema } from './event.contract';
|
|
10
|
+
export type { StoppedBy, FieldTraceView, TraceLineEvent, RecordEvent, RecordRejectedEvent, RunFinishedEvent, WorkspaceChangedEvent, RecordingCardEvent, RecordingNoteEvent, RecordingStoppedEvent, StudioEvent } from './event.contract';
|
|
11
|
+
export { loadedHooksSchema, recipeIssueSchema, recipeListingSchema, workspaceViewSchema } from './workspace-view.contract';
|
|
12
|
+
export type { LoadedHooks, RecipeIssue, RecipeListing, WorkspaceView } from './workspace-view.contract';
|
|
13
|
+
export { importDocumentViewSchema } from './import-document-view.contract';
|
|
14
|
+
export type { ImportDocumentView } from './import-document-view.contract';
|
|
15
|
+
export { sampleRunRecordSchema, sampleRunViewSchema } from './sample-run-view.contract';
|
|
16
|
+
export type { SampleRunRecord, SampleRunView } from './sample-run-view.contract';
|
|
17
|
+
export { startPageViewSchema } from './start-page-view.contract';
|
|
18
|
+
export type { StartPageView } from './start-page-view.contract';
|
|
19
|
+
export { sentencePartSchema, outlineCardSchema, outlineBracketSchema, outlineNodeSchema, outlineViewSchema } from './outline-view.contract';
|
|
20
|
+
export type { SentencePart, OutlineCard, OutlineBracket, OutlineNode, OutlineView } from './outline-view.contract';
|
|
21
|
+
export { whyViewSchema } from './why-view.contract';
|
|
22
|
+
export type { WhyView } from './why-view.contract';
|
|
23
|
+
export { domTreeNodeViewSchema, pageDataFindingSchema, inspectViewSchema } from './inspect-view.contract';
|
|
24
|
+
export type { DomTreeNodeView, PageDataKind, PageDataFindingView, InspectView } from './inspect-view.contract';
|
|
25
|
+
export { observedResponseSchema, responsesSeenViewSchema } from './responses-seen-view.contract';
|
|
26
|
+
export type { ObservedResponseView, ResponsesSeenView } from './responses-seen-view.contract';
|
|
27
|
+
export { documentTreeNodeViewSchema, documentTreeViewSchema } from './document-tree-view.contract';
|
|
28
|
+
export type { DocumentTreeNodeView, DocumentTreeView } from './document-tree-view.contract';
|
|
29
|
+
export { pdfCellViewSchema, pdfRowViewSchema, pdfPageViewSchema, pdfDocumentViewSchema } from './pdf-view.contract';
|
|
30
|
+
export type { PdfCellView, PdfRowView, PdfPageView, PdfDocumentView } from './pdf-view.contract';
|
|
31
|
+
export { tablePreviewTableSchema, tablePreviewBandSchema, tablePreviewMatchSchema, tablePreviewViewSchema } from './table-preview-view.contract';
|
|
32
|
+
export type { TablePreviewTableView, TablePreviewBandView, TablePreviewMatchView, TablePreviewView } from './table-preview-view.contract';
|
|
33
|
+
export { regionPreviewMatchSchema, regionPreviewViewSchema } from './region-preview-view.contract';
|
|
34
|
+
export type { RegionPreviewMatchView, RegionPreviewView } from './region-preview-view.contract';
|
|
35
|
+
export { gridCellViewSchema, gridMergeViewSchema, gridSheetViewSchema, workbookDocumentViewSchema } from './grid-view.contract';
|
|
36
|
+
export type { GridCellView, GridMergeView, GridSheetView, WorkbookDocumentView } from './grid-view.contract';
|
|
37
|
+
export { gridTablePreviewMatchSchema, gridTablePreviewViewSchema } from './grid-preview-view.contract';
|
|
38
|
+
export type { GridTablePreviewMatchView, GridTablePreviewView } from './grid-preview-view.contract';
|
|
39
|
+
export { deckShapeViewSchema, deckChartSeriesViewSchema, deckChartViewSchema, deckSlideViewSchema, deckDocumentViewSchema } from './deck-view.contract';
|
|
40
|
+
export type { DeckShapeView, DeckChartSeriesView, DeckChartView, DeckSlideView, DeckDocumentView } from './deck-view.contract';
|
|
41
|
+
export { deckTablePreviewMatchSchema, deckTablePreviewViewSchema } from './deck-preview-view.contract';
|
|
42
|
+
export type { DeckTablePreviewMatchView, DeckTablePreviewView } from './deck-preview-view.contract';
|
|
43
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** One clicked node's field: the best selector found for it, verified against the snapshot. */
|
|
3
|
+
export declare const fieldPickSchema: z.ZodObject<{
|
|
4
|
+
selector: z.ZodString;
|
|
5
|
+
tier: z.ZodEnum<{
|
|
6
|
+
class: "class";
|
|
7
|
+
"data-attr": "data-attr";
|
|
8
|
+
id: "id";
|
|
9
|
+
position: "position";
|
|
10
|
+
structure: "structure";
|
|
11
|
+
}>;
|
|
12
|
+
take: z.ZodString;
|
|
13
|
+
matches: z.ZodNumber;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
/**
|
|
16
|
+
* What `infer-selector` answers with (issue #91, studio plan §3.2):
|
|
17
|
+
* `"field"` for one clicked node — a `Read` card's shape; `"list"` for two
|
|
18
|
+
* similar nodes — the safe `extract`(items)+`forEach`(field) shape, item and
|
|
19
|
+
* field each verified separately; `"unsupported"` when the two picks are not
|
|
20
|
+
* a coherent list (different branches, the same node twice, or shadow DOM),
|
|
21
|
+
* with a message the card can show as-is.
|
|
22
|
+
*/
|
|
23
|
+
export declare const inferSelectorViewSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
24
|
+
kind: z.ZodLiteral<"field">;
|
|
25
|
+
field: z.ZodObject<{
|
|
26
|
+
selector: z.ZodString;
|
|
27
|
+
tier: z.ZodEnum<{
|
|
28
|
+
class: "class";
|
|
29
|
+
"data-attr": "data-attr";
|
|
30
|
+
id: "id";
|
|
31
|
+
position: "position";
|
|
32
|
+
structure: "structure";
|
|
33
|
+
}>;
|
|
34
|
+
take: z.ZodString;
|
|
35
|
+
matches: z.ZodNumber;
|
|
36
|
+
}, z.core.$strip>;
|
|
37
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
38
|
+
kind: z.ZodLiteral<"list">;
|
|
39
|
+
item: z.ZodObject<{
|
|
40
|
+
selector: z.ZodString;
|
|
41
|
+
tier: z.ZodEnum<{
|
|
42
|
+
class: "class";
|
|
43
|
+
"data-attr": "data-attr";
|
|
44
|
+
id: "id";
|
|
45
|
+
position: "position";
|
|
46
|
+
structure: "structure";
|
|
47
|
+
}>;
|
|
48
|
+
matches: z.ZodNumber;
|
|
49
|
+
}, z.core.$strip>;
|
|
50
|
+
field: z.ZodObject<{
|
|
51
|
+
selector: z.ZodString;
|
|
52
|
+
tier: z.ZodEnum<{
|
|
53
|
+
class: "class";
|
|
54
|
+
"data-attr": "data-attr";
|
|
55
|
+
id: "id";
|
|
56
|
+
position: "position";
|
|
57
|
+
structure: "structure";
|
|
58
|
+
}>;
|
|
59
|
+
take: z.ZodString;
|
|
60
|
+
matches: z.ZodNumber;
|
|
61
|
+
}, z.core.$strip>;
|
|
62
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
63
|
+
kind: z.ZodLiteral<"unsupported">;
|
|
64
|
+
reason: z.ZodString;
|
|
65
|
+
}, z.core.$strip>], "kind">;
|
|
66
|
+
export type FieldPick = z.infer<typeof fieldPickSchema>;
|
|
67
|
+
export type InferSelectorView = z.infer<typeof inferSelectorViewSchema>;
|
|
68
|
+
//# sourceMappingURL=infer-selector-view.contract.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
|
+
"inline-state": "inline-state";
|
|
18
|
+
"json-script": "json-script";
|
|
19
|
+
"ld-json": "ld-json";
|
|
20
|
+
link: "link";
|
|
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
|
+
"inline-state": "inline-state";
|
|
27
|
+
"json-script": "json-script";
|
|
28
|
+
"ld-json": "ld-json";
|
|
29
|
+
link: "link";
|
|
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
|
+
"inline-state": "inline-state";
|
|
47
|
+
"json-script": "json-script";
|
|
48
|
+
"ld-json": "ld-json";
|
|
49
|
+
link: "link";
|
|
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,37 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** One piece of a card's sentence: plain wording, a bound id (a "pill"), or a literal shown as code. Mirrors `scope-outline/outline.model.ts`'s `SentencePart`: the wire shape for the UI. */
|
|
3
|
+
export interface SentencePart {
|
|
4
|
+
kind: 'word' | 'pill' | 'code';
|
|
5
|
+
text: string;
|
|
6
|
+
}
|
|
7
|
+
interface OutlineNodeBase {
|
|
8
|
+
path: string;
|
|
9
|
+
stepType: string;
|
|
10
|
+
sentence: SentencePart[];
|
|
11
|
+
step: Record<string, unknown>;
|
|
12
|
+
}
|
|
13
|
+
/** A leaf step, read as a sentence (or, when `custom`, not read as one: the UI shows `step`'s raw JSON instead). */
|
|
14
|
+
export interface OutlineCard extends OutlineNodeBase {
|
|
15
|
+
kind: 'card';
|
|
16
|
+
custom: boolean;
|
|
17
|
+
}
|
|
18
|
+
/** A container step (`forEach`, `paginate`, `if`), its body nested one level in. */
|
|
19
|
+
export interface OutlineBracket extends OutlineNodeBase {
|
|
20
|
+
kind: 'bracket';
|
|
21
|
+
stepType: 'forEach' | 'paginate' | 'if';
|
|
22
|
+
children: OutlineNode[];
|
|
23
|
+
elseChildren?: OutlineNode[];
|
|
24
|
+
}
|
|
25
|
+
export type OutlineNode = OutlineCard | OutlineBracket;
|
|
26
|
+
/** The outline the UI renders and edits: the recipe's other keys untouched, plus its steps as a tree. */
|
|
27
|
+
export interface OutlineView {
|
|
28
|
+
recipe: Record<string, unknown>;
|
|
29
|
+
steps: OutlineNode[];
|
|
30
|
+
}
|
|
31
|
+
export declare const sentencePartSchema: z.ZodType<SentencePart>;
|
|
32
|
+
export declare const outlineCardSchema: z.ZodType<OutlineCard>;
|
|
33
|
+
export declare const outlineBracketSchema: z.ZodType<OutlineBracket>;
|
|
34
|
+
export declare const outlineNodeSchema: z.ZodType<OutlineNode>;
|
|
35
|
+
export declare const outlineViewSchema: z.ZodType<OutlineView>;
|
|
36
|
+
export {};
|
|
37
|
+
//# sourceMappingURL=outline-view.contract.d.ts.map
|