@vuu-ui/vuu-layout 2.1.18 → 2.1.19-beta.2

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 (353) hide show
  1. package/package.json +15 -18
  2. package/src/Component.js +14 -0
  3. package/src/LayoutContainer.css.js +24 -0
  4. package/src/LayoutContainer.js +26 -0
  5. package/src/debug.js +16 -0
  6. package/src/dock-layout/DockLayout.css.js +36 -0
  7. package/src/dock-layout/DockLayout.js +43 -0
  8. package/src/dock-layout/Drawer.css.js +150 -0
  9. package/src/dock-layout/Drawer.js +82 -0
  10. package/src/dock-layout/index.js +2 -0
  11. package/src/drag-drop/BoxModel.js +337 -0
  12. package/src/drag-drop/DragState.js +119 -0
  13. package/src/drag-drop/Draggable.js +140 -0
  14. package/src/drag-drop/DropTarget.js +286 -0
  15. package/src/drag-drop/DropTargetRenderer.js +275 -0
  16. package/src/drag-drop/dragDropTypes.js +0 -0
  17. package/src/drag-drop/index.js +3 -0
  18. package/src/flexbox/Flexbox.css.js +45 -0
  19. package/src/flexbox/Flexbox.js +45 -0
  20. package/src/flexbox/FlexboxLayout.js +27 -0
  21. package/src/flexbox/Splitter.css.js +57 -0
  22. package/src/flexbox/Splitter.js +112 -0
  23. package/src/flexbox/flexbox-utils.js +92 -0
  24. package/src/flexbox/flexboxTypes.js +0 -0
  25. package/src/flexbox/index.js +2 -0
  26. package/src/flexbox/useSplitterResizing.js +181 -0
  27. package/src/index.js +20 -0
  28. package/src/layout-action.js +20 -0
  29. package/src/layout-header/ActionButton.js +15 -0
  30. package/src/layout-header/Header.css.js +32 -0
  31. package/src/layout-header/Header.js +99 -0
  32. package/src/layout-header/index.js +1 -0
  33. package/src/layout-header/useHeader.js +76 -0
  34. package/src/layout-provider/LayoutProvider.js +242 -0
  35. package/src/layout-provider/LayoutProviderContext.js +13 -0
  36. package/src/layout-provider/index.js +2 -0
  37. package/src/layout-provider/useLayoutDragDrop.js +147 -0
  38. package/src/layout-reducer/flexUtils.js +186 -0
  39. package/src/layout-reducer/index.js +4 -0
  40. package/src/layout-reducer/insert-layout-element.js +179 -0
  41. package/src/layout-reducer/layout-reducer.js +121 -0
  42. package/src/layout-reducer/layoutTypes.js +34 -0
  43. package/src/layout-reducer/layoutUtils.js +178 -0
  44. package/src/layout-reducer/move-layout-element.js +18 -0
  45. package/src/layout-reducer/remove-layout-element.js +161 -0
  46. package/src/layout-reducer/replace-layout-element.js +70 -0
  47. package/src/layout-reducer/resize-flex-children.js +48 -0
  48. package/src/layout-reducer/wrap-layout-element.js +134 -0
  49. package/src/layout-view/View.css.js +76 -0
  50. package/src/layout-view/View.js +116 -0
  51. package/src/layout-view/useView.js +69 -0
  52. package/src/layout-view/useViewBroadcastChannel.js +29 -0
  53. package/src/layout-view/useViewResize.js +27 -0
  54. package/src/layout-view/viewTypes.js +0 -0
  55. package/src/layout-view-actions/ViewContext.js +11 -0
  56. package/src/layout-view-actions/useViewActionDispatcher.js +116 -0
  57. package/src/layout-view-actions/useViewContributions.js +31 -0
  58. package/src/palette/Palette.css.js +31 -0
  59. package/src/palette/Palette.js +85 -0
  60. package/src/palette/index.js +1 -0
  61. package/src/placeholder/LayoutStartPanel.css.js +35 -0
  62. package/src/placeholder/LayoutStartPanel.js +57 -0
  63. package/src/placeholder/Placeholder.css.js +20 -0
  64. package/src/placeholder/Placeholder.js +33 -0
  65. package/src/placeholder/index.js +1 -0
  66. package/src/responsive/index.js +2 -0
  67. package/src/responsive/measureMinimumNodeSize.js +24 -0
  68. package/src/responsive/useResizeObserver.js +109 -0
  69. package/src/responsive/utils.js +27 -0
  70. package/src/stack/Stack.css.js +44 -0
  71. package/src/stack/Stack.js +98 -0
  72. package/src/stack/StackLayout.js +116 -0
  73. package/src/stack/index.js +3 -0
  74. package/src/stack/stackTypes.js +0 -0
  75. package/src/tabs/TabPanel.css.js +17 -0
  76. package/src/tabs/TabPanel.js +11 -0
  77. package/src/tabs/index.js +1 -0
  78. package/src/tools/config-wrapper/ConfigWrapper.js +55 -0
  79. package/src/tools/config-wrapper/index.js +1 -0
  80. package/src/tools/devtools-box/layout-configurator.css.js +113 -0
  81. package/src/tools/devtools-tree/layout-tree-viewer.css.js +17 -0
  82. package/src/tools/index.js +3 -0
  83. package/src/use-persistent-state.js +43 -0
  84. package/src/utils/index.js +5 -0
  85. package/src/utils/pathUtils.js +212 -0
  86. package/src/utils/propUtils.js +15 -0
  87. package/src/utils/refUtils.js +5 -0
  88. package/src/utils/styleUtils.js +9 -0
  89. package/src/utils/typeOf.js +15 -0
  90. package/types/dock-layout/DockLayout.d.ts +4 -4
  91. package/types/dock-layout/Drawer.d.ts +4 -4
  92. package/types/drag-drop/BoxModel.d.ts +7 -7
  93. package/types/flexbox/FlexboxLayout.d.ts +4 -4
  94. package/types/flexbox/Splitter.d.ts +1 -1
  95. package/types/layout-reducer/layoutUtils.d.ts +1 -1
  96. package/types/layout-reducer/remove-layout-element.d.ts +1 -1
  97. package/types/layout-reducer/replace-layout-element.d.ts +2 -2
  98. package/types/layout-reducer/resize-flex-children.d.ts +2 -2
  99. package/types/layout-view/useView.d.ts +1 -1
  100. package/types/placeholder/Placeholder.d.ts +4 -4
  101. package/types/responsive/overflowUtils.d.ts +2 -2
  102. package/types/stack/StackLayout.d.ts +4 -4
  103. package/types/tools/devtools-box/layout-configurator.d.ts +26 -26
  104. package/types/tools/devtools-tree/layout-tree-viewer.d.ts +2 -2
  105. package/types/utils/pathUtils.d.ts +1 -1
  106. package/cjs/Component.js +0 -14
  107. package/cjs/Component.js.map +0 -1
  108. package/cjs/LayoutContainer.css.js +0 -6
  109. package/cjs/LayoutContainer.css.js.map +0 -1
  110. package/cjs/LayoutContainer.js +0 -33
  111. package/cjs/LayoutContainer.js.map +0 -1
  112. package/cjs/dock-layout/DockLayout.css.js +0 -6
  113. package/cjs/dock-layout/DockLayout.css.js.map +0 -1
  114. package/cjs/dock-layout/DockLayout.js +0 -41
  115. package/cjs/dock-layout/DockLayout.js.map +0 -1
  116. package/cjs/dock-layout/Drawer.css.js +0 -6
  117. package/cjs/dock-layout/Drawer.css.js.map +0 -1
  118. package/cjs/dock-layout/Drawer.js +0 -95
  119. package/cjs/dock-layout/Drawer.js.map +0 -1
  120. package/cjs/drag-drop/BoxModel.js +0 -416
  121. package/cjs/drag-drop/BoxModel.js.map +0 -1
  122. package/cjs/drag-drop/DragState.js +0 -161
  123. package/cjs/drag-drop/DragState.js.map +0 -1
  124. package/cjs/drag-drop/Draggable.js +0 -192
  125. package/cjs/drag-drop/Draggable.js.map +0 -1
  126. package/cjs/drag-drop/DropTarget.js +0 -257
  127. package/cjs/drag-drop/DropTarget.js.map +0 -1
  128. package/cjs/drag-drop/DropTargetRenderer.js +0 -218
  129. package/cjs/drag-drop/DropTargetRenderer.js.map +0 -1
  130. package/cjs/flexbox/Flexbox.css.js +0 -6
  131. package/cjs/flexbox/Flexbox.css.js.map +0 -1
  132. package/cjs/flexbox/Flexbox.js +0 -69
  133. package/cjs/flexbox/Flexbox.js.map +0 -1
  134. package/cjs/flexbox/FlexboxLayout.js +0 -30
  135. package/cjs/flexbox/FlexboxLayout.js.map +0 -1
  136. package/cjs/flexbox/Splitter.css.js +0 -6
  137. package/cjs/flexbox/Splitter.css.js.map +0 -1
  138. package/cjs/flexbox/Splitter.js +0 -122
  139. package/cjs/flexbox/Splitter.js.map +0 -1
  140. package/cjs/flexbox/flexbox-utils.js +0 -95
  141. package/cjs/flexbox/flexbox-utils.js.map +0 -1
  142. package/cjs/flexbox/useSplitterResizing.js +0 -197
  143. package/cjs/flexbox/useSplitterResizing.js.map +0 -1
  144. package/cjs/index.js +0 -122
  145. package/cjs/index.js.map +0 -1
  146. package/cjs/layout-action.js +0 -24
  147. package/cjs/layout-action.js.map +0 -1
  148. package/cjs/layout-header/Header.css.js +0 -6
  149. package/cjs/layout-header/Header.css.js.map +0 -1
  150. package/cjs/layout-header/Header.js +0 -152
  151. package/cjs/layout-header/Header.js.map +0 -1
  152. package/cjs/layout-header/useHeader.js +0 -85
  153. package/cjs/layout-header/useHeader.js.map +0 -1
  154. package/cjs/layout-provider/LayoutProvider.js +0 -304
  155. package/cjs/layout-provider/LayoutProvider.js.map +0 -1
  156. package/cjs/layout-provider/LayoutProviderContext.js +0 -23
  157. package/cjs/layout-provider/LayoutProviderContext.js.map +0 -1
  158. package/cjs/layout-provider/useLayoutDragDrop.js +0 -177
  159. package/cjs/layout-provider/useLayoutDragDrop.js.map +0 -1
  160. package/cjs/layout-reducer/flexUtils.js +0 -227
  161. package/cjs/layout-reducer/flexUtils.js.map +0 -1
  162. package/cjs/layout-reducer/insert-layout-element.js +0 -286
  163. package/cjs/layout-reducer/insert-layout-element.js.map +0 -1
  164. package/cjs/layout-reducer/layout-reducer.js +0 -202
  165. package/cjs/layout-reducer/layout-reducer.js.map +0 -1
  166. package/cjs/layout-reducer/layoutTypes.js +0 -40
  167. package/cjs/layout-reducer/layoutTypes.js.map +0 -1
  168. package/cjs/layout-reducer/layoutUtils.js +0 -237
  169. package/cjs/layout-reducer/layoutUtils.js.map +0 -1
  170. package/cjs/layout-reducer/move-layout-element.js +0 -31
  171. package/cjs/layout-reducer/move-layout-element.js.map +0 -1
  172. package/cjs/layout-reducer/remove-layout-element.js +0 -237
  173. package/cjs/layout-reducer/remove-layout-element.js.map +0 -1
  174. package/cjs/layout-reducer/replace-layout-element.js +0 -96
  175. package/cjs/layout-reducer/replace-layout-element.js.map +0 -1
  176. package/cjs/layout-reducer/resize-flex-children.js +0 -62
  177. package/cjs/layout-reducer/resize-flex-children.js.map +0 -1
  178. package/cjs/layout-reducer/wrap-layout-element.js +0 -211
  179. package/cjs/layout-reducer/wrap-layout-element.js.map +0 -1
  180. package/cjs/layout-view/View.css.js +0 -6
  181. package/cjs/layout-view/View.css.js.map +0 -1
  182. package/cjs/layout-view/View.js +0 -160
  183. package/cjs/layout-view/View.js.map +0 -1
  184. package/cjs/layout-view/useView.js +0 -75
  185. package/cjs/layout-view/useView.js.map +0 -1
  186. package/cjs/layout-view/useViewBroadcastChannel.js +0 -35
  187. package/cjs/layout-view/useViewBroadcastChannel.js.map +0 -1
  188. package/cjs/layout-view/useViewResize.js +0 -42
  189. package/cjs/layout-view/useViewResize.js.map +0 -1
  190. package/cjs/layout-view-actions/ViewContext.js +0 -16
  191. package/cjs/layout-view-actions/ViewContext.js.map +0 -1
  192. package/cjs/layout-view-actions/useViewActionDispatcher.js +0 -112
  193. package/cjs/layout-view-actions/useViewActionDispatcher.js.map +0 -1
  194. package/cjs/layout-view-actions/useViewContributions.js +0 -33
  195. package/cjs/layout-view-actions/useViewContributions.js.map +0 -1
  196. package/cjs/palette/Palette.css.js +0 -6
  197. package/cjs/palette/Palette.css.js.map +0 -1
  198. package/cjs/palette/Palette.js +0 -115
  199. package/cjs/palette/Palette.js.map +0 -1
  200. package/cjs/placeholder/LayoutStartPanel.css.js +0 -6
  201. package/cjs/placeholder/LayoutStartPanel.css.js.map +0 -1
  202. package/cjs/placeholder/LayoutStartPanel.js +0 -56
  203. package/cjs/placeholder/LayoutStartPanel.js.map +0 -1
  204. package/cjs/placeholder/Placeholder.css.js +0 -6
  205. package/cjs/placeholder/Placeholder.css.js.map +0 -1
  206. package/cjs/placeholder/Placeholder.js +0 -34
  207. package/cjs/placeholder/Placeholder.js.map +0 -1
  208. package/cjs/responsive/useResizeObserver.js +0 -118
  209. package/cjs/responsive/useResizeObserver.js.map +0 -1
  210. package/cjs/responsive/utils.js +0 -34
  211. package/cjs/responsive/utils.js.map +0 -1
  212. package/cjs/stack/Stack.css.js +0 -6
  213. package/cjs/stack/Stack.css.js.map +0 -1
  214. package/cjs/stack/Stack.js +0 -150
  215. package/cjs/stack/Stack.js.map +0 -1
  216. package/cjs/stack/StackLayout.js +0 -116
  217. package/cjs/stack/StackLayout.js.map +0 -1
  218. package/cjs/use-persistent-state.js +0 -63
  219. package/cjs/use-persistent-state.js.map +0 -1
  220. package/cjs/utils/pathUtils.js +0 -293
  221. package/cjs/utils/pathUtils.js.map +0 -1
  222. package/cjs/utils/propUtils.js +0 -27
  223. package/cjs/utils/propUtils.js.map +0 -1
  224. package/cjs/utils/refUtils.js +0 -12
  225. package/cjs/utils/refUtils.js.map +0 -1
  226. package/cjs/utils/styleUtils.js +0 -15
  227. package/cjs/utils/styleUtils.js.map +0 -1
  228. package/cjs/utils/typeOf.js +0 -27
  229. package/cjs/utils/typeOf.js.map +0 -1
  230. package/esm/Component.js +0 -12
  231. package/esm/Component.js.map +0 -1
  232. package/esm/LayoutContainer.css.js +0 -4
  233. package/esm/LayoutContainer.css.js.map +0 -1
  234. package/esm/LayoutContainer.js +0 -31
  235. package/esm/LayoutContainer.js.map +0 -1
  236. package/esm/dock-layout/DockLayout.css.js +0 -4
  237. package/esm/dock-layout/DockLayout.css.js.map +0 -1
  238. package/esm/dock-layout/DockLayout.js +0 -39
  239. package/esm/dock-layout/DockLayout.js.map +0 -1
  240. package/esm/dock-layout/Drawer.css.js +0 -4
  241. package/esm/dock-layout/Drawer.css.js.map +0 -1
  242. package/esm/dock-layout/Drawer.js +0 -93
  243. package/esm/dock-layout/Drawer.js.map +0 -1
  244. package/esm/drag-drop/BoxModel.js +0 -409
  245. package/esm/drag-drop/BoxModel.js.map +0 -1
  246. package/esm/drag-drop/DragState.js +0 -159
  247. package/esm/drag-drop/DragState.js.map +0 -1
  248. package/esm/drag-drop/Draggable.js +0 -190
  249. package/esm/drag-drop/Draggable.js.map +0 -1
  250. package/esm/drag-drop/DropTarget.js +0 -253
  251. package/esm/drag-drop/DropTarget.js.map +0 -1
  252. package/esm/drag-drop/DropTargetRenderer.js +0 -216
  253. package/esm/drag-drop/DropTargetRenderer.js.map +0 -1
  254. package/esm/flexbox/Flexbox.css.js +0 -4
  255. package/esm/flexbox/Flexbox.css.js.map +0 -1
  256. package/esm/flexbox/Flexbox.js +0 -67
  257. package/esm/flexbox/Flexbox.js.map +0 -1
  258. package/esm/flexbox/FlexboxLayout.js +0 -28
  259. package/esm/flexbox/FlexboxLayout.js.map +0 -1
  260. package/esm/flexbox/Splitter.css.js +0 -4
  261. package/esm/flexbox/Splitter.css.js.map +0 -1
  262. package/esm/flexbox/Splitter.js +0 -120
  263. package/esm/flexbox/Splitter.js.map +0 -1
  264. package/esm/flexbox/flexbox-utils.js +0 -89
  265. package/esm/flexbox/flexbox-utils.js.map +0 -1
  266. package/esm/flexbox/useSplitterResizing.js +0 -195
  267. package/esm/flexbox/useSplitterResizing.js.map +0 -1
  268. package/esm/index.js +0 -33
  269. package/esm/index.js.map +0 -1
  270. package/esm/layout-action.js +0 -22
  271. package/esm/layout-action.js.map +0 -1
  272. package/esm/layout-header/Header.css.js +0 -4
  273. package/esm/layout-header/Header.css.js.map +0 -1
  274. package/esm/layout-header/Header.js +0 -150
  275. package/esm/layout-header/Header.js.map +0 -1
  276. package/esm/layout-header/useHeader.js +0 -83
  277. package/esm/layout-header/useHeader.js.map +0 -1
  278. package/esm/layout-provider/LayoutProvider.js +0 -297
  279. package/esm/layout-provider/LayoutProvider.js.map +0 -1
  280. package/esm/layout-provider/LayoutProviderContext.js +0 -20
  281. package/esm/layout-provider/LayoutProviderContext.js.map +0 -1
  282. package/esm/layout-provider/useLayoutDragDrop.js +0 -175
  283. package/esm/layout-provider/useLayoutDragDrop.js.map +0 -1
  284. package/esm/layout-reducer/flexUtils.js +0 -218
  285. package/esm/layout-reducer/flexUtils.js.map +0 -1
  286. package/esm/layout-reducer/insert-layout-element.js +0 -282
  287. package/esm/layout-reducer/insert-layout-element.js.map +0 -1
  288. package/esm/layout-reducer/layout-reducer.js +0 -200
  289. package/esm/layout-reducer/layout-reducer.js.map +0 -1
  290. package/esm/layout-reducer/layoutTypes.js +0 -36
  291. package/esm/layout-reducer/layoutTypes.js.map +0 -1
  292. package/esm/layout-reducer/layoutUtils.js +0 -226
  293. package/esm/layout-reducer/layoutUtils.js.map +0 -1
  294. package/esm/layout-reducer/move-layout-element.js +0 -29
  295. package/esm/layout-reducer/move-layout-element.js.map +0 -1
  296. package/esm/layout-reducer/remove-layout-element.js +0 -235
  297. package/esm/layout-reducer/remove-layout-element.js.map +0 -1
  298. package/esm/layout-reducer/replace-layout-element.js +0 -92
  299. package/esm/layout-reducer/replace-layout-element.js.map +0 -1
  300. package/esm/layout-reducer/resize-flex-children.js +0 -59
  301. package/esm/layout-reducer/resize-flex-children.js.map +0 -1
  302. package/esm/layout-reducer/wrap-layout-element.js +0 -209
  303. package/esm/layout-reducer/wrap-layout-element.js.map +0 -1
  304. package/esm/layout-view/View.css.js +0 -4
  305. package/esm/layout-view/View.css.js.map +0 -1
  306. package/esm/layout-view/View.js +0 -158
  307. package/esm/layout-view/View.js.map +0 -1
  308. package/esm/layout-view/useView.js +0 -73
  309. package/esm/layout-view/useView.js.map +0 -1
  310. package/esm/layout-view/useViewBroadcastChannel.js +0 -33
  311. package/esm/layout-view/useViewBroadcastChannel.js.map +0 -1
  312. package/esm/layout-view/useViewResize.js +0 -40
  313. package/esm/layout-view/useViewResize.js.map +0 -1
  314. package/esm/layout-view-actions/ViewContext.js +0 -12
  315. package/esm/layout-view-actions/ViewContext.js.map +0 -1
  316. package/esm/layout-view-actions/useViewActionDispatcher.js +0 -110
  317. package/esm/layout-view-actions/useViewActionDispatcher.js.map +0 -1
  318. package/esm/layout-view-actions/useViewContributions.js +0 -31
  319. package/esm/layout-view-actions/useViewContributions.js.map +0 -1
  320. package/esm/palette/Palette.css.js +0 -4
  321. package/esm/palette/Palette.css.js.map +0 -1
  322. package/esm/palette/Palette.js +0 -112
  323. package/esm/palette/Palette.js.map +0 -1
  324. package/esm/placeholder/LayoutStartPanel.css.js +0 -4
  325. package/esm/placeholder/LayoutStartPanel.css.js.map +0 -1
  326. package/esm/placeholder/LayoutStartPanel.js +0 -54
  327. package/esm/placeholder/LayoutStartPanel.js.map +0 -1
  328. package/esm/placeholder/Placeholder.css.js +0 -4
  329. package/esm/placeholder/Placeholder.css.js.map +0 -1
  330. package/esm/placeholder/Placeholder.js +0 -32
  331. package/esm/placeholder/Placeholder.js.map +0 -1
  332. package/esm/responsive/useResizeObserver.js +0 -112
  333. package/esm/responsive/useResizeObserver.js.map +0 -1
  334. package/esm/responsive/utils.js +0 -31
  335. package/esm/responsive/utils.js.map +0 -1
  336. package/esm/stack/Stack.css.js +0 -4
  337. package/esm/stack/Stack.css.js.map +0 -1
  338. package/esm/stack/Stack.js +0 -148
  339. package/esm/stack/Stack.js.map +0 -1
  340. package/esm/stack/StackLayout.js +0 -114
  341. package/esm/stack/StackLayout.js.map +0 -1
  342. package/esm/use-persistent-state.js +0 -58
  343. package/esm/use-persistent-state.js.map +0 -1
  344. package/esm/utils/pathUtils.js +0 -280
  345. package/esm/utils/pathUtils.js.map +0 -1
  346. package/esm/utils/propUtils.js +0 -23
  347. package/esm/utils/propUtils.js.map +0 -1
  348. package/esm/utils/refUtils.js +0 -10
  349. package/esm/utils/refUtils.js.map +0 -1
  350. package/esm/utils/styleUtils.js +0 -13
  351. package/esm/utils/styleUtils.js.map +0 -1
  352. package/esm/utils/typeOf.js +0 -23
  353. package/esm/utils/typeOf.js.map +0 -1
