{
  "version": 3,
  "sources": ["../../../src/lib/hooks/useEditor.ts"],
  "sourcesContent": ["import React, { createContext } from 'react'\nimport { Editor } from '../editor/Editor'\n\n/** @internal */\nexport const EditorContext = createContext<Editor | null>(null)\n\n/** @public */\nexport function useEditor(): Editor {\n\tconst editor = React.useContext(EditorContext)\n\tif (!editor) {\n\t\tthrow new Error(\n\t\t\t'useEditor must be used inside of the <Tldraw /> or <TldrawEditor /> components'\n\t\t)\n\t}\n\treturn editor\n}\n"],
  "mappings": "AAAA,OAAO,SAAS,qBAAqB;AAI9B,MAAM,gBAAgB,cAA6B,IAAI;AAGvD,SAAS,YAAoB;AACnC,QAAM,SAAS,MAAM,WAAW,aAAa;AAC7C,MAAI,CAAC,QAAQ;AACZ,UAAM,IAAI;AAAA,MACT;AAAA,IACD;AAAA,EACD;AACA,SAAO;AACR;",
  "names": []
}
