{ "version": 3, "sources": ["../../../src/lib/canvas/TldrawHoveredShapeIndicator.tsx"], "sourcesContent": ["import {\n\tShapeIndicator,\n\tTLHoveredShapeIndicatorComponent,\n\tuseEditor,\n\tuseValue,\n} from '@tldraw/editor'\n\nexport const TldrawHoveredShapeIndicator: TLHoveredShapeIndicatorComponent = ({ shapeId }) => {\n\tconst editor = useEditor()\n\tconst showHoveredShapeIndicator = useValue(\n\t\t'show hovered',\n\t\t() => {\n\t\t\t// When the editor is editing a shape and hovering that shape,\n\t\t\t// don't show its indicator; but DO show other hover indicators\n\t\t\tif (editor.isIn('select.editing_shape')) {\n\t\t\t\treturn editor.hoveredShapeId !== editor.editingShapeId\n\t\t\t}\n\n\t\t\t// Otherise, only show the hovered indicator when the editor\n\t\t\t// is in the idle state\n\t\t\treturn editor.isInAny('select.idle')\n\t\t},\n\t\t[editor]\n\t)\n\tif (!showHoveredShapeIndicator) return null\n\treturn \n}\n\n//\n"], "mappings": "AAyBQ;AAzBR;AAAA,EACC;AAAA,EAEA;AAAA,EACA;AAAA,OACM;AAEA,MAAM,8BAAgE,CAAC,EAAE,QAAQ,MAAM;AAC7F,QAAM,SAAS,UAAU;AACzB,QAAM,4BAA4B;AAAA,IACjC;AAAA,IACA,MAAM;AAGL,UAAI,OAAO,KAAK,sBAAsB,GAAG;AACxC,eAAO,OAAO,mBAAmB,OAAO;AAAA,MACzC;AAIA,aAAO,OAAO,QAAQ,aAAa;AAAA,IACpC;AAAA,IACA,CAAC,MAAM;AAAA,EACR;AACA,MAAI,CAAC;AAA2B,WAAO;AACvC,SAAO,oBAAC,kBAAe,WAAU,8BAA6B,IAAI,SAAS;AAC5E;", "names": [] }