@wailsio/runtime 3.0.0-alpha.7 → 3.0.0-alpha.71

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 (59) hide show
  1. package/{application.js → dist/application.js} +32 -46
  2. package/dist/browser.js +20 -0
  3. package/dist/callable.js +144 -0
  4. package/dist/calls.js +194 -0
  5. package/dist/cancellable.js +792 -0
  6. package/dist/clipboard.js +30 -0
  7. package/dist/contextmenu.js +80 -0
  8. package/dist/create.js +94 -0
  9. package/dist/dialogs.js +134 -0
  10. package/dist/drag.js +222 -0
  11. package/dist/event_types.js +232 -0
  12. package/dist/events.js +114 -0
  13. package/dist/flags.js +23 -0
  14. package/dist/index.js +38 -0
  15. package/dist/listener.js +44 -0
  16. package/dist/nanoid.js +38 -0
  17. package/dist/runtime.js +63 -0
  18. package/{screens.js → dist/screens.js} +38 -45
  19. package/dist/system.js +146 -0
  20. package/dist/utils.js +95 -0
  21. package/dist/window.js +570 -0
  22. package/dist/wml.js +179 -0
  23. package/package.json +62 -18
  24. package/types/application.d.ts +12 -0
  25. package/types/browser.d.ts +6 -0
  26. package/types/callable.d.ts +3 -0
  27. package/types/calls.d.ts +63 -0
  28. package/types/cancellable.d.ts +434 -0
  29. package/types/clipboard.d.ts +13 -0
  30. package/types/contextmenu.d.ts +1 -0
  31. package/types/create.d.ts +31 -0
  32. package/types/dialogs.d.ts +140 -0
  33. package/types/drag.d.ts +1 -0
  34. package/types/event_types.d.ts +221 -0
  35. package/types/events.d.ts +67 -0
  36. package/types/flags.d.ts +7 -0
  37. package/types/index.d.ts +16 -0
  38. package/types/listener.d.ts +9 -0
  39. package/types/nanoid.d.ts +1 -0
  40. package/types/runtime.d.ts +22 -0
  41. package/types/screens.d.ts +60 -0
  42. package/types/system.d.ts +92 -0
  43. package/types/utils.d.ts +21 -0
  44. package/types/window.d.ts +306 -0
  45. package/types/wml.d.ts +8 -0
  46. package/browser.js +0 -24
  47. package/calls.js +0 -123
  48. package/clipboard.js +0 -35
  49. package/contextmenu.js +0 -98
  50. package/dialogs.js +0 -138
  51. package/drag.js +0 -125
  52. package/events.js +0 -134
  53. package/flags.js +0 -63
  54. package/index.js +0 -56
  55. package/runtime.js +0 -122
  56. package/system.js +0 -122
  57. package/types.d.ts +0 -135
  58. package/window.js +0 -122
  59. package/wml.js +0 -151
