@codingame/monaco-vscode-view-common-service-override 4.5.0-improve-code-splitting.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.
Files changed (114) hide show
  1. package/assets/fake.html +10 -0
  2. package/assets/index-no-csp.html +1230 -0
  3. package/assets/index.html +1231 -0
  4. package/assets/service-worker.js +457 -0
  5. package/index.d.ts +1 -0
  6. package/index.js +1 -0
  7. package/override/vs/workbench/browser/parts/editor/textEditor.js +5 -0
  8. package/override/vs/workbench/browser/parts/editor/textEditor.weak.js +11 -0
  9. package/package.json +32 -0
  10. package/tools/editorAssets.js +4 -0
  11. package/tools/url.js +10 -0
  12. package/viewCommon.d.ts +5 -0
  13. package/viewCommon.js +105 -0
  14. package/vscode/src/vs/base/browser/deviceAccess.js +61 -0
  15. package/vscode/src/vs/base/browser/ui/centered/centeredViewLayout.js +180 -0
  16. package/vscode/src/vs/base/browser/ui/grid/grid.js +494 -0
  17. package/vscode/src/vs/base/browser/ui/grid/gridview.css.js +6 -0
  18. package/vscode/src/vs/base/browser/ui/grid/gridview.js +1113 -0
  19. package/vscode/src/vs/platform/languagePacks/common/localizedStrings.js +12 -0
  20. package/vscode/src/vs/platform/webview/common/mimeTypes.js +24 -0
  21. package/vscode/src/vs/platform/webview/common/webviewPortMapping.js +64 -0
  22. package/vscode/src/vs/workbench/api/browser/viewsExtensionPoint.js +907 -0
  23. package/vscode/src/vs/workbench/browser/actions/listCommands.js +764 -0
  24. package/vscode/src/vs/workbench/browser/actions/navigationActions.js +301 -0
  25. package/vscode/src/vs/workbench/browser/media/style.css.js +6 -0
  26. package/vscode/src/vs/workbench/browser/parts/activitybar/activitybarPart.js +671 -0
  27. package/vscode/src/vs/workbench/browser/parts/activitybar/media/activityaction.css.js +6 -0
  28. package/vscode/src/vs/workbench/browser/parts/activitybar/media/activitybarpart.css.js +6 -0
  29. package/vscode/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarPart.js +229 -0
  30. package/vscode/src/vs/workbench/browser/parts/auxiliarybar/media/auxiliaryBarPart.css.js +6 -0
  31. package/vscode/src/vs/workbench/browser/parts/compositeBar.js +606 -0
  32. package/vscode/src/vs/workbench/browser/parts/compositePart.js +346 -0
  33. package/vscode/src/vs/workbench/browser/parts/editor/auxiliaryEditorPart.js +246 -0
  34. package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.js +1403 -0
  35. package/vscode/src/vs/workbench/browser/parts/editor/editorConfiguration.js +188 -0
  36. package/vscode/src/vs/workbench/browser/parts/editor/editorDropTarget.js +523 -0
  37. package/vscode/src/vs/workbench/browser/parts/editor/editorPart.js +1030 -0
  38. package/vscode/src/vs/workbench/browser/parts/editor/editorParts.js +391 -0
  39. package/vscode/src/vs/workbench/browser/parts/editor/media/editordroptarget.css.js +6 -0
  40. package/vscode/src/vs/workbench/browser/parts/media/compositepart.css.js +6 -0
  41. package/vscode/src/vs/workbench/browser/parts/media/paneCompositePart.css.js +6 -0
  42. package/vscode/src/vs/workbench/browser/parts/paneCompositeBar.js +643 -0
  43. package/vscode/src/vs/workbench/browser/parts/paneCompositePart.js +472 -0
  44. package/vscode/src/vs/workbench/browser/parts/paneCompositePartService.js +68 -0
  45. package/vscode/src/vs/workbench/browser/parts/panel/panelPart.js +160 -0
  46. package/vscode/src/vs/workbench/browser/parts/sidebar/media/sidebarpart.css.js +6 -0
  47. package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarActions.js +39 -0
  48. package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarPart.js +238 -0
  49. package/vscode/src/vs/workbench/browser/style.js +54 -0
  50. package/vscode/src/vs/workbench/browser/window.js +381 -0
  51. package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution.js +300 -0
  52. package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.js +367 -0
  53. package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyTree.js +135 -0
  54. package/vscode/src/vs/workbench/contrib/callHierarchy/browser/media/callHierarchy.css.js +6 -0
  55. package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditor.contribution.js +18 -0
  56. package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorInputFactory.js +146 -0
  57. package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditors.js +215 -0
  58. package/vscode/src/vs/workbench/contrib/customEditor/browser/media/customEditor.css.js +6 -0
  59. package/vscode/src/vs/workbench/contrib/customEditor/common/contributedCustomEditors.js +78 -0
  60. package/vscode/src/vs/workbench/contrib/customEditor/common/customEditor.js +56 -0
  61. package/vscode/src/vs/workbench/contrib/customEditor/common/customEditorModelManager.js +63 -0
  62. package/vscode/src/vs/workbench/contrib/customEditor/common/extensionPoint.js +183 -0
  63. package/vscode/src/vs/workbench/contrib/externalUriOpener/common/externalUriOpener.contribution.js +8 -0
  64. package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.contribution.js +408 -0
  65. package/vscode/src/vs/workbench/contrib/languageStatus/browser/media/languageStatus.css.js +6 -0
  66. package/vscode/src/vs/workbench/contrib/limitIndicator/browser/limitIndicator.contribution.js +147 -0
  67. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/commands.js +635 -0
  68. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/devCommands.js +230 -0
  69. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditor.contribution.js +75 -0
  70. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorSerializer.js +42 -0
  71. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/colors.js +81 -0
  72. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/conflictActions.js +350 -0
  73. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editorGutter.js +100 -0
  74. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView.js +148 -0
  75. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/codeEditorView.js +106 -0
  76. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView.js +403 -0
  77. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/resultCodeEditorView.js +199 -0
  78. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/fixedZoneWidget.js +41 -0
  79. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/lineAlignment.js +128 -0
  80. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/media/mergeEditor.css.js +6 -0
  81. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.js +619 -0
  82. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/scrollSynchronizer.js +161 -0
  83. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewModel.js +266 -0
  84. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewZones.js +173 -0
  85. package/vscode/src/vs/workbench/contrib/preferences/browser/keyboardLayoutPicker.js +195 -0
  86. package/vscode/src/vs/workbench/contrib/sash/browser/sash.contribution.js +38 -0
  87. package/vscode/src/vs/workbench/contrib/sash/browser/sash.js +41 -0
  88. package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/media/typeHierarchy.css.js +6 -0
  89. package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchy.contribution.js +283 -0
  90. package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek.js +362 -0
  91. package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyTree.js +133 -0
  92. package/vscode/src/vs/workbench/contrib/webview/browser/overlayWebview.js +314 -0
  93. package/vscode/src/vs/workbench/contrib/webview/browser/resourceLoading.js +96 -0
  94. package/vscode/src/vs/workbench/contrib/webview/browser/themeing.js +98 -0
  95. package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.js +656 -0
  96. package/vscode/src/vs/workbench/contrib/webview/browser/webviewFindWidget.js +65 -0
  97. package/vscode/src/vs/workbench/contrib/webview/browser/webviewService.js +59 -0
  98. package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewCommands.js +143 -0
  99. package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewEditorInputSerializer.js +121 -0
  100. package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution.js +67 -0
  101. package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewPane.js +234 -0
  102. package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewService.js +45 -0
  103. package/vscode/src/vs/workbench/services/activity/browser/activityService.js +145 -0
  104. package/vscode/src/vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService.js +341 -0
  105. package/vscode/src/vs/workbench/services/driver/browser/driver.js +186 -0
  106. package/vscode/src/vs/workbench/services/editor/browser/editorPaneService.js +13 -0
  107. package/vscode/src/vs/workbench/services/editor/browser/editorResolverService.js +676 -0
  108. package/vscode/src/vs/workbench/services/history/browser/historyService.js +1516 -0
  109. package/vscode/src/vs/workbench/services/progress/browser/media/progressService.css.js +6 -0
  110. package/vscode/src/vs/workbench/services/progress/browser/progressService.js +527 -0
  111. package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorHandler.js +102 -0
  112. package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorService.js +133 -0
  113. package/vscode/src/vs/workbench/services/views/browser/viewDescriptorService.js +711 -0
  114. package/vscode/src/vs/workbench/services/views/common/viewContainerModel.js +603 -0
