diff --git a/plugins/dialog/guest-js/index.ts b/plugins/dialog/guest-js/index.ts index ad8af926..c0c34dfb 100644 --- a/plugins/dialog/guest-js/index.ts +++ b/plugins/dialog/guest-js/index.ts @@ -125,7 +125,7 @@ async function open( * You can save it to the filesystem using [tauri-plugin-persisted-scope](https://github.com/tauri-apps/tauri-plugin-persisted-scope). * @example * ```typescript - * import { open } from '@tauri-apps/api/dialog'; + * import { open } from '@tauri-apps/plugin-dialog'; * // Open a selection dialog for image files * const selected = await open({ * multiple: true, @@ -145,7 +145,7 @@ async function open( * * @example * ```typescript - * import { open } from '@tauri-apps/api/dialog'; + * import { open } from '@tauri-apps/plugin-dialog'; * import { appDir } from '@tauri-apps/api/path'; * // Open a selection dialog for directories * const selected = await open({ @@ -187,7 +187,7 @@ async function open( * You can save it to the filesystem using [tauri-plugin-persisted-scope](https://github.com/tauri-apps/tauri-plugin-persisted-scope). * @example * ```typescript - * import { save } from '@tauri-apps/api/dialog'; + * import { save } from '@tauri-apps/plugin-dialog'; * const filePath = await save({ * filters: [{ * name: 'Image', @@ -212,7 +212,7 @@ async function save(options: SaveDialogOptions = {}): Promise { * Shows a message dialog with an `Ok` button. * @example * ```typescript - * import { message } from '@tauri-apps/api/dialog'; + * import { message } from '@tauri-apps/plugin-dialog'; * await message('Tauri is awesome', 'Tauri'); * await message('File not found', { title: 'Tauri', type: 'error' }); * ``` @@ -242,7 +242,7 @@ async function message( * Shows a question dialog with `Yes` and `No` buttons. * @example * ```typescript - * import { ask } from '@tauri-apps/api/dialog'; + * import { ask } from '@tauri-apps/plugin-dialog'; * const yes = await ask('Are you sure?', 'Tauri'); * const yes2 = await ask('This action cannot be reverted. Are you sure?', { title: 'Tauri', type: 'warning' }); * ``` @@ -272,7 +272,7 @@ async function ask( * Shows a question dialog with `Ok` and `Cancel` buttons. * @example * ```typescript - * import { confirm } from '@tauri-apps/api/dialog'; + * import { confirm } from '@tauri-apps/plugin-dialog'; * const confirmed = await confirm('Are you sure?', 'Tauri'); * const confirmed2 = await confirm('This action cannot be reverted. Are you sure?', { title: 'Tauri', type: 'warning' }); * ``` diff --git a/plugins/notification/guest-js/index.ts b/plugins/notification/guest-js/index.ts index 6bbdb42a..979c5b43 100644 --- a/plugins/notification/guest-js/index.ts +++ b/plugins/notification/guest-js/index.ts @@ -296,7 +296,7 @@ type Permission = "granted" | "denied" | "default"; * Checks if the permission to send notifications is granted. * @example * ```typescript - * import { isPermissionGranted } from '@tauri-apps/api/notification'; + * import { isPermissionGranted } from '@tauri-apps/plugin-notification'; * const permissionGranted = await isPermissionGranted(); * ``` * @@ -313,7 +313,7 @@ async function isPermissionGranted(): Promise { * Requests the permission to send notifications. * @example * ```typescript - * import { isPermissionGranted, requestPermission } from '@tauri-apps/api/notification'; + * import { isPermissionGranted, requestPermission } from '@tauri-apps/plugin-notification'; * let permissionGranted = await isPermissionGranted(); * if (!permissionGranted) { * const permission = await requestPermission(); @@ -333,7 +333,7 @@ async function requestPermission(): Promise { * Sends a notification to the user. * @example * ```typescript - * import { isPermissionGranted, requestPermission, sendNotification } from '@tauri-apps/api/notification'; + * import { isPermissionGranted, requestPermission, sendNotification } from '@tauri-apps/plugin-notification'; * let permissionGranted = await isPermissionGranted(); * if (!permissionGranted) { * const permission = await requestPermission(); @@ -362,7 +362,7 @@ function sendNotification(options: Options | string): void { * * @example * ```typescript - * import { registerActionTypes } from '@tauri-apps/api/notification'; + * import { registerActionTypes } from '@tauri-apps/plugin-notification'; * await registerActionTypes([{ * id: 'tauri', * actions: [{ @@ -385,7 +385,7 @@ async function registerActionTypes(types: ActionType[]): Promise { * * @example * ```typescript - * import { pending } from '@tauri-apps/api/notification'; + * import { pending } from '@tauri-apps/plugin-notification'; * const pendingNotifications = await pending(); * ``` * @@ -402,7 +402,7 @@ async function pending(): Promise { * * @example * ```typescript - * import { cancel } from '@tauri-apps/api/notification'; + * import { cancel } from '@tauri-apps/plugin-notification'; * await cancel([-34234, 23432, 4311]); * ``` * @@ -419,7 +419,7 @@ async function cancel(notifications: number[]): Promise { * * @example * ```typescript - * import { cancelAll } from '@tauri-apps/api/notification'; + * import { cancelAll } from '@tauri-apps/plugin-notification'; * await cancelAll(); * ``` * @@ -436,7 +436,7 @@ async function cancelAll(): Promise { * * @example * ```typescript - * import { active } from '@tauri-apps/api/notification'; + * import { active } from '@tauri-apps/plugin-notification'; * const activeNotifications = await active(); * ``` * @@ -453,7 +453,7 @@ async function active(): Promise { * * @example * ```typescript - * import { cancel } from '@tauri-apps/api/notification'; + * import { cancel } from '@tauri-apps/plugin-notification'; * await cancel([-34234, 23432, 4311]) * ``` * @@ -470,7 +470,7 @@ async function removeActive(notifications: number[]): Promise { * * @example * ```typescript - * import { removeAllActive } from '@tauri-apps/api/notification'; + * import { removeAllActive } from '@tauri-apps/plugin-notification'; * await removeAllActive() * ``` * @@ -487,7 +487,7 @@ async function removeAllActive(): Promise { * * @example * ```typescript - * import { createChannel, Importance, Visibility } from '@tauri-apps/api/notification'; + * import { createChannel, Importance, Visibility } from '@tauri-apps/plugin-notification'; * await createChannel({ * id: 'new-messages', * name: 'New Messages', @@ -511,7 +511,7 @@ async function createChannel(channel: Channel): Promise { * * @example * ```typescript - * import { removeChannel } from '@tauri-apps/api/notification'; + * import { removeChannel } from '@tauri-apps/plugin-notification'; * await removeChannel(); * ``` * @@ -528,7 +528,7 @@ async function removeChannel(id: string): Promise { * * @example * ```typescript - * import { channels } from '@tauri-apps/api/notification'; + * import { channels } from '@tauri-apps/plugin-notification'; * const notificationChannels = await channels(); * ``` * diff --git a/plugins/os/guest-js/index.ts b/plugins/os/guest-js/index.ts index 5c85b579..02803361 100644 --- a/plugins/os/guest-js/index.ts +++ b/plugins/os/guest-js/index.ts @@ -166,7 +166,7 @@ async function exeExtension(): Promise { * Returns the host name of the operating system. * @example * ```typescript - * import { hostname } from '@tauri-apps/api/os'; + * import { hostname } from '@tauri-apps/plugin-os'; * const hostname = await hostname(); * ``` */ diff --git a/plugins/window/guest-js/index.ts b/plugins/window/guest-js/index.ts index a685b6cf..b191d25f 100644 --- a/plugins/window/guest-js/index.ts +++ b/plugins/window/guest-js/index.ts @@ -1606,7 +1606,7 @@ class WindowManager extends WebviewWindowHandle { * @example * ```typescript * import { appWindow } from "@tauri-apps/plugin-window"; - * import { confirm } from '@tauri-apps/api/dialog'; + * import { confirm } from '@tauri-apps/plugin-dialog'; * const unlisten = await appWindow.onCloseRequested(async (event) => { * const confirmed = await confirm('Are you sure?'); * if (!confirmed) {