@elixpo/lixeditor 2.1.6

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.
@@ -0,0 +1,620 @@
1
+ /* ===== Preview Floating TOC (top-right sidebar) ===== */
2
+
3
+ .preview-floating-toc {
4
+ position: fixed;
5
+ top: 80px;
6
+ right: 24px;
7
+ width: 220px;
8
+ z-index: 30;
9
+ max-height: calc(100vh - 120px);
10
+ overflow-y: auto;
11
+ }
12
+
13
+ .preview-floating-toc-label {
14
+ font-size: 11px;
15
+ text-transform: uppercase;
16
+ letter-spacing: 0.08em;
17
+ color: var(--text-faint);
18
+ font-weight: 700;
19
+ margin-bottom: 14px;
20
+ }
21
+
22
+ .preview-floating-toc-list {
23
+ list-style: none;
24
+ padding: 0;
25
+ margin: 0;
26
+ display: flex;
27
+ flex-direction: column;
28
+ gap: 6px;
29
+ }
30
+
31
+ .preview-floating-toc-link {
32
+ font-size: 13px;
33
+ color: var(--text-muted);
34
+ text-decoration: none;
35
+ display: block;
36
+ padding: 3px 0;
37
+ transition: color 0.15s, font-weight 0.15s;
38
+ line-height: 1.4;
39
+ }
40
+
41
+ .preview-floating-toc-link:hover {
42
+ color: var(--accent);
43
+ }
44
+
45
+ /* Hide when viewport too narrow for sidebar */
46
+ @media (max-width: 1400px) {
47
+ .preview-floating-toc {
48
+ display: none;
49
+ }
50
+ }
51
+
52
+ /* ===== Back to Top Button ===== */
53
+
54
+ .preview-back-to-top {
55
+ position: fixed;
56
+ bottom: 24px;
57
+ right: 24px;
58
+ z-index: 30;
59
+ width: 36px;
60
+ height: 36px;
61
+ border-radius: 50%;
62
+ border: 1px solid var(--border-default);
63
+ background: var(--bg-surface);
64
+ color: var(--text-muted);
65
+ cursor: pointer;
66
+ display: flex;
67
+ align-items: center;
68
+ justify-content: center;
69
+ transition: color 0.15s, border-color 0.15s;
70
+ }
71
+
72
+ .preview-back-to-top:hover {
73
+ color: #c4b5fd;
74
+ border-color: rgba(196, 181, 253, 0.25);
75
+ }
76
+
77
+ /* ===== Full-width preview wrapper — breaks out of 720px parent ===== */
78
+
79
+ .blog-preview-fullwidth {
80
+ width: 100vw;
81
+ margin-left: calc(-50vw + 50%);
82
+ min-height: calc(100vh - 120px);
83
+ padding: 0;
84
+ }
85
+
86
+ .blog-preview-fullwidth .blog-preview {
87
+ max-width: 720px;
88
+ margin: 0 auto;
89
+ padding: 0 24px;
90
+ min-height: calc(100vh - 160px);
91
+ }
92
+
93
+ /* ===== Preview Prose Styles (matched to editor for WYSIWYG) ===== */
94
+
95
+ .blog-preview-content {
96
+ color: var(--text-primary);
97
+ font-family: 'Source Serif 4', 'Georgia', serif;
98
+ font-size: 1em;
99
+ line-height: 1.75;
100
+ }
101
+
102
+ .blog-preview-content h1 {
103
+ font-family: 'Source Serif 4', 'Georgia', serif;
104
+ font-size: 30px;
105
+ font-weight: 700;
106
+ line-height: 1.3;
107
+ margin: 1.2em 0 0.5em;
108
+ color: var(--text-primary);
109
+ }
110
+
111
+ .blog-preview-content h2 {
112
+ font-family: 'Source Serif 4', 'Georgia', serif;
113
+ font-size: 24px;
114
+ font-weight: 650;
115
+ line-height: 1.35;
116
+ margin: 1em 0 0.45em;
117
+ color: var(--text-primary);
118
+ }
119
+
120
+ .blog-preview-content h3 {
121
+ font-family: 'Source Serif 4', 'Georgia', serif;
122
+ font-size: 20px;
123
+ font-weight: 600;
124
+ line-height: 1.4;
125
+ margin: 0.9em 0 0.4em;
126
+ color: var(--text-primary);
127
+ }
128
+
129
+ .blog-preview-content p {
130
+ color: var(--text-primary);
131
+ font-size: 1em;
132
+ line-height: 1.75;
133
+ margin-bottom: 0.75em;
134
+ }
135
+
136
+ /* Links — blue with subtle underline */
137
+ .blog-preview-content a {
138
+ color: #7ba8f0;
139
+ text-decoration: none;
140
+ border-bottom: 1px solid rgba(123, 168, 240, 0.3);
141
+ padding-bottom: 1px;
142
+ cursor: pointer;
143
+ transition: color 0.15s, border-color 0.15s, background 0.15s;
144
+ }
145
+
146
+ .blog-preview-content a:hover {
147
+ color: #9dc0ff;
148
+ border-bottom-color: rgba(157, 192, 255, 0.5);
149
+ background: rgba(123, 168, 240, 0.06);
150
+ }
151
+
152
+ /* Mention chips, TOC links, subpage items have their own styling */
153
+ .blog-preview-content a.preview-toc-link,
154
+ .blog-preview-content a.link-preview-card,
155
+ .blog-preview-content a.subpage-item {
156
+ color: inherit !important;
157
+ border-bottom: none !important;
158
+ background: none !important;
159
+ text-decoration: none !important;
160
+ padding-bottom: 10px !important;
161
+ }
162
+
163
+ /* Mention chips — match editor styling */
164
+ .blog-preview-content a.mention-chip {
165
+ border-bottom: none !important;
166
+ padding-bottom: 0 !important;
167
+ }
168
+
169
+ /* All mention types (user, blog, org) use .mention-chip — styled in mentions.css */
170
+
171
+ .blog-preview-content a.subpage-item:hover {
172
+ color: inherit !important;
173
+ background: var(--bg-hover) !important;
174
+ }
175
+
176
+ /* Subpage block in preview — proper spacing */
177
+ .blog-preview-content .subpage-block {
178
+ margin: 1.5em 0;
179
+ }
180
+
181
+ .blog-preview-content strong {
182
+ font-weight: 700;
183
+ color: var(--text-primary);
184
+ }
185
+
186
+ .blog-preview-content em {
187
+ font-style: italic;
188
+ }
189
+
190
+ .blog-preview-content ul,
191
+ .blog-preview-content ol {
192
+ padding-left: 1.5em;
193
+ margin-bottom: 0.75em;
194
+ color: var(--text-primary);
195
+ }
196
+
197
+ .blog-preview-content ul {
198
+ list-style-type: disc;
199
+ }
200
+
201
+ .blog-preview-content ol {
202
+ list-style-type: decimal;
203
+ }
204
+
205
+ .blog-preview-content li {
206
+ margin-bottom: 0.35em;
207
+ line-height: 1.75;
208
+ display: list-item;
209
+ }
210
+
211
+ /* Nested lists inside list items */
212
+ .blog-preview-content li > ul,
213
+ .blog-preview-content li > ol {
214
+ margin-top: 0.25em;
215
+ margin-bottom: 0.25em;
216
+ }
217
+
218
+ /* ===== Checklist Styling (matches editor checkboxes) ===== */
219
+
220
+ .blog-preview-content .preview-checklist {
221
+ list-style: none;
222
+ padding-left: 0;
223
+ }
224
+
225
+ .blog-preview-content .preview-check {
226
+ display: flex;
227
+ align-items: flex-start;
228
+ gap: 10px;
229
+ list-style: none;
230
+ line-height: 1.75;
231
+ margin-bottom: 0.35em;
232
+ }
233
+
234
+ .preview-checkbox {
235
+ display: inline-flex;
236
+ align-items: center;
237
+ justify-content: center;
238
+ width: 18px;
239
+ height: 18px;
240
+ min-width: 18px;
241
+ border-radius: 6px;
242
+ border: 2px solid var(--border-default);
243
+ background-color: var(--bg-surface);
244
+ margin-top: 5px;
245
+ }
246
+
247
+ .preview-checkbox--checked {
248
+ background: linear-gradient(135deg, #9b7bf7, #8b6ae6);
249
+ border-color: #9b7bf7;
250
+ box-shadow: 0 1px 4px rgba(155, 123, 247, 0.3);
251
+ }
252
+
253
+ .preview-checkbox-icon {
254
+ display: flex;
255
+ align-items: center;
256
+ justify-content: center;
257
+ }
258
+
259
+ .preview-check--checked .preview-check-text {
260
+ text-decoration: line-through;
261
+ opacity: 0.5;
262
+ }
263
+
264
+ /* Nested checklists */
265
+ .blog-preview-content .preview-check > ul {
266
+ margin-top: 0.25em;
267
+ }
268
+
269
+ /* BlockNote HTML output uses data attributes — handle those too */
270
+ .blog-preview-content [data-content-type="bulletListItem"] {
271
+ display: list-item;
272
+ list-style-type: disc;
273
+ margin-left: 1.5em;
274
+ color: var(--text-primary);
275
+ line-height: 1.75;
276
+ margin-bottom: 0.25em;
277
+ }
278
+
279
+ .blog-preview-content [data-content-type="numberedListItem"] {
280
+ display: list-item;
281
+ list-style-type: decimal;
282
+ margin-left: 1.5em;
283
+ color: var(--text-primary);
284
+ line-height: 1.75;
285
+ margin-bottom: 0.25em;
286
+ }
287
+
288
+ .blog-preview-content blockquote {
289
+ border-left: 3px solid #7ba8f0;
290
+ padding-left: 1em;
291
+ margin: 0.75em 0;
292
+ color: var(--text-muted);
293
+ font-style: italic;
294
+ }
295
+
296
+ .blog-preview-content pre {
297
+ background: var(--code-bg);
298
+ border: 1px solid var(--border-default);
299
+ border-radius: 10px;
300
+ padding: 28px 16px 12px;
301
+ overflow-x: auto;
302
+ margin: 0.75em 0;
303
+ position: relative;
304
+ font-family: 'lixCode', monospace;
305
+ font-size: 0.84em;
306
+ line-height: 1.7;
307
+ }
308
+
309
+ .blog-preview-content pre code {
310
+ font-family: inherit;
311
+ font-size: inherit;
312
+ background: none;
313
+ padding: 0;
314
+ color: var(--code-text);
315
+ }
316
+
317
+ /* Shiki syntax highlighting — let inline styles override */
318
+ .blog-preview-content pre code span[style] {
319
+ background: none !important;
320
+ }
321
+
322
+ .blog-preview-content p code,
323
+ .blog-preview-content li code {
324
+ padding: 0.15em 0.4em;
325
+ }
326
+
327
+ /* Preview code block language label */
328
+ .preview-code-lang-label {
329
+ position: absolute;
330
+ top: 0;
331
+ left: 16px;
332
+ font-size: 10px;
333
+ font-weight: 600;
334
+ letter-spacing: 0.5px;
335
+ text-transform: uppercase;
336
+ color: var(--code-lang-text);
337
+ background: var(--code-lang-bg);
338
+ padding: 2px 8px;
339
+ border-radius: 0 0 6px 6px;
340
+ line-height: 1.5;
341
+ z-index: 5;
342
+ pointer-events: none;
343
+ }
344
+
345
+ /* Preview code block copy button */
346
+ .preview-code-copy-btn {
347
+ position: absolute;
348
+ top: 8px;
349
+ right: 8px;
350
+ z-index: 10;
351
+ display: flex;
352
+ align-items: center;
353
+ justify-content: center;
354
+ width: 28px;
355
+ height: 28px;
356
+ background: var(--code-lang-bg);
357
+ border: 1px solid var(--border-default);
358
+ border-radius: 6px;
359
+ color: var(--code-lang-text);
360
+ cursor: pointer;
361
+ opacity: 0;
362
+ transition: opacity 0.15s, background 0.15s, color 0.15s;
363
+ }
364
+
365
+ .blog-preview-content pre:hover .preview-code-copy-btn {
366
+ opacity: 1;
367
+ }
368
+
369
+ .preview-code-copy-btn:hover {
370
+ background: var(--bg-active);
371
+ color: #a78bfa;
372
+ }
373
+
374
+ .blog-preview-content img:not(.mention-chip-avatar) {
375
+ border-radius: 10px;
376
+ max-width: 100%;
377
+ width: 100%;
378
+ margin: 1em 0;
379
+ }
380
+
381
+ .blog-preview-content table {
382
+ width: 100%;
383
+ border-collapse: collapse;
384
+ margin: 0.5em 0;
385
+ }
386
+
387
+ .blog-preview-content th,
388
+ .blog-preview-content td {
389
+ border: 1px solid var(--border-default);
390
+ padding: 8px 12px;
391
+ text-align: left;
392
+ color: var(--text-primary);
393
+ }
394
+
395
+ .blog-preview-content th {
396
+ background: var(--bg-surface);
397
+ font-weight: 600;
398
+ color: var(--text-primary);
399
+ }
400
+
401
+ .blog-preview-content hr {
402
+ border: none;
403
+ border-top: 1px solid var(--border-default);
404
+ margin: 1.5em 0;
405
+ }
406
+
407
+ /* ===== Preview Block Equations ===== */
408
+
409
+ .blog-preview-content .preview-block-equation {
410
+ border: 1px solid var(--border-default);
411
+ border-radius: 12px;
412
+ background: var(--bg-surface);
413
+ padding: 20px 24px;
414
+ margin: 0.75em 0;
415
+ text-align: center;
416
+ overflow-x: auto;
417
+ }
418
+
419
+ .blog-preview-content .preview-block-equation .katex {
420
+ font-size: 1.2em;
421
+ color: var(--text-primary);
422
+ }
423
+
424
+ /* Inline equation chip — matches editor .inline-equation-chip */
425
+ .blog-preview-content .preview-inline-equation {
426
+ display: inline-flex;
427
+ align-items: center;
428
+ padding: 1px 6px;
429
+ margin: 0 2px;
430
+ border-radius: 5px;
431
+ color: #9b7bf7;
432
+ background: rgba(155, 123, 247, 0.06);
433
+ border: 1px solid rgba(155, 123, 247, 0.15);
434
+ font-size: 13px;
435
+ vertical-align: baseline;
436
+ }
437
+
438
+ .blog-preview-content .preview-inline-equation .katex {
439
+ font-size: 1em;
440
+ color: #9b7bf7;
441
+ }
442
+
443
+ /* ===== Preview Mermaid Diagrams ===== */
444
+
445
+ .blog-preview-content .preview-mermaid-block {
446
+ border: 1px solid var(--border-default);
447
+ border-radius: 12px;
448
+ background: var(--bg-surface);
449
+ padding: 20px;
450
+ margin: 0.75em 0;
451
+ min-height: 200px;
452
+ display: flex;
453
+ align-items: center;
454
+ justify-content: center;
455
+ overflow: hidden;
456
+ position: relative;
457
+ }
458
+
459
+ .blog-preview-content .preview-mermaid-block svg {
460
+ max-width: none;
461
+ width: 100%;
462
+ height: auto;
463
+ min-height: 180px;
464
+ }
465
+
466
+ /* ===== Preview Inline TOC Block (matches editor toc-block) ===== */
467
+
468
+ .blog-preview-content .preview-toc-block {
469
+ border: 1px solid var(--border-default);
470
+ border-radius: 12px;
471
+ background: var(--bg-surface);
472
+ padding: 16px 20px;
473
+ margin: 0.75em 0;
474
+ user-select: none;
475
+ }
476
+
477
+ .blog-preview-content .preview-toc-label {
478
+ font-size: 11px;
479
+ text-transform: uppercase;
480
+ letter-spacing: 0.08em;
481
+ color: var(--text-muted);
482
+ font-weight: 700;
483
+ margin-bottom: 12px;
484
+ }
485
+
486
+ .blog-preview-content .preview-toc-list {
487
+ list-style: none;
488
+ padding: 0;
489
+ margin: 0;
490
+ display: flex;
491
+ flex-direction: column;
492
+ gap: 6px;
493
+ }
494
+
495
+ .blog-preview-content .preview-toc-list li {
496
+ margin: 0;
497
+ display: block;
498
+ }
499
+
500
+ .blog-preview-content .preview-toc-link {
501
+ font-size: 13px;
502
+ color: #9b7bf7;
503
+ text-decoration: none;
504
+ display: block;
505
+ padding: 2px 0;
506
+ transition: color 0.15s;
507
+ cursor: pointer;
508
+ }
509
+
510
+ .blog-preview-content .preview-toc-link:hover {
511
+ color: #b69aff;
512
+ }
513
+
514
+ /* ===== Preview Date Chip (matches editor DateChip) ===== */
515
+
516
+ .preview-date-chip {
517
+ display: inline-flex;
518
+ align-items: center;
519
+ gap: 4px;
520
+ padding: 2px 6px;
521
+ border-radius: 5px;
522
+ font-size: 13px;
523
+ font-weight: 500;
524
+ color: #9b7bf7;
525
+ background: rgba(155, 123, 247, 0.06);
526
+ border: 1px solid rgba(155, 123, 247, 0.15);
527
+ margin: 0 2px;
528
+ white-space: nowrap;
529
+ }
530
+
531
+ .preview-date-chip svg {
532
+ flex-shrink: 0;
533
+ }
534
+
535
+ /* ===== Preview Mention Hover Card ===== */
536
+
537
+ .mention-hover-card {
538
+ position: fixed;
539
+ z-index: 1000;
540
+ width: 260px;
541
+ border-radius: 12px;
542
+ overflow: hidden;
543
+ background: var(--bg-surface);
544
+ border: 1px solid var(--border-default);
545
+ box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
546
+ animation: linkPreviewIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
547
+ padding: 14px;
548
+ pointer-events: auto;
549
+ }
550
+
551
+ [data-theme="dark"] .mention-hover-card {
552
+ box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
553
+ }
554
+
555
+ .mention-hover-card-header {
556
+ display: flex;
557
+ align-items: center;
558
+ gap: 10px;
559
+ margin-bottom: 8px;
560
+ }
561
+
562
+ .mention-hover-card-avatar {
563
+ width: 36px;
564
+ height: 36px;
565
+ border-radius: 50%;
566
+ object-fit: cover;
567
+ flex-shrink: 0;
568
+ background: var(--bg-elevated);
569
+ }
570
+
571
+ .mention-hover-card-initial {
572
+ width: 36px;
573
+ height: 36px;
574
+ border-radius: 50%;
575
+ background: var(--bg-elevated);
576
+ display: flex;
577
+ align-items: center;
578
+ justify-content: center;
579
+ font-size: 14px;
580
+ font-weight: 700;
581
+ color: var(--text-muted);
582
+ flex-shrink: 0;
583
+ }
584
+
585
+ .mention-hover-card-name {
586
+ font-size: 14px;
587
+ font-weight: 600;
588
+ color: var(--text-primary);
589
+ line-height: 1.3;
590
+ }
591
+
592
+ .mention-hover-card-username {
593
+ font-size: 12px;
594
+ color: var(--text-muted);
595
+ }
596
+
597
+ .mention-hover-card-link {
598
+ display: inline-flex;
599
+ align-items: center;
600
+ gap: 4px;
601
+ margin-top: 8px;
602
+ font-size: 12px;
603
+ color: #9b7bf7;
604
+ text-decoration: none !important;
605
+ border: none !important;
606
+ }
607
+
608
+ .mention-hover-card-link:hover {
609
+ color: #b69aff;
610
+ background: none !important;
611
+ }
612
+
613
+ /* ===== Preview figcaption ===== */
614
+
615
+ .blog-preview-content figcaption {
616
+ text-align: center;
617
+ font-size: 0.85em;
618
+ color: var(--text-faint);
619
+ margin-top: 6px;
620
+ }
@@ -0,0 +1,75 @@
1
+ /* ===== LixEditor CSS Variables =====
2
+ * Override these to customize the editor's appearance.
3
+ * All variables fall back to sensible defaults. */
4
+
5
+ :root {
6
+ /* Text colors */
7
+ --lix-text-primary: #1a1a2e;
8
+ --lix-text-secondary: #4a4a5a;
9
+ --lix-text-muted: #6b7280;
10
+ --lix-text-faint: #9ca3af;
11
+
12
+ /* Backgrounds */
13
+ --lix-bg-app: #ffffff;
14
+ --lix-bg-surface: #f7f7f9;
15
+ --lix-bg-elevated: #eeeef2;
16
+ --lix-bg-hover: rgba(0, 0, 0, 0.04);
17
+
18
+ /* Borders */
19
+ --lix-border: #dcdce4;
20
+ --lix-border-hover: #c4c4d0;
21
+ --lix-divider: #eeeef2;
22
+
23
+ /* Accent */
24
+ --lix-accent: #9b7bf7;
25
+ --lix-accent-hover: #8b6ae6;
26
+ --lix-accent-subtle: rgba(155, 123, 247, 0.08);
27
+
28
+ /* Code blocks */
29
+ --lix-code-bg: #f8f8fb;
30
+ --lix-code-text: #3d3d50;
31
+ --lix-code-lang-bg: #eeeef2;
32
+ --lix-code-lang-text: #6b7280;
33
+
34
+ /* Links */
35
+ --lix-link-color: #7ba8f0;
36
+ --lix-link-hover: #9dc0ff;
37
+
38
+ /* Inline code */
39
+ --lix-inline-code-color: #7c3aed;
40
+ --lix-inline-code-bg: rgba(124, 58, 237, 0.08);
41
+
42
+ /* Shadows */
43
+ --lix-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
44
+ --lix-shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);
45
+
46
+ /* Font families */
47
+ --lix-font-body: 'Source Serif 4', Georgia, serif;
48
+ --lix-font-code: 'SF Mono', 'Fira Code', monospace;
49
+ }
50
+
51
+ [data-theme="dark"] {
52
+ --lix-text-primary: #e4e4e7;
53
+ --lix-text-secondary: #b0b0c0;
54
+ --lix-text-muted: #8b8fa3;
55
+ --lix-text-faint: #555;
56
+
57
+ --lix-bg-app: #0e1219;
58
+ --lix-bg-surface: #141a26;
59
+ --lix-bg-elevated: #1e2638;
60
+ --lix-bg-hover: rgba(255, 255, 255, 0.05);
61
+
62
+ --lix-border: #232d3f;
63
+ --lix-border-hover: #333d50;
64
+ --lix-divider: #1e2638;
65
+
66
+ --lix-code-bg: #0e1219;
67
+ --lix-code-text: #c8d1e0;
68
+ --lix-code-lang-bg: #1a2030;
69
+ --lix-code-lang-text: #9ba8b9;
70
+
71
+ --lix-inline-code-color: #c4b5fd;
72
+ --lix-inline-code-bg: rgba(196, 181, 253, 0.1);
73
+
74
+ --lix-shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.4);
75
+ }