lumina-slides 8.0.0
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 +133 -0
- package/dist/api-docs.json +4469 -0
- package/dist/deck.json +93 -0
- package/dist/layout-features.json +72 -0
- package/dist/layout-half.json +52 -0
- package/dist/layout-statement.json +33 -0
- package/dist/layout-steps.json +37 -0
- package/dist/layout-timeline.json +37 -0
- package/dist/lumina-slides.js +2776 -0
- package/dist/lumina-slides.umd.cjs +15 -0
- package/dist/style.css +1 -0
- package/package.json +54 -0
package/README.md
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# Lumina Engine
|
|
2
|
+
|
|
3
|
+
<div align="center">
|
|
4
|
+
<br />
|
|
5
|
+
<p>
|
|
6
|
+
<b>The Declarative Presentation Engine for the Modern Web</b>
|
|
7
|
+
</p>
|
|
8
|
+
<p>
|
|
9
|
+
Create cinematic, timeline-driven presentations using simple JSON and the full power of Vue 3 + GSAP.
|
|
10
|
+
</p>
|
|
11
|
+
<br />
|
|
12
|
+
</div>
|
|
13
|
+
|
|
14
|
+
**Lumina Engine** is a high-performance, drop-in library that turns declarative JSON definitions into GPU-accelerated, interactive slide decks. It is designed for developers who want to build immersive storytelling experiences without getting bogged down in animation logic.
|
|
15
|
+
|
|
16
|
+
## ✨ Features
|
|
17
|
+
|
|
18
|
+
- **� Declarative First**: Define your entire deck structure, content, and flow in a single JSON object.
|
|
19
|
+
- **🚀 Performance Core**: Built on Vue 3's Composition API for reactivity and GSAP for buttery smooth standard-compliant animations.
|
|
20
|
+
- **🎨 Cinematic Layouts**: Comes with 5+ responsive, production-ready layouts (`statement`, `timeline`, `features`, `half`, `steps`).
|
|
21
|
+
- **🛡️ Type Safe**: Written in 100% strict TypeScript.
|
|
22
|
+
- **🔌 Event Driven**: Hook into every slide change, interaction, and state update with a robust event system.
|
|
23
|
+
- **� Theming API**: Runtime CSS variable generation for instant branding (Dark/Light mode ready).
|
|
24
|
+
|
|
25
|
+
## 📦 Installation
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npm install lumina-slides gsap
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## ⚡ Quick Start
|
|
32
|
+
|
|
33
|
+
### 1. Initialize the Engine
|
|
34
|
+
|
|
35
|
+
Mount the engine to any DOM element.
|
|
36
|
+
|
|
37
|
+
```typescript
|
|
38
|
+
import { Lumina } from "lumina-slides";
|
|
39
|
+
import "lumina-slides/style.css";
|
|
40
|
+
|
|
41
|
+
const engine = new Lumina("#app", {
|
|
42
|
+
theme: {
|
|
43
|
+
colors: { primary: "#6366f1" }, // Customize your brand color
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### 2. Load Your Deck
|
|
49
|
+
|
|
50
|
+
Pass your declarative JSON structure to the `load` method.
|
|
51
|
+
|
|
52
|
+
```typescript
|
|
53
|
+
engine.load({
|
|
54
|
+
meta: { title: "Project Roadmap" },
|
|
55
|
+
slides: [
|
|
56
|
+
{
|
|
57
|
+
type: "statement",
|
|
58
|
+
title: "Welcome to Lumina",
|
|
59
|
+
subtitle: "Declarative presentations for the web.",
|
|
60
|
+
meta: { orbColor: "#4f46e5" },
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
type: "timeline",
|
|
64
|
+
title: "History",
|
|
65
|
+
timeline: [
|
|
66
|
+
{ date: "2023", title: "Inception", description: "Project started." },
|
|
67
|
+
{ date: "2024", title: "Launch", description: "v1.0 Release." },
|
|
68
|
+
],
|
|
69
|
+
},
|
|
70
|
+
],
|
|
71
|
+
});
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## 🧩 Built-in Layouts
|
|
75
|
+
|
|
76
|
+
Lumina comes with a set of "Pro" layouts out of the box. Just specify the `type` property in your slide object.
|
|
77
|
+
|
|
78
|
+
| Type | Description | Key Props |
|
|
79
|
+
| :-------------- | :--------------------------------------------------------- | :--------------------------------- |
|
|
80
|
+
| **`statement`** | High-impact text focus. Perfect for covers and quotes. | `title`, `subtitle`, `tag` |
|
|
81
|
+
| **`half`** | Split layout with image on one side, content on the other. | `image`, `imageSide`, `paragraphs` |
|
|
82
|
+
| **`features`** | Responsive grid of cards with icons. | `features` (array of cards) |
|
|
83
|
+
| **`timeline`** | Vertical interactive chronological list. | `timeline` (array of events) |
|
|
84
|
+
| **`steps`** | Sequential process steps with numbers. | `steps` (array of steps) |
|
|
85
|
+
|
|
86
|
+
## 📚 API Reference
|
|
87
|
+
|
|
88
|
+
### `engine.on(event, callback)`
|
|
89
|
+
|
|
90
|
+
Listen to engine events to build custom navigational controls or analytics.
|
|
91
|
+
|
|
92
|
+
```typescript
|
|
93
|
+
// Slide Change Event
|
|
94
|
+
engine.on("slideChange", (payload) => {
|
|
95
|
+
console.log(`Current Slide Index: ${payload.index}`);
|
|
96
|
+
console.log("Active Slide Data:", payload.slide);
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
// User Actions (Buttons, Links)
|
|
100
|
+
engine.on("action", (payload) => {
|
|
101
|
+
if (payload.type === "cta-click") {
|
|
102
|
+
window.open(payload.value, "_blank");
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### Configuration Options
|
|
108
|
+
|
|
109
|
+
Pass these to the constructor `new Lumina(selector, options)`.
|
|
110
|
+
|
|
111
|
+
```typescript
|
|
112
|
+
interface LuminaOptions {
|
|
113
|
+
/** Enable infinite looping of slides */
|
|
114
|
+
loop?: boolean;
|
|
115
|
+
/** Enable keyboard arrow navigation */
|
|
116
|
+
keyboard?: boolean;
|
|
117
|
+
/** UI Visibility Settings */
|
|
118
|
+
ui?: {
|
|
119
|
+
showProgressBar?: boolean;
|
|
120
|
+
showControls?: boolean;
|
|
121
|
+
showSlideCount?: boolean;
|
|
122
|
+
};
|
|
123
|
+
/** Animation Tunings */
|
|
124
|
+
animation?: {
|
|
125
|
+
stagger?: number; // Time between element entries
|
|
126
|
+
durationIn?: number; // Slide entry speed
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
## 📄 License
|
|
132
|
+
|
|
133
|
+
MIT
|