@vuu-ui/vuu-layout 3.3.10 → 4.0.0-alpha.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.
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
- "version": "3.3.10",
2
+ "version": "4.0.0-alpha.1",
3
3
  "description": "VUU Layout Components",
4
4
  "main": "./src/index.js",
5
+ "type": "module",
5
6
  "author": "heswell",
6
7
  "license": "Apache-2.0",
7
8
  "scripts": {
@@ -11,20 +12,20 @@
11
12
  },
12
13
  "types": "types/index.d.ts",
13
14
  "devDependencies": {
14
- "@vuu-ui/vuu-data-types": "3.3.10",
15
- "@vuu-ui/vuu-filter-types": "3.3.10"
15
+ "@vuu-ui/vuu-data-types": "4.0.0-alpha.1",
16
+ "@vuu-ui/vuu-filter-types": "4.0.0-alpha.1"
16
17
  },
17
18
  "dependencies": {
18
- "@salt-ds/core": "1.54.1",
19
+ "@salt-ds/core": "1.67.0",
19
20
  "@salt-ds/styles": "0.2.1",
20
21
  "@salt-ds/window": "0.1.1",
21
- "@vuu-ui/vuu-data-react": "3.3.10",
22
- "@vuu-ui/vuu-datatable": "3.3.10",
23
- "@vuu-ui/vuu-filters": "3.3.10",
24
- "@vuu-ui/vuu-popups": "3.3.10",
25
- "@vuu-ui/vuu-table": "3.3.10",
26
- "@vuu-ui/vuu-ui-controls": "3.3.10",
27
- "@vuu-ui/vuu-utils": "3.3.10"
22
+ "@vuu-ui/vuu-data-react": "4.0.0-alpha.1",
23
+ "@vuu-ui/vuu-datatable": "4.0.0-alpha.1",
24
+ "@vuu-ui/vuu-filters": "4.0.0-alpha.1",
25
+ "@vuu-ui/vuu-popups": "4.0.0-alpha.1",
26
+ "@vuu-ui/vuu-table": "4.0.0-alpha.1",
27
+ "@vuu-ui/vuu-ui-controls": "4.0.0-alpha.1",
28
+ "@vuu-ui/vuu-utils": "4.0.0-alpha.1"
28
29
  },
29
30
  "peerDependencies": {
30
31
  "clsx": "^2.0.0",
@@ -44,6 +45,5 @@
44
45
  }
45
46
  },
46
47
  "module": "./src/index.js",
47
- "name": "@vuu-ui/vuu-layout",
48
- "type": "module"
48
+ "name": "@vuu-ui/vuu-layout"
49
49
  }
@@ -1,6 +1,7 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import react, { useState } from "react";
3
- import { LayoutConfigurator, LayoutTreeViewer } from "../index.js";
3
+ import { LayoutConfigurator } from "../devtools-box/layout-configurator.js";
4
+ import { LayoutTreeViewer } from "../devtools-tree/layout-tree-viewer.js";
4
5
  import { followPathToComponent } from "../../index.js";
