@lvce-editor/explorer-view 7.22.0 → 7.23.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/explorerViewWorkerMain.js +121 -83
- package/package.json +1 -1
|
@@ -1074,7 +1074,7 @@ const createMockRpc = ({
|
|
|
1074
1074
|
};
|
|
1075
1075
|
|
|
1076
1076
|
const rpcs = Object.create(null);
|
|
1077
|
-
const set$
|
|
1077
|
+
const set$b = (id, rpc) => {
|
|
1078
1078
|
rpcs[id] = rpc;
|
|
1079
1079
|
};
|
|
1080
1080
|
const get$1 = id => {
|
|
@@ -1107,7 +1107,7 @@ const create$2 = rpcId => {
|
|
|
1107
1107
|
const mockRpc = createMockRpc({
|
|
1108
1108
|
commandMap
|
|
1109
1109
|
});
|
|
1110
|
-
set$
|
|
1110
|
+
set$b(rpcId, mockRpc);
|
|
1111
1111
|
// @ts-ignore
|
|
1112
1112
|
mockRpc[Symbol.dispose] = () => {
|
|
1113
1113
|
remove$1(rpcId);
|
|
@@ -1116,7 +1116,7 @@ const create$2 = rpcId => {
|
|
|
1116
1116
|
return mockRpc;
|
|
1117
1117
|
},
|
|
1118
1118
|
set(rpc) {
|
|
1119
|
-
set$
|
|
1119
|
+
set$b(rpcId, rpc);
|
|
1120
1120
|
}
|
|
1121
1121
|
};
|
|
1122
1122
|
};
|
|
@@ -1329,6 +1329,7 @@ const DialogWorker = 7014;
|
|
|
1329
1329
|
const DragAndDropWorker = 3404;
|
|
1330
1330
|
const FileSystemWorker$1 = 209;
|
|
1331
1331
|
const IconThemeWorker = 7009;
|
|
1332
|
+
const RendererProcess = 1670;
|
|
1332
1333
|
const RendererWorker = 1;
|
|
1333
1334
|
const SourceControlWorker = 66;
|
|
1334
1335
|
|
|
@@ -1343,36 +1344,41 @@ const FocusExplorer = 13;
|
|
|
1343
1344
|
const FocusExplorerEditBox = 14;
|
|
1344
1345
|
|
|
1345
1346
|
const {
|
|
1346
|
-
invoke: invoke$
|
|
1347
|
-
set: set$
|
|
1347
|
+
invoke: invoke$7,
|
|
1348
|
+
set: set$a
|
|
1348
1349
|
} = create$2(DialogWorker);
|
|
1349
1350
|
|
|
1350
1351
|
const {
|
|
1351
|
-
invoke: invoke$
|
|
1352
|
-
set: set$
|
|
1352
|
+
invoke: invoke$6,
|
|
1353
|
+
set: set$9
|
|
1353
1354
|
} = create$2(DragAndDropWorker);
|
|
1354
1355
|
const getDroppedItems$1 = async (itemIds, isElectron) => {
|
|
1355
|
-
return invoke$
|
|
1356
|
+
return invoke$6('DragAndDrop.getDroppedItems', itemIds, isElectron);
|
|
1356
1357
|
};
|
|
1357
1358
|
|
|
1358
1359
|
const {
|
|
1359
|
-
set: set$
|
|
1360
|
+
set: set$8
|
|
1360
1361
|
} = create$2(FileSystemWorker$1);
|
|
1361
1362
|
|
|
1362
1363
|
const FileSystemWorker = {
|
|
1363
1364
|
__proto__: null,
|
|
1364
|
-
set: set$
|
|
1365
|
+
set: set$8
|
|
1365
1366
|
};
|
|
1366
1367
|
|
|
1367
1368
|
const {
|
|
1368
|
-
invoke: invoke$
|
|
1369
|
-
set: set$
|
|
1369
|
+
invoke: invoke$5,
|
|
1370
|
+
set: set$7
|
|
1370
1371
|
} = create$2(IconThemeWorker);
|
|
1371
1372
|
const getIcons = async iconRequests => {
|
|
1372
1373
|
// @ts-ignore
|
|
1373
|
-
return invoke$
|
|
1374
|
+
return invoke$5('IconTheme.getIcons', iconRequests);
|
|
1374
1375
|
};
|
|
1375
1376
|
|
|
1377
|
+
const {
|
|
1378
|
+
invoke: invoke$4,
|
|
1379
|
+
set: set$6
|
|
1380
|
+
} = create$2(RendererProcess);
|
|
1381
|
+
|
|
1376
1382
|
class AssertionError extends Error {
|
|
1377
1383
|
constructor(message) {
|
|
1378
1384
|
super(message);
|
|
@@ -1435,16 +1441,16 @@ const string = value => {
|
|
|
1435
1441
|
};
|
|
1436
1442
|
|
|
1437
1443
|
const {
|
|
1438
|
-
invoke: invoke$
|
|
1444
|
+
invoke: invoke$3,
|
|
1439
1445
|
invokeAndTransfer,
|
|
1440
|
-
set: set$
|
|
1446
|
+
set: set$5
|
|
1441
1447
|
} = create$2(RendererWorker);
|
|
1442
1448
|
const showContextMenu2 = async (uid, menuId, x, y, args) => {
|
|
1443
1449
|
number(uid);
|
|
1444
1450
|
number(menuId);
|
|
1445
1451
|
number(x);
|
|
1446
1452
|
number(y);
|
|
1447
|
-
await invoke$
|
|
1453
|
+
await invoke$3('ContextMenu.show2', uid, menuId, x, y, args);
|
|
1448
1454
|
};
|
|
1449
1455
|
const sendMessagePortToDragAndDropWorker = async port => {
|
|
1450
1456
|
const command = 'DragAndDrop.handleMessagePort';
|
|
@@ -1463,18 +1469,18 @@ const sendMessagePortToFileSystemWorker$1 = async (port, rpcId) => {
|
|
|
1463
1469
|
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToFileSystemWorker', port, command, rpcId);
|
|
1464
1470
|
};
|
|
1465
1471
|
const confirm$1 = async (message, options) => {
|
|
1466
|
-
const result = await invoke$
|
|
1472
|
+
const result = await invoke$3('ConfirmPrompt.prompt', message, options);
|
|
1467
1473
|
return result;
|
|
1468
1474
|
};
|
|
1469
1475
|
const writeClipBoardText = async text => {
|
|
1470
|
-
await invoke$
|
|
1476
|
+
await invoke$3('ClipBoard.writeText', /* text */text);
|
|
1471
1477
|
};
|
|
1472
1478
|
const sendMessagePortToSourceControlWorker = async port => {
|
|
1473
1479
|
const command = 'SourceControl.handleMessagePort';
|
|
1474
1480
|
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToSourceControlWorker', port, command, 0);
|
|
1475
1481
|
};
|
|
1476
1482
|
const openUri$1 = async (uri, focus, options) => {
|
|
1477
|
-
await invoke$
|
|
1483
|
+
await invoke$3('Main.openUri', {
|
|
1478
1484
|
...options,
|
|
1479
1485
|
focus,
|
|
1480
1486
|
uri
|
|
@@ -1482,8 +1488,8 @@ const openUri$1 = async (uri, focus, options) => {
|
|
|
1482
1488
|
};
|
|
1483
1489
|
|
|
1484
1490
|
const {
|
|
1485
|
-
invoke: invoke$
|
|
1486
|
-
set: set$
|
|
1491
|
+
invoke: invoke$2,
|
|
1492
|
+
set: set$4
|
|
1487
1493
|
} = create$2(SourceControlWorker);
|
|
1488
1494
|
|
|
1489
1495
|
const toCommandId = key => {
|
|
@@ -1739,45 +1745,45 @@ const Rename$2 = 4;
|
|
|
1739
1745
|
const Remove = 5;
|
|
1740
1746
|
|
|
1741
1747
|
// TODO use direct connection
|
|
1742
|
-
const invoke = async (method, ...params) => {
|
|
1743
|
-
return invoke$
|
|
1748
|
+
const invoke$1 = async (method, ...params) => {
|
|
1749
|
+
return invoke$3(method, ...params);
|
|
1744
1750
|
};
|
|
1745
1751
|
const {
|
|
1746
|
-
set: set$
|
|
1752
|
+
set: set$3
|
|
1747
1753
|
} = FileSystemWorker;
|
|
1748
1754
|
|
|
1749
1755
|
const remove = async dirent => {
|
|
1750
|
-
return invoke('FileSystem.remove', dirent);
|
|
1756
|
+
return invoke$1('FileSystem.remove', dirent);
|
|
1751
1757
|
};
|
|
1752
1758
|
const readDirWithFileTypes = async uri => {
|
|
1753
|
-
return invoke('FileSystem.readDirWithFileTypes', uri);
|
|
1759
|
+
return invoke$1('FileSystem.readDirWithFileTypes', uri);
|
|
1754
1760
|
};
|
|
1755
1761
|
const readFile = async uri => {
|
|
1756
|
-
return invoke('FileSystem.readFile', uri);
|
|
1762
|
+
return invoke$1('FileSystem.readFile', uri);
|
|
1757
1763
|
};
|
|
1758
1764
|
const getPathSeparator$1 = async root => {
|
|
1759
|
-
return invoke('FileSystem.getPathSeparator', root);
|
|
1765
|
+
return invoke$1('FileSystem.getPathSeparator', root);
|
|
1760
1766
|
};
|
|
1761
1767
|
const isReadonly = async root => {
|
|
1762
|
-
return invoke('FileSystem.isReadonly', root);
|
|
1768
|
+
return invoke$1('FileSystem.isReadonly', root);
|
|
1763
1769
|
};
|
|
1764
1770
|
const getRealPath = async path => {
|
|
1765
|
-
return invoke('FileSystem.getRealPath', path);
|
|
1771
|
+
return invoke$1('FileSystem.getRealPath', path);
|
|
1766
1772
|
};
|
|
1767
1773
|
const stat = async dirent => {
|
|
1768
|
-
return invoke('FileSystem.stat', dirent);
|
|
1774
|
+
return invoke$1('FileSystem.stat', dirent);
|
|
1769
1775
|
};
|
|
1770
1776
|
const writeFile = async (uri, content) => {
|
|
1771
|
-
return invoke('FileSystem.writeFile', uri, content);
|
|
1777
|
+
return invoke$1('FileSystem.writeFile', uri, content);
|
|
1772
1778
|
};
|
|
1773
1779
|
const mkdir = async uri => {
|
|
1774
|
-
return invoke('FileSystem.mkdir', uri);
|
|
1780
|
+
return invoke$1('FileSystem.mkdir', uri);
|
|
1775
1781
|
};
|
|
1776
1782
|
const rename$1 = async (oldUri, newUri) => {
|
|
1777
|
-
return invoke('FileSystem.rename', oldUri, newUri);
|
|
1783
|
+
return invoke$1('FileSystem.rename', oldUri, newUri);
|
|
1778
1784
|
};
|
|
1779
1785
|
const copy$1 = async (oldUri, newUri) => {
|
|
1780
|
-
return invoke('FileSystem.copy', oldUri, newUri);
|
|
1786
|
+
return invoke$1('FileSystem.copy', oldUri, newUri);
|
|
1781
1787
|
};
|
|
1782
1788
|
|
|
1783
1789
|
const applyOperation = operation => {
|
|
@@ -2268,7 +2274,7 @@ const mergeTrees = (a, b) => {
|
|
|
2268
2274
|
|
|
2269
2275
|
const openUri = async (uri, focus, options) => {
|
|
2270
2276
|
if (options) {
|
|
2271
|
-
await invoke$
|
|
2277
|
+
await invoke$3('Main.openInput', {
|
|
2272
2278
|
editorInput: {
|
|
2273
2279
|
type: 'editor',
|
|
2274
2280
|
uri
|
|
@@ -2284,7 +2290,7 @@ const openUri = async (uri, focus, options) => {
|
|
|
2284
2290
|
const refreshWorkspace = async () => {
|
|
2285
2291
|
// TODO maybe pass an application id to this?
|
|
2286
2292
|
try {
|
|
2287
|
-
await invoke$
|
|
2293
|
+
await invoke$3('Layout.handleWorkspaceRefresh');
|
|
2288
2294
|
} catch {
|
|
2289
2295
|
// ignore
|
|
2290
2296
|
}
|
|
@@ -2861,10 +2867,10 @@ const writeText = async text => {
|
|
|
2861
2867
|
await writeClipBoardText(text);
|
|
2862
2868
|
};
|
|
2863
2869
|
const readNativeFiles = async () => {
|
|
2864
|
-
return invoke$
|
|
2870
|
+
return invoke$3('ClipBoard.readNativeFiles');
|
|
2865
2871
|
};
|
|
2866
2872
|
const writeNativeFiles = async (type, files) => {
|
|
2867
|
-
return invoke$
|
|
2873
|
+
return invoke$3('ClipBoard.writeNativeFiles', type, files);
|
|
2868
2874
|
};
|
|
2869
2875
|
|
|
2870
2876
|
const getRelativePath = (root, pathSeparator, path) => {
|
|
@@ -2892,21 +2898,21 @@ const copyRelativePath = async state => {
|
|
|
2892
2898
|
};
|
|
2893
2899
|
|
|
2894
2900
|
const missingDialogWorkerRelay = 'Command "SendMessagePortToExtensionHostWorker.sendMessagePortToDialogWorker" not found';
|
|
2895
|
-
const state = {
|
|
2901
|
+
const state$1 = {
|
|
2896
2902
|
isTest: false
|
|
2897
2903
|
};
|
|
2898
2904
|
const setIsTest = value => {
|
|
2899
|
-
state.isTest = value;
|
|
2905
|
+
state$1.isTest = value;
|
|
2900
2906
|
};
|
|
2901
2907
|
const confirm = async message => {
|
|
2902
2908
|
const {
|
|
2903
2909
|
isTest
|
|
2904
|
-
} = state;
|
|
2910
|
+
} = state$1;
|
|
2905
2911
|
if (isTest) {
|
|
2906
2912
|
return confirm$1(message);
|
|
2907
2913
|
}
|
|
2908
2914
|
try {
|
|
2909
|
-
return await invoke$
|
|
2915
|
+
return await invoke$7('ConfirmPrompt.prompt', message, undefined);
|
|
2910
2916
|
} catch (error) {
|
|
2911
2917
|
if (!String(error).includes(missingDialogWorkerRelay)) {
|
|
2912
2918
|
throw error;
|
|
@@ -2916,7 +2922,7 @@ const confirm = async message => {
|
|
|
2916
2922
|
};
|
|
2917
2923
|
|
|
2918
2924
|
const commandCompletions = new WeakMap();
|
|
2919
|
-
const set$
|
|
2925
|
+
const set$2 = (state, completion) => {
|
|
2920
2926
|
commandCompletions.set(state, completion);
|
|
2921
2927
|
return state;
|
|
2922
2928
|
};
|
|
@@ -3709,7 +3715,7 @@ const {
|
|
|
3709
3715
|
get,
|
|
3710
3716
|
getCommandIds,
|
|
3711
3717
|
registerCommands,
|
|
3712
|
-
set,
|
|
3718
|
+
set: set$1,
|
|
3713
3719
|
wrapGetter
|
|
3714
3720
|
} = create$1();
|
|
3715
3721
|
const commandQueues = new Map();
|
|
@@ -3787,10 +3793,10 @@ const wrapListItemCommandInternal = (fn, queued) => {
|
|
|
3787
3793
|
useChevrons
|
|
3788
3794
|
} = updatedState;
|
|
3789
3795
|
const intermediate = get(id);
|
|
3790
|
-
set(id, intermediate.oldState, updatedState, intermediate.scheduledState);
|
|
3796
|
+
set$1(id, intermediate.oldState, updatedState, intermediate.scheduledState);
|
|
3791
3797
|
if (hasSameVisibleExplorerItemInputs(intermediate.newState, updatedState)) {
|
|
3792
3798
|
if (updatedState.inputSource === User) {
|
|
3793
|
-
set(id, intermediate.oldState, updatedState);
|
|
3799
|
+
set$1(id, intermediate.oldState, updatedState);
|
|
3794
3800
|
}
|
|
3795
3801
|
return {
|
|
3796
3802
|
completion
|
|
@@ -3811,7 +3817,7 @@ const wrapListItemCommandInternal = (fn, queued) => {
|
|
|
3811
3817
|
visibleExplorerItems
|
|
3812
3818
|
};
|
|
3813
3819
|
const intermediate2 = get(id);
|
|
3814
|
-
set(id, intermediate2.oldState, finalState);
|
|
3820
|
+
set$1(id, intermediate2.oldState, finalState);
|
|
3815
3821
|
return {
|
|
3816
3822
|
completion
|
|
3817
3823
|
};
|
|
@@ -3909,7 +3915,7 @@ const create = (id, uri, x, y, width, height, args, parentUid, platform = 0, ass
|
|
|
3909
3915
|
x,
|
|
3910
3916
|
y
|
|
3911
3917
|
};
|
|
3912
|
-
set(state.uid, state, state);
|
|
3918
|
+
set$1(state.uid, state, state);
|
|
3913
3919
|
return state;
|
|
3914
3920
|
};
|
|
3915
3921
|
|
|
@@ -4656,7 +4662,7 @@ const handleClickFile = async (state, dirent, index, keepFocus = false) => {
|
|
|
4656
4662
|
focused: keepFocus,
|
|
4657
4663
|
focusedIndex: index
|
|
4658
4664
|
};
|
|
4659
|
-
return set$
|
|
4665
|
+
return set$2(newState, completion);
|
|
4660
4666
|
};
|
|
4661
4667
|
|
|
4662
4668
|
const handleClickSymLink = async (state, dirent, index) => {
|
|
@@ -4867,24 +4873,24 @@ const newFile = state => {
|
|
|
4867
4873
|
|
|
4868
4874
|
const getEditingIcon = async (editingType, value, direntType) => {
|
|
4869
4875
|
if (editingType === CreateFile) {
|
|
4870
|
-
return invoke$
|
|
4876
|
+
return invoke$3('IconTheme.getFileIcon', {
|
|
4871
4877
|
name: value
|
|
4872
4878
|
});
|
|
4873
4879
|
}
|
|
4874
4880
|
if (editingType === Rename$1) {
|
|
4875
4881
|
if (direntType === File || direntType === EditingFile) {
|
|
4876
|
-
return invoke$
|
|
4882
|
+
return invoke$3('IconTheme.getFileIcon', {
|
|
4877
4883
|
name: value
|
|
4878
4884
|
});
|
|
4879
4885
|
}
|
|
4880
4886
|
if (direntType !== undefined && [Directory, EditingFolder, EditingDirectoryExpanded].includes(direntType)) {
|
|
4881
|
-
return invoke$
|
|
4887
|
+
return invoke$3('IconTheme.getFolderIcon', {
|
|
4882
4888
|
name: value
|
|
4883
4889
|
});
|
|
4884
4890
|
}
|
|
4885
4891
|
}
|
|
4886
4892
|
if (editingType === CreateFolder) {
|
|
4887
|
-
return invoke$
|
|
4893
|
+
return invoke$3('IconTheme.getFolderIcon', {
|
|
4888
4894
|
name: value
|
|
4889
4895
|
});
|
|
4890
4896
|
}
|
|
@@ -5128,7 +5134,7 @@ const handleClick = async (state, index, keepFocus = false) => {
|
|
|
5128
5134
|
...newState,
|
|
5129
5135
|
...resetEditing
|
|
5130
5136
|
};
|
|
5131
|
-
return completion ? set$
|
|
5137
|
+
return completion ? set$2(finalState, completion) : finalState;
|
|
5132
5138
|
};
|
|
5133
5139
|
|
|
5134
5140
|
// export const handleBlur=()=>{}
|
|
@@ -5243,7 +5249,7 @@ const handleClickCurrentButKeepFocus = state => {
|
|
|
5243
5249
|
};
|
|
5244
5250
|
|
|
5245
5251
|
const openFolder = async () => {
|
|
5246
|
-
await invoke$
|
|
5252
|
+
await invoke$3(`Dialog.openFolder`);
|
|
5247
5253
|
};
|
|
5248
5254
|
|
|
5249
5255
|
const handleClickOpenFolder = async state => {
|
|
@@ -5276,7 +5282,7 @@ const handleContextMenuAtIndex = async (state, index, x, y) => {
|
|
|
5276
5282
|
focusedIndex: index,
|
|
5277
5283
|
items: newItems
|
|
5278
5284
|
};
|
|
5279
|
-
set(uid, state, newState);
|
|
5285
|
+
set$1(uid, state, newState);
|
|
5280
5286
|
await show2(uid, Explorer, x, y, {
|
|
5281
5287
|
menuId: Explorer
|
|
5282
5288
|
});
|
|
@@ -5362,7 +5368,7 @@ const handleCut = async state => {
|
|
|
5362
5368
|
}
|
|
5363
5369
|
const files = dirents.map(dirent => dirent.path);
|
|
5364
5370
|
await writeNativeFiles('cut', files);
|
|
5365
|
-
await invoke$
|
|
5371
|
+
await invoke$3('Focus.setFocus', FocusExplorer);
|
|
5366
5372
|
return {
|
|
5367
5373
|
...state,
|
|
5368
5374
|
cutItems: files,
|
|
@@ -5380,7 +5386,7 @@ const handleDoubleClick = async (state, eventX, eventY) => {
|
|
|
5380
5386
|
const item = state.items[index];
|
|
5381
5387
|
const type = normalizeDirentType(item.type);
|
|
5382
5388
|
if (type === File || type === SymLinkFile) {
|
|
5383
|
-
return set$
|
|
5389
|
+
return set$2(state, openUri(item.path, true));
|
|
5384
5390
|
}
|
|
5385
5391
|
return state;
|
|
5386
5392
|
};
|
|
@@ -5533,14 +5539,14 @@ const getFileDecorations = async (scheme, root, maybeUris, decorationsEnabled, a
|
|
|
5533
5539
|
if (!decorationsEnabled) {
|
|
5534
5540
|
return [];
|
|
5535
5541
|
}
|
|
5536
|
-
const providerIds = await invoke$
|
|
5542
|
+
const providerIds = await invoke$2('SourceControl.getEnabledProviderIds', scheme, root, assetDir, platform);
|
|
5537
5543
|
if (providerIds.length === 0) {
|
|
5538
5544
|
return [];
|
|
5539
5545
|
}
|
|
5540
5546
|
// TODO how to handle multiple providers?
|
|
5541
5547
|
const providerId = providerIds.at(-1);
|
|
5542
5548
|
const uris = ensureUris(maybeUris);
|
|
5543
|
-
const decorations = await invoke$
|
|
5549
|
+
const decorations = await invoke$2('SourceControl.getFileDecorations', providerId, uris, assetDir, platform);
|
|
5544
5550
|
const normalized = normalizeDecorations(decorations);
|
|
5545
5551
|
return normalized;
|
|
5546
5552
|
} catch (error) {
|
|
@@ -5605,17 +5611,17 @@ const getExcluded = excludedObject => {
|
|
|
5605
5611
|
const getSettings = async () => {
|
|
5606
5612
|
// TODO don't return false always
|
|
5607
5613
|
// TODO get all settings at once
|
|
5608
|
-
const useChevronsRaw = await invoke$
|
|
5614
|
+
const useChevronsRaw = await invoke$3('Preferences.get', 'explorer.useChevrons');
|
|
5609
5615
|
const useChevrons = useChevronsRaw === false ? false : true;
|
|
5610
|
-
const confirmDeleteRaw = await invoke$
|
|
5616
|
+
const confirmDeleteRaw = await invoke$3('Preferences.get', 'explorer.confirmdelete');
|
|
5611
5617
|
const confirmDelete = confirmDeleteRaw === false ? false : true;
|
|
5612
|
-
const confirmPasteRaw = await invoke$
|
|
5618
|
+
const confirmPasteRaw = await invoke$3('Preferences.get', 'explorer.confirmpaste');
|
|
5613
5619
|
const confirmPaste = confirmPasteRaw === false ? false : false;
|
|
5614
|
-
const excludedRaw = await invoke$
|
|
5620
|
+
const excludedRaw = await invoke$3('Preferences.get', 'files.exclude');
|
|
5615
5621
|
const excluded = getExcluded(excludedRaw);
|
|
5616
|
-
const gitIgnoreDecorationsRaw = await invoke$
|
|
5622
|
+
const gitIgnoreDecorationsRaw = await invoke$3('Preferences.get', 'explorer.gitIgnoreDecorations');
|
|
5617
5623
|
const gitIgnoreDecorations = gitIgnoreDecorationsRaw === false ? false : true;
|
|
5618
|
-
const sourceControlDecorationsRaw = await invoke$
|
|
5624
|
+
const sourceControlDecorationsRaw = await invoke$3('Preferences.get', 'explorer.sourceControlDecorations');
|
|
5619
5625
|
const sourceControlDecorations = sourceControlDecorationsRaw === false ? false : true;
|
|
5620
5626
|
return {
|
|
5621
5627
|
confirmDelete,
|
|
@@ -5628,7 +5634,7 @@ const getSettings = async () => {
|
|
|
5628
5634
|
};
|
|
5629
5635
|
|
|
5630
5636
|
const getWorkspacePath = () => {
|
|
5631
|
-
return invoke$
|
|
5637
|
+
return invoke$3('Workspace.getPath');
|
|
5632
5638
|
};
|
|
5633
5639
|
|
|
5634
5640
|
const getSavedChildDirents = (map, path, depth, excluded, pathSeparator, root = path) => {
|
|
@@ -5902,8 +5908,8 @@ const getDroppedDirectoryWorkspacePath = fileHandle => {
|
|
|
5902
5908
|
};
|
|
5903
5909
|
const openDroppedDirectoryAsWorkspace$1 = async (state, fileHandle) => {
|
|
5904
5910
|
const path = getDroppedDirectoryWorkspacePath(fileHandle);
|
|
5905
|
-
await invoke$
|
|
5906
|
-
await invoke$
|
|
5911
|
+
await invoke$3('PersistentFileHandle.addHandle', fileHandle.name, fileHandle);
|
|
5912
|
+
await invoke$3('Workspace.setPath', path);
|
|
5907
5913
|
const updated = await loadContent(state, undefined);
|
|
5908
5914
|
return {
|
|
5909
5915
|
...updated,
|
|
@@ -5986,7 +5992,7 @@ const getMergedDirents$1 = async (root, pathSeparator, dirents, excluded) => {
|
|
|
5986
5992
|
return mergedDirents;
|
|
5987
5993
|
};
|
|
5988
5994
|
const openDroppedDirectoryAsWorkspace = async (state, path) => {
|
|
5989
|
-
await invoke$
|
|
5995
|
+
await invoke$3('Workspace.setPath', path);
|
|
5990
5996
|
const updated = await loadContent(state, undefined);
|
|
5991
5997
|
return {
|
|
5992
5998
|
...updated,
|
|
@@ -6415,7 +6421,7 @@ const handleKeyDown = (state, defaultPrevented, key) => {
|
|
|
6415
6421
|
clearTimeout(typeAheadTimeout.value);
|
|
6416
6422
|
}
|
|
6417
6423
|
typeAheadTimeout.value = setTimeout(() => {
|
|
6418
|
-
void invoke$
|
|
6424
|
+
void invoke$3('Explorer.cancelTypeAhead');
|
|
6419
6425
|
}, focusWordTimeout);
|
|
6420
6426
|
if (matchingIndex === -1) {
|
|
6421
6427
|
return {
|
|
@@ -6430,6 +6436,31 @@ const handleKeyDown = (state, defaultPrevented, key) => {
|
|
|
6430
6436
|
};
|
|
6431
6437
|
};
|
|
6432
6438
|
|
|
6439
|
+
const state = {
|
|
6440
|
+
connected: false
|
|
6441
|
+
};
|
|
6442
|
+
const isConnected = () => {
|
|
6443
|
+
const {
|
|
6444
|
+
connected
|
|
6445
|
+
} = state;
|
|
6446
|
+
return connected;
|
|
6447
|
+
};
|
|
6448
|
+
const invoke = (method, ...params) => {
|
|
6449
|
+
return invoke$4(method, ...params);
|
|
6450
|
+
};
|
|
6451
|
+
const set = rpc => {
|
|
6452
|
+
set$6(rpc);
|
|
6453
|
+
state.connected = true;
|
|
6454
|
+
};
|
|
6455
|
+
|
|
6456
|
+
const handleMessagePort = async port => {
|
|
6457
|
+
const rpc = await create$6({
|
|
6458
|
+
commandMap: {},
|
|
6459
|
+
messagePort: port
|
|
6460
|
+
});
|
|
6461
|
+
set(rpc);
|
|
6462
|
+
};
|
|
6463
|
+
|
|
6433
6464
|
const scrollInto = (index, minLineY, maxLineY) => {
|
|
6434
6465
|
const diff = maxLineY - minLineY;
|
|
6435
6466
|
const smallerHalf = Math.floor(diff / 2);
|
|
@@ -6955,7 +6986,7 @@ const getContainingFolder = (root, dirents, focusedIndex, pathSeparator) => {
|
|
|
6955
6986
|
};
|
|
6956
6987
|
|
|
6957
6988
|
const openNativeFolder = async path => {
|
|
6958
|
-
await invoke$
|
|
6989
|
+
await invoke$3('OpenNativeFolder.openNativeFolder', /* path */path);
|
|
6959
6990
|
};
|
|
6960
6991
|
|
|
6961
6992
|
const openContainingFolder = async state => {
|
|
@@ -6989,7 +7020,7 @@ const getIntegratedTerminalCwd = state => {
|
|
|
6989
7020
|
|
|
6990
7021
|
const openInIntegratedTerminal = async state => {
|
|
6991
7022
|
const cwd = getIntegratedTerminalCwd(state);
|
|
6992
|
-
await invoke$
|
|
7023
|
+
await invoke$3('Layout.openIntegratedTerminal', cwd);
|
|
6993
7024
|
return state;
|
|
6994
7025
|
};
|
|
6995
7026
|
|
|
@@ -7717,15 +7748,21 @@ const applyRender = (oldState, newState, diffResult) => {
|
|
|
7717
7748
|
return commands;
|
|
7718
7749
|
};
|
|
7719
7750
|
|
|
7720
|
-
const render2 = (uid, _diffResult) => {
|
|
7751
|
+
const render2 = async (uid, _diffResult) => {
|
|
7721
7752
|
const {
|
|
7722
7753
|
oldState,
|
|
7723
7754
|
scheduledState
|
|
7724
7755
|
} = get(uid);
|
|
7725
7756
|
const diffResult = diff(oldState, scheduledState);
|
|
7726
|
-
set(uid, scheduledState, scheduledState);
|
|
7757
|
+
set$1(uid, scheduledState, scheduledState);
|
|
7727
7758
|
const commands = applyRender(oldState, scheduledState, diffResult);
|
|
7728
|
-
|
|
7759
|
+
if (!isConnected()) {
|
|
7760
|
+
return commands;
|
|
7761
|
+
}
|
|
7762
|
+
const rendererWorkerCommands = commands.filter(command => command[0] === SetFocusContext);
|
|
7763
|
+
const rendererProcessCommands = commands.filter(command => command[0] !== SetFocusContext);
|
|
7764
|
+
const transactionId = await invoke('Viewlet.queueCommands', uid, rendererProcessCommands);
|
|
7765
|
+
return [...rendererWorkerCommands, ['Viewlet.commitPending', uid, transactionId]];
|
|
7729
7766
|
};
|
|
7730
7767
|
|
|
7731
7768
|
const Button = 1;
|
|
@@ -8269,6 +8306,7 @@ const commandMap = {
|
|
|
8269
8306
|
'Explorer.handleInputClick': wrapListItemCommand(handleInputClick),
|
|
8270
8307
|
'Explorer.handleInputKeyDown': wrapListItemCommand(handleInputKeyDown),
|
|
8271
8308
|
'Explorer.handleKeyDown': wrapListItemCommand(handleKeyDown),
|
|
8309
|
+
'Explorer.handleMessagePort': handleMessagePort,
|
|
8272
8310
|
'Explorer.handleNativePaste': wrapListItemCommand(handleNativePaste),
|
|
8273
8311
|
'Explorer.handlePaste': wrapListItemCommand(handlePaste),
|
|
8274
8312
|
'Explorer.handlePointerDown': wrapListItemCommand(handlePointerDown),
|
|
@@ -8321,7 +8359,7 @@ const createDragAndDropWorkerRpc = async () => {
|
|
|
8321
8359
|
};
|
|
8322
8360
|
|
|
8323
8361
|
const initializeDragAndDropWorker = async () => {
|
|
8324
|
-
set$
|
|
8362
|
+
set$9(await createDragAndDropWorkerRpc());
|
|
8325
8363
|
};
|
|
8326
8364
|
|
|
8327
8365
|
const sendMessagePortToFileSystemWorker = async port => {
|
|
@@ -8342,7 +8380,7 @@ const createFileSystemWorkerRpc = async () => {
|
|
|
8342
8380
|
|
|
8343
8381
|
const initializeFileSystemWorker = async () => {
|
|
8344
8382
|
const rpc = await createFileSystemWorkerRpc();
|
|
8345
|
-
set$
|
|
8383
|
+
set$3(rpc);
|
|
8346
8384
|
};
|
|
8347
8385
|
|
|
8348
8386
|
const send$1 = port => {
|
|
@@ -8362,14 +8400,14 @@ const createIconThemeWorkerRpc = async () => {
|
|
|
8362
8400
|
|
|
8363
8401
|
const initializeIconThemeWorker = async () => {
|
|
8364
8402
|
const rpc = await createIconThemeWorkerRpc();
|
|
8365
|
-
set$
|
|
8403
|
+
set$7(rpc);
|
|
8366
8404
|
};
|
|
8367
8405
|
|
|
8368
8406
|
const initializeRendererWorker = async () => {
|
|
8369
8407
|
const rpc = await create$3({
|
|
8370
8408
|
commandMap: commandMap
|
|
8371
8409
|
});
|
|
8372
|
-
set$
|
|
8410
|
+
set$5(rpc);
|
|
8373
8411
|
};
|
|
8374
8412
|
|
|
8375
8413
|
const send = port => {
|
|
@@ -8392,7 +8430,7 @@ const initializeSourceControlWorker = async () => {
|
|
|
8392
8430
|
try {
|
|
8393
8431
|
const rpc = await createSourceControlWorkerRpc();
|
|
8394
8432
|
// TODO
|
|
8395
|
-
set$
|
|
8433
|
+
set$4(rpc);
|
|
8396
8434
|
} catch {
|
|
8397
8435
|
// ignore
|
|
8398
8436
|
}
|
|
@@ -8405,7 +8443,7 @@ const listen = async () => {
|
|
|
8405
8443
|
commandMap: {},
|
|
8406
8444
|
send: sendMessagePortToDialogWorker
|
|
8407
8445
|
});
|
|
8408
|
-
set$
|
|
8446
|
+
set$a(dialogRpc);
|
|
8409
8447
|
};
|
|
8410
8448
|
|
|
8411
8449
|
const main = async () => {
|