@ckeditor/ckeditor5-utils 44.0.0 → 44.1.0-alpha.0

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 (207) hide show
  1. package/dist/abortabledebounce.d.ts +1 -1
  2. package/dist/areconnectedthroughproperties.d.ts +1 -1
  3. package/dist/ckeditorerror.d.ts +1 -1
  4. package/dist/collection.d.ts +1 -1
  5. package/dist/comparearrays.d.ts +1 -1
  6. package/dist/config.d.ts +1 -1
  7. package/dist/count.d.ts +1 -1
  8. package/dist/crc32.d.ts +1 -1
  9. package/dist/delay.d.ts +1 -1
  10. package/dist/diff.d.ts +1 -1
  11. package/dist/difftochanges.d.ts +1 -1
  12. package/dist/dom/createelement.d.ts +1 -1
  13. package/dist/dom/emittermixin.d.ts +1 -1
  14. package/dist/dom/findclosestscrollableancestor.d.ts +1 -1
  15. package/dist/dom/getancestors.d.ts +1 -1
  16. package/dist/dom/getborderwidths.d.ts +1 -1
  17. package/dist/dom/getcommonancestor.d.ts +1 -1
  18. package/dist/dom/getdatafromelement.d.ts +1 -1
  19. package/dist/dom/getpositionedancestor.d.ts +1 -1
  20. package/dist/dom/getrangefrommouseevent.d.ts +1 -1
  21. package/dist/dom/global.d.ts +1 -1
  22. package/dist/dom/indexof.d.ts +1 -1
  23. package/dist/dom/insertat.d.ts +1 -1
  24. package/dist/dom/iscomment.d.ts +1 -1
  25. package/dist/dom/isnode.d.ts +1 -1
  26. package/dist/dom/isrange.d.ts +1 -1
  27. package/dist/dom/istext.d.ts +1 -1
  28. package/dist/dom/isvalidattributename.d.ts +1 -1
  29. package/dist/dom/isvisible.d.ts +1 -1
  30. package/dist/dom/iswindow.d.ts +1 -1
  31. package/dist/dom/position.d.ts +1 -1
  32. package/dist/dom/rect.d.ts +1 -1
  33. package/dist/dom/remove.d.ts +1 -1
  34. package/dist/dom/resizeobserver.d.ts +1 -1
  35. package/dist/dom/scroll.d.ts +1 -1
  36. package/dist/dom/setdatainelement.d.ts +1 -1
  37. package/dist/dom/tounit.d.ts +1 -1
  38. package/dist/elementreplacer.d.ts +1 -1
  39. package/dist/emittermixin.d.ts +1 -1
  40. package/dist/env.d.ts +1 -1
  41. package/dist/eventinfo.d.ts +1 -1
  42. package/dist/fastdiff.d.ts +1 -1
  43. package/dist/first.d.ts +1 -1
  44. package/dist/focustracker.d.ts +1 -1
  45. package/dist/index.d.ts +1 -1
  46. package/dist/index.js +73 -78
  47. package/dist/index.js.map +1 -1
  48. package/dist/inserttopriorityarray.d.ts +1 -1
  49. package/dist/isiterable.d.ts +1 -1
  50. package/dist/keyboard.d.ts +1 -1
  51. package/dist/keystrokehandler.d.ts +1 -1
  52. package/dist/language.d.ts +1 -1
  53. package/dist/locale.d.ts +1 -1
  54. package/dist/mapsequal.d.ts +1 -1
  55. package/dist/mix.d.ts +1 -1
  56. package/dist/nth.d.ts +1 -1
  57. package/dist/objecttomap.d.ts +1 -1
  58. package/dist/observablemixin.d.ts +1 -1
  59. package/dist/parsebase64encodedobject.d.ts +1 -1
  60. package/dist/priorities.d.ts +1 -1
  61. package/dist/retry.d.ts +1 -1
  62. package/dist/splicearray.d.ts +12 -11
  63. package/dist/spy.d.ts +1 -1
  64. package/dist/toarray.d.ts +1 -1
  65. package/dist/tomap.d.ts +1 -1
  66. package/dist/translation-service.d.ts +1 -1
  67. package/dist/uid.d.ts +1 -1
  68. package/dist/unicode.d.ts +1 -1
  69. package/dist/version.d.ts +2 -2
  70. package/dist/wait.d.ts +1 -1
  71. package/package.json +2 -2
  72. package/src/abortabledebounce.d.ts +1 -1
  73. package/src/abortabledebounce.js +1 -1
  74. package/src/areconnectedthroughproperties.d.ts +1 -1
  75. package/src/areconnectedthroughproperties.js +1 -1
  76. package/src/ckeditorerror.d.ts +1 -1
  77. package/src/ckeditorerror.js +1 -1
  78. package/src/collection.d.ts +1 -1
  79. package/src/collection.js +1 -1
  80. package/src/comparearrays.d.ts +1 -1
  81. package/src/comparearrays.js +1 -1
  82. package/src/config.d.ts +1 -1
  83. package/src/config.js +1 -1
  84. package/src/count.d.ts +1 -1
  85. package/src/count.js +1 -1
  86. package/src/crc32.d.ts +1 -1
  87. package/src/crc32.js +1 -1
  88. package/src/delay.d.ts +1 -1
  89. package/src/delay.js +1 -1
  90. package/src/diff.d.ts +1 -1
  91. package/src/diff.js +1 -1
  92. package/src/difftochanges.d.ts +1 -1
  93. package/src/difftochanges.js +1 -1
  94. package/src/dom/createelement.d.ts +1 -1
  95. package/src/dom/createelement.js +1 -1
  96. package/src/dom/emittermixin.d.ts +1 -1
  97. package/src/dom/emittermixin.js +1 -1
  98. package/src/dom/findclosestscrollableancestor.d.ts +1 -1
  99. package/src/dom/findclosestscrollableancestor.js +1 -1
  100. package/src/dom/getancestors.d.ts +1 -1
  101. package/src/dom/getancestors.js +1 -1
  102. package/src/dom/getborderwidths.d.ts +1 -1
  103. package/src/dom/getborderwidths.js +1 -1
  104. package/src/dom/getcommonancestor.d.ts +1 -1
  105. package/src/dom/getcommonancestor.js +1 -1
  106. package/src/dom/getdatafromelement.d.ts +1 -1
  107. package/src/dom/getdatafromelement.js +1 -1
  108. package/src/dom/getpositionedancestor.d.ts +1 -1
  109. package/src/dom/getpositionedancestor.js +1 -1
  110. package/src/dom/getrangefrommouseevent.d.ts +1 -1
  111. package/src/dom/getrangefrommouseevent.js +1 -1
  112. package/src/dom/global.d.ts +1 -1
  113. package/src/dom/global.js +1 -1
  114. package/src/dom/indexof.d.ts +1 -1
  115. package/src/dom/indexof.js +1 -1
  116. package/src/dom/insertat.d.ts +1 -1
  117. package/src/dom/insertat.js +1 -1
  118. package/src/dom/iscomment.d.ts +1 -1
  119. package/src/dom/iscomment.js +1 -1
  120. package/src/dom/isnode.d.ts +1 -1
  121. package/src/dom/isnode.js +1 -1
  122. package/src/dom/isrange.d.ts +1 -1
  123. package/src/dom/isrange.js +1 -1
  124. package/src/dom/istext.d.ts +1 -1
  125. package/src/dom/istext.js +1 -1
  126. package/src/dom/isvalidattributename.d.ts +1 -1
  127. package/src/dom/isvalidattributename.js +1 -1
  128. package/src/dom/isvisible.d.ts +1 -1
  129. package/src/dom/isvisible.js +1 -1
  130. package/src/dom/iswindow.d.ts +1 -1
  131. package/src/dom/iswindow.js +1 -1
  132. package/src/dom/position.d.ts +1 -1
  133. package/src/dom/position.js +1 -1
  134. package/src/dom/rect.d.ts +1 -1
  135. package/src/dom/rect.js +1 -1
  136. package/src/dom/remove.d.ts +1 -1
  137. package/src/dom/remove.js +1 -1
  138. package/src/dom/resizeobserver.d.ts +1 -1
  139. package/src/dom/resizeobserver.js +1 -1
  140. package/src/dom/scroll.d.ts +1 -1
  141. package/src/dom/scroll.js +1 -1
  142. package/src/dom/setdatainelement.d.ts +1 -1
  143. package/src/dom/setdatainelement.js +1 -1
  144. package/src/dom/tounit.d.ts +1 -1
  145. package/src/dom/tounit.js +1 -1
  146. package/src/elementreplacer.d.ts +1 -1
  147. package/src/elementreplacer.js +1 -1
  148. package/src/emittermixin.d.ts +1 -1
  149. package/src/emittermixin.js +17 -19
  150. package/src/env.d.ts +1 -1
  151. package/src/env.js +1 -1
  152. package/src/eventinfo.d.ts +1 -1
  153. package/src/eventinfo.js +1 -1
  154. package/src/fastdiff.d.ts +1 -1
  155. package/src/fastdiff.js +1 -1
  156. package/src/first.d.ts +1 -1
  157. package/src/first.js +1 -1
  158. package/src/focustracker.d.ts +1 -1
  159. package/src/focustracker.js +1 -1
  160. package/src/index.d.ts +1 -1
  161. package/src/index.js +1 -1
  162. package/src/inserttopriorityarray.d.ts +1 -1
  163. package/src/inserttopriorityarray.js +1 -1
  164. package/src/isiterable.d.ts +1 -1
  165. package/src/isiterable.js +1 -1
  166. package/src/keyboard.d.ts +1 -1
  167. package/src/keyboard.js +1 -1
  168. package/src/keystrokehandler.d.ts +1 -1
  169. package/src/keystrokehandler.js +1 -1
  170. package/src/language.d.ts +1 -1
  171. package/src/language.js +1 -1
  172. package/src/locale.d.ts +1 -1
  173. package/src/locale.js +1 -1
  174. package/src/mapsequal.d.ts +1 -1
  175. package/src/mapsequal.js +1 -1
  176. package/src/mix.d.ts +1 -1
  177. package/src/mix.js +1 -1
  178. package/src/nth.d.ts +1 -1
  179. package/src/nth.js +1 -1
  180. package/src/objecttomap.d.ts +1 -1
  181. package/src/objecttomap.js +1 -1
  182. package/src/observablemixin.d.ts +1 -1
  183. package/src/observablemixin.js +1 -1
  184. package/src/parsebase64encodedobject.d.ts +1 -1
  185. package/src/parsebase64encodedobject.js +1 -1
  186. package/src/priorities.d.ts +1 -1
  187. package/src/priorities.js +1 -1
  188. package/src/retry.d.ts +1 -1
  189. package/src/retry.js +1 -1
  190. package/src/splicearray.d.ts +12 -11
  191. package/src/splicearray.js +17 -19
  192. package/src/spy.d.ts +1 -1
  193. package/src/spy.js +1 -1
  194. package/src/toarray.d.ts +1 -1
  195. package/src/toarray.js +1 -1
  196. package/src/tomap.d.ts +1 -1
  197. package/src/tomap.js +1 -1
  198. package/src/translation-service.d.ts +1 -1
  199. package/src/translation-service.js +1 -1
  200. package/src/uid.d.ts +1 -1
  201. package/src/uid.js +1 -1
  202. package/src/unicode.d.ts +1 -1
  203. package/src/unicode.js +1 -1
  204. package/src/version.d.ts +2 -2
  205. package/src/version.js +3 -3
  206. package/src/wait.d.ts +1 -1
  207. package/src/wait.js +1 -1
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
5
  import type { Emitter } from './emittermixin.js';
