mdeck 2.3.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.
Files changed (268) hide show
  1. package/CHANGELOG.md +259 -0
  2. package/LICENSE +21 -0
  3. package/README.md +156 -0
  4. package/assets/base.css +196 -0
  5. package/assets/extensions/layouts/chapter/extension.toml +26 -0
  6. package/assets/extensions/layouts/chapter/layout.jsx +21 -0
  7. package/assets/extensions/layouts/chapter/starter.md +8 -0
  8. package/assets/extensions/layouts/focus/extension.toml +8 -0
  9. package/assets/extensions/layouts/focus/layout.jsx +10 -0
  10. package/assets/extensions/layouts/focus/starter.md +4 -0
  11. package/assets/extensions/layouts/full-bleed-image/extension.toml +31 -0
  12. package/assets/extensions/layouts/full-bleed-image/layout.jsx +19 -0
  13. package/assets/extensions/layouts/full-bleed-image/starter.md +6 -0
  14. package/assets/extensions/layouts/generic/extension.toml +8 -0
  15. package/assets/extensions/layouts/generic/layout.jsx +8 -0
  16. package/assets/extensions/layouts/generic/starter.md +4 -0
  17. package/assets/extensions/layouts/image-text/extension.toml +25 -0
  18. package/assets/extensions/layouts/image-text/layout.jsx +17 -0
  19. package/assets/extensions/layouts/image-text/starter.md +6 -0
  20. package/assets/extensions/layouts/split/extension.toml +25 -0
  21. package/assets/extensions/layouts/split/layout.jsx +19 -0
  22. package/assets/extensions/layouts/split/starter.md +14 -0
  23. package/assets/extensions/layouts/title/extension.toml +26 -0
  24. package/assets/extensions/layouts/title/layout.jsx +14 -0
  25. package/assets/extensions/layouts/title/starter.md +5 -0
  26. package/assets/extensions/palettes/brand/extension.toml +29 -0
  27. package/assets/extensions/palettes/cobalt/extension.toml +27 -0
  28. package/assets/extensions/palettes/ember/extension.toml +27 -0
  29. package/assets/extensions/palettes/forest/extension.toml +27 -0
  30. package/assets/extensions/palettes/graphite/extension.toml +27 -0
  31. package/assets/extensions/palettes/lagoon/extension.toml +27 -0
  32. package/assets/extensions/palettes/neon/extension.toml +27 -0
  33. package/assets/extensions/palettes/nordic/extension.toml +27 -0
  34. package/assets/extensions/palettes/pastel/extension.toml +30 -0
  35. package/assets/extensions/palettes/phosphor/extension.toml +27 -0
  36. package/assets/extensions/palettes/swiss/extension.toml +27 -0
  37. package/assets/extensions/palettes/terra/extension.toml +27 -0
  38. package/assets/extensions/themes/academic/extension.toml +53 -0
  39. package/assets/extensions/themes/academic/styles.css +631 -0
  40. package/assets/extensions/themes/aurora/extension.toml +37 -0
  41. package/assets/extensions/themes/aurora/styles.css +644 -0
  42. package/assets/extensions/themes/duet/extension.toml +46 -0
  43. package/assets/extensions/themes/duet/styles.css +573 -0
  44. package/assets/extensions/themes/editorial/extension.toml +46 -0
  45. package/assets/extensions/themes/editorial/styles.css +574 -0
  46. package/assets/extensions/themes/fhnw/extension.toml +61 -0
  47. package/assets/extensions/themes/fhnw/styles.css +604 -0
  48. package/assets/extensions/themes/neue/extension.toml +46 -0
  49. package/assets/extensions/themes/neue/styles.css +489 -0
  50. package/assets/extensions/themes/sketch/extension.toml +48 -0
  51. package/assets/extensions/themes/sketch/styles.css +633 -0
  52. package/assets/extensions/themes/terminal/extension.toml +38 -0
  53. package/assets/extensions/themes/terminal/styles.css +550 -0
  54. package/assets/logo/avatar.png +0 -0
  55. package/assets/logo/logo-dark.svg +10 -0
  56. package/assets/logo/logo-light.svg +10 -0
  57. package/assets/logo/mark.svg +15 -0
  58. package/bin/mdeck.js +2 -0
  59. package/docs/README.md +8 -0
  60. package/docs/reference/authoring.md +795 -0
  61. package/docs/reference/claude-skill.md +96 -0
  62. package/docs/reference/extensions.md +250 -0
  63. package/docs/reference/layouts.md +153 -0
  64. package/docs/reference/palettes.md +106 -0
  65. package/docs/reference/structured-slides.md +120 -0
  66. package/docs/reference/themes.md +133 -0
  67. package/docs/site/assets/favicon.svg +15 -0
  68. package/docs/site/assets/github-logo.svg +1 -0
  69. package/docs/site/assets/site.css +162 -0
  70. package/docs/site/assets/site.js +123 -0
  71. package/docs/site/build.js +148 -0
  72. package/docs/site/content/appearance.md +203 -0
  73. package/docs/site/content/audience.md +178 -0
  74. package/docs/site/content/commands.md +153 -0
  75. package/docs/site/content/components.md +134 -0
  76. package/docs/site/content/drawing.md +72 -0
  77. package/docs/site/content/editing.md +59 -0
  78. package/docs/site/content/getting-started.md +103 -0
  79. package/docs/site/content/layouts.md +126 -0
  80. package/docs/site/content/media.md +107 -0
  81. package/docs/site/content/more-content.md +130 -0
  82. package/docs/site/content/presenting.md +93 -0
  83. package/docs/site/content/reusable-layouts.md +74 -0
  84. package/docs/site/content/sharing.md +88 -0
  85. package/docs/site/content/theme-authoring.md +144 -0
  86. package/docs/site/content/theme-repository.md +76 -0
  87. package/docs/site/content/troubleshooting.md +92 -0
  88. package/docs/site/content/views.md +56 -0
  89. package/docs/site/content/welcome.md +71 -0
  90. package/docs/site/content/writing.md +121 -0
  91. package/docs/site/examples/first-talk.md +88 -0
  92. package/docs/site/examples/notebook.svg +58 -0
  93. package/docs/site/images/themes/academic-dark.webp +0 -0
  94. package/docs/site/images/themes/academic-light.webp +0 -0
  95. package/docs/site/images/themes/academic.webp +0 -0
  96. package/docs/site/images/themes/aurora-dark.webp +0 -0
  97. package/docs/site/images/themes/aurora-light.webp +0 -0
  98. package/docs/site/images/themes/aurora.webp +0 -0
  99. package/docs/site/images/themes/duet-dark.webp +0 -0
  100. package/docs/site/images/themes/duet-light.webp +0 -0
  101. package/docs/site/images/themes/duet.webp +0 -0
  102. package/docs/site/images/themes/editorial-dark.webp +0 -0
  103. package/docs/site/images/themes/editorial-light.webp +0 -0
  104. package/docs/site/images/themes/editorial.webp +0 -0
  105. package/docs/site/images/themes/fhnw.webp +0 -0
  106. package/docs/site/images/themes/neue-dark.webp +0 -0
  107. package/docs/site/images/themes/neue-light.webp +0 -0
  108. package/docs/site/images/themes/neue.webp +0 -0
  109. package/docs/site/images/themes/sketch-dark.webp +0 -0
  110. package/docs/site/images/themes/sketch-light.webp +0 -0
  111. package/docs/site/images/themes/sketch.webp +0 -0
  112. package/docs/site/images/themes/terminal-dark.webp +0 -0
  113. package/docs/site/images/themes/terminal-light.webp +0 -0
  114. package/docs/site/images/themes/terminal.webp +0 -0
  115. package/docs/site/package.json +9 -0
  116. package/docs/site/pages.js +27 -0
  117. package/docs/site/server.js +58 -0
  118. package/examples/custom-layouts/extensions/comparison/extension.toml +35 -0
  119. package/examples/custom-layouts/extensions/comparison/layout.jsx +15 -0
  120. package/examples/custom-layouts/extensions/comparison/starter.md +17 -0
  121. package/examples/custom-layouts/extensions/comparison/styles.css +4 -0
  122. package/examples/custom-layouts/slides.md +60 -0
  123. package/examples/poll/slides.md +127 -0
  124. package/examples/python/.mdeck-backups/slides.drawings-2026-10-06T08-36-47Z.json +19 -0
  125. package/examples/python/.mdeck-backups/slides.drawings-2026-10-06T11-27-30Z.json +6 -0
  126. package/examples/python/slides.drawings.json +6 -0
  127. package/examples/python/slides.md +493 -0
  128. package/examples/showcase/.mdeck-backups/slides.drawings-2026-10-06T08-08-30Z.json +10 -0
  129. package/examples/showcase/.mdeck-backups/slides.drawings-2026-10-06T11-41-35Z.json +13 -0
  130. package/examples/showcase/img/image.jpg +0 -0
  131. package/examples/showcase/img/mdeck.svg +66 -0
  132. package/examples/showcase/slides.drawings.json +11 -0
  133. package/examples/showcase/slides.md +427 -0
  134. package/package.json +75 -0
  135. package/skills/write-slides/SKILL.md +144 -0
  136. package/src/build/check.js +49 -0
  137. package/src/build/chrome.js +130 -0
  138. package/src/build/components.js +44 -0
  139. package/src/build/config.js +61 -0
  140. package/src/build/drawings.js +14 -0
  141. package/src/build/editorPlugin.js +272 -0
  142. package/src/build/editorServer.js +36 -0
  143. package/src/build/fonts.js +84 -0
  144. package/src/build/homePlugin.js +208 -0
  145. package/src/build/inkPlugin.js +192 -0
  146. package/src/build/ownWrites.js +18 -0
  147. package/src/build/pairing.js +81 -0
  148. package/src/build/pdf.js +34 -0
  149. package/src/build/relayAccess.js +85 -0
  150. package/src/build/slidesPlugin.js +371 -0
  151. package/src/build/themeCheck.js +151 -0
  152. package/src/build/tunnelClient.js +184 -0
  153. package/src/cli/args.js +76 -0
  154. package/src/cli/index.js +758 -0
  155. package/src/cli/migrate.js +123 -0
  156. package/src/cli/skill.js +40 -0
  157. package/src/cli/themes.js +140 -0
  158. package/src/components/CodeBlock.jsx +168 -0
  159. package/src/components/ConnectedViews.jsx +25 -0
  160. package/src/components/Icon.jsx +8 -0
  161. package/src/components/Poll.jsx +67 -0
  162. package/src/components/QrCode.jsx +29 -0
  163. package/src/components/QrCodeTag.jsx +27 -0
  164. package/src/components/Question.jsx +28 -0
  165. package/src/components/Scale.jsx +47 -0
  166. package/src/components/VideoPlayer.jsx +108 -0
  167. package/src/components/WordCloud.jsx +106 -0
  168. package/src/components/activity.jsx +35 -0
  169. package/src/components/callout.css +78 -0
  170. package/src/components/code-block.css +123 -0
  171. package/src/components/columns.css +11 -0
  172. package/src/components/poll.css +81 -0
  173. package/src/components/video-player.css +14 -0
  174. package/src/core/devPath.js +4 -0
  175. package/src/core/editDeck.js +230 -0
  176. package/src/core/icons.js +69 -0
  177. package/src/core/ink.js +221 -0
  178. package/src/core/labels.js +144 -0
  179. package/src/core/outline.js +33 -0
  180. package/src/core/parseSlides.js +152 -0
  181. package/src/core/source.js +137 -0
  182. package/src/core/urls.js +34 -0
  183. package/src/core/validateDeck.js +139 -0
  184. package/src/editor/api.js +67 -0
  185. package/src/editor/components/App.jsx +75 -0
  186. package/src/editor/components/ConflictBanner.jsx +10 -0
  187. package/src/editor/components/DeckSettings.jsx +108 -0
  188. package/src/editor/components/DesignApp.jsx +252 -0
  189. package/src/editor/components/Diagnostics.jsx +10 -0
  190. package/src/editor/components/ExtensionEditor.jsx +66 -0
  191. package/src/editor/components/ExtensionForms.jsx +134 -0
  192. package/src/editor/components/ExtensionsPanel.jsx +114 -0
  193. package/src/editor/components/Field.jsx +24 -0
  194. package/src/editor/components/Inspector.jsx +36 -0
  195. package/src/editor/components/LayoutPicker.jsx +23 -0
  196. package/src/editor/components/LayoutSelect.jsx +25 -0
  197. package/src/editor/components/LookThumbnail.jsx +8 -0
  198. package/src/editor/components/MetaFields.jsx +24 -0
  199. package/src/editor/components/Outline.jsx +28 -0
  200. package/src/editor/components/PalettePicker.jsx +32 -0
  201. package/src/editor/components/Preview.jsx +63 -0
  202. package/src/editor/components/PropsForm.jsx +46 -0
  203. package/src/editor/components/RawSlideEditor.jsx +9 -0
  204. package/src/editor/components/RegionEditor.jsx +15 -0
  205. package/src/editor/components/Resizer.jsx +18 -0
  206. package/src/editor/designLink.js +19 -0
  207. package/src/editor/editor.css +139 -0
  208. package/src/editor/extensions.js +86 -0
  209. package/src/editor/keyboard.js +21 -0
  210. package/src/editor/model.js +38 -0
  211. package/src/editor/sampleDeck.js +165 -0
  212. package/src/editor/saveQueue.js +47 -0
  213. package/src/editor/schema.js +36 -0
  214. package/src/editor/state.js +92 -0
  215. package/src/editor/useDeckDocument.js +67 -0
  216. package/src/extensions/appearance.js +79 -0
  217. package/src/extensions/contrast.js +57 -0
  218. package/src/extensions/discover.js +126 -0
  219. package/src/extensions/manifest.js +209 -0
  220. package/src/extensions/packs.js +268 -0
  221. package/src/extensions/tokens.js +25 -0
  222. package/src/home/Home.jsx +362 -0
  223. package/src/home/home.css +148 -0
  224. package/src/layouts/layoutApi.jsx +205 -0
  225. package/src/layouts/layoutProps.js +30 -0
  226. package/src/layouts/renderSlide.jsx +17 -0
  227. package/src/live/answer/answer.css +34 -0
  228. package/src/live/answer/answer.html +14 -0
  229. package/src/live/answer/answer.js +130 -0
  230. package/src/live/client.js +290 -0
  231. package/src/live/code.js +19 -0
  232. package/src/live/follow.js +17 -0
  233. package/src/live/pairing.js +34 -0
  234. package/src/live/presence.js +33 -0
  235. package/src/live/roomTag.js +38 -0
  236. package/src/live/rooms.js +249 -0
  237. package/src/live/server.js +82 -0
  238. package/src/live/tunnel.js +180 -0
  239. package/src/paths.js +9 -0
  240. package/src/runtime/ReaderView.jsx +193 -0
  241. package/src/runtime/SlideErrorBoundary.jsx +28 -0
  242. package/src/runtime/chrome.jsx +55 -0
  243. package/src/runtime/deck-stage.js +1533 -0
  244. package/src/runtime/design.html +12 -0
  245. package/src/runtime/design.jsx +5 -0
  246. package/src/runtime/editor.html +12 -0
  247. package/src/runtime/editor.jsx +5 -0
  248. package/src/runtime/editorBridge.js +58 -0
  249. package/src/runtime/fit.js +149 -0
  250. package/src/runtime/home.html +13 -0
  251. package/src/runtime/home.jsx +5 -0
  252. package/src/runtime/index.html +15 -0
  253. package/src/runtime/ink/InkLayer.jsx +17 -0
  254. package/src/runtime/ink/Toolbar.jsx +145 -0
  255. package/src/runtime/ink/attach.js +69 -0
  256. package/src/runtime/ink/bus.js +126 -0
  257. package/src/runtime/ink/controller.js +132 -0
  258. package/src/runtime/ink/room.js +101 -0
  259. package/src/runtime/ink/select.js +124 -0
  260. package/src/runtime/ink/server.js +75 -0
  261. package/src/runtime/ink/store.js +55 -0
  262. package/src/runtime/ink/toolbar.css +79 -0
  263. package/src/runtime/main.jsx +863 -0
  264. package/src/runtime/markedSetup.js +147 -0
  265. package/src/runtime/reader.css +59 -0
  266. package/src/runtime/registry.jsx +26 -0
  267. package/src/runtime/syncOrder.js +32 -0
  268. package/src/runtime/themeLoader.js +68 -0
