@tauri-apps/plugin-window-state 2.0.0-beta.3 → 2.0.0-beta.4

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-js/index.cjs CHANGED
@@ -20,25 +20,25 @@ exports.StateFlags = void 0;
20
20
  * Save the state of all open windows to disk.
21
21
  */
22
22
  async function saveWindowState(flags) {
23
- return core.invoke("plugin:window-state|save_window_state", { flags });
23
+ await core.invoke("plugin:window-state|save_window_state", { flags });
24
24
  }
25
25
  /**
26
26
  * Restore the state for the specified window from disk.
27
27
  */
28
28
  async function restoreState(label, flags) {
29
- return core.invoke("plugin:window-state|restore_state", { label, flags });
29
+ await core.invoke("plugin:window-state|restore_state", { label, flags });
30
30
  }
31
31
  /**
32
32
  * Restore the state for the current window from disk.
33
33
  */
34
34
  async function restoreStateCurrent(flags) {
35
- return restoreState(window.getCurrent().label, flags);
35
+ await restoreState(window.getCurrent().label, flags);
36
36
  }
37
37
  /**
38
38
  * Get the name of the file used to store window state.
39
39
  */
40
40
  async function filename() {
41
- return core.invoke("plugin:window-state|filename");
41
+ return await core.invoke("plugin:window-state|filename");
42
42
  }
43
43
 
44
44
  exports.filename = filename;
@@ -1,4 +1,4 @@
1
- import { WindowLabel } from "@tauri-apps/api/window";
1
+ import { type WindowLabel } from "@tauri-apps/api/window";
2
2
  export declare enum StateFlags {
3
3
  SIZE = 1,
4
4
  POSITION = 2,
package/dist-js/index.js CHANGED
@@ -18,25 +18,25 @@ var StateFlags;
18
18
  * Save the state of all open windows to disk.
19
19
  */
20
20
  async function saveWindowState(flags) {
21
- return invoke("plugin:window-state|save_window_state", { flags });
21
+ await invoke("plugin:window-state|save_window_state", { flags });
22
22
  }
23
23
  /**
24
24
  * Restore the state for the specified window from disk.
25
25
  */
26
26
  async function restoreState(label, flags) {
27
- return invoke("plugin:window-state|restore_state", { label, flags });
27
+ await invoke("plugin:window-state|restore_state", { label, flags });
28
28
  }
29
29
  /**
30
30
  * Restore the state for the current window from disk.
31
31
  */
32
32
  async function restoreStateCurrent(flags) {
33
- return restoreState(getCurrent().label, flags);
33
+ await restoreState(getCurrent().label, flags);
34
34
  }
35
35
  /**
36
36
  * Get the name of the file used to store window state.
37
37
  */
38
38
  async function filename() {
39
- return invoke("plugin:window-state|filename");
39
+ return await invoke("plugin:window-state|filename");
40
40
  }
41
41
 
42
42
  export { StateFlags, filename, restoreState, restoreStateCurrent, saveWindowState };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tauri-apps/plugin-window-state",
3
- "version": "2.0.0-beta.3",
3
+ "version": "2.0.0-beta.4",
4
4
  "description": "Save window positions and sizes and restore them when the app is reopened.",
5
5
  "license": "MIT or APACHE-2.0",
6
6
  "authors": [
@@ -21,7 +21,7 @@
21
21
  "LICENSE"
22
22
  ],
23
23
  "dependencies": {
24
- "@tauri-apps/api": "2.0.0-beta.8"
24
+ "@tauri-apps/api": "2.0.0-beta.11"
25
25
  },
26
26
  "scripts": {
27
27
  "build": "rollup -c"