@qontinui/ui-bridge-native 0.1.6 → 0.2.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 (94) hide show
  1. package/dist/control/{action-executor.d.ts → index.d.mts} +14 -6
  2. package/dist/control/index.d.ts +95 -5
  3. package/dist/control/index.js +74 -11
  4. package/dist/control/index.js.map +1 -1
  5. package/dist/control/index.mjs +74 -11
  6. package/dist/control/index.mjs.map +1 -1
  7. package/dist/core/index.d.mts +46 -0
  8. package/dist/core/index.d.ts +43 -6
  9. package/dist/core/index.js +69 -1
  10. package/dist/core/index.js.map +1 -1
  11. package/dist/core/index.mjs +69 -1
  12. package/dist/core/index.mjs.map +1 -1
  13. package/dist/debug/{inspector.d.ts → index.d.mts} +6 -3
  14. package/dist/debug/index.d.ts +44 -4
  15. package/dist/debug/index.js.map +1 -1
  16. package/dist/debug/index.mjs.map +1 -1
  17. package/dist/design/{design-inspector-native.d.ts → index.d.mts} +11 -7
  18. package/dist/design/index.d.ts +60 -5
  19. package/dist/{design/design-types.d.ts → design-types-BHr6Q1FX.d.mts} +11 -10
  20. package/dist/design-types-BHr6Q1FX.d.ts +205 -0
  21. package/dist/http-server-DCdR8WlL.d.mts +622 -0
  22. package/dist/http-server-Dj3grQW4.d.ts +622 -0
  23. package/dist/index.d.mts +89 -0
  24. package/dist/index.d.ts +86 -28
  25. package/dist/index.js +391 -12
  26. package/dist/index.js.map +1 -1
  27. package/dist/index.mjs +386 -13
  28. package/dist/index.mjs.map +1 -1
  29. package/dist/react/{useAutoRegister.d.ts → index.d.mts} +15 -7
  30. package/dist/react/index.d.ts +69 -8
  31. package/dist/react/index.js +388 -12
  32. package/dist/react/index.js.map +1 -1
  33. package/dist/react/index.mjs +386 -13
  34. package/dist/react/index.mjs.map +1 -1
  35. package/dist/registry-Cahd8Gn2.d.mts +230 -0
  36. package/dist/{core/registry.d.ts → registry-z-3WJsxp.d.ts} +28 -10
  37. package/dist/server/index.d.mts +119 -0
  38. package/dist/server/index.d.ts +117 -13
  39. package/dist/server/index.js.map +1 -1
  40. package/dist/server/index.mjs.map +1 -1
  41. package/dist/types-DAfCeWXc.d.mts +197 -0
  42. package/dist/{core/types.d.ts → types-Oz13YLZq.d.mts} +124 -30
  43. package/dist/types-Oz13YLZq.d.ts +477 -0
  44. package/dist/{control/types.d.ts → types-ajakyp-l.d.ts} +36 -15
  45. package/dist/useUIBridgeToast-D32KXyL1.d.ts +720 -0
  46. package/dist/useUIBridgeToast-GmT1TzUe.d.mts +720 -0
  47. package/package.json +1 -1
  48. package/dist/control/action-executor.d.ts.map +0 -1
  49. package/dist/control/index.d.ts.map +0 -1
  50. package/dist/control/types.d.ts.map +0 -1
  51. package/dist/core/element-identifier.d.ts +0 -41
  52. package/dist/core/element-identifier.d.ts.map +0 -1
  53. package/dist/core/index.d.ts.map +0 -1
  54. package/dist/core/registry.d.ts.map +0 -1
  55. package/dist/core/types.d.ts.map +0 -1
  56. package/dist/debug/index.d.ts.map +0 -1
  57. package/dist/debug/inspector.d.ts.map +0 -1
  58. package/dist/design/design-inspector-native.d.ts.map +0 -1
  59. package/dist/design/design-types.d.ts.map +0 -1
  60. package/dist/design/index.d.ts.map +0 -1
  61. package/dist/index.d.ts.map +0 -1
  62. package/dist/react/UIBridgeNativeProvider.d.ts +0 -147
  63. package/dist/react/UIBridgeNativeProvider.d.ts.map +0 -1
  64. package/dist/react/index.d.ts.map +0 -1
  65. package/dist/react/useAutoRegister.d.ts.map +0 -1
  66. package/dist/react/useUIBridge.d.ts +0 -103
  67. package/dist/react/useUIBridge.d.ts.map +0 -1
  68. package/dist/react/useUIComponent.d.ts +0 -112
  69. package/dist/react/useUIComponent.d.ts.map +0 -1
  70. package/dist/react/useUIElement.d.ts +0 -162
  71. package/dist/react/useUIElement.d.ts.map +0 -1
  72. package/dist/server/design-handlers.d.ts +0 -47
  73. package/dist/server/design-handlers.d.ts.map +0 -1
  74. package/dist/server/handlers.d.ts +0 -20
  75. package/dist/server/handlers.d.ts.map +0 -1
  76. package/dist/server/http-server.d.ts +0 -247
  77. package/dist/server/http-server.d.ts.map +0 -1
  78. package/dist/server/index.d.ts.map +0 -1
  79. package/dist/server/types.d.ts +0 -200
  80. package/dist/server/types.d.ts.map +0 -1
  81. package/dist/server/ws-connection.d.ts +0 -48
  82. package/dist/server/ws-connection.d.ts.map +0 -1
  83. package/dist/server/ws-event-bridge.d.ts +0 -113
  84. package/dist/server/ws-event-bridge.d.ts.map +0 -1
  85. package/dist/server/ws-protocol.d.ts +0 -48
  86. package/dist/server/ws-protocol.d.ts.map +0 -1
  87. package/dist/server/ws-types.d.ts +0 -65
  88. package/dist/server/ws-types.d.ts.map +0 -1
  89. package/dist/transport/CloudRelayClient.d.ts +0 -51
  90. package/dist/transport/CloudRelayClient.d.ts.map +0 -1
  91. package/dist/transport/DeviceAnnouncer.d.ts +0 -75
  92. package/dist/transport/DeviceAnnouncer.d.ts.map +0 -1
  93. package/dist/transport/index.d.ts +0 -3
  94. package/dist/transport/index.d.ts.map +0 -1
