@vuu-ui/vuu-layout 0.0.26

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 (359) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +1 -0
  3. package/cjs/Component.js +14 -0
  4. package/cjs/Component.js.map +1 -0
  5. package/cjs/DraggableLayout.css.js +6 -0
  6. package/cjs/DraggableLayout.css.js.map +1 -0
  7. package/cjs/DraggableLayout.js +33 -0
  8. package/cjs/DraggableLayout.js.map +1 -0
  9. package/cjs/dock-layout/DockLayout.css.js +6 -0
  10. package/cjs/dock-layout/DockLayout.css.js.map +1 -0
  11. package/cjs/dock-layout/DockLayout.js +36 -0
  12. package/cjs/dock-layout/DockLayout.js.map +1 -0
  13. package/cjs/dock-layout/Drawer.css.js +6 -0
  14. package/cjs/dock-layout/Drawer.css.js.map +1 -0
  15. package/cjs/dock-layout/Drawer.js +96 -0
  16. package/cjs/dock-layout/Drawer.js.map +1 -0
  17. package/cjs/drag-drop/BoxModel.js +422 -0
  18. package/cjs/drag-drop/BoxModel.js.map +1 -0
  19. package/cjs/drag-drop/DragState.js +154 -0
  20. package/cjs/drag-drop/DragState.js.map +1 -0
  21. package/cjs/drag-drop/Draggable.js +192 -0
  22. package/cjs/drag-drop/Draggable.js.map +1 -0
  23. package/cjs/drag-drop/DropMenu.css.js +6 -0
  24. package/cjs/drag-drop/DropMenu.css.js.map +1 -0
  25. package/cjs/drag-drop/DropMenu.js +55 -0
  26. package/cjs/drag-drop/DropMenu.js.map +1 -0
  27. package/cjs/drag-drop/DropTarget.js +244 -0
  28. package/cjs/drag-drop/DropTarget.js.map +1 -0
  29. package/cjs/drag-drop/DropTargetRenderer.js +244 -0
  30. package/cjs/drag-drop/DropTargetRenderer.js.map +1 -0
  31. package/cjs/flexbox/Flexbox.css.js +6 -0
  32. package/cjs/flexbox/Flexbox.css.js.map +1 -0
  33. package/cjs/flexbox/Flexbox.js +70 -0
  34. package/cjs/flexbox/Flexbox.js.map +1 -0
  35. package/cjs/flexbox/FlexboxLayout.js +30 -0
  36. package/cjs/flexbox/FlexboxLayout.js.map +1 -0
  37. package/cjs/flexbox/FluidGrid.css.js +6 -0
  38. package/cjs/flexbox/FluidGrid.css.js.map +1 -0
  39. package/cjs/flexbox/FluidGrid.js +87 -0
  40. package/cjs/flexbox/FluidGrid.js.map +1 -0
  41. package/cjs/flexbox/FluidGridLayout.js +14 -0
  42. package/cjs/flexbox/FluidGridLayout.js.map +1 -0
  43. package/cjs/flexbox/Splitter.css.js +6 -0
  44. package/cjs/flexbox/Splitter.css.js.map +1 -0
  45. package/cjs/flexbox/Splitter.js +122 -0
  46. package/cjs/flexbox/Splitter.js.map +1 -0
  47. package/cjs/flexbox/flexbox-utils.js +109 -0
  48. package/cjs/flexbox/flexbox-utils.js.map +1 -0
  49. package/cjs/flexbox/useResponsiveSizing.js +62 -0
  50. package/cjs/flexbox/useResponsiveSizing.js.map +1 -0
  51. package/cjs/flexbox/useSplitterResizing.js +209 -0
  52. package/cjs/flexbox/useSplitterResizing.js.map +1 -0
  53. package/cjs/index.js +133 -0
  54. package/cjs/index.js.map +1 -0
  55. package/cjs/layout-action.js +27 -0
  56. package/cjs/layout-action.js.map +1 -0
  57. package/cjs/layout-header/Header.css.js +6 -0
  58. package/cjs/layout-header/Header.css.js.map +1 -0
  59. package/cjs/layout-header/Header.js +131 -0
  60. package/cjs/layout-header/Header.js.map +1 -0
  61. package/cjs/layout-provider/LayoutProvider.js +178 -0
  62. package/cjs/layout-provider/LayoutProvider.js.map +1 -0
  63. package/cjs/layout-provider/LayoutProviderContext.js +14 -0
  64. package/cjs/layout-provider/LayoutProviderContext.js.map +1 -0
  65. package/cjs/layout-provider/useLayoutDragDrop.js +172 -0
  66. package/cjs/layout-provider/useLayoutDragDrop.js.map +1 -0
  67. package/cjs/layout-reducer/flexUtils.js +219 -0
  68. package/cjs/layout-reducer/flexUtils.js.map +1 -0
  69. package/cjs/layout-reducer/insert-layout-element.js +273 -0
  70. package/cjs/layout-reducer/insert-layout-element.js.map +1 -0
  71. package/cjs/layout-reducer/layout-reducer.js +198 -0
  72. package/cjs/layout-reducer/layout-reducer.js.map +1 -0
  73. package/cjs/layout-reducer/layoutTypes.js +41 -0
  74. package/cjs/layout-reducer/layoutTypes.js.map +1 -0
  75. package/cjs/layout-reducer/layoutUtils.js +226 -0
  76. package/cjs/layout-reducer/layoutUtils.js.map +1 -0
  77. package/cjs/layout-reducer/move-layout-element.js +31 -0
  78. package/cjs/layout-reducer/move-layout-element.js.map +1 -0
  79. package/cjs/layout-reducer/remove-layout-element.js +223 -0
  80. package/cjs/layout-reducer/remove-layout-element.js.map +1 -0
  81. package/cjs/layout-reducer/replace-layout-element.js +91 -0
  82. package/cjs/layout-reducer/replace-layout-element.js.map +1 -0
  83. package/cjs/layout-reducer/resize-flex-children.js +61 -0
  84. package/cjs/layout-reducer/resize-flex-children.js.map +1 -0
  85. package/cjs/layout-reducer/wrap-layout-element.js +212 -0
  86. package/cjs/layout-reducer/wrap-layout-element.js.map +1 -0
  87. package/cjs/layout-view/View.css.js +6 -0
  88. package/cjs/layout-view/View.css.js.map +1 -0
  89. package/cjs/layout-view/View.js +164 -0
  90. package/cjs/layout-view/View.js.map +1 -0
  91. package/cjs/layout-view/useView.js +92 -0
  92. package/cjs/layout-view/useView.js.map +1 -0
  93. package/cjs/layout-view/useViewResize.js +42 -0
  94. package/cjs/layout-view/useViewResize.js.map +1 -0
  95. package/cjs/layout-view-actions/ViewContext.js +16 -0
  96. package/cjs/layout-view-actions/ViewContext.js.map +1 -0
  97. package/cjs/layout-view-actions/useViewActionDispatcher.js +103 -0
  98. package/cjs/layout-view-actions/useViewActionDispatcher.js.map +1 -0
  99. package/cjs/palette/Palette.css.js +6 -0
  100. package/cjs/palette/Palette.css.js.map +1 -0
  101. package/cjs/palette/Palette.js +127 -0
  102. package/cjs/palette/Palette.js.map +1 -0
  103. package/cjs/placeholder/LayoutStartPanel.css.js +6 -0
  104. package/cjs/placeholder/LayoutStartPanel.css.js.map +1 -0
  105. package/cjs/placeholder/LayoutStartPanel.js +60 -0
  106. package/cjs/placeholder/LayoutStartPanel.js.map +1 -0
  107. package/cjs/placeholder/Placeholder.css.js +6 -0
  108. package/cjs/placeholder/Placeholder.css.js.map +1 -0
  109. package/cjs/placeholder/Placeholder.js +34 -0
  110. package/cjs/placeholder/Placeholder.js.map +1 -0
  111. package/cjs/registry/ComponentRegistry.js +27 -0
  112. package/cjs/registry/ComponentRegistry.js.map +1 -0
  113. package/cjs/responsive/breakpoints.js +36 -0
  114. package/cjs/responsive/breakpoints.js.map +1 -0
  115. package/cjs/responsive/use-breakpoints.js +76 -0
  116. package/cjs/responsive/use-breakpoints.js.map +1 -0
  117. package/cjs/responsive/useResizeObserver.js +118 -0
  118. package/cjs/responsive/useResizeObserver.js.map +1 -0
  119. package/cjs/responsive/utils.js +34 -0
  120. package/cjs/responsive/utils.js.map +1 -0
  121. package/cjs/stack/Stack.css.js +6 -0
  122. package/cjs/stack/Stack.css.js.map +1 -0
  123. package/cjs/stack/Stack.js +148 -0
  124. package/cjs/stack/Stack.js.map +1 -0
  125. package/cjs/stack/StackLayout.js +122 -0
  126. package/cjs/stack/StackLayout.js.map +1 -0
  127. package/cjs/use-persistent-state.js +109 -0
  128. package/cjs/use-persistent-state.js.map +1 -0
  129. package/cjs/utils/pathUtils.js +293 -0
  130. package/cjs/utils/pathUtils.js.map +1 -0
  131. package/cjs/utils/propUtils.js +27 -0
  132. package/cjs/utils/propUtils.js.map +1 -0
  133. package/cjs/utils/refUtils.js +12 -0
  134. package/cjs/utils/refUtils.js.map +1 -0
  135. package/cjs/utils/styleUtils.js +15 -0
  136. package/cjs/utils/styleUtils.js.map +1 -0
  137. package/cjs/utils/typeOf.js +27 -0
  138. package/cjs/utils/typeOf.js.map +1 -0
  139. package/esm/Component.js +12 -0
  140. package/esm/Component.js.map +1 -0
  141. package/esm/DraggableLayout.css.js +4 -0
  142. package/esm/DraggableLayout.css.js.map +1 -0
  143. package/esm/DraggableLayout.js +31 -0
  144. package/esm/DraggableLayout.js.map +1 -0
  145. package/esm/dock-layout/DockLayout.css.js +4 -0
  146. package/esm/dock-layout/DockLayout.css.js.map +1 -0
  147. package/esm/dock-layout/DockLayout.js +34 -0
  148. package/esm/dock-layout/DockLayout.js.map +1 -0
  149. package/esm/dock-layout/Drawer.css.js +4 -0
  150. package/esm/dock-layout/Drawer.css.js.map +1 -0
  151. package/esm/dock-layout/Drawer.js +94 -0
  152. package/esm/dock-layout/Drawer.js.map +1 -0
  153. package/esm/drag-drop/BoxModel.js +415 -0
  154. package/esm/drag-drop/BoxModel.js.map +1 -0
  155. package/esm/drag-drop/DragState.js +152 -0
  156. package/esm/drag-drop/DragState.js.map +1 -0
  157. package/esm/drag-drop/Draggable.js +190 -0
  158. package/esm/drag-drop/Draggable.js.map +1 -0
  159. package/esm/drag-drop/DropMenu.css.js +4 -0
  160. package/esm/drag-drop/DropMenu.css.js.map +1 -0
  161. package/esm/drag-drop/DropMenu.js +52 -0
  162. package/esm/drag-drop/DropMenu.js.map +1 -0
  163. package/esm/drag-drop/DropTarget.js +240 -0
  164. package/esm/drag-drop/DropTarget.js.map +1 -0
  165. package/esm/drag-drop/DropTargetRenderer.js +242 -0
  166. package/esm/drag-drop/DropTargetRenderer.js.map +1 -0
  167. package/esm/flexbox/Flexbox.css.js +4 -0
  168. package/esm/flexbox/Flexbox.css.js.map +1 -0
  169. package/esm/flexbox/Flexbox.js +68 -0
  170. package/esm/flexbox/Flexbox.js.map +1 -0
  171. package/esm/flexbox/FlexboxLayout.js +28 -0
  172. package/esm/flexbox/FlexboxLayout.js.map +1 -0
  173. package/esm/flexbox/FluidGrid.css.js +4 -0
  174. package/esm/flexbox/FluidGrid.css.js.map +1 -0
  175. package/esm/flexbox/FluidGrid.js +85 -0
  176. package/esm/flexbox/FluidGrid.js.map +1 -0
  177. package/esm/flexbox/FluidGridLayout.js +12 -0
  178. package/esm/flexbox/FluidGridLayout.js.map +1 -0
  179. package/esm/flexbox/Splitter.css.js +4 -0
  180. package/esm/flexbox/Splitter.css.js.map +1 -0
  181. package/esm/flexbox/Splitter.js +120 -0
  182. package/esm/flexbox/Splitter.js.map +1 -0
  183. package/esm/flexbox/flexbox-utils.js +103 -0
  184. package/esm/flexbox/flexbox-utils.js.map +1 -0
  185. package/esm/flexbox/useResponsiveSizing.js +60 -0
  186. package/esm/flexbox/useResponsiveSizing.js.map +1 -0
  187. package/esm/flexbox/useSplitterResizing.js +207 -0
  188. package/esm/flexbox/useSplitterResizing.js.map +1 -0
  189. package/esm/index.js +37 -0
  190. package/esm/index.js.map +1 -0
  191. package/esm/layout-action.js +25 -0
  192. package/esm/layout-action.js.map +1 -0
  193. package/esm/layout-header/Header.css.js +4 -0
  194. package/esm/layout-header/Header.css.js.map +1 -0
  195. package/esm/layout-header/Header.js +129 -0
  196. package/esm/layout-header/Header.js.map +1 -0
  197. package/esm/layout-provider/LayoutProvider.js +172 -0
  198. package/esm/layout-provider/LayoutProvider.js.map +1 -0
  199. package/esm/layout-provider/LayoutProviderContext.js +12 -0
  200. package/esm/layout-provider/LayoutProviderContext.js.map +1 -0
  201. package/esm/layout-provider/useLayoutDragDrop.js +170 -0
  202. package/esm/layout-provider/useLayoutDragDrop.js.map +1 -0
  203. package/esm/layout-reducer/flexUtils.js +210 -0
  204. package/esm/layout-reducer/flexUtils.js.map +1 -0
  205. package/esm/layout-reducer/insert-layout-element.js +269 -0
  206. package/esm/layout-reducer/insert-layout-element.js.map +1 -0
  207. package/esm/layout-reducer/layout-reducer.js +196 -0
  208. package/esm/layout-reducer/layout-reducer.js.map +1 -0
  209. package/esm/layout-reducer/layoutTypes.js +37 -0
  210. package/esm/layout-reducer/layoutTypes.js.map +1 -0
  211. package/esm/layout-reducer/layoutUtils.js +215 -0
  212. package/esm/layout-reducer/layoutUtils.js.map +1 -0
  213. package/esm/layout-reducer/move-layout-element.js +29 -0
  214. package/esm/layout-reducer/move-layout-element.js.map +1 -0
  215. package/esm/layout-reducer/remove-layout-element.js +221 -0
  216. package/esm/layout-reducer/remove-layout-element.js.map +1 -0
  217. package/esm/layout-reducer/replace-layout-element.js +87 -0
  218. package/esm/layout-reducer/replace-layout-element.js.map +1 -0
  219. package/esm/layout-reducer/resize-flex-children.js +58 -0
  220. package/esm/layout-reducer/resize-flex-children.js.map +1 -0
  221. package/esm/layout-reducer/wrap-layout-element.js +210 -0
  222. package/esm/layout-reducer/wrap-layout-element.js.map +1 -0
  223. package/esm/layout-view/View.css.js +4 -0
  224. package/esm/layout-view/View.css.js.map +1 -0
  225. package/esm/layout-view/View.js +162 -0
  226. package/esm/layout-view/View.js.map +1 -0
  227. package/esm/layout-view/useView.js +90 -0
  228. package/esm/layout-view/useView.js.map +1 -0
  229. package/esm/layout-view/useViewResize.js +40 -0
  230. package/esm/layout-view/useViewResize.js.map +1 -0
  231. package/esm/layout-view-actions/ViewContext.js +12 -0
  232. package/esm/layout-view-actions/ViewContext.js.map +1 -0
  233. package/esm/layout-view-actions/useViewActionDispatcher.js +101 -0
  234. package/esm/layout-view-actions/useViewActionDispatcher.js.map +1 -0
  235. package/esm/palette/Palette.css.js +4 -0
  236. package/esm/palette/Palette.css.js.map +1 -0
  237. package/esm/palette/Palette.js +124 -0
  238. package/esm/palette/Palette.js.map +1 -0
  239. package/esm/placeholder/LayoutStartPanel.css.js +4 -0
  240. package/esm/placeholder/LayoutStartPanel.css.js.map +1 -0
  241. package/esm/placeholder/LayoutStartPanel.js +58 -0
  242. package/esm/placeholder/LayoutStartPanel.js.map +1 -0
  243. package/esm/placeholder/Placeholder.css.js +4 -0
  244. package/esm/placeholder/Placeholder.css.js.map +1 -0
  245. package/esm/placeholder/Placeholder.js +32 -0
  246. package/esm/placeholder/Placeholder.js.map +1 -0
  247. package/esm/registry/ComponentRegistry.js +21 -0
  248. package/esm/registry/ComponentRegistry.js.map +1 -0
  249. package/esm/responsive/breakpoints.js +33 -0
  250. package/esm/responsive/breakpoints.js.map +1 -0
  251. package/esm/responsive/use-breakpoints.js +74 -0
  252. package/esm/responsive/use-breakpoints.js.map +1 -0
  253. package/esm/responsive/useResizeObserver.js +112 -0
  254. package/esm/responsive/useResizeObserver.js.map +1 -0
  255. package/esm/responsive/utils.js +31 -0
  256. package/esm/responsive/utils.js.map +1 -0
  257. package/esm/stack/Stack.css.js +4 -0
  258. package/esm/stack/Stack.css.js.map +1 -0
  259. package/esm/stack/Stack.js +146 -0
  260. package/esm/stack/Stack.js.map +1 -0
  261. package/esm/stack/StackLayout.js +120 -0
  262. package/esm/stack/StackLayout.js.map +1 -0
  263. package/esm/use-persistent-state.js +104 -0
  264. package/esm/use-persistent-state.js.map +1 -0
  265. package/esm/utils/pathUtils.js +280 -0
  266. package/esm/utils/pathUtils.js.map +1 -0
  267. package/esm/utils/propUtils.js +23 -0
  268. package/esm/utils/propUtils.js.map +1 -0
  269. package/esm/utils/refUtils.js +10 -0
  270. package/esm/utils/refUtils.js.map +1 -0
  271. package/esm/utils/styleUtils.js +13 -0
  272. package/esm/utils/styleUtils.js.map +1 -0
  273. package/esm/utils/typeOf.js +23 -0
  274. package/esm/utils/typeOf.js.map +1 -0
  275. package/package.json +43 -0
  276. package/types/Component.d.ts +7 -0
  277. package/types/DraggableLayout.d.ts +6 -0
  278. package/types/debug.d.ts +2 -0
  279. package/types/dock-layout/DockLayout.d.ts +9 -0
  280. package/types/dock-layout/Drawer.d.ts +17 -0
  281. package/types/dock-layout/index.d.ts +2 -0
  282. package/types/drag-drop/BoxModel.d.ts +143 -0
  283. package/types/drag-drop/DragState.d.ts +46 -0
  284. package/types/drag-drop/Draggable.d.ts +24 -0
  285. package/types/drag-drop/DropMenu.d.ts +9 -0
  286. package/types/drag-drop/DropTarget.d.ts +61 -0
  287. package/types/drag-drop/DropTargetRenderer.d.ts +17 -0
  288. package/types/drag-drop/dragDropTypes.d.ts +51 -0
  289. package/types/drag-drop/index.d.ts +4 -0
  290. package/types/flexbox/Flexbox.d.ts +4 -0
  291. package/types/flexbox/FlexboxLayout.d.ts +6 -0
  292. package/types/flexbox/FluidGrid.d.ts +6 -0
  293. package/types/flexbox/FluidGridLayout.d.ts +6 -0
  294. package/types/flexbox/Splitter.d.ts +12 -0
  295. package/types/flexbox/flexbox-utils.d.ts +12 -0
  296. package/types/flexbox/flexboxTypes.d.ts +51 -0
  297. package/types/flexbox/index.d.ts +4 -0
  298. package/types/flexbox/useResponsiveSizing.d.ts +10 -0
  299. package/types/flexbox/useSplitterResizing.d.ts +2 -0
  300. package/types/index.d.ts +18 -0
  301. package/types/layout-action.d.ts +22 -0
  302. package/types/layout-header/ActionButton.d.ts +8 -0
  303. package/types/layout-header/Header.d.ts +12 -0
  304. package/types/layout-header/index.d.ts +1 -0
  305. package/types/layout-provider/LayoutProvider.d.ts +15 -0
  306. package/types/layout-provider/LayoutProviderContext.d.ts +9 -0
  307. package/types/layout-provider/index.d.ts +2 -0
  308. package/types/layout-provider/useLayoutDragDrop.d.ts +4 -0
  309. package/types/layout-reducer/flexUtils.d.ts +22 -0
  310. package/types/layout-reducer/index.d.ts +4 -0
  311. package/types/layout-reducer/insert-layout-element.d.ts +8 -0
  312. package/types/layout-reducer/layout-reducer.d.ts +3 -0
  313. package/types/layout-reducer/layoutTypes.d.ts +193 -0
  314. package/types/layout-reducer/layoutUtils.d.ts +38 -0
  315. package/types/layout-reducer/move-layout-element.d.ts +3 -0
  316. package/types/layout-reducer/remove-layout-element.d.ts +3 -0
  317. package/types/layout-reducer/replace-layout-element.d.ts +6 -0
  318. package/types/layout-reducer/resize-flex-children.d.ts +4 -0
  319. package/types/layout-reducer/wrap-layout-element.d.ts +9 -0
  320. package/types/layout-view/View.d.ts +10 -0
  321. package/types/layout-view/index.d.ts +2 -0
  322. package/types/layout-view/useView.d.ts +21 -0
  323. package/types/layout-view/useViewResize.d.ts +7 -0
  324. package/types/layout-view/viewTypes.d.ts +21 -0
  325. package/types/layout-view-actions/ViewContext.d.ts +33 -0
  326. package/types/layout-view-actions/index.d.ts +2 -0
  327. package/types/layout-view-actions/useViewActionDispatcher.d.ts +9 -0
  328. package/types/palette/Palette.d.ts +21 -0
  329. package/types/palette/index.d.ts +1 -0
  330. package/types/placeholder/LayoutStartPanel.d.ts +5 -0
  331. package/types/placeholder/Placeholder.d.ts +17 -0
  332. package/types/placeholder/index.d.ts +1 -0
  333. package/types/registry/ComponentRegistry.d.ts +13 -0
  334. package/types/registry/index.d.ts +1 -0
  335. package/types/responsive/breakpoints.d.ts +4 -0
  336. package/types/responsive/index.d.ts +3 -0
  337. package/types/responsive/measureMinimumNodeSize.d.ts +1 -0
  338. package/types/responsive/overflowUtils.d.ts +2 -0
  339. package/types/responsive/use-breakpoints.d.ts +7 -0
  340. package/types/responsive/useResizeObserver.d.ts +13 -0
  341. package/types/responsive/utils.d.ts +6 -0
  342. package/types/stack/Stack.d.ts +3 -0
  343. package/types/stack/StackLayout.d.ts +6 -0
  344. package/types/stack/index.d.ts +3 -0
  345. package/types/stack/stackTypes.d.ts +22 -0
  346. package/types/tabs/TabPanel.d.ts +7 -0
  347. package/types/tabs/index.d.ts +1 -0
  348. package/types/tools/config-wrapper/ConfigWrapper.d.ts +2 -0
  349. package/types/tools/config-wrapper/index.d.ts +1 -0
  350. package/types/tools/devtools-box/layout-configurator.d.ts +31 -0
  351. package/types/tools/devtools-tree/layout-tree-viewer.d.ts +5 -0
  352. package/types/tools/index.d.ts +3 -0
  353. package/types/use-persistent-state.d.ts +11 -0
  354. package/types/utils/index.d.ts +5 -0
  355. package/types/utils/pathUtils.d.ts +31 -0
  356. package/types/utils/propUtils.d.ts +5 -0
  357. package/types/utils/refUtils.d.ts +2 -0
  358. package/types/utils/styleUtils.d.ts +3 -0
  359. package/types/utils/typeOf.d.ts +5 -0
