react-panel-layout 0.2.0 → 0.4.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.
package/dist/index.d.ts CHANGED
@@ -14,6 +14,8 @@ export type { HorizontalDividerProps } from "./components/resizer/HorizontalDivi
14
14
  export { ResizeHandle } from "./components/resizer/ResizeHandle";
15
15
  export type { ResizeHandleProps } from "./components/resizer/ResizeHandle";
16
16
  export { useLayerDragHandle } from "./modules/grid/useLayerDragHandle";
17
+ export { useTransitionState, runTransition } from "./hooks/useTransitionState";
18
+ export type { TransitionMode, TransitionOptions, UseTransitionStateOptions } from "./hooks/useTransitionState";
17
19
  export { CSS_VAR_PREFIX } from "./constants/styles";
18
20
  export { PanelSystem } from "./modules/panels/system/PanelSystem";
19
21
  export { buildInitialState } from "./modules/panels";
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
- import { u as Rt, a as Pt, b as Ct, c as J, d as Dt, e as _, f as At, t as kt, R as nt, G as ot } from "./GridLayout-CmzKfbPP.js";
2
- import { D as vr, g as Ir } from "./GridLayout-CmzKfbPP.js";
1
+ import { u as Rt, a as Pt, b as Ct, c as J, d as Dt, e as _, f as At, t as kt, R as nt, G as ot } from "./GridLayout-DZCV1X-3.js";
2
+ import { D as vr, g as Ir, r as wr, h as yr } from "./GridLayout-DZCV1X-3.js";
3
3
  import { jsx as m, jsxs as H, Fragment as et } from "react/jsx-runtime";
4
4
  import * as l from "react";
5
- import { C as _t, a as Mt, b as Ot, H as Bt, D as Lt, c as $t, d as Ht, e as Nt, f as zt, g as Xt, T as Yt, h as Ft, i as jt, j as Vt, k as Kt, l as Ut, m as qt, S as Wt } from "./styles-BnvLfp6e.js";
6
- import { n as yr } from "./styles-BnvLfp6e.js";
5
+ import { m as _t, n as Mt, o as Ot, H as Bt, r as Lt, s as $t, t as Ht, u as Nt, v as zt, w as Xt, T as Yt, x as Ft, y as jt, z as Vt, A as Kt, B as Ut, E as qt, S as Wt } from "./FloatingPanelFrame-BeP9z8EI.js";
6
+ import { I as Gr } from "./FloatingPanelFrame-BeP9z8EI.js";
7
7
  const Zt = (t) => ({
8
8
  width: Bt,
9
9
  cursor: "col-resize",
@@ -1850,7 +1850,7 @@ const fe = (t, e) => {
1850
1850
  );
1851
1851
  };
1852
1852
  export {
1853
- yr as CSS_VAR_PREFIX,
1853
+ Gr as CSS_VAR_PREFIX,
1854
1854
  vr as Drawer,
1855
1855
  Ir as DrawerLayers,
1856
1856
  ot as GridLayout,
@@ -1858,6 +1858,8 @@ export {
1858
1858
  gr as PanelSystem,
1859
1859
  nt as ResizeHandle,
1860
1860
  br as buildInitialState,
1861
- fr as useLayerDragHandle
1861
+ wr as runTransition,
1862
+ fr as useLayerDragHandle,
1863
+ yr as useTransitionState
1862
1864
  };
1863
1865
  //# sourceMappingURL=index.js.map
@@ -1,6 +1,7 @@
1
+ import { type TransitionOptions } from "../../hooks/useTransitionState";
1
2
  import type { LayerDefinition } from "../../types";
2
3
  export declare const useDrawerState: (layers: LayerDefinition[]) => {
3
4
  state: (layerId: string) => boolean;
4
- open: (layerId: string) => void;
5
- close: (layerId: string) => void;
5
+ open: (id: string, options?: TransitionOptions) => Promise<void>;
6
+ close: (id: string, options?: TransitionOptions) => Promise<void>;
6
7
  };
package/dist/types.d.ts CHANGED
@@ -64,7 +64,28 @@ export type DrawerBehavior = {
64
64
  open?: boolean;
65
65
  /** Whether clicking backdrop dismisses the drawer */
66
66
  dismissible?: boolean;
67
+ /**
68
+ * Transition mode for drawer visibility.
69
+ * - "css" (default) uses CSS transform transitions.
70
+ * - "none" disables transitions.
71
+ */
72
+ transitionMode?: "css" | "none";
73
+ /** Override transform transition duration (e.g., "240ms"). */
74
+ transitionDuration?: string;
75
+ /** Override transform transition easing (e.g., "cubic-bezier(0.22,1,0.36,1)"). */
76
+ transitionEasing?: string;
67
77
  onStateChange?: (open: boolean) => void;
78
+ /** Use the built-in chrome (background, header padding). Defaults to true. */
79
+ chrome?: boolean;
80
+ /**
81
+ * Render the drawer relative to its parent container instead of the viewport.
82
+ * Defaults to false (fixed to viewport).
83
+ */
84
+ inline?: boolean;
85
+ /**
86
+ * Accessible label when header.title is not provided or when rendering without a header.
87
+ */
88
+ ariaLabel?: string;
68
89
  header?: {
69
90
  title?: string;
70
91
  showCloseButton?: boolean;
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "react-panel-layout",
3
- "version": "0.2.0",
3
+ "version": "0.4.1",
4
+ "license": "Unlicense",
4
5
  "type": "module",
5
6
  "main": "dist/index.cjs",
6
7
  "module": "dist/index.js",