6
6
  import { type KeystrokeInfo } from './keyboard.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
5
  /**
6
6
  * @module utils/keystrokehandler
package/src/language.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
5
  /**
6
6
  * @module utils/language
package/src/language.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
5
  const RTL_LANGUAGE_CODES = [
6
6
  'ar', 'ara',
package/src/locale.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
5
  /**
6
6
  * @module utils/locale
package/src/locale.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
5
  /**
6
6
  * @module utils/locale
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
5
  /**
6
6
  * @module utils/mapsequal
package/src/mapsequal.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
5
  /**
6
6
  * @module utils/mapsequal
package/src/mix.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
5
  /**
6
6
  * @module utils/mix
package/src/mix.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
5
  /**
6
6
  * @module utils/mix
package/src/nth.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
5
  /**
6
6
  * @module utils/nth
package/src/nth.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
5
  /**
6
6
  * @module utils/nth
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
5
  /**
6
6
  * @module utils/objecttomap
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
5
  /**
6
6
  * @module utils/objecttomap
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
5
  /**
6
6
  * @module utils/observablemixin
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
5
  /* eslint-disable @typescript-eslint/unified-signatures */
6
6
  /**
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
5
  /**
6
6
  * @module utils/parsebase64encodedobject
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
5
  /**
6
6
  * @module utils/parsebase64encodedobject
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
5
  /**
6
6
  * @module utils/priorities
package/src/priorities.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
5
  /**
6
6
  * Provides group of constants to use instead of hardcoding numeric priority values.
package/src/retry.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
5
  /**
6
6
  * Tries calling the given callback until it sucessfully resolves.
package/src/retry.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
5
  /**
6
6
  * @module utils/retry
@@ -1,19 +1,20 @@
1
1
  /**
2
2
  * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
5
  /**
6
- * Splices one array into another. To be used instead of `Array.prototype.splice` as the latter may
7
- * throw "Maximum call stack size exceeded" when passed huge number of items to insert.
8
- *
9
- * Note: in contrary to Array.splice, this function does not modify the original `target`.
6
+ * @module utils/splicearray
7
+ */
8
+ /**
9
+ * Splices one array into another. To be used instead of `Array.prototype.splice` for better
10
+ * performance and because the latter may throw "Maximum call stack size exceeded" error when
11
+ * passing huge number of items to insert.
10
12
  *
11
13
  * ```ts
12
- * spliceArray( [ 1, 2 ], [ 3, 4 ], 0, 0 ); // [ 3, 4, 1, 2 ]
13
- * spliceArray( [ 1, 2 ], [ 3, 4 ], 1, 1 ); // [ 1, 3, 4 ]
14
- * spliceArray( [ 1, 2 ], [ 3, 4 ], 1, 0 ); // [ 1, 3, 4, 2 ]
15
- * spliceArray( [ 1, 2 ], [ 3, 4 ], 2, 0 ); // [ 1, 2, 3, 4 ]
16
- * spliceArray( [ 1, 2 ], [], 0, 1 ); // [ 2 ]
14
+ * spliceArray( [ 1, 2 ], [ 3, 4 ], 0 ); // [ 3, 4, 1, 2 ]
15
+ * spliceArray( [ 1, 2 ], [ 3, 4 ], 1 ); // [ 1, 3, 4, 2 ]
16
+ * spliceArray( [ 1, 2 ], [ 3, 4 ], 2 ); // [ 1, 2, 3, 4 ]
17
+ * spliceArray( [ 1, 2 ], [], 0 ); // [ 1, 2 ]
17
18
  * ```
18
19
  *
19
20
  * @param target Array to be spliced.
@@ -23,4 +24,4 @@
23
24
  *
24
25
  * @returns New spliced array.
25
26
  */