@@ -0,0 +1,212 @@
1
+ import { isContainer } from "@vuu-ui/vuu-utils";
2
+ import react, { isValidElement } from "react";
3
+ import { getProp, getProps } from "./propUtils.js";
4
+ import { typeOf } from "./typeOf.js";
5
+ const removeFinalPathSegment = (path)=>{
6
+ const pos = path.lastIndexOf(".");
7
+ if (-1 === pos) return path;
8
+ return path.slice(0, pos);
9
+ };
10
+ const getChildren = (c)=>react.isValidElement(c.props.children) ? [
11
+ c.props.children
12
+ ] : c.props.children;
13
+ const resolvePath = (source, path = "")=>{
14
+ const [step1, ...steps] = path.split(".");
15
+ if (step1?.startsWith("#")) {
16
+ const node = findTargetById(source, step1.slice(1), true);
17
+ if (node && steps.length) return resolvePath(node, steps.join("."));
18
+ } else if ("ACTIVE_CHILD" === step1) {
19
+ const { active } = getProps(source);
20
+ const children = getChildren(source);
21
+ const { path } = getProps(children[active]);
22
+ return path;
23
+ }
24
+ return "";
25
+ };
26
+ const resolveJSONPath = (source, path = "")=>{
27
+ const [step1, ...steps] = path.split(".");
28
+ if (step1?.startsWith("#")) {
29
+ const node = findTargetJSONById(source, step1.slice(1), true);
30
+ if (node && steps.length) return resolveJSONPath(node, steps.join("."));
31
+ } else if ("ACTIVE_CHILD" === step1) {
32
+ const { children, props } = source;
33
+ const { active } = props;
34
+ if ("number" == typeof active && children?.[active]) return children[active];
35
+ }
36
+ };
37
+ function followPathToParent(source, path) {
38
+ const { "data-path": dataPath, path: sourcePath = dataPath } = getProps(source);
39
+ if ("0" === path) return null;
40
+ if (path === sourcePath) return null;
41
+ return followPath(source, removeFinalPathSegment(path), true);
42
+ }
43
+ function findTarget(source, test) {
44
+ if (source) {
45
+ const { children, ...props } = getProps(source);
46
+ if (test(props)) return source;
47
+ if (react.Children.count(children) > 0) {
48
+ const array = react.isValidElement(children) ? [
49
+ children
50
+ ] : children;
51
+ for (const child of array){
52
+ const target = findTarget(child, test);
53
+ if (target) return target;
54
+ }
55
+ }
56
+ }
57
+ }
58
+ function containerOf(source, target) {
59
+ if (target === source) return null;
60
+ const { path: sourcePath, children } = getProps(source);
61
+ const { idx, finalStep } = pathUtils_nextStep(sourcePath, getProp(target, "path"));
62
+ if (finalStep) return source;
63
+ if (void 0 === children || void 0 === children[idx]) return null;
64
+ return containerOf(children[idx], target);
65
+ }
66
+ const getChild = (children, idx)=>{
67
+ if (react.isValidElement(children) && 0 == idx) return children;
68
+ if (Array.isArray(children)) return children[idx];
69
+ };
70
+ function followPathToComponent(component, path) {
71
+ const paths = path.split(".");
72
+ let children = [
73
+ component
74
+ ];
75
+ for(let i = 0; i < paths.length; i++){
76
+ const idx = parseInt(paths[i]);
77
+ const child = children[idx];
78
+ if (i === paths.length - 1) return child;
79
+ children = getChildren(child);
80
+ }
81
+ }
82
+ const findTargetById = (source, id, throwIfNotFound = true)=>{
83
+ const { children, id: idProp } = source.props;
84
+ if (idProp === id) return source;
85
+ if (react.Children.count(children) > 0) {
86
+ const childArray = isValidElement(children) ? [
87
+ children
88
+ ] : children;
89
+ for (const child of childArray)if (isValidElement(child)) {
90
+ const target = findTargetById(child, id, false);
91
+ if (target) return target;
92
+ }
93
+ }
94
+ if (true === throwIfNotFound) throw Error(`pathUtils.findTargetById id #${id} not found in source`);
95
+ };
96
+ const findTargetJSONById = (source, id, throwIfNotFound = true)=>{
97
+ const { children, id: idProp } = source;
98
+ if (idProp === id) return source;
99
+ if (Array.isArray(children) && children.length > 0) {
100
+ for (const child of children)if (null !== child && "object" == typeof child) {
101
+ const target = findTargetJSONById(child, id, false);
102
+ if (target) return target;
103
+ }
104
+ }
105
+ if (true === throwIfNotFound) throw Error(`pathUtils.findTargetJSONById id #${id} not found in source`);
106
+ };
107
+ function followPath(source, path, throwIfNotFound = false) {
108
+ if (path.startsWith("#")) return findTargetById(source, path.slice(1), throwIfNotFound);
109
+ const { "data-path": dataPath, path: sourcePath = dataPath } = getProps(source);
110
+ if (0 !== path.indexOf(sourcePath)) throw Error(`pathUtils.followPath path ${path} is not within source path ${sourcePath}`);
111
+ const route = path.slice(sourcePath.length + 1);
112
+ if ("" === route) return source;
113
+ let target = source;
114
+ const paths = route.split(".");
115
+ for(let i = 0; i < paths.length; i++){
116
+ if (0 === react.Children.count(target.props.children)) {
117
+ const message = `element at 0.${paths.slice(0, i).join(".")} has no children, so cannot fulfill rest of path ${paths.slice(i).join(".")}`;
118
+ if (!throwIfNotFound) return void console.warn(message);
119
+ throw Error(message);
120
+ }
121
+ target = getChild(target.props.children, parseInt(paths[i]));
122
+ if (void 0 === target) {
123
+ const message = `model at 0.${paths.slice(0, i).join(".")} has no children that fulfill next step of path ${paths.slice(i).join(".")}`;
124
+ if (throwIfNotFound) throw Error(message);
125
+ console.warn(message);
126
+ }
127
+ }
128
+ return target;
129
+ }
130
+ function nextLeaf(root, path) {
131
+ const parent = followPathToParent(root, path);
132
+ let pathIndices = path.split(".").map((idx)=>parseInt(idx, 10));
133
+ if (parent) {
134
+ const lastIdx = pathIndices.pop();
135
+ const { children } = parent.props;
136
+ if (children.length - 1 > lastIdx) return firstLeaf(children[lastIdx + 1]);
137
+ {
138
+ const parentIdx = pathIndices.pop();
139
+ const nextParent = followPathToParent(root, getProp(parent, "path"));
140
+ if (nextParent && "number" == typeof parentIdx) {
141
+ pathIndices = nextParent.props.path.split(".").map((idx)=>parseInt(idx, 10));
142
+ if (nextParent.props.children.length - 1 > parentIdx) {
143
+ const nextStep = nextParent.props.children[parentIdx + 1];
144
+ if (isContainer(typeOf(nextStep))) return firstLeaf(nextStep);
145
+ return nextStep;
146
+ }
147
+ }
148
+ }
149
+ }
150
+ return firstLeaf(root);
151
+ }
152
+ function previousLeaf(root, path) {
153
+ const pathIndices = path.split(".").map((idx)=>parseInt(idx, 10));
154
+ let lastIdx = pathIndices.pop();
155
+ let parent = followPathToParent(root, path);
156
+ if (null != parent && "number" == typeof lastIdx) {
157
+ const { children } = parent.props;
158
+ if (lastIdx > 0) return lastLeaf(children[lastIdx - 1]);
159
+ while(pathIndices.length > 1){
160
+ lastIdx = pathIndices.pop();
161
+ parent = followPathToParent(root, getProp(parent, "path"));
162
+ if (lastIdx > 0) {
163
+ const nextStep = parent.props.children[lastIdx - 1];
164
+ if (isContainer(typeOf(nextStep))) return lastLeaf(nextStep);
165
+ return nextStep;
166
+ }
167
+ }
168
+ }
169
+ return lastLeaf(root);
170
+ }
171
+ function firstLeaf(layoutRoot) {
172
+ if (isContainer(typeOf(layoutRoot))) {
173
+ const { children } = layoutRoot.props || layoutRoot;
174
+ return firstLeaf(children[0]);
175
+ }
176
+ return layoutRoot;
177
+ }
178
+ function lastLeaf(root) {
179
+ if (isContainer(typeOf(root))) {
180
+ const { children } = root.props || root;
181
+ return lastLeaf(children[children.length - 1]);
182
+ }
183
+ return root;
184
+ }
185
+ function pathUtils_nextStep(pathSoFar, targetPath, followPathToEnd = false) {
186
+ if (pathSoFar === targetPath) return {
187
+ idx: -1,
188
+ finalStep: true
189
+ };
190
+ const pathVisited = `${pathSoFar}.`;
191
+ if (!targetPath.startsWith(pathVisited)) throw Error("pathUtils nextStep has strayed from the path");
192
+ const endOfTheLine = followPathToEnd ? 0 : 1;
193
+ const paths = targetPath.replace(pathVisited, "").split(".").map((n)=>parseInt(n, 10));
194
+ return {
195
+ idx: paths[0],
196
+ finalStep: paths.length === endOfTheLine
197
+ };
198
+ }
199
+ function resetPath(model, path, additionalProps) {
200
+ if (getProp(model, "path") === path) return model;
201
+ const children = [];
202
+ react.Children.forEach(model.props.children, (child, i)=>{
203
+ if (getProp(child, "path")) children.push(resetPath(child, `${path}.${i}`));
204
+ else children.push(child);
205
+ });
206
+ const pathPropName = model.props["data-path"] ? "data-path" : "path";
207
+ return react.cloneElement(model, {
208
+ [pathPropName]: path,
209
+ ...additionalProps
210
+ }, children);
211
+ }
212
+ export { containerOf, findTarget, followPath, followPathToComponent, followPathToParent, getChild, nextLeaf, pathUtils_nextStep as nextStep, previousLeaf, resetPath, resolveJSONPath, resolvePath };
@@ -0,0 +1,15 @@
1
+ const NO_PROPS = {};
2
+ const getProp = (component, propName)=>{
3
+ const props = getProps(component);
4
+ return props[propName] ?? props[`data-${propName}`];
5
+ };
6
+ const getProps = (component)=>component?.props || component || NO_PROPS;
7
+ const getChildProp = (container)=>{
8
+ const props = getProps(container);
9
+ if (props.children) {
10
+ const { children: [target, ...rest] } = props;
11
+ if (rest.length > 0) console.warn(`getChild expected a single child, found ${rest.length + 1}`);
12
+ return target;
13
+ }
14
+ };
15
+ export { getChildProp, getProp, getProps };
@@ -0,0 +1,5 @@
1
+ function setRef(ref, value) {
2
+ if ("function" == typeof ref) ref(value);
3
+ else if (ref) ref.current = value;
4
+ }
5
+ export { setRef };
@@ -0,0 +1,9 @@
1
+ const expandFlex = (flex)=>{
2
+ if ('number' != typeof flex) throw Error(`"no support yet for flex value ${flex}`);
3
+ return {
4
+ flexBasis: 0,
5
+ flexGrow: 1,
6
+ flexShrink: 1
7
+ };
8
+ };
9
+ export { expandFlex };
@@ -0,0 +1,15 @@
1
+ function typeOf(element) {
2
+ if (element) {
3
+ const type = element.type;
4
+ if ("function" == typeof type || "object" == typeof type) {
5
+ const elementName = type.displayName || type.name || type.type?.name;
6
+ if ("string" == typeof elementName) return elementName;
7
+ }
8
+ if ("string" == typeof element.type) return element.type;
9
+ if (element.constructor) return element.constructor.displayName;
10
+ throw Error("typeOf unable to determine type of element");
11
+ }
12
+ }
13
+ const isTypeOf = (element, type)=>typeOf(element) === type;
14
+ const isLayoutJSON = (layout)=>void 0 !== layout && "type" in layout;
15
+ export { isLayoutJSON, isTypeOf, typeOf };
@@ -1,7 +1,7 @@
1
1
  import { HTMLAttributes } from "react";
