@lvce-editor/title-bar-worker 4.5.0 → 4.6.1
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.
- package/dist/titleBarWorkerMain.js +67 -23
- package/package.json +1 -1
|
@@ -1583,6 +1583,7 @@ const CommandPalette = 'Command Palette';
|
|
|
1583
1583
|
const Edit$1 = 'Edit';
|
|
1584
1584
|
const EditorLayout = 'Editor Layout';
|
|
1585
1585
|
const FlipLayout = 'Flip Layout';
|
|
1586
|
+
const FullScreen = 'Full Screen';
|
|
1586
1587
|
const GridTwoByTwo = 'Grid (2x2)';
|
|
1587
1588
|
const Explorer = 'Explorer';
|
|
1588
1589
|
const File$2 = 'File';
|
|
@@ -1599,6 +1600,7 @@ const Problems = 'Problems';
|
|
|
1599
1600
|
const Run$1 = 'Run';
|
|
1600
1601
|
const Search = 'Search';
|
|
1601
1602
|
const Selection$1 = 'Selection';
|
|
1603
|
+
const ShowAllCommands = 'Show All Commands';
|
|
1602
1604
|
const SourceControl = 'Source Control';
|
|
1603
1605
|
const Terminal$1 = 'Terminal';
|
|
1604
1606
|
const ToggleDeveloperTools = 'Toggle Developer Tools';
|
|
@@ -1652,6 +1654,9 @@ const selection = () => {
|
|
|
1652
1654
|
const view = () => {
|
|
1653
1655
|
return i18nString(View$1);
|
|
1654
1656
|
};
|
|
1657
|
+
const fullScreen = () => {
|
|
1658
|
+
return i18nString(FullScreen);
|
|
1659
|
+
};
|
|
1655
1660
|
const go = () => {
|
|
1656
1661
|
return i18nString(Go$1);
|
|
1657
1662
|
};
|
|
@@ -1916,8 +1921,23 @@ const checkedEntry = (id, label, keyboardShortCut = '') => {
|
|
|
1916
1921
|
label
|
|
1917
1922
|
};
|
|
1918
1923
|
};
|
|
1924
|
+
const commandEntry = (id, label, command, keyboardShortCut = '', flags = None) => {
|
|
1925
|
+
return {
|
|
1926
|
+
command,
|
|
1927
|
+
flags,
|
|
1928
|
+
id,
|
|
1929
|
+
keyboardShortCut,
|
|
1930
|
+
label
|
|
1931
|
+
};
|
|
1932
|
+
};
|
|
1919
1933
|
const getMenuEntries$e = () => {
|
|
1920
|
-
return [
|
|
1934
|
+
return [{
|
|
1935
|
+
command: 'Window.toggleFullScreen',
|
|
1936
|
+
flags: None,
|
|
1937
|
+
id: 'fullScreen',
|
|
1938
|
+
keyboardShortCut: 'F11',
|
|
1939
|
+
label: fullScreen()
|
|
1940
|
+
}, entry('zenMode', 'Zen Mode', 'Ctrl+K Z'), entry('centeredLayout', 'Centered Layout'), menuEntrySeparator, checkedEntry('menuBar', 'Menu Bar'), commandEntry('primarySideBar', 'Primary Side Bar', 'Layout.toggleSideBar', 'Ctrl+B'), commandEntry('secondarySideBar', 'Secondary Side Bar', 'Layout.toggleSecondarySideBar', 'Ctrl+Alt+B'), commandEntry('statusBar', 'Status Bar', 'Layout.toggleStatusBar', '', Checked), commandEntry('panel', 'Panel', 'Layout.togglePanel', 'Ctrl+J', Checked), menuEntrySeparator, entry('movePrimarySideBarLeft', 'Move Primary Side Bar Left'), entry('activityBarPosition', 'Activity Bar Position'), entry('panelPosition', 'Panel Position'), entry('alignPanel', 'Align Panel'), entry('tabBar', 'Tab Bar'), entry('editorActionsPosition', 'Editor Actions Position'), menuEntrySeparator, entry('minimap', 'Minimap'), entry('breadcrumbs', 'Breadcrumbs'), entry('stickyScroll', 'Sticky Scroll'), entry('renderWhitespace', 'Render Whitespace'), checkedEntry('renderControlCharacters', 'Render Control Characters'), menuEntrySeparator, commandEntry('zoomIn', 'Zoom In', 'Window.zoomIn', 'Ctrl+='), commandEntry('zoomOut', 'Zoom Out', 'Window.zoomOut', 'Ctrl+-'), commandEntry('resetZoom', 'Reset Zoom', 'Window.zoomReset', 'Ctrl+NumPad0')];
|
|
1921
1941
|
};
|
|
1922
1942
|
|
|
1923
1943
|
const cut = () => {
|
|
@@ -2232,12 +2252,15 @@ const notImplementedMessage = {
|
|
|
2232
2252
|
message: 'Not implemented'
|
|
2233
2253
|
};
|
|
2234
2254
|
const notImplementedArgs = [notImplementedMessage, ['OK']];
|
|
2235
|
-
const notImplementedEntry = (id, label) => {
|
|
2255
|
+
const notImplementedEntry = (id, label, keyboardShortCut) => {
|
|
2236
2256
|
return {
|
|
2237
2257
|
args: notImplementedArgs,
|
|
2238
2258
|
command: 'Dialog.showMessage',
|
|
2239
2259
|
flags: None,
|
|
2240
2260
|
id,
|
|
2261
|
+
...(keyboardShortCut && {
|
|
2262
|
+
keyboardShortCut
|
|
2263
|
+
}),
|
|
2241
2264
|
label
|
|
2242
2265
|
};
|
|
2243
2266
|
};
|
|
@@ -2255,12 +2278,15 @@ const getMenuEntries$a = () => {
|
|
|
2255
2278
|
}, menuEntrySeparator, notImplementedEntry('goToFile', 'Go to File...'), notImplementedEntry('goToSymbolInWorkspace', 'Go to Symbol in Workspace...'), menuEntrySeparator, notImplementedEntry('goToSymbolInEditor', 'Go to Symbol in Editor...'), notImplementedEntry('goToDefinition', 'Go to Definition'), notImplementedEntry('goToDeclaration', 'Go to Declaration'), notImplementedEntry('goToTypeDefinition', 'Go to Type Definition'), notImplementedEntry('goToImplementations', 'Go to Implementations'), notImplementedEntry('goToReferences', 'Go to References'), menuEntrySeparator, notImplementedEntry('goToLineColumn', 'Go to Line/Column...'), notImplementedEntry('goToBracket', 'Go to Bracket'), menuEntrySeparator, notImplementedEntry('nextProblem', 'Next Problem'), notImplementedEntry('previousProblem', 'Previous Problem'), menuEntrySeparator, notImplementedEntry('nextChange', 'Next Change'), notImplementedEntry('previousChange', 'Previous Change')];
|
|
2256
2279
|
};
|
|
2257
2280
|
const getMenuEntriesSwitchEditor = () => {
|
|
2258
|
-
return [notImplementedEntry('
|
|
2281
|
+
return [notImplementedEntry('nextEditor', 'Next Editor', 'Ctrl+PageDown'), notImplementedEntry('previousEditor', 'Previous Editor', 'Ctrl+PageUp'), menuEntrySeparator, notImplementedEntry('nextUsedEditor', 'Next Used Editor'), notImplementedEntry('previousUsedEditor', 'Previous Used Editor'), menuEntrySeparator, notImplementedEntry('nextEditorInGroup', 'Next Editor in Group', 'Ctrl+K Ctrl+PageDown'), notImplementedEntry('previousEditorInGroup', 'Previous Editor in Group', 'Ctrl+K Ctrl+PageUp'), notImplementedEntry('nextUsedEditorInGroup', 'Next Used Editor in Group'), notImplementedEntry('previousUsedEditorInGroup', 'Previous Used Editor in Group')];
|
|
2259
2282
|
};
|
|
2260
2283
|
const getMenuEntriesSwitchGroup = () => {
|
|
2261
2284
|
return [notImplementedEntry('nextGroup', 'Next Group'), notImplementedEntry('previousGroup', 'Previous Group'), menuEntrySeparator, notImplementedEntry('groupOne', 'Group 1'), notImplementedEntry('groupTwo', 'Group 2'), notImplementedEntry('groupThree', 'Group 3'), notImplementedEntry('groupFour', 'Group 4'), notImplementedEntry('groupFive', 'Group 5'), notImplementedEntry('lastGroup', 'Last Group')];
|
|
2262
2285
|
};
|
|
2263
2286
|
|
|
2287
|
+
const showAllCommands = () => {
|
|
2288
|
+
return i18nString(ShowAllCommands);
|
|
2289
|
+
};
|
|
2264
2290
|
const toggleDeveloperTools = () => {
|
|
2265
2291
|
return i18nString(ToggleDeveloperTools);
|
|
2266
2292
|
};
|
|
@@ -2272,9 +2298,14 @@ const about = () => {
|
|
|
2272
2298
|
};
|
|
2273
2299
|
|
|
2274
2300
|
const getMenuEntries$9 = async platform => {
|
|
2275
|
-
const entries = [
|
|
2301
|
+
const entries = [{
|
|
2302
|
+
command: 'QuickPick.showCommands',
|
|
2303
|
+
flags: None,
|
|
2304
|
+
id: 'showAllCommands',
|
|
2305
|
+
label: showAllCommands()
|
|
2306
|
+
}];
|
|
2276
2307
|
if (platform !== Web) {
|
|
2277
|
-
entries.push({
|
|
2308
|
+
entries.push(menuEntrySeparator, {
|
|
2278
2309
|
command: 'Developer.toggleDeveloperTools',
|
|
2279
2310
|
flags: None,
|
|
2280
2311
|
id: 'toggleDeveloperTools',
|
|
@@ -2735,6 +2766,7 @@ const Copy = 'copy';
|
|
|
2735
2766
|
const Paste = 'paste';
|
|
2736
2767
|
const SelectAll = 'selectAll';
|
|
2737
2768
|
const ToggleDevTools = 'toggleDevTools';
|
|
2769
|
+
const Togglefullscreen = 'togglefullscreen';
|
|
2738
2770
|
const Help = 'help';
|
|
2739
2771
|
const Quit = 'quit';
|
|
2740
2772
|
const FileMenu = 'fileMenu';
|
|
@@ -2773,6 +2805,11 @@ const toElectronMenuItem = entry => {
|
|
|
2773
2805
|
role: FileMenu,
|
|
2774
2806
|
submenu: []
|
|
2775
2807
|
};
|
|
2808
|
+
case fullScreen():
|
|
2809
|
+
return {
|
|
2810
|
+
label: entry.label,
|
|
2811
|
+
role: Togglefullscreen
|
|
2812
|
+
};
|
|
2776
2813
|
case help():
|
|
2777
2814
|
return {
|
|
2778
2815
|
label: entry.label,
|
|
@@ -3537,23 +3574,25 @@ const TitleBarTopLevelEntry = 'TitleBarTopLevelEntry';
|
|
|
3537
3574
|
const TitleBarTopLevelEntryLabel = 'TitleBarTopLevelEntryLabel';
|
|
3538
3575
|
const Viewlet = 'Viewlet';
|
|
3539
3576
|
|
|
3540
|
-
const checkboxChecked = {
|
|
3541
|
-
ariaChecked: true,
|
|
3542
|
-
childCount: 2,
|
|
3543
|
-
className: mergeClassNames(MenuItem, MenuItemCheckMark),
|
|
3544
|
-
role: MenuItemCheckBox,
|
|
3545
|
-
tabIndex: -1,
|
|
3546
|
-
type: Div
|
|
3547
|
-
};
|
|
3548
3577
|
const checkMark = {
|
|
3549
3578
|
className: mergeClassNames(MenuItemCheckmarkIcon, MaskIconCheck),
|
|
3550
3579
|
type: Div
|
|
3551
3580
|
};
|
|
3552
3581
|
const getMenuItemCheckedDom = menuItem => {
|
|
3553
3582
|
const {
|
|
3583
|
+
isFocused,
|
|
3554
3584
|
label
|
|
3555
3585
|
} = menuItem;
|
|
3556
|
-
|
|
3586
|
+
const baseClassName = mergeClassNames(MenuItem, MenuItemCheckMark);
|
|
3587
|
+
const className = isFocused ? mergeClassNames(baseClassName, MenuItemFocused) : baseClassName;
|
|
3588
|
+
return [{
|
|
3589
|
+
ariaChecked: true,
|
|
3590
|
+
childCount: 2,
|
|
3591
|
+
className,
|
|
3592
|
+
role: MenuItemCheckBox,
|
|
3593
|
+
tabIndex: -1,
|
|
3594
|
+
type: Div
|
|
3595
|
+
}, checkMark, text(label)];
|
|
3557
3596
|
};
|
|
3558
3597
|
|
|
3559
3598
|
const getKeyBindingString = (key, altKey, ctrlKey, shiftKey, metaKey) => {
|
|
@@ -3663,19 +3702,20 @@ const getMenuItemSubMenuDom = menuItem => {
|
|
|
3663
3702
|
}, text(label), arrowRight];
|
|
3664
3703
|
};
|
|
3665
3704
|
|
|
3666
|
-
const checkboxUnchecked = {
|
|
3667
|
-
ariaChecked: false,
|
|
3668
|
-
childCount: 1,
|
|
3669
|
-
className: MenuItem,
|
|
3670
|
-
role: MenuItemCheckBox,
|
|
3671
|
-
tabIndex: -1,
|
|
3672
|
-
type: Div
|
|
3673
|
-
};
|
|
3674
3705
|
const getMenuItemUncheckedDom = menuItem => {
|
|
3675
3706
|
const {
|
|
3707
|
+
isFocused,
|
|
3676
3708
|
label
|
|
3677
3709
|
} = menuItem;
|
|
3678
|
-
|
|
3710
|
+
const className = isFocused ? mergeClassNames(MenuItem, MenuItemFocused) : MenuItem;
|
|
3711
|
+
return [{
|
|
3712
|
+
ariaChecked: false,
|
|
3713
|
+
childCount: 1,
|
|
3714
|
+
className,
|
|
3715
|
+
role: MenuItemCheckBox,
|
|
3716
|
+
tabIndex: -1,
|
|
3717
|
+
type: Div
|
|
3718
|
+
}, text(label)];
|
|
3679
3719
|
};
|
|
3680
3720
|
|
|
3681
3721
|
const getMenuItemRenderer = flags => {
|
|
@@ -4328,6 +4368,10 @@ const getFn = id => {
|
|
|
4328
4368
|
return getMenuEntries$e;
|
|
4329
4369
|
case MenuIdEditorLayout:
|
|
4330
4370
|
return getMenuEntries$c;
|
|
4371
|
+
case MenuIdSwitchEditor:
|
|
4372
|
+
return getMenuEntriesSwitchEditor;
|
|
4373
|
+
case MenuIdSwitchGroup:
|
|
4374
|
+
return getMenuEntriesSwitchGroup;
|
|
4331
4375
|
default:
|
|
4332
4376
|
return undefined;
|
|
4333
4377
|
}
|