@visualli/react 0.1.5 → 0.1.7

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/dist/index.d.cts CHANGED
@@ -81,6 +81,7 @@ interface VisualliCanvasProps {
81
81
  chromaticImmersion?: boolean;
82
82
  onNodeClick?: (node: FlatNode) => void;
83
83
  onLayerChange?: (layerId: string, layer: VisualliLayer) => void;
84
+ onNodeHover?: (nodeId: string | null) => void;
84
85
  renderOverlay?: (params: {
85
86
  isDark: boolean;
86
87
  containerWidth: number;
package/dist/index.d.ts CHANGED
@@ -81,6 +81,7 @@ interface VisualliCanvasProps {
81
81
  chromaticImmersion?: boolean;
82
82
  onNodeClick?: (node: FlatNode) => void;
83
83
  onLayerChange?: (layerId: string, layer: VisualliLayer) => void;
84
+ onNodeHover?: (nodeId: string | null) => void;
84
85
  renderOverlay?: (params: {
85
86
  isDark: boolean;
86
87
  containerWidth: number;
package/dist/index.js CHANGED
@@ -2097,7 +2097,7 @@ function getRootLayerId(doc) {
2097
2097
  return doc.layers.keys().next().value ?? null;
2098
2098
  }
2099
2099
  function VisualliCanvas(props) {
2100
- const { isDark = false, chromaticImmersion = false, onNodeClick, onLayerChange, renderOverlay, renderNodeContent, navigationStackTop = "16px", navigationStackLeft = "16px", className = "", style } = props;
2100
+ const { isDark = false, chromaticImmersion = false, onNodeClick, onLayerChange, onNodeHover, renderOverlay, renderNodeContent, navigationStackTop = "16px", navigationStackLeft = "16px", className = "", style } = props;
2101
2101
  const [fileText, setFileText] = useState3(void 0);
2102
2102
  useEffect6(() => {
2103
2103
  if (!props.visualliFile) {
@@ -2656,6 +2656,7 @@ function VisualliCanvas(props) {
2656
2656
  if (hovered !== pointerNodeIdRef.current) {
2657
2657
  pointerNodeIdRef.current = hovered;
2658
2658
  setPointerNodeId(hovered);
2659
+ onNodeHover?.(hovered);
2659
2660
  }
2660
2661
  if (hovered) {
2661
2662
  stage.container().style.cursor = "pointer";