uidex 0.3.0 → 0.5.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.
- package/dist/cli/cli.cjs +1116 -112
- package/dist/cli/cli.cjs.map +1 -1
- package/dist/cloud/index.cjs +395 -72
- package/dist/cloud/index.cjs.map +1 -1
- package/dist/cloud/index.d.cts +60 -86
- package/dist/cloud/index.d.ts +60 -86
- package/dist/cloud/index.js +396 -71
- package/dist/cloud/index.js.map +1 -1
- package/dist/headless/index.cjs +1505 -791
- package/dist/headless/index.cjs.map +1 -1
- package/dist/headless/index.d.cts +83 -75
- package/dist/headless/index.d.ts +83 -75
- package/dist/headless/index.js +1514 -791
- package/dist/headless/index.js.map +1 -1
- package/dist/index.cjs +6281 -3190
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +337 -229
- package/dist/index.d.ts +337 -229
- package/dist/index.js +6362 -3231
- package/dist/index.js.map +1 -1
- package/dist/playwright/index.cjs +4 -4
- package/dist/playwright/index.cjs.map +1 -1
- package/dist/playwright/index.js +3 -3
- package/dist/playwright/index.js.map +1 -1
- package/dist/playwright/reporter.cjs +3 -3
- package/dist/playwright/reporter.cjs.map +1 -1
- package/dist/playwright/reporter.js +3 -3
- package/dist/playwright/reporter.js.map +1 -1
- package/dist/react/index.cjs +6291 -3206
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +239 -186
- package/dist/react/index.d.ts +239 -186
- package/dist/react/index.js +6338 -3208
- package/dist/react/index.js.map +1 -1
- package/dist/scan/index.cjs +212 -82
- package/dist/scan/index.cjs.map +1 -1
- package/dist/scan/index.d.cts +31 -0
- package/dist/scan/index.d.ts +31 -0
- package/dist/scan/index.js +211 -81
- package/dist/scan/index.js.map +1 -1
- package/package.json +10 -8
- package/templates/claude/api.md +110 -0
- package/templates/claude/audit.md +8 -2
- package/templates/claude/rules.md +15 -0
|
@@ -33,11 +33,16 @@ interface Route {
|
|
|
33
33
|
path: string;
|
|
34
34
|
page: string;
|
|
35
35
|
}
|
|
36
|
+
interface FlowStep {
|
|
37
|
+
entityId: string;
|
|
38
|
+
action?: string;
|
|
39
|
+
}
|
|
36
40
|
interface Flow {
|
|
37
41
|
kind: "flow";
|
|
38
42
|
id: string;
|
|
39
43
|
loc: Location;
|
|
40
44
|
touches: string[];
|
|
45
|
+
steps: FlowStep[];
|
|
41
46
|
}
|
|
42
47
|
interface Page extends EntityWithMetaBase {
|
|
43
48
|
kind: "page";
|
|
@@ -62,6 +67,26 @@ type EntityByKind<K extends EntityKind> = Extract<Entity, {
|
|
|
62
67
|
kind: K;
|
|
63
68
|
}>;
|
|
64
69
|
|
|
70
|
+
interface ReportRecord {
|
|
71
|
+
id: string;
|
|
72
|
+
entity?: string;
|
|
73
|
+
reporter?: {
|
|
74
|
+
id?: string;
|
|
75
|
+
email?: string;
|
|
76
|
+
name?: string;
|
|
77
|
+
};
|
|
78
|
+
title?: string;
|
|
79
|
+
body: string;
|
|
80
|
+
type: string;
|
|
81
|
+
severity: string;
|
|
82
|
+
status: string;
|
|
83
|
+
labels?: string[];
|
|
84
|
+
url: string;
|
|
85
|
+
route?: string;
|
|
86
|
+
pageTitle?: string;
|
|
87
|
+
screenshot?: string;
|
|
88
|
+
createdAt: string;
|
|
89
|
+
}
|
|
65
90
|
interface Registry {
|
|
66
91
|
add(entity: Entity): void;
|
|
67
92
|
get<K extends EntityKind>(kind: K, id: string): EntityByKind<K> | undefined;
|
|
@@ -69,6 +94,17 @@ interface Registry {
|
|
|
69
94
|
query(predicate: (entity: Entity) => boolean): Entity[];
|
|
70
95
|
byScope(scope: Scope): Entity[];
|
|
71
96
|
touchedBy(flowId: string): Entity[];
|
|
97
|
+
setReports(kind: EntityKind, id: string, reports: readonly ReportRecord[]): void;
|
|
98
|
+
getReports(kind: EntityKind, id: string): readonly ReportRecord[];
|
|
99
|
+
listReportKeys(): readonly string[];
|
|
100
|
+
archiveReport?: (reportId: string, reason?: string) => void | Promise<void>;
|
|
101
|
+
onReportsChange(cb: () => void): () => void;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
interface UserIdentity {
|
|
105
|
+
id: string;
|
|
106
|
+
name?: string;
|
|
107
|
+
avatar?: string;
|
|
72
108
|
}
|
|
73
109
|
|
|
74
110
|
type ThemePreference = "light" | "dark" | "auto";
|
|
@@ -87,89 +123,60 @@ interface SessionSnapshot {
|
|
|
87
123
|
theme: ThemePreference;
|
|
88
124
|
resolvedTheme: ResolvedTheme;
|
|
89
125
|
ingestActive: boolean;
|
|
90
|
-
}
|
|
91
|
-
interface SessionActions {
|
|
92
|
-
hover(ref: EntityRef | null): void;
|
|
93
|
-
select(ref: EntityRef | null): void;
|
|
94
126
|
/**
|
|
95
|
-
*
|
|
127
|
+
* Identity for the local user. Set once at session creation; gates realtime
|
|
128
|
+
* features (cursor labels, presence) and auto-populates report attribution.
|
|
96
129
|
*/
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
* Empty the view stack.
|
|
104
|
-
*/
|
|
105
|
-
clearStack(): void;
|
|
106
|
-
/**
|
|
107
|
-
* Open a view by id. If `ref` is omitted, the current `selection` is captured;
|
|
108
|
-
* pass `null` explicitly to open the view with no ref context. Thin wrapper
|
|
109
|
-
* around `pushStack`.
|
|
110
|
-
*/
|
|
111
|
-
openView(id: string, ref?: EntityRef | null): void;
|
|
112
|
-
/**
|
|
113
|
-
* Clear the entire view stack. Thin wrapper around `clearStack`.
|
|
114
|
-
*/
|
|
115
|
-
closeView(): void;
|
|
116
|
-
setInspectorActive(active: boolean): void;
|
|
117
|
-
toggleInspector(): void;
|
|
118
|
-
/** Pin the overlay to `ref` until `clearPinnedHighlight` is called. */
|
|
119
|
-
pinHighlight(ref: EntityRef): void;
|
|
120
|
-
clearPinnedHighlight(): void;
|
|
121
|
-
setTheme(theme: ThemePreference, resolved?: ResolvedTheme): void;
|
|
122
|
-
setIngest(active: boolean): void;
|
|
130
|
+
user: UserIdentity | null;
|
|
131
|
+
}
|
|
132
|
+
type SessionState = SessionSnapshot;
|
|
133
|
+
|
|
134
|
+
interface NavigationState {
|
|
135
|
+
stack: ViewStackEntry[];
|
|
123
136
|
}
|
|
124
|
-
interface
|
|
125
|
-
|
|
137
|
+
interface NavigationActions {
|
|
138
|
+
push(entry: ViewStackEntry): void;
|
|
139
|
+
pop(): void;
|
|
140
|
+
replace(entry: ViewStackEntry): void;
|
|
141
|
+
clear(): void;
|
|
142
|
+
reset(stack: ViewStackEntry[]): void;
|
|
126
143
|
}
|
|
144
|
+
type NavigationStore = StoreApi<NavigationState> & {
|
|
145
|
+
nav: NavigationActions;
|
|
146
|
+
};
|
|
127
147
|
|
|
128
|
-
type
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
ref: EntityRef | null;
|
|
146
|
-
entry: ViewStackEntry;
|
|
147
|
-
} | {
|
|
148
|
-
type: "SET_SELECTION";
|
|
149
|
-
ref: EntityRef | null;
|
|
150
|
-
} | {
|
|
151
|
-
type: "HOVER";
|
|
152
|
-
ref: EntityRef;
|
|
153
|
-
element: HTMLElement | null;
|
|
154
|
-
color?: string | null;
|
|
155
|
-
} | {
|
|
156
|
-
type: "UNHOVER";
|
|
157
|
-
} | {
|
|
158
|
-
type: "PIN";
|
|
159
|
-
ref?: EntityRef;
|
|
160
|
-
} | {
|
|
161
|
-
type: "UNPIN";
|
|
162
|
-
} | {
|
|
163
|
-
type: "SET_THEME";
|
|
164
|
-
theme: ThemePreference;
|
|
165
|
-
resolvedTheme: ResolvedTheme;
|
|
166
|
-
} | {
|
|
167
|
-
type: "SET_INGEST";
|
|
168
|
-
active: boolean;
|
|
148
|
+
type SurfaceMode = "idle" | "inspecting" | "palette" | "viewing";
|
|
149
|
+
interface ModeSnapshot {
|
|
150
|
+
mode: SurfaceMode;
|
|
151
|
+
inspectorActive: boolean;
|
|
152
|
+
}
|
|
153
|
+
interface ModeTransitions {
|
|
154
|
+
openPalette(): void;
|
|
155
|
+
openInspector(): void;
|
|
156
|
+
closeInspector(): void;
|
|
157
|
+
toggleInspector(): void;
|
|
158
|
+
enterViewing(initialStack: ViewStackEntry[]): void;
|
|
159
|
+
dismiss(): void;
|
|
160
|
+
popOrTransition(): void;
|
|
161
|
+
pushView(entry: ViewStackEntry): void;
|
|
162
|
+
}
|
|
163
|
+
type ModeStore = StoreApi<ModeSnapshot> & {
|
|
164
|
+
transition: ModeTransitions;
|
|
169
165
|
};
|
|
170
166
|
|
|
167
|
+
interface HighlightActions {
|
|
168
|
+
hover(ref: EntityRef, element?: HTMLElement | null, color?: string | null): void;
|
|
169
|
+
unhover(): void;
|
|
170
|
+
pin(ref?: EntityRef): void;
|
|
171
|
+
unpin(): void;
|
|
172
|
+
}
|
|
171
173
|
type SessionStore = StoreApi<SessionState> & {
|
|
172
|
-
|
|
174
|
+
readonly nav: NavigationStore;
|
|
175
|
+
readonly mode: ModeStore;
|
|
176
|
+
readonly highlight: HighlightActions;
|
|
177
|
+
select(ref: EntityRef | null): void;
|
|
178
|
+
setTheme(theme: ThemePreference, resolved?: ResolvedTheme): void;
|
|
179
|
+
setIngest(active: boolean): void;
|
|
173
180
|
};
|
|
174
181
|
|
|
175
182
|
interface OverlayShowOptions {
|
|
@@ -179,6 +186,7 @@ interface OverlayShowOptions {
|
|
|
179
186
|
borderStyle?: string;
|
|
180
187
|
borderWidth?: number;
|
|
181
188
|
fillOpacity?: number;
|
|
189
|
+
backdrop?: boolean;
|
|
182
190
|
}
|
|
183
191
|
|
|
184
192
|
type Corner = "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
package/dist/headless/index.d.ts
CHANGED
|
@@ -33,11 +33,16 @@ interface Route {
|
|
|
33
33
|
path: string;
|
|
34
34
|
page: string;
|
|
35
35
|
}
|
|
36
|
+
interface FlowStep {
|
|
37
|
+
entityId: string;
|
|
38
|
+
action?: string;
|
|
39
|
+
}
|
|
36
40
|
interface Flow {
|
|
37
41
|
kind: "flow";
|
|
38
42
|
id: string;
|
|
39
43
|
loc: Location;
|
|
40
44
|
touches: string[];
|
|
45
|
+
steps: FlowStep[];
|
|
41
46
|
}
|
|
42
47
|
interface Page extends EntityWithMetaBase {
|
|
43
48
|
kind: "page";
|
|
@@ -62,6 +67,26 @@ type EntityByKind<K extends EntityKind> = Extract<Entity, {
|
|
|
62
67
|
kind: K;
|
|
63
68
|
}>;
|
|
64
69
|
|
|
70
|
+
interface ReportRecord {
|
|
71
|
+
id: string;
|
|
72
|
+
entity?: string;
|
|
73
|
+
reporter?: {
|
|
74
|
+
id?: string;
|
|
75
|
+
email?: string;
|
|
76
|
+
name?: string;
|
|
77
|
+
};
|
|
78
|
+
title?: string;
|
|
79
|
+
body: string;
|
|
80
|
+
type: string;
|
|
81
|
+
severity: string;
|
|
82
|
+
status: string;
|
|
83
|
+
labels?: string[];
|
|
84
|
+
url: string;
|
|
85
|
+
route?: string;
|
|
86
|
+
pageTitle?: string;
|
|
87
|
+
screenshot?: string;
|
|
88
|
+
createdAt: string;
|
|
89
|
+
}
|
|
65
90
|
interface Registry {
|
|
66
91
|
add(entity: Entity): void;
|
|
67
92
|
get<K extends EntityKind>(kind: K, id: string): EntityByKind<K> | undefined;
|
|
@@ -69,6 +94,17 @@ interface Registry {
|
|
|
69
94
|
query(predicate: (entity: Entity) => boolean): Entity[];
|
|
70
95
|
byScope(scope: Scope): Entity[];
|
|
71
96
|
touchedBy(flowId: string): Entity[];
|
|
97
|
+
setReports(kind: EntityKind, id: string, reports: readonly ReportRecord[]): void;
|
|
98
|
+
getReports(kind: EntityKind, id: string): readonly ReportRecord[];
|
|
99
|
+
listReportKeys(): readonly string[];
|
|
100
|
+
archiveReport?: (reportId: string, reason?: string) => void | Promise<void>;
|
|
101
|
+
onReportsChange(cb: () => void): () => void;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
interface UserIdentity {
|
|
105
|
+
id: string;
|
|
106
|
+
name?: string;
|
|
107
|
+
avatar?: string;
|
|
72
108
|
}
|
|
73
109
|
|
|
74
110
|
type ThemePreference = "light" | "dark" | "auto";
|
|
@@ -87,89 +123,60 @@ interface SessionSnapshot {
|
|
|
87
123
|
theme: ThemePreference;
|
|
88
124
|
resolvedTheme: ResolvedTheme;
|
|
89
125
|
ingestActive: boolean;
|
|
90
|
-
}
|
|
91
|
-
interface SessionActions {
|
|
92
|
-
hover(ref: EntityRef | null): void;
|
|
93
|
-
select(ref: EntityRef | null): void;
|
|
94
126
|
/**
|
|
95
|
-
*
|
|
127
|
+
* Identity for the local user. Set once at session creation; gates realtime
|
|
128
|
+
* features (cursor labels, presence) and auto-populates report attribution.
|
|
96
129
|
*/
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
* Empty the view stack.
|
|
104
|
-
*/
|
|
105
|
-
clearStack(): void;
|
|
106
|
-
/**
|
|
107
|
-
* Open a view by id. If `ref` is omitted, the current `selection` is captured;
|
|
108
|
-
* pass `null` explicitly to open the view with no ref context. Thin wrapper
|
|
109
|
-
* around `pushStack`.
|
|
110
|
-
*/
|
|
111
|
-
openView(id: string, ref?: EntityRef | null): void;
|
|
112
|
-
/**
|
|
113
|
-
* Clear the entire view stack. Thin wrapper around `clearStack`.
|
|
114
|
-
*/
|
|
115
|
-
closeView(): void;
|
|
116
|
-
setInspectorActive(active: boolean): void;
|
|
117
|
-
toggleInspector(): void;
|
|
118
|
-
/** Pin the overlay to `ref` until `clearPinnedHighlight` is called. */
|
|
119
|
-
pinHighlight(ref: EntityRef): void;
|
|
120
|
-
clearPinnedHighlight(): void;
|
|
121
|
-
setTheme(theme: ThemePreference, resolved?: ResolvedTheme): void;
|
|
122
|
-
setIngest(active: boolean): void;
|
|
130
|
+
user: UserIdentity | null;
|
|
131
|
+
}
|
|
132
|
+
type SessionState = SessionSnapshot;
|
|
133
|
+
|
|
134
|
+
interface NavigationState {
|
|
135
|
+
stack: ViewStackEntry[];
|
|
123
136
|
}
|
|
124
|
-
interface
|
|
125
|
-
|
|
137
|
+
interface NavigationActions {
|
|
138
|
+
push(entry: ViewStackEntry): void;
|
|
139
|
+
pop(): void;
|
|
140
|
+
replace(entry: ViewStackEntry): void;
|
|
141
|
+
clear(): void;
|
|
142
|
+
reset(stack: ViewStackEntry[]): void;
|
|
126
143
|
}
|
|
144
|
+
type NavigationStore = StoreApi<NavigationState> & {
|
|
145
|
+
nav: NavigationActions;
|
|
146
|
+
};
|
|
127
147
|
|
|
128
|
-
type
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
ref: EntityRef | null;
|
|
146
|
-
entry: ViewStackEntry;
|
|
147
|
-
} | {
|
|
148
|
-
type: "SET_SELECTION";
|
|
149
|
-
ref: EntityRef | null;
|
|
150
|
-
} | {
|
|
151
|
-
type: "HOVER";
|
|
152
|
-
ref: EntityRef;
|
|
153
|
-
element: HTMLElement | null;
|
|
154
|
-
color?: string | null;
|
|
155
|
-
} | {
|
|
156
|
-
type: "UNHOVER";
|
|
157
|
-
} | {
|
|
158
|
-
type: "PIN";
|
|
159
|
-
ref?: EntityRef;
|
|
160
|
-
} | {
|
|
161
|
-
type: "UNPIN";
|
|
162
|
-
} | {
|
|
163
|
-
type: "SET_THEME";
|
|
164
|
-
theme: ThemePreference;
|
|
165
|
-
resolvedTheme: ResolvedTheme;
|
|
166
|
-
} | {
|
|
167
|
-
type: "SET_INGEST";
|
|
168
|
-
active: boolean;
|
|
148
|
+
type SurfaceMode = "idle" | "inspecting" | "palette" | "viewing";
|
|
149
|
+
interface ModeSnapshot {
|
|
150
|
+
mode: SurfaceMode;
|
|
151
|
+
inspectorActive: boolean;
|
|
152
|
+
}
|
|
153
|
+
interface ModeTransitions {
|
|
154
|
+
openPalette(): void;
|
|
155
|
+
openInspector(): void;
|
|
156
|
+
closeInspector(): void;
|
|
157
|
+
toggleInspector(): void;
|
|
158
|
+
enterViewing(initialStack: ViewStackEntry[]): void;
|
|
159
|
+
dismiss(): void;
|
|
160
|
+
popOrTransition(): void;
|
|
161
|
+
pushView(entry: ViewStackEntry): void;
|
|
162
|
+
}
|
|
163
|
+
type ModeStore = StoreApi<ModeSnapshot> & {
|
|
164
|
+
transition: ModeTransitions;
|
|
169
165
|
};
|
|
170
166
|
|
|
167
|
+
interface HighlightActions {
|
|
168
|
+
hover(ref: EntityRef, element?: HTMLElement | null, color?: string | null): void;
|
|
169
|
+
unhover(): void;
|
|
170
|
+
pin(ref?: EntityRef): void;
|
|
171
|
+
unpin(): void;
|
|
172
|
+
}
|
|
171
173
|
type SessionStore = StoreApi<SessionState> & {
|
|
172
|
-
|
|
174
|
+
readonly nav: NavigationStore;
|
|
175
|
+
readonly mode: ModeStore;
|
|
176
|
+
readonly highlight: HighlightActions;
|
|
177
|
+
select(ref: EntityRef | null): void;
|
|
178
|
+
setTheme(theme: ThemePreference, resolved?: ResolvedTheme): void;
|
|
179
|
+
setIngest(active: boolean): void;
|
|
173
180
|
};
|
|
174
181
|
|
|
175
182
|
interface OverlayShowOptions {
|
|
@@ -179,6 +186,7 @@ interface OverlayShowOptions {
|
|
|
179
186
|
borderStyle?: string;
|
|
180
187
|
borderWidth?: number;
|
|
181
188
|
fillOpacity?: number;
|
|
189
|
+
backdrop?: boolean;
|
|
182
190
|
}
|
|
183
191
|
|
|
184
192
|
type Corner = "top-left" | "top-right" | "bottom-left" | "bottom-right";
|