@myrmidon/gve-core 3.0.3 → 5.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.
Files changed (28) hide show
  1. package/fesm2022/myrmidon-gve-core.mjs +671 -547
  2. package/fesm2022/myrmidon-gve-core.mjs.map +1 -1
  3. package/index.d.ts +1500 -3
  4. package/package.json +12 -11
  5. package/lib/components/animation-timeline/animation-timeline.component.d.ts +0 -61
  6. package/lib/components/animation-timeline-set/animation-timeline-set.component.d.ts +0 -52
  7. package/lib/components/animation-tween/animation-tween.component.d.ts +0 -58
  8. package/lib/components/base-text-char/base-text-char.component.d.ts +0 -42
  9. package/lib/components/base-text-editor/base-text-editor.component.d.ts +0 -42
  10. package/lib/components/base-text-view/base-text-view.component.d.ts +0 -69
  11. package/lib/components/batch-operation-editor/batch-operation-editor.component.d.ts +0 -44
  12. package/lib/components/chain-operation-editor/chain-operation-editor.component.d.ts +0 -149
  13. package/lib/components/chain-result-view/chain-result-view.component.d.ts +0 -58
  14. package/lib/components/chain-view/chain-view.component.d.ts +0 -42
  15. package/lib/components/feature-editor/feature-editor.component.d.ts +0 -82
  16. package/lib/components/feature-set-editor/feature-set-editor.component.d.ts +0 -76
  17. package/lib/components/feature-set-view/feature-set-view.component.d.ts +0 -54
  18. package/lib/components/ln-heights-editor/ln-heights-editor.component.d.ts +0 -41
  19. package/lib/components/operation-source-editor/operation-source-editor.component.d.ts +0 -52
  20. package/lib/components/snapshot-editor/snapshot-editor.component.d.ts +0 -293
  21. package/lib/components/snapshot-text-editor/snapshot-text-editor.component.d.ts +0 -37
  22. package/lib/components/steps-map/steps-map.component.d.ts +0 -48
  23. package/lib/models.d.ts +0 -15
  24. package/lib/services/gve-api.service.d.ts +0 -148
  25. package/lib/services/gve-graphviz.service.d.ts +0 -20
  26. package/lib/services/settings.service.d.ts +0 -89
  27. package/lib/validators/svg-validators.d.ts +0 -10
  28. package/public-api.d.ts +0 -21
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myrmidon/gve-core",
3
- "version": "3.0.3",
3
+ "version": "5.0.0",
4
4
  "description": "Cadmus - GVE Angular frontend core components.",
5
5
  "keywords": [
6
6
  "GVE"
@@ -14,16 +14,17 @@
14
14
  "name": "Daniele Fusi"
15
15
  },
16
16
  "peerDependencies": {
17
- "@angular/common": "^19.0.0",
18
- "@angular/core": "^19.0.0",
19
- "@cisstech/nge": "^18.0.4",
20
- "@myrmidon/ngx-mat-tools": "^0.0.1",
21
- "@myrmidon/ngx-tools": "^1.0.0",
22
- "@myrmidon/gve-snapshot-view": "^1.1.6",
23
- "@svgdotjs/svg.js": "^3.2.4",
24
- "gsap": "^3.12.5",
25
- "monaco-editor": "^0.52.0",
26
- "nanoid": "^5.0.9"
17
+ "@angular/common": "^20.0.0",
18
+ "@angular/core": "^20.0.0",
19
+ "@angular/material": "^20.0.0",
20
+ "@cisstech/nge": "^18.2.1",
21
+ "@myrmidon/ngx-mat-tools": "^1.0.0",
22
+ "@myrmidon/ngx-tools": "^2.0.0",
23
+ "@myrmidon/gve-snapshot-view": "^1.2.0",
24
+ "@svgdotjs/svg.js": "^3.2.5",
25
+ "gsap": "^3.13.0",
26
+ "monaco-editor": "^0.53.0",
27
+ "nanoid": "^5.1.5"
27
28
  },
