@myrmidon/gve-core 5.0.1 → 5.0.3
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/fesm2022/myrmidon-gve-core.mjs +264 -179
- package/fesm2022/myrmidon-gve-core.mjs.map +1 -1
- package/index.d.ts +46 -6
- package/package.json +3 -3
package/index.d.ts
CHANGED
|
@@ -250,7 +250,7 @@ interface VarBaseTextRange {
|
|
|
250
250
|
* - 🔥 `rangePick` (`VarBaseTextRange`): emitted when a range is picked.
|
|
251
251
|
*/
|
|
252
252
|
declare class BaseTextViewComponent {
|
|
253
|
-
private
|
|
253
|
+
private _lastSelectedPosition?;
|
|
254
254
|
/**
|
|
255
255
|
* The default color for the text.
|
|
256
256
|
*/
|
|
@@ -291,11 +291,31 @@ declare class BaseTextViewComponent {
|
|
|
291
291
|
* The range is inclusive.
|
|
292
292
|
*/
|
|
293
293
|
readonly rangePick: _angular_core.OutputEmitterRef<VarBaseTextRange>;
|
|
294
|
-
|
|
294
|
+
/**
|
|
295
|
+
* The base characters organized by lines, computed from text input.
|
|
296
|
+
*/
|
|
297
|
+
private readonly baseLines;
|
|
298
|
+
/**
|
|
299
|
+
* Signal for tracking selected range state.
|
|
300
|
+
*/
|
|
301
|
+
private readonly selectedRange;
|
|
302
|
+
/**
|
|
303
|
+
* The lines with selection state applied, computed from base lines and selection.
|
|
304
|
+
*/
|
|
305
|
+
readonly lines: _angular_core.Signal<BaseTextChar[][]>;
|
|
295
306
|
constructor();
|
|
296
307
|
private buildLines;
|
|
297
|
-
private resetColors;
|
|
298
308
|
onCharPick(event: BaseTextCharEvent): void;
|
|
309
|
+
/**
|
|
310
|
+
* Find the position (index in flat array) of a character by its ID.
|
|
311
|
+
* Returns -1 if not found.
|
|
312
|
+
*/
|
|
313
|
+
private findCharPosition;
|
|
314
|
+
/**
|
|
315
|
+
* Get the character ID at a specific position in the flat array.
|
|
316
|
+
* Returns the ID or -1 if position is out of bounds.
|
|
317
|
+
*/
|
|
318
|
+
private getCharIdAtPosition;
|
|
299
319
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BaseTextViewComponent, never>;
|
|
300
320
|
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
321
|
}
|
|
@@ -780,6 +800,10 @@ declare class ChainOperationEditorComponent implements OnInit, OnDestroy {
|
|
|
780
800
|
* Definitions for diplomatic features, including names and values.
|
|
781
801
|
*/
|
|
782
802
|
readonly diplomaticFeatureDefs: _angular_core.InputSignal<FeatureDefinitions | undefined>;
|
|
803
|
+
/**
|
|
804
|
+
* Set when the edited operation's text range is to be patched.
|
|
805
|
+
*/
|
|
806
|
+
readonly rangePatch: _angular_core.InputSignal<VarBaseTextRange | undefined>;
|
|
783
807
|
/**
|
|
784
808
|
* Emitted when the operation is changed.
|
|
785
809
|
*/
|
|
@@ -823,6 +847,7 @@ declare class ChainOperationEditorComponent implements OnInit, OnDestroy {
|
|
|
823
847
|
constructor(formBuilder: FormBuilder, _clipboard: Clipboard, _settings: SettingsService, _dialogService: DialogService);
|
|
824
848
|
ngOnInit(): void;
|
|
825
849
|
ngOnDestroy(): void;
|
|
850
|
+
private toggleLfEscape;
|
|
826
851
|
private hasTextChanges;
|
|
827
852
|
onCreateEditor(editor: monaco.editor.IEditor): void;
|
|
828
853
|
onFeaturesChange(features: OperationFeature[]): void;
|
|
@@ -849,7 +874,7 @@ declare class ChainOperationEditorComponent implements OnInit, OnDestroy {
|
|
|
849
874
|
requestPreview(): void;
|
|
850
875
|
save(): void;
|
|
851
876
|
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>;
|
|
877
|
+
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; }; "rangePatch": { "alias": "rangePatch"; "required": false; "isSignal": true; }; }, { "operation": "operationChange"; "operationChange": "operationChange"; "operationPreview": "operationPreview"; "operationCancel": "operationCancel"; }, never, never, true, never>;
|
|
853
878
|
}
|
|
854
879
|
|
|
855
880
|
/**
|
|
@@ -887,6 +912,17 @@ declare class ChainResultViewComponent implements OnInit, OnDestroy, AfterViewIn
|
|
|
887
912
|
readonly step: _angular_core.WritableSignal<ChainOperationContextStep | undefined>;
|
|
888
913
|
readonly selection: _angular_core.WritableSignal<string | undefined>;
|
|
889
914
|
readonly selectionFeatures: _angular_core.WritableSignal<OperationFeature[]>;
|
|
915
|
+
readonly selectionRange: _angular_core.WritableSignal<VarBaseTextRange | undefined>;
|
|
916
|
+
/**
|
|
917
|
+
* True to disable range picking. For instance the snapshot editor,
|
|
918
|
+
* which uses rangePick to set the edited operation's range, disables
|
|
919
|
+
* this when no operation is being edited.
|
|
920
|
+
*/
|
|
921
|
+
readonly disabledRangePick: _angular_core.InputSignal<boolean>;
|
|
922
|
+
/**
|
|
923
|
+
* Emitted when a range is picked.
|
|
924
|
+
*/
|
|
925
|
+
readonly rangePick: _angular_core.OutputEmitterRef<VarBaseTextRange>;
|
|
890
926
|
versionTag: FormControl<string | null>;
|
|
891
927
|
tag: FormControl<string | null>;
|
|
892
928
|
constructor(formBuilder: FormBuilder);
|
|
@@ -904,8 +940,9 @@ declare class ChainResultViewComponent implements OnInit, OnDestroy, AfterViewIn
|
|
|
904
940
|
onTextCharPick(event: BaseTextCharEvent): void;
|
|
905
941
|
onTextRangePick(range: VarBaseTextRange): void;
|
|
906
942
|
onStepChange(step?: ChainOperationContextStep): void;
|
|
943
|
+
pickRange(): void;
|
|
907
944
|
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>;
|
|
945
|
+
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; }; "disabledRangePick": { "alias": "disabledRangePick"; "required": false; "isSignal": true; }; }, { "stepPick": "stepPick"; "rangePick": "rangePick"; }, never, never, true, never>;
|
|
909
946
|
}
|
|
910
947
|
|
|
911
948
|
type GraphvizRankdir = 'TB' | 'LR' | 'BT' | 'RL';
|
|
@@ -1252,6 +1289,7 @@ declare class SnapshotEditorComponent {
|
|
|
1252
1289
|
defs: FormControl<string | null>;
|
|
1253
1290
|
timelines: FormControl<GveAnimationTimeline[]>;
|
|
1254
1291
|
readonly showChain: FormControl<boolean>;
|
|
1292
|
+
readonly featDetails: FormControl<boolean>;
|
|
1255
1293
|
readonly chain: _angular_core.WritableSignal<CharChain | undefined>;
|
|
1256
1294
|
readonly opTags: _angular_core.WritableSignal<string[]>;
|
|
1257
1295
|
readonly opElementIds: _angular_core.WritableSignal<string[]>;
|
|
@@ -1259,6 +1297,7 @@ declare class SnapshotEditorComponent {
|
|
|
1259
1297
|
readonly lineCount: _angular_core.WritableSignal<number>;
|
|
1260
1298
|
readonly editedOp: _angular_core.WritableSignal<CharChainOperation | undefined>;
|
|
1261
1299
|
readonly editedOpIndex: _angular_core.WritableSignal<number>;
|
|
1300
|
+
readonly editedOpRangePatch: _angular_core.WritableSignal<VarBaseTextRange | undefined>;
|
|
1262
1301
|
readonly busy: _angular_core.WritableSignal<boolean>;
|
|
1263
1302
|
readonly opTypeMap: {
|
|
1264
1303
|
0: string;
|
|
@@ -1296,8 +1335,9 @@ declare class SnapshotEditorComponent {
|
|
|
1296
1335
|
/**
|
|
1297
1336
|
* Handle the event fired by the base text editor to pick a text range.
|
|
1298
1337
|
* @param range The picked range.
|
|
1338
|
+
* @param applyToOp True to also apply the picked range to the edited operation.
|
|
1299
1339
|
*/
|
|
1300
|
-
onRangePick(range?: VarBaseTextRange): void;
|
|
1340
|
+
onRangePick(range?: VarBaseTextRange, applyToOp?: boolean): void;
|
|
1301
1341
|
/**
|
|
1302
1342
|
* Update the lists of operation output tags and element IDs by collecting
|
|
1303
1343
|
* all the operation tags and the IDs of the elements in their diplomatic.g
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myrmidon/gve-core",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.3",
|
|
4
4
|
"description": "Cadmus - GVE Angular frontend core components.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"GVE"
|
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
"@cisstech/nge": "^18.2.1",
|
|
21
21
|
"@myrmidon/ngx-mat-tools": "^1.0.0",
|
|
22
22
|
"@myrmidon/ngx-tools": "^2.0.0",
|
|
23
|
-
"@myrmidon/gve-snapshot-view": "^1.2.
|
|
23
|
+
"@myrmidon/gve-snapshot-view": "^1.2.1",
|
|
24
24
|
"@svgdotjs/svg.js": "^3.2.5",
|
|
25
25
|
"gsap": "^3.13.0",
|
|
26
|
-
"monaco-editor": "^0.
|
|
26
|
+
"monaco-editor": "^0.54.0",
|
|
27
27
|
"nanoid": "^5.1.5"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|