Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dockview

Package Overview
Dependencies
Maintainers
1
Versions
148
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dockview - npm Package Compare versions

Comparing version 1.9.2 to 1.10.0

1

dist/cjs/dockview/defaultTab.d.ts

@@ -8,2 +8,1 @@ import { IDockviewPanelHeaderProps } from './dockview';

export declare const DockviewDefaultTab: React.FunctionComponent<IDockviewDefaultTabProps>;
//# sourceMappingURL=defaultTab.d.ts.map

@@ -80,2 +80,1 @@ "use strict";

exports.DockviewDefaultTab = DockviewDefaultTab;
//# sourceMappingURL=defaultTab.js.map

8

dist/cjs/dockview/dockview.d.ts
import * as React from 'react';
import { DockviewDropEvent, DockviewDndOverlayEvent, DockviewPanelApi, DockviewApi, DockviewPanelRenderer, DroptargetOverlayModel } from 'dockview-core';
import { DockviewWillDropEvent, DockviewDndOverlayEvent, DockviewPanelApi, DockviewApi, DockviewPanelRenderer, DroptargetOverlayModel, DockviewDidDropEvent } from 'dockview-core';
import { IWatermarkPanelProps } from './reactWatermarkPart';

@@ -26,3 +26,4 @@ import { PanelCollection, PanelParameters } from '../types';

watermarkComponent?: React.FunctionComponent<IWatermarkPanelProps>;
onDidDrop?: (event: DockviewDropEvent) => void;
onDidDrop?: (event: DockviewDidDropEvent) => void;
onWillDrop?: (event: DockviewWillDropEvent) => void;
showDndOverlay?: (event: DockviewDndOverlayEvent) => boolean;

@@ -45,4 +46,5 @@ hideBorders?: boolean;

rootOverlayModel?: DroptargetOverlayModel;
locked?: boolean;
disableDnd?: boolean;
}
export declare const DockviewReact: React.ForwardRefExoticComponent<IDockviewReactProps & React.RefAttributes<HTMLDivElement>>;
//# sourceMappingURL=dockview.d.ts.map

@@ -121,2 +121,4 @@ "use strict";

rootOverlayModel: props.rootOverlayModel,
locked: props.locked,
disableDnd: props.disableDnd,
});

@@ -135,2 +137,16 @@ var _b = domRef.current, clientWidth = _b.clientWidth, clientHeight = _b.clientHeight;

if (!dockviewRef.current) {
return;
}
dockviewRef.current.locked = !!props.locked;
}, [props.locked]);
React.useEffect(function () {
if (!dockviewRef.current) {
return;
}
dockviewRef.current.updateOptions({
disableDnd: props.disableDnd,
});
}, [props.disableDnd]);
React.useEffect(function () {
if (!dockviewRef.current) {
return function () {

@@ -151,2 +167,17 @@ // noop

if (!dockviewRef.current) {
return function () {
// noop
};
}
var disposable = dockviewRef.current.onWillDrop(function (event) {
if (props.onWillDrop) {
props.onWillDrop(event);
}
});
return function () {
disposable.dispose();
};
}, [props.onWillDrop]);
React.useEffect(function () {
if (!dockviewRef.current) {
return;

@@ -250,2 +281,1 @@ }

exports.DockviewReact.displayName = 'DockviewComponent';
//# sourceMappingURL=dockview.js.map

@@ -34,2 +34,1 @@ import * as React from 'react';

}
//# sourceMappingURL=headerActionsRenderer.d.ts.map

@@ -88,2 +88,1 @@ "use strict";

exports.ReactHeaderActionsRendererPart = ReactHeaderActionsRendererPart;
//# sourceMappingURL=headerActionsRenderer.js.map

@@ -23,2 +23,1 @@ import * as React from 'react';

}
//# sourceMappingURL=reactContentPart.d.ts.map

@@ -51,2 +51,1 @@ "use strict";

exports.ReactPanelContentPart = ReactPanelContentPart;
//# sourceMappingURL=reactContentPart.js.map

@@ -19,2 +19,1 @@ import * as React from 'react';

}
//# sourceMappingURL=reactHeaderPart.d.ts.map

@@ -44,2 +44,1 @@ "use strict";

exports.ReactPanelHeaderPart = ReactPanelHeaderPart;
//# sourceMappingURL=reactHeaderPart.js.map

@@ -25,2 +25,1 @@ import * as React from 'react';

}
//# sourceMappingURL=reactWatermarkPart.d.ts.map

