@limrun/ui 0.15.1 → 0.16.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/README.md CHANGED
@@ -6,6 +6,16 @@ types and helpers for building inspect, search, and agent interfaces.
6
6
 
7
7
  See [examples](../../examples/) to see how it can be used.
8
8
 
9
+ ## Frameless embeds
10
+
11
+ `@limrun/ui` bundles Limrun's device frames and boot logos as inline images, about
12
+ 600 KB. Embeds that render the bare screen can import `@limrun/ui/lite` instead: the same
13
+ `RemoteControl` API without any artwork, so `showFrame` has nothing to draw and the boot
14
+ logo is omitted. Pass your own images through the `assets` prop if you want frames back.
15
+
16
+ `onConnectionStateChange` reports `connecting`, `connected`, `reconnecting`, `failed`, and
17
+ `terminated` so a host can show status text without tracking the retry logic.
18
+
9
19
  ## Simulated cameras
10
20
 
11
21
  `RemoteControl` responds automatically when an app in the instance opens,
@@ -0,0 +1,2 @@
1
+ import { RemoteControlHandle, RemoteControlProps } from './remote-control';
2
+ export declare const RemoteControl: import('react').ForwardRefExoticComponent<RemoteControlProps & import('react').RefAttributes<RemoteControlHandle>>;
@@ -28,6 +28,15 @@ export interface RemoteControlProps {
28
28
  * etc.). It is not called for ordinary network drops.
29
29
  */
30
30
  onTerminated?: () => void;
31
+ /**
32
+ * Device frame and boot-logo images. The default export bundles Limrun's
33
+ * frames; `@limrun/ui/lite` omits them so a frameless embed stays small.
34
+ */
35
+ assets?: RemoteControlAssets;
36
+ /**
37
+ * Coarse connection lifecycle, for status UI outside the component.
38
+ */
39
+ onConnectionStateChange?: (state: RemoteControlConnectionState) => void;
31
40
  /**
32
41
  * Enable the inspect overlay. When set, the component starts polling the
33
42
  * accessibility tree and draws boxes over each element on top of the
@@ -247,5 +256,15 @@ export interface RemoteControlHandle {
247
256
  setInspectSelection: (element: AxElement | null) => void;
248
257
  getAxStatus: () => AxStatus;
249
258
  }
259
+ type DevicePlatform = 'ios' | 'android';
250
260
  export declare const withAuthenticationToken: (url: string, token: string) => string;
261
+ export type RemoteControlConnectionState = 'connecting' | 'connected' | 'reconnecting' | 'failed' | 'terminated';
262
+ export type RemoteControlPlatformAssets = {
263
+ frame?: string;
264
+ frameLandscape?: string;
265
+ tabletFrame?: string;
266
+ tabletFrameLandscape?: string;
267
+ loadingLogo?: string;
268
+ };
269
+ export type RemoteControlAssets = Partial<Record<DevicePlatform, RemoteControlPlatformAssets>>;
251
270
  export declare const RemoteControl: React.ForwardRefExoticComponent<RemoteControlProps & React.RefAttributes<RemoteControlHandle>>;
@@ -0,0 +1,2 @@
1
+ import { RemoteControlAssets } from './components/remote-control';
2
+ export declare const defaultRemoteControlAssets: RemoteControlAssets;