inspector-ng 0.0.15 → 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 +9 -7
- package/esm2022/lib/checkpoints.mjs +84 -2
- package/esm2022/lib/distances.mjs +84 -2
- package/esm2022/lib/inspector.component.mjs +246 -45
- package/esm2022/lib/types.mjs +1 -1
- package/fesm2022/inspector-ng.mjs +411 -46
- package/fesm2022/inspector-ng.mjs.map +1 -1
- package/lib/checkpoints.d.ts +5 -0
- package/lib/distances.d.ts +2 -2
- package/lib/inspector.component.d.ts +20 -3
- package/lib/types.d.ts +3 -0
- package/package.json +1 -1
package/lib/checkpoints.d.ts
CHANGED
|
@@ -43,10 +43,14 @@ 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;
|
|
53
|
+
private restoreState;
|
|
50
54
|
private currentRoute;
|
|
51
55
|
private currentPathname;
|
|
52
56
|
private missingStoreMessage;
|
|
@@ -57,5 +61,6 @@ export declare class InspectorCheckpointService {
|
|
|
57
61
|
}
|
|
58
62
|
export declare function provideInspectorCheckpoints(): EnvironmentProviders;
|
|
59
63
|
export declare function nextAutomaticName(route: string, names: string[]): string;
|
|
64
|
+
export declare function resolveRouteQuery(query: string, basePathname: string): string | null;
|
|
60
65
|
export declare function checkpointActivityAt(checkpoint: InspectorCheckpointRecord): string;
|
|
61
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' | '
|
|
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>;
|
|
@@ -156,6 +166,7 @@ export declare class inspectorComponent implements OnDestroy {
|
|
|
156
166
|
private draggingGuideId;
|
|
157
167
|
private selectedElement;
|
|
158
168
|
private hoverElement;
|
|
169
|
+
private hasSelectedPet;
|
|
159
170
|
private toastTimer;
|
|
160
171
|
constructor(platformId: object);
|
|
161
172
|
ngOnInit(): void;
|
|
@@ -166,15 +177,19 @@ export declare class inspectorComponent implements OnDestroy {
|
|
|
166
177
|
toggleTypography(): void;
|
|
167
178
|
disableInspector(): void;
|
|
168
179
|
saveCheckpoint(): Promise<void>;
|
|
180
|
+
downloadCheckpoint(checkpoint: InspectorCheckpointRecord, event?: Event): void;
|
|
181
|
+
beginImport(): Promise<void>;
|
|
169
182
|
openCheckpointCommandBar(): Promise<void>;
|
|
170
183
|
closeCheckpointCommandBar(): void;
|
|
171
184
|
updateCheckpointQuery(event: Event): void;
|
|
172
185
|
cyclePet(event?: Event): void;
|
|
173
186
|
setActiveCheckpoint(index: number): void;
|
|
174
|
-
shouldShowCheckpointRoute(checkpoint: InspectorCheckpointRecord): boolean;
|
|
175
187
|
setActiveInspectorAction(index: number): void;
|
|
176
188
|
executeInspectorAction(action: InspectorCommandAction): Promise<void>;
|
|
177
189
|
restoreCheckpoint(checkpoint: InspectorCheckpointRecord): Promise<void>;
|
|
190
|
+
activateCheckpoint(checkpoint: InspectorCheckpointRecord, event?: MouseEvent): void;
|
|
191
|
+
navigateToCheckpoint(checkpoint: InspectorCheckpointRecord): Promise<void>;
|
|
192
|
+
navigateToQueryRoute(): Promise<void>;
|
|
178
193
|
beginRename(checkpoint: InspectorCheckpointRecord, event?: Event): void;
|
|
179
194
|
updateRenameDraft(event: Event): void;
|
|
180
195
|
finishRename(checkpoint: InspectorCheckpointRecord): Promise<void>;
|
|
@@ -194,7 +209,6 @@ export declare class inspectorComponent implements OnDestroy {
|
|
|
194
209
|
handleKeyup(event: KeyboardEvent): void;
|
|
195
210
|
private hasInspectorCanvasState;
|
|
196
211
|
private clearInspectorCanvas;
|
|
197
|
-
private normalizeCheckpointLabel;
|
|
198
212
|
handlePointerMove(event: PointerEvent): void;
|
|
199
213
|
handlePointerUp(): void;
|
|
200
214
|
handleClick(event: MouseEvent): void;
|
|
@@ -205,9 +219,12 @@ export declare class inspectorComponent implements OnDestroy {
|
|
|
205
219
|
private clampActiveCommand;
|
|
206
220
|
private scrollActiveCommandIntoView;
|
|
207
221
|
private showCheckpointToast;
|
|
222
|
+
private checkpointFileName;
|
|
208
223
|
private selectElementAtPoint;
|
|
209
224
|
private updateDistanceOverlay;
|
|
225
|
+
private getDistanceRelation;
|
|
210
226
|
private refreshTypographyBlocks;
|
|
227
|
+
private randomizePet;
|
|
211
228
|
private addGuide;
|
|
212
229
|
private getGuidePreview;
|
|
213
230
|
private snapGuide;
|
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;
|