@wailsio/runtime 3.0.0-alpha.73 → 3.0.0-alpha.75
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/calls.js +6 -89
- package/dist/dialogs.js +1 -69
- package/dist/drag.js +39 -5
- package/dist/event_types.js +24 -4
- package/dist/index.js +4 -1
- package/dist/ios.js +28 -0
- package/dist/runtime.js +55 -7
- package/dist/system.js +23 -15
- package/package.json +1 -1
- package/types/event_types.d.ts +239 -434
- package/types/index.d.ts +3 -1
- package/types/ios.d.ts +13 -0
- package/types/runtime.d.ts +45 -0
package/types/index.d.ts
CHANGED
|
@@ -10,9 +10,10 @@ import * as Events from "./events.js";
|
|
|
10
10
|
import * as Flags from "./flags.js";
|
|
11
11
|
import * as Screens from "./screens.js";
|
|
12
12
|
import * as System from "./system.js";
|
|
13
|
+
import * as IOS from "./ios.js";
|
|
13
14
|
import Window from "./window.js";
|
|
14
15
|
import * as WML from "./wml.js";
|
|
15
|
-
export { Application, Browser, Call, Clipboard, Dialogs, Events, Flags, Screens, System, Window, WML };
|
|
16
|
+
export { Application, Browser, Call, Clipboard, Dialogs, Events, Flags, Screens, System, IOS, Window, WML };
|
|
16
17
|
/**
|
|
17
18
|
* An internal utility consumed by the binding generator.
|
|
18
19
|
*
|
|
@@ -20,3 +21,4 @@ export { Application, Browser, Call, Clipboard, Dialogs, Events, Flags, Screens,
|
|
|
20
21
|
*/
|
|
21
22
|
export { Create };
|
|
22
23
|
export * from "./cancellable.js";
|
|
24
|
+
export { setTransport, getTransport, type RuntimeTransport, objectNames, clientId, } from "./runtime.js";
|
package/types/ios.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare namespace Haptics {
|
|
2
|
+
type ImpactStyle = "light" | "medium" | "heavy" | "soft" | "rigid";
|
|
3
|
+
function Impact(style?: ImpactStyle): Promise<void>;
|
|
4
|
+
}
|
|
5
|
+
export declare namespace Device {
|
|
6
|
+
interface Info {
|
|
7
|
+
model: string;
|
|
8
|
+
systemName: string;
|
|
9
|
+
systemVersion: string;
|
|
10
|
+
isSimulator: boolean;
|
|
11
|
+
}
|
|
12
|
+
function Info(): Promise<Info>;
|
|
13
|
+
}
|
package/types/runtime.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { nanoid } from "./nanoid.js";
|
|
2
|
+
export { nanoid };
|
|
1
3
|
export declare const objectNames: Readonly<{
|
|
2
4
|
Call: 0;
|
|
3
5
|
Clipboard: 1;
|
|
@@ -10,8 +12,51 @@ export declare const objectNames: Readonly<{
|
|
|
10
12
|
System: 8;
|
|
11
13
|
Browser: 9;
|
|
12
14
|
CancelCall: 10;
|
|
15
|
+
IOS: 11;
|
|
13
16
|
}>;
|
|
14
17
|
export declare let clientId: string;
|
|
18
|
+
/**
|
|
19
|
+
* RuntimeTransport defines the interface for custom IPC transport implementations.
|
|
20
|
+
* Implement this interface to use WebSockets, custom protocols, or any other
|
|
21
|
+
* transport mechanism instead of the default HTTP fetch.
|
|
22
|
+
*/
|
|
23
|
+
export interface RuntimeTransport {
|
|
24
|
+
/**
|
|
25
|
+
* Send a runtime call and return the response.
|
|
26
|
+
*
|
|
27
|
+
* @param objectID - The Wails object ID (0=Call, 1=Clipboard, etc.)
|
|
28
|
+
* @param method - The method ID to call
|
|
29
|
+
* @param windowName - Optional window name
|
|
30
|
+
* @param args - Arguments to pass (will be JSON stringified if present)
|
|
31
|
+
* @returns Promise that resolves with the response data
|
|
32
|
+
*/
|
|
33
|
+
call(objectID: number, method: number, windowName: string, args: any): Promise<any>;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Set a custom transport for all Wails runtime calls.
|
|
37
|
+
* This allows you to replace the default HTTP fetch transport with
|
|
38
|
+
* WebSockets, custom protocols, or any other mechanism.
|
|
39
|
+
*
|
|
40
|
+
* @param transport - Your custom transport implementation
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```typescript
|
|
44
|
+
* import { setTransport } from '/wails/runtime.js';
|
|
45
|
+
*
|
|
46
|
+
* const wsTransport = {
|
|
47
|
+
* call: async (objectID, method, windowName, args) => {
|
|
48
|
+
* // Your WebSocket implementation
|
|
49
|
+
* }
|
|
50
|
+
* };
|
|
51
|
+
*
|
|
52
|
+
* setTransport(wsTransport);
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
export declare function setTransport(transport: RuntimeTransport | null): void;
|
|
56
|
+
/**
|
|
57
|
+
* Get the current transport (useful for extending/wrapping)
|
|
58
|
+
*/
|
|
59
|
+
export declare function getTransport(): RuntimeTransport | null;
|
|
15
60
|
/**
|
|
16
61
|
* Creates a new runtime caller with specified ID.
|
|
17
62
|
*
|