@qontinui/ui-bridge-native 0.3.1 → 0.4.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 (108) hide show
  1. package/dist/control/{index.d.mts → action-executor.d.ts} +6 -10
  2. package/dist/control/action-executor.d.ts.map +1 -0
  3. package/dist/control/index.d.ts +5 -95
  4. package/dist/control/index.d.ts.map +1 -0
  5. package/dist/{types-CjEKTDYT.d.ts → control/types.d.ts} +17 -20
  6. package/dist/control/types.d.ts.map +1 -0
  7. package/dist/core/element-identifier.d.ts +41 -0
  8. package/dist/core/element-identifier.d.ts.map +1 -0
  9. package/dist/core/index.d.ts +6 -43
  10. package/dist/core/index.d.ts.map +1 -0
  11. package/dist/{registry-pAUpQq2O.d.ts → core/registry.d.ts} +10 -13
  12. package/dist/core/registry.d.ts.map +1 -0
  13. package/dist/{types-CGVut7mc.d.mts → core/types.d.ts} +41 -41
  14. package/dist/core/types.d.ts.map +1 -0
  15. package/dist/debug/index.d.ts +4 -44
  16. package/dist/debug/index.d.ts.map +1 -0
  17. package/dist/debug/index.js +1 -1
  18. package/dist/debug/index.js.map +1 -1
  19. package/dist/debug/index.mjs +2 -2
  20. package/dist/debug/index.mjs.map +1 -1
  21. package/dist/debug/{index.d.mts → inspector.d.ts} +3 -6
  22. package/dist/debug/inspector.d.ts.map +1 -0
  23. package/dist/design/{index.d.mts → design-inspector-native.d.ts} +7 -11
  24. package/dist/design/design-inspector-native.d.ts.map +1 -0
  25. package/dist/{design-types-BHr6Q1FX.d.mts → design/design-types.d.ts} +10 -11
  26. package/dist/design/design-types.d.ts.map +1 -0
  27. package/dist/design/index.d.ts +5 -60
  28. package/dist/design/index.d.ts.map +1 -0
  29. package/dist/index.d.ts +37 -86
  30. package/dist/index.d.ts.map +1 -0
  31. package/dist/index.js +3 -3
  32. package/dist/index.js.map +1 -1
  33. package/dist/index.mjs +4 -4
  34. package/dist/index.mjs.map +1 -1
  35. package/dist/modal/index.d.ts +2 -0
  36. package/dist/modal/index.d.ts.map +1 -0
  37. package/dist/modal/modal-detector.d.ts +29 -0
  38. package/dist/modal/modal-detector.d.ts.map +1 -0
  39. package/dist/react/StateAnnotation.d.ts +30 -0
  40. package/dist/react/StateAnnotation.d.ts.map +1 -0
  41. package/dist/react/UIBridgeNativeProvider.d.ts +156 -0
  42. package/dist/react/UIBridgeNativeProvider.d.ts.map +1 -0
  43. package/dist/react/index.d.ts +14 -69
  44. package/dist/react/index.d.ts.map +1 -0
  45. package/dist/react/index.js +3 -3
  46. package/dist/react/index.js.map +1 -1
  47. package/dist/react/index.mjs +4 -4
  48. package/dist/react/index.mjs.map +1 -1
  49. package/dist/react/{index.d.mts → useAutoRegister.d.ts} +7 -15
  50. package/dist/react/useAutoRegister.d.ts.map +1 -0
  51. package/dist/react/useUIBridge.d.ts +103 -0
  52. package/dist/react/useUIBridge.d.ts.map +1 -0
  53. package/dist/react/useUIBridgeModal.d.ts +14 -0
  54. package/dist/react/useUIBridgeModal.d.ts.map +1 -0
  55. package/dist/react/useUIBridgeToast.d.ts +25 -0
  56. package/dist/react/useUIBridgeToast.d.ts.map +1 -0
  57. package/dist/react/useUIComponent.d.ts +112 -0
  58. package/dist/react/useUIComponent.d.ts.map +1 -0
  59. package/dist/react/useUIElement.d.ts +162 -0
  60. package/dist/react/useUIElement.d.ts.map +1 -0
  61. package/dist/server/design-handlers.d.ts +47 -0
  62. package/dist/server/design-handlers.d.ts.map +1 -0
  63. package/dist/server/handlers.d.ts +25 -0
  64. package/dist/server/handlers.d.ts.map +1 -0
  65. package/dist/server/http-server.d.ts +262 -0
  66. package/dist/server/http-server.d.ts.map +1 -0
  67. package/dist/server/index.d.ts +14 -176
  68. package/dist/server/index.d.ts.map +1 -0
  69. package/dist/server/observability.d.ts +55 -0
  70. package/dist/server/observability.d.ts.map +1 -0
  71. package/dist/server/types.d.ts +368 -0
  72. package/dist/server/types.d.ts.map +1 -0
  73. package/dist/server/ws-connection.d.ts +48 -0
  74. package/dist/server/ws-connection.d.ts.map +1 -0
  75. package/dist/server/ws-event-bridge.d.ts +113 -0
  76. package/dist/server/ws-event-bridge.d.ts.map +1 -0
  77. package/dist/server/ws-protocol.d.ts +48 -0
  78. package/dist/server/ws-protocol.d.ts.map +1 -0
  79. package/dist/server/ws-types.d.ts +65 -0
  80. package/dist/server/ws-types.d.ts.map +1 -0
  81. package/dist/toast/index.d.ts +2 -0
  82. package/dist/toast/index.d.ts.map +1 -0
  83. package/dist/toast/toast-capture.d.ts +27 -0
  84. package/dist/toast/toast-capture.d.ts.map +1 -0
  85. package/dist/transport/CloudRelayClient.d.ts +51 -0
  86. package/dist/transport/CloudRelayClient.d.ts.map +1 -0
  87. package/dist/transport/DeviceAnnouncer.d.ts +75 -0
  88. package/dist/transport/DeviceAnnouncer.d.ts.map +1 -0
  89. package/dist/transport/index.d.ts +3 -0
  90. package/dist/transport/index.d.ts.map +1 -0
  91. package/dist/transport/logger.d.ts +23 -0
  92. package/dist/transport/logger.d.ts.map +1 -0
  93. package/dist/undo/index.d.ts +3 -0
  94. package/dist/undo/index.d.ts.map +1 -0
  95. package/dist/undo/undo-tracker.d.ts +59 -0
  96. package/dist/undo/undo-tracker.d.ts.map +1 -0
  97. package/package.json +3 -3
  98. package/dist/StateAnnotation--zm0Jfqj.d.ts +0 -755
  99. package/dist/StateAnnotation-BgFoVWFy.d.mts +0 -755
  100. package/dist/core/index.d.mts +0 -46
  101. package/dist/design-types-BHr6Q1FX.d.ts +0 -205
  102. package/dist/http-server--550eD1F.d.mts +0 -805
  103. package/dist/http-server-C9NaNBEP.d.ts +0 -805
  104. package/dist/index.d.mts +0 -89
  105. package/dist/registry-B5JadBN9.d.mts +0 -300
  106. package/dist/server/index.d.mts +0 -178
  107. package/dist/types-B0XA4vOF.d.mts +0 -197
  108. package/dist/types-CGVut7mc.d.ts +0 -567
