@wailsio/runtime 3.0.0-alpha.10

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/src/window.js ADDED
@@ -0,0 +1,122 @@
1
+ /*
2
+ _ __ _ __
3
+ | | / /___ _(_) /____
4
+ | | /| / / __ `/ / / ___/
5
+ | |/ |/ / /_/ / / (__ )
6
+ |__/|__/\__,_/_/_/____/
7
+ The electron alternative for Go
8
+ (c) Lea Anthony 2019-present
9
+ */
10
+
11
+ /* jshint esversion: 9 */
12
+
13
+ /**
14
+ * @typedef {import("../api/types").Size} Size
15
+ * @typedef {import("../api/types").Position} Position
16
+ * @typedef {import("../api/types").Screen} Screen
17
+ */
18
+
19
+ import {newRuntimeCallerWithID, objectNames} from "./runtime";
20
+
21
+ const center = 0;
22
+ const setTitle = 1;
23
+ const fullscreen = 2;
24
+ const unFullscreen = 3;
25
+ const setSize = 4;
26
+ const size = 5;
27
+ const setMaxSize = 6;
28
+ const setMinSize = 7;
29
+ const setAlwaysOnTop = 8;
30
+ const setRelativePosition = 9;
31
+ const relativePosition = 10;
32
+ const screen = 11;
33
+ const hide = 12;
34
+ const maximise = 13;
35
+ const unMaximise = 14;
36
+ const toggleMaximise = 15;
37
+ const minimise = 16;
38
+ const unMinimise = 17;
39
+ const restore = 18;
40
+ const show = 19;
41
+ const close = 20;
42
+ const setBackgroundColour = 21;
43
+ const setResizable = 22;
44
+ const width = 23;
45
+ const height = 24;
46
+ const zoomIn = 25;
47
+ const zoomOut = 26;
48
+ const zoomReset = 27;
49
+ const getZoomLevel = 28;
50
+ const setZoomLevel = 29;
51
+
52
+ const thisWindow = newRuntimeCallerWithID(objectNames.Window, '');
53
+
54
+ function createWindow(call) {
55
+ return {
56
+ Get: (windowName) => createWindow(newRuntimeCallerWithID(objectNames.Window, windowName)),
57
+ Center: () => call(center),
58
+ SetTitle: (title) => call(setTitle, {title}),
59
+ Fullscreen: () => call(fullscreen),
60
+ UnFullscreen: () => call(unFullscreen),
61
+ SetSize: (width, height) => call(setSize, {width, height}),
62
+ Size: () => call(size),
63
+ SetMaxSize: (width, height) => call(setMaxSize, {width, height}),
64
+ SetMinSize: (width, height) => call(setMinSize, {width, height}),
65
+ SetAlwaysOnTop: (onTop) => call(setAlwaysOnTop, {alwaysOnTop: onTop}),
66
+ SetRelativePosition: (x, y) => call(setRelativePosition, {x, y}),
67
+ RelativePosition: () => call(relativePosition),
68
+ Screen: () => call(screen),
69
+ Hide: () => call(hide),
70
+ Maximise: () => call(maximise),
71
+ UnMaximise: () => call(unMaximise),
72
+ ToggleMaximise: () => call(toggleMaximise),
73
+ Minimise: () => call(minimise),
74
+ UnMinimise: () => call(unMinimise),
75
+ Restore: () => call(restore),
76
+ Show: () => call(show),
77
+ Close: () => call(close),
78
+ SetBackgroundColour: (r, g, b, a) => call(setBackgroundColour, {r, g, b, a}),
79
+ SetResizable: (resizable) => call(setResizable, {resizable}),
80
+ Width: () => call(width),
81
+ Height: () => call(height),
82
+ ZoomIn: () => call(zoomIn),
83
+ ZoomOut: () => call(zoomOut),
84
+ ZoomReset: () => call(zoomReset),
85
+ GetZoomLevel: () => call(getZoomLevel),
86
+ SetZoomLevel: (zoomLevel) => call(setZoomLevel, {zoomLevel}),
87
+ };
88
+ }
89
+
90
+ /**
91
+ * Gets the specified window.
92
+ *
93
+ * @param {string} windowName - The name of the window to get.
94
+ * @return {Object} - The specified window object.
95
+ */
96
+ export function Get(windowName) {
97
+ return createWindow(newRuntimeCallerWithID(objectNames.Window, windowName));
98
+ }
99
+
100
+ /**
101
+ * Returns a map of all methods in the current window.
102
+ * @returns {Map} - A map of window methods.
103
+ */
104
+ export function WindowMethods(targetWindow) {
105
+ // Create a new map to store methods
106
+ let result = new Map();
107
+
108
+ // Iterate over all properties of the window object
109
+ for (let method in targetWindow) {
110
+ // Check if the property is indeed a method (function)
111
+ if(typeof targetWindow[method] === 'function') {
112
+ // Add the method to the map
113
+ result.set(method, targetWindow[method]);
114
+ }
115
+
116
+ }
117
+ // Return the map of window methods
118
+ return result;
119
+ }
120
+ export default {
121
+ ...Get('')
122
+ }
package/src/wml.js ADDED
@@ -0,0 +1,151 @@
1
+
2
+ import {Emit, WailsEvent} from "./events";
3
+ import {Question} from "./dialogs";
4
+ import {WindowMethods, Get} from "./window";
5
+ import {OpenURL} from "./browser";
6
+
7
+ /**
8
+ * Sends an event with the given name and optional data.
9
+ *
10
+ * @param {string} eventName - The name of the event to send.
11
+ * @param {any} [data=null] - Optional data to send along with the event.
12
+ *
13
+ * @return {void}
14
+ */
15
+ function sendEvent(eventName, data=null) {
16
+ let event = new WailsEvent(eventName, data);
17
+ Emit(event);
18
+ }
19
+
20
+ /**
21
+ * Adds event listeners to elements with `wml-event` attribute.
22
+ *
23
+ * @return {void}
24
+ */
25
+ function addWMLEventListeners() {
26
+ const elements = document.querySelectorAll('[wml-event]');
27
+ elements.forEach(function (element) {
28
+ const eventType = element.getAttribute('wml-event');
29
+ const confirm = element.getAttribute('wml-confirm');
30
+ const trigger = element.getAttribute('wml-trigger') || "click";
31
+
32
+ let callback = function () {
33
+ if (confirm) {
34
+ Question({Title: "Confirm", Message:confirm, Detached: false, Buttons:[{Label:"Yes"},{Label:"No", IsDefault:true}]}).then(function (result) {
35
+ if (result !== "No") {
36
+ sendEvent(eventType);
37
+ }
38
+ });
39
+ return;
40
+ }
41
+ sendEvent(eventType);
42
+ };
43
+
44
+ // Remove existing listeners
45
+ element.removeEventListener(trigger, callback);
46
+
47
+ // Add new listener
48
+ element.addEventListener(trigger, callback);
49
+ });
50
+ }
51
+
52
+
53
+ /**
54
+ * Calls a method on a specified window.
55
+ * @param {string} windowName - The name of the window to call the method on.
56
+ * @param {string} method - The name of the method to call.
57
+ */
58
+ function callWindowMethod(windowName, method) {
59
+ let targetWindow = Get(windowName);
60
+ let methodMap = WindowMethods(targetWindow);
61
+ if (!methodMap.has(method)) {
62
+ console.log("Window method " + method + " not found");
63
+ }
64
+ try {
65
+ methodMap.get(method)();
66
+ } catch (e) {
67
+ console.error("Error calling window method '" + method + "': " + e);
68
+ }
69
+ }
70
+
71
+ /**
72
+ * Adds window listeners for elements with the 'wml-window' attribute.
73
+ * Removes any existing listeners before adding new ones.
74
+ *
75
+ * @return {void}
76
+ */
77
+ function addWMLWindowListeners() {
78
+ const elements = document.querySelectorAll('[wml-window]');
79
+ elements.forEach(function (element) {
80
+ const windowMethod = element.getAttribute('wml-window');
81
+ const confirm = element.getAttribute('wml-confirm');
82
+ const trigger = element.getAttribute('wml-trigger') || 'click';
83
+ const targetWindow = element.getAttribute('wml-target-window') || '';
84
+
85
+ let callback = function () {
86
+ if (confirm) {
87
+ Question({Title: "Confirm", Message:confirm, Buttons:[{Label:"Yes"},{Label:"No", IsDefault:true}]}).then(function (result) {
88
+ if (result !== "No") {
89
+ callWindowMethod(targetWindow, windowMethod);
90
+ }
91
+ });
92
+ return;
93
+ }
94
+ callWindowMethod(targetWindow, windowMethod);
95
+ };
96
+
97
+ // Remove existing listeners
98
+ element.removeEventListener(trigger, callback);
99
+
100
+ // Add new listener
101
+ element.addEventListener(trigger, callback);
102
+ });
103
+ }
104
+
105
+ /**
106
+ * Adds a listener to elements with the 'wml-openurl' attribute.
107
+ * When the specified trigger event is fired on any of these elements,
108
+ * the listener will open the URL specified by the 'wml-openurl' attribute.
109
+ * If a 'wml-confirm' attribute is provided, a confirmation dialog will be displayed,
110
+ * and the URL will only be opened if the user confirms.
111
+ *
112
+ * @return {void}
113
+ */
114
+ function addWMLOpenBrowserListener() {
115
+ const elements = document.querySelectorAll('[wml-openurl]');
116
+ elements.forEach(function (element) {
117
+ const url = element.getAttribute('wml-openurl');
118
+ const confirm = element.getAttribute('wml-confirm');
119
+ const trigger = element.getAttribute('wml-trigger') || "click";
120
+
121
+ let callback = function () {
122
+ if (confirm) {
123
+ Question({Title: "Confirm", Message:confirm, Buttons:[{Label:"Yes"},{Label:"No", IsDefault:true}]}).then(function (result) {
124
+ if (result !== "No") {
125
+ void OpenURL(url);
126
+ }
127
+ });
128
+ return;
129
+ }
130
+ void OpenURL(url);
131
+ };
132
+
133
+ // Remove existing listeners
134
+ element.removeEventListener(trigger, callback);
135
+
136
+ // Add new listener
137
+ element.addEventListener(trigger, callback);
138
+ });
139
+ }
140
+
141
+ /**
142
+ * Reloads the WML page by adding necessary event listeners and browser listeners.
143
+ *
144
+ * @return {void}
145
+ */
146
+ export function reloadWML() {
147
+ console.log("Reloading WML");
148
+ addWMLEventListeners();
149
+ addWMLWindowListeners();
150
+ addWMLOpenBrowserListener();
151
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "include": ["./src/**/*"],
3
+ "compilerOptions": {
4
+ "lib": [
5
+ "dom",
6
+ "dom.iterable",
7
+ "esnext"
8
+ ],
9
+ "allowJs": true,
10
+ "declaration": true,
11
+ "declarationMap": true,
12
+ "emitDeclarationOnly": true,
13
+ "esModuleInterop": true,
14
+ "module": "esnext",
15
+ "moduleResolution": "node",
16
+ "outDir": "dist",
17
+ "strict": true,
18
+ "target": "es6"
19
+ }
20
+ }
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Hides a certain method by calling the HideMethod function.
3
+ *
4
+ * @return {Promise<void>}
5
+ *
6
+ */
7
+ export function Hide(): Promise<void>;
8
+ /**
9
+ * Calls the ShowMethod and returns the result.
10
+ *
11
+ * @return {Promise<void>}
12
+ */
13
+ export function Show(): Promise<void>;
14
+ /**
15
+ * Calls the QuitMethod to terminate the program.
16
+ *
17
+ * @return {Promise<void>}
18
+ */
19
+ export function Quit(): Promise<void>;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Open a browser window to the given URL
3
+ * @param {string} url - The URL to open
4
+ * @returns {Promise<string>}
5
+ */
6
+ export function OpenURL(url: string): Promise<string>;
@@ -0,0 +1,35 @@
1
+ export function resultHandler(id: any, data: any, isJSON: any): void;
2
+ export function errorHandler(id: any, message: any): void;
3
+ /**
4
+ * Call method.
5
+ *
6
+ * @param {Object} options - The options for the method.
7
+ * @returns {Object} - The result of the call.
8
+ */
9
+ export function Call(options: any): any;
10
+ /**
11
+ * Executes a method by name.
12
+ *
13
+ * @param {string} name - The name of the method in the format 'package.struct.method'.
14
+ * @param {...*} args - The arguments to pass to the method.
15
+ * @throws {Error} If the name is not a string or is not in the correct format.
16
+ * @returns {*} The result of the method execution.
17
+ */
18
+ export function ByName(name: string, ...args: any[]): any;
19
+ /**
20
+ * Calls a method by its ID with the specified arguments.
21
+ *
22
+ * @param {string} methodID - The ID of the method to call.
23
+ * @param {...*} args - The arguments to pass to the method.
24
+ * @return {*} - The result of the method call.
25
+ */
26
+ export function ByID(methodID: string, ...args: any[]): any;
27
+ /**
28
+ * Calls a method on a plugin.
29
+ *
30
+ * @param {string} pluginName - The name of the plugin.
31
+ * @param {string} methodName - The name of the method to call.
32
+ * @param {...*} args - The arguments to pass to the method.
33
+ * @returns {*} - The result of the method call.
34
+ */
35
+ export function Plugin(pluginName: string, methodName: string, ...args: any[]): any;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Sets the text to the Clipboard.
3
+ *
4
+ * @param {string} text - The text to be set to the Clipboard.
5
+ * @return {Promise} - A Promise that resolves when the operation is successful.
6
+ */
7
+ export function SetText(text: string): Promise<any>;
8
+ /**
9
+ * Get the Clipboard text
10
+ * @returns {Promise<string>} A promise that resolves with the text from the Clipboard.
11
+ */
12
+ export function Text(): Promise<string>;
@@ -0,0 +1 @@
1
+ export function setupContextMenus(): void;
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Handles the callback from a dialog.
3
+ *
4
+ * @param {string} id - The ID of the dialog response.
5
+ * @param {string} data - The data received from the dialog.
6
+ * @param {boolean} isJSON - Flag indicating whether the data is in JSON format.
7
+ *
8
+ * @return {undefined}
9
+ */
10
+ export function dialogResultCallback(id: string, data: string, isJSON: boolean): undefined;
11
+ /**
12
+ * Callback function for handling errors in dialog.
13
+ *
14
+ * @param {string} id - The id of the dialog response.
15
+ * @param {string} message - The error message.
16
+ *
17
+ * @return {void}
18
+ */
19
+ export function dialogErrorCallback(id: string, message: string): void;
20
+ export function Info(options: any): Promise<string>;
21
+ export function Warning(options: any): Promise<string>;
22
+ export function Error(options: any): Promise<string>;
23
+ export function Question(options: any): Promise<string>;
24
+ export function OpenFile(options: any): Promise<string[] | string>;
25
+ export function SaveFile(options: any): Promise<string>;
26
+ export type MessageDialogOptions = any;
27
+ export type OpenDialogOptions = any;
28
+ export type SaveDialogOptions = any;
@@ -0,0 +1,4 @@
1
+ export function dragTest(e: any): boolean;
2
+ export function setupDrag(): void;
3
+ export function setResizable(value: any): void;
4
+ export function endDrag(): void;
@@ -0,0 +1,53 @@
1
+ export function dispatchWailsEvent(event: any): void;
2
+ /**
3
+ * Register a callback function to be called multiple times for a specific event.
4
+ *
5
+ * @param {string} eventName - The name of the event to register the callback for.
6
+ * @param {function} callback - The callback function to be called when the event is triggered.
7
+ * @param {number} 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.
8
+ *
9
+ @return {function} - A function that, when called, will unregister the callback from the event.
10
+ */
11
+ export function OnMultiple(eventName: string, callback: Function, maxCallbacks: number): Function;
12
+ /**
13
+ * Registers a callback function to be executed when the specified event occurs.
14
+ *
15
+ * @param {string} eventName - The name of the event.
16
+ * @param {function} callback - The callback function to be executed. It takes no parameters.
17
+ * @return {function} - A function that, when called, will unregister the callback from the event. */
18
+ export function On(eventName: string, callback: Function): Function;
19
+ /**
20
+ * Registers a callback function to be executed only once for the specified event.
21
+ *
22
+ * @param {string} eventName - The name of the event.
23
+ * @param {function} callback - The function to be executed when the event occurs.
24
+ * @return {void@return {function} - A function that, when called, will unregister the callback from the event.
25
+ */
26
+ export function Once(eventName: string, callback: Function): void;
27
+ /**
28
+ * Removes event listeners for the specified event names.
29
+ *
30
+ * @param {string} eventName - The name of the event to remove listeners for.
31
+ * @param {...string} additionalEventNames - Additional event names to remove listeners for.
32
+ * @return {undefined}
33
+ */
34
+ export function Off(eventName: string, ...additionalEventNames: string[]): undefined;
35
+ /**
36
+ * Removes all event listeners.
37
+ *
38
+ * @function OffAll
39
+ * @returns {void}
40
+ */
41
+ export function OffAll(): void;
42
+ /**
43
+ * Emits an event using the given event name.
44
+ *
45
+ * @param {WailsEvent} event - The name of the event to emit.
46
+ * @returns {any} - The result of the emitted event.
47
+ */
48
+ export function Emit(event: WailsEvent): any;
49
+ export class WailsEvent {
50
+ constructor(name: any, data?: any);
51
+ name: any;
52
+ data: any;
53
+ }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Retrieves the value associated with the specified key from the flag map.
3
+ *
4
+ * @param {string} keyString - The key to retrieve the value for.
5
+ * @return {*} - The value associated with the specified key.
6
+ */
7
+ export function GetFlag(keyString: string): any;
@@ -0,0 +1,48 @@
1
+ export namespace Events {
2
+ export { On };
3
+ export { Off };
4
+ export { OnMultiple };
5
+ export { WailsEvent };
6
+ export { OffAll };
7
+ export { Emit };
8
+ export { Once };
9
+ }
10
+ export namespace Call {
11
+ export { Plugin };
12
+ export { ByID };
13
+ export { ByName };
14
+ }
15
+ export namespace Dialogs {
16
+ export { Info };
17
+ export { Error };
18
+ export { OpenFile };
19
+ export { Question };
20
+ export { Warning };
21
+ export { SaveFile };
22
+ }
23
+ import * as Application from "./application";
24
+ import * as Browser from "./browser";
25
+ import * as Clipboard from "./clipboard";
26
+ import * as ContextMenu from "./contextmenu";
27
+ import * as Flags from "./flags";
28
+ import * as Runtime from "./runtime";
29
+ import * as Screens from "./screens";
30
+ import * as System from "./system";
31
+ import * as Window from "./window";
32
+ import { On } from './events';
33
+ import { Off } from './events';
34
+ import { OnMultiple } from './events';
35
+ import { WailsEvent } from './events';
36
+ import { OffAll } from './events';
37
+ import { Emit } from './events';
38
+ import { Once } from './events';
39
+ import { Plugin } from "./calls";
40
+ import { ByID } from "./calls";
41
+ import { ByName } from "./calls";
42
+ import { Info } from "./dialogs";
43
+ import { Error } from "./dialogs";
44
+ import { OpenFile } from "./dialogs";
45
+ import { Question } from "./dialogs";
46
+ import { Warning } from "./dialogs";
47
+ import { SaveFile } from "./dialogs";
48
+ export { Application, Browser, Clipboard, ContextMenu, Flags, Runtime, Screens, System, Window };
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Creates a runtime caller function that invokes a specified method on a given object within a specified window context.
3
+ *
4
+ * @param {Object} object - The object on which the method is to be invoked.
5
+ * @param {string} windowName - The name of the window context in which the method should be called.
6
+ * @returns {Function} A runtime caller function that takes the method name and optionally arguments and invokes the method within the specified window context.
7
+ */
8
+ export function newRuntimeCaller(object: any, windowName: string): Function;
9
+ /**
10
+ * Creates a new runtime caller with specified ID.
11
+ *
12
+ * @param {object} object - The object to invoke the method on.
13
+ * @param {string} windowName - The name of the window.
14
+ * @return {Function} - The new runtime caller function.
15
+ */
16
+ export function newRuntimeCallerWithID(object: object, windowName: string): Function;
17
+ export namespace objectNames {
18
+ let Call: number;
19
+ let Clipboard: number;
20
+ let Application: number;
21
+ let Events: number;
22
+ let ContextMenu: number;
23
+ let Dialog: number;
24
+ let Window: number;
25
+ let Screens: number;
26
+ let System: number;
27
+ let Browser: number;
28
+ }
29
+ export let clientId: string;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Gets all screens.
3
+ * @returns {Promise<Screen[]>} A promise that resolves to an array of Screen objects.
4
+ */
5
+ export function GetAll(): Promise<Screen[]>;
6
+ /**
7
+ * Gets the primary screen.
8
+ * @returns {Promise<Screen>} A promise that resolves to the primary screen.
9
+ */
10
+ export function GetPrimary(): Promise<Screen>;
11
+ /**
12
+ * Gets the current active screen.
13
+ *
14
+ * @returns {Promise<Screen>} A promise that resolves with the current active screen.
15
+ */
16
+ export function GetCurrent(): Promise<Screen>;
17
+ export type Screen = any;
@@ -0,0 +1,72 @@
1
+ /**
2
+ * @function
3
+ * Retrieves the system dark mode status.
4
+ * @returns {Promise<boolean>} - A promise that resolves to a boolean value indicating if the system is in dark mode.
5
+ */
6
+ export function IsDarkMode(): Promise<boolean>;
7
+ /**
8
+ * Fetches the capabilities of the application from the server.
9
+ *
10
+ * @async
11
+ * @function Capabilities
12
+ * @returns {Promise<Object>} A promise that resolves to an object containing the capabilities.
13
+ */
14
+ export function Capabilities(): Promise<any>;
15
+ /**
16
+ * @typedef {object} EnvironmentInfo
17
+ * @property {string} OS - The operating system in use.
18
+ * @property {string} Arch - The architecture of the system.
19
+ */
20
+ /**
21
+ * @function
22
+ * Retrieves environment details.
23
+ * @returns {Promise<EnvironmentInfo>} - A promise that resolves to an object containing OS and system architecture.
24
+ */
25
+ export function Environment(): Promise<EnvironmentInfo>;
26
+ /**
27
+ * Checks if the current operating system is Windows.
28
+ *
29
+ * @return {boolean} True if the operating system is Windows, otherwise false.
30
+ */
31
+ export function IsWindows(): boolean;
32
+ /**
33
+ * Checks if the current operating system is Linux.
34
+ *
35
+ * @returns {boolean} Returns true if the current operating system is Linux, false otherwise.
36
+ */
37
+ export function IsLinux(): boolean;
38
+ /**
39
+ * Checks if the current environment is a macOS operating system.
40
+ *
41
+ * @returns {boolean} True if the environment is macOS, false otherwise.
42
+ */
43
+ export function IsMac(): boolean;
44
+ /**
45
+ * Checks if the current environment architecture is AMD64.
46
+ * @returns {boolean} True if the current environment architecture is AMD64, false otherwise.
47
+ */
48
+ export function IsAMD64(): boolean;
49
+ /**
50
+ * Checks if the current architecture is ARM.
51
+ *
52
+ * @returns {boolean} True if the current architecture is ARM, false otherwise.
53
+ */
54
+ export function IsARM(): boolean;
55
+ /**
56
+ * Checks if the current environment is ARM64 architecture.
57
+ *
58
+ * @returns {boolean} - Returns true if the environment is ARM64 architecture, otherwise returns false.
59
+ */
60
+ export function IsARM64(): boolean;
61
+ export function IsDebug(): boolean;
62
+ export let invoke: any;
63
+ export type EnvironmentInfo = {
64
+ /**
65
+ * - The operating system in use.
66
+ */
67
+ OS: string;
68
+ /**
69
+ * - The architecture of the system.
70
+ */
71
+ Arch: string;
72
+ };
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Gets the specified window.
3
+ *
4
+ * @param {string} windowName - The name of the window to get.
5
+ * @return {Object} - The specified window object.
6
+ */
7
+ export function Get(windowName: string): any;
8
+ /**
9
+ * Returns a map of all methods in the current window.
10
+ * @returns {Map} - A map of window methods.
11
+ */
12
+ export function WindowMethods(targetWindow: any): Map<any, any>;
13
+ declare const _default: any;
14
+ export default _default;
15
+ export type Size = any;
16
+ export type Position = any;
17
+ export type Screen = any;
package/types/wml.d.ts ADDED
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Reloads the WML page by adding necessary event listeners and browser listeners.
3
+ *
4
+ * @return {void}
5
+ */
6
+ export function reloadWML(): void;