@inventarch/runtime 0.0.0-stage → 1.0.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/LICENSE +202 -0
- package/NOTICE +4 -0
- package/README.md +11 -2
- package/SPEC.md +77 -0
- package/dist/authoring/index.d.ts +159 -0
- package/dist/authoring/index.d.ts.map +1 -0
- package/dist/authoring/index.js +416 -0
- package/dist/authoring/index.js.map +1 -0
- package/dist/authoring-execution/execution.d.ts +12 -0
- package/dist/authoring-execution/execution.d.ts.map +1 -0
- package/dist/authoring-execution/execution.js +73 -0
- package/dist/authoring-execution/execution.js.map +1 -0
- package/dist/authoring-execution/index.d.ts +6 -0
- package/dist/authoring-execution/index.d.ts.map +1 -0
- package/dist/authoring-execution/index.js +6 -0
- package/dist/authoring-execution/index.js.map +1 -0
- package/dist/authoring-execution/inventory.d.ts +5 -0
- package/dist/authoring-execution/inventory.d.ts.map +1 -0
- package/dist/authoring-execution/inventory.js +41 -0
- package/dist/authoring-execution/inventory.js.map +1 -0
- package/dist/authoring-execution/shared.d.ts +22 -0
- package/dist/authoring-execution/shared.d.ts.map +1 -0
- package/dist/authoring-execution/shared.js +101 -0
- package/dist/authoring-execution/shared.js.map +1 -0
- package/dist/authoring-execution/types.d.ts +43 -0
- package/dist/authoring-execution/types.d.ts.map +1 -0
- package/dist/authoring-execution/types.js +21 -0
- package/dist/authoring-execution/types.js.map +1 -0
- package/dist/candidate.d.ts +49 -0
- package/dist/candidate.d.ts.map +1 -0
- package/dist/candidate.js +158 -0
- package/dist/candidate.js.map +1 -0
- package/dist/classify.d.ts +12 -0
- package/dist/classify.d.ts.map +1 -0
- package/dist/classify.js +21 -0
- package/dist/classify.js.map +1 -0
- package/dist/collect.d.ts +16 -0
- package/dist/collect.d.ts.map +1 -0
- package/dist/collect.js +133 -0
- package/dist/collect.js.map +1 -0
- package/dist/context.d.ts +5 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +124 -0
- package/dist/context.js.map +1 -0
- package/dist/coordinate.d.ts +21 -0
- package/dist/coordinate.d.ts.map +1 -0
- package/dist/coordinate.js +40 -0
- package/dist/coordinate.js.map +1 -0
- package/dist/door.d.ts +17 -0
- package/dist/door.d.ts.map +1 -0
- package/dist/door.js +217 -0
- package/dist/door.js.map +1 -0
- package/dist/editor/index.d.ts +5 -0
- package/dist/editor/index.d.ts.map +1 -0
- package/dist/editor/index.js +4 -0
- package/dist/editor/index.js.map +1 -0
- package/dist/editor/types.d.ts +226 -0
- package/dist/editor/types.d.ts.map +1 -0
- package/dist/editor/types.js +2 -0
- package/dist/editor/types.js.map +1 -0
- package/dist/editor/workspace.d.ts +46 -0
- package/dist/editor/workspace.d.ts.map +1 -0
- package/dist/editor/workspace.js +903 -0
- package/dist/editor/workspace.js.map +1 -0
- package/dist/entry.d.ts +9 -0
- package/dist/entry.d.ts.map +1 -0
- package/dist/entry.js +26 -0
- package/dist/entry.js.map +1 -0
- package/dist/errors.d.ts +8 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +15 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.d.ts +25 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -0
- package/dist/machine-protocol.d.ts +33 -0
- package/dist/machine-protocol.d.ts.map +1 -0
- package/dist/machine-protocol.js +339 -0
- package/dist/machine-protocol.js.map +1 -0
- package/dist/mentions.d.ts +20 -0
- package/dist/mentions.d.ts.map +1 -0
- package/dist/mentions.js +79 -0
- package/dist/mentions.js.map +1 -0
- package/dist/publication.d.ts +22 -0
- package/dist/publication.d.ts.map +1 -0
- package/dist/publication.js +275 -0
- package/dist/publication.js.map +1 -0
- package/dist/render.d.ts +9 -0
- package/dist/render.d.ts.map +1 -0
- package/dist/render.js +78 -0
- package/dist/render.js.map +1 -0
- package/dist/select.d.ts +16 -0
- package/dist/select.d.ts.map +1 -0
- package/dist/select.js +55 -0
- package/dist/select.js.map +1 -0
- package/dist/steward.d.ts +22 -0
- package/dist/steward.d.ts.map +1 -0
- package/dist/steward.js +45 -0
- package/dist/steward.js.map +1 -0
- package/dist/types.d.ts +97 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +10 -0
- package/dist/types.js.map +1 -0
- package/package.json +161 -3
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { EditorWorkspace, EditorError } from './workspace.js';
|
|
2
|
+
export type * from './types.js';
|
|
3
|
+
export { PHASES, PRIMITIVES } from '@inventarch/language';
|
|
4
|
+
export { cursorContext, projectSource, lineRange } from '@inventarch/language/editor';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/editor/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC9D,mBAAmB,YAAY,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/editor/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE9D,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC"}
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
import type { Range } from '@inventarch/language/editor';
|
|
2
|
+
import type { Phase, Primitive } from '@inventarch/language';
|
|
3
|
+
export type { Position, Range } from '@inventarch/language/editor';
|
|
4
|
+
export type { Overlay, EditorSource } from '@inventarch/db/editor';
|
|
5
|
+
export type { Phase, Primitive } from '@inventarch/language';
|
|
6
|
+
export interface ViewStamp {
|
|
7
|
+
readonly protocol: 1;
|
|
8
|
+
readonly ownerSession: string;
|
|
9
|
+
readonly generation: number;
|
|
10
|
+
readonly savedRevision: string;
|
|
11
|
+
readonly viewRevision: string;
|
|
12
|
+
readonly location: string;
|
|
13
|
+
readonly phase: Phase | null;
|
|
14
|
+
}
|
|
15
|
+
export interface SourceLink {
|
|
16
|
+
readonly action: string;
|
|
17
|
+
readonly path: string;
|
|
18
|
+
readonly range: Range;
|
|
19
|
+
readonly readOnly: boolean;
|
|
20
|
+
}
|
|
21
|
+
export interface SourceResult extends SourceLink {
|
|
22
|
+
readonly text: string;
|
|
23
|
+
readonly virtual: boolean;
|
|
24
|
+
}
|
|
25
|
+
export interface RecordSummary {
|
|
26
|
+
readonly occurrence: string;
|
|
27
|
+
readonly identity: string | null;
|
|
28
|
+
readonly name: string;
|
|
29
|
+
readonly discriminator: string;
|
|
30
|
+
readonly system: string | null;
|
|
31
|
+
readonly kind: string | null;
|
|
32
|
+
readonly description: string;
|
|
33
|
+
readonly status: 'admitted' | 'syntax-only' | 'refused' | 'shadowed' | 'tied' | 'inactive' | 'blocked';
|
|
34
|
+
readonly source: SourceLink;
|
|
35
|
+
}
|
|
36
|
+
export interface EditorFinding {
|
|
37
|
+
readonly code: string;
|
|
38
|
+
readonly message: string;
|
|
39
|
+
readonly severity: 'error' | 'warning' | 'info';
|
|
40
|
+
readonly path: string;
|
|
41
|
+
readonly range: Range;
|
|
42
|
+
}
|
|
43
|
+
export interface EditorView {
|
|
44
|
+
readonly stamp: ViewStamp;
|
|
45
|
+
readonly records: readonly RecordSummary[];
|
|
46
|
+
readonly diagnostics: readonly EditorFinding[];
|
|
47
|
+
readonly systems: readonly string[];
|
|
48
|
+
readonly outcome: string;
|
|
49
|
+
readonly health: readonly {
|
|
50
|
+
check: string;
|
|
51
|
+
outcome: string;
|
|
52
|
+
}[];
|
|
53
|
+
}
|
|
54
|
+
interface EditorDependencyBase {
|
|
55
|
+
readonly id: string;
|
|
56
|
+
readonly prefix: string;
|
|
57
|
+
readonly files: number;
|
|
58
|
+
readonly records: number;
|
|
59
|
+
readonly systems: readonly string[];
|
|
60
|
+
}
|
|
61
|
+
export interface EditorAdoption extends EditorDependencyBase {
|
|
62
|
+
readonly kind: 'adopted';
|
|
63
|
+
readonly revision: string;
|
|
64
|
+
readonly access: 'captured-source';
|
|
65
|
+
}
|
|
66
|
+
export interface EditorInstallation extends EditorDependencyBase {
|
|
67
|
+
readonly kind: 'installed';
|
|
68
|
+
readonly version: string;
|
|
69
|
+
readonly archive: string;
|
|
70
|
+
readonly access: 'installed-package';
|
|
71
|
+
}
|
|
72
|
+
export type EditorDependency = EditorAdoption | EditorInstallation;
|
|
73
|
+
export interface EditorDependencyUse {
|
|
74
|
+
readonly occurrence: string;
|
|
75
|
+
readonly dependency: string;
|
|
76
|
+
readonly reason: 'schema' | 'registration' | 'reference';
|
|
77
|
+
readonly target: SourceLink;
|
|
78
|
+
}
|
|
79
|
+
/** Presentation of the captured source and installed package composition; not a mount, publication or write grant. */
|
|
80
|
+
export interface EditorComposition {
|
|
81
|
+
readonly stamp: ViewStamp;
|
|
82
|
+
readonly localRevision: string;
|
|
83
|
+
readonly dependencies: readonly EditorDependency[];
|
|
84
|
+
readonly uses: readonly EditorDependencyUse[];
|
|
85
|
+
}
|
|
86
|
+
/** Design C04: what a completion item cites; its longer documentation is loaded only when the item is selected. */
|
|
87
|
+
export type CompletionCitation = {
|
|
88
|
+
readonly kind: 'record';
|
|
89
|
+
readonly identity: string;
|
|
90
|
+
} | {
|
|
91
|
+
readonly kind: 'word';
|
|
92
|
+
readonly keyword: string;
|
|
93
|
+
} | {
|
|
94
|
+
readonly kind: 'field';
|
|
95
|
+
readonly schema: string;
|
|
96
|
+
readonly section: string;
|
|
97
|
+
readonly key: string;
|
|
98
|
+
};
|
|
99
|
+
export interface Completion {
|
|
100
|
+
readonly label: string;
|
|
101
|
+
readonly insertText: string;
|
|
102
|
+
readonly range: Range;
|
|
103
|
+
readonly kind: 'keyword' | 'field' | 'reference' | 'value' | 'snippet';
|
|
104
|
+
readonly detail: string;
|
|
105
|
+
readonly documentation?: string;
|
|
106
|
+
readonly citation?: CompletionCitation;
|
|
107
|
+
}
|
|
108
|
+
export interface Hover {
|
|
109
|
+
readonly range: Range;
|
|
110
|
+
readonly markdown: string;
|
|
111
|
+
}
|
|
112
|
+
export interface Symbol {
|
|
113
|
+
readonly name: string;
|
|
114
|
+
readonly detail: string;
|
|
115
|
+
readonly range: Range;
|
|
116
|
+
readonly selectionRange: Range;
|
|
117
|
+
readonly path: string;
|
|
118
|
+
}
|
|
119
|
+
export interface SemanticToken {
|
|
120
|
+
readonly line: number;
|
|
121
|
+
readonly character: number;
|
|
122
|
+
readonly length: number;
|
|
123
|
+
readonly type: string;
|
|
124
|
+
readonly modifiers: readonly string[];
|
|
125
|
+
}
|
|
126
|
+
export interface Relationship {
|
|
127
|
+
readonly from: string | null;
|
|
128
|
+
readonly to: string | null;
|
|
129
|
+
readonly predicate: string;
|
|
130
|
+
readonly state: 'active' | 'conditional' | 'gated' | 'dangling';
|
|
131
|
+
readonly source: SourceLink;
|
|
132
|
+
readonly fromSource: SourceLink | null;
|
|
133
|
+
readonly toSource: SourceLink | null;
|
|
134
|
+
readonly condition: string;
|
|
135
|
+
}
|
|
136
|
+
/** Syntactic nesting of one admitted record inside another; presentation only, never semantic adjacency, reach or a traversal/semantic truncation input. */
|
|
137
|
+
export interface Containment {
|
|
138
|
+
readonly parent: string;
|
|
139
|
+
readonly child: string;
|
|
140
|
+
readonly source: SourceLink;
|
|
141
|
+
}
|
|
142
|
+
/** N04 overlay: links touching a visible node; `nodes` holds structural-only endpoints absent from the semantic neighborhood. */
|
|
143
|
+
export interface ContainmentView {
|
|
144
|
+
readonly links: readonly Containment[];
|
|
145
|
+
readonly nodes: readonly RecordSummary[];
|
|
146
|
+
readonly truncated: boolean;
|
|
147
|
+
}
|
|
148
|
+
export interface GraphView {
|
|
149
|
+
readonly stamp: ViewStamp;
|
|
150
|
+
readonly nodes: readonly RecordSummary[];
|
|
151
|
+
readonly edges: readonly Relationship[];
|
|
152
|
+
readonly containment: ContainmentView;
|
|
153
|
+
readonly truncated: boolean;
|
|
154
|
+
readonly totals: {
|
|
155
|
+
readonly nodes: number;
|
|
156
|
+
readonly edges: number;
|
|
157
|
+
};
|
|
158
|
+
readonly groups: readonly {
|
|
159
|
+
readonly system: string;
|
|
160
|
+
readonly count: number;
|
|
161
|
+
}[];
|
|
162
|
+
}
|
|
163
|
+
export interface Inspection {
|
|
164
|
+
readonly stamp: ViewStamp;
|
|
165
|
+
readonly record: RecordSummary;
|
|
166
|
+
readonly relationships: readonly Relationship[];
|
|
167
|
+
readonly schema: {
|
|
168
|
+
readonly name: string;
|
|
169
|
+
readonly closed: boolean;
|
|
170
|
+
readonly fields: readonly {
|
|
171
|
+
readonly section: string;
|
|
172
|
+
readonly key: string;
|
|
173
|
+
readonly type: string;
|
|
174
|
+
readonly must: boolean;
|
|
175
|
+
}[];
|
|
176
|
+
readonly source: SourceLink;
|
|
177
|
+
} | null;
|
|
178
|
+
readonly cells: readonly {
|
|
179
|
+
readonly phase: Phase;
|
|
180
|
+
readonly primitive: Primitive;
|
|
181
|
+
readonly text: string;
|
|
182
|
+
readonly primary: boolean;
|
|
183
|
+
readonly source: SourceLink;
|
|
184
|
+
}[];
|
|
185
|
+
readonly selectedCell: {
|
|
186
|
+
readonly kind: string;
|
|
187
|
+
readonly text: string;
|
|
188
|
+
} | null;
|
|
189
|
+
readonly checks: readonly {
|
|
190
|
+
readonly check: string;
|
|
191
|
+
readonly outcome: string;
|
|
192
|
+
readonly messages: readonly string[];
|
|
193
|
+
}[];
|
|
194
|
+
readonly typedReferences: number;
|
|
195
|
+
readonly incomingRelationships: number;
|
|
196
|
+
}
|
|
197
|
+
export interface ProposedFile {
|
|
198
|
+
readonly path: string;
|
|
199
|
+
readonly text: string;
|
|
200
|
+
}
|
|
201
|
+
export interface ProposalValidation {
|
|
202
|
+
readonly stamp: ViewStamp;
|
|
203
|
+
readonly allowed: boolean;
|
|
204
|
+
readonly messages: readonly string[];
|
|
205
|
+
readonly diagnostics: readonly EditorFinding[];
|
|
206
|
+
readonly files: readonly (ProposedFile & {
|
|
207
|
+
readonly hash: string;
|
|
208
|
+
})[];
|
|
209
|
+
}
|
|
210
|
+
export interface DraftShape {
|
|
211
|
+
readonly discriminator: string;
|
|
212
|
+
readonly system: string;
|
|
213
|
+
readonly schema: string;
|
|
214
|
+
readonly sections: readonly {
|
|
215
|
+
readonly name: string;
|
|
216
|
+
readonly must: boolean;
|
|
217
|
+
}[];
|
|
218
|
+
readonly fields: readonly {
|
|
219
|
+
readonly section: string;
|
|
220
|
+
readonly key: string;
|
|
221
|
+
readonly type: string;
|
|
222
|
+
readonly must: boolean;
|
|
223
|
+
readonly description?: string;
|
|
224
|
+
}[];
|
|
225
|
+
}
|
|
226
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/editor/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC7D,YAAY,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACnE,YAAY,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACnE,YAAY,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC7D,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC;IACrB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,aAAa,EAAE,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C;IAC/C,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC,YAAY,GAAG;QAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,EAAE,CAAC;CACvE;AACD,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,EAAE,SAAS;QAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAA;KAAE,EAAE,CAAC;IAChF,QAAQ,CAAC,MAAM,EAAE,SAAS;QACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;QACzB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;QACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QACtB,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;QACvB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;KAC/B,EAAE,CAAC;CACL"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/editor/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { EditorSource, InputOptions, Overlay } from '@inventarch/db/editor';
|
|
2
|
+
import type { Phase } from '@inventarch/language';
|
|
3
|
+
import type { Position, Range } from '@inventarch/language/editor';
|
|
4
|
+
import type { Coordinate } from '@inventarch/graph';
|
|
5
|
+
import { evaluateSteward } from '../steward.js';
|
|
6
|
+
import type { Completion, CompletionCitation, DraftShape, EditorComposition, EditorFinding, EditorView, GraphView, Hover, Inspection, ProposalValidation, ProposedFile, SemanticToken, SourceLink, SourceResult, Symbol, ViewStamp } from './types.js';
|
|
7
|
+
export declare class EditorError extends Error {
|
|
8
|
+
readonly code: 'stale' | 'unavailable' | 'invalid' | 'read-only';
|
|
9
|
+
constructor(code: 'stale' | 'unavailable' | 'invalid' | 'read-only', message: string);
|
|
10
|
+
}
|
|
11
|
+
export declare class EditorWorkspace {
|
|
12
|
+
#private;
|
|
13
|
+
readonly ownerSession: `${string}-${string}-${string}-${string}-${string}`;
|
|
14
|
+
readonly root: string;
|
|
15
|
+
constructor(root: string, options?: InputOptions);
|
|
16
|
+
get sources(): readonly EditorSource[];
|
|
17
|
+
sourceText(path: string): string | undefined;
|
|
18
|
+
update(overlays: readonly Overlay[], refresh?: boolean): ViewStamp;
|
|
19
|
+
stamp(location?: string, phase?: Phase | null): ViewStamp;
|
|
20
|
+
assertStamp(stamp: ViewStamp): void;
|
|
21
|
+
source(action: string, stamp: ViewStamp): SourceResult;
|
|
22
|
+
diagnostics(location?: string, phase?: Phase | null): readonly EditorFinding[];
|
|
23
|
+
view(location?: string, phase?: Phase | null): EditorView;
|
|
24
|
+
composition(stamp?: ViewStamp): EditorComposition;
|
|
25
|
+
definition(path: string, at: Position, type?: boolean): readonly SourceLink[];
|
|
26
|
+
references(path: string, at: Position, includeDeclaration?: boolean): readonly SourceLink[];
|
|
27
|
+
hover(path: string, at: Position): Hover | undefined;
|
|
28
|
+
symbols(path?: string, query?: string): readonly Symbol[];
|
|
29
|
+
folding(path: string): readonly Range[];
|
|
30
|
+
formatting(path: string): string | null;
|
|
31
|
+
completions(path: string, at: Position, limit?: number): readonly Completion[];
|
|
32
|
+
/** Design C04: the longer documentation of one selected item, loaded lazily under the stamp its list was computed with. A changed view refuses as stale. */
|
|
33
|
+
completionDocumentation(path: string, citation: CompletionCitation, stamp: ViewStamp): string | undefined;
|
|
34
|
+
semanticTokens(path: string): readonly SemanticToken[];
|
|
35
|
+
inspect(key: string, stamp: ViewStamp, coordinate?: Coordinate): Inspection;
|
|
36
|
+
graph(key?: string, stamp?: ViewStamp, coordinate?: Coordinate, depth?: number): GraphView;
|
|
37
|
+
steward(system: string, identity?: string): ReturnType<typeof evaluateSteward>;
|
|
38
|
+
draftShapes(): readonly DraftShape[];
|
|
39
|
+
draft(discriminator: string, name: string, fields?: Readonly<Record<string, string>>): ProposedFile;
|
|
40
|
+
validateProposal(files: readonly ProposedFile[], stamp: ViewStamp, target?: {
|
|
41
|
+
readonly system: string;
|
|
42
|
+
readonly discriminator: string;
|
|
43
|
+
}): ProposalValidation;
|
|
44
|
+
close(): void;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=workspace.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace.d.ts","sourceRoot":"","sources":["../../src/editor/workspace.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAYjF,OAAO,KAAK,EAAiB,KAAK,EAAoB,MAAM,sBAAsB,CAAC;AAUnF,OAAO,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAoB,MAAM,6BAA6B,CAAC;AAErF,OAAO,KAAK,EAAE,UAAU,EAAc,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EACV,UAAU,EACV,kBAAkB,EAClB,UAAU,EACV,iBAAiB,EAGjB,aAAa,EACb,UAAU,EACV,SAAS,EACT,KAAK,EACL,UAAU,EACV,kBAAkB,EAClB,YAAY,EAGZ,aAAa,EACb,UAAU,EACV,YAAY,EACZ,MAAM,EACN,SAAS,EACV,MAAM,YAAY,CAAC;AAQpB,qBAAa,WAAY,SAAQ,KAAK;IAElC,QAAQ,CAAC,IAAI,EAAE,OAAO,GAAG,aAAa,GAAG,SAAS,GAAG,WAAW;gBAAvD,IAAI,EAAE,OAAO,GAAG,aAAa,GAAG,SAAS,GAAG,WAAW,EAChE,OAAO,EAAE,MAAM;CAKlB;AAED,qBAAa,eAAe;;IAC1B,QAAQ,CAAC,YAAY,sDAAgB;IACrC,QAAQ,CA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