@sudajs/cli 0.11.0 → 0.12.1

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.d.ts CHANGED
@@ -990,9 +990,716 @@ declare const updateContactFormOutputSchema: z.ZodDiscriminatedUnion<"status", [
990
990
  };
991
991
  };
992
992
  }>]>;
993
+ declare const themeSettingsViewSchema: z.ZodObject<{
994
+ themeKey: z.ZodString;
995
+ themeVersion: z.ZodString;
996
+ designSystem: z.ZodEffects<z.ZodObject<{
997
+ version: z.ZodLiteral<1>;
998
+ defaultPresetId: z.ZodString;
999
+ presets: z.ZodArray<z.ZodObject<{
1000
+ id: z.ZodString;
1001
+ label: z.ZodString;
1002
+ description: z.ZodOptional<z.ZodString>;
1003
+ tokens: z.ZodObject<{
1004
+ colors: z.ZodObject<{
1005
+ background: z.ZodString;
1006
+ foreground: z.ZodString;
1007
+ primary: z.ZodString;
1008
+ primaryForeground: z.ZodString;
1009
+ accent: z.ZodString;
1010
+ accentForeground: z.ZodString;
1011
+ muted: z.ZodString;
1012
+ mutedForeground: z.ZodString;
1013
+ }, "strip", z.ZodTypeAny, {
1014
+ background: string;
1015
+ foreground: string;
1016
+ primary: string;
1017
+ primaryForeground: string;
1018
+ accent: string;
1019
+ accentForeground: string;
1020
+ muted: string;
1021
+ mutedForeground: string;
1022
+ }, {
1023
+ background: string;
1024
+ foreground: string;
1025
+ primary: string;
1026
+ primaryForeground: string;
1027
+ accent: string;
1028
+ accentForeground: string;
1029
+ muted: string;
1030
+ mutedForeground: string;
1031
+ }>;
1032
+ radius: z.ZodObject<{
1033
+ card: z.ZodString;
1034
+ button: z.ZodString;
1035
+ input: z.ZodString;
1036
+ }, "strip", z.ZodTypeAny, {
1037
+ input: string;
1038
+ card: string;
1039
+ button: string;
1040
+ }, {
1041
+ input: string;
1042
+ card: string;
1043
+ button: string;
1044
+ }>;
1045
+ }, "strip", z.ZodTypeAny, {
1046
+ colors: {
1047
+ background: string;
1048
+ foreground: string;
1049
+ primary: string;
1050
+ primaryForeground: string;
1051
+ accent: string;
1052
+ accentForeground: string;
1053
+ muted: string;
1054
+ mutedForeground: string;
1055
+ };
1056
+ radius: {
1057
+ input: string;
1058
+ card: string;
1059
+ button: string;
1060
+ };
1061
+ }, {
1062
+ colors: {
1063
+ background: string;
1064
+ foreground: string;
1065
+ primary: string;
1066
+ primaryForeground: string;
1067
+ accent: string;
1068
+ accentForeground: string;
1069
+ muted: string;
1070
+ mutedForeground: string;
1071
+ };
1072
+ radius: {
1073
+ input: string;
1074
+ card: string;
1075
+ button: string;
1076
+ };
1077
+ }>;
1078
+ }, "strip", z.ZodTypeAny, {
1079
+ label: string;
1080
+ id: string;
1081
+ tokens: {
1082
+ colors: {
1083
+ background: string;
1084
+ foreground: string;
1085
+ primary: string;
1086
+ primaryForeground: string;
1087
+ accent: string;
1088
+ accentForeground: string;
1089
+ muted: string;
1090
+ mutedForeground: string;
1091
+ };
1092
+ radius: {
1093
+ input: string;
1094
+ card: string;
1095
+ button: string;
1096
+ };
1097
+ };
1098
+ description?: string | undefined;
1099
+ }, {
1100
+ label: string;
1101
+ id: string;
1102
+ tokens: {
1103
+ colors: {
1104
+ background: string;
1105
+ foreground: string;
1106
+ primary: string;
1107
+ primaryForeground: string;
1108
+ accent: string;
1109
+ accentForeground: string;
1110
+ muted: string;
1111
+ mutedForeground: string;
1112
+ };
1113
+ radius: {
1114
+ input: string;
1115
+ card: string;
1116
+ button: string;
1117
+ };
1118
+ };
1119
+ description?: string | undefined;
1120
+ }>, "many">;
1121
+ }, "strip", z.ZodTypeAny, {
1122
+ version: 1;
1123
+ defaultPresetId: string;
1124
+ presets: {
1125
+ label: string;
1126
+ id: string;
1127
+ tokens: {
1128
+ colors: {
1129
+ background: string;
1130
+ foreground: string;
1131
+ primary: string;
1132
+ primaryForeground: string;
1133
+ accent: string;
1134
+ accentForeground: string;
1135
+ muted: string;
1136
+ mutedForeground: string;
1137
+ };
1138
+ radius: {
1139
+ input: string;
1140
+ card: string;
1141
+ button: string;
1142
+ };
1143
+ };
1144
+ description?: string | undefined;
1145
+ }[];
1146
+ }, {
1147
+ version: 1;
1148
+ defaultPresetId: string;
1149
+ presets: {
1150
+ label: string;
1151
+ id: string;
1152
+ tokens: {
1153
+ colors: {
1154
+ background: string;
1155
+ foreground: string;
1156
+ primary: string;
1157
+ primaryForeground: string;
1158
+ accent: string;
1159
+ accentForeground: string;
1160
+ muted: string;
1161
+ mutedForeground: string;
1162
+ };
1163
+ radius: {
1164
+ input: string;
1165
+ card: string;
1166
+ button: string;
1167
+ };
1168
+ };
1169
+ description?: string | undefined;
1170
+ }[];
1171
+ }>, {
1172
+ version: 1;
1173
+ defaultPresetId: string;
1174
+ presets: {
1175
+ label: string;
1176
+ id: string;
1177
+ tokens: {
1178
+ colors: {
1179
+ background: string;
1180
+ foreground: string;
1181
+ primary: string;
1182
+ primaryForeground: string;
1183
+ accent: string;
1184
+ accentForeground: string;
1185
+ muted: string;
1186
+ mutedForeground: string;
1187
+ };
1188
+ radius: {
1189
+ input: string;
1190
+ card: string;
1191
+ button: string;
1192
+ };
1193
+ };
1194
+ description?: string | undefined;
1195
+ }[];
1196
+ }, {
1197
+ version: 1;
1198
+ defaultPresetId: string;
1199
+ presets: {
1200
+ label: string;
1201
+ id: string;
1202
+ tokens: {
1203
+ colors: {
1204
+ background: string;
1205
+ foreground: string;
1206
+ primary: string;
1207
+ primaryForeground: string;
1208
+ accent: string;
1209
+ accentForeground: string;
1210
+ muted: string;
1211
+ mutedForeground: string;
1212
+ };
1213
+ radius: {
1214
+ input: string;
1215
+ card: string;
1216
+ button: string;
1217
+ };
1218
+ };
1219
+ description?: string | undefined;
1220
+ }[];
1221
+ }>;
1222
+ rootProps: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1223
+ schema: z.ZodUnknown;
1224
+ }, "strip", z.ZodTypeAny, {
1225
+ themeKey: string;
1226
+ themeVersion: string;
1227
+ designSystem: {
1228
+ version: 1;
1229
+ defaultPresetId: string;
1230
+ presets: {
1231
+ label: string;
1232
+ id: string;
1233
+ tokens: {
1234
+ colors: {
1235
+ background: string;
1236
+ foreground: string;
1237
+ primary: string;
1238
+ primaryForeground: string;
1239
+ accent: string;
1240
+ accentForeground: string;
1241
+ muted: string;
1242
+ mutedForeground: string;
1243
+ };
1244
+ radius: {
1245
+ input: string;
1246
+ card: string;
1247
+ button: string;
1248
+ };
1249
+ };
1250
+ description?: string | undefined;
1251
+ }[];
1252
+ };
1253
+ rootProps: Record<string, unknown>;
1254
+ schema?: unknown;
1255
+ }, {
1256
+ themeKey: string;
1257
+ themeVersion: string;
1258
+ designSystem: {
1259
+ version: 1;
1260
+ defaultPresetId: string;
1261
+ presets: {
1262
+ label: string;
1263
+ id: string;
1264
+ tokens: {
1265
+ colors: {
1266
+ background: string;
1267
+ foreground: string;
1268
+ primary: string;
1269
+ primaryForeground: string;
1270
+ accent: string;
1271
+ accentForeground: string;
1272
+ muted: string;
1273
+ mutedForeground: string;
1274
+ };
1275
+ radius: {
1276
+ input: string;
1277
+ card: string;
1278
+ button: string;
1279
+ };
1280
+ };
1281
+ description?: string | undefined;
1282
+ }[];
1283
+ };
1284
+ rootProps: Record<string, unknown>;
1285
+ schema?: unknown;
1286
+ }>;
1287
+ declare const updateThemeSettingsInputSchema: z.ZodObject<{
1288
+ projectId: z.ZodString;
1289
+ rootProps: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1290
+ confirm: z.ZodOptional<z.ZodBoolean>;
1291
+ }, "strip", z.ZodTypeAny, {
1292
+ projectId: string;
1293
+ rootProps: Record<string, unknown>;
1294
+ confirm?: boolean | undefined;
1295
+ }, {
1296
+ projectId: string;
1297
+ rootProps: Record<string, unknown>;
1298
+ confirm?: boolean | undefined;
1299
+ }>;
1300
+ declare const updateThemeSettingsOutputSchema: z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
1301
+ status: z.ZodLiteral<"needs_confirmation">;
1302
+ projectId: z.ZodString;
1303
+ impact: z.ZodString;
1304
+ draft: z.ZodObject<Omit<{
1305
+ projectId: z.ZodString;
1306
+ rootProps: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1307
+ confirm: z.ZodOptional<z.ZodBoolean>;
1308
+ }, "confirm">, "strip", z.ZodTypeAny, {
1309
+ projectId: string;
1310
+ rootProps: Record<string, unknown>;
1311
+ }, {
1312
+ projectId: string;
1313
+ rootProps: Record<string, unknown>;
1314
+ }>;
1315
+ }, "strip", z.ZodTypeAny, {
1316
+ projectId: string;
1317
+ status: "needs_confirmation";
1318
+ impact: string;
1319
+ draft: {
1320
+ projectId: string;
1321
+ rootProps: Record<string, unknown>;
1322
+ };
1323
+ }, {
1324
+ projectId: string;
1325
+ status: "needs_confirmation";
1326
+ impact: string;
1327
+ draft: {
1328
+ projectId: string;
1329
+ rootProps: Record<string, unknown>;
1330
+ };
1331
+ }>, z.ZodObject<{
1332
+ status: z.ZodLiteral<"updated">;
1333
+ projectId: z.ZodString;
1334
+ themeSettings: z.ZodObject<{
1335
+ themeKey: z.ZodString;
1336
+ themeVersion: z.ZodString;
1337
+ designSystem: z.ZodEffects<z.ZodObject<{
1338
+ version: z.ZodLiteral<1>;
1339
+ defaultPresetId: z.ZodString;
1340
+ presets: z.ZodArray<z.ZodObject<{
1341
+ id: z.ZodString;
1342
+ label: z.ZodString;
1343
+ description: z.ZodOptional<z.ZodString>;
1344
+ tokens: z.ZodObject<{
1345
+ colors: z.ZodObject<{
1346
+ background: z.ZodString;
1347
+ foreground: z.ZodString;
1348
+ primary: z.ZodString;
1349
+ primaryForeground: z.ZodString;
1350
+ accent: z.ZodString;
1351
+ accentForeground: z.ZodString;
1352
+ muted: z.ZodString;
1353
+ mutedForeground: z.ZodString;
1354
+ }, "strip", z.ZodTypeAny, {
1355
+ background: string;
1356
+ foreground: string;
1357
+ primary: string;
1358
+ primaryForeground: string;
1359
+ accent: string;
1360
+ accentForeground: string;
1361
+ muted: string;
1362
+ mutedForeground: string;
1363
+ }, {
1364
+ background: string;
1365
+ foreground: string;
1366
+ primary: string;
1367
+ primaryForeground: string;
1368
+ accent: string;
1369
+ accentForeground: string;
1370
+ muted: string;
1371
+ mutedForeground: string;
1372
+ }>;
1373
+ radius: z.ZodObject<{
1374
+ card: z.ZodString;
1375
+ button: z.ZodString;
1376
+ input: z.ZodString;
1377
+ }, "strip", z.ZodTypeAny, {
1378
+ input: string;
1379
+ card: string;
1380
+ button: string;
1381
+ }, {
1382
+ input: string;
1383
+ card: string;
1384
+ button: string;
1385
+ }>;
1386
+ }, "strip", z.ZodTypeAny, {
1387
+ colors: {
1388
+ background: string;
1389
+ foreground: string;
1390
+ primary: string;
1391
+ primaryForeground: string;
1392
+ accent: string;
1393
+ accentForeground: string;
1394
+ muted: string;
1395
+ mutedForeground: string;
1396
+ };
1397
+ radius: {
1398
+ input: string;
1399
+ card: string;
1400
+ button: string;
1401
+ };
1402
+ }, {
1403
+ colors: {
1404
+ background: string;
1405
+ foreground: string;
1406
+ primary: string;
1407
+ primaryForeground: string;
1408
+ accent: string;
1409
+ accentForeground: string;
1410
+ muted: string;
1411
+ mutedForeground: string;
1412
+ };
1413
+ radius: {
1414
+ input: string;
1415
+ card: string;
1416
+ button: string;
1417
+ };
1418
+ }>;
1419
+ }, "strip", z.ZodTypeAny, {
1420
+ label: string;
1421
+ id: string;
1422
+ tokens: {
1423
+ colors: {
1424
+ background: string;
1425
+ foreground: string;
1426
+ primary: string;
1427
+ primaryForeground: string;
1428
+ accent: string;
1429
+ accentForeground: string;
1430
+ muted: string;
1431
+ mutedForeground: string;
1432
+ };
1433
+ radius: {
1434
+ input: string;
1435
+ card: string;
1436
+ button: string;
1437
+ };
1438
+ };
1439
+ description?: string | undefined;
1440
+ }, {
1441
+ label: string;
1442
+ id: string;
1443
+ tokens: {
1444
+ colors: {
1445
+ background: string;
1446
+ foreground: string;
1447
+ primary: string;
1448
+ primaryForeground: string;
1449
+ accent: string;
1450
+ accentForeground: string;
1451
+ muted: string;
1452
+ mutedForeground: string;
1453
+ };
1454
+ radius: {
1455
+ input: string;
1456
+ card: string;
1457
+ button: string;
1458
+ };
1459
+ };
1460
+ description?: string | undefined;
1461
+ }>, "many">;
1462
+ }, "strip", z.ZodTypeAny, {
1463
+ version: 1;
1464
+ defaultPresetId: string;
1465
+ presets: {
1466
+ label: string;
1467
+ id: string;
1468
+ tokens: {
1469
+ colors: {
1470
+ background: string;
1471
+ foreground: string;
1472
+ primary: string;
1473
+ primaryForeground: string;
1474
+ accent: string;
1475
+ accentForeground: string;
1476
+ muted: string;
1477
+ mutedForeground: string;
1478
+ };
1479
+ radius: {
1480
+ input: string;
1481
+ card: string;
1482
+ button: string;
1483
+ };
1484
+ };
1485
+ description?: string | undefined;
1486
+ }[];
1487
+ }, {
1488
+ version: 1;
1489
+ defaultPresetId: string;
1490
+ presets: {
1491
+ label: string;
1492
+ id: string;
1493
+ tokens: {
1494
+ colors: {
1495
+ background: string;
1496
+ foreground: string;
1497
+ primary: string;
1498
+ primaryForeground: string;
1499
+ accent: string;
1500
+ accentForeground: string;
1501
+ muted: string;
1502
+ mutedForeground: string;
1503
+ };
1504
+ radius: {
1505
+ input: string;
1506
+ card: string;
1507
+ button: string;
1508
+ };
1509
+ };
1510
+ description?: string | undefined;
1511
+ }[];
1512
+ }>, {
1513
+ version: 1;
1514
+ defaultPresetId: string;
1515
+ presets: {
1516
+ label: string;
1517
+ id: string;
1518
+ tokens: {
1519
+ colors: {
1520
+ background: string;
1521
+ foreground: string;
1522
+ primary: string;
1523
+ primaryForeground: string;
1524
+ accent: string;
1525
+ accentForeground: string;
1526
+ muted: string;
1527
+ mutedForeground: string;
1528
+ };
1529
+ radius: {
1530
+ input: string;
1531
+ card: string;
1532
+ button: string;
1533
+ };
1534
+ };
1535
+ description?: string | undefined;
1536
+ }[];
1537
+ }, {
1538
+ version: 1;
1539
+ defaultPresetId: string;
1540
+ presets: {
1541
+ label: string;
1542
+ id: string;
1543
+ tokens: {
1544
+ colors: {
1545
+ background: string;
1546
+ foreground: string;
1547
+ primary: string;
1548
+ primaryForeground: string;
1549
+ accent: string;
1550
+ accentForeground: string;
1551
+ muted: string;
1552
+ mutedForeground: string;
1553
+ };
1554
+ radius: {
1555
+ input: string;
1556
+ card: string;
1557
+ button: string;
1558
+ };
1559
+ };
1560
+ description?: string | undefined;
1561
+ }[];
1562
+ }>;
1563
+ rootProps: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1564
+ schema: z.ZodUnknown;
1565
+ }, "strip", z.ZodTypeAny, {
1566
+ themeKey: string;
1567
+ themeVersion: string;
1568
+ designSystem: {
1569
+ version: 1;
1570
+ defaultPresetId: string;
1571
+ presets: {
1572
+ label: string;
1573
+ id: string;
1574
+ tokens: {
1575
+ colors: {
1576
+ background: string;
1577
+ foreground: string;
1578
+ primary: string;
1579
+ primaryForeground: string;
1580
+ accent: string;
1581
+ accentForeground: string;
1582
+ muted: string;
1583
+ mutedForeground: string;
1584
+ };
1585
+ radius: {
1586
+ input: string;
1587
+ card: string;
1588
+ button: string;
1589
+ };
1590
+ };
1591
+ description?: string | undefined;
1592
+ }[];
1593
+ };
1594
+ rootProps: Record<string, unknown>;
1595
+ schema?: unknown;
1596
+ }, {
1597
+ themeKey: string;
1598
+ themeVersion: string;
1599
+ designSystem: {
1600
+ version: 1;
1601
+ defaultPresetId: string;
1602
+ presets: {
1603
+ label: string;
1604
+ id: string;
1605
+ tokens: {
1606
+ colors: {
1607
+ background: string;
1608
+ foreground: string;
1609
+ primary: string;
1610
+ primaryForeground: string;
1611
+ accent: string;
1612
+ accentForeground: string;
1613
+ muted: string;
1614
+ mutedForeground: string;
1615
+ };
1616
+ radius: {
1617
+ input: string;
1618
+ card: string;
1619
+ button: string;
1620
+ };
1621
+ };
1622
+ description?: string | undefined;
1623
+ }[];
1624
+ };
1625
+ rootProps: Record<string, unknown>;
1626
+ schema?: unknown;
1627
+ }>;
1628
+ }, "strip", z.ZodTypeAny, {
1629
+ projectId: string;
1630
+ status: "updated";
1631
+ themeSettings: {
1632
+ themeKey: string;
1633
+ themeVersion: string;
1634
+ designSystem: {
1635
+ version: 1;
1636
+ defaultPresetId: string;
1637
+ presets: {
1638
+ label: string;
1639
+ id: string;
1640
+ tokens: {
1641
+ colors: {
1642
+ background: string;
1643
+ foreground: string;
1644
+ primary: string;
1645
+ primaryForeground: string;
1646
+ accent: string;
1647
+ accentForeground: string;
1648
+ muted: string;
1649
+ mutedForeground: string;
1650
+ };
1651
+ radius: {
1652
+ input: string;
1653
+ card: string;
1654
+ button: string;
1655
+ };
1656
+ };
1657
+ description?: string | undefined;
1658
+ }[];
1659
+ };
1660
+ rootProps: Record<string, unknown>;
1661
+ schema?: unknown;
1662
+ };
1663
+ }, {
1664
+ projectId: string;
1665
+ status: "updated";
1666
+ themeSettings: {
1667
+ themeKey: string;
1668
+ themeVersion: string;
1669
+ designSystem: {
1670
+ version: 1;
1671
+ defaultPresetId: string;
1672
+ presets: {
1673
+ label: string;
1674
+ id: string;
1675
+ tokens: {
1676
+ colors: {
1677
+ background: string;
1678
+ foreground: string;
1679
+ primary: string;
1680
+ primaryForeground: string;
1681
+ accent: string;
1682
+ accentForeground: string;
1683
+ muted: string;
1684
+ mutedForeground: string;
1685
+ };
1686
+ radius: {
1687
+ input: string;
1688
+ card: string;
1689
+ button: string;
1690
+ };
1691
+ };
1692
+ description?: string | undefined;
1693
+ }[];
1694
+ };
1695
+ rootProps: Record<string, unknown>;
1696
+ schema?: unknown;
1697
+ };
1698
+ }>]>;
993
1699
  declare function fetchJson<T>(url: string, options?: RequestInit & {
994
1700
  token?: string;
995
1701
  }): Promise<T>;
