@lvce-editor/renderer-process 30.65.0 → 30.65.2

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.
@@ -1493,6 +1493,18 @@ const track = (worker, startedIn = state$m.generation, trackedWorker) => {
1493
1493
  const remove$5 = worker => {
1494
1494
  workers$1.delete(worker);
1495
1495
  };
1496
+ const terminate$1 = id => {
1497
+ for (const [worker, metadata] of workers$1) {
1498
+ if (metadata.id !== id) continue;
1499
+ // The Workers view owns this worker. Keep it alive so it can finish the RPC
1500
+ // that requested termination and refresh the list.
1501
+ if (metadata.name === 'Workers View Worker') return false;
1502
+ workers$1.delete(worker);
1503
+ worker.terminate();
1504
+ return true;
1505
+ }
1506
+ return false;
1507
+ };
1496
1508
  const getWorkers$1 = () => workers$1.values().toArray();
1497
1509
  const terminateAll = () => {
1498
1510
  state$m.generation++;
@@ -10173,6 +10185,16 @@ const read = async () => {
10173
10185
  const normalized = normalizeItems(items);
10174
10186
  return normalized;
10175
10187
  };
10188
+ const readImage = async () => {
10189
+ const items = await navigator.clipboard.read();
10190
+ for (const item of items) {
10191
+ const type = item.types.find(type => type.startsWith('image/'));
10192
+ if (type) {
10193
+ return await item.getType(type);
10194
+ }
10195
+ }
10196
+ return undefined;
10197
+ };
10176
10198
  const writeText = async text => {
10177
10199
  string(text);
10178
10200
  await navigator.clipboard.writeText(text);
@@ -11840,12 +11862,14 @@ const readMicLevels = options => {
11840
11862
  };
11841
11863
 
11842
11864
  const getWorkers = getWorkers$1;
11865
+ const terminate = terminate$1;
11843
11866
 
11844
11867
  const commandMap = {
11845
11868
  'ApplicationHost.fileSaved': fileSaved,
11846
11869
  'Audio.play': play,
11847
11870
  'ClipBoard.execCopy': execCopy,
11848
11871
  'ClipBoard.read': read,
11872
+ 'ClipBoard.readImage': readImage,
11849
11873
  'ClipBoard.readText': readText,
11850
11874
  'ClipBoard.write': write$1,
11851
11875
  'ClipBoard.writeImage': writeImage,
@@ -11983,6 +12007,7 @@ const commandMap = {
11983
12007
  'WindowTitle.set': set$1,
11984
12008
  'Workbench.setModernUi': setModernUi,
11985
12009
  'Workers.getWorkers': getWorkers,
12010
+ 'Workers.terminate': terminate,
11986
12011
  'Workspace.setUri': setUri
11987
12012
  };
11988
12013
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/renderer-process",
3
- "version": "30.65.0",
3
+ "version": "30.65.2",
4
4
  "keywords": [
5
5
  "lvce-editor",
6
6
  "renderer-process"