@ckeditor/ckeditor5-table 48.3.1 → 48.4.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 (35) hide show
  1. package/ckeditor5-metadata.json +12 -1
  2. package/dist/augmentation.d.ts +4 -1
  3. package/dist/commands/inserttablecommand.d.ts +5 -0
  4. package/dist/commands/inserttablelayoutcommand.d.ts +5 -0
  5. package/dist/commands/splitcellcommand.d.ts +2 -1
  6. package/dist/index-content.css +81 -82
  7. package/dist/index-content.css.map +1 -0
  8. package/dist/index-editor.css +537 -450
  9. package/dist/index-editor.css.map +1 -0
  10. package/dist/index.css +214 -125
  11. package/dist/index.css.map +1 -1
  12. package/dist/index.d.ts +6 -1
  13. package/dist/index.js +908 -60
  14. package/dist/index.js.map +1 -1
  15. package/dist/table.d.ts +0 -1
  16. package/dist/tablecaption.d.ts +0 -1
  17. package/dist/tablecellproperties/tablecellpropertiesui.d.ts +7 -0
  18. package/dist/tablecellproperties/ui/tablecellpropertiesview.d.ts +0 -3
  19. package/dist/tablecolumnresize/commands/tablecolumnwidthcommand.d.ts +56 -0
  20. package/dist/tablecolumnresize/constants.d.ts +15 -0
  21. package/dist/tablecolumnresize/tablecolumnresizeediting.d.ts +81 -2
  22. package/dist/tablecolumnresize/utils.d.ts +30 -0
  23. package/dist/tablecolumnresize.d.ts +0 -1
  24. package/dist/tableconfig.d.ts +38 -0
  25. package/dist/tableediting.d.ts +0 -1
  26. package/dist/tablelayout/tablelayoutediting.d.ts +0 -1
  27. package/dist/tableproperties/ui/tablepropertiesview.d.ts +0 -3
  28. package/dist/tablescroll/tablescrollediting.d.ts +82 -0
  29. package/dist/tablescroll/watchers.d.ts +23 -0
  30. package/dist/tablescroll.d.ts +23 -0
  31. package/dist/tableselection.d.ts +0 -1
  32. package/dist/ui/colorinputview.d.ts +0 -1
  33. package/dist/ui/inserttableview.d.ts +0 -1
  34. package/dist/utils/common.d.ts +6 -0
  35. package/package.json +10 -9
