@qontinui/ui-bridge-native 0.1.6 → 0.2.1

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 (98) 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 +108 -2
  10. package/dist/core/index.js.map +1 -1
  11. package/dist/core/index.mjs +108 -2
  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 +2 -2
  16. package/dist/debug/index.js.map +1 -1
  17. package/dist/debug/index.mjs +2 -2
  18. package/dist/debug/index.mjs.map +1 -1
  19. package/dist/design/{design-inspector-native.d.ts → index.d.mts} +11 -7
  20. package/dist/design/index.d.ts +60 -5
  21. package/dist/{design/design-types.d.ts → design-types-BHr6Q1FX.d.mts} +11 -10
  22. package/dist/design-types-BHr6Q1FX.d.ts +205 -0
  23. package/dist/http-server-D2U1k48d.d.mts +703 -0
  24. package/dist/http-server-ck8clUsZ.d.ts +703 -0
  25. package/dist/index.d.mts +89 -0
  26. package/dist/index.d.ts +86 -28
  27. package/dist/index.js +754 -50
  28. package/dist/index.js.map +1 -1
  29. package/dist/index.mjs +749 -51
  30. package/dist/index.mjs.map +1 -1
  31. package/dist/react/{useAutoRegister.d.ts → index.d.mts} +15 -7
  32. package/dist/react/index.d.ts +69 -8
  33. package/dist/react/index.js +733 -50
  34. package/dist/react/index.js.map +1 -1
  35. package/dist/react/index.mjs +731 -51
  36. package/dist/react/index.mjs.map +1 -1
  37. package/dist/{core/registry.d.ts → registry-BxXaxmsT.d.ts} +51 -10
  38. package/dist/registry-KdUW_koV.d.mts +253 -0
  39. package/dist/server/index.d.mts +119 -0
  40. package/dist/server/index.d.ts +117 -13
  41. package/dist/server/index.js +272 -16
  42. package/dist/server/index.js.map +1 -1
  43. package/dist/server/index.mjs +272 -16
  44. package/dist/server/index.mjs.map +1 -1
  45. package/dist/{core/types.d.ts → types-BwdPNpII.d.mts} +172 -30
  46. package/dist/types-BwdPNpII.d.ts +525 -0
  47. package/dist/{control/types.d.ts → types-DCEv5qb6.d.ts} +36 -15
  48. package/dist/types-DjB0zJJH.d.mts +197 -0
  49. package/dist/useUIBridgeToast-BPIEbsEc.d.mts +726 -0
  50. package/dist/useUIBridgeToast-DD13oF3k.d.ts +726 -0
  51. package/package.json +2 -2
  52. package/dist/control/action-executor.d.ts.map +0 -1
  53. package/dist/control/index.d.ts.map +0 -1
  54. package/dist/control/types.d.ts.map +0 -1
  55. package/dist/core/element-identifier.d.ts +0 -41
  56. package/dist/core/element-identifier.d.ts.map +0 -1
  57. package/dist/core/index.d.ts.map +0 -1
  58. package/dist/core/registry.d.ts.map +0 -1
  59. package/dist/core/types.d.ts.map +0 -1
  60. package/dist/debug/index.d.ts.map +0 -1
  61. package/dist/debug/inspector.d.ts.map +0 -1
  62. package/dist/design/design-inspector-native.d.ts.map +0 -1
  63. package/dist/design/design-types.d.ts.map +0 -1
  64. package/dist/design/index.d.ts.map +0 -1
  65. package/dist/index.d.ts.map +0 -1
  66. package/dist/react/UIBridgeNativeProvider.d.ts +0 -147
  67. package/dist/react/UIBridgeNativeProvider.d.ts.map +0 -1
  68. package/dist/react/index.d.ts.map +0 -1
  69. package/dist/react/useAutoRegister.d.ts.map +0 -1
  70. package/dist/react/useUIBridge.d.ts +0 -103
  71. package/dist/react/useUIBridge.d.ts.map +0 -1
  72. package/dist/react/useUIComponent.d.ts +0 -112
  73. package/dist/react/useUIComponent.d.ts.map +0 -1
  74. package/dist/react/useUIElement.d.ts +0 -162
  75. package/dist/react/useUIElement.d.ts.map +0 -1
  76. package/dist/server/design-handlers.d.ts +0 -47
  77. package/dist/server/design-handlers.d.ts.map +0 -1
  78. package/dist/server/handlers.d.ts +0 -20
  79. package/dist/server/handlers.d.ts.map +0 -1
  80. package/dist/server/http-server.d.ts +0 -247
  81. package/dist/server/http-server.d.ts.map +0 -1
  82. package/dist/server/index.d.ts.map +0 -1
  83. package/dist/server/types.d.ts +0 -200
  84. package/dist/server/types.d.ts.map +0 -1
  85. package/dist/server/ws-connection.d.ts +0 -48
  86. package/dist/server/ws-connection.d.ts.map +0 -1
  87. package/dist/server/ws-event-bridge.d.ts +0 -113
  88. package/dist/server/ws-event-bridge.d.ts.map +0 -1
  89. package/dist/server/ws-protocol.d.ts +0 -48
  90. package/dist/server/ws-protocol.d.ts.map +0 -1
  91. package/dist/server/ws-types.d.ts +0 -65
  92. package/dist/server/ws-types.d.ts.map +0 -1
  93. package/dist/transport/CloudRelayClient.d.ts +0 -51
  94. package/dist/transport/CloudRelayClient.d.ts.map +0 -1
  95. package/dist/transport/DeviceAnnouncer.d.ts +0 -75
  96. package/dist/transport/DeviceAnnouncer.d.ts.map +0 -1
  97. package/dist/transport/index.d.ts +0 -3
  98. package/dist/transport/index.d.ts.map +0 -1
