@aiquants/resize-panels 1.9.0 → 2.0.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.
Files changed (62) hide show
  1. package/README.md +129 -22
  2. package/dist/GlobalDebugOverlay-Cf3GOn2A.cjs +1 -0
  3. package/dist/{GlobalDebugOverlay-Do70T2l6.js → GlobalDebugOverlay-DQtUdNeF.js} +28 -28
  4. package/dist/GlobalDebugOverlay.d.ts +1 -18
  5. package/dist/Panel.d.ts +13 -7
  6. package/dist/PanelDebugInfo.d.ts +6 -10
  7. package/dist/PanelGroup.d.ts +1 -6
  8. package/dist/PanelResizeHandle.d.ts +2 -7
  9. package/dist/allocateLayout.d.ts +12 -0
  10. package/dist/context.d.ts +2 -11
  11. package/dist/debugOverlayStore-D7FT6zPE.js +135 -0
  12. package/dist/debugOverlayStore-DY09saU8.cjs +1 -0
  13. package/dist/debugOverlayStore.d.ts +7 -36
  14. package/dist/hooks.d.ts +12 -24
  15. package/dist/index-DZ0itiBD.js +1299 -0
  16. package/dist/index-DqATP_BA.cjs +2 -0
  17. package/dist/index.cjs +1 -1
  18. package/dist/index.d.ts +10 -26
  19. package/dist/index.js +25 -13
  20. package/dist/reducer.d.ts +7 -38
  21. package/dist/roundHalfToEven.d.ts +0 -9
  22. package/dist/styles/resize-panels.standalone.css +1 -1
  23. package/dist/types.d.ts +67 -261
  24. package/dist/utils/simple-logger.d.ts +0 -74
  25. package/dist/utils.d.ts +10 -55
  26. package/package.json +2 -3
  27. package/dist/GlobalDebugOverlay-sEQN6exo.cjs +0 -1
  28. package/dist/GlobalDebugOverlay.d.ts.map +0 -1
  29. package/dist/Panel.d.ts.map +0 -1
  30. package/dist/PanelDebugInfo.d.ts.map +0 -1
  31. package/dist/PanelGroup.d.ts.map +0 -1
  32. package/dist/PanelResizeHandle.d.ts.map +0 -1
  33. package/dist/context.d.ts.map +0 -1
  34. package/dist/debugOverlayStore-Cntyxboe.js +0 -141
  35. package/dist/debugOverlayStore-Dkl-fHoa.cjs +0 -1
  36. package/dist/debugOverlayStore.d.ts.map +0 -1
  37. package/dist/hooks.d.ts.map +0 -1
  38. package/dist/index-B6YGX2DH.js +0 -2009
  39. package/dist/index-DssZUxGw.cjs +0 -2
  40. package/dist/index.d.ts.map +0 -1
  41. package/dist/reducer.d.ts.map +0 -1
  42. package/dist/roundHalfToEven.d.ts.map +0 -1
  43. package/dist/types.d.ts.map +0 -1
  44. package/dist/utils/simple-logger.d.ts.map +0 -1
  45. package/dist/utils.d.ts.map +0 -1
  46. package/src/GlobalDebugOverlay.tsx +0 -284
  47. package/src/Panel.tsx +0 -635
  48. package/src/PanelDebugInfo.tsx +0 -148
  49. package/src/PanelGroup.tsx +0 -260
  50. package/src/PanelResizeHandle.tsx +0 -797
  51. package/src/context.ts +0 -25
  52. package/src/debugOverlayStore.ts +0 -351
  53. package/src/hooks.ts +0 -968
  54. package/src/index.ts +0 -84
  55. package/src/reducer.ts +0 -1234
  56. package/src/roundHalfToEven.ts +0 -40
  57. package/src/styles/components.entry.css +0 -10
  58. package/src/styles/resize-panels.css +0 -1
  59. package/src/styles/standalone.entry.css +0 -12
  60. package/src/types.ts +0 -419
  61. package/src/utils/simple-logger.ts +0 -186
  62. package/src/utils.ts +0 -279
package/README.md CHANGED
@@ -1,16 +1,18 @@
1
1
  # @aiquants/resize-panels
2
2
 
3
- Resizable panel layout components for React. Packages the layout management, DOM measurement, and snapping logic previously used in application templates into a reusable library.
3
+ Resizable panel layout components for React, built on one rule: **there is a single function that decides panel sizes, and the handle is the boundary rather than a thing positioned near it.**
4
+
5
+ Every state change — first paint, container resize, drag, collapse, restored layout — runs the same allocator, so the panels always fill the container exactly and the handle can never drift away from the edge it moves.
4
6
 
5
7
  ## Key Features
6
8
 
