@lvce-editor/file-search-worker 5.8.0 → 5.9.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.
@@ -1083,23 +1083,22 @@ const focusPick$1 = async pick => {
1083
1083
  await setColorTheme(/* colorThemeId */label);
1084
1084
  };
1085
1085
 
1086
- const CommandPalette = 'quickPick://commandPalette';
1087
- const Commands = 'quickPick://commands';
1088
- const File$2 = 'quickPick://file';
1089
- const EveryThing = 'quickPick://everything';
1090
- const Recent = 'quickPick://recent';
1091
- const ColorTheme = 'quickPick://color-theme';
1092
- const Symbol$1 = 'quickPick://symbol';
1093
- const View$1 = 'quickPick://view';
1094
- const WorkspaceSymbol$1 = 'quickPick://workspace-symbol';
1095
- const Custom = 'quickPick://custom';
1096
- const GoToLine$1 = 'quickPick://go-to-line';
1097
- const Noop = 'quickPick://noop';
1086
+ const ColorTheme$1 = 0;
1087
+ const Commands$1 = 2;
1088
+ const Custom = 3;
1089
+ const EveryThing$1 = 4;
1090
+ const File$2 = 5;
1091
+ const GoToLine$2 = 6;
1092
+ const Help$2 = 7;
1093
+ const Recent$1 = 8;
1094
+ const Symbol$2 = 9;
1095
+ const View$3 = 10;
1096
+ const WorkspaceSymbol$2 = 11;
1098
1097
 
1099
1098
  const noop$2 = async () => {};
