@thangph2146/lexical-editor 0.0.4 → 0.0.5

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 (99) hide show
  1. package/dist/editor-x/editor.cjs +721 -432
  2. package/dist/editor-x/editor.cjs.map +1 -1
  3. package/dist/editor-x/editor.css +1418 -1120
  4. package/dist/editor-x/editor.css.map +1 -1
  5. package/dist/editor-x/editor.js +725 -436
  6. package/dist/editor-x/editor.js.map +1 -1
  7. package/dist/index.cjs +757 -469
  8. package/dist/index.cjs.map +1 -1
  9. package/dist/index.css +1418 -1120
  10. package/dist/index.css.map +1 -1
  11. package/dist/index.js +760 -472
  12. package/dist/index.js.map +1 -1
  13. package/package.json +3 -3
  14. package/src/components/lexical-editor.tsx +138 -123
  15. package/src/editor-x/editor.tsx +16 -3
  16. package/src/editor-x/plugins.tsx +385 -380
  17. package/src/nodes/list-with-color-node.tsx +160 -160
  18. package/src/plugins/autocomplete-plugin.tsx +2574 -2574
  19. package/src/plugins/context-menu-plugin.tsx +239 -9
  20. package/src/plugins/floating-text-format-plugin.tsx +84 -92
  21. package/src/plugins/images-plugin.tsx +4 -4
  22. package/src/plugins/list-color-plugin.tsx +178 -178
  23. package/src/plugins/tab-focus-plugin.tsx +66 -66
  24. package/src/plugins/table-column-resizer-plugin.tsx +329 -190
  25. package/src/plugins/toolbar/block-format/block-format-data.tsx +4 -0
  26. package/src/plugins/toolbar/block-format/format-bulleted-list.tsx +40 -40
  27. package/src/plugins/toolbar/block-format/format-list-with-marker.tsx +74 -74
  28. package/src/plugins/toolbar/block-format/format-numbered-list.tsx +40 -40
  29. package/src/plugins/toolbar/block-format-toolbar-plugin.tsx +118 -117
  30. package/src/plugins/toolbar/element-format-toolbar-plugin.tsx +37 -53
  31. package/src/plugins/toolbar/font-format-toolbar-plugin.tsx +8 -15
  32. package/src/plugins/toolbar/font-size-toolbar-plugin.tsx +2 -3
  33. package/src/plugins/toolbar/history-toolbar-plugin.tsx +2 -5
  34. package/src/plugins/toolbar/subsuper-toolbar-plugin.tsx +15 -23
  35. package/src/themes/_mixins.scss +158 -10
  36. package/src/themes/_variables.scss +168 -0
  37. package/src/themes/core/_code.scss +59 -0
  38. package/src/themes/core/_images.scss +80 -0
  39. package/src/themes/core/_lists.scss +214 -0
  40. package/src/themes/core/_misc.scss +46 -0
  41. package/src/themes/core/_reset.scss +119 -0
  42. package/src/themes/core/_tables.scss +145 -0
  43. package/src/themes/core/_text.scss +35 -0
  44. package/src/themes/core/_typography.scss +73 -0
  45. package/src/themes/editor-theme copy.scss +763 -0
  46. package/src/themes/editor-theme.scss +9 -623
  47. package/src/themes/editor-theme.ts +118 -118
  48. package/src/themes/plugins/_auto-embed.scss +11 -0
  49. package/src/themes/plugins/_color-picker.scss +103 -0
  50. package/src/themes/plugins/_draggable-block.scss +32 -0
  51. package/src/themes/plugins/_floating-link-editor.scss +47 -0
  52. package/src/themes/plugins/_floating-toolbars.scss +61 -0
  53. package/src/themes/plugins/_image-resizer.scss +38 -0
  54. package/src/themes/plugins/_image.scss +57 -0
  55. package/src/themes/plugins/_layout.scss +39 -0
  56. package/src/themes/plugins/_list-color.scss +23 -0
  57. package/src/themes/plugins/_mentions.scss +21 -0
  58. package/src/themes/plugins/_menus-and-pickers.scss +153 -0
  59. package/src/themes/plugins/_table.scss +20 -0
  60. package/src/themes/plugins/_toolbar.scss +36 -0
  61. package/src/themes/plugins/_tree-view.scss +11 -0
  62. package/src/themes/plugins copy.scss +656 -0
  63. package/src/themes/plugins.scss +20 -1165
  64. package/src/themes/ui-components/_animations.scss +31 -0
  65. package/src/themes/ui-components/_backgrounds.scss +27 -0
  66. package/src/themes/ui-components/_borders.scss +20 -0
  67. package/src/themes/ui-components/_button.scss +176 -0
  68. package/src/themes/ui-components/_checkbox.scss +14 -0
  69. package/src/themes/ui-components/_cursors.scss +31 -0
  70. package/src/themes/ui-components/_dialog.scss +86 -0
  71. package/src/themes/ui-components/_display-sizing.scss +100 -0
  72. package/src/themes/ui-components/_flex.scss +124 -0
  73. package/src/themes/ui-components/_form-layout.scss +15 -0
  74. package/src/themes/ui-components/_icons.scss +23 -0
  75. package/src/themes/ui-components/_input.scss +86 -0
  76. package/src/themes/ui-components/_label.scss +19 -0
  77. package/src/themes/ui-components/_loader.scss +9 -0
  78. package/src/themes/ui-components/_margins-paddings.scss +45 -0
  79. package/src/themes/ui-components/_popover.scss +16 -0
  80. package/src/themes/ui-components/_positioning.scss +73 -0
  81. package/src/themes/ui-components/_rounded.scss +19 -0
  82. package/src/themes/ui-components/_scroll-area.scss +11 -0
  83. package/src/themes/ui-components/_select.scss +110 -0
  84. package/src/themes/ui-components/_separator.scss +19 -0
  85. package/src/themes/ui-components/_shadow.scss +15 -0
  86. package/src/themes/ui-components/_tabs.scss +46 -0
  87. package/src/themes/ui-components/_text-utilities.scss +48 -0
  88. package/src/themes/ui-components/_toggle-toolbar.scss +128 -0
  89. package/src/themes/ui-components/_toggle.scss +80 -0
  90. package/src/themes/ui-components/_typography.scss +22 -0
  91. package/src/themes/ui-components copy.scss +1335 -0
  92. package/src/themes/ui-components.scss +27 -937
  93. package/src/transformers/markdown-list-transformer.ts +51 -51
  94. package/src/ui/button.tsx +11 -2
  95. package/src/ui/collapsible.tsx +1 -1
  96. package/src/ui/dialog.tsx +2 -2
  97. package/src/ui/flex.tsx +4 -4
  98. package/src/ui/popover.tsx +1 -1
  99. package/src/ui/tooltip.tsx +2 -2