7
- - **Core Components**: `PanelGroup`, `Panel`, and `PanelResizeHandle` synchronized via a central state reducer for layout and DOM measurements.
8
- - **Snap & Noise Filtering**: Uses `calculateSnapThreshold` and noise filtering to prevent layout jitter and unwanted collapse during resizing.
9
- - **Directional Collapsible Control**: Declarative `collapsible` settings (`from: 'start' | 'end' | 'both'`) and `usePanelControls` hook support collapsing/expanding via both drag actions and UI controls.
10
- - **Keyboard & Touch Accessibility**: Handles support mouse/touch dragging as well as **keyboard navigation via arrow keys** (5x step multiplier with Shift). Drag states remain robust under multi-touch or `pointercancel` interruptions.
11
- - **Full RTL Layout Support**: Under `dir="rtl"`, drag interactions, keyboard shortcuts, and handle positions automatically mirror visual layout directions.
12
- - **Auto-Persistence**: Set `autoSaveId` to save panel sizes to `localStorage` (debounced after layout stabilization) and restore state on page reloads.
13
- - **Debug & Visualization**: Enable `showDebugInfo` to inspect panel metrics and constraint violations via `PanelDebugInfo` and a global debug overlay (dynamically lazy-loaded, zero overhead in production bundles).
9
+ - **One allocator, one geometry**: `allocatePanelSizes` distributes the container among the panels (proportional water-filling with per-panel minimum/maximum bounds). `Σ panel sizes == the group's content box` holds after every transition the declared bounds allow, and the reducer logs a breach of that invariant rather than letting it pass silently — a container the minimums overflow, or that the maximums cannot reach, is reported as a constraint violation instead.
10
+ - **A handle that cannot drift**: the resize handle renders a zero-length in-flow flex item at the boundary and draws its hit area symmetrically around it. Nothing computes its position, so it stays on the boundary in LTR and RTL, horizontal and vertical, with group padding, and during every frame of a live container resize. A drag divides the pointer's travel by the group's visual scale, so the grab point stays under the cursor even below a transformed ancestor.
11
+ - **Predictable proportions**: a flexible panel's size is a weight only the ratio between weights matters, unless the panel declares `flexAdjustPriority`, which reads the same number as a claim on that share of the container. A dragged layout becomes a fixed point of the allocator, so it survives the next resize as a ratio instead of snapping back.
12
+ - **Directional Collapsible Control**: declarative `collapsible` settings (`from: 'start' | 'end' | 'both'`) and the `usePanelControls` hook support collapsing/expanding from drags and from UI controls; expanding restores the layout the panel had before it closed.
13
+ - **Keyboard & Touch Accessibility**: handles are `role="separator"` widgets whose `aria-valuenow` / `aria-valuemin` / `aria-valuemax` publish the boundary and the travel *this* handle can reach, collapsing included; a collapsed neighbour is reported as length 0 rather than making the values disappear. Arrow keys resize (5x step with Shift), reopen a collapsed neighbour from the side it closed towards and collapse a panel the pair's travel cannot shrink further, while a handle with nowhere to go leaves the key to the page. A drag needs the primary button and survives multi-touch and `pointercancel`.
14
+ - **Auto-Persistence**: set `autoSaveId` to store each panel's open length and collapsed flag in `localStorage` next to its panel id, so a layout saved by a different set of panels is rejected instead of being applied by position.
15
+ - **Debug & Visualization**: enable `showDebugInfo` to inspect allocations through the per-panel `PanelDebugInfo` badge and a global overlay (lazily imported; production bundles without it create no per-panel observers at all). A constraint violation needs no flag: the group draws its own placeholder over the panels whenever the allocator reports one.
14
16
 
15
17
  ## Installation
16
18
 
