@window-splitter/state 1.1.3 → 1.1.4
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/.turbo/turbo-build.log +1 -1
- package/.turbo/turbo-test.log +24 -52
- package/CHANGELOG.md +17 -0
- package/dist/commonjs/index.js +2 -2
- package/dist/commonjs/index.js.map +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/package.json +19 -19
- package/src/index.ts +2 -2
- package/src/machine.test.ts +74 -0
- package/.turbo/turbo-lint.log +0 -18
- package/LICENSE +0 -7
package/dist/esm/index.js
CHANGED
|
@@ -873,7 +873,7 @@ function handleOverflow(context) {
|
|
|
873
873
|
});
|
|
874
874
|
const totalSize = pixelItems.reduce((acc, i) => acc.add(i), new Big(0));
|
|
875
875
|
const overflow = totalSize.abs().sub(groupSize);
|
|
876
|
-
if (overflow.
|
|
876
|
+
if (overflow.abs().lt(1) || groupSize.eq(0)) {
|
|
877
877
|
return context;
|
|
878
878
|
}
|
|
879
879
|
let newContext = { ...context, items: prepareItems(context) };
|
|
@@ -1300,7 +1300,7 @@ export function groupMachine(input, onUpdate) {
|
|
|
1300
1300
|
context.items = withLastKnownSize;
|
|
1301
1301
|
}
|
|
1302
1302
|
else if (totalSize > getGroupSize(context) &&
|
|
1303
|
-
state.current
|
|
1303
|
+
state.current === "idle") {
|
|
1304
1304
|
context.items = handleOverflow({
|
|
1305
1305
|
...context,
|
|
1306
1306
|
items: prepareItems({ ...context, items: withLastKnownSize }),
|