@ckeditor/ckeditor5-table 48.8.1-alpha.4 → 49.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 (251) hide show
  1. package/LICENSE.md +1 -1
  2. package/ckeditor5-metadata.json +12 -1
  3. package/dist/augmentation.d.ts +83 -80
  4. package/dist/commands/insertcolumncommand.d.ts +50 -50
  5. package/dist/commands/insertrowcommand.d.ts +49 -49
  6. package/dist/commands/inserttablecommand.d.ts +48 -43
  7. package/dist/commands/inserttablelayoutcommand.d.ts +39 -34
  8. package/dist/commands/mergecellcommand.d.ts +63 -63
  9. package/dist/commands/mergecellscommand.d.ts +24 -24
  10. package/dist/commands/removecolumncommand.d.ts +24 -24
  11. package/dist/commands/removerowcommand.d.ts +24 -24
  12. package/dist/commands/selectcolumncommand.d.ts +28 -28
  13. package/dist/commands/selectrowcommand.d.ts +28 -28
  14. package/dist/commands/setfooterrowcommand.d.ts +48 -48
  15. package/dist/commands/setheadercolumncommand.d.ts +45 -45
  16. package/dist/commands/setheaderrowcommand.d.ts +48 -48
  17. package/dist/commands/splitcellcommand.d.ts +39 -38
  18. package/dist/converters/downcast.d.ts +77 -77
  19. package/dist/converters/table-caption-post-fixer.d.ts +18 -18
  20. package/dist/converters/table-cell-paragraph-post-fixer.d.ts +30 -30
  21. package/dist/converters/table-cell-refresh-handler.d.ts +16 -16
  22. package/dist/converters/table-layout-post-fixer.d.ts +224 -224
  23. package/dist/converters/table-structure-post-fixer.d.ts +16 -16
  24. package/dist/converters/table-structure-refresh-handler.d.ts +15 -15
  25. package/dist/converters/tableproperties.d.ts +98 -98
  26. package/dist/converters/upcasttable.d.ts +47 -47
  27. package/dist/index-content.css +116 -105
  28. package/dist/index-content.css.map +1 -0
  29. package/dist/index-editor.css +718 -601
  30. package/dist/index-editor.css.map +1 -0
  31. package/dist/index.css +781 -650
  32. package/dist/index.css.map +1 -1
  33. package/dist/index.d.ts +103 -98
  34. package/dist/index.js +13669 -14491
  35. package/dist/index.js.map +1 -1
  36. package/dist/plaintableoutput.d.ts +28 -28
  37. package/dist/table.d.ts +38 -39
  38. package/dist/tablecaption/tablecaptionediting.d.ts +62 -62
  39. package/dist/tablecaption/tablecaptionui.d.ts +18 -18
  40. package/dist/tablecaption/toggletablecaptioncommand.d.ts +61 -61
  41. package/dist/tablecaption/utils.d.ts +31 -31
  42. package/dist/tablecaption.d.ts +22 -23
  43. package/dist/tablecellproperties/commands/tablecellbackgroundcolorcommand.d.ts +27 -27
  44. package/dist/tablecellproperties/commands/tablecellbordercolorcommand.d.ts +32 -32
  45. package/dist/tablecellproperties/commands/tablecellborderstylecommand.d.ts +32 -32
  46. package/dist/tablecellproperties/commands/tablecellborderwidthcommand.d.ts +46 -46
  47. package/dist/tablecellproperties/commands/tablecellheightcommand.d.ts +41 -41
  48. package/dist/tablecellproperties/commands/tablecellhorizontalalignmentcommand.d.ts +27 -27
  49. package/dist/tablecellproperties/commands/tablecellpaddingcommand.d.ts +46 -46
  50. package/dist/tablecellproperties/commands/tablecellpropertycommand.d.ts +79 -79
  51. package/dist/tablecellproperties/commands/tablecelltypecommand.d.ts +42 -42
  52. package/dist/tablecellproperties/commands/tablecellverticalalignmentcommand.d.ts +35 -35
  53. package/dist/tablecellproperties/tablecellpropertiesediting.d.ts +49 -49
  54. package/dist/tablecellproperties/tablecellpropertiesui.d.ts +130 -123
  55. package/dist/tablecellproperties/tablecellpropertiesutils.d.ts +13 -13
  56. package/dist/tablecellproperties/ui/tablecellpropertiesview.d.ts +255 -257
  57. package/dist/tablecellproperties.d.ts +29 -29
  58. package/dist/tablecellwidth/commands/tablecellwidthcommand.d.ts +41 -41
  59. package/dist/tablecellwidth/tablecellwidthediting.d.ts +28 -28
  60. package/dist/tableclipboard.d.ts +79 -79
  61. package/dist/tablecolumnresize/commands/tablecolumnwidthcommand.d.ts +56 -0
  62. package/dist/tablecolumnresize/constants.d.ts +40 -25
  63. package/dist/tablecolumnresize/converters.d.ts +20 -20
  64. package/dist/tablecolumnresize/tablecolumnresizeediting.d.ts +263 -184
  65. package/dist/tablecolumnresize/tablewidthscommand.d.ts +31 -31
  66. package/dist/tablecolumnresize/utils.d.ts +166 -127
  67. package/dist/tablecolumnresize.d.ts +24 -25
  68. package/dist/tableconfig.d.ts +736 -670
  69. package/dist/tableediting.d.ts +98 -99
  70. package/dist/tablekeyboard.d.ts +67 -67
  71. package/dist/tablelayout/commands/tabletypecommand.d.ts +38 -38
  72. package/dist/tablelayout/tablelayoutediting.d.ts +57 -58
  73. package/dist/tablelayout/tablelayoutui.d.ts +27 -27
  74. package/dist/tablelayout.d.ts +25 -25
  75. package/dist/tablemouse/mouseeventsobserver.d.ts +54 -54
  76. package/dist/tablemouse.d.ts +47 -47
  77. package/dist/tableproperties/commands/tablealignmentcommand.d.ts +27 -27
  78. package/dist/tableproperties/commands/tablebackgroundcolorcommand.d.ts +27 -27
  79. package/dist/tableproperties/commands/tablebordercolorcommand.d.ts +32 -32
  80. package/dist/tableproperties/commands/tableborderstylecommand.d.ts +32 -32
  81. package/dist/tableproperties/commands/tableborderwidthcommand.d.ts +46 -46
  82. package/dist/tableproperties/commands/tableheightcommand.d.ts +41 -41
  83. package/dist/tableproperties/commands/tablepropertycommand.d.ts +64 -64
  84. package/dist/tableproperties/commands/tablewidthcommand.d.ts +41 -41
  85. package/dist/tableproperties/tablepropertiesediting.d.ts +48 -48
  86. package/dist/tableproperties/tablepropertiesui.d.ts +131 -131
  87. package/dist/tableproperties/ui/tablepropertiesview.d.ts +210 -207
  88. package/dist/tableproperties.d.ts +29 -29
  89. package/dist/tablescroll/tablescrollediting.d.ts +91 -0
  90. package/dist/tablescroll/watchers.d.ts +29 -0
  91. package/dist/tablescroll.d.ts +23 -0
  92. package/dist/tableselection.d.ts +105 -106
  93. package/dist/tabletoolbar.d.ts +31 -31
  94. package/dist/tableui.d.ts +53 -53
  95. package/dist/tableutils.d.ts +532 -532
  96. package/dist/tablewalker.d.ts +342 -350
  97. package/dist/translations/af.js +1 -1
  98. package/dist/translations/af.umd.js +5 -3
  99. package/dist/translations/ar.js +1 -1
  100. package/dist/translations/ar.umd.js +5 -3
  101. package/dist/translations/ast.js +1 -1
  102. package/dist/translations/ast.umd.js +5 -3
  103. package/dist/translations/az.js +1 -1
  104. package/dist/translations/az.umd.js +5 -3
  105. package/dist/translations/be.js +1 -1
  106. package/dist/translations/be.umd.js +5 -3
  107. package/dist/translations/bg.js +1 -1
  108. package/dist/translations/bg.umd.js +5 -3
  109. package/dist/translations/bn.js +1 -1
  110. package/dist/translations/bn.umd.js +5 -3
  111. package/dist/translations/bs.js +1 -1
  112. package/dist/translations/bs.umd.js +5 -3
  113. package/dist/translations/ca.js +1 -1
  114. package/dist/translations/ca.umd.js +5 -3
  115. package/dist/translations/cs.js +1 -1
  116. package/dist/translations/cs.umd.js +5 -3
  117. package/dist/translations/da.js +1 -1
  118. package/dist/translations/da.umd.js +5 -3
  119. package/dist/translations/de-ch.js +1 -1
  120. package/dist/translations/de-ch.umd.js +5 -3
  121. package/dist/translations/de.js +1 -1
  122. package/dist/translations/de.umd.js +5 -3
  123. package/dist/translations/el.js +1 -1
  124. package/dist/translations/el.umd.js +5 -3
  125. package/dist/translations/en-au.js +1 -1
  126. package/dist/translations/en-au.umd.js +5 -3
  127. package/dist/translations/en-gb.js +1 -1
  128. package/dist/translations/en-gb.umd.js +5 -3
  129. package/dist/translations/en.js +1 -1
  130. package/dist/translations/en.umd.js +5 -3
  131. package/dist/translations/eo.js +1 -1
  132. package/dist/translations/eo.umd.js +5 -3
  133. package/dist/translations/es-co.js +1 -1
  134. package/dist/translations/es-co.umd.js +5 -3
  135. package/dist/translations/es.js +1 -1
  136. package/dist/translations/es.umd.js +5 -3
  137. package/dist/translations/et.js +1 -1
  138. package/dist/translations/et.umd.js +5 -3
  139. package/dist/translations/eu.js +1 -1
  140. package/dist/translations/eu.umd.js +5 -3
  141. package/dist/translations/fa.js +1 -1
  142. package/dist/translations/fa.umd.js +5 -3
  143. package/dist/translations/fi.js +1 -1
  144. package/dist/translations/fi.umd.js +5 -3
  145. package/dist/translations/fr.js +1 -1
  146. package/dist/translations/fr.umd.js +5 -3
  147. package/dist/translations/gl.js +1 -1
  148. package/dist/translations/gl.umd.js +5 -3
  149. package/dist/translations/gu.js +1 -1
  150. package/dist/translations/gu.umd.js +5 -3
  151. package/dist/translations/he.js +1 -1
  152. package/dist/translations/he.umd.js +5 -3
  153. package/dist/translations/hi.js +1 -1
  154. package/dist/translations/hi.umd.js +5 -3
  155. package/dist/translations/hr.js +1 -1
  156. package/dist/translations/hr.umd.js +5 -3
  157. package/dist/translations/hu.js +1 -1
  158. package/dist/translations/hu.umd.js +5 -3
  159. package/dist/translations/hy.js +1 -1
  160. package/dist/translations/hy.umd.js +5 -3
  161. package/dist/translations/id.js +1 -1
  162. package/dist/translations/id.umd.js +5 -3
  163. package/dist/translations/it.js +1 -1
  164. package/dist/translations/it.umd.js +5 -3
  165. package/dist/translations/ja.js +1 -1
  166. package/dist/translations/ja.umd.js +5 -3
  167. package/dist/translations/jv.js +1 -1
  168. package/dist/translations/jv.umd.js +5 -3
  169. package/dist/translations/kk.js +1 -1
  170. package/dist/translations/kk.umd.js +5 -3
  171. package/dist/translations/km.js +1 -1
  172. package/dist/translations/km.umd.js +5 -3
  173. package/dist/translations/kn.js +1 -1
  174. package/dist/translations/kn.umd.js +5 -3
  175. package/dist/translations/ko.js +1 -1
  176. package/dist/translations/ko.umd.js +5 -3
  177. package/dist/translations/ku.js +1 -1
  178. package/dist/translations/ku.umd.js +5 -3
  179. package/dist/translations/lt.js +1 -1
  180. package/dist/translations/lt.umd.js +5 -3
  181. package/dist/translations/lv.js +1 -1
  182. package/dist/translations/lv.umd.js +5 -3
  183. package/dist/translations/ms.js +1 -1
  184. package/dist/translations/ms.umd.js +5 -3
  185. package/dist/translations/nb.js +1 -1
  186. package/dist/translations/nb.umd.js +5 -3
  187. package/dist/translations/ne.js +1 -1
  188. package/dist/translations/ne.umd.js +5 -3
  189. package/dist/translations/nl.js +1 -1
  190. package/dist/translations/nl.umd.js +5 -3
  191. package/dist/translations/no.js +1 -1
  192. package/dist/translations/no.umd.js +5 -3
  193. package/dist/translations/oc.js +1 -1
  194. package/dist/translations/oc.umd.js +5 -3
  195. package/dist/translations/pl.js +1 -1
  196. package/dist/translations/pl.umd.js +5 -3
  197. package/dist/translations/pt-br.js +1 -1
  198. package/dist/translations/pt-br.umd.js +5 -3
  199. package/dist/translations/pt.js +1 -1
  200. package/dist/translations/pt.umd.js +5 -3
  201. package/dist/translations/ro.js +1 -1
  202. package/dist/translations/ro.umd.js +5 -3
  203. package/dist/translations/ru.js +1 -1
  204. package/dist/translations/ru.umd.js +5 -3
  205. package/dist/translations/si.js +1 -1
  206. package/dist/translations/si.umd.js +5 -3
  207. package/dist/translations/sk.js +1 -1
  208. package/dist/translations/sk.umd.js +5 -3
  209. package/dist/translations/sl.js +1 -1
  210. package/dist/translations/sl.umd.js +5 -3
  211. package/dist/translations/sq.js +1 -1
  212. package/dist/translations/sq.umd.js +5 -3
  213. package/dist/translations/sr-latn.js +1 -1
  214. package/dist/translations/sr-latn.umd.js +5 -3
  215. package/dist/translations/sr.js +1 -1
  216. package/dist/translations/sr.umd.js +5 -3
  217. package/dist/translations/sv.js +1 -1
  218. package/dist/translations/sv.umd.js +5 -3
  219. package/dist/translations/th.js +1 -1
  220. package/dist/translations/th.umd.js +5 -3
  221. package/dist/translations/ti.js +1 -1
  222. package/dist/translations/ti.umd.js +5 -3
  223. package/dist/translations/tk.js +1 -1
  224. package/dist/translations/tk.umd.js +5 -3
  225. package/dist/translations/tr.js +1 -1
  226. package/dist/translations/tr.umd.js +5 -3
  227. package/dist/translations/tt.js +1 -1
  228. package/dist/translations/tt.umd.js +5 -3
  229. package/dist/translations/ug.js +1 -1
  230. package/dist/translations/ug.umd.js +5 -3
  231. package/dist/translations/uk.js +1 -1
  232. package/dist/translations/uk.umd.js +5 -3
  233. package/dist/translations/ur.js +1 -1
  234. package/dist/translations/ur.umd.js +5 -3
  235. package/dist/translations/uz.js +1 -1
  236. package/dist/translations/uz.umd.js +5 -3
  237. package/dist/translations/vi.js +1 -1
  238. package/dist/translations/vi.umd.js +5 -3
  239. package/dist/translations/zh-cn.js +1 -1
  240. package/dist/translations/zh-cn.umd.js +5 -3
  241. package/dist/translations/zh.js +1 -1
  242. package/dist/translations/zh.umd.js +5 -3
  243. package/dist/ui/colorinputview.d.ts +136 -137
  244. package/dist/ui/inserttableview.d.ts +77 -78
  245. package/dist/utils/common.d.ts +64 -58
  246. package/dist/utils/structure.d.ts +229 -229
  247. package/dist/utils/table-properties.d.ts +92 -92
  248. package/dist/utils/ui/contextualballoon.d.ts +28 -28
  249. package/dist/utils/ui/table-properties.d.ts +130 -192
  250. package/dist/utils/ui/widget.d.ts +22 -22
  251. package/package.json +11 -10