@@ -0,0 +1,293 @@
1
+ 'use strict';
2
+
3
+ var React = require('react');
4
+ var ComponentRegistry = require('../registry/ComponentRegistry.js');
5
+ var propUtils = require('./propUtils.js');
6
+ var typeOf = require('./typeOf.js');
7
+
8
+ const removeFinalPathSegment = (path) => {
9
+ const pos = path.lastIndexOf(".");
10
+ if (pos === -1) {
11
+ return path;
12
+ } else {
13
+ return path.slice(0, pos);
14
+ }
15
+ };
16
+ const getChildren = (c) => React.isValidElement(c.props.children) ? [c.props.children] : c.props.children;
17
+ const resolvePath = (source, path = "") => {
18
+ const [step1, ...steps] = path.split(".");
19
+ if (step1?.startsWith("#")) {
20
+ const node = findTargetById(source, step1.slice(1), true);
21
+ if (node && steps.length) {
22
+ return resolvePath(node, steps.join("."));
23
+ }
24
+ } else if (step1 === "ACTIVE_CHILD") {
25
+ const { active } = propUtils.getProps(source);
26
+ const children = getChildren(source);
27
+ const { path: path2 } = propUtils.getProps(children[active]);
28
+ return path2;
29
+ }
30
+ return "";
31
+ };
32
+ const resolveJSONPath = (source, path = "") => {
33
+ const [step1, ...steps] = path.split(".");
34
+ if (step1?.startsWith("#")) {
35
+ const node = findTargetJSONById(source, step1.slice(1), true);
36
+ if (node && steps.length) {
37
+ return resolveJSONPath(node, steps.join("."));
38
+ }
39
+ } else if (step1 === "ACTIVE_CHILD") {
40
+ const { children, props } = source;
41
+ const { active } = props;
42
+ if (typeof active === "number" && children?.[active]) {
43
+ return children[active];
44
+ }
45
+ }
46
+ return;
47
+ };
48
+ function followPathToParent(source, path) {
49
+ const { "data-path": dataPath, path: sourcePath = dataPath } = propUtils.getProps(source);
50
+ if (path === "0")
51
+ return null;
52
+ if (path === sourcePath)
53
+ return null;
54
+ return followPath(source, removeFinalPathSegment(path), true);
55
+ }
56
+ function findTarget(source, test) {
57
+ const { children, ...props } = propUtils.getProps(source);
58
+ if (test(props)) {
59
+ return source;
60
+ }
61
+ if (React.Children.count(children) > 0) {
62
+ const array = React.isValidElement(children) ? [children] : children;
63
+ for (const child of array) {
64
+ const target = findTarget(child, test);
65
+ if (target) {
66
+ return target;
67
+ }
68
+ }
69
+ }
70
+ }
71
+ function containerOf(source, target) {
72
+ if (target === source) {
73
+ return null;
74
+ }
75
+ const { path: sourcePath, children } = propUtils.getProps(source);
76
+ const { idx, finalStep } = nextStep(sourcePath, propUtils.getProp(target, "path"));
77
+ if (finalStep) {
78
+ return source;
79
+ }
80
+ if (children === void 0 || children[idx] === void 0) {
81
+ return null;
82
+ }
83
+ return containerOf(children[idx], target);
84
+ }
85
+ const getChild = (children, idx) => {
86
+ if (React.isValidElement(children) && idx == 0) {
87
+ return children;
88
+ }
89
+ if (Array.isArray(children)) {
90
+ return children[idx];
91
+ }
92
+ };
93
+ function followPathToComponent(component, path) {
94
+ const paths = path.split(".");
95
+ let children = [component];
96
+ for (let i = 0; i < paths.length; i++) {
97
+ const idx = parseInt(paths[i]);
98
+ const child = children[idx];
99
+ if (i === paths.length - 1) {
100
+ return child;
101
+ }
102
+ children = getChildren(child);
103
+ }
104
+ }
105
+ const findTargetById = (source, id, throwIfNotFound = true) => {
106
+ const { children, id: idProp } = source.props;
107
+ if (idProp === id) {
108
+ return source;
109
+ }
110
+ if (React.Children.count(children) > 0) {
111
+ const childArray = React.isValidElement(children) ? [children] : children;
112
+ for (const child of childArray) {
113
+ if (React.isValidElement(child)) {
114
+ const target = findTargetById(child, id, false);
115
+ if (target) {
116
+ return target;
117
+ }
118
+ }
119
+ }
120
+ }
121
+ if (throwIfNotFound === true) {
122
+ throw Error(`pathUtils.findTargetById id #${id} not found in source`);
123
+ }
124
+ };
125
+ const findTargetJSONById = (source, id, throwIfNotFound = true) => {
126
+ const { children, id: idProp } = source;
127
+ if (idProp === id) {
128
+ return source;
129
+ }
130
+ if (Array.isArray(children) && children.length > 0) {
131
+ for (const child of children) {
132
+ if (child !== null && typeof child === "object") {
133
+ const target = findTargetJSONById(child, id, false);
134
+ if (target) {
135
+ return target;
136
+ }
137
+ }
138
+ }
139
+ }
140
+ if (throwIfNotFound === true) {
141
+ throw Error(`pathUtils.findTargetJSONById id #${id} not found in source`);
142
+ }
143
+ };
144
+ function followPath(source, path, throwIfNotFound = false) {
145
+ if (path.startsWith("#")) {
146
+ return findTargetById(source, path.slice(1), throwIfNotFound);
147
+ }
148
+ const { "data-path": dataPath, path: sourcePath = dataPath } = propUtils.getProps(source);
149
+ if (path.indexOf(sourcePath) !== 0) {
150
+ throw Error(
151
+ `pathUtils.followPath path ${path} is not within source path ${sourcePath}`
152
+ );
153
+ }
154
+ const route = path.slice(sourcePath.length + 1);
155
+ if (route === "") {
156
+ return source;
157
+ }
158
+ let target = source;
159
+ const paths = route.split(".");
160
+ for (let i = 0; i < paths.length; i++) {
161
+ if (React.Children.count(target.props.children) === 0) {
162
+ const message = `element at 0.${paths.slice(0, i).join(".")} has no children, so cannot fulfill rest of path ${paths.slice(i).join(".")}`;
163
+ if (throwIfNotFound) {
164
+ throw Error(message);
165
+ } else {
166
+ console.warn(message);
167
+ return;
168
+ }
169
+ }
170
+ target = getChild(target.props.children, parseInt(paths[i]));
171
+ if (target === void 0) {
172
+ const message = `model at 0.${paths.slice(0, i).join(".")} has no children that fulfill next step of path ${paths.slice(i).join(".")}`;
173
+ if (throwIfNotFound) {
174
+ throw Error(message);
175
+ } else {
176
+ console.warn(message);
177
+ }
178
+ }
179
+ }
180
+ return target;
181
+ }
182
+ function nextLeaf(root, path) {
183
+ const parent = followPathToParent(root, path);
184
+ let pathIndices = path.split(".").map((idx) => parseInt(idx, 10));
185
+ if (parent) {
186
+ const lastIdx = pathIndices.pop();
187
+ const { children } = parent.props;
188
+ if (children.length - 1 > lastIdx) {
189
+ return firstLeaf(children[lastIdx + 1]);
190
+ } else {
191
+ const parentIdx = pathIndices.pop();
192
+ const nextParent = followPathToParent(root, propUtils.getProp(parent, "path"));
193
+ if (nextParent && typeof parentIdx === "number") {
194
+ pathIndices = nextParent.props.path.split(".").map((idx) => parseInt(idx, 10));
195
+ if (nextParent.props.children.length - 1 > parentIdx) {
196
+ const nextStep2 = nextParent.props.children[parentIdx + 1];
197
+ if (ComponentRegistry.isContainer(typeOf.typeOf(nextStep2))) {
198
+ return firstLeaf(nextStep2);
199
+ } else {
200
+ return nextStep2;
201
+ }
202
+ }
203
+ }
204
+ }
205
+ }
206
+ return firstLeaf(root);
207
+ }
208
+ function previousLeaf(root, path) {
209
+ const pathIndices = path.split(".").map((idx) => parseInt(idx, 10));
210
+ let lastIdx = pathIndices.pop();
211
+ let parent = followPathToParent(root, path);
212
+ if (parent != null && typeof lastIdx === "number") {
213
+ const { children } = parent.props;
214
+ if (lastIdx > 0) {
215
+ return lastLeaf(children[lastIdx - 1]);
216
+ } else {
217
+ while (pathIndices.length > 1) {
218
+ lastIdx = pathIndices.pop();
219
+ parent = followPathToParent(
220
+ root,
221
+ propUtils.getProp(parent, "path")
222
+ );
223
+ if (lastIdx > 0) {
224
+ const nextStep2 = parent.props.children[lastIdx - 1];
225
+ if (ComponentRegistry.isContainer(typeOf.typeOf(nextStep2))) {
226
+ return lastLeaf(nextStep2);
227
+ }
228
+ return nextStep2;
229
+ }
230
+ }
231
+ }
232
+ }
233
+ return lastLeaf(root);
234
+ }
235
+ function firstLeaf(layoutRoot) {
236
+ if (ComponentRegistry.isContainer(typeOf.typeOf(layoutRoot))) {
237
+ const { children } = layoutRoot.props || layoutRoot;
238
+ return firstLeaf(children[0]);
239
+ }
240
+ return layoutRoot;
241
+ }
242
+ function lastLeaf(root) {
243
+ if (ComponentRegistry.isContainer(typeOf.typeOf(root))) {
244
+ const { children } = root.props || root;
245
+ return lastLeaf(children[children.length - 1]);
246
+ }
247
+ return root;
248
+ }
249
+ function nextStep(pathSoFar, targetPath, followPathToEnd = false) {
250
+ if (pathSoFar === targetPath) {
251
+ return { idx: -1, finalStep: true };
252
+ }
253
+ const pathVisited = `${pathSoFar}.`;
254
+ if (!targetPath.startsWith(pathVisited)) {
255
+ throw Error("pathUtils nextStep has strayed from the path");
256
+ }
257
+ const endOfTheLine = followPathToEnd ? 0 : 1;
258
+ const paths = targetPath.replace(pathVisited, "").split(".").map((n) => parseInt(n, 10));
259
+ return { idx: paths[0], finalStep: paths.length === endOfTheLine };
260
+ }
261
+ function resetPath(model, path, additionalProps) {
262
+ if (propUtils.getProp(model, "path") === path) {
263
+ return model;
264
+ }
265
+ const children = [];
266
+ React.Children.forEach(model.props.children, (child, i) => {
267
+ if (!propUtils.getProp(child, "path")) {
268
+ children.push(child);
269
+ } else {
270
+ children.push(resetPath(child, `${path}.${i}`));
271
+ }
272
+ });
273
+ const pathPropName = model.props["data-path"] ? "data-path" : "path";
274
+ return React.cloneElement(
275
+ model,
276
+ { [pathPropName]: path, ...additionalProps },
277
+ children
278
+ );
279
+ }
280
+
281
+ exports.containerOf = containerOf;
282
+ exports.findTarget = findTarget;
283
+ exports.followPath = followPath;
284
+ exports.followPathToComponent = followPathToComponent;
285
+ exports.followPathToParent = followPathToParent;
286
+ exports.getChild = getChild;
287
+ exports.nextLeaf = nextLeaf;
288
+ exports.nextStep = nextStep;
289
+ exports.previousLeaf = previousLeaf;
290
+ exports.resetPath = resetPath;
291
+ exports.resolveJSONPath = resolveJSONPath;
292
+ exports.resolvePath = resolvePath;
293
+ //# sourceMappingURL=pathUtils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pathUtils.js","sources":["../../src/utils/pathUtils.ts"],"sourcesContent":["import React, { isValidElement, ReactElement } from \"react\";\nimport { LayoutJSON, LayoutModel, WithActive } from \"../layout-reducer\";\nimport { isContainer } from \"../registry/ComponentRegistry\";\nimport { getProp, getProps } from \"./propUtils\";\nimport { typeOf } from \"./typeOf\";\n\nconst removeFinalPathSegment = (path: string) => {\n const pos = path.lastIndexOf(\".\");\n if (pos === -1) {\n return path;\n } else {\n return path.slice(0, pos);\n }\n};\n\nconst getChildren = (c: ReactElement) =>\n React.isValidElement(c.props.children)\n ? [c.props.children]\n : c.props.children;\n\n/**\n * This is a very specific function at the moment. It resolves a path of the form\n * '#{componentid}.ACTIVE_CHILD'\n * It allows a templated path to be resolved to a concrete path at runtime.\n * The above pattern is used to identify a layout drop target. Further patterns\n * will be added if needed.\n */\nexport const resolvePath = (source: ReactElement, path = \"\"): string => {\n const [step1, ...steps] = path.split(\".\");\n if (step1?.startsWith(\"#\")) {\n const node = findTargetById(source, step1.slice(1), true);\n if (node && steps.length) {\n return resolvePath(node, steps.join(\".\"));\n }\n } else if (step1 === \"ACTIVE_CHILD\") {\n const { active } = getProps(source);\n const children = getChildren(source);\n const { path } = getProps(children[active]);\n return path;\n }\n\n return \"\";\n};\n\n/**\n * Similar to resolvePath but operates on a JSON\n * layout structure and returns the matching JSON node.\n */\nexport const resolveJSONPath = (\n source: LayoutJSON,\n path = \"\"\n): LayoutJSON | undefined => {\n const [step1, ...steps] = path.split(\".\");\n if (step1?.startsWith(\"#\")) {\n const node = findTargetJSONById(source, step1.slice(1), true);\n if (node && steps.length) {\n return resolveJSONPath(node, steps.join(\".\"));\n }\n } else if (step1 === \"ACTIVE_CHILD\") {\n const { children, props } = source;\n const { active } = props as WithActive;\n if (typeof active === \"number\" && children?.[active]) {\n return children[active];\n }\n }\n return;\n};\n\nexport function followPathToParent(\n source: ReactElement,\n path: string\n): ReactElement | null {\n const { \"data-path\": dataPath, path: sourcePath = dataPath } =\n getProps(source);\n\n if (path === \"0\") return null;\n if (path === sourcePath) return null;\n\n return followPath(source, removeFinalPathSegment(path), true);\n}\n\nexport function findTarget(\n source: LayoutModel,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n test: (props: any) => boolean\n): LayoutModel | undefined {\n const { children, ...props } = getProps(source);\n if (test(props)) {\n return source;\n }\n if (React.Children.count(children) > 0) {\n const array = React.isValidElement(children) ? [children] : children;\n for (const child of array) {\n const target = findTarget(child, test);\n if (target) {\n return target;\n }\n }\n }\n}\n\nexport function containerOf(\n source: LayoutModel,\n target: LayoutModel\n): LayoutModel | null {\n if (target === source) {\n return null;\n }\n const { path: sourcePath, children } = getProps(source);\n const { idx, finalStep } = nextStep(sourcePath, getProp(target, \"path\"));\n if (finalStep) {\n return source;\n }\n if (children === undefined || children[idx] === undefined) {\n return null;\n }\n return containerOf(children[idx], target);\n}\n\nexport const getChild = (\n children: ReactElement[],\n idx: number\n): ReactElement | undefined => {\n if (React.isValidElement(children) && idx == 0) {\n return children;\n }\n if (Array.isArray(children)) {\n return children[idx];\n }\n};\n\nexport function followPathToComponent(component: ReactElement, path: string) {\n const paths = path.split(\".\");\n let children = [component];\n\n for (let i = 0; i < paths.length; i++) {\n const idx = parseInt(paths[i]);\n const child = children[idx];\n if (i === paths.length - 1) {\n return child;\n }\n children = getChildren(child);\n }\n}\n\nconst findTargetById = (\n source: ReactElement,\n id: string,\n throwIfNotFound = true\n): ReactElement | undefined => {\n const { children, id: idProp } = source.props;\n if (idProp === id) {\n return source;\n }\n\n if (React.Children.count(children) > 0) {\n const childArray = isValidElement(children) ? [children] : children;\n for (const child of childArray) {\n if (isValidElement(child)) {\n const target = findTargetById(child, id, false);\n if (target) {\n return target;\n }\n }\n }\n }\n\n if (throwIfNotFound === true) {\n throw Error(`pathUtils.findTargetById id #${id} not found in source`);\n }\n};\n\nconst findTargetJSONById = (\n source: LayoutJSON,\n id: string,\n throwIfNotFound = true\n): LayoutJSON | undefined => {\n const { children, id: idProp } = source;\n if (idProp === id) {\n return source;\n }\n\n if (Array.isArray(children) && children.length > 0) {\n for (const child of children) {\n if (child !== null && typeof child === \"object\") {\n const target = findTargetJSONById(child, id, false);\n if (target) {\n return target;\n }\n }\n }\n }\n\n if (throwIfNotFound === true) {\n throw Error(`pathUtils.findTargetJSONById id #${id} not found in source`);\n }\n};\n\nexport function followPath(\n source: LayoutModel,\n path: string\n): LayoutModel | undefined;\nexport function followPath(\n source: ReactElement,\n path: string,\n throwIfNotFound: true\n): ReactElement;\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function followPath(source: any, path: any, throwIfNotFound = false) {\n if (path.startsWith(\"#\")) {\n return findTargetById(source, path.slice(1), throwIfNotFound);\n }\n\n const { \"data-path\": dataPath, path: sourcePath = dataPath } =\n getProps(source);\n if (path.indexOf(sourcePath) !== 0) {\n throw Error(\n `pathUtils.followPath path ${path} is not within source path ${sourcePath}`\n );\n }\n const route = path.slice(sourcePath.length + 1);\n if (route === \"\") {\n return source;\n }\n\n let target = source;\n const paths = route.split(\".\");\n\n for (let i = 0; i < paths.length; i++) {\n if (React.Children.count(target.props.children) === 0) {\n const message = `element at 0.${paths\n .slice(0, i)\n .join(\".\")} has no children, so cannot fulfill rest of path ${paths\n .slice(i)\n .join(\".\")}`;\n\n if (throwIfNotFound) {\n throw Error(message);\n } else {\n console.warn(message);\n return;\n }\n }\n\n target = getChild(target.props.children, parseInt(paths[i]));\n\n if (target === undefined) {\n const message = `model at 0.${paths\n .slice(0, i)\n .join(\".\")} has no children that fulfill next step of path ${paths\n .slice(i)\n .join(\".\")}`;\n\n if (throwIfNotFound) {\n throw Error(message);\n } else {\n console.warn(message);\n }\n }\n }\n return target;\n}\n\nexport function nextLeaf(root: ReactElement, path: string) {\n const parent = followPathToParent(root, path);\n let pathIndices = path.split(\".\").map((idx) => parseInt(idx, 10));\n if (parent) {\n const lastIdx = pathIndices.pop();\n const { children } = parent.props;\n if (children.length - 1 > lastIdx!) {\n return firstLeaf(children[lastIdx! + 1]);\n } else {\n const parentIdx = pathIndices.pop();\n const nextParent = followPathToParent(root, getProp(parent, \"path\"));\n if (nextParent && typeof parentIdx === \"number\") {\n pathIndices = nextParent.props.path\n .split(\".\")\n .map((idx: string) => parseInt(idx, 10));\n if (nextParent.props.children.length - 1 > parentIdx) {\n const nextStep = nextParent.props.children[parentIdx + 1];\n if (isContainer(typeOf(nextStep) as string)) {\n return firstLeaf(nextStep);\n } else {\n return nextStep;\n }\n }\n }\n }\n }\n\n return firstLeaf(root);\n}\n\nexport function previousLeaf(root: ReactElement, path: string) {\n const pathIndices = path.split(\".\").map((idx) => parseInt(idx, 10));\n let lastIdx = pathIndices.pop();\n let parent = followPathToParent(root, path);\n if (parent != null && typeof lastIdx === \"number\") {\n const { children } = parent.props;\n if (lastIdx > 0) {\n return lastLeaf(children[lastIdx - 1]);\n } else {\n while (pathIndices.length > 1) {\n lastIdx = pathIndices.pop() as number;\n parent = followPathToParent(\n root,\n getProp(parent, \"path\")\n ) as ReactElement;\n if (lastIdx > 0) {\n const nextStep = parent.props.children[lastIdx - 1];\n if (isContainer(typeOf(nextStep) as string)) {\n return lastLeaf(nextStep);\n }\n return nextStep;\n }\n }\n }\n }\n return lastLeaf(root);\n}\n\nfunction firstLeaf(layoutRoot: ReactElement): ReactElement {\n if (isContainer(typeOf(layoutRoot) as string)) {\n const { children } = layoutRoot.props || layoutRoot;\n return firstLeaf(children[0]);\n }\n return layoutRoot;\n}\n\nfunction lastLeaf(root: ReactElement): ReactElement {\n if (isContainer(typeOf(root) as string)) {\n const { children } = root.props || root;\n return lastLeaf(children[children.length - 1]);\n }\n return root;\n}\n\ntype NextStepResult = {\n idx: number;\n finalStep: boolean;\n};\n\nexport function nextStep(\n pathSoFar: string,\n targetPath: string,\n followPathToEnd = false\n): NextStepResult {\n if (pathSoFar === targetPath) {\n return { idx: -1, finalStep: true };\n }\n\n const pathVisited = `${pathSoFar}.`;\n if (!targetPath.startsWith(pathVisited)) {\n throw Error(\"pathUtils nextStep has strayed from the path\");\n }\n\n const endOfTheLine = followPathToEnd ? 0 : 1;\n const paths = targetPath\n .replace(pathVisited, \"\")\n .split(\".\")\n .map((n) => parseInt(n, 10));\n return { idx: paths[0], finalStep: paths.length === endOfTheLine };\n}\n\nexport function resetPath(\n model: ReactElement,\n path: string,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n additionalProps?: any\n): ReactElement {\n if (getProp(model, \"path\") === path) {\n return model;\n }\n const children: ReactElement[] = [];\n React.Children.forEach(model.props.children, (child, i) => {\n if (!getProp(child, \"path\")) {\n children.push(child);\n } else {\n children.push(resetPath(child, `${path}.${i}`));\n }\n });\n const pathPropName = model.props[\"data-path\"] ? \"data-path\" : \"path\";\n return React.cloneElement(\n model,\n { [pathPropName]: path, ...additionalProps },\n children\n );\n}\n"],"names":["getProps","path","getProp","isValidElement","nextStep","isContainer","typeOf"],"mappings":";;;;;;;AAMA,MAAM,sBAAA,GAAyB,CAAC,IAAiB,KAAA;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AQ,CAAA,KAAA,EAAO,MAAM,CAAA,KAAM,IAAM,EAAA;AACnC,IAAO,OAAA,KAAA,CAAA;AAAA,GACT;AACA,EAAA,MAAM,WAA2B,EAAC,CAAA;AAClC,EAAA,KAAA,CAAM,SAAS,OAAQ,CAAA,KAAA,CAAM,MAAM,QAAU,EAAA,CAAC,OAAO,CAAM,KAAA;AACzD,IAAA,IAAI,CAACA,iBAAA,CAAQ,KAAO,EAAA,MAAM,CAAG,EAAA;AAC3B,MAAA,QAAA,CAAS,KAAK,KAAK,CAAA,CAAA;AAAA,KACd,MAAA;AACL,MAAS,QAAA,CAAA,IAAA,CAAK,UAAU,KAAO,EAAA,CAAA,EAAG,IAAI,CAAI,CAAA,EAAA,CAAC,EAAE,CAAC,CAAA,CAAA;AAAA,KAChD;AAAA,GACD,CAAA,CAAA;AACD,EAAA,MAAM,YAAe,GAAA,KAAA,CAAM,KAAM,CAAA,WAAW,IAAI,WAAc,GAAA,MAAA,CAAA;AAC9D,EAAA,OAAO,KAAM,CAAA,YAAA;AAAA,IACX,KAAA;AAAA,IACA,EAAE,CAAC,YAAY,GAAG,IAAA,EAAM,GAAG,eAAgB,EAAA;AAAA,IAC3C,QAAA;AAAA,GACF,CAAA;AACF;;;;;;;;;;;;;;;"}
@@ -0,0 +1,27 @@
1
+ 'use strict';
2
+
3
+ const NO_PROPS = {};
4
+ const getProp = (component, propName) => {
5
+ const props = getProps(component);
6
+ return props[propName] ?? props[`data-${propName}`];
7
+ };
8
+ const getProps = (component) => component?.props || component || NO_PROPS;
9
+ const getChildProp = (container) => {
10
+ const props = getProps(container);
11
+ if (props.children) {
12
+ const {
13
+ children: [target, ...rest]
14
+ } = props;
15
+ if (rest.length > 0) {
16
+ console.warn(
17
+ `getChild expected a single child, found ${rest.length + 1}`
18
+ );
19
+ }
20
+ return target;
21
+ }
22
+ };
23
+
24
+ exports.getChildProp = getChildProp;
25
+ exports.getProp = getProp;
26
+ exports.getProps = getProps;
27
+ //# sourceMappingURL=propUtils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"propUtils.js","sources":["../../src/utils/propUtils.ts"],"sourcesContent":["import { ReactElement } from \"react\";\nimport { LayoutModel } from \"../layout-reducer\";\n\nconst NO_PROPS = {};\nexport const getProp = (\n component: LayoutModel | undefined,\n propName: string\n) => {\n const props = getProps(component);\n return props[propName] ?? props[`data-${propName}`];\n};\n\nexport const getProps = (component?: LayoutModel) =>\n component?.props || component || NO_PROPS;\n\nexport const getChildProp = (container: LayoutModel) => {\n const props = getProps(container);\n if (props.children) {\n const {\n children: [target, ...rest],\n } = props;\n if (rest.length > 0) {\n console.warn(\n `getChild expected a single child, found ${rest.length + 1}`\n );\n }\n return target as ReactElement;\n }\n};\n"],"names":[],"mappings":";;AAGA,MAAM,WAAW,EAAC,CAAA;AACL,MAAA,OAAA,GAAU,CACrB,SAAA,EACA,QACG,KAAA;AACH,EAAM,MAAA,KAAA,GAAQ,SAAS,SAAS,CAAA,CAAA;AAChC,EAAA,OAAO,MAAM,QAAQ,CAAA,IAAK,KAAM,CAAA,CAAA,KAAA,EAAQ,QAAQ,CAAE,CAAA,CAAA,CAAA;AACpD,EAAA;AAEO,MAAM,QAAW,GAAA,CAAC,SACvB,KAAA,SAAA,EAAW,SAAS,SAAa,IAAA,SAAA;AAEtB,MAAA,YAAA,GAAe,CAAC,SAA2B,KAAA;AACtD,EAAM,MAAA,KAAA,GAAQ,SAAS,SAAS,CAAA,CAAA;AAChC,EAAA,IAAI,MAAM,QAAU,EAAA;AAClB,IAAM,MAAA;AAAA,MACJ,QAAU,EAAA,CAAC,MAAQ,EAAA,GAAG,IAAI,CAAA;AAAA,KACxB,GAAA,KAAA,CAAA;AACJ,IAAI,IAAA,IAAA,CAAK,SAAS,CAAG,EAAA;AACnB,MAAQ,OAAA,CAAA,IAAA;AAAA,QACN,CAAA,wCAAA,EAA2C,IAAK,CAAA,MAAA,GAAS,CAAC,CAAA,CAAA;AAAA,OAC5D,CAAA;AAAA,KACF;AACA,IAAO,OAAA,MAAA,CAAA;AAAA,GACT;AACF;;;;;;"}
@@ -0,0 +1,12 @@
1
+ 'use strict';
2
+
3
+ function setRef(ref, value) {
4
+ if (typeof ref === "function") {
5
+ ref(value);
6
+ } else if (ref) {
7
+ ref.current = value;
8
+ }
9
+ }
10
+
11
+ exports.setRef = setRef;
12
+ //# sourceMappingURL=refUtils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"refUtils.js","sources":["../../src/utils/refUtils.ts"],"sourcesContent":["import { MutableRefObject } from \"react\";\n\nexport function setRef<T>(\n ref:\n | MutableRefObject<T | null>\n | ((instance: T | null) => void)\n | null\n | undefined,\n value: T | null\n): void {\n if (typeof ref === \"function\") {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}\n"],"names":[],"mappings":";;AAEgB,SAAA,MAAA,CACd,KAKA,KACM,EAAA;AACN,EAAI,IAAA,OAAO,QAAQ,UAAY,EAAA;AAC7B,IAAA,GAAA,CAAI,KAAK,CAAA,CAAA;AAAA,aACA,GAAK,EAAA;AACd,IAAA,GAAA,CAAI,OAAU,GAAA,KAAA,CAAA;AAAA,GAChB;AACF;;;;"}
@@ -0,0 +1,15 @@
1
+ 'use strict';
2
+
3
+ const expandFlex = (flex) => {
4
+ if (typeof flex !== "number") {
5
+ throw Error(`"no support yet for flex value ${flex}`);
6
+ }
7
+ return {
8
+ flexBasis: 0,
9
+ flexGrow: 1,
10
+ flexShrink: 1
11
+ };
12
+ };
13
+
14
+ exports.expandFlex = expandFlex;
15
+ //# sourceMappingURL=styleUtils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styleUtils.js","sources":["../../src/utils/styleUtils.ts"],"sourcesContent":["import { CSSProperties } from 'react';\nexport type CSSFlexProperties = Pick<CSSProperties, 'flexBasis' | 'flexGrow' | 'flexShrink'>;\n\nexport const expandFlex = (flex: number | CSSFlexProperties): CSSFlexProperties => {\n if (typeof flex !== 'number') {\n throw Error(`\"no support yet for flex value ${flex}`);\n }\n return {\n flexBasis: 0,\n flexGrow: 1,\n flexShrink: 1\n };\n};\n"],"names":[],"mappings":";;AAGa,MAAA,UAAA,GAAa,CAAC,IAAwD,KAAA;AACjF,EAAI,IAAA,OAAO,SAAS,QAAU,EAAA;AAC5B,IAAM,MAAA,KAAA,CAAM,CAAkC,+BAAA,EAAA,IAAI,CAAE,CAAA,CAAA,CAAA;AAAA,GACtD;AACA,EAAO,OAAA;AAAA,IACL,SAAW,EAAA,CAAA;AAAA,IACX,QAAU,EAAA,CAAA;AAAA,IACV,UAAY,EAAA,CAAA;AAAA,GACd,CAAA;AACF;;;;"}
@@ -0,0 +1,27 @@
1
+ 'use strict';
2
+
3
+ function typeOf(element) {
4
+ if (element) {
5
+ const type = element.type;
6
+ if (typeof type === "function" || typeof type === "object") {
7
+ const elementName = type.displayName || type.name || type.type?.name;
8
+ if (typeof elementName === "string") {
9
+ return elementName;
10
+ }
11
+ }
12
+ if (typeof element.type === "string") {
13
+ return element.type;
14
+ }
15
+ if (element.constructor) {
16
+ return element.constructor.displayName;
17
+ }
18
+ throw Error(`typeOf unable to determine type of element`);
19
+ }
20
+ }
21
+ const isTypeOf = (element, type) => typeOf(element) === type;
22
+ const isLayoutJSON = (layout) => layout !== void 0 && "type" in layout;
23
+
24
+ exports.isLayoutJSON = isLayoutJSON;
25
+ exports.isTypeOf = isTypeOf;
26
+ exports.typeOf = typeOf;
27
+ //# sourceMappingURL=typeOf.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typeOf.js","sources":["../../src/utils/typeOf.ts"],"sourcesContent":["import { ReactElement } from 'react';\nimport { LayoutJSON, LayoutModel, WithType } from '../layout-reducer';\n\nexport function typeOf(element?: LayoutModel | WithType): string | undefined {\n if (element) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const type = element.type as any;\n if (typeof type === 'function' || typeof type === 'object') {\n const elementName = type.displayName || type.name || type.type?.name;\n if (typeof elementName === 'string') {\n return elementName;\n }\n }\n if (typeof element.type === 'string') {\n return element.type;\n }\n if (element.constructor) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return (element.constructor as any).displayName as string;\n }\n throw Error(`typeOf unable to determine type of element`);\n }\n}\n\nexport const isTypeOf = (element: ReactElement, type: string) => typeOf(element) === type;\n\nexport const isLayoutJSON = (layout: LayoutJSON): layout is LayoutJSON =>\n layout !== undefined && \"type\" in layout;\n"],"names":[],"mappings":";;AAGO,SAAS,OAAO,OAAsD,EAAA;AAC3E,EAAA,IAAI,OAAS,EAAA;AAEX,IAAA,MAAM,OAAO,OAAQ,CAAA,IAAA,CAAA;AACrB,IAAA,IAAI,OAAO,IAAA,KAAS,UAAc,IAAA,OAAO,SAAS,QAAU,EAAA;AAC1D,MAAA,MAAM,cAAc,IAAK,CAAA,WAAA,IAAe,IAAK,CAAA,IAAA,IAAQ,KAAK,IAAM,EAAA,IAAA,CAAA;AAChE,MAAI,IAAA,OAAO,gBAAgB,QAAU,EAAA;AACnC,QAAO,OAAA,WAAA,CAAA;AAAA,OACT;AAAA,KACF;AACA,IAAI,IAAA,OAAO,OAAQ,CAAA,IAAA,KAAS,QAAU,EAAA;AACpC,MAAA,OAAO,OAAQ,CAAA,IAAA,CAAA;AAAA,KACjB;AACA,IAAA,IAAI,QAAQ,WAAa,EAAA;AAEvB,MAAA,OAAQ,QAAQ,WAAoB,CAAA,WAAA,CAAA;AAAA,KACtC;AACA,IAAA,MAAM,MAAM,CAA4C,0CAAA,CAAA,CAAA,CAAA;AAAA,GAC1D;AACF,CAAA;AAEO,MAAM,WAAW,CAAC,OAAA,EAAuB,IAAiB,KAAA,MAAA,CAAO,OAAO,CAAM,KAAA,KAAA;AAE9E,MAAM,YAAe,GAAA,CAAC,MAC3B,KAAA,MAAA,KAAW,UAAa,MAAU,IAAA;;;;;;"}
@@ -0,0 +1,12 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { forwardRef } from 'react';
3
+ import { registerComponent } from './registry/ComponentRegistry.js';
4
+
5
+ const Component = forwardRef(function Component2({ resizeable, ...props }, ref) {
6
+ return /* @__PURE__ */ jsx("div", { ...props, className: "Component", ref });
7
+ });
8
+ Component.displayName = "Component";
9
+ registerComponent("Component", Component);
10
+
11
+ export { Component as default };
12
+ //# sourceMappingURL=Component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Component.js","sources":["../src/Component.tsx"],"sourcesContent":["import React, { forwardRef, HTMLAttributes } from 'react';\nimport { registerComponent } from './registry/ComponentRegistry';\n\nimport './Component.css';\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);\n"],"names":["Component"],"mappings":";;;;AASM,MAAA,SAAA,GAAY,WAAW,SAASA,UAAAA,CACpC,EAAE,UAAY,EAAA,GAAG,KAAM,EAAA,EACvB,GACA,EAAA;AACA,EAAA,2BAAQ,KAAK,EAAA,EAAA,GAAG,KAAO,EAAA,SAAA,EAAU,aAAY,GAAU,EAAA,CAAA,CAAA;AACzD,CAAC,EAAA;AACD,SAAA,CAAU,WAAc,GAAA,WAAA,CAAA;AAIxB,iBAAA,CAAkB,aAAa,SAAS,CAAA;;;;"}
@@ -0,0 +1,4 @@
1
+ var draggableLayoutCss = ".DraggableLayout {\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";
2
+
3
+ export { draggableLayoutCss as default };
4
+ //# sourceMappingURL=DraggableLayout.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DraggableLayout.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -0,0 +1,31 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import cx from 'clsx';
3
+ import { useComponentCssInjection } from '@salt-ds/styles';
4
+ import { useWindow } from '@salt-ds/window';
5
+ import { forwardRef } from 'react';
6
+ import { registerComponent } from './registry/ComponentRegistry.js';
7
+ import draggableLayoutCss from './DraggableLayout.css.js';
8
+
9
+ const DraggableLayout = forwardRef(function DraggableLayout2({
10
+ children,
11
+ className: classNameProp,
12
+ dropTarget,
13
+ resizeable: _,
14
+ // ignore, its just a marker used by the layout system
15
+ ...htmlAttributes
16
+ }, forwardedRef) {
17
+ const targetWindow = useWindow();
18
+ useComponentCssInjection({
19
+ testId: "vuu-draggable-layout",
20
+ css: draggableLayoutCss,
21
+ window: targetWindow
22
+ });
23
+ const className = cx("DraggableLayout", classNameProp);
24
+ return /* @__PURE__ */ jsx("div", { className, ref: forwardedRef, ...htmlAttributes, children });
25
+ });
26
+ const componentName = "DraggableLayout";
27
+ DraggableLayout.displayName = componentName;
28
+ registerComponent(componentName, DraggableLayout, "container");
29
+
30
+ export { DraggableLayout };
31
+ //# sourceMappingURL=DraggableLayout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DraggableLayout.js","sources":["../src/DraggableLayout.tsx"],"sourcesContent":["import classnames from \"clsx\";\nimport { useComponentCssInjection } from \"@salt-ds/styles\";\nimport { useWindow } from \"@salt-ds/window\";\nimport { ForwardedRef, forwardRef, HTMLAttributes } from \"react\";\nimport { registerComponent } from \"./registry/ComponentRegistry\";\n\nimport draggableLayoutCss from \"./DraggableLayout.css\";\n\nexport interface DraggableLayoutProps extends HTMLAttributes<HTMLDivElement> {\n dropTarget?: boolean;\n resizeable?: boolean;\n}\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const DraggableLayout = forwardRef(function DraggableLayout(\n {\n children,\n className: classNameProp,\n dropTarget,\n resizeable: _, // ignore, its just a marker used by the layout system\n ...htmlAttributes\n }: DraggableLayoutProps,\n forwardedRef: ForwardedRef<HTMLDivElement>\n) {\n const targetWindow = useWindow();\n useComponentCssInjection({\n testId: \"vuu-draggable-layout\",\n css: draggableLayoutCss,\n window: targetWindow,\n });\n\n const className = classnames(\"DraggableLayout\", classNameProp);\n return (\n <div className={className} ref={forwardedRef} {...htmlAttributes}>\n {children}\n </div>\n );\n});\n\nconst componentName = \"DraggableLayout\";\n\nDraggableLayout.displayName = componentName;\n\nregisterComponent(componentName, DraggableLayout, \"container\");\n"],"names":["DraggableLayout","classnames"],"mappings":";;;;;;;;AAaa,MAAA,eAAA,GAAkB,UAAW,CAAA,SAASA,gBACjD,CAAA;AAAA,EACE,QAAA;AAAA,EACA,SAAW,EAAA,aAAA;AAAA,EACX,UAAA;AAAA,EACA,UAAY,EAAA,CAAA;AAAA;AAAA,EACZ,GAAG,cAAA;AACL,CAAA,EACA,YACA,EAAA;AACA,EAAA,MAAM,eAAe,SAAU,EAAA,CAAA;AAC/B,EAAyB,wBAAA,CAAA;AAAA,IACvB,MAAQ,EAAA,sBAAA;AAAA,IACR,GAAK,EAAA,kBAAA;AAAA,IACL,MAAQ,EAAA,YAAA;AAAA,GACT,CAAA,CAAA;AAED,EAAM,MAAA,SAAA,GAAYC,EAAW,CAAA,iBAAA,EAAmB,aAAa,CAAA,CAAA;AAC7D,EAAA,2BACG,KAAI,EAAA,EAAA,SAAA,EAAsB,KAAK,YAAe,EAAA,GAAG,gBAC/C,QACH,EAAA,CAAA,CAAA;AAEJ,CAAC,EAAA;AAED,MAAM,aAAgB,GAAA,iBAAA,CAAA;AAEtB,eAAA,CAAgB,WAAc,GAAA,aAAA,CAAA;AAE9B,iBAAkB,CAAA,aAAA,EAAe,iBAAiB,WAAW,CAAA;;;;"}
@@ -0,0 +1,4 @@
1
+ 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";
2
+
3
+ export { dockLayoutCss as default };
4
+ //# sourceMappingURL=DockLayout.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DockLayout.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -0,0 +1,34 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { partition } from '@vuu-ui/vuu-utils';
3
+ import cx from 'clsx';
4
+ import { useComponentCssInjection } from '@salt-ds/styles';
5
+ import { useWindow } from '@salt-ds/window';
6
+ import { registerComponent } from '../registry/ComponentRegistry.js';
7
+ import Drawer from './Drawer.js';
8
+ import dockLayoutCss from './DockLayout.css.js';
9
+
10
+ const isDrawer = (component) => component.type === Drawer;
11
+ const isVertical = ({ props: { position = "left" } }) => position.match(/top|bottom/);
12
+ const DockLayout = (props) => {
13
+ const targetWindow = useWindow();
14
+ useComponentCssInjection({
15
+ testId: "vuu-dock-layput",
16
+ css: dockLayoutCss,
17
+ window: targetWindow
18
+ });
19
+ const { children, className: classNameProp, id, style } = props;
20
+ const classBase = "vuuDockLayout";
21
+ const [drawers, content] = partition(children, isDrawer);
22
+ const [verticalDrawers, horizontalDrawers] = partition(drawers, isVertical);
23
+ const orientation = verticalDrawers.length === 0 ? "horizontal" : horizontalDrawers.length === 0 ? "vertical" : "both";
24
+ const className = cx(classBase, classNameProp, `${classBase}-${orientation}`);
25
+ return /* @__PURE__ */ jsxs("div", { className, id, style, children: [
26
+ drawers,
27
+ /* @__PURE__ */ jsx("div", { className: `${classBase}-content`, children: content })
28
+ ] });
29
+ };
30
+ DockLayout.displayName = "DockLayout";
31
+ registerComponent("DockLayout", DockLayout, "container");
32
+
33
+ export { DockLayout as default };
34
+ //# sourceMappingURL=DockLayout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DockLayout.js","sources":["../../src/dock-layout/DockLayout.tsx"],"sourcesContent":["import { partition } from \"@vuu-ui/vuu-utils\";\nimport cx from \"clsx\";\nimport { useComponentCssInjection } from \"@salt-ds/styles\";\nimport { useWindow } from \"@salt-ds/window\";\nimport { HTMLAttributes, ReactElement } from \"react\";\nimport { registerComponent } from \"../registry/ComponentRegistry\";\nimport Drawer from \"./Drawer\";\n\nimport dockLayoutCss from \"./DockLayout.css\";\n\nconst isDrawer = (component: ReactElement) => component.type === Drawer;\nconst isVertical = ({ props: { position = \"left\" } }: ReactElement) =>\n position.match(/top|bottom/);\n\nexport interface DockLayoutProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactElement[];\n}\n\nconst DockLayout = (props: DockLayoutProps) => {\n const targetWindow = useWindow();\n useComponentCssInjection({\n testId: \"vuu-dock-layput\",\n css: dockLayoutCss,\n window: targetWindow,\n });\n\n const { children, className: classNameProp, id, style } = props;\n const classBase = \"vuuDockLayout\";\n const [drawers, content] = partition(children, isDrawer);\n const [verticalDrawers, horizontalDrawers] = partition(drawers, isVertical);\n const orientation =\n verticalDrawers.length === 0\n ? \"horizontal\"\n : horizontalDrawers.length === 0\n ? \"vertical\"\n : \"both\";\n\n const className = cx(classBase, classNameProp, `${classBase}-${orientation}`);\n\n return (\n <div className={className} id={id} style={style}>\n {drawers}\n <div className={`${classBase}-content`}>{content}</div>\n </div>\n );\n};\nDockLayout.displayName = \"DockLayout\";\n\nexport default DockLayout;\n\nregisterComponent(\"DockL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S,YAAa,QAAQ,EAAA,OAAA,EAAA,CAAA;AAAA,GACnD,EAAA,CAAA,CAAA;AAEJ,EAAA;AACA,UAAA,CAAW,WAAc,GAAA,YAAA,CAAA;AAIzB,iBAAkB,CAAA,YAAA,EAAc,YAAY,WAAW,CAAA;;;;"}
@@ -0,0 +1,4 @@
1
+ var drawerCss = ".vuuDrawer {\n --drawer-leading-edge-border: solid 1px var(--salt-container-primary-borderColor, none);\n --vuu-close-icon-svg: var(--svg-chevron-double-right);\n\n transition: flex-basis;\n transition-duration: var(--drawer-transition-duration);\n position: relative;\n z-index: 1;\n flex-basis: 0;\n flex-grow: 1;\n flex-shrink: 1;\n min-width: 0;\n min-height: 0;\n display: flex;\n}\n\n.vuuDrawer-peekaboo {\n flex-basis: var(--drawer-peek-size);\n flex-grow: 0;\n flex-shrink: 0;\n}\n\n.vuuDrawer-inline.vuuDrawer-open {\n flex-basis: var(--drawer-size);\n flex-grow: 0;\n flex-shrink: 0;\n}\n\n.vuuDrawer-liner {\n background-color: var(--drawer-bg);\n overflow: hidden;\n position: relative;\n}\n\n.vuuDrawer-content {\n height: 100%;\n overflow: hidden;\n position: absolute;\n top: 0;\n right: var(--drawer-peek-size);\n transition: right;\n transition-duration: var(--drawer-transition-duration);\n width: 100%;\n flex: 1 1 100%;\n}\n\n.vuuDrawer-open .vuuDrawer-content {\n right: 0;\n}\n\n/* .vuuDrawer:not(.vuuDrawer-open) .vuuDrawer-liner > * {\n display: none;\n} */\n\n.vuuDrawer-left {\n border-right: var(--drawer-leading-edge-border);\n}\n.vuuDrawer-right {\n border-left: var(--drawer-leading-edge-border);\n}\n.vuuDrawer-top {\n border-bottom: var(--drawer-leading-edge-border);\n}\n.vuuDrawer-bottom {\n border-top: var(--drawer-leading-edge-border);\n}\n\n.vuuDrawer-left .vuuDrawer-liner,\n.vuuDrawer-right .vuuDrawer-liner {\n height: 100%;\n transition: width;\n}\n\n.vuuDrawer-top .vuuDrawer-liner,\n.vuuDrawer-bottom .vuuDrawer-liner {\n width: 100%;\n transition: height;\n}\n\n.vuuDrawer-inline .vuuDrawer-liner {\n width: 100%;\n height: 100%;\n}\n\n.vuuDrawer-over .vuuDrawer-liner {\n position: absolute;\n transition-duration: 0.4s;\n}\n\n.vuuDrawer-over.vuuDrawer-left .vuuDrawer-liner {\n top: 0;\n left: 0;\n width: 0;\n}\n\n.vuuDrawer-over.vuuDrawer-right .vuuDrawer-liner {\n top: 0;\n right: 0;\n width: 0;\n}\n\n.vuuDrawer-over.vuuDrawer-top .vuuDrawer-liner {\n height: 0;\n top: 0;\n left: 0;\n}\n\n.vuuDrawer-over.vuuDrawer-bottom .vuuDrawer-liner {\n bottom: 0;\n height: 0;\n left: 0;\n}\n\n.vuuDrawer-left.vuuDrawer-over.vuuDrawer-peekaboo .vuuDrawer-liner,\n.vuuDrawer-right.vuuDrawer-over.vuuDrawer-peekaboo .vuuDrawer-liner {\n width: var(--drawer-peek-size);\n}\n\n.vuuDrawer-top.vuuDrawer-over.vuuDrawer-peekaboo .vuuDrawer-liner,\n.vuuDrawer-bottom.vuuDrawer-over.vuuDrawer-peekaboo .vuuDrawer-liner {\n height: var(--drawer-peek-size);\n}\n\n.vuuDrawer-left.vuuDrawer-over.vuuDrawer-open .vuuDrawer-liner,\n.vuuDrawer-right.vuuDrawer-over.vuuDrawer-open .vuuDrawer-liner {\n width: var(--drawer-size);\n}\n\n.vuuDrawer-top.vuuDrawer-over.vuuDrawer-open .vuuDrawer-liner,\n.vuuDrawer-bottom.vuuDrawer-over.vuuDrawer-open .vuuDrawer-liner {\n height: var(--drawer-size);\n}\n\n.vuuDrawer-top,\n.vuuDrawer-left {\n order: 0;\n}\n\n.vuuDrawer-bottom,\n.vuuDrawer-right {\n order: 99;\n}\n\n.vuuDrawer-left,\n.vuuDrawer-right {\n flex-direction: column;\n}\n\n.vuuToggleButton-container {\n --saltButton-height: 28px;\n --saltButton-width: 28px;\n --vuu-icon-size: 12px;\n flex: 0 0 28px;\n}\n\n.vuuDrawer-open {\n --vuu-close-icon-svg: var(--svg-chevron-double-left);\n\n}\n";
2
+
3
+ export { drawerCss as default };
4
+ //# sourceMappingURL=Drawer.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Drawer.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}