@@ -0,0 +1,89 @@
1
+ export { A as ActionHandler, B as BridgeEvent, a as BridgeEventListener, b as BridgeEventType, C as ComponentAction, c as CustomAction, D as DiscoveredNativeElement, N as NativeActionRequest, d as NativeActionResponse, e as NativeBridgeSnapshot, f as NativeCapturedToast, g as NativeComponentAction, h as NativeCustomAction, i as NativeElementIdentifier, j as NativeElementRef, k as NativeElementState, l as NativeElementType, m as NativeFindRequest, n as NativeFindResponse, o as NativeLayout, p as NativeModalInfo, q as NativeRegistrationCoverage, r as NativeSnapshotEnricher, s as NativeSnapshotEnrichers, t as NativeSnapshotModalContext, u as NativeSnapshotToastContext, v as NativeSnapshotUndoContext, w as NativeStandardAction, x as NativeUIBridgeConfig, y as NativeUIBridgeFeatures, R as RegisteredNativeComponent, z as RegisteredNativeElement, W as WaitOptions, E as Workflow, F as WorkflowStep, G as WorkflowStepType } from './types-BwdPNpII.mjs';
2
+ export { N as NativeRegistryConfig, a as NativeUIBridgeRegistry, R as RegisterComponentOptions, b as RegisterElementOptions, e as extractHandlerNames, g as getGlobalRegistry, r as resetGlobalRegistry, s as setGlobalRegistry } from './registry-KdUW_koV.mjs';
3
+ export { buildTreePath, createNativeElementIdentifier, findAllByPattern, findElementByIdentifier, matchesIdentifier, parseTreePath } from './core/index.mjs';
4
+ export { A as ActionRecord, C as CloudRelayClient, a as CloudRelayConfig, b as ComponentActionDef, c as ComponentActionRequest, d as ComponentActionResponse, D as DeclaredUndoState, M as ModalDetector, e as ModalPushInput, T as ToastCapture, f as ToastCaptureConfig, g as ToastRecordInput, h as ToastRecorderInput, U as UIBridgeNativeContextValue, i as UIBridgeNativeProvider, j as UIBridgeNativeProviderProps, k as UIBridgeProps, l as UndoTracker, m as UndoTrackerConfig, n as UseUIBridgeModalOptions, o as UseUIBridgeReturn, p as UseUIBridgeToastOptions, q as UseUIComponentOptions, r as UseUIComponentReturn, s as UseUIElementOptions, t as UseUIElementReturn, u as UseUIElementWithPropsReturn, v as useToastRecorder, w as useUIBridge, x as useUIBridgeModal, y as useUIBridgeNative, z as useUIBridgeNativeOptional, B as useUIBridgeNativeRequired, E as useUIBridgeRequired, F as useUIBridgeToast, G as useUIComponent, H as useUIComponentAction, I as useUIElement, J as useUIElementWithProps } from './useUIBridgeToast-BPIEbsEc.mjs';
5
+ export { A as ActionExecutionOptions, C as ControlActionRequest, a as ControlActionResponse, b as ControlComponentActionRequest, c as ControlComponentActionResponse, N as NativeActionExecutor, P as PressActionParams, S as ScrollActionParams, d as SwipeActionParams, T as TypeActionParams, W as WaitResult } from './types-DjB0zJJH.mjs';
6
+ export { DefaultNativeActionExecutor, createNativeActionExecutor } from './control/index.mjs';
7
+ export { A as APIResponse, F as FillFormFieldInput, a as FillFormFieldResult, b as FillFormRequest, c as FillFormResponse, H as HTTPRequest, d as HTTPResponse, e as HandlerContext, f as HandlerFunction, J as JsonRpcBatchRequest, g as JsonRpcBatchResponse, h as JsonRpcEvent, i as JsonRpcRequest, j as JsonRpcResponse, N as NativeServerConfig, k as NativeServerHandlers, l as NativeUIBridgeServer, m as NavigationProvider, R as RequestHandler, n as RouteDefinition, o as RouteProvider, S as ScreenshotProvider, p as ServerAdapter, U as UI_BRIDGE_NATIVE_ROUTES, W as WebSocketConnection, q as WebSocketEventBridge, r as WebSocketMessageHandler, s as WebSocketServerAdapter, t as createNativeServer } from './http-server-D2U1k48d.mjs';
8
+ export { NativeDesignHandlers, buildUpgradeResponse, computeAcceptKey, createDesignHandlers, createServerHandlers } from './server/index.mjs';
9
+ export { E as ElementDesignData, a as ExtendedComputedStyles, F as FlattenedNativeStyle, N as NativeInteractionStateName, b as NativeStateStyles, P as PseudoElementStyles, R as ResponsiveSnapshot, S as StateStyles, c as StyleDiff } from './design-types-BHr6Q1FX.mjs';
10
+ export { captureNativeResponsiveSnapshot, captureNativeStateVariations, getNativeElementDesignData, mapNativeStyleToExtended } from './design/index.mjs';
11
+ export { UIBridgeInspector, UIBridgeInspectorProps } from './debug/index.mjs';
12
+ import 'react/jsx-runtime';
13
+ import 'react';
14
+
15
+ /**
16
+ * Device Announcer — mDNS + Cloud registration for physical device discovery
17
+ *
18
+ * Announces the UI Bridge service on the local network via mDNS (when
19
+ * react-native-zeroconf is available) and optionally registers with the
20
+ * cloud relay backend.
21
+ */
22
+ interface AnnouncerConfig {
23
+ /** Stable device identifier */
24
+ deviceId: string;
25
+ /** App bundle/package ID */
26
+ appId: string;
27
+ /** UI Bridge server port (default 8087) */
28
+ port?: number;
29
+ /** Cloud relay WebSocket URL for registration */
30
+ cloudRelayUrl?: string;
31
+ /** Auth token for cloud relay */
32
+ cloudToken?: string;
33
+ /** UI Bridge SDK version */
34
+ version?: string;
35
+ }
36
+ interface DeviceAnnouncerState {
37
+ mdnsActive: boolean;
38
+ cloudConnected: boolean;
39
+ }
40
+ /** Minimal interface for the react-native-zeroconf Zeroconf instance */
41
+ interface ZeroconfService {
42
+ publishService(type: string, protocol: string, domain: string, name: string, port: number, txtRecord: Record<string, string>): void;
43
+ unpublishService(name: string): void;
44
+ }
45
+ /**
46
+ * Announces the UI Bridge server on the local network (mDNS) and optionally
47
+ * registers with the qontinui.io cloud relay for remote discovery.
48
+ */
49
+ declare class DeviceAnnouncer {
50
+ private config;
51
+ private state;
52
+ private cloudWs;
53
+ private reconnectTimer;
54
+ private reconnectDelay;
55
+ private stopped;
56
+ /** Zeroconf instance, set when mDNS is successfully started */
57
+ private zeroconf;
58
+ /** Rotated pairing token for mDNS TXT records */
59
+ private pairingToken;
60
+ constructor(config: AnnouncerConfig);
61
+ /**
62
+ * Start mDNS advertisement.
63
+ *
64
+ * The consumer must pass the `Zeroconf` constructor (from `react-native-zeroconf`)
65
+ * explicitly; otherwise this is a no-op.
66
+ *
67
+ * Rationale: Metro's `require()` throws an uncatchable module-load error if the
68
+ * bundle doesn't include the named package. That error escapes async try/catch
69
+ * boundaries and crashes the app. We avoid it by never calling `require()`
70
+ * ourselves — the consumer imports the package when they know it's installed.
71
+ *
72
+ * @param ZeroconfCtor - constructor from `import Zeroconf from 'react-native-zeroconf'`
73
+ */
74
+ startMdnsAdvertise(ZeroconfCtor?: new () => ZeroconfService): Promise<void>;
75
+ /**
76
+ * Connect to the cloud relay WebSocket and send a device_register message.
77
+ *
78
+ * Reconnects automatically with exponential backoff (2 s → 60 s) if the
79
+ * connection drops.
80
+ */
81
+ connectCloudRelay(): Promise<void>;
82
+ /** Stop all advertising and registration. */
83
+ stop(): Promise<void>;
84
+ /** Return a copy of the current announcer state. */
85
+ getState(): DeviceAnnouncerState;
86
+ private scheduleReconnect;
87
+ }
88
+
89
+ export { type AnnouncerConfig, DeviceAnnouncer, type DeviceAnnouncerState };
package/dist/index.d.ts CHANGED
@@ -1,31 +1,89 @@
1
+ export { A as ActionHandler, B as BridgeEvent, a as BridgeEventListener, b as BridgeEventType, C as ComponentAction, c as CustomAction, D as DiscoveredNativeElement, N as NativeActionRequest, d as NativeActionResponse, e as NativeBridgeSnapshot, f as NativeCapturedToast, g as NativeComponentAction, h as NativeCustomAction, i as NativeElementIdentifier, j as NativeElementRef, k as NativeElementState, l as NativeElementType, m as NativeFindRequest, n as NativeFindResponse, o as NativeLayout, p as NativeModalInfo, q as NativeRegistrationCoverage, r as NativeSnapshotEnricher, s as NativeSnapshotEnrichers, t as NativeSnapshotModalContext, u as NativeSnapshotToastContext, v as NativeSnapshotUndoContext, w as NativeStandardAction, x as NativeUIBridgeConfig, y as NativeUIBridgeFeatures, R as RegisteredNativeComponent, z as RegisteredNativeElement, W as WaitOptions, E as Workflow, F as WorkflowStep, G as WorkflowStepType } from './types-BwdPNpII.js';
2
+ export { N as NativeRegistryConfig, a as NativeUIBridgeRegistry, R as RegisterComponentOptions, b as RegisterElementOptions, e as extractHandlerNames, g as getGlobalRegistry, r as resetGlobalRegistry, s as setGlobalRegistry } from './registry-BxXaxmsT.js';
3
+ export { buildTreePath, createNativeElementIdentifier, findAllByPattern, findElementByIdentifier, matchesIdentifier, parseTreePath } from './core/index.js';
4
+ export { A as ActionRecord, C as CloudRelayClient, a as CloudRelayConfig, b as ComponentActionDef, c as ComponentActionRequest, d as ComponentActionResponse, D as DeclaredUndoState, M as ModalDetector, e as ModalPushInput, T as ToastCapture, f as ToastCaptureConfig, g as ToastRecordInput, h as ToastRecorderInput, U as UIBridgeNativeContextValue, i as UIBridgeNativeProvider, j as UIBridgeNativeProviderProps, k as UIBridgeProps, l as UndoTracker, m as UndoTrackerConfig, n as UseUIBridgeModalOptions, o as UseUIBridgeReturn, p as UseUIBridgeToastOptions, q as UseUIComponentOptions, r as UseUIComponentReturn, s as UseUIElementOptions, t as UseUIElementReturn, u as UseUIElementWithPropsReturn, v as useToastRecorder, w as useUIBridge, x as useUIBridgeModal, y as useUIBridgeNative, z as useUIBridgeNativeOptional, B as useUIBridgeNativeRequired, E as useUIBridgeRequired, F as useUIBridgeToast, G as useUIComponent, H as useUIComponentAction, I as useUIElement, J as useUIElementWithProps } from './useUIBridgeToast-DD13oF3k.js';
5
+ export { A as ActionExecutionOptions, C as ControlActionRequest, a as ControlActionResponse, b as ControlComponentActionRequest, c as ControlComponentActionResponse, N as NativeActionExecutor, P as PressActionParams, S as ScrollActionParams, d as SwipeActionParams, T as TypeActionParams, W as WaitResult } from './types-DCEv5qb6.js';
6
+ export { DefaultNativeActionExecutor, createNativeActionExecutor } from './control/index.js';
7
+ export { A as APIResponse, F as FillFormFieldInput, a as FillFormFieldResult, b as FillFormRequest, c as FillFormResponse, H as HTTPRequest, d as HTTPResponse, e as HandlerContext, f as HandlerFunction, J as JsonRpcBatchRequest, g as JsonRpcBatchResponse, h as JsonRpcEvent, i as JsonRpcRequest, j as JsonRpcResponse, N as NativeServerConfig, k as NativeServerHandlers, l as NativeUIBridgeServer, m as NavigationProvider, R as RequestHandler, n as RouteDefinition, o as RouteProvider, S as ScreenshotProvider, p as ServerAdapter, U as UI_BRIDGE_NATIVE_ROUTES, W as WebSocketConnection, q as WebSocketEventBridge, r as WebSocketMessageHandler, s as WebSocketServerAdapter, t as createNativeServer } from './http-server-ck8clUsZ.js';
8
+ export { NativeDesignHandlers, buildUpgradeResponse, computeAcceptKey, createDesignHandlers, createServerHandlers } from './server/index.js';
9
+ export { E as ElementDesignData, a as ExtendedComputedStyles, F as FlattenedNativeStyle, N as NativeInteractionStateName, b as NativeStateStyles, P as PseudoElementStyles, R as ResponsiveSnapshot, S as StateStyles, c as StyleDiff } from './design-types-BHr6Q1FX.js';
10
+ export { captureNativeResponsiveSnapshot, captureNativeStateVariations, getNativeElementDesignData, mapNativeStyleToExtended } from './design/index.js';
11
+ export { UIBridgeInspector, UIBridgeInspectorProps } from './debug/index.js';
12
+ import 'react/jsx-runtime';
13
+ import 'react';
14
+
1
15
  /**
2
- * UI Bridge Native
16
+ * Device Announcer — mDNS + Cloud registration for physical device discovery
3
17
  *
4
- * UI Bridge framework for React Native applications.
5
- * Enables AI-driven UI automation and testing for mobile apps.
6
- *
7
- * @packageDocumentation
18
+ * Announces the UI Bridge service on the local network via mDNS (when
19
+ * react-native-zeroconf is available) and optionally registers with the
20
+ * cloud relay backend.
21
+ */
22
+ interface AnnouncerConfig {
23
+ /** Stable device identifier */
24
+ deviceId: string;
25
+ /** App bundle/package ID */
26
+ appId: string;
27
+ /** UI Bridge server port (default 8087) */
28
+ port?: number;
29
+ /** Cloud relay WebSocket URL for registration */
30
+ cloudRelayUrl?: string;
31
+ /** Auth token for cloud relay */
32
+ cloudToken?: string;
33
+ /** UI Bridge SDK version */
34
+ version?: string;
35
+ }
36
+ interface DeviceAnnouncerState {
37
+ mdnsActive: boolean;
38
+ cloudConnected: boolean;
39
+ }
40
+ /** Minimal interface for the react-native-zeroconf Zeroconf instance */
41
+ interface ZeroconfService {
42
+ publishService(type: string, protocol: string, domain: string, name: string, port: number, txtRecord: Record<string, string>): void;
43
+ unpublishService(name: string): void;
44
+ }
45
+ /**
46
+ * Announces the UI Bridge server on the local network (mDNS) and optionally
47
+ * registers with the qontinui.io cloud relay for remote discovery.
8
48
  */
