@lvce-editor/extension-search-view 7.13.2 → 7.13.3

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.
@@ -2689,13 +2689,18 @@ const addFilter = (searchValue, filter) => {
2689
2689
  }
2690
2690
  return `${searchValue.trim()} ${filter}`.trim();
2691
2691
  };
2692
- const filterByMostPopularWithContext = async context => {
2692
+ const filterByValueWithContext = async (context, filter) => {
2693
2693
  const {
2694
2694
  searchValue
2695
2695
  } = context.getState();
2696
- const value = addFilter(searchValue, MostPopular);
2696
+ const value = addFilter(searchValue, filter);
2697
2697
  await handleInputWithContext(context, value, Script);
2698
2698
  };
2699
+ const createFilterCommand = filter => {
2700
+ return context => filterByValueWithContext(context, filter);
2701
+ };
2702
+
2703
+ const filterByMostPopularWithContext = createFilterCommand(MostPopular);
2699
2704
 
2700
2705
  // TODO optimize this function to return the minimum number
2701
2706
  // of visible items needed, e.g. when not scrolled 5 items with
@@ -3031,12 +3036,12 @@ const getMenuEntriesList = (builtin, disabled = false, status) => {
3031
3036
 
3032
3037
  const getMenuEntriesFilter = () => {
3033
3038
  return [{
3034
- command: 'SearchExtensions.filterByFeatured',
3039
+ command: 'Extensions.filterByFeatured',
3035
3040
  flags: None$1,
3036
3041
  id: 'filterByFeatured',
3037
3042
  label: featured()
3038
3043
  }, {
3039
- command: 'SearchExtensions.filterByMcpServers',
3044
+ command: 'Extensions.filterByMcpServers',
3040
3045
  flags: None$1,
3041
3046
  id: 'filterByMcpServers',
3042
3047
  label: mcpServers()
@@ -3046,12 +3051,12 @@ const getMenuEntriesFilter = () => {
3046
3051
  id: 'filterByMostPopular',
3047
3052
  label: mostPopular()
3048
3053
  }, {
3049
- command: 'SearchExtensions.filterByRecentlyPublished',
3054
+ command: 'Extensions.filterByRecentlyPublished',
3050
3055
  flags: None$1,
3051
3056
  id: 'filterByRecentlyPublished',
3052
3057
  label: recentlyPublished()
3053
3058
  }, {
3054
- command: 'SearchExtensions.filterByRecommended',
3059
+ command: 'Extensions.filterByRecommended',
3055
3060
  flags: None$1,
3056
3061
  id: 'filterByRecommended',
3057
3062
  label: recommended()
@@ -3066,32 +3071,32 @@ const getMenuEntriesFilter = () => {
3066
3071
  id: 'filterByCategory',
3067
3072
  label: category()
3068
3073
  }, {
3069
- command: 'SearchExtensions.filterByInstalled',
3074
+ command: 'Extensions.filterByInstalled',
3070
3075
  flags: None$1,
3071
3076
  id: 'filterByInstalled',
3072
3077
  label: installed()
3073
3078
  }, {
3074
- command: 'SearchExtensions.filterByUpdates',
3079
+ command: 'Extensions.filterByUpdates',
3075
3080
  flags: None$1,
3076
3081
  id: 'filterByUpdates',
3077
3082
  label: updates()
3078
3083
  }, {
3079
- command: 'SearchExtensions.filterByBuiltin',
3084
+ command: 'Extensions.filterByBuiltin',
3080
3085
  flags: None$1,
3081
3086
  id: 'filterByBuiltin',
3082
3087
  label: builtIn()
3083
3088
  }, {
3084
- command: 'SearchExtensions.filterByEnabled',
3089
+ command: 'Extensions.filterByEnabled',
3085
3090
  flags: None$1,
3086
3091
  id: 'filterByEnabled',
3087
3092
  label: enabled()
3088
3093
  }, {
3089
- command: 'SearchExtensions.filterByDisabled',
3094
+ command: 'Extensions.filterByDisabled',
3090
3095
  flags: None$1,
3091
3096
  id: 'filterByDisabled',
3092
3097
  label: disabled()
3093
3098
  }, {
3094
- command: 'SearchExtensions.filterByWorkspaceUnsupported',
3099
+ command: 'Extensions.filterByWorkspaceUnsupported',
3095
3100
  flags: None$1,
3096
3101
  id: 'filterByWorkspaceUnsupported',
3097
3102
  label: workspaceUnsupported()
@@ -5179,7 +5184,17 @@ const commandMap = {
5179
5184
  'SearchExtensions.dispose': dispose,
5180
5185
  'SearchExtensions.enable': wrapCommand(enable$1),
5181
5186
  'SearchExtensions.enableWorkspace': wrapCommand(enableWorkspace),
5187
+ 'SearchExtensions.filterByBuiltin': wrapAsyncCommand(createFilterCommand(Builtin)),
5188
+ 'SearchExtensions.filterByDisabled': wrapAsyncCommand(createFilterCommand(Disabled$2)),
5189
+ 'SearchExtensions.filterByEnabled': wrapAsyncCommand(createFilterCommand(Enabled$1)),
5190
+ 'SearchExtensions.filterByFeatured': wrapAsyncCommand(createFilterCommand(Featured)),
5191
+ 'SearchExtensions.filterByInstalled': wrapAsyncCommand(createFilterCommand(Installed)),
5192
+ 'SearchExtensions.filterByMcpServers': wrapAsyncCommand(createFilterCommand(McpServers)),
5182
5193
  'SearchExtensions.filterByMostPopular': wrapAsyncCommand(filterByMostPopularWithContext),
5194
+ 'SearchExtensions.filterByRecentlyPublished': wrapAsyncCommand(createFilterCommand(RecentlyPublished)),
5195
+ 'SearchExtensions.filterByRecommended': wrapAsyncCommand(createFilterCommand(Recommended)),
5196
+ 'SearchExtensions.filterByUpdates': wrapAsyncCommand(createFilterCommand(Outdated)),
5197
+ 'SearchExtensions.filterByWorkspaceUnsupported': wrapAsyncCommand(createFilterCommand(WorkspaceUnsupported)),
5183
5198
  'SearchExtensions.focusFirst': wrapCommand(focusFirst),
5184
5199
  'SearchExtensions.focusIndex': wrapCommand(focusIndex),
5185
5200
  'SearchExtensions.focusLast': wrapCommand(focusLast),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/extension-search-view",
3
- "version": "7.13.2",
3
+ "version": "7.13.3",
4
4
  "description": "Extension Search View Worker",
5
5
  "repository": {
6
6
  "type": "git",