@lvce-editor/test-worker 4.24.0 → 4.26.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 +11 -1
- package/dist/testWorkerMain.js +37 -2
- package/package.json +1 -1
package/dist/api.d.ts
CHANGED
|
@@ -15,6 +15,10 @@ declare const handleClick: (index: number) => Promise<void>;
|
|
|
15
15
|
declare const handleContextMenu: () => Promise<void>;
|
|
16
16
|
declare const selectCurrent: () => Promise<void>;
|
|
17
17
|
declare const getBaseUrl: () => string;
|
|
18
|
+
declare const readNativeFiles: () => Promise<void>;
|
|
19
|
+
declare const writeNativeFiles: (uris: readonly string[]) => Promise<void>;
|
|
20
|
+
declare const enableMemoryClipBoard: () => Promise<void>;
|
|
21
|
+
declare const disableMemoryClipBoard: () => Promise<void>;
|
|
18
22
|
declare const execute: (id: string, ...args: readonly any[]) => Promise<any>;
|
|
19
23
|
declare const selectItem: (text: string) => Promise<void>;
|
|
20
24
|
declare const openIframeInspector: () => Promise<void>;
|
|
@@ -109,6 +113,8 @@ declare const acceptEdit: () => Promise<void>;
|
|
|
109
113
|
declare const updateEditingValue: (value: string) => Promise<void>;
|
|
110
114
|
declare const expandAll: () => Promise<void>;
|
|
111
115
|
declare const handleDragOver: (x: number, y: number) => Promise<void>;
|
|
116
|
+
declare const handleCut: () => Promise<void>;
|
|
117
|
+
declare const handlePaste: () => Promise<void>;
|
|
112
118
|
declare const selectIndices: (indices: readonly number[]) => Promise<void>;
|
|
113
119
|
declare const addWebExtension: (relativePath: string) => Promise<void>;
|
|
114
120
|
declare const addNodeExtension: (relativePath: string) => Promise<void>;
|
|
@@ -253,6 +259,9 @@ declare namespace ActivityBar {
|
|
|
253
259
|
declare namespace BaseUrl {
|
|
254
260
|
export { getBaseUrl };
|
|
255
261
|
}
|
|
262
|
+
declare namespace ClipBoard {
|
|
263
|
+
export { disableMemoryClipBoard, enableMemoryClipBoard, readNativeFiles, writeNativeFiles };
|
|
264
|
+
}
|
|
256
265
|
declare namespace Command {
|
|
257
266
|
export { execute };
|
|
258
267
|
}
|
|
@@ -269,7 +278,7 @@ declare namespace EditorCompletion {
|
|
|
269
278
|
export { selectCurrentIndex, selectIndex };
|
|
270
279
|
}
|
|
271
280
|
declare namespace Explorer {
|
|
272
|
-
export { acceptEdit, cancelEdit, clickCurrent, expandAll, expandRecursively, focus$1 as focus, focusFirst$1 as focusFirst, focusIndex, focusLast$1 as focusLast, focusNext$2 as focusNext, handleArrowLeft, handleBlur, handleClick$1 as handleClick, handleClickAt, handleDragLeave, handleDragOver, handleDrop, handleInputBlur, newFile, newFolder, openContextMenu$1 as openContextMenu, refresh, removeDirent, rename$1 as rename, renameDirent, selectAll$1 as selectAll, selectDown, selectIndices, selectUp, updateEditingValue };
|
|
281
|
+
export { acceptEdit, cancelEdit, clickCurrent, expandAll, expandRecursively, focus$1 as focus, focusFirst$1 as focusFirst, focusIndex, focusLast$1 as focusLast, focusNext$2 as focusNext, handleArrowLeft, handleBlur, handleClick$1 as handleClick, handleClickAt, handleCut, handleDragLeave, handleDragOver, handleDrop, handleInputBlur, handlePaste, newFile, newFolder, openContextMenu$1 as openContextMenu, refresh, removeDirent, rename$1 as rename, renameDirent, selectAll$1 as selectAll, selectDown, selectIndices, selectUp, updateEditingValue };
|
|
273
282
|
}
|
|
274
283
|
declare namespace Extension {
|
|
275
284
|
export { addNodeExtension, addWebExtension };
|
|
@@ -339,6 +348,7 @@ export interface TestApi {
|
|
|
339
348
|
readonly About: typeof About,
|
|
340
349
|
readonly ActivityBar: typeof ActivityBar,
|
|
341
350
|
readonly BaseUrl: typeof BaseUrl,
|
|
351
|
+
readonly ClipBoard: typeof ClipBoard,
|
|
342
352
|
readonly Command: typeof Command,
|
|
343
353
|
readonly ContextMenu: typeof ContextMenu,
|
|
344
354
|
readonly Developer: typeof Developer,
|
package/dist/testWorkerMain.js
CHANGED
|
@@ -1003,7 +1003,7 @@ const printTestError = async error => {
|
|
|
1003
1003
|
};
|
|
1004
1004
|
|
|
1005
1005
|
const rpcs = Object.create(null);
|
|
1006
|
-
const set$
|
|
1006
|
+
const set$g = (id, rpc) => {
|
|
1007
1007
|
rpcs[id] = rpc;
|
|
1008
1008
|
};
|
|
1009
1009
|
const get$1 = id => {
|
|
@@ -1027,7 +1027,7 @@ const create$1 = rpcId => {
|
|
|
1027
1027
|
return rpc.invokeAndTransfer(method, ...params);
|
|
1028
1028
|
},
|
|
1029
1029
|
set(rpc) {
|
|
1030
|
-
set$
|
|
1030
|
+
set$g(rpcId, rpc);
|
|
1031
1031
|
},
|
|
1032
1032
|
async dispose() {
|
|
1033
1033
|
const rpc = get$1(rpcId);
|
|
@@ -1658,6 +1658,30 @@ const TestFrameWorkComponentBaseUrl = {
|
|
|
1658
1658
|
getBaseUrl
|
|
1659
1659
|
};
|
|
1660
1660
|
|
|
1661
|
+
const readNativeFiles = async () => {
|
|
1662
|
+
await invoke('ClipBoard.readNativeFiles');
|
|
1663
|
+
};
|
|
1664
|
+
const writeNativeFiles = async uris => {
|
|
1665
|
+
// @ts-ignore
|
|
1666
|
+
await invoke('ClipBoard.writeNativeFiles', uris);
|
|
1667
|
+
};
|
|
1668
|
+
const enableMemoryClipBoard = async () => {
|
|
1669
|
+
// @ts-ignore
|
|
1670
|
+
await invoke('ClipBoard.enableMemoryClipBoard');
|
|
1671
|
+
};
|
|
1672
|
+
const disableMemoryClipBoard = async () => {
|
|
1673
|
+
// @ts-ignore
|
|
1674
|
+
await invoke('ClipBoard.disableMemoryClipBoard');
|
|
1675
|
+
};
|
|
1676
|
+
|
|
1677
|
+
const TestFrameworkComponentClipBoard = {
|
|
1678
|
+
__proto__: null,
|
|
1679
|
+
disableMemoryClipBoard,
|
|
1680
|
+
enableMemoryClipBoard,
|
|
1681
|
+
readNativeFiles,
|
|
1682
|
+
writeNativeFiles
|
|
1683
|
+
};
|
|
1684
|
+
|
|
1661
1685
|
const execute$1 = async (id, ...args) => {
|
|
1662
1686
|
// @ts-ignore
|
|
1663
1687
|
return invoke(id, ...args);
|
|
@@ -2056,6 +2080,14 @@ const expandAll = async () => {
|
|
|
2056
2080
|
const handleDragOver = async (x, y) => {
|
|
2057
2081
|
await invoke('Explorer.handleDragOver', x, y);
|
|
2058
2082
|
};
|
|
2083
|
+
const handleCut = async () => {
|
|
2084
|
+
// @ts-ignore
|
|
2085
|
+
await invoke('Explorer.handleCut');
|
|
2086
|
+
};
|
|
2087
|
+
const handlePaste = async () => {
|
|
2088
|
+
// @ts-ignore
|
|
2089
|
+
await invoke('Explorer.handlePaste');
|
|
2090
|
+
};
|
|
2059
2091
|
const selectIndices = async indices => {
|
|
2060
2092
|
await invoke('Explorer.selectIndices', indices);
|
|
2061
2093
|
};
|
|
@@ -2076,10 +2108,12 @@ const TestFrameWorkComponentExplorer = {
|
|
|
2076
2108
|
handleBlur,
|
|
2077
2109
|
handleClick: handleClick$1,
|
|
2078
2110
|
handleClickAt: handleClickAt$1,
|
|
2111
|
+
handleCut,
|
|
2079
2112
|
handleDragLeave,
|
|
2080
2113
|
handleDragOver,
|
|
2081
2114
|
handleDrop,
|
|
2082
2115
|
handleInputBlur,
|
|
2116
|
+
handlePaste,
|
|
2083
2117
|
newFile,
|
|
2084
2118
|
newFolder,
|
|
2085
2119
|
openContextMenu,
|
|
@@ -2931,6 +2965,7 @@ const TestFrameWorkComponent = {
|
|
|
2931
2965
|
About: TestFrameWorkComponentAbout,
|
|
2932
2966
|
ActivityBar: TestFrameworkComponentActivityBar,
|
|
2933
2967
|
BaseUrl: TestFrameWorkComponentBaseUrl,
|
|
2968
|
+
ClipBoard: TestFrameworkComponentClipBoard,
|
|
2934
2969
|
Command: TestFrameWorkComponentCommand,
|
|
2935
2970
|
ContextMenu: TestFrameWorkComponentContextMenu,
|
|
2936
2971
|
Developer: TestFrameWorkComponentDeveloper,
|