vibespot 0.5.2 → 0.6.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vibespot",
3
- "version": "0.5.2",
3
+ "version": "0.6.0",
4
4
  "description": "AI-powered HubSpot CMS landing page builder — vibe coding & React converter",
5
5
  "type": "module",
6
6
  "bin": {
package/ui/index.html CHANGED
@@ -44,6 +44,12 @@
44
44
  <div class="topbar__logo-icon">v</div>
45
45
  <span class="topbar__brand-name">vibeSpot</span>
46
46
  </div>
47
+ <div style="margin-left:auto">
48
+ <button class="topbar__icon-btn theme-toggle" title="Toggle light/dark mode" onclick="toggleTheme()">
49
+ <svg class="theme-toggle__icon--dark" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><circle cx="12" cy="12" r="5"/><path d="M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"/></svg>
50
+ <svg class="theme-toggle__icon--light" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"/></svg>
51
+ </button>
52
+ </div>
47
53
  </div>
48
54
  <div class="setup" id="setup-screen">
49
55
  <div class="setup__main">
@@ -140,6 +146,10 @@
140
146
  <span class="topbar__project-pill" id="dashboard-theme-name"></span>
141
147
  </div>
142
148
  <div class="topbar__right">
149
+ <button class="topbar__icon-btn theme-toggle" title="Toggle light/dark mode" onclick="toggleTheme()">
150
+ <svg class="theme-toggle__icon--dark" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><circle cx="12" cy="12" r="5"/><path d="M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"/></svg>
151
+ <svg class="theme-toggle__icon--light" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"/></svg>
152
+ </button>
143
153
  <button class="topbar__icon-btn" id="dashboard-settings-btn" title="Settings">
144
154
  <svg width="18" height="18" viewBox="0 0 18 18" fill="none"><path d="M7.5 1.5h3l.4 2.1a5.5 5.5 0 0 1 1.3.7l2-.8 1.5 2.6-1.6 1.3a5.5 5.5 0 0 1 0 1.5l1.6 1.3-1.5 2.6-2-.8a5.5 5.5 0 0 1-1.3.7l-.4 2.1h-3l-.4-2.1a5.5 5.5 0 0 1-1.3-.7l-2 .8-1.5-2.6 1.6-1.3a5.5 5.5 0 0 1 0-1.5L2.3 6.1l1.5-2.6 2 .8a5.5 5.5 0 0 1 1.3-.7L7.5 1.5Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"/><circle cx="9" cy="9" r="2" stroke="currentColor" stroke-width="1.5"/></svg>
145
155
  </button>
@@ -277,6 +287,10 @@
277
287
  </div>
278
288
  </div>
279
289
  <div class="topbar__right">
290
+ <button class="topbar__icon-btn theme-toggle" title="Toggle light/dark mode" onclick="toggleTheme()">
291
+ <svg class="theme-toggle__icon--dark" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><circle cx="12" cy="12" r="5"/><path d="M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"/></svg>
292
+ <svg class="theme-toggle__icon--light" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"/></svg>
293
+ </button>
280
294
  <button class="topbar__icon-btn" id="btn-history" title="Version History" style="display:none">
281
295
  <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><circle cx="12" cy="12" r="10"/><polyline points="12 6 12 12 16 14"/></svg>
282
296
  </button>
package/ui/setup.js CHANGED
@@ -1,3 +1,18 @@
1
+ /* Theme init — runs synchronously before DOM to prevent flash */
2
+ (function initTheme() {
3
+ const stored = localStorage.getItem("vibespot-theme");
4
+ const prefersDark = window.matchMedia("(prefers-color-scheme: dark)").matches;
5
+ const theme = stored || (prefersDark ? "dark" : "light");
6
+ document.documentElement.setAttribute("data-theme", theme);
7
+ })();
8
+
9
+ function toggleTheme() {
10
+ const current = document.documentElement.getAttribute("data-theme") || "dark";
11
+ const next = current === "dark" ? "light" : "dark";
12
+ document.documentElement.setAttribute("data-theme", next);
13
+ localStorage.setItem("vibespot-theme", next);
14
+ }
15
+
1
16
  /**
2
17
  * Setup screen — onboarding flow in the browser.
3
18
  * Handles theme creation, fetching, opening, and session resume.
package/ui/styles.css CHANGED
@@ -46,6 +46,58 @@
46
46
  --topbar-h: 56px;
47
47
  --statusbar-h: 28px;
48
48
  --rail-w: 48px;
49
+
50
+ /* Shadows & overlays (theme-aware) */
51
+ --shadow-sm: 0 4px 16px rgba(0,0,0,0.3);
52
+ --shadow-lg: 0 16px 48px rgba(0,0,0,0.5);
53
+ --shadow-xl: 0 20px 60px rgba(0,0,0,0.6);
54
+ --overlay-bg: rgba(0,0,0,0.6);
55
+ --scrollbar-thumb: rgba(255,255,255,0.08);
56
+ --scrollbar-hover: rgba(255,255,255,0.14);
57
+ --bg-deep: #0a0a0a;
58
+ --bg-code: rgba(0,0,0,0.3);
59
+ --bg-code-block: rgba(0,0,0,0.4);
60
+ --text-on-accent: #fff;
61
+ --topbar-bg: rgba(12,10,9,0.85);
62
+ --chrome-dot: rgba(255,255,255,0.08);
63
+ --title-gradient: linear-gradient(135deg, #ffffff, #a5a3b3);
64
+ }
65
+
66
+ /* ---------------------------------------------------------------- Light Mode */
67
+ [data-theme="light"] {
68
+ --bg: #faf9f7;
69
+ --bg-panel: rgba(0,0,0,0.02);
70
+ --bg-panel-solid: #f3f2f0;
71
+ --bg-input: rgba(0,0,0,0.03);
72
+ --bg-hover: rgba(0,0,0,0.05);
73
+ --bg-active: rgba(0,0,0,0.07);
74
+ --border: rgba(0,0,0,0.08);
75
+ --border-hover: rgba(0,0,0,0.15);
76
+ --text: #1a1a1a;
77
+ --text-dim: rgba(0,0,0,0.55);
78
+ --text-muted: rgba(0,0,0,0.3);
79
+ --accent: #d4552e;
80
+ --accent-hover: #c04a25;
81
+ --accent-dim: rgba(212,85,46,0.12);
82
+ --accent-glow: rgba(212,85,46,0.2);
83
+ --accent-tint: rgba(212,85,46,0.05);
84
+ --accent-gradient: linear-gradient(135deg, #d4552e, #e8714f);
85
+ --success: #16a34a;
86
+ --warning: #d97706;
87
+ --error: #dc2626;
88
+ --shadow-sm: 0 4px 16px rgba(0,0,0,0.08);
89
+ --shadow-lg: 0 16px 48px rgba(0,0,0,0.12);
90
+ --shadow-xl: 0 20px 60px rgba(0,0,0,0.15);
91
+ --overlay-bg: rgba(0,0,0,0.3);
92
+ --scrollbar-thumb: rgba(0,0,0,0.12);
93
+ --scrollbar-hover: rgba(0,0,0,0.2);
94
+ --bg-deep: #f0efed;
95
+ --bg-code: rgba(0,0,0,0.05);
96
+ --bg-code-block: rgba(0,0,0,0.06);
97
+ --text-on-accent: #fff;
98
+ --topbar-bg: rgba(250,249,247,0.85);
99
+ --chrome-dot: rgba(0,0,0,0.1);
100
+ --title-gradient: linear-gradient(135deg, #1a1a1a, #6b6878);
49
101
  }
50
102
 
51
103
  * { margin: 0; padding: 0; box-sizing: border-box; }
@@ -79,8 +131,8 @@ body { display: flex; }
79
131
  /* ---------------------------------------------------------------- Scrollbar */
80
132
  ::-webkit-scrollbar { width: 6px; }
81
133
  ::-webkit-scrollbar-track { background: transparent; }
82
- ::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: var(--radius-pill); }
83
- ::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.14); }
134
+ ::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: var(--radius-pill); }
135
+ ::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-hover); }
84
136
 
