New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@tauri-apps/api

Package Overview
Dependencies
Maintainers
5
Versions
84
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.2.0 to 2.3.0

18

menu/base.js
import { __classPrivateFieldGet, __classPrivateFieldSet } from '../external/tslib/tslib.es6.js';
import { Channel, invoke, Resource } from '../core.js';
import { Resource, Channel, invoke } from '../core.js';
import { transformImage } from '../image.js';

@@ -30,10 +30,10 @@

// about predefined menu item icon
if ('item' in opts &&
opts.item &&
typeof opts.item === 'object' &&
'About' in opts.item &&
opts.item.About &&
typeof opts.item.About === 'object' &&
'icon' in opts.item.About &&
opts.item.About.icon) {
if ('item' in opts
&& opts.item
&& typeof opts.item === 'object'
&& 'About' in opts.item
&& opts.item.About
&& typeof opts.item.About === 'object'
&& 'icon' in opts.item.About
&& opts.item.About.icon) {
opts.item.About.icon = transformImage(opts.item.About.icon);

@@ -40,0 +40,0 @@ }

@@ -9,3 +9,3 @@ import type { InvokeArgs } from './core';

*
* Testing setup using vitest:
* Testing setup using Vitest:
* ```js

@@ -12,0 +12,0 @@ * import { mockIPC, clearMocks } from "@tauri-apps/api/mocks"

@@ -15,3 +15,3 @@ // Copyright 2019-2024 Tauri Programme within The Commons Conservancy

*
* Testing setup using vitest:
* Testing setup using Vitest:
* ```js

@@ -18,0 +18,0 @@ * import { mockIPC, clearMocks } from "@tauri-apps/api/mocks"

{
"name": "@tauri-apps/api",
"version": "2.2.0",
"version": "2.3.0",
"description": "Tauri API definitions",

@@ -45,7 +45,7 @@ "funding": {

"eslint": "^9.4.0",
"eslint-config-prettier": "9.1.0",
"eslint-config-prettier": "10.0.1",
"eslint-plugin-security": "3.0.1",
"fast-glob": "3.3.2",
"globals": "^15.4.0",
"rollup": "4.29.1",
"fast-glob": "3.3.3",
"globals": "^16.0.0",
"rollup": "4.34.8",
"tslib": "^2.6.3",

@@ -52,0 +52,0 @@ "typescript-eslint": "^8.1.0"

@@ -19,3 +19,3 @@ /**

import { type EventTarget } from './event';
import { Color, Window } from './window';
import { BackgroundThrottlingPolicy, Color, Window } from './window';
import { WebviewWindow } from './webviewWindow';

@@ -496,4 +496,22 @@ /** The drag and drop event types. */

backgroundColor?: Color;
/** Change the default background throttling behaviour.
*
* By default, browsers use a suspend policy that will throttle timers and even unload
* the whole tab (view) to free resources after roughly 5 minutes when a view became
* minimized or hidden. This will pause all tasks until the documents visibility state
* changes back from hidden to visible by bringing the view back to the foreground.
*
* ## Platform-specific
*
* - **Linux / Windows / Android**: Unsupported. Workarounds like a pending WebLock transaction might suffice.
* - **iOS**: Supported since version 17.0+.
* - **macOS**: Supported since version 14.0+.
*
* see https://github.com/tauri-apps/tauri/issues/5250#issuecomment-2569380578
*
* @since 2.3.0
*/
backgroundThrottling?: BackgroundThrottlingPolicy;
}
export { Webview, getCurrentWebview, getAllWebviews };
export type { DragDropEvent, WebviewOptions, Color };

@@ -196,5 +196,5 @@ import { getCurrentWebview, Webview } from './webview.js';

var _a;
if (typeof baseClass.prototype === 'object' &&
baseClass.prototype &&
name in baseClass.prototype)
if (typeof baseClass.prototype === 'object'
&& baseClass.prototype
&& name in baseClass.prototype)
return;

@@ -201,0 +201,0 @@ Object.defineProperty(baseClass.prototype, name,

@@ -1279,2 +1279,12 @@ /**

/**
* Background throttling policy
*
* @since 2.0.0
*/
declare enum BackgroundThrottlingPolicy {
Disabled = "disabled",
Throttle = "throttle",
Suspend = "suspend"
}
/**
* Platform-specific window effects

@@ -1593,2 +1603,15 @@ *

backgroundColor?: Color;
/** Change the default background throttling behaviour.
*
* ## Platform-specific
*
* - **Linux / Windows / Android**: Unsupported. Workarounds like a pending WebLock transaction might suffice.
* - **iOS**: Supported since version 17.0+.
* - **macOS**: Supported since version 14.0+.
*
* see https://github.com/tauri-apps/tauri/issues/5250#issuecomment-2569380578
*
* @since 2.3.0
*/
backgroundThrottling?: BackgroundThrottlingPolicy;
}

@@ -1653,2 +1676,2 @@ /**

export { Window, CloseRequestedEvent, getCurrentWindow, getAllWindows, LogicalSize, PhysicalSize, LogicalPosition, PhysicalPosition, UserAttentionType, Effect, EffectState, currentMonitor, monitorFromPoint, primaryMonitor, availableMonitors, cursorPosition };
export type { Effects, Theme, TitleBarStyle, ScaleFactorChanged, WindowOptions, Color, DragDropEvent };
export type { Effects, Theme, TitleBarStyle, ScaleFactorChanged, WindowOptions, Color, BackgroundThrottlingPolicy, DragDropEvent };

@@ -1719,2 +1719,13 @@ import { PhysicalPosition, PhysicalSize, Size, Position } from './dpi.js';

/**
* Background throttling policy
*
* @since 2.0.0
*/
var BackgroundThrottlingPolicy;
(function (BackgroundThrottlingPolicy) {
BackgroundThrottlingPolicy["Disabled"] = "disabled";
BackgroundThrottlingPolicy["Throttle"] = "throttle";
BackgroundThrottlingPolicy["Suspend"] = "suspend";
})(BackgroundThrottlingPolicy || (BackgroundThrottlingPolicy = {}));
/**
* Platform-specific window effects

@@ -1721,0 +1732,0 @@ *

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

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