@ckeditor/ckeditor5-table 45.2.1 → 46.0.0-alpha.1

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 (179) hide show
  1. package/build/table.js +1 -1
  2. package/dist/index-content.css +6 -5
  3. package/dist/index-editor.css +46 -46
  4. package/dist/index.css +63 -62
  5. package/dist/index.css.map +1 -1
  6. package/dist/index.js +306 -49
  7. package/dist/index.js.map +1 -1
  8. package/package.json +10 -10
  9. package/src/commands/insertcolumncommand.d.ts +1 -1
  10. package/src/commands/insertcolumncommand.js +1 -1
  11. package/src/commands/insertrowcommand.d.ts +1 -1
  12. package/src/commands/insertrowcommand.js +1 -1
  13. package/src/commands/inserttablecommand.d.ts +1 -1
  14. package/src/commands/inserttablecommand.js +1 -1
  15. package/src/commands/inserttablelayoutcommand.d.ts +1 -1
  16. package/src/commands/inserttablelayoutcommand.js +1 -1
  17. package/src/commands/mergecellcommand.d.ts +3 -3
  18. package/src/commands/mergecellcommand.js +2 -2
  19. package/src/commands/mergecellscommand.d.ts +1 -1
  20. package/src/commands/mergecellscommand.js +2 -2
  21. package/src/commands/removecolumncommand.d.ts +1 -1
  22. package/src/commands/removecolumncommand.js +2 -2
  23. package/src/commands/removerowcommand.d.ts +1 -1
  24. package/src/commands/removerowcommand.js +1 -1
  25. package/src/commands/selectcolumncommand.d.ts +1 -1
  26. package/src/commands/selectcolumncommand.js +2 -2
  27. package/src/commands/selectrowcommand.d.ts +1 -1
  28. package/src/commands/selectrowcommand.js +1 -1
  29. package/src/commands/setheadercolumncommand.d.ts +2 -2
  30. package/src/commands/setheadercolumncommand.js +1 -1
  31. package/src/commands/setheaderrowcommand.d.ts +2 -2
  32. package/src/commands/setheaderrowcommand.js +1 -1
  33. package/src/commands/splitcellcommand.d.ts +1 -1
  34. package/src/commands/splitcellcommand.js +1 -1
  35. package/src/converters/downcast.d.ts +21 -9
  36. package/src/converters/downcast.js +11 -3
  37. package/src/converters/table-caption-post-fixer.d.ts +3 -1
  38. package/src/converters/table-caption-post-fixer.js +3 -1
  39. package/src/converters/table-cell-paragraph-post-fixer.d.ts +3 -1
  40. package/src/converters/table-cell-paragraph-post-fixer.js +3 -1
  41. package/src/converters/table-cell-refresh-handler.d.ts +3 -1
  42. package/src/converters/table-cell-refresh-handler.js +3 -1
  43. package/src/converters/table-headings-refresh-handler.d.ts +3 -1
  44. package/src/converters/table-headings-refresh-handler.js +4 -2
  45. package/src/converters/table-layout-post-fixer.d.ts +3 -1
  46. package/src/converters/table-layout-post-fixer.js +4 -2
  47. package/src/converters/tableproperties.d.ts +17 -1
  48. package/src/converters/tableproperties.js +49 -2
  49. package/src/converters/upcasttable.d.ts +6 -1
  50. package/src/converters/upcasttable.js +6 -1
  51. package/src/index.d.ts +89 -56
  52. package/src/index.js +84 -24
  53. package/src/plaintableoutput.d.ts +2 -2
  54. package/src/plaintableoutput.js +2 -2
  55. package/src/table.d.ts +7 -7
  56. package/src/table.js +7 -7
  57. package/src/tablecaption/tablecaptionediting.d.ts +6 -6
  58. package/src/tablecaption/tablecaptionediting.js +8 -8
  59. package/src/tablecaption/tablecaptionui.d.ts +1 -1
  60. package/src/tablecaption/tablecaptionui.js +1 -1
  61. package/src/tablecaption/toggletablecaptioncommand.d.ts +1 -1
  62. package/src/tablecaption/toggletablecaptioncommand.js +1 -1
  63. package/src/tablecaption/utils.d.ts +8 -4
  64. package/src/tablecaption/utils.js +4 -0
  65. package/src/tablecaption.d.ts +3 -3
  66. package/src/tablecaption.js +3 -3
  67. package/src/tablecellproperties/commands/tablecellbackgroundcolorcommand.d.ts +2 -2
  68. package/src/tablecellproperties/commands/tablecellbackgroundcolorcommand.js +2 -2
  69. package/src/tablecellproperties/commands/tablecellbordercolorcommand.d.ts +4 -4
  70. package/src/tablecellproperties/commands/tablecellbordercolorcommand.js +2 -2
  71. package/src/tablecellproperties/commands/tablecellborderstylecommand.d.ts +4 -4
  72. package/src/tablecellproperties/commands/tablecellborderstylecommand.js +2 -2
  73. package/src/tablecellproperties/commands/tablecellborderwidthcommand.d.ts +4 -4
  74. package/src/tablecellproperties/commands/tablecellborderwidthcommand.js +2 -2
  75. package/src/tablecellproperties/commands/tablecellheightcommand.d.ts +2 -2
  76. package/src/tablecellproperties/commands/tablecellheightcommand.js +2 -2
  77. package/src/tablecellproperties/commands/tablecellhorizontalalignmentcommand.d.ts +2 -2
  78. package/src/tablecellproperties/commands/tablecellhorizontalalignmentcommand.js +2 -2
  79. package/src/tablecellproperties/commands/tablecellpaddingcommand.d.ts +4 -4
  80. package/src/tablecellproperties/commands/tablecellpaddingcommand.js +2 -2
  81. package/src/tablecellproperties/commands/tablecellpropertycommand.d.ts +3 -3
  82. package/src/tablecellproperties/commands/tablecellpropertycommand.js +1 -1
  83. package/src/tablecellproperties/commands/tablecellverticalalignmentcommand.d.ts +2 -2
  84. package/src/tablecellproperties/commands/tablecellverticalalignmentcommand.js +2 -2
  85. package/src/tablecellproperties/tablecellpropertiesediting.d.ts +3 -3
  86. package/src/tablecellproperties/tablecellpropertiesediting.js +44 -19
  87. package/src/tablecellproperties/tablecellpropertiesui.d.ts +2 -2
  88. package/src/tablecellproperties/tablecellpropertiesui.js +2 -2
  89. package/src/tablecellproperties/ui/tablecellpropertiesview.d.ts +2 -2
  90. package/src/tablecellproperties/ui/tablecellpropertiesview.js +1 -1
  91. package/src/tablecellproperties.d.ts +3 -3
  92. package/src/tablecellproperties.js +3 -3
  93. package/src/tablecellwidth/commands/tablecellwidthcommand.d.ts +2 -2
  94. package/src/tablecellwidth/commands/tablecellwidthcommand.js +2 -2
  95. package/src/tablecellwidth/tablecellwidthediting.d.ts +2 -2
  96. package/src/tablecellwidth/tablecellwidthediting.js +5 -3
  97. package/src/tableclipboard.d.ts +6 -6
  98. package/src/tableclipboard.js +4 -4
  99. package/src/tablecolumnresize/constants.d.ts +9 -0
  100. package/src/tablecolumnresize/constants.js +9 -0
  101. package/src/tablecolumnresize/converters.d.ts +11 -1
  102. package/src/tablecolumnresize/converters.js +16 -0
  103. package/src/tablecolumnresize/tablecolumnresizeediting.d.ts +7 -7
  104. package/src/tablecolumnresize/tablecolumnresizeediting.js +13 -11
  105. package/src/tablecolumnresize/tablewidthscommand.d.ts +3 -3
  106. package/src/tablecolumnresize/tablewidthscommand.js +1 -1
  107. package/src/tablecolumnresize/utils.d.ts +23 -11
  108. package/src/tablecolumnresize/utils.js +14 -2
  109. package/src/tablecolumnresize.d.ts +3 -3
  110. package/src/tablecolumnresize.js +3 -3
  111. package/src/tableconfig.d.ts +3 -1
  112. package/src/tableediting.d.ts +7 -7
  113. package/src/tableediting.js +19 -19
  114. package/src/tablekeyboard.d.ts +8 -8
  115. package/src/tablekeyboard.js +7 -7
  116. package/src/tablelayout/commands/tabletypecommand.d.ts +1 -1
  117. package/src/tablelayout/commands/tabletypecommand.js +1 -1
  118. package/src/tablelayout/tablelayoutediting.d.ts +2 -2
  119. package/src/tablelayout/tablelayoutediting.js +4 -4
  120. package/src/tablelayout/tablelayoutui.d.ts +1 -1
  121. package/src/tablelayout/tablelayoutui.js +4 -4
  122. package/src/tablelayout.d.ts +5 -5
  123. package/src/tablelayout.js +5 -5
  124. package/src/tablemouse/mouseeventsobserver.d.ts +13 -11
  125. package/src/tablemouse/mouseeventsobserver.js +4 -2
  126. package/src/tablemouse.d.ts +3 -3
  127. package/src/tablemouse.js +4 -4
  128. package/src/tableproperties/commands/tablealignmentcommand.d.ts +2 -2
  129. package/src/tableproperties/commands/tablealignmentcommand.js +2 -2
  130. package/src/tableproperties/commands/tablebackgroundcolorcommand.d.ts +2 -2
  131. package/src/tableproperties/commands/tablebackgroundcolorcommand.js +2 -2
  132. package/src/tableproperties/commands/tablebordercolorcommand.d.ts +4 -4
  133. package/src/tableproperties/commands/tablebordercolorcommand.js +2 -2
  134. package/src/tableproperties/commands/tableborderstylecommand.d.ts +4 -4
  135. package/src/tableproperties/commands/tableborderstylecommand.js +2 -2
  136. package/src/tableproperties/commands/tableborderwidthcommand.d.ts +4 -4
  137. package/src/tableproperties/commands/tableborderwidthcommand.js +2 -2
  138. package/src/tableproperties/commands/tableheightcommand.d.ts +2 -2
  139. package/src/tableproperties/commands/tableheightcommand.js +2 -2
  140. package/src/tableproperties/commands/tablepropertycommand.d.ts +4 -4
  141. package/src/tableproperties/commands/tablepropertycommand.js +1 -1
  142. package/src/tableproperties/commands/tablewidthcommand.d.ts +2 -2
  143. package/src/tableproperties/commands/tablewidthcommand.js +2 -2
  144. package/src/tableproperties/tablepropertiesediting.d.ts +2 -2
  145. package/src/tableproperties/tablepropertiesediting.js +49 -21
  146. package/src/tableproperties/tablepropertiesui.d.ts +2 -2
  147. package/src/tableproperties/tablepropertiesui.js +2 -2
  148. package/src/tableproperties/ui/tablepropertiesview.d.ts +2 -2
  149. package/src/tableproperties/ui/tablepropertiesview.js +1 -1
  150. package/src/tableproperties.d.ts +3 -3
  151. package/src/tableproperties.js +3 -3
  152. package/src/tableselection.d.ts +9 -9
  153. package/src/tableselection.js +4 -4
  154. package/src/tabletoolbar.d.ts +1 -1
  155. package/src/tabletoolbar.js +1 -1
  156. package/src/tableui.d.ts +1 -1
  157. package/src/tableui.js +4 -4
  158. package/src/tableutils.d.ts +25 -26
  159. package/src/tableutils.js +4 -4
  160. package/src/tablewalker.d.ts +8 -8
  161. package/src/tablewalker.js +2 -2
  162. package/src/ui/colorinputview.d.ts +6 -1
  163. package/src/ui/colorinputview.js +1 -1
  164. package/src/ui/inserttableview.d.ts +3 -1
  165. package/src/ui/inserttableview.js +3 -1
  166. package/src/utils/common.d.ts +16 -7
  167. package/src/utils/common.js +9 -1
  168. package/src/utils/structure.d.ts +24 -14
  169. package/src/utils/structure.js +11 -1
  170. package/src/utils/table-properties.d.ts +15 -2
  171. package/src/utils/table-properties.js +6 -0
  172. package/src/utils/ui/contextualballoon.d.ts +5 -3
  173. package/src/utils/ui/contextualballoon.js +2 -0
  174. package/src/utils/ui/table-properties.d.ts +20 -7
  175. package/src/utils/ui/table-properties.js +24 -11
  176. package/src/utils/ui/widget.d.ts +6 -0
  177. package/src/utils/ui/widget.js +6 -0
  178. package/theme/tablecaption.css +9 -8
  179. package/theme/tablecolumnresize.css +2 -2
