Skip to content

docs(design): @logosdx/slides — HTML-native presentation primitives - #150

Open
damusix wants to merge 5 commits into
masterfrom
claude/ai-presentation-library-r9r9pv
Open

damusix wants to merge 5 commits into
masterfrom
claude/ai-presentation-library-r9r9pv

Conversation

@damusix

@damusix damusix commented Aug 16, 2026 •

Copy link
Copy Markdown
Contributor

Design doc only, no implementation. Adds docs/design/slides.md.

A browser-only presentation library delivered over CDN. Authors write plain HTML inside <slides> / <slide>; the library adds two-axis navigation, keyboard control, speaker notes, and fragments on top of utils / dom / observer. The deck is a real 2D scroll container, so content taller than a slide scrolls instead of clipping.

Four assumptions were tested in Playwright (Chromium 145, WebKit 26, decks on file://) and the doc records the results in Verified browser behavior:

  • scroll-snap-type: y mandatory does not trap readers at tall-panel edges (spec-mandated for oversized snap areas), so both axes use mandatory.
  • An unclosed <p> or <li> makes the parser ignore </slide>, nesting every later slide inside it. Upgrade repairs misplaced slides and warns.
  • The deck writes the notes popup's DOM directly; no postMessage or BroadcastChannel (WebKit drops it on file://). A popup reload blanks the view; S reopens it.

Open before spec: touch-fling snapping on a real phone.

Outside the new package: scripts/build.mjs needs a CSS copy into dist/browser/ for the CDN <link>.

claude and others added 5 commits August 15, 2026 20:50
Design doc for a browser-only, CDN-delivered presentation library built on
utils/dom/observer/hooks. Two-axis navigation over a native CSS scroll-snap
substrate; slides that overflow scroll instead of clipping.

Records two load-bearing decisions: unregistered <slides>/<slide> elements
upgraded via dom's observe() (custom element names require a hyphen), and
proximity rather than mandatory snapping on the vertical axis so long slides
stay reachable.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2VBz7GGEaeDG8uEuuMc4f
…tions

Adds the keyboard contract, where vertical keys scroll before advancing so
long-slide content stays reachable without a mouse.

Adds speaker notes: a <notes> element hidden by unconditional CSS, surfaced
in a popup window written by the opener so no second file is hosted. Transport
is layered — retained window reference + postMessage as primary, since these
decks are typically opened from file:// where BroadcastChannel's opaque origin
makes it unreliable; BroadcastChannel is the http(s) enhancement for a
manually opened second tab.

Elaborates the three open questions with recommendations: embedded decks via
a --deck-height custom property with keyboard/URL scoped to a primary deck;
auto-wrap loose column content; fragments in v1 with a minimal contract,
gated on a JS-set data-ready flag so a script failure cannot hide content.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2VBz7GGEaeDG8uEuuMc4f
Resolves the embedded-deck question: a document contains exactly one <slides>
and it owns the viewport. Makes the deck a singleton, which removes keyboard
focus arbitration and URL hash ownership from the design entirely.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2VBz7GGEaeDG8uEuuMc4f
Decision 4: loose content in a column is wrapped into an implicit leading
panel rather than warned about, since warning-only hands back a subtly broken
deck for markup that is natural to write. Persistent column chrome stays
deferred behind an explicit attribute.

Decision 5: fragments ship in v1 with a minimal contract — reveal state,
advance/retreat state machine, URL index. Ordering and reveal styles are out.
Hiding is gated on the JS-set data-ready flag so a failed script cannot
permanently hide authored content.

Adds an element/attribute reference, a v1 scope split, and a build order with
notes on which behavior needs real Chromium versus jsdom. Reorders decisions
ahead of the structural sections.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2VBz7GGEaeDG8uEuuMc4f
Chromium 145 and WebKit 26 probes showed y-mandatory does not trap tall
panels, unclosed <p>/<li> swallow following slides, and the notes popup
needs no message protocol but blanks on reload.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants