@lvce-editor/explorer-view 1.25.0 → 1.26.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 -14
- package/package.json +1 -1
|
@@ -779,12 +779,12 @@ const invokeAndTransfer = (ipc, method, ...params) => {
|
|
|
779
779
|
return invokeHelper(ipc, method, params, true);
|
|
780
780
|
};
|
|
781
781
|
|
|
782
|
-
const commands
|
|
782
|
+
const commands = Object.create(null);
|
|
783
783
|
const register = commandMap => {
|
|
784
|
-
Object.assign(commands
|
|
784
|
+
Object.assign(commands, commandMap);
|
|
785
785
|
};
|
|
786
786
|
const getCommand = key => {
|
|
787
|
-
return commands
|
|
787
|
+
return commands[key];
|
|
788
788
|
};
|
|
789
789
|
const execute = (command, ...args) => {
|
|
790
790
|
const fn = getCommand(command);
|
|
@@ -1889,9 +1889,10 @@ const getActions = root => {
|
|
|
1889
1889
|
}];
|
|
1890
1890
|
};
|
|
1891
1891
|
|
|
1892
|
-
const
|
|
1892
|
+
const commandIds = ['acceptEdit', 'cancelEdit', 'collapseAll', 'copyPath', 'copyRelativePath', 'expandAll', 'expandRecursively', 'focus', 'focusFirst', 'focusIndex', 'focusLast', 'focusNext', 'focusNone', 'focusPrevious', 'getFocusedDirent', 'handleArrowLeft', 'handleArrowLeft', 'handleArrowRight', 'handleArrowRight', 'handleBlur', 'handleClick', 'handleClickAt', 'handleClickCurrent', 'handleClickCurrentButKeepFocus', 'handleClickOpenFolder', 'handleContextMenu', 'handleCopy', 'handleDragOver', 'handleDrop', 'handleFocus', 'handleIconThemeChange', 'handleLanguagesChanged', 'handleMouseEnter', 'handleMouseLeave', 'handlePaste', 'handlePointerDown', 'handleUpload', 'handleWheel', 'handleWorkspaceChange', 'hotReload', 'newFile', 'newFolder', 'openContainingFolder', 'refresh', 'refresh', 'relealItem', 'removeDirent', 'rename', 'renameDirent', 'revealItem', 'scrollDown', 'scrollUp', 'setDeltaY', 'renderEventListeners', 'updateEditingValue', 'updateIcons'];
|
|
1893
|
+
|
|
1893
1894
|
const getCommandIds = () => {
|
|
1894
|
-
return
|
|
1895
|
+
return commandIds;
|
|
1895
1896
|
};
|
|
1896
1897
|
|
|
1897
1898
|
const None$4 = 'none';
|
|
@@ -2064,6 +2065,12 @@ const getExplorerWelcomeVirtualDom = isWide => {
|
|
|
2064
2065
|
}, text(openFolder$1())];
|
|
2065
2066
|
};
|
|
2066
2067
|
|
|
2068
|
+
const getActiveDescendant = focusedIndex => {
|
|
2069
|
+
if (focusedIndex >= 0) {
|
|
2070
|
+
return 'TreeItemActive';
|
|
2071
|
+
}
|
|
2072
|
+
return undefined;
|
|
2073
|
+
};
|
|
2067
2074
|
const getExplorerVirtualDom = (visibleItems, focusedIndex, root, isWide, focused) => {
|
|
2068
2075
|
if (!root) {
|
|
2069
2076
|
return getExplorerWelcomeVirtualDom(isWide);
|
|
@@ -2076,7 +2083,7 @@ const getExplorerVirtualDom = (visibleItems, focusedIndex, root, isWide, focused
|
|
|
2076
2083
|
role: Tree,
|
|
2077
2084
|
ariaLabel: filesExplorer(),
|
|
2078
2085
|
childCount: visibleItems.length,
|
|
2079
|
-
ariaActiveDescendant: focusedIndex
|
|
2086
|
+
ariaActiveDescendant: getActiveDescendant(focusedIndex),
|
|
2080
2087
|
onFocus: HandleFocus,
|
|
2081
2088
|
onBlur: HandleBlur,
|
|
2082
2089
|
onContextMenu: HandleContextMenu,
|
|
@@ -3960,14 +3967,9 @@ const isExpandedDirectory = dirent => {
|
|
|
3960
3967
|
};
|
|
3961
3968
|
|
|
3962
3969
|
const saveState = uid => {
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
|
|
3966
|
-
newState = value.newState;
|
|
3967
|
-
} else {
|
|
3968
|
-
// deprecated
|
|
3969
|
-
newState = uid;
|
|
3970
|
-
}
|
|
3970
|
+
number(uid);
|
|
3971
|
+
const value = get(uid);
|
|
3972
|
+
const newState = value.newState;
|
|
3971
3973
|
const {
|
|
3972
3974
|
items,
|
|
3973
3975
|
root,
|