{
  "version": 3,
  "sources": ["../../../../../src/lib/shapes/geo/toolStates/Idle.ts"],
  "sourcesContent": ["import { StateNode, TLKeyboardEventInfo, TLPointerEventInfo } from '@tldraw/editor'\nimport { startEditingShapeWithRichText } from '../../../tools/SelectTool/selectHelpers'\n\nexport class Idle extends StateNode {\n\tstatic override id = 'idle'\n\n\toverride onPointerDown(info: TLPointerEventInfo) {\n\t\tthis.parent.transition('pointing', info)\n\t}\n\n\toverride onEnter() {\n\t\tthis.editor.setCursor({ type: 'cross', rotation: 0 })\n\t}\n\n\toverride onKeyUp(info: TLKeyboardEventInfo) {\n\t\tconst { editor } = this\n\t\tif (info.key === 'Enter') {\n\t\t\tconst onlySelectedShape = editor.getOnlySelectedShape()\n\t\t\tif (editor.canEditShape(onlySelectedShape)) {\n\t\t\t\tstartEditingShapeWithRichText(editor, onlySelectedShape, { selectAll: true })\n\t\t\t}\n\t\t}\n\t}\n\n\toverride onCancel() {\n\t\tthis.editor.setCurrentTool('select')\n\t}\n}\n"],
  "mappings": "AAAA,SAAS,iBAA0D;AACnE,SAAS,qCAAqC;AAEvC,MAAM,aAAa,UAAU;AAAA,EACnC,OAAgB,KAAK;AAAA,EAEZ,cAAc,MAA0B;AAChD,SAAK,OAAO,WAAW,YAAY,IAAI;AAAA,EACxC;AAAA,EAES,UAAU;AAClB,SAAK,OAAO,UAAU,EAAE,MAAM,SAAS,UAAU,EAAE,CAAC;AAAA,EACrD;AAAA,EAES,QAAQ,MAA2B;AAC3C,UAAM,EAAE,OAAO,IAAI;AACnB,QAAI,KAAK,QAAQ,SAAS;AACzB,YAAM,oBAAoB,OAAO,qBAAqB;AACtD,UAAI,OAAO,aAAa,iBAAiB,GAAG;AAC3C,sCAA8B,QAAQ,mBAAmB,EAAE,WAAW,KAAK,CAAC;AAAA,MAC7E;AAAA,IACD;AAAA,EACD;AAAA,EAES,WAAW;AACnB,SAAK,OAAO,eAAe,QAAQ;AAAA,EACpC;AACD;",
  "names": []
}