26
- export default function spliceArray<T>(target: ReadonlyArray<T>, source: ReadonlyArray<T>, start: number, count: number): Array<T>;
27
+ export default function spliceArray<T>(targetArray: Array<T>, insertArray: Array<T>, index: number): void;
@@ -1,23 +1,20 @@
1
1
  /**
2
2
  * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
5
  /**
6
6
  * @module utils/splicearray
7
7
  */
8
- const BIG_CHUNK_SIZE = 10000;
9
8
  /**
10
- * Splices one array into another. To be used instead of `Array.prototype.splice` as the latter may
11
- * throw "Maximum call stack size exceeded" when passed huge number of items to insert.
12
- *
13
- * Note: in contrary to Array.splice, this function does not modify the original `target`.
9
+ * Splices one array into another. To be used instead of `Array.prototype.splice` for better
10
+ * performance and because the latter may throw "Maximum call stack size exceeded" error when
11
+ * passing huge number of items to insert.
14
12
  *
15
13
  * ```ts
16
- * spliceArray( [ 1, 2 ], [ 3, 4 ], 0, 0 ); // [ 3, 4, 1, 2 ]
17
- * spliceArray( [ 1, 2 ], [ 3, 4 ], 1, 1 ); // [ 1, 3, 4 ]
18
- * spliceArray( [ 1, 2 ], [ 3, 4 ], 1, 0 ); // [ 1, 3, 4, 2 ]
19
- * spliceArray( [ 1, 2 ], [ 3, 4 ], 2, 0 ); // [ 1, 2, 3, 4 ]
20
- * spliceArray( [ 1, 2 ], [], 0, 1 ); // [ 2 ]
14
+ * spliceArray( [ 1, 2 ], [ 3, 4 ], 0 ); // [ 3, 4, 1, 2 ]
15
+ * spliceArray( [ 1, 2 ], [ 3, 4 ], 1 ); // [ 1, 3, 4, 2 ]
16
+ * spliceArray( [ 1, 2 ], [ 3, 4 ], 2 ); // [ 1, 2, 3, 4 ]
17
+ * spliceArray( [ 1, 2 ], [], 0 ); // [ 1, 2 ]
21
18
  * ```
22
19
  *
23
20
  * @param target Array to be spliced.
@@ -27,14 +24,15 @@ const BIG_CHUNK_SIZE = 10000;
27
24
  *
28
25
  * @returns New spliced array.
29
26
  */