@@ -0,0 +1,160 @@
1
+ import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
2
+ import 'vscode/vscode/vs/workbench/browser/parts/panel/media/panelpart.css';
3
+ import { localizeWithPath } from 'vscode/vscode/vs/nls';
4
+ import { Separator, SubmenuAction, toAction } from 'vscode/vscode/vs/base/common/actions';
5
+ import { ActivePanelContext, PanelFocusContext } from 'vscode/vscode/vs/workbench/common/contextkeys';
6
+ import { IWorkbenchLayoutService } from 'vscode/vscode/vs/workbench/services/layout/browser/layoutService.service';
7
+ import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
8
+ import { IContextMenuService } from 'vscode/vscode/vs/platform/contextview/browser/contextView.service';
9
+ import { IKeybindingService } from 'vscode/vscode/vs/platform/keybinding/common/keybinding.service';
10
+ import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
11
+ import { TogglePanelAction } from 'vscode/vscode/vs/workbench/browser/parts/panel/panelActions';
12
+ import { IThemeService } from 'vscode/vscode/vs/platform/theme/common/themeService.service';
13
+ import { PANEL_BACKGROUND, PANEL_BORDER, PANEL_ACTIVE_TITLE_BORDER, PANEL_ACTIVE_TITLE_FOREGROUND, PANEL_INACTIVE_TITLE_FOREGROUND, PANEL_DRAG_AND_DROP_BORDER } from 'vscode/vscode/vs/workbench/common/theme';
14
+ import 'vscode/vscode/vs/platform/theme/common/colorUtils';
15
+ import { contrastBorder } from 'vscode/vscode/vs/platform/theme/common/colors/baseColors';
16
+ import 'vscode/vscode/vs/platform/theme/common/colors/chartsColors';
17
+ import 'vscode/vscode/vs/platform/theme/common/colors/editorColors';
18
+ import 'vscode/vscode/vs/platform/theme/common/colors/inputColors';
19
+ import 'vscode/vscode/vs/platform/theme/common/colors/listColors';
20
+ import 'vscode/vscode/vs/platform/theme/common/colors/menuColors';
21
+ import 'vscode/vscode/vs/platform/theme/common/colors/minimapColors';
22
+ import { badgeBackground, badgeForeground } from 'vscode/vscode/vs/platform/theme/common/colors/miscColors';
23
+ import 'vscode/vscode/vs/platform/theme/common/colors/quickpickColors';
24
+ import 'vscode/vscode/vs/platform/theme/common/colors/searchColors';
25
+ import { INotificationService } from 'vscode/vscode/vs/platform/notification/common/notification.service';
26
+ import { Dimension } from 'vscode/vscode/vs/base/browser/dom';
27
+ import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey.service';
28
+ import { assertIsDefined } from 'vscode/vscode/vs/base/common/types';
29
+ import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions.service';
30
+ import { IViewDescriptorService } from 'vscode/vscode/vs/workbench/common/views.service';
31
+ import { MenuId } from 'vscode/vscode/vs/platform/actions/common/actions';
32
+ import { IMenuService } from 'vscode/vscode/vs/platform/actions/common/actions.service';
33
+ import { AbstractPaneCompositePart, CompositeBarPosition } from '../paneCompositePart.js';
34
+ import { ICommandService } from 'vscode/vscode/vs/platform/commands/common/commands.service';
35
+ import { createAndFillInContextMenuActions } from 'vscode/vscode/vs/platform/actions/browser/menuEntryActionViewItem';
36
+
37
+ var PanelPart_1;
38
+ let PanelPart = class PanelPart extends AbstractPaneCompositePart {
39
+ static { PanelPart_1 = this; }
40
+ get preferredHeight() {
41
+ return this.layoutService.mainContainerDimension.height * 0.4;
42
+ }
43
+ get preferredWidth() {
44
+ const activeComposite = this.getActivePaneComposite();
45
+ if (!activeComposite) {
46
+ return;
47
+ }
48
+ const width = activeComposite.getOptimalWidth();
49
+ if (typeof width !== 'number') {
50
+ return;
51
+ }
52
+ return Math.max(width, 300);
53
+ }
54
+ static { this.activePanelSettingsKey = 'workbench.panelpart.activepanelid'; }
55
+ constructor(notificationService, storageService, contextMenuService, layoutService, keybindingService, instantiationService, themeService, viewDescriptorService, contextKeyService, extensionService, commandService, menuService) {
56
+ super("workbench.parts.panel" , { hasTitle: true }, PanelPart_1.activePanelSettingsKey, ActivePanelContext.bindTo(contextKeyService), PanelFocusContext.bindTo(contextKeyService), 'panel', 'panel', undefined, notificationService, storageService, contextMenuService, layoutService, keybindingService, instantiationService, themeService, viewDescriptorService, contextKeyService, extensionService, menuService);
57
+ this.commandService = commandService;
58
+ this.minimumWidth = 300;
59
+ this.maximumWidth = Number.POSITIVE_INFINITY;
60
+ this.minimumHeight = 77;
61
+ this.maximumHeight = Number.POSITIVE_INFINITY;
62
+ }
63
+ updateStyles() {
64
+ super.updateStyles();
65
+ const container = assertIsDefined(this.getContainer());
66
+ container.style.backgroundColor = this.getColor(PANEL_BACKGROUND) || '';
67
+ const borderColor = this.getColor(PANEL_BORDER) || this.getColor(contrastBorder) || '';
68
+ container.style.borderLeftColor = borderColor;
69
+ container.style.borderRightColor = borderColor;
70
+ const title = this.getTitleArea();
71
+ if (title) {
72
+ title.style.borderTopColor = this.getColor(PANEL_BORDER) || this.getColor(contrastBorder) || '';
73
+ }
74
+ }
75
+ getCompositeBarOptions() {
76
+ return {
77
+ partContainerClass: 'panel',
78
+ pinnedViewContainersKey: 'workbench.panel.pinnedPanels',
79
+ placeholderViewContainersKey: 'workbench.panel.placeholderPanels',
80
+ viewContainersWorkspaceStateKey: 'workbench.panel.viewContainersWorkspaceState',
81
+ icon: false,
82
+ orientation: 0 ,
83
+ recomputeSizes: true,
84
+ activityHoverOptions: {
85
+ position: () => this.layoutService.getPanelPosition() === 2 && !this.layoutService.isPanelMaximized() ? 3 : 2 ,
86
+ },
87
+ fillExtraContextMenuActions: actions => this.fillExtraContextMenuActions(actions),
88
+ compositeSize: 0,
89
+ iconSize: 16,
90
+ overflowActionSize: 44,
91
+ colors: theme => ({
92
+ activeBackgroundColor: theme.getColor(PANEL_BACKGROUND),
93
+ inactiveBackgroundColor: theme.getColor(PANEL_BACKGROUND),
94
+ activeBorderBottomColor: theme.getColor(PANEL_ACTIVE_TITLE_BORDER),
95
+ activeForegroundColor: theme.getColor(PANEL_ACTIVE_TITLE_FOREGROUND),
96
+ inactiveForegroundColor: theme.getColor(PANEL_INACTIVE_TITLE_FOREGROUND),
97
+ badgeBackground: theme.getColor(badgeBackground),
98
+ badgeForeground: theme.getColor(badgeForeground),
99
+ dragAndDropBorder: theme.getColor(PANEL_DRAG_AND_DROP_BORDER)
100
+ })
101
+ };
102
+ }
103
+ fillExtraContextMenuActions(actions) {
104
+ const panelPositionMenu = this.menuService.createMenu(MenuId.PanelPositionMenu, this.contextKeyService);
105
+ const panelAlignMenu = this.menuService.createMenu(MenuId.PanelAlignmentMenu, this.contextKeyService);
106
+ const positionActions = [];
107
+ const alignActions = [];
108
+ createAndFillInContextMenuActions(panelPositionMenu, { shouldForwardArgs: true }, { primary: [], secondary: positionActions });
109
+ createAndFillInContextMenuActions(panelAlignMenu, { shouldForwardArgs: true }, { primary: [], secondary: alignActions });
110
+ panelAlignMenu.dispose();
111
+ panelPositionMenu.dispose();
112
+ actions.push(...[
113
+ ( new Separator()),
114
+ ( new SubmenuAction('workbench.action.panel.position', ( localizeWithPath(
115
+ 'vs/workbench/browser/parts/panel/panelPart',
116
+ 'panel position',
117
+ "Panel Position"
118
+ )), positionActions)),
119
+ ( new SubmenuAction('workbench.action.panel.align', ( localizeWithPath('vs/workbench/browser/parts/panel/panelPart', 'align panel', "Align Panel")), alignActions)),
120
+ toAction({ id: TogglePanelAction.ID, label: ( localizeWithPath('vs/workbench/browser/parts/panel/panelPart', 'hidePanel', "Hide Panel")), run: () => this.commandService.executeCommand(TogglePanelAction.ID) })
121
+ ]);
122
+ }
123
+ layout(width, height, top, left) {
124
+ let dimensions;
125
+ if (this.layoutService.getPanelPosition() === 1 ) {
126
+ dimensions = ( new Dimension(width - 1, height));
127
+ }
128
+ else {
129
+ dimensions = ( new Dimension(width, height));
130
+ }
131
+ super.layout(dimensions.width, dimensions.height, top, left);
132
+ }
133
+ shouldShowCompositeBar() {
134
+ return true;
135
+ }
136
+ getCompositeBarPosition() {
137
+ return CompositeBarPosition.TITLE;
138
+ }
139
+ toJSON() {
140
+ return {
141
+ type: "workbench.parts.panel"
142
+ };
143
+ }
144
+ };
145
+ PanelPart = PanelPart_1 = ( __decorate([
146
+ ( __param(0, INotificationService)),
147
+ ( __param(1, IStorageService)),
148
+ ( __param(2, IContextMenuService)),
149
+ ( __param(3, IWorkbenchLayoutService)),
150
+ ( __param(4, IKeybindingService)),
151
+ ( __param(5, IInstantiationService)),
152
+ ( __param(6, IThemeService)),
153
+ ( __param(7, IViewDescriptorService)),
154
+ ( __param(8, IContextKeyService)),
155
+ ( __param(9, IExtensionService)),
156
+ ( __param(10, ICommandService)),
157
+ ( __param(11, IMenuService))
158
+ ], PanelPart));
159
+
160
+ export { PanelPart };
@@ -0,0 +1,6 @@
1
+ import n from 'vscode/external/rollup-plugin-styles/dist/runtime/inject-css.js';
2
+
3
+ var css = ".monaco-workbench.nosidebar>.part.sidebar{display:none!important;visibility:hidden!important}.monaco-workbench .part.sidebar .title-actions .actions-container{justify-content:flex-end}.monaco-workbench .part.sidebar .title-actions .action-item{margin-right:4px}.monaco-workbench .part.sidebar>.title>.title-label h2{text-transform:uppercase}.monaco-workbench .viewlet .collapsible.header .title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.monaco-workbench .viewlet .collapsible.header .actions{width:0}.monaco-workbench .viewlet .collapsible.header.focused .actions,.monaco-workbench .viewlet .split-view-view:hover>.header .actions{flex:1;width:auto}.monaco-workbench .viewlet .collapsible.header .actions .action-label{background-position:50%;background-repeat:no-repeat;background-size:16px;height:22px;margin-right:0;width:28px}.monaco-workbench .viewlet .collapsible.header .actions .action-label .label,.monaco-workbench .viewlet .collapsible.header.collapsed .actions{display:none}.monaco-workbench .viewlet .collapsible.header .action-label{background-repeat:no-repeat;height:16px;margin-right:.2em;width:16px}.monaco-workbench .part.sidebar>.header-or-footer>.composite-bar-container>.composite-bar>.monaco-action-bar .action-item:focus,.monaco-workbench .part.sidebar>.title>.composite-bar-container>.composite-bar>.monaco-action-bar .action-item:focus{outline:0!important}.monaco-workbench .part.sidebar>.header-or-footer>.composite-bar-container>.composite-bar>.monaco-action-bar .action-item .action-label,.monaco-workbench .part.sidebar>.title>.composite-bar-container>.composite-bar>.monaco-action-bar .action-item .action-label{border-radius:0;outline-offset:2px}.monaco-workbench .part.sidebar>.header-or-footer>.composite-bar-container>.composite-bar>.monaco-action-bar .action-item .action-label:before,.monaco-workbench .part.sidebar>.title>.composite-bar-container>.composite-bar>.monaco-action-bar .action-item .action-label:before{left:6px;position:absolute}.monaco-workbench .part.sidebar>.header-or-footer>.composite-bar-container>.composite-bar>.monaco-action-bar .action-item.checked.clicked:focus .active-item-indicator:before,.monaco-workbench .part.sidebar>.header-or-footer>.composite-bar-container>.composite-bar>.monaco-action-bar .action-item.checked:not(:focus) .active-item-indicator:before,.monaco-workbench .part.sidebar>.title>.composite-bar-container>.composite-bar>.monaco-action-bar .action-item.checked.clicked:focus .active-item-indicator:before,.monaco-workbench .part.sidebar>.title>.composite-bar-container>.composite-bar>.monaco-action-bar .action-item.checked:not(:focus) .active-item-indicator:before{border-top-color:var(--vscode-activityBarTop-activeBorder)!important}.monaco-workbench .part.sidebar>.header-or-footer>.composite-bar-container>.composite-bar>.monaco-action-bar .action-item:focus .action-label,.monaco-workbench .part.sidebar>.header-or-footer>.composite-bar-container>.composite-bar>.monaco-action-bar .action-item:hover .action-label,.monaco-workbench .part.sidebar>.title>.composite-bar-container>.composite-bar>.monaco-action-bar .action-item:focus .action-label,.monaco-workbench .part.sidebar>.title>.composite-bar-container>.composite-bar>.monaco-action-bar .action-item:hover .action-label{color:var(--vscode-activityBarTop-foreground)!important}.monaco-workbench .sidebar.pane-composite-part>.title>.composite-bar-container{flex:1}.monaco-workbench .sidebar.part.pane-composite-part>.composite.title.has-composite-bar>.title-actions{flex:inherit}.monaco-workbench .sidebar.pane-composite-part>.title.has-composite-bar>.title-actions .monaco-action-bar .action-item{max-width:150px}";
4
+ n(css,{});
5
+
6
+ export { css, css as default };
@@ -0,0 +1,39 @@
1
+ import './media/sidebarpart.css.js';
2
+ import { localize2WithPath } from 'vscode/vscode/vs/nls';
3
+ import { Action2, registerAction2 } from 'vscode/vscode/vs/platform/actions/common/actions';
4
+ import { IWorkbenchLayoutService } from 'vscode/vscode/vs/workbench/services/layout/browser/layoutService.service';
5
+ import { Categories } from 'vscode/vscode/vs/platform/action/common/actionCommonCategories';
6
+ import { IPaneCompositePartService } from 'vscode/vscode/vs/workbench/services/panecomposite/browser/panecomposite.service';
7
+
8
+ class FocusSideBarAction extends Action2 {
9
+ constructor() {
10
+ super({
11
+ id: 'workbench.action.focusSideBar',
12
+ title: ( localize2WithPath(
13
+ 'vs/workbench/browser/parts/sidebar/sidebarActions',
14
+ 'focusSideBar',
15
+ 'Focus into Primary Side Bar'
16
+ )),
17
+ category: Categories.View,
18
+ f1: true,
19
+ keybinding: {
20
+ weight: 200 ,
21
+ when: null,
22
+ primary: 2048 | 21
23
+ }
24
+ });
25
+ }
26
+ async run(accessor) {
27
+ const layoutService = accessor.get(IWorkbenchLayoutService);
28
+ const paneCompositeService = accessor.get(IPaneCompositePartService);
29
+ if (!layoutService.isVisible("workbench.parts.sidebar" )) {
30
+ layoutService.setPartHidden(false, "workbench.parts.sidebar" );
31
+ return;
32
+ }
33
+ const viewlet = paneCompositeService.getActivePaneComposite(0 );
34
+ viewlet?.focus();
35
+ }
36
+ }
37
+ registerAction2(FocusSideBarAction);
38
+
39
+ export { FocusSideBarAction };
@@ -0,0 +1,238 @@
1
+ import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
2
+ import './media/sidebarpart.css.js';
3
+ import './sidebarActions.js';
4
+ import { IWorkbenchLayoutService } from 'vscode/vscode/vs/workbench/services/layout/browser/layoutService.service';
5
+ import { ActiveViewletContext, SidebarFocusContext } from 'vscode/vscode/vs/workbench/common/contextkeys';
6
+ import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
7
+ import { IContextMenuService } from 'vscode/vscode/vs/platform/contextview/browser/contextView.service';
8
+ import { IKeybindingService } from 'vscode/vscode/vs/platform/keybinding/common/keybinding.service';
9
+ import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
10
+ import { IThemeService } from 'vscode/vscode/vs/platform/theme/common/themeService.service';
11
+ import 'vscode/vscode/vs/platform/theme/common/colorUtils';
12
+ import { contrastBorder } from 'vscode/vscode/vs/platform/theme/common/colors/baseColors';
13
+ import 'vscode/vscode/vs/platform/theme/common/colors/chartsColors';
14
+ import 'vscode/vscode/vs/platform/theme/common/colors/editorColors';
15
+ import 'vscode/vscode/vs/platform/theme/common/colors/inputColors';
16
+ import 'vscode/vscode/vs/platform/theme/common/colors/listColors';
17
+ import 'vscode/vscode/vs/platform/theme/common/colors/menuColors';
18
+ import 'vscode/vscode/vs/platform/theme/common/colors/minimapColors';
19
+ import 'vscode/vscode/vs/platform/theme/common/colors/miscColors';
20
+ import 'vscode/vscode/vs/platform/theme/common/colors/quickpickColors';
21
+ import 'vscode/vscode/vs/platform/theme/common/colors/searchColors';
22
+ import { SIDE_BAR_BORDER, SIDE_BAR_TITLE_FOREGROUND, SIDE_BAR_BACKGROUND, SIDE_BAR_FOREGROUND, SIDE_BAR_DRAG_AND_DROP_BACKGROUND, ACTIVITY_BAR_TOP_ACTIVE_BORDER, ACTIVITY_BAR_TOP_FOREGROUND, ACTIVITY_BAR_TOP_INACTIVE_FOREGROUND, ACTIVITY_BAR_BADGE_BACKGROUND, ACTIVITY_BAR_BADGE_FOREGROUND, ACTIVITY_BAR_TOP_DRAG_AND_DROP_BORDER } from 'vscode/vscode/vs/workbench/common/theme';
23
+ import { INotificationService } from 'vscode/vscode/vs/platform/notification/common/notification.service';
24
+ import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey.service';
25
+ import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions.service';
26
+ import { assertIsDefined } from 'vscode/vscode/vs/base/common/types';
27
+ import { IViewDescriptorService } from 'vscode/vscode/vs/workbench/common/views.service';
28
+ import { AbstractPaneCompositePart, CompositeBarPosition } from '../paneCompositePart.js';
29
+ import { ActivitybarPart, ActivityBarCompositeBar } from '../activitybar/activitybarPart.js';
30
+ import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
31
+ import { registerAction2, Action2 } from 'vscode/vscode/vs/platform/actions/common/actions';
32
+ import { IMenuService } from 'vscode/vscode/vs/platform/actions/common/actions.service';
33
+ import { Separator } from 'vscode/vscode/vs/base/common/actions';
34
+ import { ToggleActivityBarVisibilityActionId } from 'vscode/vscode/vs/workbench/browser/actions/layoutActions';
35
+ import { localize2WithPath } from 'vscode/vscode/vs/nls';
36
+
37
+ var SidebarPart_1;
38
+ let SidebarPart = class SidebarPart extends AbstractPaneCompositePart {
39
+ static { SidebarPart_1 = this; }
40
+ static { this.activeViewletSettingsKey = 'workbench.sidebar.activeviewletid'; }
41
+ get preferredWidth() {
42
+ const viewlet = this.getActivePaneComposite();
43
+ if (!viewlet) {
44
+ return;
45
+ }
46
+ const width = viewlet.getOptimalWidth();
47
+ if (typeof width !== 'number') {
48
+ return;
49
+ }
50
+ return Math.max(width, 300);
51
+ }
52
+ constructor(notificationService, storageService, contextMenuService, layoutService, keybindingService, instantiationService, themeService, viewDescriptorService, contextKeyService, extensionService, configurationService, menuService) {
53
+ super("workbench.parts.sidebar" , { hasTitle: true, borderWidth: () => (this.getColor(SIDE_BAR_BORDER) || this.getColor(contrastBorder)) ? 1 : 0 }, SidebarPart_1.activeViewletSettingsKey, ActiveViewletContext.bindTo(contextKeyService), SidebarFocusContext.bindTo(contextKeyService), 'sideBar', 'viewlet', SIDE_BAR_TITLE_FOREGROUND, notificationService, storageService, contextMenuService, layoutService, keybindingService, instantiationService, themeService, viewDescriptorService, contextKeyService, extensionService, menuService);
54
+ this.configurationService = configurationService;
55
+ this.minimumWidth = 170;
56
+ this.maximumWidth = Number.POSITIVE_INFINITY;
57
+ this.minimumHeight = 0;
58
+ this.maximumHeight = Number.POSITIVE_INFINITY;
59
+ this.priority = 1 ;
60
+ this.acitivityBarPart = this._register(instantiationService.createInstance(ActivitybarPart, this));
61
+ this.rememberActivityBarVisiblePosition();
62
+ this._register(configurationService.onDidChangeConfiguration(e => {
63
+ if (e.affectsConfiguration("workbench.activityBar.location" )) {
64
+ this.onDidChangeActivityBarLocation();
65
+ }
66
+ }));
67
+ this.registerActions();
68
+ }
69
+ onDidChangeActivityBarLocation() {
70
+ this.acitivityBarPart.hide();
71
+ this.updateCompositeBar();
72
+ const id = this.getActiveComposite()?.getId();
73
+ if (id) {
74
+ this.onTitleAreaUpdate(id);
75
+ }
76
+ if (this.shouldShowActivityBar()) {
77
+ this.acitivityBarPart.show();
78
+ }
79
+ this.rememberActivityBarVisiblePosition();
80
+ }
81
+ updateStyles() {
82
+ super.updateStyles();
83
+ const container = assertIsDefined(this.getContainer());
84
+ container.style.backgroundColor = this.getColor(SIDE_BAR_BACKGROUND) || '';
85
+ container.style.color = this.getColor(SIDE_BAR_FOREGROUND) || '';
86
+ const borderColor = this.getColor(SIDE_BAR_BORDER) || this.getColor(contrastBorder);
87
+ const isPositionLeft = this.layoutService.getSideBarPosition() === 0 ;
88
+ container.style.borderRightWidth = borderColor && isPositionLeft ? '1px' : '';
89
+ container.style.borderRightStyle = borderColor && isPositionLeft ? 'solid' : '';
90
+ container.style.borderRightColor = isPositionLeft ? borderColor || '' : '';
91
+ container.style.borderLeftWidth = borderColor && !isPositionLeft ? '1px' : '';
92
+ container.style.borderLeftStyle = borderColor && !isPositionLeft ? 'solid' : '';
93
+ container.style.borderLeftColor = !isPositionLeft ? borderColor || '' : '';
94
+ container.style.outlineColor = this.getColor(SIDE_BAR_DRAG_AND_DROP_BACKGROUND) ?? '';
95
+ }
96
+ layout(width, height, top, left) {
97
+ if (!this.layoutService.isVisible("workbench.parts.sidebar" )) {
98
+ return;
99
+ }
100
+ super.layout(width, height, top, left);
101
+ }
102
+ getTitleAreaDropDownAnchorAlignment() {
103
+ return this.layoutService.getSideBarPosition() === 0 ? 0 : 1 ;
104
+ }
105
+ createCompositeBar() {
106
+ return this.instantiationService.createInstance(ActivityBarCompositeBar, this.getCompositeBarOptions(), this.partId, this, false);
107
+ }
108
+ getCompositeBarOptions() {
109
+ return {
110
+ partContainerClass: 'sidebar',
111
+ pinnedViewContainersKey: ActivitybarPart.pinnedViewContainersKey,
112
+ placeholderViewContainersKey: ActivitybarPart.placeholderViewContainersKey,
113
+ viewContainersWorkspaceStateKey: ActivitybarPart.viewContainersWorkspaceStateKey,
114
+ icon: true,
115
+ orientation: 0 ,
116
+ recomputeSizes: true,
117
+ activityHoverOptions: {
118
+ position: () => this.getCompositeBarPosition() === CompositeBarPosition.BOTTOM ? 3 : 2 ,
119
+ },
120
+ fillExtraContextMenuActions: actions => {
121
+ const viewsSubmenuAction = this.getViewsSubmenuAction();
122
+ if (viewsSubmenuAction) {
123
+ actions.push(( new Separator()));
124
+ actions.push(viewsSubmenuAction);
125
+ }
126
+ },
127
+ compositeSize: 0,
128
+ iconSize: 16,
129
+ overflowActionSize: 30,
130
+ colors: theme => ({
131
+ activeBackgroundColor: theme.getColor(SIDE_BAR_BACKGROUND),
132
+ inactiveBackgroundColor: theme.getColor(SIDE_BAR_BACKGROUND),
133
+ activeBorderBottomColor: theme.getColor(ACTIVITY_BAR_TOP_ACTIVE_BORDER),
134
+ activeForegroundColor: theme.getColor(ACTIVITY_BAR_TOP_FOREGROUND),
135
+ inactiveForegroundColor: theme.getColor(ACTIVITY_BAR_TOP_INACTIVE_FOREGROUND),
136
+ badgeBackground: theme.getColor(ACTIVITY_BAR_BADGE_BACKGROUND),
137
+ badgeForeground: theme.getColor(ACTIVITY_BAR_BADGE_FOREGROUND),
138
+ dragAndDropBorder: theme.getColor(ACTIVITY_BAR_TOP_DRAG_AND_DROP_BORDER)
139
+ }),
140
+ compact: true
141
+ };
142
+ }
143
+ shouldShowCompositeBar() {
144
+ const activityBarPosition = this.configurationService.getValue("workbench.activityBar.location" );
145
+ return activityBarPosition === "top" || activityBarPosition === "bottom" ;
146
+ }
147
+ shouldShowActivityBar() {
148
+ if (this.shouldShowCompositeBar()) {
149
+ return false;
150
+ }
151
+ return this.configurationService.getValue("workbench.activityBar.location" ) !== "hidden" ;
152
+ }
153
+ getCompositeBarPosition() {
154
+ const activityBarPosition = this.configurationService.getValue("workbench.activityBar.location" );
155
+ switch (activityBarPosition) {
156
+ case "top" : return CompositeBarPosition.TOP;
157
+ case "bottom" : return CompositeBarPosition.BOTTOM;
158
+ case "hidden" :
159
+ case "default" :
160
+ default: return CompositeBarPosition.TITLE;
161
+ }
162
+ }
163
+ rememberActivityBarVisiblePosition() {
164
+ const activityBarPosition = this.configurationService.getValue("workbench.activityBar.location" );
165
+ if (activityBarPosition !== "hidden" ) {
166
+ this.storageService.store("workbench.activityBar.location" , activityBarPosition, 0 , 0 );
167
+ }
168
+ }
169
+ getRememberedActivityBarVisiblePosition() {
170
+ const activityBarPosition = this.storageService.get("workbench.activityBar.location" , 0 );
171
+ switch (activityBarPosition) {
172
+ case "top" : return "top" ;
173
+ case "bottom" : return "bottom" ;
174
+ default: return "default" ;
175
+ }
176
+ }
177
+ getPinnedPaneCompositeIds() {
178
+ return this.shouldShowCompositeBar() ? super.getPinnedPaneCompositeIds() : this.acitivityBarPart.getPinnedPaneCompositeIds();
179
+ }
180
+ getVisiblePaneCompositeIds() {
181
+ return this.shouldShowCompositeBar() ? super.getVisiblePaneCompositeIds() : this.acitivityBarPart.getVisiblePaneCompositeIds();
182
+ }
183
+ async focusActivityBar() {
184
+ if (this.configurationService.getValue("workbench.activityBar.location" ) === "hidden" ) {
185
+ await this.configurationService.updateValue("workbench.activityBar.location" , this.getRememberedActivityBarVisiblePosition());
186
+ this.onDidChangeActivityBarLocation();
187
+ }
188
+ if (this.shouldShowCompositeBar()) {
189
+ this.focusComositeBar();
190
+ }
191
+ else {
192
+ if (!this.layoutService.isVisible("workbench.parts.activitybar" )) {
193
+ this.layoutService.setPartHidden(false, "workbench.parts.activitybar" );
194
+ }
195
+ this.acitivityBarPart.show(true);
196
+ }
197
+ }
198
+ registerActions() {
199
+ const that = this;
200
+ this._register(registerAction2(class extends Action2 {
201
+ constructor() {
202
+ super({
203
+ id: ToggleActivityBarVisibilityActionId,
204
+ title: ( localize2WithPath(
205
+ 'vs/workbench/browser/parts/sidebar/sidebarPart',
206
+ 'toggleActivityBar',
207
+ "Toggle Activity Bar Visibility"
208
+ )),
209
+ });
210
+ }
211
+ run() {
212
+ const value = that.configurationService.getValue("workbench.activityBar.location" ) === "hidden" ? that.getRememberedActivityBarVisiblePosition() : "hidden" ;
213
+ return that.configurationService.updateValue("workbench.activityBar.location" , value);
214
+ }
215
+ }));
216
+ }
217
+ toJSON() {
218
+ return {
219
+ type: "workbench.parts.sidebar"
220
+ };
221
+ }
222
+ };
223
+ SidebarPart = SidebarPart_1 = ( __decorate([
224
+ ( __param(0, INotificationService)),
225
+ ( __param(1, IStorageService)),
226
+ ( __param(2, IContextMenuService)),
227
+ ( __param(3, IWorkbenchLayoutService)),
228
+ ( __param(4, IKeybindingService)),
229
+ ( __param(5, IInstantiationService)),
230
+ ( __param(6, IThemeService)),
231
+ ( __param(7, IViewDescriptorService)),
232
+ ( __param(8, IContextKeyService)),
233
+ ( __param(9, IExtensionService)),
234
+ ( __param(10, IConfigurationService)),
235
+ ( __param(11, IMenuService))
236
+ ], SidebarPart));
237
+
238
+ export { SidebarPart };
@@ -0,0 +1,54 @@
1
+ import './media/style.css.js';
2
+ import { registerThemingParticipant } from 'vscode/vscode/vs/platform/theme/common/themeService';
3
+ import { WORKBENCH_BACKGROUND, TITLE_BAR_ACTIVE_BACKGROUND } from 'vscode/vscode/vs/workbench/common/theme';
4
+ import { isWeb, isIOS } from 'vscode/vscode/vs/base/common/platform';
5
+ import { createMetaElement } from 'vscode/vscode/vs/base/browser/dom';
6
+ import { isSafari, isStandalone } from 'vscode/vscode/vs/base/browser/browser';
7
+ import 'vscode/vscode/vs/platform/theme/common/colorUtils';
8
+ import { selectionBackground } from 'vscode/vscode/vs/platform/theme/common/colors/baseColors';
9
+ import 'vscode/vscode/vs/platform/theme/common/colors/chartsColors';
10
+ import 'vscode/vscode/vs/platform/theme/common/colors/editorColors';
11
+ import 'vscode/vscode/vs/platform/theme/common/colors/inputColors';
12
+ import 'vscode/vscode/vs/platform/theme/common/colors/listColors';
13
+ import 'vscode/vscode/vs/platform/theme/common/colors/menuColors';
14
+ import 'vscode/vscode/vs/platform/theme/common/colors/minimapColors';
15
+ import 'vscode/vscode/vs/platform/theme/common/colors/miscColors';
16
+ import 'vscode/vscode/vs/platform/theme/common/colors/quickpickColors';
17
+ import 'vscode/vscode/vs/platform/theme/common/colors/searchColors';
18
+ import { mainWindow } from 'vscode/vscode/vs/base/browser/window';
19
+
20
+ registerThemingParticipant((theme, collector) => {
21
+ const workbenchBackground = WORKBENCH_BACKGROUND(theme);
22
+ collector.addRule(`.monaco-workbench-part { background-color: ${workbenchBackground}; }`);
23
+ const windowSelectionBackground = theme.getColor(selectionBackground);
24
+ if (windowSelectionBackground) {
25
+ collector.addRule(`.monaco-workbench-part ::selection { background-color: ${windowSelectionBackground}; }`);
26
+ }
27
+ if (isWeb) {
28
+ const titleBackground = theme.getColor(TITLE_BAR_ACTIVE_BACKGROUND);
29
+ if (titleBackground) {
30
+ const metaElementId = 'monaco-workbench-meta-theme-color';
31
+ let metaElement = mainWindow.document.getElementById(metaElementId);
32
+ if (!metaElement) {
33
+ metaElement = createMetaElement();
34
+ metaElement.name = 'theme-color';
35
+ metaElement.id = metaElementId;
36
+ }
37
+ metaElement.content = ( titleBackground.toString());
38
+ }
39
+ }
40
+ if (isSafari) {
41
+ collector.addRule(`
42
+ .monaco-workbench-part.web {
43
+ touch-action: none;
44
+ }
45
+ .monaco-workbench-part .monaco-editor .view-lines {
46
+ user-select: text;
47
+ -webkit-user-select: text;
48
+ }
49
+ `);
50
+ }
51
+ if (isIOS && isStandalone()) {
52
+ collector.addRule(`.monaco-workbench-part { background-color: ${workbenchBackground}; }`);
53
+ }
54
+ });