monza-editor 0.1.0 → 0.2.0
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/README.md +1 -2
- package/cspell.json +11 -1
- package/dist/index.css +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/examples/shiki/index.html +12 -0
- package/examples/shiki/package.json +19 -0
- package/package.json +22 -11
- package/pnpm-workspace.yaml +3 -0
- package/rslib.config.ts +3 -0
- package/vitest.config.ts +7 -0
package/README.md
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
# Monza editor
|
|
2
2
|
|
|
3
3
|
[](https://github.com/raviqqe/monza-editor/actions)
|
|
4
|
-
[](https://codecov.io/gh/raviqqe/monza-editor)
|
|
5
4
|
[](https://www.npmjs.com/package/monza-editor)
|
|
6
5
|
[](LICENSE)
|
|
7
6
|
|
|
8
|
-
The `textarea` element with syntax highlight.
|
|
7
|
+
The minimal `textarea` element with syntax highlight.
|
|
9
8
|
|
|
10
9
|
## License
|
|
11
10
|
|
package/cspell.json
CHANGED
package/dist/index.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.main-TdgjvV{position:relative}.text-YtgeQ_{white-space:break-spaces;word-break:break-word}.editor-ore7X3{box-sizing:border-box;font-family:var(--font-family,monospace);font-size:inherit;line-height:inherit;padding:var(--padding,.1rem);text-align:left;border:none;width:100%;height:100%;margin:0}.textarea-ugnhty{field-sizing:content;resize:none}.pre-bJTdjq{pointer-events:none;position:absolute;top:0;left:0}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const initialize: (container: Element, highlight: (text: string) => string) => void;
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,GACrB,WAAW,OAAO,EAClB,WAAW,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,KAClC,IAuBF,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
let i=()=>{};export{
|
|
1
|
+
let e=(e,t)=>{e.className+=" main-TdgjvV";let a=e.appendChild(document.createElement("textarea"));a.className+=" textarea-ugnhty editor-ore7X3 text-YtgeQ_";let l=e.appendChild(document.createElement("pre"));l.className+=" pre-bJTdjq editor-ore7X3";let n=l.appendChild(document.createElement("code"));n.className+=" code-p0LDSQ text-YtgeQ_";let i=()=>window.requestAnimationFrame(()=>{n.innerHTML=t(a.value),a.style.height="0",a.style.height=`max(${a.scrollHeight}px, 100%)`});a.addEventListener("input",i),i()};export{e as initialize};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>Shiki example for Monza editor</title>
|
|
7
|
+
</head>
|
|
8
|
+
<body>
|
|
9
|
+
<div id="app"></div>
|
|
10
|
+
<script type="module" src="/src/index.ts"></script>
|
|
11
|
+
</body>
|
|
12
|
+
</html>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@monza-editor/shiki-example",
|
|
3
|
+
"description": "Shiki example for Monza editor",
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"start": "vite",
|
|
8
|
+
"build": "tsc && vite build"
|
|
9
|
+
},
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"monza-editor": "workspace:*",
|
|
12
|
+
"shiki": "^3.9.2"
|
|
13
|
+
},
|
|
14
|
+
"devDependencies": {
|
|
15
|
+
"@raviqqe/tsconfig": "^2.0.1",
|
|
16
|
+
"typescript": "~5.9.2",
|
|
17
|
+
"vite": "^7.1.2"
|
|
18
|
+
}
|
|
19
|
+
}
|
package/package.json
CHANGED
|
@@ -1,33 +1,44 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "monza-editor",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "The textarea with syntax highlight",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "The minimal textarea with syntax highlight",
|
|
5
5
|
"repository": "https://github.com/raviqqe/monza-editor",
|
|
6
6
|
"license": "MIT",
|
|
7
|
+
"publishConfig": {
|
|
8
|
+
"provenance": true
|
|
9
|
+
},
|
|
7
10
|
"engines": {
|
|
8
11
|
"node": "^24.5.0"
|
|
9
12
|
},
|
|
13
|
+
"packageManager": "pnpm@10.14.0+sha512.ad27a79641b49c3e481a16a805baa71817a04bbe06a38d17e60e2eaee83f6a146c6a688125f5792e48dd5ba30e7da52a5cda4c3992b9ccf333f9ce223af84748",
|
|
10
14
|
"type": "module",
|
|
11
15
|
"exports": {
|
|
12
16
|
".": {
|
|
13
17
|
"types": "./dist/index.d.ts",
|
|
14
18
|
"default": "./dist/index.js"
|
|
19
|
+
},
|
|
20
|
+
"./style.css": {
|
|
21
|
+
"default": "./dist/index.css"
|
|
15
22
|
}
|
|
16
23
|
},
|
|
17
|
-
"
|
|
24
|
+
"scripts": {
|
|
25
|
+
"build": "rslib build",
|
|
26
|
+
"build:tsc": "tsc --emitDeclarationOnly",
|
|
27
|
+
"lint": "biome ci",
|
|
28
|
+
"test": "vitest"
|
|
29
|
+
},
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"shiki": "^3.9.2"
|
|
32
|
+
},
|
|
18
33
|
"devDependencies": {
|
|
19
34
|
"@biomejs/biome": "^2.1.4",
|
|
20
35
|
"@raviqqe/biome-config": "^2.0.10",
|
|
21
|
-
"@raviqqe/tsconfig": "^2.0.
|
|
36
|
+
"@raviqqe/tsconfig": "^2.0.1",
|
|
22
37
|
"@rslib/core": "^0.12.0",
|
|
23
38
|
"@vitest/coverage-v8": "^3.0.2",
|
|
39
|
+
"jsdom": "^26.1.0",
|
|
24
40
|
"typescript": "^5.0.2",
|
|
41
|
+
"typescript-plugin-css-modules": "^5.2.0",
|
|
25
42
|
"vitest": "^3.0.2"
|
|
26
|
-
},
|
|
27
|
-
"scripts": {
|
|
28
|
-
"build": "rslib build",
|
|
29
|
-
"build:tsc": "tsc --emitDeclarationOnly",
|
|
30
|
-
"lint": "biome ci",
|
|
31
|
-
"test": "vitest --coverage"
|
|
32
43
|
}
|
|
33
|
-
}
|
|
44
|
+
}
|
package/rslib.config.ts
CHANGED