@wailsio/runtime 3.0.0-alpha.65 → 3.0.0-alpha.66

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 (142) hide show
  1. package/{src → dist}/application.js +2 -16
  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/{src → dist}/create.js +2 -33
  9. package/dist/dialogs.js +134 -0
  10. package/dist/drag.js +222 -0
  11. package/dist/event_types.js +229 -0
  12. package/dist/events.js +101 -0
  13. package/dist/flags.js +23 -0
  14. package/dist/index.js +38 -0
  15. package/dist/listener.js +44 -0
  16. package/{src → dist}/nanoid.js +7 -11
  17. package/dist/runtime.js +63 -0
  18. package/dist/screens.js +38 -0
  19. package/dist/system.js +116 -0
  20. package/{src → dist}/utils.js +29 -20
  21. package/dist/window.js +438 -0
  22. package/{src → dist}/wml.js +51 -122
  23. package/package.json +43 -19
  24. package/types/application.d.ts +3 -10
  25. package/types/browser.d.ts +4 -4
  26. package/types/callable.d.ts +3 -0
  27. package/types/calls.d.ts +43 -49
  28. package/types/cancellable.d.ts +434 -0
  29. package/types/clipboard.d.ts +6 -5
  30. package/types/contextmenu.d.ts +1 -0
  31. package/types/create.d.ts +6 -27
  32. package/types/dialogs.d.ts +99 -143
  33. package/types/drag.d.ts +1 -0
  34. package/types/event_types.d.ts +218 -219
  35. package/types/events.d.ts +45 -250
  36. package/types/flags.d.ts +3 -3
  37. package/types/index.d.ts +16 -14
  38. package/types/listener.d.ts +9 -0
  39. package/types/nanoid.d.ts +1 -1
  40. package/types/runtime.d.ts +18 -26
  41. package/types/screens.d.ts +42 -76
  42. package/types/system.d.ts +50 -79
  43. package/types/utils.d.ts +15 -8
  44. package/types/window.d.ts +110 -225
  45. package/types/wml.d.ts +2 -6
  46. package/docs/.nojekyll +0 -1
  47. package/docs/assets/highlight.css +0 -22
  48. package/docs/assets/icons.js +0 -15
  49. package/docs/assets/icons.svg +0 -1
  50. package/docs/assets/main.js +0 -59
  51. package/docs/assets/navigation.js +0 -1
  52. package/docs/assets/search.js +0 -1
  53. package/docs/assets/style.css +0 -1415
  54. package/docs/classes/Call.RuntimeError.html +0 -11
  55. package/docs/classes/Events.WailsEvent.html +0 -4
  56. package/docs/functions/Application.Hide.html +0 -2
  57. package/docs/functions/Application.Quit.html +0 -2
  58. package/docs/functions/Application.Show.html +0 -2
  59. package/docs/functions/Browser.OpenURL.html +0 -3
  60. package/docs/functions/Call.ByID.html +0 -8
  61. package/docs/functions/Call.ByName.html +0 -6
  62. package/docs/functions/Call.Call.html +0 -11
  63. package/docs/functions/Clipboard.SetText.html +0 -6
  64. package/docs/functions/Clipboard.Text.html +0 -3
  65. package/docs/functions/Create.Any.html +0 -2
  66. package/docs/functions/Create.Array.html +0 -4
  67. package/docs/functions/Create.ByteSlice.html +0 -3
  68. package/docs/functions/Create.Map.html +0 -4
  69. package/docs/functions/Create.Nullable.html +0 -3
  70. package/docs/functions/Create.Struct.html +0 -3
  71. package/docs/functions/Dialogs.Error.html +0 -5
  72. package/docs/functions/Dialogs.Info.html +0 -5
  73. package/docs/functions/Dialogs.OpenFile.html +0 -3
  74. package/docs/functions/Dialogs.Question.html +0 -5
  75. package/docs/functions/Dialogs.SaveFile.html +0 -3
  76. package/docs/functions/Dialogs.Warning.html +0 -5
  77. package/docs/functions/Events.Emit.html +0 -6
  78. package/docs/functions/Events.Off.html +0 -4
  79. package/docs/functions/Events.OffAll.html +0 -3
  80. package/docs/functions/Events.On.html +0 -7
  81. package/docs/functions/Events.OnMultiple.html +0 -8
  82. package/docs/functions/Events.Once.html +0 -7
  83. package/docs/functions/Events.setup.html +0 -1
  84. package/docs/functions/Flags.GetFlag.html +0 -6
  85. package/docs/functions/Screens.GetAll.html +0 -3
  86. package/docs/functions/Screens.GetCurrent.html +0 -3
  87. package/docs/functions/Screens.GetPrimary.html +0 -3
  88. package/docs/functions/System.Capabilities.html +0 -4
  89. package/docs/functions/System.Environment.html +0 -5
  90. package/docs/functions/System.IsAMD64.html +0 -3
  91. package/docs/functions/System.IsARM.html +0 -3
  92. package/docs/functions/System.IsARM64.html +0 -5
  93. package/docs/functions/System.IsDarkMode.html +0 -5
  94. package/docs/functions/System.IsDebug.html +0 -1
  95. package/docs/functions/System.IsLinux.html +0 -3
  96. package/docs/functions/System.IsMac.html +0 -3
  97. package/docs/functions/System.IsWindows.html +0 -3
  98. package/docs/functions/System.invoke.html +0 -1
  99. package/docs/functions/WML.Enable.html +0 -2
  100. package/docs/functions/WML.Reload.html +0 -2
  101. package/docs/functions/init.html +0 -1
  102. package/docs/index.html +0 -5
  103. package/docs/interfaces/Call.CallOptions.html +0 -7
  104. package/docs/interfaces/Dialogs.Button.html +0 -7
  105. package/docs/interfaces/Dialogs.FileFilter.html +0 -5
  106. package/docs/interfaces/Dialogs.MessageDialogOptions.html +0 -9
  107. package/docs/interfaces/Dialogs.OpenFileDialogOptions.html +0 -33
  108. package/docs/interfaces/Dialogs.SaveFileDialogOptions.html +0 -35
  109. package/docs/interfaces/Screens.Rect.html +0 -9
  110. package/docs/interfaces/Screens.Screen.html +0 -25
  111. package/docs/interfaces/Screens.Size.html +0 -5
  112. package/docs/interfaces/System.EnvironmentInfo.html +0 -11
  113. package/docs/interfaces/System.OSInfo.html +0 -9
  114. package/docs/modules/Application.html +0 -4
  115. package/docs/modules/Browser.html +0 -2
  116. package/docs/modules/Call.html +0 -6
  117. package/docs/modules/Clipboard.html +0 -3
  118. package/docs/modules/Create.html +0 -7
  119. package/docs/modules/Dialogs.html +0 -12
  120. package/docs/modules/Events.html +0 -10
  121. package/docs/modules/Flags.html +0 -2
  122. package/docs/modules/Screens.html +0 -7
  123. package/docs/modules/System.html +0 -14
  124. package/docs/modules/WML.html +0 -3
  125. package/docs/modules.html +0 -14
  126. package/docs/variables/Events.Types.html +0 -1
  127. package/docs/variables/Window.html +0 -2
  128. package/src/browser.js +0 -24
  129. package/src/calls.js +0 -221
  130. package/src/clipboard.js +0 -35
  131. package/src/contextmenu.js +0 -97
  132. package/src/dialogs.js +0 -200
  133. package/src/drag.js +0 -119
  134. package/src/event_types.js +0 -219
  135. package/src/events.js +0 -140
  136. package/src/flags.js +0 -25
  137. package/src/index.js +0 -60
  138. package/src/runtime.js +0 -92
  139. package/src/screens.js +0 -71
  140. package/src/system.js +0 -143
  141. package/src/window.js +0 -638
  142. package/tsconfig.json +0 -20
