@tauri-apps/plugin-opener 3.0.0-alpha.1 → 3.0.0-alpha.3
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/README.md +1 -1
- package/dist-js/index.cjs +7 -7
- package/dist-js/index.d.ts +5 -5
- package/dist-js/index.js +7 -7
- package/package.json +2 -2
package/README.md
CHANGED
package/dist-js/index.cjs
CHANGED
|
@@ -72,7 +72,7 @@ async function openPath(path, openWith) {
|
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
74
|
/**
|
|
75
|
-
* Reveal
|
|
75
|
+
* Reveal one or more paths with the system's default explorer.
|
|
76
76
|
*
|
|
77
77
|
* #### Platform-specific:
|
|
78
78
|
*
|
|
@@ -80,20 +80,20 @@ async function openPath(path, openWith) {
|
|
|
80
80
|
*
|
|
81
81
|
* @example
|
|
82
82
|
* ```typescript
|
|
83
|
-
* import {
|
|
84
|
-
* await
|
|
85
|
-
* await
|
|
83
|
+
* import { revealItemsInDir } from '@tauri-apps/plugin-opener';
|
|
84
|
+
* await revealItemsInDir('/path/to/file');
|
|
85
|
+
* await revealItemsInDir([ '/path/to/file', '/path/to/another/file' ]);
|
|
86
86
|
* ```
|
|
87
87
|
*
|
|
88
88
|
* @param path The path to reveal.
|
|
89
89
|
*
|
|
90
90
|
* @since 2.0.0
|
|
91
91
|
*/
|
|
92
|
-
async function
|
|
92
|
+
async function revealItemsInDir(path) {
|
|
93
93
|
const paths = typeof path === 'string' ? [path] : path;
|
|
94
|
-
return core.invoke('plugin:opener|
|
|
94
|
+
return core.invoke('plugin:opener|reveal_items_in_dir', { paths });
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
exports.openPath = openPath;
|
|
98
98
|
exports.openUrl = openUrl;
|
|
99
|
-
exports.
|
|
99
|
+
exports.revealItemsInDir = revealItemsInDir;
|
package/dist-js/index.d.ts
CHANGED
|
@@ -38,7 +38,7 @@ export declare function openUrl(url: string | URL, openWith?: 'inAppBrowser' | s
|
|
|
38
38
|
*/
|
|
39
39
|
export declare function openPath(path: string, openWith?: string): Promise<void>;
|
|
40
40
|
/**
|
|
41
|
-
* Reveal
|
|
41
|
+
* Reveal one or more paths with the system's default explorer.
|
|
42
42
|
*
|
|
43
43
|
* #### Platform-specific:
|
|
44
44
|
*
|
|
@@ -46,13 +46,13 @@ export declare function openPath(path: string, openWith?: string): Promise<void>
|
|
|
46
46
|
*
|
|
47
47
|
* @example
|
|
48
48
|
* ```typescript
|
|
49
|
-
* import {
|
|
50
|
-
* await
|
|
51
|
-
* await
|
|
49
|
+
* import { revealItemsInDir } from '@tauri-apps/plugin-opener';
|
|
50
|
+
* await revealItemsInDir('/path/to/file');
|
|
51
|
+
* await revealItemsInDir([ '/path/to/file', '/path/to/another/file' ]);
|
|
52
52
|
* ```
|
|
53
53
|
*
|
|
54
54
|
* @param path The path to reveal.
|
|
55
55
|
*
|
|
56
56
|
* @since 2.0.0
|
|
57
57
|
*/
|
|
58
|
-
export declare function
|
|
58
|
+
export declare function revealItemsInDir(path: string | string[]): Promise<void>;
|
package/dist-js/index.js
CHANGED
|
@@ -70,7 +70,7 @@ async function openPath(path, openWith) {
|
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
72
|
/**
|
|
73
|
-
* Reveal
|
|
73
|
+
* Reveal one or more paths with the system's default explorer.
|
|
74
74
|
*
|
|
75
75
|
* #### Platform-specific:
|
|
76
76
|
*
|
|
@@ -78,18 +78,18 @@ async function openPath(path, openWith) {
|
|
|
78
78
|
*
|
|
79
79
|
* @example
|
|
80
80
|
* ```typescript
|
|
81
|
-
* import {
|
|
82
|
-
* await
|
|
83
|
-
* await
|
|
81
|
+
* import { revealItemsInDir } from '@tauri-apps/plugin-opener';
|
|
82
|
+
* await revealItemsInDir('/path/to/file');
|
|
83
|
+
* await revealItemsInDir([ '/path/to/file', '/path/to/another/file' ]);
|
|
84
84
|
* ```
|
|
85
85
|
*
|
|
86
86
|
* @param path The path to reveal.
|
|
87
87
|
*
|
|
88
88
|
* @since 2.0.0
|
|
89
89
|
*/
|
|
90
|
-
async function
|
|
90
|
+
async function revealItemsInDir(path) {
|
|
91
91
|
const paths = typeof path === 'string' ? [path] : path;
|
|
92
|
-
return invoke('plugin:opener|
|
|
92
|
+
return invoke('plugin:opener|reveal_items_in_dir', { paths });
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
export { openPath, openUrl,
|
|
95
|
+
export { openPath, openUrl, revealItemsInDir };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tauri-apps/plugin-opener",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.3",
|
|
4
4
|
"description": "Open files and URLs using their default application.",
|
|
5
5
|
"license": "MIT OR Apache-2.0",
|
|
6
6
|
"authors": [
|
|
@@ -25,6 +25,6 @@
|
|
|
25
25
|
"LICENSE"
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@tauri-apps/api": "^3.0.0-alpha.
|
|
28
|
+
"@tauri-apps/api": "^3.0.0-alpha.2"
|
|
29
29
|
}
|
|
30
30
|
}
|