@myrmidon/gve-core 0.0.3 → 0.0.5
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/README.md +43 -77
- package/esm2022/lib/components/animation-timeline/animation-timeline.component.mjs +50 -19
- package/esm2022/lib/components/animation-timeline-set/animation-timeline-set.component.mjs +154 -0
- package/esm2022/lib/components/animation-tween/animation-tween.component.mjs +48 -25
- package/esm2022/lib/components/base-text-char/base-text-char.component.mjs +13 -4
- package/esm2022/lib/components/base-text-editor/base-text-editor.component.mjs +10 -6
- package/esm2022/lib/components/base-text-view/base-text-view.component.mjs +39 -5
- package/esm2022/lib/components/chain-operation-editor/chain-operation-editor.component.mjs +97 -39
- package/esm2022/lib/components/chain-result-view/chain-result-view.component.mjs +44 -12
- package/esm2022/lib/components/feature-editor/feature-editor.component.mjs +27 -12
- package/esm2022/lib/components/feature-set-editor/feature-set-editor.component.mjs +32 -9
- package/esm2022/lib/components/feature-set-view/feature-set-view.component.mjs +28 -8
- package/esm2022/lib/components/ln-heights-editor/ln-heights-editor.component.mjs +38 -7
- package/esm2022/lib/components/operation-source-editor/operation-source-editor.component.mjs +29 -4
- package/esm2022/lib/components/simple-tree/simple-tree.component.mjs +20 -4
- package/esm2022/lib/components/snapshot-editor/snapshot-editor.component.mjs +446 -108
- package/esm2022/lib/components/steps-map/steps-map.component.mjs +31 -9
- package/esm2022/lib/services/gve-api.service.mjs +17 -4
- package/esm2022/lib/services/settings.service.mjs +6 -5
- package/esm2022/lib/validators/svg-validators.mjs +7 -1
- package/esm2022/public-api.mjs +1 -2
- package/fesm2022/myrmidon-gve-core.mjs +1089 -375
- package/fesm2022/myrmidon-gve-core.mjs.map +1 -1
- package/lib/components/animation-timeline/animation-timeline.component.d.ts +31 -9
- package/lib/components/animation-timeline-set/animation-timeline-set.component.d.ts +55 -0
- package/lib/components/animation-tween/animation-tween.component.d.ts +25 -12
- package/lib/components/base-text-char/base-text-char.component.d.ts +16 -0
- package/lib/components/base-text-editor/base-text-editor.component.d.ts +5 -1
- package/lib/components/base-text-view/base-text-view.component.d.ts +37 -0
- package/lib/components/chain-operation-editor/chain-operation-editor.component.d.ts +53 -5
- package/lib/components/chain-result-view/chain-result-view.component.d.ts +17 -3
- package/lib/components/feature-editor/feature-editor.component.d.ts +21 -7
- package/lib/components/feature-set-editor/feature-set-editor.component.d.ts +28 -5
- package/lib/components/feature-set-view/feature-set-view.component.d.ts +23 -3
- package/lib/components/ln-heights-editor/ln-heights-editor.component.d.ts +22 -0
- package/lib/components/operation-source-editor/operation-source-editor.component.d.ts +31 -0
- package/lib/components/simple-tree/simple-tree.component.d.ts +19 -0
- package/lib/components/snapshot-editor/snapshot-editor.component.d.ts +179 -12
- package/lib/components/steps-map/steps-map.component.d.ts +20 -3
- package/lib/services/gve-api.service.d.ts +14 -0
- package/lib/services/settings.service.d.ts +2 -1
- package/lib/validators/svg-validators.d.ts +6 -0
- package/package.json +4 -4
- package/public-api.d.ts +0 -1
- package/esm2022/lib/components/animation-vars/animation-vars.component.mjs +0 -141
- package/lib/components/animation-vars/animation-vars.component.d.ts +0 -30
|
@@ -1,19 +1,41 @@
|
|
|
1
1
|
import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
2
2
|
import { FormBuilder, FormControl } from '@angular/forms';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* 🔑 `gve-ln-heights-editor`
|
|
6
|
+
*
|
|
7
|
+
* A component to edit line heights.
|
|
8
|
+
* Used by the `gve-snapshot-editor` component.
|
|
9
|
+
*
|
|
10
|
+
* - ▶️ `lineCount` (`number`): the number of lines.
|
|
11
|
+
* - ▶️ `heights` (`Record<number, number>`): the line heights.
|
|
12
|
+
* - 🔥 `heightsChange` (`EventEmitter<Record<number, number>>`): the event
|
|
13
|
+
* emitted when the heights change.
|
|
14
|
+
*/
|
|
4
15
|
export declare class LnHeightsEditorComponent implements OnInit, OnDestroy {
|
|
5
16
|
private _subs?;
|
|
6
17
|
private _heights?;
|
|
7
18
|
private _lineCount;
|
|
8
19
|
lineNumber: FormControl<number>;
|
|
9
20
|
height: FormControl<number>;
|
|
21
|
+
/**
|
|
22
|
+
* The total number of lines in the text.
|
|
23
|
+
*/
|
|
10
24
|
get lineCount(): number;
|
|
11
25
|
set lineCount(value: number);
|
|
26
|
+
/**
|
|
27
|
+
* The heights map of the lines. Each key is a line number and the value is
|
|
28
|
+
* the height of the line.
|
|
29
|
+
*/
|
|
12
30
|
get heights(): Record<number, number> | undefined;
|
|
13
31
|
set heights(value: Record<number, number> | undefined | null);
|
|
32
|
+
/**
|
|
33
|
+
* The event emitted when the heights change.
|
|
34
|
+
*/
|
|
14
35
|
readonly heightsChange: EventEmitter<Record<number, number> | undefined>;
|
|
15
36
|
lineNumbers: number[];
|
|
16
37
|
constructor(formBuilder: FormBuilder);
|
|
38
|
+
private pruneHeights;
|
|
17
39
|
ngOnInit(): void;
|
|
18
40
|
ngOnDestroy(): void;
|
|
19
41
|
reset(): void;
|
|
@@ -2,13 +2,44 @@ import { EventEmitter } from '@angular/core';
|
|
|
2
2
|
import { FormBuilder, FormControl, FormGroup } from '@angular/forms';
|
|
3
3
|
import { LabeledId, OperationSource } from '@myrmidon/gve-snapshot-view';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
|
+
/**
|
|
6
|
+
* 🔑 `gve-operation-source-editor`
|
|
7
|
+
*
|
|
8
|
+
* A component to edit an operation source.
|
|
9
|
+
* Used by chain operation editor component.
|
|
10
|
+
*
|
|
11
|
+
* - ▶️ `source` (`OperationSource`): the source to edit.
|
|
12
|
+
* - ▶️ `ids` (`LabeledId[]`): the list of source IDs, when using a closed
|
|
13
|
+
* list for them.
|
|
14
|
+
* - ▶️ `types` (`LabeledId[]`): the list of source types, when using a closed
|
|
15
|
+
* list for them.
|
|
16
|
+
* - 🔥 `sourceChange` (`EventEmitter<OperationSource>`): the event emitted
|
|
17
|
+
* when the source changes.
|
|
18
|
+
* - 🔥 `sourceCancel` (`EventEmitter<void>`): the event emitted when the
|
|
19
|
+
* edit is canceled.
|
|
20
|
+
*/
|
|
5
21
|
export declare class OperationSourceEditorComponent {
|
|
6
22
|
private _source;
|
|
23
|
+
/**
|
|
24
|
+
* The source to edit.
|
|
25
|
+
*/
|
|
7
26
|
get source(): OperationSource | undefined;
|
|
8
27
|
set source(value: OperationSource | undefined | null);
|
|
28
|
+
/**
|
|
29
|
+
* The list of source IDs when it's closed.
|
|
30
|
+
*/
|
|
9
31
|
ids?: LabeledId[];
|
|
32
|
+
/**
|
|
33
|
+
* The list of source types when it's closed.
|
|
34
|
+
*/
|
|
10
35
|
types?: LabeledId[];
|
|
36
|
+
/**
|
|
37
|
+
* The event emitted when the source changes.
|
|
38
|
+
*/
|
|
11
39
|
readonly sourceChange: EventEmitter<OperationSource | undefined>;
|
|
40
|
+
/**
|
|
41
|
+
* The event emitted when the edit is canceled.
|
|
42
|
+
*/
|
|
12
43
|
sourceCancel: EventEmitter<void>;
|
|
13
44
|
id: FormControl<string>;
|
|
14
45
|
type: FormControl<string>;
|
|
@@ -1,11 +1,30 @@
|
|
|
1
1
|
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
2
|
import { TreeNode } from '@myrmidon/gve-snapshot-view';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* 🔑 `gve-simple-tree`
|
|
6
|
+
*
|
|
7
|
+
* A simple tree component.
|
|
8
|
+
*
|
|
9
|
+
* - ▶️ `node` (`TreeNode<any>`): the node to display.
|
|
10
|
+
* - ▶️ `selectedNode` (`TreeNode<any> | null`): the selected node.
|
|
11
|
+
* - 🔥 `selectedNodeChange` (`EventEmitter<TreeNode<any> | null>`): the event
|
|
12
|
+
* emitted when the selected node changes.
|
|
13
|
+
*/
|
|
4
14
|
export declare class SimpleTreeComponent implements OnInit {
|
|
5
15
|
private _node;
|
|
16
|
+
/**
|
|
17
|
+
* The node to display.
|
|
18
|
+
*/
|
|
6
19
|
get node(): TreeNode<any> | undefined;
|
|
7
20
|
set node(value: TreeNode<any> | undefined);
|
|
21
|
+
/**
|
|
22
|
+
* The selected node.
|
|
23
|
+
*/
|
|
8
24
|
selectedNode?: TreeNode<any> | null;
|
|
25
|
+
/**
|
|
26
|
+
* The event emitted when the selected node changes.
|
|
27
|
+
*/
|
|
9
28
|
selectedNodeChange: EventEmitter<TreeNode<any> | null>;
|
|
10
29
|
level: number;
|
|
11
30
|
ngOnInit(): void;
|
|
@@ -1,13 +1,22 @@
|
|
|
1
|
-
import { EventEmitter, OnInit } from '@angular/core';
|
|
1
|
+
import { ElementRef, EventEmitter, OnInit } from '@angular/core';
|
|
2
2
|
import { FormBuilder, FormControl, FormGroup } from '@angular/forms';
|
|
3
3
|
import { MatSnackBar } from '@angular/material/snack-bar';
|
|
4
4
|
import { DialogService } from '@myrmidon/ng-mat-tools';
|
|
5
|
-
import { CharChainOperation, CharNode, GveVisualEvent, Snapshot, SnapshotViewData, SnapshotViewRenderEvent } from '@myrmidon/gve-snapshot-view';
|
|
5
|
+
import { CharChainOperation, CharNode, GveAnimationTimeline, GveVisualEvent, Snapshot, SnapshotViewComponent, SnapshotViewData, SnapshotViewRenderEvent } from '@myrmidon/gve-snapshot-view';
|
|
6
6
|
import { VarBaseTextRange } from '../base-text-view/base-text-view.component';
|
|
7
7
|
import { ChainOperationContextStep, CharChainResult, GveApiService } from '../../services/gve-api.service';
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* 🔑 `gve-snapshot-editor`
|
|
11
|
+
*
|
|
12
|
+
* A component to edit a text snapshot. This is the top level component in the GVE core
|
|
13
|
+
* library.
|
|
14
|
+
*
|
|
15
|
+
* - ▶️ `snapshot` (`Snapshot`): the snapshot to edit.
|
|
16
|
+
* - ▶️ `batchOps` (`string`): the batch operations text to set for the editor.
|
|
17
|
+
* - ▶️ `noSave` (`boolean`): true to disable saving.
|
|
18
|
+
* - 🔥 `snapshotChange` (`Snapshot`): emitted when the user saves the edited snapshot.
|
|
19
|
+
* - 🔥 `snapshotCancel` (`void`): emitted when the user cancels the snapshot editing.
|
|
11
20
|
*/
|
|
12
21
|
export declare class SnapshotEditorComponent implements OnInit {
|
|
13
22
|
private _api;
|
|
@@ -17,6 +26,9 @@ export declare class SnapshotEditorComponent implements OnInit {
|
|
|
17
26
|
private _snapshot?;
|
|
18
27
|
private _renderer?;
|
|
19
28
|
private _previewing?;
|
|
29
|
+
private _transparentIds?;
|
|
30
|
+
private _stepPickFrozen?;
|
|
31
|
+
snapshotView?: ElementRef<SnapshotViewComponent>;
|
|
20
32
|
/**
|
|
21
33
|
* The snapshot to edit.
|
|
22
34
|
*/
|
|
@@ -30,6 +42,10 @@ export declare class SnapshotEditorComponent implements OnInit {
|
|
|
30
42
|
* True to disable saving.
|
|
31
43
|
*/
|
|
32
44
|
noSave?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* True to enable debug mode for view rendition.
|
|
47
|
+
*/
|
|
48
|
+
debug?: boolean;
|
|
33
49
|
/**
|
|
34
50
|
* Emitted when the user saves the edited snapshot.
|
|
35
51
|
*/
|
|
@@ -60,7 +76,11 @@ export declare class SnapshotEditorComponent implements OnInit {
|
|
|
60
76
|
imageWidth: FormControl<number>;
|
|
61
77
|
imageHeight: FormControl<number>;
|
|
62
78
|
defs: FormControl<string | null>;
|
|
79
|
+
timelines: FormControl<GveAnimationTimeline[]>;
|
|
80
|
+
opTags: string[];
|
|
81
|
+
opElementIds: string[];
|
|
63
82
|
textRange?: VarBaseTextRange;
|
|
83
|
+
lineCount: number;
|
|
64
84
|
editedOp?: CharChainOperation;
|
|
65
85
|
editedOpIndex: number;
|
|
66
86
|
busy?: boolean;
|
|
@@ -75,37 +95,184 @@ export declare class SnapshotEditorComponent implements OnInit {
|
|
|
75
95
|
6: string;
|
|
76
96
|
7: string;
|
|
77
97
|
};
|
|
78
|
-
lineCount: number;
|
|
79
98
|
viewTitle: string;
|
|
80
99
|
viewData?: SnapshotViewData;
|
|
81
100
|
visualInfo?: string;
|
|
82
101
|
rulers: boolean;
|
|
83
102
|
result?: CharChainResult;
|
|
84
103
|
resultOperationId?: string;
|
|
104
|
+
initialStepIndex: number;
|
|
85
105
|
constructor(formBuilder: FormBuilder, _api: GveApiService, _dialogService: DialogService, _snackbar: MatSnackBar);
|
|
86
106
|
ngOnInit(): void;
|
|
87
|
-
|
|
107
|
+
/**
|
|
108
|
+
* Set the view data for the snapshot view.
|
|
109
|
+
*
|
|
110
|
+
* @param snapshot The optional snapshot data to use. If not provided,
|
|
111
|
+
* a snapshot will be created from the form data.
|
|
112
|
+
* @param title The optional title to set for the view.
|
|
113
|
+
*/
|
|
114
|
+
private setViewData;
|
|
88
115
|
private updateForm;
|
|
116
|
+
/**
|
|
117
|
+
* Update the line count based on the received text.
|
|
118
|
+
* @param text The text to use for counting lines.
|
|
119
|
+
*/
|
|
120
|
+
private updateLineCount;
|
|
121
|
+
/**
|
|
122
|
+
* Handle the event fired by the base text editor to pick a text range.
|
|
123
|
+
* @param range The picked range.
|
|
124
|
+
*/
|
|
125
|
+
onRangePick(range: VarBaseTextRange): void;
|
|
126
|
+
/**
|
|
127
|
+
* Handle the event fired by the base text editor to change the base text.
|
|
128
|
+
* @param text The text to set.
|
|
129
|
+
*/
|
|
130
|
+
onTextChange(text: CharNode[]): void;
|
|
131
|
+
/**
|
|
132
|
+
* Update the lists of operation output tags and element IDs by collecting
|
|
133
|
+
* all the operation tags and the IDs of the elements in their diplomatic.g
|
|
134
|
+
* SVG code if any.
|
|
135
|
+
*/
|
|
136
|
+
private updateOpLists;
|
|
137
|
+
/**
|
|
138
|
+
* Edit a new operation.
|
|
139
|
+
*/
|
|
89
140
|
editNewOperation(): void;
|
|
141
|
+
/**
|
|
142
|
+
* Edit (a copy of) the operation at the specified index.
|
|
143
|
+
* @param index The operation index.
|
|
144
|
+
*/
|
|
90
145
|
editOperation(index: number): void;
|
|
91
|
-
|
|
146
|
+
/**
|
|
147
|
+
* Close the currently edited operation.
|
|
148
|
+
*/
|
|
149
|
+
private closeEditedOperation;
|
|
150
|
+
/**
|
|
151
|
+
* Handle the event fired by the operation editor to cancel
|
|
152
|
+
* the current operation edits.
|
|
153
|
+
*/
|
|
92
154
|
onOperationCancel(): void;
|
|
93
|
-
|
|
155
|
+
/**
|
|
156
|
+
* Handle the event fired by the operation editor to change
|
|
157
|
+
* the currently edited operation, or add a new one if that
|
|
158
|
+
* was a new operation.
|
|
159
|
+
* @param op The changed operation.
|
|
160
|
+
*/
|
|
161
|
+
onOperationChange(op: CharChainOperation): Promise<void>;
|
|
162
|
+
/**
|
|
163
|
+
* Delete the operation at the specified index.
|
|
164
|
+
* @param index The index of the operation to delete.
|
|
165
|
+
*/
|
|
94
166
|
deleteOperation(index: number): void;
|
|
95
|
-
|
|
96
|
-
|
|
167
|
+
/**
|
|
168
|
+
* Parse the operations from their text and append them to the current
|
|
169
|
+
* snapshot operations.
|
|
170
|
+
*/
|
|
97
171
|
parseOperations(): void;
|
|
172
|
+
private removeAllOperations;
|
|
173
|
+
/**
|
|
174
|
+
* Remove all the operations.
|
|
175
|
+
*/
|
|
98
176
|
clearOperations(): void;
|
|
177
|
+
/**
|
|
178
|
+
* Parse all the id attributes from the received SVG code and
|
|
179
|
+
* return them as an array.
|
|
180
|
+
*
|
|
181
|
+
* @param svg The SVG content to parse or undefined.
|
|
182
|
+
* @returns Array of IDs found in the SVG content or undefined.
|
|
183
|
+
*/
|
|
184
|
+
private parseSvgIds;
|
|
185
|
+
/**
|
|
186
|
+
* Run the operations up to the specified index (included).
|
|
187
|
+
* This is called when:
|
|
188
|
+
* - a preview is requested by the operation editor.
|
|
189
|
+
* - the currently edited operation is saved.
|
|
190
|
+
* - the user picks a step in the chain result view.
|
|
191
|
+
* - runToLast is called, which happens when:
|
|
192
|
+
* - setting the snapshot.
|
|
193
|
+
* - parsing a batch of operations.
|
|
194
|
+
* - deleting an operation.
|
|
195
|
+
*
|
|
196
|
+
* @param index The index of the operation to run to.
|
|
197
|
+
* @param lastOperation The operation to use in place of the existing
|
|
198
|
+
* operation in the snapshot at index. This is used when previewing
|
|
199
|
+
* the edited operation from within the operation editor.
|
|
200
|
+
*/
|
|
201
|
+
runTo(index: number, lastOperation?: CharChainOperation): Promise<void>;
|
|
202
|
+
/**
|
|
203
|
+
* Run the operations up to the last operation if any.
|
|
204
|
+
* Otherwise, just update the snapshot view.
|
|
205
|
+
*/
|
|
206
|
+
runToLast(): void;
|
|
207
|
+
/**
|
|
208
|
+
* Update the snapshot view by running the operations up to the
|
|
209
|
+
* currently edited operation if any.
|
|
210
|
+
*
|
|
211
|
+
* @param operation The operation being previewed.
|
|
212
|
+
*/
|
|
99
213
|
onOperationPreview(operation: CharChainOperation): void;
|
|
100
|
-
|
|
101
|
-
|
|
214
|
+
/**
|
|
215
|
+
* Build the snapshot at the specified execution step. This implies adding
|
|
216
|
+
* the nodes introduced by the operations up to the specified step, and
|
|
217
|
+
* updating the features of the nodes introduced by the specified step.
|
|
218
|
+
* Also, the operations after the specified step are removed from the
|
|
219
|
+
* snapshot.
|
|
220
|
+
*
|
|
221
|
+
* @param step The step to build the snapshot at.
|
|
222
|
+
* @returns The snapshot at the specified step.
|
|
223
|
+
*/
|
|
224
|
+
private buildSnapshotAtStep;
|
|
225
|
+
private playTimeline;
|
|
226
|
+
/**
|
|
227
|
+
* Handle the event fired by the chain result view to pick a step.
|
|
228
|
+
*
|
|
229
|
+
* @param step The step to pick.
|
|
230
|
+
*/
|
|
231
|
+
onStepPick(step: ChainOperationContextStep): Promise<void>;
|
|
232
|
+
/**
|
|
233
|
+
* Handle the event fired by a visual in the snapshot view.
|
|
234
|
+
*
|
|
235
|
+
* @param event The event.
|
|
236
|
+
*/
|
|
102
237
|
onVisualEvent(event: CustomEvent<GveVisualEvent>): void;
|
|
238
|
+
/**
|
|
239
|
+
* Handle the change of line heights by updating the form control.
|
|
240
|
+
*
|
|
241
|
+
* @param heights The line heights.
|
|
242
|
+
*/
|
|
103
243
|
onHeightsChange(heights: Record<number, number> | undefined): void;
|
|
244
|
+
/**
|
|
245
|
+
* Handle the change of timelines by updating the form control.
|
|
246
|
+
*
|
|
247
|
+
* @param timelines The timelines.
|
|
248
|
+
*/
|
|
249
|
+
onTimelinesChange(timelines: GveAnimationTimeline[]): void;
|
|
250
|
+
/**
|
|
251
|
+
* Emit the cancel event for this snapshot edit.
|
|
252
|
+
*/
|
|
104
253
|
close(): void;
|
|
254
|
+
/**
|
|
255
|
+
* Handle the render event from the snapshot view to get a reference
|
|
256
|
+
* to the renderer.
|
|
257
|
+
*
|
|
258
|
+
* @param event The rendition event.
|
|
259
|
+
*/
|
|
105
260
|
onSnapshotRender(event: CustomEvent<SnapshotViewRenderEvent>): void;
|
|
261
|
+
/**
|
|
262
|
+
* Toggle rulers in the snapshot view.
|
|
263
|
+
*/
|
|
106
264
|
toggleRulers(): void;
|
|
265
|
+
/**
|
|
266
|
+
* Get a snapshot from the form data.
|
|
267
|
+
*
|
|
268
|
+
* @returns New snapshot object.
|
|
269
|
+
*/
|
|
107
270
|
private getSnapshot;
|
|
271
|
+
/**
|
|
272
|
+
* Get a snapshot from the form data and emit it
|
|
273
|
+
* in the snapshot change event.
|
|
274
|
+
*/
|
|
108
275
|
save(): void;
|
|
109
276
|
static ɵfac: i0.ɵɵFactoryDeclaration<SnapshotEditorComponent, never>;
|
|
110
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SnapshotEditorComponent, "gve-snapshot-editor", never, { "snapshot": { "alias": "snapshot"; "required": false; }; "batchOps": { "alias": "batchOps"; "required": false; }; "noSave": { "alias": "noSave"; "required": false; }; }, { "snapshotChange": "snapshotChange"; "snapshotCancel": "snapshotCancel"; }, never, never, true, never>;
|
|
277
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SnapshotEditorComponent, "gve-snapshot-editor", never, { "snapshot": { "alias": "snapshot"; "required": false; }; "batchOps": { "alias": "batchOps"; "required": false; }; "noSave": { "alias": "noSave"; "required": false; }; "debug": { "alias": "debug"; "required": false; }; }, { "snapshotChange": "snapshotChange"; "snapshotCancel": "snapshotCancel"; }, never, never, true, never>;
|
|
111
278
|
}
|
|
@@ -2,7 +2,23 @@ import { EventEmitter } from '@angular/core';
|
|
|
2
2
|
import { ChainOperationContextStep } from '../../services/gve-api.service';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* 🔑 `gve-steps-map`
|
|
6
|
+
*
|
|
7
|
+
* A map of steps in a chain operation context. This shows the list of
|
|
8
|
+
* steps in the execution of a set of operations, and allows the user to
|
|
9
|
+
* pick a step to view.
|
|
10
|
+
*
|
|
11
|
+
* Used by the `gve-chain-result-view` component.
|
|
12
|
+
*
|
|
13
|
+
* - ▶️ `steps` (`ChainOperationContextStep[]`): the steps to display.
|
|
14
|
+
* - ▶️ `selectedStep` (`ChainOperationContextStep`): the step that is
|
|
15
|
+
* currently selected.
|
|
16
|
+
* - ▶️ `textFontSize` (`string`): the font size of the steps text.
|
|
17
|
+
* - 🔥 `selectedStepChange` (`ChainOperationContextStep`): emitted when
|
|
18
|
+
* the selectd step has been changed by the user. This is not emitted
|
|
19
|
+
* when the selected step is changed programmatically, unless this is
|
|
20
|
+
* the first time the steps are set. In that case, the last step is
|
|
21
|
+
* automatically selected.
|
|
6
22
|
*/
|
|
7
23
|
export declare class StepsMapComponent {
|
|
8
24
|
private _steps?;
|
|
@@ -20,10 +36,11 @@ export declare class StepsMapComponent {
|
|
|
20
36
|
*/
|
|
21
37
|
textFontSize: string;
|
|
22
38
|
/**
|
|
23
|
-
* Emitted when the
|
|
39
|
+
* Emitted when the selected step has changed by user, or when
|
|
40
|
+
* the steps are set for the first time.
|
|
24
41
|
*/
|
|
25
42
|
selectedStepChange: EventEmitter<ChainOperationContextStep>;
|
|
26
|
-
|
|
43
|
+
onStepClick(step: ChainOperationContextStep): void;
|
|
27
44
|
static ɵfac: i0.ɵɵFactoryDeclaration<StepsMapComponent, never>;
|
|
28
45
|
static ɵcmp: i0.ɵɵComponentDeclaration<StepsMapComponent, "gve-steps-map", never, { "steps": { "alias": "steps"; "required": false; }; "selectedStep": { "alias": "selectedStep"; "required": false; }; "textFontSize": { "alias": "textFontSize"; "required": false; }; }, { "selectedStepChange": "selectedStepChange"; }, never, never, true, never>;
|
|
29
46
|
}
|
|
@@ -29,6 +29,13 @@ export interface CharChainResult {
|
|
|
29
29
|
[key: string]: CharNode[];
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* The input and output tags of a char-based chain operation.
|
|
34
|
+
*/
|
|
35
|
+
export interface ChainOperationTags {
|
|
36
|
+
inputTag: string;
|
|
37
|
+
outputTag: string;
|
|
38
|
+
}
|
|
32
39
|
/**
|
|
33
40
|
* Service to interact with the GVE API.
|
|
34
41
|
*/
|
|
@@ -52,6 +59,13 @@ export declare class GveApiService {
|
|
|
52
59
|
* @returns Result wrapper.
|
|
53
60
|
*/
|
|
54
61
|
runOperations(text: CharNode[], operations: CharChainOperation[]): Observable<ResultWrapper<CharChainResult>>;
|
|
62
|
+
/**
|
|
63
|
+
* Get the input and output tags for the given operations.
|
|
64
|
+
*
|
|
65
|
+
* @param operations The operations.
|
|
66
|
+
* @returns Result wrapper.
|
|
67
|
+
*/
|
|
68
|
+
getTags(operations: CharChainOperation[]): Observable<ResultWrapper<string[]>>;
|
|
55
69
|
static ɵfac: i0.ɵɵFactoryDeclaration<GveApiService, never>;
|
|
56
70
|
static ɵprov: i0.ɵɵInjectableDeclaration<GveApiService>;
|
|
57
71
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
/**
|
|
3
|
-
* Service to store and retrieve dynamic settings.
|
|
3
|
+
* Service to store and retrieve dynamic settings. On demand, settings can
|
|
4
|
+
* be persisted in the local storage.
|
|
4
5
|
*/
|
|
5
6
|
export declare class SettingsService {
|
|
6
7
|
private readonly _cache;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myrmidon/gve-core",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "Cadmus - GVE frontend core components.",
|
|
3
|
+
"version": "0.0.5",
|
|
4
|
+
"description": "Cadmus - GVE Angular frontend core components.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"GVE"
|
|
7
7
|
],
|
|
@@ -20,13 +20,13 @@
|
|
|
20
20
|
"@myrmidon/ng-mat-tools": "^3.1.0",
|
|
21
21
|
"@myrmidon/ng-tools": "^3.1.1",
|
|
22
22
|
"@myrmidon/gve-snapshot-view": "^0.0.19",
|
|
23
|
-
"@svgdotjs/svg.js": "^3.2.
|
|
23
|
+
"@svgdotjs/svg.js": "^3.2.4",
|
|
24
24
|
"gsap": "^3.12.5",
|
|
25
25
|
"monaco-editor": "^0.50.0",
|
|
26
26
|
"nanoid": "^5.0.7"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"tslib": "^2.3
|
|
29
|
+
"tslib": "^2.6.3"
|
|
30
30
|
},
|
|
31
31
|
"sideEffects": false,
|
|
32
32
|
"module": "fesm2022/myrmidon-gve-core.mjs",
|
package/public-api.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export * from './lib/models';
|
|
2
2
|
export * from './lib/components/animation-timeline/animation-timeline.component';
|
|
3
3
|
export * from './lib/components/animation-tween/animation-tween.component';
|
|
4
|
-
export * from './lib/components/animation-vars/animation-vars.component';
|
|
5
4
|
export * from './lib/components/base-text-char/base-text-char.component';
|
|
6
5
|
export * from './lib/components/base-text-editor/base-text-editor.component';
|
|
7
6
|
export * from './lib/components/base-text-view/base-text-view.component';
|