@monza-editor/preact 0.1.6 → 0.1.7
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/package.json +3 -3
- package/dist/index.d.ts +0 -9
- package/dist/index.js +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@monza-editor/preact",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "Preact component of Monza editor",
|
|
5
5
|
"repository": "https://github.com/raviqqe/monza-editor",
|
|
6
6
|
"license": "MIT",
|
|
@@ -16,13 +16,13 @@
|
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"preact": "^10.27.1",
|
|
19
|
-
"monza-editor": "0.5.
|
|
19
|
+
"monza-editor": "0.5.3"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@raviqqe/react-tsconfig": "^2.0.0",
|
|
23
23
|
"@raviqqe/tsconfig": "^2.0.1",
|
|
24
24
|
"@rsbuild/plugin-preact": "^1.5.2",
|
|
25
|
-
"@rslib/core": "^0.12.
|
|
25
|
+
"@rslib/core": "^0.12.4",
|
|
26
26
|
"@testing-library/preact": "^3.2.4",
|
|
27
27
|
"typescript": "^5.9.2",
|
|
28
28
|
"vitest": "^3.0.2"
|
package/dist/index.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { type RenderOptions } from "monza-editor";
|
|
2
|
-
import type { JSX } from "preact";
|
|
3
|
-
interface Props extends Omit<RenderOptions, "highlight"> {
|
|
4
|
-
class?: string;
|
|
5
|
-
id?: string;
|
|
6
|
-
onHighlight: RenderOptions["highlight"];
|
|
7
|
-
}
|
|
8
|
-
export declare const Editor: ({ id, onHighlight, value, ...rest }: Props) => JSX.Element;
|
|
9
|
-
export {};
|
package/dist/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as r,jsxs as e}from"preact/jsx-runtime";import{initialize as t,styles as c}from"monza-editor";import{useEffect as n,useRef as l}from"preact/hooks";let a=({id:a,onHighlight:o,value:i,...u})=>{let s=l(null),d=l(null),m=l(null);return n(()=>{s.current&&d.current&&m.current&&t({...u,code:m.current,highlight:o,pre:d.current,textarea:s.current})},[s.current,d.current,m.current]),e("div",{class:`${c.main} ${u.class}`,id:a,children:[r("textarea",{class:c.textarea,ref:s,children:i}),r("pre",{class:c.pre,ref:d,children:r("code",{class:c.code,ref:m})})]})};export{a as Editor};
|