react-zeugma 6.8.0 → 6.9.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.
@@ -1,5 +1,11 @@
1
1
  import { Dispatch, SetStateAction, ReactNode } from 'react';
2
2
 
3
+ declare global {
4
+ interface Window {
5
+ __zeugmaActivePopoutDocument?: Document | null;
6
+ __zeugmaCleanup?: () => void;
7
+ }
8
+ }
3
9
  type SplitDirection = 'row' | 'column';
4
10
  interface SplitNode {
5
11
  type: 'split';
@@ -33,6 +39,12 @@ interface RenderTabProps extends TabDetails {
33
39
  onSelect: () => void;
34
40
  /** Callback to close/remove this tab. */
35
41
  onRemove: () => void;
42
+ /** Whether this tab is popped out in a separate window. */
43
+ isPoppedOut: boolean;
44
+ /** Popout this tab. */
45
+ popout: () => void;
46
+ /** Dock this tab back. */
47
+ dock: () => void;
36
48
  }
37
49
  interface UseZeugmaOptions {
38
50
  /** Initial layout tree model defining pane organization for uncontrolled mode. Only used on initial mount. */
@@ -55,6 +67,8 @@ interface ZeugmaState {
55
67
  fullscreenPaneId: string | null;
56
68
  /** Whether the layout is globally locked. */
57
69
  locked: boolean;
70
+ /** The list of tab/widget IDs that are currently open in a new window. */
71
+ poppedOutTabIds: string[];
58
72
  }
59
73
  interface ZeugmaStateSetters {
60
74
  /** Updates the layout tree. Also resets transient states like fullscreenPaneId. */
@@ -85,6 +99,10 @@ interface ZeugmaActions {
85
99
  updateSplitPercentage: (currentNode: SplitNode, percentage: number) => void;
86
100
  /** Moves/reorders a tab relative to another target tab. */
87
101
  moveTab: (draggedTabId: string, targetTabId: string, position?: 'before' | 'after' | 'center') => void;
102
+ /** Popout the specified tab into a new window. */
103
+ popoutTab: (tabId: string) => void;
104
+ /** Dock the specified tab back to the main layout. */
105
+ dockTab: (tabId: string) => void;
88
106
  }
89
107
  interface ZeugmaQueries {
90
108
  /** Find a PaneNode or WidgetNode by its ID in the layout tree. */
@@ -1,5 +1,11 @@
1
1
  import { Dispatch, SetStateAction, ReactNode } from 'react';
2
2
 
3
+ declare global {
4
+ interface Window {
5
+ __zeugmaActivePopoutDocument?: Document | null;
6
+ __zeugmaCleanup?: () => void;
7
+ }
8
+ }
3
9
  type SplitDirection = 'row' | 'column';
4
10
  interface SplitNode {
5
11
  type: 'split';
@@ -33,6 +39,12 @@ interface RenderTabProps extends TabDetails {
33
39
  onSelect: () => void;
34
40
  /** Callback to close/remove this tab. */
35
41
  onRemove: () => void;
42
+ /** Whether this tab is popped out in a separate window. */
43
+ isPoppedOut: boolean;
44
+ /** Popout this tab. */
45
+ popout: () => void;
46
+ /** Dock this tab back. */
47
+ dock: () => void;
36
48
  }
37
49
  interface UseZeugmaOptions {
38
50
  /** Initial layout tree model defining pane organization for uncontrolled mode. Only used on initial mount. */
@@ -55,6 +67,8 @@ interface ZeugmaState {
55
67
  fullscreenPaneId: string | null;
56
68
  /** Whether the layout is globally locked. */
57
69
  locked: boolean;
70
+ /** The list of tab/widget IDs that are currently open in a new window. */
71
+ poppedOutTabIds: string[];
58
72
  }
59
73
  interface ZeugmaStateSetters {
60
74
  /** Updates the layout tree. Also resets transient states like fullscreenPaneId. */
@@ -85,6 +99,10 @@ interface ZeugmaActions {
85
99
  updateSplitPercentage: (currentNode: SplitNode, percentage: number) => void;
86
100
  /** Moves/reorders a tab relative to another target tab. */
87
101
  moveTab: (draggedTabId: string, targetTabId: string, position?: 'before' | 'after' | 'center') => void;
102
+ /** Popout the specified tab into a new window. */
103
+ popoutTab: (tabId: string) => void;
104
+ /** Dock the specified tab back to the main layout. */
105
+ dockTab: (tabId: string) => void;
88
106
  }
89
107
  interface ZeugmaQueries {
90
108
  /** Find a PaneNode or WidgetNode by its ID in the layout tree. */
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-DeeEm3Ls.cjs';
1
+ import { P as PaneNode, b as SplitNode, S as SplitDirection, T as TreeNode, c as TabDetails } from './types-u7NTLFqJ.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-DeeEm3Ls.js';
1
+ import { P as PaneNode, b as SplitNode, S as SplitDirection, T as TreeNode, c as TabDetails } from './types-u7NTLFqJ.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.8.0",
3
+ "version": "6.9.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,