46 lines
1.1 KiB
JavaScript
46 lines
1.1 KiB
JavaScript
import {
|
|
Image,
|
|
transformImage
|
|
} from "./chunk-26G4VO4R.js";
|
|
import {
|
|
invoke
|
|
} from "./chunk-DSY64NDS.js";
|
|
import "./chunk-DC5AMYBS.js";
|
|
|
|
// node_modules/.pnpm/@tauri-apps+plugin-clipboard-manager@2.3.0/node_modules/@tauri-apps/plugin-clipboard-manager/dist-js/index.js
|
|
async function writeText(text, opts) {
|
|
await invoke("plugin:clipboard-manager|write_text", {
|
|
label: opts == null ? void 0 : opts.label,
|
|
text
|
|
});
|
|
}
|
|
async function readText() {
|
|
return await invoke("plugin:clipboard-manager|read_text");
|
|
}
|
|
async function writeImage(image) {
|
|
await invoke("plugin:clipboard-manager|write_image", {
|
|
image: transformImage(image)
|
|
});
|
|
}
|
|
async function readImage() {
|
|
return await invoke("plugin:clipboard-manager|read_image").then((rid) => new Image(rid));
|
|
}
|
|
async function writeHtml(html, altText) {
|
|
await invoke("plugin:clipboard-manager|write_html", {
|
|
html,
|
|
altText
|
|
});
|
|
}
|
|
async function clear() {
|
|
await invoke("plugin:clipboard-manager|clear");
|
|
}
|
|
export {
|
|
clear,
|
|
readImage,
|
|
readText,
|
|
writeHtml,
|
|
writeImage,
|
|
writeText
|
|
};
|
|
//# sourceMappingURL=@tauri-apps_plugin-clipboard-manager.js.map
|