@lvce-editor/file-search-worker 5.20.0 → 6.0.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.
@@ -2330,12 +2330,12 @@ const toProtoVisibleItem$1 = item => {
2330
2330
  icon: '',
2331
2331
  matches: [],
2332
2332
  direntType: 0,
2333
- uri: ''
2333
+ uri: '',
2334
+ // @ts-ignore
2335
+ id: item.id,
2336
+ args: item.args
2334
2337
  };
2335
2338
  // @ts-ignore
2336
- pick.id = item.id;
2337
- // @ts-ignore
2338
- pick.args = item.args;
2339
2339
  return pick;
2340
2340
  };
2341
2341
  const getPicks$b = async () => {
@@ -2601,15 +2601,21 @@ const getRecentlyOpened = () => {
2601
2601
  return invoke$1(/* RecentlyOpened.getRecentlyOpened */'RecentlyOpened.getRecentlyOpened');
2602
2602
  };
2603
2603
 
2604
+ const getLabel = uri => {
2605
+ if (uri.startsWith('file://')) {
2606
+ return uri.slice('file://'.length);
2607
+ }
2608
+ return uri;
2609
+ };
2604
2610
  const toProtoVisibleItem = uri => {
2605
2611
  return {
2606
- label: uri,
2612
+ label: getLabel(uri),
2607
2613
  description: '',
2608
2614
  fileIcon: '',
2609
2615
  icon: '',
2610
2616
  matches: [],
2611
2617
  direntType: Directory,
2612
- uri: uri
2618
+ uri
2613
2619
  };
2614
2620
  };
2615
2621
  const getPicks$6 = async () => {
@@ -2739,8 +2745,10 @@ const openWorkspaceFolder = uri => {
2739
2745
 
2740
2746
  // TODO selectPick should be independent of show/hide
2741
2747
  const selectPick$3 = async pick => {
2742
- const path = `${pick.description}/${pick.label}`;
2743
- await openWorkspaceFolder(path);
2748
+ const {
2749
+ uri
2750
+ } = pick;
2751
+ await openWorkspaceFolder(uri);
2744
2752
  return {
2745
2753
  command: Hide
2746
2754
  };
@@ -3326,15 +3334,14 @@ const getQuickPickItemVirtualDom = visibleItem => {
3326
3334
  highlights,
3327
3335
  fileIcon
3328
3336
  } = visibleItem;
3329
- const dom = [];
3330
- dom.push({
3337
+ const dom = [{
3331
3338
  type: Div,
3332
3339
  className: QuickPickItem,
3333
3340
  role: Option,
3334
3341
  ariaPosInSet: posInSet,
3335
3342
  ariaSetSize: setSize,
3336
3343
  childCount: 1
3337
- });
3344
+ }];
3338
3345
  const parent = dom[0];
3339
3346
  if (isActive) {
3340
3347
  // @ts-ignore
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/file-search-worker",
3
- "version": "5.20.0",
3
+ "version": "6.0.0",
4
4
  "keywords": [
5
5
  "text-search"
6
6
  ],