dockview 1.0.1 → 1.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/dist/cjs/api/component.api.d.ts +5 -1
- package/dist/cjs/api/component.api.js +42 -0
- package/dist/cjs/api/component.api.js.map +1 -1
- package/dist/cjs/dnd/droptarget.d.ts +1 -5
- package/dist/cjs/dnd/droptarget.js +1 -1
- package/dist/cjs/dnd/droptarget.js.map +1 -1
- package/dist/cjs/dockview/defaultGroupPanelView.js +3 -1
- package/dist/cjs/dockview/defaultGroupPanelView.js.map +1 -1
- package/dist/cjs/events.d.ts +7 -0
- package/dist/cjs/events.js +22 -1
- package/dist/cjs/events.js.map +1 -1
- package/dist/cjs/gridview/baseComponentGridview.js +6 -13
- package/dist/cjs/gridview/baseComponentGridview.js.map +1 -1
- package/dist/cjs/gridview/gridview.js +0 -1
- package/dist/cjs/gridview/gridview.js.map +1 -1
- package/dist/cjs/groupview/groupview.js +2 -2
- package/dist/cjs/groupview/groupview.js.map +1 -1
- package/dist/cjs/groupview/titlebar/tabsContainer.js +2 -2
- package/dist/cjs/groupview/titlebar/tabsContainer.js.map +1 -1
- package/dist/cjs/paneview/paneview.d.ts +1 -1
- package/dist/cjs/paneview/paneview.js +1 -4
- package/dist/cjs/paneview/paneview.js.map +1 -1
- package/dist/cjs/paneview/paneviewComponent.d.ts +2 -0
- package/dist/cjs/paneview/paneviewComponent.js.map +1 -1
- package/dist/dockview.amd.js +53 -26
- package/dist/dockview.amd.min.js +3 -3
- package/dist/dockview.amd.min.noStyle.js +3 -3
- package/dist/dockview.amd.noStyle.js +52 -25
- package/dist/dockview.cjs.js +53 -26
- package/dist/dockview.esm.js +53 -27
- package/dist/dockview.esm.min.js +3 -3
- package/dist/dockview.js +53 -26
- package/dist/dockview.min.js +3 -3
- package/dist/dockview.min.noStyle.js +3 -3
- package/dist/dockview.noStyle.js +52 -25
- package/dist/esm/api/component.api.d.ts +5 -1
- package/dist/esm/api/component.api.js +18 -0
- package/dist/esm/dnd/droptarget.d.ts +1 -5
- package/dist/esm/dnd/droptarget.js +1 -1
- package/dist/esm/dockview/defaultGroupPanelView.js +3 -1
- package/dist/esm/events.d.ts +7 -0
- package/dist/esm/events.js +18 -0
- package/dist/esm/gridview/baseComponentGridview.js +7 -14
- package/dist/esm/gridview/gridview.js +0 -1
- package/dist/esm/groupview/groupview.js +2 -2
- package/dist/esm/groupview/titlebar/tabsContainer.js +2 -2
- package/dist/esm/paneview/paneview.d.ts +1 -1
- package/dist/esm/paneview/paneview.js +1 -4
- package/dist/esm/paneview/paneviewComponent.d.ts +2 -0
- package/dist/styles/dockview.css +45 -45
- package/package.json +4 -4
package/dist/dockview.noStyle.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* dockview
|
|
3
|
-
* @version 1.0.
|
|
3
|
+
* @version 1.0.2
|
|
4
4
|
* @link https://github.com/mathuo/dockview
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
@@ -101,6 +101,24 @@
|
|
|
101
101
|
element.removeEventListener(type, listener);
|
|
102
102
|
},
|
|
103
103
|
};
|
|
104
|
+
}
|
|
105
|
+
class TickDelayedEvent {
|
|
106
|
+
constructor() {
|
|
107
|
+
this._onFired = new Emitter();
|
|
108
|
+
this.onEvent = this._onFired.event;
|
|
109
|
+
}
|
|
110
|
+
fire() {
|
|
111
|
+
if (this.timer) {
|
|
112
|
+
clearTimeout(this.timer);
|
|
113
|
+
}
|
|
114
|
+
this.timer = setTimeout(() => {
|
|
115
|
+
this._onFired.fire();
|
|
116
|
+
clearTimeout(this.timer);
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
dispose() {
|
|
120
|
+
this._onFired.dispose();
|
|
121
|
+
}
|
|
104
122
|
}
|
|
105
123
|
|
|
106
124
|
exports.Disposable = void 0;
|
|
@@ -345,6 +363,23 @@
|
|
|
345
363
|
get onDidLayoutChange() {
|
|
346
364
|
return this.component.onDidLayoutChange;
|
|
347
365
|
}
|
|
366
|
+
get onDidAddView() {
|
|
367
|
+
return this.component.onDidAddView;
|
|
368
|
+
}
|
|
369
|
+
get onDidRemoveView() {
|
|
370
|
+
return this.component.onDidRemoveView;
|
|
371
|
+
}
|
|
372
|
+
get onDidDrop() {
|
|
373
|
+
const emitter = new Emitter();
|
|
374
|
+
const disposable = this.component.onDidDrop((e) => {
|
|
375
|
+
emitter.fire(Object.assign(Object.assign({}, e), { api: this }));
|
|
376
|
+
});
|
|
377
|
+
emitter.dispose = () => {
|
|
378
|
+
disposable.dispose();
|
|
379
|
+
emitter.dispose();
|
|
380
|
+
};
|
|
381
|
+
return emitter.event;
|
|
382
|
+
}
|
|
348
383
|
getPanels() {
|
|
349
384
|
return this.component.getPanels();
|
|
350
385
|
}
|
|
@@ -1509,9 +1544,9 @@
|
|
|
1509
1544
|
var _a;
|
|
1510
1545
|
super();
|
|
1511
1546
|
this.paneItems = [];
|
|
1547
|
+
this.skipAnimation = false;
|
|
1512
1548
|
this._onDidChange = new Emitter();
|
|
1513
1549
|
this.onDidChange = this._onDidChange.event;
|
|
1514
|
-
this.skipAnimation = false;
|
|
1515
1550
|
this._orientation = (_a = options.orientation) !== null && _a !== void 0 ? _a : exports.Orientation.VERTICAL;
|
|
1516
1551
|
this.element = document.createElement('div');
|
|
1517
1552
|
this.element.className = 'pane-container';
|
|
@@ -1611,9 +1646,6 @@
|
|
|
1611
1646
|
}
|
|
1612
1647
|
}
|
|
1613
1648
|
layout(size, orthogonalSize) {
|
|
1614
|
-
// for (const paneItem of this.paneItems) {
|
|
1615
|
-
// paneItem.pane.orthogonalSize = orthogonalSize;
|
|
1616
|
-
// }
|
|
1617
1649
|
this.splitview.layout(size, orthogonalSize);
|
|
1618
1650
|
}
|
|
1619
1651
|
setupAnimation() {
|
|
@@ -1797,7 +1829,7 @@
|
|
|
1797
1829
|
const state = this._state;
|
|
1798
1830
|
this.removeDropTarget();
|
|
1799
1831
|
if (state) {
|
|
1800
|
-
this._onDrop.fire({ position: state,
|
|
1832
|
+
this._onDrop.fire({ position: state, nativeEvent: e });
|
|
1801
1833
|
}
|
|
1802
1834
|
},
|
|
1803
1835
|
}));
|
|
@@ -2460,7 +2492,6 @@
|
|
|
2460
2492
|
}
|
|
2461
2493
|
parent.removeChild(index, sizing);
|
|
2462
2494
|
if (parent.children.length === 0) {
|
|
2463
|
-
// throw new Error('Invalid grid state');
|
|
2464
2495
|
return node.view;
|
|
2465
2496
|
}
|
|
2466
2497
|
if (parent.children.length > 1) {
|
|
@@ -2761,7 +2792,7 @@
|
|
|
2761
2792
|
});
|
|
2762
2793
|
this.addDisposables(this.voidDropTarget.onDrop((event) => {
|
|
2763
2794
|
this._onDrop.fire({
|
|
2764
|
-
event: event.
|
|
2795
|
+
event: event.nativeEvent,
|
|
2765
2796
|
index: this.tabs.length,
|
|
2766
2797
|
});
|
|
2767
2798
|
}), this.voidDropTarget, addDisposableListener(this.tabContainer, 'mousedown', (event) => {
|
|
@@ -2883,7 +2914,7 @@
|
|
|
2883
2914
|
}
|
|
2884
2915
|
}), tabToAdd.onDrop((event) => {
|
|
2885
2916
|
this._onDrop.fire({
|
|
2886
|
-
event: event.
|
|
2917
|
+
event: event.nativeEvent,
|
|
2887
2918
|
index: this.tabs.findIndex((x) => x.value === tabToAdd),
|
|
2888
2919
|
});
|
|
2889
2920
|
}));
|
|
@@ -2959,9 +2990,9 @@
|
|
|
2959
2990
|
}), this.contentContainer.onDidFocus(() => {
|
|
2960
2991
|
this.accessor.doSetGroupActive(this.parent, true);
|
|
2961
2992
|
}), this.contentContainer.onDidBlur(() => {
|
|
2962
|
-
//
|
|
2993
|
+
// noop
|
|
2963
2994
|
}), this.dropTarget.onDrop((event) => {
|
|
2964
|
-
this.handleDropEvent(event.
|
|
2995
|
+
this.handleDropEvent(event.nativeEvent, event.position);
|
|
2965
2996
|
}));
|
|
2966
2997
|
}
|
|
2967
2998
|
get element() {
|
|
@@ -3379,11 +3410,8 @@
|
|
|
3379
3410
|
this._onGridEvent.fire({ kind: exports.GroupChangeKind.LAYOUT });
|
|
3380
3411
|
}));
|
|
3381
3412
|
this.addDisposables((() => {
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
*/
|
|
3385
|
-
let timer;
|
|
3386
|
-
return this.onGridEvent((event) => {
|
|
3413
|
+
const tickDelayedEvent = new TickDelayedEvent();
|
|
3414
|
+
return new CompositeDisposable(this.onGridEvent((event) => {
|
|
3387
3415
|
if ([
|
|
3388
3416
|
exports.GroupChangeKind.ADD_GROUP,
|
|
3389
3417
|
exports.GroupChangeKind.REMOVE_GROUP,
|
|
@@ -3393,15 +3421,11 @@
|
|
|
3393
3421
|
exports.GroupChangeKind.PANEL_ACTIVE,
|
|
3394
3422
|
exports.GroupChangeKind.LAYOUT,
|
|
3395
3423
|
].includes(event.kind)) {
|
|
3396
|
-
|
|
3397
|
-
clearTimeout(timer);
|
|
3398
|
-
}
|
|
3399
|
-
timer = setTimeout(() => {
|
|
3400
|
-
this._onDidLayoutChange.fire();
|
|
3401
|
-
clearTimeout(timer);
|
|
3402
|
-
});
|
|
3424
|
+
tickDelayedEvent.fire();
|
|
3403
3425
|
}
|
|
3404
|
-
})
|
|
3426
|
+
}), tickDelayedEvent.onEvent(() => {
|
|
3427
|
+
this._onDidLayoutChange.fire();
|
|
3428
|
+
}), tickDelayedEvent);
|
|
3405
3429
|
})());
|
|
3406
3430
|
}
|
|
3407
3431
|
get id() {
|
|
@@ -4407,7 +4431,9 @@
|
|
|
4407
4431
|
this.tab.init(params);
|
|
4408
4432
|
}
|
|
4409
4433
|
updateParentGroup(group, isPanelVisible) {
|
|
4410
|
-
|
|
4434
|
+
var _a;
|
|
4435
|
+
this._content.updateParentGroup(group, isPanelVisible);
|
|
4436
|
+
(_a = this._tab) === null || _a === void 0 ? void 0 : _a.updateParentGroup(group, isPanelVisible);
|
|
4411
4437
|
}
|
|
4412
4438
|
layout(width, height) {
|
|
4413
4439
|
this.content.layout(width, height);
|
|
@@ -6901,6 +6927,7 @@
|
|
|
6901
6927
|
exports.SplitviewPanel = SplitviewPanel;
|
|
6902
6928
|
exports.SplitviewReact = SplitviewReact;
|
|
6903
6929
|
exports.Tab = Tab$1;
|
|
6930
|
+
exports.TickDelayedEvent = TickDelayedEvent;
|
|
6904
6931
|
exports.addDisposableListener = addDisposableListener;
|
|
6905
6932
|
exports.addDisposableWindowListener = addDisposableWindowListener;
|
|
6906
6933
|
exports.extractData = extractData;
|
|
@@ -5,13 +5,14 @@ import { AddComponentOptions, IGridviewComponent, SerializedGridview } from '../
|
|
|
5
5
|
import { GridviewPanel, IGridviewPanel } from '../gridview/gridviewPanel';
|
|
6
6
|
import { IGroupPanel } from '../groupview/groupPanel';
|
|
7
7
|
import { AddPaneviewCompponentOptions, SerializedPaneview, IPaneviewComponent } from '../paneview/paneviewComponent';
|
|
8
|
-
import { IPaneviewPanel } from '../paneview/paneviewPanel';
|
|
8
|
+
import { IPaneviewPanel, PaneviewPanel } from '../paneview/paneviewPanel';
|
|
9
9
|
import { AddSplitviewComponentOptions, ISplitviewComponent, SerializedSplitview, SplitviewComponentUpdateOptions } from '../splitview/splitviewComponent';
|
|
10
10
|
import { Orientation, Sizing } from '../splitview/core/splitview';
|
|
11
11
|
import { ISplitviewPanel } from '../splitview/splitviewPanel';
|
|
12
12
|
import { GroupviewPanel } from '../groupview/groupviewPanel';
|
|
13
13
|
import { Event } from '../events';
|
|
14
14
|
import { IDisposable } from '../lifecycle';
|
|
15
|
+
import { PaneviewDropEvent } from '../react';
|
|
15
16
|
export interface CommonApi {
|
|
16
17
|
readonly height: number;
|
|
17
18
|
readonly width: number;
|
|
@@ -51,6 +52,9 @@ export declare class PaneviewApi implements CommonApi {
|
|
|
51
52
|
get minimumSize(): number;
|
|
52
53
|
get maximumSize(): number;
|
|
53
54
|
get onDidLayoutChange(): Event<void>;
|
|
55
|
+
get onDidAddView(): Event<PaneviewPanel>;
|
|
56
|
+
get onDidRemoveView(): Event<PaneviewPanel>;
|
|
57
|
+
get onDidDrop(): Event<PaneviewDropEvent>;
|
|
54
58
|
constructor(component: IPaneviewComponent);
|
|
55
59
|
getPanels(): IPaneviewPanel[];
|
|
56
60
|
removePanel(panel: IPaneviewPanel): void;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Emitter } from '../events';
|
|
1
2
|
export class SplitviewApi {
|
|
2
3
|
constructor(component) {
|
|
3
4
|
this.component = component;
|
|
@@ -82,6 +83,23 @@ export class PaneviewApi {
|
|
|
82
83
|
get onDidLayoutChange() {
|
|
83
84
|
return this.component.onDidLayoutChange;
|
|
84
85
|
}
|
|
86
|
+
get onDidAddView() {
|
|
87
|
+
return this.component.onDidAddView;
|
|
88
|
+
}
|
|
89
|
+
get onDidRemoveView() {
|
|
90
|
+
return this.component.onDidRemoveView;
|
|
91
|
+
}
|
|
92
|
+
get onDidDrop() {
|
|
93
|
+
const emitter = new Emitter();
|
|
94
|
+
const disposable = this.component.onDidDrop((e) => {
|
|
95
|
+
emitter.fire(Object.assign(Object.assign({}, e), { api: this }));
|
|
96
|
+
});
|
|
97
|
+
emitter.dispose = () => {
|
|
98
|
+
disposable.dispose();
|
|
99
|
+
emitter.dispose();
|
|
100
|
+
};
|
|
101
|
+
return emitter.event;
|
|
102
|
+
}
|
|
85
103
|
getPanels() {
|
|
86
104
|
return this.component.getPanels();
|
|
87
105
|
}
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { Event } from '../events';
|
|
2
2
|
import { CompositeDisposable } from '../lifecycle';
|
|
3
|
-
export interface DroptargetEvent {
|
|
4
|
-
position: Position;
|
|
5
|
-
event: DragEvent;
|
|
6
|
-
}
|
|
7
3
|
export declare enum Position {
|
|
8
4
|
Top = "Top",
|
|
9
5
|
Left = "Left",
|
|
@@ -13,7 +9,7 @@ export declare enum Position {
|
|
|
13
9
|
}
|
|
14
10
|
export interface DroptargetEvent {
|
|
15
11
|
position: Position;
|
|
16
|
-
|
|
12
|
+
nativeEvent: DragEvent;
|
|
17
13
|
}
|
|
18
14
|
export declare type DropTargetDirections = 'vertical' | 'horizontal' | 'all' | 'none';
|
|
19
15
|
export declare type CanDisplayOverlay = boolean | ((dragEvent: DragEvent) => boolean);
|
|
@@ -114,7 +114,7 @@ export class Droptarget extends CompositeDisposable {
|
|
|
114
114
|
const state = this._state;
|
|
115
115
|
this.removeDropTarget();
|
|
116
116
|
if (state) {
|
|
117
|
-
this._onDrop.fire({ position: state,
|
|
117
|
+
this._onDrop.fire({ position: state, nativeEvent: e });
|
|
118
118
|
}
|
|
119
119
|
},
|
|
120
120
|
}));
|
|
@@ -29,7 +29,9 @@ export class DefaultGroupPanelView {
|
|
|
29
29
|
this.tab.init(params);
|
|
30
30
|
}
|
|
31
31
|
updateParentGroup(group, isPanelVisible) {
|
|
32
|
-
|
|
32
|
+
var _a;
|
|
33
|
+
this._content.updateParentGroup(group, isPanelVisible);
|
|
34
|
+
(_a = this._tab) === null || _a === void 0 ? void 0 : _a.updateParentGroup(group, isPanelVisible);
|
|
33
35
|
}
|
|
34
36
|
layout(width, height) {
|
|
35
37
|
this.content.layout(width, height);
|
package/dist/esm/events.d.ts
CHANGED
|
@@ -21,3 +21,10 @@ export declare class Emitter<T> implements IDisposable {
|
|
|
21
21
|
}
|
|
22
22
|
export declare function addDisposableWindowListener<K extends keyof WindowEventMap>(element: Window, type: K, listener: (this: Window, ev: WindowEventMap[K]) => any, options?: boolean | AddEventListenerOptions): IDisposable;
|
|
23
23
|
export declare function addDisposableListener<K extends keyof HTMLElementEventMap>(element: HTMLElement, type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): IDisposable;
|
|
24
|
+
export declare class TickDelayedEvent implements IDisposable {
|
|
25
|
+
private timer;
|
|
26
|
+
private readonly _onFired;
|
|
27
|
+
readonly onEvent: Event<void>;
|
|
28
|
+
fire(): void;
|
|
29
|
+
dispose(): void;
|
|
30
|
+
}
|
package/dist/esm/events.js
CHANGED
|
@@ -69,3 +69,21 @@ export function addDisposableListener(element, type, listener, options) {
|
|
|
69
69
|
},
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
|
+
export class TickDelayedEvent {
|
|
73
|
+
constructor() {
|
|
74
|
+
this._onFired = new Emitter();
|
|
75
|
+
this.onEvent = this._onFired.event;
|
|
76
|
+
}
|
|
77
|
+
fire() {
|
|
78
|
+
if (this.timer) {
|
|
79
|
+
clearTimeout(this.timer);
|
|
80
|
+
}
|
|
81
|
+
this.timer = setTimeout(() => {
|
|
82
|
+
this._onFired.fire();
|
|
83
|
+
clearTimeout(this.timer);
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
dispose() {
|
|
87
|
+
this._onFired.dispose();
|
|
88
|
+
}
|
|
89
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Emitter } from '../events';
|
|
1
|
+
import { Emitter, TickDelayedEvent } from '../events';
|
|
2
2
|
import { getGridLocation, Gridview } from './gridview';
|
|
3
3
|
import { Position } from '../dnd/droptarget';
|
|
4
4
|
import { CompositeDisposable } from '../lifecycle';
|
|
@@ -52,11 +52,8 @@ export class BaseGrid extends CompositeDisposable {
|
|
|
52
52
|
this._onGridEvent.fire({ kind: GroupChangeKind.LAYOUT });
|
|
53
53
|
}));
|
|
54
54
|
this.addDisposables((() => {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
*/
|
|
58
|
-
let timer;
|
|
59
|
-
return this.onGridEvent((event) => {
|
|
55
|
+
const tickDelayedEvent = new TickDelayedEvent();
|
|
56
|
+
return new CompositeDisposable(this.onGridEvent((event) => {
|
|
60
57
|
if ([
|
|
61
58
|
GroupChangeKind.ADD_GROUP,
|
|
62
59
|
GroupChangeKind.REMOVE_GROUP,
|
|
@@ -66,15 +63,11 @@ export class BaseGrid extends CompositeDisposable {
|
|
|
66
63
|
GroupChangeKind.PANEL_ACTIVE,
|
|
67
64
|
GroupChangeKind.LAYOUT,
|
|
68
65
|
].includes(event.kind)) {
|
|
69
|
-
|
|
70
|
-
clearTimeout(timer);
|
|
71
|
-
}
|
|
72
|
-
timer = setTimeout(() => {
|
|
73
|
-
this._onDidLayoutChange.fire();
|
|
74
|
-
clearTimeout(timer);
|
|
75
|
-
});
|
|
66
|
+
tickDelayedEvent.fire();
|
|
76
67
|
}
|
|
77
|
-
})
|
|
68
|
+
}), tickDelayedEvent.onEvent(() => {
|
|
69
|
+
this._onDidLayoutChange.fire();
|
|
70
|
+
}), tickDelayedEvent);
|
|
78
71
|
})());
|
|
79
72
|
}
|
|
80
73
|
get id() {
|
|
@@ -72,9 +72,9 @@ export class Groupview extends CompositeDisposable {
|
|
|
72
72
|
}), this.contentContainer.onDidFocus(() => {
|
|
73
73
|
this.accessor.doSetGroupActive(this.parent, true);
|
|
74
74
|
}), this.contentContainer.onDidBlur(() => {
|
|
75
|
-
//
|
|
75
|
+
// noop
|
|
76
76
|
}), this.dropTarget.onDrop((event) => {
|
|
77
|
-
this.handleDropEvent(event.
|
|
77
|
+
this.handleDropEvent(event.nativeEvent, event.position);
|
|
78
78
|
}));
|
|
79
79
|
}
|
|
80
80
|
get element() {
|
|
@@ -42,7 +42,7 @@ export class TabsContainer extends CompositeDisposable {
|
|
|
42
42
|
});
|
|
43
43
|
this.addDisposables(this.voidDropTarget.onDrop((event) => {
|
|
44
44
|
this._onDrop.fire({
|
|
45
|
-
event: event.
|
|
45
|
+
event: event.nativeEvent,
|
|
46
46
|
index: this.tabs.length,
|
|
47
47
|
});
|
|
48
48
|
}), this.voidDropTarget, addDisposableListener(this.tabContainer, 'mousedown', (event) => {
|
|
@@ -164,7 +164,7 @@ export class TabsContainer extends CompositeDisposable {
|
|
|
164
164
|
}
|
|
165
165
|
}), tabToAdd.onDrop((event) => {
|
|
166
166
|
this._onDrop.fire({
|
|
167
|
-
event: event.
|
|
167
|
+
event: event.nativeEvent,
|
|
168
168
|
index: this.tabs.findIndex((x) => x.value === tabToAdd),
|
|
169
169
|
});
|
|
170
170
|
}));
|
|
@@ -12,6 +12,7 @@ export declare class Paneview extends CompositeDisposable implements IDisposable
|
|
|
12
12
|
private paneItems;
|
|
13
13
|
private _orientation;
|
|
14
14
|
private animationTimer;
|
|
15
|
+
private skipAnimation;
|
|
15
16
|
private readonly _onDidChange;
|
|
16
17
|
readonly onDidChange: Event<void>;
|
|
17
18
|
get onDidAddView(): Event<PaneviewPanel>;
|
|
@@ -29,7 +30,6 @@ export declare class Paneview extends CompositeDisposable implements IDisposable
|
|
|
29
30
|
getViewSize(index: number): number;
|
|
30
31
|
getPanes(): PaneviewPanel[];
|
|
31
32
|
removePane(index: number): PaneItem;
|
|
32
|
-
private skipAnimation;
|
|
33
33
|
moveView(from: number, to: number): void;
|
|
34
34
|
layout(size: number, orthogonalSize: number): void;
|
|
35
35
|
private setupAnimation;
|
|
@@ -7,9 +7,9 @@ export class Paneview extends CompositeDisposable {
|
|
|
7
7
|
var _a;
|
|
8
8
|
super();
|
|
9
9
|
this.paneItems = [];
|
|
10
|
+
this.skipAnimation = false;
|
|
10
11
|
this._onDidChange = new Emitter();
|
|
11
12
|
this.onDidChange = this._onDidChange.event;
|
|
12
|
-
this.skipAnimation = false;
|
|
13
13
|
this._orientation = (_a = options.orientation) !== null && _a !== void 0 ? _a : Orientation.VERTICAL;
|
|
14
14
|
this.element = document.createElement('div');
|
|
15
15
|
this.element.className = 'pane-container';
|
|
@@ -109,9 +109,6 @@ export class Paneview extends CompositeDisposable {
|
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
layout(size, orthogonalSize) {
|
|
112
|
-
// for (const paneItem of this.paneItems) {
|
|
113
|
-
// paneItem.pane.orthogonalSize = orthogonalSize;
|
|
114
|
-
// }
|
|
115
112
|
this.splitview.layout(size, orthogonalSize);
|
|
116
113
|
}
|
|
117
114
|
setupAnimation() {
|
|
@@ -63,6 +63,8 @@ export interface IPaneviewComponent extends IDisposable {
|
|
|
63
63
|
readonly height: number;
|
|
64
64
|
readonly minimumSize: number;
|
|
65
65
|
readonly maximumSize: number;
|
|
66
|
+
readonly onDidAddView: Event<PaneviewPanel>;
|
|
67
|
+
readonly onDidRemoveView: Event<PaneviewPanel>;
|
|
66
68
|
readonly onDidDrop: Event<PaneviewDropEvent2>;
|
|
67
69
|
readonly onDidLayoutChange: Event<void>;
|
|
68
70
|
addPanel(options: AddPaneviewCompponentOptions): IDisposable;
|
package/dist/styles/dockview.css
CHANGED
|
@@ -105,51 +105,6 @@
|
|
|
105
105
|
margin-right: "0.5em";
|
|
106
106
|
cursor: pointer;
|
|
107
107
|
}
|
|
108
|
-
.drop-target {
|
|
109
|
-
position: relative;
|
|
110
|
-
}
|
|
111
|
-
.drop-target > .drop-target-dropzone {
|
|
112
|
-
position: absolute;
|
|
113
|
-
left: 0px;
|
|
114
|
-
top: 0px;
|
|
115
|
-
height: 100%;
|
|
116
|
-
width: 100%;
|
|
117
|
-
z-index: 10000;
|
|
118
|
-
}
|
|
119
|
-
.drop-target > .drop-target-dropzone > .drop-target-selection {
|
|
120
|
-
position: relative;
|
|
121
|
-
pointer-events: none;
|
|
122
|
-
box-sizing: border-box;
|
|
123
|
-
height: 100%;
|
|
124
|
-
width: 100%;
|
|
125
|
-
background-color: var(--dv-drag-over-background-color);
|
|
126
|
-
transition-duration: 0.15s;
|
|
127
|
-
transition-timing-function: ease-out;
|
|
128
|
-
}
|
|
129
|
-
.drop-target > .drop-target-dropzone > .drop-target-selection.left, .drop-target > .drop-target-dropzone > .drop-target-selection.right {
|
|
130
|
-
width: 50%;
|
|
131
|
-
}
|
|
132
|
-
.drop-target > .drop-target-dropzone > .drop-target-selection.right {
|
|
133
|
-
transform: translate(100%, 0%);
|
|
134
|
-
}
|
|
135
|
-
.drop-target > .drop-target-dropzone > .drop-target-selection.bottom {
|
|
136
|
-
transform: translate(0%, 100%);
|
|
137
|
-
}
|
|
138
|
-
.drop-target > .drop-target-dropzone > .drop-target-selection.top, .drop-target > .drop-target-dropzone > .drop-target-selection.bottom {
|
|
139
|
-
height: 50%;
|
|
140
|
-
}
|
|
141
|
-
.drop-target > .drop-target-dropzone > .drop-target-selection.small-top {
|
|
142
|
-
border-top: 1px solid var(--dv-drag-over-border-color);
|
|
143
|
-
}
|
|
144
|
-
.drop-target > .drop-target-dropzone > .drop-target-selection.small-bottom {
|
|
145
|
-
border-bottom: 1px solid var(--dv-drag-over-border-color);
|
|
146
|
-
}
|
|
147
|
-
.drop-target > .drop-target-dropzone > .drop-target-selection.small-left {
|
|
148
|
-
border-left: 1px solid var(--dv-drag-over-border-color);
|
|
149
|
-
}
|
|
150
|
-
.drop-target > .drop-target-dropzone > .drop-target-selection.small-right {
|
|
151
|
-
border-right: 1px solid var(--dv-drag-over-border-color);
|
|
152
|
-
}
|
|
153
108
|
.custom-dragging {
|
|
154
109
|
height: 24px;
|
|
155
110
|
line-height: 24px;
|
|
@@ -199,6 +154,51 @@
|
|
|
199
154
|
background-color: var(--dv-activegroup-visiblepanel-tab-background-color);
|
|
200
155
|
color: var(--dv-activegroup-visiblepanel-tab-color);
|
|
201
156
|
}
|
|
157
|
+
.drop-target {
|
|
158
|
+
position: relative;
|
|
159
|
+
}
|
|
160
|
+
.drop-target > .drop-target-dropzone {
|
|
161
|
+
position: absolute;
|
|
162
|
+
left: 0px;
|
|
163
|
+
top: 0px;
|
|
164
|
+
height: 100%;
|
|
165
|
+
width: 100%;
|
|
166
|
+
z-index: 10000;
|
|
167
|
+
}
|
|
168
|
+
.drop-target > .drop-target-dropzone > .drop-target-selection {
|
|
169
|
+
position: relative;
|
|
170
|
+
pointer-events: none;
|
|
171
|
+
box-sizing: border-box;
|
|
172
|
+
height: 100%;
|
|
173
|
+
width: 100%;
|
|
174
|
+
background-color: var(--dv-drag-over-background-color);
|
|
175
|
+
transition-duration: 0.15s;
|
|
176
|
+
transition-timing-function: ease-out;
|
|
177
|
+
}
|
|
178
|
+
.drop-target > .drop-target-dropzone > .drop-target-selection.left, .drop-target > .drop-target-dropzone > .drop-target-selection.right {
|
|
179
|
+
width: 50%;
|
|
180
|
+
}
|
|
181
|
+
.drop-target > .drop-target-dropzone > .drop-target-selection.right {
|
|
182
|
+
transform: translate(100%, 0%);
|
|
183
|
+
}
|
|
184
|
+
.drop-target > .drop-target-dropzone > .drop-target-selection.bottom {
|
|
185
|
+
transform: translate(0%, 100%);
|
|
186
|
+
}
|
|
187
|
+
.drop-target > .drop-target-dropzone > .drop-target-selection.top, .drop-target > .drop-target-dropzone > .drop-target-selection.bottom {
|
|
188
|
+
height: 50%;
|
|
189
|
+
}
|
|
190
|
+
.drop-target > .drop-target-dropzone > .drop-target-selection.small-top {
|
|
191
|
+
border-top: 1px solid var(--dv-drag-over-border-color);
|
|
192
|
+
}
|
|
193
|
+
.drop-target > .drop-target-dropzone > .drop-target-selection.small-bottom {
|
|
194
|
+
border-bottom: 1px solid var(--dv-drag-over-border-color);
|
|
195
|
+
}
|
|
196
|
+
.drop-target > .drop-target-dropzone > .drop-target-selection.small-left {
|
|
197
|
+
border-left: 1px solid var(--dv-drag-over-border-color);
|
|
198
|
+
}
|
|
199
|
+
.drop-target > .drop-target-dropzone > .drop-target-selection.small-right {
|
|
200
|
+
border-right: 1px solid var(--dv-drag-over-border-color);
|
|
201
|
+
}
|
|
202
202
|
.grid-view,
|
|
203
203
|
.branch-node {
|
|
204
204
|
height: 100%;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dockview",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Zero dependency layout manager supporting tabs, grids and splitviews with ReactJS support",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"types": "./dist/cjs/index.d.ts",
|
|
@@ -64,14 +64,14 @@
|
|
|
64
64
|
"react": "^17.0.1",
|
|
65
65
|
"react-dom": "^17.0.1",
|
|
66
66
|
"rimraf": "^3.0.2",
|
|
67
|
-
"rollup": "^2.
|
|
67
|
+
"rollup": "^2.68.0",
|
|
68
68
|
"rollup-plugin-postcss": "^4.0.2",
|
|
69
69
|
"rollup-plugin-terser": "^7.0.2",
|
|
70
|
-
"typedoc": "^0.22.
|
|
70
|
+
"typedoc": "^0.22.12"
|
|
71
71
|
},
|
|
72
72
|
"peerDependencies": {
|
|
73
73
|
"react": ">=16.8.0",
|
|
74
74
|
"react-dom": ">=16.8.0"
|
|
75
75
|
},
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "6ba801550244fdf4d1b6f6de1e3197bfcd0a773b"
|
|
77
77
|
}
|