Specifies one of the two axes.
An identifier that is unique to some context. Assignable to React's key.
Specifies one of the four sides.
The context menu context. You can use it directly to set the submenu timeout, create a menu provider that doesn't inherit the parent's options, or provide an alternative means of displaying the menu.
A context menu component. Use it like a context provider, pass the context
menu entries in options
. It will add them to the menu, but it will also
show all options from enclosing ContextMenu instances. Also note that this
inserts a new div into the DOM, any props other than options
and
children
are passed directly to that div.
The menu is rendered with DropdownMenu but you can also call it directly.
Renders a multilevel menu to any corner of the given box. You can use it directly to create a menubar for example.
It is used to render ContextMenu.
Determines the dimensions of the element, effectively a hook for getBoundingClientRect. Unlike every other implementation online, this one does actually seem to catch every movement and size change, even those caused by only moving or resizing the element with JavaScript.
WARNING: This hook is not debounced or rate limited. Do not use it to track continuous motion.
ref, size of the value of ref, whether anything is visible
A drag and drop split container inspired by Visual Studio and the Unity Editor. It supports resizing by dragging if onResize is defined and a SplitsLayer component covers the whole container, and supports reorganising by drag and drop if onSplit and splitTypes are set.
A component to attach position data to Splits borders while dragging. It also renders a nice constrained overlay blue line.
Transforms the node at the end of the path with your callback then returns an immutable copy of the whole tree. Use when you might create a new node.
It can be guaranteed to return a SplitData iff the predicate is guaranteed to return a SplitData or the path is guaranteed to be non-empty
Fixes the sizes in a split tree to negate problems like negative width that emerge from naiive implementations of other transformations.
Minimum allowed size of a split
Bounding box of def
Border width
Inline children of the same axis and remove empty containers from the tree.
Create a node for the Splits definition tree.
In which direction to lay out the children
Sub-elements or subcontainers and their relative sizes.
Identifies subcontainer definitions in contrast to other objects. It uses a
TYPE_ID field so that it works in scenarios where runtime type assertions
like instanceof
, in
and Object
methods don't, like Immer drafts.
whether x
is a subcontainer definition
Moves a border in the grid. This may leave negative sized cells and other artifacts so call fixSplitSizes on the result.
Index of the node before (left/up) the moved border
Change, in relation to the parent's appropriate dimension
Splits a tree node. This may leave parallel child containers and other artifacts on the tree, so call fixSplitTree after you're finished with the transformations. Additionally, because it moves a subtree, use transposeSplitTree to update all affected if you are storing the access paths in the nodes.
Recursively visits every node in the specified subtree with the correct full path and the old node. Use this to update any stored instances of the access path after tree transformations like executeSplit and fixTopology
Moves a tab to a brand new leaf created by splitting a container
Leaf to split
Which side the new item goes
ID of the moved tab
Leaf the tab was moved from
Removes and returns the tab with the given ID from the collection. Use this
to retrieve the dragged tab and insert it in the new location with a simple
data.splice(0, tab)
to execute a tab drag action.
The removed tab
Generated using TypeDoc
The first element is the title, the second is the action. If the action is a function, it is executed. If it is an array, it is rendered as a submenu. If it is falsy, it is treated as a disabled menu item.