@lvce-editor/text-search-worker 6.5.0 → 6.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.
@@ -1270,9 +1270,79 @@ const ToolBar = 'toolbar';
1270
1270
  const Tree$1 = 'tree';
1271
1271
  const TreeItem$1 = 'treeitem';
1272
1272
 
1273
+ const Actions = 'Actions';
1274
+ const Badge = 'Badge';
1275
+ const Chevron = 'Chevron';
1276
+ const CloseMaskIcon = 'MaskIcon MaskIconClose';
1277
+ const Empty$1 = '';
1278
+ const FileIcon = 'FileIcon';
1279
+ const FocusOutline = 'FocusOutline';
1280
+ const Grow = 'Grow';
1281
+ const Highlight = 'Highlight';
1282
+ const HighlightDeleted = 'HighlightDeleted';
1283
+ const HighlightInserted = 'HighlightInserted';
1284
+ const IconButton = 'IconButton';
1285
+ const IconButtonDisabled = 'IconButtonDisabled';
1286
+ const Label = 'Label';
1287
+ const List$1 = 'List';
1288
+ const MaskIcon = 'MaskIcon';
1289
+ const MaskIconBook = 'MaskIconBook';
1290
+ const MaskIconCaseSensitive = 'MaskIconCaseSensitive';
1291
+ const MaskIconChevronDown = 'MaskIconChevronDown';
1292
+ const MaskIconChevronRight = 'MaskIconChevronRight';
1293
+ const MaskIconEllipsis = 'MaskIconEllipsis';
1294
+ const MaskIconExclude = 'MaskIconExclude';
1295
+ const MaskIconPreserveCase = 'MaskIconPreserveCase';
1296
+ const MaskIconRegex = 'MaskIconRegex';
1297
+ const MaskIconReplaceAll = 'MaskIconReplaceAll';
1298
+ const MaskIconWholeWord = 'MaskIconWholeWord';
1299
+ const MultilineInputBox = 'MultilineInputBox';
1300
+ const ScrollBar = 'ScrollBar';
1301
+ const ScrollBarThumb = 'ScrollBarThumb';
1302
+ const ScrollBarVertical = 'ScrollBarVertical';
1303
+ const Search$2 = 'Search';
1304
+ const SearchField = 'SearchField';
1305
+ const SearchFieldButton = 'SearchFieldButton';
1306
+ const SearchFieldButtonChecked = 'SearchFieldButtonChecked';
1307
+ const SearchFieldButtonDisabled = 'SearchFieldButtonDisabled';
1308
+ const SearchFieldButtons = 'SearchFieldButtons';
1309
+ const SearchFieldContainer = 'SearchFieldContainer';
1310
+ const SearchFieldError = 'SearchFieldError';
1311
+ const SearchHeader = 'SearchHeader';
1312
+ const SearchHeaderDetails = 'SearchHeaderDetails';
1313
+ const SearchHeaderDetailsExpanded = 'SearchHeaderDetailsExpanded';
1314
+ const SearchHeaderDetailsExpandedTop = 'SearchHeaderDetailsExpandedTop';
1315
+ const SearchHeaderDetailsHeading = 'SearchHeaderDetailsHeading';
1316
+ const SearchHeaderTop = 'SearchHeaderTop';
1317
+ const SearchHeaderTopRight = 'SearchHeaderTopRight';
1318
+ const SearchInputError = 'SearchInputError';
1319
+ const SearchRemove = 'SearchRemove';
1320
+ const SearchToggleButton = 'SearchToggleButton';
1321
+ const SearchToggleButtonExpanded = 'SearchToggleButtonExpanded';
1322
+ const SourceControlBadge = 'SourceControlBadge';
1323
+ const ToggleDetails = 'ToggleDetails';
1324
+ const Tree = 'Tree';
1325
+ const TreeItem = 'TreeItem';
1326
+ const TreeItemActive = 'TreeItemActive';
1327
+ const TreeItems$1 = 'TreeItems';
1328
+ const Viewlet = 'Viewlet';
1329
+ const ViewletSearchMessage = 'ViewletSearchMessage';
1330
+ const ViewletSearchMessageIndented = 'ViewletSearchMessageIndented';
1331
+
1273
1332
  const File$2 = 7;
