@theia/core 1.67.0-next.0 → 1.67.0-next.13
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/lib/browser/badges/badge-service.d.ts +14 -0
- package/lib/browser/badges/badge-service.d.ts.map +1 -0
- package/lib/browser/badges/badge-service.js +45 -0
- package/lib/browser/badges/badge-service.js.map +1 -0
- package/lib/browser/badges/index.d.ts +3 -0
- package/lib/browser/badges/index.d.ts.map +1 -0
- package/lib/browser/badges/index.js +21 -0
- package/lib/browser/badges/index.js.map +1 -0
- package/lib/browser/badges/tabbar-badge-decorator.d.ts +14 -0
- package/lib/browser/badges/tabbar-badge-decorator.d.ts.map +1 -0
- package/lib/browser/badges/tabbar-badge-decorator.js +68 -0
- package/lib/browser/badges/tabbar-badge-decorator.js.map +1 -0
- package/lib/browser/catalog.json +84 -50
- package/lib/browser/common-commands.d.ts +66 -0
- package/lib/browser/common-commands.d.ts.map +1 -0
- package/lib/browser/common-commands.js +271 -0
- package/lib/browser/common-commands.js.map +1 -0
- package/lib/browser/common-frontend-contribution.d.ts +5 -99
- package/lib/browser/common-frontend-contribution.d.ts.map +1 -1
- package/lib/browser/common-frontend-contribution.js +157 -439
- package/lib/browser/common-frontend-contribution.js.map +1 -1
- package/lib/browser/common-menus.d.ts +35 -0
- package/lib/browser/common-menus.d.ts.map +1 -0
- package/lib/browser/common-menus.js +56 -0
- package/lib/browser/common-menus.js.map +1 -0
- package/lib/browser/frontend-application-module.d.ts.map +1 -1
- package/lib/browser/frontend-application-module.js +2 -0
- package/lib/browser/frontend-application-module.js.map +1 -1
- package/lib/browser/index.d.ts +3 -0
- package/lib/browser/index.d.ts.map +1 -1
- package/lib/browser/index.js +3 -0
- package/lib/browser/index.js.map +1 -1
- package/lib/browser/quick-input/quick-command-frontend-contribution.js +3 -3
- package/lib/browser/quick-input/quick-command-frontend-contribution.js.map +1 -1
- package/lib/browser/shell/shell-layout-restorer.js +3 -3
- package/lib/browser/shell/shell-layout-restorer.js.map +1 -1
- package/lib/browser/shell/tab-bars.d.ts +1 -1
- package/lib/browser/shell/tab-bars.d.ts.map +1 -1
- package/lib/browser/shell/tab-bars.js +52 -49
- package/lib/browser/shell/tab-bars.js.map +1 -1
- package/lib/browser/shell/view-contribution.js +2 -2
- package/lib/browser/shell/view-contribution.js.map +1 -1
- package/lib/browser/tree/tree-widget.d.ts.map +1 -1
- package/lib/browser/tree/tree-widget.js +3 -4
- package/lib/browser/tree/tree-widget.js.map +1 -1
- package/lib/browser/window-contribution.js +2 -2
- package/lib/browser/window-contribution.js.map +1 -1
- package/lib/common/preferences/preference-service.d.ts.map +1 -1
- package/lib/common/preferences/preference-service.js +6 -1
- package/lib/common/preferences/preference-service.js.map +1 -1
- package/package.json +4 -4
- package/src/browser/badges/badge-service.ts +44 -0
- package/src/browser/badges/index.ts +18 -0
- package/src/browser/badges/tabbar-badge-decorator.ts +63 -0
- package/src/browser/common-commands.ts +281 -0
- package/src/browser/common-frontend-contribution.ts +4 -306
- package/src/browser/common-menus.ts +60 -0
- package/src/browser/frontend-application-module.ts +2 -0
- package/src/browser/index.ts +3 -0
- package/src/browser/quick-input/quick-command-frontend-contribution.ts +1 -1
- package/src/browser/shell/shell-layout-restorer.ts +1 -1
- package/src/browser/shell/tab-bars.ts +24 -26
- package/src/browser/shell/view-contribution.ts +1 -1
- package/src/browser/tree/tree-widget.tsx +3 -4
- package/src/browser/window-contribution.ts +1 -1
- package/src/common/preferences/preference-service.ts +6 -1
package/src/browser/index.ts
CHANGED
|
@@ -28,6 +28,8 @@ export * from './tree';
|
|
|
28
28
|
export * from './messaging';
|
|
29
29
|
export * from './endpoint';
|
|
30
30
|
export * from './common-frontend-contribution';
|
|
31
|
+
export * from './common-menus';
|
|
32
|
+
export * from './common-commands';
|
|
31
33
|
export * from './quick-input';
|
|
32
34
|
export * from './widget-manager';
|
|
33
35
|
export * from './saveable';
|
|
@@ -48,3 +50,4 @@ export * from './hover-service';
|
|
|
48
50
|
export * from './saveable-service';
|
|
49
51
|
export * from './undo-redo-handler';
|
|
50
52
|
export * from './widget-status-bar-service';
|
|
53
|
+
export * from './badges';
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
import { injectable, inject, optional } from 'inversify';
|
|
17
17
|
import { CommandRegistry, CommandContribution, MenuContribution, MenuModelRegistry, nls } from '../../common';
|
|
18
18
|
import { KeybindingRegistry, KeybindingContribution } from '../keybinding';
|
|
19
|
-
import { CommonMenus } from '../common-
|
|
19
|
+
import { CommonMenus } from '../common-menus';
|
|
20
20
|
import { CLOSE_QUICK_OPEN, CLEAR_COMMAND_HISTORY, quickCommand, QuickCommandService } from './quick-command-service';
|
|
21
21
|
import { QuickInputService } from './quick-input-service';
|
|
22
22
|
import { ConfirmDialog, Dialog } from '../dialogs';
|
|
@@ -24,7 +24,7 @@ import { CommandContribution, CommandRegistry, Command } from '../../common/comm
|
|
|
24
24
|
import { ThemeService } from '../theming';
|
|
25
25
|
import { ContributionProvider } from '../../common/contribution-provider';
|
|
26
26
|
import { ApplicationShell, applicationShellLayoutVersion, ApplicationShellLayoutVersion } from './application-shell';
|
|
27
|
-
import { CommonCommands } from '../common-
|
|
27
|
+
import { CommonCommands } from '../common-commands';
|
|
28
28
|
import { WindowService } from '../window/window-service';
|
|
29
29
|
import { StopReason } from '../../common/frontend-application-state';
|
|
30
30
|
import { isFunction, isObject, MaybePromise } from '../../common';
|
|
@@ -183,11 +183,9 @@ export class TabBarRenderer extends TabBar.Renderer {
|
|
|
183
183
|
? nls.localizeByDefault('Unpin')
|
|
184
184
|
: nls.localizeByDefault('Close');
|
|
185
185
|
|
|
186
|
-
const hover =
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
onmouseenter: this.handleMouseEnterEvent
|
|
190
|
-
};
|
|
186
|
+
const hover = {
|
|
187
|
+
onmouseenter: this.handleMouseEnterEvent
|
|
188
|
+
};
|
|
191
189
|
|
|
192
190
|
const tabLabel = h.div(
|
|
193
191
|
{ className: 'theia-tab-icon-label' },
|
|
@@ -550,7 +548,7 @@ export class TabBarRenderer extends TabBar.Renderer {
|
|
|
550
548
|
return h.div({ className: baseClassName, style }, data.title.iconLabel);
|
|
551
549
|
}
|
|
552
550
|
|
|
553
|
-
protected renderEnhancedPreview
|
|
551
|
+
protected renderEnhancedPreview(title: Title<Widget>): HTMLDivElement {
|
|
554
552
|
const hoverBox = document.createElement('div');
|
|
555
553
|
hoverBox.classList.add('theia-horizontal-tabBar-hover-div');
|
|
556
554
|
const labelElement = document.createElement('p');
|
|
@@ -625,26 +623,26 @@ export class TabBarRenderer extends TabBar.Renderer {
|
|
|
625
623
|
}
|
|
626
624
|
|
|
627
625
|
protected handleMouseEnterEvent = (event: MouseEvent) => {
|
|
628
|
-
if (this.tabBar
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
}
|
|
626
|
+
if (!this.tabBar || !this.hoverService || !(event.currentTarget instanceof HTMLElement)) { return; }
|
|
627
|
+
const id = event.currentTarget.id;
|
|
628
|
+
const title = this.tabBar.titles.find(t => this.createTabId(t) === id);
|
|
629
|
+
if (!title) { return; }
|
|
630
|
+
if (this.tabBar.orientation === 'horizontal' && this.corePreferences?.['window.tabbar.enhancedPreview'] !== 'classic' && EnhancedPreviewWidget.is(title.owner)) {
|
|
631
|
+
this.hoverService.requestHover({
|
|
632
|
+
content: this.renderEnhancedPreview(title),
|
|
633
|
+
target: event.currentTarget,
|
|
634
|
+
position: 'bottom',
|
|
635
|
+
cssClasses: ['extended-tab-preview'],
|
|
636
|
+
visualPreview: this.corePreferences?.['window.tabbar.enhancedPreview'] === 'visual' ? width => this.renderVisualPreview(width, title) : undefined
|
|
637
|
+
});
|
|
638
|
+
} else if (title.caption) {
|
|
639
|
+
const position = this.tabBar.orientation === 'horizontal' ? 'bottom' : 'right';
|
|
640
|
+
const tooltip = ArrayUtils.coalesce([title.caption, ...this.getDecorationData(title, 'tooltip')]).join(' - ');
|
|
641
|
+
this.hoverService.requestHover({
|
|
642
|
+
content: tooltip,
|
|
643
|
+
target: event.currentTarget,
|
|
644
|
+
position
|
|
645
|
+
});
|
|
648
646
|
}
|
|
649
647
|
};
|
|
650
648
|
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
} from '../../common';
|
|
23
23
|
import { KeybindingContribution, KeybindingRegistry } from '../keybinding';
|
|
24
24
|
import { WidgetManager } from '../widget-manager';
|
|
25
|
-
import { CommonMenus } from '../common-
|
|
25
|
+
import { CommonMenus } from '../common-menus';
|
|
26
26
|
import { ApplicationShell } from './application-shell';
|
|
27
27
|
import { QuickViewService } from '../quick-input';
|
|
28
28
|
|
|
@@ -1668,10 +1668,9 @@ export namespace TreeWidget {
|
|
|
1668
1668
|
protected readonly scrollIntoViewIfNeeded = () => {
|
|
1669
1669
|
const { scrollToRow } = this.props;
|
|
1670
1670
|
if (this.list && scrollToRow !== undefined) {
|
|
1671
|
-
this.list.
|
|
1671
|
+
this.list.scrollIntoView({
|
|
1672
1672
|
index: scrollToRow,
|
|
1673
|
-
align: 'center'
|
|
1674
|
-
behavior: 'smooth'
|
|
1673
|
+
align: 'center'
|
|
1675
1674
|
});
|
|
1676
1675
|
}
|
|
1677
1676
|
};
|
|
@@ -1681,7 +1680,7 @@ export namespace TreeWidget {
|
|
|
1681
1680
|
}
|
|
1682
1681
|
|
|
1683
1682
|
override componentDidUpdate(prevProps: ViewProps): void {
|
|
1684
|
-
if (this.props.scrollToRow !== prevProps.scrollToRow
|
|
1683
|
+
if (this.props.scrollToRow !== prevProps.scrollToRow) {
|
|
1685
1684
|
this.scrollIntoViewIfNeeded();
|
|
1686
1685
|
}
|
|
1687
1686
|
}
|
|
@@ -19,7 +19,7 @@ import { Command, CommandContribution, CommandRegistry, environment } from '../c
|
|
|
19
19
|
import { WindowService } from './window/window-service';
|
|
20
20
|
import { KeybindingContribution, KeybindingRegistry } from './keybinding';
|
|
21
21
|
import { MenuContribution, MenuModelRegistry } from '../common/menu';
|
|
22
|
-
import { CommonMenus } from '
|
|
22
|
+
import { CommonMenus } from './common-menus';
|
|
23
23
|
|
|
24
24
|
export namespace WindowCommands {
|
|
25
25
|
|
|
@@ -361,8 +361,13 @@ export class PreferenceServiceImpl implements PreferenceService {
|
|
|
361
361
|
const provider = this.getProvider(scope);
|
|
362
362
|
if (provider) {
|
|
363
363
|
const scopeValue: JSONValue | undefined = provider.get(preferenceName);
|
|
364
|
-
// Skip if a more specific scope has this preference defined
|
|
365
364
|
if (scope > change.scope && scopeValue !== undefined) {
|
|
365
|
+
const preference = this.schemaService.getSchemaProperty(change.preferenceName);
|
|
366
|
+
if (!preference?.type || preference.type === 'object' || preference.type === 'array'
|
|
367
|
+
|| Array.isArray(preference.type) && preference.type.some(candidate => candidate === 'object' || candidate === 'array')) {
|
|
368
|
+
// Merge object/array preferences
|
|
369
|
+
acceptChange(change);
|
|
370
|
+
}
|
|
366
371
|
break;
|
|
367
372
|
}
|
|
368
373
|
// Handle changes in the same scope
|