jodit 4.6.1 → 4.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/es2015/jodit.css +1 -1
  3. package/es2015/jodit.fat.min.js +2 -2
  4. package/es2015/jodit.js +46 -13
  5. package/es2015/jodit.min.js +2 -2
  6. package/es2015/plugins/debug/debug.css +1 -1
  7. package/es2015/plugins/debug/debug.js +1 -1
  8. package/es2015/plugins/debug/debug.min.js +1 -1
  9. package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
  10. package/es2015/plugins/speech-recognize/speech-recognize.js +1 -1
  11. package/es2015/plugins/speech-recognize/speech-recognize.min.js +1 -1
  12. package/es2018/jodit.css +1 -1
  13. package/es2018/jodit.fat.min.js +2 -2
  14. package/es2018/jodit.js +46 -13
  15. package/es2018/jodit.min.js +2 -2
  16. package/es2018/plugins/debug/debug.css +1 -1
  17. package/es2018/plugins/debug/debug.js +1 -1
  18. package/es2018/plugins/debug/debug.min.js +1 -1
  19. package/es2018/plugins/speech-recognize/speech-recognize.css +1 -1
  20. package/es2018/plugins/speech-recognize/speech-recognize.js +1 -1
  21. package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
  22. package/es2021/jodit.css +1 -1
  23. package/es2021/jodit.fat.min.js +2 -2
  24. package/es2021/jodit.js +46 -13
  25. package/es2021/jodit.min.js +2 -2
  26. package/es2021/plugins/debug/debug.css +1 -1
  27. package/es2021/plugins/debug/debug.js +1 -1
  28. package/es2021/plugins/debug/debug.min.js +1 -1
  29. package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
  30. package/es2021/plugins/speech-recognize/speech-recognize.js +1 -1
  31. package/es2021/plugins/speech-recognize/speech-recognize.min.js +1 -1
  32. package/es2021.en/jodit.css +1 -1
  33. package/es2021.en/jodit.fat.min.js +2 -2
  34. package/es2021.en/jodit.js +46 -13
  35. package/es2021.en/jodit.min.js +2 -2
  36. package/es2021.en/plugins/debug/debug.css +1 -1
  37. package/es2021.en/plugins/debug/debug.js +1 -1
  38. package/es2021.en/plugins/debug/debug.min.js +1 -1
  39. package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
  40. package/es2021.en/plugins/speech-recognize/speech-recognize.js +1 -1
  41. package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +1 -1
  42. package/es5/415.fat.min.js +1 -1
  43. package/es5/415.min.js +1 -1
  44. package/es5/5.fat.min.js +1 -1
  45. package/es5/5.min.js +1 -1
  46. package/es5/jodit.css +2 -2
  47. package/es5/jodit.fat.min.js +2 -2
  48. package/es5/jodit.js +51 -14
  49. package/es5/jodit.min.css +2 -2
  50. package/es5/jodit.min.js +2 -2
  51. package/es5/plugins/debug/debug.css +1 -1
  52. package/es5/plugins/debug/debug.js +1 -1
  53. package/es5/plugins/debug/debug.min.js +1 -1
  54. package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
  55. package/es5/plugins/speech-recognize/speech-recognize.js +1 -1
  56. package/es5/plugins/speech-recognize/speech-recognize.min.js +1 -1
  57. package/esm/core/constants.d.ts +7 -0
  58. package/esm/core/constants.js +31 -11
  59. package/esm/core/helpers/utils/append-script.js +1 -1
  60. package/esm/core/plugin/helpers/load.js +2 -0
  61. package/esm/core/view/view.d.ts +4 -0
  62. package/esm/core/view/view.js +10 -1
  63. package/esm/types/view.d.ts +6 -1
  64. package/package.json +1 -1
  65. package/types/core/constants.d.ts +7 -0
  66. package/types/core/view/view.d.ts +4 -0
  67. package/types/types/view.d.ts +6 -1
package/es2015/jodit.js 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.6.1
4
+ * Version: v4.6.2
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -8295,6 +8295,7 @@ __webpack_require__.r(__webpack_exports__);
8295
8295
  /* harmony export */ ACCURACY: function() { return /* binding */ ACCURACY; },
8296
8296
  /* harmony export */ APP_VERSION: function() { return /* binding */ APP_VERSION; },
8297
8297
  /* harmony export */ BASE_PATH: function() { return /* binding */ BASE_PATH; },
8298
+ /* harmony export */ BASE_PATH_IS_MIN: function() { return /* binding */ BASE_PATH_IS_MIN; },
8298
8299
  /* harmony export */ BR: function() { return /* binding */ BR; },
8299
8300
  /* harmony export */ CLIPBOARD_ID: function() { return /* binding */ CLIPBOARD_ID; },
8300
8301
  /* harmony export */ COMMAND_KEYS: function() { return /* binding */ COMMAND_KEYS; },
