dockview-core 6.6.1 → 7.0.2
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/README.md +8 -1
- package/dist/cjs/api/component.api.d.ts +42 -21
- package/dist/cjs/api/component.api.js +111 -20
- package/dist/cjs/api/dockviewGroupPanelApi.d.ts +23 -8
- package/dist/cjs/api/dockviewGroupPanelApi.js +23 -0
- package/dist/cjs/api/dockviewPanelApi.d.ts +4 -3
- package/dist/cjs/api/dockviewPanelApi.js +8 -0
- package/dist/cjs/dnd/droptarget.d.ts +8 -0
- package/dist/cjs/dnd/droptarget.js +28 -0
- package/dist/cjs/dockview/accessibilityMessages.d.ts +32 -0
- package/dist/cjs/dockview/accessibilityMessages.js +51 -0
- package/dist/cjs/dockview/allModules.d.ts +8 -0
- package/dist/cjs/dockview/allModules.js +25 -0
- package/dist/cjs/dockview/components/panel/content.d.ts +2 -0
- package/dist/cjs/dockview/components/panel/content.js +35 -4
- package/dist/cjs/dockview/components/tab/tab.js +33 -5
- package/dist/cjs/dockview/components/titlebar/floatingTitleBar.d.ts +35 -0
- package/dist/cjs/dockview/components/titlebar/floatingTitleBar.js +95 -0
- package/dist/cjs/dockview/components/titlebar/groupDragSource.d.ts +52 -0
- package/dist/cjs/dockview/components/titlebar/groupDragSource.js +218 -0
- package/dist/cjs/dockview/components/titlebar/tabGroupIndicator.d.ts +2 -1
- package/dist/cjs/dockview/components/titlebar/tabGroupIndicator.js +31 -24
- package/dist/cjs/dockview/components/titlebar/tabGroups.js +1 -0
- package/dist/cjs/dockview/components/titlebar/tabs.d.ts +12 -0
- package/dist/cjs/dockview/components/titlebar/tabs.js +105 -2
- package/dist/cjs/dockview/components/titlebar/tabsContainer.d.ts +4 -0
- package/dist/cjs/dockview/components/titlebar/tabsContainer.js +13 -3
- package/dist/cjs/dockview/components/titlebar/voidContainer.d.ts +1 -4
- package/dist/cjs/dockview/components/titlebar/voidContainer.js +31 -155
- package/dist/cjs/dockview/dockviewComponent.d.ts +299 -44
- package/dist/cjs/dockview/dockviewComponent.js +1787 -1041
- package/dist/cjs/dockview/dockviewFloatingGroupPanel.d.ts +33 -2
- package/dist/cjs/dockview/dockviewFloatingGroupPanel.js +39 -3
- package/dist/cjs/dockview/dockviewGroupPanel.d.ts +0 -1
- package/dist/cjs/dockview/dockviewGroupPanelModel.d.ts +36 -14
- package/dist/cjs/dockview/dockviewGroupPanelModel.js +133 -101
- package/dist/cjs/dockview/dockviewPanel.d.ts +2 -2
- package/dist/cjs/dockview/edgeGroupService.d.ts +38 -0
- package/dist/cjs/dockview/edgeGroupService.js +128 -0
- package/dist/cjs/dockview/floatingGroupService.d.ts +37 -0
- package/dist/cjs/dockview/floatingGroupService.js +231 -0
- package/dist/cjs/dockview/headerActionsService.d.ts +32 -0
- package/dist/cjs/dockview/headerActionsService.js +149 -0
- package/dist/cjs/dockview/liveRegionService.d.ts +53 -0
- package/dist/cjs/dockview/liveRegionService.js +185 -0
- package/dist/cjs/dockview/moduleContracts.d.ts +119 -0
- package/dist/cjs/dockview/moduleContracts.js +2 -0
- package/dist/cjs/dockview/modules.d.ts +110 -0
- package/dist/cjs/dockview/modules.js +304 -0
- package/dist/cjs/dockview/options.d.ts +159 -6
- package/dist/cjs/dockview/options.js +8 -1
- package/dist/cjs/dockview/popoutWindowService.d.ts +95 -0
- package/dist/cjs/dockview/popoutWindowService.js +261 -0
- package/dist/cjs/dockview/rootDropTargetService.d.ts +35 -0
- package/dist/cjs/dockview/rootDropTargetService.js +87 -0
- package/dist/cjs/dockview/watermarkService.d.ts +30 -0
- package/dist/cjs/dockview/watermarkService.js +61 -0
- package/dist/cjs/gridview/baseComponentGridview.d.ts +1 -1
- package/dist/cjs/gridview/baseComponentGridview.js +3 -2
- package/dist/cjs/gridview/gridviewComponent.d.ts +3 -3
- package/dist/cjs/gridview/gridviewPanel.d.ts +1 -1
- package/dist/cjs/index.d.ts +11 -4
- package/dist/cjs/index.js +14 -1
- package/dist/cjs/overlay/overlay.d.ts +43 -1
- package/dist/cjs/overlay/overlay.js +57 -8
- package/dist/cjs/paneview/draggablePaneviewPanel.d.ts +2 -2
- package/dist/cjs/paneview/draggablePaneviewPanel.js +4 -4
- package/dist/cjs/paneview/paneviewComponent.d.ts +3 -3
- package/dist/cjs/paneview/paneviewComponent.js +5 -5
- package/dist/dockview-core.js +3201 -1280
- package/dist/dockview-core.min.js +2 -2
- package/dist/dockview-core.min.js.map +1 -1
- package/dist/dockview-core.min.noStyle.js +2 -2
- package/dist/dockview-core.min.noStyle.js.map +1 -1
- package/dist/dockview-core.noStyle.js +3200 -1279
- package/dist/esm/api/component.api.d.ts +42 -21
- package/dist/esm/api/component.api.js +63 -18
- package/dist/esm/api/dockviewGroupPanelApi.d.ts +23 -8
- package/dist/esm/api/dockviewGroupPanelApi.js +19 -0
- package/dist/esm/api/dockviewPanelApi.d.ts +4 -3
- package/dist/esm/api/dockviewPanelApi.js +7 -0
- package/dist/esm/dnd/droptarget.d.ts +8 -0
- package/dist/esm/dnd/droptarget.js +28 -0
- package/dist/esm/dockview/accessibilityMessages.d.ts +32 -0
- package/dist/esm/dockview/accessibilityMessages.js +30 -0
- package/dist/esm/dockview/allModules.d.ts +8 -0
- package/dist/esm/dockview/allModules.js +22 -0
- package/dist/esm/dockview/components/panel/content.d.ts +2 -0
- package/dist/esm/dockview/components/panel/content.js +36 -5
- package/dist/esm/dockview/components/tab/tab.js +33 -5
- package/dist/esm/dockview/components/titlebar/floatingTitleBar.d.ts +35 -0
- package/dist/esm/dockview/components/titlebar/floatingTitleBar.js +65 -0
- package/dist/esm/dockview/components/titlebar/groupDragSource.d.ts +52 -0
- package/dist/esm/dockview/components/titlebar/groupDragSource.js +178 -0
- package/dist/esm/dockview/components/titlebar/tabGroupIndicator.d.ts +2 -1
- package/dist/esm/dockview/components/titlebar/tabGroupIndicator.js +31 -24
- package/dist/esm/dockview/components/titlebar/tabGroups.js +1 -0
- package/dist/esm/dockview/components/titlebar/tabs.d.ts +12 -0
- package/dist/esm/dockview/components/titlebar/tabs.js +102 -2
- package/dist/esm/dockview/components/titlebar/tabsContainer.d.ts +4 -0
- package/dist/esm/dockview/components/titlebar/tabsContainer.js +8 -2
- package/dist/esm/dockview/components/titlebar/voidContainer.d.ts +1 -4
- package/dist/esm/dockview/components/titlebar/voidContainer.js +33 -145
- package/dist/esm/dockview/dockviewComponent.d.ts +299 -44
- package/dist/esm/dockview/dockviewComponent.js +1420 -743
- package/dist/esm/dockview/dockviewFloatingGroupPanel.d.ts +33 -2
- package/dist/esm/dockview/dockviewFloatingGroupPanel.js +35 -3
- package/dist/esm/dockview/dockviewGroupPanel.d.ts +0 -1
- package/dist/esm/dockview/dockviewGroupPanelModel.d.ts +36 -14
- package/dist/esm/dockview/dockviewGroupPanelModel.js +109 -93
- package/dist/esm/dockview/dockviewPanel.d.ts +2 -2
- package/dist/esm/dockview/edgeGroupService.d.ts +38 -0
- package/dist/esm/dockview/edgeGroupService.js +63 -0
- package/dist/esm/dockview/floatingGroupService.d.ts +37 -0
- package/dist/esm/dockview/floatingGroupService.js +150 -0
- package/dist/esm/dockview/headerActionsService.d.ts +32 -0
- package/dist/esm/dockview/headerActionsService.js +86 -0
- package/dist/esm/dockview/liveRegionService.d.ts +53 -0
- package/dist/esm/dockview/liveRegionService.js +159 -0
- package/dist/esm/dockview/moduleContracts.d.ts +119 -0
- package/dist/esm/dockview/moduleContracts.js +1 -0
- package/dist/esm/dockview/modules.d.ts +110 -0
- package/dist/esm/dockview/modules.js +170 -0
- package/dist/esm/dockview/options.d.ts +159 -6
- package/dist/esm/dockview/options.js +8 -1
- package/dist/esm/dockview/popoutWindowService.d.ts +95 -0
- package/dist/esm/dockview/popoutWindowService.js +175 -0
- package/dist/esm/dockview/rootDropTargetService.d.ts +35 -0
- package/dist/esm/dockview/rootDropTargetService.js +82 -0
- package/dist/esm/dockview/watermarkService.d.ts +30 -0
- package/dist/esm/dockview/watermarkService.js +56 -0
- package/dist/esm/gridview/baseComponentGridview.d.ts +1 -1
- package/dist/esm/gridview/baseComponentGridview.js +2 -2
- package/dist/esm/gridview/gridviewComponent.d.ts +3 -3
- package/dist/esm/gridview/gridviewPanel.d.ts +1 -1
- package/dist/esm/index.d.ts +11 -4
- package/dist/esm/index.js +4 -0
- package/dist/esm/overlay/overlay.d.ts +43 -1
- package/dist/esm/overlay/overlay.js +53 -8
- package/dist/esm/paneview/draggablePaneviewPanel.d.ts +2 -2
- package/dist/esm/paneview/draggablePaneviewPanel.js +4 -4
- package/dist/esm/paneview/paneviewComponent.d.ts +3 -3
- package/dist/esm/paneview/paneviewComponent.js +5 -5
- package/dist/package/main.cjs.js +3236 -1315
- package/dist/package/main.cjs.min.js +2 -2
- package/dist/package/main.esm.min.mjs +2 -2
- package/dist/package/main.esm.mjs +3191 -1281
- package/dist/styles/dockview.css +275 -13
- package/package.json +10 -1
- package/dist/cjs/dockview/contextMenu.d.ts +0 -10
- package/dist/cjs/dockview/contextMenu.js +0 -313
- package/dist/esm/dockview/contextMenu.d.ts +0 -10
- package/dist/esm/dockview/contextMenu.js +0 -228
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { IDisposable } from '../lifecycle';
|
|
2
|
+
import { DockviewGroupPanel } from './dockviewGroupPanel';
|
|
3
|
+
import { EdgeGroupPosition } from './dockviewShell';
|
|
4
|
+
/**
|
|
5
|
+
* EdgeGroupService is a pure registry: it tracks which positions are
|
|
6
|
+
* occupied and owns each edge group's per-instance cleanup disposable.
|
|
7
|
+
*
|
|
8
|
+
* The ShellManager (layout infrastructure) and the addEdgeGroup
|
|
9
|
+
* orchestration remain on DockviewComponent.
|
|
10
|
+
*/
|
|
11
|
+
export interface IEdgeGroupServiceHost {
|
|
12
|
+
}
|
|
13
|
+
export interface IEdgeGroupService extends IDisposable {
|
|
14
|
+
add(position: EdgeGroupPosition, group: DockviewGroupPanel, autoCollapseDisposable: IDisposable): void;
|
|
15
|
+
remove(position: EdgeGroupPosition): void;
|
|
16
|
+
get(position: EdgeGroupPosition): DockviewGroupPanel | undefined;
|
|
17
|
+
has(position: EdgeGroupPosition): boolean;
|
|
18
|
+
hasAny(): boolean;
|
|
19
|
+
entries(): IterableIterator<[EdgeGroupPosition, DockviewGroupPanel]>;
|
|
20
|
+
includes(group: DockviewGroupPanel): boolean;
|
|
21
|
+
findPositionOf(group: DockviewGroupPanel): EdgeGroupPosition | undefined;
|
|
22
|
+
disposeAll(): void;
|
|
23
|
+
}
|
|
24
|
+
export declare class EdgeGroupService implements IEdgeGroupService {
|
|
25
|
+
private readonly _edgeGroups;
|
|
26
|
+
private readonly _edgeGroupDisposables;
|
|
27
|
+
add(position: EdgeGroupPosition, group: DockviewGroupPanel, autoCollapseDisposable: IDisposable): void;
|
|
28
|
+
remove(position: EdgeGroupPosition): void;
|
|
29
|
+
get(position: EdgeGroupPosition): DockviewGroupPanel | undefined;
|
|
30
|
+
has(position: EdgeGroupPosition): boolean;
|
|
31
|
+
hasAny(): boolean;
|
|
32
|
+
entries(): IterableIterator<[EdgeGroupPosition, DockviewGroupPanel]>;
|
|
33
|
+
includes(group: DockviewGroupPanel): boolean;
|
|
34
|
+
findPositionOf(group: DockviewGroupPanel): EdgeGroupPosition | undefined;
|
|
35
|
+
disposeAll(): void;
|
|
36
|
+
dispose(): void;
|
|
37
|
+
}
|
|
38
|
+
export declare const EdgeGroupModule: import("./modules").DockviewModule<IEdgeGroupServiceHost>;
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __values = (this && this.__values) || function(o) {
|
|
3
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
4
|
+
if (m) return m.call(o);
|
|
5
|
+
if (o && typeof o.length === "number") return {
|
|
6
|
+
next: function () {
|
|
7
|
+
if (o && i >= o.length) o = void 0;
|
|
8
|
+
return { value: o && o[i++], done: !o };
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
12
|
+
};
|
|
13
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
14
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
15
|
+
if (!m) return o;
|
|
16
|
+
var i = m.call(o), r, ar = [], e;
|
|
17
|
+
try {
|
|
18
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
19
|
+
}
|
|
20
|
+
catch (error) { e = { error: error }; }
|
|
21
|
+
finally {
|
|
22
|
+
try {
|
|
23
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
24
|
+
}
|
|
25
|
+
finally { if (e) throw e.error; }
|
|
26
|
+
}
|
|
27
|
+
return ar;
|
|
28
|
+
};
|
|
29
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
+
exports.EdgeGroupModule = exports.EdgeGroupService = void 0;
|
|
31
|
+
var modules_1 = require("./modules");
|
|
32
|
+
var EdgeGroupService = /** @class */ (function () {
|
|
33
|
+
function EdgeGroupService() {
|
|
34
|
+
this._edgeGroups = new Map();
|
|
35
|
+
this._edgeGroupDisposables = new Map();
|
|
36
|
+
}
|
|
37
|
+
// No constructor needed — the host is currently unused. The
|
|
38
|
+
// IEdgeGroupServiceHost slot stays for symmetry with the other modules
|
|
39
|
+
// and to leave room for future host callbacks.
|
|
40
|
+
EdgeGroupService.prototype.add = function (position, group, autoCollapseDisposable) {
|
|
41
|
+
this._edgeGroups.set(position, group);
|
|
42
|
+
this._edgeGroupDisposables.set(position, autoCollapseDisposable);
|
|
43
|
+
};
|
|
44
|
+
EdgeGroupService.prototype.remove = function (position) {
|
|
45
|
+
var _a;
|
|
46
|
+
(_a = this._edgeGroupDisposables.get(position)) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
47
|
+
this._edgeGroupDisposables.delete(position);
|
|
48
|
+
this._edgeGroups.delete(position);
|
|
49
|
+
};
|
|
50
|
+
EdgeGroupService.prototype.get = function (position) {
|
|
51
|
+
return this._edgeGroups.get(position);
|
|
52
|
+
};
|
|
53
|
+
EdgeGroupService.prototype.has = function (position) {
|
|
54
|
+
return this._edgeGroups.has(position);
|
|
55
|
+
};
|
|
56
|
+
EdgeGroupService.prototype.hasAny = function () {
|
|
57
|
+
return this._edgeGroups.size > 0;
|
|
58
|
+
};
|
|
59
|
+
EdgeGroupService.prototype.entries = function () {
|
|
60
|
+
return this._edgeGroups.entries();
|
|
61
|
+
};
|
|
62
|
+
EdgeGroupService.prototype.includes = function (group) {
|
|
63
|
+
var e_1, _a;
|
|
64
|
+
try {
|
|
65
|
+
for (var _b = __values(this._edgeGroups.values()), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
66
|
+
var edgeGroup = _c.value;
|
|
67
|
+
if (edgeGroup === group) {
|
|
68
|
+
return true;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
73
|
+
finally {
|
|
74
|
+
try {
|
|
75
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
76
|
+
}
|
|
77
|
+
finally { if (e_1) throw e_1.error; }
|
|
78
|
+
}
|
|
79
|
+
return false;
|
|
80
|
+
};
|
|
81
|
+
EdgeGroupService.prototype.findPositionOf = function (group) {
|
|
82
|
+
var e_2, _a;
|
|
83
|
+
try {
|
|
84
|
+
for (var _b = __values(this._edgeGroups), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
85
|
+
var _d = __read(_c.value, 2), position = _d[0], edgeGroup = _d[1];
|
|
86
|
+
if (edgeGroup === group) {
|
|
87
|
+
return position;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
92
|
+
finally {
|
|
93
|
+
try {
|
|
94
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
95
|
+
}
|
|
96
|
+
finally { if (e_2) throw e_2.error; }
|
|
97
|
+
}
|
|
98
|
+
return undefined;
|
|
99
|
+
};
|
|
100
|
+
EdgeGroupService.prototype.disposeAll = function () {
|
|
101
|
+
var e_3, _a;
|
|
102
|
+
try {
|
|
103
|
+
for (var _b = __values(this._edgeGroupDisposables.values()), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
104
|
+
var disposable = _c.value;
|
|
105
|
+
disposable.dispose();
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
109
|
+
finally {
|
|
110
|
+
try {
|
|
111
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
112
|
+
}
|
|
113
|
+
finally { if (e_3) throw e_3.error; }
|
|
114
|
+
}
|
|
115
|
+
this._edgeGroupDisposables.clear();
|
|
116
|
+
this._edgeGroups.clear();
|
|
117
|
+
};
|
|
118
|
+
EdgeGroupService.prototype.dispose = function () {
|
|
119
|
+
this.disposeAll();
|
|
120
|
+
};
|
|
121
|
+
return EdgeGroupService;
|
|
122
|
+
}());
|
|
123
|
+
exports.EdgeGroupService = EdgeGroupService;
|
|
124
|
+
exports.EdgeGroupModule = (0, modules_1.defineModule)({
|
|
125
|
+
name: 'EdgeGroup',
|
|
126
|
+
serviceKey: 'edgeGroupService',
|
|
127
|
+
create: function () { return new EdgeGroupService(); },
|
|
128
|
+
});
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { IDisposable } from '../lifecycle';
|
|
2
|
+
import { Gridview } from '../gridview/gridview';
|
|
3
|
+
import { Overlay } from '../overlay/overlay';
|
|
4
|
+
import { DockviewFloatingGroupPanel } from './dockviewFloatingGroupPanel';
|
|
5
|
+
import { DockviewGroupPanel } from './dockviewGroupPanel';
|
|
6
|
+
import { DockviewOptions } from './options';
|
|
7
|
+
import { SerializedFloatingGroup } from './dockviewComponent';
|
|
8
|
+
/**
|
|
9
|
+
* Narrow callback surface the FloatingGroupService needs from its host
|
|
10
|
+
* component. Keeps the service decoupled from DockviewComponent.
|
|
11
|
+
*/
|
|
12
|
+
export interface IFloatingGroupHost {
|
|
13
|
+
fireLayoutChange(): void;
|
|
14
|
+
}
|
|
15
|
+
export interface IFloatingGroupService extends IDisposable {
|
|
16
|
+
readonly floatingGroups: readonly DockviewFloatingGroupPanel[];
|
|
17
|
+
add(group: DockviewGroupPanel, overlay: Overlay, gridview: Gridview): DockviewFloatingGroupPanel;
|
|
18
|
+
findByGroup(group: DockviewGroupPanel): DockviewFloatingGroupPanel | undefined;
|
|
19
|
+
serialize(): SerializedFloatingGroup[];
|
|
20
|
+
constrainBounds(): void;
|
|
21
|
+
updateBounds(options: Partial<DockviewOptions>): void;
|
|
22
|
+
disposeAll(): void;
|
|
23
|
+
}
|
|
24
|
+
export declare class FloatingGroupService implements IFloatingGroupService {
|
|
25
|
+
private readonly _host;
|
|
26
|
+
private readonly _floatingGroups;
|
|
27
|
+
get floatingGroups(): readonly DockviewFloatingGroupPanel[];
|
|
28
|
+
constructor(host: IFloatingGroupHost);
|
|
29
|
+
add(group: DockviewGroupPanel, overlay: Overlay, gridview: Gridview): DockviewFloatingGroupPanel;
|
|
30
|
+
findByGroup(group: DockviewGroupPanel): DockviewFloatingGroupPanel | undefined;
|
|
31
|
+
serialize(): SerializedFloatingGroup[];
|
|
32
|
+
constrainBounds(): void;
|
|
33
|
+
updateBounds(options: Partial<DockviewOptions>): void;
|
|
34
|
+
disposeAll(): void;
|
|
35
|
+
dispose(): void;
|
|
36
|
+
}
|
|
37
|
+
export declare const FloatingGroupModule: import("./modules").DockviewModule<IFloatingGroupHost>;
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __values = (this && this.__values) || function(o) {
|
|
3
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
4
|
+
if (m) return m.call(o);
|
|
5
|
+
if (o && typeof o.length === "number") return {
|
|
6
|
+
next: function () {
|
|
7
|
+
if (o && i >= o.length) o = void 0;
|
|
8
|
+
return { value: o && o[i++], done: !o };
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
12
|
+
};
|
|
13
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
14
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
15
|
+
if (!m) return o;
|
|
16
|
+
var i = m.call(o), r, ar = [], e;
|
|
17
|
+
try {
|
|
18
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
19
|
+
}
|
|
20
|
+
catch (error) { e = { error: error }; }
|
|
21
|
+
finally {
|
|
22
|
+
try {
|
|
23
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
24
|
+
}
|
|
25
|
+
finally { if (e) throw e.error; }
|
|
26
|
+
}
|
|
27
|
+
return ar;
|
|
28
|
+
};
|
|
29
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
30
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
31
|
+
if (ar || !(i in from)) {
|
|
32
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
33
|
+
ar[i] = from[i];
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.FloatingGroupModule = exports.FloatingGroupService = void 0;
|
|
40
|
+
var lifecycle_1 = require("../lifecycle");
|
|
41
|
+
var array_1 = require("../array");
|
|
42
|
+
var dom_1 = require("../dom");
|
|
43
|
+
var constants_1 = require("../constants");
|
|
44
|
+
var dockviewFloatingGroupPanel_1 = require("./dockviewFloatingGroupPanel");
|
|
45
|
+
var modules_1 = require("./modules");
|
|
46
|
+
var FloatingGroupService = /** @class */ (function () {
|
|
47
|
+
function FloatingGroupService(host) {
|
|
48
|
+
this._floatingGroups = [];
|
|
49
|
+
this._host = host;
|
|
50
|
+
}
|
|
51
|
+
Object.defineProperty(FloatingGroupService.prototype, "floatingGroups", {
|
|
52
|
+
get: function () {
|
|
53
|
+
return this._floatingGroups;
|
|
54
|
+
},
|
|
55
|
+
enumerable: false,
|
|
56
|
+
configurable: true
|
|
57
|
+
});
|
|
58
|
+
FloatingGroupService.prototype.add = function (group, overlay, gridview) {
|
|
59
|
+
var _this = this;
|
|
60
|
+
var floatingGroupPanel = new dockviewFloatingGroupPanel_1.DockviewFloatingGroupPanel(group, overlay, gridview);
|
|
61
|
+
var disposable = new lifecycle_1.CompositeDisposable(group.api.onDidActiveChange(function (event) {
|
|
62
|
+
if (event.isActive) {
|
|
63
|
+
overlay.bringToFront();
|
|
64
|
+
}
|
|
65
|
+
}), (function () {
|
|
66
|
+
// The floating window's nested gridview fills the overlay
|
|
67
|
+
// beneath the (optional) title bar; size it from its own
|
|
68
|
+
// measured box so it follows the overlay as the user drags
|
|
69
|
+
// / resizes the window.
|
|
70
|
+
var lastWidth = -1;
|
|
71
|
+
var lastHeight = -1;
|
|
72
|
+
return (0, dom_1.watchElementResize)(gridview.element, function (entry) {
|
|
73
|
+
var width = Math.round(entry.contentRect.width);
|
|
74
|
+
var height = Math.round(entry.contentRect.height);
|
|
75
|
+
if (width === lastWidth && height === lastHeight) {
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
lastWidth = width;
|
|
79
|
+
lastHeight = height;
|
|
80
|
+
gridview.layout(width, height);
|
|
81
|
+
});
|
|
82
|
+
})());
|
|
83
|
+
// Floating windows are non-modal dialogs (role set in Overlay). Give
|
|
84
|
+
// the dialog an accessible name from the representative group's active
|
|
85
|
+
// panel, refreshed as the active panel changes. An untitled panel
|
|
86
|
+
// leaves the dialog unnamed rather than hard-coding a label string.
|
|
87
|
+
var updateDialogLabel = function () {
|
|
88
|
+
var _a;
|
|
89
|
+
var title = (_a = group.activePanel) === null || _a === void 0 ? void 0 : _a.title;
|
|
90
|
+
if (title) {
|
|
91
|
+
overlay.element.setAttribute('aria-label', title);
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
overlay.element.removeAttribute('aria-label');
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
updateDialogLabel();
|
|
98
|
+
floatingGroupPanel.addDisposables(group.api.onDidActivePanelChange(function () { return updateDialogLabel(); }), overlay.onDidChange(function () {
|
|
99
|
+
gridview.layout(gridview.width, gridview.height);
|
|
100
|
+
}), overlay.onDidChangeEnd(function () {
|
|
101
|
+
_this._host.fireLayoutChange();
|
|
102
|
+
}), group.onDidChange(function (event) {
|
|
103
|
+
// `event.height` is the group's requested *content* height.
|
|
104
|
+
// When a dedicated title bar is present the overlay's outer
|
|
105
|
+
// box is taller by the header, so add it back to preserve the
|
|
106
|
+
// requested content size.
|
|
107
|
+
overlay.setBounds({
|
|
108
|
+
height: typeof (event === null || event === void 0 ? void 0 : event.height) === 'number'
|
|
109
|
+
? event.height + overlay.headerHeight
|
|
110
|
+
: event === null || event === void 0 ? void 0 : event.height,
|
|
111
|
+
width: event === null || event === void 0 ? void 0 : event.width,
|
|
112
|
+
});
|
|
113
|
+
}), {
|
|
114
|
+
dispose: function () {
|
|
115
|
+
disposable.dispose();
|
|
116
|
+
(0, array_1.remove)(_this._floatingGroups, floatingGroupPanel);
|
|
117
|
+
group.model.location = { type: 'grid' };
|
|
118
|
+
},
|
|
119
|
+
});
|
|
120
|
+
this._floatingGroups.push(floatingGroupPanel);
|
|
121
|
+
return floatingGroupPanel;
|
|
122
|
+
};
|
|
123
|
+
FloatingGroupService.prototype.findByGroup = function (group) {
|
|
124
|
+
// A floating window may host several groups in a nested gridview, so
|
|
125
|
+
// match by membership (DOM containment) rather than only the anchor
|
|
126
|
+
// group. `floating.group === group` covers the brief window before the
|
|
127
|
+
// anchor's element is attached to the gridview.
|
|
128
|
+
return this._floatingGroups.find(function (floating) {
|
|
129
|
+
return floating.group === group ||
|
|
130
|
+
floating.gridview.element.contains(group.element);
|
|
131
|
+
});
|
|
132
|
+
};
|
|
133
|
+
FloatingGroupService.prototype.serialize = function () {
|
|
134
|
+
return this._floatingGroups.map(function (floating) {
|
|
135
|
+
var grid = floating.gridview.serialize();
|
|
136
|
+
var position = floating.overlay.toJSON();
|
|
137
|
+
var root = grid.root;
|
|
138
|
+
// A single-group window keeps the legacy `data` shape so layouts
|
|
139
|
+
// round-trip byte-stably and older readers keep working; only
|
|
140
|
+
// genuine multi-group windows emit the nested `grid` form.
|
|
141
|
+
if (root.type === 'branch' &&
|
|
142
|
+
root.data.length === 1 &&
|
|
143
|
+
root.data[0].type === 'leaf') {
|
|
144
|
+
return {
|
|
145
|
+
data: root.data[0].data,
|
|
146
|
+
position: position,
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
return { grid: grid, position: position };
|
|
150
|
+
});
|
|
151
|
+
};
|
|
152
|
+
FloatingGroupService.prototype.constrainBounds = function () {
|
|
153
|
+
var e_1, _a;
|
|
154
|
+
try {
|
|
155
|
+
for (var _b = __values(this._floatingGroups), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
156
|
+
var floating = _c.value;
|
|
157
|
+
floating.overlay.setBounds();
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
161
|
+
finally {
|
|
162
|
+
try {
|
|
163
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
164
|
+
}
|
|
165
|
+
finally { if (e_1) throw e_1.error; }
|
|
166
|
+
}
|
|
167
|
+
};
|
|
168
|
+
FloatingGroupService.prototype.updateBounds = function (options) {
|
|
169
|
+
var e_2, _a;
|
|
170
|
+
var _b, _c;
|
|
171
|
+
if (!('floatingGroupBounds' in options)) {
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
try {
|
|
175
|
+
for (var _d = __values(this._floatingGroups), _e = _d.next(); !_e.done; _e = _d.next()) {
|
|
176
|
+
var group = _e.value;
|
|
177
|
+
switch (options.floatingGroupBounds) {
|
|
178
|
+
case 'boundedWithinViewport':
|
|
179
|
+
group.overlay.minimumInViewportHeight = undefined;
|
|
180
|
+
group.overlay.minimumInViewportWidth = undefined;
|
|
181
|
+
break;
|
|
182
|
+
case undefined:
|
|
183
|
+
group.overlay.minimumInViewportHeight =
|
|
184
|
+
constants_1.DEFAULT_FLOATING_GROUP_OVERFLOW_SIZE;
|
|
185
|
+
group.overlay.minimumInViewportWidth =
|
|
186
|
+
constants_1.DEFAULT_FLOATING_GROUP_OVERFLOW_SIZE;
|
|
187
|
+
break;
|
|
188
|
+
default:
|
|
189
|
+
group.overlay.minimumInViewportHeight =
|
|
190
|
+
(_b = options.floatingGroupBounds) === null || _b === void 0 ? void 0 : _b.minimumHeightWithinViewport;
|
|
191
|
+
group.overlay.minimumInViewportWidth =
|
|
192
|
+
(_c = options.floatingGroupBounds) === null || _c === void 0 ? void 0 : _c.minimumWidthWithinViewport;
|
|
193
|
+
}
|
|
194
|
+
group.overlay.setBounds();
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
198
|
+
finally {
|
|
199
|
+
try {
|
|
200
|
+
if (_e && !_e.done && (_a = _d.return)) _a.call(_d);
|
|
201
|
+
}
|
|
202
|
+
finally { if (e_2) throw e_2.error; }
|
|
203
|
+
}
|
|
204
|
+
};
|
|
205
|
+
FloatingGroupService.prototype.disposeAll = function () {
|
|
206
|
+
var e_3, _a;
|
|
207
|
+
try {
|
|
208
|
+
for (var _b = __values(__spreadArray([], __read(this._floatingGroups), false)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
209
|
+
var floating = _c.value;
|
|
210
|
+
floating.dispose();
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
214
|
+
finally {
|
|
215
|
+
try {
|
|
216
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
217
|
+
}
|
|
218
|
+
finally { if (e_3) throw e_3.error; }
|
|
219
|
+
}
|
|
220
|
+
};
|
|
221
|
+
FloatingGroupService.prototype.dispose = function () {
|
|
222
|
+
this.disposeAll();
|
|
223
|
+
};
|
|
224
|
+
return FloatingGroupService;
|
|
225
|
+
}());
|
|
226
|
+
exports.FloatingGroupService = FloatingGroupService;
|
|
227
|
+
exports.FloatingGroupModule = (0, modules_1.defineModule)({
|
|
228
|
+
name: 'FloatingGroup',
|
|
229
|
+
serviceKey: 'floatingGroupService',
|
|
230
|
+
create: function (host) { return new FloatingGroupService(host); },
|
|
231
|
+
});
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { IDisposable } from '../lifecycle';
|
|
2
|
+
import { Event } from '../events';
|
|
3
|
+
import { DockviewComponentOptions } from './options';
|
|
4
|
+
import { DockviewGroupPanel } from './dockviewGroupPanel';
|
|
5
|
+
import { DockviewApi } from '../api/component.api';
|
|
6
|
+
export interface IHeaderActionsHost {
|
|
7
|
+
readonly api: DockviewApi;
|
|
8
|
+
readonly options: DockviewComponentOptions;
|
|
9
|
+
readonly groups: DockviewGroupPanel[];
|
|
10
|
+
readonly onDidAddGroup: Event<DockviewGroupPanel>;
|
|
11
|
+
readonly onDidRemoveGroup: Event<DockviewGroupPanel>;
|
|
12
|
+
}
|
|
13
|
+
export interface IHeaderActionsService extends IDisposable {
|
|
14
|
+
/** Re-mount the three header action slots on a single group. */
|
|
15
|
+
refresh(group: DockviewGroupPanel): void;
|
|
16
|
+
/** Re-mount on every group; used when one of the three options changes. */
|
|
17
|
+
refreshAll(): void;
|
|
18
|
+
/** Tear down per-group renderer state. */
|
|
19
|
+
disposeGroup(group: DockviewGroupPanel): void;
|
|
20
|
+
}
|
|
21
|
+
export declare class HeaderActionsService implements IHeaderActionsService {
|
|
22
|
+
private readonly _host;
|
|
23
|
+
private readonly _perGroup;
|
|
24
|
+
constructor(host: IHeaderActionsHost);
|
|
25
|
+
refresh(group: DockviewGroupPanel): void;
|
|
26
|
+
refreshAll(): void;
|
|
27
|
+
disposeGroup(group: DockviewGroupPanel): void;
|
|
28
|
+
dispose(): void;
|
|
29
|
+
private _ensureState;
|
|
30
|
+
private _refreshSlot;
|
|
31
|
+
}
|
|
32
|
+
export declare const HeaderActionsModule: import("./modules").DockviewModule<IHeaderActionsHost>;
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __values = (this && this.__values) || function(o) {
|
|
3
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
4
|
+
if (m) return m.call(o);
|
|
5
|
+
if (o && typeof o.length === "number") return {
|
|
6
|
+
next: function () {
|
|
7
|
+
if (o && i >= o.length) o = void 0;
|
|
8
|
+
return { value: o && o[i++], done: !o };
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
12
|
+
};
|
|
13
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
14
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
15
|
+
if (!m) return o;
|
|
16
|
+
var i = m.call(o), r, ar = [], e;
|
|
17
|
+
try {
|
|
18
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
19
|
+
}
|
|
20
|
+
catch (error) { e = { error: error }; }
|
|
21
|
+
finally {
|
|
22
|
+
try {
|
|
23
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
24
|
+
}
|
|
25
|
+
finally { if (e) throw e.error; }
|
|
26
|
+
}
|
|
27
|
+
return ar;
|
|
28
|
+
};
|
|
29
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
30
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
31
|
+
if (ar || !(i in from)) {
|
|
32
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
33
|
+
ar[i] = from[i];
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.HeaderActionsModule = exports.HeaderActionsService = void 0;
|
|
40
|
+
var lifecycle_1 = require("../lifecycle");
|
|
41
|
+
var modules_1 = require("./modules");
|
|
42
|
+
var SLOT_OPTION_KEY = {
|
|
43
|
+
left: 'createLeftHeaderActionComponent',
|
|
44
|
+
right: 'createRightHeaderActionComponent',
|
|
45
|
+
prefix: 'createPrefixHeaderActionComponent',
|
|
46
|
+
};
|
|
47
|
+
var HeaderActionsService = /** @class */ (function () {
|
|
48
|
+
function HeaderActionsService(host) {
|
|
49
|
+
this._perGroup = new Map();
|
|
50
|
+
this._host = host;
|
|
51
|
+
}
|
|
52
|
+
HeaderActionsService.prototype.refresh = function (group) {
|
|
53
|
+
// The headerPosition setter on DockviewGroupPanelModel fires inside
|
|
54
|
+
// the model's constructor — before the parent DockviewGroupPanel has
|
|
55
|
+
// assigned its `_model` field, and in tests where the parent panel
|
|
56
|
+
// may be null. Skip; DockviewGroupPanel.initialize() will refresh
|
|
57
|
+
// once construction completes for real groups.
|
|
58
|
+
if (!(group === null || group === void 0 ? void 0 : group.model)) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
var state = this._ensureState(group);
|
|
62
|
+
this._refreshSlot('left', group, state.left);
|
|
63
|
+
this._refreshSlot('right', group, state.right);
|
|
64
|
+
this._refreshSlot('prefix', group, state.prefix);
|
|
65
|
+
};
|
|
66
|
+
HeaderActionsService.prototype.refreshAll = function () {
|
|
67
|
+
var e_1, _a;
|
|
68
|
+
try {
|
|
69
|
+
for (var _b = __values(this._host.groups), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
70
|
+
var group = _c.value;
|
|
71
|
+
this.refresh(group);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
75
|
+
finally {
|
|
76
|
+
try {
|
|
77
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
78
|
+
}
|
|
79
|
+
finally { if (e_1) throw e_1.error; }
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
HeaderActionsService.prototype.disposeGroup = function (group) {
|
|
83
|
+
var state = this._perGroup.get(group);
|
|
84
|
+
if (!state) {
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
state.left.dispose();
|
|
88
|
+
state.right.dispose();
|
|
89
|
+
state.prefix.dispose();
|
|
90
|
+
this._perGroup.delete(group);
|
|
91
|
+
};
|
|
92
|
+
HeaderActionsService.prototype.dispose = function () {
|
|
93
|
+
var e_2, _a;
|
|
94
|
+
try {
|
|
95
|
+
for (var _b = __values(__spreadArray([], __read(this._perGroup.keys()), false)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
96
|
+
var group = _c.value;
|
|
97
|
+
this.disposeGroup(group);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
101
|
+
finally {
|
|
102
|
+
try {
|
|
103
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
104
|
+
}
|
|
105
|
+
finally { if (e_2) throw e_2.error; }
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
HeaderActionsService.prototype._ensureState = function (group) {
|
|
109
|
+
var state = this._perGroup.get(group);
|
|
110
|
+
if (!state) {
|
|
111
|
+
state = {
|
|
112
|
+
left: new lifecycle_1.MutableDisposable(),
|
|
113
|
+
right: new lifecycle_1.MutableDisposable(),
|
|
114
|
+
prefix: new lifecycle_1.MutableDisposable(),
|
|
115
|
+
};
|
|
116
|
+
this._perGroup.set(group, state);
|
|
117
|
+
}
|
|
118
|
+
return state;
|
|
119
|
+
};
|
|
120
|
+
HeaderActionsService.prototype._refreshSlot = function (slot, group, disposable) {
|
|
121
|
+
var factory = this._host.options[SLOT_OPTION_KEY[slot]];
|
|
122
|
+
if (factory) {
|
|
123
|
+
var renderer = factory(group);
|
|
124
|
+
disposable.value = renderer;
|
|
125
|
+
renderer.init({
|
|
126
|
+
containerApi: this._host.api,
|
|
127
|
+
api: group.api,
|
|
128
|
+
group: group,
|
|
129
|
+
});
|
|
130
|
+
group.model.attachHeaderAction(slot, renderer.element);
|
|
131
|
+
}
|
|
132
|
+
else {
|
|
133
|
+
disposable.dispose();
|
|
134
|
+
group.model.attachHeaderAction(slot, undefined);
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
return HeaderActionsService;
|
|
138
|
+
}());
|
|
139
|
+
exports.HeaderActionsService = HeaderActionsService;
|
|
140
|
+
exports.HeaderActionsModule = (0, modules_1.defineModule)({
|
|
141
|
+
name: 'HeaderActions',
|
|
142
|
+
serviceKey: 'headerActionsService',
|
|
143
|
+
create: function (host) { return new HeaderActionsService(host); },
|
|
144
|
+
init: function (host, service) {
|
|
145
|
+
return new lifecycle_1.CompositeDisposable(host.onDidRemoveGroup(function (group) {
|
|
146
|
+
service.disposeGroup(group);
|
|
147
|
+
}));
|
|
148
|
+
},
|
|
149
|
+
});
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { CompositeDisposable, IDisposable } from '../lifecycle';
|
|
2
|
+
import { Event } from '../events';
|
|
3
|
+
import { IDockviewPanel } from './dockviewPanel';
|
|
4
|
+
import { DockviewGroupPanel } from './dockviewGroupPanel';
|
|
5
|
+
import { DockviewLayoutMutationEvent, DockviewMaximizedGroupChangeEvent } from './dockviewComponent';
|
|
6
|
+
import { DockviewComponentOptions } from './options';
|
|
7
|
+
/**
|
|
8
|
+
* The narrow surface the {@link LiveRegionService} needs from the host
|
|
9
|
+
* (the `DockviewComponent`) — somewhere to mount the region and the layout
|
|
10
|
+
* events to narrate. `onWill/onDidMutateLayout` are used to suppress the
|
|
11
|
+
* bulk-load / clear burst (one transaction, not N panel announcements).
|
|
12
|
+
*/
|
|
13
|
+
export interface ILiveRegionHost {
|
|
14
|
+
readonly element: HTMLElement;
|
|
15
|
+
readonly options: DockviewComponentOptions;
|
|
16
|
+
readonly onDidAddPanel: Event<IDockviewPanel>;
|
|
17
|
+
readonly onDidRemovePanel: Event<IDockviewPanel>;
|
|
18
|
+
readonly onWillMutateLayout: Event<DockviewLayoutMutationEvent>;
|
|
19
|
+
readonly onDidMutateLayout: Event<DockviewLayoutMutationEvent>;
|
|
20
|
+
readonly onDidMaximizedGroupChange: Event<DockviewMaximizedGroupChangeEvent>;
|
|
21
|
+
readonly onDidAddGroup: Event<DockviewGroupPanel>;
|
|
22
|
+
readonly onDidRemoveGroup: Event<DockviewGroupPanel>;
|
|
23
|
+
}
|
|
24
|
+
export interface ILiveRegionService extends IDisposable {
|
|
25
|
+
/**
|
|
26
|
+
* Announce a message to assistive technology via the live region. The
|
|
27
|
+
* shared sink — the accessibility module writes keyboard-docking
|
|
28
|
+
* narration here too, so all announcements use one region.
|
|
29
|
+
*/
|
|
30
|
+
announce(message: string, politeness?: 'polite' | 'assertive'): void;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Narrates layout state changes to screen readers via visually-hidden
|
|
34
|
+
* `aria-live` regions. Free / core (WCAG 4.1.3). Announces panel open/close +
|
|
35
|
+
* the shared `announce()` sink (the accessibility module narrates docking here too).
|
|
36
|
+
* Two regions: a **polite** one for routine status and an **assertive** one
|
|
37
|
+
* for errors/cancellations. The bulk load/clear burst is suppressed via the
|
|
38
|
+
* mutation-transaction events, and an app can take over delivery entirely with
|
|
39
|
+
* the `announcer` option.
|
|
40
|
+
*/
|
|
41
|
+
export declare class LiveRegionService extends CompositeDisposable implements ILiveRegionService {
|
|
42
|
+
private readonly _host;
|
|
43
|
+
private readonly _polite;
|
|
44
|
+
private readonly _assertive;
|
|
45
|
+
private _suppressDepth;
|
|
46
|
+
private readonly _locationSubs;
|
|
47
|
+
constructor(host: ILiveRegionHost);
|
|
48
|
+
private _trackLocation;
|
|
49
|
+
announce(message: string, politeness?: 'polite' | 'assertive'): void;
|
|
50
|
+
private _announce;
|
|
51
|
+
private _defaultMessage;
|
|
52
|
+
}
|
|
53
|
+
export declare const LiveRegionModule: import("./modules").DockviewModule<ILiveRegionHost>;
|