@lvce-editor/file-search-worker 5.19.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.
@@ -439,7 +439,7 @@ const create$4$1 = (method, params) => {
439
439
  };
440
440
  };
441
441
  const callbacks = Object.create(null);
442
- const set$2 = (id, fn) => {
442
+ const set$4 = (id, fn) => {
443
443
  callbacks[id] = fn;
444
444
  };
445
445
  const get$2 = id => {
@@ -458,7 +458,7 @@ const registerPromise = () => {
458
458
  resolve,
459
459
  promise
460
460
  } = Promise.withResolvers();
461
- set$2(id, resolve);
461
+ set$4(id, resolve);
462
462
  return {
463
463
  id,
464
464
  promise
@@ -538,7 +538,8 @@ const splitLines$1 = lines => {
538
538
  return lines.split(NewLine);
539
539
  };
540
540
  const getCurrentStack = () => {
541
- const currentStack = joinLines(splitLines$1(new Error().stack || '').slice(2));
541
+ const stackLinesToSkip = 3;
542
+ const currentStack = joinLines(splitLines$1(new Error().stack || '').slice(stackLinesToSkip));
542
543
  return currentStack;
543
544
  };
544
545
  const getNewLineIndex = (string, startIndex = undefined) => {
@@ -802,13 +803,19 @@ const send = (transport, method, ...params) => {
802
803
  const message = create$4$1(method, params);
803
804
  transport.send(message);
804
805
  };
805
- const invoke$2 = (ipc, method, ...params) => {
806
+ const invoke$3 = (ipc, method, ...params) => {
806
807
  return invokeHelper(ipc, method, params, false);
807
808
  };
808
- const invokeAndTransfer = (ipc, method, ...params) => {
809
+ const invokeAndTransfer$1 = (ipc, method, ...params) => {
809
810
  return invokeHelper(ipc, method, params, true);
810
811
  };
811
812
 
813
+ class CommandNotFoundError extends Error {
814
+ constructor(command) {
815
+ super(`Command not found ${command}`);
816
+ this.name = 'CommandNotFoundError';
817
+ }
818
+ }
812
819
  const commands = Object.create(null);
813
820
  const register$1 = commandMap => {
814
821
  Object.assign(commands, commandMap);
@@ -819,7 +826,7 @@ const getCommand = key => {
819
826
  const execute$1 = (command, ...args) => {
820
827
  const fn = getCommand(command);
821
828
  if (!fn) {
822
- throw new Error(`command not found ${command}`);
829
+ throw new CommandNotFoundError(command);
823
830
  }
824
831
  return fn(...args);
825
832
  };
@@ -835,10 +842,10 @@ const createRpc = ipc => {
835
842
  send(ipc, method, ...params);
836
843
  },
837
844
  invoke(method, ...params) {
838
- return invoke$2(ipc, method, ...params);
845
+ return invoke$3(ipc, method, ...params);
839
846
  },
840
847
  invokeAndTransfer(method, ...params) {
841
- return invokeAndTransfer(ipc, method, ...params);
848
+ return invokeAndTransfer$1(ipc, method, ...params);
842
849
  },
843
850
  async dispose() {
844
851
  await ipc?.dispose();
@@ -890,17 +897,43 @@ const WebWorkerRpcClient = {
890
897
  __proto__: null,
891
898
  create: create$4
892
899
  };
900
+ const createMockRpc = ({
901
+ commandMap
902
+ }) => {
903
+ const invocations = [];
904
+ const invoke = (method, ...params) => {
905
+ invocations.push([method, ...params]);
906
+ const command = commandMap[method];
907
+ if (!command) {
908
+ throw new Error(`command ${method} not found`);
909
+ }
910
+ return command(...params);
911
+ };
912
+ const mockRpc = {
913
+ invoke,
914
+ invokeAndTransfer: invoke,
915
+ invocations
916
+ };
917
+ return mockRpc;
918
+ };
919
+
920
+ const Div = 4;
921
+ const Input = 6;
922
+ const Span = 8;
923
+ const Text = 12;
924
+ const Img = 17;
925
+
926
+ const DebugWorker = 55;
927
+ const RendererWorker$1 = 1;
893
928
 
894
929
  const rpcs = Object.create(null);
895
- const set$g = (id, rpc) => {
930
+ const set$3 = (id, rpc) => {
896
931
  rpcs[id] = rpc;
897
932
  };
898
933
  const get$1 = id => {
899
934
  return rpcs[id];
900
935
  };
901
936
 
902
- /* eslint-disable @typescript-eslint/explicit-function-return-type */
903
-
904
937
  const create$3 = rpcId => {
905
938
  return {
906
939
  // @ts-ignore
@@ -916,7 +949,7 @@ const create$3 = rpcId => {
916
949
  return rpc.invokeAndTransfer(method, ...params);
917
950
  },
918
951
  set(rpc) {
919
- set$g(rpcId, rpc);
952
+ set$3(rpcId, rpc);
920
953
  },
921
954
  async dispose() {
922
955
  const rpc = get$1(rpcId);
@@ -924,39 +957,361 @@ const create$3 = rpcId => {
924
957
  }
925
958
  };
926
959
  };
927
- const RendererWorker$1 = 1;
960
+
928
961
  const {
929
- invoke: invoke$3,
930
- set: set$3} = create$3(RendererWorker$1);
962
+ invoke: invoke$2,
963
+ invokeAndTransfer,
964
+ set: set$2,
965
+ dispose: dispose$2
966
+ } = create$3(RendererWorker$1);
967
+ const searchFileHtml = async uri => {
968
+ return invoke$2('ExtensionHost.searchFileWithHtml', uri);
969
+ };
970
+ const getFilePathElectron = async file => {
971
+ return invoke$2('FileSystemHandle.getFilePathElectron', file);
972
+ };
973
+ const showContextMenu = async (x, y, id, ...args) => {
974
+ return invoke$2('ContextMenu.show', x, y, id, ...args);
975
+ };
976
+ const getElectronVersion = async () => {
977
+ return invoke$2('Process.getElectronVersion');
978
+ };
979
+ const applyBulkReplacement = async bulkEdits => {
980
+ await invoke$2('BulkReplacement.applyBulkReplacement', bulkEdits);
981
+ };
982
+ const setColorTheme$1 = async id => {
983
+ // @ts-ignore
984
+ return invoke$2(/* ColorTheme.setColorTheme */'ColorTheme.setColorTheme', /* colorThemeId */id);
985
+ };
986
+ const getNodeVersion = async () => {
987
+ return invoke$2('Process.getNodeVersion');
988
+ };
989
+ const getChromeVersion = async () => {
990
+ return invoke$2('Process.getChromeVersion');
991
+ };
992
+ const getV8Version = async () => {
993
+ return invoke$2('Process.getV8Version');
994
+ };
995
+ const getFileHandles = async fileIds => {
996
+ const files = await invoke$2('FileSystemHandle.getFileHandles', fileIds);
997
+ return files;
998
+ };
999
+ const setWorkspacePath = async path => {
1000
+ await invoke$2('Workspace.setPath', path);
1001
+ };
1002
+ const registerWebViewInterceptor = async (id, port) => {
1003
+ await invokeAndTransfer('WebView.registerInterceptor', id, port);
1004
+ };
1005
+ const unregisterWebViewInterceptor = async id => {
1006
+ await invoke$2('WebView.unregisterInterceptor', id);
1007
+ };
1008
+ const sendMessagePortToEditorWorker = async (port, rpcId) => {
1009
+ const command = 'HandleMessagePort.handleMessagePort';
1010
+ // @ts-ignore
1011
+ await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToEditorWorker', port, command, rpcId);
1012
+ };
1013
+ const sendMessagePortToErrorWorker = async (port, rpcId) => {
1014
+ const command = 'Errors.handleMessagePort';
1015
+ // @ts-ignore
1016
+ await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToErrorWorker', port, command, rpcId);
1017
+ };
1018
+ const sendMessagePortToMarkdownWorker = async (port, rpcId) => {
1019
+ const command = 'Markdown.handleMessagePort';
1020
+ // @ts-ignore
1021
+ await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToMarkdownWorker', port, command, rpcId);
1022
+ };
1023
+ const sendMessagePortToIconThemeWorker = async (port, rpcId) => {
1024
+ const command = 'IconTheme.handleMessagePort';
1025
+ // @ts-ignore
1026
+ await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToIconThemeWorker', port, command, rpcId);
1027
+ };
1028
+ const sendMessagePortToFileSystemWorker = async (port, rpcId) => {
1029
+ const command = 'FileSystem.handleMessagePort';
1030
+ // @ts-ignore
1031
+ await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToFileSystemWorker', port, command, rpcId);
1032
+ };
1033
+ const readFile = async uri => {
1034
+ return invoke$2('FileSystem.readFile', uri);
1035
+ };
1036
+ const getWebViewSecret = async key => {
1037
+ // @ts-ignore
1038
+ return invoke$2('WebView.getSecret', key);
1039
+ };
1040
+ const setWebViewPort = async (uid, port, origin, portType) => {
1041
+ return invokeAndTransfer('WebView.setPort', uid, port, origin, portType);
1042
+ };
931
1043
  const setFocus$2 = key => {
932
- return invoke$3('Focus.setFocus', key);
1044
+ return invoke$2('Focus.setFocus', key);
933
1045
  };
934
1046
  const getFileIcon$1 = async options => {
935
- return invoke$3('IconTheme.getFileIcon', options);
1047
+ return invoke$2('IconTheme.getFileIcon', options);
1048
+ };
1049
+ const getColorThemeNames$1 = async () => {
1050
+ return invoke$2('ColorTheme.getColorThemeNames');
1051
+ };
1052
+ const disableExtension = async id => {
1053
+ // @ts-ignore
1054
+ return invoke$2('ExtensionManagement.disable', id);
1055
+ };
1056
+ const enableExtension = async id => {
1057
+ // @ts-ignore
1058
+ return invoke$2('ExtensionManagement.enable', id);
1059
+ };
1060
+ const handleDebugChange = async params => {
1061
+ // @ts-ignore
1062
+ return invoke$2('Run And Debug.handleChange', params);
936
1063
  };
937
1064
  const getFolderIcon$1 = async options => {
938
- return invoke$3('IconTheme.getFolderIcon', options);
1065
+ return invoke$2('IconTheme.getFolderIcon', options);
939
1066
  };
940
1067
  const closeWidget$2 = async widgetId => {
941
- return invoke$3('Viewlet.closeWidget', widgetId);
1068
+ return invoke$2('Viewlet.closeWidget', widgetId);
1069
+ };
1070
+ const sendMessagePortToExtensionHostWorker = async (port, rpcId = 0) => {
1071
+ const command = 'HandleMessagePort.handleMessagePort2';
1072
+ await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToExtensionHostWorker', port, command, rpcId);
1073
+ };
1074
+ const sendMessagePortToSearchProcess = async port => {
1075
+ await invokeAndTransfer('SendMessagePortToElectron.sendMessagePortToElectron', port, 'HandleMessagePortForSearchProcess.handleMessagePortForSearchProcess');
1076
+ };
1077
+ const confirm = async (message, options) => {
1078
+ // @ts-ignore
1079
+ const result = await invoke$2('ConfirmPrompt.prompt', message, options);
1080
+ return result;
1081
+ };
1082
+ const getRecentlyOpened$1 = async () => {
1083
+ return invoke$2(/* RecentlyOpened.getRecentlyOpened */'RecentlyOpened.getRecentlyOpened');
1084
+ };
1085
+ const getKeyBindings$1 = async () => {
1086
+ return invoke$2('KeyBindingsInitial.getKeyBindings');
1087
+ };
1088
+ const writeClipBoardText = async text => {
1089
+ await invoke$2('ClipBoard.writeText', /* text */text);
1090
+ };
1091
+ const writeClipBoardImage = async blob => {
1092
+ // @ts-ignore
1093
+ await invoke$2('ClipBoard.writeImage', /* text */blob);
1094
+ };
1095
+ const searchFileMemory = async uri => {
1096
+ // @ts-ignore
1097
+ return invoke$2('ExtensionHost.searchFileWithMemory', uri);
1098
+ };
1099
+ const searchFileFetch = async uri => {
1100
+ return invoke$2('ExtensionHost.searchFileWithFetch', uri);
1101
+ };
1102
+ const showMessageBox = async options => {
1103
+ return invoke$2('ElectronDialog.showMessageBox', options);
1104
+ };
1105
+ const handleDebugResumed = async params => {
1106
+ await invoke$2('Run And Debug.handleResumed', params);
1107
+ };
1108
+ const openWidget = async name => {
1109
+ await invoke$2('Viewlet.openWidget', name);
1110
+ };
1111
+ const getIcons = async requests => {
1112
+ const icons = await invoke$2('IconTheme.getIcons', requests);
1113
+ return icons;
1114
+ };
1115
+ const activateByEvent = event => {
1116
+ return invoke$2('ExtensionHostManagement.activateByEvent', event);
1117
+ };
1118
+ const setAdditionalFocus = focusKey => {
1119
+ // @ts-ignore
1120
+ return invoke$2('Focus.setAdditionalFocus', focusKey);
1121
+ };
1122
+ const getActiveEditorId = () => {
1123
+ // @ts-ignore
1124
+ return invoke$2('GetActiveEditor.getActiveEditorId');
1125
+ };
1126
+ const getWorkspacePath$1 = () => {
1127
+ return invoke$2('Workspace.getPath');
1128
+ };
1129
+ const sendMessagePortToRendererProcess = async port => {
1130
+ const command = 'HandleMessagePort.handleMessagePort';
1131
+ // @ts-ignore
1132
+ await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToRendererProcess', port, command, DebugWorker);
1133
+ };
1134
+ const getPreference = async key => {
1135
+ return await invoke$2('Preferences.get', key);
1136
+ };
1137
+ const getAllExtensions = async () => {
1138
+ return invoke$2('ExtensionManagement.getAllExtensions');
1139
+ };
1140
+ const rerenderEditor = async key => {
1141
+ // @ts-ignore
1142
+ return invoke$2('Editor.rerender', key);
1143
+ };
1144
+ const handleDebugPaused = async params => {
1145
+ await invoke$2('Run And Debug.handlePaused', params);
942
1146
  };
943
1147
  const openUri$2 = async (uri, focus, options) => {
944
- await invoke$3('Main.openUri', uri, focus, options);
1148
+ await invoke$2('Main.openUri', uri, focus, options);
1149
+ };
1150
+ const sendMessagePortToSyntaxHighlightingWorker = async port => {
1151
+ await invokeAndTransfer(
1152
+ // @ts-ignore
1153
+ 'SendMessagePortToSyntaxHighlightingWorker.sendMessagePortToSyntaxHighlightingWorker', port, 'HandleMessagePort.handleMessagePort2');
1154
+ };
1155
+ const handleDebugScriptParsed = async script => {
1156
+ await invoke$2('Run And Debug.handleScriptParsed', script);
1157
+ };
1158
+ const getWindowId = async () => {
1159
+ return invoke$2('GetWindowId.getWindowId');
1160
+ };
1161
+ const getBlob = async uri => {
1162
+ // @ts-ignore
1163
+ return invoke$2('FileSystem.getBlob', uri);
1164
+ };
1165
+ const getExtensionCommands = async () => {
1166
+ return invoke$2('ExtensionHost.getCommands');
945
1167
  };
946
1168
  const showErrorDialog$2 = async errorInfo => {
947
1169
  // @ts-ignore
948
- await invoke$3('ErrorHandling.showErrorDialog', errorInfo);
1170
+ await invoke$2('ErrorHandling.showErrorDialog', errorInfo);
1171
+ };
1172
+ const getFolderSize = async uri => {
1173
+ // @ts-ignore
1174
+ return await invoke$2('FileSystem.getFolderSize', uri);
1175
+ };
1176
+ const getExtension = async id => {
1177
+ // @ts-ignore
1178
+ return invoke$2('ExtensionManagement.getExtension', id);
1179
+ };
1180
+ const getMarkdownDom = async html => {
1181
+ // @ts-ignore
1182
+ return invoke$2('Markdown.getVirtualDom', html);
1183
+ };
1184
+ const renderMarkdown = async (markdown, options) => {
1185
+ // @ts-ignore
1186
+ return invoke$2('Markdown.renderMarkdown', markdown, options);
1187
+ };
1188
+ const openNativeFolder = async uri => {
1189
+ // @ts-ignore
1190
+ await invoke$2('OpenNativeFolder.openNativeFolder', uri);
1191
+ };
1192
+ const uninstallExtension = async id => {
1193
+ return invoke$2('ExtensionManagement.uninstall', id);
1194
+ };
1195
+ const installExtension = async id => {
1196
+ // @ts-ignore
1197
+ return invoke$2('ExtensionManagement.install', id);
1198
+ };
1199
+ const openExtensionSearch = async () => {
1200
+ // @ts-ignore
1201
+ return invoke$2('SideBar.openViewlet', 'Extensions');
1202
+ };
1203
+ const setExtensionsSearchValue = async searchValue => {
1204
+ // @ts-ignore
1205
+ return invoke$2('Extensions.handleInput', searchValue);
1206
+ };
1207
+ const openExternal = async uri => {
1208
+ // @ts-ignore
1209
+ await invoke$2('Open.openExternal', uri);
1210
+ };
1211
+ const openUrl = async uri => {
1212
+ // @ts-ignore
1213
+ await invoke$2('Open.openUrl', uri);
1214
+ };
1215
+ const getAllPreferences = async () => {
1216
+ // @ts-ignore
1217
+ return invoke$2('Preferences.getAll');
949
1218
  };
1219
+ const showSaveFilePicker = async () => {
1220
+ // @ts-ignore
1221
+ return invoke$2('FilePicker.showSaveFilePicker');
1222
+ };
1223
+ const getLogsDir = async () => {
1224
+ // @ts-ignore
1225
+ return invoke$2('PlatformPaths.getLogsDir');
1226
+ };
1227
+ const registerMockRpc = commandMap => {
1228
+ const mockRpc = createMockRpc({
1229
+ commandMap
1230
+ });
1231
+ set$2(mockRpc);
1232
+ return mockRpc;
1233
+ };
1234
+
950
1235
  const RendererWorker = {
951
1236
  __proto__: null,
1237
+ activateByEvent,
1238
+ applyBulkReplacement,
952
1239
  closeWidget: closeWidget$2,
1240
+ confirm,
1241
+ disableExtension,
1242
+ dispose: dispose$2,
1243
+ enableExtension,
1244
+ getActiveEditorId,
1245
+ getAllExtensions,
1246
+ getAllPreferences,
1247
+ getBlob,
1248
+ getChromeVersion,
1249
+ getColorThemeNames: getColorThemeNames$1,
1250
+ getElectronVersion,
1251
+ getExtension,
1252
+ getExtensionCommands,
1253
+ getFileHandles,
953
1254
  getFileIcon: getFileIcon$1,
1255
+ getFilePathElectron,
954
1256
  getFolderIcon: getFolderIcon$1,
955
- invoke: invoke$3,
1257
+ getFolderSize,
1258
+ getIcons,
1259
+ getKeyBindings: getKeyBindings$1,
1260
+ getLogsDir,
1261
+ getMarkdownDom,
1262
+ getNodeVersion,
1263
+ getPreference,
1264
+ getRecentlyOpened: getRecentlyOpened$1,
1265
+ getV8Version,
1266
+ getWebViewSecret,
1267
+ getWindowId,
1268
+ getWorkspacePath: getWorkspacePath$1,
1269
+ handleDebugChange,
1270
+ handleDebugPaused,
1271
+ handleDebugResumed,
1272
+ handleDebugScriptParsed,
1273
+ installExtension,
1274
+ invoke: invoke$2,
1275
+ invokeAndTransfer,
1276
+ openExtensionSearch,
1277
+ openExternal,
1278
+ openNativeFolder,
956
1279
  openUri: openUri$2,
957
- set: set$3,
1280
+ openUrl,
1281
+ openWidget,
1282
+ readFile,
1283
+ registerMockRpc,
1284
+ registerWebViewInterceptor,
1285
+ renderMarkdown,
1286
+ rerenderEditor,
1287
+ searchFileFetch,
1288
+ searchFileHtml,
1289
+ searchFileMemory,
1290
+ sendMessagePortToEditorWorker,
1291
+ sendMessagePortToErrorWorker,
1292
+ sendMessagePortToExtensionHostWorker,
1293
+ sendMessagePortToFileSystemWorker,
1294
+ sendMessagePortToIconThemeWorker,
1295
+ sendMessagePortToMarkdownWorker,
1296
+ sendMessagePortToRendererProcess,
1297
+ sendMessagePortToSearchProcess,
1298
+ sendMessagePortToSyntaxHighlightingWorker,
1299
+ set: set$2,
1300
+ setAdditionalFocus,
1301
+ setColorTheme: setColorTheme$1,
1302
+ setExtensionsSearchValue,
958
1303
  setFocus: setFocus$2,
959
- showErrorDialog: showErrorDialog$2};
1304
+ setWebViewPort,
1305
+ setWorkspacePath,
1306
+ showContextMenu,
1307
+ showErrorDialog: showErrorDialog$2,
1308
+ showMessageBox,
1309
+ showSaveFilePicker,
1310
+ uninstallExtension,
1311
+ unregisterWebViewInterceptor,
1312
+ writeClipBoardImage,
1313
+ writeClipBoardText
1314
+ };
960
1315
 
961
1316
  const {
962
1317
  invoke: invoke$1,
@@ -1975,12 +2330,12 @@ const toProtoVisibleItem$1 = item => {
1975
2330
  icon: '',
1976
2331
  matches: [],
1977
2332
  direntType: 0,
1978
- uri: ''
2333
+ uri: '',
2334
+ // @ts-ignore
2335
+ id: item.id,
2336
+ args: item.args
1979
2337
  };
1980
2338
  // @ts-ignore
1981
- pick.id = item.id;
1982
- // @ts-ignore
1983
- pick.args = item.args;
1984
2339
  return pick;
1985
2340
  };
1986
2341
  const getPicks$b = async () => {
@@ -2246,15 +2601,21 @@ const getRecentlyOpened = () => {
2246
2601
  return invoke$1(/* RecentlyOpened.getRecentlyOpened */'RecentlyOpened.getRecentlyOpened');
2247
2602
  };
2248
2603
 
2604
+ const getLabel = uri => {
2605
+ if (uri.startsWith('file://')) {
2606
+ return uri.slice('file://'.length);
2607
+ }
2608
+ return uri;
2609
+ };
2249
2610
  const toProtoVisibleItem = uri => {
2250
2611
  return {
2251
- label: uri,
2612
+ label: getLabel(uri),
2252
2613
  description: '',
2253
2614
  fileIcon: '',
2254
2615
  icon: '',
2255
2616
  matches: [],
2256
2617
  direntType: Directory,
2257
- uri: uri
2618
+ uri
2258
2619
  };
2259
2620
  };
2260
2621
  const getPicks$6 = async () => {
@@ -2384,8 +2745,10 @@ const openWorkspaceFolder = uri => {
2384
2745
 
2385
2746
  // TODO selectPick should be independent of show/hide
2386
2747
  const selectPick$3 = async pick => {
2387
- const path = `${pick.description}/${pick.label}`;
2388
- await openWorkspaceFolder(path);
2748
+ const {
2749
+ uri
2750
+ } = pick;
2751
+ await openWorkspaceFolder(uri);
2389
2752
  return {
2390
2753
  command: Hide
2391
2754
  };
@@ -2838,23 +3201,14 @@ const renderHeight = newState => {
2838
3201
  const mergeClassNames = (...classNames) => {
2839
3202
  return classNames.filter(Boolean).join(' ');
2840
3203
  };
3204
+
2841
3205
  const px = value => {
2842
3206
  return `${value}px`;
2843
3207
  };
2844
3208
  const position = (x, y) => {
2845
3209
  return `${x}px ${y}px`;
2846
3210
  };
2847
- const Div = 4;
2848
- const Input = 6;
2849
- const Span = 8;
2850
- const Text = 12;
2851
- const Img = 17;
2852
- const VirtualDomElements = {
2853
- __proto__: null,
2854
- Div,
2855
- Img,
2856
- Input,
2857
- Span};
3211
+
2858
3212
  const text = data => {
2859
3213
  return {
2860
3214
  type: Text,
@@ -2903,7 +3257,7 @@ const QuickPickItemActive = 'QuickPickItemActive';
2903
3257
  const getQuickPickInputVirtualDom = () => {
2904
3258
  const ariaLabel = typeNameofCommandToRun();
2905
3259
  return {
2906
- type: VirtualDomElements.Input,
3260
+ type: Input,
2907
3261
  className: InputBox,
2908
3262
  spellcheck: false,
2909
3263
  autocapitalize: 'off',
@@ -2924,7 +3278,7 @@ const getQuickPickInputVirtualDom = () => {
2924
3278
 
2925
3279
  const getQuickPickHeaderVirtualDom = () => {
2926
3280
  return [{
2927
- type: VirtualDomElements.Div,
3281
+ type: Div,
2928
3282
  className: QuickPickHeader,
2929
3283
  childCount: 1
2930
3284
  }, getQuickPickInputVirtualDom()];
@@ -2932,7 +3286,7 @@ const getQuickPickHeaderVirtualDom = () => {
2932
3286
 
2933
3287
  const getFileIconVirtualDom = icon => {
2934
3288
  return {
2935
- type: VirtualDomElements.Img,
3289
+ type: Img,
2936
3290
  className: FileIcon,
2937
3291
  src: icon,
2938
3292
  role: None,
@@ -2941,13 +3295,13 @@ const getFileIconVirtualDom = icon => {
2941
3295
  };
2942
3296
 
2943
3297
  const quickPickHighlight = {
2944
- type: VirtualDomElements.Span,
3298
+ type: Span,
2945
3299
  className: QuickPickHighlight,
2946
3300
  childCount: 1
2947
3301
  };
2948
3302
  const getHighlights = (sections, label) => {
2949
3303
  const labelDom = {
2950
- type: VirtualDomElements.Div,
3304
+ type: Div,
2951
3305
  className: QuickPickItemLabel,
2952
3306
  childCount: 0
2953
3307
  };
@@ -2980,15 +3334,14 @@ const getQuickPickItemVirtualDom = visibleItem => {
2980
3334
  highlights,
2981
3335
  fileIcon
2982
3336
  } = visibleItem;
2983
- const dom = [];
2984
- dom.push({
2985
- type: VirtualDomElements.Div,
3337
+ const dom = [{
3338
+ type: Div,
2986
3339
  className: QuickPickItem,
2987
3340
  role: Option,
2988
3341
  ariaPosInSet: posInSet,
2989
3342
  ariaSetSize: setSize,
2990
3343
  childCount: 1
2991
- });
3344
+ }];
2992
3345
  const parent = dom[0];
2993
3346
  if (isActive) {
2994
3347
  // @ts-ignore
@@ -3001,7 +3354,7 @@ const getQuickPickItemVirtualDom = visibleItem => {
3001
3354
  } else if (icon) {
3002
3355
  parent.childCount++;
3003
3356
  dom.push({
3004
- type: VirtualDomElements.Div,
3357
+ type: Div,
3005
3358
  className: mergeClassNames(QuickPickMaskIcon, MaskIcon, `MaskIcon${icon}`),
3006
3359
  childCount: 0
3007
3360
  });
@@ -3011,7 +3364,7 @@ const getQuickPickItemVirtualDom = visibleItem => {
3011
3364
  if (description) {
3012
3365
  parent.childCount++;
3013
3366
  dom.push({
3014
- type: VirtualDomElements.Div,
3367
+ type: Div,
3015
3368
  className: QuickPickItemDescription,
3016
3369
  childCount: 1
3017
3370
  }, text(description));
@@ -3022,11 +3375,11 @@ const getQuickPickItemVirtualDom = visibleItem => {
3022
3375
  const getQuickPickNoResultsVirtualDom = () => {
3023
3376
  const noResults$1 = noResults();
3024
3377
  return [{
3025
- type: VirtualDomElements.Div,
3378
+ type: Div,
3026
3379
  className: mergeClassNames(QuickPickItem, QuickPickItemActive$1, QuickPickStatus),
3027
3380
  childCount: 1
3028
3381
  }, {
3029
- type: VirtualDomElements.Div,
3382
+ type: Div,
3030
3383
  className: Label,
3031
3384
  childCount: 1
3032
3385
  }, text(noResults$1)];
@@ -3048,11 +3401,11 @@ const getScrollBarVirtualDom = (scrollBarHeight, scrollBarTop) => {
3048
3401
  const heightString = px(scrollBarHeight);
3049
3402
  const translateString = position(0, scrollBarTop);
3050
3403
  return [{
3051
- type: VirtualDomElements.Div,
3404
+ type: Div,
3052
3405
  className: mergeClassNames(ScrollBar, ScrollBarSmall),
3053
3406
  childCount: 1
3054
3407
  }, {
3055
- type: VirtualDomElements.Div,
3408
+ type: Div,
3056
3409
  className: ScrollBarThumb,
3057
3410
  childCount: 0,
3058
3411
  height: heightString,
@@ -3064,13 +3417,13 @@ const getQuickPickVirtualDom = (visibleItems, scrollBarHeight, scrollBarTop) =>
3064
3417
  const quickOpen$1 = quickOpen();
3065
3418
  const shouldShowScrollbar = scrollBarHeight > 0;
3066
3419
  return [{
3067
- type: VirtualDomElements.Div,
3420
+ type: Div,
3068
3421
  className: mergeClassNames(Viewlet, QuickPick$1),
3069
3422
  childCount: 2,
3070
3423
  id: QuickPick,
3071
3424
  ariaLabel: quickOpen$1
3072
3425
  }, ...getQuickPickHeaderVirtualDom(), {
3073
- type: VirtualDomElements.Div,
3426
+ type: Div,
3074
3427
  className: mergeClassNames(List, ContainContent),
3075
3428
  id: QuickPickItems,
3076
3429
  role: ListBox,
@@ -3079,7 +3432,7 @@ const getQuickPickVirtualDom = (visibleItems, scrollBarHeight, scrollBarTop) =>
3079
3432
  onPointerDown: HandlePointerDown,
3080
3433
  childCount: shouldShowScrollbar ? 2 : 1
3081
3434
  }, {
3082
- type: VirtualDomElements.Div,
3435
+ type: Div,
3083
3436
  className: mergeClassNames(ListItems, ContainContent),
3084
3437
  childCount: visibleItems.length
3085
3438
  }, ...getQuickPickItemsVirtualDom(visibleItems), ...getScrollBarVirtualDom(scrollBarHeight, scrollBarTop)];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/file-search-worker",
3
- "version": "5.19.0",
3
+ "version": "6.0.0",
4
4
  "keywords": [
5
5
  "text-search"
6
6
  ],