jodit 3.8.4 → 3.8.8

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 (245) hide show
  1. package/.idea/workspace.xml +165 -1308
  2. package/{.stylelintrc.json → .stylelintrc} +2 -1
  3. package/CHANGELOG.MD +54 -14
  4. package/build/jodit.css +280 -258
  5. package/build/jodit.es2018.css +231 -213
  6. package/build/jodit.es2018.en.css +231 -213
  7. package/build/jodit.es2018.en.js +9453 -9409
  8. package/build/jodit.es2018.en.min.css +1 -1
  9. package/build/jodit.es2018.en.min.js +1 -10
  10. package/build/jodit.es2018.js +13482 -13438
  11. package/build/jodit.es2018.min.css +1 -1
  12. package/build/jodit.es2018.min.js +1 -10
  13. package/build/jodit.js +9064 -9013
  14. package/build/jodit.min.css +2 -2
  15. package/build/jodit.min.js +1 -10
  16. package/build-system/index.js +78 -0
  17. package/{src/utils → build-system/loaders}/css-variables-prefixes.js +0 -0
  18. package/{src/utils → build-system/loaders}/lang-loader.js +0 -0
  19. package/build-system/loaders/style.js +31 -0
  20. package/{src/utils → build-system/loaders}/svg-loader.js +1 -0
  21. package/build-system/minimizer/css.js +20 -0
  22. package/build-system/minimizer/index.js +7 -0
  23. package/build-system/minimizer/js.js +41 -0
  24. package/{src/utils/plugin-loader.js → build-system/plugins/banner.js} +7 -6
  25. package/build-system/plugins/define.js +22 -0
  26. package/build-system/plugins/extract-css.js +14 -0
  27. package/build-system/plugins/index.js +31 -0
  28. package/build-system/plugins/post-build.js +52 -0
  29. package/build-system/rules/css.js +12 -0
  30. package/build-system/rules/extra-typescript.js +22 -0
  31. package/build-system/rules/index.js +17 -0
  32. package/build-system/rules/internal-typescript.js +23 -0
  33. package/build-system/rules/langs.js +20 -0
  34. package/build-system/rules/svg.js +19 -0
  35. package/build-system/utils/filename.js +17 -0
  36. package/{src → build-system}/utils/post-build.js +0 -0
  37. package/build-system/variables.js +53 -0
  38. package/package.json +34 -33
  39. package/src/config.ts +8 -14
  40. package/src/core/ajax.ts +16 -46
  41. package/src/core/async.ts +6 -17
  42. package/src/core/component/view-component.ts +0 -1
  43. package/src/core/constants.ts +5 -5
  44. package/src/core/create.ts +8 -27
  45. package/src/core/decorators/debounce.ts +0 -8
  46. package/src/core/decorators/hook.ts +0 -1
  47. package/src/core/decorators/nonenumerable.ts +1 -2
  48. package/src/core/decorators/persistent.ts +0 -3
  49. package/src/core/decorators/spy.ts +0 -1
  50. package/src/core/decorators/wait.ts +0 -1
  51. package/src/core/dom.ts +56 -114
  52. package/src/core/events/events-native.ts +52 -26
  53. package/src/core/events/observe-object.ts +0 -2
  54. package/src/core/global.ts +10 -6
  55. package/src/core/helpers/append-script.ts +0 -8
  56. package/src/core/helpers/array/as-array.ts +2 -5
  57. package/src/core/helpers/array/split-array.ts +0 -1
  58. package/src/core/helpers/async/set-timeout.ts +0 -7
  59. package/src/core/helpers/browser.ts +0 -1
  60. package/src/core/helpers/checker/has-browser-color-picker.ts +0 -3
  61. package/src/core/helpers/checker/is-array.ts +0 -1
  62. package/src/core/helpers/checker/is-equal.ts +0 -3
  63. package/src/core/helpers/checker/is-function.ts +0 -2
  64. package/src/core/helpers/checker/is-html-from-word.ts +0 -3
  65. package/src/core/helpers/checker/is-html.ts +0 -1
  66. package/src/core/helpers/checker/is-number.ts +0 -1
  67. package/src/core/helpers/checker/is-numeric.ts +0 -2
  68. package/src/core/helpers/checker/is-plain-object.ts +0 -1
  69. package/src/core/helpers/checker/is-string.ts +0 -1
  70. package/src/core/helpers/checker/is-url.ts +0 -4
  71. package/src/core/helpers/color/color-to-hex.ts +2 -2
  72. package/src/core/helpers/config-proto.ts +0 -3
  73. package/src/core/helpers/convert-media-url-to-video-embed.ts +1 -6
  74. package/src/core/helpers/ctrl-key.ts +1 -3
  75. package/src/core/helpers/data-bind.ts +0 -6
  76. package/src/core/helpers/default-language.ts +0 -3
  77. package/src/core/helpers/each.ts +12 -0
  78. package/src/core/helpers/html/htmlspecialchars.ts +0 -4
  79. package/src/core/helpers/html/nl2br.ts +0 -1
  80. package/src/core/helpers/human-size-to-bytes.ts +1 -4
  81. package/src/core/helpers/normalize/normalize-color.ts +2 -3
  82. package/src/core/helpers/normalize/normalize-key-aliases.ts +0 -2
  83. package/src/core/helpers/normalize/normalize-path.ts +0 -2
  84. package/src/core/helpers/normalize/normalize-size.ts +0 -3
  85. package/src/core/helpers/selector.ts +0 -8
  86. package/src/core/helpers/size/get-content-width.ts +0 -2
  87. package/src/core/helpers/size/offset.ts +1 -7
  88. package/src/core/helpers/size/position.ts +0 -4
  89. package/src/core/helpers/string/camel-case.ts +1 -2
  90. package/src/core/helpers/string/i18n.ts +0 -7
  91. package/src/core/helpers/string/kebab-case.ts +7 -5
  92. package/src/core/helpers/string/stringify.ts +0 -3
  93. package/src/core/helpers/string/trim.ts +0 -2
  94. package/src/core/helpers/string/ucfirst.ts +2 -5
  95. package/src/core/helpers/type.ts +0 -1
  96. package/src/core/helpers/utils/get.ts +0 -2
  97. package/src/core/helpers/utils/mark-deprecated.ts +0 -4
  98. package/src/core/helpers/utils/set.ts +0 -2
  99. package/src/core/helpers/utils/utils.ts +35 -14
  100. package/src/core/plugin-system.ts +0 -31
  101. package/src/core/selection/select.ts +15 -13
  102. package/src/core/selection/style/api/is-normal-node.ts +1 -2
  103. package/src/core/selection/style/api/toggle-styles.ts +0 -2
  104. package/src/core/selection/style/apply-style.ts +6 -2
  105. package/src/core/traits/mods.ts +1 -3
  106. package/src/core/ui/button/button/button.less +7 -3
  107. package/src/core/ui/button/button/button.ts +1 -1
  108. package/src/core/ui/button/group/group.less +5 -5
  109. package/src/core/ui/element.ts +0 -4
  110. package/src/core/ui/form/inputs/file/file.less +4 -4
  111. package/src/core/ui/form/validators/input.ts +0 -2
  112. package/src/core/ui/form/validators/select.ts +0 -1
  113. package/src/core/ui/helpers/get-control-type.ts +0 -2
  114. package/src/core/ui/icon.ts +0 -10
  115. package/src/core/ui/list/group.less +1 -1
  116. package/src/core/ui/list/group.ts +1 -6
  117. package/src/core/ui/list/list.ts +0 -3
  118. package/src/core/ui/popup/popup.ts +0 -11
  119. package/src/core/ui/progress-bar/progress-bar.less +8 -8
  120. package/src/core/view/view-with-toolbar.ts +0 -5
  121. package/src/core/view/view.ts +2 -18
  122. package/src/index.ts +1 -1
  123. package/src/jodit.ts +14 -70
  124. package/src/modules/context-menu/context-menu.ts +3 -6
  125. package/src/modules/dialog/alert.ts +0 -6
  126. package/src/modules/dialog/confirm.ts +1 -1
  127. package/src/modules/dialog/dialog.ts +22 -55
  128. package/src/modules/dialog/prompt.ts +3 -5
  129. package/src/modules/image-editor/image-editor.less +51 -46
  130. package/src/modules/status-bar/status-bar.less +12 -12
  131. package/src/modules/status-bar/status-bar.ts +0 -3
  132. package/src/modules/table.ts +17 -6
  133. package/src/modules/toolbar/button/button.less +5 -6
  134. package/src/modules/toolbar/button/button.ts +1 -1
  135. package/src/modules/toolbar/button/content.less +2 -2
  136. package/src/modules/widget/color-picker/color-picker.less +7 -6
  137. package/src/modules/widget/tabs/tabs.less +3 -3
  138. package/src/plugins/about/about.less +1 -1
  139. package/src/plugins/add-new-line/add-new-line.less +14 -15
  140. package/src/plugins/add-new-line/add-new-line.ts +1 -1
  141. package/src/plugins/clipboard/paste-storage/paste-storage.less +10 -11
  142. package/src/plugins/fix/clean-html.ts +2 -2
  143. package/src/plugins/fix/wrap-text-nodes.ts +1 -2
  144. package/src/plugins/fullsize/fullsize.less +5 -5
  145. package/src/plugins/image/image-properties/image-properties.less +11 -7
  146. package/src/plugins/image/image-properties/image-properties.ts +11 -8
  147. package/src/plugins/placeholder/placeholder.less +4 -4
  148. package/src/plugins/resizer/resizer.less +28 -23
  149. package/src/plugins/search/search.less +25 -25
  150. package/src/plugins/source/source.less +15 -15
  151. package/src/plugins/xpath/xpath.less +3 -3
  152. package/src/styles/form.less +19 -14
  153. package/src/styles/modules/button-group.less +2 -2
  154. package/src/styles/modules/icon.less +9 -8
  155. package/src/types/ajax.d.ts +28 -0
  156. package/src/types/async.d.ts +4 -3
  157. package/src/types/events.d.ts +15 -0
  158. package/tsconfig.json +1 -1
  159. package/types/config.d.ts +8 -14
  160. package/types/core/ajax.d.ts +6 -29
  161. package/types/core/async.d.ts +2 -15
  162. package/types/core/component/view-component.d.ts +0 -1
  163. package/types/core/constants.d.ts +5 -5
  164. package/types/core/create.d.ts +0 -4
  165. package/types/core/decorators/debounce.d.ts +0 -8
  166. package/types/core/decorators/hook.d.ts +0 -1
  167. package/types/core/decorators/nonenumerable.d.ts +1 -2
  168. package/types/core/decorators/persistent.d.ts +0 -3
  169. package/types/core/decorators/wait.d.ts +0 -1
  170. package/types/core/dom.d.ts +25 -112
  171. package/types/core/events/events-native.d.ts +18 -17
  172. package/types/core/events/observe-object.d.ts +0 -2
  173. package/types/core/global.d.ts +0 -4
  174. package/types/core/helpers/append-script.d.ts +0 -8
  175. package/types/core/helpers/array/as-array.d.ts +3 -0
  176. package/types/core/helpers/array/split-array.d.ts +0 -1
  177. package/types/core/helpers/async/set-timeout.d.ts +0 -7
  178. package/types/core/helpers/browser.d.ts +0 -1
  179. package/types/core/helpers/checker/has-browser-color-picker.d.ts +0 -3
  180. package/types/core/helpers/checker/is-array.d.ts +0 -1
  181. package/types/core/helpers/checker/is-equal.d.ts +0 -3
  182. package/types/core/helpers/checker/is-function.d.ts +0 -2
  183. package/types/core/helpers/checker/is-html-from-word.d.ts +0 -3
  184. package/types/core/helpers/checker/is-html.d.ts +0 -1
  185. package/types/core/helpers/checker/is-number.d.ts +0 -1
  186. package/types/core/helpers/checker/is-numeric.d.ts +0 -2
  187. package/types/core/helpers/checker/is-plain-object.d.ts +0 -1
  188. package/types/core/helpers/checker/is-string.d.ts +0 -1
  189. package/types/core/helpers/checker/is-url.d.ts +0 -4
  190. package/types/core/helpers/color/color-to-hex.d.ts +2 -2
  191. package/types/core/helpers/config-proto.d.ts +0 -3
  192. package/types/core/helpers/convert-media-url-to-video-embed.d.ts +1 -6
  193. package/types/core/helpers/ctrl-key.d.ts +1 -3
  194. package/types/core/helpers/data-bind.d.ts +0 -6
  195. package/types/core/helpers/default-language.d.ts +0 -3
  196. package/types/core/helpers/each.d.ts +9 -0
  197. package/types/core/helpers/html/htmlspecialchars.d.ts +0 -4
  198. package/types/core/helpers/html/nl2br.d.ts +0 -1
  199. package/types/core/helpers/human-size-to-bytes.d.ts +1 -4
  200. package/types/core/helpers/normalize/normalize-color.d.ts +2 -3
  201. package/types/core/helpers/normalize/normalize-key-aliases.d.ts +0 -2
  202. package/types/core/helpers/normalize/normalize-path.d.ts +0 -2
  203. package/types/core/helpers/normalize/normalize-size.d.ts +0 -3
  204. package/types/core/helpers/selector.d.ts +0 -8
  205. package/types/core/helpers/size/get-content-width.d.ts +0 -2
  206. package/types/core/helpers/size/offset.d.ts +1 -7
  207. package/types/core/helpers/string/camel-case.d.ts +1 -2
  208. package/types/core/helpers/string/i18n.d.ts +0 -7
  209. package/types/core/helpers/string/kebab-case.d.ts +1 -5
  210. package/types/core/helpers/string/stringify.d.ts +0 -3
  211. package/types/core/helpers/string/trim.d.ts +0 -2
  212. package/types/core/helpers/string/ucfirst.d.ts +1 -4
  213. package/types/core/helpers/type.d.ts +0 -1
  214. package/types/core/helpers/utils/get.d.ts +0 -2
  215. package/types/core/helpers/utils/mark-deprecated.d.ts +0 -4
  216. package/types/core/helpers/utils/set.d.ts +0 -2
  217. package/types/core/helpers/utils/utils.d.ts +4 -15
  218. package/types/core/plugin-system.d.ts +0 -31
  219. package/types/core/selection/select.d.ts +8 -9
  220. package/types/core/selection/style/api/toggle-styles.d.ts +0 -2
  221. package/types/core/traits/mods.d.ts +1 -3
  222. package/types/core/ui/element.d.ts +0 -4
  223. package/types/core/ui/form/validators/input.d.ts +0 -2
  224. package/types/core/ui/form/validators/select.d.ts +0 -1
  225. package/types/core/ui/helpers/get-control-type.d.ts +0 -2
  226. package/types/core/ui/icon.d.ts +0 -10
  227. package/types/core/ui/list/group.d.ts +1 -6
  228. package/types/core/ui/list/list.d.ts +0 -3
  229. package/types/core/ui/popup/popup.d.ts +0 -11
  230. package/types/core/view/view-with-toolbar.d.ts +0 -5
  231. package/types/core/view/view.d.ts +2 -18
  232. package/types/index.d.ts +1 -1
  233. package/types/jodit.d.ts +2 -46
  234. package/types/modules/context-menu/context-menu.d.ts +3 -6
  235. package/types/modules/dialog/alert.d.ts +0 -6
  236. package/types/modules/dialog/confirm.d.ts +1 -1
  237. package/types/modules/dialog/dialog.d.ts +9 -29
  238. package/types/modules/dialog/prompt.d.ts +3 -5
  239. package/types/modules/status-bar/status-bar.d.ts +0 -3
  240. package/types/modules/table.d.ts +1 -1
  241. package/types/types/ajax.d.ts +28 -0
  242. package/types/types/async.d.ts +4 -3
  243. package/types/types/events.d.ts +15 -0
  244. package/src/utils/create-entries.js +0 -57
  245. package/src/utils/lang-translater.js +0 -142
