@ckeditor/ckeditor5-table 48.2.0 → 48.3.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 (94) hide show
  1. package/dist/augmentation.d.ts +80 -80
  2. package/dist/commands/insertcolumncommand.d.ts +50 -50
  3. package/dist/commands/insertrowcommand.d.ts +49 -49
  4. package/dist/commands/inserttablecommand.d.ts +43 -43
  5. package/dist/commands/inserttablelayoutcommand.d.ts +34 -34
  6. package/dist/commands/mergecellcommand.d.ts +63 -63
  7. package/dist/commands/mergecellscommand.d.ts +24 -24
  8. package/dist/commands/removecolumncommand.d.ts +24 -24
  9. package/dist/commands/removerowcommand.d.ts +24 -24
  10. package/dist/commands/selectcolumncommand.d.ts +28 -28
  11. package/dist/commands/selectrowcommand.d.ts +28 -28
  12. package/dist/commands/setfooterrowcommand.d.ts +48 -48
  13. package/dist/commands/setheadercolumncommand.d.ts +45 -45
  14. package/dist/commands/setheaderrowcommand.d.ts +48 -48
  15. package/dist/commands/splitcellcommand.d.ts +38 -38
  16. package/dist/converters/downcast.d.ts +77 -77
  17. package/dist/converters/table-caption-post-fixer.d.ts +18 -18
  18. package/dist/converters/table-cell-paragraph-post-fixer.d.ts +30 -30
  19. package/dist/converters/table-cell-refresh-handler.d.ts +16 -16
  20. package/dist/converters/table-layout-post-fixer.d.ts +224 -224
  21. package/dist/converters/table-structure-post-fixer.d.ts +16 -16
  22. package/dist/converters/table-structure-refresh-handler.d.ts +15 -15
  23. package/dist/converters/tableproperties.d.ts +98 -98
  24. package/dist/converters/upcasttable.d.ts +47 -47
  25. package/dist/index.css.map +1 -1
  26. package/dist/index.d.ts +98 -98
  27. package/dist/index.js +12835 -14503
  28. package/dist/index.js.map +1 -1
  29. package/dist/plaintableoutput.d.ts +28 -28
  30. package/dist/table.d.ts +39 -39
  31. package/dist/tablecaption/tablecaptionediting.d.ts +62 -62
  32. package/dist/tablecaption/tablecaptionui.d.ts +18 -18
  33. package/dist/tablecaption/toggletablecaptioncommand.d.ts +61 -61
  34. package/dist/tablecaption/utils.d.ts +31 -31
  35. package/dist/tablecaption.d.ts +23 -23
  36. package/dist/tablecellproperties/commands/tablecellbackgroundcolorcommand.d.ts +27 -27
  37. package/dist/tablecellproperties/commands/tablecellbordercolorcommand.d.ts +32 -32
  38. package/dist/tablecellproperties/commands/tablecellborderstylecommand.d.ts +32 -32
  39. package/dist/tablecellproperties/commands/tablecellborderwidthcommand.d.ts +46 -46
  40. package/dist/tablecellproperties/commands/tablecellheightcommand.d.ts +41 -41
  41. package/dist/tablecellproperties/commands/tablecellhorizontalalignmentcommand.d.ts +27 -27
  42. package/dist/tablecellproperties/commands/tablecellpaddingcommand.d.ts +46 -46
  43. package/dist/tablecellproperties/commands/tablecellpropertycommand.d.ts +79 -79
  44. package/dist/tablecellproperties/commands/tablecelltypecommand.d.ts +42 -42
  45. package/dist/tablecellproperties/commands/tablecellverticalalignmentcommand.d.ts +35 -35
  46. package/dist/tablecellproperties/tablecellpropertiesediting.d.ts +49 -49
  47. package/dist/tablecellproperties/tablecellpropertiesui.d.ts +123 -123
  48. package/dist/tablecellproperties/tablecellpropertiesutils.d.ts +13 -13
  49. package/dist/tablecellproperties/ui/tablecellpropertiesview.d.ts +257 -257
  50. package/dist/tablecellproperties.d.ts +29 -29
  51. package/dist/tablecellwidth/commands/tablecellwidthcommand.d.ts +41 -41
  52. package/dist/tablecellwidth/tablecellwidthediting.d.ts +28 -28
  53. package/dist/tableclipboard.d.ts +79 -79
  54. package/dist/tablecolumnresize/constants.d.ts +23 -23
  55. package/dist/tablecolumnresize/converters.d.ts +20 -20
  56. package/dist/tablecolumnresize/tablecolumnresizeediting.d.ts +184 -184
  57. package/dist/tablecolumnresize/tablewidthscommand.d.ts +31 -31
  58. package/dist/tablecolumnresize/utils.d.ts +127 -127
  59. package/dist/tablecolumnresize.d.ts +25 -25
  60. package/dist/tableconfig.d.ts +670 -670
  61. package/dist/tableediting.d.ts +99 -99
  62. package/dist/tablekeyboard.d.ts +67 -67
  63. package/dist/tablelayout/commands/tabletypecommand.d.ts +38 -38
  64. package/dist/tablelayout/tablelayoutediting.d.ts +58 -58
  65. package/dist/tablelayout/tablelayoutui.d.ts +27 -27
  66. package/dist/tablelayout.d.ts +25 -25
  67. package/dist/tablemouse/mouseeventsobserver.d.ts +54 -54
  68. package/dist/tablemouse.d.ts +47 -47
  69. package/dist/tableproperties/commands/tablealignmentcommand.d.ts +27 -27
  70. package/dist/tableproperties/commands/tablebackgroundcolorcommand.d.ts +27 -27
  71. package/dist/tableproperties/commands/tablebordercolorcommand.d.ts +32 -32
  72. package/dist/tableproperties/commands/tableborderstylecommand.d.ts +32 -32
  73. package/dist/tableproperties/commands/tableborderwidthcommand.d.ts +46 -46
  74. package/dist/tableproperties/commands/tableheightcommand.d.ts +41 -41
  75. package/dist/tableproperties/commands/tablepropertycommand.d.ts +64 -64
  76. package/dist/tableproperties/commands/tablewidthcommand.d.ts +41 -41
  77. package/dist/tableproperties/tablepropertiesediting.d.ts +48 -48
  78. package/dist/tableproperties/tablepropertiesui.d.ts +131 -131
  79. package/dist/tableproperties/ui/tablepropertiesview.d.ts +207 -207
  80. package/dist/tableproperties.d.ts +29 -29
  81. package/dist/tableselection.d.ts +106 -106
  82. package/dist/tabletoolbar.d.ts +31 -31
  83. package/dist/tableui.d.ts +53 -53
  84. package/dist/tableutils.d.ts +532 -532
  85. package/dist/tablewalker.d.ts +342 -350
  86. package/dist/ui/colorinputview.d.ts +137 -137
  87. package/dist/ui/inserttableview.d.ts +78 -78
  88. package/dist/utils/common.d.ts +58 -58
  89. package/dist/utils/structure.d.ts +229 -229
  90. package/dist/utils/table-properties.d.ts +92 -92
  91. package/dist/utils/ui/contextualballoon.d.ts +28 -28
  92. package/dist/utils/ui/table-properties.d.ts +195 -192
  93. package/dist/utils/ui/widget.d.ts +22 -22
  94. package/package.json +9 -9
