@alisowski/react-resizable-panels
Advanced tools
Comparing version 0.1.5 to 0.1.6
@@ -620,3 +620,3 @@ 'use strict'; | ||
const collapsed = new Set(); | ||
let remainingSize = 0; | ||
let remainingSize = prevSizes.reduce((acc, i) => acc - i, 100); | ||
@@ -1452,2 +1452,4 @@ // First, check all of the proposed sizes against the min/max constraints | ||
} | ||
const groupSizePixels = units === "pixels" ? getAvailableGroupSizePixels(groupId) : NaN; | ||
const collapsedSizeValue = normalizePixelValue(units, groupSizePixels, collapsedSize); | ||
const panelsArray = panelsMapToSortedArray(panels); | ||
@@ -1469,3 +1471,3 @@ const index = panelsArray.indexOf(panel); | ||
const isLastPanel = index === panelsArray.length - 1; | ||
const delta = isLastPanel ? currentSize : collapsedSize - currentSize; | ||
const delta = isLastPanel ? currentSize : collapsedSizeValue - currentSize; | ||
const nextSizes = adjustByDelta(null, committedValuesRef.current, idBefore, idAfter, delta, prevSizes, panelSizeBeforeCollapse.current, null); | ||
@@ -1472,0 +1474,0 @@ if (prevSizes !== nextSizes) { |
@@ -639,3 +639,3 @@ 'use strict'; | ||
const collapsed = new Set(); | ||
let remainingSize = 0; | ||
let remainingSize = prevSizes.reduce((acc, i) => acc - i, 100); | ||
@@ -1501,2 +1501,4 @@ // First, check all of the proposed sizes against the min/max constraints | ||
} | ||
const groupSizePixels = units === "pixels" ? getAvailableGroupSizePixels(groupId) : NaN; | ||
const collapsedSizeValue = normalizePixelValue(units, groupSizePixels, collapsedSize); | ||
const panelsArray = panelsMapToSortedArray(panels); | ||
@@ -1518,3 +1520,3 @@ const index = panelsArray.indexOf(panel); | ||
const isLastPanel = index === panelsArray.length - 1; | ||
const delta = isLastPanel ? currentSize : collapsedSize - currentSize; | ||
const delta = isLastPanel ? currentSize : collapsedSizeValue - currentSize; | ||
const nextSizes = adjustByDelta(null, committedValuesRef.current, idBefore, idAfter, delta, prevSizes, panelSizeBeforeCollapse.current, null); | ||
@@ -1521,0 +1523,0 @@ if (prevSizes !== nextSizes) { |
@@ -615,3 +615,3 @@ import * as React from 'react'; | ||
const collapsed = new Set(); | ||
let remainingSize = 0; | ||
let remainingSize = prevSizes.reduce((acc, i) => acc - i, 100); | ||
@@ -1477,2 +1477,4 @@ // First, check all of the proposed sizes against the min/max constraints | ||
} | ||
const groupSizePixels = units === "pixels" ? getAvailableGroupSizePixels(groupId) : NaN; | ||
const collapsedSizeValue = normalizePixelValue(units, groupSizePixels, collapsedSize); | ||
const panelsArray = panelsMapToSortedArray(panels); | ||
@@ -1494,3 +1496,3 @@ const index = panelsArray.indexOf(panel); | ||
const isLastPanel = index === panelsArray.length - 1; | ||
const delta = isLastPanel ? currentSize : collapsedSize - currentSize; | ||
const delta = isLastPanel ? currentSize : collapsedSizeValue - currentSize; | ||
const nextSizes = adjustByDelta(null, committedValuesRef.current, idBefore, idAfter, delta, prevSizes, panelSizeBeforeCollapse.current, null); | ||
@@ -1497,0 +1499,0 @@ if (prevSizes !== nextSizes) { |
@@ -596,3 +596,3 @@ import * as React from 'react'; | ||
const collapsed = new Set(); | ||
let remainingSize = 0; | ||
let remainingSize = prevSizes.reduce((acc, i) => acc - i, 100); | ||
@@ -1428,2 +1428,4 @@ // First, check all of the proposed sizes against the min/max constraints | ||
} | ||
const groupSizePixels = units === "pixels" ? getAvailableGroupSizePixels(groupId) : NaN; | ||
const collapsedSizeValue = normalizePixelValue(units, groupSizePixels, collapsedSize); | ||
const panelsArray = panelsMapToSortedArray(panels); | ||
@@ -1445,3 +1447,3 @@ const index = panelsArray.indexOf(panel); | ||
const isLastPanel = index === panelsArray.length - 1; | ||
const delta = isLastPanel ? currentSize : collapsedSize - currentSize; | ||
const delta = isLastPanel ? currentSize : collapsedSizeValue - currentSize; | ||
const nextSizes = adjustByDelta(null, committedValuesRef.current, idBefore, idAfter, delta, prevSizes, panelSizeBeforeCollapse.current, null); | ||
@@ -1448,0 +1450,0 @@ if (prevSizes !== nextSizes) { |
@@ -622,3 +622,3 @@ 'use strict'; | ||
const collapsed = new Set(); | ||
let remainingSize = 0; | ||
let remainingSize = prevSizes.reduce((acc, i) => acc - i, 100); | ||
@@ -1454,2 +1454,4 @@ // First, check all of the proposed sizes against the min/max constraints | ||
} | ||
const groupSizePixels = units === "pixels" ? getAvailableGroupSizePixels(groupId) : NaN; | ||
const collapsedSizeValue = normalizePixelValue(units, groupSizePixels, collapsedSize); | ||
const panelsArray = panelsMapToSortedArray(panels); | ||
@@ -1471,3 +1473,3 @@ const index = panelsArray.indexOf(panel); | ||
const isLastPanel = index === panelsArray.length - 1; | ||
const delta = isLastPanel ? currentSize : collapsedSize - currentSize; | ||
const delta = isLastPanel ? currentSize : collapsedSizeValue - currentSize; | ||
const nextSizes = adjustByDelta(null, committedValuesRef.current, idBefore, idAfter, delta, prevSizes, panelSizeBeforeCollapse.current, null); | ||
@@ -1474,0 +1476,0 @@ if (prevSizes !== nextSizes) { |
@@ -641,3 +641,3 @@ 'use strict'; | ||
const collapsed = new Set(); | ||
let remainingSize = 0; | ||
let remainingSize = prevSizes.reduce((acc, i) => acc - i, 100); | ||
@@ -1508,2 +1508,4 @@ // First, check all of the proposed sizes against the min/max constraints | ||
} | ||
const groupSizePixels = units === "pixels" ? getAvailableGroupSizePixels(groupId) : NaN; | ||
const collapsedSizeValue = normalizePixelValue(units, groupSizePixels, collapsedSize); | ||
const panelsArray = panelsMapToSortedArray(panels); | ||
@@ -1525,3 +1527,3 @@ const index = panelsArray.indexOf(panel); | ||
const isLastPanel = index === panelsArray.length - 1; | ||
const delta = isLastPanel ? currentSize : collapsedSize - currentSize; | ||
const delta = isLastPanel ? currentSize : collapsedSizeValue - currentSize; | ||
const nextSizes = adjustByDelta(null, committedValuesRef.current, idBefore, idAfter, delta, prevSizes, panelSizeBeforeCollapse.current, null); | ||
@@ -1528,0 +1530,0 @@ if (prevSizes !== nextSizes) { |
@@ -617,3 +617,3 @@ import * as React from 'react'; | ||
const collapsed = new Set(); | ||
let remainingSize = 0; | ||
let remainingSize = prevSizes.reduce((acc, i) => acc - i, 100); | ||
@@ -1484,2 +1484,4 @@ // First, check all of the proposed sizes against the min/max constraints | ||
} | ||
const groupSizePixels = units === "pixels" ? getAvailableGroupSizePixels(groupId) : NaN; | ||
const collapsedSizeValue = normalizePixelValue(units, groupSizePixels, collapsedSize); | ||
const panelsArray = panelsMapToSortedArray(panels); | ||
@@ -1501,3 +1503,3 @@ const index = panelsArray.indexOf(panel); | ||
const isLastPanel = index === panelsArray.length - 1; | ||
const delta = isLastPanel ? currentSize : collapsedSize - currentSize; | ||
const delta = isLastPanel ? currentSize : collapsedSizeValue - currentSize; | ||
const nextSizes = adjustByDelta(null, committedValuesRef.current, idBefore, idAfter, delta, prevSizes, panelSizeBeforeCollapse.current, null); | ||
@@ -1504,0 +1506,0 @@ if (prevSizes !== nextSizes) { |
@@ -511,3 +511,3 @@ 'use strict'; | ||
const collapsed = new Set(); | ||
let remainingSize = 0; | ||
let remainingSize = prevSizes.reduce((acc, i) => acc - i, 100); | ||
@@ -1295,2 +1295,4 @@ // First, check all of the proposed sizes against the min/max constraints | ||
} | ||
const groupSizePixels = units === "pixels" ? getAvailableGroupSizePixels(groupId) : NaN; | ||
const collapsedSizeValue = normalizePixelValue(units, groupSizePixels, collapsedSize); | ||
const panelsArray = panelsMapToSortedArray(panels); | ||
@@ -1312,3 +1314,3 @@ const index = panelsArray.indexOf(panel); | ||
const isLastPanel = index === panelsArray.length - 1; | ||
const delta = isLastPanel ? currentSize : collapsedSize - currentSize; | ||
const delta = isLastPanel ? currentSize : collapsedSizeValue - currentSize; | ||
const nextSizes = adjustByDelta(null, committedValuesRef.current, idBefore, idAfter, delta, prevSizes, panelSizeBeforeCollapse.current, null); | ||
@@ -1315,0 +1317,0 @@ if (prevSizes !== nextSizes) { |
@@ -487,3 +487,3 @@ import * as React from 'react'; | ||
const collapsed = new Set(); | ||
let remainingSize = 0; | ||
let remainingSize = prevSizes.reduce((acc, i) => acc - i, 100); | ||
@@ -1271,2 +1271,4 @@ // First, check all of the proposed sizes against the min/max constraints | ||
} | ||
const groupSizePixels = units === "pixels" ? getAvailableGroupSizePixels(groupId) : NaN; | ||
const collapsedSizeValue = normalizePixelValue(units, groupSizePixels, collapsedSize); | ||
const panelsArray = panelsMapToSortedArray(panels); | ||
@@ -1288,3 +1290,3 @@ const index = panelsArray.indexOf(panel); | ||
const isLastPanel = index === panelsArray.length - 1; | ||
const delta = isLastPanel ? currentSize : collapsedSize - currentSize; | ||
const delta = isLastPanel ? currentSize : collapsedSizeValue - currentSize; | ||
const nextSizes = adjustByDelta(null, committedValuesRef.current, idBefore, idAfter, delta, prevSizes, panelSizeBeforeCollapse.current, null); | ||
@@ -1291,0 +1293,0 @@ if (prevSizes !== nextSizes) { |
@@ -598,3 +598,3 @@ import * as React from 'react'; | ||
const collapsed = new Set(); | ||
let remainingSize = 0; | ||
let remainingSize = prevSizes.reduce((acc, i) => acc - i, 100); | ||
@@ -1430,2 +1430,4 @@ // First, check all of the proposed sizes against the min/max constraints | ||
} | ||
const groupSizePixels = units === "pixels" ? getAvailableGroupSizePixels(groupId) : NaN; | ||
const collapsedSizeValue = normalizePixelValue(units, groupSizePixels, collapsedSize); | ||
const panelsArray = panelsMapToSortedArray(panels); | ||
@@ -1447,3 +1449,3 @@ const index = panelsArray.indexOf(panel); | ||
const isLastPanel = index === panelsArray.length - 1; | ||
const delta = isLastPanel ? currentSize : collapsedSize - currentSize; | ||
const delta = isLastPanel ? currentSize : collapsedSizeValue - currentSize; | ||
const nextSizes = adjustByDelta(null, committedValuesRef.current, idBefore, idAfter, delta, prevSizes, panelSizeBeforeCollapse.current, null); | ||
@@ -1450,0 +1452,0 @@ if (prevSizes !== nextSizes) { |
@@ -496,3 +496,3 @@ 'use strict'; | ||
const collapsed = new Set(); | ||
let remainingSize = 0; | ||
let remainingSize = prevSizes.reduce((acc, i) => acc - i, 100); | ||
@@ -1245,2 +1245,4 @@ // First, check all of the proposed sizes against the min/max constraints | ||
} | ||
const groupSizePixels = units === "pixels" ? getAvailableGroupSizePixels(groupId) : NaN; | ||
const collapsedSizeValue = normalizePixelValue(units, groupSizePixels, collapsedSize); | ||
const panelsArray = panelsMapToSortedArray(panels); | ||
@@ -1262,3 +1264,3 @@ const index = panelsArray.indexOf(panel); | ||
const isLastPanel = index === panelsArray.length - 1; | ||
const delta = isLastPanel ? currentSize : collapsedSize - currentSize; | ||
const delta = isLastPanel ? currentSize : collapsedSizeValue - currentSize; | ||
const nextSizes = adjustByDelta(null, committedValuesRef.current, idBefore, idAfter, delta, prevSizes, panelSizeBeforeCollapse.current, null); | ||
@@ -1265,0 +1267,0 @@ if (prevSizes !== nextSizes) { |
@@ -472,3 +472,3 @@ import * as React from 'react'; | ||
const collapsed = new Set(); | ||
let remainingSize = 0; | ||
let remainingSize = prevSizes.reduce((acc, i) => acc - i, 100); | ||
@@ -1221,2 +1221,4 @@ // First, check all of the proposed sizes against the min/max constraints | ||
} | ||
const groupSizePixels = units === "pixels" ? getAvailableGroupSizePixels(groupId) : NaN; | ||
const collapsedSizeValue = normalizePixelValue(units, groupSizePixels, collapsedSize); | ||
const panelsArray = panelsMapToSortedArray(panels); | ||
@@ -1238,3 +1240,3 @@ const index = panelsArray.indexOf(panel); | ||
const isLastPanel = index === panelsArray.length - 1; | ||
const delta = isLastPanel ? currentSize : collapsedSize - currentSize; | ||
const delta = isLastPanel ? currentSize : collapsedSizeValue - currentSize; | ||
const nextSizes = adjustByDelta(null, committedValuesRef.current, idBefore, idAfter, delta, prevSizes, panelSizeBeforeCollapse.current, null); | ||
@@ -1241,0 +1243,0 @@ if (prevSizes !== nextSizes) { |
{ | ||
"name": "@alisowski/react-resizable-panels", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"publishConfig": { | ||
@@ -5,0 +5,0 @@ "access": "public" |
@@ -652,2 +652,9 @@ import { isBrowser } from "#is-browser"; | ||
const groupSizePixels = | ||
units === "pixels" ? getAvailableGroupSizePixels(groupId) : NaN; | ||
const collapsedSizeValue = normalizePixelValue( | ||
units, | ||
groupSizePixels, | ||
collapsedSize | ||
); | ||
const panelsArray = panelsMapToSortedArray(panels); | ||
@@ -674,3 +681,3 @@ | ||
const isLastPanel = index === panelsArray.length - 1; | ||
const delta = isLastPanel ? currentSize : collapsedSize - currentSize; | ||
const delta = isLastPanel ? currentSize : collapsedSizeValue - currentSize; | ||
@@ -677,0 +684,0 @@ const nextSizes = adjustByDelta( |
@@ -626,3 +626,3 @@ import { isDevelopment } from "#is-development"; | ||
const collapsed = new Set(); | ||
let remainingSize = 0; | ||
let remainingSize = prevSizes.reduce((acc, i) => acc - i, 100); | ||
@@ -629,0 +629,0 @@ // First, check all of the proposed sizes against the min/max constraints |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
821151
22565