dockview-react 7.0.3 → 8.0.0
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/LICENCE.md +21 -0
- package/README.md +21 -16
- package/dist/cjs/dockview/reactContextMenuItemPart.d.ts +10 -3
- package/dist/cjs/index.d.ts +2 -2
- package/dist/cjs/svg.d.ts +1 -0
- package/dist/dockview-react.js +19172 -21736
- package/dist/dockview-react.min.js +4142 -22
- package/dist/package/main.cjs.js +960 -986
- package/dist/package/main.cjs.min.js +6 -6
- package/dist/package/main.esm.min.mjs +6 -6
- package/dist/package/main.esm.mjs +926 -977
- package/dist/styles/dockview.css +3098 -2400
- package/package.json +91 -85
- package/dist/cjs/dockview/defaultTab.js +0 -99
- package/dist/cjs/dockview/dockview.js +0 -285
- package/dist/cjs/dockview/headerActionsRenderer.js +0 -86
- package/dist/cjs/dockview/reactContentPart.js +0 -52
- package/dist/cjs/dockview/reactContextMenuItemPart.js +0 -31
- package/dist/cjs/dockview/reactGroupDragGhostPart.js +0 -32
- package/dist/cjs/dockview/reactHeaderPart.js +0 -46
- package/dist/cjs/dockview/reactTabGroupChipPart.js +0 -36
- package/dist/cjs/dockview/reactWatermarkPart.js +0 -47
- package/dist/cjs/gridview/gridview.js +0 -105
- package/dist/cjs/gridview/view.js +0 -41
- package/dist/cjs/index.js +0 -24
- package/dist/cjs/paneview/paneview.js +0 -137
- package/dist/cjs/paneview/view.js +0 -44
- package/dist/cjs/react.js +0 -183
- package/dist/cjs/splitview/splitview.js +0 -105
- package/dist/cjs/splitview/view.js +0 -39
- package/dist/cjs/svg.js +0 -15
- package/dist/cjs/types.js +0 -2
- package/dist/dockview-react.min.js.map +0 -1
- package/dist/esm/dockview/defaultTab.d.ts +0 -7
- package/dist/esm/dockview/defaultTab.js +0 -65
- package/dist/esm/dockview/dockview.d.ts +0 -33
- package/dist/esm/dockview/dockview.js +0 -252
- package/dist/esm/dockview/headerActionsRenderer.d.ts +0 -24
- package/dist/esm/dockview/headerActionsRenderer.js +0 -72
- package/dist/esm/dockview/reactContentPart.d.ts +0 -21
- package/dist/esm/dockview/reactContentPart.js +0 -43
- package/dist/esm/dockview/reactContextMenuItemPart.d.ts +0 -14
- package/dist/esm/dockview/reactContextMenuItemPart.js +0 -22
- package/dist/esm/dockview/reactGroupDragGhostPart.d.ts +0 -20
- package/dist/esm/dockview/reactGroupDragGhostPart.js +0 -23
- package/dist/esm/dockview/reactHeaderPart.d.ts +0 -17
- package/dist/esm/dockview/reactHeaderPart.js +0 -37
- package/dist/esm/dockview/reactTabGroupChipPart.d.ts +0 -23
- package/dist/esm/dockview/reactTabGroupChipPart.js +0 -27
- package/dist/esm/dockview/reactWatermarkPart.d.ts +0 -18
- package/dist/esm/dockview/reactWatermarkPart.js +0 -38
- package/dist/esm/gridview/gridview.d.ts +0 -17
- package/dist/esm/gridview/gridview.js +0 -72
- package/dist/esm/gridview/view.d.ts +0 -9
- package/dist/esm/gridview/view.js +0 -19
- package/dist/esm/index.d.ts +0 -10
- package/dist/esm/index.js +0 -8
- package/dist/esm/paneview/paneview.d.ts +0 -20
- package/dist/esm/paneview/paneview.js +0 -104
- package/dist/esm/paneview/view.d.ts +0 -19
- package/dist/esm/paneview/view.js +0 -35
- package/dist/esm/react.d.ts +0 -35
- package/dist/esm/react.js +0 -134
- package/dist/esm/splitview/splitview.d.ts +0 -17
- package/dist/esm/splitview/splitview.js +0 -72
- package/dist/esm/splitview/view.d.ts +0 -9
- package/dist/esm/splitview/view.js +0 -17
- package/dist/esm/svg.d.ts +0 -3
- package/dist/esm/svg.js +0 -7
- package/dist/esm/types.d.ts +0 -4
- package/dist/esm/types.js +0 -1
package/LICENCE.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021 mathuo
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,22 +1,26 @@
|
|
|
1
1
|
<div align="center">
|
|
2
|
+
|
|
3
|
+
<picture>
|
|
4
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/dockview/dockview/blob/HEAD/static/img/dockview-lockup-dark.svg?raw=true">
|
|
5
|
+
<img src="https://github.com/dockview/dockview/blob/HEAD/static/img/dockview-lockup-light.svg?raw=true" alt="Dockview" width="480">
|
|
6
|
+
</picture>
|
|
7
|
+
|
|
2
8
|
<h1>dockview-react</h1>
|
|
3
9
|
|
|
4
|
-
<p>React bindings for dockview
|
|
10
|
+
<p>React bindings for dockview, a zero dependency layout manager supporting tabs, groups, grids and splitviews</p>
|
|
11
|
+
|
|
12
|
+
[](https://www.npmjs.com/package/dockview-react)
|
|
13
|
+
[](https://www.npmjs.com/package/dockview-react)
|
|
14
|
+
[](https://github.com/dockview/dockview/actions?query=workflow%3ACI)
|
|
15
|
+
[](https://sonarcloud.io/summary/overall?id=dockview_dockview)
|
|
16
|
+
[](https://sonarcloud.io/summary/overall?id=dockview_dockview)
|
|
17
|
+
[](https://bundlephobia.com/result?p=dockview-react)
|
|
5
18
|
|
|
6
19
|
</div>
|
|
7
20
|
|
|
8
21
|
---
|
|
9
22
|
|
|
10
|
-
|
|
11
|
-
[](https://www.npmjs.com/package/dockview-react)
|
|
12
|
-
[](https://github.com/mathuo/dockview/actions?query=workflow%3ACI)
|
|
13
|
-
[](https://sonarcloud.io/summary/overall?id=mathuo_dockview)
|
|
14
|
-
[](https://sonarcloud.io/summary/overall?id=mathuo_dockview)
|
|
15
|
-
[](https://bundlephobia.com/result?p=dockview-react)
|
|
16
|
-
|
|
17
|
-
##
|
|
18
|
-
|
|
19
|
-

|
|
23
|
+

|
|
20
24
|
|
|
21
25
|
Please see the website: https://dockview.dev
|
|
22
26
|
|
|
@@ -36,11 +40,11 @@ Please see the website: https://dockview.dev
|
|
|
36
40
|
- High test coverage
|
|
37
41
|
- Documentation website with live examples
|
|
38
42
|
- Transparent builds and Code Analysis
|
|
39
|
-
- Security
|
|
43
|
+
- Security in mind - verified publishing and builds through GitHub Actions
|
|
40
44
|
|
|
41
45
|
## Quick Start
|
|
42
46
|
|
|
43
|
-
Dockview has a peer dependency on `react
|
|
47
|
+
Dockview has a peer dependency on `react` and `react-dom`, versions 16.8 to 19. Install from [npm](https://www.npmjs.com/package/dockview-react):
|
|
44
48
|
|
|
45
49
|
```
|
|
46
50
|
npm install dockview-react
|
|
@@ -52,10 +56,10 @@ Import the stylesheet:
|
|
|
52
56
|
@import 'dockview-react/dist/styles/dockview.css';
|
|
53
57
|
```
|
|
54
58
|
|
|
55
|
-
|
|
59
|
+
Pass a theme and render the component:
|
|
56
60
|
|
|
57
61
|
```tsx
|
|
58
|
-
import { DockviewReact } from 'dockview-react';
|
|
62
|
+
import { DockviewReact, themeDark } from 'dockview-react';
|
|
59
63
|
|
|
60
64
|
const components = {
|
|
61
65
|
myComponent: (props) => <div>Hello World</div>,
|
|
@@ -63,8 +67,9 @@ const components = {
|
|
|
63
67
|
|
|
64
68
|
function App() {
|
|
65
69
|
return (
|
|
66
|
-
<div
|
|
70
|
+
<div style={{ height: '400px' }}>
|
|
67
71
|
<DockviewReact
|
|
72
|
+
theme={themeDark}
|
|
68
73
|
components={components}
|
|
69
74
|
onReady={(event) => {
|
|
70
75
|
event.api.addPanel({
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ReactPortalStore } from '../react';
|
|
3
|
-
import { IContextMenuItemRenderer, IContextMenuItemComponentProps } from 'dockview';
|
|
3
|
+
import { IContextMenuItemRenderer, IContextMenuItemComponentProps, IChipContextMenuItemComponentProps } from 'dockview';
|
|
4
|
+
/**
|
|
5
|
+
* The same renderer serves both the tab context menu (props carry a `panel`)
|
|
6
|
+
* and the tab group chip context menu (props carry a `tabGroup`), so it accepts
|
|
7
|
+
* either prop shape.
|
|
8
|
+
*/
|
|
9
|
+
type ContextMenuItemProps = IContextMenuItemComponentProps | IChipContextMenuItemComponentProps;
|
|
4
10
|
export declare class ReactContextMenuItemPart implements IContextMenuItemRenderer {
|
|
5
11
|
readonly id: string;
|
|
6
12
|
private readonly component;
|
|
@@ -8,7 +14,8 @@ export declare class ReactContextMenuItemPart implements IContextMenuItemRendere
|
|
|
8
14
|
private readonly _element;
|
|
9
15
|
private part?;
|
|
10
16
|
get element(): HTMLElement;
|
|
11
|
-
constructor(id: string, component: React.FunctionComponent<
|
|
12
|
-
init(props:
|
|
17
|
+
constructor(id: string, component: React.FunctionComponent<ContextMenuItemProps>, reactPortalStore: ReactPortalStore);
|
|
18
|
+
init(props: ContextMenuItemProps): void;
|
|
13
19
|
dispose(): void;
|
|
14
20
|
}
|
|
21
|
+
export {};
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export * from 'dockview';
|
|
2
2
|
export * from './dockview/dockview';
|
|
3
3
|
export * from './dockview/defaultTab';
|
|
4
|
-
export { IDockviewTabGroupChipProps } from './dockview/reactTabGroupChipPart';
|
|
5
|
-
export { IDockviewGroupDragGhostProps } from './dockview/reactGroupDragGhostPart';
|
|
4
|
+
export { type IDockviewTabGroupChipProps } from './dockview/reactTabGroupChipPart';
|
|
5
|
+
export { type IDockviewGroupDragGhostProps } from './dockview/reactGroupDragGhostPart';
|
|
6
6
|
export * from './splitview/splitview';
|
|
7
7
|
export * from './gridview/gridview';
|
|
8
8
|
export * from './paneview/paneview';
|
package/dist/cjs/svg.d.ts
CHANGED