2
2
  export type DockLayoutProps = HTMLAttributes<HTMLDivElement>;
3
- declare const DockLayout: {
4
- (props: DockLayoutProps): import("react/jsx-runtime").JSX.Element;
5
- displayName: string;
6
- };
3
+ declare function DockLayout(props: DockLayoutProps): import("react/jsx-runtime").JSX.Element;
4
+ declare namespace DockLayout {
5
+ var displayName: string;
6
+ }
7
7
  export default DockLayout;
@@ -10,8 +10,8 @@ export interface DrawerProps extends HTMLAttributes<HTMLDivElement> {
10
10
  sizeClosed?: number;
11
11
  toggleButton?: "start" | "end";
12
12
  }
13
- declare const Drawer: {
14
- ({ children, className: classNameProp, clickToOpen, defaultOpen, sizeOpen, sizeClosed, style: styleProp, open: openProp, position, inline, onClick, peekaboo, toggleButton, ...props }: DrawerProps): import("react/jsx-runtime").JSX.Element;
15
- displayName: string;
16
- };
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
+ declare namespace Drawer {
15
+ var displayName: string;
16
+ }
17
17
  export default Drawer;
@@ -18,7 +18,7 @@ export declare const Position: Readonly<{
18
18
  North: Readonly<{
19
19
  offset: number;
20
20
  valueOf: () => number;
21
- toString: () => "north" | "south" | "east" | "west" | "header" | "centre" | "absolute";
21
+ toString: () => "absolute" | "centre" | "east" | "header" | "north" | "south" | "west";
22
22
  North: boolean;
23
23
  South: boolean;
24
24
  East: boolean;
@@ -34,7 +34,7 @@ export declare const Position: Readonly<{
34
34
  East: Readonly<{
35
35
  offset: number;
36
36
  valueOf: () => number;
37
- toString: () => "north" | "south" | "east" | "west" | "header" | "centre" | "absolute";
37
+ toString: () => "absolute" | "centre" | "east" | "header" | "north" | "south" | "west";
38
38
  North: boolean;
39
39
  South: boolean;
40
40
  East: boolean;
@@ -50,7 +50,7 @@ export declare const Position: Readonly<{
50
50
  South: Readonly<{
51
51
  offset: number;
52
52
  valueOf: () => number;
53
- toString: () => "north" | "south" | "east" | "west" | "header" | "centre" | "absolute";
53
+ toString: () => "absolute" | "centre" | "east" | "header" | "north" | "south" | "west";
54
54
  North: boolean;
55
55
  South: boolean;
56
56
  East: boolean;
@@ -66,7 +66,7 @@ export declare const Position: Readonly<{
66
66
  West: Readonly<{
67
67
  offset: number;
68
68
  valueOf: () => number;
69
- toString: () => "north" | "south" | "east" | "west" | "header" | "centre" | "absolute";
69
+ toString: () => "absolute" | "centre" | "east" | "header" | "north" | "south" | "west";
70
70
  North: boolean;
71
71
  South: boolean;
72
72
  East: boolean;
@@ -82,7 +82,7 @@ export declare const Position: Readonly<{
82
82
  Header: Readonly<{
83
83
  offset: number;
84
84
  valueOf: () => number;
85
- toString: () => "north" | "south" | "east" | "west" | "header" | "centre" | "absolute";
85
+ toString: () => "absolute" | "centre" | "east" | "header" | "north" | "south" | "west";
86
86
  North: boolean;
87
87
  South: boolean;
88
88
  East: boolean;
@@ -98,7 +98,7 @@ export declare const Position: Readonly<{
98
98
  Centre: Readonly<{
99
99
  offset: number;
100
100
  valueOf: () => number;
101
- toString: () => "north" | "south" | "east" | "west" | "header" | "centre" | "absolute";
101
+ toString: () => "absolute" | "centre" | "east" | "header" | "north" | "south" | "west";
102
102
  North: boolean;
103
103
  South: boolean;
104
104
  East: boolean;
@@ -114,7 +114,7 @@ export declare const Position: Readonly<{
114
114
  Absolute: Readonly<{
115
115
  offset: number;
116
116
  valueOf: () => number;
117
- toString: () => "north" | "south" | "east" | "west" | "header" | "centre" | "absolute";
117
+ toString: () => "absolute" | "centre" | "east" | "header" | "north" | "south" | "west";
118
118
  North: boolean;
119
119
  South: boolean;
120
120
  East: boolean;
@@ -1,5 +1,5 @@
1
1
  import { FlexboxLayoutProps } from "./flexboxTypes";
2
- export declare const FlexboxLayout: {
3
- (props: FlexboxLayoutProps): import("react/jsx-runtime").JSX.Element;
4
- displayName: string;
5
- };
2
+ export declare function FlexboxLayout(props: FlexboxLayoutProps): import("react/jsx-runtime").JSX.Element;
3
+ export declare namespace FlexboxLayout {
4
+ var displayName: string;
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.NamedExoticComponent<SplitterProps>;
12
+ export declare const Splitter: React.MemoExoticComponent<({ column, index, onDrag, onDragEnd, onDragStart, style, }: SplitterProps) => import("react/jsx-runtime").JSX.Element>;
@@ -7,7 +7,7 @@ interface ComponentWithId {
7
7
  [key: string]: unknown;
8
8
  }
9
9
  export declare const getManagedDimension: (style: CSSProperties) => [dimension, dimension];
10
- export declare const applyLayoutProps: (component: ReactElement, path?: string) => React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
10
+ export declare const applyLayoutProps: (component: ReactElement, path?: string) => ReactElement<unknown, string | React.JSXElementConstructor<any>>;
11
11
  export interface LayoutProps extends ComponentWithId {
12
12
  active?: number;
13
13
  "data-path"?: string;
@@ -1,3 +1,3 @@
1
1
  import React, { ReactElement } from "react";
2
2
  import { RemoveAction } from "./layoutTypes";
3
- export declare function removeChild(layoutRoot: ReactElement, { path }: RemoveAction): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
3
+ export declare function removeChild(layoutRoot: ReactElement, { path }: RemoveAction): ReactElement<unknown, string | React.JSXElementConstructor<any>>;
@@ -1,6 +1,6 @@
1
1
  import React, { ReactElement } from "react";
2
2
  import { ReplaceAction } from "./layoutTypes";
3
3
  import { LayoutProps } from "./layoutUtils";
4
- export declare function replaceChild(model: ReactElement, { target, replacement }: ReplaceAction): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
5
- export declare function _replaceChild(model: ReactElement, child: ReactElement, replacement: ReactElement<LayoutProps>): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
4
+ export declare function replaceChild(model: ReactElement, { target, replacement }: ReplaceAction): ReactElement<unknown, string | React.JSXElementConstructor<any>>;
5
+ export declare function _replaceChild(model: ReactElement, child: ReactElement, replacement: ReactElement<LayoutProps>): ReactElement<unknown, string | React.JSXElementConstructor<any>>;
6
6
  export declare function swapChild(model: ReactElement, child: ReactElement, replacement: ReactElement, op?: "collapse" | "expand"): ReactElement;
@@ -1,4 +1,4 @@
1
1
  import React, { ReactElement } from "react";
2
2
  import { LayoutResizeAction, SplitterResizeAction } from "./layoutTypes";
3
- export declare function resizeFlexChild(layoutRoot: ReactElement, { path, size }: LayoutResizeAction): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
4
- export declare function resizeFlexChildren(layoutRoot: ReactElement, { path, sizes }: SplitterResizeAction): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
3
+ export declare function resizeFlexChild(layoutRoot: ReactElement, { path, size }: LayoutResizeAction): ReactElement<unknown, string | React.JSXElementConstructor<any>>;
4
+ export declare function resizeFlexChildren(layoutRoot: ReactElement, { path, sizes }: SplitterResizeAction): ReactElement<unknown, string | React.JSXElementConstructor<any>>;
@@ -9,7 +9,7 @@ export interface ViewHookProps {
9
9
  }
10
10
  export declare const useView: ({ id, rootRef, path, dropTargets, title: titleProp, }: ViewHookProps) => {
11
11
  contributions: import("./viewTypes").Contribution[] | undefined;
12
- dispatchViewAction: import("../layout-view-actions/ViewContext").ViewDispatch;
12
+ dispatchViewAction: import("..").ViewDispatch;
13
13
  load: (key?: string) => any;
14
14
  onConfigChange: ConfigChangeHandler;
15
15
  onEditTitle: (title: string) => void;
@@ -10,7 +10,7 @@ export interface PlaceholderProps extends ViewProps {
10
10
  */
11
11
  shim?: boolean;
12
12
  }
13
- export declare const Placeholder: {
14
- ({ className: classNameProp, showStartMenu, ...viewProps }: PlaceholderProps): import("react/jsx-runtime").JSX.Element;
15
- displayName: string;
16
- };
13
+ export declare function Placeholder({ className: classNameProp, showStartMenu, ...viewProps }: PlaceholderProps): import("react/jsx-runtime").JSX.Element;
14
+ export declare namespace Placeholder {
15
+ var displayName: string;
16
+ }
@@ -1,2 +1,2 @@
1
- export function getOverflowedItems(containerRef: any, height?: number): any[][];
2
- export function findFirstOverflow(elements: any, height: any): number;
1
+ export declare const getOverflowedItems: (containerRef: any, height?: number) => any[][];
2
+ export declare const findFirstOverflow: (elements: any, height: any) => number;
@@ -1,5 +1,5 @@
1
1
  import { StackProps } from "./stackTypes";
2
- export declare const StackLayout: {
3
- (props: StackProps): import("react/jsx-runtime").JSX.Element;
4
- displayName: string;
5
- };
2
+ export declare function StackLayout(props: StackProps): import("react/jsx-runtime").JSX.Element;
3
+ export declare namespace StackLayout {
4
+ var displayName: string;
5
+ }
@@ -1,31 +1,31 @@
1
- export function XXXnormalizeStyles(layoutStyle?: {}, visualStyle?: {}): {};
2
- export namespace MARGIN_STYLES {
3
- let margin: boolean;
4
- let marginTop: boolean;
5
- let marginRight: boolean;
6
- let marginBottom: boolean;
7
- let marginLeft: boolean;
8
- }
9
- export namespace PADDING_STYLES {
10
- let padding: boolean;
11
- let paddingTop: boolean;
12
- let paddingRight: boolean;
13
- let paddingBottom: boolean;
14
- let paddingLeft: boolean;
15
- }
16
- export namespace BORDER_STYLES {
17
- let border: boolean;
18
- let borderColor: boolean;
19
- let borderWidth: boolean;
20
- let borderTopWidth: boolean;
21
- let borderRightWidth: boolean;
22
- let borderBottomWidth: boolean;
23
- let borderLeftWidth: boolean;
24
- }
25
- export function LayoutConfigurator({ height, managedStyle, onChange, style, width, }: {
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, }: {
26
25
  height: any;
27
26
  managedStyle: any;
28
27
  onChange: any;
29
28
  style: any;
30
29
  width: any;
31
- }): import("react/jsx-runtime").JSX.Element;
30
+ }) => import("react/jsx-runtime").JSX.Element;
31
+ export declare function XXXnormalizeStyles(layoutStyle?: {}, visualStyle?: {}): {};
@@ -1,5 +1,5 @@
1
- export function LayoutTreeViewer({ layout, onSelect: _, style }: {
1
+ export declare const LayoutTreeViewer: ({ layout, onSelect: _, style }: {
2
2
  layout: any;
3
3
  onSelect: any;
4
4
  style: any;
5
- }): import("react/jsx-runtime").JSX.Element;
5
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -17,7 +17,7 @@ export declare function followPathToParent(source: ReactElement, path: string):
17
17
  export declare function findTarget(source: LayoutModel | undefined, test: (props: any) => boolean): LayoutModel | undefined;
18
18
  export declare function containerOf(source: LayoutModel, target: LayoutModel): LayoutModel | null;
19
19
  export declare const getChild: (children: ReactElement[], idx: number) => ReactElement | undefined;
20
- export declare function followPathToComponent(component: ReactElement, path: string): React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | undefined;
20
+ export declare function followPathToComponent(component: ReactElement, path: string): ReactElement<unknown, string | React.JSXElementConstructor<any>> | undefined;
21
21
  export declare function followPath(source: LayoutModel, path: string): LayoutModel | undefined;
22
22
  export declare function followPath(source: ReactElement, path: string, throwIfNotFound: true): ReactElement;
23
23
  export declare function nextLeaf(root: ReactElement, path: string): any;
package/cjs/Component.js DELETED
@@ -1,14 +0,0 @@
1
- 'use strict';
2
-
3
- var jsxRuntime = require('react/jsx-runtime');
4
- var React = require('react');
5
- var vuuUtils = require('@vuu-ui/vuu-utils');
6
-
7
- const Component = React.forwardRef(function Component2({ resizeable, ...props }, ref) {
8
- return /* @__PURE__ */ jsxRuntime.jsx("div", { ...props, className: "Component", ref });
9
- });
10
- Component.displayName = "Component";
11
- vuuUtils.registerComponent("Component", Component, "component");
12
-
13
- module.exports = Component;
14
- //# sourceMappingURL=Component.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Component.js","sources":["../../../packages/vuu-layout/src/Component.tsx"],"sourcesContent":["import React, { forwardRef, HTMLAttributes } from \"react\";\nimport { registerComponent } from \"@vuu-ui/vuu-utils\";\n\nexport interface ComponentProps extends HTMLAttributes<HTMLDivElement> {\n resizeable?: boolean;\n}\n\nconst Component = forwardRef(function Component(\n { resizeable, ...props }: ComponentProps,\n ref: React.ForwardedRef<HTMLDivElement>,\n) {\n return <div {...props} className=\"Component\" ref={ref} />;\n}) as React.FunctionComponent<ComponentProps>;\nComponent.displayName = \"Component\";\n\nexport default Component;\n\nregisterComponent(\"Component\", Component, \"component\");\n"],"names":["forwardRef","Component","registerComponent"],"mappings":";;;;;;AAOM,MAAA,SAAA,GAAYA,iBAAW,SAASC,UAAAA,CACpC,EAAE,UAAY,EAAA,GAAG,KAAM,EAAA,EACvB,GACA,EAAA;AACA,EAAA,sCAAQ,KAAK,EAAA,EAAA,GAAG,KAAO,EAAA,SAAA,EAAU,aAAY,GAAU,EAAA,CAAA;AACzD,CAAC;AACD,SAAA,CAAU,WAAc,GAAA,WAAA;AAIxBC,0BAAkB,CAAA,WAAA,EAAa,WAAW,WAAW,CAAA;;;;"}
@@ -1,6 +0,0 @@
1
- 'use strict';
2
-
3
- var layoutContainerCss = ".vuuLayoutContainer {\n display: inline-block;\n outline: none;\n}\n\n[data-dragging=\"true\"] {\n position: absolute !important;\n z-index: 100;\n}\n\n.vuuSimpleDraggableWrapper {\n background-color: white;\n box-shadow: 0 6px 10px 0 rgba(0, 0, 0, 0.2);\n}\n.vuuSimpleDraggableWrapper > * {\n height: 100%;\n width: 100%;\n}\n";
4
-
5
- module.exports = layoutContainerCss;
6
- //# sourceMappingURL=LayoutContainer.css.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LayoutContainer.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
@@ -1,33 +0,0 @@
1
- 'use strict';
2
-
3
- var jsxRuntime = require('react/jsx-runtime');
4
- var vuuUtils = require('@vuu-ui/vuu-utils');
5
- var styles = require('@salt-ds/styles');
6
- var window = require('@salt-ds/window');
7
- var cx = require('clsx');
8
- var React = require('react');
9
- var LayoutContainer$1 = require('./LayoutContainer.css.js');
10
-
11
- const LayoutContainer = React.forwardRef(function LayoutContainer2({
12
- children,
13
- className: classNameProp,
14
- dropTarget,
15
- resizeable: _,
16
- // ignore, its just a marker used by the layout system
17
- ...htmlAttributes
18
- }, forwardedRef) {
19
- const targetWindow = window.useWindow();
20
- styles.useComponentCssInjection({
21
- testId: "vuu-layout-container",
22
- css: LayoutContainer$1,
23
- window: targetWindow
24
- });
25
- const className = cx("vuuLayoutContainer", classNameProp);
26
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className, ref: forwardedRef, ...htmlAttributes, children });
27
- });
28
- const componentName = "LayoutContainer";
29
- LayoutContainer.displayName = componentName;
30
- vuuUtils.registerComponent(componentName, LayoutContainer, "container");
31
-
32
- exports.LayoutContainer = LayoutContainer;
33
- //# sourceMappingURL=LayoutContainer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LayoutContainer.js","sources":["../../../packages/vuu-layout/src/LayoutContainer.tsx"],"sourcesContent":["import { registerComponent } from \"@vuu-ui/vuu-utils\";\nimport { useComponentCssInjection } from \"@salt-ds/styles\";\nimport { useWindow } from \"@salt-ds/window\";\nimport cx from \"clsx\";\nimport { ForwardedRef, forwardRef, HTMLAttributes } from \"react\";\n\nimport layoutContainerCss from \"./LayoutContainer.css\";\n\nexport interface LayoutContainerProps extends HTMLAttributes<HTMLDivElement> {\n dropTarget?: boolean;\n resizeable?: boolean;\n}\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const LayoutContainer = forwardRef(function LayoutContainer(\n {\n children,\n className: classNameProp,\n dropTarget,\n resizeable: _, // ignore, its just a marker used by the layout system\n ...htmlAttributes\n }: LayoutContainerProps,\n forwardedRef: ForwardedRef<HTMLDivElement>,\n) {\n const targetWindow = useWindow();\n useComponentCssInjection({\n testId: \"vuu-layout-container\",\n css: layoutContainerCss,\n window: targetWindow,\n });\n\n const className = cx(\"vuuLayoutContainer\", classNameProp);\n return (\n <div className={className} ref={forwardedRef} {...htmlAttributes}>\n {children}\n </div>\n );\n});\n\nconst componentName = \"LayoutContainer\";\n\nLayoutContainer.displayName = componentName;\n\nregisterComponent(componentName, LayoutContainer, \"container\");\n"],"names":["forwardRef","LayoutContainer","useWindow","useComponentCssInjection","layoutContainerCss","registerComponent"],"mappings":";;;;;;;;;;AAaa,MAAA,eAAA,GAAkBA,gBAAW,CAAA,SAASC,gBACjD,CAAA;AAAA,EACE,QAAA;AAAA,EACA,SAAW,EAAA,aAAA;AAAA,EACX,UAAA;AAAA,EACA,UAAY,EAAA,CAAA;AAAA;AAAA,EACZ,GAAG;AACL,CAAA,EACA,YACA,EAAA;AACA,EAAA,MAAM,eAAeC,gBAAU,EAAA;AAC/B,EAAyBC,+BAAA,CAAA;AAAA,IACvB,MAAQ,EAAA,sBAAA;AAAA,IACR,GAAK,EAAAC,iBAAA;AAAA,IACL,MAAQ,EAAA;AAAA,GACT,CAAA;AAED,EAAM,MAAA,SAAA,GAAY,EAAG,CAAA,oBAAA,EAAsB,aAAa,CAAA;AACxD,EAAA,sCACG,KAAI,EAAA,EAAA,SAAA,EAAsB,KAAK,YAAe,EAAA,GAAG,gBAC/C,QACH,EAAA,CAAA;AAEJ,CAAC;AAED,MAAM,aAAgB,GAAA,iBAAA;AAEtB,eAAA,CAAgB,WAAc,GAAA,aAAA;AAE9BC,0BAAkB,CAAA,aAAA,EAAe,iBAAiB,WAAW,CAAA;;;;"}
@@ -1,6 +0,0 @@
1
- 'use strict';
2
-
3
- var dockLayoutCss = ".vuuDockLayout {\n --chest-bg: var(--hw-chest-bg, inherit);\n --drawer-bg: var(--hw-drawer-bg, inherit);\n --drawer-size: var(--hw-drawer-size, 200px);\n --drawer-peek-size: var(--hw-drawer-peek-size, 32px);\n --drawer-transition-duration: var(--hw-drawer-transition-duration, 0.4s);\n background-color: var(--chest-bg);\n display: flex;\n}\n\n.vuuDockLayout-horizontal {\n flex-direction: row;\n}\n\n.vuuDockLayout-vertical {\n flex-direction: column;\n}\n\n.vuuDockLayout-content {\n background-color: var(--chest-bg);\n flex-grow: 1;\n flex-shrink: 1;\n overflow: hidden;\n /* position: relative; */\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.vuuDockLayout-horizontal .vuuDockLayout-content {\n flex-basis: 100%;\n}\n\n.vuuDockLayout-vertical .vuuDockLayout-content {\n flex-basis: 100%;\n}\n";
4
-
5
- module.exports = dockLayoutCss;
6
- //# sourceMappingURL=DockLayout.css.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DockLayout.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}