@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.
Files changed (97) hide show
  1. package/README.md +18 -1
  2. package/package.json +13 -13
  3. package/src/placeholder/LayoutStartPanel.css.js +1 -1
  4. package/types/dock-layout/DockLayout.d.ts +1 -1
  5. package/types/dock-layout/Drawer.d.ts +1 -1
  6. package/types/flexbox/Flexbox.d.ts +4 -0
  7. package/types/flexbox/FlexboxLayout.d.ts +1 -1
  8. package/types/flexbox/Splitter.d.ts +1 -1
  9. package/types/layout-header/ActionButton.d.ts +1 -1
  10. package/types/layout-header/Header.d.ts +1 -1
  11. package/types/layout-provider/LayoutProvider.d.ts +1 -1
  12. package/types/palette/Palette.d.ts +2 -2
  13. package/types/placeholder/LayoutStartPanel.d.ts +1 -1
  14. package/types/placeholder/Placeholder.d.ts +1 -1
  15. package/types/responsive/overflowUtils.d.ts +2 -2
  16. package/types/stack/StackLayout.d.ts +1 -2
  17. package/types/tabs/TabPanel.d.ts +1 -1
  18. package/types/tools/config-wrapper/ConfigWrapper.d.ts +1 -2
  19. package/types/tools/devtools-box/layout-configurator.d.ts +1 -1
  20. package/types/tools/devtools-tree/layout-tree-viewer.d.ts +1 -2
  21. package/types/src/Component.d.ts +0 -6
  22. package/types/src/LayoutContainer.d.ts +0 -6
  23. package/types/src/debug.d.ts +0 -2
  24. package/types/src/dock-layout/DockLayout.d.ts +0 -7
  25. package/types/src/dock-layout/Drawer.d.ts +0 -17
  26. package/types/src/dock-layout/index.d.ts +0 -2
  27. package/types/src/drag-drop/BoxModel.d.ts +0 -143
  28. package/types/src/drag-drop/DragState.d.ts +0 -46
  29. package/types/src/drag-drop/Draggable.d.ts +0 -24
  30. package/types/src/drag-drop/DropTarget.d.ts +0 -60
  31. package/types/src/drag-drop/DropTargetRenderer.d.ts +0 -17
  32. package/types/src/drag-drop/dragDropTypes.d.ts +0 -51
  33. package/types/src/drag-drop/index.d.ts +0 -3
  34. package/types/src/flexbox/Flexbox.d.ts +0 -3
  35. package/types/src/flexbox/FlexboxLayout.d.ts +0 -5
  36. package/types/src/flexbox/Splitter.d.ts +0 -12
  37. package/types/src/flexbox/flexbox-utils.d.ts +0 -12
  38. package/types/src/flexbox/flexboxTypes.d.ts +0 -52
  39. package/types/src/flexbox/index.d.ts +0 -2
  40. package/types/src/flexbox/useSplitterResizing.d.ts +0 -2
  41. package/types/src/index.d.ts +0 -20
  42. package/types/src/layout-action.d.ts +0 -19
  43. package/types/src/layout-header/ActionButton.d.ts +0 -8
  44. package/types/src/layout-header/Header.d.ts +0 -15
  45. package/types/src/layout-header/index.d.ts +0 -1
  46. package/types/src/layout-header/useHeader.d.ts +0 -20
  47. package/types/src/layout-provider/LayoutProvider.d.ts +0 -20
  48. package/types/src/layout-provider/LayoutProviderContext.d.ts +0 -15
  49. package/types/src/layout-provider/index.d.ts +0 -2
  50. package/types/src/layout-provider/useLayoutDragDrop.d.ts +0 -4
  51. package/types/src/layout-reducer/flexUtils.d.ts +0 -22
  52. package/types/src/layout-reducer/index.d.ts +0 -4
  53. package/types/src/layout-reducer/insert-layout-element.d.ts +0 -8
  54. package/types/src/layout-reducer/layout-reducer.d.ts +0 -3
  55. package/types/src/layout-reducer/layoutTypes.d.ts +0 -135
  56. package/types/src/layout-reducer/layoutUtils.d.ts +0 -44
  57. package/types/src/layout-reducer/move-layout-element.d.ts +0 -3
  58. package/types/src/layout-reducer/remove-layout-element.d.ts +0 -3
  59. package/types/src/layout-reducer/replace-layout-element.d.ts +0 -6
  60. package/types/src/layout-reducer/resize-flex-children.d.ts +0 -4
  61. package/types/src/layout-reducer/wrap-layout-element.d.ts +0 -9
  62. package/types/src/layout-view/View.d.ts +0 -10
  63. package/types/src/layout-view/useView.d.ts +0 -20
  64. package/types/src/layout-view/useViewBroadcastChannel.d.ts +0 -7
  65. package/types/src/layout-view/useViewResize.d.ts +0 -7
  66. package/types/src/layout-view/viewTypes.d.ts +0 -48
  67. package/types/src/layout-view-actions/ViewContext.d.ts +0 -35
  68. package/types/src/layout-view-actions/useViewActionDispatcher.d.ts +0 -4
  69. package/types/src/layout-view-actions/useViewContributions.d.ts +0 -9
  70. package/types/src/palette/Palette.d.ts +0 -21
  71. package/types/src/palette/index.d.ts +0 -1
  72. package/types/src/placeholder/LayoutStartPanel.d.ts +0 -5
  73. package/types/src/placeholder/Placeholder.d.ts +0 -16
  74. package/types/src/placeholder/index.d.ts +0 -1
  75. package/types/src/responsive/index.d.ts +0 -2
  76. package/types/src/responsive/measureMinimumNodeSize.d.ts +0 -1
  77. package/types/src/responsive/overflowUtils.d.ts +0 -2
  78. package/types/src/responsive/useResizeObserver.d.ts +0 -13
  79. package/types/src/responsive/utils.d.ts +0 -6
  80. package/types/src/stack/Stack.d.ts +0 -3
  81. package/types/src/stack/StackLayout.d.ts +0 -6
  82. package/types/src/stack/index.d.ts +0 -3
  83. package/types/src/stack/stackTypes.d.ts +0 -24
  84. package/types/src/tabs/TabPanel.d.ts +0 -7
  85. package/types/src/tabs/index.d.ts +0 -1
  86. package/types/src/tools/config-wrapper/ConfigWrapper.d.ts +0 -2
  87. package/types/src/tools/config-wrapper/index.d.ts +0 -1
  88. package/types/src/tools/devtools-box/layout-configurator.d.ts +0 -31
  89. package/types/src/tools/devtools-tree/layout-tree-viewer.d.ts +0 -6
  90. package/types/src/tools/index.d.ts +0 -3
  91. package/types/src/use-persistent-state.d.ts +0 -8
  92. package/types/src/utils/index.d.ts +0 -5
  93. package/types/src/utils/pathUtils.d.ts +0 -31
  94. package/types/src/utils/propUtils.d.ts +0 -5
  95. package/types/src/utils/refUtils.d.ts +0 -2
  96. package/types/src/utils/styleUtils.d.ts +0 -3
  97. package/types/src/utils/typeOf.d.ts +0 -5
