@myrmidon/gve-core 3.0.3 → 5.0.1

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.
Files changed (29) hide show
  1. package/README.md +43 -0
  2. package/fesm2022/myrmidon-gve-core.mjs +697 -548
  3. package/fesm2022/myrmidon-gve-core.mjs.map +1 -1
  4. package/index.d.ts +1541 -3
  5. package/package.json +12 -11
  6. package/lib/components/animation-timeline/animation-timeline.component.d.ts +0 -61
  7. package/lib/components/animation-timeline-set/animation-timeline-set.component.d.ts +0 -52
  8. package/lib/components/animation-tween/animation-tween.component.d.ts +0 -58
  9. package/lib/components/base-text-char/base-text-char.component.d.ts +0 -42
  10. package/lib/components/base-text-editor/base-text-editor.component.d.ts +0 -42
  11. package/lib/components/base-text-view/base-text-view.component.d.ts +0 -69
  12. package/lib/components/batch-operation-editor/batch-operation-editor.component.d.ts +0 -44
  13. package/lib/components/chain-operation-editor/chain-operation-editor.component.d.ts +0 -149
  14. package/lib/components/chain-result-view/chain-result-view.component.d.ts +0 -58
  15. package/lib/components/chain-view/chain-view.component.d.ts +0 -42
  16. package/lib/components/feature-editor/feature-editor.component.d.ts +0 -82
  17. package/lib/components/feature-set-editor/feature-set-editor.component.d.ts +0 -76
  18. package/lib/components/feature-set-view/feature-set-view.component.d.ts +0 -54
  19. package/lib/components/ln-heights-editor/ln-heights-editor.component.d.ts +0 -41
  20. package/lib/components/operation-source-editor/operation-source-editor.component.d.ts +0 -52
  21. package/lib/components/snapshot-editor/snapshot-editor.component.d.ts +0 -293
  22. package/lib/components/snapshot-text-editor/snapshot-text-editor.component.d.ts +0 -37
  23. package/lib/components/steps-map/steps-map.component.d.ts +0 -48
  24. package/lib/models.d.ts +0 -15
  25. package/lib/services/gve-api.service.d.ts +0 -148
  26. package/lib/services/gve-graphviz.service.d.ts +0 -20
  27. package/lib/services/settings.service.d.ts +0 -89
  28. package/lib/validators/svg-validators.d.ts +0 -10
  29. package/public-api.d.ts +0 -21
package/index.d.ts CHANGED
@@ -1,5 +1,1543 @@
1
+ import { MatDialogConfig, MatDialogRef, MatDialog } from '@angular/material/dialog';
2
+ import * as _angular_core from '@angular/core';
3
+ import { OnInit, OnDestroy, ElementRef, AfterViewInit } from '@angular/core';
4
+ import { FormControl, FormGroup, FormBuilder } from '@angular/forms';
5
+ import { GveAnimationTimeline, GveAnimationTween, TweenType, CharNode, Feature, CharChainOperation, OperationFeature, LabeledId, FeatureSetPolicy, SnapshotBase, OperationSource, OperationType, SnapshotViewComponent, Snapshot, SnapshotViewData, GveVisualEvent, SnapshotViewRenderEvent } from '@myrmidon/gve-snapshot-view';
6
+ import { DialogService } from '@myrmidon/ngx-mat-tools';
7
+ import { HttpClient } from '@angular/common/http';
8
+ import { Observable } from 'rxjs';
9
+ import { ErrorService, EnvService } from '@myrmidon/ngx-tools';
10
+ import { Clipboard } from '@angular/cdk/clipboard';
11
+ import { MatSnackBar } from '@angular/material/snack-bar';
12
+
1
13
  /**
2
- * Generated bundle index. Do not edit.
14
+ * API call result wrapper.
3
15
  */
