Repository navigation
Kadal Deck 0.4.0
Minor Changes
-
e08452a: Build and hosting, on par with Slidev and past it:
- The built page's head comes from the headmatter: title,
infoas the description, author,lang,favicon, andseoMetawith Slidev's names (Open Graph, Twitter cards, canonical, theme-color, any other meta tag). The runtime keeps the document's head in step, so decks the hosted player compiles get them too. seoMeta.ogImage: autophotographs slide 1 intoog-image.png(1200×630) duringkadal-deck build; a committedog-image.pngor a path is used instead, and a build without Playwright skips it with a message.pwa: true(orbuild --pwa) makes the deck an installable app that presents offline: a manifest, icons in the theme's colours (or your favicon), and a small service worker that saves the whole build, says when it is ready, and offers a new version with a Reload button instead of reloading mid-talk. It never answers the live room, the host's/api, the dev endpoints or the phone remote, and never runs in dev;publishleaves it out unless--pwa.bundleRemoteAssets: true(or--bundle-remote-assets; Slidev'sremoteAssetstoo) downloads remote images, video, Google/Bunny Fonts and CSSurl()s into the build, cached between builds, so a deck needs no network at all.kadal-deck build a.mdx b.mdxbuilds several decks into their own folders with a page listing them;--outnames the folder, and--basenow reaches--download's PDF step too.- Every build copies index.html into each route's folder and writes
404.htmland_redirects, so/presenter,/notesand/remotework on GitHub Pages, S3 or nginx without rewrites. - New commands:
kadal-deck serveserves a build as a static host would (its base, routes, Range requests, cache headers), andkadal-deck ci <github-pages|netlify|vercel|cloudflare|docker>(ornew --ci) writes that host's deploy files for the deck. kadal-deck checkwarns about a missingfaviconorogImagefile and anog:imagethat will not be a full URL.
- The built page's head comes from the headmatter: title,
-
f78ff3e: The developer-talk code toolkit:
- Notation marks.
// [!code ++],[!code --],[!code highlight],[!code focus],[!code error]/[!code warning]and[!code word:x]at the end of a line mark it, in light and dark, alongside click-stepped highlights.deck({ shiki: { transformers } })adds your own Shiki transformers, in the Vite plugin and in the browser compiler. - Code groups.
::code-group…::(or<CodeGroup>) turns titled fences into tabs with file-type badges, keyboard and screen-reader friendly;{clicks:true}turns tabs on clicks,{print:'all'}prints every tab. - Snippet imports.
<<< @/snippets/x.ts#region {2|4} [x.ts]puts a file, or one#regionof it, on a slide; the file is watched in dev, and the hosted shell fetches it from beside deck.mdx. - TwoSlash.
```ts twoslashshows type hovers (also by keyboard), compiler errors and// ^?queries, computed at build time (needstypescript); the hosted shell renders such blocks plain. - Monaco.
{monaco}editors,{monaco-diff}diffs,{monaco-run}with a Run button and the output on the slide (JavaScript and TypeScript in a Web Worker with a timeout, Python in Pyodide, any language throughregisterCodeRunnerorsetup/code-runners.ts), and{monaco-write}that saves edits back to the file inkadal-deck dev. Monaco is a lazy chunk, bundled (no CDN), never in the main bundle; print, export and the phone remote show the highlighted code and the run's output. kadal-deck checkknows all of the above: missing snippet files and regions, unknown code options, a diff without its~~~, a run block with no runner.- Fix: the pause curtain and the confetti layer no longer swallow pointer events over the whole slide.
- Notation marks.
-
e42ad6a: Slidev's built-in components, and every icon.
- Any Iconify icon:
<Icon name="mdi:account" />, or Slidev's tag form<mdi-account />,<logos-vue class="text-3xl" />(and UnoCSS's<div class="i-carbon-logo-github" />). Lucide names keep working.kadal-deck devandbuildbundle the drawings from the deck's own@iconify-json/<set>(or@iconify/json) packages, so a built deck needs no network; the hosted player fetches them from the Iconify API once and keeps them, and shows a dashed box offline.kadal-deck checknames a misspelt icon (with the nearest names) and the set to install. - Elements placed by hand:
<Drag pos="x,y,w,h,rotation">or<Drag pos="name">withdragPos:in the slide's frontmatter, and<DragArrow pos="x,y,dx,dy" />; Slidev'sv-drag,<v-drag>and<v-drag-arrow>compile to them. Inkadal-deck dev, double-click one to move, resize, turn and nudge it with the arrow keys; the position is saved into deck.mdx and nothing else in the file changes, without reloading the page. <Mark>draws every rough-notation type — underline, box, circle, highlight, strike-through, crossed-off and bracket — as a hand-drawn stroke on its click, withstrokeWidth,padding,iterations,multiline,brackets,duration,delayandopacity. The wobble is the same on every screen and in the PDF.<Switch>with<Case>s shows one block per click (Slidev's v-switch), in one spot so nothing below jumps.<Video>follows the clicks:at,pauseAt,steps(play, pause, rewind or jump at a click), plus Slidev'sautoplay="once",autoreset,timestamp,printPosterandprintTimestamp; inside a<Click>it starts when revealed.<LightOrDark>,<RenderWhen context>,<SlideCurrentNo>,<SlidesTotal>,<TitleRenderer>and<BlueSky>(a Bluesky post in the deck's colour scheme, with export posters).
- Any Iconify icon:
-
479e4ae: Drawing tools, saved drawings, the camera on the slide, and a better recorder.
- Shapes and an eraser: the pen's toolbar now has line, arrow, rectangle and ellipse (hold Shift to keep a line at 45° steps, a rectangle square, an ellipse round; arrowheads grow with the stroke), an eraser that takes whole strokes or, with the scissors on, cuts only where it passes, redo next to undo, any colour, and more widths. While the pen is on, 1–7 pick the tools, E toggles the eraser, [ and ] change the width, Ctrl Z undoes and Ctrl Shift Z (or Ctrl Y) redoes — strokes, shapes, erases and clears alike. A stylus's eraser end erases. The phone remote's pen has the same shapes, the eraser and redo.
- Drawings shared between windows: what you draw in the presenter view shows on the play view and any shared window in the same browser at once, with or without a live room. Shapes travel through the room like strokes.
- Saved drawings:
drawings: { persist: "files" }writes pinned drawings todrawings/<slide>.svgbeside deck.mdx while you runkadal-deck dev. Files indrawings/are shown under the live strokes, are bundled bykadal-deck build(so hosted and published copies have them), and are printed, so PDF, PNG, PPTX and the/exportpage include them. Ordinary SVGs work too — a Slidev drawing loads.drawings: { perClick: true }ties each stroke to the click step it was drawn on.drawings: { enabled: "dev" }turns the pen on only on the dev server. - Camera on the slide: V (or the presenter's Camera button) shows your camera in a bubble on the slide itself — on the play view, any shared window and the presenter's preview at once — so a recording or a screen share has you in it. Drag it, resize it from its corner, make it a circle, a rounded box or a rectangle, mirror it or not; it is remembered per deck and never printed. The arrow beside Camera picks the camera and microphone.
- Recording: record the screen with your voice, the camera alone, or both as two separate files; pause and resume, a clock, WebM or MP4 where the browser supports it, the shared tab's sound mixed in, and clear file names. WebM recordings now carry their duration, so players show the length and can seek.
-
62d24fc: Export, in depth.
- Editable PowerPoint:
kadal-deck export --format pptx-editablerebuilds every slide as native PowerPoint objects — text boxes with their fonts, sizes, colours, bold/italic/underline/strike and links; lists with real bullets, numbering and levels; rectangles, rounded rectangles and ellipses with fill, border and shadow; pictures as the original files (cropped as the slide crops them); tables as tables; code as coloured monospace text. Whatever PowerPoint cannot draw (SVG, canvas, maths, diagrams, gradients, filters, decorations) is placed as a picture exactly where it stood, so nothing is lost. Speaker notes are attached. - Markdown:
--format mdwrites a.mdfile with a picture of every page and each slide's notes under it. - PDF bookmarks and metadata: the PDF now opens with an outline built from the slide titles (vertical stacks and
levels nested;--no-with-tocturns it off) and carries the deck's title, author and description. - Flags on every format:
--format,--range 1,3-5,--dark/--scheme,--with-clicks/--no-with-clicks,--omit-background(transparent pages),--per-slide,--timeout,--wait,--wait-until,--executable-path,--output,--port. Slidev's spelling (--with-clicks false) works too. - The browser exporter at
/export: every deck, hosted ones included, can be saved as a PDF (the browser's print), a zip of PNGs, an image PowerPoint file or Markdown, with a live preview, a range, click steps, colour scheme, notes, picture size, a transparent background, progress and Cancel — no Playwright needed. - A Download button:
download: truein the headmatter shows one beside the theme menu and makeskadal-deck buildprintdist/deck.pdffor it (kadal-deck build --downloaddoes it without the key); without a built PDF it opens/export.download: "talk.pdf"links a file of your own. Hosts can switch it off or point it elsewhere throughwindow.__KADAL_DECK__.download. - The print view takes
?range=,?clicks=,?notes=and?omit-background, and any page?scheme=light|dark. pptxgenjsis now a regular dependency (it was an optional peer), so PowerPoint export works out of the box;pdf-libjoins it for the PDF outline.- Fixed: the theme menu (and anything else in the corner) could not be clicked in the play view, because the confetti layer and the pause curtain took the clicks.
- Editable PowerPoint:
-
9d6191f: Eight new themes of Kadal's own, each an npm package with its own layouts and components, light and dark, print-safe and checked for contrast: ocean (Kadal's sea, calm gradients, a wave cover and depth-gauge section openers), folio (an editorial serif for essays and keynotes: pull-quotes, a drop-cap essay column, chapter openers), swiss (a strict grid, huge grotesk headings and one signal colour, with a running header), terminal (mono-forward and dark first, code blocks as editor windows, a
<Terminal>session component), lecture (numbered sections, a course footer, theorem / definition / proof blocks, citations and a references slide), brand (colours, logo and footer fromthemeConfigalone, with title, agenda and metrics layouts), crayon (pastel stickers and speech bubbles for workshops and classrooms) and neon (synthwave for launches, with a solid print fallback). Install one and name it:npm i @kadal/theme-ocean,theme: ocean. The hosted player bundles them all.Also: a theme picked from the theme menu now loads its own fonts, instead of wearing the deck theme's.
-
6f74216: Presenting, on a par with Slidev and past it:
- The presenter's timer is a stopwatch or a countdown (
timer: countdown,duration: 30min— also1h,90s,25:00or minutes) that pauses, resumes and resets, fills a progress bar with a tick where this slide should be, and goes red in overtime. The pacing badge stays, and the phone remote and the room panel show the same timer (tap the remote's timer to pause it). - Speaker notes can be edited in the presenter view, on
/notes, on the new/overviewand on the new batch editor/notes-editwhilekadal-deck devruns: the dev server rewrites only that slide's notes in deck.mdx and the views update without a reload. Saves are conflict-safe. A built deck stays read-only; a host can pass<Deck notesEditor>. [click]markers in notes are buttons that jump to their step, past/current/future parts are styled and the current one is kept in view — in the presenter, on/notes,/overviewand the phone remote.[click:N]names a step./overview: every slide with a slider through its steps and its notes.- Display settings (
,): brightness, contrast, saturation, sepia, hue and invert for the slides, per deck per browser, shared live between its windows. - A right-click context menu (
contextMenu: true | false | "dev" | "build"), keyboard accessible, with custom items through<Deck contextMenu>ordeck.menu.add. - Custom shortcuts:
<Deck shortcuts>,defineShortcuts,deck.shortcuts.add, listed in the?sheet. Thekeyboard: { KeyX: action | null }map now works as documented. - Navigation direction:
data-nav-directionon the root, stage and moving slides,--deck-nav-sign,forward:/backward:Tailwind variants in the starter and plaindeck-instant-back-style classes. Tailwind utilities can now change a click's timing. useSlideEnter/useSlideLeave(andonSlideEnter/onSlideLeave),useIsSlideActive,useNavDirection.
- The presenter's timer is a stopwatch or a countdown (
-
28b93c0: Import a Slidev deck in one command:
kadal-deck import slidev <slides.md | folder>writes a new
deck folder (the waykadal-deck newmakes one) and anIMPORT-REPORT.mdlisting, slide by
slide, whatever did not carry over exactly. It converts the headmatter (the theme to its Kadal
port, colour scheme, transitions — Slidev's way out of a slide becomes Kadal's way in — drawings,
canvas size, fonts, defaults, export options), every click directive and its component form
(v-clickwith its values and modifiers,v-after,v-clicks,v-switch,v-mark,v-motion,
v-drag), Slidev's components by their Kadal names, icons, Vue's template syntax (mustaches,
bindings, the slide's<script setup>constants,v-forandv-ifthat can be decided at
import,$slidev.navclick handlers), UnoCSS classes and attributify (written into
src/slidev.cssat Kadal's scale), and the project's Vue components, layouts and global layers
as TSX. Nothing in the Slidev project is run. The converter is also a pure function,
convertSlidevin the new@kadal/deck/importentry. Slidev's starter template converts with
16 of its 17 slides needing nothing further.Also:
kadal-deck checkwarns about Slidev syntax that compiles but does nothing (<div v-click>,
<v-clicks>); a```mermaid {alt: '…'}fence'saltlabels the diagram for screen
readers; ````md magic-move {lines: true}numbers its lines;` (a void element)
renders again; and the classic and seriph covers no longer pin a slide's own absolutely placed
elements (`abs-br`) back into the flow when the cover has a picture. -
9042c0b: Slidev's syntax works in deck.mdx as it is. HTML comments at the end of a slide are its speaker notes (other comments are dropped instead of breaking the slide), a
yaml fence at the top of a slide is its frontmatter, `defaults:` in the headmatter applies to every slide, `src: ./more.mdx#2-5` includes only some slides, and a `<style>` block styles only its own slide (`<style global>` for the whole deck).mermaid fences take Slidev's options, ```plantuml fences render through a PlantUML server (plantUmlServer), `$$ {1|3|all}` lights maths lines one click at a time, and `notesAutoRuby` adds readings to words in the notes. `kadal-deck build --without-notes` and `publish --without-notes` leave the notes out. The Vite plugin and the browser compiler take `remarkPlugins`, `rehypePlugins`, `preprocess`, `katex` and `mermaid` (the last two also as headmatter keys). Custom transitions are now a supported contract: name keyframes under `transitions:` (or `registerTransition`), or style `.deck-stage[data-transition="name"]`; a name nothing defines is a clean cut. The linter knows all of it. -
e3e6cc8: Slidev's five official themes, ported as Kadal theme packages:
@kadal/theme-classic(Slidev's default theme),@kadal/theme-seriph,@kadal/theme-crisp,@kadal/theme-bricksand@kadal/theme-shibainu. Each keeps its Slidev original's layouts with the same names, slots and frontmatter (crisp'sintro-image,3-imagesandbullets; bricks'itemsand<Polygon1>–<Polygon11>; shibainu's fourteen backgrounds), itsthemeConfig(primary), colour schemes, fonts and Shiki themes, and Slidev's proportions exactly. Install one and writetheme: seriph; the prebuilt shell bundles all five. Each package has a preview deck that reproduces the original theme's example deck. THEMES.md has the Slidev → Kadal name mapping, and the catalog lists the packages (THEME_PACKAGES,kadal-deck info themes).Fixed: slides now take the theme's text colour and body face. They used to inherit the base stylesheet's #111 and system-ui whatever the theme or the headmatter's
fontssaid, because html and body read those tokens before the theme's class applies. -
1e304e3: Theme and addon packages.
theme: seriphnow finds a built-in theme, then@kadal/theme-seriph, thenkadal-theme-seriph, then a package of that name, andtheme: ./themea folder beside deck.mdx;addons: [qr]does the same for addons. The Vite plugin imports their stylesheets and modules for you (no line in main.tsx), merges their layouts, components and layers under the deck's own, feeds a theme's Shiki themes to the highlighter, and fails with what it tried and the install command when one is missing.themeConfigkeys become--theme-<name>CSS variables on the deck root; a theme'sdefaultsandconfigsit under the deck's own. The prebuilt shell bundles every first-party theme package and falls back to minimal, with a dismissible notice, for a theme it does not have.Also new: global and slide layers (
global-top.tsx,global-bottom.tsx,slide-top.tsx,slide-bottom.tsxbeside deck.mdx, or<Deck layers>), drawn in play, print and export with the page number and click as props;kadal-deck theme ejectto copy a theme (built-ins too) into the deck;kadal-deck new --theme <name>/--addon <name>andnpm create @kadal/deck -- --theme <name>to scaffold a package ready to publish;kadal-deck info themeslisting the installed ones; thetwo-cols-headerlayout; and Slidev'sfontsobject (sans,serif,mono,weights,italic,provider: google | bunny | none,local), which exports now wait for. The contract is in THEMES.md. -
cb39d7d: Editor tooling, on a par with Slidev's and past it in places.
kadal-deck format [files] [--check]formatsdeck.mdxand the files it includes:---/----separators and frontmatter tidied, the YAML formatted with its comments and key order kept, and every slide's Markdown formatted by Prettier — while code fences,<Notes>and comment notes, magic-move,<style>, maths,::slot::markers, code groups and<<<imports stay byte for byte. Each formatted slide is checked to mean the same (parsed again as CommonMark and as MDX); one that would not keeps its text and the command says why.--checkexits 1 when a file would change. The deck's own Prettier config applies.@kadal/prettier-plugin(new package): the same formatter for any editor or CI that runs Prettier. With the plugin loaded,deck.mdxandslides.mdxare formatted as decks by name; other files use"parser": "kadal-deck".- A side editor in
kadal-deck dev: press E (orview.editor, or "Edit slide source" in the right-click menu) to edit the current slide's whole source — frontmatter, body, notes — beside it in CodeMirror, and Cmd/Ctrl+S to save it into the deck file through/__kadal/source. Only that slide's lines change; a slide edited elsewhere meanwhile is a conflict to resolve, not an overwrite; unsaved text survives a reload. CodeMirror is never in a build. kadal-deck dev --tunnelshares the dev server through a Cloudflare Quick Tunnel whencloudflaredis installed (and says how to install it when not): the https address and a QR code in the terminal, and the phone remote pairs through it.--remote [password]serves on the network, and with a password the presenter, notes and overview pages and the dev endpoints ask anyone not on this computer for it. A tunnel always has a password (made up and printed when you give none), because the dev server can write your files.- Stopping
kadal-deck devorbuildwith a signal now stops Vite as well. - A VS Code extension (Kadal Deck: slides outline with drag-to-reorder, a preview that follows the cursor, frontmatter IntelliSense,
checkas problems, formatting) lives inpackages/vscode.
Patch Changes
- fb92912: The pen, the laser and clicks work again on the main deck view: the confetti layer and the pause curtain, which cover the whole window, no longer catch the pointer.
- Updated dependencies [cb39d7d]
- @kadal/prettier-plugin@0.4.0
Packages
@kadal/deck@0.4.0@kadal/create-deck@0.4.0@kadal/deck-angular@0.4.0@kadal/deck-fresh@0.4.0@kadal/deck-preact@0.4.0@kadal/deck-python@0.4.0@kadal/deck-qwik@0.4.0@kadal/deck-solid@0.4.0@kadal/deck-svelte@0.4.0@kadal/deck-vue@0.4.0@kadal/deck-wasm@0.4.0@kadal/prettier-plugin@0.4.0@kadal/theme-brand@0.4.0@kadal/theme-bricks@0.4.0@kadal/theme-classic@0.4.0@kadal/theme-crayon@0.4.0@kadal/theme-crisp@0.4.0@kadal/theme-folio@0.4.0@kadal/theme-lecture@0.4.0@kadal/theme-neon@0.4.0@kadal/theme-ocean@0.4.0@kadal/theme-seriph@0.4.0
Published from release.yml through npm trusted publishing, with provenance.
npm create @kadal/deck@latest my-talk # a new deck
npm install @kadal/deck@0.4.0 # or upgrade one