uidex 0.5.2 → 0.7.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 (39) hide show
  1. package/README.md +3 -3
  2. package/dist/cli/cli.cjs +1542 -1227
  3. package/dist/cli/cli.cjs.map +1 -1
  4. package/dist/cloud/index.cjs +385 -175
  5. package/dist/cloud/index.cjs.map +1 -1
  6. package/dist/cloud/index.d.cts +192 -4
  7. package/dist/cloud/index.d.ts +192 -4
  8. package/dist/cloud/index.js +377 -177
  9. package/dist/cloud/index.js.map +1 -1
  10. package/dist/headless/index.cjs +116 -251
  11. package/dist/headless/index.cjs.map +1 -1
  12. package/dist/headless/index.d.cts +6 -11
  13. package/dist/headless/index.d.ts +6 -11
  14. package/dist/headless/index.js +116 -253
  15. package/dist/headless/index.js.map +1 -1
  16. package/dist/index.cjs +776 -1055
  17. package/dist/index.cjs.map +1 -1
  18. package/dist/index.d.cts +152 -160
  19. package/dist/index.d.ts +152 -160
  20. package/dist/index.js +792 -1066
  21. package/dist/index.js.map +1 -1
  22. package/dist/react/index.cjs +801 -1019
  23. package/dist/react/index.cjs.map +1 -1
  24. package/dist/react/index.d.cts +102 -86
  25. package/dist/react/index.d.ts +102 -86
  26. package/dist/react/index.js +821 -1038
  27. package/dist/react/index.js.map +1 -1
  28. package/dist/scan/index.cjs +1550 -1220
  29. package/dist/scan/index.cjs.map +1 -1
  30. package/dist/scan/index.d.cts +210 -12
  31. package/dist/scan/index.d.ts +210 -12
  32. package/dist/scan/index.js +1547 -1219
  33. package/dist/scan/index.js.map +1 -1
  34. package/package.json +22 -21
  35. package/templates/claude/SKILL.md +71 -0
  36. package/templates/claude/references/audit.md +43 -0
  37. package/templates/claude/{rules.md → references/conventions.md} +25 -28
  38. package/templates/claude/audit.md +0 -43
  39. /package/templates/claude/{api.md → references/api.md} +0 -0