package/dist/index.css CHANGED
@@ -2,67 +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
- .ck-content .table th {
6
- text-align: start;
7
- }
8
-
9
- .ck-content[dir="rtl"] .table th {
10
- text-align: right;
11
- }
12
-
13
- .ck-content[dir="ltr"] .table th {
14
- text-align: left;
15
- }
16
-
17
- .ck-content figure.table:not(.layout-table) {
18
- display: table;
19
- }
20
-
21
- .ck-content figure.table:not(.layout-table) > table {
22
- width: 100%;
23
- height: 100%;
24
- }
25
-
26
- .ck-content .table:not(.layout-table) {
27
- margin: .9em auto;
28
- }
29
-
30
- .ck-content table.table:not(.layout-table), .ck-content figure.table:not(.layout-table) > table {
31
- border-collapse: collapse;
32
- border-spacing: 0;
33
- border: 1px double #b3b3b3;
34
- }
35
-
36
- :is(:is(.ck-content table.table:not(.layout-table), .ck-content figure.table:not(.layout-table) > table) > thead, :is(.ck-content table.table:not(.layout-table), .ck-content figure.table:not(.layout-table) > table) > tfoot, :is(.ck-content table.table:not(.layout-table), .ck-content figure.table:not(.layout-table) > table) > tbody) > tr > th {
37
- background: #0000000d;
38
- font-weight: bold;
39
- }
40
-
41
- :is(:is(:is(.ck-content table.table:not(.layout-table), .ck-content figure.table:not(.layout-table) > table) > thead, :is(.ck-content table.table:not(.layout-table), .ck-content figure.table:not(.layout-table) > table) > tfoot, :is(.ck-content table.table:not(.layout-table), .ck-content figure.table:not(.layout-table) > table) > tbody) > tr > td, :is(:is(.ck-content table.table:not(.layout-table), .ck-content figure.table:not(.layout-table) > table) > thead, :is(.ck-content table.table:not(.layout-table), .ck-content figure.table:not(.layout-table) > table) > tfoot, :is(.ck-content table.table:not(.layout-table), .ck-content figure.table:not(.layout-table) > table) > tbody) > tr > th) > p:first-of-type {
42
- margin-top: 0;
43
- }
44
-
45
- :is(:is(:is(.ck-content table.table:not(.layout-table), .ck-content figure.table:not(.layout-table) > table) > thead, :is(.ck-content table.table:not(.layout-table), .ck-content figure.table:not(.layout-table) > table) > tfoot, :is(.ck-content table.table:not(.layout-table), .ck-content figure.table:not(.layout-table) > table) > tbody) > tr > td, :is(:is(.ck-content table.table:not(.layout-table), .ck-content figure.table:not(.layout-table) > table) > thead, :is(.ck-content table.table:not(.layout-table), .ck-content figure.table:not(.layout-table) > table) > tfoot, :is(.ck-content table.table:not(.layout-table), .ck-content figure.table:not(.layout-table) > table) > tbody) > tr > th) > p:last-of-type {
46
- margin-bottom: 0;
47
- }
48
-
49
- :is(:is(.ck-content table.table:not(.layout-table), .ck-content figure.table:not(.layout-table) > table) > thead, :is(.ck-content table.table:not(.layout-table), .ck-content figure.table:not(.layout-table) > table) > tfoot, :is(.ck-content table.table:not(.layout-table), .ck-content figure.table:not(.layout-table) > table) > tbody) > tr > td, :is(:is(.ck-content table.table:not(.layout-table), .ck-content figure.table:not(.layout-table) > table) > thead, :is(.ck-content table.table:not(.layout-table), .ck-content figure.table:not(.layout-table) > table) > tfoot, :is(.ck-content table.table:not(.layout-table), .ck-content figure.table:not(.layout-table) > table) > tbody) > tr > th {
50
- border: 1px solid #bfbfbf;
51
- min-width: 2em;
52
- padding: .4em;
53
- }
54
-
55
- @media print {
56
- .ck-content figure.table:not(.layout-table) {
57
- width: fit-content;
58
- height: fit-content;
59
- }
60
-
61
- .ck-content figure.table:not(.layout-table) > table {
62
- height: initial;
63
- }
64
- }
65
-
66
5
  .ck-editor__editable .ck-table-bogus-paragraph {
67
6
  width: 100%;
68
7
  display: inline-block;
@@ -221,15 +160,6 @@
221
160
  --ck-table-layout-default-border-color: #d4d4d4;
222
161
  }
223
162
 
224
- .ck-content table.table.layout-table, .ck-content figure.table.layout-table {
225
- margin-top: 0;
226
- margin-bottom: 0;
227
- }
228
-
229
- .ck-content table.table.layout-table, .ck-content figure.table.layout-table > table {
230
- border-spacing: 0;
231
- }
232
-
233
163
  .ck-editor__editable .table.layout-table > table {
234
164
  border-collapse: revert;
235
165
  width: 100%;
@@ -356,6 +286,85 @@
356
286
  margin-bottom: var(--ck-spacing-large);
357
287
  }
358
288
 