30
- export default function spliceArray(target, source, start, count) {
31
- // In case of performance problems, see: https://github.com/ckeditor/ckeditor5/pull/12429/files#r965850568
32
- if (Math.max(source.length, target.length) > BIG_CHUNK_SIZE) {
33
- return target.slice(0, start).concat(source).concat(target.slice(start + count, target.length));
27
+ export default function spliceArray(targetArray, insertArray, index) {
28
+ const originalLength = targetArray.length;
29
+ const insertLength = insertArray.length;
30
+ // Shift elements in the target array to make space for insertArray
31
+ for (let i = originalLength - 1; i >= index; i--) {
32
+ targetArray[i + insertLength] = targetArray[i];
34
33
  }
35
- else {
36
- const newTarget = Array.from(target);
37
- newTarget.splice(start, count, ...source);
38
- return newTarget;
34
+ // Copy elements from insertArray into the target array
35
+ for (let i = 0; i < insertLength; i++) {
36
+ targetArray[index + i] = insertArray[i];
39
37
  }
40
38
  }
package/src/spy.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
5
  /**
6
6
  * @module utils/spy
package/src/spy.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
5
  /**
6
6
  * @module utils/spy
package/src/toarray.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
5
  /**
6
6
  * @module utils/toarray
package/src/toarray.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
5
  export default function toArray(data) {
6
6
  return Array.isArray(data) ? data : [data];
package/src/tomap.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
5
  /**
6
6
  * Transforms object or iterable to map. Iterable needs to be in the format acceptable by the `Map` constructor.
package/src/tomap.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
5
  /**
6
6
  * @module utils/tomap
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
5
  /**
6
6
  * @module utils/translation-service
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
5
  import CKEditorError from './ckeditorerror.js';
6
6
  import global from './dom/global.js';
package/src/uid.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
5
  /**
6
6
  * Returns a unique id. The id starts with an "e" character and a randomly generated string of
package/src/uid.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
5
  /**
6
6
  * @module utils/uid
package/src/unicode.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
5
  /**
6
6
  * Set of utils to handle unicode characters.
package/src/unicode.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
5
  /**
6
6
  * Set of utils to handle unicode characters.
package/src/version.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
- declare const version = "44.0.0";
5
+ declare const version = "44.1.0-alpha.0";
6
6
  export default version;
7
7
  export declare const releaseDate: Date;
8
8
  declare global {
package/src/version.js CHANGED
@@ -1,15 +1,15 @@
1
1
  /**
2
2
  * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
5
  /**
6
6
  * @module utils/version
7
7
  */
8
8
  import CKEditorError from './ckeditorerror.js';
9
- const version = '44.0.0';
9
+ const version = '44.1.0-alpha.0';
10
10
  export default version;
11
11
  // The second argument is not a month. It is `monthIndex` and starts from `0`.
12
- export const releaseDate = new Date(2024, 11, 2);
12
+ export const releaseDate = new Date(2024, 11, 11);
13
13
  /* istanbul ignore next -- @preserve */
14
14
  if (globalThis.CKEDITOR_VERSION) {
15
15
  /**
package/src/wait.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
5
  /**
6
6
  * @module utils/wait
package/src/wait.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
5
  /**
6
6
  * @module utils/wait