@@ -7,14 +7,15 @@
7
7
  */
8
8
  import { type ColorOption, type LabeledFieldView, type ListDropdownItemDefinition, type NormalizedColorOption, type ToolbarView, type View, type ColorPickerConfig } from 'ckeditor5/src/ui.js';
9
9
  import { Collection, type LocaleTranslate } from 'ckeditor5/src/utils.js';
10
- import type TableCellPropertiesView from '../../tablecellproperties/ui/tablecellpropertiesview.js';
11
- import type TablePropertiesView from '../../tableproperties/ui/tablepropertiesview.js';
12
- import ColorInputView from '../../ui/colorinputview.js';
10
+ import { type TableCellPropertiesView } from '../../tablecellproperties/ui/tablecellpropertiesview.js';
11
+ import { type TablePropertiesView } from '../../tableproperties/ui/tablepropertiesview.js';
12
+ import { ColorInputView } from '../../ui/colorinputview.js';
13
13
  /**
14
14
  * Returns an object containing pairs of CSS border style values and their localized UI
15
15
  * labels. Used by {@link module:table/tablecellproperties/ui/tablecellpropertiesview~TableCellPropertiesView}
16
16
  * and {@link module:table/tableproperties/ui/tablepropertiesview~TablePropertiesView}.
17
17
  *
18
+ * @internal
18
19
  * @param t The "t" function provided by the editor that is used to localize strings.
19
20
  */
