@lvce-editor/test-worker 4.8.0 → 4.9.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/dist/api.d.ts CHANGED
@@ -83,6 +83,7 @@ declare const selectCurrentIndex: () => Promise<void>;
83
83
  declare const openContextMenu$1: (index: number) => Promise<void>;
84
84
  declare const focus$1: () => Promise<void>;
85
85
  declare const focusNext$2: () => Promise<void>;
86
+ declare const refresh: () => Promise<void>;
86
87
  declare const focusIndex: (index: number) => Promise<void>;
87
88
  declare const clickCurrent: () => Promise<void>;
88
89
  declare const handleArrowLeft: () => Promise<void>;
@@ -93,7 +94,9 @@ declare const expandRecursively: () => Promise<void>;
93
94
  declare const newFile: () => Promise<void>;
94
95
  declare const newFolder: () => Promise<void>;
95
96
  declare const handleClick$1: (index: number) => Promise<void>;
97
+ declare const handleDrop: (x: number, y: number, fileIds: readonly number[], fileList: FileList | readonly File[]) => Promise<void>;
96
98
  declare const rename$1: () => Promise<void>;
99
+ declare const renameDirent: () => Promise<void>;
97
100
  declare const cancelEdit: () => Promise<void>;
98
101
  declare const acceptEdit: () => Promise<void>;
99
102
  declare const updateEditingValue: (value: string) => Promise<void>;
@@ -105,6 +108,7 @@ declare const selectTab: (name: string) => Promise<void>;
105
108
  declare const open: (extensionId: string) => Promise<void>;
106
109
  declare const writeFile: (path: string, content: string) => Promise<void>;
107
110
  declare const mkdir: (path: string) => Promise<void>;
111
+ declare const remove: (uri: string) => Promise<void>;
108
112
  declare const getTmpDir: ({ scheme }?: {
109
113
  readonly scheme?: string;
110
114
  }) => Promise<string>;
@@ -248,7 +252,7 @@ declare namespace EditorCompletion {
248
252
  export { selectCurrentIndex, selectIndex };
249
253
  }
250
254
  declare namespace Explorer {
251
- export { acceptEdit, cancelEdit, clickCurrent, expandAll, expandRecursively, focus$1 as focus, focusFirst$1 as focusFirst, focusIndex, focusLast$1 as focusLast, focusNext$2 as focusNext, handleArrowLeft, handleClick$1 as handleClick, newFile, newFolder, openContextMenu$1 as openContextMenu, removeDirent, rename$1 as rename, updateEditingValue };
255
+ export { acceptEdit, cancelEdit, clickCurrent, expandAll, expandRecursively, focus$1 as focus, focusFirst$1 as focusFirst, focusIndex, focusLast$1 as focusLast, focusNext$2 as focusNext, handleArrowLeft, handleClick$1 as handleClick, handleDrop, newFile, newFolder, openContextMenu$1 as openContextMenu, refresh, removeDirent, rename$1 as rename, renameDirent, updateEditingValue };
252
256
  }
253
257
  declare namespace Extension {
254
258
  export { addNodeExtension, addWebExtension };
@@ -257,7 +261,7 @@ declare namespace ExtensionDetail {
257
261
  export { open, selectFeature, selectTab };
258
262
  }
259
263
  declare namespace FileSystem {
260
- export { chmod, createExecutable, createExecutableFrom, getTmpDir, mkdir, writeFile };
264
+ export { chmod, createExecutable, createExecutableFrom, getTmpDir, mkdir, remove, writeFile };
261
265
  }
262
266
  declare namespace FindWidget {
263
267
  export { focusNext$3 as focusNext, setValue };
@@ -530,7 +530,7 @@ const set$2 = (id, fn) => {
530
530
  const get$2 = id => {
531
531
  return callbacks[id];
532
532
  };
533
- const remove = id => {
533
+ const remove$1 = id => {
534
534
  delete callbacks[id];
535
535
  };
536
536
  let id = 0;
@@ -707,7 +707,7 @@ const resolve = (id, response) => {
707
707
  return;
708
708
  }
709
709
  fn(response);
710
- remove(id);
710
+ remove$1(id);
711
711
  };
712
712
  const E_COMMAND_NOT_FOUND = 'E_COMMAND_NOT_FOUND';
713
713
  const getErrorType = prettyError => {
@@ -1732,6 +1732,9 @@ const focus$1 = async () => {
1732
1732
  const focusNext$7 = async () => {
1733
1733
  await invoke('Explorer.focusNext');
1734
1734
  };
1735
+ const refresh = async () => {
1736
+ await invoke('Explorer.refresh');
1737
+ };
1735
1738
  const focusIndex$3 = async index => {
1736
1739
  await invoke('Explorer.focusIndex', index);
1737
1740
  };
@@ -1762,8 +1765,14 @@ const newFolder = async () => {
1762
1765
  const handleClick$1 = async index => {
1763
1766
  await invoke('Explorer.handleClick', index);
1764
1767
  };
1768
+ const handleDrop = async (x, y, fileIds, fileList) => {
1769
+ await invoke('Explorer.handleDrop', x, y, fileIds, fileIds);
1770
+ };
1765
1771
  const rename = async () => {
1766
- await invoke('Explorer.rename');
1772
+ await invoke('Explorer.renameDirent');
1773
+ };
1774
+ const renameDirent = async () => {
1775
+ await invoke('Explorer.renameDirent');
1767
1776
  };
1768
1777
  const cancelEdit = async () => {
1769
1778
  await invoke('Explorer.cancelEdit');
@@ -1792,11 +1801,14 @@ const TestFrameWorkComponentExplorer = {
1792
1801
  focusNext: focusNext$7,
1793
1802
  handleArrowLeft,
1794
1803
  handleClick: handleClick$1,
1804
+ handleDrop,
1795
1805
  newFile,
1796
1806
  newFolder,
1797
1807
  openContextMenu,
1808
+ refresh,
1798
1809
  removeDirent,
1799
1810
  rename,
1811
+ renameDirent,
1800
1812
  updateEditingValue
1801
1813
  };
1802
1814
 
@@ -1856,6 +1868,9 @@ const writeFile = async (path, content) => {
1856
1868
  const mkdir = async path => {
1857
1869
  await invoke('FileSystem.mkdir', path);
1858
1870
  };
1871
+ const remove = async uri => {
1872
+ await invoke('FileSystem.remove', uri);
1873
+ };
1859
1874
  const getTmpDir = async ({
1860
1875
  scheme = Memfs
1861
1876
  } = {}) => {
@@ -1894,6 +1909,7 @@ const TestFrameWorkComponentFileSystem = {
1894
1909
  createExecutableFrom,
1895
1910
  getTmpDir,
1896
1911
  mkdir,
1912
+ remove,
1897
1913
  writeFile
1898
1914
  };
1899
1915
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/test-worker",
3
- "version": "4.8.0",
3
+ "version": "4.9.0",
4
4
  "description": "Test Worker",
5
5
  "repository": {
6
6
  "type": "git",