@@ -1,160 +1,199 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
5
- /**
6
- * @module table/tablecolumnresize/utils
7
- */
8
- import type { Editor } from '@ckeditor/ckeditor5-core';
9
- import type { ModelElement, Model, ModelWriter } from '@ckeditor/ckeditor5-engine';
10
- import { type TableUtils } from '../tableutils.js';
11
- /**
12
- * Returns all the inserted or changed table model elements in a given change set. Only the tables
13
- * with 'columnsWidth' attribute are taken into account. The returned set may be empty.
14
- *
15
- * Most notably if an entire table is removed it will not be included in returned set.
16
- *
17
- * @internal
18
- * @param model The model to collect the affected elements from.
19
- * @returns A set of table model elements.
20
- */
2
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
+ /**
6
+ * @module table/tablecolumnresize/utils
7
+ */
8
+ import type { Editor } from "@ckeditor/ckeditor5-core";
9
+ import type { ModelElement, Model, ModelWriter } from "@ckeditor/ckeditor5-engine";
10
+ import { type TableUtils } from "../tableutils.js";
11
+ /**
12
+ * Returns all the inserted or changed table model elements in a given change set. Only the tables
13
+ * with 'columnsWidth' attribute are taken into account. The returned set may be empty.
14
+ *
15
+ * Most notably if an entire table is removed it will not be included in returned set.
16
+ *
17
+ * @internal
18
+ * @param model The model to collect the affected elements from.
19
+ * @returns A set of table model elements.
20
+ */
21
21
  export declare function getChangedResizedTables(model: Model): Set<ModelElement>;