@@ -41,7 +43,7 @@ export const Example = () => {
41
43
  const baseId = useId()
42
44
 
43
45
  return (
44
- <PanelGroup id={`${baseId}-group`} direction="horizontal" className="h-96">
46
+ <PanelGroup id={`${baseId}-group`} direction="horizontal" style={{ height: "24rem" }}>
45
47
  <Panel id={`${baseId}-left`} defaultSize={{ value: 200, unit: "pixels" }} className="bg-slate-100">
46
48
  Left Panel
47
49
  </Panel>
@@ -59,7 +61,7 @@ export const Example = () => {
59
61
  Specify `collapsible={{ from: "start" }}` or `collapsible={{ from: "end" }}` on a `Panel` to enable automatic collapse/expand when dragging the corresponding handle to container boundaries. Set `defaultCollapsed` to set initial state to collapsed. Use `collapsible={{ from: "both" }}` to allow collapsing from either edge.
60
62
 
61
63
  ```tsx
62
- <PanelGroup direction="horizontal" className="h-96">
64
+ <PanelGroup direction="horizontal" style={{ height: "24rem" }}>
63
65
  <Panel id="sidebar" defaultSize={{ value: 240, unit: "pixels" }} collapsible={{ from: "end" }}>
64
66
  Sidebar
65
67
  </Panel>
@@ -98,7 +100,7 @@ const PanelToggleButtons = ({ panelId, label }: { panelId: string; label: string
98
100
  }
99
101
 
100
102
  export const Example = () => (
101
- <PanelGroup direction="horizontal" className="h-96">
103
+ <PanelGroup direction="horizontal" style={{ height: "24rem" }}>
102
104
  <Panel id="sidebar" defaultSize={{ value: 240, unit: "pixels" }} collapsible={{ from: "end" }}>
103
105
  <PanelToggleButtons panelId="sidebar" label="Sidebar" />
104
106
  </Panel>
@@ -124,7 +126,7 @@ export const Example = () => (
124
126
  | `direction` | `'horizontal' \| 'vertical'` | Panel layout orientation |
125
127
  | `className` / `style` | `string` / `React.CSSProperties` | Additional styling for the container |
126
128
  | `children` | `React.ReactNode` | `Panel` and `PanelResizeHandle` child elements |
127
- | `showDebugInfo` | `boolean` | Enables `PanelDebugInfo` and global debug overlay |
129
+ | `showDebugInfo` | `boolean` | Enables the per-panel `PanelDebugInfo` badge and the global debug overlay |
128
130
  | `onLayout` | `(sizes: number[]) => void` | Callback emitting updated pixel size arrays on resize/init |
129
131
  | `autoSaveId` | `string` | Key used to automatically persist and restore panel sizes in `localStorage` |
130
132
 
@@ -132,14 +134,27 @@ export const Example = () => (
132
134
 
133
135
  | Property | Type | Description |
134
136
  | --- | --- | --- |
135
- | `id` | `string` | Panel identifier. Explicit string required for SSR consistency |
136
- | `defaultSize` | `{ value: number; unit: 'pixels' \| 'percentage' } \| number` | Initial panel size (numbers parsed as percentages) |
137
+ | `id` | `string` | Panel identifier (reflected in `data-panel-id`). Optional a `useId`-derived id is generated when omitted — but fixed at mount: a later change is ignored with a warning |
138
+ | `defaultSize` | `{ value: number; unit: 'pixels' \| 'percentage' } \| number` | Initial panel size (numbers parsed as percentages; `50%` when omitted) |
137
139
  | `minSize` / `maxSize` | `FlexibleSize` | Panel size boundaries (pixels or percentages) |
138
140
  | `collapsible` | `{ from: 'start' \| 'end' \| 'both' }` | Declarative collapsible edge configuration |
139
141
  | `defaultCollapsed` | `boolean` | Whether the panel starts collapsed |
140
- | `pixelAdjustPriority` | `number` | Priority for assigning excess space to pixel-based panels |
142
+ | `pixelAdjustPriority` | `number` | Order in which pixel panels are served when space is scarce (higher first) |
143
+ | `flexAdjustPriority` | `number` | Serving order among flexible panels (higher first); declaring it also reads `defaultSize` as an absolute claim on that share of the container |
144
+ | `contentOverflow` | `React.CSSProperties["overflow"]` | Overflow of the panel's content wrapper (`auto` by default) |
141
145
  | `className` / `style` | `string` / `React.CSSProperties` | Panel container styles |
142
146
 
147
+ `Panel` and `PanelGroup` forward any other DOM attribute (`data-testid`, `aria-*`, event handlers) to their
148
+ element, except the ones they compute themselves: `Panel` owns `aria-hidden`, which follows the collapsed state,
149
+ and its own `data-panel-*` attributes, while `PanelGroup` owns `data-panel-group-id` and
150
+ `data-panel-group-direction` — the first is what `getPanelGroupElement` looks up, the second is what marks an
151
+ element as a group for `findOwningGroup` and therefore for every handle. `aria-hidden` is removed
152
+ from `PanelProps` to state that ownership, but TypeScript does not type-check JSX attribute names containing a
153
+ hyphen, so neither it nor a `data-panel-*` / `data-panel-group-*` of your own is rejected at compile time: what
154
+ enforces the contract is the runtime override, which applies these attributes after everything you forwarded. A
155
+ `data-panel-group-id` you pass disappears altogether when the group itself has no `id`. Both elements merge your
156
+ `className` with their own (`panel` / `panel-group`) instead of replacing it.
157
+
143
158
  ### PanelResizeHandle Properties
144
159
 
145
160
  | Property | Type | Description |
@@ -157,23 +172,82 @@ export const Example = () => (
157
172
  | `className` / `style` | `string` / `React.CSSProperties` | Additional styling for the resize handle |
158
173
  | `children` | `React.ReactNode` | Custom indicator element rendered inside handle (overrides default indicator) |
159
174
 
160
- > Handles render as `<button>` elements accessible via arrow keys (`←`/`→` for horizontal, `↑`/`↓` for vertical). Holding `Shift` increases step distance 5x. Under `dir="rtl"`, keyboard and drag directions adjust to visual layout. Dimension options snap to integer pixels via `roundHalfToEven` to eliminate subpixel blurring.
175
+ > Handles render as `<button role="separator">` elements accessible via arrow keys (`←`/`→` for horizontal, `↑`/`↓` for vertical); holding `Shift` increases the step 5x. Under `dir="rtl"` the drag and keyboard directions follow the visual layout. The handle sits inside a zero-length anchor placed by flex layout, so its hit area is centred on the panel boundary without any position arithmetic.
176
+
177
+ `PanelResizeHandle` forwards any other DOM attribute to its `<button>`, and calls your `onPointerDown` /
178
+ `onKeyDown` before its own handling — calling `preventDefault()` in them stops the library's gesture from starting.
179
+ The attributes it computes from the layout (`role`, `aria-orientation`, `aria-valuenow` / `aria-valuemin` /
180
+ `aria-valuemax`, `aria-disabled`, `aria-hidden`) are removed from `PanelResizeHandleProps`, though only `role` is
181
+ actually caught by the compiler — the hyphenated names are not type-checked in JSX, and it is the runtime override
182
+ that keeps them the library's. `aria-label` stays yours and replaces the built-in description, and `title` defaults
183
+ to that same description.
184
+
185
+ Your `style` reaches the button between two library layers. The handle's resolved dimensions are published as CSS
186
+ custom properties — `--rp-handle-thickness`, `--rp-indicator-thickness`, `--rp-indicator-length`,
187
+ `--rp-indicator-bar-thickness`, `--rp-indicator-bar-length` — *before* it, so decorations of your own can be sized
188
+ from the same numbers and may redefine them; the declarations that keep the hit area centred on the boundary
189
+ (`position: absolute`, `zIndex: 20`, `touchAction: none`, the logical insets and the thickness / cross-axis `100%`
190
+ box) are applied *after* it and take no override. While the group reports a constraint violation, every handle is
191
+ hidden (`display: none` on its anchor) as well as disabled.
161
192
 
162
193
  ## Hooks & Utilities
163
194
 
164
- - `useResizablePanels`: Internal hook used by `PanelGroup`. Useful for building custom panel containers.
165
- - `usePanelGroup`: Context accessor for panel lists and layout state.
166
- - `usePanelControls`: Provides `collapse`, `expand`, and `toggle` operations for a specified panel ID.
167
- - `saveLayout` & `loadLayout`: Programmatically persist or restore layout state.
195
+ - `useResizablePanels`: the hook behind `PanelGroup`. It measures the container, keeps the panel order equal to DOM order, notifies `onLayout`, persists the layout and returns the group's base style — it never computes a panel size.
196
+ - `usePanelGroup` / `PanelGroupContext`: context accessor, and the context itself, for the panel list, the container length, the constraint violation and `layoutOrderKey` — the document order of the panels and handle anchors, which changes even when only a handle moved to another boundary.
197
+ - `usePanelControls`: `collapse`, `expand` and `toggle` for a given panel id.
198
+ - `allocatePanelSizes`, `resolvePanelBounds`, `isPixelPanel`: the layout calculation itself, exported for tests and for hosts that drive their own container.
199
+ - `panelReducer`, `initialPanelGroupLayoutState`, `getPanelPreferenceInPixels`, `findLayoutInvariantBreach`: the state machine around the allocator, the length a layout should persist, and the `Σ sizes == container` check.
200
+ - `getContainerSize`: measure one axis of an element in layout pixels; it returns `{ content, border }`, and `content` (padding and borders removed) is the length the allocator fills.
201
+ - `findOwningGroup`, `getGroupLayoutElements`: resolve the group that owns an element, and that group's panels and handle anchors in document order — across wrapper elements, `display: contents` included, while skipping both a nested group's own elements and any `data-panel-id` that belongs to a panel's content rather than to this group.
202
+ - `saveLayout` & `loadLayout`: persist or restore a layout (`{ id, size, collapsed }[]`).
203
+ - `clamp`, `getConstraintInPixels`, `normalizeSizeConfig`, `percentageToPixels`, `toRoundedPercentage`, `calculateSnapThreshold`: the unit conversions and thresholds the components share.
168
204
  - `getPanelElement`, `getPanelGroupElement`, `getResizeHandleElement`: DOM element query helpers via `data-*` attributes.
169
205
 
206
+ Every public type (`PanelProps`, `PanelGroupProps`, `PanelResizeHandleProps`, `PanelLayoutData`, `PanelRegistration`, `PersistedPanelSize`, `PanelGroupLayoutState`, `PanelAction`, `LayoutAllocation`, `PanelBounds`, `ContainerAxisMeasurement`, …) is re-exported from the package root; `docs/specs` (`00-architecture-overview.md` §8) lists the surface in full.
207
+
208
+ ## How sizes are decided
209
+
210
+ | Panel kind | What it declares | What it gets |
211
+ | --- | --- | --- |
212
+ | Flexible (`percentage`, or a bare number) | a weight — only the ratio between such weights matters | its share of what is left after the panels with an absolute target, clamped to its bounds |
213
+ | Flexible with `flexAdjustPriority` | the same number, read as a claim on that share of the container | that claim, served after the pixel panels and clamped to its bounds |
214
+ | Pixel (`pixels`) | an absolute length | that length, clamped to its bounds, once the panels ahead of it in `pixelAdjustPriority` order have been served |
215
+
216
+ Scarcity and surplus are two ends of one order. While space is scarce, targets are served in that order — pixel
217
+ panels by `pixelAdjustPriority`, then flexible panels by `flexAdjustPriority` — so the panel last in line is the
218
+ one that falls short of its target, even when every declared minimum would fit. While space is left over, it is
219
+ offered to the ratio panels by weight, then to the prioritized flexible panels by weight, then to the pixel panels
220
+ in `pixelAdjustPriority` order up to their `maxSize`, and last, in equal parts, to the flexible panels that have a
221
+ weight of 0 and no `flexAdjustPriority`. A sidebar declared in pixels therefore grows past its declared length when
222
+ nothing else can absorb the surplus: give it a `maxSize` to pin it. When a clamp bites, the residue is
223
+ redistributed among the remaining panels of the same stage in their own ratio, and the container ends up exactly
224
+ filled as long as one panel can still take the surplus; when none can, the gap is reported — as a constraint
225
+ violation when the panels' maximums cannot reach the container, and as a logged invariant breach otherwise. The
226
+ full statement, including the proofs of ratio preservation, continuity and the drag fixed point, is in `docs/specs`
227
+ (`11-layout-allocator.md`).
228
+
170
229
  ## Layout Persistence
171
230
 
172
- When `autoSaveId` is provided to `PanelGroup`, panel dimensions are saved to `localStorage` (debounced by 200ms after `ResizeObserver` stabilization). Re-opening the page automatically applies `loadLayout(autoSaveId)` to restore both pixel- and percentage-based panels.
231
+ When `autoSaveId` is provided to `PanelGroup`, the layout is written to `localStorage` under the key
232
+ `panel-layout-<autoSaveId>` as `{ id, size, collapsed }[]`, 200ms after the layout stops changing: a change arriving
233
+ inside that window restarts the timer rather than forcing a write, so a drag never runs synchronous storage I/O once
234
+ per frame. The one write outside that timer is the flush on unmount, which hands over the entries still pending so
235
+ the last layout is not lost to a navigation. The stored `size` is the panel's preference — the length it occupies
236
+ while open — not its allocated size, so a panel saved while collapsed still knows what to reopen to. On the next
237
+ mount, and again whenever `autoSaveId` changes, the payload is applied only if it names exactly the panels that are
238
+ present; a payload from a different panel set is ignored rather than applied by position.
239
+ Restoring into a container of a different length scales a flexible panel by ratio, because its stored length is
240
+ re-read as a share of the current container, while a pixel panel restores the absolute length it had.
173
241
 
174
242
  ## Debugging & Inspection
175
243
 
176
- Enabling `showDebugInfo` on `PanelGroup` renders overlay inspection metrics over each `Panel` (showing collapse status, measured dimensions, and percentages) along with a global container inspector listing handle thickness (8px default) and constraint alerts. Debug components are lazily imported (`React.lazy`) and excluded from production builds when unused.
244
+ Enabling `showDebugInfo` on `PanelGroup` renders inspection metrics over each `Panel` (container length, allocated
245
+ size, preference, resolved bounds) along with a global inspector: a header counting the groups, panels and resize
246
+ handles on the page, then one card per group carrying its direction and container box and, for every panel, the
247
+ state size next to the measured size, both percentages, the preference, the unit, the declared bounds and the two
248
+ priorities. Individual handle measurements and constraint violations are not part of that overlay; a violation is
249
+ shown by the placeholder the group draws over its panels, with or without the flag. Debug components are lazily
250
+ imported (`React.lazy`); without the flag no per-panel `ResizeObserver` is created.
177
251
 
178
252
  ## Styling (CSS)
179
253
 
@@ -196,6 +270,39 @@ The package provides two CSS consumption options:
196
270
 
197
271
  Dark mode activates based on the `.dark` class on `<html>`.
198
272
 
273
+ ### Style ownership
274
+
275
+ Your `className` and `style` reach all three components, but the declarations the layout itself depends on are
276
+ applied *after* them and do not accept an override:
277
+
278
+ - **Group**: `display: flex`, `flexDirection`, `alignItems: stretch`, `gap: 0px`, `position: relative`,
279
+ `boxSizing: border-box`, `writingMode: horizontal-tb`. The presentation defaults (`width`, `height`, `minWidth`,
280
+ `minHeight`, `overflow`) are yours to change.
281
+ - **Panel**: the flex triple (`flexBasis` / `flexGrow` / `flexShrink`), `order: 0`, `margin: 0`, `display: flex`,
282
+ `flexDirection: column`, `position: relative`, `boxSizing: border-box`, `minWidth` and `minHeight: 0`,
283
+ `maxWidth` and `maxHeight: none`, the cross-axis `100%`, and `display: none` while collapsed. The presentation
284
+ defaults you can override are `overflow: hidden` and `isolation: isolate`.
285
+ - **Handle button**: `position: absolute`, `zIndex: 20`, `touchAction: none`, the logical inset that centres it on
286
+ the boundary, its primary-axis thickness and its cross-axis `100%`. The `--rp-*` custom properties are placed
287
+ before your `style`, so those you may redefine.
288
+
289
+ Both halves of that list are written to the `style` attribute, so a presentation default is overridable by your
290
+ `style` **only** — a utility class loses to the inline declaration it would replace, which is why the examples
291
+ above give the group its height through `style` rather than an `h-*` class. Every property the components do not
292
+ write inline (colour, padding, borders, radius, …) stays entirely yours to set by class.
293
+
294
+ A panel owns `maxWidth` / `maxHeight` because a single utility class (`max-w-*` and friends) would otherwise draw
295
+ it shorter than the length the allocator handed out, leaving state and rendering disagreeing with the handle stuck.
296
+ It defaults to `isolation: isolate` so that a `z-index` used inside a panel cannot rise above the handles; a panel
297
+ whose content must escape its own box — a `position: fixed` maximised overlay, say — opts out with
298
+ `style={{ isolation: "auto" }}` and accepts that the content may then cover a handle. That trade-off is inherent to
299
+ stacking contexts: nothing can both take part in the panel's own stacking order and paint above its siblings.
300
+
301
+ A panel renders its children inside an in-flow `flex: 1 1 auto` wrapper, so padding you set on a panel behaves
302
+ normally; `contentOverflow` chooses how that wrapper scrolls. The group keeps `overflow: hidden` so that a handle
303
+ straddling a boundary cannot raise a scrollbar — at the cost that when an edge panel collapses, the outer half of
304
+ the handle now sitting on the group's own edge is clipped (its centre stays on the boundary).
305
+
199
306
  ## Demo App
200
307
 
201
308
  Run the included workspace demo app:
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),A=require("react"),P=require("react-dom"),x=require("./debugOverlayStore-DY09saU8.cjs"),R=require("./index-DqATP_BA.cjs"),n=(o,i)=>typeof o!="number"||!Number.isFinite(o)?"—":`${(o<0?0:o).toFixed(8)}${i}`,T={position:"fixed",left:"50%",bottom:"20px",transform:"translate(-50%, 0)",zIndex:100,maxWidth:"min(90vw, 1120px)",width:"100%",borderRadius:"14px",backgroundColor:"rgba(15, 23, 42, 0.72)",color:"#e2e8f0",fontFamily:"monospace",fontSize:"11px",lineHeight:1.6,boxShadow:"0 22px 45px rgba(15,23,42,0.45)",border:"1px solid rgba(148, 163, 184, 0.22)",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",pointerEvents:"auto",overflow:"auto"},Y={display:"flex",justifyContent:"space-between",alignItems:"center",flexWrap:"wrap",gap:"12px"},w={display:"flex",flexDirection:"column",gap:"4px"},D={padding:"6px 10px",borderRadius:"9999px",border:"1px solid rgba(148, 163, 184, 0.35)",color:"#e2e8f0",fontWeight:600,fontSize:"10px",letterSpacing:"0.03em",textTransform:"uppercase",cursor:"pointer",transition:"background-color 0.18s ease, border-color 0.18s ease"},C={padding:"10px 12px",borderRadius:"10px",backgroundColor:"rgba(30, 41, 59, 0.55)",border:"1px solid rgba(148, 163, 184, 0.18)",display:"flex",flexDirection:"column",gap:"10px"},N={padding:"8px 10px",borderRadius:"8px",backgroundColor:"rgba(15, 23, 42, 0.55)",border:"1px solid rgba(148, 163, 184, 0.16)",display:"flex",flexDirection:"column",gap:"4px"},p={display:"flex",justifyContent:"space-between",alignItems:"center",gap:"6px"},k={display:"grid",gridTemplateColumns:"auto 1fr",gap:"2px 10px",color:"#e2e8f0"},G={padding:"2px 6px",borderRadius:"9999px",fontSize:"10px",textTransform:"uppercase"},I=({groupId:o})=>x.useDebugOverlayOwnerId()!==o?null:e.jsx(u,{}),u=()=>{const i=x.useDebugOverlaySnapshot().groups,[t,g]=A.useState(!0);if(i.length===0||typeof document>"u")return null;const b=i.reduce((s,a)=>s+a.panels.length,0),h=i.reduce((s,a)=>s+(a.handles?.length??0),0),f=()=>g(s=>!s),m=e.jsxs("div",{style:{...T,padding:t?"10px 18px":"14px 18px",maxHeight:t?"52px":"min(65vh, 520px)",transition:"max-height 0.24s ease, padding 0.24s ease"},children:[e.jsxs("div",{style:{...Y,marginBottom:t?0:"12px"},children:[e.jsxs("div",{style:w,children:[e.jsx("span",{style:{fontWeight:700,fontSize:"12px",letterSpacing:"0.03em"},children:"Panel Overview"}),e.jsxs("span",{style:{color:"#cbd5f5"},children:["groups: ",i.length," / panels: ",b," / resizers: ",h]})]}),e.jsx("button",{type:"button",onClick:f,style:{...D,backgroundColor:t?"rgba(59, 130, 246, 0.2)":"rgba(71, 85, 105, 0.45)"},title:t?"Panel Overview を開く":"Panel Overview を閉じる",children:t?"開く":"閉じる"})]}),!t&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"12px",maxHeight:"45vh",overflowY:"auto",paddingRight:"6px"},children:i.map((s,a)=>{const l=s.direction==="horizontal"?s.containerSize.width:s.containerSize.height;return e.jsxs("div",{style:C,children:[e.jsxs("div",{style:{...p,flexWrap:"wrap",gap:"10px",color:"#dbeafe"},children:[e.jsxs("span",{style:{fontWeight:600,fontSize:"11px",letterSpacing:"0.02em",textTransform:"uppercase"},children:["group ",a+1,": ",s.displayName]}),e.jsxs("span",{children:["direction: ",s.direction," / container: ",n(s.containerSize.width,"px")," × ",n(s.containerSize.height,"px")]})]}),e.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(220px, 1fr))",gap:"10px"},children:s.panels.map((r,y)=>{const d=r.measuredPixelSize??r.size,S=r.size,j=n(S,"px"),v=l>0?r.size/l*100:void 0,E=r.measuredPercentageSize!==void 0?r.measuredPercentageSize:l>0?d/l*100:void 0,c=r.collapsed||d<=R.PANEL_SNAP_THRESHOLD,O=r.collapsed?"collapsed":c?"hidden":"visible",z=n(v,"%"),L=n(E,"%"),_=n(d,"px");return e.jsxs("div",{style:N,children:[e.jsxs("div",{style:p,children:[e.jsx("span",{style:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},children:r.id}),e.jsx("span",{style:{...G,backgroundColor:r.collapsed?"rgba(251, 113, 133, 0.25)":c?"rgba(250, 204, 21, 0.25)":"rgba(74, 222, 128, 0.25)",color:r.collapsed?"#fecdd3":c?"#fef08a":"#bbf7d0"},children:O})]}),e.jsxs("div",{style:k,children:[e.jsx("span",{children:"size (state):"}),e.jsx("span",{children:j}),e.jsx("span",{children:"size (measured):"}),e.jsx("span",{children:_}),e.jsx("span",{children:"percentage (state):"}),e.jsx("span",{children:z}),e.jsx("span",{children:"preference:"}),e.jsx("span",{children:r.sizeUnit==="pixels"?n(r.preferredPixelSize,"px"):n(r.preferredPercentageSize,"%")}),e.jsx("span",{children:"percentage (measured):"}),e.jsx("span",{children:L}),e.jsx("span",{children:"unit:"}),e.jsx("span",{children:r.sizeUnit}),e.jsx("span",{children:"min:"}),e.jsx("span",{children:r.minSize!==void 0?JSON.stringify(r.minSize):"—"}),e.jsx("span",{children:"max:"}),e.jsx("span",{children:r.maxSize!==void 0?JSON.stringify(r.maxSize):"—"}),e.jsx("span",{children:"priority:"}),e.jsx("span",{children:r.pixelAdjustPriority??"—"}),e.jsx("span",{children:"flex priority:"}),e.jsx("span",{children:r.flexAdjustPriority??"—"})]})]},r.id||y)})})]},s.groupId)})})]});return P.createPortal(m,document.body)};exports.GlobalDebugOverlay=u;exports.GlobalDebugOverlayGate=I;
@@ -1,9 +1,9 @@
1
1
  import { jsx as e, jsxs as t } from "react/jsx-runtime";
2
2
  import { useState as A } from "react";
3
3
  import { createPortal as P } from "react-dom";
4
- import { useDebugOverlayOwnerId as R, useDebugOverlaySnapshot as T } from "./debugOverlayStore-Cntyxboe.js";
5
- import { P as Y } from "./index-B6YGX2DH.js";
6
- const a = (s, n) => typeof s != "number" || !Number.isFinite(s) ? "—" : `${(s < 0 ? 0 : s).toFixed(8)}${n}`, w = {
4
+ import { useDebugOverlayOwnerId as R, useDebugOverlaySnapshot as T } from "./debugOverlayStore-D7FT6zPE.js";
5
+ import { P as Y } from "./index-DZ0itiBD.js";
6
+ const s = (a, n) => typeof a != "number" || !Number.isFinite(a) ? "—" : `${(a < 0 ? 0 : a).toFixed(8)}${n}`, w = {
7
7
  position: "fixed",
8
8
  left: "50%",
9
9
  bottom: "20px",
@@ -75,11 +75,11 @@ const a = (s, n) => typeof s != "number" || !Number.isFinite(s) ? "—" : `${(s
75
75
  borderRadius: "9999px",
76
76
  fontSize: "10px",
77
77
  textTransform: "uppercase"
78
- }, M = ({ groupId: s }) => R() !== s ? null : /* @__PURE__ */ e(W, {}), W = () => {
78
+ }, J = ({ groupId: a }) => R() !== a ? null : /* @__PURE__ */ e(W, {}), W = () => {
79
79
  const n = T().groups, [o, g] = A(!0);
80
80
  if (n.length === 0 || typeof document > "u")
81
81
  return null;
82
- const u = n.reduce((r, d) => r + d.panels.length, 0), h = n.reduce((r, d) => r + (d.handles?.length ?? 0), 0), m = () => g((r) => !r), f = /* @__PURE__ */ t(
82
+ const u = n.reduce((i, d) => i + d.panels.length, 0), h = n.reduce((i, d) => i + (d.handles?.length ?? 0), 0), m = () => g((i) => !i), f = /* @__PURE__ */ t(
83
83
  "div",
84
84
  {
85
85
  style: {
@@ -145,8 +145,8 @@ const a = (s, n) => typeof s != "number" || !Number.isFinite(s) ? "—" : `${(s
145
145
  overflowY: "auto",
146
146
  paddingRight: "6px"
147
147
  },
148
- children: n.map((r, d) => {
149
- const l = r.direction === "horizontal" ? r.containerSize.width : r.containerSize.height;
148
+ children: n.map((i, d) => {
149
+ const l = i.direction === "horizontal" ? i.containerSize.width : i.containerSize.height;
150
150
  return /* @__PURE__ */ t("div", { style: k, children: [
151
151
  /* @__PURE__ */ t(
152
152
  "div",
@@ -171,17 +171,17 @@ const a = (s, n) => typeof s != "number" || !Number.isFinite(s) ? "—" : `${(s
171
171
  "group ",
172
172
  d + 1,
173
173
  ": ",
174
- r.displayName
174
+ i.displayName
175
175
  ]
176
176
  }
177
177
  ),
178
178
  /* @__PURE__ */ t("span", { children: [
179
179
  "direction: ",
180
- r.direction,
180
+ i.direction,
181
181
  " / container: ",
182
- a(r.containerSize.width, "px"),
182
+ s(i.containerSize.width, "px"),
183
183
  " × ",
184
- a(r.containerSize.height, "px")
184
+ s(i.containerSize.height, "px")
185
185
  ] })
186
186
  ]
187
187
  }
@@ -194,18 +194,18 @@ const a = (s, n) => typeof s != "number" || !Number.isFinite(s) ? "—" : `${(s
194
194
  gridTemplateColumns: "repeat(auto-fill, minmax(220px, 1fr))",
195
195
  gap: "10px"
196
196
  },
197
- children: r.panels.map((i, b) => {
198
- const c = i.measuredPixelSize ?? i.size, y = i.size, S = a(y, "px"), v = i.percentageSize ?? (l > 0 ? i.size / l * 100 : void 0), E = i.measuredPercentageSize !== void 0 ? i.measuredPercentageSize : l > 0 ? c / l * 100 : void 0, p = i.collapsed || c <= Y, z = i.collapsed ? "collapsed" : p ? "hidden" : "visible", O = a(v, "%"), L = a(E, "%"), _ = a(c, "px");
197
+ children: i.panels.map((r, b) => {
198
+ const p = r.measuredPixelSize ?? r.size, y = r.size, S = s(y, "px"), v = l > 0 ? r.size / l * 100 : void 0, E = r.measuredPercentageSize !== void 0 ? r.measuredPercentageSize : l > 0 ? p / l * 100 : void 0, c = r.collapsed || p <= Y, z = r.collapsed ? "collapsed" : c ? "hidden" : "visible", L = s(v, "%"), O = s(E, "%"), _ = s(p, "px");
199
199
  return /* @__PURE__ */ t("div", { style: I, children: [
200
200
  /* @__PURE__ */ t("div", { style: x, children: [
201
- /* @__PURE__ */ e("span", { style: { flex: 1, minWidth: 0, overflow: "hidden", textOverflow: "ellipsis" }, children: i.id }),
201
+ /* @__PURE__ */ e("span", { style: { flex: 1, minWidth: 0, overflow: "hidden", textOverflow: "ellipsis" }, children: r.id }),
202
202
  /* @__PURE__ */ e(
203
203
  "span",
204
204
  {
205
205
  style: {
206
206
  ...H,
207
- backgroundColor: i.collapsed ? "rgba(251, 113, 133, 0.25)" : p ? "rgba(250, 204, 21, 0.25)" : "rgba(74, 222, 128, 0.25)",
208
- color: i.collapsed ? "#fecdd3" : p ? "#fef08a" : "#bbf7d0"
207
+ backgroundColor: r.collapsed ? "rgba(251, 113, 133, 0.25)" : c ? "rgba(250, 204, 21, 0.25)" : "rgba(74, 222, 128, 0.25)",
208
+ color: r.collapsed ? "#fecdd3" : c ? "#fef08a" : "#bbf7d0"
209
209
  },
210
210
  children: z
211
211
  }
@@ -217,27 +217,27 @@ const a = (s, n) => typeof s != "number" || !Number.isFinite(s) ? "—" : `${(s
217
217
  /* @__PURE__ */ e("span", { children: "size (measured):" }),
218
218
  /* @__PURE__ */ e("span", { children: _ }),
219
219
  /* @__PURE__ */ e("span", { children: "percentage (state):" }),
220
- /* @__PURE__ */ e("span", { children: O }),
221
- /* @__PURE__ */ e("span", { children: "percentage (measured):" }),
222
220
  /* @__PURE__ */ e("span", { children: L }),
221
+ /* @__PURE__ */ e("span", { children: "preference:" }),
222
+ /* @__PURE__ */ e("span", { children: r.sizeUnit === "pixels" ? s(r.preferredPixelSize, "px") : s(r.preferredPercentageSize, "%") }),
223
+ /* @__PURE__ */ e("span", { children: "percentage (measured):" }),
224
+ /* @__PURE__ */ e("span", { children: O }),
223
225
  /* @__PURE__ */ e("span", { children: "unit:" }),
224
- /* @__PURE__ */ e("span", { children: i.sizeUnit }),
226
+ /* @__PURE__ */ e("span", { children: r.sizeUnit }),
225
227
  /* @__PURE__ */ e("span", { children: "min:" }),
226
- /* @__PURE__ */ e("span", { children: i.minSize !== void 0 ? JSON.stringify(i.minSize) : "—" }),
227
- /* @__PURE__ */ e("span", { children: "auto min:" }),
228
- /* @__PURE__ */ e("span", { children: i.autoMinSize !== void 0 ? JSON.stringify(i.autoMinSize) : "—" }),
228
+ /* @__PURE__ */ e("span", { children: r.minSize !== void 0 ? JSON.stringify(r.minSize) : "—" }),
229
229
  /* @__PURE__ */ e("span", { children: "max:" }),
230
- /* @__PURE__ */ e("span", { children: i.maxSize !== void 0 ? JSON.stringify(i.maxSize) : "—" }),
230
+ /* @__PURE__ */ e("span", { children: r.maxSize !== void 0 ? JSON.stringify(r.maxSize) : "—" }),
231
231
  /* @__PURE__ */ e("span", { children: "priority:" }),
232
- /* @__PURE__ */ e("span", { children: i.pixelAdjustPriority ?? "—" }),
232
+ /* @__PURE__ */ e("span", { children: r.pixelAdjustPriority ?? "—" }),
233
233
  /* @__PURE__ */ e("span", { children: "flex priority:" }),
234
- /* @__PURE__ */ e("span", { children: i.flexAdjustPriority ?? "—" })
234
+ /* @__PURE__ */ e("span", { children: r.flexAdjustPriority ?? "—" })
235
235
  ] })
236
- ] }, i.id || b);
236
+ ] }, r.id || b);
237
237
  })
