@allegrocdp/preview 0.1.0-dev.6 → 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.
@@ -1,1016 +1,661 @@
1
- <!doctype html>
1
+ <!DOCTYPE html>
2
2
  <html lang="en">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
- <title>Allegro Preview</title>
7
- <link
8
- rel="icon"
9
- type="image/svg+xml"
10
- href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18' fill='none'><rect width='18' height='18' rx='4' fill='%236366f1' opacity='0.15'/><rect x='3' y='3' width='5' height='5' rx='1' fill='%23818cf8'/><rect x='10' y='3' width='5' height='5' rx='1' fill='%23818cf8' opacity='0.5'/><rect x='3' y='10' width='5' height='5' rx='1' fill='%23818cf8' opacity='0.5'/><rect x='10' y='10' width='5' height='5' rx='1' fill='%23818cf8'/></svg>"
11
- />
12
- <style>
13
- *,
14
- *::before,
15
- *::after {
16
- box-sizing: border-box;
17
- margin: 0;
18
- padding: 0;
19
- }
20
-
21
- :root {
22
- /* Sidebar — light mode */
23
- --sb-bg: #f8fafc;
24
- --sb-border: rgba(0, 0, 0, 0.07);
25
- --sb-text: #475569;
26
- --sb-text-active: #0f172a;
27
- --sb-label: #4b5563;
28
- --sb-active: rgba(99, 102, 241, 0.1);
29
- --sb-accent: #6366f1;
30
- --sb-input-bg: rgba(0, 0, 0, 0.04);
31
- --sb-input-border: rgba(0, 0, 0, 0.12);
32
-
33
- --bg: #f1f5f9;
34
- --surface: #ffffff;
35
- --surface-raised: #f8fafc;
36
- --border: #e2e8f0;
37
- --text: #0f172a;
38
- --text-muted: #64748b;
39
- --text-subtle: #94a3b8;
40
- --accent: #6366f1;
41
- --accent-hover: #4f46e5;
42
- --accent-fg: #ffffff;
43
- --toolbar: #ffffff;
44
- --toolbar-border: #e2e8f0;
45
- --tab-active-bg: #6366f1;
46
- --tab-active-fg: #ffffff;
47
- --tab-hover: #f1f5f9;
48
- --badge-bg: #e0e7ff;
49
- --badge-fg: #4338ca;
50
- --card-border: #e2e8f0;
51
- --card-hover: #f8fafc;
52
- --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
53
- }
54
-
55
- [data-theme='dark'] {
56
- /* Sidebar — dark mode (WCAG AA compliant) */
57
- --sb-bg: #0c111d;
58
- --sb-border: rgba(255, 255, 255, 0.07);
59
- --sb-text: #8899b0; /* 6.6:1 on --sb-bg ✓ */
60
- --sb-text-active: #f0f4ff; /* 17:1 on --sb-bg ✓ */
61
- --sb-label: #7b92b2; /* 6.0:1 on --sb-bg ✓ (was #3d5068 = 2.3:1) */
62
- --sb-active: rgba(129, 140, 248, 0.14);
63
- --sb-accent: #818cf8;
64
- --sb-input-bg: rgba(255, 255, 255, 0.05);
65
- --sb-input-border: rgba(255, 255, 255, 0.1);
66
-
67
- --bg: #020617;
68
- --surface: #0f172a;
69
- --surface-raised: #1e293b;
70
- --border: #1e293b;
71
- --text: #f1f5f9;
72
- --text-muted: #94a3b8;
73
- --text-subtle: #475569;
74
- --toolbar: #0f172a;
75
- --toolbar-border: #1e293b;
76
- --tab-hover: #1e293b;
77
- --badge-bg: rgba(99, 102, 241, 0.2);
78
- --badge-fg: #a5b4fc;
79
- --card-border: #1e293b;
80
- --card-hover: #1e293b;
81
- --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
82
- }
83
-
84
- html,
85
- body {
86
- height: 100%;
87
- }
88
-
89
- body {
90
- display: flex;
91
- font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', system-ui, sans-serif;
92
- font-size: 13px;
93
- background: var(--bg);
94
- color: var(--text);
95
- -webkit-font-smoothing: antialiased;
96
- }
97
-
98
- /* ── Sidebar ─────────────────────────────────────────── */
99
-
100
- .sidebar {
101
- width: 232px;
102
- flex-shrink: 0;
103
- background: var(--sb-bg);
104
- border-right: 1px solid var(--sb-border);
105
- display: flex;
106
- flex-direction: column;
107
- height: 100vh;
108
- overflow: hidden;
109
- }
110
-
111
- .sidebar-header {
112
- display: flex;
113
- align-items: center;
114
- gap: 8px;
115
- padding: 13px 14px;
116
- border-bottom: 1px solid var(--sb-border);
117
- flex-shrink: 0;
118
- }
119
-
120
- .sidebar-logo {
121
- display: flex;
122
- align-items: center;
123
- gap: 7px;
124
- color: var(--sb-text-active);
125
- font-weight: 600;
126
- font-size: 13px;
127
- letter-spacing: -0.01em;
128
- flex: 1;
129
- }
130
-
131
- .theme-toggle {
132
- background: none;
133
- border: 1px solid var(--sb-border);
134
- border-radius: 6px;
135
- color: var(--sb-text);
136
- cursor: pointer;
137
- padding: 5px 6px;
138
- display: flex;
139
- align-items: center;
140
- justify-content: center;
141
- line-height: 1;
142
- transition:
143
- color 0.15s,
144
- border-color 0.15s;
145
- }
146
-
147
- .theme-toggle:hover {
148
- color: var(--sb-text-active);
149
- border-color: rgba(255, 255, 255, 0.18);
150
- }
151
-
152
- .sidebar-scroll {
153
- flex: 1;
154
- overflow-y: auto;
155
- overflow-x: hidden;
156
- display: flex;
157
- flex-direction: column;
158
- gap: 0;
159
- }
160
-
161
- .sidebar-scroll::-webkit-scrollbar {
162
- width: 4px;
163
- }
164
- .sidebar-scroll::-webkit-scrollbar-track {
165
- background: transparent;
166
- }
167
- .sidebar-scroll::-webkit-scrollbar-thumb {
168
- background: var(--sb-border);
169
- border-radius: 4px;
170
- }
171
-
172
- .sb-section {
173
- flex-shrink: 0;
174
- }
175
-
176
- .sb-section-label {
177
- padding: 14px 16px 5px;
178
- font-size: 10px;
179
- font-weight: 700;
180
- text-transform: uppercase;
181
- letter-spacing: 0.09em;
182
- color: var(--sb-label);
183
- }
184
-
185
- .sb-section-header {
186
- display: flex;
187
- align-items: center;
188
- padding: 14px 10px 5px 16px;
189
- }
190
-
191
- .sb-section-header .sb-section-label {
192
- padding: 0;
193
- flex: 1;
194
- }
195
-
196
- .new-template-btn {
197
- display: flex;
198
- align-items: center;
199
- justify-content: center;
200
- width: 20px;
201
- height: 20px;
202
- border-radius: 4px;
203
- border: 1px solid var(--sb-border);
204
- background: none;
205
- color: var(--sb-label);
206
- cursor: pointer;
207
- font-size: 16px;
208
- line-height: 1;
209
- padding: 0;
210
- transition:
211
- color 0.15s,
212
- border-color 0.15s,
213
- background 0.15s;
214
- }
215
-
216
- .new-template-btn:hover {
217
- color: var(--sb-text-active);
218
- border-color: rgba(255, 255, 255, 0.18);
219
- background: rgba(255, 255, 255, 0.05);
220
- }
221
-
222
- /* ── Create template modal ──────────────────────────────── */
223
-
224
- .modal-backdrop {
225
- position: fixed;
226
- inset: 0;
227
- background: rgba(0, 0, 0, 0.55);
228
- display: flex;
229
- align-items: center;
230
- justify-content: center;
231
- z-index: 100;
232
- }
233
-
234
- .modal-backdrop.hidden {
235
- display: none;
236
- }
237
-
238
- .modal {
239
- background: var(--sb-bg);
240
- border: 1px solid rgba(255, 255, 255, 0.12);
241
- border-radius: 10px;
242
- padding: 20px;
243
- width: 320px;
244
- box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
245
- }
246
-
247
- .modal-title {
248
- font-size: 13px;
249
- font-weight: 600;
250
- color: var(--sb-text-active);
251
- margin-bottom: 14px;
252
- }
253
-
254
- .modal-field {
255
- display: flex;
256
- flex-direction: column;
257
- gap: 5px;
258
- margin-bottom: 14px;
259
- }
260
-
261
- .modal-label {
262
- font-size: 11px;
263
- font-weight: 500;
264
- color: var(--sb-text);
265
- }
266
-
267
- .modal-input {
268
- background: var(--sb-input-bg);
269
- border: 1px solid var(--sb-input-border);
270
- border-radius: 6px;
271
- padding: 7px 9px;
272
- font-size: 12px;
273
- color: var(--sb-text-active);
274
- font-family: 'SF Mono', 'Fira Code', monospace;
275
- outline: none;
276
- transition: border-color 0.15s;
277
- }
278
-
279
- .modal-input:focus {
280
- border-color: var(--sb-accent);
281
- }
282
- .modal-input.invalid {
283
- border-color: #f87171;
284
- }
285
-
286
- .modal-error {
287
- font-size: 11px;
288
- color: #f87171;
289
- min-height: 15px;
290
- }
291
-
292
- .modal-actions {
293
- display: flex;
294
- justify-content: flex-end;
295
- gap: 8px;
296
- margin-top: 4px;
297
- }
298
-
299
- .modal-btn {
300
- border-radius: 6px;
301
- border: 1px solid transparent;
302
- padding: 6px 14px;
303
- font-size: 12px;
304
- font-weight: 500;
305
- font-family: inherit;
306
- cursor: pointer;
307
- transition:
308
- background 0.12s,
309
- color 0.12s,
310
- border-color 0.12s;
311
- }
312
-
313
- .modal-btn-cancel {
314
- background: none;
315
- border-color: var(--sb-border);
316
- color: var(--sb-text);
317
- }
318
-
319
- .modal-btn-cancel:hover {
320
- background: rgba(255, 255, 255, 0.05);
321
- color: var(--sb-text-active);
322
- }
323
-
324
- .modal-btn-create {
325
- background: var(--sb-accent);
326
- color: #fff;
327
- }
328
-
329
- .modal-btn-create:hover {
330
- background: #6366f1;
331
- }
332
- .modal-btn-create:disabled {
333
- opacity: 0.4;
334
- cursor: default;
335
- }
336
-
337
- /* Template list */
338
-
339
- .template-nav {
340
- display: flex;
341
- flex-direction: column;
342
- gap: 1px;
343
- padding: 2px 8px 8px;
344
- }
345
-
346
- .template-nav:empty::after {
347
- content: 'No templates found';
348
- display: block;
349
- padding: 4px 8px 8px;
350
- color: var(--sb-label);
351
- font-size: 12px;
352
- }
353
-
354
- .template-nav-item {
355
- display: flex;
356
- align-items: center;
357
- gap: 8px;
358
- padding: 6px 10px;
359
- border-radius: 6px;
360
- cursor: pointer;
361
- color: var(--sb-text);
362
- font-size: 13px;
363
- border: none;
364
- background: none;
365
- text-align: left;
366
- width: 100%;
367
- transition:
368
- background 0.1s,
369
- color 0.1s;
370
- }
371
-
372
- .template-nav-item:hover {
373
- background: rgba(255, 255, 255, 0.05);
374
- color: var(--sb-text-active);
375
- }
376
- .template-nav-item.active {
377
- background: var(--sb-active);
378
- color: var(--sb-text-active);
379
- }
380
-
381
- .template-nav-dot {
382
- width: 6px;
383
- height: 6px;
384
- border-radius: 50%;
385
- background: var(--sb-label);
386
- flex-shrink: 0;
387
- transition: background 0.1s;
388
- }
389
-
390
- .template-nav-item.active .template-nav-dot {
391
- background: var(--sb-accent);
392
- }
393
-
394
- .template-nav-name {
395
- overflow: hidden;
396
- text-overflow: ellipsis;
397
- white-space: nowrap;
398
- flex: 1;
399
- }
400
-
401
- /* Tenant section */
402
-
403
- .sb-divider {
404
- height: 1px;
405
- background: var(--sb-border);
406
- margin: 2px 0;
407
- }
408
-
409
- .tenant-input-wrap {
410
- padding: 2px 10px 10px;
411
- }
412
-
413
- .tenant-input {
414
- width: 100%;
415
- background: var(--sb-input-bg);
416
- border: 1px solid var(--sb-input-border);
417
- border-radius: 6px;
418
- padding: 6px 8px;
419
- font-size: 12px;
420
- color: var(--sb-text-active);
421
- outline: none;
422
- font-family: 'SF Mono', 'Fira Code', monospace;
423
- transition: border-color 0.15s;
424
- }
425
-
426
- .tenant-input::placeholder {
427
- color: var(--sb-label);
428
- font-family: inherit;
429
- }
430
- .tenant-input:focus {
431
- border-color: var(--sb-accent);
432
- }
433
-
434
- .tenant-hint {
435
- font-size: 10px;
436
- color: var(--sb-label);
437
- margin-top: 4px;
438
- padding: 0 2px;
439
- }
440
-
441
- .tenant-active-badge {
442
- display: inline-flex;
443
- align-items: center;
444
- gap: 4px;
445
- font-size: 10px;
446
- color: #4ade80;
447
- margin-top: 4px;
448
- padding: 0 2px;
449
- }
450
-
451
- .tenant-active-badge::before {
452
- content: '';
453
- display: inline-block;
454
- width: 5px;
455
- height: 5px;
456
- border-radius: 50%;
457
- background: #4ade80;
458
- }
459
-
460
- /* Fields section */
461
-
462
- .fields-scroll {
463
- flex: 1;
464
- overflow-y: auto;
465
- padding: 2px 10px 20px;
466
- min-height: 0;
467
- }
468
-
469
- .fields-scroll::-webkit-scrollbar {
470
- width: 4px;
471
- }
472
- .fields-scroll::-webkit-scrollbar-track {
473
- background: transparent;
474
- }
475
- .fields-scroll::-webkit-scrollbar-thumb {
476
- background: var(--sb-border);
477
- border-radius: 4px;
478
- }
479
-
480
- .field-group {
481
- display: flex;
482
- flex-direction: column;
483
- gap: 4px;
484
- margin-bottom: 10px;
485
- }
486
-
487
- .field-label {
488
- font-size: 11px;
489
- font-weight: 500;
490
- color: var(--sb-text);
491
- padding: 0 2px;
492
- }
493
-
494
- .field-input {
495
- width: 100%;
496
- background: var(--sb-input-bg);
497
- border: 1px solid var(--sb-input-border);
498
- border-radius: 5px;
499
- padding: 5px 8px;
500
- font-size: 12px;
501
- color: var(--sb-text-active);
502
- outline: none;
503
- font-family: inherit;
504
- transition: border-color 0.15s;
505
- }
506
-
507
- .field-input:focus {
508
- border-color: var(--sb-accent);
509
- }
510
-
511
- textarea.field-input {
512
- resize: vertical;
513
- min-height: 54px;
514
- }
515
-
516
- .field-checkbox-row {
517
- display: flex;
518
- align-items: center;
519
- gap: 8px;
520
- margin-bottom: 10px;
521
- }
522
-
523
- .field-checkbox-row input[type='checkbox'] {
524
- width: 14px;
525
- height: 14px;
526
- accent-color: var(--sb-accent);
527
- flex-shrink: 0;
528
- }
529
-
530
- .no-fields {
531
- padding: 4px 2px;
532
- color: var(--sb-label);
533
- font-size: 12px;
534
- }
535
-
536
- .field-error {
537
- padding: 6px 8px;
538
- margin-bottom: 10px;
539
- background: rgba(239, 68, 68, 0.12);
540
- border: 1px solid rgba(239, 68, 68, 0.25);
541
- border-radius: 4px;
542
- color: #f87171;
543
- font-size: 11px;
544
- line-height: 1.4;
545
- }
546
-
547
- /* ── Main ─────────────────────────────────────────────── */
548
-
549
- .main {
550
- flex: 1;
551
- display: flex;
552
- flex-direction: column;
553
- height: 100vh;
554
- overflow: hidden;
555
- min-width: 0;
556
- }
557
-
558
- .toolbar {
559
- background: var(--toolbar);
560
- border-bottom: 1px solid var(--toolbar-border);
561
- padding: 0 16px;
562
- display: flex;
563
- align-items: center;
564
- gap: 10px;
565
- height: 48px;
566
- flex-shrink: 0;
567
- }
568
-
569
- .tab-group {
570
- display: flex;
571
- align-items: center;
572
- gap: 2px;
573
- background: var(--surface-raised);
574
- border: 1px solid var(--border);
575
- border-radius: 8px;
576
- padding: 3px;
577
- }
578
-
579
- .tab-btn {
580
- border: none;
581
- background: none;
582
- border-radius: 5px;
583
- padding: 5px 11px;
584
- font-size: 12px;
585
- font-weight: 500;
586
- cursor: pointer;
587
- color: var(--text-muted);
588
- font-family: inherit;
589
- transition:
590
- background 0.12s,
591
- color 0.12s;
592
- white-space: nowrap;
593
- }
594
-
595
- .tab-btn:hover {
596
- background: var(--tab-hover);
597
- color: var(--text);
598
- }
599
- .tab-btn.active {
600
- background: var(--tab-active-bg);
601
- color: var(--tab-active-fg);
602
- box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
603
- }
604
- .tab-btn:disabled {
605
- opacity: 0.35;
606
- cursor: default;
607
- pointer-events: none;
608
- }
609
-
610
- .toolbar-sep {
611
- width: 1px;
612
- height: 20px;
613
- background: var(--border);
614
- }
615
-
616
- .device-group {
617
- display: flex;
618
- align-items: center;
619
- gap: 2px;
620
- margin-left: auto;
621
- }
622
-
623
- .device-btn {
624
- border: 1px solid transparent;
625
- background: none;
626
- border-radius: 6px;
627
- padding: 5px 9px;
628
- font-size: 12px;
629
- font-weight: 500;
630
- cursor: pointer;
631
- color: var(--text-muted);
632
- font-family: inherit;
633
- display: flex;
634
- align-items: center;
635
- gap: 5px;
636
- transition:
637
- background 0.12s,
638
- color 0.12s,
639
- border-color 0.12s;
640
- }
641
-
642
- .device-btn:hover {
643
- background: var(--tab-hover);
644
- color: var(--text);
645
- }
646
- .device-btn.active {
647
- background: var(--surface-raised);
648
- color: var(--text);
649
- border-color: var(--border);
650
- }
651
- .device-btn:disabled {
652
- opacity: 0.35;
653
- cursor: default;
654
- pointer-events: none;
655
- }
656
-
657
- .template-badge {
658
- background: var(--badge-bg);
659
- color: var(--badge-fg);
660
- font-size: 11px;
661
- font-weight: 600;
662
- padding: 2px 7px;
663
- border-radius: 4px;
664
- max-width: 180px;
665
- overflow: hidden;
666
- text-overflow: ellipsis;
667
- white-space: nowrap;
668
- }
669
-
670
- /* ── Preview area ─────────────────────────────────────── */
671
-
672
- .preview-area {
673
- flex: 1;
674
- overflow: auto;
675
- background: var(--bg);
676
- }
677
-
678
- /* Selector screen */
679
-
680
- .selector-screen {
681
- display: flex;
682
- flex-direction: column;
683
- align-items: center;
684
- justify-content: center;
685
- min-height: 100%;
686
- padding: 48px 32px;
687
- }
688
-
689
- .selector-eyebrow {
690
- font-size: 11px;
691
- font-weight: 700;
692
- text-transform: uppercase;
693
- letter-spacing: 0.09em;
694
- color: var(--accent);
695
- margin-bottom: 10px;
696
- }
697
-
698
- .selector-heading {
699
- font-size: 22px;
700
- font-weight: 700;
701
- color: var(--text);
702
- margin-bottom: 6px;
703
- letter-spacing: -0.02em;
704
- }
705
-
706
- .selector-sub {
707
- font-size: 13px;
708
- color: var(--text-muted);
709
- margin-bottom: 36px;
710
- }
711
-
712
- .selector-grid {
713
- display: grid;
714
- grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
715
- gap: 12px;
716
- width: 100%;
717
- max-width: 700px;
718
- }
719
-
720
- .selector-card {
721
- background: var(--surface);
722
- border: 1px solid var(--card-border);
723
- border-radius: 10px;
724
- padding: 18px 16px 14px;
725
- cursor: pointer;
726
- text-align: left;
727
- font-family: inherit;
728
- display: flex;
729
- flex-direction: column;
730
- gap: 6px;
731
- box-shadow: var(--card-shadow);
732
- transition:
733
- border-color 0.15s,
734
- box-shadow 0.15s,
735
- transform 0.1s;
736
- }
737
-
738
- .selector-card:hover {
739
- border-color: var(--accent);
740
- box-shadow:
741
- 0 0 0 3px rgba(99, 102, 241, 0.12),
742
- var(--card-shadow);
743
- transform: translateY(-1px);
744
- }
745
-
746
- .selector-card-icon {
747
- width: 32px;
748
- height: 32px;
749
- border-radius: 8px;
750
- background: var(--badge-bg);
751
- display: flex;
752
- align-items: center;
753
- justify-content: center;
754
- margin-bottom: 4px;
755
- }
756
-
757
- .selector-card-icon svg {
758
- color: var(--accent);
759
- }
760
-
761
- .selector-card-name {
762
- font-size: 13px;
763
- font-weight: 600;
764
- color: var(--text);
765
- overflow: hidden;
766
- text-overflow: ellipsis;
767
- white-space: nowrap;
768
- }
769
-
770
- .selector-card-slug {
771
- font-size: 11px;
772
- color: var(--text-subtle);
773
- font-family: 'SF Mono', 'Fira Code', monospace;
774
- }
775
-
776
- .selector-empty {
777
- display: flex;
778
- flex-direction: column;
779
- align-items: center;
780
- gap: 10px;
781
- color: var(--text-subtle);
782
- font-size: 13px;
783
- padding: 60px;
784
- }
785
-
786
- /* Live preview area — full-width (default) */
787
-
788
- .preview-stage {
789
- min-height: 100%;
790
- }
791
-
792
- /* Breakpoint mode — centers a fixed-width frame */
793
- .preview-stage--breakpoint {
794
- display: flex;
795
- align-items: flex-start;
796
- justify-content: center;
797
- padding: 32px 28px;
798
- min-width: fit-content;
799
- }
800
-
801
- .preview-scaler {
802
- flex-shrink: 0;
803
- }
804
-
805
- .preview-frame-wrapper {
806
- background: #fff;
807
- overflow: hidden;
808
- }
809
-
810
- .preview-stage--breakpoint .preview-frame-wrapper {
811
- border-radius: 8px;
812
- box-shadow:
813
- 0 0 0 1px rgba(0, 0, 0, 0.07),
814
- 0 4px 24px rgba(0, 0, 0, 0.09);
815
- }
816
-
817
- .preview-frame-wrapper iframe {
818
- border: none;
819
- display: block;
820
- }
821
- </style>
822
- <script type="module" crossorigin src="/assets/index-CDDVjT8Y.js"></script>
823
- </head>
824
- <body>
825
- <aside class="sidebar">
826
- <div class="sidebar-header">
827
- <div class="sidebar-logo">
828
- <svg width="18" height="18" viewBox="0 0 18 18" fill="none">
829
- <rect width="18" height="18" rx="4" fill="#6366f1" opacity="0.15" />
830
- <rect x="3" y="3" width="5" height="5" rx="1" fill="#818cf8" />
831
- <rect x="10" y="3" width="5" height="5" rx="1" fill="#818cf8" opacity="0.5" />
832
- <rect x="3" y="10" width="5" height="5" rx="1" fill="#818cf8" opacity="0.5" />
833
- <rect x="10" y="10" width="5" height="5" rx="1" fill="#818cf8" />
834
- </svg>
835
- Allegro Preview
836
- </div>
837
- <button class="theme-toggle" id="theme-toggle" title="Toggle dark mode">
838
- <svg
839
- id="theme-icon-sun"
840
- width="14"
841
- height="14"
842
- viewBox="0 0 24 24"
843
- fill="none"
844
- stroke="currentColor"
845
- stroke-width="2"
846
- stroke-linecap="round"
847
- stroke-linejoin="round"
848
- >
849
- <circle cx="12" cy="12" r="4" />
850
- <line x1="12" y1="2" x2="12" y2="6" />
851
- <line x1="12" y1="18" x2="12" y2="22" />
852
- <line x1="4.22" y1="4.22" x2="7.05" y2="7.05" />
853
- <line x1="16.95" y1="16.95" x2="19.78" y2="19.78" />
854
- <line x1="2" y1="12" x2="6" y2="12" />
855
- <line x1="18" y1="12" x2="22" y2="12" />
856
- <line x1="4.22" y1="19.78" x2="7.05" y2="16.95" />
857
- <line x1="16.95" y1="7.05" x2="19.78" y2="4.22" />
858
- </svg>
859
- <svg
860
- id="theme-icon-moon"
861
- width="14"
862
- height="14"
863
- viewBox="0 0 24 24"
864
- fill="none"
865
- stroke="currentColor"
866
- stroke-width="2"
867
- stroke-linecap="round"
868
- stroke-linejoin="round"
869
- style="display: none"
870
- >
871
- <path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" />
872
- </svg>
873
- </button>
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>Allegro Preview</title>
7
+ <link rel="icon" type="image/svg+xml" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18' fill='none'><rect width='18' height='18' rx='4' fill='%236366f1' opacity='0.15'/><rect x='3' y='3' width='5' height='5' rx='1' fill='%23818cf8'/><rect x='10' y='3' width='5' height='5' rx='1' fill='%23818cf8' opacity='0.5'/><rect x='3' y='10' width='5' height='5' rx='1' fill='%23818cf8' opacity='0.5'/><rect x='10' y='10' width='5' height='5' rx='1' fill='%23818cf8'/></svg>" />
8
+ <style>
9
+ *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
10
+
11
+ :root {
12
+ --sb-bg: #0c111d;
13
+ --sb-border: rgba(255,255,255,0.07);
14
+ --sb-text: #8899b0;
15
+ --sb-text-active: #f0f4ff;
16
+ --sb-label: #3d5068;
17
+ --sb-active: rgba(129,140,248,0.14);
18
+ --sb-accent: #818cf8;
19
+ --sb-input-bg: rgba(255,255,255,0.05);
20
+ --sb-input-border:rgba(255,255,255,0.1);
21
+
22
+ --bg: #f1f5f9;
23
+ --surface: #ffffff;
24
+ --surface-raised: #f8fafc;
25
+ --border: #e2e8f0;
26
+ --text: #0f172a;
27
+ --text-muted: #64748b;
28
+ --text-subtle: #94a3b8;
29
+ --accent: #6366f1;
30
+ --accent-hover: #4f46e5;
31
+ --accent-fg: #ffffff;
32
+ --toolbar: #ffffff;
33
+ --toolbar-border: #e2e8f0;
34
+ --tab-active-bg: #6366f1;
35
+ --tab-active-fg: #ffffff;
36
+ --tab-hover: #f1f5f9;
37
+ --badge-bg: #e0e7ff;
38
+ --badge-fg: #4338ca;
39
+ --card-border: #e2e8f0;
40
+ --card-hover: #f8fafc;
41
+ --card-shadow: 0 1px 3px rgba(0,0,0,0.06);
42
+ }
43
+
44
+ [data-theme="dark"] {
45
+ --bg: #020617;
46
+ --surface: #0f172a;
47
+ --surface-raised: #1e293b;
48
+ --border: #1e293b;
49
+ --text: #f1f5f9;
50
+ --text-muted: #94a3b8;
51
+ --text-subtle: #475569;
52
+ --toolbar: #0f172a;
53
+ --toolbar-border: #1e293b;
54
+ --tab-hover: #1e293b;
55
+ --badge-bg: rgba(99,102,241,0.2);
56
+ --badge-fg: #a5b4fc;
57
+ --card-border: #1e293b;
58
+ --card-hover: #1e293b;
59
+ --card-shadow: 0 1px 3px rgba(0,0,0,0.3);
60
+ }
61
+
62
+ html, body { height: 100%; }
63
+
64
+ body {
65
+ display: flex;
66
+ font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', system-ui, sans-serif;
67
+ font-size: 13px;
68
+ background: var(--bg);
69
+ color: var(--text);
70
+ -webkit-font-smoothing: antialiased;
71
+ }
72
+
73
+ /* ── Sidebar ─────────────────────────────────────────── */
74
+
75
+ .sidebar {
76
+ width: 232px;
77
+ flex-shrink: 0;
78
+ background: var(--sb-bg);
79
+ border-right: 1px solid var(--sb-border);
80
+ display: flex;
81
+ flex-direction: column;
82
+ height: 100vh;
83
+ overflow: hidden;
84
+ }
85
+
86
+ .sidebar-header {
87
+ display: flex;
88
+ align-items: center;
89
+ gap: 8px;
90
+ padding: 13px 14px;
91
+ border-bottom: 1px solid var(--sb-border);
92
+ flex-shrink: 0;
93
+ }
94
+
95
+ .sidebar-logo {
96
+ display: flex;
97
+ align-items: center;
98
+ gap: 7px;
99
+ color: var(--sb-text-active);
100
+ font-weight: 600;
101
+ font-size: 13px;
102
+ letter-spacing: -0.01em;
103
+ flex: 1;
104
+ }
105
+
106
+ .theme-toggle {
107
+ background: none;
108
+ border: 1px solid var(--sb-border);
109
+ border-radius: 6px;
110
+ color: var(--sb-text);
111
+ cursor: pointer;
112
+ padding: 5px 6px;
113
+ display: flex;
114
+ align-items: center;
115
+ justify-content: center;
116
+ line-height: 1;
117
+ transition: color 0.15s, border-color 0.15s;
118
+ }
119
+
120
+ .theme-toggle:hover {
121
+ color: var(--sb-text-active);
122
+ border-color: rgba(255,255,255,0.18);
123
+ }
124
+
125
+ .sidebar-scroll {
126
+ flex: 1;
127
+ overflow-y: auto;
128
+ overflow-x: hidden;
129
+ display: flex;
130
+ flex-direction: column;
131
+ gap: 0;
132
+ }
133
+
134
+ .sidebar-scroll::-webkit-scrollbar { width: 4px; }
135
+ .sidebar-scroll::-webkit-scrollbar-track { background: transparent; }
136
+ .sidebar-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 4px; }
137
+
138
+ .sb-section {
139
+ flex-shrink: 0;
140
+ }
141
+
142
+ .sb-section-label {
143
+ padding: 14px 16px 5px;
144
+ font-size: 10px;
145
+ font-weight: 700;
146
+ text-transform: uppercase;
147
+ letter-spacing: 0.09em;
148
+ color: var(--sb-label);
149
+ }
150
+
151
+ /* Template list */
152
+
153
+ .template-nav {
154
+ display: flex;
155
+ flex-direction: column;
156
+ gap: 1px;
157
+ padding: 2px 8px 8px;
158
+ }
159
+
160
+ .template-nav:empty::after {
161
+ content: 'No templates found';
162
+ display: block;
163
+ padding: 4px 8px 8px;
164
+ color: var(--sb-label);
165
+ font-size: 12px;
166
+ }
167
+
168
+ .template-nav-item {
169
+ display: flex;
170
+ align-items: center;
171
+ gap: 8px;
172
+ padding: 6px 10px;
173
+ border-radius: 6px;
174
+ cursor: pointer;
175
+ color: var(--sb-text);
176
+ font-size: 13px;
177
+ border: none;
178
+ background: none;
179
+ text-align: left;
180
+ width: 100%;
181
+ transition: background 0.1s, color 0.1s;
182
+ }
183
+
184
+ .template-nav-item:hover { background: rgba(255,255,255,0.05); color: var(--sb-text-active); }
185
+ .template-nav-item.active { background: var(--sb-active); color: var(--sb-text-active); }
186
+
187
+ .template-nav-dot {
188
+ width: 6px;
189
+ height: 6px;
190
+ border-radius: 50%;
191
+ background: var(--sb-label);
192
+ flex-shrink: 0;
193
+ transition: background 0.1s;
194
+ }
195
+
196
+ .template-nav-item.active .template-nav-dot { background: var(--sb-accent); }
197
+
198
+ .template-nav-name {
199
+ overflow: hidden;
200
+ text-overflow: ellipsis;
201
+ white-space: nowrap;
202
+ flex: 1;
203
+ }
204
+
205
+ /* Tenant section */
206
+
207
+ .sb-divider {
208
+ height: 1px;
209
+ background: var(--sb-border);
210
+ margin: 2px 0;
211
+ }
212
+
213
+ .tenant-input-wrap {
214
+ padding: 2px 10px 10px;
215
+ }
216
+
217
+ .tenant-input {
218
+ width: 100%;
219
+ background: var(--sb-input-bg);
220
+ border: 1px solid var(--sb-input-border);
221
+ border-radius: 6px;
222
+ padding: 6px 8px;
223
+ font-size: 12px;
224
+ color: var(--sb-text-active);
225
+ outline: none;
226
+ font-family: 'SF Mono', 'Fira Code', monospace;
227
+ transition: border-color 0.15s;
228
+ }
229
+
230
+ .tenant-input::placeholder { color: var(--sb-label); font-family: inherit; }
231
+ .tenant-input:focus { border-color: var(--sb-accent); }
232
+
233
+ .tenant-hint {
234
+ font-size: 10px;
235
+ color: var(--sb-label);
236
+ margin-top: 4px;
237
+ padding: 0 2px;
238
+ }
239
+
240
+ .tenant-active-badge {
241
+ display: inline-flex;
242
+ align-items: center;
243
+ gap: 4px;
244
+ font-size: 10px;
245
+ color: #4ade80;
246
+ margin-top: 4px;
247
+ padding: 0 2px;
248
+ }
249
+
250
+ .tenant-active-badge::before {
251
+ content: '';
252
+ display: inline-block;
253
+ width: 5px;
254
+ height: 5px;
255
+ border-radius: 50%;
256
+ background: #4ade80;
257
+ }
258
+
259
+ /* Fields section */
260
+
261
+ .fields-scroll {
262
+ flex: 1;
263
+ overflow-y: auto;
264
+ padding: 2px 10px 20px;
265
+ min-height: 0;
266
+ }
267
+
268
+ .fields-scroll::-webkit-scrollbar { width: 4px; }
269
+ .fields-scroll::-webkit-scrollbar-track { background: transparent; }
270
+ .fields-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 4px; }
271
+
272
+ .field-group {
273
+ display: flex;
274
+ flex-direction: column;
275
+ gap: 4px;
276
+ margin-bottom: 10px;
277
+ }
278
+
279
+ .field-label {
280
+ font-size: 11px;
281
+ font-weight: 500;
282
+ color: var(--sb-text);
283
+ padding: 0 2px;
284
+ }
285
+
286
+ .field-input {
287
+ width: 100%;
288
+ background: var(--sb-input-bg);
289
+ border: 1px solid var(--sb-input-border);
290
+ border-radius: 5px;
291
+ padding: 5px 8px;
292
+ font-size: 12px;
293
+ color: var(--sb-text-active);
294
+ outline: none;
295
+ font-family: inherit;
296
+ transition: border-color 0.15s;
297
+ }
298
+
299
+ .field-input:focus { border-color: var(--sb-accent); }
300
+
301
+ textarea.field-input { resize: vertical; min-height: 54px; }
302
+
303
+ .field-checkbox-row {
304
+ display: flex;
305
+ align-items: center;
306
+ gap: 8px;
307
+ margin-bottom: 10px;
308
+ }
309
+
310
+ .field-checkbox-row input[type="checkbox"] {
311
+ width: 14px;
312
+ height: 14px;
313
+ accent-color: var(--sb-accent);
314
+ flex-shrink: 0;
315
+ }
316
+
317
+ .no-fields {
318
+ padding: 4px 2px;
319
+ color: var(--sb-label);
320
+ font-size: 12px;
321
+ }
322
+
323
+ .field-error {
324
+ padding: 6px 8px;
325
+ margin-bottom: 10px;
326
+ background: rgba(239,68,68,0.12);
327
+ border: 1px solid rgba(239,68,68,0.25);
328
+ border-radius: 4px;
329
+ color: #f87171;
330
+ font-size: 11px;
331
+ line-height: 1.4;
332
+ }
333
+
334
+ /* ── Main ─────────────────────────────────────────────── */
335
+
336
+ .main {
337
+ flex: 1;
338
+ display: flex;
339
+ flex-direction: column;
340
+ height: 100vh;
341
+ overflow: hidden;
342
+ min-width: 0;
343
+ }
344
+
345
+ .toolbar {
346
+ background: var(--toolbar);
347
+ border-bottom: 1px solid var(--toolbar-border);
348
+ padding: 0 16px;
349
+ display: flex;
350
+ align-items: center;
351
+ gap: 10px;
352
+ height: 48px;
353
+ flex-shrink: 0;
354
+ }
355
+
356
+ .tab-group {
357
+ display: flex;
358
+ align-items: center;
359
+ gap: 2px;
360
+ background: var(--surface-raised);
361
+ border: 1px solid var(--border);
362
+ border-radius: 8px;
363
+ padding: 3px;
364
+ }
365
+
366
+ .tab-btn {
367
+ border: none;
368
+ background: none;
369
+ border-radius: 5px;
370
+ padding: 5px 11px;
371
+ font-size: 12px;
372
+ font-weight: 500;
373
+ cursor: pointer;
374
+ color: var(--text-muted);
375
+ font-family: inherit;
376
+ transition: background 0.12s, color 0.12s;
377
+ white-space: nowrap;
378
+ }
379
+
380
+ .tab-btn:hover { background: var(--tab-hover); color: var(--text); }
381
+ .tab-btn.active { background: var(--tab-active-bg); color: var(--tab-active-fg); box-shadow: 0 1px 2px rgba(0,0,0,0.15); }
382
+ .tab-btn:disabled { opacity: 0.35; cursor: default; pointer-events: none; }
383
+
384
+ .toolbar-sep {
385
+ width: 1px;
386
+ height: 20px;
387
+ background: var(--border);
388
+ }
389
+
390
+ .device-group {
391
+ display: flex;
392
+ align-items: center;
393
+ gap: 2px;
394
+ margin-left: auto;
395
+ }
396
+
397
+ .device-btn {
398
+ border: 1px solid transparent;
399
+ background: none;
400
+ border-radius: 6px;
401
+ padding: 5px 9px;
402
+ font-size: 12px;
403
+ font-weight: 500;
404
+ cursor: pointer;
405
+ color: var(--text-muted);
406
+ font-family: inherit;
407
+ display: flex;
408
+ align-items: center;
409
+ gap: 5px;
410
+ transition: background 0.12s, color 0.12s, border-color 0.12s;
411
+ }
412
+
413
+ .device-btn:hover { background: var(--tab-hover); color: var(--text); }
414
+ .device-btn.active { background: var(--surface-raised); color: var(--text); border-color: var(--border); }
415
+ .device-btn:disabled { opacity: 0.35; cursor: default; pointer-events: none; }
416
+
417
+ .template-badge {
418
+ background: var(--badge-bg);
419
+ color: var(--badge-fg);
420
+ font-size: 11px;
421
+ font-weight: 600;
422
+ padding: 2px 7px;
423
+ border-radius: 4px;
424
+ max-width: 180px;
425
+ overflow: hidden;
426
+ text-overflow: ellipsis;
427
+ white-space: nowrap;
428
+ }
429
+
430
+ /* ── Preview area ─────────────────────────────────────── */
431
+
432
+ .preview-area {
433
+ flex: 1;
434
+ overflow: auto;
435
+ background: var(--bg);
436
+ }
437
+
438
+ /* Selector screen */
439
+
440
+ .selector-screen {
441
+ display: flex;
442
+ flex-direction: column;
443
+ align-items: center;
444
+ justify-content: center;
445
+ min-height: 100%;
446
+ padding: 48px 32px;
447
+ }
448
+
449
+ .selector-eyebrow {
450
+ font-size: 11px;
451
+ font-weight: 700;
452
+ text-transform: uppercase;
453
+ letter-spacing: 0.09em;
454
+ color: var(--accent);
455
+ margin-bottom: 10px;
456
+ }
457
+
458
+ .selector-heading {
459
+ font-size: 22px;
460
+ font-weight: 700;
461
+ color: var(--text);
462
+ margin-bottom: 6px;
463
+ letter-spacing: -0.02em;
464
+ }
465
+
466
+ .selector-sub {
467
+ font-size: 13px;
468
+ color: var(--text-muted);
469
+ margin-bottom: 36px;
470
+ }
471
+
472
+ .selector-grid {
473
+ display: grid;
474
+ grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
475
+ gap: 12px;
476
+ width: 100%;
477
+ max-width: 700px;
478
+ }
479
+
480
+ .selector-card {
481
+ background: var(--surface);
482
+ border: 1px solid var(--card-border);
483
+ border-radius: 10px;
484
+ padding: 18px 16px 14px;
485
+ cursor: pointer;
486
+ text-align: left;
487
+ font-family: inherit;
488
+ display: flex;
489
+ flex-direction: column;
490
+ gap: 6px;
491
+ box-shadow: var(--card-shadow);
492
+ transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
493
+ }
494
+
495
+ .selector-card:hover {
496
+ border-color: var(--accent);
497
+ box-shadow: 0 0 0 3px rgba(99,102,241,0.12), var(--card-shadow);
498
+ transform: translateY(-1px);
499
+ }
500
+
501
+ .selector-card-icon {
502
+ width: 32px;
503
+ height: 32px;
504
+ border-radius: 8px;
505
+ background: var(--badge-bg);
506
+ display: flex;
507
+ align-items: center;
508
+ justify-content: center;
509
+ margin-bottom: 4px;
510
+ }
511
+
512
+ .selector-card-icon svg { color: var(--accent); }
513
+
514
+ .selector-card-name {
515
+ font-size: 13px;
516
+ font-weight: 600;
517
+ color: var(--text);
518
+ overflow: hidden;
519
+ text-overflow: ellipsis;
520
+ white-space: nowrap;
521
+ }
522
+
523
+ .selector-card-slug {
524
+ font-size: 11px;
525
+ color: var(--text-subtle);
526
+ font-family: 'SF Mono', 'Fira Code', monospace;
527
+ }
528
+
529
+ .selector-empty {
530
+ display: flex;
531
+ flex-direction: column;
532
+ align-items: center;
533
+ gap: 10px;
534
+ color: var(--text-subtle);
535
+ font-size: 13px;
536
+ padding: 60px;
537
+ }
538
+
539
+ /* Live preview area — full-width (default) */
540
+
541
+ .preview-stage {
542
+ min-height: 100%;
543
+ }
544
+
545
+ /* Breakpoint mode — centers a fixed-width frame */
546
+ .preview-stage--breakpoint {
547
+ display: flex;
548
+ align-items: flex-start;
549
+ justify-content: center;
550
+ padding: 32px 28px;
551
+ min-width: fit-content;
552
+ }
553
+
554
+ .preview-scaler { flex-shrink: 0; }
555
+
556
+ .preview-frame-wrapper {
557
+ background: #fff;
558
+ overflow: hidden;
559
+ }
560
+
561
+ .preview-stage--breakpoint .preview-frame-wrapper {
562
+ border-radius: 8px;
563
+ box-shadow: 0 0 0 1px rgba(0,0,0,0.07), 0 4px 24px rgba(0,0,0,0.09);
564
+ }
565
+
566
+ .preview-frame-wrapper iframe { border: none; display: block; }
567
+ </style>
568
+ <script type="module" crossorigin src="/assets/index-Bz9RtHcN.js"></script>
569
+ </head>
570
+ <body>
571
+ <aside class="sidebar">
572
+ <div class="sidebar-header">
573
+ <div class="sidebar-logo">
574
+ <svg width="18" height="18" viewBox="0 0 18 18" fill="none">
575
+ <rect width="18" height="18" rx="4" fill="#6366f1" opacity="0.15"/>
576
+ <rect x="3" y="3" width="5" height="5" rx="1" fill="#818cf8"/>
577
+ <rect x="10" y="3" width="5" height="5" rx="1" fill="#818cf8" opacity="0.5"/>
578
+ <rect x="3" y="10" width="5" height="5" rx="1" fill="#818cf8" opacity="0.5"/>
579
+ <rect x="10" y="10" width="5" height="5" rx="1" fill="#818cf8"/>
580
+ </svg>
581
+ Allegro Preview
874
582
  </div>
