dockview 1.17.2 → 2.1.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/dist/cjs/dockview/dockview.d.ts +1 -5
- package/dist/cjs/dockview/dockview.js +0 -16
- package/dist/cjs/dockview/headerActionsRenderer.d.ts +2 -2
- package/dist/cjs/dockview/reactContentPart.d.ts +1 -1
- package/dist/cjs/dockview/reactHeaderPart.d.ts +1 -1
- package/dist/cjs/dockview/reactWatermarkPart.d.ts +2 -2
- package/dist/cjs/paneview/view.d.ts +1 -1
- package/dist/cjs/react.d.ts +3 -3
- package/dist/dockview.amd.js +346 -226
- 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 +345 -225
- package/dist/dockview.amd.noStyle.js.map +1 -1
- package/dist/dockview.cjs.js +346 -226
- package/dist/dockview.cjs.js.map +1 -1
- package/dist/dockview.esm.js +347 -225
- 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 +346 -226
- 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 +345 -225
- package/dist/dockview.noStyle.js.map +1 -1
- package/dist/esm/dockview/dockview.d.ts +1 -5
- package/dist/esm/dockview/dockview.js +0 -16
- package/dist/esm/dockview/headerActionsRenderer.d.ts +2 -2
- package/dist/esm/dockview/reactContentPart.d.ts +1 -1
- package/dist/esm/dockview/reactHeaderPart.d.ts +1 -1
- package/dist/esm/dockview/reactWatermarkPart.d.ts +2 -2
- package/dist/esm/paneview/view.d.ts +1 -1
- package/dist/esm/react.d.ts +3 -3
- package/dist/styles/dockview.css +111 -151
- package/package.json +5 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { DockviewWillDropEvent, DockviewDidDropEvent, IWatermarkPanelProps, IDockviewHeaderActionsProps, IDockviewPanelHeaderProps, IDockviewPanelProps, DockviewOptions,
|
|
2
|
+
import { DockviewWillDropEvent, DockviewDidDropEvent, IWatermarkPanelProps, IDockviewHeaderActionsProps, IDockviewPanelHeaderProps, IDockviewPanelProps, DockviewOptions, DockviewReadyEvent } from 'dockview-core';
|
|
3
3
|
export interface IDockviewReactProps extends DockviewOptions {
|
|
4
4
|
className?: string;
|
|
5
5
|
tabComponents?: Record<string, React.FunctionComponent<IDockviewPanelHeaderProps>>;
|
|
@@ -12,9 +12,5 @@ export interface IDockviewReactProps extends DockviewOptions {
|
|
|
12
12
|
onReady: (event: DockviewReadyEvent) => void;
|
|
13
13
|
onDidDrop?: (event: DockviewDidDropEvent) => void;
|
|
14
14
|
onWillDrop?: (event: DockviewWillDropEvent) => void;
|
|
15
|
-
/**
|
|
16
|
-
* @deprecated use `api.onUnhandledDragOverEvent` instead. This will be removed in the next release.
|
|
17
|
-
*/
|
|
18
|
-
showDndOverlay?: (event: DockviewDndOverlayEvent) => boolean;
|
|
19
15
|
}
|
|
20
16
|
export declare const DockviewReact: React.ForwardRefExoticComponent<IDockviewReactProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -106,22 +106,6 @@ export const DockviewReact = React.forwardRef((props, ref) => {
|
|
|
106
106
|
disposable.dispose();
|
|
107
107
|
};
|
|
108
108
|
}, [props.onDidDrop]);
|
|
109
|
-
React.useEffect(() => {
|
|
110
|
-
if (!dockviewRef.current) {
|
|
111
|
-
return () => {
|
|
112
|
-
// noop
|
|
113
|
-
};
|
|
114
|
-
}
|
|
115
|
-
const disposable = dockviewRef.current.onUnhandledDragOverEvent((event) => {
|
|
116
|
-
var _a;
|
|
117
|
-
if ((_a = props.showDndOverlay) === null || _a === void 0 ? void 0 : _a.call(props, event)) {
|
|
118
|
-
event.accept();
|
|
119
|
-
}
|
|
120
|
-
});
|
|
121
|
-
return () => {
|
|
122
|
-
disposable.dispose();
|
|
123
|
-
};
|
|
124
|
-
}, [props.showDndOverlay]);
|
|
125
109
|
React.useEffect(() => {
|
|
126
110
|
if (!dockviewRef.current) {
|
|
127
111
|
return () => {
|
|
@@ -5,8 +5,8 @@ export declare class ReactHeaderActionsRendererPart implements IHeaderActionsRen
|
|
|
5
5
|
private readonly component;
|
|
6
6
|
private readonly reactPortalStore;
|
|
7
7
|
private readonly _group;
|
|
8
|
-
private mutableDisposable;
|
|
9
|
-
private _element;
|
|
8
|
+
private readonly mutableDisposable;
|
|
9
|
+
private readonly _element;
|
|
10
10
|
private _part?;
|
|
11
11
|
get element(): HTMLElement;
|
|
12
12
|
get part(): ReactPart<IDockviewHeaderActionsProps> | undefined;
|
|
@@ -5,7 +5,7 @@ export declare class ReactPanelContentPart implements IContentRenderer {
|
|
|
5
5
|
readonly id: string;
|
|
6
6
|
private readonly component;
|
|
7
7
|
private readonly reactPortalStore;
|
|
8
|
-
private _element;
|
|
8
|
+
private readonly _element;
|
|
9
9
|
private part?;
|
|
10
10
|
private readonly _onDidFocus;
|
|
11
11
|
readonly onDidFocus: DockviewEvent<void>;
|
|
@@ -5,7 +5,7 @@ export declare class ReactPanelHeaderPart implements ITabRenderer {
|
|
|
5
5
|
readonly id: string;
|
|
6
6
|
private readonly component;
|
|
7
7
|
private readonly reactPortalStore;
|
|
8
|
-
private _element;
|
|
8
|
+
private readonly _element;
|
|
9
9
|
private part?;
|
|
10
10
|
get element(): HTMLElement;
|
|
11
11
|
constructor(id: string, component: React.FunctionComponent<IGroupPanelBaseProps>, reactPortalStore: ReactPortalStore);
|
|
@@ -5,9 +5,9 @@ export declare class ReactWatermarkPart implements IWatermarkRenderer {
|
|
|
5
5
|
readonly id: string;
|
|
6
6
|
private readonly component;
|
|
7
7
|
private readonly reactPortalStore;
|
|
8
|
-
private _element;
|
|
8
|
+
private readonly _element;
|
|
9
9
|
private part?;
|
|
10
|
-
private parameters;
|
|
10
|
+
private readonly parameters;
|
|
11
11
|
get element(): HTMLElement;
|
|
12
12
|
constructor(id: string, component: React.FunctionComponent<IWatermarkPanelProps>, reactPortalStore: ReactPortalStore);
|
|
13
13
|
init(parameters: WatermarkRendererInitParameters): void;
|
|
@@ -6,7 +6,7 @@ export declare class PanePanelSection implements IPaneBodyPart {
|
|
|
6
6
|
readonly id: string;
|
|
7
7
|
private readonly component;
|
|
8
8
|
private readonly reactPortalStore;
|
|
9
|
-
private _element;
|
|
9
|
+
private readonly _element;
|
|
10
10
|
private part?;
|
|
11
11
|
get element(): HTMLElement;
|
|
12
12
|
constructor(id: string, component: React.FunctionComponent<IPaneviewPanelProps>, reactPortalStore: ReactPortalStore);
|
package/dist/esm/react.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { IFrameworkPart,
|
|
2
|
+
import { IFrameworkPart, DockviewIDisposable } from 'dockview-core';
|
|
3
3
|
export interface ReactPortalStore {
|
|
4
|
-
addPortal: (portal: React.ReactPortal) =>
|
|
4
|
+
addPortal: (portal: React.ReactPortal) => DockviewIDisposable;
|
|
5
5
|
}
|
|
6
6
|
export declare const ReactPartContext: React.Context<{}>;
|
|
7
7
|
export declare class ReactPart<P extends object, C extends object = {}> implements IFrameworkPart {
|
|
@@ -23,7 +23,7 @@ export declare class ReactPart<P extends object, C extends object = {}> implemen
|
|
|
23
23
|
}
|
|
24
24
|
type PortalLifecycleHook = () => [
|
|
25
25
|
React.ReactPortal[],
|
|
26
|
-
(portal: React.ReactPortal) =>
|
|
26
|
+
(portal: React.ReactPortal) => DockviewIDisposable
|
|
27
27
|
];
|
|
28
28
|
/**
|
|
29
29
|
* A React Hook that returns an array of portals to be rendered by the user of this hook
|