package/types/system.d.ts CHANGED
@@ -1,112 +1,83 @@
1
- export function invoke(msg: any): any;
1
+ export declare function invoke(msg: any): void;
2
2
  /**
3
- * @function
4
3
  * Retrieves the system dark mode status.
5
- * @returns {Promise<boolean>} - A promise that resolves to a boolean value indicating if the system is in dark mode.
4
+ *
5
+ * @returns A promise that resolves to a boolean value indicating if the system is in dark mode.
6
6
  */
7
- export function IsDarkMode(): Promise<boolean>;
7
+ export declare function IsDarkMode(): Promise<boolean>;
8
8
  /**
9
9
  * Fetches the capabilities of the application from the server.
10
10
  *
11
- * @async
12
- * @function Capabilities
13
- * @returns {Promise<Object>} A promise that resolves to an object containing the capabilities.
14
- */
15
- export function Capabilities(): Promise<any>;
16
- /**
17
- * @typedef {Object} OSInfo
18
- * @property {string} Branding - The branding of the OS.
19
- * @property {string} ID - The ID of the OS.
20
- * @property {string} Name - The name of the OS.
21
- * @property {string} Version - The version of the OS.
22
- */
23
- /**
24
- * @typedef {Object} EnvironmentInfo
25
- * @property {string} Arch - The architecture of the system.
26
- * @property {boolean} Debug - True if the application is running in debug mode, otherwise false.
27
- * @property {string} OS - The operating system in use.
28
- * @property {OSInfo} OSInfo - Details of the operating system.
29
- * @property {Object} PlatformInfo - Additional platform information.
11
+ * @returns A promise that resolves to an object containing the capabilities.
30
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
+ }
31
36
  /**
32
- * @function
33
37
  * Retrieves environment details.
34
- * @returns {Promise<EnvironmentInfo>} - A promise that resolves to an object containing OS and system architecture.
38
+ *
39
+ * @returns A promise that resolves to an object containing OS and system architecture.
35
40
  */