@@ -90,6 +90,7 @@ interface ReportRecord {
90
90
  interface Registry {
91
91
  add(entity: Entity): void;
92
92
  get<K extends EntityKind>(kind: K, id: string): EntityByKind<K> | undefined;
93
+ matchPattern<K extends EntityKind>(kind: K, id: string): EntityByKind<K> | undefined;
93
94
  list<K extends EntityKind>(kind: K): ReadonlyArray<EntityByKind<K>>;
94
95
  query(predicate: (entity: Entity) => boolean): Entity[];
95
96
  byScope(scope: Scope): Entity[];
@@ -97,7 +98,7 @@ interface Registry {
97
98
  setReports(kind: EntityKind, id: string, reports: readonly ReportRecord[]): void;
98
99
  getReports(kind: EntityKind, id: string): readonly ReportRecord[];
99
100
  listReportKeys(): readonly string[];
100
- archiveReport?: (reportId: string, reason?: string) => void | Promise<void>;
101
+ closeReport?: (reportId: string, status?: string) => void | Promise<void>;
101
102
  onReportsChange(cb: () => void): () => void;
102
103
  }
103
104
 
@@ -114,15 +115,13 @@ interface ViewStackEntry {
114
115
  ref: EntityRef | null;
115
116
  }
116
117
  interface SessionSnapshot {
117
- hover: EntityRef | null;
118
- selection: EntityRef | null;
119
118
  stack: ViewStackEntry[];
120
119
  /** Sticky overlay highlight. Set by "Highlight Element" actions; cleared on Esc. */
121
120
  pinnedHighlight: EntityRef | null;
122
- inspectorActive: boolean;
121
+ /** Mirrored from the mode store; the surface mode the session is currently in. */
122
+ mode: SurfaceMode;
123
123
  theme: ThemePreference;
124
124
  resolvedTheme: ResolvedTheme;
125
- ingestActive: boolean;
126
125
  /**
127
126
  * Identity for the local user. Set once at session creation; gates realtime
128
127
  * features (cursor labels, presence) and auto-populates report attribution.
@@ -137,7 +136,6 @@ interface NavigationState {
137
136
  interface NavigationActions {
138
137
  push(entry: ViewStackEntry): void;
139
138
  pop(): void;
140
- replace(entry: ViewStackEntry): void;
141
139
  clear(): void;
142
140
  reset(stack: ViewStackEntry[]): void;
143
141
  }
@@ -148,7 +146,6 @@ type NavigationStore = StoreApi<NavigationState> & {
148
146
  type SurfaceMode = "idle" | "inspecting" | "palette" | "viewing";
149
147
  interface ModeSnapshot {
150
148
  mode: SurfaceMode;
151
- inspectorActive: boolean;
152
149
  }
153
150
  interface ModeTransitions {
154
151
  openPalette(): void;
@@ -174,11 +171,11 @@ type SessionStore = StoreApi<SessionState> & {
174
171
  readonly nav: NavigationStore;
175
172
  readonly mode: ModeStore;
176
173
  readonly highlight: HighlightActions;
177
- select(ref: EntityRef | null): void;
178
174
  setTheme(theme: ThemePreference, resolved?: ResolvedTheme): void;
179
- setIngest(active: boolean): void;
180
175
  };
181
176
 
177
+ type Corner = "top-left" | "top-right" | "bottom-left" | "bottom-right";
178
+
182
179
  interface OverlayShowOptions {
183
180
  label?: string;
184
181
  color?: string;
@@ -189,8 +186,6 @@ interface OverlayShowOptions {
189
186
  backdrop?: boolean;
190
187
  }
191
188
 
192
- type Corner = "top-left" | "top-right" | "bottom-left" | "bottom-right";
193
-
194
189
  interface CreateHeadlessOptions {
195
190
  theme?: ThemePreference;
196
191
  resolvedTheme?: ResolvedTheme;
@@ -90,6 +90,7 @@ interface ReportRecord {
90
90
  interface Registry {
91
91
  add(entity: Entity): void;
92
92
  get<K extends EntityKind>(kind: K, id: string): EntityByKind<K> | undefined;
93
+ matchPattern<K extends EntityKind>(kind: K, id: string): EntityByKind<K> | undefined;
93
94
  list<K extends EntityKind>(kind: K): ReadonlyArray<EntityByKind<K>>;
94
95
  query(predicate: (entity: Entity) => boolean): Entity[];
95
96
  byScope(scope: Scope): Entity[];
@@ -97,7 +98,7 @@ interface Registry {
97
98
  setReports(kind: EntityKind, id: string, reports: readonly ReportRecord[]): void;
98
99
  getReports(kind: EntityKind, id: string): readonly ReportRecord[];
99
100
  listReportKeys(): readonly string[];
100
- archiveReport?: (reportId: string, reason?: string) => void | Promise<void>;
101
+ closeReport?: (reportId: string, status?: string) => void | Promise<void>;
101
102
  onReportsChange(cb: () => void): () => void;
102
103
  }
103
104
 
@@ -114,15 +115,13 @@ interface ViewStackEntry {
114
115
  ref: EntityRef | null;
115
116
  }
116
117
  interface SessionSnapshot {
117
- hover: EntityRef | null;
118
- selection: EntityRef | null;
119
118
  stack: ViewStackEntry[];
120
119
  /** Sticky overlay highlight. Set by "Highlight Element" actions; cleared on Esc. */
121
120
  pinnedHighlight: EntityRef | null;
122
- inspectorActive: boolean;
121
+ /** Mirrored from the mode store; the surface mode the session is currently in. */
122
+ mode: SurfaceMode;
123
123
  theme: ThemePreference;
124
124
  resolvedTheme: ResolvedTheme;
125
- ingestActive: boolean;
126
125
  /**
127
126
  * Identity for the local user. Set once at session creation; gates realtime
128
127
  * features (cursor labels, presence) and auto-populates report attribution.
@@ -137,7 +136,6 @@ interface NavigationState {
137
136
  interface NavigationActions {
138
137
  push(entry: ViewStackEntry): void;
139
138
  pop(): void;
140
- replace(entry: ViewStackEntry): void;
141
139
  clear(): void;
142
140
  reset(stack: ViewStackEntry[]): void;
143
141
  }
@@ -148,7 +146,6 @@ type NavigationStore = StoreApi<NavigationState> & {
148
146
  type SurfaceMode = "idle" | "inspecting" | "palette" | "viewing";
149
147
  interface ModeSnapshot {
150
148
  mode: SurfaceMode;
151
- inspectorActive: boolean;
152
149
  }
153
150
  interface ModeTransitions {
154
151
  openPalette(): void;
@@ -174,11 +171,11 @@ type SessionStore = StoreApi<SessionState> & {
174
171
  readonly nav: NavigationStore;
175
172
  readonly mode: ModeStore;
176
173
  readonly highlight: HighlightActions;
177
- select(ref: EntityRef | null): void;
178
174
  setTheme(theme: ThemePreference, resolved?: ResolvedTheme): void;
179
- setIngest(active: boolean): void;
180
175
  };
181
176
 
177
+ type Corner = "top-left" | "top-right" | "bottom-left" | "bottom-right";
178
+
182
179
  interface OverlayShowOptions {
183
180
  label?: string;
184
181
  color?: string;
@@ -189,8 +186,6 @@ interface OverlayShowOptions {
189
186
  backdrop?: boolean;
190
187
  }
191
188
 
192
- type Corner = "top-left" | "top-right" | "bottom-left" | "bottom-right";
193
-
194
189
  interface CreateHeadlessOptions {
195
190
  theme?: ThemePreference;
196
191
  resolvedTheme?: ResolvedTheme;