{ "version": 3, "sources": ["../../../../src/lib/ui/hooks/useShowAutoSizeToggle.ts"], "sourcesContent": ["import { TLTextShape, useEditor, useValue } from '@tldraw/editor'\n\nexport function useShowAutoSizeToggle() {\n\tconst editor = useEditor()\n\treturn useValue(\n\t\t'showAutoSizeToggle',\n\t\t() => {\n\t\t\tconst { selectedShapes } = editor\n\t\t\treturn (\n\t\t\t\tselectedShapes.length === 1 &&\n\t\t\t\teditor.isShapeOfType(selectedShapes[0], 'text') &&\n\t\t\t\tselectedShapes[0].props.autoSize === false\n\t\t\t)\n\t\t},\n\t\t[editor]\n\t)\n}\n"], "mappings": "AAAA,SAAsB,WAAW,gBAAgB;AAE1C,SAAS,wBAAwB;AACvC,QAAM,SAAS,UAAU;AACzB,SAAO;AAAA,IACN;AAAA,IACA,MAAM;AACL,YAAM,EAAE,eAAe,IAAI;AAC3B,aACC,eAAe,WAAW,KAC1B,OAAO,cAA2B,eAAe,CAAC,GAAG,MAAM,KAC3D,eAAe,CAAC,EAAE,MAAM,aAAa;AAAA,IAEvC;AAAA,IACA,CAAC,MAAM;AAAA,EACR;AACD;", "names": [] }