@tauri-apps/plugin-opener 2.2.7 → 2.3.1

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 CHANGED
@@ -35,10 +35,13 @@ var core = require('@tauri-apps/api/core');
35
35
  *
36
36
  * @param url The URL to open.
37
37
  * @param openWith The app to open the URL with. If not specified, defaults to the system default application for the specified url type.
38
+ * On mobile, `openWith` can be provided as `inAppBrowser` to open the URL in an in-app browser. Otherwise, it will open the URL in the system default browser.
38
39
  *
39
40
  * @since 2.0.0
40
41
  */
41
- async function openUrl(url, openWith) {
42
+ async function openUrl(url,
43
+ // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
44
+ openWith) {
42
45
  await core.invoke('plugin:opener|open_url', {
43
46
  url,
44
47
  with: openWith
@@ -13,10 +13,11 @@
13
13
  *
14
14
  * @param url The URL to open.
15
15
  * @param openWith The app to open the URL with. If not specified, defaults to the system default application for the specified url type.
16
+ * On mobile, `openWith` can be provided as `inAppBrowser` to open the URL in an in-app browser. Otherwise, it will open the URL in the system default browser.
16
17
  *
17
18
  * @since 2.0.0
18
19
  */
19
- export declare function openUrl(url: string | URL, openWith?: string): Promise<void>;
20
+ export declare function openUrl(url: string | URL, openWith?: 'inAppBrowser' | string): Promise<void>;
20
21
  /**
21
22
  * Opens a path with the system's default app, or the one specified with {@linkcode openWith}.
22
23
  *
package/dist-js/index.js CHANGED
@@ -33,10 +33,13 @@ import { invoke } from '@tauri-apps/api/core';
33
33
  *
34
34
  * @param url The URL to open.
35
35
  * @param openWith The app to open the URL with. If not specified, defaults to the system default application for the specified url type.
36
+ * On mobile, `openWith` can be provided as `inAppBrowser` to open the URL in an in-app browser. Otherwise, it will open the URL in the system default browser.
36
37
  *
37
38
  * @since 2.0.0
38
39
  */
39
- async function openUrl(url, openWith) {
40
+ async function openUrl(url,
41
+ // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
42
+ openWith) {
40
43
  await invoke('plugin:opener|open_url', {
41
44
  url,
42
45
  with: openWith
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tauri-apps/plugin-opener",
3
- "version": "2.2.7",
3
+ "version": "2.3.1",
4
4
  "description": "Open files and URLs using their default application.",
5
5
  "license": "MIT OR Apache-2.0",
6
6
  "authors": [
package/dist-js/init.d.ts DELETED
@@ -1 +0,0 @@
1
- export {};