mardora 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (138) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +113 -0
  3. package/dist/chunk-3OCUX4OO.js +7690 -0
  4. package/dist/chunk-3OCUX4OO.js.map +1 -0
  5. package/dist/chunk-3ZOCCFDL.cjs +74 -0
  6. package/dist/chunk-3ZOCCFDL.cjs.map +1 -0
  7. package/dist/chunk-7JOEPNEV.cjs +7740 -0
  8. package/dist/chunk-7JOEPNEV.cjs.map +1 -0
  9. package/dist/chunk-BIKZQZ6W.js +33 -0
  10. package/dist/chunk-BIKZQZ6W.js.map +1 -0
  11. package/dist/chunk-EQJESPP2.js +234 -0
  12. package/dist/chunk-EQJESPP2.js.map +1 -0
  13. package/dist/chunk-G4SE26YY.js +70 -0
  14. package/dist/chunk-G4SE26YY.js.map +1 -0
  15. package/dist/chunk-KNDWF2DP.cjs +35 -0
  16. package/dist/chunk-KNDWF2DP.cjs.map +1 -0
  17. package/dist/chunk-MLBEBFHB.cjs +2971 -0
  18. package/dist/chunk-MLBEBFHB.cjs.map +1 -0
  19. package/dist/chunk-P7JFCYU3.js +905 -0
  20. package/dist/chunk-P7JFCYU3.js.map +1 -0
  21. package/dist/chunk-SWFUKJDO.cjs +243 -0
  22. package/dist/chunk-SWFUKJDO.cjs.map +1 -0
  23. package/dist/chunk-WFVCG4LD.cjs +926 -0
  24. package/dist/chunk-WFVCG4LD.cjs.map +1 -0
  25. package/dist/chunk-XL6WFGJT.js +2901 -0
  26. package/dist/chunk-XL6WFGJT.js.map +1 -0
  27. package/dist/editor/index.cjs +277 -0
  28. package/dist/editor/index.cjs.map +1 -0
  29. package/dist/editor/index.d.cts +186 -0
  30. package/dist/editor/index.d.ts +186 -0
  31. package/dist/editor/index.js +4 -0
  32. package/dist/editor/index.js.map +1 -0
  33. package/dist/index.cjs +405 -0
  34. package/dist/index.cjs.map +1 -0
  35. package/dist/index.d.cts +13 -0
  36. package/dist/index.d.ts +13 -0
  37. package/dist/index.js +8 -0
  38. package/dist/index.js.map +1 -0
  39. package/dist/lib/index.cjs +12 -0
  40. package/dist/lib/index.cjs.map +1 -0
  41. package/dist/lib/index.d.cts +16 -0
  42. package/dist/lib/index.d.ts +16 -0
  43. package/dist/lib/index.js +3 -0
  44. package/dist/lib/index.js.map +1 -0
  45. package/dist/mardora-DCwjomil.d.cts +640 -0
  46. package/dist/mardora-DCwjomil.d.ts +640 -0
  47. package/dist/plugins/index.cjs +104 -0
  48. package/dist/plugins/index.cjs.map +1 -0
  49. package/dist/plugins/index.d.cts +740 -0
  50. package/dist/plugins/index.d.ts +740 -0
  51. package/dist/plugins/index.js +7 -0
  52. package/dist/plugins/index.js.map +1 -0
  53. package/dist/preview/index.cjs +38 -0
  54. package/dist/preview/index.cjs.map +1 -0
  55. package/dist/preview/index.d.cts +101 -0
  56. package/dist/preview/index.d.ts +101 -0
  57. package/dist/preview/index.js +5 -0
  58. package/dist/preview/index.js.map +1 -0
  59. package/dist/types-NBsaxl4d.d.cts +71 -0
  60. package/dist/types-Pw2SWWAR.d.ts +71 -0
  61. package/package.json +92 -0
  62. package/src/editor/attachments/extension.ts +181 -0
  63. package/src/editor/attachments/format.ts +63 -0
  64. package/src/editor/attachments/index.ts +3 -0
  65. package/src/editor/attachments/types.ts +37 -0
  66. package/src/editor/heading-fold/config.ts +25 -0
  67. package/src/editor/heading-fold/extension.ts +268 -0
  68. package/src/editor/heading-fold/extract.ts +88 -0
  69. package/src/editor/heading-fold/index.ts +5 -0
  70. package/src/editor/heading-fold/theme.ts +85 -0
  71. package/src/editor/heading-fold/types.ts +24 -0
  72. package/src/editor/i18n.ts +13 -0
  73. package/src/editor/icons/index.ts +367 -0
  74. package/src/editor/index.ts +16 -0
  75. package/src/editor/mardora.ts +257 -0
  76. package/src/editor/media-lightbox-theme.ts +146 -0
  77. package/src/editor/media-lightbox.ts +125 -0
  78. package/src/editor/plugin.ts +294 -0
  79. package/src/editor/selection-toolbar/activation.ts +123 -0
  80. package/src/editor/selection-toolbar/commands.ts +279 -0
  81. package/src/editor/selection-toolbar/extension.ts +564 -0
  82. package/src/editor/selection-toolbar/i18n.ts +164 -0
  83. package/src/editor/selection-toolbar/index.ts +7 -0
  84. package/src/editor/selection-toolbar/menu.ts +252 -0
  85. package/src/editor/selection-toolbar/position.ts +43 -0
  86. package/src/editor/selection-toolbar/theme.ts +195 -0
  87. package/src/editor/selection-toolbar/types.ts +155 -0
  88. package/src/editor/slash/default-commands.ts +190 -0
  89. package/src/editor/slash/extension.ts +319 -0
  90. package/src/editor/slash/index.ts +7 -0
  91. package/src/editor/slash/insertions.ts +26 -0
  92. package/src/editor/slash/menu.ts +123 -0
  93. package/src/editor/slash/position.ts +61 -0
  94. package/src/editor/slash/query.ts +33 -0
  95. package/src/editor/slash/theme.ts +113 -0
  96. package/src/editor/slash/types.ts +40 -0
  97. package/src/editor/table-of-contents/extension.ts +202 -0
  98. package/src/editor/table-of-contents/extract.ts +53 -0
  99. package/src/editor/table-of-contents/index.ts +7 -0
  100. package/src/editor/table-of-contents/panel.ts +83 -0
  101. package/src/editor/table-of-contents/slug.ts +50 -0
  102. package/src/editor/table-of-contents/storage.ts +35 -0
  103. package/src/editor/table-of-contents/theme.ts +153 -0
  104. package/src/editor/table-of-contents/types.ts +44 -0
  105. package/src/editor/theme.ts +72 -0
  106. package/src/editor/utils.ts +176 -0
  107. package/src/editor/view-plugin.ts +189 -0
  108. package/src/index.ts +5 -0
  109. package/src/lib/index.ts +2 -0
  110. package/src/lib/input-handler.ts +47 -0
  111. package/src/plugins/code-plugin.theme.ts +545 -0
  112. package/src/plugins/code-plugin.ts +1892 -0
  113. package/src/plugins/emoji-plugin.ts +140 -0
  114. package/src/plugins/heading-plugin.ts +194 -0
  115. package/src/plugins/hr-plugin.ts +102 -0
  116. package/src/plugins/html-plugin.ts +353 -0
  117. package/src/plugins/image-plugin.ts +806 -0
  118. package/src/plugins/index.ts +71 -0
  119. package/src/plugins/inline-plugin.ts +311 -0
  120. package/src/plugins/link-plugin.ts +509 -0
  121. package/src/plugins/list-plugin.ts +492 -0
  122. package/src/plugins/math-plugin.ts +526 -0
  123. package/src/plugins/mermaid-plugin.ts +513 -0
  124. package/src/plugins/paragraph-plugin.ts +38 -0
  125. package/src/plugins/quote-plugin.ts +733 -0
  126. package/src/plugins/table-controls-theme.ts +126 -0
  127. package/src/plugins/table-controls.ts +423 -0
  128. package/src/plugins/table-model.ts +661 -0
  129. package/src/plugins/table-plugin.ts +2111 -0
  130. package/src/preview/context.ts +45 -0
  131. package/src/preview/css-generator.ts +64 -0
  132. package/src/preview/default-renderers.ts +29 -0
  133. package/src/preview/index.ts +29 -0
  134. package/src/preview/preview.ts +41 -0
  135. package/src/preview/renderer.ts +184 -0
  136. package/src/preview/syntax-theme.ts +112 -0
  137. package/src/preview/toc.ts +23 -0
  138. package/src/preview/types.ts +89 -0