85
137
  /* ---------------------------------------------------------------- Selection */
86
138
  ::selection { background: var(--accent-glow); }
@@ -123,7 +175,7 @@ body { display: flex; }
123
175
  font-weight: 700;
124
176
  letter-spacing: -0.03em;
125
177
  margin-bottom: 6px;
126
- background: linear-gradient(135deg, #ffffff, #a5a3b3);
178
+ background: var(--title-gradient);
127
179
  -webkit-background-clip: text;
128
180
  -webkit-text-fill-color: transparent;
129
181
  background-clip: text;
@@ -535,7 +587,7 @@ body { display: flex; }
535
587
  width: 100%;
536
588
  height: 320px;
537
589
  border: none;
538
- background: #0f0f14;
590
+ background: var(--bg-deep);
539
591
  }
540
592
 
541
593
  /* Brand asset upload */
@@ -620,7 +672,7 @@ body { display: flex; }
620
672
  align-items: center;
621
673
  justify-content: space-between;
622
674
  padding: 0 16px;
623
- background: rgba(12,10,9,0.85);
675
+ background: var(--topbar-bg);
624
676
  backdrop-filter: blur(12px);
625
677
  -webkit-backdrop-filter: blur(12px);
626
678
  border-bottom: 1px solid var(--border);
@@ -649,7 +701,7 @@ body { display: flex; }
649
701
  justify-content: center;