583
+ <button class="theme-toggle" id="theme-toggle" title="Toggle dark mode">
584
+ <svg id="theme-icon-sun" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
585
+ <circle cx="12" cy="12" r="4"/><line x1="12" y1="2" x2="12" y2="6"/><line x1="12" y1="18" x2="12" y2="22"/>
586
+ <line x1="4.22" y1="4.22" x2="7.05" y2="7.05"/><line x1="16.95" y1="16.95" x2="19.78" y2="19.78"/>
587
+ <line x1="2" y1="12" x2="6" y2="12"/><line x1="18" y1="12" x2="22" y2="12"/>
588
+ <line x1="4.22" y1="19.78" x2="7.05" y2="16.95"/><line x1="16.95" y1="7.05" x2="19.78" y2="4.22"/>
589
+ </svg>
590
+ <svg id="theme-icon-moon" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="display:none">
591
+ <path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"/>
592
+ </svg>
593
+ </button>
594
+ </div>
875
595
 
876
- <div class="sidebar-scroll">
877
- <div class="sb-section">
878
- <div class="sb-section-header">
879
- <span class="sb-section-label">Templates</span>
880
- <button class="new-template-btn" id="new-template-btn" title="New template">+</button>
881
- </div>
882
- <nav class="template-nav" id="template-nav"></nav>
883
- </div>
884
-
885
- <div class="sb-divider"></div>
886
-
887
- <div class="sb-section">
888
- <div class="sb-section-label">Tenant SDK</div>
889
- <div class="tenant-input-wrap">
890
- <input
891
- class="tenant-input"
892
- id="tenant-input"
893
- type="text"
894
- placeholder="tenant.allegro.alley.dev"
895
- autocomplete="off"
896
- spellcheck="false"
897
- />
898
- <div id="tenant-status" class="tenant-hint">Loads /client.js on the preview page</div>
899
- </div>
900
- </div>
901
-
902
- <div class="sb-divider"></div>
903
-
904
- <div class="sb-section-label" style="padding-top: 12px">Fields</div>
905
- <div class="fields-scroll" id="field-list">
906
- <p class="no-fields">Select a template to edit fields.</p>
907
- </div>
908
- </div>
909
- </aside>
910
-
911
- <div class="main">
912
- <div class="toolbar">
913
- <div class="tab-group" id="tab-group">
914
- <button class="tab-btn active" data-tab="standalone" disabled>Standalone</button>
915
- <button class="tab-btn" data-tab="append" disabled>Article &middot; Append</button>
916
- <button class="tab-btn" data-tab="cut" disabled>Article &middot; Cut</button>
917
- </div>
918
- <div class="toolbar-sep"></div>
919
- <span class="template-badge" id="toolbar-badge" style="opacity: 0.4">No template selected</span>
920
- <div class="device-group" id="device-group">
921
- <button class="device-btn active" data-device="full" disabled title="Full width">
922
- <svg
923
- width="13"
924
- height="13"
925
- viewBox="0 0 24 24"
926
- fill="none"
927
- stroke="currentColor"
928
- stroke-width="2"
929
- stroke-linecap="round"
930
- stroke-linejoin="round"
931
- >
932
- <path
933
- d="M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"
934
- />
935
- </svg>
936
- Full
937
- </button>
938
- <button class="device-btn" data-device="desktop" disabled title="Desktop (1280px)">
939
- <svg
940
- width="13"
941
- height="13"
942
- viewBox="0 0 24 24"
943
- fill="none"
944
- stroke="currentColor"
945
- stroke-width="2"
946
- stroke-linecap="round"
947
- stroke-linejoin="round"
948
- >
949
- <rect x="2" y="3" width="20" height="14" rx="2" />
950
- <line x1="8" y1="21" x2="16" y2="21" />
951
- <line x1="12" y1="17" x2="12" y2="21" />
952
- </svg>
953
- Desktop
954
- </button>
955
- <button class="device-btn" data-device="tablet" disabled title="Tablet (768px)">
956
- <svg
957
- width="13"
958
- height="13"
959
- viewBox="0 0 24 24"
960
- fill="none"
961
- stroke="currentColor"
962
- stroke-width="2"
963
- stroke-linecap="round"
964
- stroke-linejoin="round"
965
- >
966
- <rect x="4" y="2" width="16" height="20" rx="2" />
967
- <line x1="12" y1="18" x2="12.01" y2="18" />
968
- </svg>
969
- Tablet
970
- </button>
971
- <button class="device-btn" data-device="mobile" disabled title="Mobile (390px)">
972
- <svg
973
- width="11"
974
- height="13"
975
- viewBox="0 0 24 24"
976
- fill="none"
977
- stroke="currentColor"
978
- stroke-width="2"
979
- stroke-linecap="round"
980
- stroke-linejoin="round"
981
- >
982
- <rect x="5" y="2" width="14" height="20" rx="2" />
983
- <line x1="12" y1="18" x2="12.01" y2="18" />
984
- </svg>
985
- Mobile
986
- </button>
987
- </div>
596
+ <div class="sidebar-scroll">
597
+ <div class="sb-section">
598
+ <div class="sb-section-label">Templates</div>
599
+ <nav class="template-nav" id="template-nav"></nav>
988
600
  </div>
