yumiamd 0.1.13 → 0.1.15

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/bin.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  runCli
4
- } from "./chunk-6GEDN7OB.js";
4
+ } from "./chunk-7A5BHABM.js";
5
5
 
6
6
  // src/bin.ts
7
7
  var result = await runCli(process.argv);
@@ -12,4 +12,6 @@ if (result.output) {
12
12
  console.error(result.output);
13
13
  }
14
14
  }
15
- process.exit(result.exitCode);
15
+ if (!result.keepAlive) {
16
+ process.exit(result.exitCode);
17
+ }
@@ -684,7 +684,7 @@ var DefaultLayoutEngine = class {
684
684
  layoutSingleElement(element, x, y, width, gap) {
685
685
  switch (element.type) {
686
686
  case "heading": {
687
- const height = this.estimateHeadingHeight(element);
687
+ const height = this.estimateHeadingHeight(element, width);
688
688
  return { element, bounds: { x, y, width, height } };
689
689
  }
690
690
  case "paragraph": {
@@ -782,17 +782,13 @@ var DefaultLayoutEngine = class {
782
782
  const sum = parts.reduce((acc, val) => acc + val, 0);
783
783
  return parts.map((p) => p / sum);
784
784
  }
785
- estimateHeadingHeight(heading) {
786
- switch (heading.level) {
787
- case 1:
788
- return 90;
789
- case 2:
790
- return 70;
791
- case 3:
792
- return 55;
793
- default:
794
- return 45;
795
- }
785
+ estimateHeadingHeight(heading, width = 1600) {
786
+ const fontSize = heading.level === 1 ? 46 : heading.level === 2 ? 36 : 28;
787
+ const charWidth = fontSize * 0.55;
788
+ const charsPerLine = Math.max(15, Math.floor(width / charWidth));
789
+ const lines = Math.ceil(heading.text.length / charsPerLine) || 1;
790
+ const lineHeight = fontSize * 1.25;
791
+ return Math.max(heading.level === 1 ? 90 : 70, Math.round(lines * lineHeight + 20));
796
792
  }
797
793
  estimateParagraphHeight(paragraph, width) {
798
794
  const charsPerLine = Math.max(20, Math.floor(width / 14));
@@ -844,10 +840,12 @@ var defaultTheme = {
844
840
  secondary: "#7c3aed",
845
841
  background: "#ffffff",
846
842
  surface: "#f8fafc",
843
+ elevatedSurface: "#ffffff",
847
844
  text: "#0f172a",
848
845
  muted: "#64748b",
849
846
  accent: "#06b6d4",
850
847
  border: "#e2e8f0",
848
+ divider: "#cbd5e1",
851
849
  success: "#10b981",
852
850
  warning: "#f59e0b",
853
851
  danger: "#ef4444",
@@ -858,36 +856,57 @@ var defaultTheme = {
858
856
  bodyFont: "Inter, system-ui, -apple-system, sans-serif",
859
857
  codeFont: "JetBrains Mono, Fira Code, monospace",
860
858
  sizes: {
859
+ display: 56,
861
860
  h1: 44,
862
861
  h2: 36,
863
862
  h3: 28,
864
863
  h4: 22,
865
864
  body: 18,
866
865
  small: 14,
867
- code: 16
866
+ caption: 12,
867
+ code: 16,
868
+ quote: 20,
869
+ metadata: 12
868
870
  },
869
871
  weights: {
870
872
  normal: 400,
871
873
  medium: 500,
872
874
  bold: 700
875
+ },
876
+ lineHeights: {
877
+ tight: 1.15,
878
+ snug: 1.3,
879
+ normal: 1.5,
880
+ relaxed: 1.7
881
+ },
882
+ letterSpacing: {
883
+ tight: "-0.02em",
884
+ normal: "0em",
885
+ wide: "0.04em"
873
886
  }
874
887
  },
875
888
  spacing: {
876
889
  unit: 8,
890
+ scale: [0, 4, 8, 12, 16, 24, 32, 48, 64, 96],
877
891
  slidePadding: 48,
878
- elementGap: 24
892
+ elementGap: 24,
893
+ safeArea: { top: 48, bottom: 48, left: 48, right: 48 }
879
894
  },
880
895
  radius: {
881
- default: 8,
896
+ none: 0,
882
897
  sm: 4,
883
898
  md: 8,
884
899
  lg: 16,
885
- full: 9999
900
+ xl: 24,
901
+ full: 9999,
902
+ default: 8
886
903
  },
887
904
  shadows: {
905
+ none: "none",
888
906
  sm: "0 1px 2px 0 rgb(0 0 0 / 0.05)",
889
907
  md: "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",
890
- lg: "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)"
908
+ lg: "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",
909
+ glow: "0 0 15px rgba(37, 99, 235, 0.35)"
891
910
  },
892
911
  components: {
893
912
  card: {
@@ -896,6 +915,11 @@ var defaultTheme = {
896
915
  borderRadius: 12,
897
916
  padding: 24
898
917
  },
918
+ metric: {
919
+ valueColor: "#2563eb",
920
+ labelColor: "#64748b",
921
+ borderRadius: 12
922
+ },
899
923
  code: {
900
924
  background: "#0f172a",
901
925
  textColor: "#f8fafc",
@@ -916,10 +940,12 @@ var cyberpunkTheme = {
916
940
  secondary: "#00F0FF",
917
941
  background: "#0B0B12",
918
942
  surface: "#151522",
943
+ elevatedSurface: "#1D1D2E",
919
944
  text: "#FFFFFF",
920
945
  muted: "#A7A7B5",
921
946
  accent: "#7B61FF",
922
947
  border: "#2E2E48",
948
+ divider: "#3E3E5E",
923
949
  success: "#00FF9F",
924
950
  warning: "#FFE600",
925
951
  danger: "#FF0055",
@@ -930,26 +956,57 @@ var cyberpunkTheme = {
930
956
  bodyFont: "Inter, sans-serif",
931
957
  codeFont: "JetBrains Mono, monospace",
932
958
  sizes: {
959
+ display: 58,
933
960
  h1: 46,
934
961
  h2: 38,
935
962
  h3: 28,
936
963
  h4: 22,
937
964
  body: 18,
938
965
  small: 14,
939
- code: 16
966
+ caption: 12,
967
+ code: 16,
968
+ quote: 20,
969
+ metadata: 12
970
+ },
971
+ weights: {
972
+ normal: 400,
973
+ medium: 500,
974
+ bold: 700
975
+ },
976
+ lineHeights: {
977
+ tight: 1.15,
978
+ snug: 1.3,
979
+ normal: 1.55,
980
+ relaxed: 1.7
981
+ },
982
+ letterSpacing: {
983
+ tight: "-0.02em",
984
+ normal: "0em",
985
+ wide: "0.05em"
940
986
  }
941
987
  },
942
988
  spacing: {
943
989
  unit: 8,
990
+ scale: [0, 4, 8, 12, 16, 24, 32, 48, 64, 96],
944
991
  slidePadding: 48,
945
- elementGap: 28
992
+ elementGap: 28,
993
+ safeArea: { top: 48, bottom: 48, left: 48, right: 48 }
946
994
  },
947
995
  radius: {
948
- default: 12,
996
+ none: 0,
949
997
  sm: 6,
950
998
  md: 12,
951
999
  lg: 20,
952
- full: 9999
1000
+ xl: 28,
1001
+ full: 9999,
1002
+ default: 12
1003
+ },
1004
+ shadows: {
1005
+ none: "none",
1006
+ sm: "0 2px 4px rgba(0, 0, 0, 0.4)",
1007
+ md: "0 8px 16px rgba(0, 0, 0, 0.6)",
1008
+ lg: "0 16px 32px rgba(0, 0, 0, 0.8)",
1009
+ glow: "0 0 20px rgba(255, 46, 136, 0.45)"
953
1010
  },
954
1011
  components: {
955
1012
  card: {
@@ -958,10 +1015,20 @@ var cyberpunkTheme = {
958
1015
  borderRadius: 16,
959
1016
  padding: 28
960
1017
  },
1018
+ metric: {
1019
+ valueColor: "#FF2E88",
1020
+ labelColor: "#A7A7B5",
1021
+ borderRadius: 16
1022
+ },
961
1023
  code: {
962
1024
  background: "#07070D",
963
1025
  textColor: "#00F0FF",
964
1026
  borderRadius: 8
1027
+ },
1028
+ table: {
1029
+ headerBackground: "#1D1D2E",
1030
+ rowAlternateBackground: "#151522",
1031
+ borderColor: "#2E2E48"
965
1032
  }
966
1033
  }
967
1034
  };
@@ -973,10 +1040,12 @@ var minimalTheme = {
973
1040
  secondary: "#333333",
974
1041
  background: "#FFFFFF",
975
1042
  surface: "#F5F5F7",
1043
+ elevatedSurface: "#FFFFFF",
976
1044
  text: "#111111",
977
1045
  muted: "#777777",
978
1046
  accent: "#000000",
979
1047
  border: "#E5E5E5",
1048
+ divider: "#D1D1D6",
980
1049
  success: "#10B981",
981
1050
  warning: "#F59E0B",
982
1051
  danger: "#EF4444",
@@ -987,26 +1056,57 @@ var minimalTheme = {
987
1056
  bodyFont: "Helvetica Neue, Arial, sans-serif",
988
1057
  codeFont: "Menlo, Monaco, monospace",
989
1058
  sizes: {
1059
+ display: 54,
990
1060
  h1: 44,
991
1061
  h2: 34,
992
1062
  h3: 26,
993
1063
  h4: 20,
994
1064
  body: 18,
995
1065
  small: 14,
996
- code: 15
1066
+ caption: 12,
1067
+ code: 15,
1068
+ quote: 19,
1069
+ metadata: 12
1070
+ },
1071
+ weights: {
1072
+ normal: 400,
1073
+ medium: 500,
1074
+ bold: 700
1075
+ },
1076
+ lineHeights: {
1077
+ tight: 1.15,
1078
+ snug: 1.25,
1079
+ normal: 1.5,
1080
+ relaxed: 1.65
1081
+ },
1082
+ letterSpacing: {
1083
+ tight: "-0.03em",
1084
+ normal: "0em",
1085
+ wide: "0.02em"
997
1086
  }
998
1087
  },
999
1088
  spacing: {
1000
1089
  unit: 8,
1090
+ scale: [0, 4, 8, 12, 16, 24, 32, 48, 64, 96],
1001
1091
  slidePadding: 56,
1002
- elementGap: 24
1092
+ elementGap: 24,
1093
+ safeArea: { top: 56, bottom: 56, left: 56, right: 56 }
1003
1094
  },
1004
1095
  radius: {
1005
- default: 4,
1096
+ none: 0,
1006
1097
  sm: 2,
1007
1098
  md: 4,
1008
1099
  lg: 8,
1009
- full: 9999
1100
+ xl: 12,
1101
+ full: 9999,
1102
+ default: 4
1103
+ },
1104
+ shadows: {
1105
+ none: "none",
1106
+ sm: "0 1px 3px rgba(0, 0, 0, 0.05)",
1107
+ md: "0 4px 6px rgba(0, 0, 0, 0.07)",
1108
+ lg: "0 10px 15px rgba(0, 0, 0, 0.08)",
1109
+ glow: "none"
1010
1110
  },
1011
1111
  components: {
1012
1112
  card: {
@@ -1014,6 +1114,21 @@ var minimalTheme = {
1014
1114
  borderColor: "#E5E5E5",
1015
1115
  borderRadius: 6,
1016
1116
  padding: 24
1117
+ },
1118
+ metric: {
1119
+ valueColor: "#111111",
1120
+ labelColor: "#777777",
1121
+ borderRadius: 6
1122
+ },
1123
+ code: {
1124
+ background: "#1C1C1E",
1125
+ textColor: "#F2F2F7",
1126
+ borderRadius: 4
1127
+ },
1128
+ table: {
1129
+ headerBackground: "#EBEBEF",
1130
+ rowAlternateBackground: "#F5F5F7",
1131
+ borderColor: "#E5E5E5"
1017
1132
  }
1018
1133
  }
1019
1134
  };
@@ -1025,10 +1140,12 @@ var corporateTheme = {
1025
1140
  secondary: "#635BFF",
1026
1141
  background: "#FFFFFF",
1027
1142
  surface: "#F8FAFC",
1143
+ elevatedSurface: "#FFFFFF",
1028
1144
  text: "#1A1F36",
1029
1145
  muted: "#4F566B",
1030
1146
  accent: "#00D4B2",
1031
1147
  border: "#E3E8EE",
1148
+ divider: "#CBD5E1",
1032
1149
  success: "#00D4B2",
1033
1150
  warning: "#FFC043",
1034
1151
  danger: "#DF1B41",
@@ -1039,26 +1156,57 @@ var corporateTheme = {
1039
1156
  bodyFont: "Inter, Segoe UI, sans-serif",
1040
1157
  codeFont: "Consolas, monospace",
1041
1158
  sizes: {
1159
+ display: 54,
1042
1160
  h1: 42,
1043
1161
  h2: 34,
1044
1162
  h3: 26,
1045
1163
  h4: 20,
1046
1164
  body: 18,
1047
1165
  small: 14,
1048
- code: 15
1166
+ caption: 12,
1167
+ code: 15,
1168
+ quote: 19,
1169
+ metadata: 12
1170
+ },
1171
+ weights: {
1172
+ normal: 400,
1173
+ medium: 500,
1174
+ bold: 700
1175
+ },
1176
+ lineHeights: {
1177
+ tight: 1.15,
1178
+ snug: 1.3,
1179
+ normal: 1.5,
1180
+ relaxed: 1.7
1181
+ },
1182
+ letterSpacing: {
1183
+ tight: "-0.02em",
1184
+ normal: "0em",
1185
+ wide: "0.02em"
1049
1186
  }
1050
1187
  },
1051
1188
  spacing: {
1052
1189
  unit: 8,
1190
+ scale: [0, 4, 8, 12, 16, 24, 32, 48, 64, 96],
1053
1191
  slidePadding: 48,
1054
- elementGap: 24
1192
+ elementGap: 24,
1193
+ safeArea: { top: 48, bottom: 48, left: 48, right: 48 }
1055
1194
  },
1056
1195
  radius: {
1057
- default: 8,
1196
+ none: 0,
1058
1197
  sm: 4,
1059
1198
  md: 8,
1060
1199
  lg: 12,
1061
- full: 9999
1200
+ xl: 18,
1201
+ full: 9999,
1202
+ default: 8
1203
+ },
1204
+ shadows: {
1205
+ none: "none",
1206
+ sm: "0 1px 3px rgba(10, 37, 64, 0.05)",
1207
+ md: "0 4px 8px rgba(10, 37, 64, 0.08)",
1208
+ lg: "0 12px 24px rgba(10, 37, 64, 0.12)",
1209
+ glow: "0 0 12px rgba(0, 212, 178, 0.25)"
1062
1210
  },
1063
1211
  components: {
1064
1212
  card: {
@@ -1066,6 +1214,21 @@ var corporateTheme = {
1066
1214
  borderColor: "#0A2540",
1067
1215
  borderRadius: 8,
1068
1216
  padding: 24
1217
+ },
1218
+ metric: {
1219
+ valueColor: "#0A2540",
1220
+ labelColor: "#4F566B",
1221
+ borderRadius: 8
1222
+ },
1223
+ code: {
1224
+ background: "#0A2540",
1225
+ textColor: "#00D4B2",
1226
+ borderRadius: 6
1227
+ },
1228
+ table: {
1229
+ headerBackground: "#E3E8EE",
1230
+ rowAlternateBackground: "#F8FAFC",
1231
+ borderColor: "#CBD5E1"
1069
1232
  }
1070
1233
  }
1071
1234
  };
@@ -1077,10 +1240,12 @@ var terminalTheme = {
1077
1240
  secondary: "#33FF88",
1078
1241
  background: "#0C100C",
1079
1242
  surface: "#141A14",
1243
+ elevatedSurface: "#1C241C",
1080
1244
  text: "#E0FFE0",
1081
1245
  muted: "#4E7A4E",
1082
1246
  accent: "#FFB000",
1083
1247
  border: "#1F331F",
1248
+ divider: "#2A442A",
1084
1249
  success: "#00FF66",
1085
1250
  warning: "#FFB000",
1086
1251
  danger: "#FF3333",
@@ -1091,26 +1256,57 @@ var terminalTheme = {
1091
1256
  bodyFont: "JetBrains Mono, Courier New, monospace",
1092
1257
  codeFont: "JetBrains Mono, Courier New, monospace",
1093
1258
  sizes: {
1259
+ display: 50,
1094
1260
  h1: 40,
1095
1261
  h2: 32,
1096
1262
  h3: 26,
1097
1263
  h4: 20,
1098
1264
  body: 17,
1099
1265
  small: 13,
1100
- code: 15
1266
+ caption: 11,
1267
+ code: 15,
1268
+ quote: 18,
1269
+ metadata: 12
1270
+ },
1271
+ weights: {
1272
+ normal: 400,
1273
+ medium: 500,
1274
+ bold: 700
1275
+ },
1276
+ lineHeights: {
1277
+ tight: 1.15,
1278
+ snug: 1.3,
1279
+ normal: 1.5,
1280
+ relaxed: 1.7
1281
+ },
1282
+ letterSpacing: {
1283
+ tight: "0em",
1284
+ normal: "0em",
1285
+ wide: "0.04em"
1101
1286
  }
1102
1287
  },
1103
1288
  spacing: {
1104
1289
  unit: 8,
1290
+ scale: [0, 4, 8, 12, 16, 24, 32, 48, 64, 96],
1105
1291
  slidePadding: 48,
1106
- elementGap: 24
1292
+ elementGap: 24,
1293
+ safeArea: { top: 48, bottom: 48, left: 48, right: 48 }
1107
1294
  },
1108
1295
  radius: {
1109
- default: 0,
1296
+ none: 0,
1110
1297
  sm: 0,
1111
1298
  md: 0,
1112
1299
  lg: 0,
1113
- full: 0
1300
+ xl: 0,
1301
+ full: 0,
1302
+ default: 0
1303
+ },
1304
+ shadows: {
1305
+ none: "none",
1306
+ sm: "none",
1307
+ md: "none",
1308
+ lg: "none",
1309
+ glow: "0 0 15px rgba(0, 255, 102, 0.4)"
1114
1310
  },
1115
1311
  components: {
1116
1312
  card: {
@@ -1118,6 +1314,21 @@ var terminalTheme = {
1118
1314
  borderColor: "#00FF66",
1119
1315
  borderRadius: 0,
1120
1316
  padding: 24
1317
+ },
1318
+ metric: {
1319
+ valueColor: "#00FF66",
1320
+ labelColor: "#4E7A4E",
1321
+ borderRadius: 0
1322
+ },
1323
+ code: {
1324
+ background: "#070A07",
1325
+ textColor: "#00FF66",
1326
+ borderRadius: 0
1327
+ },
1328
+ table: {
1329
+ headerBackground: "#1F331F",
1330
+ rowAlternateBackground: "#141A14",
1331
+ borderColor: "#2A442A"
1121
1332
  }
1122
1333
  }
1123
1334
  };
@@ -1129,10 +1340,12 @@ var academicTheme = {
1129
1340
  secondary: "#1C3F60",
1130
1341
  background: "#FCFBF7",
1131
1342
  surface: "#F5F2EB",
1343
+ elevatedSurface: "#FFFFFF",
1132
1344
  text: "#2C2B29",
1133
1345
  muted: "#6B6862",
1134
1346
  accent: "#C29B38",
1135
1347
  border: "#E0DACD",
1348
+ divider: "#D5CDBE",
1136
1349
  success: "#2E7D32",
1137
1350
  warning: "#E65100",
1138
1351
  danger: "#C62828",
@@ -1143,26 +1356,57 @@ var academicTheme = {
1143
1356
  bodyFont: "Georgia, Times New Roman, serif",
1144
1357
  codeFont: "Courier New, monospace",
1145
1358
  sizes: {
1359
+ display: 54,
1146
1360
  h1: 42,
1147
1361
  h2: 34,
1148
1362
  h3: 26,
1149
1363
  h4: 20,
1150
1364
  body: 18,
1151
1365
  small: 14,
1152
- code: 15
1366
+ caption: 12,
1367
+ code: 15,
1368
+ quote: 19,
1369
+ metadata: 12
1370
+ },
1371
+ weights: {
1372
+ normal: 400,
1373
+ medium: 500,
1374
+ bold: 700
1375
+ },
1376
+ lineHeights: {
1377
+ tight: 1.15,
1378
+ snug: 1.3,
1379
+ normal: 1.55,
1380
+ relaxed: 1.75
1381
+ },
1382
+ letterSpacing: {
1383
+ tight: "-0.01em",
1384
+ normal: "0em",
1385
+ wide: "0.03em"
1153
1386
  }
1154
1387
  },
1155
1388
  spacing: {
1156
1389
  unit: 8,
1390
+ scale: [0, 4, 8, 12, 16, 24, 32, 48, 64, 96],
1157
1391
  slidePadding: 52,
1158
- elementGap: 24
1392
+ elementGap: 24,
1393
+ safeArea: { top: 52, bottom: 52, left: 52, right: 52 }
1159
1394
  },
1160
1395
  radius: {
1161
- default: 4,
1396
+ none: 0,
1162
1397
  sm: 2,
1163
1398
  md: 4,
1164
1399
  lg: 6,
1165
- full: 9999
1400
+ xl: 10,
1401
+ full: 9999,
1402
+ default: 4
1403
+ },
1404
+ shadows: {
1405
+ none: "none",
1406
+ sm: "0 1px 3px rgba(44, 43, 41, 0.05)",
1407
+ md: "0 3px 6px rgba(44, 43, 41, 0.08)",
1408
+ lg: "0 8px 16px rgba(44, 43, 41, 0.1)",
1409
+ glow: "none"
1166
1410
  },
1167
1411
  components: {
1168
1412
  card: {
@@ -1170,6 +1414,21 @@ var academicTheme = {
1170
1414
  borderColor: "#8B0000",
1171
1415
  borderRadius: 4,
1172
1416
  padding: 24
1417
+ },
1418
+ metric: {
1419
+ valueColor: "#8B0000",
1420
+ labelColor: "#6B6862",
1421
+ borderRadius: 4
1422
+ },
1423
+ code: {
1424
+ background: "#2C2B29",
1425
+ textColor: "#F5F2EB",
1426
+ borderRadius: 4
1427
+ },
1428
+ table: {
1429
+ headerBackground: "#E0DACD",
1430
+ rowAlternateBackground: "#F5F2EB",
1431
+ borderColor: "#D5CDBE"
1173
1432
  }
1174
1433
  }
1175
1434
  };
@@ -1192,7 +1451,42 @@ function resolveTheme(themeNameOrRef, explicitOverrides) {
1192
1451
  typography: {
1193
1452
  ...baseTheme.typography,
1194
1453
  ...refOverrides?.typography,
1195
- ...explicitOverrides?.typography
1454
+ ...explicitOverrides?.typography,
1455
+ sizes: {
1456
+ ...baseTheme.typography.sizes,
1457
+ ...refOverrides?.typography?.sizes,
1458
+ ...explicitOverrides?.typography?.sizes
1459
+ },
1460
+ weights: {
1461
+ ...baseTheme.typography.weights,
1462
+ ...refOverrides?.typography?.weights,
1463
+ ...explicitOverrides?.typography?.weights
1464
+ },
1465
+ lineHeights: {
1466
+ ...baseTheme.typography.lineHeights,
1467
+ ...refOverrides?.typography?.lineHeights,
1468
+ ...explicitOverrides?.typography?.lineHeights
1469
+ }
1470
+ },
1471
+ spacing: {
1472
+ ...baseTheme.spacing,
1473
+ ...refOverrides?.spacing,
1474
+ ...explicitOverrides?.spacing,
1475
+ safeArea: {
1476
+ ...baseTheme.spacing.safeArea,
1477
+ ...refOverrides?.spacing?.safeArea,
1478
+ ...explicitOverrides?.spacing?.safeArea
1479
+ }
1480
+ },
1481
+ radius: {
1482
+ ...baseTheme.radius,
1483
+ ...refOverrides?.radius,
1484
+ ...explicitOverrides?.radius
1485
+ },
1486
+ shadows: {
1487
+ ...baseTheme.shadows,
1488
+ ...refOverrides?.shadows,
1489
+ ...explicitOverrides?.shadows
1196
1490
  },
1197
1491
  components: {
1198
1492
  ...baseTheme.components,
@@ -1281,6 +1575,7 @@ var YumiaLinter = class {
1281
1575
  });
1282
1576
  }
1283
1577
  this.checkImages(slide.elements, slideNum, issues);
1578
+ this.checkTablesAndCode(slide.elements, slideNum, issues);
1284
1579
  const maxDepth = this.getMaxNestingDepth(slide.elements, 0);
1285
1580
  if (maxDepth > 2) {
1286
1581
  issues.push({
@@ -1301,6 +1596,21 @@ var YumiaLinter = class {
1301
1596
  });
1302
1597
  }
1303
1598
  });
1599
+ if (presentation.metadata?.colors?.background && presentation.metadata?.colors?.text) {
1600
+ const bg = presentation.metadata.colors.background;
1601
+ const text = presentation.metadata.colors.text;
1602
+ if (bg.startsWith("#") && text.startsWith("#")) {
1603
+ const ratio = this.getContrastRatio(bg, text);
1604
+ if (ratio < 3) {
1605
+ issues.push({
1606
+ code: "YUM010",
1607
+ slide: 1,
1608
+ message: `Insufficient color contrast in custom palette: background (${bg}) vs text (${text}) has a ratio of ${ratio.toFixed(1)}:1 (minimum recommended: 4.5:1 for WCAG AA).`,
1609
+ severity: "warning"
1610
+ });
1611
+ }
1612
+ }
1613
+ }
1304
1614
  const errors = issues.filter((i) => i.severity === "error");
1305
1615
  const warnings = issues.filter((i) => i.severity === "warning");
1306
1616
  const infos = issues.filter((i) => i.severity === "info");
@@ -1313,6 +1623,65 @@ var YumiaLinter = class {
1313
1623
  infos
1314
1624
  };
1315
1625
  }
1626
+ getLuminance(hex) {
1627
+ const clean = hex.replace("#", "").trim();
1628
+ if (clean.length !== 6 && clean.length !== 3)
1629
+ return 0.5;
1630
+ const rgb = clean.length === 3 ? clean.split("").map((c) => parseInt(c + c, 16) / 255) : [
1631
+ parseInt(clean.slice(0, 2), 16) / 255,
1632
+ parseInt(clean.slice(2, 4), 16) / 255,
1633
+ parseInt(clean.slice(4, 6), 16) / 255
1634
+ ];
1635
+ const a = rgb.map((v) => v <= 0.03928 ? v / 12.92 : Math.pow((v + 0.055) / 1.055, 2.4));
1636
+ const r = a[0] ?? 0;
1637
+ const g = a[1] ?? 0;
1638
+ const b = a[2] ?? 0;
1639
+ return r * 0.2126 + g * 0.7152 + b * 0.0722;
1640
+ }
1641
+ getContrastRatio(hex1, hex2) {
1642
+ const l1 = this.getLuminance(hex1);
1643
+ const l2 = this.getLuminance(hex2);
1644
+ const lighter = Math.max(l1, l2);
1645
+ const darker = Math.min(l1, l2);
1646
+ return (lighter + 0.05) / (darker + 0.05);
1647
+ }
1648
+ checkTablesAndCode(elements, slideNum, issues) {
1649
+ const traverse = (els) => {
1650
+ for (const el of els) {
1651
+ if (el.type === "table") {
1652
+ const colCount = Math.max(el.headers?.length || 0, el.rows && el.rows[0] ? el.rows[0].length : 0);
1653
+ if (colCount > 5) {
1654
+ issues.push({
1655
+ code: "YUM011",
1656
+ slide: slideNum,
1657
+ message: `Table contains ${colCount} columns (recommended max: 5 for 16:9 slides). Content may cause horizontal clipping.`,
1658
+ severity: "warning",
1659
+ loc: el.loc
1660
+ });
1661
+ }
1662
+ } else if (el.type === "code") {
1663
+ const lines = el.code.split("\n");
1664
+ const maxLineLength = Math.max(...lines.map((l) => l.length));
1665
+ if (maxLineLength > 80) {
1666
+ issues.push({
1667
+ code: "YUM012",
1668
+ slide: slideNum,
1669
+ message: `Code block contains lines exceeding 80 characters (max: ${maxLineLength} chars). May cause line wrapping or overflow.`,
1670
+ severity: "info",
1671
+ loc: el.loc
1672
+ });
1673
+ }
1674
+ } else if (el.type === "card" && el.elements) {
1675
+ traverse(el.elements);
1676
+ } else if (el.type === "columns") {
1677
+ for (const col of el.columns) {
1678
+ traverse(col.elements);
1679
+ }
1680
+ }
1681
+ }
1682
+ };
1683
+ traverse(elements);
1684
+ }
1316
1685
  slideHasHeading(elements) {
1317
1686
  for (const el of elements) {
1318
1687
  if (el.type === "heading")
@@ -1541,11 +1910,33 @@ var CSS_NAMED_COLORS = {
1541
1910
  function cleanFontFace(fontString) {
1542
1911
  if (!fontString)
1543
1912
  return "Segoe UI";
1544
- const first = fontString.split(",")[0]?.trim().replace(/^['"]|['"]$/g, "") || "";
1545
- if (!first || first === "system-ui" || first === "-apple-system" || first === "sans-serif" || first === "monospace" || first === "serif") {
1546
- return "Segoe UI";
1913
+ const fonts = fontString.split(",").map((f) => f.trim().replace(/^['"]|['"]$/g, ""));
1914
+ const safeList = [
1915
+ "Segoe UI",
1916
+ "Arial",
1917
+ "Calibri",
1918
+ "Helvetica",
1919
+ "Verdana",
1920
+ "Tahoma",
1921
+ "Trebuchet MS",
1922
+ "Consolas",
1923
+ "Courier New",
1924
+ "Courier",
1925
+ "Georgia",
1926
+ "Times New Roman"
1927
+ ];
1928
+ for (const font of fonts) {
1929
+ if (safeList.includes(font)) {
1930
+ return font;
1931
+ }
1547
1932
  }
1548
- return first;
1933
+ if (fontString.toLowerCase().includes("mono") || fontString.toLowerCase().includes("code")) {
1934
+ return "Consolas";
1935
+ }
1936
+ if (fontString.toLowerCase().includes("serif") && !fontString.toLowerCase().includes("sans")) {
1937
+ return "Georgia";
1938
+ }
1939
+ return "Segoe UI";
1549
1940
  }
1550
1941
  function parseInlineMarkdown(rawText, baseOptions) {
1551
1942
  const chunks = [];
@@ -2074,12 +2465,14 @@ var HtmlRenderer = class {
2074
2465
  :root {
2075
2466
  --yumia-bg: ${theme.colors.background};
2076
2467
  --yumia-surface: ${theme.colors.surface};
2468
+ --yumia-elevated-surface: ${theme.colors.elevatedSurface || theme.colors.surface};
2077
2469
  --yumia-text: ${theme.colors.text};
2078
2470
  --yumia-muted: ${theme.colors.muted || "#94a3b8"};
2079
2471
  --yumia-primary: ${theme.colors.primary};
2080
2472
  --yumia-secondary: ${theme.colors.secondary || theme.colors.primary};
2081
2473
  --yumia-accent: ${theme.colors.accent || theme.colors.primary};
2082
2474
  --yumia-border: ${theme.colors.border || "rgba(255,255,255,0.1)"};
2475
+ --yumia-divider: ${theme.colors.divider || "rgba(255,255,255,0.12)"};
2083
2476
  --yumia-success: ${theme.colors.success || "#10b981"};
2084
2477
  --yumia-warning: ${theme.colors.warning || "#f59e0b"};
2085
2478
  --yumia-danger: ${theme.colors.danger || "#ef4444"};
@@ -2087,6 +2480,17 @@ var HtmlRenderer = class {
2087
2480
  --yumia-font-heading: ${theme.typography.headingFont};
2088
2481
  --yumia-font-body: ${theme.typography.bodyFont};
2089
2482
  --yumia-font-code: ${theme.typography.codeFont || "monospace"};
2483
+ --yumia-line-height-tight: ${theme.typography.lineHeights?.tight || 1.15};
2484
+ --yumia-line-height-normal: ${theme.typography.lineHeights?.normal || 1.55};
2485
+ --yumia-line-height-relaxed: ${theme.typography.lineHeights?.relaxed || 1.7};
2486
+ --yumia-line-height-body: ${theme.typography.lineHeights?.normal || 1.55};
2487
+ --yumia-letter-spacing-tight: ${theme.typography.letterSpacing?.tight || "-0.02em"};
2488
+ --yumia-radius-sm: ${theme.radius.sm || 4}px;
2489
+ --yumia-radius-md: ${theme.radius.md || 8}px;
2490
+ --yumia-radius-lg: ${theme.radius.lg || 16}px;
2491
+ --yumia-radius-default: ${theme.radius.default}px;
2492
+ --yumia-radius-card: ${theme.components?.card?.borderRadius ?? theme.radius.default}px;
2493
+ --yumia-shadow-glow: ${theme.shadows?.glow || "none"};
2090
2494
  --yumia-ratio: ${ratioAspect};
2091
2495
  }
2092
2496
 
@@ -2099,7 +2503,7 @@ var HtmlRenderer = class {
2099
2503
  body {
2100
2504
  background-color: #050508;
2101
2505
  color: var(--yumia-text);
2102
- font-family: var(--yumia-font-body);
2506
+ font-family: var(--yumia-font-body), system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
2103
2507
  overflow: hidden;
2104
2508
  width: 100vw;
2105
2509
  height: 100vh;
@@ -2124,7 +2528,7 @@ var HtmlRenderer = class {
2124
2528
  height: min(calc(94vw / (${is43 ? "4 / 3" : "16 / 9"})), 94vh);
2125
2529
  aspect-ratio: var(--yumia-ratio);
2126
2530
  background-color: var(--yumia-bg);
2127
- border-radius: 12px;
2531
+ border-radius: var(--yumia-radius-default);
2128
2532
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 0 1px var(--yumia-border);
2129
2533
  overflow: hidden;
2130
2534
  display: none;
@@ -2144,11 +2548,13 @@ var HtmlRenderer = class {
2144
2548
 
2145
2549
  /* Headings */
2146
2550
  h1, h2, h3, h4 {
2147
- font-family: var(--yumia-font-heading);
2551
+ font-family: var(--yumia-font-heading), system-ui, -apple-system, sans-serif;
2148
2552
  font-weight: 700;
2149
- line-height: 1.15;
2553
+ line-height: var(--yumia-line-height-tight);
2150
2554
  margin-bottom: 0.7em;
2151
- letter-spacing: -0.02em;
2555
+ letter-spacing: var(--yumia-letter-spacing-tight);
2556
+ overflow-wrap: break-word;
2557
+ word-break: break-word;
2152
2558
  }
2153
2559
 
2154
2560
  h1 {
@@ -2174,7 +2580,11 @@ var HtmlRenderer = class {
2174
2580
  /* Paragraphs */
2175
2581
  p {
2176
2582
  font-size: clamp(1rem, 1.4vw, 1.25rem);
2177
- line-height: 1.6;
2583
+ line-height: var(--yumia-line-height-normal);
2584
+ color: var(--yumia-text);
2585
+ margin-bottom: 0.8em;
2586
+ overflow-wrap: break-word;
2587
+ }
2178
2588
  color: var(--yumia-text);
2179
2589
  margin-bottom: 0.8em;
2180
2590
  }
@@ -3328,7 +3738,7 @@ var PdfRenderer = class {
3328
3738
  }
3329
3739
  }
3330
3740
  stripFormatting(text) {
3331
- return text.replace(/\*\*(.*?)\*\*/g, "$1").replace(/\*(.*?)\*/g, "$1").replace(/`(.*?)`/g, "$1");
3741
+ return text.replace(/\*\*(.*?)\*\*/g, "$1").replace(/\*(.*?)\*/g, "$1").replace(/`(.*?)`/g, "$1").replace(/[\u{1F300}-\u{1FAFF}\u{2600}-\u{27BF}\u{1F900}-\u{1F9FF}\u{1F600}-\u{1F64F}\u{1F680}-\u{1F6FF}\u{2300}-\u{23FF}\u{2B50}]/gu, "").replace(/\u200D/g, "").replace(/\uFE0F/g, "").replace(/[“”]/g, '"').replace(/[‘’]/g, "'").replace(/[—–]/g, "-").trim();
3332
3742
  }
3333
3743
  };
3334
3744
 
@@ -3395,6 +3805,14 @@ function startDevServer(filePath, options = {}) {
3395
3805
  });
3396
3806
  server.listen(port, () => {
3397
3807
  const url = `http://localhost:${port}`;
3808
+ if (options.open) {
3809
+ const startCmd = process.platform === "win32" ? `start ${url}` : process.platform === "darwin" ? `open ${url}` : `xdg-open ${url}`;
3810
+ import("child_process").then(({ exec }) => {
3811
+ exec(startCmd, () => {
3812
+ });
3813
+ }).catch(() => {
3814
+ });
3815
+ }
3398
3816
  try {
3399
3817
  watcher = watch(resolvedPath, () => {
3400
3818
  if (debounceTimer) clearTimeout(debounceTimer);
@@ -3431,7 +3849,7 @@ function startDevServer(filePath, options = {}) {
3431
3849
  // src/cli.ts
3432
3850
  import { mkdirSync, readFileSync as readFileSync2, watch as fsWatch, writeFileSync } from "fs";
3433
3851
  import { basename, dirname, extname, join, resolve as resolve2 } from "path";
3434
- var VERSION = "0.1.13";
3852
+ var VERSION = "0.1.15";
3435
3853
  function printHelp() {
3436
3854
  return `
3437
3855
  YumiaMD \u2014 Markdown-based presentation compiler (v${VERSION})
@@ -3631,7 +4049,8 @@ Opening slide introducing the presentation deck.
3631
4049
  exitCode: 0,
3632
4050
  output: `\u{1F680} YumiaMD Live Dev Server running at: ${devInstance.url}
3633
4051
  Watching: ${target}
3634
- Hot-reloading active via SSE. Press Ctrl+C to stop.`
4052
+ Hot-reloading active via SSE. Press Ctrl+C to stop.`,
4053
+ keepAlive: true
3635
4054
  };
3636
4055
  } catch (err) {
3637
4056
  const msg = err instanceof Error ? err.message : String(err);
@@ -3863,7 +4282,8 @@ ${summary}${isStrict && report.warnings.length > 0 ? " (failed due to --strict)"
3863
4282
  const formatDesc = isHtml ? "interactive HTML slides" : isPdf ? "vector PDF slides" : "native editable slides";
3864
4283
  return {
3865
4284
  exitCode: 0,
3866
- output: `\u2713 Successfully compiled '${target}' \u2794 '${outputPath}' (${result.slideCount} ${formatDesc})${watchMsg}`
4285
+ output: `\u2713 Successfully compiled '${target}' \u2794 '${outputPath}' (${result.slideCount} ${formatDesc})${watchMsg}`,
4286
+ keepAlive: command === "watch" || isWatch
3867
4287
  };
3868
4288
  } catch (err) {
3869
4289
  const msg = err instanceof Error ? err.message : String(err);
package/dist/index.d.ts CHANGED
@@ -9,11 +9,12 @@ export * from '@yumiamd/renderer-pptx';
9
9
  export * from '@yumiamd/renderer-html';
10
10
  export * from '@yumiamd/renderer-pdf';
11
11
 
12
- declare const VERSION = "0.1.13";
12
+ declare const VERSION = "0.1.15";
13
13
  declare function printHelp(): string;
14
14
  declare function runCli(argv: string[]): Promise<{
15
15
  exitCode: number;
16
16
  output: string;
17
+ keepAlive?: boolean;
17
18
  }>;
18
19
 
19
20
  interface DevServerOptions {
package/dist/index.js CHANGED
@@ -39,7 +39,7 @@ import {
39
39
  runCli,
40
40
  startDevServer,
41
41
  terminalTheme
42
- } from "./chunk-6GEDN7OB.js";
42
+ } from "./chunk-7A5BHABM.js";
43
43
  export {
44
44
  DEFAULT_VIEWPORT,
45
45
  DefaultLayoutEngine,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yumiamd",
3
- "version": "0.1.13",
3
+ "version": "0.1.15",
4
4
  "description": "Command line interface and compiler for YumiaMD presentations",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -21,15 +21,15 @@
21
21
  },
22
22
  "devDependencies": {
23
23
  "tsup": "^8.5.1",
24
- "@yumiamd/core": "0.1.13",
25
- "@yumiamd/parser": "0.1.13",
26
- "@yumiamd/renderer": "0.1.13",
27
- "@yumiamd/ast": "0.1.13",
28
- "@yumiamd/layout": "0.1.13",
29
- "@yumiamd/renderer-html": "0.1.13",
30
- "@yumiamd/renderer-pdf": "0.1.13",
31
- "@yumiamd/renderer-pptx": "0.1.13",
32
- "@yumiamd/theme": "0.1.13"
24
+ "@yumiamd/ast": "0.1.15",
25
+ "@yumiamd/parser": "0.1.15",
26
+ "@yumiamd/core": "0.1.15",
27
+ "@yumiamd/renderer-html": "0.1.15",
28
+ "@yumiamd/renderer": "0.1.15",
29
+ "@yumiamd/layout": "0.1.15",
30
+ "@yumiamd/renderer-pptx": "0.1.15",
31
+ "@yumiamd/theme": "0.1.15",
32
+ "@yumiamd/renderer-pdf": "0.1.15"
33
33
  },
34
34
  "keywords": [
35
35
  "yumia",