22
22
  /**
23
- * Calculates the percentage of the minimum column width given in pixels for a given table.
24
- *
25
- * @internal
26
- * @param modelTable A table model element.
27
- * @param editor The editor instance.
28
- * @returns The minimal column width in percentage.
29
- */
23
+ * Calculates the percentage of the minimum column width given in pixels for a given table.
24
+ *
25
+ * @internal
26
+ * @param modelTable A table model element.
27
+ * @param editor The editor instance.
28
+ * @returns The minimal column width in percentage.
29
+ */
30
30
  export declare function getColumnMinWidthAsPercentage(modelTable: ModelElement, editor: Editor): number;
31
31
  /**
32
- * Calculates the table width in pixels.
33
- *
34
- * @internal
35
- * @param modelTable A table model element.
36
- * @param editor The editor instance.
37
- * @returns The width of the table in pixels.
38
- */
32
+ * Calculates the table width in pixels.
33
+ *
34
+ * @internal
35
+ * @param modelTable A table model element.
36
+ * @param editor The editor instance.
37
+ * @returns The width of the table in pixels.
38
+ */
39
39
  export declare function getTableWidthInPixels(modelTable: ModelElement, editor: Editor): number;
40
40
  /**
41
- * Returns the computed width (in pixels) of the DOM element without padding and borders.
42
- *
43
- * @internal
44
- * @param domElement A DOM element.
45
- * @returns The width of the DOM element in pixels.
46
- */
41
+ * Returns the computed width (in pixels) of the DOM element without padding and borders.
42
+ *
43
+ * @internal
44
+ * @param domElement A DOM element.
45
+ * @returns The width of the DOM element in pixels.
46
+ */
47
47
  export declare function getElementWidthInPixels(domElement: HTMLElement): number;
