@cyberyozh/text-editor 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (209) hide show
  1. package/README.md +102 -0
  2. package/dist/editor.css +2069 -0
  3. package/dist/editor.css.map +1 -0
  4. package/dist/editor.d.mts +45 -0
  5. package/dist/editor.d.ts +45 -0
  6. package/dist/editor.js +6155 -0
  7. package/dist/editor.js.map +1 -0
  8. package/dist/editor.mjs +6118 -0
  9. package/dist/editor.mjs.map +1 -0
  10. package/dist/render/client.d.mts +24 -0
  11. package/dist/render/client.d.ts +24 -0
  12. package/dist/render/client.js +98 -0
  13. package/dist/render/client.js.map +1 -0
  14. package/dist/render/client.mjs +74 -0
  15. package/dist/render/client.mjs.map +1 -0
  16. package/dist/render.d.mts +58 -0
  17. package/dist/render.d.ts +58 -0
  18. package/dist/render.js +2521 -0
  19. package/dist/render.js.map +1 -0
  20. package/dist/render.mjs +2484 -0
  21. package/dist/render.mjs.map +1 -0
  22. package/dist/styles/index.css +2068 -0
  23. package/package.json +92 -0
  24. package/src/editor/commands/items.ts +374 -0
  25. package/src/editor/commands/suggestion.tsx +146 -0
  26. package/src/editor/components/button/button.css +56 -0
  27. package/src/editor/components/button/button.tsx +35 -0
  28. package/src/editor/components/button/index.ts +1 -0
  29. package/src/editor/components/common-modal/common-modal.css +85 -0
  30. package/src/editor/components/common-modal/common-modal.tsx +58 -0
  31. package/src/editor/components/common-modal/index.ts +1 -0
  32. package/src/editor/components/index.ts +3 -0
  33. package/src/editor/components/input/index.ts +1 -0
  34. package/src/editor/components/input/input.css +43 -0
  35. package/src/editor/components/input/input.tsx +22 -0
  36. package/src/editor/context/dialog-command.tsx +47 -0
  37. package/src/editor/context/index.ts +2 -0
  38. package/src/editor/context/translations-context.tsx +28 -0
  39. package/src/editor/controls/bubble-menu-content.tsx +394 -0
  40. package/src/editor/controls/callout-menu.tsx +169 -0
  41. package/src/editor/controls/character-count.tsx +36 -0
  42. package/src/editor/controls/commands-list.tsx +117 -0
  43. package/src/editor/controls/drag-handle.tsx +98 -0
  44. package/src/editor/controls/emoji-picker.tsx +62 -0
  45. package/src/editor/controls/index.ts +5 -0
  46. package/src/editor/controls/table-menu.tsx +322 -0
  47. package/src/editor/dialogs/add-katex-dialog/add-katex-dialog.css +115 -0
  48. package/src/editor/dialogs/add-katex-dialog/add-katex-dialog.tsx +116 -0
  49. package/src/editor/dialogs/add-katex-dialog/index.ts +1 -0
  50. package/src/editor/dialogs/add-link-dialog/add-link-dialog.css +105 -0
  51. package/src/editor/dialogs/add-link-dialog/add-link-dialog.tsx +177 -0
  52. package/src/editor/dialogs/add-link-dialog/index.ts +1 -0
  53. package/src/editor/dialogs/add-video-dialog/add-video-dialog.css +146 -0
  54. package/src/editor/dialogs/add-video-dialog/add-video-dialog.tsx +157 -0
  55. package/src/editor/dialogs/add-video-dialog/index.ts +1 -0
  56. package/src/editor/dialogs/image-dialog/image-dialog.css +101 -0
  57. package/src/editor/dialogs/image-dialog/image-dialog.tsx +276 -0
  58. package/src/editor/dialogs/image-dialog/index.ts +1 -0
  59. package/src/editor/dialogs/index.ts +4 -0
  60. package/src/editor/editor.tsx +247 -0
  61. package/src/editor/handlers/create-image-upload-handler.ts +24 -0
  62. package/src/editor/handlers/dialog-handlers.ts +143 -0
  63. package/src/editor/handlers/index.ts +8 -0
  64. package/src/editor/index.ts +3 -0
  65. package/src/extensions/base/callout.ts +138 -0
  66. package/src/extensions/base/code-block.ts +24 -0
  67. package/src/extensions/base/compatibility.ts +493 -0
  68. package/src/extensions/base/copyable-text.ts +56 -0
  69. package/src/extensions/base/custom-quote.ts +174 -0
  70. package/src/extensions/base/figure.ts +141 -0
  71. package/src/extensions/base/index.ts +19 -0
  72. package/src/extensions/base/link.ts +18 -0
  73. package/src/extensions/base/myth-reality.ts +45 -0
  74. package/src/extensions/base/prompt.ts +109 -0
  75. package/src/extensions/base/video.ts +29 -0
  76. package/src/extensions/editor/callout.ts +43 -0
  77. package/src/extensions/editor/code-block.ts +9 -0
  78. package/src/extensions/editor/commands.ts +43 -0
  79. package/src/extensions/editor/copyable-text.ts +16 -0
  80. package/src/extensions/editor/custom-quote.ts +54 -0
  81. package/src/extensions/editor/figure.ts +20 -0
  82. package/src/extensions/editor/get-editor-extensions.ts +113 -0
  83. package/src/extensions/editor/index.ts +25 -0
  84. package/src/extensions/editor/prompt.ts +43 -0
  85. package/src/extensions/editor/video.ts +23 -0
  86. package/src/extensions/render/get-render-extensions.ts +74 -0
  87. package/src/extensions/render/index.ts +6 -0
  88. package/src/extensions/views/components/callout.tsx +70 -0
  89. package/src/extensions/views/components/code-block.tsx +73 -0
  90. package/src/extensions/views/components/copy-button.tsx +52 -0
  91. package/src/extensions/views/components/copyable-text.tsx +11 -0
  92. package/src/extensions/views/components/custom-quote.tsx +64 -0
  93. package/src/extensions/views/components/figure.tsx +63 -0
  94. package/src/extensions/views/components/index.ts +7 -0
  95. package/src/extensions/views/components/prompt.tsx +43 -0
  96. package/src/extensions/views/components/video.tsx +40 -0
  97. package/src/extensions/views/node-views/callout.tsx +51 -0
  98. package/src/extensions/views/node-views/code-block.tsx +30 -0
  99. package/src/extensions/views/node-views/copyable-text.tsx +10 -0
  100. package/src/extensions/views/node-views/custom-quote.tsx +66 -0
  101. package/src/extensions/views/node-views/figure.tsx +38 -0
  102. package/src/extensions/views/node-views/index.ts +7 -0
  103. package/src/extensions/views/node-views/prompt.tsx +35 -0
  104. package/src/extensions/views/node-views/video.tsx +19 -0
  105. package/src/icons/Check.tsx +12 -0
  106. package/src/icons/Copy.tsx +15 -0
  107. package/src/icons/DragIcon.tsx +10 -0
  108. package/src/icons/Edit.tsx +12 -0
  109. package/src/icons/Quote.tsx +10 -0
  110. package/src/icons/X.tsx +13 -0
  111. package/src/icons/color/TiptapCalloutError.tsx +25 -0
  112. package/src/icons/color/TiptapCalloutInfo.tsx +18 -0
  113. package/src/icons/color/TiptapCalloutSuccess.tsx +49 -0
  114. package/src/icons/color/TiptapCalloutWarning.tsx +28 -0
  115. package/src/icons/color/index.ts +4 -0
  116. package/src/icons/index.ts +60 -0
  117. package/src/icons/menu/AddImage.tsx +10 -0
  118. package/src/icons/menu/AlignCenter.tsx +10 -0
  119. package/src/icons/menu/AlignLeft.tsx +10 -0
  120. package/src/icons/menu/AlignRight.tsx +10 -0
  121. package/src/icons/menu/ArrowDown.tsx +13 -0
  122. package/src/icons/menu/ArrowLeft.tsx +13 -0
  123. package/src/icons/menu/ArrowRight.tsx +13 -0
  124. package/src/icons/menu/ArrowUp.tsx +13 -0
  125. package/src/icons/menu/Blockquote.tsx +7 -0
  126. package/src/icons/menu/Bold.tsx +10 -0
  127. package/src/icons/menu/BulletList.tsx +10 -0
  128. package/src/icons/menu/CalloutError.tsx +10 -0
  129. package/src/icons/menu/CalloutInfo.tsx +12 -0
  130. package/src/icons/menu/CalloutSuccess.tsx +10 -0
  131. package/src/icons/menu/CalloutWarning.tsx +12 -0
  132. package/src/icons/menu/ClearFormatting.tsx +10 -0
  133. package/src/icons/menu/Code.tsx +10 -0
  134. package/src/icons/menu/CodeBlock.tsx +10 -0
  135. package/src/icons/menu/Copyable.tsx +10 -0
  136. package/src/icons/menu/CustomQuote.tsx +17 -0
  137. package/src/icons/menu/DeleteColumn.tsx +17 -0
  138. package/src/icons/menu/DeleteRow.tsx +17 -0
  139. package/src/icons/menu/Details.tsx +10 -0
  140. package/src/icons/menu/H2.tsx +10 -0
  141. package/src/icons/menu/H3.tsx +10 -0
  142. package/src/icons/menu/H4.tsx +10 -0
  143. package/src/icons/menu/H5.tsx +10 -0
  144. package/src/icons/menu/H6.tsx +10 -0
  145. package/src/icons/menu/Highlight.tsx +13 -0
  146. package/src/icons/menu/HorizontalRule.tsx +7 -0
  147. package/src/icons/menu/Italic.tsx +10 -0
  148. package/src/icons/menu/Link.tsx +10 -0
  149. package/src/icons/menu/LinkOff.tsx +10 -0
  150. package/src/icons/menu/Math.tsx +10 -0
  151. package/src/icons/menu/MergeCells.tsx +10 -0
  152. package/src/icons/menu/MythReality.tsx +10 -0
  153. package/src/icons/menu/OrderedList.tsx +10 -0
  154. package/src/icons/menu/Prompt.tsx +18 -0
  155. package/src/icons/menu/Redo.tsx +14 -0
  156. package/src/icons/menu/SplitCells.tsx +7 -0
  157. package/src/icons/menu/Strikethrough.tsx +10 -0
  158. package/src/icons/menu/Subscript.tsx +10 -0
  159. package/src/icons/menu/Superscript.tsx +10 -0
  160. package/src/icons/menu/Table.tsx +14 -0
  161. package/src/icons/menu/TableColumnHeading.tsx +7 -0
  162. package/src/icons/menu/TableRowHeading.tsx +10 -0
  163. package/src/icons/menu/TextColor.tsx +13 -0
  164. package/src/icons/menu/Underline.tsx +10 -0
  165. package/src/icons/menu/Undo.tsx +14 -0
  166. package/src/icons/menu/Video.tsx +14 -0
  167. package/src/icons/menu/index.ts +49 -0
  168. package/src/render/index.ts +22 -0
  169. package/src/render/static-renderer-config.tsx +206 -0
  170. package/src/render/tiptap-interactivity-provider.tsx +78 -0
  171. package/src/render/tiptap-render.tsx +102 -0
  172. package/src/styles/components.css +10 -0
  173. package/src/styles/editor/base.css +39 -0
  174. package/src/styles/editor/callout-menu.css +81 -0
  175. package/src/styles/editor/controls.css +57 -0
  176. package/src/styles/editor/emoji-picker.css +113 -0
  177. package/src/styles/editor/index.css +9 -0
  178. package/src/styles/editor/menus.css +16 -0
  179. package/src/styles/editor/states.css +43 -0
  180. package/src/styles/editor/typography.css +165 -0
  181. package/src/styles/editor/utilities.css +71 -0
  182. package/src/styles/editor/variables.css +70 -0
  183. package/src/styles/extensions/callout.css +155 -0
  184. package/src/styles/extensions/code-block.css +109 -0
  185. package/src/styles/extensions/commands-list.css +83 -0
  186. package/src/styles/extensions/custom-quote.css +103 -0
  187. package/src/styles/extensions/details.css +87 -0
  188. package/src/styles/extensions/figure.css +66 -0
  189. package/src/styles/extensions/index.css +11 -0
  190. package/src/styles/extensions/math.css +32 -0
  191. package/src/styles/extensions/myth-reality.css +59 -0
  192. package/src/styles/extensions/prompt.css +75 -0
  193. package/src/styles/extensions/table.css +253 -0
  194. package/src/styles/extensions/video.css +53 -0
  195. package/src/styles/styles.css +3 -0
  196. package/src/translations/en.json +158 -0
  197. package/src/translations/ru.json +158 -0
  198. package/src/types/image-handler.ts +33 -0
  199. package/src/types/index.ts +1 -0
  200. package/src/utils/copy-to-clipboard.ts +23 -0
  201. package/src/utils/custom-emoji.ts +174 -0
  202. package/src/utils/detect-video-hosting.ts +106 -0
  203. package/src/utils/get-shared-extensions.ts +45 -0
  204. package/src/utils/get-translations.ts +25 -0
  205. package/src/utils/handle-exit-node.ts +61 -0
  206. package/src/utils/image-src-resolver.ts +74 -0
  207. package/src/utils/index.ts +2 -0
  208. package/src/utils/migrate-legacy-callouts.ts +59 -0
  209. package/src/utils/pluralize.ts +38 -0