5
6
  const ConfigWrapper = ({ children })=>{
6
7
  const designMode = false;
@@ -0,0 +1,293 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { FormField, Input } from "@salt-ds/core";
3
+ import { useComponentCssInjection } from "@salt-ds/styles";
4
+ import { useWindow } from "@salt-ds/window";
5
+ import layout_configurator from "./layout-configurator.css";
6
+ const NO_STYLE = {};
7
+ const DIMENSIONS = {
8
+ margin: {
9
+ top: "marginTop",
10
+ right: "marginRight",
11
+ bottom: "marginBottom",
12
+ left: "marginLeft"
13
+ },
14
+ border: {
15
+ top: "borderTopWidth",
16
+ right: "borderRightWidth",
17
+ bottom: "borderBottomWidth",
18
+ left: "borderLeftWidth"
19
+ },
20
+ padding: {
21
+ top: "paddingTop",
22
+ right: "paddingRight",
23
+ bottom: "paddingBottom",
24
+ left: "paddingLeft"
25
+ }
26
+ };
27
+ const LayoutBox = ({ feature, children, style, onChange })=>/*#__PURE__*/ jsxs("div", {
28
+ className: `LayoutBox layout-${feature} layout-outer`,
29
+ children: [
30
+ /*#__PURE__*/ jsxs("div", {
31
+ className: "layout-top",
32
+ children: [
33
+ /*#__PURE__*/ jsx("span", {
34
+ className: "layout-title",
35
+ children: feature
36
+ }),
37
+ /*#__PURE__*/ jsx(FormField, {
38
+ className: "layout-input",
39
+ style: {
40
+ width: 30
41
+ },
42
+ children: /*#__PURE__*/ jsx(Input, {
43
+ value: style.top,
44
+ onChange: (evt, value)=>onChange(feature, "top", value)
45
+ })
46
+ })
47
+ ]
48
+ }),
49
+ /*#__PURE__*/ jsxs("div", {
50
+ className: "layout-inner",
51
+ children: [
52
+ /*#__PURE__*/ jsx("div", {
53
+ className: "layout-left",
54
+ children: /*#__PURE__*/ jsx(FormField, {
55
+ className: "layout-input",
56
+ style: {
57
+ width: 30
58
+ },
59
+ children: /*#__PURE__*/ jsx(Input, {
60
+ value: style.left,
61
+ onChange: (evt, value)=>onChange(feature, "left", value)
62
+ })
63
+ })
64
+ }),
65
+ children,
66
+ /*#__PURE__*/ jsx("div", {
67
+ className: "layout-right",
68
+ children: /*#__PURE__*/ jsx(FormField, {
69
+ className: "layout-input",
70
+ style: {
71
+ width: 30
72
+ },
73
+ children: /*#__PURE__*/ jsx(Input, {
74
+ value: style.right,
75
+ onChange: (evt, value)=>onChange(feature, "right", value)
76
+ })
77
+ })
78
+ })
79
+ ]
80
+ }),
81
+ /*#__PURE__*/ jsx("div", {
82
+ className: "layout-bottom",
83
+ children: /*#__PURE__*/ jsx(FormField, {
84
+ className: "layout-input",
85
+ style: {
86
+ width: 30
87
+ },
88
+ children: /*#__PURE__*/ jsx(Input, {
89
+ value: style.bottom,
90
+ onChange: (evt, value)=>onChange(feature, "bottom", value)
91
+ })
92
+ })
93
+ })
94
+ ]
95
+ });
96
+ const MARGIN_STYLES = {
97
+ margin: true,
98
+ marginTop: true,
99
+ marginRight: true,
100
+ marginBottom: true,
101
+ marginLeft: true
102
+ };
103
+ const PADDING_STYLES = {
104
+ padding: true,
105
+ paddingTop: true,
106
+ paddingRight: true,
107
+ paddingBottom: true,
108
+ paddingLeft: true
109
+ };
110
+ const BORDER_STYLES = {
111
+ border: true,
112
+ borderColor: true,
113
+ borderWidth: true,
114
+ borderTopWidth: true,
115
+ borderRightWidth: true,
116
+ borderBottomWidth: true,
117
+ borderLeftWidth: true
118
+ };
119
+ const CSS_DIGIT = "(\\d+)(?:px)?";
120
+ const CSS_MEASURE = `^(?:${CSS_DIGIT}(?:\\s${CSS_DIGIT}(?:\\s${CSS_DIGIT}(?:\\s${CSS_DIGIT})?)?)?)$`;
121
+ const CSS_REX = new RegExp(CSS_MEASURE);
122
+ const BORDER_REX = /^(?:(\d+)(?:px)\ssolid\s([a-zA-Z,0-9().]+))$/;
123
+ const LayoutConfigurator = ({ height, managedStyle, onChange, style, width })=>{
124
+ const targetWindow = useWindow();
125
+ useComponentCssInjection({
126
+ testId: "vuu-layout-configurator",
127
+ css: layout_configurator,
128
+ window: targetWindow
129
+ });
130
+ const state = normalizeStyle(managedStyle);
131
+ const handleChange = (feature, dimension, strValue)=>{
132
+ const value = parseInt(strValue || "0", 10);
133
+ const property = DIMENSIONS[feature][dimension];
134
+ onChange(property, value);
135
+ };
136
+ const { marginTop: mt = 0, marginRight: mr = 0, marginBottom: mb = 0, marginLeft: ml = 0 } = state;
137
+ const { borderTopWidth: bt = 0, borderRightWidth: br = 0, borderBottomWidth: bb = 0, borderLeftWidth: bl = 0 } = state;
138
+ const { paddingTop: pt = 0, paddingRight: pr = 0, paddingBottom: pb = 0, paddingLeft: pl = 0 } = state;
139
+ return /*#__PURE__*/ jsx("div", {
140
+ className: "LayoutConfigurator",
141
+ style: {
142
+ width,
143
+ height,
144
+ ...style
145
+ },
146
+ children: /*#__PURE__*/ jsx(LayoutBox, {
147
+ feature: "margin",
148
+ style: {
149
+ top: mt,
150
+ right: mr,
151
+ bottom: mb,
152
+ left: ml
153
+ },
154
+ onChange: handleChange,
155
+ children: /*#__PURE__*/ jsx(LayoutBox, {
156
+ feature: "border",
157
+ style: {
158
+ top: bt,
159
+ right: br,
160
+ bottom: bb,
161
+ left: bl
162
+ },
163
+ onChange: handleChange,
164
+ children: /*#__PURE__*/ jsx(LayoutBox, {
165
+ feature: "padding",
166
+ style: {
167
+ top: pt,
168
+ right: pr,
169
+ bottom: pb,
170
+ left: pl
171
+ },
172
+ onChange: handleChange,
173
+ children: /*#__PURE__*/ jsx("div", {
174
+ className: "layout-content"
175
+ })
176
+ })
177
+ })
178
+ })
179
+ });
180
+ };
181
+ function XXXnormalizeStyles(layoutStyle = NO_STYLE, visualStyle = NO_STYLE) {
182
+ const { margin, marginTop, marginRight, marginBottom, marginLeft, padding, paddingTop, paddingRight, paddingBottom, paddingLeft, ...style } = layoutStyle;
183
+ if ("number" == typeof margin) style.marginTop = style.marginRight = style.marginBottom = style.marginLeft = margin;
184
+ else if ("string" == typeof margin) {
185
+ const match = CSS_REX.exec(margin);
186
+ if (null === match) console.error(`Invalid css value for margin '${margin}'`);
187
+ else {
188
+ const [, pos1, pos2, pos3, pos4] = match;
189
+ const pos123 = pos1 && pos2 && pos3;
190
+ if (pos123 && pos4) {
191
+ style.marginTop = parseInt(pos1, 10);
192
+ style.marginRight = parseInt(pos2, 10);
193
+ style.marginBottom = parseInt(pos3, 10);
194
+ style.marginLeft = parseInt(pos4, 10);
195
+ } else if (pos123) {
196
+ style.marginTop = parseInt(pos1, 10);
197
+ style.marginRight = style.marginLeft = parseInt(pos2, 10);
198
+ style.marginBottom = parseInt(pos3, 10);
199
+ } else if (pos1 && pos2) {
200
+ style.marginTop = style.marginBottom = parseInt(pos1, 10);
201
+ style.marginRight = style.marginLeft = parseInt(pos2, 10);
202
+ } else style.marginTop = style.marginRight = style.marginBottom = style.marginLeft = parseInt(pos1, 10);
203
+ }
204
+ }
205
+ if ("number" == typeof marginTop) style.marginTop = marginTop;
206
+ if ("number" == typeof marginRight) style.marginRight = marginRight;
207
+ if ("number" == typeof marginBottom) style.marginBottom = marginBottom;
208
+ if ("number" == typeof marginLeft) style.marginLeft = marginLeft;
209
+ if ("number" == typeof padding) style.paddingTop = style.paddingRight = style.paddingBottom = style.paddingLeft = padding;
210
+ else if ("string" == typeof padding) {
211
+ const match = CSS_REX.exec(padding);
212
+ if (null === match) console.error(`Invalid css value for padding '${padding}'`);
213
+ else {
214
+ const [, pos1, pos2, pos3, pos4] = match;
215
+ const pos123 = pos1 && pos2 && pos3;
216
+ if (pos123 && pos4) {
217
+ style.paddingTop = parseInt(pos1, 10);
218
+ style.paddingRight = parseInt(pos2, 10);
219
+ style.paddingBottom = parseInt(pos3, 10);
220
+ style.paddingLeft = parseInt(pos4, 10);
221
+ } else if (pos123) {
222
+ style.paddingTop = parseInt(pos1, 10);
223
+ style.paddingRight = style.paddingLeft = parseInt(pos2, 10);
224
+ style.paddingBottom = parseInt(pos3, 10);
225
+ } else if (pos1 && pos2) {
226
+ style.paddingTop = style.paddingBottom = parseInt(pos1, 10);
227
+ style.paddingRight = style.paddingLeft = parseInt(pos2, 10);
228
+ } else style.paddingTop = style.paddingRight = style.paddingBottom = style.paddinggLeft = parseInt(pos1, 10);
229
+ }
230
+ }
231
+ if ("number" == typeof paddingTop) style.paddingTop = paddingTop;
232
+ if ("number" == typeof paddingRight) style.paddingRight = paddingRight;
233
+ if ("number" == typeof paddingBottom) style.paddingBottom = paddingBottom;
234
+ if ("number" == typeof paddingLeft) style.paddingLeft = paddingLeft;
235
+ return normalizeStyle(style);
236
+ }
237
+ function normalizeStyle(managedStyle = NO_STYLE) {
238
+ const style = {
239
+ ...managedStyle
240
+ };
241
+ let match;
242
+ let { border, borderWidth, borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth, borderColor, margin, marginTop, marginRight, marginBottom, marginLeft, padding, paddingTop, paddingRight, paddingBottom, paddingLeft, ...rest } = style;
243
+ let marginStyles = {};
244
+ let paddingStyles = {};
245
+ if ("number" == typeof margin) {
246
+ style.marginTop = style.marginRight = style.marginBottom = style.marginLeft = margin;
247
+ marginStyles = {
248
+ marginTop: margin,
249
+ marginRight: margin,
250
+ marginBottom: margin,
251
+ marginLeft: margin
252
+ };
253
+ }
254
+ if ("number" == typeof padding) {
255
+ style.paddingTop = style.paddingRight = style.paddingBottom = style.paddingLeft = padding;
256
+ paddingStyles = {
257
+ paddingTop: padding,
258
+ paddingRight: padding,
259
+ paddingBottom: padding,
260
+ paddingLeft: padding
261
+ };
262
+ }
263
+ if (!border && !borderWidth && !borderTopWidth && !borderRightWidth && !borderBottomWidth && !borderLeftWidth) return style;
264
+ {
265
+ if ("string" == typeof border && (match = BORDER_REX.exec(border))) {
266
+ [, borderWidth, borderColor] = match;
267
+ borderWidth = parseInt(borderWidth, 10);
268
+ }
269
+ if (borderWidth) {
270
+ borderTopWidth = void 0 === borderTopWidth ? borderWidth : borderTopWidth;
271
+ borderRightWidth = void 0 === borderRightWidth ? borderWidth : borderRightWidth;
272
+ borderBottomWidth = void 0 === borderBottomWidth ? borderWidth : borderBottomWidth;
273
+ borderLeftWidth = void 0 === borderLeftWidth ? borderWidth : borderLeftWidth;
274
+ }
275
+ borderColor = borderColor || "black";
276
+ const boxShadow = `
277
+ ${borderColor} ${borderLeftWidth || 0}px ${borderTopWidth || 0}px 0 0 inset,
278
+ ${borderColor} ${-borderRightWidth || 0}px ${-borderBottomWidth || 0}px 0 0 inset`;
279
+ return {
280
+ ...rest,
281
+ ...marginStyles,
282
+ ...paddingStyles,
283
+ borderTopWidth,
284
+ borderRightWidth,
285
+ borderBottomWidth,
286
+ borderLeftWidth,
287
+ borderColor,
288
+ borderStyle: "solid",
289
+ boxShadow
290
+ };
291
+ }
292
+ }
293
+ export { BORDER_STYLES, LayoutConfigurator, MARGIN_STYLES, PADDING_STYLES, XXXnormalizeStyles };
@@ -0,0 +1,40 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import react from "react";
3
+ import clsx from "clsx";
4
+ import { useComponentCssInjection } from "@salt-ds/styles";
5
+ import { useWindow } from "@salt-ds/window";
6
+ import { typeOf } from "../../utils/index.js";
7
+ import layout_tree_viewer from "./layout-tree-viewer.css";
8
+ import { TreeTable } from "@vuu-ui/vuu-datatable";
9
+ const classBaseTree = "hwLayoutTreeViewer";
10
+ const toTreeJson = (component, path = "0")=>({
11
+ label: typeOf(component),
12
+ path,
13
+ childNodes: react.Children.map(component.props.children, (child, i)=>toTreeJson(child, path ? `${path}.${i}` : `${i}`))
14
+ });
15
+ const LayoutTreeViewer = ({ layout, onSelect: _, style })=>{
16
+ const targetWindow = useWindow();
17
+ useComponentCssInjection({
18
+ testId: "vuu-layout-tree-viewer",
19
+ css: layout_tree_viewer,
20
+ window: targetWindow
21
+ });
22
+ const treeJson = [
23
+ toTreeJson(layout)
24
+ ];
25
+ const handleSelection = (row)=>{
26
+ console.log({
27
+ row
28
+ });
29
+ };
30
+ return /*#__PURE__*/ jsx("div", {
31
+ className: clsx(classBaseTree),
32
+ style: style,
33
+ children: /*#__PURE__*/ jsx(TreeTable, {
34
+ source: treeJson,
35
+ selectionModel: "single",
36
+ onSelect: handleSelection
37
+ })
38
+ });
39
+ };
40
+ export { LayoutTreeViewer };
@@ -1,7 +1,7 @@
1
1
  import { HTMLAttributes } from "react";
2
2
  export type DockLayoutProps = HTMLAttributes<HTMLDivElement>;
3
- declare const DockLayout: {
4
- (props: DockLayoutProps): import("react/jsx-runtime").JSX.Element;
5
- displayName: string;
6
- };
3
+ declare function DockLayout(props: DockLayoutProps): import("react").JSX.Element;
4
+ declare namespace DockLayout {
5
+ var displayName: string;
6
+ }
7
7
  export default DockLayout;
@@ -10,8 +10,8 @@ export interface DrawerProps extends HTMLAttributes<HTMLDivElement> {
10
10
  sizeClosed?: number;
11
11
  toggleButton?: "start" | "end";
12
12
  }
13
- declare const Drawer: {
14
- ({ children, className: classNameProp, clickToOpen, defaultOpen, sizeOpen, sizeClosed, style: styleProp, open: openProp, position, inline, onClick, peekaboo, toggleButton, ...props }: DrawerProps): import("react/jsx-runtime").JSX.Element;
15
- displayName: string;
16
- };
13
+ declare function Drawer({ children, className: classNameProp, clickToOpen, defaultOpen, sizeOpen, sizeClosed, style: styleProp, open: openProp, position, inline, onClick, peekaboo, toggleButton, ...props }: DrawerProps): import("react").JSX.Element;
14
+ declare namespace Drawer {
15
+ var displayName: string;
16
+ }
17
17
  export default Drawer;
@@ -1,6 +1,6 @@
1
- import { ReactElement } from "react";
2
- import { LayoutModel } from "@vuu-ui/vuu-utils";
3
- import { DragDropRect, DropPos, RelativePosition } from "./dragDropTypes";
1
+ import type { ReactElement } from "react";
2
+ import { type LayoutModel } from "@vuu-ui/vuu-utils";
3
+ import type { DragDropRect, DropPos, RelativePosition } from "./dragDropTypes";
4
4
  export declare const positionValues: {
5
5
  north: number;
6
6
  east: number;
@@ -18,7 +18,7 @@ export declare const Position: Readonly<{
18
18
  North: Readonly<{
19
19
  offset: number;
20
20
  valueOf: () => number;
21
- toString: () => "north" | "south" | "east" | "west" | "header" | "centre" | "absolute";
21
+ toString: () => "absolute" | "centre" | "east" | "header" | "north" | "south" | "west";
22
22
  North: boolean;
23
23
  South: boolean;
24
24
  East: boolean;
@@ -34,7 +34,7 @@ export declare const Position: Readonly<{
34
34
  East: Readonly<{
35
35
  offset: number;
36
36
  valueOf: () => number;
37
- toString: () => "north" | "south" | "east" | "west" | "header" | "centre" | "absolute";
37
+ toString: () => "absolute" | "centre" | "east" | "header" | "north" | "south" | "west";
38
38
  North: boolean;
39
39
  South: boolean;
40
40
  East: boolean;
@@ -50,7 +50,7 @@ export declare const Position: Readonly<{
50
50
  South: Readonly<{
51
51
  offset: number;
52
52
  valueOf: () => number;
53
- toString: () => "north" | "south" | "east" | "west" | "header" | "centre" | "absolute";
53
+ toString: () => "absolute" | "centre" | "east" | "header" | "north" | "south" | "west";
54
54
  North: boolean;
55
55
  South: boolean;
56
56
  East: boolean;
@@ -66,7 +66,7 @@ export declare const Position: Readonly<{
66
66
  West: Readonly<{
67
67
  offset: number;
68
68
  valueOf: () => number;
69
- toString: () => "north" | "south" | "east" | "west" | "header" | "centre" | "absolute";
69
+ toString: () => "absolute" | "centre" | "east" | "header" | "north" | "south" | "west";
70
70
  North: boolean;
71
71
  South: boolean;
72
72
  East: boolean;
@@ -82,7 +82,7 @@ export declare const Position: Readonly<{
82
82
  Header: Readonly<{
83
83
  offset: number;
84
84
  valueOf: () => number;
85
- toString: () => "north" | "south" | "east" | "west" | "header" | "centre" | "absolute";
85
+ toString: () => "absolute" | "centre" | "east" | "header" | "north" | "south" | "west";
86
86
  North: boolean;
87
87
  South: boolean;
88
88
  East: boolean;
@@ -98,7 +98,7 @@ export declare const Position: Readonly<{
98
98
  Centre: Readonly<{
99
99
  offset: number;
100
100
  valueOf: () => number;
101
- toString: () => "north" | "south" | "east" | "west" | "header" | "centre" | "absolute";
101
+ toString: () => "absolute" | "centre" | "east" | "header" | "north" | "south" | "west";
102
102
  North: boolean;
103
103
  South: boolean;
104
104
  East: boolean;
@@ -114,7 +114,7 @@ export declare const Position: Readonly<{
114
114
  Absolute: Readonly<{
115
115
  offset: number;
116
116
  valueOf: () => number;
117
- toString: () => "north" | "south" | "east" | "west" | "header" | "centre" | "absolute";
117
+ toString: () => "absolute" | "centre" | "east" | "header" | "north" | "south" | "west";
118
118
  North: boolean;
119
119
  South: boolean;
120
120
  East: boolean;
@@ -1,5 +1,5 @@
1
1
  import { FlexboxLayoutProps } from "./flexboxTypes";
2
- export declare const FlexboxLayout: {
3
- (props: FlexboxLayoutProps): import("react/jsx-runtime").JSX.Element;
4
- displayName: string;
5
- };
2
+ export declare function FlexboxLayout(props: FlexboxLayoutProps): import("react").JSX.Element;
3
+ export declare namespace FlexboxLayout {
4
+ var displayName: string;
5
+ }
@@ -9,4 +9,4 @@ export interface SplitterProps extends Omit<HTMLAttributes<HTMLDivElement>, "onD
9
9
  onDrag: SplitterDragHandler;
10
10
  onDragEnd: SplitterDragEndHandler;
11
11
  }
12
- export declare const Splitter: React.NamedExoticComponent<SplitterProps>;
12
+ export declare const Splitter: React.MemoExoticComponent<({ column, index, onDrag, onDragEnd, onDragStart, style, }: SplitterProps) => React.JSX.Element>;
@@ -4,5 +4,5 @@ export interface ActionButtonProps extends Omit<HTMLAttributes<HTMLButtonElement
4
4
  iconName?: string;
5
5
  onClick: (evt: MouseEvent, actionId: "maximize" | "minimize" | "restore" | "tearout") => void;
6
6
  }
7
- declare const ActionButton: ({ actionId, className, iconName, onClick, ...props }: ActionButtonProps) => import("react/jsx-runtime").JSX.Element;
7
+ declare const ActionButton: ({ actionId, className, iconName, onClick, ...props }: ActionButtonProps) => import("react").JSX.Element;
8
8
  export default ActionButton;
@@ -12,4 +12,4 @@ export interface HeaderProps extends HTMLAttributes<HTMLDivElement> {
12
12
  orientation?: "horizontal" | "vertical";
13
13
  tearOut?: boolean;
14
14
  }
15
- export declare const Header: ({ allowRename, className: classNameProp, contributions, collapsed, closeable, onCollapse, onEditTitle, onExpand, orientation: orientationProp, style, title, }: HeaderProps) => import("react/jsx-runtime").JSX.Element;
15
+ export declare const Header: ({ allowRename, className: classNameProp, contributions, collapsed, closeable, onCollapse, onEditTitle, onExpand, orientation: orientationProp, style, title, }: HeaderProps) => import("react").JSX.Element;
@@ -8,7 +8,7 @@ export interface LayoutProviderProps {
8
8
  workspaceJSON?: LayoutJSON | LayoutJSON[];
9
9
  onLayoutChange?: LayoutChangeHandler;
10
10
  }
11
- export declare const LayoutProviderVersion: () => import("react/jsx-runtime").JSX.Element;
11
+ export declare const LayoutProviderVersion: () => import("react").JSX.Element;
12
12
  export declare const LayoutProvider: (props: LayoutProviderProps) => ReactElement;
13
13
  export declare const useLayoutProviderDispatch: () => LayoutProviderDispatch;
14
14
  export declare const useLayoutOperation: () => {
@@ -7,7 +7,7 @@ interface ComponentWithId {
7
7
  [key: string]: unknown;
8
8
  }
9
9
  export declare const getManagedDimension: (style: CSSProperties) => [dimension, dimension];
10
- export declare const applyLayoutProps: (component: ReactElement, path?: string) => React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
10
+ export declare const applyLayoutProps: (component: ReactElement, path?: string) => ReactElement<unknown, string | React.JSXElementConstructor<any>>;
11
11
  export interface LayoutProps extends ComponentWithId {
12
12
  active?: number;
13
13
  "data-path"?: string;
@@ -1,3 +1,3 @@
1
1
  import React, { ReactElement } from "react";
2
2
  import { RemoveAction } from "./layoutTypes";
3
- export declare function removeChild(layoutRoot: ReactElement, { path }: RemoveAction): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
3
+ export declare function removeChild(layoutRoot: ReactElement, { path }: RemoveAction): ReactElement<unknown, string | React.JSXElementConstructor<any>>;
@@ -1,6 +1,6 @@
1
1
  import React, { ReactElement } from "react";
2
2
  import { ReplaceAction } from "./layoutTypes";
3
3
  import { LayoutProps } from "./layoutUtils";
4
- export declare function replaceChild(model: ReactElement, { target, replacement }: ReplaceAction): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
5
- export declare function _replaceChild(model: ReactElement, child: ReactElement, replacement: ReactElement<LayoutProps>): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
4
+ export declare function replaceChild(model: ReactElement, { target, replacement }: ReplaceAction): ReactElement<unknown, string | React.JSXElementConstructor<any>>;
5
+ export declare function _replaceChild(model: ReactElement, child: ReactElement, replacement: ReactElement<LayoutProps>): ReactElement<unknown, string | React.JSXElementConstructor<any>>;
6
6
  export declare function swapChild(model: ReactElement, child: ReactElement, replacement: ReactElement, op?: "collapse" | "expand"): ReactElement;
@@ -1,4 +1,4 @@
1
1
  import React, { ReactElement } from "react";
2
2
  import { LayoutResizeAction, SplitterResizeAction } from "./layoutTypes";
3
- export declare function resizeFlexChild(layoutRoot: ReactElement, { path, size }: LayoutResizeAction): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
4
- export declare function resizeFlexChildren(layoutRoot: ReactElement, { path, sizes }: SplitterResizeAction): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
3
+ export declare function resizeFlexChild(layoutRoot: ReactElement, { path, size }: LayoutResizeAction): ReactElement<unknown, string | React.JSXElementConstructor<any>>;
4
+ export declare function resizeFlexChildren(layoutRoot: ReactElement, { path, sizes }: SplitterResizeAction): ReactElement<unknown, string | React.JSXElementConstructor<any>>;
@@ -9,7 +9,7 @@ export interface ViewHookProps {
9
9
  }
10
10
  export declare const useView: ({ id, rootRef, path, dropTargets, title: titleProp, }: ViewHookProps) => {
11
11
  contributions: import("./viewTypes").Contribution[] | undefined;
12
- dispatchViewAction: import("../layout-view-actions/ViewContext").ViewDispatch;
12
+ dispatchViewAction: import("..").ViewDispatch;
13
13
  load: (key?: string) => any;
14
14
  onConfigChange: ConfigChangeHandler;
15
15
  onEditTitle: (title: string) => void;
@@ -10,7 +10,7 @@ export interface PaletteItemProps extends OptionProps {
10
10
  component: ReactElement;
11
11
  idx?: number;
12
12
  }
13
- export declare const PaletteItem: import("react").MemoExoticComponent<({ className, component, idx, key, value, ViewProps, ...props }: PaletteItemProps) => import("react/jsx-runtime").JSX.Element>;
13
+ export declare const PaletteItem: import("react").MemoExoticComponent<({ className, component, idx, key, value, ViewProps, ...props }: PaletteItemProps) => import("react").JSX.Element>;
14
14
  export interface PaletteProps extends Omit<HTMLAttributes<HTMLDivElement>, "onDragStart" | "onDrop" | "onSelect"> {
15
15
  ListBoxProps?: Partial<ListBoxProps>;
16
16
  ViewProps?: Partial<ViewProps>;
@@ -18,4 +18,4 @@ export interface PaletteProps extends Omit<HTMLAttributes<HTMLDivElement>, "onDr
18
18
  orientation: "horizontal" | "vertical";
19
19
  selection?: string;
20
20
  }
21
- export declare const Palette: ({ ListBoxProps, ViewProps, children, className, orientation, ...props }: PaletteProps) => import("react/jsx-runtime").JSX.Element;
21
+ export declare const Palette: ({ ListBoxProps, ViewProps, children, className, orientation, ...props }: PaletteProps) => import("react").JSX.Element;
@@ -2,4 +2,4 @@ import { HTMLAttributes } from "react";
2
2
  export interface LayoutStartPanelProps extends HTMLAttributes<HTMLDivElement> {
3
3
  label?: string;
4
4
  }
5
- export declare const LayoutStartPanel: (htmlAttributes: LayoutStartPanelProps) => import("react/jsx-runtime").JSX.Element | null;
5
+ export declare const LayoutStartPanel: (htmlAttributes: LayoutStartPanelProps) => import("react").JSX.Element | null;
@@ -10,7 +10,7 @@ export interface PlaceholderProps extends ViewProps {
10
10
  */
11
11
  shim?: boolean;
12
12
  }
13
- export declare const Placeholder: {
14
- ({ className: classNameProp, showStartMenu, ...viewProps }: PlaceholderProps): import("react/jsx-runtime").JSX.Element;
15
- displayName: string;
16
- };
13
+ export declare function Placeholder({ className: classNameProp, showStartMenu, ...viewProps }: PlaceholderProps): import("react").JSX.Element;
14
+ export declare namespace Placeholder {
15
+ var displayName: string;
16
+ }
@@ -1,5 +1,6 @@
1
+ import React from "react";
1
2
  import { StackProps } from "./stackTypes";
2
- export declare const StackLayout: {
3
- (props: StackProps): import("react/jsx-runtime").JSX.Element;
4
- displayName: string;
5
- };
3
+ export declare function StackLayout(props: StackProps): React.JSX.Element;
4
+ export declare namespace StackLayout {
5
+ var displayName: string;
6
+ }
@@ -3,5 +3,5 @@ import './TabPanel.css';
3
3
  export interface TabPanelProps extends HTMLAttributes<HTMLDivElement> {
4
4
  ariaLabelledBy: string;
5
5
  }
6
- declare const TabPanel: ({ ariaLabelledBy, children, id }: TabPanelProps) => import("react/jsx-runtime").JSX.Element;
6
+ declare const TabPanel: ({ ariaLabelledBy, children, id }: TabPanelProps) => import("react").JSX.Element;
7
7
  export default TabPanel;
@@ -1 +1,2 @@
1
- export declare const ConfigWrapper: ({ children }: any) => import("react/jsx-runtime").JSX.Element;
1
+ import React from "react";
2
+ export declare const ConfigWrapper: ({ children }: any) => React.JSX.Element;
@@ -1,31 +1,31 @@
1
- export function XXXnormalizeStyles(layoutStyle?: {}, visualStyle?: {}): {};
2
- export namespace MARGIN_STYLES {
3
- let margin: boolean;
4
- let marginTop: boolean;
5
- let marginRight: boolean;
6
- let marginBottom: boolean;
7
- let marginLeft: boolean;
8
- }
9
- export namespace PADDING_STYLES {
10
- let padding: boolean;
11
- let paddingTop: boolean;
12
- let paddingRight: boolean;
13
- let paddingBottom: boolean;
14
- let paddingLeft: boolean;
15
- }
16
- export namespace BORDER_STYLES {
17
- let border: boolean;
18
- let borderColor: boolean;
19
- let borderWidth: boolean;
20
- let borderTopWidth: boolean;
21
- let borderRightWidth: boolean;
22
- let borderBottomWidth: boolean;
23
- let borderLeftWidth: boolean;
24
- }
25
- export function LayoutConfigurator({ height, managedStyle, onChange, style, width, }: {
1
+ export declare const MARGIN_STYLES: {
2
+ margin: boolean;
3
+ marginTop: boolean;
4
+ marginRight: boolean;
5
+ marginBottom: boolean;
6
+ marginLeft: boolean;
7
+ };
8
+ export declare const PADDING_STYLES: {
9
+ padding: boolean;
10
+ paddingTop: boolean;
11
+ paddingRight: boolean;
12
+ paddingBottom: boolean;
13
+ paddingLeft: boolean;
14
+ };
15
+ export declare const BORDER_STYLES: {
16
+ border: boolean;
17
+ borderColor: boolean;
18
+ borderWidth: boolean;
19
+ borderTopWidth: boolean;
20
+ borderRightWidth: boolean;
21
+ borderBottomWidth: boolean;
22
+ borderLeftWidth: boolean;
23
+ };
24
+ export declare const LayoutConfigurator: ({ height, managedStyle, onChange, style, width, }: {
26
25
  height: any;
27
26
  managedStyle: any;
28
27
  onChange: any;
29
28
  style: any;
30
29
  width: any;
31
- }): import("react/jsx-runtime").JSX.Element;
30
+ }) => import("react").JSX.Element;
31
+ export declare function XXXnormalizeStyles(layoutStyle?: {}, visualStyle?: {}): {};
@@ -1,5 +1,6 @@
1
- export function LayoutTreeViewer({ layout, onSelect: _, style }: {
1
+ import React from "react";
2
+ export declare const LayoutTreeViewer: ({ layout, onSelect: _, style }: {
2
3
  layout: any;
3
4
  onSelect: any;
4
5
  style: any;
5
- }): import("react/jsx-runtime").JSX.Element;
6
+ }) => React.JSX.Element;
@@ -17,7 +17,7 @@ export declare function followPathToParent(source: ReactElement, path: string):
17
17
  export declare function findTarget(source: LayoutModel | undefined, test: (props: any) => boolean): LayoutModel | undefined;
18
18
  export declare function containerOf(source: LayoutModel, target: LayoutModel): LayoutModel | null;
19
19
  export declare const getChild: (children: ReactElement[], idx: number) => ReactElement | undefined;
20
- export declare function followPathToComponent(component: ReactElement, path: string): React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | undefined;
20
+ export declare function followPathToComponent(component: ReactElement, path: string): ReactElement<unknown, string | React.JSXElementConstructor<any>> | undefined;
21
21
  export declare function followPath(source: LayoutModel, path: string): LayoutModel | undefined;
22
22
  export declare function followPath(source: ReactElement, path: string, throwIfNotFound: true): ReactElement;
23
23
  export declare function nextLeaf(root: ReactElement, path: string): any;