weasel API - v0.8.0
    Preparing search index...

    Interface UseEyedropperToolOptions

    interface UseEyedropperToolOptions {
        colorOf: (id: string) => string | null;
        hotkey?: HotkeyTrigger | null;
        keybinding?: ToolKeybinding | null;
        onPick: (color: string | null) => void;
    }
    Index

    Properties

    colorOf: (id: string) => string | null

    Map a node id to a color string, or null if the node has no color to sample. Called on click with the id of the topmost node under the click point.

    hotkey?: HotkeyTrigger | null

    Override the default 'alt' hotkey trigger. Pass null to omit.

    keybinding?: ToolKeybinding | null

    Override the default { key: 'I' } keybinding. Pass null to omit the keybinding entirely (palette-only or hotkey-only wiring).

    onPick: (color: string | null) => void

    Called when the user picks a color. null means "no node was hit with a color" — currently only reachable when colorOf returns null on a real hit; empty-click is a no-op in v1.