9
- export { type NativeElementIdentifier, type NativeElementState, type NativeLayout, type NativeElementType, type NativeStandardAction, type NativeCustomAction, type RegisteredNativeElement, type RegisteredNativeComponent, type NativeComponentAction, type NativeActionRequest, type NativeActionResponse, type NativeBridgeSnapshot, type NativeUIBridgeFeatures, type NativeUIBridgeConfig, type NativeFindRequest, type NativeFindResponse, type DiscoveredNativeElement, type NativeElementRef, type Workflow, type WorkflowStep, type WorkflowStepType, type WaitOptions, type BridgeEvent, type BridgeEventType, type BridgeEventListener, type ActionHandler, type CustomAction, type ComponentAction, } from './core/types';
10
- export { NativeUIBridgeRegistry, extractHandlerNames, setGlobalRegistry, getGlobalRegistry, resetGlobalRegistry, type RegisterElementOptions, type RegisterComponentOptions, type NativeRegistryConfig, } from './core/registry';
11
- export { createNativeElementIdentifier, findElementByIdentifier, findAllByPattern, buildTreePath, parseTreePath, matchesIdentifier, } from './core/element-identifier';
12
- export { UIBridgeNativeProvider, useUIBridgeNative, useUIBridgeNativeOptional, useUIBridgeNativeRequired, type UIBridgeNativeContextValue, type UIBridgeNativeProviderProps, } from './react/UIBridgeNativeProvider';
13
- export { useUIElement, useUIElementWithProps, type UseUIElementOptions, type UseUIElementReturn, type UseUIElementWithPropsReturn, type UIBridgeProps, } from './react/useUIElement';
14
- export { useUIComponent, useUIComponentAction, type ComponentActionDef, type UseUIComponentOptions, type UseUIComponentReturn, } from './react/useUIComponent';
15
- export { useUIBridge, useUIBridgeRequired, type UseUIBridgeReturn, type ComponentActionRequest, type ComponentActionResponse, } from './react/useUIBridge';
16
- export { type ControlActionRequest, type ControlActionResponse, type ComponentActionRequest as ControlComponentActionRequest, type ComponentActionResponse as ControlComponentActionResponse, type WaitResult, type NativeActionExecutor, type ActionExecutionOptions, type TypeActionParams, type ScrollActionParams, type SwipeActionParams, type PressActionParams, } from './control/types';
17
- export { DefaultNativeActionExecutor, createNativeActionExecutor } from './control/action-executor';
18
- export { type NativeServerConfig, type RouteDefinition, type APIResponse, type HandlerContext, type HandlerFunction, type NativeServerHandlers, type NavigationProvider, type ScreenshotProvider, type RouteProvider, UI_BRIDGE_NATIVE_ROUTES, } from './server/types';
19
- export { createServerHandlers } from './server/handlers';
20
- export { NativeUIBridgeServer, createNativeServer, type HTTPRequest, type HTTPResponse, type RequestHandler, type ServerAdapter, type WebSocketServerAdapter, } from './server/http-server';
21
- export { buildUpgradeResponse, computeAcceptKey } from './server/ws-protocol';
22
- export { WebSocketConnection } from './server/ws-connection';
23
- export type { WebSocketMessageHandler } from './server/ws-connection';
24
- export { WebSocketEventBridge } from './server/ws-event-bridge';
25
- export type { JsonRpcRequest, JsonRpcResponse, JsonRpcEvent, JsonRpcBatchRequest, JsonRpcBatchResponse, } from './server/ws-types';
26
- export { type ExtendedComputedStyles, type StyleDiff, type StateStyles, type ElementDesignData, type PseudoElementStyles, type ResponsiveSnapshot, type FlattenedNativeStyle, type NativeStateStyles, type NativeInteractionStateName, } from './design/design-types';
27
- export { mapNativeStyleToExtended, getNativeElementDesignData, captureNativeStateVariations, captureNativeResponsiveSnapshot, } from './design/design-inspector-native';
28
- export { createDesignHandlers, type NativeDesignHandlers } from './server/design-handlers';
29
- export { UIBridgeInspector, type UIBridgeInspectorProps } from './debug/inspector';
30
- export * from './transport';
31
- //# sourceMappingURL=index.d.ts.map
49
+ declare class DeviceAnnouncer {
50
+ private config;
51
+ private state;
52
+ private cloudWs;
53
+ private reconnectTimer;
54
+ private reconnectDelay;
55
+ private stopped;
56
+ /** Zeroconf instance, set when mDNS is successfully started */
57
+ private zeroconf;
58
+ /** Rotated pairing token for mDNS TXT records */
59
+ private pairingToken;
60
+ constructor(config: AnnouncerConfig);
61
+ /**
62
+ * Start mDNS advertisement.
63
+ *
64
+ * The consumer must pass the `Zeroconf` constructor (from `react-native-zeroconf`)
65
+ * explicitly; otherwise this is a no-op.
66
+ *
67
+ * Rationale: Metro's `require()` throws an uncatchable module-load error if the
68
+ * bundle doesn't include the named package. That error escapes async try/catch
69
+ * boundaries and crashes the app. We avoid it by never calling `require()`
70
+ * ourselves — the consumer imports the package when they know it's installed.
71
+ *
72
+ * @param ZeroconfCtor - constructor from `import Zeroconf from 'react-native-zeroconf'`
73
+ */
74
+ startMdnsAdvertise(ZeroconfCtor?: new () => ZeroconfService): Promise<void>;
75
+ /**
76
+ * Connect to the cloud relay WebSocket and send a device_register message.
77
+ *
78
+ * Reconnects automatically with exponential backoff (2 s → 60 s) if the
79
+ * connection drops.
80
+ */
81
+ connectCloudRelay(): Promise<void>;
82
+ /** Stop all advertising and registration. */
83
+ stop(): Promise<void>;
84
+ /** Return a copy of the current announcer state. */
85
+ getState(): DeviceAnnouncerState;
86
+ private scheduleReconnect;
87
+ }
88
+
89
+ export { type AnnouncerConfig, DeviceAnnouncer, type DeviceAnnouncerState };