{ "version": 3, "sources": ["../../../../src/lib/ui/hooks/useOnlyFlippableShape.ts"], "sourcesContent": ["import {\n\tTLArrowShape,\n\tTLDrawShape,\n\tTLGroupShape,\n\tTLLineShape,\n\tuseEditor,\n\tuseValue,\n} from '@tldraw/editor'\n\nexport function useOnlyFlippableShape() {\n\tconst editor = useEditor()\n\treturn useValue(\n\t\t'onlyFlippableShape',\n\t\t() => {\n\t\t\tconst { selectedShapes } = editor\n\t\t\treturn (\n\t\t\t\tselectedShapes.length === 1 &&\n\t\t\t\tselectedShapes.every(\n\t\t\t\t\t(shape) =>\n\t\t\t\t\t\teditor.isShapeOfType(shape, 'group') ||\n\t\t\t\t\t\teditor.isShapeOfType(shape, 'arrow') ||\n\t\t\t\t\t\teditor.isShapeOfType(shape, 'line') ||\n\t\t\t\t\t\teditor.isShapeOfType(shape, 'draw')\n\t\t\t\t)\n\t\t\t)\n\t\t},\n\t\t[editor]\n\t)\n}\n"], "mappings": "AAAA;AAAA,EAKC;AAAA,EACA;AAAA,OACM;AAEA,SAAS,wBAAwB;AACvC,QAAM,SAAS,UAAU;AACzB,SAAO;AAAA,IACN;AAAA,IACA,MAAM;AACL,YAAM,EAAE,eAAe,IAAI;AAC3B,aACC,eAAe,WAAW,KAC1B,eAAe;AAAA,QACd,CAAC,UACA,OAAO,cAA4B,OAAO,OAAO,KACjD,OAAO,cAA4B,OAAO,OAAO,KACjD,OAAO,cAA2B,OAAO,MAAM,KAC/C,OAAO,cAA2B,OAAO,MAAM;AAAA,MACjD;AAAA,IAEF;AAAA,IACA,CAAC,MAAM;AAAA,EACR;AACD;", "names": [] }