@@ -0,0 +1,107 @@
1
+ # Add pictures and video
2
+
3
+ Keep your slide file and its pictures together in one folder. That makes the presentation easier to move and share later.
4
+
5
+ Your assistant can place pictures for you once they are in the folder. Tell it which file belongs where and what it shows:
6
+
7
+ ```prompt
8
+ Put img/garden.jpg on the opening slide, full size, and the three
9
+ photos in img/beds/ side by side on the slide about planting.
10
+ ```
11
+
12
+ When it suggests pictures you do not have yet, it names the files it expects; `mdeck check` lists the ones still missing.
13
+
14
+ ## Keep the files together
15
+
16
+ For example, your folder could look like this:
17
+
18
+ ```text
19
+ my-talk/
20
+ my-talk.md
21
+ img/
22
+ garden.jpg
23
+ video/
24
+ tour.mp4
25
+ ```
26
+
27
+ `img` and `video` are ordinary folders you create. Their names are suggestions, not special mdeck requirements.
28
+
29
+ ## Put a picture on a slide
30
+
31
+ Write a line like this where you want the picture:
32
+
33
+ ```markdown
34
+ ![A community garden in spring](./img/garden.jpg)
35
+ ```
36
+
37
+ The words in square brackets describe the picture. The part in parentheses is its location, starting from the folder containing your slide file. `./` means “start in this folder.”
38
+
39
+ Use forward slashes in image paths, including on Windows. Simple filenames without spaces are easiest to work with.
40
+
41
+ For a picture beside text or a picture that fills the slide, use one of the [picture layouts](layouts.html#a-picture-beside-your-words).
42
+
43
+ ## Show the whole picture
44
+
45
+ Picture layouts usually fill their available space, which can crop the edges. To keep the whole picture visible, use `fit: contain`:
46
+
47
+ ```markdown
48
+ :::meta
49
+ layout: image-text
50
+ props:
51
+ image: ./img/garden.jpg
52
+ alt: "A community garden in spring"
53
+ fit: contain
54
+ :::
55
+ # The whole garden
56
+ ```
57
+
58
+ For a cropped picture, use `fit: cover`. You can add `position: "left center"` or `position: "70% 50%"` to choose which part stays in view.
59
+
60
+ ## Pictures that follow the theme
61
+
62
+ An SVG drawing can take its colours from the theme, so it matches every theme, palette, and light or dark. Colour it with the palette's names instead of fixed colours, for example `fill: var(--accent, #1f3fd1)`; the colour after the comma is used wherever the picture is shown on its own. The names are `--bg`, `--surface`, `--ink`, `--ink-soft`, `--muted`, `--rule`, `--accent`, `--accent-2` and `--on-accent`.
63
+
64
+ It works wherever a picture goes: in the slide text (`![…](./img/drawing.svg)`) or as the `image` of a layout. In a layout, add `fit: contain` so the whole drawing shows. The tour example's title picture, `examples/showcase/img/mdeck.svg`, works this way. An AI assistant can draw one for you:
65
+
66
+ ```prompt
67
+ Draw an SVG title picture for this talk that uses the palette's
68
+ colours, with a transparent background, and put it on the title slide.
69
+ ```
70
+
71
+ ## Add a video file
72
+
73
+ Paste this line into a normal slide, or into one side of a split slide:
74
+
75
+ ```html
76
+ <videoplayer src="./video/tour.mp4" />
77
+ ```
78
+
79
+ This is a special instruction to mdeck. You only need to change the filename. The player shows controls so you can choose when to play the video.
80
+
81
+ To start a video when its slide appears, add `play="auto"`:
82
+
83
+ ```html
84
+ <videoplayer src="./video/tour.mp4" play="auto" />
85
+ ```
86
+
87
+ Automatic playback is muted. Leaving the slide stops the local video; automatic videos also return to the beginning.
88
+
89
+ ## Show an online video
90
+
91
+ Use `url` instead of `src` for a YouTube, Vimeo, or SwitchTube address:
92
+
93
+ ```html
94
+ <videoplayer url="https://www.youtube.com/watch?v=YOUR_VIDEO_ID" />
95
+ ```
96
+
97
+ Replace the example address with your video's address. Online videos need an internet connection and permission from the video service to appear in another page. Test them before your talk.
98
+
99
+ ## If a picture does not appear
100
+
101
+ Check the spelling of the filename and folder, including capital letters. Then run:
102
+
103
+ ```sh
104
+ mdeck check my-talk.md
105
+ ```
106
+
107
+ mdeck reports local files it cannot find. For sharing, use a [built presentation](sharing.html), so the necessary files travel with it.
@@ -0,0 +1,130 @@
1
+ # Tables, tips, and more
2
+
3
+ Besides headings and lists, slides can hold tables, callouts, columns, citations, QR codes, formulas and code. Use these when they make an idea easier to understand. Your assistant knows all of them; ask for the content rather than the format:
4
+
5
+ ```prompt
6
+ Compare the three sampling methods in a small table, add a warning
7
+ about contamination, and show the rate equation as a formula.
8
+ ```
9
+
10
+ The examples below show what each looks like in the file.
11
+
12
+ ## Make a table
13
+
14
+ A table compares things side by side. Vertical lines separate the columns:
15
+
16
+ ```markdown
17
+ | Activity | Bring |
18
+ |---|---|
19
+ | Planting | Gloves |
20
+ | Planning | A notebook |
21
+ | Lunch | Something to share |
22
+ ```
23
+
24
+ Keep tables small enough to read from the back of the room.
25
+
26
+ ## Add a tip or reminder
27
+
28
+ A callout is a short note with a visible label. Choose `note`, `tip`, `important`, `warning`, or `caution`:
29
+
30
+ ```markdown
31
+ :::tip
32
+ Bring a spare copy of your presentation.
33
+ :::
34
+ ```
35
+
36
+ Add your own label after the type if you prefer:
37
+
38
+ ```markdown
39
+ :::note Before we begin
40
+ Please put your phone on silent.
41
+ :::
42
+ ```
43
+
44
+ With `lang: de` in the settings for the whole presentation, tips and reminders get German labels, as do the buttons people see when you share the slides. You can also customize individual labels:
45
+
46
+ ```yaml
47
+ lang: de
48
+ callouts:
49
+ tip: "Gut zu wissen"
50
+ ```
51
+
52
+ ## Put ordinary content in columns
53
+
54
+ For two or more equal-width columns within a slide, use a columns block. The `+++` line starts the next column:
55
+
56
+ ```markdown
57
+ # What to bring
58
+
59
+ :::columns
60
+ ## For the garden
61
+ - Gloves
62
+ - Water
63
+ +++
64
+ ## For the meeting
65
+ - Notebook
66
+ - Questions
67
+ :::
68
+ ```
69
+
70
+ You can put a tip inside a column. Give each opening block its own closing `:::` line. For unequal widths, use the [split layout](layouts.html#two-areas-side-by-side).
71
+
72
+ ## Cite a source
73
+
74
+ A footnote puts a short reference near the bottom of the slide:
75
+
76
+ ```markdown
77
+ This finding comes from our neighborhood survey.[^survey]
78
+
79
+ [^survey]: Garden team survey, May 2026.
80
+ ```
81
+
82
+ The name inside the brackets connects the sentence to its source. Give each source a different name.
83
+
84
+ ## Add a QR code
85
+
86
+ A QR code lets people open a link on their phones. Replace the address below with your own:
87
+
88
+ ```html
89
+ <qrcode url="https://example.com" size="240" />
90
+ ```
91
+
92
+ `size` sets its width in slide pixels. The code takes the slide's text colour on the slide's background, so it fits every theme. If a scanner struggles, give it a white background with `--qr-bg: #fff` and `--qr-ink: #000` in a theme or a `style` around it. Keep enough space around it, and test it on the screen you will use.
93
+
94
+ To ask the audience a question instead, a poll shows its own QR code and the answers as they come in, and `<qrcode join />` shows the join code for all your questions at once. See [Ask your audience](audience.html).
95
+
96
+ ## Show a formula
97
+
98
+ Formulas use a notation called LaTeX. For a formula in a sentence, put it between dollar signs:
99
+
100
+ ```markdown
101
+ The area is $A = \pi r^2$.
102
+ ```
103
+
104
+ For a formula on its own line, use two dollar signs above and below it:
105
+
106
+ ```markdown
107
+ $$
108
+ A = \pi r^2
109
+ $$
110
+ ```
111
+
112
+ ## Show a code example
113
+
114
+ If your talk includes programming, put the example between lines of three backticks. The language name helps mdeck color the code:
115
+
116
+ ````markdown
117
+ ```python
118
+ print("Hello, everyone!")
119
+ ```
120
+ ````
121
+
122
+ You can add `copy` to show a copy button. For JavaScript and Python, `live` adds a Run button and `editable` lets you change the example while presenting:
123
+
124
+ ````markdown
125
+ ```python live editable copy
126
+ print(2 + 2)
127
+ ```
128
+ ````
129
+
130
+ Live Python downloads its runtime the first time it runs, so it needs an internet connection. Live JavaScript runs in the presentation page itself, not in an isolated sandbox. Only run code you trust; a long-running example can make the presentation unresponsive.
@@ -0,0 +1,93 @@
1
+ # Add notes and present
2
+
3
+ The presenter view puts your current slide, the next slide, your notes, and a timer in one place. Your audience can see the slides in a separate window.
4
+
5
+ ## Write notes for yourself
6
+
7
+ Add a notes block at the end of a slide:
8
+
9
+ ```markdown
10
+ # A place to grow
11
+
12
+ Every neighborhood has a starting point.
13
+
14
+ :::notes
15
+ Welcome everyone. Ask who has visited the garden.
16
+
17
+ - Pause for answers.
18
+ - Keep this introduction short.
19
+ :::
20
+ ```
21
+
22
+ The words between `:::notes` and `:::` appear in the presenter view, not on the audience slide.
23
+
24
+ The `write-slides` skill writes notes for every content slide. Make them yours before you present, by hand or by asking:
25
+
26
+ ```prompt
27
+ Shorten the notes to cues I can glance at, and mark which slides I
28
+ can skip if I run out of time.
29
+ ```
30
+
31
+ ## Open the presenter view
32
+
33
+ ```sh
34
+ mdeck run my-talk.md
35
+ ```
36
+
37
+ The launch page it opens has a **Presenter view** button.
38
+
39
+ Use its audience-window button to open a separate view of the slides. If you have a projector or second screen, move that audience window onto it. Keep the presenter window on your own screen.
40
+
41
+ The two windows follow the same slide and reveal position: navigate in either window and the other follows. This works between windows in the same browser and between your laptop and a paired iPad. To connect the iPad, see [Draw on your slides](drawing.html#present-from-an-ipad).
42
+
43
+ Small icons next to **Speaker View** show what is connected to the deck: presenter views, audience windows and, for decks with polls, how many phones. Point at them to see on which devices, such as "Presenter view on an iPad". The launch page shows the same under **Present**, and marks each view that is open.
44
+
45
+ For a single screen, switch the presenter view to its slide-only layout. **F** or the fullscreen button fills the screen in either the presenter view or the audience window; fullscreen does not select another view.
46
+
47
+ To let people answer a question on their phones, put a poll on a slide. See [Ask your audience](audience.html).
48
+
49
+ ## Move through the talk
50
+
51
+ | Key | What it does |
52
+ |---|---|
53
+ | Right arrow, Space, or Page Down | Show the next point, then the next slide |
54
+ | Left arrow or Page Up | Hide the last revealed point, or return to the previous slide |
55
+ | Home | Go to the first slide |
56
+ | End | Go to the last slide when the slide view has focus |
57
+ | R | Start again and clear the reveals |
58
+ | D | Start or stop drawing on the slide ([Draw on your slides](drawing.html)) |
59
+ | I | Hide or show the drawings |
60
+ | F | Full screen, where the browser allows it |
61
+ | N | Open or close the notes drawer, in the presenter view's slide-only layout |
62
+
63
+ Click the slide area if your keys are not controlling it. Keys behave normally while you are typing in a text field.
64
+
65
+ The timer is for your own reference; you can start, pause, and reset it in the presenter view.
66
+
67
+ ## Reveal points one at a time
68
+
69
+ Wrap a list in a steps block:
70
+
71
+ ```markdown
72
+ # Our plan
73
+
74
+ :::steps
75
+ - Meet the neighbors.
76
+ - Choose a first project.
77
+ - Set a date.
78
+ :::
79
+ ```
80
+
81
+ Each press of the next key reveals one point. Once all points are visible, the next press moves to the following slide. Printed slides show all the points.
82
+
83
+ ## Before the talk
84
+
85
+ - Open the talk on the computer you will use.
86
+ - Try the audience window and check the correct screen is showing.
87
+ - Test every video, especially if it comes from the internet.
88
+ - Run `mdeck check my-talk.md` to look for missing files or settings mistakes.
89
+ - If the talk has a poll, scan its QR code with a phone in the room's network and vote once. Then reset the poll.
90
+
91
+ ## Are my notes private?
92
+
93
+ Notes are hidden from the audience view, but a normal build includes them in the file, and someone with that file can inspect them. For a version to send around, use `mdeck send my-talk.md`, which removes the notes (see [Send, host or print your slides](sharing.html)).
@@ -0,0 +1,74 @@
1
+ # Use a reusable slide layout
2
+
3
+ A reusable layout is a slide arrangement someone has made for a particular purpose: a comparison, a timeline, or a team introduction.
4
+
5
+ You do not have to create a layout to use one. Someone, or an AI assistant, makes it once, and other people fill it with their own words. Your assistant sees every layout in the folder when it writes slides, so you can ask for one by name: “use the comparison layout for the before and after slide”.
6
+
7
+ <!-- preview -->
8
+
9
+ ## Keep the layout with the talk
10
+
11
+ If someone gives you a presentation folder with an `extensions` folder inside, keep that folder beside the slide file. mdeck finds those layouts automatically.
12
+
13
+ ```text
14
+ my-talk/
15
+ my-talk.md
16
+ extensions/
17
+ comparison/
18
+ …files supplied by the layout's creator
19
+ ```
20
+
21
+ Copy the whole layout folder if you move it to a different presentation. You do not need to edit mdeck itself. The same folder can also hold a theme or a set of colors made for your team; `mdeck list my-talk.md` lists everything it found.
22
+
23
+ ## See which layouts are available
24
+
25
+ ```sh
26
+ mdeck list layouts my-talk.md
27
+ ```
28
+
29
+ The list includes the usual layouts and any extra ones saved beside your talk.
30
+
31
+ ## Start from an example
32
+
33
+ Ask mdeck to show the starting text for a layout:
34
+
35
+ ```sh
36
+ mdeck starter comparison my-talk.md
37
+ ```
38
+
39
+ Copy the text it prints into your slide file. Put `---` on its own line before it if you are adding it after an existing slide.
40
+
41
+ Replace the example words, leaving the named areas and settings in place. If you use `mdeck new` to make a file beside an existing `extensions` folder, its wizard also offers those layouts.
42
+
43
+ ## Understand the comparison example
44
+
45
+ The example shipped with this project contains two slides. The first uses an extra layout called `comparison`. The second uses the usual `split` layout with a list that appears one point at a time.
46
+
47
+ Open it from the project folder:
48
+
49
+ ```sh
50
+ mdeck run examples/custom-layouts/slides.md
51
+ ```
52
+
53
+ The comparison slide has settings like these:
54
+
55
+ ```yaml
56
+ layout: comparison
57
+ props:
58
+ ratio: [2, 3]
59
+ emphasis: right
60
+ ```
61
+
62
+ `props` groups this layout's options. The ratio gives a little more room to the right side. Changing `emphasis` to `left` moves the highlighted border to the left side. Use `none` for no highlighted side.
63
+
64
+ The `:::slot left` and `:::slot right` blocks hold the words for the two sides. “Slot” simply means a named area that the layout knows how to arrange.
65
+
66
+ ## Check your changes
67
+
68
+ ```sh
69
+ mdeck check my-talk.md
70
+ ```
71
+
72
+ If a layout requires a particular area or setting, mdeck tells you when it is missing. The creator of each layout chooses its available settings, so one layout's options may not work in another.
73
+
74
+ Want a new layout? Describe it to your assistant. The [advanced layout guide](custom-layouts.html) explains the code it writes.
@@ -0,0 +1,88 @@
1
+ # Send, host or print your slides
2
+
3
+ The launch page that `mdeck run my-talk.md` opens has buttons for the three most common results: a folder to host, one file to send, and a PDF. The hosted folder and sent file open in the reader view and omit speaker notes. Each is made next to your slide file. The commands below do the same from the terminal and offer more options.
4
+
5
+ | You want | Command | You get |
6
+ |---|---|---|
7
+ | One file to email | `mdeck send my-talk.md` | `my-talk.html`, opening in the reader view |
8
+ | A folder for a website | `mdeck build my-talk.md --reader` | `dist/`, opening in the reader view, without notes |
9
+ | A PDF | `mdeck pdf my-talk.md` | `my-talk.pdf` |
10
+
11
+ ## Send slides to someone
12
+
13
+ The quickest way to give slides to people who were not in the room:
14
+
15
+ ```sh
16
+ mdeck send my-talk.md
17
+ ```
18
+
19
+ Send `my-talk.html` by email. It opens in a **reader view**: an outline of all slides on the left, the slides in the middle, a **Read** mode that stacks every slide for scrolling on a phone, a **Light**/**Dark** button, a **Download PDF** button, and a **Present** button that opens standalone slides. The PDF is inside the file, so there is nothing else to attach.
20
+
21
+ - Drawings from `my-talk.drawings.json` are part of every build and PDF; `--no-drawings` leaves them out. See [Draw on your slides](drawing.html).
22
+ - Your speaker notes are removed. Add `--notes` to keep them in the file, for example when you also present from the same file. Readers only see notes if you put `reader:` with `notes: true` in the settings at the top of your slide file.
23
+ - The PDF is made while sending, using Chrome or Chromium on your computer. If neither is found, the button offers the browser's own "Save as PDF" dialog instead. Set `MDECK_CHROME` to the browser's path if it is installed somewhere unusual. `--no-pdf` skips it.
24
+ - `-o` chooses the name: `mdeck send my-talk.md -o handout.html`.
25
+ - The file keeps your theme and colours; readers can only switch between light and dark. To keep that fixed too, put `reader:` with `themes: false` in the settings at the top of your slide file.
26
+
27
+ Anyone who opens a normal build can reach the reader view through the small **Overview** link in the corner, or by adding `?view=reader` to the address. [Views, commands and servers](views.html) lists every view. Likewise `?view=presenter` opens the presenter view of any build, as long as the notes were kept in the file.
28
+
29
+ ## Make a PDF on its own
30
+
31
+ ```sh
32
+ mdeck pdf my-talk.md
33
+ mdeck pdf my-talk.md -o handout.pdf
34
+ ```
35
+
36
+ Each slide becomes one page at the slide's own size, with real text you can search and copy. Points that appear one at a time are all shown, and interactive slides such as diagrams that build up step by step appear finished. The reader's **Read** mode shows them the same way.
37
+
38
+ A PDF is useful for reading or printing. Videos do not play in it, and interactive slides are shown in their finished state. A poll shows the answers it had when the PDF was made. You can also open a built presentation in your browser and choose **Print**, then **Save as PDF**; turn off the browser's own headers and footers if they appear.
39
+
40
+ ## Make a folder you can host
41
+
42
+ While you write, mdeck reads your text file. To put the presentation on a website, **build** it: ask mdeck to make a browser-ready version of your talk.
43
+
44
+ ```sh
45
+ mdeck build my-talk.md --reader
46
+ ```
47
+
48
+ mdeck creates a folder called `dist`. It contains `index.html` and the local pictures, videos, and audio files the presentation uses.
49
+
50
+ Send or upload the whole folder, not just `index.html`. You can compress the folder into a ZIP file first. This option is usually best for talks with large videos. `--reader` opens the reader view and removes speaker notes from the HTML. Add `--notes` to retain them; `reader.notes: true` also makes them visible. Without `--reader`, a normal build opens the deck view and retains notes.
51
+
52
+ Building again updates the output. Keep your original slide file and pictures outside `dist`, because mdeck replaces the build output. `mdeck preview` shows the built folder in your browser.
53
+
54
+ ## Put the presentation on a website
55
+
56
+ The built folder can be hosted as an ordinary static website. Upload its contents together so the relative image and video paths keep working. Every build contains every view; the address picks it: `?view=deck`, `?view=reader`, `?view=presenter` or `?view=audience`. Polls do not need the slides to be hosted; see [Ask your audience](audience.html#use-it-in-a-real-session).
57
+
58
+ Building does not publish anything automatically. Uploading or deploying the files is a separate step with your hosting provider.
59
+
60
+ ## Make one HTML file of the presentation
61
+
62
+ If you need the presentation itself, not the reader view, as a single file to transfer, use:
63
+
64
+ ```sh
65
+ mdeck build my-talk.md --single-file -o my-talk.html
66
+ ```
67
+
68
+ Here, `-o` means “save the result with this name.” The file contains the presentation and embedded local media. Videos become larger when embedded, so a folder is often more convenient for a video-heavy talk.
69
+
70
+ The recipient can open the HTML file in a modern browser. External websites, online videos, and downloadable tools such as live Python still need a network connection. Fonts may look slightly different because this mode uses the theme's system-font alternatives.
71
+
72
+ ## Present without installing mdeck
73
+
74
+ You can include small launchers with a folder build:
75
+
76
+ ```sh
77
+ mdeck build my-talk.md --launchers
78
+ ```
79
+
80
+ The folder then includes `present.sh` for macOS/Linux, and `present.bat` plus `present.ps1` for Windows. These start a local web server and open the presenter view. The other computer needs Python 3 and a modern browser.
81
+
82
+ Use this with a folder build; it cannot be combined with `--single-file`.
83
+
84
+ ## Check before sending
85
+
86
+ Open the final result, try its images and videos, and make sure the whole talk is there. If you expect to be offline, test without an internet connection.
87
+
88
+ Remember that speaker notes are included in a normal build, even though they are hidden on the audience screen. `mdeck send` and `mdeck build --reader` remove them; remove anything confidential before building a public copy.
@@ -0,0 +1,144 @@
1
+ # Create a theme or palette
2
+
3
+ This guide describes the files behind a theme or palette. For the existing choices, see [Change the look](appearance.html).
4
+
5
+ You do not need to write these files yourself. Describe the look to your assistant, and give it colours, fonts or a picture of a design you like:
6
+
7
+ ```prompt
8
+ Make a theme for this deck in the style of our institute's poster:
9
+ dark green backgrounds, a condensed sans-serif for headings, thin
10
+ rules between sections. Keep it readable on a projector.
11
+ ```
12
+
13
+ The rest of this page is the reference for what it writes, and for anyone comfortable with CSS who prefers to write it by hand.
14
+
15
+ To look at the result and fine-tune it, run `mdeck design my-talk.md` (or `mdeck design` in a folder without a deck). It shows the theme or palette on a sample deck with every kind of slide, light and dark, and has forms for colours, fonts, sizes and spacing; see [Edit slides in your browser](editing.html). The files it writes are the ones described here.
16
+
17
+ Someone may already have made what you need: `mdeck themes search` lists the theme repository, and [Install or share a theme](theme-repository.html) explains how to install a pack or share yours.
18
+
19
+ Themes and palettes are **extensions**: each one is a folder with an `extension.toml` file that says what it is. Slide layouts use the same idea. Put the folder in `extensions/` beside your slide file and mdeck finds it automatically; there is nothing to register. The [extensions reference](extensions.html) has the complete list of settings.
20
+
21
+ ```text
22
+ my-talk/
23
+ my-talk.md
24
+ extensions/
25
+ notebook/ a palette
26
+ extension.toml
27
+ calm/ a theme
28
+ extension.toml
29
+ styles.css
30
+ ```
31
+
32
+ ## Add a palette
33
+
34
+ A palette is the quickest extension to make. It only needs a manifest, with every colour twice: for light and for dark slides.
35
+
36
+ ```toml
37
+ schema = 1
38
+ kind = "palette"
39
+ id = "notebook"
40
+ title = "Blue notebook"
41
+
42
+ [light]
43
+ "--bg" = "#ffffff"
44
+ "--surface" = "#eef2f7"
45
+ "--ink" = "#203148"
46
+ "--ink-soft" = "#34465c"
47
+ "--muted" = "#54647a"
48
+ "--rule" = "#dbe3ee"
49
+ "--accent" = "#2455c7"
50
+ "--accent-2" = "#17625c"
51
+ "--on-accent" = "#ffffff"
52
+
53
+ [dark]
54
+ "--bg" = "#0f1a2b"
55
+ "--surface" = "#18263a"
56
+ "--ink" = "#eef2f7"
57
+ "--ink-soft" = "#c7d2e0"
58
+ "--muted" = "#8fa0b6"
59
+ "--rule" = "#24354d"
60
+ "--accent" = "#7aa2ff"
61
+ "--accent-2" = "#5ec4b6"
62
+ "--on-accent" = "#0f1a2b"
63
+ ```
64
+
65
+ The folder must be called `notebook` to match `id`. Use it with `palette: notebook` in your deck, and `appearance: dark` for the dark version. Colour names start with two dashes, so they are written in quotation marks. Dark slides get dark code colours and an inverted logo; check the result with the actual logo, since automatic inversion does not suit every image.
66
+
67
+ `mdeck check` warns when two colours are too close to read, such as a pale accent on white.
68
+
69
+ ## The colours a theme may use
70
+
71
+ | Colour | Purpose |
72
+ |---|---|
73
+ | `--bg` | Slide background |
74
+ | `--surface` | Code and other raised surfaces |
75
+ | `--ink` | Main text |
76
+ | `--ink-soft` | Body text |
77
+ | `--muted` | Secondary labels |
78
+ | `--rule` | Borders |
79
+ | `--accent` | Main highlight |
80
+ | `--accent-2` | Secondary highlight |
81
+ | `--on-accent` | Text placed on an accent background |
82
+
83
+ A theme has no colours of its own: it uses these, and mixes of them, so every palette repaints it. For an inverted slide it uses the palette's other version, as `--inverse-bg`, `--inverse-ink`, `--inverse-accent` and so on:
84
+
85
+ ```css
86
+ .slide--focus {
87
+ --bg: var(--inverse-bg);
88
+ --ink: var(--inverse-ink);
89
+ --accent: var(--inverse-accent);
90
+ background: var(--bg);
91
+ color: var(--ink);
92
+ }
93
+ ```
94
+
95
+ ## Make a theme
96
+
97
+ A theme has two files. The manifest holds the identity, fonts, its default palette, type and spacing, and the settings authors may change. The stylesheet holds the rules.
98
+
99
+ ```toml
100
+ schema = 1
101
+ kind = "theme"
102
+ id = "calm"
103
+ title = "Calm"
104
+ description = "Soft sans-serif slides with plenty of space."
105
+ palette = "notebook" # the palette it uses unless the deck chooses one
106
+ fonts = ["https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap"]
107
+
108
+ [tokens]
109
+ "--fs-display" = "120px"
110
+ "--fs-h" = "60px"
111
+ "--fs-body" = "32px"
112
+ "--pad-x" = "140px"
113
+ "--pad-y" = "80px"
114
+ "--font-display" = "\"Inter\", system-ui, sans-serif"
115
+ "--font-body" = "\"Inter\", system-ui, sans-serif"
116
+
117
+ [params.fontBody]
118
+ token = "--font-body"
119
+ title = "Body font"
120
+ ```
121
+
122
+ `appearance = "dark"` makes the theme start dark. `palettes = ["notebook"]` limits it to the palettes listed, for a corporate design; a palette with `theme = "calm"` is then offered to this theme only.
123
+
124
+ The easiest start is to copy a built-in theme from the framework's `assets/extensions/themes/` folder, rename the folder and `id`, and change the tokens. `styles.css` styles the slide frame and each layout class; the built-in stylesheets show which classes exist.
125
+
126
+ mdeck writes the palette and the tokens into the page ahead of your stylesheet, so `styles.css` should only contain rules that refer to `var(--accent)` and the like. Do not repeat the values there.
127
+
128
+ ## Theme parameters
129
+
130
+ Each `[params.name]` entry names a token authors may change under `params:` in their deck, such as a font:
131
+
132
+ ```yaml
133
+ theme: calm
134
+ params:
135
+ fontBody: "Georgia, serif"
136
+ ```
137
+
138
+ Its default is simply the token's value. Colours are not parameters: they come from the palette.
139
+
140
+ ## Check every layout
141
+
142
+ Try title, chapter, focus, image-text, split, full-bleed-image, and ordinary content slides. Include long titles, lists, pictures, code, footnotes, and both light and dark. Check each aspect ratio you intend to support and the browser's print output.
143
+
144
+ `mdeck check my-talk.md` reports manifest mistakes with the file and setting name. `mdeck list my-talk.md` confirms that your theme or palette has been found.