@vuu-ui/vuu-shell 0.8.75 → 0.8.76

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 (229) hide show
  1. package/cjs/app-header/AppHeader.js +2 -1
  2. package/cjs/app-header/AppHeader.js.map +1 -1
  3. package/cjs/application-provider/ApplicationProvider.js +5 -1
  4. package/cjs/application-provider/ApplicationProvider.js.map +1 -1
  5. package/cjs/index.js +13 -12
  6. package/cjs/index.js.map +1 -1
  7. package/cjs/layout-management/LayoutList.js +2 -2
  8. package/cjs/layout-management/LayoutList.js.map +1 -1
  9. package/cjs/layout-management/{useLayoutManager.js → LayoutManagementProvider.js} +46 -19
  10. package/cjs/layout-management/LayoutManagementProvider.js.map +1 -0
  11. package/cjs/layout-management/defaultWorkspaceJSON.js +75 -0
  12. package/cjs/layout-management/defaultWorkspaceJSON.js.map +1 -0
  13. package/cjs/layout-management/useLayoutContextMenuItems.js +3 -3
  14. package/cjs/layout-management/useLayoutContextMenuItems.js.map +1 -1
  15. package/cjs/left-nav/LeftNav.js +2 -1
  16. package/cjs/left-nav/LeftNav.js.map +1 -1
  17. package/cjs/persistence-manager/RemotePersistenceManager.js +1 -1
  18. package/cjs/persistence-manager/RemotePersistenceManager.js.map +1 -1
  19. package/cjs/{shell-layouts → shell-layout-templates}/context-panel/ContextPanel.js +4 -2
  20. package/cjs/shell-layout-templates/context-panel/ContextPanel.js.map +1 -0
  21. package/cjs/{shell-layouts → shell-layout-templates/full-height-left-panel}/useFullHeightLeftPanel.js +12 -12
  22. package/cjs/shell-layout-templates/full-height-left-panel/useFullHeightLeftPanel.js.map +1 -0
  23. package/cjs/{shell-layouts → shell-layout-templates/inlay-left-panel}/useInlayLeftPanel.js +10 -4
  24. package/cjs/shell-layout-templates/inlay-left-panel/useInlayLeftPanel.js.map +1 -0
  25. package/cjs/shell-layout-templates/side-panel/SidePanel.js.map +1 -0
  26. package/cjs/shell-layout-templates/simple-content-pane/useSimpleContentPane.js +46 -0
  27. package/cjs/shell-layout-templates/simple-content-pane/useSimpleContentPane.js.map +1 -0
  28. package/cjs/shell-layout-templates/useShellLayout.js +21 -0
  29. package/cjs/shell-layout-templates/useShellLayout.js.map +1 -0
  30. package/cjs/shell.css.js +1 -1
  31. package/cjs/shell.js +46 -37
  32. package/cjs/shell.js.map +1 -1
  33. package/esm/app-header/AppHeader.js +2 -1
  34. package/esm/app-header/AppHeader.js.map +1 -1
  35. package/esm/application-provider/ApplicationProvider.js +5 -1
  36. package/esm/application-provider/ApplicationProvider.js.map +1 -1
  37. package/esm/index.js +5 -4
  38. package/esm/index.js.map +1 -1
  39. package/esm/layout-management/LayoutList.js +1 -1
  40. package/esm/layout-management/LayoutList.js.map +1 -1
  41. package/esm/layout-management/{useLayoutManager.js → LayoutManagementProvider.js} +46 -19
  42. package/esm/layout-management/LayoutManagementProvider.js.map +1 -0
  43. package/esm/layout-management/defaultWorkspaceJSON.js +70 -0
  44. package/esm/layout-management/defaultWorkspaceJSON.js.map +1 -0
  45. package/esm/layout-management/useLayoutContextMenuItems.js +2 -2
  46. package/esm/layout-management/useLayoutContextMenuItems.js.map +1 -1
  47. package/esm/left-nav/LeftNav.js +2 -1
  48. package/esm/left-nav/LeftNav.js.map +1 -1
  49. package/esm/persistence-manager/RemotePersistenceManager.js +1 -1
  50. package/esm/persistence-manager/RemotePersistenceManager.js.map +1 -1
  51. package/esm/{shell-layouts → shell-layout-templates}/context-panel/ContextPanel.js +4 -2
  52. package/esm/shell-layout-templates/context-panel/ContextPanel.js.map +1 -0
  53. package/esm/{shell-layouts → shell-layout-templates/full-height-left-panel}/useFullHeightLeftPanel.js +13 -13
  54. package/esm/shell-layout-templates/full-height-left-panel/useFullHeightLeftPanel.js.map +1 -0
  55. package/esm/{shell-layouts → shell-layout-templates/inlay-left-panel}/useInlayLeftPanel.js +11 -5
  56. package/esm/shell-layout-templates/inlay-left-panel/useInlayLeftPanel.js.map +1 -0
  57. package/esm/shell-layout-templates/side-panel/SidePanel.js.map +1 -0
  58. package/esm/shell-layout-templates/simple-content-pane/useSimpleContentPane.js +44 -0
  59. package/esm/shell-layout-templates/simple-content-pane/useSimpleContentPane.js.map +1 -0
  60. package/esm/shell-layout-templates/useShellLayout.js +19 -0
  61. package/esm/shell-layout-templates/useShellLayout.js.map +1 -0
  62. package/esm/shell.css.js +1 -1
  63. package/esm/shell.js +48 -39
  64. package/esm/shell.js.map +1 -1
  65. package/package.json +11 -11
  66. package/types/vuu-layout/src/Component.d.ts +6 -0
  67. package/types/vuu-layout/src/LayoutContainer.d.ts +6 -0
  68. package/types/vuu-layout/src/dock-layout/DockLayout.d.ts +7 -0
  69. package/types/vuu-layout/src/dock-layout/Drawer.d.ts +17 -0
  70. package/types/vuu-layout/src/dock-layout/index.d.ts +2 -0
  71. package/types/vuu-layout/src/drag-drop/BoxModel.d.ts +143 -0
  72. package/types/vuu-layout/src/drag-drop/DragState.d.ts +46 -0
  73. package/types/vuu-layout/src/drag-drop/Draggable.d.ts +24 -0
  74. package/types/vuu-layout/src/drag-drop/DropMenu.d.ts +9 -0
  75. package/types/vuu-layout/src/drag-drop/DropTarget.d.ts +60 -0
  76. package/types/vuu-layout/src/drag-drop/DropTargetRenderer.d.ts +17 -0
  77. package/types/vuu-layout/src/drag-drop/dragDropTypes.d.ts +51 -0
  78. package/types/vuu-layout/src/drag-drop/index.d.ts +4 -0
  79. package/types/vuu-layout/src/flexbox/Flexbox.d.ts +4 -0
  80. package/types/vuu-layout/src/flexbox/FlexboxLayout.d.ts +6 -0
  81. package/types/vuu-layout/src/flexbox/FluidGrid.d.ts +6 -0
  82. package/types/vuu-layout/src/flexbox/FluidGridLayout.d.ts +6 -0
  83. package/types/vuu-layout/src/flexbox/Splitter.d.ts +12 -0
  84. package/types/vuu-layout/src/flexbox/flexbox-utils.d.ts +12 -0
  85. package/types/vuu-layout/src/flexbox/flexboxTypes.d.ts +51 -0
  86. package/types/vuu-layout/src/flexbox/index.d.ts +4 -0
  87. package/types/vuu-layout/src/flexbox/useResponsiveSizing.d.ts +10 -0
  88. package/types/vuu-layout/src/flexbox/useSplitterResizing.d.ts +2 -0
  89. package/types/vuu-layout/src/index.d.ts +17 -0
  90. package/types/vuu-layout/src/layout-action.d.ts +19 -0
  91. package/types/vuu-layout/src/layout-header/Header.d.ts +13 -0
  92. package/types/vuu-layout/src/layout-header/index.d.ts +1 -0
  93. package/types/vuu-layout/src/layout-provider/LayoutProvider.d.ts +15 -0
  94. package/types/vuu-layout/src/layout-provider/LayoutProviderContext.d.ts +10 -0
  95. package/types/vuu-layout/src/layout-provider/index.d.ts +2 -0
  96. package/types/vuu-layout/src/layout-provider/useLayoutDragDrop.d.ts +4 -0
  97. package/types/vuu-layout/src/layout-reducer/flexUtils.d.ts +22 -0
  98. package/types/vuu-layout/src/layout-reducer/index.d.ts +4 -0
  99. package/types/vuu-layout/src/layout-reducer/insert-layout-element.d.ts +8 -0
  100. package/types/vuu-layout/src/layout-reducer/layout-reducer.d.ts +3 -0
  101. package/types/vuu-layout/src/layout-reducer/layoutTypes.d.ts +131 -0
  102. package/types/vuu-layout/src/layout-reducer/layoutUtils.d.ts +44 -0
  103. package/types/vuu-layout/src/layout-reducer/move-layout-element.d.ts +3 -0
  104. package/types/vuu-layout/src/layout-reducer/remove-layout-element.d.ts +3 -0
  105. package/types/vuu-layout/src/layout-reducer/replace-layout-element.d.ts +6 -0
  106. package/types/vuu-layout/src/layout-reducer/resize-flex-children.d.ts +4 -0
  107. package/types/vuu-layout/src/layout-reducer/wrap-layout-element.d.ts +9 -0
  108. package/types/vuu-layout/src/layout-view/View.d.ts +10 -0
  109. package/types/vuu-layout/src/layout-view/index.d.ts +3 -0
  110. package/types/vuu-layout/src/layout-view/useView.d.ts +21 -0
  111. package/types/vuu-layout/src/layout-view/useViewBroadcastChannel.d.ts +7 -0
  112. package/types/vuu-layout/src/layout-view/useViewResize.d.ts +7 -0
  113. package/types/vuu-layout/src/layout-view/viewTypes.d.ts +45 -0
  114. package/types/vuu-layout/src/layout-view-actions/ViewContext.d.ts +33 -0
  115. package/types/vuu-layout/src/layout-view-actions/index.d.ts +2 -0
  116. package/types/vuu-layout/src/layout-view-actions/useViewActionDispatcher.d.ts +4 -0
  117. package/types/vuu-layout/src/palette/Palette.d.ts +25 -0
  118. package/types/vuu-layout/src/palette/index.d.ts +1 -0
  119. package/types/vuu-layout/src/placeholder/LayoutStartPanel.d.ts +5 -0
  120. package/types/vuu-layout/src/placeholder/Placeholder.d.ts +17 -0
  121. package/types/vuu-layout/src/placeholder/index.d.ts +1 -0
  122. package/types/vuu-layout/src/responsive/breakpoints.d.ts +4 -0
  123. package/types/vuu-layout/src/responsive/index.d.ts +3 -0
  124. package/types/vuu-layout/src/responsive/use-breakpoints.d.ts +7 -0
  125. package/types/vuu-layout/src/responsive/useResizeObserver.d.ts +13 -0
  126. package/types/vuu-layout/src/responsive/utils.d.ts +6 -0
  127. package/types/vuu-layout/src/stack/Stack.d.ts +3 -0
  128. package/types/vuu-layout/src/stack/StackLayout.d.ts +6 -0
  129. package/types/vuu-layout/src/stack/index.d.ts +3 -0
  130. package/types/vuu-layout/src/stack/stackTypes.d.ts +24 -0
  131. package/types/vuu-layout/src/use-persistent-state.d.ts +11 -0
  132. package/types/vuu-layout/src/utils/index.d.ts +5 -0
  133. package/types/vuu-layout/src/utils/pathUtils.d.ts +31 -0
  134. package/types/vuu-layout/src/utils/propUtils.d.ts +5 -0
  135. package/types/vuu-layout/src/utils/refUtils.d.ts +2 -0
  136. package/types/vuu-layout/src/utils/styleUtils.d.ts +3 -0
  137. package/types/vuu-layout/src/utils/typeOf.d.ts +7 -0
  138. package/types/{index.d.ts → vuu-shell/src/index.d.ts} +1 -2
  139. package/types/{layout-management/useLayoutManager.d.ts → vuu-shell/src/layout-management/LayoutManagementProvider.d.ts} +22 -7
  140. package/types/vuu-shell/src/layout-management/defaultWorkspaceJSON.d.ts +9 -0
  141. package/types/{layout-management → vuu-shell/src/layout-management}/index.d.ts +2 -2
  142. package/types/{persistence-manager → vuu-shell/src/persistence-manager}/StaticPersistenceManager.d.ts +3 -1
  143. package/types/{shell-layouts → vuu-shell/src/shell-layout-templates}/context-panel/ContextPanel.d.ts +2 -1
  144. package/types/vuu-shell/src/shell-layout-templates/full-height-left-panel/useFullHeightLeftPanel.d.ts +2 -0
  145. package/types/vuu-shell/src/shell-layout-templates/inlay-left-panel/useInlayLeftPanel.d.ts +2 -0
  146. package/types/vuu-shell/src/shell-layout-templates/simple-content-pane/useSimpleContentPane.d.ts +2 -0
  147. package/types/vuu-shell/src/shell-layout-templates/useShellLayout.d.ts +45 -0
  148. package/types/vuu-shell/src/shell.d.ts +16 -0
  149. package/cjs/layout-management/defaultApplicationJson.js +0 -97
  150. package/cjs/layout-management/defaultApplicationJson.js.map +0 -1
  151. package/cjs/layout-management/useLayoutManager.js.map +0 -1
  152. package/cjs/shell-layouts/context-panel/ContextPanel.js.map +0 -1
  153. package/cjs/shell-layouts/side-panel/SidePanel.js.map +0 -1
  154. package/cjs/shell-layouts/useFullHeightLeftPanel.js.map +0 -1
  155. package/cjs/shell-layouts/useInlayLeftPanel.js.map +0 -1
  156. package/cjs/shell-layouts/useShellLayout.js +0 -15
  157. package/cjs/shell-layouts/useShellLayout.js.map +0 -1
  158. package/esm/layout-management/defaultApplicationJson.js +0 -91
  159. package/esm/layout-management/defaultApplicationJson.js.map +0 -1
  160. package/esm/layout-management/useLayoutManager.js.map +0 -1
  161. package/esm/shell-layouts/context-panel/ContextPanel.js.map +0 -1
  162. package/esm/shell-layouts/side-panel/SidePanel.js.map +0 -1
  163. package/esm/shell-layouts/useFullHeightLeftPanel.js.map +0 -1
  164. package/esm/shell-layouts/useInlayLeftPanel.js.map +0 -1
  165. package/esm/shell-layouts/useShellLayout.js +0 -13
  166. package/esm/shell-layouts/useShellLayout.js.map +0 -1
  167. package/types/layout-management/defaultApplicationJson.d.ts +0 -6
  168. package/types/shell-layouts/useFullHeightLeftPanel.d.ts +0 -3
  169. package/types/shell-layouts/useInlayLeftPanel.d.ts +0 -3
  170. package/types/shell-layouts/useShellLayout.d.ts +0 -10
  171. package/types/shell.d.ts +0 -17
  172. /package/cjs/{shell-layouts → shell-layout-templates}/context-panel/ContextPanel.css.js +0 -0
  173. /package/cjs/{shell-layouts → shell-layout-templates}/context-panel/ContextPanel.css.js.map +0 -0
  174. /package/cjs/{shell-layouts → shell-layout-templates}/side-panel/SidePanel.css.js +0 -0
  175. /package/cjs/{shell-layouts → shell-layout-templates}/side-panel/SidePanel.css.js.map +0 -0
  176. /package/cjs/{shell-layouts → shell-layout-templates}/side-panel/SidePanel.js +0 -0
  177. /package/esm/{shell-layouts → shell-layout-templates}/context-panel/ContextPanel.css.js +0 -0
  178. /package/esm/{shell-layouts → shell-layout-templates}/context-panel/ContextPanel.css.js.map +0 -0
  179. /package/esm/{shell-layouts → shell-layout-templates}/side-panel/SidePanel.css.js +0 -0
  180. /package/esm/{shell-layouts → shell-layout-templates}/side-panel/SidePanel.css.js.map +0 -0
  181. /package/esm/{shell-layouts → shell-layout-templates}/side-panel/SidePanel.js +0 -0
  182. /package/types/{ShellContextProvider.d.ts → vuu-shell/src/ShellContextProvider.d.ts} +0 -0
  183. /package/types/{app-header → vuu-shell/src/app-header}/AppHeader.d.ts +0 -0
  184. /package/types/{app-header → vuu-shell/src/app-header}/index.d.ts +0 -0
  185. /package/types/{application-provider → vuu-shell/src/application-provider}/ApplicationContext.d.ts +0 -0
  186. /package/types/{application-provider → vuu-shell/src/application-provider}/ApplicationProvider.d.ts +0 -0
  187. /package/types/{application-provider → vuu-shell/src/application-provider}/index.d.ts +0 -0
  188. /package/types/{connection-status → vuu-shell/src/connection-status}/ConnectionStatusIndicator.d.ts +0 -0
  189. /package/types/{connection-status → vuu-shell/src/connection-status}/index.d.ts +0 -0
  190. /package/types/{datasource-provider → vuu-shell/src/datasource-provider}/DataSourceProvider.d.ts +0 -0
  191. /package/types/{datasource-provider → vuu-shell/src/datasource-provider}/index.d.ts +0 -0
  192. /package/types/{feature → vuu-shell/src/feature}/Feature.d.ts +0 -0
  193. /package/types/{feature → vuu-shell/src/feature}/FeatureErrorBoundary.d.ts +0 -0
  194. /package/types/{feature → vuu-shell/src/feature}/Loader.d.ts +0 -0
  195. /package/types/{feature → vuu-shell/src/feature}/index.d.ts +0 -0
  196. /package/types/{feature-list → vuu-shell/src/feature-list}/FeatureList.d.ts +0 -0
  197. /package/types/{feature-list → vuu-shell/src/feature-list}/index.d.ts +0 -0
  198. /package/types/{get-layout-history.d.ts → vuu-shell/src/get-layout-history.d.ts} +0 -0
  199. /package/types/{layout-management → vuu-shell/src/layout-management}/LayoutList.d.ts +0 -0
  200. /package/types/{layout-management → vuu-shell/src/layout-management}/LayoutTile.d.ts +0 -0
  201. /package/types/{layout-management → vuu-shell/src/layout-management}/SaveLayoutPanel.d.ts +0 -0
  202. /package/types/{layout-management → vuu-shell/src/layout-management}/layoutTypes.d.ts +0 -0
  203. /package/types/{layout-management → vuu-shell/src/layout-management}/screenshot-utils.d.ts +0 -0
  204. /package/types/{layout-management → vuu-shell/src/layout-management}/useLayoutContextMenuItems.d.ts +0 -0
  205. /package/types/{left-nav → vuu-shell/src/left-nav}/LeftNav.d.ts +0 -0
  206. /package/types/{left-nav → vuu-shell/src/left-nav}/index.d.ts +0 -0
  207. /package/types/{login → vuu-shell/src/login}/LoginPanel.d.ts +0 -0
  208. /package/types/{login → vuu-shell/src/login}/VuuLogo.d.ts +0 -0
  209. /package/types/{login → vuu-shell/src/login}/index.d.ts +0 -0
  210. /package/types/{login → vuu-shell/src/login}/login-utils.d.ts +0 -0
  211. /package/types/{persistence-manager → vuu-shell/src/persistence-manager}/LocalPersistenceManager.d.ts +0 -0
  212. /package/types/{persistence-manager → vuu-shell/src/persistence-manager}/PersistenceManager.d.ts +0 -0
  213. /package/types/{persistence-manager → vuu-shell/src/persistence-manager}/PersistenceProvider.d.ts +0 -0
  214. /package/types/{persistence-manager → vuu-shell/src/persistence-manager}/RemotePersistenceManager.d.ts +0 -0
  215. /package/types/{persistence-manager → vuu-shell/src/persistence-manager}/index.d.ts +0 -0
  216. /package/types/{persistence-provider → vuu-shell/src/persistence-provider}/PersistenceProviderNext.d.ts +0 -0
  217. /package/types/{persistence-provider → vuu-shell/src/persistence-provider}/index.d.ts +0 -0
  218. /package/types/{session-editing-form → vuu-shell/src/session-editing-form}/SessionEditingForm.d.ts +0 -0
  219. /package/types/{session-editing-form → vuu-shell/src/session-editing-form}/index.d.ts +0 -0
  220. /package/types/{shell-layouts → vuu-shell/src/shell-layout-templates}/context-panel/index.d.ts +0 -0
  221. /package/types/{shell-layouts → vuu-shell/src/shell-layout-templates}/index.d.ts +0 -0
  222. /package/types/{shell-layouts → vuu-shell/src/shell-layout-templates}/side-panel/SidePanel.d.ts +0 -0
  223. /package/types/{shell-layouts → vuu-shell/src/shell-layout-templates}/side-panel/index.d.ts +0 -0
  224. /package/types/{theme-switch → vuu-shell/src/theme-switch}/ThemeSwitch.d.ts +0 -0
  225. /package/types/{theme-switch → vuu-shell/src/theme-switch}/index.d.ts +0 -0
  226. /package/types/{use-force-render.d.ts → vuu-shell/src/use-force-render.d.ts} +0 -0
  227. /package/types/{user-settings → vuu-shell/src/user-settings}/SettingsForm.d.ts +0 -0
  228. /package/types/{user-settings → vuu-shell/src/user-settings}/UserSettingsPanel.d.ts +0 -0
  229. /package/types/{user-settings → vuu-shell/src/user-settings}/index.d.ts +0 -0
