@tauri-apps/plugin-clipboard-manager 2.0.0-alpha.4 → 2.0.0-beta.0
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.js +3 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@ Install the Core plugin by adding the following to your `Cargo.toml` file:
|
|
|
18
18
|
|
|
19
19
|
```toml
|
|
20
20
|
[dependencies]
|
|
21
|
-
tauri-plugin-clipboard-manager = "2.0.0-
|
|
21
|
+
tauri-plugin-clipboard-manager = "2.0.0-beta"
|
|
22
22
|
# alternatively with Git:
|
|
23
23
|
tauri-plugin-clipboard-manager = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
|
|
24
24
|
```
|
package/dist-js/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var core = require('@tauri-apps/api/core');
|
|
4
4
|
|
|
5
5
|
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
|
6
6
|
// SPDX-License-Identifier: Apache-2.0
|
|
@@ -24,7 +24,7 @@ var primitives = require('@tauri-apps/api/primitives');
|
|
|
24
24
|
* @since 2.0.0
|
|
25
25
|
*/
|
|
26
26
|
async function writeText(text, opts) {
|
|
27
|
-
return
|
|
27
|
+
return core.invoke("plugin:clipboard-manager|write", {
|
|
28
28
|
data: {
|
|
29
29
|
plainText: {
|
|
30
30
|
label: opts?.label,
|
|
@@ -43,7 +43,7 @@ async function writeText(text, opts) {
|
|
|
43
43
|
* @since 2.0.0
|
|
44
44
|
*/
|
|
45
45
|
async function readText() {
|
|
46
|
-
const kind = await
|
|
46
|
+
const kind = await core.invoke("plugin:clipboard-manager|read");
|
|
47
47
|
return kind.plainText.text;
|
|
48
48
|
}
|
|
49
49
|
|
package/dist-js/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { invoke } from '@tauri-apps/api/
|
|
1
|
+
import { invoke } from '@tauri-apps/api/core';
|
|
2
2
|
|
|
3
3
|
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
|
4
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
@@ -22,7 +22,7 @@ import { invoke } from '@tauri-apps/api/primitives';
|
|
|
22
22
|
* @since 2.0.0
|
|
23
23
|
*/
|
|
24
24
|
async function writeText(text, opts) {
|
|
25
|
-
return invoke("plugin:clipboard|write", {
|
|
25
|
+
return invoke("plugin:clipboard-manager|write", {
|
|
26
26
|
data: {
|
|
27
27
|
plainText: {
|
|
28
28
|
label: opts?.label,
|
|
@@ -41,7 +41,7 @@ async function writeText(text, opts) {
|
|
|
41
41
|
* @since 2.0.0
|
|
42
42
|
*/
|
|
43
43
|
async function readText() {
|
|
44
|
-
const kind = await invoke("plugin:clipboard|read");
|
|
44
|
+
const kind = await invoke("plugin:clipboard-manager|read");
|
|
45
45
|
return kind.plainText.text;
|
|
46
46
|
}
|
|
47
47
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tauri-apps/plugin-clipboard-manager",
|
|
3
|
-
"version": "2.0.0-
|
|
3
|
+
"version": "2.0.0-beta.0",
|
|
4
4
|
"license": "MIT or APACHE-2.0",
|
|
5
5
|
"authors": [
|
|
6
6
|
"Tauri Programme within The Commons Conservancy"
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"LICENSE"
|
|
21
21
|
],
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@tauri-apps/api": "2.0.0-
|
|
23
|
+
"@tauri-apps/api": "2.0.0-beta.0"
|
|
24
24
|
},
|
|
25
25
|
"scripts": {
|
|
26
26
|
"build": "rollup -c"
|