@lvce-editor/test-worker 7.7.0 → 7.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 +4 -0
- package/dist/testWorkerMain.js +21 -0
- package/package.json +1 -1
package/dist/api.d.ts
CHANGED
|
@@ -219,6 +219,8 @@ interface Explorer {
|
|
|
219
219
|
readonly cancelEdit: () => Promise<void>;
|
|
220
220
|
readonly clickCurrent: () => Promise<void>;
|
|
221
221
|
readonly collapseAll: () => Promise<void>;
|
|
222
|
+
readonly copyPath: () => Promise<void>;
|
|
223
|
+
readonly copyRelativePath: () => Promise<void>;
|
|
222
224
|
readonly expandAll: () => Promise<void>;
|
|
223
225
|
readonly expandRecursively: () => Promise<void>;
|
|
224
226
|
readonly focus: () => Promise<void>;
|
|
@@ -236,6 +238,7 @@ interface Explorer {
|
|
|
236
238
|
readonly handleDragOver: (x: number, y: number) => Promise<void>;
|
|
237
239
|
readonly handleDragOverIndex: (index: number) => Promise<void>;
|
|
238
240
|
readonly handleDrop: (x: number, y: number, fileIds: readonly number[], fileList: FileList | readonly File[]) => Promise<void>;
|
|
241
|
+
readonly handleEscape: () => Promise<void>;
|
|
239
242
|
readonly handleInputBlur: () => Promise<void>;
|
|
240
243
|
readonly handlePaste: () => Promise<void>;
|
|
241
244
|
readonly newFile: () => Promise<void>;
|
|
@@ -280,6 +283,7 @@ interface ExtensionDetail {
|
|
|
280
283
|
}
|
|
281
284
|
|
|
282
285
|
interface FileSystem {
|
|
286
|
+
readonly addFileHandle: (file: File) => Promise<void>;
|
|
283
287
|
readonly chmod: (uri: string, permissions: any) => Promise<void>;
|
|
284
288
|
readonly createDroppedFileHandle: () => Promise<DroppedFileHandle>;
|
|
285
289
|
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
|
};
|
|
@@ -2274,6 +2278,14 @@ const newFile = async () => {
|
|
|
2274
2278
|
const newFolder = async () => {
|
|
2275
2279
|
await invoke$1('Explorer.newFolder');
|
|
2276
2280
|
};
|
|
2281
|
+
const copyPath$1 = async () => {
|
|
2282
|
+
// @ts-ignore
|
|
2283
|
+
await invoke$1('Explorer.copyPath');
|
|
2284
|
+
};
|
|
2285
|
+
const copyRelativePath = async () => {
|
|
2286
|
+
// @ts-ignore
|
|
2287
|
+
await invoke$1('Explorer.copyRelativePath');
|
|
2288
|
+
};
|
|
2277
2289
|
const handleClick$1 = async index => {
|
|
2278
2290
|
await invoke$1('Explorer.handleClick', index);
|
|
2279
2291
|
};
|
|
@@ -2335,6 +2347,8 @@ const Explorer = {
|
|
|
2335
2347
|
cancelEdit,
|
|
2336
2348
|
clickCurrent,
|
|
2337
2349
|
collapseAll: collapseAll$2,
|
|
2350
|
+
copyPath: copyPath$1,
|
|
2351
|
+
copyRelativePath,
|
|
2338
2352
|
expandAll,
|
|
2339
2353
|
expandRecursively,
|
|
2340
2354
|
focus: focus$1,
|
|
@@ -2352,6 +2366,7 @@ const Explorer = {
|
|
|
2352
2366
|
handleDragOver,
|
|
2353
2367
|
handleDragOverIndex,
|
|
2354
2368
|
handleDrop,
|
|
2369
|
+
handleEscape,
|
|
2355
2370
|
handleInputBlur,
|
|
2356
2371
|
handlePaste,
|
|
2357
2372
|
newFile,
|
|
@@ -2568,6 +2583,7 @@ const stringifyJson = data => {
|
|
|
2568
2583
|
return JSON.stringify(data, null, 2) + '\n';
|
|
2569
2584
|
};
|
|
2570
2585
|
|
|
2586
|
+
/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types */
|
|
2571
2587
|
const writeFile = async (uri, content) => {
|
|
2572
2588
|
await invoke$1('FileSystem.writeFile', uri, content);
|
|
2573
2589
|
};
|
|
@@ -2578,6 +2594,10 @@ const writeJson = async (uri, data) => {
|
|
|
2578
2594
|
const readFile = async uri => {
|
|
2579
2595
|
return invoke$1('FileSystem.readFile', uri);
|
|
2580
2596
|
};
|
|
2597
|
+
const addFileHandle = async file => {
|
|
2598
|
+
// @ts-ignore
|
|
2599
|
+
await invoke$1('FileSystem.addFileHandle', file);
|
|
2600
|
+
};
|
|
2581
2601
|
const mkdir = async uri => {
|
|
2582
2602
|
await invoke$1('FileSystem.mkdir', uri);
|
|
2583
2603
|
};
|
|
@@ -2648,6 +2668,7 @@ const loadFixture = async (platform, url) => {
|
|
|
2648
2668
|
|
|
2649
2669
|
const FileSystem = {
|
|
2650
2670
|
__proto__: null,
|
|
2671
|
+
addFileHandle,
|
|
2651
2672
|
chmod,
|
|
2652
2673
|
createDroppedFileHandle,
|
|
2653
2674
|
createExecutable,
|