@crystallize/design-system 1.6.1 → 1.8.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 (51) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/index.css +53 -332
  3. package/dist/index.d.ts +15 -8
  4. package/dist/index.js +1736 -4555
  5. package/dist/index.mjs +1655 -2339
  6. package/package.json +1 -1
  7. package/src/action-menu/action-item-separator.tsx +14 -0
  8. package/src/action-menu/action-item.tsx +2 -2
  9. package/src/action-menu/action-menu.css +8 -0
  10. package/src/action-menu/action-menu.tsx +2 -1
  11. package/src/dropdown-menu/dropdown-menu-root.tsx +3 -1
  12. package/src/dropdown-menu/index.ts +5 -2
  13. package/src/iconography/subscription-contracts.tsx +4 -4
  14. package/src/iconography/subscription-plans.tsx +5 -5
  15. package/src/rich-text-editor/model/crystallize-to-lexical.ts +12 -1
  16. package/src/rich-text-editor/model/lexical-to-crystallize.ts +38 -38
  17. package/src/rich-text-editor/nodes/BaseNodes.ts +0 -7
  18. package/src/rich-text-editor/nodes/TableCellNodes.ts +0 -7
  19. package/src/rich-text-editor/plugins/ActionsPlugin/index.tsx +13 -2
  20. package/src/rich-text-editor/plugins/CodeActionMenuPlugin/components/CopyButton/index.tsx +3 -2
  21. package/src/rich-text-editor/plugins/CodeActionMenuPlugin/components/PrettierButton/index.tsx +0 -1
  22. package/src/rich-text-editor/plugins/FloatingTextFormatToolbarPlugin/index.css +17 -17
  23. package/src/rich-text-editor/plugins/FloatingTextFormatToolbarPlugin/index.tsx +1 -1
  24. package/src/rich-text-editor/plugins/MaxLengthPlugin/index.tsx +2 -7
  25. package/src/rich-text-editor/plugins/TableActionMenuPlugin/index.tsx +80 -149
  26. package/src/rich-text-editor/plugins/ToolbarPlugin/index.tsx +2 -2
  27. package/src/rich-text-editor/plugins/ToolbarPlugin/insert-table.tsx +55 -0
  28. package/src/rich-text-editor/rich-text-editor.css +10 -322
  29. package/src/rich-text-editor/rich-text-editor.stories.tsx +35 -5
  30. package/src/rich-text-editor/rich-text-editor.tsx +6 -39
  31. package/src/rich-text-editor/tests/rich-text-editor-code.test.tsx +10 -6
  32. package/src/rich-text-editor/tests/rich-text-editor-model-conversions.test.tsx +19 -7
  33. package/src/rich-text-editor/themes/CrystallizeRTEditorTheme.css +3 -11
  34. package/dist/TableComponent-I2YOOYOU.css +0 -281
  35. package/dist/TableComponent-QINOO453.mjs +0 -1377
  36. package/dist/chevron-down-3FRWSIKS.svg +0 -1
  37. package/dist/chunk-VUXQZRSP.mjs +0 -737
  38. package/dist/markdown-4BGQNLLT.svg +0 -1
  39. package/src/rich-text-editor/nodes/KeywordNode.ts +0 -73
  40. package/src/rich-text-editor/nodes/TableComponent.tsx +0 -1547
  41. package/src/rich-text-editor/nodes/TableNode.tsx +0 -398
  42. package/src/rich-text-editor/plugins/ComponentPickerPlugin/index.tsx +0 -320
  43. package/src/rich-text-editor/plugins/DragDropPastePlugin/index.ts +0 -40
  44. package/src/rich-text-editor/plugins/MarkdownShortcutPlugin/index.tsx +0 -16
  45. package/src/rich-text-editor/plugins/MarkdownTransformers/index.ts +0 -195
  46. package/src/rich-text-editor/plugins/SpeechToTextPlugin/index.ts +0 -113
  47. package/src/rich-text-editor/plugins/TableCellResizer/index.css +0 -12
  48. package/src/rich-text-editor/plugins/TableCellResizer/index.tsx +0 -386
  49. package/src/rich-text-editor/plugins/TablePlugin.tsx +0 -190
  50. package/src/rich-text-editor/plugins/TreeViewPlugin/index.tsx +0 -25
  51. package/src/rich-text-editor/plugins/TypingPerfPlugin/index.ts +0 -117
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @crystallize/design-system
2
2
 