@@ -0,0 +1,545 @@
1
+ import { createTheme } from "../editor";
2
+
3
+ /** Shared theme styles for editor + preview code blocks. */
4
+ export const codePluginTheme = createTheme({
5
+ default: {
6
+ // Inline code
7
+ ".cm-mardora-code-inline": {
8
+ fontFamily: "var(--font-jetbrains-mono, monospace)",
9
+ fontSize: "0.9rem",
10
+ backgroundColor: "rgba(0, 0, 0, 0.05)",
11
+ padding: "0.1rem 0.25rem",
12
+ border: "1px solid var(--color-border)",
13
+ borderRadius: "3px",
14
+ },
15
+
16
+ // Fenced code block lines
17
+ ".cm-mardora-code-block-line": {
18
+ "--radius": "0.375rem",
19
+
20
+ fontFamily: "var(--font-jetbrains-mono, monospace)",
21
+ fontSize: "0.9rem",
22
+ backgroundColor: "transparent",
23
+ padding: "0 1rem !important",
24
+ lineHeight: "1.5",
25
+ minHeight: "1.5em",
26
+ borderLeft: "1px solid var(--color-border, #d4d4d8)",
27
+ borderRight: "1px solid var(--color-border, #d4d4d8)",
28
+ },
29
+
30
+ // First line of code block
31
+ ".cm-mardora-code-block-line-start": {
32
+ borderTopLeftRadius: "var(--radius)",
33
+ borderTopRightRadius: "var(--radius)",
34
+ position: "relative",
35
+ overflow: "visible",
36
+ borderTop: "1px solid var(--color-border, #d4d4d8)",
37
+ paddingTop: "0.5rem !important",
38
+ },
39
+
40
+ ".cm-mardora-code-block-rendered.cm-mardora-code-block-line-start": {
41
+ paddingTop: "0.5rem !important",
42
+ paddingBottom: "0 !important",
43
+ },
44
+
45
+ ".cm-mardora-code-fence-line": {
46
+ height: "0",
47
+ minHeight: "0",
48
+ lineHeight: "0",
49
+ paddingTop: "0 !important",
50
+ paddingBottom: "0 !important",
51
+ border: "none !important",
52
+ overflow: "visible",
53
+ },
54
+
55
+ // Code block hover toolbar
56
+ ".cm-mardora-code-toolbar": {
57
+ display: "flex",
58
+ alignItems: "center",
59
+ gap: "0.2rem",
60
+ position: "absolute",
61
+ top: "50%",
62
+ right: "0.45rem",
63
+ zIndex: "20",
64
+ opacity: "0",
65
+ pointerEvents: "none",
66
+ transform: "translateY(-50%)",
67
+ transition: "opacity 0.12s ease",
68
+ color: "var(--color-text, inherit)",
69
+ fontFamily: "var(--font-sans, system-ui, sans-serif)",
70
+ fontSize: "0.78rem",
71
+ lineHeight: "1",
72
+
73
+ "&.is-visible, &.is-menu-open": {
74
+ opacity: "1",
75
+ pointerEvents: "auto",
76
+ },
77
+ },
78
+
79
+ ".cm-mardora-code-container:hover .cm-mardora-code-toolbar, .cm-mardora-code-container:focus-within .cm-mardora-code-toolbar":
80
+ {
81
+ opacity: "1",
82
+ pointerEvents: "auto",
83
+ },
84
+
85
+ ".cm-mardora-code-language-control": {
86
+ position: "relative",
87
+ },
88
+
89
+ ".cm-mardora-code-language-button, .cm-mardora-code-copy-btn": {
90
+ display: "inline-flex",
91
+ alignItems: "center",
92
+ justifyContent: "center",
93
+ height: "1.55rem",
94
+ minWidth: "1.55rem",
95
+ gap: "0.25rem",
96
+ padding: "0 0.35rem",
97
+ backgroundColor: "rgba(255, 255, 255, 0.86)",
98
+ border: "1px solid rgba(209, 213, 219, 0.9)",
99
+ borderRadius: "0.25rem",
100
+ color: "#3f3f46",
101
+ cursor: "pointer",
102
+ boxShadow: "none",
103
+ transition: "background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease",
104
+
105
+ "&:hover": {
106
+ backgroundColor: "rgba(244, 244, 245, 0.96)",
107
+ borderColor: "rgba(161, 161, 170, 0.95)",
108
+ color: "#18181b",
109
+ },
110
+
111
+ "&.copied": {
112
+ color: "#3f3f46",
113
+ },
114
+ },
115
+
116
+ ".cm-mardora-code-copy-btn": {
117
+ padding: "0",
118
+ },
119
+
120
+ ".cm-mardora-code-language-menu": {
121
+ position: "absolute",
122
+ top: "calc(100% + 0.35rem)",
123
+ right: "0",
124
+ width: "14rem",
125
+ maxHeight: "18rem",
126
+ padding: "0.45rem",
127
+ backgroundColor: "var(--color-background, #fff)",
128
+ border: "1px solid var(--color-border)",
129
+ borderRadius: "0.375rem",
130
+ boxShadow: "0 10px 30px rgba(15, 23, 42, 0.12)",
131
+ overflow: "hidden",
132
+
133
+ "&[hidden]": {
134
+ display: "none",
135
+ },
136
+ },
137
+
138
+ ".cm-mardora-code-language-search": {
139
+ display: "flex",
140
+ alignItems: "center",
141
+ position: "relative",
142
+ marginBottom: "0.35rem",
143
+
144
+ "& input": {
145
+ width: "100%",
146
+ height: "2rem",
147
+ padding: "0 2rem 0 0.65rem",
148
+ border: "1px solid var(--color-border)",
149
+ borderRadius: "0.25rem",
150
+ backgroundColor: "transparent",
151
+ color: "var(--color-text, inherit)",
152
+ outline: "none",
153
+ font: "inherit",
154
+
155
+ "&:focus": {
156
+ borderColor: "#94a3b8",
157
+ },
158
+ },
159
+ },
160
+
161
+ ".cm-mardora-code-language-search-icon": {
162
+ position: "absolute",
163
+ right: "0.55rem",
164
+ color: "#52525b",
165
+ pointerEvents: "none",
166
+ },
167
+
168
+ ".cm-mardora-code-language-list": {
169
+ maxHeight: "14.5rem",
170
+ overflowY: "auto",
171
+ },
172
+
173
+ ".cm-mardora-code-language-item": {
174
+ display: "flex",
175
+ alignItems: "center",
176
+ justifyContent: "space-between",
177
+ width: "100%",
178
+ height: "1.9rem",
179
+ padding: "0 0.45rem",
180
+ border: "none",
181
+ borderRadius: "0.25rem",
182
+ backgroundColor: "transparent",
183
+ color: "var(--color-text, inherit)",
184
+ cursor: "pointer",
185
+ font: "inherit",
186
+ textAlign: "left",
187
+
188
+ "&:hover": {
189
+ backgroundColor: "rgba(0, 0, 0, 0.07)",
190
+ },
191
+ },
192
+
193
+ // Caption (below code block)
194
+ ".cm-mardora-code-block-has-caption": {
195
+ padding: "0 !important",
196
+ paddingTop: "0.5rem !important",
197
+ },
198
+
199
+ ".cm-mardora-code-caption": {
200
+ textAlign: "center",
201
+ fontSize: "0.85rem",
202
+ color: "#6a737d",
203
+ fontStyle: "italic",
204
+ padding: "0.25rem 1rem",
205
+ backgroundColor: "rgba(0, 0, 0, 0.06)",
206
+ },
207
+
208
+ // Last line of code block
209
+ ".cm-mardora-code-block-line-end": {
210
+ borderBottomLeftRadius: "var(--radius)",
211
+ borderBottomRightRadius: "var(--radius)",
212
+ borderBottom: "1px solid var(--color-border, #d4d4d8)",
213
+ paddingBottom: "0.5rem !important",
214
+ },
215
+
216
+ ".cm-mardora-code-block-rendered.cm-mardora-code-block-line-end": {
217
+ paddingTop: "0 !important",
218
+ paddingBottom: "0.5rem !important",
219
+ },
220
+
221
+ ".cm-mardora-code-block-single-line": {
222
+ paddingTop: "0.5rem !important",
223
+ paddingBottom: "0.5rem !important",
224
+ },
225
+
226
+ ".cm-mardora-code-block-rendered.cm-mardora-code-block-single-line": {
227
+ paddingTop: "0.5rem !important",
228
+ paddingBottom: "0.5rem !important",
229
+ },
230
+
231
+ // Fence markers (```)
232
+ ".cm-mardora-code-fence": {
233
+ color: "#6a737d",
234
+ fontFamily: "var(--font-jetbrains-mono, monospace)",
235
+ },
236
+
237
+ // Line numbers
238
+ ".cm-mardora-code-line-numbered": {
239
+ paddingLeft: "calc(var(--line-num-width, 2ch) + 1rem) !important",
240
+ position: "relative",
241
+
242
+ "&::before": {
243
+ content: "attr(data-line-num)",
244
+ position: "absolute",
245
+ left: "0.5rem",
246
+ top: "0.2rem",
247
+ width: "var(--line-num-width, 2ch)",
248
+ textAlign: "right",
249
+ color: "#6a737d",
250
+ opacity: "0.6",
251
+ fontFamily: "var(--font-jetbrains-mono, monospace)",
252
+ fontSize: "0.85rem",
253
+ userSelect: "none",
254
+ },
255
+ },
256
+
257
+ ".cm-mardora-code-line-numbered-diff": {
258
+ paddingLeft: "calc(var(--line-num-old-width, 2ch) + var(--line-num-new-width, 2ch) + 2.75rem) !important",
259
+ position: "relative",
260
+
261
+ "&::before": {
262
+ content: "attr(data-line-num-old)",
263
+ position: "absolute",
264
+ left: "0.5rem",
265
+ top: "0.2rem",
266
+ width: "var(--line-num-old-width, 2ch)",
267
+ textAlign: "right",
268
+ color: "#6a737d",
269
+ opacity: "0.6",
270
+ fontFamily: "var(--font-jetbrains-mono, monospace)",
271
+ fontSize: "0.85rem",
272
+ userSelect: "none",
273
+ },
274
+
275
+ "&::after": {
276
+ content: 'attr(data-line-num-new) " " attr(data-diff-marker)',
277
+ position: "absolute",
278
+ left: "calc(0.5rem + var(--line-num-old-width, 2ch) + 0.75rem)",
279
+ top: "0.2rem",
280
+ width: "calc(var(--line-num-new-width, 2ch) + 2ch)",
281
+ textAlign: "right",
282
+ color: "#6a737d",
283
+ opacity: "0.6",
284
+ fontFamily: "var(--font-jetbrains-mono, monospace)",
285
+ fontSize: "0.85rem",
286
+ userSelect: "none",
287
+ },
288
+
289
+ "&.cm-mardora-code-line-diff-gutter": {
290
+ paddingLeft: "calc(var(--line-num-width, 2ch) + 2rem) !important",
291
+
292
+ "&::after": {
293
+ content: "attr(data-diff-marker)",
294
+ position: "absolute",
295
+ left: "calc(0.5rem + var(--line-num-width, 2ch) + 0.35rem)",
296
+ top: "0.1rem",
297
+ width: "1ch",
298
+ textAlign: "right",
299
+ fontFamily: "var(--font-jetbrains-mono, monospace)",
300
+ fontSize: "0.85rem",
301
+ fontWeight: "700",
302
+ userSelect: "none",
303
+ },
304
+ },
305
+ },
306
+
307
+ // Preview: code lines (need block display for full-width highlights)
308
+ ".cm-mardora-code-line": {
309
+ display: "block",
310
+ position: "relative",
311
+ paddingLeft: "1rem",
312
+ paddingRight: "1rem",
313
+ lineHeight: "1.5",
314
+ borderLeft: "3px solid transparent",
315
+ },
316
+
317
+ // Line highlight
318
+ ".cm-mardora-code-line-highlight": {
319
+ backgroundColor: "rgba(255, 220, 100, 0.2) !important",
320
+ borderLeft: "3px solid #f0b429 !important",
321
+ },
322
+
323
+ ".cm-mardora-code-line-diff-add": {
324
+ color: "inherit",
325
+ backgroundColor: "rgba(34, 197, 94, 0.12) !important",
326
+ borderLeft: "3px solid #22c55e !important",
327
+
328
+ "&.cm-mardora-code-line-diff-gutter::after": {
329
+ color: "#16a34a",
330
+ },
331
+ },
332
+
333
+ ".cm-mardora-code-line-diff-del": {
334
+ color: "inherit",
335
+ backgroundColor: "rgba(239, 68, 68, 0.12) !important",
336
+ borderLeft: "3px solid #ef4444 !important",
337
+
338
+ "&.cm-mardora-code-line-diff-gutter::after": {
339
+ color: "#dc2626",
340
+ },
341
+ },
342
+
343
+ ".cm-mardora-code-diff-sign-add": {
344
+ color: "#16a34a",
345
+ fontWeight: "700",
346
+ },
347
+
348
+ ".cm-mardora-code-diff-sign-del": {
349
+ color: "#dc2626",
350
+ fontWeight: "700",
351
+ },
352
+
353
+ ".cm-mardora-code-diff-mod-add": {
354
+ color: "inherit",
355
+ backgroundColor: "rgba(34, 197, 94, 0.25)",
356
+ borderRadius: "2px",
357
+ padding: "0.1rem 0",
358
+ },
359
+
360
+ ".cm-mardora-code-diff-mod-del": {
361
+ color: "inherit",
362
+ backgroundColor: "rgba(239, 68, 68, 0.25)",
363
+ borderRadius: "2px",
364
+ padding: "0.1rem 0",
365
+ },
366
+
367
+ // Text highlight
368
+ ".cm-mardora-code-text-highlight": {
369
+ color: "inherit",
370
+ backgroundColor: "rgba(255, 220, 100, 0.4)",
371
+ borderRadius: "2px",
372
+ padding: "0.1rem 0",
373
+ },
374
+
375
+ // Preview: container wrapper
376
+ ".cm-mardora-code-container": {
377
+ margin: "1rem 0",
378
+ borderRadius: "var(--radius)",
379
+ overflow: "visible",
380
+ border: "1px solid var(--color-border, #d4d4d8)",
381
+ position: "relative",
382
+ backgroundColor: "transparent",
383
+
384
+ ".cm-mardora-code-block": {
385
+ margin: "0",
386
+ borderRadius: "var(--radius)",
387
+ border: "none",
388
+ whiteSpace: "pre-wrap",
389
+ },
390
+
391
+ ".cm-mardora-code-caption": {
392
+ borderTop: "1px solid var(--color-border)",
393
+ },
394
+ },
395
+
396
+ // Preview: standalone code block (not in container)
397
+ ".cm-mardora-code-block": {
398
+ fontFamily: "var(--font-jetbrains-mono, monospace)",
399
+ fontSize: "0.9rem",
400
+ backgroundColor: "transparent",
401
+ padding: "1rem",
402
+ overflow: "auto",
403
+ position: "relative",
404
+ borderRadius: "var(--radius)",
405
+ border: "1px solid var(--color-border, #d4d4d8)",
406
+
407
+ "&.cm-mardora-code-block-has-caption": {
408
+ borderBottomLeftRadius: "0",
409
+ borderBottomRightRadius: "0",
410
+ borderBottom: "none",
411
+ paddingBottom: "0.5rem !important",
412
+ },
413
+ },
414
+ },
415
+
416
+ dark: {
417
+ ".cm-mardora-code-inline": {
418
+ backgroundColor: "rgba(255, 255, 255, 0.1)",
419
+ },
420
+
421
+ ".cm-mardora-code-block-line": {
422
+ backgroundColor: "transparent",
423
+ borderLeftColor: "rgba(148, 163, 184, 0.26)",
424
+ borderRightColor: "rgba(148, 163, 184, 0.26)",
425
+ },
426
+
427
+ ".cm-mardora-code-block-line-start": {
428
+ borderTopColor: "rgba(148, 163, 184, 0.26)",
429
+ },
430
+
431
+ ".cm-mardora-code-block-line-end": {
432
+ borderBottomColor: "rgba(148, 163, 184, 0.26)",
433
+ },
434
+
435
+ ".cm-mardora-code-fence": {
436
+ color: "#8b949e",
437
+ },
438
+
439
+ ".cm-mardora-code-container": {
440
+ borderColor: "rgba(148, 163, 184, 0.26)",
441
+
442
+ ".cm-mardora-code-caption": {
443
+ borderTopColor: "rgba(148, 163, 184, 0.26)",
444
+ },
445
+ },
446
+
447
+ ".cm-mardora-code-block": {
448
+ backgroundColor: "transparent",
449
+ borderColor: "rgba(148, 163, 184, 0.26)",
450
+ },
451
+
452
+ ".cm-mardora-code-language-button, .cm-mardora-code-copy-btn": {
453
+ backgroundColor: "rgba(39, 39, 42, 0.72)",
454
+ borderColor: "rgba(82, 82, 91, 0.9)",
455
+ color: "#e4e4e7",
456
+
457
+ "&:hover": {
458
+ backgroundColor: "rgba(63, 63, 70, 0.92)",
459
+ borderColor: "rgba(113, 113, 122, 0.95)",
460
+ },
461
+
462
+ "&.copied": {
463
+ color: "#e4e4e7",
464
+ },
465
+ },
466
+
467
+ ".cm-mardora-code-language-menu": {
468
+ backgroundColor: "#18181b",
469
+ boxShadow: "0 10px 30px rgba(0, 0, 0, 0.35)",
470
+ },
471
+
472
+ ".cm-mardora-code-language-search-icon": {
473
+ color: "#a1a1aa",
474
+ },
475
+
476
+ ".cm-mardora-code-caption": {
477
+ backgroundColor: "rgba(255, 255, 255, 0.05)",
478
+ },
479
+
480
+ ".cm-mardora-code-line-numbered": {
481
+ "&::before": {
482
+ color: "#8b949e",
483
+ },
484
+ },
485
+
486
+ ".cm-mardora-code-line-numbered-diff": {
487
+ "&::before": {
488
+ color: "#8b949e",
489
+ },
490
+
491
+ "&::after": {
492
+ color: "#8b949e",
493
+ },
494
+ },
495
+
496
+ ".cm-mardora-code-line-diff-gutter": {
497
+ "&::after": {
498
+ color: "#8b949e",
499
+ },
500
+ },
501
+
502
+ ".cm-mardora-code-line-highlight": {
503
+ backgroundColor: "rgba(255, 220, 100, 0.15) !important",
504
+ borderLeft: "3px solid #d9a520 !important",
505
+ },
506
+
507
+ ".cm-mardora-code-line-diff-add": {
508
+ backgroundColor: "rgba(34, 197, 94, 0.15) !important",
509
+ borderLeft: "3px solid #22c55e !important",
510
+
511
+ "&.cm-mardora-code-line-diff-gutter::after": {
512
+ color: "#4ade80",
513
+ },
514
+ },
515
+
516
+ ".cm-mardora-code-line-diff-del": {
517
+ backgroundColor: "rgba(239, 68, 68, 0.15) !important",
518
+ borderLeft: "3px solid #ef4444 !important",
519
+
520
+ "&.cm-mardora-code-line-diff-gutter::after": {
521
+ color: "#f87171",
522
+ },
523
+ },
524
+
525
+ ".cm-mardora-code-diff-sign-add": {
526
+ color: "#4ade80",
527
+ },
528
+
529
+ ".cm-mardora-code-diff-sign-del": {
530
+ color: "#f87171",
531
+ },
532
+
533
+ ".cm-mardora-code-diff-mod-add": {
534
+ backgroundColor: "rgba(34, 197, 94, 0.3)",
535
+ },
536
+
537
+ ".cm-mardora-code-diff-mod-del": {
538
+ backgroundColor: "rgba(239, 68, 68, 0.3)",
539
+ },
540
+
541
+ ".cm-mardora-code-text-highlight": {
542
+ backgroundColor: "rgba(255, 220, 100, 0.3)",
543
+ },
544
+ },
545
+ });