-
✨
9d6603dThanks @anIcedAntFA! - ## Rich Clipboard APIAdds full support for writing and reading rich content (HTML + plain-text pairs) using the Clipboard Items API, with framework adapters for React, Vue, and Svelte.
New exports:
copyRichContent(content, options?)— Writes aRichContentobject ({ html, plain }) to the clipboard usingClipboardItem. Automatically guards for SSR. CallsonErrorwithRICH_CLIPBOARD_NOT_SUPPORTEDwhen the Clipboard Items API is unavailable.readRichContent()— Reads the richest available MIME type from the clipboard (text/htmlif present, falling back totext/plain). ReturnsRichContent | null.isRichClipboardSupported()— ReturnstruewhenClipboardItemis available in the current environment.RichContenttype —{ html: string; plain: string }shape used by the rich clipboard API.RICH_CLIPBOARD_NOT_SUPPORTEDerror code added toErrorCode.
New exports:
useCopyRichContent(options?)— React hook that wrapscopyRichContent. Returns{ copyRich, copied, error, reset }. Mirrors theuseCopyToClipboardAPI shape for consistency.UseCopyRichContentOptionsandUseCopyRichContentResulttypes.
Fix: Added
typescondition to theexportsmap, fixing TypeScript module resolution undermoduleResolution: "bundler"and"node16".New exports:
useCopyRichContent(options?)— Vue 3 composable wrappingcopyRichContent. Returns{ copyRich, copied, error, reset }as refs. Mirrors theuseCopyToClipboardcomposable API shape.UseCopyRichContentOptionsandUseCopyRichContentResulttypes.
Fix: Added
typescondition to theexportsmap, fixing TypeScript module resolution undermoduleResolution: "bundler"and"node16".New exports:
copyRichAction— Svelte action (use:copyRichAction) that copies rich content on the target element's click event.CopyRichActionParamstype.useCopyRichContent()(via/runessubpath) — Svelte 5 runes-based hook returning reactive{ copyRich, copied, error, reset }state.useCopyRichContent()(via/storessubpath) — Svelte 4 stores-based equivalent using writable stores.UseCopyRichContentOptionsandUseCopyRichContentResulttypes (available on both subpaths).
Fix:
/runessubpath export (exports["./runes"]) now correctly points to the compileddist/runes.mjsinstead of the raw TypeScript source file.
All packages also received updated npm
keywordsanddescriptionfields for better discoverability.
- 🐞
7b4cbbcThanks @anIcedAntFA! - Addhomepagefield to package.json pointing to the repository README