1274
1333
 
1275
- const Button$2 = 'event.button';
1334
+ const Button$2 = 1;
1335
+ const Div = 4;
1336
+ const Span = 8;
1337
+ const Text = 12;
1338
+ const Img = 17;
1339
+ const Ins = 20;
1340
+ const Del = 21;
1341
+ const H4 = 24;
1342
+ const TextArea = 62;
1343
+ const Reference = 100;
1344
+
1345
+ const Button$1 = 'event.button';
1276
1346
  const ClientX = 'event.clientX';
1277
1347
  const ClientY = 'event.clientY';
1278
1348
  const DeltaMode = 'event.deltaMode';
@@ -1284,7 +1354,7 @@ const TargetValue = 'event.target.value';
1284
1354
 
1285
1355
  const Script$1 = 2;
1286
1356
 
1287
- const Search$2 = 18;
1357
+ const Search$1 = 18;
1288
1358
  const InputContextMenu = 91;
1289
1359
 
1290
1360
  const Separator = 1;
@@ -1308,7 +1378,22 @@ const SetFocusContext = 'Viewlet.setFocusContext';
1308
1378
  const SetValueByName = 'Viewlet.setValueByName';
1309
1379
  const SetPatches = 'Viewlet.setPatches';
1310
1380
 
1311
- const FocusSearch$1 = 1013;
1381
+ const Empty = 0;
1382
+ const FocusIgnoreFiles = 1012;
1383
+ const FocusSearch = 1013;
1384
+ const FocusSearchExcludeInput = 1008;
1385
+ const FocusSearchIncludeInput = 1007;
1386
+ const FocusSearchInput = 21;
1387
+ const FocusSearchMatchCase = 32;
1388
+ const FocusSearchOpenEditors = 1011;
1389
+ const FocusSearchPreserveCase = 36;
1390
+ const FocusSearchRegex = 33;
1391
+ const FocusSearchReplaceAll = 35;
1392
+ const FocusSearchReplaceInput = 31;
1393
+ const FocusSearchResults = 22;
1394
+ const FocusSearchWholeWord = 34;
1395
+ const FocusToggleDetails = 1010;
1396
+ const FocusToggleReplace = 1020;
1312
1397
 
