@lvce-editor/text-search-worker 5.5.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
@@ -960,10 +960,10 @@ const send = (transport, method, ...params) => {
960
960
  const message = create$4$1(method, params);
961
961
  transport.send(message);
962
962
  };
963
- const invoke$2 = (ipc, method, ...params) => {
963
+ const invoke$3 = (ipc, method, ...params) => {
964
964
  return invokeHelper(ipc, method, params, false);
965
965
  };
966
- const invokeAndTransfer = (ipc, method, ...params) => {
966
+ const invokeAndTransfer$1 = (ipc, method, ...params) => {
967
967
  return invokeHelper(ipc, method, params, true);
968
968
  };
969
969
 
@@ -999,10 +999,10 @@ const createRpc = ipc => {
999
999
  send(ipc, method, ...params);
1000
1000
  },
1001
1001
  invoke(method, ...params) {
1002
- return invoke$2(ipc, method, ...params);
1002
+ return invoke$3(ipc, method, ...params);
1003
1003
  },
1004
1004
  invokeAndTransfer(method, ...params) {
1005
- return invokeAndTransfer(ipc, method, ...params);
1005
+ return invokeAndTransfer$1(ipc, method, ...params);
1006
1006
  },
1007
1007
  async dispose() {
1008
1008
  await ipc?.dispose();
@@ -1136,6 +1136,22 @@ const WebWorkerRpcClient = {
1136
1136
  __proto__: null,
1137
1137
  create: create$4
1138
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
+ };
1139
1155
 
1140
1156
  const toCommandId = key => {
1141
1157
  const dotIndex = key.indexOf('.');
@@ -1224,7 +1240,7 @@ const terminate = () => {
1224
1240
  const User = 1;
1225
1241
  const Script = 2;
1226
1242
 
1227
- const Empty = 0;
1243
+ const Empty$1 = 0;
1228
1244
  const FocusIgnoreFiles = 1012;
1229
1245
  const FocusSearch = 1013;
1230
1246
  const FocusSearchExcludeInput = 1008;
@@ -1283,16 +1299,86 @@ const collapseDetails = state => {
1283
1299
  };
1284
1300
  };
1285
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
+
1286
1374
  const rpcs = Object.create(null);
1287
- const set$g = (id, rpc) => {
1375
+ const set$3 = (id, rpc) => {
1288
1376
  rpcs[id] = rpc;
1289
1377
  };
1290
1378
  const get$2 = id => {
1291
1379
  return rpcs[id];
1292
1380
  };
1293
1381
 
1294
- /* eslint-disable @typescript-eslint/explicit-function-return-type */
1295
-
1296
1382
  const create$2 = rpcId => {
1297
1383
  return {
1298
1384
  // @ts-ignore
@@ -1308,7 +1394,7 @@ const create$2 = rpcId => {
1308
1394
  return rpc.invokeAndTransfer(method, ...params);
1309
1395
  },
1310
1396
  set(rpc) {
1311
- set$g(rpcId, rpc);
1397
+ set$3(rpcId, rpc);
1312
1398
  },
1313
1399
  async dispose() {
1314
1400
  const rpc = get$2(rpcId);
@@ -1316,46 +1402,362 @@ const create$2 = rpcId => {
1316
1402
  }
1317
1403
  };
1318
1404
  };
1319
- const RendererWorker$1 = 1;
1320
- const SearchProcess$1 = 77;
1321
- const RpcId = {
1322
- __proto__: null,
1323
- SearchProcess: SearchProcess$1};
1405
+
1324
1406
  const {
1325
- invoke: invoke$3,
1326
- invokeAndTransfer: invokeAndTransfer$3,
1327
- 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
+ };
1328
1418
  const showContextMenu$1 = async (x, y, id, ...args) => {
1329
- 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);
1330
1485
  };
1331
1486
  const getFileIcon$2 = async options => {
1332
- 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);
1333
1513
  };
1334
1514
  const sendMessagePortToSearchProcess$1 = async port => {
1335
- 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');
1336
1527
  };
1337
1528
  const writeClipBoardText$1 = async text => {
1338
- 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);
1339
1586
  };
1340
1587
  const openUri$2 = async (uri, focus, options) => {
1341
- 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);
1342
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
+
1343
1675
  const RendererWorker = {
1344
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,
1345
1694
  getFileIcon: getFileIcon$2,
1346
- 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,
1347
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,
1348
1736
  sendMessagePortToSearchProcess: sendMessagePortToSearchProcess$1,
1349
- set: set$3,
1737
+ sendMessagePortToSyntaxHighlightingWorker,
1738
+ set: set$2,
1739
+ setAdditionalFocus,
1740
+ setColorTheme,
1741
+ setExtensionsSearchValue,
1742
+ setFocus,
1743
+ setWebViewPort,
1744
+ setWorkspacePath,
1350
1745
  showContextMenu: showContextMenu$1,
1746
+ showErrorDialog,
1747
+ showMessageBox,
1748
+ showSaveFilePicker,
1749
+ uninstallExtension,
1750
+ unregisterWebViewInterceptor,
1751
+ writeClipBoardImage,
1351
1752
  writeClipBoardText: writeClipBoardText$1
1352
1753
  };
1754
+
1353
1755
  const createLazyRpc = rpcId => {
1354
1756
  let rpcPromise;
1355
1757
  let factory;
1356
1758
  const createRpc = async () => {
1357
1759
  const rpc = await factory();
1358
- set$g(rpcId, rpc);
1760
+ set$3(rpcId, rpc);
1359
1761
  };
1360
1762
  const ensureRpc = async () => {
1361
1763
  if (!rpcPromise) {
@@ -1406,7 +1808,7 @@ const {
1406
1808
  wrapCommand
1407
1809
  } = create$3();
1408
1810
 
1409
- const List$1 = 1;
1811
+ const List = 1;
1410
1812
 
1411
1813
  const create$1 = ({
1412
1814
  itemHeight,
@@ -1458,7 +1860,7 @@ const create = (uid, x, y, width, height, workspacePath, assetDir, itemHeight, v
1458
1860
  workspacePath: workspacePath,
1459
1861
  includeValue: '',
1460
1862
  excludeValue: '',
1461
- focus: Empty,
1863
+ focus: Empty$1,
1462
1864
  loaded: false,
1463
1865
  message: '',
1464
1866
  collapsedPaths: [],
@@ -1475,7 +1877,7 @@ const create = (uid, x, y, width, height, workspacePath, assetDir, itemHeight, v
1475
1877
  searchInputErrorMessage: '',
1476
1878
  history: [],
1477
1879
  historyIndex: -1,
1478
- viewMode: List$1,
1880
+ viewMode: List,
1479
1881
  incrementalSearch: false,
1480
1882
  searchId: '',
1481
1883
  useChevrons: true,
@@ -1594,7 +1996,7 @@ const ReplaceAll$1 = 'Replace All';
1594
1996
  const ReplacedManyOccurrencesInManyFiles = "Replaced {PH1} occurrences across {PH2} files with '{PH3}'";
1595
1997
  const ReplacedOneOccurrenceInOneFile = "Replaced 1 occurrence across 1 file with '{PH1}'";
1596
1998
  const ReplaceForHistory = 'Replace (⇅ for history)';
1597
- const Search$2 = 'Search';
1999
+ const Search$1 = 'Search';
1598
2000
  const SearchForHistory = 'Search (⇅ for history)';
1599
2001
  const SearchOnlyOpenEditors$1 = 'Search Only Open Editors';
1600
2002
  const ToggleReplace$1 = 'Toggle Replace';
@@ -1731,7 +2133,7 @@ const searchForHistory = () => {
1731
2133
  return i18nString(SearchForHistory);
1732
2134
  };
1733
2135
  const search = () => {
1734
- return i18nString(Search$2);
2136
+ return i18nString(Search$1);
1735
2137
  };
1736
2138
  const replaceForHistory = () => {
1737
2139
  return i18nString(ReplaceForHistory);
@@ -2316,7 +2718,7 @@ const getRipGrepArgs = ({
2316
2718
  const {
2317
2719
  invoke,
2318
2720
  setFactory
2319
- } = createLazyRpc(RpcId.SearchProcess);
2721
+ } = createLazyRpc(SearchProcess);
2320
2722
 
2321
2723
  const waitForNextFrame = async () => {
2322
2724
  const {
@@ -3543,144 +3945,10 @@ const createViewModel = state => {
3543
3945
  };
3544
3946
  };
3545
3947
 
3546
- const Actions = 'Actions';
3547
- const Badge = 'Badge';
3548
- const Chevron = 'Chevron';
3549
- const CloseMaskIcon = 'MaskIcon MaskIconClose';
3550
- const Empty$1 = '';
3551
- const FileIcon = 'FileIcon';
3552
- const FocusOutline = 'FocusOutline';
3553
- const Grow = 'Grow';
3554
- const Highlight = 'Highlight';
3555
- const HighlightDeleted = 'HighlightDeleted';
3556
- const HighlightInserted = 'HighlightInserted';
3557
- const IconButton = 'IconButton';
3558
- const Label$1 = 'Label';
3559
- const List = 'List';
3560
- const MaskIcon = 'MaskIcon';
3561
- const MaskIconBook = 'MaskIconBook';
3562
- const MaskIconCaseSensitive = 'MaskIconCaseSensitive';
3563
- const MaskIconChevronDown = 'MaskIconChevronDown';
3564
- const MaskIconChevronRight = 'MaskIconChevronRight';
3565
- const MaskIconEllipsis = 'MaskIconEllipsis';
3566
- const MaskIconExclude = 'MaskIconExclude';
3567
- const MaskIconPreserveCase = 'MaskIconPreserveCase';
3568
- const MaskIconRegex = 'MaskIconRegex';
3569
- const MaskIconReplaceAll = 'MaskIconReplaceAll';
3570
- const MaskIconWholeWord = 'MaskIconWholeWord';
3571
- const MultilineInputBox = 'MultilineInputBox';
3572
- const ScrollBar$1 = 'ScrollBar';
3573
- const ScrollBarThumb = 'ScrollBarThumb';
3574
- const ScrollBarVertical = 'ScrollBarVertical';
3575
- const Search$1 = 'Search';
3576
- const SearchField = 'SearchField';
3577
- const SearchFieldButton = 'SearchFieldButton';
3578
- const SearchFieldButtonChecked = 'SearchFieldButtonChecked';
3579
- const SearchFieldButtonDisabled = 'SearchFieldButtonDisabled';
3580
- const SearchFieldButtons = 'SearchFieldButtons';
3581
- const SearchFieldContainer = 'SearchFieldContainer';
3582
- const SearchFieldError = 'SearchFieldError';
3583
- const SearchHeader = 'SearchHeader';
3584
- const SearchHeaderDetails = 'SearchHeaderDetails';
3585
- const SearchHeaderDetailsExpanded = 'SearchHeaderDetailsExpanded';
3586
- const SearchHeaderDetailsExpandedTop = 'SearchHeaderDetailsExpandedTop';
3587
- const SearchHeaderDetailsHeading = 'SearchHeaderDetailsHeading';
3588
- const SearchHeaderTop = 'SearchHeaderTop';
3589
- const SearchHeaderTopRight = 'SearchHeaderTopRight';
3590
- const SearchInputError = 'SearchInputError';
3591
- const SearchRemove = 'SearchRemove';
3592
- const SearchToggleButton = 'SearchToggleButton';
3593
- const SearchToggleButtonExpanded = 'SearchToggleButtonExpanded';
3594
- const SourceControlBadge = 'SourceControlBadge';
3595
- const ToggleDetails = 'ToggleDetails';
3596
- const Tree$1 = 'Tree';
3597
- const TreeItem$1 = 'TreeItem';
3598
- const TreeItemActive = 'TreeItemActive';
3599
- const TreeItems$1 = 'TreeItems';
3600
- const Viewlet = 'Viewlet';
3601
- const ViewletSearchMessage = 'ViewletSearchMessage';
3602
- const ViewletSearchMessageIndented = 'ViewletSearchMessageIndented';
3603
- const ClassNames = {
3604
- __proto__: null,
3605
- Actions,
3606
- Badge,
3607
- Chevron,
3608
- CloseMaskIcon,
3609
- Empty: Empty$1,
3610
- FileIcon,
3611
- FocusOutline,
3612
- Grow,
3613
- Highlight,
3614
- HighlightDeleted,
3615
- HighlightInserted,
3616
- IconButton,
3617
- Label: Label$1,
3618
- List,
3619
- MaskIcon,
3620
- MaskIconBook,
3621
- MaskIconCaseSensitive,
3622
- MaskIconChevronDown,
3623
- MaskIconChevronRight,
3624
- MaskIconEllipsis,
3625
- MaskIconExclude,
3626
- MaskIconPreserveCase,
3627
- MaskIconRegex,
3628
- MaskIconReplaceAll,
3629
- MaskIconWholeWord,
3630
- MultilineInputBox,
3631
- ScrollBar: ScrollBar$1,
3632
- ScrollBarThumb,
3633
- ScrollBarVertical,
3634
- Search: Search$1,
3635
- SearchField,
3636
- SearchFieldButton,
3637
- SearchFieldButtonChecked,
3638
- SearchFieldButtonDisabled,
3639
- SearchFieldButtons,
3640
- SearchFieldContainer,
3641
- SearchFieldError,
3642
- SearchHeader,
3643
- SearchHeaderDetails,
3644
- SearchHeaderDetailsExpanded,
3645
- SearchHeaderDetailsExpandedTop,
3646
- SearchHeaderDetailsHeading,
3647
- SearchHeaderTop,
3648
- SearchHeaderTopRight,
3649
- SearchInputError,
3650
- SearchRemove,
3651
- SearchToggleButton,
3652
- SearchToggleButtonExpanded,
3653
- SourceControlBadge,
3654
- ToggleDetails,
3655
- Tree: Tree$1,
3656
- TreeItem: TreeItem$1,
3657
- TreeItemActive,
3658
- TreeItems: TreeItems$1,
3659
- Viewlet,
3660
- ViewletSearchMessage,
3661
- ViewletSearchMessageIndented};
3662
3948
  const mergeClassNames = (...classNames) => {
3663
3949
  return classNames.filter(Boolean).join(' ');
3664
3950
  };
3665
- const Button$2 = 1;
3666
- const Div = 4;
3667
- const Span = 8;
3668
- const Text = 12;
3669
- const Img = 17;
3670
- const Ins = 20;
3671
- const Del = 21;
3672
- const H4 = 24;
3673
- const TextArea = 62;
3674
- const VirtualDomElements = {
3675
- __proto__: null,
3676
- Button: Button$2,
3677
- Del,
3678
- Div,
3679
- H4,
3680
- Img,
3681
- Ins,
3682
- Span,
3683
- TextArea};
3951
+
3684
3952
  const text = data => {
3685
3953
  return {
3686
3954
  type: Text,
@@ -3688,6 +3956,7 @@ const text = data => {
3688
3956
  childCount: 0
3689
3957
  };
3690
3958
  };
3959
+
3691
3960
  const SetText = 1;
3692
3961
  const SetAttribute = 3;
3693
3962
  const RemoveAttribute = 4;
@@ -3696,6 +3965,7 @@ const NavigateChild = 7;
3696
3965
  const NavigateParent = 8;
3697
3966
  const RemoveChild = 9;
3698
3967
  const NavigateSibling = 10;
3968
+
3699
3969
  const applyPendingPatches = (patches, pendingPatches, skip) => {
3700
3970
  for (let k = 0; k < pendingPatches.length - skip; k += 2) {
3701
3971
  const type = pendingPatches[k];
@@ -3713,13 +3983,16 @@ const applyPendingPatches = (patches, pendingPatches, skip) => {
3713
3983
  }
3714
3984
  pendingPatches.length = 0;
3715
3985
  };
3986
+
3716
3987
  const isKey = key => {
3717
3988
  return key !== 'type' && key !== 'childCount';
3718
3989
  };
3990
+
3719
3991
  const getKeys = node => {
3720
3992
  const keys = Object.keys(node).filter(isKey);
3721
3993
  return keys;
3722
3994
  };
3995
+
3723
3996
  const getTotalChildCount = (nodes, index) => {
3724
3997
  let i = index;
3725
3998
  let pending = 1;
@@ -3731,6 +4004,7 @@ const getTotalChildCount = (nodes, index) => {
3731
4004
  }
3732
4005
  return i - index;
3733
4006
  };
4007
+
3734
4008
  const diff = (oldNodes, newNodes) => {
3735
4009
  const patches = [];
3736
4010
  const pendingPatches = [];
@@ -3742,7 +4016,6 @@ const diff = (oldNodes, newNodes) => {
3742
4016
  while (i < oldNodes.length && j < newNodes.length) {
3743
4017
  const oldNode = oldNodes[i];
3744
4018
  const newNode = newNodes[j];
3745
-
3746
4019
  // TODO maybe don't have the current element in indexstack
3747
4020
  if (siblingOffset === maxSiblingOffset) {
3748
4021
  indexStack.pop();
@@ -3928,8 +4201,8 @@ const HandleWheel = 'handleWheel';
3928
4201
 
3929
4202
  const getSearchDetailsToggleVirtualDom = () => {
3930
4203
  return [{
3931
- type: VirtualDomElements.Div,
3932
- className: ClassNames.ToggleDetails,
4204
+ type: Div,
4205
+ className: ToggleDetails,
3933
4206
  role: Button$1,
3934
4207
  tabIndex: 0,
3935
4208
  ariaLabel: toggleSearchDetails(),
@@ -3937,21 +4210,21 @@ const getSearchDetailsToggleVirtualDom = () => {
3937
4210
  name: ToggleSearchDetails,
3938
4211
  childCount: 1
3939
4212
  }, {
3940
- type: VirtualDomElements.Div,
3941
- className: mergeClassNames(ClassNames.MaskIcon, ClassNames.MaskIconEllipsis),
4213
+ type: Div,
4214
+ className: mergeClassNames(MaskIcon, MaskIconEllipsis),
3942
4215
  childCount: 0
3943
4216
  }];
3944
4217
  };
3945
4218
 
3946
4219
  const getClassName = indented => {
3947
4220
  if (indented) {
3948
- return mergeClassNames(ClassNames.ViewletSearchMessage, ClassNames.ViewletSearchMessageIndented);
4221
+ return mergeClassNames(ViewletSearchMessage, ViewletSearchMessageIndented);
3949
4222
  }
3950
- return ClassNames.ViewletSearchMessage;
4223
+ return ViewletSearchMessage;
3951
4224
  };
3952
4225
  const getSearchMessageVirtualDom = (message, indented) => {
3953
4226
  return [{
3954
- type: VirtualDomElements.Div,
4227
+ type: Div,
3955
4228
  className: getClassName(indented),
3956
4229
  role: Status,
3957
4230
  tabIndex: 0,
@@ -3961,8 +4234,8 @@ const getSearchMessageVirtualDom = (message, indented) => {
3961
4234
 
3962
4235
  const getSearchHeaderDetailsCollapsedVirtualDom = message => {
3963
4236
  return [{
3964
- type: VirtualDomElements.Div,
3965
- className: ClassNames.SearchHeaderDetails,
4237
+ type: Div,
4238
+ className: SearchHeaderDetails,
3966
4239
  childCount: 2
3967
4240
  }, ...getSearchMessageVirtualDom(message, true), ...getSearchDetailsToggleVirtualDom()];
3968
4241
  };
@@ -3974,7 +4247,7 @@ const ButtonDisabled = 3;
3974
4247
 
3975
4248
  const getInputActionsExclude = flags => {
3976
4249
  const inside = [{
3977
- icon: ClassNames.MaskIconExclude,
4250
+ icon: MaskIconExclude,
3978
4251
  title: useExcludeSettings(),
3979
4252
  command: 'toggleUseExcludeSettings',
3980
4253
  flag: flags & UseIgnoreFiles ? CheckBoxEnabled : CheckBoxDisabled,
@@ -3989,7 +4262,7 @@ const getInputActionsExclude = flags => {
3989
4262
 
3990
4263
  const getInputActionsInclude = flags => {
3991
4264
  const inside = [{
3992
- icon: ClassNames.MaskIconBook,
4265
+ icon: MaskIconBook,
3993
4266
  title: searchOnlyOpenEditors(),
3994
4267
  command: 'searchOnlyOpenEditors',
3995
4268
  flag: flags & OpenEditors ? CheckBoxEnabled : CheckBoxDisabled,
@@ -4003,7 +4276,7 @@ const getInputActionsInclude = flags => {
4003
4276
  };
4004
4277
 
4005
4278
  const getSearchFieldButtonClassName = flag => {
4006
- return mergeClassNames(ClassNames.SearchFieldButton, flag === CheckBoxEnabled ? ClassNames.SearchFieldButtonChecked : '', flag === ButtonDisabled ? ClassNames.SearchFieldButtonDisabled : '');
4279
+ return mergeClassNames(SearchFieldButton, flag === CheckBoxEnabled ? SearchFieldButtonChecked : '', flag === ButtonDisabled ? SearchFieldButtonDisabled : '');
4007
4280
  };
4008
4281
 
4009
4282
  // TODO maybe move logic to viewmodel, which returns ariaChecked 1 | 2 | 3
@@ -4047,7 +4320,7 @@ const getSearchFieldButtonVirtualDom = button => {
4047
4320
  const role = getRole(flag);
4048
4321
  const disabled = getDisabled(flag);
4049
4322
  return [{
4050
- type: VirtualDomElements.Button,
4323
+ type: Button$2,
4051
4324
  className: getSearchFieldButtonClassName(flag),
4052
4325
  name,
4053
4326
  title,
@@ -4057,8 +4330,8 @@ const getSearchFieldButtonVirtualDom = button => {
4057
4330
  tabIndex: 0,
4058
4331
  childCount: 1
4059
4332
  }, {
4060
- type: VirtualDomElements.Span,
4061
- className: mergeClassNames(ClassNames.MaskIcon, icon),
4333
+ type: Span,
4334
+ className: mergeClassNames(MaskIcon, icon),
4062
4335
  childCount: 0
4063
4336
  }];
4064
4337
  };
@@ -4072,8 +4345,8 @@ const getOutSideButtonsDom = outsideButtons => {
4072
4345
  }
4073
4346
  return {
4074
4347
  preNodes: [{
4075
- type: VirtualDomElements.Div,
4076
- className: ClassNames.SearchFieldContainer,
4348
+ type: Div,
4349
+ className: SearchFieldContainer,
4077
4350
  role: None,
4078
4351
  childCount: 1 + outsideButtons.length
4079
4352
  }],
@@ -4086,15 +4359,15 @@ const getSearchFieldVirtualDom = (name, placeholder, onInput, insideButtons, out
4086
4359
  preNodes,
4087
4360
  postNodes
4088
4361
  } = getOutSideButtonsDom(outsideButtons);
4089
- const searchFieldClassName = hasError ? mergeClassNames(ClassNames.SearchField, ClassNames.SearchFieldError) : ClassNames.SearchField;
4362
+ const searchFieldClassName = hasError ? mergeClassNames(SearchField, SearchFieldError) : SearchField;
4090
4363
  const dom = [...preNodes, {
4091
- type: VirtualDomElements.Div,
4364
+ type: Div,
4092
4365
  className: searchFieldClassName,
4093
4366
  role: None,
4094
4367
  childCount: 2
4095
4368
  }, {
4096
- type: VirtualDomElements.TextArea,
4097
- className: ClassNames.MultilineInputBox,
4369
+ type: TextArea,
4370
+ className: MultilineInputBox,
4098
4371
  spellcheck: false,
4099
4372
  autocapitalize: 'off',
4100
4373
  autocorrect: 'off',
@@ -4104,8 +4377,8 @@ const getSearchFieldVirtualDom = (name, placeholder, onInput, insideButtons, out
4104
4377
  onFocus,
4105
4378
  childCount: 0
4106
4379
  }, {
4107
- type: VirtualDomElements.Div,
4108
- className: ClassNames.SearchFieldButtons,
4380
+ type: Div,
4381
+ className: SearchFieldButtons,
4109
4382
  childCount: insideButtons.length
4110
4383
  }, ...insideButtons.flatMap(getSearchFieldButtonVirtualDom), ...postNodes];
4111
4384
  return dom;
@@ -4117,20 +4390,20 @@ const getSearchHeaderDetailsExpandedVirtualDom = (flags, message) => {
4117
4390
  const includePlaceholder = include();
4118
4391
  const excludePlaceholder = exclude();
4119
4392
  return [{
4120
- type: VirtualDomElements.Div,
4121
- className: ClassNames.SearchHeaderDetailsExpanded,
4393
+ type: Div,
4394
+ className: SearchHeaderDetailsExpanded,
4122
4395
  childCount: 5
4123
4396
  }, {
4124
- type: VirtualDomElements.Div,
4125
- className: ClassNames.SearchHeaderDetailsExpandedTop,
4397
+ type: Div,
4398
+ className: SearchHeaderDetailsExpandedTop,
4126
4399
  childCount: 2
4127
4400
  }, ...getSearchDetailsToggleVirtualDom(), {
4128
- type: VirtualDomElements.H4,
4129
- className: ClassNames.SearchHeaderDetailsHeading,
4401
+ type: H4,
4402
+ className: SearchHeaderDetailsHeading,
4130
4403
  childCount: 1
4131
4404
  }, text(filesToInclude()), ...getSearchFieldVirtualDom(FilesToInclude, includePlaceholder, HandleInput2, includeButtons.inside, includeButtons.outside), {
4132
- type: VirtualDomElements.H4,
4133
- className: ClassNames.SearchHeaderDetailsHeading,
4405
+ type: H4,
4406
+ className: SearchHeaderDetailsHeading,
4134
4407
  childCount: 1
4135
4408
  }, text(filesToExclude()), ...getSearchFieldVirtualDom(FilesToExclude, excludePlaceholder, HandleInput2, excludeButtons.inside, excludeButtons.outside), ...getSearchMessageVirtualDom(message, false)];
4136
4409
  };
@@ -4144,17 +4417,17 @@ const getSearchHeaderDetailsVirtualDom = (flags, message) => {
4144
4417
 
4145
4418
  const getInputActionsInput = flags => {
4146
4419
  const inside = [{
4147
- icon: ClassNames.MaskIconCaseSensitive,
4420
+ icon: MaskIconCaseSensitive,
4148
4421
  flag: flags & MatchCase$2 ? CheckBoxEnabled : CheckBoxDisabled,
4149
4422
  title: matchCase(),
4150
4423
  name: MatchCase
4151
4424
  }, {
4152
- icon: ClassNames.MaskIconWholeWord,
4425
+ icon: MaskIconWholeWord,
4153
4426
  flag: flags & MatchWholeWord$2 ? CheckBoxEnabled : CheckBoxDisabled,
4154
4427
  title: matchWholeWord(),
4155
4428
  name: MatchWholeWord
4156
4429
  }, {
4157
- icon: ClassNames.MaskIconRegex,
4430
+ icon: MaskIconRegex,
4158
4431
  flag: flags & UseRegularExpression$2 ? CheckBoxEnabled : CheckBoxDisabled,
4159
4432
  title: useRegularExpression(),
4160
4433
  name: UseRegularExpression
@@ -4168,13 +4441,13 @@ const getInputActionsInput = flags => {
4168
4441
 
4169
4442
  const getInputActionsReplace = (flags, matchCount) => {
4170
4443
  const inside = [{
4171
- icon: ClassNames.MaskIconPreserveCase,
4444
+ icon: MaskIconPreserveCase,
4172
4445
  flag: flags & PreserveCase$2 ? CheckBoxEnabled : CheckBoxDisabled,
4173
4446
  title: preserveCase(),
4174
4447
  name: PreserveCase
4175
4448
  }];
4176
4449
  const outside = [{
4177
- icon: ClassNames.MaskIconReplaceAll,
4450
+ icon: MaskIconReplaceAll,
4178
4451
  flag: matchCount === 0 ? ButtonDisabled : ButtonEnabled,
4179
4452
  title: replaceAll$1(),
4180
4453
  name: ReplaceAll
@@ -4201,8 +4474,8 @@ const getSearchPlaceholder = focus => {
4201
4474
 
4202
4475
  const getSearchToggleVirtualDom = replaceExpanded => {
4203
4476
  return [{
4204
- type: VirtualDomElements.Button,
4205
- className: mergeClassNames(ClassNames.IconButton, ClassNames.SearchToggleButton, replaceExpanded ? ClassNames.SearchToggleButtonExpanded : ''),
4477
+ type: Button$2,
4478
+ className: mergeClassNames(IconButton, SearchToggleButton, replaceExpanded ? SearchToggleButtonExpanded : ''),
4206
4479
  title: toggleReplace$1(),
4207
4480
  ariaLabel: toggleReplace$1(),
4208
4481
  ariaExpanded: Boolean(replaceExpanded),
@@ -4210,8 +4483,8 @@ const getSearchToggleVirtualDom = replaceExpanded => {
4210
4483
  'data-command': 'toggleReplace',
4211
4484
  name: ToggleReplace
4212
4485
  }, {
4213
- type: VirtualDomElements.Div,
4214
- className: mergeClassNames(ClassNames.MaskIcon, replaceExpanded ? ClassNames.MaskIconChevronDown : ClassNames.MaskIconChevronRight),
4486
+ type: Div,
4487
+ className: mergeClassNames(MaskIcon, replaceExpanded ? MaskIconChevronDown : MaskIconChevronRight),
4215
4488
  childCount: 0
4216
4489
  }];
4217
4490
  };
@@ -4223,13 +4496,13 @@ const getSearchHeaderTopVirtualDom = (flags, searchInputErrorMessage, matchCount
4223
4496
  const replacePlaceholder = getReplacePlaceholder(focus);
4224
4497
  const replaceExpanded = flags & ReplaceExpanded;
4225
4498
  const dom = [{
4226
- type: VirtualDomElements.Div,
4227
- className: ClassNames.SearchHeaderTop,
4499
+ type: Div,
4500
+ className: SearchHeaderTop,
4228
4501
  role: None,
4229
4502
  childCount: 2
4230
4503
  }, ...getSearchToggleVirtualDom(replaceExpanded), {
4231
- type: VirtualDomElements.Div,
4232
- className: ClassNames.SearchHeaderTopRight,
4504
+ type: Div,
4505
+ className: SearchHeaderTopRight,
4233
4506
  role: None,
4234
4507
  childCount: replaceExpanded ? 2 : 1
4235
4508
  }, ...getSearchFieldVirtualDom(SearchValue, searchPlaceholder, HandleInput2, inputActions.inside, inputActions.outside, '', Boolean(searchInputErrorMessage))];
@@ -4240,8 +4513,8 @@ const getSearchHeaderTopVirtualDom = (flags, searchInputErrorMessage, matchCount
4240
4513
  };
4241
4514
 
4242
4515
  const parentNode = {
4243
- type: VirtualDomElements.Div,
4244
- className: ClassNames.SearchHeader,
4516
+ type: Div,
4517
+ className: SearchHeader,
4245
4518
  role: None,
4246
4519
  childCount: 2,
4247
4520
  onClick: HandleHeaderClick2,
@@ -4259,8 +4532,8 @@ const getSearchInputErrorVirtualDom = errorMessage => {
4259
4532
  return [];
4260
4533
  }
4261
4534
  return [{
4262
- type: VirtualDomElements.Div,
4263
- className: ClassNames.SearchInputError,
4535
+ type: Div,
4536
+ className: SearchInputError,
4264
4537
  role: Alert,
4265
4538
  childCount: 1
4266
4539
  }, text(errorMessage)];
@@ -4273,16 +4546,16 @@ const getScrollBarVirtualDom = (scrollBarHeight, scrollBarY, scrollBarValue) =>
4273
4546
  return [];
4274
4547
  }
4275
4548
  return [{
4276
- type: VirtualDomElements.Div,
4277
- className: mergeClassNames(ClassNames.ScrollBar, ClassNames.ScrollBarVertical),
4549
+ type: Div,
4550
+ className: mergeClassNames(ScrollBar$1, ScrollBarVertical),
4278
4551
  childCount: 1,
4279
4552
  onPointerDown: HandleScrollBarPointerDown,
4280
4553
  role: ScrollBar,
4281
4554
  ariaControls: TreeItems,
4282
4555
  ariaValueNow: scrollBarValue
4283
4556
  }, {
4284
- type: VirtualDomElements.Div,
4285
- className: ClassNames.ScrollBarThumb,
4557
+ type: Div,
4558
+ className: ScrollBarThumb,
4286
4559
  height: scrollBarHeight,
4287
4560
  translate: `0 ${scrollBarY}px`,
4288
4561
  childCount: 0
@@ -4303,8 +4576,8 @@ const getAriaExpanded = expanded => {
4303
4576
  };
4304
4577
 
4305
4578
  const badge = {
4306
- type: VirtualDomElements.Div,
4307
- className: mergeClassNames(ClassNames.Badge, ClassNames.SourceControlBadge),
4579
+ type: Div,
4580
+ className: mergeClassNames(Badge, SourceControlBadge),
4308
4581
  childCount: 1
4309
4582
  };
4310
4583
  const getBadgeVirtualDom = badgeText => {
@@ -4315,13 +4588,13 @@ const getBadgeVirtualDom = badgeText => {
4315
4588
  };
4316
4589
 
4317
4590
  const chevronDownVirtualDom = {
4318
- type: VirtualDomElements.Div,
4319
- className: mergeClassNames(ClassNames.Chevron, ClassNames.MaskIconChevronDown),
4591
+ type: Div,
4592
+ className: mergeClassNames(Chevron, MaskIconChevronDown),
4320
4593
  childCount: 0
4321
4594
  };
4322
4595
  const chevronRightVirtualDom = {
4323
- type: VirtualDomElements.Div,
4324
- className: mergeClassNames(ClassNames.Chevron, ClassNames.MaskIconChevronRight),
4596
+ type: Div,
4597
+ className: mergeClassNames(Chevron, MaskIconChevronRight),
4325
4598
  childCount: 0
4326
4599
  };
4327
4600
 
@@ -4338,8 +4611,8 @@ const getChevronVirtualDom = expanded => {
4338
4611
 
4339
4612
  const getFileIconVirtualDom = icon => {
4340
4613
  return {
4341
- type: VirtualDomElements.Img,
4342
- className: ClassNames.FileIcon,
4614
+ type: Img,
4615
+ className: FileIcon,
4343
4616
  src: icon,
4344
4617
  role: None,
4345
4618
  childCount: 0
@@ -4354,23 +4627,23 @@ const getIconsVirtualDom = icon => {
4354
4627
  };
4355
4628
 
4356
4629
  const deleted = {
4357
- type: VirtualDomElements.Del,
4358
- className: ClassNames.HighlightDeleted,
4630
+ type: Del,
4631
+ className: HighlightDeleted,
4359
4632
  childCount: 1
4360
4633
  };
4361
4634
  const inserted = {
4362
- type: VirtualDomElements.Ins,
4363
- className: ClassNames.HighlightInserted,
4635
+ type: Ins,
4636
+ className: HighlightInserted,
4364
4637
  childCount: 1
4365
4638
  };
4366
4639
  const highlighted = {
4367
- type: VirtualDomElements.Span,
4368
- className: ClassNames.Highlight,
4640
+ type: Span,
4641
+ className: Highlight,
4369
4642
  childCount: 1
4370
4643
  };
4371
4644
  const label1 = {
4372
- type: VirtualDomElements.Div,
4373
- className: mergeClassNames(ClassNames.Label, ClassNames.Grow),
4645
+ type: Div,
4646
+ className: mergeClassNames(Label, Grow),
4374
4647
  childCount: 1
4375
4648
  };
4376
4649
  const label3 = {
@@ -4417,12 +4690,12 @@ const getChildCount = (icon, expanded, badgeText) => {
4417
4690
  const getSearchRemoveVirtualDom = () => {
4418
4691
  // TODO add title/aria label
4419
4692
  const dom = [{
4420
- type: VirtualDomElements.Div,
4421
- className: ClassNames.SearchRemove,
4693
+ type: Div,
4694
+ className: SearchRemove,
4422
4695
  childCount: 1
4423
4696
  }, {
4424
- type: VirtualDomElements.Div,
4425
- className: ClassNames.CloseMaskIcon,
4697
+ type: Div,
4698
+ className: CloseMaskIcon,
4426
4699
  childCount: 0
4427
4700
  }];
4428
4701
  return dom;
@@ -4430,9 +4703,9 @@ const getSearchRemoveVirtualDom = () => {
4430
4703
 
4431
4704
  const getSearchResultClassName = focused => {
4432
4705
  if (focused) {
4433
- return ClassNames.TreeItem + ' ' + ClassNames.TreeItemActive;
4706
+ return TreeItem$1 + ' ' + TreeItemActive;
4434
4707
  }
4435
- return ClassNames.TreeItem;
4708
+ return TreeItem$1;
4436
4709
  };
4437
4710
 
4438
4711
  const PaddingRight = '12px';
@@ -4454,7 +4727,7 @@ const getSearchResultVirtualDom = rowInfo => {
4454
4727
  } = rowInfo;
4455
4728
  const childCount = getChildCount(icon, expanded, badgeText);
4456
4729
  const dom = [{
4457
- type: VirtualDomElements.Div,
4730
+ type: Div,
4458
4731
  role: TreeItem,
4459
4732
  className: getSearchResultClassName(focused),
4460
4733
  title,
@@ -4474,8 +4747,8 @@ const getSearchResultVirtualDom = rowInfo => {
4474
4747
  const getTreeItemsVirtualDom = (visibleItems, deltaY, itemHeight) => {
4475
4748
  const pixelOffset = deltaY % itemHeight;
4476
4749
  return [{
4477
- type: VirtualDomElements.Div,
4478
- className: ClassNames.TreeItems,
4750
+ type: Div,
4751
+ className: TreeItems$1,
4479
4752
  childCount: visibleItems.length,
4480
4753
  onClick: HandleClick,
4481
4754
  onBlur: HandleListBlur,
@@ -4489,8 +4762,8 @@ const getTreeItemsVirtualDom = (visibleItems, deltaY, itemHeight) => {
4489
4762
  const getSearchResultsVirtualDom = (visibleItems, focusOutline, scrollbarHeight, scrollBarY, scrollBarValue, deltaY, itemHeight) => {
4490
4763
  const childCount = scrollbarHeight === 0 ? 1 : 2;
4491
4764
  return [{
4492
- type: VirtualDomElements.Div,
4493
- 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),
4494
4767
  role: Tree,
4495
4768
  tabIndex: 0,
4496
4769
  childCount
@@ -4501,8 +4774,8 @@ const getSearchVirtualDom = (visibleItems, flags, message, focusOutline, searchI
4501
4774
  const errorDom = getSearchInputErrorVirtualDom(searchInputErrorMessage);
4502
4775
  const childCount = 2 + (errorDom.length > 0 ? 1 : 0);
4503
4776
  return [{
4504
- type: VirtualDomElements.Div,
4505
- className: mergeClassNames(ClassNames.Viewlet, ClassNames.Search),
4777
+ type: Div,
4778
+ className: mergeClassNames(Viewlet, Search$2),
4506
4779
  childCount
4507
4780
  }, ...getSearchHeaderVirtualDom(flags, message, searchInputErrorMessage, matchCount, focus), ...errorDom, ...getSearchResultsVirtualDom(visibleItems, focusOutline, scrollBarHeight, scrollBarY, scrollBarValue, deltaY, itemHeight)];
4508
4781
  };
@@ -4568,10 +4841,10 @@ const render2 = (uid, diffResult) => {
4568
4841
 
4569
4842
  const Button = 1;
4570
4843
 
4571
- const getIconVirtualDom = (icon, type = VirtualDomElements.Div) => {
4844
+ const getIconVirtualDom = (icon, type = Div) => {
4572
4845
  return {
4573
4846
  type,
4574
- className: mergeClassNames(ClassNames.MaskIcon, `MaskIcon${icon}`),
4847
+ className: mergeClassNames(MaskIcon, `MaskIcon${icon}`),
4575
4848
  role: None,
4576
4849
  childCount: 0
4577
4850
  };
@@ -4584,8 +4857,8 @@ const getActionButtonVirtualDom = action => {
4584
4857
  command
4585
4858
  } = action;
4586
4859
  return [{
4587
- type: VirtualDomElements.Button,
4588
- className: ClassNames.IconButton,
4860
+ type: Button$2,
4861
+ className: IconButton,
4589
4862
  title: id,
4590
4863
  'data-command': command,
4591
4864
  childCount: 1
@@ -4603,8 +4876,8 @@ const getActionVirtualDom = action => {
4603
4876
 
4604
4877
  const getActionsVirtualDom = actions => {
4605
4878
  return [{
4606
- type: VirtualDomElements.Div,
4607
- className: ClassNames.Actions,
4879
+ type: Div,
4880
+ className: Actions,
4608
4881
  role: ToolBar,
4609
4882
  childCount: actions.length
4610
4883
  }, ...actions.flatMap(getActionVirtualDom)];
@@ -4836,7 +5109,7 @@ const getSearchFocusKey = key => {
4836
5109
  case ToggleReplace:
4837
5110
  return FocusToggleReplace;
4838
5111
  default:
4839
- return Empty;
5112
+ return Empty$1;
4840
5113
  }
4841
5114
  };
4842
5115
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/text-search-worker",
3
- "version": "5.5.0",
3
+ "version": "5.6.0",
4
4
  "description": "Text Search Worker",
5
5
  "keywords": [
6
6
  "text-search"