20
21
  export declare function getBorderStyleLabels(t: LocaleTranslate): Record<string, string>;
@@ -22,6 +23,7 @@ export declare function getBorderStyleLabels(t: LocaleTranslate): Record<string,
22
23
  * Returns a localized error string that can be displayed next to color (background, border)
23
24
  * fields that have an invalid value.
24
25
  *
26
+ * @internal
25
27
  * @param t The "t" function provided by the editor that is used to localize strings.
26
28
  */
27
29
  export declare function getLocalizedColorErrorText(t: LocaleTranslate): string;
@@ -29,6 +31,7 @@ export declare function getLocalizedColorErrorText(t: LocaleTranslate): string;
29
31
  * Returns a localized error string that can be displayed next to length (padding, border width)
30
32
  * fields that have an invalid value.
31
33
  *
34
+ * @internal
32
35
  * @param t The "t" function provided by the editor that is used to localize strings.
33
36
  */
34
37
  export declare function getLocalizedLengthErrorText(t: LocaleTranslate): string;
@@ -36,27 +39,34 @@ export declare function getLocalizedLengthErrorText(t: LocaleTranslate): string;
36
39
  * Returns `true` when the passed value is an empty string or a valid CSS color expression.
37
40
  * Otherwise, `false` is returned.
38
41
  *
