import { jsx as r } from "react/jsx-runtime";
import { useContext as d, createContext as n, useMemo as m } from "react";
import { PlateWrapper as p } from "../components/EditorPositioningWrapper/PlateWrapper.es.js";
import { useEditorResize as x } from "../hooks/useEditorResize.es.js";
const t = n({
  editorWidth: 0,
  editorRef: null
});
t.displayName = "EditorResizeContext";
const a = () => d(t), l = ({ children: i }) => {
  const { editorRef: e, editorWidth: o } = x(), s = m(() => ({ editorWidth: o, editorRef: e }), [o, e]);
  return /* @__PURE__ */ r(t.Provider, { value: s, children: /* @__PURE__ */ r(p, { ref: e, children: i }) });
};
export {
  l as EditorResizeContextProvider,
  a as useEditorResizeContext
};
//# sourceMappingURL=EditorResizeContext.es.js.map