@@ -1,128 +1,128 @@
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/converters/tableproperties
7
- */
8
- import type { Editor } from '@ckeditor/ckeditor5-core';
9
- import type { Conversion, UpcastConversionData, ViewElement, Consumables } from '@ckeditor/ckeditor5-engine';
6
+ * @module table/converters/tableproperties
7
+ */
8
+ import type { Editor } from "@ckeditor/ckeditor5-core";
9
+ import type { Conversion, UpcastConversionData, ViewElement, Consumables } from "@ckeditor/ckeditor5-engine";
10
10
  /**
11
- * Conversion helper for upcasting attributes using normalized styles.
12
- *
13
- * @param options.modelAttribute The attribute to set.
14
- * @param options.styleName The style name to convert.
15
- * @param options.attributeName The HTML attribute name to convert.
16
- * @param options.attributeType The HTML attribute type for value normalization.
17
- * @param options.viewElement The view element name that should be converted.
18
- * @param options.defaultValue The default value for the specified `modelAttribute`.
19
- * @param options.shouldUpcast The function which returns `true` if style should be upcasted from this element.
20
- * @internal
21
- */
11
+ * Conversion helper for upcasting attributes using normalized styles.
12
+ *
13
+ * @param options.modelAttribute The attribute to set.
14
+ * @param options.styleName The style name to convert.
15
+ * @param options.attributeName The HTML attribute name to convert.
16
+ * @param options.attributeType The HTML attribute type for value normalization.
17
+ * @param options.viewElement The view element name that should be converted.
18
+ * @param options.defaultValue The default value for the specified `modelAttribute`.
19
+ * @param options.shouldUpcast The function which returns `true` if style should be upcasted from this element.
20
+ * @internal
21
+ */
22
22
  export declare function upcastStyleToAttribute(conversion: Conversion, options: {
23
- modelAttribute: string;
24
- styleName: string;
25
- attributeName?: string;
26
- attributeType?: 'length' | 'color';
27
- viewElement: string | RegExp;
28
- defaultValue: string;
29
- reduceBoxSides?: boolean;
30
- shouldUpcast?: (viewElement: ViewElement) => boolean;
23
+ modelAttribute: string;
24
+ styleName: string;
25
+ attributeName?: string;
26
+ attributeType?: "length" | "color";
27
+ viewElement: string | RegExp;
28
+ defaultValue: string;
29
+ reduceBoxSides?: boolean;
30
+ shouldUpcast?: (viewElement: ViewElement) => boolean;
31
31
  }): void;
