Repository navigation
v2.0.0-beta.18
Pre-release
Pre-release
2.0.0-beta.18
Breaking
- The viewer tells whoever opened it with events instead of callbacks.
open(),openFolder()andcompare()resolve with aViewerSession, an
EventTargetdispatchingupdate:file,update:editing,closeand
before-download. They replace theonPrev,onNext,onEditingChange
andonCloseoptions.getViewer()dispatches the same events, whoever
opened the viewer (#130) compare(file, base, { view, handlerId })replaces
compare(node1, node2, handlerId). Both handler elements get
files: [base, file]and acomparisonprop, and the older file shows on
the left (#133)- A handler's
canCompareis a function of the files, likeenabled(#133) - The package is ESM only, the CommonJS build is gone. Its styles are no
longer injected from JavaScript: each chunk imports its own stylesheet, so
the app's bundler has to handle CSS imports (#124, #132)
Added
- A handler setting
canShowDifferencescan show what changed between two
files in one view. The viewer then offers a toggle in its header, also on D,
andcompare()can open straight on it withview: 'differences'(#133) - Two versions of a picture show over each other, cut where you drag a
slider (#134) before-downloadalso reaches the handler's element, and
detail.waitUntil()holds the download back, so an editor can save first
(#130)