@lvce-editor/file-search-worker 4.2.0 → 4.3.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/fileSearchWorkerMain.js +39 -17
- package/package.json +1 -1
|
@@ -2091,7 +2091,7 @@ const focusPrevious = state => {
|
|
|
2091
2091
|
return focusIndex(state, previousIndex);
|
|
2092
2092
|
};
|
|
2093
2093
|
|
|
2094
|
-
const commandIds = ['focusFirst', 'focusIndex', 'focusLast', 'focusNext', 'focusPrevious', 'handleBeforeInput', 'handleBlur', 'handleClickAt', '
|
|
2094
|
+
const commandIds = ['dispose', 'focusFirst', 'focusIndex', 'focusLast', 'focusNext', 'focusPrevious', 'handleBeforeInput', 'handleBlur', 'handleClickAt', 'handleFocus', 'handleInput', 'handleWheel', 'renderEventListeners', 'selectCurrentIndex', 'selectIndex', 'selectItem', 'setValue'];
|
|
2095
2095
|
|
|
2096
2096
|
const getCommandIds = () => {
|
|
2097
2097
|
return commandIds;
|
|
@@ -2322,7 +2322,7 @@ const handleBeforeInput = (state, inputType, data, selectionStart, selectionEnd)
|
|
|
2322
2322
|
return handleInput(state, newValue, cursorOffset, User);
|
|
2323
2323
|
};
|
|
2324
2324
|
|
|
2325
|
-
const handleBlur = async state => {
|
|
2325
|
+
const handleBlur$1 = async state => {
|
|
2326
2326
|
// TODO fix virtual dom diffing so that input isn't destroyed and loses focus when rerendering
|
|
2327
2327
|
// await CloseWidget.closeWidget(state.uid)
|
|
2328
2328
|
return state;
|
|
@@ -2389,6 +2389,17 @@ const handleClickAt = (state, x, y) => {
|
|
|
2389
2389
|
return selectIndex(state, index);
|
|
2390
2390
|
};
|
|
2391
2391
|
|
|
2392
|
+
const setFocus = async focusKey => {
|
|
2393
|
+
await invoke$1('Focus.setFocus', focusKey);
|
|
2394
|
+
};
|
|
2395
|
+
|
|
2396
|
+
const handleBlur = async state => {
|
|
2397
|
+
// TODO fix virtual dom diffing so that input isn't destroyed and loses focus when rerendering
|
|
2398
|
+
await setFocus(FocusQuickPickInput);
|
|
2399
|
+
// await CloseWidget.closeWidget(state.uid)
|
|
2400
|
+
return state;
|
|
2401
|
+
};
|
|
2402
|
+
|
|
2392
2403
|
const getDefaultValue = uri => {
|
|
2393
2404
|
switch (uri) {
|
|
2394
2405
|
case 'quickPick://everything':
|
|
@@ -2948,23 +2959,20 @@ const getQuickPickItemsVirtualDom = visibleItems => {
|
|
|
2948
2959
|
return dom;
|
|
2949
2960
|
};
|
|
2950
2961
|
|
|
2951
|
-
const HandlePointerDown = 'handlePointerDown';
|
|
2952
|
-
const HandleWheel = 'handleWheel';
|
|
2953
|
-
const HandleBlur = 'handleBlur';
|
|
2954
2962
|
const HandleBeforeInput = 'handleBeforeInput';
|
|
2963
|
+
const HandleBlur = 'handleBlur';
|
|
2964
|
+
const HandleFocus = 'handleFocus';
|
|
2955
2965
|
const HandleInput = 'handleInput';
|
|
2966
|
+
const HandlePointerDown = 'handlePointerDown';
|
|
2967
|
+
const HandleWheel = 'handleWheel';
|
|
2956
2968
|
|
|
2957
2969
|
const QuickPick = 'QuickPick';
|
|
2958
2970
|
const QuickPickItems = 'QuickPickItems';
|
|
2959
2971
|
const QuickPickItemActive = 'QuickPickItemActive';
|
|
2960
2972
|
|
|
2961
|
-
const
|
|
2973
|
+
const getQuickPickInputVirtualDom = () => {
|
|
2962
2974
|
const ariaLabel = typeNameofCommandToRun();
|
|
2963
|
-
return
|
|
2964
|
-
type: Div$1,
|
|
2965
|
-
className: QuickPickHeader,
|
|
2966
|
-
childCount: 1
|
|
2967
|
-
}, {
|
|
2975
|
+
return {
|
|
2968
2976
|
type: Input$1,
|
|
2969
2977
|
className: InputBox,
|
|
2970
2978
|
spellcheck: false,
|
|
@@ -2976,10 +2984,20 @@ const getQuickPickHeaderVirtualDom = () => {
|
|
|
2976
2984
|
onBeforeInput: HandleBeforeInput,
|
|
2977
2985
|
onBlur: HandleBlur,
|
|
2978
2986
|
onInput: HandleInput,
|
|
2987
|
+
onFocus: HandleFocus,
|
|
2979
2988
|
ariaLabel: ariaLabel,
|
|
2980
2989
|
ariaAutoComplete: 'list',
|
|
2981
|
-
ariaExpanded: true
|
|
2982
|
-
|
|
2990
|
+
ariaExpanded: true,
|
|
2991
|
+
autocomplete: 'off'
|
|
2992
|
+
};
|
|
2993
|
+
};
|
|
2994
|
+
|
|
2995
|
+
const getQuickPickHeaderVirtualDom = () => {
|
|
2996
|
+
return [{
|
|
2997
|
+
type: Div$1,
|
|
2998
|
+
className: QuickPickHeader,
|
|
2999
|
+
childCount: 1
|
|
3000
|
+
}, getQuickPickInputVirtualDom()];
|
|
2983
3001
|
};
|
|
2984
3002
|
|
|
2985
3003
|
const getQuickPickVirtualDom = visibleItems => {
|
|
@@ -2995,7 +3013,7 @@ const getQuickPickVirtualDom = visibleItems => {
|
|
|
2995
3013
|
className: QuickPickItems$1,
|
|
2996
3014
|
id: QuickPickItems,
|
|
2997
3015
|
role: ListBox,
|
|
2998
|
-
|
|
3016
|
+
ariaActivedescendant: QuickPickItemActive,
|
|
2999
3017
|
onWheel: HandleWheel,
|
|
3000
3018
|
childCount: visibleItems.length
|
|
3001
3019
|
}, ...getQuickPickItemsVirtualDom(visibleItems)];
|
|
@@ -3114,6 +3132,9 @@ const renderEventListeners = () => {
|
|
|
3114
3132
|
}, {
|
|
3115
3133
|
name: HandleInput,
|
|
3116
3134
|
params: ['handleInput', 'event.target.value']
|
|
3135
|
+
}, {
|
|
3136
|
+
name: HandleFocus,
|
|
3137
|
+
params: ['handleFocus']
|
|
3117
3138
|
}];
|
|
3118
3139
|
};
|
|
3119
3140
|
|
|
@@ -3153,6 +3174,7 @@ const wrapCommand = fn => {
|
|
|
3153
3174
|
const commandMap = {
|
|
3154
3175
|
'QuickPick.addMenuEntries': add,
|
|
3155
3176
|
'QuickPick.create2': create,
|
|
3177
|
+
'QuickPick.dispose': dispose,
|
|
3156
3178
|
'QuickPick.focusFirst': wrapCommand(focusFirst),
|
|
3157
3179
|
'QuickPick.focusIndex': wrapCommand(focusIndex),
|
|
3158
3180
|
'QuickPick.focusLast': wrapCommand(focusLast),
|
|
@@ -3161,20 +3183,20 @@ const commandMap = {
|
|
|
3161
3183
|
'QuickPick.getCommandIds': getCommandIds,
|
|
3162
3184
|
'QuickPick.getKeyBindings': getKeyBindings,
|
|
3163
3185
|
'QuickPick.handleBeforeInput': wrapCommand(handleBeforeInput),
|
|
3164
|
-
'QuickPick.handleBlur': wrapCommand(handleBlur),
|
|
3165
|
-
'QuickPick.dispose': dispose,
|
|
3186
|
+
'QuickPick.handleBlur': wrapCommand(handleBlur$1),
|
|
3166
3187
|
'QuickPick.handleClickAt': wrapCommand(handleClickAt),
|
|
3188
|
+
'QuickPick.handleFocus': wrapCommand(handleBlur),
|
|
3167
3189
|
'QuickPick.handleInput': wrapCommand(handleInput),
|
|
3168
3190
|
'QuickPick.handleWheel': wrapCommand(handleWheel),
|
|
3169
3191
|
'QuickPick.loadContent': wrapCommand(loadContent),
|
|
3170
3192
|
'QuickPick.loadEntries2': load,
|
|
3171
3193
|
'QuickPick.render': doRender,
|
|
3194
|
+
'QuickPick.renderEventListeners': renderEventListeners,
|
|
3172
3195
|
'QuickPick.selectCurrentIndex': wrapCommand(selectCurrentIndex),
|
|
3173
3196
|
'QuickPick.selectIndex': wrapCommand(selectIndex),
|
|
3174
3197
|
'QuickPick.selectItem': wrapCommand(selectItem),
|
|
3175
3198
|
'QuickPick.setDeltaY': wrapCommand(setDeltaY),
|
|
3176
3199
|
'QuickPick.setValue': wrapCommand(setValue),
|
|
3177
|
-
'QuickPick.renderEventListeners': renderEventListeners,
|
|
3178
3200
|
// deprecated
|
|
3179
3201
|
'SearchFile.filter': filterQuickPickItems,
|
|
3180
3202
|
'SearchFile.searchFile': searchFile$5,
|