← changelog

dididecks-playerchangelog/releases/0.1.0.md

0.1.0: play, scroll and print a 16:9 deck from any Astro site

The viewer half of DidiDecks, out of the authoring shell and into its own package: a single-page player with keyboard, swipe, a contents list and print, a pure-CSS slide canvas, and the scroll deck, chosen from nine drifting copies across the Lossless tree.

  • Release
  • Dididecks
  • Slide-Decks
  • Astro-Components
  • npm

Why Care?

Every Lossless site that shows a deck had grown its own viewer: nine copies of the scroll-deck wrapper and four of the slide canvas, each carrying whichever fix its site needed last. The DidiDecks shell had the best play and print pieces, but they were bundled with authoring tools that write to disk, so no site outside a dididecks client-site could use them.

0.1.0 is the one copy. Install it, wrap your slides, and a deck plays, scrolls and prints the same way everywhere.

Install

SH
pnpm add @lossless-group/dididecks-player

Peer dependency: astro 6 or later. No other runtime dependencies.

Play a deck

ASTRO
---
import DeckPlayer from "@lossless-group/dididecks-player/components/DeckPlayer.astro";
import PlayerSlide from "@lossless-group/dididecks-player/components/PlayerSlide.astro";
import Cover from "../slides/Cover.astro";
---
<DeckPlayer title="Firm deck" pdfHref="/firm-deck.pdf" backHref="/decks/">
  <PlayerSlide title="Cover"><Cover /></PlayerSlide>
  <PlayerSlide title="Portfolio" image="/slides/11.jpg" />
</DeckPlayer>

A slide is either an Astro component authored at 1920×1080 or a rendered image of one. Both scale the same way.

KeyDoes
← → · PageUp PageDown · Space / Shift+SpacePrevious / next
Home · EndFirst / last
T or JContents: skip to any slide
FFullscreen
EscClose the contents

Swipe works on touch screens, #N in the URL opens slide N and follows you as you move, and ⌘P prints every slide on its own landscape page.

What's in the package

ComponentWhat it does
DeckPlayer + PlayerSlideThe single-page player above
SlideCanvasScales a 1920×1080 stage to any box with container queries: no JS, works in print. Centred and letterboxed. Optional wash layer via --slide-backdrop-*
ContentFitOpt-in island that scales overflowing content down to fit
PageAsDeckWrapper + SlidePaginatorScroll deck: scroll-snap sections, keyboard and double-click navigation, an NN / total indicator with type-to-jump
DeckChromeFloating navigation capsule for multi-page play routes
PrintDeckPrint layout: each child becomes one landscape page
ModeToggle + runtime/mode-switcher.tslight / dark / vibrant on html[data-mode]

Everything is plain Astro with scoped CSS, themed by --ddd-chrome-* tokens that fall back to your site's --color-* and --font-*. No Tailwind, no framework, no Reveal.js.

Fixed, compared with the copies in the shell

  • The chrome now knows where you are. DeckChrome listened for ddd:section-changed; the scroll deck sends deck:section-changed, so the first- and last-slide states never updated. It listens for both.

  • Browser shortcuts work again. Cmd, Ctrl and Alt chords pass through: Cmd+C copies instead of hiding the chrome.

  • Letterboxing is even. SlideCanvas centres its stage, so a box that isn't 16:9 gets equal bars on both sides instead of all the space on the right and bottom.

What isn't in it

The authoring half of DidiDecks stays in @dididecks/shell: the slide rater and triage tools (dev-only, they write to the filesystem), the deck registry, and the /play and /toc routes. The shell now depends on this package.

Where it's published

npm, as @lossless-group/dididecks-player. Not JSR: JSR only exports modules it can parse as JavaScript or TypeScript, and .astro components aren't. The Lossless TypeScript packages, like @lossless-group/lfm, stay on JSR.

Next

0.2 brings a better scroll deck (lossless-slides-site's PageDeck: tall slides scroll before advancing, the URL follows the slide, reduced motion, clean teardown across view transitions), a jump panel for scroll decks, one html[data-chrome="off"] attribute for hiding chrome, and a mode switcher with no flash on first paint.