inspector-ng 0.0.16 → 0.0.22
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 +5 -3
- package/esm2022/lib/checkpoints.mjs +74 -1
- package/esm2022/lib/distances.mjs +48 -30
- package/esm2022/lib/inspector.component.mjs +195 -33
- package/esm2022/lib/types.mjs +1 -1
- package/fesm2022/inspector-ng.mjs +314 -61
- package/fesm2022/inspector-ng.mjs.map +1 -1
- package/lib/checkpoints.d.ts +4 -0
- package/lib/distances.d.ts +2 -2
- package/lib/inspector.component.d.ts +18 -3
- package/lib/types.d.ts +3 -0
- package/package.json +1 -1
package/lib/checkpoints.d.ts
CHANGED
|
@@ -43,7 +43,10 @@ export declare class InspectorCheckpointService {
|
|
|
43
43
|
constructor(repository: InspectorCheckpointRepository, store: Store | null, router: Router | null, platformId: object);
|
|
44
44
|
load(): Promise<void>;
|
|
45
45
|
save(): Promise<InspectorCheckpointRecord | null>;
|
|
46
|
+
importCheckpoint(value: unknown): Promise<InspectorCheckpointRecord | null>;
|
|
46
47
|
restore(id: string): Promise<boolean>;
|
|
48
|
+
navigateToRoute(route: string): Promise<boolean>;
|
|
49
|
+
resolveRoute(query: string): string | null;
|
|
47
50
|
rename(id: string, name: string): Promise<boolean>;
|
|
48
51
|
delete(id: string): Promise<boolean>;
|
|
49
52
|
clearError(): void;
|
|
@@ -58,5 +61,6 @@ export declare class InspectorCheckpointService {
|
|
|
58
61
|
}
|
|
59
62
|
export declare function provideInspectorCheckpoints(): EnvironmentProviders;
|
|
60
63
|
export declare function nextAutomaticName(route: string, names: string[]): string;
|
|
64
|
+
export declare function resolveRouteQuery(query: string, basePathname: string): string | null;
|
|
61
65
|
export declare function checkpointActivityAt(checkpoint: InspectorCheckpointRecord): string;
|
|
62
66
|
export declare function recentActivityFirst(a: InspectorCheckpointRecord, b: InspectorCheckpointRecord): number;
|
package/lib/distances.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { DistanceOverlay, Rect } from './types';
|
|
2
|
-
export declare const getDistanceOverlay: (rectA: Rect, rectB: Rect) => DistanceOverlay;
|
|
1
|
+
import { DistanceOverlay, DistanceRelation, Rect } from './types';
|
|
2
|
+
export declare const getDistanceOverlay: (rectA: Rect, rectB: Rect, relation?: DistanceRelation) => DistanceOverlay;
|
|
@@ -2,13 +2,19 @@ import { ElementRef, OnDestroy } from '@angular/core';
|
|
|
2
2
|
import { DistanceOverlay, Guide, GuideOrientation, InspectMeasurement, Rect, TextBlockAnnotation, ToolMode } from './types';
|
|
3
3
|
import { checkpointActivityAt, InspectorCheckpointRecord, InspectorCheckpointService } from './checkpoints';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
|
-
type InspectorCommandActionId = 'select' | 'type' | 'save' | 'vertical' | 'horizontal';
|
|
5
|
+
type InspectorCommandActionId = 'select' | 'type' | 'save' | 'import' | 'vertical' | 'horizontal';
|
|
6
6
|
interface InspectorCommandAction {
|
|
7
7
|
readonly id: InspectorCommandActionId;
|
|
8
8
|
readonly label: string;
|
|
9
9
|
readonly ariaLabel: string;
|
|
10
10
|
readonly keywords: string;
|
|
11
11
|
}
|
|
12
|
+
interface GuideDistance {
|
|
13
|
+
readonly orientation: GuideOrientation;
|
|
14
|
+
readonly start: number;
|
|
15
|
+
readonly end: number;
|
|
16
|
+
readonly value: number;
|
|
17
|
+
}
|
|
12
18
|
export declare class inspectorComponent implements OnDestroy {
|
|
13
19
|
readonly Math: Math;
|
|
14
20
|
readonly checkpointActivityAt: typeof checkpointActivityAt;
|
|
@@ -18,6 +24,7 @@ export declare class inspectorComponent implements OnDestroy {
|
|
|
18
24
|
readonly overlayRoot: import("@angular/core").Signal<ElementRef<HTMLElement> | undefined>;
|
|
19
25
|
readonly checkpointDialog: import("@angular/core").Signal<ElementRef<HTMLDialogElement> | undefined>;
|
|
20
26
|
readonly checkpointSearch: import("@angular/core").Signal<ElementRef<HTMLInputElement> | undefined>;
|
|
27
|
+
readonly checkpointRename: import("@angular/core").Signal<ElementRef<HTMLInputElement> | undefined>;
|
|
21
28
|
highlightColor: string;
|
|
22
29
|
guideColor: string;
|
|
23
30
|
hoverHighlightEnabled: boolean;
|
|
@@ -136,12 +143,15 @@ export declare class inspectorComponent implements OnDestroy {
|
|
|
136
143
|
}>;
|
|
137
144
|
readonly filteredCheckpoints: import("@angular/core").Signal<InspectorCheckpointRecord[]>;
|
|
138
145
|
readonly filteredInspectorActions: import("@angular/core").Signal<readonly InspectorCommandAction[]>;
|
|
146
|
+
readonly navigateTarget: import("@angular/core").Signal<string | null>;
|
|
147
|
+
readonly actionIndexOffset: import("@angular/core").Signal<number>;
|
|
139
148
|
readonly commandResultCount: import("@angular/core").Signal<number>;
|
|
140
149
|
readonly activeCommandResultId: import("@angular/core").Signal<string | null>;
|
|
141
150
|
readonly enabled: import("@angular/core").WritableSignal<boolean>;
|
|
142
151
|
readonly toolMode: import("@angular/core").WritableSignal<ToolMode>;
|
|
143
152
|
readonly guideOrientation: import("@angular/core").WritableSignal<GuideOrientation>;
|
|
144
153
|
readonly guides: import("@angular/core").WritableSignal<Guide[]>;
|
|
154
|
+
readonly guideDistances: import("@angular/core").Signal<GuideDistance[]>;
|
|
145
155
|
readonly hoverRect: import("@angular/core").WritableSignal<Rect | null>;
|
|
146
156
|
readonly selectedGuideId: import("@angular/core").WritableSignal<string | null>;
|
|
147
157
|
readonly selectedMeasurement: import("@angular/core").WritableSignal<InspectMeasurement | null>;
|
|
@@ -167,15 +177,19 @@ export declare class inspectorComponent implements OnDestroy {
|
|
|
167
177
|
toggleTypography(): void;
|
|
168
178
|
disableInspector(): void;
|
|
169
179
|
saveCheckpoint(): Promise<void>;
|
|
180
|
+
downloadCheckpoint(checkpoint: InspectorCheckpointRecord, event?: Event): void;
|
|
181
|
+
beginImport(): Promise<void>;
|
|
170
182
|
openCheckpointCommandBar(): Promise<void>;
|
|
171
183
|
closeCheckpointCommandBar(): void;
|
|
172
184
|
updateCheckpointQuery(event: Event): void;
|
|
173
185
|
cyclePet(event?: Event): void;
|
|
174
186
|
setActiveCheckpoint(index: number): void;
|
|
175
|
-
shouldShowCheckpointRoute(checkpoint: InspectorCheckpointRecord): boolean;
|
|
176
187
|
setActiveInspectorAction(index: number): void;
|
|
177
188
|
executeInspectorAction(action: InspectorCommandAction): Promise<void>;
|
|
178
189
|
restoreCheckpoint(checkpoint: InspectorCheckpointRecord): Promise<void>;
|
|
190
|
+
activateCheckpoint(checkpoint: InspectorCheckpointRecord, event?: MouseEvent): void;
|
|
191
|
+
navigateToCheckpoint(checkpoint: InspectorCheckpointRecord): Promise<void>;
|
|
192
|
+
navigateToQueryRoute(): Promise<void>;
|
|
179
193
|
beginRename(checkpoint: InspectorCheckpointRecord, event?: Event): void;
|
|
180
194
|
updateRenameDraft(event: Event): void;
|
|
181
195
|
finishRename(checkpoint: InspectorCheckpointRecord): Promise<void>;
|
|
@@ -195,7 +209,6 @@ export declare class inspectorComponent implements OnDestroy {
|
|
|
195
209
|
handleKeyup(event: KeyboardEvent): void;
|
|
196
210
|
private hasInspectorCanvasState;
|
|
197
211
|
private clearInspectorCanvas;
|
|
198
|
-
private normalizeCheckpointLabel;
|
|
199
212
|
handlePointerMove(event: PointerEvent): void;
|
|
200
213
|
handlePointerUp(): void;
|
|
201
214
|
handleClick(event: MouseEvent): void;
|
|
@@ -206,8 +219,10 @@ export declare class inspectorComponent implements OnDestroy {
|
|
|
206
219
|
private clampActiveCommand;
|
|
207
220
|
private scrollActiveCommandIntoView;
|
|
208
221
|
private showCheckpointToast;
|
|
222
|
+
private checkpointFileName;
|
|
209
223
|
private selectElementAtPoint;
|
|
210
224
|
private updateDistanceOverlay;
|
|
225
|
+
private getDistanceRelation;
|
|
211
226
|
private refreshTypographyBlocks;
|
|
212
227
|
private randomizePet;
|
|
213
228
|
private addGuide;
|
package/lib/types.d.ts
CHANGED
|
@@ -66,11 +66,14 @@ export type DistanceAxis = {
|
|
|
66
66
|
y?: number;
|
|
67
67
|
value: number;
|
|
68
68
|
};
|
|
69
|
+
export type DistanceRelation = "a-inside-b" | "b-inside-a";
|
|
69
70
|
export type DistanceOverlay = {
|
|
70
71
|
rectA: Rect;
|
|
71
72
|
rectB: Rect;
|
|
72
73
|
horizontal: DistanceAxis | null;
|
|
73
74
|
vertical: DistanceAxis | null;
|
|
75
|
+
horizontalDistances: DistanceAxis[];
|
|
76
|
+
verticalDistances: DistanceAxis[];
|
|
74
77
|
connectors: Array<{
|
|
75
78
|
x1: number;
|
|
76
79
|
y1: number;
|