@lvce-editor/title-bar-worker 4.27.0 → 4.28.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 +28 -3
- package/package.json +1 -1
|
@@ -2311,11 +2311,12 @@ const getMenuEntriesTitleBarContextMenu = async state => {
|
|
|
2311
2311
|
|
|
2312
2312
|
const MenuIdTitleBarContextMenu = 50;
|
|
2313
2313
|
const MenuIdAppearance = 'appearance';
|
|
2314
|
+
const MenuIdAlignPanel = 'alignPanel';
|
|
2314
2315
|
const MenuIdEditorLayout = 'editorLayout';
|
|
2315
2316
|
const MenuIdSwitchEditor = 'switchEditor';
|
|
2316
2317
|
const MenuIdSwitchGroup = 'switchGroup';
|
|
2317
2318
|
const getMenuIds = () => {
|
|
2318
|
-
return [Edit$2, File$3, Go$2, Help$3, OpenRecent$1, Run$2, Selection$2, Terminal$2, TitleBar$3, View$2, MenuIdAppearance, MenuIdEditorLayout, MenuIdSwitchEditor, MenuIdSwitchGroup, MenuIdTitleBarContextMenu, TitleBarContextMenu];
|
|
2319
|
+
return [Edit$2, File$3, Go$2, Help$3, OpenRecent$1, Run$2, Selection$2, Terminal$2, TitleBar$3, View$2, MenuIdAppearance, MenuIdAlignPanel, MenuIdEditorLayout, MenuIdSwitchEditor, MenuIdSwitchGroup, MenuIdTitleBarContextMenu, TitleBarContextMenu];
|
|
2319
2320
|
};
|
|
2320
2321
|
|
|
2321
2322
|
const nonTextEditorExtensions = new Set(['.avif', '.avi', '.bmp', '.gif', '.ico', '.jpeg', '.jpg', '.m4v', '.mkv', '.mov', '.mp4', '.mpeg', '.mpg', '.ogv', '.png', '.svg', '.tif', '.tiff', '.webm', '.webp']);
|
|
@@ -2419,7 +2420,27 @@ const getMenuEntries$e = async sideBarPosition => {
|
|
|
2419
2420
|
id: 'fullScreen',
|
|
2420
2421
|
keyboardShortCut: 'F11',
|
|
2421
2422
|
label: fullScreen()
|
|
2422
|
-
}, 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, movePrimarySideBarEntry, entry('activityBarPosition', 'Activity Bar Position'), entry('panelPosition', 'Panel Position'),
|
|
2423
|
+
}, 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, movePrimarySideBarEntry, entry('activityBarPosition', 'Activity Bar Position'), entry('panelPosition', 'Panel Position'), {
|
|
2424
|
+
command: '',
|
|
2425
|
+
flags: SubMenu$1,
|
|
2426
|
+
id: 'alignPanel',
|
|
2427
|
+
label: 'Align Panel'
|
|
2428
|
+
}, 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')];
|
|
2429
|
+
};
|
|
2430
|
+
const getAlignPanelMenuEntries = async () => {
|
|
2431
|
+
let currentAlignment;
|
|
2432
|
+
try {
|
|
2433
|
+
currentAlignment = await invoke$1('Layout.getPanelAlignment');
|
|
2434
|
+
} catch {
|
|
2435
|
+
currentAlignment = 'justify';
|
|
2436
|
+
}
|
|
2437
|
+
return ['center', 'justify', 'left', 'right'].map(alignment => ({
|
|
2438
|
+
args: [alignment],
|
|
2439
|
+
command: 'Layout.setPanelAlignment',
|
|
2440
|
+
flags: currentAlignment === alignment ? Checked : None,
|
|
2441
|
+
id: `alignPanel${alignment[0].toUpperCase()}${alignment.slice(1)}`,
|
|
2442
|
+
label: alignment[0].toUpperCase() + alignment.slice(1)
|
|
2443
|
+
}));
|
|
2423
2444
|
};
|
|
2424
2445
|
|
|
2425
2446
|
const cut = () => {
|
|
@@ -2700,7 +2721,7 @@ const getMenuEntries$b = async (platform, autoSave$1, hasActiveTextEditor = fals
|
|
|
2700
2721
|
label: openFile()
|
|
2701
2722
|
}, {
|
|
2702
2723
|
command: 'Dialog.openFolder',
|
|
2703
|
-
flags:
|
|
2724
|
+
flags: None,
|
|
2704
2725
|
id: 'openFolder',
|
|
2705
2726
|
label: openFolder()
|
|
2706
2727
|
}, {
|
|
@@ -3252,6 +3273,8 @@ const getMenuEntries2 = async (state, props) => {
|
|
|
3252
3273
|
return getMenuEntriesTitleBarContextMenu(state);
|
|
3253
3274
|
case View$2:
|
|
3254
3275
|
return getMenuEntries$1();
|
|
3276
|
+
case MenuIdAlignPanel:
|
|
3277
|
+
return getAlignPanelMenuEntries();
|
|
3255
3278
|
// @ts-ignore
|
|
3256
3279
|
case MenuIdAppearance:
|
|
3257
3280
|
return getMenuEntries$e();
|
|
@@ -5243,6 +5266,8 @@ const getFn = id => {
|
|
|
5243
5266
|
return getMenuEntries$2;
|
|
5244
5267
|
case View$2:
|
|
5245
5268
|
return getMenuEntries$1;
|
|
5269
|
+
case MenuIdAlignPanel:
|
|
5270
|
+
return getAlignPanelMenuEntries;
|
|
5246
5271
|
case MenuIdAppearance:
|
|
5247
5272
|
return getMenuEntries$e;
|
|
5248
5273
|
case MenuIdEditorLayout:
|