diff --git a/.gitignore b/.gitignore index 137d574..725464b 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /node_modules/ /examples/build/ build +/coverage/ diff --git a/.npmignore b/.npmignore index a9f8acc..02065b6 100644 --- a/.npmignore +++ b/.npmignore @@ -6,3 +6,4 @@ eslint.config.mjs tsconfig.types.json .github webpack.config.ts +/coverage/ diff --git a/coverage/clover.xml b/coverage/clover.xml deleted file mode 100644 index 91b22b6..0000000 --- a/coverage/clover.xml +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/coverage/coverage-final.json b/coverage/coverage-final.json deleted file mode 100644 index 49a963f..0000000 --- a/coverage/coverage-final.json +++ /dev/null @@ -1,4 +0,0 @@ -{"/Users/v-chupurnov/WebstormProjects/pet/jodit-react/src/JoditEditor.tsx": {"path":"/Users/v-chupurnov/WebstormProjects/pet/jodit-react/src/JoditEditor.tsx","all":false,"statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":78}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":54}},"2":{"start":{"line":3,"column":0},"end":{"line":3,"column":59}},"3":{"start":{"line":4,"column":0},"end":{"line":4,"column":43}},"4":{"start":{"line":5,"column":0},"end":{"line":5,"column":40}},"5":{"start":{"line":6,"column":0},"end":{"line":6,"column":0}},"6":{"start":{"line":7,"column":0},"end":{"line":7,"column":45}},"7":{"start":{"line":8,"column":0},"end":{"line":8,"column":32}},"8":{"start":{"line":9,"column":0},"end":{"line":9,"column":18}},"9":{"start":{"line":10,"column":0},"end":{"line":10,"column":22}},"10":{"start":{"line":11,"column":0},"end":{"line":11,"column":13}},"11":{"start":{"line":12,"column":0},"end":{"line":12,"column":20}},"12":{"start":{"line":13,"column":0},"end":{"line":13,"column":1}},"13":{"start":{"line":14,"column":0},"end":{"line":14,"column":0}},"14":{"start":{"line":15,"column":0},"end":{"line":15,"column":38}},"15":{"start":{"line":16,"column":0},"end":{"line":16,"column":4}},"16":{"start":{"line":17,"column":0},"end":{"line":17,"column":38}},"17":{"start":{"line":18,"column":0},"end":{"line":18,"column":3}},"18":{"start":{"line":19,"column":0},"end":{"line":19,"column":5}},"19":{"start":{"line":20,"column":0},"end":{"line":20,"column":0}},"20":{"start":{"line":21,"column":0},"end":{"line":21,"column":71}},"21":{"start":{"line":22,"column":0},"end":{"line":22,"column":22}},"22":{"start":{"line":23,"column":0},"end":{"line":23,"column":30}},"23":{"start":{"line":24,"column":0},"end":{"line":24,"column":20}},"24":{"start":{"line":25,"column":0},"end":{"line":25,"column":13}},"25":{"start":{"line":26,"column":0},"end":{"line":26,"column":15}},"26":{"start":{"line":27,"column":0},"end":{"line":27,"column":53}},"27":{"start":{"line":28,"column":0},"end":{"line":28,"column":36}},"28":{"start":{"line":29,"column":0},"end":{"line":29,"column":19}},"29":{"start":{"line":30,"column":0},"end":{"line":30,"column":16}},"30":{"start":{"line":31,"column":0},"end":{"line":31,"column":38}},"31":{"start":{"line":32,"column":0},"end":{"line":32,"column":1}},"32":{"start":{"line":33,"column":0},"end":{"line":33,"column":0}},"33":{"start":{"line":34,"column":0},"end":{"line":34,"column":46}},"34":{"start":{"line":35,"column":0},"end":{"line":35,"column":2}},"35":{"start":{"line":36,"column":0},"end":{"line":36,"column":3}},"36":{"start":{"line":37,"column":0},"end":{"line":37,"column":28}},"37":{"start":{"line":38,"column":0},"end":{"line":38,"column":13}},"38":{"start":{"line":39,"column":0},"end":{"line":39,"column":10}},"39":{"start":{"line":40,"column":0},"end":{"line":40,"column":6}},"40":{"start":{"line":41,"column":0},"end":{"line":41,"column":8}},"41":{"start":{"line":42,"column":0},"end":{"line":42,"column":10}},"42":{"start":{"line":43,"column":0},"end":{"line":43,"column":12}},"43":{"start":{"line":44,"column":0},"end":{"line":44,"column":12}},"44":{"start":{"line":45,"column":0},"end":{"line":45,"column":9}},"45":{"start":{"line":46,"column":0},"end":{"line":46,"column":12}},"46":{"start":{"line":47,"column":0},"end":{"line":47,"column":4}},"47":{"start":{"line":48,"column":0},"end":{"line":48,"column":5}},"48":{"start":{"line":49,"column":0},"end":{"line":49,"column":7}},"49":{"start":{"line":50,"column":0},"end":{"line":50,"column":63}},"50":{"start":{"line":51,"column":0},"end":{"line":51,"column":47}},"51":{"start":{"line":52,"column":0},"end":{"line":52,"column":0}},"52":{"start":{"line":53,"column":0},"end":{"line":53,"column":25}},"53":{"start":{"line":54,"column":0},"end":{"line":54,"column":13}},"54":{"start":{"line":55,"column":0},"end":{"line":55,"column":36}},"55":{"start":{"line":56,"column":0},"end":{"line":56,"column":27}},"56":{"start":{"line":57,"column":0},"end":{"line":57,"column":12}},"57":{"start":{"line":58,"column":0},"end":{"line":58,"column":36}},"58":{"start":{"line":59,"column":0},"end":{"line":59,"column":5}},"59":{"start":{"line":60,"column":0},"end":{"line":60,"column":4}},"60":{"start":{"line":61,"column":0},"end":{"line":61,"column":25}},"61":{"start":{"line":62,"column":0},"end":{"line":62,"column":0}},"62":{"start":{"line":63,"column":0},"end":{"line":63,"column":19}},"63":{"start":{"line":64,"column":0},"end":{"line":64,"column":40}},"64":{"start":{"line":65,"column":0},"end":{"line":65,"column":56}},"65":{"start":{"line":66,"column":0},"end":{"line":66,"column":28}},"66":{"start":{"line":67,"column":0},"end":{"line":67,"column":0}},"67":{"start":{"line":68,"column":0},"end":{"line":68,"column":41}},"68":{"start":{"line":69,"column":0},"end":{"line":69,"column":21}},"69":{"start":{"line":70,"column":0},"end":{"line":70,"column":4}},"70":{"start":{"line":71,"column":0},"end":{"line":71,"column":0}},"71":{"start":{"line":72,"column":0},"end":{"line":72,"column":17}},"72":{"start":{"line":73,"column":0},"end":{"line":73,"column":16}},"73":{"start":{"line":74,"column":0},"end":{"line":74,"column":22}},"74":{"start":{"line":75,"column":0},"end":{"line":75,"column":5}},"75":{"start":{"line":76,"column":0},"end":{"line":76,"column":5}},"76":{"start":{"line":77,"column":0},"end":{"line":77,"column":44}},"77":{"start":{"line":78,"column":0},"end":{"line":78,"column":0}},"78":{"start":{"line":79,"column":0},"end":{"line":79,"column":52}},"79":{"start":{"line":80,"column":0},"end":{"line":80,"column":0}},"80":{"start":{"line":81,"column":0},"end":{"line":81,"column":19}},"81":{"start":{"line":82,"column":0},"end":{"line":82,"column":60}},"82":{"start":{"line":83,"column":0},"end":{"line":83,"column":0}},"83":{"start":{"line":84,"column":0},"end":{"line":84,"column":7}},"84":{"start":{"line":85,"column":0},"end":{"line":85,"column":33}},"85":{"start":{"line":86,"column":0},"end":{"line":86,"column":36}},"86":{"start":{"line":87,"column":0},"end":{"line":87,"column":6}},"87":{"start":{"line":88,"column":0},"end":{"line":88,"column":16}},"88":{"start":{"line":89,"column":0},"end":{"line":89,"column":18}},"89":{"start":{"line":90,"column":0},"end":{"line":90,"column":21}},"90":{"start":{"line":91,"column":0},"end":{"line":91,"column":43}},"91":{"start":{"line":92,"column":0},"end":{"line":92,"column":4}},"92":{"start":{"line":93,"column":0},"end":{"line":93,"column":0}},"93":{"start":{"line":94,"column":0},"end":{"line":94,"column":52}},"94":{"start":{"line":95,"column":0},"end":{"line":95,"column":13}},"95":{"start":{"line":96,"column":0},"end":{"line":96,"column":18}},"96":{"start":{"line":97,"column":0},"end":{"line":97,"column":21}},"97":{"start":{"line":98,"column":0},"end":{"line":98,"column":40}},"98":{"start":{"line":99,"column":0},"end":{"line":99,"column":4}},"99":{"start":{"line":100,"column":0},"end":{"line":100,"column":32}},"100":{"start":{"line":101,"column":0},"end":{"line":101,"column":0}},"101":{"start":{"line":102,"column":0},"end":{"line":102,"column":19}},"102":{"start":{"line":103,"column":0},"end":{"line":103,"column":37}},"103":{"start":{"line":104,"column":0},"end":{"line":104,"column":57}},"104":{"start":{"line":105,"column":0},"end":{"line":105,"column":4}},"105":{"start":{"line":106,"column":0},"end":{"line":106,"column":17}},"106":{"start":{"line":107,"column":0},"end":{"line":107,"column":0}},"107":{"start":{"line":108,"column":0},"end":{"line":108,"column":19}},"108":{"start":{"line":109,"column":0},"end":{"line":109,"column":34}},"109":{"start":{"line":110,"column":0},"end":{"line":110,"column":49}},"110":{"start":{"line":111,"column":0},"end":{"line":111,"column":11}},"111":{"start":{"line":112,"column":0},"end":{"line":112,"column":4}},"112":{"start":{"line":113,"column":0},"end":{"line":113,"column":0}},"113":{"start":{"line":114,"column":0},"end":{"line":114,"column":47}},"114":{"start":{"line":115,"column":0},"end":{"line":115,"column":60}},"115":{"start":{"line":116,"column":0},"end":{"line":116,"column":0}},"116":{"start":{"line":117,"column":0},"end":{"line":117,"column":45}},"117":{"start":{"line":118,"column":0},"end":{"line":118,"column":32}},"118":{"start":{"line":119,"column":0},"end":{"line":119,"column":0}},"119":{"start":{"line":120,"column":0},"end":{"line":120,"column":27}},"120":{"start":{"line":121,"column":0},"end":{"line":121,"column":15}},"121":{"start":{"line":122,"column":0},"end":{"line":122,"column":30}},"122":{"start":{"line":123,"column":0},"end":{"line":123,"column":35}},"123":{"start":{"line":124,"column":0},"end":{"line":124,"column":0}},"124":{"start":{"line":125,"column":0},"end":{"line":125,"column":17}},"125":{"start":{"line":126,"column":0},"end":{"line":126,"column":28}},"126":{"start":{"line":127,"column":0},"end":{"line":127,"column":16}},"127":{"start":{"line":128,"column":0},"end":{"line":128,"column":33}},"128":{"start":{"line":129,"column":0},"end":{"line":129,"column":37}},"129":{"start":{"line":130,"column":0},"end":{"line":130,"column":5}},"130":{"start":{"line":131,"column":0},"end":{"line":131,"column":25}},"131":{"start":{"line":132,"column":0},"end":{"line":132,"column":0}},"132":{"start":{"line":133,"column":0},"end":{"line":133,"column":19}},"133":{"start":{"line":134,"column":0},"end":{"line":134,"column":34}},"134":{"start":{"line":135,"column":0},"end":{"line":135,"column":0}},"135":{"start":{"line":136,"column":0},"end":{"line":136,"column":30}},"136":{"start":{"line":137,"column":0},"end":{"line":137,"column":64}},"137":{"start":{"line":138,"column":0},"end":{"line":138,"column":25}},"138":{"start":{"line":139,"column":0},"end":{"line":139,"column":5}},"139":{"start":{"line":140,"column":0},"end":{"line":140,"column":5}},"140":{"start":{"line":141,"column":0},"end":{"line":141,"column":0}},"141":{"start":{"line":142,"column":0},"end":{"line":142,"column":15}},"142":{"start":{"line":143,"column":0},"end":{"line":143,"column":24}},"143":{"start":{"line":144,"column":0},"end":{"line":144,"column":19}},"144":{"start":{"line":145,"column":0},"end":{"line":145,"column":12}},"145":{"start":{"line":146,"column":0},"end":{"line":146,"column":44}},"146":{"start":{"line":147,"column":0},"end":{"line":147,"column":5}},"147":{"start":{"line":148,"column":0},"end":{"line":148,"column":4}},"148":{"start":{"line":149,"column":0},"end":{"line":149,"column":14}},"149":{"start":{"line":150,"column":0},"end":{"line":150,"column":0}},"150":{"start":{"line":151,"column":0},"end":{"line":151,"column":10}},"151":{"start":{"line":152,"column":0},"end":{"line":152,"column":44}},"152":{"start":{"line":153,"column":0},"end":{"line":153,"column":13}},"153":{"start":{"line":154,"column":0},"end":{"line":154,"column":25}},"154":{"start":{"line":155,"column":0},"end":{"line":155,"column":16}},"155":{"start":{"line":156,"column":0},"end":{"line":156,"column":12}},"156":{"start":{"line":157,"column":0},"end":{"line":157,"column":22}},"157":{"start":{"line":158,"column":0},"end":{"line":158,"column":6}},"158":{"start":{"line":159,"column":0},"end":{"line":159,"column":9}},"159":{"start":{"line":160,"column":0},"end":{"line":160,"column":4}},"160":{"start":{"line":161,"column":0},"end":{"line":161,"column":2}},"161":{"start":{"line":162,"column":0},"end":{"line":162,"column":2}},"162":{"start":{"line":163,"column":0},"end":{"line":163,"column":0}},"163":{"start":{"line":164,"column":0},"end":{"line":164,"column":40}},"164":{"start":{"line":165,"column":0},"end":{"line":165,"column":0}},"165":{"start":{"line":166,"column":0},"end":{"line":166,"column":27}}},"s":{"0":1,"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":1,"9":1,"10":1,"11":1,"12":1,"13":1,"14":1,"15":1,"16":1,"17":1,"18":1,"19":1,"20":1,"21":1,"22":1,"23":1,"24":1,"25":1,"26":1,"27":1,"28":1,"29":1,"30":1,"31":1,"32":1,"33":1,"34":1,"35":1,"36":1,"37":1,"38":1,"39":1,"40":1,"41":1,"42":1,"43":1,"44":1,"45":1,"46":1,"47":1,"48":1,"49":1,"50":1,"51":1,"52":1,"53":1,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":1,"61":1,"62":1,"63":1,"64":1,"65":1,"66":1,"67":1,"68":0,"69":0,"70":1,"71":1,"72":1,"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"79":1,"80":1,"81":1,"82":1,"83":1,"84":1,"85":1,"86":1,"87":1,"88":1,"89":1,"90":1,"91":1,"92":1,"93":1,"94":0,"95":0,"96":0,"97":0,"98":0,"99":1,"100":1,"101":1,"102":1,"103":1,"104":1,"105":1,"106":1,"107":1,"108":1,"109":1,"110":1,"111":1,"112":0,"113":0,"114":0,"115":0,"116":0,"117":0,"118":0,"119":0,"120":0,"121":0,"122":0,"123":0,"124":0,"125":0,"126":0,"127":0,"128":0,"129":0,"130":1,"131":1,"132":1,"133":1,"134":1,"135":1,"136":1,"137":0,"138":0,"139":1,"140":1,"141":1,"142":1,"143":1,"144":1,"145":0,"146":0,"147":1,"148":1,"149":1,"150":1,"151":1,"152":1,"153":1,"154":1,"155":1,"156":1,"157":1,"158":1,"159":1,"160":1,"161":1,"162":1,"163":1,"164":1,"165":1},"branchMap":{"0":{"type":"branch","line":7,"loc":{"start":{"line":7,"column":0},"end":{"line":13,"column":1}},"locations":[{"start":{"line":7,"column":0},"end":{"line":13,"column":1}}]},"1":{"type":"branch","line":9,"loc":{"start":{"line":9,"column":11},"end":{"line":11,"column":2}},"locations":[{"start":{"line":9,"column":11},"end":{"line":11,"column":2}}]},"2":{"type":"branch","line":35,"loc":{"start":{"line":35,"column":1},"end":{"line":161,"column":2}},"locations":[{"start":{"line":35,"column":1},"end":{"line":161,"column":2}}]},"3":{"type":"branch","line":79,"loc":{"start":{"line":79,"column":44},"end":{"line":79,"column":43}},"locations":[{"start":{"line":79,"column":44},"end":{"line":79,"column":43}}]},"4":{"type":"branch","line":53,"loc":{"start":{"line":53,"column":18},"end":{"line":61,"column":3}},"locations":[{"start":{"line":53,"column":18},"end":{"line":61,"column":3}}]},"5":{"type":"branch","line":54,"loc":{"start":{"line":54,"column":12},"end":{"line":60,"column":4}},"locations":[{"start":{"line":54,"column":12},"end":{"line":60,"column":4}}]},"6":{"type":"branch","line":63,"loc":{"start":{"line":63,"column":12},"end":{"line":77,"column":3}},"locations":[{"start":{"line":63,"column":12},"end":{"line":77,"column":3}}]},"7":{"type":"branch","line":68,"loc":{"start":{"line":68,"column":40},"end":{"line":70,"column":4}},"locations":[{"start":{"line":68,"column":40},"end":{"line":70,"column":4}}]},"8":{"type":"branch","line":72,"loc":{"start":{"line":72,"column":10},"end":{"line":76,"column":4}},"locations":[{"start":{"line":72,"column":10},"end":{"line":76,"column":4}}]},"9":{"type":"branch","line":81,"loc":{"start":{"line":81,"column":12},"end":{"line":100,"column":3}},"locations":[{"start":{"line":81,"column":12},"end":{"line":100,"column":3}}]},"10":{"type":"branch","line":82,"loc":{"start":{"line":82,"column":37},"end":{"line":82,"column":39}},"locations":[{"start":{"line":82,"column":37},"end":{"line":82,"column":39}}]},"11":{"type":"branch","line":82,"loc":{"start":{"line":82,"column":48},"end":{"line":82,"column":50}},"locations":[{"start":{"line":82,"column":48},"end":{"line":82,"column":50}}]},"12":{"type":"branch","line":94,"loc":{"start":{"line":94,"column":16},"end":{"line":94,"column":49}},"locations":[{"start":{"line":94,"column":16},"end":{"line":94,"column":49}}]},"13":{"type":"branch","line":94,"loc":{"start":{"line":94,"column":51},"end":{"line":99,"column":4}},"locations":[{"start":{"line":94,"column":51},"end":{"line":99,"column":4}}]},"14":{"type":"branch","line":102,"loc":{"start":{"line":102,"column":12},"end":{"line":106,"column":3}},"locations":[{"start":{"line":102,"column":12},"end":{"line":106,"column":3}}]},"15":{"type":"branch","line":103,"loc":{"start":{"line":103,"column":23},"end":{"line":103,"column":25}},"locations":[{"start":{"line":103,"column":23},"end":{"line":103,"column":25}}]},"16":{"type":"branch","line":108,"loc":{"start":{"line":108,"column":12},"end":{"line":131,"column":3}},"locations":[{"start":{"line":108,"column":12},"end":{"line":131,"column":3}}]},"17":{"type":"branch","line":110,"loc":{"start":{"line":110,"column":13},"end":{"line":110,"column":15}},"locations":[{"start":{"line":110,"column":13},"end":{"line":110,"column":15}}]},"18":{"type":"branch","line":113,"loc":{"start":{"line":113,"column":-1},"end":{"line":131,"column":3}},"locations":[{"start":{"line":113,"column":-1},"end":{"line":131,"column":3}}]},"19":{"type":"branch","line":133,"loc":{"start":{"line":133,"column":12},"end":{"line":149,"column":3}},"locations":[{"start":{"line":133,"column":12},"end":{"line":149,"column":3}}]},"20":{"type":"branch","line":145,"loc":{"start":{"line":145,"column":5},"end":{"line":147,"column":5}},"locations":[{"start":{"line":145,"column":5},"end":{"line":147,"column":5}}]},"21":{"type":"branch","line":136,"loc":{"start":{"line":136,"column":23},"end":{"line":140,"column":4}},"locations":[{"start":{"line":136,"column":23},"end":{"line":140,"column":4}}]},"22":{"type":"branch","line":137,"loc":{"start":{"line":137,"column":36},"end":{"line":137,"column":61}},"locations":[{"start":{"line":137,"column":36},"end":{"line":137,"column":61}}]},"23":{"type":"branch","line":137,"loc":{"start":{"line":137,"column":63},"end":{"line":139,"column":5}},"locations":[{"start":{"line":137,"column":63},"end":{"line":139,"column":5}}]}},"b":{"0":[1],"1":[1],"2":[1],"3":[0],"4":[1],"5":[0],"6":[1],"7":[0],"8":[1],"9":[1],"10":[0],"11":[0],"12":[0],"13":[0],"14":[1],"15":[0],"16":[1],"17":[0],"18":[0],"19":[1],"20":[0],"21":[1],"22":[0],"23":[0]},"fnMap":{"0":{"name":"usePrevious","decl":{"start":{"line":7,"column":0},"end":{"line":13,"column":1}},"loc":{"start":{"line":7,"column":0},"end":{"line":13,"column":1}},"line":7},"1":{"name":"onBlurHandler","decl":{"start":{"line":114,"column":25},"end":{"line":115,"column":60}},"loc":{"start":{"line":114,"column":25},"end":{"line":115,"column":60}},"line":114},"2":{"name":"onChangeHandler","decl":{"start":{"line":117,"column":27},"end":{"line":118,"column":31}},"loc":{"start":{"line":117,"column":27},"end":{"line":118,"column":31}},"line":117},"3":{"name":"updateValue","decl":{"start":{"line":136,"column":23},"end":{"line":140,"column":4}},"loc":{"start":{"line":136,"column":23},"end":{"line":140,"column":4}},"line":136}},"f":{"0":1,"1":0,"2":0,"3":1}} -,"/Users/v-chupurnov/WebstormProjects/pet/jodit-react/src/include.jodit.ts": {"path":"/Users/v-chupurnov/WebstormProjects/pet/jodit-react/src/include.jodit.ts","all":false,"statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":61}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":56}},"2":{"start":{"line":3,"column":0},"end":{"line":3,"column":60}},"3":{"start":{"line":4,"column":0},"end":{"line":4,"column":59}},"4":{"start":{"line":5,"column":0},"end":{"line":5,"column":33}},"5":{"start":{"line":6,"column":0},"end":{"line":6,"column":0}},"6":{"start":{"line":7,"column":0},"end":{"line":7,"column":59}}},"s":{"0":1,"1":1,"2":1,"3":1,"4":1,"5":1,"6":1},"branchMap":{},"b":{},"fnMap":{},"f":{}} -,"/Users/v-chupurnov/WebstormProjects/pet/jodit-react/src/index.ts": {"path":"/Users/v-chupurnov/WebstormProjects/pet/jodit-react/src/index.ts","all":false,"statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":40}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":40}},"2":{"start":{"line":3,"column":0},"end":{"line":3,"column":0}},"3":{"start":{"line":4,"column":0},"end":{"line":4,"column":27}},"4":{"start":{"line":5,"column":0},"end":{"line":5,"column":17}}},"s":{"0":1,"1":1,"2":1,"3":1,"4":1},"branchMap":{},"b":{},"fnMap":{"0":{"name":"get","decl":{"start":{"line":5,"column":9},"end":{"line":5,"column":14}},"loc":{"start":{"line":5,"column":9},"end":{"line":5,"column":14}},"line":5}},"f":{"0":0}} -} diff --git a/coverage/lcov-report/JoditEditor.tsx.html b/coverage/lcov-report/JoditEditor.tsx.html deleted file mode 100644 index aaa985a..0000000 --- a/coverage/lcov-report/JoditEditor.tsx.html +++ /dev/null @@ -1,583 +0,0 @@ - - - - - - Code coverage report for JoditEditor.tsx - - - - - - - - - -
-
-

