@myrmidon/gve-core 7.0.13 → 7.0.15
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myrmidon/gve-core",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.15",
|
|
4
4
|
"description": "Cadmus - GVE Angular frontend core components.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"GVE"
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"@cisstech/nge": "^18.3.0",
|
|
21
21
|
"@myrmidon/ngx-mat-tools": "^2.0.0",
|
|
22
22
|
"@myrmidon/ngx-tools": "^3.0.0",
|
|
23
|
-
"@myrmidon/gve-snapshot-rendition": "^2.0.
|
|
23
|
+
"@myrmidon/gve-snapshot-rendition": "^2.0.7",
|
|
24
24
|
"gsap": "^3.15.0",
|
|
25
25
|
"nanoid": "^5.1.16"
|
|
26
26
|
},
|
|
@@ -411,6 +411,127 @@ declare class BaseTextEditorComponent {
|
|
|
411
411
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<BaseTextEditorComponent, "gve-base-text-editor", never, { "text": { "alias": "text"; "required": true; "isSignal": true; }; "multiValuedFeatureIds": { "alias": "multiValuedFeatureIds"; "required": false; "isSignal": true; }; }, { "textChange": "textChange"; }, never, never, true, never>;
|
|
412
412
|
}
|
|
413
413
|
|
|
414
|
+
interface OpBaseTextRange extends BaseTextRange {
|
|
415
|
+
/**
|
|
416
|
+
* If true, the `at` property is treated as an index into the base
|
|
417
|
+
* text array.
|
|
418
|
+
*/
|
|
419
|
+
atAsIndex?: boolean;
|
|
420
|
+
}
|
|
421
|
+
/**
|
|
422
|
+
* Base text peephole component. This shows a window of the base text,
|
|
423
|
+
* with a maximum number of characters, each with its text value and
|
|
424
|
+
* numeric ID similar to the BaseTextCharComponent. Users can scroll
|
|
425
|
+
* the window to "slide" the base text and see its surrounding characters,
|
|
426
|
+
* or double click to reset the window to its default position, where
|
|
427
|
+
* selected characters are centered.
|
|
428
|
+
*/
|
|
429
|
+
declare class BaseTextPeepholeComponent {
|
|
430
|
+
private _dragStartX;
|
|
431
|
+
private _dragStartWindowStart;
|
|
432
|
+
/**
|
|
433
|
+
* The total maximum number of characters to show in the window,
|
|
434
|
+
* including the selected characters and their surrounding context.
|
|
435
|
+
*/
|
|
436
|
+
readonly windowWidth: _angular_core.InputSignal<number>;
|
|
437
|
+
/**
|
|
438
|
+
* The default size of the text in the peephole, in em units.
|
|
439
|
+
* The size of the number below the text is computed from this
|
|
440
|
+
* and it is smaller.
|
|
441
|
+
*/
|
|
442
|
+
readonly emSize: _angular_core.InputSignal<number>;
|
|
443
|
+
/**
|
|
444
|
+
* The full base text.
|
|
445
|
+
*/
|
|
446
|
+
readonly text: _angular_core.InputSignal<CharNode[]>;
|
|
447
|
+
/**
|
|
448
|
+
* The range of selected characters. If not set, the peephole will show the
|
|
449
|
+
* first character in the base text plus its surrounding context.
|
|
450
|
+
*/
|
|
451
|
+
readonly selectedRange: _angular_core.InputSignal<OpBaseTextRange | null>;
|
|
452
|
+
/**
|
|
453
|
+
* The index of the first character shown in the window.
|
|
454
|
+
*/
|
|
455
|
+
readonly windowStart: _angular_core.WritableSignal<number>;
|
|
456
|
+
/**
|
|
457
|
+
* True while the user is dragging the window to scroll it.
|
|
458
|
+
*/
|
|
459
|
+
readonly isDragging: _angular_core.WritableSignal<boolean>;
|
|
460
|
+
/**
|
|
461
|
+
* The highest allowed value for windowStart, so that the window
|
|
462
|
+
* never scrolls past the end of the text.
|
|
463
|
+
*/
|
|
464
|
+
private readonly maxWindowStart;
|
|
465
|
+
/**
|
|
466
|
+
* The characters currently visible in the window.
|
|
467
|
+
*/
|
|
468
|
+
readonly visibleChars: _angular_core.Signal<CharNode[]>;
|
|
469
|
+
/**
|
|
470
|
+
* The count of characters hidden to the left of the window.
|
|
471
|
+
*/
|
|
472
|
+
readonly hiddenLeftCount: _angular_core.Signal<number>;
|
|
473
|
+
/**
|
|
474
|
+
* The count of characters hidden to the right of the window.
|
|
475
|
+
*/
|
|
476
|
+
readonly hiddenRightCount: _angular_core.Signal<number>;
|
|
477
|
+
/**
|
|
478
|
+
* The [start,end] indexes (inclusive) of the selection in the full
|
|
479
|
+
* text array, resolved from `selectedRange`, or null when there is
|
|
480
|
+
* no selection or it cannot be resolved.
|
|
481
|
+
*/
|
|
482
|
+
private readonly selectedIndexRange;
|
|
483
|
+
constructor();
|
|
484
|
+
private resolveSelectionStartIndex;
|
|
485
|
+
private computeCenteredStart;
|
|
486
|
+
private setWindowStart;
|
|
487
|
+
/**
|
|
488
|
+
* True if the given index in the full text array is part of the
|
|
489
|
+
* current selection.
|
|
490
|
+
*/
|
|
491
|
+
isSelected(index: number): boolean;
|
|
492
|
+
/**
|
|
493
|
+
* Computes the carousel scale of the character at the given position
|
|
494
|
+
* in the visible window, so that edge characters appear smaller than
|
|
495
|
+
* the ones at the center.
|
|
496
|
+
*/
|
|
497
|
+
getScale(position: number): number;
|
|
498
|
+
/**
|
|
499
|
+
* Scrolls the window one character to the left.
|
|
500
|
+
*/
|
|
501
|
+
scrollLeft(): void;
|
|
502
|
+
/**
|
|
503
|
+
* Scrolls the window one character to the right.
|
|
504
|
+
*/
|
|
505
|
+
scrollRight(): void;
|
|
506
|
+
/**
|
|
507
|
+
* Recenters the window on the current selection (or on the start of
|
|
508
|
+
* the text, when there is no selection).
|
|
509
|
+
*/
|
|
510
|
+
recenter(): void;
|
|
511
|
+
/**
|
|
512
|
+
* Handles arrow key navigation when the component has keyboard focus.
|
|
513
|
+
*/
|
|
514
|
+
onKeyDown(event: KeyboardEvent): void;
|
|
515
|
+
/**
|
|
516
|
+
* Starts a drag-to-scroll interaction.
|
|
517
|
+
*/
|
|
518
|
+
onPointerDown(event: PointerEvent): void;
|
|
519
|
+
/**
|
|
520
|
+
* Updates the window position while dragging.
|
|
521
|
+
*/
|
|
522
|
+
onPointerMove(event: PointerEvent): void;
|
|
523
|
+
/**
|
|
524
|
+
* Ends a drag-to-scroll interaction.
|
|
525
|
+
*/
|
|
526
|
+
onPointerUp(): void;
|
|
527
|
+
/**
|
|
528
|
+
* Recenters the window on double click.
|
|
529
|
+
*/
|
|
530
|
+
onWindowDblClick(): void;
|
|
531
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BaseTextPeepholeComponent, never>;
|
|
532
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<BaseTextPeepholeComponent, "gve-base-text-peephole", never, { "windowWidth": { "alias": "windowWidth"; "required": false; "isSignal": true; }; "emSize": { "alias": "emSize"; "required": false; "isSignal": true; }; "text": { "alias": "text"; "required": false; "isSignal": true; }; "selectedRange": { "alias": "selectedRange"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
533
|
+
}
|
|
534
|
+
|
|
414
535
|
/**
|
|
415
536
|
* Execution step of a char-based chain operation.
|
|
416
537
|
*/
|
|
@@ -770,6 +891,10 @@ interface FeatureDefinitions {
|
|
|
770
891
|
* names, values, and properties.
|
|
771
892
|
* - ▶️ `rangePatch` (`BaseTextRange`): when set, the edited operation's text
|
|
772
893
|
* range (at and run) will be patched with the provided one.
|
|
894
|
+
* - ▶️ `precedingText` (`CharNode[]`): the text resulting from running the
|
|
895
|
+
* operations preceding the edited one, i.e. this operation's input text.
|
|
896
|
+
* Used to feed the at/run peephole preview. When not provided (e.g. not
|
|
897
|
+
* yet computed), the snapshot's base text is used instead.
|
|
773
898
|
* - 🔥 `operationChange` (`CharChainOperation`): emitted when the operation
|
|
774
899
|
* is changed.
|
|
775
900
|
* - 🔥 `operationPreview` (`CharChainOperation`): emitted when the operation
|
|
@@ -835,6 +960,13 @@ declare class ChainOperationEditorComponent implements OnInit, OnDestroy {
|
|
|
835
960
|
* Set when the edited operation's text range is to be patched.
|
|
836
961
|
*/
|
|
837
962
|
readonly rangePatch: _angular_core.InputSignal<BaseTextRange | undefined>;
|
|
963
|
+
/**
|
|
964
|
+
* The text resulting from running the operations preceding the edited
|
|
965
|
+
* one, i.e. this operation's input text. Used to feed the at/run
|
|
966
|
+
* peephole preview shown next to the run field. When not provided
|
|
967
|
+
* (e.g. not yet computed), the snapshot's base text is used instead.
|
|
968
|
+
*/
|
|
969
|
+
readonly precedingText: _angular_core.InputSignal<CharNode[] | undefined>;
|
|
838
970
|
/**
|
|
839
971
|
* The IDs of the features that are multi-valued. If a feature being
|
|
840
972
|
* edited is in this list, the feature editor will allow adding multiple
|
|
@@ -866,6 +998,14 @@ declare class ChainOperationEditorComponent implements OnInit, OnDestroy {
|
|
|
866
998
|
readonly editedElementId: _angular_core.WritableSignal<string | undefined>;
|
|
867
999
|
readonly editedSource: _angular_core.WritableSignal<OperationSource | undefined>;
|
|
868
1000
|
readonly editedSourceIndex: _angular_core.WritableSignal<number>;
|
|
1001
|
+
readonly peepholeWindowWidth: _angular_core.InputSignal<number>;
|
|
1002
|
+
readonly peepholeRange: _angular_core.WritableSignal<OpBaseTextRange>;
|
|
1003
|
+
/**
|
|
1004
|
+
* The text to feed the at/run peephole preview: the preceding text
|
|
1005
|
+
* (this operation's input) when available, otherwise the snapshot's
|
|
1006
|
+
* base text.
|
|
1007
|
+
*/
|
|
1008
|
+
readonly peepholeText: _angular_core.Signal<CharNode[]>;
|
|
869
1009
|
rank: FormControl<number>;
|
|
870
1010
|
groupId: FormControl<string | null>;
|
|
871
1011
|
features: FormControl<Feature[]>;
|
|
@@ -903,7 +1043,7 @@ declare class ChainOperationEditorComponent implements OnInit, OnDestroy {
|
|
|
903
1043
|
requestPreview(): void;
|
|
904
1044
|
save(): void;
|
|
905
1045
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChainOperationEditorComponent, never>;
|
|
906
|
-
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"; "operationPreview": "operationPreview"; "operationCancel": "operationCancel"; }, never, never, true, never>;
|
|
1046
|
+
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; }; "precedingText": { "alias": "precedingText"; "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; }; "peepholeWindowWidth": { "alias": "peepholeWindowWidth"; "required": false; "isSignal": true; }; }, { "operation": "operationChange"; "operationPreview": "operationPreview"; "operationCancel": "operationCancel"; }, never, never, true, never>;
|
|
907
1047
|
}
|
|
908
1048
|
|
|
909
1049
|
/**
|
|
@@ -1315,6 +1455,7 @@ declare class SnapshotEditorComponent {
|
|
|
1315
1455
|
readonly batchOpNumbers: _angular_core.WritableSignal<number[] | undefined>;
|
|
1316
1456
|
readonly batchRangeLabel: _angular_core.WritableSignal<string | undefined>;
|
|
1317
1457
|
readonly batchForSource: _angular_core.WritableSignal<boolean>;
|
|
1458
|
+
readonly peepholeWindowWidth: _angular_core.WritableSignal<number>;
|
|
1318
1459
|
constructor(formBuilder: FormBuilder, _api: GveApiService, _dialog: MatDialog, _dialogService: DialogService, _snackbar: MatSnackBar);
|
|
1319
1460
|
/**
|
|
1320
1461
|
* Initialize rendition settings and event listeners when the element becomes available.
|
|
@@ -1719,5 +1860,5 @@ declare class SettingsService {
|
|
|
1719
1860
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<SettingsService>;
|
|
1720
1861
|
}
|
|
1721
1862
|
|
|
1722
|
-
export { BaseTextCharComponent, BaseTextEditorComponent, BaseTextViewComponent, BatchOperationEditorComponent, ChainOperationEditorComponent, ChainResultViewComponent, FeatureEditorComponent, FeatureSetEditorComponent, FeatureSetPolicy, FeatureSetViewComponent, GveApiService, GveBaseTextService, GveGraphvizService, OperationSourceEditorComponent, OperationType, SettingsService, SnapshotEditorComponent, SnapshotTextEditorComponent, StepsMapComponent };
|
|
1723
|
-
export type { BaseTextChar, BaseTextCharEvent, BaseTextRange, ChainOperationContextStep, ChainOperationTags, CharChain, CharChainLink, CharChainNode, CharChainOperation, CharChainResult, CharNode, Feature, FeatureDefinitions, FeatureMap, FeaturePropMap, GraphvizRankdir, LabeledId, OperationFeature, OperationMetadata, OperationSource, PayloadMatDialogConfig, ResultWrapper, Snapshot, TreeNode };
|
|
1863
|
+
export { BaseTextCharComponent, BaseTextEditorComponent, BaseTextPeepholeComponent, BaseTextViewComponent, BatchOperationEditorComponent, ChainOperationEditorComponent, ChainResultViewComponent, FeatureEditorComponent, FeatureSetEditorComponent, FeatureSetPolicy, FeatureSetViewComponent, GveApiService, GveBaseTextService, GveGraphvizService, OperationSourceEditorComponent, OperationType, SettingsService, SnapshotEditorComponent, SnapshotTextEditorComponent, StepsMapComponent };
|
|
1864
|
+
export type { BaseTextChar, BaseTextCharEvent, BaseTextRange, ChainOperationContextStep, ChainOperationTags, CharChain, CharChainLink, CharChainNode, CharChainOperation, CharChainResult, CharNode, Feature, FeatureDefinitions, FeatureMap, FeaturePropMap, GraphvizRankdir, LabeledId, OpBaseTextRange, OperationFeature, OperationMetadata, OperationSource, PayloadMatDialogConfig, ResultWrapper, Snapshot, TreeNode };
|