jodit 4.5.9 → 4.5.12

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.
Files changed (67) hide show
  1. package/CHANGELOG.md +59 -2
  2. package/es2015/jodit.css +1 -1
  3. package/es2015/jodit.fat.min.js +2 -2
  4. package/es2015/jodit.js +36065 -36018
  5. package/es2015/jodit.min.js +2 -2
  6. package/es2015/plugins/debug/debug.css +1 -1
  7. package/es2015/plugins/debug/debug.js +1 -1
  8. package/es2015/plugins/debug/debug.min.js +1 -1
  9. package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
  10. package/es2015/plugins/speech-recognize/speech-recognize.js +750 -750
  11. package/es2015/plugins/speech-recognize/speech-recognize.min.js +2 -2
  12. package/es2018/jodit.css +1 -1
  13. package/es2018/jodit.fat.min.js +2 -2
  14. package/es2018/jodit.js +36604 -36554
  15. package/es2018/jodit.min.js +2 -2
  16. package/es2018/plugins/debug/debug.css +1 -1
  17. package/es2018/plugins/debug/debug.js +1 -1
  18. package/es2018/plugins/debug/debug.min.js +1 -1
  19. package/es2018/plugins/speech-recognize/speech-recognize.css +1 -1
  20. package/es2018/plugins/speech-recognize/speech-recognize.js +750 -750
  21. package/es2018/plugins/speech-recognize/speech-recognize.min.js +2 -2
  22. package/es2021/jodit.css +1 -1
  23. package/es2021/jodit.fat.min.js +2 -2
  24. package/es2021/jodit.js +35866 -35815
  25. package/es2021/jodit.min.js +2 -2
  26. package/es2021/plugins/debug/debug.css +1 -1
  27. package/es2021/plugins/debug/debug.js +1 -1
  28. package/es2021/plugins/debug/debug.min.js +1 -1
  29. package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
  30. package/es2021/plugins/speech-recognize/speech-recognize.js +748 -748
  31. package/es2021/plugins/speech-recognize/speech-recognize.min.js +2 -2
  32. package/es2021.en/jodit.css +1 -1
  33. package/es2021.en/jodit.fat.min.js +2 -2
  34. package/es2021.en/jodit.js +34747 -34696
  35. package/es2021.en/jodit.min.js +2 -2
  36. package/es2021.en/plugins/debug/debug.css +1 -1
  37. package/es2021.en/plugins/debug/debug.js +1 -1
  38. package/es2021.en/plugins/debug/debug.min.js +1 -1
  39. package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
  40. package/es2021.en/plugins/speech-recognize/speech-recognize.js +224 -224
  41. package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +2 -2
  42. package/es5/415.fat.min.js +2 -2
  43. package/es5/415.js +3902 -3900
  44. package/es5/415.min.js +2 -2
  45. package/es5/5.fat.min.js +1 -1
  46. package/es5/5.min.js +1 -1
  47. package/es5/jodit.css +2 -2
  48. package/es5/jodit.fat.min.js +2 -2
  49. package/es5/jodit.js +37964 -37915
  50. package/es5/jodit.min.css +2 -2
  51. package/es5/jodit.min.js +2 -2
  52. package/es5/plugins/debug/debug.css +1 -1
  53. package/es5/plugins/debug/debug.js +1 -1
  54. package/es5/plugins/debug/debug.min.js +1 -1
  55. package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
  56. package/es5/plugins/speech-recognize/speech-recognize.js +800 -800
  57. package/es5/plugins/speech-recognize/speech-recognize.min.js +2 -2
  58. package/esm/core/async/async.d.ts +13 -3
  59. package/esm/core/async/async.js +58 -10
  60. package/esm/core/constants.js +1 -1
  61. package/esm/core/dom/lazy-walker.d.ts +4 -3
  62. package/esm/core/dom/lazy-walker.js +14 -12
  63. package/esm/types/async.d.ts +6 -0
  64. package/package.json +1 -1
  65. package/types/core/async/async.d.ts +13 -3
  66. package/types/core/dom/lazy-walker.d.ts +4 -3
  67. package/types/types/async.d.ts +6 -0
