@lvce-editor/file-search-worker 4.0.0 → 4.1.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 +252 -72
- package/package.json +1 -1
|
@@ -434,7 +434,7 @@ const IpcChildWithModuleWorkerAndMessagePort$1 = {
|
|
|
434
434
|
};
|
|
435
435
|
|
|
436
436
|
const Two = '2.0';
|
|
437
|
-
const create$4
|
|
437
|
+
const create$4 = (method, params) => {
|
|
438
438
|
return {
|
|
439
439
|
jsonrpc: Two,
|
|
440
440
|
method,
|
|
@@ -769,7 +769,7 @@ const invokeHelper = async (ipc, method, params, useSendAndTransfer) => {
|
|
|
769
769
|
return unwrapJsonRpcResult(responseMessage);
|
|
770
770
|
};
|
|
771
771
|
const send = (transport, method, ...params) => {
|
|
772
|
-
const message = create$4
|
|
772
|
+
const message = create$4(method, params);
|
|
773
773
|
transport.send(message);
|
|
774
774
|
};
|
|
775
775
|
const invoke$2 = (ipc, method, ...params) => {
|
|
@@ -843,7 +843,7 @@ const listen$1 = async (module, options) => {
|
|
|
843
843
|
const ipc = module.wrap(rawIpc);
|
|
844
844
|
return ipc;
|
|
845
845
|
};
|
|
846
|
-
const create$
|
|
846
|
+
const create$3 = async ({
|
|
847
847
|
commandMap
|
|
848
848
|
}) => {
|
|
849
849
|
// TODO create a commandMap per rpc instance
|
|
@@ -855,7 +855,7 @@ const create$4 = async ({
|
|
|
855
855
|
};
|
|
856
856
|
const WebWorkerRpcClient = {
|
|
857
857
|
__proto__: null,
|
|
858
|
-
create: create$
|
|
858
|
+
create: create$3
|
|
859
859
|
};
|
|
860
860
|
|
|
861
861
|
const User = 1;
|
|
@@ -937,6 +937,7 @@ const SelectColorTheme = 'Select Color Theme';
|
|
|
937
937
|
const SelectToOpen = 'Select to open';
|
|
938
938
|
const ShowAndRunCommands = 'Show And Run Commands';
|
|
939
939
|
const TypeNameOfCommandToRun = 'Type the name of a command to run.';
|
|
940
|
+
const QuickOpen = 'Quick open';
|
|
940
941
|
|
|
941
942
|
const noMatchingColorThemesFound = () => {
|
|
942
943
|
return i18nString(NoMatchingColorThemesFound);
|
|
@@ -977,6 +978,9 @@ const noSymbolFound = () => {
|
|
|
977
978
|
const noWorkspaceSymbolsFound = () => {
|
|
978
979
|
return i18nString(NoWorkspaceSymbolsFound);
|
|
979
980
|
};
|
|
981
|
+
const quickOpen = () => {
|
|
982
|
+
return i18nString(QuickOpen);
|
|
983
|
+
};
|
|
980
984
|
|
|
981
985
|
const name$b = 'command';
|
|
982
986
|
const getPlaceholder$b = () => {
|
|
@@ -1684,7 +1688,7 @@ const QuickPickEntriesEverything = {
|
|
|
1684
1688
|
const Default$1 = 0;
|
|
1685
1689
|
const Finished = 2;
|
|
1686
1690
|
|
|
1687
|
-
const create$
|
|
1691
|
+
const create$2 = () => {
|
|
1688
1692
|
const states = Object.create(null);
|
|
1689
1693
|
return {
|
|
1690
1694
|
get(uid) {
|
|
@@ -1702,9 +1706,9 @@ const create$3 = () => {
|
|
|
1702
1706
|
const {
|
|
1703
1707
|
get,
|
|
1704
1708
|
set
|
|
1705
|
-
} = create$
|
|
1709
|
+
} = create$2();
|
|
1706
1710
|
|
|
1707
|
-
const create$
|
|
1711
|
+
const create$1 = ({
|
|
1708
1712
|
itemHeight,
|
|
1709
1713
|
headerHeight = 0,
|
|
1710
1714
|
minimumSliderSize = 20
|
|
@@ -1770,40 +1774,7 @@ const handleWheel = (state, deltaMode, deltaY) => {
|
|
|
1770
1774
|
return setDeltaY(state, state.deltaY + deltaY);
|
|
1771
1775
|
};
|
|
1772
1776
|
|
|
1773
|
-
const create
|
|
1774
|
-
const state = {
|
|
1775
|
-
uid,
|
|
1776
|
-
state: Default$1,
|
|
1777
|
-
picks: [],
|
|
1778
|
-
recentPicks: [],
|
|
1779
|
-
recentPickIds: new Map(),
|
|
1780
|
-
// TODO use object.create(null) instead
|
|
1781
|
-
versionId: 0,
|
|
1782
|
-
provider: QuickPickEntriesEverything,
|
|
1783
|
-
// TODO make this dynamic again
|
|
1784
|
-
warned: [],
|
|
1785
|
-
visiblePicks: [],
|
|
1786
|
-
maxVisibleItems: 10,
|
|
1787
|
-
uri,
|
|
1788
|
-
cursorOffset: 0,
|
|
1789
|
-
height: 300,
|
|
1790
|
-
top: 50,
|
|
1791
|
-
width: 600,
|
|
1792
|
-
...create$2({
|
|
1793
|
-
itemHeight: listItemHeight,
|
|
1794
|
-
headerHeight: 30,
|
|
1795
|
-
minimumSliderSize: minimumSliderSize
|
|
1796
|
-
}),
|
|
1797
|
-
inputSource: User,
|
|
1798
|
-
args,
|
|
1799
|
-
focused: false,
|
|
1800
|
-
platform,
|
|
1801
|
-
value: ''
|
|
1802
|
-
};
|
|
1803
|
-
set(uid, state, state);
|
|
1804
|
-
};
|
|
1805
|
-
|
|
1806
|
-
const create = (uid, uri, listItemHeight, x, y, width, height, platform, args) => {
|
|
1777
|
+
const create = (uid, uri, listItemHeight, x, y, width, height, platform, args, renderAllItems) => {
|
|
1807
1778
|
const state = {
|
|
1808
1779
|
uid,
|
|
1809
1780
|
state: Default$1,
|
|
@@ -1822,7 +1793,7 @@ const create = (uid, uri, listItemHeight, x, y, width, height, platform, args) =
|
|
|
1822
1793
|
height: 300,
|
|
1823
1794
|
top: 50,
|
|
1824
1795
|
width: 600,
|
|
1825
|
-
...create$
|
|
1796
|
+
...create$1({
|
|
1826
1797
|
itemHeight: listItemHeight,
|
|
1827
1798
|
headerHeight: 30,
|
|
1828
1799
|
minimumSliderSize: minimumSliderSize
|
|
@@ -1831,10 +1802,10 @@ const create = (uid, uri, listItemHeight, x, y, width, height, platform, args) =
|
|
|
1831
1802
|
args,
|
|
1832
1803
|
focused: false,
|
|
1833
1804
|
platform,
|
|
1834
|
-
value: ''
|
|
1805
|
+
value: '',
|
|
1806
|
+
renderAllItems
|
|
1835
1807
|
};
|
|
1836
1808
|
set(uid, state, state);
|
|
1837
|
-
return state;
|
|
1838
1809
|
};
|
|
1839
1810
|
|
|
1840
1811
|
const emptyMatches = [];
|
|
@@ -2112,7 +2083,8 @@ const focusPrevious = state => {
|
|
|
2112
2083
|
return focusIndex(state, previousIndex);
|
|
2113
2084
|
};
|
|
2114
2085
|
|
|
2115
|
-
const commandIds = ['
|
|
2086
|
+
const commandIds = ['focusFirst', 'focusIndex', 'focusLast', 'focusNext', 'focusPrevious', 'handleBeforeInput', 'handleBlur', 'handleClickAt', 'handleInput', 'handleWheel', 'renderEventListeners', 'selectCurrentIndex', 'selectIndex', 'selectItem', 'setValue'];
|
|
2087
|
+
|
|
2116
2088
|
const getCommandIds = () => {
|
|
2117
2089
|
return commandIds;
|
|
2118
2090
|
};
|
|
@@ -2655,7 +2627,8 @@ const createQuickPickViewModel = async (oldState, newState) => {
|
|
|
2655
2627
|
height,
|
|
2656
2628
|
oldFocusedIndex,
|
|
2657
2629
|
newFocusedIndex,
|
|
2658
|
-
uid: newState.uid
|
|
2630
|
+
uid: newState.uid,
|
|
2631
|
+
renderAllItems: newState.renderAllItems
|
|
2659
2632
|
};
|
|
2660
2633
|
};
|
|
2661
2634
|
|
|
@@ -2691,25 +2664,32 @@ const renderHeight = newState => {
|
|
|
2691
2664
|
return ['Viewlet.send', newState.uid, /* method */SetItemsHeight, /* height */newState.height];
|
|
2692
2665
|
};
|
|
2693
2666
|
|
|
2667
|
+
const ComboBox = 'combobox';
|
|
2668
|
+
const ListBox = 'listbox';
|
|
2669
|
+
const None$1 = 'none';
|
|
2670
|
+
const Option$1 = 'option';
|
|
2671
|
+
|
|
2694
2672
|
const FileIcon = 'FileIcon';
|
|
2673
|
+
const InputBox = 'InputBox';
|
|
2695
2674
|
const Label = 'Label';
|
|
2675
|
+
const QuickPick$1 = 'QuickPick';
|
|
2676
|
+
const QuickPickHeader = 'QuickPickHeader';
|
|
2696
2677
|
const QuickPickHighlight = 'QuickPickHighlight';
|
|
2697
2678
|
const QuickPickItem = 'QuickPickItem';
|
|
2698
2679
|
const QuickPickItemActive = 'QuickPickItemActive';
|
|
2699
2680
|
const QuickPickItemDescription = 'QuickPickItemDescription';
|
|
2700
2681
|
const QuickPickItemLabel = 'QuickPickItemLabel';
|
|
2682
|
+
const QuickPickItems$1 = 'QuickPickItems';
|
|
2683
|
+
const Viewlet = 'Viewlet';
|
|
2701
2684
|
|
|
2702
|
-
const
|
|
2703
|
-
const
|
|
2704
|
-
|
|
2705
|
-
const
|
|
2706
|
-
const Span = 8;
|
|
2707
|
-
const Text = 12;
|
|
2708
|
-
const Img = 17;
|
|
2685
|
+
const Div$1 = 4;
|
|
2686
|
+
const Input$1 = 6;
|
|
2687
|
+
const Span$1 = 8;
|
|
2688
|
+
const Img$1 = 17;
|
|
2709
2689
|
|
|
2710
2690
|
const getFileIconVirtualDom = icon => {
|
|
2711
2691
|
return {
|
|
2712
|
-
type: Img,
|
|
2692
|
+
type: Img$1,
|
|
2713
2693
|
className: FileIcon,
|
|
2714
2694
|
src: icon,
|
|
2715
2695
|
role: None$1,
|
|
@@ -2717,7 +2697,134 @@ const getFileIconVirtualDom = icon => {
|
|
|
2717
2697
|
};
|
|
2718
2698
|
};
|
|
2719
2699
|
|
|
2720
|
-
|
|
2700
|
+
var __defProp = Object.defineProperty;
|
|
2701
|
+
var __export = (target, all) => {
|
|
2702
|
+
for (var name in all) __defProp(target, name, {
|
|
2703
|
+
get: all[name],
|
|
2704
|
+
enumerable: true
|
|
2705
|
+
});
|
|
2706
|
+
};
|
|
2707
|
+
|
|
2708
|
+
// src/parts/MergeClassNames/MergeClassNames.ts
|
|
2709
|
+
var mergeClassNames = (...classNames) => {
|
|
2710
|
+
return classNames.filter(Boolean).join(" ");
|
|
2711
|
+
};
|
|
2712
|
+
|
|
2713
|
+
// src/parts/VirtualDomElements/VirtualDomElements.ts
|
|
2714
|
+
var VirtualDomElements_exports = {};
|
|
2715
|
+
__export(VirtualDomElements_exports, {
|
|
2716
|
+
A: () => A,
|
|
2717
|
+
Abbr: () => Abbr,
|
|
2718
|
+
Article: () => Article,
|
|
2719
|
+
Aside: () => Aside,
|
|
2720
|
+
Audio: () => Audio,
|
|
2721
|
+
Br: () => Br,
|
|
2722
|
+
Button: () => Button,
|
|
2723
|
+
Cite: () => Cite,
|
|
2724
|
+
Col: () => Col,
|
|
2725
|
+
ColGroup: () => ColGroup,
|
|
2726
|
+
Data: () => Data,
|
|
2727
|
+
Dd: () => Dd,
|
|
2728
|
+
Del: () => Del,
|
|
2729
|
+
Div: () => Div,
|
|
2730
|
+
Dl: () => Dl,
|
|
2731
|
+
Figcaption: () => Figcaption,
|
|
2732
|
+
Figure: () => Figure,
|
|
2733
|
+
Footer: () => Footer,
|
|
2734
|
+
H1: () => H1,
|
|
2735
|
+
H2: () => H2,
|
|
2736
|
+
H3: () => H3,
|
|
2737
|
+
H4: () => H4,
|
|
2738
|
+
H5: () => H5,
|
|
2739
|
+
H6: () => H6,
|
|
2740
|
+
Header: () => Header,
|
|
2741
|
+
Hr: () => Hr,
|
|
2742
|
+
I: () => I,
|
|
2743
|
+
Img: () => Img,
|
|
2744
|
+
Input: () => Input,
|
|
2745
|
+
Ins: () => Ins,
|
|
2746
|
+
Kbd: () => Kbd,
|
|
2747
|
+
Li: () => Li,
|
|
2748
|
+
Nav: () => Nav,
|
|
2749
|
+
Ol: () => Ol,
|
|
2750
|
+
Option: () => Option,
|
|
2751
|
+
P: () => P,
|
|
2752
|
+
Pre: () => Pre,
|
|
2753
|
+
Root: () => Root,
|
|
2754
|
+
Search: () => Search,
|
|
2755
|
+
Section: () => Section,
|
|
2756
|
+
Select: () => Select,
|
|
2757
|
+
Span: () => Span,
|
|
2758
|
+
TBody: () => TBody,
|
|
2759
|
+
THead: () => THead,
|
|
2760
|
+
Table: () => Table,
|
|
2761
|
+
Td: () => Td,
|
|
2762
|
+
Text: () => Text,
|
|
2763
|
+
TextArea: () => TextArea,
|
|
2764
|
+
Tfoot: () => Tfoot,
|
|
2765
|
+
Th: () => Th,
|
|
2766
|
+
Time: () => Time,
|
|
2767
|
+
Tr: () => Tr,
|
|
2768
|
+
Ul: () => Ul,
|
|
2769
|
+
Video: () => Video
|
|
2770
|
+
});
|
|
2771
|
+
var Audio = 0;
|
|
2772
|
+
var Button = 1;
|
|
2773
|
+
var Col = 2;
|
|
2774
|
+
var ColGroup = 3;
|
|
2775
|
+
var Div = 4;
|
|
2776
|
+
var H1 = 5;
|
|
2777
|
+
var Input = 6;
|
|
2778
|
+
var Kbd = 7;
|
|
2779
|
+
var Span = 8;
|
|
2780
|
+
var Table = 9;
|
|
2781
|
+
var TBody = 10;
|
|
2782
|
+
var Td = 11;
|
|
2783
|
+
var Text = 12;
|
|
2784
|
+
var Th = 13;
|
|
2785
|
+
var THead = 14;
|
|
2786
|
+
var Tr = 15;
|
|
2787
|
+
var I = 16;
|
|
2788
|
+
var Img = 17;
|
|
2789
|
+
var Root = 0;
|
|
2790
|
+
var Ins = 20;
|
|
2791
|
+
var Del = 21;
|
|
2792
|
+
var H2 = 22;
|
|
2793
|
+
var H3 = 23;
|
|
2794
|
+
var H4 = 24;
|
|
2795
|
+
var H5 = 25;
|
|
2796
|
+
var H6 = 26;
|
|
2797
|
+
var Article = 27;
|
|
2798
|
+
var Aside = 28;
|
|
2799
|
+
var Footer = 29;
|
|
2800
|
+
var Header = 30;
|
|
2801
|
+
var Nav = 40;
|
|
2802
|
+
var Section = 41;
|
|
2803
|
+
var Search = 42;
|
|
2804
|
+
var Dd = 43;
|
|
2805
|
+
var Dl = 44;
|
|
2806
|
+
var Figcaption = 45;
|
|
2807
|
+
var Figure = 46;
|
|
2808
|
+
var Hr = 47;
|
|
2809
|
+
var Li = 48;
|
|
2810
|
+
var Ol = 49;
|
|
2811
|
+
var P = 50;
|
|
2812
|
+
var Pre = 51;
|
|
2813
|
+
var A = 53;
|
|
2814
|
+
var Abbr = 54;
|
|
2815
|
+
var Br = 55;
|
|
2816
|
+
var Cite = 56;
|
|
2817
|
+
var Data = 57;
|
|
2818
|
+
var Time = 58;
|
|
2819
|
+
var Tfoot = 59;
|
|
2820
|
+
var Ul = 60;
|
|
2821
|
+
var Video = 61;
|
|
2822
|
+
var TextArea = 62;
|
|
2823
|
+
var Select = 63;
|
|
2824
|
+
var Option = 64;
|
|
2825
|
+
|
|
2826
|
+
// src/parts/Text/Text.ts
|
|
2827
|
+
var text = data => {
|
|
2721
2828
|
return {
|
|
2722
2829
|
type: Text,
|
|
2723
2830
|
text: data,
|
|
@@ -2726,13 +2833,13 @@ const text = data => {
|
|
|
2726
2833
|
};
|
|
2727
2834
|
|
|
2728
2835
|
const quickPickHighlight = {
|
|
2729
|
-
type: Span,
|
|
2836
|
+
type: Span$1,
|
|
2730
2837
|
className: QuickPickHighlight,
|
|
2731
2838
|
childCount: 1
|
|
2732
2839
|
};
|
|
2733
2840
|
const addHighlights = (dom, highlights, label) => {
|
|
2734
2841
|
const labelDom = {
|
|
2735
|
-
type: Div,
|
|
2842
|
+
type: Div$1,
|
|
2736
2843
|
className: QuickPickItemLabel,
|
|
2737
2844
|
childCount: 0
|
|
2738
2845
|
};
|
|
@@ -2771,9 +2878,9 @@ const getQuickPickItemVirtualDom = visibleItem => {
|
|
|
2771
2878
|
const highlights = matches.slice(1);
|
|
2772
2879
|
const dom = [];
|
|
2773
2880
|
dom.push({
|
|
2774
|
-
type: Div,
|
|
2881
|
+
type: Div$1,
|
|
2775
2882
|
className: QuickPickItem,
|
|
2776
|
-
role: Option,
|
|
2883
|
+
role: Option$1,
|
|
2777
2884
|
ariaPosInSet: posInSet,
|
|
2778
2885
|
ariaSetSize: setSize,
|
|
2779
2886
|
childCount: 1
|
|
@@ -2790,7 +2897,7 @@ const getQuickPickItemVirtualDom = visibleItem => {
|
|
|
2790
2897
|
} else if (icon) {
|
|
2791
2898
|
parent.childCount++;
|
|
2792
2899
|
dom.push({
|
|
2793
|
-
type: Div,
|
|
2900
|
+
type: Div$1,
|
|
2794
2901
|
className: `QuickPickMaskIcon MaskIcon MaskIcon${icon}`,
|
|
2795
2902
|
childCount: 0
|
|
2796
2903
|
});
|
|
@@ -2799,7 +2906,7 @@ const getQuickPickItemVirtualDom = visibleItem => {
|
|
|
2799
2906
|
if (description) {
|
|
2800
2907
|
parent.childCount++;
|
|
2801
2908
|
dom.push({
|
|
2802
|
-
type: Div,
|
|
2909
|
+
type: Div$1,
|
|
2803
2910
|
className: QuickPickItemDescription,
|
|
2804
2911
|
childCount: 1
|
|
2805
2912
|
}, text(description));
|
|
@@ -2807,23 +2914,79 @@ const getQuickPickItemVirtualDom = visibleItem => {
|
|
|
2807
2914
|
return dom;
|
|
2808
2915
|
};
|
|
2809
2916
|
|
|
2917
|
+
const getQuickPickNoResultsVirtualDom = () => {
|
|
2918
|
+
return [{
|
|
2919
|
+
type: Div$1,
|
|
2920
|
+
className: 'QuickPickItem QuickPickItemActive QuickPickStatus',
|
|
2921
|
+
childCount: 1
|
|
2922
|
+
}, {
|
|
2923
|
+
type: Div$1,
|
|
2924
|
+
className: Label,
|
|
2925
|
+
childCount: 1
|
|
2926
|
+
}, text('No Results')];
|
|
2927
|
+
};
|
|
2928
|
+
|
|
2810
2929
|
const getQuickPickItemsVirtualDom = visibleItems => {
|
|
2811
2930
|
if (visibleItems.length === 0) {
|
|
2812
|
-
return
|
|
2813
|
-
type: Div,
|
|
2814
|
-
className: 'QuickPickItem QuickPickItemActive QuickPickStatus',
|
|
2815
|
-
childCount: 1
|
|
2816
|
-
}, {
|
|
2817
|
-
type: Div,
|
|
2818
|
-
className: Label,
|
|
2819
|
-
childCount: 1
|
|
2820
|
-
}, text('No Results')];
|
|
2931
|
+
return getQuickPickNoResultsVirtualDom();
|
|
2821
2932
|
}
|
|
2822
2933
|
const dom = visibleItems.flatMap(getQuickPickItemVirtualDom);
|
|
2823
2934
|
return dom;
|
|
2824
2935
|
};
|
|
2825
2936
|
|
|
2937
|
+
const QuickPick = 'QuickPick';
|
|
2938
|
+
const QuickPickItems = 'QuickPickItems';
|
|
2939
|
+
|
|
2940
|
+
const HandlePointerDown = 'handlePointerDown';
|
|
2941
|
+
const HandleWheel = 'handleWheel';
|
|
2942
|
+
const HandleBlur = 'handleBlur';
|
|
2943
|
+
const HandleBeforeInput = 'handleBeforeInput';
|
|
2944
|
+
|
|
2945
|
+
const QuickPickInput = 'QuickPickInput';
|
|
2946
|
+
|
|
2947
|
+
const getQuickPickHeaderVirtualDom = () => {
|
|
2948
|
+
const ariaLabel = typeNameofCommandToRun();
|
|
2949
|
+
return [{
|
|
2950
|
+
type: Div$1,
|
|
2951
|
+
className: QuickPickHeader,
|
|
2952
|
+
childCount: 1
|
|
2953
|
+
}, {
|
|
2954
|
+
type: Input$1,
|
|
2955
|
+
className: InputBox,
|
|
2956
|
+
spellcheck: false,
|
|
2957
|
+
autocapitalize: 'off',
|
|
2958
|
+
inputType: 'text',
|
|
2959
|
+
childCount: 0,
|
|
2960
|
+
role: ComboBox,
|
|
2961
|
+
name: QuickPickInput,
|
|
2962
|
+
onBeforeInput: HandleBeforeInput,
|
|
2963
|
+
onBlur: HandleBlur,
|
|
2964
|
+
ariaLabel: ariaLabel
|
|
2965
|
+
}];
|
|
2966
|
+
};
|
|
2967
|
+
|
|
2968
|
+
const getQuickPickVirtualDom = visibleItems => {
|
|
2969
|
+
const quickOpen$1 = quickOpen();
|
|
2970
|
+
return [{
|
|
2971
|
+
type: Div$1,
|
|
2972
|
+
className: mergeClassNames(Viewlet, QuickPick$1),
|
|
2973
|
+
childCount: 2,
|
|
2974
|
+
id: QuickPick,
|
|
2975
|
+
ariaLabel: quickOpen$1
|
|
2976
|
+
}, ...getQuickPickHeaderVirtualDom(), {
|
|
2977
|
+
type: Div$1,
|
|
2978
|
+
className: QuickPickItems$1,
|
|
2979
|
+
id: QuickPickItems,
|
|
2980
|
+
role: ListBox,
|
|
2981
|
+
childCount: visibleItems.length
|
|
2982
|
+
}, ...getQuickPickItemsVirtualDom(visibleItems)];
|
|
2983
|
+
};
|
|
2984
|
+
|
|
2826
2985
|
const renderItems = newState => {
|
|
2986
|
+
if (newState.renderAllItems) {
|
|
2987
|
+
const dom = getQuickPickVirtualDom(newState.visibleItems);
|
|
2988
|
+
return ['Viewlet.setDom2', dom];
|
|
2989
|
+
}
|
|
2827
2990
|
const dom = getQuickPickItemsVirtualDom(newState.visibleItems);
|
|
2828
2991
|
return ['Viewlet.send', newState.uid, /* method */'setItemsDom', dom];
|
|
2829
2992
|
};
|
|
@@ -2909,6 +3072,23 @@ const doRender = async uid => {
|
|
|
2909
3072
|
return applyRender(oldState, newState, diffResult);
|
|
2910
3073
|
};
|
|
2911
3074
|
|
|
3075
|
+
const renderEventListeners = () => {
|
|
3076
|
+
return [{
|
|
3077
|
+
name: HandlePointerDown,
|
|
3078
|
+
params: ['handlePointerDown', 'event.clientX', 'event.clientY'],
|
|
3079
|
+
preventDefault: true
|
|
3080
|
+
}, {
|
|
3081
|
+
name: HandleWheel,
|
|
3082
|
+
params: ['handleWheel']
|
|
3083
|
+
}, {
|
|
3084
|
+
name: HandleBlur,
|
|
3085
|
+
params: ['handleBlur']
|
|
3086
|
+
}, {
|
|
3087
|
+
name: HandleBeforeInput,
|
|
3088
|
+
params: ['handleBeforeInput']
|
|
3089
|
+
}];
|
|
3090
|
+
};
|
|
3091
|
+
|
|
2912
3092
|
const selectCurrentIndex = state => {
|
|
2913
3093
|
return selectIndex(state, state.focusedIndex);
|
|
2914
3094
|
};
|
|
@@ -2944,7 +3124,7 @@ const wrapCommand = fn => {
|
|
|
2944
3124
|
|
|
2945
3125
|
const commandMap = {
|
|
2946
3126
|
'QuickPick.addMenuEntries': add,
|
|
2947
|
-
'QuickPick.create2': create
|
|
3127
|
+
'QuickPick.create2': create,
|
|
2948
3128
|
'QuickPick.focusFirst': wrapCommand(focusFirst),
|
|
2949
3129
|
'QuickPick.focusIndex': wrapCommand(focusIndex),
|
|
2950
3130
|
'QuickPick.focusLast': wrapCommand(focusLast),
|
|
@@ -2965,10 +3145,10 @@ const commandMap = {
|
|
|
2965
3145
|
'QuickPick.selectItem': wrapCommand(selectItem),
|
|
2966
3146
|
'QuickPick.setDeltaY': wrapCommand(setDeltaY),
|
|
2967
3147
|
'QuickPick.setValue': wrapCommand(setValue),
|
|
3148
|
+
'QuickPick.renderEventListeners': renderEventListeners,
|
|
2968
3149
|
// deprecated
|
|
2969
3150
|
'SearchFile.filter': filterQuickPickItems,
|
|
2970
3151
|
'SearchFile.searchFile': searchFile$5,
|
|
2971
|
-
'QuickPick.create': create,
|
|
2972
3152
|
'QuickPick.loadEntries': loadQuickPickEntries
|
|
2973
3153
|
};
|
|
2974
3154
|
|