diff --git a/plugins/autostart/package.json b/plugins/autostart/package.json index 9b9f54f61..b6ad5765a 100644 --- a/plugins/autostart/package.json +++ b/plugins/autostart/package.json @@ -24,6 +24,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "^2.0.0-rc.4" + "@tauri-apps/api": "^2.0.0-rc.6" } } diff --git a/plugins/barcode-scanner/package.json b/plugins/barcode-scanner/package.json index ec01ad216..eb3fa4fea 100644 --- a/plugins/barcode-scanner/package.json +++ b/plugins/barcode-scanner/package.json @@ -25,6 +25,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "^2.0.0-rc.4" + "@tauri-apps/api": "^2.0.0-rc.6" } } diff --git a/plugins/biometric/package.json b/plugins/biometric/package.json index 9465cb262..74ba15932 100644 --- a/plugins/biometric/package.json +++ b/plugins/biometric/package.json @@ -25,6 +25,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "^2.0.0-rc.4" + "@tauri-apps/api": "^2.0.0-rc.6" } } diff --git a/plugins/cli/package.json b/plugins/cli/package.json index 09a486186..77b705bf3 100644 --- a/plugins/cli/package.json +++ b/plugins/cli/package.json @@ -24,6 +24,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "^2.0.0-rc.4" + "@tauri-apps/api": "^2.0.0-rc.6" } } diff --git a/plugins/clipboard-manager/package.json b/plugins/clipboard-manager/package.json index a5fb15e9c..572d0636f 100644 --- a/plugins/clipboard-manager/package.json +++ b/plugins/clipboard-manager/package.json @@ -24,6 +24,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "^2.0.0-rc.4" + "@tauri-apps/api": "^2.0.0-rc.6" } } diff --git a/plugins/deep-link/package.json b/plugins/deep-link/package.json index 11faee2b6..7f5bb3428 100644 --- a/plugins/deep-link/package.json +++ b/plugins/deep-link/package.json @@ -25,6 +25,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "^2.0.0-rc.4" + "@tauri-apps/api": "^2.0.0-rc.6" } } diff --git a/plugins/dialog/package.json b/plugins/dialog/package.json index 41a809994..c12835d00 100644 --- a/plugins/dialog/package.json +++ b/plugins/dialog/package.json @@ -24,6 +24,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "^2.0.0-rc.4" + "@tauri-apps/api": "^2.0.0-rc.6" } } diff --git a/plugins/fs/package.json b/plugins/fs/package.json index 7fd93a027..67f7fa1b8 100644 --- a/plugins/fs/package.json +++ b/plugins/fs/package.json @@ -25,6 +25,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "^2.0.0-rc.4" + "@tauri-apps/api": "^2.0.0-rc.6" } } diff --git a/plugins/geolocation/package.json b/plugins/geolocation/package.json index c846a61d0..01f21fee1 100644 --- a/plugins/geolocation/package.json +++ b/plugins/geolocation/package.json @@ -24,6 +24,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "^2.0.0-rc.4" + "@tauri-apps/api": "^2.0.0-rc.6" } } diff --git a/plugins/global-shortcut/package.json b/plugins/global-shortcut/package.json index e0ecf02b4..6ccc82162 100644 --- a/plugins/global-shortcut/package.json +++ b/plugins/global-shortcut/package.json @@ -24,6 +24,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "^2.0.0-rc.4" + "@tauri-apps/api": "^2.0.0-rc.6" } } diff --git a/plugins/haptics/package.json b/plugins/haptics/package.json index 661b946eb..07e823208 100644 --- a/plugins/haptics/package.json +++ b/plugins/haptics/package.json @@ -24,6 +24,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "^2.0.0-rc.4" + "@tauri-apps/api": "^2.0.0-rc.6" } } diff --git a/plugins/http/package.json b/plugins/http/package.json index c58dd8af3..82ee3ea66 100644 --- a/plugins/http/package.json +++ b/plugins/http/package.json @@ -24,6 +24,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "^2.0.0-rc.4" + "@tauri-apps/api": "^2.0.0-rc.6" } } diff --git a/plugins/log/package.json b/plugins/log/package.json index 94fee1fc2..c56b34456 100644 --- a/plugins/log/package.json +++ b/plugins/log/package.json @@ -25,6 +25,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "^2.0.0-rc.4" + "@tauri-apps/api": "^2.0.0-rc.6" } } diff --git a/plugins/nfc/package.json b/plugins/nfc/package.json index ee2fa2a4b..7a50a6fd1 100644 --- a/plugins/nfc/package.json +++ b/plugins/nfc/package.json @@ -25,6 +25,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "^2.0.0-rc.4" + "@tauri-apps/api": "^2.0.0-rc.6" } } diff --git a/plugins/notification/package.json b/plugins/notification/package.json index edee71188..d91f0cdb9 100644 --- a/plugins/notification/package.json +++ b/plugins/notification/package.json @@ -24,6 +24,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "^2.0.0-rc.4" + "@tauri-apps/api": "^2.0.0-rc.6" } } diff --git a/plugins/os/package.json b/plugins/os/package.json index fd3b8e756..d87598267 100644 --- a/plugins/os/package.json +++ b/plugins/os/package.json @@ -24,6 +24,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "^2.0.0-rc.4" + "@tauri-apps/api": "^2.0.0-rc.6" } } diff --git a/plugins/positioner/README.md b/plugins/positioner/README.md index 3652c162e..05a9b7f96 100644 --- a/plugins/positioner/README.md +++ b/plugins/positioner/README.md @@ -102,8 +102,8 @@ import { const action = async (event: TrayIconEvent) => { // add the handle in the action to update the state await handleIconState(event); - if ("click" in event) { - const { click } = event; + + if (event.type === "Click") { // note this option requires enabling the `tray-icon` // feature in the Cargo.toml await moveWindow(Position.TrayLeft); diff --git a/plugins/positioner/api-iife.js b/plugins/positioner/api-iife.js index 5504ebe87..bce8ee32f 100644 --- a/plugins/positioner/api-iife.js +++ b/plugins/positioner/api-iife.js @@ -1 +1 @@ -if("__TAURI__"in window){var __TAURI_PLUGIN_POSITIONER__=function(t){"use strict";async function o(t,o={},e){return window.__TAURI_INTERNALS__.invoke(t,o,e)}var e;return"function"==typeof SuppressedError&&SuppressedError,t.Position=void 0,(e=t.Position||(t.Position={}))[e.TopLeft=0]="TopLeft",e[e.TopRight=1]="TopRight",e[e.BottomLeft=2]="BottomLeft",e[e.BottomRight=3]="BottomRight",e[e.TopCenter=4]="TopCenter",e[e.BottomCenter=5]="BottomCenter",e[e.LeftCenter=6]="LeftCenter",e[e.RightCenter=7]="RightCenter",e[e.Center=8]="Center",e[e.TrayLeft=9]="TrayLeft",e[e.TrayBottomLeft=10]="TrayBottomLeft",e[e.TrayRight=11]="TrayRight",e[e.TrayBottomRight=12]="TrayBottomRight",e[e.TrayCenter=13]="TrayCenter",e[e.TrayBottomCenter=14]="TrayBottomCenter",t.handleIconState=async function(t){await async function(t){await o("plugin:positioner|set_tray_icon_state",{position:t.position,size:t.size})}(t.rect)},t.moveWindow=async function(t){await o("plugin:positioner|move_window",{position:t})},t}({});Object.defineProperty(window.__TAURI__,"positioner",{value:__TAURI_PLUGIN_POSITIONER__})} +if("__TAURI__"in window){var __TAURI_PLUGIN_POSITIONER__=function(t){"use strict";async function e(t,e={},o){return window.__TAURI_INTERNALS__.invoke(t,e,o)}var o;return"function"==typeof SuppressedError&&SuppressedError,t.Position=void 0,(o=t.Position||(t.Position={}))[o.TopLeft=0]="TopLeft",o[o.TopRight=1]="TopRight",o[o.BottomLeft=2]="BottomLeft",o[o.BottomRight=3]="BottomRight",o[o.TopCenter=4]="TopCenter",o[o.BottomCenter=5]="BottomCenter",o[o.LeftCenter=6]="LeftCenter",o[o.RightCenter=7]="RightCenter",o[o.Center=8]="Center",o[o.TrayLeft=9]="TrayLeft",o[o.TrayBottomLeft=10]="TrayBottomLeft",o[o.TrayRight=11]="TrayRight",o[o.TrayBottomRight=12]="TrayBottomRight",o[o.TrayCenter=13]="TrayCenter",o[o.TrayBottomCenter=14]="TrayBottomCenter",t.handleIconState=async function(t){const o={};o[`${t.rect.size.type}`]={width:t.rect.size.width,height:t.rect.size.height};const i={};i[`${t.rect.position.type}`]={x:t.rect.position.x,y:t.rect.position.y},await e("plugin:positioner|set_tray_icon_state",{position:i,size:o})},t.moveWindow=async function(t){await e("plugin:positioner|move_window",{position:t})},t}({});Object.defineProperty(window.__TAURI__,"positioner",{value:__TAURI_PLUGIN_POSITIONER__})} diff --git a/plugins/positioner/guest-js/index.ts b/plugins/positioner/guest-js/index.ts index 319f80db6..8ba1d609f 100644 --- a/plugins/positioner/guest-js/index.ts +++ b/plugins/positioner/guest-js/index.ts @@ -40,12 +40,20 @@ export async function moveWindow(to: Position): Promise { } export async function handleIconState(event: TrayIconEvent): Promise { - await invokeSetTrayIconState(event.rect) -} + const size = {} as Record + size[`${event.rect.size.type}`] = { + width: event.rect.size.width, + height: event.rect.size.height + } + + const position = {} as Record + position[`${event.rect.position.type}`] = { + x: event.rect.position.x, + y: event.rect.position.y + } -async function invokeSetTrayIconState(rect: TrayIconEvent['rect']) { await invoke('plugin:positioner|set_tray_icon_state', { - position: rect.position, - size: rect.size + position, + size }) } diff --git a/plugins/positioner/package.json b/plugins/positioner/package.json index a39d33d1f..de0942576 100644 --- a/plugins/positioner/package.json +++ b/plugins/positioner/package.json @@ -25,6 +25,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "^2.0.0-rc.4" + "@tauri-apps/api": "^2.0.0-rc.6" } } diff --git a/plugins/process/package.json b/plugins/process/package.json index 041ee6ec9..9af4b8223 100644 --- a/plugins/process/package.json +++ b/plugins/process/package.json @@ -24,6 +24,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "^2.0.0-rc.4" + "@tauri-apps/api": "^2.0.0-rc.6" } } diff --git a/plugins/shell/package.json b/plugins/shell/package.json index 2786ba5fc..3ba415db1 100644 --- a/plugins/shell/package.json +++ b/plugins/shell/package.json @@ -24,6 +24,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "^2.0.0-rc.4" + "@tauri-apps/api": "^2.0.0-rc.6" } } diff --git a/plugins/sql/package.json b/plugins/sql/package.json index 532f7e595..727eeda52 100644 --- a/plugins/sql/package.json +++ b/plugins/sql/package.json @@ -25,6 +25,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "^2.0.0-rc.4" + "@tauri-apps/api": "^2.0.0-rc.6" } } diff --git a/plugins/store/package.json b/plugins/store/package.json index 314e09625..5b21fae78 100644 --- a/plugins/store/package.json +++ b/plugins/store/package.json @@ -25,6 +25,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "^2.0.0-rc.4" + "@tauri-apps/api": "^2.0.0-rc.6" } } diff --git a/plugins/stronghold/package.json b/plugins/stronghold/package.json index 75ad663a8..975ee521a 100644 --- a/plugins/stronghold/package.json +++ b/plugins/stronghold/package.json @@ -25,6 +25,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "^2.0.0-rc.4" + "@tauri-apps/api": "^2.0.0-rc.6" } } diff --git a/plugins/updater/package.json b/plugins/updater/package.json index acb384253..2f2e90699 100644 --- a/plugins/updater/package.json +++ b/plugins/updater/package.json @@ -24,6 +24,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "^2.0.0-rc.4" + "@tauri-apps/api": "^2.0.0-rc.6" } } diff --git a/plugins/upload/package.json b/plugins/upload/package.json index 6b44bb009..a8f6c14ef 100644 --- a/plugins/upload/package.json +++ b/plugins/upload/package.json @@ -25,6 +25,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "^2.0.0-rc.4" + "@tauri-apps/api": "^2.0.0-rc.6" } } diff --git a/plugins/websocket/package.json b/plugins/websocket/package.json index c121cbe87..7a6fb96e2 100644 --- a/plugins/websocket/package.json +++ b/plugins/websocket/package.json @@ -24,6 +24,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "^2.0.0-rc.4" + "@tauri-apps/api": "^2.0.0-rc.6" } } diff --git a/plugins/window-state/package.json b/plugins/window-state/package.json index 0f5ee261a..da5b719b3 100644 --- a/plugins/window-state/package.json +++ b/plugins/window-state/package.json @@ -25,6 +25,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "^2.0.0-rc.4" + "@tauri-apps/api": "^2.0.0-rc.6" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9e6c5973a..be0db27b9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -143,37 +143,37 @@ importers: plugins/autostart: dependencies: '@tauri-apps/api': - specifier: ^2.0.0-rc.4 + specifier: ^2.0.0-rc.6 version: 2.0.0-rc.6 plugins/barcode-scanner: dependencies: '@tauri-apps/api': - specifier: ^2.0.0-rc.4 + specifier: ^2.0.0-rc.6 version: 2.0.0-rc.6 plugins/biometric: dependencies: '@tauri-apps/api': - specifier: ^2.0.0-rc.4 + specifier: ^2.0.0-rc.6 version: 2.0.0-rc.6 plugins/cli: dependencies: '@tauri-apps/api': - specifier: ^2.0.0-rc.4 + specifier: ^2.0.0-rc.6 version: 2.0.0-rc.6 plugins/clipboard-manager: dependencies: '@tauri-apps/api': - specifier: ^2.0.0-rc.4 + specifier: ^2.0.0-rc.6 version: 2.0.0-rc.6 plugins/deep-link: dependencies: '@tauri-apps/api': - specifier: ^2.0.0-rc.4 + specifier: ^2.0.0-rc.6 version: 2.0.0-rc.6 plugins/deep-link/examples/app: @@ -198,79 +198,79 @@ importers: plugins/dialog: dependencies: '@tauri-apps/api': - specifier: ^2.0.0-rc.4 + specifier: ^2.0.0-rc.6 version: 2.0.0-rc.6 plugins/fs: dependencies: '@tauri-apps/api': - specifier: ^2.0.0-rc.4 + specifier: ^2.0.0-rc.6 version: 2.0.0-rc.6 plugins/geolocation: dependencies: '@tauri-apps/api': - specifier: ^2.0.0-rc.4 + specifier: ^2.0.0-rc.6 version: 2.0.0-rc.6 plugins/global-shortcut: dependencies: '@tauri-apps/api': - specifier: ^2.0.0-rc.4 + specifier: ^2.0.0-rc.6 version: 2.0.0-rc.6 plugins/haptics: dependencies: '@tauri-apps/api': - specifier: ^2.0.0-rc.4 + specifier: ^2.0.0-rc.6 version: 2.0.0-rc.6 plugins/http: dependencies: '@tauri-apps/api': - specifier: ^2.0.0-rc.4 + specifier: ^2.0.0-rc.6 version: 2.0.0-rc.6 plugins/log: dependencies: '@tauri-apps/api': - specifier: ^2.0.0-rc.4 + specifier: ^2.0.0-rc.6 version: 2.0.0-rc.6 plugins/nfc: dependencies: '@tauri-apps/api': - specifier: ^2.0.0-rc.4 + specifier: ^2.0.0-rc.6 version: 2.0.0-rc.6 plugins/notification: dependencies: '@tauri-apps/api': - specifier: ^2.0.0-rc.4 + specifier: ^2.0.0-rc.6 version: 2.0.0-rc.6 plugins/os: dependencies: '@tauri-apps/api': - specifier: ^2.0.0-rc.4 + specifier: ^2.0.0-rc.6 version: 2.0.0-rc.6 plugins/positioner: dependencies: '@tauri-apps/api': - specifier: ^2.0.0-rc.4 + specifier: ^2.0.0-rc.6 version: 2.0.0-rc.6 plugins/process: dependencies: '@tauri-apps/api': - specifier: ^2.0.0-rc.4 + specifier: ^2.0.0-rc.6 version: 2.0.0-rc.6 plugins/shell: dependencies: '@tauri-apps/api': - specifier: ^2.0.0-rc.4 + specifier: ^2.0.0-rc.6 version: 2.0.0-rc.6 plugins/single-instance/examples/vanilla: @@ -282,13 +282,13 @@ importers: plugins/sql: dependencies: '@tauri-apps/api': - specifier: ^2.0.0-rc.4 + specifier: ^2.0.0-rc.6 version: 2.0.0-rc.6 plugins/store: dependencies: '@tauri-apps/api': - specifier: ^2.0.0-rc.4 + specifier: ^2.0.0-rc.6 version: 2.0.0-rc.6 plugins/store/examples/AppSettingsManager: @@ -306,25 +306,25 @@ importers: plugins/stronghold: dependencies: '@tauri-apps/api': - specifier: ^2.0.0-rc.4 + specifier: ^2.0.0-rc.6 version: 2.0.0-rc.6 plugins/updater: dependencies: '@tauri-apps/api': - specifier: ^2.0.0-rc.4 + specifier: ^2.0.0-rc.6 version: 2.0.0-rc.6 plugins/upload: dependencies: '@tauri-apps/api': - specifier: ^2.0.0-rc.4 + specifier: ^2.0.0-rc.6 version: 2.0.0-rc.6 plugins/websocket: dependencies: '@tauri-apps/api': - specifier: ^2.0.0-rc.4 + specifier: ^2.0.0-rc.6 version: 2.0.0-rc.6 plugins/websocket/examples/tauri-app: @@ -346,7 +346,7 @@ importers: plugins/window-state: dependencies: '@tauri-apps/api': - specifier: ^2.0.0-rc.4 + specifier: ^2.0.0-rc.6 version: 2.0.0-rc.6 packages: @@ -2330,9 +2330,9 @@ snapshots: - encoding - mocha - '@covector/assemble@0.12.0': + '@covector/assemble@0.12.0(mocha@10.7.3)': dependencies: - '@covector/command': 0.8.0 + '@covector/command': 0.8.0(mocha@10.7.3) '@covector/files': 0.8.0 effection: 2.0.8(mocha@10.7.3) js-yaml: 4.1.0 @@ -2343,9 +2343,10 @@ snapshots: unified: 9.2.2 transitivePeerDependencies: - encoding + - mocha - supports-color - '@covector/changelog@0.12.0': + '@covector/changelog@0.12.0(mocha@10.7.3)': dependencies: '@covector/files': 0.8.0 effection: 2.0.8(mocha@10.7.3) @@ -2355,14 +2356,16 @@ snapshots: unified: 9.2.2 transitivePeerDependencies: - encoding + - mocha - supports-color - '@covector/command@0.8.0': + '@covector/command@0.8.0(mocha@10.7.3)': dependencies: - '@effection/process': 2.1.4 + '@effection/process': 2.1.4(mocha@10.7.3) effection: 2.0.8(mocha@10.7.3) transitivePeerDependencies: - encoding + - mocha '@covector/files@0.8.0': dependencies: @@ -2409,10 +2412,8 @@ snapshots: dependencies: effection: 2.0.8(mocha@10.7.3) mocha: 10.7.3 - transitivePeerDependencies: - - encoding - '@effection/process@2.1.4': + '@effection/process@2.1.4(mocha@10.7.3)': dependencies: cross-spawn: 7.0.3 ctrlc-windows: 2.1.0 @@ -2420,6 +2421,7 @@ snapshots: shellwords: 0.1.1 transitivePeerDependencies: - encoding + - mocha '@effection/stream@2.0.6': dependencies: @@ -3223,9 +3225,9 @@ snapshots: dependencies: '@clack/prompts': 0.7.0 '@covector/apply': 0.10.0(mocha@10.7.3) - '@covector/assemble': 0.12.0 - '@covector/changelog': 0.12.0 - '@covector/command': 0.8.0 + '@covector/assemble': 0.12.0(mocha@10.7.3) + '@covector/changelog': 0.12.0(mocha@10.7.3) + '@covector/command': 0.8.0(mocha@10.7.3) '@covector/files': 0.8.0 effection: 2.0.8(mocha@10.7.3) globby: 11.1.0 diff --git a/shared/template/package.json b/shared/template/package.json index 43fe2958c..614dabb97 100644 --- a/shared/template/package.json +++ b/shared/template/package.json @@ -24,6 +24,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-rc.4" + "@tauri-apps/api": "^2.0.0-rc.6" } }