@myrmidon/gve-core 6.1.5 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -10
- package/fesm2022/myrmidon-gve-core.mjs +168 -97
- package/fesm2022/myrmidon-gve-core.mjs.map +1 -1
- package/package.json +6 -6
- package/types/myrmidon-gve-core.d.ts +69 -22
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myrmidon/gve-core",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.0",
|
|
4
4
|
"description": "Cadmus - GVE Angular frontend core components.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"GVE"
|
|
@@ -14,14 +14,14 @@
|
|
|
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.10",
|
|
18
|
+
"@angular/core": "^21.2.10",
|
|
19
|
+
"@angular/material": "^21.2.8",
|
|
20
20
|
"@cisstech/nge": "^18.3.0",
|
|
21
21
|
"@myrmidon/ngx-mat-tools": "^1.0.2",
|
|
22
22
|
"@myrmidon/ngx-tools": "^2.0.2",
|
|
23
|
-
"@myrmidon/gve-snapshot-rendition": "^
|
|
24
|
-
"gsap": "^3.
|
|
23
|
+
"@myrmidon/gve-snapshot-rendition": "^1.0.1",
|
|
24
|
+
"gsap": "^3.15.0",
|
|
25
25
|
"monaco-editor": "^0.34.1",
|
|
26
26
|
"nanoid": "^5.1.7"
|
|
27
27
|
},
|
|
@@ -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
|
-
* the text version, with their features up to that stage.
|
|
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.
|
|
479
469
|
*/
|
|
480
|
-
|
|
481
|
-
|
|
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.
|
|
475
|
+
*/
|
|
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
|
/**
|
|
@@ -818,6 +822,12 @@ interface FeatureDefinitions {
|
|
|
818
822
|
* - ▶️ `operation` (`CharChainOperation`): the operation to edit.
|
|
819
823
|
* - ▶️ `snapshot` (`Snapshot`): the snapshot the operation refers to.
|
|
820
824
|
* - ▶️ `hidePreview` (`boolean`): whether to hide the preview request button.
|
|
825
|
+
* - ▶️ `sourceIds` (`LabeledId[]`): the list of source IDs, when using a closed list.
|
|
826
|
+
* - ▶️ `sourceTypes` (`LabeledId[]`): the list of source types, when using a closed list.
|
|
827
|
+
* - ▶️ `featureDefs` (`FeatureDefinitions`): definitions for features, including
|
|
828
|
+
* names and values.
|
|
829
|
+
* - ▶️ `rangePatch` (`BaseTextRange`): when set, the edited operation's text
|
|
830
|
+
* range (at and run) will be patched with the provided one.
|
|
821
831
|
* - 🔥 `operationChange` (`CharChainOperation`): emitted when the operation
|
|
822
832
|
* is changed.
|
|
823
833
|
* - 🔥 `operationPreview` (`CharChainOperation`): emitted when the operation
|
|
@@ -892,6 +902,14 @@ declare class ChainOperationEditorComponent implements OnInit, OnDestroy {
|
|
|
892
902
|
* values to it. Passed down to feature editors.
|
|
893
903
|
*/
|
|
894
904
|
readonly multiValuedFeatureIds: _angular_core.InputSignal<string[] | undefined>;
|
|
905
|
+
/**
|
|
906
|
+
* The list of source IDs when it's a closed set.
|
|
907
|
+
*/
|
|
908
|
+
readonly sourceIds: _angular_core.InputSignal<LabeledId[] | undefined>;
|
|
909
|
+
/**
|
|
910
|
+
* The list of source types when it's a closed set.
|
|
911
|
+
*/
|
|
912
|
+
readonly sourceTypes: _angular_core.InputSignal<LabeledId[] | undefined>;
|
|
895
913
|
/**
|
|
896
914
|
* Emitted when the operation is changed.
|
|
897
915
|
*/
|
|
@@ -949,7 +967,7 @@ declare class ChainOperationEditorComponent implements OnInit, OnDestroy {
|
|
|
949
967
|
requestPreview(): void;
|
|
950
968
|
save(): void;
|
|
951
969
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChainOperationEditorComponent, never>;
|
|
952
|
-
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; }; "rangePatch": { "alias": "rangePatch"; "required": false; "isSignal": true; }; "multiValuedFeatureIds": { "alias": "multiValuedFeatureIds"; "required": false; "isSignal": true; }; }, { "operation": "operationChange"; "operationChange": "operationChange"; "operationPreview": "operationPreview"; "operationCancel": "operationCancel"; }, never, never, true, never>;
|
|
970
|
+
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; }; "rangePatch": { "alias": "rangePatch"; "required": false; "isSignal": true; }; "multiValuedFeatureIds": { "alias": "multiValuedFeatureIds"; "required": false; "isSignal": true; }; "sourceIds": { "alias": "sourceIds"; "required": false; "isSignal": true; }; "sourceTypes": { "alias": "sourceTypes"; "required": false; "isSignal": true; }; }, { "operation": "operationChange"; "operationChange": "operationChange"; "operationPreview": "operationPreview"; "operationCancel": "operationCancel"; }, never, never, true, never>;
|
|
953
971
|
}
|
|
954
972
|
|
|
955
973
|
/**
|
|
@@ -988,6 +1006,15 @@ declare class ChainResultViewComponent implements OnInit, OnDestroy, AfterViewIn
|
|
|
988
1006
|
readonly selection: _angular_core.WritableSignal<string | undefined>;
|
|
989
1007
|
readonly selectionFeatures: _angular_core.WritableSignal<OperationFeature[]>;
|
|
990
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[]>;
|
|
991
1018
|
/**
|
|
992
1019
|
* True to disable range picking. For instance the snapshot editor,
|
|
993
1020
|
* which uses rangePick to set the edited operation's range, disables
|
|
@@ -1205,6 +1232,14 @@ declare class OperationSourceEditorComponent {
|
|
|
1205
1232
|
* - ▶️ `snapshot` (`Snapshot`): the snapshot to edit.
|
|
1206
1233
|
* - ▶️ `batchOps` (`string`): the batch operations text to set for the editor.
|
|
1207
1234
|
* - ▶️ `noSave` (`boolean`): true to disable saving.
|
|
1235
|
+
* - ▶️ `debug` (`boolean`): true to enable debug mode for view rendition.
|
|
1236
|
+
* - ▶️ `noDecoration` (`boolean`): true to not show character decoration according to the trace features in nodes.
|
|
1237
|
+
* - ▶️ `featureDefs` (`FeatureDefinitions`): definitions for features, including names and values.
|
|
1238
|
+
* - ▶️ `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.
|
|
1239
|
+
* - ▶️ `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.
|
|
1240
|
+
* - ▶️ `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.
|
|
1241
|
+
* - ▶️ `renditionSettings` (`GveRenditionSettings`): settings for rendering the snapshot. These are passed to the snapshot rendition component.
|
|
1242
|
+
* - ▶️ `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.
|
|
1208
1243
|
* - 🔥 `snapshotChange` (`Snapshot`): emitted when the user saves the edited snapshot.
|
|
1209
1244
|
* - 🔥 `snapshotCancel` (`void`): emitted when the user cancels the snapshot editing.
|
|
1210
1245
|
*/
|
|
@@ -1259,6 +1294,18 @@ declare class SnapshotEditorComponent {
|
|
|
1259
1294
|
* values to it. Passed down to feature editors.
|
|
1260
1295
|
*/
|
|
1261
1296
|
readonly multiValuedFeatureIds: _angular_core.InputSignal<string[] | undefined>;
|
|
1297
|
+
/**
|
|
1298
|
+
* The list of source IDs when it's a closed set. Passed down to the operation
|
|
1299
|
+
* source editor, which will show a dropdown to select from these IDs. When not
|
|
1300
|
+
* specified, the source ID can be freely typed in the source editor.
|
|
1301
|
+
*/
|
|
1302
|
+
readonly sourceIds: _angular_core.InputSignal<LabeledId[] | undefined>;
|
|
1303
|
+
/**
|
|
1304
|
+
* The list of source types when it's a closed set. Passed down to the operation
|
|
1305
|
+
* source editor, which will show a dropdown to select from these types. When not
|
|
1306
|
+
* specified, the source type can be freely typed in the source editor.
|
|
1307
|
+
*/
|
|
1308
|
+
readonly sourceTypes: _angular_core.InputSignal<LabeledId[] | undefined>;
|
|
1262
1309
|
/**
|
|
1263
1310
|
* Settings for rendering the snapshot. These are passed to the snapshot rendition
|
|
1264
1311
|
* component.
|
|
@@ -1475,7 +1522,7 @@ declare class SnapshotEditorComponent {
|
|
|
1475
1522
|
*/
|
|
1476
1523
|
save(): void;
|
|
1477
1524
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SnapshotEditorComponent, never>;
|
|
1478
|
-
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; }; "multiValuedFeatureIds": { "alias": "multiValuedFeatureIds"; "required": false; "isSignal": true; }; "renditionSettings": { "alias": "renditionSettings"; "required": false; "isSignal": true; }; "opListMaxHeight": { "alias": "opListMaxHeight"; "required": false; "isSignal": true; }; }, { "snapshot": "snapshotChange"; "snapshotCancel": "snapshotCancel"; }, never, never, true, never>;
|
|
1525
|
+
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; }; "multiValuedFeatureIds": { "alias": "multiValuedFeatureIds"; "required": false; "isSignal": true; }; "sourceIds": { "alias": "sourceIds"; "required": false; "isSignal": true; }; "sourceTypes": { "alias": "sourceTypes"; "required": false; "isSignal": true; }; "renditionSettings": { "alias": "renditionSettings"; "required": false; "isSignal": true; }; "opListMaxHeight": { "alias": "opListMaxHeight"; "required": false; "isSignal": true; }; }, { "snapshot": "snapshotChange"; "snapshotCancel": "snapshotCancel"; }, never, never, true, never>;
|
|
1479
1526
|
}
|
|
1480
1527
|
|
|
1481
1528
|
/**
|