@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 +4 -4
- package/dist-js/index.d.ts +1 -1
- package/dist-js/index.js +4 -4
- package/package.json +2 -2
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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;
|
package/dist-js/index.d.ts
CHANGED
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
+
"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.
|
|
24
|
+
"@tauri-apps/api": "2.0.0-beta.11"
|
|
25
25
|
},
|
|
26
26
|
"scripts": {
|
|
27
27
|
"build": "rollup -c"
|