jodit 4.2.19 → 4.2.22
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 +16 -5
- package/es2015/jodit.css +47 -1
- package/es2015/jodit.fat.min.css +1 -1
- package/es2015/jodit.fat.min.js +2 -2
- package/es2015/jodit.js +75 -63
- package/es2015/jodit.min.css +1 -1
- 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 +3 -2
- package/es2015/plugins/speech-recognize/speech-recognize.js +98 -77
- package/es2015/plugins/speech-recognize/speech-recognize.min.css +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.min.js +2 -2
- package/es2018/jodit.css +47 -1
- package/es2018/jodit.fat.min.css +1 -1
- package/es2018/jodit.fat.min.js +2 -2
- package/es2018/jodit.js +75 -63
- package/es2018/jodit.min.css +1 -1
- 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 +3 -2
- package/es2018/plugins/speech-recognize/speech-recognize.js +98 -77
- package/es2018/plugins/speech-recognize/speech-recognize.min.css +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.min.js +2 -2
- package/es2021/jodit.css +47 -1
- package/es2021/jodit.fat.min.css +1 -1
- package/es2021/jodit.fat.min.js +2 -2
- package/es2021/jodit.js +75 -63
- package/es2021/jodit.min.css +1 -1
- 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 +3 -2
- package/es2021/plugins/speech-recognize/speech-recognize.js +98 -77
- package/es2021/plugins/speech-recognize/speech-recognize.min.css +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.min.js +2 -2
- package/es2021.en/jodit.css +47 -1
- package/es2021.en/jodit.fat.min.css +1 -1
- package/es2021.en/jodit.fat.min.js +2 -2
- package/es2021.en/jodit.js +75 -63
- package/es2021.en/jodit.min.css +1 -1
- 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 +3 -2
- package/es2021.en/plugins/speech-recognize/speech-recognize.js +98 -77
- package/es2021.en/plugins/speech-recognize/speech-recognize.min.css +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +2 -2
- package/es5/jodit.css +77 -2
- package/es5/jodit.fat.min.css +1 -1
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +78 -62
- package/es5/jodit.min.css +3 -3
- 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 +3 -2
- package/es5/plugins/speech-recognize/speech-recognize.js +99 -79
- package/es5/plugins/speech-recognize/speech-recognize.min.css +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.min.js +2 -2
- package/esm/core/constants.js +1 -1
- package/esm/core/ui/button/button/button.d.ts +1 -0
- package/esm/core/ui/button/button/button.js +7 -0
- package/esm/core/ui/button/tooltip/tooltip.d.ts +3 -4
- package/esm/core/ui/button/tooltip/tooltip.js +44 -44
- package/esm/modules/toolbar/button/button.d.ts +1 -0
- package/esm/modules/widget/tabs/tabs.js +21 -16
- package/esm/plugins/speech-recognize/config.d.ts +1 -1
- package/esm/plugins/speech-recognize/config.js +13 -5
- package/esm/plugins/speech-recognize/helpers/recognize-manager.d.ts +3 -2
- package/esm/plugins/speech-recognize/helpers/recognize-manager.js +45 -31
- package/esm/plugins/speech-recognize/interface.d.ts +1 -0
- package/esm/plugins/speech-recognize/speech-recognize.d.ts +5 -1
- package/esm/plugins/speech-recognize/speech-recognize.js +17 -17
- package/esm/types/ui.d.ts +1 -0
- package/package.json +1 -1
- package/types/core/ui/button/button/button.d.ts +1 -0
- package/types/core/ui/button/tooltip/tooltip.d.ts +3 -4
- package/types/modules/toolbar/button/button.d.ts +1 -0
- package/types/plugins/speech-recognize/config.d.ts +1 -1
- package/types/plugins/speech-recognize/helpers/recognize-manager.d.ts +3 -2
- package/types/plugins/speech-recognize/interface.d.ts +1 -0
- package/types/plugins/speech-recognize/speech-recognize.d.ts +5 -1
- package/types/types/ui.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.22
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -33,10 +33,11 @@ svg.jodit-icon_speechRecognize {
|
|
|
33
33
|
position: absolute;
|
|
34
34
|
top: 50%;
|
|
35
35
|
left: 50%;
|
|
36
|
-
padding:
|
|
36
|
+
padding: 8px 16px;
|
|
37
37
|
border-radius: 8px;
|
|
38
38
|
background-color: rgba(240, 240, 240, 0.4);
|
|
39
39
|
font-size: 32px;
|
|
40
|
+
line-height: 1.5;
|
|
40
41
|
transform: translate(-50%, -50%);
|
|
41
42
|
}
|
|
42
43
|
|
|
@@ -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.22
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -43,9 +43,9 @@ return (self["webpackChunkjodit"] = self["webpackChunkjodit"] || []).push([[882]
|
|
|
43
43
|
|
|
44
44
|
|
|
45
45
|
jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.speechRecognize = {
|
|
46
|
-
api: _helpers_api__WEBPACK_IMPORTED_MODULE_3__/* .SpeechRecognition */ .o,
|
|
46
|
+
api: typeof _helpers_api__WEBPACK_IMPORTED_MODULE_3__/* .SpeechRecognition */ .o !== 'undefined' ? _helpers_api__WEBPACK_IMPORTED_MODULE_3__/* .SpeechRecognition */ .o : null,
|
|
47
47
|
sound: true,
|
|
48
|
-
continuous:
|
|
48
|
+
continuous: false,
|
|
49
49
|
interimResults: true,
|
|
50
50
|
commands: {
|
|
51
51
|
'newline|enter': 'enter',
|
|
@@ -63,6 +63,9 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.speechRecogn
|
|
|
63
63
|
};
|
|
64
64
|
jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_1__/* .Icon */ .I.set('speech-recognize', (_speech_recognize_svg__WEBPACK_IMPORTED_MODULE_5___default()));
|
|
65
65
|
jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.controls.speechRecognize = {
|
|
66
|
+
isVisible(j) {
|
|
67
|
+
return Boolean(j.o.speechRecognize.api);
|
|
68
|
+
},
|
|
66
69
|
isActive(jodit, _) {
|
|
67
70
|
const api = (0,jodit_core_helpers_utils_data_bind__WEBPACK_IMPORTED_MODULE_0__/* .dataBind */ .m)(jodit, 'speech');
|
|
68
71
|
return Boolean(api?.isEnabled);
|
|
@@ -71,14 +74,14 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.controls.spe
|
|
|
71
74
|
return !jodit.o.speechRecognize.api;
|
|
72
75
|
},
|
|
73
76
|
exec(jodit, current, { button, control }) {
|
|
74
|
-
const { api:
|
|
75
|
-
if (!
|
|
77
|
+
const { api: ApiConstructor, lang, continuous, interimResults, sound } = jodit.o.speechRecognize;
|
|
78
|
+
if (!ApiConstructor) {
|
|
76
79
|
jodit.alert('Speech recognize API unsupported in your browser');
|
|
77
80
|
return;
|
|
78
81
|
}
|
|
79
82
|
let api = (0,jodit_core_helpers_utils_data_bind__WEBPACK_IMPORTED_MODULE_0__/* .dataBind */ .m)(jodit, 'speech');
|
|
80
83
|
if (!api) {
|
|
81
|
-
const nativeApi = new
|
|
84
|
+
const nativeApi = new ApiConstructor();
|
|
82
85
|
api = new _helpers_recognize_manager__WEBPACK_IMPORTED_MODULE_4__/* .RecognizeManager */ .g(jodit.async, nativeApi);
|
|
83
86
|
api.lang = lang;
|
|
84
87
|
api.continuous = continuous;
|
|
@@ -90,7 +93,9 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.controls.spe
|
|
|
90
93
|
});
|
|
91
94
|
api.on('result', (text) => jodit.e.fire('speechRecognizeResult', text));
|
|
92
95
|
api.on('progress', (text) => jodit.e.fire('speechRecognizeProgressResult', text));
|
|
96
|
+
api.on('error', (text) => jodit.message.error(text));
|
|
93
97
|
button.hookStatus('beforeDestruct', () => {
|
|
98
|
+
(0,jodit_core_helpers_utils_data_bind__WEBPACK_IMPORTED_MODULE_0__/* .dataBind */ .m)(jodit, 'speech', null);
|
|
94
99
|
api.destruct();
|
|
95
100
|
});
|
|
96
101
|
}
|
|
@@ -105,6 +110,9 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.controls.spe
|
|
|
105
110
|
}
|
|
106
111
|
}
|
|
107
112
|
api.toggle();
|
|
113
|
+
if (api.isEnabled) {
|
|
114
|
+
button.setMod('pulse', true);
|
|
115
|
+
}
|
|
108
116
|
button.state.activated = api.isEnabled;
|
|
109
117
|
},
|
|
110
118
|
name: 'speechRecognize',
|
|
@@ -252,7 +260,7 @@ let RecognizeManager = RecognizeManager_1 = class RecognizeManager extends jodit
|
|
|
252
260
|
}, 5000);
|
|
253
261
|
this.emit('pulse', true);
|
|
254
262
|
};
|
|
255
|
-
this.
|
|
263
|
+
this.__interimResults = '';
|
|
256
264
|
this._api = api;
|
|
257
265
|
RecognizeManager_1._instances.add(this);
|
|
258
266
|
}
|
|
@@ -274,23 +282,29 @@ let RecognizeManager = RecognizeManager_1 = class RecognizeManager extends jodit
|
|
|
274
282
|
instance.stop();
|
|
275
283
|
}
|
|
276
284
|
});
|
|
277
|
-
|
|
285
|
+
try {
|
|
286
|
+
this._api.start();
|
|
287
|
+
}
|
|
288
|
+
catch (e) {
|
|
289
|
+
this._onError(e);
|
|
290
|
+
this.stop();
|
|
291
|
+
return;
|
|
292
|
+
}
|
|
278
293
|
this.__on('speechstart', this._onSpeechStart)
|
|
279
294
|
.__on('error', this._onError)
|
|
280
|
-
.__on('result', this.
|
|
295
|
+
.__on('result', this._onProgress)
|
|
296
|
+
.__on('end', this._onResults);
|
|
281
297
|
}
|
|
282
298
|
stop() {
|
|
283
299
|
if (!this._isEnabled) {
|
|
284
300
|
return;
|
|
285
301
|
}
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
this._api.stop();
|
|
289
|
-
}
|
|
290
|
-
catch { }
|
|
302
|
+
this._api.abort();
|
|
303
|
+
this._api.stop();
|
|
291
304
|
this.__off('speechstart', this._onSpeechStart)
|
|
292
305
|
.__off('error', this._onError)
|
|
293
|
-
.__off('result', this.
|
|
306
|
+
.__off('result', this._onProgress)
|
|
307
|
+
.__off('end', this._onResults);
|
|
294
308
|
this.async.clearTimeout(this._restartTimeout);
|
|
295
309
|
this._isEnabled = false;
|
|
296
310
|
this.emit('pulse', false);
|
|
@@ -315,37 +329,45 @@ let RecognizeManager = RecognizeManager_1 = class RecognizeManager extends jodit
|
|
|
315
329
|
this._api.removeEventListener(event, callback);
|
|
316
330
|
return this;
|
|
317
331
|
}
|
|
318
|
-
|
|
332
|
+
_onResults(e) {
|
|
333
|
+
this.emit('pulse', false);
|
|
334
|
+
this.emit('result', this.__interimResults);
|
|
335
|
+
this.__interimResults = '';
|
|
336
|
+
this._makeSound(jodit_plugins_speech_recognize_constants__WEBPACK_IMPORTED_MODULE_2__/* .PII */ .N);
|
|
337
|
+
this.restart();
|
|
338
|
+
}
|
|
339
|
+
_onProgress(e) {
|
|
319
340
|
if (!this._isEnabled) {
|
|
320
341
|
return;
|
|
321
342
|
}
|
|
322
|
-
this.
|
|
323
|
-
|
|
324
|
-
const { transcript } = resultItem.item(0);
|
|
325
|
-
const resultHandler = () => {
|
|
326
|
-
try {
|
|
327
|
-
this.async.clearTimeout(this._restartTimeout);
|
|
328
|
-
this.emit('result', transcript);
|
|
329
|
-
}
|
|
330
|
-
catch { }
|
|
331
|
-
this.restart();
|
|
332
|
-
this.emit('pulse', false);
|
|
333
|
-
this._makeSound(jodit_plugins_speech_recognize_constants__WEBPACK_IMPORTED_MODULE_2__/* .PII */ .N);
|
|
334
|
-
};
|
|
335
|
-
if (resultItem.isFinal === false) {
|
|
336
|
-
this.emit('progress', transcript);
|
|
337
|
-
this._progressTimeout = this.async.setTimeout(resultHandler, 500);
|
|
343
|
+
this.__interimResults = '';
|
|
344
|
+
if (!e.results) {
|
|
338
345
|
return;
|
|
339
346
|
}
|
|
340
|
-
|
|
347
|
+
for (let i = 0; i < e.results.length; i++) {
|
|
348
|
+
const resultItem = e.results.item(i);
|
|
349
|
+
const { transcript } = resultItem.item(0);
|
|
350
|
+
this.__interimResults += transcript;
|
|
351
|
+
}
|
|
352
|
+
if (this.__interimResults) {
|
|
353
|
+
this.emit('progress', this.__interimResults);
|
|
354
|
+
}
|
|
341
355
|
}
|
|
342
|
-
_onError() {
|
|
343
|
-
if (
|
|
344
|
-
|
|
356
|
+
_onError(e) {
|
|
357
|
+
if (e.error === 'voice-unavailable') {
|
|
358
|
+
this.emit('error', 'Voice unavailable');
|
|
359
|
+
}
|
|
360
|
+
if (e.error === 'not-allowed') {
|
|
361
|
+
this.emit('error', 'Not allowed');
|
|
362
|
+
}
|
|
363
|
+
if (e.error === 'language-unavailable' ||
|
|
364
|
+
// @ts-ignore
|
|
365
|
+
e.error === 'language-not-supported') {
|
|
366
|
+
this.emit('error', 'Language unavailable');
|
|
345
367
|
}
|
|
346
368
|
this._makeSound(jodit_plugins_speech_recognize_constants__WEBPACK_IMPORTED_MODULE_2__/* .WARN */ .Z);
|
|
347
369
|
this.emit('pulse', false);
|
|
348
|
-
this.
|
|
370
|
+
this.stop();
|
|
349
371
|
}
|
|
350
372
|
_makeSound(frequency) {
|
|
351
373
|
if (this.sound) {
|
|
@@ -976,17 +998,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
976
998
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
977
999
|
/* harmony export */ SpeechRecognizeNative: function() { return /* binding */ SpeechRecognizeNative; }
|
|
978
1000
|
/* harmony export */ });
|
|
979
|
-
/* harmony import */ var
|
|
980
|
-
/* harmony import */ var
|
|
981
|
-
/* harmony import */ var
|
|
982
|
-
/* harmony import */ var
|
|
983
|
-
/* harmony import */ var
|
|
984
|
-
/* harmony import */ var
|
|
985
|
-
/* harmony import */ var
|
|
986
|
-
/* harmony import */ var
|
|
987
|
-
/* harmony import */ var
|
|
988
|
-
/* harmony import */ var
|
|
989
|
-
/* harmony import */ var _langs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(25202);
|
|
1001
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(31635);
|
|
1002
|
+
/* harmony import */ var jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(66927);
|
|
1003
|
+
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55186);
|
|
1004
|
+
/* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(56298);
|
|
1005
|
+
/* harmony import */ var jodit_core_helpers_utils_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(84976);
|
|
1006
|
+
/* harmony import */ var jodit_core_plugin__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(71005);
|
|
1007
|
+
/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(71096);
|
|
1008
|
+
/* harmony import */ var _jodit__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(46173);
|
|
1009
|
+
/* harmony import */ var _helpers_exec_spell_command__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(50834);
|
|
1010
|
+
/* harmony import */ var _langs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(25202);
|
|
990
1011
|
/*!
|
|
991
1012
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
992
1013
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -1003,23 +1024,22 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1003
1024
|
|
|
1004
1025
|
|
|
1005
1026
|
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
if (j.o.speechRecognize.api) {
|
|
1012
|
-
j.registerButton({
|
|
1027
|
+
class SpeechRecognizeNative extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_4__/* .Plugin */ .k {
|
|
1028
|
+
constructor() {
|
|
1029
|
+
super(...arguments);
|
|
1030
|
+
this.buttons = [
|
|
1031
|
+
{
|
|
1013
1032
|
group: 'state',
|
|
1014
1033
|
name: 'speechRecognize'
|
|
1015
|
-
}
|
|
1016
|
-
|
|
1034
|
+
}
|
|
1035
|
+
];
|
|
1036
|
+
this._commandToWord = {};
|
|
1017
1037
|
}
|
|
1018
1038
|
afterInit(jodit) {
|
|
1019
1039
|
const { commands } = jodit.o.speechRecognize;
|
|
1020
1040
|
if (commands) {
|
|
1021
|
-
(0,
|
|
1022
|
-
(0,
|
|
1041
|
+
(0,jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .extendLang */ .JW)(_langs__WEBPACK_IMPORTED_MODULE_7__);
|
|
1042
|
+
(0,jodit_core_helpers_utils_utils__WEBPACK_IMPORTED_MODULE_3__/* .keys */ .HP)(commands, false).forEach(words => {
|
|
1023
1043
|
const keys = words.split('|');
|
|
1024
1044
|
keys.forEach(key => {
|
|
1025
1045
|
key = key.trim().toLowerCase();
|
|
@@ -1034,28 +1054,30 @@ class SpeechRecognizeNative extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_5
|
|
|
1034
1054
|
});
|
|
1035
1055
|
}
|
|
1036
1056
|
}
|
|
1037
|
-
beforeDestruct(jodit) {
|
|
1057
|
+
beforeDestruct(jodit) {
|
|
1058
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.safeRemove(this.messagePopup);
|
|
1059
|
+
}
|
|
1038
1060
|
onSpeechRecognizeProgressResult(text) {
|
|
1039
1061
|
if (!this.messagePopup) {
|
|
1040
1062
|
this.messagePopup = this.j.create.div('jodit-speech-recognize__popup');
|
|
1041
1063
|
}
|
|
1042
1064
|
this.j.workplace.appendChild(this.messagePopup);
|
|
1043
|
-
this.j.async.
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
timeout: 1000
|
|
1048
|
-
});
|
|
1065
|
+
this.j.async.clearTimeout(this.__hidePopupTimeout);
|
|
1066
|
+
this.__hidePopupTimeout = this.j.async.setTimeout(() => {
|
|
1067
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.safeRemove(this.messagePopup);
|
|
1068
|
+
}, 1000);
|
|
1049
1069
|
this.messagePopup.innerText = text + '|';
|
|
1050
1070
|
}
|
|
1051
1071
|
onSpeechRecognizeResult(text) {
|
|
1052
|
-
|
|
1053
|
-
|
|
1072
|
+
this.j.async.clearTimeout(this.__hidePopupTimeout);
|
|
1073
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.safeRemove(this.messagePopup);
|
|
1074
|
+
const { j } = this;
|
|
1075
|
+
const { s } = j;
|
|
1054
1076
|
if (!this._checkCommand(text)) {
|
|
1055
1077
|
const { range } = s, node = s.current();
|
|
1056
1078
|
if (s.isCollapsed() &&
|
|
1057
|
-
|
|
1058
|
-
|
|
1079
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(node) &&
|
|
1080
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isOrContains(j.editor, node) &&
|
|
1059
1081
|
node.nodeValue) {
|
|
1060
1082
|
const sentence = node.nodeValue;
|
|
1061
1083
|
node.nodeValue =
|
|
@@ -1074,20 +1096,19 @@ class SpeechRecognizeNative extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_5
|
|
|
1074
1096
|
_checkCommand(command) {
|
|
1075
1097
|
command = command.toLowerCase().replace(/\./g, '');
|
|
1076
1098
|
if (this._commandToWord[command]) {
|
|
1077
|
-
(0,
|
|
1099
|
+
(0,_helpers_exec_spell_command__WEBPACK_IMPORTED_MODULE_8__/* .execSpellCommand */ .F)(this.j, this._commandToWord[command]);
|
|
1078
1100
|
return true;
|
|
1079
1101
|
}
|
|
1080
1102
|
return false;
|
|
1081
1103
|
}
|
|
1082
1104
|
}
|
|
1083
|
-
(0,
|
|
1084
|
-
(0,
|
|
1085
|
-
(0,jodit_core_decorators_debounce_debounce__WEBPACK_IMPORTED_MODULE_0__/* .debounce */ .s)()
|
|
1105
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .Cg)([
|
|
1106
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .w)(':speechRecognizeProgressResult')
|
|
1086
1107
|
], SpeechRecognizeNative.prototype, "onSpeechRecognizeProgressResult", null);
|
|
1087
|
-
(0,
|
|
1088
|
-
(0,
|
|
1108
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .Cg)([
|
|
1109
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .w)(':speechRecognizeResult')
|
|
1089
1110
|
], SpeechRecognizeNative.prototype, "onSpeechRecognizeResult", null);
|
|
1090
|
-
|
|
1111
|
+
_jodit__WEBPACK_IMPORTED_MODULE_6__/* .Jodit */ .x.plugins.add('speech-recognize', SpeechRecognizeNative);
|
|
1091
1112
|
|
|
1092
1113
|
|
|
1093
1114
|
/***/ }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@keyframes a{0%{fill:green;opacity:.3}to{fill:#4285f4}}svg.jodit-icon_speechRecognize{stroke:none!important}.jodit-toolbar-button_pulse_true svg{animation-duration:.7s;animation-iteration-count:infinite;animation-name:a}.jodit-speech-recognize__list-item{display:flex;padding:var(--jd-padding-default)}.jodit-speech-recognize__popup{background-color:hsla(0,0%,94%,.4);border-radius:8px;font-family:var(--jd-font-default);font-size:var(--jd-font-size-default);font-size:32px;left:50%;padding:
|
|
1
|
+
@keyframes a{0%{fill:green;opacity:.3}to{fill:#4285f4}}svg.jodit-icon_speechRecognize{stroke:none!important}.jodit-toolbar-button_pulse_true svg{animation-duration:.7s;animation-iteration-count:infinite;animation-name:a}.jodit-speech-recognize__list-item{display:flex;padding:var(--jd-padding-default)}.jodit-speech-recognize__popup{background-color:hsla(0,0%,94%,.4);border-radius:8px;font-family:var(--jd-font-default);font-size:var(--jd-font-size-default);font-size:32px;left:50%;line-height:1.5;padding:8px 16px;position:absolute;top:50%;transform:translate(-50%,-50%)}
|
|
@@ -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.22
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
((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 n in s)("object"==typeof exports?exports:e)[n]=s[n]}})(self,(function(){return(self.webpackChunkjodit=self.webpackChunkjodit||[]).push([[882],{71096(e,t,s){"use strict";var n=s(9810),i=s(72197),r=s(931),o=s(36115),c=s(71722),u=s(93676),a=s(22227),l=s.n(a);o.T.prototype.speechRecognize={api:c.o,sound:!0,continuous:!0,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"}},r.I.set("speech-recognize",l()),o.T.prototype.controls.speechRecognize={isActive(e,t){const s=(0,i.m)(e,"speech");return!!s?.isEnabled},isDisabled:e=>!e.o.speechRecognize.api,exec(e,t,{button:s,control:r}){const{api:o,lang:c,continuous:a,interimResults:l,sound:p}=e.o.speechRecognize;if(!o)return void e.alert("Speech recognize API unsupported in your browser");let h=(0,i.m)(e,"speech");if(!h){const t=new o;h=new u.g(e.async,t),h.lang=c,h.continuous=a,h.interimResults=l,h.sound=p,(0,i.m)(e,"speech",h),h.on("pulse",(e=>{s.setMod("pulse",e)})),h.on("result",(t=>e.e.fire("speechRecognizeResult",t))),h.on("progress",(t=>e.e.fire("speechRecognizeProgressResult",t))),s.hookStatus("beforeDestruct",(()=>{h.destruct()}))}if(r.args){const e=r.args[0];if((0,n.L)(h[e]))return h[e]=!h[e],void(h.isEnabled&&h.restart())}h.toggle(),s.state.activated=h.isEnabled},name:"speechRecognize",command:"toggleSpeechRecognize",tooltip:"Speech Recognize",list:{sound:"Sound",interimResults:"Interim Results"},childTemplate(e,t,s){const n=(0,i.m)(e,"speech");return`<span class='jodit-speech-recognize__list-item'><input ${n?.[t]??e.o.speechRecognize[t]?"checked":""} class='jodit-checkbox' type='checkbox'> ${s}</span>`},mods:{stroke:!1}}},81629(e,t,s){"use strict";s.d(t,{N(){return n},Z(){return i}});const n=440,i=940},71722(e,t,s){"use strict";s.d(t,{o(){return n}});const n=window.SpeechRecognition||window.webkitSpeechRecognition},50834(e,t,s){"use strict";function n(e,t){const[s,n]=t.split("::");e.execCommand(s,null,n)}s.d(t,{F(){return n}})},93676(e,t,s){"use strict";s.d(t,{g(){return a}});var n,i=s(31635),r=s(22664),o=s(43431),c=s(95473),u=s(81629);let a=n=class e extends o.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(u.Z)}),5e3),this.emit("pulse",!0))},this._progressTimeout=0,this._api=t,n._instances.add(this)}destruct(){this.stop(),n._instances.delete(this),super.destruct()}get isEnabled(){return this._isEnabled}start(){this._isEnabled||(this._isEnabled=!0,n._instances.forEach((e=>{e!==this&&e.stop()})),this._api.start(),this.__on("speechstart",this._onSpeechStart).__on("error",this._onError).__on("result",this._onResult))}stop(){if(this._isEnabled){try{this._api.abort(),this._api.stop()}catch{}this.__off("speechstart",this._onSpeechStart).__off("error",this._onError).__off("result",this._onResult),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}_onResult(e){if(!this._isEnabled)return;this.async.clearTimeout(this._progressTimeout);const t=e.results.item(e.resultIndex),{transcript:s}=t.item(0),n=()=>{try{this.async.clearTimeout(this._restartTimeout),this.emit("result",s)}catch{}this.restart(),this.emit("pulse",!1),this._makeSound(u.N)};if(!1===t.isFinal)return this.emit("progress",s),void(this._progressTimeout=this.async.setTimeout(n,500));n()}_onError(){this._isEnabled&&(this._makeSound(u.Z),this.emit("pulse",!1),this.restart())}_makeSound(e){this.sound&&(0,c.s)({frequency:e})}};a._instances=new Set,a=n=(0,i.Cg)([r.autobind],a)},95473(e,t,s){"use strict";s.d(t,{s(){return i}});var n=s(81629);function i({sec:e=.1,frequency:t=n.N,gain:s=.1,type:i="sine"}={}){if(void 0===window.AudioContext&&void 0===window.webkitAudioContext)return;const r=new(window.AudioContext||window.webkitAudioContext),o=r.createGain(),c=r.createOscillator();c.type=i,c.frequency.value=t,c.connect(o),o.connect(r.destination),c.start(),c.stop(r.currentTime+e),o.gain.value=s}},61593(e){"use strict";e.exports={newline:"الخط الجديد",delete:"حذف",space:"الفضاء","Speech Recognize":"التعرف على الكلام",Sound:"الصوت","Interim Results":"النتائج المؤقتة"}},64458(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(e){"use strict";e.exports={newline:"Zeilenumbruch",delete:"löschen",space:"Raum","Speech Recognize":"Sprache Erkennen",Sound:"Sound","Interim Results":"Zwischenergebnis"}},87710(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(e){"use strict";e.exports={newline:"خط جدید",delete:"حذف",space:"فضا","Speech Recognize":"گفتار را تشخیص دهید",Sound:"صدا","Interim Results":"نتایج موقت"}},84059(e){"use strict";e.exports={"Speech Recognize":"Puheentunnistus",newline:"uusi rivi",delete:"poistaa",space:"tilaa",Sound:"Ääni","Interim Results":"Välitulokset"}},13958(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(e){"use strict";e.exports={newline:"חדשות",delete:"מחק",space:"שטח","Speech Recognize":"דיבור מזהה",Sound:"קול","Interim Results":"תוצאות ביניים"}},14765(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(e){"use strict";e.exports={newline:"newline",delete:"Hapus",space:"ruang","Speech Recognize":"Pidato Mengenali",Sound:"Suara","Interim Results":"Hasil Sementara"}},25202(e,t,s){"use strict";s.r(t),s.d(t,{ar(){return n},cs_cz(){return i},de(){return r},es(){return o},fa(){return c},fi(){return u},fr(){return a},he(){return l},hu(){return p},id(){return h},it(){return d},ja(){return m},ko(){return g},mn(){return R},nl(){return _},pl(){return S},pt_br(){return w},ru(){return z},tr(){return f},zh_cn(){return x},zh_tw(){return v}});var n=s(61593),i=s(64458),r=s(89601),o=s(87710),c=s(15603),u=s(84059),a=s(13958),l=s(18717),p=s(14765),h=s(77995),d=s(92315),m=s(54711),g=s(68632),R=s(76769),_=s(3424),S=s(85454),w=s(64149),z=s(16491),f=s(48948),x=s(84370),v=s(56646)},92315(e){"use strict";e.exports={newline:"nuova riga",delete:"eliminare",space:"spazio","Speech Recognize":"Discorso Riconoscere",Sound:"Suono","Interim Results":"Risultati intermedi"}},54711(e){"use strict";e.exports={newline:"改行",delete:"削除",space:"スペース","Speech Recognize":"音声認識",Sound:"音","Interim Results":"中間結果"}},68632(e){"use strict";e.exports={newline:"줄 바꿈",delete:"삭제",space:"공간","Speech Recognize":"음성 인식",Sound:"소리","Interim Results":"중간 결과"}},76769(e){"use strict";e.exports={newline:"Шинэ мөр",delete:"Устгах",space:"Зай","Speech Recognize":"Дуу хоолой таних",Sound:"Дуу","Interim Results":"Түр зуурын үр дүн"}},3424(e){"use strict";e.exports={newline:"regel",delete:"verwijderen",space:"ruimte","Speech Recognize":"Spraak Herkennen",Sound:"Geluid","Interim Results":"Tussentijdse Resultaten"}},85454(e){"use strict";e.exports={newline:"newline",delete:"usunąć",space:"przestrzeń","Speech Recognize":"Rozpoznawanie Mowy",Sound:"Dźwięk","Interim Results":"Wyniki Okresowe"}},64149(e){"use strict";e.exports={newline:"linha",delete:"excluir",space:"espaco","Speech Recognize":"Discurso Reconhecer",Sound:"Som","Interim Results":"Resultados Provisórios"}},16491(e){"use strict";e.exports={newline:"новая строка|перенос|энтер",delete:"удалить",space:"пробел","Speech Recognize":"Распознавание речи",Sound:"Звук","Interim Results":"Промежуточные результаты"}},48948(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(e){"use strict";e.exports={newline:"新行",delete:"删除",space:"空间","Speech Recognize":"言语识别",Sound:"声音","Interim Results":"中期业绩"}},56646(e){"use strict";e.exports={newline:"換行",delete:"刪除",space:"空白","Speech Recognize":"語音辨識",Sound:"聲音","Interim Results":"階段性辨識結果"}},37873(e,t,s){"use strict";s.r(t),s.d(t,{SpeechRecognizeNative(){return d}});var n=s(31635),i=s(37075),r=s(66927),o=s(55186),c=s(56298),u=s(84976),a=s(71005),l=(s(71096),s(46173)),p=s(50834),h=s(25202);class d extends a.k{constructor(e){super(e),this._commandToWord={},e.o.speechRecognize.api&&e.registerButton({group:"state",name:"speechRecognize"})}afterInit(e){const{commands:t}=e.o.speechRecognize;t&&((0,c.JW)(h),(0,u.HP)(t,!1).forEach((s=>{s.split("|").forEach((n=>{n=n.trim().toLowerCase(),this._commandToWord[n]=t[s];const i=e.i18n(n);i!==n&&i.split("|").forEach((e=>{this._commandToWord[e.trim().toLowerCase()]=t[s].trim()}))}))})))}beforeDestruct(e){}onSpeechRecognizeProgressResult(e){this.messagePopup||(this.messagePopup=this.j.create.div("jodit-speech-recognize__popup")),this.j.workplace.appendChild(this.messagePopup),this.j.async.setTimeout((()=>{o.J.safeRemove(this.messagePopup)}),{label:"onSpeechRecognizeProgressResult",timeout:1e3}),this.messagePopup.innerText=e+"|"}onSpeechRecognizeResult(e){const{j:t}=this,{s}=t;if(o.J.safeRemove(this.messagePopup),!this._checkCommand(e)){const{range:n}=s,i=s.current();if(s.isCollapsed()&&o.J.isText(i)&&o.J.isOrContains(t.editor,i)&&i.nodeValue){const r=i.nodeValue;i.nodeValue=r+(/[\u00A0 ]\uFEFF*$/.test(r)?"":" ")+e,n.setStartAfter(i),s.selectRange(n),t.synchronizeValues()}else s.insertHTML(e)}}_checkCommand(e){return e=e.toLowerCase().replace(/\./g,""),!!this._commandToWord[e]&&((0,p.F)(this.j,this._commandToWord[e]),!0)}}(0,n.Cg)([(0,r.w)(":speechRecognizeProgressResult"),(0,i.s)()],d.prototype,"onSpeechRecognizeProgressResult",null),(0,n.Cg)([(0,r.w)(":speechRecognizeResult")],d.prototype,"onSpeechRecognizeResult",null),l.x.plugins.add("speech-recognize",d)},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>'}},e=>e(e.s=37873)])}));
|
|
10
|
+
((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,(function(){return(self.webpackChunkjodit=self.webpackChunkjodit||[]).push([[882],{71096(e,t,s){"use strict";var i=s(9810),n=s(72197),r=s(931),o=s(36115),u=s(71722),c=s(93676),a=s(22227),l=s.n(a);o.T.prototype.speechRecognize={api:void 0!==u.o?u.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"}},r.I.set("speech-recognize",l()),o.T.prototype.controls.speechRecognize={isVisible:e=>!!e.o.speechRecognize.api,isActive(e,t){const s=(0,n.m)(e,"speech");return!!s?.isEnabled},isDisabled:e=>!e.o.speechRecognize.api,exec(e,t,{button:s,control:r}){const{api:o,lang:u,continuous:a,interimResults:l,sound:p}=e.o.speechRecognize;if(!o)return void e.alert("Speech recognize API unsupported in your browser");let h=(0,n.m)(e,"speech");if(!h){const t=new o;h=new c.g(e.async,t),h.lang=u,h.continuous=a,h.interimResults=l,h.sound=p,(0,n.m)(e,"speech",h),h.on("pulse",(e=>{s.setMod("pulse",e)})),h.on("result",(t=>e.e.fire("speechRecognizeResult",t))),h.on("progress",(t=>e.e.fire("speechRecognizeProgressResult",t))),h.on("error",(t=>e.message.error(t))),s.hookStatus("beforeDestruct",(()=>{(0,n.m)(e,"speech",null),h.destruct()}))}if(r.args){const e=r.args[0];if((0,i.L)(h[e]))return h[e]=!h[e],void(h.isEnabled&&h.restart())}h.toggle(),h.isEnabled&&s.setMod("pulse",!0),s.state.activated=h.isEnabled},name:"speechRecognize",command:"toggleSpeechRecognize",tooltip:"Speech Recognize",list:{sound:"Sound",interimResults:"Interim Results"},childTemplate(e,t,s){const i=(0,n.m)(e,"speech");return`<span class='jodit-speech-recognize__list-item'><input ${i?.[t]??e.o.speechRecognize[t]?"checked":""} class='jodit-checkbox' type='checkbox'> ${s}</span>`},mods:{stroke:!1}}},81629(e,t,s){"use strict";s.d(t,{N(){return i},Z(){return n}});const i=440,n=940},71722(e,t,s){"use strict";s.d(t,{o(){return i}});const i=window.SpeechRecognition||window.webkitSpeechRecognition},50834(e,t,s){"use strict";function i(e,t){const[s,i]=t.split("::");e.execCommand(s,null,i)}s.d(t,{F(){return i}})},93676(e,t,s){"use strict";s.d(t,{g(){return a}});var i,n=s(31635),r=s(22664),o=s(43431),u=s(95473),c=s(81629);let a=i=class e extends o.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,i._instances.add(this)}destruct(){this.stop(),i._instances.delete(this),super.destruct()}get isEnabled(){return this._isEnabled}start(){if(!this._isEnabled){this._isEnabled=!0,i._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 s=e.results.item(t),{transcript:i}=s.item(0);this.__interimResults+=i}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=i=(0,n.Cg)([r.autobind],a)},95473(e,t,s){"use strict";s.d(t,{s(){return n}});var i=s(81629);function n({sec:e=.1,frequency:t=i.N,gain:s=.1,type:n="sine"}={}){if(void 0===window.AudioContext&&void 0===window.webkitAudioContext)return;const r=new(window.AudioContext||window.webkitAudioContext),o=r.createGain(),u=r.createOscillator();u.type=n,u.frequency.value=t,u.connect(o),o.connect(r.destination),u.start(),u.stop(r.currentTime+e),o.gain.value=s}},61593(e){"use strict";e.exports={newline:"الخط الجديد",delete:"حذف",space:"الفضاء","Speech Recognize":"التعرف على الكلام",Sound:"الصوت","Interim Results":"النتائج المؤقتة"}},64458(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(e){"use strict";e.exports={newline:"Zeilenumbruch",delete:"löschen",space:"Raum","Speech Recognize":"Sprache Erkennen",Sound:"Sound","Interim Results":"Zwischenergebnis"}},87710(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(e){"use strict";e.exports={newline:"خط جدید",delete:"حذف",space:"فضا","Speech Recognize":"گفتار را تشخیص دهید",Sound:"صدا","Interim Results":"نتایج موقت"}},84059(e){"use strict";e.exports={"Speech Recognize":"Puheentunnistus",newline:"uusi rivi",delete:"poistaa",space:"tilaa",Sound:"Ääni","Interim Results":"Välitulokset"}},13958(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(e){"use strict";e.exports={newline:"חדשות",delete:"מחק",space:"שטח","Speech Recognize":"דיבור מזהה",Sound:"קול","Interim Results":"תוצאות ביניים"}},14765(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(e){"use strict";e.exports={newline:"newline",delete:"Hapus",space:"ruang","Speech Recognize":"Pidato Mengenali",Sound:"Suara","Interim Results":"Hasil Sementara"}},25202(e,t,s){"use strict";s.r(t),s.d(t,{ar(){return i},cs_cz(){return n},de(){return r},es(){return o},fa(){return u},fi(){return c},fr(){return a},he(){return l},hu(){return p},id(){return h},it(){return d},ja(){return m},ko(){return g},mn(){return R},nl(){return _},pl(){return S},pt_br(){return w},ru(){return z},tr(){return f},zh_cn(){return v},zh_tw(){return b}});var i=s(61593),n=s(64458),r=s(89601),o=s(87710),u=s(15603),c=s(84059),a=s(13958),l=s(18717),p=s(14765),h=s(77995),d=s(92315),m=s(54711),g=s(68632),R=s(76769),_=s(3424),S=s(85454),w=s(64149),z=s(16491),f=s(48948),v=s(84370),b=s(56646)},92315(e){"use strict";e.exports={newline:"nuova riga",delete:"eliminare",space:"spazio","Speech Recognize":"Discorso Riconoscere",Sound:"Suono","Interim Results":"Risultati intermedi"}},54711(e){"use strict";e.exports={newline:"改行",delete:"削除",space:"スペース","Speech Recognize":"音声認識",Sound:"音","Interim Results":"中間結果"}},68632(e){"use strict";e.exports={newline:"줄 바꿈",delete:"삭제",space:"공간","Speech Recognize":"음성 인식",Sound:"소리","Interim Results":"중간 결과"}},76769(e){"use strict";e.exports={newline:"Шинэ мөр",delete:"Устгах",space:"Зай","Speech Recognize":"Дуу хоолой таних",Sound:"Дуу","Interim Results":"Түр зуурын үр дүн"}},3424(e){"use strict";e.exports={newline:"regel",delete:"verwijderen",space:"ruimte","Speech Recognize":"Spraak Herkennen",Sound:"Geluid","Interim Results":"Tussentijdse Resultaten"}},85454(e){"use strict";e.exports={newline:"newline",delete:"usunąć",space:"przestrzeń","Speech Recognize":"Rozpoznawanie Mowy",Sound:"Dźwięk","Interim Results":"Wyniki Okresowe"}},64149(e){"use strict";e.exports={newline:"linha",delete:"excluir",space:"espaco","Speech Recognize":"Discurso Reconhecer",Sound:"Som","Interim Results":"Resultados Provisórios"}},16491(e){"use strict";e.exports={newline:"новая строка|перенос|энтер",delete:"удалить",space:"пробел","Speech Recognize":"Распознавание речи",Sound:"Звук","Interim Results":"Промежуточные результаты"}},48948(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(e){"use strict";e.exports={newline:"新行",delete:"删除",space:"空间","Speech Recognize":"言语识别",Sound:"声音","Interim Results":"中期业绩"}},56646(e){"use strict";e.exports={newline:"換行",delete:"刪除",space:"空白","Speech Recognize":"語音辨識",Sound:"聲音","Interim Results":"階段性辨識結果"}},37873(e,t,s){"use strict";s.r(t),s.d(t,{SpeechRecognizeNative(){return h}});var i=s(31635),n=s(66927),r=s(55186),o=s(56298),u=s(84976),c=s(71005),a=(s(71096),s(46173)),l=s(50834),p=s(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,o.JW)(p),(0,u.HP)(t,!1).forEach((s=>{s.split("|").forEach((i=>{i=i.trim().toLowerCase(),this._commandToWord[i]=t[s];const n=e.i18n(i);n!==i&&n.split("|").forEach((e=>{this._commandToWord[e.trim().toLowerCase()]=t[s].trim()}))}))})))}beforeDestruct(e){r.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((()=>{r.J.safeRemove(this.messagePopup)}),1e3),this.messagePopup.innerText=e+"|"}onSpeechRecognizeResult(e){this.j.async.clearTimeout(this.__hidePopupTimeout),r.J.safeRemove(this.messagePopup);const{j:t}=this,{s}=t;if(!this._checkCommand(e)){const{range:i}=s,n=s.current();if(s.isCollapsed()&&r.J.isText(n)&&r.J.isOrContains(t.editor,n)&&n.nodeValue){const r=n.nodeValue;n.nodeValue=r+(/[\u00A0 ]\uFEFF*$/.test(r)?"":" ")+e,i.setStartAfter(n),s.selectRange(i),t.synchronizeValues()}else s.insertHTML(e)}}_checkCommand(e){return e=e.toLowerCase().replace(/\./g,""),!!this._commandToWord[e]&&((0,l.F)(this.j,this._commandToWord[e]),!0)}}(0,i.Cg)([(0,n.w)(":speechRecognizeProgressResult")],h.prototype,"onSpeechRecognizeProgressResult",null),(0,i.Cg)([(0,n.w)(":speechRecognizeResult")],h.prototype,"onSpeechRecognizeResult",null),a.x.plugins.add("speech-recognize",h)},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>'}},e=>e(e.s=37873)])}));
|
package/es2021.en/jodit.css
CHANGED
|
@@ -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.22
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -3519,14 +3519,39 @@ a + .jodit-file-browser-tree__source-title {
|
|
|
3519
3519
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
3520
3520
|
*/
|
|
3521
3521
|
.jodit-tabs {
|
|
3522
|
+
--jd-box-shadow-tabs: 0 0 #0000, 0 1px 3px 0 rgba(0,0,0,.1), 0 1px 2px -1px rgba(0,0,0,.1);
|
|
3522
3523
|
font-family: var(--jd-font-default);
|
|
3523
3524
|
font-size: var(--jd-font-size-default);
|
|
3524
3525
|
}
|
|
3525
3526
|
.jodit-tabs .jodit-tabs__buttons {
|
|
3527
|
+
background-color: var(--jd-color-background-light-gray);
|
|
3526
3528
|
display: flex;
|
|
3527
3529
|
justify-content: center;
|
|
3528
3530
|
margin-top: calc(var(--jd-padding-default) / 2);
|
|
3529
3531
|
margin-bottom: var(--jd-padding-default);
|
|
3532
|
+
padding: calc(var(--jd-padding-default) / 2);
|
|
3533
|
+
border-radius: var(--jd-border-radius-default);
|
|
3534
|
+
}
|
|
3535
|
+
.jodit-tabs .jodit-tabs__buttons .jodit-ui-button {
|
|
3536
|
+
color: var(--jd-color-placeholder);
|
|
3537
|
+
}
|
|
3538
|
+
.jodit-tabs .jodit-tabs__buttons .jodit-ui-button svg {
|
|
3539
|
+
fill: var(--jd-color-placeholder);
|
|
3540
|
+
}
|
|
3541
|
+
.jodit-tabs .jodit-tabs__buttons .jodit-ui-button:active:not([disabled]),
|
|
3542
|
+
.jodit-tabs .jodit-tabs__buttons .jodit-ui-button[aria-pressed='true']:not([disabled]) {
|
|
3543
|
+
box-shadow: var(--jd-box-shadow-tabs);
|
|
3544
|
+
color: var(--jd-color-text-icons);
|
|
3545
|
+
}
|
|
3546
|
+
.jodit-tabs .jodit-tabs__buttons .jodit-ui-button:active:not([disabled]),
|
|
3547
|
+
.jodit-tabs .jodit-tabs__buttons .jodit-ui-button[aria-pressed='true']:not([disabled]),
|
|
3548
|
+
.jodit-tabs .jodit-tabs__buttons .jodit-ui-button:active:not([disabled]) .jodit-ui-button__text,
|
|
3549
|
+
.jodit-tabs .jodit-tabs__buttons .jodit-ui-button[aria-pressed='true']:not([disabled]) .jodit-ui-button__text {
|
|
3550
|
+
background-color: var(--jd-color-background-default);
|
|
3551
|
+
}
|
|
3552
|
+
.jodit-tabs .jodit-tabs__buttons .jodit-ui-button:active:not([disabled]) svg,
|
|
3553
|
+
.jodit-tabs .jodit-tabs__buttons .jodit-ui-button[aria-pressed='true']:not([disabled]) svg {
|
|
3554
|
+
fill: var(--jd-color-text-icons);
|
|
3530
3555
|
}
|
|
3531
3556
|
.jodit-tabs .jodit-tabs__buttons > * {
|
|
3532
3557
|
margin-left: calc(var(--jd-padding-default) / 2);
|
|
@@ -3566,6 +3591,23 @@ a + .jodit-file-browser-tree__source-title {
|
|
|
3566
3591
|
min-width: 220px;
|
|
3567
3592
|
min-height: 100px;
|
|
3568
3593
|
}
|
|
3594
|
+
.jodit-dialog_theme_dark .jodit-tabs .jodit-tabs__buttons,
|
|
3595
|
+
.jodit_theme_dark .jodit-tabs .jodit-tabs__buttons {
|
|
3596
|
+
background-color: var(--jd-dark-background-color);
|
|
3597
|
+
border-radius: var(--jd-border-radius-default);
|
|
3598
|
+
}
|
|
3599
|
+
.jodit-dialog_theme_dark .jodit-tabs .jodit-tabs__buttons .jodit-ui-button:active:not([disabled]) .jodit-ui-button__text,
|
|
3600
|
+
.jodit_theme_dark .jodit-tabs .jodit-tabs__buttons .jodit-ui-button:active:not([disabled]) .jodit-ui-button__text,
|
|
3601
|
+
.jodit-dialog_theme_dark .jodit-tabs .jodit-tabs__buttons .jodit-ui-button[aria-pressed='true']:not([disabled]) .jodit-ui-button__text,
|
|
3602
|
+
.jodit_theme_dark .jodit-tabs .jodit-tabs__buttons .jodit-ui-button[aria-pressed='true']:not([disabled]) .jodit-ui-button__text {
|
|
3603
|
+
color: var(--jd-dark-toolbar-color);
|
|
3604
|
+
}
|
|
3605
|
+
.jodit-dialog_theme_dark .jodit-tabs .jodit-tabs__buttons .jodit-ui-button:active:not([disabled]) svg,
|
|
3606
|
+
.jodit_theme_dark .jodit-tabs .jodit-tabs__buttons .jodit-ui-button:active:not([disabled]) svg,
|
|
3607
|
+
.jodit-dialog_theme_dark .jodit-tabs .jodit-tabs__buttons .jodit-ui-button[aria-pressed='true']:not([disabled]) svg,
|
|
3608
|
+
.jodit_theme_dark .jodit-tabs .jodit-tabs__buttons .jodit-ui-button[aria-pressed='true']:not([disabled]) svg {
|
|
3609
|
+
fill: var(--jd-color-text-icons);
|
|
3610
|
+
}
|
|
3569
3611
|
|
|
3570
3612
|
/*!
|
|
3571
3613
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
@@ -3658,6 +3700,10 @@ html.jodit_fullsize-box_true {
|
|
|
3658
3700
|
.jodit-ui-image-properties-form__tabsBox {
|
|
3659
3701
|
padding: 0 var(--jd-padding-default);
|
|
3660
3702
|
}
|
|
3703
|
+
.jodit-dialog_theme_dark .jodit-ui-image-properties-form__imageView,
|
|
3704
|
+
.jodit_theme_dark .jodit-ui-image-properties-form__imageView {
|
|
3705
|
+
background-color: var(--jd-dark-background-color);
|
|
3706
|
+
}
|
|
3661
3707
|
.jodit-ui-image-properties-form_lock_true::before {
|
|
3662
3708
|
content: '';
|
|
3663
3709
|
left: 0;
|