react-resizable-panels 2.1.6 → 2.1.7

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.
Files changed (87) hide show
  1. package/dist/react-resizable-panels.browser.cjs.js +7 -7
  2. package/dist/react-resizable-panels.browser.development.cjs.js +7 -7
  3. package/dist/react-resizable-panels.browser.development.esm.js +7 -7
  4. package/dist/react-resizable-panels.browser.esm.js +7 -7
  5. package/dist/react-resizable-panels.cjs.js +7 -7
  6. package/dist/react-resizable-panels.development.cjs.js +7 -7
  7. package/dist/react-resizable-panels.development.esm.js +7 -7
  8. package/dist/react-resizable-panels.development.node.cjs.js +7 -7
  9. package/dist/react-resizable-panels.development.node.esm.js +7 -7
  10. package/dist/react-resizable-panels.esm.js +7 -7
  11. package/dist/react-resizable-panels.node.cjs.js +7 -7
  12. package/dist/react-resizable-panels.node.esm.js +7 -7
  13. package/package.json +7 -1
  14. package/.eslintrc.cjs +0 -27
  15. package/CHANGELOG.md +0 -574
  16. package/jest.config.js +0 -10
  17. package/src/Panel.test.tsx +0 -1084
  18. package/src/Panel.ts +0 -259
  19. package/src/PanelGroup.test.tsx +0 -443
  20. package/src/PanelGroup.ts +0 -999
  21. package/src/PanelGroupContext.ts +0 -42
  22. package/src/PanelResizeHandle.test.tsx +0 -367
  23. package/src/PanelResizeHandle.ts +0 -246
  24. package/src/PanelResizeHandleRegistry.ts +0 -336
  25. package/src/constants.ts +0 -1
  26. package/src/env-conditions/browser.ts +0 -1
  27. package/src/env-conditions/development.ts +0 -1
  28. package/src/env-conditions/node.ts +0 -1
  29. package/src/env-conditions/production.ts +0 -1
  30. package/src/env-conditions/unknown.ts +0 -1
  31. package/src/hooks/useForceUpdate.ts +0 -7
  32. package/src/hooks/useIsomorphicEffect.ts +0 -8
  33. package/src/hooks/useUniqueId.ts +0 -19
  34. package/src/hooks/useWindowSplitterBehavior.ts +0 -90
  35. package/src/hooks/useWindowSplitterPanelGroupBehavior.ts +0 -201
  36. package/src/index.ts +0 -77
  37. package/src/types.ts +0 -5
  38. package/src/utils/adjustLayoutByDelta.test.ts +0 -2061
  39. package/src/utils/adjustLayoutByDelta.ts +0 -308
  40. package/src/utils/arrays.ts +0 -13
  41. package/src/utils/assert.ts +0 -10
  42. package/src/utils/calculateAriaValues.test.ts +0 -106
  43. package/src/utils/calculateAriaValues.ts +0 -45
  44. package/src/utils/calculateDeltaPercentage.ts +0 -63
  45. package/src/utils/calculateDragOffsetPercentage.ts +0 -40
  46. package/src/utils/calculateUnsafeDefaultLayout.test.ts +0 -87
  47. package/src/utils/calculateUnsafeDefaultLayout.ts +0 -50
  48. package/src/utils/callPanelCallbacks.ts +0 -49
  49. package/src/utils/compareLayouts.test.ts +0 -9
  50. package/src/utils/compareLayouts.ts +0 -12
  51. package/src/utils/computePanelFlexBoxStyle.test.ts +0 -123
  52. package/src/utils/computePanelFlexBoxStyle.ts +0 -50
  53. package/src/utils/csp.ts +0 -9
  54. package/src/utils/cursor.ts +0 -103
  55. package/src/utils/debounce.ts +0 -18
  56. package/src/utils/determinePivotIndices.ts +0 -15
  57. package/src/utils/dom/getPanelElement.ts +0 -10
  58. package/src/utils/dom/getPanelElementsForGroup.ts +0 -8
  59. package/src/utils/dom/getPanelGroupElement.ts +0 -21
  60. package/src/utils/dom/getResizeHandleElement.ts +0 -10
  61. package/src/utils/dom/getResizeHandleElementIndex.ts +0 -13
  62. package/src/utils/dom/getResizeHandleElementsForGroup.ts +0 -10
  63. package/src/utils/dom/getResizeHandlePanelIds.ts +0 -19
  64. package/src/utils/events/getResizeEventCoordinates.ts +0 -23
  65. package/src/utils/events/getResizeEventCursorPosition.ts +0 -14
  66. package/src/utils/events/index.ts +0 -13
  67. package/src/utils/getInputType.ts +0 -5
  68. package/src/utils/initializeDefaultStorage.ts +0 -26
  69. package/src/utils/numbers/fuzzyCompareNumbers.test.ts +0 -16
  70. package/src/utils/numbers/fuzzyCompareNumbers.ts +0 -21
  71. package/src/utils/numbers/fuzzyLayoutsEqual.ts +0 -22
  72. package/src/utils/numbers/fuzzyNumbersEqual.ts +0 -9
  73. package/src/utils/rects/getIntersectingRectangle.test.ts +0 -198
  74. package/src/utils/rects/getIntersectingRectangle.ts +0 -28
  75. package/src/utils/rects/intersects.test.ts +0 -197
  76. package/src/utils/rects/intersects.ts +0 -23
  77. package/src/utils/rects/types.ts +0 -6
  78. package/src/utils/resizePanel.test.ts +0 -59
  79. package/src/utils/resizePanel.ts +0 -47
  80. package/src/utils/serialization.ts +0 -87
  81. package/src/utils/test-utils.ts +0 -205
  82. package/src/utils/validatePanelConstraints.test.ts +0 -143
  83. package/src/utils/validatePanelConstraints.ts +0 -69
  84. package/src/utils/validatePanelGroupLayout.test.ts +0 -148
  85. package/src/utils/validatePanelGroupLayout.ts +0 -95
  86. package/src/vendor/react.ts +0 -73
  87. package/src/vendor/stacking-order.ts +0 -139
