unstale

npm / @embedpdf/plugin-selection

@embedpdf/plugin-selection

What changed in @embedpdf/plugin-selection 3, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-06.

17 breaking26 new APIs and options5 behavior and defaults1 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

@embedpdf/plugin-selection 349 changes

Breaking changes 17

  • Renames the drag setting to specify its unit in pixels.

    3.0.0release notes

  • Replaces menuAnchor with getAnchor and renames SelectionMenuAnchor to SelectionAnchor.

    3.0.0release notes

  • Replaces snapshot and now returns a reference-stable snapshot.

    3.0.0release notes

  • Replaces rectsForPage with listRects.

    3.0.0release notes

  • Replaces segmentsForPage with listSegments.

    3.0.0release notes

  • Replaces selectedPages with listSelectedPages.

    3.0.0release notes

  • Methods that return promises reject with not-ready when no document is available, consistently across frameworks.

    3.0.0release notes

  • Selection methods and related snapshots, endpoints, ranges, anchors, pointers, and selected-page results use page references.

    3.0.0release notes

  • Selection writes without doc.text.select now reject with permission-denied; unknown pages return not-found.

    3.0.0release notes

  • Requires doc.text.copy permission whether or not text is selected; a signal cancels the read immediately, while started page text is kept for the next read.

    3.0.0release notes

  • Requires its own doc.text.copy permission; a signal cancels the read immediately.

    3.0.0release notes

  • Replaces the abbreviated …Geom type names with SelectionHandleGeometry.

    3.0.0release notes

  • Replaces the abbreviated …Geom function names with selectionHandleGeometry().

    3.0.0release notes

  • Replaces beginAt with beginGestureAt.

    3.0.0release notes

  • Replaces ensurePage with ensureLoaded(page): Promise<void>.

    3.0.0release notes

  • The host gesture-state method is replaced as the public state API by isSelecting().

    3.0.0release notes

  • Pages now carries segments only; boxes are available as derived views through segment.rect and rectsForPage().

    3.0.0release notes

New APIs and options 26

  • Adds handle-arming behavior that records the grabbed point and starts the drag from the opposite end.

    3.0.0release notes

  • Adds a public geometry export for selection page geometry.

    3.0.0release notes

  • Adds a live selection color setting; null follows the viewer accent, with selected text shown at 35%.

    3.0.0release notes

  • Adds a public geometry export for converting a content point to PDF coordinates.

    3.0.0release notes

  • Adds a bundle-safe public contract entry for sibling features to use selection protocols without plugin wiring.

    3.0.0release notes

  • Adds a bundle-safe host contract entry for selection protocols.

    3.0.0release notes

  • Adds text selection independent of a framework, using engine text geometry and exposing highlight geometry through the shared interaction system.

    3.0.0release notes

  • Adds access to the selection range.

    3.0.0release notes

  • Adds access to current selection settings.

    3.0.0release notes

  • Adds live handle settings, including color and shadow.

    3.0.0release notes

  • Adds a kernel event hook emitted at gesture end and carrying the range.

    3.0.0release notes

  • Adds an event hook for selection setting changes.

    3.0.0release notes

  • Adds text extraction for a specified range.

    3.0.0release notes

  • Adds an API to reset selection settings.

    3.0.0release notes

  • The plugin is rewritten around the kernel create() controller hook and exposes a public contract and host lens.

    3.0.0release notes

  • Adds a configurable drag threshold in place of the hard-coded threshold.

    3.0.0release notes

  • Returns both selection endpoints or null.

    3.0.0release notes

  • Adds a handle view over a Stage.

    3.0.0release notes

  • Accepts configuration and registers live settings over SELECTION_DEFAULTS.

    3.0.0release notes

  • Declares selection state across frameworks with hasSelection, isSelecting, range, and pages.

    3.0.0release notes

  • Adds a named type for the selection state returned by the state hook.

    3.0.0release notes

  • Adds an API to select a page.

    3.0.0release notes

  • Adds a public geometry export for content segments.

    3.0.0release notes

  • Adds a public geometry export for content text quads.

    3.0.0release notes

  • Adds an API to update live selection settings across documents.

    3.0.0release notes

  • Returns the named SelectionState type.

    3.0.0release notes

Behavior and default changes 5

  • Makes selection extension available publicly; it was previously host-only.

    3.0.0release notes

  • Adds framework-independent handle geometry and drag policies that account for rotated text, rotated pages, and RTL selection boundaries.

    3.0.0release notes

  • Makes line-at-point selection available publicly; it was previously host-only.

    3.0.0release notes

  • Makes word-at-point selection available publicly; it was previously host-only.

    3.0.0release notes

  • Routes touch long-press selection through explicit gesture metadata, reports whether word or line selection succeeded, and supports optional feedback without swallowing unhandled gestures.

    3.0.0release notes

Fixes and other changes 1

  • Re-reads a page's text geometry after an annotation is flattened into it, making text added by a flattened free-text note selectable.

    3.0.0release notes