@qontinui/ui-bridge-native 0.3.0 → 0.3.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 (39) hide show
  1. package/dist/{StateAnnotation-WmK1YjwP.d.ts → StateAnnotation--zm0Jfqj.d.ts} +4 -4
  2. package/dist/{StateAnnotation-D8reaRcS.d.mts → StateAnnotation-BgFoVWFy.d.mts} +4 -4
  3. package/dist/control/index.d.mts +4 -4
  4. package/dist/control/index.d.ts +4 -4
  5. package/dist/core/index.d.mts +3 -3
  6. package/dist/core/index.d.ts +3 -3
  7. package/dist/core/index.js +89 -6
  8. package/dist/core/index.js.map +1 -1
  9. package/dist/core/index.mjs +89 -6
  10. package/dist/core/index.mjs.map +1 -1
  11. package/dist/design/index.d.mts +1 -1
  12. package/dist/design/index.d.ts +1 -1
  13. package/dist/{http-server-D2U1k48d.d.mts → http-server--550eD1F.d.mts} +106 -4
  14. package/dist/{http-server-ck8clUsZ.d.ts → http-server-C9NaNBEP.d.ts} +106 -4
  15. package/dist/index.d.mts +5 -5
  16. package/dist/index.d.ts +5 -5
  17. package/dist/index.js +576 -49
  18. package/dist/index.js.map +1 -1
  19. package/dist/index.mjs +576 -49
  20. package/dist/index.mjs.map +1 -1
  21. package/dist/react/index.d.mts +5 -5
  22. package/dist/react/index.d.ts +5 -5
  23. package/dist/react/index.js +576 -49
  24. package/dist/react/index.js.map +1 -1
  25. package/dist/react/index.mjs +576 -49
  26. package/dist/react/index.mjs.map +1 -1
  27. package/dist/{registry-KdUW_koV.d.mts → registry-B5JadBN9.d.mts} +49 -2
  28. package/dist/{registry-BxXaxmsT.d.ts → registry-pAUpQq2O.d.ts} +49 -2
  29. package/dist/server/index.d.mts +65 -6
  30. package/dist/server/index.d.ts +65 -6
  31. package/dist/server/index.js +438 -2
  32. package/dist/server/index.js.map +1 -1
  33. package/dist/server/index.mjs +437 -3
  34. package/dist/server/index.mjs.map +1 -1
  35. package/dist/{types-DjB0zJJH.d.mts → types-B0XA4vOF.d.mts} +1 -1
  36. package/dist/{types-BwdPNpII.d.mts → types-CGVut7mc.d.mts} +43 -1
  37. package/dist/{types-BwdPNpII.d.ts → types-CGVut7mc.d.ts} +43 -1
  38. package/dist/{types-DCEv5qb6.d.ts → types-CjEKTDYT.d.ts} +1 -1
  39. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { W as WaitOptions, N as NativeActionRequest, d as NativeActionResponse, m as NativeFindRequest, n as NativeFindResponse, k as NativeElementState } from './types-BwdPNpII.mjs';
1
+ import { W as WaitOptions, N as NativeActionRequest, d as NativeActionResponse, m as NativeFindRequest, n as NativeFindResponse, k as NativeElementState } from './types-CGVut7mc.mjs';
2
2
 
3
3
  /**
4
4
  * UI Bridge Native Control Types
@@ -285,6 +285,18 @@ interface NativeRegistrationCoverage {
285
285
  everHadRegistrations: boolean;
286
286
  byRoute: Record<string, number>;
287
287
  }
288
+ /**
289
+ * Application info reported alongside snapshots/health responses.
290
+ *
291
+ * Re-export of the `appInfo` shape used in `NativeUIBridgeConfig` so
292
+ * snapshot consumers can type-narrow without importing the config.
293
+ */
294
+ interface NativeAppInfo {
295
+ appId: string;
296
+ appName: string;
297
+ appType: 'web' | 'desktop' | 'mobile' | 'other';
298
+ framework?: string;
299
+ }
288
300
  /**
289
301
  * Snapshot of the entire native UI bridge state
290
302
  */
@@ -335,6 +347,18 @@ interface NativeBridgeSnapshot {
335
347
  * interactive controls but did not register them with the bridge.
336
348
  */
337
349
  registration?: NativeRegistrationCoverage;
350
+ /**
351
+ * Application info — appId, appName, appType, framework.
352
+ *
353
+ * Populated when the host wired `config.appInfo` on the server (e.g. via
354
+ * `UIBridgeNativeProvider`'s `config.appInfo` prop). Mirrors the `uiBridge`
355
+ * block returned by the `health` endpoint so agents can identify the app
356
+ * from a snapshot alone — useful for the cloud relay path where the
357
+ * bridge URL is opaque.
358
+ *
359
+ * Empty (undefined) when the host did not configure appInfo.
360
+ */
361
+ appInfo?: NativeAppInfo;
338
362
  }
339
363
  /** A single detected modal-like surface (modal, sheet, drawer, popover, alert) */