@@ -1,10 +1,10 @@
1
1
  /*!
2
2
  * jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
3
3
  * Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
4
- * Version: v4.5.9
4
+ * Version: v4.5.12
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
8
8
 
9
9
 
10
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var i in n)("object"==typeof exports?exports:e)[i]=n[i]}}(self,(function(){return(self.webpackChunkjodit=self.webpackChunkjodit||[]).push([[882],{71096:function(e,t,n){"use strict";var i=n(9810),o=n(98253),s=n(26150),r=n(72197),u=n(931),c=n(36115),a=n(71722),l=n(93676),p=n(22227),d=n.n(p);c.T.prototype.speechRecognize={api:void 0!==a.o?a.o:null,sound:!0,continuous:!1,interimResults:!0,commands:{"newline|enter":"enter","delete|remove word|delete word":"backspaceWordButton",comma:"inserthtml::,",underline:"inserthtml::_",hyphen:"inserthtml::-",space:"inserthtml:: ",question:"inserthtml::?",dot:"inserthtml::.","quote|quotes|open quote":"inserthtml::'","header|header h1":"formatblock::h1","select all":"selectall"}},u.I.set("speech-recognize",d()),c.T.prototype.controls.speechRecognize={isVisible:function(e){return Boolean(e.o.speechRecognize.api)},isActive:function(e,t){var n=(0,r.m)(e,"speech");return Boolean(null==n?void 0:n.isEnabled)},isDisabled:function(e){return!e.o.speechRecognize.api},exec:function(e,t,n){var u,c=n.button,a=n.control,p=e.o.speechRecognize,d=p.api,h=p.lang,f=p.continuous,m=p.interimResults,g=p.sound;if(d){var R=(0,r.m)(e,"speech");if(!R){var _=new d;(R=new l.g(e.async,_)).lang=(0,o.K)(h)?h:null!==(u=(0,s.C)(e.od.documentElement,"lang"))&&void 0!==u?u:void 0,R.continuous=f,R.interimResults=m,R.sound=g,(0,r.m)(e,"speech",R),R.on("pulse",(function(e){c.setMod("pulse",e)})),R.on("result",(function(t){return e.e.fire("speechRecognizeResult",t)})),R.on("progress",(function(t){return e.e.fire("speechRecognizeProgressResult",t)})),R.on("error",(function(t){return e.message.error(t)})),c.hookStatus("beforeDestruct",(function(){(0,r.m)(e,"speech",null),R.destruct()}))}if(a.args){var v=a.args[0];if((0,i.L)(R[v]))return R[v]=!R[v],void(R.isEnabled&&R.restart())}R.toggle(),R.isEnabled&&c.setMod("pulse",!0),c.state.activated=R.isEnabled}else e.alert("Speech recognize API unsupported in your browser")},name:"speechRecognize",command:"toggleSpeechRecognize",tooltip:"Speech Recognize",list:{sound:"Sound",interimResults:"Interim Results"},childTemplate:function(e,t,n){var i,o=(0,r.m)(e,"speech"),s=null!==(i=null==o?void 0:o[t])&&void 0!==i?i:e.o.speechRecognize[t];return"<span class='jodit-speech-recognize__list-item'><input ".concat(s?"checked":""," class='jodit-checkbox' type='checkbox'>&nbsp;").concat(n,"</span>")},mods:{stroke:!1}}},81629:function(e,t,n){"use strict";n.d(t,{N:function(){return i},Z:function(){return o}});var i=440,o=940},71722:function(e,t,n){"use strict";n.d(t,{o:function(){return o}});var i=n(17352),o=i.globalWindow?i.globalWindow.SpeechRecognition||i.globalWindow.webkitSpeechRecognition:void 0},50834:function(e,t,n){"use strict";n.d(t,{F:function(){return o}});var i=n(31635);function o(e,t){var n=(0,i.zs)(t.split("::"),2);e.execCommand(n[0],null,n[1])}},93676:function(e,t,n){"use strict";n.d(t,{g:function(){return c}});var i=n(31635),o=n(22664),s=n(43431),r=n(95473),u=n(81629),c=function(e){function t(t,i){var o=e.call(this)||this;return o.async=t,o._continuous=!1,o._interimResults=!1,o.sound=!0,o._isEnabled=!1,o._restartTimeout=0,o._onSpeechStart=function(e){o._isEnabled&&(o.async.clearTimeout(o._restartTimeout),o._restartTimeout=o.async.setTimeout((function(){o.restart(),o.emit("pulse",!1),o._makeSound(u.Z)}),5e3),o.emit("pulse",!0))},o.__interimResults="",o._api=i,n._instances.add(o),o}var n;return(0,i.C6)(t,e),n=t,Object.defineProperty(t.prototype,"lang",{get:function(){return this._lang},set:function(e){this._lang=e,this._api.lang=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"continuous",{get:function(){return this._continuous},set:function(e){this._continuous=e,this._api.continuous=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"interimResults",{get:function(){return this._interimResults},set:function(e){this._interimResults=e,this._api.interimResults=e},enumerable:!1,configurable:!0}),t.prototype.destruct=function(){this.stop(),n._instances.delete(this),e.prototype.destruct.call(this)},Object.defineProperty(t.prototype,"isEnabled",{get:function(){return this._isEnabled},enumerable:!1,configurable:!0}),t.prototype.start=function(){var e=this;if(!this._isEnabled){this._isEnabled=!0,n._instances.forEach((function(t){t!==e&&t.stop()}));try{this._api.start()}catch(e){return this._onError(e),void this.stop()}this.__on("speechstart",this._onSpeechStart).__on("error",this._onError).__on("result",this._onProgress).__on("end",this._onResults)}},t.prototype.stop=function(){this._isEnabled&&(this._api.abort(),this._api.stop(),this.__off("speechstart",this._onSpeechStart).__off("error",this._onError).__off("result",this._onProgress).__off("end",this._onResults),this.async.clearTimeout(this._restartTimeout),this._isEnabled=!1,this.emit("pulse",!1))},t.prototype.toggle=function(){this._isEnabled?this.stop():this.start()},t.prototype.restart=function(){this.stop(),this.start()},t.prototype.__on=function(e,t){return this._api.addEventListener(e,t),this},t.prototype.__off=function(e,t){return this._api.removeEventListener(e,t),this},t.prototype._onResults=function(e){this.emit("pulse",!1),this.emit("result",this.__interimResults),this.__interimResults="",this._makeSound(u.N),this.restart()},t.prototype._onProgress=function(e){if(this._isEnabled&&(this.__interimResults="",e.results)){for(var t=0;e.results.length>t;t++){var n=e.results.item(t);if(n.length){var i=n.item(0).transcript;this.__interimResults+=i}}this.__interimResults&&this.emit("progress",this.__interimResults)}},t.prototype._onError=function(e){"voice-unavailable"===e.error&&this.emit("error","Voice unavailable"),"not-allowed"===e.error&&this.emit("error","Not allowed"),"language-unavailable"!==e.error&&"language-not-supported"!==e.error||this.emit("error","Language unavailable"),this._makeSound(u.Z),this.emit("pulse",!1),this.stop()},t.prototype._makeSound=function(e){this.sound&&(0,r.s)({frequency:e})},t._instances=new Set,n=(0,i.Cg)([o.autobind],t)}(s.h)},95473:function(e,t,n){"use strict";n.d(t,{s:function(){return s}});var i=n(17352),o=n(81629);function s(e){var t=void 0===e?{}:e,n=t.sec,s=void 0===n?.1:n,r=t.frequency,u=void 0===r?o.N:r,c=t.gain,a=void 0===c?.1:c,l=t.type,p=void 0===l?"sine":l;if(i.globalWindow&&(void 0!==i.globalWindow.AudioContext||void 0!==i.globalWindow.webkitAudioContext)){var d=new(i.globalWindow.AudioContext||i.globalWindow.webkitAudioContext),h=d.createGain(),f=d.createOscillator();f.type=p,f.frequency.value=u,f.connect(h),h.connect(d.destination),f.start(),f.stop(d.currentTime+s),h.gain.value=a}}},61593:function(e){"use strict";e.exports={newline:"الخط الجديد",delete:"حذف",space:"الفضاء","Speech Recognize":"التعرف على الكلام",Sound:"الصوت","Interim Results":"النتائج المؤقتة"}},64458:function(e){"use strict";e.exports={newline:"řádek",delete:"odstranit",space:"prostora","Speech Recognize":"Rozpoznání Řeči",Sound:"Zvuk","Interim Results":"Průběžné Výsledky"}},89601:function(e){"use strict";e.exports={newline:"Zeilenumbruch",delete:"löschen",space:"Raum","Speech Recognize":"Sprache Erkennen",Sound:"Sound","Interim Results":"Zwischenergebnis"}},87710:function(e){"use strict";e.exports={newline:"nueva línea",delete:"eliminar",space:"espacio","Speech Recognize":"Reconocimiento de Voz",Sound:"Sonido","Interim Results":"Resultados Provisionales"}},15603:function(e){"use strict";e.exports={newline:"خط جدید",delete:"حذف",space:"فضا","Speech Recognize":"گفتار را تشخیص دهید",Sound:"صدا","Interim Results":"نتایج موقت"}},84059:function(e){"use strict";e.exports={"Speech Recognize":"Puheentunnistus",newline:"uusi rivi",delete:"poistaa",space:"tilaa",Sound:"Ääni","Interim Results":"Välitulokset"}},13958:function(e){"use strict";e.exports={newline:"nouvelle ligne",delete:"supprimer",space:"espace","Speech Recognize":"Reconnaissance Vocale",Sound:"Son","Interim Results":"Résultats Intermédiaires"}},18717:function(e){"use strict";e.exports={newline:"חדשות",delete:"מחק",space:"שטח","Speech Recognize":"דיבור מזהה",Sound:"קול","Interim Results":"תוצאות ביניים"}},14765:function(e){"use strict";e.exports={newline:"újsor",delete:"törlés",space:"tér","Speech Recognize":"A Beszéd Felismeri",Sound:"Hang","Interim Results":"Időközi Eredmények"}},77995:function(e){"use strict";e.exports={newline:"newline",delete:"Hapus",space:"ruang","Speech Recognize":"Pidato Mengenali",Sound:"Suara","Interim Results":"Hasil Sementara"}},25202:function(e,t,n){"use strict";n.r(t),n.d(t,{ar:function(){return i},cs_cz:function(){return o},de:function(){return s},es:function(){return r},fa:function(){return u},fi:function(){return c},fr:function(){return a},he:function(){return l},hu:function(){return p},id:function(){return d},it:function(){return h},ja:function(){return f},ko:function(){return m},mn:function(){return g},nl:function(){return R},pl:function(){return _},pt_br:function(){return v},ru:function(){return S},tr:function(){return z},ua:function(){return w},zh_cn:function(){return b},zh_tw:function(){return y}});var i=n(61593),o=n(64458),s=n(89601),r=n(87710),u=n(15603),c=n(84059),a=n(13958),l=n(18717),p=n(14765),d=n(77995),h=n(92315),f=n(54711),m=n(68632),g=n(76769),R=n(3424),_=n(85454),v=n(64149),S=n(16491),z=n(48948),w=n(95700),b=n(84370),y=n(56646)},92315:function(e){"use strict";e.exports={newline:"nuova riga",delete:"eliminare",space:"spazio","Speech Recognize":"Discorso Riconoscere",Sound:"Suono","Interim Results":"Risultati intermedi"}},54711:function(e){"use strict";e.exports={newline:"改行",delete:"削除",space:"スペース","Speech Recognize":"音声認識",Sound:"音","Interim Results":"中間結果"}},68632:function(e){"use strict";e.exports={newline:"줄 바꿈",delete:"삭제",space:"공간","Speech Recognize":"음성 인식",Sound:"소리","Interim Results":"중간 결과"}},76769:function(e){"use strict";e.exports={newline:"Шинэ мөр",delete:"Устгах",space:"Зай","Speech Recognize":"Дуу хоолой таних",Sound:"Дуу","Interim Results":"Түр зуурын үр дүн"}},3424:function(e){"use strict";e.exports={newline:"regel",delete:"verwijderen",space:"ruimte","Speech Recognize":"Spraak Herkennen",Sound:"Geluid","Interim Results":"Tussentijdse Resultaten"}},85454:function(e){"use strict";e.exports={newline:"newline",delete:"usunąć",space:"przestrzeń","Speech Recognize":"Rozpoznawanie Mowy",Sound:"Dźwięk","Interim Results":"Wyniki Okresowe"}},64149:function(e){"use strict";e.exports={newline:"linha",delete:"excluir",space:"espaco","Speech Recognize":"Discurso Reconhecer",Sound:"Som","Interim Results":"Resultados Provisórios"}},16491:function(e){"use strict";e.exports={newline:"новая строка|перенос|энтер",delete:"удалить",space:"пробел","Speech Recognize":"Распознавание речи",Sound:"Звук","Interim Results":"Промежуточные результаты"}},48948:function(e){"use strict";e.exports={newline:"yeni satır",delete:"silmek",space:"uzay","Speech Recognize":"Konuşma Tanıma",Sound:"Ses","Interim Results":"Ara Sonuçlar"}},95700:function(e){"use strict";e.exports={newline:"новая строка|перенос|ентер",delete:"видалити",space:"пробел","Speech Recognize":"Распознавание речи",Sound:"Звук","Interim Results":"Проміжні результати"}},84370:function(e){"use strict";e.exports={newline:"新行",delete:"删除",space:"空间","Speech Recognize":"言语识别",Sound:"声音","Interim Results":"中期业绩"}},56646:function(e){"use strict";e.exports={newline:"換行",delete:"刪除",space:"空白","Speech Recognize":"語音辨識",Sound:"聲音","Interim Results":"階段性辨識結果"}},37873:function(e,t,n){"use strict";n.r(t),n.d(t,{SpeechRecognizeNative:function(){return d}});var i=n(31635),o=n(66927),s=n(55186),r=n(56298),u=n(84976),c=n(71005),a=(n(71096),n(46173)),l=n(50834),p=n(25202),d=function(e){function t(){var t=e.apply(this,(0,i.fX)([],(0,i.zs)(arguments),!1))||this;return t.buttons=[{group:"state",name:"speechRecognize"}],t._commandToWord={},t}return(0,i.C6)(t,e),t.prototype.afterInit=function(e){var t=this,n=e.o.speechRecognize.commands;n&&((0,r.JW)(p),(0,u.HP)(n,!1).forEach((function(i){i.split("|").forEach((function(o){o=o.trim().toLowerCase(),t._commandToWord[o]=n[i];var s=e.i18n(o);s!==o&&s.split("|").forEach((function(e){t._commandToWord[e.trim().toLowerCase()]=n[i].trim()}))}))})))},t.prototype.beforeDestruct=function(e){s.J.safeRemove(this.messagePopup)},t.prototype.onSpeechRecognizeProgressResult=function(e){var t=this;this.messagePopup||(this.messagePopup=this.j.create.div("jodit-speech-recognize__popup")),this.j.workplace.appendChild(this.messagePopup),this.j.async.clearTimeout(this.__hidePopupTimeout),this.__hidePopupTimeout=this.j.async.setTimeout((function(){s.J.safeRemove(t.messagePopup)}),1e3),this.messagePopup.innerText=e+"|"},t.prototype.onSpeechRecognizeResult=function(e){this.j.async.clearTimeout(this.__hidePopupTimeout),s.J.safeRemove(this.messagePopup);var t=this.j,n=t.s;if(!this._checkCommand(e)){var i=n.range,o=n.current();if(n.isCollapsed()&&s.J.isText(o)&&s.J.isOrContains(t.editor,o)&&o.nodeValue){var r=o.nodeValue;o.nodeValue=r+(/[\u00A0 ]\uFEFF*$/.test(r)?"":" ")+e,i.setStartAfter(o),n.selectRange(i),t.synchronizeValues()}else n.insertHTML(e)}},t.prototype._checkCommand=function(e){return e=e.toLowerCase().replace(/\./g,""),!!this._commandToWord[e]&&((0,l.F)(this.j,this._commandToWord[e]),!0)},(0,i.Cg)([(0,o.w)(":speechRecognizeProgressResult")],t.prototype,"onSpeechRecognizeProgressResult",null),(0,i.Cg)([(0,o.w)(":speechRecognizeResult")],t.prototype,"onSpeechRecognizeResult",null),t}(c.k);a.x.plugins.add("speech-recognize",d)},22227:function(e){e.exports='<svg viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"> <path d="M8,11c1.657,0,3-1.343,3-3V3c0-1.657-1.343-3-3-3S5,1.343,5,3v5C5,9.657,6.343,11,8,11z"/> <path d="M13,8V6h-1l0,1.844c0,1.92-1.282,3.688-3.164,4.071C6.266,12.438,4,10.479,4,8V6H3v2c0,2.414,1.721,4.434,4,4.899V15H5v1h6 v-1H9v-2.101C11.279,12.434,13,10.414,13,8z"/> </svg>'}},function(e){return e(e.s=37873)}])}));
10
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var i in n)("object"==typeof exports?exports:e)[i]=n[i]}}(self,(function(){return(self.webpackChunkjodit=self.webpackChunkjodit||[]).push([[882],{3424:function(e){"use strict";e.exports={newline:"regel",delete:"verwijderen",space:"ruimte","Speech Recognize":"Spraak Herkennen",Sound:"Geluid","Interim Results":"Tussentijdse Resultaten"}},13958:function(e){"use strict";e.exports={newline:"nouvelle ligne",delete:"supprimer",space:"espace","Speech Recognize":"Reconnaissance Vocale",Sound:"Son","Interim Results":"Résultats Intermédiaires"}},14765:function(e){"use strict";e.exports={newline:"újsor",delete:"törlés",space:"tér","Speech Recognize":"A Beszéd Felismeri",Sound:"Hang","Interim Results":"Időközi Eredmények"}},15603:function(e){"use strict";e.exports={newline:"خط جدید",delete:"حذف",space:"فضا","Speech Recognize":"گفتار را تشخیص دهید",Sound:"صدا","Interim Results":"نتایج موقت"}},16491:function(e){"use strict";e.exports={newline:"новая строка|перенос|энтер",delete:"удалить",space:"пробел","Speech Recognize":"Распознавание речи",Sound:"Звук","Interim Results":"Промежуточные результаты"}},18717:function(e){"use strict";e.exports={newline:"חדשות",delete:"מחק",space:"שטח","Speech Recognize":"דיבור מזהה",Sound:"קול","Interim Results":"תוצאות ביניים"}},22227:function(e){e.exports='<svg viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"> <path d="M8,11c1.657,0,3-1.343,3-3V3c0-1.657-1.343-3-3-3S5,1.343,5,3v5C5,9.657,6.343,11,8,11z"/> <path d="M13,8V6h-1l0,1.844c0,1.92-1.282,3.688-3.164,4.071C6.266,12.438,4,10.479,4,8V6H3v2c0,2.414,1.721,4.434,4,4.899V15H5v1h6 v-1H9v-2.101C11.279,12.434,13,10.414,13,8z"/> </svg>'},25202:function(e,t,n){"use strict";n.r(t),n.d(t,{ar:function(){return i},cs_cz:function(){return o},de:function(){return s},es:function(){return r},fa:function(){return u},fi:function(){return c},fr:function(){return a},he:function(){return l},hu:function(){return p},id:function(){return d},it:function(){return h},ja:function(){return f},ko:function(){return m},mn:function(){return g},nl:function(){return R},pl:function(){return _},pt_br:function(){return v},ru:function(){return S},tr:function(){return z},ua:function(){return w},zh_cn:function(){return b},zh_tw:function(){return y}});var i=n(61593),o=n(64458),s=n(89601),r=n(87710),u=n(15603),c=n(84059),a=n(13958),l=n(18717),p=n(14765),d=n(77995),h=n(92315),f=n(54711),m=n(68632),g=n(76769),R=n(3424),_=n(85454),v=n(64149),S=n(16491),z=n(48948),w=n(95700),b=n(84370),y=n(56646)},37873:function(e,t,n){"use strict";n.r(t),n.d(t,{SpeechRecognizeNative:function(){return d}});var i=n(31635),o=n(66927),s=n(55186),r=n(56298),u=n(84976),c=n(71005),a=(n(71096),n(46173)),l=n(50834),p=n(25202),d=function(e){function t(){var t=e.apply(this,(0,i.fX)([],(0,i.zs)(arguments),!1))||this;return t.buttons=[{group:"state",name:"speechRecognize"}],t._commandToWord={},t}return(0,i.C6)(t,e),t.prototype.afterInit=function(e){var t=this,n=e.o.speechRecognize.commands;n&&((0,r.JW)(p),(0,u.HP)(n,!1).forEach((function(i){i.split("|").forEach((function(o){o=o.trim().toLowerCase(),t._commandToWord[o]=n[i];var s=e.i18n(o);s!==o&&s.split("|").forEach((function(e){t._commandToWord[e.trim().toLowerCase()]=n[i].trim()}))}))})))},t.prototype.beforeDestruct=function(e){s.J.safeRemove(this.messagePopup)},t.prototype.onSpeechRecognizeProgressResult=function(e){var t=this;this.messagePopup||(this.messagePopup=this.j.create.div("jodit-speech-recognize__popup")),this.j.workplace.appendChild(this.messagePopup),this.j.async.clearTimeout(this.__hidePopupTimeout),this.__hidePopupTimeout=this.j.async.setTimeout((function(){s.J.safeRemove(t.messagePopup)}),1e3),this.messagePopup.innerText=e+"|"},t.prototype.onSpeechRecognizeResult=function(e){this.j.async.clearTimeout(this.__hidePopupTimeout),s.J.safeRemove(this.messagePopup);var t=this.j,n=t.s;if(!this._checkCommand(e)){var i=n.range,o=n.current();if(n.isCollapsed()&&s.J.isText(o)&&s.J.isOrContains(t.editor,o)&&o.nodeValue){var r=o.nodeValue;o.nodeValue=r+(/[\u00A0 ]\uFEFF*$/.test(r)?"":" ")+e,i.setStartAfter(o),n.selectRange(i),t.synchronizeValues()}else n.insertHTML(e)}},t.prototype._checkCommand=function(e){return e=e.toLowerCase().replace(/\./g,""),!!this._commandToWord[e]&&((0,l.F)(this.j,this._commandToWord[e]),!0)},(0,i.Cg)([(0,o.w)(":speechRecognizeProgressResult")],t.prototype,"onSpeechRecognizeProgressResult",null),(0,i.Cg)([(0,o.w)(":speechRecognizeResult")],t.prototype,"onSpeechRecognizeResult",null),t}(c.k);a.x.plugins.add("speech-recognize",d)},48948:function(e){"use strict";e.exports={newline:"yeni satır",delete:"silmek",space:"uzay","Speech Recognize":"Konuşma Tanıma",Sound:"Ses","Interim Results":"Ara Sonuçlar"}},50834:function(e,t,n){"use strict";n.d(t,{F:function(){return o}});var i=n(31635);function o(e,t){var n=(0,i.zs)(t.split("::"),2);e.execCommand(n[0],null,n[1])}},54711:function(e){"use strict";e.exports={newline:"改行",delete:"削除",space:"スペース","Speech Recognize":"音声認識",Sound:"音","Interim Results":"中間結果"}},56646:function(e){"use strict";e.exports={newline:"換行",delete:"刪除",space:"空白","Speech Recognize":"語音辨識",Sound:"聲音","Interim Results":"階段性辨識結果"}},61593:function(e){"use strict";e.exports={newline:"الخط الجديد",delete:"حذف",space:"الفضاء","Speech Recognize":"التعرف على الكلام",Sound:"الصوت","Interim Results":"النتائج المؤقتة"}},64149:function(e){"use strict";e.exports={newline:"linha",delete:"excluir",space:"espaco","Speech Recognize":"Discurso Reconhecer",Sound:"Som","Interim Results":"Resultados Provisórios"}},64458:function(e){"use strict";e.exports={newline:"řádek",delete:"odstranit",space:"prostora","Speech Recognize":"Rozpoznání Řeči",Sound:"Zvuk","Interim Results":"Průběžné Výsledky"}},68632:function(e){"use strict";e.exports={newline:"줄 바꿈",delete:"삭제",space:"공간","Speech Recognize":"음성 인식",Sound:"소리","Interim Results":"중간 결과"}},71096:function(e,t,n){"use strict";var i=n(9810),o=n(98253),s=n(26150),r=n(72197),u=n(931),c=n(36115),a=n(71722),l=n(93676),p=n(22227),d=n.n(p);c.T.prototype.speechRecognize={api:void 0!==a.o?a.o:null,sound:!0,continuous:!1,interimResults:!0,commands:{"newline|enter":"enter","delete|remove word|delete word":"backspaceWordButton",comma:"inserthtml::,",underline:"inserthtml::_",hyphen:"inserthtml::-",space:"inserthtml:: ",question:"inserthtml::?",dot:"inserthtml::.","quote|quotes|open quote":"inserthtml::'","header|header h1":"formatblock::h1","select all":"selectall"}},u.I.set("speech-recognize",d()),c.T.prototype.controls.speechRecognize={isVisible:function(e){return Boolean(e.o.speechRecognize.api)},isActive:function(e,t){var n=(0,r.m)(e,"speech");return Boolean(null==n?void 0:n.isEnabled)},isDisabled:function(e){return!e.o.speechRecognize.api},exec:function(e,t,n){var u,c=n.button,a=n.control,p=e.o.speechRecognize,d=p.api,h=p.lang,f=p.continuous,m=p.interimResults,g=p.sound;if(d){var R=(0,r.m)(e,"speech");if(!R){var _=new d;(R=new l.g(e.async,_)).lang=(0,o.K)(h)?h:null!==(u=(0,s.C)(e.od.documentElement,"lang"))&&void 0!==u?u:void 0,R.continuous=f,R.interimResults=m,R.sound=g,(0,r.m)(e,"speech",R),R.on("pulse",(function(e){c.setMod("pulse",e)})),R.on("result",(function(t){return e.e.fire("speechRecognizeResult",t)})),R.on("progress",(function(t){return e.e.fire("speechRecognizeProgressResult",t)})),R.on("error",(function(t){return e.message.error(t)})),c.hookStatus("beforeDestruct",(function(){(0,r.m)(e,"speech",null),R.destruct()}))}if(a.args){var v=a.args[0];if((0,i.L)(R[v]))return R[v]=!R[v],void(R.isEnabled&&R.restart())}R.toggle(),R.isEnabled&&c.setMod("pulse",!0),c.state.activated=R.isEnabled}else e.alert("Speech recognize API unsupported in your browser")},name:"speechRecognize",command:"toggleSpeechRecognize",tooltip:"Speech Recognize",list:{sound:"Sound",interimResults:"Interim Results"},childTemplate:function(e,t,n){var i,o=(0,r.m)(e,"speech"),s=null!==(i=null==o?void 0:o[t])&&void 0!==i?i:e.o.speechRecognize[t];return"<span class='jodit-speech-recognize__list-item'><input ".concat(s?"checked":""," class='jodit-checkbox' type='checkbox'>&nbsp;").concat(n,"</span>")},mods:{stroke:!1}}},71722:function(e,t,n){"use strict";n.d(t,{o:function(){return o}});var i=n(17352),o=i.globalWindow?i.globalWindow.SpeechRecognition||i.globalWindow.webkitSpeechRecognition:void 0},76769:function(e){"use strict";e.exports={newline:"Шинэ мөр",delete:"Устгах",space:"Зай","Speech Recognize":"Дуу хоолой таних",Sound:"Дуу","Interim Results":"Түр зуурын үр дүн"}},77995:function(e){"use strict";e.exports={newline:"newline",delete:"Hapus",space:"ruang","Speech Recognize":"Pidato Mengenali",Sound:"Suara","Interim Results":"Hasil Sementara"}},81629:function(e,t,n){"use strict";n.d(t,{N:function(){return i},Z:function(){return o}});var i=440,o=940},84059:function(e){"use strict";e.exports={"Speech Recognize":"Puheentunnistus",newline:"uusi rivi",delete:"poistaa",space:"tilaa",Sound:"Ääni","Interim Results":"Välitulokset"}},84370:function(e){"use strict";e.exports={newline:"新行",delete:"删除",space:"空间","Speech Recognize":"言语识别",Sound:"声音","Interim Results":"中期业绩"}},85454:function(e){"use strict";e.exports={newline:"newline",delete:"usunąć",space:"przestrzeń","Speech Recognize":"Rozpoznawanie Mowy",Sound:"Dźwięk","Interim Results":"Wyniki Okresowe"}},87710:function(e){"use strict";e.exports={newline:"nueva línea",delete:"eliminar",space:"espacio","Speech Recognize":"Reconocimiento de Voz",Sound:"Sonido","Interim Results":"Resultados Provisionales"}},89601:function(e){"use strict";e.exports={newline:"Zeilenumbruch",delete:"löschen",space:"Raum","Speech Recognize":"Sprache Erkennen",Sound:"Sound","Interim Results":"Zwischenergebnis"}},92315:function(e){"use strict";e.exports={newline:"nuova riga",delete:"eliminare",space:"spazio","Speech Recognize":"Discorso Riconoscere",Sound:"Suono","Interim Results":"Risultati intermedi"}},93676:function(e,t,n){"use strict";n.d(t,{g:function(){return c}});var i=n(31635),o=n(22664),s=n(43431),r=n(95473),u=n(81629),c=function(e){function t(t,i){var o=e.call(this)||this;return o.async=t,o._continuous=!1,o._interimResults=!1,o.sound=!0,o._isEnabled=!1,o._restartTimeout=0,o._onSpeechStart=function(e){o._isEnabled&&(o.async.clearTimeout(o._restartTimeout),o._restartTimeout=o.async.setTimeout((function(){o.restart(),o.emit("pulse",!1),o._makeSound(u.Z)}),5e3),o.emit("pulse",!0))},o.__interimResults="",o._api=i,n._instances.add(o),o}var n;return(0,i.C6)(t,e),n=t,Object.defineProperty(t.prototype,"lang",{get:function(){return this._lang},set:function(e){this._lang=e,this._api.lang=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"continuous",{get:function(){return this._continuous},set:function(e){this._continuous=e,this._api.continuous=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"interimResults",{get:function(){return this._interimResults},set:function(e){this._interimResults=e,this._api.interimResults=e},enumerable:!1,configurable:!0}),t.prototype.destruct=function(){this.stop(),n._instances.delete(this),e.prototype.destruct.call(this)},Object.defineProperty(t.prototype,"isEnabled",{get:function(){return this._isEnabled},enumerable:!1,configurable:!0}),t.prototype.start=function(){var e=this;if(!this._isEnabled){this._isEnabled=!0,n._instances.forEach((function(t){t!==e&&t.stop()}));try{this._api.start()}catch(e){return this._onError(e),void this.stop()}this.__on("speechstart",this._onSpeechStart).__on("error",this._onError).__on("result",this._onProgress).__on("end",this._onResults)}},t.prototype.stop=function(){this._isEnabled&&(this._api.abort(),this._api.stop(),this.__off("speechstart",this._onSpeechStart).__off("error",this._onError).__off("result",this._onProgress).__off("end",this._onResults),this.async.clearTimeout(this._restartTimeout),this._isEnabled=!1,this.emit("pulse",!1))},t.prototype.toggle=function(){this._isEnabled?this.stop():this.start()},t.prototype.restart=function(){this.stop(),this.start()},t.prototype.__on=function(e,t){return this._api.addEventListener(e,t),this},t.prototype.__off=function(e,t){return this._api.removeEventListener(e,t),this},t.prototype._onResults=function(e){this.emit("pulse",!1),this.emit("result",this.__interimResults),this.__interimResults="",this._makeSound(u.N),this.restart()},t.prototype._onProgress=function(e){if(this._isEnabled&&(this.__interimResults="",e.results)){for(var t=0;e.results.length>t;t++){var n=e.results.item(t);if(n.length){var i=n.item(0).transcript;this.__interimResults+=i}}this.__interimResults&&this.emit("progress",this.__interimResults)}},t.prototype._onError=function(e){"voice-unavailable"===e.error&&this.emit("error","Voice unavailable"),"not-allowed"===e.error&&this.emit("error","Not allowed"),"language-unavailable"!==e.error&&"language-not-supported"!==e.error||this.emit("error","Language unavailable"),this._makeSound(u.Z),this.emit("pulse",!1),this.stop()},t.prototype._makeSound=function(e){this.sound&&(0,r.s)({frequency:e})},t._instances=new Set,n=(0,i.Cg)([o.autobind],t)}(s.h)},95473:function(e,t,n){"use strict";n.d(t,{s:function(){return s}});var i=n(17352),o=n(81629);function s(e){var t=void 0===e?{}:e,n=t.sec,s=void 0===n?.1:n,r=t.frequency,u=void 0===r?o.N:r,c=t.gain,a=void 0===c?.1:c,l=t.type,p=void 0===l?"sine":l;if(i.globalWindow&&(void 0!==i.globalWindow.AudioContext||void 0!==i.globalWindow.webkitAudioContext)){var d=new(i.globalWindow.AudioContext||i.globalWindow.webkitAudioContext),h=d.createGain(),f=d.createOscillator();f.type=p,f.frequency.value=u,f.connect(h),h.connect(d.destination),f.start(),f.stop(d.currentTime+s),h.gain.value=a}}},95700:function(e){"use strict";e.exports={newline:"новая строка|перенос|ентер",delete:"видалити",space:"пробел","Speech Recognize":"Распознавание речи",Sound:"Звук","Interim Results":"Проміжні результати"}}},function(e){return e(e.s=37873)}])}));
@@ -53,9 +53,10 @@ export declare class Async implements IAsync {
53
53
  * Get Promise status
54
54
  */
