@fakhrirafiki/theme-engine 0.2.2 → 0.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -84,11 +84,56 @@ var ALL_CSS_PROPERTIES = [
84
84
  ];
85
85
 
86
86
  // src/data/tweakcn-presets.ts
87
+ var DEFAULT_ACCENT_COLORS = {
88
+ DARK: {
89
+ "accent-info": "#38BDF8",
90
+ // bright sky blue
91
+ "accent-info-foreground": "#0F172A",
92
+ "accent-success": "#4ADE80",
93
+ // fresh green
94
+ "accent-success-foreground": "#0F172A",
95
+ "accent-warning": "#FBBF24",
96
+ // amber gold
97
+ "accent-warning-foreground": "#0F172A",
98
+ "accent-danger": "#F87171",
99
+ // vivid red
100
+ "accent-danger-foreground": "#0F172A",
101
+ "accent-brand": "#FB923C",
102
+ // warm orange coral (brand)
103
+ "accent-brand-foreground": "#0F172A",
104
+ "accent-feature": "#F472B6",
105
+ // playful pink for feature highlight
106
+ "accent-feature-foreground": "#0F172A",
107
+ "accent-highlight": "#A78BFA",
108
+ // lavender for accents
109
+ "accent-highlight-foreground": "#0F172A"
110
+ },
111
+ LIGHT: {
112
+ "accent-info": "#3B82F6",
113
+ "accent-info-foreground": "#FFFFFF",
114
+ "accent-success": "#22C55E",
115
+ "accent-success-foreground": "#FFFFFF",
116
+ "accent-warning": "#F59E0B",
117
+ "accent-warning-foreground": "#FFFFFF",
118
+ "accent-danger": "#EF4444",
119
+ "accent-danger-foreground": "#FFFFFF",
120
+ "accent-brand": "#F97316",
121
+ // Coral orange
122
+ "accent-brand-foreground": "#FFFFFF",
123
+ "accent-feature": "#FB923C",
124
+ // Lighter orange
125
+ "accent-feature-foreground": "#0F172A",
126
+ "accent-highlight": "#E879F9",
127
+ // fun pink-violet accent
128
+ "accent-highlight-foreground": "#0F172A"
129
+ }
130
+ };
87
131
  var tweakcnPresets = {
88
132
  "modern-minimal": {
89
133
  label: "Modern Minimal",
90
134
  styles: {
91
135
  light: {
136
+ ...DEFAULT_ACCENT_COLORS.LIGHT,
92
137
  background: "#ffffff",
93
138
  foreground: "#333333",
94
139
  card: "#ffffff",
@@ -127,6 +172,7 @@ var tweakcnPresets = {
127
172
  "font-mono": "JetBrains Mono, monospace"
128
173
  },
129
174
  dark: {
175
+ ...DEFAULT_ACCENT_COLORS.DARK,
130
176
  background: "#171717",
131
177
  foreground: "#e5e5e5",
132
178
  card: "#262626",
@@ -168,6 +214,7 @@ var tweakcnPresets = {
168
214
  createdAt: "2025-06-26",
169
215
  styles: {
170
216
  light: {
217
+ ...DEFAULT_ACCENT_COLORS.LIGHT,
171
218
  background: "#fdfdfd",
172
219
  foreground: "#000000",
173
220
  card: "#fdfdfd",
@@ -214,6 +261,7 @@ var tweakcnPresets = {
214
261
  spacing: "0.27rem"
215
262
  },
216
263
  dark: {
264
+ ...DEFAULT_ACCENT_COLORS.DARK,
217
265
  background: "#1a1b1e",
218
266
  foreground: "#f0f0f0",
219
267
  card: "#222327",
@@ -266,6 +314,7 @@ var tweakcnPresets = {
266
314
  createdAt: "2025-04-19",
267
315
  styles: {
268
316
  light: {
317
+ ...DEFAULT_ACCENT_COLORS.LIGHT,
269
318
  background: "#faf5fa",
270
319
  foreground: "#501854",
271
320
  card: "#faf5fa",
@@ -301,6 +350,7 @@ var tweakcnPresets = {
301
350
  radius: "0.5rem"
302
351
  },
303
352
  dark: {
353
+ ...DEFAULT_ACCENT_COLORS.DARK,
304
354
  background: "#221d27",
305
355
  foreground: "#d2c4de",
306
356
  card: "#2c2632",
@@ -341,6 +391,7 @@ var tweakcnPresets = {
341
391
  createdAt: "2025-04-24",
342
392
  styles: {
343
393
  light: {
394
+ ...DEFAULT_ACCENT_COLORS.LIGHT,
344
395
  background: "#ffffff",
345
396
  foreground: "#0f1419",
346
397
  card: "#f7f8f8",
@@ -385,6 +436,7 @@ var tweakcnPresets = {
385
436
  "shadow-offset-y": "2px"
386
437
  },
387
438
  dark: {
439
+ ...DEFAULT_ACCENT_COLORS.DARK,
388
440
  background: "#000000",
389
441
  foreground: "#e7e9ea",
390
442
  card: "#17181c",
@@ -426,6 +478,7 @@ var tweakcnPresets = {
426
478
  createdAt: "2025-04-24",
427
479
  styles: {
428
480
  light: {
481
+ ...DEFAULT_ACCENT_COLORS.LIGHT,
429
482
  background: "#F1F0E5",
430
483
  foreground: "#56453F",
431
484
  card: "#F1F0E5",
@@ -470,6 +523,7 @@ var tweakcnPresets = {
470
523
  "shadow-offset-y": "2px"
471
524
  },
472
525
  dark: {
526
+ ...DEFAULT_ACCENT_COLORS.DARK,
473
527
  background: "#2d2521",
474
528
  foreground: "#F1F0E5",
475
529
  card: "#3c332e",
@@ -511,6 +565,7 @@ var tweakcnPresets = {
511
565
  createdAt: "2025-04-18",
512
566
  styles: {
513
567
  light: {
568
+ ...DEFAULT_ACCENT_COLORS.LIGHT,
514
569
  background: "#f6e6ee",
515
570
  foreground: "#5b5b5b",
516
571
  card: "#fdedc9",
@@ -555,6 +610,7 @@ var tweakcnPresets = {
555
610
  "shadow-offset-y": "3px"
556
611
  },
557
612
  dark: {
613
+ ...DEFAULT_ACCENT_COLORS.DARK,
558
614
  background: "#12242e",
559
615
  foreground: "#f3e3ea",
560
616
  card: "#1c2e38",
@@ -599,6 +655,7 @@ var tweakcnPresets = {
599
655
  createdAt: "2025-05-08",
600
656
  styles: {
601
657
  light: {
658
+ ...DEFAULT_ACCENT_COLORS.LIGHT,
602
659
  background: "#f8f7fa",
603
660
  foreground: "#3d3c4f",
604
661
  card: "#ffffff",
@@ -645,6 +702,7 @@ var tweakcnPresets = {
645
702
  spacing: "0.25rem"
646
703
  },
647
704
  dark: {
705
+ ...DEFAULT_ACCENT_COLORS.DARK,
648
706
  background: "#1a1823",
649
707
  foreground: "#e0ddef",
650
708
  card: "#232030",
@@ -685,6 +743,7 @@ var tweakcnPresets = {
685
743
  createdAt: "2025-05-10",
686
744
  styles: {
687
745
  light: {
746
+ ...DEFAULT_ACCENT_COLORS.LIGHT,
688
747
  background: "#f9f9f9",
689
748
  foreground: "#3a3a3a",
690
749
  card: "#ffffff",
@@ -731,6 +790,7 @@ var tweakcnPresets = {
731
790
  spacing: "0.25rem"
732
791
  },
733
792
  dark: {
793
+ ...DEFAULT_ACCENT_COLORS.DARK,
734
794
  background: "#2b2b2b",
735
795
  foreground: "#dcdcdc",
736
796
  card: "#333333",
@@ -783,6 +843,7 @@ var tweakcnPresets = {
783
843
  createdAt: "2025-04-28",
784
844
  styles: {
785
845
  light: {
846
+ ...DEFAULT_ACCENT_COLORS.LIGHT,
786
847
  background: "#cccccc",
787
848
  foreground: "#1f1f1f",
788
849
  card: "#b0b0b0",
@@ -829,6 +890,7 @@ var tweakcnPresets = {
829
890
  spacing: "0.25rem"
830
891
  },
831
892
  dark: {
893
+ ...DEFAULT_ACCENT_COLORS.DARK,
832
894
  background: "#1a1a1a",
833
895
  foreground: "#e0e0e0",
834
896
  card: "#2a2a2a",
@@ -881,6 +943,7 @@ var tweakcnPresets = {
881
943
  createdAt: "2025-04-18",
882
944
  styles: {
883
945
  light: {
946
+ ...DEFAULT_ACCENT_COLORS.LIGHT,
884
947
  background: "#eff1f5",
885
948
  foreground: "#4c4f69",
886
949
  card: "#ffffff",
@@ -925,6 +988,7 @@ var tweakcnPresets = {
925
988
  "shadow-offset-y": "4px"
926
989
  },
927
990
  dark: {
991
+ ...DEFAULT_ACCENT_COLORS.DARK,
928
992
  background: "#181825",
929
993
  foreground: "#cdd6f4",
930
994
  card: "#1e1e2e",
@@ -965,6 +1029,7 @@ var tweakcnPresets = {
965
1029
  createdAt: "2025-04-17",
966
1030
  styles: {
967
1031
  light: {
1032
+ ...DEFAULT_ACCENT_COLORS.LIGHT,
968
1033
  background: "#f0f0f0",
969
1034
  foreground: "#333333",
970
1035
  card: "#f5f5f5",
@@ -1009,6 +1074,7 @@ var tweakcnPresets = {
1009
1074
  "shadow-offset-y": "2px"
1010
1075
  },
1011
1076
  dark: {
1077
+ ...DEFAULT_ACCENT_COLORS.DARK,
1012
1078
  background: "#1a1a1a",
1013
1079
  foreground: "#d9d9d9",
1014
1080
  card: "#202020",
@@ -1052,6 +1118,7 @@ var tweakcnPresets = {
1052
1118
  createdAt: "2025-04-01",
1053
1119
  styles: {
1054
1120
  light: {
1121
+ ...DEFAULT_ACCENT_COLORS.LIGHT,
1055
1122
  background: "#e8f0f0",
1056
1123
  foreground: "#0a4a55",
1057
1124
  card: "#f2f7f7",
@@ -1096,6 +1163,7 @@ var tweakcnPresets = {
1096
1163
  "shadow-offset-y": "1px"
1097
1164
  },
1098
1165
  dark: {
1166
+ ...DEFAULT_ACCENT_COLORS.DARK,
1099
1167
  background: "#0a1a20",
1100
1168
  foreground: "#4de8e8",
1101
1169
  card: "#0c2025",
@@ -1145,6 +1213,7 @@ var tweakcnPresets = {
1145
1213
  label: "Kodama Grove",
1146
1214
  styles: {
1147
1215
  light: {
1216
+ ...DEFAULT_ACCENT_COLORS.LIGHT,
1148
1217
  background: "#e4d7b0",
1149
1218
  foreground: "#5c4b3e",
1150
1219
  card: "#e7dbbf",
@@ -1189,6 +1258,7 @@ var tweakcnPresets = {
1189
1258
  "shadow-offset-y": "3px"
1190
1259
  },
1191
1260
  dark: {
1261
+ ...DEFAULT_ACCENT_COLORS.DARK,
1192
1262
  background: "#3a3529",
1193
1263
  foreground: "#ede4d4",
1194
1264
  card: "#413c33",
@@ -1229,6 +1299,7 @@ var tweakcnPresets = {
1229
1299
  createdAt: "2025-04-04",
1230
1300
  styles: {
1231
1301
  light: {
1302
+ ...DEFAULT_ACCENT_COLORS.LIGHT,
1232
1303
  background: "#f5f5ff",
1233
1304
  foreground: "#2a2a4a",
1234
1305
  card: "#ffffff",
@@ -1273,6 +1344,7 @@ var tweakcnPresets = {
1273
1344
  "shadow-offset-y": "4px"
1274
1345
  },
1275
1346
  dark: {
1347
+ ...DEFAULT_ACCENT_COLORS.LIGHT,
1276
1348
  background: "#0f0f1a",
1277
1349
  foreground: "#e2e2f5",
1278
1350
  card: "#1a1a2e",
@@ -1314,6 +1386,7 @@ var tweakcnPresets = {
1314
1386
  createdAt: "2025-04-09",
1315
1387
  styles: {
1316
1388
  light: {
1389
+ ...DEFAULT_ACCENT_COLORS.LIGHT,
1317
1390
  background: "#e8ebed",
1318
1391
  foreground: "#333333",
1319
1392
  card: "#ffffff",
@@ -1358,6 +1431,7 @@ var tweakcnPresets = {
1358
1431
  "shadow-offset-y": "1px"
1359
1432
  },
1360
1433
  dark: {
1434
+ ...DEFAULT_ACCENT_COLORS.DARK,
1361
1435
  background: "#1c2433",
1362
1436
  foreground: "#e5e5e5",
1363
1437
  card: "#2a3040",
@@ -1398,6 +1472,7 @@ var tweakcnPresets = {
1398
1472
  createdAt: "2025-04-03",
1399
1473
  styles: {
1400
1474
  light: {
1475
+ ...DEFAULT_ACCENT_COLORS.LIGHT,
1401
1476
  background: "#fff0f8",
1402
1477
  foreground: "#91185c",
1403
1478
  card: "#fff7fc",
@@ -1442,6 +1517,7 @@ var tweakcnPresets = {
1442
1517
  "shadow-offset-y": "3px"
1443
1518
  },
1444
1519
  dark: {
1520
+ ...DEFAULT_ACCENT_COLORS.DARK,
1445
1521
  background: "#1a0922",
1446
1522
  foreground: "#ffb3ff",
1447
1523
  card: "#2a1435",
@@ -1485,6 +1561,7 @@ var tweakcnPresets = {
1485
1561
  label: "Nature",
1486
1562
  styles: {
1487
1563
  light: {
1564
+ ...DEFAULT_ACCENT_COLORS.LIGHT,
1488
1565
  background: "#f8f5f0",
1489
1566
  foreground: "#3e2723",
1490
1567
  card: "#f8f5f0",
@@ -1523,6 +1600,7 @@ var tweakcnPresets = {
1523
1600
  "font-mono": "Source Code Pro, monospace"
1524
1601
  },
1525
1602
  dark: {
1603
+ ...DEFAULT_ACCENT_COLORS.DARK,
1526
1604
  background: "#1c2a1f",
1527
1605
  foreground: "#f0ebe5",
1528
1606
  card: "#2d3a2e",
@@ -1563,6 +1641,7 @@ var tweakcnPresets = {
1563
1641
  label: "Bold Tech",
1564
1642
  styles: {
1565
1643
  light: {
1644
+ ...DEFAULT_ACCENT_COLORS.LIGHT,
1566
1645
  background: "#ffffff",
1567
1646
  foreground: "#312e81",
1568
1647
  card: "#ffffff",
@@ -1607,6 +1686,7 @@ var tweakcnPresets = {
1607
1686
  "shadow-offset-y": "2px"
1608
1687
  },
1609
1688
  dark: {
1689
+ ...DEFAULT_ACCENT_COLORS.DARK,
1610
1690
  background: "#0f172a",
1611
1691
  foreground: "#e0e7ff",
1612
1692
  card: "#1e1b4b",
@@ -1647,6 +1727,7 @@ var tweakcnPresets = {
1647
1727
  label: "Elegant Luxury",
1648
1728
  styles: {
1649
1729
  light: {
1730
+ ...DEFAULT_ACCENT_COLORS.LIGHT,
1650
1731
  background: "#faf7f5",
1651
1732
  foreground: "#1a1a1a",
1652
1733
  card: "#faf7f5",
@@ -1691,6 +1772,7 @@ var tweakcnPresets = {
1691
1772
  "shadow-offset-y": "1px"
1692
1773
  },
1693
1774
  dark: {
1775
+ ...DEFAULT_ACCENT_COLORS.DARK,
1694
1776
  background: "#1c1917",
1695
1777
  foreground: "#f5f5f4",
1696
1778
  card: "#292524",
@@ -1732,6 +1814,7 @@ var tweakcnPresets = {
1732
1814
  createdAt: "2025-04-27",
1733
1815
  styles: {
1734
1816
  light: {
1817
+ ...DEFAULT_ACCENT_COLORS.LIGHT,
1735
1818
  background: "#ffffff",
1736
1819
  foreground: "#262626",
1737
1820
  card: "#ffffff",
@@ -1778,6 +1861,7 @@ var tweakcnPresets = {
1778
1861
  spacing: "0.25rem"
1779
1862
  },
1780
1863
  dark: {
1864
+ ...DEFAULT_ACCENT_COLORS.DARK,
1781
1865
  background: "#171717",
1782
1866
  foreground: "#e5e5e5",
1783
1867
  card: "#262626",
@@ -1818,6 +1902,7 @@ var tweakcnPresets = {
1818
1902
  createdAt: "2025-04-27",
1819
1903
  styles: {
1820
1904
  light: {
1905
+ ...DEFAULT_ACCENT_COLORS.LIGHT,
1821
1906
  background: "#fcfcfc",
1822
1907
  foreground: "#171717",
1823
1908
  card: "#fcfcfc",
@@ -1863,6 +1948,7 @@ var tweakcnPresets = {
1863
1948
  "letter-spacing": "0.025em"
1864
1949
  },
1865
1950
  dark: {
1951
+ ...DEFAULT_ACCENT_COLORS.DARK,
1866
1952
  background: "#121212",
1867
1953
  foreground: "#e2e8f0",
1868
1954
  card: "#171717",
@@ -1902,6 +1988,7 @@ var tweakcnPresets = {
1902
1988
  label: "Neo Brutalism",
1903
1989
  styles: {
1904
1990
  light: {
1991
+ ...DEFAULT_ACCENT_COLORS.LIGHT,
1905
1992
  background: "#ffffff",
1906
1993
  foreground: "#000000",
1907
1994
  card: "#ffffff",
@@ -1945,6 +2032,7 @@ var tweakcnPresets = {
1945
2032
  "shadow-offset-y": "4px"
1946
2033
  },
1947
2034
  dark: {
2035
+ ...DEFAULT_ACCENT_COLORS.DARK,
1948
2036
  background: "#000000",
1949
2037
  foreground: "#ffffff",
1950
2038
  card: "#333333",
@@ -1986,6 +2074,7 @@ var tweakcnPresets = {
1986
2074
  createdAt: "2025-04-12",
1987
2075
  styles: {
1988
2076
  light: {
2077
+ ...DEFAULT_ACCENT_COLORS.LIGHT,
1989
2078
  background: "#FDFBF7",
1990
2079
  foreground: "#4A3B33",
1991
2080
  card: "#F8F4EE",
@@ -2030,6 +2119,7 @@ var tweakcnPresets = {
2030
2119
  "shadow-offset-y": "2px"
2031
2120
  },
2032
2121
  dark: {
2122
+ ...DEFAULT_ACCENT_COLORS.DARK,
2033
2123
  background: "#1C1917",
2034
2124
  foreground: "#F5F5F4",
2035
2125
  card: "#292524",
@@ -2071,6 +2161,7 @@ var tweakcnPresets = {
2071
2161
  label: "Claymorphism",
2072
2162
  styles: {
2073
2163
  light: {
2164
+ ...DEFAULT_ACCENT_COLORS.LIGHT,
2074
2165
  background: "#e7e5e4",
2075
2166
  foreground: "#1e293b",
2076
2167
  card: "#f5f5f4",
@@ -2115,6 +2206,7 @@ var tweakcnPresets = {
2115
2206
  "shadow-offset-y": "2px"
2116
2207
  },
2117
2208
  dark: {
2209
+ ...DEFAULT_ACCENT_COLORS.DARK,
2118
2210
  background: "#1e1b18",
2119
2211
  foreground: "#e2e8f0",
2120
2212
  card: "#2c2825",
@@ -2156,6 +2248,7 @@ var tweakcnPresets = {
2156
2248
  label: "Cyberpunk",
2157
2249
  styles: {
2158
2250
  light: {
2251
+ ...DEFAULT_ACCENT_COLORS.LIGHT,
2159
2252
  background: "#f8f9fa",
2160
2253
  foreground: "#0c0c1d",
2161
2254
  card: "#ffffff",
@@ -2239,6 +2332,7 @@ var tweakcnPresets = {
2239
2332
  label: "Pastel Dreams",
2240
2333
  styles: {
2241
2334
  light: {
2335
+ ...DEFAULT_ACCENT_COLORS.DARK,
2242
2336
  background: "#f7f3f9",
2243
2337
  foreground: "#374151",
2244
2338
  card: "#ffffff",
@@ -2323,6 +2417,7 @@ var tweakcnPresets = {
2323
2417
  label: "Clean Slate",
2324
2418
  styles: {
2325
2419
  light: {
2420
+ ...DEFAULT_ACCENT_COLORS.LIGHT,
2326
2421
  background: "#f8fafc",
2327
2422
  foreground: "#1e293b",
2328
2423
  card: "#ffffff",
@@ -2367,6 +2462,7 @@ var tweakcnPresets = {
2367
2462
  "shadow-offset-y": "4px"
2368
2463
  },
2369
2464
  dark: {
2465
+ ...DEFAULT_ACCENT_COLORS.DARK,
2370
2466
  background: "#0f172a",
2371
2467
  foreground: "#e2e8f0",
2372
2468
  card: "#1e293b",
@@ -2407,6 +2503,7 @@ var tweakcnPresets = {
2407
2503
  label: "Caffeine",
2408
2504
  styles: {
2409
2505
  light: {
2506
+ ...DEFAULT_ACCENT_COLORS.LIGHT,
2410
2507
  background: "#f9f9f9",
2411
2508
  foreground: "#202020",
2412
2509
  card: "#fcfcfc",
@@ -2442,6 +2539,7 @@ var tweakcnPresets = {
2442
2539
  radius: "0.5rem"
2443
2540
  },
2444
2541
  dark: {
2542
+ ...DEFAULT_ACCENT_COLORS.DARK,
2445
2543
  background: "#111111",
2446
2544
  foreground: "#eeeeee",
2447
2545
  card: "#191919",
@@ -2482,6 +2580,7 @@ var tweakcnPresets = {
2482
2580
  label: "Ocean Breeze",
2483
2581
  styles: {
2484
2582
  light: {
2583
+ ...DEFAULT_ACCENT_COLORS.LIGHT,
2485
2584
  background: "#f0f8ff",
2486
2585
  foreground: "#374151",
2487
2586
  card: "#ffffff",
@@ -2526,6 +2625,7 @@ var tweakcnPresets = {
2526
2625
  "shadow-offset-y": "4px"
2527
2626
  },
2528
2627
  dark: {
2628
+ ...DEFAULT_ACCENT_COLORS.DARK,
2529
2629
  background: "#0f172a",
2530
2630
  foreground: "#d1d5db",
2531
2631
  card: "#1e293b",
@@ -2566,6 +2666,7 @@ var tweakcnPresets = {
2566
2666
  label: "Retro Arcade",
2567
2667
  styles: {
2568
2668
  light: {
2669
+ ...DEFAULT_ACCENT_COLORS.LIGHT,
2569
2670
  background: "#fdf6e3",
2570
2671
  foreground: "#073642",
2571
2672
  card: "#eee8d5",
@@ -2609,6 +2710,7 @@ var tweakcnPresets = {
2609
2710
  "shadow-offset-y": "2px"
2610
2711
  },
2611
2712
  dark: {
2713
+ ...DEFAULT_ACCENT_COLORS.DARK,
2612
2714
  background: "#002b36",
2613
2715
  foreground: "#93a1a1",
2614
2716
  card: "#073642",
@@ -2649,6 +2751,7 @@ var tweakcnPresets = {
2649
2751
  label: "Midnight Bloom",
2650
2752
  styles: {
2651
2753
  light: {
2754
+ ...DEFAULT_ACCENT_COLORS.LIGHT,
2652
2755
  background: "#f9f9f9",
2653
2756
  foreground: "#333333",
2654
2757
  card: "#ffffff",
@@ -2693,6 +2796,7 @@ var tweakcnPresets = {
2693
2796
  "shadow-offset-y": "5px"
2694
2797
  },
2695
2798
  dark: {
2799
+ ...DEFAULT_ACCENT_COLORS.DARK,
2696
2800
  background: "#1a1d23",
2697
2801
  foreground: "#e5e5e5",
2698
2802
  card: "#2f3436",
@@ -2733,6 +2837,7 @@ var tweakcnPresets = {
2733
2837
  label: "Candyland",
2734
2838
  styles: {
2735
2839
  light: {
2840
+ ...DEFAULT_ACCENT_COLORS.LIGHT,
2736
2841
  background: "#f7f9fa",
2737
2842
  foreground: "#333333",
2738
2843
  card: "#ffffff",
@@ -2770,6 +2875,7 @@ var tweakcnPresets = {
2770
2875
  "font-mono": "Roboto Mono, monospace"
2771
2876
  },
2772
2877
  dark: {
2878
+ ...DEFAULT_ACCENT_COLORS.DARK,
2773
2879
  background: "#1a1d23",
2774
2880
  foreground: "#e5e5e5",
2775
2881
  card: "#2f3436",
@@ -2810,6 +2916,7 @@ var tweakcnPresets = {
2810
2916
  label: "Northern Lights",
2811
2917
  styles: {
2812
2918
  light: {
2919
+ ...DEFAULT_ACCENT_COLORS.LIGHT,
2813
2920
  background: "#f9f9fa",
2814
2921
  foreground: "#333333",
2815
2922
  card: "#ffffff",
@@ -2848,6 +2955,7 @@ var tweakcnPresets = {
2848
2955
  "font-mono": "JetBrains Mono, monospace"
2849
2956
  },
2850
2957
  dark: {
2958
+ ...DEFAULT_ACCENT_COLORS.DARK,
2851
2959
  background: "#1a1d23",
2852
2960
  foreground: "#e5e5e5",
2853
2961
  card: "#2f3436",
@@ -2888,6 +2996,7 @@ var tweakcnPresets = {
2888
2996
  label: "Vintage Paper",
2889
2997
  styles: {
2890
2998
  light: {
2999
+ ...DEFAULT_ACCENT_COLORS.LIGHT,
2891
3000
  background: "#f5f1e6",
2892
3001
  foreground: "#4a3f35",
2893
3002
  card: "#fffcf5",
@@ -2932,6 +3041,7 @@ var tweakcnPresets = {
2932
3041
  "shadow-offset-y": "3px"
2933
3042
  },
2934
3043
  dark: {
3044
+ ...DEFAULT_ACCENT_COLORS.DARK,
2935
3045
  background: "#2d2621",
2936
3046
  foreground: "#ece5d8",
2937
3047
  card: "#3a322c",
@@ -2972,6 +3082,7 @@ var tweakcnPresets = {
2972
3082
  label: "Sunset Horizon",
2973
3083
  styles: {
2974
3084
  light: {
3085
+ ...DEFAULT_ACCENT_COLORS.LIGHT,
2975
3086
  background: "#fff9f5",
2976
3087
  foreground: "#3d3436",
2977
3088
  card: "#ffffff",
@@ -3016,6 +3127,7 @@ var tweakcnPresets = {
3016
3127
  "shadow-offset-y": "6px"
3017
3128
  },
3018
3129
  dark: {
3130
+ ...DEFAULT_ACCENT_COLORS.DARK,
3019
3131
  background: "#2a2024",
3020
3132
  foreground: "#f2e9e4",
3021
3133
  card: "#392f35",
@@ -3057,6 +3169,7 @@ var tweakcnPresets = {
3057
3169
  createdAt: "2025-04-16",
3058
3170
  styles: {
3059
3171
  light: {
3172
+ ...DEFAULT_ACCENT_COLORS.LIGHT,
3060
3173
  background: "#f5f7fa",
3061
3174
  foreground: "#1a2238",
3062
3175
  card: "#e3eaf2",
@@ -3093,6 +3206,7 @@ var tweakcnPresets = {
3093
3206
  radius: "0.5rem"
3094
3207
  },
3095
3208
  dark: {
3209
+ ...DEFAULT_ACCENT_COLORS.DARK,
3096
3210
  background: "#181a24",
3097
3211
  foreground: "#e6eaf3",
3098
3212
  card: "#23243a",
@@ -3133,6 +3247,7 @@ var tweakcnPresets = {
3133
3247
  label: "Claude",
3134
3248
  styles: {
3135
3249
  light: {
3250
+ ...DEFAULT_ACCENT_COLORS.LIGHT,
3136
3251
  background: "#faf9f5",
3137
3252
  foreground: "#3d3929",
3138
3253
  card: "#faf9f5",
@@ -3168,6 +3283,7 @@ var tweakcnPresets = {
3168
3283
  radius: "0.5rem"
3169
3284
  },
3170
3285
  dark: {
3286
+ ...DEFAULT_ACCENT_COLORS.DARK,
3171
3287
  background: "#262624",
3172
3288
  foreground: "#c3c0b6",
3173
3289
  card: "#262624",
@@ -3208,6 +3324,7 @@ var tweakcnPresets = {
3208
3324
  createdAt: "2025-04-13",
3209
3325
  styles: {
3210
3326
  light: {
3327
+ ...DEFAULT_ACCENT_COLORS.LIGHT,
3211
3328
  background: "oklch(0.99 0 0)",
3212
3329
  foreground: "oklch(0 0 0)",
3213
3330
  card: "oklch(1.00 0 0)",
@@ -3252,6 +3369,7 @@ var tweakcnPresets = {
3252
3369
  "shadow-offset-y": "1px"
3253
3370
  },
3254
3371
  dark: {
3372
+ ...DEFAULT_ACCENT_COLORS.DARK,
3255
3373
  background: "oklch(0 0 0)",
3256
3374
  foreground: "oklch(1.00 0 0)",
3257
3375
  card: "oklch(0.14 0 0)",
@@ -3295,6 +3413,7 @@ var tweakcnPresets = {
3295
3413
  createdAt: "2025-04-20",
3296
3414
  styles: {
3297
3415
  light: {
3416
+ ...DEFAULT_ACCENT_COLORS.LIGHT,
3298
3417
  background: "#ffffff",
3299
3418
  foreground: "#0a0a0a",
3300
3419
  card: "#ffffff",
@@ -3339,6 +3458,7 @@ var tweakcnPresets = {
3339
3458
  "shadow-offset-y": "1px"
3340
3459
  },
3341
3460
  dark: {
3461
+ ...DEFAULT_ACCENT_COLORS.DARK,
3342
3462
  background: "#0a0a0a",
3343
3463
  foreground: "#fafafa",
3344
3464
  card: "#191919",
@@ -3379,6 +3499,7 @@ var tweakcnPresets = {
3379
3499
  createdAt: "2025-07-08",
3380
3500
  styles: {
3381
3501
  light: {
3502
+ ...DEFAULT_ACCENT_COLORS.LIGHT,
3382
3503
  background: "#f7f9f3",
3383
3504
  foreground: "#000000",
3384
3505
  card: "#ffffff",
@@ -3425,6 +3546,7 @@ var tweakcnPresets = {
3425
3546
  spacing: "0.25rem"
3426
3547
  },
3427
3548
  dark: {
3549
+ ...DEFAULT_ACCENT_COLORS.DARK,
3428
3550
  background: "#000000",
3429
3551
  foreground: "#ffffff",
3430
3552
  card: "#1a212b",
@@ -3484,9 +3606,7 @@ function getPresetLabels() {
3484
3606
  }
3485
3607
  function searchPresets(query) {
3486
3608
  const lowerQuery = query.toLowerCase();
3487
- return Object.entries(tweakcnPresets).filter(
3488
- ([id, preset]) => preset.label.toLowerCase().includes(lowerQuery) || id.toLowerCase().includes(lowerQuery)
3489
- ).map(([id, preset]) => ({ id, preset }));
3609
+ return Object.entries(tweakcnPresets).filter(([id, preset]) => preset.label.toLowerCase().includes(lowerQuery) || id.toLowerCase().includes(lowerQuery)).map(([id, preset]) => ({ id, preset }));
3490
3610
  }
3491
3611
  function getPresetsCount() {
3492
3612
  return Object.keys(tweakcnPresets).length;
@@ -3707,9 +3827,12 @@ function ThemeProvider({
3707
3827
  }, [includeBuiltInPresets, customPresets]);
3708
3828
  const builtInPresets = useMemo(() => includeBuiltInPresets ? tweakcnPresets : {}, [includeBuiltInPresets]);
3709
3829
  const normalizedCustomPresets = useMemo(() => customPresets || {}, [customPresets]);
3710
- const getAvailablePresetById = useCallback((id) => {
3711
- return availablePresets[id] || null;
3712
- }, [availablePresets]);
3830
+ const getAvailablePresetById = useCallback(
3831
+ (id) => {
3832
+ return availablePresets[id] || null;
3833
+ },
3834
+ [availablePresets]
3835
+ );
3713
3836
  const [currentPreset, setCurrentPreset] = useState(null);
3714
3837
  const [isReady, setIsReady] = useState(false);
3715
3838
  useEffect(() => {
@@ -3719,10 +3842,9 @@ function ThemeProvider({
3719
3842
  }
3720
3843
  try {
3721
3844
  const stored = localStorage.getItem(presetStorageKey);
3722
- if (stored) {
3723
- const preset = JSON.parse(stored);
3724
- setCurrentPreset(preset);
3725
- } else if (defaultPreset) {
3845
+ const isDevelopment = typeof window !== "undefined" && window.location?.hostname === "localhost";
3846
+ const applyDefaultPreset = () => {
3847
+ if (!defaultPreset) return;
3726
3848
  const preset = getAvailablePresetById(defaultPreset);
3727
3849
  if (preset) {
3728
3850
  const presetData = {
@@ -3738,13 +3860,42 @@ function ThemeProvider({
3738
3860
  } else {
3739
3861
  console.warn("\u{1F3A8} UnifiedTheme: Default preset not found:", defaultPreset);
3740
3862
  }
3863
+ };
3864
+ if (stored) {
3865
+ try {
3866
+ const parsed = JSON.parse(stored);
3867
+ const isValidObject = parsed && typeof parsed === "object";
3868
+ const hasColors = isValidObject && "colors" in parsed && parsed.colors && typeof parsed.colors === "object" && parsed.colors.light && parsed.colors.dark;
3869
+ if (hasColors) {
3870
+ setCurrentPreset(parsed);
3871
+ if (isDevelopment) {
3872
+ }
3873
+ } else {
3874
+ if (isDevelopment) {
3875
+ console.warn("\u{1F3A8} UnifiedTheme: Invalid persisted preset shape. Clearing and falling back.");
3876
+ }
3877
+ localStorage.removeItem(presetStorageKey);
3878
+ applyDefaultPreset();
3879
+ }
3880
+ } catch (error) {
3881
+ if (isDevelopment) {
3882
+ console.warn("\u{1F3A8} UnifiedTheme: Failed to parse persisted preset. Clearing key.", error);
3883
+ }
3884
+ localStorage.removeItem(presetStorageKey);
3885
+ applyDefaultPreset();
3886
+ }
3887
+ } else {
3888
+ applyDefaultPreset();
3741
3889
  }
3742
3890
  } catch (error) {
3743
- console.warn("\u{1F3A8} UnifiedTheme: Failed to load preset:", error);
3891
+ const isDevelopment = typeof window !== "undefined" && window.location?.hostname === "localhost";
3892
+ if (isDevelopment) {
3893
+ console.warn("\u{1F3A8} UnifiedTheme: Failed to load preset from storage:", error);
3894
+ }
3744
3895
  } finally {
3745
3896
  setIsReady(true);
3746
3897
  }
3747
- }, [presetStorageKey, enablePresets, defaultPreset]);
3898
+ }, [presetStorageKey, enablePresets, defaultPreset, getAvailablePresetById]);
3748
3899
  useEffect(() => {
3749
3900
  if (mode === "system") {
3750
3901
  const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
@@ -3765,11 +3916,12 @@ function ThemeProvider({
3765
3916
  root.style.colorScheme = resolvedMode;
3766
3917
  }, [resolvedMode]);
3767
3918
  const applyPresetColors = useCallback((preset, mode2) => {
3919
+ if (!preset) return;
3768
3920
  const root = document.documentElement;
3769
3921
  const colors = preset[mode2];
3770
3922
  if (!colors) return;
3771
3923
  const defaultValues = {
3772
- "spacing": "0.25rem",
3924
+ spacing: "0.25rem",
3773
3925
  "letter-spacing": "normal"
3774
3926
  };
3775
3927
  const allCategories = [
@@ -3808,67 +3960,79 @@ function ThemeProvider({
3808
3960
  }
3809
3961
  });
3810
3962
  }, []);
3811
- const handleModeChange = useCallback((newMode) => {
3812
- setMode(newMode);
3813
- setStoredMode(newMode, modeStorageKey);
3814
- }, [modeStorageKey]);
3815
- const handleModeToggle = useCallback((coordinates) => {
3816
- const newMode = resolvedMode === "light" ? "dark" : "light";
3817
- const prefersReducedMotion = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
3818
- if (enableTransitions && !prefersReducedMotion && typeof document !== "undefined" && "startViewTransition" in document) {
3819
- const root = document.documentElement;
3820
- if (coordinates) {
3821
- root.style.setProperty("--x", `${coordinates.x}px`);
3822
- root.style.setProperty("--y", `${coordinates.y}px`);
3823
- }
3824
- document.startViewTransition(() => {
3963
+ const handleModeChange = useCallback(
3964
+ (newMode) => {
3965
+ setMode(newMode);
3966
+ setStoredMode(newMode, modeStorageKey);
3967
+ },
3968
+ [modeStorageKey]
3969
+ );
3970
+ const handleModeToggle = useCallback(
3971
+ (coordinates) => {
3972
+ const newMode = resolvedMode === "light" ? "dark" : "light";
3973
+ const prefersReducedMotion = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
3974
+ if (enableTransitions && !prefersReducedMotion && typeof document !== "undefined" && "startViewTransition" in document) {
3975
+ const root = document.documentElement;
3976
+ if (coordinates) {
3977
+ root.style.setProperty("--x", `${coordinates.x}px`);
3978
+ root.style.setProperty("--y", `${coordinates.y}px`);
3979
+ }
3980
+ document.startViewTransition(() => {
3981
+ handleModeChange(newMode);
3982
+ });
3983
+ } else {
3825
3984
  handleModeChange(newMode);
3826
- });
3827
- } else {
3828
- handleModeChange(newMode);
3829
- }
3830
- }, [resolvedMode, enableTransitions, handleModeChange]);
3985
+ }
3986
+ },
3987
+ [resolvedMode, enableTransitions, handleModeChange]
3988
+ );
3831
3989
  useEffect(() => {
3832
3990
  if (!currentPreset || typeof window === "undefined") return;
3833
3991
  applyPresetColors(currentPreset.colors, resolvedMode);
3834
3992
  }, [currentPreset, resolvedMode, applyPresetColors]);
3835
- const applyPreset = useCallback((preset) => {
3836
- const presetData = {
3837
- presetId: preset.id,
3838
- presetName: preset.name,
3839
- colors: preset.colors,
3840
- appliedAt: Date.now()
3841
- };
3842
- setCurrentPreset(presetData);
3843
- if (enablePresets && typeof window !== "undefined") {
3844
- try {
3845
- localStorage.setItem(presetStorageKey, JSON.stringify(presetData));
3846
- } catch (error) {
3847
- console.error("\u{1F3A8} UnifiedTheme: Failed to save preset:", error);
3993
+ const applyPreset = useCallback(
3994
+ (preset) => {
3995
+ const presetData = {
3996
+ presetId: preset.id,
3997
+ presetName: preset.name,
3998
+ colors: preset.colors,
3999
+ appliedAt: Date.now()
4000
+ };
4001
+ setCurrentPreset(presetData);
4002
+ if (enablePresets && typeof window !== "undefined") {
4003
+ try {
4004
+ localStorage.setItem(presetStorageKey, JSON.stringify(presetData));
4005
+ } catch (error) {
4006
+ console.error("\u{1F3A8} UnifiedTheme: Failed to save preset:", error);
4007
+ }
3848
4008
  }
3849
- }
3850
- if (typeof window !== "undefined") {
3851
- applyPresetColors(preset.colors, resolvedMode);
3852
- }
3853
- }, [presetStorageKey, enablePresets, applyPresetColors, resolvedMode]);
3854
- const setThemePresetById = useCallback((presetId) => {
3855
- const preset = getAvailablePresetById(presetId);
3856
- if (!preset) {
3857
4009
  if (typeof window !== "undefined") {
3858
- console.warn("\u{1F3A8} UnifiedTheme: Preset not found for id:", presetId);
4010
+ applyPresetColors(preset.colors, resolvedMode);
3859
4011
  }
3860
- return;
3861
- }
3862
- const presetData = {
3863
- id: presetId,
3864
- name: preset.label,
3865
- colors: {
3866
- light: preset.styles.light,
3867
- dark: preset.styles.dark
4012
+ },
4013
+ [presetStorageKey, enablePresets, applyPresetColors, resolvedMode]
4014
+ );
4015
+ const setThemePresetById = useCallback(
4016
+ (presetId) => {
4017
+ const preset = getAvailablePresetById(presetId);
4018
+ if (!preset) {
4019
+ if (typeof window !== "undefined") {
4020
+ console.warn("\u{1F3A8} UnifiedTheme: Preset not found for id:", presetId);
4021
+ }
4022
+ return;
3868
4023
  }
3869
- };
3870
- applyPreset(presetData);
3871
- }, [getAvailablePresetById, applyPreset]);
4024
+ const presetData = {
4025
+ id: presetId,
4026
+ name: preset.label,
4027
+ colors: {
4028
+ light: preset.styles.light,
4029
+ dark: preset.styles.dark
4030
+ }
4031
+ };
4032
+ applyPreset(presetData);
4033
+ },
4034
+ [getAvailablePresetById, applyPreset]
4035
+ );
3872
4036
  const clearPreset = useCallback(() => {
3873
4037
  if (enablePresets && typeof window !== "undefined") {
3874
4038
  try {
@@ -3916,6 +4080,7 @@ function ThemeProvider({
3916
4080
  if (!isReady) {
3917
4081
  return null;
3918
4082
  }
4083
+ const isUsingDefaultPreset = !!defaultPreset && currentPreset?.presetId === defaultPreset;
3919
4084
  const contextValue = {
3920
4085
  mode,
3921
4086
  resolvedMode,
@@ -3925,6 +4090,7 @@ function ThemeProvider({
3925
4090
  applyPreset,
3926
4091
  setThemePresetById,
3927
4092
  clearPreset,
4093
+ isUsingDefaultPreset,
3928
4094
  availablePresets,
3929
4095
  builtInPresets,
3930
4096
  customPresets: normalizedCustomPresets