28
29
  "dependencies": {
29
30
  "tslib": "^2.3.0"
@@ -1,61 +0,0 @@
1
- import { FormBuilder, FormControl, FormGroup } from '@angular/forms';
2
- import { GveAnimationTimeline, GveAnimationTween } from '@myrmidon/gve-snapshot-view';
3
- import * as i0 from "@angular/core";
4
- /**
5
- * 🔑 `gve-animation-timeline`
6
- *
7
- * A component to edit an animation timeline.
8
- * Used by the `gve-animation-timeline-set` component.
9
- *
10
- * - ▶️ `timeline` (`GveAnimationTimeline`): the animation timeline to edit.
11
- * - ▶️ `elementIds` (`string[]`): the IDs of the elements that can be selected
12
- * by the tween.
13
- * - ▶️ `tags` (`string[]`): the tags that can be used by the timeline.
14
- * - 🔥 `timelineChange` (`GveAnimationTimeline`): emitted when the timeline
15
- * is changed.
16
- * - 🔥 `timelineCancel` (`void`): emitted when the timeline editing is canceled.
17
- */
18
- export declare class AnimationTimelineComponent {
19
- /**
20
- * The animation timeline to edit.
21
- */
22
- readonly timeline: import("@angular/core").ModelSignal<GveAnimationTimeline | undefined>;
23
- /**
24
- * The IDs of the elements that can be selected by the tween.
25
- * This list is used to allow the user to select an element from a dropdown.
26
- */
27
- readonly elementIds: import("@angular/core").InputSignal<string[] | undefined>;
28
- /**
29
- * The tags that can be used by the timeline.
30
- */
31
- readonly tags: import("@angular/core").InputSignal<string[]>;
32
- /**
33
- * Emitted when the timeline is changed.
34
- */
35
- readonly timelineChange: import("@angular/core").OutputEmitterRef<GveAnimationTimeline>;
36
- /**
37
- * Emitted when the timeline editing is canceled.
38
- */
39
- readonly timelineCancel: import("@angular/core").OutputEmitterRef<void>;
40
- tag: FormControl<string>;
41
- tweens: FormControl<GveAnimationTween[]>;
42
- vars: FormControl<string | null>;
43
- form: FormGroup;
44
- editedTweenIndex: number;
45
- editedTween?: GveAnimationTween;
46
- constructor(formBuilder: FormBuilder);
47
- private jsonValidator;
48
- private updateForm;
49
- addTween(): void;
50
- editTween(index: number): void;
51
- deleteTween(index: number): void;
52
- closeTween(): void;
53
- saveTween(tween?: GveAnimationTween): void;
54
- moveTweenUp(index: number): void;
55
- moveTweenDown(index: number): void;
56
- private getTimeline;
57
- close(): void;
58
- save(): void;
59
- static ɵfac: i0.ɵɵFactoryDeclaration<AnimationTimelineComponent, never>;
60
- static ɵcmp: i0.ɵɵComponentDeclaration<AnimationTimelineComponent, "gve-animation-timeline", never, { "timeline": { "alias": "timeline"; "required": false; "isSignal": true; }; "elementIds": { "alias": "elementIds"; "required": false; "isSignal": true; }; "tags": { "alias": "tags"; "required": false; "isSignal": true; }; }, { "timeline": "timelineChange"; "timelineChange": "timelineChange"; "timelineCancel": "timelineCancel"; }, never, never, true, never>;
61
- }
@@ -1,52 +0,0 @@
1
- import { FormBuilder, FormControl, FormGroup } from '@angular/forms';
2
- import { DialogService } from '@myrmidon/ngx-mat-tools';
3
- import { GveAnimationTimeline } from '@myrmidon/gve-snapshot-view';
4
- import * as i0 from "@angular/core";
5
- /**
6
- * 🔑 `gve-animation-timeline-set`
7
- *
8
- * A component to edit a set of animation timelines.
9
- * Used by the `gve-snapshot-editor` component.
10
- *
11
- * - ▶️ `timelines` (`GveAnimationTimeline[]`): the animation timelines to edit.
12
- * - ▶️ `elementIds` (`string[]`): the IDs of the elements that can be selected by the tween.
13
- * - ▶️ `tags` (`string[]`): the tags that can be used by the timeline.
14
- * - 🔥 `timelinesChange` (`GveAnimationTimeline[]`): emitted when the timelines are changed.
15
- * - 🔥 `timelinesCancel` (`void`): emitted when the timeline editing is canceled.
16
- */
17
- export declare class AnimationTimelineSetComponent {
18
- private _dialogService;
19
- /**
20
- * The animation timelines to edit.
21
- */
22
- readonly timelines: import("@angular/core").ModelSignal<GveAnimationTimeline[]>;
23
- /**
24
- * The IDs of the elements that can be selected by the tween.
25
- * This list is used to allow the user to select an element from a dropdown.
26
- */
27
- readonly elementIds: import("@angular/core").InputSignal<string[] | undefined>;
28
- /**
29
- * The tags that can be used by the timeline.
30
- */
31
- readonly tags: import("@angular/core").InputSignal<string[]>;
32
- /**
33
- * Emitted when the timelines are changed.
34
- */
35
- readonly timelinesChange: import("@angular/core").OutputEmitterRef<GveAnimationTimeline[]>;
36
- /**
37
- * Emitted when the timeline editing is canceled.
38
- */
39
- readonly timelinesCancel: import("@angular/core").OutputEmitterRef<void>;
40
- editedTimeline?: GveAnimationTimeline;
41
- set: FormControl<GveAnimationTimeline[]>;
42
- form: FormGroup;
43
- constructor(formBuilder: FormBuilder, _dialogService: DialogService);
44
- private updateForm;
45
- closeTimeline(): void;
46
- newTimeline(): void;
47
- editTimeline(index: number): void;
48
- onTimelineChange(timeline?: GveAnimationTimeline | null): void;
49
- deleteTimeline(index: number): void;
50
- static ɵfac: i0.ɵɵFactoryDeclaration<AnimationTimelineSetComponent, never>;
51
- static ɵcmp: i0.ɵɵComponentDeclaration<AnimationTimelineSetComponent, "gve-animation-timeline-set", never, { "timelines": { "alias": "timelines"; "required": false; "isSignal": true; }; "elementIds": { "alias": "elementIds"; "required": false; "isSignal": true; }; "tags": { "alias": "tags"; "required": false; "isSignal": true; }; }, { "timelines": "timelinesChange"; "timelinesChange": "timelinesChange"; "timelinesCancel": "timelinesCancel"; }, never, never, true, never>;
52
- }
@@ -1,58 +0,0 @@
1
- import { OnDestroy, OnInit } from '@angular/core';
2
- import { FormBuilder, FormControl, FormGroup } from '@angular/forms';
3
- import { GveAnimationTween, TweenType } from '@myrmidon/gve-snapshot-view';
4
- import * as i0 from "@angular/core";
5
- /**
6
- * 🔑 `gve-animation-tween`
7
- *
8
- * A component to edit an animation tween.
9
- * Used by the `gve-animation-timeline` component.
10
- *
11
- * - ▶️ `tween` (`GveAnimationTween`): the tween to edit.
12
- * - ▶️ `elementIds` (`string[]`): the IDs of the elements that can be selected by the tween.
13
- * - 🔥 `tweenChange` (`GveAnimationTween`): emitted when the tween is changed.
14
- * - 🔥 `tweenCancel` (`void`): emitted when the user cancels the edit.
15
- */
16
- export declare class AnimationTweenComponent implements OnInit, OnDestroy {
17
- private _sub?;
18
- /**
19
- * The tween to edit.
20
- */
21
- readonly tween: import("@angular/core").ModelSignal<GveAnimationTween | undefined>;
22
- /**
23
- * The IDs of the elements that can be selected by the tween.
24
- * This list is used to allow the user to select an element from a dropdown.
25
- */
26
- readonly elementIds: import("@angular/core").InputSignal<string[] | undefined>;
27
- /**
28
- * Emitted when the tween is changed.
29
- */
30
- readonly tweenChange: import("@angular/core").OutputEmitterRef<GveAnimationTween>;
31
- /**
32
- * Emitted when the user cancels the edit.
33
- */
34
- readonly tweenCancel: import("@angular/core").OutputEmitterRef<void>;
35
- types: string[];
36
- label: FormControl<string>;
37
- note: FormControl<string | null>;
38
- type: FormControl<TweenType>;
39
- selector: FormControl<string>;
40
- vars: FormControl<string>;
41
- vars2: FormControl<string | null>;
42
- position: FormControl<string | null>;
43
- form: FormGroup;
44
- elementId: FormControl<string | null>;
45
- constructor(formBuilder: FormBuilder);
46
- ngOnInit(): void;
47
- ngOnDestroy(): void;
48
- onVarsChange(vars: string): void;
49
- onVars2Change(vars: string): void;
50
- close(): void;
51
- private jsonValidator;
52
- private updateForm;
53
- private getTween;
54
- openUrl(url: string): void;
55
- save(): void;
56
- static ɵfac: i0.ɵɵFactoryDeclaration<AnimationTweenComponent, never>;
57
- static ɵcmp: i0.ɵɵComponentDeclaration<AnimationTweenComponent, "gve-animation-tween", never, { "tween": { "alias": "tween"; "required": false; "isSignal": true; }; "elementIds": { "alias": "elementIds"; "required": false; "isSignal": true; }; }, { "tween": "tweenChange"; "tweenChange": "tweenChange"; "tweenCancel": "tweenCancel"; }, never, never, true, never>;
58
- }
@@ -1,42 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- /**
3
- * A single character from a base text.
4
- */
5
- export interface BaseTextChar {
6
- id: number;
7
- value: string;
8
- label: string;
9
- color: string;
10
- borderColor: string;
11
- emSize: number;
12
- }
13
- /**
14
- * Event emitted by the base text character component when a character
15
- * is clicked.
16
- */
17
- export interface BaseTextCharEvent {
18
- char: BaseTextChar;
19
- event: MouseEvent;
20
- }
21
- /**
22
- * 🔑 `gve-base-text-char`
23
- *
24
- * A component that displays a single character from a base text.
25
- * Used by `gve-base-text-view`.
26
- */
27
- export declare class BaseTextCharComponent {
28
- defaultColor: string;
29
- defaultBorderColor: string;
30
- defaultEmSize: number;
31
- /**
32
- * The character to display.
33
- */
34
- readonly char: import("@angular/core").InputSignal<BaseTextChar | undefined>;
35
- /**
36
- * Emitted when the character is clicked.
37
- */
38
- readonly charPick: import("@angular/core").OutputEmitterRef<BaseTextCharEvent>;
39
- onCharClick(event: MouseEvent): void;
40
- static ɵfac: i0.ɵɵFactoryDeclaration<BaseTextCharComponent, never>;
41
- static ɵcmp: i0.ɵɵComponentDeclaration<BaseTextCharComponent, "gve-base-text-char", never, { "char": { "alias": "char"; "required": false; "isSignal": true; }; }, { "charPick": "charPick"; }, never, never, true, never>;
42
- }
@@ -1,42 +0,0 @@
1
- import { FormBuilder, FormControl, FormGroup } from '@angular/forms';
2
- import { CharNode, Feature } from '@myrmidon/gve-snapshot-view';
3
- import { DialogService } from '@myrmidon/ngx-mat-tools';
4
- import { BaseTextCharEvent } from '../base-text-char/base-text-char.component';
5
- import { VarBaseTextRange } from '../base-text-view/base-text-view.component';
6
- import * as i0 from "@angular/core";
7
- /**
8
- * 🔑 `gve-base-text-editor`
9
- *
10
- * Editor for snapshot's base text. This can receive a string or an array
11
- * of `CharNode` objects, and lets the user edit the text, character by
12
- * character, optionally also setting its features.
13
- *
14
- * Used by the `gve-snapshot-editor` component.
15
- */
16
- export declare class BaseTextEditorComponent {
17
- private _dialogService;
18
- /**
19
- * The text to edit. In input this can be a string, an array of `CharNode`
20
- * objects, or undefined. In output this will be an array of `CharNode`
21
- * objects.
22
- */
23
- readonly text: import("@angular/core").InputSignalWithTransform<CharNode[] | undefined, string | CharNode[] | undefined>;
24
- /**
25
- * Emitted for the edited text as an array of `CharNode`'s whenever it changes.
26
- */
27
- readonly textChange: import("@angular/core").OutputEmitterRef<CharNode[]>;
28
- userText: FormControl<string>;
29
- form: FormGroup;
30
- selectedChar?: CharNode;
31
- selectedCharLabel?: string;
32
- textRange?: VarBaseTextRange;
33
- constructor(formBuilder: FormBuilder, _dialogService: DialogService);
34
- private resetSelectedChar;
35
- onSelectedChar(event: BaseTextCharEvent): void;
36
- onFeaturesChange(features: Feature[]): void;
37
- onRangePick(range: VarBaseTextRange): void;
38
- patchTextFromUser(): void;
39
- setTextFromUser(): void;
40
- static ɵfac: i0.ɵɵFactoryDeclaration<BaseTextEditorComponent, never>;
41
- static ɵcmp: i0.ɵɵComponentDeclaration<BaseTextEditorComponent, "gve-base-text-editor", never, { "text": { "alias": "text"; "required": true; "isSignal": true; }; }, { "textChange": "textChange"; }, never, never, true, never>;
42
- }
@@ -1,69 +0,0 @@
1
- import { CharNode } from '@myrmidon/gve-snapshot-view';
2
- import { BaseTextChar, BaseTextCharEvent } from '../base-text-char/base-text-char.component';
3
- import * as i0 from "@angular/core";
4
- /**
5
- * A range in the base text.
6
- */
7
- export interface VarBaseTextRange {
8
- at: number;
9
- run: number;
10
- }
11
- /**
12
- * 🔑 `gve-base-text-view`
13
- *
14
- * A component to display a selectable base text.
15
- * Used by the chain result view component and the base text editor component.
16
- *
17
- * - ▶️ `defaultColor` (`string`): the default color for the text.
18
- * - ▶️ `defaultBorderColor` (`string`): the default border color for the text.
19
- * - ▶️ `selectionColor` (`string`): the color for the selected text.
20
- * - ▶️ `hasLineNumber` (`boolean`): true if line numbers should be displayed next to each line.
21
- * - ▶️ `text` (`string` | `CharNode[]`): the text to display.
22
- * - 🔥 `charPick` (`BaseTextCharEvent`): emitted when a character is picked.
23
- * - 🔥 `rangePick` (`VarBaseTextRange`): emitted when a range is picked.
24
- */
25
- export declare class BaseTextViewComponent {
26
- private _lastSelectedChar?;
27
- /**
28
- * The default color for the text.
29
- */
30
- readonly defaultColor: import("@angular/core").InputSignal<string>;
31
- /**
32
- * The default border color for the text.
33
- */
34
- readonly defaultBorderColor: import("@angular/core").InputSignal<string>;
35
- /**
36
- * The color for the selected text.
37
- */
38
- readonly selectionColor: import("@angular/core").InputSignal<string>;
39
- /**
40
- * True if line numbers should be displayed next to each line.
41
- */
42
- readonly hasLineNumber: import("@angular/core").InputSignal<boolean>;
43
- /**
44
- * The text to display.
45
- */
46
- readonly text: import("@angular/core").InputSignal<CharNode[]>;
47
- /**
48
- * An optional callback to get the color of a character node.
49
- * Return null to use the default color.
50
- */
51
- readonly borderColorCallback: import("@angular/core").InputSignal<((node: CharNode) => string | null) | undefined>;
52
- /**
53
- * Emitted when a character is picked.
54
- */
55
- readonly charPick: import("@angular/core").OutputEmitterRef<BaseTextCharEvent>;
56
- /**
57
- * Emitted when a range is picked. This is preceded by a character pick event.
58
- * The range is defined by the starting character and the number of characters.
59
- * The range is inclusive.
60
- */
61
- readonly rangePick: import("@angular/core").OutputEmitterRef<VarBaseTextRange>;
62
- lines: BaseTextChar[][];
63
- constructor();
64
- private buildLines;
65
- private resetColors;
66
- onCharPick(event: BaseTextCharEvent): void;
67
- static ɵfac: i0.ɵɵFactoryDeclaration<BaseTextViewComponent, never>;
68
- static ɵcmp: i0.ɵɵ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; }; "borderColorCallback": { "alias": "borderColorCallback"; "required": false; "isSignal": true; }; }, { "charPick": "charPick"; "rangePick": "rangePick"; }, never, never, true, never>;
69
- }
@@ -1,44 +0,0 @@
1
- import { OnInit } from '@angular/core';
2
- import { FormBuilder, FormControl, FormGroup } from '@angular/forms';
3
- import { MatDialogRef } from '@angular/material/dialog';
4
- import { CharChainOperation } from '@myrmidon/gve-snapshot-view';
5
- import { PayloadMatDialogConfig } from '../../models';
6
- import { GveApiService } from '../../services/gve-api.service';
7
- import * as i0 from "@angular/core";
8
- /**
9
- * 🔑 `gve-batch-operation-editor`
10
- *
11
- * A component to edit a batch of operations. This component can be used both in a dialog
12
- * and as a standalone component.
13
- *
14
- * - ▶️ `preset` (`string`): the optional preset text to parse.
15
- * - 🔥 `operationsChange` (`CharChainOperation[]`): event emitted when operations change.
16
- */
17
- export declare class BatchOperationEditorComponent implements OnInit {
18
- private _api;
19
- dialogRef?: MatDialogRef<BatchOperationEditorComponent> | undefined;
20
- data?: PayloadMatDialogConfig<{
21
- preset?: string;
22
- }> | undefined;
23
- busy?: boolean;
24
- parseError?: string;
25
- text: FormControl<string | null>;
26
- form: FormGroup;
27
- /**
28
- * The preset text to parse if any. Usually you start with a blank
29
- * text, but sometimes you might want to pre-set it.
30
- */
31
- readonly preset: import("@angular/core").InputSignal<string | undefined>;
32
- /**
33
- * Emitted when operations change.
34
- */
35
- readonly operationsChange: import("@angular/core").OutputEmitterRef<CharChainOperation[]>;
36
- constructor(formBuilder: FormBuilder, _api: GveApiService, dialogRef?: MatDialogRef<BatchOperationEditorComponent> | undefined, data?: PayloadMatDialogConfig<{
37
- preset?: string;
38
- }> | undefined);
39
- ngOnInit(): void;
40
- parseOperations(text?: string): void;
41
- close(): void;
42
- static ɵfac: i0.ɵɵFactoryDeclaration<BatchOperationEditorComponent, [null, null, { optional: true; }, { optional: true; }]>;
43
- static ɵcmp: i0.ɵɵComponentDeclaration<BatchOperationEditorComponent, "gve-batch-operation-editor", never, { "preset": { "alias": "preset"; "required": false; "isSignal": true; }; }, { "operationsChange": "operationsChange"; }, never, never, true, never>;
44
- }
@@ -1,149 +0,0 @@
1
- import { OnDestroy, OnInit } from '@angular/core';
2
- import { FormBuilder, FormControl, FormGroup } from '@angular/forms';
3
- import { Clipboard } from '@angular/cdk/clipboard';
4
- import { DialogService } from '@myrmidon/ngx-mat-tools';
5
- import { CharChainOperation, Feature, OperationFeature, OperationType, OperationSource, SnapshotBase } from '@myrmidon/gve-snapshot-view';
6
- import { SettingsService } from '../../services/settings.service';
7
- import * as i0 from "@angular/core";
8
- /**
9
- * 🔑 `gve-chain-operation-editor`
10
- *
11
- * A component for editing a variant generation operation.
12
- * Used by the `gve-snapshot-editor` component.
13
- * - ▶️ `operation` (`CharChainOperation`): the operation to edit.
14
- * - ▶️ `snapshot` (`SnapshotBase`): the snapshot the operation refers to.
15
- * - ▶️ `hidePreview` (`boolean`): whether to hide the preview request button.
16
- * - 🔥 `operationChange` (`CharChainOperation`): emitted when the operation
17
- * is changed.
18
- * - 🔥 `operationPreview` (`CharChainOperation`): emitted when the operation
19
- * preview is requested.
20
- * - 🔥 `operationCancel` (`void`): emitted when operation editing is cancelled.
21
- *
22
- * The editor is composed of many sections:
23
- * - **general**:
24
- * - ID: each operation has an ID, automatically assigned. This is not used in
25
- * the context of the operation or of its transformations, but is provided as a
26
- * reference.
27
- * - at and run: coordinates for the selection of the base text targeted by
28
- * this operation. Check `idx` when `at` is index-based rather than ID-based.
29
- * - to and to-run: a second coordinate, used by some operations.
30
- * - value: the text value argument, for those operations requiring it.
31
- * - rank and group ID.
32
- * - input and output tags.
33
- * - features. These are metadata attached to this operation, and can be any
34
- * type of name=value pairs.
35
- * - **sources**: sources are a special type of metadata used when your text
36
- * versions come from more than a single source. In this case, you can specify
37
- * the source(s) for each operation, just like in a traditional apparatus you
38
- * specify witnesses for each variant. Each source has an ID, a type, a
39
- * probability rank (0=not specified, else 1-N), and an optional free text note.
40
- * - **diplomatic**: SVG `g` code. The diplomatic section is the approximate
41
- * diplomatic representation of the layout of the annotated text. It essentially
42
- * consists in a freely editable SVG code, always grouped into a single root `g`
43
- * element, encoding all the graphical traits representing this operation.
44
- * The visual part of each operation can be placed everywhere on the snapshot,
45
- * as specified by its coordinates.
46
- * - **elements**: features of any of the SVG code elements having an ID.
47
- * The elements section lists all the SVG elements having an `id` attribute in
48
- * the SVG code of the diplomatic section. The ID allows you to attach
49
- * any number of features (metadata modeled as name=value pairs) to each of
50
- * these elements. Among these features, you may use `style` or `class` for
51
- * renditional purposes, and any other name for your own metadata. Note that
52
- * element IDs will be required also when dealing with animations. So, ensure
53
- * to assign an ID to each element you want to animate.
54
- * - **dp feats**: diplomatic features: these are features (metadata modeled
55
- * as name=value pairs) for the diplomatic representation of this operation
56
- * as a whole.
57
- */
58
- export declare class ChainOperationEditorComponent implements OnInit, OnDestroy {
59
- private _clipboard;
60
- private _settings;
61
- private _dialogService;
62
- private readonly _disposables;
63
- private readonly _subs;
64
- private readonly _nanoid;
65
- private _editorModel?;
66
- private _editor?;
67
- private _editedSourceIndex;
68
- /**
69
- * The operation to edit.
70
- */
71
- readonly operation: import("@angular/core").ModelSignal<CharChainOperation | undefined>;
72
- /**
73
- * The snapshot the operation refers to.
74
- */
75
- readonly snapshot: import("@angular/core").InputSignal<SnapshotBase | undefined>;
76
- /**
77
- * Whether to hide the preview request button.
78
- */
79
- readonly hidePreview: import("@angular/core").InputSignal<boolean | undefined>;
80
- /**
81
- * Emitted when the operation is changed.
82
- */
83
- readonly operationChange: import("@angular/core").OutputEmitterRef<CharChainOperation>;
84
- /**
85
- * Emitted when the operation preview is requested.
86
- */
87
- readonly operationPreview: import("@angular/core").OutputEmitterRef<CharChainOperation>;
88
- /**
89
- * Emitted when operation editing is cancelled.
90
- */
91
- readonly operationCancel: import("@angular/core").OutputEmitterRef<void>;
92
- tabIndex: number;
93
- id?: string;
94
- hasTo: boolean;
95
- hasToRun: boolean;
96
- hasValue: boolean;
97
- rank: FormControl<number>;
98
- groupId: FormControl<string | null>;
99
- features: FormControl<Feature[]>;
100
- sources: FormControl<OperationSource[]>;
101
- type: FormControl<OperationType>;
102
- at: FormControl<number>;
103
- atAsIndex: FormControl<boolean>;
104
- to: FormControl<number>;
105
- toAsIndex: FormControl<boolean>;
106
- inputTag: FormControl<string | null>;
107
- outputTag: FormControl<string | null>;
108
- run: FormControl<number>;
109
- toRun: FormControl<number>;
110
- value: FormControl<string | null>;
111
- svg: FormControl<string>;
112
- elementFeatures: FormControl<Record<string, Feature[]>>;
113
- newTextHidden: FormControl<boolean>;
114
- dpFeatures: FormControl<Feature[]>;
115
- form: FormGroup;
116
- elements: SVGElement[];
117
- editedElementId?: string;
118
- editedSource?: OperationSource;
119
- constructor(formBuilder: FormBuilder, _clipboard: Clipboard, _settings: SettingsService, _dialogService: DialogService);
120
- ngOnInit(): void;
121
- ngOnDestroy(): void;
122
- private hasTextChanges;
123
- onCreateEditor(editor: monaco.editor.IEditor): void;
124
- onFeaturesChange(features: OperationFeature[]): void;
125
- onDpFeaturesChange(features: Feature[]): void;
126
- addSource(): void;
127
- editSource(index: number): void;
128
- closeSource(): void;
129
- onSourceChange(source: OperationSource): void;
130
- saveSvg(): void;
131
- openSvgEditor(): void;
132
- loadSvg(): void;
133
- setSvgFromClipboard(): void;
134
- private parseSvg;
135
- removeDecimals(): void;
136
- wrapInGroup(): void;
137
- onTabIndexChange(index: number): void;
138
- editElementFeatures(element: SVGElement): void;
139
- deleteElementFeatures(element: SVGElement): void;
140
- onElementFeaturesChange(features: Feature[]): void;
141
- private updateArgsUI;
142
- private updateForm;
143
- cancel(): void;
144
- private getOperation;
145
- requestPreview(): void;
146
- save(): void;
147
- static ɵfac: i0.ɵɵFactoryDeclaration<ChainOperationEditorComponent, never>;
148
- static ɵcmp: i0.ɵɵ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; }; }, { "operation": "operationChange"; "operationChange": "operationChange"; "operationPreview": "operationPreview"; "operationCancel": "operationCancel"; }, never, never, true, never>;
149
- }
@@ -1,58 +0,0 @@
1
- import { OnDestroy, OnInit } from '@angular/core';
2
- import { FormBuilder, FormControl } from '@angular/forms';
3
- import { CharNode, OperationFeature } from '@myrmidon/gve-snapshot-view';
4
- import { VarBaseTextRange } from '../base-text-view/base-text-view.component';
5
- import { ChainOperationContextStep, CharChainResult } from '../../services/gve-api.service';
6
- import { BaseTextCharEvent } from '../base-text-char/base-text-char.component';
7
- import * as i0 from "@angular/core";
8
- /**
9
- * 🔑 `gve-chain-result-view`
10
- *
11
- * Component to display a chain result. This provides a version picker
12
- * by staged version or simple step, and shows the selected step's text
13
- * and features, plus a steps map. User can pick a step from both the
14
- * pickers or the map.
15
- * Used by the `gve-snapshot-editor` component.
16
- *
17
- * - ▶️ `result` (`CharChainResult`): the result to display.
18
- * - 🔥 `stepPick` (`ChainOperationContextStep`): emitted when a
19
- * result's step is picked by the user.
20
- */
21
- export declare class ChainResultViewComponent implements OnInit, OnDestroy {
22
- private _subs?;
23
- /**
24
- * The result to display.
25
- */
26
- readonly result: import("@angular/core").InputSignal<CharChainResult | undefined>;
27
- /**
28
- * The index of the initial step to display after the result is set.
29
- * If the index is negative, it is counted from the end of the steps.
30
- */
31
- readonly initialStepIndex: import("@angular/core").InputSignal<number | undefined>;
32
- /**
33
- * Emitted when a result's step is picked by the user.
34
- */
35
- readonly stepPick: import("@angular/core").OutputEmitterRef<ChainOperationContextStep>;
36
- versionTags: string[];
37
- tags: string[];
38
- versionTag: FormControl<string | null>;
39
- tag: FormControl<string | null>;
40
- step?: ChainOperationContextStep;
41
- selection?: string;
42
- selectionFeatures: OperationFeature[];
43
- constructor(formBuilder: FormBuilder);
44
- ngOnInit(): void;
45
- getCharBorderColor(node: CharNode): string | null;
46
- private selectInitialStep;
47
- ngOnDestroy(): void;
48
- private updateVersionTags;
49
- private getTagFromVersion;
50
- private updateForm;
51
- private getNodeFeatures;
52
- private findNode;
53
- onStepCharPick(event: BaseTextCharEvent): void;
54
- onStepRangePick(range: VarBaseTextRange): void;
55
- onStepChange(step?: ChainOperationContextStep): void;
56
- static ɵfac: i0.ɵɵFactoryDeclaration<ChainResultViewComponent, never>;
57
- static ɵcmp: i0.ɵɵ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>;
58
- }
@@ -1,42 +0,0 @@
1
- import { OnDestroy } from '@angular/core';
2
- import { FormControl } from '@angular/forms';
3
- import { MatSnackBar } from '@angular/material/snack-bar';
4
- import { Clipboard } from '@angular/cdk/clipboard';
5
- import { GraphvizRankdir, GveGraphvizService } from '../../services/gve-graphviz.service';
6
- import { CharChain } from '../../services/gve-api.service';
7
- import { SettingsService } from '../../services/settings.service';
8
- import * as i0 from "@angular/core";
9
- export declare class ChainViewComponent implements OnDestroy {
10
- private _graphviz;
11
- private _settings;
12
- private _clipboard;
13
- private _snackbar;
14
- private readonly _sub?;
15
- /**
16
- * The chain to display.
17
- */
18
- readonly chain: import("@angular/core").InputSignal<CharChain | undefined>;
19
- /**
20
- * The direction of the graph.
21
- */
22
- readonly direction: import("@angular/core").InputSignal<GraphvizRankdir>;
23
- /**
24
- * All the distinct tags in the chain.
25
- */
26
- readonly tags: import("@angular/core").Signal<string[]>;
27
- /**
28
- * The tags to show, or empty to show all of them.
29
- */
30
- readonly selectedTags: import("@angular/core").ModelSignal<string[]>;
31
- /**
32
- * The Graphviz representation of the chain.
33
- */
34
- readonly graph: import("@angular/core").Signal<string>;
35
- userTags: FormControl<string[]>;
36
- constructor(_graphviz: GveGraphvizService, _settings: SettingsService, _clipboard: Clipboard, _snackbar: MatSnackBar);
37
- ngOnDestroy(): void;
38
- copyGraph(): void;
39
- openExternalEditor(): void;
40
- static ɵfac: i0.ɵɵFactoryDeclaration<ChainViewComponent, never>;
41
- static ɵcmp: i0.ɵɵComponentDeclaration<ChainViewComponent, "gve-chain-view", never, { "chain": { "alias": "chain"; "required": false; "isSignal": true; }; "direction": { "alias": "direction"; "required": false; "isSignal": true; }; "selectedTags": { "alias": "selectedTags"; "required": false; "isSignal": true; }; }, { "selectedTags": "selectedTagsChange"; }, never, never, true, never>;
42
- }