All files JoditEditor.tsx

-
- -
- 78.91% - Statements - 131/166 -
- - -
- 45.83% - Branches - 11/24 -
- - -
- 50% - Functions - 2/4 -
- - -
- 78.91% - Lines - 131/166 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-

-
1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29 -30 -31 -32 -33 -34 -35 -36 -37 -38 -39 -40 -41 -42 -43 -44 -45 -46 -47 -48 -49 -50 -51 -52 -53 -54 -55 -56 -57 -58 -59 -60 -61 -62 -63 -64 -65 -66 -67 -68 -69 -70 -71 -72 -73 -74 -75 -76 -77 -78 -79 -80 -81 -82 -83 -84 -85 -86 -87 -88 -89 -90 -91 -92 -93 -94 -95 -96 -97 -98 -99 -100 -101 -102 -103 -104 -105 -106 -107 -108 -109 -110 -111 -112 -113 -114 -115 -116 -117 -118 -119 -120 -121 -122 -123 -124 -125 -126 -127 -128 -129 -130 -131 -132 -133 -134 -135 -136 -137 -138 -139 -140 -141 -142 -143 -144 -145 -146 -147 -148 -149 -150 -151 -152 -153 -154 -155 -156 -157 -158 -159 -160 -161 -162 -163 -164 -165 -166 -1671x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -  -  -  -  -  -  -1x -1x -1x -1x -1x -1x -1x -1x -  -  -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -  -  -  -  -  -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -1x -1x -1x -1x -1x -1x -1x -  -  -1x -1x -1x -1x -1x -1x -  -  -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x -1x - 
import React, { useEffect, useRef, forwardRef, useLayoutEffect } from 'react';
-import type { IJodit } from 'jodit/types/types/jodit';
-import type { Jodit as JoditConstructorType } from 'jodit';
-import type { Config } from 'jodit/config';
-import { Jodit } from './include.jodit';
- 
-function usePrevious(value: string): string {
-	const ref = useRef<string>('');
-	useEffect(() => {
-		ref.current = value;
-	}, [value]);
-	return ref.current;
-}
- 
-type DeepPartial<T> = T extends object
-	? {
-			[P in keyof T]?: DeepPartial<T[P]>;
-		}
-	: T;
- 
-interface Props<T extends typeof JoditConstructorType = typeof Jodit> {
-	JoditConstructor?: T;
-	config?: DeepPartial<Config>;
-	className?: string;
-	id?: string;
-	name?: string;
-	onBlur?: (value: string, event: MouseEvent) => void;
-	onChange?: (value: string) => void;
-	tabIndex?: number;
-	value?: string;
-	editorRef?: (editor: IJodit) => void;
-}
- 
-const JoditEditor = forwardRef<IJodit, Props>(
-	(
-		{
-			JoditConstructor = Jodit,
-			className,
-			config,
-			id,
-			name,
-			onBlur,
-			onChange,
-			tabIndex,
-			value,
-			editorRef
-		},
-		ref
-	) => {
-		const textAreaRef = useRef<HTMLTextAreaElement | null>(null);
-		const joditRef = useRef<IJodit | null>(null);
- 
-		useLayoutEffect(() => {
-			if (ref) {
-				if (typeof ref === 'function') {
-					ref(joditRef.current);
-				} else {
-					ref.current = joditRef.current;
-				}
-			}
-		}, [textAreaRef, ref]);
- 
-		useEffect(() => {
-			const element = textAreaRef.current!;
-			const jodit = JoditConstructor.make(element, config);
-			joditRef.current = jodit;
- 
-			if (typeof editorRef === 'function') {
-				editorRef(jodit);
-			}
- 
-			return () => {
-				if (jodit) {
-					jodit.destruct();
-				}
-			};
-		}, [JoditConstructor, config, editorRef]);
- 
-		const preClassName = usePrevious(className ?? '');
- 
-		useEffect(() => {
-			const classList = joditRef.current?.container?.classList;
- 
-			if (
-				preClassName !== className &&
-				typeof preClassName === 'string'
-			) {
-				preClassName
-					.split(/\s+/)
-					.filter(Boolean)
-					.forEach(cl => classList?.remove(cl));
-			}
- 
-			if (className && typeof className === 'string') {
-				className
-					.split(/\s+/)
-					.filter(Boolean)
-					.forEach(cl => classList?.add(cl));
-			}
-		}, [className, preClassName]);
- 
-		useEffect(() => {
-			if (joditRef.current?.workplace) {
-				joditRef.current.workplace.tabIndex = tabIndex || -1;
-			}
-		}, [tabIndex]);
- 
-		useEffect(() => {
-			const jodit = joditRef.current;
-			if (!jodit?.events || !(onBlur || onChange)) {
-				return;
-			}
-
-			const onBlurHandler = (event: MouseEvent) =>
-				onBlur && onBlur(joditRef?.current?.value ?? '', event);
-
-			const onChangeHandler = (value: string) =>
-				onChange && onChange(value);
-
-			// adding event handlers
-			jodit.events
-				.on('blur', onBlurHandler)
-				.on('change', onChangeHandler);
-
-			return () => {
-				// Remove event handlers
-				jodit.events
-					?.off('blur', onBlurHandler)
-					.off('change', onChangeHandler);
-			};
-		}, [onBlur, onChange]);
- 
-		useEffect(() => {
-			const jodit = joditRef.current;
- 
-			const updateValue = () => {
-				if (jodit && value !== undefined && jodit.value !== value) {
-					jodit.value = value;
-				}
-			};
- 
-			if (jodit) {
-				if (jodit.isReady) {
-					updateValue();
-				} else {
-					jodit.waitForReady().then(updateValue);
-				}
-			}
-		}, [value]);
- 
-		return (
-			<div className={'jodit-react-container'}>
-				<textarea
-					defaultValue={value}
-					name={name}
-					id={id}
-					ref={textAreaRef}
-				/>
-			</div>
-		);
-	}
-);
- 
-JoditEditor.displayName = 'JoditEditor';
- 
-export default JoditEditor;
- 
- -
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/base.css b/coverage/lcov-report/base.css deleted file mode 100644 index f418035..0000000 --- a/coverage/lcov-report/base.css +++ /dev/null @@ -1,224 +0,0 @@ -body, html { - margin:0; padding: 0; - height: 100%; -} -body { - font-family: Helvetica Neue, Helvetica, Arial; - font-size: 14px; - color:#333; -} -.small { font-size: 12px; } -*, *:after, *:before { - -webkit-box-sizing:border-box; - -moz-box-sizing:border-box; - box-sizing:border-box; - } -h1 { font-size: 20px; margin: 0;} -h2 { font-size: 14px; } -pre { - font: 12px/1.4 Consolas, "Liberation Mono", Menlo, Courier, monospace; - margin: 0; - padding: 0; - -moz-tab-size: 2; - -o-tab-size: 2; - tab-size: 2; -} -a { color:#0074D9; text-decoration:none; } -a:hover { text-decoration:underline; } -.strong { font-weight: bold; } -.space-top1 { padding: 10px 0 0 0; } -.pad2y { padding: 20px 0; } -.pad1y { padding: 10px 0; } -.pad2x { padding: 0 20px; } -.pad2 { padding: 20px; } -.pad1 { padding: 10px; } -.space-left2 { padding-left:55px; } -.space-right2 { padding-right:20px; } -.center { text-align:center; } -.clearfix { display:block; } -.clearfix:after { - content:''; - display:block; - height:0; - clear:both; - visibility:hidden; - } -.fl { float: left; } -@media only screen and (max-width:640px) { - .col3 { width:100%; max-width:100%; } - .hide-mobile { display:none!important; } -} - -.quiet { - color: #7f7f7f; - color: rgba(0,0,0,0.5); -} -.quiet a { opacity: 0.7; } - -.fraction { - font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; - font-size: 10px; - color: #555; - background: #E8E8E8; - padding: 4px 5px; - border-radius: 3px; - vertical-align: middle; -} - -div.path a:link, div.path a:visited { color: #333; } -table.coverage { - border-collapse: collapse; - margin: 10px 0 0 0; - padding: 0; -} - -table.coverage td { - margin: 0; - padding: 0; - vertical-align: top; -} -table.coverage td.line-count { - text-align: right; - padding: 0 5px 0 20px; -} -table.coverage td.line-coverage { - text-align: right; - padding-right: 10px; - min-width:20px; -} - -table.coverage td span.cline-any { - display: inline-block; - padding: 0 5px; - width: 100%; -} -.missing-if-branch { - display: inline-block; - margin-right: 5px; - border-radius: 3px; - position: relative; - padding: 0 4px; - background: #333; - color: yellow; -} - -.skip-if-branch { - display: none; - margin-right: 10px; - position: relative; - padding: 0 4px; - background: #ccc; - color: white; -} -.missing-if-branch .typ, .skip-if-branch .typ { - color: inherit !important; -} -.coverage-summary { - border-collapse: collapse; - width: 100%; -} -.coverage-summary tr { border-bottom: 1px solid #bbb; } -.keyline-all { border: 1px solid #ddd; } -.coverage-summary td, .coverage-summary th { padding: 10px; } -.coverage-summary tbody { border: 1px solid #bbb; } -.coverage-summary td { border-right: 1px solid #bbb; } -.coverage-summary td:last-child { border-right: none; } -.coverage-summary th { - text-align: left; - font-weight: normal; - white-space: nowrap; -} -.coverage-summary th.file { border-right: none !important; } -.coverage-summary th.pct { } -.coverage-summary th.pic, -.coverage-summary th.abs, -.coverage-summary td.pct, -.coverage-summary td.abs { text-align: right; } -.coverage-summary td.file { white-space: nowrap; } -.coverage-summary td.pic { min-width: 120px !important; } -.coverage-summary tfoot td { } - -.coverage-summary .sorter { - height: 10px; - width: 7px; - display: inline-block; - margin-left: 0.5em; - background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent; -} -.coverage-summary .sorted .sorter { - background-position: 0 -20px; -} -.coverage-summary .sorted-desc .sorter { - background-position: 0 -10px; -} -.status-line { height: 10px; } -/* yellow */ -.cbranch-no { background: yellow !important; color: #111; } -/* dark red */ -.red.solid, .status-line.low, .low .cover-fill { background:#C21F39 } -.low .chart { border:1px solid #C21F39 } -.highlighted, -.highlighted .cstat-no, .highlighted .fstat-no, .highlighted .cbranch-no{ - background: #C21F39 !important; -} -/* medium red */ -.cstat-no, .fstat-no, .cbranch-no, .cbranch-no { background:#F6C6CE } -/* light red */ -.low, .cline-no { background:#FCE1E5 } -/* light green */ -.high, .cline-yes { background:rgb(230,245,208) } -/* medium green */ -.cstat-yes { background:rgb(161,215,106) } -/* dark green */ -.status-line.high, .high .cover-fill { background:rgb(77,146,33) } -.high .chart { border:1px solid rgb(77,146,33) } -/* dark yellow (gold) */ -.status-line.medium, .medium .cover-fill { background: #f9cd0b; } -.medium .chart { border:1px solid #f9cd0b; } -/* light yellow */ -.medium { background: #fff4c2; } - -.cstat-skip { background: #ddd; color: #111; } -.fstat-skip { background: #ddd; color: #111 !important; } -.cbranch-skip { background: #ddd !important; color: #111; } - -span.cline-neutral { background: #eaeaea; } - -.coverage-summary td.empty { - opacity: .5; - padding-top: 4px; - padding-bottom: 4px; - line-height: 1; - color: #888; -} - -.cover-fill, .cover-empty { - display:inline-block; - height: 12px; -} -.chart { - line-height: 0; -} -.cover-empty { - background: white; -} -.cover-full { - border-right: none !important; -} -pre.prettyprint { - border: none !important; - padding: 0 !important; - margin: 0 !important; -} -.com { color: #999 !important; } -.ignore-none { color: #999; font-weight: normal; } - -.wrapper { - min-height: 100%; - height: auto !important; - height: 100%; - margin: 0 auto -48px; -} -.footer, .push { - height: 48px; -} diff --git a/coverage/lcov-report/block-navigation.js b/coverage/lcov-report/block-navigation.js deleted file mode 100644 index cc12130..0000000 --- a/coverage/lcov-report/block-navigation.js +++ /dev/null @@ -1,87 +0,0 @@ -/* eslint-disable */ -var jumpToCode = (function init() { - // Classes of code we would like to highlight in the file view - var missingCoverageClasses = ['.cbranch-no', '.cstat-no', '.fstat-no']; - - // Elements to highlight in the file listing view - var fileListingElements = ['td.pct.low']; - - // We don't want to select elements that are direct descendants of another match - var notSelector = ':not(' + missingCoverageClasses.join('):not(') + ') > '; // becomes `:not(a):not(b) > ` - - // Selecter that finds elements on the page to which we can jump - var selector = - fileListingElements.join(', ') + - ', ' + - notSelector + - missingCoverageClasses.join(', ' + notSelector); // becomes `:not(a):not(b) > a, :not(a):not(b) > b` - - // The NodeList of matching elements - var missingCoverageElements = document.querySelectorAll(selector); - - var currentIndex; - - function toggleClass(index) { - missingCoverageElements - .item(currentIndex) - .classList.remove('highlighted'); - missingCoverageElements.item(index).classList.add('highlighted'); - } - - function makeCurrent(index) { - toggleClass(index); - currentIndex = index; - missingCoverageElements.item(index).scrollIntoView({ - behavior: 'smooth', - block: 'center', - inline: 'center' - }); - } - - function goToPrevious() { - var nextIndex = 0; - if (typeof currentIndex !== 'number' || currentIndex === 0) { - nextIndex = missingCoverageElements.length - 1; - } else if (missingCoverageElements.length > 1) { - nextIndex = currentIndex - 1; - } - - makeCurrent(nextIndex); - } - - function goToNext() { - var nextIndex = 0; - - if ( - typeof currentIndex === 'number' && - currentIndex < missingCoverageElements.length - 1 - ) { - nextIndex = currentIndex + 1; - } - - makeCurrent(nextIndex); - } - - return function jump(event) { - if ( - document.getElementById('fileSearch') === document.activeElement && - document.activeElement != null - ) { - // if we're currently focused on the search input, we don't want to navigate - return; - } - - switch (event.which) { - case 78: // n - case 74: // j - goToNext(); - break; - case 66: // b - case 75: // k - case 80: // p - goToPrevious(); - break; - } - }; -})(); -window.addEventListener('keydown', jumpToCode); diff --git a/coverage/lcov-report/favicon.png b/coverage/lcov-report/favicon.png deleted file mode 100644 index c1525b8..0000000 Binary files a/coverage/lcov-report/favicon.png and /dev/null differ diff --git a/coverage/lcov-report/include.jodit.ts.html b/coverage/lcov-report/include.jodit.ts.html deleted file mode 100644 index b147398..0000000 --- a/coverage/lcov-report/include.jodit.ts.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - Code coverage report for include.jodit.ts - - - - - - - - - -
-
-

All files include.jodit.ts

-
- -
- 100% - Statements - 7/7 -
- - -
- 100% - Branches - 0/0 -
- - -
- 100% - Functions - 0/0 -
- - -
- 100% - Lines - 7/7 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-

-
1 -2 -3 -4 -5 -6 -7 -81x -1x -1x -1x -1x -1x -1x - 
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
-// @ts-ignore - Jodit Editor (https://xdsoft.net/jodit/)
-import { Jodit as JoditES5 } from 'jodit/es5/jodit.fat.min';
-import type { Jodit as JoditConstructorType } from 'jodit';
-import 'jodit/es5/jodit.min.css';
- 
-export const Jodit: typeof JoditConstructorType = JoditES5;
- 
- -
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/index.html b/coverage/lcov-report/index.html deleted file mode 100644 index ca60837..0000000 --- a/coverage/lcov-report/index.html +++ /dev/null @@ -1,146 +0,0 @@ - - - - - - Code coverage report for All files - - - - - - - - - -
-
-

All files

-
- -
- 80.33% - Statements - 143/178 -
- - -
- 45.83% - Branches - 11/24 -
- - -
- 40% - Functions - 2/5 -
- - -
- 80.33% - Lines - 143/178 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FileStatementsBranchesFunctionsLines
JoditEditor.tsx -
-
78.91%131/16645.83%11/2450%2/478.91%131/166
include.jodit.ts -
-
100%7/7100%0/0100%0/0100%7/7
index.ts -
-
100%5/5100%0/00%0/1100%5/5
-
-
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/index.ts.html b/coverage/lcov-report/index.ts.html deleted file mode 100644 index 048814e..0000000 --- a/coverage/lcov-report/index.ts.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - Code coverage report for index.ts - - - - - - - - - -
-
-

All files index.ts

-
- -
- 100% - Statements - 5/5 -
- - -
- 100% - Branches - 0/0 -
- - -
- 0% - Functions - 0/1 -
- - -
- 100% - Lines - 5/5 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-

-
1 -2 -3 -4 -5 -61x -1x -1x -1x -1x - 
import JoditEditor from './JoditEditor';
-import { Jodit } from './include.jodit';
- 
-export default JoditEditor;
-export { Jodit };
- 
- -
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/prettify.css b/coverage/lcov-report/prettify.css deleted file mode 100644 index b317a7c..0000000 --- a/coverage/lcov-report/prettify.css +++ /dev/null @@ -1 +0,0 @@ -.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} diff --git a/coverage/lcov-report/prettify.js b/coverage/lcov-report/prettify.js deleted file mode 100644 index b322523..0000000 --- a/coverage/lcov-report/prettify.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -window.PR_SHOULD_USE_CONTINUATION=true;(function(){var h=["break,continue,do,else,for,if,return,while"];var u=[h,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"];var p=[u,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"];var l=[p,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"];var x=[p,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"];var R=[x,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"];var r="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes";var w=[p,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"];var s="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END";var I=[h,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"];var f=[h,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"];var H=[h,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"];var A=[l,R,w,s+I,f,H];var e=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/;var C="str";var z="kwd";var j="com";var O="typ";var G="lit";var L="pun";var F="pln";var m="tag";var E="dec";var J="src";var P="atn";var n="atv";var N="nocode";var M="(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|&&=|&=|\\(|\\*|\\*=|\\+=|\\,|\\-=|\\->|\\/|\\/=|:|::|\\;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\@|\\[|\\^|\\^=|\\^\\^|\\^\\^=|\\{|\\||\\|=|\\|\\||\\|\\|=|\\~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function k(Z){var ad=0;var S=false;var ac=false;for(var V=0,U=Z.length;V122)){if(!(al<65||ag>90)){af.push([Math.max(65,ag)|32,Math.min(al,90)|32])}if(!(al<97||ag>122)){af.push([Math.max(97,ag)&~32,Math.min(al,122)&~32])}}}}af.sort(function(av,au){return(av[0]-au[0])||(au[1]-av[1])});var ai=[];var ap=[NaN,NaN];for(var ar=0;arat[0]){if(at[1]+1>at[0]){an.push("-")}an.push(T(at[1]))}}an.push("]");return an.join("")}function W(al){var aj=al.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g"));var ah=aj.length;var an=[];for(var ak=0,am=0;ak=2&&ai==="["){aj[ak]=X(ag)}else{if(ai!=="\\"){aj[ak]=ag.replace(/[a-zA-Z]/g,function(ao){var ap=ao.charCodeAt(0);return"["+String.fromCharCode(ap&~32,ap|32)+"]"})}}}}return aj.join("")}var aa=[];for(var V=0,U=Z.length;V=0;){S[ac.charAt(ae)]=Y}}var af=Y[1];var aa=""+af;if(!ag.hasOwnProperty(aa)){ah.push(af);ag[aa]=null}}ah.push(/[\0-\uffff]/);V=k(ah)})();var X=T.length;var W=function(ah){var Z=ah.sourceCode,Y=ah.basePos;var ad=[Y,F];var af=0;var an=Z.match(V)||[];var aj={};for(var ae=0,aq=an.length;ae=5&&"lang-"===ap.substring(0,5);if(am&&!(ai&&typeof ai[1]==="string")){am=false;ap=J}if(!am){aj[ag]=ap}}var ab=af;af+=ag.length;if(!am){ad.push(Y+ab,ap)}else{var al=ai[1];var ak=ag.indexOf(al);var ac=ak+al.length;if(ai[2]){ac=ag.length-ai[2].length;ak=ac-al.length}var ar=ap.substring(5);B(Y+ab,ag.substring(0,ak),W,ad);B(Y+ab+ak,al,q(ar,al),ad);B(Y+ab+ac,ag.substring(ac),W,ad)}}ah.decorations=ad};return W}function i(T){var W=[],S=[];if(T.tripleQuotedStrings){W.push([C,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""])}else{if(T.multiLineStrings){W.push([C,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"])}else{W.push([C,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"])}}if(T.verbatimStrings){S.push([C,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null])}var Y=T.hashComments;if(Y){if(T.cStyleComments){if(Y>1){W.push([j,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"])}else{W.push([j,/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"])}S.push([C,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,null])}else{W.push([j,/^#[^\r\n]*/,null,"#"])}}if(T.cStyleComments){S.push([j,/^\/\/[^\r\n]*/,null]);S.push([j,/^\/\*[\s\S]*?(?:\*\/|$)/,null])}if(T.regexLiterals){var X=("/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/");S.push(["lang-regex",new RegExp("^"+M+"("+X+")")])}var V=T.types;if(V){S.push([O,V])}var U=(""+T.keywords).replace(/^ | $/g,"");if(U.length){S.push([z,new RegExp("^(?:"+U.replace(/[\s,]+/g,"|")+")\\b"),null])}W.push([F,/^\s+/,null," \r\n\t\xA0"]);S.push([G,/^@[a-z_$][a-z_$@0-9]*/i,null],[O,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[F,/^[a-z_$][a-z_$@0-9]*/i,null],[G,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[F,/^\\[\s\S]?/,null],[L,/^.[^\s\w\.$@\'\"\`\/\#\\]*/,null]);return g(W,S)}var K=i({keywords:A,hashComments:true,cStyleComments:true,multiLineStrings:true,regexLiterals:true});function Q(V,ag){var U=/(?:^|\s)nocode(?:\s|$)/;var ab=/\r\n?|\n/;var ac=V.ownerDocument;var S;if(V.currentStyle){S=V.currentStyle.whiteSpace}else{if(window.getComputedStyle){S=ac.defaultView.getComputedStyle(V,null).getPropertyValue("white-space")}}var Z=S&&"pre"===S.substring(0,3);var af=ac.createElement("LI");while(V.firstChild){af.appendChild(V.firstChild)}var W=[af];function ae(al){switch(al.nodeType){case 1:if(U.test(al.className)){break}if("BR"===al.nodeName){ad(al);if(al.parentNode){al.parentNode.removeChild(al)}}else{for(var an=al.firstChild;an;an=an.nextSibling){ae(an)}}break;case 3:case 4:if(Z){var am=al.nodeValue;var aj=am.match(ab);if(aj){var ai=am.substring(0,aj.index);al.nodeValue=ai;var ah=am.substring(aj.index+aj[0].length);if(ah){var ak=al.parentNode;ak.insertBefore(ac.createTextNode(ah),al.nextSibling)}ad(al);if(!ai){al.parentNode.removeChild(al)}}}break}}function ad(ak){while(!ak.nextSibling){ak=ak.parentNode;if(!ak){return}}function ai(al,ar){var aq=ar?al.cloneNode(false):al;var ao=al.parentNode;if(ao){var ap=ai(ao,1);var an=al.nextSibling;ap.appendChild(aq);for(var am=an;am;am=an){an=am.nextSibling;ap.appendChild(am)}}return aq}var ah=ai(ak.nextSibling,0);for(var aj;(aj=ah.parentNode)&&aj.nodeType===1;){ah=aj}W.push(ah)}for(var Y=0;Y=S){ah+=2}if(V>=ap){Z+=2}}}var t={};function c(U,V){for(var S=V.length;--S>=0;){var T=V[S];if(!t.hasOwnProperty(T)){t[T]=U}else{if(window.console){console.warn("cannot override language handler %s",T)}}}}function q(T,S){if(!(T&&t.hasOwnProperty(T))){T=/^\s*]*(?:>|$)/],[j,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[L,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);c(g([[F,/^[\s]+/,null," \t\r\n"],[n,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[[m,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[P,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[L,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]);c(g([],[[n,/^[\s\S]+/]]),["uq.val"]);c(i({keywords:l,hashComments:true,cStyleComments:true,types:e}),["c","cc","cpp","cxx","cyc","m"]);c(i({keywords:"null,true,false"}),["json"]);c(i({keywords:R,hashComments:true,cStyleComments:true,verbatimStrings:true,types:e}),["cs"]);c(i({keywords:x,cStyleComments:true}),["java"]);c(i({keywords:H,hashComments:true,multiLineStrings:true}),["bsh","csh","sh"]);c(i({keywords:I,hashComments:true,multiLineStrings:true,tripleQuotedStrings:true}),["cv","py"]);c(i({keywords:s,hashComments:true,multiLineStrings:true,regexLiterals:true}),["perl","pl","pm"]);c(i({keywords:f,hashComments:true,multiLineStrings:true,regexLiterals:true}),["rb"]);c(i({keywords:w,cStyleComments:true,regexLiterals:true}),["js"]);c(i({keywords:r,hashComments:3,cStyleComments:true,multilineStrings:true,tripleQuotedStrings:true,regexLiterals:true}),["coffee"]);c(g([],[[C,/^[\s\S]+/]]),["regex"]);function d(V){var U=V.langExtension;try{var S=a(V.sourceNode);var T=S.sourceCode;V.sourceCode=T;V.spans=S.spans;V.basePos=0;q(U,T)(V);D(V)}catch(W){if("console" in window){console.log(W&&W.stack?W.stack:W)}}}function y(W,V,U){var S=document.createElement("PRE");S.innerHTML=W;if(U){Q(S,U)}var T={langExtension:V,numberLines:U,sourceNode:S};d(T);return S.innerHTML}function b(ad){function Y(af){return document.getElementsByTagName(af)}var ac=[Y("pre"),Y("code"),Y("xmp")];var T=[];for(var aa=0;aa=0){var ah=ai.match(ab);var am;if(!ah&&(am=o(aj))&&"CODE"===am.tagName){ah=am.className.match(ab)}if(ah){ah=ah[1]}var al=false;for(var ak=aj.parentNode;ak;ak=ak.parentNode){if((ak.tagName==="pre"||ak.tagName==="code"||ak.tagName==="xmp")&&ak.className&&ak.className.indexOf("prettyprint")>=0){al=true;break}}if(!al){var af=aj.className.match(/\blinenums\b(?::(\d+))?/);af=af?af[1]&&af[1].length?+af[1]:true:false;if(af){Q(aj,af)}S={langExtension:ah,sourceNode:aj,numberLines:af};d(S)}}}if(X]*(?:>|$)/],[PR.PR_COMMENT,/^<\!--[\s\S]*?(?:-\->|$)/],[PR.PR_PUNCTUATION,/^(?:<[%?]|[%?]>)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-handlebars",/^]*type\s*=\s*['"]?text\/x-handlebars-template['"]?\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i],[PR.PR_DECLARATION,/^{{[#^>/]?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{&?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{{>?\s*[\w.][^}]*}}}/],[PR.PR_COMMENT,/^{{![^}]*}}/]]),["handlebars","hbs"]);PR.registerLangHandler(PR.createSimpleLexer([[PR.PR_PLAIN,/^[ \t\r\n\f]+/,null," \t\r\n\f"]],[[PR.PR_STRING,/^\"(?:[^\n\r\f\\\"]|\\(?:\r\n?|\n|\f)|\\[\s\S])*\"/,null],[PR.PR_STRING,/^\'(?:[^\n\r\f\\\']|\\(?:\r\n?|\n|\f)|\\[\s\S])*\'/,null],["lang-css-str",/^url\(([^\)\"\']*)\)/i],[PR.PR_KEYWORD,/^(?:url|rgb|\!important|@import|@page|@media|@charset|inherit)(?=[^\-\w]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|(?:\\[0-9a-f]+ ?))(?:[_a-z0-9\-]|\\(?:\\[0-9a-f]+ ?))*)\s*:/i],[PR.PR_COMMENT,/^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//],[PR.PR_COMMENT,/^(?:)/],[PR.PR_LITERAL,/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],[PR.PR_LITERAL,/^#(?:[0-9a-f]{3}){1,2}/i],[PR.PR_PLAIN,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i],[PR.PR_PUNCTUATION,/^[^\s\w\'\"]+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_KEYWORD,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_STRING,/^[^\)\"\']+/]]),["css-str"]); diff --git a/coverage/lcov-report/sort-arrow-sprite.png b/coverage/lcov-report/sort-arrow-sprite.png deleted file mode 100644 index 6ed6831..0000000 Binary files a/coverage/lcov-report/sort-arrow-sprite.png and /dev/null differ diff --git a/coverage/lcov-report/sorter.js b/coverage/lcov-report/sorter.js deleted file mode 100644 index 2bb296a..0000000 --- a/coverage/lcov-report/sorter.js +++ /dev/null @@ -1,196 +0,0 @@ -/* eslint-disable */ -var addSorting = (function() { - 'use strict'; - var cols, - currentSort = { - index: 0, - desc: false - }; - - // returns the summary table element - function getTable() { - return document.querySelector('.coverage-summary'); - } - // returns the thead element of the summary table - function getTableHeader() { - return getTable().querySelector('thead tr'); - } - // returns the tbody element of the summary table - function getTableBody() { - return getTable().querySelector('tbody'); - } - // returns the th element for nth column - function getNthColumn(n) { - return getTableHeader().querySelectorAll('th')[n]; - } - - function onFilterInput() { - const searchValue = document.getElementById('fileSearch').value; - const rows = document.getElementsByTagName('tbody')[0].children; - for (let i = 0; i < rows.length; i++) { - const row = rows[i]; - if ( - row.textContent - .toLowerCase() - .includes(searchValue.toLowerCase()) - ) { - row.style.display = ''; - } else { - row.style.display = 'none'; - } - } - } - - // loads the search box - function addSearchBox() { - var template = document.getElementById('filterTemplate'); - var templateClone = template.content.cloneNode(true); - templateClone.getElementById('fileSearch').oninput = onFilterInput; - template.parentElement.appendChild(templateClone); - } - - // loads all columns - function loadColumns() { - var colNodes = getTableHeader().querySelectorAll('th'), - colNode, - cols = [], - col, - i; - - for (i = 0; i < colNodes.length; i += 1) { - colNode = colNodes[i]; - col = { - key: colNode.getAttribute('data-col'), - sortable: !colNode.getAttribute('data-nosort'), - type: colNode.getAttribute('data-type') || 'string' - }; - cols.push(col); - if (col.sortable) { - col.defaultDescSort = col.type === 'number'; - colNode.innerHTML = - colNode.innerHTML + ''; - } - } - return cols; - } - // attaches a data attribute to every tr element with an object - // of data values keyed by column name - function loadRowData(tableRow) { - var tableCols = tableRow.querySelectorAll('td'), - colNode, - col, - data = {}, - i, - val; - for (i = 0; i < tableCols.length; i += 1) { - colNode = tableCols[i]; - col = cols[i]; - val = colNode.getAttribute('data-value'); - if (col.type === 'number') { - val = Number(val); - } - data[col.key] = val; - } - return data; - } - // loads all row data - function loadData() { - var rows = getTableBody().querySelectorAll('tr'), - i; - - for (i = 0; i < rows.length; i += 1) { - rows[i].data = loadRowData(rows[i]); - } - } - // sorts the table using the data for the ith column - function sortByIndex(index, desc) { - var key = cols[index].key, - sorter = function(a, b) { - a = a.data[key]; - b = b.data[key]; - return a < b ? -1 : a > b ? 1 : 0; - }, - finalSorter = sorter, - tableBody = document.querySelector('.coverage-summary tbody'), - rowNodes = tableBody.querySelectorAll('tr'), - rows = [], - i; - - if (desc) { - finalSorter = function(a, b) { - return -1 * sorter(a, b); - }; - } - - for (i = 0; i < rowNodes.length; i += 1) { - rows.push(rowNodes[i]); - tableBody.removeChild(rowNodes[i]); - } - - rows.sort(finalSorter); - - for (i = 0; i < rows.length; i += 1) { - tableBody.appendChild(rows[i]); - } - } - // removes sort indicators for current column being sorted - function removeSortIndicators() { - var col = getNthColumn(currentSort.index), - cls = col.className; - - cls = cls.replace(/ sorted$/, '').replace(/ sorted-desc$/, ''); - col.className = cls; - } - // adds sort indicators for current column being sorted - function addSortIndicators() { - getNthColumn(currentSort.index).className += currentSort.desc - ? ' sorted-desc' - : ' sorted'; - } - // adds event listeners for all sorter widgets - function enableUI() { - var i, - el, - ithSorter = function ithSorter(i) { - var col = cols[i]; - - return function() { - var desc = col.defaultDescSort; - - if (currentSort.index === i) { - desc = !currentSort.desc; - } - sortByIndex(i, desc); - removeSortIndicators(); - currentSort.index = i; - currentSort.desc = desc; - addSortIndicators(); - }; - }; - for (i = 0; i < cols.length; i += 1) { - if (cols[i].sortable) { - // add the click event handler on the th so users - // dont have to click on those tiny arrows - el = getNthColumn(i).querySelector('.sorter').parentElement; - if (el.addEventListener) { - el.addEventListener('click', ithSorter(i)); - } else { - el.attachEvent('onclick', ithSorter(i)); - } - } - } - } - // adds sorting functionality to the UI - return function() { - if (!getTable()) { - return; - } - cols = loadColumns(); - loadData(); - addSearchBox(); - addSortIndicators(); - enableUI(); - }; -})(); - -window.addEventListener('load', addSorting); diff --git a/coverage/lcov.info b/coverage/lcov.info deleted file mode 100644 index 18d782c..0000000 --- a/coverage/lcov.info +++ /dev/null @@ -1,239 +0,0 @@ -TN: -SF:src/JoditEditor.tsx -FN:7,usePrevious -FN:114,onBlurHandler -FN:117,onChangeHandler -FN:136,updateValue -FNF:4 -FNH:2 -FNDA:1,usePrevious -FNDA:0,onBlurHandler -FNDA:0,onChangeHandler -FNDA:1,updateValue -DA:1,1 -DA:2,1 -DA:3,1 -DA:4,1 -DA:5,1 -DA:6,1 -DA:7,1 -DA:8,1 -DA:9,1 -DA:10,1 -DA:11,1 -DA:12,1 -DA:13,1 -DA:14,1 -DA:15,1 -DA:16,1 -DA:17,1 -DA:18,1 -DA:19,1 -DA:20,1 -DA:21,1 -DA:22,1 -DA:23,1 -DA:24,1 -DA:25,1 -DA:26,1 -DA:27,1 -DA:28,1 -DA:29,1 -DA:30,1 -DA:31,1 -DA:32,1 -DA:33,1 -DA:34,1 -DA:35,1 -DA:36,1 -DA:37,1 -DA:38,1 -DA:39,1 -DA:40,1 -DA:41,1 -DA:42,1 -DA:43,1 -DA:44,1 -DA:45,1 -DA:46,1 -DA:47,1 -DA:48,1 -DA:49,1 -DA:50,1 -DA:51,1 -DA:52,1 -DA:53,1 -DA:54,1 -DA:55,0 -DA:56,0 -DA:57,0 -DA:58,0 -DA:59,0 -DA:60,0 -DA:61,1 -DA:62,1 -DA:63,1 -DA:64,1 -DA:65,1 -DA:66,1 -DA:67,1 -DA:68,1 -DA:69,0 -DA:70,0 -DA:71,1 -DA:72,1 -DA:73,1 -DA:74,1 -DA:75,1 -DA:76,1 -DA:77,1 -DA:78,1 -DA:79,1 -DA:80,1 -DA:81,1 -DA:82,1 -DA:83,1 -DA:84,1 -DA:85,1 -DA:86,1 -DA:87,1 -DA:88,1 -DA:89,1 -DA:90,1 -DA:91,1 -DA:92,1 -DA:93,1 -DA:94,1 -DA:95,0 -DA:96,0 -DA:97,0 -DA:98,0 -DA:99,0 -DA:100,1 -DA:101,1 -DA:102,1 -DA:103,1 -DA:104,1 -DA:105,1 -DA:106,1 -DA:107,1 -DA:108,1 -DA:109,1 -DA:110,1 -DA:111,1 -DA:112,1 -DA:113,0 -DA:114,0 -DA:115,0 -DA:116,0 -DA:117,0 -DA:118,0 -DA:119,0 -DA:120,0 -DA:121,0 -DA:122,0 -DA:123,0 -DA:124,0 -DA:125,0 -DA:126,0 -DA:127,0 -DA:128,0 -DA:129,0 -DA:130,0 -DA:131,1 -DA:132,1 -DA:133,1 -DA:134,1 -DA:135,1 -DA:136,1 -DA:137,1 -DA:138,0 -DA:139,0 -DA:140,1 -DA:141,1 -DA:142,1 -DA:143,1 -DA:144,1 -DA:145,1 -DA:146,0 -DA:147,0 -DA:148,1 -DA:149,1 -DA:150,1 -DA:151,1 -DA:152,1 -DA:153,1 -DA:154,1 -DA:155,1 -DA:156,1 -DA:157,1 -DA:158,1 -DA:159,1 -DA:160,1 -DA:161,1 -DA:162,1 -DA:163,1 -DA:164,1 -DA:165,1 -DA:166,1 -LF:166 -LH:131 -BRDA:7,0,0,1 -BRDA:9,1,0,1 -BRDA:35,2,0,1 -BRDA:79,3,0,0 -BRDA:53,4,0,1 -BRDA:54,5,0,0 -BRDA:63,6,0,1 -BRDA:68,7,0,0 -BRDA:72,8,0,1 -BRDA:81,9,0,1 -BRDA:82,10,0,0 -BRDA:82,11,0,0 -BRDA:94,12,0,0 -BRDA:94,13,0,0 -BRDA:102,14,0,1 -BRDA:103,15,0,0 -BRDA:108,16,0,1 -BRDA:110,17,0,0 -BRDA:113,18,0,0 -BRDA:133,19,0,1 -BRDA:145,20,0,0 -BRDA:136,21,0,1 -BRDA:137,22,0,0 -BRDA:137,23,0,0 -BRF:24 -BRH:11 -end_of_record -TN: -SF:src/include.jodit.ts -FNF:0 -FNH:0 -DA:1,1 -DA:2,1 -DA:3,1 -DA:4,1 -DA:5,1 -DA:6,1 -DA:7,1 -LF:7 -LH:7 -BRF:0 -BRH:0 -end_of_record -TN: -SF:src/index.ts -FN:5,get -FNF:1 -FNH:0 -FNDA:0,get -DA:1,1 -DA:2,1 -DA:3,1 -DA:4,1 -DA:5,1 -LF:5 -LH:5 -BRF:0 -BRH:0 -end_of_record diff --git a/package-lock.json b/package-lock.json index 810a618..5856035 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "5.0.2", "license": "MIT", "dependencies": { - "jodit": "^4.2.47" + "jodit": "^4.2.48" }, "devDependencies": { "@eslint/compat": "^1.2.5", @@ -17,7 +17,9 @@ "@swc-node/register": "^1.10.9", "@swc/core": "^1.10.7", "@testing-library/dom": "^10.4.0", + "@testing-library/jest-dom": "^6.6.3", "@testing-library/react": "^16.2.0", + "@testing-library/user-event": "^14.6.0", "@types/jest": "^29.5.14", "@types/react": "^19.0.7", "@types/react-dom": "^19.0.3", @@ -34,13 +36,11 @@ "prettier": "^3.4.2", "react": "^19.0.0", "react-dom": "^19.0.0", - "react-test-renderer": "^19.0.0", "replace": "^1.2.2", "style-loader": "^4.0.0", "swc-loader": "^0.2.6", "ts-jest": "^29.2.5", "ts-node": "^10.9.2", - "tsx": "^4.19.2", "typescript": "^5.7.3", "webpack": "^5.97.1", "webpack-cli": "^6.0.1", @@ -51,6 +51,13 @@ "react-dom": "~0.14 || ^15 || ^16 || ^17 || ^18 || ^19" } }, + "node_modules/@adobe/css-tools": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.4.1.tgz", + "integrity": "sha512-12WGKBQzjUAI4ayyF4IAtfw2QR/IDoqk6jTddXDhtYTJF9ASmoE1zst7cVtP0aL/F1jUJL5r+JxKXKEgHNbEUQ==", + "dev": true, + "license": "MIT" + }, "node_modules/@ampproject/remapping": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", @@ -662,414 +669,6 @@ "tslib": "^2.4.0" } }, - "node_modules/@esbuild/aix-ppc64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.23.1.tgz", - "integrity": "sha512-6VhYk1diRqrhBAqpJEdjASR/+WVRtfjpqKuNw11cLiaWpAT/Uu+nokB+UJnevzy/P9C/ty6AOe0dwueMrGh/iQ==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "aix" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/android-arm": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.23.1.tgz", - "integrity": "sha512-uz6/tEy2IFm9RYOyvKl88zdzZfwEfKZmnX9Cj1BHjeSGNuGLuMD1kR8y5bteYmwqKm1tj8m4cb/aKEorr6fHWQ==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/android-arm64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.23.1.tgz", - "integrity": "sha512-xw50ipykXcLstLeWH7WRdQuysJqejuAGPd30vd1i5zSyKK3WE+ijzHmLKxdiCMtH1pHz78rOg0BKSYOSB/2Khw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/android-x64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.23.1.tgz", - "integrity": "sha512-nlN9B69St9BwUoB+jkyU090bru8L0NA3yFvAd7k8dNsVH8bi9a8cUAUSEcEEgTp2z3dbEDGJGfP6VUnkQnlReg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/darwin-arm64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.23.1.tgz", - "integrity": "sha512-YsS2e3Wtgnw7Wq53XXBLcV6JhRsEq8hkfg91ESVadIrzr9wO6jJDMZnCQbHm1Guc5t/CdDiFSSfWP58FNuvT3Q==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/darwin-x64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.23.1.tgz", - "integrity": "sha512-aClqdgTDVPSEGgoCS8QDG37Gu8yc9lTHNAQlsztQ6ENetKEO//b8y31MMu2ZaPbn4kVsIABzVLXYLhCGekGDqw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/freebsd-arm64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.23.1.tgz", - "integrity": "sha512-h1k6yS8/pN/NHlMl5+v4XPfikhJulk4G+tKGFIOwURBSFzE8bixw1ebjluLOjfwtLqY0kewfjLSrO6tN2MgIhA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/freebsd-x64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.23.1.tgz", - "integrity": "sha512-lK1eJeyk1ZX8UklqFd/3A60UuZ/6UVfGT2LuGo3Wp4/z7eRTRYY+0xOu2kpClP+vMTi9wKOfXi2vjUpO1Ro76g==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-arm": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.23.1.tgz", - "integrity": "sha512-CXXkzgn+dXAPs3WBwE+Kvnrf4WECwBdfjfeYHpMeVxWE0EceB6vhWGShs6wi0IYEqMSIzdOF1XjQ/Mkm5d7ZdQ==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-arm64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.23.1.tgz", - "integrity": "sha512-/93bf2yxencYDnItMYV/v116zff6UyTjo4EtEQjUBeGiVpMmffDNUyD9UN2zV+V3LRV3/on4xdZ26NKzn6754g==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-ia32": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.23.1.tgz", - "integrity": "sha512-VTN4EuOHwXEkXzX5nTvVY4s7E/Krz7COC8xkftbbKRYAl96vPiUssGkeMELQMOnLOJ8k3BY1+ZY52tttZnHcXQ==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-loong64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.23.1.tgz", - "integrity": "sha512-Vx09LzEoBa5zDnieH8LSMRToj7ir/Jeq0Gu6qJ/1GcBq9GkfoEAoXvLiW1U9J1qE/Y/Oyaq33w5p2ZWrNNHNEw==", - "cpu": [ - "loong64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-mips64el": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.23.1.tgz", - "integrity": "sha512-nrFzzMQ7W4WRLNUOU5dlWAqa6yVeI0P78WKGUo7lg2HShq/yx+UYkeNSE0SSfSure0SqgnsxPvmAUu/vu0E+3Q==", - "cpu": [ - "mips64el" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-ppc64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.23.1.tgz", - "integrity": "sha512-dKN8fgVqd0vUIjxuJI6P/9SSSe/mB9rvA98CSH2sJnlZ/OCZWO1DJvxj8jvKTfYUdGfcq2dDxoKaC6bHuTlgcw==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-riscv64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.23.1.tgz", - "integrity": "sha512-5AV4Pzp80fhHL83JM6LoA6pTQVWgB1HovMBsLQ9OZWLDqVY8MVobBXNSmAJi//Csh6tcY7e7Lny2Hg1tElMjIA==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-s390x": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.23.1.tgz", - "integrity": "sha512-9ygs73tuFCe6f6m/Tb+9LtYxWR4c9yg7zjt2cYkjDbDpV/xVn+68cQxMXCjUpYwEkze2RcU/rMnfIXNRFmSoDw==", - "cpu": [ - "s390x" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-x64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.23.1.tgz", - "integrity": "sha512-EV6+ovTsEXCPAp58g2dD68LxoP/wK5pRvgy0J/HxPGB009omFPv3Yet0HiaqvrIrgPTBuC6wCH1LTOY91EO5hQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/netbsd-x64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.23.1.tgz", - "integrity": "sha512-aevEkCNu7KlPRpYLjwmdcuNz6bDFiE7Z8XC4CPqExjTvrHugh28QzUXVOZtiYghciKUacNktqxdpymplil1beA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/openbsd-arm64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.23.1.tgz", - "integrity": "sha512-3x37szhLexNA4bXhLrCC/LImN/YtWis6WXr1VESlfVtVeoFJBRINPJ3f0a/6LV8zpikqoUg4hyXw0sFBt5Cr+Q==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/openbsd-x64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.23.1.tgz", - "integrity": "sha512-aY2gMmKmPhxfU+0EdnN+XNtGbjfQgwZj43k8G3fyrDM/UdZww6xrWxmDkuz2eCZchqVeABjV5BpildOrUbBTqA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/sunos-x64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.23.1.tgz", - "integrity": "sha512-RBRT2gqEl0IKQABT4XTj78tpk9v7ehp+mazn2HbUeZl1YMdaGAQqhapjGTCe7uw7y0frDi4gS0uHzhvpFuI1sA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/win32-arm64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.23.1.tgz", - "integrity": "sha512-4O+gPR5rEBe2FpKOVyiJ7wNDPA8nGzDuJ6gN4okSA1gEOYZ67N8JPk58tkWtdtPeLz7lBnY6I5L3jdsr3S+A6A==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/win32-ia32": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.23.1.tgz", - "integrity": "sha512-BcaL0Vn6QwCwre3Y717nVHZbAa4UBEigzFm6VdsVdT/MbZ38xoj1X9HPkZhbmaBGUD1W8vxAfffbDe8bA6AKnQ==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/win32-x64": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.23.1.tgz", - "integrity": "sha512-BHpFFeslkWrXWyUPnbKm+xYYVYruCinGcftSBaa8zoF9hZO4BcSCFUvHVTtzpIY6YzUnYtuEhZ+C9iEXjxnasg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, "node_modules/@eslint-community/eslint-utils": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz", @@ -2468,6 +2067,48 @@ "dev": true, "license": "MIT" }, + "node_modules/@testing-library/jest-dom": { + "version": "6.6.3", + "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-6.6.3.tgz", + "integrity": "sha512-IteBhl4XqYNkM54f4ejhLRJiZNqcSCoXUOG2CPK7qbD322KjQozM4kHQOfkG2oln9b9HTYqs+Sae8vBATubxxA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@adobe/css-tools": "^4.4.0", + "aria-query": "^5.0.0", + "chalk": "^3.0.0", + "css.escape": "^1.5.1", + "dom-accessibility-api": "^0.6.3", + "lodash": "^4.17.21", + "redent": "^3.0.0" + }, + "engines": { + "node": ">=14", + "npm": ">=6", + "yarn": ">=1" + } + }, + "node_modules/@testing-library/jest-dom/node_modules/chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.6.3.tgz", + "integrity": "sha512-7ZgogeTnjuHbo+ct10G9Ffp0mif17idi0IyWNVA/wcwcm7NPOD/WEHVP3n7n3MhXqxoIYm8d6MuZohYWIZ4T3w==", + "dev": true, + "license": "MIT" + }, "node_modules/@testing-library/react": { "version": "16.2.0", "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-16.2.0.tgz", @@ -2496,6 +2137,20 @@ } } }, + "node_modules/@testing-library/user-event": { + "version": "14.6.0", + "resolved": "https://registry.npmjs.org/@testing-library/user-event/-/user-event-14.6.0.tgz", + "integrity": "sha512-+jsfK7kVJbqnCYtLTln8Ja/NmVrZRwBJHmHR9IxIVccMWSOZ6Oy0FkDJNeyVu4QSpMNmRfy10Xb76ObRDlWWBQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12", + "npm": ">=6" + }, + "peerDependencies": { + "@testing-library/dom": ">=7.21.4" + } + }, "node_modules/@tootallnate/once": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", @@ -4864,6 +4519,13 @@ } } }, + "node_modules/css.escape": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/css.escape/-/css.escape-1.5.1.tgz", + "integrity": "sha512-YUifsXXuknHlUsmlgyY0PKzgPOr7/FjCePfHNt0jxm83wHZi44VDMQ7/fGNkjY3/jV1MC+1CmZbaHzugyeRtpg==", + "dev": true, + "license": "MIT" + }, "node_modules/cssesc": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", @@ -5554,46 +5216,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/esbuild": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.23.1.tgz", - "integrity": "sha512-VVNz/9Sa0bs5SELtn3f7qhJCDPCF5oMEl5cO9/SSinpE9hbPVvxbd572HH5AKiP7WD8INO53GgfDDhRjkylHEg==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=18" - }, - "optionalDependencies": { - "@esbuild/aix-ppc64": "0.23.1", - "@esbuild/android-arm": "0.23.1", - "@esbuild/android-arm64": "0.23.1", - "@esbuild/android-x64": "0.23.1", - "@esbuild/darwin-arm64": "0.23.1", - "@esbuild/darwin-x64": "0.23.1", - "@esbuild/freebsd-arm64": "0.23.1", - "@esbuild/freebsd-x64": "0.23.1", - "@esbuild/linux-arm": "0.23.1", - "@esbuild/linux-arm64": "0.23.1", - "@esbuild/linux-ia32": "0.23.1", - "@esbuild/linux-loong64": "0.23.1", - "@esbuild/linux-mips64el": "0.23.1", - "@esbuild/linux-ppc64": "0.23.1", - "@esbuild/linux-riscv64": "0.23.1", - "@esbuild/linux-s390x": "0.23.1", - "@esbuild/linux-x64": "0.23.1", - "@esbuild/netbsd-x64": "0.23.1", - "@esbuild/openbsd-arm64": "0.23.1", - "@esbuild/openbsd-x64": "0.23.1", - "@esbuild/sunos-x64": "0.23.1", - "@esbuild/win32-arm64": "0.23.1", - "@esbuild/win32-ia32": "0.23.1", - "@esbuild/win32-x64": "0.23.1" - } - }, "node_modules/escalade": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", @@ -6625,19 +6247,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/get-tsconfig": { - "version": "4.8.1", - "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.8.1.tgz", - "integrity": "sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg==", - "dev": true, - "license": "MIT", - "dependencies": { - "resolve-pkg-maps": "^1.0.0" - }, - "funding": { - "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" - } - }, "node_modules/glob": { "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", @@ -7135,6 +6744,16 @@ "node": ">=0.8.19" } }, + "node_modules/indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -8651,9 +8270,9 @@ } }, "node_modules/jodit": { - "version": "4.2.47", - "resolved": "https://registry.npmjs.org/jodit/-/jodit-4.2.47.tgz", - "integrity": "sha512-3dSdV+dUjwbuNKhn2M6hs8F7qkiufBPJFMB6YVJWbja7RqkQHGtrCGkpZJ1PH16chUgET2Yi+LVOonWyf/nV8g==", + "version": "4.2.49", + "resolved": "https://registry.npmjs.org/jodit/-/jodit-4.2.49.tgz", + "integrity": "sha512-jFyZb7ZiiW1LiKxKfmVdnuR01S2BY1iFTlXifCtUpkYPURqpyhc7YkgJn54ZERZ1djNBnhvKLYtiiwB7F1ysZA==", "license": "MIT", "dependencies": { "autobind-decorator": "^2.4.0" @@ -8893,6 +8512,13 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true, + "license": "MIT" + }, "node_modules/lodash.memoize": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", @@ -9110,6 +8736,16 @@ "node": ">=6" } }, + "node_modules/min-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", + "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, "node_modules/minimalistic-assert": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", @@ -10154,27 +9790,6 @@ "dev": true, "license": "MIT" }, - "node_modules/react-test-renderer": { - "version": "19.0.0", - "resolved": "https://registry.npmjs.org/react-test-renderer/-/react-test-renderer-19.0.0.tgz", - "integrity": "sha512-oX5u9rOQlHzqrE/64CNr0HB0uWxkCQmZNSfozlYvwE71TLVgeZxVf0IjouGEr1v7r1kcDifdAJBeOhdhxsG/DA==", - "dev": true, - "license": "MIT", - "dependencies": { - "react-is": "^19.0.0", - "scheduler": "^0.25.0" - }, - "peerDependencies": { - "react": "^19.0.0" - } - }, - "node_modules/react-test-renderer/node_modules/react-is": { - "version": "19.0.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-19.0.0.tgz", - "integrity": "sha512-H91OHcwjZsbq3ClIDHMzBShc1rotbfACdWENsmEf0IFvZ3FgGPtdHMcsv45bQ1hAbgdfiA8SnxTKfDS+x/8m2g==", - "dev": true, - "license": "MIT" - }, "node_modules/readable-stream": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", @@ -10234,6 +9849,20 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/redent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", + "integrity": "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==", + "dev": true, + "license": "MIT", + "dependencies": { + "indent-string": "^4.0.0", + "strip-indent": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/reflect.getprototypeof": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.10.tgz", @@ -10489,16 +10118,6 @@ "node": ">=4" } }, - "node_modules/resolve-pkg-maps": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", - "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" - } - }, "node_modules/resolve.exports": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.3.tgz", @@ -11384,6 +11003,19 @@ "node": ">=6" } }, + "node_modules/strip-indent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", + "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "min-indent": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", @@ -11801,26 +11433,6 @@ "dev": true, "license": "0BSD" }, - "node_modules/tsx": { - "version": "4.19.2", - "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.19.2.tgz", - "integrity": "sha512-pOUl6Vo2LUq/bSa8S5q7b91cgNSjctn9ugq/+Mvow99qW6x/UZYwzxy/3NmqoT66eHYfCVvFvACC58UBPFf28g==", - "dev": true, - "license": "MIT", - "dependencies": { - "esbuild": "~0.23.0", - "get-tsconfig": "^4.7.5" - }, - "bin": { - "tsx": "dist/cli.mjs" - }, - "engines": { - "node": ">=18.0.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.3" - } - }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", diff --git a/package.json b/package.json index d0eab89..b5deee0 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "rte" ], "dependencies": { - "jodit": "^4.2.47" + "jodit": "^4.2.48" }, "peerDependencies": { "react": "~0.14 || ^15 || ^16 || ^17 || ^18 || ^19", @@ -28,7 +28,9 @@ "@swc-node/register": "^1.10.9", "@swc/core": "^1.10.7", "@testing-library/dom": "^10.4.0", + "@testing-library/jest-dom": "^6.6.3", "@testing-library/react": "^16.2.0", + "@testing-library/user-event": "^14.6.0", "@types/jest": "^29.5.14", "@types/react": "^19.0.7", "@types/react-dom": "^19.0.3", diff --git a/src/JoditEditor.tsx b/src/JoditEditor.tsx index 3f97e9d..6364e50 100644 --- a/src/JoditEditor.tsx +++ b/src/JoditEditor.tsx @@ -1,8 +1,10 @@ import React, { useEffect, useRef, forwardRef, useLayoutEffect } from 'react'; import type { IJodit } from 'jodit/types/types/jodit'; -import type { Jodit as JoditConstructorType } from 'jodit'; -import type { Config } from 'jodit/config'; +import type { Jodit as JoditBaseConstructor } from 'jodit/types/index'; +import type { Config as BaseConfig } from 'jodit/config'; +import type { Config } from 'jodit/types/config'; import { Jodit } from './include.jodit'; +import type { DeepPartial } from 'jodit/types/types'; function usePrevious(value: string): string { const ref = useRef(''); @@ -12,15 +14,9 @@ function usePrevious(value: string): string { return ref.current; } -type DeepPartial = T extends object - ? { - [P in keyof T]?: DeepPartial; - } - : T; - -interface Props { +interface Props { JoditConstructor?: T; - config?: DeepPartial; + config?: DeepPartial; className?: string; id?: string; name?: string; diff --git a/tests/__snapshots__/smoke.test.tsx.snap b/tests/__snapshots__/smoke.test.tsx.snap new file mode 100644 index 0000000..07de894 --- /dev/null +++ b/tests/__snapshots__/smoke.test.tsx.snap @@ -0,0 +1,1421 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Smoke Test Config should render without crashing 1`] = ` + +
+
+
+
+ +
+
+ + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + +
+
+
+ + + +
+
+
+
+
+
+

+ Hello, world! +

+
+
+ +
+ +`; + +exports[`Smoke Test should render without crashing 1`] = ` + +
+
+
+
+ +
+
+ + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + +
+
+
+ + + +
+
+
+
+
+
+

+ Hello, world! +

+
+
+ +
+ +`; diff --git a/tests/onchange.test.tsx b/tests/onchange.test.tsx new file mode 100644 index 0000000..60c3322 --- /dev/null +++ b/tests/onchange.test.tsx @@ -0,0 +1,29 @@ +import React from 'react'; +import { describe, it } from '@jest/globals'; +import { render } from '@testing-library/react'; +import userEvent from '@testing-library/user-event'; +import JoditEditor from '../src'; + +describe('On change Test', () => { + describe('On init', () => { + it('should not call handler', () => { + const onChange = jest.fn(); + const value = '

Hello, World!

'; + render(); + expect(onChange).toHaveBeenCalledTimes(0); + }); + }); + + describe('On change text', () => { + it('should call handler every time', async () => { + const onChange = jest.fn(); + let value = '

Hello, World!

'; + const stamp = render( + + ); + value = '

Hello!

'; + stamp.rerender(); + expect(onChange).toHaveBeenCalledTimes(1); + }); + }); +}); diff --git a/tests/smoke.test.tsx b/tests/smoke.test.tsx index 52e1872..5766739 100644 --- a/tests/smoke.test.tsx +++ b/tests/smoke.test.tsx @@ -1,10 +1,31 @@ import React from 'react'; import { describe, it } from '@jest/globals'; import { render } from '@testing-library/react'; +import '@testing-library/jest-dom'; import JoditEditor from '../src'; describe('Smoke Test', () => { it('should render without crashing', () => { - render(); + const { asFragment, getByText } = render( + Hello, world!

'} /> + ); + expect(getByText('Hello, world!')).toBeInTheDocument(); + expect(asFragment()).toMatchSnapshot(); + }); + + describe('Config', () => { + it('should render without crashing', () => { + const config = { + readonly: true, + sourceEditor: 'ace', + disabled: true + }; + + const { asFragment, getByText } = render( + Hello, world!

'} config={config} /> + ); + expect(getByText('Hello, world!')).toBeInTheDocument(); + expect(asFragment()).toMatchSnapshot(); + }); }); });