@vuu-ui/vuu-layout 0.13.3 → 0.13.4
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 +12 -14
- package/types/Component.d.ts +0 -6
- package/types/LayoutContainer.d.ts +0 -6
- package/types/debug.d.ts +0 -2
- package/types/dock-layout/DockLayout.d.ts +0 -7
- package/types/dock-layout/Drawer.d.ts +0 -17
- package/types/dock-layout/index.d.ts +0 -2
- package/types/drag-drop/BoxModel.d.ts +0 -143
- package/types/drag-drop/DragState.d.ts +0 -46
- package/types/drag-drop/Draggable.d.ts +0 -24
- package/types/drag-drop/DropTarget.d.ts +0 -60
- package/types/drag-drop/DropTargetRenderer.d.ts +0 -17
- package/types/drag-drop/dragDropTypes.d.ts +0 -51
- package/types/drag-drop/index.d.ts +0 -3
- package/types/flexbox/Flexbox.d.ts +0 -3
- package/types/flexbox/FlexboxLayout.d.ts +0 -5
- package/types/flexbox/Splitter.d.ts +0 -12
- package/types/flexbox/flexbox-utils.d.ts +0 -12
- package/types/flexbox/flexboxTypes.d.ts +0 -52
- package/types/flexbox/index.d.ts +0 -2
- package/types/flexbox/useSplitterResizing.d.ts +0 -2
- package/types/index.d.ts +0 -17
- package/types/layout-action.d.ts +0 -19
- package/types/layout-header/ActionButton.d.ts +0 -8
- package/types/layout-header/Header.d.ts +0 -15
- package/types/layout-header/index.d.ts +0 -1
- package/types/layout-header/useHeader.d.ts +0 -20
- package/types/layout-provider/LayoutProvider.d.ts +0 -20
- package/types/layout-provider/LayoutProviderContext.d.ts +0 -15
- package/types/layout-provider/index.d.ts +0 -2
- package/types/layout-provider/useLayoutDragDrop.d.ts +0 -4
- package/types/layout-reducer/flexUtils.d.ts +0 -22
- package/types/layout-reducer/index.d.ts +0 -4
- package/types/layout-reducer/insert-layout-element.d.ts +0 -8
- package/types/layout-reducer/layout-reducer.d.ts +0 -3
- package/types/layout-reducer/layoutTypes.d.ts +0 -135
- package/types/layout-reducer/layoutUtils.d.ts +0 -44
- package/types/layout-reducer/move-layout-element.d.ts +0 -3
- package/types/layout-reducer/remove-layout-element.d.ts +0 -3
- package/types/layout-reducer/replace-layout-element.d.ts +0 -6
- package/types/layout-reducer/resize-flex-children.d.ts +0 -4
- package/types/layout-reducer/wrap-layout-element.d.ts +0 -9
- package/types/layout-view/View.d.ts +0 -10
- package/types/layout-view/index.d.ts +0 -3
- package/types/layout-view/useView.d.ts +0 -22
- package/types/layout-view/useViewBroadcastChannel.d.ts +0 -7
- package/types/layout-view/useViewResize.d.ts +0 -7
- package/types/layout-view/viewTypes.d.ts +0 -48
- package/types/layout-view-actions/ViewContext.d.ts +0 -37
- package/types/layout-view-actions/index.d.ts +0 -2
- package/types/layout-view-actions/useViewActionDispatcher.d.ts +0 -4
- package/types/palette/Palette.d.ts +0 -24
- package/types/palette/index.d.ts +0 -1
- package/types/placeholder/LayoutStartPanel.d.ts +0 -5
- package/types/placeholder/Placeholder.d.ts +0 -16
- package/types/placeholder/index.d.ts +0 -1
- package/types/responsive/index.d.ts +0 -2
- package/types/responsive/measureMinimumNodeSize.d.ts +0 -1
- package/types/responsive/overflowUtils.d.ts +0 -2
- package/types/responsive/useResizeObserver.d.ts +0 -13
- package/types/responsive/utils.d.ts +0 -6
- package/types/stack/Stack.d.ts +0 -3
- package/types/stack/StackLayout.d.ts +0 -5
- package/types/stack/index.d.ts +0 -3
- package/types/stack/stackTypes.d.ts +0 -24
- package/types/tabs/TabPanel.d.ts +0 -7
- package/types/tabs/index.d.ts +0 -1
- package/types/tools/config-wrapper/ConfigWrapper.d.ts +0 -1
- package/types/tools/config-wrapper/index.d.ts +0 -1
- package/types/tools/devtools-box/layout-configurator.d.ts +0 -31
- package/types/tools/devtools-tree/layout-tree-viewer.d.ts +0 -5
- package/types/tools/index.d.ts +0 -3
- package/types/use-persistent-state.d.ts +0 -11
- package/types/utils/index.d.ts +0 -5
- package/types/utils/pathUtils.d.ts +0 -31
- package/types/utils/propUtils.d.ts +0 -5
- package/types/utils/refUtils.d.ts +0 -2
- package/types/utils/styleUtils.d.ts +0 -3
- package/types/utils/typeOf.d.ts +0 -5
package/package.json
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.13.
|
|
2
|
+
"version": "0.13.4",
|
|
3
3
|
"description": "VUU Layout Components",
|
|
4
4
|
"author": "heswell",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
|
-
"types": "
|
|
6
|
+
"types": "src/index.ts",
|
|
7
7
|
"devDependencies": {
|
|
8
|
-
"@vuu-ui/vuu-data-types": "0.13.
|
|
9
|
-
"@vuu-ui/vuu-filter-types": "0.13.
|
|
8
|
+
"@vuu-ui/vuu-data-types": "0.13.4",
|
|
9
|
+
"@vuu-ui/vuu-filter-types": "0.13.4"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@salt-ds/core": "1.43.0",
|
|
13
13
|
"@salt-ds/styles": "0.2.1",
|
|
14
14
|
"@salt-ds/window": "0.1.1",
|
|
15
|
-
"@vuu-ui/vuu-datatable": "0.13.
|
|
16
|
-
"@vuu-ui/vuu-filters": "0.13.
|
|
17
|
-
"@vuu-ui/vuu-popups": "0.13.
|
|
18
|
-
"@vuu-ui/vuu-table": "0.13.
|
|
19
|
-
"@vuu-ui/vuu-ui-controls": "0.13.
|
|
20
|
-
"@vuu-ui/vuu-utils": "0.13.
|
|
15
|
+
"@vuu-ui/vuu-datatable": "0.13.4",
|
|
16
|
+
"@vuu-ui/vuu-filters": "0.13.4",
|
|
17
|
+
"@vuu-ui/vuu-popups": "0.13.4",
|
|
18
|
+
"@vuu-ui/vuu-table": "0.13.4",
|
|
19
|
+
"@vuu-ui/vuu-ui-controls": "0.13.4",
|
|
20
|
+
"@vuu-ui/vuu-utils": "0.13.4"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
23
|
"clsx": "^2.0.0",
|
|
@@ -28,14 +28,12 @@
|
|
|
28
28
|
"files": [
|
|
29
29
|
"README.md",
|
|
30
30
|
"esm",
|
|
31
|
-
"cjs"
|
|
32
|
-
"/types"
|
|
31
|
+
"cjs"
|
|
33
32
|
],
|
|
34
33
|
"exports": {
|
|
35
34
|
".": {
|
|
36
35
|
"require": "./cjs/index.js",
|
|
37
|
-
"import": "./esm/index.js"
|
|
38
|
-
"types": "./types/index.d.ts"
|
|
36
|
+
"import": "./esm/index.js"
|
|
39
37
|
}
|
|
40
38
|
},
|
|
41
39
|
"main": "cjs/index.js",
|
package/types/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/debug.d.ts
DELETED
|
@@ -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 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
|
-
};
|
|
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: () => "north" | "south" | "east" | "west" | "header" | "centre" | "absolute";
|
|
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: () => "north" | "south" | "east" | "west" | "header" | "centre" | "absolute";
|
|
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: () => "north" | "south" | "east" | "west" | "header" | "centre" | "absolute";
|
|
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: () => "north" | "south" | "east" | "west" | "header" | "centre" | "absolute";
|
|
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: () => "north" | "south" | "east" | "west" | "header" | "centre" | "absolute";
|
|
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: () => "north" | "south" | "east" | "west" | "header" | "centre" | "absolute";
|
|
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: () => "north" | "south" | "east" | "west" | "header" | "centre" | "absolute";
|
|
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.NamedExoticComponent<SplitterProps>;
|
|
@@ -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/flexbox/index.d.ts
DELETED
package/types/index.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export * from "./dock-layout";
|
|
2
|
-
export { default as Component } from "./Component";
|
|
3
|
-
export * from "./drag-drop";
|
|
4
|
-
export * from "./LayoutContainer";
|
|
5
|
-
export * from "./flexbox";
|
|
6
|
-
export { Action } from "./layout-action";
|
|
7
|
-
export * from "./layout-header";
|
|
8
|
-
export * from "./layout-provider";
|
|
9
|
-
export * from "./layout-reducer";
|
|
10
|
-
export * from "./layout-view";
|
|
11
|
-
export * from "./layout-view-actions";
|
|
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";
|
package/types/layout-action.d.ts
DELETED
|
@@ -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-runtime").JSX.Element;
|
|
8
|
-
export default ActionButton;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { HTMLAttributes } from "react";
|
|
2
|
-
import { Contribution } from "../layout-view";
|
|
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-runtime").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
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { type LayoutJSON } from "@vuu-ui/vuu-utils";
|
|
2
|
-
import { type ReactElement } from "react";
|
|
3
|
-
import { type LayoutChangeHandler } from "../layout-reducer";
|
|
4
|
-
import { LayoutProviderDispatch } from "./LayoutProviderContext";
|
|
5
|
-
export interface LayoutProviderProps {
|
|
6
|
-
children: ReactElement;
|
|
7
|
-
createNewChild?: (index?: number) => ReactElement;
|
|
8
|
-
workspaceJSON?: LayoutJSON | LayoutJSON[];
|
|
9
|
-
onLayoutChange?: LayoutChangeHandler;
|
|
10
|
-
}
|
|
11
|
-
export declare const LayoutProviderVersion: () => import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
export declare const LayoutProvider: (props: LayoutProviderProps) => ReactElement;
|
|
13
|
-
export declare const useLayoutProviderDispatch: () => LayoutProviderDispatch;
|
|
14
|
-
export declare const useLayoutOperation: () => {
|
|
15
|
-
addComponentToWorkspace: (component: ReactElement) => void;
|
|
16
|
-
showComponentInContextPanel: (component: ReactElement | LayoutJSON, title?: string, onContextPanelClose?: () => void) => void;
|
|
17
|
-
switchWorkspace: (idx: number) => void;
|
|
18
|
-
};
|
|
19
|
-
export declare const useLayoutCreateNewChild: () => (index?: number) => ReactElement;
|
|
20
|
-
export declare const useLayoutProviderVersion: () => number;
|