@embedpdf/plugin-selection@2.15.0
Minor Changes
-
#685 by @simonmysun – Add
setSelection(range, documentId?)to the selection capability and document scope for programmatically applying or restoring a text selection.It accepts the same
SelectionRangeX({ start, end }glyph pointers) shape emitted byonSelectionChange, so a saved selection can be passed straight back in to restore it; passingnullclears the selection. Page geometry is loaded on demand, so the returned task resolves only once the highlight rects are computed. The range is normalized (start/end may be given in any order), invalid input (malformed range, non-integer/negative indices, out-of-bounds pages) is rejected, glyph indices are clamped to the available page geometry, and previously highlighted pages are repainted so switching to a disjoint selection no longer leaves stale highlights behind.
@embedpdf/core@2.15.0
Patch Changes
-
#703 by @berkayozdin – Make the precompiled Svelte output work on every Svelte 5 runtime
Svelte 5.56 changed the
excludeargument of the privaterest_propsruntime helper from an array (exclude.includes(key)) to aSet(exclude.has(key)). The*/svelteentry points ship precompiled component code, so output built against one side of that change throws on the other: the currently published packages fail withTypeError: exclude.has is not a functionon Svelte >= 5.56, which aborts the render of every EmbedPDF Svelte component.The Svelte build now routes those calls through a wrapper that hands the runtime an
excludevalue satisfying both contracts, so one published build stays valid across the wholesvelte: ">=5 <6"peer range.