32
32
  /**
33
- * The style values for border styles.
34
- *
35
- * @internal
36
- */
33
+ * The style values for border styles.
34
+ *
35
+ * @internal
36
+ */
37
37
  export interface StyleValues {
38
- color: string;
39
- style: string;
40
- width: string;
38
+ color: string;
39
+ style: string;
40
+ width: string;
41
41
  }
42
42
  /**
43
- * Conversion helper for upcasting border styles for view elements.
44
- *
45
- * @param editor The editor instance.
46
- * @param defaultBorder The default border values.
47
- * @param defaultBorder.color The default `borderColor` value.
48
- * @param defaultBorder.style The default `borderStyle` value.
49
- * @param defaultBorder.width The default `borderWidth` value.
50
- * @internal
51
- */
43
+ * Conversion helper for upcasting border styles for view elements.
44
+ *
45
+ * @param editor The editor instance.
46
+ * @param defaultBorder The default border values.
47
+ * @param defaultBorder.color The default `borderColor` value.
48
+ * @param defaultBorder.style The default `borderStyle` value.
49
+ * @param defaultBorder.width The default `borderWidth` value.
50
+ * @internal
51
+ */
52
52
  export declare function upcastBorderStyles(editor: Editor, viewElementName: string, modelAttributes: StyleValues, defaultBorder: StyleValues): void;
53
53
  /**
54
- * Conversion helper for downcasting an attribute to a style.
55
- *
56
- * @internal
57
- */
54
+ * Conversion helper for downcasting an attribute to a style.
55
+ *
56
+ * @internal
57
+ */
58
58
  export declare function downcastAttributeToStyle(conversion: Conversion, options: {
59
- modelElement: string;
60
- modelAttribute: string;
61
- styleName: string;
59
+ modelElement: string;
60
+ modelAttribute: string;
61
+ styleName: string;
62
62
  }): void;
