@vuu-ui/vuu-layout 0.6.10-debug → 0.6.11-debug-debug
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.
- package/cjs/index.js +5659 -4
- package/cjs/index.js.map +2 -2
- package/esm/index.js +5665 -4
- package/esm/index.js.map +2 -2
- package/index.css +766 -1
- package/index.css.map +1 -1
- package/package.json +6 -4
- package/types/Component.d.ts +7 -0
- package/types/DraggableLayout.d.ts +6 -0
- package/types/chest-of-drawers/Chest.d.ts +10 -0
- package/types/chest-of-drawers/Drawer.d.ts +18 -0
- package/types/chest-of-drawers/index.d.ts +2 -0
- package/types/common-types.d.ts +8 -0
- package/types/debug.d.ts +2 -0
- package/types/drag-drop/BoxModel.d.ts +143 -0
- package/types/drag-drop/DragState.d.ts +46 -0
- package/types/drag-drop/Draggable.d.ts +23 -0
- package/types/drag-drop/DropMenu.d.ts +10 -0
- package/types/drag-drop/DropTarget.d.ts +61 -0
- package/types/drag-drop/DropTargetRenderer.d.ts +18 -0
- package/types/drag-drop/dragDropTypes.d.ts +51 -0
- package/types/drag-drop/index.d.ts +4 -0
- package/types/flexbox/Flexbox.d.ts +5 -0
- package/types/flexbox/FlexboxLayout.d.ts +6 -0
- package/types/flexbox/FluidGrid.d.ts +7 -0
- package/types/flexbox/FluidGridLayout.d.ts +6 -0
- package/types/flexbox/Splitter.d.ts +13 -0
- package/types/flexbox/flexbox-utils.d.ts +12 -0
- package/types/flexbox/flexboxTypes.d.ts +51 -0
- package/types/flexbox/index.d.ts +4 -0
- package/types/flexbox/useResponsiveSizing.d.ts +10 -0
- package/types/flexbox/useSplitterResizing.d.ts +2 -0
- package/types/index.d.ts +18 -0
- package/types/layout-action.d.ts +21 -0
- package/types/layout-header/ActionButton.d.ts +8 -0
- package/types/layout-header/Header.d.ts +13 -0
- package/types/layout-header/index.d.ts +1 -0
- package/types/layout-provider/LayoutProvider.d.ts +14 -0
- package/types/layout-provider/LayoutProviderContext.d.ts +8 -0
- package/types/layout-provider/index.d.ts +2 -0
- package/types/layout-provider/useLayoutDragDrop.d.ts +4 -0
- package/types/layout-reducer/flexUtils.d.ts +22 -0
- package/types/layout-reducer/index.d.ts +4 -0
- package/types/layout-reducer/insert-layout-element.d.ts +8 -0
- package/types/layout-reducer/layout-reducer.d.ts +3 -0
- package/types/layout-reducer/layoutTypes.d.ts +130 -0
- package/types/layout-reducer/layoutUtils.d.ts +28 -0
- package/types/layout-reducer/remove-layout-element.d.ts +3 -0
- package/types/layout-reducer/replace-layout-element.d.ts +6 -0
- package/types/layout-reducer/resize-flex-children.d.ts +3 -0
- package/types/layout-reducer/wrap-layout-element.d.ts +9 -0
- package/types/layout-view/View.d.ts +11 -0
- package/types/layout-view/ViewContext.d.ts +18 -0
- package/types/layout-view/index.d.ts +4 -0
- package/types/layout-view/useView.d.ts +21 -0
- package/types/layout-view/useViewActionDispatcher.d.ts +8 -0
- package/types/layout-view/useViewResize.d.ts +7 -0
- package/types/layout-view/viewTypes.d.ts +18 -0
- package/types/palette/Palette.d.ts +18 -0
- package/types/palette/PaletteSalt.d.ts +14 -0
- package/types/palette/index.d.ts +2 -0
- package/types/placeholder/Placeholder.d.ts +12 -0
- package/types/placeholder/index.d.ts +1 -0
- package/types/registry/ComponentRegistry.d.ts +14 -0
- package/types/registry/index.d.ts +1 -0
- package/types/responsive/breakpoints.d.ts +4 -0
- package/types/responsive/index.d.ts +3 -0
- package/types/responsive/measureMinimumNodeSize.d.ts +1 -0
- package/types/responsive/overflowUtils.d.ts +2 -0
- package/types/responsive/use-breakpoints.d.ts +7 -0
- package/types/responsive/useResizeObserver.d.ts +12 -0
- package/types/responsive/utils.d.ts +6 -0
- package/types/stack/Stack.d.ts +4 -0
- package/types/stack/StackLayout.d.ts +7 -0
- package/types/stack/index.d.ts +3 -0
- package/types/stack/stackTypes.d.ts +20 -0
- package/types/tabs/TabPanel.d.ts +7 -0
- package/types/tabs/index.d.ts +1 -0
- package/types/tools/config-wrapper/ConfigWrapper.d.ts +2 -0
- package/types/tools/config-wrapper/index.d.ts +1 -0
- package/types/tools/devtools-box/layout-configurator.d.ts +31 -0
- package/types/tools/devtools-tree/layout-tree-viewer.d.ts +5 -0
- package/types/tools/index.d.ts +3 -0
- package/types/use-persistent-state.d.ts +11 -0
- package/types/utils/index.d.ts +5 -0
- package/types/utils/pathUtils.d.ts +18 -0
- package/types/utils/propUtils.d.ts +5 -0
- package/types/utils/refUtils.d.ts +2 -0
- package/types/utils/styleUtils.d.ts +3 -0
- package/types/utils/typeOf.d.ts +4 -0
package/index.css.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../packages/vuu-layout/src/chest-of-drawers/Drawer.css", "../../../packages/vuu-layout/src/chest-of-drawers/Chest.css", "../../../packages/vuu-layout/src/drag-drop/DropMenu.css", "../../../packages/vuu-layout/src/drag-drop/DropTargetRenderer.css", "../../../packages/vuu-layout/src/DraggableLayout.css", "../../../packages/vuu-layout/src/placeholder/Placeholder.css", "../../../packages/vuu-layout/src/flexbox/Splitter.css", "../../../packages/vuu-layout/src/flexbox/Flexbox.css", "../../../packages/vuu-layout/src/flexbox/FluidGrid.css", "../../../packages/vuu-layout/src/layout-view/View.css", "../../../packages/vuu-layout/src/layout-header/Header.css", "../../../packages/vuu-layout/src/palette/Palette.css", "../../../packages/vuu-layout/src/palette/PaletteSalt.css", "../../../packages/vuu-layout/src/stack/Stack.css", "../../../packages/vuu-layout/src/tools/devtools-box/layout-configurator.css", "../../../packages/vuu-layout/src/tools/devtools-tree/layout-tree-viewer.css"],
|
|
4
4
|
"sourcesContent": [".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", ".hwChest {\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.hwChest-horizontal {\n flex-direction: row;\n}\n\n.hwChest-vertical {\n flex-direction: column;\n}\n\n.hwChest-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.hwChest-horizontal .hwChest-content {\n flex-basis: 100%;\n}\n\n.hwChest-vertical .hwChest-content {\n flex-basis: 100%;\n}\n", ".vuuDropMenu {\n margin-left: -50%;\n margin-bottom: -50%;\n background-color: white;\n border: solid 1px var(--grey40);\n display: inline-flex;\n justify-content: center;\n align-items: center;\n padding: 3px;\n border-radius: 3px;\n}\n\n.vuuDropMenu-left,\n.vuuDropMenu-right {\n flex-direction: column;\n}\n\n.vuuDropMenu-bottom {\n transform: translate(0, -30px);\n}\n\n.vuuDropMenu-right {\n transform: translate(-20px, 0);\n}\n\n.vuuDropMenu-item {\n --vuu-icon-size: 20px;\n width: 32px;\n height: 32px;\n background-color: var(--grey20);\n border-bottom: solid 1px var(--grey40);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.vuuDropMenu-item .Icon {\n transform: scale(1.25);\n transform-origin: center center;\n}\n\n.vuuDropMenu-left .vuuDropMenu-item .hwIcon {\n transform: scale(1.25) rotate(180deg);\n transform-origin: center center;\n}\n\n.vuuDropMenu-top .vuuDropMenu-item .hwIcon {\n transform: scale(1.25) rotate(270deg);\n transform-origin: center center;\n}\n\n.vuuDropMenu-bottom .vuuDropMenu-item .hwIcon {\n transform: scale(1.25) rotate(90deg);\n transform-origin: center center;\n}\n\n.vuuDropMenu-item .hwIcon-path {\n fill: grey;\n}\n.vuuDropMenu-item:hover {\n background-color: rgba(200, 200, 200, 0.5);\n}\n\n.vuuDropMenu-item:hover .hwIcon-path-2 {\n fill: blue;\n}\n\n.vuuDropMenu-item:last-child {\n border-bottom: none;\n}\n", "#hw-drag-canvas {\n visibility: hidden;\n z-index: 1;\n position: absolute;\n top: 0px;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: transparent;\n}\n\n#hw-drag-canvas > svg {\n position: absolute;\n}\n\n.drawing #hw-drag-canvas {\n visibility: visible;\n}\n\npath.drop-target {\n stroke: blue;\n stroke-width: 4px;\n fill: transparent;\n}\n\npath.drop-target.centre {\n stroke: red;\n}\n\n#vuu-drop-outline {\n fill: rgba(0,0,255,.3);\n stroke: none;\n stroke-dasharray: 4 2;\n}\n\n#hw-drop-guides {\n fill: none;\n stroke: rgba(0, 0, 0, 0.3);\n stroke-dasharray: 2 3;\n}\n", ".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", ".vuuPlaceholder {\n flex-basis: 0;\n flex-grow: 1;\n flex-shrink: 1;\n}\n\n.vuuPlaceholder-shim {\n flex-grow: 0;\n flex-shrink: 0;\n}\n", ".Splitter {\n --splitter-size: 3px;\n --splitter-border-width: 4px;\n --splitter-border-style: none;\n --splitter-border-color: white;\n\n align-items: center;\n background-color: var(--grey60);\n border-color: var(--splitter-border-color);\n border-style: var(--splitter-border-style);\n box-sizing: border-box;\n display: flex;\n justify-content: center;\n position: relative;\n outline: none;\n z-index: 1;\n}\n\n.Splitter:hover {\n background-color: var(--grey40);\n}\n.active.Splitter {\n background-color: var(--blue500);\n}\n\n.Splitter.column {\n cursor: ns-resize;\n height: var(--splitter-size);\n border-width: var(--splitter-border-width) 0;\n}\n\n.Splitter:not(.column) {\n cursor: ew-resize;\n width: var(--splitter-size);\n border-width: 0 var(--splitter-border-width);\n}\n\n.Splitter:before {\n border: none;\n border-radius: 0;\n content: '';\n display: block;\n padding: 0;\n}\n\n.Splitter .grab-zone {\n position: absolute;\n background-color: rgba(255, 0, 0, 0.01);\n cursor: inherit;\n}\n\n.Splitter.column .grab-zone {\n left: 0;\n right: 0;\n top: -5px;\n bottom: -5px;\n}\n\n.Splitter:not(column) .grab-zone {\n left: -5px;\n right: -5px;\n top: 0;\n bottom: 0;\n}\n\n.Splitter:not(.column):before {\n width: 1px;\n height: 10px;\n background: linear-gradient(\n to bottom,\n var(--grey900) 10%,\n transparent 10%,\n transparent 30%,\n var(--grey900) 30%,\n var(--grey900) 40%,\n transparent 40%,\n transparent 60%,\n var(--grey900) 60%,\n var(--grey900) 70%,\n transparent 70%,\n transparent 90%,\n var(--grey900) 90%\n );\n}\n\n.active.Splitter.column:before {\n background: linear-gradient(\n to right,\n #ffffff 10%,\n transparent 10%,\n transparent 30%,\n #ffffff 30%,\n #ffffff 40%,\n transparent 40%,\n transparent 60%,\n #ffffff 60%,\n #ffffff 70%,\n transparent 70%,\n transparent 90%,\n #ffffff 90%\n );\n}\n\n.active.Splitter:not(.column):before {\n background: linear-gradient(\n to bottom,\n #ffffff 10%,\n transparent 10%,\n transparent 30%,\n #ffffff 30%,\n #ffffff 40%,\n transparent 40%,\n transparent 60%,\n #ffffff 60%,\n #ffffff 70%,\n transparent 70%,\n transparent 90%,\n #ffffff 90%\n );\n}\n\n.Splitter.column:before {\n width: 10px;\n height: 1px;\n background: linear-gradient(\n to right,\n var(--grey900) 10%,\n transparent 10%,\n transparent 30%,\n var(--grey900) 30%,\n var(--grey900) 40%,\n transparent 40%,\n transparent 60%,\n var(--grey900) 60%,\n var(--grey900) 70%,\n transparent 70%,\n transparent 90%,\n var(--grey900) 90%\n );\n}\n", ":root {\n --hw-space-unit: 4px;\n --hw-flex-gap: 3;\n --hw-fluid-grid-col-bg: rgba(200, 200, 200, 0.3);\n}\n\n.hwFlexbox {\n background-color: var(--container1-background);\n box-sizing: border-box;\n display: flex;\n gap: calc(var(--spacing) * var(--space));\n min-height: 0;\n min-width: 0;\n overflow: hidden;\n}\n\n.hwFlexbox-column {\n flex-direction: column;\n}\n\n.hwFlexbox-row {\n flex-direction: row;\n}\n\n.hwFlexbox > .Splitter {\n flex-basis: auto;\n flex-grow: 0;\n flex-shrink: 0;\n}\n\n.hwFlexbox.full-page {\n height: 100vh;\n width: 100vw;\n}\n\n.flex-fill {\n border-color: red;\n flex: 0;\n flex-grow: 1;\n flex-shrink: 1;\n}\n\n.vuuView.flex-fill {\n border-color: red;\n}\n", ":root {\n --hw-space-unit: 4px;\n --hw-fluid-grid-col-bg: rgba(252, 209, 232, 0.7);\n}\n\n.hwFluidGrid {\n --gap: var(--gutter-width);\n\n display: flex;\n gap: calc(var(--grid-gap) * var(--hw-space-unit));\n flex-wrap: wrap;\n padding: 0;\n}\n\n.hwFluidGrid > * {\n --gutter-width: calc(var(--hw-flex-gap) * var(--hw-space-unit));\n --gutter-count: calc(var(--parent-col-count) - 1);\n --total-gutter-width: calc(var(--gutter-count) * var(--gutter-width));\n --available-width: calc(100% - var(--total-gutter-width));\n\n flex-basis: 0;\n flex-grow: 1;\n flex-shrink: 1;\n position: relative;\n}\n\n.hwFluidGrid > *:after {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n border: dashed 2px blue;\n}\n\n.hwFluidGrid > [data-xs] {\n --internal-gutter-count: calc(var(--col-span) - 1);\n --percent-width: calc(var(--col-span) / var(--parent-col-count));\n --internal-gutter-width: calc(var(--internal-gutter-count) * var(--gutter-width));\n flex-basis: calc(var(--available-width) * var(--percent-width) + var(--internal-gutter-width));\n flex-grow: 0;\n}\n\n.hwFluidGrid > [data-xs='1'] {\n --col-span: 1;\n}\n.hwFluidGrid > [data-xs='2'] {\n --col-span: 2;\n}\n.hwFluidGrid > [data-xs='3'] {\n --col-span: 3;\n}\n\n.hwFluidGrid > [data-xs='4'] {\n --col-span: 4;\n}\n\n.hwFluidGrid > [data-xs='6'] {\n --col-span: 6;\n}\n\n.hwFluidGrid > [data-xs='8'] {\n --col-span: 8;\n}\n\n.hwFluidGrid > [data-xs='9'] {\n --col-span: 9;\n}\n.hwFluidGrid > [data-xs='10'] {\n --col-span: 10;\n}\n.hwFluidGrid > [data-xs='11'] {\n --col-span: 11;\n}\n\n.hwFluidGrid > [data-xs='12'] {\n --col-span: 12;\n}\n\n@media (min-width: 600px) {\n .hwFluidGrid > [data-sm='1'] {\n --col-span: 1;\n }\n .hwFluidGrid > [data-sm='2'] {\n --col-span: 2;\n }\n\n .hwFluidGrid > [data-sm='3'] {\n --col-span: 3;\n }\n\n .hwFluidGrid > [data-sm='4'] {\n --col-span: 4;\n }\n\n .hwFluidGrid > [data-sm='6'] {\n --col-span: 6;\n }\n\n .hwFluidGrid > [data-sm='8'] {\n --col-span: 8;\n }\n .hwFluidGrid > [data-sm='9'] {\n --col-span: 9;\n }\n .hwFluidGrid > [data-sm='10'] {\n --col-span: 10;\n }\n .hwFluidGrid > [data-sm='11'] {\n --col-span: 11;\n }\n .hwFluidGrid > [data-sm='12'] {\n --col-span: 12;\n }\n}\n\n/* Display the grid background */\n\n.hwFluidGrid-show-grid {\n --gutter-width: calc(var(--hw-flex-gap) * var(--hw-space-unit));\n --grid-gutter-count: calc(var(--grid-col-count, var(--parent-col-count)) - 1);\n --grid-total-gutter-width: calc(var(--grid-gutter-count) * var(--gutter-width));\n --grid-available-width: calc(100% - var(--grid-total-gutter-width));\n --grid-percent-width: calc(1 / var(--grid-col-count, var(--parent-col-count)));\n --column-width: calc(var(--grid-available-width) * var(--grid-percent-width));\n background: repeating-linear-gradient(\n to right,\n var(--hw-fluid-grid-col-bg) 0,\n var(--hw-fluid-grid-col-bg) var(--column-width),\n white var(--column-width),\n white calc(var(--column-width) + var(--gutter-width))\n );\n}\n", ".vuuView {\n border-color: var(--vuuView-borderColor, var(--salt-container-primary-borderColor));\n border-width: var(--vuuView-borderWidth, 1px);\n border-style: var(--vuuView-borderStyle, none);\n\n display: flex;\n flex-direction: column;\n margin: var(--vuuView-margin, 0px);\n min-height: 50px;\n min-width: 50px;\n outline: none;\n overflow: hidden;\n position: relative;\n}\n\n.vuuView.focus-visible:after {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n border: dotted cornflowerblue 2px;\n}\n\n.vuuView.dragging {\n box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);\n}\n\n.vuuView-main {\n /* height: var(--view-content-height);\n width: var(--view-content-width); */\n display: flex;\n flex-direction: var(--vuuView-flexDirection, column);\n flex-wrap: var(--vuuView-flex-wrap, nowrap);\n flex: 1;\n overflow: hidden;\n position: relative;\n}\n\n.vuuView-main > * {\n flex-basis: auto;\n flex-grow: var(--vuuView-flex-grow, 1);\n flex-shrink: var(--vuuView-flex-shrink, 1);\n}\n\n.vuuView-collapsed .vuuView-main {\n display: none;\n}\n\n.vuuView-collapsed + .Splitter {\n display: none;\n}\n\n.vuuView-collapsed .Toolbar-vertical {\n border-right: solid 1px var(--grey40);\n}\n\n.vuuView-collapsed .Toolbar-vertical .toolbar-title {\n display: none;\n}\n", ".vuuHeader {\n --saltToolbar-background: var(--salt-container-tertiary-background);\n}\n\n.salt-density-high .vuuHeader {\n--saltToolbarField-marginTop: 0;\n}\n\n", ".vuuPalette-horizontal {\n align-items: center;\n display: flex;\n}\n\n.vuuPaletteItem {\n --vuu-icon-color: var(--salt-separable-primary-borderColor);\n --vuu-icon-inset: calc(50% - 12px) auto auto -3px;\n --vuu-icon-height: 24px;\n --vuu-icon-width: 24px;\n --list-item-text-padding: 0 0 0 calc(var(--salt-size-unit) * 3);\n}\n\n.vuuPaletteItem[data-draggable]:after {\n height: 22px;\n width: 6px;\n content: \"\";\n position: absolute;\n\n background-image: \n linear-gradient(45deg, rgb(180, 183, 190) 25%, transparent 25%),\n linear-gradient(-45deg, rgb(180, 183, 190) 25%, transparent 25%),\n linear-gradient(45deg, transparent 75%, rgb(180, 183, 190) 25%),\n linear-gradient(-45deg, transparent 75%, rgb(180, 183, 190) 25%);\n background-size: 4px 4px;\n background-position: 0 0, 2px 0, 2px -2px, 0 2px; \n\n}\n\n.vuuSimpleDraggableWrapper > .vuuPaletteItem {\n --vuu-icon-color: var(--salt-selectable-foreground);\n\n}", ".vuuPalette {\n --list-item-header-bg: inherit;\n --list-item-header-color: inherit;\n --list-item-padding: 0 6px 0 24px;\n --list-item-header-twisty-color: black;\n --list-item-header-twisty-left: 3px;\n --list-item-header-twisty-right: auto;\n}\n\n", ".Tabs {\n display: flex;\n box-sizing: border-box;\n flex-direction: column;\n}\n\n.Tabs-horizontal {\n flex-direction: row;\n}\n\n.Tabs .Toolbar:before {\n left: 0;\n width: 100%;\n bottom: 0;\n height: 1px;\n content: '';\n position: absolute;\n background: var(--grey60);\n}\n\n.vuuTabHeader {\n --saltTabs-activationIndicator-background: transparent;\n --saltToolbarField-marginTop: calc(var(--salt-size-unit) - 1px);\n border-bottom: solid 1px var(--salt-container-primary-borderColor);\n}\n\n.vuuTabHeader + .hwFlexbox,\n.vuuTabHeader + * {\n flex: 1;\n}\n\n.vuuTabHeader + .vuuView > .vuuHeader {\n height: 0;\n overflow: hidden;\n}\n\n.Layout-svg-button {\n --spacing-medium: 5px;\n}\n", "[data-design-mode='true'] .Component {\n filter: grayscale(100%);\n opacity: 0.4;\n}\n\n[data-design-mode='true'] .Component:after {\n color: black;\n content: 'Component';\n height: 12px;\n background-color: yellow;\n}\n\n.LayoutConfigurator {\n --margin-color: #f3cea5;\n --border-color: #fddda0;\n --padding-color: #c6d092;\n --content-color: #8cb6c0;\n display: flex;\n flex-direction: column;\n align-items: stretch;\n background-color: var(--margin-color);\n}\n\n.LayoutConfigurator .layout-outer {\n flex: 1 1 auto;\n display: flex;\n flex-direction: column;\n align-items: stretch;\n}\n\n.LayoutBox {\n --hw-control-font-size: 13px;\n --hw-text-input-bg: rgba(255, 255, 255, 0.3);\n --hwTextInput-padding: 3px;\n --hw-text-input-position: absolute;\n --hwTextInput-width: 30px;\n\n flex: 1 1 auto;\n}\n\n.LayoutBox > .layout-top {\n flex: 0 0 40px;\n padding-left: 12px;\n display: flex;\n flex-direction: row;\n align-items: center;\n position: relative;\n}\n\n.LayoutBox > .layout-bottom {\n flex: 0 0 40px;\n position: relative;\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n\n.LayoutBox > .layout-inner > .layout-right,\n.LayoutBox > .layout-inner > .layout-left {\n flex: 0 0 40px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n}\n\n.layout-top,\n.layout-bottom {\n --hw-text-input-margin: 0 0 0 -15px;\n}\n\n.layout-top > .layout-input,\n.layout-bottom > .layout-input {\n left: 50%;\n}\n\n.LayoutBox > .layout-inner {\n flex: 1 1 auto;\n display: flex;\n flex-direction: row;\n align-items: stretch;\n}\n\n.LayoutBox.layout-margin {\n background-color: var(--margin-color);\n border: dashed 2px black;\n}\n\n.LayoutBox.layout-border {\n background-color: var(--border-color);\n border: solid 2px black;\n}\n\n.LayoutBox.layout-padding {\n background-color: var(--padding-color);\n border: dashed 2px black;\n}\n\n.LayoutBox .layout-content {\n flex: 1 1 auto;\n background-color: var(--content-color);\n border: solid 2px #808080;\n}\n\n.LayoutBox .layout-title {\n color: #161616;\n font-size: 11px;\n left: 4px;\n line-height: 15px;\n position: absolute;\n top: 1px;\n}\n", ".hwLayoutTreeViewer {\n}\n\n.hwLayoutTreeNode {\n cursor: default;\n}\n\n.hwLayoutTreeNode:hover {\n background-color: rgba(255, 255, 255, 0.2);\n}\n\n.hwLayoutTreeNode[aria-selected='true'] {\n background-color: cornflowerblue;\n color: white;\n}\n"],
|
|
5
|
-
"mappings": "AAAA
|
|
5
|
+
"mappings": ";AAAA;AACE;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AAAA;AAOF;AACE;AAAA;AAEF;AACE;AAAA;AAEF;AACE;AAAA;AAEF;AACE;AAAA;AAGF;AAAA;AAEE;AACA;AAAA;AAGF;AAAA;AAEE;AACA;AAAA;AAGF;AACE;AACA;AAAA;AAGF;AACE;AACA;AAAA;AAGF;AACE;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AAAA;AAGF;AAAA;AAEE;AAAA;AAGF;AAAA;AAEE;AAAA;AAGF;AAAA;AAEE;AAAA;AAGF;AAAA;AAEE;AAAA;AAGF;AAAA;AAEE;AAAA;AAGF;AAAA;AAEE;AAAA;AAGF;AAAA;AAEE;AAAA;AAGF;AACE;AACA;AACA;AACA;AAAA;AAGF;AACE;AAAA;;;AC5JF;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AACA;AACA;AACA;AAEA;AACA;AACA;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AAAA;;;;;AClCF;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGF;AAAA;AAEE;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AACA;AAAA;AAGF;AACE;AACA;AAAA;AAGF;AACE;AACA;AAAA;AAGF;AACE;AACA;AAAA;AAGF;AACE;AAAA;AAEF;AACE;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AAAA;;;ACrEF;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AACA;AACA;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AAAA;;;ACtCF;AACE;AACA;AAAA;AAGF;AACE;AACA;AAAA;AAGF;AACE;AACA;AAAA;AAEF;AACE;AACA;AAAA;;;AChBF;AACE;AACA;AACA;AAAA;AAGF;AACE;AACA;AAAA;;;ACRF;AACE;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AAAA;AAEF;AACE;AAAA;AAGF;AACE;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AAAA;AAiBF;AACE;AAAA;AAiBF;AACE;AAAA;AAiBF;AACE;AACA;AACA;AAAA;;;AC5HF;AACE;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AACA;AACA;AAAA;AAGF;AACE;AACA;AAAA;AAGF;AACE;AACA;AACA;AACA;AAAA;AAGF;AACE;AAAA;;;AC3CF;AACE;AACA;AAAA;AAGF;AACE;AAEA;AACA;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AAAA;AAEF;AACE;AAAA;AAEF;AACE;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AAAA;AAEF;AACE;AAAA;AAEF;AACE;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AACE;AAAA;AAEF;AACE;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AAAA;AAEF;AACE;AAAA;AAEF;AACE;AAAA;AAEF;AACE;AAAA;AAEF;AACE;AAAA;AAAA;AAMJ;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;;;AC9HF;AACE;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AAAA;AAGF;AAGE;AACA;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AAAA;;;AC3DF;AACE;AAAA;AAGF;AACA;AAAA;;;ACLA;AACE;AACA;AAAA;AAGF;AACE;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AAAA;AAKA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAIF;AACE;AAAA;;;AC9BF;AACE;AACA;AACA;AACA;AACA;AACA;AAAA;;;ACNF;AACE;AACA;AACA;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AAAA;AAGF;AAAA;AAEE;AAAA;AAGF;AACE;AACA;AAAA;AAGF;AACE;AAAA;;;ACrCF;AACE;AACA;AAAA;AAGF;AACE;AACA;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AACA;AACA;AAEA;AAAA;AAGF;AACE;AACA;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AACA;AACA;AAAA;AAGF;AAAA;AAEE;AACA;AACA;AACA;AACA;AAAA;AAGF;AAAA;AAEE;AAAA;AAGF;AAAA;AAEE;AAAA;AAGF;AACE;AACA;AACA;AACA;AAAA;AAGF;AACE;AACA;AAAA;AAGF;AACE;AACA;AAAA;AAGF;AACE;AACA;AAAA;AAGF;AACE;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AACA;AACA;AACA;AAAA;;;AC9GF;AAAA;AAGA;AACE;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AACA;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
"@salt-ds/core": "1.0.0",
|
|
8
8
|
"@salt-ds/icons": "1.0.0",
|
|
9
9
|
"@heswell/salt-lab": "1.0.0-alpha.0-vuu.1",
|
|
10
|
-
"@vuu-ui/vuu-popups": "0.6.
|
|
11
|
-
"@vuu-ui/vuu-utils": "0.6.
|
|
10
|
+
"@vuu-ui/vuu-popups": "0.6.11-debug",
|
|
11
|
+
"@vuu-ui/vuu-utils": "0.6.11-debug",
|
|
12
12
|
"classnames": "^2.2.6",
|
|
13
13
|
"react": "^17.0.2",
|
|
14
14
|
"react-dom": "^17.0.2"
|
|
@@ -18,9 +18,11 @@
|
|
|
18
18
|
"esm",
|
|
19
19
|
"index.css",
|
|
20
20
|
"index.css.map",
|
|
21
|
-
"README.md"
|
|
21
|
+
"README.md",
|
|
22
|
+
"/types"
|
|
22
23
|
],
|
|
23
24
|
"module": "esm/index.js",
|
|
24
25
|
"main": "cjs/index.js",
|
|
25
|
-
"version": "0.6.
|
|
26
|
+
"version": "0.6.11-debug-debug",
|
|
27
|
+
"types": "types/index.d.ts"
|
|
26
28
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React, { HTMLAttributes } from 'react';
|
|
2
|
+
import './Component.css';
|
|
3
|
+
export interface ComponentProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
resizeable?: boolean;
|
|
5
|
+
}
|
|
6
|
+
declare const Component: React.FunctionComponent<ComponentProps>;
|
|
7
|
+
export default Component;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { HTMLAttributes } from "react";
|
|
2
|
+
import "./DraggableLayout.css";
|
|
3
|
+
export interface DraggableLayoutProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
dropTarget?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare const DraggableLayout: import("react").ForwardRefExoticComponent<DraggableLayoutProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HTMLAttributes, ReactElement } from "react";
|
|
2
|
+
import "./Chest.css";
|
|
3
|
+
export interface ChestProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
children: ReactElement[];
|
|
5
|
+
}
|
|
6
|
+
declare const Chest: {
|
|
7
|
+
(props: ChestProps): JSX.Element;
|
|
8
|
+
displayName: string;
|
|
9
|
+
};
|
|
10
|
+
export default Chest;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { HTMLAttributes } from "react";
|
|
2
|
+
import "./Drawer.css";
|
|
3
|
+
export interface DrawerProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
clickToOpen?: boolean;
|
|
5
|
+
defaultOpen?: boolean;
|
|
6
|
+
inline?: boolean;
|
|
7
|
+
open?: boolean;
|
|
8
|
+
peekaboo?: boolean;
|
|
9
|
+
position?: "left" | "right" | "top" | "bottom";
|
|
10
|
+
sizeOpen?: number;
|
|
11
|
+
sizeClosed?: number;
|
|
12
|
+
toggleButton?: "start" | "end";
|
|
13
|
+
}
|
|
14
|
+
declare const Drawer: {
|
|
15
|
+
({ children, className: classNameProp, clickToOpen, defaultOpen, sizeOpen, sizeClosed, style: styleProp, open: openProp, position, inline, onClick, peekaboo, toggleButton, ...props }: DrawerProps): JSX.Element;
|
|
16
|
+
displayName: string;
|
|
17
|
+
};
|
|
18
|
+
export default Drawer;
|
package/types/debug.d.ts
ADDED
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { ReactElement } from "react";
|
|
2
|
+
import { LayoutModel } from "../layout-reducer";
|
|
3
|
+
import { DragDropRect, DropPos, RelativePosition } from "./dragDropTypes";
|
|
4
|
+
export declare const positionValues: {
|
|
5
|
+
north: number;
|
|
6
|
+
east: number;
|
|
7
|
+
south: number;
|
|
8
|
+
west: number;
|
|
9
|
+
header: number;
|
|
10
|
+
centre: number;
|
|
11
|
+
absolute: number;
|
|
12
|
+
};
|
|
13
|
+
export declare const RelativeDropPosition: {
|
|
14
|
+
AFTER: RelativePosition;
|
|
15
|
+
BEFORE: RelativePosition;
|
|
16
|
+
};
|
|
17
|
+
export declare const Position: Readonly<{
|
|
18
|
+
North: Readonly<{
|
|
19
|
+
offset: number;
|
|
20
|
+
valueOf: () => number;
|
|
21
|
+
toString: () => "header" | "absolute" | "north" | "east" | "south" | "west" | "centre";
|
|
22
|
+
North: boolean;
|
|
23
|
+
South: boolean;
|
|
24
|
+
East: boolean;
|
|
25
|
+
West: boolean;
|
|
26
|
+
Header: boolean;
|
|
27
|
+
Centre: boolean;
|
|
28
|
+
NorthOrSouth: boolean;
|
|
29
|
+
EastOrWest: boolean;
|
|
30
|
+
NorthOrWest: boolean;
|
|
31
|
+
SouthOrEast: boolean;
|
|
32
|
+
Absolute: boolean;
|
|
33
|
+
}>;
|
|
34
|
+
East: Readonly<{
|
|
35
|
+
offset: number;
|
|
36
|
+
valueOf: () => number;
|
|
37
|
+
toString: () => "header" | "absolute" | "north" | "east" | "south" | "west" | "centre";
|
|
38
|
+
North: boolean;
|
|
39
|
+
South: boolean;
|
|
40
|
+
East: boolean;
|
|
41
|
+
West: boolean;
|
|
42
|
+
Header: boolean;
|
|
43
|
+
Centre: boolean;
|
|
44
|
+
NorthOrSouth: boolean;
|
|
45
|
+
EastOrWest: boolean;
|
|
46
|
+
NorthOrWest: boolean;
|
|
47
|
+
SouthOrEast: boolean;
|
|
48
|
+
Absolute: boolean;
|
|
49
|
+
}>;
|
|
50
|
+
South: Readonly<{
|
|
51
|
+
offset: number;
|
|
52
|
+
valueOf: () => number;
|
|
53
|
+
toString: () => "header" | "absolute" | "north" | "east" | "south" | "west" | "centre";
|
|
54
|
+
North: boolean;
|
|
55
|
+
South: boolean;
|
|
56
|
+
East: boolean;
|
|
57
|
+
West: boolean;
|
|
58
|
+
Header: boolean;
|
|
59
|
+
Centre: boolean;
|
|
60
|
+
NorthOrSouth: boolean;
|
|
61
|
+
EastOrWest: boolean;
|
|
62
|
+
NorthOrWest: boolean;
|
|
63
|
+
SouthOrEast: boolean;
|
|
64
|
+
Absolute: boolean;
|
|
65
|
+
}>;
|
|
66
|
+
West: Readonly<{
|
|
67
|
+
offset: number;
|
|
68
|
+
valueOf: () => number;
|
|
69
|
+
toString: () => "header" | "absolute" | "north" | "east" | "south" | "west" | "centre";
|
|
70
|
+
North: boolean;
|
|
71
|
+
South: boolean;
|
|
72
|
+
East: boolean;
|
|
73
|
+
West: boolean;
|
|
74
|
+
Header: boolean;
|
|
75
|
+
Centre: boolean;
|
|
76
|
+
NorthOrSouth: boolean;
|
|
77
|
+
EastOrWest: boolean;
|
|
78
|
+
NorthOrWest: boolean;
|
|
79
|
+
SouthOrEast: boolean;
|
|
80
|
+
Absolute: boolean;
|
|
81
|
+
}>;
|
|
82
|
+
Header: Readonly<{
|
|
83
|
+
offset: number;
|
|
84
|
+
valueOf: () => number;
|
|
85
|
+
toString: () => "header" | "absolute" | "north" | "east" | "south" | "west" | "centre";
|
|
86
|
+
North: boolean;
|
|
87
|
+
South: boolean;
|
|
88
|
+
East: boolean;
|
|
89
|
+
West: boolean;
|
|
90
|
+
Header: boolean;
|
|
91
|
+
Centre: boolean;
|
|
92
|
+
NorthOrSouth: boolean;
|
|
93
|
+
EastOrWest: boolean;
|
|
94
|
+
NorthOrWest: boolean;
|
|
95
|
+
SouthOrEast: boolean;
|
|
96
|
+
Absolute: boolean;
|
|
97
|
+
}>;
|
|
98
|
+
Centre: Readonly<{
|
|
99
|
+
offset: number;
|
|
100
|
+
valueOf: () => number;
|
|
101
|
+
toString: () => "header" | "absolute" | "north" | "east" | "south" | "west" | "centre";
|
|
102
|
+
North: boolean;
|
|
103
|
+
South: boolean;
|
|
104
|
+
East: boolean;
|
|
105
|
+
West: boolean;
|
|
106
|
+
Header: boolean;
|
|
107
|
+
Centre: boolean;
|
|
108
|
+
NorthOrSouth: boolean;
|
|
109
|
+
EastOrWest: boolean;
|
|
110
|
+
NorthOrWest: boolean;
|
|
111
|
+
SouthOrEast: boolean;
|
|
112
|
+
Absolute: boolean;
|
|
113
|
+
}>;
|
|
114
|
+
Absolute: Readonly<{
|
|
115
|
+
offset: number;
|
|
116
|
+
valueOf: () => number;
|
|
117
|
+
toString: () => "header" | "absolute" | "north" | "east" | "south" | "west" | "centre";
|
|
118
|
+
North: boolean;
|
|
119
|
+
South: boolean;
|
|
120
|
+
East: boolean;
|
|
121
|
+
West: boolean;
|
|
122
|
+
Header: boolean;
|
|
123
|
+
Centre: boolean;
|
|
124
|
+
NorthOrSouth: boolean;
|
|
125
|
+
EastOrWest: boolean;
|
|
126
|
+
NorthOrWest: boolean;
|
|
127
|
+
SouthOrEast: boolean;
|
|
128
|
+
Absolute: boolean;
|
|
129
|
+
}>;
|
|
130
|
+
}>;
|
|
131
|
+
export interface Measurements {
|
|
132
|
+
[key: string]: DragDropRect;
|
|
133
|
+
}
|
|
134
|
+
export declare class BoxModel {
|
|
135
|
+
static measure(model: ReactElement, dropTargetPaths?: string[]): Measurements;
|
|
136
|
+
static allBoxesContainingPoint(layout: LayoutModel, measurements: Measurements, x: number, y: number, validDropTargets?: string[]): LayoutModel[];
|
|
137
|
+
}
|
|
138
|
+
export declare function pointPositionWithinRect(x: number, y: number, rect: DragDropRect, borderZone?: number): {
|
|
139
|
+
pctX: number;
|
|
140
|
+
pctY: number;
|
|
141
|
+
closeToTheEdge: number;
|
|
142
|
+
};
|
|
143
|
+
export declare function getPosition(x: number, y: number, rect: DragDropRect, targetOrientation?: "row" | "column"): DropPos;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { DragDropRect } from './dragDropTypes';
|
|
2
|
+
export type IntrinsicSizes = {
|
|
3
|
+
height?: number;
|
|
4
|
+
width?: number;
|
|
5
|
+
};
|
|
6
|
+
interface ZoneRange {
|
|
7
|
+
hi: number;
|
|
8
|
+
lo: number;
|
|
9
|
+
}
|
|
10
|
+
type DragConstraint = {
|
|
11
|
+
zone: {
|
|
12
|
+
x: ZoneRange;
|
|
13
|
+
y: ZoneRange;
|
|
14
|
+
};
|
|
15
|
+
pos: {
|
|
16
|
+
x: ZoneRange;
|
|
17
|
+
y: ZoneRange;
|
|
18
|
+
};
|
|
19
|
+
mouse: {
|
|
20
|
+
x: ZoneRange;
|
|
21
|
+
y: ZoneRange;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
interface ExtendedZoneRange {
|
|
25
|
+
lo: boolean;
|
|
26
|
+
hi: boolean;
|
|
27
|
+
mousePct: number;
|
|
28
|
+
mousePos: number;
|
|
29
|
+
pos: number;
|
|
30
|
+
}
|
|
31
|
+
export declare class DragState {
|
|
32
|
+
constraint: DragConstraint;
|
|
33
|
+
x: ExtendedZoneRange;
|
|
34
|
+
y: ExtendedZoneRange;
|
|
35
|
+
intrinsicSize: IntrinsicSizes | undefined;
|
|
36
|
+
constructor(zone: DragDropRect, mouseX: number, mouseY: number, measurements: DragDropRect, intrinsicSize?: IntrinsicSizes);
|
|
37
|
+
init(zone: DragDropRect, mouseX: number, mouseY: number, rect: DragDropRect, intrinsicSize?: IntrinsicSizes): void;
|
|
38
|
+
outOfBounds(): boolean;
|
|
39
|
+
inBounds(): boolean;
|
|
40
|
+
dropX(): number;
|
|
41
|
+
dropY(): number;
|
|
42
|
+
hasIntrinsicSize(): number | undefined;
|
|
43
|
+
update(xy: 'x' | 'y', mousePos: number): boolean;
|
|
44
|
+
private dropXY;
|
|
45
|
+
}
|
|
46
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ReactElement } from "react";
|
|
2
|
+
import { rect } from "../common-types";
|
|
3
|
+
import { IntrinsicSizes } from "./DragState";
|
|
4
|
+
import { DropTarget } from "./DropTarget";
|
|
5
|
+
export type DragStartCallback = (e: MouseEvent, x: number, y: number) => void;
|
|
6
|
+
export type DragMoveCallback = (x: number | undefined, y: number | undefined) => void;
|
|
7
|
+
export type DragEndCallback = (droppedTarget: Partial<DropTarget>) => void;
|
|
8
|
+
export type DragInstructions = {
|
|
9
|
+
DoNotRemove?: boolean;
|
|
10
|
+
DoNotTransform?: boolean;
|
|
11
|
+
dragThreshold?: number;
|
|
12
|
+
RemoveDraggableOnDragEnd?: boolean;
|
|
13
|
+
};
|
|
14
|
+
export declare const Draggable: {
|
|
15
|
+
handleMousedown(e: MouseEvent, dragStartCallback: DragStartCallback, dragInstructions?: DragInstructions): void;
|
|
16
|
+
initDrag(rootContainer: ReactElement, dragContainerPath: string, { top, left, right, bottom }: rect, dragPos: {
|
|
17
|
+
x: number;
|
|
18
|
+
y: number;
|
|
19
|
+
}, dragHandler: {
|
|
20
|
+
drag: DragMoveCallback;
|
|
21
|
+
drop: DragEndCallback;
|
|
22
|
+
}, intrinsicSize?: IntrinsicSizes, dropTargets?: string[]): string;
|
|
23
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HTMLAttributes } from "react";
|
|
2
|
+
import { DropTarget } from "./DropTarget";
|
|
3
|
+
import "./DropMenu.css";
|
|
4
|
+
export declare function computeMenuPosition(dropTarget: DropTarget, offsetTop?: number, offsetLeft?: number): [number, number, "left" | "bottom" | "right" | "top"];
|
|
5
|
+
export interface DropMenuProps extends HTMLAttributes<HTMLDivElement> {
|
|
6
|
+
dropTarget: DropTarget;
|
|
7
|
+
onHover: (target: DropTarget | null) => void;
|
|
8
|
+
orientation?: "left" | "top" | "right" | "bottom";
|
|
9
|
+
}
|
|
10
|
+
export declare const DropMenu: ({ className, dropTarget, onHover, orientation, }: DropMenuProps) => JSX.Element;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { rectTuple } from "../common-types";
|
|
2
|
+
import { LayoutModel } from "../layout-reducer";
|
|
3
|
+
import { Measurements } from "./BoxModel";
|
|
4
|
+
import { DragDropRect, DropPos, DropPosTab } from "./dragDropTypes";
|
|
5
|
+
import { DragState } from "./DragState";
|
|
6
|
+
export declare const isTabstrip: (dropTarget: DropTarget) => boolean | undefined;
|
|
7
|
+
export interface DropTargetProps {
|
|
8
|
+
component: LayoutModel;
|
|
9
|
+
pos: DropPos;
|
|
10
|
+
clientRect: DragDropRect;
|
|
11
|
+
nextDropTarget: DropTarget | null;
|
|
12
|
+
}
|
|
13
|
+
export type GuideLine = [
|
|
14
|
+
number,
|
|
15
|
+
number,
|
|
16
|
+
number,
|
|
17
|
+
number,
|
|
18
|
+
number,
|
|
19
|
+
number,
|
|
20
|
+
number,
|
|
21
|
+
number
|
|
22
|
+
];
|
|
23
|
+
export interface TargetDropOutline {
|
|
24
|
+
l: number;
|
|
25
|
+
r: number;
|
|
26
|
+
t: number;
|
|
27
|
+
b: number;
|
|
28
|
+
tabLeft?: number;
|
|
29
|
+
tabWidth?: number;
|
|
30
|
+
tabHeight?: number;
|
|
31
|
+
guideLines?: GuideLine;
|
|
32
|
+
}
|
|
33
|
+
export declare class DropTarget {
|
|
34
|
+
private active;
|
|
35
|
+
box: unknown;
|
|
36
|
+
clientRect: DragDropRect;
|
|
37
|
+
component: LayoutModel;
|
|
38
|
+
dropRect: rectTuple | undefined;
|
|
39
|
+
nextDropTarget: DropTarget | null;
|
|
40
|
+
pos: DropPos;
|
|
41
|
+
constructor({ component, pos, clientRect, nextDropTarget, }: DropTargetProps);
|
|
42
|
+
targetTabPos(tab: DropPosTab): number;
|
|
43
|
+
/**
|
|
44
|
+
* Determine what will be rendered by the dropTargetRenderer
|
|
45
|
+
*
|
|
46
|
+
* @param {*} lineWidth
|
|
47
|
+
* @param {*} dragState
|
|
48
|
+
* @returns {l, t, r, b, tabLeft, tabWidth, tabHeight}
|
|
49
|
+
*/
|
|
50
|
+
getTargetDropOutline(lineWidth: number, dragState?: DragState): TargetDropOutline;
|
|
51
|
+
getDropTabOutline(lineWidth: number, tab: DropPosTab): TargetDropOutline;
|
|
52
|
+
getIntrinsicDropRect(dragState: DragState): TargetDropOutline;
|
|
53
|
+
/**
|
|
54
|
+
* @returns [left, top, right, bottom]
|
|
55
|
+
*/
|
|
56
|
+
getDropRectOutline(lineWidth: number, dragState?: DragState): number[] | null;
|
|
57
|
+
activate(): this;
|
|
58
|
+
toArray(this: DropTarget): DropTarget[];
|
|
59
|
+
static getActiveDropTarget(dropTarget: DropTarget | null): DropTarget | null;
|
|
60
|
+
}
|
|
61
|
+
export declare function identifyDropTarget(x: number, y: number, rootLayout: LayoutModel, measurements: Measurements, intrinsicSize?: number, validDropTargets?: string[]): DropTarget | null;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { DragDropRect } from "./dragDropTypes";
|
|
2
|
+
import { DragState } from "./DragState";
|
|
3
|
+
import { DropTarget } from "./DropTarget";
|
|
4
|
+
import "./DropTargetRenderer.css";
|
|
5
|
+
type Point = [number, number];
|
|
6
|
+
type TabMode = "full-view" | "tab-only";
|
|
7
|
+
export default class DropTargetCanvas {
|
|
8
|
+
private currentPath;
|
|
9
|
+
private tabMode;
|
|
10
|
+
constructor();
|
|
11
|
+
prepare(dragRect: DragDropRect, tabMode?: TabMode): void;
|
|
12
|
+
clear(): void;
|
|
13
|
+
get hoverDropTarget(): DropTarget | null;
|
|
14
|
+
getPoints(x: number, y: number, width: number, height: number, tabLeft?: number, tabWidth?: number, tabHeight?: number): Point[];
|
|
15
|
+
draw(dropTarget: DropTarget, dragState: DragState): void;
|
|
16
|
+
drawTarget(dropTarget: DropTarget, dragState?: DragState): void;
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { rect } from '../common-types';
|
|
2
|
+
export interface DragDropRect extends rect {
|
|
3
|
+
children?: DragDropRect[];
|
|
4
|
+
header?: {
|
|
5
|
+
top: number;
|
|
6
|
+
left: number;
|
|
7
|
+
right: number;
|
|
8
|
+
bottom: number;
|
|
9
|
+
titleWidth?: number;
|
|
10
|
+
};
|
|
11
|
+
height: number;
|
|
12
|
+
scrolling?: {
|
|
13
|
+
id: string;
|
|
14
|
+
scrollTop: number;
|
|
15
|
+
scrollHeight: number;
|
|
16
|
+
};
|
|
17
|
+
Stack?: {
|
|
18
|
+
left: number;
|
|
19
|
+
right: number;
|
|
20
|
+
}[];
|
|
21
|
+
width: number;
|
|
22
|
+
}
|
|
23
|
+
export interface DropPosition {
|
|
24
|
+
Absolute: boolean;
|
|
25
|
+
Centre: boolean;
|
|
26
|
+
East: boolean;
|
|
27
|
+
EastOrWest: boolean;
|
|
28
|
+
Header: boolean;
|
|
29
|
+
North: boolean;
|
|
30
|
+
NorthOrSouth: boolean;
|
|
31
|
+
offset: number;
|
|
32
|
+
South: boolean;
|
|
33
|
+
SouthOrEast: boolean;
|
|
34
|
+
West: boolean;
|
|
35
|
+
}
|
|
36
|
+
export type RelativePosition = 'after' | 'before';
|
|
37
|
+
export type DropPosTab = {
|
|
38
|
+
index: number;
|
|
39
|
+
left: number;
|
|
40
|
+
positionRelativeToTab: RelativePosition;
|
|
41
|
+
width: number;
|
|
42
|
+
};
|
|
43
|
+
export interface DropPos {
|
|
44
|
+
closeToTheEdge: number;
|
|
45
|
+
height?: number;
|
|
46
|
+
position: DropPosition;
|
|
47
|
+
tab?: DropPosTab;
|
|
48
|
+
width?: number;
|
|
49
|
+
x: number;
|
|
50
|
+
y: number;
|
|
51
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FlexboxProps } from "./flexboxTypes";
|
|
3
|
+
import "./FluidGrid.css";
|
|
4
|
+
export interface FluidGridProps extends FlexboxProps {
|
|
5
|
+
showGrid?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const FluidGrid: import("react").ForwardRefExoticComponent<FluidGridProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React, { HTMLAttributes } from 'react';
|
|
2
|
+
import './Splitter.css';
|
|
3
|
+
export type SplitterDragStartHandler = (index: number) => void;
|
|
4
|
+
export type SplitterDragHandler = (index: number, distance: number) => void;
|
|
5
|
+
export type SplitterDragEndHandler = () => void;
|
|
6
|
+
export interface SplitterProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onDrag' | 'onDragStart'> {
|
|
7
|
+
column: boolean;
|
|
8
|
+
index: number;
|
|
9
|
+
onDragStart: SplitterDragStartHandler;
|
|
10
|
+
onDrag: SplitterDragHandler;
|
|
11
|
+
onDragEnd: SplitterDragEndHandler;
|
|
12
|
+
}
|
|
13
|
+
export declare const Splitter: React.NamedExoticComponent<SplitterProps>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import type { BreakPoint, ContentMeta } from './flexboxTypes';
|
|
3
|
+
export declare const SPLITTER = 1;
|
|
4
|
+
export declare const PLACEHOLDER = 2;
|
|
5
|
+
export declare const gatherChildMeta: (children: ReactElement[], dimension: 'width' | 'height', breakPoints?: BreakPoint[]) => {
|
|
6
|
+
index: number;
|
|
7
|
+
flexOpen: boolean;
|
|
8
|
+
intrinsicSize: number | undefined;
|
|
9
|
+
resizeable: any;
|
|
10
|
+
}[];
|
|
11
|
+
export declare const findSplitterAndPlaceholderPositions: (childMeta: ContentMeta[]) => any[];
|
|
12
|
+
export declare const identifyResizeParties: (contentMeta: ContentMeta[], idx: number) => (number[] | undefined)[];
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { CSSProperties, HTMLAttributes, MutableRefObject, ReactElement, ReactNode } from "react";
|
|
2
|
+
import { SplitterProps } from "./Splitter";
|
|
3
|
+
export interface LayoutContainerProps {
|
|
4
|
+
resizeable?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface FlexboxProps extends LayoutContainerProps, HTMLAttributes<HTMLDivElement> {
|
|
7
|
+
breakPoints?: BreakPointsProp;
|
|
8
|
+
children: ReactElement[];
|
|
9
|
+
cols?: number;
|
|
10
|
+
column?: true;
|
|
11
|
+
fullPage?: number;
|
|
12
|
+
flexFill?: boolean;
|
|
13
|
+
gap?: number;
|
|
14
|
+
onSplitterMoved?: (content: ContentMeta[]) => void;
|
|
15
|
+
row?: true;
|
|
16
|
+
spacing?: number;
|
|
17
|
+
splitterSize?: number;
|
|
18
|
+
}
|
|
19
|
+
export interface FlexboxLayoutProps extends FlexboxProps {
|
|
20
|
+
path: string;
|
|
21
|
+
}
|
|
22
|
+
export interface SplitterHookProps {
|
|
23
|
+
children: ReactNode;
|
|
24
|
+
onSplitterMoved?: (content: ContentMeta[]) => void;
|
|
25
|
+
style?: CSSProperties;
|
|
26
|
+
}
|
|
27
|
+
export interface SplitterHookResult {
|
|
28
|
+
content: ReactElement[];
|
|
29
|
+
rootRef: MutableRefObject<HTMLDivElement | null>;
|
|
30
|
+
}
|
|
31
|
+
export type SplitterFactory = (index: number) => ReactElement<SplitterProps>;
|
|
32
|
+
export type ContentMeta = {
|
|
33
|
+
currentSize?: number;
|
|
34
|
+
flexOpen?: boolean;
|
|
35
|
+
flexBasis?: number;
|
|
36
|
+
intrinsicSize?: number;
|
|
37
|
+
minSize?: number;
|
|
38
|
+
placeholder?: boolean;
|
|
39
|
+
resizeable?: boolean;
|
|
40
|
+
shim?: boolean;
|
|
41
|
+
splitter?: boolean;
|
|
42
|
+
};
|
|
43
|
+
export type FlexSize = {
|
|
44
|
+
size: number;
|
|
45
|
+
minSize: number;
|
|
46
|
+
};
|
|
47
|
+
export type BreakPoint = "xs" | "sm" | "md" | "lg" | "xl";
|
|
48
|
+
export type BreakPoints = BreakPoint[];
|
|
49
|
+
export type BreakPointsProp = {
|
|
50
|
+
[keys in BreakPoint]?: number;
|
|
51
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CSSProperties, ReactElement } from "react";
|
|
2
|
+
export declare const useResponsiveSizing: ({ children: childrenProp, cols: colsProp, style, }: {
|
|
3
|
+
children: ReactElement[];
|
|
4
|
+
cols?: number | undefined;
|
|
5
|
+
style?: CSSProperties | undefined;
|
|
6
|
+
}) => {
|
|
7
|
+
cols: number;
|
|
8
|
+
content: ReactElement<any, string | import("react").JSXElementConstructor<any>>[] | undefined;
|
|
9
|
+
rootRef: import("react").MutableRefObject<null>;
|
|
10
|
+
};
|