yumiamd 0.1.27 → 0.1.28
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 +1 -1
- package/dist/{chunk-FTPWLNJL.js → chunk-MJF4TOUX.js} +170 -94
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +10 -10
package/dist/bin.js
CHANGED
|
@@ -1389,7 +1389,12 @@ var NativeYumiaParser = class {
|
|
|
1389
1389
|
let currentSlide = null;
|
|
1390
1390
|
const flushSlide = () => {
|
|
1391
1391
|
if (currentSlide) {
|
|
1392
|
-
|
|
1392
|
+
let elements = [...currentSlideElements];
|
|
1393
|
+
const hasHero = elements.some((el) => el.type === "hero");
|
|
1394
|
+
if (hasHero && elements.length > 1 && elements[0]?.type === "heading") {
|
|
1395
|
+
elements = elements.slice(1);
|
|
1396
|
+
}
|
|
1397
|
+
currentSlide.elements = elements;
|
|
1393
1398
|
slides.push(currentSlide);
|
|
1394
1399
|
currentSlideElements = [];
|
|
1395
1400
|
currentSlide = null;
|
|
@@ -2353,11 +2358,19 @@ var DefaultLayoutEngine = class {
|
|
|
2353
2358
|
}
|
|
2354
2359
|
layoutHero(element, x, y, width, gap) {
|
|
2355
2360
|
let curY = y;
|
|
2356
|
-
if (element.tagline)
|
|
2357
|
-
curY +=
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
+
if (element.tagline) {
|
|
2362
|
+
curY += 45;
|
|
2363
|
+
}
|
|
2364
|
+
const charsPerLineTitle = Math.max(15, Math.floor(width / 34));
|
|
2365
|
+
const titleLines = Math.max(1, Math.ceil(element.title.length / charsPerLineTitle));
|
|
2366
|
+
const titleHeight = Math.max(85, titleLines * 65 + 20);
|
|
2367
|
+
curY += titleHeight;
|
|
2368
|
+
if (element.subtitle) {
|
|
2369
|
+
const charsPerLineSub = Math.max(25, Math.floor(width / 20));
|
|
2370
|
+
const subLines = Math.max(1, Math.ceil(element.subtitle.length / charsPerLineSub));
|
|
2371
|
+
const subHeight = Math.max(50, subLines * 34 + 16);
|
|
2372
|
+
curY += subHeight;
|
|
2373
|
+
}
|
|
2361
2374
|
const children = [];
|
|
2362
2375
|
if (element.elements) {
|
|
2363
2376
|
for (const child of element.elements) {
|
|
@@ -2366,7 +2379,7 @@ var DefaultLayoutEngine = class {
|
|
|
2366
2379
|
curY += node.bounds.height + gap;
|
|
2367
2380
|
}
|
|
2368
2381
|
}
|
|
2369
|
-
return { element, bounds: { x, y, width, height: curY - y }, children };
|
|
2382
|
+
return { element, bounds: { x, y, width, height: Math.max(curY - y, 160) }, children };
|
|
2370
2383
|
}
|
|
2371
2384
|
layoutGrid(element, x, y, width, gap) {
|
|
2372
2385
|
const colCount = typeof element.columns === "number" ? element.columns : parseInt(String(element.columns), 10) || 2;
|
|
@@ -4620,19 +4633,25 @@ function cleanFontFace(fontString) {
|
|
|
4620
4633
|
"Courier New",
|
|
4621
4634
|
"Courier",
|
|
4622
4635
|
"Georgia",
|
|
4623
|
-
"Times New Roman"
|
|
4636
|
+
"Times New Roman",
|
|
4637
|
+
"Cambria",
|
|
4638
|
+
"Garamond"
|
|
4624
4639
|
];
|
|
4625
4640
|
for (const font of fonts) {
|
|
4626
4641
|
if (safeList.includes(font)) {
|
|
4627
4642
|
return font;
|
|
4628
4643
|
}
|
|
4629
4644
|
}
|
|
4630
|
-
|
|
4645
|
+
const lower = fontString.toLowerCase();
|
|
4646
|
+
if (lower.includes("mono") || lower.includes("code") || lower.includes("jetbrains") || lower.includes("fira")) {
|
|
4631
4647
|
return "Consolas";
|
|
4632
4648
|
}
|
|
4633
|
-
if (
|
|
4649
|
+
if ((lower.includes("serif") || lower.includes("times") || lower.includes("georgia") || lower.includes("cinzel") || lower.includes("playfair")) && !lower.includes("sans")) {
|
|
4634
4650
|
return "Georgia";
|
|
4635
4651
|
}
|
|
4652
|
+
if (lower.includes("outfit") || lower.includes("grotesk") || lower.includes("orbitron") || lower.includes("trebuchet")) {
|
|
4653
|
+
return "Trebuchet MS";
|
|
4654
|
+
}
|
|
4636
4655
|
return "Segoe UI";
|
|
4637
4656
|
}
|
|
4638
4657
|
function parseInlineMarkdown(rawText, baseOptions) {
|
|
@@ -5225,10 +5244,11 @@ var PptxRenderer = class {
|
|
|
5225
5244
|
const colorKey = badge.variant || "primary";
|
|
5226
5245
|
const badgeColor = this.cleanHexColor(theme.colors[colorKey] || theme.colors.primary);
|
|
5227
5246
|
const badgeText = badge.text;
|
|
5228
|
-
const badgeW = Math.min(
|
|
5229
|
-
const badgeH = Math.min(0.38, rect.h);
|
|
5247
|
+
const badgeW = Math.min(3.5, Math.max(1.2, badgeText.length * 0.11 + 0.6));
|
|
5248
|
+
const badgeH = Math.min(0.38, Math.max(0.3, rect.h));
|
|
5249
|
+
const badgeX = rect.w > 4 ? rect.x + (rect.w - badgeW) / 2 : rect.x;
|
|
5230
5250
|
pptxSlide.addShape(pptx.ShapeType.roundRect, {
|
|
5231
|
-
x:
|
|
5251
|
+
x: badgeX,
|
|
5232
5252
|
y: rect.y,
|
|
5233
5253
|
w: badgeW,
|
|
5234
5254
|
h: badgeH,
|
|
@@ -5237,7 +5257,7 @@ var PptxRenderer = class {
|
|
|
5237
5257
|
rectRadius: 0.15
|
|
5238
5258
|
});
|
|
5239
5259
|
pptxSlide.addText(badgeText.toUpperCase(), {
|
|
5240
|
-
x:
|
|
5260
|
+
x: badgeX,
|
|
5241
5261
|
y: rect.y,
|
|
5242
5262
|
w: badgeW,
|
|
5243
5263
|
h: badgeH,
|
|
@@ -5305,32 +5325,38 @@ var PptxRenderer = class {
|
|
|
5305
5325
|
fontFace: cleanFontFace(theme.typography.headingFont),
|
|
5306
5326
|
align: hero.align || "center"
|
|
5307
5327
|
});
|
|
5308
|
-
curY += 0.
|
|
5328
|
+
curY += 0.42;
|
|
5309
5329
|
}
|
|
5330
|
+
const titleLines = Math.max(1, Math.ceil(hero.title.length / 38));
|
|
5331
|
+
const titleH = Math.max(0.7, titleLines * 0.52 + 0.12);
|
|
5332
|
+
const titleFontSize = titleLines > 2 ? 26 : titleLines > 1 ? 29 : 33;
|
|
5310
5333
|
pptxSlide.addText(hero.title, {
|
|
5311
5334
|
x: rect.x,
|
|
5312
5335
|
y: curY,
|
|
5313
5336
|
w: rect.w,
|
|
5314
|
-
h:
|
|
5315
|
-
fontSize:
|
|
5337
|
+
h: titleH,
|
|
5338
|
+
fontSize: titleFontSize,
|
|
5316
5339
|
bold: true,
|
|
5317
5340
|
color: this.cleanHexColor(theme.colors.text),
|
|
5318
5341
|
fontFace: cleanFontFace(theme.typography.headingFont),
|
|
5319
5342
|
align: hero.align || "center"
|
|
5320
5343
|
});
|
|
5321
|
-
curY += 0.
|
|
5344
|
+
curY += titleH + 0.08;
|
|
5322
5345
|
if (hero.subtitle) {
|
|
5346
|
+
const subLines = Math.max(1, Math.ceil(hero.subtitle.length / 56));
|
|
5347
|
+
const subH = Math.max(0.38, subLines * 0.3 + 0.1);
|
|
5348
|
+
const subFontSize = subLines > 2 ? 14 : 16;
|
|
5323
5349
|
pptxSlide.addText(hero.subtitle, {
|
|
5324
5350
|
x: rect.x,
|
|
5325
5351
|
y: curY,
|
|
5326
5352
|
w: rect.w,
|
|
5327
|
-
h:
|
|
5328
|
-
fontSize:
|
|
5353
|
+
h: subH,
|
|
5354
|
+
fontSize: subFontSize,
|
|
5329
5355
|
color: this.cleanHexColor(theme.colors.muted || theme.colors.text),
|
|
5330
5356
|
fontFace: cleanFontFace(theme.typography.bodyFont),
|
|
5331
5357
|
align: hero.align || "center"
|
|
5332
5358
|
});
|
|
5333
|
-
curY += 0.
|
|
5359
|
+
curY += subH + 0.12;
|
|
5334
5360
|
}
|
|
5335
5361
|
if (node.children) {
|
|
5336
5362
|
for (const childNode of node.children) {
|
|
@@ -6634,16 +6660,21 @@ var HtmlRenderer = class {
|
|
|
6634
6660
|
.yumia-badge {
|
|
6635
6661
|
display: inline-flex;
|
|
6636
6662
|
align-items: center;
|
|
6637
|
-
|
|
6663
|
+
justify-content: center;
|
|
6664
|
+
padding: 4px 16px;
|
|
6638
6665
|
border-radius: 999px;
|
|
6639
6666
|
font-size: 0.8rem;
|
|
6640
6667
|
font-weight: 700;
|
|
6641
|
-
letter-spacing: 0.
|
|
6668
|
+
letter-spacing: 0.05em;
|
|
6642
6669
|
text-transform: uppercase;
|
|
6643
|
-
background: rgba(255, 255, 255, 0.
|
|
6670
|
+
background: rgba(255, 255, 255, 0.08);
|
|
6644
6671
|
color: var(--yumia-text);
|
|
6645
|
-
border:
|
|
6646
|
-
margin
|
|
6672
|
+
border: 1.5px solid var(--yumia-border);
|
|
6673
|
+
margin: 0.4rem auto;
|
|
6674
|
+
align-self: center;
|
|
6675
|
+
width: fit-content;
|
|
6676
|
+
max-width: fit-content;
|
|
6677
|
+
box-sizing: border-box;
|
|
6647
6678
|
}
|
|
6648
6679
|
.yumia-badge.variant-primary { background: rgba(0, 240, 255, 0.15); color: var(--yumia-primary); border-color: var(--yumia-primary); }
|
|
6649
6680
|
.yumia-badge.variant-success { background: rgba(16, 185, 129, 0.15); color: var(--yumia-success); border-color: var(--yumia-success); }
|
|
@@ -8048,10 +8079,10 @@ var HtmlRenderer = class {
|
|
|
8048
8079
|
}
|
|
8049
8080
|
renderDiagram(d, theme) {
|
|
8050
8081
|
const isLR = (d.direction || "LR").toUpperCase() === "LR";
|
|
8051
|
-
const nodeW =
|
|
8082
|
+
const nodeW = 160;
|
|
8052
8083
|
const nodeH = 48;
|
|
8053
|
-
const gapX = isLR ?
|
|
8054
|
-
const gapY = isLR ?
|
|
8084
|
+
const gapX = isLR ? 75 : 40;
|
|
8085
|
+
const gapY = isLR ? 35 : 55;
|
|
8055
8086
|
const nodeIds = d.nodes.map((n) => n.id);
|
|
8056
8087
|
const inDegree = {};
|
|
8057
8088
|
const adj = {};
|
|
@@ -8164,9 +8195,11 @@ var HtmlRenderer = class {
|
|
|
8164
8195
|
const dash = e.style === "dashed" ? 'stroke-dasharray="5,5"' : "";
|
|
8165
8196
|
edgesSvg += `<path d="M ${x1} ${y1} C ${midX} ${y1}, ${midX} ${y2}, ${x2} ${y2}" fill="none" stroke="${arrowColor}" stroke-width="2" ${dash} marker-end="url(#${markerId})" />`;
|
|
8166
8197
|
if (e.label) {
|
|
8198
|
+
const labelText = this.escapeHtml(e.label);
|
|
8199
|
+
const pillWidth = Math.max(54, labelText.length * 6.5 + 16);
|
|
8167
8200
|
edgesSvg += `<g transform="translate(${midX}, ${midY})">
|
|
8168
|
-
<rect x="
|
|
8169
|
-
<text x="0" y="4" text-anchor="middle" fill="${mutedColor}" font-size="10
|
|
8201
|
+
<rect x="-${pillWidth / 2}" y="-11" width="${pillWidth}" height="22" rx="6" fill="${surfaceFill}" stroke="${borderColor}" stroke-width="1.2"/>
|
|
8202
|
+
<text x="0" y="4" text-anchor="middle" fill="${mutedColor}" font-size="10" font-weight="600" font-family="sans-serif">${labelText}</text>
|
|
8170
8203
|
</g>`;
|
|
8171
8204
|
}
|
|
8172
8205
|
});
|
|
@@ -8395,6 +8428,34 @@ import PDFDocument from "pdfkit";
|
|
|
8395
8428
|
var PdfRenderer = class {
|
|
8396
8429
|
name = "PdfRenderer";
|
|
8397
8430
|
targetFormat = "pdf";
|
|
8431
|
+
getPdfFont(theme, weight = "regular") {
|
|
8432
|
+
const headingFont = (theme.typography?.headingFont || "").toLowerCase();
|
|
8433
|
+
const isSerif = headingFont.includes("serif") || headingFont.includes("times") || headingFont.includes("georgia") || theme.name === "academic";
|
|
8434
|
+
const isMono = headingFont.includes("mono") || headingFont.includes("courier") || headingFont.includes("code") || theme.name === "terminal";
|
|
8435
|
+
if (weight === "code" || isMono) {
|
|
8436
|
+
if (weight === "bold" || weight === "boldItalic")
|
|
8437
|
+
return "Courier-Bold";
|
|
8438
|
+
if (weight === "italic")
|
|
8439
|
+
return "Courier-Oblique";
|
|
8440
|
+
return "Courier";
|
|
8441
|
+
}
|
|
8442
|
+
if (isSerif) {
|
|
8443
|
+
if (weight === "bold")
|
|
8444
|
+
return "Times-Bold";
|
|
8445
|
+
if (weight === "italic")
|
|
8446
|
+
return "Times-Italic";
|
|
8447
|
+
if (weight === "boldItalic")
|
|
8448
|
+
return "Times-BoldItalic";
|
|
8449
|
+
return "Times-Roman";
|
|
8450
|
+
}
|
|
8451
|
+
if (weight === "bold")
|
|
8452
|
+
return "Helvetica-Bold";
|
|
8453
|
+
if (weight === "italic")
|
|
8454
|
+
return "Helvetica-Oblique";
|
|
8455
|
+
if (weight === "boldItalic")
|
|
8456
|
+
return "Helvetica-BoldOblique";
|
|
8457
|
+
return "Helvetica";
|
|
8458
|
+
}
|
|
8398
8459
|
async render(presentation, context = {}) {
|
|
8399
8460
|
const colorOverrides = presentation.metadata.colors ? { colors: presentation.metadata.colors } : void 0;
|
|
8400
8461
|
const resolvedTheme = resolveTheme(presentation.metadata.theme, colorOverrides);
|
|
@@ -8454,12 +8515,12 @@ var PdfRenderer = class {
|
|
|
8454
8515
|
doc.rect(0, pageHeight - 4, progressWidth, 4).fill(theme.colors.primary);
|
|
8455
8516
|
if (presentation?.metadata.watermark) {
|
|
8456
8517
|
const watermarkText = typeof presentation.metadata.watermark === "string" ? presentation.metadata.watermark : "CONFIDENTIAL";
|
|
8457
|
-
doc.font("
|
|
8518
|
+
doc.font(this.getPdfFont(theme, "bold")).fontSize(9).fillColor(theme.colors.muted || "#888888").text(watermarkText.toUpperCase(), padX, pageHeight - 22, {
|
|
8458
8519
|
width: contentWidth - 80,
|
|
8459
8520
|
align: "left"
|
|
8460
8521
|
});
|
|
8461
8522
|
}
|
|
8462
|
-
doc.font("
|
|
8523
|
+
doc.font(this.getPdfFont(theme, "regular")).fontSize(10).fillColor(theme.colors.muted || "#888888").text(`${slideNum} / ${totalSlides}`, pageWidth - padX - 60, pageHeight - 22, {
|
|
8463
8524
|
width: 60,
|
|
8464
8525
|
align: "right"
|
|
8465
8526
|
});
|
|
@@ -8471,21 +8532,21 @@ var PdfRenderer = class {
|
|
|
8471
8532
|
const align = hero.align || "center";
|
|
8472
8533
|
let curY = y;
|
|
8473
8534
|
if (hero.tagline) {
|
|
8474
|
-
doc.font("
|
|
8535
|
+
doc.font(this.getPdfFont(theme, "bold")).fontSize(11).fillColor(theme.colors.primary);
|
|
8475
8536
|
doc.text(this.stripFormatting(hero.tagline).toUpperCase(), x, curY, { width, align });
|
|
8476
|
-
curY +=
|
|
8537
|
+
curY += 22;
|
|
8477
8538
|
}
|
|
8478
|
-
doc.font("
|
|
8539
|
+
doc.font(this.getPdfFont(theme, "bold")).fontSize(32).fillColor(theme.colors.text);
|
|
8479
8540
|
doc.text(this.stripFormatting(hero.title), x, curY, { width, lineGap: 6, align });
|
|
8480
|
-
curY += doc.heightOfString(this.stripFormatting(hero.title), { width }) +
|
|
8541
|
+
curY += doc.heightOfString(this.stripFormatting(hero.title), { width }) + 10;
|
|
8481
8542
|
if (hero.subtitle) {
|
|
8482
|
-
doc.font("
|
|
8543
|
+
doc.font(this.getPdfFont(theme, "regular")).fontSize(15).fillColor(theme.colors.muted || "#888888");
|
|
8483
8544
|
doc.text(this.stripFormatting(hero.subtitle), x, curY, { width, lineGap: 4, align });
|
|
8484
|
-
curY += doc.heightOfString(this.stripFormatting(hero.subtitle), { width }) +
|
|
8545
|
+
curY += doc.heightOfString(this.stripFormatting(hero.subtitle), { width }) + 14;
|
|
8485
8546
|
}
|
|
8486
8547
|
if (hero.elements) {
|
|
8487
8548
|
for (const child of hero.elements) {
|
|
8488
|
-
curY = this.renderElement(doc, child, x, curY, width, theme, presentation) +
|
|
8549
|
+
curY = this.renderElement(doc, child, x, curY, width, theme, presentation) + 8;
|
|
8489
8550
|
}
|
|
8490
8551
|
}
|
|
8491
8552
|
return curY;
|
|
@@ -8493,7 +8554,7 @@ var PdfRenderer = class {
|
|
|
8493
8554
|
case "callout": {
|
|
8494
8555
|
const c = element;
|
|
8495
8556
|
const sevColor = c.severity === "warning" ? theme.colors.warning || "#f59e0b" : c.severity === "danger" ? theme.colors.danger || "#ef4444" : c.severity === "success" ? theme.colors.success || "#10b981" : theme.colors.info || theme.colors.primary;
|
|
8496
|
-
doc.font("
|
|
8557
|
+
doc.font(this.getPdfFont(theme, "regular")).fontSize(12);
|
|
8497
8558
|
const textH = doc.heightOfString(this.stripFormatting(c.text), { width: width - 30 });
|
|
8498
8559
|
const titleH = c.title ? 20 : 0;
|
|
8499
8560
|
const totalH = textH + titleH + 16;
|
|
@@ -8501,11 +8562,11 @@ var PdfRenderer = class {
|
|
|
8501
8562
|
doc.rect(x, y, 4, totalH).fill(sevColor);
|
|
8502
8563
|
let curY = y + 8;
|
|
8503
8564
|
if (c.title) {
|
|
8504
|
-
doc.font("
|
|
8565
|
+
doc.font(this.getPdfFont(theme, "bold")).fontSize(12).fillColor(sevColor);
|
|
8505
8566
|
doc.text(this.stripFormatting(c.title), x + 16, curY, { width: width - 26 });
|
|
8506
8567
|
curY += 18;
|
|
8507
8568
|
}
|
|
8508
|
-
doc.font("
|
|
8569
|
+
doc.font(this.getPdfFont(theme, "regular")).fontSize(12).fillColor(theme.colors.text);
|
|
8509
8570
|
doc.text(this.stripFormatting(c.text), x + 16, curY, { width: width - 26 });
|
|
8510
8571
|
return y + totalH + 8;
|
|
8511
8572
|
}
|
|
@@ -8513,14 +8574,14 @@ var PdfRenderer = class {
|
|
|
8513
8574
|
const h = element;
|
|
8514
8575
|
const fontSize = h.level === 1 ? 28 : h.level === 2 ? 22 : 18;
|
|
8515
8576
|
const color = h.level === 1 ? theme.colors.primary : theme.colors.text;
|
|
8516
|
-
doc.font("
|
|
8577
|
+
doc.font(this.getPdfFont(theme, "bold")).fontSize(fontSize).fillColor(color);
|
|
8517
8578
|
doc.text(this.stripFormatting(h.text), x, y, { width, lineGap: 4 });
|
|
8518
8579
|
const height = doc.heightOfString(this.stripFormatting(h.text), { width });
|
|
8519
8580
|
return y + height;
|
|
8520
8581
|
}
|
|
8521
8582
|
case "paragraph": {
|
|
8522
8583
|
const p = element;
|
|
8523
|
-
doc.font("
|
|
8584
|
+
doc.font(this.getPdfFont(theme, "regular")).fontSize(14).fillColor(theme.colors.text);
|
|
8524
8585
|
doc.text(this.stripFormatting(p.text), x, y, { width, lineGap: 4 });
|
|
8525
8586
|
const height = doc.heightOfString(this.stripFormatting(p.text), { width });
|
|
8526
8587
|
return y + height;
|
|
@@ -8531,8 +8592,8 @@ var PdfRenderer = class {
|
|
|
8531
8592
|
const itemGap = 6;
|
|
8532
8593
|
l.items.forEach((item, idx) => {
|
|
8533
8594
|
const bullet = l.ordered ? `${idx + 1}.` : "\u2022";
|
|
8534
|
-
doc.font("
|
|
8535
|
-
doc.font("
|
|
8595
|
+
doc.font(this.getPdfFont(theme, "bold")).fontSize(13).fillColor(theme.colors.primary).text(bullet, x, currentY, { width: 18 });
|
|
8596
|
+
doc.font(this.getPdfFont(theme, "regular")).fontSize(13).fillColor(theme.colors.text).text(this.stripFormatting(item.text), x + 20, currentY, {
|
|
8536
8597
|
width: width - 20,
|
|
8537
8598
|
lineGap: 3
|
|
8538
8599
|
});
|
|
@@ -8545,22 +8606,22 @@ var PdfRenderer = class {
|
|
|
8545
8606
|
const q = element;
|
|
8546
8607
|
const quoteText = `\u201C${this.stripFormatting(q.text)}\u201D`;
|
|
8547
8608
|
const authorText = q.author ? `\u2014 ${this.stripFormatting(q.author)}` : "";
|
|
8548
|
-
doc.font("
|
|
8609
|
+
doc.font(this.getPdfFont(theme, "italic")).fontSize(13).fillColor(theme.colors.muted || "#aaaaaa");
|
|
8549
8610
|
const textHeight = doc.heightOfString(quoteText, { width: width - 24 });
|
|
8550
8611
|
const authorHeight = authorText ? 18 : 0;
|
|
8551
8612
|
const totalHeight = textHeight + authorHeight + 16;
|
|
8552
8613
|
doc.roundedRect(x, y, width, totalHeight, 6).fill(theme.colors.surface || "rgba(255,255,255,0.05)");
|
|
8553
8614
|
doc.rect(x, y, 4, totalHeight).fill(theme.colors.accent || theme.colors.primary);
|
|
8554
|
-
doc.font("
|
|
8615
|
+
doc.font(this.getPdfFont(theme, "italic")).fontSize(13).fillColor(theme.colors.text).text(quoteText, x + 16, y + 8, { width: width - 28 });
|
|
8555
8616
|
if (authorText) {
|
|
8556
|
-
doc.font("
|
|
8617
|
+
doc.font(this.getPdfFont(theme, "regular")).fontSize(11).fillColor(theme.colors.muted || "#888888").text(authorText, x + 16, y + 8 + textHeight + 4, { width: width - 28 });
|
|
8557
8618
|
}
|
|
8558
8619
|
return y + totalHeight;
|
|
8559
8620
|
}
|
|
8560
8621
|
case "code": {
|
|
8561
8622
|
const c = element;
|
|
8562
8623
|
const lines = c.code.split("\n");
|
|
8563
|
-
doc.font("
|
|
8624
|
+
doc.font(this.getPdfFont(theme, "code")).fontSize(10);
|
|
8564
8625
|
const lineHeight = 14;
|
|
8565
8626
|
const boxHeight = lines.length * lineHeight + 20;
|
|
8566
8627
|
doc.roundedRect(x, y, width, boxHeight, 6).fill("#0a0a10").strokeColor(theme.colors.border || "rgba(255,255,255,0.1)").stroke();
|
|
@@ -8592,8 +8653,8 @@ var PdfRenderer = class {
|
|
|
8592
8653
|
const isHl = highlightSet.has(lineNum);
|
|
8593
8654
|
const numColor = isHl ? theme.colors.primary : theme.colors.muted || "#555566";
|
|
8594
8655
|
const textColor = c.highlight ? isHl ? theme.colors.primary || "#00f0ff" : theme.colors.muted || "#666677" : theme.colors.accent || "#38bdf8";
|
|
8595
|
-
doc.font("
|
|
8596
|
-
doc.font("
|
|
8656
|
+
doc.font(this.getPdfFont(theme, "code")).fontSize(9).fillColor(numColor).text(String(lineNum).padStart(2, " "), x + 10, lineY, { width: 22 });
|
|
8657
|
+
doc.font(this.getPdfFont(theme, "code")).fontSize(10).fillColor(textColor).text(line || " ", x + 36, lineY, { width: width - 48 });
|
|
8597
8658
|
});
|
|
8598
8659
|
return y + boxHeight;
|
|
8599
8660
|
}
|
|
@@ -8603,7 +8664,7 @@ var PdfRenderer = class {
|
|
|
8603
8664
|
const cardPad = 14;
|
|
8604
8665
|
let estHeight = cardPad * 2;
|
|
8605
8666
|
if (card.title) {
|
|
8606
|
-
doc.font("
|
|
8667
|
+
doc.font(this.getPdfFont(theme, "bold")).fontSize(15);
|
|
8607
8668
|
estHeight += doc.heightOfString(this.stripFormatting(card.title), { width: width - cardPad * 2 }) + 8;
|
|
8608
8669
|
}
|
|
8609
8670
|
if (card.elements) {
|
|
@@ -8611,8 +8672,10 @@ var PdfRenderer = class {
|
|
|
8611
8672
|
if (child.type === "metric")
|
|
8612
8673
|
estHeight += 95;
|
|
8613
8674
|
else if (child.type === "paragraph") {
|
|
8614
|
-
doc.font("
|
|
8615
|
-
estHeight += doc.heightOfString(this.stripFormatting(child.text), {
|
|
8675
|
+
doc.font(this.getPdfFont(theme, "regular")).fontSize(12);
|
|
8676
|
+
estHeight += doc.heightOfString(this.stripFormatting(child.text), {
|
|
8677
|
+
width: width - cardPad * 2
|
|
8678
|
+
}) + 8;
|
|
8616
8679
|
} else {
|
|
8617
8680
|
estHeight += 45;
|
|
8618
8681
|
}
|
|
@@ -8625,7 +8688,7 @@ var PdfRenderer = class {
|
|
|
8625
8688
|
doc.restore();
|
|
8626
8689
|
let renderTop = y + cardPad;
|
|
8627
8690
|
if (card.title) {
|
|
8628
|
-
doc.font("
|
|
8691
|
+
doc.font(this.getPdfFont(theme, "bold")).fontSize(15).fillColor(variantColor).text(this.stripFormatting(card.title), x + cardPad, renderTop, {
|
|
8629
8692
|
width: width - cardPad * 2
|
|
8630
8693
|
});
|
|
8631
8694
|
renderTop += doc.heightOfString(this.stripFormatting(card.title), { width: width - cardPad * 2 }) + 8;
|
|
@@ -8643,12 +8706,12 @@ var PdfRenderer = class {
|
|
|
8643
8706
|
const boxHeight = 85;
|
|
8644
8707
|
doc.roundedRect(x, y, width, boxHeight, 8).fill(theme.colors.surface || "rgba(255,255,255,0.06)");
|
|
8645
8708
|
doc.roundedRect(x, y, width, boxHeight, 8).lineWidth(1.5).strokeColor(variantColor).stroke();
|
|
8646
|
-
doc.font("
|
|
8709
|
+
doc.font(this.getPdfFont(theme, "bold")).fontSize(10).fillColor(theme.colors.muted || "#888888").text(m.label.toUpperCase(), x + 14, y + 12, { width: width - 28 });
|
|
8647
8710
|
const displayVal = m.unit ? `${m.value} ${m.unit}` : m.value;
|
|
8648
|
-
doc.font("
|
|
8711
|
+
doc.font(this.getPdfFont(theme, "bold")).fontSize(26).fillColor(variantColor).text(displayVal, x + 14, y + 28, { width: width - 28 });
|
|
8649
8712
|
if (m.change) {
|
|
8650
8713
|
const changeColor = m.change.startsWith("+") ? "#10b981" : "#ef4444";
|
|
8651
|
-
doc.font("
|
|
8714
|
+
doc.font(this.getPdfFont(theme, "bold")).fontSize(11).fillColor(changeColor).text(m.change, x + width - 85, y + 34, { width: 70, align: "right" });
|
|
8652
8715
|
}
|
|
8653
8716
|
return y + boxHeight;
|
|
8654
8717
|
}
|
|
@@ -8691,7 +8754,7 @@ var PdfRenderer = class {
|
|
|
8691
8754
|
if (headers.length > 0) {
|
|
8692
8755
|
doc.rect(x, curY, width, rowHeight).fill(theme.colors.primary);
|
|
8693
8756
|
headers.forEach((h, idx) => {
|
|
8694
|
-
doc.font("
|
|
8757
|
+
doc.font(this.getPdfFont(theme, "bold")).fontSize(12).fillColor("#ffffff").text(this.stripFormatting(h), x + idx * colWidth + 6, curY + 6, {
|
|
8695
8758
|
width: colWidth - 12
|
|
8696
8759
|
});
|
|
8697
8760
|
});
|
|
@@ -8702,7 +8765,7 @@ var PdfRenderer = class {
|
|
|
8702
8765
|
const rowBg = isEven ? theme.colors.surface || "rgba(255,255,255,0.04)" : "rgba(255,255,255,0.01)";
|
|
8703
8766
|
doc.rect(x, curY, width, rowHeight).fill(rowBg);
|
|
8704
8767
|
row.forEach((cell, idx) => {
|
|
8705
|
-
doc.font("
|
|
8768
|
+
doc.font(this.getPdfFont(theme, "regular")).fontSize(11).fillColor(theme.colors.text).text(this.stripFormatting(cell), x + idx * colWidth + 6, curY + 6, {
|
|
8706
8769
|
width: colWidth - 12
|
|
8707
8770
|
});
|
|
8708
8771
|
});
|
|
@@ -8715,11 +8778,12 @@ var PdfRenderer = class {
|
|
|
8715
8778
|
const b = element;
|
|
8716
8779
|
const variantColor = this.getVariantColor(b.variant, theme);
|
|
8717
8780
|
const text = this.stripFormatting(b.text).toUpperCase();
|
|
8718
|
-
const badgeW = Math.min(
|
|
8719
|
-
const badgeH =
|
|
8720
|
-
|
|
8721
|
-
doc.roundedRect(
|
|
8722
|
-
doc.
|
|
8781
|
+
const badgeW = Math.min(260, Math.max(70, text.length * 7.5 + 24));
|
|
8782
|
+
const badgeH = 24;
|
|
8783
|
+
const badgeX = width > 400 ? x + (width - badgeW) / 2 : x;
|
|
8784
|
+
doc.roundedRect(badgeX, y, badgeW, badgeH, 12).fill(theme.colors.surface || "rgba(255,255,255,0.08)");
|
|
8785
|
+
doc.roundedRect(badgeX, y, badgeW, badgeH, 12).lineWidth(1.2).strokeColor(variantColor).stroke();
|
|
8786
|
+
doc.font(this.getPdfFont(theme, "bold")).fontSize(9.5).fillColor(variantColor).text(text, badgeX, y + 6, { width: badgeW, align: "center" });
|
|
8723
8787
|
return y + badgeH + 6;
|
|
8724
8788
|
}
|
|
8725
8789
|
case "timeline": {
|
|
@@ -8737,19 +8801,19 @@ var PdfRenderer = class {
|
|
|
8737
8801
|
doc.circle(dotX, lineY, 6).fill(theme.colors.primary);
|
|
8738
8802
|
let curItemY = lineY + 12;
|
|
8739
8803
|
if (item.date) {
|
|
8740
|
-
doc.font("
|
|
8804
|
+
doc.font(this.getPdfFont(theme, "bold")).fontSize(10).fillColor(theme.colors.accent || theme.colors.primary).text(this.stripFormatting(item.date), itemX, curItemY, {
|
|
8741
8805
|
width: itemW,
|
|
8742
8806
|
align: "center"
|
|
8743
8807
|
});
|
|
8744
8808
|
curItemY += 14;
|
|
8745
8809
|
}
|
|
8746
|
-
doc.font("
|
|
8810
|
+
doc.font(this.getPdfFont(theme, "bold")).fontSize(12).fillColor(theme.colors.text).text(this.stripFormatting(item.title), itemX, curItemY, {
|
|
8747
8811
|
width: itemW,
|
|
8748
8812
|
align: "center"
|
|
8749
8813
|
});
|
|
8750
8814
|
curItemY += 16;
|
|
8751
8815
|
if (item.description) {
|
|
8752
|
-
doc.font("
|
|
8816
|
+
doc.font(this.getPdfFont(theme, "regular")).fontSize(9).fillColor(theme.colors.muted || "#888888").text(this.stripFormatting(item.description), itemX, curItemY, {
|
|
8753
8817
|
width: itemW,
|
|
8754
8818
|
align: "center"
|
|
8755
8819
|
});
|
|
@@ -8771,8 +8835,10 @@ var PdfRenderer = class {
|
|
|
8771
8835
|
if (el.type === "metric")
|
|
8772
8836
|
leftContentH += 95;
|
|
8773
8837
|
else if (el.type === "paragraph") {
|
|
8774
|
-
doc.font("
|
|
8775
|
-
leftContentH += doc.heightOfString(this.stripFormatting(el.text), {
|
|
8838
|
+
doc.font(this.getPdfFont(theme, "regular")).fontSize(12);
|
|
8839
|
+
leftContentH += doc.heightOfString(this.stripFormatting(el.text), {
|
|
8840
|
+
width: colW - pad * 2
|
|
8841
|
+
}) + 8;
|
|
8776
8842
|
} else if (el.type === "badge")
|
|
8777
8843
|
leftContentH += 32;
|
|
8778
8844
|
else
|
|
@@ -8785,8 +8851,10 @@ var PdfRenderer = class {
|
|
|
8785
8851
|
if (el.type === "metric")
|
|
8786
8852
|
rightContentH += 95;
|
|
8787
8853
|
else if (el.type === "paragraph") {
|
|
8788
|
-
doc.font("
|
|
8789
|
-
rightContentH += doc.heightOfString(this.stripFormatting(el.text), {
|
|
8854
|
+
doc.font(this.getPdfFont(theme, "regular")).fontSize(12);
|
|
8855
|
+
rightContentH += doc.heightOfString(this.stripFormatting(el.text), {
|
|
8856
|
+
width: colW - pad * 2
|
|
8857
|
+
}) + 8;
|
|
8790
8858
|
} else if (el.type === "badge")
|
|
8791
8859
|
rightContentH += 32;
|
|
8792
8860
|
else
|
|
@@ -8803,11 +8871,11 @@ var PdfRenderer = class {
|
|
|
8803
8871
|
const vsY = y + totalH / 2 - 12;
|
|
8804
8872
|
doc.roundedRect(vsX, vsY, 24, 24, 12).fill(theme.colors.surface || "#151522");
|
|
8805
8873
|
doc.roundedRect(vsX, vsY, 24, 24, 12).lineWidth(1).strokeColor(theme.colors.border || "rgba(255,255,255,0.2)").stroke();
|
|
8806
|
-
doc.font("
|
|
8874
|
+
doc.font(this.getPdfFont(theme, "bold")).fontSize(9).fillColor(theme.colors.muted || "#888888").text("VS", vsX, vsY + 7, { width: 24, align: "center" });
|
|
8807
8875
|
doc.restore();
|
|
8808
8876
|
let leftY = y + pad;
|
|
8809
8877
|
if (c.leftTitle) {
|
|
8810
|
-
doc.font("
|
|
8878
|
+
doc.font(this.getPdfFont(theme, "bold")).fontSize(14).fillColor(theme.colors.primary).text(this.stripFormatting(c.leftTitle), x + pad, leftY, { width: colW - pad * 2 });
|
|
8811
8879
|
leftY += 24;
|
|
8812
8880
|
}
|
|
8813
8881
|
for (const el of c.left) {
|
|
@@ -8815,7 +8883,9 @@ var PdfRenderer = class {
|
|
|
8815
8883
|
}
|
|
8816
8884
|
let rightY = y + pad;
|
|
8817
8885
|
if (c.rightTitle) {
|
|
8818
|
-
doc.font("
|
|
8886
|
+
doc.font(this.getPdfFont(theme, "bold")).fontSize(14).fillColor(theme.colors.primary).text(this.stripFormatting(c.rightTitle), rightX + pad, rightY, {
|
|
8887
|
+
width: colW - pad * 2
|
|
8888
|
+
});
|
|
8819
8889
|
rightY += 24;
|
|
8820
8890
|
}
|
|
8821
8891
|
for (const el of c.right) {
|
|
@@ -8830,7 +8900,7 @@ var PdfRenderer = class {
|
|
|
8830
8900
|
doc.roundedRect(x, y, width, boxH, 8).strokeColor(theme.colors.border || "rgba(255,255,255,0.1)").stroke();
|
|
8831
8901
|
let topY = y + 10;
|
|
8832
8902
|
if (ch.title) {
|
|
8833
|
-
doc.font("
|
|
8903
|
+
doc.font(this.getPdfFont(theme, "bold")).fontSize(13).fillColor(theme.colors.text).text(this.stripFormatting(ch.title), x + 14, topY, { width: width - 28 });
|
|
8834
8904
|
topY += 20;
|
|
8835
8905
|
}
|
|
8836
8906
|
const values = ch.series[0]?.values || [];
|
|
@@ -8842,9 +8912,9 @@ var PdfRenderer = class {
|
|
|
8842
8912
|
const h = val / maxVal * plotH;
|
|
8843
8913
|
const barY = topY + plotH - h;
|
|
8844
8914
|
doc.rect(barX, barY, barW, h).fill(theme.colors.primary);
|
|
8845
|
-
doc.font("
|
|
8915
|
+
doc.font(this.getPdfFont(theme, "regular")).fontSize(9).fillColor(theme.colors.text).text(String(val), barX, barY - 12, { width: barW, align: "center" });
|
|
8846
8916
|
if (ch.labels?.[idx]) {
|
|
8847
|
-
doc.font("
|
|
8917
|
+
doc.font(this.getPdfFont(theme, "regular")).fontSize(9).fillColor(theme.colors.muted || "#888888").text(this.stripFormatting(ch.labels[idx]), barX - 10, topY + plotH + 4, {
|
|
8848
8918
|
width: barW + 20,
|
|
8849
8919
|
align: "center"
|
|
8850
8920
|
});
|
|
@@ -8857,7 +8927,7 @@ var PdfRenderer = class {
|
|
|
8857
8927
|
const boxH = 90;
|
|
8858
8928
|
doc.roundedRect(x, y, width, boxH, 8).fill(theme.colors.surface || "rgba(255,255,255,0.04)");
|
|
8859
8929
|
doc.roundedRect(x, y, width, boxH, 8).strokeColor(theme.colors.primary).stroke();
|
|
8860
|
-
doc.font("
|
|
8930
|
+
doc.font(this.getPdfFont(theme, "code")).fontSize(11).fillColor(theme.colors.text).text(this.stripFormatting(m.code), x + 12, y + 12, { width: width - 24 });
|
|
8861
8931
|
return y + boxH + 8;
|
|
8862
8932
|
}
|
|
8863
8933
|
case "math": {
|
|
@@ -8866,7 +8936,7 @@ var PdfRenderer = class {
|
|
|
8866
8936
|
doc.roundedRect(x, y, width, boxH, 6).fill(theme.colors.surface || "rgba(255,255,255,0.06)");
|
|
8867
8937
|
doc.roundedRect(x, y, width, boxH, 6).lineWidth(1).strokeColor(theme.colors.border || theme.colors.primary).stroke();
|
|
8868
8938
|
doc.rect(x, y, 4, boxH).fill(theme.colors.primary);
|
|
8869
|
-
doc.font("
|
|
8939
|
+
doc.font(this.getPdfFont(theme, "italic")).fontSize(14).fillColor(theme.colors.text).text(this.stripFormatting(mathEl.expression), x + 16, y + 18, {
|
|
8870
8940
|
width: width - 32,
|
|
8871
8941
|
align: "center"
|
|
8872
8942
|
});
|
|
@@ -8881,16 +8951,16 @@ var PdfRenderer = class {
|
|
|
8881
8951
|
if (s.number !== void 0) {
|
|
8882
8952
|
const numStr = String(s.number);
|
|
8883
8953
|
doc.roundedRect(x + width / 2 - 40, curY, 80, 18, 9).fill(theme.colors.primary);
|
|
8884
|
-
doc.font("
|
|
8954
|
+
doc.font(this.getPdfFont(theme, "bold")).fontSize(9).fillColor("#000000").text(`SECTION ${numStr}`.toUpperCase(), x, curY + 4, { width, align: "center" });
|
|
8885
8955
|
curY += 28;
|
|
8886
8956
|
}
|
|
8887
|
-
doc.font("
|
|
8957
|
+
doc.font(this.getPdfFont(theme, "bold")).fontSize(22).fillColor(theme.colors.text).text(this.stripFormatting(s.title), x + 20, curY, {
|
|
8888
8958
|
width: width - 40,
|
|
8889
8959
|
align: "center"
|
|
8890
8960
|
});
|
|
8891
8961
|
curY += 28;
|
|
8892
8962
|
if (s.subtitle) {
|
|
8893
|
-
doc.font("
|
|
8963
|
+
doc.font(this.getPdfFont(theme, "regular")).fontSize(12).fillColor(theme.colors.muted || "#999999").text(this.stripFormatting(s.subtitle), x + 30, curY, {
|
|
8894
8964
|
width: width - 60,
|
|
8895
8965
|
align: "center"
|
|
8896
8966
|
});
|
|
@@ -8928,7 +8998,7 @@ var PdfRenderer = class {
|
|
|
8928
8998
|
}
|
|
8929
8999
|
let curY = y;
|
|
8930
9000
|
if (t.title) {
|
|
8931
|
-
doc.font("
|
|
9001
|
+
doc.font(this.getPdfFont(theme, "bold")).fontSize(18).fillColor(theme.colors.primary).text(this.stripFormatting(t.title), x, curY, { width });
|
|
8932
9002
|
curY += 26;
|
|
8933
9003
|
}
|
|
8934
9004
|
const itemH = 34;
|
|
@@ -8939,12 +9009,12 @@ var PdfRenderer = class {
|
|
|
8939
9009
|
doc.roundedRect(x, itemY, width, itemH, 6).fill(theme.colors.surface || "rgba(255,255,255,0.04)");
|
|
8940
9010
|
doc.roundedRect(x, itemY, width, itemH, 6).strokeColor(theme.colors.border || "rgba(255,255,255,0.1)").stroke();
|
|
8941
9011
|
doc.roundedRect(x + 10, itemY + 6, 22, 22, 4).fill(theme.colors.primary);
|
|
8942
|
-
doc.font("
|
|
8943
|
-
doc.font("
|
|
9012
|
+
doc.font(this.getPdfFont(theme, "bold")).fontSize(10).fillColor("#000000").text(num, x + 10, itemY + 11, { width: 22, align: "center" });
|
|
9013
|
+
doc.font(this.getPdfFont(theme, "bold")).fontSize(12).fillColor(theme.colors.text).text(this.stripFormatting(item.title), x + 40, itemY + (descText ? 5 : 10), {
|
|
8944
9014
|
width: width - 50
|
|
8945
9015
|
});
|
|
8946
9016
|
if (descText) {
|
|
8947
|
-
doc.font("
|
|
9017
|
+
doc.font(this.getPdfFont(theme, "regular")).fontSize(9).fillColor(theme.colors.muted || "#888888").text(this.stripFormatting(descText), x + 40, itemY + 19, {
|
|
8948
9018
|
width: width - 50
|
|
8949
9019
|
});
|
|
8950
9020
|
}
|
|
@@ -8954,7 +9024,7 @@ var PdfRenderer = class {
|
|
|
8954
9024
|
case "icon": {
|
|
8955
9025
|
const ic = element;
|
|
8956
9026
|
const iconText = `\u2605 ${ic.name.replace(/^[^:]+:/, "").toUpperCase()}`;
|
|
8957
|
-
doc.font("
|
|
9027
|
+
doc.font(this.getPdfFont(theme, "bold")).fontSize(11).fillColor(theme.colors.primary);
|
|
8958
9028
|
doc.text(iconText, x, y, { width: 120 });
|
|
8959
9029
|
return y + 20;
|
|
8960
9030
|
}
|
|
@@ -9053,7 +9123,7 @@ var PdfRenderer = class {
|
|
|
9053
9123
|
const gapY = isLR ? 25 : 35;
|
|
9054
9124
|
let titleOffset = 0;
|
|
9055
9125
|
if (diagram.title) {
|
|
9056
|
-
doc.font("
|
|
9126
|
+
doc.font(this.getPdfFont(theme, "bold")).fontSize(14).fillColor(theme.colors.primary).text(this.stripFormatting(diagram.title), x, y, { width, align: "center" });
|
|
9057
9127
|
titleOffset = 24;
|
|
9058
9128
|
}
|
|
9059
9129
|
const startY = y + titleOffset;
|
|
@@ -9107,7 +9177,13 @@ var PdfRenderer = class {
|
|
|
9107
9177
|
if (e.label) {
|
|
9108
9178
|
const midX = (x1 + x2) / 2;
|
|
9109
9179
|
const midY = (y1 + y2) / 2;
|
|
9110
|
-
|
|
9180
|
+
const labelText = this.stripFormatting(e.label);
|
|
9181
|
+
const labelW = Math.min(90, Math.max(45, labelText.length * 5.5 + 16));
|
|
9182
|
+
doc.save();
|
|
9183
|
+
doc.roundedRect(midX - labelW / 2, midY - 8, labelW, 16, 4).fill(theme.colors.surface || "#151522");
|
|
9184
|
+
doc.roundedRect(midX - labelW / 2, midY - 8, labelW, 16, 4).lineWidth(0.8).strokeColor(theme.colors.border || "#334155").stroke();
|
|
9185
|
+
doc.restore();
|
|
9186
|
+
doc.font(this.getPdfFont(theme, "bold")).fontSize(7.5).fillColor(theme.colors.muted || "#888888").text(labelText, midX - labelW / 2, midY - 5, { width: labelW, align: "center" });
|
|
9111
9187
|
}
|
|
9112
9188
|
});
|
|
9113
9189
|
diagram.nodes.forEach((n) => {
|
|
@@ -9128,7 +9204,7 @@ var PdfRenderer = class {
|
|
|
9128
9204
|
doc.roundedRect(p.x, p.y, nodeW, nodeH, 6).fill(theme.colors.surface || "#151522");
|
|
9129
9205
|
doc.roundedRect(p.x, p.y, nodeW, nodeH, 6).lineWidth(1.5).strokeColor(nodeColor).stroke();
|
|
9130
9206
|
doc.restore();
|
|
9131
|
-
doc.font("
|
|
9207
|
+
doc.font(this.getPdfFont(theme, "bold")).fontSize(9.5).fillColor(theme.colors.text).text(this.stripFormatting(n.label), p.x + 4, p.y + nodeH / 2 - 5, {
|
|
9132
9208
|
width: nodeW - 8,
|
|
9133
9209
|
align: "center"
|
|
9134
9210
|
});
|
|
@@ -9270,7 +9346,7 @@ function startDevServer(filePath, options = {}) {
|
|
|
9270
9346
|
// src/cli.ts
|
|
9271
9347
|
import { mkdirSync, readFileSync as readFileSync3, watch as fsWatch, writeFileSync } from "fs";
|
|
9272
9348
|
import { basename, dirname, extname, join, resolve as resolve2 } from "path";
|
|
9273
|
-
var VERSION = "0.1.
|
|
9349
|
+
var VERSION = "0.1.28";
|
|
9274
9350
|
function printHelp() {
|
|
9275
9351
|
return `
|
|
9276
9352
|
YumiaMD \u2014 Markdown-based presentation compiler (v${VERSION})
|
package/dist/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ 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.
|
|
12
|
+
declare const VERSION = "0.1.28";
|
|
13
13
|
declare function printHelp(): string;
|
|
14
14
|
declare function runCli(argv: string[]): Promise<{
|
|
15
15
|
exitCode: number;
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "yumiamd",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.28",
|
|
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/ast": "0.1.
|
|
25
|
-
"@yumiamd/layout": "0.1.
|
|
26
|
-
"@yumiamd/core": "0.1.
|
|
27
|
-
"@yumiamd/parser": "0.1.
|
|
28
|
-
"@yumiamd/renderer": "0.1.
|
|
29
|
-
"@yumiamd/renderer-html": "0.1.
|
|
30
|
-
"@yumiamd/renderer-
|
|
31
|
-
"@yumiamd/
|
|
32
|
-
"@yumiamd/
|
|
24
|
+
"@yumiamd/ast": "0.1.28",
|
|
25
|
+
"@yumiamd/layout": "0.1.28",
|
|
26
|
+
"@yumiamd/core": "0.1.28",
|
|
27
|
+
"@yumiamd/parser": "0.1.28",
|
|
28
|
+
"@yumiamd/renderer": "0.1.28",
|
|
29
|
+
"@yumiamd/renderer-html": "0.1.28",
|
|
30
|
+
"@yumiamd/renderer-pdf": "0.1.28",
|
|
31
|
+
"@yumiamd/renderer-pptx": "0.1.28",
|
|
32
|
+
"@yumiamd/theme": "0.1.28"
|
|
33
33
|
},
|
|
34
34
|
"keywords": [
|
|
35
35
|
"yumia",
|