@lvce-editor/test-worker 4.8.0 → 4.10.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
@@ -81,8 +81,10 @@ declare const shouldHaveText: (expectedText: string) => Promise<void>;
81
81
  declare const selectIndex: (index: number) => Promise<void>;
82
82
  declare const selectCurrentIndex: () => Promise<void>;
83
83
  declare const openContextMenu$1: (index: number) => Promise<void>;
84
+ declare const handleDragLeave: (index: number) => Promise<void>;
84
85
  declare const focus$1: () => Promise<void>;
85
86
  declare const focusNext$2: () => Promise<void>;
87
+ declare const refresh: () => Promise<void>;
86
88
  declare const focusIndex: (index: number) => Promise<void>;
87
89
  declare const clickCurrent: () => Promise<void>;
88
90
  declare const handleArrowLeft: () => Promise<void>;
@@ -93,11 +95,14 @@ declare const expandRecursively: () => Promise<void>;
93
95
  declare const newFile: () => Promise<void>;
94
96
  declare const newFolder: () => Promise<void>;
95
97
  declare const handleClick$1: (index: number) => Promise<void>;
98
+ declare const handleDrop: (x: number, y: number, fileIds: readonly number[], fileList: FileList | readonly File[]) => Promise<void>;
96
99
  declare const rename$1: () => Promise<void>;
100
+ declare const renameDirent: () => Promise<void>;
97
101
  declare const cancelEdit: () => Promise<void>;
98
102
  declare const acceptEdit: () => Promise<void>;
99
103
  declare const updateEditingValue: (value: string) => Promise<void>;
100
104
  declare const expandAll: () => Promise<void>;
105
+ declare const handleDragOver: (x: number, y: number) => Promise<void>;
101
106
  declare const addWebExtension: (relativePath: string) => Promise<void>;
102
107
  declare const addNodeExtension: (relativePath: string) => Promise<void>;
103
108
  declare const selectFeature: (name: string) => Promise<void>;
@@ -105,6 +110,7 @@ declare const selectTab: (name: string) => Promise<void>;
105
110
  declare const open: (extensionId: string) => Promise<void>;
106
111
  declare const writeFile: (path: string, content: string) => Promise<void>;
107
112
  declare const mkdir: (path: string) => Promise<void>;
113
+ declare const remove: (uri: string) => Promise<void>;
108
114
  declare const getTmpDir: ({ scheme }?: {
109
115
  readonly scheme?: string;
110
116
  }) => Promise<string>;
@@ -248,7 +254,7 @@ declare namespace EditorCompletion {
248
254
  export { selectCurrentIndex, selectIndex };
249
255
  }
250
256
  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 };
257
+ 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, handleDragLeave, handleDragOver, handleDrop, newFile, newFolder, openContextMenu$1 as openContextMenu, refresh, removeDirent, rename$1 as rename, renameDirent, updateEditingValue };
252
258
  }
253
259
  declare namespace Extension {
254
260
  export { addNodeExtension, addWebExtension };
@@ -257,7 +263,7 @@ declare namespace ExtensionDetail {
257
263
  export { open, selectFeature, selectTab };
258
264
  }
259
265
  declare namespace FileSystem {
260
- export { chmod, createExecutable, createExecutableFrom, getTmpDir, mkdir, writeFile };
266
+ export { chmod, createExecutable, createExecutableFrom, getTmpDir, mkdir, remove, writeFile };
261
267
  }
262
268
  declare namespace FindWidget {
263
269
  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 => {
@@ -1726,12 +1726,18 @@ const TestFrameWorkComponentEditorCompletion = {
1726
1726
  const openContextMenu = async index => {
1727
1727
  await invoke('Explorer.handleContextMenuKeyboard', index);
1728
1728
  };
1729
+ const handleDragLeave = async index => {
1730
+ await invoke('Explorer.handleDragLeave', index);
1731
+ };
1729
1732
  const focus$1 = async () => {
1730
1733
  await invoke('Explorer.focusIndex', -1);
1731
1734
  };
1732
1735
  const focusNext$7 = async () => {
1733
1736
  await invoke('Explorer.focusNext');
1734
1737
  };
1738
+ const refresh = async () => {
1739
+ await invoke('Explorer.refresh');
1740
+ };
1735
1741
  const focusIndex$3 = async index => {
1736
1742
  await invoke('Explorer.focusIndex', index);
1737
1743
  };
@@ -1762,8 +1768,14 @@ const newFolder = async () => {
1762
1768
  const handleClick$1 = async index => {
1763
1769
  await invoke('Explorer.handleClick', index);
1764
1770
  };
1771
+ const handleDrop = async (x, y, fileIds, fileList) => {
1772
+ await invoke('Explorer.handleDrop', x, y, fileIds, fileIds);
1773
+ };
1765
1774
  const rename = async () => {
1766
- await invoke('Explorer.rename');
1775
+ await invoke('Explorer.renameDirent');
1776
+ };
1777
+ const renameDirent = async () => {
1778
+ await invoke('Explorer.renameDirent');
1767
1779
  };
1768
1780
  const cancelEdit = async () => {
1769
1781
  await invoke('Explorer.cancelEdit');
@@ -1777,6 +1789,9 @@ const updateEditingValue = async value => {
1777
1789
  const expandAll = async () => {
1778
1790
  await invoke('Explorer.expandAll');
1779
1791
  };
1792
+ const handleDragOver = async (x, y) => {
1793
+ await invoke('Explorer.handleDragOver', x, y);
1794
+ };
1780
1795
 
1781
1796
  const TestFrameWorkComponentExplorer = {
1782
1797
  __proto__: null,
@@ -1792,11 +1807,16 @@ const TestFrameWorkComponentExplorer = {
1792
1807
  focusNext: focusNext$7,
1793
1808
  handleArrowLeft,
1794
1809
  handleClick: handleClick$1,
1810
+ handleDragLeave,
1811
+ handleDragOver,
1812
+ handleDrop,
1795
1813
  newFile,
1796
1814
  newFolder,
1797
1815
  openContextMenu,
1816
+ refresh,
1798
1817
  removeDirent,
1799
1818
  rename,
1819
+ renameDirent,
1800
1820
  updateEditingValue
1801
1821
  };
1802
1822
 
@@ -1856,6 +1876,9 @@ const writeFile = async (path, content) => {
1856
1876
  const mkdir = async path => {
1857
1877
  await invoke('FileSystem.mkdir', path);
1858
1878
  };
1879
+ const remove = async uri => {
1880
+ await invoke('FileSystem.remove', uri);
1881
+ };
1859
1882
  const getTmpDir = async ({
1860
1883
  scheme = Memfs
1861
1884
  } = {}) => {
@@ -1894,6 +1917,7 @@ const TestFrameWorkComponentFileSystem = {
1894
1917
  createExecutableFrom,
1895
1918
  getTmpDir,
1896
1919
  mkdir,
1920
+ remove,
1897
1921
  writeFile
1898
1922
  };
1899
1923
 
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.10.0",
4
4
  "description": "Test Worker",
5
5
  "repository": {
6
6
  "type": "git",