@lvce-editor/file-search-worker 5.1.0 → 5.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 +281 -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
1151
|
const getPickFileIcon$2 = 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$
|
|
1179
|
+
getPickDescription: getPickDescription$d,
|
|
1187
1180
|
getPickFileIcon: getPickFileIcon$2,
|
|
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;
|
|
@@ -1394,7 +1387,6 @@ const getIconsCached = (paths, fileIconCache) => {
|
|
|
1394
1387
|
return paths.map(path => fileIconCache[path]);
|
|
1395
1388
|
};
|
|
1396
1389
|
|
|
1397
|
-
const Directory = 3;
|
|
1398
1390
|
const File$1 = 7;
|
|
1399
1391
|
|
|
1400
1392
|
const getMissingIconRequests = (dirents, fileIconCache) => {
|
|
@@ -2155,7 +2147,15 @@ const add = menuEntries => {
|
|
|
2155
2147
|
const getVisible = (provider, items, minLineY, maxLineY, focusedIndex, icons) => {
|
|
2156
2148
|
const setSize = items.length;
|
|
2157
2149
|
const range = items.slice(minLineY, maxLineY);
|
|
2158
|
-
const
|
|
2150
|
+
const protoVisibleItems = provider.getVisibleItems(range, minLineY, maxLineY, focusedIndex, setSize, icons);
|
|
2151
|
+
const visibleItems = protoVisibleItems.map((visibleItem, i) => {
|
|
2152
|
+
return {
|
|
2153
|
+
...visibleItem,
|
|
2154
|
+
posInSet: minLineY + i + 1,
|
|
2155
|
+
setSize,
|
|
2156
|
+
isActive: i === focusedIndex
|
|
2157
|
+
};
|
|
2158
|
+
});
|
|
2159
2159
|
return visibleItems;
|
|
2160
2160
|
};
|
|
2161
2161
|
|
|
@@ -2565,6 +2565,29 @@ const getColorThemeNames = async () => {
|
|
|
2565
2565
|
return invoke$1(/* Ajax.getJson */'ColorTheme.getColorThemeNames');
|
|
2566
2566
|
};
|
|
2567
2567
|
|
|
2568
|
+
const getPickDescription$c = value => {
|
|
2569
|
+
return '';
|
|
2570
|
+
};
|
|
2571
|
+
const getPickIcon$d = pick => {
|
|
2572
|
+
return '';
|
|
2573
|
+
};
|
|
2574
|
+
const getPickLabel$d = pick => {
|
|
2575
|
+
return pick;
|
|
2576
|
+
};
|
|
2577
|
+
const getVisibleItems$f = (picks, minLineY, maxLineY, focusedIndex, setSize, icons) => {
|
|
2578
|
+
const visibleItems = picks.map((item, index) => {
|
|
2579
|
+
const pick = item.pick;
|
|
2580
|
+
return {
|
|
2581
|
+
description: getPickDescription$c(),
|
|
2582
|
+
fileIcon: '',
|
|
2583
|
+
icon: getPickIcon$d(),
|
|
2584
|
+
label: getPickLabel$d(pick),
|
|
2585
|
+
matches: []
|
|
2586
|
+
};
|
|
2587
|
+
});
|
|
2588
|
+
return visibleItems;
|
|
2589
|
+
};
|
|
2590
|
+
|
|
2568
2591
|
const setColorTheme = id => {
|
|
2569
2592
|
return invoke$1(/* ColorTheme.setColorTheme */'ColorTheme.setColorTheme', /* colorThemeId */id);
|
|
2570
2593
|
};
|
|
@@ -2578,19 +2601,7 @@ const getPicks$7 = async searchValue => {
|
|
|
2578
2601
|
const colorThemeNames = await getColorThemeNames();
|
|
2579
2602
|
return colorThemeNames;
|
|
2580
2603
|
};
|
|
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
|
-
};
|
|
2604
|
+
const getVisibleItems$e = getVisibleItems$f;
|
|
2594
2605
|
const selectPick$7 = async pick => {
|
|
2595
2606
|
await setColorTheme(/* colorThemeId */pick);
|
|
2596
2607
|
return {
|
|
@@ -2611,14 +2622,14 @@ const getNoResults$7 = () => {
|
|
|
2611
2622
|
const getPickFilterValue$7 = pick => {
|
|
2612
2623
|
return pick;
|
|
2613
2624
|
};
|
|
2614
|
-
const getPickLabel$
|
|
2625
|
+
const getPickLabel$c = pick => {
|
|
2615
2626
|
return pick;
|
|
2616
2627
|
};
|
|
2617
|
-
const getPickIcon$
|
|
2628
|
+
const getPickIcon$c = pick => {
|
|
2618
2629
|
return '';
|
|
2619
2630
|
};
|
|
2620
2631
|
const state$8 = {};
|
|
2621
|
-
const getPickDescription$
|
|
2632
|
+
const getPickDescription$b = value => {
|
|
2622
2633
|
return '';
|
|
2623
2634
|
};
|
|
2624
2635
|
const isPrepared$7 = () => {
|
|
@@ -2636,13 +2647,13 @@ const QuickPickEntriesColorTheme = {
|
|
|
2636
2647
|
getHelpEntries: getHelpEntries$2,
|
|
2637
2648
|
getLabel: getLabel$4,
|
|
2638
2649
|
getNoResults: getNoResults$7,
|
|
2639
|
-
getPickDescription: getPickDescription$
|
|
2650
|
+
getPickDescription: getPickDescription$b,
|
|
2640
2651
|
getPickFilterValue: getPickFilterValue$7,
|
|
2641
|
-
getPickIcon: getPickIcon$
|
|
2642
|
-
getPickLabel: getPickLabel$
|
|
2652
|
+
getPickIcon: getPickIcon$c,
|
|
2653
|
+
getPickLabel: getPickLabel$c,
|
|
2643
2654
|
getPicks: getPicks$7,
|
|
2644
2655
|
getPlaceholder: getPlaceholder$7,
|
|
2645
|
-
getVisibleItems: getVisibleItems$
|
|
2656
|
+
getVisibleItems: getVisibleItems$e,
|
|
2646
2657
|
isPrepared: isPrepared$7,
|
|
2647
2658
|
name: name$7,
|
|
2648
2659
|
selectPick: selectPick$7,
|
|
@@ -2670,12 +2681,32 @@ const warn = (...args) => {
|
|
|
2670
2681
|
console.warn(...args);
|
|
2671
2682
|
};
|
|
2672
2683
|
|
|
2684
|
+
const getPickIcon$b = () => {
|
|
2685
|
+
return '';
|
|
2686
|
+
};
|
|
2687
|
+
const getPickLabel$b = pick => {
|
|
2688
|
+
return pick.label;
|
|
2689
|
+
};
|
|
2690
|
+
const getVisibleItems$d = (picks, minLineY, maxLineY, focusedIndex, setSize, icons) => {
|
|
2691
|
+
const visibleItems = picks.map((item, index) => {
|
|
2692
|
+
const pick = item;
|
|
2693
|
+
return {
|
|
2694
|
+
description: pick.description || '',
|
|
2695
|
+
fileIcon: '',
|
|
2696
|
+
icon: getPickIcon$b(),
|
|
2697
|
+
label: getPickLabel$b(pick),
|
|
2698
|
+
matches: []
|
|
2699
|
+
};
|
|
2700
|
+
});
|
|
2701
|
+
return visibleItems;
|
|
2702
|
+
};
|
|
2703
|
+
|
|
2673
2704
|
const name$6 = 'command';
|
|
2674
2705
|
const state$7 = {};
|
|
2675
2706
|
const isPrepared$6 = () => {
|
|
2676
2707
|
return false;
|
|
2677
2708
|
};
|
|
2678
|
-
const getPickDescription$
|
|
2709
|
+
const getPickDescription$a = () => {
|
|
2679
2710
|
return '';
|
|
2680
2711
|
};
|
|
2681
2712
|
const getPlaceholder$6 = () => {
|
|
@@ -2731,19 +2762,7 @@ const getPicks$6 = async () => {
|
|
|
2731
2762
|
const allPicks = [...builtinPicks, ...extensionPicks];
|
|
2732
2763
|
return allPicks;
|
|
2733
2764
|
};
|
|
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
|
-
};
|
|
2765
|
+
const getVisibleItems$c = getVisibleItems$d;
|
|
2747
2766
|
const shouldHide = item => {
|
|
2748
2767
|
if (item.id === 'Viewlet.openWidget' && item.args[0] === 'QuickPick') {
|
|
2749
2768
|
return false;
|
|
@@ -2787,10 +2806,10 @@ const getFilterValue$6 = value => {
|
|
|
2787
2806
|
const getPickFilterValue$6 = pick => {
|
|
2788
2807
|
return pick.label;
|
|
2789
2808
|
};
|
|
2790
|
-
const getPickLabel$
|
|
2809
|
+
const getPickLabel$a = pick => {
|
|
2791
2810
|
return pick.label;
|
|
2792
2811
|
};
|
|
2793
|
-
const getPickIcon$
|
|
2812
|
+
const getPickIcon$a = () => {
|
|
2794
2813
|
return '';
|
|
2795
2814
|
};
|
|
2796
2815
|
|
|
@@ -2799,13 +2818,13 @@ const QuickPickEntriesCommand = {
|
|
|
2799
2818
|
getFilterValue: getFilterValue$6,
|
|
2800
2819
|
getLabel: getLabel$3,
|
|
2801
2820
|
getNoResults: getNoResults$6,
|
|
2802
|
-
getPickDescription: getPickDescription$
|
|
2821
|
+
getPickDescription: getPickDescription$a,
|
|
2803
2822
|
getPickFilterValue: getPickFilterValue$6,
|
|
2804
|
-
getPickIcon: getPickIcon$
|
|
2805
|
-
getPickLabel: getPickLabel$
|
|
2823
|
+
getPickIcon: getPickIcon$a,
|
|
2824
|
+
getPickLabel: getPickLabel$a,
|
|
2806
2825
|
getPicks: getPicks$6,
|
|
2807
2826
|
getPlaceholder: getPlaceholder$6,
|
|
2808
|
-
getVisibleItems: getVisibleItems$
|
|
2827
|
+
getVisibleItems: getVisibleItems$c,
|
|
2809
2828
|
isPrepared: isPrepared$6,
|
|
2810
2829
|
name: name$6,
|
|
2811
2830
|
selectPick: selectPick$6,
|
|
@@ -2821,6 +2840,38 @@ const SourceControl = 1;
|
|
|
2821
2840
|
const Cloud = 2;
|
|
2822
2841
|
const Tag = 3;
|
|
2823
2842
|
|
|
2843
|
+
const getPickDescription$9 = pick => {
|
|
2844
|
+
return pick.description || '';
|
|
2845
|
+
};
|
|
2846
|
+
const getPickLabel$9 = pick => {
|
|
2847
|
+
return pick.label;
|
|
2848
|
+
};
|
|
2849
|
+
const convertIcon$1 = icon => {
|
|
2850
|
+
switch (icon) {
|
|
2851
|
+
case SourceControl:
|
|
2852
|
+
return SourceControl$1;
|
|
2853
|
+
case Cloud:
|
|
2854
|
+
return Cloud$1;
|
|
2855
|
+
case Tag:
|
|
2856
|
+
return Tag$1;
|
|
2857
|
+
default:
|
|
2858
|
+
return None;
|
|
2859
|
+
}
|
|
2860
|
+
};
|
|
2861
|
+
const getPickIcon$9 = pick => {
|
|
2862
|
+
return convertIcon$1(pick.icon);
|
|
2863
|
+
};
|
|
2864
|
+
const getVisibleItems$b = (picks, minLineY, maxLineY, focusedIndex, setSize, icons) => {
|
|
2865
|
+
const visibleItems = picks.slice(minLineY, maxLineY + 1).map((pick, index) => ({
|
|
2866
|
+
description: getPickDescription$9(pick),
|
|
2867
|
+
fileIcon: '',
|
|
2868
|
+
icon: getPickIcon$9(pick),
|
|
2869
|
+
label: getPickLabel$9(pick),
|
|
2870
|
+
matches: []
|
|
2871
|
+
}));
|
|
2872
|
+
return visibleItems;
|
|
2873
|
+
};
|
|
2874
|
+
|
|
2824
2875
|
const name$5 = 'custom';
|
|
2825
2876
|
const state$6 = {
|
|
2826
2877
|
args: []
|
|
@@ -2864,10 +2915,10 @@ const getFilterValue$5 = value => {
|
|
|
2864
2915
|
const getPickFilterValue$5 = pick => {
|
|
2865
2916
|
return pick;
|
|
2866
2917
|
};
|
|
2867
|
-
const getPickLabel$
|
|
2918
|
+
const getPickLabel$8 = pick => {
|
|
2868
2919
|
return pick.label;
|
|
2869
2920
|
};
|
|
2870
|
-
const getPickDescription$
|
|
2921
|
+
const getPickDescription$8 = pick => {
|
|
2871
2922
|
return pick.description || '';
|
|
2872
2923
|
};
|
|
2873
2924
|
const convertIcon = icon => {
|
|
@@ -2882,25 +2933,13 @@ const convertIcon = icon => {
|
|
|
2882
2933
|
return None;
|
|
2883
2934
|
}
|
|
2884
2935
|
};
|
|
2885
|
-
const getPickIcon$
|
|
2936
|
+
const getPickIcon$8 = pick => {
|
|
2886
2937
|
return convertIcon(pick.icon);
|
|
2887
2938
|
};
|
|
2888
2939
|
const isPrepared$5 = () => {
|
|
2889
2940
|
return true;
|
|
2890
2941
|
};
|
|
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
|
-
};
|
|
2942
|
+
const getVisibleItems$a = getVisibleItems$b;
|
|
2904
2943
|
|
|
2905
2944
|
const QuickPickEntriesCustom = {
|
|
2906
2945
|
__proto__: null,
|
|
@@ -2908,13 +2947,13 @@ const QuickPickEntriesCustom = {
|
|
|
2908
2947
|
getHelpEntries: getHelpEntries$1,
|
|
2909
2948
|
getLabel: getLabel$2,
|
|
2910
2949
|
getNoResults: getNoResults$5,
|
|
2911
|
-
getPickDescription: getPickDescription$
|
|
2950
|
+
getPickDescription: getPickDescription$8,
|
|
2912
2951
|
getPickFilterValue: getPickFilterValue$5,
|
|
2913
|
-
getPickIcon: getPickIcon$
|
|
2914
|
-
getPickLabel: getPickLabel$
|
|
2952
|
+
getPickIcon: getPickIcon$8,
|
|
2953
|
+
getPickLabel: getPickLabel$8,
|
|
2915
2954
|
getPicks: getPicks$5,
|
|
2916
2955
|
getPlaceholder: getPlaceholder$5,
|
|
2917
|
-
getVisibleItems: getVisibleItems$
|
|
2956
|
+
getVisibleItems: getVisibleItems$a,
|
|
2918
2957
|
isPrepared: isPrepared$5,
|
|
2919
2958
|
name: name$5,
|
|
2920
2959
|
selectPick: selectPick$5,
|
|
@@ -2931,6 +2970,41 @@ const getProtocol = uri => {
|
|
|
2931
2970
|
return '';
|
|
2932
2971
|
};
|
|
2933
2972
|
|
|
2973
|
+
const getVisibleItems$9 = (files, minLineY, maxLineY, focusedIndex, setSize, icons) => {
|
|
2974
|
+
const visibleItems = files.map((item, i) => {
|
|
2975
|
+
const pick = item.pick;
|
|
2976
|
+
const label = getPickLabel$7(pick);
|
|
2977
|
+
const description = getPickDescription$7(pick);
|
|
2978
|
+
const icon = getPickIcon$7();
|
|
2979
|
+
const fileIcon = icons[i];
|
|
2980
|
+
return {
|
|
2981
|
+
label,
|
|
2982
|
+
description,
|
|
2983
|
+
icon,
|
|
2984
|
+
fileIcon,
|
|
2985
|
+
matches: item.matches
|
|
2986
|
+
};
|
|
2987
|
+
});
|
|
2988
|
+
return visibleItems;
|
|
2989
|
+
};
|
|
2990
|
+
const getPickLabel$7 = pick => {
|
|
2991
|
+
if (typeof pick === 'object') {
|
|
2992
|
+
pick = pick.pick;
|
|
2993
|
+
}
|
|
2994
|
+
const baseName = pathBaseName(pick);
|
|
2995
|
+
return baseName;
|
|
2996
|
+
};
|
|
2997
|
+
const getPickDescription$7 = pick => {
|
|
2998
|
+
if (typeof pick === 'object') {
|
|
2999
|
+
pick = pick.pick;
|
|
3000
|
+
}
|
|
3001
|
+
const dirName = pathDirName(pick);
|
|
3002
|
+
return dirName;
|
|
3003
|
+
};
|
|
3004
|
+
const getPickIcon$7 = () => {
|
|
3005
|
+
return '';
|
|
3006
|
+
};
|
|
3007
|
+
|
|
2934
3008
|
const getWorkspacePath = async () => {
|
|
2935
3009
|
return invoke$1('Workspace.getPath');
|
|
2936
3010
|
};
|
|
@@ -3003,21 +3077,21 @@ const getPickFilterValue$4 = pick => {
|
|
|
3003
3077
|
}
|
|
3004
3078
|
return pick;
|
|
3005
3079
|
};
|
|
3006
|
-
const getPickLabel$
|
|
3080
|
+
const getPickLabel$6 = pick => {
|
|
3007
3081
|
if (typeof pick === 'object') {
|
|
3008
3082
|
pick = pick.pick;
|
|
3009
3083
|
}
|
|
3010
3084
|
const baseName = pathBaseName(pick);
|
|
3011
3085
|
return baseName;
|
|
3012
3086
|
};
|
|
3013
|
-
const getPickDescription$
|
|
3087
|
+
const getPickDescription$6 = pick => {
|
|
3014
3088
|
if (typeof pick === 'object') {
|
|
3015
3089
|
pick = pick.pick;
|
|
3016
3090
|
}
|
|
3017
3091
|
const dirName = pathDirName(pick);
|
|
3018
3092
|
return dirName;
|
|
3019
3093
|
};
|
|
3020
|
-
const getPickIcon$
|
|
3094
|
+
const getPickIcon$6 = () => {
|
|
3021
3095
|
return '';
|
|
3022
3096
|
};
|
|
3023
3097
|
const getPickFileIcon$1 = pick => {
|
|
@@ -3040,40 +3114,21 @@ const isPrepared$4 = () => {
|
|
|
3040
3114
|
const protocol = getProtocol(workspace);
|
|
3041
3115
|
return !protocol;
|
|
3042
3116
|
};
|
|
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
|
-
};
|
|
3117
|
+
const getVisibleItems$8 = getVisibleItems$9;
|
|
3063
3118
|
|
|
3064
3119
|
const QuickPickEntriesFile = {
|
|
3065
3120
|
__proto__: null,
|
|
3066
3121
|
getFilterValue: getFilterValue$4,
|
|
3067
3122
|
getLabel: getLabel$1,
|
|
3068
3123
|
getNoResults: getNoResults$4,
|
|
3069
|
-
getPickDescription: getPickDescription$
|
|
3124
|
+
getPickDescription: getPickDescription$6,
|
|
3070
3125
|
getPickFileIcon: getPickFileIcon$1,
|
|
3071
3126
|
getPickFilterValue: getPickFilterValue$4,
|
|
3072
|
-
getPickIcon: getPickIcon$
|
|
3073
|
-
getPickLabel: getPickLabel$
|
|
3127
|
+
getPickIcon: getPickIcon$6,
|
|
3128
|
+
getPickLabel: getPickLabel$6,
|
|
3074
3129
|
getPicks: getPicks$4,
|
|
3075
3130
|
getPlaceholder: getPlaceholder$4,
|
|
3076
|
-
getVisibleItems: getVisibleItems$
|
|
3131
|
+
getVisibleItems: getVisibleItems$8,
|
|
3077
3132
|
isPrepared: isPrepared$4,
|
|
3078
3133
|
name: name$4,
|
|
3079
3134
|
selectPick: selectPick$4,
|
|
@@ -3084,6 +3139,30 @@ const getRecentlyOpened = () => {
|
|
|
3084
3139
|
return invoke$1(/* RecentlyOpened.getRecentlyOpened */'RecentlyOpened.getRecentlyOpened');
|
|
3085
3140
|
};
|
|
3086
3141
|
|
|
3142
|
+
const getPickDescription$5 = pick => {
|
|
3143
|
+
return pathDirName(pick);
|
|
3144
|
+
};
|
|
3145
|
+
const getPickIcon$5 = () => {
|
|
3146
|
+
return '';
|
|
3147
|
+
};
|
|
3148
|
+
const getPickLabel$5 = pick => {
|
|
3149
|
+
return pathBaseName(pick);
|
|
3150
|
+
};
|
|
3151
|
+
const getVisibleItems$7 = (picks, minLineY, maxLineY, focusedIndex, setSize, icons) => {
|
|
3152
|
+
const visibleItems = picks.map((item, index) => {
|
|
3153
|
+
const pick = item.pick;
|
|
3154
|
+
const fileIcon = icons[index];
|
|
3155
|
+
return {
|
|
3156
|
+
description: getPickDescription$5(pick),
|
|
3157
|
+
fileIcon,
|
|
3158
|
+
icon: getPickIcon$5(),
|
|
3159
|
+
label: getPickLabel$5(pick),
|
|
3160
|
+
matches: pick.matches
|
|
3161
|
+
};
|
|
3162
|
+
});
|
|
3163
|
+
return visibleItems;
|
|
3164
|
+
};
|
|
3165
|
+
|
|
3087
3166
|
const openWorkspaceFolder = uri => {
|
|
3088
3167
|
return invoke$1(/* Workspace.setPath */'Workspace.setPath', /* path */uri);
|
|
3089
3168
|
};
|
|
@@ -3109,19 +3188,7 @@ const getPicks$3 = async () => {
|
|
|
3109
3188
|
const recentlyOpened = await getRecentlyOpened();
|
|
3110
3189
|
return recentlyOpened;
|
|
3111
3190
|
};
|
|
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
|
-
};
|
|
3191
|
+
const getVisibleItems$6 = getVisibleItems$7;
|
|
3125
3192
|
|
|
3126
3193
|
// TODO selectPick should be independent of show/hide
|
|
3127
3194
|
const selectPick$3 = async pick => {
|
|
@@ -3137,13 +3204,13 @@ const getFilterValue$3 = value => {
|
|
|
3137
3204
|
const getPickFilterValue$3 = pick => {
|
|
3138
3205
|
return pathBaseName(pick);
|
|
3139
3206
|
};
|
|
3140
|
-
const getPickLabel$
|
|
3207
|
+
const getPickLabel$4 = pick => {
|
|
3141
3208
|
return pathBaseName(pick);
|
|
3142
3209
|
};
|
|
3143
|
-
const getPickDescription$
|
|
3210
|
+
const getPickDescription$4 = pick => {
|
|
3144
3211
|
return pathDirName(pick);
|
|
3145
3212
|
};
|
|
3146
|
-
const getPickIcon$
|
|
3213
|
+
const getPickIcon$4 = () => {
|
|
3147
3214
|
return '';
|
|
3148
3215
|
};
|
|
3149
3216
|
const getPickFileIcon = pick => {
|
|
@@ -3153,9 +3220,11 @@ const getPickFileIcon = pick => {
|
|
|
3153
3220
|
if (typeof pick === 'object') {
|
|
3154
3221
|
pick = pick.pick;
|
|
3155
3222
|
}
|
|
3223
|
+
const baseName = pathBaseName(pick);
|
|
3156
3224
|
return {
|
|
3157
|
-
type:
|
|
3158
|
-
name:
|
|
3225
|
+
type: File$1,
|
|
3226
|
+
name: baseName,
|
|
3227
|
+
path: pick
|
|
3159
3228
|
};
|
|
3160
3229
|
};
|
|
3161
3230
|
const state$3 = {};
|
|
@@ -3169,20 +3238,24 @@ const QuickPickEntriesOpenRecent = {
|
|
|
3169
3238
|
getFilterValue: getFilterValue$3,
|
|
3170
3239
|
getLabel,
|
|
3171
3240
|
getNoResults: getNoResults$3,
|
|
3172
|
-
getPickDescription: getPickDescription$
|
|
3241
|
+
getPickDescription: getPickDescription$4,
|
|
3173
3242
|
getPickFileIcon,
|
|
3174
3243
|
getPickFilterValue: getPickFilterValue$3,
|
|
3175
|
-
getPickIcon: getPickIcon$
|
|
3176
|
-
getPickLabel: getPickLabel$
|
|
3244
|
+
getPickIcon: getPickIcon$4,
|
|
3245
|
+
getPickLabel: getPickLabel$4,
|
|
3177
3246
|
getPicks: getPicks$3,
|
|
3178
3247
|
getPlaceholder: getPlaceholder$3,
|
|
3179
|
-
getVisibleItems: getVisibleItems$
|
|
3248
|
+
getVisibleItems: getVisibleItems$6,
|
|
3180
3249
|
isPrepared: isPrepared$3,
|
|
3181
3250
|
name: name$3,
|
|
3182
3251
|
selectPick: selectPick$3,
|
|
3183
3252
|
state: state$3
|
|
3184
3253
|
};
|
|
3185
3254
|
|
|
3255
|
+
const getVisibleItems$5 = (picks, minLineY, maxLineY, focusedIndex, setSize) => {
|
|
3256
|
+
return [];
|
|
3257
|
+
};
|
|
3258
|
+
|
|
3186
3259
|
const name$2 = 'symbol';
|
|
3187
3260
|
const getPlaceholder$2 = () => {
|
|
3188
3261
|
return '';
|
|
@@ -3196,9 +3269,7 @@ const getPicks$2 = async () => {
|
|
|
3196
3269
|
const picks = [];
|
|
3197
3270
|
return picks;
|
|
3198
3271
|
};
|
|
3199
|
-
const getVisibleItems$
|
|
3200
|
-
return [];
|
|
3201
|
-
};
|
|
3272
|
+
const getVisibleItems$4 = getVisibleItems$5;
|
|
3202
3273
|
const selectPick$2 = async item => {
|
|
3203
3274
|
return {
|
|
3204
3275
|
command: Hide
|
|
@@ -3208,7 +3279,7 @@ const getFilterValue$2 = value => {
|
|
|
3208
3279
|
return value;
|
|
3209
3280
|
};
|
|
3210
3281
|
const state$2 = {};
|
|
3211
|
-
const getPickDescription$
|
|
3282
|
+
const getPickDescription$3 = value => {
|
|
3212
3283
|
return '';
|
|
3213
3284
|
};
|
|
3214
3285
|
const isPrepared$2 = () => {
|
|
@@ -3217,10 +3288,10 @@ const isPrepared$2 = () => {
|
|
|
3217
3288
|
const getPickFilterValue$2 = value => {
|
|
3218
3289
|
return value;
|
|
3219
3290
|
};
|
|
3220
|
-
const getPickLabel$
|
|
3291
|
+
const getPickLabel$3 = value => {
|
|
3221
3292
|
return value;
|
|
3222
3293
|
};
|
|
3223
|
-
const getPickIcon$
|
|
3294
|
+
const getPickIcon$3 = value => {
|
|
3224
3295
|
return '';
|
|
3225
3296
|
};
|
|
3226
3297
|
|
|
@@ -3228,19 +3299,39 @@ const QuickPickEntriesSymbol = {
|
|
|
3228
3299
|
__proto__: null,
|
|
3229
3300
|
getFilterValue: getFilterValue$2,
|
|
3230
3301
|
getNoResults: getNoResults$2,
|
|
3231
|
-
getPickDescription: getPickDescription$
|
|
3302
|
+
getPickDescription: getPickDescription$3,
|
|
3232
3303
|
getPickFilterValue: getPickFilterValue$2,
|
|
3233
|
-
getPickIcon: getPickIcon$
|
|
3234
|
-
getPickLabel: getPickLabel$
|
|
3304
|
+
getPickIcon: getPickIcon$3,
|
|
3305
|
+
getPickLabel: getPickLabel$3,
|
|
3235
3306
|
getPicks: getPicks$2,
|
|
3236
3307
|
getPlaceholder: getPlaceholder$2,
|
|
3237
|
-
getVisibleItems: getVisibleItems$
|
|
3308
|
+
getVisibleItems: getVisibleItems$4,
|
|
3238
3309
|
isPrepared: isPrepared$2,
|
|
3239
3310
|
name: name$2,
|
|
3240
3311
|
selectPick: selectPick$2,
|
|
3241
3312
|
state: state$2
|
|
3242
3313
|
};
|
|
3243
3314
|
|
|
3315
|
+
const getPickDescription$2 = () => {
|
|
3316
|
+
return '';
|
|
3317
|
+
};
|
|
3318
|
+
const getPickIcon$2 = value => {
|
|
3319
|
+
return '';
|
|
3320
|
+
};
|
|
3321
|
+
const getPickLabel$2 = value => {
|
|
3322
|
+
return value;
|
|
3323
|
+
};
|
|
3324
|
+
const getVisibleItems$3 = (picks, minLineY, maxLineY, focusedIndex, setSize) => {
|
|
3325
|
+
const visibleItems = picks.map((pick, index) => ({
|
|
3326
|
+
description: getPickDescription$2(),
|
|
3327
|
+
fileIcon: '',
|
|
3328
|
+
icon: getPickIcon$2(),
|
|
3329
|
+
label: getPickLabel$2(pick),
|
|
3330
|
+
matches: []
|
|
3331
|
+
}));
|
|
3332
|
+
return visibleItems;
|
|
3333
|
+
};
|
|
3334
|
+
|
|
3244
3335
|
// TODO probably not needed
|
|
3245
3336
|
|
|
3246
3337
|
const getPlaceholder$1 = () => {
|
|
@@ -3284,19 +3375,7 @@ const isPrepared$1 = () => {
|
|
|
3284
3375
|
const getPickDescription$1 = () => {
|
|
3285
3376
|
return '';
|
|
3286
3377
|
};
|
|
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
|
-
};
|
|
3378
|
+
const getVisibleItems$2 = getVisibleItems$3;
|
|
3300
3379
|
|
|
3301
3380
|
const QuickPickEntriesView = {
|
|
3302
3381
|
__proto__: null,
|
|
@@ -3309,13 +3388,24 @@ const QuickPickEntriesView = {
|
|
|
3309
3388
|
getPickLabel: getPickLabel$1,
|
|
3310
3389
|
getPicks: getPicks$1,
|
|
3311
3390
|
getPlaceholder: getPlaceholder$1,
|
|
3312
|
-
getVisibleItems: getVisibleItems$
|
|
3391
|
+
getVisibleItems: getVisibleItems$2,
|
|
3313
3392
|
isPrepared: isPrepared$1,
|
|
3314
3393
|
name: name$1,
|
|
3315
3394
|
selectPick: selectPick$1,
|
|
3316
3395
|
state: state$1
|
|
3317
3396
|
};
|
|
3318
3397
|
|
|
3398
|
+
const getVisibleItems$1 = (picks, minLineY, maxLineY, focusedIndex, setSize) => {
|
|
3399
|
+
const visibleItems = picks.map((pick, index) => ({
|
|
3400
|
+
description: '',
|
|
3401
|
+
fileIcon: '',
|
|
3402
|
+
icon: '',
|
|
3403
|
+
label: pick.label || '',
|
|
3404
|
+
matches: []
|
|
3405
|
+
}));
|
|
3406
|
+
return visibleItems;
|
|
3407
|
+
};
|
|
3408
|
+
|
|
3319
3409
|
const name = 'workspace-symbol';
|
|
3320
3410
|
const getPlaceholder = () => {
|
|
3321
3411
|
return '';
|
|
@@ -3353,19 +3443,7 @@ const selectPick = async item => {
|
|
|
3353
3443
|
const getFilterValue = value => {
|
|
3354
3444
|
return value;
|
|
3355
3445
|
};
|
|
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
|
-
};
|
|
3446
|
+
const getVisibleItems = getVisibleItems$1;
|
|
3369
3447
|
|
|
3370
3448
|
const QuickPickEntriesWorkspaceSymbol = {
|
|
3371
3449
|
__proto__: null,
|