@qontinui/ui-bridge-native 0.1.5 → 0.1.6
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/control/{index.d.mts → action-executor.d.ts} +6 -10
- package/dist/control/action-executor.d.ts.map +1 -0
- package/dist/control/index.d.ts +5 -91
- package/dist/control/index.d.ts.map +1 -0
- package/dist/control/index.js +1 -1
- package/dist/control/index.js.map +1 -1
- package/dist/control/index.mjs +1 -1
- package/dist/control/index.mjs.map +1 -1
- package/dist/{types-BCYWwyVy.d.ts → control/types.d.ts} +17 -18
- package/dist/control/types.d.ts.map +1 -0
- package/dist/core/element-identifier.d.ts +41 -0
- package/dist/core/element-identifier.d.ts.map +1 -0
- package/dist/core/index.d.ts +6 -43
- package/dist/core/index.d.ts.map +1 -0
- package/dist/{registry-B8A_EoxS.d.ts → core/registry.d.ts} +10 -13
- package/dist/core/registry.d.ts.map +1 -0
- package/dist/{types-BPNuYxDx.d.ts → core/types.d.ts} +30 -30
- package/dist/core/types.d.ts.map +1 -0
- package/dist/debug/index.d.ts +4 -44
- package/dist/debug/index.d.ts.map +1 -0
- package/dist/debug/index.js.map +1 -1
- package/dist/debug/index.mjs.map +1 -1
- package/dist/debug/{index.d.mts → inspector.d.ts} +3 -6
- package/dist/debug/inspector.d.ts.map +1 -0
- package/dist/design/{index.d.mts → design-inspector-native.d.ts} +7 -11
- package/dist/design/design-inspector-native.d.ts.map +1 -0
- package/dist/{design-types-BHr6Q1FX.d.ts → design/design-types.d.ts} +10 -11
- package/dist/design/design-types.d.ts.map +1 -0
- package/dist/design/index.d.ts +5 -60
- package/dist/design/index.d.ts.map +1 -0
- package/dist/index.d.ts +28 -86
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +107 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +107 -4
- package/dist/index.mjs.map +1 -1
- package/dist/react/UIBridgeNativeProvider.d.ts +147 -0
- package/dist/react/UIBridgeNativeProvider.d.ts.map +1 -0
- package/dist/react/index.d.ts +8 -69
- package/dist/react/index.d.ts.map +1 -0
- package/dist/react/index.js +116 -4
- package/dist/react/index.js.map +1 -1
- package/dist/react/index.mjs +116 -4
- package/dist/react/index.mjs.map +1 -1
- package/dist/react/{index.d.mts → useAutoRegister.d.ts} +7 -15
- package/dist/react/useAutoRegister.d.ts.map +1 -0
- package/dist/react/useUIBridge.d.ts +103 -0
- package/dist/react/useUIBridge.d.ts.map +1 -0
- package/dist/react/useUIComponent.d.ts +112 -0
- package/dist/react/useUIComponent.d.ts.map +1 -0
- package/dist/react/useUIElement.d.ts +162 -0
- package/dist/react/useUIElement.d.ts.map +1 -0
- package/dist/server/design-handlers.d.ts +47 -0
- package/dist/server/design-handlers.d.ts.map +1 -0
- package/dist/server/handlers.d.ts +20 -0
- package/dist/server/handlers.d.ts.map +1 -0
- package/dist/server/http-server.d.ts +247 -0
- package/dist/server/http-server.d.ts.map +1 -0
- package/dist/server/index.d.ts +13 -117
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +102 -1
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +102 -1
- package/dist/server/index.mjs.map +1 -1
- package/dist/server/types.d.ts +200 -0
- package/dist/server/types.d.ts.map +1 -0
- package/dist/server/ws-connection.d.ts +48 -0
- package/dist/server/ws-connection.d.ts.map +1 -0
- package/dist/server/ws-event-bridge.d.ts +113 -0
- package/dist/server/ws-event-bridge.d.ts.map +1 -0
- package/dist/server/ws-protocol.d.ts +48 -0
- package/dist/server/ws-protocol.d.ts.map +1 -0
- package/dist/server/ws-types.d.ts +65 -0
- package/dist/server/ws-types.d.ts.map +1 -0
- package/dist/transport/CloudRelayClient.d.ts +51 -0
- package/dist/transport/CloudRelayClient.d.ts.map +1 -0
- package/dist/transport/DeviceAnnouncer.d.ts +75 -0
- package/dist/transport/DeviceAnnouncer.d.ts.map +1 -0
- package/dist/transport/index.d.ts +3 -0
- package/dist/transport/index.d.ts.map +1 -0
- package/package.json +1 -1
- package/dist/core/index.d.mts +0 -46
- package/dist/design-types-BHr6Q1FX.d.mts +0 -205
- package/dist/http-server-B7KudcYJ.d.ts +0 -622
- package/dist/http-server-D7uVANBU.d.mts +0 -622
- package/dist/index.d.mts +0 -89
- package/dist/registry-DhbGbl9c.d.mts +0 -215
- package/dist/server/index.d.mts +0 -119
- package/dist/types-BPNuYxDx.d.mts +0 -383
- package/dist/types-Bcj7ji97.d.mts +0 -177
- package/dist/useUIBridge-CDZbWxII.d.ts +0 -571
- package/dist/useUIBridge-DfIEq9EQ.d.mts +0 -571
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
export { b as ComponentActionDef, c as ComponentActionRequest, d as ComponentActionResponse, U as UIBridgeNativeContextValue, e as UIBridgeNativeProvider, f as UIBridgeNativeProviderProps, g as UIBridgeProps, h as UseUIBridgeReturn, i as UseUIComponentOptions, j as UseUIComponentReturn, k as UseUIElementOptions, l as UseUIElementReturn, m as UseUIElementWithPropsReturn, u as useUIBridge, n as useUIBridgeNative, o as useUIBridgeNativeOptional, p as useUIBridgeNativeRequired, q as useUIBridgeRequired, r as useUIComponent, s as useUIComponentAction, t as useUIElement, v as useUIElementWithProps } from '../useUIBridge-DfIEq9EQ.mjs';
|
|
2
|
-
import { i as NativeElementRef } from '../types-BPNuYxDx.mjs';
|
|
3
|
-
import { b as RegisterElementOptions } from '../registry-DhbGbl9c.mjs';
|
|
4
|
-
import 'react/jsx-runtime';
|
|
5
|
-
import 'react';
|
|
6
|
-
import '../types-Bcj7ji97.mjs';
|
|
7
|
-
import '../http-server-D7uVANBU.mjs';
|
|
8
|
-
import '../design-types-BHr6Q1FX.mjs';
|
|
9
|
-
|
|
10
1
|
/**
|
|
11
2
|
* useAutoRegister Hook for React Native
|
|
12
3
|
*
|
|
@@ -18,11 +9,12 @@ import '../design-types-BHr6Q1FX.mjs';
|
|
|
18
9
|
* 1. Use this hook at the app root to enable the registry
|
|
19
10
|
* 2. Use useUIElement on interactive components (or wrap with Pressable/TouchableOpacity)
|
|
20
11
|
*/
|
|
21
|
-
|
|
12
|
+
import type { NativeElementRef } from '../core/types';
|
|
13
|
+
import type { RegisterElementOptions } from '../core/registry';
|
|
22
14
|
/**
|
|
23
15
|
* Options for auto-registration in React Native
|
|
24
16
|
*/
|
|
25
|
-
interface NativeAutoRegisterOptions {
|
|
17
|
+
export interface NativeAutoRegisterOptions {
|
|
26
18
|
/** Enable auto-registration (default: true in dev mode) */
|
|
27
19
|
enabled?: boolean;
|
|
28
20
|
/** Callback when element is registered */
|
|
@@ -33,7 +25,7 @@ interface NativeAutoRegisterOptions {
|
|
|
33
25
|
/**
|
|
34
26
|
* Handle returned by useAutoRegister for programmatic registration
|
|
35
27
|
*/
|
|
36
|
-
interface NativeAutoRegisterHandle {
|
|
28
|
+
export interface NativeAutoRegisterHandle {
|
|
37
29
|
/** Register an element programmatically */
|
|
38
30
|
register: (id: string, ref: React.RefObject<NativeElementRef>, options?: RegisterElementOptions) => void;
|
|
39
31
|
/** Unregister an element programmatically */
|
|
@@ -67,6 +59,6 @@ interface NativeAutoRegisterHandle {
|
|
|
67
59
|
* }
|
|
68
60
|
* ```
|
|
69
61
|
*/
|
|
70
|
-
declare function useAutoRegister(options?: NativeAutoRegisterOptions): NativeAutoRegisterHandle;
|
|
71
|
-
|
|
72
|
-
|
|
62
|
+
export declare function useAutoRegister(options?: NativeAutoRegisterOptions): NativeAutoRegisterHandle;
|
|
63
|
+
export default useAutoRegister;
|
|
64
|
+
//# sourceMappingURL=useAutoRegister.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAutoRegister.d.ts","sourceRoot":"","sources":["../../src/react/useAutoRegister.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAE/D;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,2DAA2D;IAC3D,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,0CAA0C;IAC1C,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,4CAA4C;IAC5C,YAAY,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,2CAA2C;IAC3C,QAAQ,EAAE,CACR,EAAE,EAAE,MAAM,EACV,GAAG,EAAE,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC,EACtC,OAAO,CAAC,EAAE,sBAAsB,KAC7B,IAAI,CAAC;IACV,6CAA6C;IAC7C,UAAU,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,4CAA4C;IAC5C,SAAS,EAAE,OAAO,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,eAAe,CAAC,OAAO,GAAE,yBAA8B,GAAG,wBAAwB,CA6DjG;AAED,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useUIBridge Hook for React Native
|
|
3
|
+
*
|
|
4
|
+
* Provides a simplified interface for common UI Bridge operations.
|
|
5
|
+
*/
|
|
6
|
+
import type { NativeActionRequest, NativeActionResponse, NativeFindRequest, NativeFindResponse, NativeBridgeSnapshot, RegisteredNativeElement, RegisteredNativeComponent, Workflow } from '../core/types';
|
|
7
|
+
/**
|
|
8
|
+
* Component action request
|
|
9
|
+
*/
|
|
10
|
+
export interface ComponentActionRequest {
|
|
11
|
+
/** Action ID */
|
|
12
|
+
action: string;
|
|
13
|
+
/** Action parameters */
|
|
14
|
+
params?: Record<string, unknown>;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Component action response
|
|
18
|
+
*/
|
|
19
|
+
export interface ComponentActionResponse {
|
|
20
|
+
/** Whether the action succeeded */
|
|
21
|
+
success: boolean;
|
|
22
|
+
/** Result of the action */
|
|
23
|
+
result?: unknown;
|
|
24
|
+
/** Error message if failed */
|
|
25
|
+
error?: string;
|
|
26
|
+
/** Duration in milliseconds */
|
|
27
|
+
durationMs: number;
|
|
28
|
+
/** Timestamp */
|
|
29
|
+
timestamp: number;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* useUIBridge return type
|
|
33
|
+
*/
|
|
34
|
+
export interface UseUIBridgeReturn {
|
|
35
|
+
/** Whether UI Bridge is available */
|
|
36
|
+
available: boolean;
|
|
37
|
+
/** Whether UI Bridge is initialized */
|
|
38
|
+
initialized: boolean;
|
|
39
|
+
/** All registered elements */
|
|
40
|
+
elements: RegisteredNativeElement[];
|
|
41
|
+
/** All registered components */
|
|
42
|
+
components: RegisteredNativeComponent[];
|
|
43
|
+
/** All registered workflows */
|
|
44
|
+
workflows: Workflow[];
|
|
45
|
+
/** Create a snapshot of the current state */
|
|
46
|
+
createSnapshot: () => NativeBridgeSnapshot;
|
|
47
|
+
/** Execute an action on an element */
|
|
48
|
+
executeAction: (elementId: string, request: NativeActionRequest) => Promise<NativeActionResponse>;
|
|
49
|
+
/** Execute a component action */
|
|
50
|
+
executeComponentAction: (componentId: string, request: ComponentActionRequest) => Promise<ComponentActionResponse>;
|
|
51
|
+
/** Find elements */
|
|
52
|
+
find: (request?: NativeFindRequest) => Promise<NativeFindResponse>;
|
|
53
|
+
/** Get an element by ID */
|
|
54
|
+
getElement: (id: string) => RegisteredNativeElement | undefined;
|
|
55
|
+
/** Get a component by ID */
|
|
56
|
+
getComponent: (id: string) => RegisteredNativeComponent | undefined;
|
|
57
|
+
/** Get element state by ID */
|
|
58
|
+
getElementState: (id: string) => ReturnType<RegisteredNativeElement['getState']> | null;
|
|
59
|
+
/** Register a workflow */
|
|
60
|
+
registerWorkflow: (workflow: Workflow) => void;
|
|
61
|
+
/** Unregister a workflow */
|
|
62
|
+
unregisterWorkflow: (id: string) => void;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* useUIBridge hook
|
|
66
|
+
*
|
|
67
|
+
* Provides a simplified interface for accessing UI Bridge functionality.
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* ```tsx
|
|
71
|
+
* function MyComponent() {
|
|
72
|
+
* const { available, elements, executeAction, find } = useUIBridge();
|
|
73
|
+
*
|
|
74
|
+
* if (!available) {
|
|
75
|
+
* return <Text>UI Bridge not available</Text>;
|
|
76
|
+
* }
|
|
77
|
+
*
|
|
78
|
+
* const handlePress = async () => {
|
|
79
|
+
* // Find all buttons
|
|
80
|
+
* const result = await find({ types: ['button'] });
|
|
81
|
+
* console.log('Found buttons:', result.elements);
|
|
82
|
+
*
|
|
83
|
+
* // Execute action on specific element
|
|
84
|
+
* await executeAction('submit-btn', { action: 'press' });
|
|
85
|
+
* };
|
|
86
|
+
*
|
|
87
|
+
* return (
|
|
88
|
+
* <View>
|
|
89
|
+
* <Text>Elements: {elements.length}</Text>
|
|
90
|
+
* <Button title="Press" onPress={handlePress} />
|
|
91
|
+
* </View>
|
|
92
|
+
* );
|
|
93
|
+
* }
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
96
|
+
export declare function useUIBridge(): UseUIBridgeReturn;
|
|
97
|
+
/**
|
|
98
|
+
* useUIBridgeRequired hook
|
|
99
|
+
*
|
|
100
|
+
* Same as useUIBridge but throws if not available.
|
|
101
|
+
*/
|
|
102
|
+
export declare function useUIBridgeRequired(): UseUIBridgeReturn;
|
|
103
|
+
//# sourceMappingURL=useUIBridge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useUIBridge.d.ts","sourceRoot":"","sources":["../../src/react/useUIBridge.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EACV,mBAAmB,EACnB,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,uBAAuB,EACvB,yBAAyB,EACzB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KAAK,uBAAuB,GAAG,SAAS,CAAC;IAChE,4BAA4B;IAC5B,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,yBAAyB,GAAG,SAAS,CAAC;IACpE,8BAA8B;IAC9B,eAAe,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,UAAU,CAAC,uBAAuB,CAAC,UAAU,CAAC,CAAC,GAAG,IAAI,CAAC;IACxF,0BAA0B;IAC1B,gBAAgB,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,IAAI,CAAC;IAC/C,4BAA4B;IAC5B,kBAAkB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CAC1C;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,WAAW,IAAI,iBAAiB,CA8H/C;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,IAAI,iBAAiB,CAMvD"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useUIComponent Hook for React Native
|
|
3
|
+
*
|
|
4
|
+
* Register a component with UI Bridge for component-level actions.
|
|
5
|
+
*/
|
|
6
|
+
import type { RegisteredNativeComponent } from '../core/types';
|
|
7
|
+
/**
|
|
8
|
+
* Action definition for useUIComponent
|
|
9
|
+
*/
|
|
10
|
+
export interface ComponentActionDef<TParams = unknown, TResult = unknown> {
|
|
11
|
+
/** Action identifier */
|
|
12
|
+
id: string;
|
|
13
|
+
/** Human-readable label */
|
|
14
|
+
label?: string;
|
|
15
|
+
/** Description */
|
|
16
|
+
description?: string;
|
|
17
|
+
/** Handler function */
|
|
18
|
+
handler: (params?: TParams) => TResult | Promise<TResult>;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* useUIComponent options
|
|
22
|
+
*/
|
|
23
|
+
export interface UseUIComponentOptions {
|
|
24
|
+
/** Unique identifier for the component */
|
|
25
|
+
id: string;
|
|
26
|
+
/** Human-readable name */
|
|
27
|
+
name: string;
|
|
28
|
+
/** Description */
|
|
29
|
+
description?: string;
|
|
30
|
+
/** Actions available on this component */
|
|
31
|
+
actions?: ComponentActionDef[];
|
|
32
|
+
/** Child element IDs owned by this component */
|
|
33
|
+
elementIds?: string[];
|
|
34
|
+
/** Whether to automatically register on mount */
|
|
35
|
+
autoRegister?: boolean;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* useUIComponent return value
|
|
39
|
+
*/
|
|
40
|
+
export interface UseUIComponentReturn {
|
|
41
|
+
/** Whether the component is registered */
|
|
42
|
+
registered: boolean;
|
|
43
|
+
/** Execute an action on this component */
|
|
44
|
+
executeAction: <TParams = unknown, TResult = unknown>(actionId: string, params?: TParams) => Promise<TResult>;
|
|
45
|
+
/** Manually register the component */
|
|
46
|
+
register: () => void;
|
|
47
|
+
/** Manually unregister the component */
|
|
48
|
+
unregister: () => void;
|
|
49
|
+
/** Update actions dynamically */
|
|
50
|
+
updateActions: (actions: ComponentActionDef[]) => void;
|
|
51
|
+
/** Add an element ID to this component */
|
|
52
|
+
addElement: (elementId: string) => void;
|
|
53
|
+
/** Remove an element ID from this component */
|
|
54
|
+
removeElement: (elementId: string) => void;
|
|
55
|
+
/** The registered component info */
|
|
56
|
+
registeredComponent: RegisteredNativeComponent | null;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* useUIComponent hook for React Native
|
|
60
|
+
*
|
|
61
|
+
* Registers a component with UI Bridge for component-level control.
|
|
62
|
+
* Components can expose high-level actions that may orchestrate multiple element interactions.
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* ```tsx
|
|
66
|
+
* function LoginForm() {
|
|
67
|
+
* const [email, setEmail] = useState('');
|
|
68
|
+
* const [password, setPassword] = useState('');
|
|
69
|
+
*
|
|
70
|
+
* useUIComponent({
|
|
71
|
+
* id: 'login-form',
|
|
72
|
+
* name: 'Login Form',
|
|
73
|
+
* actions: [
|
|
74
|
+
* {
|
|
75
|
+
* id: 'login',
|
|
76
|
+
* label: 'Submit Login',
|
|
77
|
+
* handler: async ({ email, password }) => {
|
|
78
|
+
* setEmail(email);
|
|
79
|
+
* setPassword(password);
|
|
80
|
+
* await submitLogin();
|
|
81
|
+
* },
|
|
82
|
+
* },
|
|
83
|
+
* {
|
|
84
|
+
* id: 'clear',
|
|
85
|
+
* label: 'Clear Form',
|
|
86
|
+
* handler: () => {
|
|
87
|
+
* setEmail('');
|
|
88
|
+
* setPassword('');
|
|
89
|
+
* },
|
|
90
|
+
* },
|
|
91
|
+
* ],
|
|
92
|
+
* });
|
|
93
|
+
*
|
|
94
|
+
* return (
|
|
95
|
+
* <View>
|
|
96
|
+
* <TextInput value={email} onChangeText={setEmail} />
|
|
97
|
+
* <TextInput value={password} onChangeText={setPassword} secureTextEntry />
|
|
98
|
+
* <Button title="Login" onPress={handleSubmit} />
|
|
99
|
+
* </View>
|
|
100
|
+
* );
|
|
101
|
+
* }
|
|
102
|
+
* ```
|
|
103
|
+
*/
|
|
104
|
+
export declare function useUIComponent(options: UseUIComponentOptions): UseUIComponentReturn;
|
|
105
|
+
/**
|
|
106
|
+
* useUIComponentAction hook
|
|
107
|
+
*
|
|
108
|
+
* Create a stable action handler that can be used with useUIComponent.
|
|
109
|
+
* Useful for memoizing action handlers.
|
|
110
|
+
*/
|
|
111
|
+
export declare function useUIComponentAction<TParams = unknown, TResult = unknown>(handler: (params?: TParams) => TResult | Promise<TResult>, deps: React.DependencyList): (params?: TParams) => TResult | Promise<TResult>;
|
|
112
|
+
//# sourceMappingURL=useUIComponent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useUIComponent.d.ts","sourceRoot":"","sources":["../../src/react/useUIComponent.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AAG/D;;GAEG;AACH,MAAM,WAAW,kBAAkB,CAAC,OAAO,GAAG,OAAO,EAAE,OAAO,GAAG,OAAO;IACtE,wB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,yBAAyB,GAAG,IAAI,CAAC;CACvD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,qBAAqB,GAAG,oBAAoB,CAoInF;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,GAAG,OAAO,EAAE,OAAO,GAAG,OAAO,EACvE,OAAO,EAAE,CAAC,MAAM,CAAC,EAAE,OAAO,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,EACzD,IAAI,EAAE,KAAK,CAAC,cAAc,GACzB,CAAC,MAAM,CAAC,EAAE,OAAO,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAGlD"}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useUIElement Hook for React Native
|
|
3
|
+
*
|
|
4
|
+
* Register a native element with UI Bridge for control and observation.
|
|
5
|
+
*/
|
|
6
|
+
import type { NativeElementType, NativeStandardAction, NativeCustomAction, NativeElementState, NativeElementIdentifier, RegisteredNativeElement, NativeElementRef } from '../core/types';
|
|
7
|
+
/**
|
|
8
|
+
* useUIElement options
|
|
9
|
+
*/
|
|
10
|
+
export interface UseUIElementOptions {
|
|
11
|
+
/** Unique identifier for the element */
|
|
12
|
+
id: string;
|
|
13
|
+
/** Element type (defaults to 'custom') */
|
|
14
|
+
type?: NativeElementType;
|
|
15
|
+
/** Human-readable label */
|
|
16
|
+
label?: string;
|
|
17
|
+
/** Override available actions */
|
|
18
|
+
actions?: NativeStandardAction[];
|
|
19
|
+
/** Custom actions */
|
|
20
|
+
customActions?: Record<string, NativeCustomAction>;
|
|
21
|
+
/** Whether to automatically register on mount */
|
|
22
|
+
autoRegister?: boolean;
|
|
23
|
+
/** Callback when state changes */
|
|
24
|
+
onStateChange?: (state: NativeElementState) => void;
|
|
25
|
+
/** Parent component path for tree path generation */
|
|
26
|
+
parentPath?: string;
|
|
27
|
+
/** RN style prop — will be flattened for design review */
|
|
28
|
+
style?: unknown;
|
|
29
|
+
/** State-specific style overrides for design review (pressed, focused, disabled) */
|
|
30
|
+
stateStyles?: {
|
|
31
|
+
pressed?: unknown;
|
|
32
|
+
focused?: unknown;
|
|
33
|
+
disabled?: unknown;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Handler props to auto-register with the bridge for action execution.
|
|
37
|
+
* When provided, the bridge can invoke these handlers via press/type/toggle actions
|
|
38
|
+
* without the component needing a separate useEffect + updateElementProps call.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```tsx
|
|
42
|
+
* const { ref, onLayout, bridgeProps } = useUIElement({
|
|
43
|
+
* id: 'my-button',
|
|
44
|
+
* type: 'pressable',
|
|
45
|
+
* handlers: { onPress: handlePress },
|
|
46
|
+
* });
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
handlers?: Record<string, ((...args: any[]) => any) | undefined>;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Bridge props to spread onto the component
|
|
53
|
+
*/
|
|
54
|
+
export interface UIBridgeProps {
|
|
55
|
+
/** Test ID for automation */
|
|
56
|
+
testID: string;
|
|
57
|
+
/** Accessibility label */
|
|
58
|
+
accessibilityLabel?: string;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* useUIElement return value
|
|
62
|
+
*/
|
|
63
|
+
export interface UseUIElementReturn {
|
|
64
|
+
/** Ref to attach to the element */
|
|
65
|
+
ref: React.RefObject<NativeElementRef>;
|
|
66
|
+
/** onLayout handler to spread onto the element - uses generic type for RN version compatibility */
|
|
67
|
+
onLayout: (event: {
|
|
68
|
+
nativeEvent: {
|
|
69
|
+
layout: {
|
|
70
|
+
x: number;
|
|
71
|
+
y: number;
|
|
72
|
+
width: number;
|
|
73
|
+
height: number;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
}) => void;
|
|
77
|
+
/** Props to spread onto the element for identification */
|
|
78
|
+
bridgeProps: UIBridgeProps;
|
|
79
|
+
/** Whether the element is registered */
|
|
80
|
+
registered: boolean;
|
|
81
|
+
/** Get current state */
|
|
82
|
+
getState: () => NativeElementState | null;
|
|
83
|
+
/** Get element identifier */
|
|
84
|
+
getIdentifier: () => NativeElementIdentifier | null;
|
|
85
|
+
/** Trigger an action on this element */
|
|
86
|
+
trigger: (action: NativeStandardAction | string, params?: Record<string, unknown>) => Promise<void>;
|
|
87
|
+
/** Manually register the element */
|
|
88
|
+
register: () => void;
|
|
89
|
+
/** Manually unregister the element */
|
|
90
|
+
unregister: () => void;
|
|
91
|
+
/** The registered element info */
|
|
92
|
+
registeredElement: RegisteredNativeElement | null;
|
|
93
|
+
/** Update style for design review (flattens and stores in registry) */
|
|
94
|
+
updateStyle: (style: unknown, stateStyles?: {
|
|
95
|
+
pressed?: unknown;
|
|
96
|
+
focused?: unknown;
|
|
97
|
+
disabled?: unknown;
|
|
98
|
+
}) => void;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* useUIElement hook for React Native
|
|
102
|
+
*
|
|
103
|
+
* Registers a native element with UI Bridge for programmatic control.
|
|
104
|
+
*
|
|
105
|
+
* @example
|
|
106
|
+
* ```tsx
|
|
107
|
+
* function SubmitButton() {
|
|
108
|
+
* const { ref, onLayout, bridgeProps, trigger } = useUIElement({
|
|
109
|
+
* id: 'submit-btn',
|
|
110
|
+
* type: 'button',
|
|
111
|
+
* label: 'Submit Form',
|
|
112
|
+
* });
|
|
113
|
+
*
|
|
114
|
+
* return (
|
|
115
|
+
* <Pressable
|
|
116
|
+
* ref={ref}
|
|
117
|
+
* onLayout={onLayout}
|
|
118
|
+
* {...bridgeProps}
|
|
119
|
+
* onPress={() => handleSubmit()}
|
|
120
|
+
* >
|
|
121
|
+
* <Text>Submit</Text>
|
|
122
|
+
* </Pressable>
|
|
123
|
+
* );
|
|
124
|
+
* }
|
|
125
|
+
* ```
|
|
126
|
+
*/
|
|
127
|
+
export declare function useUIElement(options: UseUIElementOptions): UseUIElementReturn;
|
|
128
|
+
/**
|
|
129
|
+
* useUIElementWithProps hook
|
|
130
|
+
*
|
|
131
|
+
* Extended version that also captures component props for action execution.
|
|
132
|
+
* Useful when you need the bridge to be able to call onPress, onChangeText, etc.
|
|
133
|
+
*
|
|
134
|
+
* @example
|
|
135
|
+
* ```tsx
|
|
136
|
+
* function TextInputField({ onChangeText, value }) {
|
|
137
|
+
* const { ref, onLayout, bridgeProps, captureProps } = useUIElementWithProps({
|
|
138
|
+
* id: 'email-input',
|
|
139
|
+
* type: 'input',
|
|
140
|
+
* });
|
|
141
|
+
*
|
|
142
|
+
* // Capture props so bridge can call onChangeText
|
|
143
|
+
* captureProps({ onChangeText, value });
|
|
144
|
+
*
|
|
145
|
+
* return (
|
|
146
|
+
* <TextInput
|
|
147
|
+
* ref={ref}
|
|
148
|
+
* onLayout={onLayout}
|
|
149
|
+
* {...bridgeProps}
|
|
150
|
+
* value={value}
|
|
151
|
+
* onChangeText={onChangeText}
|
|
152
|
+
* />
|
|
153
|
+
* );
|
|
154
|
+
* }
|
|
155
|
+
* ```
|
|
156
|
+
*/
|
|
157
|
+
export interface UseUIElementWithPropsReturn extends UseUIElementReturn {
|
|
158
|
+
/** Capture props for action execution */
|
|
159
|
+
captureProps: (props: Record<string, unknown>) => void;
|
|
160
|
+
}
|
|
161
|
+
export declare function useUIElementWithProps(options: UseUIElementOptions): UseUIElementWithPropsReturn;
|
|
162
|
+
//# sourceMappingURL=useUIElement.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useUIElement.d.ts","sourceRoot":"","sources":["../../src/react/useUIElement.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EACV,iBAAiB,EACjB,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,EAClB,uBAAuB,EACvB,uBAAuB,EACvB,gBAAgB,EAEjB,MAAM,eAAe,CAAC;AA2DvB;;GAEG;AACH,MAAM,WAAW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AgB,qBAAqB,CAAC,OAAO,EAAE,mBAAmB,GAAG,2BAA2B,CAiB/F"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UI Bridge Native Design Review Handlers
|
|
3
|
+
*
|
|
4
|
+
* HTTP handlers for the 8 design review endpoints.
|
|
5
|
+
* Maps registered element styles to the web SDK's design data format.
|
|
6
|
+
*/
|
|
7
|
+
import type { NativeUIBridgeRegistry } from '../core/registry';
|
|
8
|
+
import type { APIResponse, HandlerContext } from './types';
|
|
9
|
+
import type { ElementDesignData, StateStyles, ResponsiveSnapshot } from '../design/design-types';
|
|
10
|
+
/**
|
|
11
|
+
* Design handler interface (subset of NativeServerHandlers)
|
|
12
|
+
*/
|
|
13
|
+
export interface NativeDesignHandlers {
|
|
14
|
+
getElementStyles: (ctx: HandlerContext) => Promise<APIResponse<ElementDesignData>>;
|
|
15
|
+
getElementStateStyles: (ctx: HandlerContext) => Promise<APIResponse<{
|
|
16
|
+
elementId: string;
|
|
17
|
+
stateStyles: StateStyles[];
|
|
18
|
+
}>>;
|
|
19
|
+
getDesignSnapshot: (ctx: HandlerContext) => Promise<APIResponse<{
|
|
20
|
+
elements: ElementDesignData[];
|
|
21
|
+
timestamp: number;
|
|
22
|
+
}>>;
|
|
23
|
+
getResponsiveSnapshots: (ctx: HandlerContext) => Promise<APIResponse<ResponsiveSnapshot[]>>;
|
|
24
|
+
runDesignAudit: (ctx: HandlerContext) => Promise<APIResponse<unknown>>;
|
|
25
|
+
loadStyleGuide: (ctx: HandlerContext) => Promise<APIResponse<{
|
|
26
|
+
loaded: boolean;
|
|
27
|
+
}>>;
|
|
28
|
+
getStyleGuide: (ctx: HandlerContext) => Promise<APIResponse<unknown>>;
|
|
29
|
+
clearStyleGuide: (ctx: HandlerContext) => Promise<APIResponse<{
|
|
30
|
+
cleared: boolean;
|
|
31
|
+
}>>;
|
|
32
|
+
evaluateQuality: (ctx: HandlerContext) => Promise<APIResponse<unknown>>;
|
|
33
|
+
getQualityContexts: (ctx: HandlerContext) => Promise<APIResponse<Array<{
|
|
34
|
+
name: string;
|
|
35
|
+
description: string;
|
|
36
|
+
}>>>;
|
|
37
|
+
saveBaseline: (ctx: HandlerContext) => Promise<APIResponse<{
|
|
38
|
+
saved: boolean;
|
|
39
|
+
elementCount: number;
|
|
40
|
+
}>>;
|
|
41
|
+
diffBaseline: (ctx: HandlerContext) => Promise<APIResponse<unknown>>;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Create design review handlers.
|
|
45
|
+
*/
|
|
46
|
+
export declare function createDesignHandlers(registry: NativeUIBridgeRegistry): NativeDesignHandlers;
|
|
47
|
+
//# sourceMappingURL=design-handlers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"design-handlers.d.ts","sourceRoot":"","sources":["../../src/server/design-handlers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC3D,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAqDjG;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,gBAAgB,EAAE,CAAC,GAAG,EAAE,cAAc,KAAK,OAAO,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC,CAAC;IACnF,qBAAqB,EAAE,CACrB,GAAG,EAAE,cAAc,KAChB,OAAO,CAAC,WAAW,CAAC;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,WAAW,EAAE,CAAA;KAAE,CAAC,CAAC,CAAC;IAC7E,iBAAiB,EAAE,CACjB,GAAG,EAAE,cAAc,KAChB,OAAO,CAAC,WAAW,CAAC;QAAE,QAAQ,EAAE,iBAAiB,EAAE,CAAC;QAAC,SAAS,EAAE,MAAM,CA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
|
+
/**
|
|
2
|
+
* UI Bridge Native Server Handlers
|
|
3
|
+
*
|
|
4
|
+
* Request handlers for the HTTP API endpoints.
|
|
5
|
+
*/
|
|
6
|
+
import { type NativeUIBridgeRegistry } from '../core/registry';
|
|
7
|
+
import type { NativeActionExecutor } from '../control/types';
|
|
8
|
+
import type { NativeServerHandlers } from './types';
|
|
9
|
+
/**
|
|
10
|
+
* Create server handlers
|
|
11
|
+
*/
|
|
12
|
+
export declare function createServerHandlers(registry: NativeUIBridgeRegistry, executor: NativeActionExecutor, config?: {
|
|
13
|
+
appInfo?: {
|
|
14
|
+
appId: string;
|
|
15
|
+
appName: string;
|
|
16
|
+
appType: string;
|
|
17
|
+
framework?: string;
|
|
18
|
+
};
|
|
19
|
+
}): NativeServerHandlers;
|
|
20
|
+
//# sourceMappingURL=handlers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../../src/server/handlers.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,KAAK,sBAAsB,EAAuB,MAAM,kBAAkB,CAAC;AAEpF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,KAAK,EAA+B,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAgQjF;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,sBAAsB,EAChC,QAAQ,EAAE,oBAAoB,EAC9B,MAAM,CAAC,EAAE;IAAE,OAAO,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,GAC7F,oBAAoB,CA6TtB"}
|