lumina-slides 8.3.0 → 8.4.2
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/LICENSE +9 -0
- package/README.md +132 -102
- package/dist/lumina-slides.js +15939 -6617
- package/dist/lumina-slides.umd.cjs +36 -19
- package/dist/style.css +1 -1
- package/package.json +41 -8
package/LICENSE
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Juan Pablo Paillet
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,161 +1,191 @@
|
|
|
1
1
|
# Lumina Engine
|
|
2
2
|
|
|
3
3
|
<div align="center">
|
|
4
|
-
<br />
|
|
5
|
-
<p>
|
|
6
|
-
<b>The Interface Layer for the Agentic Era</b>
|
|
7
|
-
</p>
|
|
8
|
-
The first presentation engine designed for <b>LLMs</b>. Turn JSON into cinematic, interactive experiences.
|
|
9
|
-
</p>
|
|
10
|
-
<br />
|
|
11
4
|
|
|
12
|
-
<img src="https://raw.githubusercontent.com/PailletJuanPablo/lumina-slides/main/public/demo.gif" alt="Lumina Engine Demo" width="100%" style="border-radius:
|
|
5
|
+
<img src="https://raw.githubusercontent.com/PailletJuanPablo/lumina-slides/main/public/demo.gif" alt="Lumina Engine Demo" width="100%" style="border-radius: 12px; border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 20px 80px -20px rgba(0,0,0,0.5);" />
|
|
13
6
|
|
|
14
7
|
<br />
|
|
15
|
-
|
|
8
|
+
<br />
|
|
16
9
|
|
|
17
|
-
|
|
10
|
+
<h1>JSON-Driven Presentation Engine</h1>
|
|
11
|
+
|
|
12
|
+
<p style="font-size: 1.2em; max-width: 700px;">
|
|
13
|
+
A lightweight, framework-agnostic library that renders beautiful, animated slide decks from simple JSON.
|
|
14
|
+
Perfect for AI-generated content, dynamic dashboards, and interactive presentations.
|
|
15
|
+
</p>
|
|
16
|
+
|
|
17
|
+
<p style="font-size: 1em; max-width: 600px; opacity: 0.8;">
|
|
18
|
+
✨ <b>60fps animations</b> · 🎨 <b>6 built-in themes</b> · 📱 <b>Responsive</b> · ⚡ <b>Zero dependencies UI</b>
|
|
19
|
+
</p>
|
|
18
20
|
|
|
19
|
-
>
|
|
20
|
-
|
|
21
|
+
<p>
|
|
22
|
+
<a href="#-quick-start"><strong>🚀 Quick Start</strong></a> ·
|
|
23
|
+
<a href="#-layouts--gallery"><strong>🎨 Layout Gallery</strong></a> ·
|
|
24
|
+
<a href="AGENTS.md"><strong>🤖 Agent Guide</strong></a>
|
|
25
|
+
</p>
|
|
21
26
|
|
|
22
|
-
|
|
27
|
+
[](https://www.npmjs.com/package/lumina-slides)
|
|
28
|
+
[](https://www.npmjs.com/package/lumina-slides)
|
|
29
|
+
[](https://github.com/PailletJuanPablo/lumina-slides/blob/main/LICENSE)
|
|
30
|
+
[](https://www.typescriptlang.org/)
|
|
23
31
|
|
|
24
|
-
|
|
32
|
+
</div>
|
|
25
33
|
|
|
26
|
-
|
|
27
|
-
- **Hallucination Proof**: The renderer handles the "how", the LLM only cares about the "what".
|
|
28
|
-
- **Zero Config**: No build steps or bundler configuration needed to generate visual content dynamically.
|
|
34
|
+
<br />
|
|
29
35
|
|
|
30
|
-
|
|
36
|
+
---
|
|
31
37
|
|
|
32
|
-
|
|
33
|
-
- **⚡ Reactive & Performant**: Built on Vue 3 + GSAP for 60fps animations even on mobile.
|
|
34
|
-
- **🎨 Cinematic Layouts**: "Pro" layouts (`timeline`, `statement`, `features`) that look good by default.
|
|
35
|
-
- **🛡️ Type Safe**: Full TypeScript support with exported types for your AI system prompts.
|
|
36
|
-
- **🔌 Event Driven**: Hook into every user interaction to feed state back to your agent.
|
|
38
|
+
## 🎨 Layouts & Gallery
|
|
37
39
|
|
|
38
|
-
|
|
40
|
+
Lumina includes **7 built-in layouts** ready to use. Just set the `type` property in your JSON:
|
|
39
41
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
42
|
+
| Layout | Description | Visual Preview |
|
|
43
|
+
| :------------ | :---------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------ |
|
|
44
|
+
| **Statement** | Bold title slides for introductions, transitions, or key messages. Supports title, subtitle, and background. <br><br> `type: "statement"` | <img src="https://pailletjuanpablo.github.io/lumina-slides/layout-statement.png" width="200" style="border-radius: 6px;"> |
|
|
45
|
+
| **Features** | Auto-grid layout for showcasing features, benefits, or stats. Adapts columns based on item count. <br><br> `type: "features"` | <img src="https://pailletjuanpablo.github.io/lumina-slides/layout-features.png" width="200" style="border-radius: 6px;"> |
|
|
46
|
+
| **Timeline** | Horizontal timeline with snap navigation. Great for roadmaps, history, or process flows. <br><br> `type: "timeline"` | <img src="https://pailletjuanpablo.github.io/lumina-slides/layout-timeline.png" width="200" style="border-radius: 6px;"> |
|
|
47
|
+
| **Steps** | Numbered step-by-step guide. Perfect for tutorials, instructions, or procedures. <br><br> `type: "steps"` | <img src="https://pailletjuanpablo.github.io/lumina-slides/layout-steps.png" width="200" style="border-radius: 6px;"> |
|
|
48
|
+
| **Half** | Split layout with image on one side, content on the other. Fully responsive. <br><br> `type: "half"` | <img src="https://pailletjuanpablo.github.io/lumina-slides/layout-half.png" width="200" style="border-radius: 6px;"> |
|
|
49
|
+
| **Chart** | Data visualization with Chart.js. Supports bar, line, pie, and doughnut charts. <br><br> `type: "chart"` | <img src="https://pailletjuanpablo.github.io/lumina-slides/layout-chart.png" width="200" style="border-radius: 6px;"> |
|
|
50
|
+
| **Flex** | Declarative auto-layout system. Define structure with rows, columns, and nested containers. <br><br> `type: "flex"` | <img src="https://pailletjuanpablo.github.io/lumina-slides/layout-flex-demo.png" width="200" style="border-radius: 6px;"> |
|
|
43
51
|
|
|
44
|
-
|
|
52
|
+
> [!TIP] > **Embedded Mode**: All layouts can be rendered in compact containers (dashboards, widgets) by using the `compact: true` option.
|
|
45
53
|
|
|
46
|
-
|
|
54
|
+
> [!TIP] > **See the Code**: Click on the dropdowns below to see the exact JSON used to generate these slides.
|
|
47
55
|
|
|
48
|
-
|
|
56
|
+
<details>
|
|
57
|
+
<summary><b>Example: Timeline JSON</b></summary>
|
|
49
58
|
|
|
50
59
|
```json
|
|
51
60
|
{
|
|
52
|
-
"
|
|
53
|
-
"
|
|
61
|
+
"type": "timeline",
|
|
62
|
+
"title": "Project History",
|
|
63
|
+
"timeline": [
|
|
54
64
|
{
|
|
55
|
-
"
|
|
56
|
-
"title": "
|
|
57
|
-
"
|
|
58
|
-
"meta": { "variant": "gradient" }
|
|
65
|
+
"date": "2023",
|
|
66
|
+
"title": "Inception",
|
|
67
|
+
"description": "The idea is born."
|
|
59
68
|
},
|
|
60
69
|
{
|
|
61
|
-
"
|
|
62
|
-
"title": "
|
|
63
|
-
"
|
|
64
|
-
{
|
|
65
|
-
"title": "Growth",
|
|
66
|
-
"description": "+145% YoY",
|
|
67
|
-
"icon": "trending-up"
|
|
68
|
-
},
|
|
69
|
-
{ "title": "Retention", "description": "98% Renewal", "icon": "users" }
|
|
70
|
-
]
|
|
70
|
+
"date": "2024",
|
|
71
|
+
"title": "Launch",
|
|
72
|
+
"description": "First public release."
|
|
71
73
|
}
|
|
72
74
|
]
|
|
73
75
|
}
|
|
74
76
|
```
|
|
75
77
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
You pass that JSON directly to Lumina.
|
|
79
|
-
|
|
80
|
-
```typescript
|
|
81
|
-
import { Lumina } from "lumina-slides";
|
|
82
|
-
import "lumina-slides/style.css";
|
|
83
|
-
|
|
84
|
-
// Works in Vanilla JS, React, Angular, Svelte, etc.
|
|
85
|
-
// No Vue installation required.
|
|
86
|
-
const engine = new Lumina("#app", {
|
|
87
|
-
theme: "dark",
|
|
88
|
-
});
|
|
78
|
+
</details>
|
|
89
79
|
|
|
90
|
-
|
|
91
|
-
|
|
80
|
+
<details>
|
|
81
|
+
<summary><b>Example: Chart JSON</b></summary>
|
|
92
82
|
|
|
93
|
-
|
|
83
|
+
```json
|
|
84
|
+
{
|
|
85
|
+
"type": "chart",
|
|
86
|
+
"chartType": "bar",
|
|
87
|
+
"title": "Quarterly Revenue",
|
|
88
|
+
"data": {
|
|
89
|
+
"labels": ["Q1", "Q2", "Q3", "Q4"],
|
|
90
|
+
"datasets": [
|
|
91
|
+
{ "label": "Revenue", "values": [120, 150, 180, 220], "color": "c:p" }
|
|
92
|
+
]
|
|
93
|
+
}
|
|
94
|
+
}
|
|
94
95
|
```
|
|
95
96
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
Lumina provides semantic layout types that LLMs can easily select based on context.
|
|
97
|
+
</details>
|
|
99
98
|
|
|
100
|
-
|
|
99
|
+
---
|
|
101
100
|
|
|
102
|
-
|
|
101
|
+
## 🎭 Theming
|
|
103
102
|
|
|
104
|
-
|
|
105
|
-
[View JSON Source](https://github.com/PailletJuanPablo/lumina-slides/blob/main/public/layout-statement.json)
|
|
103
|
+
Lumina includes **6 beautiful theme presets** out-of-the-box. Just pass the name:
|
|
106
104
|
|
|
107
|
-
|
|
105
|
+
```typescript
|
|
106
|
+
const engine = new Lumina("#app", { theme: "ocean" });
|
|
107
|
+
```
|
|
108
108
|
|
|
109
|
-
|
|
109
|
+
| Theme | Description | Preview |
|
|
110
|
+
| :----------- | :---------------------------------- | :---------------------------------------------------------------------------------------------------------------------- |
|
|
111
|
+
| **default** | Clean blue on dark. Professional. | <img src="https://pailletjuanpablo.github.io/lumina-slides/theme-default.png" width="180" style="border-radius: 6px;"> |
|
|
112
|
+
| **ocean** | Cyan on slate. Calm and focused. | <img src="https://pailletjuanpablo.github.io/lumina-slides/theme-ocean.png" width="180" style="border-radius: 6px;"> |
|
|
113
|
+
| **midnight** | Indigo on black. Bold and dramatic. | <img src="https://pailletjuanpablo.github.io/lumina-slides/theme-midnight.png" width="180" style="border-radius: 6px;"> |
|
|
114
|
+
| **forest** | Emerald greens. Natural and fresh. | <img src="https://pailletjuanpablo.github.io/lumina-slides/theme-forest.png" width="180" style="border-radius: 6px;"> |
|
|
115
|
+
| **cyber** | Neon pink. Sci-fi futuristic. | <img src="https://pailletjuanpablo.github.io/lumina-slides/theme-cyber.png" width="180" style="border-radius: 6px;"> |
|
|
116
|
+
| **latte** | Light mode. Warm amber on cream. | <img src="https://pailletjuanpablo.github.io/lumina-slides/theme-latte.png" width="180" style="border-radius: 6px;"> |
|
|
110
117
|
|
|
111
|
-
|
|
112
|
-
[View JSON Source](https://github.com/PailletJuanPablo/lumina-slides/blob/main/public/layout-half.json)
|
|
118
|
+
---
|
|
113
119
|
|
|
114
|
-
|
|
120
|
+
## ⚡ Quick Start
|
|
115
121
|
|
|
116
|
-
|
|
122
|
+
### 1. Install
|
|
117
123
|
|
|
118
|
-
|
|
119
|
-
|
|
124
|
+
```bash
|
|
125
|
+
npm install lumina-slides
|
|
126
|
+
```
|
|
120
127
|
|
|
121
|
-
###
|
|
128
|
+
### 2. Implementation
|
|
122
129
|
|
|
123
|
-
|
|
130
|
+
Lumina is a **Framework Agnostic** class. It mounts to any DOM node.
|
|
124
131
|
|
|
125
|
-
|
|
126
|
-
|
|
132
|
+
```typescript
|
|
133
|
+
import { Lumina } from "lumina-slides";
|
|
134
|
+
import "lumina-slides/style.css";
|
|
127
135
|
|
|
128
|
-
|
|
136
|
+
const engine = new Lumina("#app", {
|
|
137
|
+
theme: "dark",
|
|
138
|
+
loop: true,
|
|
139
|
+
});
|
|
129
140
|
|
|
130
|
-
|
|
141
|
+
// Load Data (From your API, or static)
|
|
142
|
+
engine.load({
|
|
143
|
+
meta: { title: "Demo Deck" },
|
|
144
|
+
slides: [
|
|
145
|
+
{ type: "statement", title: "Hello World", subtitle: "Powered by Lumina" },
|
|
146
|
+
],
|
|
147
|
+
});
|
|
148
|
+
```
|
|
131
149
|
|
|
132
|
-
|
|
133
|
-
[View JSON Source](https://github.com/PailletJuanPablo/lumina-slides/blob/main/public/layout-steps.json)
|
|
150
|
+
---
|
|
134
151
|
|
|
135
|
-
|
|
152
|
+
## 🤖 Building Agents?
|
|
136
153
|
|
|
137
|
-
|
|
154
|
+
We have a dedicated guide for that.
|
|
138
155
|
|
|
139
|
-
[![
|
|
140
|
-
|
|
156
|
+
> [!IMPORTANT] > **Read the [Agent Integration Guide](./AGENTS.md)**
|
|
157
|
+
>
|
|
158
|
+
> Learn about:
|
|
159
|
+
>
|
|
160
|
+
> - **Streaming**: How to pipe token streams directly into the engine.
|
|
161
|
+
> - **Aliases**: Improve latency by 30% using `t` instead of `title`.
|
|
162
|
+
> - **Feedback Loops**: How to let the AI know what the user is clicking.
|
|
141
163
|
|
|
142
|
-
|
|
164
|
+
### Token Optimization
|
|
143
165
|
|
|
144
|
-
|
|
166
|
+
Lumina includes a built-in normalizer. Your LLM can output "lazy" JSON to save money.
|
|
145
167
|
|
|
146
|
-
|
|
168
|
+
| Concept | Standard | Short Alias |
|
|
169
|
+
| :------------- | :----------- | :---------- |
|
|
170
|
+
| **Header** | `title` | `t` |
|
|
171
|
+
| **Sub-Header** | `subtitle` | `s` |
|
|
172
|
+
| **Picture** | `image` | `img` |
|
|
173
|
+
| **Background** | `background` | `bg` |
|
|
147
174
|
|
|
148
|
-
|
|
175
|
+
---
|
|
149
176
|
|
|
150
|
-
|
|
177
|
+
## 📚 Documentation & Resources
|
|
151
178
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
179
|
+
| Resource | Description |
|
|
180
|
+
| :-------------------------------------------------------------------------------------- | :--------------------------------------------------------------- |
|
|
181
|
+
| 📖 **[Full Documentation](https://pailletjuanpablo.github.io/lumina-slides/)** | Complete guides, examples, and live playground |
|
|
182
|
+
| 🔧 **[API Reference](https://pailletjuanpablo.github.io/lumina-slides/#/api)** | TypeDoc-generated API docs with all methods and types |
|
|
183
|
+
| 🤖 **[Agent Integration Guide](./AGENTS.md)** | How to integrate Lumina with AI agents (OpenAI, Anthropic, etc.) |
|
|
184
|
+
| 📝 **[LLM System Prompt](https://pailletjuanpablo.github.io/lumina-slides/prompt.txt)** | Ready-to-use system prompt for your AI to generate slides |
|
|
185
|
+
| 🎮 **[Live Playground](https://pailletjuanpablo.github.io/lumina-slides/#/playground)** | Try Lumina in your browser with live JSON editing |
|
|
158
186
|
|
|
159
|
-
|
|
187
|
+
---
|
|
160
188
|
|
|
161
|
-
|
|
189
|
+
<div align="center">
|
|
190
|
+
<p>Built with ❤️ by <a href="https://pailletjp.com">Juan Pablo Paillet</a>.</p>
|
|
191
|
+
</div>
|