55
55
  promiseState(p: Promise<any>): Promise<'pending' | 'fulfilled' | 'rejected'>;
56
- private requestsIdle;
57
- private requestsRaf;
58
- private requestIdleCallbackNative;
56
+ private __requestsIdle;
57
+ private __controllers;
58
+ private __requestsRaf;
59
+ private __requestIdleCallbackNative;
59
60
  private __cancelIdleCallbackNative;
60
61
  requestIdleCallback(callback: IdleRequestCallback, options?: {
61
62
  timeout: number;
@@ -63,6 +64,15 @@ export declare class Async implements IAsync {
63
64
  requestIdlePromise(options?: {
64
65
  timeout: number;
65
66
  }): RejectablePromise<number>;
67
+ /**
68
+ * Try to use scheduler.postTask if it is available https://wicg.github.io/scheduling-apis/
69
+ */
70
+ schedulerPostTask<T = void>(task: () => T, options?: {
71
+ signal?: AbortSignal;
72
+ delay?: number;
73
+ priority?: 'background' | 'user-blocking' | 'user-visible';
74
+ }): Promise<T>;
75
+ schedulerYield(): Promise<void>;
66
76
  cancelIdleCallback(request: number): void;
67
77
  requestAnimationFrame(callback: FrameRequestCallback): number;
68
78
  cancelAnimationFrame(request: number): void;
@@ -21,9 +21,10 @@ export class Async {
21
21
  this.__callbacks = new Map();
22
22
  this.__queueMicrotaskNative = (_a = queueMicrotask === null || queueMicrotask === void 0 ? void 0 : queueMicrotask.bind(window)) !== null && _a !== void 0 ? _a : Promise.resolve().then.bind(Promise.resolve());
23
23
  this.promisesRejections = new Set();
24
- this.requestsIdle = new Set();
25
- this.requestsRaf = new Set();
26
- this.requestIdleCallbackNative = (_c = (_b = window['requestIdleCallback']) === null || _b === void 0 ? void 0 : _b.bind(window)) !== null && _c !== void 0 ? _c : ((callback, options) => {
24
+ this.__requestsIdle = new Set();
25
+ this.__controllers = new Set();
26
+ this.__requestsRaf = new Set();
27
+ this.__requestIdleCallbackNative = (_c = (_b = window['requestIdleCallback']) === null || _b === void 0 ? void 0 : _b.bind(window)) !== null && _c !== void 0 ? _c : ((callback, options) => {
27
28
  var _a;
28
29
  const start = Date.now();
29
30
  return this.setTimeout(() => {
@@ -253,8 +254,8 @@ export class Async {
253
254
  return Promise.race([p, t]).then(v => (v === t ? 'pending' : 'fulfilled'), () => 'rejected');
254
255
  }
255
256
  requestIdleCallback(callback, options = { timeout: 100 }) {
256
- const request = this.requestIdleCallbackNative(callback, options);
257
- this.requestsIdle.add(request);
257
+ const request = this.__requestIdleCallbackNative(callback, options);
258
+ this.__requestsIdle.add(request);
258
259
  return request;
259
260
  }
260
261
  requestIdlePromise(options) {
@@ -262,22 +263,69 @@ export class Async {
262
263
  const request = this.requestIdleCallback(() => res(request), options);
263
264
  });
264
265
  }
266
+ /**
267
+ * Try to use scheduler.postTask if it is available https://wicg.github.io/scheduling-apis/
268
+ */
269
+ schedulerPostTask(task, options = {
270
+ delay: 0,
271
+ priority: 'user-visible'
272
+ }) {
273
+ const controller = new AbortController();
274
+ if (options.signal) {
275
+ options.signal.addEventListener('abort', () => controller.abort());
276
+ }
277
+ this.__controllers.add(controller);
278
+ // @ts-ignore
279
+ if (typeof globalThis.scheduler !== 'undefined') {
280
+ const scheduler = globalThis.scheduler;
281
+ const promise = scheduler.postTask(task, {
282
+ ...options,
283
+ signal: controller.signal
284
+ });
285
+ promise
286
+ .finally(() => {
287
+ this.__controllers.delete(controller);
288
+ })
289
+ .catch(() => null);
290
+ return promise;
291
+ }
292
+ return this.promise((resolve, reject) => {
293
+ const timeout = this.setTimeout(() => {
294
+ try {
295
+ resolve(task());
296
+ }
297
+ catch (e) {
298
+ reject(e);
299
+ }
300
+ this.__controllers.delete(controller);
301
+ }, options.delay || 1);
302
+ controller.signal.addEventListener('abort', () => {
303
+ this.clearTimeout(timeout);
304
+ this.__controllers.delete(controller);
305
+ reject(abort());
306
+ });
307
+ });
308
+ }
309
+ schedulerYield() {
310
+ return this.schedulerPostTask(() => { }, { priority: 'user-visible' });
311
+ }
265
312
  cancelIdleCallback(request) {
266
- this.requestsIdle.delete(request);
313
+ this.__requestsIdle.delete(request);
267
314
  return this.__cancelIdleCallbackNative(request);
268
315
  }
269
316
  requestAnimationFrame(callback) {
270
317
  const request = requestAnimationFrame(callback);
271
- this.requestsRaf.add(request);
318
+ this.__requestsRaf.add(request);
272
319
  return request;
273
320
  }
274
321
  cancelAnimationFrame(request) {
275
- this.requestsRaf.delete(request);
322
+ this.__requestsRaf.delete(request);
276
323
  cancelAnimationFrame(request);
277
324
  }
278
325
  clear() {
279
- this.requestsIdle.forEach(key => this.cancelIdleCallback(key));
280
- this.requestsRaf.forEach(key => this.cancelAnimationFrame(key));
326
+ this.__requestsIdle.forEach(key => this.cancelIdleCallback(key));
327
+ this.__requestsRaf.forEach(key => this.cancelAnimationFrame(key));
328
+ this.__controllers.forEach(controller => controller.abort());
281
329
  this.timers.forEach(key => clearTimeout(this.timers.get(key)));
282
330
  this.timers.clear();
283
331
  this.promisesRejections.forEach(reject => reject());
@@ -3,7 +3,7 @@
3
3
  * Released under MIT see LICENSE.txt in the project root for license information.
4
4
  * Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
5
5
  */
6
- export const APP_VERSION = "4.5.9";
6
+ export const APP_VERSION = "4.5.12";
7
7
  // prettier-ignore
8
8
  export const ES = "es2020";
9
9
  export const IS_ES_MODERN = true;
@@ -21,17 +21,18 @@ export declare class LazyWalker extends Eventify<{
21
21
  private isWorked;
22
22
  private isFinished;
23
23
  constructor(async: IAsync, options?: {
24
- readonly timeout?: number;
25
24
  readonly whatToShow?: number;
26
25
  readonly reverse?: boolean;
27
26
  readonly timeoutChunkSize?: number;
27
+ readonly timeout?: number;
28
28
  });
29
29
  private idleId;
30
- private startIdleRequest;
30
+ private __schedulerController;
31
+ private _requestStarting;
31
32
  break(reason?: string): void;
32
33
  end(): void;
33
34
  private stop;
34
35
  destruct(): void;
35
- private workPerform;
36
+ private __workPerform;
36
37
  private visitNode;
37
38
  }
@@ -23,7 +23,7 @@ export class LazyWalker extends Eventify {
23
23
  }
24
24
  this.workNodes = Dom.eachGen(root, !this.options.reverse);
25
25
  this.isFinished = false;
26
- this.startIdleRequest();
26
+ this._requestStarting();
27
27
  return this;
28
28
  }
29
29
  constructor(async, options = {}) {
@@ -35,12 +35,16 @@ export class LazyWalker extends Eventify {
35
35
  this.isWorked = false;
36
36
  this.isFinished = false;
37
37
  this.idleId = 0;
38
+ this.__schedulerController = null;
38
39
  }
39
- startIdleRequest() {
40
- var _a;
41
- this.idleId = this.async.requestIdleCallback(this.workPerform, {
42
- timeout: (_a = this.options.timeout) !== null && _a !== void 0 ? _a : 10
43
- });
40
+ _requestStarting() {
41
+ this.__schedulerController = new AbortController();
42
+ this.async
43
+ .schedulerPostTask(this.__workPerform, {
44
+ delay: this.options.timeout,
45
+ signal: this.__schedulerController.signal
46
+ })
47
+ .catch(() => null);
44
48
  }
45
49
  break(reason) {
46
50
  if (this.isWorked) {
@@ -65,15 +69,13 @@ export class LazyWalker extends Eventify {
65
69
  super.destruct();
66
70
  this.stop();
67
71
  }
68
- workPerform(deadline) {
72
+ __workPerform() {
69
73
  var _a;
70
74
  if (this.workNodes) {
71
75
  this.isWorked = true;
72
76
  let count = 0;
73
77
  const chunkSize = (_a = this.options.timeoutChunkSize) !== null && _a !== void 0 ? _a : 50;
74
- while (!this.isFinished &&
75
- (deadline.timeRemaining() > 0 ||
76
- (deadline.didTimeout && count <= chunkSize))) {
78
+ while (!this.isFinished && count <= chunkSize) {
77
79
  const item = this.workNodes.next();
78
80
  count += 1;
79
81
  if (this.visitNode(item.value)) {
@@ -89,7 +91,7 @@ export class LazyWalker extends Eventify {
89
91
  this.end();
90
92
  }
91
93
  if (!this.isFinished) {
92
- this.startIdleRequest();
94
+ this._requestStarting();
93
95
  }
94
96
  }
95
97
  visitNode(nodeElm) {
@@ -104,4 +106,4 @@ export class LazyWalker extends Eventify {
104
106
  }
105
107
  __decorate([
106
108
  autobind
107
- ], LazyWalker.prototype, "workPerform", null);
109
+ ], LazyWalker.prototype, "__workPerform", null);
@@ -38,6 +38,12 @@ export interface IAsync extends IDestructible {
38
38
  timeout: number;
39
39
  }): RejectablePromise<number>;
40
40
  cancelIdleCallback(request: number): void;
41
+ schedulerPostTask<T = void>(task: () => T, options: {
42
+ delay?: number;
43
+ priority?: 'background' | 'user-blocking' | 'user-visible';
44
+ signal?: AbortSignal;
45
+ }): Promise<T>;
46
+ schedulerYield(): Promise<void>;
41
47
  /**
42
48
  * Smart wrapper for `requestAnimationFrame`
43
49
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jodit",
3
- "version": "4.5.9",
3
+ "version": "4.5.12",
4
4
  "description": "Jodit is an awesome and useful wysiwyg editor with filebrowser",
5
5
  "main": "esm/index.js",
6
6
  "types": "types/index.d.ts",
@@ -53,9 +53,10 @@ export declare class Async implements IAsync {
53
53
  * Get Promise status
54
54
  */
55
55
  promiseState(p: Promise<any>): Promise<'pending' | 'fulfilled' | 'rejected'>;
56
- private requestsIdle;
57
- private requestsRaf;
58
- private requestIdleCallbackNative;
56
+ private __requestsIdle;
57
+ private __controllers;
58
+ private __requestsRaf;
59
+ private __requestIdleCallbackNative;
59
60
  private __cancelIdleCallbackNative;
60
61
  requestIdleCallback(callback: IdleRequestCallback, options?: {
61
62
  timeout: number;
@@ -63,6 +64,15 @@ export declare class Async implements IAsync {
63
64
  requestIdlePromise(options?: {
64
65
  timeout: number;
65
66
  }): RejectablePromise<number>;
67
+ /**
68
+ * Try to use scheduler.postTask if it is available https://wicg.github.io/scheduling-apis/
69
+ */
70
+ schedulerPostTask<T = void>(task: () => T, options?: {
71
+ signal?: AbortSignal;
72
+ delay?: number;
73
+ priority?: 'background' | 'user-blocking' | 'user-visible';
74
+ }): Promise<T>;
75
+ schedulerYield(): Promise<void>;
66
76
  cancelIdleCallback(request: number): void;
67
77
  requestAnimationFrame(callback: FrameRequestCallback): number;
68
78
  cancelAnimationFrame(request: number): void;
@@ -21,17 +21,18 @@ export declare class LazyWalker extends Eventify<{
21
21
  private isWorked;
22
22
  private isFinished;
23
23
  constructor(async: IAsync, options?: {
24
- readonly timeout?: number;
25
24
  readonly whatToShow?: number;
26
25
  readonly reverse?: boolean;
27
26
  readonly timeoutChunkSize?: number;
27
+ readonly timeout?: number;
28
28
  });
29
29
  private idleId;
30
- private startIdleRequest;
30
+ private __schedulerController;
31
+ private _requestStarting;
31
32
  break(reason?: string): void;
32
33
  end(): void;
33
34
  private stop;
34
35
  destruct(): void;
35
- private workPerform;
36
+ private __workPerform;
36
37
  private visitNode;
37
38
  }
@@ -38,6 +38,12 @@ export interface IAsync extends IDestructible {
38
38
  timeout: number;
39
39
  }): RejectablePromise<number>;
40
40
  cancelIdleCallback(request: number): void;
41
+ schedulerPostTask<T = void>(task: () => T, options: {
42
+ delay?: number;
43
+ priority?: 'background' | 'user-blocking' | 'user-visible';
44
+ signal?: AbortSignal;
45
+ }): Promise<T>;
46
+ schedulerYield(): Promise<void>;
41
47
  /**
42
48
  * Smart wrapper for `requestAnimationFrame`
43
49
  */