yumiamd 0.1.16 → 0.1.18
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/README.md +32 -9
- package/dist/bin.js +1 -1
- package/dist/{chunk-UPUEFJLX.js → chunk-SP4B4UF7.js} +115 -7
- package/dist/index.d.ts +1 -1
- package/dist/index.js +9 -3
- package/package.json +10 -10
package/README.md
CHANGED
|
@@ -16,6 +16,9 @@ You can run YumiaMD immediately without installing anything via `npx`:
|
|
|
16
16
|
# Initialize a starter presentation
|
|
17
17
|
npx yumiamd init my-deck
|
|
18
18
|
|
|
19
|
+
# Launch instant dev server with live-reload
|
|
20
|
+
npx yumiamd dev presentation.yumia.md --open
|
|
21
|
+
|
|
19
22
|
# Compile presentation directly to an editable PowerPoint (.pptx)
|
|
20
23
|
npx yumiamd build presentation.yumia.md --out presentation.pptx
|
|
21
24
|
```
|
|
@@ -64,6 +67,9 @@ yumia build presentation.yumia.md --format pdf --out dist/presentation.pdf
|
|
|
64
67
|
# Compile to standalone interactive HTML5 presentation deck (.html)
|
|
65
68
|
yumia build presentation.yumia.md --format html --out dist/presentation.html
|
|
66
69
|
|
|
70
|
+
# Deploy presentation deck (static, GitHub Pages, or Vercel)
|
|
71
|
+
yumia deploy presentation.yumia.md --provider gh-pages --out public
|
|
72
|
+
|
|
67
73
|
# Watch presentation file and recompile automatically on save
|
|
68
74
|
yumia watch presentation.yumia.md --format pdf
|
|
69
75
|
|
|
@@ -96,6 +102,9 @@ author: Biagio Scaglia
|
|
|
96
102
|
|
|
97
103
|
Deterministic compilation from Markdown directly to native PowerPoint slides.
|
|
98
104
|
|
|
105
|
+
:::badge text="v0.1.15" variant="primary" :::
|
|
106
|
+
:::badge text="Multi-Target" variant="success" :::
|
|
107
|
+
|
|
99
108
|
:::notes
|
|
100
109
|
Opening slide introducing the core architectural vision.
|
|
101
110
|
:::
|
|
@@ -128,14 +137,26 @@ Opening slide introducing the core architectural vision.
|
|
|
128
137
|
|
|
129
138
|
---
|
|
130
139
|
|
|
131
|
-
#
|
|
140
|
+
# Native Charts & Data Visuals
|
|
141
|
+
|
|
142
|
+
:::chart type="bar" title="Execution Speed" labels="Parser, Layout, PDF, PPTX" data="1200, 850, 430, 680"
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
# Roadmap Timeline
|
|
147
|
+
|
|
148
|
+
:::timeline layout="horizontal"
|
|
149
|
+
|
|
150
|
+
- [Phase 1] AST & Compiler Core
|
|
151
|
+
- [Phase 2] Multi-Format Renderers
|
|
152
|
+
- [Phase 3] Rich Directives & Charts
|
|
153
|
+
- [Phase 4] Cloud Deployments
|
|
154
|
+
:::
|
|
155
|
+
|
|
156
|
+
:::step
|
|
132
157
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
| **Output Type** | Native OpenXML Shapes & Text | Flat rasterized images / screenshots |
|
|
136
|
-
| **Full Editability** | ✅ 100% Editable in PowerPoint | ❌ Read-only image slides |
|
|
137
|
-
| **Deterministic Layout** | ✅ Pixel-exact bounding boxes | ❌ Browser rendering variance |
|
|
138
|
-
| **AI / Agent Tooling** | ✅ Machine-readable schema & CLI | ❌ Complex DOM scraping |
|
|
158
|
+
- 🚀 Seamless deployment via `yumia deploy`
|
|
159
|
+
:::
|
|
139
160
|
```
|
|
140
161
|
|
|
141
162
|
---
|
|
@@ -171,8 +192,10 @@ const schema = compiler.getSchema();
|
|
|
171
192
|
|
|
172
193
|
## ✨ Key Features
|
|
173
194
|
|
|
174
|
-
- 🎯 **Native Object Principle**: Slides compiled to PowerPoint are **NOT** rasterized screenshot images. Headings, bullet points, cards, tables, and speaker notes are generated as **100% native vector PowerPoint shapes, tables & textboxes** that you can click, re-format, and edit in Microsoft PowerPoint or Google Slides.
|
|
175
|
-
- 📊 **Native
|
|
195
|
+
- 🎯 **Native Object Principle**: Slides compiled to PowerPoint are **NOT** rasterized screenshot images. Headings, bullet points, cards, tables, charts, badges, and speaker notes are generated as **100% native vector PowerPoint shapes, tables & textboxes** that you can click, re-format, and edit in Microsoft PowerPoint or Google Slides.
|
|
196
|
+
- 📊 **Native Charts & Diagrams**: Full support for `:::chart` (bar, line, pie, doughnut) and `:::mermaid` diagrams across HTML, PDF, and PowerPoint.
|
|
197
|
+
- ⏳ **Timelines, Compare & Steps**: Rich layout directives including `:::timeline`, `:::compare`, and click-to-reveal `:::step` animations.
|
|
198
|
+
- 🚀 **One-Command Cloud Deploy**: Instantly deploy decks to GitHub Pages, Vercel, or static web servers with `yumia deploy`.
|
|
176
199
|
- 📐 **Deterministic Layout Engine**: Exact coordinate calculations for stack, columns, cards, and automatic overflow detection.
|
|
177
200
|
- 🎨 **Semantic Design Tokens**: Built-in themes with typography scales, color palettes, and contrast-safe themes.
|
|
178
201
|
- 🤖 **AI-Friendly Format**: Clean Markdown syntax designed for LLM prompts and agentic workflows, complete with `yumia schema` and `--json` CLI diagnostics.
|
package/dist/bin.js
CHANGED
|
@@ -475,7 +475,9 @@ var DefaultYumiaParser = class {
|
|
|
475
475
|
let closed = false;
|
|
476
476
|
while (i < lines.length) {
|
|
477
477
|
const innerLine = lines[i]?.trim() ?? "";
|
|
478
|
-
const
|
|
478
|
+
const isInlineClosed = innerLine.startsWith(":::") && innerLine.endsWith(":::") && innerLine.length > 5;
|
|
479
|
+
const isSeparator = innerLine === ":::vs" || innerLine.startsWith(":::vs ");
|
|
480
|
+
const isSingleLine = isInlineClosed || isSeparator || innerLine.startsWith(":::metric") || innerLine.startsWith(":::layout") || innerLine.startsWith(":::badge") && (innerLine.includes("text=") || innerLine.includes("variant=")) || innerLine.startsWith(":::chart") && innerLine.includes("data=");
|
|
479
481
|
if (innerLine.startsWith(":::") && innerLine.length > 3 && !isSingleLine) {
|
|
480
482
|
nestedCount++;
|
|
481
483
|
} else if (innerLine === ":::") {
|
|
@@ -695,7 +697,9 @@ var DefaultYumiaParser = class {
|
|
|
695
697
|
let nestedCount = 1;
|
|
696
698
|
while (i < lines.length) {
|
|
697
699
|
const innerLine = lines[i]?.trim() ?? "";
|
|
698
|
-
const
|
|
700
|
+
const isInlineClosed = innerLine.startsWith(":::") && innerLine.endsWith(":::") && innerLine.length > 5;
|
|
701
|
+
const isSeparator = innerLine === ":::vs" || innerLine.startsWith(":::vs ");
|
|
702
|
+
const isSingleLine = isInlineClosed || isSeparator || innerLine.startsWith(":::metric") || innerLine.startsWith(":::layout") || innerLine.startsWith(":::badge") && (innerLine.includes("text=") || innerLine.includes("variant=")) || innerLine.startsWith(":::chart") && innerLine.includes("data=");
|
|
699
703
|
if (innerLine.startsWith(":::") && innerLine.length > 3 && !isSingleLine) {
|
|
700
704
|
nestedCount++;
|
|
701
705
|
} else if (innerLine === ":::") {
|
|
@@ -2096,6 +2100,30 @@ var YumiaCompiler = class {
|
|
|
2096
2100
|
directives: {
|
|
2097
2101
|
type: "object",
|
|
2098
2102
|
properties: {
|
|
2103
|
+
chart: {
|
|
2104
|
+
syntax: ':::chart type="bar|line|pie|doughnut" title="..." labels="..." data="..."',
|
|
2105
|
+
description: "Native editable chart for PowerPoint, PDF vector paths, and interactive SVG"
|
|
2106
|
+
},
|
|
2107
|
+
mermaid: {
|
|
2108
|
+
syntax: ":::mermaid\\ngraph LR\\n A --> B\\n:::",
|
|
2109
|
+
description: "Flowcharts, sequence diagrams, and architecture maps via Mermaid"
|
|
2110
|
+
},
|
|
2111
|
+
timeline: {
|
|
2112
|
+
syntax: ':::timeline [layout="horizontal|vertical"]\\n- [Date] Title: Description\\n:::',
|
|
2113
|
+
description: "Roadmap and milestone timeline nodes with connector lines"
|
|
2114
|
+
},
|
|
2115
|
+
compare: {
|
|
2116
|
+
syntax: ':::compare left="Left Title" right="Right Title"\\n- Left Item\\n:::vs\\n- Right Item\\n:::',
|
|
2117
|
+
description: "Side-by-side comparison boxes with versus badge"
|
|
2118
|
+
},
|
|
2119
|
+
badge: {
|
|
2120
|
+
syntax: ':::badge text="..." [variant="primary|success|warning|danger|info|accent"] :::',
|
|
2121
|
+
description: "Compact inline status pill element"
|
|
2122
|
+
},
|
|
2123
|
+
step: {
|
|
2124
|
+
syntax: ":::step\\nProgressive reveal content\\n:::",
|
|
2125
|
+
description: "Click-to-reveal fragment step animation"
|
|
2126
|
+
},
|
|
2099
2127
|
columns: {
|
|
2100
2128
|
syntax: ':::columns [ratios="50:50"]\\n:::column\\n...\\n:::\\n:::',
|
|
2101
2129
|
description: "Multi-column grid layout"
|
|
@@ -2126,6 +2154,16 @@ var YumiaCompiler = class {
|
|
|
2126
2154
|
};
|
|
2127
2155
|
}
|
|
2128
2156
|
};
|
|
2157
|
+
var defaultCompiler = new YumiaCompiler();
|
|
2158
|
+
function parse(source, options) {
|
|
2159
|
+
return defaultCompiler.parse(source, options);
|
|
2160
|
+
}
|
|
2161
|
+
function validate(source) {
|
|
2162
|
+
return defaultCompiler.validate(source);
|
|
2163
|
+
}
|
|
2164
|
+
function lint(sourceOrPresentation, options) {
|
|
2165
|
+
return defaultCompiler.lint(sourceOrPresentation, options);
|
|
2166
|
+
}
|
|
2129
2167
|
|
|
2130
2168
|
// ../renderer-pptx/dist/renderer.js
|
|
2131
2169
|
import pptxgen from "pptxgenjs";
|
|
@@ -2919,10 +2957,42 @@ var HtmlRenderer = class {
|
|
|
2919
2957
|
<title>${this.escapeHtml(title)}</title>
|
|
2920
2958
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
2921
2959
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
2922
|
-
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;600&family=Outfit:wght@600;700;800&display=swap" rel="stylesheet">
|
|
2923
2960
|
<script type="module">
|
|
2924
2961
|
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.esm.min.mjs';
|
|
2925
|
-
|
|
2962
|
+
try {
|
|
2963
|
+
mermaid.initialize({
|
|
2964
|
+
startOnLoad: false,
|
|
2965
|
+
theme: 'dark',
|
|
2966
|
+
securityLevel: 'loose',
|
|
2967
|
+
themeVariables: {
|
|
2968
|
+
darkMode: true,
|
|
2969
|
+
background: '${theme.colors.background}',
|
|
2970
|
+
primaryColor: '${theme.colors.primary}',
|
|
2971
|
+
primaryTextColor: '#ffffff',
|
|
2972
|
+
primaryBorderColor: '${theme.colors.primary}',
|
|
2973
|
+
lineColor: '${theme.colors.accent || theme.colors.primary}',
|
|
2974
|
+
secondaryColor: '${theme.colors.surface}',
|
|
2975
|
+
tertiaryColor: '${theme.colors.surface}'
|
|
2976
|
+
}
|
|
2977
|
+
});
|
|
2978
|
+
window.mermaid = mermaid;
|
|
2979
|
+
window.renderMermaidInSlide = async function(slideEl) {
|
|
2980
|
+
if (!slideEl || !window.mermaid) return;
|
|
2981
|
+
const nodes = Array.from(slideEl.querySelectorAll('.mermaid:not([data-processed="true"])'));
|
|
2982
|
+
if (nodes.length > 0) {
|
|
2983
|
+
try {
|
|
2984
|
+
await window.mermaid.run({ nodes: nodes });
|
|
2985
|
+
} catch (e) {
|
|
2986
|
+
console.warn('Mermaid render notice:', e);
|
|
2987
|
+
}
|
|
2988
|
+
}
|
|
2989
|
+
};
|
|
2990
|
+
// Auto-render visible slide if present
|
|
2991
|
+
const cur = document.querySelector('.yumia-slide-wrapper.active');
|
|
2992
|
+
if (cur) window.renderMermaidInSlide(cur);
|
|
2993
|
+
} catch (err) {
|
|
2994
|
+
console.warn('Mermaid load notice:', err);
|
|
2995
|
+
}
|
|
2926
2996
|
</script>
|
|
2927
2997
|
<style>
|
|
2928
2998
|
:root {
|
|
@@ -3449,14 +3519,36 @@ var HtmlRenderer = class {
|
|
|
3449
3519
|
/* Mermaid Container */
|
|
3450
3520
|
.mermaid-container {
|
|
3451
3521
|
background: rgba(10, 10, 18, 0.6);
|
|
3452
|
-
border:
|
|
3522
|
+
border: 1.5px solid var(--yumia-border);
|
|
3453
3523
|
border-radius: var(--yumia-radius-card);
|
|
3454
|
-
padding:
|
|
3524
|
+
padding: 1.5rem;
|
|
3455
3525
|
margin: 1rem 0;
|
|
3456
3526
|
display: flex;
|
|
3457
3527
|
justify-content: center;
|
|
3528
|
+
align-items: center;
|
|
3458
3529
|
overflow: auto;
|
|
3459
3530
|
width: 100%;
|
|
3531
|
+
min-height: 240px;
|
|
3532
|
+
}
|
|
3533
|
+
|
|
3534
|
+
.mermaid-container pre.mermaid,
|
|
3535
|
+
.mermaid-container .mermaid {
|
|
3536
|
+
background: transparent !important;
|
|
3537
|
+
border: none !important;
|
|
3538
|
+
padding: 0 !important;
|
|
3539
|
+
margin: 0 !important;
|
|
3540
|
+
font-size: 1rem;
|
|
3541
|
+
color: #fff;
|
|
3542
|
+
display: flex;
|
|
3543
|
+
justify-content: center;
|
|
3544
|
+
align-items: center;
|
|
3545
|
+
width: 100%;
|
|
3546
|
+
}
|
|
3547
|
+
|
|
3548
|
+
.mermaid-container svg {
|
|
3549
|
+
max-width: 100%;
|
|
3550
|
+
height: auto;
|
|
3551
|
+
max-height: 420px;
|
|
3460
3552
|
}
|
|
3461
3553
|
|
|
3462
3554
|
/* Progressive Reveal (Step Builds) */
|
|
@@ -3783,6 +3875,12 @@ var HtmlRenderer = class {
|
|
|
3783
3875
|
if (broadcast && syncChannel) {
|
|
3784
3876
|
syncChannel.postMessage({ index: currentIdx });
|
|
3785
3877
|
}
|
|
3878
|
+
|
|
3879
|
+
setTimeout(() => {
|
|
3880
|
+
if (window.renderMermaidInSlide && slides[currentIdx]) {
|
|
3881
|
+
window.renderMermaidInSlide(slides[currentIdx]);
|
|
3882
|
+
}
|
|
3883
|
+
}, 50);
|
|
3786
3884
|
}
|
|
3787
3885
|
|
|
3788
3886
|
function openSpeakerWindow() {
|
|
@@ -3887,6 +3985,13 @@ var HtmlRenderer = class {
|
|
|
3887
3985
|
const rawNotes = slides[currentIdx].getAttribute('data-notes');
|
|
3888
3986
|
notesBox.innerHTML = rawNotes ? rawNotes : '<em style="color:var(--yumia-muted);">No notes provided for this slide.</em>';
|
|
3889
3987
|
}
|
|
3988
|
+
|
|
3989
|
+
setTimeout(() => {
|
|
3990
|
+
if (window.renderMermaidInSlide) {
|
|
3991
|
+
if (curBox) window.renderMermaidInSlide(curBox);
|
|
3992
|
+
if (nextBox) window.renderMermaidInSlide(nextBox);
|
|
3993
|
+
}
|
|
3994
|
+
}, 50);
|
|
3890
3995
|
}
|
|
3891
3996
|
|
|
3892
3997
|
window.addEventListener('keydown', (e) => {
|
|
@@ -4753,7 +4858,7 @@ function startDevServer(filePath, options = {}) {
|
|
|
4753
4858
|
// src/cli.ts
|
|
4754
4859
|
import { mkdirSync, readFileSync as readFileSync2, watch as fsWatch, writeFileSync } from "fs";
|
|
4755
4860
|
import { basename, dirname, extname, join, resolve as resolve2 } from "path";
|
|
4756
|
-
var VERSION = "0.1.
|
|
4861
|
+
var VERSION = "0.1.18";
|
|
4757
4862
|
function printHelp() {
|
|
4758
4863
|
return `
|
|
4759
4864
|
YumiaMD \u2014 Markdown-based presentation compiler (v${VERSION})
|
|
@@ -5306,6 +5411,9 @@ export {
|
|
|
5306
5411
|
createTheme,
|
|
5307
5412
|
YumiaLinter,
|
|
5308
5413
|
YumiaCompiler,
|
|
5414
|
+
parse,
|
|
5415
|
+
validate,
|
|
5416
|
+
lint,
|
|
5309
5417
|
cleanFontFace,
|
|
5310
5418
|
parseInlineMarkdown,
|
|
5311
5419
|
PptxRenderer,
|
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.18";
|
|
13
13
|
declare function printHelp(): string;
|
|
14
14
|
declare function runCli(argv: string[]): Promise<{
|
|
15
15
|
exitCode: number;
|
package/dist/index.js
CHANGED
|
@@ -36,15 +36,18 @@ import {
|
|
|
36
36
|
createTimeline,
|
|
37
37
|
cyberpunkTheme,
|
|
38
38
|
defaultTheme,
|
|
39
|
+
lint,
|
|
39
40
|
minimalTheme,
|
|
41
|
+
parse,
|
|
40
42
|
parseInlineMarkdown,
|
|
41
43
|
parseYumia,
|
|
42
44
|
printHelp,
|
|
43
45
|
resolveTheme,
|
|
44
46
|
runCli,
|
|
45
47
|
startDevServer,
|
|
46
|
-
terminalTheme
|
|
47
|
-
|
|
48
|
+
terminalTheme,
|
|
49
|
+
validate
|
|
50
|
+
} from "./chunk-SP4B4UF7.js";
|
|
48
51
|
export {
|
|
49
52
|
DEFAULT_VIEWPORT,
|
|
50
53
|
DefaultLayoutEngine,
|
|
@@ -83,12 +86,15 @@ export {
|
|
|
83
86
|
createTimeline,
|
|
84
87
|
cyberpunkTheme,
|
|
85
88
|
defaultTheme,
|
|
89
|
+
lint,
|
|
86
90
|
minimalTheme,
|
|
91
|
+
parse,
|
|
87
92
|
parseInlineMarkdown,
|
|
88
93
|
parseYumia,
|
|
89
94
|
printHelp,
|
|
90
95
|
resolveTheme,
|
|
91
96
|
runCli,
|
|
92
97
|
startDevServer,
|
|
93
|
-
terminalTheme
|
|
98
|
+
terminalTheme,
|
|
99
|
+
validate
|
|
94
100
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "yumiamd",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.18",
|
|
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/
|
|
25
|
-
"@yumiamd/renderer": "0.1.
|
|
26
|
-
"@yumiamd/
|
|
27
|
-
"@yumiamd/
|
|
28
|
-
"@yumiamd/
|
|
29
|
-
"@yumiamd/renderer-html": "0.1.
|
|
30
|
-
"@yumiamd/
|
|
31
|
-
"@yumiamd/
|
|
32
|
-
"@yumiamd/renderer-pdf": "0.1.
|
|
24
|
+
"@yumiamd/ast": "0.1.18",
|
|
25
|
+
"@yumiamd/renderer": "0.1.18",
|
|
26
|
+
"@yumiamd/layout": "0.1.18",
|
|
27
|
+
"@yumiamd/core": "0.1.18",
|
|
28
|
+
"@yumiamd/theme": "0.1.18",
|
|
29
|
+
"@yumiamd/renderer-html": "0.1.18",
|
|
30
|
+
"@yumiamd/parser": "0.1.18",
|
|
31
|
+
"@yumiamd/renderer-pptx": "0.1.18",
|
|
32
|
+
"@yumiamd/renderer-pdf": "0.1.18"
|
|
33
33
|
},
|
|
34
34
|
"keywords": [
|
|
35
35
|
"yumia",
|