1313
1398
  const {
1314
1399
  invoke: invoke$2,
@@ -1476,93 +1561,6 @@ const terminate = () => {
1476
1561
  globalThis.close();
1477
1562
  };
1478
1563
 
1479
- const Actions = 'Actions';
1480
- const Badge = 'Badge';
1481
- const Chevron = 'Chevron';
1482
- const CloseMaskIcon = 'MaskIcon MaskIconClose';
1483
- const Empty$1 = '';
1484
- const FileIcon = 'FileIcon';
1485
- const FocusOutline = 'FocusOutline';
1486
- const Grow = 'Grow';
1487
- const Highlight = 'Highlight';
1488
- const HighlightDeleted = 'HighlightDeleted';
1489
- const HighlightInserted = 'HighlightInserted';
1490
- const IconButton = 'IconButton';
1491
- const IconButtonDisabled = 'IconButtonDisabled';
1492
- const Label = 'Label';
1493
- const List$1 = 'List';
1494
- const MaskIcon = 'MaskIcon';
1495
- const MaskIconBook = 'MaskIconBook';
1496
- const MaskIconCaseSensitive = 'MaskIconCaseSensitive';
1497
- const MaskIconChevronDown = 'MaskIconChevronDown';
1498
- const MaskIconChevronRight = 'MaskIconChevronRight';
1499
- const MaskIconEllipsis = 'MaskIconEllipsis';
1500
- const MaskIconExclude = 'MaskIconExclude';
1501
- const MaskIconPreserveCase = 'MaskIconPreserveCase';
1502
- const MaskIconRegex = 'MaskIconRegex';
1503
- const MaskIconReplaceAll = 'MaskIconReplaceAll';
1504
- const MaskIconWholeWord = 'MaskIconWholeWord';
1505
- const MultilineInputBox = 'MultilineInputBox';
1506
- const ScrollBar = 'ScrollBar';
1507
- const ScrollBarThumb = 'ScrollBarThumb';
1508
- const ScrollBarVertical = 'ScrollBarVertical';
1509
- const Search$1 = 'Search';
1510
- const SearchField = 'SearchField';
1511
- const SearchFieldButton = 'SearchFieldButton';
1512
- const SearchFieldButtonChecked = 'SearchFieldButtonChecked';
1513
- const SearchFieldButtonDisabled = 'SearchFieldButtonDisabled';
1514
- const SearchFieldButtons = 'SearchFieldButtons';
1515
- const SearchFieldContainer = 'SearchFieldContainer';
1516
- const SearchFieldError = 'SearchFieldError';
1517
- const SearchHeader = 'SearchHeader';
1518
- const SearchHeaderDetails = 'SearchHeaderDetails';
1519
- const SearchHeaderDetailsExpanded = 'SearchHeaderDetailsExpanded';
1520
- const SearchHeaderDetailsExpandedTop = 'SearchHeaderDetailsExpandedTop';
1521
- const SearchHeaderDetailsHeading = 'SearchHeaderDetailsHeading';
1522
- const SearchHeaderTop = 'SearchHeaderTop';
1523
- const SearchHeaderTopRight = 'SearchHeaderTopRight';
1524
- const SearchInputError = 'SearchInputError';
1525
- const SearchRemove = 'SearchRemove';
1526
- const SearchToggleButton = 'SearchToggleButton';
1527
- const SearchToggleButtonExpanded = 'SearchToggleButtonExpanded';
1528
- const SourceControlBadge = 'SourceControlBadge';
1529
- const ToggleDetails = 'ToggleDetails';
1530
- const Tree = 'Tree';
1531
- const TreeItem = 'TreeItem';
1532
- const TreeItemActive = 'TreeItemActive';
1533
- const TreeItems$1 = 'TreeItems';
1534
- const Viewlet = 'Viewlet';
1535
- const ViewletSearchMessage = 'ViewletSearchMessage';
1536
- const ViewletSearchMessageIndented = 'ViewletSearchMessageIndented';
1537
-
1538
- const Button$1 = 1;
1539
- const Div = 4;
1540
- const Span = 8;
1541
- const Text = 12;
1542
- const Img = 17;
1543
- const Ins = 20;
1544
- const Del = 21;
1545
- const H4 = 24;
1546
- const TextArea = 62;
1547
- const Reference = 100;
1548
-
1549
- const Empty = 0;
1550
- const FocusIgnoreFiles = 1012;
1551
- const FocusSearch = 1013;
1552
- const FocusSearchExcludeInput = 1008;
1553
- const FocusSearchIncludeInput = 1007;
1554
- const FocusSearchInput = 21;
1555
- const FocusSearchMatchCase = 32;
1556
- const FocusSearchOpenEditors = 1011;
1557
- const FocusSearchPreserveCase = 36;
1558
- const FocusSearchRegex = 33;
1559
- const FocusSearchReplaceAll = 35;
1560
- const FocusSearchReplaceInput = 31;
1561
- const FocusSearchResults = 22;
1562
- const FocusSearchWholeWord = 34;
1563
- const FocusToggleDetails = 1010;
1564
- const FocusToggleReplace = 1020;
1565
-
1566
1564
  const mergeClassNames = (...classNames) => {
1567
1565
  return classNames.filter(Boolean).join(' ');
1568
1566
  };
@@ -3064,7 +3062,7 @@ const getMenuEntriesList = (state, props) => {
3064
3062
  };
3065
3063
 
3066
3064
  const getMenuEntries = (state, props) => {
3067
- if (props.menuId === Search$2) {
3065
+ if (props.menuId === Search$1) {
3068
3066
  return getMenuEntriesList(state, props);
3069
3067
  }
3070
3068
  if (props.menuId === InputContextMenu) {
@@ -3074,7 +3072,7 @@ const getMenuEntries = (state, props) => {
3074
3072
  };
3075
3073
 
3076
3074
  const getMenuEntryIds = () => {
3077
- return [Search$2, InputContextMenu];
3075
+ return [Search$1, InputContextMenu];
3078
3076
  };
3079
3077
 
3080
3078
  const ClearAll$1 = 'ClearAll';
@@ -3633,10 +3631,6 @@ const getReplacedMessage = (fileCount, replaceCount, replacement) => {
3633
3631
  };
3634
3632
 
3635
3633
  const getReplaceElements = (items, workspacePath, replacement) => {
3636
- let element = {
3637
- changes: [],
3638
- uri: ''
3639
- };
3640
3634
  const bulkChanges = [];
3641
3635
  let changes = [];
3642
3636
  // TODO simplify code by first matching files with their elements, then creating bulk edits
@@ -3652,11 +3646,10 @@ const getReplaceElements = (items, workspacePath, replacement) => {
3652
3646
  changes = [];
3653
3647
  const fileName = getFilePath(text);
3654
3648
  const absolutePath = `${workspacePath}/${fileName}`;
3655
- element = {
3649
+ bulkChanges.push({
3656
3650
  changes,
3657
3651
  uri: absolutePath
3658
- };
3659
- bulkChanges.push(element);
3652
+ });
3660
3653
  } else {
3661
3654
  changes.push({
3662
3655
  endColumnIndex: end,
@@ -5255,7 +5248,7 @@ const renderFocus = (oldState, newState) => {
5255
5248
  };
5256
5249
 
5257
5250
  const renderFocusContext = (oldState, newState) => {
5258
- return [SetFocusContext, newState.uid, FocusSearch$1, newState.focus];
5251
+ return [SetFocusContext, newState.uid, FocusSearch, newState.focus];
5259
5252
  };
5260
5253
 
5261
5254
  const HandleClick = 1;
@@ -5290,7 +5283,7 @@ const getSearchDetailsToggleVirtualDom = () => {
5290
5283
  role: Button$3,
5291
5284
  tabIndex: 0,
5292
5285
  title: toggleSearchDetails(),
5293
- type: Button$1
5286
+ type: Button$2
5294
5287
  }, {
5295
5288
  childCount: 0,
5296
5289
  className: mergeClassNames(MaskIcon, MaskIconEllipsis),
@@ -5410,7 +5403,7 @@ const getSearchFieldButtonVirtualDom = button => {
5410
5403
  role,
5411
5404
  tabIndex: 0,
5412
5405
  title,
5413
- type: Button$1
5406
+ type: Button$2
5414
5407
  }, {
5415
5408
  childCount: 0,
5416
5409
  className: mergeClassNames(MaskIcon, icon),
@@ -5587,7 +5580,7 @@ const getSearchToggleVirtualDom = replaceExpanded => {
5587
5580
  name: ToggleReplace,
5588
5581
  onClick: HandleButtonClick,
5589
5582
  title: toggleReplace$1(),
5590
- type: Button$1
5583
+ type: Button$2
5591
5584
  }, {
5592
5585
  childCount: 0,
5593
5586
  className: mergeClassNames(MaskIcon, replaceExpanded ? MaskIconChevronDown : MaskIconChevronRight),
@@ -5799,7 +5792,7 @@ const getSearchRemoveVirtualDom = () => {
5799
5792
  className: SearchRemove,
5800
5793
  name: Remove,
5801
5794
  title,
5802
- type: Button$1
5795
+ type: Button$2
5803
5796
  }, closeIcon];
5804
5797
  return dom;
5805
5798
  };
@@ -5875,7 +5868,7 @@ const getSearchResultsVirtualDom = (visibleItems, focusOutline, scrollbarHeight,
5875
5868
  }, ...getTreeItemsVirtualDom(visibleItems, deltaY, itemHeight), ...getScrollBarVirtualDom(scrollbarHeight, scrollBarY, scrollBarValue)];
5876
5869
  };
5877
5870
 
5878
- const className = mergeClassNames(Viewlet, Search$1);
5871
+ const className = mergeClassNames(Viewlet, Search$2);
5879
5872
  const getSearchVirtualDom = (visibleItems, flags, message, focusOutline, searchInputErrorMessage, scrollBarHeight, scrollBarY, scrollBarValue, deltaY, itemHeight, matchCount, limitHitWarning, focus = 0, initial = false) => {
5880
5873
  if (initial) {
5881
5874
  return [];
@@ -5997,7 +5990,7 @@ const getActionButtonVirtualDom = action => {
5997
5990
  className,
5998
5991
  name: id,
5999
5992
  title: label,
6000
- type: Button$1
5993
+ type: Button$2
6001
5994
  }, getIconVirtualDom(icon)];
6002
5995
  };
6003
5996
 
@@ -6094,7 +6087,7 @@ const renderEventListeners = () => {
6094
6087
  params: ['handleClickAt', ClientX, ClientY, TargetName]
6095
6088
  }, {
6096
6089
  name: HandleListPointerDown,
6097
- params: ['handleListPointerDown', Button$2, TargetName]
6090
+ params: ['handleListPointerDown', Button$1, TargetName]
6098
6091
  }, {
6099
6092
  name: HandleToggleButtonClick,
6100
6093
  params: ['handleToggleButtonClick']
@@ -6106,11 +6099,11 @@ const renderEventListeners = () => {
6106
6099
  params: ['handleListBlur']
6107
6100
  }, {
6108
6101
  name: HandleListContextMenu,
6109
- params: ['handleContextMenu', Button$2, ClientX, ClientY],
6102
+ params: ['handleContextMenu', Button$1, ClientX, ClientY],
6110
6103
  preventDefault: true
6111
6104
  }, {
6112
6105
  name: HandleInputContextMenu,
6113
- params: ['handleInputContextMenu', TargetName, Button$2, ClientX, ClientY],
6106
+ params: ['handleInputContextMenu', TargetName, Button$1, ClientX, ClientY],
6114
6107
  preventDefault: true
6115
6108
  }, {
6116
6109
  name: HandleActionClick,
@@ -6321,10 +6314,10 @@ const handleContextMenuKeyboard = async state => {
6321
6314
  x,
6322
6315
  y
6323
6316
  } = state; // TODO
6324
- await show2(uid, Search$2, x, y, {
6317
+ await show2(uid, Search$1, x, y, {
6325
6318
  index: 0,
6326
6319
  // TODO pass proper index
6327
- menuId: Search$2
6320
+ menuId: Search$1
6328
6321
  });
6329
6322
  return state;
6330
6323
  };
@@ -6349,9 +6342,9 @@ const handleContextMenuMouseAt = async (state, eventX, eventY) => {
6349
6342
  focusedIndex: index,
6350
6343
  listFocusedIndex: index
6351
6344
  });
6352
- await show2(uid, Search$2, x, y, {
6345
+ await show2(uid, Search$1, x, y, {
6353
6346
  index,
6354
- menuId: Search$2
6347
+ menuId: Search$1
6355
6348
  });
6356
6349
  return state;
6357
6350
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/text-search-worker",
3
- "version": "6.5.0",
3
+ "version": "6.6.0",
4
4
  "description": "Text Search Worker",
5
5
  "keywords": [
6
6
  "text-search"