@@ -1,118 +1,118 @@
1
- import { EditorThemeClasses } from "lexical"
2
-
3
- import "./editor-theme.scss"
4
-
5
- export const editorTheme: EditorThemeClasses = {
6
- ltr: "editor-ltr",
7
- rtl: "editor-rtl",
8
- heading: {
9
- h1: "editor-h1",
10
- h2: "editor-h2",
11
- h3: "editor-h3",
12
- h4: "editor-h4",
13
- h5: "editor-h5",
14
- h6: "editor-h6",
15
- },
16
- paragraph: "editor-paragraph",
17
- quote: "editor-quote",
18
- link: "editor-link",
19
- list: {
20
- checklist: "editor-checklist",
21
- listitem: "editor-listitem",
22
- listitemChecked: "editor-listitem-checked",
23
- listitemUnchecked: "editor-listitem-unchecked",
24
- nested: {
25
- listitem: "editor-nested-listitem",
26
- },
27
- ol: "editor-ol",
28
- olDepth: [
29
- "editor-ol-depth-1",
30
- "editor-ol-depth-2",
31
- "editor-ol-depth-3",
32
- "editor-ol-depth-4",
33
- "editor-ol-depth-5",
34
- ],
35
- ul: "editor-ul",
36
- ulDepth: [
37
- "editor-ul-depth-1",
38
- "editor-ul-depth-2",
39
- "editor-ul-depth-3",
40
- "editor-ul-depth-4",
41
- "editor-ul-depth-5",
42
- ],
43
- },
44
- hashtag: "editor-hashtag",
45
- text: {
46
- bold: "editor-text-bold",
47
- code: "editor-text-code",
48
- italic: "editor-text-italic",
49
- strikethrough: "editor-text-strikethrough",
50
- subscript: "editor-text-subscript",
51
- superscript: "editor-text-superscript",
52
- underline: "editor-text-underline",
53
- underlineStrikethrough: "editor-text-underline-strikethrough",
54
- },
55
- textAlign: {
56
- left: "editor-text-align-left",
57
- center: "editor-text-align-center",
58
- right: "editor-text-align-right",
59
- justify: "editor-text-align-justify",
60
- },
61
- image: "editor-image",
62
- inlineImage: "editor-inline-image",
63
- code: "editor-code",
64
- codeHighlight: {
65
- atrule: "editor-token--keyword",
66
- attr: "editor-token--attr-name",
67
- boolean: "editor-token--property",
68
- builtin: "editor-token--selector",
69
- cdata: "editor-token--comment",
70
- char: "editor-token--selector",
71
- class: "editor-token--function",
72
- "class-name": "editor-token--function",
73
- comment: "editor-token--comment",
74
- constant: "editor-token--property",
75
- deleted: "editor-token--property",
76
- doctype: "editor-token--comment",
77
- entity: "editor-token--operator",
78
- function: "editor-token--function",
79
- important: "editor-token--variable",
80
- inserted: "editor-token--selector",
81
- keyword: "editor-token--keyword",
82
- namespace: "editor-token--variable",
83
- number: "editor-token--property",
84
- operator: "editor-token--operator",
85
- prolog: "editor-token--comment",
86
- property: "editor-token--property",
87
- punctuation: "editor-token--punctuation",
88
- regex: "editor-token--variable",
89
- selector: "editor-token--selector",
90
- string: "editor-token--string",
91
- symbol: "editor-token--property",
92
- tag: "editor-token--property",
93
- url: "editor-token--operator",
94
- variable: "editor-token--variable",
95
- },
96
- table: "editor-table",
97
- tableCell: "editor-table-cell",
98
- tableCellActionButton: "editor-table-cell-action-button",
99
- tableCellActionButtonContainer: "editor-table-cell-action-button-container",
100
- tableCellEditing: "editor-table-cell-editing",
101
- tableCellHeader: "editor-table-cell-header",
102
- tableCellPrimarySelected: "editor-table-cell-primary-selected",
103
- tableCellResizer: "editor-table-cell-resizer",
104
- tableCellSelected: "editor-table-cell-selected",
105
- tableCellSortedIndicator: "editor-table-cell-sorted-indicator",
106
- tableResizeRuler: "editor-table-cell-resize-ruler",
107
- tableRowStriping: "editor-table-row-striping",
108
- tableSelected: "editor-table-selected",
109
- tableSelection: "editor-table-selection",
110
- layoutItem: "editor-layout-item",
111
- layoutContainer: "editor-layout-container",
112
- autocomplete: "editor-autocomplete",
113
- embedBlock: {
114
- base: "editor-embed-block",
115
- focus: "editor-embed-block-focused",
116
- },
117
- hr: "editor-hr",
118
- }
1
+ import { EditorThemeClasses } from "lexical"
2
+
3
+ import "./editor-theme.scss"
4
+
5
+ export const editorTheme: EditorThemeClasses = {
6
+ ltr: "editor-ltr",
7
+ rtl: "editor-rtl",
8
+ heading: {
9
+ h1: "editor-h1",
10
+ h2: "editor-h2",
11
+ h3: "editor-h3",
12
+ h4: "editor-h4",
13
+ h5: "editor-h5",
14
+ h6: "editor-h6",
15
+ },
16
+ paragraph: "editor-paragraph",
17
+ quote: "editor-quote",
18
+ link: "editor-link",
19
+ list: {
20
+ checklist: "editor-checklist",
21
+ listitem: "editor-listitem",
22
+ listitemChecked: "editor-listitem-checked",
23
+ listitemUnchecked: "editor-listitem-unchecked",
24
+ nested: {
25
+ listitem: "editor-nested-listitem",
26
+ },
27
+ ol: "editor-ol",
28
+ olDepth: [
29
+ "editor-ol-depth-1",
30
+ "editor-ol-depth-2",
31
+ "editor-ol-depth-3",
32
+ "editor-ol-depth-4",
33
+ "editor-ol-depth-5",
34
+ ],
35
+ ul: "editor-ul",
36
+ ulDepth: [
37
+ "editor-ul-depth-1",
38
+ "editor-ul-depth-2",
39
+ "editor-ul-depth-3",
40
+ "editor-ul-depth-4",
41
+ "editor-ul-depth-5",
42
+ ],
43
+ },
44
+ hashtag: "editor-hashtag",
45
+ text: {
46
+ bold: "editor-text-bold",
47
+ code: "editor-text-code",
48
+ italic: "editor-text-italic",
49
+ strikethrough: "editor-text-strikethrough",
50
+ subscript: "editor-text-subscript",
51
+ superscript: "editor-text-superscript",
52
+ underline: "editor-text-underline",
53
+ underlineStrikethrough: "editor-text-underline-strikethrough",
54
+ },
55
+ textAlign: {
56
+ left: "editor-text-align-left",
57
+ center: "editor-text-align-center",
58
+ right: "editor-text-align-right",
59
+ justify: "editor-text-align-justify",
60
+ },
61
+ image: "editor-image",
62
+ inlineImage: "editor-inline-image",
63
+ code: "editor-code",
64
+ codeHighlight: {
65
+ atrule: "editor-token--keyword",
66
+ attr: "editor-token--attr-name",
67
+ boolean: "editor-token--property",
68
+ builtin: "editor-token--selector",
69
+ cdata: "editor-token--comment",
70
+ char: "editor-token--selector",
71
+ class: "editor-token--function",
72
+ "class-name": "editor-token--function",
73
+ comment: "editor-token--comment",
74
+ constant: "editor-token--property",
75
+ deleted: "editor-token--property",
76
+ doctype: "editor-token--comment",
77
+ entity: "editor-token--operator",
78
+ function: "editor-token--function",
79
+ important: "editor-token--variable",
80
+ inserted: "editor-token--selector",
81
+ keyword: "editor-token--keyword",
82
+ namespace: "editor-token--variable",
83
+ number: "editor-token--property",
84
+ operator: "editor-token--operator",
85
+ prolog: "editor-token--comment",
86
+ property: "editor-token--property",
87
+ punctuation: "editor-token--punctuation",
88
+ regex: "editor-token--variable",
89
+ selector: "editor-token--selector",
90
+ string: "editor-token--string",
91
+ symbol: "editor-token--property",
92
+ tag: "editor-token--property",
93
+ url: "editor-token--operator",
94
+ variable: "editor-token--variable",
95
+ },
96
+ table: "editor-table",
97
+ tableCell: "editor-table-cell",
98
+ tableCellActionButton: "editor-table-cell-action-button",
99
+ tableCellActionButtonContainer: "editor-table-cell-action-button-container",
100
+ tableCellEditing: "editor-table-cell-editing",
101
+ tableCellHeader: "editor-table-cell-header",
102
+ tableCellPrimarySelected: "editor-table-cell-primary-selected",
103
+ tableCellResizer: "editor-table-cell-resizer",
104
+ tableCellSelected: "editor-table-cell-selected",
105
+ tableCellSortedIndicator: "editor-table-cell-sorted-indicator",
106
+ tableResizeRuler: "editor-table-cell-resize-ruler",
107
+ tableRowStriping: "editor-table-row-striping",
108
+ tableSelected: "editor-table-selected",
109
+ tableSelection: "editor-table-selection",
110
+ layoutItem: "editor-layout-item",
111
+ layoutContainer: "editor-layout-container",
112
+ autocomplete: "editor-autocomplete",
113
+ embedBlock: {
114
+ base: "editor-embed-block",
115
+ focus: "editor-embed-block-focused",
116
+ },
117
+ hr: "editor-hr",
118
+ }
@@ -0,0 +1,11 @@
1
+ @use "../variables" as *;
2
+ @use "../mixins" as *;
3
+
4
+ .editor-auto-embed-menu {
5
+ width: $editor-mentions-width;
6
+ padding: 0;
7
+ }
8
+
9
+ .editor-auto-embed-wrapper {
10
+ transform: translateY(-100%);
11
+ }
@@ -0,0 +1,103 @@
1
+ @use "../variables" as *;
2
+ @use "../mixins" as *;
3
+
4
+ .editor-color-picker-content {
5
+ @include flex-col;
6
+ gap: $editor-gap-4;
7
+ padding: $editor-gap-4;
8
+ }
9
+
10
+ .editor-color-picker-area {
11
+ position: relative;
12
+ height: $editor-color-picker-height; // h-40
13
+ width: 100%;
14
+ cursor: crosshair;
15
+ touch-action: none;
16
+ @include rounded-sm;
17
+ border: $editor-border-width solid var(--border);
18
+ overflow: hidden;
19
+
20
+ &[data-disabled="true"] {
21
+ pointer-events: none;
22
+ opacity: $editor-opacity-disabled;
23
+ }
24
+ }
25
+
26
+ .editor-slider-root {
27
+ position: relative;
28
+ @include flex-center;
29
+ width: 100%;
30
+ touch-action: none;
31
+ user-select: none;
32
+
33
+ &[data-disabled] {
34
+ opacity: $editor-opacity-disabled;
35
+ pointer-events: none;
36
+ }
37
+ }
38
+
39
+ .editor-slider-track {
40
+ position: relative;
41
+ height: $editor-gap-3; // h-3
42
+ width: 100%;
43
+ flex-grow: 1;
44
+ overflow: hidden;
45
+ @include rounded-full;
46
+ }
47
+
48
+ .editor-slider-thumb {
49
+ display: block;
50
+ @include control-size($editor-icon-size-sm);
51
+ @include rounded-full;
52
+ border: $editor-border-width solid var(--border); // border-primary/50
53
+ background-color: var(--background);
54
+ @include shadow-sm;
55
+ transition: background-color $editor-transition-fast, border-color $editor-transition-fast;
56
+
57
+ &:focus-visible {
58
+ @include focus-ring;
59
+ }
60
+ }
61
+
62
+ .editor-color-swatch {
63
+ box-sizing: border-box;
64
+ @include control-size($editor-control-size-sm);
65
+ @include rounded-sm;
66
+ border: $editor-border-width solid var(--border);
67
+ @include shadow-sm;
68
+
69
+ &--disabled {
70
+ opacity: $editor-opacity-disabled;
71
+ }
72
+ }
73
+
74
+ .editor-color-presets {
75
+ @include flex-center;
76
+ gap: $editor-gap-2;
77
+ width: 100%;
78
+ }
79
+
80
+ .editor-color-preset-item {
81
+ height: $editor-control-size-sm;
82
+ padding-left: $editor-gap-2;
83
+ padding-right: $editor-gap-2;
84
+ flex: 1;
85
+
86
+ &__preview {
87
+ @include control-size($editor-gap-3);
88
+ @include rounded-full;
89
+ border: $editor-border-width solid var(--border);
90
+ }
91
+
92
+ &__label {
93
+ font-family: $editor-font-family-mono;
94
+ @include text-sm;
95
+ }
96
+ }
97
+
98
+ .editor-color-value-text {
99
+ color: $editor-muted-foreground-color;
100
+ font-family: $editor-font-family-mono;
101
+ @include text-sm;
102
+ font-variant-numeric: tabular-nums;
103
+ }
@@ -0,0 +1,32 @@
1
+ @use "../variables" as *;
2
+ @use "../mixins" as *;
3
+
4
+ .editor-draggable-line {
5
+ background-color: var(--secondary-foreground);
6
+ pointer-events: none;
7
+ position: absolute;
8
+ top: 0;
9
+ left: 0;
10
+ height: $editor-gap-1;
11
+ opacity: 0;
12
+ will-change: transform;
13
+ }
14
+
15
+ .editor-draggable-menu {
16
+ position: absolute;
17
+ top: 0;
18
+ left: 0;
19
+ cursor: grab;
20
+ @include rounded-sm;
21
+ padding: $editor-gap-0-5 $editor-gap-1;
22
+ opacity: 0;
23
+ will-change: transform;
24
+
25
+ &:hover {
26
+ background-color: $editor-accent-color;
27
+ }
28
+
29
+ &:active {
30
+ cursor: grabbing;
31
+ }
32
+ }
@@ -0,0 +1,47 @@
1
+ @use "../variables" as *;
2
+ @use "../mixins" as *;
3
+
4
+ .editor-floating-link-editor {
5
+ display: flex;
6
+ position: absolute;
7
+ top: 0;
8
+ left: 0;
9
+ z-index: $editor-z-index-floating;
10
+ max-width: $editor-link-editor-max-width;
11
+ width: 100%;
12
+ opacity: 0;
13
+ background-color: var(--background);
14
+ @include rounded-md;
15
+ border: $editor-border-width solid var(--border);
16
+ @include shadow-lg;
17
+ transition: opacity $editor-transition-normal;
18
+ will-change: transform;
19
+
20
+ &__input-container {
21
+ @include flex-center;
22
+ gap: $editor-gap-1;
23
+ padding: $editor-gap-1;
24
+ width: 100%;
25
+ }
26
+
27
+ &__view-container {
28
+ @include flex-center;
29
+ justify-content: space-between;
30
+ gap: $editor-gap-2;
31
+ padding: $editor-gap-1 $editor-gap-1 $editor-gap-1 $editor-gap-3;
32
+ width: 100%;
33
+ }
34
+
35
+ &__link {
36
+ display: block;
37
+ flex-grow: 1;
38
+ @include truncate;
39
+ color: var(--primary);
40
+ @include text-sm;
41
+ text-decoration: none;
42
+
43
+ &:hover {
44
+ text-decoration: underline;
45
+ }
46
+ }
47
+ }
@@ -0,0 +1,61 @@
1
+ @use "../variables" as *;
2
+ @use "../mixins" as *;
3
+
4
+ .editor-floating-toolbar {
5
+ @include floating-toolbar-base;
6
+ @include backdrop-blur(8px, rgba(var(--background-rgb, 255, 255, 255), 0.85));
7
+ max-width: $editor-floating-toolbar-max-width;
8
+ flex-wrap: wrap;
9
+ }
10
+
11
+ .editor-floating-text-format {
12
+ @include floating-toolbar-base;
13
+ @include backdrop-blur(8px, rgba(var(--background-rgb, 255, 255, 255), 0.8));
14
+ @include backdrop-blur-dark(8px, rgba(var(--background-rgb, 15, 15, 15), 0.8));
15
+
16
+ // Hover effect for the whole bar
17
+ &:hover {
18
+ @include shadow-xl;
19
+ }
20
+
21
+ // Divider between groups
22
+ .editor-separator--vertical {
23
+ height: $editor-gap-5;
24
+ width: $editor-border-width;
25
+ margin: 0 $editor-gap-1;
26
+ background-color: var(--border);
27
+ }
28
+
29
+ // Custom styling for buttons in floating toolbar
30
+ .editor-toggle-group-item, .editor-btn, .editor-toolbar-item {
31
+ border: none;
32
+ border-radius: calc($editor-border-radius - 4px);
33
+ @include control-size(30px);
34
+ padding: 0;
35
+ background-color: transparent;
36
+ transition: all $editor-transition-normal;
37
+ @include flex-center-justify;
38
+
39
+ &:hover {
40
+ background-color: $editor-accent-color;
41
+ color: $editor-accent-foreground-color;
42
+ }
43
+
44
+ &[data-state="on"], &[data-state="active"], &--active {
45
+ background-color: $editor-accent-color;
46
+ color: $editor-accent-foreground-color !important;
47
+ font-weight: $editor-font-weight-bold;
48
+ }
49
+ }
50
+
51
+ // Group of buttons with border as requested
52
+ .editor-floating-group, .editor-floating-group--lg {
53
+ @include flex-center;
54
+ gap: $editor-gap-0-5;
55
+ padding: $editor-gap-0-5;
56
+ border-radius: calc($editor-border-radius - 2px);
57
+ // Remove border from inner groups to make it cleaner
58
+ border: none;
59
+ background-color: transparent;
60
+ }
61
+ }
@@ -0,0 +1,38 @@
1
+ @use "../variables" as *;
2
+ @use "../mixins" as *;
3
+
4
+ .editor-image-resizer {
5
+ &-handle {
6
+ position: absolute;
7
+ @include control-size(10px); // Slightly larger for better grab area
8
+ background-color: var(--primary); // Using primary color
9
+ border: $editor-border-width solid var(--background); // Background color for contrast
10
+ z-index: $editor-z-index-floating; // Ensure on top of image
11
+ transition: background-color $editor-transition-normal;
12
+
13
+ &:hover {
14
+ background-color: $editor-accent-color; // Highlight on hover
15
+ }
16
+
17
+ // Directions
18
+ &--n {
19
+ top: -5px;
20
+ left: 50%;
21
+ transform: translateX(-50%);
22
+ cursor: ns-resize;
23
+ }
24
+
25
+ &--ne {
26
+ top: -5px;
27
+ right: -5px;
28
+ cursor: nesw-resize;
29
+ }
30
+
31
+ &--e {
32
+ top: 50%;
33
+ right: -5px;
34
+ transform: translateY(-50%);
35
+ cursor: ew-resize;
36
+ }
37
+ }
38
+ }
@@ -0,0 +1,57 @@
1
+ @use "../variables" as *;
2
+ @use "../mixins" as *;
3
+
4
+ .editor-image-grid {
5
+ display: grid;
6
+ grid-template-columns: repeat(4, 1fr);
7
+ gap: $editor-gap-2;
8
+ margin-bottom: $editor-gap-3;
9
+ }
10
+
11
+ .editor-image-btn {
12
+ position: relative;
13
+ aspect-ratio: 1 / 1;
14
+ @include rounded-sm;
15
+ overflow: hidden;
16
+ border: $editor-border-width-thick solid transparent;
17
+ transition: all $editor-transition-normal;
18
+ cursor: pointer;
19
+ padding: 0;
20
+
21
+ &--selected {
22
+ border-color: var(--primary);
23
+ box-shadow: 0 0 0 $editor-outline-width var(--primary), 0 0 0 calc($editor-outline-width * 2) var(--background);
24
+ }
25
+
26
+ &:hover:not(&--selected) {
27
+ border-color: color-mix(in srgb, var(--primary), transparent 50%);
28
+ }
29
+ }
30
+
31
+ .editor-folder-tree-trigger {
32
+ @include flex-center;
33
+ gap: $editor-gap-2;
34
+ width: 100%;
35
+ padding: calc($editor-gap-1 + 2px) $editor-gap-2;
36
+ @include rounded-sm;
37
+ transition: background-color $editor-transition-normal;
38
+ text-align: left;
39
+ border: none;
40
+ background: transparent;
41
+
42
+ &:hover {
43
+ background-color: $editor-accent-color;
44
+ color: $editor-accent-foreground-color;
45
+ }
46
+ }
47
+
48
+ .editor-tree-content {
49
+ margin-left: $editor-gap-4;
50
+ margin-top: $editor-gap-1;
51
+ }
52
+
53
+ .editor-empty-state {
54
+ text-align: center;
55
+ padding-top: $editor-control-size-sm;
56
+ padding-bottom: $editor-control-size-sm;
57
+ }
@@ -0,0 +1,39 @@
1
+ @use "../variables" as *;
2
+ @use "../mixins" as *;
3
+
4
+ .editor-layout-dialog-grid {
5
+ display: grid;
6
+ grid-template-columns: repeat(1, minmax(0, 1fr));
7
+ gap: $editor-gap-3;
8
+
9
+ @media (min-width: 768px) {
10
+ grid-template-columns: repeat(3, minmax(0, 1fr));
11
+ }
12
+ }
13
+
14
+ .editor-layout-dialog-group {
15
+ @include flex-col;
16
+ gap: $editor-gap-1-5;
17
+ }
18
+
19
+ .editor-layout-color-trigger {
20
+ height: $editor-control-size-xl; // h-11
21
+ width: 100%;
22
+ justify-content: flex-start;
23
+ gap: $editor-gap-2;
24
+ padding-left: $editor-gap-2;
25
+ padding-right: $editor-gap-2;
26
+ @include text-sm;
27
+ transition: all $editor-transition-normal;
28
+
29
+ &:hover:not(:disabled) {
30
+ @include editor-button-interactive;
31
+ }
32
+ }
33
+
34
+ .editor-layout-color-preview {
35
+ @include control-size($editor-icon-size-sm);
36
+ flex-shrink: 0;
37
+ @include rounded-sm;
38
+ border: $editor-border-width solid var(--border);
39
+ }
@@ -0,0 +1,23 @@
1
+ @use "../variables" as *;
2
+ @use "../mixins" as *;
3
+
4
+ .editor-list-color-dialog {
5
+ padding: $editor-gap-2 0;
6
+ animation: editor-fade-in $editor-transition-slow;
7
+ }
8
+
9
+ .editor-list-color-trigger {
10
+ height: $editor-control-size-xl;
11
+ width: 100%;
12
+ @include flex-center;
13
+ justify-content: flex-start;
14
+ gap: $editor-gap-3;
15
+ @include rounded-md;
16
+ border: $editor-border-width solid var(--input);
17
+ padding: 0 $editor-gap-4;
18
+ background-color: var(--background);
19
+ transition: all $editor-transition-normal;
20
+ @include shadow-sm;
21
+
22
+ @include editor-button-interactive;
23
+ }
@@ -0,0 +1,21 @@
1
+ @use "../variables" as *;
2
+ @use "../mixins" as *;
3
+
4
+ .editor-mentions-popover {
5
+ position: fixed;
6
+ z-index: $editor-z-index-layer-10;
7
+ width: $editor-mentions-width;
8
+ @include rounded-md;
9
+ @include shadow-md;
10
+ }
11
+
12
+ .editor-mentions-item {
13
+ @include flex-center;
14
+ gap: $editor-gap-2;
15
+
16
+ @include editor-dropdown-item-interactive;
17
+
18
+ &--transparent {
19
+ background-color: transparent !important;
20
+ }
21
+ }