react-zeugma 5.2.0 → 5.2.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.
@@ -97,6 +97,12 @@ interface ZeugmaController {
97
97
  mergeTab: (draggedTabId: string, targetPaneId: string) => void;
98
98
  /** Stable callback to remove/close a specific tab from the layout. */
99
99
  removeTab: (tabId: string) => void;
100
+ /** Splits an existing pane and adds a new one. */
101
+ splitPane: (targetId: string, direction: SplitDirection, splitType: 'left' | 'right' | 'top' | 'bottom', paneToAdd: string) => void;
102
+ /** Updates the split percentage of a split node. */
103
+ updateSplitPercentage: (currentNode: SplitNode, percentage: number) => void;
104
+ /** Moves/reorders a tab relative to another target tab. */
105
+ moveTab: (draggedTabId: string, targetTabId: string, position?: 'before' | 'after') => void;
100
106
  /** Find a PaneNode by its ID in the layout tree. */
101
107
  findPaneById: (paneId: string) => PaneNode | null;
102
108
  /** Find the PaneNode containing the given tab ID in the layout tree. */
@@ -236,6 +242,16 @@ interface ZeugmaActionsValue {
236
242
  mergeTab: (draggedTabId: string, targetPaneId: string) => void;
237
243
  /** Stable callback to remove/close a specific tab from the layout. */
238
244
  removeTab: (tabId: string) => void;
245
+ /** Programmatically sets the fullscreen pane ID. */
246
+ setFullscreenPaneId: (paneId: string | null) => void;
247
+ /** Programmatically updates the global locked status. */
248
+ setLocked: Dispatch<SetStateAction<boolean>>;
249
+ /** Splits an existing pane and adds a new one. */
250
+ splitPane: (targetId: string, direction: SplitDirection, splitType: 'left' | 'right' | 'top' | 'bottom', paneToAdd: string) => void;
251
+ /** Updates the split percentage of a split node. */
252
+ updateSplitPercentage: (currentNode: SplitNode, percentage: number) => void;
253
+ /** Moves/reorders a tab relative to another target tab. */
254
+ moveTab: (draggedTabId: string, targetTabId: string, position?: 'before' | 'after') => void;
239
255
  }
240
256
  interface ZeugmaContextValue extends ZeugmaStateValue, ZeugmaActionsValue {
241
257
  }
@@ -97,6 +97,12 @@ interface ZeugmaController {
97
97
  mergeTab: (draggedTabId: string, targetPaneId: string) => void;
98
98
  /** Stable callback to remove/close a specific tab from the layout. */
99
99
  removeTab: (tabId: string) => void;
100
+ /** Splits an existing pane and adds a new one. */
101
+ splitPane: (targetId: string, direction: SplitDirection, splitType: 'left' | 'right' | 'top' | 'bottom', paneToAdd: string) => void;
102
+ /** Updates the split percentage of a split node. */
103
+ updateSplitPercentage: (currentNode: SplitNode, percentage: number) => void;
104
+ /** Moves/reorders a tab relative to another target tab. */
105
+ moveTab: (draggedTabId: string, targetTabId: string, position?: 'before' | 'after') => void;
100
106
  /** Find a PaneNode by its ID in the layout tree. */
101
107
  findPaneById: (paneId: string) => PaneNode | null;
102
108
  /** Find the PaneNode containing the given tab ID in the layout tree. */
@@ -236,6 +242,16 @@ interface ZeugmaActionsValue {
236
242
  mergeTab: (draggedTabId: string, targetPaneId: string) => void;
237
243
  /** Stable callback to remove/close a specific tab from the layout. */
238
244
  removeTab: (tabId: string) => void;
245
+ /** Programmatically sets the fullscreen pane ID. */
246
+ setFullscreenPaneId: (paneId: string | null) => void;
247
+ /** Programmatically updates the global locked status. */
248
+ setLocked: Dispatch<SetStateAction<boolean>>;
249
+ /** Splits an existing pane and adds a new one. */
250
+ splitPane: (targetId: string, direction: SplitDirection, splitType: 'left' | 'right' | 'top' | 'bottom', paneToAdd: string) => void;
251
+ /** Updates the split percentage of a split node. */
252
+ updateSplitPercentage: (currentNode: SplitNode, percentage: number) => void;
253
+ /** Moves/reorders a tab relative to another target tab. */
254
+ moveTab: (draggedTabId: string, targetTabId: string, position?: 'before' | 'after') => void;
239
255
  }
240
256
  interface ZeugmaContextValue extends ZeugmaStateValue, ZeugmaActionsValue {
241
257
  }
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-CQoQBdfl.cjs';
1
+ import { g as PaneNode, f as SplitNode, S as SplitDirection, T as TreeNode, h as TabDetails } from './types-BjBbRjIM.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-CQoQBdfl.js';
1
+ import { g as PaneNode, f as SplitNode, S as SplitDirection, T as TreeNode, h as TabDetails } from './types-BjBbRjIM.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.2.0",
3
+ "version": "5.2.1",
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,
@@ -62,6 +62,8 @@
62
62
  "typecheck": "tsc --noEmit",
63
63
  "format": "prettier --write \"src/**/*.{ts,tsx}\" \"docs/**/*.{ts,tsx,mdx}\"",
64
64
  "format:check": "prettier --check \"src/**/*.{ts,tsx}\" \"docs/**/*.{ts,tsx,mdx}\"",
65
+ "test": "vitest run",
66
+ "test:watch": "vitest",
65
67
  "version": "changeset version",
66
68
  "release": "npm run build && changeset publish"
67
69
  },
@@ -76,17 +78,21 @@
76
78
  },
77
79
  "devDependencies": {
78
80
  "@changesets/cli": "^2.31.0",
81
+ "@testing-library/dom": "^10.4.1",
82
+ "@testing-library/react": "^16.3.2",
79
83
  "@types/node": "^25.9.1",
80
84
  "@types/react": "^19.2.15",
81
85
  "@types/react-dom": "^19.2.3",
82
86
  "eslint": "^10.4.1",
83
87
  "husky": "^9.1.7",
88
+ "jsdom": "^29.1.1",
84
89
  "lint-staged": "^16.4.0",
85
90
  "prettier": "^3.8.3",
86
91
  "react": "^19.2.6",
87
92
  "react-dom": "^19.2.6",
88
93
  "tsup": "^8.5.1",
89
94
  "typescript": "^6.0.3",
90
- "typescript-eslint": "^8.60.0"
95
+ "typescript-eslint": "^8.60.0",
96
+ "vitest": "^4.1.9"
91
97
  }
92
98
  }