289
+ :root {
290
+ --ck-table-scroll-widget-type-around-icon-width: 10px;
291
+ --ck-table-scroll-widget-type-around-icon-height: 8px;
292
+ }
293
+
294
+ .ck.ck-editor__editable figure.table.ck-table-overflowing {
295
+ flex-direction: column;
296
+ max-width: 100%;
297
+ margin-right: 0;
298
+ display: flex;
299
+ overflow: scroll clip;
300
+ }
301
+
302
+ .ck.ck-editor__editable figure.table.ck-table-overflowing > figcaption {
303
+ box-sizing: border-box;
304
+ order: -1;
305
+ align-self: flex-start;
306
+ }
307
+
308
+ .ck.ck-editor__editable figure.table.ck-table-overflowing.ck-widget {
309
+ --ck-table-scroll-offset: 0px;
310
+ }
311
+
312
+ .ck.ck-editor__editable figure.table.ck-table-overflowing.ck-widget > table > :is(tbody, thead, tfoot) > tr > :is(td, th):last-of-type {
313
+ --ck-table-column-resizer-position-offset: 0;
314
+ --ck-table-column-resizer-width: 3.5px;
315
+ }
316
+
317
+ .ck.ck-editor__editable figure.table.ck-table-overflowing.ck-widget.ck-widget_with-selection-handle > .ck-widget__selection-handle {
318
+ --ck-widget-handler-icon-size: 10px;
319
+ transform: translate(var(--ck-table-scroll-offset), calc(0px - var(--ck-widget-outline-thickness)));
320
+ z-index: 3;
321
+ }
322
+
323
+ .ck.ck-editor__editable figure.table.ck-table-overflowing.ck-widget > .ck-widget__type-around {
324
+ --ck-widget-type-around-button-size: 16px;
325
+ pointer-events: none;
326
+ position: absolute;
327
+ inset: 0;
328
+ }
329
+
330
+ .ck.ck-editor__editable figure.table.ck-table-overflowing.ck-widget > .ck-widget__type-around > .ck-widget__type-around__button.ck-widget__type-around__button_before, .ck.ck-editor__editable figure.table.ck-table-overflowing.ck-widget > .ck-widget__type-around > .ck-widget__type-around__button.ck-widget__type-around__button_after {
331
+ transform: translate(var(--ck-table-scroll-offset), 0);
332
+ z-index: 2;
333
+ }
334
+
335
+ .ck.ck-editor__editable figure.table.ck-table-overflowing.ck-widget > .ck-widget__type-around > .ck-widget__type-around__button.ck-widget__type-around__button_before {
336
+ margin-left: var(--ck-widget-type-around-button-size);
337
+ border-radius: 0 0 100px 100px;
338
+ left: min(10%, 30px);
339
+ }
340
+
341
+ .ck.ck-editor__editable figure.table.ck-table-overflowing.ck-widget > .ck-widget__type-around > .ck-widget__type-around__button.ck-widget__type-around__button_before:after {
342
+ border-radius: 0 0 100px 100px;
343
+ }
344
+
345
+ .ck.ck-editor__editable figure.table.ck-table-overflowing.ck-widget > .ck-widget__type-around > .ck-widget__type-around__button.ck-widget__type-around__button_after {
346
+ bottom: calc(-.5 * var(--ck-widget-outline-thickness));
347
+ border-radius: 100px 100px 0 0;
348
+ right: min(10%, 30px);
349
+ }
350
+
351
+ .ck.ck-editor__editable figure.table.ck-table-overflowing.ck-widget > .ck-widget__type-around > .ck-widget__type-around__button.ck-widget__type-around__button_after:after {
352
+ border-radius: 100px 100px 0 0;
353
+ }
354
+
355
+ .ck.ck-editor__editable figure.table.ck-table-overflowing.ck-widget > .ck-widget__type-around > .ck-widget__type-around__button svg {
356
+ width: var(--ck-table-scroll-widget-type-around-icon-width);
357
+ height: var(--ck-table-scroll-widget-type-around-icon-height);
358
+ }
359
+
360
+ .ck.ck-editor__editable figure.table.ck-table-overflowing.ck-widget.ck-widget_type-around_show-fake-caret_before > .ck-widget__type-around > .ck-widget__type-around__fake-caret {
361
+ top: 0;
362
+ }
363
+
364
+ .ck.ck-editor__editable figure.table.ck-table-overflowing.ck-widget.ck-widget_type-around_show-fake-caret_after > .ck-widget__type-around > .ck-widget__type-around__fake-caret {
365
+ bottom: 0;
366
+ }
367
+
359
368
  .ck.ck-form__row > :not(.ck-label) + * {
360
369
  margin-inline-start: var(--ck-spacing-large);
361
370
  }
