inspector-ng 0.0.10 → 0.0.12

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.
@@ -8,6 +8,7 @@ export interface InspectorCheckpointRecord {
8
8
  name: string;
9
9
  route: string;
10
10
  createdAt: string;
11
+ lastUsedAt?: string;
11
12
  state: unknown;
12
13
  }
13
14
  export declare const INSPECTOR_CHECKPOINT_REPOSITORY: InjectionToken<InspectorCheckpointRepository>;
@@ -56,3 +57,5 @@ export declare class InspectorCheckpointService {
56
57
  }
57
58
  export declare function provideInspectorCheckpoints(): EnvironmentProviders;
58
59
  export declare function nextAutomaticName(route: string, names: string[]): string;
60
+ export declare function checkpointActivityAt(checkpoint: InspectorCheckpointRecord): string;
61
+ export declare function recentActivityFirst(a: InspectorCheckpointRecord, b: InspectorCheckpointRecord): number;
@@ -1,10 +1,19 @@
1
1
  import { ElementRef, OnDestroy } from '@angular/core';
2
2
  import { DistanceOverlay, Guide, GuideOrientation, InspectMeasurement, Rect, TextBlockAnnotation, ToolMode } from './types';
3
- import { InspectorCheckpointRecord, InspectorCheckpointService } from './checkpoints';
3
+ import { checkpointActivityAt, InspectorCheckpointRecord, InspectorCheckpointService } from './checkpoints';
4
4
  import * as i0 from "@angular/core";
5
+ type InspectorCommandActionId = 'select' | 'type' | 'save' | 'vertical' | 'horizontal' | 'off';
6
+ interface InspectorCommandAction {
7
+ readonly id: InspectorCommandActionId;
8
+ readonly label: string;
9
+ readonly ariaLabel: string;
10
+ readonly keywords: string;
11
+ }
5
12
  export declare class inspectorComponent implements OnDestroy {
6
13
  readonly Math: Math;
14
+ readonly checkpointActivityAt: typeof checkpointActivityAt;
7
15
  readonly formatValue: (value: number) => number;
16
+ readonly formatRelativeTime: (iso: string, now?: number) => string;
8
17
  readonly guideHitboxSize = 14;
9
18
  readonly overlayRoot: import("@angular/core").Signal<ElementRef<HTMLElement> | undefined>;
10
19
  readonly checkpointDialog: import("@angular/core").Signal<ElementRef<HTMLDialogElement> | undefined>;
@@ -16,13 +25,16 @@ export declare class inspectorComponent implements OnDestroy {
16
25
  readonly checkpointService: InspectorCheckpointService | null;
17
26
  readonly commandBarOpen: import("@angular/core").WritableSignal<boolean>;
18
27
  readonly checkpointQuery: import("@angular/core").WritableSignal<string>;
19
- readonly activeCheckpointIndex: import("@angular/core").WritableSignal<number>;
28
+ readonly activeCommandIndex: import("@angular/core").WritableSignal<number>;
20
29
  readonly editingCheckpointId: import("@angular/core").WritableSignal<string | null>;
21
30
  readonly deletingCheckpointId: import("@angular/core").WritableSignal<string | null>;
22
31
  readonly renameDraft: import("@angular/core").WritableSignal<string>;
23
32
  readonly checkpointToast: import("@angular/core").WritableSignal<string | null>;
24
33
  readonly checkpointToastIsError: import("@angular/core").WritableSignal<boolean>;
25
34
  readonly filteredCheckpoints: import("@angular/core").Signal<InspectorCheckpointRecord[]>;
35
+ readonly filteredInspectorActions: import("@angular/core").Signal<readonly InspectorCommandAction[]>;
36
+ readonly commandResultCount: import("@angular/core").Signal<number>;
37
+ readonly activeCommandResultId: import("@angular/core").Signal<string | null>;
26
38
  readonly enabled: import("@angular/core").WritableSignal<boolean>;
27
39
  readonly toolMode: import("@angular/core").WritableSignal<ToolMode>;
28
40
  readonly guideOrientation: import("@angular/core").WritableSignal<GuideOrientation>;
@@ -60,6 +72,9 @@ export declare class inspectorComponent implements OnDestroy {
60
72
  closeCheckpointCommandBar(): void;
61
73
  updateCheckpointQuery(event: Event): void;
62
74
  setActiveCheckpoint(index: number): void;
75
+ shouldShowCheckpointRoute(checkpoint: InspectorCheckpointRecord): boolean;
76
+ setActiveInspectorAction(index: number): void;
77
+ executeInspectorAction(action: InspectorCommandAction): Promise<void>;
63
78
  restoreCheckpoint(checkpoint: InspectorCheckpointRecord): Promise<void>;
64
79
  beginRename(checkpoint: InspectorCheckpointRecord, event?: Event): void;
65
80
  updateRenameDraft(event: Event): void;
@@ -77,7 +92,8 @@ export declare class inspectorComponent implements OnDestroy {
77
92
  formatEdges(edges: InspectMeasurement['padding']): string;
78
93
  formatGap(selected: InspectMeasurement): string;
79
94
  handleKeydown(event: KeyboardEvent): void;
80
- handleKeyup(event: KeyboardEvent): void;
95
+ private clearInspectorCanvas;
96
+ private normalizeCheckpointLabel;
81
97
  handlePointerMove(event: PointerEvent): void;
82
98
  handlePointerUp(): void;
83
99
  handleClick(event: MouseEvent): void;
@@ -85,9 +101,8 @@ export declare class inspectorComponent implements OnDestroy {
85
101
  private canInspectClick;
86
102
  private setInspectorEnabled;
87
103
  private handleCommandBarKeydown;
88
- private blocksInspectorShortcut;
89
- private clampActiveCheckpoint;
90
- private scrollActiveCheckpointIntoView;
104
+ private clampActiveCommand;
105
+ private scrollActiveCommandIntoView;
91
106
  private showCheckpointToast;
92
107
  private selectElementAtPoint;
93
108
  private updateDistanceOverlay;
@@ -104,3 +119,4 @@ export declare class inspectorComponent implements OnDestroy {
104
119
  static ɵfac: i0.ɵɵFactoryDeclaration<inspectorComponent, never>;
105
120
  static ɵcmp: i0.ɵɵComponentDeclaration<inspectorComponent, "inspector-overlay", never, { "highlightColor": { "alias": "highlightColor"; "required": false; }; "guideColor": { "alias": "guideColor"; "required": false; }; "hoverHighlightEnabled": { "alias": "hoverHighlightEnabled"; "required": false; }; "persistOnReload": { "alias": "persistOnReload"; "required": false; }; }, {}, never, never, true, never>;
106
121
  }
122
+ export {};
package/lib/utils.d.ts CHANGED
@@ -1,2 +1,4 @@
1
1
  export declare const createId: () => string;
2
2
  export declare const formatValue: (value: number) => number;
3
+ /** Ultra-compact relative time for dense command-palette metadata. */
4
+ export declare const formatRelativeTime: (iso: string, now?: number) => string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "inspector-ng",
3
- "version": "0.0.10",
3
+ "version": "0.0.12",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^17.3.0",
6
6
  "@angular/core": "^17.3.0",