lumina-slides 9.0.5 โ†’ 9.0.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.
Files changed (38) hide show
  1. package/README.md +63 -0
  2. package/dist/lumina-slides.js +21750 -19334
  3. package/dist/lumina-slides.umd.cjs +223 -223
  4. package/dist/style.css +1 -1
  5. package/package.json +1 -1
  6. package/src/components/LandingPage.vue +1 -1
  7. package/src/components/LuminaDeck.vue +237 -232
  8. package/src/components/base/LuminaElement.vue +2 -0
  9. package/src/components/layouts/LayoutFeatures.vue +125 -123
  10. package/src/components/layouts/LayoutFlex.vue +212 -212
  11. package/src/components/layouts/LayoutStatement.vue +5 -2
  12. package/src/components/layouts/LayoutSteps.vue +110 -108
  13. package/src/components/parts/FlexHtml.vue +65 -65
  14. package/src/components/parts/FlexImage.vue +81 -81
  15. package/src/components/site/SiteDocs.vue +3313 -3314
  16. package/src/components/site/SiteExamples.vue +66 -66
  17. package/src/components/studio/EditorLayoutChart.vue +18 -0
  18. package/src/components/studio/EditorLayoutCustom.vue +18 -0
  19. package/src/components/studio/EditorLayoutVideo.vue +18 -0
  20. package/src/components/studio/LuminaStudioEmbed.vue +68 -0
  21. package/src/components/studio/StudioEmbedRoot.vue +19 -0
  22. package/src/components/studio/StudioInspector.vue +1113 -7
  23. package/src/components/studio/StudioJsonEditor.vue +10 -3
  24. package/src/components/studio/StudioSettings.vue +658 -7
  25. package/src/components/studio/StudioToolbar.vue +26 -7
  26. package/src/composables/useElementState.ts +12 -1
  27. package/src/composables/useFlexLayout.ts +128 -128
  28. package/src/core/Lumina.ts +174 -113
  29. package/src/core/animationConfig.ts +10 -0
  30. package/src/core/elementController.ts +18 -0
  31. package/src/core/elementResolver.ts +4 -2
  32. package/src/core/schema.ts +503 -503
  33. package/src/core/store.ts +465 -465
  34. package/src/core/types.ts +26 -11
  35. package/src/index.ts +2 -2
  36. package/src/utils/prepareDeckForExport.ts +47 -0
  37. package/src/utils/templateInterpolation.ts +52 -52
  38. package/src/views/DeckView.vue +313 -313
package/README.md CHANGED
@@ -20,6 +20,7 @@
20
20
  <p>
21
21
  <a href="#-quick-start"><strong>๐Ÿš€ Quick Start</strong></a> ยท
22
22
  <a href="#-layouts--gallery"><strong>๐ŸŽจ Layout Gallery</strong></a> ยท
23
+ <a href="#-studio"><strong>๐Ÿ–ผ๏ธ Studio</strong></a> ยท
23
24
  <a href="AGENTS.md"><strong>๐Ÿค– Agent Guide</strong></a>
24
25
  </p>
25
26
 
@@ -62,6 +63,67 @@ Lumina includes **7 built-in layouts** ready to use. Just set the `type` propert
62
63
 
63
64
  > [!TIP] > **See the Code**: Click on the dropdowns below to see the exact JSON used to generate these slides.
64
65
 
66
+ ---
67
+
68
+ ## ๐Ÿ–ผ๏ธ Studio
69
+
70
+ Build decks visually with the built-in **Studio**: edit slides in the inspector, tweak content and styles, then export or copy the JSON. Ideal for prototyping and editing AI-generated decks.
71
+
72
+ <div align="center">
73
+
74
+ <img src="public/studio.gif" alt="Lumina Studio" 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);" />
75
+
76
+ </div>
77
+
78
+ ### How to use Studio
79
+
80
+ Install the package, mount Lumina with **Studio** enabled on a DOM node, and optionally pass an `initialDeck`. Listen for the `save` event to get the edited deck when the user saves.
81
+
82
+ ```bash
83
+ npm install lumina-slides
84
+ ```
85
+
86
+ ```typescript
87
+ import { Lumina } from "lumina-slides";
88
+ import "lumina-slides/style.css";
89
+
90
+ const initialDeck = {
91
+ meta: { title: "My Presentation" },
92
+ slides: [
93
+ { type: "statement", title: "Welcome", subtitle: "Edit in Studio." },
94
+ {
95
+ type: "features",
96
+ title: "Features",
97
+ features: [
98
+ { title: "One", description: "First feature" },
99
+ { title: "Two", description: "Second feature" },
100
+ ],
101
+ },
102
+ ],
103
+ };
104
+
105
+ const engine = new Lumina("#app", {
106
+ studioEmbed: true,
107
+ initialDeck, // omit to start from an empty deck
108
+ });
109
+
110
+ engine.on("save", (deck) => {
111
+ // Persist to your backend, download as JSON, or load elsewhere
112
+ console.log("Deck saved:", deck);
113
+ });
114
+ ```
115
+
116
+ | Option | Description |
117
+ | :----- | :---------- |
118
+ | `studioEmbed: true` | Renders the Studio UI (inspector, toolbar) next to the deck. |
119
+ | `initialDeck` | Optional. Deck object `{ meta, slides }` to load on init. Omit for an empty deck. |
120
+
121
+ When the user clicks **Save** in Studio, Lumina emits `save` with the full deck object.
122
+
123
+ > [!TIP] **Try Studio online**: Run the docs app with Studio enabled or open the [Studio route](https://lumina-slides.web.app/#/studio) to use the visual editor in the browser.
124
+
125
+ ---
126
+
65
127
  <details>
66
128
  <summary><b>Example: Timeline JSON</b></summary>
67
129
 
@@ -197,6 +259,7 @@ Lumina includes a built-in normalizer. Your LLM can output "lazy" JSON to save m
197
259
  | ๐Ÿ“ **[LLM System Prompt](https://lumina-slides.web.app/lumina-llm-prompt.txt)** | Ready-to-use system prompt for your AI to generate slides |
198
260
  | ๐Ÿค– **[Custom GPT Agent](https://chatgpt.com/g/g-6951593015fc8191bf8db3ff13ebe986-lumina-slides-agent)** | Specialized ChatGPT agent to build and preview slides instantly |
199
261
  | ๐ŸŽฎ **[Live Playground](https://lumina-slides.web.app/#/playground)** | Try Lumina in your browser with live JSON editing |
262
+ | ๐Ÿ–ผ๏ธ **[Studio](https://lumina-slides.web.app/#/studio)** | Visual page builder: edit slides in the inspector and export JSON |
200
263
 
201
264
  ---
202
265