@@ -0,0 +1,143 @@
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: () => "header" | "absolute" | "north" | "east" | "south" | "west" | "centre";
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: () => "header" | "absolute" | "north" | "east" | "south" | "west" | "centre";
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: () => "header" | "absolute" | "north" | "east" | "south" | "west" | "centre";
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: () => "header" | "absolute" | "north" | "east" | "south" | "west" | "centre";
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: () => "header" | "absolute" | "north" | "east" | "south" | "west" | "centre";
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: () => "header" | "absolute" | "north" | "east" | "south" | "west" | "centre";
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: () => "header" | "absolute" | "north" | "east" | "south" | "west" | "centre";
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;
@@ -0,0 +1,46 @@
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 {};
@@ -0,0 +1,24 @@
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
+ };
@@ -0,0 +1,9 @@
1
+ import { HTMLAttributes } from "react";
2
+ import { DropTarget } from "./DropTarget";
3
+ export declare function computeMenuPosition(dropTarget: DropTarget, offsetTop?: number, offsetLeft?: number): [number, number, "left" | "bottom" | "right" | "top"];
4
+ export interface DropMenuProps extends HTMLAttributes<HTMLDivElement> {
5
+ dropTarget: DropTarget;
6
+ onHover: (target: DropTarget | null) => void;
7
+ orientation?: "left" | "top" | "right" | "bottom";
8
+ }
9
+ export declare const DropMenu: ({ className, dropTarget, onHover, orientation, }: DropMenuProps) => JSX.Element;
@@ -0,0 +1,60 @@
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;
@@ -0,0 +1,17 @@
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 {};
@@ -0,0 +1,51 @@
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
+ }
@@ -0,0 +1,4 @@
1
+ export * from "./dragDropTypes";
2
+ export * from "./Draggable";
3
+ export * from "./DropMenu";
4
+ export * from "./DropTarget";
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { FlexboxProps } from "./flexboxTypes";
3
+ declare const Flexbox: import("react").ForwardRefExoticComponent<FlexboxProps & import("react").RefAttributes<HTMLDivElement>>;
4
+ export default Flexbox;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import { FlexboxLayoutProps } from "./flexboxTypes";
3
+ export declare const FlexboxLayout: {
4
+ (props: FlexboxLayoutProps): JSX.Element;
5
+ displayName: string;
6
+ };
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import { FlexboxProps } from "./flexboxTypes";
3
+ export interface FluidGridProps extends FlexboxProps {
4
+ showGrid?: boolean;
5
+ }
6
+ export declare const FluidGrid: import("react").ForwardRefExoticComponent<FluidGridProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import { FluidGridProps } from "./FluidGrid";
3
+ export declare const FluidGridLayout: {
4
+ (props: FluidGridProps): JSX.Element;
5
+ displayName: string;
6
+ };
@@ -0,0 +1,12 @@
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>;
@@ -0,0 +1,12 @@
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)[];
@@ -0,0 +1,51 @@
1
+ import { CSSProperties, HTMLAttributes, MutableRefObject, ReactElement, ReactNode } from "react";
2
+ import { SplitterProps } from "./Splitter";
3
+ export interface LayoutContainerProps {
4
+ resizeable?: boolean;
5
+ }
6
+ export interface FlexboxProps extends LayoutContainerProps, HTMLAttributes<HTMLDivElement> {
7
+ breakPoints?: BreakPointsProp;
8
+ children?: ReactNode;
9
+ cols?: number;
10
+ column?: true;
11
+ fullPage?: number;
12
+ flexFill?: boolean;
13
+ gap?: number;
14
+ onSplitterMoved?: (content: ContentMeta[]) => void;
15
+ row?: true;
16
+ spacing?: number;
17
+ splitterSize?: number;
18
+ }
19
+ export interface FlexboxLayoutProps extends FlexboxProps {
20
+ path?: string;
21
+ }
22
+ export interface SplitterHookProps {
23
+ children: ReactNode;
24
+ onSplitterMoved?: (content: ContentMeta[]) => void;
25
+ style?: CSSProperties;
26
+ }
27
+ export interface SplitterHookResult {
28
+ content: ReactElement[];
29
+ rootRef: MutableRefObject<HTMLDivElement | null>;
30
+ }
31
+ export type SplitterFactory = (index: number) => ReactElement<SplitterProps>;
32
+ export type ContentMeta = {
33
+ currentSize?: number;
34
+ flexOpen?: boolean;
35
+ flexBasis?: number;
36
+ intrinsicSize?: number;
37
+ minSize?: number;
38
+ placeholder?: boolean;
39
+ resizeable?: boolean;
40
+ shim?: boolean;
41
+ splitter?: boolean;
42
+ };
43
+ export type FlexSize = {
44
+ size: number;
45
+ minSize: number;
46
+ };
47
+ export type BreakPoint = "xs" | "sm" | "md" | "lg" | "xl";
48
+ export type BreakPoints = BreakPoint[];
49
+ export type BreakPointsProp = {
50
+ [keys in BreakPoint]?: number;
51
+ };
@@ -0,0 +1,4 @@
1
+ export { default as Flexbox } from './Flexbox';
2
+ export * from './FlexboxLayout';
3
+ export * from './FluidGrid';
4
+ export * from './FluidGridLayout';
@@ -0,0 +1,10 @@
1
+ import { CSSProperties, ReactElement } from "react";
2
+ export declare const useResponsiveSizing: ({ children: childrenProp, cols: colsProp, style, }: {
3
+ children: ReactElement[];
4
+ cols?: number | undefined;
5
+ style?: CSSProperties | undefined;
6
+ }) => {
7
+ cols: number;
8
+ content: ReactElement<any, string | import("react").JSXElementConstructor<any>>[] | undefined;
9
+ rootRef: import("react").MutableRefObject<null>;
10
+ };
@@ -0,0 +1,2 @@
1
+ import { SplitterHookProps, SplitterHookResult } from "./flexboxTypes";
2
+ export declare const useSplitterResizing: ({ children: childrenProp, onSplitterMoved, style, }: SplitterHookProps) => SplitterHookResult;
@@ -0,0 +1,17 @@
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";
@@ -0,0 +1,19 @@
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
+ };
@@ -0,0 +1,13 @@
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
+ onEditTitle: (value: string) => void;
10
+ orientation?: "horizontal" | "vertical";
11
+ tearOut?: boolean;
12
+ }
13
+ export declare const Header: ({ allowRename, className: classNameProp, contributions, collapsed, closeable, onEditTitle, orientation: orientationProp, style, title, }: HeaderProps) => JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './Header';
@@ -0,0 +1,15 @@
1
+ import { type LayoutJSON } from "@vuu-ui/vuu-utils";
2
+ import { 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;
9
+ onLayoutChange?: LayoutChangeHandler;
10
+ }
11
+ export declare const LayoutProviderVersion: () => JSX.Element;
12
+ export declare const LayoutProvider: (props: LayoutProviderProps) => ReactElement;
13
+ export declare const useLayoutProviderDispatch: () => LayoutProviderDispatch;
14
+ export declare const useLayoutCreateNewChild: () => ((index?: number | undefined) => ReactElement<any, string | import("react").JSXElementConstructor<any>>) | (() => JSX.Element);
15
+ export declare const useLayoutProviderVersion: () => number;
@@ -0,0 +1,10 @@
1
+ import { Dispatch, ReactElement } from "react";
2
+ import { DragStartAction, LayoutReducerAction, QueryAction } from "../layout-reducer";
3
+ import { SaveAction } from "../layout-view";
4
+ export type LayoutProviderDispatch = Dispatch<LayoutReducerAction | SaveAction | DragStartAction | QueryAction>;
5
+ export interface LayoutProviderContextProps {
6
+ createNewChild?: (index?: number) => ReactElement;
7
+ dispatchLayoutProvider: LayoutProviderDispatch;
8
+ version: number;
9
+ }
10
+ export declare const LayoutProviderContext: import("react").Context<LayoutProviderContextProps>;
@@ -0,0 +1,2 @@
1
+ export * from './LayoutProvider';
2
+ export * from './LayoutProviderContext';
@@ -0,0 +1,4 @@
1
+ import { MutableRefObject, ReactElement } from "react";
2
+ import { DragStartAction } from "../layout-reducer";
3
+ import { LayoutProviderDispatch } from "./LayoutProviderContext";
4
+ export declare const useLayoutDragDrop: (rootLayoutRef: MutableRefObject<ReactElement>, dispatch: LayoutProviderDispatch, pathToDropTarget?: string) => (action: DragStartAction) => void;
@@ -0,0 +1,22 @@
1
+ import { dimension, rect, rectTuple } from "@vuu-ui/vuu-utils";
2
+ import React, { CSSProperties, ReactElement, ReactNode } from "react";
3
+ import { DropPos } from "../drag-drop/dragDropTypes";
4
+ export type flexDirection = "row" | "column";
5
+ type contraDimension = dimension;
6
+ type flexDimensionTuple = [dimension, contraDimension, flexDirection];
7
+ export type position = {
8
+ height?: number;
9
+ width?: number;
10
+ };
11
+ export declare const getFlexDimensions: (flexDirection?: flexDirection) => flexDimensionTuple;
12
+ export declare const getIntrinsicSize: (component: ReactElement) => {
13
+ height?: number | undefined;
14
+ width?: number | undefined;
15
+ } | undefined;
16
+ export declare function getFlexStyle(component: ReactElement, dimension: dimension, pos?: DropPos): any;
17
+ export declare function hasUnboundedFlexStyle(component: ReactElement): boolean;
18
+ export declare function getFlexOrIntrinsicStyle(component: ReactElement, dimension: dimension, pos: position): any;
19
+ export declare function wrapIntrinsicSizeComponentWithFlexbox(component: ReactElement, flexDirection: flexDirection, path: string, clientRect?: rect, dropRect?: rectTuple): React.FunctionComponentElement<any>;
20
+ export declare function createFlexbox(flexDirection: flexDirection, props: any, children: ReactNode, path: string): React.FunctionComponentElement<any>;
21
+ export declare function createPlaceHolder(path: string, size: number, style?: CSSProperties, props?: any): React.DetailedReactHTMLElement<any, HTMLElement>;
22
+ export {};
@@ -0,0 +1,4 @@
1
+ export * from './flexUtils';
2
+ export * from './layout-reducer';
3
+ export * from './layoutTypes';
4
+ export * from './layoutUtils';
@@ -0,0 +1,8 @@
1
+ import { LayoutModel } from "@vuu-ui/vuu-utils";
2
+ import { ReactElement } from "react";
3
+ import { DropPos } from "../drag-drop";
4
+ type insertionPosition = "before" | "after";
5
+ export declare function getInsertTabBeforeAfter(stack: LayoutModel, pos: DropPos): any[];
6
+ export declare function insertIntoContainer(container: ReactElement, targetContainer: ReactElement, newComponent: ReactElement): ReactElement;
7
+ export declare function insertBesideChild(container: ReactElement, existingComponent: any, newComponent: any, insertionPosition: insertionPosition, pos?: DropPos, clientRect?: any, dropRect?: any): ReactElement;
8
+ export {};
@@ -0,0 +1,3 @@
1
+ import { ReactElement } from "react";
2
+ import { LayoutReducerAction } from "./layoutTypes";
3
+ export declare const layoutReducer: (state: ReactElement, action: LayoutReducerAction) => ReactElement;