@vuu-ui/vuu-layout 4.0.0-alpha.20 → 4.0.0-alpha.22
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 +13 -13
- package/src/placeholder/LayoutStartPanel.css.js +1 -1
- package/types/dock-layout/DockLayout.d.ts +1 -1
- package/types/dock-layout/Drawer.d.ts +1 -1
- package/types/flexbox/Flexbox.d.ts +4 -0
- package/types/flexbox/FlexboxLayout.d.ts +1 -1
- package/types/flexbox/Splitter.d.ts +1 -1
- package/types/layout-header/ActionButton.d.ts +1 -1
- package/types/layout-header/Header.d.ts +1 -1
- package/types/layout-provider/LayoutProvider.d.ts +1 -1
- package/types/palette/Palette.d.ts +2 -2
- package/types/placeholder/LayoutStartPanel.d.ts +1 -1
- package/types/placeholder/Placeholder.d.ts +1 -1
- package/types/responsive/overflowUtils.d.ts +2 -2
- package/types/stack/StackLayout.d.ts +1 -2
- package/types/tabs/TabPanel.d.ts +1 -1
- package/types/tools/config-wrapper/ConfigWrapper.d.ts +1 -2
- package/types/tools/devtools-box/layout-configurator.d.ts +1 -1
- package/types/tools/devtools-tree/layout-tree-viewer.d.ts +1 -2
- 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": "4.0.0-alpha.
|
|
2
|
+
"version": "4.0.0-alpha.22",
|
|
3
3
|
"description": "VUU Layout Components",
|
|
4
4
|
"main": "./src/index.js",
|
|
5
5
|
"type": "module",
|
|
@@ -12,20 +12,20 @@
|
|
|
12
12
|
},
|
|
13
13
|
"types": "types/index.d.ts",
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"@vuu-ui/vuu-data-types": "4.0.0-alpha.
|
|
16
|
-
"@vuu-ui/vuu-filter-types": "4.0.0-alpha.
|
|
15
|
+
"@vuu-ui/vuu-data-types": "4.0.0-alpha.22",
|
|
16
|
+
"@vuu-ui/vuu-filter-types": "4.0.0-alpha.22"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@salt-ds/core": "1.
|
|
20
|
-
"@salt-ds/styles": "0.
|
|
21
|
-
"@salt-ds/window": "0.1.
|
|
22
|
-
"@vuu-ui/vuu-data-react": "4.0.0-alpha.
|
|
23
|
-
"@vuu-ui/vuu-datatable": "4.0.0-alpha.
|
|
24
|
-
"@vuu-ui/vuu-filters": "4.0.0-alpha.
|
|
25
|
-
"@vuu-ui/vuu-popups": "4.0.0-alpha.
|
|
26
|
-
"@vuu-ui/vuu-table": "4.0.0-alpha.
|
|
27
|
-
"@vuu-ui/vuu-ui-controls": "4.0.0-alpha.
|
|
28
|
-
"@vuu-ui/vuu-utils": "4.0.0-alpha.
|
|
19
|
+
"@salt-ds/core": "1.72.0",
|
|
20
|
+
"@salt-ds/styles": "0.4.1",
|
|
21
|
+
"@salt-ds/window": "0.1.2",
|
|
22
|
+
"@vuu-ui/vuu-data-react": "4.0.0-alpha.22",
|
|
23
|
+
"@vuu-ui/vuu-datatable": "4.0.0-alpha.22",
|
|
24
|
+
"@vuu-ui/vuu-filters": "4.0.0-alpha.22",
|
|
25
|
+
"@vuu-ui/vuu-popups": "4.0.0-alpha.22",
|
|
26
|
+
"@vuu-ui/vuu-table": "4.0.0-alpha.22",
|
|
27
|
+
"@vuu-ui/vuu-ui-controls": "4.0.0-alpha.22",
|
|
28
|
+
"@vuu-ui/vuu-utils": "4.0.0-alpha.22"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
31
|
"clsx": "^2.0.0",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTMLAttributes } from "react";
|
|
2
2
|
export type DockLayoutProps = HTMLAttributes<HTMLDivElement>;
|
|
3
|
-
declare function DockLayout(props: DockLayoutProps): import("react").JSX.Element;
|
|
3
|
+
declare function DockLayout(props: DockLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
declare namespace DockLayout {
|
|
5
5
|
var displayName: string;
|
|
6
6
|
}
|
|
@@ -10,7 +10,7 @@ export interface DrawerProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
10
10
|
sizeClosed?: number;
|
|
11
11
|
toggleButton?: "start" | "end";
|
|
12
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;
|
|
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-runtime").JSX.Element;
|
|
14
14
|
declare namespace Drawer {
|
|
15
15
|
var displayName: string;
|
|
16
16
|
}
|
|
@@ -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;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FlexboxLayoutProps } from "./flexboxTypes";
|
|
2
|
-
export declare function FlexboxLayout(props: FlexboxLayoutProps): import("react").JSX.Element;
|
|
2
|
+
export declare function FlexboxLayout(props: FlexboxLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export declare namespace FlexboxLayout {
|
|
4
4
|
var displayName: string;
|
|
5
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.MemoExoticComponent<({ column, index, onDrag, onDragEnd, onDragStart, style, }: SplitterProps) =>
|
|
12
|
+
export declare const Splitter: React.MemoExoticComponent<({ column, index, onDrag, onDragEnd, onDragStart, style, }: SplitterProps) => import("react/jsx-runtime").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.Element;
|
|
7
|
+
declare const ActionButton: ({ actionId, className, iconName, onClick, ...props }: ActionButtonProps) => import("react/jsx-runtime").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.Element;
|
|
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;
|
|
@@ -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.Element;
|
|
11
|
+
export declare const LayoutProviderVersion: () => import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
export declare const LayoutProvider: (props: LayoutProviderProps) => ReactElement;
|
|
13
13
|
export declare const useLayoutProviderDispatch: () => LayoutProviderDispatch;
|
|
14
14
|
export declare const useLayoutOperation: () => {
|
|
@@ -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.Element>;
|
|
13
|
+
export declare const PaletteItem: import("react").MemoExoticComponent<({ className, component, idx, key, value, ViewProps, ...props }: PaletteItemProps) => import("react/jsx-runtime").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.Element;
|
|
21
|
+
export declare const Palette: ({ ListBoxProps, ViewProps, children, className, orientation, ...props }: PaletteProps) => import("react/jsx-runtime").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.Element | null;
|
|
5
|
+
export declare const LayoutStartPanel: (htmlAttributes: LayoutStartPanelProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -10,7 +10,7 @@ export interface PlaceholderProps extends ViewProps {
|
|
|
10
10
|
*/
|
|
11
11
|
shim?: boolean;
|
|
12
12
|
}
|
|
13
|
-
export declare function Placeholder({ className: classNameProp, showStartMenu, ...viewProps }: PlaceholderProps): import("react").JSX.Element;
|
|
13
|
+
export declare function Placeholder({ className: classNameProp, showStartMenu, ...viewProps }: PlaceholderProps): import("react/jsx-runtime").JSX.Element;
|
|
14
14
|
export declare namespace Placeholder {
|
|
15
15
|
var displayName: string;
|
|
16
16
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export declare const getOverflowedItems: (containerRef: any, height?: number) => any[][];
|
|
2
|
+
export declare const findFirstOverflow: (elements: any, height: any) => number;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import { StackProps } from "./stackTypes";
|
|
3
|
-
export declare function StackLayout(props: StackProps):
|
|
2
|
+
export declare function StackLayout(props: StackProps): import("react/jsx-runtime").JSX.Element;
|
|
4
3
|
export declare namespace StackLayout {
|
|
5
4
|
var displayName: string;
|
|
6
5
|
}
|
package/types/tabs/TabPanel.d.ts
CHANGED
|
@@ -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.Element;
|
|
6
|
+
declare const TabPanel: ({ ariaLabelledBy, children, id }: TabPanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export default TabPanel;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const ConfigWrapper: ({ children }: any) => React.JSX.Element;
|
|
1
|
+
export declare const ConfigWrapper: ({ children }: any) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -27,5 +27,5 @@ export declare const LayoutConfigurator: ({ height, managedStyle, onChange, styl
|
|
|
27
27
|
onChange: any;
|
|
28
28
|
style: any;
|
|
29
29
|
width: any;
|
|
30
|
-
}) => import("react").JSX.Element;
|
|
30
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
31
31
|
export declare function XXXnormalizeStyles(layoutStyle?: {}, visualStyle?: {}): {};
|
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>;
|