48
48
  /**
49
- * Returns the column indexes on the left and right edges of a cell. They differ if the cell spans
50
- * across multiple columns.
51
- *
52
- * @internal
53
- * @param cell A table cell model element.
54
- * @param tableUtils The Table Utils plugin instance.
55
- * @returns An object containing the indexes of the left and right edges of the cell.
56
- */
49
+ * Returns the width (in pixels) of a given DOM element's content that's actually available to its children -
50
+ * with the element's own vertical scrollbar subtracted where that's still needed.
51
+ *
52
+ * @internal
53
+ * @param domElement A DOM element.
54
+ * @returns The width available to the element's children, in pixels.
55
+ */
56
+ export declare function getContainerContentWidth(domElement: HTMLElement): number;
57
+ /**
58
+ * Returns the inner pixel width of a given editing root, or `null` if the root has no
59
+ * DOM element attached yet (e.g. it hasn't been rendered for the first time).
60
+ *
61
+ * @internal
62
+ */
63
+ export declare function getEditableContentWidth(editor: Editor, rootName: string): number | null;
64
+ /**
65
+ * Returns the column indexes on the left and right edges of a cell. They differ if the cell spans
66
+ * across multiple columns.
67
+ *
68
+ * @internal
69
+ * @param cell A table cell model element.
70
+ * @param tableUtils The Table Utils plugin instance.
71
+ * @returns An object containing the indexes of the left and right edges of the cell.
72
+ */
57
73
  export declare function getColumnEdgesIndexes(cell: ModelElement, tableUtils: TableUtils): {
58
- leftEdge: number;
59
- rightEdge: number;
74
+ leftEdge: number;
75
+ rightEdge: number;
60
76
  };
