dockview-core 6.6.0 → 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 -993
- 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 +3199 -1251
- 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 +3198 -1250
- 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 +1421 -717
- 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 +3234 -1286
- package/dist/package/main.cjs.min.js +2 -2
- package/dist/package/main.esm.min.mjs +2 -2
- package/dist/package/main.esm.mjs +3189 -1252
- 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,304 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Internal module system for dockview.
|
|
4
|
+
*
|
|
5
|
+
* Modules are feature bundles that register services into the dockview
|
|
6
|
+
* component. `registerModules(...)` is the one public entry point — it lets a
|
|
7
|
+
* sibling package contribute modules that `DockviewComponent` picks up at
|
|
8
|
+
* construction. The richer opt-in surface (a per-component `modules` option,
|
|
9
|
+
* framework wrappers) is still reserved for a future version; the module
|
|
10
|
+
* authoring API (`defineModule`, the service contracts) remains internal.
|
|
11
|
+
*/
|
|
12
|
+
var __values = (this && this.__values) || function(o) {
|
|
13
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
14
|
+
if (m) return m.call(o);
|
|
15
|
+
if (o && typeof o.length === "number") return {
|
|
16
|
+
next: function () {
|
|
17
|
+
if (o && i >= o.length) o = void 0;
|
|
18
|
+
return { value: o && o[i++], done: !o };
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
22
|
+
};
|
|
23
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
24
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
25
|
+
if (!m) return o;
|
|
26
|
+
var i = m.call(o), r, ar = [], e;
|
|
27
|
+
try {
|
|
28
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
29
|
+
}
|
|
30
|
+
catch (error) { e = { error: error }; }
|
|
31
|
+
finally {
|
|
32
|
+
try {
|
|
33
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
34
|
+
}
|
|
35
|
+
finally { if (e) throw e.error; }
|
|
36
|
+
}
|
|
37
|
+
return ar;
|
|
38
|
+
};
|
|
39
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
40
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
41
|
+
if (ar || !(i in from)) {
|
|
42
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
43
|
+
ar[i] = from[i];
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
47
|
+
};
|
|
48
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
49
|
+
exports.ModuleRegistry = void 0;
|
|
50
|
+
exports.defineModule = defineModule;
|
|
51
|
+
exports._resetMissingModuleWarnings = _resetMissingModuleWarnings;
|
|
52
|
+
exports.assertModule = assertModule;
|
|
53
|
+
exports.registerModules = registerModules;
|
|
54
|
+
exports.getRegisteredModules = getRegisteredModules;
|
|
55
|
+
exports.clearRegisteredModules = clearRegisteredModules;
|
|
56
|
+
exports.markDockviewPackageLoaded = markDockviewPackageLoaded;
|
|
57
|
+
exports.isDockviewPackageLoaded = isDockviewPackageLoaded;
|
|
58
|
+
/**
|
|
59
|
+
* Typed helper for defining a module. Enforces that the factory's return
|
|
60
|
+
* type matches the slot in ServiceCollection at compile time, replacing
|
|
61
|
+
* the manual cast each module file would otherwise need.
|
|
62
|
+
*/
|
|
63
|
+
function defineModule(config) {
|
|
64
|
+
var _a;
|
|
65
|
+
return {
|
|
66
|
+
moduleName: config.name,
|
|
67
|
+
services: (_a = {},
|
|
68
|
+
_a[config.serviceKey] = config.create,
|
|
69
|
+
_a),
|
|
70
|
+
init: config.init
|
|
71
|
+
? function (host, services) {
|
|
72
|
+
return config.init(host, services[config.serviceKey]);
|
|
73
|
+
}
|
|
74
|
+
: undefined,
|
|
75
|
+
dependsOn: config.dependsOn,
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
var _warnedMissingModule = new Set();
|
|
79
|
+
/**
|
|
80
|
+
* For tests — clears the once-per-key dedup cache used by `assertModule`.
|
|
81
|
+
*/
|
|
82
|
+
function _resetMissingModuleWarnings() {
|
|
83
|
+
_warnedMissingModule.clear();
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Returns the service if its module is registered, otherwise logs a
|
|
87
|
+
* deduplicated console error and returns `undefined`. Modelled on AG Grid's
|
|
88
|
+
* `assertModuleRegistered`: missing modules never throw — they degrade the
|
|
89
|
+
* affected feature to a no-op so consuming applications don't crash in
|
|
90
|
+
* production.
|
|
91
|
+
*
|
|
92
|
+
* Use at public-API entry points where the caller wants to surface which
|
|
93
|
+
* module is missing. For internal/lifecycle paths, plain `?.` chaining on
|
|
94
|
+
* the service slot is preferred — no log, just a silent no-op.
|
|
95
|
+
*/
|
|
96
|
+
function assertModule(service, moduleName, context) {
|
|
97
|
+
if (service !== undefined) {
|
|
98
|
+
return service;
|
|
99
|
+
}
|
|
100
|
+
var key = "".concat(moduleName, "|").concat(context !== null && context !== void 0 ? context : '');
|
|
101
|
+
if (_warnedMissingModule.has(key)) {
|
|
102
|
+
return undefined;
|
|
103
|
+
}
|
|
104
|
+
_warnedMissingModule.add(key);
|
|
105
|
+
var where = context ? " for ".concat(context) : '';
|
|
106
|
+
// eslint-disable-next-line no-console
|
|
107
|
+
console.error("dockview: module \"".concat(moduleName, "\" is not registered").concat(where, "."));
|
|
108
|
+
return undefined;
|
|
109
|
+
}
|
|
110
|
+
var ModuleRegistry = /** @class */ (function () {
|
|
111
|
+
function ModuleRegistry() {
|
|
112
|
+
this._modules = new Map();
|
|
113
|
+
this._services = {};
|
|
114
|
+
this._initDisposables = [];
|
|
115
|
+
}
|
|
116
|
+
Object.defineProperty(ModuleRegistry.prototype, "services", {
|
|
117
|
+
get: function () {
|
|
118
|
+
return this._services;
|
|
119
|
+
},
|
|
120
|
+
enumerable: false,
|
|
121
|
+
configurable: true
|
|
122
|
+
});
|
|
123
|
+
ModuleRegistry.prototype.register = function (module) {
|
|
124
|
+
var e_1, _a;
|
|
125
|
+
if (this._modules.has(module.moduleName)) {
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
if (module.dependsOn) {
|
|
129
|
+
try {
|
|
130
|
+
for (var _b = __values(module.dependsOn), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
131
|
+
var dep = _c.value;
|
|
132
|
+
this.register(dep);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
136
|
+
finally {
|
|
137
|
+
try {
|
|
138
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
139
|
+
}
|
|
140
|
+
finally { if (e_1) throw e_1.error; }
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
this._modules.set(module.moduleName, module);
|
|
144
|
+
};
|
|
145
|
+
ModuleRegistry.prototype.initialize = function (host) {
|
|
146
|
+
var e_2, _a, e_3, _b;
|
|
147
|
+
try {
|
|
148
|
+
for (var _c = __values(this._modules.values()), _d = _c.next(); !_d.done; _d = _c.next()) {
|
|
149
|
+
var module_1 = _d.value;
|
|
150
|
+
if (!module_1.services) {
|
|
151
|
+
continue;
|
|
152
|
+
}
|
|
153
|
+
try {
|
|
154
|
+
for (var _e = (e_3 = void 0, __values(Object.entries(module_1.services))), _f = _e.next(); !_f.done; _f = _e.next()) {
|
|
155
|
+
var _g = __read(_f.value, 2), name_1 = _g[0], factory = _g[1];
|
|
156
|
+
this._services[name_1] = factory(host);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
160
|
+
finally {
|
|
161
|
+
try {
|
|
162
|
+
if (_f && !_f.done && (_b = _e.return)) _b.call(_e);
|
|
163
|
+
}
|
|
164
|
+
finally { if (e_3) throw e_3.error; }
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
169
|
+
finally {
|
|
170
|
+
try {
|
|
171
|
+
if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
|
|
172
|
+
}
|
|
173
|
+
finally { if (e_2) throw e_2.error; }
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
ModuleRegistry.prototype.postConstruct = function (host) {
|
|
177
|
+
var e_4, _a;
|
|
178
|
+
try {
|
|
179
|
+
for (var _b = __values(this._modules.values()), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
180
|
+
var module_2 = _c.value;
|
|
181
|
+
if (module_2.init) {
|
|
182
|
+
this._initDisposables.push(module_2.init(host, this._services));
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
|
187
|
+
finally {
|
|
188
|
+
try {
|
|
189
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
190
|
+
}
|
|
191
|
+
finally { if (e_4) throw e_4.error; }
|
|
192
|
+
}
|
|
193
|
+
};
|
|
194
|
+
ModuleRegistry.prototype.has = function (moduleName) {
|
|
195
|
+
return this._modules.has(moduleName);
|
|
196
|
+
};
|
|
197
|
+
ModuleRegistry.prototype.dispose = function () {
|
|
198
|
+
var e_5, _a, e_6, _b;
|
|
199
|
+
try {
|
|
200
|
+
// Tear down init() subscriptions first so they stop firing into
|
|
201
|
+
// services that are about to be disposed.
|
|
202
|
+
for (var _c = __values(this._initDisposables), _d = _c.next(); !_d.done; _d = _c.next()) {
|
|
203
|
+
var disposable = _d.value;
|
|
204
|
+
disposable.dispose();
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
catch (e_5_1) { e_5 = { error: e_5_1 }; }
|
|
208
|
+
finally {
|
|
209
|
+
try {
|
|
210
|
+
if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
|
|
211
|
+
}
|
|
212
|
+
finally { if (e_5) throw e_5.error; }
|
|
213
|
+
}
|
|
214
|
+
this._initDisposables.length = 0;
|
|
215
|
+
try {
|
|
216
|
+
for (var _e = __values(Object.values(this._services)), _f = _e.next(); !_f.done; _f = _e.next()) {
|
|
217
|
+
var service = _f.value;
|
|
218
|
+
if (service !== undefined &&
|
|
219
|
+
typeof service.dispose === 'function') {
|
|
220
|
+
service.dispose();
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
catch (e_6_1) { e_6 = { error: e_6_1 }; }
|
|
225
|
+
finally {
|
|
226
|
+
try {
|
|
227
|
+
if (_f && !_f.done && (_b = _e.return)) _b.call(_e);
|
|
228
|
+
}
|
|
229
|
+
finally { if (e_6) throw e_6.error; }
|
|
230
|
+
}
|
|
231
|
+
};
|
|
232
|
+
return ModuleRegistry;
|
|
233
|
+
}());
|
|
234
|
+
exports.ModuleRegistry = ModuleRegistry;
|
|
235
|
+
/**
|
|
236
|
+
* Process-global list of modules registered via {@link registerModules}.
|
|
237
|
+
* `DockviewComponent` appends these to its built-in set at construction, so
|
|
238
|
+
* importing a package that calls `registerModules(...)` (e.g. `dockview`)
|
|
239
|
+
* makes those modules available to every component in the process —
|
|
240
|
+
* modelled on AG Grid's `ModuleRegistry.registerModules`.
|
|
241
|
+
*/
|
|
242
|
+
var _globalModules = [];
|
|
243
|
+
/**
|
|
244
|
+
* Register modules globally. Idempotent per `moduleName` — registering the
|
|
245
|
+
* same module twice is a no-op. Intended to be called once at import time by
|
|
246
|
+
* the package that bundles a given set of modules.
|
|
247
|
+
*/
|
|
248
|
+
function registerModules(modules) {
|
|
249
|
+
var e_7, _a;
|
|
250
|
+
var _loop_1 = function (module_3) {
|
|
251
|
+
if (_globalModules.some(function (m) { return m.moduleName === module_3.moduleName; })) {
|
|
252
|
+
return "continue";
|
|
253
|
+
}
|
|
254
|
+
_globalModules.push(module_3);
|
|
255
|
+
};
|
|
256
|
+
try {
|
|
257
|
+
for (var modules_1 = __values(modules), modules_1_1 = modules_1.next(); !modules_1_1.done; modules_1_1 = modules_1.next()) {
|
|
258
|
+
var module_3 = modules_1_1.value;
|
|
259
|
+
_loop_1(module_3);
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
catch (e_7_1) { e_7 = { error: e_7_1 }; }
|
|
263
|
+
finally {
|
|
264
|
+
try {
|
|
265
|
+
if (modules_1_1 && !modules_1_1.done && (_a = modules_1.return)) _a.call(modules_1);
|
|
266
|
+
}
|
|
267
|
+
finally { if (e_7) throw e_7.error; }
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* Returns the globally-registered modules (a copy). `DockviewComponent` reads
|
|
272
|
+
* this to extend its built-in module set.
|
|
273
|
+
*/
|
|
274
|
+
function getRegisteredModules() {
|
|
275
|
+
return __spreadArray([], __read(_globalModules), false);
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* For tests — clears the global module registry.
|
|
279
|
+
*/
|
|
280
|
+
function clearRegisteredModules() {
|
|
281
|
+
_globalModules.length = 0;
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* This marker exists for ONE purpose: a developer warning about the v7 package
|
|
285
|
+
* renames. It has no functional effect on dockview's behaviour. Following the
|
|
286
|
+
* renames, `dockview-core` is internal and `dockview` is the public JavaScript
|
|
287
|
+
* package; `dockview` calls {@link markDockviewPackageLoaded} on import so that
|
|
288
|
+
* `dockview-core` can detect — and warn about — being used directly.
|
|
289
|
+
*/
|
|
290
|
+
var _dockviewPackageLoaded = false;
|
|
291
|
+
/**
|
|
292
|
+
* Called once by the `dockview` package on import, solely so `dockview-core`
|
|
293
|
+
* can warn when it is used directly (see above). Not used for anything else.
|
|
294
|
+
*/
|
|
295
|
+
function markDockviewPackageLoaded() {
|
|
296
|
+
_dockviewPackageLoaded = true;
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* Whether the `dockview` package has been loaded in this process. Used only to
|
|
300
|
+
* gate the "don't use dockview-core directly" developer warning.
|
|
301
|
+
*/
|
|
302
|
+
function isDockviewPackageLoaded() {
|
|
303
|
+
return _dockviewPackageLoaded;
|
|
304
|
+
}
|
|
@@ -4,8 +4,11 @@ import { IGridView } from '../gridview/gridview';
|
|
|
4
4
|
import { IContentRenderer, ITabRenderer, IWatermarkRenderer } from './types';
|
|
5
5
|
import { Parameters } from '../panel/types';
|
|
6
6
|
import { DockviewGroupPanel } from './dockviewGroupPanel';
|
|
7
|
+
import { DockviewMessages } from './accessibilityMessages';
|
|
8
|
+
export type { DockviewMessages } from './accessibilityMessages';
|
|
7
9
|
import { PanelTransfer } from '../dnd/dataTransfer';
|
|
8
10
|
import { IDisposable } from '../lifecycle';
|
|
11
|
+
import { Box } from '../types';
|
|
9
12
|
import { DroptargetOverlayModel, Position } from '../dnd/droptarget';
|
|
10
13
|
import { GroupOptions } from './dockviewGroupPanelModel';
|
|
11
14
|
import { DockviewGroupDropLocation } from './events';
|
|
@@ -13,7 +16,7 @@ import { IDockviewPanel } from './dockviewPanel';
|
|
|
13
16
|
import { DockviewPanelRenderer } from '../overlay/overlayRenderContainer';
|
|
14
17
|
import { IGroupDragGhostRenderer, IGroupHeaderProps, ITabGroupChipRenderer } from './framework';
|
|
15
18
|
import { FloatingGroupOptions } from './dockviewComponent';
|
|
16
|
-
import {
|
|
19
|
+
import { Constraints } from '../gridview/gridviewPanel';
|
|
17
20
|
import { AcceptableEvent, IAcceptableEvent } from '../events';
|
|
18
21
|
import { DockviewTheme } from './theme';
|
|
19
22
|
import { ITabGroup } from './tabGroup';
|
|
@@ -43,6 +46,54 @@ export interface ContextMenuItemConfig {
|
|
|
43
46
|
disabled?: boolean;
|
|
44
47
|
}
|
|
45
48
|
export type ContextMenuItem = BuiltInContextMenuItem | ContextMenuItemConfig;
|
|
49
|
+
export interface DropOverlayModelParams {
|
|
50
|
+
/** Which of a group's drop targets the overlay is for. `'edge'` is shaped by `dndEdges`, not this option. */
|
|
51
|
+
location: DockviewGroupDropLocation;
|
|
52
|
+
/** The group the target belongs to, where known (tab / header_space / content). */
|
|
53
|
+
group?: DockviewGroupPanel;
|
|
54
|
+
}
|
|
55
|
+
/** A layout change to be announced — see the `getAnnouncement` option. */
|
|
56
|
+
export interface LiveRegionEvent {
|
|
57
|
+
/**
|
|
58
|
+
* What changed: a panel was added (`'open'`) or removed (`'close'`); a
|
|
59
|
+
* group was maximized (`'maximize'`) / restored (`'restore'`); or a group
|
|
60
|
+
* moved to a floating window (`'float'`), back into the grid (`'dock'`), or
|
|
61
|
+
* out to a popout window (`'popout'`). `panel` is the affected panel — for
|
|
62
|
+
* group events, the group's active panel.
|
|
63
|
+
*/
|
|
64
|
+
kind: 'open' | 'close' | 'maximize' | 'restore' | 'float' | 'dock' | 'popout';
|
|
65
|
+
panel: IDockviewPanel;
|
|
66
|
+
}
|
|
67
|
+
/** A resolved announcement handed to a custom `announcer`. */
|
|
68
|
+
export interface AnnouncementEvent {
|
|
69
|
+
/** The (already localised) text to announce. */
|
|
70
|
+
message: string;
|
|
71
|
+
/** `'assertive'` interrupts the screen reader; `'polite'` waits for a pause. */
|
|
72
|
+
politeness: 'polite' | 'assertive';
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Key bindings for {@link DockviewComponentOptions.keyboardNavigation}. Each
|
|
76
|
+
* value is a string of `+`-separated parts, modifiers first, e.g. `'ctrl+]'`,
|
|
77
|
+
* `'shift+f6'`. Recognised modifiers: `ctrl`, `shift`, `alt`, `meta` (alias
|
|
78
|
+
* `cmd`). The final part is the `KeyboardEvent.key` to match, case-insensitively
|
|
79
|
+
* (`']'`, `'f6'`, `'arrowleft'`).
|
|
80
|
+
*/
|
|
81
|
+
export interface DockviewKeybindings {
|
|
82
|
+
/** Switch to the next tab in the focused group. Default `ctrl+]`. */
|
|
83
|
+
nextTab: string;
|
|
84
|
+
/** Switch to the previous tab in the focused group. Default `ctrl+[`. */
|
|
85
|
+
prevTab: string;
|
|
86
|
+
/** Move focus to the next group. Default `f6`. */
|
|
87
|
+
focusNextGroup: string;
|
|
88
|
+
/** Move focus to the previous group. Default `shift+f6`. */
|
|
89
|
+
focusPrevGroup: string;
|
|
90
|
+
/** Move focus from panel content to the focused group's tab strip. Default `ctrl+shift+\`. */
|
|
91
|
+
focusTabs: string;
|
|
92
|
+
}
|
|
93
|
+
export interface KeyboardNavigationOptions {
|
|
94
|
+
/** Override individual {@link DockviewKeybindings}; unset keys keep their defaults. */
|
|
95
|
+
keymap?: Partial<DockviewKeybindings>;
|
|
96
|
+
}
|
|
46
97
|
export interface GetTabContextMenuItemsParams {
|
|
47
98
|
panel: IDockviewPanel;
|
|
48
99
|
group: DockviewGroupPanel;
|
|
@@ -78,6 +129,26 @@ export interface ViewFactoryData {
|
|
|
78
129
|
export type DockviewHeaderPosition = 'top' | 'bottom' | 'left' | 'right';
|
|
79
130
|
export type DockviewHeaderDirection = 'horizontal' | 'vertical';
|
|
80
131
|
export type DockviewDndStrategy = 'auto' | 'pointer' | 'html5';
|
|
132
|
+
/**
|
|
133
|
+
* Context handed to {@link DockviewOptions.transformFloatingGroupDrag} on each
|
|
134
|
+
* pointer-move frame while a floating group is being dragged.
|
|
135
|
+
*/
|
|
136
|
+
export interface FloatingGroupDragContext {
|
|
137
|
+
/** The floating group being dragged. */
|
|
138
|
+
readonly group: DockviewGroupPanel;
|
|
139
|
+
/** Proposed top-left + size this frame, in container pixels (pre-clamp). */
|
|
140
|
+
readonly proposed: Box;
|
|
141
|
+
/** Size of the container the floating group is dragged within. */
|
|
142
|
+
readonly container: {
|
|
143
|
+
width: number;
|
|
144
|
+
height: number;
|
|
145
|
+
};
|
|
146
|
+
/**
|
|
147
|
+
* Bounds of the other floating groups (relative to the same container),
|
|
148
|
+
* snapshotted at drag start.
|
|
149
|
+
*/
|
|
150
|
+
readonly others: readonly Box[];
|
|
151
|
+
}
|
|
81
152
|
export interface DockviewOptions {
|
|
82
153
|
/**
|
|
83
154
|
* Disable the auto-resizing which is controlled through a `ResizeObserver`.
|
|
@@ -91,16 +162,39 @@ export interface DockviewOptions {
|
|
|
91
162
|
minimumHeightWithinViewport?: number;
|
|
92
163
|
minimumWidthWithinViewport?: number;
|
|
93
164
|
};
|
|
165
|
+
/**
|
|
166
|
+
* Adjust a floating group's position while it is being dragged. Runs on
|
|
167
|
+
* each pointer-move frame with the proposed top-left (before the container
|
|
168
|
+
* clamp) and returns an adjusted top-left, or nothing to leave it
|
|
169
|
+
* unchanged. Use it for snapping, alignment, or custom bounds. Move only —
|
|
170
|
+
* resizing a floating group is unaffected.
|
|
171
|
+
*
|
|
172
|
+
* `context.others` holds the bounds of the other floating groups (relative
|
|
173
|
+
* to the same container), snapshotted at drag start, so the callback can
|
|
174
|
+
* align the dragged group against its siblings.
|
|
175
|
+
*/
|
|
176
|
+
transformFloatingGroupDrag?: (context: FloatingGroupDragContext) => {
|
|
177
|
+
top: number;
|
|
178
|
+
left: number;
|
|
179
|
+
} | void;
|
|
180
|
+
/**
|
|
181
|
+
* Selects which element moves a floating group when dragged.
|
|
182
|
+
*
|
|
183
|
+
* - `'titlebar'` (default): a dedicated, blank drag-handle bar is rendered
|
|
184
|
+
* above the group's tab bar. Dragging it moves the floating window;
|
|
185
|
+
* shift+drag (mouse) / long-press (touch) redocks into the grid. Style
|
|
186
|
+
* it with the `--dv-floating-titlebar-*` theme variables.
|
|
187
|
+
* - `'tabbar'`: the legacy behaviour — the empty space in the tab bar
|
|
188
|
+
* (the "void container") doubles as the move handle. No dedicated bar
|
|
189
|
+
* is rendered.
|
|
190
|
+
*/
|
|
191
|
+
floatingGroupDragHandle?: 'titlebar' | 'tabbar';
|
|
94
192
|
popoutUrl?: string;
|
|
95
193
|
nonce?: CspNonceProvider;
|
|
96
194
|
defaultRenderer?: DockviewPanelRenderer;
|
|
97
195
|
defaultHeaderPosition?: DockviewHeaderPosition;
|
|
98
196
|
debug?: boolean;
|
|
99
197
|
dndEdges?: false | DroptargetOverlayModel;
|
|
100
|
-
/**
|
|
101
|
-
* @deprecated use `dndEdges` instead. To be removed in a future version.
|
|
102
|
-
* */
|
|
103
|
-
rootOverlayModel?: DroptargetOverlayModel;
|
|
104
198
|
disableDnd?: boolean;
|
|
105
199
|
/**
|
|
106
200
|
* Selects which drag-and-drop implementation is active.
|
|
@@ -166,6 +260,65 @@ export interface DockviewOptions {
|
|
|
166
260
|
* enabling i18n / custom visuals.
|
|
167
261
|
*/
|
|
168
262
|
createGroupDragGhostComponent?: (group: DockviewGroupPanel) => IGroupDragGhostRenderer;
|
|
263
|
+
/**
|
|
264
|
+
* Shape the drop overlay shown over a group's drop targets — the tab
|
|
265
|
+
* strip (`'tab'`), the header void space (`'header_space'`) and the
|
|
266
|
+
* panel content area (`'content'`). Return a {@link DroptargetOverlayModel}
|
|
267
|
+
* to override that target's default overlay (size, activation threshold,
|
|
268
|
+
* small-element boundaries), or `undefined` to keep the default.
|
|
269
|
+
*
|
|
270
|
+
* `group` is provided where known (tab / header_space). The outer-layout
|
|
271
|
+
* edge overlay is shaped by `dndEdges`, not this option, so `'edge'` is
|
|
272
|
+
* not dispatched here.
|
|
273
|
+
*/
|
|
274
|
+
dropOverlayModel?: (params: DropOverlayModelParams) => DroptargetOverlayModel | undefined;
|
|
275
|
+
/**
|
|
276
|
+
* Built-in screen-reader announcements of layout changes (a visually-hidden
|
|
277
|
+
* `aria-live` region narrating panel open/close etc.). On by default —
|
|
278
|
+
* set to `false` to disable, e.g. when the host app provides its own
|
|
279
|
+
* announcement system. Honoured live via `updateOptions`.
|
|
280
|
+
*/
|
|
281
|
+
announcements?: boolean;
|
|
282
|
+
/**
|
|
283
|
+
* Localise or override the built-in announcement strings (the default
|
|
284
|
+
* messages are English). Return a string to use it, `null` / `''` to
|
|
285
|
+
* suppress that announcement, or `undefined` to keep the default. This is
|
|
286
|
+
* how non-English apps translate announcements — core ships no message
|
|
287
|
+
* catalog, only the default strings + this hook.
|
|
288
|
+
*/
|
|
289
|
+
getAnnouncement?: (event: LiveRegionEvent) => string | null | undefined;
|
|
290
|
+
/**
|
|
291
|
+
* Route announcements to your own screen-reader infrastructure instead of
|
|
292
|
+
* the built-in `aria-live` regions (e.g. an app-wide live region). When
|
|
293
|
+
* set, dockview hands you each {@link AnnouncementEvent} and writes nothing
|
|
294
|
+
* to its own regions. `getAnnouncement` (localisation) still applies first.
|
|
295
|
+
*/
|
|
296
|
+
announcer?: (event: AnnouncementEvent) => void;
|
|
297
|
+
/**
|
|
298
|
+
* Translate / override the strings dockview speaks to assistive technology
|
|
299
|
+
* — both the LiveRegion announcements and the keyboard-docking narration.
|
|
300
|
+
* Provide any subset of {@link DockviewMessages}; unset entries keep the
|
|
301
|
+
* English defaults. (`getAnnouncement` still applies first, per-event, for
|
|
302
|
+
* announcements.)
|
|
303
|
+
*/
|
|
304
|
+
messages?: Partial<DockviewMessages>;
|
|
305
|
+
/**
|
|
306
|
+
* Operate the dock with the keyboard. `true` enables the default bindings;
|
|
307
|
+
* pass an object to override individual ones via `keymap`. Off by default
|
|
308
|
+
* (opt-in while the feature matures). Enables:
|
|
309
|
+
*
|
|
310
|
+
* - **Switch tab** within the focused group — `Ctrl`+`]` / `Ctrl`+`[`.
|
|
311
|
+
* - **Move focus between groups** — `F6` / `Shift`+`F6` (sequential) or
|
|
312
|
+
* `Ctrl`+`Shift`+arrow keys (spatial: focus the group in that direction).
|
|
313
|
+
* - **Dock the active panel** without a mouse — `Ctrl`+`M` arms a two-phase
|
|
314
|
+
* move (arrows cycle the target group with a live drop preview +
|
|
315
|
+
* screen-reader narration, `Enter` docks, `Escape` cancels).
|
|
316
|
+
*
|
|
317
|
+
* Defaults avoid `Cmd`-based and browser-reserved combinations (e.g.
|
|
318
|
+
* `Cmd`+`M` is the macOS minimise-window shortcut); use {@link keymap} to
|
|
319
|
+
* rebind for your platform.
|
|
320
|
+
*/
|
|
321
|
+
keyboardNavigation?: boolean | KeyboardNavigationOptions;
|
|
169
322
|
/**
|
|
170
323
|
* Replace the built-in tab group color palette with a user-defined list.
|
|
171
324
|
*
|
|
@@ -300,7 +453,7 @@ export type AddPanelOptions<P extends object = Parameters> = {
|
|
|
300
453
|
inactive?: boolean;
|
|
301
454
|
initialWidth?: number;
|
|
302
455
|
initialHeight?: number;
|
|
303
|
-
} & Partial<AddPanelOptionsUnion> & Partial<
|
|
456
|
+
} & Partial<AddPanelOptionsUnion> & Partial<Constraints>;
|
|
304
457
|
type AddGroupOptionsWithPanel = {
|
|
305
458
|
referencePanel: string | IDockviewPanel;
|
|
306
459
|
direction?: Omit<Direction, 'within'>;
|
|
@@ -46,12 +46,13 @@ exports.PROPERTY_KEYS_DOCKVIEW = (function () {
|
|
|
46
46
|
singleTabMode: undefined,
|
|
47
47
|
disableFloatingGroups: undefined,
|
|
48
48
|
floatingGroupBounds: undefined,
|
|
49
|
+
transformFloatingGroupDrag: undefined,
|
|
50
|
+
floatingGroupDragHandle: undefined,
|
|
49
51
|
popoutUrl: undefined,
|
|
50
52
|
nonce: undefined,
|
|
51
53
|
defaultRenderer: undefined,
|
|
52
54
|
defaultHeaderPosition: undefined,
|
|
53
55
|
debug: undefined,
|
|
54
|
-
rootOverlayModel: undefined,
|
|
55
56
|
locked: undefined,
|
|
56
57
|
disableDnd: undefined,
|
|
57
58
|
dndStrategy: undefined,
|
|
@@ -65,6 +66,12 @@ exports.PROPERTY_KEYS_DOCKVIEW = (function () {
|
|
|
65
66
|
getTabGroupChipContextMenuItems: undefined,
|
|
66
67
|
createTabGroupChipComponent: undefined,
|
|
67
68
|
createGroupDragGhostComponent: undefined,
|
|
69
|
+
dropOverlayModel: undefined,
|
|
70
|
+
announcements: undefined,
|
|
71
|
+
getAnnouncement: undefined,
|
|
72
|
+
announcer: undefined,
|
|
73
|
+
messages: undefined,
|
|
74
|
+
keyboardNavigation: undefined,
|
|
68
75
|
tabGroupColors: undefined,
|
|
69
76
|
tabGroupAccent: undefined,
|
|
70
77
|
};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { IDisposable } from '../lifecycle';
|
|
2
|
+
import { Event } from '../events';
|
|
3
|
+
import { PopupService } from './components/popupService';
|
|
4
|
+
import { PopoutWindow } from '../popoutWindow';
|
|
5
|
+
import { DockviewGroupPanel } from './dockviewGroupPanel';
|
|
6
|
+
import { SerializedPopoutGroup } from './dockviewComponent';
|
|
7
|
+
import { Gridview } from '../gridview/gridview';
|
|
8
|
+
import { OverlayRenderContainer } from '../overlay/overlayRenderContainer';
|
|
9
|
+
import { DropTargetAnchorContainer } from '../dnd/dropTargetAnchorContainer';
|
|
10
|
+
export interface PopoutGroupEntry {
|
|
11
|
+
window: PopoutWindow;
|
|
12
|
+
popoutGroup: DockviewGroupPanel;
|
|
13
|
+
referenceGroup?: string;
|
|
14
|
+
/**
|
|
15
|
+
* The popout window hosts its own gridview so it can hold a nested
|
|
16
|
+
* splitview layout of groups. `popoutGroup` is the window's anchor group.
|
|
17
|
+
*/
|
|
18
|
+
gridview: Gridview;
|
|
19
|
+
/**
|
|
20
|
+
* Render / drop-target containers and window accessor for this popout, so
|
|
21
|
+
* groups relocated into the window can be wired to its own document.
|
|
22
|
+
*/
|
|
23
|
+
overlayRenderContainer: OverlayRenderContainer;
|
|
24
|
+
dropTargetContainer: DropTargetAnchorContainer;
|
|
25
|
+
getWindow: () => Window;
|
|
26
|
+
popoutUrl?: string;
|
|
27
|
+
disposable: {
|
|
28
|
+
dispose: () => DockviewGroupPanel | undefined;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Narrow callback surface the PopoutWindowService needs from its host.
|
|
33
|
+
*/
|
|
34
|
+
export interface IPopoutWindowHost {
|
|
35
|
+
readonly isDisposed: boolean;
|
|
36
|
+
}
|
|
37
|
+
export interface IPopoutWindowService extends IDisposable {
|
|
38
|
+
readonly entries: readonly PopoutGroupEntry[];
|
|
39
|
+
readonly onDidRemove: Event<PopoutGroupEntry>;
|
|
40
|
+
add(entry: PopoutGroupEntry): void;
|
|
41
|
+
remove(entry: PopoutGroupEntry): void;
|
|
42
|
+
findByGroup(group: DockviewGroupPanel): PopoutGroupEntry | undefined;
|
|
43
|
+
findReferenceGroupId(group: DockviewGroupPanel): string | undefined;
|
|
44
|
+
observeGridviewSize(popoutWindow: PopoutWindow, gridview: Gridview, overlayRenderContainer: OverlayRenderContainer): IDisposable | undefined;
|
|
45
|
+
getPopupService(groupId: string): PopupService | undefined;
|
|
46
|
+
setPopupService(groupId: string, service: PopupService): void;
|
|
47
|
+
deletePopupService(groupId: string): void;
|
|
48
|
+
readonly restorationPromise: Promise<void>;
|
|
49
|
+
scheduleRestoration(delayMs: number, work: () => void, onCancel?: () => void): Promise<void>;
|
|
50
|
+
finishRestoration(promises: Promise<void>[]): void;
|
|
51
|
+
cancelPendingRestorations(): void;
|
|
52
|
+
serialize(): SerializedPopoutGroup[];
|
|
53
|
+
disposeAll(): void;
|
|
54
|
+
}
|
|
55
|
+
export declare class PopoutWindowService implements IPopoutWindowService {
|
|
56
|
+
private readonly _host;
|
|
57
|
+
private readonly _entries;
|
|
58
|
+
private readonly _popupServices;
|
|
59
|
+
private readonly _restorationCleanups;
|
|
60
|
+
private _restorationPromise;
|
|
61
|
+
private readonly _onDidRemove;
|
|
62
|
+
readonly onDidRemove: Event<PopoutGroupEntry>;
|
|
63
|
+
constructor(host: IPopoutWindowHost);
|
|
64
|
+
get entries(): readonly PopoutGroupEntry[];
|
|
65
|
+
get restorationPromise(): Promise<void>;
|
|
66
|
+
add(entry: PopoutGroupEntry): void;
|
|
67
|
+
remove(entry: PopoutGroupEntry): void;
|
|
68
|
+
findByGroup(group: DockviewGroupPanel): PopoutGroupEntry | undefined;
|
|
69
|
+
findReferenceGroupId(group: DockviewGroupPanel): string | undefined;
|
|
70
|
+
/**
|
|
71
|
+
* The popout window's innerWidth/innerHeight are often 0/stale until it has
|
|
72
|
+
* painted, and the nested gridview lays its children out to the size passed
|
|
73
|
+
* to layout() (a plain group fills via CSS instead). To stop content
|
|
74
|
+
* rendering into a zero box until a manual resize — and to avoid the race a
|
|
75
|
+
* fixed number of animation frames had — observe the gridview element with
|
|
76
|
+
* a ResizeObserver created in the POPOUT window's OWN realm. A parent-realm
|
|
77
|
+
* observer fires unreliably across the window boundary; a same-realm one
|
|
78
|
+
* fires reliably, including the initial observation once the window is
|
|
79
|
+
* sized.
|
|
80
|
+
*
|
|
81
|
+
* @returns a disposable that disconnects the observer, or `undefined` when
|
|
82
|
+
* the popout realm has no ResizeObserver (e.g. jsdom).
|
|
83
|
+
*/
|
|
84
|
+
observeGridviewSize(popoutWindow: PopoutWindow, gridview: Gridview, overlayRenderContainer: OverlayRenderContainer): IDisposable | undefined;
|
|
85
|
+
getPopupService(groupId: string): PopupService | undefined;
|
|
86
|
+
setPopupService(groupId: string, service: PopupService): void;
|
|
87
|
+
deletePopupService(groupId: string): void;
|
|
88
|
+
scheduleRestoration(delayMs: number, work: () => void, onCancel?: () => void): Promise<void>;
|
|
89
|
+
finishRestoration(promises: Promise<void>[]): void;
|
|
90
|
+
cancelPendingRestorations(): void;
|
|
91
|
+
serialize(): SerializedPopoutGroup[];
|
|
92
|
+
disposeAll(): void;
|
|
93
|
+
dispose(): void;
|
|
94
|
+
}
|
|
95
|
+
export declare const PopoutWindowModule: import("./modules").DockviewModule<IPopoutWindowHost>;
|