@xui/dock-manager 2.0.0-alpha.11

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.
@@ -0,0 +1,571 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { InjectionToken, TemplateRef } from '@angular/core';
3
+ import { ClassValue } from 'clsx';
4
+
5
+ /**
6
+ * Declares the body of one content pane.
7
+ *
8
+ * The `contentId` links the template to the `contentId` of a
9
+ * {@link XuiDockContentPane} in the layout — the dock manager's equivalent of
10
+ * Ignite UI's `slot="…"` children.
11
+ *
12
+ * ```html
13
+ * <xui-dock-manager [(layout)]="layout">
14
+ * <ng-template xuiDockContent="explorer">…</ng-template>
15
+ * <ng-template xuiDockContent="editor">…</ng-template>
16
+ * </xui-dock-manager>
17
+ * ```
18
+ *
19
+ * The template is instantiated once, the first time its pane is shown, and the
20
+ * resulting view is then kept for as long as the pane is in the layout — docking,
21
+ * floating, unpinning and tab switching all move its DOM rather than rebuilding
22
+ * it, so scroll offsets, half-typed input and component state survive.
23
+ */
24
+ declare class XuiDockContent {
25
+ /** Matches the `contentId` of a content pane in the layout. */
26
+ readonly contentId: _angular_core.InputSignal<string>;
27
+ readonly template: TemplateRef<unknown>;
28
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<XuiDockContent, never>;
29
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<XuiDockContent, "ng-template[xuiDockContent]", never, { "contentId": { "alias": "xuiDockContent"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
30
+ }
31
+ /** What {@link XuiDockContentOutlet} needs from the dock manager above it. */
32
+ interface XuiDockContentMounter {
33
+ /** Move the view for `contentId` into `host`, creating it on first use. */
34
+ mountContent(contentId: string, host: HTMLElement): void;
35
+ /** Park the view for `contentId` if — and only if — it still sits in `host`. */
36
+ releaseContent(contentId: string, host: HTMLElement): void;
37
+ }
38
+ declare const XUI_DOCK_CONTENT_MOUNTER: InjectionToken<XuiDockContentMounter>;
39
+ /**
40
+ * Fills its host element with the content view for a `contentId`.
41
+ *
42
+ * Used internally by `xui-dock-manager` wherever a pane body is rendered.
43
+ */
44
+ declare class XuiDockContentOutlet {
45
+ private readonly host;
46
+ private readonly mounter;
47
+ readonly contentId: _angular_core.InputSignal<string>;
48
+ constructor();
49
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<XuiDockContentOutlet, never>;
50
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<XuiDockContentOutlet, "[xuiDockContentOutlet]", never, { "contentId": { "alias": "xuiDockContentOutlet"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
51
+ }
52
+
53
+ /**
54
+ * The dock manager's layout is a plain, serialisable tree — the same shape Ignite
55
+ * UI's `IgcDockManagerLayout` uses, so layouts port across with only the `Igc`
56
+ * prefix dropped. Nothing in the tree holds a DOM reference or an Angular type,
57
+ * which is what makes a layout safe to persist and restore.
58
+ */
59
+ /** Discriminator for the four node kinds a layout tree is built from. */
60
+ type XuiDockPaneType = 'splitPane' | 'contentPane' | 'tabGroupPane' | 'documentHost';
61
+ /** Which axis a split pane lays its children out along. */
62
+ type XuiDockSplitOrientation = 'horizontal' | 'vertical';
63
+ /**
64
+ * Where a dragged pane lands relative to the pane it was dropped on. `start` and
65
+ * `end` are inline-relative, so they follow the reading direction.
66
+ */
67
+ type XuiDockPosition = 'start' | 'end' | 'top' | 'bottom' | 'center';
68
+ /** Which edge of the dock manager an unpinned pane's tab sits on. */
69
+ type XuiDockUnpinnedLocation = 'start' | 'end' | 'top' | 'bottom';
70
+ /** A floating pane's top-left corner, in pixels relative to the dock manager. */
71
+ interface XuiDockPoint {
72
+ x: number;
73
+ y: number;
74
+ }
75
+ interface XuiDockPaneBase {
76
+ /**
77
+ * The pane's share of its parent split pane's main axis, as a weight relative
78
+ * to its siblings — two children sized `1` and `3` split the space 25/75.
79
+ * Defaults to `1`.
80
+ */
81
+ size?: number;
82
+ }
83
+ /**
84
+ * A leaf pane: a header and a body, where the body is whichever
85
+ * `[xuiDockContent]` template declares the matching `contentId`.
86
+ */
87
+ interface XuiDockContentPane extends XuiDockPaneBase {
88
+ type: 'contentPane';
89
+ /** Links the pane to its `<ng-template [xuiDockContent]="…">`. Must be unique. */
90
+ contentId: string;
91
+ /** Text shown in the pane header, or in its tab when it sits in a tab group. */
92
+ header?: string;
93
+ /**
94
+ * `false` collapses the pane to a tab on one of the dock manager's edges; its
95
+ * position in the tree is kept, so re-pinning puts it back where it was.
96
+ * Defaults to `true`.
97
+ */
98
+ isPinned?: boolean;
99
+ /** Which edge an unpinned pane's tab sits on. Derived from the tree when unset. */
100
+ unpinnedLocation?: XuiDockUnpinnedLocation;
101
+ /** Thickness of the fly-out an unpinned pane opens, in pixels. Defaults to 280. */
102
+ unpinnedSize?: number;
103
+ /** `true` fills the whole dock manager, hiding every other pane. */
104
+ isMaximized?: boolean;
105
+ /**
106
+ * Restricts the pane to the document host — it cannot be docked outside one,
107
+ * floated or unpinned. Use it for editor-style tabs.
108
+ */
109
+ documentOnly?: boolean;
110
+ /** Show the close button and allow programmatic closing. Defaults to `true`. */
111
+ allowClose?: boolean;
112
+ /** Allow the pane to be dragged out of the layout into a floating window. Defaults to `true`. */
113
+ allowFloating?: boolean;
114
+ /** Allow the pane to be dragged and docked elsewhere in the layout. Defaults to `true`. */
115
+ allowDocking?: boolean;
116
+ /** Show the pin button. Defaults to `true`. */
117
+ allowPinning?: boolean;
118
+ /** Show the maximize button. Defaults to `true`. */
119
+ allowMaximize?: boolean;
120
+ }
121
+ /**
122
+ * Lays its children out along one axis with a draggable splitter between each
123
+ * pair. Doubles as the root of a floating window, which is where the `floating*`
124
+ * properties apply.
125
+ */
126
+ interface XuiDockSplitPane extends XuiDockPaneBase {
127
+ type: 'splitPane';
128
+ orientation: XuiDockSplitOrientation;
129
+ panes: XuiDockPane[];
130
+ /**
131
+ * Keep the split pane in the tree once its last child is gone. Needed on a
132
+ * document host's root pane, which must survive closing every document.
133
+ */
134
+ allowEmpty?: boolean;
135
+ /** Top-left corner of the floating window, when this is a floating root. */
136
+ floatingLocation?: XuiDockPoint;
137
+ /** Floating window width in pixels. Defaults to 400. */
138
+ floatingWidth?: number;
139
+ /** Floating window height in pixels. Defaults to 300. */
140
+ floatingHeight?: number;
141
+ /** Show resize handles on the floating window. Defaults to `true`. */
142
+ floatingResizable?: boolean;
143
+ }
144
+ /** Stacks content panes as tabs, showing one at a time. */
145
+ interface XuiDockTabGroupPane extends XuiDockPaneBase {
146
+ type: 'tabGroupPane';
147
+ panes: XuiDockContentPane[];
148
+ /** Index of the visible tab. Defaults to 0, and is clamped to the tab count. */
149
+ selectedIndex?: number;
150
+ /** Keep the tab group in the tree once its last tab is gone. */
151
+ allowEmpty?: boolean;
152
+ }
153
+ /**
154
+ * The area `documentOnly` panes live in — the editor surface of an IDE layout.
155
+ * A layout has at most one, and it is the only valid drop target for documents.
156
+ */
157
+ interface XuiDockDocumentHost extends XuiDockPaneBase {
158
+ type: 'documentHost';
159
+ rootPane: XuiDockSplitPane;
160
+ }
161
+ /** Any node in the layout tree. */
162
+ type XuiDockPane = XuiDockContentPane | XuiDockSplitPane | XuiDockTabGroupPane | XuiDockDocumentHost;
163
+ /** A pane that holds children, and so can be a docking target for `center`. */
164
+ type XuiDockParentPane = XuiDockSplitPane | XuiDockTabGroupPane;
165
+ /** The whole layout: one docked tree plus any number of floating windows. */
166
+ interface XuiDockManagerLayout {
167
+ rootPane: XuiDockSplitPane | XuiDockDocumentHost;
168
+ /** Each entry is the root of one floating window. */
169
+ floatingPanes?: XuiDockSplitPane[];
170
+ }
171
+ /** Emitted whenever a pane's pinned, maximized or floating state is toggled. */
172
+ interface XuiDockPaneStateEvent {
173
+ pane: XuiDockContentPane;
174
+ value: boolean;
175
+ }
176
+ declare function isContentPane(pane: XuiDockPane): pane is XuiDockContentPane;
177
+ declare function isSplitPane(pane: XuiDockPane): pane is XuiDockSplitPane;
178
+ declare function isTabGroupPane(pane: XuiDockPane): pane is XuiDockTabGroupPane;
179
+ declare function isDocumentHost(pane: XuiDockPane): pane is XuiDockDocumentHost;
180
+ declare function isParentPane(pane: XuiDockPane): pane is XuiDockParentPane;
181
+
182
+ /**
183
+ * A stable string key for a pane object, allocated on first use.
184
+ *
185
+ * Used for `@for` tracking and for finding the pane behind a DOM element during a
186
+ * drag. Keyed by object identity, so it survives every operation in this file and
187
+ * is *not* preserved by {@link cloneDockLayout}.
188
+ */
189
+ declare function dockPaneKey(pane: XuiDockPane): string;
190
+ /**
191
+ * A structural copy of the layout, safe to keep as an undo snapshot.
192
+ *
193
+ * A round-trip through JSON, which the layout's own contract allows: every node
194
+ * is plain data. The copy is a *different* set of objects, so its panes get fresh
195
+ * {@link dockPaneKey}s and restoring it replaces the rendered panes rather than
196
+ * moving them.
197
+ */
198
+ declare function cloneDockLayout(layout: XuiDockManagerLayout): XuiDockManagerLayout;
199
+ /** The child panes of `pane`, or an empty array for a leaf. */
200
+ declare function dockChildren(pane: XuiDockPane): readonly XuiDockPane[];
201
+ /** Every root of the layout: the docked tree, then each floating window. */
202
+ declare function dockRoots(layout: XuiDockManagerLayout): XuiDockPane[];
203
+ /**
204
+ * Depth-first walk over every pane in the layout, floating windows included.
205
+ * Returning `false` from `visitor` skips that pane's subtree.
206
+ */
207
+ declare function visitDockPanes(layout: XuiDockManagerLayout, visitor: (pane: XuiDockPane) => boolean | void): void;
208
+ /** The pane whose `panes` array holds `pane`, or `null` for a root. */
209
+ declare function findDockParent(layout: XuiDockManagerLayout, pane: XuiDockPane): XuiDockParentPane | null;
210
+ /** `pane`'s ancestors, nearest first. */
211
+ declare function dockAncestors(layout: XuiDockManagerLayout, pane: XuiDockPane): XuiDockPane[];
212
+ /** The layout's document host, if it has one. */
213
+ declare function findDocumentHost(layout: XuiDockManagerLayout): XuiDockDocumentHost | null;
214
+ /** Whether `pane` sits inside the document host. */
215
+ declare function isInDocumentHost(layout: XuiDockManagerLayout, pane: XuiDockPane): boolean;
216
+ /** Whether `pane` is the root of a floating window. */
217
+ declare function isFloatingRoot(layout: XuiDockManagerLayout, pane: XuiDockPane): boolean;
218
+ /** Whether `pane` is a root that must not be collapsed away. */
219
+ declare function isDockRoot(layout: XuiDockManagerLayout, pane: XuiDockPane): boolean;
220
+ /** Every content pane in the layout, in tree order. */
221
+ declare function collectContentPanes(layout: XuiDockManagerLayout): XuiDockContentPane[];
222
+ /** The content pane that is currently maximized, if any. */
223
+ declare function findMaximizedPane(layout: XuiDockManagerLayout): XuiDockContentPane | null;
224
+ /**
225
+ * Whether the pane takes up space in the docked layout. An unpinned content pane
226
+ * does not, and neither does a split pane or tab group whose whole subtree is
227
+ * unpinned — otherwise collapsing a sidebar would leave a gap behind it.
228
+ */
229
+ declare function isDockPaneVisible(pane: XuiDockPane): boolean;
230
+ /** The children of `pane` that take up space, in order. */
231
+ declare function visibleDockChildren(pane: XuiDockPane): XuiDockPane[];
232
+ /** The tab a tab group shows: its `selectedIndex`, or the first pinned tab. */
233
+ declare function selectedTabPane(group: XuiDockTabGroupPane): XuiDockContentPane | null;
234
+ /**
235
+ * Which edge an unpinned pane collapses to when `unpinnedLocation` is unset.
236
+ *
237
+ * Follows the pane's own position in the tree — a pane in the first branch of a
238
+ * horizontal split goes to the inline start, one in the last branch to the inline
239
+ * end — so a sidebar collapses to the side it was already on.
240
+ */
241
+ declare function defaultUnpinnedLocation(layout: XuiDockManagerLayout, pane: XuiDockPane): XuiDockUnpinnedLocation;
242
+ /** The unpinned content panes, grouped by the edge their tabs sit on. */
243
+ declare function unpinnedDockPanes(layout: XuiDockManagerLayout): Record<XuiDockUnpinnedLocation, XuiDockContentPane[]>;
244
+ /**
245
+ * Tidy the tree after a mutation: drop empty parents, unwrap split panes down to
246
+ * a single child, merge nested splits that run along the same axis, and clamp
247
+ * every tab group's selected index.
248
+ *
249
+ * Roots survive all of this — `layout.rootPane`, a floating window's root and a
250
+ * document host's root pane are structural and stay put even when empty. A root
251
+ * left with a single split pane beneath it absorbs that child rather than being
252
+ * replaced by it.
253
+ */
254
+ declare function normalizeDockLayout(layout: XuiDockManagerLayout): void;
255
+ /**
256
+ * Detach `pane` from wherever it sits — a parent's `panes`, or the floating
257
+ * window list — and tidy up behind it. Returns `false` if it was not in the
258
+ * layout at all.
259
+ */
260
+ declare function removeDockPane(layout: XuiDockManagerLayout, pane: XuiDockPane): boolean;
261
+ /**
262
+ * Whether `pane` may be dropped onto `target`.
263
+ *
264
+ * A `documentOnly` pane is confined to the document host; anything else may dock
265
+ * anywhere. A pane can never be dropped onto itself or into its own subtree.
266
+ */
267
+ declare function canDockInto(layout: XuiDockManagerLayout, pane: XuiDockPane, target: XuiDockPane, position: XuiDockPosition): boolean;
268
+ /**
269
+ * Attach `pane` to the layout next to `target`.
270
+ *
271
+ * `center` tabs the pane together with the target — turning a lone content pane
272
+ * into a two-tab group — while the four edge positions split the space. An edge
273
+ * drop reuses the target's parent when it already runs along the right axis, so
274
+ * dropping three panes to the right of each other yields one three-way split
275
+ * rather than three nested ones.
276
+ */
277
+ declare function insertDockPane(layout: XuiDockManagerLayout, pane: XuiDockPane, target: XuiDockPane, position: XuiDockPosition): boolean;
278
+ /** Move `pane` out of the layout and into a floating window of its own. */
279
+ declare function floatDockPane(layout: XuiDockManagerLayout, pane: XuiDockPane, location: XuiDockPoint, size?: {
280
+ width: number;
281
+ height: number;
282
+ }): XuiDockSplitPane | null;
283
+ /** Move `pane` from wherever it is to `position` relative to `target`. */
284
+ declare function dockPaneAt(layout: XuiDockManagerLayout, pane: XuiDockPane, target: XuiDockPane, position: XuiDockPosition): boolean;
285
+
286
+ interface DropTarget {
287
+ pane: XuiDockPane;
288
+ position: XuiDockPosition;
289
+ }
290
+ /**
291
+ * One square of the docking joystick, positioned in coordinates relative to the
292
+ * dock manager. `side` is the *visual* half it fills in, which is the mirror of
293
+ * `position` on the inline axis in RTL.
294
+ */
295
+ interface DockIndicator extends DropTarget {
296
+ key: string;
297
+ side: 'left' | 'right' | 'top' | 'bottom' | 'center';
298
+ left: number;
299
+ top: number;
300
+ active: boolean;
301
+ }
302
+ interface Rect {
303
+ left: number;
304
+ top: number;
305
+ width: number;
306
+ height: number;
307
+ }
308
+ /**
309
+ * An IDE-style docking layout: resizable split panes, tab groups, a document
310
+ * host, collapsible edge panels and floating windows, all driven by one
311
+ * serialisable {@link XuiDockManagerLayout} tree.
312
+ *
313
+ * ```html
314
+ * <xui-dock-manager [(layout)]="layout" class="h-[32rem]">
315
+ * <ng-template xuiDockContent="explorer">…</ng-template>
316
+ * <ng-template xuiDockContent="editor">…</ng-template>
317
+ * </xui-dock-manager>
318
+ * ```
319
+ *
320
+ * The layout shape follows Ignite UI's `IgcDockManagerLayout`, so existing
321
+ * layouts port over by dropping the `Igc` prefix and using string literals in
322
+ * place of its enums.
323
+ *
324
+ * Panes carry no content of their own: each one names a `contentId`, and the
325
+ * matching `[xuiDockContent]` template supplies the body. Those bodies are
326
+ * instantiated once and then *moved* as the layout changes, so a pane keeps its
327
+ * scroll position and component state when it is dragged to another dock, tabbed,
328
+ * floated or collapsed.
329
+ *
330
+ * `layout` is two-way bindable and the dock manager edits the tree **in place**
331
+ * before emitting, which is what keeps pane identity stable across a drag. Bind a
332
+ * signal to it and snapshot with `cloneDockLayout()` if you need an undo buffer.
333
+ *
334
+ * Dragging is a pointer gesture. Picking up a pane raises Visual Studio's docking
335
+ * targets: a five-way joystick over whichever pane is under the pointer — four
336
+ * arms to split it, the centre to tab with it — and an outer ring at the dock
337
+ * manager's edges to dock against the whole layout. Only the targets the dragged
338
+ * pane is allowed to take are drawn, and the one that would be used is
339
+ * highlighted while an outline previews the space it would claim.
340
+ *
341
+ * Off the targets, the two gestures differ. A header or tab drag has no other
342
+ * purpose, so the whole pane stays live and the nearest edge wins; dropping
343
+ * outside the layout floats the pane. Dragging a floating window's title bar is
344
+ * mostly about *moving* the window, so it docks from the targets alone.
345
+ *
346
+ * Every other operation — close, pin, maximize, float, tab selection, splitter
347
+ * resize — is reachable from the keyboard, and the public methods (`closePane`,
348
+ * `unpinPane`, `dockPane`, …) drive the same paths for code. Docking itself has no
349
+ * keyboard equivalent yet.
350
+ */
351
+ declare class XuiDockManager implements XuiDockContentMounter {
352
+ private readonly el;
353
+ private readonly document;
354
+ private readonly vcr;
355
+ private readonly direction;
356
+ /** Detached parking space for the content views of panes that are not on screen. */
357
+ private readonly holder;
358
+ private readonly views;
359
+ private readonly contents;
360
+ readonly class: _angular_core.InputSignal<ClassValue>;
361
+ /**
362
+ * The layout tree. Two-way bindable, and edited **in place** — see the class
363
+ * docs for why, and use `cloneDockLayout()` for snapshots.
364
+ */
365
+ readonly layout: _angular_core.ModelSignal<XuiDockManagerLayout>;
366
+ /** A pane was closed and removed from the layout. */
367
+ readonly paneClose: _angular_core.OutputEmitterRef<XuiDockContentPane>;
368
+ /** The pane the user last interacted with, or `null` once it is gone. */
369
+ readonly activePaneChange: _angular_core.OutputEmitterRef<XuiDockContentPane | null>;
370
+ readonly panePinnedChange: _angular_core.OutputEmitterRef<XuiDockPaneStateEvent>;
371
+ readonly paneMaximizedChange: _angular_core.OutputEmitterRef<XuiDockPaneStateEvent>;
372
+ readonly paneFloatingChange: _angular_core.OutputEmitterRef<XuiDockPaneStateEvent>;
373
+ /** A pointer drag on a pane header or tab began. */
374
+ readonly paneDragStart: _angular_core.OutputEmitterRef<XuiDockPane>;
375
+ /** A pointer drag ended, whether or not it changed the layout. */
376
+ readonly paneDragEnd: _angular_core.OutputEmitterRef<XuiDockPane>;
377
+ /** The pane last interacted with. Drives the active header accent. */
378
+ readonly activePane: _angular_core.WritableSignal<XuiDockContentPane | null>;
379
+ private readonly drag;
380
+ private readonly dropTarget;
381
+ protected readonly dropRect: _angular_core.WritableSignal<Rect | null>;
382
+ protected readonly dockIndicators: _angular_core.WritableSignal<DockIndicator[]>;
383
+ /** The unpinned pane whose fly-out is open. */
384
+ protected readonly flyout: _angular_core.WritableSignal<XuiDockContentPane | null>;
385
+ protected readonly maximized: _angular_core.Signal<XuiDockContentPane | null>;
386
+ protected readonly unpinned: _angular_core.Signal<Record<XuiDockUnpinnedLocation, XuiDockContentPane[]>>;
387
+ protected readonly floatingPanes: _angular_core.Signal<XuiDockSplitPane[]>;
388
+ protected readonly dragGhost: _angular_core.Signal<{
389
+ x: number;
390
+ y: number;
391
+ label: string;
392
+ } | null>;
393
+ /** Exposed to the template so an indicator's box matches its hit area exactly. */
394
+ protected readonly INDICATOR_SIZE = 30;
395
+ /** Exposed to the template; the ids double as the axis to resize along. */
396
+ protected readonly RESIZE_HANDLES: readonly [{
397
+ readonly id: "top";
398
+ readonly class: "absolute -top-1 inset-x-2 h-2 cursor-ns-resize";
399
+ }, {
400
+ readonly id: "bottom";
401
+ readonly class: "absolute -bottom-1 inset-x-2 h-2 cursor-ns-resize";
402
+ }, {
403
+ readonly id: "left";
404
+ readonly class: "absolute -left-1 inset-y-2 w-2 cursor-ew-resize";
405
+ }, {
406
+ readonly id: "right";
407
+ readonly class: "absolute -right-1 inset-y-2 w-2 cursor-ew-resize";
408
+ }, {
409
+ readonly id: "top-left";
410
+ readonly class: "absolute -top-1 -left-1 size-3 cursor-nwse-resize";
411
+ }, {
412
+ readonly id: "top-right";
413
+ readonly class: "absolute -top-1 -right-1 size-3 cursor-nesw-resize";
414
+ }, {
415
+ readonly id: "bottom-left";
416
+ readonly class: "absolute -bottom-1 -left-1 size-3 cursor-nesw-resize";
417
+ }, {
418
+ readonly id: "bottom-right";
419
+ readonly class: "absolute -right-1 -bottom-1 size-3 cursor-nwse-resize";
420
+ }];
421
+ constructor();
422
+ mountContent(contentId: string, host: HTMLElement): void;
423
+ releaseContent(contentId: string, host: HTMLElement): void;
424
+ /** Remove `pane` from the layout. Respects `allowClose`. */
425
+ closePane(pane: XuiDockContentPane): void;
426
+ /** Close every pane in a floating window. */
427
+ closeWindow(window: XuiDockSplitPane): void;
428
+ /** Collapse `pane` to a tab on the nearest edge, keeping its place in the tree. */
429
+ unpinPane(pane: XuiDockContentPane): void;
430
+ /** Restore `pane` to the position it was collapsed from. */
431
+ pinPane(pane: XuiDockContentPane): void;
432
+ togglePinned(pane: XuiDockContentPane): void;
433
+ /** Blow `pane` up to fill the whole dock manager, hiding everything else. */
434
+ maximizePane(pane: XuiDockContentPane): void;
435
+ restorePane(pane: XuiDockContentPane): void;
436
+ toggleMaximized(pane: XuiDockContentPane): void;
437
+ /** Move `pane` into a floating window of its own. */
438
+ floatPane(pane: XuiDockPane, location?: XuiDockPoint, size?: {
439
+ width: number;
440
+ height: number;
441
+ }): void;
442
+ /** Dock `pane` at `position` relative to `target`. */
443
+ dockPane(pane: XuiDockPane, target: XuiDockPane, position: XuiDockPosition): boolean;
444
+ /** Make `pane` the active one, selecting its tab and opening its fly-out. */
445
+ selectPane(pane: XuiDockContentPane): void;
446
+ protected readonly key: typeof dockPaneKey;
447
+ protected childrenOf(pane: XuiDockPane): XuiDockPane[];
448
+ protected unpinnedAt(location: XuiDockUnpinnedLocation): XuiDockContentPane[];
449
+ protected pinnedTabs(group: XuiDockTabGroupPane): XuiDockContentPane[];
450
+ protected selectedTab(group: XuiDockTabGroupPane): XuiDockContentPane | null;
451
+ protected flexOf(pane: XuiDockPane): string;
452
+ protected headerOf(pane: XuiDockPane): string;
453
+ /** The pane a floating window's title bar drags: its lone pane, or the root. */
454
+ protected floatingContent(window: XuiDockSplitPane): XuiDockPane;
455
+ protected singlePane(window: XuiDockSplitPane): XuiDockContentPane | null;
456
+ protected floatingTitle(window: XuiDockSplitPane): string;
457
+ protected isFloating(pane: XuiDockPane): boolean;
458
+ protected toggleFlyout(pane: XuiDockContentPane): void;
459
+ protected activate(pane: XuiDockContentPane): void;
460
+ protected onEscape(): void;
461
+ /** Dock a whole floating window back into the layout root. */
462
+ protected dockBack(window: XuiDockSplitPane): void;
463
+ private dockBackPane;
464
+ protected bringToFront(window: XuiDockSplitPane): void;
465
+ protected startSplitterDrag(parent: XuiDockSplitPane, gutter: number, event: PointerEvent): void;
466
+ protected onSplitterKeydown(parent: XuiDockSplitPane, gutter: number, event: KeyboardEvent): void;
467
+ private clampSplitterDelta;
468
+ /** Re-weight two siblings so `before` takes `beforePx` of their shared `totalPx`. */
469
+ private resizeSiblings;
470
+ protected startFloatingResize(window: XuiDockSplitPane, handle: string, event: PointerEvent): void;
471
+ /**
472
+ * Start a drag on a pane header, a tab, or a floating window's title bar.
473
+ *
474
+ * A window drag moves the window as it goes and docks it if it is released over
475
+ * a valid target; a pane drag shows a ghost and either docks the pane or floats
476
+ * it where it was dropped.
477
+ */
478
+ protected startPaneDrag(pane: XuiDockPane, window: XuiDockSplitPane | null, event: PointerEvent): void;
479
+ protected cancelDrag(): void;
480
+ private clearDrag;
481
+ private floatAtPointer;
482
+ /**
483
+ * Work out where a drop at these coordinates would land, and size the preview
484
+ * rectangle to match.
485
+ *
486
+ * The dock manager's own edges win over whatever pane happens to be under the
487
+ * pointer, so there is always a way to dock against the full height or width of
488
+ * the layout.
489
+ */
490
+ private updateDropTarget;
491
+ /**
492
+ * The target for a drop that missed every indicator.
493
+ *
494
+ * A header or tab drag has no purpose other than docking, so the whole pane
495
+ * stays live and the nearest edge wins. Dragging a floating window is mostly
496
+ * about *moving* it, so it docks from the indicators alone.
497
+ */
498
+ private looseTargetAt;
499
+ /**
500
+ * The joystick over the pane under the pointer, plus the outer ring that docks
501
+ * against the whole layout — Visual Studio's docking targets.
502
+ *
503
+ * Only the positions the dragged pane is actually allowed to take are built, so
504
+ * a document dragged over a tool window simply offers nothing.
505
+ */
506
+ private buildIndicators;
507
+ /** A drop within `OUTER_EDGE` of the dock manager's frame docks the whole layout. */
508
+ private outerEdgeAt;
509
+ /**
510
+ * The pane under the pointer.
511
+ *
512
+ * Hit-tested against the rendered rectangles rather than `elementFromPoint`, so
513
+ * the drag ghost, the indicators and the floating window riding along with the
514
+ * pointer cannot get in the way. The innermost rectangle wins, and on a tie the
515
+ * one painted last does.
516
+ */
517
+ private paneAt;
518
+ /** Split `pane` along whichever edge the pointer sits nearest, or tab at its centre. */
519
+ private zoneTargetAt;
520
+ /** The slice of `rect` a drop would occupy, in coordinates relative to the host. */
521
+ private previewRect;
522
+ private elementForPane;
523
+ private paneForKey;
524
+ private release;
525
+ /** Follow the pointer until it is released, then clean up after ourselves. */
526
+ private trackPointer;
527
+ private stopPointerTracking;
528
+ /**
529
+ * Publish the in-place edits made to the tree.
530
+ *
531
+ * Skip normalisation for the continuous gestures — a resize or a window move
532
+ * cannot change the tree's shape, and re-walking it on every pointer event is
533
+ * wasted work.
534
+ */
535
+ private commit;
536
+ private contentPanesOf;
537
+ private tabGroupOf;
538
+ protected onTabKeydown(group: XuiDockTabGroupPane, event: KeyboardEvent): void;
539
+ protected readonly computedClass: _angular_core.Signal<string>;
540
+ protected splitClass(pane: XuiDockPane): string;
541
+ protected frameClass(pane: XuiDockPane): string;
542
+ /** Whether the pane on screen in this frame is the active one. */
543
+ private isActiveFrame;
544
+ protected headerClass(pane: XuiDockPane): string;
545
+ protected tabStripClass(): string;
546
+ protected tabClass(group: XuiDockTabGroupPane, tab: XuiDockContentPane): string;
547
+ protected tabCloseClass(): string;
548
+ protected actionClass(): string;
549
+ protected gutterClass(pane: XuiDockPane): string;
550
+ protected gutterHandleClass(pane: XuiDockPane): string;
551
+ protected stripClass(location: XuiDockUnpinnedLocation): string;
552
+ protected stripTabClass(location: XuiDockUnpinnedLocation, pane: XuiDockContentPane): string;
553
+ protected flyoutClass(): string;
554
+ protected flyoutStyle(pane: XuiDockContentPane): Record<string, string>;
555
+ protected floatingClass(): string;
556
+ protected floatingStyle(window: XuiDockSplitPane): Record<string, string>;
557
+ protected indicatorClass(indicator: DockIndicator): string;
558
+ /**
559
+ * The shaded block inside an indicator, showing which part of the target the
560
+ * pane will take — the same visual language as Visual Studio's dock targets.
561
+ */
562
+ protected indicatorFillClass(indicator: DockIndicator): string;
563
+ protected titleBarClass(): string;
564
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<XuiDockManager, never>;
565
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<XuiDockManager, "xui-dock-manager", never, { "class": { "alias": "class"; "required": false; "isSignal": true; }; "layout": { "alias": "layout"; "required": true; "isSignal": true; }; }, { "layout": "layoutChange"; "paneClose": "paneClose"; "activePaneChange": "activePaneChange"; "panePinnedChange": "panePinnedChange"; "paneMaximizedChange": "paneMaximizedChange"; "paneFloatingChange": "paneFloatingChange"; "paneDragStart": "paneDragStart"; "paneDragEnd": "paneDragEnd"; }, ["contents"], never, true, never>;
566
+ }
567
+
568
+ declare const XuiDockManagerImports: readonly [typeof XuiDockManager, typeof XuiDockContent];
569
+
570
+ export { XUI_DOCK_CONTENT_MOUNTER, XuiDockContent, XuiDockContentOutlet, XuiDockManager, XuiDockManagerImports, canDockInto, cloneDockLayout, collectContentPanes, defaultUnpinnedLocation, dockAncestors, dockChildren, dockPaneAt, dockPaneKey, dockRoots, findDockParent, findDocumentHost, findMaximizedPane, floatDockPane, insertDockPane, isContentPane, isDockPaneVisible, isDockRoot, isDocumentHost, isFloatingRoot, isInDocumentHost, isParentPane, isSplitPane, isTabGroupPane, normalizeDockLayout, removeDockPane, selectedTabPane, unpinnedDockPanes, visibleDockChildren, visitDockPanes };
571
+ export type { XuiDockContentMounter, XuiDockContentPane, XuiDockDocumentHost, XuiDockManagerLayout, XuiDockPane, XuiDockPaneStateEvent, XuiDockPaneType, XuiDockParentPane, XuiDockPoint, XuiDockPosition, XuiDockSplitOrientation, XuiDockSplitPane, XuiDockTabGroupPane, XuiDockUnpinnedLocation };