61
77
  /**
62
- * Rounds the provided value to a fixed-point number with defined number of digits after the decimal point.
63
- *
64
- * @internal
65
- * @param value A number to be rounded.
66
- * @returns The rounded number.
67
- */
78
+ * Rounds the provided value to a fixed-point number with defined number of digits after the decimal point.
79
+ *
80
+ * @internal
81
+ * @param value A number to be rounded.
82
+ * @returns The rounded number.
83
+ */
68
84
  export declare function toPrecision(value: number | string): number;
69
85
  /**
70
- * Clamps the number within the inclusive lower (min) and upper (max) bounds. Returned number is rounded using the
71
- * {@link ~toPrecision `toPrecision()`} function.
72
- *
73
- * @internal
74
- * @param number A number to be clamped.
75
- * @param min A lower bound.
76
- * @param max An upper bound.
77
- * @returns The clamped number.
78
- */
86
+ * Clamps the number within the inclusive lower (min) and upper (max) bounds. Returned number is rounded using the
87
+ * {@link ~toPrecision `toPrecision()`} function.
88
+ *
89
+ * @internal
90
+ * @param number A number to be clamped.
91
+ * @param min A lower bound.
92
+ * @param max An upper bound.
93
+ * @returns The clamped number.
94
+ */
79
95
  export declare function clamp(number: number, min: number, max: number): number;