@@ -0,0 +1,2068 @@
1
+ /* src/editor/components/button/button.css */
2
+ .button {
3
+ display: inline-flex;
4
+ align-items: center;
5
+ justify-content: center;
6
+ padding: 8px 16px;
7
+ border: none;
8
+ border-radius: 4px;
9
+ font-weight: 500;
10
+ font-size: 14px;
11
+ text-align: center;
12
+ cursor: pointer;
13
+ transition: all 0.2s ease-out;
14
+ user-select: none;
15
+ }
16
+ .button:disabled {
17
+ cursor: not-allowed;
18
+ opacity: 0.6;
19
+ }
20
+ .button-primary {
21
+ background-color: var(--ui-color-primary);
22
+ color: var(--ui-text-white);
23
+ }
24
+ .button-primary:hover:not(:disabled) {
25
+ background-color: var(--ui-color-primary-dark);
26
+ box-shadow: var(--ui-shadow-primary);
27
+ }
28
+ .button-secondary {
29
+ border: 1px solid var(--ui-secondary-bg-hover);
30
+ background-color: var(--ui-secondary-bg);
31
+ color: var(--ui-text-primary);
32
+ }
33
+ .button-secondary:hover:not(:disabled) {
34
+ border-color: var(--ui-secondary-bg-hover);
35
+ background-color: var(--ui-secondary-bg-hover);
36
+ }
37
+ .button-secondary:active:not(:disabled) {
38
+ background-color: var(--ui-secondary-bg-active);
39
+ }
40
+ .button-loading {
41
+ opacity: 0.7;
42
+ pointer-events: none;
43
+ }
44
+
45
+ /* src/editor/components/input/input.css */
46
+ .input-wrapper {
47
+ display: flex;
48
+ flex-direction: column;
49
+ margin-bottom: 12px;
50
+ gap: 4px;
51
+ }
52
+ .input-label {
53
+ color: var(--ui-text-primary);
54
+ font-weight: 500;
55
+ font-size: 14px;
56
+ }
57
+ .input-field {
58
+ padding: 8px 12px;
59
+ border: 1px solid var(--ui-secondary-bg-hover);
60
+ border-radius: 4px;
61
+ font-size: 14px;
62
+ font-family: inherit;
63
+ transition: all 0.2s ease-out;
64
+ }
65
+ .input-field:focus {
66
+ border-color: var(--ui-color-primary);
67
+ outline: none;
68
+ box-shadow: var(--ui-shadow-primary);
69
+ }
70
+ .input-field:disabled {
71
+ background-color: var(--ui-secondary-bg);
72
+ color: var(--ui-text-disabled);
73
+ cursor: not-allowed;
74
+ }
75
+ .input-error {
76
+ margin-top: 4px;
77
+ color: var(--ui-error-text-simple);
78
+ font-size: 12px;
79
+ }
80
+
81
+ /* src/editor/components/common-modal/common-modal.css */
82
+ .modal-overlay {
83
+ display: flex;
84
+ z-index: 10000;
85
+ position: fixed;
86
+ top: 0;
87
+ right: 0;
88
+ bottom: 0;
89
+ left: 0;
90
+ align-items: center;
91
+ justify-content: center;
92
+ margin: 0 !important;
93
+ background-color: rgba(0, 0, 0, 0.5);
94
+ animation: modal-fadeIn 0.2s ease-out;
95
+ }
96
+ @keyframes modal-fadeIn {
97
+ from {
98
+ opacity: 0;
99
+ }
100
+ to {
101
+ opacity: 1;
102
+ }
103
+ }
104
+ .modal-content {
105
+ position: relative;
106
+ width: 100%;
107
+ max-width: 500px;
108
+ max-height: 90vh;
109
+ overflow: auto;
110
+ border-radius: 8px;
111
+ background-color: var(--ui-text-white);
112
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
113
+ animation: modal-slideIn 0.2s ease-out;
114
+ }
115
+ @keyframes modal-slideIn {
116
+ from {
117
+ transform: scale(0.95);
118
+ opacity: 0;
119
+ }
120
+ to {
121
+ transform: scale(1);
122
+ opacity: 1;
123
+ }
124
+ }
125
+ .modal-close-button {
126
+ display: flex;
127
+ z-index: 1001;
128
+ position: absolute;
129
+ top: 16px;
130
+ right: 16px;
131
+ align-items: center;
132
+ justify-content: center;
133
+ width: 32px;
134
+ height: 32px;
135
+ padding: 0;
136
+ border: none;
137
+ border-radius: 8px;
138
+ background-color: transparent;
139
+ color: var(--ui-text-secondary);
140
+ font-size: 24px;
141
+ line-height: 1;
142
+ cursor: pointer;
143
+ transition: all 0.2s ease-out;
144
+ }
145
+ .modal-close-button svg {
146
+ width: 20px;
147
+ height: 20px;
148
+ }
149
+ .modal-close-button:hover {
150
+ background-color: var(--ui-secondary-bg);
151
+ color: var(--ui-text-primary);
152
+ }
153
+ .modal-close-button:active {
154
+ background-color: var(--ui-secondary-bg-hover);
155
+ }
156
+ .modal-inner-content {
157
+ padding: 24px;
158
+ }
159
+
160
+ /* src/editor/dialogs/add-katex-dialog/add-katex-dialog.css */
161
+ .katex-dialog-title {
162
+ margin: 0 0 16px 0;
163
+ font-weight: 600;
164
+ font-size: 16px;
165
+ }
166
+ .katex-dialog-divider {
167
+ margin-bottom: 16px;
168
+ border: none;
169
+ border-top: 1px soliv var(--tiptap-color-border);
170
+ }
171
+ .katex-dialog-content {
172
+ display: flex;
173
+ flex-direction: column;
174
+ margin-bottom: 16px;
175
+ gap: 16px;
176
+ }
177
+ .katex-dialog-description {
178
+ margin: 0;
179
+ color: var(--ui-text-secondary);
180
+ font-size: 14px;
181
+ line-height: 1.5;
182
+ }
183
+ .katex-dialog-description a {
184
+ color: var(--ui-color-primary);
185
+ text-decoration: none;
186
+ transition: color 150ms ease-in-out;
187
+ }
188
+ .katex-dialog-description a:hover {
189
+ color: var(--ui-color-primary-dark);
190
+ text-decoration: underline;
191
+ }
192
+ .katex-dialog-form-group {
193
+ display: flex;
194
+ flex-direction: column;
195
+ gap: 6px;
196
+ }
197
+ .katex-dialog-label {
198
+ color: var(--ui-text-primary);
199
+ font-weight: 500;
200
+ font-size: 14px;
201
+ }
202
+ .katex-dialog-textarea {
203
+ padding: 8px 12px;
204
+ border: 1px solid var(--tiptap-color-border);
205
+ border-radius: 4px;
206
+ font-size: 14px;
207
+ font-family: monospace;
208
+ resize: vertical;
209
+ transition: border-color 150ms ease-in-out;
210
+ }
211
+ .katex-dialog-textarea:focus {
212
+ border-color: var(--ui-color-primary);
213
+ outline: none;
214
+ box-shadow: 0 0 0 3px var(--tiptap-color-primary-subtle);
215
+ }
216
+ .katex-dialog-textarea::placeholder {
217
+ color: var(--tiptap-color-text-placeholder);
218
+ }
219
+ .katex-dialog-actions {
220
+ display: flex;
221
+ justify-content: flex-end;
222
+ gap: 8px;
223
+ }
224
+ .katex-dialog-button-cancel {
225
+ padding: 8px 16px;
226
+ border: 1px solid var(--tiptap-color-border);
227
+ border-radius: 4px;
228
+ background-color: var(--ui-text-white);
229
+ color: var(--ui-text-primary);
230
+ font-weight: 500;
231
+ font-size: 14px;
232
+ cursor: pointer;
233
+ transition: all 150ms ease-in-out;
234
+ }
235
+ .katex-dialog-button-cancel:hover {
236
+ border-color: var(--ui-secondary-bg-active);
237
+ background-color: var(--ui-secondary-bg);
238
+ }
239
+ .katex-dialog-button-submit {
240
+ padding: 8px 16px;
241
+ border: none;
242
+ border-radius: 4px;
243
+ background-color: var(--ui-color-primary);
244
+ color: var(--ui-text-white);
245
+ font-weight: 500;
246
+ font-size: 14px;
247
+ cursor: pointer;
248
+ transition: all 150ms ease-in-out;
249
+ }
250
+ .katex-dialog-button-submit:hover {
251
+ background-color: var(--ui-color-primary-dark);
252
+ }
253
+ .katex-dialog-button-submit:active {
254
+ transform: scale(0.98);
255
+ }
256
+
257
+ /* src/editor/dialogs/add-link-dialog/add-link-dialog.css */
258
+ .link-dialog-title {
259
+ margin: 0 0 16px 0;
260
+ font-weight: 600;
261
+ font-size: 16px;
262
+ }
263
+ .link-dialog-divider {
264
+ margin-bottom: 16px;
265
+ border: none;
266
+ border-top: 1px soliv var(--tiptap-color-border);
267
+ }
268
+ .link-dialog-content {
269
+ display: flex;
270
+ flex-direction: column;
271
+ margin-bottom: 16px;
272
+ gap: 16px;
273
+ }
274
+ .link-dialog-form-group {
275
+ display: flex;
276
+ flex-direction: column;
277
+ gap: 6px;
278
+ }
279
+ .link-dialog-label {
280
+ color: var(--ui-text-primary);
281
+ font-weight: 500;
282
+ font-size: 14px;
283
+ }
284
+ .link-dialog-input {
285
+ padding: 8px 12px;
286
+ border: 1px solid var(--tiptap-color-border);
287
+ border-radius: 4px;
288
+ font-size: 14px;
289
+ font-family: inherit;
290
+ transition: border-color 150ms ease-in-out;
291
+ }
292
+ .link-dialog-input:focus {
293
+ border-color: var(--ui-color-primary);
294
+ outline: none;
295
+ box-shadow: 0 0 0 3px var(--tiptap-color-primary-subtle);
296
+ }
297
+ .link-dialog-input::placeholder {
298
+ color: var(--tiptap-color-text-placeholder);
299
+ }
300
+ .link-dialog-error {
301
+ padding: 8px 12px;
302
+ border: 1px solid var(--ui-error-border);
303
+ border-radius: 4px;
304
+ background-color: var(--ui-error-bg);
305
+ color: var(--ui-error-text);
306
+ font-size: 13px;
307
+ }
308
+ .link-dialog-actions {
309
+ display: flex;
310
+ justify-content: flex-end;
311
+ gap: 8px;
312
+ }
313
+ .link-dialog-button-cancel {
314
+ padding: 8px 16px;
315
+ border: 1px solid var(--tiptap-color-border);
316
+ border-radius: 4px;
317
+ background-color: var(--ui-text-white);
318
+ color: var(--ui-text-primary);
319
+ font-weight: 500;
320
+ font-size: 14px;
321
+ cursor: pointer;
322
+ transition: all 150ms ease-in-out;
323
+ }
324
+ .link-dialog-button-cancel:hover {
325
+ border-color: var(--ui-secondary-bg-active);
326
+ background-color: var(--ui-secondary-bg);
327
+ }
328
+ .link-dialog-button-submit {
329
+ padding: 8px 16px;
330
+ border: none;
331
+ border-radius: 4px;
332
+ background-color: var(--ui-color-primary);
333
+ color: var(--ui-text-white);
334
+ font-weight: 500;
335
+ font-size: 14px;
336
+ cursor: pointer;
337
+ transition: all 150ms ease-in-out;
338
+ }
339
+ .link-dialog-button-submit:hover {
340
+ background-color: var(--ui-color-primary-dark);
341
+ }
342
+ .link-dialog-button-submit:active {
343
+ transform: scale(0.98);
344
+ }
345
+
346
+ /* src/editor/dialogs/add-video-dialog/add-video-dialog.css */
347
+ .video-dialog-title {
348
+ margin: 0 0 16px 0;
349
+ font-weight: 600;
350
+ font-size: 16px;
351
+ }
352
+ .video-dialog-divider {
353
+ margin-bottom: 16px;
354
+ border: none;
355
+ border-top: 1px solid var(--tiptap-color-border);
356
+ }
357
+ .video-dialog-content {
358
+ display: flex;
359
+ flex-direction: column;
360
+ margin-bottom: 16px;
361
+ gap: 16px;
362
+ }
363
+ .video-dialog-form-group {
364
+ display: flex;
365
+ flex-direction: column;
366
+ gap: 6px;
367
+ }
368
+ .video-dialog-label {
369
+ color: var(--ui-text-primary);
370
+ font-weight: 500;
371
+ font-size: 14px;
372
+ }
373
+ .video-dialog-input {
374
+ padding: 8px 12px;
375
+ border: 1px solid var(--tiptap-color-border);
376
+ border-radius: 4px;
377
+ font-size: 14px;
378
+ font-family: inherit;
379
+ transition: border-color 150ms ease-in-out;
380
+ }
381
+ .video-dialog-input:focus {
382
+ border-color: var(--ui-color-primary);
383
+ outline: none;
384
+ box-shadow: 0 0 0 3px var(--tiptap-color-primary-subtle);
385
+ }
386
+ .video-dialog-input::placeholder {
387
+ color: var(--tiptap-color-text-placeholder);
388
+ }
389
+ .video-dialog-input:disabled {
390
+ background-color: var(--ui-secondary-bg);
391
+ color: var(--tiptap-color-text-disabled);
392
+ cursor: not-allowed;
393
+ }
394
+ .video-dialog-help-text {
395
+ padding: 12px;
396
+ border: 1px solid var(--ui-info-border);
397
+ border-radius: 4px;
398
+ background-color: var(--ui-info-bg);
399
+ font-size: 13px;
400
+ }
401
+ .video-dialog-help-title {
402
+ margin: 0 0 8px 0;
403
+ color: var(--ui-text-primary);
404
+ font-weight: 500;
405
+ }
406
+ .video-dialog-platform-list {
407
+ margin: 0;
408
+ padding-left: 20px;
409
+ color: var(--ui-text-secondary);
410
+ list-style-type: disc;
411
+ }
412
+ .video-dialog-platform-list li {
413
+ margin: 4px 0;
414
+ }
415
+ .video-dialog-error {
416
+ padding: 8px 12px;
417
+ border: 1px solid var(--ui-error-border);
418
+ border-radius: 4px;
419
+ background-color: var(--ui-error-bg);
420
+ color: var(--ui-error-text);
421
+ font-size: 13px;
422
+ }
423
+ .video-dialog-actions {
424
+ display: flex;
425
+ justify-content: flex-end;
426
+ gap: 8px;
427
+ }
428
+ .video-dialog-button-cancel {
429
+ padding: 8px 16px;
430
+ border: 1px solid var(--tiptap-color-border);
431
+ border-radius: 4px;
432
+ background-color: var(--ui-text-white);
433
+ color: var(--ui-text-primary);
434
+ font-weight: 500;
435
+ font-size: 14px;
436
+ cursor: pointer;
437
+ transition: all 150ms ease-in-out;
438
+ }
439
+ .video-dialog-button-cancel:hover {
440
+ border-color: var(--ui-secondary-bg-active);
441
+ background-color: var(--ui-secondary-bg);
442
+ }
443
+ .video-dialog-button-cancel:disabled {
444
+ cursor: not-allowed;
445
+ opacity: 0.6;
446
+ }
447
+ .video-dialog-button-submit {
448
+ padding: 8px 16px;
449
+ border: none;
450
+ border-radius: 4px;
451
+ background-color: var(--ui-color-primary);
452
+ color: var(--ui-text-white);
453
+ font-weight: 500;
454
+ font-size: 14px;
455
+ cursor: pointer;
456
+ transition: all 150ms ease-in-out;
457
+ }
458
+ .video-dialog-button-submit:hover {
459
+ background-color: var(--ui-color-primary-dark);
460
+ }
461
+ .video-dialog-button-submit:active {
462
+ transform: scale(0.98);
463
+ }
464
+ .video-dialog-button-submit:disabled {
465
+ cursor: not-allowed;
466
+ opacity: 0.6;
467
+ }
468
+
469
+ /* src/editor/dialogs/image-dialog/image-dialog.css */
470
+ .image-dialog-title {
471
+ margin: 0;
472
+ font-weight: 600;
473
+ font-size: 16px;
474
+ }
475
+ .image-dialog-divider {
476
+ margin-bottom: 16px;
477
+ border: none;
478
+ border-top: 1px solid var(--tiptap-color-border);
479
+ }
480
+ .image-dialog-form-container {
481
+ margin-bottom: 16px;
482
+ }
483
+ .image-dialog-form {
484
+ display: flex;
485
+ flex-direction: column;
486
+ gap: 12px;
487
+ }
488
+ .image-dialog-preview {
489
+ max-width: 100%;
490
+ height: auto;
491
+ margin-bottom: 12px;
492
+ border-radius: 12px;
493
+ }
494
+ .image-dialog-preview-wrapper {
495
+ display: flex;
496
+ position: relative;
497
+ justify-content: center;
498
+ }
499
+ .image-dialog-preview-wrapper:hover .image-dialog-delete-button {
500
+ display: flex;
501
+ }
502
+ .image-dialog-delete-button {
503
+ display: none;
504
+ position: absolute;
505
+ top: 12px;
506
+ right: 12px;
507
+ align-items: center;
508
+ justify-content: center;
509
+ width: 30px;
510
+ height: 30px;
511
+ padding: 0;
512
+ border: none;
513
+ border-radius: 50%;
514
+ background-color: var(--ui-text-white);
515
+ color: var(--ui-text-primary);
516
+ font-size: 20px;
517
+ cursor: pointer;
518
+ opacity: 0.8;
519
+ transition: all 0.2s ease-out;
520
+ }
521
+ .image-dialog-delete-button svg {
522
+ width: 16px;
523
+ height: 16px;
524
+ }
525
+ .image-dialog-delete-button:hover {
526
+ background-color: var(--ui-secondary-bg);
527
+ opacity: 1;
528
+ }
529
+ .image-dialog-drag-area {
530
+ display: flex;
531
+ align-items: center;
532
+ justify-content: center;
533
+ width: 100%;
534
+ height: 150px;
535
+ border: 2px dashed #cccccc;
536
+ border-radius: 10px;
537
+ background-color: transparent;
538
+ cursor: pointer;
539
+ transition: all 0.2s ease-out;
540
+ }
541
+ .image-dialog-drag-area-active {
542
+ border-color: var(--ui-color-primary);
543
+ background-color: var(--ui-info-bg);
544
+ }
545
+ .image-dialog-actions {
546
+ display: flex;
547
+ justify-content: flex-end;
548
+ gap: 8px;
549
+ }
550
+ .image-dialog-cancel-button {
551
+ background: var(--ui-secondary-bg);
552
+ color: var(--ui-text-primary);
553
+ }
554
+
555
+ /* src/styles/components.css */
556
+
557
+ /* src/styles/extensions/figure.css */
558
+ .tiptap figure {
559
+ display: flex;
560
+ flex-direction: column;
561
+ align-items: center;
562
+ margin: 24px auto;
563
+ }
564
+ .figure-image-container {
565
+ display: inline-block;
566
+ position: relative;
567
+ }
568
+ .figure-image-container img {
569
+ display: block;
570
+ max-width: 100%;
571
+ height: auto;
572
+ border-radius: 12px;
573
+ }
574
+ .figure-edit-button {
575
+ display: flex;
576
+ position: absolute;
577
+ top: 12px;
578
+ right: 12px;
579
+ align-items: center;
580
+ justify-content: center;
581
+ width: 32px;
582
+ height: 32px;
583
+ padding: 0;
584
+ border: 1px solid var(--tiptap-color-border);
585
+ border-radius: 50%;
586
+ background: var(--tiptap-bg-surface-menu);
587
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
588
+ color: var(--ui-text-primary);
589
+ cursor: pointer;
590
+ opacity: 0;
591
+ transition: all 0.2s ease;
592
+ }
593
+ .figure-edit-button svg {
594
+ width: 16px;
595
+ height: 16px;
596
+ }
597
+ .figure-image-container:hover .figure-edit-button,
598
+ .figure-selected .figure-edit-button {
599
+ opacity: 1;
600
+ }
601
+ .figure-edit-button:hover {
602
+ border-color: var(--tiptap-color-primary);
603
+ color: var(--tiptap-color-primary);
604
+ }
605
+ .figure-edit-button:active {
606
+ transform: scale(0.95);
607
+ }
608
+ .tiptap figure figcaption {
609
+ margin-top: 12px;
610
+ font-weight: 600;
611
+ font-size: 16px;
612
+ line-height: 24px;
613
+ letter-spacing: -0.32px;
614
+ text-align: center;
615
+ }
616
+
617
+ /* src/styles/extensions/table.css */
618
+ :root {
619
+ --tiptap-table-header-bg--light: #f2f7fe;
620
+ --tiptap-table-header-bg--dark: #0d6efd26;
621
+ --tiptap-table-border--light: #e0e0e3;
622
+ --tiptap-table-border--dark: #0d6efd26;
623
+ }
624
+ .tableWrapper {
625
+ margin: 32px 0;
626
+ overflow-x: auto;
627
+ overflow-y: hidden;
628
+ }
629
+ .tableWrapper {
630
+ scrollbar-color: black transparent;
631
+ scrollbar-width: thin;
632
+ }
633
+ .tableWrapper::-webkit-scrollbar {
634
+ width: 6px;
635
+ height: 6px;
636
+ }
637
+ .tableWrapper::-webkit-scrollbar-track {
638
+ border-radius: 10px;
639
+ background: transparent;
640
+ }
641
+ .tableWrapper::-webkit-scrollbar-thumb {
642
+ border-radius: 10px;
643
+ background: black;
644
+ }
645
+ .tableWrapper::-webkit-scrollbar-thumb:hover {
646
+ background: #333;
647
+ }
648
+ .tiptap table {
649
+ position: relative;
650
+ width: 100%;
651
+ max-width: 100%;
652
+ margin: 0;
653
+ overflow: hidden;
654
+ border-collapse: collapse;
655
+ table-layout: fixed;
656
+ }
657
+ .tiptap table p {
658
+ margin: 0 !important;
659
+ }
660
+ .tiptap table tr {
661
+ position: relative;
662
+ }
663
+ .tiptap th {
664
+ position: relative;
665
+ background-color: var(--tiptap-table-header-bg--light);
666
+ text-align: center;
667
+ }
668
+ .tiptap th p {
669
+ font-weight: 500;
670
+ }
671
+ [data-theme=dark] .tiptap th {
672
+ background-color: var(--tiptap-table-header-bg--dark);
673
+ }
674
+ .tiptap td,
675
+ .tiptap th {
676
+ box-sizing: border-box;
677
+ position: relative;
678
+ padding: 16px 24px;
679
+ border: 1px solid var(--tiptap-table-border--light);
680
+ text-align: center;
681
+ vertical-align: top;
682
+ }
683
+ [data-theme=dark] .tiptap td,
684
+ [data-theme=dark] .tiptap th {
685
+ border-color: var(--tiptap-table-border--dark);
686
+ }
687
+ .tiptap[contenteditable=true] td:hover,
688
+ .tiptap[contenteditable=true] th:hover {
689
+ background-color: var(--tiptap-color-primary-subtle);
690
+ }
691
+ .tiptap .column-resize-handle {
692
+ position: absolute;
693
+ top: 0;
694
+ right: -2px;
695
+ bottom: -2px;
696
+ width: 4px;
697
+ background-color: var(--tiptap-color-primary-light);
698
+ pointer-events: none;
699
+ }
700
+ .resize-cursor {
701
+ cursor: ew-resize;
702
+ cursor: col-resize;
703
+ }
704
+ .table-indicator {
705
+ z-index: 101;
706
+ position: fixed;
707
+ margin: 0 !important;
708
+ pointer-events: auto;
709
+ }
710
+ .table-indicator__button {
711
+ display: flex;
712
+ align-items: center;
713
+ justify-content: center;
714
+ width: 24px;
715
+ height: 12px;
716
+ padding: 0;
717
+ border: 1px solid var(--tiptap-color-primary-light);
718
+ border-radius: 4px;
719
+ background-color: var(--tiptap-bg-surface-menu);
720
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
721
+ color: var(--tiptap-color-primary);
722
+ font-size: 18px;
723
+ cursor: pointer;
724
+ transition: all 150ms ease-in-out;
725
+ }
726
+ .table-indicator__button:hover {
727
+ background-color: var(--tiptap-color-primary);
728
+ color: white;
729
+ }
730
+ .table-indicator__button--row {
731
+ width: 12px;
732
+ height: 24px;
733
+ }
734
+ .table-context-menu {
735
+ z-index: 102;
736
+ position: fixed;
737
+ animation: slideIn 150ms ease-out;
738
+ pointer-events: auto;
739
+ }
740
+ @keyframes slideIn {
741
+ from {
742
+ transform: scale(0.95);
743
+ opacity: 0;
744
+ }
745
+ to {
746
+ transform: scale(1);
747
+ opacity: 1;
748
+ }
749
+ }
750
+ .table-context-menu__content {
751
+ display: flex;
752
+ flex-direction: column;
753
+ width: 275px;
754
+ max-height: 300px;
755
+ padding: 12px;
756
+ overflow-y: auto;
757
+ gap: 6px;
758
+ border: 1px solid var(--tiptap-color-primary-light);
759
+ border-radius: var(--tiptap-radius);
760
+ background-color: var(--tiptap-bg-surface-menu);
761
+ box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
762
+ scrollbar-color: black transparent;
763
+ scrollbar-width: thin;
764
+ }
765
+ .table-context-menu__content::-webkit-scrollbar {
766
+ width: 6px;
767
+ height: 6px;
768
+ }
769
+ .table-context-menu__content::-webkit-scrollbar-track {
770
+ border-radius: 10px;
771
+ background: transparent;
772
+ }
773
+ .table-context-menu__content::-webkit-scrollbar-thumb {
774
+ border-radius: 10px;
775
+ background: black;
776
+ }
777
+ .table-context-menu__content::-webkit-scrollbar-thumb:hover {
778
+ background: #333;
779
+ }
780
+ .table-context-menu__button {
781
+ display: flex;
782
+ align-items: center;
783
+ width: 100%;
784
+ padding: 6px 12px;
785
+ gap: 8px;
786
+ border: none;
787
+ border-radius: 4px;
788
+ outline: none;
789
+ background: transparent;
790
+ color: var(--tiptap-color-primary);
791
+ font-weight: 500;
792
+ font-size: 14px;
793
+ text-align: left;
794
+ cursor: pointer;
795
+ transition: all 0.15s ease-in-out;
796
+ }
797
+ .table-context-menu__button:hover {
798
+ outline: none;
799
+ background-color: var(--tiptap-color-primary);
800
+ color: var(--tiptap-state-control-active-color);
801
+ }
802
+ .table-context-menu__button:active {
803
+ outline: none;
804
+ background-color: var(--tiptap-color-primary);
805
+ color: var(--tiptap-state-control-active-color);
806
+ }
807
+ .table-context-menu__button--danger {
808
+ color: var(--tiptap-color-primary-error);
809
+ }
810
+ .table-context-menu__button--danger:hover {
811
+ outline: none;
812
+ background-color: var(--ui-error-bg);
813
+ color: var(--tiptap-color-primary-error);
814
+ }
815
+ .table-context-menu__button--danger:active {
816
+ outline: none;
817
+ background-color: var(--tiptap-color-primary-error);
818
+ color: white;
819
+ }
820
+ .table-context-menu__button svg {
821
+ display: flex;
822
+ flex-shrink: 0;
823
+ align-items: center;
824
+ justify-content: center;
825
+ width: 20px;
826
+ height: 20px;
827
+ }
828
+ .table-context-menu__divider {
829
+ height: 1px;
830
+ margin: 6px 0;
831
+ background-color: var(--tiptap-color-border);
832
+ }
833
+
834
+ /* src/styles/extensions/details.css */
835
+ [data-type=details] {
836
+ display: flex;
837
+ align-items: baseline;
838
+ margin: 24px 0;
839
+ padding: 8px;
840
+ gap: 8px;
841
+ border: 1px solid var(--tiptap-color-primary-light);
842
+ border-radius: 8px;
843
+ }
844
+ [data-type=details] > button {
845
+ border: none;
846
+ outline: none;
847
+ background: transparent;
848
+ color: var(--tiptap-color-primary);
849
+ cursor: pointer;
850
+ transition: all 150ms ease-in-out;
851
+ }
852
+ [data-type=details] > button::before {
853
+ position: relative;
854
+ bottom: 2px;
855
+ content: "\25b6";
856
+ }
857
+ [data-type=details] > div {
858
+ display: flex;
859
+ flex-direction: column;
860
+ width: 100%;
861
+ gap: 8px;
862
+ }
863
+ [data-type=details].is-open > button {
864
+ transform: rotate(90deg);
865
+ }
866
+ .tiptap details.details {
867
+ align-items: baseline;
868
+ margin: 24px 0;
869
+ padding: 8px;
870
+ gap: 8px;
871
+ border: 1px solid var(--tiptap-color-primary-light);
872
+ border-radius: 8px;
873
+ }
874
+ .tiptap details.details summary {
875
+ display: flex;
876
+ flex: 1;
877
+ align-items: baseline;
878
+ gap: 8px;
879
+ border: none;
880
+ outline: none;
881
+ background: transparent;
882
+ list-style: none;
883
+ cursor: pointer;
884
+ transition: all 150ms ease-in-out;
885
+ }
886
+ .tiptap details.details summary::before {
887
+ display: inline-block;
888
+ flex-shrink: 0;
889
+ content: "\25b6";
890
+ color: var(--tiptap-color-primary);
891
+ font-size: 16px;
892
+ transition: transform 150ms ease-in-out;
893
+ }
894
+ .tiptap details.details[open] summary::before {
895
+ transform: rotate(90deg);
896
+ }
897
+ .tiptap details.details summary::-webkit-details-marker {
898
+ display: none;
899
+ }
900
+ .tiptap details.details > div[data-type=detailsContent] {
901
+ display: flex;
902
+ flex-direction: column;
903
+ width: 100%;
904
+ margin-top: 12px;
905
+ padding-left: 20px;
906
+ gap: 8px;
907
+ }
908
+
909
+ /* src/styles/extensions/myth-reality.css */
910
+ :root {
911
+ --tiptap-myth-bg--light: #fff0ef;
912
+ --tiptap-myth-bg--dark: #ff000014;
913
+ --tiptap-reality-bg--light: #f0fdf9;
914
+ --tiptap-reality-bg--dark: #1bae7514;
915
+ }
916
+ [data-myth-reality] {
917
+ display: flex;
918
+ flex-direction: column;
919
+ margin: 32px 0;
920
+ gap: 16px;
921
+ }
922
+ [data-myth-reality-block] {
923
+ flex: 1;
924
+ padding: 24px;
925
+ padding-left: 20px;
926
+ border-radius: 10px;
927
+ }
928
+ [data-myth-reality-block]:first-child .myth-reality-block-content {
929
+ padding-left: 16px;
930
+ border-left: 3px solid #ff363a;
931
+ }
932
+ [data-myth-reality-block]:first-child {
933
+ border-radius: 10px;
934
+ background-color: var(--tiptap-myth-bg--light);
935
+ }
936
+ [data-theme=dark] [data-myth-reality-block]:first-child {
937
+ background-color: var(--tiptap-myth-bg--dark);
938
+ }
939
+ [data-myth-reality-block]:last-child .myth-reality-block-content {
940
+ padding-left: 16px;
941
+ border-left: 3px solid #30cf40;
942
+ }
943
+ [data-myth-reality-block]:last-child {
944
+ background-color: var(--tiptap-reality-bg--light);
945
+ }
946
+ [data-theme=dark] [data-myth-reality-block]:last-child {
947
+ background-color: var(--tiptap-reality-bg--dark);
948
+ }
949
+ .myth-reality-block-content p:first-child {
950
+ margin-bottom: 8px;
951
+ font-weight: 600;
952
+ }
953
+ .myth-reality-block-content ul p,
954
+ .myth-reality-block-content li p {
955
+ margin-bottom: 0;
956
+ font-size: var(--tiptap-font-size);
957
+ }
958
+
959
+ /* src/styles/extensions/custom-quote.css */
960
+ [data-custom-quote] {
961
+ display: flex;
962
+ flex-direction: column;
963
+ margin: 24px 0;
964
+ padding: 8px;
965
+ border-radius: 8px;
966
+ text-align: center;
967
+ }
968
+ .custom-quote-divider {
969
+ width: 100%;
970
+ height: 1px;
971
+ }
972
+ .custom-quote-svg-wrapper {
973
+ display: flex;
974
+ align-items: center;
975
+ justify-content: center;
976
+ margin: 24px 0;
977
+ color: var(--tiptap-color-primary);
978
+ }
979
+ .custom-quote-svg-wrapper svg {
980
+ width: 48px;
981
+ height: 48px;
982
+ }
983
+ [data-custom-quote-text] {
984
+ display: flex;
985
+ flex-direction: column;
986
+ max-width: 700px;
987
+ margin: 0 auto 16px;
988
+ }
989
+ [data-custom-quote-text] .is-empty::before {
990
+ position: absolute;
991
+ left: 50%;
992
+ transform: translateX(-50%);
993
+ content: attr(data-placeholder);
994
+ color: var(--tiptap-color-text-placeholder);
995
+ pointer-events: none;
996
+ }
997
+ [data-custom-quote-text] p {
998
+ margin: 0;
999
+ font-weight: 500;
1000
+ font-size: 18px;
1001
+ line-height: 140%;
1002
+ letter-spacing: -0.36px;
1003
+ }
1004
+ [data-custom-quote-author] {
1005
+ display: flex;
1006
+ flex-direction: column;
1007
+ margin-bottom: 4px;
1008
+ font-weight: 500;
1009
+ font-size: 14px;
1010
+ line-height: 130%;
1011
+ letter-spacing: -0.14px;
1012
+ }
1013
+ [data-custom-quote-author] .is-empty::before {
1014
+ position: absolute;
1015
+ left: 50%;
1016
+ transform: translateX(-50%);
1017
+ content: attr(data-placeholder);
1018
+ color: var(--tiptap-color-text-placeholder);
1019
+ pointer-events: none;
1020
+ }
1021
+ [data-custom-quote-author] p {
1022
+ margin: 0;
1023
+ color: #000;
1024
+ font-weight: 600;
1025
+ font-size: 14px;
1026
+ line-height: 1.43;
1027
+ text-align: center;
1028
+ }
1029
+ [data-custom-quote-sign] {
1030
+ display: flex;
1031
+ flex-direction: column;
1032
+ color: #6a6a6a;
1033
+ font-size: 12px;
1034
+ line-height: 120%;
1035
+ letter-spacing: 0px;
1036
+ }
1037
+ [data-custom-quote-sign] .is-empty::before {
1038
+ position: absolute;
1039
+ left: 50%;
1040
+ transform: translateX(-50%);
1041
+ content: attr(data-placeholder);
1042
+ color: var(--tiptap-color-text-placeholder);
1043
+ pointer-events: none;
1044
+ }
1045
+ [data-custom-quote-sign] p {
1046
+ margin: 0;
1047
+ font-size: 12px;
1048
+ line-height: 1.5;
1049
+ text-align: center;
1050
+ }
1051
+
1052
+ /* src/styles/extensions/callout.css */
1053
+ :root {
1054
+ --tiptap-callout-success-bg--light: #f0fdf9;
1055
+ --tiptap-callout-success-text--light: #08493f;
1056
+ --tiptap-callout-success-bg--dark: #1bae7514;
1057
+ --tiptap-callout-success-text--dark: #fff;
1058
+ --tiptap-callout-info-bg--light: #ebefff;
1059
+ --tiptap-callout-info-text--light: #00359e;
1060
+ --tiptap-callout-info-bg--dark: #0d6efd15;
1061
+ --tiptap-callout-info-text--dark: #fff;
1062
+ --tiptap-callout-error-bg--light: #fee4e2;
1063
+ --tiptap-callout-error-text--light: #7a271a;
1064
+ --tiptap-callout-error-bg--dark: #ff000014;
1065
+ --tiptap-callout-error-text--dark: #fff;
1066
+ --tiptap-callout-warning-bg--light: #fffaeb;
1067
+ --tiptap-callout-warning-text--light: #772917;
1068
+ --tiptap-callout-warning-bg--dark: #ffbf0014;
1069
+ --tiptap-callout-warning-text--dark: #fff;
1070
+ }
1071
+ .callout-node {
1072
+ display: flex;
1073
+ margin: 32px 0;
1074
+ padding: 16px;
1075
+ gap: 10px;
1076
+ border-radius: 8px;
1077
+ }
1078
+ .callout-node:has(.callout-content h2),
1079
+ .callout-node:has(.callout-content h3),
1080
+ .callout-node:has(.callout-content h4),
1081
+ .callout-node:has(.callout-content h5),
1082
+ .callout-node:has(.callout-content h6) {
1083
+ align-items: baseline;
1084
+ }
1085
+ .callout-node p {
1086
+ font-size: 16px;
1087
+ line-height: 22px;
1088
+ letter-spacing: -0.28px;
1089
+ }
1090
+ .callout-node.callout-info {
1091
+ background-color: var(--tiptap-callout-info-bg--light);
1092
+ color: var(--tiptap-callout-info-text--light);
1093
+ }
1094
+ [data-theme=dark] .callout-node.callout-info {
1095
+ background-color: var(--tiptap-callout-info-bg--dark);
1096
+ color: var(--tiptap-callout-success-text--dark);
1097
+ }
1098
+ .callout-node.callout-warning {
1099
+ background-color: var(--tiptap-callout-warning-bg--light);
1100
+ color: var(--tiptap-callout-warning-text--light);
1101
+ }
1102
+ [data-theme=dark] .callout-node.callout-warning {
1103
+ background-color: var(--tiptap-callout-warning-bg--dark);
1104
+ color: var(--tiptap-callout-success-text--dark);
1105
+ }
1106
+ .callout-node.callout-success {
1107
+ background-color: var(--tiptap-callout-success-bg--light);
1108
+ color: var(--tiptap-callout-success-text--light);
1109
+ }
1110
+ [data-theme=dark] .callout-node.callout-success {
1111
+ background-color: var(--tiptap-callout-success-bg--dark);
1112
+ color: var(--tiptap-callout-success-text--dark);
1113
+ }
1114
+ .callout-node.callout-error {
1115
+ background-color: var(--tiptap-callout-error-bg--light);
1116
+ color: var(--tiptap-callout-error-text--light);
1117
+ }
1118
+ [data-theme=dark] .callout-node.callout-error {
1119
+ background-color: var(--tiptap-callout-error-bg--dark);
1120
+ color: var(--tiptap-callout-success-text--dark);
1121
+ }
1122
+ .callout-icon-button {
1123
+ outline: none;
1124
+ }
1125
+ .tiptap .callout-icon {
1126
+ display: block;
1127
+ margin-top: 2px;
1128
+ font-size: 20px;
1129
+ }
1130
+ .tiptap .callout-icon svg {
1131
+ width: 20px;
1132
+ height: 20px;
1133
+ }
1134
+ .callout-content-wrapper {
1135
+ flex: 1;
1136
+ min-width: 0;
1137
+ }
1138
+ .callout-content {
1139
+ color: inherit;
1140
+ }
1141
+ .callout-content p {
1142
+ margin: 8px 0;
1143
+ color: inherit;
1144
+ }
1145
+ .callout-content p:first-child {
1146
+ margin-top: 0;
1147
+ }
1148
+ .callout-content p:last-child {
1149
+ margin-bottom: 0;
1150
+ }
1151
+ .callout-content ul,
1152
+ .callout-content ol {
1153
+ margin: 8px 0 8px 20px;
1154
+ color: inherit;
1155
+ }
1156
+ .callout-content li {
1157
+ margin: 4px 0;
1158
+ color: inherit;
1159
+ }
1160
+ .callout-content strong,
1161
+ .callout-content b {
1162
+ color: inherit;
1163
+ }
1164
+ .callout-content em,
1165
+ .callout-content i {
1166
+ color: inherit;
1167
+ }
1168
+ .callout-content a {
1169
+ color: inherit;
1170
+ text-decoration: underline;
1171
+ }
1172
+ .callout-content ul,
1173
+ .callout-content ol {
1174
+ padding-left: 0;
1175
+ }
1176
+
1177
+ /* src/styles/extensions/code-block.css */
1178
+ :root {
1179
+ --tiptap-code-block-background: #111927;
1180
+ --tiptap-code-block-border: #404040;
1181
+ --tiptap-code-block-text: #e0e0e0;
1182
+ --tiptap-code-block-copy-button: #eaecef;
1183
+ --tiptap-code-block-copy-button-hover: #cdc8c8;
1184
+ --tiptap-code-block-font-family: "Fira Code", monospace;
1185
+ }
1186
+ .tiptap-code-block-wrapper {
1187
+ display: flex;
1188
+ flex-direction: column;
1189
+ margin: 32px 0;
1190
+ padding: 24px;
1191
+ overflow: hidden;
1192
+ border-radius: var(--tiptap-radius);
1193
+ background-color: var(--tiptap-code-block-background);
1194
+ }
1195
+ .tiptap-code-block-header {
1196
+ display: flex;
1197
+ align-items: center;
1198
+ justify-content: space-between;
1199
+ padding-bottom: 16px;
1200
+ gap: 12px;
1201
+ border-bottom: 1px solid var(--tiptap-code-block-border);
1202
+ }
1203
+ .tiptap-code-block-language-select {
1204
+ flex: 1;
1205
+ max-width: 50%;
1206
+ padding: 6px 12px;
1207
+ border: 1px solid var(--tiptap-code-block-border);
1208
+ border-radius: 4px;
1209
+ background-color: var(--tiptap-code-block-background);
1210
+ color: var(--tiptap-code-block-text);
1211
+ font-size: 14px;
1212
+ font-family: var(--tiptap-code-block-font-family);
1213
+ cursor: pointer;
1214
+ }
1215
+ .tiptap-code-block-language-select:focus {
1216
+ border-color: var(--tiptap-color-primary);
1217
+ outline: none;
1218
+ background-color: var(--tiptap-color-primary-subtle);
1219
+ }
1220
+ .tiptap-code-block-language-select option {
1221
+ background-color: var(--tiptap-code-block-background);
1222
+ color: var(--tiptap-code-block-text);
1223
+ }
1224
+ .tiptap-code-block-language-text {
1225
+ display: inline-block;
1226
+ flex: 1;
1227
+ max-width: 50%;
1228
+ color: var(--tiptap-code-block-text);
1229
+ font-family: var(--tiptap-code-block-font-family);
1230
+ }
1231
+ .tiptap-code-block-copy-button {
1232
+ display: flex;
1233
+ align-items: center;
1234
+ justify-content: center;
1235
+ width: 30px;
1236
+ height: 30px;
1237
+ border: none;
1238
+ outline: none;
1239
+ background-color: transparent;
1240
+ color: var(--tiptap-code-block-copy-button);
1241
+ cursor: pointer;
1242
+ transition: all 150ms ease-in-out;
1243
+ }
1244
+ .tiptap-code-block-copy-button svg {
1245
+ width: 24px;
1246
+ height: 24px;
1247
+ }
1248
+ .tiptap-code-block-copy-button:hover {
1249
+ color: var(--tiptap-code-block-copy-button-hover);
1250
+ }
1251
+ .tiptap-code-block {
1252
+ margin: 0;
1253
+ padding: 24px 0;
1254
+ overflow-x: auto;
1255
+ color: var(--tiptap-code-block-text);
1256
+ font-size: var(--tiptap-font-size);
1257
+ line-height: 1.5;
1258
+ font-family: var(--tiptap-code-block-font-family);
1259
+ }
1260
+ .tiptap-code-block::-webkit-scrollbar {
1261
+ height: 8px;
1262
+ }
1263
+ .tiptap-code-block::-webkit-scrollbar-track {
1264
+ background-color: var(--tiptap-code-block-background);
1265
+ }
1266
+ .tiptap-code-block::-webkit-scrollbar-thumb {
1267
+ border-radius: 4px;
1268
+ background-color: var(--tiptap-code-block-border);
1269
+ }
1270
+ .tiptap-code-block::-webkit-scrollbar-thumb:hover {
1271
+ background-color: var(--tiptap-color-primary);
1272
+ }
1273
+
1274
+ /* src/styles/extensions/prompt.css */
1275
+ :root {
1276
+ --tiptap-prompt-background--light: #f2f7fe;
1277
+ --tiptap-prompt-content-background--light: #fff;
1278
+ --tiptap-prompt-background--dark: #0d6efd26;
1279
+ --tiptap-prompt-content-background--dark: #101012;
1280
+ --tiptap-prompt-action-color: #0d6efd;
1281
+ --tiptap-prompt-border-radius: 20px;
1282
+ --tiptap-prompt-content-border-radius: 12px;
1283
+ --tiptap-prompt-padding: 24px;
1284
+ --tiptap-prompt-content-padding: 16px;
1285
+ --tiptap-prompt-max-height: 220px;
1286
+ --tiptap-prompt-font-family: "Fira Code", monospace;
1287
+ --tiptap-prompt-font-size: 16px;
1288
+ --tiptap-prompt-header-font-size: 20px;
1289
+ }
1290
+ [data-prompt] {
1291
+ display: flex;
1292
+ flex-direction: column;
1293
+ margin: 24px 0;
1294
+ padding: var(--tiptap-prompt-padding);
1295
+ gap: 8px;
1296
+ border-radius: var(--tiptap-prompt-border-radius);
1297
+ background-color: var(--tiptap-prompt-background--light);
1298
+ }
1299
+ [data-theme=dark] [data-prompt] {
1300
+ background-color: var(--tiptap-prompt-background--dark);
1301
+ }
1302
+ .prompt-header-wrapper {
1303
+ display: flex;
1304
+ position: relative;
1305
+ justify-content: space-between;
1306
+ margin-bottom: 16px;
1307
+ gap: 8px;
1308
+ font-weight: 600;
1309
+ font-size: var(--tiptap-prompt-header-font-size);
1310
+ }
1311
+ .prompt-content-wrapper {
1312
+ display: flex;
1313
+ flex-direction: column;
1314
+ max-height: var(--tiptap-prompt-max-height);
1315
+ padding: var(--tiptap-prompt-content-padding);
1316
+ overflow-y: auto;
1317
+ gap: 8px;
1318
+ border-radius: var(--tiptap-prompt-content-border-radius);
1319
+ background-color: var(--tiptap-prompt-content-background--light);
1320
+ font-weight: 400;
1321
+ font-size: var(--tiptap-prompt-font-size);
1322
+ line-height: 24px;
1323
+ font-family: var(--tiptap-prompt-font-family);
1324
+ }
1325
+ [data-theme=dark] .prompt-content-wrapper {
1326
+ background-color: var(--tiptap-prompt-content-background--dark);
1327
+ }
1328
+ .prompt-copy-icon-wrapper {
1329
+ display: flex;
1330
+ flex-shrink: 0;
1331
+ align-items: center;
1332
+ justify-content: center;
1333
+ color: var(--tiptap-prompt-action-color);
1334
+ cursor: pointer;
1335
+ }
1336
+ .prompt-copy-icon-wrapper svg {
1337
+ width: 20px;
1338
+ height: 20px;
1339
+ }
1340
+
1341
+ /* src/styles/extensions/video.css */
1342
+ [data-video] {
1343
+ display: flex;
1344
+ flex-direction: column;
1345
+ margin: 24px 0;
1346
+ padding: 0;
1347
+ border-radius: 8px;
1348
+ }
1349
+ .video-player-wrapper {
1350
+ aspect-ratio: 16 / 9;
1351
+ width: 100%;
1352
+ max-width: 800px;
1353
+ margin: 0 auto;
1354
+ overflow: hidden;
1355
+ border-radius: 12px;
1356
+ background-color: #000;
1357
+ }
1358
+ .video-iframe {
1359
+ width: 100%;
1360
+ height: 100%;
1361
+ border: 0;
1362
+ border-radius: 12px;
1363
+ }
1364
+ .video-error {
1365
+ display: flex;
1366
+ align-items: center;
1367
+ justify-content: center;
1368
+ aspect-ratio: 16 / 9;
1369
+ width: 100%;
1370
+ max-width: 640px;
1371
+ padding: 20px;
1372
+ border-radius: 12px;
1373
+ background-color: #f5f5f5;
1374
+ color: #666;
1375
+ font-size: 14px;
1376
+ text-align: center;
1377
+ }
1378
+ .video-loading {
1379
+ display: flex;
1380
+ align-items: center;
1381
+ justify-content: center;
1382
+ width: 100%;
1383
+ height: 100%;
1384
+ color: #999;
1385
+ font-size: 14px;
1386
+ }
1387
+ .video-content {
1388
+ margin-top: 8px;
1389
+ }
1390
+
1391
+ /* src/styles/extensions/math.css */
1392
+ .tiptap .tiptap-mathematics-render[data-type=inline-math] {
1393
+ display: inline-block;
1394
+ padding: 2px 6px;
1395
+ border-radius: 4px;
1396
+ transition: all 150ms ease-in-out;
1397
+ }
1398
+ .tiptap[contenteditable=true] .tiptap-mathematics-render[data-type=inline-math] {
1399
+ cursor: pointer;
1400
+ }
1401
+ .tiptap[contenteditable=true] .tiptap-mathematics-render[data-type=inline-math]:hover {
1402
+ background-color: var(--tiptap-color-primary-subtle);
1403
+ }
1404
+ .tiptap .tiptap-mathematics-render[data-type=block-math] {
1405
+ display: block;
1406
+ margin: 16px 0;
1407
+ padding: 8px 12px;
1408
+ border-radius: 6px;
1409
+ transition: all 150ms ease-in-out;
1410
+ }
1411
+ .tiptap[contenteditable=true] .tiptap-mathematics-render[data-type=block-math] {
1412
+ cursor: pointer;
1413
+ }
1414
+ .tiptap[contenteditable=true] .tiptap-mathematics-render[data-type=block-math]:hover {
1415
+ background-color: var(--tiptap-color-primary-subtle);
1416
+ }
1417
+
1418
+ /* src/styles/extensions/commands-list.css */
1419
+ .commands-list-container {
1420
+ display: flex;
1421
+ z-index: 50;
1422
+ flex-direction: column;
1423
+ width: 280px;
1424
+ max-height: 300px;
1425
+ padding: 12px;
1426
+ overflow-y: auto;
1427
+ gap: 6px;
1428
+ border: 1px solid var(--tiptap-color-primary-light);
1429
+ border-radius: var(--tiptap-radius);
1430
+ background-color: var(--tiptap-bg-surface-menu);
1431
+ box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
1432
+ scrollbar-color: black transparent;
1433
+ scrollbar-width: thin;
1434
+ }
1435
+ .commands-list-container::-webkit-scrollbar {
1436
+ width: 6px;
1437
+ height: 6px;
1438
+ }
1439
+ .commands-list-container::-webkit-scrollbar-track {
1440
+ border-radius: 10px;
1441
+ background: transparent;
1442
+ }
1443
+ .commands-list-container::-webkit-scrollbar-thumb {
1444
+ border-radius: 10px;
1445
+ background: black;
1446
+ }
1447
+ .commands-list-container::-webkit-scrollbar-thumb:hover {
1448
+ background: #333;
1449
+ }
1450
+ .commands-list-item {
1451
+ display: flex;
1452
+ align-items: center;
1453
+ width: 100%;
1454
+ padding: 6px 12px;
1455
+ gap: 8px;
1456
+ border: none;
1457
+ border-radius: 4px;
1458
+ background: transparent;
1459
+ color: var(--tiptap-color-primary);
1460
+ font-weight: 500;
1461
+ font-size: 14px;
1462
+ text-align: left;
1463
+ cursor: pointer;
1464
+ transition: all 0.15s ease-in-out;
1465
+ }
1466
+ .commands-list-item:hover {
1467
+ outline: 1px solid var(--tiptap-color-primary-light);
1468
+ background-color: var(--tiptap-color-primary-subtle);
1469
+ }
1470
+ .commands-list-item.active {
1471
+ outline: none;
1472
+ background-color: var(--tiptap-color-primary);
1473
+ color: var(--tiptap-state-control-active-color);
1474
+ }
1475
+ .commands-list-icon svg {
1476
+ width: 24px;
1477
+ height: 24px;
1478
+ }
1479
+ .commands-list-title {
1480
+ flex: 1;
1481
+ font-weight: 500;
1482
+ }
1483
+ .commands-list-empty {
1484
+ padding: 20px 12px;
1485
+ border: none;
1486
+ border-radius: 4px;
1487
+ background: transparent;
1488
+ color: var(--tiptap-color-text-placeholder);
1489
+ font-size: 14px;
1490
+ text-align: center;
1491
+ }
1492
+
1493
+ /* src/styles/extensions/index.css */
1494
+
1495
+ /* src/styles/editor/variables.css */
1496
+ :root {
1497
+ --tiptap-color-primary: #6366f1;
1498
+ --tiptap-color-primary-light: #6366f150;
1499
+ --tiptap-color-primary-subtle: rgba(99, 102, 241, 0.08);
1500
+ --tiptap-color-link: #0059df;
1501
+ --tiptap-color-primary-error: #f04438;
1502
+ --tiptap-color-border: #f2f4f7;
1503
+ --tiptap-color-divider: #aaabb7;
1504
+ --tiptap-color-text-disabled: #aaabb7;
1505
+ --tiptap-color-text-placeholder: #aaabb7;
1506
+ --ui-color-primary: #6366f1;
1507
+ --ui-color-primary-dark: #4f46e5;
1508
+ --ui-shadow-primary: 0 2px 4px rgba(99, 102, 241, 0.3);
1509
+ --ui-text-primary: #333333;
1510
+ --ui-text-secondary: #666666;
1511
+ --ui-text-disabled: #999999;
1512
+ --ui-text-white: #ffffff;
1513
+ --ui-secondary-bg: #f0f0f0;
1514
+ --ui-secondary-bg-hover: #e8e8e8;
1515
+ --ui-secondary-bg-active: #dcdcdc;
1516
+ --ui-info-bg: #f5f7ff;
1517
+ --ui-info-border: #e0e7ff;
1518
+ --ui-error-bg: #fee4e2;
1519
+ --ui-error-border: #fcd5d0;
1520
+ --ui-error-text: #7a271a;
1521
+ --tiptap-bg-surface: #fff;
1522
+ --tiptap-bg-surface-menu: #fff;
1523
+ --tiptap-state-control-active-color: #fff;
1524
+ --tiptap-state-control-disabled-color: #aaabb7;
1525
+ --tiptap-font-family:
1526
+ "Golos Text",
1527
+ -apple-system,
1528
+ BlinkMacSystemFont,
1529
+ "Segoe UI",
1530
+ Roboto,
1531
+ sans-serif;
1532
+ --tiptap-font-size: 18px;
1533
+ --tiptap-radius: 8px;
1534
+ --tiptap-spacing: 16px;
1535
+ --tiptap-copyable-bg--light: #f5f5f5;
1536
+ --tiptap-copyable-bg--dark: #1a1a1a;
1537
+ --tiptap-copyable-border--light: #cbcbcb;
1538
+ --tiptap-copyable-border--dark: #3a3a3a;
1539
+ --tiptap-copyable-border-hover--light: #b0b5bd;
1540
+ --tiptap-copyable-border-hover--dark: #4a5a6a;
1541
+ --tiptap-copyable-bg-hover--light: #ececec;
1542
+ --tiptap-copyable-bg-hover--dark: #252525;
1543
+ }
1544
+
1545
+ /* src/styles/editor/base.css */
1546
+ .tiptap-content-wrapper {
1547
+ position: relative;
1548
+ margin: 0 !important;
1549
+ }
1550
+ .tiptap {
1551
+ padding: var(--tiptap-spacing);
1552
+ border: 1px solid var(--tiptap-color-border);
1553
+ border-radius: var(--tiptap-radius);
1554
+ font-size: var(--tiptap-font-size);
1555
+ font-family: var(--tiptap-font-family);
1556
+ }
1557
+ .tiptap:focus {
1558
+ border-color: var(--tiptap-color-primary-light);
1559
+ outline: none;
1560
+ }
1561
+ .tiptap-content-wrapper.has-error .tiptap {
1562
+ border-color: var(--tiptap-color-primary-error);
1563
+ }
1564
+ .tiptap-error-message {
1565
+ margin: 8px 0 0 0 !important;
1566
+ color: var(--tiptap-color-primary-error);
1567
+ font-size: 14px;
1568
+ }
1569
+ .tiptap[data-tiptap-render],
1570
+ .tiptap[contenteditable=false] {
1571
+ padding: 0;
1572
+ border: none;
1573
+ outline: none;
1574
+ }
1575
+ .tiptap[data-tiptap-render] [data-placeholder].is-empty,
1576
+ .tiptap[contenteditable=false] [data-placeholder].is-empty {
1577
+ display: none;
1578
+ }
1579
+
1580
+ /* src/styles/editor/typography.css */
1581
+ .tiptap p {
1582
+ margin: 0;
1583
+ font-weight: 400;
1584
+ font-size: var(--tiptap-font-size);
1585
+ line-height: 140%;
1586
+ letter-spacing: 0;
1587
+ }
1588
+ .tiptap > * {
1589
+ letter-spacing: 0;
1590
+ }
1591
+ .tiptap p:not(:last-child),
1592
+ .tiptap ul:not(:last-child),
1593
+ .tiptap ol:not(:last-child),
1594
+ .tiptap blockquote:not(:last-child) {
1595
+ margin-bottom: var(--tiptap-spacing);
1596
+ }
1597
+ .tiptap h2 {
1598
+ font-weight: 600;
1599
+ font-size: 36px;
1600
+ line-height: 130%;
1601
+ letter-spacing: -0.72px;
1602
+ }
1603
+ .tiptap h3 {
1604
+ font-weight: 600;
1605
+ font-size: 28px;
1606
+ line-height: 130%;
1607
+ letter-spacing: -0.56px;
1608
+ }
1609
+ .tiptap h4 {
1610
+ font-weight: 600;
1611
+ font-size: 24px;
1612
+ line-height: 130%;
1613
+ letter-spacing: -0.48px;
1614
+ }
1615
+ .tiptap h5 {
1616
+ font-weight: 600;
1617
+ font-size: 20px;
1618
+ line-height: 130%;
1619
+ letter-spacing: -0.4px;
1620
+ }
1621
+ .tiptap h6 {
1622
+ font-weight: 600;
1623
+ font-size: 18px;
1624
+ line-height: 140%;
1625
+ letter-spacing: -0.36px;
1626
+ }
1627
+ .tiptap h1,
1628
+ .tiptap h2,
1629
+ .tiptap h3,
1630
+ .tiptap h4,
1631
+ .tiptap h5,
1632
+ .tiptap h6 {
1633
+ margin: 0;
1634
+ }
1635
+ .tiptap h1,
1636
+ .tiptap h2,
1637
+ .tiptap h3 {
1638
+ margin-bottom: 20px;
1639
+ }
1640
+ .tiptap h4,
1641
+ .tiptap h5,
1642
+ .tiptap h6 {
1643
+ margin-bottom: 12px;
1644
+ }
1645
+ .tiptap ul,
1646
+ .tiptap ol {
1647
+ padding-left: 32px;
1648
+ }
1649
+ .tiptap ul:not(:last-child),
1650
+ .tiptap ol:not(:last-child),
1651
+ .tiptap blockquote:not(:last-child) {
1652
+ margin: 16px 0;
1653
+ }
1654
+ .tiptap strong {
1655
+ font-weight: 600;
1656
+ }
1657
+ .tiptap li:not(:last-child) {
1658
+ margin-bottom: 6px;
1659
+ }
1660
+ .tiptap blockquote {
1661
+ margin: 0;
1662
+ padding: 10px 0 10px 16px;
1663
+ border-left: 1px solid var(--tiptap-color-primary-light);
1664
+ }
1665
+ .tiptap blockquote::before {
1666
+ width: 0;
1667
+ }
1668
+ .tiptap hr {
1669
+ margin: 24px 0;
1670
+ border: none;
1671
+ border-top: 1px solid var(--tiptap-color-divider);
1672
+ }
1673
+ .tiptap a {
1674
+ color: var(--tiptap-color-link);
1675
+ text-decoration: none;
1676
+ }
1677
+ .tiptap[data-tiptap-render] a:hover,
1678
+ .tiptap[contenteditable=false] a:hover {
1679
+ text-decoration: underline;
1680
+ text-underline-offset: 2px;
1681
+ }
1682
+ .tiptap mark {
1683
+ padding: 0 4px;
1684
+ border-radius: 4px;
1685
+ }
1686
+ .tiptap .is-empty::before {
1687
+ height: 0;
1688
+ float: left;
1689
+ content: attr(data-placeholder);
1690
+ color: var(--tiptap-color-text-placeholder);
1691
+ pointer-events: none;
1692
+ }
1693
+ .tiptap[contenteditable=true] span.copyable {
1694
+ pointer-events: none;
1695
+ }
1696
+ .tiptap span.copyable {
1697
+ display: inline-flex;
1698
+ align-items: center;
1699
+ padding: 0 8px;
1700
+ gap: 4px;
1701
+ border: 1px solid var(--tiptap-copyable-border--light);
1702
+ border-radius: 4px;
1703
+ background: var(--tiptap-copyable-bg--light);
1704
+ line-height: 24px;
1705
+ cursor: pointer;
1706
+ transition: all 150ms ease-in-out;
1707
+ }
1708
+ [data-theme=dark] .tiptap span.copyable {
1709
+ border-color: var(--tiptap-copyable-border--dark);
1710
+ background-color: var(--tiptap-copyable-bg--dark);
1711
+ }
1712
+ .tiptap span.copyable:hover {
1713
+ border-color: var(--tiptap-copyable-border-hover--light);
1714
+ background: var(--tiptap-copyable-bg-hover--light);
1715
+ }
1716
+ [data-theme=dark] .tiptap span.copyable:hover {
1717
+ border-color: var(--tiptap-copyable-border-hover--dark);
1718
+ background-color: var(--tiptap-copyable-bg-hover--dark);
1719
+ }
1720
+
1721
+ /* src/styles/editor/controls.css */
1722
+ .tiptap-controls-row {
1723
+ display: flex;
1724
+ gap: 12px;
1725
+ }
1726
+ .tiptap-controls-row:not(:last-child) {
1727
+ margin-bottom: 12px;
1728
+ }
1729
+ .tiptap-controls-group {
1730
+ display: flex;
1731
+ width: fit-content;
1732
+ padding: 6px;
1733
+ gap: 12px;
1734
+ border: 1px solid var(--tiptap-color-primary-subtle);
1735
+ border-radius: 4px;
1736
+ }
1737
+ .bubble-menu .tiptap-controls-group {
1738
+ padding: 4px;
1739
+ }
1740
+ .tiptap-control-button {
1741
+ display: flex;
1742
+ align-items: center;
1743
+ justify-content: center;
1744
+ padding: 0;
1745
+ border: none;
1746
+ border-radius: 4px;
1747
+ background-color: transparent;
1748
+ color: var(--tiptap-color-primary);
1749
+ cursor: pointer;
1750
+ }
1751
+ .tiptap-control-button svg {
1752
+ width: 24px;
1753
+ height: 24px;
1754
+ }
1755
+ .bubble-menu .tiptap-control-button svg {
1756
+ width: 18px;
1757
+ height: 18px;
1758
+ }
1759
+ .tiptap-control-button:disabled {
1760
+ color: var(--tiptap-color-text-disabled);
1761
+ cursor: not-allowed;
1762
+ }
1763
+ .tiptap-control-button:hover {
1764
+ outline: 1px solid var(--tiptap-color-primary-light);
1765
+ }
1766
+ .tiptap-control-button.is-active {
1767
+ background-color: var(--tiptap-color-primary);
1768
+ color: var(--tiptap-state-control-active-color);
1769
+ }
1770
+
1771
+ /* src/styles/editor/menus.css */
1772
+ .bubble-menu {
1773
+ display: flex;
1774
+ z-index: 10000;
1775
+ position: relative;
1776
+ align-items: center;
1777
+ padding: 8px;
1778
+ gap: 8px;
1779
+ border: 1px solid var(--tiptap-color-primary-light);
1780
+ border-radius: var(--tiptap-radius);
1781
+ background-color: var(--tiptap-bg-surface-menu);
1782
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
1783
+ }
1784
+ .tiptap-content-wrapper:has(.hide-text-selection) ::selection {
1785
+ background: #d5d4d450;
1786
+ }
1787
+
1788
+ /* src/styles/editor/utilities.css */
1789
+ .tiptap .copy-button {
1790
+ display: flex;
1791
+ border: none;
1792
+ outline: none;
1793
+ background: transparent;
1794
+ cursor: pointer;
1795
+ }
1796
+ .tiptap .copy-button.copy-icon-white {
1797
+ color: white;
1798
+ }
1799
+ .tiptap .copy-button.copy-icon-prompt {
1800
+ color: var(--tiptap-prompt-action-color);
1801
+ }
1802
+ .copy-icon,
1803
+ .copy-icon-success {
1804
+ display: flex;
1805
+ }
1806
+ .tiptap__drag-handle-button {
1807
+ display: flex;
1808
+ align-items: center;
1809
+ justify-content: center;
1810
+ width: 16px;
1811
+ height: 24px;
1812
+ transform: translateX(-8px);
1813
+ border: 1px solid var(--tiptap-color-primary-light);
1814
+ border-radius: 4px;
1815
+ background-color: #fff;
1816
+ color: var(--tiptap-color-primary);
1817
+ cursor: grab;
1818
+ user-select: none;
1819
+ }
1820
+ .tiptap__drag-handle-button svg {
1821
+ flex-shrink: 0;
1822
+ width: 14px;
1823
+ height: 14px;
1824
+ }
1825
+ .tiptap__drag-handle-button:active {
1826
+ cursor: grabbing;
1827
+ }
1828
+ .tiptap__character-count {
1829
+ display: flex;
1830
+ position: absolute;
1831
+ right: 16px;
1832
+ bottom: -14px;
1833
+ align-items: center;
1834
+ padding: 4px 8px;
1835
+ gap: 8px;
1836
+ border: 1px solid var(--tiptap-color-border);
1837
+ border-radius: 8px;
1838
+ background-color: #fff;
1839
+ color: var(--ui-text-secondary);
1840
+ font-size: 12px;
1841
+ line-height: 20px;
1842
+ letter-spacing: 0.4px;
1843
+ }
1844
+ .tiptap-content-wrapper:has(.tiptap:focus) .tiptap__character-count {
1845
+ border-color: var(--tiptap-color-primary-light);
1846
+ }
1847
+ .tiptap-content-wrapper.has-error:has(.tiptap:focus) .tiptap__character-count,
1848
+ .tiptap-content-wrapper.has-error .tiptap__character-count {
1849
+ border-color: var(--tiptap-color-primary-error);
1850
+ }
1851
+
1852
+ /* src/styles/editor/states.css */
1853
+ .tiptap [data-prompt].is-empty::before,
1854
+ .tiptap [data-myth-reality].is-empty::before,
1855
+ .tiptap [data-myth-reality-block].is-empty::before,
1856
+ .tiptap [data-type=detailsContent].is-empty::before,
1857
+ .tiptap [data-type=details].is-empty::before,
1858
+ .tiptap .react-renderer.is-empty::before,
1859
+ .tiptap blockquote.is-empty::before,
1860
+ .tiptap .tableWrapper.is-empty::before,
1861
+ .tiptap table p.is-empty::before,
1862
+ .tiptap td.is-empty::before,
1863
+ .tiptap th.is-empty::before,
1864
+ .tiptap tr.is-empty::before,
1865
+ .tiptap li p.is-empty::before {
1866
+ display: none;
1867
+ }
1868
+ .ProseMirror-selectednode:not(p.is-empty) {
1869
+ border-radius: 4px;
1870
+ outline: 5px solid var(--tiptap-color-primary-light);
1871
+ background-color: var(--tiptap-color-primary-subtle);
1872
+ }
1873
+ .tiptap table .selectedCell {
1874
+ background-color: var(--tiptap-color-primary-subtle);
1875
+ }
1876
+ .tiptap .tiptap-mathematics-render.ProseMirror-selectednode,
1877
+ .tiptap .node-promptHeader.ProseMirror-selectednode,
1878
+ .tiptap .node-promptContent.ProseMirror-selectednode,
1879
+ .tiptap .node-promptV2Header.ProseMirror-selectednode,
1880
+ .tiptap .node-promptV2Content.ProseMirror-selectednode,
1881
+ .tiptap .node-customQuoteText.ProseMirror-selectednode,
1882
+ .tiptap .node-customQuoteSign.ProseMirror-selectednode,
1883
+ .tiptap .node-customQuoteAuthor.ProseMirror-selectednode {
1884
+ outline: none;
1885
+ background-color: transparent;
1886
+ }
1887
+ .tiptap[data-tiptap-render] .ProseMirror-selectednode,
1888
+ .tiptap[contenteditable=false] .ProseMirror-selectednode {
1889
+ outline: none;
1890
+ background-color: transparent;
1891
+ }
1892
+
1893
+ /* src/styles/editor/callout-menu.css */
1894
+ .tiptap__drag-handle-color-menu {
1895
+ display: flex;
1896
+ z-index: 1000;
1897
+ position: absolute;
1898
+ top: 0;
1899
+ left: 100%;
1900
+ flex-direction: column;
1901
+ flex-wrap: wrap;
1902
+ width: 196px;
1903
+ margin-left: 8px;
1904
+ padding: 8px;
1905
+ gap: 4px;
1906
+ border: 1px solid var(--tiptap-color-primary-light);
1907
+ border-radius: 8px;
1908
+ background: var(--tiptap-bg-surface-menu);
1909
+ }
1910
+ .tiptap__color-menu-title {
1911
+ display: flex;
1912
+ align-items: center;
1913
+ height: 32px;
1914
+ padding: 4px 8px;
1915
+ border-radius: 8px;
1916
+ font-weight: 400;
1917
+ font-size: 15px;
1918
+ line-height: 1.4;
1919
+ white-space: nowrap;
1920
+ }
1921
+ .tiptap__color-menu-row {
1922
+ display: flex;
1923
+ flex-wrap: wrap;
1924
+ justify-content: space-between;
1925
+ gap: 4px;
1926
+ }
1927
+ .tiptap__color-option {
1928
+ display: flex;
1929
+ align-items: center;
1930
+ justify-content: center;
1931
+ width: 40px;
1932
+ height: 40px;
1933
+ padding: 4px;
1934
+ border: none;
1935
+ border-radius: 8px;
1936
+ border-color: transparent;
1937
+ outline: none;
1938
+ background: var(--tiptap-bg-surface-menu);
1939
+ cursor: pointer;
1940
+ transition: border 0.15s ease;
1941
+ }
1942
+ .tiptap__color-option:hover {
1943
+ border: 1px solid var(--tiptap-color-primary-light);
1944
+ }
1945
+ .tiptap__color-swatch {
1946
+ display: flex;
1947
+ align-items: center;
1948
+ justify-content: center;
1949
+ width: 29px;
1950
+ padding: 4px 8px;
1951
+ border-radius: 4px;
1952
+ font-weight: 400;
1953
+ font-size: 15px;
1954
+ line-height: 1.4;
1955
+ }
1956
+ .tiptap__color-menu-custom {
1957
+ display: flex;
1958
+ align-items: center;
1959
+ gap: 8px;
1960
+ margin-top: 8px;
1961
+ padding-top: 8px;
1962
+ border-top: 1px solid var(--tiptap-color-primary-light);
1963
+ }
1964
+ .tiptap__color-menu-custom-label {
1965
+ font-size: 14px;
1966
+ white-space: nowrap;
1967
+ }
1968
+
1969
+ /* src/styles/editor/emoji-picker.css */
1970
+ .tiptap__emoji-picker-wrapper .EmojiPickerReact {
1971
+ border: 1px solid var(--tiptap-color-primary-light);
1972
+ box-shadow: 0 2px 8px #00000026;
1973
+ }
1974
+ .tiptap__emoji-picker-wrapper {
1975
+ z-index: 1000;
1976
+ position: absolute;
1977
+ top: 0;
1978
+ left: 100%;
1979
+ margin-left: 8px;
1980
+ }
1981
+ .tiptap__emoji-picker-wrapper .EmojiPickerReact {
1982
+ --epr-emoji-size: 24px;
1983
+ }
1984
+ .tiptap__emoji-picker-wrapper .epr-category-nav {
1985
+ padding-top: 0;
1986
+ padding-bottom: 6px;
1987
+ }
1988
+ .tiptap__emoji-picker-wrapper .epr-category-label {
1989
+ padding: 4px 8px;
1990
+ font-weight: 500;
1991
+ font-size: 14px;
1992
+ text-transform: none;
1993
+ }
1994
+ .tiptap__emoji-picker-wrapper .epr_346qu6 {
1995
+ padding: 0 0 8px 0;
1996
+ }
1997
+ .tiptap__emoji-picker-wrapper .epr-search-container input {
1998
+ border: none;
1999
+ border-bottom: 1px solid var(--tiptap-color-primary-light);
2000
+ border-radius: 0;
2001
+ background: var(--tiptap-bg-surface-menu);
2002
+ color: var(--ui-text-primary);
2003
+ font-weight: 500;
2004
+ font-size: 14px;
2005
+ line-height: 130%;
2006
+ letter-spacing: -0.14px;
2007
+ }
2008
+ .tiptap__emoji-picker-wrapper .epr-search-container input::placeholder {
2009
+ color: var(--ui-text-secondary);
2010
+ }
2011
+ .tiptap__emoji-picker-wrapper .epr-search-container input:focus {
2012
+ border-color: var(--tiptap-color-primary-light);
2013
+ }
2014
+ .tiptap__emoji-picker-wrapper .epr-icn-search {
2015
+ left: 4px;
2016
+ width: 24px;
2017
+ height: 24px;
2018
+ background-size: 24px;
2019
+ }
2020
+ .tiptap__emoji-picker-wrapper .epr-emoji-category-label {
2021
+ height: auto;
2022
+ margin: 0;
2023
+ padding: 4px 10px;
2024
+ font-weight: 400;
2025
+ font-size: 12px;
2026
+ line-height: 120%;
2027
+ }
2028
+ .tiptap__emoji-picker-wrapper .epr-emoji-list {
2029
+ padding: 0;
2030
+ }
2031
+ .tiptap__emoji-picker-wrapper .epr-btn {
2032
+ border: none;
2033
+ outline: none;
2034
+ }
2035
+ .tiptap__emoji-picker-wrapper .epr-btn:focus::before {
2036
+ border: none;
2037
+ outline: none;
2038
+ }
2039
+ .callout-icon-wrapper {
2040
+ display: flex;
2041
+ position: relative;
2042
+ align-items: flex-start;
2043
+ }
2044
+ .callout-icon-button {
2045
+ display: flex;
2046
+ align-items: center;
2047
+ justify-content: center;
2048
+ padding: 0;
2049
+ border: none;
2050
+ background: none;
2051
+ cursor: pointer;
2052
+ }
2053
+ .callout-icon-button:disabled {
2054
+ cursor: default;
2055
+ }
2056
+ .callout-icon-button:not(:disabled):hover .callout-icon {
2057
+ opacity: 0.8;
2058
+ }
2059
+ .callout-icon img {
2060
+ display: block;
2061
+ width: 20px;
2062
+ height: 20px;
2063
+ object-fit: contain;
2064
+ }
2065
+
2066
+ /* src/styles/editor/index.css */
2067
+
2068
+ /* src/styles/styles.css */