238
238
  }
239
239
  )
240
- ] }, r.groupId);
240
+ ] }, i.groupId);
241
241
  })
242
242
  }
243
243
  )
@@ -248,5 +248,5 @@ const a = (s, n) => typeof s != "number" || !Number.isFinite(s) ? "—" : `${(s
248
248
  };
249
249
  export {
250
250
  W as GlobalDebugOverlay,
251
- M as GlobalDebugOverlayGate
251
+ J as GlobalDebugOverlayGate
252
252
  };
@@ -1,21 +1,4 @@
1
- /**
2
- * @file Global debug overlay for resizable panel groups.
3
- * リサイズパネルグループ用のグローバルデバッグオーバーレイ。
4
- *
5
- * PanelGroup 本体から dynamic import で遅延読み込みされる。
6
- * showDebugInfo を使わないアプリのバンドルにオーバーレイ UI とストア購読を含めないための分離。
7
- */
8
- /**
9
- * Render the overlay only for the group that currently owns it.
10
- * オーバーレイの所有権を持つグループの場合のみ描画するゲート。
11
- * 所有権ストアの購読をこの遅延モジュール内へ閉じ込め、非デバッグ利用時の購読を発生させない。
12
- */
13
1
  export declare const GlobalDebugOverlayGate: ({ groupId }: {
14
2
  groupId: string;
15
3
  }) => import("react").JSX.Element | null;
16
- /**
17
- * Render global debug overlay displaying state for all active panel groups.
18
- * すべてのアクティブなパネルグループの状態を表示するグローバルデバッグオーバーレイを描画。
19
- */
20
- export declare const GlobalDebugOverlay: () => import('react').ReactPortal | null;
21
- //# sourceMappingURL=GlobalDebugOverlay.d.ts.map
4
+ export declare const GlobalDebugOverlay: () => import("react").ReactPortal | null;
package/dist/Panel.d.ts CHANGED
@@ -1,7 +1,13 @@
1
- import { PanelProps } from './types';
2
- /**
3
- * Render a resizable panel within a managed group, keeping DOM measurements in sync with reducer state.
4
- * 管理対象グループ内で DOM 計測とリデューサー状態を同期させながらリサイズ可能パネルを描画するコンポーネント。
5
- */
6
- export declare const Panel: import('react').MemoExoticComponent<({ id: providedId, defaultSize, minSize, maxSize, autoMinSize, className, style, children, order, collapsible, defaultCollapsed, pixelAdjustPriority, flexAdjustPriority, contentOverflow }: PanelProps) => import("react").JSX.Element>;
7
- //# sourceMappingURL=Panel.d.ts.map
1
+ import { CSSProperties } from "react";
2
+ import { PanelLayoutData, PanelProps, PanelRegistration } from "./types";
3
+ type PanelFlexStyle = Required<Pick<CSSProperties, "flexBasis" | "flexGrow" | "flexShrink">>;
4
+ type ResolvePanelFlexArgs = {
5
+ size: number;
6
+ panel: PanelLayoutData | undefined;
7
+ registration: PanelRegistration;
8
+ containerSize: number;
9
+ isCollapsed: boolean;
10
+ };
11
+ export declare const resolvePanelFlex: ({ size, panel, registration, containerSize, isCollapsed }: ResolvePanelFlexArgs) => PanelFlexStyle;
12
+ export declare const Panel: import("react").MemoExoticComponent<({ id: providedId, defaultSize, minSize, maxSize, className, style, children, collapsible, defaultCollapsed, pixelAdjustPriority, flexAdjustPriority, contentOverflow, ...elementProps }: PanelProps) => import("react").JSX.Element>;
13
+ export {};
@@ -1,26 +1,22 @@
1
- import { PanelDirection, PanelLayoutData } from './types';
1
+ import { PanelDirection, PanelLayoutData } from "./types";
2
2
  type PanelDebugInfoProps = {
3
3
  panel: PanelLayoutData | undefined;
4
- measuredPixelSize: number;
5
- measuredPercentageSize: number;
6
4
  containerAxisSize: number;
7
5
  direction: PanelDirection;
8
6
  };
9
7
  type FormatPanelDebugInfoArgs = {
10
8
  panel: PanelLayoutData | undefined;
11
- measuredPixelSize: number;
12
- measuredPercentageSize: number;
13
9
  containerAxisSize: number;
14
10
  containerLabel: string;
15
11
  };
16
12
  type FormattedPanelDebugInfo = {
17
- stateValueDisplay: string;
18
- measuredValueDisplay: string;
13
+ sizeDisplay: string;
14
+ preferenceDisplay: string;
15
+ boundsDisplay: string;
19
16
  containerDisplay: string;
20
17
  headlineLabel: string;
21
18
  titleText: string;
22
19
  };
23
- export declare const formatPanelDebugInfo: ({ panel, measuredPixelSize, measuredPercentageSize, containerAxisSize, containerLabel }: FormatPanelDebugInfoArgs) => FormattedPanelDebugInfo;
24
- export declare const PanelDebugInfo: import('react').MemoExoticComponent<({ panel, measuredPixelSize, measuredPercentageSize, containerAxisSize, direction }: PanelDebugInfoProps) => import("react").JSX.Element>;
20
+ export declare const formatPanelDebugInfo: ({ panel, containerAxisSize, containerLabel }: FormatPanelDebugInfoArgs) => FormattedPanelDebugInfo;
21
+ export declare const PanelDebugInfo: import("react").MemoExoticComponent<({ panel, containerAxisSize, direction }: PanelDebugInfoProps) => import("react").JSX.Element>;
25
22
  export {};
26
- //# sourceMappingURL=PanelDebugInfo.d.ts.map
@@ -1,7 +1,2 @@
1
- import { PanelGroupProps } from './types';
2
- /**
3
- * Provide layout context and container for coordinated panels.
4
- * 連動するパネルのためのレイアウトコンテキストとコンテナを提供するコンポーネント。
5
- */
1
+ import { PanelGroupProps } from "./types";
6
2
  export declare const PanelGroup: (props: PanelGroupProps) => import("react").JSX.Element;
7
- //# sourceMappingURL=PanelGroup.d.ts.map
@@ -1,7 +1,2 @@
1
- import { PanelResizeHandleProps } from './types';
2
- /**
3
- * Render an interactive divider that manages adjacent panel resizing gestures.
4
- * 隣接パネルのリサイズ操作を管理するインタラクティブなディバイダーを描画するコンポーネント。
5
- */
6
- export declare const PanelResizeHandle: import('react').MemoExoticComponent<(props: PanelResizeHandleProps) => import("react").JSX.Element>;
7
- //# sourceMappingURL=PanelResizeHandle.d.ts.map
1
+ import { PanelResizeHandleProps } from "./types";
2
+ export declare const PanelResizeHandle: import("react").MemoExoticComponent<(props: PanelResizeHandleProps) => import("react").JSX.Element>;
@@ -0,0 +1,12 @@
1
+ import { LayoutConstraintViolation, PanelLayoutData } from "./types";
2
+ export type PanelBounds = {
3
+ min: number;
4
+ max: number;
5
+ };
6
+ export declare const isPixelPanel: (panel: PanelLayoutData) => boolean;
7
+ export declare const resolvePanelBounds: (panel: PanelLayoutData, containerSize: number) => PanelBounds;
8
+ export type LayoutAllocation = {
9
+ sizes: number[];
10
+ violation: LayoutConstraintViolation | null;
11
+ };
12
+ export declare const allocatePanelSizes: (panels: ReadonlyArray<PanelLayoutData>, containerSize: number) => LayoutAllocation;
package/dist/context.d.ts CHANGED
@@ -1,12 +1,3 @@
1
- import { PanelGroupContextValue } from './types';
2
- /**
3
- * Provide shared panel group state to descendant components.
4
- * 子孫コンポーネントへパネルグループの共有状態を提供するコンテキスト。
5
- */
6
- export declare const PanelGroupContext: import('react').Context<PanelGroupContextValue | null>;
7
- /**
8
- * Access panel group behaviors and layout data from the nearest provider.
9
- * 最も近いプロバイダーからパネルグループの振る舞いとレイアウトデータを取得するフック。
10
- */
1
+ import { PanelGroupContextValue } from "./types";
2
+ export declare const PanelGroupContext: import("react").Context<PanelGroupContextValue | null>;
11
3
  export declare const usePanelGroup: () => PanelGroupContextValue;
12
- //# sourceMappingURL=context.d.ts.map