@@ -529,31 +538,6 @@
529
538
  --ck-content-table-style-spacing: 1.5em;
530
539
  }
531
540
 
532
- .ck-content .table.table-style-align-left {
533
- float: left;
534
- margin-right: var(--ck-content-table-style-spacing);
535
- }
536
-
537
- .ck-content .table.table-style-align-right {
538
- float: right;
539
- margin-left: var(--ck-content-table-style-spacing);
540
- }
541
-
542
- .ck-content .table.table-style-align-center {
543
- margin-left: auto;
544
- margin-right: auto;
545
- }
546
-
547
- .ck-content .table.table-style-block-align-left {
548
- margin-left: 0;
549
- margin-right: auto;
550
- }
551
-
552
- .ck-content .table.table-style-block-align-right {
553
- margin-left: auto;
554
- margin-right: 0;
555
- }
556
-
557
541
  .ck-editor__editable .table.layout-table.table-style-align-center {
558
542
  margin-left: auto;
559
543
  margin-right: auto;
@@ -579,30 +563,9 @@
579
563
 
580
564
  :root {
581
565
  --ck-content-color-table-caption-background: #f7f7f7;
582
- --ck-content-color-table-caption-text: #333;
583
566
  --ck-color-table-caption-highlighted-background: #fd0;
584
567
  }
585
568
 
586
- .ck-content .table > figcaption, .ck-content figure.table > table > caption {
587
- caption-side: top;
588
- word-break: normal;
589
- overflow-wrap: anywhere;
590
- text-align: center;
591
- color: var(--ck-content-color-table-caption-text);
592
- background-color: var(--ck-content-color-table-caption-background);
593
- outline-offset: -1px;
594
- padding: .6em;
595
- font-size: .75em;
596
- display: table-caption;
597
- }
598
-
599
- @media (forced-colors: active) {
600
- .ck-content .table > figcaption, .ck-content figure.table > table > caption {
601
- background-color: unset;
602
- color: unset;
603
- }
604
- }
605
-
606
569
  @media (forced-colors: none) {
607
570
  :is(.ck.ck-editor__editable .table > figcaption, .ck.ck-editor__editable figure.table > table > caption).table__caption_highlighted {
608
571
  animation: .6s ease-out ck-table-caption-highlight;
@@ -645,7 +608,7 @@
645
608
  inset: 0;
646
609
  }
647
610
 
648
- .ck.ck-editor__editable .table table :where(td, th).ck-editor__editable_selected ::selection, .ck.ck-editor__editable .table table :where(td, th).ck-editor__editable_selected:focus {
611
+ .ck.ck-editor__editable .table table :where(td, th).ck-editor__editable_selected:focus, .ck.ck-editor__editable .table table :where(td, th).ck-editor__editable_selected ::selection {
649
612
  background-color: #0000;
650
613
  }
651
614
 
@@ -663,14 +626,6 @@
663
626
  --ck-table-column-resizer-position-offset: calc(var(--ck-table-column-resizer-width) * -.5 - .5px);
664
627
  }
665
628
 
666
- .ck-content .table .ck-table-resized {
667
- table-layout: fixed;
668
- }
669
-
670
- .ck-content .table td, .ck-content .table th {
671
- overflow-wrap: break-word;
672
- }
673
-
674
629
  .ck.ck-editor__editable .table td, .ck.ck-editor__editable .table th {
675
630
  position: relative;
676
631
  }
@@ -681,6 +636,7 @@
681
636
  right: var(--ck-table-column-resizer-position-offset);
682
637
  width: var(--ck-table-column-resizer-width);
683
638
  cursor: col-resize;
639
+ -webkit-user-select: none;
684
640
  user-select: none;
685
641
  z-index: var(--ck-z-default);
686
642
  position: absolute;
@@ -700,6 +656,10 @@
700
656
  right: unset;
701
657
  }
702
658
 
659
+ .ck-table-column-resize__resizing-cursor, .ck-table-column-resize__resizing-cursor * {
660
+ cursor: col-resize !important;
661
+ }
662
+
703
663
  [dir="ltr"] :is(.ck.ck-input-color > .ck.ck-input-text) {
704
664
  border-top-right-radius: 0;
705
665
  border-bottom-right-radius: 0;
@@ -853,4 +813,133 @@
853
813
  background: var(--ck-color-focus-outer-shadow);
854
814
  }
855
815
 
816
+ :root {
817
+ --ck-content-table-style-spacing: 1.5em;
818
+ --ck-content-color-table-caption-background: #f7f7f7;
819
+ --ck-content-color-table-caption-text: #333;
820
+ }
821
+
822
+ .ck-content .table th {
823
+ text-align: start;
824
+ }
825
+
826
+ .ck-content[dir="rtl"] .table th {
827
+ text-align: right;
828
+ }
829
+
830
+ .ck-content[dir="ltr"] .table th {
831
+ text-align: left;
832
+ }
833
+
834
+ .ck-content figure.table:not(.layout-table) {
835
+ display: table;
836
+ }
837
+
838
+ .ck-content figure.table:not(.layout-table) > table {
839
+ width: 100%;
840
+ height: 100%;
841
+ }
842
+
843
+ .ck-content .table:not(.layout-table) {
844
+ margin: .9em auto;
845
+ }
846
+
847
+ .ck-content table.table:not(.layout-table), .ck-content figure.table:not(.layout-table) > table {
848
+ border-collapse: collapse;
849
+ border-spacing: 0;
850
+ border: 1px double #b3b3b3;
851
+ }
852
+
853
+ :is(:is(.ck-content table.table:not(.layout-table), .ck-content figure.table:not(.layout-table) > table) > thead, :is(.ck-content table.table:not(.layout-table), .ck-content figure.table:not(.layout-table) > table) > tfoot, :is(.ck-content table.table:not(.layout-table), .ck-content figure.table:not(.layout-table) > table) > tbody) > tr > th {
854
+ background: #0000000d;
855
+ font-weight: bold;
856
+ }
857
+
858
+ :is(:is(:is(.ck-content table.table:not(.layout-table), .ck-content figure.table:not(.layout-table) > table) > thead, :is(.ck-content table.table:not(.layout-table), .ck-content figure.table:not(.layout-table) > table) > tfoot, :is(.ck-content table.table:not(.layout-table), .ck-content figure.table:not(.layout-table) > table) > tbody) > tr > td, :is(:is(.ck-content table.table:not(.layout-table), .ck-content figure.table:not(.layout-table) > table) > thead, :is(.ck-content table.table:not(.layout-table), .ck-content figure.table:not(.layout-table) > table) > tfoot, :is(.ck-content table.table:not(.layout-table), .ck-content figure.table:not(.layout-table) > table) > tbody) > tr > th) > p:first-of-type {
859
+ margin-top: 0;
860
+ }
861
+
862
+ :is(:is(:is(.ck-content table.table:not(.layout-table), .ck-content figure.table:not(.layout-table) > table) > thead, :is(.ck-content table.table:not(.layout-table), .ck-content figure.table:not(.layout-table) > table) > tfoot, :is(.ck-content table.table:not(.layout-table), .ck-content figure.table:not(.layout-table) > table) > tbody) > tr > td, :is(:is(.ck-content table.table:not(.layout-table), .ck-content figure.table:not(.layout-table) > table) > thead, :is(.ck-content table.table:not(.layout-table), .ck-content figure.table:not(.layout-table) > table) > tfoot, :is(.ck-content table.table:not(.layout-table), .ck-content figure.table:not(.layout-table) > table) > tbody) > tr > th) > p:last-of-type {
863
+ margin-bottom: 0;
864
+ }
865
+
866
+ :is(:is(.ck-content table.table:not(.layout-table), .ck-content figure.table:not(.layout-table) > table) > thead, :is(.ck-content table.table:not(.layout-table), .ck-content figure.table:not(.layout-table) > table) > tfoot, :is(.ck-content table.table:not(.layout-table), .ck-content figure.table:not(.layout-table) > table) > tbody) > tr > td, :is(:is(.ck-content table.table:not(.layout-table), .ck-content figure.table:not(.layout-table) > table) > thead, :is(.ck-content table.table:not(.layout-table), .ck-content figure.table:not(.layout-table) > table) > tfoot, :is(.ck-content table.table:not(.layout-table), .ck-content figure.table:not(.layout-table) > table) > tbody) > tr > th {
867
+ border: 1px solid #bfbfbf;
868
+ min-width: 2em;
869
+ padding: .4em;
870
+ }
871
+
872
+ @media print {
873
+ .ck-content figure.table:not(.layout-table) {
874
+ width: fit-content;
875
+ height: fit-content;
876
+ }
877
+
878
+ .ck-content figure.table:not(.layout-table) > table {
879
+ height: initial;
880
+ }
881
+ }
882
+
883
+ .ck-content table.table.layout-table, .ck-content figure.table.layout-table {
884
+ margin-top: 0;
885
+ margin-bottom: 0;
886
+ }
887
+
888
+ .ck-content table.table.layout-table, .ck-content figure.table.layout-table > table {
889
+ border-spacing: 0;
890
+ }
891
+
892
+ .ck-content .table.table-style-align-left {
893
+ float: left;
894
+ margin-right: var(--ck-content-table-style-spacing);
895
+ }
896
+
897
+ .ck-content .table.table-style-align-right {
898
+ float: right;
899
+ margin-left: var(--ck-content-table-style-spacing);
900
+ }
901
+
902
+ .ck-content .table.table-style-align-center {
903
+ margin-left: auto;
904
+ margin-right: auto;
905
+ }
906
+
907
+ .ck-content .table.table-style-block-align-left {
908
+ margin-left: 0;
909
+ margin-right: auto;
910
+ }
911
+
912
+ .ck-content .table.table-style-block-align-right {
913
+ margin-left: auto;
914
+ margin-right: 0;
915
+ }
916
+
917
+ .ck-content .table > figcaption, .ck-content figure.table > table > caption {
918
+ caption-side: top;
919
+ word-break: normal;
920
+ overflow-wrap: anywhere;
921
+ text-align: center;
922
+ color: var(--ck-content-color-table-caption-text);
923
+ background-color: var(--ck-content-color-table-caption-background);
924
+ outline-offset: -1px;
925
+ padding: .6em;
926
+ font-size: .75em;
927
+ display: table-caption;
928
+ }
929
+
930
+ @media (forced-colors: active) {
931
+ .ck-content .table > figcaption, .ck-content figure.table > table > caption {
932
+ background-color: unset;
933
+ color: unset;
934
+ }
935
+ }
936
+
937
+ .ck-content .table .ck-table-resized {
938
+ table-layout: fixed;
939
+ }
940
+
941
+ .ck-content .table td, .ck-content .table th {
942
+ overflow-wrap: break-word;
943
+ }
944
+
856
945
  /*# sourceMappingURL=index.css.map */