ImageViewer changelog
2026-09-21: Aligned the usage guide, source Prop table, and Site / AI reading entry. Documentation only; component behavior is unchanged.
ImageViewer-Docs.2026-05-25 Archived the historical changelog from the top of the source file. Record future changes in this document's Changelog; keep only responsibilities, current key architecture, and the document path at the top of the source.
v1.4.1 (2026-07-05)
Adjustments
Changed the default
dismissModefrombuttontobackdrop: the close button is hidden by default, and clicking empty space outside the media closes the Viewer.Set
dismissMode="button"explicitly when a visible close button is needed.
v1.4.0 (2026-07-05)
New features
Added
dismissMode="button|backdrop"; the close interaction policy also determines whether the close button is shown.button: show the close button and keep the Viewer open on empty-space clicks;backdrop: hide the close button and close when empty space outside the media is clicked.
v1.3.1 (2026-07-05)
Adjustments
Automatic-mode Viewers now elect a page-level owner. When multiple instances exist, only the first owner responds to events and renders the Portal.
When a shared Viewer exists on the page, Image / ImageGroup without an explicit previewMode join it automatically; otherwise they fall back to a new window.
The next registered Viewer takes over automatically after the owner unmounts.
v1.3.0 (2026-07-05)
New features
Previous, next, and close controls now use built-in Buttons by default, with
ArrowLineLeft,ArrowLineRight, and SnowUICloserespectively.Built-in Buttons default to
size="md",variant="gray", andbackgroundBlur={true};parts.Buttonconfigures them together.Explicit composition with children and
as="prev|next|close"remains available.
v1.2.1 (2026-03-15)
Fixes
IV-Docs.1 Aligned the source header, documentation header, and changelog version at
v1.2.1.IV-Skeleton.1 Added a real loading-state Skeleton bridge for string image/video resources. A
Skeletonoverlay appears while switched media loads and exits on load completion or failure.IV-Docs.2 Completed the ImageViewer usage documentation, including
previewMode="viewer" / "window" / "none", ImageGroup previewMode,data-snowui-image-viewer-modeanddata-snowui-image-viewer-scopefor native HTML /resource-svelteimages, and examples for single-image, grouped, and fallback behavior.
v1.2.0 (2026-03-12)
Adjustments
IV-Adjust.16 Automatic mode now accepts DOM images: native HTML
<img data-snowui-image-viewer-mode="viewer" />andresource-svelteroot<img data-snowui-image-viewer-mode="viewer" />join the page-level ImageViewer directly.IV-Adjust.17 Added
[data-snowui-image-viewer-scope]grouping. Within a defined scope, DOM images form a previous/next list in DOM order.IV-Adjust.18 Native HTML
<img data-snowui-image-viewer-mode="window" />opens a new window directly in automatic mode instead of entering the Viewer.
v1.1.24 (2026-03-12)
Adjustments
IV-Nav.24 Changed previous/next navigation from wraparound to stopping at the ends. The previous control is hidden and its key disabled on the first image; the next control and key are disabled on the last. Button and keyboard behavior agree.
v1.1.23 (2026-03-12)
Adjustments
IV-Nav.23 Unified previous, next, and close behavior across automatic and manual modes. At this historical version, the first image wrapped to the last and the last to the first; buttons and keyboard matched.
v1.1.22 (2026-03-12)
Adjustments
IV-Key.22 Removed Space as a next-image shortcut. Automatic mode retains only
S / D / ArrowRight / ArrowDownfor next.
v1.1.21 (2026-03-12)
Adjustments
IV-Key.21 Expanded keyboard navigation in automatic mode:
A / W / ArrowUpfor previous andS / D / Space / ArrowDownfor next, withEscapeto close.
v1.1.20 (2026-03-12)
Documentation
IV-Doc.20 Fully synchronized the current source logic and style structure into the documentation: automatic/manual modes, event bus, prefetching, root-level click-to-close, host context protocol, Portal mounting, and root/viewport/media/control style layers.
v1.1.19 (2026-03-12)
Fixes
IV-Fix.1 Passed all three
Framecapability switches explicitly and addedbind:elementto the Portal host, matching the existing Portal component contract.IV-Fix.2 Removed page utility-class dependencies from the default close control and replaced them with the component's
snowui-image-viewer-default-closestyle.IV-Fix.3 Consolidated internal variable names, role-proxy selectors, and placeholder size units to resolve naming and styling rules in standards checks.
v1.1.18 (2026-03-11)
Documentation
IV-Doc.18 Documented the interaction and layout requirements confirmed in this iteration:
10%screen clearance on all four sides of media,3%clearance for controls, clicking empty space outside media to close,Escto close, and left/right arrows to switch.
v1.1.17 (2026-03-11)
Adjustments
IV-Adjust.17 Changed ImageViewer empty-space dismissal from a separate backdrop hit target to root click delegation, excluding only the media hit area and control layer. Moved the
10%clearance frompaddingtoviewport inset: 10vh 10vwso the media display area is constrained directly on all sides.
v1.1.16 (2026-03-11)
Adjustments
IV-Adjust.16 Removed the outer
Frameoverlay root from ImageViewer, leaving a plain DOM overlay withbackdrop / viewport / controlslayers. The viewport usespadding: 10vh 10vwfor hard clearance; the backdrop closes on empty space, and controls remain in their own clickable layer.
v1.1.4 (2026-03-11)
Documentation
IV-Doc.1 Completed this conversation's ImageViewer definition: one page-level Viewer as the primary path, automatic/manual modes, Image and ImageGroup integration, disable/fallback paths, button
asusage, video behavior, and current performance implementation.
v1.1.5 (2026-03-11)
Adjustments
IV-Adjust.5 Made ImageViewer a fixed full-page overlay with a higher layer. Removed the gray background from the media shell; images and videos display at their maximum size within the available area.
v1.1.6 (2026-03-11)
Adjustments
IV-Adjust.6 Redefined preview layout as proportions of the screen edge: the maximum media display area stays
5%from the edge, and controls stay3%from the edge, floating above the media.
v1.1.7 (2026-03-11)
Adjustments
IV-Adjust.7 Constrained the media area with uniform
5%container padding on all sides and added clicking outside the media to close the Viewer.
v1.1.8 (2026-03-11)
Adjustments
IV-Adjust.8 Added
Escto close and left/right arrows to switch in the preview. Limited the close hit target to the background layer rather than the whole media container, so empty space around the media can close it.
v1.1.9 (2026-03-11)
Adjustments
IV-Adjust.9 Made the
5%viewport frame a layout constraint that does not intercept pointer events. The media shell fills it, keeping media within the5%clearance while clicks outside media reliably close the Viewer.
v1.1.10 (2026-03-11)
Adjustments
IV-Adjust.10 Increased media clearance from
5%to10%and narrowed the no-dismiss hit target from the entire media shell to the media itself, fixing empty-space clicks that still failed to close.
v1.1.11 (2026-03-11)
Adjustments
IV-Adjust.11 Made media itself fill the width and height of the
10%safe frame, withobject-fit: containpreserving aspect ratio. The10%screen clearance thus becomes a stable hard constraint instead of depending on natural media dimensions.
v1.1.12 (2026-03-11)
Adjustments
IV-Adjust.12 Moved the
10%clearance from the media node back to stagepaddingand restored a separatemedia-hitbox, retaining both stable clearance and click-to-close in empty space outside media.
v1.1.13 (2026-03-11)
Adjustments
IV-Adjust.13 Following established modal/lightbox structure, separated dismissal and media layout into
backdropandviewportlayers: the backdrop handles click-to-close, and the viewport handles10%clearance and centered media.
v1.1.14 (2026-03-11)
Adjustments
IV-Adjust.14 Added
80vw / 80vhviewport limits to the media shell, hit area, and media itself. Keeping at least10%space on all four sides no longer depends solely on parent layout; media dimensions are constrained directly.
v1.1.15 (2026-03-11)
Adjustments
IV-Adjust.15 Portaled ImageViewer to
document.bodyso ancestortransform / filter / containcannot affect the overlay;fixedpositioning and10%clearance now apply to the whole viewport.
v1.1.1 (2026-03-11)
Adjustments
IV-Adjust.2 Replaced the global Svelte store runtime dependency in page-level automatic mode with a browser event bus and Viewer-local state, reducing the risk of page crashes.
v1.1.2 (2026-03-11)
Adjustments
IV-Adjust.3 Automatic mode no longer copies the
itemsarray in an open request. Viewer consumes the stable list reference directly and lightly prefetches the previous and next string images.
v1.1.3 (2026-03-11)
Adjustments
IV-Adjust.4 Added a URL deduplication cache for adjacent-item prefetching, so one preview session never creates multiple prefetch loaders for the same string image.
v1.1.0 (2026-03-10)
New features
IV-Feat.5 Added page-level automatic mode: when
open/items/indexare omitted, ImageViewer handles clicks on the page's Image and ImageGroup components automatically.
Adjustments
IV-Adjust.1 When an automatic ImageViewer exists on the page, Image opens through it by default; otherwise Image falls back to opening a new window.
v1.0.2 (2026-03-10)
New features
IV-Feat.4 Added string video resources; Viewer can preview mp4/webm/ogg/mov directly.
IV-Behavior.1 Videos in the preview auto-play by default, using
muted + playsinline + loopto satisfy browser autoplay rules.
v1.0.1 (2026-03-10)
Fixes
IV-Fix.1 Fixed
resource-svelteimages not displaying at enlarged size in Viewer. The preview no longer passes incorrect percentagewidth/heightprops to the resource component; Viewer styles handle enlargement.
v1.0.0 (2026-03-10)
New features
IV-Feat.1 Added the standalone ImageViewer component for image previews.
IV-Feat.2 Added the
prev / next / closehost composition protocol.IV-Feat.3 Kept switching free of motion for immediate feedback when opening, switching, and closing images.
Shared backdrop
Choose appearance with backdrop and click-to-close behavior with dismissMode; they are independent. The default changed from the old theme background at 92% opacity to the same opaque backdrop as Dialog. The background override variable remains compatible. See backdrop for implementation boundaries.