md-slides 1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Deepankar Rawat
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,219 @@
1
+ # @dprrwt/slides
2
+
3
+ > Convert Markdown to beautiful presentation slides. Zero config, developer-friendly.
4
+
5
+ Write your presentation in **Markdown**, present it in the **browser**, deploy it anywhere as **static HTML**.
6
+
7
+ ## ✨ Features
8
+
9
+ - **Markdown-first** — Write slides in your editor, not a GUI
10
+ - **4 built-in themes** — Dark, Light, Minimal, Neon
11
+ - **Live preview** — Hot reload as you edit
12
+ - **Keyboard navigation** — Arrow keys, vim keys, touch/swipe
13
+ - **Speaker notes** — Hidden notes with toggle (press `S`)
14
+ - **Code highlighting** — Syntax highlighting for 190+ languages
15
+ - **Smart layouts** — Auto-detects title slides, code slides, quote slides
16
+ - **Responsive** — Scales to any screen, including mobile
17
+ - **Zero dependencies at runtime** — Output is a single HTML file
18
+ - **Frontmatter** — Set title, author, theme per file
19
+
20
+ ## 📦 Install
21
+
22
+ ```bash
23
+ npm install -g @dprrwt/slides
24
+ ```
25
+
26
+ Or use directly:
27
+
28
+ ```bash
29
+ npx @dprrwt/slides init my-talk
30
+ ```
31
+
32
+ ## 🚀 Quick Start
33
+
34
+ ```bash
35
+ # Create a new presentation
36
+ slides init my-talk
37
+
38
+ # Enter the directory
39
+ cd my-talk
40
+
41
+ # Start live preview
42
+ slides preview
43
+
44
+ # Build static HTML
45
+ slides build
46
+ ```
47
+
48
+ ## 📝 Writing Slides
49
+
50
+ Separate slides with `---` on its own line:
51
+
52
+ ```markdown
53
+ ---
54
+ title: My Talk
55
+ author: Your Name
56
+ theme: dark
57
+ ---
58
+
59
+ # Hello World
60
+
61
+ Welcome to my presentation.
62
+
63
+ ---
64
+
65
+ ## Agenda
66
+
67
+ - First topic
68
+ - Second topic
69
+ - Third topic
70
+
71
+ ---
72
+
73
+ ## Code Example
74
+
75
+ \```javascript
76
+ const greeting = "Hello, slides!";
77
+ console.log(greeting);
78
+ \```
79
+
80
+ ---
81
+
82
+ > "Great quote goes here."
83
+
84
+ ---
85
+
86
+ # Thank You! 🎉
87
+ ```
88
+
89
+ ### Frontmatter
90
+
91
+ Set metadata at the top of your file:
92
+
93
+ ```yaml
94
+ ---
95
+ title: My Presentation
96
+ author: Your Name
97
+ theme: dark
98
+ ---
99
+ ```
100
+
101
+ ### Speaker Notes
102
+
103
+ Add hidden notes with HTML comments:
104
+
105
+ ```markdown
106
+ ## My Slide
107
+
108
+ Content here.
109
+
110
+ <!-- notes: Remember to mention the demo. -->
111
+ ```
112
+
113
+ Press `S` during presentation to toggle notes.
114
+
115
+ ### Slide Directives
116
+
117
+ Control individual slides with comments:
118
+
119
+ ```markdown
120
+ <!-- class: custom-class -->
121
+ <!-- background: #1a1a2e -->
122
+ <!-- layout: center -->
123
+
124
+ # Centered Slide
125
+ ```
126
+
127
+ ## ⌨️ Keyboard Shortcuts
128
+
129
+ | Key | Action |
130
+ |-----|--------|
131
+ | `→` `↓` `Space` `L` `J` | Next slide |
132
+ | `←` `↑` `H` `K` | Previous slide |
133
+ | `Home` | First slide |
134
+ | `End` | Last slide |
135
+ | `S` or `N` | Toggle speaker notes |
136
+ | `F` | Toggle fullscreen |
137
+ | `Esc` | Close notes |
138
+
139
+ Touch: swipe left/right on mobile.
140
+
141
+ Click: right half → next, left half → previous.
142
+
143
+ ## 🎨 Themes
144
+
145
+ | Theme | Description |
146
+ |-------|-------------|
147
+ | `dark` | Deep purple-black with violet accents (default) |
148
+ | `light` | Clean Apple-inspired with blue accents |
149
+ | `minimal` | Serif typography, understated elegance |
150
+ | `neon` | Pure black with electric green highlights |
151
+
152
+ Set via frontmatter (`theme: neon`) or CLI flag (`--theme neon`).
153
+
154
+ ## 📂 Commands
155
+
156
+ ### `slides init [name]`
157
+
158
+ Create a new presentation with sample content.
159
+
160
+ ```bash
161
+ slides init my-talk
162
+ slides init my-talk --theme light
163
+ ```
164
+
165
+ ### `slides preview [file]`
166
+
167
+ Live preview with hot reload. Opens browser automatically.
168
+
169
+ ```bash
170
+ slides preview # defaults to slides.md
171
+ slides preview deck.md -p 8080 # custom file and port
172
+ ```
173
+
174
+ ### `slides build [file]`
175
+
176
+ Build to a single static HTML file.
177
+
178
+ ```bash
179
+ slides build # outputs to dist/index.html
180
+ slides build -o public # custom output directory
181
+ slides build deck.md --theme neon
182
+ ```
183
+
184
+ ### `slides export [file]`
185
+
186
+ Export to PDF (uses browser print).
187
+
188
+ ```bash
189
+ slides export
190
+ ```
191
+
192
+ ## 🚀 Deploying
193
+
194
+ The build output is a **single `index.html`** file — deploy anywhere:
195
+
196
+ ### GitHub Pages
197
+
198
+ ```bash
199
+ slides build
200
+ cd dist
201
+ git init
202
+ git add .
203
+ git commit -m "deploy slides"
204
+ git branch -M gh-pages
205
+ git remote add origin https://github.com/you/your-talk.git
206
+ git push -u origin gh-pages
207
+ ```
208
+
209
+ ### Netlify / Vercel
210
+
211
+ Point to the `dist/` folder.
212
+
213
+ ### Just Share
214
+
215
+ Send the `dist/index.html` file directly — it's self-contained.
216
+
217
+ ## 📄 License
218
+
219
+ MIT © [Deepankar Rawat](https://dprrwt.me)
package/demo/slides.md ADDED
@@ -0,0 +1,184 @@
1
+ ---
2
+ title: md-slides Demo
3
+ author: Deepankar Rawat
4
+ theme: dark
5
+ ---
6
+
7
+ # md-slides ✨
8
+
9
+ Markdown → Beautiful Slides
10
+
11
+ *Zero config. Developer-friendly.*
12
+
13
+ ---
14
+
15
+ ## Why md-slides?
16
+
17
+ - **Write in Markdown** — your editor, your flow
18
+ - **4 themes** — Dark, Light, Minimal, Neon
19
+ - **Live reload** — see changes instantly
20
+ - **Single HTML output** — deploy anywhere
21
+ - **Speaker notes** — press `S` to toggle
22
+
23
+ <!-- notes: This tool exists because making slides should be as easy as writing markdown. -->
24
+
25
+ ---
26
+
27
+ ## Getting Started
28
+
29
+ ```bash
30
+ # Install globally
31
+ npm install -g @dprrwt/slides
32
+
33
+ # Create a new presentation
34
+ slides init my-talk
35
+
36
+ # Start editing and previewing
37
+ cd my-talk
38
+ slides preview
39
+ ```
40
+
41
+ ---
42
+
43
+ ## Slide Syntax
44
+
45
+ Separate slides with `---` on its own line:
46
+
47
+ ```markdown
48
+ # Title Slide
49
+
50
+ Content here.
51
+
52
+ ---
53
+
54
+ ## Next Slide
55
+
56
+ More content.
57
+
58
+ ---
59
+
60
+ > A quote slide.
61
+ ```
62
+
63
+ ---
64
+
65
+ ## Code Highlighting
66
+
67
+ 190+ languages supported out of the box:
68
+
69
+ ```typescript
70
+ interface Slide {
71
+ html: string;
72
+ notes: string;
73
+ layout: 'title' | 'center' | 'code' | 'quote';
74
+ }
75
+
76
+ function present(slides: Slide[]): void {
77
+ slides.forEach((slide, i) => {
78
+ render(slide, { index: i, total: slides.length });
79
+ });
80
+ }
81
+ ```
82
+
83
+ ---
84
+
85
+ ## Smart Layouts
86
+
87
+ Slides auto-detect their layout:
88
+
89
+ | Content | Layout |
90
+ |---------|--------|
91
+ | Just a heading | **Center** |
92
+ | H1 with content | **Title** |
93
+ | Blockquote | **Quote** |
94
+ | Code block | **Code** |
95
+ | Everything else | **Default** |
96
+
97
+ ---
98
+
99
+ > "The best presentations are written, not designed."
100
+
101
+ <!-- notes: This is a quote slide — detected automatically from the blockquote. -->
102
+
103
+ ---
104
+
105
+ ## Themes
106
+
107
+ Set via frontmatter or CLI:
108
+
109
+ ```yaml
110
+ ---
111
+ theme: neon
112
+ ---
113
+ ```
114
+
115
+ ```bash
116
+ slides build --theme light
117
+ slides preview --theme minimal
118
+ ```
119
+
120
+ **Built-in:** `dark` · `light` · `minimal` · `neon`
121
+
122
+ ---
123
+
124
+ ## Speaker Notes
125
+
126
+ Add notes with HTML comments:
127
+
128
+ ```markdown
129
+ ## My Slide
130
+
131
+ Content visible to audience.
132
+
133
+ <!-- notes: Only you can see this. Press S. -->
134
+ ```
135
+
136
+ Press **S** now to see the notes panel →
137
+
138
+ <!-- notes: 👋 You found the notes! These are only visible to the presenter. Use them for talking points, reminders, or timing cues. -->
139
+
140
+ ---
141
+
142
+ ## Navigation
143
+
144
+ | Key | Action |
145
+ |-----|--------|
146
+ | `→` `↓` `Space` | Next slide |
147
+ | `←` `↑` | Previous slide |
148
+ | `S` | Speaker notes |
149
+ | `F` | Fullscreen |
150
+ | `Home` / `End` | First / Last |
151
+
152
+ **Touch:** Swipe left/right
153
+
154
+ **Click:** Right half → next, Left half → prev
155
+
156
+ ---
157
+
158
+ ## Deploy Anywhere
159
+
160
+ Output is a **single `index.html`** file:
161
+
162
+ ```bash
163
+ # Build
164
+ slides build
165
+
166
+ # Deploy to GitHub Pages
167
+ cd dist
168
+ git init && git add . && git commit -m "slides"
169
+ git push origin gh-pages
170
+ ```
171
+
172
+ Or just email the HTML file. It's self-contained.
173
+
174
+ ---
175
+
176
+ # Ship It 🚀
177
+
178
+ ```bash
179
+ npm install -g @dprrwt/slides
180
+ ```
181
+
182
+ **GitHub:** [dprrwt/md-slides](https://github.com/dprrwt/md-slides)
183
+
184
+ **Author:** [dprrwt.me](https://dprrwt.me)