@monza-editor/react 0.1.7 → 0.1.8

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,9 +1,18 @@
1
- import { type RenderOptions } from "monza-editor";
2
- import { type JSX } from "react";
1
+ import { RenderOptions } from "monza-editor";
2
+ import { JSX } from "react";
3
+
4
+ //#region src/index.d.ts
3
5
  interface Props extends Omit<RenderOptions, "highlight"> {
4
- className?: string;
5
- id?: string;
6
- onHighlight: RenderOptions["highlight"];
6
+ className?: string;
7
+ id?: string;
8
+ onHighlight: RenderOptions["highlight"];
7
9
  }
8
- export declare const Editor: ({ className, id, onHighlight, value, ...rest }: Props) => JSX.Element;
9
- export {};
10
+ declare const Editor: ({
11
+ className,
12
+ id,
13
+ onHighlight,
14
+ value,
15
+ ...rest
16
+ }: Props) => JSX.Element;
17
+ //#endregion
18
+ export { Editor };
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{jsx as r,jsxs as e}from"react/jsx-runtime";import{initialize as t,styles as c}from"monza-editor";import{useEffect as a,useRef as n}from"react";let l=({className:l,id:u,onHighlight:i,value:m,...o})=>{let d=n(null),s=n(null),p=n(null);return a(()=>{d.current&&s.current&&p.current&&(t({...o,code:p.current,highlight:i,pre:s.current,textarea:d.current}),d.current.value=m??"")},[d.current,s.current,p.current]),e("div",{className:`${c.main} ${l}`,id:u,children:[r("textarea",{className:c.textarea,ref:d}),r("pre",{className:c.pre,ref:s,children:r("code",{className:c.code,ref:p})})]})};export{l as Editor};
1
+ import{initialize as e,styles as t}from"monza-editor";import{useEffect as n,useRef as r}from"react";import{jsx as i,jsxs as a}from"react/jsx-runtime";const o=({className:o,id:s,onHighlight:c,value:l,...u})=>{let d=r(null),f=r(null),p=r(null);return n(()=>{d.current&&f.current&&p.current&&(e({...u,code:p.current,highlight:c,pre:f.current,textarea:d.current}),d.current.value=l??``)},[d.current,f.current,p.current]),a(`div`,{className:`${t.main} ${o}`,id:s,children:[i(`textarea`,{className:t.textarea,ref:d}),i(`pre`,{className:t.pre,ref:f,children:i(`code`,{className:t.code,ref:p})})]})};export{o as Editor};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monza-editor/react",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "React component of Monza editor",
5
5
  "repository": "https://github.com/raviqqe/monza-editor",
6
6
  "license": "MIT",
@@ -16,20 +16,19 @@
16
16
  },
17
17
  "dependencies": {
18
18
  "react": "^19.1.1",
19
- "monza-editor": "0.5.4"
19
+ "monza-editor": "0.5.5"
20
20
  },
21
21
  "devDependencies": {
22
- "@raviqqe/react-tsconfig": "^2.0.0",
23
- "@raviqqe/tsconfig": "^2.0.1",
24
- "@rsbuild/plugin-react": "^1.4.0",
25
- "@rslib/core": "^0.12.4",
22
+ "@raviqqe/react-tsconfig": "^2.0.1",
23
+ "@raviqqe/tsconfig": "^2.0.3",
26
24
  "@testing-library/react": "^16.3.0",
27
- "@types/react": "^19.1.12",
25
+ "@types/react": "^19.1.13",
26
+ "tsdown": "^0.15.4",
28
27
  "typescript": "^5.9.2",
29
28
  "vitest": "^3.0.2"
30
29
  },
31
30
  "scripts": {
32
- "build": "rslib build",
31
+ "build": "tsdown",
33
32
  "test": "vitest"
34
33
  }
35
34
  }