feat: pro: pane-aware responsiveness, scoped sidebar overlay, stable pane keys

This commit is contained in:
Linus Rath
2026-05-18 20:42:21 +02:00
parent c3b4707f85
commit 5cdc5997af
5 changed files with 146 additions and 31 deletions
+14
View File
@@ -0,0 +1,14 @@
"use client";
import { createContext, useContext } from "react";
/**
* Width of the pane that's hosting the current subtree, in CSS pixels.
* `null` means "no pane is providing a size" — fall back to viewport-based
* media queries. Set by the Pro shell on each split pane via ResizeObserver.
*/
export const PaneSizeContext = createContext<number | null>(null);
export function usePaneSize(): number | null {
return useContext(PaneSizeContext);
}