Socket
Socket
Sign inDemoInstall

@tauri-apps/api

Package Overview
Dependencies
Maintainers
5
Versions
75
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-rc.0 to 2.0.0-rc.1

external/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.20.0_tslib@2.6.3_typescript@5.5.4/node_modules/tslib/tslib.es6.cjs

2

core.js

@@ -1,2 +0,2 @@

import { __classPrivateFieldGet, __classPrivateFieldSet } from './external/tslib/tslib.es6.js';
import { __classPrivateFieldGet, __classPrivateFieldSet } from './external/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.20.0_tslib@2.6.3_typescript@5.5.4/node_modules/tslib/tslib.es6.js';

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

@@ -72,3 +72,3 @@ import { invoke, transformCallback } from './core.js';

? { kind: 'AnyLabel', label: options.target }
: (_a = options === null || options === void 0 ? void 0 : options.target) !== null && _a !== void 0 ? _a : { kind: 'Any' };
: ((_a = options === null || options === void 0 ? void 0 : options.target) !== null && _a !== void 0 ? _a : { kind: 'Any' });
return invoke('plugin:event|listen', {

@@ -75,0 +75,0 @@ event,

@@ -1,2 +0,2 @@

import { __classPrivateFieldGet, __classPrivateFieldSet } from '../external/tslib/tslib.es6.js';
import { __classPrivateFieldGet, __classPrivateFieldSet } from '../external/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.20.0_tslib@2.6.3_typescript@5.5.4/node_modules/tslib/tslib.es6.js';
import { Channel, invoke, Resource } from '../core.js';

@@ -3,0 +3,0 @@ import { transformImage } from '../image.js';

{
"name": "@tauri-apps/api",
"version": "2.0.0-rc.0",
"version": "2.0.0-rc.1",
"description": "Tauri API definitions",

@@ -38,12 +38,2 @@ "funding": {

},
"scripts": {
"build": "rollup -c --configPlugin typescript",
"npm-pack": "yarn build && cd ./dist && npm pack",
"npm-publish": "yarn build && cd ./dist && yarn publish --access public --loglevel silly --tag next",
"ts:check": "tsc --noEmit",
"lint": "eslint src/**.ts",
"lint:fix": "eslint src/**.ts --fix",
"format": "prettier --write . --config ../../.prettierrc --ignore-path .gitignore --ignore-path ../../.prettierignore",
"format:check": "prettier --check . --config ../../.prettierrc --ignore-path .gitignore --ignore-path ../../.prettierignore"
},
"devDependencies": {

@@ -53,4 +43,4 @@ "@eslint/js": "^9.4.0",

"@rollup/plugin-typescript": "11.1.6",
"@types/eslint": "^8.56.10",
"@types/node": "20.14.10",
"@types/eslint": "^9.0.0",
"@types/node": "20.14.15",
"eslint": "^9.4.0",

@@ -61,13 +51,16 @@ "eslint-config-prettier": "9.1.0",

"globals": "^15.4.0",
"prettier": "3.3.2",
"rollup": "4.18.1",
"prettier": "3.3.3",
"rollup": "4.20.0",
"tslib": "^2.6.3",
"typescript": "^5.4.5",
"typescript-eslint": "rc-v8"
"typescript-eslint": "^8.1.0"
},
"engines": {
"node": ">= 18.18",
"npm": ">= 6.6.0",
"yarn": ">= 1.19.1"
"scripts": {
"build": "rollup -c --configPlugin typescript",
"npm-pack": "pnpm build && cd ./dist && npm pack",
"npm-publish": "pnpm build && cd ./dist && pnpm publish --access public --loglevel silly --tag next --no-git-checks",
"ts:check": "tsc --noEmit",
"eslint:check": "eslint src/**.ts",
"eslint:fix": "eslint src/**.ts --fix"
}
}
}

@@ -35,4 +35,5 @@ # @tauri-apps/api

```
$ npm install --save @tauri-apps/api
$ pnpm add @tauri-apps/api
$ yarn add @tauri-apps/api
$ npm add @tauri-apps/api
```

@@ -39,0 +40,0 @@

@@ -46,3 +46,3 @@ /**

*/
declare function getAllWebviews(): Webview[];
declare function getAllWebviews(): Promise<Webview[]>;
/** @ignore */

@@ -129,3 +129,3 @@ export type WebviewLabel = string;

*/
static getByLabel(label: string): Webview | null;
static getByLabel(label: string): Promise<Webview | null>;
/**

@@ -138,3 +138,3 @@ * Get an instance of `Webview` for the current webview.

*/
static getAll(): Webview[];
static getAll(): Promise<Webview[]>;
/**

@@ -141,0 +141,0 @@ * Listen to an emitted event on this webview.

@@ -38,7 +38,10 @@ import { PhysicalPosition, PhysicalSize } from './dpi.js';

*/
function getAllWebviews() {
return window.__TAURI_INTERNALS__.metadata.webviews.map((w) => new Webview(Window.getByLabel(w.windowLabel), w.label, {
async function getAllWebviews() {
return invoke('plugin:webview|get_all_webviews').then((webviews) => webviews.map((w) => new Webview(new Window(w.windowLabel, {
// @ts-expect-error `skip` is not defined in the public API but it is handled by the constructor
skip: true
}));
}), w.label, {
// @ts-expect-error `skip` is not defined in the public API but it is handled by the constructor
skip: true
})));
}

@@ -136,5 +139,5 @@ /** @ignore */

*/
static getByLabel(label) {
static async getByLabel(label) {
var _a;
return (_a = getAllWebviews().find((w) => w.label === label)) !== null && _a !== void 0 ? _a : null;
return (_a = (await getAllWebviews()).find((w) => w.label === label)) !== null && _a !== void 0 ? _a : null;
}

@@ -150,3 +153,3 @@ /**

*/
static getAll() {
static async getAll() {
return getAllWebviews();

@@ -153,0 +156,0 @@ }

@@ -17,3 +17,3 @@ import { Webview, WebviewLabel, WebviewOptions } from './webview';

*/
declare function getAllWebviewWindows(): WebviewWindow[];
declare function getAllWebviewWindows(): Promise<WebviewWindow[]>;
interface WebviewWindow extends Webview, Window {

@@ -56,3 +56,3 @@ }

*/
static getByLabel(label: string): WebviewWindow | null;
static getByLabel(label: string): Promise<WebviewWindow | null>;
/**

@@ -65,3 +65,3 @@ * Get an instance of `Webview` for the current webview.

*/
static getAll(): WebviewWindow[];
static getAll(): Promise<WebviewWindow[]>;
/**

@@ -68,0 +68,0 @@ * Listen to an emitted event on this webivew window.

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

*/
function getAllWebviewWindows() {
return window.__TAURI_INTERNALS__.metadata.webviews.map((w) => new WebviewWindow(w.label, {
async function getAllWebviewWindows() {
return invoke('plugin:window|get_all_windows').then((windows) => windows.map((w) => new WebviewWindow(w, {
// @ts-expect-error `skip` is not defined in the public API but it is handled by the constructor
skip: true
}));
})));
}

@@ -83,5 +83,5 @@ // eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging

*/
static getByLabel(label) {
static async getByLabel(label) {
var _a;
const webview = (_a = getAllWebviewWindows().find((w) => w.label === label)) !== null && _a !== void 0 ? _a : null;
const webview = (_a = (await getAllWebviewWindows()).find((w) => w.label === label)) !== null && _a !== void 0 ? _a : null;
if (webview) {

@@ -102,6 +102,4 @@ // @ts-expect-error `skip` is not defined in the public API but it is handled by the constructor

*/
static getAll() {
return getAllWebviewWindows().map(
// @ts-expect-error `skip` is not defined in the public API but it is handled by the constructor
(w) => new WebviewWindow(w.label, { skip: true }));
static async getAll() {
return getAllWebviewWindows();
}

@@ -108,0 +106,0 @@ /**

@@ -128,3 +128,3 @@ /**

*/
declare function getAllWindows(): Window[];
declare function getAllWindows(): Promise<Window[]>;
/** @ignore */

@@ -194,3 +194,3 @@ export type WindowLabel = string;

*/
static getByLabel(label: string): Window | null;
static getByLabel(label: string): Promise<Window | null>;
/**

@@ -203,3 +203,3 @@ * Get an instance of `Window` for the current window.

*/
static getAll(): Window[];
static getAll(): Promise<Window[]>;
/**

@@ -714,3 +714,3 @@ * Gets the focused window.

* - `false` has no effect on decorated window, shadows are always ON.
* - `true` will make ndecorated window have a 1px white border,
* - `true` will make undecorated window have a 1px white border,
* and on Windows 11, it will have a rounded corners.

@@ -1401,3 +1401,3 @@ * - **Linux:** Unsupported.

* - `false` has no effect on decorated window, shadows are always ON.
* - `true` will make ndecorated window have a 1px white border,
* - `true` will make undecorated window have a 1px white border,
* and on Windows 11, it will have a rounded corners.

@@ -1404,0 +1404,0 @@ * - **Linux:** Unsupported.

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

*/
function getAllWindows() {
return window.__TAURI_INTERNALS__.metadata.windows.map((w) => new Window(w.label, {
async function getAllWindows() {
return invoke('plugin:window|get_all_windows').then((windows) => windows.map((w) => new Window(w, {
// @ts-expect-error `skip` is not defined in the public API but it is handled by the constructor
skip: true
}));
})));
}

@@ -182,5 +182,5 @@ /** @ignore */

*/
static getByLabel(label) {
static async getByLabel(label) {
var _a;
return (_a = getAllWindows().find((w) => w.label === label)) !== null && _a !== void 0 ? _a : null;
return (_a = (await getAllWindows()).find((w) => w.label === label)) !== null && _a !== void 0 ? _a : null;
}

@@ -196,3 +196,3 @@ /**

*/
static getAll() {
static async getAll() {
return getAllWindows();

@@ -211,3 +211,3 @@ }

static async getFocusedWindow() {
for (const w of getAllWindows()) {
for (const w of await getAllWindows()) {
if (await w.isFocused()) {

@@ -932,3 +932,3 @@ return w;

* - `false` has no effect on decorated window, shadows are always ON.
* - `true` will make ndecorated window have a 1px white border,
* - `true` will make undecorated window have a 1px white border,
* and on Windows 11, it will have a rounded corners.

@@ -935,0 +935,0 @@ * - **Linux:** Unsupported.

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

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