@lvce-editor/text-search-worker 5.4.0 → 5.6.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.
@@ -596,7 +596,7 @@ const create$4$1 = (method, params) => {
596
596
  };
597
597
  };
598
598
  const callbacks = Object.create(null);
599
- const set$2 = (id, fn) => {
599
+ const set$4 = (id, fn) => {
600
600
  callbacks[id] = fn;
601
601
  };
602
602
  const get$3 = id => {
@@ -615,7 +615,7 @@ const registerPromise = () => {
615
615
  resolve,
616
616
  promise
617
617
  } = Promise.withResolvers();
618
- set$2(id, resolve);
618
+ set$4(id, resolve);
619
619
  return {
620
620
  id,
621
621
  promise
@@ -695,7 +695,8 @@ const splitLines = lines => {
695
695
  return lines.split(NewLine);
696
696
  };
697
697
  const getCurrentStack = () => {
698
- const currentStack = joinLines(splitLines(new Error().stack || '').slice(2));
698
+ const stackLinesToSkip = 3;
699
+ const currentStack = joinLines(splitLines(new Error().stack || '').slice(stackLinesToSkip));
699
700
  return currentStack;
700
701
  };
701
702
  const getNewLineIndex = (string, startIndex = undefined) => {
@@ -959,13 +960,19 @@ const send = (transport, method, ...params) => {
959
960
  const message = create$4$1(method, params);
960
961
  transport.send(message);
961
962
  };
962
- const invoke$2 = (ipc, method, ...params) => {
963
+ const invoke$3 = (ipc, method, ...params) => {
963
964
  return invokeHelper(ipc, method, params, false);
964
965
  };
965
- const invokeAndTransfer = (ipc, method, ...params) => {
966
+ const invokeAndTransfer$1 = (ipc, method, ...params) => {
966
967
  return invokeHelper(ipc, method, params, true);
967
968
  };
968
969
 
970
+ class CommandNotFoundError extends Error {
971
+ constructor(command) {
972
+ super(`Command not found ${command}`);
973
+ this.name = 'CommandNotFoundError';
974
+ }
975
+ }
969
976
  const commands = Object.create(null);
970
977
  const register = commandMap => {
971
978
  Object.assign(commands, commandMap);
@@ -976,7 +983,7 @@ const getCommand = key => {
976
983
  const execute = (command, ...args) => {
977
984
  const fn = getCommand(command);
978
985
  if (!fn) {
979
- throw new Error(`command not found ${command}`);
986
+ throw new CommandNotFoundError(command);
980
987
  }
981
988
  return fn(...args);
982
989
  };
@@ -992,10 +999,10 @@ const createRpc = ipc => {
992
999
  send(ipc, method, ...params);
993
1000
  },
994
1001
  invoke(method, ...params) {
995
- return invoke$2(ipc, method, ...params);
1002
+ return invoke$3(ipc, method, ...params);
996
1003
  },
997
1004
  invokeAndTransfer(method, ...params) {
998
- return invokeAndTransfer(ipc, method, ...params);
1005
+ return invokeAndTransfer$1(ipc, method, ...params);
999
1006
  },
1000
1007
  async dispose() {
1001
1008
  await ipc?.dispose();
@@ -1129,6 +1136,22 @@ const WebWorkerRpcClient = {
1129
1136
  __proto__: null,
1130
1137
  create: create$4
1131
1138
  };
1139
+ const createMockRpc = ({
1140
+ commandMap
1141
+ }) => {
1142
+ const invocations = [];
1143
+ const invoke = (method, ...params) => {
1144
+ invocations.push([method, ...params]);
1145
+ const command = commandMap[method];
1146
+ return command(...params);
1147
+ };
1148
+ const mockRpc = {
1149
+ invoke,
1150
+ invokeAndTransfer: invoke,
1151
+ invocations
1152
+ };
1153
+ return mockRpc;
1154
+ };
1132
1155
 
1133
1156
  const toCommandId = key => {
1134
1157
  const dotIndex = key.indexOf('.');
@@ -1276,16 +1299,86 @@ const collapseDetails = state => {
1276
1299
  };
1277
1300
  };
1278
1301
 
1302
+ const Actions = 'Actions';
1303
+ const Badge = 'Badge';
1304
+ const Chevron = 'Chevron';
1305
+ const CloseMaskIcon = 'MaskIcon MaskIconClose';
1306
+ const Empty = '';
1307
+ const FileIcon = 'FileIcon';
1308
+ const FocusOutline = 'FocusOutline';
1309
+ const Grow = 'Grow';
1310
+ const Highlight = 'Highlight';
1311
+ const HighlightDeleted = 'HighlightDeleted';
1312
+ const HighlightInserted = 'HighlightInserted';
1313
+ const IconButton = 'IconButton';
1314
+ const Label = 'Label';
1315
+ const List$1 = 'List';
1316
+ const MaskIcon = 'MaskIcon';
1317
+ const MaskIconBook = 'MaskIconBook';
1318
+ const MaskIconCaseSensitive = 'MaskIconCaseSensitive';
1319
+ const MaskIconChevronDown = 'MaskIconChevronDown';
1320
+ const MaskIconChevronRight = 'MaskIconChevronRight';
1321
+ const MaskIconEllipsis = 'MaskIconEllipsis';
1322
+ const MaskIconExclude = 'MaskIconExclude';
1323
+ const MaskIconPreserveCase = 'MaskIconPreserveCase';
1324
+ const MaskIconRegex = 'MaskIconRegex';
1325
+ const MaskIconReplaceAll = 'MaskIconReplaceAll';
1326
+ const MaskIconWholeWord = 'MaskIconWholeWord';
1327
+ const MultilineInputBox = 'MultilineInputBox';
1328
+ const ScrollBar$1 = 'ScrollBar';
1329
+ const ScrollBarThumb = 'ScrollBarThumb';
1330
+ const ScrollBarVertical = 'ScrollBarVertical';
1331
+ const Search$2 = 'Search';
1332
+ const SearchField = 'SearchField';
1333
+ const SearchFieldButton = 'SearchFieldButton';
1334
+ const SearchFieldButtonChecked = 'SearchFieldButtonChecked';
1335
+ const SearchFieldButtonDisabled = 'SearchFieldButtonDisabled';
1336
+ const SearchFieldButtons = 'SearchFieldButtons';
1337
+ const SearchFieldContainer = 'SearchFieldContainer';
1338
+ const SearchFieldError = 'SearchFieldError';
1339
+ const SearchHeader = 'SearchHeader';
1340
+ const SearchHeaderDetails = 'SearchHeaderDetails';
1341
+ const SearchHeaderDetailsExpanded = 'SearchHeaderDetailsExpanded';
1342
+ const SearchHeaderDetailsExpandedTop = 'SearchHeaderDetailsExpandedTop';
1343
+ const SearchHeaderDetailsHeading = 'SearchHeaderDetailsHeading';
1344
+ const SearchHeaderTop = 'SearchHeaderTop';
1345
+ const SearchHeaderTopRight = 'SearchHeaderTopRight';
1346
+ const SearchInputError = 'SearchInputError';
1347
+ const SearchRemove = 'SearchRemove';
1348
+ const SearchToggleButton = 'SearchToggleButton';
1349
+ const SearchToggleButtonExpanded = 'SearchToggleButtonExpanded';
1350
+ const SourceControlBadge = 'SourceControlBadge';
1351
+ const ToggleDetails = 'ToggleDetails';
1352
+ const Tree$1 = 'Tree';
1353
+ const TreeItem$1 = 'TreeItem';
1354
+ const TreeItemActive = 'TreeItemActive';
1355
+ const TreeItems$1 = 'TreeItems';
1356
+ const Viewlet = 'Viewlet';
1357
+ const ViewletSearchMessage = 'ViewletSearchMessage';
1358
+ const ViewletSearchMessageIndented = 'ViewletSearchMessageIndented';
1359
+
1360
+ const Button$2 = 1;
1361
+ const Div = 4;
1362
+ const Span = 8;
1363
+ const Text = 12;
1364
+ const Img = 17;
1365
+ const Ins = 20;
1366
+ const Del = 21;
1367
+ const H4 = 24;
1368
+ const TextArea = 62;
1369
+
1370
+ const DebugWorker = 55;
1371
+ const RendererWorker$1 = 1;
1372
+ const SearchProcess = 77;
1373
+
1279
1374
  const rpcs = Object.create(null);
1280
- const set$g = (id, rpc) => {
1375
+ const set$3 = (id, rpc) => {
1281
1376
  rpcs[id] = rpc;
1282
1377
  };
1283
1378
  const get$2 = id => {
1284
1379
  return rpcs[id];
1285
1380
  };
1286
1381
 
1287
- /* eslint-disable @typescript-eslint/explicit-function-return-type */
1288
-
1289
1382
  const create$2 = rpcId => {
1290
1383
  return {
1291
1384
  // @ts-ignore
@@ -1301,7 +1394,7 @@ const create$2 = rpcId => {
1301
1394
  return rpc.invokeAndTransfer(method, ...params);
1302
1395
  },
1303
1396
  set(rpc) {
1304
- set$g(rpcId, rpc);
1397
+ set$3(rpcId, rpc);
1305
1398
  },
1306
1399
  async dispose() {
1307
1400
  const rpc = get$2(rpcId);
@@ -1309,46 +1402,362 @@ const create$2 = rpcId => {
1309
1402
  }
1310
1403
  };
1311
1404
  };
1312
- const RendererWorker$1 = 1;
1313
- const SearchProcess$1 = 77;
1314
- const RpcId = {
1315
- __proto__: null,
1316
- SearchProcess: SearchProcess$1};
1405
+
1317
1406
  const {
1318
- invoke: invoke$3,
1319
- invokeAndTransfer: invokeAndTransfer$3,
1320
- set: set$3} = create$2(RendererWorker$1);
1407
+ invoke: invoke$2,
1408
+ invokeAndTransfer,
1409
+ set: set$2,
1410
+ dispose
1411
+ } = create$2(RendererWorker$1);
1412
+ const searchFileHtml = async uri => {
1413
+ return invoke$2('ExtensionHost.searchFileWithHtml', uri);
1414
+ };
1415
+ const getFilePathElectron = async file => {
1416
+ return invoke$2('FileSystemHandle.getFilePathElectron', file);
1417
+ };
1321
1418
  const showContextMenu$1 = async (x, y, id, ...args) => {
1322
- return invoke$3('ContextMenu.show', x, y, id, ...args);
1419
+ return invoke$2('ContextMenu.show', x, y, id, ...args);
1420
+ };
1421
+ const getElectronVersion = async () => {
1422
+ return invoke$2('Process.getElectronVersion');
1423
+ };
1424
+ const applyBulkReplacement$1 = async bulkEdits => {
1425
+ await invoke$2('BulkReplacement.applyBulkReplacement', bulkEdits);
1426
+ };
1427
+ const setColorTheme = async id => {
1428
+ // @ts-ignore
1429
+ return invoke$2(/* ColorTheme.setColorTheme */'ColorTheme.setColorTheme', /* colorThemeId */id);
1430
+ };
1431
+ const getNodeVersion = async () => {
1432
+ return invoke$2('Process.getNodeVersion');
1433
+ };
1434
+ const getChromeVersion = async () => {
1435
+ return invoke$2('Process.getChromeVersion');
1436
+ };
1437
+ const getV8Version = async () => {
1438
+ return invoke$2('Process.getV8Version');
1439
+ };
1440
+ const getFileHandles = async fileIds => {
1441
+ const files = await invoke$2('FileSystemHandle.getFileHandles', fileIds);
1442
+ return files;
1443
+ };
1444
+ const setWorkspacePath = async path => {
1445
+ await invoke$2('Workspace.setPath', path);
1446
+ };
1447
+ const registerWebViewInterceptor = async (id, port) => {
1448
+ await invokeAndTransfer('WebView.registerInterceptor', id, port);
1449
+ };
1450
+ const unregisterWebViewInterceptor = async id => {
1451
+ await invoke$2('WebView.unregisterInterceptor', id);
1452
+ };
1453
+ const sendMessagePortToEditorWorker = async (port, rpcId) => {
1454
+ const command = 'HandleMessagePort.handleMessagePort';
1455
+ // @ts-ignore
1456
+ await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToEditorWorker', port, command, rpcId);
1457
+ };
1458
+ const sendMessagePortToErrorWorker = async (port, rpcId) => {
1459
+ const command = 'Errors.handleMessagePort';
1460
+ // @ts-ignore
1461
+ await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToErrorWorker', port, command, rpcId);
1462
+ };
1463
+ const sendMessagePortToMarkdownWorker = async (port, rpcId) => {
1464
+ const command = 'Markdown.handleMessagePort';
1465
+ // @ts-ignore
1466
+ await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToMarkdownWorker', port, command, rpcId);
1467
+ };
1468
+ const sendMessagePortToFileSystemWorker = async (port, rpcId) => {
1469
+ const command = 'FileSystem.handleMessagePort';
1470
+ // @ts-ignore
1471
+ await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToFileSystemWorker', port, command, rpcId);
1472
+ };
1473
+ const readFile = async uri => {
1474
+ return invoke$2('FileSystem.readFile', uri);
1475
+ };
1476
+ const getWebViewSecret = async key => {
1477
+ // @ts-ignore
1478
+ return invoke$2('WebView.getSecret', key);
1479
+ };
1480
+ const setWebViewPort = async (uid, port, origin, portType) => {
1481
+ return invokeAndTransfer('WebView.setPort', uid, port, origin, portType);
1482
+ };
1483
+ const setFocus = key => {
1484
+ return invoke$2('Focus.setFocus', key);
1323
1485
  };
1324
1486
  const getFileIcon$2 = async options => {
1325
- return invoke$3('IconTheme.getFileIcon', options);
1487
+ return invoke$2('IconTheme.getFileIcon', options);
1488
+ };
1489
+ const getColorThemeNames = async () => {
1490
+ return invoke$2('ColorTheme.getColorThemeNames');
1491
+ };
1492
+ const disableExtension = async id => {
1493
+ // @ts-ignore
1494
+ return invoke$2('ExtensionManagement.disable', id);
1495
+ };
1496
+ const enableExtension = async id => {
1497
+ // @ts-ignore
1498
+ return invoke$2('ExtensionManagement.enable', id);
1499
+ };
1500
+ const handleDebugChange = async params => {
1501
+ // @ts-ignore
1502
+ return invoke$2('Run And Debug.handleChange', params);
1503
+ };
1504
+ const getFolderIcon = async options => {
1505
+ return invoke$2('IconTheme.getFolderIcon', options);
1506
+ };
1507
+ const closeWidget = async widgetId => {
1508
+ return invoke$2('Viewlet.closeWidget', widgetId);
1509
+ };
1510
+ const sendMessagePortToExtensionHostWorker = async (port, rpcId = 0) => {
1511
+ const command = 'HandleMessagePort.handleMessagePort2';
1512
+ await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToExtensionHostWorker', port, command, rpcId);
1326
1513
  };
1327
1514
  const sendMessagePortToSearchProcess$1 = async port => {
1328
- await invokeAndTransfer$3('SendMessagePortToElectron.sendMessagePortToElectron', port, 'HandleMessagePortForSearchProcess.handleMessagePortForSearchProcess');
1515
+ await invokeAndTransfer('SendMessagePortToElectron.sendMessagePortToElectron', port, 'HandleMessagePortForSearchProcess.handleMessagePortForSearchProcess');
1516
+ };
1517
+ const confirm = async (message, options) => {
1518
+ // @ts-ignore
1519
+ const result = await invoke$2('ConfirmPrompt.prompt', message, options);
1520
+ return result;
1521
+ };
1522
+ const getRecentlyOpened = async () => {
1523
+ return invoke$2(/* RecentlyOpened.getRecentlyOpened */'RecentlyOpened.getRecentlyOpened');
1524
+ };
1525
+ const getKeyBindings$1 = async () => {
1526
+ return invoke$2('KeyBindingsInitial.getKeyBindings');
1329
1527
  };
1330
1528
  const writeClipBoardText$1 = async text => {
1331
- await invoke$3('ClipBoard.writeText', /* text */text);
1529
+ await invoke$2('ClipBoard.writeText', /* text */text);
1530
+ };
1531
+ const writeClipBoardImage = async blob => {
1532
+ // @ts-ignore
1533
+ await invoke$2('ClipBoard.writeImage', /* text */blob);
1534
+ };
1535
+ const searchFileMemory = async uri => {
1536
+ // @ts-ignore
1537
+ return invoke$2('ExtensionHost.searchFileWithMemory', uri);
1538
+ };
1539
+ const searchFileFetch = async uri => {
1540
+ return invoke$2('ExtensionHost.searchFileWithFetch', uri);
1541
+ };
1542
+ const showMessageBox = async options => {
1543
+ return invoke$2('ElectronDialog.showMessageBox', options);
1544
+ };
1545
+ const handleDebugResumed = async params => {
1546
+ await invoke$2('Run And Debug.handleResumed', params);
1547
+ };
1548
+ const openWidget = async name => {
1549
+ await invoke$2('Viewlet.openWidget', name);
1550
+ };
1551
+ const getIcons = async requests => {
1552
+ const icons = await invoke$2('IconTheme.getIcons', requests);
1553
+ return icons;
1554
+ };
1555
+ const activateByEvent = event => {
1556
+ return invoke$2('ExtensionHostManagement.activateByEvent', event);
1557
+ };
1558
+ const setAdditionalFocus = focusKey => {
1559
+ // @ts-ignore
1560
+ return invoke$2('Focus.setAdditionalFocus', focusKey);
1561
+ };
1562
+ const getActiveEditorId = () => {
1563
+ // @ts-ignore
1564
+ return invoke$2('GetActiveEditor.getActiveEditorId');
1565
+ };
1566
+ const getWorkspacePath = () => {
1567
+ return invoke$2('Workspace.getPath');
1568
+ };
1569
+ const sendMessagePortToRendererProcess = async port => {
1570
+ const command = 'HandleMessagePort.handleMessagePort';
1571
+ // @ts-ignore
1572
+ await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToRendererProcess', port, command, DebugWorker);
1573
+ };
1574
+ const getPreference = async key => {
1575
+ return await invoke$2('Preferences.get', key);
1576
+ };
1577
+ const getAllExtensions = async () => {
1578
+ return invoke$2('ExtensionManagement.getAllExtensions');
1579
+ };
1580
+ const rerenderEditor = async key => {
1581
+ // @ts-ignore
1582
+ return invoke$2('Editor.rerender', key);
1583
+ };
1584
+ const handleDebugPaused = async params => {
1585
+ await invoke$2('Run And Debug.handlePaused', params);
1332
1586
  };
1333
1587
  const openUri$2 = async (uri, focus, options) => {
1334
- await invoke$3('Main.openUri', uri, focus, options);
1588
+ await invoke$2('Main.openUri', uri, focus, options);
1589
+ };
1590
+ const sendMessagePortToSyntaxHighlightingWorker = async port => {
1591
+ await invokeAndTransfer(
1592
+ // @ts-ignore
1593
+ 'SendMessagePortToSyntaxHighlightingWorker.sendMessagePortToSyntaxHighlightingWorker', port, 'HandleMessagePort.handleMessagePort2');
1594
+ };
1595
+ const handleDebugScriptParsed = async script => {
1596
+ await invoke$2('Run And Debug.handleScriptParsed', script);
1597
+ };
1598
+ const getWindowId = async () => {
1599
+ return invoke$2('GetWindowId.getWindowId');
1600
+ };
1601
+ const getBlob = async uri => {
1602
+ // @ts-ignore
1603
+ return invoke$2('FileSystem.getBlob', uri);
1604
+ };
1605
+ const getExtensionCommands = async () => {
1606
+ return invoke$2('ExtensionHost.getCommands');
1607
+ };
1608
+ const showErrorDialog = async errorInfo => {
1609
+ // @ts-ignore
1610
+ await invoke$2('ErrorHandling.showErrorDialog', errorInfo);
1611
+ };
1612
+ const getFolderSize = async uri => {
1613
+ // @ts-ignore
1614
+ return await invoke$2('FileSystem.getFolderSize', uri);
1615
+ };
1616
+ const getExtension = async id => {
1617
+ // @ts-ignore
1618
+ return invoke$2('ExtensionManagement.getExtension', id);
1619
+ };
1620
+ const getMarkdownDom = async html => {
1621
+ // @ts-ignore
1622
+ return invoke$2('Markdown.getVirtualDom', html);
1623
+ };
1624
+ const renderMarkdown = async (markdown, options) => {
1625
+ // @ts-ignore
1626
+ return invoke$2('Markdown.renderMarkdown', markdown, options);
1627
+ };
1628
+ const openNativeFolder = async uri => {
1629
+ // @ts-ignore
1630
+ await invoke$2('OpenNativeFolder.openNativeFolder', uri);
1631
+ };
1632
+ const uninstallExtension = async id => {
1633
+ return invoke$2('ExtensionManagement.uninstall', id);
1335
1634
  };
1635
+ const installExtension = async id => {
1636
+ // @ts-ignore
1637
+ return invoke$2('ExtensionManagement.install', id);
1638
+ };
1639
+ const openExtensionSearch = async () => {
1640
+ // @ts-ignore
1641
+ return invoke$2('SideBar.openViewlet', 'Extensions');
1642
+ };
1643
+ const setExtensionsSearchValue = async searchValue => {
1644
+ // @ts-ignore
1645
+ return invoke$2('Extensions.handleInput', searchValue);
1646
+ };
1647
+ const openExternal = async uri => {
1648
+ // @ts-ignore
1649
+ await invoke$2('Open.openExternal', uri);
1650
+ };
1651
+ const openUrl = async uri => {
1652
+ // @ts-ignore
1653
+ await invoke$2('Open.openUrl', uri);
1654
+ };
1655
+ const getAllPreferences = async () => {
1656
+ // @ts-ignore
1657
+ return invoke$2('Preferences.getAll');
1658
+ };
1659
+ const showSaveFilePicker = async () => {
1660
+ // @ts-ignore
1661
+ return invoke$2('FilePicker.showSaveFilePicker');
1662
+ };
1663
+ const getLogsDir = async () => {
1664
+ // @ts-ignore
1665
+ return invoke$2('PlatformPaths.getLogsDir');
1666
+ };
1667
+ const registerMockRpc = commandMap => {
1668
+ const mockRpc = createMockRpc({
1669
+ commandMap
1670
+ });
1671
+ set$2(mockRpc);
1672
+ return mockRpc;
1673
+ };
1674
+
1336
1675
  const RendererWorker = {
1337
1676
  __proto__: null,
1677
+ activateByEvent,
1678
+ applyBulkReplacement: applyBulkReplacement$1,
1679
+ closeWidget,
1680
+ confirm,
1681
+ disableExtension,
1682
+ dispose,
1683
+ enableExtension,
1684
+ getActiveEditorId,
1685
+ getAllExtensions,
1686
+ getAllPreferences,
1687
+ getBlob,
1688
+ getChromeVersion,
1689
+ getColorThemeNames,
1690
+ getElectronVersion,
1691
+ getExtension,
1692
+ getExtensionCommands,
1693
+ getFileHandles,
1338
1694
  getFileIcon: getFileIcon$2,
1339
- invoke: invoke$3,
1695
+ getFilePathElectron,
1696
+ getFolderIcon,
1697
+ getFolderSize,
1698
+ getIcons,
1699
+ getKeyBindings: getKeyBindings$1,
1700
+ getLogsDir,
1701
+ getMarkdownDom,
1702
+ getNodeVersion,
1703
+ getPreference,
1704
+ getRecentlyOpened,
1705
+ getV8Version,
1706
+ getWebViewSecret,
1707
+ getWindowId,
1708
+ getWorkspacePath,
1709
+ handleDebugChange,
1710
+ handleDebugPaused,
1711
+ handleDebugResumed,
1712
+ handleDebugScriptParsed,
1713
+ installExtension,
1714
+ invoke: invoke$2,
1715
+ invokeAndTransfer,
1716
+ openExtensionSearch,
1717
+ openExternal,
1718
+ openNativeFolder,
1340
1719
  openUri: openUri$2,
1720
+ openUrl,
1721
+ openWidget,
1722
+ readFile,
1723
+ registerMockRpc,
1724
+ registerWebViewInterceptor,
1725
+ renderMarkdown,
1726
+ rerenderEditor,
1727
+ searchFileFetch,
1728
+ searchFileHtml,
1729
+ searchFileMemory,
1730
+ sendMessagePortToEditorWorker,
1731
+ sendMessagePortToErrorWorker,
1732
+ sendMessagePortToExtensionHostWorker,
1733
+ sendMessagePortToFileSystemWorker,
1734
+ sendMessagePortToMarkdownWorker,
1735
+ sendMessagePortToRendererProcess,
1341
1736
  sendMessagePortToSearchProcess: sendMessagePortToSearchProcess$1,
1342
- set: set$3,
1737
+ sendMessagePortToSyntaxHighlightingWorker,
1738
+ set: set$2,
1739
+ setAdditionalFocus,
1740
+ setColorTheme,
1741
+ setExtensionsSearchValue,
1742
+ setFocus,
1743
+ setWebViewPort,
1744
+ setWorkspacePath,
1343
1745
  showContextMenu: showContextMenu$1,
1746
+ showErrorDialog,
1747
+ showMessageBox,
1748
+ showSaveFilePicker,
1749
+ uninstallExtension,
1750
+ unregisterWebViewInterceptor,
1751
+ writeClipBoardImage,
1344
1752
  writeClipBoardText: writeClipBoardText$1
1345
1753
  };
1754
+
1346
1755
  const createLazyRpc = rpcId => {
1347
1756
  let rpcPromise;
1348
1757
  let factory;
1349
1758
  const createRpc = async () => {
1350
1759
  const rpc = await factory();
1351
- set$g(rpcId, rpc);
1760
+ set$3(rpcId, rpc);
1352
1761
  };
1353
1762
  const ensureRpc = async () => {
1354
1763
  if (!rpcPromise) {
@@ -1399,7 +1808,7 @@ const {
1399
1808
  wrapCommand
1400
1809
  } = create$3();
1401
1810
 
1402
- const List$1 = 1;
1811
+ const List = 1;
1403
1812
 
1404
1813
  const create$1 = ({
1405
1814
  itemHeight,
@@ -1468,7 +1877,7 @@ const create = (uid, x, y, width, height, workspacePath, assetDir, itemHeight, v
1468
1877
  searchInputErrorMessage: '',
1469
1878
  history: [],
1470
1879
  historyIndex: -1,
1471
- viewMode: List$1,
1880
+ viewMode: List,
1472
1881
  incrementalSearch: false,
1473
1882
  searchId: '',
1474
1883
  useChevrons: true,
@@ -1587,7 +1996,7 @@ const ReplaceAll$1 = 'Replace All';
1587
1996
  const ReplacedManyOccurrencesInManyFiles = "Replaced {PH1} occurrences across {PH2} files with '{PH3}'";
1588
1997
  const ReplacedOneOccurrenceInOneFile = "Replaced 1 occurrence across 1 file with '{PH1}'";
1589
1998
  const ReplaceForHistory = 'Replace (⇅ for history)';
1590
- const Search$2 = 'Search';
1999
+ const Search$1 = 'Search';
1591
2000
  const SearchForHistory = 'Search (⇅ for history)';
1592
2001
  const SearchOnlyOpenEditors$1 = 'Search Only Open Editors';
1593
2002
  const ToggleReplace$1 = 'Toggle Replace';
@@ -1724,7 +2133,7 @@ const searchForHistory = () => {
1724
2133
  return i18nString(SearchForHistory);
1725
2134
  };
1726
2135
  const search = () => {
1727
- return i18nString(Search$2);
2136
+ return i18nString(Search$1);
1728
2137
  };
1729
2138
  const replaceForHistory = () => {
1730
2139
  return i18nString(ReplaceForHistory);
@@ -2309,7 +2718,7 @@ const getRipGrepArgs = ({
2309
2718
  const {
2310
2719
  invoke,
2311
2720
  setFactory
2312
- } = createLazyRpc(RpcId.SearchProcess);
2721
+ } = createLazyRpc(SearchProcess);
2313
2722
 
2314
2723
  const waitForNextFrame = async () => {
2315
2724
  const {
@@ -3536,144 +3945,10 @@ const createViewModel = state => {
3536
3945
  };
3537
3946
  };
3538
3947
 
3539
- const Actions = 'Actions';
3540
- const Badge = 'Badge';
3541
- const Chevron = 'Chevron';
3542
- const CloseMaskIcon = 'MaskIcon MaskIconClose';
3543
- const Empty = '';
3544
- const FileIcon = 'FileIcon';
3545
- const FocusOutline = 'FocusOutline';
3546
- const Grow = 'Grow';
3547
- const Highlight = 'Highlight';
3548
- const HighlightDeleted = 'HighlightDeleted';
3549
- const HighlightInserted = 'HighlightInserted';
3550
- const IconButton = 'IconButton';
3551
- const Label$1 = 'Label';
3552
- const List = 'List';
3553
- const MaskIcon = 'MaskIcon';
3554
- const MaskIconBook = 'MaskIconBook';
3555
- const MaskIconCaseSensitive = 'MaskIconCaseSensitive';
3556
- const MaskIconChevronDown = 'MaskIconChevronDown';
3557
- const MaskIconChevronRight = 'MaskIconChevronRight';
3558
- const MaskIconEllipsis = 'MaskIconEllipsis';
3559
- const MaskIconExclude = 'MaskIconExclude';
3560
- const MaskIconPreserveCase = 'MaskIconPreserveCase';
3561
- const MaskIconRegex = 'MaskIconRegex';
3562
- const MaskIconReplaceAll = 'MaskIconReplaceAll';
3563
- const MaskIconWholeWord = 'MaskIconWholeWord';
3564
- const MultilineInputBox = 'MultilineInputBox';
3565
- const ScrollBar$1 = 'ScrollBar';
3566
- const ScrollBarThumb = 'ScrollBarThumb';
3567
- const ScrollBarVertical = 'ScrollBarVertical';
3568
- const Search$1 = 'Search';
3569
- const SearchField = 'SearchField';
3570
- const SearchFieldButton = 'SearchFieldButton';
3571
- const SearchFieldButtonChecked = 'SearchFieldButtonChecked';
3572
- const SearchFieldButtonDisabled = 'SearchFieldButtonDisabled';
3573
- const SearchFieldButtons = 'SearchFieldButtons';
3574
- const SearchFieldContainer = 'SearchFieldContainer';
3575
- const SearchFieldError = 'SearchFieldError';
3576
- const SearchHeader = 'SearchHeader';
3577
- const SearchHeaderDetails = 'SearchHeaderDetails';
3578
- const SearchHeaderDetailsExpanded = 'SearchHeaderDetailsExpanded';
3579
- const SearchHeaderDetailsExpandedTop = 'SearchHeaderDetailsExpandedTop';
3580
- const SearchHeaderDetailsHeading = 'SearchHeaderDetailsHeading';
3581
- const SearchHeaderTop = 'SearchHeaderTop';
3582
- const SearchHeaderTopRight = 'SearchHeaderTopRight';
3583
- const SearchInputError = 'SearchInputError';
3584
- const SearchRemove = 'SearchRemove';
3585
- const SearchToggleButton = 'SearchToggleButton';
3586
- const SearchToggleButtonExpanded = 'SearchToggleButtonExpanded';
3587
- const SourceControlBadge = 'SourceControlBadge';
3588
- const ToggleDetails = 'ToggleDetails';
3589
- const Tree$1 = 'Tree';
3590
- const TreeItem$1 = 'TreeItem';
3591
- const TreeItemActive = 'TreeItemActive';
3592
- const TreeItems$1 = 'TreeItems';
3593
- const Viewlet = 'Viewlet';
3594
- const ViewletSearchMessage = 'ViewletSearchMessage';
3595
- const ViewletSearchMessageIndented = 'ViewletSearchMessageIndented';
3596
- const ClassNames = {
3597
- __proto__: null,
3598
- Actions,
3599
- Badge,
3600
- Chevron,
3601
- CloseMaskIcon,
3602
- Empty,
3603
- FileIcon,
3604
- FocusOutline,
3605
- Grow,
3606
- Highlight,
3607
- HighlightDeleted,
3608
- HighlightInserted,
3609
- IconButton,
3610
- Label: Label$1,
3611
- List,
3612
- MaskIcon,
3613
- MaskIconBook,
3614
- MaskIconCaseSensitive,
3615
- MaskIconChevronDown,
3616
- MaskIconChevronRight,
3617
- MaskIconEllipsis,
3618
- MaskIconExclude,
3619
- MaskIconPreserveCase,
3620
- MaskIconRegex,
3621
- MaskIconReplaceAll,
3622
- MaskIconWholeWord,
3623
- MultilineInputBox,
3624
- ScrollBar: ScrollBar$1,
3625
- ScrollBarThumb,
3626
- ScrollBarVertical,
3627
- Search: Search$1,
3628
- SearchField,
3629
- SearchFieldButton,
3630
- SearchFieldButtonChecked,
3631
- SearchFieldButtonDisabled,
3632
- SearchFieldButtons,
3633
- SearchFieldContainer,
3634
- SearchFieldError,
3635
- SearchHeader,
3636
- SearchHeaderDetails,
3637
- SearchHeaderDetailsExpanded,
3638
- SearchHeaderDetailsExpandedTop,
3639
- SearchHeaderDetailsHeading,
3640
- SearchHeaderTop,
3641
- SearchHeaderTopRight,
3642
- SearchInputError,
3643
- SearchRemove,
3644
- SearchToggleButton,
3645
- SearchToggleButtonExpanded,
3646
- SourceControlBadge,
3647
- ToggleDetails,
3648
- Tree: Tree$1,
3649
- TreeItem: TreeItem$1,
3650
- TreeItemActive,
3651
- TreeItems: TreeItems$1,
3652
- Viewlet,
3653
- ViewletSearchMessage,
3654
- ViewletSearchMessageIndented};
3655
3948
  const mergeClassNames = (...classNames) => {
3656
3949
  return classNames.filter(Boolean).join(' ');
3657
3950
  };
3658
- const Button$2 = 1;
3659
- const Div = 4;
3660
- const Span = 8;
3661
- const Text = 12;
3662
- const Img = 17;
3663
- const Ins = 20;
3664
- const Del = 21;
3665
- const H4 = 24;
3666
- const TextArea = 62;
3667
- const VirtualDomElements = {
3668
- __proto__: null,
3669
- Button: Button$2,
3670
- Del,
3671
- Div,
3672
- H4,
3673
- Img,
3674
- Ins,
3675
- Span,
3676
- TextArea};
3951
+
3677
3952
  const text = data => {
3678
3953
  return {
3679
3954
  type: Text,
@@ -3681,6 +3956,7 @@ const text = data => {
3681
3956
  childCount: 0
3682
3957
  };
3683
3958
  };
3959
+
3684
3960
  const SetText = 1;
3685
3961
  const SetAttribute = 3;
3686
3962
  const RemoveAttribute = 4;
@@ -3689,6 +3965,7 @@ const NavigateChild = 7;
3689
3965
  const NavigateParent = 8;
3690
3966
  const RemoveChild = 9;
3691
3967
  const NavigateSibling = 10;
3968
+
3692
3969
  const applyPendingPatches = (patches, pendingPatches, skip) => {
3693
3970
  for (let k = 0; k < pendingPatches.length - skip; k += 2) {
3694
3971
  const type = pendingPatches[k];
@@ -3706,13 +3983,16 @@ const applyPendingPatches = (patches, pendingPatches, skip) => {
3706
3983
  }
3707
3984
  pendingPatches.length = 0;
3708
3985
  };
3986
+
3709
3987
  const isKey = key => {
3710
3988
  return key !== 'type' && key !== 'childCount';
3711
3989
  };
3990
+
3712
3991
  const getKeys = node => {
3713
3992
  const keys = Object.keys(node).filter(isKey);
3714
3993
  return keys;
3715
3994
  };
3995
+
3716
3996
  const getTotalChildCount = (nodes, index) => {
3717
3997
  let i = index;
3718
3998
  let pending = 1;
@@ -3724,6 +4004,7 @@ const getTotalChildCount = (nodes, index) => {
3724
4004
  }
3725
4005
  return i - index;
3726
4006
  };
4007
+
3727
4008
  const diff = (oldNodes, newNodes) => {
3728
4009
  const patches = [];
3729
4010
  const pendingPatches = [];
@@ -3735,7 +4016,6 @@ const diff = (oldNodes, newNodes) => {
3735
4016
  while (i < oldNodes.length && j < newNodes.length) {
3736
4017
  const oldNode = oldNodes[i];
3737
4018
  const newNode = newNodes[j];
3738
-
3739
4019
  // TODO maybe don't have the current element in indexstack
3740
4020
  if (siblingOffset === maxSiblingOffset) {
3741
4021
  indexStack.pop();
@@ -3921,8 +4201,8 @@ const HandleWheel = 'handleWheel';
3921
4201
 
3922
4202
  const getSearchDetailsToggleVirtualDom = () => {
3923
4203
  return [{
3924
- type: VirtualDomElements.Div,
3925
- className: ClassNames.ToggleDetails,
4204
+ type: Div,
4205
+ className: ToggleDetails,
3926
4206
  role: Button$1,
3927
4207
  tabIndex: 0,
3928
4208
  ariaLabel: toggleSearchDetails(),
@@ -3930,21 +4210,21 @@ const getSearchDetailsToggleVirtualDom = () => {
3930
4210
  name: ToggleSearchDetails,
3931
4211
  childCount: 1
3932
4212
  }, {
3933
- type: VirtualDomElements.Div,
3934
- className: mergeClassNames(ClassNames.MaskIcon, ClassNames.MaskIconEllipsis),
4213
+ type: Div,
4214
+ className: mergeClassNames(MaskIcon, MaskIconEllipsis),
3935
4215
  childCount: 0
3936
4216
  }];
3937
4217
  };
3938
4218
 
3939
4219
  const getClassName = indented => {
3940
4220
  if (indented) {
3941
- return mergeClassNames(ClassNames.ViewletSearchMessage, ClassNames.ViewletSearchMessageIndented);
4221
+ return mergeClassNames(ViewletSearchMessage, ViewletSearchMessageIndented);
3942
4222
  }
3943
- return ClassNames.ViewletSearchMessage;
4223
+ return ViewletSearchMessage;
3944
4224
  };
3945
4225
  const getSearchMessageVirtualDom = (message, indented) => {
3946
4226
  return [{
3947
- type: VirtualDomElements.Div,
4227
+ type: Div,
3948
4228
  className: getClassName(indented),
3949
4229
  role: Status,
3950
4230
  tabIndex: 0,
@@ -3954,8 +4234,8 @@ const getSearchMessageVirtualDom = (message, indented) => {
3954
4234
 
3955
4235
  const getSearchHeaderDetailsCollapsedVirtualDom = message => {
3956
4236
  return [{
3957
- type: VirtualDomElements.Div,
3958
- className: ClassNames.SearchHeaderDetails,
4237
+ type: Div,
4238
+ className: SearchHeaderDetails,
3959
4239
  childCount: 2
3960
4240
  }, ...getSearchMessageVirtualDom(message, true), ...getSearchDetailsToggleVirtualDom()];
3961
4241
  };
@@ -3967,7 +4247,7 @@ const ButtonDisabled = 3;
3967
4247
 
3968
4248
  const getInputActionsExclude = flags => {
3969
4249
  const inside = [{
3970
- icon: ClassNames.MaskIconExclude,
4250
+ icon: MaskIconExclude,
3971
4251
  title: useExcludeSettings(),
3972
4252
  command: 'toggleUseExcludeSettings',
3973
4253
  flag: flags & UseIgnoreFiles ? CheckBoxEnabled : CheckBoxDisabled,
@@ -3982,7 +4262,7 @@ const getInputActionsExclude = flags => {
3982
4262
 
3983
4263
  const getInputActionsInclude = flags => {
3984
4264
  const inside = [{
3985
- icon: ClassNames.MaskIconBook,
4265
+ icon: MaskIconBook,
3986
4266
  title: searchOnlyOpenEditors(),
3987
4267
  command: 'searchOnlyOpenEditors',
3988
4268
  flag: flags & OpenEditors ? CheckBoxEnabled : CheckBoxDisabled,
@@ -3996,7 +4276,7 @@ const getInputActionsInclude = flags => {
3996
4276
  };
3997
4277
 
3998
4278
  const getSearchFieldButtonClassName = flag => {
3999
- return mergeClassNames(ClassNames.SearchFieldButton, flag === CheckBoxEnabled ? ClassNames.SearchFieldButtonChecked : '', flag === ButtonDisabled ? ClassNames.SearchFieldButtonDisabled : '');
4279
+ return mergeClassNames(SearchFieldButton, flag === CheckBoxEnabled ? SearchFieldButtonChecked : '', flag === ButtonDisabled ? SearchFieldButtonDisabled : '');
4000
4280
  };
4001
4281
 
4002
4282
  // TODO maybe move logic to viewmodel, which returns ariaChecked 1 | 2 | 3
@@ -4040,7 +4320,7 @@ const getSearchFieldButtonVirtualDom = button => {
4040
4320
  const role = getRole(flag);
4041
4321
  const disabled = getDisabled(flag);
4042
4322
  return [{
4043
- type: VirtualDomElements.Button,
4323
+ type: Button$2,
4044
4324
  className: getSearchFieldButtonClassName(flag),
4045
4325
  name,
4046
4326
  title,
@@ -4050,8 +4330,8 @@ const getSearchFieldButtonVirtualDom = button => {
4050
4330
  tabIndex: 0,
4051
4331
  childCount: 1
4052
4332
  }, {
4053
- type: VirtualDomElements.Span,
4054
- className: mergeClassNames(ClassNames.MaskIcon, icon),
4333
+ type: Span,
4334
+ className: mergeClassNames(MaskIcon, icon),
4055
4335
  childCount: 0
4056
4336
  }];
4057
4337
  };
@@ -4065,8 +4345,8 @@ const getOutSideButtonsDom = outsideButtons => {
4065
4345
  }
4066
4346
  return {
4067
4347
  preNodes: [{
4068
- type: VirtualDomElements.Div,
4069
- className: ClassNames.SearchFieldContainer,
4348
+ type: Div,
4349
+ className: SearchFieldContainer,
4070
4350
  role: None,
4071
4351
  childCount: 1 + outsideButtons.length
4072
4352
  }],
@@ -4079,15 +4359,15 @@ const getSearchFieldVirtualDom = (name, placeholder, onInput, insideButtons, out
4079
4359
  preNodes,
4080
4360
  postNodes
4081
4361
  } = getOutSideButtonsDom(outsideButtons);
4082
- const searchFieldClassName = hasError ? mergeClassNames(ClassNames.SearchField, ClassNames.SearchFieldError) : ClassNames.SearchField;
4362
+ const searchFieldClassName = hasError ? mergeClassNames(SearchField, SearchFieldError) : SearchField;
4083
4363
  const dom = [...preNodes, {
4084
- type: VirtualDomElements.Div,
4364
+ type: Div,
4085
4365
  className: searchFieldClassName,
4086
4366
  role: None,
4087
4367
  childCount: 2
4088
4368
  }, {
4089
- type: VirtualDomElements.TextArea,
4090
- className: ClassNames.MultilineInputBox,
4369
+ type: TextArea,
4370
+ className: MultilineInputBox,
4091
4371
  spellcheck: false,
4092
4372
  autocapitalize: 'off',
4093
4373
  autocorrect: 'off',
@@ -4097,8 +4377,8 @@ const getSearchFieldVirtualDom = (name, placeholder, onInput, insideButtons, out
4097
4377
  onFocus,
4098
4378
  childCount: 0
4099
4379
  }, {
4100
- type: VirtualDomElements.Div,
4101
- className: ClassNames.SearchFieldButtons,
4380
+ type: Div,
4381
+ className: SearchFieldButtons,
4102
4382
  childCount: insideButtons.length
4103
4383
  }, ...insideButtons.flatMap(getSearchFieldButtonVirtualDom), ...postNodes];
4104
4384
  return dom;
@@ -4110,20 +4390,20 @@ const getSearchHeaderDetailsExpandedVirtualDom = (flags, message) => {
4110
4390
  const includePlaceholder = include();
4111
4391
  const excludePlaceholder = exclude();
4112
4392
  return [{
4113
- type: VirtualDomElements.Div,
4114
- className: ClassNames.SearchHeaderDetailsExpanded,
4393
+ type: Div,
4394
+ className: SearchHeaderDetailsExpanded,
4115
4395
  childCount: 5
4116
4396
  }, {
4117
- type: VirtualDomElements.Div,
4118
- className: ClassNames.SearchHeaderDetailsExpandedTop,
4397
+ type: Div,
4398
+ className: SearchHeaderDetailsExpandedTop,
4119
4399
  childCount: 2
4120
4400
  }, ...getSearchDetailsToggleVirtualDom(), {
4121
- type: VirtualDomElements.H4,
4122
- className: ClassNames.SearchHeaderDetailsHeading,
4401
+ type: H4,
4402
+ className: SearchHeaderDetailsHeading,
4123
4403
  childCount: 1
4124
4404
  }, text(filesToInclude()), ...getSearchFieldVirtualDom(FilesToInclude, includePlaceholder, HandleInput2, includeButtons.inside, includeButtons.outside), {
4125
- type: VirtualDomElements.H4,
4126
- className: ClassNames.SearchHeaderDetailsHeading,
4405
+ type: H4,
4406
+ className: SearchHeaderDetailsHeading,
4127
4407
  childCount: 1
4128
4408
  }, text(filesToExclude()), ...getSearchFieldVirtualDom(FilesToExclude, excludePlaceholder, HandleInput2, excludeButtons.inside, excludeButtons.outside), ...getSearchMessageVirtualDom(message, false)];
4129
4409
  };
@@ -4137,17 +4417,17 @@ const getSearchHeaderDetailsVirtualDom = (flags, message) => {
4137
4417
 
4138
4418
  const getInputActionsInput = flags => {
4139
4419
  const inside = [{
4140
- icon: ClassNames.MaskIconCaseSensitive,
4420
+ icon: MaskIconCaseSensitive,
4141
4421
  flag: flags & MatchCase$2 ? CheckBoxEnabled : CheckBoxDisabled,
4142
4422
  title: matchCase(),
4143
4423
  name: MatchCase
4144
4424
  }, {
4145
- icon: ClassNames.MaskIconWholeWord,
4425
+ icon: MaskIconWholeWord,
4146
4426
  flag: flags & MatchWholeWord$2 ? CheckBoxEnabled : CheckBoxDisabled,
4147
4427
  title: matchWholeWord(),
4148
4428
  name: MatchWholeWord
4149
4429
  }, {
4150
- icon: ClassNames.MaskIconRegex,
4430
+ icon: MaskIconRegex,
4151
4431
  flag: flags & UseRegularExpression$2 ? CheckBoxEnabled : CheckBoxDisabled,
4152
4432
  title: useRegularExpression(),
4153
4433
  name: UseRegularExpression
@@ -4161,13 +4441,13 @@ const getInputActionsInput = flags => {
4161
4441
 
4162
4442
  const getInputActionsReplace = (flags, matchCount) => {
4163
4443
  const inside = [{
4164
- icon: ClassNames.MaskIconPreserveCase,
4444
+ icon: MaskIconPreserveCase,
4165
4445
  flag: flags & PreserveCase$2 ? CheckBoxEnabled : CheckBoxDisabled,
4166
4446
  title: preserveCase(),
4167
4447
  name: PreserveCase
4168
4448
  }];
4169
4449
  const outside = [{
4170
- icon: ClassNames.MaskIconReplaceAll,
4450
+ icon: MaskIconReplaceAll,
4171
4451
  flag: matchCount === 0 ? ButtonDisabled : ButtonEnabled,
4172
4452
  title: replaceAll$1(),
4173
4453
  name: ReplaceAll
@@ -4194,8 +4474,8 @@ const getSearchPlaceholder = focus => {
4194
4474
 
4195
4475
  const getSearchToggleVirtualDom = replaceExpanded => {
4196
4476
  return [{
4197
- type: VirtualDomElements.Button,
4198
- className: mergeClassNames(ClassNames.IconButton, ClassNames.SearchToggleButton, replaceExpanded ? ClassNames.SearchToggleButtonExpanded : ''),
4477
+ type: Button$2,
4478
+ className: mergeClassNames(IconButton, SearchToggleButton, replaceExpanded ? SearchToggleButtonExpanded : ''),
4199
4479
  title: toggleReplace$1(),
4200
4480
  ariaLabel: toggleReplace$1(),
4201
4481
  ariaExpanded: Boolean(replaceExpanded),
@@ -4203,8 +4483,8 @@ const getSearchToggleVirtualDom = replaceExpanded => {
4203
4483
  'data-command': 'toggleReplace',
4204
4484
  name: ToggleReplace
4205
4485
  }, {
4206
- type: VirtualDomElements.Div,
4207
- className: mergeClassNames(ClassNames.MaskIcon, replaceExpanded ? ClassNames.MaskIconChevronDown : ClassNames.MaskIconChevronRight),
4486
+ type: Div,
4487
+ className: mergeClassNames(MaskIcon, replaceExpanded ? MaskIconChevronDown : MaskIconChevronRight),
4208
4488
  childCount: 0
4209
4489
  }];
4210
4490
  };
@@ -4216,13 +4496,13 @@ const getSearchHeaderTopVirtualDom = (flags, searchInputErrorMessage, matchCount
4216
4496
  const replacePlaceholder = getReplacePlaceholder(focus);
4217
4497
  const replaceExpanded = flags & ReplaceExpanded;
4218
4498
  const dom = [{
4219
- type: VirtualDomElements.Div,
4220
- className: ClassNames.SearchHeaderTop,
4499
+ type: Div,
4500
+ className: SearchHeaderTop,
4221
4501
  role: None,
4222
4502
  childCount: 2
4223
4503
  }, ...getSearchToggleVirtualDom(replaceExpanded), {
4224
- type: VirtualDomElements.Div,
4225
- className: ClassNames.SearchHeaderTopRight,
4504
+ type: Div,
4505
+ className: SearchHeaderTopRight,
4226
4506
  role: None,
4227
4507
  childCount: replaceExpanded ? 2 : 1
4228
4508
  }, ...getSearchFieldVirtualDom(SearchValue, searchPlaceholder, HandleInput2, inputActions.inside, inputActions.outside, '', Boolean(searchInputErrorMessage))];
@@ -4233,8 +4513,8 @@ const getSearchHeaderTopVirtualDom = (flags, searchInputErrorMessage, matchCount
4233
4513
  };
4234
4514
 
4235
4515
  const parentNode = {
4236
- type: VirtualDomElements.Div,
4237
- className: ClassNames.SearchHeader,
4516
+ type: Div,
4517
+ className: SearchHeader,
4238
4518
  role: None,
4239
4519
  childCount: 2,
4240
4520
  onClick: HandleHeaderClick2,
@@ -4252,8 +4532,8 @@ const getSearchInputErrorVirtualDom = errorMessage => {
4252
4532
  return [];
4253
4533
  }
4254
4534
  return [{
4255
- type: VirtualDomElements.Div,
4256
- className: ClassNames.SearchInputError,
4535
+ type: Div,
4536
+ className: SearchInputError,
4257
4537
  role: Alert,
4258
4538
  childCount: 1
4259
4539
  }, text(errorMessage)];
@@ -4266,16 +4546,16 @@ const getScrollBarVirtualDom = (scrollBarHeight, scrollBarY, scrollBarValue) =>
4266
4546
  return [];
4267
4547
  }
4268
4548
  return [{
4269
- type: VirtualDomElements.Div,
4270
- className: mergeClassNames(ClassNames.ScrollBar, ClassNames.ScrollBarVertical),
4549
+ type: Div,
4550
+ className: mergeClassNames(ScrollBar$1, ScrollBarVertical),
4271
4551
  childCount: 1,
4272
4552
  onPointerDown: HandleScrollBarPointerDown,
4273
4553
  role: ScrollBar,
4274
4554
  ariaControls: TreeItems,
4275
4555
  ariaValueNow: scrollBarValue
4276
4556
  }, {
4277
- type: VirtualDomElements.Div,
4278
- className: ClassNames.ScrollBarThumb,
4557
+ type: Div,
4558
+ className: ScrollBarThumb,
4279
4559
  height: scrollBarHeight,
4280
4560
  translate: `0 ${scrollBarY}px`,
4281
4561
  childCount: 0
@@ -4296,8 +4576,8 @@ const getAriaExpanded = expanded => {
4296
4576
  };
4297
4577
 
4298
4578
  const badge = {
4299
- type: VirtualDomElements.Div,
4300
- className: mergeClassNames(ClassNames.Badge, ClassNames.SourceControlBadge),
4579
+ type: Div,
4580
+ className: mergeClassNames(Badge, SourceControlBadge),
4301
4581
  childCount: 1
4302
4582
  };
4303
4583
  const getBadgeVirtualDom = badgeText => {
@@ -4308,13 +4588,13 @@ const getBadgeVirtualDom = badgeText => {
4308
4588
  };
4309
4589
 
4310
4590
  const chevronDownVirtualDom = {
4311
- type: VirtualDomElements.Div,
4312
- className: mergeClassNames(ClassNames.Chevron, ClassNames.MaskIconChevronDown),
4591
+ type: Div,
4592
+ className: mergeClassNames(Chevron, MaskIconChevronDown),
4313
4593
  childCount: 0
4314
4594
  };
4315
4595
  const chevronRightVirtualDom = {
4316
- type: VirtualDomElements.Div,
4317
- className: mergeClassNames(ClassNames.Chevron, ClassNames.MaskIconChevronRight),
4596
+ type: Div,
4597
+ className: mergeClassNames(Chevron, MaskIconChevronRight),
4318
4598
  childCount: 0
4319
4599
  };
4320
4600
 
@@ -4331,8 +4611,8 @@ const getChevronVirtualDom = expanded => {
4331
4611
 
4332
4612
  const getFileIconVirtualDom = icon => {
4333
4613
  return {
4334
- type: VirtualDomElements.Img,
4335
- className: ClassNames.FileIcon,
4614
+ type: Img,
4615
+ className: FileIcon,
4336
4616
  src: icon,
4337
4617
  role: None,
4338
4618
  childCount: 0
@@ -4347,23 +4627,23 @@ const getIconsVirtualDom = icon => {
4347
4627
  };
4348
4628
 
4349
4629
  const deleted = {
4350
- type: VirtualDomElements.Del,
4351
- className: ClassNames.HighlightDeleted,
4630
+ type: Del,
4631
+ className: HighlightDeleted,
4352
4632
  childCount: 1
4353
4633
  };
4354
4634
  const inserted = {
4355
- type: VirtualDomElements.Ins,
4356
- className: ClassNames.HighlightInserted,
4635
+ type: Ins,
4636
+ className: HighlightInserted,
4357
4637
  childCount: 1
4358
4638
  };
4359
4639
  const highlighted = {
4360
- type: VirtualDomElements.Span,
4361
- className: ClassNames.Highlight,
4640
+ type: Span,
4641
+ className: Highlight,
4362
4642
  childCount: 1
4363
4643
  };
4364
4644
  const label1 = {
4365
- type: VirtualDomElements.Div,
4366
- className: mergeClassNames(ClassNames.Label, ClassNames.Grow),
4645
+ type: Div,
4646
+ className: mergeClassNames(Label, Grow),
4367
4647
  childCount: 1
4368
4648
  };
4369
4649
  const label3 = {
@@ -4410,12 +4690,12 @@ const getChildCount = (icon, expanded, badgeText) => {
4410
4690
  const getSearchRemoveVirtualDom = () => {
4411
4691
  // TODO add title/aria label
4412
4692
  const dom = [{
4413
- type: VirtualDomElements.Div,
4414
- className: ClassNames.SearchRemove,
4693
+ type: Div,
4694
+ className: SearchRemove,
4415
4695
  childCount: 1
4416
4696
  }, {
4417
- type: VirtualDomElements.Div,
4418
- className: ClassNames.CloseMaskIcon,
4697
+ type: Div,
4698
+ className: CloseMaskIcon,
4419
4699
  childCount: 0
4420
4700
  }];
4421
4701
  return dom;
@@ -4423,9 +4703,9 @@ const getSearchRemoveVirtualDom = () => {
4423
4703
 
4424
4704
  const getSearchResultClassName = focused => {
4425
4705
  if (focused) {
4426
- return ClassNames.TreeItem + ' ' + ClassNames.TreeItemActive;
4706
+ return TreeItem$1 + ' ' + TreeItemActive;
4427
4707
  }
4428
- return ClassNames.TreeItem;
4708
+ return TreeItem$1;
4429
4709
  };
4430
4710
 
4431
4711
  const PaddingRight = '12px';
@@ -4447,7 +4727,7 @@ const getSearchResultVirtualDom = rowInfo => {
4447
4727
  } = rowInfo;
4448
4728
  const childCount = getChildCount(icon, expanded, badgeText);
4449
4729
  const dom = [{
4450
- type: VirtualDomElements.Div,
4730
+ type: Div,
4451
4731
  role: TreeItem,
4452
4732
  className: getSearchResultClassName(focused),
4453
4733
  title,
@@ -4467,8 +4747,8 @@ const getSearchResultVirtualDom = rowInfo => {
4467
4747
  const getTreeItemsVirtualDom = (visibleItems, deltaY, itemHeight) => {
4468
4748
  const pixelOffset = deltaY % itemHeight;
4469
4749
  return [{
4470
- type: VirtualDomElements.Div,
4471
- className: ClassNames.TreeItems,
4750
+ type: Div,
4751
+ className: TreeItems$1,
4472
4752
  childCount: visibleItems.length,
4473
4753
  onClick: HandleClick,
4474
4754
  onBlur: HandleListBlur,
@@ -4482,8 +4762,8 @@ const getTreeItemsVirtualDom = (visibleItems, deltaY, itemHeight) => {
4482
4762
  const getSearchResultsVirtualDom = (visibleItems, focusOutline, scrollbarHeight, scrollBarY, scrollBarValue, deltaY, itemHeight) => {
4483
4763
  const childCount = scrollbarHeight === 0 ? 1 : 2;
4484
4764
  return [{
4485
- type: VirtualDomElements.Div,
4486
- className: mergeClassNames(ClassNames.Viewlet, ClassNames.List, ClassNames.Tree, focusOutline ? ClassNames.FocusOutline : ClassNames.Empty),
4765
+ type: Div,
4766
+ className: mergeClassNames(Viewlet, List$1, Tree$1, focusOutline ? FocusOutline : Empty),
4487
4767
  role: Tree,
4488
4768
  tabIndex: 0,
4489
4769
  childCount
@@ -4494,8 +4774,8 @@ const getSearchVirtualDom = (visibleItems, flags, message, focusOutline, searchI
4494
4774
  const errorDom = getSearchInputErrorVirtualDom(searchInputErrorMessage);
4495
4775
  const childCount = 2 + (errorDom.length > 0 ? 1 : 0);
4496
4776
  return [{
4497
- type: VirtualDomElements.Div,
4498
- className: mergeClassNames(ClassNames.Viewlet, ClassNames.Search),
4777
+ type: Div,
4778
+ className: mergeClassNames(Viewlet, Search$2),
4499
4779
  childCount
4500
4780
  }, ...getSearchHeaderVirtualDom(flags, message, searchInputErrorMessage, matchCount, focus), ...errorDom, ...getSearchResultsVirtualDom(visibleItems, focusOutline, scrollBarHeight, scrollBarY, scrollBarValue, deltaY, itemHeight)];
4501
4781
  };
@@ -4561,10 +4841,10 @@ const render2 = (uid, diffResult) => {
4561
4841
 
4562
4842
  const Button = 1;
4563
4843
 
4564
- const getIconVirtualDom = (icon, type = VirtualDomElements.Div) => {
4844
+ const getIconVirtualDom = (icon, type = Div) => {
4565
4845
  return {
4566
4846
  type,
4567
- className: mergeClassNames(ClassNames.MaskIcon, `MaskIcon${icon}`),
4847
+ className: mergeClassNames(MaskIcon, `MaskIcon${icon}`),
4568
4848
  role: None,
4569
4849
  childCount: 0
4570
4850
  };
@@ -4577,8 +4857,8 @@ const getActionButtonVirtualDom = action => {
4577
4857
  command
4578
4858
  } = action;
4579
4859
  return [{
4580
- type: VirtualDomElements.Button,
4581
- className: ClassNames.IconButton,
4860
+ type: Button$2,
4861
+ className: IconButton,
4582
4862
  title: id,
4583
4863
  'data-command': command,
4584
4864
  childCount: 1
@@ -4596,8 +4876,8 @@ const getActionVirtualDom = action => {
4596
4876
 
4597
4877
  const getActionsVirtualDom = actions => {
4598
4878
  return [{
4599
- type: VirtualDomElements.Div,
4600
- className: ClassNames.Actions,
4879
+ type: Div,
4880
+ className: Actions,
4601
4881
  role: ToolBar,
4602
4882
  childCount: actions.length
4603
4883
  }, ...actions.flatMap(getActionVirtualDom)];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/text-search-worker",
3
- "version": "5.4.0",
3
+ "version": "5.6.0",
4
4
  "description": "Text Search Worker",
5
5
  "keywords": [
6
6
  "text-search"