80
96
  /**
81
- * Creates an array with defined length and fills all elements with defined value.
82
- *
83
- * @internal
84
- * @param length The length of the array.
85
- * @param value The value to fill the array with.
86
- * @returns An array with defined length and filled with defined value.
87
- */
97
+ * Creates an array with defined length and fills all elements with defined value.
98
+ *
99
+ * @internal
100
+ * @param length The length of the array.
101
+ * @param value The value to fill the array with.
102
+ * @returns An array with defined length and filled with defined value.
103
+ */
88
104
  export declare function createFilledArray<T>(length: number, value: T): Array<T>;
89
105
  /**
90
- * Sums all array values that can be parsed to a float.
91
- *
92
- * @internal
93
- * @param array An array of numbers.
94
- * @returns The sum of all array values.
95
- */
106
+ * Sums all array values that can be parsed to a float.
107
+ *
108
+ * @internal
109
+ * @param array An array of numbers.
110
+ * @returns The sum of all array values.
111
+ */
96
112
  export declare function sumArray(array: Array<number | string>): number;
97
113
  /**
98
- * Makes sure that the sum of the widths from all columns is 100%. If the sum of all the widths is not equal 100%, all the widths are
99
- * changed proportionally so that they all sum back to 100%. If there are columns without specified width, the amount remaining
100
- * after assigning the known widths will be distributed equally between them.
101
- *
102
- * @internal
103
- * @param columnWidths An array of column widths.
104
- * @returns An array of column widths guaranteed to sum up to 100%.
105
- */
114
+ * Makes sure that the sum of the widths from all columns is 100%. If the sum of all the widths is not equal 100%, all the widths are
115
+ * changed proportionally so that they all sum back to 100%. If there are columns without specified width, the amount remaining
116
+ * after assigning the known widths will be distributed equally between them.
117
+ *
118
+ * @internal
119
+ * @param columnWidths An array of column widths.
120
+ * @returns An array of column widths guaranteed to sum up to 100%.
121
+ */
106
122
  export declare function normalizeColumnWidths(columnWidths: Array<string>): Array<string>;
