{"version":3,"file":"EditorStateContext.cjs","names":[],"sources":["../../src/EditorStateContext.tsx"],"sourcesContent":["'use client';\n\nimport type { EditorStateManager } from '@intlayer/editor';\nimport {\n  createContext,\n  type FC,\n  type PropsWithChildren,\n  useContext,\n} from 'react';\n\nconst EditorStateContext = createContext<EditorStateManager | null>(null);\n\nexport const EditorStateProvider: FC<\n  PropsWithChildren<{ manager: EditorStateManager }>\n> = ({ children, manager }) => (\n  <EditorStateContext.Provider value={manager}>\n    {children}\n  </EditorStateContext.Provider>\n);\n\nexport const useEditorStateManager = (): EditorStateManager | null =>\n  useContext(EditorStateContext);\n"],"mappings":";;;;;;;;AAUA,MAAM,8CAA8D,KAAK;AAEzE,MAAa,uBAER,EAAE,UAAU,cACf,2CAAC,mBAAmB,UAApB;CAA6B,OAAO;CACjC;CAC2B;AAGhC,MAAa,oDACA,mBAAmB"}