@crystallize/design-system 1.12.0 → 1.13.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 (81) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/draggable-block-menu-KKHDNKJA.svg +1 -0
  3. package/dist/index.css +565 -1025
  4. package/dist/index.d.ts +1 -0
  5. package/dist/index.js +517 -515
  6. package/dist/index.mjs +398 -396
  7. package/package.json +6 -7
  8. package/src/button/Button.stories.tsx +1 -0
  9. package/src/card/card.stories.tsx +1 -0
  10. package/src/checkbox/checkbox.stories.tsx +1 -1
  11. package/src/checkbox/checkbox.tsx +1 -1
  12. package/src/colors/Colors.stories.tsx +3 -3
  13. package/src/dialog/config.tsx +1 -1
  14. package/src/dialog/index.tsx +1 -1
  15. package/src/dropdown-menu/dropdown-menu-item.tsx +2 -2
  16. package/src/dropdown-menu/dropdown-menu-label.tsx +1 -1
  17. package/src/icon-button/IconButton.stories.tsx +1 -0
  18. package/src/iconography/Icon.stories.tsx +1 -0
  19. package/src/inline-radio/inline-radio.stories.tsx +3 -3
  20. package/src/inline-radio/inline-radio.tsx +2 -2
  21. package/src/input/input.tsx +1 -1
  22. package/src/input-with-label/input-with-label.tsx +1 -1
  23. package/src/label/label.stories.tsx +1 -0
  24. package/src/progress/Progress.stories.tsx +2 -1
  25. package/src/progress/progress.tsx +1 -1
  26. package/src/radio/radio.stories.tsx +1 -1
  27. package/src/radio/radio.tsx +1 -1
  28. package/src/rich-text-editor/plugins/ActionsPlugin/index.css +3 -0
  29. package/src/rich-text-editor/plugins/ActionsPlugin/index.tsx +1 -2
  30. package/src/rich-text-editor/plugins/AutoLinkPlugin/index.tsx +1 -1
  31. package/src/rich-text-editor/plugins/CodeActionMenuPlugin/components/CopyButton/index.tsx +6 -2
  32. package/src/rich-text-editor/plugins/CodeActionMenuPlugin/components/PrettierButton/index.tsx +10 -6
  33. package/src/rich-text-editor/plugins/CodeActionMenuPlugin/index.css +32 -17
  34. package/src/rich-text-editor/plugins/CodeActionMenuPlugin/index.tsx +3 -4
  35. package/src/rich-text-editor/plugins/DimensionsDetectorPlugin/index.tsx +49 -0
  36. package/src/rich-text-editor/plugins/DraggableBlockPlugin/index.css +14 -14
  37. package/src/rich-text-editor/plugins/DraggableBlockPlugin/index.tsx +4 -4
  38. package/src/rich-text-editor/plugins/FloatingLinkEditorPlugin/index.css +87 -21
  39. package/src/rich-text-editor/plugins/FloatingLinkEditorPlugin/index.tsx +11 -17
  40. package/src/rich-text-editor/plugins/FloatingTextFormatToolbarPlugin/index.css +10 -2
  41. package/src/rich-text-editor/plugins/FloatingTextFormatToolbarPlugin/index.tsx +17 -17
  42. package/src/rich-text-editor/plugins/LinkPlugin/index.tsx +1 -1
  43. package/src/rich-text-editor/plugins/ListMaxIndentLevelPlugin/index.ts +10 -21
  44. package/src/rich-text-editor/plugins/TableActionMenuPlugin/index.css +6 -0
  45. package/src/rich-text-editor/plugins/TableActionMenuPlugin/index.tsx +2 -2
  46. package/src/rich-text-editor/plugins/ToolbarPlugin/index.css +115 -0
  47. package/src/rich-text-editor/plugins/ToolbarPlugin/index.tsx +57 -78
  48. package/src/rich-text-editor/plugins/ToolbarPlugin/insert-table.tsx +5 -5
  49. package/src/rich-text-editor/rich-text-editor-icons.css +213 -0
  50. package/src/rich-text-editor/rich-text-editor.css +33 -913
  51. package/src/rich-text-editor/rich-text-editor.stories.tsx +11 -0
  52. package/src/rich-text-editor/rich-text-editor.tsx +13 -27
  53. package/src/rich-text-editor/themes/CrystallizeRTEditorTheme.ts +1 -1
  54. package/src/rich-text-editor/ui/LinkPreview.tsx +7 -8
  55. package/src/rich-text-editor/utils/getSelectedNode.ts +4 -5
  56. package/src/rich-text-editor/utils/point.ts +4 -7
  57. package/src/rich-text-editor/utils/rect.ts +18 -41
  58. package/src/rich-text-editor/utils/url.ts +1 -2
  59. package/src/select/select-root.tsx +1 -1
  60. package/src/select/select.stories.tsx +1 -1
  61. package/src/select/select.ts +0 -1
  62. package/src/slider/Slider.stories.tsx +2 -1
  63. package/src/slider/slider.tsx +2 -2
  64. package/src/spinner/Spinner.stories.tsx +1 -0
  65. package/src/spinner/index.tsx +1 -1
  66. package/src/tag/Tag.stories.tsx +1 -0
  67. package/dist/camera-CR7D2PNH.svg +0 -1
  68. package/dist/clipboard-OSEFDF25.svg +0 -1
  69. package/dist/gear-ICMT4NTP.svg +0 -1
  70. package/dist/journal-code-XUT44HDV.svg +0 -1
  71. package/dist/lock-WCYOZOHW.svg +0 -1
  72. package/dist/lock-fill-JZSKOSHK.svg +0 -1
  73. package/dist/pencil-fill-STFSC26F.svg +0 -1
  74. package/dist/plug-HGGGEVS3.svg +0 -1
  75. package/dist/plug-fill-OTG3U4TN.svg +0 -1
  76. package/src/rich-text-editor/hooks/useReport.ts +0 -64
  77. package/src/rich-text-editor/plugins/CodeActionMenuPlugin/components/PrettierButton/index.css +0 -14
  78. package/src/rich-text-editor/ui/LinkPreview.css +0 -57
  79. package/src/rich-text-editor/utils/isMobileWidth.ts +0 -7
  80. package/src/rich-text-editor/utils/joinClasses.ts +0 -13
  81. package/src/rich-text-editor/utils/swipe.ts +0 -127
package/dist/index.css CHANGED
@@ -473,8 +473,7 @@ button {
473
473
  --tw-scale-x: 1;
474
474
  --tw-scale-y: 1 ;
475
475
  }
