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.
Files changed (85) hide show
  1. package/CHANGELOG.md +16 -5
  2. package/es2015/jodit.css +47 -1
  3. package/es2015/jodit.fat.min.css +1 -1
  4. package/es2015/jodit.fat.min.js +2 -2
  5. package/es2015/jodit.js +75 -63
  6. package/es2015/jodit.min.css +1 -1
  7. package/es2015/jodit.min.js +2 -2
  8. package/es2015/plugins/debug/debug.js +1 -1
  9. package/es2015/plugins/debug/debug.min.js +1 -1
  10. package/es2015/plugins/speech-recognize/speech-recognize.css +3 -2
  11. package/es2015/plugins/speech-recognize/speech-recognize.js +98 -77
  12. package/es2015/plugins/speech-recognize/speech-recognize.min.css +1 -1
  13. package/es2015/plugins/speech-recognize/speech-recognize.min.js +2 -2
  14. package/es2018/jodit.css +47 -1
  15. package/es2018/jodit.fat.min.css +1 -1
  16. package/es2018/jodit.fat.min.js +2 -2
  17. package/es2018/jodit.js +75 -63
  18. package/es2018/jodit.min.css +1 -1
  19. package/es2018/jodit.min.js +2 -2
  20. package/es2018/plugins/debug/debug.js +1 -1
  21. package/es2018/plugins/debug/debug.min.js +1 -1
  22. package/es2018/plugins/speech-recognize/speech-recognize.css +3 -2
  23. package/es2018/plugins/speech-recognize/speech-recognize.js +98 -77
  24. package/es2018/plugins/speech-recognize/speech-recognize.min.css +1 -1
  25. package/es2018/plugins/speech-recognize/speech-recognize.min.js +2 -2
  26. package/es2021/jodit.css +47 -1
  27. package/es2021/jodit.fat.min.css +1 -1
  28. package/es2021/jodit.fat.min.js +2 -2
  29. package/es2021/jodit.js +75 -63
  30. package/es2021/jodit.min.css +1 -1
  31. package/es2021/jodit.min.js +2 -2
  32. package/es2021/plugins/debug/debug.js +1 -1
  33. package/es2021/plugins/debug/debug.min.js +1 -1
  34. package/es2021/plugins/speech-recognize/speech-recognize.css +3 -2
  35. package/es2021/plugins/speech-recognize/speech-recognize.js +98 -77
  36. package/es2021/plugins/speech-recognize/speech-recognize.min.css +1 -1
  37. package/es2021/plugins/speech-recognize/speech-recognize.min.js +2 -2
  38. package/es2021.en/jodit.css +47 -1
  39. package/es2021.en/jodit.fat.min.css +1 -1
  40. package/es2021.en/jodit.fat.min.js +2 -2
  41. package/es2021.en/jodit.js +75 -63
  42. package/es2021.en/jodit.min.css +1 -1
  43. package/es2021.en/jodit.min.js +2 -2
  44. package/es2021.en/plugins/debug/debug.js +1 -1
  45. package/es2021.en/plugins/debug/debug.min.js +1 -1
  46. package/es2021.en/plugins/speech-recognize/speech-recognize.css +3 -2
  47. package/es2021.en/plugins/speech-recognize/speech-recognize.js +98 -77
  48. package/es2021.en/plugins/speech-recognize/speech-recognize.min.css +1 -1
  49. package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +2 -2
  50. package/es5/jodit.css +77 -2
  51. package/es5/jodit.fat.min.css +1 -1
  52. package/es5/jodit.fat.min.js +2 -2
  53. package/es5/jodit.js +78 -62
  54. package/es5/jodit.min.css +3 -3
  55. package/es5/jodit.min.js +2 -2
  56. package/es5/plugins/debug/debug.js +1 -1
  57. package/es5/plugins/debug/debug.min.js +1 -1
  58. package/es5/plugins/speech-recognize/speech-recognize.css +3 -2
  59. package/es5/plugins/speech-recognize/speech-recognize.js +99 -79
  60. package/es5/plugins/speech-recognize/speech-recognize.min.css +1 -1
  61. package/es5/plugins/speech-recognize/speech-recognize.min.js +2 -2
  62. package/esm/core/constants.js +1 -1
  63. package/esm/core/ui/button/button/button.d.ts +1 -0
  64. package/esm/core/ui/button/button/button.js +7 -0
  65. package/esm/core/ui/button/tooltip/tooltip.d.ts +3 -4
  66. package/esm/core/ui/button/tooltip/tooltip.js +44 -44
  67. package/esm/modules/toolbar/button/button.d.ts +1 -0
  68. package/esm/modules/widget/tabs/tabs.js +21 -16
  69. package/esm/plugins/speech-recognize/config.d.ts +1 -1
  70. package/esm/plugins/speech-recognize/config.js +13 -5
  71. package/esm/plugins/speech-recognize/helpers/recognize-manager.d.ts +3 -2
  72. package/esm/plugins/speech-recognize/helpers/recognize-manager.js +45 -31
  73. package/esm/plugins/speech-recognize/interface.d.ts +1 -0
  74. package/esm/plugins/speech-recognize/speech-recognize.d.ts +5 -1
  75. package/esm/plugins/speech-recognize/speech-recognize.js +17 -17
  76. package/esm/types/ui.d.ts +1 -0
  77. package/package.json +1 -1
  78. package/types/core/ui/button/button/button.d.ts +1 -0
  79. package/types/core/ui/button/tooltip/tooltip.d.ts +3 -4
  80. package/types/modules/toolbar/button/button.d.ts +1 -0
  81. package/types/plugins/speech-recognize/config.d.ts +1 -1
  82. package/types/plugins/speech-recognize/helpers/recognize-manager.d.ts +3 -2
  83. package/types/plugins/speech-recognize/interface.d.ts +1 -0
  84. package/types/plugins/speech-recognize/speech-recognize.d.ts +5 -1
  85. 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.19
