react-zeugma 6.9.4 → 6.9.6

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.
@@ -0,0 +1,116 @@
1
+ import * as React from 'react';
2
+ import { CSSProperties, ReactNode } from 'react';
3
+
4
+ interface RenderCounterOptions {
5
+ /**
6
+ * Optional custom ID to track or share counters across component mounts/renders.
7
+ * If omitted, a unique instance ID is generated.
8
+ */
9
+ id?: string;
10
+ /**
11
+ * Whether to log mount and render counter events to the browser console.
12
+ * @default false
13
+ */
14
+ logToConsole?: boolean;
15
+ /**
16
+ * If set to true, counter tracking logic is disabled and returns 0 mounts / 0 renders.
17
+ * Useful for conditionally disabling tracking in production builds.
18
+ * @default false
19
+ */
20
+ disabled?: boolean;
21
+ }
22
+ interface RenderCounterState {
23
+ /**
24
+ * The total number of times the component has mounted to the DOM.
25
+ */
26
+ mounts: number;
27
+ /**
28
+ * The total number of render executions (including initial render and re-renders).
29
+ */
30
+ renders: number;
31
+ /**
32
+ * Resets the mount and render counts back to 0.
33
+ */
34
+ reset: () => void;
35
+ }
36
+ interface RenderCounterBadgeProps {
37
+ /**
38
+ * Optional identifier. Defaults to auto-generated ID if omitted.
39
+ */
40
+ id?: string;
41
+ /**
42
+ * Visual badge placement relative to container.
43
+ * @default 'top-right'
44
+ */
45
+ position?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
46
+ /**
47
+ * Optional custom CSS class name.
48
+ */
49
+ className?: string;
50
+ /**
51
+ * Custom inline styles.
52
+ */
53
+ style?: CSSProperties;
54
+ /**
55
+ * Log counter changes to browser console.
56
+ */
57
+ logToConsole?: boolean;
58
+ /**
59
+ * If true, hides the badge component.
60
+ * @default false
61
+ */
62
+ disabled?: boolean;
63
+ }
64
+ interface RenderCounterFooterProps {
65
+ /**
66
+ * Optional identifier or tab label.
67
+ */
68
+ id?: string;
69
+ /**
70
+ * Optional label shown on the left side of the footer.
71
+ */
72
+ label?: string;
73
+ /**
74
+ * Child element(s) wrapped inside the container.
75
+ */
76
+ children?: ReactNode;
77
+ /**
78
+ * Custom container CSS class name.
79
+ */
80
+ className?: string;
81
+ /**
82
+ * Custom footer bar CSS class name.
83
+ */
84
+ footerClassName?: string;
85
+ /**
86
+ * Custom inline styles for container.
87
+ */
88
+ style?: CSSProperties;
89
+ /**
90
+ * Log counter changes to browser console.
91
+ */
92
+ logToConsole?: boolean;
93
+ /**
94
+ * If true, hides the footer status bar and renders children directly.
95
+ * @default false
96
+ */
97
+ disabled?: boolean;
98
+ }
99
+
100
+ /**
101
+ * A React hook that tracks component mount and render counts in a React 18/19 StrictMode safe manner.
102
+ * Supports optional global ID sharing, console logging, and manual reset.
103
+ */
104
+ declare function useRenderCounter(idOrOptions?: string | RenderCounterOptions, maybeOptions?: RenderCounterOptions): RenderCounterState;
105
+
106
+ /**
107
+ * A floating overlay badge displaying mount and render counters for debugging component lifecycles.
108
+ */
109
+ declare function RenderCounterBadge({ id, position, className, style, logToConsole, disabled, }: RenderCounterBadgeProps): React.JSX.Element | null;
110
+
111
+ /**
112
+ * A container footer component for displaying mount and render counters at the bottom of widgets or panels.
113
+ */
114
+ declare function RenderCounterFooter({ id, label, children, className, footerClassName, style, logToConsole, disabled, }: RenderCounterFooterProps): React.JSX.Element;
115
+
116
+ export { RenderCounterBadge as R, type RenderCounterBadgeProps as a, RenderCounterFooter as b, type RenderCounterFooterProps as c, type RenderCounterOptions as d, type RenderCounterState as e, useRenderCounter as u };
@@ -0,0 +1,116 @@
1
+ import * as React from 'react';
2
+ import { CSSProperties, ReactNode } from 'react';
3
+
4
+ interface RenderCounterOptions {
5
+ /**
6
+ * Optional custom ID to track or share counters across component mounts/renders.
7
+ * If omitted, a unique instance ID is generated.
8
+ */
9
+ id?: string;
10
+ /**
11
+ * Whether to log mount and render counter events to the browser console.
12
+ * @default false
13
+ */
14
+ logToConsole?: boolean;
15
+ /**
16
+ * If set to true, counter tracking logic is disabled and returns 0 mounts / 0 renders.
17
+ * Useful for conditionally disabling tracking in production builds.
18
+ * @default false
19
+ */
20
+ disabled?: boolean;
21
+ }
22
+ interface RenderCounterState {
23
+ /**
24
+ * The total number of times the component has mounted to the DOM.
25
+ */
26
+ mounts: number;
27
+ /**
28
+ * The total number of render executions (including initial render and re-renders).
29
+ */
30
+ renders: number;
31
+ /**
32
+ * Resets the mount and render counts back to 0.
33
+ */
34
+ reset: () => void;
35
+ }
36
+ interface RenderCounterBadgeProps {
37
+ /**
38
+ * Optional identifier. Defaults to auto-generated ID if omitted.
39
+ */
40
+ id?: string;
41
+ /**
42
+ * Visual badge placement relative to container.
43
+ * @default 'top-right'
44
+ */
45
+ position?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
46
+ /**
47
+ * Optional custom CSS class name.
48
+ */
49
+ className?: string;
50
+ /**
51
+ * Custom inline styles.
52
+ */
53
+ style?: CSSProperties;
54
+ /**
55
+ * Log counter changes to browser console.
56
+ */
57
+ logToConsole?: boolean;
58
+ /**
59
+ * If true, hides the badge component.
60
+ * @default false
61
+ */
62
+ disabled?: boolean;
63
+ }
64
+ interface RenderCounterFooterProps {
65
+ /**
66
+ * Optional identifier or tab label.
67
+ */
68
+ id?: string;
69
+ /**
70
+ * Optional label shown on the left side of the footer.
71
+ */
72
+ label?: string;
73
+ /**
74
+ * Child element(s) wrapped inside the container.
75
+ */
76
+ children?: ReactNode;
77
+ /**
78
+ * Custom container CSS class name.
79
+ */
80
+ className?: string;
81
+ /**
82
+ * Custom footer bar CSS class name.
83
+ */
84
+ footerClassName?: string;
85
+ /**
86
+ * Custom inline styles for container.
87
+ */
88
+ style?: CSSProperties;
89
+ /**
90
+ * Log counter changes to browser console.
91
+ */
92
+ logToConsole?: boolean;
93
+ /**
94
+ * If true, hides the footer status bar and renders children directly.
95
+ * @default false
96
+ */
97
+ disabled?: boolean;
98
+ }
99
+
100
+ /**
101
+ * A React hook that tracks component mount and render counts in a React 18/19 StrictMode safe manner.
102
+ * Supports optional global ID sharing, console logging, and manual reset.
103
+ */
104
+ declare function useRenderCounter(idOrOptions?: string | RenderCounterOptions, maybeOptions?: RenderCounterOptions): RenderCounterState;
105
+
106
+ /**
107
+ * A floating overlay badge displaying mount and render counters for debugging component lifecycles.
108
+ */
109
+ declare function RenderCounterBadge({ id, position, className, style, logToConsole, disabled, }: RenderCounterBadgeProps): React.JSX.Element | null;
110
+
111
+ /**
112
+ * A container footer component for displaying mount and render counters at the bottom of widgets or panels.
113
+ */
114
+ declare function RenderCounterFooter({ id, label, children, className, footerClassName, style, logToConsole, disabled, }: RenderCounterFooterProps): React.JSX.Element;
115
+
116
+ export { RenderCounterBadge as R, type RenderCounterBadgeProps as a, RenderCounterFooter as b, type RenderCounterFooterProps as c, type RenderCounterOptions as d, type RenderCounterState as e, useRenderCounter as u };
@@ -218,15 +218,6 @@ interface BaseZeugmaProps {
218
218
  onDismissIntentChange?: (paneId: string | null) => void;
219
219
  /** Configuration for layout persistence in localStorage. */
220
220
  persist?: boolean | ZeugmaPersistOptions;
221
- /** [Experimental] Optional custom wrapper element/component to wrap the contents of a popout tab.
222
- * Useful for styled-components (StyleSheetManager), Antd (ConfigProvider), etc.
223
- */
224
- renderPopoutWrapper?: (props: {
225
- tabId: string;
226
- document: Document;
227
- window: Window;
228
- children: React.ReactNode;
229
- }) => React.ReactNode;
230
221
  }
