From 604bf632ae480394d71b09673a1baf19165874a7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 12 Oct 2026 10:47:17 +0000 Subject: [PATCH] Version Packages --- .changeset/bright-windows-wave.md | 5 --- .changeset/calm-letters-break.md | 7 --- .changeset/clear-servers-meet.md | 5 --- .changeset/early-popups-open.md | 7 --- .changeset/fresh-colors-land.md | 5 --- .changeset/fresh-hosts-point.md | 7 --- .changeset/full-marks-grow.md | 5 --- .changeset/mean-pans-marry.md | 5 --- .changeset/navy-pencils-draw.md | 5 --- .changeset/new-ok-logo.md | 5 --- .changeset/new-threads-icon.md | 5 --- .changeset/odd-lions-share.md | 5 --- .changeset/plain-glyphs-swap.md | 5 --- .changeset/quiet-pockets-close.md | 7 --- .changeset/round-badges-return.md | 5 --- .changeset/silent-peaches-smell.md | 7 --- .changeset/small-keys-smash.md | 5 --- .changeset/sour-bulldogs-hunt.md | 5 --- .changeset/swifty-bulldogs-shop.md | 7 --- .changeset/tender-rivers-fly.md | 7 --- .changeset/three-icons-divide.md | 11 ----- .changeset/white-details-stay.md | 5 --- .changeset/wise-moles-travel.md | 5 --- .changeset/wise-years-rest.md | 12 ------ CHANGELOG.md | 69 ++++++++++++++++++++++++++++++ package.json | 2 +- 26 files changed, 70 insertions(+), 148 deletions(-) delete mode 100644 .changeset/bright-windows-wave.md delete mode 100644 .changeset/calm-letters-break.md delete mode 100644 .changeset/clear-servers-meet.md delete mode 100644 .changeset/early-popups-open.md delete mode 100644 .changeset/fresh-colors-land.md delete mode 100644 .changeset/fresh-hosts-point.md delete mode 100644 .changeset/full-marks-grow.md delete mode 100644 .changeset/mean-pans-marry.md delete mode 100644 .changeset/navy-pencils-draw.md delete mode 100644 .changeset/new-ok-logo.md delete mode 100644 .changeset/new-threads-icon.md delete mode 100644 .changeset/odd-lions-share.md delete mode 100644 .changeset/plain-glyphs-swap.md delete mode 100644 .changeset/quiet-pockets-close.md delete mode 100644 .changeset/round-badges-return.md delete mode 100644 .changeset/silent-peaches-smell.md delete mode 100644 .changeset/small-keys-smash.md delete mode 100644 .changeset/sour-bulldogs-hunt.md delete mode 100644 .changeset/swifty-bulldogs-shop.md delete mode 100644 .changeset/tender-rivers-fly.md delete mode 100644 .changeset/three-icons-divide.md delete mode 100644 .changeset/white-details-stay.md delete mode 100644 .changeset/wise-moles-travel.md delete mode 100644 .changeset/wise-years-rest.md diff --git a/.changeset/bright-windows-wave.md b/.changeset/bright-windows-wave.md deleted file mode 100644 index fbf62b74..00000000 --- a/.changeset/bright-windows-wave.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'react-share': minor ---- - -Add an `onShareWindowOpen` callback to popup-based share buttons. It receives the opened share window, or `null` when a popup blocker prevented it from opening, so apps can detect blocked popups and offer a fallback, as requested in #525. diff --git a/.changeset/calm-letters-break.md b/.changeset/calm-letters-break.md deleted file mode 100644 index 7544c403..00000000 --- a/.changeset/calm-letters-break.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'react-share': major ---- - -Change the default `EmailShareButton` `separator` from `" "` to `"\n"` so the shared URL appears on its own line below the email body. The new `buildEmailShareUrl` helper uses the same default. - -Reported in #582, where the URL was run together with the body text. Pass `separator=" "` to keep the previous formatting. diff --git a/.changeset/clear-servers-meet.md b/.changeset/clear-servers-meet.md deleted file mode 100644 index 622da8a3..00000000 --- a/.changeset/clear-servers-meet.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'react-share': minor ---- - -Mark the published ESM and CJS bundles with a `"use client"` directive so share buttons can be imported directly from React Server Components, such as Next.js App Router pages, without a local client wrapper. Requested in #491. diff --git a/.changeset/early-popups-open.md b/.changeset/early-popups-open.md deleted file mode 100644 index 0adda01d..00000000 --- a/.changeset/early-popups-open.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'react-share': major ---- - -Open the share popup synchronously when `beforeOnClick` returns a promise, then load the share URL into it once the promise resolves. If the promise rejects, sharing is cancelled and the popup is closed. - -Previously the popup was opened only after awaiting `beforeOnClick`. By then the click's user activation had expired, so Safari and other browsers with strict popup blockers silently blocked the share window (#525, #506, #529). Rejections from `beforeOnClick` also used to surface as unhandled promise rejections. diff --git a/.changeset/fresh-colors-land.md b/.changeset/fresh-colors-land.md deleted file mode 100644 index d5e2dfed..00000000 --- a/.changeset/fresh-colors-land.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'react-share': patch ---- - -Update five raw icons to their networks' current brand colors: `BlueskyIcon` (`#0560FF`), `LineIcon` (`#06C755`), `PinterestIcon` (`#E60023`), `TumblrIcon` (`#001935`), and `GabIcon` (`#30CE7D`). They used older or approximate colors before. The legacy icons keep their v5 colors. diff --git a/.changeset/fresh-hosts-point.md b/.changeset/fresh-hosts-point.md deleted file mode 100644 index 155eccda..00000000 --- a/.changeset/fresh-hosts-point.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'react-share': patch ---- - -Use the current share endpoints for X (`https://x.com/intent/post`), Threads (`https://www.threads.com/intent/post`), and Telegram (`https://t.me/share/url`). - -The old `twitter.com`, `threads.net`, and `telegram.me` hosts only keep working through redirects, which add an extra hop and can drop the share intent if those redirects are retired. Requested in #536. diff --git a/.changeset/full-marks-grow.md b/.changeset/full-marks-grow.md deleted file mode 100644 index ccf5d0fc..00000000 --- a/.changeset/full-marks-grow.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'react-share': patch ---- - -Draw the raw `LinkedinIcon` and `GabIcon` at full size. They reused the small glyphs from the badge icons without their backgrounds, so they filled less than half of the icon box and looked tiny next to the other raw icons. `LinkedinIcon` now uses the full rounded-square "in" mark in LinkedIn's current `#0A66C2` blue, and `GabIcon` puts the wordmark on a rounded green square. diff --git a/.changeset/mean-pans-marry.md b/.changeset/mean-pans-marry.md deleted file mode 100644 index ff9336ac..00000000 --- a/.changeset/mean-pans-marry.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'react-share': major ---- - -Remove all deprecated share count exports in v6, including the underlying share count implementation and the `jsonp` dependency that previously powered them. diff --git a/.changeset/navy-pencils-draw.md b/.changeset/navy-pencils-draw.md deleted file mode 100644 index 239159bb..00000000 --- a/.changeset/navy-pencils-draw.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'react-share': minor ---- - -Draw the raw `LivejournalIcon` pencil in navy and white like the official LiveJournal logo. The pencil used to be cut out of the blue circle, so it took on the page background instead of its own colors. diff --git a/.changeset/new-ok-logo.md b/.changeset/new-ok-logo.md deleted file mode 100644 index 1cbc3827..00000000 --- a/.changeset/new-ok-logo.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'react-share': minor ---- - -Update the raw `OKIcon` to the 2023 OK logo: a white figure on an orange (`#FF7700`) rounded square, as served on ok.ru. The previous bare glyph was the old mark in an older orange. diff --git a/.changeset/new-threads-icon.md b/.changeset/new-threads-icon.md deleted file mode 100644 index 26e68bcc..00000000 --- a/.changeset/new-threads-icon.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'react-share': minor ---- - -Update the raw `ThreadsIcon` to the 2026 Threads app icon: a white glyph on a black rounded square. The previous bare glyph was the old mark and looked lighter than the other raw icons. diff --git a/.changeset/odd-lions-share.md b/.changeset/odd-lions-share.md deleted file mode 100644 index 142e56b2..00000000 --- a/.changeset/odd-lions-share.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'react-share': major ---- - -Remove the deprecated `TwitterShareButton` and `TwitterIcon` aliases in v6. Use `XShareButton` and `XIcon` instead. diff --git a/.changeset/plain-glyphs-swap.md b/.changeset/plain-glyphs-swap.md deleted file mode 100644 index 89804d68..00000000 --- a/.changeset/plain-glyphs-swap.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'react-share': minor ---- - -Use the Lucide mail and share glyphs for the raw `EmailIcon` and `NativeShareIcon`. The previous glyphs were small badge glyphs on a 64x64 viewBox and looked undersized next to the other raw icons. diff --git a/.changeset/quiet-pockets-close.md b/.changeset/quiet-pockets-close.md deleted file mode 100644 index 0edca288..00000000 --- a/.changeset/quiet-pockets-close.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'react-share': major ---- - -Remove `PocketShareButton`, `PocketIcon`, `PocketLegacyIcon`, and `buildPocketShareUrl`, as well as `WorkplaceShareButton`, `WorkplaceIcon`, `WorkplaceLegacyIcon`, and `buildWorkplaceShareUrl`. - -Pocket shut down in July 2025 and Workplace from Meta shut down in June 2026, so these buttons could only open dead share pages. diff --git a/.changeset/round-badges-return.md b/.changeset/round-badges-return.md deleted file mode 100644 index 31af6923..00000000 --- a/.changeset/round-badges-return.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'react-share': minor ---- - -Put glyph-only raw icons on circle badges so every raw icon has a similar visual weight, like the v5 badges had. `XIcon`, `WeiboIcon`, `BlueskyIcon`, `EmailIcon`, `NativeShareIcon`, `InstapaperIcon`, and `TumblrIcon` now sit on a circle. The glyph is always drawn in white, so it stays legible on dark backgrounds. `NativeShareIcon` now uses a fixed blue (`#0A84FF`) instead of the current text color, which would hide the white glyph on dark pages. diff --git a/.changeset/silent-peaches-smell.md b/.changeset/silent-peaches-smell.md deleted file mode 100644 index 2fedf774..00000000 --- a/.changeset/silent-peaches-smell.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'react-share': minor ---- - -Add an explicit `mobileBehavior` prop to `FacebookMessengerShareButton`, `TelegramShareButton`, `ViberShareButton`, and `WhatsappShareButton`. - -This follows recurring mobile browser and app-handoff reports in #577, #551, #529, and #357. The new prop keeps web sharing as the default while allowing best-effort app-link behavior with `mobileBehavior="app"` or `mobileBehavior="auto"`. diff --git a/.changeset/small-keys-smash.md b/.changeset/small-keys-smash.md deleted file mode 100644 index e3461828..00000000 --- a/.changeset/small-keys-smash.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'react-share': minor ---- - -Add low-level helper exports for advanced usage in v6, including per-network `build*ShareUrl` helpers and `openShareWindow(url, options)`. diff --git a/.changeset/sour-bulldogs-hunt.md b/.changeset/sour-bulldogs-hunt.md deleted file mode 100644 index b95cc994..00000000 --- a/.changeset/sour-bulldogs-hunt.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'react-share': major ---- - -Drop React 17 support in v6 and require React 18 or 19 via `peerDependencies`. diff --git a/.changeset/swifty-bulldogs-shop.md b/.changeset/swifty-bulldogs-shop.md deleted file mode 100644 index 1812c408..00000000 --- a/.changeset/swifty-bulldogs-shop.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'react-share': major ---- - -Remove `title`, `summary`, and `source` from `LinkedinShareButton` and make `buildLinkedinShareUrl` URL-only. - -This follows the long-running LinkedIn compatibility problems in #550 and #362. LinkedIn no longer provides a reliable public URL-based way to prefill those fields, so v6 stops exposing them as if they were dependable. diff --git a/.changeset/tender-rivers-fly.md b/.changeset/tender-rivers-fly.md deleted file mode 100644 index 2d6fc6ae..00000000 --- a/.changeset/tender-rivers-fly.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'react-share': minor ---- - -Add `canNativeShare(data)`, `shareNative(data)`, `NativeShareButton`, and a generic `NativeShareIcon` for browser-native sharing flows. - -This gives mobile and PWA use cases a first-class Web Share API path instead of forcing them through network-specific popup URLs, which is especially relevant for requests like #576 and the iOS/PWA limitations described in #551. diff --git a/.changeset/three-icons-divide.md b/.changeset/three-icons-divide.md deleted file mode 100644 index 8e38ba59..00000000 --- a/.changeset/three-icons-divide.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -'react-share': major ---- - -Split the icon exports into raw and legacy families for v6. - -The existing `*Icon` exports now render SVG logos that are closer to the underlying network marks. The previous badge-style icons remain available as `*LegacyIcon` exports with the existing `round`, `borderRadius`, `bgStyle`, and `iconFillColor` props. - -If you want to preserve the v5 visuals, rename imports such as `FacebookIcon` to `FacebookLegacyIcon`, `XIcon` to `XLegacyIcon`, and `WhatsappIcon` to `WhatsappLegacyIcon`. - -If you keep the `*Icon` names, note that raw icons default to `size={24}` instead of `64`, and no longer accept `round`, `borderRadius`, `bgStyle`, or `iconFillColor`. diff --git a/.changeset/white-details-stay.md b/.changeset/white-details-stay.md deleted file mode 100644 index 5a6c0866..00000000 --- a/.changeset/white-details-stay.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'react-share': minor ---- - -Keep raw icon details white on dark backgrounds. Details cut out of the brand shape, such as the Facebook "f", the LinkedIn "in", the LINE lettering, and the inside of the WhatsApp and Viber bubbles, used to show the page background through them, so the logos turned into dark blobs on dark pages. `color` still recolors the brand-colored part of the icon. diff --git a/.changeset/wise-moles-travel.md b/.changeset/wise-moles-travel.md deleted file mode 100644 index e24a906a..00000000 --- a/.changeset/wise-moles-travel.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'react-share': major ---- - -Remove the deprecated `hashtags`, `related`, and `via` props from `ThreadsShareButton` in v6. Those props were ignored in v5 and were kept only for compatibility ahead of this major release. diff --git a/.changeset/wise-years-rest.md b/.changeset/wise-years-rest.md deleted file mode 100644 index af9aa0ec..00000000 --- a/.changeset/wise-years-rest.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -'react-share': major ---- - -Replace the share button `title` prop with explicit v6 payload names: - -- `text` for Bluesky, Gab, Line, Telegram, Threads, and X -- `message` for WhatsApp and Viber -- `shareTitle` for Hatena, Instapaper, LiveJournal, Mail.ru, OK, Reddit, VK, and Weibo -- `postTitle` for Tumblr - -`htmlTitle` remains the native button tooltip/title attribute. diff --git a/CHANGELOG.md b/CHANGELOG.md index 9af58bf7..caf9af4d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,74 @@ # Changelog +## 6.0.0 + +### Major Changes + +- a811bc3: Change the default `EmailShareButton` `separator` from `" "` to `"\n"` so the shared URL appears on its own line below the email body. The new `buildEmailShareUrl` helper uses the same default. + + Reported in #582, where the URL was run together with the body text. Pass `separator=" "` to keep the previous formatting. + +- 5bb43a5: Open the share popup synchronously when `beforeOnClick` returns a promise, then load the share URL into it once the promise resolves. If the promise rejects, sharing is cancelled and the popup is closed. + + Previously the popup was opened only after awaiting `beforeOnClick`. By then the click's user activation had expired, so Safari and other browsers with strict popup blockers silently blocked the share window (#525, #506, #529). Rejections from `beforeOnClick` also used to surface as unhandled promise rejections. + +- e72b45e: Remove all deprecated share count exports in v6, including the underlying share count implementation and the `jsonp` dependency that previously powered them. +- 2dc35f2: Remove the deprecated `TwitterShareButton` and `TwitterIcon` aliases in v6. Use `XShareButton` and `XIcon` instead. +- 05c4997: Remove `PocketShareButton`, `PocketIcon`, `PocketLegacyIcon`, and `buildPocketShareUrl`, as well as `WorkplaceShareButton`, `WorkplaceIcon`, `WorkplaceLegacyIcon`, and `buildWorkplaceShareUrl`. + + Pocket shut down in July 2025 and Workplace from Meta shut down in June 2026, so these buttons could only open dead share pages. + +- 20570c5: Drop React 17 support in v6 and require React 18 or 19 via `peerDependencies`. +- 08b5638: Remove `title`, `summary`, and `source` from `LinkedinShareButton` and make `buildLinkedinShareUrl` URL-only. + + This follows the long-running LinkedIn compatibility problems in #550 and #362. LinkedIn no longer provides a reliable public URL-based way to prefill those fields, so v6 stops exposing them as if they were dependable. + +- 22249a6: Split the icon exports into raw and legacy families for v6. + + The existing `*Icon` exports now render SVG logos that are closer to the underlying network marks. The previous badge-style icons remain available as `*LegacyIcon` exports with the existing `round`, `borderRadius`, `bgStyle`, and `iconFillColor` props. + + If you want to preserve the v5 visuals, rename imports such as `FacebookIcon` to `FacebookLegacyIcon`, `XIcon` to `XLegacyIcon`, and `WhatsappIcon` to `WhatsappLegacyIcon`. + + If you keep the `*Icon` names, note that raw icons default to `size={24}` instead of `64`, and no longer accept `round`, `borderRadius`, `bgStyle`, or `iconFillColor`. + +- b2c18ff: Remove the deprecated `hashtags`, `related`, and `via` props from `ThreadsShareButton` in v6. Those props were ignored in v5 and were kept only for compatibility ahead of this major release. +- 28da248: Replace the share button `title` prop with explicit v6 payload names: + - `text` for Bluesky, Gab, Line, Telegram, Threads, and X + - `message` for WhatsApp and Viber + - `shareTitle` for Hatena, Instapaper, LiveJournal, Mail.ru, OK, Reddit, VK, and Weibo + - `postTitle` for Tumblr + + `htmlTitle` remains the native button tooltip/title attribute. + +### Minor Changes + +- 7996b59: Add an `onShareWindowOpen` callback to popup-based share buttons. It receives the opened share window, or `null` when a popup blocker prevented it from opening, so apps can detect blocked popups and offer a fallback, as requested in #525. +- 98bb140: Mark the published ESM and CJS bundles with a `"use client"` directive so share buttons can be imported directly from React Server Components, such as Next.js App Router pages, without a local client wrapper. Requested in #491. +- 2ff01f4: Draw the raw `LivejournalIcon` pencil in navy and white like the official LiveJournal logo. The pencil used to be cut out of the blue circle, so it took on the page background instead of its own colors. +- 7f896ad: Update the raw `OKIcon` to the 2023 OK logo: a white figure on an orange (`#FF7700`) rounded square, as served on ok.ru. The previous bare glyph was the old mark in an older orange. +- 82f732f: Update the raw `ThreadsIcon` to the 2026 Threads app icon: a white glyph on a black rounded square. The previous bare glyph was the old mark and looked lighter than the other raw icons. +- 17a51d2: Use the Lucide mail and share glyphs for the raw `EmailIcon` and `NativeShareIcon`. The previous glyphs were small badge glyphs on a 64x64 viewBox and looked undersized next to the other raw icons. +- 57ddea2: Put glyph-only raw icons on circle badges so every raw icon has a similar visual weight, like the v5 badges had. `XIcon`, `WeiboIcon`, `BlueskyIcon`, `EmailIcon`, `NativeShareIcon`, `InstapaperIcon`, and `TumblrIcon` now sit on a circle. The glyph is always drawn in white, so it stays legible on dark backgrounds. `NativeShareIcon` now uses a fixed blue (`#0A84FF`) instead of the current text color, which would hide the white glyph on dark pages. +- e05b396: Add an explicit `mobileBehavior` prop to `FacebookMessengerShareButton`, `TelegramShareButton`, `ViberShareButton`, and `WhatsappShareButton`. + + This follows recurring mobile browser and app-handoff reports in #577, #551, #529, and #357. The new prop keeps web sharing as the default while allowing best-effort app-link behavior with `mobileBehavior="app"` or `mobileBehavior="auto"`. + +- f978a65: Add low-level helper exports for advanced usage in v6, including per-network `build*ShareUrl` helpers and `openShareWindow(url, options)`. +- 9e44ba2: Add `canNativeShare(data)`, `shareNative(data)`, `NativeShareButton`, and a generic `NativeShareIcon` for browser-native sharing flows. + + This gives mobile and PWA use cases a first-class Web Share API path instead of forcing them through network-specific popup URLs, which is especially relevant for requests like #576 and the iOS/PWA limitations described in #551. + +- f708c54: Keep raw icon details white on dark backgrounds. Details cut out of the brand shape, such as the Facebook "f", the LinkedIn "in", the LINE lettering, and the inside of the WhatsApp and Viber bubbles, used to show the page background through them, so the logos turned into dark blobs on dark pages. `color` still recolors the brand-colored part of the icon. + +### Patch Changes + +- e72d4f3: Update five raw icons to their networks' current brand colors: `BlueskyIcon` (`#0560FF`), `LineIcon` (`#06C755`), `PinterestIcon` (`#E60023`), `TumblrIcon` (`#001935`), and `GabIcon` (`#30CE7D`). They used older or approximate colors before. The legacy icons keep their v5 colors. +- 4aa9052: Use the current share endpoints for X (`https://x.com/intent/post`), Threads (`https://www.threads.com/intent/post`), and Telegram (`https://t.me/share/url`). + + The old `twitter.com`, `threads.net`, and `telegram.me` hosts only keep working through redirects, which add an extra hop and can drop the share intent if those redirects are retired. Requested in #536. + +- 71e21b3: Draw the raw `LinkedinIcon` and `GabIcon` at full size. They reused the small glyphs from the badge icons without their backgrounds, so they filled less than half of the icon box and looked tiny next to the other raw icons. `LinkedinIcon` now uses the full rounded-square "in" mark in LinkedIn's current `#0A66C2` blue, and `GabIcon` puts the wordmark on a rounded green square. + ## 5.3.0 ### Minor Changes diff --git a/package.json b/package.json index 4ef3197c..f04adc93 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-share", - "version": "5.3.0", + "version": "6.0.0", "description": "Social media share buttons for React.", "type": "module", "main": "./dist/index.cjs",