@lvce-editor/test-worker 7.7.0 → 7.8.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 +2 -0
- package/dist/testWorkerMain.js +11 -0
- package/package.json +1 -1
package/dist/api.d.ts
CHANGED
|
@@ -236,6 +236,7 @@ interface Explorer {
|
|
|
236
236
|
readonly handleDragOver: (x: number, y: number) => Promise<void>;
|
|
237
237
|
readonly handleDragOverIndex: (index: number) => Promise<void>;
|
|
238
238
|
readonly handleDrop: (x: number, y: number, fileIds: readonly number[], fileList: FileList | readonly File[]) => Promise<void>;
|
|
239
|
+
readonly handleEscape: () => Promise<void>;
|
|
239
240
|
readonly handleInputBlur: () => Promise<void>;
|
|
240
241
|
readonly handlePaste: () => Promise<void>;
|
|
241
242
|
readonly newFile: () => Promise<void>;
|
|
@@ -280,6 +281,7 @@ interface ExtensionDetail {
|
|
|
280
281
|
}
|
|
281
282
|
|
|
282
283
|
interface FileSystem {
|
|
284
|
+
readonly addFileHandle: (file: File) => Promise<void>;
|
|
283
285
|
readonly chmod: (uri: string, permissions: any) => Promise<void>;
|
|
284
286
|
readonly createDroppedFileHandle: () => Promise<DroppedFileHandle>;
|
|
285
287
|
readonly createExecutable: (content: string) => Promise<string>;
|
package/dist/testWorkerMain.js
CHANGED
|
@@ -2220,6 +2220,10 @@ const handleDragLeave = async () => {
|
|
|
2220
2220
|
const handleBlur = async () => {
|
|
2221
2221
|
await invoke$1('Explorer.handleBlur');
|
|
2222
2222
|
};
|
|
2223
|
+
const handleEscape = async () => {
|
|
2224
|
+
// @ts-ignore
|
|
2225
|
+
await invoke$1('Explorer.handleEscape');
|
|
2226
|
+
};
|
|
2223
2227
|
const handleInputBlur = async () => {
|
|
2224
2228
|
await invoke$1('Explorer.handleInputBlur');
|
|
2225
2229
|
};
|
|
@@ -2352,6 +2356,7 @@ const Explorer = {
|
|
|
2352
2356
|
handleDragOver,
|
|
2353
2357
|
handleDragOverIndex,
|
|
2354
2358
|
handleDrop,
|
|
2359
|
+
handleEscape,
|
|
2355
2360
|
handleInputBlur,
|
|
2356
2361
|
handlePaste,
|
|
2357
2362
|
newFile,
|
|
@@ -2568,6 +2573,7 @@ const stringifyJson = data => {
|
|
|
2568
2573
|
return JSON.stringify(data, null, 2) + '\n';
|
|
2569
2574
|
};
|
|
2570
2575
|
|
|
2576
|
+
/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types */
|
|
2571
2577
|
const writeFile = async (uri, content) => {
|
|
2572
2578
|
await invoke$1('FileSystem.writeFile', uri, content);
|
|
2573
2579
|
};
|
|
@@ -2578,6 +2584,10 @@ const writeJson = async (uri, data) => {
|
|
|
2578
2584
|
const readFile = async uri => {
|
|
2579
2585
|
return invoke$1('FileSystem.readFile', uri);
|
|
2580
2586
|
};
|
|
2587
|
+
const addFileHandle = async file => {
|
|
2588
|
+
// @ts-ignore
|
|
2589
|
+
await invoke$1('FileSystem.addFileHandle', file);
|
|
2590
|
+
};
|
|
2581
2591
|
const mkdir = async uri => {
|
|
2582
2592
|
await invoke$1('FileSystem.mkdir', uri);
|
|
2583
2593
|
};
|
|
@@ -2648,6 +2658,7 @@ const loadFixture = async (platform, url) => {
|
|
|
2648
2658
|
|
|
2649
2659
|
const FileSystem = {
|
|
2650
2660
|
__proto__: null,
|
|
2661
|
+
addFileHandle,
|
|
2651
2662
|
chmod,
|
|
2652
2663
|
createDroppedFileHandle,
|
|
2653
2664
|
createExecutable,
|