yumiamd 0.1.4 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,172 @@
1
+ # YumiaMD (`yumiamd`)
2
+
3
+ > **A Markdown-based presentation language & compiler designed for humans and AI.**
4
+ > Author slide decks in clean Markdown and compile directly to **100% native, editable PowerPoint (.pptx)** presentations, vector PDFs, and interactive HTML5 slides.
5
+
6
+ [![npm version](https://img.shields.io/npm/v/yumiamd.svg?color=blue)](https://www.npmjs.com/package/yumiamd)
7
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/biagio-scaglia/Yumia-MD/blob/main/LICENSE)
8
+
9
+ ---
10
+
11
+ ## ⚡ Quick Start (Zero Install)
12
+
13
+ You can run YumiaMD immediately without installing anything via `npx`:
14
+
15
+ ```bash
16
+ # Initialize a starter presentation
17
+ npx yumiamd init my-deck
18
+
19
+ # Compile presentation directly to an editable PowerPoint (.pptx)
20
+ npx yumiamd build presentation.yumia.md --out presentation.pptx
21
+ ```
22
+
23
+ ---
24
+
25
+ ## 📦 Installation
26
+
27
+ ### Global CLI Installation
28
+
29
+ ```bash
30
+ npm install -g yumiamd
31
+ # or
32
+ pnpm add -g yumiamd
33
+ # or
34
+ yarn global add yumiamd
35
+ ```
36
+
37
+ ### Local Project Dependency
38
+
39
+ ```bash
40
+ npm install yumiamd
41
+ # or
42
+ pnpm add yumiamd
43
+ ```
44
+
45
+ ---
46
+
47
+ ## 🚀 CLI Commands & AI Tooling
48
+
49
+ Once installed globally or locally, the `yumia` / `yumiamd` commands are available in your terminal:
50
+
51
+ ```bash
52
+ # Initialize a new presentation template
53
+ yumia init my-presentation
54
+
55
+ # Validate markdown syntax and AST structure (supports --json for CI & AI agents)
56
+ yumia validate presentation.yumia.md --json
57
+
58
+ # Lint presentation for vertical overflow and layout issues
59
+ yumia lint presentation.yumia.md --json
60
+
61
+ # Inspect parsed AST and computed layout bounding boxes
62
+ yumia inspect presentation.yumia.md --layout
63
+
64
+ # Export machine-readable JSON schema for LLMs & AI prompt generation
65
+ yumia schema
66
+
67
+ # Compile to native editable PowerPoint (.pptx)
68
+ yumia build presentation.yumia.md --out dist/presentation.pptx
69
+ ```
70
+
71
+ ---
72
+
73
+ ## 📝 Syntax Example (`presentation.yumia.md`)
74
+
75
+ ```markdown
76
+ ---
77
+ title: System Architecture & Capabilities
78
+ theme: default
79
+ aspectRatio: '16:9'
80
+ author: Biagio Scaglia
81
+ ---
82
+
83
+ # High-Performance Presentation Engine
84
+
85
+ Deterministic compilation from Markdown directly to native PowerPoint slides.
86
+
87
+ :::notes
88
+ Opening slide introducing the core architectural vision.
89
+ :::
90
+
91
+ ---
92
+
93
+ # Architecture & Capabilities
94
+
95
+ :::columns ratios="50:50"
96
+
97
+ :::column
98
+ :::card Core Engine
99
+
100
+ - 100% Deterministic placement
101
+ - Zero runtime dependencies
102
+ - TypeScript-first architecture
103
+ :::
104
+ :::
105
+
106
+ :::column
107
+ :::card Native PowerPoint Export
108
+
109
+ - Headings, cards, shapes & notes
110
+ - Fully editable OpenXML objects
111
+ - Compatible with PowerPoint & Google Slides
112
+ :::
113
+ :::
114
+
115
+ :::
116
+
117
+ ---
118
+
119
+ # Feature Comparison
120
+
121
+ | Feature | YumiaMD | Legacy HTML Deck Tools |
122
+ | :----------------------- | :------------------------------- | :----------------------------------- |
123
+ | **Output Type** | Native OpenXML Shapes & Text | Flat rasterized images / screenshots |
124
+ | **Full Editability** | ✅ 100% Editable in PowerPoint | ❌ Read-only image slides |
125
+ | **Deterministic Layout** | ✅ Pixel-exact bounding boxes | ❌ Browser rendering variance |
126
+ | **AI / Agent Tooling** | ✅ Machine-readable schema & CLI | ❌ Complex DOM scraping |
127
+ ```
128
+
129
+ ---
130
+
131
+ ## 💻 JavaScript / TypeScript API
132
+
133
+ You can also use `yumiamd` programmatically inside your Node.js or TypeScript backend, CLI tools, and AI pipelines:
134
+
135
+ ```typescript
136
+ import { compile, parse, YumiaCompiler } from 'yumiamd';
137
+ import fs from 'node:fs';
138
+
139
+ const markdown = fs.readFileSync('presentation.yumia.md', 'utf-8');
140
+
141
+ // 1. Validate syntax and collect diagnostics
142
+ const compiler = new YumiaCompiler();
143
+ const validation = compiler.validate(markdown);
144
+ console.log(`Valid: ${validation.valid}, Slides: ${validation.slideCount}`);
145
+
146
+ // 2. Compile directly to PPTX buffer
147
+ const { buffer, errors } = await compile(markdown, { format: 'pptx' });
148
+
149
+ if (errors.length === 0) {
150
+ fs.writeFileSync('output.pptx', buffer);
151
+ console.log('✅ Presentation generated successfully!');
152
+ }
153
+
154
+ // 3. Export JSON schema for LLM generation
155
+ const schema = compiler.getSchema();
156
+ ```
157
+
158
+ ---
159
+
160
+ ## ✨ Key Features
161
+
162
+ - 🎯 **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.
163
+ - 📊 **Native Tables & Multicolumn**: Full support for Markdown tables and semantic responsive multi-column layouts with customizable ratio splits (`ratios="50:50"` or `"30:70"`).
164
+ - 📐 **Deterministic Layout Engine**: Exact coordinate calculations for stack, columns, cards, and automatic overflow detection.
165
+ - 🎨 **Semantic Design Tokens**: Built-in themes with typography scales, color palettes, and contrast-safe themes.
166
+ - 🤖 **AI-Friendly Format**: Clean Markdown syntax designed for LLM prompts and agentic workflows, complete with `yumia schema` and `--json` CLI diagnostics.
167
+
168
+ ---
169
+
170
+ ## 📄 License
171
+
172
+ MIT © [Biagio Scaglia](https://github.com/biagio-scaglia)
package/dist/bin.d.ts CHANGED
@@ -1,3 +1 @@
1
1
  #!/usr/bin/env node
2
- export {};
3
- //# sourceMappingURL=bin.d.ts.map
package/dist/bin.js CHANGED
@@ -1,13 +1,15 @@
1
1
  #!/usr/bin/env node
2
- import { runCli } from './cli.js';
3
- const result = await runCli(process.argv);
2
+ import {
3
+ runCli
4
+ } from "./chunk-FHM6V4JH.js";
5
+
6
+ // src/bin.ts
7
+ var result = await runCli(process.argv);
4
8
  if (result.output) {
5
- if (result.exitCode === 0) {
6
- console.log(result.output);
7
- }
8
- else {
9
- console.error(result.output);
10
- }
9
+ if (result.exitCode === 0) {
10
+ console.log(result.output);
11
+ } else {
12
+ console.error(result.output);
13
+ }
11
14
  }
12
15
  process.exit(result.exitCode);
13
- //# sourceMappingURL=bin.js.map