@vuu-ui/vuu-layout 3.5.4 → 3.5.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.
- package/README.md +18 -1
- package/package.json +10 -10
- package/types/flexbox/Flexbox.d.ts +4 -0
- package/types/src/Component.d.ts +0 -6
- package/types/src/LayoutContainer.d.ts +0 -6
- package/types/src/debug.d.ts +0 -2
- package/types/src/dock-layout/DockLayout.d.ts +0 -7
- package/types/src/dock-layout/Drawer.d.ts +0 -17
- package/types/src/dock-layout/index.d.ts +0 -2
- package/types/src/drag-drop/BoxModel.d.ts +0 -143
- package/types/src/drag-drop/DragState.d.ts +0 -46
- package/types/src/drag-drop/Draggable.d.ts +0 -24
- package/types/src/drag-drop/DropTarget.d.ts +0 -60
- package/types/src/drag-drop/DropTargetRenderer.d.ts +0 -17
- package/types/src/drag-drop/dragDropTypes.d.ts +0 -51
- package/types/src/drag-drop/index.d.ts +0 -3
- package/types/src/flexbox/Flexbox.d.ts +0 -3
- package/types/src/flexbox/FlexboxLayout.d.ts +0 -5
- package/types/src/flexbox/Splitter.d.ts +0 -12
- package/types/src/flexbox/flexbox-utils.d.ts +0 -12
- package/types/src/flexbox/flexboxTypes.d.ts +0 -52
- package/types/src/flexbox/index.d.ts +0 -2
- package/types/src/flexbox/useSplitterResizing.d.ts +0 -2
- package/types/src/index.d.ts +0 -20
- package/types/src/layout-action.d.ts +0 -19
- package/types/src/layout-header/ActionButton.d.ts +0 -8
- package/types/src/layout-header/Header.d.ts +0 -15
- package/types/src/layout-header/index.d.ts +0 -1
- package/types/src/layout-header/useHeader.d.ts +0 -20
- package/types/src/layout-provider/LayoutProvider.d.ts +0 -20
- package/types/src/layout-provider/LayoutProviderContext.d.ts +0 -15
- package/types/src/layout-provider/index.d.ts +0 -2
- package/types/src/layout-provider/useLayoutDragDrop.d.ts +0 -4
- package/types/src/layout-reducer/flexUtils.d.ts +0 -22
- package/types/src/layout-reducer/index.d.ts +0 -4
- package/types/src/layout-reducer/insert-layout-element.d.ts +0 -8
- package/types/src/layout-reducer/layout-reducer.d.ts +0 -3
- package/types/src/layout-reducer/layoutTypes.d.ts +0 -135
- package/types/src/layout-reducer/layoutUtils.d.ts +0 -44
- package/types/src/layout-reducer/move-layout-element.d.ts +0 -3
- package/types/src/layout-reducer/remove-layout-element.d.ts +0 -3
- package/types/src/layout-reducer/replace-layout-element.d.ts +0 -6
- package/types/src/layout-reducer/resize-flex-children.d.ts +0 -4
- package/types/src/layout-reducer/wrap-layout-element.d.ts +0 -9
- package/types/src/layout-view/View.d.ts +0 -10
- package/types/src/layout-view/useView.d.ts +0 -20
- package/types/src/layout-view/useViewBroadcastChannel.d.ts +0 -7
- package/types/src/layout-view/useViewResize.d.ts +0 -7
- package/types/src/layout-view/viewTypes.d.ts +0 -48
- package/types/src/layout-view-actions/ViewContext.d.ts +0 -35
- package/types/src/layout-view-actions/useViewActionDispatcher.d.ts +0 -4
- package/types/src/layout-view-actions/useViewContributions.d.ts +0 -9
- package/types/src/palette/Palette.d.ts +0 -21
- package/types/src/palette/index.d.ts +0 -1
- package/types/src/placeholder/LayoutStartPanel.d.ts +0 -5
- package/types/src/placeholder/Placeholder.d.ts +0 -16
- package/types/src/placeholder/index.d.ts +0 -1
- package/types/src/responsive/index.d.ts +0 -2
- package/types/src/responsive/measureMinimumNodeSize.d.ts +0 -1
- package/types/src/responsive/overflowUtils.d.ts +0 -2
- package/types/src/responsive/useResizeObserver.d.ts +0 -13
- package/types/src/responsive/utils.d.ts +0 -6
- package/types/src/stack/Stack.d.ts +0 -3
- package/types/src/stack/StackLayout.d.ts +0 -6
- package/types/src/stack/index.d.ts +0 -3
- package/types/src/stack/stackTypes.d.ts +0 -24
- package/types/src/tabs/TabPanel.d.ts +0 -7
- package/types/src/tabs/index.d.ts +0 -1
- package/types/src/tools/config-wrapper/ConfigWrapper.d.ts +0 -2
- package/types/src/tools/config-wrapper/index.d.ts +0 -1
- package/types/src/tools/devtools-box/layout-configurator.d.ts +0 -31
- package/types/src/tools/devtools-tree/layout-tree-viewer.d.ts +0 -6
- package/types/src/tools/index.d.ts +0 -3
- package/types/src/use-persistent-state.d.ts +0 -8
- package/types/src/utils/index.d.ts +0 -5
- package/types/src/utils/pathUtils.d.ts +0 -31
- package/types/src/utils/propUtils.d.ts +0 -5
- package/types/src/utils/refUtils.d.ts +0 -2
- package/types/src/utils/styleUtils.d.ts +0 -3
- package/types/src/utils/typeOf.d.ts +0 -5
package/README.md
CHANGED
|
@@ -1 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
# @vuu-ui/vuu-layout
|
|
2
|
+
|
|
3
|
+
> **Deprecated:** this package is deprecated and will be removed in a future release.
|
|
4
|
+
>
|
|
5
|
+
> If you are using `Flexbox` with `resizeable` children to create a pair of panes
|
|
6
|
+
> separated by a draggable splitter, use `SplitPane` from `@vuu-ui/vuu-ui-controls`
|
|
7
|
+
> instead. `SplitPane` follows the API of the Salt `FlexLayout` component, with Salt
|
|
8
|
+
> `FlexItem` components as children:
|
|
9
|
+
>
|
|
10
|
+
> ```tsx
|
|
11
|
+
> import { FlexItem } from "@salt-ds/core";
|
|
12
|
+
> import { SplitPane } from "@vuu-ui/vuu-ui-controls";
|
|
13
|
+
>
|
|
14
|
+
> <SplitPane direction="row" onSplitterMoved={([size1, size2]) => {}}>
|
|
15
|
+
> <FlexItem basis="200px">Left</FlexItem>
|
|
16
|
+
> <FlexItem grow={1}>Right</FlexItem>
|
|
17
|
+
> </SplitPane>;
|
|
18
|
+
> ```
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "3.5.
|
|
2
|
+
"version": "3.5.6",
|
|
3
3
|
"description": "VUU Layout Components",
|
|
4
4
|
"main": "./src/index.js",
|
|
5
5
|
"author": "heswell",
|
|
@@ -11,20 +11,20 @@
|
|
|
11
11
|
},
|
|
12
12
|
"types": "types/index.d.ts",
|
|
13
13
|
"devDependencies": {
|
|
14
|
-
"@vuu-ui/vuu-data-types": "3.5.
|
|
15
|
-
"@vuu-ui/vuu-filter-types": "3.5.
|
|
14
|
+
"@vuu-ui/vuu-data-types": "3.5.6",
|
|
15
|
+
"@vuu-ui/vuu-filter-types": "3.5.6"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@salt-ds/core": "1.54.1",
|
|
19
19
|
"@salt-ds/styles": "0.2.1",
|
|
20
20
|
"@salt-ds/window": "0.1.1",
|
|
21
|
-
"@vuu-ui/vuu-data-react": "3.5.
|
|
22
|
-
"@vuu-ui/vuu-datatable": "3.5.
|
|
23
|
-
"@vuu-ui/vuu-filters": "3.5.
|
|
24
|
-
"@vuu-ui/vuu-popups": "3.5.
|
|
25
|
-
"@vuu-ui/vuu-table": "3.5.
|
|
26
|
-
"@vuu-ui/vuu-ui-controls": "3.5.
|
|
27
|
-
"@vuu-ui/vuu-utils": "3.5.
|
|
21
|
+
"@vuu-ui/vuu-data-react": "3.5.6",
|
|
22
|
+
"@vuu-ui/vuu-datatable": "3.5.6",
|
|
23
|
+
"@vuu-ui/vuu-filters": "3.5.6",
|
|
24
|
+
"@vuu-ui/vuu-popups": "3.5.6",
|
|
25
|
+
"@vuu-ui/vuu-table": "3.5.6",
|
|
26
|
+
"@vuu-ui/vuu-ui-controls": "3.5.6",
|
|
27
|
+
"@vuu-ui/vuu-utils": "3.5.6"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"clsx": "^2.0.0",
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
import { FlexboxProps } from "./flexboxTypes";
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated vuu-layout is deprecated. For two panes separated by a
|
|
4
|
+
* draggable splitter, use `SplitPane` from `@vuu-ui/vuu-ui-controls`.
|
|
5
|
+
*/
|
|
2
6
|
declare const Flexbox: import("react").ForwardRefExoticComponent<FlexboxProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
3
7
|
export default Flexbox;
|
package/types/src/Component.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { HTMLAttributes } from "react";
|
|
2
|
-
export interface LayoutContainerProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
-
dropTarget?: boolean;
|
|
4
|
-
resizeable?: boolean;
|
|
5
|
-
}
|
|
6
|
-
export declare const LayoutContainer: import("react").ForwardRefExoticComponent<LayoutContainerProps & import("react").RefAttributes<HTMLDivElement>>;
|
package/types/src/debug.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { HTMLAttributes } from "react";
|
|
2
|
-
export type DockLayoutProps = HTMLAttributes<HTMLDivElement>;
|
|
3
|
-
declare function DockLayout(props: DockLayoutProps): import("react").JSX.Element;
|
|
4
|
-
declare namespace DockLayout {
|
|
5
|
-
var displayName: string;
|
|
6
|
-
}
|
|
7
|
-
export default DockLayout;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { HTMLAttributes } from "react";
|
|
2
|
-
export interface DrawerProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
-
clickToOpen?: boolean;
|
|
4
|
-
defaultOpen?: boolean;
|
|
5
|
-
inline?: boolean;
|
|
6
|
-
open?: boolean;
|
|
7
|
-
peekaboo?: boolean;
|
|
8
|
-
position?: "left" | "right" | "top" | "bottom";
|
|
9
|
-
sizeOpen?: number;
|
|
10
|
-
sizeClosed?: number;
|
|
11
|
-
toggleButton?: "start" | "end";
|
|
12
|
-
}
|
|
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
|
-
export default Drawer;
|
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
import { ReactElement } from "react";
|
|
2
|
-
import { LayoutModel } from "@vuu-ui/vuu-utils";
|
|
3
|
-
import { DragDropRect, DropPos, RelativePosition } from "./dragDropTypes";
|
|
4
|
-
export declare const positionValues: {
|
|
5
|
-
north: number;
|
|
6
|
-
east: number;
|
|
7
|
-
south: number;
|
|
8
|
-
west: number;
|
|
9
|
-
header: number;
|
|
10
|
-
centre: number;
|
|
11
|
-
absolute: number;
|
|
12
|
-
};
|
|
13
|
-
export declare const RelativeDropPosition: {
|
|
14
|
-
AFTER: RelativePosition;
|
|
15
|
-
BEFORE: RelativePosition;
|
|
16
|
-
};
|
|
17
|
-
export declare const Position: Readonly<{
|
|
18
|
-
North: Readonly<{
|
|
19
|
-
offset: number;
|
|
20
|
-
valueOf: () => number;
|
|
21
|
-
toString: () => "absolute" | "centre" | "east" | "header" | "north" | "south" | "west";
|
|
22
|
-
North: boolean;
|
|
23
|
-
South: boolean;
|
|
24
|
-
East: boolean;
|
|
25
|
-
West: boolean;
|
|
26
|
-
Header: boolean;
|
|
27
|
-
Centre: boolean;
|
|
28
|
-
NorthOrSouth: boolean;
|
|
29
|
-
EastOrWest: boolean;
|
|
30
|
-
NorthOrWest: boolean;
|
|
31
|
-
SouthOrEast: boolean;
|
|
32
|
-
Absolute: boolean;
|
|
33
|
-
}>;
|
|
34
|
-
East: Readonly<{
|
|
35
|
-
offset: number;
|
|
36
|
-
valueOf: () => number;
|
|
37
|
-
toString: () => "absolute" | "centre" | "east" | "header" | "north" | "south" | "west";
|
|
38
|
-
North: boolean;
|
|
39
|
-
South: boolean;
|
|
40
|
-
East: boolean;
|
|
41
|
-
West: boolean;
|
|
42
|
-
Header: boolean;
|
|
43
|
-
Centre: boolean;
|
|
44
|
-
NorthOrSouth: boolean;
|
|
45
|
-
EastOrWest: boolean;
|
|
46
|
-
NorthOrWest: boolean;
|
|
47
|
-
SouthOrEast: boolean;
|
|
48
|
-
Absolute: boolean;
|
|
49
|
-
}>;
|
|
50
|
-
South: Readonly<{
|
|
51
|
-
offset: number;
|
|
52
|
-
valueOf: () => number;
|
|
53
|
-
toString: () => "absolute" | "centre" | "east" | "header" | "north" | "south" | "west";
|
|
54
|
-
North: boolean;
|
|
55
|
-
South: boolean;
|
|
56
|
-
East: boolean;
|
|
57
|
-
West: boolean;
|
|
58
|
-
Header: boolean;
|
|
59
|
-
Centre: boolean;
|
|
60
|
-
NorthOrSouth: boolean;
|
|
61
|
-
EastOrWest: boolean;
|
|
62
|
-
NorthOrWest: boolean;
|
|
63
|
-
SouthOrEast: boolean;
|
|
64
|
-
Absolute: boolean;
|
|
65
|
-
}>;
|
|
66
|
-
West: Readonly<{
|
|
67
|
-
offset: number;
|
|
68
|
-
valueOf: () => number;
|
|
69
|
-
toString: () => "absolute" | "centre" | "east" | "header" | "north" | "south" | "west";
|
|
70
|
-
North: boolean;
|
|
71
|
-
South: boolean;
|
|
72
|
-
East: boolean;
|
|
73
|
-
West: boolean;
|
|
74
|
-
Header: boolean;
|
|
75
|
-
Centre: boolean;
|
|
76
|
-
NorthOrSouth: boolean;
|
|
77
|
-
EastOrWest: boolean;
|
|
78
|
-
NorthOrWest: boolean;
|
|
79
|
-
SouthOrEast: boolean;
|
|
80
|
-
Absolute: boolean;
|
|
81
|
-
}>;
|
|
82
|
-
Header: Readonly<{
|
|
83
|
-
offset: number;
|
|
84
|
-
valueOf: () => number;
|
|
85
|
-
toString: () => "absolute" | "centre" | "east" | "header" | "north" | "south" | "west";
|
|
86
|
-
North: boolean;
|
|
87
|
-
South: boolean;
|
|
88
|
-
East: boolean;
|
|
89
|
-
West: boolean;
|
|
90
|
-
Header: boolean;
|
|
91
|
-
Centre: boolean;
|
|
92
|
-
NorthOrSouth: boolean;
|
|
93
|
-
EastOrWest: boolean;
|
|
94
|
-
NorthOrWest: boolean;
|
|
95
|
-
SouthOrEast: boolean;
|
|
96
|
-
Absolute: boolean;
|
|
97
|
-
}>;
|
|
98
|
-
Centre: Readonly<{
|
|
99
|
-
offset: number;
|
|
100
|
-
valueOf: () => number;
|
|
101
|
-
toString: () => "absolute" | "centre" | "east" | "header" | "north" | "south" | "west";
|
|
102
|
-
North: boolean;
|
|
103
|
-
South: boolean;
|
|
104
|
-
East: boolean;
|
|
105
|
-
West: boolean;
|
|
106
|
-
Header: boolean;
|
|
107
|
-
Centre: boolean;
|
|
108
|
-
NorthOrSouth: boolean;
|
|
109
|
-
EastOrWest: boolean;
|
|
110
|
-
NorthOrWest: boolean;
|
|
111
|
-
SouthOrEast: boolean;
|
|
112
|
-
Absolute: boolean;
|
|
113
|
-
}>;
|
|
114
|
-
Absolute: Readonly<{
|
|
115
|
-
offset: number;
|
|
116
|
-
valueOf: () => number;
|
|
117
|
-
toString: () => "absolute" | "centre" | "east" | "header" | "north" | "south" | "west";
|
|
118
|
-
North: boolean;
|
|
119
|
-
South: boolean;
|
|
120
|
-
East: boolean;
|
|
121
|
-
West: boolean;
|
|
122
|
-
Header: boolean;
|
|
123
|
-
Centre: boolean;
|
|
124
|
-
NorthOrSouth: boolean;
|
|
125
|
-
EastOrWest: boolean;
|
|
126
|
-
NorthOrWest: boolean;
|
|
127
|
-
SouthOrEast: boolean;
|
|
128
|
-
Absolute: boolean;
|
|
129
|
-
}>;
|
|
130
|
-
}>;
|
|
131
|
-
export interface Measurements {
|
|
132
|
-
[key: string]: DragDropRect;
|
|
133
|
-
}
|
|
134
|
-
export declare class BoxModel {
|
|
135
|
-
static measure(model: ReactElement, dropTargetPaths?: string[]): Measurements;
|
|
136
|
-
static allBoxesContainingPoint(layout: LayoutModel, measurements: Measurements, x: number, y: number, validDropTargets?: string[]): LayoutModel[];
|
|
137
|
-
}
|
|
138
|
-
export declare function pointPositionWithinRect(x: number, y: number, rect: DragDropRect, borderZone?: number): {
|
|
139
|
-
pctX: number;
|
|
140
|
-
pctY: number;
|
|
141
|
-
closeToTheEdge: number;
|
|
142
|
-
};
|
|
143
|
-
export declare function getPosition(x: number, y: number, rect: DragDropRect, targetOrientation?: "row" | "column"): DropPos;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { DragDropRect } from './dragDropTypes';
|
|
2
|
-
export type IntrinsicSizes = {
|
|
3
|
-
height?: number;
|
|
4
|
-
width?: number;
|
|
5
|
-
};
|
|
6
|
-
interface ZoneRange {
|
|
7
|
-
hi: number;
|
|
8
|
-
lo: number;
|
|
9
|
-
}
|
|
10
|
-
type DragConstraint = {
|
|
11
|
-
zone: {
|
|
12
|
-
x: ZoneRange;
|
|
13
|
-
y: ZoneRange;
|
|
14
|
-
};
|
|
15
|
-
pos: {
|
|
16
|
-
x: ZoneRange;
|
|
17
|
-
y: ZoneRange;
|
|
18
|
-
};
|
|
19
|
-
mouse: {
|
|
20
|
-
x: ZoneRange;
|
|
21
|
-
y: ZoneRange;
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
interface ExtendedZoneRange {
|
|
25
|
-
lo: boolean;
|
|
26
|
-
hi: boolean;
|
|
27
|
-
mousePct: number;
|
|
28
|
-
mousePos: number;
|
|
29
|
-
pos: number;
|
|
30
|
-
}
|
|
31
|
-
export declare class DragState {
|
|
32
|
-
constraint: DragConstraint;
|
|
33
|
-
x: ExtendedZoneRange;
|
|
34
|
-
y: ExtendedZoneRange;
|
|
35
|
-
intrinsicSize: IntrinsicSizes | undefined;
|
|
36
|
-
constructor(zone: DragDropRect, mouseX: number, mouseY: number, measurements: DragDropRect, intrinsicSize?: IntrinsicSizes);
|
|
37
|
-
init(zone: DragDropRect, mouseX: number, mouseY: number, rect: DragDropRect, intrinsicSize?: IntrinsicSizes): void;
|
|
38
|
-
outOfBounds(): boolean;
|
|
39
|
-
inBounds(): boolean;
|
|
40
|
-
dropX(): number;
|
|
41
|
-
dropY(): number;
|
|
42
|
-
hasIntrinsicSize(): number | undefined;
|
|
43
|
-
update(xy: 'x' | 'y', mousePos: number): boolean;
|
|
44
|
-
private dropXY;
|
|
45
|
-
}
|
|
46
|
-
export {};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { rect } from "@vuu-ui/vuu-utils";
|
|
2
|
-
import { ReactElement } from "react";
|
|
3
|
-
import { IntrinsicSizes } from "./DragState";
|
|
4
|
-
import { DropTarget } from "./DropTarget";
|
|
5
|
-
export type DragStartCallback = (e: MouseEvent, x: number, y: number) => void;
|
|
6
|
-
export type DragMoveCallback = (x: number | undefined, y: number | undefined) => void;
|
|
7
|
-
export type DragEndCallback = (droppedTarget?: Partial<DropTarget>) => void;
|
|
8
|
-
export type DragInstructions = {
|
|
9
|
-
DoNotRemove?: boolean;
|
|
10
|
-
DoNotTransform?: boolean;
|
|
11
|
-
dragThreshold?: number;
|
|
12
|
-
DriftHomeIfNoDropTarget?: boolean;
|
|
13
|
-
RemoveDraggableOnDragEnd?: boolean;
|
|
14
|
-
};
|
|
15
|
-
export declare const Draggable: {
|
|
16
|
-
handleMousedown(e: MouseEvent, dragStartCallback: DragStartCallback, dragInstructions?: DragInstructions): void;
|
|
17
|
-
initDrag(rootContainer: ReactElement, dragContainerPath: string, { top, left, right, bottom }: rect, dragPos: {
|
|
18
|
-
x: number;
|
|
19
|
-
y: number;
|
|
20
|
-
}, dragHandler: {
|
|
21
|
-
drag: DragMoveCallback;
|
|
22
|
-
drop: DragEndCallback;
|
|
23
|
-
}, intrinsicSize?: IntrinsicSizes, dropTargets?: string[]): string;
|
|
24
|
-
};
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { LayoutModel, rectTuple } from "@vuu-ui/vuu-utils";
|
|
2
|
-
import { Measurements } from "./BoxModel";
|
|
3
|
-
import { DragDropRect, DropPos, DropPosTab } from "./dragDropTypes";
|
|
4
|
-
import { DragState } from "./DragState";
|
|
5
|
-
export declare const isTabstrip: (dropTarget: DropTarget) => boolean | undefined;
|
|
6
|
-
export interface DropTargetProps {
|
|
7
|
-
component: LayoutModel;
|
|
8
|
-
pos: DropPos;
|
|
9
|
-
clientRect: DragDropRect;
|
|
10
|
-
nextDropTarget: DropTarget | null;
|
|
11
|
-
}
|
|
12
|
-
export type GuideLine = [
|
|
13
|
-
number,
|
|
14
|
-
number,
|
|
15
|
-
number,
|
|
16
|
-
number,
|
|
17
|
-
number,
|
|
18
|
-
number,
|
|
19
|
-
number,
|
|
20
|
-
number
|
|
21
|
-
];
|
|
22
|
-
export interface TargetDropOutline {
|
|
23
|
-
l: number;
|
|
24
|
-
r: number;
|
|
25
|
-
t: number;
|
|
26
|
-
b: number;
|
|
27
|
-
tabLeft?: number;
|
|
28
|
-
tabWidth?: number;
|
|
29
|
-
tabHeight?: number;
|
|
30
|
-
guideLines?: GuideLine;
|
|
31
|
-
}
|
|
32
|
-
export declare class DropTarget {
|
|
33
|
-
private active;
|
|
34
|
-
box: unknown;
|
|
35
|
-
clientRect: DragDropRect;
|
|
36
|
-
component: LayoutModel;
|
|
37
|
-
dropRect: rectTuple | undefined;
|
|
38
|
-
nextDropTarget: DropTarget | null;
|
|
39
|
-
pos: DropPos;
|
|
40
|
-
constructor({ component, pos, clientRect, nextDropTarget, }: DropTargetProps);
|
|
41
|
-
targetTabPos(tab: DropPosTab): number;
|
|
42
|
-
/**
|
|
43
|
-
* Determine what will be rendered by the dropTargetRenderer
|
|
44
|
-
*
|
|
45
|
-
* @param {*} lineWidth
|
|
46
|
-
* @param {*} dragState
|
|
47
|
-
* @returns {l, t, r, b, tabLeft, tabWidth, tabHeight}
|
|
48
|
-
*/
|
|
49
|
-
getTargetDropOutline(lineWidth: number, dragState?: DragState): TargetDropOutline;
|
|
50
|
-
getDropTabOutline(lineWidth: number, tab: DropPosTab): TargetDropOutline;
|
|
51
|
-
getIntrinsicDropRect(dragState: DragState): TargetDropOutline;
|
|
52
|
-
/**
|
|
53
|
-
* @returns [left, top, right, bottom]
|
|
54
|
-
*/
|
|
55
|
-
getDropRectOutline(lineWidth: number, dragState?: DragState): number[] | null;
|
|
56
|
-
activate(): this;
|
|
57
|
-
toArray(this: DropTarget): DropTarget[];
|
|
58
|
-
static getActiveDropTarget(dropTarget: DropTarget | null): DropTarget | null;
|
|
59
|
-
}
|
|
60
|
-
export declare function identifyDropTarget(x: number, y: number, rootLayout: LayoutModel, measurements: Measurements, intrinsicSize?: number, validDropTargets?: string[]): DropTarget | null;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { DragDropRect } from "./dragDropTypes";
|
|
2
|
-
import { DragState } from "./DragState";
|
|
3
|
-
import { DropTarget } from "./DropTarget";
|
|
4
|
-
type Point = [number, number];
|
|
5
|
-
type TabMode = "full-view" | "tab-only";
|
|
6
|
-
export default class DropTargetCanvas {
|
|
7
|
-
private currentPath;
|
|
8
|
-
private tabMode;
|
|
9
|
-
constructor();
|
|
10
|
-
prepare(dragRect: DragDropRect, tabMode?: TabMode): void;
|
|
11
|
-
clear(): void;
|
|
12
|
-
get hoverDropTarget(): DropTarget | null;
|
|
13
|
-
getPoints(x: number, y: number, width: number, height: number, tabLeft?: number, tabWidth?: number, tabHeight?: number): Point[];
|
|
14
|
-
draw(dropTarget: DropTarget, dragState: DragState): void;
|
|
15
|
-
drawTarget(dropTarget: DropTarget, dragState?: DragState): void;
|
|
16
|
-
}
|
|
17
|
-
export {};
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import type { rect } from "@vuu-ui/vuu-utils";
|
|
2
|
-
export interface DragDropRect extends rect {
|
|
3
|
-
children?: DragDropRect[];
|
|
4
|
-
header?: {
|
|
5
|
-
top: number;
|
|
6
|
-
left: number;
|
|
7
|
-
right: number;
|
|
8
|
-
bottom: number;
|
|
9
|
-
titleWidth?: number;
|
|
10
|
-
};
|
|
11
|
-
height: number;
|
|
12
|
-
scrolling?: {
|
|
13
|
-
id: string;
|
|
14
|
-
scrollTop: number;
|
|
15
|
-
scrollHeight: number;
|
|
16
|
-
};
|
|
17
|
-
Stack?: {
|
|
18
|
-
left: number;
|
|
19
|
-
right: number;
|
|
20
|
-
}[];
|
|
21
|
-
width: number;
|
|
22
|
-
}
|
|
23
|
-
export interface DropPosition {
|
|
24
|
-
Absolute: boolean;
|
|
25
|
-
Centre: boolean;
|
|
26
|
-
East: boolean;
|
|
27
|
-
EastOrWest: boolean;
|
|
28
|
-
Header: boolean;
|
|
29
|
-
North: boolean;
|
|
30
|
-
NorthOrSouth: boolean;
|
|
31
|
-
offset: number;
|
|
32
|
-
South: boolean;
|
|
33
|
-
SouthOrEast: boolean;
|
|
34
|
-
West: boolean;
|
|
35
|
-
}
|
|
36
|
-
export type RelativePosition = "after" | "before";
|
|
37
|
-
export type DropPosTab = {
|
|
38
|
-
index: number;
|
|
39
|
-
left: number;
|
|
40
|
-
positionRelativeToTab: RelativePosition;
|
|
41
|
-
width: number;
|
|
42
|
-
};
|
|
43
|
-
export interface DropPos {
|
|
44
|
-
closeToTheEdge: number;
|
|
45
|
-
height?: number;
|
|
46
|
-
position: DropPosition;
|
|
47
|
-
tab?: DropPosTab;
|
|
48
|
-
width?: number;
|
|
49
|
-
x: number;
|
|
50
|
-
y: number;
|
|
51
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React, { HTMLAttributes } from "react";
|
|
2
|
-
export type SplitterDragStartHandler = (index: number) => void;
|
|
3
|
-
export type SplitterDragHandler = (index: number, distance: number) => void;
|
|
4
|
-
export type SplitterDragEndHandler = () => void;
|
|
5
|
-
export interface SplitterProps extends Omit<HTMLAttributes<HTMLDivElement>, "onDrag" | "onDragStart"> {
|
|
6
|
-
column: boolean;
|
|
7
|
-
index: number;
|
|
8
|
-
onDragStart: SplitterDragStartHandler;
|
|
9
|
-
onDrag: SplitterDragHandler;
|
|
10
|
-
onDragEnd: SplitterDragEndHandler;
|
|
11
|
-
}
|
|
12
|
-
export declare const Splitter: React.MemoExoticComponent<({ column, index, onDrag, onDragEnd, onDragStart, style, }: SplitterProps) => React.JSX.Element>;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ReactElement } from "react";
|
|
2
|
-
import type { BreakPoint, ContentMeta } from "./flexboxTypes";
|
|
3
|
-
export declare const SPLITTER = 1;
|
|
4
|
-
export declare const PLACEHOLDER = 2;
|
|
5
|
-
export declare const gatherChildMeta: (children: ReactElement[], dimension: "width" | "height", breakPoints?: BreakPoint[]) => {
|
|
6
|
-
index: number;
|
|
7
|
-
flexOpen: boolean;
|
|
8
|
-
intrinsicSize: number | undefined;
|
|
9
|
-
resizeable: any;
|
|
10
|
-
}[];
|
|
11
|
-
export declare const findSplitterAndPlaceholderPositions: (childMeta: ContentMeta[]) => any[];
|
|
12
|
-
export declare const identifyResizeParties: (contentMeta: ContentMeta[], idx: number) => (number[] | undefined)[];
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { CSSProperties, HTMLAttributes, MutableRefObject, ReactElement, ReactNode } from "react";
|
|
2
|
-
import { SplitterProps } from "./Splitter";
|
|
3
|
-
export interface LayoutContainerProps {
|
|
4
|
-
resizeable?: boolean;
|
|
5
|
-
}
|
|
6
|
-
export type SplitterMoveHandler = (content: ContentMeta[]) => void;
|
|
7
|
-
export interface FlexboxProps extends LayoutContainerProps, HTMLAttributes<HTMLDivElement> {
|
|
8
|
-
breakPoints?: BreakPointsProp;
|
|
9
|
-
children?: ReactNode;
|
|
10
|
-
cols?: number;
|
|
11
|
-
column?: true;
|
|
12
|
-
fullPage?: number;
|
|
13
|
-
flexFill?: boolean;
|
|
14
|
-
gap?: number;
|
|
15
|
-
onSplitterMoved?: SplitterMoveHandler;
|
|
16
|
-
row?: true;
|
|
17
|
-
spacing?: number;
|
|
18
|
-
splitterSize?: number;
|
|
19
|
-
}
|
|
20
|
-
export interface FlexboxLayoutProps extends FlexboxProps {
|
|
21
|
-
path?: string;
|
|
22
|
-
}
|
|
23
|
-
export interface SplitterHookProps {
|
|
24
|
-
children: ReactNode;
|
|
25
|
-
onSplitterMoved?: (content: ContentMeta[]) => void;
|
|
26
|
-
style?: CSSProperties;
|
|
27
|
-
}
|
|
28
|
-
export interface SplitterHookResult {
|
|
29
|
-
content: ReactElement[];
|
|
30
|
-
rootRef: MutableRefObject<HTMLDivElement | null>;
|
|
31
|
-
}
|
|
32
|
-
export type SplitterFactory = (index: number) => ReactElement<SplitterProps>;
|
|
33
|
-
export type ContentMeta = {
|
|
34
|
-
currentSize?: number;
|
|
35
|
-
flexOpen?: boolean;
|
|
36
|
-
flexBasis?: number;
|
|
37
|
-
intrinsicSize?: number;
|
|
38
|
-
minSize?: number;
|
|
39
|
-
placeholder?: boolean;
|
|
40
|
-
resizeable?: boolean;
|
|
41
|
-
shim?: boolean;
|
|
42
|
-
splitter?: boolean;
|
|
43
|
-
};
|
|
44
|
-
export type FlexSize = {
|
|
45
|
-
size: number;
|
|
46
|
-
minSize: number;
|
|
47
|
-
};
|
|
48
|
-
export type BreakPoint = "xs" | "sm" | "md" | "lg" | "xl";
|
|
49
|
-
export type BreakPoints = BreakPoint[];
|
|
50
|
-
export type BreakPointsProp = {
|
|
51
|
-
[keys in BreakPoint]?: number;
|
|
52
|
-
};
|
package/types/src/index.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export { default as Component } from "./Component";
|
|
2
|
-
export * from "./dock-layout";
|
|
3
|
-
export * from "./drag-drop";
|
|
4
|
-
export * from "./flexbox";
|
|
5
|
-
export { Action } from "./layout-action";
|
|
6
|
-
export * from "./layout-header";
|
|
7
|
-
export * from "./layout-provider";
|
|
8
|
-
export * from "./layout-reducer";
|
|
9
|
-
export { useViewActionDispatcher } from "./layout-view-actions/useViewActionDispatcher";
|
|
10
|
-
export { useViewContext, useViewDispatch, ViewContext, type ConfigChangeHandler, type QueryResponse, type ViewContextAPI, type ViewDispatch, } from "./layout-view-actions/ViewContext";
|
|
11
|
-
export * from "./LayoutContainer";
|
|
12
|
-
export * from "./palette";
|
|
13
|
-
export * from "./placeholder";
|
|
14
|
-
export * from "./responsive";
|
|
15
|
-
export * from "./stack";
|
|
16
|
-
export * from "./use-persistent-state";
|
|
17
|
-
export * from "./utils";
|
|
18
|
-
export * from "./layout-view/viewTypes";
|
|
19
|
-
export * from "./layout-view/View";
|
|
20
|
-
export * from "./layout-view/useViewBroadcastChannel";
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export declare const Action: {
|
|
2
|
-
ADD: string;
|
|
3
|
-
BLUR: string;
|
|
4
|
-
BLUR_SPLITTER: string;
|
|
5
|
-
DRAG_START: string;
|
|
6
|
-
DRAG_STARTED: string;
|
|
7
|
-
DRAG_DROP: string;
|
|
8
|
-
FOCUS: string;
|
|
9
|
-
FOCUS_SPLITTER: string;
|
|
10
|
-
INITIALIZE: string;
|
|
11
|
-
LAYOUT_RESIZE: string;
|
|
12
|
-
MAXIMIZE: string;
|
|
13
|
-
MINIMIZE: string;
|
|
14
|
-
REMOVE: string;
|
|
15
|
-
REPLACE: string;
|
|
16
|
-
RESTORE: string;
|
|
17
|
-
SAVE: string;
|
|
18
|
-
SPLITTER_RESIZE: string;
|
|
19
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { HTMLAttributes, MouseEvent } from "react";
|
|
2
|
-
export interface ActionButtonProps extends Omit<HTMLAttributes<HTMLButtonElement>, "onClick"> {
|
|
3
|
-
actionId: "maximize" | "minimize" | "restore" | "tearout";
|
|
4
|
-
iconName?: string;
|
|
5
|
-
onClick: (evt: MouseEvent, actionId: "maximize" | "minimize" | "restore" | "tearout") => void;
|
|
6
|
-
}
|
|
7
|
-
declare const ActionButton: ({ actionId, className, iconName, onClick, ...props }: ActionButtonProps) => import("react").JSX.Element;
|
|
8
|
-
export default ActionButton;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { HTMLAttributes } from "react";
|
|
2
|
-
import { Contribution } from "../layout-view/viewTypes";
|
|
3
|
-
export interface HeaderProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
-
allowRename?: boolean;
|
|
5
|
-
collapsed?: boolean;
|
|
6
|
-
contributions?: Contribution[];
|
|
7
|
-
expanded?: boolean;
|
|
8
|
-
closeable?: boolean;
|
|
9
|
-
onCollapse?: () => void;
|
|
10
|
-
onEditTitle?: (value: string) => void;
|
|
11
|
-
onExpand?: () => void;
|
|
12
|
-
orientation?: "horizontal" | "vertical";
|
|
13
|
-
tearOut?: boolean;
|
|
14
|
-
}
|
|
15
|
-
export declare const Header: ({ allowRename, className: classNameProp, contributions, collapsed, closeable, onCollapse, onEditTitle, onExpand, orientation: orientationProp, style, title, }: HeaderProps) => import("react").JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Header';
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { KeyboardEvent, MouseEventHandler } from "react";
|
|
2
|
-
import type { HeaderProps } from "./Header";
|
|
3
|
-
export interface HeaderHookProps extends Pick<HeaderProps, "onCollapse" | "onEditTitle" | "onExpand"> {
|
|
4
|
-
debugString?: string;
|
|
5
|
-
title: string;
|
|
6
|
-
}
|
|
7
|
-
export declare const useHeader: ({ onCollapse, onEditTitle, onExpand, title, }: HeaderHookProps) => {
|
|
8
|
-
editing: boolean;
|
|
9
|
-
focusTitle: () => void;
|
|
10
|
-
labelFieldRef: import("react").RefObject<HTMLDivElement | null>;
|
|
11
|
-
onClickEdit: () => void;
|
|
12
|
-
onClose: MouseEventHandler;
|
|
13
|
-
onExitEditMode: (originalValue?: string, finalValue?: string, allowDeactivation?: boolean, editCancelled?: boolean) => void;
|
|
14
|
-
onMouseDown: MouseEventHandler;
|
|
15
|
-
onToggleCollapse: MouseEventHandler;
|
|
16
|
-
onToggleExpand: MouseEventHandler;
|
|
17
|
-
onTitleKeyDown: (evt: KeyboardEvent<HTMLDivElement>) => void;
|
|
18
|
-
setValue: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
19
|
-
value: string;
|
|
20
|
-
};
|