@@ -1,12 +1,3 @@
1
- export { b as ComponentActionDef, c as ComponentActionRequest, d as ComponentActionResponse, S as State, f as StateAnnotationRequiredElement, g as StateProps, j as ToastRecorderInput, k as TransitionTo, l as TransitionToProps, U as UIBridgeNativeContextValue, m as UIBridgeNativeProvider, n as UIBridgeNativeProviderProps, o as UIBridgeProps, r as UseUIBridgeModalOptions, s as UseUIBridgeReturn, t as UseUIBridgeToastOptions, u as UseUIComponentOptions, v as UseUIComponentReturn, w as UseUIElementOptions, x as UseUIElementReturn, y as UseUIElementWithPropsReturn, z as useToastRecorder, B as useUIBridge, E as useUIBridgeModal, F as useUIBridgeNative, G as useUIBridgeNativeOptional, H as useUIBridgeNativeRequired, I as useUIBridgeRequired, J as useUIBridgeToast, K as useUIComponent, L as useUIComponentAction, N as useUIElement, O as useUIElementWithProps } from '../StateAnnotation-BgFoVWFy.mjs';
2
- import { j as NativeElementRef } from '../types-CGVut7mc.mjs';
3
- import { b as RegisterElementOptions } from '../registry-B5JadBN9.mjs';
4
- import 'react/jsx-runtime';
5
- import 'react';
6
- import '../types-B0XA4vOF.mjs';
7
- import '../http-server--550eD1F.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
- export { type NativeAutoRegisterHandle, type NativeAutoRegisterOptions, useAutoRegister };
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,CA+DjG;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,QAAQ,EACT,MAAM,eAAe,CAAC;AAGvB;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,gBAAgB;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,wBAAwB;I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BAA8B;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,14 @@
1
+ import type { NativeModalInfo } from '../core/types';
2
+ export interface UseUIBridgeModalOptions {
3
+ id: string;
4
+ title?: string;
5
+ type?: NativeModalInfo['type'];
6
+ blocking?: boolean;
7
+ dismissible?: boolean;
8
+ }
9
+ /**
10
+ * Declarative hook: while mounted, registers a modal entry on the active
11
+ * stack so UI Bridge snapshots reflect that a modal is open.
12
+ */
13
+ export declare function useUIBridgeModal(opts: UseUIBridgeModalOptions): void;
14
+ //# sourceMappingURL=useUIBridgeModal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useUIBridgeModal.d.ts","sourceRoot":"","sources":["../../src/react/useUIBridgeModal.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAErD,MAAM,WAAW,uBAAuB;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,uBAAuB,GAAG,IAAI,CAUpE"}
@@ -0,0 +1,25 @@
1
+ import type { NativeCapturedToast } from '../core/types';
2
+ export interface UseUIBridgeToastOptions {
3
+ id: string;
4
+ message: string;
5
+ level?: NativeCapturedToast['level'];
6
+ }
7
+ /**
8
+ * Declarative hook: while mounted, surfaces a toast via the snapshot enricher.
9
+ * Best for explicit-lifecycle toast components.
10
+ */
11
+ export declare function useUIBridgeToast(opts: UseUIBridgeToastOptions): void;
12
+ export interface ToastRecorderInput {
13
+ id: string;
14
+ message: string;
15
+ level?: NativeCapturedToast['level'];
16
+ }
17
+ /**
18
+ * Imperative hook: returns a `recordToast` callback for code that fires
19
+ * toasts outside React (catch blocks, library callbacks, etc.).
20
+ */
21
+ export declare function useToastRecorder(): {
22
+ recordToast: (toast: ToastRecorderInput) => void;
23
+ dismissToast: (id: string) => void;
24
+ };
25
+ //# sourceMappingURL=useUIBridgeToast.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useUIBridgeToast.d.ts","sourceRoot":"","sources":["../../src/react/useUIBridgeToast.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEzD,MAAM,WAAW,uBAAuB;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,mBAAmB,CAAC,OAAO,CAAC,CAAC;CACtC;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,uBAAuB,GAAG,IAAI,CAUpE;AAED,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,mBAAmB,CAAC,OAAO,CAAC,CAAC;CACtC;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI;IAClC,WAAW,EAAE,CAAC,KAAK,EAAE,kBAAkB,KAAK,IAAI,CAAC;IACjD,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC,CAUA"}
@@ -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,wBAAwB;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,2BAA2B;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kBAAkB;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACr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AqB,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,mBAAmB;IAClC,wCAAwC;IACxC,EAAE,EAAE,MAAM,CAAC;IACX,0CAA0C;IAC1C,IAAI,CAAC,EAAE,iBAAiB,CAAC;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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 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,CAAC,GAAG,EAAE,cAAc,KAAK,OAAO,CAAC,WAAW,CAAC;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC,CAAC;IACrF,eAAe,EAAE,CAAC,GAAG,EAAE,cAAc,KAAK,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC;IACxE,kBAAkB,EAAE,CAClB,GAAG,EAAE,cAAc,KAChB,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC,CAAC,CAAC;IACxE,YAAY,EAAE,CACZ,GAAG,EAAE,cAAc,KAChB,OAAO,CAAC,WAAW,CAAC;QAAE,KAAK,EAAE,OAAO,CAAC;QAAC,YAAY,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC,CAAC;IACpE,YAAY,EAAE,CAAC,GAAG,EAAE,cAAc,KAAK,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC;CACtE;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,sBAAsB,GAAG,oBAAoB,CAwS3F"}
@@ -0,0 +1,25 @@
1
+ /**
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
+ import type { ConsoleErrorBuffer, NetworkRequestBuffer } from './observability';
10
+ /**
11
+ * Create server handlers
12
+ */
13
+ export declare function createServerHandlers(registry: NativeUIBridgeRegistry, executor: NativeActionExecutor, config?: {
14
+ appInfo?: {
15
+ appId: string;
16
+ appName: string;
17
+ appType: string;
18
+ framework?: string;
19
+ };
20
+ /** Optional console-error ring buffer powering `GET /control/console-errors`. */
21
+ consoleErrorBuffer?: ConsoleErrorBuffer;
22
+ /** Optional network-request ring buffer powering `GET /sdk/network-requests`. */
23
+ networkRequestBuffer?: NetworkRequestBuffer;
24
+ }): NativeServerHandlers;
25
+ //# 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;AAQpF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,KAAK,EAQV,oBAAoB,EAKrB,MAAM,SAAS,CAAC;AAEjB,OAAO,KAAK,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AA+PhF;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,sBAAsB,EAChC,QAAQ,EAAE,oBAAoB,EAC9B,MAAM,CAAC,EAAE;IACP,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,CAAC;IAClF,iFAAiF;IACjF,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC,iFAAiF;IACjF,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;CAC7C,GACA,oBAAoB,CAqvBtB"}