Opt-in: keeps the host's thumbnail grid in sync with whichever slide is
currently open — highlighting it and, by default, scrolling it into view —
as the viewer moves through the lightbox by any means (arrow keys,
prev/next buttons, a completed swipe, autoplay ticking forward, a plugin
calling goTo()). Not core: CLAUDE.md's "everything that can be a plugin
is a plugin" — a host whose thumbnail grid is short enough to always be
fully visible, or who doesn't want their page scrolling out from under
them mid-slideshow, should be able to leave this off entirely.
Reuses Gallery.getOriginElement() (the same index → thumbnail lookup the
zoom transition already relies on, §2.3b) rather than re-deriving it, so
this plugin's coverage exactly matches whatever the zoom transition
already zooms to/from: scannedElements[index] in selector mode,
data-shoji-id="<item.id>" markers elsewhere (including the layout
plugin's own tiles, which set that attribute automatically when
item.id is present).
Opt-in: keeps the host's thumbnail grid in sync with whichever slide is currently open — highlighting it and, by default, scrolling it into view — as the viewer moves through the lightbox by any means (arrow keys, prev/next buttons, a completed swipe, autoplay ticking forward, a plugin calling
goTo()). Not core: CLAUDE.md's "everything that can be a plugin is a plugin" — a host whose thumbnail grid is short enough to always be fully visible, or who doesn't want their page scrolling out from under them mid-slideshow, should be able to leave this off entirely.Reuses
Gallery.getOriginElement()(the same index → thumbnail lookup the zoom transition already relies on, §2.3b) rather than re-deriving it, so this plugin's coverage exactly matches whatever the zoom transition already zooms to/from:scannedElements[index]in selector mode,data-shoji-id="<item.id>"markers elsewhere (including the layout plugin's own tiles, which set that attribute automatically whenitem.idis present).