@@ -54,2 +54,1 @@ "use strict";

exports.ReactWatermarkPart = ReactWatermarkPart;
//# sourceMappingURL=reactWatermarkPart.js.map

@@ -23,2 +23,1 @@ import * as React from 'react';

export declare const GridviewReact: React.ForwardRefExoticComponent<IGridviewReactProps & React.RefAttributes<HTMLDivElement>>;
//# sourceMappingURL=gridview.d.ts.map

@@ -99,2 +99,1 @@ "use strict";

exports.GridviewReact.displayName = 'GridviewComponent';
//# sourceMappingURL=gridview.js.map

@@ -11,2 +11,1 @@ /// <reference types="react" />

}
//# sourceMappingURL=view.d.ts.map

@@ -34,3 +34,5 @@ "use strict";

api: this.api,
containerApi: new dockview_core_1.GridviewApi(this._params.accessor),
// TODO: fix casting hack
containerApi: new dockview_core_1.GridviewApi(this._params
.accessor),
});

@@ -41,2 +43,1 @@ };

exports.ReactGridPanelView = ReactGridPanelView;
//# sourceMappingURL=view.js.map

@@ -11,2 +11,1 @@ export * from 'dockview-core';

export * from './react';
//# sourceMappingURL=index.d.ts.map

@@ -25,2 +25,1 @@ "use strict";

__exportStar(require("./react"), exports);
//# sourceMappingURL=index.js.map

@@ -25,2 +25,1 @@ import * as React from 'react';

export declare const PaneviewReact: React.ForwardRefExoticComponent<IPaneviewReactProps & React.RefAttributes<HTMLDivElement>>;
//# sourceMappingURL=paneview.d.ts.map

@@ -141,2 +141,1 @@ "use strict";

exports.PaneviewReact.displayName = 'PaneviewComponent';
//# sourceMappingURL=paneview.js.map

@@ -20,2 +20,1 @@ import * as React from 'react';

}
//# sourceMappingURL=view.d.ts.map

@@ -45,2 +45,1 @@ "use strict";

exports.PanePanelSection = PanePanelSection;
//# sourceMappingURL=view.js.map

@@ -34,4 +34,3 @@ import * as React from 'react';

export declare const usePortalsLifecycle: PortalLifecycleHook;
export declare function isReactElement(element: unknown): element is React.ReactElement;
export declare function isReactComponent(component: any): boolean;
export {};
//# sourceMappingURL=react.d.ts.map

@@ -62,3 +62,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.isReactElement = exports.usePortalsLifecycle = exports.ReactPart = exports.ReactPartContext = void 0;
exports.isReactComponent = exports.usePortalsLifecycle = exports.ReactPart = exports.ReactPartContext = void 0;
var React = __importStar(require("react"));

