dockview 1.15.3 → 1.16.1
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/dockview/dockview.js +5 -6
- package/dist/cjs/gridview/gridview.js +5 -6
- package/dist/cjs/paneview/paneview.js +7 -9
- package/dist/cjs/splitview/splitview.js +5 -6
- package/dist/dockview.amd.js +323 -125
- package/dist/dockview.amd.js.map +1 -1
- package/dist/dockview.amd.min.js +2 -2
- package/dist/dockview.amd.min.js.map +1 -1
- package/dist/dockview.amd.min.noStyle.js +2 -2
- package/dist/dockview.amd.min.noStyle.js.map +1 -1
- package/dist/dockview.amd.noStyle.js +322 -124
- package/dist/dockview.amd.noStyle.js.map +1 -1
- package/dist/dockview.cjs.js +323 -125
- package/dist/dockview.cjs.js.map +1 -1
- package/dist/dockview.esm.js +320 -126
- package/dist/dockview.esm.js.map +1 -1
- package/dist/dockview.esm.min.js +2 -2
- package/dist/dockview.esm.min.js.map +1 -1
- package/dist/dockview.js +323 -125
- package/dist/dockview.js.map +1 -1
- package/dist/dockview.min.js +2 -2
- package/dist/dockview.min.js.map +1 -1
- package/dist/dockview.min.noStyle.js +2 -2
- package/dist/dockview.min.noStyle.js.map +1 -1
- package/dist/dockview.noStyle.js +322 -124
- package/dist/dockview.noStyle.js.map +1 -1
- package/dist/esm/dockview/dockview.js +6 -7
- package/dist/esm/gridview/gridview.js +6 -7
- package/dist/esm/paneview/paneview.js +8 -10
- package/dist/esm/splitview/splitview.js +6 -7
- package/dist/styles/dockview.css +78 -82
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { PROPERTY_KEYS, createDockview, } from 'dockview-core';
|
|
3
3
|
import { ReactPanelContentPart } from './reactContentPart';
|
|
4
4
|
import { ReactPanelHeaderPart } from './reactHeaderPart';
|
|
5
5
|
import { usePortalsLifecycle } from '../react';
|
|
@@ -76,20 +76,19 @@ export const DockviewReact = React.forwardRef((props, ref) => {
|
|
|
76
76
|
});
|
|
77
77
|
}
|
|
78
78
|
: undefined,
|
|
79
|
-
parentElement: domRef.current,
|
|
80
79
|
defaultTabComponent: props.defaultTabComponent
|
|
81
80
|
? DEFAULT_REACT_TAB
|
|
82
81
|
: undefined,
|
|
83
82
|
};
|
|
84
|
-
const
|
|
83
|
+
const api = createDockview(domRef.current, Object.assign(Object.assign({}, extractCoreOptions(props)), frameworkOptions));
|
|
85
84
|
const { clientWidth, clientHeight } = domRef.current;
|
|
86
|
-
|
|
85
|
+
api.layout(clientWidth, clientHeight);
|
|
87
86
|
if (props.onReady) {
|
|
88
|
-
props.onReady({ api
|
|
87
|
+
props.onReady({ api });
|
|
89
88
|
}
|
|
90
|
-
dockviewRef.current =
|
|
89
|
+
dockviewRef.current = api;
|
|
91
90
|
return () => {
|
|
92
|
-
|
|
91
|
+
api.dispose();
|
|
93
92
|
};
|
|
94
93
|
}, []);
|
|
95
94
|
React.useEffect(() => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Orientation, createGridview, } from 'dockview-core';
|
|
3
3
|
import { ReactGridPanelView } from './view';
|
|
4
4
|
import { usePortalsLifecycle } from '../react';
|
|
5
5
|
export const GridviewReact = React.forwardRef((props, ref) => {
|
|
@@ -14,8 +14,7 @@ export const GridviewReact = React.forwardRef((props, ref) => {
|
|
|
14
14
|
// noop
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
|
-
const
|
|
18
|
-
parentElement: domRef.current,
|
|
17
|
+
const api = createGridview(domRef.current, {
|
|
19
18
|
disableAutoResizing: props.disableAutoResizing,
|
|
20
19
|
proportionalLayout: typeof props.proportionalLayout === 'boolean'
|
|
21
20
|
? props.proportionalLayout
|
|
@@ -34,13 +33,13 @@ export const GridviewReact = React.forwardRef((props, ref) => {
|
|
|
34
33
|
: undefined,
|
|
35
34
|
});
|
|
36
35
|
const { clientWidth, clientHeight } = domRef.current;
|
|
37
|
-
|
|
36
|
+
api.layout(clientWidth, clientHeight);
|
|
38
37
|
if (props.onReady) {
|
|
39
|
-
props.onReady({ api
|
|
38
|
+
props.onReady({ api });
|
|
40
39
|
}
|
|
41
|
-
gridviewRef.current =
|
|
40
|
+
gridviewRef.current = api;
|
|
42
41
|
return () => {
|
|
43
|
-
|
|
42
|
+
api.dispose();
|
|
44
43
|
};
|
|
45
44
|
}, []);
|
|
46
45
|
React.useEffect(() => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { createPaneview, } from 'dockview-core';
|
|
3
3
|
import { usePortalsLifecycle } from '../react';
|
|
4
4
|
import { PanePanelSection } from './view';
|
|
5
5
|
export const PaneviewReact = React.forwardRef((props, ref) => {
|
|
@@ -11,8 +11,7 @@ export const PaneviewReact = React.forwardRef((props, ref) => {
|
|
|
11
11
|
const createComponent = (id, _componentId, component) => new PanePanelSection(id, component, {
|
|
12
12
|
addPortal,
|
|
13
13
|
});
|
|
14
|
-
const
|
|
15
|
-
parentElement: domRef.current,
|
|
14
|
+
const api = createPaneview(domRef.current, {
|
|
16
15
|
disableAutoResizing: props.disableAutoResizing,
|
|
17
16
|
frameworkComponents: props.components,
|
|
18
17
|
components: {},
|
|
@@ -29,15 +28,14 @@ export const PaneviewReact = React.forwardRef((props, ref) => {
|
|
|
29
28
|
},
|
|
30
29
|
showDndOverlay: props.showDndOverlay,
|
|
31
30
|
});
|
|
32
|
-
const api = new PaneviewApi(paneview);
|
|
33
31
|
const { clientWidth, clientHeight } = domRef.current;
|
|
34
|
-
|
|
32
|
+
api.layout(clientWidth, clientHeight);
|
|
35
33
|
if (props.onReady) {
|
|
36
34
|
props.onReady({ api });
|
|
37
35
|
}
|
|
38
|
-
paneviewRef.current =
|
|
36
|
+
paneviewRef.current = api;
|
|
39
37
|
return () => {
|
|
40
|
-
|
|
38
|
+
api.dispose();
|
|
41
39
|
};
|
|
42
40
|
}, []);
|
|
43
41
|
React.useEffect(() => {
|
|
@@ -62,10 +60,10 @@ export const PaneviewReact = React.forwardRef((props, ref) => {
|
|
|
62
60
|
//
|
|
63
61
|
};
|
|
64
62
|
}
|
|
65
|
-
const
|
|
66
|
-
const disposable =
|
|
63
|
+
const api = paneviewRef.current;
|
|
64
|
+
const disposable = api.onDidDrop((event) => {
|
|
67
65
|
if (props.onDidDrop) {
|
|
68
|
-
props.onDidDrop(Object.assign(Object.assign({}, event), { api
|
|
66
|
+
props.onDidDrop(Object.assign(Object.assign({}, event), { api }));
|
|
69
67
|
}
|
|
70
68
|
});
|
|
71
69
|
return () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Orientation, createSplitview, } from 'dockview-core';
|
|
3
3
|
import { usePortalsLifecycle } from '../react';
|
|
4
4
|
import { ReactPanelView } from './view';
|
|
5
5
|
export const SplitviewReact = React.forwardRef((props, ref) => {
|
|
@@ -9,8 +9,7 @@ export const SplitviewReact = React.forwardRef((props, ref) => {
|
|
|
9
9
|
React.useImperativeHandle(ref, () => domRef.current, []);
|
|
10
10
|
React.useEffect(() => {
|
|
11
11
|
var _a;
|
|
12
|
-
const
|
|
13
|
-
parentElement: domRef.current,
|
|
12
|
+
const api = createSplitview(domRef.current, {
|
|
14
13
|
disableAutoResizing: props.disableAutoResizing,
|
|
15
14
|
orientation: (_a = props.orientation) !== null && _a !== void 0 ? _a : Orientation.HORIZONTAL,
|
|
16
15
|
frameworkComponents: props.components,
|
|
@@ -29,13 +28,13 @@ export const SplitviewReact = React.forwardRef((props, ref) => {
|
|
|
29
28
|
: undefined,
|
|
30
29
|
});
|
|
31
30
|
const { clientWidth, clientHeight } = domRef.current;
|
|
32
|
-
|
|
31
|
+
api.layout(clientWidth, clientHeight);
|
|
33
32
|
if (props.onReady) {
|
|
34
|
-
props.onReady({ api
|
|
33
|
+
props.onReady({ api });
|
|
35
34
|
}
|
|
36
|
-
splitviewRef.current =
|
|
35
|
+
splitviewRef.current = api;
|
|
37
36
|
return () => {
|
|
38
|
-
|
|
37
|
+
api.dispose();
|
|
39
38
|
};
|
|
40
39
|
}, []);
|
|
41
40
|
React.useEffect(() => {
|
package/dist/styles/dockview.css
CHANGED
|
@@ -1,16 +1,3 @@
|
|
|
1
|
-
.dv-render-overlay {
|
|
2
|
-
position: absolute;
|
|
3
|
-
z-index: 1;
|
|
4
|
-
height: 100%;
|
|
5
|
-
}
|
|
6
|
-
.dv-render-overlay.dv-render-overlay-float {
|
|
7
|
-
z-index: 999;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.dv-debug .dv-render-overlay {
|
|
11
|
-
outline: 1px solid red;
|
|
12
|
-
outline-offset: -1;
|
|
13
|
-
}
|
|
14
1
|
.dockview-svg {
|
|
15
2
|
display: inline-block;
|
|
16
3
|
fill: currentcolor;
|
|
@@ -257,7 +244,7 @@
|
|
|
257
244
|
.dockview-theme-replit .groupview.inactive-group {
|
|
258
245
|
border: 1px solid transparent;
|
|
259
246
|
}
|
|
260
|
-
.dockview-theme-replit .vertical > .sash-container > .sash::after {
|
|
247
|
+
.dockview-theme-replit .vertical > .sash-container > .sash:not(.disabled)::after {
|
|
261
248
|
content: "";
|
|
262
249
|
height: 4px;
|
|
263
250
|
width: 40px;
|
|
@@ -268,10 +255,10 @@
|
|
|
268
255
|
background-color: var(--dv-separator-handle-background-color);
|
|
269
256
|
position: absolute;
|
|
270
257
|
}
|
|
271
|
-
.dockview-theme-replit .vertical > .sash-container > .sash:hover::after {
|
|
258
|
+
.dockview-theme-replit .vertical > .sash-container > .sash:not(.disabled):hover::after {
|
|
272
259
|
background-color: var(--dv-separator-handle-hover-background-color);
|
|
273
260
|
}
|
|
274
|
-
.dockview-theme-replit .horizontal > .sash-container > .sash::after {
|
|
261
|
+
.dockview-theme-replit .horizontal > .sash-container > .sash:not(.disabled)::after {
|
|
275
262
|
content: "";
|
|
276
263
|
height: 40px;
|
|
277
264
|
width: 4px;
|
|
@@ -282,7 +269,7 @@
|
|
|
282
269
|
background-color: var(--dv-separator-handle-background-color);
|
|
283
270
|
position: absolute;
|
|
284
271
|
}
|
|
285
|
-
.dockview-theme-replit .horizontal > .sash-container > .sash:hover::after {
|
|
272
|
+
.dockview-theme-replit .horizontal > .sash-container > .sash:not(.disabled):hover::after {
|
|
286
273
|
background-color: var(--dv-separator-handle-hover-background-color);
|
|
287
274
|
}
|
|
288
275
|
.drop-target {
|
|
@@ -319,6 +306,74 @@
|
|
|
319
306
|
.drop-target > .drop-target-dropzone > .drop-target-selection.dv-drop-target-right.dv-drop-target-small-horizontal {
|
|
320
307
|
border-right: 1px solid var(--dv-drag-over-border-color);
|
|
321
308
|
}
|
|
309
|
+
.dv-dockview {
|
|
310
|
+
position: relative;
|
|
311
|
+
background-color: var(--dv-group-view-background-color);
|
|
312
|
+
}
|
|
313
|
+
.dv-dockview .dv-watermark-container {
|
|
314
|
+
position: absolute;
|
|
315
|
+
top: 0px;
|
|
316
|
+
left: 0px;
|
|
317
|
+
height: 100%;
|
|
318
|
+
width: 100%;
|
|
319
|
+
z-index: 1;
|
|
320
|
+
}
|
|
321
|
+
.dv-dockview .dv-overlay-render-container {
|
|
322
|
+
position: relative;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
.groupview.active-group > .tabs-and-actions-container > .tabs-container > .tab.active-tab {
|
|
326
|
+
background-color: var(--dv-activegroup-visiblepanel-tab-background-color);
|
|
327
|
+
color: var(--dv-activegroup-visiblepanel-tab-color);
|
|
328
|
+
}
|
|
329
|
+
.groupview.active-group > .tabs-and-actions-container > .tabs-container > .tab.inactive-tab {
|
|
330
|
+
background-color: var(--dv-activegroup-hiddenpanel-tab-background-color);
|
|
331
|
+
color: var(--dv-activegroup-hiddenpanel-tab-color);
|
|
332
|
+
}
|
|
333
|
+
.groupview.inactive-group > .tabs-and-actions-container > .tabs-container > .tab.active-tab {
|
|
334
|
+
background-color: var(--dv-inactivegroup-visiblepanel-tab-background-color);
|
|
335
|
+
color: var(--dv-inactivegroup-visiblepanel-tab-color);
|
|
336
|
+
}
|
|
337
|
+
.groupview.inactive-group > .tabs-and-actions-container > .tabs-container > .tab.inactive-tab {
|
|
338
|
+
background-color: var(--dv-inactivegroup-hiddenpanel-tab-background-color);
|
|
339
|
+
color: var(--dv-inactivegroup-hiddenpanel-tab-color);
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
/**
|
|
343
|
+
* when a tab is dragged we lose the above stylings because they are conditional on parent elements
|
|
344
|
+
* therefore we also set some stylings for the dragging event
|
|
345
|
+
**/
|
|
346
|
+
.tab.dv-tab-dragging {
|
|
347
|
+
background-color: var(--dv-activegroup-visiblepanel-tab-background-color);
|
|
348
|
+
color: var(--dv-activegroup-visiblepanel-tab-color);
|
|
349
|
+
}
|
|
350
|
+
.groupview {
|
|
351
|
+
display: flex;
|
|
352
|
+
flex-direction: column;
|
|
353
|
+
height: 100%;
|
|
354
|
+
background-color: var(--dv-group-view-background-color);
|
|
355
|
+
overflow: hidden;
|
|
356
|
+
}
|
|
357
|
+
.groupview:focus {
|
|
358
|
+
outline: none;
|
|
359
|
+
}
|
|
360
|
+
.groupview.empty > .tabs-and-actions-container {
|
|
361
|
+
display: none;
|
|
362
|
+
}
|
|
363
|
+
.groupview > .content-container {
|
|
364
|
+
flex-grow: 1;
|
|
365
|
+
min-height: 0;
|
|
366
|
+
outline: none;
|
|
367
|
+
}
|
|
368
|
+
.dv-root-wrapper {
|
|
369
|
+
height: 100%;
|
|
370
|
+
width: 100%;
|
|
371
|
+
}
|
|
372
|
+
.grid-view,
|
|
373
|
+
.branch-node {
|
|
374
|
+
height: 100%;
|
|
375
|
+
width: 100%;
|
|
376
|
+
}
|
|
322
377
|
.dv-debug .dv-resize-container .dv-resize-handle-top {
|
|
323
378
|
background-color: red;
|
|
324
379
|
}
|
|
@@ -344,9 +399,6 @@
|
|
|
344
399
|
border: 1px solid var(--dv-tab-divider-color);
|
|
345
400
|
box-shadow: var(--dv-floating-box-shadow);
|
|
346
401
|
}
|
|
347
|
-
.dv-resize-container.dv-bring-to-front {
|
|
348
|
-
z-index: 998;
|
|
349
|
-
}
|
|
350
402
|
.dv-resize-container.dv-resize-container-dragging {
|
|
351
403
|
opacity: 0.5;
|
|
352
404
|
}
|
|
@@ -422,73 +474,17 @@
|
|
|
422
474
|
position: absolute;
|
|
423
475
|
cursor: se-resize;
|
|
424
476
|
}
|
|
425
|
-
.dv-
|
|
426
|
-
position: relative;
|
|
427
|
-
background-color: var(--dv-group-view-background-color);
|
|
428
|
-
}
|
|
429
|
-
.dv-dockview .dv-watermark-container {
|
|
477
|
+
.dv-render-overlay {
|
|
430
478
|
position: absolute;
|
|
431
|
-
top: 0px;
|
|
432
|
-
left: 0px;
|
|
433
|
-
height: 100%;
|
|
434
|
-
width: 100%;
|
|
435
479
|
z-index: 1;
|
|
436
|
-
}
|
|
437
|
-
.dv-dockview .dv-overlay-render-container {
|
|
438
|
-
position: relative;
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
.groupview.active-group > .tabs-and-actions-container > .tabs-container > .tab.active-tab {
|
|
442
|
-
background-color: var(--dv-activegroup-visiblepanel-tab-background-color);
|
|
443
|
-
color: var(--dv-activegroup-visiblepanel-tab-color);
|
|
444
|
-
}
|
|
445
|
-
.groupview.active-group > .tabs-and-actions-container > .tabs-container > .tab.inactive-tab {
|
|
446
|
-
background-color: var(--dv-activegroup-hiddenpanel-tab-background-color);
|
|
447
|
-
color: var(--dv-activegroup-hiddenpanel-tab-color);
|
|
448
|
-
}
|
|
449
|
-
.groupview.inactive-group > .tabs-and-actions-container > .tabs-container > .tab.active-tab {
|
|
450
|
-
background-color: var(--dv-inactivegroup-visiblepanel-tab-background-color);
|
|
451
|
-
color: var(--dv-inactivegroup-visiblepanel-tab-color);
|
|
452
|
-
}
|
|
453
|
-
.groupview.inactive-group > .tabs-and-actions-container > .tabs-container > .tab.inactive-tab {
|
|
454
|
-
background-color: var(--dv-inactivegroup-hiddenpanel-tab-background-color);
|
|
455
|
-
color: var(--dv-inactivegroup-hiddenpanel-tab-color);
|
|
456
|
-
}
|
|
457
|
-
|
|
458
|
-
/**
|
|
459
|
-
* when a tab is dragged we lose the above stylings because they are conditional on parent elements
|
|
460
|
-
* therefore we also set some stylings for the dragging event
|
|
461
|
-
**/
|
|
462
|
-
.tab.dv-tab-dragging {
|
|
463
|
-
background-color: var(--dv-activegroup-visiblepanel-tab-background-color);
|
|
464
|
-
color: var(--dv-activegroup-visiblepanel-tab-color);
|
|
465
|
-
}
|
|
466
|
-
.groupview {
|
|
467
|
-
display: flex;
|
|
468
|
-
flex-direction: column;
|
|
469
480
|
height: 100%;
|
|
470
|
-
background-color: var(--dv-group-view-background-color);
|
|
471
|
-
overflow: hidden;
|
|
472
481
|
}
|
|
473
|
-
.
|
|
474
|
-
|
|
475
|
-
}
|
|
476
|
-
.groupview.empty > .tabs-and-actions-container {
|
|
477
|
-
display: none;
|
|
478
|
-
}
|
|
479
|
-
.groupview > .content-container {
|
|
480
|
-
flex-grow: 1;
|
|
481
|
-
min-height: 0;
|
|
482
|
-
outline: none;
|
|
483
|
-
}
|
|
484
|
-
.dv-root-wrapper {
|
|
485
|
-
height: 100%;
|
|
486
|
-
width: 100%;
|
|
482
|
+
.dv-render-overlay.dv-render-overlay-float {
|
|
483
|
+
z-index: 998;
|
|
487
484
|
}
|
|
488
|
-
.
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
width: 100%;
|
|
485
|
+
.dv-debug .dv-render-overlay {
|
|
486
|
+
outline: 1px solid red;
|
|
487
|
+
outline-offset: -1;
|
|
492
488
|
}
|
|
493
489
|
.pane-container {
|
|
494
490
|
height: 100%;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dockview",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.16.1",
|
|
4
4
|
"description": "Zero dependency layout manager supporting tabs, grids and splitviews",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"splitview",
|
|
@@ -54,6 +54,6 @@
|
|
|
54
54
|
"test:cov": "cross-env ../../node_modules/.bin/jest --selectProjects dockview --coverage"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"dockview-core": "^1.
|
|
57
|
+
"dockview-core": "^1.16.1"
|
|
58
58
|
}
|
|
59
59
|
}
|