36
- export function Environment(): Promise<EnvironmentInfo>;
41
+ export declare function Environment(): Promise<EnvironmentInfo>;
37
42
  /**
38
43
  * Checks if the current operating system is Windows.
39
44
  *
40
- * @return {boolean} True if the operating system is Windows, otherwise false.
45
+ * @return True if the operating system is Windows, otherwise false.
41
46
  */
42
- export function IsWindows(): boolean;
47
+ export declare function IsWindows(): boolean;
43
48
  /**
44
49
  * Checks if the current operating system is Linux.
45
50
  *
46
- * @returns {boolean} Returns true if the current operating system is Linux, false otherwise.
51
+ * @returns Returns true if the current operating system is Linux, false otherwise.
47
52
  */
48
- export function IsLinux(): boolean;
53
+ export declare function IsLinux(): boolean;
49
54
  /**
50
55
  * Checks if the current environment is a macOS operating system.
51
56
  *
52
- * @returns {boolean} True if the environment is macOS, false otherwise.
57
+ * @returns True if the environment is macOS, false otherwise.
53
58
  */
54
- export function IsMac(): boolean;
59
+ export declare function IsMac(): boolean;
55
60
  /**
56
61
  * Checks if the current environment architecture is AMD64.
57
- * @returns {boolean} True if the current environment architecture is AMD64, false otherwise.
62
+ *
63
+ * @returns True if the current environment architecture is AMD64, false otherwise.
58
64
  */
59
- export function IsAMD64(): boolean;
65
+ export declare function IsAMD64(): boolean;
60
66
  /**
61
67
  * Checks if the current architecture is ARM.
62
68
  *
63
- * @returns {boolean} True if the current architecture is ARM, false otherwise.
69
+ * @returns True if the current architecture is ARM, false otherwise.
64
70
  */
65
- export function IsARM(): boolean;
71
+ export declare function IsARM(): boolean;
66
72
  /**
67
73
  * Checks if the current environment is ARM64 architecture.
68
74
  *
69
- * @returns {boolean} - Returns true if the environment is ARM64 architecture, otherwise returns false.
75
+ * @returns Returns true if the environment is ARM64 architecture, otherwise returns false.
70
76
  */
71
- export function IsARM64(): boolean;
72
- export function IsDebug(): boolean;
73
- export type OSInfo = {
74
- /**
75
- * - The branding of the OS.
76
- */
77
- Branding: string;
78
- /**
79
- * - The ID of the OS.
80
- */
81
- ID: string;
82
- /**
83
- * - The name of the OS.
84
- */
85
- Name: string;
86
- /**
87
- * - The version of the OS.
88
- */
89
- Version: string;
90
- };
91
- export type EnvironmentInfo = {
92
- /**
93
- * - The architecture of the system.
94
- */
95
- Arch: string;
96
- /**
97
- * - True if the application is running in debug mode, otherwise false.
98
- */
99
- Debug: boolean;
100
- /**
101
- * - The operating system in use.
102
- */
103
- OS: string;
104
- /**
105
- * - Details of the operating system.
106
- */
107
- OSInfo: OSInfo;
108
- /**
109
- * - Additional platform information.
110
- */
111
- PlatformInfo: any;
112
- };
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;
package/types/utils.d.ts CHANGED
@@ -1,14 +1,21 @@
1
1
  /**
2
2
  * Logs a message to the console with custom formatting.
3
- * @param {string} message - The message to be logged.
4
- * @return {void}
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!
5
10
  */
6
- export function debugLog(message: string): void;
11
+ export declare function canTrackButtons(): boolean;
7
12
  /**
8
13
  * Checks whether the browser supports removing listeners by triggering an AbortSignal
9
- * (see https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#signal)
10
- *
11
- * @return {boolean}
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.
12
19
  */
13
- export function canAbortListeners(): boolean;
14
- export function whenReady(callback: any): void;
20
+ export declare function eventTarget(event: Event): HTMLElement;
21
+ export declare function whenReady(callback: () => void): void;