@@ -1,21 +0,0 @@
1
- import { ListBoxProps, OptionProps } from "@salt-ds/core";
2
- import { HTMLAttributes, ReactElement } from "react";
3
- import type { ViewProps } from "../layout-view/viewTypes";
4
- export interface PaletteItemProps extends OptionProps {
5
- /**
6
- * This is the payload that will be created when the
7
- * palette item is dropped
8
- */
9
- ViewProps?: Pick<ViewProps, "allowRename" | "closeable" | "header" | "resizeable" | "resize" | "title">;
10
- component: ReactElement;
11
- idx?: number;
12
- }
13
- export declare const PaletteItem: import("react").MemoExoticComponent<({ className, component, idx, key, value, ViewProps, ...props }: PaletteItemProps) => import("react").JSX.Element>;
14
- export interface PaletteProps extends Omit<HTMLAttributes<HTMLDivElement>, "onDragStart" | "onDrop" | "onSelect"> {
15
- ListBoxProps?: Partial<ListBoxProps>;
16
- ViewProps?: Partial<ViewProps>;
17
- children: ReactElement[];
18
- orientation: "horizontal" | "vertical";
19
- selection?: string;
20
- }
21
- export declare const Palette: ({ ListBoxProps, ViewProps, children, className, orientation, ...props }: PaletteProps) => import("react").JSX.Element;
@@ -1 +0,0 @@
1
- export * from "./Palette";
@@ -1,5 +0,0 @@
1
- import { HTMLAttributes } from "react";
2
- export interface LayoutStartPanelProps extends HTMLAttributes<HTMLDivElement> {
3
- label?: string;
4
- }
5
- export declare const LayoutStartPanel: (htmlAttributes: LayoutStartPanelProps) => import("react").JSX.Element | null;
@@ -1,16 +0,0 @@
1
- import type { ViewProps } from "../layout-view/viewTypes";
2
- export interface PlaceholderProps extends ViewProps {
3
- closeable?: boolean;
4
- flexFill?: boolean;
5
- resizeable?: boolean;
6
- showStartMenu?: boolean;
7
- /**
8
- * shim is only when we're dealing with intrinsically sized children, which is never
9
- * in an actual application. Intrinsic sizing is still experimental.
10
- */
11
- shim?: boolean;
12
- }
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 +0,0 @@
1
- export * from './Placeholder';
@@ -1,2 +0,0 @@
1
- export * from "./useResizeObserver";
2
- export * from "./utils";
@@ -1 +0,0 @@
1
- export declare function measureMinimumNodeSize(node: HTMLElement, dimension?: 'width' | 'height'): number;
@@ -1,2 +0,0 @@
1
- export declare const getOverflowedItems: (containerRef: any, height?: number) => any[][];
2
- export declare const findFirstOverflow: (elements: any, height: any) => number;
@@ -1,13 +0,0 @@
1
- import { RefObject } from "react";
2
- export declare const WidthHeight: string[];
3
- export declare const HeightOnly: string[];
4
- export declare const WidthOnly: string[];
5
- export type measurements<T = string | number> = {
6
- height?: T;
7
- scrollHeight?: T;
8
- scrollWidth?: T;
9
- width?: T;
10
- };
11
- export type ResizeHandler = (measurements: measurements<number>) => void;
12
- export declare const resizeObserver: ResizeObserver;
13
- export declare function useResizeObserver(ref: RefObject<Element | HTMLElement | null>, dimensions: string[], onResize: ResizeHandler, reportInitialSize?: boolean): void;
@@ -1,6 +0,0 @@
1
- export declare const isResponsiveAttribute: (propName: string) => boolean;
2
- type Props = {
3
- [key: string]: any;
4
- };
5
- export declare const extractResponsiveProps: (props: Props) => [Props, Props];
6
- export {};
@@ -1,3 +0,0 @@
1
- import React from "react";
2
- import { StackProps } from "./stackTypes";
3
- export declare const Stack: React.ForwardRefExoticComponent<StackProps & React.RefAttributes<HTMLDivElement>>;
@@ -1,6 +0,0 @@
1
- import React from "react";
2
- import { StackProps } from "./stackTypes";
3
- export declare function StackLayout(props: StackProps): React.JSX.Element;
4
- export declare namespace StackLayout {
5
- var displayName: string;
6
- }
@@ -1,3 +0,0 @@
1
- export * from "./Stack";
2
- export * from "./StackLayout";
3
- export * from "./stackTypes";
@@ -1,24 +0,0 @@
1
- import { TabstripProps } from "@vuu-ui/vuu-ui-controls";
2
- import { HTMLAttributes, MouseEvent, ReactElement, ReactNode } from "react";
3
- export type TabLabelFactory = (component: ReactElement, index: number, existingLabels: string[]) => string;
4
- export interface SerializableStackProps {
5
- active?: number;
6
- /** should the Stack display a Tabstrip and where ? default top */
7
- showTabs?: false | TabPosition;
8
- }
9
- export type TabPosition = "top" | "left" | "right" | "bottom";
10
- export interface StackProps extends SerializableStackProps, Omit<HTMLAttributes<HTMLDivElement>, "onMouseDown"> {
11
- TabstripProps?: Partial<TabstripProps>;
12
- createNewChild?: (index: number) => ReactElement;
13
- getTabIcon?: (component: ReactElement, index: number) => string | undefined;
14
- getTabLabel?: TabLabelFactory;
15
- keyBoardActivation?: "automatic" | "manual";
16
- onAddTab?: () => void;
17
- onMoveTab?: (fromIndex: number, toIndex: number) => void;
18
- onMouseDown?: (e: MouseEvent, tabIndex: number) => void;
19
- onTabClose?: (tabIndex: number) => void;
20
- onTabEdit?: (tabIndex: number, label: string) => void;
21
- onTabSelectionChanged?: (nextIndex: number) => void;
22
- path?: string;
23
- toolbarContent?: ReactNode;
24
- }
@@ -1,7 +0,0 @@
1
- import { HTMLAttributes } from 'react';
2
- import './TabPanel.css';
3
- export interface TabPanelProps extends HTMLAttributes<HTMLDivElement> {
4
- ariaLabelledBy: string;
5
- }
6
- declare const TabPanel: ({ ariaLabelledBy, children, id }: TabPanelProps) => import("react").JSX.Element;
7
- export default TabPanel;
@@ -1 +0,0 @@
1
- export { default as TabPanel } from './TabPanel';
@@ -1,2 +0,0 @@
1
- import React from "react";
2
- export declare const ConfigWrapper: ({ children }: any) => React.JSX.Element;
@@ -1 +0,0 @@
1
- export * from './ConfigWrapper';
@@ -1,31 +0,0 @@
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, }: {
25
- height: any;
26
- managedStyle: any;
27
- onChange: any;
28
- style: any;
29
- width: any;
30
- }) => import("react").JSX.Element;
31
- export declare function XXXnormalizeStyles(layoutStyle?: {}, visualStyle?: {}): {};
@@ -1,6 +0,0 @@
1
- import React from "react";
2
- export declare const LayoutTreeViewer: ({ layout, onSelect: _, style }: {
3
- layout: any;
4
- onSelect: any;
5
- style: any;
6
- }) => React.JSX.Element;
@@ -1,3 +0,0 @@
1
- export * from './config-wrapper';
2
- export * from './devtools-box/layout-configurator';
3
- export * from './devtools-tree/layout-tree-viewer';
@@ -1,8 +0,0 @@
1
- export declare const getPersistentState: (id: string) => any;
2
- export declare const hasPersistentState: (id: string) => boolean;
3
- export declare const setPersistentState: (id: string, value: any) => Map<string, any>;
4
- export declare const usePersistentState: () => {
5
- loadState: (id: string, key?: string) => any;
6
- saveState: (id: string, key: string | undefined, data: unknown) => void;
7
- purgeState: (id: string, key?: string) => void;
8
- };
@@ -1,5 +0,0 @@
1
- export * from "./pathUtils";
2
- export * from "./propUtils";
3
- export * from "./refUtils";
4
- export * from "./styleUtils";
5
- export * from "./typeOf";
@@ -1,31 +0,0 @@
1
- import { LayoutJSON, LayoutModel } from "@vuu-ui/vuu-utils";
2
- import React, { ReactElement } from "react";
3
- /**
4
- * This is a very specific function at the moment. It resolves a path of the form
5
- * '#{componentid}.ACTIVE_CHILD'
6
- * It allows a templated path to be resolved to a concrete path at runtime.
7
- * The above pattern is used to identify a layout drop target. Further patterns
8
- * will be added if needed.
9
- */
10
- export declare const resolvePath: (source: ReactElement, path?: string) => string;
11
- /**
12
- * Similar to resolvePath but operates on a JSON
13
- * layout structure and returns the matching JSON node.
14
- */
15
- export declare const resolveJSONPath: (source: LayoutJSON, path?: string) => LayoutJSON | undefined;
16
- export declare function followPathToParent(source: ReactElement, path: string): ReactElement | null;
17
- export declare function findTarget(source: LayoutModel | undefined, test: (props: any) => boolean): LayoutModel | undefined;
18
- export declare function containerOf(source: LayoutModel, target: LayoutModel): LayoutModel | null;
19
- export declare const getChild: (children: ReactElement[], idx: number) => ReactElement | undefined;
20
- export declare function followPathToComponent(component: ReactElement, path: string): ReactElement<unknown, string | React.JSXElementConstructor<any>> | undefined;
21
- export declare function followPath(source: LayoutModel, path: string): LayoutModel | undefined;
22
- export declare function followPath(source: ReactElement, path: string, throwIfNotFound: true): ReactElement;
23
- export declare function nextLeaf(root: ReactElement, path: string): any;
24
- export declare function previousLeaf(root: ReactElement, path: string): any;
25
- type NextStepResult = {
26
- idx: number;
27
- finalStep: boolean;
28
- };
29
- export declare function nextStep(pathSoFar: string, targetPath: string, followPathToEnd?: boolean): NextStepResult;
30
- export declare function resetPath(model: ReactElement, path: string, additionalProps?: any): ReactElement;
31
- export {};
@@ -1,5 +0,0 @@
1
- import { ReactElement } from "react";
2
- import { LayoutModel } from "@vuu-ui/vuu-utils";
3
- export declare const getProp: (component: LayoutModel | undefined, propName: string) => any;
4
- export declare const getProps: (component?: LayoutModel) => any;
5
- export declare const getChildProp: (container: LayoutModel) => ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | undefined;
@@ -1,2 +0,0 @@
1
- import { MutableRefObject } from "react";
2
- export declare function setRef<T>(ref: MutableRefObject<T | null> | ((instance: T | null) => void) | null | undefined, value: T | null): void;
@@ -1,3 +0,0 @@
1
- import { CSSProperties } from 'react';
2
- export type CSSFlexProperties = Pick<CSSProperties, 'flexBasis' | 'flexGrow' | 'flexShrink'>;
3
- export declare const expandFlex: (flex: number | CSSFlexProperties) => CSSFlexProperties;
@@ -1,5 +0,0 @@
1
- import { LayoutJSON, LayoutModel, WithType } from "@vuu-ui/vuu-utils";
2
- import { ReactElement } from "react";
3
- export declare function typeOf(element?: LayoutModel | WithType): string | undefined;
4
- export declare const isTypeOf: (element: ReactElement, type: string) => boolean;
5
- export declare const isLayoutJSON: (layout: LayoutJSON) => layout is LayoutJSON;