message: refactor(onSelectionChange): pass data and position closes
diff: @@ -4,7 +4,7 @@ import cc from 'classcat';
  import { useStoreActions } from '../../store/hooks';
  import { Provider } from '../../contexts/NodeIdContext';
  -import { Node, NodeComponentProps, WrapNodeProps } from '../../types';
  +import { NodeComponentProps, WrapNodeProps } from '../../types';
  export default (NodeComponent: ComponentType<NodeComponentProps>) => {
  const NodeWrapper = ({
  @@ -97,7 +97,7 @@ export default (NodeComponent: ComponentType<NodeComponentProps>) => {
  unsetNodesSelection();
  if (!selected) {
  - addSelectedElements({ id: node.id, type: node.type } as Node);
  + addSelectedElements(node);
  }
  }
  @@ -115,7 +115,7 @@ export default (NodeComponent: ComponentType<NodeComponentProps>) => {
  unsetNodesSelection();
  if (!selected) {
  - addSelectedElements({ id: node.id, type: node.type } as Node);
  + addSelectedElements(node);
  }
  } else if (!selectNodesOnDrag && !selected && isSelectable) {
  unsetNodesSelection();
  @@ -150,7 +150,7 @@ export default (NodeComponent: ComponentType<NodeComponentProps>) => {
  // Because of that we set dragging to true inside the onDrag handler and handle the click here
  if (!isDragging) {
  if (isSelectable && !selectNodesOnDrag && !selected) {
  - addSelectedElements({ id: node.id, type: node.type } as Node);
  + addSelectedElements(node);
  }
  onClick?.(event as MouseEvent, node);
  