{"versions":{"0.3.4":{"name":"@andrewray/react-multi-split-pane","description":"React multi split-pane component","main":"dist/index.js","source":"src/index.ts","version":"0.3.4","repository":{"type":"git","url":"git+https://github.com/neoraider/react-multi-split-pane.git"},"license":"MIT","bugs":{"url":"https://github.com/neoraider/react-multi-split-pane"},"homepage":"https://github.com/neoraider/react-multi-split-pane","author":{"name":"Matthias Schiffer","email":"mschiffer@universe-factory.net"},"keywords":["react","react-component","split-pane","multi-split-pane","react-split-pane","react-multi-split-pane","typescript"],"scripts":{"prebuild":"yarn run clean","clean":"rimraf dist","build":"tsc","build:watch":"tsc -w","lint":"eslint 'src/**/*'","release":"yarn version --message \"$npm_package_name v%s\""},"peerDependencies":{"react":">=16.14.0","react-dom":">=16.14.0"},"devDependencies":{"@types/react":"^17.0.19","@types/react-dom":"^17.0.9","@typescript-eslint/eslint-plugin":"^5.10.2","@typescript-eslint/parser":"^5.10.2","eslint":"^8.8.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","eslint-plugin-react":"^7.24.0","eslint-plugin-react-hooks":"^4.2.0","prettier":"^2.3.2","react":"^18.2.0","rimraf":"^3.0.2","typescript":"^4.3.5"},"gitHead":"ad30a47180f7ea362b5f6422acd02228d627fbb7","_id":"@andrewray/react-multi-split-pane@0.3.4","_nodeVersion":"16.11.0","_npmVersion":"8.6.0","dist":{"integrity":"sha512-vbWAXw3k+oX7iuLnjUTik4del3TXyxL/KM5lHUWw9Z1fsjQsHW4ocg5CBk7/to5/HmkW/gsfCTLaZ3PWK/XP0w==","shasum":"cb9205f502a5e3db287d0aae0da6682bb64d9f5c","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@andrewray/react-multi-split-pane/-/react-multi-split-pane-0.3.4.tgz","fileCount":3,"unpackedSize":6875,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD1nlYKDC3GROHibFu2Auf/Fl23WFlW/+zs1jaTTumTrwIgEKYDmI3ASqPDzk3J1cUifgm0uOsQ2r7tOJg/IsZPW0M="}]},"_npmUser":{"name":"anonymous","email":"me@andrewray.me"},"directories":{},"maintainers":[{"name":"anonymous","email":"me@andrewray.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-multi-split-pane_0.3.4_1684700325731_0.2754953361474841"},"_hasShrinkwrap":false,"contributors":[]},"0.3.5":{"name":"@andrewray/react-multi-split-pane","description":"React multi split-pane component","main":"dist/index.js","source":"src/index.ts","version":"0.3.5","repository":{"type":"git","url":"git+https://github.com/neoraider/react-multi-split-pane.git"},"license":"MIT","bugs":{"url":"https://github.com/neoraider/react-multi-split-pane"},"homepage":"https://github.com/neoraider/react-multi-split-pane","author":{"name":"Matthias Schiffer","email":"mschiffer@universe-factory.net"},"keywords":["react","react-component","split-pane","multi-split-pane","react-split-pane","react-multi-split-pane","typescript"],"scripts":{"prebuild":"yarn run clean","clean":"rimraf dist","build":"tsc","build:watch":"tsc -w","lint":"eslint 'src/**/*'","release":"yarn version --message \"$npm_package_name v%s\""},"peerDependencies":{"react":">=16.14.0","react-dom":">=16.14.0"},"devDependencies":{"@types/react":"^17.0.19","@types/react-dom":"^17.0.9","@typescript-eslint/eslint-plugin":"^5.10.2","@typescript-eslint/parser":"^5.10.2","eslint":"^8.8.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","eslint-plugin-react":"^7.24.0","eslint-plugin-react-hooks":"^4.2.0","prettier":"^2.3.2","react":"^18.2.0","rimraf":"^3.0.2","typescript":"^4.3.5"},"types":"./dist/index.d.ts","gitHead":"7dc83b1440a5feda4b3cfc694df153620000718b","_id":"@andrewray/react-multi-split-pane@0.3.5","_nodeVersion":"16.11.0","_npmVersion":"8.6.0","dist":{"integrity":"sha512-mkOt7VRYt+Xlp8U981b3JNM3BhoUPbd1Pb+ghvAvdXL7l7scjz0/Yor5LWFrXukRbDOA8XNV3i5rx3qQNwZGWg==","shasum":"d3b630e543288f497522c17d1a56b460a7203b87","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@andrewray/react-multi-split-pane/-/react-multi-split-pane-0.3.5.tgz","fileCount":13,"unpackedSize":20126,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQClLkGIFv0UbDk7d90d0oc5IFDzSN1ygxceGjuueSfkJwIhAKhL76dh1lwX9SAG2MN5i82tvT5WbFHM+mz84/lfN9Jo"}]},"_npmUser":{"name":"anonymous","email":"me@andrewray.me"},"directories":{},"maintainers":[{"name":"anonymous","email":"me@andrewray.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-multi-split-pane_0.3.5_1684702319747_0.6807356667179589"},"_hasShrinkwrap":false,"contributors":[]}},"dist-tags":{"latest":"0.3.5"},"name":"@andrewray/react-multi-split-pane","time":{"created":"2023-05-21T20:18:53.778Z","0.3.4":"2023-05-21T20:18:45.872Z","modified":"2023-05-21T20:52:17.721Z","0.3.5":"2023-05-21T20:51:59.943Z"},"readme":"# React Multi Split Pane\n\n[![NPM version](https://img.shields.io/npm/v/react-multi-split-pane.svg?style=flat)](https://www.npmjs.com/package/react-multi-split-pane)\n![NPM license](https://img.shields.io/npm/l/react-multi-split-pane.svg?style=flat)\n\nFork of [react-split-pane](https://github.com/tomkp/react-split-pane) with support for more than two panes.\n\n## Installing\n```sh\nnpm install react-multi-split-pane\n\n# or if you use yarn\n\nyarn add react-multi-split-pane\n```\n\n## Example Usage\n```jsx\n<SplitPane split=\"vertical\" minSize={50}>\n    <div></div>\n    <div></div>\n    <div></div>\n</SplitPane>\n```\n\n```jsx\n<SplitPane split=\"vertical\" minSize={50}>\n    <div></div>\n    <SplitPane split=\"horizontal\">\n        <div></div>\n        <div></div>\n    </SplitPane>\n</SplitPane>\n```\n\n## Differences from [react-split-pane](https://github.com/tomkp/react-split-pane)\n\nMuch of the code has been rewritten, so the feature set is a bit different. All\ncode has been converted to TypeScript.\n\nThe most important changes:\n\n* All pane sizes are relative, so when the window is resized, all panes\n  grow/shrink at the same time (as far as their `minSize` properties allow)\n* An array of all pane sizes is passed to the `onDragFinished` and `onChange`\n  callbacks\n\n## Props\n### split: 'vertical' | 'horizontal'\nSplit direction, defaults to vertical.\n\n### defaultSizes: number[]\nArray of (relative) default sizes for the individual panes. Missing values\ndefault to 1. When no `defaultSizes` are passed, all sizes default to 1,\nequally distributing the available space (as far as `minSize` values permit).\n\n### minSize: number | number[]\nMinimum size of all panes (in pixels), or array containing individual minimum\nsizes for each pane. Defaults to 50.\n\n### className: string\nAdditional CSS class name that is appied to all elements rendered by the\nSplitPane. For a class name `custom`, the individual elements can be selected as\n`.SplitPane.custom`, `.Resizer.custom`, and `.Pane.custom`.\n\n### resizerClassName: string\nAdditional CSS class name that is appied only to the resizer rendered by the\nSplitPane.\n\n### onDragStarted: () => void\nThis callback is invoked when a drag starts.\n\n### onDragFinished: (sizes: number[]) => void\nThis callback is invoked when a drag ends.\n\n### onChange: (sizes: number[]) => void\nThis callback is invoked with the current drag during a drag event. It is\nrecommended that it is wrapped in a debounce function.\n\n## Persisting Positions\n\nEach SplitPane accepts an onChange function prop.  Used in conjunction with\ndefaultSize and a persistence layer, you can ensure that your splitter choices\nsurvive a refresh of your app.\n\nFor example, if you are comfortable with the trade-offs of localStorage, you\ncould do something like the following:\n\n```jsx\n<SplitPane\n    split=\"vertical\" minSize={50}\n    defaultSizes={JSON.parse(localStorage.getItem('splitPos')) || undefined}\n    onDragFinished={(size) => localStorage.setItem('splitPos', JSON.stringify(size))}\n>\n    <div></div>\n    <div></div>\n</SplitPane>\n```\n\n## Example styling\n\nThis gives a single pixel wide divider, but with a 'grabbable' surface of 11\npixels.\n\nThanks to `background-clip: padding-box;` for making transparent borders\npossible.\n\n\n```css\n.Resizer {\n    background: #000;\n    opacity: .2;\n    z-index: 1;\n    box-sizing: border-box;\n    background-clip: padding-box;\n}\n\n.Resizer:hover {\n    transition: all 2s ease;\n}\n\n.Resizer.horizontal {\n    height: 11px;\n    margin: -5px 0;\n    border-top: 5px solid rgba(255, 255, 255, 0);\n    border-bottom: 5px solid rgba(255, 255, 255, 0);\n    cursor: row-resize;\n}\n\n.Resizer.horizontal:hover, .Resizer.horizontal.resizing {\n    border-top: 5px solid rgba(0, 0, 0, 0.5);\n    border-bottom: 5px solid rgba(0, 0, 0, 0.5);\n}\n\n.Resizer.vertical {\n    width: 11px;\n    margin: 0 -5px;\n    border-left: 5px solid rgba(255, 255, 255, 0);\n    border-right: 5px solid rgba(255, 255, 255, 0);\n    cursor: col-resize;\n}\n\n.Resizer.vertical:hover, .Resizer.vertical.resizing {\n    border-left: 5px solid rgba(0, 0, 0, 0.5);\n    border-right: 5px solid rgba(0, 0, 0, 0.5);\n}\n\n.DragLayer {\n\tz-index: 1;\n\tpointer-events: none;\n}\n\n.DragLayer.resizing {\n\tpointer-events: auto;\n}\n\n.DragLayer.horizontal {\n\tcursor: row-resize;\n}\n\n.DragLayer.vertical {\n\tcursor: col-resize;\n}\n```","users":{}}