39
- * See {@link module:engine/view/styles/utils~isColor}.
42
+ * See {@link module:engine/view/styles/utils~isColorStyleValue}.
43
+ *
44
+ * @internal
40
45
  */
41
46
  export declare function colorFieldValidator(value: string): boolean;
42
47
  /**
43
48
  * Returns `true` when the passed value is an empty string, a number without a unit or a valid CSS length expression.
44
49
  * Otherwise, `false` is returned.
45
50
  *
46
- * See {@link module:engine/view/styles/utils~isLength}.
47
- * See {@link module:engine/view/styles/utils~isPercentage}.
51
+ * See {@link module:engine/view/styles/utils~isLengthStyleValue}.
52
+ * See {@link module:engine/view/styles/utils~isPercentageStyleValue}.
53
+ *
54
+ * @internal
48
55
  */
49
56
  export declare function lengthFieldValidator(value: string): boolean;
50
57
  /**
51
58
  * Returns `true` when the passed value is an empty string, a number without a unit or a valid CSS length expression.
52
59
  * Otherwise, `false` is returned.
53
60
  *
54
- * See {@link module:engine/view/styles/utils~isLength}.
61
+ * See {@link module:engine/view/styles/utils~isLengthStyleValue}.
62
+ *
63
+ * @internal
55
64
  */
