@lvce-editor/settings-view 1.16.0 → 1.18.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.
@@ -937,7 +937,7 @@ const filterBySearch = (items, searchValue) => {
937
937
  const normalizedSearchValue = searchValue.toLowerCase().trim();
938
938
  return items.filter(item => item.heading.toLowerCase().includes(normalizedSearchValue));
939
939
  };
940
- const getFilteredItems = (items, tabs, searchValue = '', preferences = {}) => {
940
+ const getFilteredItems = (items, tabs, searchValue = '', preferences) => {
941
941
  const tabFilteredItems = filterByTab(items, tabs);
942
942
  const itemsWithModifiedProperty = addModifiedProperty(tabFilteredItems, preferences);
943
943
  return filterBySearch(itemsWithModifiedProperty, searchValue);
@@ -952,10 +952,10 @@ const clear$1 = state => {
952
952
  const {
953
953
  items,
954
954
  tabs,
955
- preferences
955
+ modifiedSettings
956
956
  } = state;
957
957
  const newSearchValue = '';
958
- const filteredItems = getFilteredItems(items, tabs, newSearchValue, preferences);
958
+ const filteredItems = getFilteredItems(items, tabs, newSearchValue, modifiedSettings);
959
959
  return {
960
960
  ...state,
961
961
  filteredItems,
@@ -1037,8 +1037,8 @@ const isEqual = (oldState, newState) => {
1037
1037
  return newState.inputSource === User || oldState.searchValue === newState.searchValue;
1038
1038
  };
1039
1039
 
1040
- const modules = [isEqual$4, isEqual$3, isEqual, isEqual$1, isEqual$2];
1041
- const numbers = [RenderFocus, RenderItems, RenderValue, RenderSettingValues, RenderScrollOffset];
1040
+ const modules = [isEqual$3, isEqual, isEqual$1, isEqual$2, isEqual$4, isEqual$4];
1041
+ const numbers = [RenderItems, RenderValue, RenderSettingValues, RenderScrollOffset, RenderFocus, RenderFocusContext];
1042
1042
 
1043
1043
  const diff = (oldState, newState) => {
1044
1044
  const diffResult = [];
@@ -1065,8 +1065,69 @@ const diff2 = uid => {
1065
1065
  return diffResult;
1066
1066
  };
1067
1067
 
1068
- const getKeyBindings = () => {
1069
- return [];
1068
+ const Tab$1 = 'tab';
1069
+ const TabList = 'tablist';
1070
+ const AriaRoles = {
1071
+ __proto__: null,
1072
+ Tab: Tab$1,
1073
+ TabList};
1074
+ const Viewlet$1 = 'Viewlet';
1075
+ const ClassNames = {
1076
+ __proto__: null,
1077
+ Viewlet: Viewlet$1};
1078
+ const UpArrow = 14;
1079
+ const DownArrow = 16;
1080
+ const KeyCode = {
1081
+ __proto__: null,
1082
+ DownArrow,
1083
+ UpArrow
1084
+ };
1085
+ const mergeClassNames = (...classNames) => {
1086
+ return classNames.filter(Boolean).join(' ');
1087
+ };
1088
+ const Button$1 = 1;
1089
+ const Div = 4;
1090
+ const H1 = 5;
1091
+ const Input = 6;
1092
+ const Text = 12;
1093
+ const H3 = 23;
1094
+ const Aside = 28;
1095
+ const P = 50;
1096
+ const Ul = 60;
1097
+ const Select$1 = 63;
1098
+ const Option = 64;
1099
+ const Label = 66;
1100
+ const VirtualDomElements = {
1101
+ __proto__: null,
1102
+ Aside,
1103
+ Button: Button$1,
1104
+ Div,
1105
+ H1,
1106
+ H3,
1107
+ Input,
1108
+ Label,
1109
+ Option,
1110
+ P,
1111
+ Select: Select$1,
1112
+ Ul};
1113
+ const text = data => {
1114
+ return {
1115
+ type: Text,
1116
+ text: data,
1117
+ childCount: 0
1118
+ };
1119
+ };
1120
+
1121
+ const getKeyBindings$1 = () => {
1122
+ return [{
1123
+ key: KeyCode.UpArrow,
1124
+ command: 'Settings.usePreviousSearchValue',
1125
+ when: FocusSettingsInput
1126
+ }, {
1127
+ key: KeyCode.DownArrow,
1128
+ command: 'Settings.useNextSearchValue',
1129
+ when: FocusSettingsInput
1130
+ }];
1070
1131
  };
1071
1132
 
1072
1133
  const getName = () => {
@@ -1103,10 +1164,10 @@ const handleClickTab = (state, name) => {
1103
1164
  items,
1104
1165
  tabs,
1105
1166
  searchValue,
1106
- preferences
1167
+ modifiedSettings
1107
1168
  } = state;
1108
1169
  const updatedTabs = getUpdatedTabs(tabs, name);
1109
- const filteredItems = getFilteredItems(items, updatedTabs, searchValue, preferences);
1170
+ const filteredItems = getFilteredItems(items, updatedTabs, searchValue, modifiedSettings);
1110
1171
  return {
1111
1172
  ...state,
1112
1173
  tabs: updatedTabs,
@@ -1117,12 +1178,57 @@ const handleClickTab = (state, name) => {
1117
1178
  const addToHistory = (history, value) => {
1118
1179
  let newHistory = history;
1119
1180
  let newHistoryIndex = -1;
1120
- if (value && value.trim() && !history.includes(value)) {
1121
- newHistory = [...history, value];
1181
+ if (!value || !value.trim()) {
1182
+ return {
1183
+ newHistory,
1184
+ newHistoryIndex
1185
+ };
1186
+ }
1187
+ const trimmedValue = value.trim();
1188
+
1189
+ // Check if this value is already in history
1190
+ const existingIndex = history.indexOf(trimmedValue);
1191
+ if (existingIndex !== -1) {
1192
+ newHistoryIndex = existingIndex;
1193
+ return {
1194
+ newHistory,
1195
+ newHistoryIndex
1196
+ };
1197
+ }
1198
+
1199
+ // Check if this value is a prefix of any existing history item
1200
+ // If it is, don't add it to history yet (it's still being typed)
1201
+ const isPrefixOfExisting = history.some(historyItem => historyItem.startsWith(trimmedValue) && historyItem !== trimmedValue);
1202
+ if (isPrefixOfExisting) {
1203
+ // Don't add to history, but find the closest match for index
1204
+ const closestMatch = history.find(historyItem => historyItem.startsWith(trimmedValue));
1205
+ if (closestMatch) {
1206
+ newHistoryIndex = history.indexOf(closestMatch);
1207
+ }
1208
+ return {
1209
+ newHistory,
1210
+ newHistoryIndex
1211
+ };
1212
+ }
1213
+
1214
+ // Check if any existing history items are prefixes of this value
1215
+ // If so, remove all prefix items and add the complete value at the first prefix position
1216
+ const prefixItems = history.filter(historyItem => trimmedValue.startsWith(historyItem) && historyItem !== trimmedValue);
1217
+ if (prefixItems.length > 0) {
1218
+ // Find the position of the first prefix item
1219
+ const firstPrefixIndex = history.findIndex(historyItem => trimmedValue.startsWith(historyItem) && historyItem !== trimmedValue);
1220
+
1221
+ // Remove all prefix items and add the complete value at the first prefix position
1222
+
1223
+ // Insert the new value at the position where the first prefix was
1224
+ const beforePrefix = history.slice(0, firstPrefixIndex);
1225
+ const afterPrefix = history.slice(firstPrefixIndex).filter(historyItem => !trimmedValue.startsWith(historyItem) || historyItem === trimmedValue);
1226
+ newHistory = [...beforePrefix, trimmedValue, ...afterPrefix];
1227
+ newHistoryIndex = firstPrefixIndex;
1228
+ } else {
1229
+ // Add as new item
1230
+ newHistory = [...history, trimmedValue];
1122
1231
  newHistoryIndex = newHistory.length - 1;
1123
- } else if (value && value.trim()) {
1124
- // If value already exists in history, find its index
1125
- newHistoryIndex = history.indexOf(value);
1126
1232
  }
1127
1233
  return {
1128
1234
  newHistory,
@@ -1134,10 +1240,10 @@ const handleInput = (state, value, inputSource = User) => {
1134
1240
  const {
1135
1241
  items,
1136
1242
  tabs,
1137
- preferences,
1138
- history
1243
+ history,
1244
+ modifiedSettings
1139
1245
  } = state;
1140
- const filteredItems = getFilteredItems(items, tabs, value, preferences);
1246
+ const filteredItems = getFilteredItems(items, tabs, value, modifiedSettings);
1141
1247
  const {
1142
1248
  newHistory,
1143
1249
  newHistoryIndex
@@ -1152,8 +1258,16 @@ const handleInput = (state, value, inputSource = User) => {
1152
1258
  };
1153
1259
  };
1154
1260
 
1261
+ const None = 0;
1155
1262
  const SearchInput = 1;
1156
1263
 
1264
+ const handleInputBlur = state => {
1265
+ return {
1266
+ ...state,
1267
+ focus: None
1268
+ };
1269
+ };
1270
+
1157
1271
  const handleInputFocus = state => {
1158
1272
  return {
1159
1273
  ...state,
@@ -1225,8 +1339,378 @@ const initialize = async () => {
1225
1339
  // TODO
1226
1340
  };
1227
1341
 
1342
+ const getModifiedSettings = preferences => {
1343
+ const modifiedSettings = Object.create(null);
1344
+ for (const key of Object.keys(preferences)) {
1345
+ modifiedSettings[key] = true;
1346
+ }
1347
+ return modifiedSettings;
1348
+ };
1349
+
1350
+ const rpcs = Object.create(null);
1351
+ const set$g = (id, rpc) => {
1352
+ rpcs[id] = rpc;
1353
+ };
1354
+ const get = id => {
1355
+ return rpcs[id];
1356
+ };
1357
+
1358
+ /* eslint-disable @typescript-eslint/explicit-function-return-type */
1359
+
1360
+ const create = rpcId => {
1361
+ return {
1362
+ // @ts-ignore
1363
+ invoke(method, ...params) {
1364
+ const rpc = get(rpcId);
1365
+ // @ts-ignore
1366
+ return rpc.invoke(method, ...params);
1367
+ },
1368
+ // @ts-ignore
1369
+ invokeAndTransfer(method, ...params) {
1370
+ const rpc = get(rpcId);
1371
+ // @ts-ignore
1372
+ return rpc.invokeAndTransfer(method, ...params);
1373
+ },
1374
+ set(rpc) {
1375
+ set$g(rpcId, rpc);
1376
+ },
1377
+ async dispose() {
1378
+ const rpc = get(rpcId);
1379
+ await rpc.dispose();
1380
+ }
1381
+ };
1382
+ };
1383
+ const DebugWorker$1 = 55;
1384
+ const RendererWorker$1 = 1;
1385
+ const {
1386
+ invoke: invoke$3,
1387
+ invokeAndTransfer: invokeAndTransfer$3,
1388
+ set: set$3,
1389
+ dispose: dispose$3
1390
+ } = create(RendererWorker$1);
1391
+ const searchFileHtml = async uri => {
1392
+ return invoke$3('ExtensionHost.searchFileWithHtml', uri);
1393
+ };
1394
+ const getFilePathElectron = async file => {
1395
+ return invoke$3('FileSystemHandle.getFilePathElectron', file);
1396
+ };
1397
+ const showContextMenu = async (x, y, id, ...args) => {
1398
+ return invoke$3('ContextMenu.show', x, y, id, ...args);
1399
+ };
1400
+ const getElectronVersion = async () => {
1401
+ return invoke$3('Process.getElectronVersion');
1402
+ };
1403
+ const applyBulkReplacement = async bulkEdits => {
1404
+ await invoke$3('BulkReplacement.applyBulkReplacement', bulkEdits);
1405
+ };
1406
+ const setColorTheme = async id => {
1407
+ // @ts-ignore
1408
+ return invoke$3(/* ColorTheme.setColorTheme */'ColorTheme.setColorTheme', /* colorThemeId */id);
1409
+ };
1410
+ const getNodeVersion = async () => {
1411
+ return invoke$3('Process.getNodeVersion');
1412
+ };
1413
+ const getChromeVersion = async () => {
1414
+ return invoke$3('Process.getChromeVersion');
1415
+ };
1416
+ const getV8Version = async () => {
1417
+ return invoke$3('Process.getV8Version');
1418
+ };
1419
+ const getFileHandles = async fileIds => {
1420
+ const files = await invoke$3('FileSystemHandle.getFileHandles', fileIds);
1421
+ return files;
1422
+ };
1423
+ const setWorkspacePath = async path => {
1424
+ await invoke$3('Workspace.setPath', path);
1425
+ };
1426
+ const registerWebViewInterceptor = async (id, port) => {
1427
+ await invokeAndTransfer$3('WebView.registerInterceptor', id, port);
1428
+ };
1429
+ const unregisterWebViewInterceptor = async id => {
1430
+ await invoke$3('WebView.unregisterInterceptor', id);
1431
+ };
1432
+ const sendMessagePortToEditorWorker = async (port, rpcId) => {
1433
+ const command = 'HandleMessagePort.handleMessagePort';
1434
+ // @ts-ignore
1435
+ await invokeAndTransfer$3('SendMessagePortToExtensionHostWorker.sendMessagePortToEditorWorker', port, command, rpcId);
1436
+ };
1437
+ const sendMessagePortToMarkdownWorker = async (port, rpcId) => {
1438
+ const command = 'Markdown.handleMessagePort';
1439
+ // @ts-ignore
1440
+ await invokeAndTransfer$3('SendMessagePortToExtensionHostWorker.sendMessagePortToMarkdownWorker', port, command, rpcId);
1441
+ };
1442
+ const sendMessagePortToFileSystemWorker = async (port, rpcId) => {
1443
+ const command = 'FileSystem.handleMessagePort';
1444
+ // @ts-ignore
1445
+ await invokeAndTransfer$3('SendMessagePortToExtensionHostWorker.sendMessagePortToFileSystemWorker', port, command, rpcId);
1446
+ };
1447
+ const readFile = async uri => {
1448
+ return invoke$3('FileSystem.readFile', uri);
1449
+ };
1450
+ const getWebViewSecret = async key => {
1451
+ // @ts-ignore
1452
+ return invoke$3('WebView.getSecret', key);
1453
+ };
1454
+ const setWebViewPort = async (uid, port, origin, portType) => {
1455
+ return invokeAndTransfer$3('WebView.setPort', uid, port, origin, portType);
1456
+ };
1457
+ const setFocus = key => {
1458
+ return invoke$3('Focus.setFocus', key);
1459
+ };
1460
+ const getFileIcon = async options => {
1461
+ return invoke$3('IconTheme.getFileIcon', options);
1462
+ };
1463
+ const getColorThemeNames = async () => {
1464
+ return invoke$3('ColorTheme.getColorThemeNames');
1465
+ };
1466
+ const disableExtension = async id => {
1467
+ return invoke$3('ExtensionManagement.disable', id);
1468
+ };
1469
+ const enableExtension = async id => {
1470
+ // @ts-ignore
1471
+ return invoke$3('ExtensionManagement.enable', id);
1472
+ };
1473
+ const handleDebugChange = async params => {
1474
+ // @ts-ignore
1475
+ return invoke$3('Run And Debug.handleChange', params);
1476
+ };
1477
+ const getFolderIcon = async options => {
1478
+ return invoke$3('IconTheme.getFolderIcon', options);
1479
+ };
1480
+ const closeWidget = async widgetId => {
1481
+ return invoke$3('Viewlet.closeWidget', widgetId);
1482
+ };
1483
+ const sendMessagePortToExtensionHostWorker = async (port, rpcId = 0) => {
1484
+ const command = 'HandleMessagePort.handleMessagePort2';
1485
+ await invokeAndTransfer$3('SendMessagePortToExtensionHostWorker.sendMessagePortToExtensionHostWorker', port, command, rpcId);
1486
+ };
1487
+ const sendMessagePortToSearchProcess = async port => {
1488
+ await invokeAndTransfer$3('SendMessagePortToElectron.sendMessagePortToElectron', port, 'HandleMessagePortForSearchProcess.handleMessagePortForSearchProcess');
1489
+ };
1490
+ const confirm = async (message, options) => {
1491
+ // @ts-ignore
1492
+ const result = await invoke$3('Confirmprompt.prompt', message, options);
1493
+ return result;
1494
+ };
1495
+ const getRecentlyOpened = async () => {
1496
+ return invoke$3(/* RecentlyOpened.getRecentlyOpened */'RecentlyOpened.getRecentlyOpened');
1497
+ };
1498
+ const getKeyBindings = async () => {
1499
+ return invoke$3('KeyBindingsInitial.getKeyBindings');
1500
+ };
1501
+ const writeClipBoardText = async text => {
1502
+ await invoke$3('ClipBoard.writeText', /* text */text);
1503
+ };
1504
+ const writeClipBoardImage = async blob => {
1505
+ // @ts-ignore
1506
+ await invoke$3('ClipBoard.writeImage', /* text */blob);
1507
+ };
1508
+ const searchFileMemory = async uri => {
1509
+ // @ts-ignore
1510
+ return invoke$3('ExtensionHost.searchFileWithMemory', uri);
1511
+ };
1512
+ const searchFileFetch = async uri => {
1513
+ return invoke$3('ExtensionHost.searchFileWithFetch', uri);
1514
+ };
1515
+ const showMessageBox = async options => {
1516
+ return invoke$3('ElectronDialog.showMessageBox', options);
1517
+ };
1518
+ const handleDebugResumed = async params => {
1519
+ await invoke$3('Run And Debug.handleResumed', params);
1520
+ };
1521
+ const openWidget = async name => {
1522
+ await invoke$3('Viewlet.openWidget', name);
1523
+ };
1524
+ const getIcons = async requests => {
1525
+ const icons = await invoke$3('IconTheme.getIcons', requests);
1526
+ return icons;
1527
+ };
1528
+ const activateByEvent = event => {
1529
+ return invoke$3('ExtensionHostManagement.activateByEvent', event);
1530
+ };
1531
+ const setAdditionalFocus = focusKey => {
1532
+ // @ts-ignore
1533
+ return invoke$3('Focus.setAdditionalFocus', focusKey);
1534
+ };
1535
+ const getActiveEditorId = () => {
1536
+ // @ts-ignore
1537
+ return invoke$3('GetActiveEditor.getActiveEditorId');
1538
+ };
1539
+ const getWorkspacePath = () => {
1540
+ return invoke$3('Workspace.getPath');
1541
+ };
1542
+ const sendMessagePortToRendererProcess = async port => {
1543
+ const command = 'HandleMessagePort.handleMessagePort';
1544
+ // @ts-ignore
1545
+ await invokeAndTransfer$3('SendMessagePortToExtensionHostWorker.sendMessagePortToRendererProcess', port, command, DebugWorker$1);
1546
+ };
1547
+ const getPreference = async key => {
1548
+ return await invoke$3('Preferences.get', key);
1549
+ };
1550
+ const getAllExtensions = async () => {
1551
+ return invoke$3('ExtensionManagement.getAllExtensions');
1552
+ };
1553
+ const rerenderEditor = async key => {
1554
+ // @ts-ignore
1555
+ return invoke$3('Editor.rerender', key);
1556
+ };
1557
+ const handleDebugPaused = async params => {
1558
+ await invoke$3('Run And Debug.handlePaused', params);
1559
+ };
1560
+ const openUri = async (uri, focus, options) => {
1561
+ await invoke$3('Main.openUri', uri, focus, options);
1562
+ };
1563
+ const sendMessagePortToSyntaxHighlightingWorker = async port => {
1564
+ await invokeAndTransfer$3(
1565
+ // @ts-ignore
1566
+ 'SendMessagePortToSyntaxHighlightingWorker.sendMessagePortToSyntaxHighlightingWorker', port, 'HandleMessagePort.handleMessagePort2');
1567
+ };
1568
+ const handleDebugScriptParsed = async script => {
1569
+ await invoke$3('Run And Debug.handleScriptParsed', script);
1570
+ };
1571
+ const getWindowId = async () => {
1572
+ return invoke$3('GetWindowId.getWindowId');
1573
+ };
1574
+ const getBlob = async uri => {
1575
+ // @ts-ignore
1576
+ return invoke$3('FileSystem.getBlob', uri);
1577
+ };
1578
+ const getExtensionCommands = async () => {
1579
+ return invoke$3('ExtensionHost.getCommands');
1580
+ };
1581
+ const showErrorDialog = async errorInfo => {
1582
+ // @ts-ignore
1583
+ await invoke$3('ErrorHandling.showErrorDialog', errorInfo);
1584
+ };
1585
+ const getFolderSize = async uri => {
1586
+ // @ts-ignore
1587
+ return await invoke$3('FileSystem.getFolderSize', uri);
1588
+ };
1589
+ const getExtension = async id => {
1590
+ // @ts-ignore
1591
+ return invoke$3('ExtensionManagement.getExtension', id);
1592
+ };
1593
+ const getMarkdownDom = async html => {
1594
+ // @ts-ignore
1595
+ return invoke$3('Markdown.getVirtualDom', html);
1596
+ };
1597
+ const renderMarkdown = async (markdown, options) => {
1598
+ // @ts-ignore
1599
+ return invoke$3('Markdown.renderMarkdown', markdown, options);
1600
+ };
1601
+ const openNativeFolder = async uri => {
1602
+ // @ts-ignore
1603
+ await invoke$3('OpenNativeFolder.openNativeFolder', uri);
1604
+ };
1605
+ const uninstallExtension = async id => {
1606
+ return invoke$3('ExtensionManagement.uninstall', id);
1607
+ };
1608
+ const installExtension = async id => {
1609
+ // @ts-ignore
1610
+ return invoke$3('ExtensionManagement.install', id);
1611
+ };
1612
+ const openExtensionSearch = async () => {
1613
+ // @ts-ignore
1614
+ return invoke$3('SideBar.openViewlet', 'Extensions');
1615
+ };
1616
+ const setExtensionsSearchValue = async searchValue => {
1617
+ // @ts-ignore
1618
+ return invoke$3('Extensions.handleInput', searchValue);
1619
+ };
1620
+ const openExternal = async uri => {
1621
+ // @ts-ignore
1622
+ await invoke$3('Open.openExternal', uri);
1623
+ };
1624
+ const openUrl = async uri => {
1625
+ // @ts-ignore
1626
+ await invoke$3('Open.openUrl', uri);
1627
+ };
1628
+ const getAllPreferences = async () => {
1629
+ // @ts-ignore
1630
+ return invoke$3('Preferences.getAll');
1631
+ };
1632
+ const RendererWorker = {
1633
+ __proto__: null,
1634
+ activateByEvent,
1635
+ applyBulkReplacement,
1636
+ closeWidget,
1637
+ confirm,
1638
+ disableExtension,
1639
+ dispose: dispose$3,
1640
+ enableExtension,
1641
+ getActiveEditorId,
1642
+ getAllExtensions,
1643
+ getAllPreferences,
1644
+ getBlob,
1645
+ getChromeVersion,
1646
+ getColorThemeNames,
1647
+ getElectronVersion,
1648
+ getExtension,
1649
+ getExtensionCommands,
1650
+ getFileHandles,
1651
+ getFileIcon,
1652
+ getFilePathElectron,
1653
+ getFolderIcon,
1654
+ getFolderSize,
1655
+ getIcons,
1656
+ getKeyBindings,
1657
+ getMarkdownDom,
1658
+ getNodeVersion,
1659
+ getPreference,
1660
+ getRecentlyOpened,
1661
+ getV8Version,
1662
+ getWebViewSecret,
1663
+ getWindowId,
1664
+ getWorkspacePath,
1665
+ handleDebugChange,
1666
+ handleDebugPaused,
1667
+ handleDebugResumed,
1668
+ handleDebugScriptParsed,
1669
+ installExtension,
1670
+ invoke: invoke$3,
1671
+ invokeAndTransfer: invokeAndTransfer$3,
1672
+ openExtensionSearch,
1673
+ openExternal,
1674
+ openNativeFolder,
1675
+ openUri,
1676
+ openUrl,
1677
+ openWidget,
1678
+ readFile,
1679
+ registerWebViewInterceptor,
1680
+ renderMarkdown,
1681
+ rerenderEditor,
1682
+ searchFileFetch,
1683
+ searchFileHtml,
1684
+ searchFileMemory,
1685
+ sendMessagePortToEditorWorker,
1686
+ sendMessagePortToExtensionHostWorker,
1687
+ sendMessagePortToFileSystemWorker,
1688
+ sendMessagePortToMarkdownWorker,
1689
+ sendMessagePortToRendererProcess,
1690
+ sendMessagePortToSearchProcess,
1691
+ sendMessagePortToSyntaxHighlightingWorker,
1692
+ set: set$3,
1693
+ setAdditionalFocus,
1694
+ setColorTheme,
1695
+ setExtensionsSearchValue,
1696
+ setFocus,
1697
+ setWebViewPort,
1698
+ setWorkspacePath,
1699
+ showContextMenu,
1700
+ showErrorDialog,
1701
+ showMessageBox,
1702
+ uninstallExtension,
1703
+ unregisterWebViewInterceptor,
1704
+ writeClipBoardImage,
1705
+ writeClipBoardText
1706
+ };
1707
+
1228
1708
  const getPreferences = async () => {
1229
- return {};
1709
+ try {
1710
+ return await RendererWorker.getAllPreferences();
1711
+ } catch {
1712
+ return {};
1713
+ }
1230
1714
  };
1231
1715
 
1232
1716
  const ApplicationsTab = 'applications';
@@ -2332,375 +2816,391 @@ const unknownSettingType = () => {
2332
2816
  return i18nString(UnknownSettingType);
2333
2817
  };
2334
2818
 
2335
- const getSettingItems = async () => {
2819
+ const getSettingItemsApplications = () => {
2820
+ return [{
2821
+ id: 'telemetry',
2822
+ heading: telemetry(),
2823
+ description: telemetryDescription(),
2824
+ type: Boolean$1,
2825
+ value: 'true',
2826
+ category: ApplicationsTab
2827
+ }, {
2828
+ id: 'updates',
2829
+ heading: autoUpdates(),
2830
+ description: autoUpdatesDescription(),
2831
+ type: Boolean$1,
2832
+ value: 'true',
2833
+ category: ApplicationsTab
2834
+ }];
2835
+ };
2836
+
2837
+ const getSettingItemsEditor = () => {
2336
2838
  return [{
2337
- id: 'Editor.fontSize',
2839
+ id: 'editor.fontSize',
2338
2840
  heading: fontSize(),
2339
2841
  description: fontSizeDescription(),
2340
2842
  type: Number$1,
2341
2843
  value: 15,
2342
2844
  category: TextEditorTab
2343
2845
  }, {
2344
- id: 'Editor.fontFamily',
2846
+ id: 'editor.fontFamily',
2345
2847
  heading: fontFamily(),
2346
2848
  description: fontFamilyDescription(),
2347
2849
  type: String,
2348
2850
  value: 'Fira Code',
2349
2851
  category: TextEditorTab
2350
- },
2351
- // Text Editor Settings
2352
- {
2353
- id: 'Editor.wordWrap',
2852
+ }, {
2853
+ id: 'editor.wordWrap',
2354
2854
  heading: wordWrap(),
2355
2855
  description: wordWrapDescription(),
2356
2856
  type: Enum,
2357
2857
  value: 'off',
2358
2858
  category: TextEditorTab,
2359
2859
  options: [{
2360
- id: 'on',
2860
+ id: 'editor.on',
2361
2861
  label: 'On' // i18n
2362
2862
  }, {
2363
- id: 'off',
2863
+ id: 'editor.off',
2364
2864
  label: 'off' // i18n
2365
2865
  }]
2366
2866
  }, {
2367
- id: 'Editor.lineNumbers',
2867
+ id: 'editor.lineNumbers',
2368
2868
  heading: lineNumbers(),
2369
2869
  description: lineNumbersDescription(),
2370
2870
  type: Enum,
2371
2871
  value: 'on',
2372
2872
  category: TextEditorTab,
2373
2873
  options: [{
2374
- id: 'on',
2874
+ id: 'editor.on',
2375
2875
  label: 'On' // i18n
2376
2876
  }, {
2377
- id: 'off',
2877
+ id: 'editor.off',
2378
2878
  label: 'off' // i18n
2379
2879
  }]
2380
2880
  }, {
2381
- id: 'Editor.minimap',
2881
+ id: 'editor.minimap',
2382
2882
  heading: minimap(),
2383
2883
  description: minimapDescription(),
2384
2884
  type: Boolean$1,
2385
2885
  value: 'true',
2386
2886
  category: TextEditorTab
2387
2887
  }, {
2388
- id: 'Editor.scrollBeyondLastLine',
2888
+ id: 'editor.scrollBeyondLastLine',
2389
2889
  heading: scrollBeyondLastLine(),
2390
2890
  description: scrollBeyondLastLineDescription(),
2391
2891
  type: Boolean$1,
2392
2892
  value: 'false',
2393
2893
  category: TextEditorTab
2394
2894
  }, {
2395
- id: 'Editor.smoothScrolling',
2895
+ id: 'editor.smoothScrolling',
2396
2896
  heading: smoothScrolling(),
2397
2897
  description: smoothScrollingDescription(),
2398
2898
  type: Boolean$1,
2399
2899
  value: 'true',
2400
2900
  category: TextEditorTab
2401
2901
  }, {
2402
- id: 'Editor.cursorBlinking',
2902
+ id: 'editor.cursorBlinking',
2403
2903
  heading: cursorBlinking(),
2404
2904
  description: cursorBlinkingDescription(),
2405
2905
  type: String,
2406
2906
  value: 'blink',
2407
2907
  category: TextEditorTab
2408
2908
  }, {
2409
- id: 'Editor.cursorStyle',
2909
+ id: 'editor.cursorStyle',
2410
2910
  heading: cursorStyle(),
2411
2911
  description: cursorStyleDescription(),
2412
2912
  type: String,
2413
2913
  value: 'line',
2414
2914
  category: TextEditorTab
2415
2915
  }, {
2416
- id: 'Editor.cursorWidth',
2916
+ id: 'editor.cursorWidth',
2417
2917
  heading: cursorWidth(),
2418
2918
  description: cursorWidthDescription(),
2419
2919
  type: Number$1,
2420
2920
  value: '0',
2421
2921
  category: TextEditorTab
2422
2922
  }, {
2423
- id: 'Editor.tabSize',
2923
+ id: 'editor.tabSize',
2424
2924
  heading: tabSize(),
2425
2925
  description: tabSizeDescription(),
2426
2926
  type: Number$1,
2427
2927
  value: '4',
2428
2928
  category: TextEditorTab
2429
2929
  }, {
2430
- id: 'Editor.insertSpaces',
2930
+ id: 'editor.insertSpaces',
2431
2931
  heading: insertSpaces(),
2432
2932
  description: insertSpacesDescription(),
2433
2933
  type: Boolean$1,
2434
2934
  value: 'true',
2435
2935
  category: TextEditorTab
2436
2936
  }, {
2437
- id: 'Editor.detectIndentation',
2937
+ id: 'editor.detectIndentation',
2438
2938
  heading: detectIndentation(),
2439
2939
  description: detectIndentationDescription(),
2440
2940
  type: Boolean$1,
2441
2941
  value: 'true',
2442
2942
  category: TextEditorTab
2443
2943
  }, {
2444
- id: 'Editor.trimAutoWhitespace',
2944
+ id: 'editor.trimAutoWhitespace',
2445
2945
  heading: trimAutoWhitespace(),
2446
2946
  description: trimAutoWhitespaceDescription(),
2447
2947
  type: Boolean$1,
2448
2948
  value: 'true',
2449
2949
  category: TextEditorTab
2450
2950
  }, {
2451
- id: 'Editor.largeFileOptimizations',
2951
+ id: 'editor.largeFileOptimizations',
2452
2952
  heading: largeFileOptimizations(),
2453
2953
  description: largeFileOptimizationsDescription(),
2454
2954
  type: Boolean$1,
2455
2955
  value: 'true',
2456
2956
  category: TextEditorTab
2457
2957
  }, {
2458
- id: 'Editor.renderWhitespace',
2958
+ id: 'editor.renderWhitespace',
2459
2959
  heading: renderWhitespace(),
2460
2960
  description: renderWhitespaceDescription(),
2461
2961
  type: String,
2462
2962
  value: 'selection',
2463
2963
  category: TextEditorTab
2464
2964
  }, {
2465
- id: 'Editor.renderControlCharacters',
2965
+ id: 'editor.renderControlCharacters',
2466
2966
  heading: renderControlCharacters(),
2467
2967
  description: renderControlCharactersDescription(),
2468
2968
  type: Boolean$1,
2469
2969
  value: 'false',
2470
2970
  category: TextEditorTab
2471
2971
  }, {
2472
- id: 'Editor.renderLineHighlight',
2972
+ id: 'editor.renderLineHighlight',
2473
2973
  heading: renderLineHighlight(),
2474
2974
  description: renderLineHighlightDescription(),
2475
2975
  type: String,
2476
2976
  value: 'line',
2477
2977
  category: TextEditorTab
2478
2978
  }, {
2479
- id: 'Editor.codeLens',
2979
+ id: 'editor.codeLens',
2480
2980
  heading: codeLens(),
2481
2981
  description: codeLensDescription(),
2482
2982
  type: Boolean$1,
2483
2983
  value: 'true',
2484
2984
  category: TextEditorTab
2485
2985
  }, {
2486
- id: 'Editor.folding',
2986
+ id: 'editor.folding',
2487
2987
  heading: folding(),
2488
2988
  description: foldingDescription(),
2489
2989
  type: Boolean$1,
2490
2990
  value: 'true',
2491
2991
  category: TextEditorTab
2492
2992
  }, {
2493
- id: 'Editor.showFoldingControls',
2993
+ id: 'editor.showFoldingControls',
2494
2994
  heading: showFoldingControls(),
2495
2995
  description: showFoldingControlsDescription(),
2496
2996
  type: String,
2497
2997
  value: 'mouseover',
2498
2998
  category: TextEditorTab
2499
2999
  }, {
2500
- id: 'Editor.unfoldOnClickAfterEnd',
3000
+ id: 'editor.unfoldOnClickAfterEnd',
2501
3001
  heading: unfoldOnClickAfterEnd(),
2502
3002
  description: unfoldOnClickAfterEndDescription(),
2503
3003
  type: Boolean$1,
2504
3004
  value: 'false',
2505
3005
  category: TextEditorTab
2506
3006
  }, {
2507
- id: 'Editor.links',
3007
+ id: 'editor.links',
2508
3008
  heading: links(),
2509
3009
  description: linksDescription(),
2510
3010
  type: Boolean$1,
2511
3011
  value: 'true',
2512
3012
  category: TextEditorTab
2513
3013
  }, {
2514
- id: 'colorDecorators',
3014
+ id: 'editor.colorDecorators',
2515
3015
  heading: colorDecorators(),
2516
3016
  description: colorDecoratorsDescription(),
2517
3017
  type: Boolean$1,
2518
3018
  value: 'true',
2519
3019
  category: TextEditorTab
2520
3020
  }, {
2521
- id: 'lightbulb',
3021
+ id: 'editor.lightbulb',
2522
3022
  heading: lightbulb(),
2523
3023
  description: lightbulbDescription(),
2524
3024
  type: Boolean$1,
2525
3025
  value: 'true',
2526
3026
  category: TextEditorTab
2527
3027
  }, {
2528
- id: 'codeActionsOnSave',
3028
+ id: 'editor.codeActionsOnSave',
2529
3029
  heading: codeActionsOnSave(),
2530
3030
  description: codeActionsOnSaveDescription(),
2531
3031
  type: Boolean$1,
2532
3032
  value: 'false',
2533
3033
  category: TextEditorTab
2534
3034
  }, {
2535
- id: 'formatOnPaste',
3035
+ id: 'editor.formatOnPaste',
2536
3036
  heading: formatOnPaste(),
2537
3037
  description: formatOnPasteDescription(),
2538
3038
  type: Boolean$1,
2539
3039
  value: 'false',
2540
3040
  category: TextEditorTab
2541
3041
  }, {
2542
- id: 'formatOnType',
3042
+ id: 'editor.formatOnType',
2543
3043
  heading: formatOnType(),
2544
3044
  description: formatOnTypeDescription(),
2545
3045
  type: Boolean$1,
2546
3046
  value: 'false',
2547
3047
  category: TextEditorTab
2548
3048
  }, {
2549
- id: 'acceptSuggestionOnCommitCharacter',
3049
+ id: 'editor.acceptSuggestionOnCommitCharacter',
2550
3050
  heading: acceptSuggestionOnCommitCharacter(),
2551
3051
  description: acceptSuggestionOnCommitCharacterDescription(),
2552
3052
  type: Boolean$1,
2553
3053
  value: 'true',
2554
3054
  category: TextEditorTab
2555
3055
  }, {
2556
- id: 'acceptSuggestionOnEnter',
3056
+ id: 'editor.acceptSuggestionOnEnter',
2557
3057
  heading: acceptSuggestionOnEnter(),
2558
3058
  description: acceptSuggestionOnEnterDescription(),
2559
3059
  type: String,
2560
3060
  value: 'on',
2561
3061
  category: TextEditorTab
2562
3062
  }, {
2563
- id: 'tabCompletion',
3063
+ id: 'editor.tabCompletion',
2564
3064
  heading: tabCompletion(),
2565
3065
  description: tabCompletionDescription(),
2566
3066
  type: String,
2567
3067
  value: 'on',
2568
3068
  category: TextEditorTab
2569
3069
  }, {
2570
- id: 'wordBasedSuggestions',
3070
+ id: 'editor.wordBasedSuggestions',
2571
3071
  heading: wordBasedSuggestions(),
2572
3072
  description: wordBasedSuggestionsDescription(),
2573
3073
  type: Boolean$1,
2574
3074
  value: 'true',
2575
3075
  category: TextEditorTab
2576
3076
  }, {
2577
- id: 'suggestOnTriggerCharacters',
3077
+ id: 'editor.suggestOnTriggerCharacters',
2578
3078
  heading: suggestOnTriggerCharacters(),
2579
3079
  description: suggestOnTriggerCharactersDescription(),
2580
3080
  type: Boolean$1,
2581
3081
  value: 'true',
2582
3082
  category: TextEditorTab
2583
3083
  }, {
2584
- id: 'quickSuggestions',
3084
+ id: 'editor.quickSuggestions',
2585
3085
  heading: quickSuggestions(),
2586
3086
  description: quickSuggestionsDescription(),
2587
3087
  type: Boolean$1,
2588
3088
  value: 'true',
2589
3089
  category: TextEditorTab
2590
3090
  }, {
2591
- id: 'parameterHints',
3091
+ id: 'editor.parameterHints',
2592
3092
  heading: parameterHints(),
2593
3093
  description: parameterHintsDescription(),
2594
3094
  type: Boolean$1,
2595
3095
  value: 'true',
2596
3096
  category: TextEditorTab
2597
3097
  }, {
2598
- id: 'autoClosingBrackets',
3098
+ id: 'editor.autoClosingBrackets',
2599
3099
  heading: autoClosingBrackets(),
2600
3100
  description: autoClosingBracketsDescription(),
2601
3101
  type: String,
2602
3102
  value: 'always',
2603
3103
  category: TextEditorTab
2604
3104
  }, {
2605
- id: 'autoClosingQuotes',
3105
+ id: 'editor.autoClosingQuotes',
2606
3106
  heading: autoClosingQuotes(),
2607
3107
  description: autoClosingQuotesDescription(),
2608
3108
  type: String,
2609
3109
  value: 'always',
2610
3110
  category: TextEditorTab
2611
3111
  }, {
2612
- id: 'autoClosingOvertype',
3112
+ id: 'editor.autoClosingOvertype',
2613
3113
  heading: autoClosingOvertype(),
2614
3114
  description: autoClosingOvertypeDescription(),
2615
3115
  type: String,
2616
3116
  value: 'auto',
2617
3117
  category: TextEditorTab
2618
3118
  }, {
2619
- id: 'autoClosingDelete',
3119
+ id: 'editor.autoClosingDelete',
2620
3120
  heading: autoClosingDelete(),
2621
3121
  description: autoClosingDeleteDescription(),
2622
3122
  type: String,
2623
3123
  value: 'auto',
2624
3124
  category: TextEditorTab
2625
3125
  }, {
2626
- id: 'autoSurround',
3126
+ id: 'editor.autoSurround',
2627
3127
  heading: autoSurround(),
2628
3128
  description: autoSurroundDescription(),
2629
3129
  type: String,
2630
3130
  value: 'quotes',
2631
3131
  category: TextEditorTab
2632
3132
  }, {
2633
- id: 'bracketPairColorization',
3133
+ id: 'editor.bracketPairColorization',
2634
3134
  heading: bracketPairColorization(),
2635
3135
  description: bracketPairColorizationDescription(),
2636
3136
  type: Boolean$1,
2637
3137
  value: 'true',
2638
3138
  category: TextEditorTab
2639
3139
  }, {
2640
- id: 'guides',
3140
+ id: 'editor.guides',
2641
3141
  heading: guides(),
2642
3142
  description: guidesDescription(),
2643
3143
  type: Boolean$1,
2644
3144
  value: 'true',
2645
3145
  category: TextEditorTab
2646
3146
  }, {
2647
- id: 'dragAndDrop',
3147
+ id: 'editor.dragAndDrop',
2648
3148
  heading: dragAndDrop(),
2649
3149
  description: dragAndDropDescription(),
2650
3150
  type: Boolean$1,
2651
3151
  value: 'true',
2652
3152
  category: TextEditorTab
2653
3153
  }, {
2654
- id: 'copyWithSyntaxHighlighting',
3154
+ id: 'editor.copyWithSyntaxHighlighting',
2655
3155
  heading: copyWithSyntaxHighlighting(),
2656
3156
  description: copyWithSyntaxHighlightingDescription(),
2657
3157
  type: Boolean$1,
2658
3158
  value: 'true',
2659
3159
  category: TextEditorTab
2660
3160
  }, {
2661
- id: 'multiCursorModifier',
3161
+ id: 'editor.multiCursorModifier',
2662
3162
  heading: multiCursorModifier(),
2663
3163
  description: multiCursorModifierDescription(),
2664
3164
  type: String,
2665
3165
  value: 'alt',
2666
3166
  category: TextEditorTab
2667
3167
  }, {
2668
- id: 'multiCursorPaste',
3168
+ id: 'editor.multiCursorPaste',
2669
3169
  heading: multiCursorPaste(),
2670
3170
  description: multiCursorPasteDescription(),
2671
3171
  type: String,
2672
3172
  value: 'full',
2673
3173
  category: TextEditorTab
2674
3174
  }, {
2675
- id: 'occurrencesHighlight',
3175
+ id: 'editor.occurrencesHighlight',
2676
3176
  heading: occurrencesHighlight(),
2677
3177
  description: occurrencesHighlightDescription(),
2678
3178
  type: Boolean$1,
2679
3179
  value: 'true',
2680
3180
  category: TextEditorTab
2681
3181
  }, {
2682
- id: 'selectionHighlight',
3182
+ id: 'editor.selectionHighlight',
2683
3183
  heading: selectionHighlight(),
2684
3184
  description: selectionHighlightDescription(),
2685
3185
  type: Boolean$1,
2686
3186
  value: 'true',
2687
3187
  category: TextEditorTab
2688
3188
  }, {
2689
- id: 'semanticHighlighting',
3189
+ id: 'editor.semanticHighlighting',
2690
3190
  heading: semanticHighlighting(),
2691
3191
  description: semanticHighlightingDescription(),
2692
3192
  type: Boolean$1,
2693
3193
  value: 'true',
2694
3194
  category: TextEditorTab
2695
3195
  }, {
2696
- id: 'tokenColorCustomizations',
3196
+ id: 'editor.tokenColorCustomizations',
2697
3197
  heading: tokenColorCustomizations(),
2698
3198
  description: tokenColorCustomizationsDescription(),
2699
3199
  type: String,
2700
3200
  value: '{}',
2701
3201
  category: TextEditorTab
2702
3202
  }, {
2703
- id: 'workbenchColorCustomizations',
3203
+ id: 'editor.workbenchColorCustomizations',
2704
3204
  heading: workbenchColorCustomizations(),
2705
3205
  description: workbenchColorCustomizationsDescription(),
2706
3206
  type: String,
@@ -2714,491 +3214,483 @@ const getSettingItems = async () => {
2714
3214
  value: '{}',
2715
3215
  category: TextEditorTab
2716
3216
  }, {
2717
- id: 'diffEditor',
3217
+ id: 'editor.diffEditor',
2718
3218
  heading: diffEditor(),
2719
3219
  description: diffEditorDescription(),
2720
3220
  type: Boolean$1,
2721
3221
  value: 'true',
2722
3222
  category: TextEditorTab
2723
3223
  }, {
2724
- id: 'diffWordWrap',
3224
+ id: 'editor.diffWordWrap',
2725
3225
  heading: diffWordWrap(),
2726
3226
  description: diffWordWrapDescription(),
2727
3227
  type: String,
2728
3228
  value: 'inherit',
2729
3229
  category: TextEditorTab
2730
3230
  }, {
2731
- id: 'diffCodeLens',
3231
+ id: 'editor.diffCodeLens',
2732
3232
  heading: diffCodeLens(),
2733
3233
  description: diffCodeLensDescription(),
2734
3234
  type: Boolean$1,
2735
3235
  value: 'true',
2736
3236
  category: TextEditorTab
2737
3237
  }, {
2738
- id: 'diffRenderSideBySide',
3238
+ id: 'editor.diffRenderSideBySide',
2739
3239
  heading: diffRenderSideBySide(),
2740
3240
  description: diffRenderSideBySideDescription(),
2741
3241
  type: Boolean$1,
2742
3242
  value: 'true',
2743
3243
  category: TextEditorTab
2744
3244
  }, {
2745
- id: 'diffIgnoreTrimWhitespace',
3245
+ id: 'editor.diffIgnoreTrimWhitespace',
2746
3246
  heading: diffIgnoreTrimWhitespace(),
2747
3247
  description: diffIgnoreTrimWhitespaceDescription(),
2748
3248
  type: Boolean$1,
2749
3249
  value: 'false',
2750
3250
  category: TextEditorTab
2751
3251
  }, {
2752
- id: 'diffRenderIndicators',
3252
+ id: 'editor.diffRenderIndicators',
2753
3253
  heading: diffRenderIndicators(),
2754
3254
  description: diffRenderIndicatorsDescription(),
2755
3255
  type: Boolean$1,
2756
3256
  value: 'true',
2757
3257
  category: TextEditorTab
2758
3258
  }, {
2759
- id: 'diffRenderOverviewRuler',
3259
+ id: 'editor.diffRenderOverviewRuler',
2760
3260
  heading: diffRenderOverviewRuler(),
2761
3261
  description: diffRenderOverviewRulerDescription(),
2762
3262
  type: Boolean$1,
2763
3263
  value: 'true',
2764
3264
  category: TextEditorTab
2765
3265
  }, {
2766
- id: 'diffRenderMarginRevertIcon',
3266
+ id: 'editor.diffRenderMarginRevertIcon',
2767
3267
  heading: diffRenderMarginRevertIcon(),
2768
3268
  description: diffRenderMarginRevertIconDescription(),
2769
3269
  type: Boolean$1,
2770
3270
  value: 'true',
2771
3271
  category: TextEditorTab
2772
- },
2773
- // Additional Text Editor Settings
2774
- {
2775
- id: 'insertMode',
3272
+ }, {
3273
+ id: 'editor.insertMode',
2776
3274
  heading: insertMode(),
2777
3275
  description: insertModeDescription(),
2778
3276
  type: Boolean$1,
2779
3277
  value: 'true',
2780
3278
  category: TextEditorTab
2781
3279
  }, {
2782
- id: 'overwriteMode',
3280
+ id: 'editor.overwriteMode',
2783
3281
  heading: overwriteMode(),
2784
3282
  description: overwriteModeDescription(),
2785
3283
  type: Boolean$1,
2786
3284
  value: 'false',
2787
3285
  category: TextEditorTab
2788
3286
  }, {
2789
- id: 'readOnly',
3287
+ id: 'editor.readOnly',
2790
3288
  heading: readOnly(),
2791
3289
  description: readOnlyDescription(),
2792
3290
  type: Boolean$1,
2793
3291
  value: 'false',
2794
3292
  category: TextEditorTab
2795
3293
  }, {
2796
- id: 'accessibilitySupport',
3294
+ id: 'editor.accessibilitySupport',
2797
3295
  heading: accessibilitySupport(),
2798
3296
  description: accessibilitySupportDescription(),
2799
3297
  type: String,
2800
3298
  value: 'auto',
2801
3299
  category: TextEditorTab
2802
3300
  }, {
2803
- id: 'autoIndent',
3301
+ id: 'editor.autoIndent',
2804
3302
  heading: autoIndent(),
2805
3303
  description: autoIndentDescription(),
2806
3304
  type: Boolean$1,
2807
3305
  value: 'true',
2808
3306
  category: TextEditorTab
2809
3307
  }, {
2810
- id: 'bracketMatching',
3308
+ id: 'editor.bracketMatching',
2811
3309
  heading: bracketMatching(),
2812
3310
  description: bracketMatchingDescription(),
2813
3311
  type: Boolean$1,
2814
3312
  value: 'true',
2815
3313
  category: TextEditorTab
2816
3314
  }, {
2817
- id: 'centeredLayout',
3315
+ id: 'editor.centeredLayout',
2818
3316
  heading: centeredLayout(),
2819
3317
  description: centeredLayoutDescription(),
2820
3318
  type: Boolean$1,
2821
3319
  value: 'false',
2822
3320
  category: TextEditorTab
2823
3321
  }, {
2824
- id: 'columnSelection',
3322
+ id: 'editor.columnSelection',
2825
3323
  heading: columnSelection(),
2826
3324
  description: columnSelectionDescription(),
2827
3325
  type: Boolean$1,
2828
3326
  value: 'false',
2829
3327
  category: TextEditorTab
2830
3328
  }, {
2831
- id: 'contextmenu',
3329
+ id: 'editor.contextmenu',
2832
3330
  heading: contextmenu(),
2833
3331
  description: contextmenuDescription(),
2834
3332
  type: Boolean$1,
2835
3333
  value: 'true',
2836
3334
  category: TextEditorTab
2837
3335
  }, {
2838
- id: 'cursorSmoothCaretAnimation',
3336
+ id: 'editor.cursorSmoothCaretAnimation',
2839
3337
  heading: cursorSmoothCaretAnimation(),
2840
3338
  description: cursorSmoothCaretAnimationDescription(),
2841
3339
  type: String,
2842
3340
  value: 'off',
2843
3341
  category: TextEditorTab
2844
3342
  }, {
2845
- id: 'cursorSurroundingLines',
3343
+ id: 'editor.cursorSurroundingLines',
2846
3344
  heading: cursorSurroundingLines(),
2847
3345
  description: cursorSurroundingLinesDescription(),
2848
3346
  type: Number$1,
2849
3347
  value: '3',
2850
3348
  category: TextEditorTab
2851
3349
  }, {
2852
- id: 'cursorSurroundingLinesStyle',
3350
+ id: 'editor.cursorSurroundingLinesStyle',
2853
3351
  heading: cursorSurroundingLinesStyle(),
2854
3352
  description: cursorSurroundingLinesStyleDescription(),
2855
3353
  type: String,
2856
3354
  value: 'all',
2857
3355
  category: TextEditorTab
2858
3356
  }, {
2859
- id: 'disableMonospaceOptimizations',
3357
+ id: 'editor.disableMonospaceOptimizations',
2860
3358
  heading: disableMonospaceOptimizations(),
2861
3359
  description: disableMonospaceOptimizationsDescription(),
2862
3360
  type: Boolean$1,
2863
3361
  value: 'false',
2864
3362
  category: TextEditorTab
2865
3363
  }, {
2866
- id: 'emptySelectionClipboard',
3364
+ id: 'editor.emptySelectionClipboard',
2867
3365
  heading: emptySelectionClipboard(),
2868
3366
  description: emptySelectionClipboardDescription(),
2869
3367
  type: Boolean$1,
2870
3368
  value: 'true',
2871
3369
  category: TextEditorTab
2872
3370
  }, {
2873
- id: 'extraEditorClassName',
3371
+ id: 'editor.extraEditorClassName',
2874
3372
  heading: extraEditorClassName(),
2875
3373
  description: extraEditorClassNameDescription(),
2876
3374
  type: String,
2877
3375
  value: '',
2878
3376
  category: TextEditorTab
2879
3377
  }, {
2880
- id: 'fastScrollSensitivity',
3378
+ id: 'editor.fastScrollSensitivity',
2881
3379
  heading: fastScrollSensitivity(),
2882
3380
  description: fastScrollSensitivityDescription(),
2883
3381
  type: Number$1,
2884
3382
  value: '5',
2885
3383
  category: TextEditorTab
2886
3384
  }, {
2887
- id: 'find',
3385
+ id: 'editor.find',
2888
3386
  heading: find(),
2889
3387
  description: findDescription(),
2890
3388
  type: Boolean$1,
2891
3389
  value: 'true',
2892
3390
  category: TextEditorTab
2893
3391
  }, {
2894
- id: 'fixedOverflowWidgets',
3392
+ id: 'editor.fixedOverflowWidgets',
2895
3393
  heading: fixedOverflowWidgets(),
2896
3394
  description: fixedOverflowWidgetsDescription(),
2897
3395
  type: Boolean$1,
2898
3396
  value: 'false',
2899
3397
  category: TextEditorTab
2900
3398
  }, {
2901
- id: 'foldingStrategy',
3399
+ id: 'editor.foldingStrategy',
2902
3400
  heading: foldingStrategy(),
2903
3401
  description: foldingStrategyDescription(),
2904
3402
  type: String,
2905
3403
  value: 'auto',
2906
3404
  category: TextEditorTab
2907
3405
  }, {
2908
- id: 'fontLigatures',
3406
+ id: 'editor.fontLigatures',
2909
3407
  heading: fontLigatures(),
2910
3408
  description: fontLigaturesDescription(),
2911
3409
  type: Boolean$1,
2912
3410
  value: 'false',
2913
3411
  category: TextEditorTab
2914
3412
  }, {
2915
- id: 'glyphMargin',
3413
+ id: 'editor.glyphMargin',
2916
3414
  heading: glyphMargin(),
2917
3415
  description: glyphMarginDescription(),
2918
3416
  type: Boolean$1,
2919
3417
  value: 'true',
2920
3418
  category: TextEditorTab
2921
3419
  }, {
2922
- id: 'gotoLocation',
3420
+ id: 'editor.gotoLocation',
2923
3421
  heading: gotoLocation(),
2924
3422
  description: gotoLocationDescription(),
2925
3423
  type: String,
2926
3424
  value: 'mouse',
2927
3425
  category: TextEditorTab
2928
3426
  }, {
2929
- id: 'hideCursorInOverviewRuler',
3427
+ id: 'editor.hideCursorInOverviewRuler',
2930
3428
  heading: hideCursorInOverviewRuler(),
2931
3429
  description: hideCursorInOverviewRulerDescription(),
2932
3430
  type: Boolean$1,
2933
3431
  value: 'false',
2934
3432
  category: TextEditorTab
2935
3433
  }, {
2936
- id: 'hover',
3434
+ id: 'editor.hover',
2937
3435
  heading: hover(),
2938
3436
  description: hoverDescription(),
2939
3437
  type: Boolean$1,
2940
3438
  value: 'true',
2941
3439
  category: TextEditorTab
2942
3440
  }, {
2943
- id: 'inDiffEditor',
3441
+ id: 'editor.inDiffEditor',
2944
3442
  heading: inDiffEditor(),
2945
3443
  description: inDiffEditorDescription(),
2946
3444
  type: Boolean$1,
2947
3445
  value: 'false',
2948
3446
  category: TextEditorTab
2949
3447
  }, {
2950
- id: 'letterSpacing',
3448
+ id: 'editor.letterSpacing',
2951
3449
  heading: letterSpacing(),
2952
3450
  description: letterSpacingDescription(),
2953
3451
  type: Number$1,
2954
3452
  value: '0',
2955
3453
  category: TextEditorTab
2956
3454
  }, {
2957
- id: 'lightbulbEnabled',
3455
+ id: 'editor.lightbulbEnabled',
2958
3456
  heading: lightbulbEnabled(),
2959
3457
  description: lightbulbEnabledDescription(),
2960
3458
  type: Boolean$1,
2961
3459
  value: 'true',
2962
3460
  category: TextEditorTab
2963
3461
  }, {
2964
- id: 'lineDecorationsWidth',
3462
+ id: 'editor.lineDecorationsWidth',
2965
3463
  heading: lineDecorationsWidth(),
2966
3464
  description: lineDecorationsWidthDescription(),
2967
3465
  type: Number$1,
2968
3466
  value: '10',
2969
3467
  category: TextEditorTab
2970
3468
  }, {
2971
- id: 'lineHeight',
3469
+ id: 'editor.lineHeight',
2972
3470
  heading: lineHeight(),
2973
3471
  description: lineHeightDescription(),
2974
3472
  type: Number$1,
2975
3473
  value: '0',
2976
3474
  category: TextEditorTab
2977
3475
  }, {
2978
- id: 'matchBrackets',
3476
+ id: 'editor.matchBrackets',
2979
3477
  heading: matchBrackets(),
2980
3478
  description: matchBracketsDescription(),
2981
3479
  type: Boolean$1,
2982
3480
  value: 'true',
2983
3481
  category: TextEditorTab
2984
3482
  }, {
2985
- id: 'minimapEnabled',
3483
+ id: 'editor.minimapEnabled',
2986
3484
  heading: minimapEnabled(),
2987
3485
  description: minimapEnabledDescription(),
2988
3486
  type: Boolean$1,
2989
3487
  value: 'true',
2990
3488
  category: TextEditorTab
2991
3489
  }, {
2992
- id: 'mouseWheelScrollSensitivity',
3490
+ id: 'editor.mouseWheelScrollSensitivity',
2993
3491
  heading: mouseWheelScrollSensitivity(),
2994
3492
  description: mouseWheelScrollSensitivityDescription(),
2995
3493
  type: Number$1,
2996
3494
  value: '1',
2997
3495
  category: TextEditorTab
2998
3496
  }, {
2999
- id: 'mouseWheelZoom',
3497
+ id: 'editor.mouseWheelZoom',
3000
3498
  heading: mouseWheelZoom(),
3001
3499
  description: mouseWheelZoomDescription(),
3002
3500
  type: Boolean$1,
3003
3501
  value: 'false',
3004
3502
  category: TextEditorTab
3005
3503
  }, {
3006
- id: 'multiCursorMergeOverlapping',
3504
+ id: 'editor.multiCursorMergeOverlapping',
3007
3505
  heading: multiCursorMergeOverlapping(),
3008
3506
  description: multiCursorMergeOverlappingDescription(),
3009
3507
  type: Boolean$1,
3010
3508
  value: 'true',
3011
3509
  category: TextEditorTab
3012
3510
  }, {
3013
- id: 'overviewRulerBorder',
3511
+ id: 'editor.overviewRulerBorder',
3014
3512
  heading: overviewRulerBorder(),
3015
3513
  description: overviewRulerBorderDescription(),
3016
3514
  type: Boolean$1,
3017
3515
  value: 'true',
3018
3516
  category: TextEditorTab
3019
3517
  }, {
3020
- id: 'overviewRulerLanes',
3518
+ id: 'editor.overviewRulerLanes',
3021
3519
  heading: overviewRulerLanes(),
3022
3520
  description: overviewRulerLanesDescription(),
3023
3521
  type: Number$1,
3024
3522
  value: '3',
3025
3523
  category: TextEditorTab
3026
3524
  }, {
3027
- id: 'peekWidgetDefaultFocus',
3525
+ id: 'editor.peekWidgetDefaultFocus',
3028
3526
  heading: peekWidgetDefaultFocus(),
3029
3527
  description: peekWidgetDefaultFocusDescription(),
3030
3528
  type: String,
3031
3529
  value: 'editor',
3032
3530
  category: TextEditorTab
3033
3531
  }, {
3034
- id: 'quickSuggestionsDelay',
3532
+ id: 'editor.quickSuggestionsDelay',
3035
3533
  heading: quickSuggestionsDelay(),
3036
3534
  description: quickSuggestionsDelayDescription(),
3037
3535
  type: Number$1,
3038
3536
  value: '10',
3039
3537
  category: TextEditorTab
3040
3538
  }, {
3041
- id: 'renderFinalNewline',
3539
+ id: 'editor.renderFinalNewline',
3042
3540
  heading: renderFinalNewline(),
3043
3541
  description: renderFinalNewlineDescription(),
3044
3542
  type: Boolean$1,
3045
3543
  value: 'true',
3046
3544
  category: TextEditorTab
3047
3545
  }, {
3048
- id: 'renderValidationDecorations',
3546
+ id: 'editor.renderValidationDecorations',
3049
3547
  heading: renderValidationDecorations(),
3050
3548
  description: renderValidationDecorationsDescription(),
3051
3549
  type: Boolean$1,
3052
3550
  value: 'true',
3053
3551
  category: TextEditorTab
3054
3552
  }, {
3055
- id: 'revealHorizontalRightPadding',
3553
+ id: 'editor.revealHorizontalRightPadding',
3056
3554
  heading: revealHorizontalRightPadding(),
3057
3555
  description: revealHorizontalRightPaddingDescription(),
3058
3556
  type: Number$1,
3059
3557
  value: '30',
3060
3558
  category: TextEditorTab
3061
3559
  }, {
3062
- id: 'roundedSelection',
3560
+ id: 'editor.roundedSelection',
3063
3561
  heading: roundedSelection(),
3064
3562
  description: roundedSelectionDescription(),
3065
3563
  type: Boolean$1,
3066
3564
  value: 'true',
3067
3565
  category: TextEditorTab
3068
3566
  }, {
3069
- id: 'rulers',
3567
+ id: 'editor.rulers',
3070
3568
  heading: rulers(),
3071
3569
  description: rulersDescription(),
3072
3570
  type: String,
3073
3571
  value: '[]',
3074
3572
  category: TextEditorTab
3075
3573
  }, {
3076
- id: 'scrollBeyondLastColumn',
3574
+ id: 'editor.scrollBeyondLastColumn',
3077
3575
  heading: scrollBeyondLastColumn(),
3078
3576
  description: scrollBeyondLastColumnDescription(),
3079
3577
  type: Number$1,
3080
3578
  value: '5',
3081
3579
  category: TextEditorTab
3082
3580
  }, {
3083
- id: 'scrollbar',
3581
+ id: 'editor.scrollbar',
3084
3582
  heading: scrollbar(),
3085
3583
  description: scrollbarDescription(),
3086
3584
  type: String,
3087
3585
  value: 'auto',
3088
3586
  category: TextEditorTab
3089
3587
  }, {
3090
- id: 'scrollPredominantAxis',
3588
+ id: 'editor.scrollPredominantAxis',
3091
3589
  heading: scrollPredominantAxis(),
3092
3590
  description: scrollPredominantAxisDescription(),
3093
3591
  type: Boolean$1,
3094
3592
  value: 'true',
3095
3593
  category: TextEditorTab
3096
3594
  }, {
3097
- id: 'selectionClipboard',
3595
+ id: 'editor.selectionClipboard',
3098
3596
  heading: selectionClipboard(),
3099
3597
  description: selectionClipboardDescription(),
3100
3598
  type: Boolean$1,
3101
3599
  value: 'true',
3102
3600
  category: TextEditorTab
3103
3601
  }, {
3104
- id: 'Editor.background',
3602
+ id: 'editor.background',
3105
3603
  heading: 'Editor background',
3106
3604
  description: 'Editor background color',
3107
3605
  type: Color,
3108
3606
  value: '#567567',
3109
3607
  category: TextEditorTab
3110
3608
  }, {
3111
- id: 'showUnused',
3609
+ id: 'editor.showUnused',
3112
3610
  heading: showUnused(),
3113
3611
  description: showUnusedDescription(),
3114
3612
  type: Boolean$1,
3115
3613
  value: 'true',
3116
3614
  category: TextEditorTab
3117
3615
  }, {
3118
- id: 'snippetSuggestions',
3616
+ id: 'editor.snippetSuggestions',
3119
3617
  heading: snippetSuggestions(),
3120
3618
  description: snippetSuggestionsDescription(),
3121
3619
  type: String,
3122
3620
  value: 'bottom',
3123
3621
  category: TextEditorTab
3124
3622
  }, {
3125
- id: 'suggest',
3623
+ id: 'editor.suggest',
3126
3624
  heading: suggest(),
3127
3625
  description: suggestDescription(),
3128
3626
  type: Boolean$1,
3129
3627
  value: 'true',
3130
3628
  category: TextEditorTab
3131
3629
  }, {
3132
- id: 'suggestFontSize',
3630
+ id: 'editor.suggestFontSize',
3133
3631
  heading: suggestFontSize(),
3134
3632
  description: suggestFontSizeDescription(),
3135
3633
  type: Number$1,
3136
3634
  value: '0',
3137
3635
  category: TextEditorTab
3138
3636
  }, {
3139
- id: 'suggestLineHeight',
3637
+ id: 'editor.suggestLineHeight',
3140
3638
  heading: suggestLineHeight(),
3141
3639
  description: suggestLineHeightDescription(),
3142
3640
  type: Number$1,
3143
3641
  value: '0',
3144
3642
  category: TextEditorTab
3145
3643
  }, {
3146
- id: 'suggestSelection',
3644
+ id: 'editor.suggestSelection',
3147
3645
  heading: suggestSelection(),
3148
3646
  description: suggestSelectionDescription(),
3149
3647
  type: String,
3150
3648
  value: 'recentlyUsed',
3151
3649
  category: TextEditorTab
3152
3650
  }, {
3153
- id: 'useTabStops',
3651
+ id: 'editor.useTabStops',
3154
3652
  heading: useTabStops(),
3155
3653
  description: useTabStopsDescription(),
3156
3654
  type: Boolean$1,
3157
3655
  value: 'true',
3158
3656
  category: TextEditorTab
3159
3657
  }, {
3160
- id: 'wordSeparators',
3658
+ id: 'editor.wordSeparators',
3161
3659
  heading: wordSeparators(),
3162
3660
  description: wordSeparatorsDescription(),
3163
3661
  type: String,
3164
3662
  value: '`~!@#$%^&*()-=+[{]}\\|;:\'",.<>/?',
3165
3663
  category: TextEditorTab
3166
3664
  }, {
3167
- id: 'wrappingIndent',
3665
+ id: 'editor.wrappingIndent',
3168
3666
  heading: wrappingIndent(),
3169
3667
  description: wrappingIndentDescription(),
3170
3668
  type: String,
3171
3669
  value: 'same',
3172
3670
  category: TextEditorTab
3671
+ }];
3672
+ };
3673
+
3674
+ const getSettingItemsExtensions = () => {
3675
+ return [{
3676
+ id: 'extensionsAutoUpdate',
3677
+ heading: autoUpdateExtensions(),
3678
+ description: autoUpdateExtensionsDescription(),
3679
+ type: Boolean$1,
3680
+ value: 'true',
3681
+ category: ExtensionsTab
3173
3682
  }, {
3174
- id: 'theme',
3175
- heading: theme(),
3176
- description: themeDescription(),
3177
- type: String,
3178
- value: 'Dark',
3179
- category: WorkbenchTab
3180
- }, {
3181
- id: 'sidebarPosition',
3182
- heading: sidebarPosition(),
3183
- description: sidebarPositionDescription(),
3184
- type: String,
3185
- value: 'Left',
3186
- category: WorkbenchTab
3187
- }, {
3188
- id: 'windowTitle',
3189
- heading: windowTitle(),
3190
- description: windowTitleDescription(),
3191
- type: String,
3192
- value: 'Settings View',
3193
- category: WindowTab
3194
- }, {
3195
- id: 'windowSize',
3196
- heading: windowSize(),
3197
- description: windowSizeDescription(),
3198
- type: String,
3199
- value: '1024x768',
3200
- category: WindowTab
3201
- }, {
3683
+ id: 'extensionRecommendations',
3684
+ heading: extensionRecommendations(),
3685
+ description: extensionRecommendationsDescription(),
3686
+ type: Boolean$1,
3687
+ value: 'true',
3688
+ category: ExtensionsTab
3689
+ }];
3690
+ };
3691
+
3692
+ const getSettingItemsFeatures = () => {
3693
+ return [{
3202
3694
  id: 'autoSave',
3203
3695
  heading: autoSave(),
3204
3696
  description: autoSaveDescription(),
@@ -3212,21 +3704,11 @@ const getSettingItems = async () => {
3212
3704
  type: Boolean$1,
3213
3705
  value: 'false',
3214
3706
  category: FeaturesTab
3215
- }, {
3216
- id: 'telemetry',
3217
- heading: telemetry(),
3218
- description: telemetryDescription(),
3219
- type: Boolean$1,
3220
- value: 'true',
3221
- category: ApplicationsTab
3222
- }, {
3223
- id: 'updates',
3224
- heading: autoUpdates(),
3225
- description: autoUpdatesDescription(),
3226
- type: Boolean$1,
3227
- value: 'true',
3228
- category: ApplicationsTab
3229
- }, {
3707
+ }];
3708
+ };
3709
+
3710
+ const getSettingItemsSecurity = () => {
3711
+ return [{
3230
3712
  id: 'encryption',
3231
3713
  heading: fileEncryption(),
3232
3714
  description: fileEncryptionDescription(),
@@ -3240,23 +3722,49 @@ const getSettingItems = async () => {
3240
3722
  type: Boolean$1,
3241
3723
  value: 'false',
3242
3724
  category: SecurityTab
3725
+ }];
3726
+ };
3727
+
3728
+ const getSettingItemsWindow = () => {
3729
+ return [{
3730
+ id: 'windowTitle',
3731
+ heading: windowTitle(),
3732
+ description: windowTitleDescription(),
3733
+ type: String,
3734
+ value: 'Settings View',
3735
+ category: WindowTab
3243
3736
  }, {
3244
- id: 'extensionsAutoUpdate',
3245
- heading: autoUpdateExtensions(),
3246
- description: autoUpdateExtensionsDescription(),
3247
- type: Boolean$1,
3248
- value: 'true',
3249
- category: ExtensionsTab
3737
+ id: 'windowSize',
3738
+ heading: windowSize(),
3739
+ description: windowSizeDescription(),
3740
+ type: String,
3741
+ value: '1024x768',
3742
+ category: WindowTab
3743
+ }];
3744
+ };
3745
+
3746
+ const getSettingItemsWorkbench = () => {
3747
+ return [{
3748
+ id: 'theme',
3749
+ heading: theme(),
3750
+ description: themeDescription(),
3751
+ type: String,
3752
+ value: 'Dark',
3753
+ category: WorkbenchTab
3250
3754
  }, {
3251
- id: 'extensionRecommendations',
3252
- heading: extensionRecommendations(),
3253
- description: extensionRecommendationsDescription(),
3254
- type: Boolean$1,
3255
- value: 'true',
3256
- category: ExtensionsTab
3755
+ id: 'sidebarPosition',
3756
+ heading: sidebarPosition(),
3757
+ description: sidebarPositionDescription(),
3758
+ type: String,
3759
+ value: 'Left',
3760
+ category: WorkbenchTab
3257
3761
  }];
3258
3762
  };
3259
3763
 
3764
+ const getSettingItems = async () => {
3765
+ return [...getSettingItemsEditor(), ...getSettingItemsWorkbench(), ...getSettingItemsWindow(), ...getSettingItemsFeatures(), ...getSettingItemsApplications(), ...getSettingItemsSecurity(), ...getSettingItemsExtensions()];
3766
+ };
3767
+
3260
3768
  const getTabs = () => {
3261
3769
  const tabs = [{
3262
3770
  id: TextEditorTab,
@@ -3290,88 +3798,107 @@ const getTabs = () => {
3290
3798
  return tabs;
3291
3799
  };
3292
3800
 
3801
+ const getSavedDeltaY = savedState => {
3802
+ if (savedState && typeof savedState === 'object' && 'deltaY' in savedState && typeof savedState.deltaY === 'number') {
3803
+ return savedState.deltaY;
3804
+ }
3805
+ return 0;
3806
+ };
3807
+
3808
+ const getSavedHistory = savedState => {
3809
+ if (savedState && typeof savedState === 'object' && 'history' in savedState && Array.isArray(savedState.history)) {
3810
+ // Validate that all items are strings and limit to last 10 items
3811
+ const validHistory = savedState.history.filter(item => typeof item === 'string').slice(-10); // Keep only the last 10 items
3812
+ return validHistory;
3813
+ }
3814
+ return [];
3815
+ };
3816
+
3817
+ const getSavedHistoryIndex = (savedState, history) => {
3818
+ if (savedState && typeof savedState === 'object' && 'historyIndex' in savedState && typeof savedState.historyIndex === 'number') {
3819
+ const {
3820
+ historyIndex
3821
+ } = savedState;
3822
+ // Ensure historyIndex is within valid bounds
3823
+ if (historyIndex >= 0 && historyIndex < history.length) {
3824
+ return historyIndex;
3825
+ }
3826
+ }
3827
+ return -1;
3828
+ };
3829
+
3293
3830
  const getSavedMinLineY = savedState => {
3294
3831
  if (savedState && typeof savedState === 'object' && 'minLineY' in savedState && typeof savedState.minLineY === 'number') {
3295
3832
  return savedState.minLineY;
3296
3833
  }
3297
3834
  return 0;
3298
3835
  };
3299
- const getSavedSearchValue = savedState => {
3300
- if (savedState && typeof savedState === 'object' && 'searchValue' in savedState && typeof savedState.searchValue === 'string') {
3301
- return savedState.searchValue;
3302
- }
3303
- return '';
3304
- };
3305
- const getSavedDeltaY = savedState => {
3306
- if (savedState && typeof savedState === 'object' && 'deltaY' in savedState && typeof savedState.deltaY === 'number') {
3307
- return savedState.deltaY;
3836
+
3837
+ const getSavedScrollOffset = savedState => {
3838
+ if (savedState && typeof savedState === 'object' && 'scrollOffset' in savedState && typeof savedState.scrollOffset === 'number') {
3839
+ return savedState.scrollOffset;
3308
3840
  }
3309
3841
  return 0;
3310
3842
  };
3311
- const getSavedWorkspacePath = savedState => {
3312
- if (savedState && typeof savedState === 'object' && 'workspacePath' in savedState && typeof savedState.workspacePath === 'string') {
3313
- return savedState.workspacePath;
3843
+
3844
+ const getSavedSearchValue = savedState => {
3845
+ if (savedState && typeof savedState === 'object' && 'searchValue' in savedState && typeof savedState.searchValue === 'string') {
3846
+ return savedState.searchValue;
3314
3847
  }
3315
3848
  return '';
3316
3849
  };
3850
+
3317
3851
  const getSavedTabId = savedState => {
3318
3852
  if (savedState && typeof savedState === 'object' && 'selectedTab' in savedState && typeof savedState.selectedTab === 'string') {
3319
3853
  return savedState.selectedTab;
3320
3854
  }
3321
3855
  return '';
3322
3856
  };
3323
- const getSavedScrollOffset = savedState => {
3324
- if (savedState && typeof savedState === 'object' && 'scrollOffset' in savedState && typeof savedState.scrollOffset === 'number') {
3325
- return savedState.scrollOffset;
3326
- }
3327
- return 0;
3328
- };
3857
+
3329
3858
  const restoreState = savedState => {
3330
3859
  if (!savedState) {
3331
3860
  return {
3332
- root: '',
3333
3861
  minLineY: 0,
3334
3862
  deltaY: 0,
3335
3863
  tabId: '',
3336
3864
  searchValue: '',
3337
- scrollOffset: 0
3865
+ scrollOffset: 0,
3866
+ history: [],
3867
+ historyIndex: -1
3338
3868
  };
3339
3869
  }
3340
- const root = getSavedWorkspacePath(savedState);
3341
3870
  const minLineY = getSavedMinLineY(savedState);
3342
3871
  const deltaY = getSavedDeltaY(savedState);
3343
3872
  const tabId = getSavedTabId(savedState);
3344
3873
  const searchValue = getSavedSearchValue(savedState);
3345
3874
  const scrollOffset = getSavedScrollOffset(savedState);
3875
+ const history = getSavedHistory(savedState);
3876
+ const historyIndex = getSavedHistoryIndex(savedState, history);
3346
3877
  return {
3347
- root,
3348
3878
  minLineY,
3349
3879
  deltaY,
3350
3880
  tabId,
3351
3881
  searchValue,
3352
- scrollOffset
3882
+ scrollOffset,
3883
+ history,
3884
+ historyIndex
3353
3885
  };
3354
3886
  };
3355
3887
 
3356
- const getModifiedSettings = preferences => {
3357
- const modifiedSettings = Object.create(null);
3358
- for (const key of Object.keys(preferences)) {
3359
- modifiedSettings[key] = true;
3360
- }
3361
- return modifiedSettings;
3362
- };
3363
3888
  const loadContent = async (state, savedState) => {
3364
3889
  const {
3365
3890
  searchValue,
3366
3891
  tabId,
3367
- scrollOffset
3892
+ scrollOffset,
3893
+ history,
3894
+ historyIndex
3368
3895
  } = restoreState(savedState);
3369
3896
  const tabs = getTabs();
3370
3897
  const newTabs = getUpdatedTabs(tabs, tabId);
3371
3898
  const items = await getSettingItems();
3372
3899
  const preferences = await getPreferences();
3373
3900
  const modifiedSettings = getModifiedSettings(preferences);
3374
- const filteredItems = getFilteredItems(items, newTabs, searchValue, preferences);
3901
+ const filteredItems = getFilteredItems(items, newTabs, searchValue, modifiedSettings);
3375
3902
  return {
3376
3903
  ...state,
3377
3904
  filteredItems,
@@ -3381,7 +3908,9 @@ const loadContent = async (state, savedState) => {
3381
3908
  preferences,
3382
3909
  scrollOffset,
3383
3910
  searchValue,
3384
- tabs: newTabs
3911
+ tabs: newTabs,
3912
+ history,
3913
+ historyIndex
3385
3914
  };
3386
3915
  };
3387
3916
 
@@ -3398,52 +3927,6 @@ const renderFocusContext = (oldState, newState) => {
3398
3927
  return ['Viewlet.setFocusContext', focusKey];
3399
3928
  };
3400
3929
 
3401
- const Tab$1 = 'tab';
3402
- const TabList = 'tablist';
3403
- const AriaRoles = {
3404
- __proto__: null,
3405
- Tab: Tab$1,
3406
- TabList};
3407
- const Viewlet$1 = 'Viewlet';
3408
- const ClassNames = {
3409
- __proto__: null,
3410
- Viewlet: Viewlet$1};
3411
- const mergeClassNames = (...classNames) => {
3412
- return classNames.filter(Boolean).join(' ');
3413
- };
3414
- const Button$1 = 1;
3415
- const Div = 4;
3416
- const H1 = 5;
3417
- const Input = 6;
3418
- const Text = 12;
3419
- const H3 = 23;
3420
- const Aside = 28;
3421
- const P = 50;
3422
- const Ul = 60;
3423
- const Select$1 = 63;
3424
- const Option = 64;
3425
- const Label = 66;
3426
- const VirtualDomElements = {
3427
- __proto__: null,
3428
- Aside,
3429
- Button: Button$1,
3430
- Div,
3431
- H1,
3432
- H3,
3433
- Input,
3434
- Label,
3435
- Option,
3436
- P,
3437
- Select: Select$1,
3438
- Ul};
3439
- const text = data => {
3440
- return {
3441
- type: Text,
3442
- text: data,
3443
- childCount: 0
3444
- };
3445
- };
3446
-
3447
3930
  const {
3448
3931
  Viewlet
3449
3932
  } = ClassNames;
@@ -3455,6 +3938,7 @@ const InputBox = 'InputBox';
3455
3938
  const InputButton = 'InputButton';
3456
3939
  const MaskIcon = 'MaskIcon';
3457
3940
  const MaskIconClearAll = 'MaskIconClearAll';
3941
+ const ModifiedIndicator = 'ModifiedIndicator';
3458
3942
  const SearchFieldButton = 'SearchFieldButton';
3459
3943
  const Select = 'Select';
3460
3944
  const Settings = 'Settings';
@@ -3495,16 +3979,19 @@ const HandleScroll = 'handleScroll';
3495
3979
  const HandleSettingSelect = 'handleSettingSelect';
3496
3980
  const HandleInputFocus = 'handleInputFocus';
3497
3981
 
3498
- const getButtonClassName = hasSearchValue => {
3982
+ const enabledClass = mergeClassNames(Button, InputButton, SearchFieldButton);
3983
+ const disabledClass = mergeClassNames(enabledClass, Disabled);
3984
+ const getClearButtonClassName = hasSearchValue => {
3499
3985
  if (hasSearchValue) {
3500
- return mergeClassNames(Button, InputButton, SearchFieldButton);
3986
+ return disabledClass;
3501
3987
  }
3502
- return mergeClassNames(Button, InputButton, SearchFieldButton, Disabled);
3988
+ return enabledClass;
3503
3989
  };
3990
+
3504
3991
  const getSettingsInputButtonsDom = hasSearchValue => {
3505
3992
  return [{
3506
3993
  type: VirtualDomElements.Button,
3507
- className: getButtonClassName(hasSearchValue),
3994
+ className: getClearButtonClassName(hasSearchValue),
3508
3995
  childCount: 1,
3509
3996
  ariaLabel: clear(),
3510
3997
  name: Clear$1,
@@ -3588,11 +4075,12 @@ const getItemCheckBoxVirtualDom = item => {
3588
4075
  }, text(description)];
3589
4076
  };
3590
4077
 
4078
+ const parent = {
4079
+ type: VirtualDomElements.H3,
4080
+ childCount: 1
4081
+ };
3591
4082
  const getItemHeadingDom = heading => {
3592
- return [{
3593
- type: VirtualDomElements.H3,
3594
- childCount: 1
3595
- }, text(heading)];
4083
+ return [parent, text(heading)];
3596
4084
  };
3597
4085
 
3598
4086
  const getItemLabelDom = (domId, label) => {
@@ -3635,6 +4123,17 @@ const getItemColorVirtualDom = item => {
3635
4123
  }, ...getItemLabelDom(domId, description)];
3636
4124
  };
3637
4125
 
4126
+ const getSettingsModifiedIndicatorDom = isModified => {
4127
+ if (!isModified) {
4128
+ return [];
4129
+ }
4130
+ return [{
4131
+ type: VirtualDomElements.Div,
4132
+ className: ModifiedIndicator,
4133
+ childCount: 0
4134
+ }];
4135
+ };
4136
+
3638
4137
  const getItemNumberVirtualDom = item => {
3639
4138
  const {
3640
4139
  heading,
@@ -3644,13 +4143,14 @@ const getItemNumberVirtualDom = item => {
3644
4143
  } = item;
3645
4144
  const domId = getInputId(id);
3646
4145
  const isModified = modified || false;
4146
+ const modifiedChildCount = isModified ? 1 : 0;
3647
4147
  return [{
3648
4148
  type: VirtualDomElements.Div,
3649
4149
  className: SettingsItem,
3650
- childCount: 3,
4150
+ childCount: 3 + modifiedChildCount,
3651
4151
  role: 'group',
3652
4152
  'data-modified': isModified
3653
- }, ...getItemHeadingDom(heading), ...getItemLabelDom(domId, description), {
4153
+ }, ...getSettingsModifiedIndicatorDom(isModified), ...getItemHeadingDom(heading), ...getItemLabelDom(domId, description), {
3654
4154
  type: VirtualDomElements.Input,
3655
4155
  className: InputBox,
3656
4156
  inputType: 'number',
@@ -3868,10 +4368,10 @@ const getSettingsDom = state => {
3868
4368
  const {
3869
4369
  tabs,
3870
4370
  filteredItems,
3871
- searchValue,
3872
- filteredItemsCount
4371
+ searchValue
3873
4372
  } = state;
3874
4373
  const hasSearchValue = searchValue.trim().length > 0;
4374
+ const filteredItemsCount = filteredItems.length;
3875
4375
  return [{
3876
4376
  type: VirtualDomElements.Div,
3877
4377
  childCount: 2,
@@ -3992,19 +4492,21 @@ const saveState = state => {
3992
4492
  tabs,
3993
4493
  searchValue,
3994
4494
  scrollOffset,
3995
- focus
4495
+ focus,
4496
+ history,
4497
+ historyIndex
3996
4498
  } = state;
3997
4499
  const selectedTab = getSelectedTabId(tabs);
3998
4500
  return {
3999
- expandedPaths: [],
4000
- root: '',
4001
4501
  minLineY: 0,
4002
4502
  maxLineY: 0,
4003
4503
  deltaY: 0,
4004
4504
  searchValue,
4005
4505
  selectedTab,
4006
4506
  scrollOffset,
4007
- focus
4507
+ focus,
4508
+ history,
4509
+ historyIndex
4008
4510
  };
4009
4511
  };
4010
4512
 
@@ -4014,14 +4516,14 @@ const useNextSearchValue = state => {
4014
4516
  historyIndex,
4015
4517
  items,
4016
4518
  tabs,
4017
- preferences
4519
+ modifiedSettings
4018
4520
  } = state;
4019
4521
  if (history.length === 0 || historyIndex >= history.length - 1) {
4020
4522
  return state;
4021
4523
  }
4022
4524
  const newHistoryIndex = historyIndex + 1;
4023
4525
  const newSearchValue = history[newHistoryIndex];
4024
- const filteredItems = getFilteredItems(items, tabs, newSearchValue, preferences);
4526
+ const filteredItems = getFilteredItems(items, tabs, newSearchValue, modifiedSettings);
4025
4527
  return {
4026
4528
  ...state,
4027
4529
  searchValue: newSearchValue,
@@ -4037,14 +4539,14 @@ const usePreviousSearchValue = state => {
4037
4539
  historyIndex,
4038
4540
  items,
4039
4541
  tabs,
4040
- preferences
4542
+ modifiedSettings
4041
4543
  } = state;
4042
4544
  if (history.length === 0 || historyIndex <= 0) {
4043
4545
  return state;
4044
4546
  }
4045
4547
  const newHistoryIndex = historyIndex - 1;
4046
4548
  const newSearchValue = history[newHistoryIndex];
4047
- const filteredItems = getFilteredItems(items, tabs, newSearchValue, preferences);
4549
+ const filteredItems = getFilteredItems(items, tabs, newSearchValue, modifiedSettings);
4048
4550
  return {
4049
4551
  ...state,
4050
4552
  searchValue: newSearchValue,
@@ -4063,6 +4565,7 @@ const commandMap = {
4063
4565
  'Settings.getName': getName,
4064
4566
  'Settings.getCommandIds': getCommandIds,
4065
4567
  'Settings.handleClickTab': wrapCommand(handleClickTab),
4568
+ 'Settings.handleInputBlur': wrapCommand(handleInputBlur),
4066
4569
  'Settings.handleInput': wrapCommand(handleInput),
4067
4570
  'Settings.handleScroll': wrapCommand(handleScroll),
4068
4571
  'Settings.handleSettingChecked': wrapCommand(handleSettingChecked),
@@ -4078,48 +4581,8 @@ const commandMap = {
4078
4581
  'Settings.terminate': terminate,
4079
4582
  'Settings.useNextSearchValue': wrapCommand(useNextSearchValue),
4080
4583
  'Settings.usePreviousSearchValue': wrapCommand(usePreviousSearchValue),
4081
- 'Settings.getKeyBindings': getKeyBindings
4082
- };
4083
-
4084
- const rpcs = Object.create(null);
4085
- const set$g = (id, rpc) => {
4086
- rpcs[id] = rpc;
4584
+ 'Settings.getKeyBindings': getKeyBindings$1
4087
4585
  };
4088
- const get = id => {
4089
- return rpcs[id];
4090
- };
4091
-
4092
- /* eslint-disable @typescript-eslint/explicit-function-return-type */
4093
-
4094
- const create = rpcId => {
4095
- return {
4096
- // @ts-ignore
4097
- invoke(method, ...params) {
4098
- const rpc = get(rpcId);
4099
- // @ts-ignore
4100
- return rpc.invoke(method, ...params);
4101
- },
4102
- // @ts-ignore
4103
- invokeAndTransfer(method, ...params) {
4104
- const rpc = get(rpcId);
4105
- // @ts-ignore
4106
- return rpc.invokeAndTransfer(method, ...params);
4107
- },
4108
- set(rpc) {
4109
- set$g(rpcId, rpc);
4110
- },
4111
- async dispose() {
4112
- const rpc = get(rpcId);
4113
- await rpc.dispose();
4114
- }
4115
- };
4116
- };
4117
- const RendererWorker$1 = 1;
4118
- const {
4119
- set: set$3} = create(RendererWorker$1);
4120
- const RendererWorker = {
4121
- __proto__: null,
4122
- set: set$3};
4123
4586
 
4124
4587
  const {
4125
4588
  set