react-zeugma 6.5.1 → 6.6.0

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.
@@ -141,17 +141,13 @@ interface DragOverlayActiveItem {
141
141
  id: string;
142
142
  isDismissing: boolean;
143
143
  }
144
- interface ZeugmaProps {
144
+ interface BaseZeugmaProps {
145
145
  /** The Zeugma Controller returned by useZeugma() */
146
- controller?: ZeugmaController;
147
- /** Children components that will have access to the Zeugma context */
148
- children?: ReactNode;
146
+ controller: ZeugmaController;
149
147
  /** Custom overlay renderer function used to customize the cursor-following drag preview for an active pane or tab. */
150
148
  renderDragOverlay?: (active: DragOverlayActiveItem) => ReactNode;
151
149
  /** Optional CSS class name mapping overrides for custom styles of components like panes, drop previews, overlays, etc. */
152
150
  classNames?: ZeugmaClassNames;
153
- /** Render function mapping unique pane nodes to React elements. Usually renders a <Pane> wrapper. */
154
- renderPane?: (paneId: string) => ReactNode;
155
151
  /** Size/thickness of the split handle resizer bars in pixels. */
156
152
  resizerSize?: number;
157
153
  /** Minimum pixel distance that a user must drag a pane handle before dragging triggers. Defaults to 8. */
@@ -185,5 +181,14 @@ interface ZeugmaProps {
185
181
  /** Callback triggered when the drag-out/dismiss intent changes. */
186
182
  onDismissIntentChange?: (paneId: string | null) => void;
187
183
  }
184
+ type ZeugmaProps = (BaseZeugmaProps & {
185
+ children?: never;
186
+ /** Render function mapping unique pane nodes to React elements. Usually renders a <Pane> wrapper. */
187
+ renderPane: (paneId: string) => ReactNode;
188
+ }) | (BaseZeugmaProps & {
189
+ children: ReactNode;
190
+ /** In Provider Mode, renderPane is not accepted on <Zeugma> and MUST be passed directly to <PaneTree>. */
191
+ renderPane?: never;
192
+ });
188
193
 
189
194
  export type { DragOverlayActiveItem as D, PaneNode as P, SplitDirection as S, TreeNode as T, UseZeugmaOptions as U, ZeugmaController as Z, ZeugmaProps as a, SplitNode as b, TabDetails as c, ZeugmaClassNames as d };
@@ -141,17 +141,13 @@ interface DragOverlayActiveItem {
141
141
  id: string;
142
142
  isDismissing: boolean;
143
143
  }
144
- interface ZeugmaProps {
144
+ interface BaseZeugmaProps {
145
145
  /** The Zeugma Controller returned by useZeugma() */
146
- controller?: ZeugmaController;
147
- /** Children components that will have access to the Zeugma context */
148
- children?: ReactNode;
146
+ controller: ZeugmaController;
149
147
  /** Custom overlay renderer function used to customize the cursor-following drag preview for an active pane or tab. */
150
148
  renderDragOverlay?: (active: DragOverlayActiveItem) => ReactNode;
151
149
  /** Optional CSS class name mapping overrides for custom styles of components like panes, drop previews, overlays, etc. */
152
150
  classNames?: ZeugmaClassNames;
153
- /** Render function mapping unique pane nodes to React elements. Usually renders a <Pane> wrapper. */
154
- renderPane?: (paneId: string) => ReactNode;
155
151
  /** Size/thickness of the split handle resizer bars in pixels. */
156
152
  resizerSize?: number;
157
153
  /** Minimum pixel distance that a user must drag a pane handle before dragging triggers. Defaults to 8. */
@@ -185,5 +181,14 @@ interface ZeugmaProps {
185
181
  /** Callback triggered when the drag-out/dismiss intent changes. */
186
182
  onDismissIntentChange?: (paneId: string | null) => void;
187
183
  }
184
+ type ZeugmaProps = (BaseZeugmaProps & {
185
+ children?: never;
186
+ /** Render function mapping unique pane nodes to React elements. Usually renders a <Pane> wrapper. */
187
+ renderPane: (paneId: string) => ReactNode;
188
+ }) | (BaseZeugmaProps & {
189
+ children: ReactNode;
190
+ /** In Provider Mode, renderPane is not accepted on <Zeugma> and MUST be passed directly to <PaneTree>. */
191
+ renderPane?: never;
192
+ });
188
193
 
189
194
  export type { DragOverlayActiveItem as D, PaneNode as P, SplitDirection as S, TreeNode as T, UseZeugmaOptions as U, ZeugmaController as Z, ZeugmaProps as a, SplitNode as b, TabDetails as c, ZeugmaClassNames as d };
package/dist/utils.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { P as PaneNode, b as SplitNode, S as SplitDirection, T as TreeNode, c as TabDetails } from './types-DO2k-HLr.cjs';
1
+ import { P as PaneNode, b as SplitNode, S as SplitDirection, T as TreeNode, c as TabDetails } from './types-CqFrNqQ6.cjs';
2
2
  import 'react';
3
3
 
4
4
  declare function generateUniqueId(): string;
package/dist/utils.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { P as PaneNode, b as SplitNode, S as SplitDirection, T as TreeNode, c as TabDetails } from './types-DO2k-HLr.js';
1
+ import { P as PaneNode, b as SplitNode, S as SplitDirection, T as TreeNode, c as TabDetails } from './types-CqFrNqQ6.js';
2
2
  import 'react';
3
3
 
4
4
  declare function generateUniqueId(): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-zeugma",
3
- "version": "6.5.1",
3
+ "version": "6.6.0",
4
4
  "description": "Recursive drag-and-drop dashboard layout engine for React — combining the tree-based splitting of react-mosaic with the declarative API of react-grid-layout.",
5
5
  "type": "module",
6
6
  "sideEffects": false,