56
65
  export declare function lineWidthFieldValidator(value: string): boolean;
57
66
  /**
58
67
  * Generates item definitions for a UI dropdown that allows changing the border style of a table or a table cell.
59
68
  *
69
+ * @internal
60
70
  * @param defaultStyle The default border.
61
71
  */
62
72
  export declare function getBorderStyleDefinitions(view: TableCellPropertiesView | TablePropertiesView, defaultStyle: string): Collection<ListDropdownItemDefinition>;
@@ -67,6 +77,7 @@ export declare function getBorderStyleDefinitions(view: TableCellPropertiesView
67
77
  * * have some icons,
68
78
  * * set a certain UI view property value upon execution.
69
79
  *
80
+ * @internal
70
81
  * @param options Configuration options
71
82
  * @param options.view The view that has the observable property.
72
83
  * @param options.icons Object with button icons.
@@ -158,6 +169,8 @@ export declare function fillToolbar<TView extends View, TPropertyName extends ke
158
169
  * }
159
170
  * ];
160
171
  * ```
172
+ *
173
+ * @internal
161
174
  */
162
175
  export declare const defaultColors: Array<ColorOption>;
163
176
  /**
@@ -5,16 +5,17 @@
5
5
  /**
6
6
  * @module table/utils/ui/table-properties
7
7
  */
8
- import { ButtonView, ViewModel } from 'ckeditor5/src/ui.js';
8
+ import { ButtonView, UIModel } from 'ckeditor5/src/ui.js';
9
9
  import { Collection } from 'ckeditor5/src/utils.js';
10
- import { isColor, isLength, isPercentage } from 'ckeditor5/src/engine.js';
11
- import ColorInputView from '../../ui/colorinputview.js';
10
+ import { isColorStyleValue, isLengthStyleValue, isPercentageStyleValue } from 'ckeditor5/src/engine.js';
11
+ import { ColorInputView } from '../../ui/colorinputview.js';
12
12
  const isEmpty = (val) => val === '';
13
13
  /**
14
14
  * Returns an object containing pairs of CSS border style values and their localized UI
15
15
  * labels. Used by {@link module:table/tablecellproperties/ui/tablecellpropertiesview~TableCellPropertiesView}
16
16
  * and {@link module:table/tableproperties/ui/tablepropertiesview~TablePropertiesView}.
17
17
  *
18
+ * @internal
18
19
  * @param t The "t" function provided by the editor that is used to localize strings.
19
20
  */
20
21
  export function getBorderStyleLabels(t) {
@@ -34,6 +35,7 @@ export function getBorderStyleLabels(t) {
34
35
  * Returns a localized error string that can be displayed next to color (background, border)
35
36
  * fields that have an invalid value.
36
37
  *
38
+ * @internal
37
39
  * @param t The "t" function provided by the editor that is used to localize strings.
38
40
  */
39
41
  export function getLocalizedColorErrorText(t) {
@@ -43,6 +45,7 @@ export function getLocalizedColorErrorText(t) {
43
45
  * Returns a localized error string that can be displayed next to length (padding, border width)
44
46
  * fields that have an invalid value.
45
47
  *
48
+ * @internal
46
49
  * @param t The "t" function provided by the editor that is used to localize strings.
47
50
  */
48
51
  export function getLocalizedLengthErrorText(t) {
@@ -52,36 +55,43 @@ export function getLocalizedLengthErrorText(t) {
52
55
  * Returns `true` when the passed value is an empty string or a valid CSS color expression.
53
56
  * Otherwise, `false` is returned.
54
57
  *
55
- * See {@link module:engine/view/styles/utils~isColor}.
58
+ * See {@link module:engine/view/styles/utils~isColorStyleValue}.
59
+ *
60
+ * @internal
56
61
  */
57
62
  export function colorFieldValidator(value) {
58
63
  value = value.trim().toLowerCase();
59
- return isEmpty(value) || isColor(value);
64
+ return isEmpty(value) || isColorStyleValue(value);
60
65
  }
61
66
  /**
62
67
  * Returns `true` when the passed value is an empty string, a number without a unit or a valid CSS length expression.
63
68
  * Otherwise, `false` is returned.
64
69
  *
65
- * See {@link module:engine/view/styles/utils~isLength}.
66
- * See {@link module:engine/view/styles/utils~isPercentage}.
70
+ * See {@link module:engine/view/styles/utils~isLengthStyleValue}.
71
+ * See {@link module:engine/view/styles/utils~isPercentageStyleValue}.
72
+ *
73
+ * @internal
67
74
  */
68
75
  export function lengthFieldValidator(value) {
69
76
  value = value.trim();
70
- return isEmpty(value) || isNumberString(value) || isLength(value) || isPercentage(value);
77
+ return isEmpty(value) || isNumberString(value) || isLengthStyleValue(value) || isPercentageStyleValue(value);
71
78
  }
72
79
  /**
73
80
  * Returns `true` when the passed value is an empty string, a number without a unit or a valid CSS length expression.
74
81
  * Otherwise, `false` is returned.
75
82
  *
76
- * See {@link module:engine/view/styles/utils~isLength}.
83
+ * See {@link module:engine/view/styles/utils~isLengthStyleValue}.
84
+ *
85
+ * @internal
77
86
  */
78
87
  export function lineWidthFieldValidator(value) {
79
88
  value = value.trim();
80
- return isEmpty(value) || isNumberString(value) || isLength(value);
89
+ return isEmpty(value) || isNumberString(value) || isLengthStyleValue(value);
81
90
  }
82
91
  /**
83
92
  * Generates item definitions for a UI dropdown that allows changing the border style of a table or a table cell.
84
93
  *
94
+ * @internal
85
95
  * @param defaultStyle The default border.
86
96
  */
87
97
  export function getBorderStyleDefinitions(view, defaultStyle) {
@@ -90,7 +100,7 @@ export function getBorderStyleDefinitions(view, defaultStyle) {
90
100
  for (const style in styleLabels) {
91
101
  const definition = {
92
102
  type: 'button',
93
- model: new ViewModel({
103
+ model: new UIModel({
94
104
  _borderStyleValue: style,
95
105
  label: styleLabels[style],
96
106
  role: 'menuitemradio',
@@ -121,6 +131,7 @@ export function getBorderStyleDefinitions(view, defaultStyle) {
121
131
  * * have some icons,
122
132
  * * set a certain UI view property value upon execution.
123
133
  *
134
+ * @internal
124
135
  * @param options Configuration options
125
136
  * @param options.view The view that has the observable property.
126
137
  * @param options.icons Object with button icons.
@@ -237,6 +248,8 @@ export function fillToolbar(options) {
237
248
  * }
238
249
  * ];
239
250
  * ```
