@myrmidon/gve-core 6.1.6 → 7.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.
- package/README.md +1 -10
- package/fesm2022/myrmidon-gve-core.mjs +245 -102
- package/fesm2022/myrmidon-gve-core.mjs.map +1 -1
- package/package.json +7 -7
- package/types/myrmidon-gve-core.d.ts +74 -21
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myrmidon/gve-core",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.1",
|
|
4
4
|
"description": "Cadmus - GVE Angular frontend core components.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"GVE"
|
|
@@ -14,16 +14,16 @@
|
|
|
14
14
|
"name": "Daniele Fusi"
|
|
15
15
|
},
|
|
16
16
|
"peerDependencies": {
|
|
17
|
-
"@angular/common": "^21.2.
|
|
18
|
-
"@angular/core": "^21.2.
|
|
19
|
-
"@angular/material": "^21.2.
|
|
17
|
+
"@angular/common": "^21.2.11",
|
|
18
|
+
"@angular/core": "^21.2.11",
|
|
19
|
+
"@angular/material": "^21.2.9",
|
|
20
20
|
"@cisstech/nge": "^18.3.0",
|
|
21
21
|
"@myrmidon/ngx-mat-tools": "^1.0.2",
|
|
22
|
-
"@myrmidon/ngx-tools": "^2.0.
|
|
23
|
-
"@myrmidon/gve-snapshot-rendition": "^
|
|
22
|
+
"@myrmidon/ngx-tools": "^2.0.3",
|
|
23
|
+
"@myrmidon/gve-snapshot-rendition": "^1.0.2",
|
|
24
24
|
"gsap": "^3.15.0",
|
|
25
25
|
"monaco-editor": "^0.34.1",
|
|
26
|
-
"nanoid": "^5.1.
|
|
26
|
+
"nanoid": "^5.1.11"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"tslib": "^2.3.0"
|
|
@@ -108,11 +108,13 @@ interface CharChainOperation extends OperationMetadata {
|
|
|
108
108
|
*/
|
|
109
109
|
interface CharNode {
|
|
110
110
|
id: number;
|
|
111
|
-
index
|
|
111
|
+
index?: number;
|
|
112
112
|
label: string;
|
|
113
113
|
data: string;
|
|
114
114
|
sourceTag?: string;
|
|
115
|
-
features?:
|
|
115
|
+
features?: {
|
|
116
|
+
[tag: string]: Feature[];
|
|
117
|
+
} | null;
|
|
116
118
|
}
|
|
117
119
|
/**
|
|
118
120
|
* A text snapshot, including the base text and the operations that
|
|
@@ -431,17 +433,6 @@ interface ChainOperationContextStep {
|
|
|
431
433
|
* version.
|
|
432
434
|
*/
|
|
433
435
|
result?: string;
|
|
434
|
-
/**
|
|
435
|
-
* The features emitted up to the executed operation.
|
|
436
|
-
* These are the features of the text as a whole, and
|
|
437
|
-
* those belonging to specific nodes, each keyed under
|
|
438
|
-
* a string built with `v` + output version tag + `_`
|
|
439
|
-
* + node ID (e.g. `v1_2` for node with ID 2 at version 1).
|
|
440
|
-
*/
|
|
441
|
-
featureSet: {
|
|
442
|
-
features: OperationFeature[];
|
|
443
|
-
nodeFeatures: Record<string, OperationFeature[]>;
|
|
444
|
-
};
|
|
445
436
|
/**
|
|
446
437
|
* The reference node IDs of the operation which was
|
|
447
438
|
* executed.
|
|
@@ -471,14 +462,27 @@ interface CharChainResult {
|
|
|
471
462
|
*/
|
|
472
463
|
chainTags: string[];
|
|
473
464
|
/**
|
|
474
|
-
*
|
|
475
|
-
*
|
|
476
|
-
*
|
|
477
|
-
*
|
|
478
|
-
|
|
465
|
+
* All nodes in the chain regardless of version, including deleted
|
|
466
|
+
* nodes. Each node's `features` is keyed by version tag; the value
|
|
467
|
+
* is the list of features for that node at that version. `features`
|
|
468
|
+
* is `null` when the node has no features in any version.
|
|
469
|
+
*/
|
|
470
|
+
nodes: CharNode[];
|
|
471
|
+
/**
|
|
472
|
+
* For each version tag (including v0), the ordered sequence of node
|
|
473
|
+
* IDs that make up that version's text. Use together with `nodes`
|
|
474
|
+
* (looked up by `id`) to reconstruct any version.
|
|
479
475
|
*/
|
|
480
|
-
|
|
481
|
-
[
|
|
476
|
+
versionNodeIds: {
|
|
477
|
+
[tag: string]: number[];
|
|
478
|
+
};
|
|
479
|
+
/**
|
|
480
|
+
* For each version tag (including v0), the accumulated global
|
|
481
|
+
* (chain-level) features at the end of that version.
|
|
482
|
+
* The v0 entry is always an empty array.
|
|
483
|
+
*/
|
|
484
|
+
globalFeatures: {
|
|
485
|
+
[tag: string]: OperationFeature[];
|
|
482
486
|
};
|
|
483
487
|
}
|
|
484
488
|
/**
|
|
@@ -1002,6 +1006,15 @@ declare class ChainResultViewComponent implements OnInit, OnDestroy, AfterViewIn
|
|
|
1002
1006
|
readonly selection: _angular_core.WritableSignal<string | undefined>;
|
|
1003
1007
|
readonly selectionFeatures: _angular_core.WritableSignal<OperationFeature[]>;
|
|
1004
1008
|
readonly selectionRange: _angular_core.WritableSignal<BaseTextRange | undefined>;
|
|
1009
|
+
/**
|
|
1010
|
+
* Ordered nodes for the current step's version, resolved from
|
|
1011
|
+
* `result.versionNodeIds` and `result.nodes`.
|
|
1012
|
+
*/
|
|
1013
|
+
readonly stepNodes: _angular_core.Signal<CharNode[]>;
|
|
1014
|
+
/**
|
|
1015
|
+
* Global features for the current step's output version.
|
|
1016
|
+
*/
|
|
1017
|
+
readonly stepGlobalFeatures: _angular_core.Signal<OperationFeature[]>;
|
|
1005
1018
|
/**
|
|
1006
1019
|
* True to disable range picking. For instance the snapshot editor,
|
|
1007
1020
|
* which uses rangePick to set the edited operation's range, disables
|
|
@@ -1057,6 +1070,9 @@ declare class ChainResultViewComponent implements OnInit, OnDestroy, AfterViewIn
|
|
|
1057
1070
|
* will allow adding multiple values to it.
|
|
1058
1071
|
* - ▶️ `isVar`: true if the feature is a variant operation feature, which
|
|
1059
1072
|
* has additional properties like negation, global, and short-lived.
|
|
1073
|
+
* - ▶️ `hasCloseButton`: true if a close button should be shown to allow closing
|
|
1074
|
+
* the editor.
|
|
1075
|
+
* - 🔥 `close`: emitted when the user clicks the close button.
|
|
1060
1076
|
* - 🔥 `featuresChange` (`Feature[]`): emitted when features have changed.
|
|
1061
1077
|
*/
|
|
1062
1078
|
declare class FeatureSetEditorComponent implements OnInit, OnDestroy {
|
|
@@ -1091,6 +1107,15 @@ declare class FeatureSetEditorComponent implements OnInit, OnDestroy {
|
|
|
1091
1107
|
* values to it.
|
|
1092
1108
|
*/
|
|
1093
1109
|
readonly multiValuedFeatureIds: _angular_core.InputSignal<string[] | undefined>;
|
|
1110
|
+
/**
|
|
1111
|
+
* True if a close button should be shown to allow closing the editor
|
|
1112
|
+
* without saving.
|
|
1113
|
+
*/
|
|
1114
|
+
readonly hasCloseButton: _angular_core.InputSignal<boolean>;
|
|
1115
|
+
/**
|
|
1116
|
+
* Emitted when the user clicks the close button.
|
|
1117
|
+
*/
|
|
1118
|
+
readonly close: _angular_core.OutputEmitterRef<void>;
|
|
1094
1119
|
/**
|
|
1095
1120
|
* The features to edit.
|
|
1096
1121
|
*/
|
|
@@ -1110,7 +1135,7 @@ declare class FeatureSetEditorComponent implements OnInit, OnDestroy {
|
|
|
1110
1135
|
onFeatureChange(feature?: Feature | OperationFeature): void;
|
|
1111
1136
|
onFeatureCancel(): void;
|
|
1112
1137
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FeatureSetEditorComponent, never>;
|
|
1113
|
-
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; }; "multiValuedFeatureIds": { "alias": "multiValuedFeatureIds"; "required": false; "isSignal": true; }; "features": { "alias": "features"; "required": false; "isSignal": true; }; }, { "features": "featuresChange"; }, never, never, true, never>;
|
|
1138
|
+
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; }; "multiValuedFeatureIds": { "alias": "multiValuedFeatureIds"; "required": false; "isSignal": true; }; "hasCloseButton": { "alias": "hasCloseButton"; "required": false; "isSignal": true; }; "features": { "alias": "features"; "required": false; "isSignal": true; }; }, { "close": "close"; "features": "featuresChange"; }, never, never, true, never>;
|
|
1114
1139
|
}
|
|
1115
1140
|
|
|
1116
1141
|
/**
|
|
@@ -1219,6 +1244,14 @@ declare class OperationSourceEditorComponent {
|
|
|
1219
1244
|
* - ▶️ `snapshot` (`Snapshot`): the snapshot to edit.
|
|
1220
1245
|
* - ▶️ `batchOps` (`string`): the batch operations text to set for the editor.
|
|
1221
1246
|
* - ▶️ `noSave` (`boolean`): true to disable saving.
|
|
1247
|
+
* - ▶️ `debug` (`boolean`): true to enable debug mode for view rendition.
|
|
1248
|
+
* - ▶️ `noDecoration` (`boolean`): true to not show character decoration according to the trace features in nodes.
|
|
1249
|
+
* - ▶️ `featureDefs` (`FeatureDefinitions`): definitions for features, including names and values.
|
|
1250
|
+
* - ▶️ `multiValuedFeatureIds` (`string[]`): the IDs of the features that are multi-valued. If a feature being edited is in this list, the feature editor will allow adding multiple values to it. Passed down to feature editors.
|
|
1251
|
+
* - ▶️ `sourceIds` (`LabeledId[]`): the list of source IDs when it's a closed set. Passed down to the operation source editor, which will show a dropdown to select from these IDs. When not specified, the source ID can be freely typed in the source editor.
|
|
1252
|
+
* - ▶️ `sourceTypes` (`LabeledId[]`): the list of source types when it's a closed set. Passed down to the operation source editor, which will show a dropdown to select from these types. When not specified, the source type can be freely typed in the source editor.
|
|
1253
|
+
* - ▶️ `renditionSettings` (`GveRenditionSettings`): settings for rendering the snapshot. These are passed to the snapshot rendition component.
|
|
1254
|
+
* - ▶️ `opListMaxHeight` (`string`): optional maximum height for the operations list. When set, the operations list will have a vertical scrollbar if its content exceeds this height.
|
|
1222
1255
|
* - 🔥 `snapshotChange` (`Snapshot`): emitted when the user saves the edited snapshot.
|
|
1223
1256
|
* - 🔥 `snapshotCancel` (`void`): emitted when the user cancels the snapshot editing.
|
|
1224
1257
|
*/
|
|
@@ -1325,6 +1358,11 @@ declare class SnapshotEditorComponent {
|
|
|
1325
1358
|
readonly result: _angular_core.WritableSignal<CharChainResult | undefined>;
|
|
1326
1359
|
readonly resultOperationId: _angular_core.WritableSignal<string | undefined>;
|
|
1327
1360
|
readonly initialStepIndex: _angular_core.WritableSignal<number>;
|
|
1361
|
+
readonly editFeatsRange: FormControl<string | null>;
|
|
1362
|
+
readonly editFeatsForm: FormGroup;
|
|
1363
|
+
readonly operationFeats: _angular_core.WritableSignal<Feature[] | undefined>;
|
|
1364
|
+
readonly featsOpNumbers: _angular_core.WritableSignal<number[] | undefined>;
|
|
1365
|
+
readonly featsRangeLabel: _angular_core.WritableSignal<string | undefined>;
|
|
1328
1366
|
constructor(formBuilder: FormBuilder, _api: GveApiService, _dialog: MatDialog, _dialogService: DialogService, _snackbar: MatSnackBar);
|
|
1329
1367
|
/**
|
|
1330
1368
|
* Initialize rendition settings and event listeners when the element becomes available.
|
|
@@ -1369,6 +1407,21 @@ declare class SnapshotEditorComponent {
|
|
|
1369
1407
|
* @param index The operation index.
|
|
1370
1408
|
*/
|
|
1371
1409
|
editOperation(index: number): void;
|
|
1410
|
+
/**
|
|
1411
|
+
* Parse a range string into a sorted array of 1-based operation ordinal
|
|
1412
|
+
* numbers. Accepts comma-separated segments where each segment is either
|
|
1413
|
+
* a single number N or a range N-M (N ≤ M). Returns null when any segment
|
|
1414
|
+
* is syntactically invalid or out of bounds.
|
|
1415
|
+
*/
|
|
1416
|
+
private parseOpRange;
|
|
1417
|
+
/**
|
|
1418
|
+
* Open a feature set editor to edit all features of the operations
|
|
1419
|
+
* specified by the editFeatsRange form control value.
|
|
1420
|
+
* Supports comma-separated segments like "2, 5-7, 9".
|
|
1421
|
+
*/
|
|
1422
|
+
editOperationsFeats(): void;
|
|
1423
|
+
saveOperationsFeats(features: Feature[]): void;
|
|
1424
|
+
closeOperationFeats(): void;
|
|
1372
1425
|
/**
|
|
1373
1426
|
* Close the currently edited operation.
|
|
1374
1427
|
*/
|