3
+ ## 1.8.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 8cce8d3: Ensure that the JSON model conforms to the old editor behaviour, and wraps all code block nodes with a `preformatted` parent.
8
+ - a13e96ec: Fixed the table implementation.
9
+
10
+ ## 1.7.0
11
+
12
+ ### Minor Changes
13
+
14
+ - 6739bf9: Added "Copy JSON" action menu option. This will copy the JSON AST to the clipboard.
15
+
3
16
  ## 1.6.1
4
17
 
5
18
  ### Patch Changes
package/dist/index.css CHANGED
@@ -533,9 +533,6 @@ button {
533
533
  .pointer-events-none {
534
534
  pointer-events: none;
535
535
  }
536
- .static {
537
- position: static;
538
- }
539
536
  .absolute {
540
537
  position: absolute;
541
538
  }
@@ -571,10 +568,6 @@ button {
571
568
  margin-left: auto;
572
569
  margin-right: auto;
573
570
  }
574
- .my-1 {
575
- margin-top: 0.25rem;
576
- margin-bottom: 0.25rem;
577
- }
578
571
  .mt-8 {
579
572
  margin-top: 2rem;
580
573
  }
@@ -584,9 +577,6 @@ button {
584
577
  .mt-2 {
585
578
  margin-top: 0.5rem;
586
579
  }
587
- .mt-3 {
588
- margin-top: 0.75rem;
589
- }
590
580
  .mb-4 {
591
581
  margin-bottom: 1rem;
592
582
  }
@@ -596,6 +586,9 @@ button {
596
586
  .mt-1 {
597
587
  margin-top: 0.25rem;
598
588
  }
589
+ .mt-3 {
590
+ margin-top: 0.75rem;
591
+ }
599
592
  .block {
600
593
  display: block;
601
594
  }
@@ -795,12 +788,12 @@ button {
795
788
  .rounded-sm {
796
789
  border-radius: 0.125rem;
797
790
  }
798
- .border {
799
- border-width: 1px;
800
- }
801
791
  .border-0 {
802
792
  border-width: 0px;
803
793
  }
794
+ .border {
795
+ border-width: 1px;
796
+ }
804
797
  .border-b {
805
798
  border-bottom-width: 1px;
806
799
  }
@@ -822,10 +815,6 @@ button {
822
815
  --tw-bg-opacity: 1;
823
816
  background-color: rgb(255 255 255 / var(--tw-bg-opacity));
824
817
  }
825
- .bg-gray-100-800 {
826
- --tw-bg-opacity: 1;
827
- background-color: rgb(var(--c-color-gray-100-800) / var(--tw-bg-opacity));
828
- }
829
818
  .bg-purple-50-900 {
830
819
  --tw-bg-opacity: 1;
831
820
  background-color: rgb(var(--c-color-purple-50-900) / var(--tw-bg-opacity));
@@ -834,6 +823,10 @@ button {
834
823
  --tw-bg-opacity: 1 !important;
835
824
  background-color: rgb(var(--c-color-purple-50-900) / var(--tw-bg-opacity)) !important;
836
825
  }
826
+ .bg-gray-100-800 {
827
+ --tw-bg-opacity: 1;
828
+ background-color: rgb(var(--c-color-gray-100-800) / var(--tw-bg-opacity));
829
+ }
837
830
  .bg-\[length\:18px_18px\] {
838
831
  background-size: 18px 18px;
839
832
  }
@@ -1312,6 +1305,19 @@ button {
1312
1305
  --tw-text-opacity: 1;
1313
1306
  color: rgb(var(--c-color-pink-600-300) / var(--tw-text-opacity));
1314
1307
  }
1308
+ .c-action-menu-item-separator {
1309
+ margin: 0px;
1310
+ height: 1px;
1311
+ cursor: default;
1312
+ padding: 0px;
1313
+ }
1314
+ .c-action-menu-item-separator hr {
1315
+ height: 1px;
1316
+ width: 100%;
1317
+ --tw-bg-opacity: 1;
1318
+ background-color: rgb(var(--c-color-gray-700-200) / var(--tw-bg-opacity));
1319
+ padding: 0px;
1320
+ }
1315
1321
 
1316
1322
  /* src/dropdown-menu/dropdown-menu.css */
1317
1323
  .c-dropdown-menu-content {
@@ -2181,54 +2187,6 @@ button {
2181
2187
  .c-rich-text-editor .editor-image .image-caption-button:hover {
2182
2188
  background-color: rgba(60, 132, 244, 0.5);
2183
2189
  }
2184
- .c-rich-text-editor .editor-image .image-resizer {
2185
- display: block;
2186
- width: 7px;
2187
- height: 7px;
2188
- position: absolute;
2189
- background-color: rgb(60, 132, 244);
2190
- border: 1px solid #fff;
2191
- }
2192
- .c-rich-text-editor .editor-image .image-resizer.image-resizer-n {
2193
- top: -6px;
2194
- left: 48%;
2195
- cursor: n-resize;
2196
- }
2197
- .c-rich-text-editor .editor-image .image-resizer.image-resizer-ne {
2198
- top: -6px;
2199
- right: -6px;
2200
- cursor: ne-resize;
2201
- }
2202
- .c-rich-text-editor .editor-image .image-resizer.image-resizer-e {
2203
- bottom: 48%;
2204
- right: -6px;
2205
- cursor: e-resize;
2206
- }
2207
- .c-rich-text-editor .editor-image .image-resizer.image-resizer-se {
2208
- bottom: -2px;
2209
- right: -6px;
2210
- cursor: nwse-resize;
2211
- }
2212
- .c-rich-text-editor .editor-image .image-resizer.image-resizer-s {
2213
- bottom: -2px;
2214
- left: 48%;
2215
- cursor: s-resize;
2216
- }
2217
- .c-rich-text-editor .editor-image .image-resizer.image-resizer-sw {
2218
- bottom: -2px;
2219
- left: -6px;
2220
- cursor: sw-resize;
2221
- }
2222
- .c-rich-text-editor .editor-image .image-resizer.image-resizer-w {
2223
- bottom: 48%;
2224
- left: -6px;
2225
- cursor: w-resize;
2226
- }
2227
- .c-rich-text-editor .editor-image .image-resizer.image-resizer-nw {
2228
- top: -6px;
2229
- left: -6px;
2230
- cursor: nw-resize;
2231
- }
2232
2190
  .c-rich-text-editor .editor-scroller {
2233
2191
  min-height: 150px;
2234
2192
  border: 0;
@@ -2531,9 +2489,6 @@ button {
2531
2489
  .c-rich-text-editor i.indent {
2532
2490
  background-image: url(./indent-MJ6JIMCK.svg);
2533
2491
  }
2534
- .c-rich-text-editor i.markdown {
2535
- background-image: url(./markdown-4BGQNLLT.svg);
2536
- }
2537
2492
  .c-rich-text-editor i.outdent {
2538
2493
  background-image: url(./outdent-2LUMUMIP.svg);
2539
2494
  }
@@ -2723,89 +2678,6 @@ button {
2723
2678
  .c-rich-text-editor .characters-limit.characters-limit-exceeded {
2724
2679
  color: red;
2725
2680
  }
2726
- .c-rich-text-editor .dropdown {
2727
- z-index: 10;
2728
- display: block;
2729
- position: fixed;
2730
- box-shadow:
2731
- 0 12px 28px 0 rgba(0, 0, 0, 0.2),
2732
- 0 2px 4px 0 rgba(0, 0, 0, 0.1),
2733
- inset 0 0 0 1px rgba(255, 255, 255, 0.5);
2734
- border-radius: 8px;
2735
- min-height: 40px;
2736
- background-color: #fff;
2737
- }
2738
- .c-rich-text-editor .dropdown .item {
2739
- margin: 0 8px 0 8px;
2740
- padding: 8px;
2741
- color: #050505;
2742
- cursor: pointer;
2743
- line-height: 16px;
2744
- font-size: 15px;
2745
- display: flex;
2746
- align-content: center;
2747
- flex-direction: row;
2748
- flex-shrink: 0;
2749
- justify-content: space-between;
2750
- background-color: #fff;
2751
- border-radius: 8px;
2752
- border: 0;
2753
- max-width: 250px;
2754
- min-width: 100px;
2755
- }
2756
- .c-rich-text-editor .dropdown .item.fontsize-item,
2757
- .c-rich-text-editor .dropdown .item.fontsize-item .text {
2758
- min-width: unset;
2759
- }
2760
- .c-rich-text-editor .dropdown .item .active {
2761
- display: flex;
2762
- width: 20px;
2763
- height: 20px;
2764
- background-size: contain;
2765
- }
2766
- .c-rich-text-editor .dropdown .item:first-child {
2767
- margin-top: 8px;
2768
- }
2769
- .c-rich-text-editor .dropdown .item:last-child {
2770
- margin-bottom: 8px;
2771
- }
2772
- .c-rich-text-editor .dropdown .item:hover {
2773
- background-color: #eee;
2774
- }
2775
- .c-rich-text-editor .dropdown .item .text {
2776
- display: flex;
2777
- line-height: 20px;
2778
- flex-grow: 1;
2779
- min-width: 150px;
2780
- }
2781
- .c-rich-text-editor .dropdown .item .icon {
2782
- display: flex;
2783
- width: 20px;
2784
- height: 20px;
2785
- user-select: none;
2786
- margin-right: 12px;
2787
- line-height: 16px;
2788
- background-size: contain;
2789
- background-position: center;
2790
- background-repeat: no-repeat;
2791
- }
2792
- .c-rich-text-editor .dropdown .divider {
2793
- width: auto;
2794
- background-color: #eee;
2795
- margin: 4px 8px;
2796
- height: 1px;
2797
- }
2798
- @media screen and (max-width: 1100px) {
2799
- .c-rich-text-editor .dropdown-button-text {
2800
- display: none !important;
2801
- }
2802
- .c-rich-text-editor .font-size .dropdown-button-text {
2803
- display: flex !important;
2804
- }
2805
- .c-rich-text-editor .code-language .dropdown-button-text {
2806
- display: flex !important;
2807
- }
2808
- }
2809
2681
  .c-rich-text-editor .icon.paragraph {
2810
2682
  background-image: url(./text-paragraph-MFTUIIQG.svg);
2811
2683
  }
@@ -2862,65 +2734,10 @@ button {
2862
2734
  transform: translateX(0);
2863
2735
  }
2864
2736
  }
2865
- .c-rich-text-editor .switch {
2866
- display: block;
2867
- color: #444;
2868
- margin: 5px 0;
2869
- background-color: rgba(238, 238, 238, 0.7);
2870
- padding: 5px 10px;
2871
- border-radius: 10px;
2872
- }
2873
- .c-rich-text-editor #rich-text-switch {
2874
- right: 0;
2875
- }
2876
- .c-rich-text-editor #character-count-switch {
2877
- right: 130px;
2878
- }
2879
- .c-rich-text-editor .switch label {
2880
- margin-right: 5px;
2881
- line-height: 24px;
2882
- width: 100px;
2883
- font-size: 14px;
2884
- display: inline-block;
2885
- vertical-align: middle;
2886
- }
2887
- .c-rich-text-editor .switch button {
2888
- background-color: rgb(206, 208, 212);
2889
- height: 24px;
2890
- box-sizing: border-box;
2891
- border-radius: 12px;
2892
- width: 44px;
2893
- display: inline-block;
2894
- vertical-align: middle;
2895
- position: relative;
2896
- outline: none;
2897
- cursor: pointer;
2898
- transition: background-color 0.1s;
2899
- border: 2px solid transparent;
2900
- }
2901
- .c-rich-text-editor .switch button:focus-visible {
2902
- border-color: blue;
2903
- }
2904
- .c-rich-text-editor .switch button span {
2905
- top: 0px;
2906
- left: 0px;
2907
- display: block;
2908
- position: absolute;
2909
- width: 20px;
2910
- height: 20px;
2911
- border-radius: 12px;
2912
- background-color: white;
2913
- transition: transform 0.2s;
2914
- }
2915
- .c-rich-text-editor .switch button[aria-checked=true] {
2916
- background-color: rgb(24, 119, 242);
2917
- }
2918
- .c-rich-text-editor .switch button[aria-checked=true] span {
2919
- transform: translateX(20px);
2920
- }
2921
- .c-rich-text-editor .keyword {
2922
- color: rgb(241, 118, 94);
2923
- font-weight: bold;
2737
+ .c-rich-text-editor [role=separator] {
2738
+ height: 1px;
2739
+ --tw-bg-opacity: 1;
2740
+ background-color: rgb(var(--c-color-gray-200-700) / var(--tw-bg-opacity));
2924
2741
  }
2925
2742
  .c-rich-text-editor .actions i.indent {
2926
2743
  background-image: url(./indent-MJ6JIMCK.svg);
@@ -2978,94 +2795,6 @@ button {
2978
2795
  left: 0;
2979
2796
  will-change: transform;
2980
2797
  }
2981
- .c-rich-text-editor .table-cell-action-button {
2982
- background-color: none;
2983
- display: flex;
2984
- justify-content: center;
2985
- align-items: center;
2986
- border: 0;
2987
- position: relative;
2988
- border-radius: 15px;
2989
- color: #222;
2990
- display: inline-block;
2991
- cursor: pointer;
2992
- }
2993
- .c-rich-text-editor i.chevron-down {
2994
- background-color: transparent;
2995
- background-size: contain;
2996
- display: inline-block;
2997
- height: 8px;
2998
- width: 8px;
2999
- background-image: url(./chevron-down-3FRWSIKS.svg);
3000
- }
3001
- .c-rich-text-editor .action-button {
3002
- background-color: #eee;
3003
- border: 0;
3004
- padding: 8px 12px;
3005
- position: relative;
3006
- margin-left: 5px;
3007
- border-radius: 15px;
3008
- color: #222;
3009
- display: inline-block;
3010
- cursor: pointer;
3011
- }
3012
- .c-rich-text-editor .action-button:hover {
3013
- background-color: #ddd;
3014
- color: #000;
3015
- }
3016
- .c-rich-text-editor .action-button-mic.active {
3017
- animation: mic-pulsate-color 3s infinite;
3018
- }
3019
- .c-rich-text-editor button.action-button:disabled {
3020
- opacity: 0.6;
3021
- background: #eee;
3022
- cursor: not-allowed;
3023
- }
3024
- @keyframes mic-pulsate-color {
3025
- 0% {
3026
- background-color: #ffdcdc;
3027
- }
3028
- 50% {
3029
- background-color: #ff8585;
3030
- }
3031
- 100% {
3032
- background-color: #ffdcdc;
3033
- }
3034
- }
3035
- .c-rich-text-editor .debug-timetravel-panel {
3036
- overflow: hidden;
3037
- padding: 0 0 10px 0;
3038
- margin: auto;
3039
- display: flex;
3040
- }
3041
- .c-rich-text-editor .debug-timetravel-panel-slider {
3042
- padding: 0;
3043
- flex: 8;
3044
- }
3045
- .c-rich-text-editor .debug-timetravel-panel-button {
3046
- padding: 0;
3047
- border: 0;
3048
- background: none;
3049
- flex: 1;
3050
- color: #fff;
3051
- font-size: 12px;
3052
- }
3053
- .c-rich-text-editor .debug-timetravel-panel-button:hover {
3054
- text-decoration: underline;
3055
- }
3056
- .c-rich-text-editor .debug-timetravel-button {
3057
- border: 0;
3058
- padding: 0;
3059
- font-size: 12px;
3060
- top: 10px;
3061
- right: 15px;
3062
- position: absolute;
3063
- background: none;
3064
- color: #fff;
3065
- }
3066
- .c-rich-text-editor .debug-timetravel-button:hover {
3067
- text-decoration: underline;
3068
- }
3069
2798
  .c-rich-text-editor .connecting {
3070
2799
  font-size: 15px;
3071
2800
  color: #999;
@@ -3264,7 +2993,8 @@ button {
3264
2993
  z-index: 3;
3265
2994
  }
3266
2995
  .c-rich-text-editor .TableNode__contentEditable .CrystallizeRTEditorTheme__paragraph {
3267
- margin-top: 0px;
2996
+ margin-top: 0.5rem;
2997
+ margin-bottom: 0.5rem;
3268
2998
  }
3269
2999
  .c-rich-text-editor .CrystallizeRTEditorTheme__blockCursor {
3270
3000
  display: block;
@@ -3285,6 +3015,11 @@ button {
3285
3015
  visibility: hidden;
3286
3016
  }
3287
3017
  }
3018
+ .c-rte-table-action-dropdown {
3019
+ display: absolute;
3020
+ right: 2px;
3021
+ top: 2px;
3022
+ }
3288
3023
 
3289
3024
  /* src/rich-text-editor/plugins/CodeActionMenuPlugin/index.css */
3290
3025
  .code-action-menu-container {
@@ -3453,7 +3188,7 @@ button {
3453
3188
  }
3454
3189
 
3455
3190
  /* src/rich-text-editor/plugins/FloatingTextFormatToolbarPlugin/index.css */
3456
- .floating-text-format-popup {
3191
+ .c-floating-text-format-popup {
3457
3192
  vertical-align: middle;
3458
3193
  background-color: #fff;
3459
3194
  transition: opacity 0.5s;
@@ -3477,7 +3212,7 @@ button {
3477
3212
  var(--tw-ring-shadow, 0 0 #0000),
3478
3213
  var(--tw-shadow);
3479
3214
  }
3480
- .floating-text-format-popup button.popup-item {
3215
+ .c-floating-text-format-popup button.popup-item {
3481
3216
  border: 0;
3482
3217
  display: flex;
3483
3218
  background: none;
@@ -3486,13 +3221,13 @@ button {
3486
3221
  cursor: pointer;
3487
3222
  vertical-align: middle;
3488
3223
  }
3489
- .floating-text-format-popup button.popup-item:disabled {
3224
+ .c-floating-text-format-popup button.popup-item:disabled {
3490
3225
  cursor: not-allowed;
3491
3226
  }
3492
- .floating-text-format-popup button.popup-item.spaced {
3227
+ .c-floating-text-format-popup button.popup-item.spaced {
3493
3228
  margin-right: 2px;
3494
3229
  }
3495
- .floating-text-format-popup button.popup-item i.format {
3230
+ .c-floating-text-format-popup button.popup-item i.format {
3496
3231
  background-size: contain;
3497
3232
  display: inline-block;
3498
3233
  height: 18px;
@@ -3502,19 +3237,19 @@ button {
3502
3237
  display: flex;
3503
3238
  opacity: 0.6;
3504
3239
  }
3505
- .floating-text-format-popup button.popup-item:disabled i.format {
3240
+ .c-floating-text-format-popup button.popup-item:disabled i.format {
3506
3241
  opacity: 0.2;
3507
3242
  }
3508
- .floating-text-format-popup button.popup-item.active {
3243
+ .c-floating-text-format-popup button.popup-item.active {
3509
3244
  background-color: rgba(223, 232, 250, 0.3);
3510
3245
  }
3511
- .floating-text-format-popup button.popup-item.active i {
3246
+ .c-floating-text-format-popup button.popup-item.active i {
3512
3247
  opacity: 1;
3513
3248
  }
3514
- .floating-text-format-popup .popup-item:hover:not([disabled]) {
3249
+ .c-floating-text-format-popup .popup-item:hover:not([disabled]) {
3515
3250
  background-color: #eee;
3516
3251
  }
3517
- .floating-text-format-popup select.popup-item {
3252
+ .c-floating-text-format-popup select.popup-item {
3518
3253
  border: 0;
3519
3254
  display: flex;
3520
3255
  background: none;
@@ -3528,11 +3263,11 @@ button {
3528
3263
  color: #777;
3529
3264
  text-overflow: ellipsis;
3530
3265
  }
3531
- .floating-text-format-popup select.code-language {
3266
+ .c-floating-text-format-popup select.code-language {
3532
3267
  text-transform: capitalize;
3533
3268
  width: 130px;
3534
3269
  }
3535
- .floating-text-format-popup .popup-item .text {
3270
+ .c-floating-text-format-popup .popup-item .text {
3536
3271
  display: flex;
3537
3272
  line-height: 20px;
3538
3273
  vertical-align: middle;
@@ -3544,7 +3279,7 @@ button {
3544
3279
  height: 20px;
3545
3280
  text-align: left;
3546
3281
  }
3547
- .floating-text-format-popup .popup-item .icon {
3282
+ .c-floating-text-format-popup .popup-item .icon {
3548
3283
  display: flex;
3549
3284
  width: 20px;
3550
3285
  height: 20px;
@@ -3553,14 +3288,14 @@ button {
3553
3288
  line-height: 16px;
3554
3289
  background-size: contain;
3555
3290
  }
3556
- .floating-text-format-popup i.chevron-down {
3291
+ .c-floating-text-format-popup i.chevron-down {
3557
3292
  margin-top: 3px;
3558
3293
  width: 16px;
3559
3294
  height: 16px;
3560
3295
  display: flex;
3561
3296
  user-select: none;
3562
3297
  }
3563
- .floating-text-format-popup i.chevron-down.inside {
3298
+ .c-floating-text-format-popup i.chevron-down.inside {
3564
3299
  width: 16px;
3565
3300
  height: 16px;
3566
3301
  display: flex;
@@ -3569,22 +3304,17 @@ button {
3569
3304
  margin-right: 10px;
3570
3305
  pointer-events: none;
3571
3306
  }
3572
- .floating-text-format-popup .divider {
3307
+ .c-floating-text-format-popup .divider {
3573
3308
  width: 1px;
3574
3309
  background-color: #eee;
3575
3310
  margin: 0 4px;
3576
3311
  }
3577
3312
  @media (max-width: 1024px) {
3578
- .floating-text-format-popup button.insert-comment {
3313
+ .c-floating-text-format-popup button.insert-comment {
3579
3314
  display: none;
3580
3315
  }
3581
3316
  }
3582
3317
 
3583
- /* src/rich-text-editor/plugins/TableCellResizer/index.css */
3584
- .TableCellResizer__resizer {
3585
- position: absolute;
3586
- }
3587
-
3588
3318
  /* src/rich-text-editor/themes/CrystallizeRTEditorTheme.css */
3589
3319
  .CrystallizeRTEditorTheme__ltr {
3590
3320
  text-align: left;
@@ -3942,21 +3672,12 @@ button {
3942
3672
  opacity: 1;
3943
3673
  }
3944
3674
  }
3945
- .CrystallizeRTEditorTheme__tableCellResizeRuler {
3946
- display: block;
3947
- position: absolute;
3948
- width: 1px;
3949
- background-color: rgb(60, 132, 244);
3950
- height: 100%;
3951
- top: 0;
3952
- }
3953
3675
  .CrystallizeRTEditorTheme__tableCellActionButtonContainer {
3954
3676
  display: block;
3955
- right: 5px;
3956
- top: 6px;
3677
+ right: 2px;
3678
+ top: 2px;
3957
3679
  position: absolute;
3958
3680
  z-index: 4;
3959
- width: 20px;
3960
3681
  height: 20px;
3961
3682
  }
3962
3683
  .CrystallizeRTEditorTheme__tableCellActionButton {
package/dist/index.d.ts CHANGED
@@ -11,6 +11,9 @@ import * as ProgressPrimitives from '@radix-ui/react-progress';
11
11
  import * as _radix_ui_react_select from '@radix-ui/react-select';
12
12
  import * as SliderPrimitive from '@radix-ui/react-slider';
13
13
 
14
+ type SeparatorProps = HTMLAttributes<HTMLLIElement>;
15
+ declare function Separator({ className }: SeparatorProps): JSX.Element;
16
+
14
17
  type ItemProps = HTMLAttributes<HTMLLIElement> & {
15
18
  onSelect?: () => void;
16
19
  };
@@ -23,6 +26,7 @@ type ActionMenuProps = {
23
26
  declare function ActionMenu({ children, tabIndex }: ActionMenuProps): JSX.Element;
24
27
  declare namespace ActionMenu {
25
28
  var Item: typeof Item;
29
+ var Separator: typeof Separator;
26
30
  }
27
31
 
28
32
  declare const avatarClassName: (props?: ({
@@ -180,14 +184,6 @@ declare function showInfo(delegated: DialogFuncProps): {
180
184
  };
181
185
  declare function destroyAll(): void;
182
186
 
183
- type DropdownMenuRootProps = DropdownMenuPrimitive.MenuContentProps & {
184
- children: ReactNode;
185
- content: ReactNode;
186
- alignContent?: 'start' | 'center' | 'end';
187
- disabled?: boolean;
188
- };
189
- declare function DropdownMenuRoot({ children, content, alignContent, disabled, ...delegated }: DropdownMenuRootProps): JSX.Element;
190
-
191
187
  type DropdownMenuItemProps = DropdownMenuPrimitive.MenuItemProps & {
192
188
  children: ReactNode;
193
189
  };
@@ -198,10 +194,21 @@ type DropdownMenuLabelProps = {
198
194
  };
199
195
  declare function DropdownMenuLabel({ children }: DropdownMenuLabelProps): JSX.Element;
200
196
 
197
+ type DropdownMenuRootProps = DropdownMenuPrimitive.MenuContentProps & {
198
+ children: ReactNode;
199
+ content: ReactNode;
200
+ alignContent?: 'start' | 'center' | 'end';
201
+ disabled?: boolean;
202
+ onOpenChange?: (open: boolean) => void;
203
+ };
204
+ declare function DropdownMenuRoot({ children, content, alignContent, disabled, onOpenChange, ...delegated }: DropdownMenuRootProps): JSX.Element;
205
+
201
206
  declare const DropdownMenu: {
202
207
  Root: typeof DropdownMenuRoot;
203
208
  Item: typeof DropdownMenuItem;
204
209
  Label: typeof DropdownMenuLabel;
210
+ Separator: react.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuSeparatorProps & react.RefAttributes<HTMLDivElement>>;
211
+ Portal: react.FC<DropdownMenuPrimitive.DropdownMenuPortalProps>;
205
212
  };
206
213
 
207
214
  type IconButtonStylesProps = VariantProps<typeof buttonStyles>;