react-split-pane 0.1.86 → 0.1.92
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/CHANGELOG.md +50 -0
- package/README.md +139 -94
- package/dist/index.cjs.js +707 -0
- package/dist/index.esm.js +701 -0
- package/index.d.ts +26 -8
- package/package.json +52 -39
package/index.d.ts
CHANGED
|
@@ -2,9 +2,9 @@ import * as React from 'react';
|
|
|
2
2
|
|
|
3
3
|
export type Size = string | number;
|
|
4
4
|
|
|
5
|
-
type
|
|
5
|
+
export type Split = 'vertical' | 'horizontal';
|
|
6
6
|
|
|
7
|
-
export
|
|
7
|
+
export type SplitPaneProps = {
|
|
8
8
|
allowResize?: boolean;
|
|
9
9
|
className?: string;
|
|
10
10
|
primary?: 'first' | 'second';
|
|
@@ -25,14 +25,17 @@ export interface Props {
|
|
|
25
25
|
pane2Style?: React.CSSProperties;
|
|
26
26
|
resizerClassName?: string;
|
|
27
27
|
step?: number;
|
|
28
|
-
}
|
|
28
|
+
};
|
|
29
29
|
|
|
30
|
-
export
|
|
30
|
+
export type SplitPaneState = {
|
|
31
31
|
active: boolean;
|
|
32
32
|
resized: boolean;
|
|
33
|
-
}
|
|
33
|
+
};
|
|
34
34
|
|
|
35
|
-
declare class SplitPane extends React.Component<
|
|
35
|
+
declare class SplitPane extends React.Component<
|
|
36
|
+
SplitPaneProps,
|
|
37
|
+
SplitPaneState
|
|
38
|
+
> {
|
|
36
39
|
constructor();
|
|
37
40
|
|
|
38
41
|
onMouseDown(event: MouseEvent): void;
|
|
@@ -45,9 +48,24 @@ declare class SplitPane extends React.Component<Props, State> {
|
|
|
45
48
|
|
|
46
49
|
onMouseUp(): void;
|
|
47
50
|
|
|
48
|
-
static getSizeUpdate(
|
|
51
|
+
static getSizeUpdate(
|
|
52
|
+
props: SplitPaneProps,
|
|
53
|
+
state: SplitPaneState
|
|
54
|
+
): Partial<SplitPaneState>;
|
|
49
55
|
|
|
50
|
-
static defaultProps:
|
|
56
|
+
static defaultProps: SplitPaneProps;
|
|
51
57
|
}
|
|
52
58
|
|
|
53
59
|
export default SplitPane;
|
|
60
|
+
|
|
61
|
+
export type PaneProps = {
|
|
62
|
+
className?: string;
|
|
63
|
+
size?: Size;
|
|
64
|
+
split?: Split;
|
|
65
|
+
style?: React.CSSProperties;
|
|
66
|
+
eleRef?: (el: HTMLDivElement) => void;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
declare class Pane extends React.PureComponent<PaneProps> {}
|
|
70
|
+
|
|
71
|
+
export { Pane };
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"dist",
|
|
10
10
|
"index.d.ts"
|
|
11
11
|
],
|
|
12
|
-
"version": "0.1.
|
|
12
|
+
"version": "0.1.92",
|
|
13
13
|
"repository": {
|
|
14
14
|
"type": "git",
|
|
15
15
|
"url": "https://github.com/tomkp/react-split-pane"
|
|
@@ -28,19 +28,21 @@
|
|
|
28
28
|
"es6"
|
|
29
29
|
],
|
|
30
30
|
"scripts": {
|
|
31
|
-
"
|
|
31
|
+
"start": "parcel website/index.html",
|
|
32
|
+
"prebuild": "yarn run clean",
|
|
32
33
|
"build": "rollup -c",
|
|
33
34
|
"build:watch": "rollup -c --watch",
|
|
34
35
|
"clean": "rimraf dist",
|
|
35
|
-
"test": "mochify -R spec --transform babelify",
|
|
36
|
-
"test:watch": "mochify -R spec --watch --transform babelify",
|
|
37
|
-
"test:coverage": "mochify --plugin [ mochify-istanbul --exclude '**/test/**' --report lcovonly ] --transform babelify && cat lcov.info | coveralls && rm lcov.info",
|
|
38
|
-
"website:start": "npm run start --prefix website",
|
|
39
|
-
"website:deploy": "npm run deploy --prefix website",
|
|
36
|
+
"test": "BABEL_ENV=test mochify -R spec --transform babelify",
|
|
37
|
+
"test:watch": "BABEL_ENV=test mochify -R spec --watch --transform babelify",
|
|
38
|
+
"test:coverage": "BABEL_ENV=test mochify --plugin [ mochify-istanbul --exclude '**/test/**' --report lcovonly ] --transform babelify && cat lcov.info | coveralls && rm lcov.info",
|
|
40
39
|
"prettier": "prettier --write '{src,test}/**/*.js'",
|
|
41
40
|
"lint": "eslint src test",
|
|
42
|
-
"release
|
|
43
|
-
"
|
|
41
|
+
"release": "standard-version",
|
|
42
|
+
"build:storybook": "build-storybook -o build",
|
|
43
|
+
"storybook": "start-storybook -p ${PORT:-3001} -h 0.0.0.0",
|
|
44
|
+
"deploy": "gh-pages -d build",
|
|
45
|
+
"prepublishOnly": "yarn run test && yarn run build"
|
|
44
46
|
},
|
|
45
47
|
"husky": {
|
|
46
48
|
"hooks": {
|
|
@@ -48,43 +50,54 @@
|
|
|
48
50
|
}
|
|
49
51
|
},
|
|
50
52
|
"dependencies": {
|
|
51
|
-
"prop-types": "^15.
|
|
53
|
+
"prop-types": "^15.7.2",
|
|
52
54
|
"react-lifecycles-compat": "^3.0.4",
|
|
53
|
-
"react-style-proptype": "^3.
|
|
55
|
+
"react-style-proptype": "^3.2.2"
|
|
54
56
|
},
|
|
55
57
|
"devDependencies": {
|
|
56
|
-
"@babel/core": "^7.2
|
|
57
|
-
"@babel/
|
|
58
|
-
"@babel/preset-
|
|
59
|
-
"@
|
|
60
|
-
"
|
|
58
|
+
"@babel/core": "^7.7.2",
|
|
59
|
+
"@babel/plugin-transform-modules-commonjs": "^7.7.0",
|
|
60
|
+
"@babel/preset-env": "^7.7.1",
|
|
61
|
+
"@babel/preset-react": "^7.7.0",
|
|
62
|
+
"@emotion/core": "^10.0.22",
|
|
63
|
+
"@emotion/styled": "^10.0.23",
|
|
64
|
+
"@storybook/addons": "^5.3.17",
|
|
65
|
+
"@storybook/react": "^5.3.17",
|
|
66
|
+
"@storybook/theming": "^5.3.17",
|
|
67
|
+
"@types/react": "^16.9.11",
|
|
68
|
+
"babel-eslint": "^10.0.3",
|
|
69
|
+
"babel-loader": "^8.0.0-beta.6",
|
|
61
70
|
"babelify": "^10.0.0",
|
|
62
|
-
"chai": "^4.0
|
|
63
|
-
"chai-spies": "^0.
|
|
64
|
-
"coveralls": "^
|
|
65
|
-
"cross-env": "^
|
|
66
|
-
"eslint": "^
|
|
67
|
-
"eslint-config-fbjs": "^
|
|
68
|
-
"eslint-config-prettier": "^
|
|
71
|
+
"chai": "^4.2.0",
|
|
72
|
+
"chai-spies": "^1.0.0",
|
|
73
|
+
"coveralls": "^3.0.7",
|
|
74
|
+
"cross-env": "^7.0.0",
|
|
75
|
+
"eslint": "^6.6.0",
|
|
76
|
+
"eslint-config-fbjs": "^3.1.1",
|
|
77
|
+
"eslint-config-prettier": "^6.5.0",
|
|
69
78
|
"eslint-config-react": "^1.1.7",
|
|
70
79
|
"eslint-plugin-babel": "^5.1.0",
|
|
71
|
-
"eslint-plugin-flowtype": "^
|
|
72
|
-
"eslint-plugin-jsx-a11y": "^6.
|
|
73
|
-
"eslint-plugin-prettier": "^
|
|
74
|
-
"eslint-plugin-react": "^7.
|
|
75
|
-
"eslint-plugin-relay": "^
|
|
76
|
-
"
|
|
77
|
-
"
|
|
80
|
+
"eslint-plugin-flowtype": "^4.3.0",
|
|
81
|
+
"eslint-plugin-jsx-a11y": "^6.2.3",
|
|
82
|
+
"eslint-plugin-prettier": "^3.1.1",
|
|
83
|
+
"eslint-plugin-react": "^7.16.0",
|
|
84
|
+
"eslint-plugin-relay": "^1.3.12",
|
|
85
|
+
"gh-pages": "^2.1.1",
|
|
86
|
+
"husky": "^4.2.3",
|
|
87
|
+
"mochify": "^6.6.0",
|
|
78
88
|
"mochify-istanbul": "^2.4.2",
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"react
|
|
83
|
-
"
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
"rollup
|
|
87
|
-
"rollup-plugin-
|
|
89
|
+
"parcel-bundler": "^1.12.4",
|
|
90
|
+
"prettier": "2.0.5",
|
|
91
|
+
"pretty-quick": "^2.0.1",
|
|
92
|
+
"react": ">=15",
|
|
93
|
+
"react-dom": "^16.0.0-0",
|
|
94
|
+
"react-router-dom": "^5.1.2",
|
|
95
|
+
"rimraf": "^3.0.0",
|
|
96
|
+
"rollup": "^2.3.4",
|
|
97
|
+
"rollup-plugin-babel": "^4.3.3",
|
|
98
|
+
"rollup-plugin-commonjs": "^10.1.0",
|
|
99
|
+
"rollup-plugin-node-resolve": "^5.2.0",
|
|
100
|
+
"standard-version": "^7.0.0"
|
|
88
101
|
},
|
|
89
102
|
"peerDependencies": {
|
|
90
103
|
"react": "^16.0.0-0",
|