@qontinui/ui-bridge-native 0.6.13 → 0.6.14
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/debug/index.js.map +1 -1
- package/dist/debug/index.mjs.map +1 -1
- package/dist/index.js +67 -19
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +67 -19
- package/dist/index.mjs.map +1 -1
- package/dist/react/UIBridgeNativeProvider.d.ts +18 -2
- package/dist/react/UIBridgeNativeProvider.d.ts.map +1 -1
- package/dist/react/index.js +67 -19
- package/dist/react/index.js.map +1 -1
- package/dist/react/index.mjs +67 -19
- package/dist/react/index.mjs.map +1 -1
- package/dist/server/index.js +1 -1
- package/dist/server/index.mjs +1 -1
- package/dist/transport/DeviceAnnouncer.d.ts +35 -7
- package/dist/transport/DeviceAnnouncer.d.ts.map +1 -1
- package/dist/transport/index.d.ts +1 -1
- package/dist/transport/index.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/server/index.js
CHANGED
|
@@ -2260,7 +2260,7 @@ function createServerHandlers(registry, executor, config) {
|
|
|
2260
2260
|
};
|
|
2261
2261
|
if (config?.appInfo) {
|
|
2262
2262
|
response.uiBridge = {
|
|
2263
|
-
version: "0.6.
|
|
2263
|
+
version: "0.6.14",
|
|
2264
2264
|
...config.appInfo,
|
|
2265
2265
|
capabilities: ["elements", "components", "actions", "design"],
|
|
2266
2266
|
elementCount: stats.elements,
|
package/dist/server/index.mjs
CHANGED
|
@@ -2258,7 +2258,7 @@ function createServerHandlers(registry, executor, config) {
|
|
|
2258
2258
|
};
|
|
2259
2259
|
if (config?.appInfo) {
|
|
2260
2260
|
response.uiBridge = {
|
|
2261
|
-
version: "0.6.
|
|
2261
|
+
version: "0.6.14",
|
|
2262
2262
|
...config.appInfo,
|
|
2263
2263
|
capabilities: ["elements", "components", "actions", "design"],
|
|
2264
2264
|
elementCount: stats.elements,
|
|
@@ -23,11 +23,32 @@ export interface DeviceAnnouncerState {
|
|
|
23
23
|
mdnsActive: boolean;
|
|
24
24
|
cloudConnected: boolean;
|
|
25
25
|
}
|
|
26
|
-
/**
|
|
27
|
-
interface
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
/**
|
|
27
|
+
* Minimal interface for the react-native-zeroconf Zeroconf instance.
|
|
28
|
+
*
|
|
29
|
+
* The positional `publishService` form is the one every published version
|
|
30
|
+
* accepts (0.17.x keeps it as a deprecated overload beside the options object).
|
|
31
|
+
* Both methods are typed `void | Promise<unknown>` because 0.17.x returns a
|
|
32
|
+
* Promise that REJECTS on failure (e.g. local-network permission denied); the
|
|
33
|
+
* announcer awaits it so a failure lands in its catch instead of becoming an
|
|
34
|
+
* unhandled rejection with `mdnsActive` already reporting true.
|
|
35
|
+
*/
|
|
36
|
+
export interface ZeroconfService {
|
|
37
|
+
publishService(type: string, protocol: string, domain: string, name: string, port: number, txtRecord: Record<string, string>): void | Promise<unknown>;
|
|
38
|
+
unpublishService(name: string): void | Promise<unknown>;
|
|
39
|
+
/**
|
|
40
|
+
* 0.17.x's constructor subscribes native event listeners
|
|
41
|
+
* (`addDeviceListeners()`); without this call every discarded instance keeps
|
|
42
|
+
* them. Optional because older versions and test fakes may not have it.
|
|
43
|
+
*/
|
|
44
|
+
removeDeviceListeners?(): void;
|
|
30
45
|
}
|
|
46
|
+
/**
|
|
47
|
+
* The `Zeroconf` constructor `startMdnsAdvertise` accepts — the default export
|
|
48
|
+
* of `react-native-zeroconf` satisfies it. The one definition of the type: the
|
|
49
|
+
* provider's `zeroconf` prop is declared as this, not a parallel copy.
|
|
50
|
+
*/
|
|
51
|
+
export type ZeroconfConstructor = new () => ZeroconfService;
|
|
31
52
|
/**
|
|
32
53
|
* Announces the UI Bridge server on the local network (mDNS) and optionally
|
|
33
54
|
* registers with the qontinui.io cloud relay for remote discovery.
|
|
@@ -39,8 +60,16 @@ export declare class DeviceAnnouncer {
|
|
|
39
60
|
private reconnectTimer;
|
|
40
61
|
private reconnectDelay;
|
|
41
62
|
private stopped;
|
|
42
|
-
/** Zeroconf instance, set when mDNS is
|
|
63
|
+
/** Zeroconf instance, set when mDNS is started (cleared by `stop()`) */
|
|
43
64
|
private zeroconf;
|
|
65
|
+
/** The name the library registered — the only name this announcer may unpublish */
|
|
66
|
+
private publishedName;
|
|
67
|
+
/**
|
|
68
|
+
* True while a publish is awaiting the library. A `stop()` that lands in that
|
|
69
|
+
* window leaves the cleanup to the publish path, which is the only side that
|
|
70
|
+
* will learn the registered name.
|
|
71
|
+
*/
|
|
72
|
+
private publishInFlight;
|
|
44
73
|
/** Rotated pairing token for mDNS TXT records */
|
|
45
74
|
private pairingToken;
|
|
46
75
|
constructor(config: AnnouncerConfig);
|
|
@@ -57,7 +86,7 @@ export declare class DeviceAnnouncer {
|
|
|
57
86
|
*
|
|
58
87
|
* @param ZeroconfCtor - constructor from `import Zeroconf from 'react-native-zeroconf'`
|
|
59
88
|
*/
|
|
60
|
-
startMdnsAdvertise(ZeroconfCtor?:
|
|
89
|
+
startMdnsAdvertise(ZeroconfCtor?: ZeroconfConstructor): Promise<void>;
|
|
61
90
|
/**
|
|
62
91
|
* Connect to the cloud relay WebSocket and send a device_register message.
|
|
63
92
|
*
|
|
@@ -71,5 +100,4 @@ export declare class DeviceAnnouncer {
|
|
|
71
100
|
getState(): DeviceAnnouncerState;
|
|
72
101
|
private scheduleReconnect;
|
|
73
102
|
}
|
|
74
|
-
export {};
|
|
75
103
|
//# sourceMappingURL=DeviceAnnouncer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeviceAnnouncer.d.ts","sourceRoot":"","sources":["../../src/transport/DeviceAnnouncer.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,MAAM,WAAW,eAAe;IAC9B,+BAA+B;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,4BAA4B;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,2CAA2C;IAC3C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,iDAAiD;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,mBAAmB,GAAG,UAAU,eAAe,CAAC;AA+B5D;;;GAGG;AACH,qBAAa,eAAe;IAC1B,OAAO,CAAC,MAAM,CAA0E;IACxF,OAAO,CAAC,KAAK,CAGX;IACF,OAAO,CAAC,OAAO,CAA0B;IACzC,OAAO,CAAC,cAAc,CAA8C;IACpE,OAAO,CAAC,cAAc,CAA8B;IACpD,OAAO,CAAC,OAAO,CAAS;IACxB,wEAAwE;IACxE,OAAO,CAAC,QAAQ,CAAgC;IAChD,mFAAmF;IACnF,OAAO,CAAC,aAAa,CAAuB;IAC5C;;;;OAIG;IACH,OAAO,CAAC,eAAe,CAAS;IAChC,iDAAiD;IACjD,OAAO,CAAC,YAAY,CAAS;gBAEjB,MAAM,EAAE,eAAe;IAOnC;;;;;;;;;;;;OAYG;IACG,kBAAkB,CAAC,YAAY,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC;IAsD3E;;;;;OAKG;IACG,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC;IAqFxC,6CAA6C;IACvC,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IA+B3B,oDAAoD;IACpD,QAAQ,IAAI,oBAAoB;IAMhC,OAAO,CAAC,iBAAiB;CAa1B"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { DeviceAnnouncer, type AnnouncerConfig, type DeviceAnnouncerState, } from './DeviceAnnouncer';
|
|
1
|
+
export { DeviceAnnouncer, type AnnouncerConfig, type DeviceAnnouncerState, type ZeroconfConstructor, type ZeroconfService, } from './DeviceAnnouncer';
|
|
2
2
|
export { CloudRelayClient, type CloudRelayConfig } from './CloudRelayClient';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/transport/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,KAAK,eAAe,EACpB,KAAK,oBAAoB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/transport/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,eAAe,GACrB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,gBAAgB,EAAE,KAAK,gBAAgB,EAAE,MAAM,oBAAoB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qontinui/ui-bridge-native",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.14",
|
|
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",
|