107
123
  /**
108
- * Calculates the total horizontal space taken by the cell. That includes:
109
- * * width,
110
- * * left and red padding,
111
- * * border width.
112
- *
113
- * @internal
114
- * @param domCell A DOM cell element.
115
- * @returns Width in pixels without `px` at the end.
116
- */
124
+ * Calculates the total horizontal space taken by the cell. That includes:
125
+ * * width,
126
+ * * left and red padding,
127
+ * * border width.
128
+ *
129
+ * @internal
130
+ * @param domCell A DOM cell element.
131
+ * @returns Width in pixels without `px` at the end.
132
+ */
117
133
  export declare function getDomCellOuterWidth(domCell: HTMLElement): number;
118
134
  /**
119
- * Updates column elements to match columns widths.
120
- *
121
- * @internal
122
- * @param columns
123
- * @param tableColumnGroup
124
- * @param normalizedWidths
125
- * @param writer
126
- */
135
+ * Updates column elements to match columns widths.
136
+ *
137
+ * @internal
138
+ * @param columns
139
+ * @param tableColumnGroup
140
+ * @param normalizedWidths
141
+ * @param writer
142
+ */
127
143
  export declare function updateColumnElements(columns: Array<ModelElement>, tableColumnGroup: ModelElement, normalizedWidths: Array<string>, writer: ModelWriter): void;
128
144
  /**
129
- * Returns a 'tableColumnGroup' element from the 'table'.
130
- *
131
- * @internal
132
- * @param element A 'table' or 'tableColumnGroup' element.
133
- * @returns A 'tableColumnGroup' element.
134
- */
145
+ * Returns a 'tableColumnGroup' element from the 'table'.
146
+ *
147
+ * @internal
148
+ * @param element A 'table' or 'tableColumnGroup' element.
149
+ * @returns A 'tableColumnGroup' element.
150
+ */
135
151
  export declare function getColumnGroupElement(element: ModelElement): ModelElement;
136
152
  /**
137
- * Returns an array of 'tableColumn' elements. It may be empty if there's no `tableColumnGroup` element.
138
- *
139
- * @internal
140
- * @param element A 'table' or 'tableColumnGroup' element.
141
- * @returns An array of 'tableColumn' elements.
142
- */
153
+ * Returns an array of 'tableColumn' elements. It may be empty if there's no `tableColumnGroup` element.
154
+ *
155
+ * @internal
156
+ * @param element A 'table' or 'tableColumnGroup' element.
157
+ * @returns An array of 'tableColumn' elements.
158
+ */
143
159
  export declare function getTableColumnElements(element: ModelElement): Array<ModelElement>;
144
160
  /**
145
- * Returns an array of table column widths.
146
- *
147
- * @internal
148
- * @param element A 'table' or 'tableColumnGroup' element.
149
- * @returns An array of table column widths.
150
- */
161
+ * Returns an array of table column widths.
162
+ *
163
+ * @internal
164
+ * @param element A 'table' or 'tableColumnGroup' element.
165
+ * @returns An array of table column widths.
166
+ */
151
167
  export declare function getTableColumnsWidths(element: ModelElement): Array<string>;
