@codingame/monaco-vscode-views-service-override 1.83.16 → 1.85.0-next.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.
- package/package.json +10 -10
- package/tools/editor.d.ts +1 -1
- package/tools/editor.js +44 -19
- package/views.d.ts +1 -1
- package/views.js +44 -108
- package/vscode/src/vs/base/browser/ui/centered/centeredViewLayout.js +2 -2
- package/vscode/src/vs/base/browser/ui/grid/grid.js +34 -7
- package/vscode/src/vs/base/browser/ui/grid/gridview.js +124 -10
- package/vscode/src/vs/base/common/codicons.d.ts +18 -0
- package/vscode/src/vs/workbench/api/browser/viewsExtensionPoint.js +7 -3
- package/vscode/src/vs/workbench/browser/actions/listCommands.js +4 -2
- package/vscode/src/vs/workbench/browser/dnd.d.ts +13 -0
- package/vscode/src/vs/workbench/browser/parts/activitybar/activitybarPart.d.ts +36 -94
- package/vscode/src/vs/workbench/browser/parts/activitybar/activitybarPart.js +503 -722
- package/vscode/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarPart.js +59 -11
- package/vscode/src/vs/workbench/browser/parts/auxiliarybar/media/auxiliaryBarPart.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/compositeBar.js +22 -114
- package/vscode/src/vs/workbench/browser/parts/compositeBarActions.d.ts +14 -1
- package/vscode/src/vs/workbench/browser/parts/editor/auxiliaryEditorPart.js +185 -0
- package/vscode/src/vs/workbench/browser/parts/editor/breadcrumbsControl.js +33 -7
- package/vscode/src/vs/workbench/browser/parts/editor/breadcrumbsModel.js +3 -4
- package/vscode/src/vs/workbench/browser/parts/editor/editorDropTarget.js +30 -29
- package/vscode/src/vs/workbench/browser/parts/editor/editorGroupView.js +146 -76
- package/vscode/src/vs/workbench/browser/parts/editor/editorGroupWatermark.js +19 -28
- package/vscode/src/vs/workbench/browser/parts/editor/editorPanes.js +45 -16
- package/vscode/src/vs/workbench/browser/parts/editor/editorPart.js +212 -78
- package/vscode/src/vs/workbench/browser/parts/editor/editorParts.js +265 -0
- package/vscode/src/vs/workbench/browser/parts/editor/editorTitleControl.js +22 -20
- package/vscode/src/vs/workbench/browser/parts/editor/media/editorgroupview.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/editor/media/multieditortabscontrol.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/editor/media/singleeditortabscontrol.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/editor/multiEditorTabsControl.js +97 -62
- package/vscode/src/vs/workbench/browser/parts/editor/multiRowEditorTabsControl.js +4 -4
- package/vscode/src/vs/workbench/browser/parts/editor/noEditorTabsControl.js +54 -0
- package/vscode/src/vs/workbench/browser/parts/editor/singleEditorTabsControl.js +10 -8
- package/vscode/src/vs/workbench/browser/parts/media/paneCompositePart.css.js +6 -0
- package/vscode/src/vs/workbench/browser/parts/paneCompositeBar.d.ts +107 -0
- package/vscode/src/vs/workbench/browser/parts/paneCompositeBar.js +645 -0
- package/vscode/src/vs/workbench/browser/parts/paneCompositePart.d.ts +120 -0
- package/vscode/src/vs/workbench/browser/parts/paneCompositePart.js +372 -73
- package/vscode/src/vs/workbench/browser/parts/paneCompositePartService.js +68 -0
- package/vscode/src/vs/workbench/browser/parts/panel/panelPart.d.ts +12 -112
- package/vscode/src/vs/workbench/browser/parts/panel/panelPart.js +57 -689
- package/vscode/src/vs/workbench/browser/parts/sidebar/media/sidebarpart.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarPart.d.ts +24 -33
- package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarPart.js +137 -126
- package/vscode/src/vs/workbench/browser/parts/views/treeView.js +20 -9
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.js +2 -2
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget.js +7 -4
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/outline/documentSymbolsOutline.js +9 -5
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/outline/documentSymbolsTree.js +12 -6
- package/vscode/src/vs/workbench/contrib/files/browser/editors/fileEditorInput.js +20 -3
- package/vscode/src/vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler.js +34 -1
- package/vscode/src/vs/workbench/contrib/files/browser/fileActions.contribution.js +199 -49
- package/vscode/src/vs/workbench/contrib/files/browser/fileCommands.js +31 -3
- package/vscode/src/vs/workbench/contrib/files/browser/workspaceWatcher.js +2 -2
- package/vscode/src/vs/workbench/contrib/files/common/dirtyFilesIndicator.js +0 -1
- package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.contribution.js +54 -32
- package/vscode/src/vs/workbench/contrib/outline/browser/outline.contribution.js +8 -8
- package/vscode/src/vs/workbench/contrib/outline/browser/outlinePane.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/outline/browser/outlinePane.js +1 -0
- package/vscode/src/vs/workbench/contrib/remote/browser/tunnelView.js +1 -1
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek.js +2 -2
- package/vscode/src/vs/workbench/contrib/webview/browser/overlayWebview.js +1 -1
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.js +8 -7
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution.js +1 -1
- package/vscode/src/vs/workbench/services/activity/browser/activityService.js +65 -17
- package/vscode/src/vs/workbench/services/editor/browser/editorResolverService.js +8 -1
- package/vscode/src/vs/workbench/services/history/browser/historyService.js +19 -12
- package/vscode/src/vs/workbench/services/hover/browser/hoverService.js +50 -19
- package/vscode/src/vs/workbench/services/hover/browser/hoverWidget.js +39 -32
- package/vscode/src/vs/workbench/services/progress/browser/media/progressService.css.js +1 -1
- package/vscode/src/vs/workbench/services/progress/browser/progressService.js +3 -3
- package/vscode/src/vs/workbench/services/views/browser/viewDescriptorService.js +17 -15
- package/vscode/src/vs/workbench/services/views/common/viewContainerModel.js +2 -9
- package/vscode/src/vs/workbench/browser/parts/activitybar/activitybarActions.js +0 -635
- package/vscode/src/vs/workbench/browser/parts/editor/editorTabsControl.js +0 -286
- package/vscode/src/vs/workbench/browser/parts/editor/media/editortabscontrol.css.js +0 -6
- package/vscode/src/vs/workbench/browser/parts/panel/media/basepanelpart.css.js +0 -6
- package/vscode/src/vs/workbench/common/activity.js +0 -4
- package/vscode/src/vs/workbench/services/userDataProfile/common/userDataProfileIcons.js +0 -11
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-views-service-override",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.85.0-next.0",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -18,14 +18,14 @@
|
|
|
18
18
|
"module": "index.js",
|
|
19
19
|
"types": "index.d.ts",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"vscode": "npm:@codingame/monaco-vscode-api@1.
|
|
22
|
-
"monaco-editor": "0.
|
|
23
|
-
"@codingame/monaco-vscode-bulk-edit-service-override": "1.
|
|
24
|
-
"@codingame/monaco-vscode-layout-service-override": "1.
|
|
25
|
-
"@codingame/monaco-vscode-quickaccess-service-override": "1.
|
|
26
|
-
"@codingame/monaco-vscode-keybindings-service-override": "1.
|
|
27
|
-
"@codingame/monaco-vscode-environment-service-override": "1.
|
|
28
|
-
"@codingame/monaco-vscode-extensions-service-override": "1.
|
|
29
|
-
"@codingame/monaco-vscode-files-service-override": "1.
|
|
21
|
+
"vscode": "npm:@codingame/monaco-vscode-api@1.85.0-next.0",
|
|
22
|
+
"monaco-editor": "0.45.0",
|
|
23
|
+
"@codingame/monaco-vscode-bulk-edit-service-override": "1.85.0-next.0",
|
|
24
|
+
"@codingame/monaco-vscode-layout-service-override": "1.85.0-next.0",
|
|
25
|
+
"@codingame/monaco-vscode-quickaccess-service-override": "1.85.0-next.0",
|
|
26
|
+
"@codingame/monaco-vscode-keybindings-service-override": "1.85.0-next.0",
|
|
27
|
+
"@codingame/monaco-vscode-environment-service-override": "1.85.0-next.0",
|
|
28
|
+
"@codingame/monaco-vscode-extensions-service-override": "1.85.0-next.0",
|
|
29
|
+
"@codingame/monaco-vscode-files-service-override": "1.85.0-next.0"
|
|
30
30
|
}
|
|
31
31
|
}
|
package/tools/editor.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { IEditorOptions } from 'vscode/vscode/vs/platform/editor/common/editor';
|
|
1
2
|
import { ICodeEditor } from 'vscode/vscode/vs/editor/browser/editorBrowser';
|
|
2
3
|
import { IReference } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
3
|
-
import { IEditorOptions } from 'vscode/vscode/vs/platform/editor/common/editor';
|
|
4
4
|
import { IResolvedTextEditorModel } from 'vscode/vscode/vs/editor/common/services/resolverService';
|
|
5
5
|
|
|
6
6
|
type OpenEditor = (modelRef: IReference<IResolvedTextEditorModel>, options: IEditorOptions | undefined, sideBySide?: boolean) => Promise<ICodeEditor | undefined>;
|
package/tools/editor.js
CHANGED
|
@@ -89,7 +89,7 @@ function wrapOpenEditor(textModelService, defaultBehavior, fallbackBahavior) {
|
|
|
89
89
|
}
|
|
90
90
|
let MonacoEditorService = class MonacoEditorService extends EditorService {
|
|
91
91
|
constructor(_openEditorFallback, _isEditorPartVisible, _editorGroupService, instantiationService, fileService, configurationService, contextService, uriIdentityService, editorResolverService, workspaceTrustRequestService, hostService, textEditorService, textModelService) {
|
|
92
|
-
super(_editorGroupService, instantiationService, fileService, configurationService, contextService, uriIdentityService, editorResolverService, workspaceTrustRequestService, hostService, textEditorService);
|
|
92
|
+
super(undefined, _editorGroupService, instantiationService, fileService, configurationService, contextService, uriIdentityService, editorResolverService, workspaceTrustRequestService, hostService, textEditorService);
|
|
93
93
|
this._isEditorPartVisible = _isEditorPartVisible;
|
|
94
94
|
this.openEditor = wrapOpenEditor(textModelService, this.openEditor.bind(this), _openEditorFallback);
|
|
95
95
|
}
|
|
@@ -229,7 +229,7 @@ let StandaloneEditorGroup = StandaloneEditorGroup_1 = class StandaloneEditorGrou
|
|
|
229
229
|
});
|
|
230
230
|
this.pane = new StandaloneEditorPane(editor, editorInput, this);
|
|
231
231
|
this._onDidModelChange.fire({
|
|
232
|
-
kind:
|
|
232
|
+
kind: 4 ,
|
|
233
233
|
editor: editorInput,
|
|
234
234
|
editorIndex: 0
|
|
235
235
|
});
|
|
@@ -242,7 +242,7 @@ let StandaloneEditorGroup = StandaloneEditorGroup_1 = class StandaloneEditorGrou
|
|
|
242
242
|
const pane = this.pane;
|
|
243
243
|
this.pane = undefined;
|
|
244
244
|
this._onDidModelChange.fire({
|
|
245
|
-
kind:
|
|
245
|
+
kind: 5 ,
|
|
246
246
|
editorIndex: 0
|
|
247
247
|
});
|
|
248
248
|
this._onDidActiveEditorChange.fire({
|
|
@@ -279,6 +279,19 @@ let StandaloneEditorGroup = StandaloneEditorGroup_1 = class StandaloneEditorGrou
|
|
|
279
279
|
this.pane = new StandaloneEditorPane(editor, editorInput, this);
|
|
280
280
|
}
|
|
281
281
|
}
|
|
282
|
+
get groupsView() {
|
|
283
|
+
return unsupported();
|
|
284
|
+
}
|
|
285
|
+
notifyLabelChanged() { }
|
|
286
|
+
createEditorActions() {
|
|
287
|
+
return {
|
|
288
|
+
actions: {
|
|
289
|
+
primary: [],
|
|
290
|
+
secondary: []
|
|
291
|
+
},
|
|
292
|
+
onDidChange: Event.None
|
|
293
|
+
};
|
|
294
|
+
}
|
|
282
295
|
get titleHeight() { return unsupported(); }
|
|
283
296
|
setActive(isActive) {
|
|
284
297
|
this.active = isActive;
|
|
@@ -315,6 +328,8 @@ let MonacoDelegateEditorGroupsService = class MonacoDelegateEditorGroupsService
|
|
|
315
328
|
this._serviceBrand = undefined;
|
|
316
329
|
this.additionalGroups = [];
|
|
317
330
|
this.activeGroupOverride = undefined;
|
|
331
|
+
this.onDidCreateAuxiliaryEditorPart = this.delegate.onDidCreateAuxiliaryEditorPart;
|
|
332
|
+
this.onDidChangeGroupMaximized = this.delegate.onDidChangeGroupMaximized;
|
|
318
333
|
this._onDidChangeActiveGroup = new Emitter();
|
|
319
334
|
this.onDidChangeActiveGroup = Event.any(this._onDidChangeActiveGroup.event, this.delegate.onDidChangeActiveGroup);
|
|
320
335
|
this._onDidAddGroup = new Emitter();
|
|
@@ -323,8 +338,6 @@ let MonacoDelegateEditorGroupsService = class MonacoDelegateEditorGroupsService
|
|
|
323
338
|
this.onDidRemoveGroup = Event.any(this._onDidRemoveGroup.event, this.delegate.onDidRemoveGroup);
|
|
324
339
|
this.onDidMoveGroup = this.delegate.onDidMoveGroup;
|
|
325
340
|
this.onDidActivateGroup = this.delegate.onDidActivateGroup;
|
|
326
|
-
this.onDidLayout = this.delegate.onDidLayout;
|
|
327
|
-
this.onDidScroll = this.delegate.onDidScroll;
|
|
328
341
|
this.onDidChangeGroupIndex = this.delegate.onDidChangeGroupIndex;
|
|
329
342
|
this.onDidChangeGroupLocked = this.delegate.onDidChangeGroupLocked;
|
|
330
343
|
this.getLayout = () => {
|
|
@@ -351,12 +364,6 @@ let MonacoDelegateEditorGroupsService = class MonacoDelegateEditorGroupsService
|
|
|
351
364
|
this.applyLayout = (...args) => {
|
|
352
365
|
return this.delegate.applyLayout(...args);
|
|
353
366
|
};
|
|
354
|
-
this.centerLayout = (...args) => {
|
|
355
|
-
return this.delegate.centerLayout(...args);
|
|
356
|
-
};
|
|
357
|
-
this.isLayoutCentered = (...args) => {
|
|
358
|
-
return this.delegate.isLayoutCentered(...args);
|
|
359
|
-
};
|
|
360
367
|
this.setGroupOrientation = (...args) => {
|
|
361
368
|
return this.delegate.setGroupOrientation(...args);
|
|
362
369
|
};
|
|
@@ -381,9 +388,6 @@ let MonacoDelegateEditorGroupsService = class MonacoDelegateEditorGroupsService
|
|
|
381
388
|
this.copyGroup = (...args) => {
|
|
382
389
|
return this.delegate.copyGroup(...args);
|
|
383
390
|
};
|
|
384
|
-
this.enforcePartOptions = (...args) => {
|
|
385
|
-
return this.delegate.enforcePartOptions(...args);
|
|
386
|
-
};
|
|
387
391
|
this.onDidChangeEditorPartOptions = this.delegate.onDidChangeEditorPartOptions;
|
|
388
392
|
setTimeout(() => {
|
|
389
393
|
const codeEditorService = StandaloneServices.get(ICodeEditorService);
|
|
@@ -393,8 +397,16 @@ let MonacoDelegateEditorGroupsService = class MonacoDelegateEditorGroupsService
|
|
|
393
397
|
this.activeGroupOverride = this.additionalGroups.find(group => group.editor === editor);
|
|
394
398
|
this._onDidChangeActiveGroup.fire(this.activeGroup);
|
|
395
399
|
};
|
|
400
|
+
const onEditorBlurred = () => {
|
|
401
|
+
if (this.activeGroupOverride === this.additionalGroups.find(group => group.editor === editor)) {
|
|
402
|
+
this.activeGroupOverride = undefined;
|
|
403
|
+
this._onDidChangeActiveGroup.fire(this.activeGroup);
|
|
404
|
+
}
|
|
405
|
+
};
|
|
396
406
|
editor.onDidFocusEditorText(onEditorFocused);
|
|
397
407
|
editor.onDidFocusEditorWidget(onEditorFocused);
|
|
408
|
+
editor.onDidBlurEditorText(onEditorBlurred);
|
|
409
|
+
editor.onDidBlurEditorWidget(onEditorBlurred);
|
|
398
410
|
if (editor.hasWidgetFocus()) {
|
|
399
411
|
onEditorFocused();
|
|
400
412
|
}
|
|
@@ -422,20 +434,33 @@ let MonacoDelegateEditorGroupsService = class MonacoDelegateEditorGroupsService
|
|
|
422
434
|
codeEditorService.listCodeEditors().forEach(handleCodeEditor);
|
|
423
435
|
});
|
|
424
436
|
}
|
|
437
|
+
get parts() { return this.delegate.parts; }
|
|
438
|
+
createAuxiliaryEditorPart(options) {
|
|
439
|
+
return this.delegate.createAuxiliaryEditorPart(options);
|
|
440
|
+
}
|
|
441
|
+
get mainPart() { return this.delegate.mainPart; }
|
|
442
|
+
get activePart() { return this.delegate.activePart; }
|
|
443
|
+
getPart(container) {
|
|
444
|
+
return this.delegate.getPart(container);
|
|
445
|
+
}
|
|
446
|
+
toggleMaximizeGroup(group) {
|
|
447
|
+
return this.delegate.toggleMaximizeGroup(group);
|
|
448
|
+
}
|
|
449
|
+
toggleExpandGroup(group) {
|
|
450
|
+
return this.delegate.toggleExpandGroup(group);
|
|
451
|
+
}
|
|
452
|
+
createEditorDropTarget(container, delegate) {
|
|
453
|
+
return this.delegate.createEditorDropTarget(container, delegate);
|
|
454
|
+
}
|
|
425
455
|
get groups() {
|
|
426
456
|
return [...this.additionalGroups, ...this.delegate.groups];
|
|
427
457
|
}
|
|
428
458
|
get activeGroup() {
|
|
429
459
|
return this.activeGroupOverride ?? this.delegate.activeGroup;
|
|
430
460
|
}
|
|
431
|
-
get contentDimension() { return this.delegate.contentDimension; }
|
|
432
461
|
get sideGroup() { return this.delegate.sideGroup; }
|
|
433
462
|
get count() { return this.delegate.count + this.additionalGroups.length; }
|
|
434
463
|
get orientation() { return this.delegate.orientation; }
|
|
435
|
-
get isReady() { return this.delegate.isReady; }
|
|
436
|
-
get whenReady() { return this.delegate.whenReady; }
|
|
437
|
-
get whenRestored() { return this.delegate.whenRestored; }
|
|
438
|
-
get hasRestorableState() { return this.delegate.hasRestorableState; }
|
|
439
464
|
get partOptions() { return this.delegate.partOptions; }
|
|
440
465
|
};
|
|
441
466
|
MonacoDelegateEditorGroupsService = __decorate([
|
package/views.d.ts
CHANGED
|
@@ -2,11 +2,11 @@ import { IEditorOverrideServices } from 'vscode/vscode/vs/editor/standalone/brow
|
|
|
2
2
|
import { ViewContainerLocation, ViewContainer } from 'vscode/vscode/vs/workbench/common/views';
|
|
3
3
|
export { ViewContainerLocation } from 'vscode/vscode/vs/workbench/common/views';
|
|
4
4
|
import { BrandedService, ServicesAccessor } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
5
|
-
import { Part } from 'vscode/vscode/vs/workbench/browser/part';
|
|
6
5
|
import { Parts } from 'vscode/vscode/vs/workbench/services/layout/browser/layoutService';
|
|
7
6
|
export { Parts } from 'vscode/vscode/vs/workbench/services/layout/browser/layoutService';
|
|
8
7
|
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
9
8
|
import { IThemeService } from 'vscode/vscode/vs/platform/theme/common/themeService';
|
|
9
|
+
import { Part } from 'vscode/vscode/vs/workbench/browser/part';
|
|
10
10
|
import { IDisposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
11
11
|
export { IReference } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
12
12
|
import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/telemetry';
|
package/views.js
CHANGED
|
@@ -10,7 +10,6 @@ import { ViewDescriptorService } from './vscode/src/vs/workbench/services/views/
|
|
|
10
10
|
import { IActivityService } from 'vscode/vscode/vs/workbench/services/activity/common/activity';
|
|
11
11
|
import { ActivityService } from './vscode/src/vs/workbench/services/activity/browser/activityService.js';
|
|
12
12
|
import { IPaneCompositePartService } from 'vscode/vscode/vs/workbench/services/panecomposite/browser/panecomposite';
|
|
13
|
-
import { PaneCompositeParts } from './vscode/src/vs/workbench/browser/parts/paneCompositePart.js';
|
|
14
13
|
export { ActivitybarPart } from './vscode/src/vs/workbench/browser/parts/activitybar/activitybarPart.js';
|
|
15
14
|
import { MutableDisposable, DisposableStore } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
16
15
|
import { IHoverService } from 'vscode/vscode/vs/workbench/services/hover/browser/hover';
|
|
@@ -23,8 +22,6 @@ import { ViewPane } from 'vscode/vscode/vs/workbench/browser/parts/views/viewPan
|
|
|
23
22
|
import { Registry } from 'monaco-editor/esm/vs/platform/registry/common/platform.js';
|
|
24
23
|
import { ViewPaneContainer } from 'vscode/vscode/vs/workbench/browser/parts/views/viewPaneContainer';
|
|
25
24
|
import { URI } from 'monaco-editor/esm/vs/base/common/uri.js';
|
|
26
|
-
import { Part } from 'vscode/vscode/vs/workbench/browser/part';
|
|
27
|
-
import { EditorPart } from './vscode/src/vs/workbench/browser/parts/editor/editorPart.js';
|
|
28
25
|
import './vscode/src/vs/workbench/contrib/files/browser/fileCommands.js';
|
|
29
26
|
import './vscode/src/vs/workbench/contrib/files/browser/fileActions.contribution.js';
|
|
30
27
|
import './vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution.js';
|
|
@@ -46,7 +43,6 @@ import './vscode/src/vs/workbench/contrib/files/browser/files.contribution2.js';
|
|
|
46
43
|
import { Codicon } from 'monaco-editor/esm/vs/base/common/codicons.js';
|
|
47
44
|
import { IEditorGroupsService } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupsService';
|
|
48
45
|
export { GroupOrientation } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupsService';
|
|
49
|
-
import { IEditorDropService } from 'vscode/vscode/vs/workbench/services/editor/browser/editorDropService';
|
|
50
46
|
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService';
|
|
51
47
|
import { IEditorResolverService } from 'vscode/vscode/vs/workbench/services/editor/common/editorResolverService';
|
|
52
48
|
export { RegisteredEditorPriority } from 'vscode/vscode/vs/workbench/services/editor/common/editorResolverService';
|
|
@@ -62,7 +58,6 @@ export { EditorInputCapabilities } from 'vscode/vscode/vs/workbench/common/edito
|
|
|
62
58
|
import { ITextEditorService, TextEditorService } from 'vscode/vscode/vs/workbench/services/textfile/common/textEditorService';
|
|
63
59
|
import { CodeEditorService } from 'vscode/vscode/vs/workbench/services/editor/browser/codeEditorService';
|
|
64
60
|
import { IUntitledTextEditorService, UntitledTextEditorService } from 'vscode/vscode/vs/workbench/services/untitled/common/untitledTextEditorService';
|
|
65
|
-
import { IStatusbarService } from 'vscode/vscode/vs/workbench/services/statusbar/browser/statusbar';
|
|
66
61
|
import { IHistoryService } from 'vscode/vscode/vs/workbench/services/history/common/history';
|
|
67
62
|
import { HistoryService } from './vscode/src/vs/workbench/services/history/browser/historyService.js';
|
|
68
63
|
import { registerAction2, Action2, MenuId } from 'monaco-editor/esm/vs/platform/actions/common/actions.js';
|
|
@@ -88,8 +83,6 @@ import { IThemeService } from 'monaco-editor/esm/vs/platform/theme/common/themeS
|
|
|
88
83
|
export { ConfirmResult } from './override/vs/platform/dialogs/common/dialogs.js';
|
|
89
84
|
import { IFileService } from 'monaco-editor/esm/vs/platform/files/common/files.js';
|
|
90
85
|
import { ILayoutService } from 'monaco-editor/esm/vs/platform/layout/browser/layoutService.js';
|
|
91
|
-
import { IBannerService } from 'vscode/vscode/vs/workbench/services/banner/browser/bannerService';
|
|
92
|
-
import { ITitleService } from 'vscode/vscode/vs/workbench/services/title/common/titleService';
|
|
93
86
|
import { IProgressService } from 'monaco-editor/esm/vs/platform/progress/common/progress.js';
|
|
94
87
|
import { ProgressService } from './vscode/src/vs/workbench/services/progress/browser/progressService.js';
|
|
95
88
|
import { DomScrollableElement } from 'monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollableElement.js';
|
|
@@ -108,6 +101,9 @@ import { IWorkspaceContextService, isTemporaryWorkspace } from 'monaco-editor/es
|
|
|
108
101
|
import { IConfigurationService } from 'monaco-editor/esm/vs/platform/configuration/common/configuration.js';
|
|
109
102
|
import { coalesce } from 'monaco-editor/esm/vs/base/common/arrays.js';
|
|
110
103
|
import { IWorkingCopyBackupService } from 'vscode/vscode/vs/workbench/services/workingCopy/common/workingCopyBackup';
|
|
104
|
+
import { PaneCompositePartService } from './vscode/src/vs/workbench/browser/parts/paneCompositePartService.js';
|
|
105
|
+
import { EditorParts } from './vscode/src/vs/workbench/browser/parts/editor/editorParts.js';
|
|
106
|
+
import { IAuxiliaryWindowService, BrowserAuxiliaryWindowService } from 'vscode/vscode/vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService';
|
|
111
107
|
import { MonacoEditorService, MonacoDelegateEditorGroupsService } from './tools/editor.js';
|
|
112
108
|
import getServiceOverride$2 from '@codingame/monaco-vscode-bulk-edit-service-override';
|
|
113
109
|
import getServiceOverride$1 from '@codingame/monaco-vscode-layout-service-override';
|
|
@@ -161,16 +157,24 @@ function _attachPart(part, container) {
|
|
|
161
157
|
};
|
|
162
158
|
}
|
|
163
159
|
function attachPart(part, container) {
|
|
164
|
-
|
|
160
|
+
const _part = getPart(part);
|
|
161
|
+
if (_part == null) {
|
|
162
|
+
throw new Error('Part not found');
|
|
163
|
+
}
|
|
164
|
+
return _attachPart(_part, container);
|
|
165
165
|
}
|
|
166
166
|
function onPartVisibilityChange(part, listener) {
|
|
167
|
-
|
|
167
|
+
const _part = getPart(part);
|
|
168
|
+
if (_part == null) {
|
|
169
|
+
throw new Error('Part not found');
|
|
170
|
+
}
|
|
171
|
+
return _part.onDidVisibilityChange(listener);
|
|
168
172
|
}
|
|
169
173
|
function isPartVisibile(part) {
|
|
170
|
-
return StandaloneServices.get(IWorkbenchLayoutService).isVisible(part);
|
|
174
|
+
return StandaloneServices.get(IWorkbenchLayoutService).isVisible(part, window);
|
|
171
175
|
}
|
|
172
176
|
function setPartVisibility(part, visible) {
|
|
173
|
-
StandaloneServices.get(IWorkbenchLayoutService).setPartHidden(!visible, part);
|
|
177
|
+
StandaloneServices.get(IWorkbenchLayoutService).setPartHidden(!visible, part, window);
|
|
174
178
|
}
|
|
175
179
|
function renderActivitybarPar(container) {
|
|
176
180
|
return attachPart("workbench.parts.activitybar" , container);
|
|
@@ -317,7 +321,10 @@ function registerCustomView(options) {
|
|
|
317
321
|
});
|
|
318
322
|
const views = [{
|
|
319
323
|
id: options.id,
|
|
320
|
-
name:
|
|
324
|
+
name: {
|
|
325
|
+
value: options.name,
|
|
326
|
+
original: options.name
|
|
327
|
+
},
|
|
321
328
|
ctorDescriptor: new SyncDescriptor(class extends ViewPane {
|
|
322
329
|
renderBody(container) {
|
|
323
330
|
super.renderBody(container);
|
|
@@ -385,17 +392,6 @@ function registerCustomView(options) {
|
|
|
385
392
|
}
|
|
386
393
|
return disposableCollection;
|
|
387
394
|
}
|
|
388
|
-
let EditorDropService = class EditorDropService {
|
|
389
|
-
constructor(editorPart) {
|
|
390
|
-
this.editorPart = editorPart;
|
|
391
|
-
}
|
|
392
|
-
createEditorDropTarget(container, delegate) {
|
|
393
|
-
return this.editorPart.createEditorDropTarget(container, delegate);
|
|
394
|
-
}
|
|
395
|
-
};
|
|
396
|
-
EditorDropService = __decorate([
|
|
397
|
-
( __param(0, IEditorGroupsService))
|
|
398
|
-
], EditorDropService);
|
|
399
395
|
function isElementVisible(el) {
|
|
400
396
|
if (!el.isConnected) {
|
|
401
397
|
return false;
|
|
@@ -409,79 +405,23 @@ function isElementVisible(el) {
|
|
|
409
405
|
return el.offsetHeight > 0 && el.offsetWidth > 0;
|
|
410
406
|
}
|
|
411
407
|
function isEditorPartVisible() {
|
|
412
|
-
const container = StandaloneServices.get(IEditorGroupsService).getContainer();
|
|
408
|
+
const container = StandaloneServices.get(IEditorGroupsService).mainPart.getContainer();
|
|
413
409
|
return container != null && isElementVisible(container);
|
|
414
410
|
}
|
|
415
|
-
let
|
|
411
|
+
let MonacoEditorParts = class MonacoEditorParts extends MonacoDelegateEditorGroupsService {
|
|
416
412
|
constructor(instantiationService) {
|
|
417
|
-
super(instantiationService.createInstance(
|
|
418
|
-
this.onDidChangeSizeConstraints = this.delegate.onDidChangeSizeConstraints;
|
|
413
|
+
super(instantiationService.createInstance(EditorParts), instantiationService);
|
|
419
414
|
this.restoreGroup = (...args) => {
|
|
420
415
|
return this.delegate.restoreGroup(...args);
|
|
421
416
|
};
|
|
422
|
-
this.isGroupMaximized = (...args) => {
|
|
423
|
-
return this.delegate.isGroupMaximized(...args);
|
|
424
|
-
};
|
|
425
|
-
this.createEditorDropTarget = (...args) => {
|
|
426
|
-
return this.delegate.createEditorDropTarget(...args);
|
|
427
|
-
};
|
|
428
|
-
this.updateStyles = (...args) => {
|
|
429
|
-
return this.delegate.updateStyles(...args);
|
|
430
|
-
};
|
|
431
|
-
this.setBoundarySashes = (...args) => {
|
|
432
|
-
return this.delegate.setBoundarySashes(...args);
|
|
433
|
-
};
|
|
434
|
-
this.layout = (...args) => {
|
|
435
|
-
return this.delegate.layout(...args);
|
|
436
|
-
};
|
|
437
|
-
this.toJSON = (...args) => {
|
|
438
|
-
return this.delegate.toJSON(...args);
|
|
439
|
-
};
|
|
440
|
-
this.onDidVisibilityChange = this.delegate.onDidVisibilityChange;
|
|
441
|
-
this.create = (...args) => {
|
|
442
|
-
return this.delegate.create(...args);
|
|
443
|
-
};
|
|
444
|
-
this.getContainer = (...args) => {
|
|
445
|
-
return this.delegate.getContainer(...args);
|
|
446
|
-
};
|
|
447
|
-
this.setVisible = (...args) => {
|
|
448
|
-
return this.delegate.setVisible(...args);
|
|
449
|
-
};
|
|
450
|
-
this.getId = (...args) => {
|
|
451
|
-
return this.delegate.getId(...args);
|
|
452
|
-
};
|
|
453
|
-
}
|
|
454
|
-
get minimumWidth() {
|
|
455
|
-
return this.delegate.minimumWidth;
|
|
456
|
-
}
|
|
457
|
-
get maximumWidth() {
|
|
458
|
-
return this.delegate.maximumWidth;
|
|
459
|
-
}
|
|
460
|
-
get minimumHeight() {
|
|
461
|
-
return this.delegate.minimumHeight;
|
|
462
|
-
}
|
|
463
|
-
get maximumHeight() {
|
|
464
|
-
return this.delegate.maximumHeight;
|
|
465
417
|
}
|
|
466
|
-
|
|
467
|
-
return this.delegate.
|
|
468
|
-
}
|
|
469
|
-
get onDidChange() {
|
|
470
|
-
return this.delegate.onDidChange;
|
|
471
|
-
}
|
|
472
|
-
get priority() {
|
|
473
|
-
return this.delegate.priority;
|
|
474
|
-
}
|
|
475
|
-
get dimension() {
|
|
476
|
-
return this.delegate.dimension;
|
|
477
|
-
}
|
|
478
|
-
get element() {
|
|
479
|
-
return this.delegate.element;
|
|
418
|
+
registerPart(part) {
|
|
419
|
+
return this.delegate.registerPart(part);
|
|
480
420
|
}
|
|
481
421
|
};
|
|
482
|
-
|
|
422
|
+
MonacoEditorParts = __decorate([
|
|
483
423
|
( __param(0, IInstantiationService))
|
|
484
|
-
],
|
|
424
|
+
], MonacoEditorParts);
|
|
485
425
|
let webviewIframeAlternateDomains;
|
|
486
426
|
registerAssets({
|
|
487
427
|
'vs/workbench/contrib/webview/browser/pre/service-worker.js': () => changeUrlDomain(new URL('./assets/service-worker.js', import.meta.url).href, webviewIframeAlternateDomains),
|
|
@@ -504,9 +444,6 @@ onRenderWorkbench(async (accessor) => {
|
|
|
504
444
|
const configurationService = accessor.get(IConfigurationService);
|
|
505
445
|
const fileService = accessor.get(IFileService);
|
|
506
446
|
const workingCopyBackupService = accessor.get(IWorkingCopyBackupService);
|
|
507
|
-
const withStatusBar = accessor.get(IStatusbarService) instanceof Part;
|
|
508
|
-
const withBannerPart = accessor.get(IBannerService) instanceof Part;
|
|
509
|
-
const withTitlePart = accessor.get(ITitleService) instanceof Part;
|
|
510
447
|
const layoutService = accessor.get(ILayoutService);
|
|
511
448
|
function getInitialEditorsState() {
|
|
512
449
|
const defaultLayout = environmentService.options?.defaultLayout;
|
|
@@ -588,7 +525,7 @@ onRenderWorkbench(async (accessor) => {
|
|
|
588
525
|
return filesToOpenOrCreate;
|
|
589
526
|
}
|
|
590
527
|
else if (contextService.getWorkbenchState() === 1 && configurationService.getValue('workbench.startupEditor') === 'newUntitledFile') {
|
|
591
|
-
if (editorGroupService.hasRestorableState) {
|
|
528
|
+
if (editorGroupService.mainPart.hasRestorableState) {
|
|
592
529
|
return [];
|
|
593
530
|
}
|
|
594
531
|
const hasBackups = await workingCopyBackupService.hasBackups();
|
|
@@ -655,31 +592,30 @@ onRenderWorkbench(async (accessor) => {
|
|
|
655
592
|
const invisibleContainer = document.createElement('div');
|
|
656
593
|
invisibleContainer.style.display = 'none';
|
|
657
594
|
document.body.append(invisibleContainer);
|
|
658
|
-
for (const { id, role, classes, options
|
|
659
|
-
{ id: "workbench.parts.titlebar" , role: 'none', classes: ['titlebar']
|
|
660
|
-
{ id: "workbench.parts.banner" , role: 'banner', classes: ['banner']
|
|
595
|
+
for (const { id, role, classes, options } of [
|
|
596
|
+
{ id: "workbench.parts.titlebar" , role: 'none', classes: ['titlebar'] },
|
|
597
|
+
{ id: "workbench.parts.banner" , role: 'banner', classes: ['banner'] },
|
|
661
598
|
{ id: "workbench.parts.activitybar" , role: 'none', classes: ['activitybar', 'left'] },
|
|
662
599
|
{ id: "workbench.parts.sidebar" , role: 'none', classes: ['sidebar', 'left'] },
|
|
663
600
|
{ id: "workbench.parts.editor" , role: 'main', classes: ['editor'], options: { restorePreviousState: initialLayoutState.editor.restoreEditors } },
|
|
664
601
|
{ id: "workbench.parts.panel" , role: 'none', classes: ['panel', 'basepanel', positionToString(2 )] },
|
|
665
602
|
{ id: "workbench.parts.auxiliarybar" , role: 'none', classes: ['auxiliarybar', 'basepanel', 'right'] },
|
|
666
|
-
{ id: "workbench.parts.statusbar" , role: 'status', classes: ['statusbar']
|
|
603
|
+
{ id: "workbench.parts.statusbar" , role: 'status', classes: ['statusbar'] }
|
|
667
604
|
]) {
|
|
668
|
-
if (!enabled) {
|
|
669
|
-
continue;
|
|
670
|
-
}
|
|
671
|
-
const partContainer = createPart(id, role, classes);
|
|
672
605
|
const part = layoutService.getPart(id);
|
|
673
|
-
part
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
606
|
+
if (part != null) {
|
|
607
|
+
const partContainer = createPart(id, role, classes);
|
|
608
|
+
part.create(partContainer, options);
|
|
609
|
+
renderPart(partContainer, part);
|
|
610
|
+
part.layout(9999, 9999, 0, 0);
|
|
611
|
+
invisibleContainer.append(partContainer);
|
|
612
|
+
}
|
|
677
613
|
}
|
|
678
614
|
const layoutReadyPromises = [];
|
|
679
615
|
const layoutRestoredPromises = [];
|
|
680
616
|
layoutReadyPromises.push((async () => {
|
|
681
617
|
mark('code/willRestoreEditors');
|
|
682
|
-
await editorGroupService.whenReady;
|
|
618
|
+
await editorGroupService.mainPart.whenReady;
|
|
683
619
|
mark('code/restoreEditors/editorGroupsReady');
|
|
684
620
|
if (initialLayoutState.layout?.editors != null) {
|
|
685
621
|
editorGroupService.applyLayout(initialLayoutState.layout.editors);
|
|
@@ -710,7 +646,7 @@ onRenderWorkbench(async (accessor) => {
|
|
|
710
646
|
}
|
|
711
647
|
layoutRestoredPromises.push(Promise.all([
|
|
712
648
|
openEditorsPromise?.finally(() => mark('code/restoreEditors/editorsOpened')),
|
|
713
|
-
editorGroupService.whenRestored.finally(() => mark('code/restoreEditors/editorGroupsRestored'))
|
|
649
|
+
editorGroupService.mainPart.whenRestored.finally(() => mark('code/restoreEditors/editorGroupsRestored'))
|
|
714
650
|
]).finally(() => {
|
|
715
651
|
mark('code/didRestoreEditors');
|
|
716
652
|
}));
|
|
@@ -820,13 +756,12 @@ function getServiceOverride(openEditorFallback, _webviewIframeAlternateDomains,
|
|
|
820
756
|
[( IViewsService.toString())]: new SyncDescriptor(ViewsService, [], false),
|
|
821
757
|
[( IViewDescriptorService.toString())]: new SyncDescriptor(ViewDescriptorService, [], true),
|
|
822
758
|
[( IActivityService.toString())]: new SyncDescriptor(ActivityService, [], true),
|
|
823
|
-
[( IPaneCompositePartService.toString())]: new SyncDescriptor(
|
|
759
|
+
[( IPaneCompositePartService.toString())]: new SyncDescriptor(PaneCompositePartService, [], true),
|
|
824
760
|
[( IHoverService.toString())]: new SyncDescriptor(HoverService, [], true),
|
|
825
761
|
[( IExplorerService.toString())]: new SyncDescriptor(ExplorerService, [], true),
|
|
826
762
|
[( ICodeEditorService.toString())]: new SyncDescriptor(CodeEditorService, [], true),
|
|
827
763
|
[( ITextEditorService.toString())]: new SyncDescriptor(TextEditorService, [], false),
|
|
828
|
-
[( IEditorGroupsService.toString())]: new SyncDescriptor(
|
|
829
|
-
[( IEditorDropService.toString())]: new SyncDescriptor(EditorDropService, [], true),
|
|
764
|
+
[( IEditorGroupsService.toString())]: new SyncDescriptor(MonacoEditorParts, [], false),
|
|
830
765
|
[( IEditorService.toString())]: new SyncDescriptor(MonacoEditorService, [openEditorFallback, isEditorPartVisible], false),
|
|
831
766
|
[( IEditorResolverService.toString())]: new SyncDescriptor(EditorResolverService, [], false),
|
|
832
767
|
[( IBreadcrumbsService.toString())]: new SyncDescriptor(BreadcrumbsService, [], true),
|
|
@@ -838,7 +773,8 @@ function getServiceOverride(openEditorFallback, _webviewIframeAlternateDomains,
|
|
|
838
773
|
[( IWebviewService.toString())]: new SyncDescriptor(WebviewService, [], true),
|
|
839
774
|
[( IWebviewViewService.toString())]: new SyncDescriptor(WebviewViewService, [], true),
|
|
840
775
|
[( IWebviewWorkbenchService.toString())]: new SyncDescriptor(WebviewEditorService, [], true),
|
|
841
|
-
[( IProgressService.toString())]: new SyncDescriptor(ProgressService, [], true)
|
|
776
|
+
[( IProgressService.toString())]: new SyncDescriptor(ProgressService, [], true),
|
|
777
|
+
[( IAuxiliaryWindowService.toString())]: new SyncDescriptor(BrowserAuxiliaryWindowService, [], true)
|
|
842
778
|
};
|
|
843
779
|
}
|
|
844
780
|
|
|
@@ -33,14 +33,14 @@ function toSplitViewView(view, getHeight) {
|
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
35
|
class CenteredViewLayout {
|
|
36
|
-
constructor(container, view, state = { ...defaultState }) {
|
|
36
|
+
constructor(container, view, state = { ...defaultState }, centeredLayoutFixedWidth = false) {
|
|
37
37
|
this.container = container;
|
|
38
38
|
this.view = view;
|
|
39
39
|
this.state = state;
|
|
40
|
+
this.centeredLayoutFixedWidth = centeredLayoutFixedWidth;
|
|
40
41
|
this.lastLayoutPosition = { width: 0, height: 0, left: 0, top: 0 };
|
|
41
42
|
this.didLayout = false;
|
|
42
43
|
this.splitViewDisposables = ( new DisposableStore());
|
|
43
|
-
this.centeredLayoutFixedWidth = true;
|
|
44
44
|
this._boundarySashes = {};
|
|
45
45
|
this.container.appendChild(this.view.element);
|
|
46
46
|
this.container.style.overflow = 'hidden';
|
|
@@ -143,6 +143,7 @@ class Grid extends Disposable {
|
|
|
143
143
|
}
|
|
144
144
|
this.onDidChange = this.gridview.onDidChange;
|
|
145
145
|
this.onDidScroll = this.gridview.onDidScroll;
|
|
146
|
+
this.onDidChangeViewMaximized = this.gridview.onDidChangeViewMaximized;
|
|
146
147
|
}
|
|
147
148
|
style(styles) {
|
|
148
149
|
this.gridview.style(styles);
|
|
@@ -258,9 +259,16 @@ class Grid extends Disposable {
|
|
|
258
259
|
const location = this.getViewLocation(view);
|
|
259
260
|
return this.gridview.resizeView(location, size);
|
|
260
261
|
}
|
|
261
|
-
|
|
262
|
+
isViewExpanded(view) {
|
|
262
263
|
const location = this.getViewLocation(view);
|
|
263
|
-
return this.gridview.
|
|
264
|
+
return this.gridview.isViewExpanded(location);
|
|
265
|
+
}
|
|
266
|
+
isViewMaximized(view) {
|
|
267
|
+
const location = this.getViewLocation(view);
|
|
268
|
+
return this.gridview.isViewMaximized(location);
|
|
269
|
+
}
|
|
270
|
+
hasMaximizedView() {
|
|
271
|
+
return this.gridview.hasMaximizedView();
|
|
264
272
|
}
|
|
265
273
|
getViewSize(view) {
|
|
266
274
|
if (!view) {
|
|
@@ -273,9 +281,19 @@ class Grid extends Disposable {
|
|
|
273
281
|
const location = this.getViewLocation(view);
|
|
274
282
|
return this.gridview.getViewCachedVisibleSize(location);
|
|
275
283
|
}
|
|
276
|
-
|
|
284
|
+
maximizeView(view) {
|
|
285
|
+
if (this.views.size < 2) {
|
|
286
|
+
throw new Error('At least two views are required to maximize a view');
|
|
287
|
+
}
|
|
277
288
|
const location = this.getViewLocation(view);
|
|
278
|
-
this.gridview.
|
|
289
|
+
this.gridview.maximizeView(location);
|
|
290
|
+
}
|
|
291
|
+
exitMaximizedView() {
|
|
292
|
+
this.gridview.exitMaximizedView();
|
|
293
|
+
}
|
|
294
|
+
expandView(view) {
|
|
295
|
+
const location = this.getViewLocation(view);
|
|
296
|
+
this.gridview.expandView(location);
|
|
279
297
|
}
|
|
280
298
|
distributeViewSizes() {
|
|
281
299
|
this.gridview.distributeViewSizes();
|
|
@@ -356,12 +374,21 @@ class SerializableGrid extends Grid {
|
|
|
356
374
|
static serializeNode(node, orientation) {
|
|
357
375
|
const size = orientation === 0 ? node.box.width : node.box.height;
|
|
358
376
|
if (!isGridBranchNode(node)) {
|
|
377
|
+
const serializedLeafNode = { type: 'leaf', data: node.view.toJSON(), size };
|
|
359
378
|
if (typeof node.cachedVisibleSize === 'number') {
|
|
360
|
-
|
|
379
|
+
serializedLeafNode.size = node.cachedVisibleSize;
|
|
380
|
+
serializedLeafNode.visible = false;
|
|
361
381
|
}
|
|
362
|
-
|
|
382
|
+
else if (node.maximized) {
|
|
383
|
+
serializedLeafNode.maximized = true;
|
|
384
|
+
}
|
|
385
|
+
return serializedLeafNode;
|
|
386
|
+
}
|
|
387
|
+
const data = ( node.children.map(c => SerializableGrid.serializeNode(c, orthogonal(orientation))));
|
|
388
|
+
if (( data.some(c => c.visible !== false))) {
|
|
389
|
+
return { type: 'branch', data: data, size };
|
|
363
390
|
}
|
|
364
|
-
return { type: 'branch', data:
|
|
391
|
+
return { type: 'branch', data: data, size, visible: false };
|
|
365
392
|
}
|
|
366
393
|
static deserialize(json, deserializer, options = {}) {
|
|
367
394
|
if (typeof json.orientation !== 'number') {
|