@lvce-editor/file-search-worker 5.2.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 +52 -66
- package/package.json +1 -1
|
@@ -1148,7 +1148,7 @@ const getPickIcon$e = pick => {
|
|
|
1148
1148
|
// @ts-ignore
|
|
1149
1149
|
return provider.getPickIcon(pick);
|
|
1150
1150
|
};
|
|
1151
|
-
const getPickFileIcon$
|
|
1151
|
+
const getPickFileIcon$2 = pick => {
|
|
1152
1152
|
const {
|
|
1153
1153
|
provider
|
|
1154
1154
|
} = state$b;
|
|
@@ -1177,7 +1177,7 @@ const QuickPickEntriesEverything = {
|
|
|
1177
1177
|
getLabel: getLabel$5,
|
|
1178
1178
|
getNoResults: getNoResults$8,
|
|
1179
1179
|
getPickDescription: getPickDescription$d,
|
|
1180
|
-
getPickFileIcon: getPickFileIcon$
|
|
1180
|
+
getPickFileIcon: getPickFileIcon$2,
|
|
1181
1181
|
getPickFilterValue: getPickFilterValue$8,
|
|
1182
1182
|
getPickIcon: getPickIcon$e,
|
|
1183
1183
|
getPickLabel: getPickLabel$e,
|
|
@@ -1387,7 +1387,6 @@ const getIconsCached = (paths, fileIconCache) => {
|
|
|
1387
1387
|
return paths.map(path => fileIconCache[path]);
|
|
1388
1388
|
};
|
|
1389
1389
|
|
|
1390
|
-
const Directory = 3;
|
|
1391
1390
|
const File$1 = 7;
|
|
1392
1391
|
|
|
1393
1392
|
const getMissingIconRequests = (dirents, fileIconCache) => {
|
|
@@ -2148,7 +2147,15 @@ const add = menuEntries => {
|
|
|
2148
2147
|
const getVisible = (provider, items, minLineY, maxLineY, focusedIndex, icons) => {
|
|
2149
2148
|
const setSize = items.length;
|
|
2150
2149
|
const range = items.slice(minLineY, maxLineY);
|
|
2151
|
-
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
|
+
});
|
|
2152
2159
|
return visibleItems;
|
|
2153
2160
|
};
|
|
2154
2161
|
|
|
@@ -2568,16 +2575,16 @@ const getPickLabel$d = pick => {
|
|
|
2568
2575
|
return pick;
|
|
2569
2576
|
};
|
|
2570
2577
|
const getVisibleItems$f = (picks, minLineY, maxLineY, focusedIndex, setSize, icons) => {
|
|
2571
|
-
const visibleItems = picks.map((
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
})
|
|
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
|
+
});
|
|
2581
2588
|
return visibleItems;
|
|
2582
2589
|
};
|
|
2583
2590
|
|
|
@@ -2681,16 +2688,16 @@ const getPickLabel$b = pick => {
|
|
|
2681
2688
|
return pick.label;
|
|
2682
2689
|
};
|
|
2683
2690
|
const getVisibleItems$d = (picks, minLineY, maxLineY, focusedIndex, setSize, icons) => {
|
|
2684
|
-
const visibleItems = picks.map((
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
})
|
|
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
|
+
});
|
|
2694
2701
|
return visibleItems;
|
|
2695
2702
|
};
|
|
2696
2703
|
|
|
@@ -2859,11 +2866,8 @@ const getVisibleItems$b = (picks, minLineY, maxLineY, focusedIndex, setSize, ico
|
|
|
2859
2866
|
description: getPickDescription$9(pick),
|
|
2860
2867
|
fileIcon: '',
|
|
2861
2868
|
icon: getPickIcon$9(pick),
|
|
2862
|
-
isActive: index + minLineY === focusedIndex,
|
|
2863
2869
|
label: getPickLabel$9(pick),
|
|
2864
|
-
matches: []
|
|
2865
|
-
posInSet: index + minLineY + 1,
|
|
2866
|
-
setSize
|
|
2870
|
+
matches: []
|
|
2867
2871
|
}));
|
|
2868
2872
|
return visibleItems;
|
|
2869
2873
|
};
|
|
@@ -2978,9 +2982,6 @@ const getVisibleItems$9 = (files, minLineY, maxLineY, focusedIndex, setSize, ico
|
|
|
2978
2982
|
description,
|
|
2979
2983
|
icon,
|
|
2980
2984
|
fileIcon,
|
|
2981
|
-
posInSet: minLineY + i + 1,
|
|
2982
|
-
setSize,
|
|
2983
|
-
isActive: i === focusedIndex,
|
|
2984
2985
|
matches: item.matches
|
|
2985
2986
|
};
|
|
2986
2987
|
});
|
|
@@ -3093,7 +3094,7 @@ const getPickDescription$6 = pick => {
|
|
|
3093
3094
|
const getPickIcon$6 = () => {
|
|
3094
3095
|
return '';
|
|
3095
3096
|
};
|
|
3096
|
-
const getPickFileIcon$
|
|
3097
|
+
const getPickFileIcon$1 = pick => {
|
|
3097
3098
|
if (typeof pick === 'object') {
|
|
3098
3099
|
pick = pick.pick;
|
|
3099
3100
|
}
|
|
@@ -3121,7 +3122,7 @@ const QuickPickEntriesFile = {
|
|
|
3121
3122
|
getLabel: getLabel$1,
|
|
3122
3123
|
getNoResults: getNoResults$4,
|
|
3123
3124
|
getPickDescription: getPickDescription$6,
|
|
3124
|
-
getPickFileIcon: getPickFileIcon$
|
|
3125
|
+
getPickFileIcon: getPickFileIcon$1,
|
|
3125
3126
|
getPickFilterValue: getPickFilterValue$4,
|
|
3126
3127
|
getPickIcon: getPickIcon$6,
|
|
3127
3128
|
getPickLabel: getPickLabel$6,
|
|
@@ -3147,29 +3148,18 @@ const getPickIcon$5 = () => {
|
|
|
3147
3148
|
const getPickLabel$5 = pick => {
|
|
3148
3149
|
return pathBaseName(pick);
|
|
3149
3150
|
};
|
|
3150
|
-
const
|
|
3151
|
-
|
|
3152
|
-
pick =
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
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
|
-
}));
|
|
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
|
+
});
|
|
3173
3163
|
return visibleItems;
|
|
3174
3164
|
};
|
|
3175
3165
|
|
|
@@ -3230,9 +3220,11 @@ const getPickFileIcon = pick => {
|
|
|
3230
3220
|
if (typeof pick === 'object') {
|
|
3231
3221
|
pick = pick.pick;
|
|
3232
3222
|
}
|
|
3223
|
+
const baseName = pathBaseName(pick);
|
|
3233
3224
|
return {
|
|
3234
|
-
type:
|
|
3235
|
-
name:
|
|
3225
|
+
type: File$1,
|
|
3226
|
+
name: baseName,
|
|
3227
|
+
path: pick
|
|
3236
3228
|
};
|
|
3237
3229
|
};
|
|
3238
3230
|
const state$3 = {};
|
|
@@ -3334,11 +3326,8 @@ const getVisibleItems$3 = (picks, minLineY, maxLineY, focusedIndex, setSize) =>
|
|
|
3334
3326
|
description: getPickDescription$2(),
|
|
3335
3327
|
fileIcon: '',
|
|
3336
3328
|
icon: getPickIcon$2(),
|
|
3337
|
-
isActive: index + minLineY === focusedIndex,
|
|
3338
3329
|
label: getPickLabel$2(pick),
|
|
3339
|
-
matches: []
|
|
3340
|
-
posInSet: index + minLineY + 1,
|
|
3341
|
-
setSize
|
|
3330
|
+
matches: []
|
|
3342
3331
|
}));
|
|
3343
3332
|
return visibleItems;
|
|
3344
3333
|
};
|
|
@@ -3411,11 +3400,8 @@ const getVisibleItems$1 = (picks, minLineY, maxLineY, focusedIndex, setSize) =>
|
|
|
3411
3400
|
description: '',
|
|
3412
3401
|
fileIcon: '',
|
|
3413
3402
|
icon: '',
|
|
3414
|
-
isActive: index + minLineY === focusedIndex,
|
|
3415
3403
|
label: pick.label || '',
|
|
3416
|
-
matches: []
|
|
3417
|
-
posInSet: index + minLineY + 1,
|
|
3418
|
-
setSize
|
|
3404
|
+
matches: []
|
|
3419
3405
|
}));
|
|
3420
3406
|
return visibleItems;
|
|
3421
3407
|
};
|