@@ -0,0 +1,221 @@
1
+ export declare const Types: Readonly<{
2
+ Windows: Readonly<{
3
+ APMPowerSettingChange: "windows:APMPowerSettingChange";
4
+ APMPowerStatusChange: "windows:APMPowerStatusChange";
5
+ APMResumeAutomatic: "windows:APMResumeAutomatic";
6
+ APMResumeSuspend: "windows:APMResumeSuspend";
7
+ APMSuspend: "windows:APMSuspend";
8
+ ApplicationStarted: "windows:ApplicationStarted";
9
+ SystemThemeChanged: "windows:SystemThemeChanged";
10
+ WebViewNavigationCompleted: "windows:WebViewNavigationCompleted";
11
+ WindowActive: "windows:WindowActive";
12
+ WindowBackgroundErase: "windows:WindowBackgroundErase";
13
+ WindowClickActive: "windows:WindowClickActive";
14
+ WindowClosing: "windows:WindowClosing";
15
+ WindowDidMove: "windows:WindowDidMove";
16
+ WindowDidResize: "windows:WindowDidResize";
17
+ WindowDPIChanged: "windows:WindowDPIChanged";
18
+ WindowDragDrop: "windows:WindowDragDrop";
19
+ WindowDragEnter: "windows:WindowDragEnter";
20
+ WindowDragLeave: "windows:WindowDragLeave";
21
+ WindowDragOver: "windows:WindowDragOver";
22
+ WindowEndMove: "windows:WindowEndMove";
23
+ WindowEndResize: "windows:WindowEndResize";
24
+ WindowFullscreen: "windows:WindowFullscreen";
25
+ WindowHide: "windows:WindowHide";
26
+ WindowInactive: "windows:WindowInactive";
27
+ WindowKeyDown: "windows:WindowKeyDown";
28
+ WindowKeyUp: "windows:WindowKeyUp";
29
+ WindowKillFocus: "windows:WindowKillFocus";
30
+ WindowNonClientHit: "windows:WindowNonClientHit";
31
+ WindowNonClientMouseDown: "windows:WindowNonClientMouseDown";
32
+ WindowNonClientMouseLeave: "windows:WindowNonClientMouseLeave";
33
+ WindowNonClientMouseMove: "windows:WindowNonClientMouseMove";
34
+ WindowNonClientMouseUp: "windows:WindowNonClientMouseUp";
35
+ WindowPaint: "windows:WindowPaint";
36
+ WindowRestore: "windows:WindowRestore";
37
+ WindowSetFocus: "windows:WindowSetFocus";
38
+ WindowShow: "windows:WindowShow";
39
+ WindowStartMove: "windows:WindowStartMove";
40
+ WindowStartResize: "windows:WindowStartResize";
41
+ WindowUnFullscreen: "windows:WindowUnFullscreen";
42
+ WindowZOrderChanged: "windows:WindowZOrderChanged";
43
+ WindowMinimise: "windows:WindowMinimise";
44
+ WindowUnMinimise: "windows:WindowUnMinimise";
45
+ WindowMaximise: "windows:WindowMaximise";
46
+ WindowUnMaximise: "windows:WindowUnMaximise";
47
+ }>;
48
+ Mac: Readonly<{
49
+ ApplicationDidBecomeActive: "mac:ApplicationDidBecomeActive";
50
+ ApplicationDidChangeBackingProperties: "mac:ApplicationDidChangeBackingProperties";
51
+ ApplicationDidChangeEffectiveAppearance: "mac:ApplicationDidChangeEffectiveAppearance";
52
+ ApplicationDidChangeIcon: "mac:ApplicationDidChangeIcon";
53
+ ApplicationDidChangeOcclusionState: "mac:ApplicationDidChangeOcclusionState";
54
+ ApplicationDidChangeScreenParameters: "mac:ApplicationDidChangeScreenParameters";
55
+ ApplicationDidChangeStatusBarFrame: "mac:ApplicationDidChangeStatusBarFrame";
56
+ ApplicationDidChangeStatusBarOrientation: "mac:ApplicationDidChangeStatusBarOrientation";
57
+ ApplicationDidChangeTheme: "mac:ApplicationDidChangeTheme";
58
+ ApplicationDidFinishLaunching: "mac:ApplicationDidFinishLaunching";
59
+ ApplicationDidHide: "mac:ApplicationDidHide";
60
+ ApplicationDidResignActive: "mac:ApplicationDidResignActive";
61
+ ApplicationDidUnhide: "mac:ApplicationDidUnhide";
62
+ ApplicationDidUpdate: "mac:ApplicationDidUpdate";
63
+ ApplicationShouldHandleReopen: "mac:ApplicationShouldHandleReopen";
64
+ ApplicationWillBecomeActive: "mac:ApplicationWillBecomeActive";
65
+ ApplicationWillFinishLaunching: "mac:ApplicationWillFinishLaunching";
66
+ ApplicationWillHide: "mac:ApplicationWillHide";
67
+ ApplicationWillResignActive: "mac:ApplicationWillResignActive";
68
+ ApplicationWillTerminate: "mac:ApplicationWillTerminate";
69
+ ApplicationWillUnhide: "mac:ApplicationWillUnhide";
70
+ ApplicationWillUpdate: "mac:ApplicationWillUpdate";
71
+ MenuDidAddItem: "mac:MenuDidAddItem";
72
+ MenuDidBeginTracking: "mac:MenuDidBeginTracking";
73
+ MenuDidClose: "mac:MenuDidClose";
74
+ MenuDidDisplayItem: "mac:MenuDidDisplayItem";
75
+ MenuDidEndTracking: "mac:MenuDidEndTracking";
76
+ MenuDidHighlightItem: "mac:MenuDidHighlightItem";
77
+ MenuDidOpen: "mac:MenuDidOpen";
78
+ MenuDidPopUp: "mac:MenuDidPopUp";
79
+ MenuDidRemoveItem: "mac:MenuDidRemoveItem";
80
+ MenuDidSendAction: "mac:MenuDidSendAction";
81
+ MenuDidSendActionToItem: "mac:MenuDidSendActionToItem";
82
+ MenuDidUpdate: "mac:MenuDidUpdate";
83
+ MenuWillAddItem: "mac:MenuWillAddItem";
84
+ MenuWillBeginTracking: "mac:MenuWillBeginTracking";
85
+ MenuWillDisplayItem: "mac:MenuWillDisplayItem";
86
+ MenuWillEndTracking: "mac:MenuWillEndTracking";
87
+ MenuWillHighlightItem: "mac:MenuWillHighlightItem";
88
+ MenuWillOpen: "mac:MenuWillOpen";
89
+ MenuWillPopUp: "mac:MenuWillPopUp";
90
+ MenuWillRemoveItem: "mac:MenuWillRemoveItem";
91
+ MenuWillSendAction: "mac:MenuWillSendAction";
92
+ MenuWillSendActionToItem: "mac:MenuWillSendActionToItem";
93
+ MenuWillUpdate: "mac:MenuWillUpdate";
94
+ WebViewDidCommitNavigation: "mac:WebViewDidCommitNavigation";
95
+ WebViewDidFinishNavigation: "mac:WebViewDidFinishNavigation";
96
+ WebViewDidReceiveServerRedirectForProvisionalNavigation: "mac:WebViewDidReceiveServerRedirectForProvisionalNavigation";
97
+ WebViewDidStartProvisionalNavigation: "mac:WebViewDidStartProvisionalNavigation";
98
+ WindowDidBecomeKey: "mac:WindowDidBecomeKey";
99
+ WindowDidBecomeMain: "mac:WindowDidBecomeMain";
100
+ WindowDidBeginSheet: "mac:WindowDidBeginSheet";
101
+ WindowDidChangeAlpha: "mac:WindowDidChangeAlpha";
102
+ WindowDidChangeBackingLocation: "mac:WindowDidChangeBackingLocation";
103
+ WindowDidChangeBackingProperties: "mac:WindowDidChangeBackingProperties";
104
+ WindowDidChangeCollectionBehavior: "mac:WindowDidChangeCollectionBehavior";
105
+ WindowDidChangeEffectiveAppearance: "mac:WindowDidChangeEffectiveAppearance";
106
+ WindowDidChangeOcclusionState: "mac:WindowDidChangeOcclusionState";
107
+ WindowDidChangeOrderingMode: "mac:WindowDidChangeOrderingMode";
108
+ WindowDidChangeScreen: "mac:WindowDidChangeScreen";
109
+ WindowDidChangeScreenParameters: "mac:WindowDidChangeScreenParameters";
110
+ WindowDidChangeScreenProfile: "mac:WindowDidChangeScreenProfile";
111
+ WindowDidChangeScreenSpace: "mac:WindowDidChangeScreenSpace";
112
+ WindowDidChangeScreenSpaceProperties: "mac:WindowDidChangeScreenSpaceProperties";
113
+ WindowDidChangeSharingType: "mac:WindowDidChangeSharingType";
114
+ WindowDidChangeSpace: "mac:WindowDidChangeSpace";
115
+ WindowDidChangeSpaceOrderingMode: "mac:WindowDidChangeSpaceOrderingMode";
116
+ WindowDidChangeTitle: "mac:WindowDidChangeTitle";
117
+ WindowDidChangeToolbar: "mac:WindowDidChangeToolbar";
118
+ WindowDidDeminiaturize: "mac:WindowDidDeminiaturize";
119
+ WindowDidEndSheet: "mac:WindowDidEndSheet";
120
+ WindowDidEnterFullScreen: "mac:WindowDidEnterFullScreen";
121
+ WindowDidEnterVersionBrowser: "mac:WindowDidEnterVersionBrowser";
122
+ WindowDidExitFullScreen: "mac:WindowDidExitFullScreen";
123
+ WindowDidExitVersionBrowser: "mac:WindowDidExitVersionBrowser";
124
+ WindowDidExpose: "mac:WindowDidExpose";
125
+ WindowDidFocus: "mac:WindowDidFocus";
126
+ WindowDidMiniaturize: "mac:WindowDidMiniaturize";
127
+ WindowDidMove: "mac:WindowDidMove";
128
+ WindowDidOrderOffScreen: "mac:WindowDidOrderOffScreen";
129
+ WindowDidOrderOnScreen: "mac:WindowDidOrderOnScreen";
130
+ WindowDidResignKey: "mac:WindowDidResignKey";
131
+ WindowDidResignMain: "mac:WindowDidResignMain";
132
+ WindowDidResize: "mac:WindowDidResize";
133
+ WindowDidUpdate: "mac:WindowDidUpdate";
134
+ WindowDidUpdateAlpha: "mac:WindowDidUpdateAlpha";
135
+ WindowDidUpdateCollectionBehavior: "mac:WindowDidUpdateCollectionBehavior";
136
+ WindowDidUpdateCollectionProperties: "mac:WindowDidUpdateCollectionProperties";
137
+ WindowDidUpdateShadow: "mac:WindowDidUpdateShadow";
138
+ WindowDidUpdateTitle: "mac:WindowDidUpdateTitle";
139
+ WindowDidUpdateToolbar: "mac:WindowDidUpdateToolbar";
140
+ WindowDidZoom: "mac:WindowDidZoom";
141
+ WindowFileDraggingEntered: "mac:WindowFileDraggingEntered";
142
+ WindowFileDraggingExited: "mac:WindowFileDraggingExited";
143
+ WindowFileDraggingPerformed: "mac:WindowFileDraggingPerformed";
144
+ WindowHide: "mac:WindowHide";
145
+ WindowMaximise: "mac:WindowMaximise";
146
+ WindowUnMaximise: "mac:WindowUnMaximise";
147
+ WindowMinimise: "mac:WindowMinimise";
148
+ WindowUnMinimise: "mac:WindowUnMinimise";
149
+ WindowShouldClose: "mac:WindowShouldClose";
150
+ WindowShow: "mac:WindowShow";
151
+ WindowWillBecomeKey: "mac:WindowWillBecomeKey";
152
+ WindowWillBecomeMain: "mac:WindowWillBecomeMain";
153
+ WindowWillBeginSheet: "mac:WindowWillBeginSheet";
154
+ WindowWillChangeOrderingMode: "mac:WindowWillChangeOrderingMode";
155
+ WindowWillClose: "mac:WindowWillClose";
156
+ WindowWillDeminiaturize: "mac:WindowWillDeminiaturize";
157
+ WindowWillEnterFullScreen: "mac:WindowWillEnterFullScreen";
158
+ WindowWillEnterVersionBrowser: "mac:WindowWillEnterVersionBrowser";
159
+ WindowWillExitFullScreen: "mac:WindowWillExitFullScreen";
160
+ WindowWillExitVersionBrowser: "mac:WindowWillExitVersionBrowser";
161
+ WindowWillFocus: "mac:WindowWillFocus";
162
+ WindowWillMiniaturize: "mac:WindowWillMiniaturize";
163
+ WindowWillMove: "mac:WindowWillMove";
164
+ WindowWillOrderOffScreen: "mac:WindowWillOrderOffScreen";
165
+ WindowWillOrderOnScreen: "mac:WindowWillOrderOnScreen";
166
+ WindowWillResignMain: "mac:WindowWillResignMain";
167
+ WindowWillResize: "mac:WindowWillResize";
168
+ WindowWillUnfocus: "mac:WindowWillUnfocus";
169
+ WindowWillUpdate: "mac:WindowWillUpdate";
170
+ WindowWillUpdateAlpha: "mac:WindowWillUpdateAlpha";
171
+ WindowWillUpdateCollectionBehavior: "mac:WindowWillUpdateCollectionBehavior";
172
+ WindowWillUpdateCollectionProperties: "mac:WindowWillUpdateCollectionProperties";
173
+ WindowWillUpdateShadow: "mac:WindowWillUpdateShadow";
174
+ WindowWillUpdateTitle: "mac:WindowWillUpdateTitle";
175
+ WindowWillUpdateToolbar: "mac:WindowWillUpdateToolbar";
176
+ WindowWillUpdateVisibility: "mac:WindowWillUpdateVisibility";
177
+ WindowWillUseStandardFrame: "mac:WindowWillUseStandardFrame";
178
+ WindowZoomIn: "mac:WindowZoomIn";
179
+ WindowZoomOut: "mac:WindowZoomOut";
180
+ WindowZoomReset: "mac:WindowZoomReset";
181
+ }>;
182
+ Linux: Readonly<{
183
+ ApplicationStartup: "linux:ApplicationStartup";
184
+ SystemThemeChanged: "linux:SystemThemeChanged";
185
+ WindowDeleteEvent: "linux:WindowDeleteEvent";
186
+ WindowDidMove: "linux:WindowDidMove";
187
+ WindowDidResize: "linux:WindowDidResize";
188
+ WindowFocusIn: "linux:WindowFocusIn";
189
+ WindowFocusOut: "linux:WindowFocusOut";
190
+ WindowLoadChanged: "linux:WindowLoadChanged";
191
+ }>;
192
+ Common: Readonly<{
193
+ ApplicationOpenedWithFile: "common:ApplicationOpenedWithFile";
194
+ ApplicationStarted: "common:ApplicationStarted";
195
+ ApplicationLaunchedWithUrl: "common:ApplicationLaunchedWithUrl";
196
+ ThemeChanged: "common:ThemeChanged";
197
+ WindowClosing: "common:WindowClosing";
198
+ WindowDidMove: "common:WindowDidMove";
199
+ WindowDidResize: "common:WindowDidResize";
200
+ WindowDPIChanged: "common:WindowDPIChanged";
201
+ WindowFilesDropped: "common:WindowFilesDropped";
202
+ WindowFocus: "common:WindowFocus";
203
+ WindowFullscreen: "common:WindowFullscreen";
204
+ WindowHide: "common:WindowHide";
205
+ WindowLostFocus: "common:WindowLostFocus";
206
+ WindowMaximise: "common:WindowMaximise";
207
+ WindowMinimise: "common:WindowMinimise";
208
+ WindowToggleFrameless: "common:WindowToggleFrameless";
209
+ WindowRestore: "common:WindowRestore";
210
+ WindowRuntimeReady: "common:WindowRuntimeReady";
211
+ WindowShow: "common:WindowShow";
212
+ WindowUnFullscreen: "common:WindowUnFullscreen";
213
+ WindowUnMaximise: "common:WindowUnMaximise";
214
+ WindowUnMinimise: "common:WindowUnMinimise";
215
+ WindowZoom: "common:WindowZoom";
216
+ WindowZoomIn: "common:WindowZoomIn";
217
+ WindowZoomOut: "common:WindowZoomOut";
218
+ WindowZoomReset: "common:WindowZoomReset";
219
+ WindowDropZoneFilesDropped: "common:WindowDropZoneFilesDropped";
220
+ }>;
221
+ }>;
@@ -0,0 +1,67 @@
1
+ export { Types } from "./event_types.js";
2
+ /**
3
+ * The type of handlers for a given event.
4
+ */
5
+ export type Callback = (ev: WailsEvent) => void;
6
+ /**
7
+ * Represents a system event or a custom event emitted through wails-provided facilities.
8
+ */
9
+ export declare class WailsEvent {
10
+ /**
11
+ * The name of the event.
12
+ */
13
+ name: string;
14
+ /**
15
+ * Optional data associated with the emitted event.
16
+ */
17
+ data: any;
18
+ /**
19
+ * Name of the originating window. Omitted for application events.
20
+ * Will be overridden if set manually.
21
+ */
22
+ sender?: string;
23
+ constructor(name: string, data?: any);
24
+ }
25
+ /**
26
+ * Register a callback function to be called multiple times for a specific event.
27
+ *
28
+ * @param eventName - The name of the event to register the callback for.
29
+ * @param callback - The callback function to be called when the event is triggered.
30
+ * @param maxCallbacks - The maximum number of times the callback can be called for the event. Once the maximum number is reached, the callback will no longer be called.
31
+ * @returns A function that, when called, will unregister the callback from the event.
32
+ */
33
+ export declare function OnMultiple(eventName: string, callback: Callback, maxCallbacks: number): () => void;
34
+ /**
35
+ * Registers a callback function to be executed when the specified event occurs.
36
+ *
37
+ * @param eventName - The name of the event to register the callback for.
38
+ * @param callback - The callback function to be called when the event is triggered.
39
+ * @returns A function that, when called, will unregister the callback from the event.
40
+ */
41
+ export declare function On(eventName: string, callback: Callback): () => void;
42
+ /**
43
+ * Registers a callback function to be executed only once for the specified event.
44
+ *
45
+ * @param eventName - The name of the event to register the callback for.
46
+ * @param callback - The callback function to be called when the event is triggered.
47
+ * @returns A function that, when called, will unregister the callback from the event.
48
+ */
49
+ export declare function Once(eventName: string, callback: Callback): () => void;
50
+ /**
51
+ * Removes event listeners for the specified event names.
52
+ *
53
+ * @param eventNames - The name of the events to remove listeners for.
54
+ */
55
+ export declare function Off(...eventNames: [string, ...string[]]): void;
56
+ /**
57
+ * Removes all event listeners.
58
+ */
59
+ export declare function OffAll(): void;
60
+ /**
61
+ * Emits an event using the name and data.
62
+ *
63
+ * @returns A promise that will be fulfilled once the event has been emitted.
64
+ * @param name - the name of the event to emit.
65
+ * @param data - the data to be sent with the event.
66
+ */
67
+ export declare function Emit(name: string, data?: any): Promise<void>;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Retrieves the value associated with the specified key from the flag map.
3
+ *
4
+ * @param key - The key to retrieve the value for.
5
+ * @return The value associated with the specified key.
6
+ */
7
+ export declare function GetFlag(key: string): any;
@@ -0,0 +1,16 @@
1
+ import "./contextmenu.js";
2
+ import "./drag.js";
3
+ import * as Application from "./application.js";
4
+ import * as Browser from "./browser.js";
5
+ import * as Call from "./calls.js";
6
+ import * as Clipboard from "./clipboard.js";
7
+ import * as Create from "./create.js";
8
+ import * as Dialogs from "./dialogs.js";
9
+ import * as Events from "./events.js";
10
+ import * as Flags from "./flags.js";
11
+ import * as Screens from "./screens.js";
12
+ import * as System from "./system.js";
13
+ import Window from "./window.js";
14
+ import * as WML from "./wml.js";
15
+ export { Application, Browser, Call, Clipboard, Dialogs, Events, Flags, Screens, System, Window, WML };
16
+ export * from "./cancellable.js";
@@ -0,0 +1,9 @@
1
+ export declare const eventListeners: Map<string, Listener[]>;
2
+ export declare class Listener {
3
+ eventName: string;
4
+ callback: (data: any) => void;
5
+ maxCallbacks: number;
6
+ constructor(eventName: string, callback: (data: any) => void, maxCallbacks: number);
7
+ dispatch(data: any): boolean;
8
+ }
9
+ export declare function listenerOff(listener: Listener): void;
@@ -0,0 +1 @@
1
+ export declare function nanoid(size?: number): string;
@@ -0,0 +1,22 @@
1
+ export declare const objectNames: Readonly<{
2
+ Call: 0;
3
+ Clipboard: 1;
4
+ Application: 2;
5
+ Events: 3;
6
+ ContextMenu: 4;
7
+ Dialog: 5;
8
+ Window: 6;
9
+ Screens: 7;
10
+ System: 8;
11
+ Browser: 9;
12
+ CancelCall: 10;
13
+ }>;
14
+ export declare let clientId: string;
15
+ /**
16
+ * Creates a new runtime caller with specified ID.
17
+ *
18
+ * @param object - The object to invoke the method on.
19
+ * @param windowName - The name of the window.
20
+ * @return The new runtime caller function.
21
+ */
22
+ export declare function newRuntimeCaller(object: number, windowName?: string): (method: number, args?: any) => Promise<any>;
@@ -0,0 +1,60 @@
1
+ export interface Size {
2
+ /** The width of a rectangular area. */
3
+ Width: number;
4
+ /** The height of a rectangular area. */
5
+ Height: number;
6
+ }
7
+ export interface Rect {
8
+ /** The X coordinate of the origin. */
9
+ X: number;
10
+ /** The Y coordinate of the origin. */
11
+ Y: number;
12
+ /** The width of the rectangle. */
13
+ Width: number;
14
+ /** The height of the rectangle. */
15
+ Height: number;
16
+ }
17
+ export interface Screen {
18
+ /** Unique identifier for the screen. */
19
+ ID: string;
20
+ /** Human-readable name of the screen. */
21
+ Name: string;
22
+ /** The scale factor of the screen (DPI/96). 1 = standard DPI, 2 = HiDPI (Retina), etc. */
23
+ ScaleFactor: number;
24
+ /** The X coordinate of the screen. */
25
+ X: number;
26
+ /** The Y coordinate of the screen. */
27
+ Y: number;
28
+ /** Contains the width and height of the screen. */
29
+ Size: Size;
30
+ /** Contains the bounds of the screen in terms of X, Y, Width, and Height. */
31
+ Bounds: Rect;
32
+ /** Contains the physical bounds of the screen in terms of X, Y, Width, and Height (before scaling). */
33
+ PhysicalBounds: Rect;
34
+ /** Contains the area of the screen that is actually usable (excluding taskbar and other system UI). */
35
+ WorkArea: Rect;
36
+ /** Contains the physical WorkArea of the screen (before scaling). */
37
+ PhysicalWorkArea: Rect;
38
+ /** True if this is the primary monitor selected by the user in the operating system. */
39
+ IsPrimary: boolean;
40
+ /** The rotation of the screen. */
41
+ Rotation: number;
42
+ }
43
+ /**
44
+ * Gets all screens.
45
+ *
46
+ * @returns A promise that resolves to an array of Screen objects.
47
+ */
48
+ export declare function GetAll(): Promise<Screen[]>;
49
+ /**
50
+ * Gets the primary screen.
51
+ *
52
+ * @returns A promise that resolves to the primary screen.
53
+ */
54
+ export declare function GetPrimary(): Promise<Screen>;
55
+ /**
56
+ * Gets the current active screen.
57
+ *
58
+ * @returns A promise that resolves with the current active screen.
59
+ */
60
+ export declare function GetCurrent(): Promise<Screen>;
@@ -0,0 +1,92 @@
1
+ export declare function invoke(msg: any): void;
2
+ /**
3
+ * Retrieves the system dark mode status.
4
+ *
5
+ * @returns A promise that resolves to a boolean value indicating if the system is in dark mode.
6
+ */
7
+ export declare function IsDarkMode(): Promise<boolean>;
8
+ /**
9
+ * Fetches the capabilities of the application from the server.
10
+ *
11
+ * @returns A promise that resolves to an object containing the capabilities.
12
+ */
13
+ export declare function Capabilities(): Promise<Record<string, any>>;
14
+ export interface OSInfo {
15
+ /** The branding of the OS. */
16
+ Branding: string;
17
+ /** The ID of the OS. */
18
+ ID: string;
19
+ /** The name of the OS. */
20
+ Name: string;
21
+ /** The version of the OS. */
22
+ Version: string;
23
+ }
24
+ export interface EnvironmentInfo {
25
+ /** The architecture of the system. */
26
+ Arch: string;
27
+ /** True if the application is running in debug mode, otherwise false. */
28
+ Debug: boolean;
29
+ /** The operating system in use. */
30
+ OS: string;
31
+ /** Details of the operating system. */
32
+ OSInfo: OSInfo;
33
+ /** Additional platform information. */
34
+ PlatformInfo: Record<string, any>;
35
+ }
36
+ /**
37
+ * Retrieves environment details.
38
+ *
39
+ * @returns A promise that resolves to an object containing OS and system architecture.
40
+ */
41
+ export declare function Environment(): Promise<EnvironmentInfo>;
42
+ /**
43
+ * Checks if the current operating system is Windows.
44
+ *
45
+ * @return True if the operating system is Windows, otherwise false.
46
+ */
47
+ export declare function IsWindows(): boolean;
48
+ /**
49
+ * Checks if the current operating system is Linux.
50
+ *
51
+ * @returns Returns true if the current operating system is Linux, false otherwise.
52
+ */
53
+ export declare function IsLinux(): boolean;
54
+ /**
55
+ * Checks if the current environment is a macOS operating system.
56
+ *
57
+ * @returns True if the environment is macOS, false otherwise.
58
+ */
59
+ export declare function IsMac(): boolean;
60
+ /**
61
+ * Checks if the current environment architecture is AMD64.
62
+ *
63
+ * @returns True if the current environment architecture is AMD64, false otherwise.
64
+ */
65
+ export declare function IsAMD64(): boolean;
66
+ /**
67
+ * Checks if the current architecture is ARM.
68
+ *
69
+ * @returns True if the current architecture is ARM, false otherwise.
70
+ */
71
+ export declare function IsARM(): boolean;
72
+ /**
73
+ * Checks if the current environment is ARM64 architecture.
74
+ *
75
+ * @returns Returns true if the environment is ARM64 architecture, otherwise returns false.
76
+ */
77
+ export declare function IsARM64(): boolean;
78
+ /**
79
+ * Reports whether the app is being run in debug mode.
80
+ *
81
+ * @returns True if the app is being run in debug mode.
82
+ */
83
+ export declare function IsDebug(): boolean;
84
+ /**
85
+ * Handles file drops originating from platform-specific code (e.g., macOS native drag-and-drop).
86
+ * Gathers information about the drop target element and sends it back to the Go backend.
87
+ *
88
+ * @param filenames - An array of file paths (strings) that were dropped.
89
+ * @param x - The x-coordinate of the drop event.
90
+ * @param y - The y-coordinate of the drop event.
91
+ */
92
+ export declare function HandlePlatformFileDrop(filenames: string[], x: number, y: number): void;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Logs a message to the console with custom formatting.
3
+ *
4
+ * @param message - The message to be logged.
5
+ */
6
+ export declare function debugLog(message: any): void;
7
+ /**
8
+ * Checks whether the webview supports the {@link MouseEvent#buttons} property.
9
+ * Looking at you macOS High Sierra!
10
+ */
11
+ export declare function canTrackButtons(): boolean;
12
+ /**
13
+ * Checks whether the browser supports removing listeners by triggering an AbortSignal
14
+ * (see https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#signal).
15
+ */
16
+ export declare function canAbortListeners(): boolean;
17
+ /**
18
+ * Resolves the closest HTMLElement ancestor of an event's target.
19
+ */
20
+ export declare function eventTarget(event: Event): HTMLElement;
21
+ export declare function whenReady(callback: () => void): void;