jodit 4.7.5 → 4.7.6
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 +41 -0
- package/README.md +4 -18
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +8 -8
- package/es2015/jodit.js +85 -137
- package/es2015/jodit.min.js +7 -7
- package/es2015/plugins/debug/debug.css +1 -1
- 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 +9 -3
- package/es2015/plugins/speech-recognize/speech-recognize.min.js +2 -2
- package/es2018/jodit.fat.min.js +8 -8
- package/es2018/jodit.min.js +7 -7
- package/es2018/plugins/debug/debug.min.js +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.min.js +2 -2
- package/es2021/jodit.css +1 -1
- package/es2021/jodit.fat.min.js +9 -9
- package/es2021/jodit.js +85 -137
- package/es2021/jodit.min.js +8 -8
- package/es2021/plugins/debug/debug.css +1 -1
- 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 +9 -3
- 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 +10 -10
- package/es2021.en/jodit.js +85 -137
- package/es2021.en/jodit.min.js +9 -9
- package/es2021.en/plugins/debug/debug.css +1 -1
- 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 +9 -3
- 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 +86 -141
- package/es5/jodit.min.css +2 -2
- package/es5/jodit.min.js +2 -2
- package/es5/plugins/debug/debug.css +1 -1
- 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 +9 -3
- package/es5/plugins/speech-recognize/speech-recognize.min.js +2 -2
- package/es5/polyfills.fat.min.js +1 -1
- package/es5/polyfills.js +1 -1
- package/es5/polyfills.min.js +1 -1
- package/esm/core/constants.js +1 -1
- package/esm/core/decorators/autobind/autobind.d.ts +19 -1
- package/esm/core/decorators/autobind/autobind.js +40 -1
- package/esm/modules/file-browser/data-provider.js +2 -17
- package/esm/plugins/resize-handler/resize-handler.js +10 -5
- package/esm/plugins/size/size.js +8 -6
- package/esm/plugins/speech-recognize/helpers/recognize-manager.js +13 -9
- package/esm/tsconfig.json +1 -1
- package/package.json +1 -1
- package/types/core/decorators/autobind/autobind.d.ts +19 -1
- package/types/tsconfig.json +1 -1
|
@@ -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.7.
|
|
4
|
+
* Version: v4.7.6
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -418,9 +418,15 @@ class RecognizeManager extends jodit_core_event_emitter_eventify__WEBPACK_IMPORT
|
|
|
418
418
|
}
|
|
419
419
|
}
|
|
420
420
|
(0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(RecognizeManager, "_instances", new Set());
|
|
421
|
-
|
|
421
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
422
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.autobind
|
|
423
|
+
], RecognizeManager.prototype, "_onResults", null);
|
|
424
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
425
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.autobind
|
|
426
|
+
], RecognizeManager.prototype, "_onProgress", null);
|
|
427
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
422
428
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.autobind
|
|
423
|
-
], RecognizeManager);
|
|
429
|
+
], RecognizeManager.prototype, "_onError", null);
|
|
424
430
|
|
|
425
431
|
|
|
426
432
|
/***/ }),
|
|
@@ -1,8 +1,8 @@
|
|
|
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.7.
|
|
4
|
+
* Version: v4.7.6
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
8
|
-
((e,t)=>{if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var s=t();for(var i in s)("object"==typeof exports?exports:e)[i]=s[i]}})(self,()=>(self.webpackChunkjodit=self.webpackChunkjodit||[]).push([[882],{22227(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>'},31262(e,t,s){"use strict";s.r(t),s.d(t,{SpeechRecognizeNative:()=>p});var i=s(25045),o=s(31635),n=s(68616),r=s(23211),a=s(28077),
|
|
8
|
+
((e,t)=>{if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var s=t();for(var i in s)("object"==typeof exports?exports:e)[i]=s[i]}})(self,()=>(self.webpackChunkjodit=self.webpackChunkjodit||[]).push([[882],{22227(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>'},31262(e,t,s){"use strict";s.r(t),s.d(t,{SpeechRecognizeNative:()=>p});var i=s(25045),o=s(31635),n=s(68616),r=s(23211),a=s(28077),l=s(71125),h=s(91206);s(75143);var c=s(73302),u=s(86581),d=s(43219);class p extends h.Plugin{afterInit(e){let{commands:t}=e.o.speechRecognize;t&&((0,a.extendLang)(d),(0,l.keys)(t,!1).forEach(s=>{s.split("|").forEach(i=>{i=i.trim().toLowerCase(),this._commandToWord[i]=t[s];let o=e.i18n(i);o!==i&&o.split("|").forEach(e=>{this._commandToWord[e.trim().toLowerCase()]=t[s].trim()})})}))}beforeDestruct(e){r.Dom.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(()=>{r.Dom.safeRemove(this.messagePopup)},1e3),this.messagePopup.innerText=e+"|"}onSpeechRecognizeResult(e){this.j.async.clearTimeout(this.__hidePopupTimeout),r.Dom.safeRemove(this.messagePopup);let{j:t}=this,{s}=t;if(!this._checkCommand(e)){let{range:i}=s,o=s.current();if(s.isCollapsed()&&r.Dom.isText(o)&&r.Dom.isOrContains(t.editor,o)&&o.nodeValue){let n=o.nodeValue;o.nodeValue=n+(/[\u00A0 ]\uFEFF*$/.test(n)?"":" ")+e,i.setStartAfter(o),s.selectRange(i),t.synchronizeValues()}else s.insertHTML(e)}}_checkCommand(e){return e=e.toLowerCase().replace(/\./g,""),!!this._commandToWord[e]&&((0,u.execSpellCommand)(this.j,this._commandToWord[e]),!0)}constructor(...e){super(...e),(0,i._)(this,"buttons",[{group:"state",name:"speechRecognize"}]),(0,i._)(this,"messagePopup",void 0),(0,i._)(this,"__hidePopupTimeout",void 0),(0,i._)(this,"_commandToWord",{})}}(0,o.__decorate)([(0,n.watch)(":speechRecognizeProgressResult")],p.prototype,"onSpeechRecognizeProgressResult",null),(0,o.__decorate)([(0,n.watch)(":speechRecognizeResult")],p.prototype,"onSpeechRecognizeResult",null),c.Jodit.plugins.add("speech-recognize",p)},32560(e,t,s){"use strict";s.d(t,{sound:()=>n});var i=s(81937),o=s(94092);function n({sec:e=.1,frequency:t=o.PII,gain:s=.1,type:r="sine"}={}){if(!i.globalWindow||void 0===i.globalWindow.AudioContext&&void 0===i.globalWindow.webkitAudioContext)return;let a=new(i.globalWindow.AudioContext||i.globalWindow.webkitAudioContext),l=a.createGain(),h=a.createOscillator();h.type=r,h.frequency.value=t,h.connect(l),l.connect(a.destination),h.start(),h.stop(a.currentTime+e),l.gain.value=s}},43219(e,t,s){"use strict";s.r(t),s.d(t,{ar:()=>i,cs_cz:()=>i,de:()=>i,es:()=>i,fa:()=>i,fi:()=>i,fr:()=>i,he:()=>i,hu:()=>i,id:()=>i,it:()=>i,ja:()=>i,ko:()=>i,mn:()=>i,nl:()=>i,no:()=>i,pl:()=>i,pt_br:()=>i,ru:()=>i,tr:()=>i,ua:()=>i,zh_cn:()=>i,zh_tw:()=>i});var i=s(41324)},68097(e,t,s){"use strict";s.d(t,{RecognizeManager:()=>h});var i=s(25045),o=s(31635),n=s(84839),r=s(60216),a=s(32560),l=s(94092);class h extends r.Eventify{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}destruct(){this.stop(),h._instances.delete(this),super.destruct()}get isEnabled(){return this._isEnabled}start(){if(!this._isEnabled){this._isEnabled=!0,h._instances.forEach(e=>{e!==this&&e.stop()});try{this._api.start()}catch(e){this._onError(e),this.stop();return}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(l.PII),this.restart()}_onProgress(e){if(this._isEnabled&&(this.__interimResults="",e.results)){for(let t=0;t<e.results.length;t++){let s=e.results.item(t);if(s.length){let{transcript:e}=s.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(l.WARN),this.emit("pulse",!1),this.stop()}_makeSound(e){this.sound&&(0,a.sound)({frequency:e})}constructor(e,t){super(),(0,i._)(this,"async",void 0),(0,i._)(this,"_lang",void 0),(0,i._)(this,"_continuous",void 0),(0,i._)(this,"_interimResults",void 0),(0,i._)(this,"sound",void 0),(0,i._)(this,"_isEnabled",void 0),(0,i._)(this,"_restartTimeout",void 0),(0,i._)(this,"_onSpeechStart",void 0),(0,i._)(this,"_api",void 0),(0,i._)(this,"__interimResults",void 0),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(l.WARN)},5e3),this.emit("pulse",!0))},this.__interimResults="",this._api=t,h._instances.add(this)}}(0,i._)(h,"_instances",new Set),(0,o.__decorate)([n.autobind],h.prototype,"_onResults",null),(0,o.__decorate)([n.autobind],h.prototype,"_onProgress",null),(0,o.__decorate)([n.autobind],h.prototype,"_onError",null)},75143(e,t,s){"use strict";var i=s(22289),o=s(85932),n=s(7909),r=s(36400),a=s(29434),l=s(5266),h=s(97743),c=s(68097),u=s(22227),d=s.n(u);l.Config.prototype.speechRecognize={api:void 0!==h.SpeechRecognition?h.SpeechRecognition: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"}},a.Icon.set("speech-recognize",d()),l.Config.prototype.controls.speechRecognize={isVisible:e=>!!e.o.speechRecognize.api,isActive(e,t){let s=(0,r.dataBind)(e,"speech");return!!s?.isEnabled},isDisabled:e=>!e.o.speechRecognize.api,exec(e,t,{button:s,control:a}){let{api:l,lang:h,continuous:u,interimResults:d,sound:p}=e.o.speechRecognize;if(!l)return void e.alert("Speech recognize API unsupported in your browser");let _=(0,r.dataBind)(e,"speech");if(!_){let t=new l;(_=new c.RecognizeManager(e.async,t)).lang=(0,o.isString)(h)?h:(0,n.attr)(e.od.documentElement,"lang")??void 0,_.continuous=u,_.interimResults=d,_.sound=p,(0,r.dataBind)(e,"speech",_),_.on("pulse",e=>{s.setMod("pulse",e)}),_.on("result",t=>e.e.fire("speechRecognizeResult",t)),_.on("progress",t=>e.e.fire("speechRecognizeProgressResult",t)),_.on("error",t=>e.message.error(t)),s.hookStatus("beforeDestruct",()=>{(0,r.dataBind)(e,"speech",null),_.destruct()})}if(a.args){let e=a.args[0];if((0,i.isBoolean)(_[e])){_[e]=!_[e],_.isEnabled&&_.restart();return}}_.toggle(),_.isEnabled&&s.setMod("pulse",!0),s.state.activated=_.isEnabled},name:"speechRecognize",command:"toggleSpeechRecognize",tooltip:"Speech Recognize",list:{sound:"Sound",interimResults:"Interim Results"},childTemplate(e,t,s){let i=(0,r.dataBind)(e,"speech"),o=i?.[t]??e.o.speechRecognize[t];return`<span class='jodit-speech-recognize__list-item'><input ${o?"checked":""} class='jodit-checkbox' type='checkbox'> ${s}</span>`},mods:{stroke:!1}}},86581(e,t,s){"use strict";function i(e,t){let[s,i]=t.split("::");e.execCommand(s,null,i)}s.d(t,{execSpellCommand:()=>i})},94092(e,t,s){"use strict";s.d(t,{PII:()=>i,WARN:()=>o});let i=440,o=940},97743(e,t,s){"use strict";s.d(t,{SpeechRecognition:()=>o});var i=s(81937);let o=i.globalWindow?i.globalWindow.SpeechRecognition||i.globalWindow.webkitSpeechRecognition:void 0}},e=>e(e.s=31262)]));
|
package/es5/jodit.css
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
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.7.
|
|
4
|
+
* Version: v4.7.6
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
8
8
|
/*!
|
|
9
9
|
* jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
|
|
10
10
|
* Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
|
|
11
|
-
* Version: v4.7.
|
|
11
|
+
* Version: v4.7.6
|
|
12
12
|
* Url: https://xdsoft.net/jodit/
|
|
13
13
|
* License(s): MIT
|
|
14
14
|
*/
|