@lvce-editor/renderer-process 12.0.0 → 12.1.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.
@@ -98,6 +98,7 @@ const getModuleId = commandId => {
98
98
  case 'FilePicker.showSaveFilePicker':
99
99
  return FilePicker;
100
100
  case 'FileSystemHandle.requestPermission':
101
+ case 'FileSystemHandle.getFileHandles':
101
102
  return FileSystemHandle;
102
103
  case 'ImagePreview.create':
103
104
  case 'ImagePreview.dispose':
@@ -354,7 +355,7 @@ const ipcs = Object.create(null);
354
355
  const set$9 = (name, ipc) => {
355
356
  ipcs[name] = ipc;
356
357
  };
357
- const get$a = name => {
358
+ const get$9 = name => {
358
359
  return ipcs[name];
359
360
  };
360
361
  const remove$4 = name => {
@@ -462,7 +463,7 @@ const callbacks = Object.create(null);
462
463
  const set$8 = (id, fn) => {
463
464
  callbacks[id] = fn;
464
465
  };
465
- const get$9 = id => {
466
+ const get$8 = id => {
466
467
  return callbacks[id];
467
468
  };
468
469
  const remove$3 = id => {
@@ -635,7 +636,7 @@ const warn$1 = (...args) => {
635
636
  console.warn(...args);
636
637
  };
637
638
  const resolve = (id, response) => {
638
- const fn = get$9(id);
639
+ const fn = get$8(id);
639
640
  if (!fn) {
640
641
  console.log(response);
641
642
  warn$1(`callback ${id} may already be disposed`);
@@ -999,7 +1000,7 @@ const create$I = async ({
999
1000
  }
1000
1001
  // TODO rename method
1001
1002
  // TODO avoid cyclic dependency
1002
- const port = get$a(options.name);
1003
+ const port = get$9(options.name);
1003
1004
  remove$4(options.name);
1004
1005
  await invokeAndTransfer('Transferrable.transfer', options.id, port);
1005
1006
  return;
@@ -1694,11 +1695,11 @@ const create$H = () => {
1694
1695
  return ++id;
1695
1696
  };
1696
1697
  const state$8 = Object.create(null);
1697
- const get$8 = id => {
1698
+ const get$7 = id => {
1698
1699
  return state$8[id];
1699
1700
  };
1700
- const getFileHandles = async ids => {
1701
- const promises = ids.map(id => get$8(id));
1701
+ const getFileHandles$1 = async ids => {
1702
+ const promises = ids.map(id => get$7(id));
1702
1703
  const handles = await Promise.all(promises);
1703
1704
  return handles;
1704
1705
  };
@@ -1894,7 +1895,7 @@ const rememberFocus$1 = ($Viewlet, dom, eventMap, uid = 0) => {
1894
1895
  };
1895
1896
 
1896
1897
  const set$6 = setComponentUid;
1897
- const get$7 = getComponentUid;
1898
+ const get$6 = getComponentUid;
1898
1899
  const fromEvent = getComponentUidFromEvent;
1899
1900
 
1900
1901
  const applyUidWorkaround = element => {
@@ -1904,7 +1905,7 @@ const applyUidWorkaround = element => {
1904
1905
  if (!editor) {
1905
1906
  throw new Error('no editor found');
1906
1907
  }
1907
- const editorUid = get$7(editor);
1908
+ const editorUid = get$6(editor);
1908
1909
  set$6(element, editorUid);
1909
1910
  };
1910
1911
 
@@ -4245,14 +4246,17 @@ const ConfirmPrompt_ipc = {
4245
4246
  name: name$x
4246
4247
  };
4247
4248
 
4248
- const get$6 = ids => {
4249
+ const requestPermission = (handle, options) => {
4250
+ return handle.requestPermission(options);
4251
+ };
4252
+ const getFileHandles = ids => {
4249
4253
  // @ts-ignore
4250
- return getFileHandles(ids);
4254
+ return getFileHandles$1(ids);
4251
4255
  };
4252
4256
 
4253
4257
  const name$w = 'FileHandles';
4254
4258
  const Commands$x = {
4255
- get: get$6
4259
+ get: getFileHandles
4256
4260
  };
4257
4261
 
4258
4262
  const FileHandles_ipc = {
@@ -4475,13 +4479,10 @@ const FilePicker_ipc = {
4475
4479
  name: name$r
4476
4480
  };
4477
4481
 
4478
- const requestPermission = (handle, options) => {
4479
- return handle.requestPermission(options);
4480
- };
4481
-
4482
4482
  const name$q = 'FileSystemHandle';
4483
4483
  const Commands$r = {
4484
- requestPermission: requestPermission
4484
+ requestPermission: requestPermission,
4485
+ getFileHandles: getFileHandles
4485
4486
  };
4486
4487
 
4487
4488
  const FileSystemHandle_ipc = {
@@ -8598,7 +8599,7 @@ const getUid = () => {
8598
8599
  if (!$Main) {
8599
8600
  return 0;
8600
8601
  }
8601
- return get$7($Main);
8602
+ return get$6($Main);
8602
8603
  };
8603
8604
  const handleTabsWheel = event => {
8604
8605
  const uid = getUid();
@@ -10438,7 +10439,7 @@ const setDom2 = (viewletId, dom) => {
10438
10439
  let uid;
10439
10440
  if ($Viewlet) {
10440
10441
  try {
10441
- uid = get$7($Viewlet);
10442
+ uid = get$6($Viewlet);
10442
10443
  } catch {}
10443
10444
  }
10444
10445
  // TODO optimize rendering with virtual dom diffing
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/renderer-process",
3
- "version": "12.0.0",
3
+ "version": "12.1.0",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "lvce-editor",