@@ -130,9 +130,9 @@ var ReactDOM = __importStar(require("react-dom"));

}
if (typeof this.component !== 'function') {
if (!isReactComponent(this.component)) {
/**
* we know this isn't a React.FunctionComponent so throw an error here.
* if we do not intercept this the React library will throw a very obsure error
* for the same reason, at least at this point we will emit a sensible stacktrace.
* if we do not intercept then React library will throw a very obsure error
* for the same reason... at least at this point we will emit a sensible stacktrace.
*/
throw new Error('Invalid Operation. dockview only supports React Functional Components.');
throw new Error('Dockview: Only React.memo(...), React.ForwardRef(...) and functional components are accepted as components');
}

@@ -194,7 +194,10 @@ var bridgeComponent = React.createElement(React.forwardRef(ReactComponentBridge), {

exports.usePortalsLifecycle = usePortalsLifecycle;
// it does the job...
function isReactElement(element) {
return !!(element === null || element === void 0 ? void 0 : element.type);
function isReactComponent(component) {
/**
* Yes, we could use "react-is" but that would introduce an unwanted peer dependency
* so for now we will check in a rather crude fashion...
*/
return (typeof component === 'function' /** Functional Componnts */ ||
!!(component === null || component === void 0 ? void 0 : component.$$typeof) /** React.memo(...) Components */);
}
exports.isReactElement = isReactElement;
//# sourceMappingURL=react.js.map
exports.isReactComponent = isReactComponent;

@@ -23,2 +23,1 @@ import * as React from 'react';

export declare const SplitviewReact: React.ForwardRefExoticComponent<ISplitviewReactProps & React.RefAttributes<HTMLDivElement>>;
//# sourceMappingURL=splitview.d.ts.map

@@ -94,2 +94,1 @@ "use strict";

exports.SplitviewReact.displayName = 'SplitviewComponent';
//# sourceMappingURL=splitview.js.map

@@ -11,2 +11,1 @@ /// <reference types="react" />

}
//# sourceMappingURL=view.d.ts.map

@@ -40,2 +40,1 @@ "use strict";

exports.ReactPanelView = ReactPanelView;
//# sourceMappingURL=view.js.map
import * as React from 'react';
export declare const CloseButton: () => React.JSX.Element;
export declare const ExpandMore: () => React.JSX.Element;
//# sourceMappingURL=svg.d.ts.map

@@ -36,2 +36,1 @@ "use strict";

exports.ExpandMore = ExpandMore;
//# sourceMappingURL=svg.js.map

@@ -9,2 +9,1 @@ import * as React from 'react';

}
//# sourceMappingURL=types.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=types.js.map

@@ -8,2 +8,1 @@ import { IDockviewPanelHeaderProps } from './dockview';

export declare const DockviewDefaultTab: React.FunctionComponent<IDockviewDefaultTabProps>;
//# sourceMappingURL=defaultTab.d.ts.map

@@ -42,2 +42,1 @@ var __rest = (this && this.__rest) || function (s, e) {

};
//# sourceMappingURL=defaultTab.js.map
import * as React from 'react';
import { DockviewDropEvent, DockviewDndOverlayEvent, DockviewPanelApi, DockviewApi, DockviewPanelRenderer, DroptargetOverlayModel } from 'dockview-core';
import { DockviewWillDropEvent, DockviewDndOverlayEvent, DockviewPanelApi, DockviewApi, DockviewPanelRenderer, DroptargetOverlayModel, DockviewDidDropEvent } from 'dockview-core';
import { IWatermarkPanelProps } from './reactWatermarkPart';

@@ -26,3 +26,4 @@ import { PanelCollection, PanelParameters } from '../types';

watermarkComponent?: React.FunctionComponent<IWatermarkPanelProps>;
onDidDrop?: (event: DockviewDropEvent) => void;
onDidDrop?: (event: DockviewDidDropEvent) => void;
onWillDrop?: (event: DockviewWillDropEvent) => void;
showDndOverlay?: (event: DockviewDndOverlayEvent) => boolean;

@@ -45,4 +46,5 @@ hideBorders?: boolean;

rootOverlayModel?: DroptargetOverlayModel;
locked?: boolean;
disableDnd?: boolean;
}
export declare const DockviewReact: React.ForwardRefExoticComponent<IDockviewReactProps & React.RefAttributes<HTMLDivElement>>;
//# sourceMappingURL=dockview.d.ts.map

@@ -79,2 +79,4 @@ import * as React from 'react';

rootOverlayModel: props.rootOverlayModel,
locked: props.locked,
disableDnd: props.disableDnd,
});