340
364
  interface NativeModalInfo {
@@ -441,6 +465,24 @@ type NativeSnapshotEnricher = (ctx: {
441
465
  elements: RegisteredNativeElement[];
442
466
  currentRoute: string | null;
443
467
  }) => Record<string, unknown>;
468
+ /**
469
+ * Minimal route-provider shape consumed by `NativeUIBridgeRegistry.createSnapshot`.
470
+ *
471
+ * Intentionally a structural subset of `RouteProvider` (defined in `server/types`)
472
+ * so `core/registry` stays free of server-layer imports. The full `RouteProvider`
473
+ * (which adds `subscribe`) widens this interface; both can be passed to
474
+ * `registry.setRouteProvider(...)` interchangeably.
475
+ *
476
+ * The registry uses this fallback when `createSnapshot` is called WITHOUT an
477
+ * explicit `routeInfo` argument — the canonical case is the default
478
+ * `getSnapshot` HTTP handler, which has no direct reference to the
479
+ * `NativeUIBridgeServer` instance and therefore couldn't read the route
480
+ * before this hook existed.
481
+ */
482
+ interface NativeRouteProviderLike {
483
+ getCurrentRoute: () => string | null;
484
+ getSegments?: () => string[];
485
+ }
444
486
  /**
445
487
  * UI Bridge Native feature flags
446
488
  */
@@ -522,4 +564,4 @@ interface NativeFindResponse {
522
564
  timestamp: number;
523
565
  }
524
566
 
525
- export type { ActionHandler as A, BridgeEvent as B, ComponentAction as C, DiscoveredNativeElement as D, Workflow as E, WorkflowStep as F, WorkflowStepType as G, NativeModalDetectorLike as H, NativeActionRequest as N, RegisteredNativeComponent as R, WaitOptions as W, BridgeEventListener as a, BridgeEventType as b, CustomAction as c, NativeActionResponse as d, NativeBridgeSnapshot as e, NativeCapturedToast as f, NativeComponentAction as g, NativeCustomAction as h, NativeElementIdentifier as i, NativeElementRef as j, NativeElementState as k, NativeElementType as l, NativeFindRequest as m, NativeFindResponse as n, NativeLayout as o, NativeModalInfo as p, NativeRegistrationCoverage as q, NativeSnapshotEnricher as r, NativeSnapshotEnrichers as s, NativeSnapshotModalContext as t, NativeSnapshotToastContext as u, NativeSnapshotUndoContext as v, NativeStandardAction as w, NativeUIBridgeConfig as x, NativeUIBridgeFeatures as y, RegisteredNativeElement as z };
567
+ export type { ActionHandler as A, BridgeEvent as B, ComponentAction as C, DiscoveredNativeElement as D, Workflow as E, WorkflowStep as F, WorkflowStepType as G, NativeAppInfo as H, NativeRouteProviderLike as I, NativeModalDetectorLike as J, NativeActionRequest as N, RegisteredNativeComponent as R, WaitOptions as W, BridgeEventListener as a, BridgeEventType as b, CustomAction as c, NativeActionResponse as d, NativeBridgeSnapshot as e, NativeCapturedToast as f, NativeComponentAction as g, NativeCustomAction as h, NativeElementIdentifier as i, NativeElementRef as j, NativeElementState as k, NativeElementType as l, NativeFindRequest as m, NativeFindResponse as n, NativeLayout as o, NativeModalInfo as p, NativeRegistrationCoverage as q, NativeSnapshotEnricher as r, NativeSnapshotEnrichers as s, NativeSnapshotModalContext as t, NativeSnapshotToastContext as u, NativeSnapshotUndoContext as v, NativeStandardAction as w, NativeUIBridgeConfig as x, NativeUIBridgeFeatures as y, RegisteredNativeElement as z };
@@ -285,6 +285,18 @@ interface NativeRegistrationCoverage {
285
285
  everHadRegistrations: boolean;
286
286
  byRoute: Record<string, number>;
287
287
  }
288
+ /**
289
+ * Application info reported alongside snapshots/health responses.
290
+ *
291
+ * Re-export of the `appInfo` shape used in `NativeUIBridgeConfig` so
292
+ * snapshot consumers can type-narrow without importing the config.
293
+ */
294
+ interface NativeAppInfo {
295
+ appId: string;
296
+ appName: string;
297
+ appType: 'web' | 'desktop' | 'mobile' | 'other';
298
+ framework?: string;
299
+ }
288
300
  /**
289
301
  * Snapshot of the entire native UI bridge state
290
302
  */
@@ -335,6 +347,18 @@ interface NativeBridgeSnapshot {
335
347
  * interactive controls but did not register them with the bridge.
336
348
  */
337
349
  registration?: NativeRegistrationCoverage;
350
+ /**
351
+ * Application info — appId, appName, appType, framework.
352
+ *
353
+ * Populated when the host wired `config.appInfo` on the server (e.g. via
354
+ * `UIBridgeNativeProvider`'s `config.appInfo` prop). Mirrors the `uiBridge`
355
+ * block returned by the `health` endpoint so agents can identify the app
356
+ * from a snapshot alone — useful for the cloud relay path where the
357
+ * bridge URL is opaque.
358
+ *
359
+ * Empty (undefined) when the host did not configure appInfo.
360
+ */
361
+ appInfo?: NativeAppInfo;
338
362
  }
339
363
  /** A single detected modal-like surface (modal, sheet, drawer, popover, alert) */
340
364
  interface NativeModalInfo {
@@ -441,6 +465,24 @@ type NativeSnapshotEnricher = (ctx: {
441
465
  elements: RegisteredNativeElement[];
442
466
  currentRoute: string | null;
443
467
  }) => Record<string, unknown>;
468
+ /**
469
+ * Minimal route-provider shape consumed by `NativeUIBridgeRegistry.createSnapshot`.
470
+ *
471
+ * Intentionally a structural subset of `RouteProvider` (defined in `server/types`)
472
+ * so `core/registry` stays free of server-layer imports. The full `RouteProvider`
473
+ * (which adds `subscribe`) widens this interface; both can be passed to
474
+ * `registry.setRouteProvider(...)` interchangeably.
475
+ *
476
+ * The registry uses this fallback when `createSnapshot` is called WITHOUT an
477
+ * explicit `routeInfo` argument — the canonical case is the default
478
+ * `getSnapshot` HTTP handler, which has no direct reference to the
479
+ * `NativeUIBridgeServer` instance and therefore couldn't read the route
480
+ * before this hook existed.
481
+ */
482
+ interface NativeRouteProviderLike {
483
+ getCurrentRoute: () => string | null;
484
+ getSegments?: () => string[];
485
+ }
444
486
  /**
445
487
  * UI Bridge Native feature flags
446
488
  */
@@ -522,4 +564,4 @@ interface NativeFindResponse {
522
564
  timestamp: number;
523
565
  }
524
566
 
525
- export type { ActionHandler as A, BridgeEvent as B, ComponentAction as C, DiscoveredNativeElement as D, Workflow as E, WorkflowStep as F, WorkflowStepType as G, NativeModalDetectorLike as H, NativeActionRequest as N, RegisteredNativeComponent as R, WaitOptions as W, BridgeEventListener as a, BridgeEventType as b, CustomAction as c, NativeActionResponse as d, NativeBridgeSnapshot as e, NativeCapturedToast as f, NativeComponentAction as g, NativeCustomAction as h, NativeElementIdentifier as i, NativeElementRef as j, NativeElementState as k, NativeElementType as l, NativeFindRequest as m, NativeFindResponse as n, NativeLayout as o, NativeModalInfo as p, NativeRegistrationCoverage as q, NativeSnapshotEnricher as r, NativeSnapshotEnrichers as s, NativeSnapshotModalContext as t, NativeSnapshotToastContext as u, NativeSnapshotUndoContext as v, NativeStandardAction as w, NativeUIBridgeConfig as x, NativeUIBridgeFeatures as y, RegisteredNativeElement as z };
567
+ export type { ActionHandler as A, BridgeEvent as B, ComponentAction as C, DiscoveredNativeElement as D, Workflow as E, WorkflowStep as F, WorkflowStepType as G, NativeAppInfo as H, NativeRouteProviderLike as I, NativeModalDetectorLike as J, NativeActionRequest as N, RegisteredNativeComponent as R, WaitOptions as W, BridgeEventListener as a, BridgeEventType as b, CustomAction as c, NativeActionResponse as d, NativeBridgeSnapshot as e, NativeCapturedToast as f, NativeComponentAction as g, NativeCustomAction as h, NativeElementIdentifier as i, NativeElementRef as j, NativeElementState as k, NativeElementType as l, NativeFindRequest as m, NativeFindResponse as n, NativeLayout as o, NativeModalInfo as p, NativeRegistrationCoverage as q, NativeSnapshotEnricher as r, NativeSnapshotEnrichers as s, NativeSnapshotModalContext as t, NativeSnapshotToastContext as u, NativeSnapshotUndoContext as v, NativeStandardAction as w, NativeUIBridgeConfig as x, NativeUIBridgeFeatures as y, RegisteredNativeElement as z };
@@ -1,4 +1,4 @@
1
- import { W as WaitOptions, N as NativeActionRequest, d as NativeActionResponse, m as NativeFindRequest, n as NativeFindResponse, k as NativeElementState } from './types-BwdPNpII.js';
1
+ import { W as WaitOptions, N as NativeActionRequest, d as NativeActionResponse, m as NativeFindRequest, n as NativeFindResponse, k as NativeElementState } from './types-CGVut7mc.js';
2
2
 
3
3
  /**
4
4
  * UI Bridge Native Control Types
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qontinui/ui-bridge-native",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "UI Bridge Framework for React Native - Hooks and providers for UI observation and control in mobile apps",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",