251
+ *
252
+ * @internal
240
253
  */
241
254
  export const defaultColors = [
242
255
  {
@@ -8,13 +8,19 @@
8
8
  import type { ViewDocumentSelection, ViewElement } from 'ckeditor5/src/engine.js';
9
9
  /**
10
10
  * Depending on the position of the selection either return the selected table or the table higher in the hierarchy.
11
+ *
12
+ * @internal
11
13
  */
12
14
  export declare function getSelectionAffectedTableWidget(selection: ViewDocumentSelection): ViewElement | null;
13
15
  /**
14
16
  * Returns a table widget editing view element if one is selected.
17
+ *
18
+ * @internal
15
19
  */
16
20
  export declare function getSelectedTableWidget(selection: ViewDocumentSelection): ViewElement | null;
17
21
  /**
18
22
  * Returns a table widget editing view element if one is among the selection's ancestors.
23
+ *
24
+ * @internal
19
25
  */
20
26
  export declare function getTableWidgetAncestor(selection: ViewDocumentSelection): ViewElement | null;
@@ -5,6 +5,8 @@
5
5
  import { isWidget } from 'ckeditor5/src/widget.js';
6
6
  /**
7
7
  * Depending on the position of the selection either return the selected table or the table higher in the hierarchy.
8
+ *
9
+ * @internal
8
10
  */
9
11
  export function getSelectionAffectedTableWidget(selection) {
10
12
  const selectedTable = getSelectedTableWidget(selection);
@@ -15,6 +17,8 @@ export function getSelectionAffectedTableWidget(selection) {
15
17
  }
16
18
  /**
17
19
  * Returns a table widget editing view element if one is selected.
20
+ *
21
+ * @internal
18
22
  */
19
23
  export function getSelectedTableWidget(selection) {
20
24
  const viewElement = selection.getSelectedElement();
@@ -25,6 +29,8 @@ export function getSelectedTableWidget(selection) {
25
29
  }
26
30
  /**
27
31
  * Returns a table widget editing view element if one is among the selection's ancestors.
32
+ *
33
+ * @internal
28
34
  */
29
35
  export function getTableWidgetAncestor(selection) {
30
36
  const selectionPosition = selection.getFirstPosition();
@@ -6,19 +6,20 @@
6
6
  @import "@ckeditor/ckeditor5-ui/theme/mixins/_mediacolors.css";
7
7
 
8
8
  :root {
9
- --ck-color-selector-caption-background: hsl(0, 0%, 97%);
10
- --ck-color-selector-caption-text: hsl(0, 0%, 20%);
11
- --ck-color-selector-caption-highlighted-background: hsl(52deg 100% 50%);
9
+ --ck-content-color-table-caption-background: hsl(0, 0%, 97%);
10
+ --ck-content-color-table-caption-text: hsl(0, 0%, 20%);
11
+ --ck-color-table-caption-highlighted-background: hsl(52deg 100% 50%);
12
12
  }
13
13
 
14
14
  /* Content styles */
15
15
  .ck-content .table > figcaption {
16
16
  display: table-caption;
17
17
  caption-side: top;
18
- word-break: break-word;
18
+ word-break: normal;
19
+ overflow-wrap: anywhere;
19
20
  text-align: center;
20
- color: var(--ck-color-selector-caption-text);
21
- background-color: var(--ck-color-selector-caption-background);
21
+ color: var(--ck-content-color-table-caption-text);
22
+ background-color: var(--ck-content-color-table-caption-background);
22
23
  padding: .6em;
23
24
  font-size: .75em;
24
25
  outline-offset: -1px;
@@ -54,10 +55,10 @@
54
55
 
55
56
  @keyframes ck-table-caption-highlight {
56
57
  0% {
57
- background-color: var(--ck-color-selector-caption-highlighted-background);
58
+ background-color: var(--ck-color-table-caption-highlighted-background);
58
59
  }
59
60
 
60
61
  100% {
61
- background-color: var(--ck-color-selector-caption-background);
62
+ background-color: var(--ck-content-color-table-caption-background);
62
63
  }
63
64
  }
@@ -4,7 +4,7 @@
4
4
  */
5
5
 
6
6
  :root {
7
- --ck-color-selector-column-resizer-hover: var(--ck-color-base-active);
7
+ --ck-color-table-column-resizer-hover: var(--ck-color-base-active);
8
8
  --ck-table-column-resizer-width: 7px;
9
9
 
10
10
  /* The offset used for absolute positioning of the resizer element, so that it is placed exactly above the cell border.
@@ -52,7 +52,7 @@
52
52
 
53
53
  .ck.ck-editor__editable .table .ck-table-column-resizer:hover,
54
54
  .ck.ck-editor__editable .table .ck-table-column-resizer__active {
55
- background-color: var(--ck-color-selector-column-resizer-hover);
55
+ background-color: var(--ck-color-table-column-resizer-hover);
56
56
  opacity: 0.25;
57
57
  }
58
58