@lvce-editor/explorer-view 3.20.0 → 3.21.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 +52 -58
- package/package.json +1 -1
|
@@ -1173,6 +1173,7 @@ const RendererWorker$1 = 1;
|
|
|
1173
1173
|
const FocusElementByName = 'Viewlet.focusElementByName';
|
|
1174
1174
|
const FocusSelector = 'Viewlet.focusSelector';
|
|
1175
1175
|
const SetCss = 'Viewlet.setCss';
|
|
1176
|
+
const SetDom2 = 'Viewlet.setDom2';
|
|
1176
1177
|
const SetFocusContext = 'Viewlet.setFocusContext';
|
|
1177
1178
|
|
|
1178
1179
|
const FocusExplorer = 13;
|
|
@@ -2776,7 +2777,6 @@ const getVisibleExplorerItems = (items, minLineY, maxLineY, focusedIndex, editin
|
|
|
2776
2777
|
const {
|
|
2777
2778
|
get,
|
|
2778
2779
|
set,
|
|
2779
|
-
wrapCommand,
|
|
2780
2780
|
registerCommands,
|
|
2781
2781
|
getCommandIds,
|
|
2782
2782
|
wrapGetter
|
|
@@ -2807,6 +2807,9 @@ const wrapListItemCommand = fn => {
|
|
|
2807
2807
|
const intermediate = get(id);
|
|
2808
2808
|
set(id, intermediate.oldState, updatedState);
|
|
2809
2809
|
const maxLineY = getExplorerMaxLineY(minLineY, height, itemHeight, items.length);
|
|
2810
|
+
if (items === intermediate.newState.items && minLineY === intermediate.newState.minLineY && editingIcon === intermediate.newState.editingIcon && cutItems === intermediate.newState.cutItems && editingErrorMessage === intermediate.newState.editingErrorMessage) {
|
|
2811
|
+
return;
|
|
2812
|
+
}
|
|
2810
2813
|
const visible = items.slice(minLineY, maxLineY);
|
|
2811
2814
|
const {
|
|
2812
2815
|
icons,
|
|
@@ -5741,28 +5744,19 @@ const getExplorerVirtualDom = (visibleItems, focusedIndex, root, isWide, focused
|
|
|
5741
5744
|
|
|
5742
5745
|
const renderItems = (oldState, newState) => {
|
|
5743
5746
|
const {
|
|
5744
|
-
cutItems,
|
|
5745
|
-
sourceControlIgnoredUris,
|
|
5746
5747
|
deltaY,
|
|
5747
5748
|
dropTargets,
|
|
5748
5749
|
editingErrorMessage,
|
|
5749
|
-
editingIcon,
|
|
5750
|
-
editingIndex,
|
|
5751
|
-
editingType,
|
|
5752
|
-
editingValue,
|
|
5753
5750
|
focused,
|
|
5754
5751
|
focusedIndex,
|
|
5755
5752
|
height,
|
|
5756
|
-
icons,
|
|
5757
5753
|
itemHeight,
|
|
5758
5754
|
items,
|
|
5759
|
-
maxLineY,
|
|
5760
5755
|
minLineY,
|
|
5761
5756
|
root,
|
|
5762
|
-
useChevrons,
|
|
5763
5757
|
width
|
|
5764
5758
|
} = newState;
|
|
5765
|
-
const visibleDirents =
|
|
5759
|
+
const visibleDirents = newState.visibleExplorerItems;
|
|
5766
5760
|
const isWide = width > 450;
|
|
5767
5761
|
const contentHeight = items.length * itemHeight;
|
|
5768
5762
|
const depth = items[focusedIndex]?.depth || 0;
|
|
@@ -5776,7 +5770,7 @@ const renderItems = (oldState, newState) => {
|
|
|
5776
5770
|
left
|
|
5777
5771
|
} = getErrorMessagePosition(itemHeight, focusedIndex, minLineY, depth, indent, fileIconWidth, padding + defaultPaddingLeft + chevronSpace);
|
|
5778
5772
|
const dom = getExplorerVirtualDom(visibleDirents, focusedIndex, root, isWide, focused, dropTargets, height, contentHeight, deltaY, editingErrorMessage, top, left);
|
|
5779
|
-
return [
|
|
5773
|
+
return [SetDom2, dom];
|
|
5780
5774
|
};
|
|
5781
5775
|
|
|
5782
5776
|
const renderValue = (oldState, newState) => {
|
|
@@ -6258,69 +6252,69 @@ const updateEditingValue = async (state, value, inputSource = User) => {
|
|
|
6258
6252
|
const commandMap = {
|
|
6259
6253
|
'Explorer.acceptEdit': wrapListItemCommand(acceptEdit),
|
|
6260
6254
|
'Explorer.cancelEdit': wrapListItemCommand(cancelEdit),
|
|
6261
|
-
'Explorer.cancelTypeAhead':
|
|
6255
|
+
'Explorer.cancelTypeAhead': wrapListItemCommand(cancelTypeAhead),
|
|
6262
6256
|
'Explorer.collapseAll': wrapListItemCommand(collapseAll),
|
|
6263
|
-
'Explorer.copyPath':
|
|
6264
|
-
'Explorer.copyRelativePath':
|
|
6257
|
+
'Explorer.copyPath': wrapListItemCommand(copyPath),
|
|
6258
|
+
'Explorer.copyRelativePath': wrapListItemCommand(copyRelativePath),
|
|
6265
6259
|
'Explorer.expandAll': wrapListItemCommand(expandAll),
|
|
6266
6260
|
'Explorer.expandRecursively': wrapListItemCommand(expandRecursively),
|
|
6267
|
-
'Explorer.focus':
|
|
6268
|
-
'Explorer.focusFirst':
|
|
6269
|
-
'Explorer.focusIndex':
|
|
6270
|
-
'Explorer.focusLast':
|
|
6271
|
-
'Explorer.handleDragStart':
|
|
6272
|
-
'Explorer.handleDragOverIndex':
|
|
6273
|
-
'Explorer.focusNext':
|
|
6274
|
-
'Explorer.focusNone':
|
|
6275
|
-
'Explorer.focusPrevious':
|
|
6261
|
+
'Explorer.focus': wrapListItemCommand(focus),
|
|
6262
|
+
'Explorer.focusFirst': wrapListItemCommand(focusFirst),
|
|
6263
|
+
'Explorer.focusIndex': wrapListItemCommand(focusIndex),
|
|
6264
|
+
'Explorer.focusLast': wrapListItemCommand(focusLast),
|
|
6265
|
+
'Explorer.handleDragStart': wrapListItemCommand(handleDragStart),
|
|
6266
|
+
'Explorer.handleDragOverIndex': wrapListItemCommand(handleDragOverIndex),
|
|
6267
|
+
'Explorer.focusNext': wrapListItemCommand(focusNext),
|
|
6268
|
+
'Explorer.focusNone': wrapListItemCommand(focusNone),
|
|
6269
|
+
'Explorer.focusPrevious': wrapListItemCommand(focusPrevious),
|
|
6276
6270
|
'Explorer.getCommandIds': getCommandIds,
|
|
6277
6271
|
'Explorer.getMenuEntries2': getMenuEntries2,
|
|
6278
6272
|
'Explorer.getMouseActions': getMouseActions,
|
|
6279
|
-
'Explorer.handleArrowLeft':
|
|
6280
|
-
'Explorer.handleArrowRight':
|
|
6281
|
-
'Explorer.handleEscape':
|
|
6282
|
-
'Explorer.handleBlur':
|
|
6273
|
+
'Explorer.handleArrowLeft': wrapListItemCommand(handleArrowLeft),
|
|
6274
|
+
'Explorer.handleArrowRight': wrapListItemCommand(handleArrowRight),
|
|
6275
|
+
'Explorer.handleEscape': wrapListItemCommand(handleEscape),
|
|
6276
|
+
'Explorer.handleBlur': wrapListItemCommand(handleBlur),
|
|
6283
6277
|
'Explorer.handleClick': wrapListItemCommand(handleClick),
|
|
6284
|
-
'Explorer.handleClickAt':
|
|
6285
|
-
'Explorer.handleClickCurrent':
|
|
6286
|
-
'Explorer.handleClickCurrentButKeepFocus':
|
|
6287
|
-
'Explorer.handleClickOpenFolder':
|
|
6288
|
-
'Explorer.handleContextMenu':
|
|
6289
|
-
'Explorer.handleContextMenuKeyboard':
|
|
6290
|
-
'Explorer.handleCopy':
|
|
6291
|
-
'Explorer.handleCut':
|
|
6292
|
-
'Explorer.handleDragLeave':
|
|
6293
|
-
'Explorer.handleDragOver':
|
|
6294
|
-
'Explorer.handleDrop':
|
|
6295
|
-
'Explorer.handleFocus':
|
|
6296
|
-
'Explorer.handleIconThemeChange':
|
|
6297
|
-
'Explorer.handleInputBlur':
|
|
6298
|
-
'Explorer.handleInputClick':
|
|
6299
|
-
'Explorer.handleInputKeyDown':
|
|
6300
|
-
'Explorer.handleKeyDown':
|
|
6278
|
+
'Explorer.handleClickAt': wrapListItemCommand(handleClickAt),
|
|
6279
|
+
'Explorer.handleClickCurrent': wrapListItemCommand(handleClickCurrent),
|
|
6280
|
+
'Explorer.handleClickCurrentButKeepFocus': wrapListItemCommand(handleClickCurrentButKeepFocus),
|
|
6281
|
+
'Explorer.handleClickOpenFolder': wrapListItemCommand(handleClickOpenFolder),
|
|
6282
|
+
'Explorer.handleContextMenu': wrapListItemCommand(handleContextMenu),
|
|
6283
|
+
'Explorer.handleContextMenuKeyboard': wrapListItemCommand(handleContextMenuKeyboard),
|
|
6284
|
+
'Explorer.handleCopy': wrapListItemCommand(handleCopy),
|
|
6285
|
+
'Explorer.handleCut': wrapListItemCommand(handleCut),
|
|
6286
|
+
'Explorer.handleDragLeave': wrapListItemCommand(handleDragLeave),
|
|
6287
|
+
'Explorer.handleDragOver': wrapListItemCommand(handleDragOver),
|
|
6288
|
+
'Explorer.handleDrop': wrapListItemCommand(handleDrop),
|
|
6289
|
+
'Explorer.handleFocus': wrapListItemCommand(handleFocus),
|
|
6290
|
+
'Explorer.handleIconThemeChange': wrapListItemCommand(handleIconThemeChange),
|
|
6291
|
+
'Explorer.handleInputBlur': wrapListItemCommand(handleInputBlur),
|
|
6292
|
+
'Explorer.handleInputClick': wrapListItemCommand(handleInputClick),
|
|
6293
|
+
'Explorer.handleInputKeyDown': wrapListItemCommand(handleInputKeyDown),
|
|
6294
|
+
'Explorer.handleKeyDown': wrapListItemCommand(handleKeyDown),
|
|
6301
6295
|
'Explorer.handlePaste': wrapListItemCommand(handlePaste),
|
|
6302
|
-
'Explorer.handlePointerDown':
|
|
6303
|
-
'Explorer.handleUpload':
|
|
6304
|
-
'Explorer.handleWheel':
|
|
6296
|
+
'Explorer.handlePointerDown': wrapListItemCommand(handlePointerDown),
|
|
6297
|
+
'Explorer.handleUpload': wrapListItemCommand(handleUpload),
|
|
6298
|
+
'Explorer.handleWheel': wrapListItemCommand(handleWheel),
|
|
6305
6299
|
'Explorer.handleWorkspaceChange': wrapListItemCommand(handleWorkspaceChange),
|
|
6306
6300
|
'Explorer.loadContent': wrapListItemCommand(loadContent),
|
|
6307
6301
|
'Explorer.newFile': wrapListItemCommand(newFile),
|
|
6308
6302
|
'Explorer.newFolder': wrapListItemCommand(newFolder),
|
|
6309
|
-
'Explorer.openContainingFolder':
|
|
6303
|
+
'Explorer.openContainingFolder': wrapListItemCommand(openContainingFolder),
|
|
6310
6304
|
'Explorer.refresh': wrapListItemCommand(refresh),
|
|
6311
6305
|
'Explorer.removeDirent': wrapListItemCommand(removeDirent),
|
|
6312
6306
|
'Explorer.renameDirent': wrapListItemCommand(renameDirent),
|
|
6313
6307
|
'Explorer.restoreState': restoreState,
|
|
6314
|
-
'Explorer.revealItem':
|
|
6315
|
-
'Explorer.selectAll':
|
|
6316
|
-
'Explorer.selectDown':
|
|
6317
|
-
'Explorer.selectIndices':
|
|
6318
|
-
'Explorer.selectUp':
|
|
6308
|
+
'Explorer.revealItem': wrapListItemCommand(revealItem),
|
|
6309
|
+
'Explorer.selectAll': wrapListItemCommand(selectAll),
|
|
6310
|
+
'Explorer.selectDown': wrapListItemCommand(selectDown),
|
|
6311
|
+
'Explorer.selectIndices': wrapListItemCommand(setSelectedIndices),
|
|
6312
|
+
'Explorer.selectUp': wrapListItemCommand(selectUp),
|
|
6319
6313
|
'Explorer.setDeltaY': wrapListItemCommand(setDeltaY),
|
|
6320
|
-
'Explorer.setSelectedIndices':
|
|
6321
|
-
'Explorer.toggleIndividualSelection':
|
|
6322
|
-
'Explorer.updateEditingValue':
|
|
6323
|
-
'Explorer.updateIcons':
|
|
6314
|
+
'Explorer.setSelectedIndices': wrapListItemCommand(setSelectedIndices),
|
|
6315
|
+
'Explorer.toggleIndividualSelection': wrapListItemCommand(toggleIndividualSelection),
|
|
6316
|
+
'Explorer.updateEditingValue': wrapListItemCommand(updateEditingValue),
|
|
6317
|
+
'Explorer.updateIcons': wrapListItemCommand(updateIcons),
|
|
6324
6318
|
// not wrapped
|
|
6325
6319
|
'Explorer.create2': create2,
|
|
6326
6320
|
'Explorer.diff2': diff2,
|