@tauri-apps/plugin-dialog 2.0.0-alpha.4 → 2.0.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-js/index.cjs +6 -6
- package/dist-js/index.d.ts +1 -1
- package/dist-js/index.js +1 -1
- package/package.json +2 -2
package/dist-js/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var core = require('@tauri-apps/api/core');
|
|
4
4
|
|
|
5
5
|
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
|
6
6
|
// SPDX-License-Identifier: Apache-2.0
|
|
@@ -61,7 +61,7 @@ async function open(options = {}) {
|
|
|
61
61
|
if (typeof options === "object") {
|
|
62
62
|
Object.freeze(options);
|
|
63
63
|
}
|
|
64
|
-
return
|
|
64
|
+
return core.invoke("plugin:dialog|open", { options });
|
|
65
65
|
}
|
|
66
66
|
/**
|
|
67
67
|
* Open a file/directory save dialog.
|
|
@@ -91,7 +91,7 @@ async function save(options = {}) {
|
|
|
91
91
|
if (typeof options === "object") {
|
|
92
92
|
Object.freeze(options);
|
|
93
93
|
}
|
|
94
|
-
return
|
|
94
|
+
return core.invoke("plugin:dialog|save", { options });
|
|
95
95
|
}
|
|
96
96
|
/**
|
|
97
97
|
* Shows a message dialog with an `Ok` button.
|
|
@@ -112,7 +112,7 @@ async function save(options = {}) {
|
|
|
112
112
|
*/
|
|
113
113
|
async function message(message, options) {
|
|
114
114
|
const opts = typeof options === "string" ? { title: options } : options;
|
|
115
|
-
return
|
|
115
|
+
return core.invoke("plugin:dialog|message", {
|
|
116
116
|
message: message.toString(),
|
|
117
117
|
title: opts?.title?.toString(),
|
|
118
118
|
type_: opts?.type,
|
|
@@ -137,7 +137,7 @@ async function message(message, options) {
|
|
|
137
137
|
*/
|
|
138
138
|
async function ask(message, options) {
|
|
139
139
|
const opts = typeof options === "string" ? { title: options } : options;
|
|
140
|
-
return
|
|
140
|
+
return core.invoke("plugin:dialog|ask", {
|
|
141
141
|
message: message.toString(),
|
|
142
142
|
title: opts?.title?.toString(),
|
|
143
143
|
type_: opts?.type,
|
|
@@ -163,7 +163,7 @@ async function ask(message, options) {
|
|
|
163
163
|
*/
|
|
164
164
|
async function confirm(message, options) {
|
|
165
165
|
const opts = typeof options === "string" ? { title: options } : options;
|
|
166
|
-
return
|
|
166
|
+
return core.invoke("plugin:dialog|confirm", {
|
|
167
167
|
message: message.toString(),
|
|
168
168
|
title: opts?.title?.toString(),
|
|
169
169
|
type_: opts?.type,
|
package/dist-js/index.d.ts
CHANGED
|
@@ -179,5 +179,5 @@ declare function ask(message: string, options?: string | ConfirmDialogOptions):
|
|
|
179
179
|
* @since 2.0.0
|
|
180
180
|
*/
|
|
181
181
|
declare function confirm(message: string, options?: string | ConfirmDialogOptions): Promise<boolean>;
|
|
182
|
-
export type { DialogFilter, OpenDialogOptions, SaveDialogOptions, MessageDialogOptions, ConfirmDialogOptions, };
|
|
182
|
+
export type { DialogFilter, FileResponse, OpenDialogOptions, SaveDialogOptions, MessageDialogOptions, ConfirmDialogOptions, };
|
|
183
183
|
export { open, save, message, ask, confirm };
|
package/dist-js/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tauri-apps/plugin-dialog",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.5",
|
|
4
4
|
"license": "MIT or APACHE-2.0",
|
|
5
5
|
"authors": [
|
|
6
6
|
"Tauri Programme within The Commons Conservancy"
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"LICENSE"
|
|
21
21
|
],
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@tauri-apps/api": "2.0.0-alpha.
|
|
23
|
+
"@tauri-apps/api": "2.0.0-alpha.13"
|
|
24
24
|
},
|
|
25
25
|
"scripts": {
|
|
26
26
|
"build": "rollup -c"
|