@wailsio/runtime 3.0.0-alpha.15 → 3.0.0-alpha.16

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wailsio/runtime",
3
- "version": "3.0.0-alpha.15",
3
+ "version": "3.0.0-alpha.16",
4
4
  "description": "Wails Runtime",
5
5
  "main": "src/index.js",
6
6
  "types": "types/index.d.ts",
package/src/screens.js CHANGED
@@ -10,6 +10,33 @@ The electron alternative for Go
10
10
 
11
11
  /* jshint esversion: 9 */
12
12
 
13
+ /**
14
+ * @typedef {Object} Position
15
+ * @property {number} X - The X coordinate.
16
+ * @property {number} Y - The Y coordinate.
17
+ */
18
+
19
+ /**
20
+ * @typedef {Object} Size
21
+ * @property {number} X - The width.
22
+ * @property {number} Y - The height.
23
+ */
24
+
25
+
26
+ /**
27
+ * @typedef {Object} Rect
28
+ * @property {number} X - The X coordinate of the top-left corner.
29
+ * @property {number} Y - The Y coordinate of the top-left corner.
30
+ * @property {number} Width - The width of the rectangle.
31
+ * @property {number} Height - The height of the rectangle.
32
+ */
33
+
34
+
35
+ /**
36
+ * @typedef {('Zero'|'Ninety'|'OneEighty'|'TwoSeventy')} Rotation
37
+ * The rotation of the screen. Can be one of 'Zero', 'Ninety', 'OneEighty', 'TwoSeventy'.
38
+ */
39
+
13
40
 
14
41
  /**
15
42
  * @typedef {Object} Screen
package/src/window.js CHANGED
@@ -15,33 +15,6 @@ The electron alternative for Go
15
15
  * @typedef {import("./screens").Screen} Screen
16
16
  */
17
17
 
18
- /**
19
- * @typedef {Object} Position
20
- * @property {number} X - The X coordinate.
21
- * @property {number} Y - The Y coordinate.
22
- */
23
-
24
- /**
25
- * @typedef {Object} Size
26
- * @property {number} X - The width.
27
- * @property {number} Y - The height.
28
- */
29
-
30
-
31
- /**
32
- * @typedef {Object} Rect
33
- * @property {number} X - The X coordinate of the top-left corner.
34
- * @property {number} Y - The Y coordinate of the top-left corner.
35
- * @property {number} Width - The width of the rectangle.
36
- * @property {number} Height - The height of the rectangle.
37
- */
38
-
39
- /**
40
- * @typedef {('Zero'|'Ninety'|'OneEighty'|'TwoSeventy')} Rotation
41
- * The rotation of the screen. Can be one of 'Zero', 'Ninety', 'OneEighty', 'TwoSeventy'.
42
- */
43
-
44
-
45
18
  import {newRuntimeCallerWithID, objectNames} from "./runtime";
46
19
 
47
20
  const center = 0;
@@ -14,6 +14,48 @@ export function GetPrimary(): Promise<Screen>;
14
14
  * @returns {Promise<Screen>} A promise that resolves with the current active screen.
15
15
  */
16
16
  export function GetCurrent(): Promise<Screen>;
17
+ export type Position = {
18
+ /**
19
+ * - The X coordinate.
20
+ */
21
+ X: number;
22
+ /**
23
+ * - The Y coordinate.
24
+ */
25
+ Y: number;
26
+ };
27
+ export type Size = {
28
+ /**
29
+ * - The width.
30
+ */
31
+ X: number;
32
+ /**
33
+ * - The height.
34
+ */
35
+ Y: number;
36
+ };
37
+ export type Rect = {
38
+ /**
39
+ * - The X coordinate of the top-left corner.
40
+ */
41
+ X: number;
42
+ /**
43
+ * - The Y coordinate of the top-left corner.
44
+ */
45
+ Y: number;
46
+ /**
47
+ * - The width of the rectangle.
48
+ */
49
+ Width: number;
50
+ /**
51
+ * - The height of the rectangle.
52
+ */
53
+ Height: number;
54
+ };
55
+ /**
56
+ * The rotation of the screen. Can be one of 'Zero', 'Ninety', 'OneEighty', 'TwoSeventy'.
57
+ */
58
+ export type Rotation = ('Zero' | 'Ninety' | 'OneEighty' | 'TwoSeventy');
17
59
  export type Screen = {
18
60
  /**
19
61
  * - Unique identifier for the screen.
package/types/window.d.ts CHANGED
@@ -28,16 +28,6 @@ export function SetSize(width: number, height: number): void;
28
28
  * Gets the size of the window.
29
29
  */
30
30
  export function Size(): any;
31
- export type Size = {
32
- /**
33
- * - The width.
34
- */
35
- X: number;
36
- /**
37
- * - The height.
38
- */
39
- Y: number;
40
- };
41
31
  /**
42
32
  * Sets the maximum size of the window.
43
33
  * @param {number} width - The maximum width of the window.
@@ -148,35 +138,3 @@ export function GetZoomLevel(): any;
148
138
  * @param {number} zoomLevel - The zoom level to set.
149
139
  */
150
140
  export function SetZoomLevel(zoomLevel: number): void;
151
- export type Position = {
152
- /**
153
- * - The X coordinate.
154
- */
155
- X: number;
156
- /**
157
- * - The Y coordinate.
158
- */
159
- Y: number;
160
- };
161
- export type Rect = {
162
- /**
163
- * - The X coordinate of the top-left corner.
164
- */
165
- X: number;
166
- /**
167
- * - The Y coordinate of the top-left corner.
168
- */
169
- Y: number;
170
- /**
171
- * - The width of the rectangle.
172
- */
173
- Width: number;
174
- /**
175
- * - The height of the rectangle.
176
- */
177
- Height: number;
178
- };
179
- /**
180
- * The rotation of the screen. Can be one of 'Zero', 'Ninety', 'OneEighty', 'TwoSeventy'.
181
- */
182
- export type Rotation = ('Zero' | 'Ninety' | 'OneEighty' | 'TwoSeventy');