1702
+ declare function validateThemeTailwindContract(root: string): Promise<void>;
996
1703
  declare function validateTheme(root: string): Promise<ValidatedTheme>;
997
1704
  declare function validateThemeLocales(root: string): Promise<void>;
998
1705
  declare function toViteModuleUrl(root: string, absolutePath: string): string;
@@ -1011,12 +1718,15 @@ declare const __testUtils: {
1011
1718
  performActivateTheme: typeof performActivateTheme;
1012
1719
  performConfirmedPageOperation: typeof performConfirmedPageOperation;
1013
1720
  performUpdateContactForm: typeof performUpdateContactForm;
1721
+ performUpdateThemeSettings: typeof performUpdateThemeSettings;
1722
+ getRemoteThemeSettings: typeof getRemoteThemeSettings;
1014
1723
  renderDevStarterPageHtml: typeof renderDevStarterPageHtml;
1015
1724
  resolveDevStarterSlug: typeof resolveDevStarterSlug;
1016
1725
  resolveScreenshotOptions: typeof resolveScreenshotOptions;
1017
1726
  slugifyThemeName: typeof slugifyThemeName;
1018
1727
  validateThemeKey: typeof validateThemeKey;
1019
1728
  validateThemeName: typeof validateThemeName;
1729
+ validateThemeTailwindContract: typeof validateThemeTailwindContract;
1020
1730
  validateThemeLocales: typeof validateThemeLocales;
1021
1731
  toViteModuleUrl: typeof toViteModuleUrl;
1022
1732
  updateRemotePageDraft: typeof updateRemotePageDraft;
@@ -1149,6 +1859,8 @@ declare function performActivateTheme(auth: CliAuthContext, input: {
1149
1859
  confirm?: boolean | undefined;
1150
1860
  }, fetcher?: FetchJsonFn): Promise<z.infer<typeof activateThemeOutputSchema>>;
1151
1861
  declare function performUpdateContactForm(auth: CliAuthContext, input: z.infer<typeof updateContactFormInputSchema>, fetcher?: FetchJsonFn): Promise<z.infer<typeof updateContactFormOutputSchema>>;
1862
+ declare function getRemoteThemeSettings(auth: CliAuthContext, projectId: string, fetcher?: FetchJsonFn): Promise<z.infer<typeof themeSettingsViewSchema>>;
1863
+ declare function performUpdateThemeSettings(auth: CliAuthContext, input: z.infer<typeof updateThemeSettingsInputSchema>, fetcher?: FetchJsonFn): Promise<z.infer<typeof updateThemeSettingsOutputSchema>>;
1152
1864
  declare function validateThemeName(name: string): string | null;
1153
1865
  declare function validateThemeKey(key: string): string | null;
1154
1866
  declare function slugifyThemeName(name: string): string;