@zag-js/splitter 0.10.0 → 0.10.2

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.
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-3GDOPT5W.mjs";
7
7
  import {
8
8
  getHandleBounds
9
- } from "./chunk-MV44GBQY.mjs";
9
+ } from "./chunk-MXEXJMQ6.mjs";
10
10
 
11
11
  // src/splitter.connect.ts
12
12
  import { getEventKey, getEventStep } from "@zag-js/dom-event";
@@ -15,6 +15,7 @@ function connect(state, send, normalize) {
15
15
  const isHorizontal = state.context.isHorizontal;
16
16
  const isFocused = state.hasTag("focus");
17
17
  const isDragging = state.matches("dragging");
18
+ const panels = state.context.panels;
18
19
  const api = {
19
20
  /**
20
21
  * Whether the splitter is focused.
@@ -29,28 +30,24 @@ function connect(state, send, normalize) {
29
30
  */
30
31
  bounds: getHandleBounds(state.context),
31
32
  /**
32
- * Function to collapse a panel.
33
+ * Function to set a panel to its minimum size.
33
34
  */
34
- collapse(id) {
35
- send({ type: "COLLAPSE", id });
35
+ setToMinSize(id) {
36
+ const panel = panels.find((panel2) => panel2.id === id);
37
+ send({ type: "SET_PANEL_SIZE", id, size: panel?.minSize, src: "setToMinSize" });
36
38
  },
37
39
  /**
38
- * Function to expand a panel.
40
+ * Function to set a panel to its maximum size.
39
41
  */
40
- expand(id) {
41
- send({ type: "EXPAND", id });
42
- },
43
- /**
44
- * Function to toggle a panel between collapsed and expanded.
45
- */
46
- toggle(id) {
47
- send({ type: "TOGGLE", id });
42
+ setToMaxSize(id) {
43
+ const panel = panels.find((panel2) => panel2.id === id);
44
+ send({ type: "SET_PANEL_SIZE", id, size: panel?.maxSize, src: "setToMaxSize" });
48
45
  },
49
46
  /**
50
47
  * Function to set the size of a panel.
51
48
  */
52
49
  setSize(id, size) {
53
- send({ type: "SET_SIZE", id, size });
50
+ send({ type: "SET_PANEL_SIZE", id, size });
54
51
  },
55
52
  /**
56
53
  * Returns the state details for a resize trigger.
@@ -59,13 +56,13 @@ function connect(state, send, normalize) {
59
56
  const { id, disabled } = props;
60
57
  const ids = id.split(":");
61
58
  const panelIds = ids.map((id2) => dom.getPanelId(state.context, id2));
62
- const panels = getHandleBounds(state.context, id);
59
+ const panels2 = getHandleBounds(state.context, id);
63
60
  return {
64
61
  isDisabled: !!disabled,
65
62
  isFocused: state.context.activeResizeId === id && isFocused,
66
63
  panelIds,
67
- min: panels?.min,
68
- max: panels?.max,
64
+ min: panels2?.min,
65
+ max: panels2?.max,
69
66
  value: 0
70
67
  };
71
68
  },
@@ -92,14 +89,6 @@ function connect(state, send, normalize) {
92
89
  style: dom.getPanelStyle(state.context, id)
93
90
  });
94
91
  },
95
- // toggleTriggerProps: normalize.element({
96
- // ...parts.toggleButton.attrs,
97
- // id: dom.getToggleButtonId(state.context),
98
- // "aria-label": state.context.isAtMin ? "Expand Primary Pane" : "Collapse Primary Pane",
99
- // onClick() {
100
- // send("TOGGLE")
101
- // },
102
- // }),
103
92
  getResizeTriggerProps(props) {
104
93
  const { id, disabled, step = 1 } = props;
105
94
  const triggerState = api.getResizeTriggerState(props);
@@ -7,7 +7,7 @@ import {
7
7
  getHandlePanels,
8
8
  getNormalizedPanels,
9
9
  getPanelBounds
10
- } from "./chunk-MV44GBQY.mjs";
10
+ } from "./chunk-MXEXJMQ6.mjs";
11
11
 
12
12
  // src/splitter.machine.ts
13
13
  import { createMachine } from "@zag-js/core";
@@ -41,21 +41,9 @@ function machine(userContext) {
41
41
  panels: (ctx2) => getNormalizedPanels(ctx2)
42
42
  },
43
43
  on: {
44
- COLLAPSE: {
45
- actions: "setStartPanelToMin"
46
- },
47
- EXPAND: {
48
- actions: "setStartPanelToMax"
49
- },
50
- TOGGLE: [
51
- {
52
- guard: "isStartPanelAtMin",
53
- actions: "setStartPanelToMax"
54
- },
55
- {
56
- actions: "setStartPanelToMin"
57
- }
58
- ]
44
+ SET_PANEL_SIZE: {
45
+ actions: "setPanelSize"
46
+ }
59
47
  },
60
48
  states: {
61
49
  idle: {
@@ -202,6 +190,13 @@ function machine(userContext) {
202
190
  size: panel.size
203
191
  }));
204
192
  },
193
+ setPanelSize(ctx2, evt) {
194
+ const { id, size } = evt;
195
+ ctx2.size = ctx2.size.map((panel) => {
196
+ const panelSize = clamp(size, panel.minSize ?? 0, panel.maxSize ?? 100);
197
+ return panel.id === id ? { ...panel, size: panelSize } : panel;
198
+ });
199
+ },
205
200
  setStartPanelToMin(ctx2) {
206
201
  const bounds = getPanelBounds(ctx2);
207
202
  if (!bounds)
@@ -9,7 +9,7 @@ function getNormalizedPanels(ctx) {
9
9
  let totalSize = 0;
10
10
  let totalMinSize = 0;
11
11
  const panels = ctx.size.map((panel) => {
12
- const minSize = panel.minSize ?? 10;
12
+ const minSize = panel.minSize ?? 0;
13
13
  const maxSize = panel.maxSize ?? 100;
14
14
  totalMinSize += minSize;
15
15
  if (panel.size == null) {
package/dist/index.js CHANGED
@@ -103,7 +103,7 @@ function getNormalizedPanels(ctx) {
103
103
  let totalSize = 0;
104
104
  let totalMinSize = 0;
105
105
  const panels = ctx.size.map((panel) => {
106
- const minSize = panel.minSize ?? 10;
106
+ const minSize = panel.minSize ?? 0;
107
107
  const maxSize = panel.maxSize ?? 100;
108
108
  totalMinSize += minSize;
109
109
  if (panel.size == null) {
@@ -219,6 +219,7 @@ function connect(state, send, normalize) {
219
219
  const isHorizontal = state.context.isHorizontal;
220
220
  const isFocused = state.hasTag("focus");
221
221
  const isDragging = state.matches("dragging");
222
+ const panels = state.context.panels;
222
223
  const api = {
223
224
  /**
224
225
  * Whether the splitter is focused.
@@ -233,28 +234,24 @@ function connect(state, send, normalize) {
233
234
  */
234
235
  bounds: getHandleBounds(state.context),
235
236
  /**
236
- * Function to collapse a panel.
237
+ * Function to set a panel to its minimum size.
237
238
  */
238
- collapse(id) {
239
- send({ type: "COLLAPSE", id });
239
+ setToMinSize(id) {
240
+ const panel = panels.find((panel2) => panel2.id === id);
241
+ send({ type: "SET_PANEL_SIZE", id, size: panel?.minSize, src: "setToMinSize" });
240
242
  },
241
243
  /**
242
- * Function to expand a panel.
244
+ * Function to set a panel to its maximum size.
243
245
  */
244
- expand(id) {
245
- send({ type: "EXPAND", id });
246
- },
247
- /**
248
- * Function to toggle a panel between collapsed and expanded.
249
- */
250
- toggle(id) {
251
- send({ type: "TOGGLE", id });
246
+ setToMaxSize(id) {
247
+ const panel = panels.find((panel2) => panel2.id === id);
248
+ send({ type: "SET_PANEL_SIZE", id, size: panel?.maxSize, src: "setToMaxSize" });
252
249
  },
253
250
  /**
254
251
  * Function to set the size of a panel.
255
252
  */
256
253
  setSize(id, size) {
257
- send({ type: "SET_SIZE", id, size });
254
+ send({ type: "SET_PANEL_SIZE", id, size });
258
255
  },
259
256
  /**
260
257
  * Returns the state details for a resize trigger.
@@ -263,13 +260,13 @@ function connect(state, send, normalize) {
263
260
  const { id, disabled } = props;
264
261
  const ids = id.split(":");
265
262
  const panelIds = ids.map((id2) => dom.getPanelId(state.context, id2));
266
- const panels = getHandleBounds(state.context, id);
263
+ const panels2 = getHandleBounds(state.context, id);
267
264
  return {
268
265
  isDisabled: !!disabled,
269
266
  isFocused: state.context.activeResizeId === id && isFocused,
270
267
  panelIds,
271
- min: panels?.min,
272
- max: panels?.max,
268
+ min: panels2?.min,
269
+ max: panels2?.max,
273
270
  value: 0
274
271
  };
275
272
  },
@@ -296,14 +293,6 @@ function connect(state, send, normalize) {
296
293
  style: dom.getPanelStyle(state.context, id)
297
294
  });
298
295
  },
299
- // toggleTriggerProps: normalize.element({
300
- // ...parts.toggleButton.attrs,
301
- // id: dom.getToggleButtonId(state.context),
302
- // "aria-label": state.context.isAtMin ? "Expand Primary Pane" : "Collapse Primary Pane",
303
- // onClick() {
304
- // send("TOGGLE")
305
- // },
306
- // }),
307
296
  getResizeTriggerProps(props) {
308
297
  const { id, disabled, step = 1 } = props;
309
298
  const triggerState = api.getResizeTriggerState(props);
@@ -432,21 +421,9 @@ function machine(userContext) {
432
421
  panels: (ctx2) => getNormalizedPanels(ctx2)
433
422
  },
434
423
  on: {
435
- COLLAPSE: {
436
- actions: "setStartPanelToMin"
437
- },
438
- EXPAND: {
439
- actions: "setStartPanelToMax"
440
- },
441
- TOGGLE: [
442
- {
443
- guard: "isStartPanelAtMin",
444
- actions: "setStartPanelToMax"
445
- },
446
- {
447
- actions: "setStartPanelToMin"
448
- }
449
- ]
424
+ SET_PANEL_SIZE: {
425
+ actions: "setPanelSize"
426
+ }
450
427
  },
451
428
  states: {
452
429
  idle: {
@@ -593,6 +570,13 @@ function machine(userContext) {
593
570
  size: panel.size
594
571
  }));
595
572
  },
573
+ setPanelSize(ctx2, evt) {
574
+ const { id, size } = evt;
575
+ ctx2.size = ctx2.size.map((panel) => {
576
+ const panelSize = clamp(size, panel.minSize ?? 0, panel.maxSize ?? 100);
577
+ return panel.id === id ? { ...panel, size: panelSize } : panel;
578
+ });
579
+ },
596
580
  setStartPanelToMin(ctx2) {
597
581
  const bounds = getPanelBounds(ctx2);
598
582
  if (!bounds)
package/dist/index.mjs CHANGED
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  connect
3
- } from "./chunk-FCVFZHPC.mjs";
3
+ } from "./chunk-2ZKYBJFK.mjs";
4
4
  import {
5
5
  anatomy
6
6
  } from "./chunk-HPRMFGOY.mjs";
7
7
  import {
8
8
  machine
9
- } from "./chunk-64C2WGI5.mjs";
9
+ } from "./chunk-E3EBKL5P.mjs";
10
10
  import "./chunk-3GDOPT5W.mjs";
11
- import "./chunk-MV44GBQY.mjs";
11
+ import "./chunk-MXEXJMQ6.mjs";
12
12
  export {
13
13
  anatomy,
14
14
  connect,
@@ -19,17 +19,13 @@ declare function connect<T extends PropTypes>(state: State, send: Send, normaliz
19
19
  max: number;
20
20
  } | undefined;
21
21
  /**
22
- * Function to collapse a panel.
22
+ * Function to set a panel to its minimum size.
23
23
  */
24
- collapse(id: PanelId): void;
24
+ setToMinSize(id: PanelId): void;
25
25
  /**
26
- * Function to expand a panel.
26
+ * Function to set a panel to its maximum size.
27
27
  */
28
- expand(id: PanelId): void;
29
- /**
30
- * Function to toggle a panel between collapsed and expanded.
31
- */
32
- toggle(id: PanelId): void;
28
+ setToMaxSize(id: PanelId): void;
33
29
  /**
34
30
  * Function to set the size of a panel.
35
31
  */
@@ -126,6 +126,7 @@ function connect(state, send, normalize) {
126
126
  const isHorizontal = state.context.isHorizontal;
127
127
  const isFocused = state.hasTag("focus");
128
128
  const isDragging = state.matches("dragging");
129
+ const panels = state.context.panels;
129
130
  const api = {
130
131
  /**
131
132
  * Whether the splitter is focused.
@@ -140,28 +141,24 @@ function connect(state, send, normalize) {
140
141
  */
141
142
  bounds: getHandleBounds(state.context),
142
143
  /**
143
- * Function to collapse a panel.
144
+ * Function to set a panel to its minimum size.
144
145
  */
145
- collapse(id) {
146
- send({ type: "COLLAPSE", id });
146
+ setToMinSize(id) {
147
+ const panel = panels.find((panel2) => panel2.id === id);
148
+ send({ type: "SET_PANEL_SIZE", id, size: panel?.minSize, src: "setToMinSize" });
147
149
  },
148
150
  /**
149
- * Function to expand a panel.
151
+ * Function to set a panel to its maximum size.
150
152
  */
151
- expand(id) {
152
- send({ type: "EXPAND", id });
153
- },
154
- /**
155
- * Function to toggle a panel between collapsed and expanded.
156
- */
157
- toggle(id) {
158
- send({ type: "TOGGLE", id });
153
+ setToMaxSize(id) {
154
+ const panel = panels.find((panel2) => panel2.id === id);
155
+ send({ type: "SET_PANEL_SIZE", id, size: panel?.maxSize, src: "setToMaxSize" });
159
156
  },
160
157
  /**
161
158
  * Function to set the size of a panel.
162
159
  */
163
160
  setSize(id, size) {
164
- send({ type: "SET_SIZE", id, size });
161
+ send({ type: "SET_PANEL_SIZE", id, size });
165
162
  },
166
163
  /**
167
164
  * Returns the state details for a resize trigger.
@@ -170,13 +167,13 @@ function connect(state, send, normalize) {
170
167
  const { id, disabled } = props;
171
168
  const ids = id.split(":");
172
169
  const panelIds = ids.map((id2) => dom.getPanelId(state.context, id2));
173
- const panels = getHandleBounds(state.context, id);
170
+ const panels2 = getHandleBounds(state.context, id);
174
171
  return {
175
172
  isDisabled: !!disabled,
176
173
  isFocused: state.context.activeResizeId === id && isFocused,
177
174
  panelIds,
178
- min: panels?.min,
179
- max: panels?.max,
175
+ min: panels2?.min,
176
+ max: panels2?.max,
180
177
  value: 0
181
178
  };
182
179
  },
@@ -203,14 +200,6 @@ function connect(state, send, normalize) {
203
200
  style: dom.getPanelStyle(state.context, id)
204
201
  });
205
202
  },
206
- // toggleTriggerProps: normalize.element({
207
- // ...parts.toggleButton.attrs,
208
- // id: dom.getToggleButtonId(state.context),
209
- // "aria-label": state.context.isAtMin ? "Expand Primary Pane" : "Collapse Primary Pane",
210
- // onClick() {
211
- // send("TOGGLE")
212
- // },
213
- // }),
214
203
  getResizeTriggerProps(props) {
215
204
  const { id, disabled, step = 1 } = props;
216
205
  const triggerState = api.getResizeTriggerState(props);
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  connect
3
- } from "./chunk-FCVFZHPC.mjs";
3
+ } from "./chunk-2ZKYBJFK.mjs";
4
4
  import "./chunk-HPRMFGOY.mjs";
5
5
  import "./chunk-3GDOPT5W.mjs";
6
- import "./chunk-MV44GBQY.mjs";
6
+ import "./chunk-MXEXJMQ6.mjs";
7
7
  export {
8
8
  connect
9
9
  };
@@ -96,7 +96,7 @@ function getNormalizedPanels(ctx) {
96
96
  let totalSize = 0;
97
97
  let totalMinSize = 0;
98
98
  const panels = ctx.size.map((panel) => {
99
- const minSize = panel.minSize ?? 10;
99
+ const minSize = panel.minSize ?? 0;
100
100
  const maxSize = panel.maxSize ?? 100;
101
101
  totalMinSize += minSize;
102
102
  if (panel.size == null) {
@@ -235,21 +235,9 @@ function machine(userContext) {
235
235
  panels: (ctx2) => getNormalizedPanels(ctx2)
236
236
  },
237
237
  on: {
238
- COLLAPSE: {
239
- actions: "setStartPanelToMin"
240
- },
241
- EXPAND: {
242
- actions: "setStartPanelToMax"
243
- },
244
- TOGGLE: [
245
- {
246
- guard: "isStartPanelAtMin",
247
- actions: "setStartPanelToMax"
248
- },
249
- {
250
- actions: "setStartPanelToMin"
251
- }
252
- ]
238
+ SET_PANEL_SIZE: {
239
+ actions: "setPanelSize"
240
+ }
253
241
  },
254
242
  states: {
255
243
  idle: {
@@ -396,6 +384,13 @@ function machine(userContext) {
396
384
  size: panel.size
397
385
  }));
398
386
  },
387
+ setPanelSize(ctx2, evt) {
388
+ const { id, size } = evt;
389
+ ctx2.size = ctx2.size.map((panel) => {
390
+ const panelSize = clamp(size, panel.minSize ?? 0, panel.maxSize ?? 100);
391
+ return panel.id === id ? { ...panel, size: panelSize } : panel;
392
+ });
393
+ },
399
394
  setStartPanelToMin(ctx2) {
400
395
  const bounds = getPanelBounds(ctx2);
401
396
  if (!bounds)
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  machine
3
- } from "./chunk-64C2WGI5.mjs";
3
+ } from "./chunk-E3EBKL5P.mjs";
4
4
  import "./chunk-3GDOPT5W.mjs";
5
- import "./chunk-MV44GBQY.mjs";
5
+ import "./chunk-MXEXJMQ6.mjs";
6
6
  export {
7
7
  machine
8
8
  };
@@ -37,7 +37,7 @@ function getNormalizedPanels(ctx) {
37
37
  let totalSize = 0;
38
38
  let totalMinSize = 0;
39
39
  const panels = ctx.size.map((panel) => {
40
- const minSize = panel.minSize ?? 10;
40
+ const minSize = panel.minSize ?? 0;
41
41
  const maxSize = panel.maxSize ?? 100;
42
42
  totalMinSize += minSize;
43
43
  if (panel.size == null) {
@@ -4,7 +4,7 @@ import {
4
4
  getHandlePanels,
5
5
  getNormalizedPanels,
6
6
  getPanelBounds
7
- } from "./chunk-MV44GBQY.mjs";
7
+ } from "./chunk-MXEXJMQ6.mjs";
8
8
  export {
9
9
  clamp,
10
10
  getHandleBounds,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zag-js/splitter",
3
- "version": "0.10.0",
3
+ "version": "0.10.2",
4
4
  "description": "Core logic for the splitter widget implemented as a state machine",
5
5
  "keywords": [
6
6
  "js",
@@ -28,13 +28,13 @@
28
28
  "url": "https://github.com/chakra-ui/zag/issues"
29
29
  },
30
30
  "dependencies": {
31
- "@zag-js/anatomy": "0.10.0",
32
- "@zag-js/core": "0.10.0",
33
- "@zag-js/types": "0.10.0",
34
- "@zag-js/dom-query": "0.10.0",
35
- "@zag-js/dom-event": "0.10.0",
36
- "@zag-js/number-utils": "0.10.0",
37
- "@zag-js/utils": "0.10.0"
31
+ "@zag-js/anatomy": "0.10.2",
32
+ "@zag-js/core": "0.10.2",
33
+ "@zag-js/types": "0.10.2",
34
+ "@zag-js/dom-query": "0.10.2",
35
+ "@zag-js/dom-event": "0.10.2",
36
+ "@zag-js/number-utils": "0.10.2",
37
+ "@zag-js/utils": "0.10.2"
38
38
  },
39
39
  "devDependencies": {
40
40
  "clean-package": "2.2.0"
@@ -10,6 +10,7 @@ export function connect<T extends PropTypes>(state: State, send: Send, normalize
10
10
  const isHorizontal = state.context.isHorizontal
11
11
  const isFocused = state.hasTag("focus")
12
12
  const isDragging = state.matches("dragging")
13
+ const panels = state.context.panels
13
14
 
14
15
  const api = {
15
16
  /**
@@ -25,28 +26,24 @@ export function connect<T extends PropTypes>(state: State, send: Send, normalize
25
26
  */
26
27
  bounds: getHandleBounds(state.context),
27
28
  /**
28
- * Function to collapse a panel.
29
+ * Function to set a panel to its minimum size.
29
30
  */
30
- collapse(id: PanelId) {
31
- send({ type: "COLLAPSE", id })
31
+ setToMinSize(id: PanelId) {
32
+ const panel = panels.find((panel) => panel.id === id)
33
+ send({ type: "SET_PANEL_SIZE", id, size: panel?.minSize, src: "setToMinSize" })
32
34
  },
33
35
  /**
34
- * Function to expand a panel.
36
+ * Function to set a panel to its maximum size.
35
37
  */
36
- expand(id: PanelId) {
37
- send({ type: "EXPAND", id })
38
- },
39
- /**
40
- * Function to toggle a panel between collapsed and expanded.
41
- */
42
- toggle(id: PanelId) {
43
- send({ type: "TOGGLE", id })
38
+ setToMaxSize(id: PanelId) {
39
+ const panel = panels.find((panel) => panel.id === id)
40
+ send({ type: "SET_PANEL_SIZE", id, size: panel?.maxSize, src: "setToMaxSize" })
44
41
  },
45
42
  /**
46
43
  * Function to set the size of a panel.
47
44
  */
48
45
  setSize(id: PanelId, size: number) {
49
- send({ type: "SET_SIZE", id, size })
46
+ send({ type: "SET_PANEL_SIZE", id, size })
50
47
  },
51
48
  /**
52
49
  * Returns the state details for a resize trigger.
@@ -92,15 +89,6 @@ export function connect<T extends PropTypes>(state: State, send: Send, normalize
92
89
  })
93
90
  },
94
91
 
95
- // toggleTriggerProps: normalize.element({
96
- // ...parts.toggleButton.attrs,
97
- // id: dom.getToggleButtonId(state.context),
98
- // "aria-label": state.context.isAtMin ? "Expand Primary Pane" : "Collapse Primary Pane",
99
- // onClick() {
100
- // send("TOGGLE")
101
- // },
102
- // }),
103
-
104
92
  getResizeTriggerProps(props: ResizeTriggerProps) {
105
93
  const { id, disabled, step = 1 } = props
106
94
  const triggerState = api.getResizeTriggerState(props)
@@ -37,21 +37,9 @@ export function machine(userContext: UserDefinedContext) {
37
37
  },
38
38
 
39
39
  on: {
40
- COLLAPSE: {
41
- actions: "setStartPanelToMin",
40
+ SET_PANEL_SIZE: {
41
+ actions: "setPanelSize",
42
42
  },
43
- EXPAND: {
44
- actions: "setStartPanelToMax",
45
- },
46
- TOGGLE: [
47
- {
48
- guard: "isStartPanelAtMin",
49
- actions: "setStartPanelToMax",
50
- },
51
- {
52
- actions: "setStartPanelToMin",
53
- },
54
- ],
55
43
  },
56
44
  states: {
57
45
  idle: {
@@ -202,6 +190,13 @@ export function machine(userContext: UserDefinedContext) {
202
190
  size: panel.size,
203
191
  }))
204
192
  },
193
+ setPanelSize(ctx, evt) {
194
+ const { id, size } = evt
195
+ ctx.size = ctx.size.map((panel) => {
196
+ const panelSize = clamp(size, panel.minSize ?? 0, panel.maxSize ?? 100)
197
+ return panel.id === id ? { ...panel, size: panelSize } : panel
198
+ })
199
+ },
205
200
  setStartPanelToMin(ctx) {
206
201
  const bounds = getPanelBounds(ctx)
207
202
  if (!bounds) return
@@ -12,7 +12,7 @@ export function getNormalizedPanels(ctx: Ctx): NormalizedPanelData {
12
12
  let totalMinSize = 0
13
13
 
14
14
  const panels = ctx.size.map((panel) => {
15
- const minSize = panel.minSize ?? 10
15
+ const minSize = panel.minSize ?? 0
16
16
  const maxSize = panel.maxSize ?? 100
17
17
 
18
18
  totalMinSize += minSize