@bendyline/squisq-editor-react 0.1.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.
@@ -0,0 +1,594 @@
1
+ /* ==========================================================================
2
+ Squisq Editor Styles
3
+ ========================================================================== */
4
+
5
+ /* ─── Shell ──────────────────────────────────────────── */
6
+
7
+ .squisq-editor-shell {
8
+ font-family:
9
+ -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
10
+ color: #1f2937;
11
+ background: #fff;
12
+ }
13
+
14
+ .squisq-editor-header {
15
+ border-bottom: 1px solid #e5e7eb;
16
+ background: #f9fafb;
17
+ flex-shrink: 0;
18
+ }
19
+
20
+ .squisq-editor-content {
21
+ flex: 1;
22
+ overflow: hidden;
23
+ }
24
+
25
+ /* ─── View Switcher ──────────────────────────────────── */
26
+
27
+ .squisq-view-switcher {
28
+ display: flex;
29
+ gap: 0;
30
+ }
31
+
32
+ .squisq-view-tab {
33
+ padding: 6px 16px;
34
+ border: none;
35
+ background: transparent;
36
+ color: #6b7280;
37
+ cursor: pointer;
38
+ font-size: 13px;
39
+ font-weight: 500;
40
+ border-bottom: 2px solid transparent;
41
+ transition:
42
+ color 0.15s,
43
+ border-color 0.15s;
44
+ }
45
+
46
+ .squisq-view-tab:hover {
47
+ color: #1f2937;
48
+ }
49
+
50
+ .squisq-view-tab--active {
51
+ color: #2563eb;
52
+ border-bottom-color: #2563eb;
53
+ }
54
+
55
+ /* ─── Toolbar ────────────────────────────────────────── */
56
+
57
+ .squisq-toolbar {
58
+ display: flex;
59
+ align-items: center;
60
+ padding: 4px 12px;
61
+ gap: 2px;
62
+ }
63
+
64
+ /* ─── View Tabs (inside toolbar) ─────────────────────── */
65
+
66
+ .squisq-toolbar-view-tabs {
67
+ display: flex;
68
+ gap: 0;
69
+ margin-right: 2px;
70
+ }
71
+
72
+ .squisq-toolbar-view-tab {
73
+ padding: 4px 14px;
74
+ border: none;
75
+ background: transparent;
76
+ color: #6b7280;
77
+ cursor: pointer;
78
+ font-size: 13px;
79
+ font-weight: 500;
80
+ border-bottom: 2px solid transparent;
81
+ transition:
82
+ color 0.15s,
83
+ border-color 0.15s;
84
+ }
85
+
86
+ .squisq-toolbar-view-tab:hover {
87
+ color: #1f2937;
88
+ }
89
+
90
+ .squisq-toolbar-view-tab--active {
91
+ color: #2563eb;
92
+ border-bottom-color: #2563eb;
93
+ }
94
+
95
+ .squisq-toolbar-group {
96
+ display: flex;
97
+ align-items: center;
98
+ gap: 2px;
99
+ }
100
+
101
+ .squisq-toolbar-separator {
102
+ width: 1px;
103
+ height: 20px;
104
+ background: #d1d5db;
105
+ margin: 0 6px;
106
+ }
107
+
108
+ .squisq-toolbar-button {
109
+ display: flex;
110
+ align-items: center;
111
+ justify-content: center;
112
+ width: 32px;
113
+ height: 28px;
114
+ border: none;
115
+ border-radius: 4px;
116
+ background: transparent;
117
+ color: #374151;
118
+ cursor: pointer;
119
+ font-size: 13px;
120
+ font-weight: 600;
121
+ transition:
122
+ background 0.12s,
123
+ color 0.12s;
124
+ }
125
+
126
+ .squisq-toolbar-button:hover {
127
+ background: #e5e7eb;
128
+ color: #111827;
129
+ }
130
+
131
+ .squisq-toolbar-button:active {
132
+ background: #d1d5db;
133
+ }
134
+
135
+ .squisq-toolbar-button--active {
136
+ background: #dbeafe;
137
+ color: #2563eb;
138
+ }
139
+
140
+ .squisq-toolbar-button--active:hover {
141
+ background: #bfdbfe;
142
+ color: #1d4ed8;
143
+ }
144
+
145
+ /* ─── Template Picker (toolbar) ──────────────────────── */
146
+
147
+ .squisq-template-picker {
148
+ display: flex;
149
+ align-items: center;
150
+ }
151
+
152
+ .squisq-template-picker-label {
153
+ display: flex;
154
+ align-items: center;
155
+ gap: 6px;
156
+ font-size: 12px;
157
+ color: #6b7280;
158
+ font-weight: 500;
159
+ white-space: nowrap;
160
+ }
161
+
162
+ .squisq-template-picker-select {
163
+ font-size: 12px;
164
+ padding: 2px 6px;
165
+ border: 1px solid #d1d5db;
166
+ border-radius: 4px;
167
+ background: #fff;
168
+ color: #374151;
169
+ cursor: pointer;
170
+ max-width: 160px;
171
+ }
172
+
173
+ .squisq-template-picker-select:focus {
174
+ outline: 2px solid #3b82f6;
175
+ outline-offset: -1px;
176
+ }
177
+
178
+ /* ─── Template Badge (WYSIWYG heading) ───────────────── */
179
+
180
+ .squisq-template-badge {
181
+ display: inline-flex;
182
+ align-items: center;
183
+ margin-left: 8px;
184
+ padding: 1px 7px;
185
+ font-size: 11px;
186
+ font-weight: 600;
187
+ font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
188
+ color: #6d28d9;
189
+ background: #ede9fe;
190
+ border: 1px solid #c4b5fd;
191
+ border-radius: 10px;
192
+ vertical-align: middle;
193
+ user-select: none;
194
+ line-height: 1.6;
195
+ }
196
+
197
+ /* ─── Status Bar ─────────────────────────────────────── */
198
+
199
+ .squisq-status-bar {
200
+ display: flex;
201
+ align-items: center;
202
+ padding: 4px 12px;
203
+ border-top: 1px solid #e5e7eb;
204
+ background: #f9fafb;
205
+ font-size: 12px;
206
+ color: #6b7280;
207
+ flex-shrink: 0;
208
+ gap: 12px;
209
+ }
210
+
211
+ .squisq-status-item {
212
+ white-space: nowrap;
213
+ }
214
+
215
+ .squisq-status-spacer {
216
+ flex: 1;
217
+ }
218
+
219
+ .squisq-status-ok {
220
+ color: #059669;
221
+ }
222
+
223
+ .squisq-status-error {
224
+ color: #dc2626;
225
+ }
226
+
227
+ .squisq-status-parsing {
228
+ color: #d97706;
229
+ }
230
+
231
+ /* ─── WYSIWYG Editor ─────────────────────────────────── */
232
+
233
+ .squisq-wysiwyg-editor {
234
+ padding: 16px 24px;
235
+ max-width: 800px;
236
+ margin: 0 auto;
237
+ outline: none;
238
+ min-height: 100%;
239
+ }
240
+
241
+ .squisq-wysiwyg-editor h1 {
242
+ font-size: 2em;
243
+ margin: 0.67em 0;
244
+ }
245
+ .squisq-wysiwyg-editor h2 {
246
+ font-size: 1.5em;
247
+ margin: 0.75em 0;
248
+ }
249
+ .squisq-wysiwyg-editor h3 {
250
+ font-size: 1.17em;
251
+ margin: 0.83em 0;
252
+ }
253
+ .squisq-wysiwyg-editor h4 {
254
+ font-size: 1em;
255
+ margin: 1em 0;
256
+ }
257
+ .squisq-wysiwyg-editor h5 {
258
+ font-size: 0.83em;
259
+ margin: 1.17em 0;
260
+ }
261
+ .squisq-wysiwyg-editor h6 {
262
+ font-size: 0.67em;
263
+ margin: 1.33em 0;
264
+ }
265
+
266
+ .squisq-wysiwyg-editor p {
267
+ margin: 0.5em 0;
268
+ line-height: 1.6;
269
+ }
270
+
271
+ .squisq-wysiwyg-editor blockquote {
272
+ border-left: 3px solid #d1d5db;
273
+ padding-left: 16px;
274
+ margin: 0.5em 0;
275
+ color: #6b7280;
276
+ }
277
+
278
+ .squisq-wysiwyg-editor pre {
279
+ background: #1e293b;
280
+ color: #e2e8f0;
281
+ padding: 12px 16px;
282
+ border-radius: 6px;
283
+ overflow-x: auto;
284
+ font-size: 13px;
285
+ line-height: 1.5;
286
+ }
287
+
288
+ .squisq-wysiwyg-editor code {
289
+ background: #f1f5f9;
290
+ padding: 1px 4px;
291
+ border-radius: 3px;
292
+ font-size: 0.9em;
293
+ }
294
+
295
+ .squisq-wysiwyg-editor pre code {
296
+ background: none;
297
+ padding: 0;
298
+ border-radius: 0;
299
+ }
300
+
301
+ .squisq-wysiwyg-editor ul,
302
+ .squisq-wysiwyg-editor ol {
303
+ padding-left: 24px;
304
+ margin: 0.5em 0;
305
+ }
306
+
307
+ .squisq-wysiwyg-editor li {
308
+ margin: 0.25em 0;
309
+ }
310
+
311
+ .squisq-wysiwyg-editor hr {
312
+ border: none;
313
+ border-top: 2px solid #e5e7eb;
314
+ margin: 1.5em 0;
315
+ }
316
+
317
+ .squisq-wysiwyg-editor table {
318
+ border-collapse: collapse;
319
+ margin: 1em 0;
320
+ width: 100%;
321
+ }
322
+
323
+ .squisq-wysiwyg-editor th,
324
+ .squisq-wysiwyg-editor td {
325
+ border: 1px solid #d1d5db;
326
+ padding: 6px 12px;
327
+ text-align: left;
328
+ }
329
+
330
+ .squisq-wysiwyg-editor th {
331
+ background: #f9fafb;
332
+ font-weight: 600;
333
+ }
334
+
335
+ .squisq-wysiwyg-editor a {
336
+ color: #2563eb;
337
+ text-decoration: underline;
338
+ }
339
+
340
+ /* Tiptap placeholder */
341
+ .squisq-wysiwyg-editor p.is-editor-empty:first-child::before {
342
+ content: attr(data-placeholder);
343
+ float: left;
344
+ color: #9ca3af;
345
+ pointer-events: none;
346
+ height: 0;
347
+ }
348
+
349
+ /* ─── Preview Panel ──────────────────────────────────── */
350
+
351
+ /* ─── Preview Panel (DocPlayer container) ──────────── */
352
+
353
+ .squisq-preview-player {
354
+ background: #f5f5f5;
355
+ padding: 16px;
356
+ }
357
+
358
+ .squisq-preview-status {
359
+ display: flex;
360
+ align-items: center;
361
+ justify-content: center;
362
+ flex-direction: column;
363
+ height: 100%;
364
+ padding: 16px;
365
+ color: #9ca3af;
366
+ }
367
+
368
+ .squisq-preview-status h3 {
369
+ color: #dc2626;
370
+ margin: 0 0 8px 0;
371
+ }
372
+
373
+ .squisq-preview-status pre {
374
+ background: #fef2f2;
375
+ padding: 12px;
376
+ border-radius: 6px;
377
+ font-size: 13px;
378
+ overflow: auto;
379
+ color: #dc2626;
380
+ }
381
+
382
+ /* ─── CSS custom properties ──────────────────────────── */
383
+
384
+ .squisq-editor-shell {
385
+ --squisq-bg: #f5f5f5;
386
+ --squisq-border: #e0e0e0;
387
+ --squisq-input-bg: #fff;
388
+ --squisq-text: #1f2937;
389
+ --squisq-text-muted: #6b7280;
390
+ }
391
+
392
+ .squisq-editor-shell[data-theme='dark'] {
393
+ --squisq-bg: #1f2937;
394
+ --squisq-border: #4b5563;
395
+ --squisq-input-bg: #374151;
396
+ --squisq-text: #e5e7eb;
397
+ --squisq-text-muted: #9ca3af;
398
+ }
399
+
400
+ /* ─── Dark mode ──────────────────────────────────────── */
401
+ /* Activated by data-theme="dark" on .squisq-editor-shell */
402
+
403
+ .squisq-editor-shell[data-theme='dark'] {
404
+ color: #e5e7eb;
405
+ background: #111827;
406
+ }
407
+
408
+ /* Header */
409
+ .squisq-editor-shell[data-theme='dark'] .squisq-editor-header {
410
+ border-bottom-color: #374151;
411
+ background: #1f2937;
412
+ }
413
+
414
+ /* View Switcher */
415
+ .squisq-editor-shell[data-theme='dark'] .squisq-view-tab {
416
+ color: #9ca3af;
417
+ }
418
+
419
+ .squisq-editor-shell[data-theme='dark'] .squisq-view-tab:hover {
420
+ color: #e5e7eb;
421
+ }
422
+
423
+ .squisq-editor-shell[data-theme='dark'] .squisq-view-tab--active {
424
+ color: #60a5fa;
425
+ border-bottom-color: #60a5fa;
426
+ }
427
+
428
+ /* Toolbar */
429
+ .squisq-editor-shell[data-theme='dark'] .squisq-toolbar {
430
+ /* no border-top — sits directly in header */
431
+ }
432
+
433
+ /* View tabs (dark) */
434
+ .squisq-editor-shell[data-theme='dark'] .squisq-toolbar-view-tab {
435
+ color: #9ca3af;
436
+ }
437
+
438
+ .squisq-editor-shell[data-theme='dark'] .squisq-toolbar-view-tab:hover {
439
+ color: #e5e7eb;
440
+ }
441
+
442
+ .squisq-editor-shell[data-theme='dark'] .squisq-toolbar-view-tab--active {
443
+ color: #60a5fa;
444
+ border-bottom-color: #60a5fa;
445
+ }
446
+
447
+ .squisq-editor-shell[data-theme='dark'] .squisq-toolbar-button {
448
+ color: #d1d5db;
449
+ }
450
+
451
+ .squisq-editor-shell[data-theme='dark'] .squisq-toolbar-button:hover {
452
+ background: #374151;
453
+ color: #f9fafb;
454
+ }
455
+
456
+ .squisq-editor-shell[data-theme='dark'] .squisq-toolbar-button:active {
457
+ background: #4b5563;
458
+ }
459
+
460
+ .squisq-editor-shell[data-theme='dark'] .squisq-toolbar-button--active {
461
+ background: #1e3a5f;
462
+ color: #60a5fa;
463
+ }
464
+
465
+ .squisq-editor-shell[data-theme='dark'] .squisq-toolbar-button--active:hover {
466
+ background: #1e40af;
467
+ color: #93c5fd;
468
+ }
469
+
470
+ .squisq-editor-shell[data-theme='dark'] .squisq-toolbar-separator {
471
+ background: #4b5563;
472
+ }
473
+
474
+ /* Template picker (dark) */
475
+ .squisq-editor-shell[data-theme='dark'] .squisq-template-picker-label {
476
+ color: #9ca3af;
477
+ }
478
+
479
+ .squisq-editor-shell[data-theme='dark'] .squisq-template-picker-select {
480
+ background: #374151;
481
+ color: #e5e7eb;
482
+ border-color: #4b5563;
483
+ }
484
+
485
+ /* Template badge (dark) */
486
+ .squisq-editor-shell[data-theme='dark'] .squisq-template-badge {
487
+ color: #a78bfa;
488
+ background: #2e1065;
489
+ border-color: #6d28d9;
490
+ }
491
+
492
+ /* Status Bar */
493
+ .squisq-editor-shell[data-theme='dark'] .squisq-status-bar {
494
+ border-top-color: #374151;
495
+ background: #1f2937;
496
+ color: #9ca3af;
497
+ }
498
+
499
+ .squisq-editor-shell[data-theme='dark'] .squisq-status-ok {
500
+ color: #34d399;
501
+ }
502
+
503
+ .squisq-editor-shell[data-theme='dark'] .squisq-status-error {
504
+ color: #f87171;
505
+ }
506
+
507
+ .squisq-editor-shell[data-theme='dark'] .squisq-status-parsing {
508
+ color: #fbbf24;
509
+ }
510
+
511
+ /* WYSIWYG Editor */
512
+ .squisq-editor-shell[data-theme='dark'] .squisq-wysiwyg-editor {
513
+ color: #e5e7eb;
514
+ }
515
+
516
+ .squisq-editor-shell[data-theme='dark'] .squisq-wysiwyg-editor blockquote {
517
+ border-left-color: #4b5563;
518
+ color: #9ca3af;
519
+ }
520
+
521
+ .squisq-editor-shell[data-theme='dark'] .squisq-wysiwyg-editor pre {
522
+ background: #0f172a;
523
+ color: #e2e8f0;
524
+ }
525
+
526
+ .squisq-editor-shell[data-theme='dark'] .squisq-wysiwyg-editor code {
527
+ background: #374151;
528
+ color: #e5e7eb;
529
+ }
530
+
531
+ .squisq-editor-shell[data-theme='dark'] .squisq-wysiwyg-editor pre code {
532
+ background: none;
533
+ }
534
+
535
+ .squisq-editor-shell[data-theme='dark'] .squisq-wysiwyg-editor hr {
536
+ border-top-color: #374151;
537
+ }
538
+
539
+ .squisq-editor-shell[data-theme='dark'] .squisq-wysiwyg-editor th,
540
+ .squisq-editor-shell[data-theme='dark'] .squisq-wysiwyg-editor td {
541
+ border-color: #4b5563;
542
+ }
543
+
544
+ .squisq-editor-shell[data-theme='dark'] .squisq-wysiwyg-editor th {
545
+ background: #1f2937;
546
+ }
547
+
548
+ .squisq-editor-shell[data-theme='dark'] .squisq-wysiwyg-editor a {
549
+ color: #60a5fa;
550
+ }
551
+
552
+ .squisq-editor-shell[data-theme='dark']
553
+ .squisq-wysiwyg-editor
554
+ p.is-editor-empty:first-child::before {
555
+ color: #6b7280;
556
+ }
557
+
558
+ /* Preview Panel (dark) */
559
+ .squisq-editor-shell[data-theme='dark'] .squisq-preview-player {
560
+ background: #111827;
561
+ }
562
+
563
+ .squisq-editor-shell[data-theme='dark'] .squisq-preview-status {
564
+ color: #6b7280;
565
+ }
566
+
567
+ .squisq-editor-shell[data-theme='dark'] .squisq-preview-status h3 {
568
+ color: #f87171;
569
+ }
570
+
571
+ .squisq-editor-shell[data-theme='dark'] .squisq-preview-status pre {
572
+ background: #1c1917;
573
+ color: #fca5a5;
574
+ }
575
+
576
+ /* Preview element overrides for dark */
577
+ .squisq-editor-shell[data-theme='dark'] .squisq-preview-codeblock {
578
+ background: #0f172a;
579
+ color: #e2e8f0;
580
+ }
581
+
582
+ .squisq-editor-shell[data-theme='dark'] .squisq-preview-blockquote {
583
+ border-left-color: #4b5563;
584
+ color: #9ca3af;
585
+ }
586
+
587
+ .squisq-editor-shell[data-theme='dark'] .squisq-preview-cell {
588
+ border-color: #4b5563;
589
+ }
590
+
591
+ .squisq-editor-shell[data-theme='dark'] .squisq-preview-inline-code {
592
+ background: #374151;
593
+ color: #e5e7eb;
594
+ }