@lvce-editor/test-worker 4.7.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 +7 -2
- package/dist/testWorkerMain.js +23 -3
- package/package.json +1 -1
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>;
|
|
@@ -91,8 +92,11 @@ declare const focusFirst$1: () => Promise<void>;
|
|
|
91
92
|
declare const removeDirent: () => Promise<void>;
|
|
92
93
|
declare const expandRecursively: () => Promise<void>;
|
|
93
94
|
declare const newFile: () => Promise<void>;
|
|
95
|
+
declare const newFolder: () => Promise<void>;
|
|
94
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>;
|
|
95
98
|
declare const rename$1: () => Promise<void>;
|
|
99
|
+
declare const renameDirent: () => Promise<void>;
|
|
96
100
|
declare const cancelEdit: () => Promise<void>;
|
|
97
101
|
declare const acceptEdit: () => Promise<void>;
|
|
98
102
|
declare const updateEditingValue: (value: string) => Promise<void>;
|
|
@@ -104,6 +108,7 @@ declare const selectTab: (name: string) => Promise<void>;
|
|
|
104
108
|
declare const open: (extensionId: string) => Promise<void>;
|
|
105
109
|
declare const writeFile: (path: string, content: string) => Promise<void>;
|
|
106
110
|
declare const mkdir: (path: string) => Promise<void>;
|
|
111
|
+
declare const remove: (uri: string) => Promise<void>;
|
|
107
112
|
declare const getTmpDir: ({ scheme }?: {
|
|
108
113
|
readonly scheme?: string;
|
|
109
114
|
}) => Promise<string>;
|
|
@@ -247,7 +252,7 @@ declare namespace EditorCompletion {
|
|
|
247
252
|
export { selectCurrentIndex, selectIndex };
|
|
248
253
|
}
|
|
249
254
|
declare namespace Explorer {
|
|
250
|
-
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, 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 };
|
|
251
256
|
}
|
|
252
257
|
declare namespace Extension {
|
|
253
258
|
export { addNodeExtension, addWebExtension };
|
|
@@ -256,7 +261,7 @@ declare namespace ExtensionDetail {
|
|
|
256
261
|
export { open, selectFeature, selectTab };
|
|
257
262
|
}
|
|
258
263
|
declare namespace FileSystem {
|
|
259
|
-
export { chmod, createExecutable, createExecutableFrom, getTmpDir, mkdir, writeFile };
|
|
264
|
+
export { chmod, createExecutable, createExecutableFrom, getTmpDir, mkdir, remove, writeFile };
|
|
260
265
|
}
|
|
261
266
|
declare namespace FindWidget {
|
|
262
267
|
export { focusNext$3 as focusNext, setValue };
|
package/dist/testWorkerMain.js
CHANGED
|
@@ -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
|
};
|
|
@@ -1756,11 +1759,20 @@ const expandRecursively = async () => {
|
|
|
1756
1759
|
const newFile = async () => {
|
|
1757
1760
|
await invoke('Explorer.newFile');
|
|
1758
1761
|
};
|
|
1762
|
+
const newFolder = async () => {
|
|
1763
|
+
await invoke('Explorer.newFolder');
|
|
1764
|
+
};
|
|
1759
1765
|
const handleClick$1 = async index => {
|
|
1760
1766
|
await invoke('Explorer.handleClick', index);
|
|
1761
1767
|
};
|
|
1768
|
+
const handleDrop = async (x, y, fileIds, fileList) => {
|
|
1769
|
+
await invoke('Explorer.handleDrop', x, y, fileIds, fileIds);
|
|
1770
|
+
};
|
|
1762
1771
|
const rename = async () => {
|
|
1763
|
-
await invoke('Explorer.
|
|
1772
|
+
await invoke('Explorer.renameDirent');
|
|
1773
|
+
};
|
|
1774
|
+
const renameDirent = async () => {
|
|
1775
|
+
await invoke('Explorer.renameDirent');
|
|
1764
1776
|
};
|
|
1765
1777
|
const cancelEdit = async () => {
|
|
1766
1778
|
await invoke('Explorer.cancelEdit');
|
|
@@ -1789,10 +1801,14 @@ const TestFrameWorkComponentExplorer = {
|
|
|
1789
1801
|
focusNext: focusNext$7,
|
|
1790
1802
|
handleArrowLeft,
|
|
1791
1803
|
handleClick: handleClick$1,
|
|
1804
|
+
handleDrop,
|
|
1792
1805
|
newFile,
|
|
1806
|
+
newFolder,
|
|
1793
1807
|
openContextMenu,
|
|
1808
|
+
refresh,
|
|
1794
1809
|
removeDirent,
|
|
1795
1810
|
rename,
|
|
1811
|
+
renameDirent,
|
|
1796
1812
|
updateEditingValue
|
|
1797
1813
|
};
|
|
1798
1814
|
|
|
@@ -1852,6 +1868,9 @@ const writeFile = async (path, content) => {
|
|
|
1852
1868
|
const mkdir = async path => {
|
|
1853
1869
|
await invoke('FileSystem.mkdir', path);
|
|
1854
1870
|
};
|
|
1871
|
+
const remove = async uri => {
|
|
1872
|
+
await invoke('FileSystem.remove', uri);
|
|
1873
|
+
};
|
|
1855
1874
|
const getTmpDir = async ({
|
|
1856
1875
|
scheme = Memfs
|
|
1857
1876
|
} = {}) => {
|
|
@@ -1890,6 +1909,7 @@ const TestFrameWorkComponentFileSystem = {
|
|
|
1890
1909
|
createExecutableFrom,
|
|
1891
1910
|
getTmpDir,
|
|
1892
1911
|
mkdir,
|
|
1912
|
+
remove,
|
|
1893
1913
|
writeFile
|
|
1894
1914
|
};
|
|
1895
1915
|
|