@tauri-apps/plugin-window-state 2.0.0-alpha.0 → 2.0.0-alpha.1
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/README.md +1 -1
- package/dist-js/index.min.js +5 -3
- package/dist-js/index.mjs +5 -3
- package/package.json +3 -3
package/README.md
CHANGED
package/dist-js/index.min.js
CHANGED
|
@@ -15,13 +15,15 @@ var StateFlags;
|
|
|
15
15
|
* Save the state of all open windows to disk.
|
|
16
16
|
*/
|
|
17
17
|
async function saveWindowState(flags) {
|
|
18
|
-
window.__TAURI_INVOKE__("plugin:window-state|save_window_state", {
|
|
18
|
+
return window.__TAURI_INVOKE__("plugin:window-state|save_window_state", {
|
|
19
|
+
flags,
|
|
20
|
+
});
|
|
19
21
|
}
|
|
20
22
|
/**
|
|
21
23
|
* Restore the state for the specified window from disk.
|
|
22
24
|
*/
|
|
23
25
|
async function restoreState(label, flags) {
|
|
24
|
-
window.__TAURI_INVOKE__("plugin:window-state|restore_state", {
|
|
26
|
+
return window.__TAURI_INVOKE__("plugin:window-state|restore_state", {
|
|
25
27
|
label,
|
|
26
28
|
flags,
|
|
27
29
|
});
|
|
@@ -30,7 +32,7 @@ async function restoreState(label, flags) {
|
|
|
30
32
|
* Restore the state for the current window from disk.
|
|
31
33
|
*/
|
|
32
34
|
async function restoreStateCurrent(flags) {
|
|
33
|
-
restoreState(window.__TAURI_METADATA__.__currentWindow.label, flags);
|
|
35
|
+
return restoreState(window.__TAURI_METADATA__.__currentWindow.label, flags);
|
|
34
36
|
}
|
|
35
37
|
|
|
36
38
|
export { StateFlags, restoreState, restoreStateCurrent, saveWindowState };
|
package/dist-js/index.mjs
CHANGED
|
@@ -15,13 +15,15 @@ var StateFlags;
|
|
|
15
15
|
* Save the state of all open windows to disk.
|
|
16
16
|
*/
|
|
17
17
|
async function saveWindowState(flags) {
|
|
18
|
-
window.__TAURI_INVOKE__("plugin:window-state|save_window_state", {
|
|
18
|
+
return window.__TAURI_INVOKE__("plugin:window-state|save_window_state", {
|
|
19
|
+
flags,
|
|
20
|
+
});
|
|
19
21
|
}
|
|
20
22
|
/**
|
|
21
23
|
* Restore the state for the specified window from disk.
|
|
22
24
|
*/
|
|
23
25
|
async function restoreState(label, flags) {
|
|
24
|
-
window.__TAURI_INVOKE__("plugin:window-state|restore_state", {
|
|
26
|
+
return window.__TAURI_INVOKE__("plugin:window-state|restore_state", {
|
|
25
27
|
label,
|
|
26
28
|
flags,
|
|
27
29
|
});
|
|
@@ -30,7 +32,7 @@ async function restoreState(label, flags) {
|
|
|
30
32
|
* Restore the state for the current window from disk.
|
|
31
33
|
*/
|
|
32
34
|
async function restoreStateCurrent(flags) {
|
|
33
|
-
restoreState(window.__TAURI_METADATA__.__currentWindow.label, flags);
|
|
35
|
+
return restoreState(window.__TAURI_METADATA__.__currentWindow.label, flags);
|
|
34
36
|
}
|
|
35
37
|
|
|
36
38
|
export { StateFlags, 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-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.1",
|
|
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": [
|
|
@@ -22,10 +22,10 @@
|
|
|
22
22
|
"LICENSE"
|
|
23
23
|
],
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"tslib": "
|
|
25
|
+
"tslib": "2.6.0"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@tauri-apps/api": "2.0.0-alpha.
|
|
28
|
+
"@tauri-apps/api": "2.0.0-alpha.6"
|
|
29
29
|
},
|
|
30
30
|
"scripts": {
|
|
31
31
|
"build": "rollup -c"
|