feat: update dependencies

This commit is contained in:
Jonas Kruckenberg 2023-12-14 11:15:03 +01:00
parent 55fe1d144f
commit 3e087bd257
No known key found for this signature in database
GPG key ID: 55B37D49677B1FAC
16 changed files with 2004 additions and 474 deletions

View file

@ -266,6 +266,20 @@ var WindowManager = class extends WebviewWindowHandle {
}
});
}
async isMinimized() {
return invokeTauriCommand({
__tauriModule: "Window",
message: {
cmd: "manage",
data: {
label: this.label,
cmd: {
type: "isMinimized"
}
}
}
});
}
async isMaximized() {
return invokeTauriCommand({
__tauriModule: "Window",
@ -280,6 +294,20 @@ var WindowManager = class extends WebviewWindowHandle {
}
});
}
async isFocused() {
return invokeTauriCommand({
__tauriModule: "Window",
message: {
cmd: "manage",
data: {
label: this.label,
cmd: {
type: "isFocused"
}
}
}
});
}
async isDecorated() {
return invokeTauriCommand({
__tauriModule: "Window",
@ -308,6 +336,48 @@ var WindowManager = class extends WebviewWindowHandle {
}
});
}
async isMaximizable() {
return invokeTauriCommand({
__tauriModule: "Window",
message: {
cmd: "manage",
data: {
label: this.label,
cmd: {
type: "isMaximizable"
}
}
}
});
}
async isMinimizable() {
return invokeTauriCommand({
__tauriModule: "Window",
message: {
cmd: "manage",
data: {
label: this.label,
cmd: {
type: "isMinimizable"
}
}
}
});
}
async isClosable() {
return invokeTauriCommand({
__tauriModule: "Window",
message: {
cmd: "manage",
data: {
label: this.label,
cmd: {
type: "isClosable"
}
}
}
});
}
async isVisible() {
return invokeTauriCommand({
__tauriModule: "Window",
@ -322,6 +392,20 @@ var WindowManager = class extends WebviewWindowHandle {
}
});
}
async title() {
return invokeTauriCommand({
__tauriModule: "Window",
message: {
cmd: "manage",
data: {
label: this.label,
cmd: {
type: "title"
}
}
}
});
}
async theme() {
return invokeTauriCommand({
__tauriModule: "Window",
@ -388,6 +472,51 @@ var WindowManager = class extends WebviewWindowHandle {
}
});
}
async setMaximizable(maximizable) {
return invokeTauriCommand({
__tauriModule: "Window",
message: {
cmd: "manage",
data: {
label: this.label,
cmd: {
type: "setMaximizable",
payload: maximizable
}
}
}
});
}
async setMinimizable(minimizable) {
return invokeTauriCommand({
__tauriModule: "Window",
message: {
cmd: "manage",
data: {
label: this.label,
cmd: {
type: "setMinimizable",
payload: minimizable
}
}
}
});
}
async setClosable(closable) {
return invokeTauriCommand({
__tauriModule: "Window",
message: {
cmd: "manage",
data: {
label: this.label,
cmd: {
type: "setClosable",
payload: closable
}
}
}
});
}
async setTitle(title) {
return invokeTauriCommand({
__tauriModule: "Window",
@ -545,6 +674,21 @@ var WindowManager = class extends WebviewWindowHandle {
}
});
}
async setContentProtected(protected_) {
return invokeTauriCommand({
__tauriModule: "Window",
message: {
cmd: "manage",
data: {
label: this.label,
cmd: {
type: "setContentProtected",
payload: protected_
}
}
}
});
}
async setSize(size) {
if (!size || size.type !== "Logical" && size.type !== "Physical") {
throw new Error(
@ -811,10 +955,16 @@ var WindowManager = class extends WebviewWindowHandle {
});
}
async onResized(handler) {
return this.listen("tauri://resize" /* WINDOW_RESIZED */, handler);
return this.listen("tauri://resize" /* WINDOW_RESIZED */, (e) => {
e.payload = mapPhysicalSize(e.payload);
handler(e);
});
}
async onMoved(handler) {
return this.listen("tauri://move" /* WINDOW_MOVED */, handler);
return this.listen("tauri://move" /* WINDOW_MOVED */, (e) => {
e.payload = mapPhysicalPosition(e.payload);
handler(e);
});
}
async onCloseRequested(handler) {
return this.listen("tauri://close-requested" /* WINDOW_CLOSE_REQUESTED */, (event) => {
@ -920,6 +1070,14 @@ var WebviewWindow = class extends WindowManager {
}
return null;
}
static async getFocusedWindow() {
for (const w of getAll()) {
if (await w.isFocused()) {
return w;
}
}
return null;
}
};
var appWindow;
if ("__TAURI_METADATA__" in window) {
@ -942,10 +1100,16 @@ function mapMonitor(m) {
return m === null ? null : {
name: m.name,
scaleFactor: m.scaleFactor,
position: new PhysicalPosition(m.position.x, m.position.y),
size: new PhysicalSize(m.size.width, m.size.height)
position: mapPhysicalPosition(m.position),
size: mapPhysicalSize(m.size)
};
}
function mapPhysicalPosition(m) {
return new PhysicalPosition(m.x, m.y);
}
function mapPhysicalSize(m) {
return new PhysicalSize(m.width, m.height);
}
async function currentMonitor() {
return invokeTauriCommand({
__tauriModule: "Window",