@@ -0,0 +1,197 @@
1
+ import { W as WaitOptions, N as NativeActionRequest, d as NativeActionResponse, m as NativeFindRequest, n as NativeFindResponse, k as NativeElementState } from './types-Oz13YLZq.mjs';
2
+
3
+ /**
4
+ * UI Bridge Native Control Types
5
+ *
6
+ * Types for action execution and control operations.
7
+ */
8
+
9
+ /**
10
+ * Extended action request with control-specific options
11
+ */
12
+ interface ControlActionRequest extends NativeActionRequest {
13
+ /** Request ID for correlation */
14
+ requestId?: string;
15
+ /** Capture snapshot after action */
16
+ captureAfter?: boolean;
17
+ /** Retry options */
18
+ retryOptions?: {
19
+ maxRetries?: number;
20
+ retryDelay?: number;
21
+ };
22
+ }
23
+ /**
24
+ * Extended action response with control-specific data
25
+ */
26
+ interface ControlActionResponse extends NativeActionResponse {
27
+ /** Request ID for correlation */
28
+ requestId?: string;
29
+ /** Retry count */
30
+ retryCount?: number;
31
+ }
32
+ /**
33
+ * Component action request
34
+ */
35
+ interface ComponentActionRequest {
36
+ /** Action to execute */
37
+ action: string;
38
+ /** Action parameters */
39
+ params?: Record<string, unknown>;
40
+ /** Request ID for correlation */
41
+ requestId?: string;
42
+ }
43
+ /**
44
+ * Component action response
45
+ */
46
+ interface ComponentActionResponse {
47
+ /** Whether the action succeeded */
48
+ success: boolean;
49
+ /** Result of the action */
50
+ result?: unknown;
51
+ /** Error message if failed */
52
+ error?: string;
53
+ /** Stack trace if failed */
54
+ stack?: string;
55
+ /** Duration in milliseconds */
56
+ durationMs: number;
57
+ /** Timestamp */
58
+ timestamp: number;
59
+ /** Request ID for correlation */
60
+ requestId?: string;
61
+ }
62
+ /**
63
+ * Wait result
64
+ */
65
+ interface WaitResult {
66
+ /** Whether conditions were met */
67
+ met: boolean;
68
+ /** Time spent waiting in milliseconds */
69
+ waitedMs: number;
70
+ /** Final element state */
71
+ state?: NativeElementState;
72
+ /** Error message if failed */
73
+ error?: string;
74
+ }
75
+ /**
76
+ * Action event emitted after executeAction completes (success or failure).
77
+ */
78
+ interface NativeActionEvent {
79
+ elementId: string;
80
+ action: string;
81
+ params?: unknown;
82
+ success: boolean;
83
+ error?: string;
84
+ /** ms since epoch when the executor finished the action */
85
+ timestamp: number;
86
+ /** request id propagated from ControlActionRequest, if any */
87
+ requestId?: string;
88
+ durationMs: number;
89
+ }
90
+ type NativeActionListener = (event: NativeActionEvent) => void;
91
+ /**
92
+ * Native action executor interface
93
+ */
94
+ interface NativeActionExecutor {
95
+ /**
96
+ * Execute an action on an element
97
+ */
98
+ executeAction(elementId: string, request: ControlActionRequest): Promise<ControlActionResponse>;
99
+ /**
100
+ * Execute a component action
101
+ */
102
+ executeComponentAction(componentId: string, request: ComponentActionRequest): Promise<ComponentActionResponse>;
103
+ /**
104
+ * Find elements
105
+ */
106
+ find(request: NativeFindRequest): Promise<NativeFindResponse>;
107
+ /**
108
+ * Wait for element conditions
109
+ */
110
+ waitForElement(elementId: string, options: WaitOptions): Promise<WaitResult>;
111
+ /** Subscribe to action events. Returns an unsubscribe function. */
112
+ onActionExecuted(listener: NativeActionListener): () => void;
113
+ }
114
+ /**
115
+ * Page navigation request
116
+ */
117
+ interface PageNavigateRequest {
118
+ /** URL to navigate to */
119
+ url: string;
120
+ }
121
+ /**
122
+ * Page navigation response
123
+ */
124
+ interface PageNavigationResponse {
125
+ /** Whether the navigation succeeded */
126
+ success: boolean;
127
+ /** Current URL after navigation */
128
+ url?: string;
129
+ /** Timestamp */
130
+ timestamp: number;
131
+ }
132
+ /**
133
+ * Action execution options
134
+ */
135
+ interface ActionExecutionOptions {
136
+ /** Timeout in milliseconds */
137
+ timeout?: number;
138
+ /** Whether to wait for element to be ready */
139
+ waitForReady?: boolean;
140
+ /** Custom wait conditions */
141
+ waitOptions?: WaitOptions;
142
+ }
143
+ /**
144
+ * Type action params
145
+ */
146
+ interface TypeActionParams {
147
+ /** Text to type */
148
+ text: string;
149
+ /** Typing delay between characters (ms) */
150
+ delay?: number;
151
+ /** Clear existing text first */
152
+ clearFirst?: boolean;
153
+ /** Alias for `clearFirst` matching the runner UI Bridge convention. */
154
+ clear?: boolean;
155
+ }
156
+ /**
157
+ * Scroll action params
158
+ */
159
+ interface ScrollActionParams {
160
+ /** Scroll offset */
161
+ offset?: {
162
+ x: number;
163
+ y: number;
164
+ };
165
+ /** Scroll to specific position */
166
+ position?: {
167
+ x: number;
168
+ y: number;
169
+ };
170
+ /** Animate the scroll */
171
+ animated?: boolean;
172
+ }
173
+ /**
174
+ * Swipe action params
175
+ */
176
+ interface SwipeActionParams {
177
+ /** Swipe direction */
178
+ direction: 'up' | 'down' | 'left' | 'right';
179
+ /** Swipe distance (in points) */
180
+ distance?: number;
181
+ /** Swipe duration (ms) */
182
+ duration?: number;
183
+ }
184
+ /**
185
+ * Press action params
186
+ */
187
+ interface PressActionParams {
188
+ /** Position relative to element */
189
+ position?: {
190
+ x: number;
191
+ y: number;
192
+ };
193
+ /** Press duration (ms) for long press */
194
+ duration?: number;
195
+ }
196
+
197
+ export type { ActionExecutionOptions as A, ControlActionRequest as C, NativeActionExecutor as N, PressActionParams as P, ScrollActionParams as S, TypeActionParams as T, WaitResult as W, ControlActionResponse as a, ComponentActionRequest as b, ComponentActionResponse as c, SwipeActionParams as d, PageNavigationResponse as e, NativeActionListener as f, NativeActionEvent as g, PageNavigateRequest as h };
@@ -5,7 +5,7 @@
5
5
  * Adapted from ui-bridge for React Native environments.
