@vuu-ui/vuu-layout 3.3.9 → 3.3.11

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 (78) hide show
  1. package/package.json +10 -10
  2. package/types/src/Component.d.ts +6 -0
  3. package/types/src/LayoutContainer.d.ts +6 -0
  4. package/types/src/debug.d.ts +2 -0
  5. package/types/src/dock-layout/DockLayout.d.ts +7 -0
  6. package/types/src/dock-layout/Drawer.d.ts +17 -0
  7. package/types/src/dock-layout/index.d.ts +2 -0
  8. package/types/src/drag-drop/BoxModel.d.ts +143 -0
  9. package/types/src/drag-drop/DragState.d.ts +46 -0
  10. package/types/src/drag-drop/Draggable.d.ts +24 -0
  11. package/types/src/drag-drop/DropTarget.d.ts +60 -0
  12. package/types/src/drag-drop/DropTargetRenderer.d.ts +17 -0
  13. package/types/src/drag-drop/dragDropTypes.d.ts +51 -0
  14. package/types/src/drag-drop/index.d.ts +3 -0
  15. package/types/src/flexbox/Flexbox.d.ts +3 -0
  16. package/types/src/flexbox/FlexboxLayout.d.ts +5 -0
  17. package/types/src/flexbox/Splitter.d.ts +12 -0
  18. package/types/src/flexbox/flexbox-utils.d.ts +12 -0
  19. package/types/src/flexbox/flexboxTypes.d.ts +52 -0
  20. package/types/src/flexbox/index.d.ts +2 -0
  21. package/types/src/flexbox/useSplitterResizing.d.ts +2 -0
  22. package/types/src/index.d.ts +20 -0
  23. package/types/src/layout-action.d.ts +19 -0
  24. package/types/src/layout-header/ActionButton.d.ts +8 -0
  25. package/types/src/layout-header/Header.d.ts +15 -0
  26. package/types/src/layout-header/index.d.ts +1 -0
  27. package/types/src/layout-header/useHeader.d.ts +20 -0
  28. package/types/src/layout-provider/LayoutProvider.d.ts +20 -0
  29. package/types/src/layout-provider/LayoutProviderContext.d.ts +15 -0
  30. package/types/src/layout-provider/index.d.ts +2 -0
  31. package/types/src/layout-provider/useLayoutDragDrop.d.ts +4 -0
  32. package/types/src/layout-reducer/flexUtils.d.ts +22 -0
  33. package/types/src/layout-reducer/index.d.ts +4 -0
  34. package/types/src/layout-reducer/insert-layout-element.d.ts +8 -0
  35. package/types/src/layout-reducer/layout-reducer.d.ts +3 -0
  36. package/types/src/layout-reducer/layoutTypes.d.ts +135 -0
  37. package/types/src/layout-reducer/layoutUtils.d.ts +44 -0
  38. package/types/src/layout-reducer/move-layout-element.d.ts +3 -0
  39. package/types/src/layout-reducer/remove-layout-element.d.ts +3 -0
  40. package/types/src/layout-reducer/replace-layout-element.d.ts +6 -0
  41. package/types/src/layout-reducer/resize-flex-children.d.ts +4 -0
  42. package/types/src/layout-reducer/wrap-layout-element.d.ts +9 -0
  43. package/types/src/layout-view/View.d.ts +10 -0
  44. package/types/src/layout-view/useView.d.ts +20 -0
  45. package/types/src/layout-view/useViewBroadcastChannel.d.ts +7 -0
  46. package/types/src/layout-view/useViewResize.d.ts +7 -0
  47. package/types/src/layout-view/viewTypes.d.ts +48 -0
  48. package/types/src/layout-view-actions/ViewContext.d.ts +35 -0
  49. package/types/src/layout-view-actions/useViewActionDispatcher.d.ts +4 -0
  50. package/types/src/layout-view-actions/useViewContributions.d.ts +9 -0
  51. package/types/src/palette/Palette.d.ts +21 -0
  52. package/types/src/palette/index.d.ts +1 -0
  53. package/types/src/placeholder/LayoutStartPanel.d.ts +5 -0
  54. package/types/src/placeholder/Placeholder.d.ts +16 -0
  55. package/types/src/placeholder/index.d.ts +1 -0
  56. package/types/src/responsive/index.d.ts +2 -0
  57. package/types/src/responsive/measureMinimumNodeSize.d.ts +1 -0
  58. package/types/src/responsive/overflowUtils.d.ts +2 -0
  59. package/types/src/responsive/useResizeObserver.d.ts +13 -0
  60. package/types/src/responsive/utils.d.ts +6 -0
  61. package/types/src/stack/Stack.d.ts +3 -0
  62. package/types/src/stack/StackLayout.d.ts +6 -0
  63. package/types/src/stack/index.d.ts +3 -0
  64. package/types/src/stack/stackTypes.d.ts +24 -0
  65. package/types/src/tabs/TabPanel.d.ts +7 -0
  66. package/types/src/tabs/index.d.ts +1 -0
  67. package/types/src/tools/config-wrapper/ConfigWrapper.d.ts +2 -0
  68. package/types/src/tools/config-wrapper/index.d.ts +1 -0
  69. package/types/src/tools/devtools-box/layout-configurator.d.ts +31 -0
  70. package/types/src/tools/devtools-tree/layout-tree-viewer.d.ts +6 -0
  71. package/types/src/tools/index.d.ts +3 -0
  72. package/types/src/use-persistent-state.d.ts +8 -0
  73. package/types/src/utils/index.d.ts +5 -0
  74. package/types/src/utils/pathUtils.d.ts +31 -0
  75. package/types/src/utils/propUtils.d.ts +5 -0
  76. package/types/src/utils/refUtils.d.ts +2 -0
  77. package/types/src/utils/styleUtils.d.ts +3 -0
  78. package/types/src/utils/typeOf.d.ts +5 -0
@@ -0,0 +1,8 @@
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
+ };
@@ -0,0 +1,5 @@
1
+ export * from "./pathUtils";
2
+ export * from "./propUtils";
3
+ export * from "./refUtils";
4
+ export * from "./styleUtils";
5
+ export * from "./typeOf";
@@ -0,0 +1,31 @@
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 {};
@@ -0,0 +1,5 @@
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;
@@ -0,0 +1,2 @@
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;
@@ -0,0 +1,3 @@
1
+ import { CSSProperties } from 'react';
2
+ export type CSSFlexProperties = Pick<CSSProperties, 'flexBasis' | 'flexGrow' | 'flexShrink'>;
3
+ export declare const expandFlex: (flex: number | CSSFlexProperties) => CSSFlexProperties;
@@ -0,0 +1,5 @@
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;