476
- .shadow-md,
477
- .shadow-sm {
476
+ .shadow-md {
478
477
  --tw-ring-offset-shadow: 0 0 #0000;
479
478
  --tw-ring-shadow: 0 0 #0000;
480
479
  --tw-shadow: 0 0 #0000;
@@ -530,9 +529,6 @@ button {
530
529
  white-space: nowrap;
531
530
  border-width: 0;
532
531
  }
533
- .pointer-events-none {
534
- pointer-events: none;
535
- }
536
532
  .absolute {
537
533
  position: absolute;
538
534
  }
@@ -542,24 +538,12 @@ button {
542
538
  .left-2 {
543
539
  left: 0.5rem;
544
540
  }
545
- .left-6 {
546
- left: 1.5rem;
547
- }
548
- .right-10 {
549
- right: 2.5rem;
550
- }
551
541
  .right-2 {
552
542
  right: 0.5rem;
553
543
  }
554
- .top-0 {
555
- top: 0px;
556
- }
557
544
  .top-2 {
558
545
  top: 0.5rem;
559
546
  }
560
- .z-50 {
561
- z-index: 50;
562
- }
563
547
  .mx-auto {
564
548
  margin-left: auto;
565
549
  margin-right: auto;
@@ -568,21 +552,9 @@ button {
568
552
  margin-top: 1.5rem;
569
553
  margin-bottom: 1.5rem;
570
554
  }
571
- .mb-4 {
572
- margin-bottom: 1rem;
573
- }
574
- .ml-5 {
575
- margin-left: 1.25rem;
576
- }
577
- .mt-1 {
578
- margin-top: 0.25rem;
579
- }
580
555
  .mt-2 {
581
556
  margin-top: 0.5rem;
582
557
  }
583
- .mt-3 {
584
- margin-top: 0.75rem;
585
- }
586
558
  .mt-4 {
587
559
  margin-top: 1rem;
588
560
  }
@@ -592,15 +564,9 @@ button {
592
564
  .block {
593
565
  display: block;
594
566
  }
595
- .inline-block {
596
- display: inline-block;
597
- }
598
567
  .inline {
599
568
  display: inline;
600
569
  }
601
- .\!flex {
602
- display: flex !important;
603
- }
604
570
  .flex {
605
571
  display: flex;
606
572
  }
@@ -625,9 +591,6 @@ button {
625
591
  .h-24 {
626
592
  height: 6rem;
627
593
  }
628
- .h-5 {
629
- height: 1.25rem;
630
- }
631
594
  .h-6 {
632
595
  height: 1.5rem;
633
596
  }
@@ -637,18 +600,9 @@ button {
637
600
  .h-\[8px\] {
638
601
  height: 8px;
639
602
  }
640
- .h-full {
641
- height: 100%;
642
- }
643
603
  .w-1\/2 {
644
604
  width: 50%;
645
605
  }
646
- .w-4 {
647
- width: 1rem;
648
- }
649
- .w-5 {
650
- width: 1.25rem;
651
- }
652
606
  .w-6 {
653
607
  width: 1.5rem;
654
608
  }
@@ -658,24 +612,12 @@ button {
658
612
  .w-\[8px\] {
659
613
  width: 8px;
660
614
  }
661
- .w-full {
662
- width: 100%;
663
- }
664
- .min-w-\[150px\] {
665
- min-width: 150px;
666
- }
667
- .min-w-\[200px\] {
668
- min-width: 200px;
669
- }
670
615
  .min-w-\[44px\] {
671
616
  min-width: 44px;
672
617
  }
673
618
  .max-w-\[1100px\] {
674
619
  max-width: 1100px;
675
620
  }
676
- .max-w-full {
677
- max-width: 100%;
678
- }
679
621
  .flex-1 {
680
622
  flex: 1 1 0%;
681
623
  }
@@ -685,9 +627,6 @@ button {
685
627
  .cursor-pointer {
686
628
  cursor: pointer;
687
629
  }
688
- .select-none {
689
- user-select: none;
690
- }
691
630
  .resize {
692
631
  resize: both;
693
632
  }
@@ -700,15 +639,9 @@ button {
700
639
  .grid-cols-6 {
701
640
  grid-template-columns: repeat(6, minmax(0, 1fr));
702
641
  }
703
- .grid-cols-\[1fr_1px_1fr\] {
704
- grid-template-columns: 1fr 1px 1fr;
705
- }
706
642
  .flex-col {
707
643
  flex-direction: column;
708
644
  }
709
- .flex-nowrap {
710
- flex-wrap: nowrap;
711
- }
712
645
  .items-start {
713
646
  align-items: flex-start;
714
647
  }
@@ -727,15 +660,6 @@ button {
727
660
  .justify-items-center {
728
661
  justify-items: center;
729
662
  }
730
- .gap-0 {
731
- gap: 0px;
732
- }
733
- .gap-0\.5 {
734
- gap: 0.125rem;
735
- }
736
- .gap-1 {
737
- gap: 0.25rem;
738
- }
739
663
  .gap-4 {
740
664
  gap: 1rem;
741
665
  }
@@ -770,12 +694,6 @@ button {
770
694
  .self-end {
771
695
  align-self: flex-end;
772
696
  }
773
- .overflow-hidden {
774
- overflow: hidden;
775
- }
776
- .text-ellipsis {
777
- text-overflow: ellipsis;
778
- }
779
697
  .whitespace-nowrap {
780
698
  white-space: nowrap;
781
699
  }
@@ -788,29 +706,9 @@ button {
788
706
  .rounded-md {
789
707
  border-radius: 0.375rem;
790
708
  }
791
- .rounded-sm {
792
- border-radius: 0.125rem;
793
- }
794
709
  .border {
795
710
  border-width: 1px;
796
711
  }
797
- .border-0 {
798
- border-width: 0px;
799
- }
800
- .border-b {
801
- border-bottom-width: 1px;
802
- }
803
- .border-solid {
804
- border-style: solid;
805
- }
806
- .border-gray-100-800 {
807
- --tw-border-opacity: 1;
808
- border-color: rgb(var(--c-color-gray-100-800) / var(--tw-border-opacity));
809
- }
810
- .\!bg-purple-50-900 {
811
- --tw-bg-opacity: 1 !important;
812
- background-color: rgb(var(--c-color-purple-50-900) / var(--tw-bg-opacity)) !important;
813
- }
814
712
  .bg-elevate {
815
713
  --tw-bg-opacity: 1;
816
714
  background-color: rgb(var(--c-color-elevate) / var(--tw-bg-opacity));
@@ -818,30 +716,13 @@ button {
818
716
  .bg-gray {
819
717
  background-color: rgb(var(--c-color-gray));
820
718
  }
821
- .bg-gray-100-800 {
822
- --tw-bg-opacity: 1;
823
- background-color: rgb(var(--c-color-gray-100-800) / var(--tw-bg-opacity));
824
- }
825
719
  .bg-gray-50-900 {
826
720
  --tw-bg-opacity: 1;
827
721
  background-color: rgb(var(--c-color-gray-50-900) / var(--tw-bg-opacity));
828
722
  }
829
- .bg-purple-50-900 {
830
- --tw-bg-opacity: 1;
831
- background-color: rgb(var(--c-color-purple-50-900) / var(--tw-bg-opacity));
832
- }
833
- .bg-\[length\:16px_16px\] {
834
- background-size: 16px 16px;
835
- }
836
- .bg-\[length\:17px_17px\] {
837
- background-size: 17px 17px;
838
- }
839
723
  .bg-\[length\:18px_18px\] {
840
724
  background-size: 18px 18px;
841
725
  }
842
- .bg-\[length\:20px_20px\] {
843
- background-size: 20px 20px;
844
- }
845
726
  .bg-center {
846
727
  background-position: center;
847
728
  }
@@ -857,30 +738,10 @@ button {
857
738
  .p-\[5px\] {
858
739
  padding: 5px;
859
740
  }
860
- .px-1 {
861
- padding-left: 0.25rem;
862
- padding-right: 0.25rem;
863
- }
864
741
  .px-3 {
865
742
  padding-left: 0.75rem;
866
743
  padding-right: 0.75rem;
867
744
  }
868
- .px-6 {
869
- padding-left: 1.5rem;
870
- padding-right: 1.5rem;
871
- }
872
- .py-0 {
873
- padding-top: 0px;
874
- padding-bottom: 0px;
875
- }
876
- .py-0\.5 {
877
- padding-top: 0.125rem;
878
- padding-bottom: 0.125rem;
879
- }
880
- .py-2 {
881
- padding-top: 0.5rem;
882
- padding-bottom: 0.5rem;
883
- }
884
745
  .pt-14 {
885
746
  padding-top: 3.5rem;
886
747
  }
@@ -905,12 +766,6 @@ button {
905
766
  "Segoe UI Symbol",
906
767
  "Noto Color Emoji";
907
768
  }
908
- .text-\[10px\] {
909
- font-size: 10px;
910
- }
911
- .text-\[14px\] {
912
- font-size: 14px;
913
- }
914
769
  .text-sm {
915
770
  font-size: 0.875rem;
916
771
  line-height: 1.25rem;
@@ -919,15 +774,6 @@ button {
919
774
  font-size: 0.75rem;
920
775
  line-height: 1rem;
921
776
  }
922
- .font-bold {
923
- font-weight: 700;
924
- }
925
- .font-medium {
926
- font-weight: 500;
927
- }
928
- .font-normal {
929
- font-weight: 400;
930
- }
931
777
  .italic {
932
778
  font-style: italic;
933
779
  }
@@ -937,37 +783,13 @@ button {
937
783
  .text-gray {
938
784
  color: rgb(var(--c-color-gray));
939
785
  }
940
- .text-gray-300-600 {
941
- --tw-text-opacity: 1;
942
- color: rgb(var(--c-color-gray-300-600) / var(--tw-text-opacity));
943
- }
944
- .text-gray-600-300 {
945
- --tw-text-opacity: 1;
946
- color: rgb(var(--c-color-gray-600-300) / var(--tw-text-opacity));
947
- }
948
786
  .text-gray-700-200 {
949
787
  --tw-text-opacity: 1;
950
788
  color: rgb(var(--c-color-gray-700-200) / var(--tw-text-opacity));
951
789
  }
952
- .text-pink-600-300 {
953
- --tw-text-opacity: 1;
954
- color: rgb(var(--c-color-pink-600-300) / var(--tw-text-opacity));
955
- }
956
790
  .underline {
957
791
  text-decoration-line: underline;
958
792
  }
959
- .opacity-100 {
960
- opacity: 1;
961
- }
962
- .opacity-30 {
963
- opacity: 0.3;
964
- }
965
- .opacity-60 {
966
- opacity: 0.6;
967
- }
968
- .opacity-80 {
969
- opacity: 0.8;
970
- }
971
793
  .shadow-md {
972
794
  --tw-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
973
795
  --tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);
@@ -976,14 +798,6 @@ button {
976
798
  var(--tw-ring-shadow, 0 0 #0000),
977
799
  var(--tw-shadow);
978
800
  }
979
- .shadow-sm {
980
- --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
981
- --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);
982
- box-shadow:
983
- var(--tw-ring-offset-shadow, 0 0 #0000),
984
- var(--tw-ring-shadow, 0 0 #0000),
985
- var(--tw-shadow);
986
- }
987
801
  .filter {
988
802
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
989
803
  }
@@ -2160,861 +1974,588 @@ button {
2160
1974
  line-height: 1.75rem;
2161
1975
  }
2162
1976
 
2163
- /* src/rich-text-editor/rich-text-editor.css */
2164
- .c-rich-text-editor {
2165
- margin: 0px auto;
2166
- max-width: 1100px;
2167
- position: relative;
2168
- line-height: 1.7;
1977
+ /* src/rich-text-editor/rich-text-editor-icons.css */
1978
+ .c-rte-icon-plus {
1979
+ background-image: url(./plus-CQISIKEC.svg);
2169
1980
  }
2170
- .c-rich-text-editor > * {
2171
- box-sizing: border-box;
1981
+ .c-rte-icon-h1 {
1982
+ background-image: url(./type-h1-6KJP7YOM.svg);
2172
1983
  }
2173
- .c-rich-text-editor {
2174
- font-family:
2175
- Roboto,
2176
- ui-sans-serif,
2177
- system-ui,
2178
- -apple-system,
2179
- BlinkMacSystemFont,
2180
- "Segoe UI",
2181
- Roboto,
2182
- "Helvetica Neue",
2183
- Arial,
2184
- "Noto Sans",
2185
- sans-serif,
2186
- "Apple Color Emoji",
2187
- "Segoe UI Emoji",
2188
- "Segoe UI Symbol",
2189
- "Noto Color Emoji" !important;
2190
- font-weight: 400;
2191
- --tw-text-opacity: 1;
2192
- color: rgb(var(--c-color-gray-900-50) / var(--tw-text-opacity));
1984
+ .c-rte-icon-h2 {
1985
+ background-image: url(./type-h2-VHI2USC3.svg);
2193
1986
  }
2194
- .c-rich-text-editor .editor-container {
2195
- background: #fff;
2196
- position: relative;
2197
- cursor: text;
2198
- margin-top: 0.5rem;
2199
- border-bottom-left-radius: 0.375rem;
2200
- border-bottom-right-radius: 0.375rem;
1987
+ .c-rte-icon-h3 {
1988
+ background-image: url(./type-h3-JIU77CHO.svg);
2201
1989
  }
2202
- .c-rich-text-editor .editor-container.plain-text {
2203
- border-top-left-radius: 0.375rem;
2204
- border-top-right-radius: 0.375rem;
1990
+ .c-rte-icon-h4 {
1991
+ background-image: url(./type-h4-P5EHKDAL.svg);
2205
1992
  }
2206
- .c-rich-text-editor span.editor-image {
2207
- cursor: default;
2208
- display: inline-block;
2209
- position: relative;
2210
- user-select: none;
1993
+ .c-rte-icon-h5 {
1994
+ background-image: url(./type-h5-CS2KYVRG.svg);
2211
1995
  }
2212
- .c-rich-text-editor .editor-image img {
2213
- max-width: 100%;
2214
- cursor: default;
1996
+ .c-rte-icon-h6 {
1997
+ background-image: url(./type-h6-J2O74LJZ.svg);
2215
1998
  }
2216
- .c-rich-text-editor .editor-image img.focused {
2217
- outline: 2px solid rgb(60, 132, 244);
2218
- user-select: none;
1999
+ .c-rte-icon-paragraph {
2000
+ background-image: url(./text-paragraph-MFTUIIQG.svg);
2219
2001
  }
2220
- .c-rich-text-editor .editor-image img.focused.draggable {
2221
- cursor: grab;
2002
+ .c-rte-icon-bullet-list,
2003
+ .c-rte-icon-bullet {
2004
+ background-image: url(./list-ul-DVKNUP47.svg);
2222
2005
  }
2223
- .c-rich-text-editor .editor-image img.focused.draggable:active {
2224
- cursor: grabbing;
2006
+ .c-rte-icon-check-list,
2007
+ .c-rte-icon-check {
2008
+ background-image: url(./square-check-UTG6FU6D.svg);
2225
2009
  }
2226
- .c-rich-text-editor .editor-image .image-caption-container {
2227
- display: block;
2228
- position: absolute;
2229
- bottom: 4px;
2230
- left: 0;
2231
- right: 0;
2232
- padding: 0;
2233
- margin: 0;
2234
- border-top: 1px solid #fff;
2235
- background-color: rgba(255, 255, 255, 0.9);
2236
- min-width: 100px;
2237
- color: #000;
2238
- overflow: hidden;
2010
+ .c-rte-icon-numbered-list,
2011
+ .c-rte-icon-number {
2012
+ background-image: url(./list-ol-2ZEUN4Z7.svg);
2239
2013
  }
2240
- .c-rich-text-editor .editor-image .image-caption-button {
2241
- display: block;
2242
- position: absolute;
2243
- bottom: 20px;
2244
- left: 0;
2245
- right: 0;
2246
- width: 30%;
2247
- padding: 10px;
2248
- margin: 0 auto;
2249
- border: 1px solid rgba(255, 255, 255, 0.3);
2250
- border-radius: 5px;
2251
- background-color: rgba(0, 0, 0, 0.5);
2252
- min-width: 100px;
2253
- color: #fff;
2254
- cursor: pointer;
2255
- user-select: none;
2014
+ .c-rte-icon-quote {
2015
+ background-image: url(./chat-square-quote-CI6PUJHH.svg);
2256
2016
  }
2257
- .c-rich-text-editor .editor-image .image-caption-button:hover {
2258
- background-color: rgba(60, 132, 244, 0.5);
2017
+ .c-rte-icon-code {
2018
+ background-image: url(./code-SEVR6TIQ.svg);
2259
2019
  }
2260
- .c-rich-text-editor .editor-scroller {
2261
- min-height: 150px;
2262
- border: 0;
2263
- resize: none;
2264
- cursor: text;
2265
- display: block;
2266
- position: relative;
2267
- outline: 0;
2268
- resize: vertical;
2020
+ .c-rte-icon-palette {
2021
+ background-image: url(./palette-SWGFPRWZ.svg);
2269
2022
  }
2270
- .c-rich-text-editor .editor {
2271
- height: 100%;
2272
- position: relative;
2023
+ .c-rte-icon-bucket {
2024
+ background-image: url(./paint-bucket-VCISMZTH.svg);
2273
2025
  }
2274
- .c-rich-text-editor .test-recorder-output {
2275
- margin: 20px auto 20px auto;
2276
- width: 100%;
2026
+ .c-rte-icon-bold {
2027
+ background-image: url(./type-bold-PY7COC3N.svg);
2277
2028
  }
2278
- .c-rich-text-editor pre {
2279
- line-height: 1.1;
2280
- color: #fff;
2281
- margin: 0;
2282
- padding: 10px;
2283
- overflow: auto;
2284
- max-height: 180px;
2285
- --tw-bg-opacity: 1;
2286
- background-color: rgb(var(--c-color-purple-50-900) / var(--tw-bg-opacity));
2287
- font-size: 0.875rem;
2288
- line-height: 1.25rem;
2029
+ .c-rte-icon-italic {
2030
+ background-image: url(./type-italic-3DSFOSG2.svg);
2289
2031
  }
2290
- .c-rich-text-editor pre::-webkit-scrollbar {
2291
- background: transparent;
2292
- width: 10px;
2032
+ .c-rte-icon-clear {
2033
+ background-image: url(./trash-UOM6D7TD.svg);
2293
2034
  }
2294
- .c-rich-text-editor pre::-webkit-scrollbar-thumb {
2295
- background: #999;
2035
+ .c-rte-icon-code {
2036
+ background-image: url(./code-SEVR6TIQ.svg);
2296
2037
  }
2297
- .c-rich-text-editor .editor-dev-button {
2298
- position: relative;
2299
- display: block;
2300
- width: 40px;
2301
- height: 40px;
2302
- font-size: 12px;
2303
- border-radius: 20px;
2304
- border: none;
2305
- cursor: pointer;
2306
- outline: none;
2307
- box-shadow: 0px 1px 10px rgba(0, 0, 0, 0.3);
2308
- background-color: #444;
2038
+ .c-rte-icon-underline {
2039
+ background-image: url(./type-underline-CBFA5VLF.svg);
2309
2040
  }
2310
- .c-rich-text-editor .editor-dev-button::after {
2311
- content: "";
2312
- position: absolute;
2313
- top: 10px;
2314
- right: 10px;
2315
- bottom: 10px;
2316
- left: 10px;
2317
- display: block;
2318
- background-size: contain;
2319
- filter: invert(1);
2041
+ .c-rte-icon-strikethrough {
2042
+ background-image: url(./type-strikethrough-E2KKQFSX.svg);
2320
2043
  }
2321
- .c-rich-text-editor .editor-dev-button:hover {
2322
- background-color: #555;
2044
+ .c-rte-icon-subscript {
2045
+ background-image: url(./type-subscript-BMPTRIBU.svg);
2323
2046
  }
2324
- .c-rich-text-editor .editor-dev-button.active {
2325
- background-color: rgb(233, 35, 35);
2047
+ .c-rte-icon-superscript {
2048
+ background-image: url(./type-superscript-EDF6EPAA.svg);
2326
2049
  }
2327
- .c-rich-text-editor .test-recorder-toolbar {
2328
- display: flex;
2050
+ .c-rte-icon-link {
2051
+ background-image: url(./link-W52N4JKZ.svg);
2329
2052
  }
2330
- .c-rich-text-editor .test-recorder-button {
2331
- position: relative;
2332
- display: block;
2333
- width: 32px;
2334
- height: 32px;
2335
- font-size: 10px;
2336
- padding: 6px 6px;
2337
- border-radius: 4px;
2338
- border: none;
2339
- cursor: pointer;
2340
- outline: none;
2341
- box-shadow: 1px 2px 2px rgba(0, 0, 0, 0.4);
2342
- background-color: #222;
2343
- transition: box-shadow 50ms ease-out;
2344
- }
2345
- .c-rich-text-editor .test-recorder-button:active {
2346
- box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.4);
2347
- }
2348
- .c-rich-text-editor .test-recorder-button + .test-recorder-button {
2349
- margin-left: 4px;
2350
- }
2351
- .c-rich-text-editor .test-recorder-button::after {
2352
- content: "";
2353
- position: absolute;
2354
- top: 8px;
2355
- right: 8px;
2356
- bottom: 8px;
2357
- left: 8px;
2358
- display: block;
2359
- background-size: contain;
2360
- filter: invert(1);
2361
- }
2362
- .c-rich-text-editor #options-button {
2363
- position: fixed;
2364
- left: 20px;
2365
- bottom: 20px;
2366
- }
2367
- .c-rich-text-editor #test-recorder-button {
2368
- position: fixed;
2369
- left: 70px;
2370
- bottom: 20px;
2371
- }
2372
- .c-rich-text-editor #paste-log-button {
2373
- position: fixed;
2374
- left: 120px;
2375
- bottom: 20px;
2376
- }
2377
- .c-rich-text-editor #options-button::after {
2378
- background-image: url(./gear-ICMT4NTP.svg);
2379
- }
2380
- .c-rich-text-editor #test-recorder-button::after {
2381
- background-image: url(./journal-code-XUT44HDV.svg);
2382
- }
2383
- .c-rich-text-editor #paste-log-button::after {
2384
- background-image: url(./clipboard-OSEFDF25.svg);
2385
- }
2386
- .c-rich-text-editor #test-recorder-button-snapshot {
2387
- margin-right: auto;
2388
- }
2389
- .c-rich-text-editor #test-recorder-button-snapshot::after {
2390
- background-image: url(./camera-CR7D2PNH.svg);
2391
- }
2392
- .c-rich-text-editor #test-recorder-button-copy::after {
2393
- background-image: url(./clipboard-OSEFDF25.svg);
2394
- }
2395
- .c-rich-text-editor #test-recorder-button-download::after {
2396
- background-image: url(./download-JXUGIUCX.svg);
2397
- }
2398
- .c-rich-text-editor .typeahead-popover {
2399
- background: #fff;
2400
- box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.3);
2401
- border-radius: 8px;
2402
- margin-top: 25px;
2403
- }
2404
- .c-rich-text-editor .typeahead-popover ul {
2405
- padding: 0;
2406
- list-style: none;
2407
- margin: 0;
2408
- border-radius: 8px;
2409
- max-height: 200px;
2410
- overflow-y: scroll;
2411
- }
2412
- .c-rich-text-editor .typeahead-popover ul::-webkit-scrollbar {
2413
- display: none;
2414
- }
2415
- .c-rich-text-editor .typeahead-popover ul {
2416
- -ms-overflow-style: none;
2417
- scrollbar-width: none;
2418
- }
2419
- .c-rich-text-editor .typeahead-popover ul li {
2420
- margin: 0;
2421
- min-width: 180px;
2422
- font-size: 14px;
2423
- outline: none;
2424
- cursor: pointer;
2425
- border-radius: 8px;
2426
- }
2427
- .c-rich-text-editor .typeahead-popover ul li.selected {
2428
- background: #eee;
2429
- }
2430
- .c-rich-text-editor .typeahead-popover li {
2431
- margin: 0 8px 0 8px;
2432
- padding: 8px;
2433
- color: #050505;
2434
- cursor: pointer;
2435
- line-height: 16px;
2436
- font-size: 15px;
2437
- display: flex;
2438
- align-content: center;
2439
- flex-direction: row;
2440
- flex-shrink: 0;
2441
- background-color: #fff;
2442
- border-radius: 8px;
2443
- border: 0;
2444
- }
2445
- .c-rich-text-editor .typeahead-popover li.active {
2446
- display: flex;
2447
- width: 20px;
2448
- height: 20px;
2449
- background-size: contain;
2450
- }
2451
- .c-rich-text-editor .typeahead-popover li:first-child {
2452
- border-radius: 8px 8px 0px 0px;
2453
- }
2454
- .c-rich-text-editor .typeahead-popover li:last-child {
2455
- border-radius: 0px 0px 8px 8px;
2456
- }
2457
- .c-rich-text-editor .typeahead-popover li:hover {
2458
- background-color: #eee;
2459
- }
2460
- .c-rich-text-editor .typeahead-popover li .text {
2461
- display: flex;
2462
- line-height: 20px;
2463
- flex-grow: 1;
2464
- min-width: 150px;
2465
- }
2466
- .c-rich-text-editor .typeahead-popover li .icon {
2467
- display: flex;
2468
- width: 20px;
2469
- height: 20px;
2470
- user-select: none;
2471
- margin-right: 8px;
2472
- line-height: 16px;
2473
- background-size: contain;
2474
- background-repeat: no-repeat;
2475
- background-position: center;
2476
- }
2477
- .c-rich-text-editor .component-picker-menu {
2478
- width: 200px;
2479
- }
2480
- .c-rich-text-editor .auto-embed-menu {
2481
- width: 150px;
2482
- }
2483
- .c-rich-text-editor i.palette {
2484
- background-image: url(./palette-SWGFPRWZ.svg);
2485
- }
2486
- .c-rich-text-editor i.bucket {
2487
- background-image: url(./paint-bucket-VCISMZTH.svg);
2488
- }
2489
- .c-rich-text-editor i.bold {
2490
- background-image: url(./type-bold-PY7COC3N.svg);
2491
- }
2492
- .c-rich-text-editor i.italic {
2493
- background-image: url(./type-italic-3DSFOSG2.svg);
2494
- }
2495
- .c-rich-text-editor i.clear {
2496
- background-image: url(./trash-UOM6D7TD.svg);
2497
- }
2498
- .c-rich-text-editor i.code {
2499
- background-image: url(./code-SEVR6TIQ.svg);
2500
- }
2501
- .c-rich-text-editor i.underline {
2502
- background-image: url(./type-underline-CBFA5VLF.svg);
2503
- }
2504
- .c-rich-text-editor i.strikethrough {
2505
- background-image: url(./type-strikethrough-E2KKQFSX.svg);
2506
- }
2507
- .c-rich-text-editor i.subscript {
2508
- background-image: url(./type-subscript-BMPTRIBU.svg);
2509
- }
2510
- .c-rich-text-editor i.superscript {
2511
- background-image: url(./type-superscript-EDF6EPAA.svg);
2512
- }
2513
- .c-rich-text-editor i.link {
2514
- background-image: url(./link-W52N4JKZ.svg);
2515
- }
2516
- .c-rich-text-editor i.horizontal-rule {
2053
+ .c-rte-icon-horizontal-rule {
2517
2054
  background-image: url(./horizontal-rule-N6RD2V7H.svg);
2518
2055
  }
2519
- .c-rich-text-editor .icon.plus {
2520
- background-image: url(./plus-CQISIKEC.svg);
2521
- }
2522
- .c-rich-text-editor .icon.caret-right {
2056
+ .c-rte-icon-caret-right {
2523
2057
  background-image: url(./caret-right-fill-FFBNEXVX.svg);
2524
2058
  }
2525
- .c-rich-text-editor .icon.dropdown-more {
2059
+ .c-rte-icon-dropdown-more {
2526
2060
  background-image: url(./dropdown-more-BHZ5COKX.svg);
2527
2061
  }
2528
- .c-rich-text-editor .icon.font-color {
2062
+ .c-rte-icon-font-color {
2529
2063
  background-image: url(./font-color-J4GA3ZJO.svg);
2530
2064
  }
2531
- .c-rich-text-editor .icon.font-family {
2065
+ .c-rte-icon-font-family {
2532
2066
  background-image: url(./font-family-ZU5N6TTE.svg);
2533
2067
  }
2534
- .c-rich-text-editor .icon.bg-color {
2068
+ .c-rte-icon-bg-color {
2535
2069
  background-image: url(./bg-color-HB2WDYGO.svg);
2536
2070
  }
2537
- .c-rich-text-editor i.image {
2071
+ .c-rte-icon-image {
2538
2072
  background-image: url(./file-image-TIQPFJX4.svg);
2539
2073
  }
2540
- .c-rich-text-editor i.table {
2074
+ .c-rte-icon-table {
2541
2075
  background-image: url(./table-BR6DI4ZQ.svg);
2542
2076
  }
2543
- .c-rich-text-editor i.close {
2077
+ .c-rte-icon-close {
2544
2078
  background-image: url(./close-FH57ZMJF.svg);
2545
2079
  }
2546
- .c-rich-text-editor .icon.left-align,
2547
- .c-rich-text-editor i.left-align {
2080
+ .c-rte-icon-left-align,
2081
+ .c-rte-icon-left-align {
2548
2082
  background-image: url(./text-left-KT2B6TR3.svg);
2549
2083
  }
2550
- .c-rich-text-editor i.center-align {
2084
+ .c-rte-icon-center-align {
2551
2085
  background-image: url(./text-center-UQI6PAEF.svg);
2552
2086
  }
2553
- .c-rich-text-editor i.right-align {
2087
+ .c-rte-icon-right-align {
2554
2088
  background-image: url(./text-right-SKELPISG.svg);
2555
2089
  }
2556
- .c-rich-text-editor i.justify-align {
2090
+ .c-rte-icon-justify-align {
2557
2091
  background-image: url(./justify-J7X5JEEX.svg);
2558
2092
  }
2559
- .c-rich-text-editor i.indent {
2093
+ .c-rte-icon-indent {
2560
2094
  background-image: url(./indent-MJ6JIMCK.svg);
2561
2095
  }
2562
- .c-rich-text-editor i.outdent {
2096
+ .c-rte-icon-outdent {
2563
2097
  background-image: url(./outdent-2LUMUMIP.svg);
2564
2098
  }
2565
- .c-rich-text-editor i.undo {
2099
+ .c-rte-icon-undo {
2566
2100
  background-image: url(./arrow-counterclockwise-2O5EYVJT.svg);
2567
2101
  }
2568
- .c-rich-text-editor i.redo {
2102
+ .c-rte-icon-redo {
2569
2103
  background-image: url(./arrow-clockwise-Z2G6UEGP.svg);
2570
2104
  }
2571
- .c-rich-text-editor i.mic {
2105
+ .c-rte-icon-mic {
2572
2106
  background-image: url(./mic-H5FNOMM7.svg);
2573
2107
  }
2574
- .c-rich-text-editor i.import {
2108
+ .c-rte-icon-import {
2575
2109
  background-image: url(./upload-Q6KICGZW.svg);
2576
2110
  }
2577
- .c-rich-text-editor i.export {
2111
+ .c-rte-icon-export {
2578
2112
  background-image: url(./download-JXUGIUCX.svg);
2579
2113
  }
2580
- .c-rich-text-editor i.diagram-2 {
2114
+ .c-rte-icon-diagram-2 {
2581
2115
  background-image: url(./diagram-2-CEJUD2B4.svg);
2582
2116
  }
2583
- .c-rich-text-editor i.user {
2117
+ .c-rte-icon-user {
2584
2118
  background-image: url(./user-EOI2NEFZ.svg);
2585
2119
  }
2586
- .c-rich-text-editor i.equation {
2120
+ .c-rte-icon-equation {
2587
2121
  background-image: url(./plus-slash-minus-N22JU4TI.svg);
2588
2122
  }
2589
- .c-rich-text-editor i.gif {
2123
+ .c-rte-icon-gif {
2590
2124
  background-image: url(./filetype-gif-OG2BEYYK.svg);
2591
2125
  }
2592
- .c-rich-text-editor i.copy {
2126
+ .c-rte-icon-copy {
2593
2127
  background-image: url(./copy-DMGDODUL.svg);
2594
2128
  }
2595
- .c-rich-text-editor i.success {
2129
+ .c-rte-icon-success {
2596
2130
  background-image: url(./success-YVXUMPEZ.svg);
2597
2131
  }
2598
- .c-rich-text-editor i.prettier {
2132
+ .c-rte-icon-prettier {
2599
2133
  background-image: url(./prettier-WUJ7B5NV.svg);
2600
2134
  }
2601
- .c-rich-text-editor i.prettier-error {
2135
+ .c-rte-icon-prettier-error {
2602
2136
  background-image: url(./prettier-error-DYJSLYDP.svg);
2603
2137
  }
2604
- .c-rich-text-editor .link-editor {
2605
- box-sizing: border-box;
2606
- }
2607
- .c-rich-text-editor .link-editor .button.active,
2608
- .c-rich-text-editor .toolbar .button.active {
2609
- --tw-bg-opacity: 1;
2610
- background-color: rgb(var(--c-color-purple-50-900) / var(--tw-bg-opacity));
2138
+
2139
+ /* src/rich-text-editor/plugins/ActionsPlugin/index.css */
2140
+ .c-rte-actions-plugin {
2141
+ z-index: 50;
2142
+ display: flex;
2143
+ align-items: center;
2611
2144
  }
2612
- .c-rich-text-editor .link-editor {
2613
- border-radius: 0.5rem !important;
2614
- border-width: 1px;
2615
- border-style: solid;
2616
- --tw-border-opacity: 1;
2617
- border-color: rgb(var(--c-color-gray-100-800) / var(--tw-border-opacity));
2618
- --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1) !important;
2619
- --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color) !important;
2620
- box-shadow:
2621
- var(--tw-ring-offset-shadow, 0 0 #0000),
2622
- var(--tw-ring-shadow, 0 0 #0000),
2623
- var(--tw-shadow) !important;
2145
+
2146
+ /* src/rich-text-editor/plugins/CodeActionMenuPlugin/index.css */
2147
+ .c-rte-code-action-menu-container {
2148
+ height: 35.8px;
2149
+ font-size: 10px;
2150
+ color: rgba(0, 0, 0, 0.5);
2151
+ position: absolute;
2152
+ display: flex;
2153
+ align-items: center;
2154
+ flex-direction: row;
2155
+ user-select: none;
2624
2156
  }
2625
- .c-rich-text-editor .link-editor .link-input {
2626
- width: 100%;
2627
- box-sizing: border-box;
2628
- margin: 8px 0;
2629
- padding: 8px 24px;
2630
- font-size: 15px;
2631
- color: rgb(5, 5, 5);
2632
- outline: 0;
2633
- position: relative;
2634
- font-family: inherit;
2635
- border-color: rgb(var(--c-color-gray));
2636
- font-size: 0.875rem;
2637
- line-height: 1.25rem;
2638
- --tw-text-opacity: 1;
2639
- color: rgb(var(--c-color-s-blue-600-300) / var(--tw-text-opacity));
2157
+ .c-rte-code-highlight-language {
2158
+ margin-right: 4px;
2640
2159
  }
2641
- .c-rich-text-editor .link-editor div.link-edit {
2642
- background-image: url(./pencil-fill-STFSC26F.svg);
2643
- background-size: 12px;
2644
- background-position: center;
2645
- background-repeat: no-repeat;
2646
- width: 35px;
2647
- vertical-align: -0.25em;
2648
- position: absolute;
2649
- right: 0;
2650
- top: 0;
2651
- bottom: 0;
2160
+ .c-rte-code-button {
2161
+ border: 1px solid transparent;
2162
+ border-radius: 4px;
2163
+ padding: 4px;
2164
+ background: none;
2652
2165
  cursor: pointer;
2166
+ flex-shrink: 0;
2167
+ display: flex;
2168
+ align-items: center;
2169
+ color: rgba(0, 0, 0, 0.5);
2170
+ text-transform: uppercase;
2653
2171
  }
2654
- .c-rich-text-editor .link-editor .link-input {
2655
- box-sizing: border-box;
2656
- }
2657
- .c-rich-text-editor .link-editor .link-input a {
2658
- color: rgb(33, 111, 219);
2659
- text-decoration: none;
2660
- display: block;
2661
- white-space: nowrap;
2662
- overflow: hidden;
2663
- text-overflow: ellipsis;
2664
- --tw-text-opacity: 1;
2665
- color: rgb(var(--c-color-s-blue-600-300) / var(--tw-text-opacity));
2172
+ .c-rte-code-button:hover {
2173
+ border: 1px solid rgba(0, 0, 0, 0.3);
2174
+ opacity: 0.9;
2666
2175
  }
2667
- .c-rich-text-editor .link-editor .link-input a:hover {
2668
- text-decoration: underline;
2176
+ .c-rte-code-button:active {
2177
+ background-color: rgba(223, 232, 250);
2178
+ border: 1px solid rgba(0, 0, 0, 0.45);
2669
2179
  }
2670
- .c-rich-text-editor .link-editor .font-size-wrapper,
2671
- .c-rich-text-editor .link-editor .font-family-wrapper {
2180
+ .c-rte-code-button__icon {
2181
+ height: 16px;
2182
+ width: 16px;
2183
+ opacity: 0.6;
2672
2184
  display: flex;
2673
- margin: 0 4px;
2185
+ color: rgba(0, 0, 0, 0.5);
2186
+ background-size: contain;
2674
2187
  }
2675
- .c-rich-text-editor .link-editor select {
2676
- padding: 6px;
2677
- border: none;
2678
- background-color: rgba(0, 0, 0, 0.075);
2188
+ .c-rte-prettier-wrapper {
2189
+ position: relative;
2190
+ }
2191
+ .c-rte-code-error-tips {
2192
+ padding: 5px;
2679
2193
  border-radius: 4px;
2194
+ color: #fff;
2195
+ background: #222;
2196
+ margin-top: 4px;
2197
+ position: absolute;
2198
+ top: 26px;
2199
+ right: 0;
2680
2200
  }
2681
- .c-rich-text-editor #block-controls {
2682
- display: block;
2201
+
2202
+ /* src/rich-text-editor/plugins/DraggableBlockPlugin/index.css */
2203
+ .c-rte-draggable-block-menu {
2204
+ border-radius: 4px;
2205
+ padding: 2px 1px;
2206
+ cursor: grab;
2207
+ opacity: 0;
2683
2208
  position: absolute;
2684
- right: 10px;
2685
- width: 32px;
2686
- height: 32px;
2687
- box-sizing: border-box;
2688
- box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 2px 0px;
2689
- top: 16px;
2690
- z-index: 10;
2691
- border-radius: 8px;
2692
- border: 1px solid rgb(206, 208, 212);
2693
- overflow: hidden;
2209
+ left: 0;
2210
+ top: 0;
2211
+ will-change: transform;
2694
2212
  }
2695
- .c-rich-text-editor #block-controls button {
2696
- border: 1px solid white;
2697
- background-color: #fff;
2698
- display: block;
2699
- transition: background-color 0.1s ease;
2700
- cursor: pointer;
2701
- outline: none;
2702
- border-radius: 8px;
2703
- padding: 3px;
2213
+ .c-rte-draggable-block-menu:active {
2214
+ cursor: grabbing;
2704
2215
  }
2705
- .c-rich-text-editor #block-controls button:hover {
2216
+ .c-rte-draggable-block-menu:hover {
2706
2217
  background-color: #efefef;
2707
2218
  }
2708
- .c-rich-text-editor #block-controls button:focus-visible {
2709
- border-color: blue;
2710
- }
2711
- .c-rich-text-editor #block-controls span.block-type {
2712
- background-size: contain;
2713
- display: block;
2714
- width: 18px;
2715
- height: 18px;
2716
- margin: 2px;
2219
+ .c-rte-draggable-block-menu__icon {
2220
+ width: 16px;
2221
+ height: 16px;
2222
+ opacity: 0.3;
2223
+ background-image: url(./draggable-block-menu-KKHDNKJA.svg);
2717
2224
  }
2718
- .c-rich-text-editor #block-controls span.block-type.paragraph {
2719
- background-image: url(./text-paragraph-MFTUIIQG.svg);
2225
+ .c-rte-draggable-block-target-line {
2226
+ pointer-events: none;
2227
+ background: deepskyblue;
2228
+ height: 4px;
2229
+ position: absolute;
2230
+ left: 0;
2231
+ top: 0;
2232
+ opacity: 0;
2233
+ will-change: transform;
2720
2234
  }
2721
- .c-rich-text-editor #block-controls span.block-type.h1 {
2722
- background-image: url(./type-h1-6KJP7YOM.svg);
2235
+
2236
+ /* src/rich-text-editor/plugins/TableActionMenuPlugin/index.css */
2237
+ .c-rte-table-cell-action-button-container {
2238
+ position: absolute;
2239
+ top: 0;
2240
+ left: 0;
2241
+ will-change: transform;
2723
2242
  }
2724
- .c-rich-text-editor #block-controls span.block-type.h2 {
2725
- background-image: url(./type-h2-VHI2USC3.svg);
2243
+
2244
+ /* src/rich-text-editor/plugins/ToolbarPlugin/index.css */
2245
+ .c-rte-toolbar {
2246
+ display: flex;
2247
+ height: 3rem;
2248
+ width: 100%;
2249
+ justify-content: space-between;
2250
+ overflow: auto;
2251
+ border-top-left-radius: 0.375rem;
2252
+ border-top-right-radius: 0.375rem;
2253
+ padding-top: 0.25rem;
2254
+ padding-bottom: 0.25rem;
2255
+ padding-left: 1rem;
2256
+ padding-right: 0.5rem;
2257
+ vertical-align: middle;
2726
2258
  }
2727
- .c-rich-text-editor #block-controls span.block-type.quote {
2728
- background-image: url(./chat-square-quote-CI6PUJHH.svg);
2259
+ .c-rte-toolbar__inner {
2260
+ display: flex;
2729
2261
  }
2730
- .c-rich-text-editor #block-controls span.block-type.ul {
2731
- background-image: url(./list-ul-DVKNUP47.svg);
2262
+ .c-rte-toolbar__icon {
2263
+ height: 1.5rem;
2264
+ width: 1rem;
2265
+ border-width: 1px;
2266
+ background-size: 17px 17px;
2267
+ background-position: center;
2268
+ background-repeat: no-repeat;
2732
2269
  }
2733
- .c-rich-text-editor #block-controls span.block-type.ol {
2734
- background-image: url(./list-ol-2ZEUN4Z7.svg);
2270
+ .c-rte-toolbar__icon.disabled {
2271
+ opacity: 0.3;
2735
2272
  }
2736
- .c-rich-text-editor #block-controls span.block-type.code {
2737
- background-image: url(./code-SEVR6TIQ.svg);
2738
- }
2739
- .c-rich-text-editor .characters-limit {
2740
- color: #888;
2741
- font-size: 12px;
2742
- text-align: right;
2743
- display: block;
2744
- position: absolute;
2745
- left: 12px;
2746
- bottom: 5px;
2747
- }
2748
- .c-rich-text-editor .characters-limit.characters-limit-exceeded {
2749
- color: red;
2750
- }
2751
- .c-rich-text-editor .icon.paragraph {
2752
- background-image: url(./text-paragraph-MFTUIIQG.svg);
2753
- }
2754
- .c-rich-text-editor .icon.h1 {
2755
- background-image: url(./type-h1-6KJP7YOM.svg);
2756
- }
2757
- .c-rich-text-editor .icon.h2 {
2758
- background-image: url(./type-h2-VHI2USC3.svg);
2759
- }
2760
- .c-rich-text-editor .icon.h3 {
2761
- background-image: url(./type-h3-JIU77CHO.svg);
2762
- }
2763
- .c-rich-text-editor .icon.h4 {
2764
- background-image: url(./type-h4-P5EHKDAL.svg);
2765
- }
2766
- .c-rich-text-editor .icon.h5 {
2767
- background-image: url(./type-h5-CS2KYVRG.svg);
2768
- }
2769
- .c-rich-text-editor .icon.h6 {
2770
- background-image: url(./type-h6-J2O74LJZ.svg);
2771
- }
2772
- .c-rich-text-editor .icon.bullet-list,
2773
- .c-rich-text-editor .icon.bullet {
2774
- background-image: url(./list-ul-DVKNUP47.svg);
2775
- }
2776
- .c-rich-text-editor .icon.check-list,
2777
- .c-rich-text-editor .icon.check {
2778
- background-image: url(./square-check-UTG6FU6D.svg);
2779
- }
2780
- .c-rich-text-editor .icon.numbered-list,
2781
- .c-rich-text-editor .icon.number {
2782
- background-image: url(./list-ol-2ZEUN4Z7.svg);
2783
- }
2784
- .c-rich-text-editor .icon.quote {
2785
- background-image: url(./chat-square-quote-CI6PUJHH.svg);
2786
- }
2787
- .c-rich-text-editor .icon.code {
2788
- background-image: url(./code-SEVR6TIQ.svg);
2789
- }
2790
- .c-rich-text-editor .switches {
2791
- z-index: 6;
2792
- position: fixed;
2793
- left: 10px;
2794
- bottom: 70px;
2795
- animation: slide-in 0.4s ease;
2796
- }
2797
- @keyframes slide-in {
2798
- 0% {
2799
- opacity: 0;
2800
- transform: translateX(-200px);
2801
- }
2802
- 100% {
2803
- opacity: 1;
2804
- transform: translateX(0);
2805
- }
2273
+ .c-rte-toolbar__block-format__icon {
2274
+ height: 1.5rem;
2275
+ width: 1.5rem;
2276
+ border-radius: 0.375rem;
2277
+ border-width: 1px;
2278
+ background-size: 18px 18px;
2279
+ background-position: center;
2280
+ background-repeat: no-repeat;
2281
+ opacity: 0.6;
2806
2282
  }
2807
- .c-rich-text-editor [role=separator] {
2808
- height: 1px;
2283
+ .c-rte-toolbar__block-format__icon.selected {
2809
2284
  --tw-bg-opacity: 1;
2810
- background-color: rgb(var(--c-color-gray-200-700) / var(--tw-bg-opacity));
2811
- }
2812
- .c-rich-text-editor .actions i.indent {
2813
- background-image: url(./indent-MJ6JIMCK.svg);
2814
- }
2815
- .c-rich-text-editor .actions i.outdent {
2816
- background-image: url(./outdent-2LUMUMIP.svg);
2817
- }
2818
- .c-rich-text-editor .actions i.lock {
2819
- background-image: url(./lock-fill-JZSKOSHK.svg);
2285
+ background-color: rgb(var(--c-color-purple-50-900) / var(--tw-bg-opacity));
2286
+ opacity: 1;
2820
2287
  }
2821
- .c-rich-text-editor .actions i.image {
2822
- background-image: url(./file-image-TIQPFJX4.svg);
2288
+ .c-rte-toolbar__block-format__text {
2289
+ min-width: 150px;
2290
+ padding-left: 0.75rem;
2291
+ padding-right: 0.75rem;
2292
+ font-size: 0.875rem;
2293
+ line-height: 1.25rem;
2294
+ font-weight: 400;
2823
2295
  }
2824
- .c-rich-text-editor .actions i.table {
2825
- background-image: url(./table-BR6DI4ZQ.svg);
2296
+ .c-rte-toolbar__block-format__text.selected {
2297
+ font-weight: 700;
2826
2298
  }
2827
- .c-rich-text-editor .actions i.unlock {
2828
- background-image: url(./lock-WCYOZOHW.svg);
2299
+ .c-rte-toolbar__toggle-icon {
2300
+ height: 1.5rem;
2301
+ width: 1.5rem;
2302
+ border-width: 1px;
2303
+ background-size: 18px 18px;
2304
+ background-position: center;
2305
+ background-repeat: no-repeat;
2829
2306
  }
2830
- .c-rich-text-editor .actions i.left-align {
2831
- background-image: url(./text-left-KT2B6TR3.svg);
2307
+ .c-rte-toolbar__code-lang__button-text {
2308
+ font-size: 0.875rem;
2309
+ line-height: 1.25rem;
2310
+ font-weight: 500;
2832
2311
  }
2833
- .c-rich-text-editor .actions i.center-align {
2834
- background-image: url(./text-center-UQI6PAEF.svg);
2312
+ .c-rte-toolbar__code-lang__sel-item {
2313
+ display: block;
2314
+ min-width: 200px;
2315
+ padding-left: 0.75rem;
2316
+ padding-right: 0.75rem;
2317
+ font-size: 0.875rem;
2318
+ line-height: 1.25rem;
2319
+ font-weight: 400;
2320
+ opacity: 0.8;
2835
2321
  }
2836
- .c-rich-text-editor .actions i.right-align {
2837
- background-image: url(./text-right-SKELPISG.svg);
2322
+ .c-rte-toolbar__code-lang__sel-item.selected {
2323
+ font-weight: 700;
2324
+ opacity: 1;
2838
2325
  }
2839
- .c-rich-text-editor .actions i.justify-align {
2840
- background-image: url(./justify-J7X5JEEX.svg);
2326
+ .c-rte-toolbar__divider {
2327
+ width: 1px;
2328
+ background-color: #eee;
2329
+ margin: 0 4px;
2841
2330
  }
2842
- .c-rich-text-editor .actions i.disconnect {
2843
- background-image: url(./plug-HGGGEVS3.svg);
2331
+ .c-rte-toolbar__actions-rest {
2332
+ display: flex;
2333
+ gap: 0.25rem;
2844
2334
  }
2845
- .c-rich-text-editor .actions i.connect {
2846
- background-image: url(./plug-fill-OTG3U4TN.svg);
2335
+ .c-rte-toolbar__icon-btn {
2336
+ opacity: 0.6;
2847
2337
  }
2848
- .c-rich-text-editor table.disable-selection {
2849
- -webkit-touch-callout: none;
2850
- -webkit-user-select: none;
2851
- -khtml-user-select: none;
2852
- -moz-user-select: none;
2853
- -ms-user-select: none;
2854
- user-select: none;
2338
+ .c-rte-toolbar__icon-btn.selected {
2339
+ --tw-bg-opacity: 1 !important;
2340
+ background-color: rgb(var(--c-color-purple-50-900) / var(--tw-bg-opacity)) !important;
2341
+ opacity: 1;
2855
2342
  }
2856
- .c-rich-text-editor table.disable-selection span::selection {
2857
- background-color: transparent;
2343
+ .c-rte-toolbar__icon-btn__icon {
2344
+ height: 100%;
2345
+ width: 100%;
2346
+ border-width: 1px;
2347
+ background-size: 18px 18px;
2348
+ background-position: center;
2349
+ background-repeat: no-repeat;
2858
2350
  }
2859
- .c-rich-text-editor table.disable-selection br::selection {
2860
- background-color: transparent;
2351
+ .c-rte-toolbar__dd-item__icon {
2352
+ height: 1.5rem;
2353
+ width: 1.5rem;
2354
+ border-radius: 0.125rem;
2355
+ border-width: 1px;
2356
+ background-size: 16px 16px;
2357
+ background-position: center;
2358
+ background-repeat: no-repeat;
2359
+ opacity: 0.6;
2861
2360
  }
2862
- .c-rich-text-editor .table-cell-action-button-container {
2863
- position: absolute;
2864
- top: 0;
2865
- left: 0;
2866
- will-change: transform;
2361
+ .c-rte-toolbar__dd-item__icon.selected {
2362
+ --tw-bg-opacity: 1 !important;
2363
+ background-color: rgb(var(--c-color-purple-50-900) / var(--tw-bg-opacity)) !important;
2364
+ opacity: 1;
2867
2365
  }
2868
- .c-rich-text-editor .connecting {
2869
- font-size: 15px;
2870
- color: #999;
2871
- overflow: hidden;
2872
- position: absolute;
2873
- text-overflow: ellipsis;
2874
- top: 10px;
2875
- left: 10px;
2876
- user-select: none;
2877
- white-space: nowrap;
2878
- display: inline-block;
2879
- pointer-events: none;
2366
+ .c-rte-toolbar__dd-item__text {
2367
+ padding-left: 0.75rem;
2368
+ padding-right: 0.75rem;
2369
+ font-family:
2370
+ Roboto,
2371
+ ui-sans-serif,
2372
+ system-ui,
2373
+ -apple-system,
2374
+ BlinkMacSystemFont,
2375
+ "Segoe UI",
2376
+ Roboto,
2377
+ "Helvetica Neue",
2378
+ Arial,
2379
+ "Noto Sans",
2380
+ sans-serif,
2381
+ "Apple Color Emoji",
2382
+ "Segoe UI Emoji",
2383
+ "Segoe UI Symbol",
2384
+ "Noto Color Emoji";
2385
+ font-size: 0.875rem;
2386
+ line-height: 1.25rem;
2387
+ font-weight: 400;
2880
2388
  }
2881
- .c-rich-text-editor .ltr {
2882
- text-align: left;
2389
+ .c-rte-toolbar__dd-item__text.selected {
2390
+ font-weight: 500;
2883
2391
  }
2884
- .c-rich-text-editor .rtl {
2885
- text-align: right;
2392
+ .c-rte-toolbar__dd-item__text--clear {
2393
+ margin-left: 0.75rem;
2394
+ --tw-text-opacity: 1;
2395
+ color: rgb(var(--c-color-pink-600-300) / var(--tw-text-opacity));
2886
2396
  }
2887
- .c-rich-text-editor .toolbar {
2397
+ .c-rte-toolbar__dd-item--table {
2888
2398
  display: flex;
2889
- height: 3rem;
2399
+ align-items: center;
2400
+ font-family:
2401
+ Roboto,
2402
+ ui-sans-serif,
2403
+ system-ui,
2404
+ -apple-system,
2405
+ BlinkMacSystemFont,
2406
+ "Segoe UI",
2407
+ Roboto,
2408
+ "Helvetica Neue",
2409
+ Arial,
2410
+ "Noto Sans",
2411
+ sans-serif,
2412
+ "Apple Color Emoji",
2413
+ "Segoe UI Emoji",
2414
+ "Segoe UI Symbol",
2415
+ "Noto Color Emoji";
2416
+ font-weight: 400;
2417
+ }
2418
+ .c-rte-toolbar__plus {
2419
+ height: 100%;
2890
2420
  width: 100%;
2891
- justify-content: space-between;
2892
- overflow: auto;
2893
- border-top-left-radius: 0.375rem;
2894
- border-top-right-radius: 0.375rem;
2895
- padding-top: 0.25rem;
2896
- padding-bottom: 0.25rem;
2897
- padding-right: 0.5rem;
2898
- padding-left: 1rem;
2899
- vertical-align: middle;
2421
+ border-width: 1px;
2422
+ background-size: 20px 20px;
2423
+ background-position: center;
2424
+ background-repeat: no-repeat;
2900
2425
  }
2901
- .c-rich-text-editor .toolbar button.toolbar-item {
2902
- display: flex;
2903
- flex-shrink: 0;
2904
- cursor: pointer;
2426
+ .c-rte-insert-table {
2905
2427
  align-items: center;
2906
2428
  justify-content: space-between;
2907
- border-radius: 0.375rem;
2908
- border-width: 0px;
2909
- background-color: transparent;
2910
- padding: 0.5rem;
2911
- vertical-align: middle;
2912
2429
  }
2913
- .c-rich-text-editor .toolbar button.toolbar-item:disabled {
2914
- cursor: not-allowed;
2430
+ .c-rte-insert-table__dimensions {
2431
+ display: grid;
2432
+ grid-template-columns: 1fr 1px 1fr;
2433
+ border-radius: 0.375rem;
2434
+ border-width: 1px;
2435
+ border-style: solid;
2436
+ --tw-border-opacity: 1;
2437
+ border-color: rgb(var(--c-color-gray-100-800) / var(--tw-border-opacity));
2438
+ --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
2439
+ --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);
2440
+ box-shadow:
2441
+ var(--tw-ring-offset-shadow, 0 0 #0000),
2442
+ var(--tw-ring-shadow, 0 0 #0000),
2443
+ var(--tw-shadow);
2915
2444
  }
2916
- .c-rich-text-editor .toolbar button.toolbar-item.spaced {
2917
- margin-right: 0.125rem;
2445
+ .c-rte-insert-table__dimensions__separator {
2446
+ height: 100%;
2447
+ --tw-bg-opacity: 1;
2448
+ background-color: rgb(var(--c-color-gray-100-800) / var(--tw-bg-opacity));
2918
2449
  }
2919
- .c-rich-text-editor .toolbar button.toolbar-item i.format {
2920
- background-size: contain;
2921
- display: inline-block;
2922
- height: 18px;
2923
- width: 18px;
2924
- vertical-align: -0.25em;
2450
+ .c-rte-insert-table__actions {
2451
+ margin-top: 0.75rem;
2925
2452
  display: flex;
2926
- opacity: 0.6;
2927
- }
2928
- .c-rich-text-editor .toolbar button.toolbar-item:disabled .icon,
2929
- .c-rich-text-editor .toolbar button.toolbar-item:disabled .text,
2930
- .c-rich-text-editor .toolbar button.toolbar-item:disabled i.format,
2931
- .c-rich-text-editor .toolbar button.toolbar-item:disabled .chevron-down {
2932
- opacity: 0.2;
2453
+ justify-content: flex-end;
2933
2454
  }
2934
- .c-rich-text-editor .toolbar button.toolbar-item.active {
2935
- --tw-bg-opacity: 1;
2936
- background-color: rgb(var(--c-color-purple-50-900) / var(--tw-bg-opacity));
2455
+
2456
+ /* src/rich-text-editor/rich-text-editor.css */
2457
+ .c-rich-text-editor {
2458
+ margin: 0px auto;
2459
+ max-width: 1100px;
2460
+ position: relative;
2461
+ line-height: 1.7;
2462
+ --c-rte-min-height: 150px;
2937
2463
  }
2938
- .c-rich-text-editor .toolbar button.toolbar-item.active i {
2939
- opacity: 1;
2464
+ .c-rich-text-editor > * {
2465
+ box-sizing: border-box;
2940
2466
  }
2941
- .c-rich-text-editor .toolbar .toolbar-item:hover:not([disabled]) {
2942
- --tw-bg-opacity: 1;
2943
- background-color: rgb(var(--c-color-purple-50-900) / var(--tw-bg-opacity));
2467
+ .c-rich-text-editor {
2468
+ font-family:
2469
+ Roboto,
2470
+ ui-sans-serif,
2471
+ system-ui,
2472
+ -apple-system,
2473
+ BlinkMacSystemFont,
2474
+ "Segoe UI",
2475
+ Roboto,
2476
+ "Helvetica Neue",
2477
+ Arial,
2478
+ "Noto Sans",
2479
+ sans-serif,
2480
+ "Apple Color Emoji",
2481
+ "Segoe UI Emoji",
2482
+ "Segoe UI Symbol",
2483
+ "Noto Color Emoji" !important;
2484
+ font-weight: 400;
2485
+ --tw-text-opacity: 1;
2486
+ color: rgb(var(--c-color-gray-900-50) / var(--tw-text-opacity));
2944
2487
  }
2945
- .c-rich-text-editor .toolbar .toolbar-item.font-family .text {
2488
+ .c-rich-text-editor .c-rte-editor-scroller {
2489
+ min-height: var(--c-rte-min-height);
2490
+ border: 0;
2491
+ resize: none;
2492
+ cursor: text;
2946
2493
  display: block;
2947
- max-width: 40px;
2948
- }
2949
- .c-rich-text-editor .toolbar .code-language {
2950
- width: 150px;
2494
+ position: relative;
2495
+ outline: 0;
2496
+ resize: vertical;
2951
2497
  }
2952
- .c-rich-text-editor .toolbar .toolbar-item .text {
2953
- display: flex;
2954
- line-height: 20px;
2955
- vertical-align: middle;
2956
- font-size: 14px;
2957
- color: #777;
2958
- text-overflow: ellipsis;
2959
- overflow: hidden;
2960
- height: 20px;
2961
- text-align: left;
2962
- padding-right: 10px;
2498
+ .c-rich-text-editor .c-rte-editor-container {
2499
+ background: #fff;
2500
+ position: relative;
2501
+ margin-top: 0.5rem;
2502
+ cursor: text;
2503
+ border-bottom-left-radius: 0.375rem;
2504
+ border-bottom-right-radius: 0.375rem;
2963
2505
  }
2964
- .c-rich-text-editor .toolbar .toolbar-item .icon {
2965
- display: flex;
2966
- width: 20px;
2967
- height: 20px;
2968
- user-select: none;
2969
- margin-right: 8px;
2970
- line-height: 16px;
2971
- background-size: contain;
2506
+ .c-rich-text-editor .c-rte-editor {
2507
+ position: relative;
2972
2508
  }
2973
- .c-rich-text-editor .toolbar i.chevron-down {
2974
- margin-top: 3px;
2975
- width: 16px;
2976
- height: 16px;
2977
- display: flex;
2978
- user-select: none;
2509
+ .c-rich-text-editor .c-rte-table-action-dropdown {
2510
+ display: absolute;
2511
+ right: 2px;
2512
+ top: 2px;
2979
2513
  }
2980
- .c-rich-text-editor .toolbar i.chevron-down.inside {
2981
- width: 16px;
2982
- height: 16px;
2983
- display: flex;
2984
- margin-left: -25px;
2985
- margin-top: 11px;
2986
- margin-right: 10px;
2987
- pointer-events: none;
2514
+ .c-rich-text-editor .c-rte-contenteditable-root {
2515
+ position: relative;
2516
+ display: block;
2517
+ border-width: 0px;
2518
+ padding-left: 1.5rem;
2519
+ padding-right: 1.5rem;
2520
+ padding-top: 0.5rem;
2521
+ padding-bottom: 0.5rem;
2522
+ padding-top: 0px !important;
2523
+ font-size: 0.875rem;
2524
+ line-height: 1.25rem;
2525
+ outline-width: 0px;
2526
+ tab-size: 1;
2527
+ padding-bottom: 8px;
2528
+ min-height: calc(var(--c-rte-min-height) - 8px);
2988
2529
  }
2989
- .c-rich-text-editor .toolbar .divider {
2990
- width: 1px;
2991
- background-color: #eee;
2992
- margin: 0 4px;
2530
+ .c-rich-text-editor pre {
2531
+ line-height: 1.1;
2532
+ color: #fff;
2533
+ margin: 0;
2534
+ padding: 10px;
2535
+ overflow: auto;
2536
+ max-height: 180px;
2537
+ --tw-bg-opacity: 1;
2538
+ background-color: rgb(var(--c-color-purple-50-900) / var(--tw-bg-opacity));
2539
+ font-size: 0.875rem;
2540
+ line-height: 1.25rem;
2993
2541
  }
2994
- .c-rich-text-editor .github-corner:hover .octo-arm {
2995
- animation: octocat-wave 560ms ease-in-out;
2542
+ .c-rich-text-editor pre::-webkit-scrollbar {
2543
+ background: transparent;
2544
+ width: 10px;
2996
2545
  }
2997
- @keyframes octocat-wave {
2998
- 0%, 100% {
2999
- transform: rotate(0);
3000
- }
3001
- 20%, 60% {
3002
- transform: rotate(-25deg);
3003
- }
3004
- 40%, 80% {
3005
- transform: rotate(10deg);
3006
- }
2546
+ .c-rich-text-editor pre::-webkit-scrollbar-thumb {
2547
+ background: #999;
3007
2548
  }
3008
- @media (max-width: 500px) {
3009
- .c-rich-text-editor .github-corner:hover .octo-arm {
3010
- animation: none;
3011
- }
3012
- .c-rich-text-editor .github-corner .octo-arm {
3013
- animation: octocat-wave 560ms ease-in-out;
3014
- }
2549
+ .c-rich-text-editor [role=separator] {
2550
+ height: 1px;
2551
+ --tw-bg-opacity: 1;
2552
+ background-color: rgb(var(--c-color-gray-200-700) / var(--tw-bg-opacity));
3015
2553
  }
3016
- .c-rich-text-editor .spacer {
3017
- letter-spacing: -2px;
2554
+ .c-rich-text-editor .ltr {
2555
+ text-align: left;
2556
+ }
2557
+ .c-rich-text-editor .rtl {
2558
+ text-align: right;
3018
2559
  }
3019
2560
  .c-rich-text-editor button.item i {
3020
2561
  opacity: 0.6;
@@ -3045,21 +2586,6 @@ button {
3045
2586
  outline: 2px solid rgb(60, 132, 244);
3046
2587
  user-select: none;
3047
2588
  }
3048
- .c-rich-text-editor .ContentEditable__root {
3049
- tab-size: 1;
3050
- min-height: calc(100% - 16px);
3051
- position: relative;
3052
- display: block;
3053
- border-width: 0px;
3054
- padding-left: 1.5rem;
3055
- padding-right: 1.5rem;
3056
- padding-top: 0.5rem;
3057
- padding-bottom: 0.5rem;
3058
- padding-top: 0px !important;
3059
- font-size: 0.875rem;
3060
- line-height: 1.25rem;
3061
- outline-width: 0px;
3062
- }
3063
2589
  .c-rich-text-editor .TableNode__contentEditable {
3064
2590
  min-height: 20px;
3065
2591
  border: 0px;
@@ -3095,77 +2621,31 @@ button {
3095
2621
  border-top: 1px solid black;
3096
2622
  animation: CursorBlink 1.1s steps(2, start) infinite;
3097
2623
  }
2624
+ .c-rich-text-editor .c-rte-placeholder {
2625
+ pointer-events: none;
2626
+ position: absolute;
2627
+ left: 1.5rem;
2628
+ right: 2.5rem;
2629
+ top: 0px;
2630
+ display: inline-block;
2631
+ user-select: none;
2632
+ overflow: hidden;
2633
+ text-overflow: ellipsis;
2634
+ white-space: nowrap;
2635
+ font-size: 14px;
2636
+ font-weight: 400;
2637
+ font-style: italic;
2638
+ --tw-text-opacity: 1;
2639
+ color: rgb(var(--c-color-gray-300-600) / var(--tw-text-opacity));
2640
+ }
3098
2641
  @keyframes CursorBlink {
3099
2642
  to {
3100
2643
  visibility: hidden;
3101
2644
  }
3102
2645
  }
3103
- .c-rte-table-action-dropdown {
3104
- display: absolute;
3105
- right: 2px;
3106
- top: 2px;
3107
- }
3108
-
3109
- /* src/rich-text-editor/plugins/CodeActionMenuPlugin/index.css */
3110
- .code-action-menu-container {
3111
- height: 35.8px;
3112
- font-size: 10px;
3113
- color: rgba(0, 0, 0, 0.5);
3114
- position: absolute;
3115
- display: flex;
3116
- align-items: center;
3117
- flex-direction: row;
3118
- user-select: none;
3119
- }
3120
- .code-action-menu-container .code-highlight-language {
3121
- margin-right: 4px;
3122
- }
3123
- .code-action-menu-container button.menu-item {
3124
- border: 1px solid transparent;
3125
- border-radius: 4px;
3126
- padding: 4px;
3127
- background: none;
3128
- cursor: pointer;
3129
- flex-shrink: 0;
3130
- display: flex;
3131
- align-items: center;
3132
- color: rgba(0, 0, 0, 0.5);
3133
- text-transform: uppercase;
3134
- }
3135
- .code-action-menu-container button.menu-item i.format {
3136
- height: 16px;
3137
- width: 16px;
3138
- opacity: 0.6;
3139
- display: flex;
3140
- color: rgba(0, 0, 0, 0.5);
3141
- background-size: contain;
3142
- }
3143
- .code-action-menu-container button.menu-item:hover {
3144
- border: 1px solid rgba(0, 0, 0, 0.3);
3145
- opacity: 0.9;
3146
- }
3147
- .code-action-menu-container button.menu-item:active {
3148
- background-color: rgba(223, 232, 250);
3149
- border: 1px solid rgba(0, 0, 0, 0.45);
3150
- }
3151
-
3152
- /* src/rich-text-editor/plugins/CodeActionMenuPlugin/components/PrettierButton/index.css */
3153
- .code-action-menu-container .prettier-wrapper {
3154
- position: relative;
3155
- }
3156
- .code-action-menu-container .prettier-wrapper .code-error-tips {
3157
- padding: 5px;
3158
- border-radius: 4px;
3159
- color: #fff;
3160
- background: #222;
3161
- margin-top: 4px;
3162
- position: absolute;
3163
- top: 26px;
3164
- right: 0;
3165
- }
3166
2646
 
3167
2647
  /* src/rich-text-editor/plugins/FloatingLinkEditorPlugin/index.css */
3168
- .link-editor {
2648
+ .c-rte-link-editor {
3169
2649
  position: absolute;
3170
2650
  top: 0;
3171
2651
  left: 0;
@@ -3178,33 +2658,89 @@ button {
3178
2658
  border-radius: 8px;
3179
2659
  transition: opacity 0.5s;
3180
2660
  will-change: transform;
2661
+ border-radius: 0.5rem !important;
2662
+ border-width: 1px;
2663
+ border-style: solid;
2664
+ --tw-border-opacity: 1;
2665
+ border-color: rgb(var(--c-color-gray-100-800) / var(--tw-border-opacity));
2666
+ --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1) !important;
2667
+ --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color) !important;
2668
+ box-shadow:
2669
+ var(--tw-ring-offset-shadow, 0 0 #0000),
2670
+ var(--tw-ring-shadow, 0 0 #0000),
2671
+ var(--tw-shadow) !important;
3181
2672
  }
3182
- .link-editor .button {
3183
- width: 20px;
3184
- height: 20px;
3185
- display: inline-block;
3186
- padding: 6px;
3187
- border-radius: 8px;
3188
- cursor: pointer;
3189
- margin: 0 2px;
2673
+ .c-rte-link-editor-link-input {
2674
+ margin-top: 0.5rem;
2675
+ margin-bottom: 0.5rem;
2676
+ display: flex;
2677
+ max-width: 100%;
2678
+ flex-wrap: nowrap;
2679
+ align-items: center;
2680
+ justify-content: space-between;
2681
+ gap: 1rem;
2682
+ border-color: rgb(var(--c-color-gray));
2683
+ padding-left: 1.5rem;
2684
+ padding-right: 1.5rem;
2685
+ padding-top: 0.5rem;
2686
+ padding-bottom: 0.5rem;
2687
+ font-size: 0.875rem;
2688
+ line-height: 1.25rem;
2689
+ --tw-text-opacity: 1;
2690
+ color: rgb(var(--c-color-s-blue-600-300) / var(--tw-text-opacity));
3190
2691
  }
3191
- .link-editor .button.hovered {
3192
- width: 20px;
3193
- height: 20px;
3194
- display: inline-block;
3195
- background-color: #eee;
2692
+ .c-rte-link-editor-link-input a {
2693
+ display: block;
2694
+ overflow: hidden;
2695
+ text-overflow: ellipsis;
2696
+ white-space: nowrap;
2697
+ --tw-text-opacity: 1;
2698
+ color: rgb(var(--c-color-s-blue-600-300) / var(--tw-text-opacity));
2699
+ text-decoration-line: none;
3196
2700
  }
3197
- .link-editor .button i,
3198
- .actions i {
3199
- background-size: contain;
3200
- display: inline-block;
3201
- height: 20px;
3202
- width: 20px;
3203
- vertical-align: -0.25em;
2701
+ .c-rte-link-editor-link-input a:hover {
2702
+ text-decoration-line: underline;
3204
2703
  }
3205
-
3206
- /* src/rich-text-editor/ui/LinkPreview.css */
3207
- @keyframes glimmer-animation {
2704
+ .c-rte-link-editor-link-preview {
2705
+ text-overflow: ellipsis;
2706
+ white-space: nowrap;
2707
+ overflow: hidden;
2708
+ }
2709
+ .c-rte-link-editor-input-group {
2710
+ border-width: 0px;
2711
+ border-bottom-width: 1px;
2712
+ border-style: solid;
2713
+ --tw-border-opacity: 1;
2714
+ border-color: rgb(var(--c-color-gray-100-800) / var(--tw-border-opacity));
2715
+ padding-left: 0.75rem;
2716
+ padding-right: 0.75rem;
2717
+ }
2718
+ .c-rte-link-editor-button-wrap {
2719
+ display: flex;
2720
+ justify-content: flex-end;
2721
+ padding-left: 1.5rem;
2722
+ padding-right: 1.5rem;
2723
+ padding-top: 0.5rem;
2724
+ padding-bottom: 0.5rem;
2725
+ }
2726
+ .c-rte-link-editor-preview-attrs {
2727
+ margin-top: 0.25rem;
2728
+ display: flex;
2729
+ gap: 0.25rem;
2730
+ }
2731
+ .c-rte-link-editor-preview-attr {
2732
+ border-radius: 0.375rem;
2733
+ --tw-bg-opacity: 1;
2734
+ background-color: rgb(var(--c-color-purple-50-900) / var(--tw-bg-opacity));
2735
+ padding-left: 0.25rem;
2736
+ padding-right: 0.25rem;
2737
+ padding-top: 0.125rem;
2738
+ padding-bottom: 0.125rem;
2739
+ font-size: 10px;
2740
+ --tw-text-opacity: 1;
2741
+ color: rgb(var(--c-color-gray-600-300) / var(--tw-text-opacity));
2742
+ }
2743
+ @keyframes c-rte-glimmer-animation {
3208
2744
  0% {
3209
2745
  background: #f9f9f9;
3210
2746
  }
@@ -3215,51 +2751,37 @@ button {
3215
2751
  background: #f9f9f9;
3216
2752
  }
3217
2753
  }
3218
- .LinkPreview__container {
2754
+ .c-rte-link-preview {
3219
2755
  }
3220
- .LinkPreview__imageWrapper {
2756
+ .c-rte-link-preview-image-wrapper {
2757
+ --tw-bg-opacity: 1;
2758
+ background-color: rgb(var(--c-color-purple-50-900) / var(--tw-bg-opacity));
3221
2759
  text-align: center;
3222
2760
  }
3223
- .LinkPreview__image {
2761
+ .c-rte-link-preview-image {
3224
2762
  margin: auto;
2763
+ display: block;
3225
2764
  max-height: 250px;
3226
2765
  max-width: 100%;
3227
2766
  }
3228
- .LinkPreview__title {
2767
+ .c-rte-link-preview-title {
3229
2768
  margin-left: 1.5rem;
3230
2769
  margin-right: 1.5rem;
3231
- margin-top: 0.5rem;
3232
- font-family:
3233
- "Roboto Slab",
3234
- ui-serif,
3235
- Georgia,
3236
- Cambria,
3237
- "Times New Roman",
3238
- Times,
3239
- serif;
2770
+ margin-top: 1rem;
3240
2771
  font-weight: 600;
3241
2772
  line-height: 1.25rem;
3242
2773
  --tw-text-opacity: 1;
3243
2774
  color: rgb(var(--c-color-gray-700-200) / var(--tw-text-opacity));
3244
2775
  }
3245
- .LinkPreview__description {
2776
+ .c-rte-link-preview-description {
3246
2777
  margin-left: 1.5rem;
3247
2778
  margin-right: 1.5rem;
3248
- margin-top: 0.5rem;
3249
2779
  margin-bottom: 1rem;
3250
- font-size: 0.875rem;
3251
- line-height: 1.25rem;
3252
- }
3253
- .LinkPreview__domain {
3254
- margin-left: 1.5rem;
3255
- margin-right: 1.5rem;
3256
2780
  margin-top: 0.5rem;
3257
2781
  font-size: 0.875rem;
3258
2782
  line-height: 1.25rem;
3259
- --tw-text-opacity: 1;
3260
- color: rgb(var(--c-color-gray-700-200) / var(--tw-text-opacity));
3261
2783
  }
3262
- .LinkPreview__glimmer {
2784
+ .c-rte-link-preview-glimmer {
3263
2785
  background: #f9f9f9;
3264
2786
  border-radius: 8px;
3265
2787
  height: 18px;
@@ -3269,11 +2791,15 @@ button {
3269
2791
  animation-duration: 3s;
3270
2792
  animation-iteration-count: infinite;
3271
2793
  animation-timing-function: linear;
3272
- animation-name: glimmer-animation;
2794
+ animation-name: c-rte-glimmer-animation;
2795
+ }
2796
+ .c-rte-link-preview__replace-text-btn {
2797
+ margin-bottom: 1rem;
2798
+ margin-left: 1.25rem;
3273
2799
  }
3274
2800
 
3275
2801
  /* src/rich-text-editor/plugins/FloatingTextFormatToolbarPlugin/index.css */
3276
- .c-floating-text-format-popup {
2802
+ .c-rte-floating-text-format-tb-plugin {
3277
2803
  vertical-align: middle;
3278
2804
  background-color: #fff;
3279
2805
  transition: opacity 0.5s;
@@ -3285,6 +2811,7 @@ button {
3285
2811
  top: 0px;
3286
2812
  z-index: 10;
3287
2813
  display: flex;
2814
+ gap: 0.125rem;
3288
2815
  border-radius: 0.375rem;
3289
2816
  --tw-bg-opacity: 1;
3290
2817
  background-color: rgb(var(--c-color-elevate) / var(--tw-bg-opacity));
@@ -3297,6 +2824,19 @@ button {
3297
2824
  var(--tw-ring-shadow, 0 0 #0000),
3298
2825
  var(--tw-shadow);
3299
2826
  }
2827
+ .c-rte-floating-text-format-tb-plugin__format-icon {
2828
+ height: 100%;
2829
+ width: 100%;
2830
+ background-size: 18px 18px;
2831
+ background-position: center;
2832
+ background-repeat: no-repeat;
2833
+ opacity: 0.6;
2834
+ }
2835
+ .c-rte-floating-text-format-tb-plugin__format-icon.selected {
2836
+ --tw-bg-opacity: 1;
2837
+ background-color: rgb(var(--c-color-purple-50-900) / var(--tw-bg-opacity));
2838
+ opacity: 1;
2839
+ }
3300
2840
  .c-floating-text-format-popup button.popup-item {
3301
2841
  border: 0;
3302
2842
  display: flex;