@lvce-editor/explorer-view 3.12.0 → 3.14.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 +16 -11
- package/package.json +1 -1
|
@@ -1032,6 +1032,9 @@ const createMockRpc = ({
|
|
|
1032
1032
|
const invoke = (method, ...params) => {
|
|
1033
1033
|
invocations.push([method, ...params]);
|
|
1034
1034
|
const command = commandMap[method];
|
|
1035
|
+
if (!command) {
|
|
1036
|
+
throw new Error(`command ${method} not found`);
|
|
1037
|
+
}
|
|
1035
1038
|
return command(...params);
|
|
1036
1039
|
};
|
|
1037
1040
|
const mockRpc = {
|
|
@@ -1252,6 +1255,11 @@ const sendMessagePortToMarkdownWorker = async (port, rpcId) => {
|
|
|
1252
1255
|
// @ts-ignore
|
|
1253
1256
|
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToMarkdownWorker', port, command, rpcId);
|
|
1254
1257
|
};
|
|
1258
|
+
const sendMessagePortToIconThemeWorker = async (port, rpcId) => {
|
|
1259
|
+
const command = 'IconTheme.handleMessagePort';
|
|
1260
|
+
// @ts-ignore
|
|
1261
|
+
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToIconThemeWorker', port, command, rpcId);
|
|
1262
|
+
};
|
|
1255
1263
|
const sendMessagePortToFileSystemWorker$2 = async (port, rpcId) => {
|
|
1256
1264
|
const command = 'FileSystem.handleMessagePort';
|
|
1257
1265
|
// @ts-ignore
|
|
@@ -1518,6 +1526,7 @@ const RendererWorker = {
|
|
|
1518
1526
|
sendMessagePortToErrorWorker,
|
|
1519
1527
|
sendMessagePortToExtensionHostWorker,
|
|
1520
1528
|
sendMessagePortToFileSystemWorker: sendMessagePortToFileSystemWorker$2,
|
|
1529
|
+
sendMessagePortToIconThemeWorker,
|
|
1521
1530
|
sendMessagePortToMarkdownWorker,
|
|
1522
1531
|
sendMessagePortToRendererProcess,
|
|
1523
1532
|
sendMessagePortToSearchProcess,
|
|
@@ -2618,7 +2627,8 @@ const {
|
|
|
2618
2627
|
set,
|
|
2619
2628
|
wrapCommand,
|
|
2620
2629
|
registerCommands,
|
|
2621
|
-
getCommandIds
|
|
2630
|
+
getCommandIds,
|
|
2631
|
+
wrapGetter
|
|
2622
2632
|
} = create$1();
|
|
2623
2633
|
|
|
2624
2634
|
const ListItem = 22;
|
|
@@ -3748,11 +3758,11 @@ const toggleIndividualSelection = async (state, index) => {
|
|
|
3748
3758
|
};
|
|
3749
3759
|
};
|
|
3750
3760
|
|
|
3751
|
-
const handleClickAt = async (state, defaultPrevented, button, ctrlKey, shiftKey,
|
|
3761
|
+
const handleClickAt = async (state, defaultPrevented, button, ctrlKey, shiftKey, eventX, eventY) => {
|
|
3752
3762
|
if (defaultPrevented || button !== LeftClick) {
|
|
3753
3763
|
return state;
|
|
3754
3764
|
}
|
|
3755
|
-
const index = getIndexFromPosition(state,
|
|
3765
|
+
const index = getIndexFromPosition(state, eventX, eventY);
|
|
3756
3766
|
if (index === -1) {
|
|
3757
3767
|
return {
|
|
3758
3768
|
...state,
|
|
@@ -6166,19 +6176,14 @@ const isExpandedDirectory = dirent => {
|
|
|
6166
6176
|
return dirent.type === DirectoryExpanded;
|
|
6167
6177
|
};
|
|
6168
6178
|
|
|
6169
|
-
const saveState =
|
|
6170
|
-
number(uid);
|
|
6171
|
-
const value = get(uid);
|
|
6172
|
-
const {
|
|
6173
|
-
newState
|
|
6174
|
-
} = value;
|
|
6179
|
+
const saveState = state => {
|
|
6175
6180
|
const {
|
|
6176
6181
|
items,
|
|
6177
6182
|
root,
|
|
6178
6183
|
deltaY,
|
|
6179
6184
|
minLineY,
|
|
6180
6185
|
maxLineY
|
|
6181
|
-
} =
|
|
6186
|
+
} = state;
|
|
6182
6187
|
const expandedPaths = items.filter(isExpandedDirectory).map(getPath);
|
|
6183
6188
|
return {
|
|
6184
6189
|
expandedPaths,
|
|
@@ -6387,7 +6392,7 @@ const commandMap = {
|
|
|
6387
6392
|
'Explorer.render2': render2,
|
|
6388
6393
|
'Explorer.renderActions2': renderActions,
|
|
6389
6394
|
'Explorer.renderEventListeners': renderEventListeners,
|
|
6390
|
-
'Explorer.saveState': saveState,
|
|
6395
|
+
'Explorer.saveState': wrapGetter(saveState),
|
|
6391
6396
|
'Explorer.terminate': terminate,
|
|
6392
6397
|
'Explorer.initialize': initialize,
|
|
6393
6398
|
// deprecated
|