1100
1099
  const getFn$2 = id => {
1101
1100
  switch (id) {
1102
- case ColorTheme:
1101
+ case ColorTheme$1:
1103
1102
  return focusPick$1;
1104
1103
  default:
1105
1104
  return noop$2;
@@ -1191,14 +1190,14 @@ const getQuickPickFileIcons = async (items, fileIconCache) => {
1191
1190
 
1192
1191
  const focusIndex = async (state, index) => {
1193
1192
  const {
1194
- uri,
1193
+ providerId,
1195
1194
  maxVisibleItems,
1196
1195
  items,
1197
1196
  minLineY,
1198
1197
  maxLineY,
1199
1198
  fileIconCache
1200
1199
  } = state;
1201
- await focusPick(uri, items[index]);
1200
+ await focusPick(providerId, items[index]);
1202
1201
  if (index < minLineY + 1) {
1203
1202
  const minLineY = index;
1204
1203
  const maxLineY = Math.min(index + maxVisibleItems, items.length - 1);
@@ -1662,27 +1661,28 @@ const filterQuickPickItems = (items, value) => {
1662
1661
  };
1663
1662
 
1664
1663
  const Command = '>';
1665
- const Symbol = '@';
1666
- const WorkspaceSymbol = '#';
1667
- const GoToLine = ':';
1668
- const View = 'view ';
1664
+ const Symbol$1 = '@';
1665
+ const WorkspaceSymbol$1 = '#';
1666
+ const GoToLine$1 = ':';
1667
+ const View$2 = 'view ';
1669
1668
  const None$1 = '';
1669
+ const Help$1 = '?';
1670
1670
 
1671
1671
  const getQuickPickPrefix = value => {
1672
1672
  if (value.startsWith(Command)) {
1673
1673
  return Command;
1674
1674
  }
1675
- if (value.startsWith(Symbol)) {
1676
- return Symbol;
1675
+ if (value.startsWith(Symbol$1)) {
1676
+ return Symbol$1;
1677
1677
  }
1678
- if (value.startsWith(WorkspaceSymbol)) {
1679
- return WorkspaceSymbol;
1678
+ if (value.startsWith(WorkspaceSymbol$1)) {
1679
+ return WorkspaceSymbol$1;
1680
1680
  }
1681
- if (value.startsWith(GoToLine)) {
1682
- return GoToLine;
1681
+ if (value.startsWith(GoToLine$1)) {
1682
+ return GoToLine$1;
1683
1683
  }
1684
- if (value.startsWith(View)) {
1685
- return View;
1684
+ if (value.startsWith(View$2)) {
1685
+ return View$2;
1686
1686
  }
1687
1687
  return None$1;
1688
1688
  };
@@ -1697,7 +1697,7 @@ const getFilterValueEverything = value => {
1697
1697
  };
1698
1698
  const getFn$1 = id => {
1699
1699
  switch (id) {
1700
- case EveryThing:
1700
+ case EveryThing$1:
1701
1701
  return getFilterValueEverything;
1702
1702
  default:
1703
1703
  return noop$1;
@@ -1717,7 +1717,7 @@ const registerSelect = modules => {
1717
1717
  const registerGetPick = modules => {
1718
1718
  Object.assign(getPick$1, modules);
1719
1719
  };
1720
- const getPicks$c = id => {
1720
+ const getPicks$d = id => {
1721
1721
  const fn = getPick$1[id];
1722
1722
  return fn;
1723
1723
  };
@@ -1726,16 +1726,35 @@ const getSelect = id => {
1726
1726
  return fn;
1727
1727
  };
1728
1728
 
1729
- const getPicks$b = (id, searchValue) => {
1730
- const fn = getPicks$c(id);
1729
+ const getPicks$c = (id, searchValue) => {
1730
+ const fn = getPicks$d(id);
1731
1731
  return fn(searchValue);
1732
1732
  };
1733
1733
 
1734
+ const getQuickPickSubProviderId = prefix => {
1735
+ switch (prefix) {
1736
+ case Command:
1737
+ return Commands$1;
1738
+ case Symbol$1:
1739
+ return Symbol$2;
1740
+ case WorkspaceSymbol$1:
1741
+ return WorkspaceSymbol$2;
1742
+ case GoToLine$1:
1743
+ return GoToLine$2;
1744
+ case View$2:
1745
+ return View$3;
1746
+ case Help$1:
1747
+ return Help$2;
1748
+ default:
1749
+ return File$2;
1750
+ }
1751
+ };
1752
+
1734
1753
  // TODO when user types letters -> no need to query provider again -> just filter existing results
1735
1754
  const setValue = async (state, newValue) => {
1736
1755
  const {
1756
+ providerId,
1737
1757
  value,
1738
- uri,
1739
1758
  minLineY,
1740
1759
  maxLineY,
1741
1760
  fileIconCache
@@ -1743,8 +1762,10 @@ const setValue = async (state, newValue) => {
1743
1762
  if (value === newValue) {
1744
1763
  return state;
1745
1764
  }
1746
- const newPicks = await getPicks$b(uri, newValue);
1747
- const filterValue = getFilterValue(uri, newValue);
1765
+ const prefix = getQuickPickPrefix(newValue);
1766
+ const subId = getQuickPickSubProviderId(prefix);
1767
+ const newPicks = await getPicks$c(subId, newValue);
1768
+ const filterValue = getFilterValue(providerId, newValue);
1748
1769
  const items = filterQuickPickItems(newPicks, filterValue);
1749
1770
  const focusedIndex = items.length === 0 ? -1 : 0;
1750
1771
  const sliced = items.slice(minLineY, maxLineY);
@@ -1817,15 +1838,17 @@ const KeepOpen = '';
1817
1838
  const selectIndex = async (state, index, button = /* left */0) => {
1818
1839
  const {
1819
1840
  minLineY,
1820
- uri,
1821
- items
1841
+ items,
1842
+ value
1822
1843
  } = state;
1823
1844
  const actualIndex = index + minLineY;
1824
1845
  const pick = getPick(items, actualIndex);
1825
1846
  if (!pick) {
1826
1847
  return state;
1827
1848
  }
1828
- const fn = getSelect(uri);
1849
+ const prefix = getQuickPickPrefix(value);
1850
+ const subId = getQuickPickSubProviderId(prefix);
1851
+ const fn = getSelect(subId);
1829
1852
  const selectPickResult = await fn(pick);
1830
1853
  object(selectPickResult);
1831
1854
  string(selectPickResult.command);
@@ -1873,15 +1896,44 @@ const handleFocus = async state => {
1873
1896
  return state;
1874
1897
  };
1875
1898
 
1876
- const getDefaultValue = uri => {
1877
- switch (uri) {
1878
- case 'quickPick://everything':
1879
- return '>';
1899
+ const getDefaultValue = id => {
1900
+ switch (id) {
1901
+ case EveryThing$1:
1902
+ return Command;
1880
1903
  default:
1881
1904
  return '';
1882
1905
  }
1883
1906
  };
1884
1907
 
1908
+ const Commands = 'quickPick://commands';
1909
+ const EveryThing = 'quickPick://everything';
1910
+ const Recent = 'quickPick://recent';
1911
+ const ColorTheme = 'quickPick://color-theme';
1912
+ const Symbol = 'quickPick://symbol';
1913
+ const View$1 = 'quickPick://view';
1914
+ const Help = 'quickPick://help';
1915
+ const WorkspaceSymbol = 'quickPick://workspace-symbol';
1916
+ const GoToLine = 'quickPick://go-to-line';
1917
+
1918
+ const getQuickPickProviderId = prefix => {
1919
+ switch (prefix) {
1920
+ case Commands:
1921
+ case Symbol:
1922
+ case WorkspaceSymbol:
1923
+ case EveryThing:
1924
+ case GoToLine:
1925
+ case View$1:
1926
+ case Help:
1927
+ return EveryThing$1;
1928
+ case ColorTheme:
1929
+ return ColorTheme$1;
1930
+ case Recent:
1931
+ return Recent$1;
1932
+ default:
1933
+ return File$2;
1934
+ }
1935
+ };
1936
+
1885
1937
  const state$3 = {
1886
1938
  args: []
1887
1939
  };
@@ -1909,11 +1961,14 @@ const loadContent = async state => {
1909
1961
  args,
1910
1962
  fileIconCache
1911
1963
  } = state;
1912
- const value = getDefaultValue(uri);
1913
- setArgs(uri, args);
1914
- const newPicks = await getPicks$b(uri, value);
1964
+ const id = getQuickPickProviderId(uri);
1965
+ const value = getDefaultValue(id);
1966
+ const prefix = getQuickPickPrefix(value);
1967
+ const subId = getQuickPickSubProviderId(prefix);
1968
+ setArgs(subId, args);
1969
+ const newPicks = await getPicks$c(subId, value);
1915
1970
  array(newPicks);
1916
- const filterValue = getFilterValue(uri, value);
1971
+ const filterValue = getFilterValue(id, value);
1917
1972
  const items = filterQuickPickItems(newPicks, filterValue);
1918
1973
  const minLineY = 0;
1919
1974
  const maxLineY = Math.min(minLineY + state.maxVisibleItems, newPicks.length);
@@ -1935,7 +1990,8 @@ const loadContent = async state => {
1935
1990
  inputSource: Script,
1936
1991
  focused: true,
1937
1992
  fileIconCache: newFileIconCache,
1938
- icons
1993
+ icons,
1994
+ providerId: id
1939
1995
  };
1940
1996
  };
1941
1997
 
@@ -1960,13 +2016,51 @@ const getVisible$1 = (items, minLineY, maxLineY, icons) => {
1960
2016
  return protoVisibleItems;
1961
2017
  };
1962
2018
 
2019
+ const emptyHighlightSections = [];
2020
+
2021
+ const getHighlightSections = (highlights, label) => {
2022
+ if (highlights.length === 0) {
2023
+ return emptyHighlightSections;
2024
+ }
2025
+ const sections = [];
2026
+ let position = 0;
2027
+ for (let i = 0; i < highlights.length; i += 2) {
2028
+ const highlightStart = highlights[i];
2029
+ const highlightEnd = highlights[i + 1];
2030
+ if (position < highlightStart) {
2031
+ const beforeText = label.slice(position, highlightStart);
2032
+ sections.push({
2033
+ highlighted: false,
2034
+ text: beforeText
2035
+ });
2036
+ }
2037
+ const highlightText = label.slice(highlightStart, highlightEnd);
2038
+ sections.push({
2039
+ highlighted: true,
2040
+ text: highlightText
2041
+ });
2042
+ position = highlightEnd;
2043
+ }
2044
+ if (position < label.length) {
2045
+ const afterText = label.slice(position);
2046
+ sections.push({
2047
+ highlighted: false,
2048
+ text: afterText
2049
+ });
2050
+ }
2051
+ return sections;
2052
+ };
2053
+
1963
2054
  const getVisible = (setSize, protoVisibleItems, minLineY, focusedIndex) => {
1964
2055
  const visibleItems = protoVisibleItems.map((visibleItem, i) => {
2056
+ const highlights = visibleItem.matches.slice(1);
2057
+ const sections = getHighlightSections(highlights, visibleItem.label);
1965
2058
  return {
1966
2059
  ...visibleItem,
1967
2060
  posInSet: minLineY + i + 1,
1968
2061
  setSize,
1969
- isActive: i === focusedIndex
2062
+ isActive: i === focusedIndex,
2063
+ highlights: sections
1970
2064
  };
1971
2065
  });
1972
2066
  return visibleItems;
@@ -2026,6 +2120,7 @@ const Option = 'option';
2026
2120
  const FileIcon = 'FileIcon';
2027
2121
  const InputBox = 'InputBox';
2028
2122
  const Label = 'Label';
2123
+ const MaskIcon = 'MaskIcon';
2029
2124
  const QuickPick$1 = 'QuickPick';
2030
2125
  const QuickPickHeader = 'QuickPickHeader';
2031
2126
  const QuickPickHighlight = 'QuickPickHighlight';
@@ -2033,9 +2128,9 @@ const QuickPickItem = 'QuickPickItem';
2033
2128
  const QuickPickItemActive$1 = 'QuickPickItemActive';
2034
2129
  const QuickPickItemDescription = 'QuickPickItemDescription';
2035
2130
  const QuickPickItemLabel = 'QuickPickItemLabel';
2036
- const QuickPickMaskIcon = 'QuickPickMaskIcon';
2037
2131
  const QuickPickItems$1 = 'QuickPickItems';
2038
- const MaskIcon = 'MaskIcon';
2132
+ const QuickPickMaskIcon = 'QuickPickMaskIcon';
2133
+ const QuickPickStatus = 'QuickPickStatus';
2039
2134
  const Viewlet = 'Viewlet';
2040
2135
 
2041
2136
  const HandleBeforeInput = 'handleBeforeInput';
@@ -2061,19 +2156,43 @@ const i18nString = (key, placeholders = emptyObject) => {
2061
2156
  return key.replaceAll(RE_PLACEHOLDER, replacer);
2062
2157
  };
2063
2158
 
2159
+ const GoToFile = 'Go to file';
2160
+ const GoToLineColumn = 'Go to Line / Column';
2161
+ const GoToSymbolInEditor = 'Go to Symbol in Editor';
2064
2162
  const NoResults = 'No Results';
2065
- const TypeNameOfCommandToRun = 'Type the name of a command to run.';
2163
+ const OpenView = 'Open View';
2066
2164
  const QuickOpen = 'Quick open';
2165
+ const SearchForText = 'Search for text';
2166
+ const ShowAndRunCommands = 'Show And Run Commands';
2167
+ const TypeNameOfCommandToRun = 'Type the name of a command to run.';
2067
2168
 
2068
2169
  const typeNameofCommandToRun = () => {
2069
2170
  return i18nString(TypeNameOfCommandToRun);
2070
2171
  };
2172
+ const showAndRunCommands = () => {
2173
+ return i18nString(ShowAndRunCommands);
2174
+ };
2175
+ const goToFile = () => {
2176
+ return i18nString(GoToFile);
2177
+ };
2071
2178
  const noResults = () => {
2072
2179
  return i18nString(NoResults);
2073
2180
  };
2074
2181
  const quickOpen = () => {
2075
2182
  return i18nString(QuickOpen);
2076
2183
  };
2184
+ const goToLineColumn = () => {
2185
+ return i18nString(GoToLineColumn);
2186
+ };
2187
+ const goToSymbolInEditor = () => {
2188
+ return i18nString(GoToSymbolInEditor);
2189
+ };
2190
+ const searchForText = () => {
2191
+ return i18nString(SearchForText);
2192
+ };
2193
+ const openView = () => {
2194
+ return i18nString(OpenView);
2195
+ };
2077
2196
 
2078
2197
  const Div = 4;
2079
2198
  const Input = 6;
@@ -2110,39 +2229,14 @@ const getQuickPickHeaderVirtualDom = () => {
2110
2229
  }, getQuickPickInputVirtualDom()];
2111
2230
  };
2112
2231
 
2113
- const emptyHighlightSections = [];
2114
-
2115
- const getHighlightSections = (highlights, label) => {
2116
- if (highlights.length === 0) {
2117
- return emptyHighlightSections;
2118
- }
2119
- const sections = [];
2120
- let position = 0;
2121
- for (let i = 0; i < highlights.length; i += 2) {
2122
- const highlightStart = highlights[i];
2123
- const highlightEnd = highlights[i + 1];
2124
- if (position < highlightStart) {
2125
- const beforeText = label.slice(position, highlightStart);
2126
- sections.push({
2127
- highlighted: false,
2128
- text: beforeText
2129
- });
2130
- }
2131
- const highlightText = label.slice(highlightStart, highlightEnd);
2132
- sections.push({
2133
- highlighted: true,
2134
- text: highlightText
2135
- });
2136
- position = highlightEnd;
2137
- }
2138
- if (position < label.length) {
2139
- const afterText = label.slice(position);
2140
- sections.push({
2141
- highlighted: false,
2142
- text: afterText
2143
- });
2144
- }
2145
- return sections;
2232
+ const getFileIconVirtualDom = icon => {
2233
+ return {
2234
+ type: Img,
2235
+ className: FileIcon,
2236
+ src: icon,
2237
+ role: None,
2238
+ childCount: 0
2239
+ };
2146
2240
  };
2147
2241
 
2148
2242
  const mergeClassNames = (...classNames) => {
@@ -2162,14 +2256,13 @@ const quickPickHighlight = {
2162
2256
  className: QuickPickHighlight,
2163
2257
  childCount: 1
2164
2258
  };
2165
- const getHighlights = (highlights, label) => {
2259
+ const getHighlights = (sections, label) => {
2166
2260
  const labelDom = {
2167
2261
  type: Div,
2168
2262
  className: QuickPickItemLabel,
2169
2263
  childCount: 0
2170
2264
  };
2171
2265
  const nodes = [labelDom];
2172
- const sections = getHighlightSections(highlights, label);
2173
2266
  if (sections.length === 0) {
2174
2267
  labelDom.childCount++;
2175
2268
  nodes.push(text(label));
@@ -2187,21 +2280,6 @@ const getHighlights = (highlights, label) => {
2187
2280
  return nodes;
2188
2281
  };
2189
2282
 
2190
- const addHighlights = (dom, highlights, label) => {
2191
- const domHighlights = getHighlights(highlights, label);
2192
- dom.push(...domHighlights);
2193
- };
2194
-
2195
- const getFileIconVirtualDom = icon => {
2196
- return {
2197
- type: Img,
2198
- className: FileIcon,
2199
- src: icon,
2200
- role: None,
2201
- childCount: 0
2202
- };
2203
- };
2204
-
2205
2283
  const getQuickPickItemVirtualDom = visibleItem => {
2206
2284
  const {
2207
2285
  posInSet,
@@ -2210,10 +2288,9 @@ const getQuickPickItemVirtualDom = visibleItem => {
2210
2288
  isActive,
2211
2289
  description,
2212
2290
  icon,
2213
- matches,
2291
+ highlights,
2214
2292
  fileIcon
2215
2293
  } = visibleItem;
2216
- const highlights = matches.slice(1);
2217
2294
  const dom = [];
2218
2295
  dom.push({
2219
2296
  type: Div,
@@ -2240,7 +2317,8 @@ const getQuickPickItemVirtualDom = visibleItem => {
2240
2317
  childCount: 0
2241
2318
  });
2242
2319
  }
2243
- addHighlights(dom, highlights, label);
2320
+ const highlightDom = getHighlights(highlights, label);
2321
+ dom.push(...highlightDom);
2244
2322
  if (description) {
2245
2323
  parent.childCount++;
2246
2324
  dom.push({
@@ -2256,7 +2334,7 @@ const getQuickPickNoResultsVirtualDom = () => {
2256
2334
  const noResults$1 = noResults();
2257
2335
  return [{
2258
2336
  type: Div,
2259
- className: 'QuickPickItem QuickPickItemActive QuickPickStatus',
2337
+ className: mergeClassNames(QuickPickItem, QuickPickItemActive$1, QuickPickStatus),
2260
2338
  childCount: 1
2261
2339
  }, {
2262
2340
  type: Div,
@@ -2454,7 +2532,7 @@ const toProtoVisibleItem$2 = name => {
2454
2532
  };
2455
2533
  return pick;
2456
2534
  };
2457
- const getPicks$a = async searchValue => {
2535
+ const getPicks$b = async searchValue => {
2458
2536
  const colorThemeNames = await getColorThemeNames();
2459
2537
  const picks = colorThemeNames.map(toProtoVisibleItem$2);
2460
2538
  return picks;
@@ -2526,7 +2604,7 @@ const toProtoVisibleItem$1 = item => {
2526
2604
  pick.id = item.id;
2527
2605
  return pick;
2528
2606
  };
2529
- const getPicks$9 = async () => {
2607
+ const getPicks$a = async () => {
2530
2608
  // TODO get picks in parallel
2531
2609
  const builtinPicks = await getBuiltinPicks();
2532
2610
  const extensionPicks = await getExtensionPicks();
@@ -2535,35 +2613,17 @@ const getPicks$9 = async () => {
2535
2613
  return converted;
2536
2614
  };
2537
2615
 
2538
- const getPicks$8 = async searchValue => {
2616
+ const getPicks$9 = async searchValue => {
2539
2617
  const items = state$3.args[1] || [];
2540
2618
  return items;
2541
2619
  };
2542
2620
 
2543
- // TODO use numeric enum for quickpick entry id
2544
- const getQuickPickProviderId = prefix => {
2545
- switch (prefix) {
2546
- case Command:
2547
- return Commands;
2548
- case Symbol:
2549
- return Symbol$1;
2550
- case WorkspaceSymbol:
2551
- return WorkspaceSymbol$1;
2552
- case GoToLine:
2553
- return GoToLine$1;
2554
- case View:
2555
- return View$1;
2556
- default:
2557
- return File$2;
2558
- }
2559
- };
2560
-
2561
2621
  const state$1 = {
2562
- provider: Noop,
2622
+ provider: File$2,
2563
2623
  prefix: 'string-that-should-never-match-another-string'
2564
2624
  };
2565
2625
 
2566
- const getPicks$7 = async value => {
2626
+ const getPicks$8 = async value => {
2567
2627
  const prefix = getQuickPickPrefix(value);
2568
2628
  const providerId = getQuickPickProviderId(prefix);
2569
2629
 
@@ -2574,7 +2634,7 @@ const getPicks$7 = async value => {
2574
2634
  }
2575
2635
  // TODO this line is a bit duplicated with getFilterValue
2576
2636
  const slicedValue = value.slice(prefix.length).trimStart();
2577
- const picks = await getPicks$b(providerId, slicedValue);
2637
+ const picks = await getPicks$c(providerId, slicedValue);
2578
2638
  return picks;
2579
2639
  };
2580
2640
 
@@ -2647,7 +2707,7 @@ const convertToPick = uri => {
2647
2707
  // e.g. when there are many files, don't need
2648
2708
  // to compute the fileIcon for all files
2649
2709
 
2650
- const getPicks$6 = async searchValue => {
2710
+ const getPicks$7 = async searchValue => {
2651
2711
  // TODO cache workspace path
2652
2712
  const workspace = await getWorkspacePath();
2653
2713
  if (!workspace) {
@@ -2658,7 +2718,7 @@ const getPicks$6 = async searchValue => {
2658
2718
  return picks;
2659
2719
  };
2660
2720
 
2661
- const getPicks$5 = async () => {
2721
+ const getPicks$6 = async () => {
2662
2722
  const picks = [{
2663
2723
  label: '1',
2664
2724
  description: '',
@@ -2711,6 +2771,64 @@ const getPicks$5 = async () => {
2711
2771
  return picks;
2712
2772
  };
2713
2773
 
2774
+ const DotDotDot = '...';
2775
+ const Colon = ':';
2776
+ const Percent = '%';
2777
+ const AngleBracket = '>';
2778
+ const View = 'view';
2779
+
2780
+ const getPicks$5 = async () => {
2781
+ return [{
2782
+ description: goToFile(),
2783
+ direntType: None$2,
2784
+ fileIcon: '',
2785
+ icon: '',
2786
+ label: DotDotDot,
2787
+ matches: [],
2788
+ uri: ''
2789
+ }, {
2790
+ description: goToLineColumn(),
2791
+ direntType: None$2,
2792
+ fileIcon: '',
2793
+ icon: '',
2794
+ label: ':',
2795
+ matches: [],
2796
+ uri: ''
2797
+ }, {
2798
+ description: goToSymbolInEditor(),
2799
+ direntType: None$2,
2800
+ fileIcon: '',
2801
+ icon: '',
2802
+ label: Colon,
2803
+ matches: [],
2804
+ uri: ''
2805
+ }, {
2806
+ description: searchForText(),
2807
+ direntType: None$2,
2808
+ fileIcon: '',
2809
+ icon: '',
2810
+ label: Percent,
2811
+ matches: [],
2812
+ uri: ''
2813
+ }, {
2814
+ description: showAndRunCommands(),
2815
+ direntType: None$2,
2816
+ fileIcon: '',
2817
+ icon: '',
2818
+ label: AngleBracket,
2819
+ matches: [],
2820
+ uri: ''
2821
+ }, {
2822
+ description: openView(),
2823
+ direntType: None$2,
2824
+ fileIcon: '',
2825
+ icon: '',
2826
+ label: View,
2827
+ matches: [],
2828
+ uri: ''
2829
+ }];
2830
+ };
2831
+
2714
2832
  const getRecentlyOpened = () => {
2715
2833
  return invoke$1(/* RecentlyOpened.getRecentlyOpened */'RecentlyOpened.getRecentlyOpened');
2716
2834
  };
@@ -2738,9 +2856,6 @@ const getPicks$3 = async () => {
2738
2856
  };
2739
2857
 
2740
2858
  const getPicks$2 = async () => {
2741
- // const views = ViewService.getViews()
2742
- // const picks = views.map(toPick)
2743
- // return picks
2744
2859
  return [];
2745
2860
  };
2746
2861
 
@@ -2749,7 +2864,7 @@ const getPicks$1 = async () => {
2749
2864
  return picks;
2750
2865
  };
2751
2866
 
2752
- const selectPick$9 = async pick => {
2867
+ const selectPick$a = async pick => {
2753
2868
  const id = pick.label;
2754
2869
  await setColorTheme(/* colorThemeId */id);
2755
2870
  return {
@@ -2788,7 +2903,7 @@ const selectPickExtension = async item => {
2788
2903
  command: Hide
2789
2904
  };
2790
2905
  };
2791
- const selectPick$8 = async item => {
2906
+ const selectPick$9 = async item => {
2792
2907
  // @ts-ignore
2793
2908
  const id = item.id;
2794
2909
  if (id.startsWith('ext.')) {
@@ -2797,7 +2912,7 @@ const selectPick$8 = async item => {
2797
2912
  return selectPickBuiltin(item);
2798
2913
  };
2799
2914
 
2800
- const selectPick$7 = async pick => {
2915
+ const selectPick$8 = async pick => {
2801
2916
  const {
2802
2917
  args
2803
2918
  } = state$3;
@@ -2808,7 +2923,7 @@ const selectPick$7 = async pick => {
2808
2923
  };
2809
2924
  };
2810
2925
 
2811
- const selectPick$6 = item => {
2926
+ const selectPick$7 = item => {
2812
2927
  const {
2813
2928
  provider
2814
2929
  } = state$1;
@@ -2820,7 +2935,7 @@ const openUri = async uri => {
2820
2935
  await invoke$1(/* Main.openUri */'Main.openUri', /* uri */uri);
2821
2936
  };
2822
2937
 
2823
- const selectPick$5 = async pick => {
2938
+ const selectPick$6 = async pick => {
2824
2939
  const description = pick.description;
2825
2940
  const fileName = pick.label;
2826
2941
  const workspace = await getWorkspacePath();
@@ -2835,7 +2950,7 @@ const execute = async (method, ...params) => {
2835
2950
  // TODO
2836
2951
  };
2837
2952
 
2838
- const selectPick$4 = async item => {
2953
+ const selectPick$5 = async item => {
2839
2954
  const rowIndex = Number.parseInt(item.label);
2840
2955
  const position = {
2841
2956
  rowIndex,
@@ -2848,6 +2963,13 @@ const selectPick$4 = async item => {
2848
2963
  };
2849
2964
  };
2850
2965
 
2966
+ const selectPick$4 = async item => {
2967
+ // Command.execute(/* openView */ 549, /* viewName */ item.label)
2968
+ return {
2969
+ command: Hide
2970
+ };
2971
+ };
2972
+
2851
2973
  const openWorkspaceFolder = uri => {
2852
2974
  return invoke$1(/* Workspace.setPath */'Workspace.setPath', /* path */uri);
2853
2975
  };
@@ -2880,32 +3002,8 @@ const selectPick = async item => {
2880
3002
  };
2881
3003
  };
2882
3004
 
2883
- const selectPicks = {
2884
- [ColorTheme]: selectPick$9,
2885
- [CommandPalette]: selectPick$6,
2886
- [Commands]: selectPick$8,
2887
- [Custom]: selectPick$7,
2888
- [EveryThing]: selectPick$6,
2889
- [File$2]: selectPick$5,
2890
- [GoToLine$1]: selectPick$4,
2891
- [Recent]: selectPick$3,
2892
- [Symbol$1]: selectPick$2,
2893
- [View$1]: selectPick$1,
2894
- [WorkspaceSymbol$1]: selectPick
2895
- };
2896
- const getPicks = {
2897
- [ColorTheme]: getPicks$a,
2898
- [CommandPalette]: getPicks$7,
2899
- [Commands]: getPicks$9,
2900
- [Custom]: getPicks$8,
2901
- [EveryThing]: getPicks$7,
2902
- [GoToLine$1]: getPicks$5,
2903
- [File$2]: getPicks$6,
2904
- [Recent]: getPicks$4,
2905
- [Symbol$1]: getPicks$3,
2906
- [View$1]: getPicks$2,
2907
- [WorkspaceSymbol$1]: getPicks$1
2908
- };
3005
+ const selectPicks = [selectPick$a, selectPick$7, selectPick$9, selectPick$8, selectPick$7, selectPick$6, selectPick$5, selectPick$4, selectPick$3, selectPick$2, selectPick$1, selectPick];
3006
+ const getPicks = [getPicks$b, getPicks$8, getPicks$a, getPicks$9, getPicks$8, getPicks$7, getPicks$6, getPicks$5, getPicks$4, getPicks$3, getPicks$2, getPicks$1];
2909
3007
 
2910
3008
  const Memfs = 'memfs';
2911
3009
  const Html = 'html';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/file-search-worker",
3
- "version": "5.8.0",
3
+ "version": "5.9.0",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "text-search"