63
63
  /**
64
- * Conversion helper for downcasting attributes from the model table to a view table (not to `<figure>`).
65
- *
66
- * @internal
67
- */
64
+ * Conversion helper for downcasting attributes from the model table to a view table (not to `<figure>`).
65
+ *
66
+ * @internal
67
+ */
68
68
  export declare function downcastTableAttribute(conversion: Conversion, options: {
69
- modelAttribute: string;
70
- styleName: string;
69
+ modelAttribute: string;
70
+ styleName: string;
71
71
  }): void;
72
72
  /**
73
- * Returns the default value for table or table cell property adjusted for layout tables.
74
- *
75
- * @internal
76
- */
73
+ * Returns the default value for table or table cell property adjusted for layout tables.
74
+ *
75
+ * @internal
76
+ */
77
77
  export declare function getDefaultValueAdjusted(defaultValue: string, layoutTableDefault: string, data: UpcastConversionData<ViewElement>): string;
78
78
  /**
79
- * Conversion helper for upcasting the `cellpadding` table attribute.
80
- *
81
- * @param editor The editor instance.
82
- * @param viewElementName The view element name that should be converted.
83
- * @param defaultPadding The default padding value.
84
- * @internal
85
- */
79
+ * Conversion helper for upcasting the `cellpadding` table attribute.
80
+ *
81
+ * @param editor The editor instance.
82
+ * @param viewElementName The view element name that should be converted.
83
+ * @param defaultPadding The default padding value.
84
+ * @internal
85
+ */
86
86
  export declare function upcastTableCellPaddingAttribute(editor: Editor, viewElementName: string, defaultPadding?: string): void;
87
87
  /**
88
- * Default table alignment options.
89
- */
88
+ * Default table alignment options.
89
+ */
90
90
  export declare const DEFAULT_TABLE_ALIGNMENT_OPTIONS: {
91
- left: {
92
- className: string;
93
- };
94
- center: {
95
- className: string;
96
- };
97
- right: {
98
- className: string;
99
- };
100
- blockLeft: {
101
- className: string;
102
- };
103
- blockRight: {
104
- className: string;
105
- };
91
+ left: {
92
+ className: string;
93
+ };
94
+ center: {
95
+ className: string;
96
+ };
97
+ right: {
98
+ className: string;
99
+ };
100
+ blockLeft: {
101
+ className: string;
102
+ };
103
+ blockRight: {
104
+ className: string;
105
+ };
106
106
  };
107
107
  /**
108
- * Configuration for upcasting table alignment from view to model.
109
- */
108
+ * Configuration for upcasting table alignment from view to model.
109
+ */
110
110
  export declare const upcastTableAlignmentConfig: Array<UpcastTableAlignmentConfig>;
111
111
  export declare const downcastTableAlignmentConfig: Record<TableAlignmentValues, {
112
- align: string | undefined;
113
- style: string;
114
- className: string;
112
+ align: string | undefined;
113
+ style: string;
114
+ className: string;
115
115
  }>;
116
116
  type UpcastTableAlignmentConfig = {
117
- view: {
118
- name: RegExp | string;
119
- styles?: Record<string, RegExp | string>;
120
- attributes?: Record<string, RegExp | string>;
121
- key?: string;
122
- value?: RegExp | string;
123
- };
124
- getAlign: ((viewElement: ViewElement) => string | undefined) | (() => string);
125
- getConsumables: (viewElement: ViewElement) => Consumables;
117
+ view: {
118
+ name: RegExp | string;
119
+ styles?: Record<string, RegExp | string>;
120
+ attributes?: Record<string, RegExp | string>;
121
+ key?: string;
122
+ value?: RegExp | string;
123
+ };
124
+ getAlign: ((viewElement: ViewElement) => string | undefined) | (() => string);
125
+ getConsumables: (viewElement: ViewElement) => Consumables;
126
126
  };
127
- export type TableAlignmentValues = 'left' | 'center' | 'right' | 'blockLeft' | 'blockRight';
127
+ export type TableAlignmentValues = "left" | "center" | "right" | "blockLeft" | "blockRight";
128
128
  export {};