231
222
  interface ZeugmaPersistOptions {
232
223
  /** Whether to enable persistence. Defaults to true if the object is provided. */
@@ -218,15 +218,6 @@ interface BaseZeugmaProps {
218
218
  onDismissIntentChange?: (paneId: string | null) => void;
219
219
  /** Configuration for layout persistence in localStorage. */
220
220
  persist?: boolean | ZeugmaPersistOptions;
221
- /** [Experimental] Optional custom wrapper element/component to wrap the contents of a popout tab.
222
- * Useful for styled-components (StyleSheetManager), Antd (ConfigProvider), etc.
223
- */
224
- renderPopoutWrapper?: (props: {
225
- tabId: string;
226
- document: Document;
227
- window: Window;
228
- children: React.ReactNode;
229
- }) => React.ReactNode;
230
221
  }
231
222
  interface ZeugmaPersistOptions {
232
223
  /** Whether to enable persistence. Defaults to true if the object is provided. */
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-DFl4yzkP.cjs';
1
+ import { P as PaneNode, b as SplitNode, S as SplitDirection, T as TreeNode, c as TabDetails } from './types-DQICRtw1.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-DFl4yzkP.js';
1
+ import { P as PaneNode, b as SplitNode, S as SplitDirection, T as TreeNode, c as TabDetails } from './types-DQICRtw1.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.9.4",
3
+ "version": "6.9.6",
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,
@@ -19,6 +19,12 @@
19
19
  "import": "./dist/utils.js",
20
20
  "require": "./dist/utils.cjs",
21
21
  "default": "./dist/utils.js"
22
+ },
23
+ "./devtools": {
24
+ "types": "./dist/devtools.d.ts",
25
+ "import": "./dist/devtools.js",
26
+ "require": "./dist/devtools.cjs",
27
+ "default": "./dist/devtools.js"
22
28
  }
23
29
  },
24
30
  "files": [
@@ -72,9 +78,7 @@
72
78
  "react-dom": "^18.0.0 || ^19.0.0"
73
79
  },
74
80
  "dependencies": {
75
- "@dnd-kit/core": "^6.3.1",
76
- "@dnd-kit/sortable": "^10.0.0",
77
- "@dnd-kit/utilities": "^3.2.2"
81
+ "@dnd-kit/core": "^6.3.1"
78
82
  },
79
83
  "devDependencies": {
80
84
  "@changesets/cli": "^2.31.0",