650
702
  background: var(--accent-gradient);
651
703
  border-radius: 8px;
652
- color: #fff;
704
+ color: var(--text-on-accent);
653
705
  font-family: var(--font-display);
654
706
  font-weight: 700;
655
707
  font-size: 16px;
@@ -724,7 +776,7 @@ body { display: flex; }
724
776
 
725
777
  .btn--primary {
726
778
  background: var(--accent-gradient);
727
- color: white;
779
+ color: var(--text-on-accent);
728
780
  font-weight: 600;
729
781
  }
730
782
  .btn--primary:hover { filter: brightness(1.1); }
@@ -751,7 +803,7 @@ body { display: flex; }
751
803
 
752
804
  .btn--danger {
753
805
  background: var(--error);
754
- color: #fff;
806
+ color: var(--text-on-accent);
755
807
  border: 1px solid var(--error);
756
808
  }
757
809
  .btn--danger:hover {
@@ -762,7 +814,7 @@ body { display: flex; }
762
814
  .confirm-overlay {
763
815
  position: fixed;
764
816
  inset: 0;
765
- background: rgba(0,0,0,0.6);
817
+ background: var(--overlay-bg);
766
818
  z-index: 9999;
767
819
  display: flex;
768
820
  align-items: center;
@@ -776,7 +828,7 @@ body { display: flex; }
776
828
  padding: 24px;
777
829
  width: 360px;
778
830
  max-width: 90vw;
779
- box-shadow: 0 16px 48px rgba(0,0,0,0.5);
831
+ box-shadow: var(--shadow-lg);
780
832
  }
781
833
  .confirm-dialog__title {
782
834
  font-size: 16px;
@@ -853,7 +905,7 @@ body { display: flex; }
853
905
  }
854
906
  .confirm-dialog__toggle-switch input:checked + .confirm-dialog__toggle-slider::before {
855
907
  transform: translateX(16px);
856
- background: white;
908
+ background: var(--text-on-accent);
857
909
  }
858
910
  .confirm-dialog__toggle-label {
859
911
  font-size: 13px;
@@ -963,7 +1015,7 @@ body { display: flex; }
963
1015
  flex: 1;
964
1016
  display: flex;
965
1017
  position: relative;
966
- background: #111;
1018
+ background: var(--bg-deep);
967
1019
  }
968
1020
 
969
1021
  .resize-handle {
@@ -1262,7 +1314,7 @@ body { display: flex; }
1262
1314
  /* Drag-and-drop animation */
1263
1315
  .module-item--dragging {
1264
1316
  opacity: 0.85;
1265
- box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
1317
+ box-shadow: var(--shadow-sm);
1266
1318
  z-index: 100;
1267
1319
  position: relative;
1268
1320
  background: var(--bg-panel-solid);
@@ -1405,18 +1457,10 @@ body { display: flex; }
1405
1457
  to { opacity: 1; transform: translateY(0); }
1406
1458
  }
1407
1459
 
1408
- .chat-msg--user {
1409
- flex-direction: row-reverse;
1410
- }
1411
-
1412
- .chat-msg--user .chat-msg__header {
1413
- flex-direction: row-reverse;
1414
- }
1415
-
1416
1460
  .chat-msg--user .chat-msg__bubble {
1417
1461
  background: var(--accent-gradient);
1418
- color: white;
1419
- border-radius: 16px 4px 16px 16px;
1462
+ color: var(--text-on-accent);
1463
+ border-radius: 4px 16px 16px 16px;
1420
1464
  max-width: 85%;
1421
1465
  }
1422
1466
 
@@ -1444,7 +1488,7 @@ body { display: flex; }
1444
1488
  }
1445
1489
  .chat-msg__avatar--user {
1446
1490
  background: var(--accent-gradient);
1447
- color: white;
1491
+ color: var(--text-on-accent);
1448
1492
  }
1449
1493
  .chat-msg__avatar--ai {
1450
1494
  background: var(--accent-dim);
@@ -1460,11 +1504,6 @@ body { display: flex; }
1460
1504
 
1461
1505
  .chat-msg--user .chat-msg__content {
1462
1506
  flex: 0 1 auto;
1463
- text-align: right;
1464
- }
1465
-
1466
- .chat-msg--user .chat-msg__meta {
1467
- text-align: right;
1468
1507
  }
1469
1508
 
1470
1509
  /* Header (sender + time) */
@@ -1516,13 +1555,13 @@ body { display: flex; }
1516
1555
  .chat-msg__bubble code {
1517
1556
  font-family: var(--font-mono);
1518
1557
  font-size: 12px;
1519
- background: rgba(0,0,0,0.3);
1558
+ background: var(--bg-code);
1520
1559
  padding: 1px 5px;
1521
1560
  border-radius: 3px;
1522
1561
  }
1523
1562
 
1524
1563
  .chat-msg__bubble pre {
1525
- background: rgba(0,0,0,0.4);
1564
+ background: var(--bg-code-block);
1526
1565
  padding: 10px;
1527
1566
  border-radius: var(--radius-sm);
1528
1567
  overflow-x: auto;
@@ -1651,7 +1690,7 @@ body { display: flex; }
1651
1690
  background: var(--accent-gradient);
1652
1691
  border: none;
1653
1692
  border-radius: 8px;
1654
- color: white;
1693
+ color: var(--text-on-accent);
1655
1694
  cursor: pointer;
1656
1695
  transition: filter 0.15s;
1657
1696
  flex-shrink: 0;
@@ -1675,11 +1714,11 @@ body { display: flex; }
1675
1714
  flex: 1;
1676
1715
  display: flex;
1677
1716
  flex-direction: column;
1678
- background: #0a0a0a;
1717
+ background: var(--bg-deep);
1679
1718
  border: 1px solid var(--border);
1680
1719
  border-radius: 12px;
1681
1720
  overflow: hidden;
1682
- box-shadow: 0 20px 60px rgba(0,0,0,0.5);
1721
+ box-shadow: var(--shadow-xl);
1683
1722
  transition: max-width 0.3s ease;
1684
1723
  }
1685
1724
 
@@ -1689,7 +1728,7 @@ body { display: flex; }
1689
1728
  align-items: center;
1690
1729
  gap: 12px;
1691
1730
  padding: 0 14px;
1692
- background: rgba(255,255,255,0.03);
1731
+ background: var(--bg-panel);
1693
1732
  border-bottom: 1px solid var(--border);
1694
1733
  flex-shrink: 0;
1695
1734
  }
@@ -1703,7 +1742,7 @@ body { display: flex; }
1703
1742
  width: 10px;
1704
1743
  height: 10px;
1705
1744
  border-radius: 50%;
1706
- background: rgba(255,255,255,0.08);
1745
+ background: var(--chrome-dot);
1707
1746
  }