package/.eslintrc.cjs DELETED
@@ -1,27 +0,0 @@
1
- /* eslint-env node */
2
- module.exports = {
3
- ignorePatterns: [".parcel-cache", "dist", "node_modules"],
4
- parser: "@typescript-eslint/parser",
5
- parserOptions: {
6
- project: "../../tsconfig.json",
7
- tsconfigRootDir: __dirname,
8
- },
9
- plugins: ["@typescript-eslint", "no-restricted-imports", "react-hooks"],
10
- root: true,
11
- rules: {
12
- "@typescript-eslint/no-non-null-assertion": "error",
13
- "no-restricted-imports": [
14
- "error",
15
- {
16
- paths: ["react"],
17
- },
18
- ],
19
- "react-hooks/rules-of-hooks": "error",
20
- "react-hooks/exhaustive-deps": [
21
- "warn",
22
- {
23
- additionalHooks: "(useIsomorphicLayoutEffect)",
24
- },
25
- ],
26
- },
27
- };
package/CHANGELOG.md DELETED
@@ -1,574 +0,0 @@
1
- # Changelog
2
-
3
- # 2.1.6
4
-
5
- - Removed `"engines"` block and replaced with `"packageManager"`
6
- - Don't read `document.direction` for RTL detection; use inherited style instead
7
-
8
- ## 2.1.5
9
-
10
- - Add react v19 to peer deps
11
-
12
- ## 2.1.4
13
-
14
- - Improve TypeScript HTML tag type generics (#407)
15
- - Edge case check to make sure resize handle hasn't been unmounted while dragging (#410)
16
-
17
- ## 2.1.3
18
-
19
- - Edge case bug fix for a resize handle unmounting while being dragged (#402)
20
-
21
- ## 2.1.2
22
-
23
- - Suppress invalid layout warning for empty panel groups (#396)
24
-
25
- ## 2.1.1
26
-
27
- - Fix `onDragging` regression (#391)
28
- - Fix cursor icon behavior in nested panels (#390)
29
-
30
- ## 2.1.0
31
-
32
- - Add opt-in support for setting the [`"nonce"` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/nonce) for the global cursor style (#386)
33
- - Support disabling global cursor styles (#387)
34
-
35
- ## 2.0.23
36
-
37
- - Improve obfuscation for `React.useId` references (#382)
38
-
39
- ## 2.0.22
40
-
41
- - Force eager layout re-calculation after panel added/removed (#375)
42
-
43
- ## 2.0.21
44
-
45
- - Handle pointer event edge case with different origin iframes (#374)
46
-
47
- ## 2.0.20
48
-
49
- - Reset global cursor if an active resize handle is unmounted (#313)
50
- - Resize handle supports (optional) `onFocus` or `onBlur` props (#370)
51
-
52
- ## 2.0.19
53
-
54
- - Add optional `minSize` override param to panel `expand` imperative API
55
-
56
- ## 2.0.18
57
-
58
- - Inline object `hitAreaMargins` will not trigger re-initialization logic unless inner values change (#342)
59
-
60
- ## 2.0.17
61
-
62
- - Prevent pointer events handled by resize handles from triggering elements behind/underneath (#338)
63
-
64
- ## 2.0.16
65
-
66
- - Replaced .toPrecision() with .toFixed() to avoid undesirable layout shift (#323)
67
-
68
- ## 2.0.15
69
-
70
- - Better account for high-precision sizes with `onCollapse` and `onExpand` callbacks (#325)
71
-
72
- ## 2.0.14
73
-
74
- - Better account for high-precision `collapsedSize` values (#325)
75
-
76
- ## 2.0.13
77
-
78
- - Fix potential cycle in stacking-order logic for an unmounted node (#317)
79
-
80
- ## 2.0.12
81
-
82
- - Improve resize for edge cases with collapsed panels; intermediate resize states should now fall back to the most recent valid layout rather than the initial layout (#311)
83
-
84
- ## 2.0.11
85
-
86
- - Fix resize handle cursor hit detection when when viewport is scrolled (#305)
87
-
88
- ## 2.0.10
89
-
90
- - Fix conditional layout edge case (#309)
91
-
92
- ## 2.0.9
93
-
94
- - Fix Flex stacking context bug (#301)
95
- - Fix case where pointer event listeners were sometimes added to the document unnecessarily
96
-
97
- ## 2.0.8
98
-
99
- - `Panel`/`PanelGroup`/`PanelResizeHandle`` pass "id" prop through to DOM (#299)
100
- - `Panel` attributes `data-panel-collapsible` and `data-panel-size` are no longer DEV-only (#297)
101
-
102
- ## 2.0.7
103
-
104
- - Group default layouts use `toPrecision` to avoid small layout shifts due to floating point precision differences between initial server rendering and client hydration (#295)
105
-
106
- ## 2.0.6
107
-
108
- - Replace `useLayoutEffect` usage with SSR-safe wrapper hook (#294)
109
-
110
- ## 2.0.5
111
-
112
- - Resize handle hit detection considers [stacking context](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_positioned_layout/Understanding_z-index/Stacking_context) when determining hit detection (#291)
113
-
114
- ## 2.0.4
115
-
116
- - Fixed `PanelResizeHandle` `onDragging` prop to only be called for the handle being dragged (#289)
117
-
118
- ## 2.0.3
119
-
120
- - Fix resize handle onDragging callback (#278)
121
-
122
- ## 2.0.2
123
-
124
- - Fixed an issue where size might not be re-initialized correctly after a panel was hidden by the `unstable_Activity` (previously "Offscreen") API.
125
-
126
- ## 2.0.1
127
-
128
- - Fixed a regression introduced in 2.0.0 that caused React `onClick` and `onMouseUp` handlers not to fire.
129
-
130
- ## 2.0.0
131
-
132
- - Support resizing multiple (intersecting) panels at once (#274)
133
- This behavior can be customized using a new `hitAreaMargins` prop; defaults to a 15 pixel margin for _coarse_ inputs and a 5 pixel margin for _fine_ inputs.
134
-
135
- ## 1.0.10
136
-
137
- - Fixed edge case constraints check bug that could cause a collapsed panel to re-expand unnecessarily (#273)
138
-
139
- ## 1.0.9
140
-
141
- - DOM util methods scope param defaults to `document` (#262)
142
- - Updating a `Panel`'s pixel constraints will trigger revalidation of the `Panel`'s size (#266)
143
-
144
- ## 1.0.8
145
-
146
- - Update component signature to declare `ReactElement` return type (rather than `ReactNode`) (#256)
147
- - Update `Panel` dev warning to avoid warning when `defaultSize === collapsedSize` for collapsible panels (#257)
148
- - Support shadow dom by removing direct references to / dependencies on the root `document` (#204)
149
-
150
- ## 1.0.7
151
-
152
- - Narrow `tagName` prop to only allow `HTMLElement` names (rather than the broader `Element` type) (#251)
153
-
154
- ## 1.0.6
155
-
156
- - Export internal DOM helper methods.
157
-
158
- ## 1.0.5
159
-
160
- - Fix server rendering regression (#240); Panels will now render with their `defaultSize` during initial mount (if one is specified). This allows server-rendered components to store the most recent size in a cookie and use that value as the default for subsequent page visits.
161
-
162
- ## 1.0.4
163
-
164
- - Edge case bug fix for `isCollapsed` panel method; previously an uninitialized `collapsedSize` value was not being initialized to `0`, which caused `isCollapsed` to incorrectly report `false` in some cases.
165
-
166
- ## 1.0.3
167
-
168
- - Remember most recently expanded panel size in local storage (#234)
169
-
170
- ## 1.0.2
171
-
172
- - Change local storage key for persisted sizes to avoid restoring pixel-based sizes (#233)
173
-
174
- ## 1.0.1
175
-
176
- - Small bug fix to guard against saving an incorrect panel layout to local storage
177
-
178
- # 1.0.0
179
-
180
- - Remove support for pixel-based Panel constraints; (props like `defaultSizePercentage` should now be `defaultSize`)
181
- - Replaced `dataAttributes` prop with `...rest` prop that supports all HTML attributes
182
-
183
- ## 0.0.63
184
-
185
- - Change default (not-yet-registered) Panel flex-grow style from 0 to 1
186
-
187
- ## 0.0.62
188
-
189
- - Edge case expand/collapse invalid size guard (#220)
190
-
191
- ## 0.0.61
192
-
193
- - Better unstable Offscreen/Activity API.
194
-
195
- ## 0.0.60
196
-
197
- - Better support imperative API usage from mount effects.
198
- - Better support strict effects mode.
199
- - Better checks not to call `onResize` or `onLayout` more than once.
200
-
201
- ## 0.0.59
202
-
203
- - Support imperative panel API usage on-mount.
204
- - Made PanelGroup bailout condition smarter (don't bailout for empty groups unless pixel constraints are used).
205
- - Improved window splitter compatibility by better handling "Enter" key.
206
-
207
- ## 0.0.58
208
-
209
- - Change group layout to more thoroughly distribute resize delta to support more flexible group size configurations.
210
- - Add data attribute support to `Panel`, `PanelGroup`, and `PanelResizeHandle`.
211
- - Update API documentation to reflect changed imperative API method names.
212
- - `PanelOnResize` TypeScript def updated to reflect that previous size param is `undefined` the first time it is called.
213
-
214
- ## 0.0.57
215
-
216
- - [#207](https://github.com/bvaughn/react-resizable-panels/pull/207): Fix DEV conditional error that broke data attributes (and selectors).
217
-
218
- ## 0.0.56
219
-
220
- Support a mix of percentage and pixel based units at the `Panel` level:
221
-
222
- ```jsx
223
- <Panel defaultSizePixels={100} minSizePercentage={20} maxSizePercentage={50} />
224
- ```
225
-
226
- > **Note**: Pixel units require the use of a `ResizeObserver` to validate. Percentage based units are recommended when possible.
227
-
228
- ### Example migrating panels with percentage units
229
-
230
- <table>
231
- <thead>
232
- <tr>
233
- <th>v55</th>
234
- <th>v56</th>
235
- </tr>
236
- </thead>
237
- <tbody>
238
- <tr>
239
- <td>
240
- <pre lang="jsx">
241
- &lt;Panel
242
- defaultSize={25}
243
- minSize={10}
244
- maxSize={50}
245
- /&gt;
246
- </pre>
247
- </td>
248
- <td>
249
- <pre lang="jsx">
250
- &lt;Panel
251
- defaultSizePercentage={25}
252
- minSizePercentage={10}
253
- maxSizePercentage={50}
254
- /&gt;
255
- </pre>
256
- </td>
257
- </tr>
258
- </tbody>
259
- </table>
260
-
261
- ### Example migrating panels with pixel units
262
-
263
- <table>
264
- <thead>
265
- <tr>
266
- <th>v55</th>
267
- <th>v56</th>
268
- </tr>
269
- </thead>
270
- <tbody>
271
- <tr>
272
- <td>
273
- <pre lang="jsx">
274
- &lt;PanelGroup
275
- direction="horizontal"
276
- units="pixels"
277
- &gt;
278
- &lt;Panel minSize={100} maxSize={200} /&gt;
279
- &lt;PanelResizeHandle /&gt;
280
- &lt;Panel /&gt;
281
- &lt;/PanelGroup&gt;
282
- </pre>
283
- </td>
284
- <td>
285
- <pre lang="jsx">
286
- &lt;PanelGroup direction="horizontal"&gt;
287
- &lt;Panel
288
- minSizePixels={100}
289
- maxSizePixels={200}
290
- /&gt;
291
- &lt;PanelResizeHandle /&gt;
292
- &lt;Panel /&gt;
293
- &lt;/PanelGroup&gt;
294
- </pre>
295
- </td>
296
- </tr>
297
- </tbody>
298
- </table>
299
-
300
- For a complete list of supported properties and example usage, refer to the docs.
301
-
302
- ## 0.0.55
303
-
304
- - New `units` prop added to `PanelGroup` to support pixel-based panel size constraints.
305
-
306
- This prop defaults to "percentage" but can be set to "pixels" for static, pixel based layout constraints.
307
-
308
- This can be used to add enable pixel-based min/max and default size values, e.g.:
309
-
310
- ```jsx
311
- <PanelGroup direction="horizontal" units="pixels">
312
- {/* Will be constrained to 100-200 pixels (assuming group is large enough to permit this) */}
313
- <Panel minSize={100} maxSize={200} />
314
- <PanelResizeHandle />
315
- <Panel />
316
- <PanelResizeHandle />
317
- <Panel />
318
- </PanelGroup>
319
- ```
320
-
321
- Imperative API methods are also able to work with either pixels or percentages now. They default to whatever units the group has been configured to use, but can be overridden with an additional, optional parameter, e.g.
322
-
323
- ```ts
324
- panelRef.resize(100, "pixels");
325
- panelGroupRef.setLayout([25, 50, 25], "percentages");
326
-
327
- // Works for getters too, e.g.
328
- const percentage = panelRef.getSize("percentages");
329
- const pixels = panelRef.getSize("pixels");
330
-
331
- const layout = panelGroupRef.getLayout("pixels");
332
- ```
333
-
334
- ## 0.0.54
335
-
336
- - [172](https://github.com/bvaughn/react-resizable-panels/issues/172): Development warning added to `PanelGroup` for conditionally-rendered `Panel`(s) that don't have `id` and `order` props
337
- - [156](https://github.com/bvaughn/react-resizable-panels/pull/156): Package exports now used to select between node (server-rendering) and browser (client-rendering) bundles
338
-
339
- ## 0.0.53
340
-
341
- - Fix edge case race condition for `onResize` callbacks during initial mount
342
-
343
- ## 0.0.52
344
-
345
- - [162](https://github.com/bvaughn/react-resizable-panels/issues/162): Add `Panel.collapsedSize` property to allow panels to be collapsed to custom, non-0 sizes
346
- - [161](https://github.com/bvaughn/react-resizable-panels/pull/161): Bug fix: `onResize` should be called for the initial `Panel` size regardless of the `onLayout` prop
347
-
348
- ## 0.0.51
349
-
350
- - [154](https://github.com/bvaughn/react-resizable-panels/issues/154): `onResize` and `onCollapse` props are called in response to `PanelGroup.setLayout`
351
- - [123](https://github.com/bvaughn/react-resizable-panels/issues/123): `onResize` called when number of panels in a group change due to conditional rendering
352
-
353
- ## 0.0.50
354
-
355
- - Improved panel size validation in `PanelGroup`.
356
-
357
- ## 0.0.49
358
-
359
- - Improved development warnings and props validation checks in `PanelGroup`.
360
-
361
- ## 0.0.48
362
-
363
- - [148](https://github.com/bvaughn/react-resizable-panels/pull/148): Build release bundle with Preconstruct
364
-
365
- ## 0.0.47
366
-
367
- - Mimic VS COde behavior; collapse a panel if it's smaller than half of its min-size
368
-
369
- ## 0.0.46
370
-
371
- - SSR: Avoid accessing default storage (`localStorage`) during initialization; avoid throwing error in browsers that have 3rd party cookies/storage disabled.
372
-
373
- ## 0.0.45
374
-
375
- - SSR: Avoid layout shift by using `defaultSize` to set initial `flex-grow` style
376
- - SSR: Warn if `Panel` is server-rendered without a `defaultSize` prop
377
- - [#135](https://github.com/bvaughn/react-resizable-panels/issues/135): Support RTL layouts
378
-
379
- ## 0.0.44
380
-
381
- - [#142](https://github.com/bvaughn/react-resizable-panels/pull/142): Avoid re-registering Panel when props change; this should reduce the number of scenarios requiring the `order` prop
382
-
383
- ## 0.0.43
384
-
385
- - Add imperative `getLayout` API to `PanelGroup`
386
- - [#139](https://github.com/bvaughn/react-resizable-panels/pull/139): Fix edge case bug where simultaneous `localStorage` updates to multiple saved groups would drop some values
387
-
388
- ## 0.0.42
389
-
390
- - Change cursor style from `col-resize`/`row-resize` to `ew-resize`/`ns-resize` to better match cursor style at edges of a panel.
391
-
392
- ## 0.0.41
393
-
394
- - Add imperative `setLayout` API for `PanelGroup`.
395
-
396
- ## 0.0.40
397
-
398
- - README changes
399
-
400
- ## 0.0.39
401
-
402
- - [#118](https://github.com/bvaughn/react-resizable-panels/issues/118): Fix import regression from 0.0.38.
403
-
404
- ## 0.0.38
405
-
406
- - [#117](https://github.com/bvaughn/react-resizable-panels/issues/117): `Panel` collapse behavior works better near viewport edges.
407
- - [#115](https://github.com/bvaughn/react-resizable-panels/pull/115): `PanelResizeHandle` logic calls `event.preventDefault` for events it handles.
408
- - [#82](https://github.com/bvaughn/react-resizable-panels/issues/82): `useId` import changed to avoid triggering errors with older versions of React. (Note this may have an impact on tree-shaking though it is presumed to be minimal, given the small `"react"` package size.)
409
-
410
- ## 0.0.37
411
-
412
- - [#94](https://github.com/bvaughn/react-resizable-panels/issues/94): Add `onDragging` prop to `PanelResizeHandle` to be notified of when dragging starts/stops.
413
-
414
- ## 0.0.36
415
-
416
- - [#96](https://github.com/bvaughn/react-resizable-panels/issues/96): No longer disable `pointer-events` during resize by default. This behavior can be re-enabled using the newly added `PanelGroup` prop `disablePointerEventsDuringResize`.
417
-
418
- ## 0.0.35
419
-
420
- - [#92](https://github.com/bvaughn/react-resizable-panels/pull/92): Change `browserslist` so compiled module works with CRA 4.0.3 Babel config out of the box.
421
-
422
- ## 0.0.34
423
-
424
- - [#85](https://github.com/bvaughn/react-resizable-panels/issues/85): Add optional `storage` prop to `PanelGroup` to make it easier to persist layouts somewhere other than `localStorage` (e.g. like a Cookie).
425
- - [#70](https://github.com/bvaughn/react-resizable-panels/issues/70): When resizing is done via mouse/touch event– some initial state is stored so that any panels that contract will also expand if drag direction is reversed.
426
- - [#86](https://github.com/bvaughn/react-resizable-panels/issues/86): Layout changes triggered by keyboard no longer affect the global cursor.
427
- - Fixed small cursor regression introduced in 0.0.33.
428
-
429
- ## 0.0.33
430
-
431
- - Collapsible `Panel`s will always call `onCollapse` on-mount regardless of their collapsed state.
432
- - Fixed regression in b5d3ec1 where arrow keys may fail to expand a collapsed panel.
433
-
434
- ## 0.0.32
435
-
436
- - [#75](https://github.com/bvaughn/react-resizable-panels/issues/75): Ensure `Panel` and `PanelGroup` callbacks are always called after mounting.
437
-
438
- ## 0.0.31
439
-
440
- - [#71](https://github.com/bvaughn/react-resizable-panels/issues/71): Added `getSize` and `getCollapsed` to imperative API exposed by `Panel`.
441
- - [#67](https://github.com/bvaughn/react-resizable-panels/issues/67), [#72](https://github.com/bvaughn/react-resizable-panels/issues/72): Removed nullish coalescing operator (`??`) because it caused problems with default create-react-app configuration.
442
- - Fix edge case when expanding a panel via imperative API that was collapsed by user drag
443
-
444
- ## 0.0.30
445
-
446
- - [#68](https://github.com/bvaughn/react-resizable-panels/pull/68): Reduce volume/frequency of local storage writes for `PanelGroup`s configured to _auto-save_.
447
- - Added `onLayout` prop to `PanelGroup` to be called when group layout changes. Note that some form of debouncing is recommended before processing these values (e.g. saving to a database).
448
-
449
- ## 0.0.29
450
-
451
- - [#58](https://github.com/bvaughn/react-resizable-panels/pull/58): Add imperative `collapse`, `expand`, and `resize` methods to `Panel`.
452
- - [#64](https://github.com/bvaughn/react-resizable-panels/pull/64): Disable `pointer-events` inside of `Panel`s during resize. This avoid edge cases like nested iframes.
453
- - [#57](https://github.com/bvaughn/react-resizable-panels/pull/57): Improve server rendering check to include `window.document`. This more closely matches React's own check and avoids false positives for environments that alias `window` to some global object.
454
-
455
- ## 0.0.28
456
-
457
- - [#53](https://github.com/bvaughn/react-resizable-panels/issues/53): Avoid `useLayoutEffect` warning when server rendering. Render panels with default style of `flex: 1 1 auto` during initial render.
458
-
459
- ## 0.0.27
460
-
461
- - [#4](https://github.com/bvaughn/react-resizable-panels/issues/4): Add `collapsible` and `onCollapse` props to `Panel` to support auto-collapsing panels that resize beyond their `minSize` value (similar to VS Code's panel UX).
462
-
463
- ## 0.0.26
464
-
465
- - Reduce style re-calc from resize-in-progress cursor style.
466
-
467
- ## 0.0.25
468
-
469
- - While a resize is active, the global cursor style now reliably overrides per-element styles (to avoid flickering if you drag over e.g. an anchor element).
470
-
471
- ## 0.0.24
472
-
473
- - [#49](https://github.com/bvaughn/react-resizable-panels/issues/49): Change cursor based on min/max boundaries.
474
-
475
- ## 0.0.23
476
-
477
- - [#40](https://github.com/bvaughn/react-resizable-panels/issues/40): Add optional `maxSize` prop to `Panel`.
478
- - [#41](https://github.com/bvaughn/react-resizable-panels/issues/41): Add optional `onResize` prop to `Panel`. This prop can be used (along with `defaultSize`) to persistence layouts somewhere externally.
479
- - [#42](https://github.com/bvaughn/react-resizable-panels/issues/42): Don't cancel resize operations when exiting the window. Only cancel when a `"mouseup"` (or `"touchend"`) event is fired.
480
-
481
- ## 0.0.22
482
-
483
- - Replaced the `"ew-resize"` and `"ns-resize"` cursor style with `"col-resize"` and `"row-resize"`.
484
-
485
- ## 0.0.21
486
-
487
- - [#39](https://github.com/bvaughn/react-resizable-panels/issues/39): Fixed regression in TypeScript defs introduced in `0.0.20`
488
-
489
- ## 0.0.20
490
-
491
- - Add `displayName` to `Panel`, `PanelGroup`, `PanelGroupContext`, and `PanelResizeHandle` to work around ParcelJS scope hoisting renaming.
492
-
493
- ## 0.0.19
494
-
495
- - Add optional `style` and `tagName` props to `Panel`, `PanelGroup`, and `PanelResizeHandle` to simplify custom styling.
496
- - Add `data-panel-group-direction` attribute to `PanelGroup` and `PanelResizeHandle` to simplify custom drag handle styling.
497
-
498
- ## 0.0.18
499
-
500
- - `Panel` and `PanelGroup` now use `overflow: hidden` style by default to avoid potential scrollbar flickers while resizing.
501
-
502
- ## 0.0.17
503
-
504
- - Bug fix: `Panel` styles include `flex-basis`, `flex-shrink`, and `overflow` so that their sizes are not unintentionally impacted by their content.
505
-
506
- ## 0.0.16
507
-
508
- - Bug fix: Resize handle ARIA attributes now rendering proper min/max/now values for Window Splitter.
509
- - Bug fix: Up/down arrows are ignored for _horizontal_ layouts and left/right arrows are ignored for _vertical_ layouts as per Window Splitter spec.
510
- - [#36](https://github.com/bvaughn/react-resizable-panels/issues/36): Removed `PanelContext` in favor of adding `data-resize-handle-active` attribute to active resize handles. This attribute can be used to update the style for active handles.
511
-
512
- ## 0.0.15
513
-
514
- - [#30](https://github.com/bvaughn/react-resizable-panels/issues/30): `PanelGroup` uses `display: flex` rather than absolute positioning. This provides several benefits: (a) more responsive resizing for nested groups, (b) no explicit `width`/`height` props, and (c) `PanelResizeHandle` components can now be rendered directly within `PanelGroup` (rather than as children of `Panel`s).
515
-
516
- ## 0.0.14
517
-
518
- - [#23](https://github.com/bvaughn/react-resizable-panels/issues/23): Fix small regression with `autoSaveId` that was introduced with non-deterministic `useId` ids.
519
-
520
- ## 0.0.13
521
-
522
- - [#18](https://github.com/bvaughn/react-resizable-panels/issues/18): Support server-side rendering (e.g. Next JS) by using `useId` (when available). `Panel` components no longer _require_ a user-provided `id` prop and will also fall back to using `useId` when none is provided.
523
- - `PanelGroup` component now sets `position: relative` style by default, as well as an explicit `height` and `width` style.
524
-
525
- ## 0.0.12
526
-
527
- - Bug fix: [#19](https://github.com/bvaughn/react-resizable-panels/issues/19): Fix initial "jump" that could occur when dragging started.
528
- - Bug fix: [#20](https://github.com/bvaughn/react-resizable-panels/issues/20): Stop resize/drag operation on "contextmenu" event.
529
- - Bug fix: [#21](https://github.com/bvaughn/react-resizable-panels/issues/21): Disable text selection while dragging active (Firefox only)
530
-
531
- ## 0.0.11
532
-
533
- - Drag UX change: Reversing drag after dragging past the min/max size of a panel will no longer have an effect until the pointer overlaps with the resize handle. (Thanks @davidkpiano for the suggestion!)
534
- - Bug fix: Resize handles are no longer left in a "focused" state after a touch/mouse event.
535
-
536
- ## 0.0.10
537
-
538
- - Corrupt build artifact. Don't use this version.
539
-
540
- ## 0.0.9
541
-
542
- - [#13](https://github.com/bvaughn/react-resizable-panels/issues/13): `PanelResizeHandle` should declare "separator" role and implement the recommended ["Window Splitter" pattern](https://www.w3.org/WAI/ARIA/apg/patterns/windowsplitter/)
543
-
544
- ## 0.0.8
545
-
546
- - [#7](https://github.com/bvaughn/react-resizable-panels/issues/7): Support "touch" events for mobile compatibility.
547
-
548
- ## 0.0.7
549
-
550
- - Add `PanelContext` with `activeHandleId` property identifying the resize handle currently being dragged (or `null`). This enables more customized UI/UX when resizing is in progress.
551
-
552
- ## 0.0.6
553
-
554
- - [#5](https://github.com/bvaughn/react-resizable-panels/issues/5): Removed `panelBefore` and `panelAfter` props from `PanelResizeHandle`. `PanelGroup` now infers this based on position within the group.
555
-
556
- ## 0.0.5
557
-
558
- - TypeScript props type fix for `PanelGroup`'s `children` prop.
559
-
560
- ## 0.0.4
561
-
562
- - [#8](https://github.com/bvaughn/react-resizable-panels/issues/8): Added optional `order` prop to `Panel` to improve conditional rendering.
563
-
564
- ## 0.0.3
565
-
566
- - [#3](https://github.com/bvaughn/react-resizable-panels/issues/3): `Panel`s can be conditionally rendered within a group. `PanelGroup` will persist separate layouts for each combination of visible panels.
567
-
568
- ## 0.0.2
569
-
570
- - Documentation-only update.
571
-
572
- ## 0.0.1
573
-
574
- - Initial release.
package/jest.config.js DELETED
@@ -1,10 +0,0 @@
1
- /** @type {import('ts-jest').JestConfigWithTsJest} */
2
- module.exports = {
3
- testEnvironment: "jsdom",
4
- preset: "ts-jest",
5
- prettierPath: null,
6
- testEnvironmentOptions: {
7
- customExportConditions: ["development"],
8
- },
9
- testMatch: ["**/*.test.{ts,tsx}"],
10
- };