Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tauri-apps/api

Package Overview
Dependencies
Maintainers
5
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tauri-apps/api - npm Package Compare versions

Comparing version 2.0.0-beta.15 to 2.0.0-beta.16

2

package.json
{
"name": "@tauri-apps/api",
"version": "2.0.0-beta.15",
"version": "2.0.0-beta.16",
"description": "Tauri API definitions",

@@ -5,0 +5,0 @@ "funding": {

@@ -422,3 +422,3 @@ import { PhysicalPosition, PhysicalSize } from './dpi.js';

async reparent(window) {
return invoke('plugin:webview|set_webview_focus', {
return invoke('plugin:webview|reparent', {
label: this.label,

@@ -425,0 +425,0 @@ window: typeof window === 'string' ? window : window.label

@@ -101,2 +101,8 @@ /**

}
export interface WindowSizeConstraints {
minWidth?: number;
minHeight?: number;
maxWidth?: number;
maxHeight?: number;
}
export interface ProgressBarState {

@@ -799,2 +805,14 @@ /**

/**
* Sets the window inner size constraints.
* @example
* ```typescript
* import { getCurrentWindow } from '@tauri-apps/api/window';
* await getCurrentWindow().setSizeConstraints({ minWidth: 300 });
* ```
*
* @param constraints The logical or physical inner size, or `null` to unset the constraint.
* @returns A promise indicating the success or failure of the operation.
*/
setSizeConstraints(constraints: WindowSizeConstraints | null | undefined): Promise<void>;
/**
* Sets the window outer position.

@@ -801,0 +819,0 @@ * @example

@@ -1096,2 +1096,27 @@ import { PhysicalPosition, PhysicalSize } from './dpi.js';

/**
* Sets the window inner size constraints.
* @example
* ```typescript
* import { getCurrentWindow } from '@tauri-apps/api/window';
* await getCurrentWindow().setSizeConstraints({ minWidth: 300 });
* ```
*
* @param constraints The logical or physical inner size, or `null` to unset the constraint.
* @returns A promise indicating the success or failure of the operation.
*/
async setSizeConstraints(constraints) {
function logical(pixel) {
return pixel ? { Logical: pixel } : null;
}
return invoke('plugin:window|set_size_constraints', {
label: this.label,
value: {
minWidth: logical(constraints === null || constraints === void 0 ? void 0 : constraints.minWidth),
minHeight: logical(constraints === null || constraints === void 0 ? void 0 : constraints.minHeight),
maxWidth: logical(constraints === null || constraints === void 0 ? void 0 : constraints.maxWidth),
maxHeight: logical(constraints === null || constraints === void 0 ? void 0 : constraints.maxHeight)
}
});
}
/**
* Sets the window outer position.

@@ -1098,0 +1123,0 @@ * @example

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc