dockview 1.0.0 → 1.0.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/gridview/gridviewComponent.d.ts +2 -2
- package/dist/cjs/gridview/gridviewComponent.js.map +1 -1
- package/dist/cjs/index.d.ts +0 -1
- package/dist/cjs/index.js +0 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/react/dockview/dockview.js +16 -0
- package/dist/cjs/react/dockview/dockview.js.map +1 -1
- package/dist/cjs/react/gridview/gridview.js +8 -0
- package/dist/cjs/react/gridview/gridview.js.map +1 -1
- package/dist/cjs/react/paneview/paneview.js +8 -4
- package/dist/cjs/react/paneview/paneview.js.map +1 -1
- package/dist/cjs/react/splitview/splitview.js +8 -0
- package/dist/cjs/react/splitview/splitview.js.map +1 -1
- package/dist/cjs/splitview/splitviewComponent.d.ts +2 -2
- package/dist/cjs/splitview/splitviewComponent.js.map +1 -1
- package/dist/dockview.amd.js +41 -24
- package/dist/dockview.amd.min.js +3 -3
- package/dist/dockview.amd.min.noStyle.js +3 -3
- package/dist/dockview.amd.noStyle.js +41 -24
- package/dist/dockview.cjs.js +41 -24
- package/dist/dockview.esm.js +41 -24
- package/dist/dockview.esm.min.js +3 -3
- package/dist/dockview.js +41 -24
- package/dist/dockview.min.js +3 -3
- package/dist/dockview.min.noStyle.js +3 -3
- package/dist/dockview.noStyle.js +41 -24
- package/dist/esm/gridview/gridviewComponent.d.ts +2 -2
- package/dist/esm/index.d.ts +0 -1
- package/dist/esm/index.js +0 -1
- package/dist/esm/react/dockview/dockview.js +16 -0
- package/dist/esm/react/gridview/gridview.js +8 -0
- package/dist/esm/react/paneview/paneview.js +8 -4
- package/dist/esm/react/splitview/splitview.js +8 -0
- package/dist/esm/splitview/splitviewComponent.d.ts +2 -2
- package/package.json +7 -7
- package/dist/cjs/footnote.d.ts +0 -1
- package/dist/cjs/footnote.js +0 -20
- package/dist/cjs/footnote.js.map +0 -1
- package/dist/esm/footnote.d.ts +0 -1
- package/dist/esm/footnote.js +0 -19
package/dist/dockview.noStyle.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* dockview
|
|
3
|
-
* @version 1.0.
|
|
3
|
+
* @version 1.0.1
|
|
4
4
|
* @link https://github.com/mathuo/dockview
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
@@ -31,25 +31,6 @@
|
|
|
31
31
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
32
32
|
var ReactDOM__namespace = /*#__PURE__*/_interopNamespace(ReactDOM);
|
|
33
33
|
|
|
34
|
-
function runFootnote() {
|
|
35
|
-
var _a, _b;
|
|
36
|
-
const DOCKVIEW_SUPPRESS_WATERMARK = 'DOCKVIEW_WATERMARK_SUPPRESSED';
|
|
37
|
-
const isTest = ((_b = (_a = window.process) === null || _a === void 0 ? void 0 : _a.env) === null || _b === void 0 ? void 0 : _b.NODE_ENV) === 'test';
|
|
38
|
-
if (isTest) {
|
|
39
|
-
return; // don't spam people tests
|
|
40
|
-
}
|
|
41
|
-
const isSuppressed = !!window[DOCKVIEW_SUPPRESS_WATERMARK];
|
|
42
|
-
if (!isSuppressed) {
|
|
43
|
-
console.log([
|
|
44
|
-
'dockview: https://github.com/mathuo/dockview for examples and documentation',
|
|
45
|
-
'dockview: https://www.npmjs.com/package/dockview',
|
|
46
|
-
`dockview: To suppress this message set window.${DOCKVIEW_SUPPRESS_WATERMARK}=1 before importing the dockview package`,
|
|
47
|
-
'',
|
|
48
|
-
].join('\n'));
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
runFootnote();
|
|
52
|
-
|
|
53
34
|
exports.Event = void 0;
|
|
54
35
|
(function (Event) {
|
|
55
36
|
Event.any = (...children) => {
|
|
@@ -6524,6 +6505,22 @@
|
|
|
6524
6505
|
dockview.dispose();
|
|
6525
6506
|
};
|
|
6526
6507
|
}, []);
|
|
6508
|
+
React__namespace.useEffect(() => {
|
|
6509
|
+
if (!dockviewRef.current) {
|
|
6510
|
+
return;
|
|
6511
|
+
}
|
|
6512
|
+
dockviewRef.current.updateOptions({
|
|
6513
|
+
frameworkComponents: props.components,
|
|
6514
|
+
});
|
|
6515
|
+
}, [props.components]);
|
|
6516
|
+
React__namespace.useEffect(() => {
|
|
6517
|
+
if (!dockviewRef.current) {
|
|
6518
|
+
return;
|
|
6519
|
+
}
|
|
6520
|
+
dockviewRef.current.updateOptions({
|
|
6521
|
+
frameworkTabComponents: props.tabComponents,
|
|
6522
|
+
});
|
|
6523
|
+
}, [props.tabComponents]);
|
|
6527
6524
|
React__namespace.useEffect(() => {
|
|
6528
6525
|
if (!props.onTabContextMenu || !dockviewRef.current) {
|
|
6529
6526
|
return () => {
|
|
@@ -6658,6 +6655,14 @@
|
|
|
6658
6655
|
splitview.dispose();
|
|
6659
6656
|
};
|
|
6660
6657
|
}, []);
|
|
6658
|
+
React__namespace.useEffect(() => {
|
|
6659
|
+
if (!splitviewRef.current) {
|
|
6660
|
+
return;
|
|
6661
|
+
}
|
|
6662
|
+
splitviewRef.current.updateOptions({
|
|
6663
|
+
frameworkComponents: props.components,
|
|
6664
|
+
});
|
|
6665
|
+
}, [props.components]);
|
|
6661
6666
|
return (React__namespace.createElement("div", { className: props.className, style: { height: '100%', width: '100%' }, ref: domRef }, portals));
|
|
6662
6667
|
});
|
|
6663
6668
|
SplitviewReact.displayName = 'SplitviewComponent';
|
|
@@ -6728,6 +6733,14 @@
|
|
|
6728
6733
|
gridview.dispose();
|
|
6729
6734
|
};
|
|
6730
6735
|
}, []);
|
|
6736
|
+
React__namespace.useEffect(() => {
|
|
6737
|
+
if (!gridviewRef.current) {
|
|
6738
|
+
return;
|
|
6739
|
+
}
|
|
6740
|
+
gridviewRef.current.updateOptions({
|
|
6741
|
+
frameworkComponents: props.components,
|
|
6742
|
+
});
|
|
6743
|
+
}, [props.components]);
|
|
6731
6744
|
return (React__namespace.createElement("div", { className: props.className, style: { height: '100%', width: '100%' }, ref: domRef }, portals));
|
|
6732
6745
|
});
|
|
6733
6746
|
GridviewReact.displayName = 'GridviewComponent';
|
|
@@ -6818,14 +6831,18 @@
|
|
|
6818
6831
|
};
|
|
6819
6832
|
}, []);
|
|
6820
6833
|
React__namespace.useEffect(() => {
|
|
6821
|
-
|
|
6822
|
-
|
|
6834
|
+
if (!paneviewRef.current) {
|
|
6835
|
+
return;
|
|
6836
|
+
}
|
|
6837
|
+
paneviewRef.current.updateOptions({
|
|
6823
6838
|
frameworkComponents: props.components,
|
|
6824
6839
|
});
|
|
6825
6840
|
}, [props.components]);
|
|
6826
6841
|
React__namespace.useEffect(() => {
|
|
6827
|
-
|
|
6828
|
-
|
|
6842
|
+
if (!paneviewRef.current) {
|
|
6843
|
+
return;
|
|
6844
|
+
}
|
|
6845
|
+
paneviewRef.current.updateOptions({
|
|
6829
6846
|
headerframeworkComponents: props.headerComponents,
|
|
6830
6847
|
});
|
|
6831
6848
|
}, [props.headerComponents]);
|
|
@@ -37,7 +37,7 @@ export interface IGridPanelComponentView extends IGridPanelView {
|
|
|
37
37
|
export declare type GridviewComponentUpdateOptions = Pick<GridviewComponentOptions, 'orientation' | 'components' | 'frameworkComponents'>;
|
|
38
38
|
export interface IGridviewComponent extends IBaseGrid<GridviewPanel> {
|
|
39
39
|
readonly orientation: Orientation;
|
|
40
|
-
updateOptions(options: GridviewComponentUpdateOptions): void;
|
|
40
|
+
updateOptions(options: Partial<GridviewComponentUpdateOptions>): void;
|
|
41
41
|
addPanel(options: AddComponentOptions): void;
|
|
42
42
|
removePanel(panel: IGridviewPanel, sizing?: Sizing): void;
|
|
43
43
|
toggleVisibility(panel: IGridviewPanel): void;
|
|
@@ -61,7 +61,7 @@ export declare class GridviewComponent extends BaseGrid<GridviewPanel> implement
|
|
|
61
61
|
get deserializer(): IPanelDeserializer | undefined;
|
|
62
62
|
set deserializer(value: IPanelDeserializer | undefined);
|
|
63
63
|
constructor(element: HTMLElement, options: GridviewComponentOptions);
|
|
64
|
-
updateOptions(options: GridviewComponentUpdateOptions): void;
|
|
64
|
+
updateOptions(options: Partial<GridviewComponentUpdateOptions>): void;
|
|
65
65
|
removePanel(panel: GridviewPanel): void;
|
|
66
66
|
/**
|
|
67
67
|
* Serialize the current state of the layout
|
package/dist/esm/index.d.ts
CHANGED
package/dist/esm/index.js
CHANGED
|
@@ -77,6 +77,22 @@ export const DockviewReact = React.forwardRef((props, ref) => {
|
|
|
77
77
|
dockview.dispose();
|
|
78
78
|
};
|
|
79
79
|
}, []);
|
|
80
|
+
React.useEffect(() => {
|
|
81
|
+
if (!dockviewRef.current) {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
dockviewRef.current.updateOptions({
|
|
85
|
+
frameworkComponents: props.components,
|
|
86
|
+
});
|
|
87
|
+
}, [props.components]);
|
|
88
|
+
React.useEffect(() => {
|
|
89
|
+
if (!dockviewRef.current) {
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
dockviewRef.current.updateOptions({
|
|
93
|
+
frameworkTabComponents: props.tabComponents,
|
|
94
|
+
});
|
|
95
|
+
}, [props.tabComponents]);
|
|
80
96
|
React.useEffect(() => {
|
|
81
97
|
if (!props.onTabContextMenu || !dockviewRef.current) {
|
|
82
98
|
return () => {
|
|
@@ -53,6 +53,14 @@ export const GridviewReact = React.forwardRef((props, ref) => {
|
|
|
53
53
|
gridview.dispose();
|
|
54
54
|
};
|
|
55
55
|
}, []);
|
|
56
|
+
React.useEffect(() => {
|
|
57
|
+
if (!gridviewRef.current) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
gridviewRef.current.updateOptions({
|
|
61
|
+
frameworkComponents: props.components,
|
|
62
|
+
});
|
|
63
|
+
}, [props.components]);
|
|
56
64
|
return (React.createElement("div", { className: props.className, style: { height: '100%', width: '100%' }, ref: domRef }, portals));
|
|
57
65
|
});
|
|
58
66
|
GridviewReact.displayName = 'GridviewComponent';
|
|
@@ -55,14 +55,18 @@ export const PaneviewReact = React.forwardRef((props, ref) => {
|
|
|
55
55
|
};
|
|
56
56
|
}, []);
|
|
57
57
|
React.useEffect(() => {
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
if (!paneviewRef.current) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
paneviewRef.current.updateOptions({
|
|
60
62
|
frameworkComponents: props.components,
|
|
61
63
|
});
|
|
62
64
|
}, [props.components]);
|
|
63
65
|
React.useEffect(() => {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
+
if (!paneviewRef.current) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
paneviewRef.current.updateOptions({
|
|
66
70
|
headerframeworkComponents: props.headerComponents,
|
|
67
71
|
});
|
|
68
72
|
}, [props.headerComponents]);
|
|
@@ -50,6 +50,14 @@ export const SplitviewReact = React.forwardRef((props, ref) => {
|
|
|
50
50
|
splitview.dispose();
|
|
51
51
|
};
|
|
52
52
|
}, []);
|
|
53
|
+
React.useEffect(() => {
|
|
54
|
+
if (!splitviewRef.current) {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
splitviewRef.current.updateOptions({
|
|
58
|
+
frameworkComponents: props.components,
|
|
59
|
+
});
|
|
60
|
+
}, [props.components]);
|
|
53
61
|
return (React.createElement("div", { className: props.className, style: { height: '100%', width: '100%' }, ref: domRef }, portals));
|
|
54
62
|
});
|
|
55
63
|
SplitviewReact.displayName = 'SplitviewComponent';
|
|
@@ -42,7 +42,7 @@ export interface ISplitviewComponent extends IDisposable {
|
|
|
42
42
|
readonly width: number;
|
|
43
43
|
readonly length: number;
|
|
44
44
|
readonly orientation: Orientation;
|
|
45
|
-
updateOptions(options: SplitviewComponentUpdateOptions): void;
|
|
45
|
+
updateOptions(options: Partial<SplitviewComponentUpdateOptions>): void;
|
|
46
46
|
addPanel(options: AddSplitviewComponentOptions): void;
|
|
47
47
|
layout(width: number, height: number): void;
|
|
48
48
|
onDidLayoutChange: Event<void>;
|
|
@@ -79,7 +79,7 @@ export declare class SplitviewComponent extends CompositeDisposable implements I
|
|
|
79
79
|
get width(): number;
|
|
80
80
|
get length(): number;
|
|
81
81
|
constructor(element: HTMLElement, options: SplitviewComponentOptions);
|
|
82
|
-
updateOptions(options: SplitviewComponentUpdateOptions): void;
|
|
82
|
+
updateOptions(options: Partial<SplitviewComponentUpdateOptions>): void;
|
|
83
83
|
focus(): void;
|
|
84
84
|
movePanel(from: number, to: number): void;
|
|
85
85
|
setVisible(panel: SplitviewPanel, visible: boolean): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dockview",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
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",
|
|
@@ -56,22 +56,22 @@
|
|
|
56
56
|
"license": "MIT",
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@rollup/plugin-typescript": "^8.3.0",
|
|
59
|
-
"@testing-library/react": "^12.1.
|
|
60
|
-
"@types/react": "^17.0.
|
|
59
|
+
"@testing-library/react": "^12.1.3",
|
|
60
|
+
"@types/react": "^17.0.39",
|
|
61
61
|
"@types/react-dom": "^17.0.11",
|
|
62
62
|
"cross-env": "^7.0.3",
|
|
63
|
-
"postcss": "^8.4.
|
|
63
|
+
"postcss": "^8.4.6",
|
|
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.67.2",
|
|
68
68
|
"rollup-plugin-postcss": "^4.0.2",
|
|
69
69
|
"rollup-plugin-terser": "^7.0.2",
|
|
70
|
-
"typedoc": "^0.22.
|
|
70
|
+
"typedoc": "^0.22.11"
|
|
71
71
|
},
|
|
72
72
|
"peerDependencies": {
|
|
73
73
|
"react": ">=16.8.0",
|
|
74
74
|
"react-dom": ">=16.8.0"
|
|
75
75
|
},
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "8f49d29bdb3010ca0e8d5d84ccc50402565fd374"
|
|
77
77
|
}
|
package/dist/cjs/footnote.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
declare function runFootnote(): void;
|
package/dist/cjs/footnote.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
function runFootnote() {
|
|
3
|
-
var _a, _b;
|
|
4
|
-
var DOCKVIEW_SUPPRESS_WATERMARK = 'DOCKVIEW_WATERMARK_SUPPRESSED';
|
|
5
|
-
var isTest = ((_b = (_a = window.process) === null || _a === void 0 ? void 0 : _a.env) === null || _b === void 0 ? void 0 : _b.NODE_ENV) === 'test';
|
|
6
|
-
if (isTest) {
|
|
7
|
-
return; // don't spam people tests
|
|
8
|
-
}
|
|
9
|
-
var isSuppressed = !!window[DOCKVIEW_SUPPRESS_WATERMARK];
|
|
10
|
-
if (!isSuppressed) {
|
|
11
|
-
console.log([
|
|
12
|
-
'dockview: https://github.com/mathuo/dockview for examples and documentation',
|
|
13
|
-
'dockview: https://www.npmjs.com/package/dockview',
|
|
14
|
-
"dockview: To suppress this message set window.".concat(DOCKVIEW_SUPPRESS_WATERMARK, "=1 before importing the dockview package"),
|
|
15
|
-
'',
|
|
16
|
-
].join('\n'));
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
runFootnote();
|
|
20
|
-
//# sourceMappingURL=footnote.js.map
|
package/dist/cjs/footnote.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"footnote.js","sourceRoot":"","sources":["../../src/footnote.ts"],"names":[],"mappings":";AAAA,SAAS,WAAW;;IAChB,IAAM,2BAA2B,GAAG,+BAA+B,CAAC;IAEpE,IAAM,MAAM,GAAG,CAAA,MAAA,MAAC,MAAc,CAAC,OAAO,0CAAE,GAAG,0CAAE,QAAQ,MAAK,MAAM,CAAC;IAEjE,IAAI,MAAM,EAAE;QACR,OAAO,CAAC,0BAA0B;KACrC;IAED,IAAM,YAAY,GAAG,CAAC,CAAE,MAAc,CAAC,2BAA2B,CAAC,CAAC;IAEpE,IAAI,CAAC,YAAY,EAAE;QACf,OAAO,CAAC,GAAG,CACP;YACI,6EAA6E;YAC7E,kDAAkD;YAClD,wDAAiD,2BAA2B,6CAA0C;YACtH,EAAE;SACL,CAAC,IAAI,CAAC,IAAI,CAAC,CACf,CAAC;KACL;AACL,CAAC;AAED,WAAW,EAAE,CAAC"}
|
package/dist/esm/footnote.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
declare function runFootnote(): void;
|
package/dist/esm/footnote.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
function runFootnote() {
|
|
3
|
-
var _a, _b;
|
|
4
|
-
const DOCKVIEW_SUPPRESS_WATERMARK = 'DOCKVIEW_WATERMARK_SUPPRESSED';
|
|
5
|
-
const isTest = ((_b = (_a = window.process) === null || _a === void 0 ? void 0 : _a.env) === null || _b === void 0 ? void 0 : _b.NODE_ENV) === 'test';
|
|
6
|
-
if (isTest) {
|
|
7
|
-
return; // don't spam people tests
|
|
8
|
-
}
|
|
9
|
-
const isSuppressed = !!window[DOCKVIEW_SUPPRESS_WATERMARK];
|
|
10
|
-
if (!isSuppressed) {
|
|
11
|
-
console.log([
|
|
12
|
-
'dockview: https://github.com/mathuo/dockview for examples and documentation',
|
|
13
|
-
'dockview: https://www.npmjs.com/package/dockview',
|
|
14
|
-
`dockview: To suppress this message set window.${DOCKVIEW_SUPPRESS_WATERMARK}=1 before importing the dockview package`,
|
|
15
|
-
'',
|
|
16
|
-
].join('\n'));
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
runFootnote();
|