@lvce-editor/renderer-process 30.65.0 → 30.65.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/rendererProcessMain.js +11 -0
- package/package.json +1 -1
|
@@ -10173,6 +10173,16 @@ const read = async () => {
|
|
|
10173
10173
|
const normalized = normalizeItems(items);
|
|
10174
10174
|
return normalized;
|
|
10175
10175
|
};
|
|
10176
|
+
const readImage = async () => {
|
|
10177
|
+
const items = await navigator.clipboard.read();
|
|
10178
|
+
for (const item of items) {
|
|
10179
|
+
const type = item.types.find(type => type.startsWith('image/'));
|
|
10180
|
+
if (type) {
|
|
10181
|
+
return await item.getType(type);
|
|
10182
|
+
}
|
|
10183
|
+
}
|
|
10184
|
+
return undefined;
|
|
10185
|
+
};
|
|
10176
10186
|
const writeText = async text => {
|
|
10177
10187
|
string(text);
|
|
10178
10188
|
await navigator.clipboard.writeText(text);
|
|
@@ -11846,6 +11856,7 @@ const commandMap = {
|
|
|
11846
11856
|
'Audio.play': play,
|
|
11847
11857
|
'ClipBoard.execCopy': execCopy,
|
|
11848
11858
|
'ClipBoard.read': read,
|
|
11859
|
+
'ClipBoard.readImage': readImage,
|
|
11849
11860
|
'ClipBoard.readText': readText,
|
|
11850
11861
|
'ClipBoard.write': write$1,
|
|
11851
11862
|
'ClipBoard.writeImage': writeImage,
|