@tauri-apps/plugin-clipboard-manager 2.0.0 → 2.0.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/README.md +1 -1
- package/dist-js/index.cjs +3 -3
- package/dist-js/index.d.ts +2 -2
- package/dist-js/index.js +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ Read and write to the system clipboard.
|
|
|
12
12
|
|
|
13
13
|
## Install
|
|
14
14
|
|
|
15
|
-
_This plugin requires a Rust version of at least **1.
|
|
15
|
+
_This plugin requires a Rust version of at least **1.77.2**_
|
|
16
16
|
|
|
17
17
|
There are three general methods of installation that we can recommend.
|
|
18
18
|
|
package/dist-js/index.cjs
CHANGED
|
@@ -82,7 +82,7 @@ async function writeImage(image$1) {
|
|
|
82
82
|
* import { readImage } from '@tauri-apps/plugin-clipboard-manager';
|
|
83
83
|
*
|
|
84
84
|
* const clipboardImage = await readImage();
|
|
85
|
-
* const blob = new Blob([clipboardImage.
|
|
85
|
+
* const blob = new Blob([await clipboardImage.rbga()], { type: 'image' })
|
|
86
86
|
* const url = URL.createObjectURL(blob)
|
|
87
87
|
* ```
|
|
88
88
|
* @since 2.0.0
|
|
@@ -109,10 +109,10 @@ async function readImage() {
|
|
|
109
109
|
*
|
|
110
110
|
* @since 2.0.0
|
|
111
111
|
*/
|
|
112
|
-
async function writeHtml(html,
|
|
112
|
+
async function writeHtml(html, altText) {
|
|
113
113
|
await core.invoke('plugin:clipboard-manager|write_html', {
|
|
114
114
|
html,
|
|
115
|
-
|
|
115
|
+
altText
|
|
116
116
|
});
|
|
117
117
|
}
|
|
118
118
|
/**
|
package/dist-js/index.d.ts
CHANGED
|
@@ -61,7 +61,7 @@ declare function writeImage(image: string | Image | Uint8Array | ArrayBuffer | n
|
|
|
61
61
|
* import { readImage } from '@tauri-apps/plugin-clipboard-manager';
|
|
62
62
|
*
|
|
63
63
|
* const clipboardImage = await readImage();
|
|
64
|
-
* const blob = new Blob([clipboardImage.
|
|
64
|
+
* const blob = new Blob([await clipboardImage.rbga()], { type: 'image' })
|
|
65
65
|
* const url = URL.createObjectURL(blob)
|
|
66
66
|
* ```
|
|
67
67
|
* @since 2.0.0
|
|
@@ -86,7 +86,7 @@ declare function readImage(): Promise<Image>;
|
|
|
86
86
|
*
|
|
87
87
|
* @since 2.0.0
|
|
88
88
|
*/
|
|
89
|
-
declare function writeHtml(html: string,
|
|
89
|
+
declare function writeHtml(html: string, altText?: string): Promise<void>;
|
|
90
90
|
/**
|
|
91
91
|
* Clears the clipboard.
|
|
92
92
|
*
|
package/dist-js/index.js
CHANGED
|
@@ -80,7 +80,7 @@ async function writeImage(image) {
|
|
|
80
80
|
* import { readImage } from '@tauri-apps/plugin-clipboard-manager';
|
|
81
81
|
*
|
|
82
82
|
* const clipboardImage = await readImage();
|
|
83
|
-
* const blob = new Blob([clipboardImage.
|
|
83
|
+
* const blob = new Blob([await clipboardImage.rbga()], { type: 'image' })
|
|
84
84
|
* const url = URL.createObjectURL(blob)
|
|
85
85
|
* ```
|
|
86
86
|
* @since 2.0.0
|
|
@@ -107,10 +107,10 @@ async function readImage() {
|
|
|
107
107
|
*
|
|
108
108
|
* @since 2.0.0
|
|
109
109
|
*/
|
|
110
|
-
async function writeHtml(html,
|
|
110
|
+
async function writeHtml(html, altText) {
|
|
111
111
|
await invoke('plugin:clipboard-manager|write_html', {
|
|
112
112
|
html,
|
|
113
|
-
|
|
113
|
+
altText
|
|
114
114
|
});
|
|
115
115
|
}
|
|
116
116
|
/**
|