4
- /// <amd-module name="@myrmidon/gve-core" />
5
- export * from './public-api';
16
+ interface ResultWrapper<T> {
17
+ result?: T;
18
+ error?: string;
19
+ }
20
+ /**
21
+ * PayloadMatDialogConfig is a MatDialogConfig with a payload, used
22
+ * to pass data of type T to a dialog.
23
+ */
24
+ interface PayloadMatDialogConfig<T> extends MatDialogConfig {
25
+ payload?: T;
26
+ }
27
+
28
+ /**
29
+ * 🔑 `gve-animation-timeline`
30
+ *
31
+ * A component to edit an animation timeline.
32
+ * Used by the `gve-animation-timeline-set` component.
33
+ *
34
+ * - ▶️ `timeline` (`GveAnimationTimeline`): the animation timeline to edit.
35
+ * - ▶️ `elementIds` (`string[]`): the IDs of the elements that can be selected
36
+ * by the tween.
37
+ * - ▶️ `tags` (`string[]`): the tags that can be used by the timeline.
38
+ * - 🔥 `timelineChange` (`GveAnimationTimeline`): emitted when the timeline
39
+ * is changed.
40
+ * - 🔥 `timelineCancel` (`void`): emitted when the timeline editing is canceled.
41
+ */
42
+ declare class AnimationTimelineComponent {
43
+ /**
44
+ * The animation timeline to edit.
45
+ */
46
+ readonly timeline: _angular_core.ModelSignal<GveAnimationTimeline | undefined>;
47
+ /**
48
+ * The IDs of the elements that can be selected by the tween.
49
+ * This list is used to allow the user to select an element from a dropdown.
50
+ */
51
+ readonly elementIds: _angular_core.InputSignal<string[] | undefined>;
52
+ /**
53
+ * The tags that can be used by the timeline.
54
+ */
55
+ readonly tags: _angular_core.InputSignal<string[]>;
56
+ /**
57
+ * Emitted when the timeline is changed.
58
+ */
59
+ readonly timelineChange: _angular_core.OutputEmitterRef<GveAnimationTimeline>;
60
+ /**
61
+ * Emitted when the timeline editing is canceled.
62
+ */
63
+ readonly timelineCancel: _angular_core.OutputEmitterRef<void>;
64
+ readonly editedTweenIndex: _angular_core.WritableSignal<number>;
65
+ readonly editedTween: _angular_core.WritableSignal<GveAnimationTween | undefined>;
66
+ tag: FormControl<string>;
67
+ tweens: FormControl<GveAnimationTween[]>;
68
+ vars: FormControl<string | null>;
69
+ form: FormGroup;
70
+ constructor(formBuilder: FormBuilder);
71
+ private jsonValidator;
72
+ private updateForm;
73
+ addTween(): void;
74
+ editTween(index: number): void;
75
+ deleteTween(index: number): void;
76
+ closeTween(): void;
77
+ saveTween(tween?: GveAnimationTween): void;
78
+ moveTweenUp(index: number): void;
79
+ moveTweenDown(index: number): void;
80
+ private getTimeline;
81
+ close(): void;
82
+ save(): void;
83
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AnimationTimelineComponent, never>;
84
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AnimationTimelineComponent, "gve-animation-timeline", never, { "timeline": { "alias": "timeline"; "required": false; "isSignal": true; }; "elementIds": { "alias": "elementIds"; "required": false; "isSignal": true; }; "tags": { "alias": "tags"; "required": false; "isSignal": true; }; }, { "timeline": "timelineChange"; "timelineChange": "timelineChange"; "timelineCancel": "timelineCancel"; }, never, never, true, never>;
85
+ }
86
+
87
+ /**
88
+ * 🔑 `gve-animation-timeline-set`
89
+ *
90
+ * A component to edit a set of animation timelines.
91
+ * Used by the `gve-snapshot-editor` component.
92
+ *
93
+ * - ▶️ `timelines` (`GveAnimationTimeline[]`): the animation timelines to edit.
94
+ * - ▶️ `elementIds` (`string[]`): the IDs of the elements that can be selected by the tween.
95
+ * - ▶️ `tags` (`string[]`): the tags that can be used by the timeline.
96
+ * - 🔥 `timelinesChange` (`GveAnimationTimeline[]`): emitted when the timelines are changed.
97
+ * - 🔥 `timelinesCancel` (`void`): emitted when the timeline editing is canceled.
98
+ */
99
+ declare class AnimationTimelineSetComponent {
100
+ private _dialogService;
101
+ /**
102
+ * The animation timelines to edit.
103
+ */
104
+ readonly timelines: _angular_core.ModelSignal<GveAnimationTimeline[]>;
105
+ /**
106
+ * The IDs of the elements that can be selected by the tween.
107
+ * This list is used to allow the user to select an element from a dropdown.
108
+ */
109
+ readonly elementIds: _angular_core.InputSignal<string[] | undefined>;
110
+ /**
111
+ * The tags that can be used by the timeline.
112
+ */
113
+ readonly tags: _angular_core.InputSignal<string[]>;
114
+ /**
115
+ * Emitted when the timeline editing is canceled.
116
+ */
117
+ readonly timelinesCancel: _angular_core.OutputEmitterRef<void>;
118
+ readonly editedTimeline: _angular_core.WritableSignal<GveAnimationTimeline | undefined>;
119
+ readonly editedIndex: _angular_core.WritableSignal<number>;
120
+ constructor(_dialogService: DialogService);
121
+ closeTimeline(): void;
122
+ newTimeline(): void;
123
+ editTimeline(index: number): void;
124
+ onTimelineChange(timeline: GveAnimationTimeline): void;
125
+ deleteTimeline(index: number): void;
126
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AnimationTimelineSetComponent, never>;
127
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AnimationTimelineSetComponent, "gve-animation-timeline-set", never, { "timelines": { "alias": "timelines"; "required": false; "isSignal": true; }; "elementIds": { "alias": "elementIds"; "required": false; "isSignal": true; }; "tags": { "alias": "tags"; "required": false; "isSignal": true; }; }, { "timelines": "timelinesChange"; "timelinesCancel": "timelinesCancel"; }, never, never, true, never>;
128
+ }
129
+
130
+ /**
131
+ * 🔑 `gve-animation-tween`
132
+ *
133
+ * A component to edit an animation tween.
134
+ * Used by the `gve-animation-timeline` component.
135
+ *
136
+ * - ▶️ `tween` (`GveAnimationTween`): the tween to edit.
137
+ * - ▶️ `elementIds` (`string[]`): the IDs of the elements that can be selected by the tween.
138
+ * - 🔥 `tweenChange` (`GveAnimationTween`): emitted when the tween is changed.
139
+ * - 🔥 `tweenCancel` (`void`): emitted when the user cancels the edit.
140
+ */
141
+ declare class AnimationTweenComponent implements OnInit, OnDestroy {
142
+ private _sub?;
143
+ /**
144
+ * The tween to edit.
145
+ */
146
+ readonly tween: _angular_core.ModelSignal<GveAnimationTween | undefined>;
147
+ /**
148
+ * The IDs of the elements that can be selected by the tween.
149
+ * This list is used to allow the user to select an element from a dropdown.
150
+ */
151
+ readonly elementIds: _angular_core.InputSignal<string[] | undefined>;
152
+ /**
153
+ * Emitted when the user cancels the edit.
154
+ */
155
+ readonly tweenCancel: _angular_core.OutputEmitterRef<void>;
156
+ readonly types: string[];
157
+ label: FormControl<string>;
158
+ note: FormControl<string | null>;
159
+ type: FormControl<TweenType>;
160
+ selector: FormControl<string>;
161
+ vars: FormControl<string>;
162
+ vars2: FormControl<string | null>;
163
+ position: FormControl<string | null>;
164
+ form: FormGroup;
165
+ elementId: FormControl<string | null>;
166
+ constructor(formBuilder: FormBuilder);
167
+ ngOnInit(): void;
168
+ ngOnDestroy(): void;
169
+ onVarsChange(vars: string): void;
170
+ onVars2Change(vars: string): void;
171
+ close(): void;
172
+ private jsonValidator;
173
+ private updateForm;
174
+ private getTween;
175
+ openUrl(url: string): void;
176
+ save(): void;
177
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AnimationTweenComponent, never>;
178
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AnimationTweenComponent, "gve-animation-tween", never, { "tween": { "alias": "tween"; "required": false; "isSignal": true; }; "elementIds": { "alias": "elementIds"; "required": false; "isSignal": true; }; }, { "tween": "tweenChange"; "tweenCancel": "tweenCancel"; }, never, never, true, never>;
179
+ }
180
+
181
+ /**
182
+ * A single character from a base text.
183
+ */
184
+ interface BaseTextChar {
185
+ id: number;
186
+ value: string;
187
+ label: string;
188
+ color: string;
189
+ oldColor?: string;
190
+ borderColor: string;
191
+ oldBorderColor?: string;
192
+ emSize: number;
193
+ }
194
+ /**
195
+ * Event emitted by the base text character component when a character
196
+ * is clicked.
197
+ */
198
+ interface BaseTextCharEvent {
199
+ char: BaseTextChar;
200
+ event: MouseEvent;
201
+ }
202
+ /**
203
+ * 🔑 `gve-base-text-char`
204
+ *
205
+ * A component that displays a single character from a base text.
206
+ * Used by `gve-base-text-view`.
207
+ */
208
+ declare class BaseTextCharComponent {
209
+ /**
210
+ * The character to display.
211
+ */
212
+ readonly char: _angular_core.InputSignal<BaseTextChar | undefined>;
213
+ /**
214
+ * Emitted when the character is clicked.
215
+ */
216
+ readonly charPick: _angular_core.OutputEmitterRef<BaseTextCharEvent>;
217
+ readonly defaultColor = "#D8D8D8";
218
+ readonly defaultBorderColor = "#D8D8D8";
219
+ readonly defaultEmSize = 1.5;
220
+ onCharClick(event: MouseEvent): void;
221
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<BaseTextCharComponent, never>;
222
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<BaseTextCharComponent, "gve-base-text-char", never, { "char": { "alias": "char"; "required": false; "isSignal": true; }; }, { "charPick": "charPick"; }, never, never, true, never>;
223
+ }
224
+
225
+ /**
226
+ * A range in the base text.
227
+ */
228
+ interface VarBaseTextRange {
229
+ at: number;
230
+ run: number;
231
+ }
232
+ /**
233
+ * 🔑 `gve-base-text-view`
234
+ *
235
+ * A component to display a selectable base text. Its input is either a string or an
236
+ * array of `CharNode`'s.
237
+ * Used by the chain result view component and the base text editor component.
238
+ *
239
+ * - ▶️ `defaultColor` (`string`): the default color for the text.
240
+ * - ▶️ `colorCallback` (callback): an optional callback to get the color of a
241
+ * character node.
242
+ * - ▶️ `defaultBorderColor` (`string`): the default border color for the text.
243
+ * - ▶️ `borderColorCallback` (callback): an optional callback to get the border color
244
+ * of a character node.
245
+ * - ▶️ `selectionColor` (`string`): the color for the selected text.
246
+ * - ▶️ `hasLineNumber` (`boolean`): true if line numbers should be displayed next
247
+ * to each line.
248
+ * - ▶️ `text` (`string` | `CharNode[]`): the text to display.
249
+ * - 🔥 `charPick` (`BaseTextCharEvent`): emitted when a character is picked.
250
+ * - 🔥 `rangePick` (`VarBaseTextRange`): emitted when a range is picked.
251
+ */
252
+ declare class BaseTextViewComponent {
253
+ private _lastSelectedChar?;
254
+ /**
255
+ * The default color for the text.
256
+ */
257
+ readonly defaultColor: _angular_core.InputSignal<string>;
258
+ /**
259
+ * The default border color for the text.
260
+ */
261
+ readonly defaultBorderColor: _angular_core.InputSignal<string>;
262
+ /**
263
+ * The color for the selected text.
264
+ */
265
+ readonly selectionColor: _angular_core.InputSignal<string>;
266
+ /**
267
+ * True if line numbers should be displayed next to each line.
268
+ */
269
+ readonly hasLineNumber: _angular_core.InputSignal<boolean>;
270
+ /**
271
+ * The text to display.
272
+ */
273
+ readonly text: _angular_core.InputSignal<CharNode[]>;
274
+ /**
275
+ * An optional callback to get the color of a character node.
276
+ * Return null to use the default color.
277
+ */
278
+ readonly colorCallback: _angular_core.InputSignal<((node: CharNode) => string | null) | undefined>;
279
+ /**
280
+ * An optional callback to get the color of a character node.
281
+ * Return null to use the default color.
282
+ */
283
+ readonly borderColorCallback: _angular_core.InputSignal<((node: CharNode) => string | null) | undefined>;
284
+ /**
285
+ * Emitted when a character is picked.
286
+ */
287
+ readonly charPick: _angular_core.OutputEmitterRef<BaseTextCharEvent>;
288
+ /**
289
+ * Emitted when a range is picked. This is preceded by a character pick event.
290
+ * The range is defined by the starting character and the number of characters.
291
+ * The range is inclusive.
292
+ */
293
+ readonly rangePick: _angular_core.OutputEmitterRef<VarBaseTextRange>;
294
+ readonly lines: _angular_core.WritableSignal<BaseTextChar[][]>;
295
+ constructor();
296
+ private buildLines;
297
+ private resetColors;
298
+ onCharPick(event: BaseTextCharEvent): void;
299
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<BaseTextViewComponent, never>;
300
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<BaseTextViewComponent, "gve-base-text-view", never, { "defaultColor": { "alias": "defaultColor"; "required": false; "isSignal": true; }; "defaultBorderColor": { "alias": "defaultBorderColor"; "required": false; "isSignal": true; }; "selectionColor": { "alias": "selectionColor"; "required": false; "isSignal": true; }; "hasLineNumber": { "alias": "hasLineNumber"; "required": false; "isSignal": true; }; "text": { "alias": "text"; "required": false; "isSignal": true; }; "colorCallback": { "alias": "colorCallback"; "required": false; "isSignal": true; }; "borderColorCallback": { "alias": "borderColorCallback"; "required": false; "isSignal": true; }; }, { "charPick": "charPick"; "rangePick": "rangePick"; }, never, never, true, never>;
301
+ }
302
+
303
+ /**
304
+ * 🔑 `gve-base-text-editor`
305
+ *
306
+ * Editor for snapshot's base text. This can receive a string or an array
307
+ * of `CharNode` objects, and lets the user edit the text, character by
308
+ * character, optionally also setting its features.
309
+ *
310
+ * Used by the `gve-snapshot-editor` component.
311
+ */
312
+ declare class BaseTextEditorComponent {
313
+ private _dialogService;
314
+ /**
315
+ * The text to edit. In input this can be a string, an array of `CharNode`
316
+ * objects, or undefined. In output this will be an array of `CharNode`
317
+ * objects.
318
+ */
319
+ readonly text: _angular_core.InputSignalWithTransform<CharNode[] | undefined, string | CharNode[] | undefined>;
320
+ /**
321
+ * Emitted for the edited text as an array of `CharNode`'s whenever it changes.
322
+ */
323
+ readonly textChange: _angular_core.OutputEmitterRef<CharNode[]>;
324
+ readonly selectedChar: _angular_core.WritableSignal<CharNode | undefined>;
325
+ readonly selectedCharLabel: _angular_core.WritableSignal<string | undefined>;
326
+ readonly textRange: _angular_core.WritableSignal<VarBaseTextRange | undefined>;
327
+ userText: FormControl<string>;
328
+ form: FormGroup;
329
+ constructor(formBuilder: FormBuilder, _dialogService: DialogService);
330
+ private resetSelectedChar;
331
+ onSelectedChar(event: BaseTextCharEvent): void;
332
+ onFeaturesChange(features: Feature[]): void;
333
+ onRangePick(range: VarBaseTextRange): void;
334
+ patchTextFromUser(): void;
335
+ setTextFromUser(): void;
336
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<BaseTextEditorComponent, never>;
337
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<BaseTextEditorComponent, "gve-base-text-editor", never, { "text": { "alias": "text"; "required": true; "isSignal": true; }; }, { "textChange": "textChange"; }, never, never, true, never>;
338
+ }
339
+
340
+ /**
341
+ * Execution step of a char-based chain operation.
342
+ */
343
+ interface ChainOperationContextStep {
344
+ /**
345
+ * The operation that was executed.
346
+ */
347
+ operation: CharChainOperation;
348
+ /**
349
+ * The input version tag.
350
+ */
351
+ inputTag: string;
352
+ /**
353
+ * The output version tag.
354
+ */
355
+ outputTag: string;
356
+ /**
357
+ * The string synthetically representing the resulting text
358
+ * version.
359
+ */
360
+ result?: string;
361
+ /**
362
+ * The features emitted up to the executed operation.
363
+ * These are the features of the text as a whole, and
364
+ * those belonging to specific nodes, each keyed under
365
+ * a string built with `v` + output version tag + `_`
366
+ * + node ID (e.g. `v1_2` for node with ID 2 at version 1).
367
+ */
368
+ featureSet: {
369
+ features: OperationFeature[];
370
+ nodeFeatures: Record<string, OperationFeature[]>;
371
+ };
372
+ /**
373
+ * The reference node IDs of the operation which was
374
+ * executed.
375
+ */
376
+ refNodeIds: number[];
377
+ }
378
+ /**
379
+ * Result of execution of a char-based chain.
380
+ */
381
+ interface CharChainResult {
382
+ /**
383
+ * The execution steps of the chain.
384
+ */
385
+ steps: ChainOperationContextStep[];
386
+ /**
387
+ * The chain dump, which is the text representation of the chain.
388
+ */
389
+ chainDump: string;
390
+ /**
391
+ * The list of all unique tags in the chain.
392
+ */
393
+ chainTags: string[];
394
+ /**
395
+ * The sets of nodes in their order, for each version tag.
396
+ * These nodes are collected by following the path defined
397
+ * by the set of links of each version tag; so each of the
398
+ * sets contains only the nodes used at that step to build
399
+ * the text version, with their features up to that stage.
400
+ */
401
+ taggedNodes: {
402
+ [key: string]: CharNode[];
403
+ };
404
+ }
405
+ /**
406
+ * The input and output tags of a char-based chain operation.
407
+ */
408
+ interface ChainOperationTags {
409
+ inputTag: string;
410
+ outputTag: string;
411
+ }
412
+ /**
413
+ * The node of a character-based chain, used for diagnostic
414
+ * or demonstration purposes.
415
+ */
416
+ interface CharChainNode {
417
+ id: number;
418
+ label: string;
419
+ data: string;
420
+ sourceTag?: string;
421
+ }
422
+ /**
423
+ * The link of a character-based chain, used for diagnostic
424
+ * or demonstration purposes.
425
+ */
426
+ interface CharChainLink {
427
+ tag: string;
428
+ sourceId: number;
429
+ targetId: number;
430
+ }
431
+ /**
432
+ * The character-based chain, as resulting from running operations
433
+ * on a base text, used for diagnostic or demonstration purposes.
434
+ */
435
+ interface CharChain {
436
+ nodes: CharChainNode[];
437
+ links: CharChainLink[];
438
+ }
439
+ /**
440
+ * Service to interact with the GVE API.
441
+ */
442
+ declare class GveApiService {
443
+ private _http;
444
+ private _error;
445
+ private _env;
446
+ constructor(_http: HttpClient, _error: ErrorService, _env: EnvService);
447
+ /**
448
+ * Parse the specified text into operations. Each operation is a line
449
+ * of the text.
450
+ * @param text The text to parse.
451
+ * @returns The operations.
452
+ */
453
+ parseOperations(text: string): Observable<ResultWrapper<CharChainOperation[]>>;
454
+ /**
455
+ * Run operations on the specified text.
456
+ *
457
+ * @param text The base text.
458
+ * @param operations The operations to run.
459
+ * @returns Result wrapper.
460
+ */
461
+ runOperations(text: CharNode[], operations: CharChainOperation[]): Observable<ResultWrapper<CharChainResult>>;
462
+ /**
463
+ * Get the input and output tags for the given operations.
464
+ *
465
+ * @param operations The operations.
466
+ * @returns Result wrapper.
467
+ */
468
+ getTags(operations: CharChainOperation[]): Observable<ResultWrapper<string[]>>;
469
+ /**
470
+ * Get the chain corresponding to the operations run on the
471
+ * specified text. This is used for diagnostic or demonstration
472
+ * purposes.
473
+ *
474
+ * @param text The base text.
475
+ * @param operations The operations to run.
476
+ * @returns Result wrapper.
477
+ */
478
+ getChain(text: CharNode[], operations: CharChainOperation[]): Observable<ResultWrapper<CharChain>>;
479
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<GveApiService, never>;
480
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<GveApiService>;
481
+ }
482
+
483
+ /**
484
+ * 🔑 `gve-batch-operation-editor`
485
+ *
486
+ * A component to edit a batch of operations. This component can be used both in a dialog
487
+ * and as a standalone component.
488
+ *
489
+ * - ▶️ `preset` (`string`): the optional preset text to parse.
490
+ * - 🔥 `operationsChange` (`CharChainOperation[]`): event emitted when operations change.
491
+ */
492
+ declare class BatchOperationEditorComponent implements OnInit {
493
+ private _api;
494
+ dialogRef?: MatDialogRef<BatchOperationEditorComponent> | undefined;
495
+ data?: PayloadMatDialogConfig<{
496
+ preset?: string;
497
+ }> | undefined;
498
+ readonly busy: _angular_core.WritableSignal<boolean>;
499
+ readonly parseError: _angular_core.WritableSignal<string | undefined>;
500
+ text: FormControl<string | null>;
501
+ form: FormGroup;
502
+ /**
503
+ * The preset text to parse if any. Usually you start with a blank
504
+ * text, but sometimes you might want to pre-set it.
505
+ */
506
+ readonly preset: _angular_core.InputSignal<string | undefined>;
507
+ /**
508
+ * Emitted when operations change.
509
+ */
510
+ readonly operationsChange: _angular_core.OutputEmitterRef<CharChainOperation[]>;
511
+ constructor(formBuilder: FormBuilder, _api: GveApiService, dialogRef?: MatDialogRef<BatchOperationEditorComponent> | undefined, data?: PayloadMatDialogConfig<{
512
+ preset?: string;
513
+ }> | undefined);
514
+ ngOnInit(): void;
515
+ parseOperations(text?: string): void;
516
+ close(): void;
517
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<BatchOperationEditorComponent, [null, null, { optional: true; }, { optional: true; }]>;
518
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<BatchOperationEditorComponent, "gve-batch-operation-editor", never, { "preset": { "alias": "preset"; "required": false; "isSignal": true; }; }, { "operationsChange": "operationsChange"; }, never, never, true, never>;
519
+ }
520
+
521
+ /**
522
+ * Service to store and retrieve dynamic settings.
523
+ */
524
+ declare class SettingsService {
525
+ private readonly _cache;
526
+ private readonly _subject;
527
+ /**
528
+ * Observable emitting the key of the setting that has changed.
529
+ */
530
+ get settingChange$(): Observable<string | null>;
531
+ /**
532
+ * Prefix to scope the keys. This prefix is used internally to scope the keys
533
+ * so that they cannot conflict with other keys in the local storage.
534
+ * The prefix is totally transparent to the user of the service, who should
535
+ * use the keys without the prefix.
536
+ */
537
+ keyPrefix?: string;
538
+ /**
539
+ * True to persist the settings in the local storage by default.
540
+ */
541
+ persistDefault: boolean;
542
+ /**
543
+ * Scopes the key by prefixing it with the keyPrefix if any.
544
+ *
545
+ * @param key The key to scope.
546
+ * @returns The scoped key.
547
+ */
548
+ private getScopedKey;
549
+ private isPersist;
550
+ /**
551
+ * Sets a setting's value.
552
+ *
553
+ * @param key The key.
554
+ * @param value The value.
555
+ * @param persist True to persist this setting in local storage.
556
+ */
557
+ set(key: string, value: any, persist?: boolean): void;
558
+ /**
559
+ * Set multiple settings at once from the specified settings object.
560
+ *
561
+ * @param settings The settings to set.
562
+ * @param persist True to persist these settings in local storage.
563
+ */
564
+ setFrom(settings: {
565
+ [key: string]: any;
566
+ } | undefined | null, persist?: boolean): void;
567
+ /**
568
+ * Get a setting's value of type T.
569
+ *
570
+ * @param key The key.
571
+ * @param defaultValue The default value to get when the setting
572
+ * is not found in the store.
573
+ * @returns The value.
574
+ */
575
+ get<T>(key: string, defaultValue?: any, persist?: boolean): T;
576
+ /**
577
+ * Check if a key exists in the store.
578
+ *
579
+ * @param key The key.
580
+ * @param persist True to check if the key exists in local storage.
581
+ * @returns True if the key exists in the store.
582
+ */
583
+ contains(key: string, persist?: boolean): boolean;
584
+ /**
585
+ * Get all the keys of the settings in the store.
586
+ *
587
+ * @param persist True to include keys from local storage.
588
+ * @returns The keys of the settings in the store.
589
+ */
590
+ getKeys(persist?: boolean): string[];
591
+ /**
592
+ * Remove a setting if present.
593
+ *
594
+ * @param key The key.
595
+ * @param persist True to remove the setting from local storage.
596
+ */
597
+ remove(key: string, persist?: boolean): void;
598
+ /**
599
+ * Clear all settings. Warning: this will remove all settings from the
600
+ * local storage if no key prefix is set.
601
+ *
602
+ * @param persist True to remove all settings from local storage.
603
+ */
604
+ clear(persist?: boolean): void;
605
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SettingsService, never>;
606
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<SettingsService>;
607
+ }
608
+
609
+ /**
610
+ * Features map. This is used for features from closed sets,
611
+ * and lists the possible values for each feature.
612
+ * The key is the feature name, and the value is an array of
613
+ * labeled IDs representing the allowed values for that feature.
614
+ */
615
+ interface FeatureMap {
616
+ [key: string]: LabeledId[];
617
+ }
618
+ /**
619
+ * 🔑 `gve-feature-editor`
620
+ *
621
+ * Component for editing a single feature, whose model is a name=value
622
+ * pair, plus a set policy value which defines the desired behavior
623
+ * when adding that feature to a set.
624
+ * Used by `gve-feature-set-editor`.
625
+ *
626
+ * - ▶️ `feature` (`Feature`): the feature to edit.
627
+ * - ▶️ `featNames` (`LabeledId[]`): the list of feature names to display
628
+ * in the _name_ selection. This is used when you have a closed list of
629
+ * features. Each item in the list is an object with _id_ and _label_
630
+ * properties.
631
+ * - ▶️ `featValues` (`FeatureMap`): the feature values map. When
632
+ * specified and the user selects a feature name present in the map keys,
633
+ * the corresponding values will be used to populate the value selection.
634
+ * - 🔥 `featureChange` (`Feature`): emitted when feature has changed.
635
+ * - 🔥 `featureCancel`: emitted when the user cancels the feature editing.
636
+ */
637
+ declare class FeatureEditorComponent implements OnInit, OnDestroy {
638
+ private _sub?;
639
+ private _frozen?;
640
+ nameControl?: ElementRef;
641
+ /**
642
+ * The list of feature names to display in the name selection.
643
+ * This is used when you have a closed list of features.
644
+ */
645
+ readonly featNames: _angular_core.InputSignal<LabeledId[] | undefined>;
646
+ /**
647
+ * The feature values map. When specified and the user selects a feature
648
+ * name present in the map keys, the corresponding values will be used
649
+ * to populate the value selection.
650
+ */
651
+ readonly featValues: _angular_core.InputSignal<FeatureMap | undefined>;
652
+ /**
653
+ * The feature to edit.
654
+ */
655
+ readonly feature: _angular_core.ModelSignal<Feature | OperationFeature | undefined>;
656
+ /**
657
+ * True if the feature is a variant operation feature, which has
658
+ * additional properties like negation, global, and short-lived.
659
+ */
660
+ readonly isVar: _angular_core.InputSignal<boolean>;
661
+ /**
662
+ * Event emitted when the user cancels the feature editing.
663
+ */
664
+ readonly featureCancel: _angular_core.OutputEmitterRef<void>;
665
+ readonly nameIds: _angular_core.WritableSignal<LabeledId[] | undefined>;
666
+ name: FormControl<string>;
667
+ value: FormControl<string>;
668
+ setPolicy: FormControl<FeatureSetPolicy>;
669
+ isNegated: FormControl<boolean>;
670
+ isGlobal: FormControl<boolean>;
671
+ isShortLived: FormControl<boolean>;
672
+ form: FormGroup;
673
+ constructor(formBuilder: FormBuilder);
674
+ ngOnInit(): void;
675
+ ngOnDestroy(): void;
676
+ private getLabeledIdsFor;
677
+ private updateForm;
678
+ cancel(): void;
679
+ save(): void;
680
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<FeatureEditorComponent, never>;
681
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<FeatureEditorComponent, "gve-feature-editor", never, { "featNames": { "alias": "featNames"; "required": false; "isSignal": true; }; "featValues": { "alias": "featValues"; "required": false; "isSignal": true; }; "feature": { "alias": "feature"; "required": false; "isSignal": true; }; "isVar": { "alias": "isVar"; "required": false; "isSignal": true; }; }, { "feature": "featureChange"; "featureCancel": "featureCancel"; }, never, never, true, never>;
682
+ }
683
+
684
+ /**
685
+ * Definitions for features, including names and values.
686
+ */
687
+ interface FeatureDefinitions {
688
+ /**
689
+ * The list of feature names to display in the name selection.
690
+ * This is used when you have a closed list of features.
691
+ */
692
+ names?: LabeledId[];
693
+ /**
694
+ * The feature values map. When specified and the user selects a feature
695
+ * name present in the map keys, the corresponding values will be used
696
+ * to populate the value selection.
697
+ */
698
+ values?: FeatureMap;
699
+ }
700
+ /**
701
+ * 🔑 `gve-chain-operation-editor`
702
+ *
703
+ * A component for editing a variant generation operation.
704
+ * Used by the `gve-snapshot-editor` component.
705
+ * - ▶️ `operation` (`CharChainOperation`): the operation to edit.
706
+ * - ▶️ `snapshot` (`SnapshotBase`): the snapshot the operation refers to.
707
+ * - ▶️ `hidePreview` (`boolean`): whether to hide the preview request button.
708
+ * - 🔥 `operationChange` (`CharChainOperation`): emitted when the operation
709
+ * is changed.
710
+ * - 🔥 `operationPreview` (`CharChainOperation`): emitted when the operation
711
+ * preview is requested.
712
+ * - 🔥 `operationCancel` (`void`): emitted when operation editing is cancelled.
713
+ *
714
+ * The editor is composed of many sections:
715
+ * - **general**:
716
+ * - ID: each operation has an ID, automatically assigned. This is not used in
717
+ * the context of the operation or of its transformations, but is provided as a
718
+ * reference.
719
+ * - at and run: coordinates for the selection of the base text targeted by
720
+ * this operation. Check `idx` when `at` is index-based rather than ID-based.
721
+ * - to and to-run: a second coordinate, used by some operations.
722
+ * - value: the text value argument, for those operations requiring it.
723
+ * - rank and group ID.
724
+ * - input and output tags.
725
+ * - features. These are metadata attached to this operation, and can be any
726
+ * type of name=value pairs.
727
+ * - **sources**: sources are a special type of metadata used when your text
728
+ * versions come from more than a single source. In this case, you can specify
729
+ * the source(s) for each operation, just like in a traditional apparatus you
730
+ * specify witnesses for each variant. Each source has an ID, a type, a
731
+ * probability rank (0=not specified, else 1-N), and an optional free text note.
732
+ * - **diplomatic**: SVG `g` code. The diplomatic section is the approximate
733
+ * diplomatic representation of the layout of the annotated text. It essentially
734
+ * consists in a freely editable SVG code, always grouped into a single root `g`
735
+ * element, encoding all the graphical traits representing this operation.
736
+ * The visual part of each operation can be placed everywhere on the snapshot,
737
+ * as specified by its coordinates.
738
+ * - **elements**: features of any of the SVG code elements having an ID.
739
+ * The elements section lists all the SVG elements having an `id` attribute in
740
+ * the SVG code of the diplomatic section. The ID allows you to attach
741
+ * any number of features (metadata modeled as name=value pairs) to each of
742
+ * these elements. Among these features, you may use `style` or `class` for
743
+ * renditional purposes, and any other name for your own metadata. Note that
744
+ * element IDs will be required also when dealing with animations. So, ensure
745
+ * to assign an ID to each element you want to animate.
746
+ * - **dp feats**: diplomatic features: these are features (metadata modeled
747
+ * as name=value pairs) for the diplomatic representation of this operation
748
+ * as a whole.
749
+ */
750
+ declare class ChainOperationEditorComponent implements OnInit, OnDestroy {
751
+ private _clipboard;
752
+ private _settings;
753
+ private _dialogService;
754
+ private readonly _disposables;
755
+ private readonly _subs;
756
+ private readonly _nanoid;
757
+ private _editorModel?;
758
+ private _editor?;
759
+ /**
760
+ * The operation to edit.
761
+ */
762
+ readonly operation: _angular_core.ModelSignal<CharChainOperation | undefined>;
763
+ /**
764
+ * The snapshot the operation refers to.
765
+ */
766
+ readonly snapshot: _angular_core.InputSignal<SnapshotBase | undefined>;
767
+ /**
768
+ * Whether to hide the preview request button.
769
+ */
770
+ readonly hidePreview: _angular_core.InputSignal<boolean | undefined>;
771
+ /**
772
+ * Definitions for features, including names and values.
773
+ */
774
+ readonly featureDefs: _angular_core.InputSignal<FeatureDefinitions | undefined>;
775
+ /**
776
+ * Definitions for element features, including names and values.
777
+ */
778
+ readonly elementFeatureDefs: _angular_core.InputSignal<FeatureDefinitions | undefined>;
779
+ /**
780
+ * Definitions for diplomatic features, including names and values.
781
+ */
782
+ readonly diplomaticFeatureDefs: _angular_core.InputSignal<FeatureDefinitions | undefined>;
783
+ /**
784
+ * Emitted when the operation is changed.
785
+ */
786
+ readonly operationChange: _angular_core.OutputEmitterRef<CharChainOperation>;
787
+ /**
788
+ * Emitted when the operation preview is requested.
789
+ */
790
+ readonly operationPreview: _angular_core.OutputEmitterRef<CharChainOperation>;
791
+ /**
792
+ * Emitted when operation editing is cancelled.
793
+ */
794
+ readonly operationCancel: _angular_core.OutputEmitterRef<void>;
795
+ readonly tabIndex: _angular_core.WritableSignal<number>;
796
+ readonly id: _angular_core.WritableSignal<string | undefined>;
797
+ readonly hasTo: _angular_core.WritableSignal<boolean>;
798
+ readonly hasToRun: _angular_core.WritableSignal<boolean>;
799
+ readonly hasValue: _angular_core.WritableSignal<boolean>;
800
+ readonly elements: _angular_core.WritableSignal<SVGElement[]>;
801
+ readonly editedElementId: _angular_core.WritableSignal<string | undefined>;
802
+ readonly editedSource: _angular_core.WritableSignal<OperationSource | undefined>;
803
+ readonly editedSourceIndex: _angular_core.WritableSignal<number>;
804
+ rank: FormControl<number>;
805
+ groupId: FormControl<string | null>;
806
+ features: FormControl<Feature[]>;
807
+ sources: FormControl<OperationSource[]>;
808
+ type: FormControl<OperationType>;
809
+ at: FormControl<number>;
810
+ atAsIndex: FormControl<boolean>;
811
+ to: FormControl<number>;
812
+ toAsIndex: FormControl<boolean>;
813
+ inputTag: FormControl<string | null>;
814
+ outputTag: FormControl<string | null>;
815
+ run: FormControl<number>;
816
+ toRun: FormControl<number>;
817
+ value: FormControl<string | null>;
818
+ svg: FormControl<string>;
819
+ elementFeatures: FormControl<Record<string, Feature[]>>;
820
+ newTextHidden: FormControl<boolean>;
821
+ dpFeatures: FormControl<Feature[]>;
822
+ form: FormGroup;
823
+ constructor(formBuilder: FormBuilder, _clipboard: Clipboard, _settings: SettingsService, _dialogService: DialogService);
824
+ ngOnInit(): void;
825
+ ngOnDestroy(): void;
826
+ private hasTextChanges;
827
+ onCreateEditor(editor: monaco.editor.IEditor): void;
828
+ onFeaturesChange(features: OperationFeature[]): void;
829
+ onDpFeaturesChange(features: Feature[]): void;
830
+ addSource(): void;
831
+ editSource(index: number): void;
832
+ closeSource(): void;
833
+ onSourceChange(source: OperationSource): void;
834
+ saveSvg(): void;
835
+ openSvgEditor(): void;
836
+ loadSvg(): void;
837
+ setSvgFromClipboard(): void;
838
+ private parseSvg;
839
+ removeDecimals(): void;
840
+ wrapInGroup(): void;
841
+ onTabIndexChange(index: number): void;
842
+ editElementFeatures(element: SVGElement): void;
843
+ deleteElementFeatures(element: SVGElement): void;
844
+ onElementFeaturesChange(features: Feature[]): void;
845
+ private updateArgsUI;
846
+ private updateForm;
847
+ cancel(): void;
848
+ private getOperation;
849
+ requestPreview(): void;
850
+ save(): void;
851
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChainOperationEditorComponent, never>;
852
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChainOperationEditorComponent, "gve-chain-operation-editor", never, { "operation": { "alias": "operation"; "required": false; "isSignal": true; }; "snapshot": { "alias": "snapshot"; "required": false; "isSignal": true; }; "hidePreview": { "alias": "hidePreview"; "required": false; "isSignal": true; }; "featureDefs": { "alias": "featureDefs"; "required": false; "isSignal": true; }; "elementFeatureDefs": { "alias": "elementFeatureDefs"; "required": false; "isSignal": true; }; "diplomaticFeatureDefs": { "alias": "diplomaticFeatureDefs"; "required": false; "isSignal": true; }; }, { "operation": "operationChange"; "operationChange": "operationChange"; "operationPreview": "operationPreview"; "operationCancel": "operationCancel"; }, never, never, true, never>;
853
+ }
854
+
855
+ /**
856
+ * 🔑 `gve-chain-result-view`
857
+ *
858
+ * Component to display a chain result. This provides a version picker
859
+ * by staged version or simple step, and shows the selected step's text
860
+ * and features, plus a steps map. User can pick a step from both the
861
+ * pickers or the map.
862
+ * Used by the `gve-snapshot-editor` component.
863
+ *
864
+ * - ▶️ `result` (`CharChainResult`): the result to display.
865
+ * - 🔥 `stepPick` (`ChainOperationContextStep`): emitted when a
866
+ * result's step is picked by the user.
867
+ */
868
+ declare class ChainResultViewComponent implements OnInit, OnDestroy, AfterViewInit {
869
+ private _subs?;
870
+ private _stepSelectionDone;
871
+ private _viewInitialized;
872
+ /**
873
+ * The result to display.
874
+ */
875
+ readonly result: _angular_core.InputSignal<CharChainResult | undefined>;
876
+ /**
877
+ * The index of the initial step to display after the result is set.
878
+ * If the index is negative, it is counted from the end of the steps.
879
+ */
880
+ readonly initialStepIndex: _angular_core.InputSignal<number | undefined>;
881
+ /**
882
+ * Emitted when a result's step is picked by the user.
883
+ */
884
+ readonly stepPick: _angular_core.OutputEmitterRef<ChainOperationContextStep>;
885
+ readonly versionTags: _angular_core.WritableSignal<string[]>;
886
+ readonly tags: _angular_core.WritableSignal<string[]>;
887
+ readonly step: _angular_core.WritableSignal<ChainOperationContextStep | undefined>;
888
+ readonly selection: _angular_core.WritableSignal<string | undefined>;
889
+ readonly selectionFeatures: _angular_core.WritableSignal<OperationFeature[]>;
890
+ versionTag: FormControl<string | null>;
891
+ tag: FormControl<string | null>;
892
+ constructor(formBuilder: FormBuilder);
893
+ private doInitialStepSelection;
894
+ ngOnInit(): void;
895
+ ngAfterViewInit(): void;
896
+ getCharColor(node: CharNode): string | null;
897
+ private selectInitialStep;
898
+ ngOnDestroy(): void;
899
+ private updateVersionTags;
900
+ private getTagFromVersion;
901
+ private updateForm;
902
+ private getNodeFeatures;
903
+ private findNode;
904
+ onTextCharPick(event: BaseTextCharEvent): void;
905
+ onTextRangePick(range: VarBaseTextRange): void;
906
+ onStepChange(step?: ChainOperationContextStep): void;
907
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChainResultViewComponent, never>;
908
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChainResultViewComponent, "gve-chain-result-view", never, { "result": { "alias": "result"; "required": false; "isSignal": true; }; "initialStepIndex": { "alias": "initialStepIndex"; "required": false; "isSignal": true; }; }, { "stepPick": "stepPick"; }, never, never, true, never>;
909
+ }
910
+
911
+ type GraphvizRankdir = 'TB' | 'LR' | 'BT' | 'RL';
912
+ declare class GveGraphvizService {
913
+ private hashString;
914
+ private hslToRgb;
915
+ private getColorForTag;
916
+ private getExcludedNodeIds;
917
+ /**
918
+ * Represent the received chain as a Graphviz digraph.
919
+ *
920
+ * @param chain The source chain if any.
921
+ * @param tags The tags to show. When set, only the links with these tags are shown.
922
+ * @param rankdir The rank direction.
923
+ * @returns Graphviz representation of the chain.
924
+ */
925
+ generateGraph(chain?: CharChain, tags?: string[], rankdir?: GraphvizRankdir): string;
926
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<GveGraphvizService, never>;
927
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<GveGraphvizService>;
928
+ }
929
+
930
+ declare class ChainViewComponent implements OnDestroy {
931
+ private _graphviz;
932
+ private _settings;
933
+ private _clipboard;
934
+ private _snackbar;
935
+ private readonly _sub?;
936
+ /**
937
+ * The chain to display.
938
+ */
939
+ readonly chain: _angular_core.InputSignal<CharChain | undefined>;
940
+ /**
941
+ * The direction of the graph.
942
+ */
943
+ readonly direction: _angular_core.InputSignal<GraphvizRankdir>;
944
+ /**
945
+ * All the distinct tags in the chain.
946
+ */
947
+ readonly tags: _angular_core.Signal<string[]>;
948
+ /**
949
+ * The tags to show, or empty to show all of them.
950
+ */
951
+ readonly selectedTags: _angular_core.ModelSignal<string[]>;
952
+ /**
953
+ * The Graphviz representation of the chain.
954
+ */
955
+ readonly graph: _angular_core.Signal<string>;
956
+ userTags: FormControl<string[]>;
957
+ constructor(_graphviz: GveGraphvizService, _settings: SettingsService, _clipboard: Clipboard, _snackbar: MatSnackBar);
958
+ ngOnDestroy(): void;
959
+ copyGraph(): void;
960
+ openExternalEditor(): void;
961
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChainViewComponent, never>;
962
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChainViewComponent, "gve-chain-view", never, { "chain": { "alias": "chain"; "required": false; "isSignal": true; }; "direction": { "alias": "direction"; "required": false; "isSignal": true; }; "selectedTags": { "alias": "selectedTags"; "required": false; "isSignal": true; }; }, { "selectedTags": "selectedTagsChange"; }, never, never, true, never>;
963
+ }
964
+
965
+ /**
966
+ * 🔑 `gve-feature-set-editor`
967
+ *
968
+ * Component for editing a set of features. It shows a list of features,
969
+ * allowing to edit each of them or adding new ones. Optionally you can
970
+ * specify a list of feature names and values to use in the selection.
971
+ * Used by base text editor and chain operation editor components.
972
+ *
973
+ * - ▶️ `featNames` (`LabeledId[]`): the list of feature names to display
974
+ * in the _name_ selection. This is used when you have a closed list of features.
975
+ * - ▶️ `featValues` (`FeatureMap`): the feature values map. When specified
976
+ * and the user selects a feature name present in the map keys, the corresponding
977
+ * values will be used to populate the value selection.
978
+ * - ▶️ `filterThreshold` (`number`): the threshold at which the features filter
979
+ * should become visible. If set to 0, the filter is always visible; if set to -1,
980
+ * it is always invisible; otherwise, it gets visible when the number of features
981
+ * is equal to or greater than the threshold. Default is 5.
982
+ * - ▶️ `features` (`Feature[]`): the features to edit.
983
+ * - ▶️ `isVar`: true if the feature is a variant operation feature, which
984
+ * has additional properties like negation, global, and short-lived.
985
+ * - 🔥 `featuresChange` (`Feature[]`): emitted when features have changed.
986
+ */
987
+ declare class FeatureSetEditorComponent implements OnInit, OnDestroy {
988
+ private _sub?;
989
+ readonly POLICIES: string[];
990
+ /**
991
+ * True if the feature is a variant operation feature, which has
992
+ * additional properties like negation, global, and short-lived.
993
+ */
994
+ readonly isVar: _angular_core.InputSignal<boolean>;
995
+ /**
996
+ * The list of feature names to display in the name selection.
997
+ * This is used when you have a closed list of features.
998
+ */
999
+ readonly featNames: _angular_core.InputSignal<LabeledId[] | undefined>;
1000
+ /**
1001
+ * The feature values map. When specified and the user selects a feature
1002
+ * name present in the map keys, the corresponding values will be used
1003
+ * to populate the value selection.
1004
+ */
1005
+ readonly featValues: _angular_core.InputSignal<FeatureMap | undefined>;
1006
+ /**
1007
+ * The threshold at which the features filter should become visible.
1008
+ * If set to 0, the filter is always visible; if set to -1, it is always
1009
+ * invisible; otherwise, it gets visible when the number of features
1010
+ * is greater than or equal to the threshold. Default is 5.
1011
+ */
1012
+ readonly filterThreshold: _angular_core.InputSignal<number>;
1013
+ /**
1014
+ * The features to edit.
1015
+ */
1016
+ readonly features: _angular_core.ModelSignal<Feature[] | OperationFeature[]>;
1017
+ readonly editedFeature: _angular_core.WritableSignal<Feature | OperationFeature | undefined>;
1018
+ readonly editedFeatureIndex: _angular_core.WritableSignal<number>;
1019
+ filteredFeatures: _angular_core.WritableSignal<Feature[] | OperationFeature[]>;
1020
+ filter: FormControl<string | null>;
1021
+ constructor(formBuilder: FormBuilder);
1022
+ private applyFeatureFilter;
1023
+ ngOnInit(): void;
1024
+ ngOnDestroy(): void;
1025
+ addFeature(): void;
1026
+ editFeature(feature: Feature | OperationFeature): void;
1027
+ deleteFeature(feature: Feature | OperationFeature): void;
1028
+ onFeatureChange(feature?: Feature | OperationFeature): void;
1029
+ onFeatureCancel(): void;
1030
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<FeatureSetEditorComponent, never>;
1031
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<FeatureSetEditorComponent, "gve-feature-set-editor", never, { "isVar": { "alias": "isVar"; "required": false; "isSignal": true; }; "featNames": { "alias": "featNames"; "required": false; "isSignal": true; }; "featValues": { "alias": "featValues"; "required": false; "isSignal": true; }; "filterThreshold": { "alias": "filterThreshold"; "required": false; "isSignal": true; }; "features": { "alias": "features"; "required": false; "isSignal": true; }; }, { "features": "featuresChange"; }, never, never, true, never>;
1032
+ }
1033
+
1034
+ /**
1035
+ * 🔑 `gve-feature-set-view`
1036
+ *
1037
+ * A component to display a list of features.
1038
+ * Used by the chain result view component.
1039
+ *
1040
+ * - ▶️ `features` (`Feature[]`): the features to display.
1041
+ * - ▶️ `featNames` (`LabeledId[]`): the list of feature names to display
1042
+ * in the _name_ selection. This is used when you have a closed list of features.
1043
+ * - ▶️ `featValues` (`FeatureMap`): the feature values map. When specified
1044
+ * and the user selects a feature name present in the map keys, the corresponding
1045
+ * values will be used to populate the value selection.
1046
+ * - ▶️ `filterThreshold` (`number`): the threshold at which the features filter
1047
+ * should become visible. If set to 0, the filter is always visible; if set to -1,
1048
+ * it is always invisible; otherwise, it gets visible when the number of features
1049
+ * is greater than the threshold. Default is 5.
1050
+ */
1051
+ declare class FeatureSetViewComponent {
1052
+ private _sub?;
1053
+ /**
1054
+ * The features.
1055
+ */
1056
+ readonly features: _angular_core.InputSignal<Feature[] | OperationFeature[]>;
1057
+ /**
1058
+ * The list of feature names to display in the name selection.
1059
+ * This is used when you have a closed list of features.
1060
+ */
1061
+ readonly featNames: _angular_core.InputSignal<LabeledId[] | undefined>;
1062
+ /**
1063
+ * The feature values map. When specified and the user selects a feature
1064
+ * name present in the map keys, the corresponding values will be used
1065
+ * to populate the value selection.
1066
+ */
1067
+ readonly featValues: _angular_core.InputSignal<FeatureMap | undefined>;
1068
+ /**
1069
+ * The threshold at which the features filter should become visible.
1070
+ * If set to 0, the filter is always visible; if set to -1, it is always
1071
+ * invisible; otherwise, it gets visible when the number of features
1072
+ * is greater than the threshold. Default is 5.
1073
+ */
1074
+ readonly filterThreshold: _angular_core.InputSignal<number>;
1075
+ readonly filteredFeatures: _angular_core.WritableSignal<Feature[] | OperationFeature[]>;
1076
+ filter: FormControl<string | null>;
1077
+ constructor(formBuilder: FormBuilder);
1078
+ private applyFeatureFilter;
1079
+ ngOnInit(): void;
1080
+ ngOnDestroy(): void;
1081
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<FeatureSetViewComponent, never>;
1082
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<FeatureSetViewComponent, "gve-feature-set-view", never, { "features": { "alias": "features"; "required": false; "isSignal": true; }; "featNames": { "alias": "featNames"; "required": false; "isSignal": true; }; "featValues": { "alias": "featValues"; "required": false; "isSignal": true; }; "filterThreshold": { "alias": "filterThreshold"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
1083
+ }
1084
+
1085
+ /**
1086
+ * 🔑 `gve-ln-heights-editor`
1087
+ *
1088
+ * A component to edit line heights.
1089
+ * Used by the `gve-snapshot-editor` component.
1090
+ *
1091
+ * - ▶️ `lineCount` (`number`): the number of lines.
1092
+ * - ▶️ `heights` (`Record<number, number>`): the line heights.
1093
+ * - 🔥 `heightsChange` (`EventEmitter<Record<number, number>>`): the event
1094
+ * emitted when the heights change.
1095
+ */
1096
+ declare class LnHeightsEditorComponent implements OnInit, OnDestroy {
1097
+ private _subs?;
1098
+ private _heights?;
1099
+ lineNumber: FormControl<number>;
1100
+ height: FormControl<number>;
1101
+ /**
1102
+ * The total number of lines in the text.
1103
+ */
1104
+ readonly lineCount: _angular_core.InputSignal<number>;
1105
+ /**
1106
+ * The heights map of the lines. Each key is a line number and the value is
1107
+ * the height of the line.
1108
+ */
1109
+ readonly heights: _angular_core.InputSignal<Record<number, number> | undefined>;
1110
+ /**
1111
+ * The event emitted when the heights change.
1112
+ */
1113
+ readonly heightsChange: _angular_core.OutputEmitterRef<Record<number, number> | undefined>;
1114
+ readonly lineNumbers: _angular_core.Signal<number[]>;
1115
+ constructor(formBuilder: FormBuilder);
1116
+ private pruneHeights;
1117
+ ngOnInit(): void;
1118
+ ngOnDestroy(): void;
1119
+ reset(): void;
1120
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<LnHeightsEditorComponent, never>;
1121
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<LnHeightsEditorComponent, "gve-ln-heights-editor", never, { "lineCount": { "alias": "lineCount"; "required": false; "isSignal": true; }; "heights": { "alias": "heights"; "required": false; "isSignal": true; }; }, { "heightsChange": "heightsChange"; }, never, never, true, never>;
1122
+ }
1123
+
1124
+ /**
1125
+ * 🔑 `gve-operation-source-editor`
1126
+ *
1127
+ * A component to edit an operation source.
1128
+ * Used by chain operation editor component.
1129
+ *
1130
+ * - ▶️ `source` (`OperationSource`): the source to edit.
1131
+ * - ▶️ `ids` (`LabeledId[]`): the list of source IDs, when using a closed
1132
+ * list for them.
1133
+ * - ▶️ `types` (`LabeledId[]`): the list of source types, when using a closed
1134
+ * list for them.
1135
+ * - 🔥 `sourceChange` (`EventEmitter<OperationSource>`): the event emitted
1136
+ * when the source changes.
1137
+ * - 🔥 `sourceCancel` (`EventEmitter<void>`): the event emitted when the
1138
+ * edit is canceled.
1139
+ */
1140
+ declare class OperationSourceEditorComponent {
1141
+ /**
1142
+ * The source to edit.
1143
+ */
1144
+ readonly source: _angular_core.ModelSignal<OperationSource | undefined>;
1145
+ /**
1146
+ * The list of source IDs when it's a closed set.
1147
+ */
1148
+ readonly ids: _angular_core.InputSignal<LabeledId[] | undefined>;
1149
+ /**
1150
+ * The list of source types when it's a closed set.
1151
+ */
1152
+ readonly types: _angular_core.InputSignal<LabeledId[] | undefined>;
1153
+ /**
1154
+ * The event emitted when the edit is canceled.
1155
+ */
1156
+ sourceCancel: _angular_core.OutputEmitterRef<void>;
1157
+ id: FormControl<string>;
1158
+ type: FormControl<string>;
1159
+ rank: FormControl<number>;
1160
+ note: FormControl<string | null>;
1161
+ form: FormGroup;
1162
+ constructor(formBuilder: FormBuilder);
1163
+ private updateForm;
1164
+ cancel(): void;
1165
+ save(): void;
1166
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<OperationSourceEditorComponent, never>;
1167
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<OperationSourceEditorComponent, "gve-operation-source-editor", never, { "source": { "alias": "source"; "required": false; "isSignal": true; }; "ids": { "alias": "ids"; "required": false; "isSignal": true; }; "types": { "alias": "types"; "required": false; "isSignal": true; }; }, { "source": "sourceChange"; "sourceCancel": "sourceCancel"; }, never, never, true, never>;
1168
+ }
1169
+
1170
+ /**
1171
+ * 🔑 `gve-snapshot-editor`
1172
+ *
1173
+ * A component to edit a text snapshot. This is the top level component in the GVE core
1174
+ * library.
1175
+ *
1176
+ * - ▶️ `snapshot` (`Snapshot`): the snapshot to edit.
1177
+ * - ▶️ `batchOps` (`string`): the batch operations text to set for the editor.
1178
+ * - ▶️ `noSave` (`boolean`): true to disable saving.
1179
+ * - 🔥 `snapshotChange` (`Snapshot`): emitted when the user saves the edited snapshot.
1180
+ * - 🔥 `snapshotCancel` (`void`): emitted when the user cancels the snapshot editing.
1181
+ */
1182
+ declare class SnapshotEditorComponent {
1183
+ private _api;
1184
+ private _dialog;
1185
+ private _dialogService;
1186
+ private _snackbar;
1187
+ private readonly _nanoid;
1188
+ private _renderer?;
1189
+ private _previewing?;
1190
+ private _transparentIds?;
1191
+ private _stepPickFrozen?;
1192
+ private _handlingOver?;
1193
+ private _lastOverId?;
1194
+ snapshotView?: ElementRef<SnapshotViewComponent>;
1195
+ /**
1196
+ * The snapshot to edit.
1197
+ */
1198
+ readonly snapshot: _angular_core.ModelSignal<Snapshot | undefined>;
1199
+ /**
1200
+ * The batch operations text to set for the editor.
1201
+ */
1202
+ readonly batchOps: _angular_core.InputSignal<string | undefined>;
1203
+ /**
1204
+ * True to disable saving.
1205
+ */
1206
+ readonly noSave: _angular_core.InputSignal<boolean | undefined>;
1207
+ /**
1208
+ * True to enable debug mode for view rendition.
1209
+ */
1210
+ readonly debug: _angular_core.InputSignal<boolean | undefined>;
1211
+ /**
1212
+ * True to not show character decoration according to the trace
1213
+ * features in nodes.
1214
+ */
1215
+ readonly noDecoration: _angular_core.InputSignal<boolean | undefined>;
1216
+ /**
1217
+ * Definitions for features, including names and values.
1218
+ */
1219
+ readonly featureDefs: _angular_core.InputSignal<FeatureDefinitions | undefined>;
1220
+ /**
1221
+ * Definitions for element features, including names and values.
1222
+ */
1223
+ readonly elementFeatureDefs: _angular_core.InputSignal<FeatureDefinitions | undefined>;
1224
+ /**
1225
+ * Definitions for diplomatic features, including names and values.
1226
+ */
1227
+ readonly diplomaticFeatureDefs: _angular_core.InputSignal<FeatureDefinitions | undefined>;
1228
+ /**
1229
+ * Emitted when the user cancels the snapshot editing.
1230
+ */
1231
+ readonly snapshotCancel: _angular_core.OutputEmitterRef<void>;
1232
+ width: FormControl<number>;
1233
+ height: FormControl<number>;
1234
+ style: FormControl<string | null>;
1235
+ baseText: FormControl<CharNode[]>;
1236
+ offsetX: FormControl<number>;
1237
+ offsetY: FormControl<number>;
1238
+ lineHeightOffset: FormControl<number>;
1239
+ lnHeights: FormControl<Record<number, number> | null>;
1240
+ charSpacingOffset: FormControl<number>;
1241
+ spcWidthOffset: FormControl<number>;
1242
+ textStyle: FormControl<string | null>;
1243
+ operations: FormControl<CharChainOperation[]>;
1244
+ opStyle: FormControl<string | null>;
1245
+ form: FormGroup;
1246
+ imageUrl: FormControl<string | null>;
1247
+ imageOpacity: FormControl<number>;
1248
+ imageX: FormControl<number>;
1249
+ imageY: FormControl<number>;
1250
+ imageWidth: FormControl<number>;
1251
+ imageHeight: FormControl<number>;
1252
+ defs: FormControl<string | null>;
1253
+ timelines: FormControl<GveAnimationTimeline[]>;
1254
+ readonly showChain: FormControl<boolean>;
1255
+ readonly chain: _angular_core.WritableSignal<CharChain | undefined>;
1256
+ readonly opTags: _angular_core.WritableSignal<string[]>;
1257
+ readonly opElementIds: _angular_core.WritableSignal<string[]>;
1258
+ readonly textRange: _angular_core.WritableSignal<VarBaseTextRange | undefined>;
1259
+ readonly lineCount: _angular_core.WritableSignal<number>;
1260
+ readonly editedOp: _angular_core.WritableSignal<CharChainOperation | undefined>;
1261
+ readonly editedOpIndex: _angular_core.WritableSignal<number>;
1262
+ readonly busy: _angular_core.WritableSignal<boolean>;
1263
+ readonly opTypeMap: {
1264
+ 0: string;
1265
+ 1: string;
1266
+ 2: string;
1267
+ 3: string;
1268
+ 4: string;
1269
+ 5: string;
1270
+ 6: string;
1271
+ 7: string;
1272
+ };
1273
+ viewTitle: string;
1274
+ viewData?: SnapshotViewData;
1275
+ visualInfo?: string;
1276
+ rulers: boolean;
1277
+ result?: CharChainResult;
1278
+ resultOperationId?: string;
1279
+ initialStepIndex: number;
1280
+ constructor(formBuilder: FormBuilder, _api: GveApiService, _dialog: MatDialog, _dialogService: DialogService, _snackbar: MatSnackBar);
1281
+ /**
1282
+ * Set the view data for the snapshot view.
1283
+ *
1284
+ * @param snapshot The optional snapshot data to use. If not provided,
1285
+ * a snapshot will be created from the form data.
1286
+ * @param title The optional title to set for the view.
1287
+ */
1288
+ private setViewData;
1289
+ private updateForm;
1290
+ inputBaseText(): void;
1291
+ /**
1292
+ * Update the line count based on the received text.
1293
+ * @param text The text to use for counting lines.
1294
+ */
1295
+ private updateLineCount;
1296
+ /**
1297
+ * Handle the event fired by the base text editor to pick a text range.
1298
+ * @param range The picked range.
1299
+ */
1300
+ onRangePick(range?: VarBaseTextRange): void;
1301
+ /**
1302
+ * Update the lists of operation output tags and element IDs by collecting
1303
+ * all the operation tags and the IDs of the elements in their diplomatic.g
1304
+ * SVG code if any.
1305
+ */
1306
+ private updateOpLists;
1307
+ /**
1308
+ * Edit a new operation.
1309
+ */
1310
+ editNewOperation(): void;
1311
+ /**
1312
+ * Edit (a copy of) the operation at the specified index.
1313
+ * @param index The operation index.
1314
+ */
1315
+ editOperation(index: number): void;
1316
+ /**
1317
+ * Close the currently edited operation.
1318
+ */
1319
+ private closeEditedOperation;
1320
+ /**
1321
+ * Handle the event fired by the operation editor to cancel
1322
+ * the current operation edits.
1323
+ */
1324
+ onOperationCancel(): void;
1325
+ /**
1326
+ * Handle the event fired by the operation editor to change
1327
+ * the currently edited operation, or add a new one if that
1328
+ * was a new operation.
1329
+ * @param op The changed operation.
1330
+ */
1331
+ onOperationChange(op?: CharChainOperation | null): void;
1332
+ /**
1333
+ * Delete the operation at the specified index.
1334
+ * @param index The index of the operation to delete.
1335
+ */
1336
+ deleteOperation(index: number): void;
1337
+ /**
1338
+ * Parse the operations from their text and append them to the current
1339
+ * snapshot operations.
1340
+ */
1341
+ parseOperations(): void;
1342
+ /**
1343
+ * Remove all the operations, close the edited operation and update the view data.
1344
+ */
1345
+ private removeAllOperations;
1346
+ /**
1347
+ * Remove all the operations.
1348
+ */
1349
+ clearOperations(): void;
1350
+ /**
1351
+ * Parse all the id attributes from the received SVG code and
1352
+ * return them as an array.
1353
+ *
1354
+ * @param svg The SVG content to parse or undefined.
1355
+ * @returns Array of IDs found in the SVG content or undefined.
1356
+ */
1357
+ private parseSvgIds;
1358
+ private getTransparentIds;
1359
+ /**
1360
+ * Supply operation nodes to the snapshot text nodes. An execution result is
1361
+ * a compact object, so that to build a snapshot accumulating all the nodes
1362
+ * and their features up to the last executed operation, we need to start
1363
+ * with the base text nodes, and then examine each execution step in the
1364
+ * result. Each step contains only those nodes used by the version of the
1365
+ * text corresponding to its stage. Among them, some are new nodes, and some
1366
+ * are base text nodes. Also, the step contains the full set of features
1367
+ * current at its time, both for the text as a whole and for each node.
1368
+ * This method accumulates the nodes and their features up to the specified
1369
+ * step, updating the features of the nodes already present in the snapshot
1370
+ * text nodes, and adding the new nodes.
1371
+ *
1372
+ * @param snapshot The snapshot to supply the nodes to.
1373
+ * @param result The operations execution result.
1374
+ * @param tag The output tag of the operation to supply the nodes from.
1375
+ */
1376
+ private supplyOpNodes;
1377
+ /**
1378
+ * Run the operations up to the specified index (included).
1379
+ * This is called when:
1380
+ * - a preview is requested by the operation editor.
1381
+ * - the currently edited operation is saved.
1382
+ * - the user picks a step in the chain result view.
1383
+ * - runToLast is called, which happens when:
1384
+ * - setting the snapshot.
1385
+ * - parsing a batch of operations.
1386
+ * - deleting an operation.
1387
+ *
1388
+ * @param index The index of the operation to run to.
1389
+ * @param lastOperation The operation to use in place of the existing
1390
+ * operation in the snapshot at index. This is used when previewing
1391
+ * the edited operation from within the operation editor.
1392
+ * @returns A promise that resolves to the execution result.
1393
+ */
1394
+ runTo(index: number, lastOperation?: CharChainOperation): void;
1395
+ /**
1396
+ * Run the operations up to the last operation if any, updating the
1397
+ * execution result. The execution result is always the result from
1398
+ * all the operations, as users must be able to browse across its steps.
1399
+ */
1400
+ runToLast(): void;
1401
+ getChainAt(index: number, lastOperation?: CharChainOperation): void;
1402
+ /**
1403
+ * Update the snapshot view by running the operations up to the
1404
+ * currently edited operation if any.
1405
+ *
1406
+ * @param operation The operation being previewed.
1407
+ */
1408
+ onOperationPreview(operation: CharChainOperation): void;
1409
+ private playTimeline;
1410
+ /**
1411
+ * Handle the event fired by the chain result view to pick a step.
1412
+ *
1413
+ * @param step The step to pick.
1414
+ */
1415
+ onStepPick(step: ChainOperationContextStep): void;
1416
+ /**
1417
+ * Handle the event fired by a visual in the snapshot view.
1418
+ *
1419
+ * @param event The event.
1420
+ */
1421
+ onVisualEvent(event: CustomEvent<GveVisualEvent>): void;
1422
+ /**
1423
+ * Handle the change of line heights by updating the form control.
1424
+ *
1425
+ * @param heights The line heights.
1426
+ */
1427
+ onHeightsChange(heights: Record<number, number> | undefined): void;
1428
+ /**
1429
+ * Handle the change of timelines by updating the form control.
1430
+ *
1431
+ * @param timelines The timelines.
1432
+ */
1433
+ onTimelinesChange(timelines?: GveAnimationTimeline[] | null): void;
1434
+ /**
1435
+ * Emit the cancel event for this snapshot edit.
1436
+ */
1437
+ close(): void;
1438
+ /**
1439
+ * Handle the render event from the snapshot view to get a reference
1440
+ * to the renderer.
1441
+ *
1442
+ * @param event The rendition event.
1443
+ */
1444
+ onSnapshotRender(event: CustomEvent<SnapshotViewRenderEvent>): void;
1445
+ onImageLoad(imageElement: HTMLImageElement): void;
1446
+ onImageOpacityChange(value: number): void;
1447
+ resetImgMetadata(): void;
1448
+ /**
1449
+ * Toggle rulers in the snapshot view.
1450
+ */
1451
+ toggleRulers(): void;
1452
+ private defaultCharDecorator;
1453
+ /**
1454
+ * Get a snapshot from the form data.
1455
+ *
1456
+ * @returns New snapshot object.
1457
+ */
1458
+ private getSnapshot;
1459
+ /**
1460
+ * Get a snapshot from the form data and emit it
1461
+ * in the snapshot change event.
1462
+ */
1463
+ save(): void;
1464
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SnapshotEditorComponent, never>;
1465
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SnapshotEditorComponent, "gve-snapshot-editor", never, { "snapshot": { "alias": "snapshot"; "required": false; "isSignal": true; }; "batchOps": { "alias": "batchOps"; "required": false; "isSignal": true; }; "noSave": { "alias": "noSave"; "required": false; "isSignal": true; }; "debug": { "alias": "debug"; "required": false; "isSignal": true; }; "noDecoration": { "alias": "noDecoration"; "required": false; "isSignal": true; }; "featureDefs": { "alias": "featureDefs"; "required": false; "isSignal": true; }; "elementFeatureDefs": { "alias": "elementFeatureDefs"; "required": false; "isSignal": true; }; "diplomaticFeatureDefs": { "alias": "diplomaticFeatureDefs"; "required": false; "isSignal": true; }; }, { "snapshot": "snapshotChange"; "snapshotCancel": "snapshotCancel"; }, never, never, true, never>;
1466
+ }
1467
+
1468
+ /**
1469
+ * 🔑 `gve-snapshot-text-editor`
1470
+ *
1471
+ * A component to edit a snapshot text. This component can be used both in a dialog
1472
+ * and as a standalone component.
1473
+ *
1474
+ * - ▶️ `text` (`CharNode[]`): the text to edit.
1475
+ * - 🔥 `textChange` (`CharNode[]`): event emitted when text changes.
1476
+ */
1477
+ declare class SnapshotTextEditorComponent implements OnInit {
1478
+ dialogRef?: MatDialogRef<SnapshotTextEditorComponent> | undefined;
1479
+ data?: PayloadMatDialogConfig<{
1480
+ text?: CharNode[];
1481
+ }> | undefined;
1482
+ userText: FormControl<string>;
1483
+ form: FormGroup;
1484
+ readonly text: _angular_core.ModelSignal<CharNode[]>;
1485
+ constructor(formBuilder: FormBuilder, dialogRef?: MatDialogRef<SnapshotTextEditorComponent> | undefined, data?: PayloadMatDialogConfig<{
1486
+ text?: CharNode[];
1487
+ }> | undefined);
1488
+ private updateUserText;
1489
+ ngOnInit(): void;
1490
+ close(): void;
1491
+ save(): void;
1492
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SnapshotTextEditorComponent, [null, { optional: true; }, { optional: true; }]>;
1493
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SnapshotTextEditorComponent, "gve-snapshot-text-editor", never, { "text": { "alias": "text"; "required": false; "isSignal": true; }; }, { "text": "textChange"; }, never, never, true, never>;
1494
+ }
1495
+
1496
+ /**
1497
+ * 🔑 `gve-steps-map`
1498
+ *
1499
+ * A map of steps in a chain operation context. This shows the list of
1500
+ * steps in the execution of a set of operations, and allows the user to
1501
+ * pick a step to view.
1502
+ *
1503
+ * Used by the `gve-chain-result-view` component.
1504
+ *
1505
+ * - ▶️ `steps` (`ChainOperationContextStep[]`): the steps to display.
1506
+ * - ▶️ `selectedStep` (`ChainOperationContextStep`): the step that is
1507
+ * currently selected.
1508
+ * - ▶️ `textFontSize` (`string`): the font size of the steps text.
1509
+ * - 🔥 `selectedStepChange` (`ChainOperationContextStep`): emitted when
1510
+ * the selectd step has been changed by the user. This is not emitted
1511
+ * when the selected step is changed programmatically, unless this is
1512
+ * the first time the steps are set. In that case, the last step is
1513
+ * automatically selected.
1514
+ */
1515
+ declare class StepsMapComponent implements AfterViewInit {
1516
+ private _viewInitialized;
1517
+ private _selectionProcessed;
1518
+ readonly lines: _angular_core.WritableSignal<{
1519
+ [key: string]: string[];
1520
+ }>;
1521
+ /**
1522
+ * The steps to display.
1523
+ */
1524
+ readonly steps: _angular_core.InputSignal<ChainOperationContextStep[]>;
1525
+ /**
1526
+ * The step that is currently selected.
1527
+ */
1528
+ readonly selectedStep: _angular_core.ModelSignal<ChainOperationContextStep | undefined>;
1529
+ /**
1530
+ * The font size of the steps text.
1531
+ */
1532
+ readonly textFontSize: _angular_core.InputSignal<string>;
1533
+ constructor();
1534
+ private validateAndSetSelection;
1535
+ ngAfterViewInit(): void;
1536
+ private updateLines;
1537
+ onStepClick(step: ChainOperationContextStep): void;
1538
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<StepsMapComponent, never>;
1539
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<StepsMapComponent, "gve-steps-map", never, { "steps": { "alias": "steps"; "required": false; "isSignal": true; }; "selectedStep": { "alias": "selectedStep"; "required": false; "isSignal": true; }; "textFontSize": { "alias": "textFontSize"; "required": false; "isSignal": true; }; }, { "selectedStep": "selectedStepChange"; }, never, never, true, never>;
1540
+ }
1541
+
1542
+ export { AnimationTimelineComponent, AnimationTimelineSetComponent, AnimationTweenComponent, BaseTextCharComponent, BaseTextEditorComponent, BaseTextViewComponent, BatchOperationEditorComponent, ChainOperationEditorComponent, ChainResultViewComponent, ChainViewComponent, FeatureEditorComponent, FeatureSetEditorComponent, FeatureSetViewComponent, GveApiService, GveGraphvizService, LnHeightsEditorComponent, OperationSourceEditorComponent, SettingsService, SnapshotEditorComponent, SnapshotTextEditorComponent, StepsMapComponent };
1543
+ export type { BaseTextChar, BaseTextCharEvent, ChainOperationContextStep, ChainOperationTags, CharChain, CharChainLink, CharChainNode, CharChainResult, FeatureDefinitions, FeatureMap, GraphvizRankdir, PayloadMatDialogConfig, ResultWrapper, VarBaseTextRange };