@@ -93,2 +95,16 @@ const { clientWidth, clientHeight } = domRef.current;

if (!dockviewRef.current) {
return;
}
dockviewRef.current.locked = !!props.locked;
}, [props.locked]);
React.useEffect(() => {
if (!dockviewRef.current) {
return;
}
dockviewRef.current.updateOptions({
disableDnd: props.disableDnd,
});
}, [props.disableDnd]);
React.useEffect(() => {
if (!dockviewRef.current) {
return () => {

@@ -109,2 +125,17 @@ // noop

if (!dockviewRef.current) {
return () => {
// noop
};
}
const disposable = dockviewRef.current.onWillDrop((event) => {
if (props.onWillDrop) {
props.onWillDrop(event);
}
});
return () => {
disposable.dispose();
};
}, [props.onWillDrop]);
React.useEffect(() => {
if (!dockviewRef.current) {
return;

@@ -208,2 +239,1 @@ }

DockviewReact.displayName = 'DockviewComponent';
//# sourceMappingURL=dockview.js.map

@@ -34,2 +34,1 @@ import * as React from 'react';

}
//# sourceMappingURL=headerActionsRenderer.d.ts.map

@@ -70,2 +70,1 @@ import { ReactPart } from '../react';

}
//# sourceMappingURL=headerActionsRenderer.js.map

@@ -23,2 +23,1 @@ import * as React from 'react';

}
//# sourceMappingURL=reactContentPart.d.ts.map

@@ -42,2 +42,1 @@ import { ReactPart } from '../react';

}
//# sourceMappingURL=reactContentPart.js.map

@@ -19,2 +19,1 @@ import * as React from 'react';

}
//# sourceMappingURL=reactHeaderPart.d.ts.map

@@ -35,2 +35,1 @@ import { ReactPart } from '../react';

}
//# sourceMappingURL=reactHeaderPart.js.map

@@ -25,2 +25,1 @@ import * as React from 'react';

}
//# sourceMappingURL=reactWatermarkPart.d.ts.map

@@ -45,2 +45,1 @@ import { ReactPart } from '../react';

}
//# sourceMappingURL=reactWatermarkPart.js.map

@@ -23,2 +23,1 @@ import * as React from 'react';

export declare const GridviewReact: React.ForwardRefExoticComponent<IGridviewReactProps & React.RefAttributes<HTMLDivElement>>;
//# sourceMappingURL=gridview.d.ts.map

@@ -57,2 +57,1 @@ import * as React from 'react';

GridviewReact.displayName = 'GridviewComponent';
//# sourceMappingURL=gridview.js.map

@@ -11,2 +11,1 @@ /// <reference types="react" />

}
//# sourceMappingURL=view.d.ts.map

@@ -14,6 +14,7 @@ import { GridviewApi, GridviewPanel, } from 'dockview-core';

api: this.api,
containerApi: new GridviewApi(this._params.accessor),
// TODO: fix casting hack
containerApi: new GridviewApi(this._params
.accessor),
});
}
}
//# sourceMappingURL=view.js.map

@@ -11,2 +11,1 @@ export * from 'dockview-core';

export * from './react';
//# sourceMappingURL=index.d.ts.map

@@ -9,2 +9,1 @@ export * from 'dockview-core';

export * from './react';
//# sourceMappingURL=index.js.map

@@ -25,2 +25,1 @@ import * as React from 'react';

export declare const PaneviewReact: React.ForwardRefExoticComponent<IPaneviewReactProps & React.RefAttributes<HTMLDivElement>>;
//# sourceMappingURL=paneview.d.ts.map

@@ -86,2 +86,1 @@ import * as React from 'react';

PaneviewReact.displayName = 'PaneviewComponent';
//# sourceMappingURL=paneview.js.map

@@ -20,2 +20,1 @@ import * as React from 'react';

}
//# sourceMappingURL=view.d.ts.map

@@ -36,2 +36,1 @@ import { ReactPart } from '../react';

}
//# sourceMappingURL=view.js.map

