monza-editor 0.5.6 → 0.5.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
@@ -7,7 +7,7 @@ export interface InitializationOptions {
7
7
  code: HTMLElement;
8
8
  highlight: (text: string) => string;
9
9
  onChange?: (event: TextareaEvent) => void;
10
- onInput?: (event: TextareaEvent) => void;
10
+ onInput?: (event: InputEvent) => void;
11
11
  pre: HTMLPreElement;
12
12
  textarea: HTMLTextAreaElement;
13
13
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,KAAK,gBAAgB,GAAG,MAAM,GAAG,KAAK,GAAG,UAAU,CAAC;AAEpD,eAAO,MAAM,MAAM,EAAgB,MAAM,CAAC,gBAAgB,GAAG,MAAM,EAAE,MAAM,CAAC,CAAC;AAE7E,MAAM,WAAW,aAAc,SAAQ,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC;IAC1D,MAAM,EAAE,mBAAmB,CAAC;CAC7B;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,WAAW,CAAC;IAClB,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IACpC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAC1C,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IACzC,GAAG,EAAE,cAAc,CAAC;IACpB,QAAQ,EAAE,mBAAmB,CAAC;CAC/B;AAED,eAAO,MAAM,UAAU,GAAI,wDAOxB,qBAAqB,KAAG,IA+B1B,CAAC;AAEF,MAAM,WAAW,aACf,SAAQ,IAAI,CAAC,qBAAqB,EAAE,gBAAgB,CAAC;IACrD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,MAAM,GACjB,KAAK,cAAc,EACnB,uBAAuB,aAAa,KACnC,IAaF,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,KAAK,gBAAgB,GAAG,MAAM,GAAG,KAAK,GAAG,UAAU,CAAC;AAEpD,eAAO,MAAM,MAAM,EAAgB,MAAM,CAAC,gBAAgB,GAAG,MAAM,EAAE,MAAM,CAAC,CAAC;AAE7E,MAAM,WAAW,aAAc,SAAQ,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC;IAC1D,MAAM,EAAE,mBAAmB,CAAC;CAC7B;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,WAAW,CAAC;IAClB,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IACpC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAC1C,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;IACtC,GAAG,EAAE,cAAc,CAAC;IACpB,QAAQ,EAAE,mBAAmB,CAAC;CAC/B;AAED,eAAO,MAAM,UAAU,GAAI,wDAOxB,qBAAqB,KAAG,IA+B1B,CAAC;AAEF,MAAM,WAAW,aACf,SAAQ,IAAI,CAAC,qBAAqB,EAAE,gBAAgB,CAAC;IACrD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,MAAM,GACjB,KAAK,cAAc,EACnB,uBAAuB,aAAa,KACnC,IAaF,CAAC"}
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- let e={main:"main-TdgjvV",text:"text-YtgeQ_",editor:"editor-ore7X3",textarea:"textarea-ugnhty editor-ore7X3 text-YtgeQ_",pre:"pre-bJTdjq editor-ore7X3",code:"code-p0LDSQ text-YtgeQ_"},t=({code:e,highlight:t,onChange:a,onInput:r,pre:l,textarea:d})=>{d.setAttribute("autocapitalize","off"),d.setAttribute("spellcheck","false");let n=()=>{l.scrollTop=d.scrollTop,l.scrollLeft=d.scrollLeft},i=()=>window.requestAnimationFrame(()=>{let a=d.value;e.innerHTML=t("\n"===a.at(-1)?`${a} `:a),n()});d.addEventListener("input",e=>{i(),r?.(e)}),d.addEventListener("scroll",n),a&&d.addEventListener("change",e=>a(e)),i()},a=(a,{value:r,...l})=>{let d=a.appendChild(document.createElement("textarea")),n=a.appendChild(document.createElement("pre")),i=n.appendChild(document.createElement("code"));d.value=r??"",a.classList.add(e.main),d.className=e.textarea,n.className=e.pre,i.className=e.code,t({...l,code:i,pre:n,textarea:d})};export{t as initialize,a as render,e as styles};
1
+ import"./rslib-runtime.js";let e={main:"main-TdgjvV",text:"text-YtgeQ_",editor:"editor-ore7X3",textarea:"textarea-ugnhty editor-ore7X3 text-YtgeQ_",pre:"pre-bJTdjq editor-ore7X3",code:"code-p0LDSQ text-YtgeQ_"},t=({code:e,highlight:t,onChange:a,onInput:r,pre:l,textarea:d})=>{d.setAttribute("autocapitalize","off"),d.setAttribute("spellcheck","false");let n=()=>{l.scrollTop=d.scrollTop,l.scrollLeft=d.scrollLeft},i=()=>window.requestAnimationFrame(()=>{let a=d.value;e.innerHTML=t("\n"===a.at(-1)?`${a} `:a),n()});d.addEventListener("input",e=>{i(),r?.(e)}),d.addEventListener("scroll",n),a&&d.addEventListener("change",e=>a(e)),i()},a=(a,{value:r,...l})=>{let d=a.appendChild(document.createElement("textarea")),n=a.appendChild(document.createElement("pre")),i=n.appendChild(document.createElement("code"));d.value=r??"",a.classList.add(e.main),d.className=e.textarea,n.className=e.pre,i.className=e.code,t({...l,code:i,pre:n,textarea:d})};export{t as initialize,a as render,e as styles};
@@ -0,0 +1 @@
1
+ var r={},e={};function t(o){var n=e[o];if(void 0!==n)return n.exports;var a=e[o]={exports:{}};return r[o](a,a.exports,t),a.exports}t.m=r,t.add=function(r){Object.assign(t.m,r)};export{t as __webpack_require__};
package/package.json CHANGED
@@ -1,12 +1,9 @@
1
1
  {
2
2
  "name": "monza-editor",
3
- "version": "0.5.6",
3
+ "version": "0.5.8",
4
4
  "description": "The textarea element with syntax highlight",
5
- "repository": "https://github.com/raviqqe/monza-editor",
6
5
  "license": "MIT",
7
- "publishConfig": {
8
- "provenance": true
9
- },
6
+ "repository": "https://github.com/raviqqe/monza-editor",
10
7
  "type": "module",
11
8
  "exports": {
12
9
  ".": {
@@ -17,14 +14,17 @@
17
14
  "default": "./dist/index.css"
18
15
  }
19
16
  },
17
+ "publishConfig": {
18
+ "provenance": true
19
+ },
20
20
  "dependencies": {},
21
21
  "devDependencies": {
22
- "@raviqqe/tsconfig": "^2.0.3",
23
- "@rslib/core": "^0.18.2",
24
- "jsdom": "^27.2.0",
25
- "typescript": "^5.9.3",
22
+ "@raviqqe/tsconfig": "^3.0.0",
23
+ "@rslib/core": "^0.20.0",
24
+ "jsdom": "^29.0.1",
25
+ "typescript": "^6.0.2",
26
26
  "typescript-plugin-css-modules": "^5.2.0",
27
- "vitest": "^4.0.14"
27
+ "vitest": "^4.1.1"
28
28
  },
29
29
  "scripts": {
30
30
  "build": "rslib build",