4
+ * Version: v4.2.22
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -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.19
4
+ * Version: v4.2.22
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -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.19
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: 24px;
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.19
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: true,
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: Api, lang, continuous, interimResults, sound } = jodit.o.speechRecognize;
75
- if (!Api) {
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 Api();
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._progressTimeout = 0;
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
- this._api.start();
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._onResult);
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
- try {
287
- this._api.abort();
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._onResult);
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
- _onResult(e) {
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.async.clearTimeout(this._progressTimeout);
323
- const resultItem = e.results.item(e.resultIndex);
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
- resultHandler();
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 (!this._isEnabled) {
344
- return;
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.restart();
370
+ this.stop();
349
371
  }
350
372
  _makeSound(frequency) {
351
373
  if (this.sound) {
@@ -474,17 +496,16 @@ __webpack_require__.r(__webpack_exports__);
474
496
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
475
497
  /* harmony export */ SpeechRecognizeNative: function() { return /* binding */ SpeechRecognizeNative; }
476
498
  /* harmony export */ });
477
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(31635);
478
- /* harmony import */ var jodit_core_decorators_debounce_debounce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(37075);
479
- /* harmony import */ var jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(66927);
480
- /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(55186);
481
- /* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(56298);
482
- /* harmony import */ var jodit_core_helpers_utils_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(84976);
483
- /* harmony import */ var jodit_core_plugin__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(71005);
484
- /* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(71096);
485
- /* harmony import */ var _jodit__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(46173);
486
- /* harmony import */ var _helpers_exec_spell_command__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(50834);
487
- /* harmony import */ var _langs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(25202);
499
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(31635);
500
+ /* harmony import */ var jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(66927);
501
+ /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55186);
502
+ /* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(56298);
503
+ /* harmony import */ var jodit_core_helpers_utils_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(84976);
504
+ /* harmony import */ var jodit_core_plugin__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(71005);
505
+ /* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(71096);
506
+ /* harmony import */ var _jodit__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(46173);
507
+ /* harmony import */ var _helpers_exec_spell_command__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(50834);
508
+ /* harmony import */ var _langs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(25202);
488
509
  /*!
489
510
  * Jodit Editor (https://xdsoft.net/jodit/)
490
511
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -501,23 +522,22 @@ __webpack_require__.r(__webpack_exports__);
501
522
 
502
523
 
503
524
 
504
-
505
- class SpeechRecognizeNative extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_5__/* .Plugin */ .k {
506
- constructor(j) {
507
- super(j);
508
- this._commandToWord = {};
509
- if (j.o.speechRecognize.api) {
510
- j.registerButton({
525
+ class SpeechRecognizeNative extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_4__/* .Plugin */ .k {
526
+ constructor() {
527
+ super(...arguments);
528
+ this.buttons = [
529
+ {
511
530
  group: 'state',
512
531
  name: 'speechRecognize'
513
- });
514
- }
532
+ }
533
+ ];
534
+ this._commandToWord = {};
515
535
  }
516
536
  afterInit(jodit) {
517
537
  const { commands } = jodit.o.speechRecognize;
518
538
  if (commands) {
519
- (0,jodit_core_global__WEBPACK_IMPORTED_MODULE_3__/* .extendLang */ .JW)(_langs__WEBPACK_IMPORTED_MODULE_8__);
520
- (0,jodit_core_helpers_utils_utils__WEBPACK_IMPORTED_MODULE_4__/* .keys */ .HP)(commands, false).forEach(words => {
539
+ (0,jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .extendLang */ .JW)(_langs__WEBPACK_IMPORTED_MODULE_7__);
540
+ (0,jodit_core_helpers_utils_utils__WEBPACK_IMPORTED_MODULE_3__/* .keys */ .HP)(commands, false).forEach(words => {
521
541
  const keys = words.split('|');
522
542
  keys.forEach(key => {
523
543
  key = key.trim().toLowerCase();
@@ -532,28 +552,30 @@ class SpeechRecognizeNative extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_5
532
552
  });
533
553
  }
534
554
  }
535
- beforeDestruct(jodit) { }
555
+ beforeDestruct(jodit) {
556
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.safeRemove(this.messagePopup);
557
+ }
536
558
  onSpeechRecognizeProgressResult(text) {
537
559
  if (!this.messagePopup) {
538
560
  this.messagePopup = this.j.create.div('jodit-speech-recognize__popup');
539
561
  }
540
562
  this.j.workplace.appendChild(this.messagePopup);
541
- this.j.async.setTimeout(() => {
542
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.safeRemove(this.messagePopup);
543
- }, {
544
- label: 'onSpeechRecognizeProgressResult',
545
- timeout: 1000
546
- });
563
+ this.j.async.clearTimeout(this.__hidePopupTimeout);
564
+ this.__hidePopupTimeout = this.j.async.setTimeout(() => {
565
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.safeRemove(this.messagePopup);
566
+ }, 1000);
547
567
  this.messagePopup.innerText = text + '|';
548
568
  }
549
569
  onSpeechRecognizeResult(text) {
550
- const { j } = this, { s } = j;
551
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.safeRemove(this.messagePopup);
570
+ this.j.async.clearTimeout(this.__hidePopupTimeout);
571
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.safeRemove(this.messagePopup);
572
+ const { j } = this;
573
+ const { s } = j;
552
574
  if (!this._checkCommand(text)) {
553
575
  const { range } = s, node = s.current();
554
576
  if (s.isCollapsed() &&
555
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isText(node) &&
556
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isOrContains(j.editor, node) &&
577
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(node) &&
578
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isOrContains(j.editor, node) &&
557
579
  node.nodeValue) {
558
580
  const sentence = node.nodeValue;
559
581
  node.nodeValue =
@@ -572,20 +594,19 @@ class SpeechRecognizeNative extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_5
572
594
  _checkCommand(command) {
573
595
  command = command.toLowerCase().replace(/\./g, '');
574
596
  if (this._commandToWord[command]) {
575
- (0,_helpers_exec_spell_command__WEBPACK_IMPORTED_MODULE_9__/* .execSpellCommand */ .F)(this.j, this._commandToWord[command]);
597
+ (0,_helpers_exec_spell_command__WEBPACK_IMPORTED_MODULE_8__/* .execSpellCommand */ .F)(this.j, this._commandToWord[command]);
576
598
  return true;
577
599
  }
578
600
  return false;
579
601
  }
580
602
  }
581
- (0,tslib__WEBPACK_IMPORTED_MODULE_10__/* .__decorate */ .Cg)([
582
- (0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)(':speechRecognizeProgressResult'),
583
- (0,jodit_core_decorators_debounce_debounce__WEBPACK_IMPORTED_MODULE_0__/* .debounce */ .s)()
603
+ (0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .Cg)([
604
+ (0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .w)(':speechRecognizeProgressResult')
584
605
  ], SpeechRecognizeNative.prototype, "onSpeechRecognizeProgressResult", null);
585
- (0,tslib__WEBPACK_IMPORTED_MODULE_10__/* .__decorate */ .Cg)([
586
- (0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)(':speechRecognizeResult')
606
+ (0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .Cg)([
607
+ (0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .w)(':speechRecognizeResult')
587
608
  ], SpeechRecognizeNative.prototype, "onSpeechRecognizeResult", null);
588
- _jodit__WEBPACK_IMPORTED_MODULE_7__/* .Jodit */ .x.plugins.add('speech-recognize', SpeechRecognizeNative);
609
+ _jodit__WEBPACK_IMPORTED_MODULE_6__/* .Jodit */ .x.plugins.add('speech-recognize', SpeechRecognizeNative);
589
610
 
590
611
 
591
612
  /***/ }),
@@ -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:24px;position:absolute;top:50%;transform:translate(-50%,-50%)}
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.19
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 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),c=s(71722),u=s(93676),a=s(22227),h=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",h()),o.T.prototype.controls.speechRecognize={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:c,continuous:a,interimResults:h,sound:p}=e.o.speechRecognize;if(!o)return void e.alert("Speech recognize API unsupported in your browser");let l=(0,n.m)(e,"speech");if(!l){const t=new o;l=new u.g(e.async,t),l.lang=c,l.continuous=a,l.interimResults=h,l.sound=p,(0,n.m)(e,"speech",l),l.on("pulse",(e=>{s.setMod("pulse",e)})),l.on("result",(t=>e.e.fire("speechRecognizeResult",t))),l.on("progress",(t=>e.e.fire("speechRecognizeProgressResult",t))),s.hookStatus("beforeDestruct",(()=>{l.destruct()}))}if(r.args){const e=r.args[0];if((0,i.L)(l[e]))return l[e]=!l[e],void(l.isEnabled&&l.restart())}l.toggle(),s.state.activated=l.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'>&nbsp;${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),c=s(95473),u=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(u.Z)}),5e3),this.emit("pulse",!0))},this._progressTimeout=0,this._api=t,i._instances.add(this)}destruct(){this.stop(),i._instances.delete(this),super.destruct()}get isEnabled(){return this._isEnabled}start(){this._isEnabled||(this._isEnabled=!0,i._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),i=()=>{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(i,500));i()}_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=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(),c=r.createOscillator();c.type=n,c.frequency.value=t,c.connect(o),o.connect(r.destination),c.start(),c.stop(r.currentTime+e),o.gain.value=s}},25202(e,t,s){"use strict";s.r(t),s.d(t,{ar(){return i},cs_cz(){return i},de(){return i},es(){return i},fa(){return i},fi(){return i},fr(){return i},he(){return i},hu(){return i},id(){return i},it(){return i},ja(){return i},ko(){return i},mn(){return i},nl(){return i},pl(){return i},pt_br(){return i},ru(){return i},tr(){return i},zh_cn(){return i},zh_tw(){return i}});var i=s(41324)},37873(e,t,s){"use strict";s.r(t),s.d(t,{SpeechRecognizeNative(){return d}});var i=s(31635),n=s(37075),r=s(66927),o=s(55186),c=s(56298),u=s(84976),a=s(71005),h=(s(71096),s(46173)),p=s(50834),l=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)(l),(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){}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:i}=s,n=s.current();if(s.isCollapsed()&&o.J.isText(n)&&o.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,p.F)(this.j,this._commandToWord[e]),!0)}}(0,i.Cg)([(0,r.w)(":speechRecognizeProgressResult"),(0,n.s)()],d.prototype,"onSpeechRecognizeProgressResult",null),(0,i.Cg)([(0,r.w)(":speechRecognizeResult")],d.prototype,"onSpeechRecognizeResult",null),h.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),r=s(72197),n=s(931),o=s(36115),u=s(71722),c=s(93676),a=s(22227),h=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"}},n.I.set("speech-recognize",h()),o.T.prototype.controls.speechRecognize={isVisible:e=>!!e.o.speechRecognize.api,isActive(e,t){const s=(0,r.m)(e,"speech");return!!s?.isEnabled},isDisabled:e=>!e.o.speechRecognize.api,exec(e,t,{button:s,control:n}){const{api:o,lang:u,continuous:a,interimResults:h,sound:l}=e.o.speechRecognize;if(!o)return void e.alert("Speech recognize API unsupported in your browser");let p=(0,r.m)(e,"speech");if(!p){const t=new o;p=new c.g(e.async,t),p.lang=u,p.continuous=a,p.interimResults=h,p.sound=l,(0,r.m)(e,"speech",p),p.on("pulse",(e=>{s.setMod("pulse",e)})),p.on("result",(t=>e.e.fire("speechRecognizeResult",t))),p.on("progress",(t=>e.e.fire("speechRecognizeProgressResult",t))),p.on("error",(t=>e.message.error(t))),s.hookStatus("beforeDestruct",(()=>{(0,r.m)(e,"speech",null),p.destruct()}))}if(n.args){const e=n.args[0];if((0,i.L)(p[e]))return p[e]=!p[e],void(p.isEnabled&&p.restart())}p.toggle(),p.isEnabled&&s.setMod("pulse",!0),s.state.activated=p.isEnabled},name:"speechRecognize",command:"toggleSpeechRecognize",tooltip:"Speech Recognize",list:{sound:"Sound",interimResults:"Interim Results"},childTemplate(e,t,s){const i=(0,r.m)(e,"speech");return`<span class='jodit-speech-recognize__list-item'><input ${i?.[t]??e.o.speechRecognize[t]?"checked":""} class='jodit-checkbox' type='checkbox'>&nbsp;${s}</span>`},mods:{stroke:!1}}},81629(e,t,s){"use strict";s.d(t,{N(){return i},Z(){return r}});const i=440,r=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,r=s(31635),n=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,r.Cg)([n.autobind],a)},95473(e,t,s){"use strict";s.d(t,{s(){return r}});var i=s(81629);function r({sec:e=.1,frequency:t=i.N,gain:s=.1,type:r="sine"}={}){if(void 0===window.AudioContext&&void 0===window.webkitAudioContext)return;const n=new(window.AudioContext||window.webkitAudioContext),o=n.createGain(),u=n.createOscillator();u.type=r,u.frequency.value=t,u.connect(o),o.connect(n.destination),u.start(),u.stop(n.currentTime+e),o.gain.value=s}},25202(e,t,s){"use strict";s.r(t),s.d(t,{ar(){return i},cs_cz(){return i},de(){return i},es(){return i},fa(){return i},fi(){return i},fr(){return i},he(){return i},hu(){return i},id(){return i},it(){return i},ja(){return i},ko(){return i},mn(){return i},nl(){return i},pl(){return i},pt_br(){return i},ru(){return i},tr(){return i},zh_cn(){return i},zh_tw(){return i}});var i=s(41324)},37873(e,t,s){"use strict";s.r(t),s.d(t,{SpeechRecognizeNative(){return p}});var i=s(31635),r=s(66927),n=s(55186),o=s(56298),u=s(84976),c=s(71005),a=(s(71096),s(46173)),h=s(50834),l=s(25202);class p 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)(l),(0,u.HP)(t,!1).forEach((s=>{s.split("|").forEach((i=>{i=i.trim().toLowerCase(),this._commandToWord[i]=t[s];const r=e.i18n(i);r!==i&&r.split("|").forEach((e=>{this._commandToWord[e.trim().toLowerCase()]=t[s].trim()}))}))})))}beforeDestruct(e){n.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((()=>{n.J.safeRemove(this.messagePopup)}),1e3),this.messagePopup.innerText=e+"|"}onSpeechRecognizeResult(e){this.j.async.clearTimeout(this.__hidePopupTimeout),n.J.safeRemove(this.messagePopup);const{j:t}=this,{s}=t;if(!this._checkCommand(e)){const{range:i}=s,r=s.current();if(s.isCollapsed()&&n.J.isText(r)&&n.J.isOrContains(t.editor,r)&&r.nodeValue){const n=r.nodeValue;r.nodeValue=n+(/[\u00A0 ]\uFEFF*$/.test(n)?"":" ")+e,i.setStartAfter(r),s.selectRange(i),t.synchronizeValues()}else s.insertHTML(e)}}_checkCommand(e){return e=e.toLowerCase().replace(/\./g,""),!!this._commandToWord[e]&&((0,h.F)(this.j,this._commandToWord[e]),!0)}}(0,i.Cg)([(0,r.w)(":speechRecognizeProgressResult")],p.prototype,"onSpeechRecognizeProgressResult",null),(0,i.Cg)([(0,r.w)(":speechRecognizeResult")],p.prototype,"onSpeechRecognizeResult",null),a.x.plugins.add("speech-recognize",p)},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/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.2.19
4
+ * Version: v4.2.22
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.2.19
11
+ * Version: v4.2.22
12
12
  * Url: https://xdsoft.net/jodit/
13
13
  * License(s): MIT
14
14
  */
@@ -4220,6 +4220,7 @@ a + .jodit-file-browser-tree__source-title {
4220
4220
  font-size: 14px;
4221
4221
  }
4222
4222
  .jodit-tabs .jodit-tabs__buttons {
4223
+ background-color: #f5f5f6;
4223
4224
  display: -webkit-box;
4224
4225
  display: -ms-flexbox;
4225
4226
  display: flex;
@@ -4228,6 +4229,42 @@ a + .jodit-file-browser-tree__source-title {
4228
4229
  justify-content: center;
4229
4230
  margin-top: calc(8px / 2);
4230
4231
  margin-bottom: 8px;
4232
+ padding: calc(8px / 2);
4233
+ border-radius: 3px;
4234
+ }
4235
+ .jodit-tabs .jodit-tabs__buttons .jodit-ui-button {
4236
+ color: #a5a5a5;
4237
+ }
4238
+ .jodit-tabs .jodit-tabs__buttons .jodit-ui-button svg {
4239
+ fill: #a5a5a5;
4240
+ }
4241
+ .jodit-tabs .jodit-tabs__buttons .jodit-ui-button:active:not([disabled]) {
4242
+ -webkit-box-shadow: 0 0 #0000, 0 1px 3px 0 rgba(0,0,0,.1), 0 1px 2px -1px rgba(0,0,0,.1);
4243
+ box-shadow: 0 0 #0000, 0 1px 3px 0 rgba(0,0,0,.1), 0 1px 2px -1px rgba(0,0,0,.1);
4244
+ color: rgba(0, 0, 0, 0.75);
4245
+ }
4246
+ .jodit-tabs .jodit-tabs__buttons .jodit-ui-button[aria-pressed='true']:not([disabled]) {
4247
+ -webkit-box-shadow: 0 0 #0000, 0 1px 3px 0 rgba(0,0,0,.1), 0 1px 2px -1px rgba(0,0,0,.1);
4248
+ box-shadow: 0 0 #0000, 0 1px 3px 0 rgba(0,0,0,.1), 0 1px 2px -1px rgba(0,0,0,.1);
4249
+ color: rgba(0, 0, 0, 0.75);
4250
+ }
4251
+ .jodit-tabs .jodit-tabs__buttons .jodit-ui-button:active:not([disabled]) {
4252
+ background-color: #fff;
4253
+ }
4254
+ .jodit-tabs .jodit-tabs__buttons .jodit-ui-button[aria-pressed='true']:not([disabled]) {
4255
+ background-color: #fff;
4256
+ }
4257
+ .jodit-tabs .jodit-tabs__buttons .jodit-ui-button:active:not([disabled]) .jodit-ui-button__text {
4258
+ background-color: #fff;
4259
+ }
4260
+ .jodit-tabs .jodit-tabs__buttons .jodit-ui-button[aria-pressed='true']:not([disabled]) .jodit-ui-button__text {
4261
+ background-color: #fff;
4262
+ }
4263
+ .jodit-tabs .jodit-tabs__buttons .jodit-ui-button:active:not([disabled]) svg {
4264
+ fill: rgba(0, 0, 0, 0.75);
4265
+ }
4266
+ .jodit-tabs .jodit-tabs__buttons .jodit-ui-button[aria-pressed='true']:not([disabled]) svg {
4267
+ fill: rgba(0, 0, 0, 0.75);
4231
4268
  }
4232
4269
  .jodit-tabs .jodit-tabs__buttons > * {
4233
4270
  margin-left: calc(8px / 2);
@@ -4267,6 +4304,38 @@ a + .jodit-file-browser-tree__source-title {
4267
4304
  min-width: 220px;
4268
4305
  min-height: 100px;
4269
4306
  }
4307
+ .jodit-dialog_theme_dark .jodit-tabs .jodit-tabs__buttons {
4308
+ background-color: #575757;
4309
+ border-radius: 3px;
4310
+ }
4311
+ .jodit_theme_dark .jodit-tabs .jodit-tabs__buttons {
4312
+ background-color: #575757;
4313
+ border-radius: 3px;
4314
+ }
4315
+ .jodit-dialog_theme_dark .jodit-tabs .jodit-tabs__buttons .jodit-ui-button:active:not([disabled]) .jodit-ui-button__text {
4316
+ color: #5f5c5c;
4317
+ }
4318
+ .jodit_theme_dark .jodit-tabs .jodit-tabs__buttons .jodit-ui-button:active:not([disabled]) .jodit-ui-button__text {
4319
+ color: #5f5c5c;
4320
+ }
4321
+ .jodit-dialog_theme_dark .jodit-tabs .jodit-tabs__buttons .jodit-ui-button[aria-pressed='true']:not([disabled]) .jodit-ui-button__text {
4322
+ color: #5f5c5c;
4323
+ }
4324
+ .jodit_theme_dark .jodit-tabs .jodit-tabs__buttons .jodit-ui-button[aria-pressed='true']:not([disabled]) .jodit-ui-button__text {
4325
+ color: #5f5c5c;
4326
+ }
4327
+ .jodit-dialog_theme_dark .jodit-tabs .jodit-tabs__buttons .jodit-ui-button:active:not([disabled]) svg {
4328
+ fill: rgba(0, 0, 0, 0.75);
4329
+ }
4330
+ .jodit_theme_dark .jodit-tabs .jodit-tabs__buttons .jodit-ui-button:active:not([disabled]) svg {
4331
+ fill: rgba(0, 0, 0, 0.75);
4332
+ }
4333
+ .jodit-dialog_theme_dark .jodit-tabs .jodit-tabs__buttons .jodit-ui-button[aria-pressed='true']:not([disabled]) svg {
4334
+ fill: rgba(0, 0, 0, 0.75);
4335
+ }
4336
+ .jodit_theme_dark .jodit-tabs .jodit-tabs__buttons .jodit-ui-button[aria-pressed='true']:not([disabled]) svg {
4337
+ fill: rgba(0, 0, 0, 0.75);
4338
+ }
4270
4339
 
4271
4340
  /*!
4272
4341
  * Jodit Editor (https://xdsoft.net/jodit/)
@@ -4423,6 +4492,12 @@ html.jodit_fullsize-box_true {
4423
4492
  .jodit-ui-image-properties-form__tabsBox {
4424
4493
  padding: 0 8px;
4425
4494
  }
4495
+ .jodit-dialog_theme_dark .jodit-ui-image-properties-form__imageView {
4496
+ background-color: #575757;
4497
+ }
4498
+ .jodit_theme_dark .jodit-ui-image-properties-form__imageView {
4499
+ background-color: #575757;
4500
+ }
4426
4501
  .jodit-ui-image-properties-form_lock_true::before {
4427
4502
  content: '';
4428
4503
  left: 0;