@window-splitter/state 1.1.0 → 1.1.1

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.
@@ -1,5 +1,5 @@
1
1
 
2
2
  
3
- > @window-splitter/state@1.0.2 build /Users/andrew/Documents/react-window-splitter/packages/state
3
+ > @window-splitter/state@1.1.0 build /Users/alisowski/Documents/react-window-splitter/packages/state
4
4
  > tshy
5
5
 
@@ -1,6 +1,6 @@
1
1
 
2
2
  
3
- > @window-splitter/state@1.0.2 lint /Users/andrew/Documents/react-window-splitter/packages/state
3
+ > @window-splitter/state@1.1.0 lint /Users/alisowski/Documents/react-window-splitter/packages/state
4
4
  > eslint .
5
5
 
6
6
  =============
@@ -1,144 +1,52 @@
1
1
 
2
2
  
3
- > @window-splitter/state@1.0.2 test /Users/andrew/Documents/react-window-splitter/packages/state
4
- > vitest "-u"
3
+ > @window-splitter/state@1.1.0 test /Users/alisowski/Documents/react-window-splitter/packages/state
4
+ > vitest
5
5
 
6
6
  [?25l Vitest  No browser "instances" were defined. Running tests in "chromium" browser. The "browser.name" field is deprecated since Vitest 3. Read more: https://vitest.dev/guide/browser/config#browser-instances
7
7
   Vitest  "providerOptions" is ignored because it's overridden by the configs. To hide this warning, remove the "providerOptions" property from the browser configuration.
8
8
 
9
-  DEV  v3.1.2 /Users/andrew/Documents/react-window-splitter/packages/state
10
-
11
- [?2026h
12
-  Test Files 0 passed (2)
13
-  Tests 0 passed (0)
14
-  Start at 22:54:07
15
-  Duration 969ms
16
- [?2026l[?2026h
17
-  ❯  chromium  src/machine.test.ts [queued]
18
-
19
-  Test Files 0 passed (2)
20
-  Tests 0 passed (0)
21
-  Start at 22:54:07
22
-  Duration 1.79s
23
- [?2026l[?2026h
24
-   chromium  src/machine.test.ts 0/53
25
-
26
-  Test Files 0 passed (2)
27
-  Tests 0 passed (53)
28
-  Start at 22:54:07
29
-  Duration 1.90s
30
- [?2026l[?2026h
31
-   chromium  src/machine.test.ts 1/53
32
-
33
-  Test Files 0 passed (2)
34
-  Tests 1 passed (53)
35
-  Start at 22:54:07
36
-  Duration 2.00s
37
- [?2026l[?2026h
38
-   chromium  src/machine.test.ts 20/53
39
-
40
-  Test Files 0 passed (2)
41
-  Tests 20 passed (53)
42
-  Start at 22:54:07
43
-  Duration 2.30s
44
- [?2026l[?2026h
45
-   chromium  src/machine.test.ts 21/53
46
-
47
-  Test Files 0 passed (2)
48
-  Tests 21 passed (53)
49
-  Start at 22:54:07
50
-  Duration 2.60s
51
- [?2026l[?2026h
52
-  ❯  chromium  src/machine.test.ts 21/53
53
-
54
-  Test Files 0 passed (2)
55
-  Tests 21 passed (53)
56
-  Start at 22:54:07
57
-  Duration 2.90s
58
- [?2026l[?2026h
59
-  ❯  chromium  src/machine.test.ts 22/53
60
-
61
-  Test Files 0 passed (2)
62
-  Tests 22 passed (53)
63
-  Start at 22:54:07
64
-  Duration 3.11s
65
- [?2026l[?2026h
66
-  ❯  chromium  src/machine.test.ts 23/53
67
-
68
-  Test Files 0 passed (2)
69
-  Tests 23 passed (53)
70
-  Start at 22:54:07
71
-  Duration 3.71s
72
- [?2026l[?2026h
73
-  ❯  chromium  src/machine.test.ts 24/53
74
-
75
-  Test Files 0 passed (2)
76
-  Tests 24 passed (53)
77
-  Start at 22:54:07
78
-  Duration 3.91s
79
- [?2026l[?2026h
80
-  ❯  chromium  src/machine.test.ts 28/53
81
-
82
-  Test Files 0 passed (2)
83
-  Tests 28 passed (53)
84
-  Start at 22:54:07
85
-  Duration 4.11s
86
- [?2026l[?2026h
87
-  ❯  chromium  src/machine.test.ts 30/53
88
-
89
-  Test Files 0 passed (2)
90
-  Tests 30 passed (53)
91
-  Start at 22:54:07
92
-  Duration 4.31s
93
- [?2026l[?2026h
94
-  ❯  chromium  src/machine.test.ts 32/53
95
-
96
-  Test Files 0 passed (2)
97
-  Tests 32 passed (53)
98
-  Start at 22:54:07
99
-  Duration 4.52s
100
- [?2026l[?2026h
101
-  ❯  chromium  src/machine.test.ts 33/53
102
-
103
-  Test Files 0 passed (2)
104
-  Tests 33 passed (53)
105
-  Start at 22:54:07
106
-  Duration 4.92s
107
- [?2026l[?2026h
108
-  ❯  chromium  src/machine.test.ts 34/53
109
-
110
-  Test Files 0 passed (2)
111
-  Tests 34 passed (53)
112
-  Start at 22:54:07
113
-  Duration 5.02s
114
- [?2026l[?2026h
115
-  ❯  chromium  src/machine.test.ts 37/53
116
-
117
-  Test Files 0 passed (2)
118
-  Tests 37 passed (53)
119
-  Start at 22:54:07
120
-  Duration 5.22s
121
- [?2026l[?2026h
122
-  ❯  chromium  src/machine.test.ts 53/53
123
-
124
-  Test Files 0 passed (2)
125
-  Tests 53 passed (53)
126
-  Start at 22:54:07
127
-  Duration 5.32s
128
- [?2026l ✓  chromium  src/machine.test.ts (53 tests) 3406ms
129
- ✓ collapsible panel > panel can be collapsible: ease-in-out  305ms
130
- ✓ collapsible panel > panel can be collapsible: bounce  311ms
131
- ✓ collapsible panel > panel can be collapsible: { duration: 500, easing: 'linear' }  512ms
132
- ✓ collapsible panel > panel can be collapsible: { duration: 1000, easing: [Function springEasing] }  609ms
133
- ✓ collapsible panel > panel collapse can be controlled - event  421ms
134
- ✓  chromium  src/utils.test.ts (15 tests) 2ms
135
-
136
-  Snapshots  2 updated 
137
-  Test Files  2 passed (2)
138
-  Tests  68 passed (68)
139
-  Start at  22:54:07
140
-  Duration  5.42s (transform 0ms, setup 0ms, collect 120ms, tests 3.41s, environment 0ms, prepare 31ms)
141
-
142
-  PASS  Waiting for file changes...
9
+  DEV  v3.1.2 /Users/alisowski/Documents/react-window-splitter/packages/state
10
+
11
+ ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Unhandled Errors ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
12
+ 
13
+ Vitest caught 1 unhandled error during the test run.
14
+ This might cause false positive tests. Resolve unhandled errors to make sure your tests are not affected.
15
+
16
+ ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Unhandled Error ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
17
+ Error: browserType.launch: Executable doesn't exist at /Users/alisowski/Library/Caches/ms-playwright/chromium-1129/chrome-mac/Chromium.app/Contents/MacOS/Chromium
18
+ ╔═════════════════════════════════════════════════════════════════════════╗
19
+ Looks like Playwright Test or Playwright was just installed or updated. ║
20
+ Please run the following command to download new browsers: ║
21
+ ║ ║
22
+ ║ pnpm exec playwright install ║
23
+ ║ ║
24
+ <3 Playwright Team ║
25
+ ╚═════════════════════════════════════════════════════════════════════════╝
26
+  ❯ ../../node_modules/.pnpm/@vitest+browser@3.1.2_msw@2.7.5_@types+node@22.2.0_typescript@5.8.3__playwright@1.46.0_vite@6_6lgmypomaxigetn6t5bxx22m2q/node_modules/@vitest/browser/dist/webdriver-BzjiKqT8.js:58:55
27
+  ❯ PlaywrightBrowserProvider.createContext ../../node_modules/.pnpm/@vitest+browser@3.1.2_msw@2.7.5_@types+node@22.2.0_typescript@5.8.3__playwright@1.46.0_vite@6_6lgmypomaxigetn6t5bxx22m2q/node_modules/@vitest/browser/dist/webdriver-BzjiKqT8.js:172:19
28
+  ❯ PlaywrightBrowserProvider.openBrowserPage ../../node_modules/.pnpm/@vitest+browser@3.1.2_msw@2.7.5_@types+node@22.2.0_typescript@5.8.3__playwright@1.46.0_vite@6_6lgmypomaxigetn6t5bxx22m2q/node_modules/@vitest/browser/dist/webdriver-BzjiKqT8.js:227:19
29
+  ❯ PlaywrightBrowserProvider.openPage ../../node_modules/.pnpm/@vitest+browser@3.1.2_msw@2.7.5_@types+node@22.2.0_typescript@5.8.3__playwright@1.46.0_vite@6_6lgmypomaxigetn6t5bxx22m2q/node_modules/@vitest/browser/dist/webdriver-BzjiKqT8.js:238:23
30
+  ❯ BrowserPool.openPage ../../node_modules/.pnpm/@vitest+browser@3.1.2_msw@2.7.5_@types+node@22.2.0_typescript@5.8.3__playwright@1.46.0_vite@6_6lgmypomaxigetn6t5bxx22m2q/node_modules/@vitest/browser/dist/index.js:3343:3
31
+  ❯ BrowserPool.runTests ../../node_modules/.pnpm/@vitest+browser@3.1.2_msw@2.7.5_@types+node@22.2.0_typescript@5.8.3__playwright@1.46.0_vite@6_6lgmypomaxigetn6t5bxx22m2q/node_modules/@vitest/browser/dist/index.js:3335:3
32
+  ❯ async file:/Users/alisowski/Documents/react-window-splitter/node_modules/.pnpm/@vitest+browser@3.1.2_msw@2.7.5_@types+node@22.2.0_typescript@5.8.3__playwright@1.46.0_vite@6_6lgmypomaxigetn6t5bxx22m2q/node_modules/@vitest/browser/dist/index.js:3258:4
33
+  ❯ runWorkspaceTests ../../node_modules/.pnpm/@vitest+browser@3.1.2_msw@2.7.5_@types+node@22.2.0_typescript@5.8.3__playwright@1.46.0_vite@6_6lgmypomaxigetn6t5bxx22m2q/node_modules/@vitest/browser/dist/index.js:3247:3
34
+  ❯ executeTests ../../node_modules/.pnpm/vitest@3.1.2_@types+debug@4.1.12_@types+node@22.2.0_@vitest+browser@3.1.2_jiti@2.4.2_jsdom@24_g57eq4otlg34wmkqobl7udxrka/node_modules/vitest/dist/chunks/coverage.BUdIvXbr.js:7710:3
35
+  ❯ async file:/Users/alisowski/Documents/react-window-splitter/node_modules/.pnpm/vitest@3.1.2_@types+debug@4.1.12_@types+node@22.2.0_@vitest+browser@3.1.2_jiti@2.4.2_jsdom@24_g57eq4otlg34wmkqobl7udxrka/node_modules/vitest/dist/chunks/cli-api.z029PxYZ.js:9240:6
36
+  ❯ Vitest.runFiles ../../node_modules/.pnpm/vitest@3.1.2_@types+debug@4.1.12_@types+node@22.2.0_@vitest+browser@3.1.2_jiti@2.4.2_jsdom@24_g57eq4otlg34wmkqobl7udxrka/node_modules/vitest/dist/chunks/cli-api.z029PxYZ.js:9267:10
37
+  ❯ Vitest.start ../../node_modules/.pnpm/vitest@3.1.2_@types+debug@4.1.12_@types+node@22.2.0_@vitest+browser@3.1.2_jiti@2.4.2_jsdom@24_g57eq4otlg34wmkqobl7udxrka/node_modules/vitest/dist/chunks/cli-api.z029PxYZ.js:9151:18
38
+  ❯ startVitest ../../node_modules/.pnpm/vitest@3.1.2_@types+debug@4.1.12_@types+node@22.2.0_@vitest+browser@3.1.2_jiti@2.4.2_jsdom@24_g57eq4otlg34wmkqobl7udxrka/node_modules/vitest/dist/chunks/cli-api.z029PxYZ.js:10211:4
39
+  ❯ start ../../node_modules/.pnpm/vitest@3.1.2_@types+debug@4.1.12_@types+node@22.2.0_@vitest+browser@3.1.2_jiti@2.4.2_jsdom@24_g57eq4otlg34wmkqobl7udxrka/node_modules/vitest/dist/chunks/cac.C5_4mAsf.js:1468:15
40
+
41
+ ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
42
+
43
+
44
+  Test Files   (2)
45
+  Tests  no tests
46
+  Errors  1 error
47
+  Start at  15:01:22
48
+  Duration  251ms (transform 0ms, setup 0ms, collect 0ms, tests 0ms, environment 0ms, prepare 0ms)
49
+
50
+  FAIL  Tests failed. Watching for file changes...
143
51
  press h to show help, press q to quit
144
- [?25h[?25h ELIFECYCLE  Test failed. See above for more details.
52
+ [?25h[?25h
package/CHANGELOG.md CHANGED
@@ -1,3 +1,28 @@
1
+ # v1.1.1 (Mon Jul 14 2025)
2
+
3
+ #### 🐛 Bug Fix
4
+
5
+ - Fix controlled panel resize bugs and make collapse/expand awaitable [#67](https://github.com/hipstersmoothie/window-splitter/pull/67) ([@sfc-gh-alisowski](https://github.com/sfc-gh-alisowski))
6
+ - round it ([@sfc-gh-alisowski](https://github.com/sfc-gh-alisowski))
7
+ - tests ([@sfc-gh-alisowski](https://github.com/sfc-gh-alisowski))
8
+ - fix: parse stored default value to Big [#65](https://github.com/hipstersmoothie/window-splitter/pull/65) ([@andrefgneves](https://github.com/andrefgneves))
9
+ - comments ([@sfc-gh-alisowski](https://github.com/sfc-gh-alisowski))
10
+ - fix lint ([@sfc-gh-alisowski](https://github.com/sfc-gh-alisowski))
11
+ - fix some controlled panel bugs ([@sfc-gh-alisowski](https://github.com/sfc-gh-alisowski))
12
+ - awaitable colllapse ([@sfc-gh-alisowski](https://github.com/sfc-gh-alisowski))
13
+ - find panel with space ([@sfc-gh-alisowski](https://github.com/sfc-gh-alisowski))
14
+ - always use active drag handle if there is one during controlled collapse ([@sfc-gh-alisowski](https://github.com/sfc-gh-alisowski))
15
+ - fix subsequent panels not being able to be uncollapsed sometimes ([@sfc-gh-alisowski](https://github.com/sfc-gh-alisowski))
16
+ - fix subsequent collapsed panels not toggling collapse ([@sfc-gh-alisowski](https://github.com/sfc-gh-alisowski))
17
+ - fix: parse stored default value to Big ([@andrefgneves](https://github.com/andrefgneves))
18
+
19
+ #### Authors: 2
20
+
21
+ - André Neves ([@andrefgneves](https://github.com/andrefgneves))
22
+ - Andrew Lisowski ([@sfc-gh-alisowski](https://github.com/sfc-gh-alisowski))
23
+
24
+ ---
25
+
1
26
  # v1.1.0 (Mon May 26 2025)
2
27
 
3
28
  #### 🚀 Enhancement
@@ -174,6 +174,7 @@ interface ApplyDeltaEvent {
174
174
  type: "applyDelta";
175
175
  delta: number;
176
176
  handleId: string;
177
+ panelId: string;
177
178
  }
178
179
  interface SetOrientationEvent {
179
180
  /** Set the orientation of the group */
@@ -192,12 +193,14 @@ interface CollapsePanelEvent extends ControlledCollapseToggle {
192
193
  type: "collapsePanel";
193
194
  /** The panel to collapse */
194
195
  panelId: string;
196
+ resolve?: () => void;
195
197
  }
196
198
  interface ExpandPanelEvent extends ControlledCollapseToggle {
197
199
  /** Expand a panel */
198
200
  type: "expandPanel";
199
201
  /** The panel to expand */
200
202
  panelId: string;
203
+ resolve?: () => void;
201
204
  }
202
205
  interface SetPanelPixelSizeEvent {
203
206
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,QAAQ,CAAC;AAYzB,MAAM,MAAM,SAAS,GAAG,GAAG,MAAM,IAAI,CAAC;AACtC,MAAM,MAAM,WAAW,GAAG,GAAG,MAAM,GAAG,CAAC;AACvC,MAAM,MAAM,IAAI,GAAG,SAAS,GAAG,WAAW,CAAC;AAC3C,MAAM,MAAM,WAAW,GAAG,YAAY,GAAG,UAAU,CAAC;AAEpD,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,EAAE,GAAG,CAAC,GAAG,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C,CAAC"}
@@ -110,6 +110,9 @@ function prepareSnapshot(snapshot) {
110
110
  item.currentValue.value = new big_js_1.default(item.currentValue.value);
111
111
  item.collapsedSize.value = new big_js_1.default(item.collapsedSize.value);
112
112
  item.min.value = new big_js_1.default(item.min.value);
113
+ if (item.default) {
114
+ item.default.value = new big_js_1.default(item.default.value);
115
+ }
113
116
  if (item.max && item.max !== "1fr") {
114
117
  item.max.value = new big_js_1.default(item.max.value);
115
118
  }
@@ -321,6 +324,20 @@ function getCollapsiblePanelForHandleId(context, handleId) {
321
324
  */
322
325
  function getHandleForPanelId(context, panelId) {
323
326
  const panelIndex = context.items.findIndex((item) => item.id === panelId);
327
+ // When in controlled collapse mode we defer to the controlled state to know if we need to update.
328
+ // The confirmation comes along as an expand/collapse event.
329
+ // The default behavior is to find the closes handle and use that to collapse, if we're dragging some other
330
+ // handle though we want to use that instead. This will results in a smoother visual experience.
331
+ if (context.activeDragHandleId) {
332
+ const handleIndex = getPanelHandleIndex(context, context.activeDragHandleId);
333
+ const item = context.items[handleIndex];
334
+ if (item && isPanelHandle(item)) {
335
+ return {
336
+ item,
337
+ direction: handleIndex > panelIndex ? 1 : -1,
338
+ };
339
+ }
340
+ }
324
341
  invariant(panelIndex !== -1, `Expected panel before: ${panelId}`);
325
342
  let item = context.items[panelIndex + 1];
326
343
  if (item && isPanelHandle(item)) {
@@ -332,6 +349,23 @@ function getHandleForPanelId(context, panelId) {
332
349
  }
333
350
  throw new Error(`Cant find handle for panel: ${panelId}`);
334
351
  }
352
+ function getHandleForPanelIdWithAvailableSpace(context, panelId) {
353
+ const panelIndex = context.items.findIndex((item) => item.id === panelId);
354
+ invariant(panelIndex !== -1, `Expected panel before: ${panelId}`);
355
+ let item = context.items[panelIndex + 1];
356
+ if (item &&
357
+ isPanelHandle(item) &&
358
+ findPanelWithSpace(context, context.items, panelIndex + 1, 1, "add")) {
359
+ return { item, direction: 1 };
360
+ }
361
+ item = context.items[panelIndex - 1];
362
+ if (item &&
363
+ isPanelHandle(item) &&
364
+ findPanelWithSpace(context, context.items, panelIndex - 1, -1, "add")) {
365
+ return { item, direction: -1 };
366
+ }
367
+ return getHandleForPanelId(context, panelId);
368
+ }
335
369
  /** Given the specified order props and default order of the items, order the items */
336
370
  function sortWithOrder(items) {
337
371
  const defaultPlacement = {};
@@ -362,8 +396,8 @@ function sortWithOrder(items) {
362
396
  /** Check if the panel has space available to add to */
363
397
  function panelHasSpace(context, item, adjustment) {
364
398
  invariant(item.currentValue.type === "pixel", `panelHasSpace only works with number values: ${item.id} ${item.currentValue}`);
365
- if (item.collapsible && !item.collapsed) {
366
- return true;
399
+ if (item.collapsible) {
400
+ return !item.collapsed;
367
401
  }
368
402
  if (adjustment === "add") {
369
403
  return (item.currentValue.value.gte(getUnitPixelValue(context, item.min)) &&
@@ -607,7 +641,15 @@ function updateLayout(context, dragEvent) {
607
641
  };
608
642
  }
609
643
  invariant(isPanelData(panelBefore), `Expected panel before: ${handle.id}`);
610
- const panelAfter = newItems[handleIndex - moveDirection];
644
+ /** The panel that gets bigger */
645
+ const panelAfter = dragEvent.type === "collapsePanel"
646
+ ? // If we have the panel id just use that
647
+ newItems.find((item) => item.id === dragEvent.panelId &&
648
+ panelBefore.id !== dragEvent.panelId) ||
649
+ // otherwise fallback to the next panel with space
650
+ findPanelWithSpace(context, newItems, handleIndex - moveDirection, moveDirection * -1, "add", dragEvent.disregardCollapseBuffer) ||
651
+ newItems[handleIndex - moveDirection]
652
+ : newItems[handleIndex - moveDirection];
611
653
  invariant(panelAfter && isPanelData(panelAfter), `Expected panel after: ${handle.id}`);
612
654
  if (panelAfter.currentValue.value.eq(getUnitPixelValue(context, panelAfter.max))) {
613
655
  return {
@@ -616,7 +658,7 @@ function updateLayout(context, dragEvent) {
616
658
  }
617
659
  const newDragOvershoot = context.dragOvershoot.add(moveAmount);
618
660
  // Don't let the panel expand until the threshold is reached
619
- if (!dragEvent.disregardCollapseBuffer) {
661
+ if (!dragEvent.disregardCollapseBuffer && !dragEvent.controlled) {
620
662
  const isInLeftBuffer = newDragOvershoot.lt(0) && moveDirection > 0;
621
663
  const isInLeftOvershoot = newDragOvershoot.gt(0) && moveDirection > 0;
622
664
  const isInRightBuffer = newDragOvershoot.gt(0) && moveDirection < 0;
@@ -641,6 +683,7 @@ function updateLayout(context, dragEvent) {
641
683
  }
642
684
  // Don't let the panel collapse until the threshold is reached
643
685
  if (!dragEvent.disregardCollapseBuffer &&
686
+ !dragEvent.controlled &&
644
687
  panelBefore.collapsible &&
645
688
  panelBefore.currentValue.value.eq(getUnitPixelValue(context, panelBefore.min))) {
646
689
  const potentialNewValue = panelBefore.currentValue.value.sub(newDragOvershoot.abs());
@@ -699,7 +742,8 @@ function updateLayout(context, dragEvent) {
699
742
  .minus(panelAfterPreviousValue)
700
743
  // And then re-apply the movement value
701
744
  .minus(Math.abs(moveAmount)));
702
- if (panelBeforeNewValue.lt(panelBefore.min.value)) {
745
+ if (panelBeforeNewValue.lt(panelBefore.min.value) &&
746
+ !panelBefore.collapsible) {
703
747
  // TODO this should probably distribute the space between the panels?
704
748
  return { dragOvershoot: newDragOvershoot };
705
749
  }
@@ -727,7 +771,7 @@ function updateLayout(context, dragEvent) {
727
771
  panelBefore.collapsed = true;
728
772
  panelBeforeNewValue = getUnitPixelValue(context, panelBefore.collapsedSize);
729
773
  // Add the extra space created to the before panel
730
- panelAfterNewValue = panelAfterNewValue.add(panelBeforePreviousValue.minus(panelBeforeNewValue));
774
+ panelAfterNewValue = panelAfter.currentValue.value.add(panelBeforePreviousValue.minus(panelBeforeNewValue));
731
775
  if (panelBefore.onCollapseChange?.current &&
732
776
  !panelBefore.collapseIsControlled &&
733
777
  !dragEvent.controlled &&
@@ -786,7 +830,7 @@ function dragHandlePayload({ delta, orientation = "horizontal", shiftKey = false
786
830
  };
787
831
  }
788
832
  /** Iteratively applies a large delta value simulating a user's drag */
789
- function iterativelyUpdateLayout({ context, handleId, delta, direction, controlled, disregardCollapseBuffer, isVirtual, }) {
833
+ function iterativelyUpdateLayout({ context, handleId, delta, direction, controlled, disregardCollapseBuffer, isVirtual, panelId, }) {
790
834
  let newContext = context;
791
835
  for (let i = 0; i < delta.abs().toNumber(); i++) {
792
836
  newContext = updateLayout({
@@ -798,6 +842,7 @@ function iterativelyUpdateLayout({ context, handleId, delta, direction, controll
798
842
  controlled,
799
843
  disregardCollapseBuffer,
800
844
  isVirtual,
845
+ panelId,
801
846
  value: dragHandlePayload({
802
847
  delta: direction,
803
848
  orientation: context.orientation,
@@ -871,6 +916,7 @@ function handleOverflow(context) {
871
916
  handleId: handleId.item.id,
872
917
  delta: sizeChange,
873
918
  direction: (handleId.direction * -1),
919
+ panelId: collapsiblePanel.id,
874
920
  context: {
875
921
  ...newContext,
876
922
  // act like its the old size so the space is distributed correctly
@@ -899,9 +945,18 @@ function getDeltaForEvent(context, event) {
899
945
  }
900
946
  function animationActor(context, event, send, abortController) {
901
947
  const panel = getPanelWithId(context, event.panelId);
902
- const handle = getHandleForPanelId(context, event.panelId);
948
+ const handle = getHandleForPanelIdWithAvailableSpace(context, event.panelId);
903
949
  let direction = new big_js_1.default(handle.direction);
904
950
  const fullDelta = getDeltaForEvent(context, event);
951
+ const contextCopy = { ...context, items: prepareItems(context) };
952
+ const finalLayout = iterativelyUpdateLayout({
953
+ context: contextCopy,
954
+ panelId: event.panelId,
955
+ handleId: handle.item.id,
956
+ delta: fullDelta,
957
+ direction: handle.direction,
958
+ isVirtual: true,
959
+ });
905
960
  return new Promise((resolve, reject) => {
906
961
  abortController.signal.addEventListener("abort", () => {
907
962
  reject(new Error("Operation was canceled"));
@@ -923,6 +978,7 @@ function animationActor(context, event, send, abortController) {
923
978
  type: "applyDelta",
924
979
  handleId: handle.item.id,
925
980
  delta: delta.toNumber(),
981
+ panelId: panel.id,
926
982
  });
927
983
  appliedDelta = appliedDelta.add(delta
928
984
  .abs()
@@ -930,8 +986,15 @@ function animationActor(context, event, send, abortController) {
930
986
  ? -1
931
987
  : 1));
932
988
  if (e.eq(1)) {
989
+ // If we're controlled expanding to a value that breaks the layout we might get negative values
990
+ // In this case we need to use a valid layout like `iterativelyUpdateLayout`'s return value
991
+ // Ideally we figure out some way to not do this but disregardCollapseBuffer is needed for animations
992
+ if (context.items.find((i) => isPanelData(i) &&
993
+ i.currentValue.value.round(undefined, big_js_1.default.roundHalfEven).lt(0))) {
994
+ assign(context, finalLayout);
995
+ }
933
996
  const action = event.type === "expandPanel" ? "expand" : "collapse";
934
- resolve({ panelId: panel.id, action });
997
+ resolve({ panelId: panel.id, action, resolve: event.resolve });
935
998
  return false;
936
999
  }
937
1000
  return true;
@@ -1030,6 +1093,7 @@ function groupMachine(input, onUpdate) {
1030
1093
  ? handle.direction * -1
1031
1094
  : handle.direction;
1032
1095
  const newContext = updateLayout(context, {
1096
+ panelId: event.panelId,
1033
1097
  handleId: handle.item.id,
1034
1098
  type: "dragHandle",
1035
1099
  controlled: event.controlled,
@@ -1067,14 +1131,15 @@ function groupMachine(input, onUpdate) {
1067
1131
  },
1068
1132
  cannotExpandPanel: (event) => {
1069
1133
  isEvent(event, ["expandPanel"]);
1070
- const delta = getDeltaForEvent(context, event);
1071
- const handle = getHandleForPanelId(context, event.panelId);
1072
1134
  const pixelItems = prepareItems(context);
1073
1135
  let interimContext = { ...context, items: pixelItems };
1136
+ const delta = getDeltaForEvent(context, event);
1137
+ const handle = getHandleForPanelIdWithAvailableSpace(interimContext, event.panelId);
1074
1138
  interimContext = {
1075
1139
  ...interimContext,
1076
1140
  ...iterativelyUpdateLayout({
1077
1141
  context: interimContext,
1142
+ panelId: event.panelId,
1078
1143
  handleId: handle.item.id,
1079
1144
  controlled: event.controlled,
1080
1145
  delta: delta,
@@ -1112,6 +1177,7 @@ function groupMachine(input, onUpdate) {
1112
1177
  break;
1113
1178
  }
1114
1179
  state.current = to;
1180
+ onUpdate?.(context);
1115
1181
  }
1116
1182
  function send(event) {
1117
1183
  switch (event.type) {
@@ -1291,8 +1357,10 @@ function groupMachine(input, onUpdate) {
1291
1357
  const delta = isBigger
1292
1358
  ? newSize.minus(current)
1293
1359
  : current.minus(newSize);
1360
+ panel.sizeBeforeCollapse = newSize.toNumber();
1294
1361
  Object.assign(context, iterativelyUpdateLayout({
1295
1362
  context,
1363
+ panelId: event.panelId,
1296
1364
  direction: (handle.direction * (isBigger ? 1 : -1)),
1297
1365
  handleId: handle.item.id,
1298
1366
  delta,
@@ -1314,6 +1382,9 @@ function groupMachine(input, onUpdate) {
1314
1382
  animationActor(context, event, send, abortController).then((output) => {
1315
1383
  actions.onAnimationEnd(output);
1316
1384
  transition("idle");
1385
+ if (event.resolve) {
1386
+ requestAnimationFrame(event.resolve);
1387
+ }
1317
1388
  });
1318
1389
  }
1319
1390
  }
@@ -1333,6 +1404,9 @@ function groupMachine(input, onUpdate) {
1333
1404
  animationActor(context, event, send, abortController).then((output) => {
1334
1405
  actions.onAnimationEnd(output);
1335
1406
  transition("idle");
1407
+ if (event.resolve) {
1408
+ requestAnimationFrame(event.resolve);
1409
+ }
1336
1410
  });
1337
1411
  }
1338
1412
  }
@@ -1363,6 +1437,7 @@ function groupMachine(input, onUpdate) {
1363
1437
  switch (event.type) {
1364
1438
  case "applyDelta":
1365
1439
  assign(context, updateLayout(context, {
1440
+ panelId: event.panelId,
1366
1441
  handleId: event.handleId,
1367
1442
  type: "collapsePanel",
1368
1443
  disregardCollapseBuffer: true,