152
168
  /**
153
- * Translates the `colSpan` model attribute into additional column widths and returns the resulting array.
154
- *
155
- * @internal
156
- * @param element A 'table' or 'tableColumnGroup' element.
157
- * @param writer A writer instance.
158
- * @returns An array of table column widths.
159
- */
169
+ * Tells whether a table is in the pixel width mode, that is, its `tableWidth` attribute is expressed in pixels.
170
+ * The `tableWidth` unit is the single source of truth for the whole table's width mode.
171
+ *
172
+ * @internal
173
+ * @param table A 'table' model element.
174
+ */
175
+ export declare function isTableWidthInPixels(table: ModelElement): boolean;
176
+ /**
177
+ * Tells whether the given column widths are expressed in pixels.
178
+ *
179
+ * @internal
180
+ * @param columnWidths An array of column widths.
181
+ */
182
+ export declare function isColumnWidthsInPixels(columnWidths: Array<string>): boolean;
183
+ /**
184
+ * Translates the `colSpan` model attribute into additional column widths and returns the resulting array.
185
+ *
186
+ * @internal
187
+ * @param element A 'table' or 'tableColumnGroup' element.
188
+ * @param writer A writer instance.
189
+ * @returns An array of table column widths.
190
+ */
160
191
  export declare function translateColSpanAttribute(element: ModelElement, writer: ModelWriter): Array<string>;
192
+ /**
193
+ * Removes the `tableCellWidth` attribute from every cell of the given table. Once a column is resized (with the resize
194
+ * handler or the column-width command), a per-cell width is obsolete - the column width governs the layout - so it is
195
+ * dropped to keep the model clean.
196
+ *
197
+ * @internal
198
+ */
199
+ export declare function removeCellWidthsFromTable(writer: ModelWriter, table: ModelElement): void;
@@ -1,30 +1,29 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
2
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
5
  /**
6
- * @module table/tablecolumnresize
7
- */
8
- import { Plugin } from '@ckeditor/ckeditor5-core';
9
- import { TableColumnResizeEditing } from './tablecolumnresize/tablecolumnresizeediting.js';
10
- import { TableCellWidthEditing } from './tablecellwidth/tablecellwidthediting.js';
11
- import '../theme/tablecolumnresize.css';
6
+ * @module table/tablecolumnresize
7
+ */
8
+ import { Plugin, type PluginDependenciesOf } from "@ckeditor/ckeditor5-core";
9
+ import { TableColumnResizeEditing } from "./tablecolumnresize/tablecolumnresizeediting.js";
10
+ import { TableCellWidthEditing } from "./tablecellwidth/tablecellwidthediting.js";
12
11
  /**
13
- * The table column resize feature.
14
- *
15
- * It provides the possibility to set the width of each column in a table using a resize handler.
16
- */
12
+ * The table column resize feature.
13
+ *
14
+ * It provides the possibility to set the width of each column in a table using a resize handler.
15
+ */
17
16
  export declare class TableColumnResize extends Plugin {
18
- /**
19
- * @inheritDoc
20
- */
21
- static get requires(): readonly [typeof TableColumnResizeEditing, typeof TableCellWidthEditing];
22
- /**
23
- * @inheritDoc
24
- */
25
- static get pluginName(): "TableColumnResize";
26
- /**
27
- * @inheritDoc
28
- */
29
- static get isOfficialPlugin(): true;
17
+ /**
18
+ * @inheritDoc
19
+ */
20
+ static get requires(): PluginDependenciesOf<[TableColumnResizeEditing, TableCellWidthEditing]>;
21
+ /**
22
+ * @inheritDoc
23
+ */
24
+ static get pluginName(): "TableColumnResize";
25
+ /**
26
+ * @inheritDoc
27
+ */
28
+ static override get isOfficialPlugin(): true;
30
29
  }