@@ -34,4 +34,3 @@ import * as React from 'react';

export declare const usePortalsLifecycle: PortalLifecycleHook;
export declare function isReactElement(element: unknown): element is React.ReactElement;
export declare function isReactComponent(component: any): boolean;
export {};
//# sourceMappingURL=react.d.ts.map

@@ -66,9 +66,9 @@ import * as React from 'react';

}
if (typeof this.component !== 'function') {
if (!isReactComponent(this.component)) {
/**
* we know this isn't a React.FunctionComponent so throw an error here.
* if we do not intercept this the React library will throw a very obsure error
* for the same reason, at least at this point we will emit a sensible stacktrace.
* if we do not intercept then React library will throw a very obsure error
* for the same reason... at least at this point we will emit a sensible stacktrace.
*/
throw new Error('Invalid Operation. dockview only supports React Functional Components.');
throw new Error('Dockview: Only React.memo(...), React.ForwardRef(...) and functional components are accepted as components');
}

@@ -125,6 +125,9 @@ const bridgeComponent = React.createElement(React.forwardRef(ReactComponentBridge), {

};
// it does the job...
export function isReactElement(element) {
return !!(element === null || element === void 0 ? void 0 : element.type);
export function isReactComponent(component) {
/**
* Yes, we could use "react-is" but that would introduce an unwanted peer dependency
* so for now we will check in a rather crude fashion...
*/
return (typeof component === 'function' /** Functional Componnts */ ||
!!(component === null || component === void 0 ? void 0 : component.$$typeof) /** React.memo(...) Components */);
}
//# sourceMappingURL=react.js.map

@@ -23,2 +23,1 @@ import * as React from 'react';

export declare const SplitviewReact: React.ForwardRefExoticComponent<ISplitviewReactProps & React.RefAttributes<HTMLDivElement>>;
//# sourceMappingURL=splitview.d.ts.map

@@ -52,2 +52,1 @@ import * as React from 'react';

SplitviewReact.displayName = 'SplitviewComponent';
//# sourceMappingURL=splitview.js.map

@@ -11,2 +11,1 @@ /// <reference types="react" />

}
//# sourceMappingURL=view.d.ts.map

@@ -18,2 +18,1 @@ import { SplitviewApi, SplitviewPanel, } from 'dockview-core';

}
//# sourceMappingURL=view.js.map
import * as React from 'react';
export declare const CloseButton: () => React.JSX.Element;
export declare const ExpandMore: () => React.JSX.Element;
//# sourceMappingURL=svg.d.ts.map

@@ -8,2 +8,1 @@ import * as React from 'react';

};
//# sourceMappingURL=svg.js.map

@@ -9,2 +9,1 @@ import * as React from 'react';

}
//# sourceMappingURL=types.d.ts.map
export {};
//# sourceMappingURL=types.js.map
{
"name": "dockview",
"version": "1.9.2",
"version": "1.10.0",
"description": "Zero dependency layout manager supporting tabs, grids and splitviews with ReactJS support",

@@ -46,5 +46,5 @@ "keywords": [

"build:bundles": "rollup -c",
"build:cjs": "cross-env ../../node_modules/.bin/tsc --project ./tsconfig.json --extendedDiagnostics",
"build:cjs": "cross-env ../../node_modules/.bin/tsc --build ./tsconfig.json --verbose --extendedDiagnostics",
"build:css": "gulp sass",
"build:esm": "cross-env ../../node_modules/.bin/tsc --project ./tsconfig.esm.json --extendedDiagnostics",
"build:esm": "cross-env ../../node_modules/.bin/tsc --build ./tsconfig.esm.json --verbose --extendedDiagnostics",
"build:package": "npm run build:cjs && npm run build:esm && npm run build:css",

@@ -58,4 +58,4 @@ "clean": "rimraf dist/ .build/ .rollup.cache/",

"dependencies": {
"dockview-core": "^1.9.2"
"dockview-core": "^1.10.0"
}
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc