@ckeditor/ckeditor5-utils 47.6.1-alpha.1 → 48.0.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 (154) hide show
  1. package/LICENSE.md +1 -1
  2. package/{src → dist}/dom/global.d.ts +1 -1
  3. package/{src → dist}/dom/rect.d.ts +8 -0
  4. package/dist/index.css +3 -0
  5. package/dist/index.css.map +1 -0
  6. package/dist/index.js +24 -5
  7. package/dist/index.js.map +1 -1
  8. package/{src → dist}/version.d.ts +1 -1
  9. package/package.json +20 -38
  10. package/src/abortabledebounce.js +0 -22
  11. package/src/areconnectedthroughproperties.js +0 -71
  12. package/src/ckeditorerror.js +0 -187
  13. package/src/collection.js +0 -620
  14. package/src/collectstylesheets.js +0 -52
  15. package/src/comparearrays.js +0 -47
  16. package/src/config.js +0 -167
  17. package/src/count.js +0 -25
  18. package/src/crc32.js +0 -61
  19. package/src/decodelicensekey.js +0 -30
  20. package/src/delay.js +0 -25
  21. package/src/diff.js +0 -115
  22. package/src/difftochanges.js +0 -79
  23. package/src/dom/createelement.js +0 -40
  24. package/src/dom/emittermixin.js +0 -237
  25. package/src/dom/findclosestscrollableancestor.js +0 -31
  26. package/src/dom/getancestors.js +0 -26
  27. package/src/dom/getborderwidths.js +0 -24
  28. package/src/dom/getcommonancestor.js +0 -25
  29. package/src/dom/getdatafromelement.js +0 -19
  30. package/src/dom/getpositionedancestor.js +0 -22
  31. package/src/dom/getrangefrommouseevent.js +0 -33
  32. package/src/dom/getvisualviewportoffset.js +0 -21
  33. package/src/dom/global.js +0 -35
  34. package/src/dom/indexof.js +0 -21
  35. package/src/dom/insertat.js +0 -17
  36. package/src/dom/iscomment.js +0 -13
  37. package/src/dom/isnode.js +0 -21
  38. package/src/dom/isrange.js +0 -13
  39. package/src/dom/istext.js +0 -13
  40. package/src/dom/isvalidattributename.js +0 -22
  41. package/src/dom/isvisible.js +0 -30
  42. package/src/dom/iswindow.js +0 -22
  43. package/src/dom/position.js +0 -322
  44. package/src/dom/rect.js +0 -498
  45. package/src/dom/remove.js +0 -18
  46. package/src/dom/resizeobserver.js +0 -134
  47. package/src/dom/scroll.js +0 -406
  48. package/src/dom/setdatainelement.js +0 -19
  49. package/src/dom/tounit.js +0 -16
  50. package/src/elementreplacer.js +0 -47
  51. package/src/emittermixin.js +0 -443
  52. package/src/env.js +0 -158
  53. package/src/eventinfo.js +0 -63
  54. package/src/fastdiff.js +0 -248
  55. package/src/first.js +0 -17
  56. package/src/focustracker.js +0 -329
  57. package/src/formathtml.js +0 -164
  58. package/src/index.js +0 -78
  59. package/src/inserttopriorityarray.js +0 -28
  60. package/src/isfeatureblockedbylicensekey.js +0 -17
  61. package/src/isiterable.js +0 -16
  62. package/src/keyboard.js +0 -256
  63. package/src/keystrokehandler.js +0 -126
  64. package/src/language.js +0 -21
  65. package/src/legacyerrors.js +0 -18
  66. package/src/locale.js +0 -135
  67. package/src/mapsequal.js +0 -27
  68. package/src/mix.js +0 -5
  69. package/src/nth.js +0 -24
  70. package/src/objecttomap.js +0 -27
  71. package/src/observablemixin.js +0 -575
  72. package/src/parsebase64encodedobject.js +0 -22
  73. package/src/priorities.js +0 -22
  74. package/src/retry.js +0 -48
  75. package/src/splicearray.js +0 -37
  76. package/src/spy.js +0 -21
  77. package/src/toarray.js +0 -7
  78. package/src/tomap.js +0 -29
  79. package/src/translation-service.js +0 -209
  80. package/src/uid.js +0 -45
  81. package/src/unicode.js +0 -85
  82. package/src/version.js +0 -177
  83. package/src/wait.js +0 -29
  84. /package/{src → dist}/abortabledebounce.d.ts +0 -0
  85. /package/{src → dist}/areconnectedthroughproperties.d.ts +0 -0
  86. /package/{src → dist}/ckeditorerror.d.ts +0 -0
  87. /package/{src → dist}/collection.d.ts +0 -0
  88. /package/{src → dist}/collectstylesheets.d.ts +0 -0
  89. /package/{src → dist}/comparearrays.d.ts +0 -0
  90. /package/{src → dist}/config.d.ts +0 -0
  91. /package/{src → dist}/count.d.ts +0 -0
  92. /package/{src → dist}/crc32.d.ts +0 -0
  93. /package/{src → dist}/decodelicensekey.d.ts +0 -0
  94. /package/{src → dist}/delay.d.ts +0 -0
  95. /package/{src → dist}/diff.d.ts +0 -0
  96. /package/{src → dist}/difftochanges.d.ts +0 -0
  97. /package/{src → dist}/dom/createelement.d.ts +0 -0
  98. /package/{src → dist}/dom/emittermixin.d.ts +0 -0
  99. /package/{src → dist}/dom/findclosestscrollableancestor.d.ts +0 -0
  100. /package/{src → dist}/dom/getancestors.d.ts +0 -0
  101. /package/{src → dist}/dom/getborderwidths.d.ts +0 -0
  102. /package/{src → dist}/dom/getcommonancestor.d.ts +0 -0
  103. /package/{src → dist}/dom/getdatafromelement.d.ts +0 -0
  104. /package/{src → dist}/dom/getpositionedancestor.d.ts +0 -0
  105. /package/{src → dist}/dom/getrangefrommouseevent.d.ts +0 -0
  106. /package/{src → dist}/dom/getvisualviewportoffset.d.ts +0 -0
  107. /package/{src → dist}/dom/indexof.d.ts +0 -0
  108. /package/{src → dist}/dom/insertat.d.ts +0 -0
  109. /package/{src → dist}/dom/iscomment.d.ts +0 -0
  110. /package/{src → dist}/dom/isnode.d.ts +0 -0
  111. /package/{src → dist}/dom/isrange.d.ts +0 -0
  112. /package/{src → dist}/dom/istext.d.ts +0 -0
  113. /package/{src → dist}/dom/isvalidattributename.d.ts +0 -0
  114. /package/{src → dist}/dom/isvisible.d.ts +0 -0
  115. /package/{src → dist}/dom/iswindow.d.ts +0 -0
  116. /package/{src → dist}/dom/position.d.ts +0 -0
  117. /package/{src → dist}/dom/remove.d.ts +0 -0
  118. /package/{src → dist}/dom/resizeobserver.d.ts +0 -0
  119. /package/{src → dist}/dom/scroll.d.ts +0 -0
  120. /package/{src → dist}/dom/setdatainelement.d.ts +0 -0
  121. /package/{src → dist}/dom/tounit.d.ts +0 -0
  122. /package/{src → dist}/elementreplacer.d.ts +0 -0
  123. /package/{src → dist}/emittermixin.d.ts +0 -0
  124. /package/{src → dist}/env.d.ts +0 -0
  125. /package/{src → dist}/eventinfo.d.ts +0 -0
  126. /package/{src → dist}/fastdiff.d.ts +0 -0
  127. /package/{src → dist}/first.d.ts +0 -0
  128. /package/{src → dist}/focustracker.d.ts +0 -0
  129. /package/{src → dist}/formathtml.d.ts +0 -0
  130. /package/{src → dist}/index.d.ts +0 -0
  131. /package/{src → dist}/inserttopriorityarray.d.ts +0 -0
  132. /package/{src → dist}/isfeatureblockedbylicensekey.d.ts +0 -0
  133. /package/{src → dist}/isiterable.d.ts +0 -0
  134. /package/{src → dist}/keyboard.d.ts +0 -0
  135. /package/{src → dist}/keystrokehandler.d.ts +0 -0
  136. /package/{src → dist}/language.d.ts +0 -0
  137. /package/{src → dist}/legacyerrors.d.ts +0 -0
  138. /package/{src → dist}/locale.d.ts +0 -0
  139. /package/{src → dist}/mapsequal.d.ts +0 -0
  140. /package/{src → dist}/mix.d.ts +0 -0
  141. /package/{src → dist}/nth.d.ts +0 -0
  142. /package/{src → dist}/objecttomap.d.ts +0 -0
  143. /package/{src → dist}/observablemixin.d.ts +0 -0
  144. /package/{src → dist}/parsebase64encodedobject.d.ts +0 -0
  145. /package/{src → dist}/priorities.d.ts +0 -0
  146. /package/{src → dist}/retry.d.ts +0 -0
  147. /package/{src → dist}/splicearray.d.ts +0 -0
  148. /package/{src → dist}/spy.d.ts +0 -0
  149. /package/{src → dist}/toarray.d.ts +0 -0
  150. /package/{src → dist}/tomap.d.ts +0 -0
  151. /package/{src → dist}/translation-service.d.ts +0 -0
  152. /package/{src → dist}/uid.d.ts +0 -0
  153. /package/{src → dist}/unicode.d.ts +0 -0
  154. /package/{src → dist}/wait.d.ts +0 -0
package/LICENSE.md CHANGED
@@ -18,7 +18,7 @@ Where not otherwise indicated, all CKEditor 5 content is authored by CKSour
18
18
 
19
19
  The following libraries are included in CKEditor 5 under the [MIT license](https://opensource.org/licenses/MIT):
20
20
 
21
- * es-toolkit - Copyright (c) 2024 Viva Republica, Inc.
21
+ * es-toolkit - Copyright (c) 2024 Viva Republica, Inc and Copyright OpenJS Foundation and other contributors.
22
22
 
23
23
  Trademarks
24
24
  ----------
@@ -18,7 +18,7 @@ export interface GlobalType {
18
18
  * testing, i.e. stubbing native properties:
19
19
  *
20
20
  * ```ts
21
- * import { global } from 'ckeditor5/utils';
21
+ * import { global } from 'ckeditor5';
22
22
  *
23
23
  * // This stub will work for any code using global module.
24
24
  * testUtils.sinon.stub( global, 'window', {
@@ -166,10 +166,18 @@ export declare class Rect {
166
166
  /**
167
167
  * Returns an array of rects of the given native DOM Range.
168
168
  *
169
+ * Also see {@link module:utils/dom/rect~Rect.getDomElementRects}.
170
+ *
169
171
  * @param range A native DOM range.
170
172
  * @returns DOM Range rects.
171
173
  */
172
174
  static getDomRangeRects(range: Range): Array<Rect>;
175
+ /**
176
+ * Returns an array of Rects of the given DOM Element based on its native `getClientRects()` method.
177
+ *
178
+ * Also see {@link module:utils/dom/rect~Rect.getDomRangeRects}.
179
+ */
180
+ static getDomElementRects(element: HTMLElement): Array<Rect>;
173
181
  /**
174
182
  * Returns a bounding rectangle that contains all the given `rects`.
175
183
  *
package/dist/index.css CHANGED
@@ -2,3 +2,6 @@
2
2
  * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
+
6
+
7
+ /*# sourceMappingURL=index.css.map */
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["index.css"],"names":[],"mappings":";;;;;;AAEA,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC","file":"index.css.map","sourcesContent":["\n\n/*# sourceMappingURL=index.css.map */"]}
package/dist/index.js CHANGED
@@ -18,7 +18,7 @@ import { isObject as isObject$1, isString, isPlainObject, cloneDeepWith, isEleme
18
18
  * testing, i.e. stubbing native properties:
19
19
  *
20
20
  * ```ts
21
- * import { global } from 'ckeditor5/utils';
21
+ * import { global } from 'ckeditor5';
22
22
  *
23
23
  * // This stub will work for any code using global module.
24
24
  * testUtils.sinon.stub( global, 'window', {
@@ -987,9 +987,9 @@ function isObject(structure) {
987
987
  ];
988
988
  }
989
989
 
990
- const version = '47.6.1-alpha.1';
990
+ const version = '48.0.0-alpha.0';
991
991
  // The second argument is not a month. It is `monthIndex` and starts from `0`.
992
- const releaseDate = new Date(2026, 2, 11);
992
+ const releaseDate = new Date(2026, 2, 19);
993
993
  /* istanbul ignore next -- @preserve */ if (globalThis.CKEDITOR_VERSION) {
994
994
  /**
995
995
  * This error is thrown when, due to a mistake in the way CKEditor&nbsp;5 was installed,
@@ -1097,7 +1097,7 @@ const releaseDate = new Date(2026, 2, 11);
1097
1097
  * <details>
1098
1098
  * <summary>(Legacy) Default imports and `src` imports</summary>
1099
1099
  *
1100
- * If you use the {@glink getting-started/legacy/installation-methods/quick-start-other legacy customized installation}
1100
+ * If you use the legacy customized installation
1101
1101
  * method, you should only import { code from the `@ckeditor/ckeditor5-<NAME>` packages. While you can import code } from
1102
1102
  * the `@ckeditor/ckeditor5-<NAME>/src/*` files, it is not recommended as it can make migration to the new installation
1103
1103
  * methods more difficult.
@@ -1119,7 +1119,7 @@ const releaseDate = new Date(2026, 2, 11);
1119
1119
  * <details>
1120
1120
  * <summary>(Legacy) DLL builds</summary>
1121
1121
  *
1122
- * If you are using the {@glink getting-started/legacy/advanced/alternative-setups/dll-builds legacy DLL builds},
1122
+ * If you are using the {@glink updating/nim-migration/dll-builds legacy DLL builds},
1123
1123
  * you should not import any non-DLL modules.
1124
1124
  *
1125
1125
  * Examples of valid and invalid import paths:
@@ -3204,6 +3204,8 @@ const POSITIONING_VALUES = new Set([
3204
3204
  /**
3205
3205
  * Returns an array of rects of the given native DOM Range.
3206
3206
  *
3207
+ * Also see {@link module:utils/dom/rect~Rect.getDomElementRects}.
3208
+ *
3207
3209
  * @param range A native DOM range.
3208
3210
  * @returns DOM Range rects.
3209
3211
  */ static getDomRangeRects(range) {
@@ -3230,6 +3232,19 @@ const POSITIONING_VALUES = new Set([
3230
3232
  }
3231
3233
  return rects;
3232
3234
  }
3235
+ /**
3236
+ * Returns an array of Rects of the given DOM Element based on its native `getClientRects()` method.
3237
+ *
3238
+ * Also see {@link module:utils/dom/rect~Rect.getDomRangeRects}.
3239
+ */ static getDomElementRects(element) {
3240
+ return Array.from(element.getClientRects()).map((clientRect)=>{
3241
+ const rect = new Rect(clientRect);
3242
+ // Point the rect source to the DOM element instead of of the DOM client rect to allow proper clipping,
3243
+ // in `Rect#getVisible()` method.
3244
+ rect._source = element;
3245
+ return rect;
3246
+ });
3247
+ }
3233
3248
  /**
3234
3249
  * Returns a bounding rectangle that contains all the given `rects`.
3235
3250
  *
@@ -6378,6 +6393,10 @@ function isFocusedView(subTreeRoot, view) {
6378
6393
  name: 'thead',
6379
6394
  isVoid: false
6380
6395
  },
6396
+ {
6397
+ name: 'tfoot',
6398
+ isVoid: false
6399
+ },
6381
6400
  {
6382
6401
  name: 'tr',
6383
6402
  isVoid: false