svelte-splitpanes
Advanced tools
Comparing version
@@ -5,2 +5,10 @@ # Changelog | ||
## [0.7.12](https://github.com/orefalo/svelte-splitpanes/compare/v0.7.11...v0.7.12) (2023-01-25) | ||
### Bug Fixes | ||
* avoid equalizing on the edge case that there is not even a single pane ([0adb387](https://github.com/orefalo/svelte-splitpanes/commit/0adb38772490d61e84af4eb893af33c1483c4319)) | ||
* cleaner dragging calculation, and omit the buggy `margin-left: -1px;` from the splitter ([b453d74](https://github.com/orefalo/svelte-splitpanes/commit/b453d74ee7aff3c4812a3de2f2bbd2372ad597f3)) | ||
## [0.7.11](https://github.com/orefalo/svelte-splitpanes/compare/v0.7.10...v0.7.11) (2023-01-09) | ||
@@ -7,0 +15,0 @@ |
@@ -5,7 +5,12 @@ import type { Readable } from 'svelte/store'; | ||
export type PaneInitFunction = (key: any) => { | ||
undefinedPaneInitSize: number; | ||
}; | ||
export interface ClientCallbacks { | ||
onSplitterDown: (_event: TouchEvent | MouseEvent) => void; | ||
onSplitterClick: (event: MouseEvent) => void; | ||
onSplitterDblClick: (_event: MouseEvent) => void; | ||
undefinedPaneInitSize: number; | ||
}; | ||
onPaneClick: (_event: MouseEvent) => void; | ||
/** Report the manual given size was changed. */ | ||
reportGivenSizeChange: (newGivenSize: number | null) => void; | ||
} | ||
export interface SplitContext { | ||
@@ -16,9 +21,8 @@ /** Tells the key of the very first pane, or undefined if not recieved yet. */ | ||
showFirstSplitter: Readable<boolean>; | ||
ssrRegisterPaneSize: (size: number | null) => void; | ||
ssrRegisterPaneSize?: (size: number | null) => void; | ||
onPaneInit: PaneInitFunction; | ||
onPaneAdd: (pane: IPane) => Promise<void>; | ||
onPaneRemove: (key: any) => Promise<void>; | ||
onPaneClick: (_event: MouseEvent, key: any) => void; | ||
/** Report the manual given size was changed. */ | ||
reportGivenSizeChange: (paneKey: unknown, newGivenSize: number | null) => void; | ||
clientOnly?: { | ||
onPaneAdd: (pane: IPane) => ClientCallbacks; | ||
onPaneRemove: (key: any) => Promise<void>; | ||
}; | ||
} | ||
@@ -25,0 +29,0 @@ export interface IPaneSizingEvent { |
{ | ||
"name": "svelte-splitpanes", | ||
"version": "0.7.11", | ||
"version": "0.7.12", | ||
"description": "A full featured resizable pane layout splitter, ported from vue-splitpanes", | ||
@@ -5,0 +5,0 @@ "author": { |
# Svelte-Splitpanes | ||
A predictable responsive component to layout resizable view panels supporting an multitude of advenced features (min, max, snap, expand on double click, fixed size. | ||
[](https://www.npmjs.com/package/svelte-splitpanes) | ||
 | ||
[](https://orefalo.github.io/svelte-splitpanes/minified-size) | ||
 | ||
 | ||
A _predictable_ responsive component to layout resizable view panels supporting an multitude of advanced features (min/max bounderies, snap, expand on double click, fixed size, rtl). | ||
 | ||
> This library started as a port from the excellent [vue-splitpanes](https://antoniandre.github.io/splitpanes/), and through features and enhancements became one of the best splitpane implementations. | ||
## Why? | ||
To be sucessful, a good framework must come with good components. | ||
Unfortunatly, we couldn't find any decent split pane layout in the Svelte eco-system. | ||
_"To be sucessful, a good framework must come with good components."_ | ||
But we did find one written in vue.js. | ||
Unfortunatly, we couldn't find any decent splitpane widget in the Svelte eco-system. | ||
But we did find one written for vue.js... | ||
So we decided to port it and enhance it. :smile: | ||
> This library started as a port of [vue-splitpanes](https://antoniandre.github.io/splitpanes/) and through feature enhancements, became one of the best splitpane implementation. | ||
Special thanks to all contributors and in particular [Tal500](https://github.com/Tal500) | ||
## Features | ||
- Size is less than 6 kb | ||
- Support both dynamic horizontal and vertical splits | ||
@@ -32,4 +37,4 @@ - Support defaults, min and max sizes | ||
- Support programmatic resizing and two-way size binding | ||
- Support programmatic splitter add/remove | ||
- Support programmatic splitter reordering by Svelte keyed each blocks | ||
- Support programmatic panes add/remove | ||
- Support programmatic panes reordering by Svelte keyed each blocks | ||
- Support for legacy browser such as IE 11 | ||
@@ -36,0 +41,0 @@ - Support for touch devices |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
80552
8.9%24
71.43%311
130.37%335
1.52%