@tauri-apps/plugin-dialog
Advanced tools
Comparing version 2.0.0-rc.0 to 2.0.0-rc.1
@@ -1,12 +0,1 @@ | ||
interface FileResponse { | ||
base64Data?: string; | ||
duration?: number; | ||
height?: number; | ||
width?: number; | ||
mimeType?: string; | ||
modifiedAt?: number; | ||
name?: string; | ||
path: string; | ||
size: number; | ||
} | ||
/** | ||
@@ -35,7 +24,14 @@ * Extension filters for the file dialog. | ||
interface OpenDialogOptions { | ||
/** The title of the dialog window. */ | ||
/** The title of the dialog window (desktop only). */ | ||
title?: string; | ||
/** The filters of the dialog. */ | ||
filters?: DialogFilter[]; | ||
/** Initial directory or file path. */ | ||
/** | ||
* Initial directory or file path. | ||
* If it's a directory path, the dialog interface will change to that folder. | ||
* If it's not an existing directory, the file name will be set to the dialog's file name input and the dialog will be set to the parent folder. | ||
* | ||
* On mobile the file name is always used on the dialog's file name input. | ||
* If not provided, Android uses `(invalid).txt` as default file name. | ||
*/ | ||
defaultPath?: string; | ||
@@ -60,3 +56,3 @@ /** Whether the dialog allows multiple selection or not. */ | ||
interface SaveDialogOptions { | ||
/** The title of the dialog window. */ | ||
/** The title of the dialog window (desktop only). */ | ||
title?: string; | ||
@@ -69,2 +65,5 @@ /** The filters of the dialog. */ | ||
* If it's not an existing directory, the file name will be set to the dialog's file name input and the dialog will be set to the parent folder. | ||
* | ||
* On mobile the file name is always used on the dialog's file name input. | ||
* If not provided, Android uses `(invalid).txt` as default file name. | ||
*/ | ||
@@ -96,3 +95,3 @@ defaultPath?: string; | ||
} | ||
type OpenDialogReturn<T extends OpenDialogOptions> = T["directory"] extends true ? T["multiple"] extends true ? string[] | null : string | null : T["multiple"] extends true ? FileResponse[] | null : FileResponse | null; | ||
type OpenDialogReturn<T extends OpenDialogOptions> = T["directory"] extends true ? T["multiple"] extends true ? string[] | null : string | null : T["multiple"] extends true ? string[] | null : string | null; | ||
/** | ||
@@ -228,3 +227,3 @@ * Open a file/directory selection dialog. | ||
declare function confirm(message: string, options?: string | ConfirmDialogOptions): Promise<boolean>; | ||
export type { DialogFilter, FileResponse, OpenDialogOptions, OpenDialogReturn, SaveDialogOptions, MessageDialogOptions, ConfirmDialogOptions, }; | ||
export type { DialogFilter, OpenDialogOptions, OpenDialogReturn, SaveDialogOptions, MessageDialogOptions, ConfirmDialogOptions, }; | ||
export { open, save, message, ask, confirm }; |
{ | ||
"name": "@tauri-apps/plugin-dialog", | ||
"version": "2.0.0-rc.0", | ||
"version": "2.0.0-rc.1", | ||
"license": "MIT or APACHE-2.0", | ||
@@ -27,4 +27,4 @@ "authors": [ | ||
"dependencies": { | ||
"@tauri-apps/api": "^2.0.0-rc.0" | ||
"@tauri-apps/api": "^2.0.0-rc.4" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23587
572
Updated@tauri-apps/api@^2.0.0-rc.4