@lvce-editor/file-search-worker 5.1.0 → 5.2.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 +295 -203
- package/package.json +1 -1
|
@@ -944,16 +944,8 @@ const getQuickPickProviderId = prefix => {
|
|
|
944
944
|
}
|
|
945
945
|
};
|
|
946
946
|
|
|
947
|
-
const
|
|
948
|
-
|
|
949
|
-
Object.assign(state$b, modules);
|
|
950
|
-
};
|
|
951
|
-
const get$1 = moduleId => {
|
|
952
|
-
const module = state$b[moduleId];
|
|
953
|
-
if (!module) {
|
|
954
|
-
throw new Error(`unknown module "${moduleId}"`);
|
|
955
|
-
}
|
|
956
|
-
return module;
|
|
947
|
+
const getVisibleItems$i = (picks, minLineY, maxLineY, focusedIndex, setSize, icons) => {
|
|
948
|
+
return [];
|
|
957
949
|
};
|
|
958
950
|
|
|
959
951
|
const Hide = 'hide';
|
|
@@ -1042,9 +1034,7 @@ const getFilterValue$9 = value => {
|
|
|
1042
1034
|
const getPickFilterValue$9 = pick => {
|
|
1043
1035
|
return pick;
|
|
1044
1036
|
};
|
|
1045
|
-
const getVisibleItems$
|
|
1046
|
-
return [];
|
|
1047
|
-
};
|
|
1037
|
+
const getVisibleItems$h = getVisibleItems$i;
|
|
1048
1038
|
|
|
1049
1039
|
const QuickPickNoop = {
|
|
1050
1040
|
__proto__: null,
|
|
@@ -1053,53 +1043,69 @@ const QuickPickNoop = {
|
|
|
1053
1043
|
getPickFilterValue: getPickFilterValue$9,
|
|
1054
1044
|
getPicks: getPicks$9,
|
|
1055
1045
|
getPlaceholder: getPlaceholder$9,
|
|
1056
|
-
getVisibleItems: getVisibleItems$
|
|
1046
|
+
getVisibleItems: getVisibleItems$h,
|
|
1057
1047
|
name: name$9,
|
|
1058
1048
|
selectPick: selectPick$9
|
|
1059
1049
|
};
|
|
1060
1050
|
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
// TODO don't store provider in state, only serialized value like provider-id
|
|
1064
|
-
|
|
1065
|
-
const state$a = {
|
|
1066
|
-
// providerId: PROVIDER_NOOP,
|
|
1051
|
+
const state$b = {
|
|
1067
1052
|
provider: QuickPickNoop,
|
|
1068
1053
|
prefix: 'string-that-should-never-match-another-string'
|
|
1069
1054
|
};
|
|
1055
|
+
const getVisibleItems$g = (picks, minLineY, maxLineY, focusedIndex, setSize, icons) => {
|
|
1056
|
+
const items = picks.map(pick => pick.pick);
|
|
1057
|
+
const visibleItems = state$b.provider.getVisibleItems(items, minLineY, maxLineY, focusedIndex, setSize, icons);
|
|
1058
|
+
return visibleItems;
|
|
1059
|
+
};
|
|
1060
|
+
|
|
1061
|
+
const state$a = Object.create(null);
|
|
1062
|
+
const register$1 = modules => {
|
|
1063
|
+
Object.assign(state$a, modules);
|
|
1064
|
+
};
|
|
1065
|
+
const get$1 = moduleId => {
|
|
1066
|
+
const module = state$a[moduleId];
|
|
1067
|
+
if (!module) {
|
|
1068
|
+
throw new Error(`unknown module "${moduleId}"`);
|
|
1069
|
+
}
|
|
1070
|
+
return module;
|
|
1071
|
+
};
|
|
1072
|
+
|
|
1073
|
+
// TODO avoid global variable
|
|
1074
|
+
|
|
1075
|
+
// TODO don't store provider in state, only serialized value like provider-id
|
|
1070
1076
|
|
|
1071
1077
|
/**
|
|
1072
1078
|
* @type {string}
|
|
1073
1079
|
*/
|
|
1074
1080
|
const name$8 = 'everything';
|
|
1075
1081
|
const getPlaceholder$8 = () => {
|
|
1076
|
-
return state$
|
|
1082
|
+
return state$b.provider.getPlaceholder();
|
|
1077
1083
|
};
|
|
1078
1084
|
const getLabel$5 = () => {
|
|
1079
1085
|
return '';
|
|
1080
1086
|
};
|
|
1081
1087
|
const getNoResults$8 = () => {
|
|
1082
|
-
return state$
|
|
1088
|
+
return state$b.provider.getNoResults();
|
|
1083
1089
|
};
|
|
1084
1090
|
const getPicks$8 = async value => {
|
|
1085
1091
|
const prefix = getQuickPickPrefix(value);
|
|
1086
1092
|
|
|
1087
1093
|
// TODO race condition
|
|
1088
|
-
if (state$
|
|
1089
|
-
state$
|
|
1094
|
+
if (state$b.prefix !== prefix) {
|
|
1095
|
+
state$b.prefix = prefix;
|
|
1090
1096
|
const providerId = getQuickPickProviderId(prefix);
|
|
1091
1097
|
const provider = get$1(providerId);
|
|
1092
|
-
state$
|
|
1098
|
+
state$b.provider = provider;
|
|
1093
1099
|
}
|
|
1094
1100
|
// TODO this line is a bit duplicated with getFilterValue
|
|
1095
1101
|
const slicedValue = value.slice(prefix.length).trimStart();
|
|
1096
|
-
const picks = await state$
|
|
1102
|
+
const picks = await state$b.provider.getPicks(slicedValue);
|
|
1097
1103
|
return picks;
|
|
1098
1104
|
};
|
|
1099
1105
|
const selectPick$8 = item => {
|
|
1100
1106
|
const {
|
|
1101
1107
|
provider
|
|
1102
|
-
} = state$
|
|
1108
|
+
} = state$b;
|
|
1103
1109
|
return provider.selectPick(item);
|
|
1104
1110
|
};
|
|
1105
1111
|
const openCommandPalette = () => {
|
|
@@ -1109,18 +1115,18 @@ const openView = () => {
|
|
|
1109
1115
|
// show('view ')
|
|
1110
1116
|
};
|
|
1111
1117
|
const getFilterValue$8 = value => {
|
|
1112
|
-
return value.slice(state$
|
|
1118
|
+
return value.slice(state$b.prefix.length).trim();
|
|
1113
1119
|
};
|
|
1114
1120
|
const getPickFilterValue$8 = pick => {
|
|
1115
1121
|
const {
|
|
1116
1122
|
provider
|
|
1117
|
-
} = state$
|
|
1123
|
+
} = state$b;
|
|
1118
1124
|
return provider.getPickFilterValue(pick);
|
|
1119
1125
|
};
|
|
1120
|
-
const getPickDescription$
|
|
1126
|
+
const getPickDescription$d = pick => {
|
|
1121
1127
|
const {
|
|
1122
1128
|
provider
|
|
1123
|
-
} = state$
|
|
1129
|
+
} = state$b;
|
|
1124
1130
|
// @ts-ignore
|
|
1125
1131
|
if (provider.getPickDescription) {
|
|
1126
1132
|
// @ts-ignore
|
|
@@ -1128,24 +1134,24 @@ const getPickDescription$8 = pick => {
|
|
|
1128
1134
|
}
|
|
1129
1135
|
return '';
|
|
1130
1136
|
};
|
|
1131
|
-
const getPickLabel$
|
|
1137
|
+
const getPickLabel$e = pick => {
|
|
1132
1138
|
const {
|
|
1133
1139
|
provider
|
|
1134
|
-
} = state$
|
|
1140
|
+
} = state$b;
|
|
1135
1141
|
// @ts-ignore
|
|
1136
1142
|
return provider.getPickLabel(pick);
|
|
1137
1143
|
};
|
|
1138
|
-
const getPickIcon$
|
|
1144
|
+
const getPickIcon$e = pick => {
|
|
1139
1145
|
const {
|
|
1140
1146
|
provider
|
|
1141
|
-
} = state$
|
|
1147
|
+
} = state$b;
|
|
1142
1148
|
// @ts-ignore
|
|
1143
1149
|
return provider.getPickIcon(pick);
|
|
1144
1150
|
};
|
|
1145
|
-
const getPickFileIcon$
|
|
1151
|
+
const getPickFileIcon$3 = pick => {
|
|
1146
1152
|
const {
|
|
1147
1153
|
provider
|
|
1148
|
-
} = state$
|
|
1154
|
+
} = state$b;
|
|
1149
1155
|
// @ts-ignore
|
|
1150
1156
|
if (provider.getPickFileIcon) {
|
|
1151
1157
|
// @ts-ignore
|
|
@@ -1156,7 +1162,7 @@ const getPickFileIcon$2 = pick => {
|
|
|
1156
1162
|
const isPrepared$8 = () => {
|
|
1157
1163
|
const {
|
|
1158
1164
|
provider
|
|
1159
|
-
} = state$
|
|
1165
|
+
} = state$b;
|
|
1160
1166
|
// @ts-ignore
|
|
1161
1167
|
if (provider.isPrepared) {
|
|
1162
1168
|
// @ts-ignore
|
|
@@ -1164,39 +1170,26 @@ const isPrepared$8 = () => {
|
|
|
1164
1170
|
}
|
|
1165
1171
|
return false;
|
|
1166
1172
|
};
|
|
1167
|
-
const getVisibleItems$8 = (picks, minLineY, maxLineY, focusedIndex, setSize, icons) => {
|
|
1168
|
-
const items = picks.map(pick => pick.pick);
|
|
1169
|
-
const visibleItems = state$a.provider.getVisibleItems(items, minLineY, maxLineY, focusedIndex, setSize, icons);
|
|
1170
|
-
return visibleItems;
|
|
1171
|
-
};
|
|
1172
|
-
|
|
1173
|
-
// provider
|
|
1174
|
-
// - create
|
|
1175
|
-
// - loadcontent
|
|
1176
|
-
// - filter
|
|
1177
|
-
// - getVisible
|
|
1178
|
-
|
|
1179
|
-
// matches could be in loadcontent or getVisible
|
|
1180
1173
|
|
|
1181
1174
|
const QuickPickEntriesEverything = {
|
|
1182
1175
|
__proto__: null,
|
|
1183
1176
|
getFilterValue: getFilterValue$8,
|
|
1184
1177
|
getLabel: getLabel$5,
|
|
1185
1178
|
getNoResults: getNoResults$8,
|
|
1186
|
-
getPickDescription: getPickDescription$
|
|
1187
|
-
getPickFileIcon: getPickFileIcon$
|
|
1179
|
+
getPickDescription: getPickDescription$d,
|
|
1180
|
+
getPickFileIcon: getPickFileIcon$3,
|
|
1188
1181
|
getPickFilterValue: getPickFilterValue$8,
|
|
1189
|
-
getPickIcon: getPickIcon$
|
|
1190
|
-
getPickLabel: getPickLabel$
|
|
1182
|
+
getPickIcon: getPickIcon$e,
|
|
1183
|
+
getPickLabel: getPickLabel$e,
|
|
1191
1184
|
getPicks: getPicks$8,
|
|
1192
1185
|
getPlaceholder: getPlaceholder$8,
|
|
1193
|
-
getVisibleItems: getVisibleItems$
|
|
1186
|
+
getVisibleItems: getVisibleItems$g,
|
|
1194
1187
|
isPrepared: isPrepared$8,
|
|
1195
1188
|
name: name$8,
|
|
1196
1189
|
openCommandPalette,
|
|
1197
1190
|
openView,
|
|
1198
1191
|
selectPick: selectPick$8,
|
|
1199
|
-
state: state$
|
|
1192
|
+
state: state$b
|
|
1200
1193
|
};
|
|
1201
1194
|
|
|
1202
1195
|
const Default$1 = 0;
|
|
@@ -2565,6 +2558,29 @@ const getColorThemeNames = async () => {
|
|
|
2565
2558
|
return invoke$1(/* Ajax.getJson */'ColorTheme.getColorThemeNames');
|
|
2566
2559
|
};
|
|
2567
2560
|
|
|
2561
|
+
const getPickDescription$c = value => {
|
|
2562
|
+
return '';
|
|
2563
|
+
};
|
|
2564
|
+
const getPickIcon$d = pick => {
|
|
2565
|
+
return '';
|
|
2566
|
+
};
|
|
2567
|
+
const getPickLabel$d = pick => {
|
|
2568
|
+
return pick;
|
|
2569
|
+
};
|
|
2570
|
+
const getVisibleItems$f = (picks, minLineY, maxLineY, focusedIndex, setSize, icons) => {
|
|
2571
|
+
const visibleItems = picks.map((pick, index) => ({
|
|
2572
|
+
description: getPickDescription$c(),
|
|
2573
|
+
fileIcon: '',
|
|
2574
|
+
icon: getPickIcon$d(),
|
|
2575
|
+
isActive: index + minLineY === focusedIndex,
|
|
2576
|
+
label: getPickLabel$d(pick),
|
|
2577
|
+
matches: [],
|
|
2578
|
+
posInSet: index + minLineY + 1,
|
|
2579
|
+
setSize
|
|
2580
|
+
}));
|
|
2581
|
+
return visibleItems;
|
|
2582
|
+
};
|
|
2583
|
+
|
|
2568
2584
|
const setColorTheme = id => {
|
|
2569
2585
|
return invoke$1(/* ColorTheme.setColorTheme */'ColorTheme.setColorTheme', /* colorThemeId */id);
|
|
2570
2586
|
};
|
|
@@ -2578,19 +2594,7 @@ const getPicks$7 = async searchValue => {
|
|
|
2578
2594
|
const colorThemeNames = await getColorThemeNames();
|
|
2579
2595
|
return colorThemeNames;
|
|
2580
2596
|
};
|
|
2581
|
-
const getVisibleItems$
|
|
2582
|
-
const visibleItems = picks.map((pick, index) => ({
|
|
2583
|
-
description: getPickDescription$7(),
|
|
2584
|
-
fileIcon: '',
|
|
2585
|
-
icon: getPickIcon$7(),
|
|
2586
|
-
isActive: index + minLineY === focusedIndex,
|
|
2587
|
-
label: getPickLabel$7(pick),
|
|
2588
|
-
matches: [],
|
|
2589
|
-
posInSet: index + minLineY + 1,
|
|
2590
|
-
setSize
|
|
2591
|
-
}));
|
|
2592
|
-
return visibleItems;
|
|
2593
|
-
};
|
|
2597
|
+
const getVisibleItems$e = getVisibleItems$f;
|
|
2594
2598
|
const selectPick$7 = async pick => {
|
|
2595
2599
|
await setColorTheme(/* colorThemeId */pick);
|
|
2596
2600
|
return {
|
|
@@ -2611,14 +2615,14 @@ const getNoResults$7 = () => {
|
|
|
2611
2615
|
const getPickFilterValue$7 = pick => {
|
|
2612
2616
|
return pick;
|
|
2613
2617
|
};
|
|
2614
|
-
const getPickLabel$
|
|
2618
|
+
const getPickLabel$c = pick => {
|
|
2615
2619
|
return pick;
|
|
2616
2620
|
};
|
|
2617
|
-
const getPickIcon$
|
|
2621
|
+
const getPickIcon$c = pick => {
|
|
2618
2622
|
return '';
|
|
2619
2623
|
};
|
|
2620
2624
|
const state$8 = {};
|
|
2621
|
-
const getPickDescription$
|
|
2625
|
+
const getPickDescription$b = value => {
|
|
2622
2626
|
return '';
|
|
2623
2627
|
};
|
|
2624
2628
|
const isPrepared$7 = () => {
|
|
@@ -2636,13 +2640,13 @@ const QuickPickEntriesColorTheme = {
|
|
|
2636
2640
|
getHelpEntries: getHelpEntries$2,
|
|
2637
2641
|
getLabel: getLabel$4,
|
|
2638
2642
|
getNoResults: getNoResults$7,
|
|
2639
|
-
getPickDescription: getPickDescription$
|
|
2643
|
+
getPickDescription: getPickDescription$b,
|
|
2640
2644
|
getPickFilterValue: getPickFilterValue$7,
|
|
2641
|
-
getPickIcon: getPickIcon$
|
|
2642
|
-
getPickLabel: getPickLabel$
|
|
2645
|
+
getPickIcon: getPickIcon$c,
|
|
2646
|
+
getPickLabel: getPickLabel$c,
|
|
2643
2647
|
getPicks: getPicks$7,
|
|
2644
2648
|
getPlaceholder: getPlaceholder$7,
|
|
2645
|
-
getVisibleItems: getVisibleItems$
|
|
2649
|
+
getVisibleItems: getVisibleItems$e,
|
|
2646
2650
|
isPrepared: isPrepared$7,
|
|
2647
2651
|
name: name$7,
|
|
2648
2652
|
selectPick: selectPick$7,
|
|
@@ -2670,12 +2674,32 @@ const warn = (...args) => {
|
|
|
2670
2674
|
console.warn(...args);
|
|
2671
2675
|
};
|
|
2672
2676
|
|
|
2677
|
+
const getPickIcon$b = () => {
|
|
2678
|
+
return '';
|
|
2679
|
+
};
|
|
2680
|
+
const getPickLabel$b = pick => {
|
|
2681
|
+
return pick.label;
|
|
2682
|
+
};
|
|
2683
|
+
const getVisibleItems$d = (picks, minLineY, maxLineY, focusedIndex, setSize, icons) => {
|
|
2684
|
+
const visibleItems = picks.map((pick, index) => ({
|
|
2685
|
+
description: pick.description || '',
|
|
2686
|
+
fileIcon: '',
|
|
2687
|
+
icon: getPickIcon$b(),
|
|
2688
|
+
isActive: index + minLineY === focusedIndex,
|
|
2689
|
+
label: getPickLabel$b(pick),
|
|
2690
|
+
matches: [],
|
|
2691
|
+
posInSet: index + minLineY + 1,
|
|
2692
|
+
setSize
|
|
2693
|
+
}));
|
|
2694
|
+
return visibleItems;
|
|
2695
|
+
};
|
|
2696
|
+
|
|
2673
2697
|
const name$6 = 'command';
|
|
2674
2698
|
const state$7 = {};
|
|
2675
2699
|
const isPrepared$6 = () => {
|
|
2676
2700
|
return false;
|
|
2677
2701
|
};
|
|
2678
|
-
const getPickDescription$
|
|
2702
|
+
const getPickDescription$a = () => {
|
|
2679
2703
|
return '';
|
|
2680
2704
|
};
|
|
2681
2705
|
const getPlaceholder$6 = () => {
|
|
@@ -2731,19 +2755,7 @@ const getPicks$6 = async () => {
|
|
|
2731
2755
|
const allPicks = [...builtinPicks, ...extensionPicks];
|
|
2732
2756
|
return allPicks;
|
|
2733
2757
|
};
|
|
2734
|
-
const getVisibleItems$
|
|
2735
|
-
const visibleItems = picks.map((pick, index) => ({
|
|
2736
|
-
description: pick.description || '',
|
|
2737
|
-
fileIcon: '',
|
|
2738
|
-
icon: getPickIcon$6(),
|
|
2739
|
-
isActive: index + minLineY === focusedIndex,
|
|
2740
|
-
label: getPickLabel$6(pick),
|
|
2741
|
-
matches: [],
|
|
2742
|
-
posInSet: index + minLineY + 1,
|
|
2743
|
-
setSize
|
|
2744
|
-
}));
|
|
2745
|
-
return visibleItems;
|
|
2746
|
-
};
|
|
2758
|
+
const getVisibleItems$c = getVisibleItems$d;
|
|
2747
2759
|
const shouldHide = item => {
|
|
2748
2760
|
if (item.id === 'Viewlet.openWidget' && item.args[0] === 'QuickPick') {
|
|
2749
2761
|
return false;
|
|
@@ -2787,10 +2799,10 @@ const getFilterValue$6 = value => {
|
|
|
2787
2799
|
const getPickFilterValue$6 = pick => {
|
|
2788
2800
|
return pick.label;
|
|
2789
2801
|
};
|
|
2790
|
-
const getPickLabel$
|
|
2802
|
+
const getPickLabel$a = pick => {
|
|
2791
2803
|
return pick.label;
|
|
2792
2804
|
};
|
|
2793
|
-
const getPickIcon$
|
|
2805
|
+
const getPickIcon$a = () => {
|
|
2794
2806
|
return '';
|
|
2795
2807
|
};
|
|
2796
2808
|
|
|
@@ -2799,13 +2811,13 @@ const QuickPickEntriesCommand = {
|
|
|
2799
2811
|
getFilterValue: getFilterValue$6,
|
|
2800
2812
|
getLabel: getLabel$3,
|
|
2801
2813
|
getNoResults: getNoResults$6,
|
|
2802
|
-
getPickDescription: getPickDescription$
|
|
2814
|
+
getPickDescription: getPickDescription$a,
|
|
2803
2815
|
getPickFilterValue: getPickFilterValue$6,
|
|
2804
|
-
getPickIcon: getPickIcon$
|
|
2805
|
-
getPickLabel: getPickLabel$
|
|
2816
|
+
getPickIcon: getPickIcon$a,
|
|
2817
|
+
getPickLabel: getPickLabel$a,
|
|
2806
2818
|
getPicks: getPicks$6,
|
|
2807
2819
|
getPlaceholder: getPlaceholder$6,
|
|
2808
|
-
getVisibleItems: getVisibleItems$
|
|
2820
|
+
getVisibleItems: getVisibleItems$c,
|
|
2809
2821
|
isPrepared: isPrepared$6,
|
|
2810
2822
|
name: name$6,
|
|
2811
2823
|
selectPick: selectPick$6,
|
|
@@ -2821,6 +2833,41 @@ const SourceControl = 1;
|
|
|
2821
2833
|
const Cloud = 2;
|
|
2822
2834
|
const Tag = 3;
|
|
2823
2835
|
|
|
2836
|
+
const getPickDescription$9 = pick => {
|
|
2837
|
+
return pick.description || '';
|
|
2838
|
+
};
|
|
2839
|
+
const getPickLabel$9 = pick => {
|
|
2840
|
+
return pick.label;
|
|
2841
|
+
};
|
|
2842
|
+
const convertIcon$1 = icon => {
|
|
2843
|
+
switch (icon) {
|
|
2844
|
+
case SourceControl:
|
|
2845
|
+
return SourceControl$1;
|
|
2846
|
+
case Cloud:
|
|
2847
|
+
return Cloud$1;
|
|
2848
|
+
case Tag:
|
|
2849
|
+
return Tag$1;
|
|
2850
|
+
default:
|
|
2851
|
+
return None;
|
|
2852
|
+
}
|
|
2853
|
+
};
|
|
2854
|
+
const getPickIcon$9 = pick => {
|
|
2855
|
+
return convertIcon$1(pick.icon);
|
|
2856
|
+
};
|
|
2857
|
+
const getVisibleItems$b = (picks, minLineY, maxLineY, focusedIndex, setSize, icons) => {
|
|
2858
|
+
const visibleItems = picks.slice(minLineY, maxLineY + 1).map((pick, index) => ({
|
|
2859
|
+
description: getPickDescription$9(pick),
|
|
2860
|
+
fileIcon: '',
|
|
2861
|
+
icon: getPickIcon$9(pick),
|
|
2862
|
+
isActive: index + minLineY === focusedIndex,
|
|
2863
|
+
label: getPickLabel$9(pick),
|
|
2864
|
+
matches: [],
|
|
2865
|
+
posInSet: index + minLineY + 1,
|
|
2866
|
+
setSize
|
|
2867
|
+
}));
|
|
2868
|
+
return visibleItems;
|
|
2869
|
+
};
|
|
2870
|
+
|
|
2824
2871
|
const name$5 = 'custom';
|
|
2825
2872
|
const state$6 = {
|
|
2826
2873
|
args: []
|
|
@@ -2864,10 +2911,10 @@ const getFilterValue$5 = value => {
|
|
|
2864
2911
|
const getPickFilterValue$5 = pick => {
|
|
2865
2912
|
return pick;
|
|
2866
2913
|
};
|
|
2867
|
-
const getPickLabel$
|
|
2914
|
+
const getPickLabel$8 = pick => {
|
|
2868
2915
|
return pick.label;
|
|
2869
2916
|
};
|
|
2870
|
-
const getPickDescription$
|
|
2917
|
+
const getPickDescription$8 = pick => {
|
|
2871
2918
|
return pick.description || '';
|
|
2872
2919
|
};
|
|
2873
2920
|
const convertIcon = icon => {
|
|
@@ -2882,25 +2929,13 @@ const convertIcon = icon => {
|
|
|
2882
2929
|
return None;
|
|
2883
2930
|
}
|
|
2884
2931
|
};
|
|
2885
|
-
const getPickIcon$
|
|
2932
|
+
const getPickIcon$8 = pick => {
|
|
2886
2933
|
return convertIcon(pick.icon);
|
|
2887
2934
|
};
|
|
2888
2935
|
const isPrepared$5 = () => {
|
|
2889
2936
|
return true;
|
|
2890
2937
|
};
|
|
2891
|
-
const getVisibleItems$
|
|
2892
|
-
const visibleItems = picks.slice(minLineY, maxLineY + 1).map((pick, index) => ({
|
|
2893
|
-
description: getPickDescription$5(pick),
|
|
2894
|
-
fileIcon: '',
|
|
2895
|
-
icon: getPickIcon$5(pick),
|
|
2896
|
-
isActive: index + minLineY === focusedIndex,
|
|
2897
|
-
label: getPickLabel$5(pick),
|
|
2898
|
-
matches: [],
|
|
2899
|
-
posInSet: index + minLineY + 1,
|
|
2900
|
-
setSize
|
|
2901
|
-
}));
|
|
2902
|
-
return visibleItems;
|
|
2903
|
-
};
|
|
2938
|
+
const getVisibleItems$a = getVisibleItems$b;
|
|
2904
2939
|
|
|
2905
2940
|
const QuickPickEntriesCustom = {
|
|
2906
2941
|
__proto__: null,
|
|
@@ -2908,13 +2943,13 @@ const QuickPickEntriesCustom = {
|
|
|
2908
2943
|
getHelpEntries: getHelpEntries$1,
|
|
2909
2944
|
getLabel: getLabel$2,
|
|
2910
2945
|
getNoResults: getNoResults$5,
|
|
2911
|
-
getPickDescription: getPickDescription$
|
|
2946
|
+
getPickDescription: getPickDescription$8,
|
|
2912
2947
|
getPickFilterValue: getPickFilterValue$5,
|
|
2913
|
-
getPickIcon: getPickIcon$
|
|
2914
|
-
getPickLabel: getPickLabel$
|
|
2948
|
+
getPickIcon: getPickIcon$8,
|
|
2949
|
+
getPickLabel: getPickLabel$8,
|
|
2915
2950
|
getPicks: getPicks$5,
|
|
2916
2951
|
getPlaceholder: getPlaceholder$5,
|
|
2917
|
-
getVisibleItems: getVisibleItems$
|
|
2952
|
+
getVisibleItems: getVisibleItems$a,
|
|
2918
2953
|
isPrepared: isPrepared$5,
|
|
2919
2954
|
name: name$5,
|
|
2920
2955
|
selectPick: selectPick$5,
|
|
@@ -2931,6 +2966,44 @@ const getProtocol = uri => {
|
|
|
2931
2966
|
return '';
|
|
2932
2967
|
};
|
|
2933
2968
|
|
|
2969
|
+
const getVisibleItems$9 = (files, minLineY, maxLineY, focusedIndex, setSize, icons) => {
|
|
2970
|
+
const visibleItems = files.map((item, i) => {
|
|
2971
|
+
const pick = item.pick;
|
|
2972
|
+
const label = getPickLabel$7(pick);
|
|
2973
|
+
const description = getPickDescription$7(pick);
|
|
2974
|
+
const icon = getPickIcon$7();
|
|
2975
|
+
const fileIcon = icons[i];
|
|
2976
|
+
return {
|
|
2977
|
+
label,
|
|
2978
|
+
description,
|
|
2979
|
+
icon,
|
|
2980
|
+
fileIcon,
|
|
2981
|
+
posInSet: minLineY + i + 1,
|
|
2982
|
+
setSize,
|
|
2983
|
+
isActive: i === focusedIndex,
|
|
2984
|
+
matches: item.matches
|
|
2985
|
+
};
|
|
2986
|
+
});
|
|
2987
|
+
return visibleItems;
|
|
2988
|
+
};
|
|
2989
|
+
const getPickLabel$7 = pick => {
|
|
2990
|
+
if (typeof pick === 'object') {
|
|
2991
|
+
pick = pick.pick;
|
|
2992
|
+
}
|
|
2993
|
+
const baseName = pathBaseName(pick);
|
|
2994
|
+
return baseName;
|
|
2995
|
+
};
|
|
2996
|
+
const getPickDescription$7 = pick => {
|
|
2997
|
+
if (typeof pick === 'object') {
|
|
2998
|
+
pick = pick.pick;
|
|
2999
|
+
}
|
|
3000
|
+
const dirName = pathDirName(pick);
|
|
3001
|
+
return dirName;
|
|
3002
|
+
};
|
|
3003
|
+
const getPickIcon$7 = () => {
|
|
3004
|
+
return '';
|
|
3005
|
+
};
|
|
3006
|
+
|
|
2934
3007
|
const getWorkspacePath = async () => {
|
|
2935
3008
|
return invoke$1('Workspace.getPath');
|
|
2936
3009
|
};
|
|
@@ -3003,24 +3076,24 @@ const getPickFilterValue$4 = pick => {
|
|
|
3003
3076
|
}
|
|
3004
3077
|
return pick;
|
|
3005
3078
|
};
|
|
3006
|
-
const getPickLabel$
|
|
3079
|
+
const getPickLabel$6 = pick => {
|
|
3007
3080
|
if (typeof pick === 'object') {
|
|
3008
3081
|
pick = pick.pick;
|
|
3009
3082
|
}
|
|
3010
3083
|
const baseName = pathBaseName(pick);
|
|
3011
3084
|
return baseName;
|
|
3012
3085
|
};
|
|
3013
|
-
const getPickDescription$
|
|
3086
|
+
const getPickDescription$6 = pick => {
|
|
3014
3087
|
if (typeof pick === 'object') {
|
|
3015
3088
|
pick = pick.pick;
|
|
3016
3089
|
}
|
|
3017
3090
|
const dirName = pathDirName(pick);
|
|
3018
3091
|
return dirName;
|
|
3019
3092
|
};
|
|
3020
|
-
const getPickIcon$
|
|
3093
|
+
const getPickIcon$6 = () => {
|
|
3021
3094
|
return '';
|
|
3022
3095
|
};
|
|
3023
|
-
const getPickFileIcon$
|
|
3096
|
+
const getPickFileIcon$2 = pick => {
|
|
3024
3097
|
if (typeof pick === 'object') {
|
|
3025
3098
|
pick = pick.pick;
|
|
3026
3099
|
}
|
|
@@ -3040,40 +3113,21 @@ const isPrepared$4 = () => {
|
|
|
3040
3113
|
const protocol = getProtocol(workspace);
|
|
3041
3114
|
return !protocol;
|
|
3042
3115
|
};
|
|
3043
|
-
const getVisibleItems$
|
|
3044
|
-
const visibleItems = files.map((item, i) => {
|
|
3045
|
-
const pick = item.pick;
|
|
3046
|
-
const label = getPickLabel$4(pick);
|
|
3047
|
-
const description = getPickDescription$4(pick);
|
|
3048
|
-
const icon = getPickIcon$4();
|
|
3049
|
-
const fileIcon = icons[i];
|
|
3050
|
-
return {
|
|
3051
|
-
label,
|
|
3052
|
-
description,
|
|
3053
|
-
icon,
|
|
3054
|
-
fileIcon,
|
|
3055
|
-
posInSet: minLineY + i + 1,
|
|
3056
|
-
setSize,
|
|
3057
|
-
isActive: i === focusedIndex,
|
|
3058
|
-
matches: item.matches
|
|
3059
|
-
};
|
|
3060
|
-
});
|
|
3061
|
-
return visibleItems;
|
|
3062
|
-
};
|
|
3116
|
+
const getVisibleItems$8 = getVisibleItems$9;
|
|
3063
3117
|
|
|
3064
3118
|
const QuickPickEntriesFile = {
|
|
3065
3119
|
__proto__: null,
|
|
3066
3120
|
getFilterValue: getFilterValue$4,
|
|
3067
3121
|
getLabel: getLabel$1,
|
|
3068
3122
|
getNoResults: getNoResults$4,
|
|
3069
|
-
getPickDescription: getPickDescription$
|
|
3070
|
-
getPickFileIcon: getPickFileIcon$
|
|
3123
|
+
getPickDescription: getPickDescription$6,
|
|
3124
|
+
getPickFileIcon: getPickFileIcon$2,
|
|
3071
3125
|
getPickFilterValue: getPickFilterValue$4,
|
|
3072
|
-
getPickIcon: getPickIcon$
|
|
3073
|
-
getPickLabel: getPickLabel$
|
|
3126
|
+
getPickIcon: getPickIcon$6,
|
|
3127
|
+
getPickLabel: getPickLabel$6,
|
|
3074
3128
|
getPicks: getPicks$4,
|
|
3075
3129
|
getPlaceholder: getPlaceholder$4,
|
|
3076
|
-
getVisibleItems: getVisibleItems$
|
|
3130
|
+
getVisibleItems: getVisibleItems$8,
|
|
3077
3131
|
isPrepared: isPrepared$4,
|
|
3078
3132
|
name: name$4,
|
|
3079
3133
|
selectPick: selectPick$4,
|
|
@@ -3084,6 +3138,41 @@ const getRecentlyOpened = () => {
|
|
|
3084
3138
|
return invoke$1(/* RecentlyOpened.getRecentlyOpened */'RecentlyOpened.getRecentlyOpened');
|
|
3085
3139
|
};
|
|
3086
3140
|
|
|
3141
|
+
const getPickDescription$5 = pick => {
|
|
3142
|
+
return pathDirName(pick);
|
|
3143
|
+
};
|
|
3144
|
+
const getPickIcon$5 = () => {
|
|
3145
|
+
return '';
|
|
3146
|
+
};
|
|
3147
|
+
const getPickLabel$5 = pick => {
|
|
3148
|
+
return pathBaseName(pick);
|
|
3149
|
+
};
|
|
3150
|
+
const getPickFileIcon$1 = pick => {
|
|
3151
|
+
if (typeof pick === 'object') {
|
|
3152
|
+
pick = pick.pick;
|
|
3153
|
+
}
|
|
3154
|
+
if (typeof pick === 'object') {
|
|
3155
|
+
pick = pick.pick;
|
|
3156
|
+
}
|
|
3157
|
+
return {
|
|
3158
|
+
type: Directory,
|
|
3159
|
+
name: pick
|
|
3160
|
+
};
|
|
3161
|
+
};
|
|
3162
|
+
const getVisibleItems$7 = (picks, minLineY, maxLineY, focusedIndex, setSize) => {
|
|
3163
|
+
const visibleItems = picks.map((pick, index) => ({
|
|
3164
|
+
description: getPickDescription$5(pick),
|
|
3165
|
+
fileIcon: getPickFileIcon$1(pick),
|
|
3166
|
+
icon: getPickIcon$5(),
|
|
3167
|
+
isActive: index + minLineY === focusedIndex,
|
|
3168
|
+
label: getPickLabel$5(pick),
|
|
3169
|
+
matches: [],
|
|
3170
|
+
posInSet: index + minLineY + 1,
|
|
3171
|
+
setSize
|
|
3172
|
+
}));
|
|
3173
|
+
return visibleItems;
|
|
3174
|
+
};
|
|
3175
|
+
|
|
3087
3176
|
const openWorkspaceFolder = uri => {
|
|
3088
3177
|
return invoke$1(/* Workspace.setPath */'Workspace.setPath', /* path */uri);
|
|
3089
3178
|
};
|
|
@@ -3109,19 +3198,7 @@ const getPicks$3 = async () => {
|
|
|
3109
3198
|
const recentlyOpened = await getRecentlyOpened();
|
|
3110
3199
|
return recentlyOpened;
|
|
3111
3200
|
};
|
|
3112
|
-
const getVisibleItems$
|
|
3113
|
-
const visibleItems = picks.map((pick, index) => ({
|
|
3114
|
-
description: getPickDescription$3(pick),
|
|
3115
|
-
fileIcon: getPickFileIcon(pick),
|
|
3116
|
-
icon: getPickIcon$3(),
|
|
3117
|
-
isActive: index + minLineY === focusedIndex,
|
|
3118
|
-
label: getPickLabel$3(pick),
|
|
3119
|
-
matches: [],
|
|
3120
|
-
posInSet: index + minLineY + 1,
|
|
3121
|
-
setSize
|
|
3122
|
-
}));
|
|
3123
|
-
return visibleItems;
|
|
3124
|
-
};
|
|
3201
|
+
const getVisibleItems$6 = getVisibleItems$7;
|
|
3125
3202
|
|
|
3126
3203
|
// TODO selectPick should be independent of show/hide
|
|
3127
3204
|
const selectPick$3 = async pick => {
|
|
@@ -3137,13 +3214,13 @@ const getFilterValue$3 = value => {
|
|
|
3137
3214
|
const getPickFilterValue$3 = pick => {
|
|
3138
3215
|
return pathBaseName(pick);
|
|
3139
3216
|
};
|
|
3140
|
-
const getPickLabel$
|
|
3217
|
+
const getPickLabel$4 = pick => {
|
|
3141
3218
|
return pathBaseName(pick);
|
|
3142
3219
|
};
|
|
3143
|
-
const getPickDescription$
|
|
3220
|
+
const getPickDescription$4 = pick => {
|
|
3144
3221
|
return pathDirName(pick);
|
|
3145
3222
|
};
|
|
3146
|
-
const getPickIcon$
|
|
3223
|
+
const getPickIcon$4 = () => {
|
|
3147
3224
|
return '';
|
|
3148
3225
|
};
|
|
3149
3226
|
const getPickFileIcon = pick => {
|
|
@@ -3169,20 +3246,24 @@ const QuickPickEntriesOpenRecent = {
|
|
|
3169
3246
|
getFilterValue: getFilterValue$3,
|
|
3170
3247
|
getLabel,
|
|
3171
3248
|
getNoResults: getNoResults$3,
|
|
3172
|
-
getPickDescription: getPickDescription$
|
|
3249
|
+
getPickDescription: getPickDescription$4,
|
|
3173
3250
|
getPickFileIcon,
|
|
3174
3251
|
getPickFilterValue: getPickFilterValue$3,
|
|
3175
|
-
getPickIcon: getPickIcon$
|
|
3176
|
-
getPickLabel: getPickLabel$
|
|
3252
|
+
getPickIcon: getPickIcon$4,
|
|
3253
|
+
getPickLabel: getPickLabel$4,
|
|
3177
3254
|
getPicks: getPicks$3,
|
|
3178
3255
|
getPlaceholder: getPlaceholder$3,
|
|
3179
|
-
getVisibleItems: getVisibleItems$
|
|
3256
|
+
getVisibleItems: getVisibleItems$6,
|
|
3180
3257
|
isPrepared: isPrepared$3,
|
|
3181
3258
|
name: name$3,
|
|
3182
3259
|
selectPick: selectPick$3,
|
|
3183
3260
|
state: state$3
|
|
3184
3261
|
};
|
|
3185
3262
|
|
|
3263
|
+
const getVisibleItems$5 = (picks, minLineY, maxLineY, focusedIndex, setSize) => {
|
|
3264
|
+
return [];
|
|
3265
|
+
};
|
|
3266
|
+
|
|
3186
3267
|
const name$2 = 'symbol';
|
|
3187
3268
|
const getPlaceholder$2 = () => {
|
|
3188
3269
|
return '';
|
|
@@ -3196,9 +3277,7 @@ const getPicks$2 = async () => {
|
|
|
3196
3277
|
const picks = [];
|
|
3197
3278
|
return picks;
|
|
3198
3279
|
};
|
|
3199
|
-
const getVisibleItems$
|
|
3200
|
-
return [];
|
|
3201
|
-
};
|
|
3280
|
+
const getVisibleItems$4 = getVisibleItems$5;
|
|
3202
3281
|
const selectPick$2 = async item => {
|
|
3203
3282
|
return {
|
|
3204
3283
|
command: Hide
|
|
@@ -3208,7 +3287,7 @@ const getFilterValue$2 = value => {
|
|
|
3208
3287
|
return value;
|
|
3209
3288
|
};
|
|
3210
3289
|
const state$2 = {};
|
|
3211
|
-
const getPickDescription$
|
|
3290
|
+
const getPickDescription$3 = value => {
|
|
3212
3291
|
return '';
|
|
3213
3292
|
};
|
|
3214
3293
|
const isPrepared$2 = () => {
|
|
@@ -3217,10 +3296,10 @@ const isPrepared$2 = () => {
|
|
|
3217
3296
|
const getPickFilterValue$2 = value => {
|
|
3218
3297
|
return value;
|
|
3219
3298
|
};
|
|
3220
|
-
const getPickLabel$
|
|
3299
|
+
const getPickLabel$3 = value => {
|
|
3221
3300
|
return value;
|
|
3222
3301
|
};
|
|
3223
|
-
const getPickIcon$
|
|
3302
|
+
const getPickIcon$3 = value => {
|
|
3224
3303
|
return '';
|
|
3225
3304
|
};
|
|
3226
3305
|
|
|
@@ -3228,19 +3307,42 @@ const QuickPickEntriesSymbol = {
|
|
|
3228
3307
|
__proto__: null,
|
|
3229
3308
|
getFilterValue: getFilterValue$2,
|
|
3230
3309
|
getNoResults: getNoResults$2,
|
|
3231
|
-
getPickDescription: getPickDescription$
|
|
3310
|
+
getPickDescription: getPickDescription$3,
|
|
3232
3311
|
getPickFilterValue: getPickFilterValue$2,
|
|
3233
|
-
getPickIcon: getPickIcon$
|
|
3234
|
-
getPickLabel: getPickLabel$
|
|
3312
|
+
getPickIcon: getPickIcon$3,
|
|
3313
|
+
getPickLabel: getPickLabel$3,
|
|
3235
3314
|
getPicks: getPicks$2,
|
|
3236
3315
|
getPlaceholder: getPlaceholder$2,
|
|
3237
|
-
getVisibleItems: getVisibleItems$
|
|
3316
|
+
getVisibleItems: getVisibleItems$4,
|
|
3238
3317
|
isPrepared: isPrepared$2,
|
|
3239
3318
|
name: name$2,
|
|
3240
3319
|
selectPick: selectPick$2,
|
|
3241
3320
|
state: state$2
|
|
3242
3321
|
};
|
|
3243
3322
|
|
|
3323
|
+
const getPickDescription$2 = () => {
|
|
3324
|
+
return '';
|
|
3325
|
+
};
|
|
3326
|
+
const getPickIcon$2 = value => {
|
|
3327
|
+
return '';
|
|
3328
|
+
};
|
|
3329
|
+
const getPickLabel$2 = value => {
|
|
3330
|
+
return value;
|
|
3331
|
+
};
|
|
3332
|
+
const getVisibleItems$3 = (picks, minLineY, maxLineY, focusedIndex, setSize) => {
|
|
3333
|
+
const visibleItems = picks.map((pick, index) => ({
|
|
3334
|
+
description: getPickDescription$2(),
|
|
3335
|
+
fileIcon: '',
|
|
3336
|
+
icon: getPickIcon$2(),
|
|
3337
|
+
isActive: index + minLineY === focusedIndex,
|
|
3338
|
+
label: getPickLabel$2(pick),
|
|
3339
|
+
matches: [],
|
|
3340
|
+
posInSet: index + minLineY + 1,
|
|
3341
|
+
setSize
|
|
3342
|
+
}));
|
|
3343
|
+
return visibleItems;
|
|
3344
|
+
};
|
|
3345
|
+
|
|
3244
3346
|
// TODO probably not needed
|
|
3245
3347
|
|
|
3246
3348
|
const getPlaceholder$1 = () => {
|
|
@@ -3284,19 +3386,7 @@ const isPrepared$1 = () => {
|
|
|
3284
3386
|
const getPickDescription$1 = () => {
|
|
3285
3387
|
return '';
|
|
3286
3388
|
};
|
|
3287
|
-
const getVisibleItems$
|
|
3288
|
-
const visibleItems = picks.map((pick, index) => ({
|
|
3289
|
-
description: getPickDescription$1(),
|
|
3290
|
-
fileIcon: '',
|
|
3291
|
-
icon: getPickIcon$1(),
|
|
3292
|
-
isActive: index + minLineY === focusedIndex,
|
|
3293
|
-
label: getPickLabel$1(pick),
|
|
3294
|
-
matches: [],
|
|
3295
|
-
posInSet: index + minLineY + 1,
|
|
3296
|
-
setSize
|
|
3297
|
-
}));
|
|
3298
|
-
return visibleItems;
|
|
3299
|
-
};
|
|
3389
|
+
const getVisibleItems$2 = getVisibleItems$3;
|
|
3300
3390
|
|
|
3301
3391
|
const QuickPickEntriesView = {
|
|
3302
3392
|
__proto__: null,
|
|
@@ -3309,13 +3399,27 @@ const QuickPickEntriesView = {
|
|
|
3309
3399
|
getPickLabel: getPickLabel$1,
|
|
3310
3400
|
getPicks: getPicks$1,
|
|
3311
3401
|
getPlaceholder: getPlaceholder$1,
|
|
3312
|
-
getVisibleItems: getVisibleItems$
|
|
3402
|
+
getVisibleItems: getVisibleItems$2,
|
|
3313
3403
|
isPrepared: isPrepared$1,
|
|
3314
3404
|
name: name$1,
|
|
3315
3405
|
selectPick: selectPick$1,
|
|
3316
3406
|
state: state$1
|
|
3317
3407
|
};
|
|
3318
3408
|
|
|
3409
|
+
const getVisibleItems$1 = (picks, minLineY, maxLineY, focusedIndex, setSize) => {
|
|
3410
|
+
const visibleItems = picks.map((pick, index) => ({
|
|
3411
|
+
description: '',
|
|
3412
|
+
fileIcon: '',
|
|
3413
|
+
icon: '',
|
|
3414
|
+
isActive: index + minLineY === focusedIndex,
|
|
3415
|
+
label: pick.label || '',
|
|
3416
|
+
matches: [],
|
|
3417
|
+
posInSet: index + minLineY + 1,
|
|
3418
|
+
setSize
|
|
3419
|
+
}));
|
|
3420
|
+
return visibleItems;
|
|
3421
|
+
};
|
|
3422
|
+
|
|
3319
3423
|
const name = 'workspace-symbol';
|
|
3320
3424
|
const getPlaceholder = () => {
|
|
3321
3425
|
return '';
|
|
@@ -3353,19 +3457,7 @@ const selectPick = async item => {
|
|
|
3353
3457
|
const getFilterValue = value => {
|
|
3354
3458
|
return value;
|
|
3355
3459
|
};
|
|
3356
|
-
const getVisibleItems =
|
|
3357
|
-
const visibleItems = picks.map((pick, index) => ({
|
|
3358
|
-
description: '',
|
|
3359
|
-
fileIcon: '',
|
|
3360
|
-
icon: '',
|
|
3361
|
-
isActive: index + minLineY === focusedIndex,
|
|
3362
|
-
label: pick.label || '',
|
|
3363
|
-
matches: [],
|
|
3364
|
-
posInSet: index + minLineY + 1,
|
|
3365
|
-
setSize
|
|
3366
|
-
}));
|
|
3367
|
-
return visibleItems;
|
|
3368
|
-
};
|
|
3460
|
+
const getVisibleItems = getVisibleItems$1;
|
|
3369
3461
|
|
|
3370
3462
|
const QuickPickEntriesWorkspaceSymbol = {
|
|
3371
3463
|
__proto__: null,
|