@monza-editor/react 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- import "monza-editor/style.css";
2
1
  import { type RenderOptions } from "monza-editor";
3
2
  import { type JSX } from "react";
4
3
  interface Props extends Omit<RenderOptions, "highlight"> {
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{jsx as r,jsxs as e}from"react/jsx-runtime";import"monza-editor/style.css";import{initialize as t,styles as a}from"monza-editor";import{useEffect as c,useRef as l}from"react";let n=({className:n,id:o,onHighlight:i,...m})=>{let s=l(null),u=l(null),d=l(null);return c(()=>{s.current&&u.current&&d.current&&t({...m,code:d.current,highlight:i,pre:u.current,textarea:s.current})},[]),e("div",{className:`${a.main} ${n}`,id:o,children:[r("textarea",{className:a.textarea,ref:s}),r("pre",{className:a.pre,ref:u,children:r("code",{className:a.code,ref:d})})]})};export{n as Editor};
1
+ import{jsx as r,jsxs as e}from"react/jsx-runtime";import{initialize as t,styles as a}from"monza-editor";import{useEffect as c,useRef as l}from"react";let n=({className:n,id:i,onHighlight:m,...o})=>{let u=l(null),d=l(null),s=l(null);return c(()=>{u.current&&d.current&&s.current&&t({...o,code:s.current,highlight:m,pre:d.current,textarea:u.current})},[]),e("div",{className:`${a.main} ${n}`,id:i,children:[r("textarea",{className:a.textarea,ref:u}),r("pre",{className:a.pre,ref:d,children:r("code",{className:a.code,ref:s})})]})};export{n as Editor};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monza-editor/react",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "React component of Monza editor",
5
5
  "repository": "https://github.com/raviqqe/monza-editor",
6
6
  "license": "MIT",
@@ -16,7 +16,7 @@
16
16
  },
17
17
  "dependencies": {
18
18
  "react": "^19.1.1",
19
- "monza-editor": "0.4.0"
19
+ "monza-editor": "0.4.2"
20
20
  },
21
21
  "devDependencies": {
22
22
  "@raviqqe/react-tsconfig": "^2.0.0",