@@ -1,58 +1,58 @@
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/converters/upcasttable
7
- */
8
- import type { UpcastDispatcher } from '@ckeditor/ckeditor5-engine';
6
+ * @module table/converters/upcasttable
7
+ */
8
+ import type { UpcastDispatcher } from "@ckeditor/ckeditor5-engine";
9
9
  /**
10
- * Returns a function that converts the table view representation:
11
- *
12
- * ```xml
13
- * <figure class="table"><table>...</table></figure>
14
- * ```
15
- *
16
- * to the model representation:
17
- *
18
- * ```xml
19
- * <table></table>
20
- * ```
21
- *
22
- * @internal
23
- */
10
+ * Returns a function that converts the table view representation:
11
+ *
12
+ * ```xml
13
+ * <figure class="table"><table>...</table></figure>
14
+ * ```
15
+ *
16
+ * to the model representation:
17
+ *
18
+ * ```xml
19
+ * <table></table>
20
+ * ```
21
+ *
22
+ * @internal
23
+ */
24
24
  export declare function upcastTableFigure(): (dispatcher: UpcastDispatcher) => void;
25
25
  /**
26
- * View table element to model table element conversion helper.
27
- *
28
- * This conversion helper converts the table element as well as table rows.
29
- *
30
- * @param options Conversion options.
31
- * @param options.enableFooters If set to `true` the `footerRows` attribute will be upcasted.
32
- * @returns Conversion helper.
33
- * @internal
34
- */
26
+ * View table element to model table element conversion helper.
27
+ *
28
+ * This conversion helper converts the table element as well as table rows.
29
+ *
30
+ * @param options Conversion options.
31
+ * @param options.enableFooters If set to `true` the `footerRows` attribute will be upcasted.
32
+ * @returns Conversion helper.
33
+ * @internal
34
+ */
35
35
  export declare function upcastTable(options: {
36
- enableFooters?: boolean;
36
+ enableFooters?: boolean;
37
37
  }): (dispatcher: UpcastDispatcher) => void;
38
38
  /**
39
- * A conversion helper that skips empty <tr> elements from upcasting at the beginning of the table.
40
- *
41
- * An empty row is considered a table model error but when handling clipboard data there could be rows that contain only row-spanned cells
42
- * and empty TR-s are used to maintain the table structure (also {@link module:table/tablewalker~TableWalker} assumes that there are only
43
- * rows that have related `tableRow` elements).
44
- *
45
- * *Note:* Only the first empty rows are removed because they have no meaning and it solves the issue
46
- * of an improper table with all empty rows.
47
- *
48
- * @internal
49
- * @returns Conversion helper.
50
- */
39
+ * A conversion helper that skips empty <tr> elements from upcasting at the beginning of the table.
40
+ *
41
+ * An empty row is considered a table model error but when handling clipboard data there could be rows that contain only row-spanned cells
42
+ * and empty TR-s are used to maintain the table structure (also {@link module:table/tablewalker~TableWalker} assumes that there are only
43
+ * rows that have related `tableRow` elements).
44
+ *
45
+ * *Note:* Only the first empty rows are removed because they have no meaning and it solves the issue
46
+ * of an improper table with all empty rows.
47
+ *
48
+ * @internal
49
+ * @returns Conversion helper.
50
+ */
51
51
  export declare function skipEmptyTableRow(): (dispatcher: UpcastDispatcher) => void;
52
52
  /**
53
- * A converter that ensures an empty paragraph is inserted in a table cell if no other content was converted.
54
- *
55
- * @internal
56
- * @returns Conversion helper.
57
- */
53
+ * A converter that ensures an empty paragraph is inserted in a table cell if no other content was converted.
54
+ *
55
+ * @internal
56
+ * @returns Conversion helper.
57
+ */
58
58
  export declare function ensureParagraphInTableCell(elementName: string): (dispatcher: UpcastDispatcher) => void;