yumiamd 0.1.5 → 0.1.7

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  # YumiaMD (`yumiamd`)
2
2
 
3
3
  > **A Markdown-based presentation language & compiler designed for humans and AI.**
4
- > Author decks in clean Markdown and compile directly to **100% native, editable PowerPoint (.pptx)** presentations, vector PDFs, and interactive HTML5 slides.
4
+ > Author slide decks in clean Markdown and compile directly to **100% native, editable PowerPoint (.pptx)** presentations, vector PDFs, and interactive HTML5 slides.
5
5
 
6
6
  [![npm version](https://img.shields.io/npm/v/yumiamd.svg?color=blue)](https://www.npmjs.com/package/yumiamd)
7
7
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/biagio-scaglia/Yumia-MD/blob/main/LICENSE)
@@ -10,13 +10,13 @@
10
10
 
11
11
  ## ⚡ Quick Start (Zero Install)
12
12
 
13
- You can run YumiaMD immediately without installing anything:
13
+ You can run YumiaMD immediately without installing anything via `npx`:
14
14
 
15
15
  ```bash
16
16
  # Initialize a starter presentation
17
17
  npx yumiamd init my-deck
18
18
 
19
- # Compile presentation to an editable PowerPoint (.pptx)
19
+ # Compile presentation directly to an editable PowerPoint (.pptx)
20
20
  npx yumiamd build presentation.yumia.md --out presentation.pptx
21
21
  ```
22
22
 
@@ -44,7 +44,7 @@ pnpm add yumiamd
44
44
 
45
45
  ---
46
46
 
47
- ## 🚀 CLI Commands
47
+ ## 🚀 CLI Commands & AI Tooling
48
48
 
49
49
  Once installed globally or locally, the `yumia` / `yumiamd` commands are available in your terminal:
50
50
 
@@ -52,16 +52,19 @@ Once installed globally or locally, the `yumia` / `yumiamd` commands are availab
52
52
  # Initialize a new presentation template
53
53
  yumia init my-presentation
54
54
 
55
- # Validate markdown syntax and AST structure
56
- yumia validate presentation.yumia.md
55
+ # Validate markdown syntax and AST structure (supports --json for CI & AI agents)
56
+ yumia validate presentation.yumia.md --json
57
57
 
58
58
  # Lint presentation for vertical overflow and layout issues
59
- yumia lint presentation.yumia.md
59
+ yumia lint presentation.yumia.md --json
60
60
 
61
61
  # Inspect parsed AST and computed layout bounding boxes
62
62
  yumia inspect presentation.yumia.md --layout
63
63
 
64
- # Compile to PowerPoint (.pptx)
64
+ # Export machine-readable JSON schema for LLMs & AI prompt generation
65
+ yumia schema
66
+
67
+ # Compile to native editable PowerPoint (.pptx)
65
68
  yumia build presentation.yumia.md --out dist/presentation.pptx
66
69
  ```
67
70
 
@@ -71,8 +74,9 @@ yumia build presentation.yumia.md --out dist/presentation.pptx
71
74
 
72
75
  ```markdown
73
76
  ---
74
- title: System Architecture & Workflow
77
+ title: System Architecture & Capabilities
75
78
  theme: default
79
+ aspectRatio: '16:9'
76
80
  author: Biagio Scaglia
77
81
  ---
78
82
 
@@ -109,37 +113,57 @@ Opening slide introducing the core architectural vision.
109
113
  :::
110
114
 
111
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 |
112
127
  ```
113
128
 
114
129
  ---
115
130
 
116
131
  ## 💻 JavaScript / TypeScript API
117
132
 
118
- You can also use `yumiamd` programmatically inside your Node.js or TypeScript backend / tools:
133
+ You can also use `yumiamd` programmatically inside your Node.js or TypeScript backend, CLI tools, and AI pipelines:
119
134
 
120
135
  ```typescript
121
- import { compile, parse, layoutEngine } from 'yumiamd';
136
+ import { compile, parse, YumiaCompiler } from 'yumiamd';
122
137
  import fs from 'node:fs';
123
138
 
124
139
  const markdown = fs.readFileSync('presentation.yumia.md', 'utf-8');
125
140
 
126
- // 1. Compile directly to PPTX buffer / file
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
127
147
  const { buffer, errors } = await compile(markdown, { format: 'pptx' });
128
148
 
129
149
  if (errors.length === 0) {
130
150
  fs.writeFileSync('output.pptx', buffer);
131
151
  console.log('✅ Presentation generated successfully!');
132
152
  }
153
+
154
+ // 3. Export JSON schema for LLM generation
155
+ const schema = compiler.getSchema();
133
156
  ```
134
157
 
135
158
  ---
136
159
 
137
160
  ## ✨ Key Features
138
161
 
139
- - 🎯 **Native Object Principle**: Slides compiled to PowerPoint are **NOT** rasterized screenshot images. Headings, bullet points, cards, and speaker notes are generated as **100% native vector PowerPoint shapes & textboxes** that you can click, re-format, and edit in Microsoft PowerPoint or Google Slides.
140
- - 📐 **Deterministic Layout Engine**: Semantic multi-column grids, flex cards, and auto-spacing.
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.
141
165
  - 🎨 **Semantic Design Tokens**: Built-in themes with typography scales, color palettes, and contrast-safe themes.
142
- - 🤖 **AI-Friendly Format**: Clean Markdown syntax designed for LLM prompts and agentic workflows.
166
+ - 🤖 **AI-Friendly Format**: Clean Markdown syntax designed for LLM prompts and agentic workflows, complete with `yumia schema` and `--json` CLI diagnostics.
143
167
 
144
168
  ---
145
169
 
package/dist/bin.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  runCli
4
- } from "./chunk-MKQASLAK.js";
4
+ } from "./chunk-GMIVPFBA.js";
5
5
 
6
6
  // src/bin.ts
7
7
  var result = await runCli(process.argv);