@herb-tools/dev-tools 0.7.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.
package/src/styles.css ADDED
@@ -0,0 +1,761 @@
1
+ .herb-overlay-label {
2
+ position: absolute;
3
+ top: -18px;
4
+ left: 4px;
5
+ background: rgba(0, 0, 0, 0.8);
6
+ color: white;
7
+ padding: 2px 6px;
8
+ font-size: 11px;
9
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, monospace;
10
+ font-weight: 500;
11
+ border-radius: 3px;
12
+ display: block;
13
+ z-index: 1000;
14
+ cursor: pointer;
15
+ transition: all 0.2s ease;
16
+ white-space: nowrap;
17
+ line-height: 1.2;
18
+ }
19
+
20
+ .herb-overlay-label:hover {
21
+ background: rgba(0, 0, 0, 0.9);
22
+ transform: scale(1.02);
23
+ color: #374151;
24
+ z-index: 1001;
25
+ }
26
+
27
+ [data-herb-debug-outline-type*="view"] > .herb-overlay-label {
28
+ background: #dbeafe;
29
+ color: #1e40af;
30
+ border-color: #93c5fd;
31
+ }
32
+
33
+ [data-herb-debug-outline-type*="partial"] > .herb-overlay-label {
34
+ background: #d1fae5;
35
+ color: #065f46;
36
+ border-color: #6ee7b7;
37
+ }
38
+
39
+ [data-herb-debug-outline-type*="component"] > .herb-overlay-label {
40
+ background: #fef3c7;
41
+ color: #92400e;
42
+ border-color: #fcd34d;
43
+ }
44
+
45
+ [data-herb-debug-outline-type*="erb-output"] {
46
+ transition: all 0.3s ease;
47
+ }
48
+
49
+ .herb-tooltip {
50
+ position: fixed;
51
+ background: white;
52
+ border: 1px solid #e5e7eb;
53
+ padding: 16px 20px;
54
+ border-radius: 12px;
55
+ font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
56
+ font-size: 14px;
57
+ opacity: 0;
58
+ visibility: hidden;
59
+ pointer-events: none;
60
+ transition: opacity 0.2s ease, visibility 0.2s ease;
61
+ z-index: 10001;
62
+ box-shadow: 0 10px 40px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.08);
63
+ display: flex;
64
+ flex-direction: column;
65
+ gap: 12px;
66
+ white-space: nowrap;
67
+ overflow: visible;
68
+ max-width: calc(100vw - 16px);
69
+ }
70
+
71
+ .herb-tooltip.visible {
72
+ opacity: 1;
73
+ visibility: visible;
74
+ pointer-events: auto;
75
+ }
76
+
77
+ .herb-tooltip .herb-location {
78
+ color: #6b7280;
79
+ font-size: 13px;
80
+ font-weight: 500;
81
+ display: flex;
82
+ align-items: center;
83
+ justify-content: space-between;
84
+ gap: 12px;
85
+ cursor: pointer;
86
+ transition: all 0.2s ease;
87
+ background: #f8f9fa;
88
+ margin: -16px -20px 0 -20px;
89
+ padding: 12px 20px;
90
+ border-radius: 12px 12px 0 0;
91
+ }
92
+
93
+ .herb-tooltip .herb-location:hover {
94
+ color: #374151;
95
+ background: #f1f3f4;
96
+ }
97
+
98
+ .herb-copy-path-btn {
99
+ background: transparent;
100
+ border: none;
101
+ font-size: 14px;
102
+ cursor: pointer;
103
+ padding: 4px;
104
+ border-radius: 4px;
105
+ transition: all 0.2s ease;
106
+ color: #6b7280;
107
+ flex-shrink: 0;
108
+ position: relative;
109
+ }
110
+
111
+ .herb-copy-path-btn:hover {
112
+ background: rgba(107, 114, 128, 0.1);
113
+ color: #374151;
114
+ }
115
+
116
+ .herb-copy-path-btn:active {
117
+ transform: scale(0.95);
118
+ }
119
+
120
+ .herb-location::after {
121
+ content: attr(data-tooltip);
122
+ position: absolute;
123
+ bottom: calc(100% + 8px);
124
+ left: 50%;
125
+ transform: translateX(-50%);
126
+ background: #1f2937;
127
+ color: white;
128
+ padding: 6px 10px;
129
+ border-radius: 6px;
130
+ font-size: 12px;
131
+ white-space: nowrap;
132
+ opacity: 0;
133
+ visibility: hidden;
134
+ pointer-events: none;
135
+ transition: all 0.2s ease;
136
+ z-index: 10002;
137
+ }
138
+
139
+ .herb-location::before {
140
+ content: '';
141
+ position: absolute;
142
+ bottom: calc(100% + 2px);
143
+ left: 50%;
144
+ transform: translateX(-50%);
145
+ border: 4px solid transparent;
146
+ border-top-color: #1f2937;
147
+ opacity: 0;
148
+ visibility: hidden;
149
+ transition: all 0.2s ease;
150
+ z-index: 10002;
151
+ }
152
+
153
+ .herb-location:hover::after,
154
+ .herb-location:hover::before {
155
+ opacity: 1;
156
+ visibility: visible;
157
+ }
158
+
159
+ .herb-location:has(.herb-copy-path-btn:hover)::after,
160
+ .herb-location:has(.herb-copy-path-btn:hover)::before {
161
+ opacity: 0 !important;
162
+ visibility: hidden !important;
163
+ }
164
+
165
+ .herb-copy-path-btn::after {
166
+ content: attr(data-tooltip);
167
+ position: absolute;
168
+ top: -36px;
169
+ left: 50%;
170
+ transform: translateX(-50%);
171
+ background: #1f2937;
172
+ color: white;
173
+ padding: 6px 10px;
174
+ border-radius: 6px;
175
+ font-size: 12px;
176
+ white-space: nowrap;
177
+ opacity: 0;
178
+ visibility: hidden;
179
+ pointer-events: none;
180
+ transition: all 0.2s ease;
181
+ z-index: 10003;
182
+ }
183
+
184
+ .herb-copy-path-btn::before {
185
+ content: '';
186
+ position: absolute;
187
+ top: -6px;
188
+ left: 50%;
189
+ transform: translateX(-50%);
190
+ border: 4px solid transparent;
191
+ border-bottom-color: #1f2937;
192
+ opacity: 0;
193
+ visibility: hidden;
194
+ transition: all 0.2s ease;
195
+ z-index: 10003;
196
+ }
197
+
198
+ .herb-copy-path-btn:hover::after,
199
+ .herb-copy-path-btn:hover::before {
200
+ opacity: 1;
201
+ visibility: visible;
202
+ }
203
+
204
+ .herb-tooltip .herb-erb-code {
205
+ color: #111827;
206
+ font-size: 16px;
207
+ font-weight: 600;
208
+ cursor: text;
209
+ user-select: text;
210
+ letter-spacing: -0.025em;
211
+ }
212
+
213
+ .herb-tooltip::before {
214
+ content: '';
215
+ position: absolute;
216
+ bottom: -8px;
217
+ left: 0;
218
+ right: 0;
219
+ height: 8px;
220
+ pointer-events: auto;
221
+ }
222
+
223
+ .herb-tooltip::after {
224
+ content: '';
225
+ position: absolute;
226
+ bottom: -6px;
227
+ left: 50%;
228
+ transform: translateX(-50%);
229
+ border: 6px solid transparent;
230
+ border-top-color: #e5e7eb;
231
+ z-index: 10000;
232
+ pointer-events: none;
233
+ }
234
+
235
+ .herb-floating-menu {
236
+ position: fixed;
237
+ top: 0;
238
+ right: 0;
239
+ z-index: 2147483643;
240
+ font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
241
+ }
242
+
243
+ .herb-menu-trigger {
244
+ padding: 4px 7px;
245
+ border-radius: 0 0 0 10px;
246
+ background: white;
247
+ border: 1px solid #c0c0c0;
248
+ border-top: none;
249
+ border-right: none;
250
+ box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1);
251
+ cursor: pointer;
252
+ transition: all 0.2s ease;
253
+ display: flex;
254
+ align-items: center;
255
+ justify-content: center;
256
+ gap: 4px;
257
+ position: relative;
258
+ z-index: 2147483640;
259
+ font-size: 12px;
260
+ }
261
+
262
+ .herb-menu-trigger:hover {
263
+ background: #f9fafb;
264
+ border-color: #9ca3af;
265
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
266
+ }
267
+
268
+ .herb-menu-trigger:active {
269
+ transform: scale(0.98);
270
+ }
271
+
272
+ .herb-menu-trigger.has-active-options {
273
+ background: #dbeafe;
274
+ border-color: #3b82f6;
275
+ }
276
+
277
+ .herb-menu-trigger.has-active-options:hover {
278
+ background: #bfdbfe;
279
+ border-color: #2563eb;
280
+ }
281
+
282
+ .herb-menu-trigger.has-active-options .herb-text {
283
+ color: #1d4ed8;
284
+ }
285
+
286
+ .herb-icon {
287
+ font-size: 14px;
288
+ line-height: 1;
289
+ display: block;
290
+ }
291
+
292
+ .herb-text {
293
+ font-size: 11px;
294
+ font-weight: 600;
295
+ color: #555;
296
+ letter-spacing: 0.2px;
297
+ }
298
+
299
+ .herb-menu-panel {
300
+ position: absolute;
301
+ top: 28px;
302
+ right: 10px;
303
+ background: white;
304
+ border-radius: 8px;
305
+ border: 1px solid #c0c0c0;
306
+ box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.1);
307
+ padding: 0;
308
+ min-width: 280px;
309
+ opacity: 0;
310
+ visibility: hidden;
311
+ transform: translateY(-10px) scale(0.95);
312
+ transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
313
+ transform-origin: top right;
314
+ }
315
+
316
+ .herb-menu-panel.open {
317
+ opacity: 1;
318
+ visibility: visible;
319
+ transform: translateY(0) scale(1);
320
+ }
321
+
322
+ .herb-menu-header {
323
+ padding: 16px 20px;
324
+ border-bottom: 1px solid #e5e7eb;
325
+ font-weight: 600;
326
+ font-size: 14px;
327
+ color: #374151;
328
+ background: #f9fafb;
329
+ border-radius: 8px 8px 0 0;
330
+ }
331
+
332
+ .herb-toggle-item {
333
+ padding: 12px 20px;
334
+ border-bottom: 1px solid #f3f4f6;
335
+ }
336
+
337
+ .herb-toggle-item:last-child {
338
+ border-bottom: none;
339
+ border-radius: 0 0 8px 8px;
340
+ }
341
+
342
+ .herb-nested-toggle {
343
+ margin-top: 8px;
344
+ padding-left: 24px;
345
+ border-left: 2px solid #f3f4f6;
346
+ transition: all 0.3s ease;
347
+ }
348
+
349
+ .herb-nested-label {
350
+ opacity: 0.8;
351
+ }
352
+
353
+ .herb-nested-label .herb-toggle-text {
354
+ font-size: 13px;
355
+ color: #6b7280;
356
+ }
357
+
358
+ .herb-nested-switch {
359
+ width: 36px;
360
+ height: 20px;
361
+ background: #e5e7eb;
362
+ }
363
+
364
+ .herb-nested-switch::after {
365
+ width: 14px;
366
+ height: 14px;
367
+ top: 3px;
368
+ left: 3px;
369
+ }
370
+
371
+ .herb-toggle-input:checked + .herb-nested-switch::after {
372
+ transform: translateX(16px);
373
+ }
374
+
375
+ .herb-toggle-label {
376
+ display: flex;
377
+ align-items: center;
378
+ cursor: pointer;
379
+ user-select: none;
380
+ gap: 12px;
381
+ }
382
+
383
+ .herb-toggle-input {
384
+ display: none;
385
+ }
386
+
387
+ .herb-toggle-switch {
388
+ position: relative;
389
+ width: 44px;
390
+ height: 24px;
391
+ background: #cbd5e1;
392
+ border-radius: 12px;
393
+ transition: background 0.3s ease;
394
+ flex-shrink: 0;
395
+ }
396
+
397
+ .herb-toggle-switch::after {
398
+ content: '';
399
+ position: absolute;
400
+ width: 18px;
401
+ height: 18px;
402
+ background: white;
403
+ border-radius: 50%;
404
+ top: 3px;
405
+ left: 3px;
406
+ transition: transform 0.3s ease;
407
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
408
+ }
409
+
410
+ .herb-toggle-input:checked + .herb-toggle-switch {
411
+ background: #8b5cf6;
412
+ }
413
+
414
+ .herb-toggle-input:checked + .herb-toggle-switch::after {
415
+ transform: translateX(20px);
416
+ }
417
+
418
+ .herb-toggle-text {
419
+ font-size: 14px;
420
+ color: #374151;
421
+ flex: 1;
422
+ }
423
+
424
+ .herb-toggle-label:hover .herb-toggle-switch {
425
+ background: #94a3b8;
426
+ }
427
+
428
+ .herb-toggle-label:hover .herb-toggle-input:checked + .herb-toggle-switch {
429
+ background: #7c3aed;
430
+ }
431
+
432
+ .herb-disable-all-section {
433
+ padding: 16px 20px;
434
+ border-top: 1px solid #f3f4f6;
435
+ background: #f9fafb;
436
+ border-radius: 0 0 8px 8px;
437
+ }
438
+
439
+ .herb-disable-all-btn {
440
+ width: 100%;
441
+ background: #ef4444;
442
+ color: white;
443
+ border: none;
444
+ padding: 8px 16px;
445
+ border-radius: 6px;
446
+ font-size: 13px;
447
+ font-weight: 500;
448
+ cursor: pointer;
449
+ transition: background 0.2s ease;
450
+ }
451
+
452
+ .herb-disable-all-btn:hover {
453
+ background: #dc2626;
454
+ }
455
+
456
+ .herb-disable-all-btn:active {
457
+ background: #b91c1c;
458
+ }
459
+
460
+ .herb-validation-overlay {
461
+ position: fixed;
462
+ top: 0;
463
+ left: 0;
464
+ right: 0;
465
+ bottom: 0;
466
+ background: rgba(0, 0, 0, 0.8);
467
+ backdrop-filter: blur(4px);
468
+ z-index: 2147483640;
469
+ display: flex;
470
+ align-items: center;
471
+ justify-content: center;
472
+ padding: 20px;
473
+ overflow-y: auto;
474
+ font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
475
+ color: #e5e5e5;
476
+ line-height: 1.6;
477
+ }
478
+
479
+ .herb-validation-panel {
480
+ background: #000000;
481
+ border: 1px solid #374151;
482
+ border-radius: 12px;
483
+ max-width: 1200px;
484
+ width: 100%;
485
+ max-height: 80vh;
486
+ overflow: hidden;
487
+ box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
488
+ display: flex;
489
+ flex-direction: column;
490
+ }
491
+
492
+ .herb-validation-header {
493
+ background: linear-gradient(135deg, #dc2626, #b91c1c);
494
+ color: white;
495
+ padding: 20px 24px;
496
+ border-bottom: 1px solid #374151;
497
+ border-radius: 12px 12px 0 0;
498
+ display: flex;
499
+ align-items: flex-start;
500
+ justify-content: space-between;
501
+ gap: 16px;
502
+ flex-shrink: 0;
503
+ }
504
+
505
+ .herb-validation-title {
506
+ font-size: 18px;
507
+ font-weight: 600;
508
+ margin: 0;
509
+ }
510
+
511
+ .herb-validation-close {
512
+ background: rgba(255, 255, 255, 0.1);
513
+ border: 1px solid rgba(255, 255, 255, 0.2);
514
+ font-size: 16px;
515
+ cursor: pointer;
516
+ color: white;
517
+ padding: 0;
518
+ width: 32px;
519
+ height: 32px;
520
+ display: flex;
521
+ align-items: center;
522
+ justify-content: center;
523
+ border-radius: 6px;
524
+ transition: all 0.2s;
525
+ flex-shrink: 0;
526
+ }
527
+
528
+ .herb-validation-close:hover {
529
+ background: rgba(255, 255, 255, 0.2);
530
+ border-color: rgba(255, 255, 255, 0.3);
531
+ }
532
+
533
+ .herb-file-tabs {
534
+ display: flex;
535
+ border-bottom: 1px solid #374151;
536
+ background: #262626;
537
+ overflow-x: auto;
538
+ flex-shrink: 0;
539
+ }
540
+
541
+ .herb-file-tab {
542
+ padding: 12px 16px;
543
+ background: none;
544
+ border: none;
545
+ border-bottom: 3px solid transparent;
546
+ cursor: pointer;
547
+ font-size: 14px;
548
+ font-weight: 500;
549
+ color: #9ca3af;
550
+ white-space: nowrap;
551
+ transition: all 0.2s ease;
552
+ }
553
+
554
+ .herb-file-tab:hover {
555
+ color: #e5e5e5;
556
+ background: #2d2d2d;
557
+ }
558
+
559
+ .herb-file-tab.active {
560
+ color: white;
561
+ border-bottom-color: #3b82f6;
562
+ background: #374151;
563
+ }
564
+
565
+ .herb-validation-content {
566
+ flex: 1;
567
+ overflow-y: auto;
568
+ padding: 24px;
569
+ }
570
+
571
+ .herb-validator-section {
572
+ margin-bottom: 32px;
573
+ }
574
+
575
+ .herb-validator-section:last-child {
576
+ margin-bottom: 0;
577
+ }
578
+
579
+ .herb-validator-section.hidden {
580
+ display: none;
581
+ }
582
+
583
+ .herb-validator-header {
584
+ background: #262626;
585
+ color: #e5e5e5;
586
+ padding: 12px 16px;
587
+ border-radius: 8px 8px 0 0;
588
+ font-weight: 600;
589
+ font-size: 16px;
590
+ display: flex;
591
+ align-items: center;
592
+ justify-content: space-between;
593
+ border-bottom: 1px solid #374151;
594
+ }
595
+
596
+ .herb-validator-count {
597
+ background: rgba(255, 255, 255, 0.2);
598
+ padding: 2px 8px;
599
+ border-radius: 12px;
600
+ font-size: 14px;
601
+ font-weight: 500;
602
+ }
603
+
604
+ .herb-validator-items {
605
+ background: #111111;
606
+ border: 1px solid #374151;
607
+ border-top: none;
608
+ border-radius: 0 0 8px 8px;
609
+ }
610
+
611
+ .herb-validation-item {
612
+ padding: 20px;
613
+ border-bottom: 1px solid #374151;
614
+ background: #111111;
615
+ }
616
+
617
+ .herb-validation-item:last-child {
618
+ border-bottom: none;
619
+ border-radius: 0 0 8px 8px;
620
+ }
621
+
622
+ .herb-validation-item.hidden {
623
+ display: none;
624
+ }
625
+
626
+ .herb-validation-item .herb-validation-header {
627
+ background: #1a1a1a;
628
+ color: #9ca3af;
629
+ padding: 12px 16px;
630
+ border: none;
631
+ border-bottom: 1px solid #374151;
632
+ display: flex;
633
+ align-items: center;
634
+ gap: 12px;
635
+ margin: -20px -20px 16px -20px;
636
+ font-size: 13px;
637
+ }
638
+
639
+ .herb-validation-badge {
640
+ color: white;
641
+ padding: 4px 8px;
642
+ border-radius: 4px;
643
+ font-size: 12px;
644
+ font-weight: 600;
645
+ text-transform: uppercase;
646
+ letter-spacing: 0.025em;
647
+ }
648
+
649
+ .herb-validation-location {
650
+ color: #9ca3af;
651
+ font-size: 13px;
652
+ font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
653
+ }
654
+
655
+ .herb-validation-message {
656
+ font-size: 13px;
657
+ font-weight: 500;
658
+ margin: -16px -16px 16px -16px;
659
+ padding: 12px 16px;
660
+ background: #1a1a1a;
661
+ border-bottom: 1px solid #374151;
662
+ color: #fbbf24;
663
+ line-height: 1.4;
664
+ }
665
+
666
+ .herb-code-snippet {
667
+ background: #1f2937;
668
+ border-radius: 6px;
669
+ overflow: hidden;
670
+ margin-bottom: 16px;
671
+ font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
672
+ }
673
+
674
+ .herb-code-line {
675
+ display: flex;
676
+ align-items: stretch;
677
+ }
678
+
679
+ .herb-code-line.herb-error-line {
680
+ background: rgba(239, 68, 68, 0.1);
681
+ }
682
+
683
+ .herb-validation-overlay .herb-line-number {
684
+ background: #374151;
685
+ color: #9ca3af;
686
+ padding: 8px 12px;
687
+ font-size: 13px;
688
+ width: 40px;
689
+ text-align: right;
690
+ user-select: none;
691
+ border-right: 1px solid #4b5563;
692
+ flex-shrink: 0;
693
+ }
694
+
695
+ .herb-validation-overlay .herb-error-line .herb-line-number {
696
+ background: #dc2626;
697
+ color: white;
698
+ }
699
+
700
+ .herb-validation-overlay .herb-line-content {
701
+ color: #e5e7eb;
702
+ padding: 8px 16px;
703
+ flex: 1;
704
+ font-size: 13px;
705
+ white-space: pre-wrap;
706
+ }
707
+
708
+ .herb-validation-overlay .herb-error-pointer {
709
+ color: #dc2626;
710
+ padding: 4px 16px 8px 57px;
711
+ font-size: 13px;
712
+ font-weight: bold;
713
+ background: #1f2937;
714
+ }
715
+
716
+ .herb-validation-suggestion {
717
+ background: #111111;
718
+ border: 1px solid #374151;
719
+ border-radius: 6px;
720
+ padding: 12px 16px;
721
+ display: flex;
722
+ align-items: flex-start;
723
+ gap: 8px;
724
+ font-size: 14px;
725
+ color: #d1d5db;
726
+ margin-top: 16px;
727
+ }
728
+
729
+ .herb-suggestion-icon {
730
+ font-size: 16px;
731
+ flex-shrink: 0;
732
+ margin-top: 1px;
733
+ color: #10b981;
734
+ }
735
+
736
+ .herb-erb {
737
+ color: #fbbf24;
738
+ font-weight: 600;
739
+ }
740
+
741
+ .herb-erb-content {
742
+ color: #34d399;
743
+ }
744
+
745
+ .herb-tag {
746
+ color: #60a5fa;
747
+ font-weight: 500;
748
+ }
749
+
750
+ .herb-attr {
751
+ color: #f472b6;
752
+ }
753
+
754
+ .herb-value {
755
+ color: #a78bfa;
756
+ }
757
+
758
+ .herb-comment {
759
+ color: #6b7280;
760
+ font-style: italic;
761
+ }