uidex 0.7.0 → 0.9.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 +1112 -1054
- package/dist/cli/cli.cjs.map +1 -1
- package/dist/headless/index.cjs +4 -448
- package/dist/headless/index.cjs.map +1 -1
- package/dist/headless/index.d.cts +41 -11
- package/dist/headless/index.d.ts +41 -11
- package/dist/headless/index.js +4 -450
- package/dist/headless/index.js.map +1 -1
- package/dist/index.cjs +147 -3252
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +43 -316
- package/dist/index.d.ts +43 -316
- package/dist/index.js +133 -3254
- package/dist/index.js.map +1 -1
- package/dist/playwright/index.cjs +175 -0
- package/dist/playwright/index.cjs.map +1 -1
- package/dist/playwright/index.d.cts +2 -0
- package/dist/playwright/index.d.ts +2 -0
- package/dist/playwright/index.js +167 -0
- package/dist/playwright/index.js.map +1 -1
- package/dist/playwright/states-reporter.cjs +123 -0
- package/dist/playwright/states-reporter.cjs.map +1 -0
- package/dist/playwright/states-reporter.d.cts +46 -0
- package/dist/playwright/states-reporter.d.ts +46 -0
- package/dist/playwright/states-reporter.js +88 -0
- package/dist/playwright/states-reporter.js.map +1 -0
- package/dist/playwright/states.cjs +118 -0
- package/dist/playwright/states.cjs.map +1 -0
- package/dist/playwright/states.d.cts +120 -0
- package/dist/playwright/states.d.ts +120 -0
- package/dist/playwright/states.js +88 -0
- package/dist/playwright/states.js.map +1 -0
- package/dist/react/index.cjs +163 -3255
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +62 -275
- package/dist/react/index.d.ts +62 -275
- package/dist/react/index.js +151 -3268
- package/dist/react/index.js.map +1 -1
- package/dist/scan/index.cjs +1292 -345
- package/dist/scan/index.cjs.map +1 -1
- package/dist/scan/index.d.cts +305 -12
- package/dist/scan/index.d.ts +305 -12
- package/dist/scan/index.js +1283 -345
- package/dist/scan/index.js.map +1 -1
- package/package.json +12 -16
- package/dist/cloud/index.cjs +0 -682
- package/dist/cloud/index.cjs.map +0 -1
- package/dist/cloud/index.d.cts +0 -270
- package/dist/cloud/index.d.ts +0 -270
- package/dist/cloud/index.js +0 -645
- package/dist/cloud/index.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { StoreApi } from 'zustand/vanilla';
|
|
2
|
-
import { ReportPayload, ReportResult, IngestConfig, ReportListResponse, PinRecord, ArchiveReason } from '@uidex/api-client';
|
|
3
|
-
export { ArchiveReason, IngestConfig, PinRecord, ReportListRecord, ReportListResponse, ReportPayload, ReportResult } from '@uidex/api-client';
|
|
4
2
|
import { TemplateResult } from 'lit-html';
|
|
5
3
|
import { IconNode } from 'lucide';
|
|
6
4
|
|
|
@@ -16,6 +14,32 @@ interface EntityRef {
|
|
|
16
14
|
kind: EntityKind;
|
|
17
15
|
id: string;
|
|
18
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* The four kinds every captured route is expected to render — the state-matrix
|
|
19
|
+
* axis. A capture that only shoots the happy path leaves most of the value on
|
|
20
|
+
* the table, so a missing core kind must be captured, waived (the page CANNOT
|
|
21
|
+
* render it), or acknowledged in the MISSING_KINDS baseline.
|
|
22
|
+
*/
|
|
23
|
+
declare const CORE_STATE_KINDS: readonly ["loading", "empty", "populated", "error"];
|
|
24
|
+
type CoreStateKind = (typeof CORE_STATE_KINDS)[number];
|
|
25
|
+
/** `variant` is any state outside the matrix (a dialog, wizard step, multi-currency…). */
|
|
26
|
+
type StateKind = CoreStateKind | "variant";
|
|
27
|
+
/**
|
|
28
|
+
* A declared render state of an entity — the "story"-like unit: a named
|
|
29
|
+
* condition the page/feature/widget can render in (loading / empty / error /
|
|
30
|
+
* multi-currency / …). Enumerated on the entity (not derived from syntax), it
|
|
31
|
+
* is the contract the visual-states capture must satisfy and the anchor for
|
|
32
|
+
* per-state acceptance criteria. Fixtures + capture mechanics stay in the spec;
|
|
33
|
+
* the registry holds only the name (+ optional kind / per-state acceptance).
|
|
34
|
+
*/
|
|
35
|
+
interface StateDecl {
|
|
36
|
+
name: string;
|
|
37
|
+
/** Canonical kind for the state-matrix axis (defaults to `variant`). */
|
|
38
|
+
kind?: StateKind;
|
|
39
|
+
/** Acceptance criteria that only this state can evidence. */
|
|
40
|
+
acceptance?: string[];
|
|
41
|
+
description?: string;
|
|
42
|
+
}
|
|
19
43
|
interface Metadata {
|
|
20
44
|
name?: string;
|
|
21
45
|
description?: string;
|
|
@@ -25,6 +49,21 @@ interface Metadata {
|
|
|
25
49
|
flows?: readonly string[];
|
|
26
50
|
features?: string[];
|
|
27
51
|
widgets?: string[];
|
|
52
|
+
/** Declared render states (see StateDecl); the capture-completeness gate. */
|
|
53
|
+
states?: StateDecl[];
|
|
54
|
+
/**
|
|
55
|
+
* `false` opts this page/feature/widget out of visual-states capture forever
|
|
56
|
+
* (a redirect, a static notice, an internal target). The page-coverage gate
|
|
57
|
+
* treats an opted-out route as accounted-for. Reason belongs in `description`.
|
|
58
|
+
*/
|
|
59
|
+
capture?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Per-core-kind waivers: a core kind this page's route legitimately CANNOT
|
|
62
|
+
* render (a create form has no `empty`), mapped to a substantive reason. The
|
|
63
|
+
* state-matrix gate treats a waived kind as accounted-for. A waiver is a
|
|
64
|
+
* permanent design statement — unlike MISSING_KINDS backlog, which is debt.
|
|
65
|
+
*/
|
|
66
|
+
waivers?: Partial<Record<CoreStateKind, string>>;
|
|
28
67
|
}
|
|
29
68
|
interface EntityWithMetaBase {
|
|
30
69
|
id: string;
|
|
@@ -127,130 +166,6 @@ declare const KIND_STYLE: Record<EntityKind, KindStyleEntry>;
|
|
|
127
166
|
declare function prettify(id: string): string;
|
|
128
167
|
declare function displayName(entity: Entity, node?: Element | null): string;
|
|
129
168
|
|
|
130
|
-
type ConsoleLevel = "warn" | "error";
|
|
131
|
-
interface ConsoleEntry {
|
|
132
|
-
level: ConsoleLevel;
|
|
133
|
-
message: string;
|
|
134
|
-
timestamp: string;
|
|
135
|
-
}
|
|
136
|
-
interface ConsoleCaptureOptions {
|
|
137
|
-
limit?: number;
|
|
138
|
-
target?: Console;
|
|
139
|
-
now?: () => Date;
|
|
140
|
-
}
|
|
141
|
-
interface ConsoleCapture {
|
|
142
|
-
start(): void;
|
|
143
|
-
stop(): void;
|
|
144
|
-
readonly isActive: boolean;
|
|
145
|
-
entries(): readonly ConsoleEntry[];
|
|
146
|
-
clear(): void;
|
|
147
|
-
}
|
|
148
|
-
declare function createConsoleCapture(options?: ConsoleCaptureOptions): ConsoleCapture;
|
|
149
|
-
|
|
150
|
-
interface NetworkEntry {
|
|
151
|
-
method: string;
|
|
152
|
-
url: string;
|
|
153
|
-
status: number;
|
|
154
|
-
timestamp: string;
|
|
155
|
-
error?: string;
|
|
156
|
-
}
|
|
157
|
-
interface NetworkCaptureOptions {
|
|
158
|
-
limit?: number;
|
|
159
|
-
target?: {
|
|
160
|
-
fetch?: typeof fetch;
|
|
161
|
-
};
|
|
162
|
-
now?: () => Date;
|
|
163
|
-
}
|
|
164
|
-
interface NetworkCapture {
|
|
165
|
-
start(): void;
|
|
166
|
-
stop(): void;
|
|
167
|
-
readonly isActive: boolean;
|
|
168
|
-
entries(): readonly NetworkEntry[];
|
|
169
|
-
clear(): void;
|
|
170
|
-
}
|
|
171
|
-
declare function createNetworkCapture(options?: NetworkCaptureOptions): NetworkCapture;
|
|
172
|
-
|
|
173
|
-
declare const nativeFetch: typeof fetch | undefined;
|
|
174
|
-
|
|
175
|
-
interface UserIdentity {
|
|
176
|
-
id: string;
|
|
177
|
-
name?: string;
|
|
178
|
-
avatar?: string;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
type RealtimePresenceUser = {
|
|
182
|
-
userId: string;
|
|
183
|
-
name: string;
|
|
184
|
-
avatar: string | null;
|
|
185
|
-
};
|
|
186
|
-
type RealtimeChannelState = "connecting" | "connected" | "disconnected";
|
|
187
|
-
interface RealtimeConnectOpts {
|
|
188
|
-
user: UserIdentity;
|
|
189
|
-
route: string;
|
|
190
|
-
}
|
|
191
|
-
interface RealtimeChannel {
|
|
192
|
-
readonly state: RealtimeChannelState;
|
|
193
|
-
connect(): void;
|
|
194
|
-
disconnect(): void;
|
|
195
|
-
joinRoute(route: string): void;
|
|
196
|
-
onPresence(cb: (users: RealtimePresenceUser[]) => void): () => void;
|
|
197
|
-
onPin(cb: (pin: PinRecord) => void): () => void;
|
|
198
|
-
/** Optional so pre-existing channel stubs keep satisfying the interface. */
|
|
199
|
-
onPinArchived?(cb: (reportId: string) => void): () => void;
|
|
200
|
-
}
|
|
201
|
-
interface CloudAdapter<TPayload = ReportPayload, TResult = ReportResult, TIntegrations = {
|
|
202
|
-
getConfig(): Promise<IngestConfig>;
|
|
203
|
-
getCachedConfig(): IngestConfig | null;
|
|
204
|
-
}> {
|
|
205
|
-
readonly reports: {
|
|
206
|
-
submit(payload: TPayload): Promise<TResult>;
|
|
207
|
-
list?(opts?: {
|
|
208
|
-
page?: number;
|
|
209
|
-
limit?: number;
|
|
210
|
-
}): Promise<ReportListResponse>;
|
|
211
|
-
};
|
|
212
|
-
readonly integrations: TIntegrations;
|
|
213
|
-
readonly realtime: {
|
|
214
|
-
connect(opts: RealtimeConnectOpts): RealtimeChannel;
|
|
215
|
-
};
|
|
216
|
-
readonly pins: {
|
|
217
|
-
list(params: {
|
|
218
|
-
route?: string;
|
|
219
|
-
entities?: string;
|
|
220
|
-
}): Promise<PinRecord[]>;
|
|
221
|
-
/**
|
|
222
|
-
* Pin records travel without their screenshot (kept out of `pins.list`
|
|
223
|
-
* so multi-MB frames don't stall the shared socket); the report detail
|
|
224
|
-
* view fetches it lazily through here. Optional for host-provided
|
|
225
|
-
* adapters that inline screenshots on the record instead.
|
|
226
|
-
*/
|
|
227
|
-
screenshot?(reportId: string): Promise<string | null>;
|
|
228
|
-
close(reportId: string, reason?: ArchiveReason): Promise<void>;
|
|
229
|
-
};
|
|
230
|
-
/** Closes the adapter's shared socket. Any later RPC call revives it. */
|
|
231
|
-
dispose?(): void;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
interface IngestOptions {
|
|
235
|
-
captureConsole?: boolean;
|
|
236
|
-
captureNetwork?: boolean;
|
|
237
|
-
consoleLimit?: number;
|
|
238
|
-
networkLimit?: number;
|
|
239
|
-
consoleTarget?: ConsoleCaptureOptions["target"];
|
|
240
|
-
networkTarget?: NetworkCaptureOptions["target"];
|
|
241
|
-
now?: () => Date;
|
|
242
|
-
}
|
|
243
|
-
interface Ingest {
|
|
244
|
-
start(): void;
|
|
245
|
-
stop(): void;
|
|
246
|
-
readonly isActive: boolean;
|
|
247
|
-
readonly console: ConsoleCapture | null;
|
|
248
|
-
readonly network: NetworkCapture | null;
|
|
249
|
-
}
|
|
250
|
-
type CreateIngestOptions = IngestOptions;
|
|
251
|
-
declare function createIngest(options?: CreateIngestOptions): Ingest;
|
|
252
|
-
declare function resolveIngestOptions(explicit: IngestOptions | null | undefined, hasCloud: boolean): IngestOptions | null;
|
|
253
|
-
|
|
254
169
|
type ThemePreference = "light" | "dark" | "auto";
|
|
255
170
|
type ResolvedTheme = "light" | "dark";
|
|
256
171
|
interface ViewStackEntry {
|
|
@@ -265,11 +180,6 @@ interface SessionSnapshot {
|
|
|
265
180
|
mode: SurfaceMode;
|
|
266
181
|
theme: ThemePreference;
|
|
267
182
|
resolvedTheme: ResolvedTheme;
|
|
268
|
-
/**
|
|
269
|
-
* Identity for the local user. Set once at session creation; gates realtime
|
|
270
|
-
* features (cursor labels, presence) and auto-populates report attribution.
|
|
271
|
-
*/
|
|
272
|
-
user: UserIdentity | null;
|
|
273
183
|
}
|
|
274
184
|
type SessionState = SessionSnapshot;
|
|
275
185
|
|
|
@@ -430,53 +340,17 @@ interface Inspector {
|
|
|
430
340
|
declare function resolveEntityElement(ref: EntityRef): HTMLElement | null;
|
|
431
341
|
declare function createInspector(options: InspectorOptions): Inspector;
|
|
432
342
|
|
|
433
|
-
type PinMatchMode = "route" | "pathname" | "component";
|
|
434
|
-
interface PinLayer {
|
|
435
|
-
setPins(pins: readonly PinRecord[]): void;
|
|
436
|
-
addPin(pin: PinRecord): void;
|
|
437
|
-
removePin(reportId: string): void;
|
|
438
|
-
clear(): void;
|
|
439
|
-
getPinsForElement(componentId: string): readonly PinRecord[];
|
|
440
|
-
getAllPins(): readonly PinRecord[];
|
|
441
|
-
attachChannel(channel: RealtimeChannel): () => void;
|
|
442
|
-
attachCloud(opts: AttachCloudOpts): () => void;
|
|
443
|
-
refresh(): Promise<void>;
|
|
444
|
-
onFilterChange(cb: () => void): () => void;
|
|
445
|
-
readonly visible: boolean;
|
|
446
|
-
setVisible(visible: boolean): void;
|
|
447
|
-
destroy(): void;
|
|
448
|
-
}
|
|
449
|
-
interface AttachCloudOpts {
|
|
450
|
-
cloud: Pick<CloudAdapter, "pins">;
|
|
451
|
-
channel?: RealtimeChannel | null;
|
|
452
|
-
getRoute: () => string;
|
|
453
|
-
getPathname: () => string;
|
|
454
|
-
getVisibleEntities: () => string[];
|
|
455
|
-
getMatchMode: () => PinMatchMode;
|
|
456
|
-
onError?: (err: unknown) => void;
|
|
457
|
-
}
|
|
458
|
-
interface PinLayerOptions {
|
|
459
|
-
container: Element | ShadowRoot;
|
|
460
|
-
onOpenPinDetail?: (componentId: string, reportId: string) => void;
|
|
461
|
-
onHoverPin?: (anchor: HTMLElement | null, componentId: string | null) => void;
|
|
462
|
-
onPinsChanged?: () => void;
|
|
463
|
-
}
|
|
464
|
-
declare function createPinLayer(options: PinLayerOptions): PinLayer;
|
|
465
|
-
|
|
466
343
|
type Corner = "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
467
344
|
interface MenuBarOptions {
|
|
468
345
|
container: Element;
|
|
469
346
|
session: SessionStore;
|
|
470
347
|
initialCorner?: Corner;
|
|
471
348
|
appTitle?: string;
|
|
472
|
-
channel?: RealtimeChannel | null;
|
|
473
|
-
pinLayer?: PinLayer | null;
|
|
474
349
|
}
|
|
475
350
|
interface MenuBar {
|
|
476
351
|
destroy(): void;
|
|
477
352
|
snapTo(corner: Corner): void;
|
|
478
353
|
snapToNearest(x: number, y: number): void;
|
|
479
|
-
setPinLayer(layer: PinLayer): void;
|
|
480
354
|
readonly corner: Corner;
|
|
481
355
|
readonly root: HTMLElement;
|
|
482
356
|
}
|
|
@@ -521,8 +395,6 @@ interface CreateSurfaceShellOptions {
|
|
|
521
395
|
stylesheets?: string[];
|
|
522
396
|
initialCorner?: Corner;
|
|
523
397
|
appTitle?: string;
|
|
524
|
-
channel?: RealtimeChannel | null;
|
|
525
|
-
pinLayer?: PinLayer | null;
|
|
526
398
|
/**
|
|
527
399
|
* Additional inspector wiring. Hover is pre-wired to overlay + tooltip; pass
|
|
528
400
|
* `onSelect` (and `onAfterHover`) to extend behaviour without rebuilding the
|
|
@@ -575,7 +447,7 @@ interface CreateRouterOptions {
|
|
|
575
447
|
}
|
|
576
448
|
declare function createRouter(options: CreateRouterOptions): Router;
|
|
577
449
|
|
|
578
|
-
type ViewSurface = ListSurface | DetailSurface
|
|
450
|
+
type ViewSurface = ListSurface | DetailSurface;
|
|
579
451
|
interface ListSurface {
|
|
580
452
|
kind: "list";
|
|
581
453
|
id: string;
|
|
@@ -720,102 +592,6 @@ interface MetadataEntry {
|
|
|
720
592
|
label: string;
|
|
721
593
|
value: string;
|
|
722
594
|
}
|
|
723
|
-
interface FormSurface {
|
|
724
|
-
kind: "form";
|
|
725
|
-
id: string;
|
|
726
|
-
fields: readonly FormField[];
|
|
727
|
-
submit: FormSubmit;
|
|
728
|
-
initial?: Record<string, FormValue>;
|
|
729
|
-
/**
|
|
730
|
-
* Optional Standard Schema (Zod v4, Valibot, ArkType, etc.) run against the
|
|
731
|
-
* collected form values before `submit.onSubmit`. On failure, issues are
|
|
732
|
-
* routed to the matching `<FieldError>` and submission is skipped.
|
|
733
|
-
*/
|
|
734
|
-
schema?: StandardSchemaV1<Record<string, unknown>>;
|
|
735
|
-
/**
|
|
736
|
-
* Promise resolving to a base64 screenshot data URL. When provided, the
|
|
737
|
-
* form renderer shows a thumbnail preview above the fields.
|
|
738
|
-
*/
|
|
739
|
-
screenshotPreview?: Promise<string | null>;
|
|
740
|
-
}
|
|
741
|
-
/**
|
|
742
|
-
* Minimal StandardSchemaV1 surface — kept inline so the SDK doesn't need a
|
|
743
|
-
* type-level dep on any specific validator package.
|
|
744
|
-
*/
|
|
745
|
-
interface StandardSchemaV1<Input = unknown, Output = Input> {
|
|
746
|
-
readonly "~standard": {
|
|
747
|
-
readonly version: 1;
|
|
748
|
-
readonly vendor: string;
|
|
749
|
-
readonly validate: (value: unknown) => StandardSchemaResult<Output> | Promise<StandardSchemaResult<Output>>;
|
|
750
|
-
readonly types?: {
|
|
751
|
-
readonly input: Input;
|
|
752
|
-
readonly output: Output;
|
|
753
|
-
};
|
|
754
|
-
};
|
|
755
|
-
}
|
|
756
|
-
type StandardSchemaResult<Output> = {
|
|
757
|
-
readonly value: Output;
|
|
758
|
-
readonly issues?: undefined;
|
|
759
|
-
} | {
|
|
760
|
-
readonly issues: ReadonlyArray<StandardSchemaIssue>;
|
|
761
|
-
};
|
|
762
|
-
interface StandardSchemaIssue {
|
|
763
|
-
readonly message: string;
|
|
764
|
-
readonly path?: ReadonlyArray<PropertyKey | {
|
|
765
|
-
readonly key: PropertyKey;
|
|
766
|
-
}>;
|
|
767
|
-
}
|
|
768
|
-
interface FormSubmit {
|
|
769
|
-
label: string;
|
|
770
|
-
onSubmit: (values: Record<string, FormValue>) => FormSubmitResult | void | Promise<FormSubmitResult | void>;
|
|
771
|
-
}
|
|
772
|
-
type FormSubmitResult = {
|
|
773
|
-
status: "success";
|
|
774
|
-
message?: string;
|
|
775
|
-
link?: {
|
|
776
|
-
url: string;
|
|
777
|
-
label?: string;
|
|
778
|
-
};
|
|
779
|
-
resetFields?: readonly string[];
|
|
780
|
-
} | {
|
|
781
|
-
status: "error";
|
|
782
|
-
message: string;
|
|
783
|
-
/** Per-field error messages keyed by field `name`. */
|
|
784
|
-
fieldErrors?: Record<string, string>;
|
|
785
|
-
};
|
|
786
|
-
type FormValue = string | boolean;
|
|
787
|
-
interface FormFieldBase {
|
|
788
|
-
name: string;
|
|
789
|
-
label: string;
|
|
790
|
-
}
|
|
791
|
-
type FormField = (FormFieldBase & {
|
|
792
|
-
kind: "select";
|
|
793
|
-
options: readonly {
|
|
794
|
-
value: string;
|
|
795
|
-
label: string;
|
|
796
|
-
}[];
|
|
797
|
-
required?: boolean;
|
|
798
|
-
value?: string;
|
|
799
|
-
}) | (FormFieldBase & {
|
|
800
|
-
kind: "text";
|
|
801
|
-
placeholder?: string;
|
|
802
|
-
required?: boolean;
|
|
803
|
-
value?: string;
|
|
804
|
-
}) | (FormFieldBase & {
|
|
805
|
-
kind: "email";
|
|
806
|
-
placeholder?: string;
|
|
807
|
-
required?: boolean;
|
|
808
|
-
value?: string;
|
|
809
|
-
}) | (FormFieldBase & {
|
|
810
|
-
kind: "textarea";
|
|
811
|
-
placeholder?: string;
|
|
812
|
-
required?: boolean;
|
|
813
|
-
rows?: number;
|
|
814
|
-
value?: string;
|
|
815
|
-
}) | (FormFieldBase & {
|
|
816
|
-
kind: "checkbox";
|
|
817
|
-
value?: boolean;
|
|
818
|
-
});
|
|
819
595
|
|
|
820
596
|
interface ViewPalette {
|
|
821
597
|
label: string;
|
|
@@ -839,13 +615,6 @@ interface HighlightController {
|
|
|
839
615
|
interface ViewContext {
|
|
840
616
|
ref: EntityRef | null;
|
|
841
617
|
registry: Registry;
|
|
842
|
-
cloud: CloudAdapter<unknown, unknown, unknown> | null;
|
|
843
|
-
/**
|
|
844
|
-
* Local user identity from `createUidex`'s `user` option, or `null` when
|
|
845
|
-
* unconfigured. Views that auto-populate attribution (e.g. report
|
|
846
|
-
* `reporterName`) read this here instead of touching the session store.
|
|
847
|
-
*/
|
|
848
|
-
user: UserIdentity | null;
|
|
849
618
|
views: Router;
|
|
850
619
|
/** Push a view onto the stack. Unregistered ids are a no-op. */
|
|
851
620
|
push: (target: ViewPushTarget) => void;
|
|
@@ -861,11 +630,6 @@ interface ViewContext {
|
|
|
861
630
|
highlight: HighlightController;
|
|
862
631
|
/** Snapshot of the current view stack (top-most last). */
|
|
863
632
|
getStack: () => readonly ViewStackEntry[];
|
|
864
|
-
pushEscapeLayer(handler: EscapeHandler): Cleanup;
|
|
865
|
-
/** Called after a report submission succeeds, to refresh pins etc. */
|
|
866
|
-
onAfterSubmit?: () => void;
|
|
867
|
-
/** Return the current route pattern. Falls back to `location.pathname`. */
|
|
868
|
-
getRoute?: () => string;
|
|
869
633
|
}
|
|
870
634
|
interface ShellHint {
|
|
871
635
|
key: string;
|
|
@@ -939,12 +703,10 @@ interface PaletteShortcut {
|
|
|
939
703
|
shift?: boolean;
|
|
940
704
|
}
|
|
941
705
|
declare function formatShortcutLabel(shortcut: PaletteShortcut): string;
|
|
942
|
-
type EscapeHandler = () => boolean;
|
|
943
706
|
|
|
944
707
|
declare const SURFACE_HOST_CLASS = "uidex-surface-host";
|
|
945
708
|
declare const Z_BASE = 2147483630;
|
|
946
709
|
declare const Z_OVERLAY = 2147483635;
|
|
947
|
-
declare const Z_PIN_LAYER = 2147483640;
|
|
948
710
|
declare const Z_CHROME = 2147483645;
|
|
949
711
|
declare const SURFACE_IGNORE_SELECTOR = ".uidex-surface-host";
|
|
950
712
|
|
|
@@ -953,13 +715,9 @@ interface ViewStackOptions {
|
|
|
953
715
|
views: Router;
|
|
954
716
|
session: SessionStore;
|
|
955
717
|
registry: Registry;
|
|
956
|
-
cloud?: CloudAdapter | null;
|
|
957
718
|
highlight: HighlightController;
|
|
958
719
|
shortcut?: PaletteShortcut;
|
|
959
720
|
dev?: boolean;
|
|
960
|
-
pushEscapeLayer?: ViewContext["pushEscapeLayer"];
|
|
961
|
-
onAfterSubmit?: () => void;
|
|
962
|
-
getRoute?: () => string;
|
|
963
721
|
}
|
|
964
722
|
interface ViewStack {
|
|
965
723
|
/**
|
|
@@ -981,12 +739,8 @@ declare const widgetDetailView: View;
|
|
|
981
739
|
declare const primitiveDetailView: View;
|
|
982
740
|
declare const pageDetailView: View;
|
|
983
741
|
|
|
984
|
-
declare const reportView: View;
|
|
985
|
-
|
|
986
742
|
declare const flowDetailView: View;
|
|
987
743
|
|
|
988
|
-
declare const pinSettingsView: View;
|
|
989
|
-
|
|
990
744
|
declare function buildDefaultViews(shortcut?: PaletteShortcut): View[];
|
|
991
745
|
|
|
992
746
|
interface CreateUidexOptions {
|
|
@@ -996,38 +750,13 @@ interface CreateUidexOptions {
|
|
|
996
750
|
initialCorner?: Corner;
|
|
997
751
|
/** Shown as a label at the start of the menu bar. */
|
|
998
752
|
appTitle?: string;
|
|
999
|
-
cloud?: CloudAdapter | null;
|
|
1000
753
|
dev?: boolean;
|
|
1001
754
|
/** Register bundled default views. Defaults to `true`. */
|
|
1002
755
|
defaultViews?: boolean;
|
|
1003
756
|
/** Additional views to register (after defaults). */
|
|
1004
757
|
views?: readonly View[];
|
|
1005
|
-
/**
|
|
1006
|
-
* Override ingest behaviour. When `cloud` is non-null, ingest auto-enables
|
|
1007
|
-
* (both console and network capture). Pass `null` to disable entirely, or
|
|
1008
|
-
* an options object to override either channel.
|
|
1009
|
-
*/
|
|
1010
|
-
ingest?: IngestOptions | null;
|
|
1011
758
|
/** Keyboard shortcut for the command palette. Defaults to Cmd+K / Ctrl+K. */
|
|
1012
759
|
shortcut?: PaletteShortcut;
|
|
1013
|
-
/**
|
|
1014
|
-
* Identity for the local user. Required to opt into realtime collaborative
|
|
1015
|
-
* features (peer cursors, presence). When omitted, realtime stays
|
|
1016
|
-
* disconnected and report attribution falls back to whatever the user
|
|
1017
|
-
* types in the report form.
|
|
1018
|
-
*/
|
|
1019
|
-
user?: UserIdentity;
|
|
1020
|
-
/** Git context for pin filtering. Typically mirrors `cloud({ git })`. */
|
|
1021
|
-
git?: {
|
|
1022
|
-
branch?: string;
|
|
1023
|
-
commit?: string;
|
|
1024
|
-
};
|
|
1025
|
-
/**
|
|
1026
|
-
* Return the current route pattern (e.g. `/users/:id`). Used for
|
|
1027
|
-
* route-based pin matching and report attribution. When omitted, the SDK
|
|
1028
|
-
* falls back to `location.pathname`.
|
|
1029
|
-
*/
|
|
1030
|
-
getRoute?: () => string;
|
|
1031
760
|
}
|
|
1032
761
|
interface Uidex {
|
|
1033
762
|
mount(target?: Element): void;
|
|
@@ -1035,10 +764,8 @@ interface Uidex {
|
|
|
1035
764
|
readonly registry: Registry;
|
|
1036
765
|
readonly session: SessionStore;
|
|
1037
766
|
readonly views: Router;
|
|
1038
|
-
readonly cloud: CloudAdapter | null;
|
|
1039
|
-
readonly ingest: Ingest | null;
|
|
1040
767
|
readonly shadowRoot: ShadowRoot | null;
|
|
1041
768
|
}
|
|
1042
769
|
declare function createUidex(options?: CreateUidexOptions): Uidex;
|
|
1043
770
|
|
|
1044
|
-
export { type
|
|
771
|
+
export { type Cleanup, type Corner, type CreateRouterOptions, type CreateSessionOptions, type CreateSurfaceShellOptions, type CreateUidexOptions, type CursorTooltip, type CursorTooltipDeps, type DetailAction, type DetailActionIcon, type DetailActionRunContext, type DetailSection, type DetailSubtitle, type DetailSurface, ENTITY_KINDS, type Element$1 as Element, type Entity, type EntityByKind, type EntityKind, type EntityRef, type Feature, type Flow, type HighlightActions, type HighlightController, type Inspector, type InspectorMatch, type InspectorMatchStack, type InspectorOptions, KIND_STYLE, type KindStyleEntry, type ListItem, type ListSurface, type Location, type MenuBar, type MenuBarOptions, type MetaEntityKind, type Metadata, type ModeBindings, type ModeSnapshot, type ModeStore, type ModeTransitions, type NavigationActions, type NavigationState, type NavigationStore, type Overlay, type OverlayShowOptions, type Page, type PaletteShortcut, type Primitive, type Region, type Registry, type ReportRecord, type ResolvedTheme, type Route, type RouteMatch, type Router, SURFACE_HOST_CLASS, SURFACE_IGNORE_SELECTOR, type Scope, type SessionSnapshot, type SessionState, type SessionStore, type ShellAction, type ShellHint, type SurfaceHost, type SurfaceHostOptions, type SurfaceMode, type SurfaceShell, type ThemeDetector, type ThemeDetectorDeps, type ThemePreference, type Uidex, UnknownEntityKindError, type View, type ViewContext, type ViewPalette, type ViewPushTarget, type ViewStack, type ViewStackEntry, type ViewStackOptions, type ViewSurface, ViewValidationError, type Widget, Z_BASE, Z_CHROME, Z_OVERLAY, assertEntityKind, buildDefaultViews, componentDetailView, createCommandPaletteView, createCursorTooltip, createInspector, createMenuBar, createModeStore, createNavigationStore, createOverlay, createRegistry, createRouter, createSession, createSurfaceHost, createSurfaceShell, createThemeDetector, createUidex, createViewStack, displayName, entityKey, featureDetailView, flowDetailView, formatShortcutLabel, isMetaKind, pageDetailView, prettify, primitiveDetailView, regionDetailView, resolveEntityElement, resolveTheme, widgetDetailView };
|