989
601
 
990
- <div class="preview-area" id="preview-area"></div>
991
- </div>
602
+ <div class="sb-divider"></div>
992
603
 
993
- <div class="modal-backdrop hidden" id="create-modal-backdrop">
994
- <div class="modal" role="dialog" aria-modal="true" aria-labelledby="modal-title">
995
- <div class="modal-title" id="modal-title">New Template</div>
996
- <div class="modal-field">
997
- <label class="modal-label" for="modal-slug-input">Template slug</label>
604
+ <div class="sb-section">
605
+ <div class="sb-section-label">Tenant SDK</div>
606
+ <div class="tenant-input-wrap">
998
607
  <input
999
- class="modal-input"
1000
- id="modal-slug-input"
608
+ class="tenant-input"
609
+ id="tenant-input"
1001
610
  type="text"
1002
- placeholder="my-template"
611
+ placeholder="tenant.allegro.alley.dev"
1003
612
  autocomplete="off"
1004
613
  spellcheck="false"
1005
614
  />
1006
- <div class="modal-error" id="modal-error"></div>
1007
- </div>
1008
- <div class="modal-actions">
1009
- <button class="modal-btn modal-btn-cancel" id="modal-cancel-btn">Cancel</button>
1010
- <button class="modal-btn modal-btn-create" id="modal-create-btn">Create</button>
615
+ <div id="tenant-status" class="tenant-hint">Loads /client.js on the preview page</div>
1011
616
  </div>