1708
1747
 
1709
1748
  .browser-chrome__url {
@@ -1842,7 +1881,7 @@ body { display: flex; }
1842
1881
  .settings-overlay {
1843
1882
  position: fixed;
1844
1883
  inset: 0;
1845
- background: rgba(0,0,0,0.7);
1884
+ background: var(--overlay-bg);
1846
1885
  z-index: 500;
1847
1886
  display: flex;
1848
1887
  align-items: center;
@@ -1864,7 +1903,7 @@ body { display: flex; }
1864
1903
  border-radius: var(--radius-lg);
1865
1904
  display: flex;
1866
1905
  flex-direction: column;
1867
- box-shadow: 0 20px 60px rgba(0,0,0,0.6);
1906
+ box-shadow: var(--shadow-xl);
1868
1907
  }
1869
1908
 
1870
1909
  .settings__header {
@@ -2070,7 +2109,7 @@ body { display: flex; }
2070
2109
  .settings__btn--primary {
2071
2110
  background: var(--accent);
2072
2111
  border-color: var(--accent);
2073
- color: #fff;
2112
+ color: var(--text-on-accent);
2074
2113
  }
2075
2114
  .settings__btn--primary:hover { filter: brightness(1.1); }
2076
2115
  .settings__btn--small {
@@ -2082,8 +2121,8 @@ body { display: flex; }
2082
2121
  color: #ef4444;
2083
2122
  }
2084
2123
  .settings__btn--danger:hover {
2085
- background: #ef4444;
2086
- color: #fff;
2124
+ background: var(--error);
2125
+ color: var(--text-on-accent);
2087
2126
  }
2088
2127
  .settings__btn:disabled { opacity: 0.4; cursor: not-allowed; }
2089
2128
  .settings__card-actions {
@@ -2243,12 +2282,12 @@ body { display: flex; }
2243
2282
  .walkthrough__step-dot.active {
2244
2283
  background: var(--accent);
2245
2284
  border-color: var(--accent);
2246
- color: #fff;
2285
+ color: var(--text-on-accent);
2247
2286
  }
2248
2287
  .walkthrough__step-dot.done {
2249
2288
  background: var(--success);
2250
2289
  border-color: var(--success);
2251
- color: #fff;
2290
+ color: var(--text-on-accent);
2252
2291
  }
2253
2292
 
2254
2293
  .walkthrough__step-line {
@@ -2318,7 +2357,7 @@ body { display: flex; }
2318
2357
  text-transform: uppercase;
2319
2358
  letter-spacing: 0.05em;
2320
2359
  background: var(--accent);
2321
- color: #fff;
2360
+ color: var(--text-on-accent);
2322
2361
  padding: 2px 7px;
2323
2362
  border-radius: var(--radius-pill);
2324
2363
  }
@@ -2376,7 +2415,7 @@ body { display: flex; }
2376
2415
  align-items: center;
2377
2416
  gap: 12px;
2378
2417
  padding: 0 16px;
2379
- background: rgba(12,10,9,0.85);
2418
+ background: var(--topbar-bg);
2380
2419
  backdrop-filter: blur(12px);
2381
2420
  -webkit-backdrop-filter: blur(12px);
2382
2421
  border-bottom: 1px solid var(--border);
@@ -2602,7 +2641,7 @@ body { display: flex; }
2602
2641
  .upload-action-btn--primary {
2603
2642
  background: var(--accent);
2604
2643
  border-color: var(--accent);
2605
- color: #fff;
2644
+ color: var(--text-on-accent);
2606
2645
  }
2607
2646
 
2608
2647
  .upload-spinner {
@@ -2636,7 +2675,7 @@ body { display: flex; }
2636
2675
  padding: 40px 32px 32px;
2637
2676
  width: 420px;
2638
2677
  max-width: 90vw;
2639
- box-shadow: 0 20px 60px rgba(0,0,0,0.6);
2678
+ box-shadow: var(--shadow-xl);
2640
2679
  text-align: center;
2641
2680
  animation: deployPopIn 0.3s ease;
2642
2681
  }
@@ -2653,7 +2692,7 @@ body { display: flex; }
2653
2692
  font-size: 22px;
2654
2693
  font-weight: 700;
2655
2694
  margin-bottom: 6px;
2656
- background: linear-gradient(135deg, #fff, #a5a3b3);
2695
+ background: var(--title-gradient);
2657
2696
  -webkit-background-clip: text;
2658
2697
  -webkit-text-fill-color: transparent;
2659
2698
  background-clip: text;
@@ -2852,7 +2891,7 @@ body { display: flex; }
2852
2891
 
2853
2892
  .project-rail__item--active {
2854
2893
  background: var(--accent-gradient);
2855
- color: white;
2894
+ color: var(--text-on-accent);
2856
2895
  border-radius: 30%;
2857
2896
  }
2858
2897
 
@@ -2887,7 +2926,7 @@ body { display: flex; }
2887
2926
 
2888
2927
  .project-rail__item--active .project-rail__item-bubble {
2889
2928
  background: rgba(255,255,255,0.2);
2890
- color: white;
2929
+ color: var(--text-on-accent);
2891
2930
  }
2892
2931
 
2893
2932
  .project-rail__item-info {
@@ -3060,7 +3099,7 @@ body { display: flex; }
3060
3099
 
3061
3100
  .brand-asset-toggle__switch input:checked + .brand-asset-toggle__slider::before {
3062
3101
  transform: translateX(16px);
3063
- background: white;
3102
+ background: var(--text-on-accent);
3064
3103
  }
3065
3104
 
3066
3105
  .brand-asset-toggle__label {
@@ -3109,3 +3148,10 @@ body { display: flex; }
3109
3148
  .brand-asset-toggle__tooltip:hover::after {
3110
3149
  opacity: 1;
3111
3150
  }
3151
+
3152
+ /* ================================================================
3153
+ THEME TOGGLE (light/dark)
3154
+ ================================================================ */
3155
+ .theme-toggle__icon--light { display: none; }
3156
+ [data-theme="light"] .theme-toggle__icon--dark { display: none; }
3157
+ [data-theme="light"] .theme-toggle__icon--light { display: block; }