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/es2021/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
  */
@@ -8264,6 +8264,7 @@ __webpack_require__.r(__webpack_exports__);
8264
8264
  /* harmony export */ ACCURACY: function() { return /* binding */ ACCURACY; },
8265
8265
  /* harmony export */ APP_VERSION: function() { return /* binding */ APP_VERSION; },
8266
8266
  /* harmony export */ BASE_PATH: function() { return /* binding */ BASE_PATH; },
8267
+ /* harmony export */ BASE_PATH_IS_MIN: function() { return /* binding */ BASE_PATH_IS_MIN; },
8267
8268
  /* harmony export */ BR: function() { return /* binding */ BR; },
8268
8269
  /* harmony export */ CLIPBOARD_ID: function() { return /* binding */ CLIPBOARD_ID; },
8269
8270
  /* harmony export */ COMMAND_KEYS: function() { return /* binding */ COMMAND_KEYS; },
@@ -8332,7 +8333,7 @@ __webpack_require__.r(__webpack_exports__);
8332
8333
  * Released under MIT see LICENSE.txt in the project root for license information.
8333
8334
  * Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
8334
8335
  */
8335
- const APP_VERSION = "4.6.1";
8336
+ const APP_VERSION = "4.6.2";
8336
8337
  // prettier-ignore
8337
8338
  const ES = "es2021";
8338
8339
  const IS_ES_MODERN = true;
@@ -8504,17 +8505,30 @@ const KEY_ALIASES = {
8504
8505
  win: 'meta',
8505
8506
  windows: 'meta'
8506
8507
  };
8507
- const BASE_PATH = (() => {
8508
- if (typeof document === 'undefined') {
8509
- return '';
8508
+ const removeScriptName = (src) => {
8509
+ const parts = src.split('/');
8510
+ const isMin = true
8511
+ ? false
8512
+ : 0;
8513
+ if (/\.js/.test(parts[parts.length - 1])) {
8514
+ return {
8515
+ basePath: parts.slice(0, parts.length - 1).join('/') + '/',
8516
+ isMin
8517
+ };
8510
8518
  }
8511
- const script = globalDocument.currentScript, removeScriptName = (s) => {
8512
- const parts = s.split('/');
8513
- if (/\.js/.test(parts[parts.length - 1])) {
8514
- return parts.slice(0, parts.length - 1).join('/') + '/';
8515
- }
8516
- return s;
8519
+ return {
8520
+ basePath: src,
8521
+ isMin
8517
8522
  };
8523
+ };
8524
+ const { basePath, isMin } = (() => {
8525
+ if (typeof document === 'undefined') {
8526
+ return {
8527
+ basePath: '',
8528
+ isMin: Boolean(false)
8529
+ };
8530
+ }
8531
+ const script = globalDocument.currentScript;
8518
8532
  if (script) {
8519
8533
  return removeScriptName(script.src);
8520
8534
  }
@@ -8522,8 +8536,16 @@ const BASE_PATH = (() => {
8522
8536
  if (scripts && scripts.length) {
8523
8537
  return removeScriptName(scripts[scripts.length - 1].src);
8524
8538
  }
8525
- return globalWindow.location.href;
8539
+ return removeScriptName(globalWindow.location.href);
8526
8540
  })();
8541
+ /**
8542
+ * Path to the current script
8543
+ */
8544
+ const BASE_PATH = basePath;
8545
+ /**
8546
+ * Current script is minified
8547
+ */
8548
+ const BASE_PATH_IS_MIN = isMin;
8527
8549
  const TEMP_ATTR = 'data-jodit-temp';
8528
8550
  const lang = {};
8529
8551
  const CLIPBOARD_ID = 'clipboard';
@@ -11222,8 +11244,8 @@ const appendScriptAsync = cacheLoaders((jodit, url) => {
11222
11244
  async: true,
11223
11245
  src: (0,_complete_url__WEBPACK_IMPORTED_MODULE_0__/* .completeUrl */ .X)(url)
11224
11246
  });
11247
+ jodit.e.one(script, 'error', reject).one(script, 'load', resolve);
11225
11248
  jodit.od.body.appendChild(script);
11226
- jodit.e.on(script, 'error', reject).on(script, 'load', resolve);
11227
11249
  });
11228
11250
  });
11229
11251
  /**
@@ -13711,11 +13733,13 @@ async function loadStyle(jodit, pluginName) {
13711
13733
  */
13712
13734
  function getFullUrl(jodit, name, js) {
13713
13735
  name = (0,jodit_core_helpers_string_kebab_case__WEBPACK_IMPORTED_MODULE_2__/* .kebabCase */ .k)(name);
13736
+ const min = jodit.minified ? '.min' : '';
13714
13737
  return (jodit.basePath +
13715
13738
  'plugins/' +
13716
13739
  name +
13717
13740
  '/' +
13718
13741
  name +
13742
+ min +
13719
13743
  '.' +
13720
13744
  (js ? 'js' : 'css'));
13721
13745
  }
@@ -34470,6 +34494,15 @@ let View = View_1 = class View extends jodit_core_component_component__WEBPACK_I
34470
34494
  }
34471
34495
  return jodit_core_constants__WEBPACK_IMPORTED_MODULE_3__.BASE_PATH;
34472
34496
  }
34497
+ /**
34498
+ * Plugin autoloader should load minified version of the file
34499
+ */
34500
+ get minified() {
34501
+ if (this.o.minified !== undefined) {
34502
+ return this.o.minified;
34503
+ }
34504
+ return jodit_core_constants__WEBPACK_IMPORTED_MODULE_3__.BASE_PATH_IS_MIN;
34505
+ }
34473
34506
  /**
34474
34507
  * Return a default timeout period in milliseconds for some debounce or throttle functions.
34475
34508
  * By default, `{history.timeout}` options