1012
617
  </div>
618
+
619
+ <div class="sb-divider"></div>
620
+
621
+ <div class="sb-section-label" style="padding-top:12px">Fields</div>
622
+ <div class="fields-scroll" id="field-list">
623
+ <p class="no-fields">Select a template to edit fields.</p>
624
+ </div>
625
+ </div>
626
+ </aside>
627
+
628
+ <div class="main">
629
+ <div class="toolbar">
630
+ <div class="tab-group" id="tab-group">
631
+ <button class="tab-btn active" data-tab="standalone" disabled>Standalone</button>
632
+ <button class="tab-btn" data-tab="append" disabled>Article &middot; Append</button>
633
+ <button class="tab-btn" data-tab="cut" disabled>Article &middot; Cut</button>
634
+ </div>
635
+ <div class="toolbar-sep"></div>
636
+ <span class="template-badge" id="toolbar-badge" style="opacity:0.4">No template selected</span>
637
+ <div class="device-group" id="device-group">
638
+ <button class="device-btn active" data-device="full" disabled title="Full width">
639
+ <svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"/></svg>
640
+ Full
641
+ </button>
642
+ <button class="device-btn" data-device="desktop" disabled title="Desktop (1280px)">
643
+ <svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="3" width="20" height="14" rx="2"/><line x1="8" y1="21" x2="16" y2="21"/><line x1="12" y1="17" x2="12" y2="21"/></svg>
644
+ Desktop
645
+ </button>
646
+ <button class="device-btn" data-device="tablet" disabled title="Tablet (768px)">
647
+ <svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="4" y="2" width="16" height="20" rx="2"/><line x1="12" y1="18" x2="12.01" y2="18"/></svg>
648
+ Tablet
649
+ </button>
650
+ <button class="device-btn" data-device="mobile" disabled title="Mobile (390px)">
651
+ <svg width="11" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="5" y="2" width="14" height="20" rx="2"/><line x1="12" y1="18" x2="12.01" y2="18"/></svg>
652
+ Mobile
653
+ </button>
654
+ </div>
1013
655
  </div>
1014
656
 
1015
- </body>
657
+ <div class="preview-area" id="preview-area"></div>
658
+ </div>
659
+
660
+ </body>
1016
661
  </html>