@@ -8,6 +8,10 @@
8
8
  */
9
9
  import type { CallbackFunction, IEventsNative } from '../../types';
10
10
  export declare class EventsNative implements IEventsNative {
11
+ private mutedEvents;
12
+ mute(event?: string): this;
13
+ isMuted(event?: string): boolean;
14
+ unmute(event?: string): this;
11
15
  readonly __key: string;
12
16
  private doc;
13
17
  private eachEvent;
@@ -34,11 +38,11 @@ export declare class EventsNative implements IEventsNative {
34
38
  /**
35
39
  * Sets the handler for the specified event ( Event List ) for a given element .
36
40
  *
37
- * @param {object|string} subjectOrEvents - The object for which toWYSIWYG set an event handler
38
- * @param {string|Function} eventsOrCallback - List of events , separated by a space or comma
39
- * @param {function} [handlerOrSelector] - The event handler
40
- * @param {selector} [selector] - Selector for capturing
41
- * @param {Boolean} [onTop=false] - Set handler in first
41
+ * @param subjectOrEvents - The object for which toWYSIWYG set an event handler
42
+ * @param eventsOrCallback - List of events , separated by a space or comma
43
+ * @param handlerOrSelector - The event handler
44
+ * @param selector - Selector for capturing
45
+ * @param onTop - Set handler in first
42
46
  *
43
47
  * @example
44
48
  * ```javascript
@@ -62,10 +66,10 @@ export declare class EventsNative implements IEventsNative {
62
66
  /**
63
67
  * Disable all handlers specified event ( Event List ) for a given element. Either a specific event handler.
64
68
  *
65
- * @param {object} subjectOrEvents - The object which is disabled handlers
66
- * @param {string|Function} [eventsOrCallback] - List of events, separated by a space or comma , which is necessary
69
+ * @param subjectOrEvents - The object which is disabled handlers
70
+ * @param eventsOrCallback - List of events, separated by a space or comma , which is necessary
67
71
  * toWYSIWYG disable the handlers for a given object
68
- * @param {function} [handler] - Specific event handler toWYSIWYG be removed
72
+ * @param handler - Specific event handler toWYSIWYG be removed
69
73
  *
70
74
  * @example
71
75
  * ```javascript
@@ -94,9 +98,6 @@ export declare class EventsNative implements IEventsNative {
94
98
  off(subject: object, events?: string, handler?: CallbackFunction): this;
95
99
  /**
96
100
  * Stop execute all another listeners for this event
97
- *
98
- * @param subjectOrEvents
99
- * @param eventsList
100
101
  */
101
102
  stopPropagation(events: string): void;
102
103
  stopPropagation(subject: object, eventsList: string): void;
@@ -106,10 +107,10 @@ export declare class EventsNative implements IEventsNative {
106
107
  /**
107
108
  * Sets the handler for the specified event (Event List) for a given element .
108
109
  *
109
- * @param {object|string} subjectOrEvents - The object which is caused by certain events
110
- * @param {string|Array} eventsList - List of events , separated by a space or comma
111
- * @param {Array} [args] - Options for the event handler
112
- * @return {boolean} `false` if one of the handlers return `false`
110
+ * @param subjectOrEvents - The object which is caused by certain events
111
+ * @param eventsList - List of events , separated by a space or comma
112
+ * @param args - Options for the event handler
113
+ * @returns `false` if one of the handlers return `false`
113
114
  * @example
114
115
  * ```javascript
115
116
  * var dialog = new Jodit.modules.Dialog();
@@ -119,13 +120,13 @@ export declare class EventsNative implements IEventsNative {
119
120
  * dialog.open('Hello world!!!');
120
121
  * ```
121
122
  * or you can trigger native browser listener
122
- * ```javascript
123
+ * ```javascript
123
124
  * var events = new Jodit.modules.EventsNative();
124
125
  * events.on(document.body, 'click',function (event) {
125
126
  * alert('click on ' + event.target.id );
126
127
  * });
127
128
  * events.fire(document.body.querySelector('div'), 'click');
128
- * ```
129
+ * ```
129
130
  *
130
131
  */
131
132
  fire(subjectOrEvents: string, ...args: any[]): any;
@@ -13,8 +13,6 @@ export declare class ObserveObject {
13
13
  toString(): string;
14
14
  /**
15
15
  * Add listener on some changes
16
- * @param event
17
- * @param callback
18
16
  */
19
17
  on(event: string | string[], callback: CallbackFunction): this;
20
18
  private __lockEvent;
@@ -17,10 +17,6 @@ export declare const lang: IDictionary<IDictionary<string>>;
17
17
  export declare const extendLang: (langs: IDictionary) => void;
18
18
  /**
19
19
  * Create unique box(HTMLCotainer) and remove it after destroy
20
- *
21
- * @param jodit
22
- * @param name
23
- * @param [tag]
24
20
  */
25
21
  export declare function getContainer<T extends HTMLTagNames = HTMLTagNames>(jodit: IViewBased | IViewComponent, classFunc: Function, tag?: T, createInsideEditor?: boolean): HTMLElementTagNameMap[T];
26
22
  /**
@@ -11,11 +11,6 @@ export interface CallbackAndElement {
11
11
  }
12
12
  /**
13
13
  * Append script in document and call callback function after download
14
- *
15
- * @param url
16
- * @param callback
17
- * @param className
18
- * @param doc
19
14
  */
20
15
  export declare const appendScript: (jodit: IViewBased, url: string, callback: (this: HTMLElement, e?: Event | undefined) => any) => CallbackAndElement;
21
16
  /**
@@ -24,9 +19,6 @@ export declare const appendScript: (jodit: IViewBased, url: string, callback: (t
24
19
  export declare const appendScriptAsync: Loader;
25
20
  /**
26
21
  * Download CSS style script
27
- *
28
- * @param url
29
- * @param doc
30
22
  */
31
23
  export declare const appendStyleAsync: Loader;
32
24
  export declare const loadNext: (jodit: IViewBased, urls: string[], i?: number) => Promise<void>;
@@ -3,4 +3,7 @@
3
3
  * Released under MIT see LICENSE.txt in the project root for license information.
4
4
  * Copyright (c) 2013-2021 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
5
5
  */
6
+ /**
7
+ * Always return Array
8
+ */
6
9
  export declare const asArray: <T>(a: T | T[]) => T[];
@@ -5,7 +5,6 @@
5
5
  */
6
6
  /**
7
7
  * Split separated elements
8
- * @param a
9
8
  */
10
9
  export declare function splitArray(a: string): string[];
11
10
  export declare function splitArray<T extends any[]>(a: T): T;
@@ -5,16 +5,9 @@
5
5
  */
6
6
  /**
7
7
  * Create async callback if set timeout value - else call function immediately
8
- *
9
- * @param callback
10
- * @param timeout
11
- * @param a1
12
- * @param a2
13
- * @param a3
14
8
  */
15
9
  export declare function setTimeout<T = any>(callback: (...args: T[]) => void, timeout: number, ...args: T[]): number;
16
10
  /**
17
11
  * Clear timeout
18
- * @param timer
19
12
  */
20
13
  export declare function clearTimeout(timer: number): void;
@@ -5,7 +5,6 @@
5
5
  */
6
6
  /**
7
7
  * Module returns method that is used to determine the browser
8
- * @params {Object} parent main Jodit object
9
8
  * @example
10
9
  * ```javascript
11
10
  * console.log(Jodit.modules.Helpers.browser('mse'));
@@ -5,8 +5,5 @@
5
5
  */
6
6
  /**
7
7
  * Check if browser has a color picker (a new HTML5 attribute for input tag)
8
- *
9
- * @method hasBrowserColorPicker
10
- * @return {boolean}
11
8
  */
12
9
  export declare function hasBrowserColorPicker(): boolean;
@@ -5,6 +5,5 @@
5
5
  */
6
6
  /**
7
7
  * Check if element is array
8
- * @param elm
9
8
  */
10
9
  export declare function isArray<T = any>(elm: unknown): elm is T[];
@@ -5,9 +5,6 @@
5
5
  */
6
6
  /**
7
7
  * Check two element are equal
8
- *
9
- * @param a
10
- * @param b
11
8
  */
12
9
  export declare function isEqual(a: unknown, b: unknown): boolean;
13
10
  export declare function isFastEqual(a: unknown, b: unknown): boolean;
@@ -5,7 +5,5 @@
5
5
  */
6
6
  /**
7
7
  * Check value is Function
8
- *
9
- * @param value
10
8
  */
11
9
  export declare function isFunction(value: unknown): value is Function;
@@ -5,8 +5,5 @@
5
5
  */
6
6
  /**
7
7
  * Detect if string is HTML from MS Word or Excel
8
- *
9
- * @param {string} data
10
- * @return {boolean}
11
8
  */
12
9
  export declare function isHtmlFromWord(data: string): boolean;
@@ -5,6 +5,5 @@
5
5
  */
6
6
  /**
7
7
  * Check if a string is html or not
8
- ** @param str
9
8
  */
10
9
  export declare const isHTML: (str: unknown) => str is string;
@@ -5,6 +5,5 @@
5
5
  */
6
6
  /**
7
7
  * Check value is a number
8
- * @param value
9
8
  */
10
9
  export declare function isNumber(value: unknown): value is number;
@@ -5,7 +5,5 @@
5
5
  */
6
6
  /**
7
7
  * Check value has numeric format
8
- *
9
- * @param value
10
8
  */
11
9
  export declare function isNumeric(value: number | string): boolean;
@@ -6,6 +6,5 @@
6
6
  import type { IDictionary } from '../../../types';
7
7
  /**
8
8
  * Check if element is simple plaint object
9
- * @param obj
10
9
  */
11
10
  export declare function isPlainObject<T>(obj: any | IDictionary<T>): obj is IDictionary<T>;
@@ -5,6 +5,5 @@
5
5
  */
6
6
  /**
7
7
  * Check value is String
8
- * @param value
9
8
  */
10
9
  export declare function isString(value: unknown): value is string;
@@ -5,9 +5,5 @@
5
5
  */
6
6
  /**
7
7
  * Check if a string is a url
8
- *
9
- * @method isURL
10
- * @param {string} str
11
- * @return {boolean}
12
8
  */
13
9
  export declare function isURL(str: string): boolean;
@@ -6,8 +6,8 @@
6
6
  /**
7
7
  * Converts rgba text representation of color in hex
8
8
  *
9
- * @param {string} color - string like rgba(red, green, blue, alpha) or rgb(red, green, blue)
10
- * @return {string | NaN} hex color view, NaN - for transparent color
9
+ * @param color - string like rgba(red, green, blue, alpha) or rgb(red, green, blue)
10
+ * @returns hex color view, NaN - for transparent color
11
11
  * @example
12
12
  * ```javascript
13
13
  * var p = document.createElement('p');
@@ -33,9 +33,6 @@ import type { IDictionary } from '../../types';
33
33
  * console.log(options.d.g); // 8
34
34
  *
35
35
  * ```
36
- * @param options
37
- * @param proto
38
- * @param level
39
36
  */
40
37
  export declare function ConfigProto(options: IDictionary, proto: IDictionary, deep?: number): IDictionary;
41
38
  export declare function ConfigFlatten(obj: IDictionary): IDictionary;
@@ -4,11 +4,6 @@
4
4
  * Copyright (c) 2013-2021 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
5
5
  */
6
6
  /**
7
- * Javascript url pattern converter replace youtube/vimeo url in embed code.
8
- *
9
- * @param {string} url
10
- * @param {int} [width=400]
11
- * @param {int} [height=345]
12
- * return {string} embed code
7
+ * Javascript url pattern converter replace youtube/vimeo url in embed code.
13
8
  */
14
9
  export declare const convertMediaUrlToVideoEmbed: (url: string, width?: number, height?: number) => string;
@@ -5,8 +5,6 @@
5
5
  */
6
6
  /**
7
7
  * CTRL pressed
8
- *
9
- * @param {KeyboardEvent} e Event
10
- * @return {boolean} true ctrl key was pressed
8
+ * @returns true ctrl key was pressed
11
9
  */
12
10
  export declare const ctrlKey: (e: MouseEvent | KeyboardEvent) => boolean;
@@ -4,10 +4,4 @@
4
4
  * Copyright (c) 2013-2021 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
5
5
  */
6
6
  import type { IViewComponent } from '../../types';
7
- /**
8
- *
9
- * @param elm
10
- * @param key
11
- * @param value
12
- */
13
7
  export declare const dataBind: <T = any>(elm: IViewComponent | Node | object, key: string, value?: T | undefined) => T;
@@ -5,8 +5,5 @@
5
5
  */
6
6
  /**
7
7
  * Try define user language
8
- *
9
- * @param language
10
- * @param defaultLanguage
11
8
  */
12
9
  export declare const defaultLanguage: (language?: string | undefined, defaultLanguage?: string) => string;
@@ -5,7 +5,16 @@
5
5
  */
6
6
  import type { IDictionary } from '../../types';
7
7
  declare type eachCallback<T, N> = (this: T, key: N, value: T) => boolean | void;
8
+ /**
9
+ * @deprecated Use Object.keys
10
+ */
8
11
  export declare function each<T>(obj: T[], callback: eachCallback<T, number>): boolean;
12
+ /**
13
+ * @deprecated Use Object.keys
14
+ */
9
15
  export declare function each<T>(obj: IDictionary<T>, callback: eachCallback<T, string>): boolean;
16
+ /**
17
+ * @deprecated Use Object.keys
18
+ */
10
19
  export declare function each<T>(obj: T[] | IDictionary<T>, callback: eachCallback<T, number | string>): boolean;
11
20
  export {};
@@ -5,9 +5,5 @@
5
5
  */
6
6
  /**
7
7
  * Convert special characters to HTML entities
8
- *
9
- * @method htmlspecialchars
10
- * @param {string} html
11
- * @return {string}
12
8
  */
13
9
  export declare function htmlspecialchars(html: string): string;
@@ -5,6 +5,5 @@
5
5
  */
6
6
  /**
7
7
  * Inserts HTML line breaks before all newlines in a string
8
- * @param html
9
8
  */
10
9
  export declare function nl2br(html: string): string;
@@ -5,9 +5,6 @@
5
5
  */
6
6
  /**
7
7
  * Converts from human readable file size (kb,mb,gb,tb) to bytes
8
- *
9
- * @method humanSizeToBytes
10
- * @param {string|int} human readable file size. Example 1gb or 11.2mb
11
- * @return {int}
8
+ * @param human - readable file size. Example 1gb or 11.2mb
12
9
  */
13
10
  export declare const humanSizeToBytes: (human: string) => number;
@@ -6,8 +6,7 @@
6
6
  /**
7
7
  * Convert rgba and short HEX color to Full text color. #fff to #FFFFFF
8
8
  *
9
- * @method normalizeColor
10
- * @param {string} colorInput - string like rgba(red, green, blue, alpha) or rgb(red, green, blue) or #fff or #ffffff
11
- * @return {string|boolean} HEX color, false - for transparent color
9
+ * @param colorInput - string like rgba(red, green, blue, alpha) or rgb(red, green, blue) or #fff or #ffffff
10
+ * @returns HEX color, false - for transparent color
12
11
  */
13
12
  export declare const normalizeColor: (colorInput: string) => string | false;
@@ -5,7 +5,5 @@
5
5
  */
6
6
  /**
7
7
  * Normalize keys to some standard name
8
- *
9
- * @param keys
10
8
  */
11
9
  export declare function normalizeKeyAliases(keys: string): string;
@@ -5,7 +5,5 @@
5
5
  */
6
6
  /**
7
7
  * Replaces back slashes and correctly concatenates several parts of the path.
8
- * @param path
9
- * @see Test helpers
10
8
  */
11
9
  export declare const normalizePath: (...path: string[]) => string;
@@ -5,8 +5,5 @@
5
5
  */
6
6
  /**
7
7
  * Normalize value to CSS meters
8
- * @method normalizeSize
9
- * @param {string|int} value Input string
10
- * @return {string}
11
8
  */
12
9
  export declare const normalizeSize: (value: string | number) => string;
@@ -23,25 +23,17 @@ export declare function $$<K extends HTMLTagNames>(selector: K, root: HTMLElemen
23
23
  export declare function $$<T extends HTMLElement>(selector: string, root: HTMLElement | HTMLDocument): T[];
24
24
  /**
25
25
  * Calculate XPath selector
26
- *
27
- * @param element
28
- * @param root
29
26
  */
30
27
  export declare const getXPathByElement: (element: HTMLElement, root: HTMLElement) => string;
31
28
  /**
32
29
  * Find all `ref` or `data-ref` elements inside HTMLElement
33
- * @param root
34
30
  */
35
31
  export declare const refs: <T extends HTMLElement>(root: HTMLElement | UIElement) => IDictionary<T>;
36
32
  /**
37
33
  * Calculate full CSS selector
38
- * @param el
39
34
  */
40
35
  export declare const cssPath: (el: Element) => Nullable<string>;
41
36
  /**
42
37
  * Try to find element by selector
43
- *
44
- * @param element
45
- * @param od
46
38
  */
47
39
  export declare function resolveElement(element: string | HTMLElement, od: ShadowRoot | Document): HTMLElement;
@@ -5,7 +5,5 @@
5
5
  */
6
6
  /**
7
7
  *
8
- * @param element
9
- * @param win
10
8
  */
11
9
  export declare const getContentWidth: (element: HTMLElement, win: Window) => number;
@@ -5,13 +5,7 @@
5
5
  */
6
6
  /**
7
7
  * Calc relative offset by start editor field
8
- *
9
- * @method offset
10
- * @param {HTMLElement} elm
11
- * @param {Jodit} jodit
12
- * @param {Document} doc
13
- * @param {boolean} recurse
14
- * @return {{top: number, left: number}} returns an object containing the properties top and left.
8
+ * @returns returns an object containing the properties top and left.
15
9
  */
16
10
  import type { IBound, IViewBased } from '../../../types';
17
11
  export declare const offset: (elm: HTMLElement | Range, jodit: IViewBased, doc: Document, recurse?: boolean) => IBound;
@@ -4,7 +4,6 @@
4
4
  * Copyright (c) 2013-2021 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
5
5
  */
6
6
  /**
7
- * Convert (kebab-case or snake_case) => camelCase
8
- * @param key
7
+ * Convert (kebab-case or snake_case) to camelCase
9
8
  */
10
9
  export declare const camelCase: (key: string) => string;
@@ -6,17 +6,10 @@
6
6
  import type { ILanguageOptions } from '../../../types';
7
7
  /**
8
8
  * Simple variant sprintf function
9
- *
10
- * @param str
11
- * @param args
12
9
  */
13
10
  export declare const sprintf: (str: string, args?: (string | number)[] | undefined) => string;
14
11
  /**
15
12
  * Internationalization method. Uses Jodit.lang object
16
- *
17
- * @param {string} key Some text
18
- * @param {string[]} params Some text
19
- * @return {string}
20
13
  * @example
21
14
  * ```javascript
22
15
  * var editor = new Jodit("#redactor", {
@@ -3,9 +3,5 @@
3
3
  * Released under MIT see LICENSE.txt in the project root for license information.
4
4
  * Copyright (c) 2013-2021 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
5
5
  */
6
- /**
7
- *
8
- * @param key
9
- * @return {string}
10
- */
11
6
  export declare const kebabCase: (key: string) => string;
7
+ export declare const CamelCaseToKebabCase: (key: string) => string;
@@ -5,9 +5,6 @@
5
5
  */
6
6
  /**
7
7
  * Safe stringify circular object
8
- *
9
- * @param value
10
- * @param options
11
8
  */
12
9
  export declare function stringify(value: unknown, options?: {
13
10
  excludeKeys?: string[];
@@ -6,11 +6,9 @@
6
6
  /**
7
7
  * It clears the line of all auxiliary invisible characters , from the spaces and line breaks , tabs
8
8
  * from the beginning and end of the line
9
- * @param value input string
10
9
  */
11
10
  export declare function trim(value: string): string;
12
11
  /**
13
12
  * Trim only invisible chars
14
- * @param value
15
13
  */
16
14
  export declare function trimInv(value: string): string;
@@ -5,8 +5,5 @@
5
5
  */
6
6
  /**
7
7
  * Make a string's first character uppercase
8
- *
9
- * @param {string} value input string
10
- * @return {string}
11
8
  */
12
- export declare const ucfirst: (value: string) => string;
9
+ export declare function ucfirst(value: string): string;
@@ -5,6 +5,5 @@
5
5
  */
6
6
  /**
7
7
  * Helper for create Error object
8
- * @param message
9
8
  */
10
9
  export declare function error(message: string): Error;
@@ -22,7 +22,5 @@ import type { IDictionary, Nullable } from '../../../types';
22
22
  * console.log(Jodit.modules.Helpers.get('a.b.c.d.e', obj) === false); // true
23
23
  * console.log(Jodit.modules.Helpers.get('a.b.a.d.e', obj) === null); // false
24
24
  * ```
25
- * @param chain
26
- * @param obj
27
25
  */
28
26
  export declare function get<T>(chain: string, obj: IDictionary): Nullable<T>;
@@ -10,9 +10,5 @@
10
10
  export declare const cns: Console;
11
11
  /**
12
12
  * Mark function as deprecated
13
- *
14
- * @param method
15
- * @param names
16
- * @param ctx
17
13
  */
18
14
  export declare function markDeprecated(method: Function, names?: string[], ctx?: any): (...args: any[]) => void;
@@ -16,7 +16,5 @@ import type { IDictionary } from '../../../types';
16
16
  * Jodit.modules.Helpers.set('a.0.e', 1, b);
17
17
  * console.log(b);// {a: [{e: 1}]}
18
18
  * ```
19
- * @param chain
20
- * @param obj
21
19
  */
22
20
  export declare function set<T>(chain: string, value: unknown, obj: IDictionary): void;
@@ -3,12 +3,10 @@
3
3
  * Released under MIT see LICENSE.txt in the project root for license information.
4
4
  * Copyright (c) 2013-2021 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
5
5
  */
6
- import type { CanPromise, IControlType, IViewBased, Nullable, IJodit, RejectablePromise } from '../../../types';
6
+ import type { CanPromise, IControlType, IDictionary, IViewBased, Nullable, IJodit, RejectablePromise } from '../../../types';
7
7
  /**
8
8
  * Call function with parameters
9
9
  *
10
- * @param func
11
- * @param args
12
10
  * @example
13
11
  * ```js
14
12
  * const f = Math.random();
@@ -20,21 +18,17 @@ export declare function call<T extends any[], R>(func: (...args: T) => R, ...arg
20
18
  * Alias for `elm.getAttribute` but if set second argument `-{key}`
21
19
  * it will also check `data-{key}` attribute
22
20
  * if set `value` it is alias for setAttribute with same logic
23
- *
24
- * @param elm
25
- * @param key
26
- * @param [value]
27
21
  */
28
- export declare function attr(elm: Element | null, key: string, value?: string | number | boolean | null): null | string;
22
+ export declare function attr(elm: Element, key: string): null | string;
23
+ export declare function attr(elm: Element, key: string, value: string | number | boolean | null | undefined): null;
24
+ export declare function attr(elm: Element, attributes: IDictionary<string | number | boolean | null>): null;
29
25
  /**
30
26
  * Mark element for debugging
31
- * @param elm
32
27
  */
33
28
  export declare function markOwner(jodit: IViewBased, elm: HTMLElement): void;
34
29
  export declare function callPromise(condition: CanPromise<unknown>, callback: () => CanPromise<any>): CanPromise<void>;
35
30
  /**
36
31
  * Reset Vanila JS native function
37
- * @param key
38
32
  * @example
39
33
  * ```js
40
34
  * reset('Array.from')(Set([1,2,3])) // [1, 2, 3]
@@ -43,16 +37,11 @@ export declare function callPromise(condition: CanPromise<unknown>, callback: ()
43
37
  export declare const reset: <T extends Function>(key: string) => Nullable<T>;
44
38
  /**
45
39
  * Allow load image in promise
46
- * @param src
47
- * @param jodit
48
40
  */
49
41
  export declare const loadImage: (src: string, jodit: IViewBased) => RejectablePromise<HTMLImageElement>;
50
42
  export declare const keys: (obj: object, own?: boolean) => string[];
51
43
  /**
52
44
  * Memorize last user chose
53
- * @param editor
54
- * @param _
55
- * @param control
56
45
  */
57
46
  export declare const memorizeExec: <T extends IJodit = IJodit>(editor: T, _: unknown, { control }: {
58
47
  control: IControlType<T, import("../../../types").IToolbarButton>;