jodit 4.2.24 → 4.2.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -5
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +2 -2
- package/es2015/jodit.js +73 -21
- package/es2015/jodit.min.js +2 -2
- package/es2015/plugins/debug/debug.js +1 -1
- package/es2015/plugins/debug/debug.min.js +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.js +33 -7
- package/es2015/plugins/speech-recognize/speech-recognize.min.js +2 -2
- package/es2018/jodit.css +1 -1
- package/es2018/jodit.fat.min.js +2 -2
- package/es2018/jodit.js +73 -21
- package/es2018/jodit.min.js +2 -2
- package/es2018/plugins/debug/debug.js +1 -1
- package/es2018/plugins/debug/debug.min.js +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.js +33 -7
- package/es2018/plugins/speech-recognize/speech-recognize.min.js +2 -2
- package/es2021/jodit.css +1 -1
- package/es2021/jodit.fat.min.js +2 -2
- package/es2021/jodit.js +73 -21
- package/es2021/jodit.min.js +2 -2
- package/es2021/plugins/debug/debug.js +1 -1
- package/es2021/plugins/debug/debug.min.js +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.js +33 -7
- package/es2021/plugins/speech-recognize/speech-recognize.min.js +2 -2
- package/es2021.en/jodit.css +1 -1
- package/es2021.en/jodit.fat.min.js +2 -2
- package/es2021.en/jodit.js +8 -2
- package/es2021.en/jodit.min.js +2 -2
- package/es2021.en/plugins/debug/debug.js +1 -1
- package/es2021.en/plugins/debug/debug.min.js +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.js +3 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +2 -2
- package/es5/jodit.css +2 -2
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +73 -21
- package/es5/jodit.min.css +2 -2
- package/es5/jodit.min.js +2 -2
- package/es5/plugins/debug/debug.js +1 -1
- package/es5/plugins/debug/debug.min.js +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.js +33 -7
- package/es5/plugins/speech-recognize/speech-recognize.min.js +2 -2
- package/esm/core/constants.js +1 -1
- package/esm/langs/ua.d.ts +212 -0
- package/esm/langs/ua.js +225 -0
- package/esm/languages.js +2 -0
- package/esm/plugins/line-height/langs/index.d.ts +2 -1
- package/esm/plugins/line-height/langs/index.js +2 -1
- package/esm/plugins/line-height/langs/ua.d.ts +4 -0
- package/esm/plugins/line-height/langs/ua.js +9 -0
- package/esm/plugins/speech-recognize/langs/index.d.ts +2 -1
- package/esm/plugins/speech-recognize/langs/index.js +2 -1
- package/esm/plugins/speech-recognize/langs/ua.d.ts +9 -0
- package/esm/plugins/speech-recognize/langs/ua.js +14 -0
- package/esm/plugins/spellcheck/langs/index.d.ts +2 -1
- package/esm/plugins/spellcheck/langs/index.js +2 -1
- package/esm/plugins/spellcheck/langs/ua.d.ts +1 -0
- package/esm/plugins/spellcheck/langs/ua.js +9 -0
- package/package.json +1 -1
- package/types/langs/ua.d.ts +212 -0
- package/types/plugins/line-height/langs/index.d.ts +2 -1
- package/types/plugins/line-height/langs/ua.d.ts +4 -0
- package/types/plugins/speech-recognize/langs/index.d.ts +2 -1
- package/types/plugins/speech-recognize/langs/ua.d.ts +9 -0
- package/types/plugins/spellcheck/langs/index.d.ts +2 -1
- package/types/plugins/spellcheck/langs/ua.d.ts +1 -0
|
@@ -1,7 +1,7 @@
|
|
|
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.2.
|
|
4
|
+
* Version: v4.2.25
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -681,8 +681,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
681
681
|
/* harmony export */ pt_br: function() { return /* reexport module object */ _pt_br_js__WEBPACK_IMPORTED_MODULE_16__; },
|
|
682
682
|
/* harmony export */ ru: function() { return /* reexport module object */ _ru_js__WEBPACK_IMPORTED_MODULE_17__; },
|
|
683
683
|
/* harmony export */ tr: function() { return /* reexport module object */ _tr_js__WEBPACK_IMPORTED_MODULE_18__; },
|
|
684
|
-
/* harmony export */
|
|
685
|
-
/* harmony export */
|
|
684
|
+
/* harmony export */ ua: function() { return /* reexport module object */ _ua_js__WEBPACK_IMPORTED_MODULE_19__; },
|
|
685
|
+
/* harmony export */ zh_cn: function() { return /* reexport module object */ _zh_cn_js__WEBPACK_IMPORTED_MODULE_20__; },
|
|
686
|
+
/* harmony export */ zh_tw: function() { return /* reexport module object */ _zh_tw_js__WEBPACK_IMPORTED_MODULE_21__; }
|
|
686
687
|
/* harmony export */ });
|
|
687
688
|
/* harmony import */ var _ar_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(61593);
|
|
688
689
|
/* harmony import */ var _ar_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ar_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
@@ -722,10 +723,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
722
723
|
/* harmony import */ var _ru_js__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_ru_js__WEBPACK_IMPORTED_MODULE_17__);
|
|
723
724
|
/* harmony import */ var _tr_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(48948);
|
|
724
725
|
/* harmony import */ var _tr_js__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(_tr_js__WEBPACK_IMPORTED_MODULE_18__);
|
|
725
|
-
/* harmony import */ var
|
|
726
|
-
/* harmony import */ var
|
|
727
|
-
/* harmony import */ var
|
|
728
|
-
/* harmony import */ var
|
|
726
|
+
/* harmony import */ var _ua_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(95700);
|
|
727
|
+
/* harmony import */ var _ua_js__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(_ua_js__WEBPACK_IMPORTED_MODULE_19__);
|
|
728
|
+
/* harmony import */ var _zh_cn_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(84370);
|
|
729
|
+
/* harmony import */ var _zh_cn_js__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(_zh_cn_js__WEBPACK_IMPORTED_MODULE_20__);
|
|
730
|
+
/* harmony import */ var _zh_tw_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(56646);
|
|
731
|
+
/* harmony import */ var _zh_tw_js__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(_zh_tw_js__WEBPACK_IMPORTED_MODULE_21__);
|
|
729
732
|
/*!
|
|
730
733
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
731
734
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -754,6 +757,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
754
757
|
|
|
755
758
|
|
|
756
759
|
|
|
760
|
+
|
|
757
761
|
|
|
758
762
|
|
|
759
763
|
/***/ }),
|
|
@@ -954,6 +958,28 @@ module.exports = {
|
|
|
954
958
|
};
|
|
955
959
|
|
|
956
960
|
|
|
961
|
+
/***/ }),
|
|
962
|
+
|
|
963
|
+
/***/ 95700:
|
|
964
|
+
/***/ (function(module) {
|
|
965
|
+
|
|
966
|
+
"use strict";
|
|
967
|
+
|
|
968
|
+
/*!
|
|
969
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
970
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
971
|
+
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
972
|
+
*/
|
|
973
|
+
module.exports = {
|
|
974
|
+
newline: 'новая строка|перенос|ентер',
|
|
975
|
+
delete: 'видалити',
|
|
976
|
+
space: 'пробел',
|
|
977
|
+
'Speech Recognize': 'Распознавание речи',
|
|
978
|
+
Sound: 'Звук',
|
|
979
|
+
'Interim Results': 'Проміжні результати'
|
|
980
|
+
};
|
|
981
|
+
|
|
982
|
+
|
|
957
983
|
/***/ }),
|
|
958
984
|
|
|
959
985
|
/***/ 84370:
|
|
@@ -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.2.
|
|
4
|
+
* Version: v4.2.25
|
|
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 s in n)("object"==typeof exports?exports:e)[s]=n[s]}}(self,(function(){return(self.webpackChunkjodit=self.webpackChunkjodit||[]).push([[882],{71096:function(e,t,n){"use strict";var s=n(9810),i=n(98253),o=n(26150),r=n(72197),u=n(931),c=n(36115),a=n(71722),l=n(93676),p=n(22227),h=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",h()),c.T.prototype.controls.speechRecognize={isVisible(e){return Boolean(e.o.speechRecognize.api)},isActive(e,t){const n=(0,r.m)(e,"speech");return Boolean(null==n?void 0:n.isEnabled)},isDisabled(e){return!e.o.speechRecognize.api},exec(e,t,{button:n,control:u}){var c;const{api:a,lang:p,continuous:h,interimResults:d,sound:m}=e.o.speechRecognize;if(!a)return void e.alert("Speech recognize API unsupported in your browser");let f=(0,r.m)(e,"speech");if(!f){const t=new a;f=new l.g(e.async,t),f.lang=(0,i.K)(p)?p:null!==(c=(0,o.C)(e.od.documentElement,"lang"))&&void 0!==c?c:void 0,f.continuous=h,f.interimResults=d,f.sound=m,(0,r.m)(e,"speech",f),f.on("pulse",(e=>{n.setMod("pulse",e)})),f.on("result",(t=>e.e.fire("speechRecognizeResult",t))),f.on("progress",(t=>e.e.fire("speechRecognizeProgressResult",t))),f.on("error",(t=>e.message.error(t))),n.hookStatus("beforeDestruct",(()=>{(0,r.m)(e,"speech",null),f.destruct()}))}if(u.args){const e=u.args[0];if((0,s.L)(f[e]))return f[e]=!f[e],void(f.isEnabled&&f.restart())}f.toggle(),f.isEnabled&&n.setMod("pulse",!0),n.state.activated=f.isEnabled},name:"speechRecognize",command:"toggleSpeechRecognize",tooltip:"Speech Recognize",list:{sound:"Sound",interimResults:"Interim Results"},childTemplate(e,t,n){var s;const i=(0,r.m)(e,"speech");return`<span class='jodit-speech-recognize__list-item'><input ${(null!==(s=null==i?void 0:i[t])&&void 0!==s?s:e.o.speechRecognize[t])?"checked":""} class='jodit-checkbox' type='checkbox'> ${n}</span>`},mods:{stroke:!1}}},81629:function(e,t,n){"use strict";n.d(t,{N:function(){return s},Z:function(){return i}});const s=440,i=940},71722:function(e,t,n){"use strict";n.d(t,{o:function(){return s}});const s=window.SpeechRecognition||window.webkitSpeechRecognition},50834:function(e,t,n){"use strict";function s(e,t){const[n,s]=t.split("::");e.execCommand(n,null,s)}n.d(t,{F:function(){return s}})},93676:function(e,t,n){"use strict";n.d(t,{g:function(){return a}});var s,i=n(31635),o=n(22664),r=n(43431),u=n(95473),c=n(81629);let a=s=class e extends r.h{set lang(e){this._lang=e,this._api.lang=e}get lang(){return this._lang}set continuous(e){this._continuous=e,this._api.continuous=e}get continuous(){return this._continuous}set interimResults(e){this._interimResults=e,this._api.interimResults=e}get interimResults(){return this._interimResults}constructor(e,t){super(),this.async=e,this._continuous=!1,this._interimResults=!1,this.sound=!0,this._isEnabled=!1,this._restartTimeout=0,this._onSpeechStart=e=>{this._isEnabled&&(this.async.clearTimeout(this._restartTimeout),this._restartTimeout=this.async.setTimeout((()=>{this.restart(),this.emit("pulse",!1),this._makeSound(c.Z)}),5e3),this.emit("pulse",!0))},this.__interimResults="",this._api=t,s._instances.add(this)}destruct(){this.stop(),s._instances.delete(this),super.destruct()}get isEnabled(){return this._isEnabled}start(){if(!this._isEnabled){this._isEnabled=!0,s._instances.forEach((e=>{e!==this&&e.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)}}stop(){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))}toggle(){this._isEnabled?this.stop():this.start()}restart(){this.stop(),this.start()}__on(e,t){return this._api.addEventListener(e,t),this}__off(e,t){return this._api.removeEventListener(e,t),this}_onResults(e){this.emit("pulse",!1),this.emit("result",this.__interimResults),this.__interimResults="",this._makeSound(c.N),this.restart()}_onProgress(e){if(this._isEnabled&&(this.__interimResults="",e.results)){for(let t=0;e.results.length>t;t++){const n=e.results.item(t);if(n.length){const{transcript:e}=n.item(0);this.__interimResults+=e}}this.__interimResults&&this.emit("progress",this.__interimResults)}}_onError(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(c.Z),this.emit("pulse",!1),this.stop()}_makeSound(e){this.sound&&(0,u.s)({frequency:e})}};a._instances=new Set,a=s=(0,i.Cg)([o.autobind],a)},95473:function(e,t,n){"use strict";n.d(t,{s:function(){return i}});var s=n(81629);function i({sec:e=.1,frequency:t=s.N,gain:n=.1,type:i="sine"}={}){if(void 0===window.AudioContext&&void 0===window.webkitAudioContext)return;const o=new(window.AudioContext||window.webkitAudioContext),r=o.createGain(),u=o.createOscillator();u.type=i,u.frequency.value=t,u.connect(r),r.connect(o.destination),u.start(),u.stop(o.currentTime+e),r.gain.value=n}},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 s},cs_cz:function(){return i},de:function(){return o},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 h},it:function(){return d},ja:function(){return m},ko:function(){return f},mn:function(){return g},nl:function(){return R},pl:function(){return _},pt_br:function(){return S},ru:function(){return w},tr:function(){return z},zh_cn:function(){return v},zh_tw:function(){return b}});var s=n(61593),i=n(64458),o=n(89601),r=n(87710),u=n(15603),c=n(84059),a=n(13958),l=n(18717),p=n(14765),h=n(77995),d=n(92315),m=n(54711),f=n(68632),g=n(76769),R=n(3424),_=n(85454),S=n(64149),w=n(16491),z=n(48948),v=n(84370),b=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"}},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 h}});var s=n(31635),i=n(66927),o=n(55186),r=n(56298),u=n(84976),c=n(71005),a=(n(71096),n(46173)),l=n(50834),p=n(25202);class h extends c.k{constructor(){super(...arguments),this.buttons=[{group:"state",name:"speechRecognize"}],this._commandToWord={}}afterInit(e){const{commands:t}=e.o.speechRecognize;t&&((0,r.JW)(p),(0,u.HP)(t,!1).forEach((n=>{n.split("|").forEach((s=>{s=s.trim().toLowerCase(),this._commandToWord[s]=t[n];const i=e.i18n(s);i!==s&&i.split("|").forEach((e=>{this._commandToWord[e.trim().toLowerCase()]=t[n].trim()}))}))})))}beforeDestruct(e){o.J.safeRemove(this.messagePopup)}onSpeechRecognizeProgressResult(e){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((()=>{o.J.safeRemove(this.messagePopup)}),1e3),this.messagePopup.innerText=e+"|"}onSpeechRecognizeResult(e){this.j.async.clearTimeout(this.__hidePopupTimeout),o.J.safeRemove(this.messagePopup);const{j:t}=this,{s:n}=t;if(!this._checkCommand(e)){const{range:s}=n,i=n.current();if(n.isCollapsed()&&o.J.isText(i)&&o.J.isOrContains(t.editor,i)&&i.nodeValue){const o=i.nodeValue;i.nodeValue=o+(/[\u00A0 ]\uFEFF*$/.test(o)?"":" ")+e,s.setStartAfter(i),n.selectRange(s),t.synchronizeValues()}else n.insertHTML(e)}}_checkCommand(e){return e=e.toLowerCase().replace(/\./g,""),!!this._commandToWord[e]&&((0,l.F)(this.j,this._commandToWord[e]),!0)}}(0,s.Cg)([(0,i.w)(":speechRecognizeProgressResult")],h.prototype,"onSpeechRecognizeProgressResult",null),(0,s.Cg)([(0,i.w)(":speechRecognizeResult")],h.prototype,"onSpeechRecognizeResult",null),a.x.plugins.add("speech-recognize",h)},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 s in n)("object"==typeof exports?exports:e)[s]=n[s]}}(self,(function(){return(self.webpackChunkjodit=self.webpackChunkjodit||[]).push([[882],{71096:function(e,t,n){"use strict";var s=n(9810),i=n(98253),o=n(26150),r=n(72197),u=n(931),c=n(36115),l=n(71722),a=n(93676),p=n(22227),h=n.n(p);c.T.prototype.speechRecognize={api:void 0!==l.o?l.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",h()),c.T.prototype.controls.speechRecognize={isVisible(e){return Boolean(e.o.speechRecognize.api)},isActive(e,t){const n=(0,r.m)(e,"speech");return Boolean(null==n?void 0:n.isEnabled)},isDisabled(e){return!e.o.speechRecognize.api},exec(e,t,{button:n,control:u}){var c;const{api:l,lang:p,continuous:h,interimResults:d,sound:m}=e.o.speechRecognize;if(!l)return void e.alert("Speech recognize API unsupported in your browser");let f=(0,r.m)(e,"speech");if(!f){const t=new l;f=new a.g(e.async,t),f.lang=(0,i.K)(p)?p:null!==(c=(0,o.C)(e.od.documentElement,"lang"))&&void 0!==c?c:void 0,f.continuous=h,f.interimResults=d,f.sound=m,(0,r.m)(e,"speech",f),f.on("pulse",(e=>{n.setMod("pulse",e)})),f.on("result",(t=>e.e.fire("speechRecognizeResult",t))),f.on("progress",(t=>e.e.fire("speechRecognizeProgressResult",t))),f.on("error",(t=>e.message.error(t))),n.hookStatus("beforeDestruct",(()=>{(0,r.m)(e,"speech",null),f.destruct()}))}if(u.args){const e=u.args[0];if((0,s.L)(f[e]))return f[e]=!f[e],void(f.isEnabled&&f.restart())}f.toggle(),f.isEnabled&&n.setMod("pulse",!0),n.state.activated=f.isEnabled},name:"speechRecognize",command:"toggleSpeechRecognize",tooltip:"Speech Recognize",list:{sound:"Sound",interimResults:"Interim Results"},childTemplate(e,t,n){var s;const i=(0,r.m)(e,"speech");return`<span class='jodit-speech-recognize__list-item'><input ${(null!==(s=null==i?void 0:i[t])&&void 0!==s?s:e.o.speechRecognize[t])?"checked":""} class='jodit-checkbox' type='checkbox'> ${n}</span>`},mods:{stroke:!1}}},81629:function(e,t,n){"use strict";n.d(t,{N:function(){return s},Z:function(){return i}});const s=440,i=940},71722:function(e,t,n){"use strict";n.d(t,{o:function(){return s}});const s=window.SpeechRecognition||window.webkitSpeechRecognition},50834:function(e,t,n){"use strict";function s(e,t){const[n,s]=t.split("::");e.execCommand(n,null,s)}n.d(t,{F:function(){return s}})},93676:function(e,t,n){"use strict";n.d(t,{g:function(){return l}});var s,i=n(31635),o=n(22664),r=n(43431),u=n(95473),c=n(81629);let l=s=class e extends r.h{set lang(e){this._lang=e,this._api.lang=e}get lang(){return this._lang}set continuous(e){this._continuous=e,this._api.continuous=e}get continuous(){return this._continuous}set interimResults(e){this._interimResults=e,this._api.interimResults=e}get interimResults(){return this._interimResults}constructor(e,t){super(),this.async=e,this._continuous=!1,this._interimResults=!1,this.sound=!0,this._isEnabled=!1,this._restartTimeout=0,this._onSpeechStart=e=>{this._isEnabled&&(this.async.clearTimeout(this._restartTimeout),this._restartTimeout=this.async.setTimeout((()=>{this.restart(),this.emit("pulse",!1),this._makeSound(c.Z)}),5e3),this.emit("pulse",!0))},this.__interimResults="",this._api=t,s._instances.add(this)}destruct(){this.stop(),s._instances.delete(this),super.destruct()}get isEnabled(){return this._isEnabled}start(){if(!this._isEnabled){this._isEnabled=!0,s._instances.forEach((e=>{e!==this&&e.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)}}stop(){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))}toggle(){this._isEnabled?this.stop():this.start()}restart(){this.stop(),this.start()}__on(e,t){return this._api.addEventListener(e,t),this}__off(e,t){return this._api.removeEventListener(e,t),this}_onResults(e){this.emit("pulse",!1),this.emit("result",this.__interimResults),this.__interimResults="",this._makeSound(c.N),this.restart()}_onProgress(e){if(this._isEnabled&&(this.__interimResults="",e.results)){for(let t=0;e.results.length>t;t++){const n=e.results.item(t);if(n.length){const{transcript:e}=n.item(0);this.__interimResults+=e}}this.__interimResults&&this.emit("progress",this.__interimResults)}}_onError(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(c.Z),this.emit("pulse",!1),this.stop()}_makeSound(e){this.sound&&(0,u.s)({frequency:e})}};l._instances=new Set,l=s=(0,i.Cg)([o.autobind],l)},95473:function(e,t,n){"use strict";n.d(t,{s:function(){return i}});var s=n(81629);function i({sec:e=.1,frequency:t=s.N,gain:n=.1,type:i="sine"}={}){if(void 0===window.AudioContext&&void 0===window.webkitAudioContext)return;const o=new(window.AudioContext||window.webkitAudioContext),r=o.createGain(),u=o.createOscillator();u.type=i,u.frequency.value=t,u.connect(r),r.connect(o.destination),u.start(),u.stop(o.currentTime+e),r.gain.value=n}},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 s},cs_cz:function(){return i},de:function(){return o},es:function(){return r},fa:function(){return u},fi:function(){return c},fr:function(){return l},he:function(){return a},hu:function(){return p},id:function(){return h},it:function(){return d},ja:function(){return m},ko:function(){return f},mn:function(){return g},nl:function(){return R},pl:function(){return _},pt_br:function(){return S},ru:function(){return w},tr:function(){return z},ua:function(){return v},zh_cn:function(){return b},zh_tw:function(){return x}});var s=n(61593),i=n(64458),o=n(89601),r=n(87710),u=n(15603),c=n(84059),l=n(13958),a=n(18717),p=n(14765),h=n(77995),d=n(92315),m=n(54711),f=n(68632),g=n(76769),R=n(3424),_=n(85454),S=n(64149),w=n(16491),z=n(48948),v=n(95700),b=n(84370),x=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 h}});var s=n(31635),i=n(66927),o=n(55186),r=n(56298),u=n(84976),c=n(71005),l=(n(71096),n(46173)),a=n(50834),p=n(25202);class h extends c.k{constructor(){super(...arguments),this.buttons=[{group:"state",name:"speechRecognize"}],this._commandToWord={}}afterInit(e){const{commands:t}=e.o.speechRecognize;t&&((0,r.JW)(p),(0,u.HP)(t,!1).forEach((n=>{n.split("|").forEach((s=>{s=s.trim().toLowerCase(),this._commandToWord[s]=t[n];const i=e.i18n(s);i!==s&&i.split("|").forEach((e=>{this._commandToWord[e.trim().toLowerCase()]=t[n].trim()}))}))})))}beforeDestruct(e){o.J.safeRemove(this.messagePopup)}onSpeechRecognizeProgressResult(e){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((()=>{o.J.safeRemove(this.messagePopup)}),1e3),this.messagePopup.innerText=e+"|"}onSpeechRecognizeResult(e){this.j.async.clearTimeout(this.__hidePopupTimeout),o.J.safeRemove(this.messagePopup);const{j:t}=this,{s:n}=t;if(!this._checkCommand(e)){const{range:s}=n,i=n.current();if(n.isCollapsed()&&o.J.isText(i)&&o.J.isOrContains(t.editor,i)&&i.nodeValue){const o=i.nodeValue;i.nodeValue=o+(/[\u00A0 ]\uFEFF*$/.test(o)?"":" ")+e,s.setStartAfter(i),n.selectRange(s),t.synchronizeValues()}else n.insertHTML(e)}}_checkCommand(e){return e=e.toLowerCase().replace(/\./g,""),!!this._commandToWord[e]&&((0,a.F)(this.j,this._commandToWord[e]),!0)}}(0,s.Cg)([(0,i.w)(":speechRecognizeProgressResult")],h.prototype,"onSpeechRecognizeProgressResult",null),(0,s.Cg)([(0,i.w)(":speechRecognizeResult")],h.prototype,"onSpeechRecognizeResult",null),l.x.plugins.add("speech-recognize",h)},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)}])}));
|
package/es2021/jodit.css
CHANGED