@window-splitter/state
Advanced tools
Comparing version
@@ -0,1 +1,18 @@ | ||
# v1.1.0 (Mon May 26 2025) | ||
#### 🚀 Enhancement | ||
- Add "shiftAmount" prop [#64](https://github.com/hipstersmoothie/window-splitter/pull/64) ([@hipstersmoothie](https://github.com/hipstersmoothie)) | ||
#### 🐛 Bug Fix | ||
- update tests ([@hipstersmoothie](https://github.com/hipstersmoothie)) | ||
- Add "shiftAmount" prop ([@hipstersmoothie](https://github.com/hipstersmoothie)) | ||
#### Authors: 1 | ||
- Andrew Lisowski ([@hipstersmoothie](https://github.com/hipstersmoothie)) | ||
--- | ||
# v0.8.7 (Sun May 11 2025) | ||
@@ -2,0 +19,0 @@ |
@@ -231,2 +231,7 @@ import Big from "big.js"; | ||
autosaveStrategy?: "localStorage" | "cookie"; | ||
/** | ||
* The amount to move the drag handle when shift is held down. | ||
* @default 15px | ||
*/ | ||
shiftAmount?: number; | ||
} | ||
@@ -359,2 +364,3 @@ interface LockGroupEvent { | ||
autosaveStrategy?: "localStorage" | "cookie"; | ||
shiftAmount?: number; | ||
} | ||
@@ -361,0 +367,0 @@ export type State = "idle" | "dragging" | "togglingCollapse"; |
@@ -595,3 +595,3 @@ "use strict"; | ||
if (dragEvent.value.shiftKey) { | ||
moveAmount *= 15; | ||
moveAmount *= context.shiftAmount ?? 15; | ||
} | ||
@@ -963,2 +963,3 @@ if (moveAmount === 0) { | ||
autosaveStrategy: input.autosaveStrategy, | ||
shiftAmount: input.shiftAmount ?? 15, | ||
}; | ||
@@ -965,0 +966,0 @@ const actions = { |
@@ -231,2 +231,7 @@ import Big from "big.js"; | ||
autosaveStrategy?: "localStorage" | "cookie"; | ||
/** | ||
* The amount to move the drag handle when shift is held down. | ||
* @default 15px | ||
*/ | ||
shiftAmount?: number; | ||
} | ||
@@ -359,2 +364,3 @@ interface LockGroupEvent { | ||
autosaveStrategy?: "localStorage" | "cookie"; | ||
shiftAmount?: number; | ||
} | ||
@@ -361,0 +367,0 @@ export type State = "idle" | "dragging" | "togglingCollapse"; |
@@ -566,3 +566,3 @@ import Big from "big.js"; | ||
if (dragEvent.value.shiftKey) { | ||
moveAmount *= 15; | ||
moveAmount *= context.shiftAmount ?? 15; | ||
} | ||
@@ -934,2 +934,3 @@ if (moveAmount === 0) { | ||
autosaveStrategy: input.autosaveStrategy, | ||
shiftAmount: input.shiftAmount ?? 15, | ||
}; | ||
@@ -936,0 +937,0 @@ const actions = { |
@@ -5,3 +5,3 @@ { | ||
"sideEffects": false, | ||
"version": "1.0.2", | ||
"version": "1.1.0", | ||
"description": "A state machine for a WAI-ARIA compliant window splitter", | ||
@@ -33,3 +33,3 @@ "homepage": "https://react-window-splitter-six.vercel.app", | ||
"devDependencies": { | ||
"@internal/eslint-config": "1.0.2", | ||
"@internal/eslint-config": "1.1.0", | ||
"@testing-library/react": "^16.0.0", | ||
@@ -82,3 +82,3 @@ "@types/big.js": "^6.2.2", | ||
"types": "./dist/commonjs/index.d.ts", | ||
"gitHead": "c9d2802d3c8ff3df8d7911b417130ab118ada6c1" | ||
"gitHead": "bb02be9bc8534214871f13704afd741d2fab810f" | ||
} |
@@ -320,2 +320,7 @@ import Big from "big.js"; | ||
autosaveStrategy?: "localStorage" | "cookie"; | ||
/** | ||
* The amount to move the drag handle when shift is held down. | ||
* @default 15px | ||
*/ | ||
shiftAmount?: number; | ||
} | ||
@@ -1123,3 +1128,3 @@ | ||
if (dragEvent.value.shiftKey) { | ||
moveAmount *= 15; | ||
moveAmount *= context.shiftAmount ?? 15; | ||
} | ||
@@ -1694,2 +1699,3 @@ | ||
autosaveStrategy?: "localStorage" | "cookie"; | ||
shiftAmount?: number; | ||
} | ||
@@ -1718,2 +1724,3 @@ | ||
autosaveStrategy: input.autosaveStrategy, | ||
shiftAmount: input.shiftAmount ?? 15, | ||
}; | ||
@@ -1720,0 +1727,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
571465
1.78%45
2.27%7727
0.27%3
-25%