@@ -8363,7 +8364,7 @@ __webpack_require__.r(__webpack_exports__);
8363
8364
  * Released under MIT see LICENSE.txt in the project root for license information.
8364
8365
  * Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
8365
8366
  */
8366
- const APP_VERSION = "4.6.1";
8367
+ const APP_VERSION = "4.6.2";
8367
8368
  // prettier-ignore
8368
8369
  const ES = "es2015";
8369
8370
  const IS_ES_MODERN = true;
@@ -8535,17 +8536,30 @@ const KEY_ALIASES = {
8535
8536
  win: 'meta',
8536
8537
  windows: 'meta'
8537
8538
  };
8538
- const BASE_PATH = (() => {
8539
- if (typeof document === 'undefined') {
8540
- return '';
8539
+ const removeScriptName = (src) => {
8540
+ const parts = src.split('/');
8541
+ const isMin = true
8542
+ ? false
8543
+ : 0;
8544
+ if (/\.js/.test(parts[parts.length - 1])) {
8545
+ return {
8546
+ basePath: parts.slice(0, parts.length - 1).join('/') + '/',
8547
+ isMin
8548
+ };
8541
8549
  }
8542
- const script = globalDocument.currentScript, removeScriptName = (s) => {
8543
- const parts = s.split('/');
8544
- if (/\.js/.test(parts[parts.length - 1])) {
8545
- return parts.slice(0, parts.length - 1).join('/') + '/';
8546
- }
8547
- return s;
8550
+ return {
8551
+ basePath: src,
8552
+ isMin
8548
8553
  };
8554
+ };
8555
+ const { basePath, isMin } = (() => {
8556
+ if (typeof document === 'undefined') {
8557
+ return {
8558
+ basePath: '',
8559
+ isMin: Boolean(false)
8560
+ };
8561
+ }
8562
+ const script = globalDocument.currentScript;
8549
8563
  if (script) {
8550
8564
  return removeScriptName(script.src);
8551
8565
  }
@@ -8553,8 +8567,16 @@ const BASE_PATH = (() => {
8553
8567
  if (scripts && scripts.length) {
8554
8568
  return removeScriptName(scripts[scripts.length - 1].src);
8555
8569
  }
8556
- return globalWindow.location.href;
8570
+ return removeScriptName(globalWindow.location.href);
8557
8571
  })();
8572
+ /**
8573
+ * Path to the current script
8574
+ */
8575
+ const BASE_PATH = basePath;
8576
+ /**
8577
+ * Current script is minified
8578
+ */
8579
+ const BASE_PATH_IS_MIN = isMin;
8558
8580
  const TEMP_ATTR = 'data-jodit-temp';
8559
8581
  const lang = {};
8560
8582
  const CLIPBOARD_ID = 'clipboard';
@@ -11265,8 +11287,8 @@ const appendScriptAsync = cacheLoaders((jodit, url) => {
11265
11287
  async: true,
11266
11288
  src: (0,_complete_url__WEBPACK_IMPORTED_MODULE_0__/* .completeUrl */ .X)(url)
11267
11289
  });
11290
+ jodit.e.one(script, 'error', reject).one(script, 'load', resolve);
11268
11291
  jodit.od.body.appendChild(script);
11269
- jodit.e.on(script, 'error', reject).on(script, 'load', resolve);
11270
11292
  });
11271
11293
  });
11272
11294
  /**
@@ -13771,11 +13793,13 @@ function loadStyle(jodit, pluginName) {
13771
13793
  */
13772
13794
  function getFullUrl(jodit, name, js) {
13773
13795
  name = (0,jodit_core_helpers_string_kebab_case__WEBPACK_IMPORTED_MODULE_3__/* .kebabCase */ .k)(name);
13796
+ const min = jodit.minified ? '.min' : '';
13774
13797
  return (jodit.basePath +
13775
13798
  'plugins/' +
13776
13799
  name +
13777
13800
  '/' +
13778
13801
  name +
13802
+ min +
13779
13803
  '.' +
13780
13804
  (js ? 'js' : 'css'));
13781
13805
  }
@@ -34505,6 +34529,15 @@ let View = View_1 = class View extends jodit_core_component_component__WEBPACK_I
34505
34529
  }
34506
34530
  return jodit_core_constants__WEBPACK_IMPORTED_MODULE_3__.BASE_PATH;
34507
34531
  }
34532
+ /**
34533
+ * Plugin autoloader should load minified version of the file
34534
+ */
34535
+ get minified() {
34536
+ if (this.o.minified !== undefined) {
34537
+ return this.o.minified;
34538
+ }
34539
+ return jodit_core_constants__WEBPACK_IMPORTED_MODULE_3__.BASE_PATH_IS_MIN;
34540
+ }
34508
34541
  /**
34509
34542
  * Return a default timeout period in milliseconds for some debounce or throttle functions.
34510
34543
  * By default, `{history.timeout}` options