@trojanbox-vcp-test/site-edit-engine 0.1.0 → 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/dist/index.d.ts +3 -0
- package/dist/index.js +127 -2
- package/dist/internal/protocol/operation.d.ts +2 -0
- package/dist/internal/protocol/render.d.ts +3 -30
- package/dist/internal/protocol.d.ts +1 -1
- package/dist/next-app-router.js +1 -140
- package/dist/preview-runtime.d.ts +249 -303
- package/dist/runtime-sync.d.ts +8 -8
- package/dist/runtime.d.ts +1 -127
- package/dist/site-edit-instrumentation.d.ts +1 -1
- package/dist/source-watcher.js +1 -150
- package/dist/types.d.ts +12 -14
- package/dist/webpack-loader.cjs +50 -588
- package/package.json +2 -2
- package/dist/execute-integration/execute-fixture-harness.d.ts +0 -25
- package/dist/execute-integration/execute-fixture-harness.js +0 -37
- package/dist/internal/ast/diagnostics/index.d.ts +0 -5
- package/dist/internal/ast/diagnostics/index.js +0 -25
- package/dist/internal/ast/history/index.d.ts +0 -15
- package/dist/internal/ast/history/index.js +0 -62
- package/dist/internal/ast/index.d.ts +0 -8
- package/dist/internal/ast/index.js +0 -5
- package/dist/internal/ast/locators/index.d.ts +0 -1
- package/dist/internal/ast/locators/index.js +0 -1
- package/dist/internal/ast/locators/resolve-locator.d.ts +0 -16
- package/dist/internal/ast/locators/resolve-locator.js +0 -920
- package/dist/internal/ast/parser/SourceParser.d.ts +0 -30
- package/dist/internal/ast/parser/SourceParser.js +0 -49
- package/dist/internal/ast/parser/index.d.ts +0 -21
- package/dist/internal/ast/parser/index.js +0 -64
- package/dist/internal/ast/primitives/conditional/conditional-primitives.d.ts +0 -18
- package/dist/internal/ast/primitives/conditional/conditional-primitives.js +0 -237
- package/dist/internal/ast/primitives/conditional/index.d.ts +0 -1
- package/dist/internal/ast/primitives/conditional/index.js +0 -1
- package/dist/internal/ast/primitives/imports/add-import.d.ts +0 -18
- package/dist/internal/ast/primitives/imports/add-import.js +0 -111
- package/dist/internal/ast/primitives/imports/index.d.ts +0 -2
- package/dist/internal/ast/primitives/imports/index.js +0 -2
- package/dist/internal/ast/primitives/imports/remove-import.d.ts +0 -15
- package/dist/internal/ast/primitives/imports/remove-import.js +0 -72
- package/dist/internal/ast/primitives/index.d.ts +0 -10
- package/dist/internal/ast/primitives/index.js +0 -10
- package/dist/internal/ast/primitives/jsx/index.d.ts +0 -4
- package/dist/internal/ast/primitives/jsx/index.js +0 -4
- package/dist/internal/ast/primitives/jsx/insert-child.d.ts +0 -11
- package/dist/internal/ast/primitives/jsx/insert-child.js +0 -69
- package/dist/internal/ast/primitives/jsx/move-node.d.ts +0 -9
- package/dist/internal/ast/primitives/jsx/move-node.js +0 -76
- package/dist/internal/ast/primitives/jsx/remove-node.d.ts +0 -7
- package/dist/internal/ast/primitives/jsx/remove-node.js +0 -36
- package/dist/internal/ast/primitives/jsx/update-text.d.ts +0 -8
- package/dist/internal/ast/primitives/jsx/update-text.js +0 -81
- package/dist/internal/ast/primitives/next/index.d.ts +0 -1
- package/dist/internal/ast/primitives/next/index.js +0 -1
- package/dist/internal/ast/primitives/next/next-primitives.d.ts +0 -43
- package/dist/internal/ast/primitives/next/next-primitives.js +0 -211
- package/dist/internal/ast/primitives/shared.d.ts +0 -60
- package/dist/internal/ast/primitives/shared.js +0 -176
- package/dist/internal/ast/primitives/style/class-expression.d.ts +0 -23
- package/dist/internal/ast/primitives/style/class-expression.js +0 -174
- package/dist/internal/ast/primitives/style/index.d.ts +0 -1
- package/dist/internal/ast/primitives/style/index.js +0 -1
- package/dist/internal/ast/primitives/style/style-primitives.d.ts +0 -49
- package/dist/internal/ast/primitives/style/style-primitives.js +0 -555
- package/dist/internal/ast/primitives/values/index.d.ts +0 -1
- package/dist/internal/ast/primitives/values/index.js +0 -1
- package/dist/internal/ast/primitives/values/value-primitives.d.ts +0 -42
- package/dist/internal/ast/primitives/values/value-primitives.js +0 -158
- package/dist/internal/ast/printer/SourcePrinter.d.ts +0 -21
- package/dist/internal/ast/printer/SourcePrinter.js +0 -76
- package/dist/internal/ast/printer/index.d.ts +0 -6
- package/dist/internal/ast/printer/index.js +0 -126
- package/dist/internal/ast/types.d.ts +0 -190
- package/dist/internal/ast/types.js +0 -1
- package/dist/internal/capability/capability-resolver.d.ts +0 -16
- package/dist/internal/capability/capability-resolver.js +0 -127
- package/dist/internal/classname-source.d.ts +0 -24
- package/dist/internal/classname-source.js +0 -220
- package/dist/internal/contracts/IEditEngineRuntime.d.ts +0 -18
- package/dist/internal/contracts/IEditEngineRuntime.js +0 -1
- package/dist/internal/domain/EditDiagnostic.d.ts +0 -38
- package/dist/internal/domain/EditDiagnostic.js +0 -43
- package/dist/internal/events/event-bus.d.ts +0 -14
- package/dist/internal/events/event-bus.js +0 -21
- package/dist/internal/graph/graph-builder.d.ts +0 -12
- package/dist/internal/graph/graph-builder.js +0 -1371
- package/dist/internal/graph/import-resolver.d.ts +0 -31
- package/dist/internal/graph/import-resolver.js +0 -109
- package/dist/internal/graph/project-graph-builder.d.ts +0 -32
- package/dist/internal/graph/project-graph-builder.js +0 -133
- package/dist/internal/graph/types.d.ts +0 -114
- package/dist/internal/graph/types.js +0 -6
- package/dist/internal/history/undo-redo.d.ts +0 -28
- package/dist/internal/history/undo-redo.js +0 -42
- package/dist/internal/index.d.ts +0 -2
- package/dist/internal/index.js +0 -1
- package/dist/internal/planner/planner.d.ts +0 -104
- package/dist/internal/planner/planner.js +0 -2533
- package/dist/internal/planner/types.d.ts +0 -275
- package/dist/internal/planner/types.js +0 -6
- package/dist/internal/protocol/boundary.js +0 -3
- package/dist/internal/protocol/capability.js +0 -8
- package/dist/internal/protocol/error.js +0 -38
- package/dist/internal/protocol/event.js +0 -3
- package/dist/internal/protocol/identity.js +0 -30
- package/dist/internal/protocol/operation.js +0 -8
- package/dist/internal/protocol/render.js +0 -3
- package/dist/internal/protocol.js +0 -2
- package/dist/internal/provenance/binding-graph.d.ts +0 -39
- package/dist/internal/provenance/binding-graph.js +0 -184
- package/dist/internal/provenance/capability-policy.d.ts +0 -15
- package/dist/internal/provenance/capability-policy.js +0 -96
- package/dist/internal/provenance/data-source-classifier.d.ts +0 -14
- package/dist/internal/provenance/data-source-classifier.js +0 -281
- package/dist/internal/provenance/resolve-text-provenance.d.ts +0 -45
- package/dist/internal/provenance/resolve-text-provenance.js +0 -3090
- package/dist/internal/provenance/types.d.ts +0 -89
- package/dist/internal/provenance/types.js +0 -1
- package/dist/internal/render/component-semantic.d.ts +0 -11
- package/dist/internal/render/component-semantic.js +0 -141
- package/dist/internal/render/content-model.d.ts +0 -3
- package/dist/internal/render/content-model.js +0 -89
- package/dist/internal/render/media-model.d.ts +0 -3
- package/dist/internal/render/media-model.js +0 -45
- package/dist/internal/render/provenance-types.d.ts +0 -33
- package/dist/internal/render/provenance-types.js +0 -1
- package/dist/internal/render/render-projection.d.ts +0 -24
- package/dist/internal/render/render-projection.js +0 -281
- package/dist/internal/render/tailwind-style-model.d.ts +0 -19
- package/dist/internal/render/tailwind-style-model.js +0 -1187
- package/dist/internal/runtime/EditEngineRuntime.d.ts +0 -25
- package/dist/internal/runtime/EditEngineRuntime.js +0 -89
- package/dist/internal/runtime/EditEngineRuntimeSnapshot.d.ts +0 -31
- package/dist/internal/runtime/EditEngineRuntimeSnapshot.js +0 -15
- package/dist/internal/runtime/InternalEditEngine.d.ts +0 -44
- package/dist/internal/runtime/InternalEditEngine.js +0 -1391
- package/dist/internal/runtime.d.ts +0 -3
- package/dist/internal/runtime.js +0 -1
- package/dist/internal/topology/topology.d.ts +0 -6
- package/dist/internal/topology/topology.js +0 -98
- package/dist/internal/topology/types.d.ts +0 -35
- package/dist/internal/topology/types.js +0 -5
- package/dist/internal/types.d.ts +0 -1
- package/dist/internal/types.js +0 -1
- package/dist/internal/writeback/in-memory-fs.d.ts +0 -7
- package/dist/internal/writeback/in-memory-fs.js +0 -44
- package/dist/internal/writeback/types.d.ts +0 -45
- package/dist/internal/writeback/types.js +0 -7
- package/dist/internal/writeback/writeback-service.d.ts +0 -7
- package/dist/internal/writeback/writeback-service.js +0 -568
- package/dist/internal-adapter.d.ts +0 -18
- package/dist/internal-adapter.js +0 -350
- package/dist/next-app-router-fs.js +0 -64
- package/dist/preview-runtime.js +0 -102
- package/dist/public-file-system.js +0 -1
- package/dist/runtime-sync.js +0 -321
- package/dist/runtime.js +0 -134
- package/dist/site-edit-instrumentation.js +0 -322
- package/dist/snapshot-file-system.d.ts +0 -19
- package/dist/snapshot-file-system.js +0 -49
- package/dist/source-writeback-test-harness.d.ts +0 -244
- package/dist/source-writeback-test-harness.js +0 -119
- package/dist/types.js +0 -1
|
@@ -8,240 +8,183 @@ export declare class PreviewFileSystemSiteEditEngineRuntime implements PreviewSi
|
|
|
8
8
|
registerRoute(routeId: string, entryFile: string): void;
|
|
9
9
|
setActiveRoute(routeId: string): Promise<void>;
|
|
10
10
|
getDocument(routeId: string): {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
11
|
+
ok: true;
|
|
12
|
+
data: {
|
|
13
|
+
siteId: string;
|
|
14
|
+
snapshotId: string;
|
|
15
|
+
routeId: string;
|
|
16
|
+
version: number;
|
|
17
|
+
rootKeys: string[];
|
|
18
|
+
entries: {
|
|
19
|
+
key: string;
|
|
20
|
+
tag: string;
|
|
21
|
+
label: string;
|
|
22
|
+
parentKey: string | null;
|
|
23
|
+
childKeys: string[];
|
|
24
|
+
operationSummary: {
|
|
25
|
+
canUpdateText: boolean;
|
|
26
|
+
canInsertChild: boolean;
|
|
27
|
+
canMove: boolean;
|
|
28
|
+
canRemove: boolean;
|
|
29
|
+
};
|
|
30
|
+
}[];
|
|
31
|
+
};
|
|
29
32
|
};
|
|
30
33
|
getObjectCapabilities(key: string, routeId?: string): {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
readonly ok: true;
|
|
35
|
+
readonly data: {
|
|
36
|
+
readonly key: string;
|
|
37
|
+
readonly canUpdateText: boolean;
|
|
38
|
+
readonly canInsertChild: boolean;
|
|
39
|
+
readonly canMove: boolean;
|
|
40
|
+
readonly canRemove: boolean;
|
|
41
|
+
readonly boundaryKind: "component-boundary" | "repeat-region" | "conditional-region" | "fragment-region" | "opaque-region" | null;
|
|
42
|
+
readonly isOpaque: boolean;
|
|
43
|
+
};
|
|
38
44
|
};
|
|
39
45
|
getObjectSummary(key: string, routeId?: string): {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
label: string;
|
|
43
|
-
capabilities: {
|
|
44
|
-
constraints: {
|
|
45
|
-
kind: "component-boundary" | "repeat-region" | "conditional-region" | "opaque-region" | "void-element" | "read-only" | "cross-file-required" | "import-required";
|
|
46
|
-
message: string;
|
|
47
|
-
}[];
|
|
48
|
-
};
|
|
49
|
-
isOpaque: boolean;
|
|
50
|
-
ancestors: {
|
|
46
|
+
readonly ok: true;
|
|
47
|
+
readonly data: {
|
|
51
48
|
key: string;
|
|
52
|
-
label: string;
|
|
53
49
|
tag: string;
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
50
|
+
label: string;
|
|
51
|
+
capabilities: {
|
|
52
|
+
constraints: {
|
|
53
|
+
kind: "component-boundary" | "repeat-region" | "conditional-region" | "opaque-region" | "void-element" | "read-only" | "cross-file-required" | "import-required";
|
|
54
|
+
message: string;
|
|
55
|
+
}[];
|
|
56
|
+
};
|
|
57
|
+
isOpaque: boolean;
|
|
58
|
+
ancestors: {
|
|
59
|
+
key: string;
|
|
60
|
+
label: string;
|
|
61
|
+
tag: string;
|
|
60
62
|
}[];
|
|
61
|
-
|
|
63
|
+
provenanceChain?: {
|
|
64
|
+
editMode: "direct" | "proxy" | "upstream" | "readonly" | "unsupported";
|
|
65
|
+
diagnostics: {
|
|
66
|
+
code: string;
|
|
67
|
+
message: string;
|
|
68
|
+
}[];
|
|
69
|
+
} | undefined;
|
|
70
|
+
};
|
|
62
71
|
};
|
|
63
72
|
getObjectEditContext(key: string, routeId?: string): {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
sourceFile: string;
|
|
67
|
-
capabilities: {
|
|
73
|
+
readonly ok: true;
|
|
74
|
+
readonly data: {
|
|
68
75
|
key: string;
|
|
69
|
-
canUpdateText: boolean;
|
|
70
|
-
canInsertChild: boolean;
|
|
71
|
-
canMove: boolean;
|
|
72
|
-
canRemove: boolean;
|
|
73
|
-
constraints: {
|
|
74
|
-
kind: "component-boundary" | "repeat-region" | "conditional-region" | "opaque-region" | "void-element" | "read-only" | "cross-file-required" | "import-required";
|
|
75
|
-
message: string;
|
|
76
|
-
}[];
|
|
77
|
-
editModes?: {
|
|
78
|
-
updateText?: {
|
|
79
|
-
mode: "direct" | "proxy" | "upstream" | "readonly" | "unsupported";
|
|
80
|
-
reasonCode?: string | undefined;
|
|
81
|
-
} | undefined;
|
|
82
|
-
insertChild?: {
|
|
83
|
-
mode: "direct" | "proxy" | "upstream" | "readonly" | "unsupported";
|
|
84
|
-
reasonCode?: string | undefined;
|
|
85
|
-
} | undefined;
|
|
86
|
-
move?: {
|
|
87
|
-
mode: "direct" | "proxy" | "upstream" | "readonly" | "unsupported";
|
|
88
|
-
reasonCode?: string | undefined;
|
|
89
|
-
} | undefined;
|
|
90
|
-
remove?: {
|
|
91
|
-
mode: "direct" | "proxy" | "upstream" | "readonly" | "unsupported";
|
|
92
|
-
reasonCode?: string | undefined;
|
|
93
|
-
} | undefined;
|
|
94
|
-
} | undefined;
|
|
95
|
-
};
|
|
96
|
-
writeTarget: {
|
|
97
|
-
kind: "jsx-node" | "component-proxy" | "value-binding" | "route-export";
|
|
98
|
-
file: string;
|
|
99
76
|
componentName: string;
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
file?: string | undefined;
|
|
129
|
-
displayPath?: string | undefined;
|
|
130
|
-
sourceType?: "api-field" | "cms-field" | "i18n-message" | "config-entry" | undefined;
|
|
131
|
-
sourceId?: string | undefined;
|
|
132
|
-
} | undefined;
|
|
133
|
-
provenanceChain?: {
|
|
134
|
-
finalSource: {
|
|
135
|
-
kind: "api-field" | "cms-field" | "i18n-message" | "config-entry" | "binding" | "imported-binding" | "repeat-template" | "jsx-literal" | "component-prop" | "object-field" | "array-item" | "conditional-branch";
|
|
136
|
-
file: string;
|
|
137
|
-
displayPath: string;
|
|
138
|
-
externalSource?: {
|
|
139
|
-
sourceType: "api-field" | "cms-field" | "i18n-message" | "config-entry";
|
|
140
|
-
sourceId: string;
|
|
141
|
-
adapterId?: string | undefined;
|
|
77
|
+
sourceFile: string;
|
|
78
|
+
capabilities: {
|
|
79
|
+
key: string;
|
|
80
|
+
canUpdateText: boolean;
|
|
81
|
+
canInsertChild: boolean;
|
|
82
|
+
canMove: boolean;
|
|
83
|
+
canRemove: boolean;
|
|
84
|
+
constraints: {
|
|
85
|
+
kind: "component-boundary" | "repeat-region" | "conditional-region" | "opaque-region" | "void-element" | "read-only" | "cross-file-required" | "import-required";
|
|
86
|
+
message: string;
|
|
87
|
+
}[];
|
|
88
|
+
editModes?: {
|
|
89
|
+
updateText?: {
|
|
90
|
+
mode: "direct" | "proxy" | "upstream" | "readonly" | "unsupported";
|
|
91
|
+
reasonCode?: string | undefined;
|
|
92
|
+
} | undefined;
|
|
93
|
+
insertChild?: {
|
|
94
|
+
mode: "direct" | "proxy" | "upstream" | "readonly" | "unsupported";
|
|
95
|
+
reasonCode?: string | undefined;
|
|
96
|
+
} | undefined;
|
|
97
|
+
move?: {
|
|
98
|
+
mode: "direct" | "proxy" | "upstream" | "readonly" | "unsupported";
|
|
99
|
+
reasonCode?: string | undefined;
|
|
100
|
+
} | undefined;
|
|
101
|
+
remove?: {
|
|
102
|
+
mode: "direct" | "proxy" | "upstream" | "readonly" | "unsupported";
|
|
103
|
+
reasonCode?: string | undefined;
|
|
104
|
+
} | undefined;
|
|
142
105
|
} | undefined;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
kind: "
|
|
106
|
+
};
|
|
107
|
+
writeTarget: {
|
|
108
|
+
kind: "jsx-node" | "component-proxy" | "value-binding" | "route-export";
|
|
146
109
|
file: string;
|
|
147
|
-
|
|
148
|
-
|
|
110
|
+
componentName: string;
|
|
111
|
+
isProxy: boolean;
|
|
112
|
+
};
|
|
113
|
+
textSegments: {
|
|
114
|
+
index: number;
|
|
115
|
+
value: string;
|
|
116
|
+
editable: boolean;
|
|
117
|
+
source: {
|
|
118
|
+
kind: "literal" | "binding" | "imported-binding" | "repeat-template";
|
|
119
|
+
file: string;
|
|
120
|
+
expression: string;
|
|
121
|
+
bindingName?: string | undefined;
|
|
122
|
+
path?: (string | number)[] | undefined;
|
|
123
|
+
} | null;
|
|
149
124
|
}[];
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
125
|
+
boundaryKind: "component-boundary" | "repeat-region" | "conditional-region" | "fragment-region" | "opaque-region" | null;
|
|
126
|
+
children: {
|
|
127
|
+
key: string;
|
|
128
|
+
label: string;
|
|
129
|
+
tag: string;
|
|
155
130
|
}[];
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
131
|
+
siblings: {
|
|
132
|
+
key: string;
|
|
133
|
+
label: string;
|
|
134
|
+
tag: string;
|
|
135
|
+
}[];
|
|
136
|
+
effectiveWriteTarget?: {
|
|
137
|
+
kind: "jsx-node" | "route-export" | "value-path" | "external-entry";
|
|
138
|
+
isProxy: boolean;
|
|
139
|
+
file?: string | undefined;
|
|
140
|
+
displayPath?: string | undefined;
|
|
141
|
+
sourceType?: "api-field" | "cms-field" | "i18n-message" | "config-entry" | undefined;
|
|
142
|
+
sourceId?: string | undefined;
|
|
143
|
+
} | undefined;
|
|
144
|
+
provenanceChain?: {
|
|
145
|
+
finalSource: {
|
|
146
|
+
kind: "api-field" | "cms-field" | "i18n-message" | "config-entry" | "binding" | "imported-binding" | "repeat-template" | "jsx-literal" | "component-prop" | "object-field" | "array-item" | "conditional-branch";
|
|
147
|
+
file: string;
|
|
148
|
+
displayPath: string;
|
|
149
|
+
externalSource?: {
|
|
150
|
+
sourceType: "api-field" | "cms-field" | "i18n-message" | "config-entry";
|
|
151
|
+
sourceId: string;
|
|
152
|
+
adapterId?: string | undefined;
|
|
153
|
+
} | undefined;
|
|
154
|
+
} | null;
|
|
155
|
+
chain: {
|
|
156
|
+
kind: "api-field" | "cms-field" | "i18n-message" | "config-entry" | "binding" | "imported-binding" | "repeat-template" | "jsx-literal" | "component-prop" | "object-field" | "array-item" | "conditional-branch";
|
|
157
|
+
file: string;
|
|
158
|
+
displayName: string;
|
|
159
|
+
canEditHere: boolean;
|
|
160
|
+
}[];
|
|
161
|
+
confidence: "exact" | "safe-derived" | "partial" | "unknown";
|
|
162
|
+
editMode: "direct" | "proxy" | "upstream" | "readonly" | "unsupported";
|
|
163
|
+
diagnostics: {
|
|
185
164
|
code: string;
|
|
186
165
|
message: string;
|
|
187
|
-
}[]
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
}
|
|
166
|
+
}[];
|
|
167
|
+
} | undefined;
|
|
168
|
+
componentSemantic?: Record<string, unknown> | undefined;
|
|
169
|
+
};
|
|
191
170
|
};
|
|
192
171
|
getObjectContentDetail(key: string, routeId?: string): {
|
|
193
|
-
|
|
194
|
-
|
|
172
|
+
readonly ok: true;
|
|
173
|
+
readonly data: {
|
|
174
|
+
key: string;
|
|
175
|
+
contentModel?: Record<string, unknown> | undefined;
|
|
176
|
+
};
|
|
195
177
|
};
|
|
196
178
|
getObjectMediaDetail(key: string, routeId?: string): {
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
key: string;
|
|
202
|
-
routeId: string;
|
|
203
|
-
filePath: string;
|
|
204
|
-
componentName: string;
|
|
205
|
-
sourceKind: "missing" | "expression" | "stringLiteral";
|
|
206
|
-
attrRaw: string | null;
|
|
207
|
-
valueRaw: string | null;
|
|
208
|
-
attrRange: {
|
|
209
|
-
start: number;
|
|
210
|
-
end: number;
|
|
211
|
-
startLine?: number | undefined;
|
|
212
|
-
startColumn?: number | undefined;
|
|
213
|
-
endLine?: number | undefined;
|
|
214
|
-
endColumn?: number | undefined;
|
|
215
|
-
} | null;
|
|
216
|
-
valueRange: {
|
|
217
|
-
start: number;
|
|
218
|
-
end: number;
|
|
219
|
-
startLine?: number | undefined;
|
|
220
|
-
startColumn?: number | undefined;
|
|
221
|
-
endLine?: number | undefined;
|
|
222
|
-
endColumn?: number | undefined;
|
|
223
|
-
} | null;
|
|
224
|
-
openingElementRange: {
|
|
225
|
-
start: number;
|
|
226
|
-
end: number;
|
|
227
|
-
startLine?: number | undefined;
|
|
228
|
-
startColumn?: number | undefined;
|
|
229
|
-
endLine?: number | undefined;
|
|
230
|
-
endColumn?: number | undefined;
|
|
231
|
-
};
|
|
232
|
-
version: {
|
|
233
|
-
documentVersion: number;
|
|
234
|
-
contentHash: string;
|
|
235
|
-
parserVersion: string;
|
|
179
|
+
readonly ok: true;
|
|
180
|
+
readonly data: {
|
|
181
|
+
key: string;
|
|
182
|
+
mediaModel?: Record<string, unknown> | undefined;
|
|
236
183
|
};
|
|
237
|
-
diagnostics: {
|
|
238
|
-
code: "missing-class-name" | "unsupported-attribute-name" | "source-locator-warning" | "invalid-new-attr" | "version-conflict" | "write-failed";
|
|
239
|
-
message: string;
|
|
240
|
-
}[];
|
|
241
184
|
};
|
|
242
|
-
|
|
243
|
-
ok: true;
|
|
244
|
-
|
|
185
|
+
getClassNameSource(key: string, routeId?: string): {
|
|
186
|
+
readonly ok: true;
|
|
187
|
+
readonly data: {
|
|
245
188
|
key: string;
|
|
246
189
|
routeId: string;
|
|
247
190
|
filePath: string;
|
|
@@ -283,109 +226,112 @@ export declare class PreviewFileSystemSiteEditEngineRuntime implements PreviewSi
|
|
|
283
226
|
message: string;
|
|
284
227
|
}[];
|
|
285
228
|
};
|
|
286
|
-
}
|
|
229
|
+
};
|
|
230
|
+
setClassNameSource(request: Parameters<PreviewSiteEditEngineRuntime["setClassNameSource"]>[0]): Promise<import("@trojanbox-vcp-test/contracts").SiteEditSetClassNameSourceResult>;
|
|
231
|
+
executeOperation(request: Parameters<PreviewSiteEditEngineRuntime["executeOperation"]>[0]): Promise<{
|
|
287
232
|
ok: false;
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
code: "missing-class-name" | "unsupported-attribute-name" | "source-locator-warning" | "invalid-new-attr" | "version-conflict" | "write-failed";
|
|
233
|
+
error: {
|
|
234
|
+
code: import("./internal/protocol.js").OperationErrorCode;
|
|
291
235
|
message: string;
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
start: number;
|
|
303
|
-
end: number;
|
|
304
|
-
startLine?: number | undefined;
|
|
305
|
-
startColumn?: number | undefined;
|
|
306
|
-
endLine?: number | undefined;
|
|
307
|
-
endColumn?: number | undefined;
|
|
308
|
-
} | null;
|
|
309
|
-
valueRange: {
|
|
310
|
-
start: number;
|
|
311
|
-
end: number;
|
|
312
|
-
startLine?: number | undefined;
|
|
313
|
-
startColumn?: number | undefined;
|
|
314
|
-
endLine?: number | undefined;
|
|
315
|
-
endColumn?: number | undefined;
|
|
316
|
-
} | null;
|
|
317
|
-
openingElementRange: {
|
|
318
|
-
start: number;
|
|
319
|
-
end: number;
|
|
320
|
-
startLine?: number | undefined;
|
|
321
|
-
startColumn?: number | undefined;
|
|
322
|
-
endLine?: number | undefined;
|
|
323
|
-
endColumn?: number | undefined;
|
|
236
|
+
};
|
|
237
|
+
data: {
|
|
238
|
+
requestId: string;
|
|
239
|
+
kind: import("./internal/protocol.js").OperationType;
|
|
240
|
+
target: {
|
|
241
|
+
kind: "node";
|
|
242
|
+
key: string;
|
|
243
|
+
} | {
|
|
244
|
+
kind: "route";
|
|
245
|
+
routeId: string;
|
|
324
246
|
};
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
247
|
+
resultVersion: number;
|
|
248
|
+
};
|
|
249
|
+
} | {
|
|
250
|
+
ok: true;
|
|
251
|
+
data: {
|
|
252
|
+
requestId: string;
|
|
253
|
+
kind: "update-text" | "remove-node" | "insert-child" | "move-node" | "replace-rich-text-content" | "insert-rich-text-block" | "remove-rich-text-block" | "set-media-field" | "set-component-slot-content" | "set-object-field" | "insert-object-field" | "remove-object-field" | "update-array-item" | "insert-array-item" | "remove-array-item" | "move-array-item" | "replace-conditional-expression" | "set-conditional-branch-content" | "set-jsx-prop" | "remove-jsx-prop" | "set-class-name" | "add-class-token" | "remove-class-token" | "set-style-property" | "set-style-properties" | "set-css-module-class" | "set-directive" | "remove-directive" | "set-route-export" | "set-metadata-field" | "set-generate-metadata";
|
|
254
|
+
target: {
|
|
255
|
+
kind: "node";
|
|
256
|
+
key: string;
|
|
257
|
+
} | {
|
|
258
|
+
kind: "route";
|
|
259
|
+
routeId: string;
|
|
329
260
|
};
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
message: string;
|
|
333
|
-
}[];
|
|
334
|
-
} | undefined;
|
|
335
|
-
}>;
|
|
336
|
-
executeOperation(request: Parameters<PreviewSiteEditEngineRuntime["executeOperation"]>[0]): Promise<{
|
|
337
|
-
requestId: string;
|
|
338
|
-
kind: "update-text" | "remove-node" | "insert-child" | "move-node" | "replace-rich-text-content" | "insert-rich-text-block" | "remove-rich-text-block" | "set-media-field" | "set-component-slot-content" | "set-object-field" | "insert-object-field" | "remove-object-field" | "update-array-item" | "insert-array-item" | "remove-array-item" | "move-array-item" | "replace-conditional-expression" | "set-conditional-branch-content" | "set-jsx-prop" | "remove-jsx-prop" | "set-class-name" | "add-class-token" | "remove-class-token" | "set-style-property" | "set-style-properties" | "set-css-module-class" | "set-directive" | "remove-directive" | "set-route-export" | "set-metadata-field" | "set-generate-metadata";
|
|
339
|
-
target: {
|
|
340
|
-
kind: "node";
|
|
341
|
-
key: string;
|
|
342
|
-
} | {
|
|
343
|
-
kind: "route";
|
|
344
|
-
routeId: string;
|
|
261
|
+
resultVersion: number;
|
|
262
|
+
affectedFiles?: string[] | undefined;
|
|
345
263
|
};
|
|
346
|
-
|
|
347
|
-
resultVersion: number;
|
|
348
|
-
error?: {
|
|
349
|
-
code: "NODE_NOT_FOUND" | "ROUTE_NOT_FOUND" | "CAPABILITY_REJECTED" | "CONSTRAINT_VIOLATED" | "INVALID_PARAMS" | "PLAN_FAILED" | "VERSION_STALE" | "AST_PARSE_ERROR" | "UNSUPPORTED_OPERATION" | "LOCATOR_FAILED" | "INVALID_TARGET" | "WRITE_IO_ERROR" | "CONCURRENT_MODIFIED" | "ROLLBACK_FAILED" | "INTERNAL_ERROR";
|
|
350
|
-
message: string;
|
|
351
|
-
details?: Record<string, unknown> | undefined;
|
|
352
|
-
} | undefined;
|
|
264
|
+
error?: undefined;
|
|
353
265
|
}>;
|
|
354
266
|
undo(): Promise<{
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
kind: "node";
|
|
359
|
-
key: string;
|
|
360
|
-
} | {
|
|
361
|
-
kind: "route";
|
|
362
|
-
routeId: string;
|
|
363
|
-
};
|
|
364
|
-
ok: boolean;
|
|
365
|
-
resultVersion: number;
|
|
366
|
-
error?: {
|
|
367
|
-
code: "NODE_NOT_FOUND" | "ROUTE_NOT_FOUND" | "CAPABILITY_REJECTED" | "CONSTRAINT_VIOLATED" | "INVALID_PARAMS" | "PLAN_FAILED" | "VERSION_STALE" | "AST_PARSE_ERROR" | "UNSUPPORTED_OPERATION" | "LOCATOR_FAILED" | "INVALID_TARGET" | "WRITE_IO_ERROR" | "CONCURRENT_MODIFIED" | "ROLLBACK_FAILED" | "INTERNAL_ERROR";
|
|
267
|
+
ok: false;
|
|
268
|
+
error: {
|
|
269
|
+
code: import("./internal/protocol.js").OperationErrorCode;
|
|
368
270
|
message: string;
|
|
369
|
-
|
|
370
|
-
|
|
271
|
+
};
|
|
272
|
+
data: {
|
|
273
|
+
requestId: string;
|
|
274
|
+
kind: import("./internal/protocol.js").OperationType;
|
|
275
|
+
target: {
|
|
276
|
+
kind: "node";
|
|
277
|
+
key: string;
|
|
278
|
+
} | {
|
|
279
|
+
kind: "route";
|
|
280
|
+
routeId: string;
|
|
281
|
+
};
|
|
282
|
+
resultVersion: number;
|
|
283
|
+
};
|
|
284
|
+
} | {
|
|
285
|
+
ok: true;
|
|
286
|
+
data: {
|
|
287
|
+
requestId: string;
|
|
288
|
+
kind: "update-text" | "remove-node" | "insert-child" | "move-node" | "replace-rich-text-content" | "insert-rich-text-block" | "remove-rich-text-block" | "set-media-field" | "set-component-slot-content" | "set-object-field" | "insert-object-field" | "remove-object-field" | "update-array-item" | "insert-array-item" | "remove-array-item" | "move-array-item" | "replace-conditional-expression" | "set-conditional-branch-content" | "set-jsx-prop" | "remove-jsx-prop" | "set-class-name" | "add-class-token" | "remove-class-token" | "set-style-property" | "set-style-properties" | "set-css-module-class" | "set-directive" | "remove-directive" | "set-route-export" | "set-metadata-field" | "set-generate-metadata";
|
|
289
|
+
target: {
|
|
290
|
+
kind: "node";
|
|
291
|
+
key: string;
|
|
292
|
+
} | {
|
|
293
|
+
kind: "route";
|
|
294
|
+
routeId: string;
|
|
295
|
+
};
|
|
296
|
+
resultVersion: number;
|
|
297
|
+
affectedFiles?: string[] | undefined;
|
|
298
|
+
};
|
|
299
|
+
error?: undefined;
|
|
371
300
|
}>;
|
|
372
301
|
redo(): Promise<{
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
kind: "node";
|
|
377
|
-
key: string;
|
|
378
|
-
} | {
|
|
379
|
-
kind: "route";
|
|
380
|
-
routeId: string;
|
|
381
|
-
};
|
|
382
|
-
ok: boolean;
|
|
383
|
-
resultVersion: number;
|
|
384
|
-
error?: {
|
|
385
|
-
code: "NODE_NOT_FOUND" | "ROUTE_NOT_FOUND" | "CAPABILITY_REJECTED" | "CONSTRAINT_VIOLATED" | "INVALID_PARAMS" | "PLAN_FAILED" | "VERSION_STALE" | "AST_PARSE_ERROR" | "UNSUPPORTED_OPERATION" | "LOCATOR_FAILED" | "INVALID_TARGET" | "WRITE_IO_ERROR" | "CONCURRENT_MODIFIED" | "ROLLBACK_FAILED" | "INTERNAL_ERROR";
|
|
302
|
+
ok: false;
|
|
303
|
+
error: {
|
|
304
|
+
code: import("./internal/protocol.js").OperationErrorCode;
|
|
386
305
|
message: string;
|
|
387
|
-
|
|
388
|
-
|
|
306
|
+
};
|
|
307
|
+
data: {
|
|
308
|
+
requestId: string;
|
|
309
|
+
kind: import("./internal/protocol.js").OperationType;
|
|
310
|
+
target: {
|
|
311
|
+
kind: "node";
|
|
312
|
+
key: string;
|
|
313
|
+
} | {
|
|
314
|
+
kind: "route";
|
|
315
|
+
routeId: string;
|
|
316
|
+
};
|
|
317
|
+
resultVersion: number;
|
|
318
|
+
};
|
|
319
|
+
} | {
|
|
320
|
+
ok: true;
|
|
321
|
+
data: {
|
|
322
|
+
requestId: string;
|
|
323
|
+
kind: "update-text" | "remove-node" | "insert-child" | "move-node" | "replace-rich-text-content" | "insert-rich-text-block" | "remove-rich-text-block" | "set-media-field" | "set-component-slot-content" | "set-object-field" | "insert-object-field" | "remove-object-field" | "update-array-item" | "insert-array-item" | "remove-array-item" | "move-array-item" | "replace-conditional-expression" | "set-conditional-branch-content" | "set-jsx-prop" | "remove-jsx-prop" | "set-class-name" | "add-class-token" | "remove-class-token" | "set-style-property" | "set-style-properties" | "set-css-module-class" | "set-directive" | "remove-directive" | "set-route-export" | "set-metadata-field" | "set-generate-metadata";
|
|
324
|
+
target: {
|
|
325
|
+
kind: "node";
|
|
326
|
+
key: string;
|
|
327
|
+
} | {
|
|
328
|
+
kind: "route";
|
|
329
|
+
routeId: string;
|
|
330
|
+
};
|
|
331
|
+
resultVersion: number;
|
|
332
|
+
affectedFiles?: string[] | undefined;
|
|
333
|
+
};
|
|
334
|
+
error?: undefined;
|
|
389
335
|
}>;
|
|
390
336
|
notifyFileChanged(file: string): void;
|
|
391
337
|
subscribe(listener: Parameters<PreviewSiteEditEngineRuntime["subscribe"]>[0]): () => void;
|