6
6
  */
7
7
  type AnyNativeElement = any;
8
- export interface WaitOptions {
8
+ interface WaitOptions {
9
9
  /** Wait for element to be visible */
10
10
  visible?: boolean;
11
11
  /** Wait for element to be enabled */
@@ -19,22 +19,22 @@ export interface WaitOptions {
19
19
  /** Polling interval in milliseconds */
20
20
  interval?: number;
21
21
  }
22
- export type ActionHandler<TParams = unknown, TResult = unknown> = (params?: TParams) => TResult | Promise<TResult>;
23
- export interface CustomAction<TParams = unknown, TResult = unknown> {
22
+ type ActionHandler<TParams = unknown, TResult = unknown> = (params?: TParams) => TResult | Promise<TResult>;
23
+ interface CustomAction<TParams = unknown, TResult = unknown> {
24
24
  id: string;
25
25
  label?: string;
26
26
  description?: string;
27
27
  handler: ActionHandler<TParams, TResult>;
28
28
  }
29
- export interface ComponentAction<TParams = unknown, TResult = unknown> {
29
+ interface ComponentAction<TParams = unknown, TResult = unknown> {
30
30
  id: string;
31
31
  label?: string;
32
32
  description?: string;
33
33
  paramSchema?: Record<string, unknown>;
34
34
  handler: ActionHandler<TParams, TResult>;
35
35
  }
36
- export type WorkflowStepType = 'element-action' | 'component-action' | 'wait' | 'assert' | 'navigate' | 'branch' | 'loop' | 'extract' | 'log' | 'custom';
37
- export interface WorkflowStep {
36
+ type WorkflowStepType = 'element-action' | 'component-action' | 'wait' | 'assert' | 'navigate' | 'branch' | 'loop' | 'extract' | 'log' | 'custom';
37
+ interface WorkflowStep {
38
38
  id: string;
39
39
  type: WorkflowStepType;
40
40
  target?: string;
@@ -43,29 +43,29 @@ export interface WorkflowStep {
43
43
  waitOptions?: WaitOptions;
44
44
  handler?: () => unknown | Promise<unknown>;
45
45
  }
46
- export interface Workflow {
46
+ interface Workflow {
47
47
  id: string;
48
48
  name: string;
49
49
  description?: string;
50
50
  steps: WorkflowStep[];
51
51
  defaultParams?: Record<string, unknown>;
52
52
  }
53
- export type BridgeEventType = 'element:registered' | 'element:unregistered' | 'element:stateChanged' | 'component:registered' | 'component:unregistered' | 'action:started' | 'action:completed' | 'action:failed' | 'workflow:started' | 'workflow:stepCompleted' | 'workflow:completed' | 'workflow:failed' | 'render:snapshot' | 'error';
54
- export interface BridgeEvent<T = unknown> {
53
+ type BridgeEventType = 'element:registered' | 'element:unregistered' | 'element:stateChanged' | 'component:registered' | 'component:unregistered' | 'action:started' | 'action:completed' | 'action:failed' | 'workflow:started' | 'workflow:stepCompleted' | 'workflow:completed' | 'workflow:failed' | 'render:snapshot' | 'error';
54
+ interface BridgeEvent<T = unknown> {
55
55
  type: BridgeEventType;
56
56
  timestamp: number;
57
57
  data: T;
58
58
  }
59
- export type BridgeEventListener<T = unknown> = (event: BridgeEvent<T>) => void;
59
+ type BridgeEventListener<T = unknown> = (event: BridgeEvent<T>) => void;
60
60
  /**
61
61
  * React Native element reference type.
62
62
  * Uses a generic type to avoid conflicts between different react-native versions.
63
63
  */
64
- export type NativeElementRef = AnyNativeElement | null;
64
+ type NativeElementRef = AnyNativeElement | null;
65
65
  /**
66
66
  * Element identification for React Native (replaces XPath/CSS selectors)
67
67
  */
68
- export interface NativeElementIdentifier {
68
+ interface NativeElementIdentifier {
69
69
  /** Explicit UI Bridge identifier */
70
70
  uiId?: string;
71
71
  /** React Native testID prop */
@@ -82,7 +82,7 @@ export interface NativeElementIdentifier {
82
82
  /**
83
83
  * Layout information from onLayout callback
84
84
  */
85
- export interface NativeLayout {
85
+ interface NativeLayout {
86
86
  /** X position relative to parent */
87
87
  x: number;
88
88
  /** Y position relative to parent */
@@ -99,7 +99,7 @@ export interface NativeLayout {
99
99
  /**
100
100
  * Current state of a native UI element
101
101
  */
102
- export interface NativeElementState {
102
+ interface NativeElementState {
103
103
  /** Whether the element is mounted in the tree */
104
104
  mounted: boolean;
105
105
  /** Whether the element is visible on screen */
@@ -130,15 +130,15 @@ export interface NativeElementState {
130
130
  /**
131
131
  * Types of native UI elements that can be registered
132
132
  */
133
- export type NativeElementType = 'button' | 'input' | 'text' | 'view' | 'scroll' | 'list' | 'listItem' | 'switch' | 'checkbox' | 'radio' | 'image' | 'touchable' | 'pressable' | 'modal' | 'custom';
133
+ type NativeElementType = 'button' | 'input' | 'text' | 'view' | 'scroll' | 'list' | 'listItem' | 'switch' | 'checkbox' | 'radio' | 'image' | 'touchable' | 'pressable' | 'modal' | 'custom';
134
134
  /**
135
135
  * Standard actions available on native elements
136
136
  */
137
- export type NativeStandardAction = 'press' | 'click' | 'longPress' | 'doubleTap' | 'type' | 'clear' | 'focus' | 'blur' | 'scroll' | 'swipe' | 'toggle';
137
+ type NativeStandardAction = 'press' | 'click' | 'longPress' | 'doubleTap' | 'type' | 'clear' | 'focus' | 'blur' | 'scroll' | 'swipe' | 'toggle';
138
138
  /**
139
139
  * Custom action definition for native elements
140
140
  */
141
- export interface NativeCustomAction<TParams = unknown, TResult = unknown> {
141
+ interface NativeCustomAction<TParams = unknown, TResult = unknown> {
142
142
  /** Action identifier */
143
143
  id: string;
144
144
  /** Human-readable label */
@@ -151,7 +151,7 @@ export interface NativeCustomAction<TParams = unknown, TResult = unknown> {
151
151
  /**
152
152
  * A native UI element registered with the bridge
153
153
  */
154
- export interface RegisteredNativeElement {
154
+ interface RegisteredNativeElement {
155
155
  /** Unique identifier for this element */
156
156
  id: string;
157
157
  /** Reference to the native element */
@@ -188,7 +188,7 @@ export interface RegisteredNativeElement {
188
188
  /**
189
189
  * Component action definition for native components
190
190
  */
191
- export interface NativeComponentAction<TParams = unknown, TResult = unknown> {
191
+ interface NativeComponentAction<TParams = unknown, TResult = unknown> {
192
192
  /** Action identifier */
193
193
  id: string;
194
194
  /** Human-readable label */
@@ -203,7 +203,7 @@ export interface NativeComponentAction<TParams = unknown, TResult = unknown> {
203
203
  /**
204
204
  * A native component registered with the bridge (higher-level than elements)
205
205
  */
206
- export interface RegisteredNativeComponent {
206
+ interface RegisteredNativeComponent {
207
207
  /** Unique identifier for this component */
208
208
  id: string;
209
209
  /** Human-readable name */
@@ -222,7 +222,7 @@ export interface RegisteredNativeComponent {
222
222
  /**
223
223
  * Action request for native elements
224
224
  */
225
- export interface NativeActionRequest {
225
+ interface NativeActionRequest {
226
226
  /** Action to execute */
227
227
  action: NativeStandardAction | string;
228
228
  /** Action parameters */
@@ -247,7 +247,7 @@ export interface NativeActionRequest {
247
247
  /**
248
248
  * Response from a native action execution
249
249
  */
250
- export interface NativeActionResponse {
250
+ interface NativeActionResponse {
251
251
  /** Whether the action succeeded */
252
252
  success: boolean;
253
253
  /** Element state after the action */
@@ -270,7 +270,7 @@ export interface NativeActionResponse {
270
270
  /**
271
271
  * Snapshot of the entire native UI bridge state
272
272
  */
273
- export interface NativeBridgeSnapshot {
273
+ interface NativeBridgeSnapshot {
274
274
  /** Timestamp of the snapshot */
275
275
  timestamp: number;
276
276
  /** All registered elements */
@@ -306,11 +306,105 @@ export interface NativeBridgeSnapshot {
306
306
  currentRoute?: string | null;
307
307
  /** Current route segments (if a RouteProvider is configured) */
308
308
  segments?: string[];
309
+ /** Modal/sheet/drawer context (populated when a modalDetector enricher is registered) */
310
+ modalStack?: NativeSnapshotModalContext;
311
+ /** Toast/snackbar context (populated when a toastCapture enricher is registered) */
312
+ toasts?: NativeSnapshotToastContext;
313
+ /** Undo/redo context (populated when an undoTracker enricher is registered) */
314
+ undoRedo?: NativeSnapshotUndoContext;
309
315
  }
316
+ /** A single detected modal-like surface (modal, sheet, drawer, popover, alert) */
317
+ interface NativeModalInfo {
318
+ id: string;
319
+ title?: string;
320
+ type: 'modal' | 'sheet' | 'drawer' | 'popover' | 'alertdialog' | 'dialog';
321
+ /** Whether the modal blocks interaction with the underlying UI */
322
+ blocking: boolean;
323
+ /** Whether it can be dismissed by the user (backdrop tap, swipe, esc, etc.) */
324
+ dismissible: boolean;
325
+ detectedAt: number;
326
+ }
327
+ /**
328
+ * Modal context attached to a snapshot. Field names match the web SDK's
329
+ * `SnapshotModalContext` so external agents can write transport-agnostic checks
330
+ * like `snapshot.modalStack?.hasBlockingModal`.
331
+ */
332
+ interface NativeSnapshotModalContext {
333
+ modals: NativeModalInfo[];
334
+ topModal?: NativeModalInfo;
335
+ hasBlockingModal: boolean;
336
+ count: number;
337
+ }
338
+ /** A captured toast/snackbar */
339
+ interface NativeCapturedToast {
340
+ id: string;
341
+ message: string;
342
+ level: 'info' | 'success' | 'warning' | 'error' | 'loading' | 'unknown';
343
+ appearedAt: number;
344
+ dismissedAt?: number;
345
+ visible: boolean;
346
+ /** Total duration in ms (lifetime so far if still visible, total if dismissed) */
347
+ durationMs: number;
348
+ }
349
+ /** Toast context attached to a snapshot */
350
+ interface NativeSnapshotToastContext {
351
+ /** Toasts currently on screen */
352
+ active: NativeCapturedToast[];
353
+ /** Recently-dismissed toasts retained by the capture buffer (most recent first) */
354
+ recent: NativeCapturedToast[];
355
+ /** Total number of toasts ever captured by this tracker */
356
+ totalCaptured: number;
357
+ }
358
+ /**
359
+ * Undo/redo context attached to a snapshot. Mirrors the web SDK's
360
+ * `SnapshotUndoContext` minus DOM-only fields — RN has no `document.execCommand`
361
+ * or selectors, so the native variant relies entirely on developer declaration.
362
+ */
363
+ interface NativeSnapshotUndoContext {
364
+ /** Whether undo appears to be available */
365
+ canUndo: boolean;
366
+ /** Whether redo appears to be available */
367
+ canRedo: boolean;
368
+ /** Description of what undo would reverse */
369
+ undoDescription?: string;
370
+ /** Description of what redo would restore */
371
+ redoDescription?: string;
372
+ /** Undo stack depth (if known) */
373
+ undoDepth?: number;
374
+ /** Redo stack depth (if known) */
375
+ redoDepth?: number;
376
+ /** Human-readable summary for AI */
377
+ summary: string;
378
+ }
379
+ /**
380
+ * Canonical enricher slot. Each tracker exposes a `getSnapshot*Context()` method
381
+ * that the registry calls during `createSnapshot`. NavigationTracker is intentionally
382
+ * NOT here — route info already flows through `currentRoute` / `segments`.
383
+ */
384
+ interface NativeSnapshotEnrichers {
385
+ modalDetector?: {
386
+ getSnapshotModalContext(): NativeSnapshotModalContext;
387
+ };
388
+ toastCapture?: {
389
+ getSnapshotToastContext(): NativeSnapshotToastContext;
390
+ };
391
+ undoTracker?: {
392
+ getSnapshotUndoContext(): NativeSnapshotUndoContext;
393
+ };
394
+ }
395
+ /**
396
+ * Pluggable snapshot enricher: receives base context and returns extra fields
397
+ * that get `Object.assign`ed onto the snapshot. Used for ad-hoc/custom trackers
398
+ * (e.g. runner sidebar tabs) without growing the canonical enricher set.
399
+ */
400
+ type NativeSnapshotEnricher = (ctx: {
401
+ elements: RegisteredNativeElement[];
402
+ currentRoute: string | null;
403
+ }) => Record<string, unknown>;
310
404
  /**
311
405
  * UI Bridge Native feature flags
312
406
  */
313
- export interface NativeUIBridgeFeatures {
407
+ interface NativeUIBridgeFeatures {
314
408
  /** Enable HTTP control server */
315
409
  server?: boolean;
316
410
  /** Enable debug tools (inspector overlay) */
@@ -319,7 +413,7 @@ export interface NativeUIBridgeFeatures {
319
413
  /**
320
414
  * UI Bridge Native configuration
321
415
  */
322
- export interface NativeUIBridgeConfig {
416
+ interface NativeUIBridgeConfig {
323
417
  /** Port for HTTP server */
324
418
  serverPort?: number;
325
419
  /** Enable verbose logging */
@@ -337,7 +431,7 @@ export interface NativeUIBridgeConfig {
337
431
  /**
338
432
  * Find request for discovering native elements
339
433
  */
340
- export interface NativeFindRequest {
434
+ interface NativeFindRequest {
341
435
  /** Filter by element type */
342
436
  types?: NativeElementType[];
343
437
  /** Filter by testID pattern (supports wildcards) */
@@ -352,7 +446,7 @@ export interface NativeFindRequest {
352
446
  /**
353
447
  * Discovered native element
354
448
  */
355
- export interface DiscoveredNativeElement {
449
+ interface DiscoveredNativeElement {
356
450
  /** Element ID */
357
451
  id: string;
358
452
  /** Element type */
@@ -369,7 +463,7 @@ export interface DiscoveredNativeElement {
369
463
  /**
370
464
  * Find response
371
465
  */
372
- export interface NativeFindResponse {
466
+ interface NativeFindResponse {
373
467
  /** Discovered elements */
374
468
  elements: DiscoveredNativeElement[];
375
469
  /** Total count */
@@ -379,5 +473,5 @@ export interface NativeFindResponse {
379
473
  /** Timestamp */
380
474
  timestamp: number;
381
475
  }
382
- export {};
383
- //# sourceMappingURL=types.d.ts.map
476
+
477
+ export type { ActionHandler as A, BridgeEvent as B, ComponentAction as C, DiscoveredNativeElement as D, WorkflowStep as E, WorkflowStepType as F, NativeActionRequest as N, RegisteredNativeComponent as R, WaitOptions as W, BridgeEventListener as a, BridgeEventType as b, CustomAction as c, NativeActionResponse as d, NativeBridgeSnapshot as e, NativeCapturedToast as f, NativeComponentAction as g, NativeCustomAction as h, NativeElementIdentifier as i, NativeElementRef as j, NativeElementState as k, NativeElementType as l, NativeFindRequest as m, NativeFindResponse as n, NativeLayout as o, NativeModalInfo as p, NativeSnapshotEnricher as q, NativeSnapshotEnrichers as r, NativeSnapshotModalContext as s, NativeSnapshotToastContext as t, NativeSnapshotUndoContext as u, NativeStandardAction as v, NativeUIBridgeConfig as w, NativeUIBridgeFeatures as x, RegisteredNativeElement as y, Workflow as z };