@qontinui/ui-bridge-native 0.2.0 → 0.3.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/dist/{useUIBridgeToast-GmT1TzUe.d.mts → StateAnnotation-D8reaRcS.d.mts} +42 -7
- package/dist/{useUIBridgeToast-D32KXyL1.d.ts → StateAnnotation-WmK1YjwP.d.ts} +42 -7
- package/dist/control/index.d.mts +4 -4
- package/dist/control/index.d.ts +4 -4
- package/dist/core/index.d.mts +3 -3
- package/dist/core/index.d.ts +3 -3
- package/dist/core/index.js +39 -1
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.mjs +39 -1
- package/dist/core/index.mjs.map +1 -1
- package/dist/debug/index.js +2 -2
- package/dist/debug/index.js.map +1 -1
- package/dist/debug/index.mjs +2 -2
- package/dist/debug/index.mjs.map +1 -1
- package/dist/design/index.d.mts +1 -1
- package/dist/design/index.d.ts +1 -1
- package/dist/{http-server-DCdR8WlL.d.mts → http-server-D2U1k48d.d.mts} +89 -8
- package/dist/{http-server-Dj3grQW4.d.ts → http-server-ck8clUsZ.d.ts} +89 -8
- package/dist/index.d.mts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +372 -39
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +372 -41
- package/dist/index.mjs.map +1 -1
- package/dist/react/index.d.mts +5 -5
- package/dist/react/index.d.ts +5 -5
- package/dist/react/index.js +354 -39
- package/dist/react/index.js.map +1 -1
- package/dist/react/index.mjs +354 -41
- package/dist/react/index.mjs.map +1 -1
- package/dist/{registry-Cahd8Gn2.d.mts → registry-BxXaxmsT.d.ts} +24 -1
- package/dist/{registry-z-3WJsxp.d.ts → registry-KdUW_koV.d.mts} +24 -1
- package/dist/server/index.d.mts +5 -5
- package/dist/server/index.d.ts +5 -5
- package/dist/server/index.js +272 -16
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +272 -16
- package/dist/server/index.mjs.map +1 -1
- package/dist/{types-Oz13YLZq.d.mts → types-BwdPNpII.d.mts} +52 -4
- package/dist/{types-Oz13YLZq.d.ts → types-BwdPNpII.d.ts} +52 -4
- package/dist/{types-ajakyp-l.d.ts → types-DCEv5qb6.d.ts} +1 -1
- package/dist/{types-DAfCeWXc.d.mts → types-DjB0zJJH.d.mts} +1 -1
- package/package.json +2 -2
|
@@ -267,6 +267,24 @@ interface NativeActionResponse {
|
|
|
267
267
|
/** Time spent waiting for conditions */
|
|
268
268
|
waitDurationMs?: number;
|
|
269
269
|
}
|
|
270
|
+
/**
|
|
271
|
+
* Registration coverage metadata. Lets automation agents detect routes that
|
|
272
|
+
* have interactive controls but never registered any of them with the bridge,
|
|
273
|
+
* without having to read source code.
|
|
274
|
+
*
|
|
275
|
+
* - `totalRegistered`: number of elements currently in the registry.
|
|
276
|
+
* - `everHadRegistrations`: sticks `true` once any element is registered, even
|
|
277
|
+
* after every element has been unregistered. A route that registered then
|
|
278
|
+
* unmounted should NOT be reported as "never wired".
|
|
279
|
+
* - `byRoute`: count of currently-registered elements grouped by
|
|
280
|
+
* `registrationRoute`. Elements registered without a route are bucketed
|
|
281
|
+
* under `'?'`, which is itself a useful diagnostic signal.
|
|
282
|
+
*/
|
|
283
|
+
interface NativeRegistrationCoverage {
|
|
284
|
+
totalRegistered: number;
|
|
285
|
+
everHadRegistrations: boolean;
|
|
286
|
+
byRoute: Record<string, number>;
|
|
287
|
+
}
|
|
270
288
|
/**
|
|
271
289
|
* Snapshot of the entire native UI bridge state
|
|
272
290
|
*/
|
|
@@ -312,6 +330,11 @@ interface NativeBridgeSnapshot {
|
|
|
312
330
|
toasts?: NativeSnapshotToastContext;
|
|
313
331
|
/** Undo/redo context (populated when an undoTracker enricher is registered) */
|
|
314
332
|
undoRedo?: NativeSnapshotUndoContext;
|
|
333
|
+
/**
|
|
334
|
+
* Registration coverage metadata so agents can detect routes that have
|
|
335
|
+
* interactive controls but did not register them with the bridge.
|
|
336
|
+
*/
|
|
337
|
+
registration?: NativeRegistrationCoverage;
|
|
315
338
|
}
|
|
316
339
|
/** A single detected modal-like surface (modal, sheet, drawer, popover, alert) */
|
|
317
340
|
interface NativeModalInfo {
|
|
@@ -376,15 +399,32 @@ interface NativeSnapshotUndoContext {
|
|
|
376
399
|
/** Human-readable summary for AI */
|
|
377
400
|
summary: string;
|
|
378
401
|
}
|
|
402
|
+
/**
|
|
403
|
+
* Modal-stack tracker contract. Surfaced in NativeSnapshotEnrichers so the
|
|
404
|
+
* test-hook HTTP endpoints (`control/modal/push`, `control/modal/dismiss/:id`)
|
|
405
|
+
* can drive the same instance the snapshot reads from. Any duck-typed
|
|
406
|
+
* implementation that satisfies this shape can fill the slot — production
|
|
407
|
+
* uses the `ModalDetector` class.
|
|
408
|
+
*/
|
|
409
|
+
interface NativeModalDetectorLike {
|
|
410
|
+
getSnapshotModalContext(): NativeSnapshotModalContext;
|
|
411
|
+
pushModal(modal: {
|
|
412
|
+
id: string;
|
|
413
|
+
title?: string;
|
|
414
|
+
type?: NativeModalInfo['type'];
|
|
415
|
+
blocking?: boolean;
|
|
416
|
+
dismissible?: boolean;
|
|
417
|
+
}): void;
|
|
418
|
+
dismissModal(id: string): boolean | void;
|
|
419
|
+
getActive(): NativeModalInfo[];
|
|
420
|
+
}
|
|
379
421
|
/**
|
|
380
422
|
* Canonical enricher slot. Each tracker exposes a `getSnapshot*Context()` method
|
|
381
423
|
* that the registry calls during `createSnapshot`. NavigationTracker is intentionally
|
|
382
424
|
* NOT here — route info already flows through `currentRoute` / `segments`.
|
|
383
425
|
*/
|
|
384
426
|
interface NativeSnapshotEnrichers {
|
|
385
|
-
modalDetector?:
|
|
386
|
-
getSnapshotModalContext(): NativeSnapshotModalContext;
|
|
387
|
-
};
|
|
427
|
+
modalDetector?: NativeModalDetectorLike;
|
|
388
428
|
toastCapture?: {
|
|
389
429
|
getSnapshotToastContext(): NativeSnapshotToastContext;
|
|
390
430
|
};
|
|
@@ -409,6 +449,14 @@ interface NativeUIBridgeFeatures {
|
|
|
409
449
|
server?: boolean;
|
|
410
450
|
/** Enable debug tools (inspector overlay) */
|
|
411
451
|
debug?: boolean;
|
|
452
|
+
/**
|
|
453
|
+
* Enable test-only HTTP endpoints that let external runners drive
|
|
454
|
+
* registry-internal state (currently `control/modal/push` and
|
|
455
|
+
* `control/modal/dismiss/:id`). Default `false` so production builds
|
|
456
|
+
* cannot have their modal stack manipulated remotely; set to `true`
|
|
457
|
+
* (typically gated on `__DEV__`) when running automated tests.
|
|
458
|
+
*/
|
|
459
|
+
testHooks?: boolean;
|
|
412
460
|
}
|
|
413
461
|
/**
|
|
414
462
|
* UI Bridge Native configuration
|
|
@@ -474,4 +522,4 @@ interface NativeFindResponse {
|
|
|
474
522
|
timestamp: number;
|
|
475
523
|
}
|
|
476
524
|
|
|
477
|
-
export type { ActionHandler as A, BridgeEvent as B, ComponentAction as C, DiscoveredNativeElement as D,
|
|
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 };
|
|
@@ -267,6 +267,24 @@ interface NativeActionResponse {
|
|
|
267
267
|
/** Time spent waiting for conditions */
|
|
268
268
|
waitDurationMs?: number;
|
|
269
269
|
}
|
|
270
|
+
/**
|
|
271
|
+
* Registration coverage metadata. Lets automation agents detect routes that
|
|
272
|
+
* have interactive controls but never registered any of them with the bridge,
|
|
273
|
+
* without having to read source code.
|
|
274
|
+
*
|
|
275
|
+
* - `totalRegistered`: number of elements currently in the registry.
|
|
276
|
+
* - `everHadRegistrations`: sticks `true` once any element is registered, even
|
|
277
|
+
* after every element has been unregistered. A route that registered then
|
|
278
|
+
* unmounted should NOT be reported as "never wired".
|
|
279
|
+
* - `byRoute`: count of currently-registered elements grouped by
|
|
280
|
+
* `registrationRoute`. Elements registered without a route are bucketed
|
|
281
|
+
* under `'?'`, which is itself a useful diagnostic signal.
|
|
282
|
+
*/
|
|
283
|
+
interface NativeRegistrationCoverage {
|
|
284
|
+
totalRegistered: number;
|
|
285
|
+
everHadRegistrations: boolean;
|
|
286
|
+
byRoute: Record<string, number>;
|
|
287
|
+
}
|
|
270
288
|
/**
|
|
271
289
|
* Snapshot of the entire native UI bridge state
|
|
272
290
|
*/
|
|
@@ -312,6 +330,11 @@ interface NativeBridgeSnapshot {
|
|
|
312
330
|
toasts?: NativeSnapshotToastContext;
|
|
313
331
|
/** Undo/redo context (populated when an undoTracker enricher is registered) */
|
|
314
332
|
undoRedo?: NativeSnapshotUndoContext;
|
|
333
|
+
/**
|
|
334
|
+
* Registration coverage metadata so agents can detect routes that have
|
|
335
|
+
* interactive controls but did not register them with the bridge.
|
|
336
|
+
*/
|
|
337
|
+
registration?: NativeRegistrationCoverage;
|
|
315
338
|
}
|
|
316
339
|
/** A single detected modal-like surface (modal, sheet, drawer, popover, alert) */
|
|
317
340
|
interface NativeModalInfo {
|
|
@@ -376,15 +399,32 @@ interface NativeSnapshotUndoContext {
|
|
|
376
399
|
/** Human-readable summary for AI */
|
|
377
400
|
summary: string;
|
|
378
401
|
}
|
|
402
|
+
/**
|
|
403
|
+
* Modal-stack tracker contract. Surfaced in NativeSnapshotEnrichers so the
|
|
404
|
+
* test-hook HTTP endpoints (`control/modal/push`, `control/modal/dismiss/:id`)
|
|
405
|
+
* can drive the same instance the snapshot reads from. Any duck-typed
|
|
406
|
+
* implementation that satisfies this shape can fill the slot — production
|
|
407
|
+
* uses the `ModalDetector` class.
|
|
408
|
+
*/
|
|
409
|
+
interface NativeModalDetectorLike {
|
|
410
|
+
getSnapshotModalContext(): NativeSnapshotModalContext;
|
|
411
|
+
pushModal(modal: {
|
|
412
|
+
id: string;
|
|
413
|
+
title?: string;
|
|
414
|
+
type?: NativeModalInfo['type'];
|
|
415
|
+
blocking?: boolean;
|
|
416
|
+
dismissible?: boolean;
|
|
417
|
+
}): void;
|
|
418
|
+
dismissModal(id: string): boolean | void;
|
|
419
|
+
getActive(): NativeModalInfo[];
|
|
420
|
+
}
|
|
379
421
|
/**
|
|
380
422
|
* Canonical enricher slot. Each tracker exposes a `getSnapshot*Context()` method
|
|
381
423
|
* that the registry calls during `createSnapshot`. NavigationTracker is intentionally
|
|
382
424
|
* NOT here — route info already flows through `currentRoute` / `segments`.
|
|
383
425
|
*/
|
|
384
426
|
interface NativeSnapshotEnrichers {
|
|
385
|
-
modalDetector?:
|
|
386
|
-
getSnapshotModalContext(): NativeSnapshotModalContext;
|
|
387
|
-
};
|
|
427
|
+
modalDetector?: NativeModalDetectorLike;
|
|
388
428
|
toastCapture?: {
|
|
389
429
|
getSnapshotToastContext(): NativeSnapshotToastContext;
|
|
390
430
|
};
|
|
@@ -409,6 +449,14 @@ interface NativeUIBridgeFeatures {
|
|
|
409
449
|
server?: boolean;
|
|
410
450
|
/** Enable debug tools (inspector overlay) */
|
|
411
451
|
debug?: boolean;
|
|
452
|
+
/**
|
|
453
|
+
* Enable test-only HTTP endpoints that let external runners drive
|
|
454
|
+
* registry-internal state (currently `control/modal/push` and
|
|
455
|
+
* `control/modal/dismiss/:id`). Default `false` so production builds
|
|
456
|
+
* cannot have their modal stack manipulated remotely; set to `true`
|
|
457
|
+
* (typically gated on `__DEV__`) when running automated tests.
|
|
458
|
+
*/
|
|
459
|
+
testHooks?: boolean;
|
|
412
460
|
}
|
|
413
461
|
/**
|
|
414
462
|
* UI Bridge Native configuration
|
|
@@ -474,4 +522,4 @@ interface NativeFindResponse {
|
|
|
474
522
|
timestamp: number;
|
|
475
523
|
}
|
|
476
524
|
|
|
477
|
-
export type { ActionHandler as A, BridgeEvent as B, ComponentAction as C, DiscoveredNativeElement as D,
|
|
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 };
|
|
@@ -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-
|
|
1
|
+
import { W as WaitOptions, N as NativeActionRequest, d as NativeActionResponse, m as NativeFindRequest, n as NativeFindResponse, k as NativeElementState } from './types-BwdPNpII.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* UI Bridge Native Control Types
|
|
@@ -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-
|
|
1
|
+
import { W as WaitOptions, N as NativeActionRequest, d as NativeActionResponse, m as NativeFindRequest, n as NativeFindResponse, k as NativeElementState } from './types-BwdPNpII.mjs';
|
|
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
|
+
"version": "0.3.0",
|
|
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",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"typescript": "^5.3.0",
|
|
73
73
|
"vitest": "^4.0.18"
|
|
74
74
|
},
|
|
75
|
-
"license": "
|
|
75
|
+
"license": "AGPL-3.0-or-later",
|
|
76
76
|
"repository": {
|
|
77
77
|
"type": "git",
|
|
78
78
|
"url": "https://github.com/qontinui/ui-bridge.git",
|