@qontinui/ui-bridge 0.2.0 → 0.3.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/ai/index.d.mts +4 -4
- package/dist/ai/index.d.ts +4 -4
- package/dist/babel-plugin/index.js +515 -0
- package/dist/babel-plugin/index.js.map +1 -0
- package/dist/babel-plugin/index.mjs +499 -0
- package/dist/babel-plugin/index.mjs.map +1 -0
- package/dist/control/index.d.mts +5 -5
- package/dist/control/index.d.ts +5 -5
- package/dist/core/index.d.mts +115 -44
- package/dist/core/index.d.ts +115 -44
- package/dist/core/index.js +0 -1560
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.mjs +1 -1549
- package/dist/core/index.mjs.map +1 -1
- package/dist/debug/index.d.mts +3 -3
- package/dist/debug/index.d.ts +3 -3
- package/dist/index.d.mts +7 -8
- package/dist/index.d.ts +7 -8
- package/dist/index.js +859 -873
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +860 -862
- package/dist/index.mjs.map +1 -1
- package/dist/{metrics-C9XRi_mL.d.ts → metrics-BfiT_rhZ.d.ts} +2 -2
- package/dist/{metrics-NC3csD0R.d.mts → metrics-DTA2bwG7.d.mts} +2 -2
- package/dist/native/control/index.js +453 -0
- package/dist/native/control/index.js.map +1 -0
- package/dist/native/control/index.mjs +450 -0
- package/dist/native/control/index.mjs.map +1 -0
- package/dist/native/core/index.js +486 -0
- package/dist/native/core/index.js.map +1 -0
- package/dist/native/core/index.mjs +475 -0
- package/dist/native/core/index.mjs.map +1 -0
- package/dist/native/debug/index.js +451 -0
- package/dist/native/debug/index.js.map +1 -0
- package/dist/native/debug/index.mjs +449 -0
- package/dist/native/debug/index.mjs.map +1 -0
- package/dist/native/index.js +2274 -0
- package/dist/native/index.js.map +1 -0
- package/dist/native/index.mjs +2246 -0
- package/dist/native/index.mjs.map +1 -0
- package/dist/native/react/index.js +1401 -0
- package/dist/native/react/index.js.map +1 -0
- package/dist/native/react/index.mjs +1389 -0
- package/dist/native/react/index.mjs.map +1 -0
- package/dist/native/server/index.js +415 -0
- package/dist/native/server/index.js.map +1 -0
- package/dist/native/server/index.mjs +410 -0
- package/dist/native/server/index.mjs.map +1 -0
- package/dist/react/index.d.mts +20 -7
- package/dist/react/index.d.ts +20 -7
- package/dist/react/index.js +42 -4
- package/dist/react/index.js.map +1 -1
- package/dist/react/index.mjs +42 -4
- package/dist/react/index.mjs.map +1 -1
- package/dist/{registry-CIEDjbQ9.d.ts → registry-BKLEm-yk.d.ts} +9 -15
- package/dist/{registry-SsSDq46X.d.mts → registry-BmZgyCz8.d.mts} +9 -15
- package/dist/render-log/index.d.mts +1 -1
- package/dist/render-log/index.d.ts +1 -1
- package/dist/server/express.d.mts +36 -0
- package/dist/server/express.d.ts +36 -0
- package/dist/server/express.js +196 -0
- package/dist/server/express.js.map +1 -0
- package/dist/server/express.mjs +192 -0
- package/dist/server/express.mjs.map +1 -0
- package/dist/server/handlers.d.mts +93 -0
- package/dist/server/handlers.d.ts +93 -0
- package/dist/server/handlers.js +4278 -0
- package/dist/server/handlers.js.map +1 -0
- package/dist/server/handlers.mjs +4275 -0
- package/dist/server/handlers.mjs.map +1 -0
- package/dist/server/index.d.mts +10 -0
- package/dist/server/index.d.ts +10 -0
- package/dist/server/index.js +5352 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/index.mjs +5337 -0
- package/dist/server/index.mjs.map +1 -0
- package/dist/server/nextjs.d.mts +126 -0
- package/dist/server/nextjs.d.ts +126 -0
- package/dist/server/nextjs.js +287 -0
- package/dist/server/nextjs.js.map +1 -0
- package/dist/server/nextjs.mjs +282 -0
- package/dist/server/nextjs.mjs.map +1 -0
- package/dist/server/standalone.d.mts +6 -0
- package/dist/server/standalone.d.ts +6 -0
- package/dist/server/standalone.js +719 -0
- package/dist/server/standalone.js.map +1 -0
- package/dist/server/standalone.mjs +715 -0
- package/dist/server/standalone.mjs.map +1 -0
- package/dist/standalone-BURj8J3G.d.ts +212 -0
- package/dist/standalone-Dwmel29d.d.mts +212 -0
- package/dist/swc-plugin/index.d.mts +79 -0
- package/dist/swc-plugin/index.d.ts +79 -0
- package/dist/swc-plugin/index.js +15 -0
- package/dist/swc-plugin/index.js.map +1 -0
- package/dist/swc-plugin/index.mjs +9 -0
- package/dist/swc-plugin/index.mjs.map +1 -0
- package/dist/{types-CFT3Dnx4.d.mts → types-B5Q0GVo0.d.mts} +115 -3
- package/dist/{types-Dr6tH-bm.d.mts → types-B7J7noLK.d.mts} +1 -1
- package/dist/{types-oCTrRxSw.d.ts → types-BkNRILUa.d.ts} +1 -1
- package/dist/types-CEQLnFMv.d.mts +156 -0
- package/dist/types-CHnlwiTK.d.ts +156 -0
- package/dist/{types-BvCfFuEV.d.ts → types-DfPqwU-i.d.ts} +115 -3
- package/dist/{types-CPMbN_Iw.d.mts → types-jKVgTI6_.d.mts} +356 -160
- package/dist/{types-CPMbN_Iw.d.ts → types-jKVgTI6_.d.ts} +356 -160
- package/package.json +106 -3
- package/swc-plugin-wasm/ui_bridge_swc_plugin.wasm +0 -0
- package/dist/websocket-client-CX4QJesI.d.ts +0 -124
- package/dist/websocket-client-C_Na0OSp.d.mts +0 -124
package/dist/core/index.d.mts
CHANGED
|
@@ -1,54 +1,125 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { A as
|
|
3
|
-
export { R as RegistryOptions, U as UIBridgeRegistry, g as getGlobalRegistry, r as resetGlobalRegistry, s as setGlobalRegistry } from '../registry-SsSDq46X.mjs';
|
|
4
|
-
export { U as UIBridgeWSClient, c as createWSClient } from '../websocket-client-C_Na0OSp.mjs';
|
|
5
|
-
import '../types-CFT3Dnx4.mjs';
|
|
6
|
-
import '../types-Dr6tH-bm.mjs';
|
|
1
|
+
import { I as WSClientConfig, M as WSConnectionState, a9 as WSSubscriptionOptions, k as BridgeEventType, l as BridgeSnapshot, f as ActionRequest, g as ActionResponse, i as BridgeEvent } from '../types-jKVgTI6_.mjs';
|
|
2
|
+
export { A as AccessibilityIssue, a as AccessibilityReport, b as AccessibilitySeverity, c as ActionErrorCode, d as ActionFailureDetails, e as ActionHandler, h as AriaCheckedState, B as BranchCondition, j as BridgeEventListener, C as ComponentAction, m as ComponentStateResponse, n as ComputedProperty, o as CustomAction, E as ElementAccessibility, p as ElementIdentifier, q as ElementState, r as ElementType, s as ExtendedWorkflowStep, t as ExtractConfig, L as LogConfig, u as LoopConfig, N as NavigationResult, P as PartialMatch, v as PathResult, R as RecoveryAction, w as RegisteredComponent, x as RegisteredElement, S as StandardAction, y as StateGetter, z as StateSnapshot, T as TransitionResult, U as UIBridgeConfig, D as UIBridgeFeatures, F as UIState, G as UIStateGroup, H as UITransition, W as WCAGLevel, J as WSClientMessage, K as WSClientMessageType, O as WSDiscoverMessage, Q as WSErrorMessage, V as WSEventMessage, X as WSExecuteActionMessage, Y as WSExecuteComponentActionMessage, Z as WSExecuteWorkflowMessage, _ as WSFindMessage, $ as WSGetElementMessage, a0 as WSGetSnapshotMessage, a1 as WSMessageBase, a2 as WSPingMessage, a3 as WSPongMessage, a4 as WSResponseMessage, a5 as WSServerMessage, a6 as WSServerMessageType, a7 as WSSubscribeMessage, a8 as WSSubscribedMessage, aa as WSUnsubscribeMessage, ab as WSUnsubscribedMessage, ac as WSWelcomeMessage, ad as WSWorkflowProgressMessage, ae as WaitOptions, af as Workflow, ag as WorkflowStep, ah as WorkflowStepType } from '../types-jKVgTI6_.mjs';
|
|
7
3
|
|
|
8
4
|
/**
|
|
9
|
-
*
|
|
5
|
+
* WebSocket Client for UI Bridge
|
|
10
6
|
*
|
|
11
|
-
* Provides
|
|
12
|
-
* 1. data-ui-id (explicit UI Bridge identifier - preferred)
|
|
13
|
-
* 2. data-testid (testing library convention)
|
|
14
|
-
* 3. data-awas-element (legacy support)
|
|
15
|
-
* 4. id (HTML id attribute)
|
|
16
|
-
* 5. Generated XPath/CSS selector (fallback)
|
|
7
|
+
* Provides real-time communication with UI Bridge server.
|
|
17
8
|
*/
|
|
18
9
|
|
|
19
10
|
/**
|
|
20
|
-
*
|
|
11
|
+
* WebSocket client for UI Bridge
|
|
21
12
|
*/
|
|
22
|
-
declare
|
|
13
|
+
declare class UIBridgeWSClient {
|
|
14
|
+
private ws;
|
|
15
|
+
private config;
|
|
16
|
+
private state;
|
|
17
|
+
private clientId;
|
|
18
|
+
private reconnectAttempts;
|
|
19
|
+
private reconnectTimer;
|
|
20
|
+
private pingTimer;
|
|
21
|
+
private pendingRequests;
|
|
22
|
+
private connectionListeners;
|
|
23
|
+
private eventListeners;
|
|
24
|
+
private errorListeners;
|
|
25
|
+
private subscriptions;
|
|
26
|
+
constructor(config: WSClientConfig);
|
|
27
|
+
/**
|
|
28
|
+
* Get current connection state
|
|
29
|
+
*/
|
|
30
|
+
get connectionState(): WSConnectionState;
|
|
31
|
+
/**
|
|
32
|
+
* Get assigned client ID
|
|
33
|
+
*/
|
|
34
|
+
get id(): string | null;
|
|
35
|
+
/**
|
|
36
|
+
* Connect to the WebSocket server
|
|
37
|
+
*/
|
|
38
|
+
connect(): Promise<void>;
|
|
39
|
+
/**
|
|
40
|
+
* Disconnect from the server
|
|
41
|
+
*/
|
|
42
|
+
disconnect(): void;
|
|
43
|
+
/**
|
|
44
|
+
* Subscribe to events
|
|
45
|
+
*/
|
|
46
|
+
subscribe(options: WSSubscriptionOptions): Promise<BridgeEventType[]>;
|
|
47
|
+
/**
|
|
48
|
+
* Unsubscribe from events
|
|
49
|
+
*/
|
|
50
|
+
unsubscribe(events?: BridgeEventType[]): Promise<BridgeEventType[]>;
|
|
51
|
+
/**
|
|
52
|
+
* Find elements
|
|
53
|
+
*/
|
|
54
|
+
find(options?: {
|
|
55
|
+
interactiveOnly?: boolean;
|
|
56
|
+
includeState?: boolean;
|
|
57
|
+
selector?: string;
|
|
58
|
+
}): Promise<BridgeSnapshot['elements']>;
|
|
59
|
+
/**
|
|
60
|
+
* Discover elements
|
|
61
|
+
* @deprecated Use find() instead
|
|
62
|
+
*/
|
|
63
|
+
discover(options?: {
|
|
64
|
+
interactiveOnly?: boolean;
|
|
65
|
+
includeState?: boolean;
|
|
66
|
+
selector?: string;
|
|
67
|
+
}): Promise<BridgeSnapshot['elements']>;
|
|
68
|
+
/**
|
|
69
|
+
* Get element details
|
|
70
|
+
*/
|
|
71
|
+
getElement(elementId: string, includeState?: boolean): Promise<BridgeSnapshot['elements'][0] | null>;
|
|
72
|
+
/**
|
|
73
|
+
* Get full snapshot
|
|
74
|
+
*/
|
|
75
|
+
getSnapshot(): Promise<BridgeSnapshot>;
|
|
76
|
+
/**
|
|
77
|
+
* Execute action on an element
|
|
78
|
+
*/
|
|
79
|
+
executeAction(elementId: string, action: ActionRequest): Promise<ActionResponse>;
|
|
80
|
+
/**
|
|
81
|
+
* Execute component action
|
|
82
|
+
*/
|
|
83
|
+
executeComponentAction(componentId: string, action: string, params?: Record<string, unknown>): Promise<ActionResponse>;
|
|
84
|
+
/**
|
|
85
|
+
* Execute workflow with optional progress streaming
|
|
86
|
+
*/
|
|
87
|
+
executeWorkflow(workflowId: string, params?: Record<string, unknown>, onProgress?: (progress: {
|
|
88
|
+
currentStep: number;
|
|
89
|
+
totalSteps: number;
|
|
90
|
+
step: {
|
|
91
|
+
id: string;
|
|
92
|
+
status: string;
|
|
93
|
+
};
|
|
94
|
+
}) => void): Promise<{
|
|
95
|
+
success: boolean;
|
|
96
|
+
results: unknown[];
|
|
97
|
+
}>;
|
|
98
|
+
/**
|
|
99
|
+
* Add connection state listener
|
|
100
|
+
*/
|
|
101
|
+
onConnectionChange(listener: (state: WSConnectionState) => void): () => void;
|
|
102
|
+
/**
|
|
103
|
+
* Add event listener
|
|
104
|
+
*/
|
|
105
|
+
onEvent(eventType: BridgeEventType | '*', listener: (event: BridgeEvent) => void): () => void;
|
|
106
|
+
/**
|
|
107
|
+
* Add error listener
|
|
108
|
+
*/
|
|
109
|
+
onError(listener: (error: Error) => void): () => void;
|
|
110
|
+
private setState;
|
|
111
|
+
private handleMessage;
|
|
112
|
+
private handleResponse;
|
|
113
|
+
private notifyEvent;
|
|
114
|
+
private notifyError;
|
|
115
|
+
private sendRequest;
|
|
116
|
+
private scheduleReconnect;
|
|
117
|
+
private startPingInterval;
|
|
118
|
+
private stopPingInterval;
|
|
119
|
+
}
|
|
23
120
|
/**
|
|
24
|
-
*
|
|
121
|
+
* Create a WebSocket client instance
|
|
25
122
|
*/
|
|
26
|
-
declare function
|
|
27
|
-
/**
|
|
28
|
-
* Generate a unique CSS selector for an element
|
|
29
|
-
*/
|
|
30
|
-
declare function generateCSSSelector(element: HTMLElement): string;
|
|
31
|
-
/**
|
|
32
|
-
* Get the best identifier for an element based on available attributes
|
|
33
|
-
*/
|
|
34
|
-
declare function getBestIdentifier(element: HTMLElement): string;
|
|
35
|
-
/**
|
|
36
|
-
* Create a full ElementIdentifier object for an element
|
|
37
|
-
*/
|
|
38
|
-
declare function createElementIdentifier(element: HTMLElement): ElementIdentifier;
|
|
39
|
-
/**
|
|
40
|
-
* Find an element by its identifier
|
|
41
|
-
*
|
|
42
|
-
* Tries each identification method in priority order
|
|
43
|
-
*/
|
|
44
|
-
declare function findElementByIdentifier(identifier: string | ElementIdentifier, root?: ParentNode): HTMLElement | null;
|
|
45
|
-
/**
|
|
46
|
-
* Find all elements matching an identifier pattern
|
|
47
|
-
*/
|
|
48
|
-
declare function findAllElementsByIdentifier(pattern: string, root?: ParentNode): HTMLElement[];
|
|
49
|
-
/**
|
|
50
|
-
* Check if an element matches an identifier
|
|
51
|
-
*/
|
|
52
|
-
declare function elementMatchesIdentifier(element: HTMLElement, identifier: string | ElementIdentifier): boolean;
|
|
123
|
+
declare function createWSClient(config: WSClientConfig): UIBridgeWSClient;
|
|
53
124
|
|
|
54
|
-
export {
|
|
125
|
+
export { ActionRequest, ActionResponse, BridgeEvent, BridgeEventType, BridgeSnapshot, UIBridgeWSClient, WSClientConfig, WSConnectionState, WSSubscriptionOptions, createWSClient };
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,54 +1,125 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { A as
|
|
3
|
-
export { R as RegistryOptions, U as UIBridgeRegistry, g as getGlobalRegistry, r as resetGlobalRegistry, s as setGlobalRegistry } from '../registry-CIEDjbQ9.js';
|
|
4
|
-
export { U as UIBridgeWSClient, c as createWSClient } from '../websocket-client-CX4QJesI.js';
|
|
5
|
-
import '../types-BvCfFuEV.js';
|
|
6
|
-
import '../types-oCTrRxSw.js';
|
|
1
|
+
import { I as WSClientConfig, M as WSConnectionState, a9 as WSSubscriptionOptions, k as BridgeEventType, l as BridgeSnapshot, f as ActionRequest, g as ActionResponse, i as BridgeEvent } from '../types-jKVgTI6_.js';
|
|
2
|
+
export { A as AccessibilityIssue, a as AccessibilityReport, b as AccessibilitySeverity, c as ActionErrorCode, d as ActionFailureDetails, e as ActionHandler, h as AriaCheckedState, B as BranchCondition, j as BridgeEventListener, C as ComponentAction, m as ComponentStateResponse, n as ComputedProperty, o as CustomAction, E as ElementAccessibility, p as ElementIdentifier, q as ElementState, r as ElementType, s as ExtendedWorkflowStep, t as ExtractConfig, L as LogConfig, u as LoopConfig, N as NavigationResult, P as PartialMatch, v as PathResult, R as RecoveryAction, w as RegisteredComponent, x as RegisteredElement, S as StandardAction, y as StateGetter, z as StateSnapshot, T as TransitionResult, U as UIBridgeConfig, D as UIBridgeFeatures, F as UIState, G as UIStateGroup, H as UITransition, W as WCAGLevel, J as WSClientMessage, K as WSClientMessageType, O as WSDiscoverMessage, Q as WSErrorMessage, V as WSEventMessage, X as WSExecuteActionMessage, Y as WSExecuteComponentActionMessage, Z as WSExecuteWorkflowMessage, _ as WSFindMessage, $ as WSGetElementMessage, a0 as WSGetSnapshotMessage, a1 as WSMessageBase, a2 as WSPingMessage, a3 as WSPongMessage, a4 as WSResponseMessage, a5 as WSServerMessage, a6 as WSServerMessageType, a7 as WSSubscribeMessage, a8 as WSSubscribedMessage, aa as WSUnsubscribeMessage, ab as WSUnsubscribedMessage, ac as WSWelcomeMessage, ad as WSWorkflowProgressMessage, ae as WaitOptions, af as Workflow, ag as WorkflowStep, ah as WorkflowStepType } from '../types-jKVgTI6_.js';
|
|
7
3
|
|
|
8
4
|
/**
|
|
9
|
-
*
|
|
5
|
+
* WebSocket Client for UI Bridge
|
|
10
6
|
*
|
|
11
|
-
* Provides
|
|
12
|
-
* 1. data-ui-id (explicit UI Bridge identifier - preferred)
|
|
13
|
-
* 2. data-testid (testing library convention)
|
|
14
|
-
* 3. data-awas-element (legacy support)
|
|
15
|
-
* 4. id (HTML id attribute)
|
|
16
|
-
* 5. Generated XPath/CSS selector (fallback)
|
|
7
|
+
* Provides real-time communication with UI Bridge server.
|
|
17
8
|
*/
|
|
18
9
|
|
|
19
10
|
/**
|
|
20
|
-
*
|
|
11
|
+
* WebSocket client for UI Bridge
|
|
21
12
|
*/
|
|
22
|
-
declare
|
|
13
|
+
declare class UIBridgeWSClient {
|
|
14
|
+
private ws;
|
|
15
|
+
private config;
|
|
16
|
+
private state;
|
|
17
|
+
private clientId;
|
|
18
|
+
private reconnectAttempts;
|
|
19
|
+
private reconnectTimer;
|
|
20
|
+
private pingTimer;
|
|
21
|
+
private pendingRequests;
|
|
22
|
+
private connectionListeners;
|
|
23
|
+
private eventListeners;
|
|
24
|
+
private errorListeners;
|
|
25
|
+
private subscriptions;
|
|
26
|
+
constructor(config: WSClientConfig);
|
|
27
|
+
/**
|
|
28
|
+
* Get current connection state
|
|
29
|
+
*/
|
|
30
|
+
get connectionState(): WSConnectionState;
|
|
31
|
+
/**
|
|
32
|
+
* Get assigned client ID
|
|
33
|
+
*/
|
|
34
|
+
get id(): string | null;
|
|
35
|
+
/**
|
|
36
|
+
* Connect to the WebSocket server
|
|
37
|
+
*/
|
|
38
|
+
connect(): Promise<void>;
|
|
39
|
+
/**
|
|
40
|
+
* Disconnect from the server
|
|
41
|
+
*/
|
|
42
|
+
disconnect(): void;
|
|
43
|
+
/**
|
|
44
|
+
* Subscribe to events
|
|
45
|
+
*/
|
|
46
|
+
subscribe(options: WSSubscriptionOptions): Promise<BridgeEventType[]>;
|
|
47
|
+
/**
|
|
48
|
+
* Unsubscribe from events
|
|
49
|
+
*/
|
|
50
|
+
unsubscribe(events?: BridgeEventType[]): Promise<BridgeEventType[]>;
|
|
51
|
+
/**
|
|
52
|
+
* Find elements
|
|
53
|
+
*/
|
|
54
|
+
find(options?: {
|
|
55
|
+
interactiveOnly?: boolean;
|
|
56
|
+
includeState?: boolean;
|
|
57
|
+
selector?: string;
|
|
58
|
+
}): Promise<BridgeSnapshot['elements']>;
|
|
59
|
+
/**
|
|
60
|
+
* Discover elements
|
|
61
|
+
* @deprecated Use find() instead
|
|
62
|
+
*/
|
|
63
|
+
discover(options?: {
|
|
64
|
+
interactiveOnly?: boolean;
|
|
65
|
+
includeState?: boolean;
|
|
66
|
+
selector?: string;
|
|
67
|
+
}): Promise<BridgeSnapshot['elements']>;
|
|
68
|
+
/**
|
|
69
|
+
* Get element details
|
|
70
|
+
*/
|
|
71
|
+
getElement(elementId: string, includeState?: boolean): Promise<BridgeSnapshot['elements'][0] | null>;
|
|
72
|
+
/**
|
|
73
|
+
* Get full snapshot
|
|
74
|
+
*/
|
|
75
|
+
getSnapshot(): Promise<BridgeSnapshot>;
|
|
76
|
+
/**
|
|
77
|
+
* Execute action on an element
|
|
78
|
+
*/
|
|
79
|
+
executeAction(elementId: string, action: ActionRequest): Promise<ActionResponse>;
|
|
80
|
+
/**
|
|
81
|
+
* Execute component action
|
|
82
|
+
*/
|
|
83
|
+
executeComponentAction(componentId: string, action: string, params?: Record<string, unknown>): Promise<ActionResponse>;
|
|
84
|
+
/**
|
|
85
|
+
* Execute workflow with optional progress streaming
|
|
86
|
+
*/
|
|
87
|
+
executeWorkflow(workflowId: string, params?: Record<string, unknown>, onProgress?: (progress: {
|
|
88
|
+
currentStep: number;
|
|
89
|
+
totalSteps: number;
|
|
90
|
+
step: {
|
|
91
|
+
id: string;
|
|
92
|
+
status: string;
|
|
93
|
+
};
|
|
94
|
+
}) => void): Promise<{
|
|
95
|
+
success: boolean;
|
|
96
|
+
results: unknown[];
|
|
97
|
+
}>;
|
|
98
|
+
/**
|
|
99
|
+
* Add connection state listener
|
|
100
|
+
*/
|
|
101
|
+
onConnectionChange(listener: (state: WSConnectionState) => void): () => void;
|
|
102
|
+
/**
|
|
103
|
+
* Add event listener
|
|
104
|
+
*/
|
|
105
|
+
onEvent(eventType: BridgeEventType | '*', listener: (event: BridgeEvent) => void): () => void;
|
|
106
|
+
/**
|
|
107
|
+
* Add error listener
|
|
108
|
+
*/
|
|
109
|
+
onError(listener: (error: Error) => void): () => void;
|
|
110
|
+
private setState;
|
|
111
|
+
private handleMessage;
|
|
112
|
+
private handleResponse;
|
|
113
|
+
private notifyEvent;
|
|
114
|
+
private notifyError;
|
|
115
|
+
private sendRequest;
|
|
116
|
+
private scheduleReconnect;
|
|
117
|
+
private startPingInterval;
|
|
118
|
+
private stopPingInterval;
|
|
119
|
+
}
|
|
23
120
|
/**
|
|
24
|
-
*
|
|
121
|
+
* Create a WebSocket client instance
|
|
25
122
|
*/
|
|
26
|
-
declare function
|
|
27
|
-
/**
|
|
28
|
-
* Generate a unique CSS selector for an element
|
|
29
|
-
*/
|
|
30
|
-
declare function generateCSSSelector(element: HTMLElement): string;
|
|
31
|
-
/**
|
|
32
|
-
* Get the best identifier for an element based on available attributes
|
|
33
|
-
*/
|
|
34
|
-
declare function getBestIdentifier(element: HTMLElement): string;
|
|
35
|
-
/**
|
|
36
|
-
* Create a full ElementIdentifier object for an element
|
|
37
|
-
*/
|
|
38
|
-
declare function createElementIdentifier(element: HTMLElement): ElementIdentifier;
|
|
39
|
-
/**
|
|
40
|
-
* Find an element by its identifier
|
|
41
|
-
*
|
|
42
|
-
* Tries each identification method in priority order
|
|
43
|
-
*/
|
|
44
|
-
declare function findElementByIdentifier(identifier: string | ElementIdentifier, root?: ParentNode): HTMLElement | null;
|
|
45
|
-
/**
|
|
46
|
-
* Find all elements matching an identifier pattern
|
|
47
|
-
*/
|
|
48
|
-
declare function findAllElementsByIdentifier(pattern: string, root?: ParentNode): HTMLElement[];
|
|
49
|
-
/**
|
|
50
|
-
* Check if an element matches an identifier
|
|
51
|
-
*/
|
|
52
|
-
declare function elementMatchesIdentifier(element: HTMLElement, identifier: string | ElementIdentifier): boolean;
|
|
123
|
+
declare function createWSClient(config: WSClientConfig): UIBridgeWSClient;
|
|
53
124
|
|
|
54
|
-
export {
|
|
125
|
+
export { ActionRequest, ActionResponse, BridgeEvent, BridgeEventType, BridgeSnapshot, UIBridgeWSClient, WSClientConfig, WSConnectionState, WSSubscriptionOptions, createWSClient };
|