react-zeugma 5.4.1 → 5.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.
@@ -81,6 +81,12 @@ interface ZeugmaController {
81
81
  locked: boolean;
82
82
  /** Programmatically updates the global locked status. */
83
83
  setLocked: Dispatch<SetStateAction<boolean>>;
84
+ /** The ID of the active dragged item (pane or tab). */
85
+ activeId: string | null;
86
+ /** The type of the active dragged item ('pane' | 'tab'). */
87
+ activeType: 'pane' | 'tab' | null;
88
+ /** The ID of the item with active dismiss intent, or null. */
89
+ dismissIntentId: string | null;
84
90
  /** Removes the specified pane from the layout tree and collapses its parent split. */
85
91
  removePane: (paneId: string) => void;
86
92
  /** Appends/inserts a pane at the bottom-rightmost leaf of the layout tree. */
@@ -112,11 +118,8 @@ interface ZeugmaController {
112
118
  }
113
119
  /** @internal */
114
120
  interface ZeugmaInternalController extends ZeugmaController {
115
- activeId: string | null;
116
121
  setActiveId: Dispatch<SetStateAction<string | null>>;
117
- activeType: 'pane' | 'tab' | null;
118
122
  setActiveType: Dispatch<SetStateAction<'pane' | 'tab' | null>>;
119
- dismissIntentId: string | null;
120
123
  setDismissIntentId: Dispatch<SetStateAction<string | null>>;
121
124
  containerRef: RefObject<HTMLElement | null>;
122
125
  setContainerRef: (element: HTMLElement | null) => void;
@@ -202,15 +205,21 @@ interface ZeugmaStateValue {
202
205
  findPaneContainingTab: (tabId: string) => PaneNode | null;
203
206
  /** Find the details of a tab by its ID in the layout tree. */
204
207
  findTabById: (tabId: string) => TabDetails | null;
208
+ /** The ID of the active dragged item (pane or tab). */
209
+ activeId: string | null;
210
+ /** The type of the active dragged item ('pane' | 'tab'). */
211
+ activeType: 'pane' | 'tab' | null;
212
+ /** The ID of the item with active dismiss intent, or null. */
213
+ dismissIntentId: string | null;
205
214
  }
206
- /** @internal */
207
- interface ZeugmaInternalStateValue extends ZeugmaStateValue {
215
+ interface ZeugmaDragStateValue {
208
216
  /** The ID of the tab currently hovered over during a tab drag, or null. */
209
217
  overTabId: string | null;
210
218
  /** The position of the tab drop preview relative to the hovered tab ('before' | 'after'). */
211
219
  overTabPosition: 'before' | 'after' | null;
212
- activeId: string | null;
213
- dismissIntentId: string | null;
220
+ }
221
+ /** @internal */
222
+ interface ZeugmaInternalStateValue extends ZeugmaStateValue {
214
223
  setContainerRef: (element: HTMLElement | null) => void;
215
224
  onRemove?: (paneId: string) => void;
216
225
  onFullscreenChange?: (paneId: string | null) => void;
@@ -259,4 +268,4 @@ interface PortalRegistryValue {
259
268
  registerPortalTarget: (tabId: string, el: HTMLDivElement | null) => void;
260
269
  }
261
270
 
262
- export type { PortalRegistryValue as P, SplitDirection as S, TreeNode as T, UseZeugmaOptions as U, ZeugmaActionsValue as Z, ZeugmaInternalStateValue as a, ZeugmaStateValue as b, ZeugmaController as c, ZeugmaContextValue as d, ZeugmaProps as e, SplitNode as f, PaneNode as g, TabDetails as h, ZeugmaClassNames as i, ZeugmaInternalController as j };
271
+ export type { PortalRegistryValue as P, SplitDirection as S, TreeNode as T, UseZeugmaOptions as U, ZeugmaActionsValue as Z, ZeugmaDragStateValue as a, ZeugmaInternalStateValue as b, ZeugmaStateValue as c, ZeugmaController as d, ZeugmaContextValue as e, ZeugmaProps as f, SplitNode as g, PaneNode as h, TabDetails as i, ZeugmaClassNames as j, ZeugmaInternalController as k };
@@ -81,6 +81,12 @@ interface ZeugmaController {
81
81
  locked: boolean;
82
82
  /** Programmatically updates the global locked status. */
83
83
  setLocked: Dispatch<SetStateAction<boolean>>;
84
+ /** The ID of the active dragged item (pane or tab). */
85
+ activeId: string | null;
86
+ /** The type of the active dragged item ('pane' | 'tab'). */
87
+ activeType: 'pane' | 'tab' | null;
88
+ /** The ID of the item with active dismiss intent, or null. */
89
+ dismissIntentId: string | null;
84
90
  /** Removes the specified pane from the layout tree and collapses its parent split. */
85
91
  removePane: (paneId: string) => void;
86
92
  /** Appends/inserts a pane at the bottom-rightmost leaf of the layout tree. */
@@ -112,11 +118,8 @@ interface ZeugmaController {
112
118
  }
113
119
  /** @internal */
114
120
  interface ZeugmaInternalController extends ZeugmaController {
115
- activeId: string | null;
116
121
  setActiveId: Dispatch<SetStateAction<string | null>>;
117
- activeType: 'pane' | 'tab' | null;
118
122
  setActiveType: Dispatch<SetStateAction<'pane' | 'tab' | null>>;
119
- dismissIntentId: string | null;
120
123
  setDismissIntentId: Dispatch<SetStateAction<string | null>>;
121
124
  containerRef: RefObject<HTMLElement | null>;
122
125
  setContainerRef: (element: HTMLElement | null) => void;
@@ -202,15 +205,21 @@ interface ZeugmaStateValue {
202
205
  findPaneContainingTab: (tabId: string) => PaneNode | null;
203
206
  /** Find the details of a tab by its ID in the layout tree. */
204
207
  findTabById: (tabId: string) => TabDetails | null;
208
+ /** The ID of the active dragged item (pane or tab). */
209
+ activeId: string | null;
210
+ /** The type of the active dragged item ('pane' | 'tab'). */
211
+ activeType: 'pane' | 'tab' | null;
212
+ /** The ID of the item with active dismiss intent, or null. */
213
+ dismissIntentId: string | null;
205
214
  }
206
- /** @internal */
207
- interface ZeugmaInternalStateValue extends ZeugmaStateValue {
215
+ interface ZeugmaDragStateValue {
208
216
  /** The ID of the tab currently hovered over during a tab drag, or null. */
209
217
  overTabId: string | null;
210
218
  /** The position of the tab drop preview relative to the hovered tab ('before' | 'after'). */
211
219
  overTabPosition: 'before' | 'after' | null;
212
- activeId: string | null;
213
- dismissIntentId: string | null;
220
+ }
221
+ /** @internal */
222
+ interface ZeugmaInternalStateValue extends ZeugmaStateValue {
214
223
  setContainerRef: (element: HTMLElement | null) => void;
215
224
  onRemove?: (paneId: string) => void;
216
225
  onFullscreenChange?: (paneId: string | null) => void;
@@ -259,4 +268,4 @@ interface PortalRegistryValue {
259
268
  registerPortalTarget: (tabId: string, el: HTMLDivElement | null) => void;
260
269
  }
261
270
 
262
- export type { PortalRegistryValue as P, SplitDirection as S, TreeNode as T, UseZeugmaOptions as U, ZeugmaActionsValue as Z, ZeugmaInternalStateValue as a, ZeugmaStateValue as b, ZeugmaController as c, ZeugmaContextValue as d, ZeugmaProps as e, SplitNode as f, PaneNode as g, TabDetails as h, ZeugmaClassNames as i, ZeugmaInternalController as j };
271
+ export type { PortalRegistryValue as P, SplitDirection as S, TreeNode as T, UseZeugmaOptions as U, ZeugmaActionsValue as Z, ZeugmaDragStateValue as a, ZeugmaInternalStateValue as b, ZeugmaStateValue as c, ZeugmaController as d, ZeugmaContextValue as e, ZeugmaProps as f, SplitNode as g, PaneNode as h, TabDetails as i, ZeugmaClassNames as j, ZeugmaInternalController as k };
package/dist/utils.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { g as PaneNode, f as SplitNode, S as SplitDirection, T as TreeNode, h as TabDetails } from './types-BjBbRjIM.cjs';
1
+ import { h as PaneNode, g as SplitNode, S as SplitDirection, T as TreeNode, i as TabDetails } from './types-D_m5qhML.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 { g as PaneNode, f as SplitNode, S as SplitDirection, T as TreeNode, h as TabDetails } from './types-BjBbRjIM.js';
1
+ import { h as PaneNode, g as SplitNode, S as SplitDirection, T as TreeNode, i as TabDetails } from './types-D_m5qhML.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": "5.4.1",
3
+ "version": "5.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,