From 011a5d60947a18297e649d65186fbc2fdf436f8e Mon Sep 17 00:00:00 2001
From: David Di Biase <1168397+davedbase@users.noreply.github.com>
Date: Tue, 28 Jan 2025 09:00:59 -0500
Subject: [PATCH 1/3] Adding Bluesky and X to networks
---
packages/share/README.md | 14 ++++++++------
packages/share/package.json | 2 +-
packages/share/src/networks.ts | 2 ++
3 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/packages/share/README.md b/packages/share/README.md
index dab8a6aa0..3845f1121 100644
--- a/packages/share/README.md
+++ b/packages/share/README.md
@@ -29,14 +29,14 @@ pnpm add @solid-primitives/share
### How to use it
```ts
-import { createSocialShare, TWITTER } from "@solid-primitives/share";
+import { createSocialShare, BLUESKY } from "@solid-primitives/share";
const [share, close] = createSocialShare(() => ({
title: "SolidJS.com",
url: "https://www.solidjs.com",
description: "Simple and well-behaved reactivity!",
}));
-share(TWITTER);
+share(BLUESKY);
```
### Definition
@@ -67,6 +67,7 @@ The following are a list of supported networks that may be imported from the sha
| ------------- | ------------------ | ------------------ | ------------------ | ----------------------------------------------------------------------------------------------------------- |
| Baidu | :heavy_check_mark: | :heavy_check_mark: | :x: | |
| Buffer | :heavy_check_mark: | :heavy_check_mark: | :x: | |
+| Bluesky | :heavy_check_mark: | :heavy_check_mark: | :x: | |
| Email | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | |
| EverNote | :heavy_check_mark: | :heavy_check_mark: | :x: | |
| Facebook | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | `hashtags` A list of comma-separated hashtags, only the first one will be used.
`quote` Facebook quote. |
@@ -86,6 +87,7 @@ The following are a list of supported networks that may be imported from the sha
| Telegram | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | |
| Tumblr | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | |
| Twitter | :heavy_check_mark: | :heavy_check_mark: | :x: | `hashtags` A list of comma-separated hashtags.
`twitter-user` Twitter user to mention. |
+| X | :heavy_check_mark: | :heavy_check_mark: | :x: | `hashtags` A list of comma-separated hashtags.
`twitter-user` X user to mention. |
| Viber | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | |
| VK | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | `media` URL of an image describing the content. |
| Weibo | :heavy_check_mark: | :heavy_check_mark: | :x: | `media` URL of an image describing the content. |
@@ -94,7 +96,7 @@ The following are a list of supported networks that may be imported from the sha
| Xing | :heavy_check_mark: | :heavy_check_mark: | :x: | |
| Yammer | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | |
-For the networks: `Line`, `Skype`, `SMS`, `Telegram`, `Viber`, `WhatsApp` and `Yammer`; the shared content is a string of the form: "`$title` `$url` `$description`"
+For the networks: `Bluesky`, `Line`, `Skype`, `SMS`, `Telegram`, `Viber`, `WhatsApp` and `Yammer`; the shared content is a string of the form: "`$title` `$url` `$description`"
Note that you can also provide your own custom network by formatting the input string into the share function. The following is a list of properties that will be replaced by the utility:
@@ -104,12 +106,12 @@ Note that you can also provide your own custom network by formatting the input s
- `@q`: Quote
- `@h`: Hashtags
- `@m`: Media
-- `@tu`: TwitterUser (Twitter specific)
+- `@tu`: X User (X specific)
-The following is an example of Twitter's share string:
+The following is an example of X's share string:
```ts
-const twitter: Network = "https://twitter.com/intent/tweet?text=@t&url=@u&hashtags=@h@tu";
+const x: Network = "https://www.x.com/intent/tweet?text=@t&url=@u&hashtags=@h@tu";
```
### Demo
diff --git a/packages/share/package.json b/packages/share/package.json
index ee0483b33..ade4894ce 100644
--- a/packages/share/package.json
+++ b/packages/share/package.json
@@ -1,6 +1,6 @@
{
"name": "@solid-primitives/share",
- "version": "2.1.0",
+ "version": "2.2.0",
"description": "Primitives to help with sharing content on social media and beyond.",
"author": "David Di Biase ",
"contributors": [
diff --git a/packages/share/src/networks.ts b/packages/share/src/networks.ts
index cfbbb5afc..6e1b886da 100644
--- a/packages/share/src/networks.ts
+++ b/packages/share/src/networks.ts
@@ -16,6 +16,7 @@ export const BAIDU: Network = "http://cang.baidu.com/do/add?iu=@u&it=@t";
export const BUFFER: Network = "https://bufferapp.com/add?text=@t&url=@u";
export const EMAIL: Network = "mailto:?subject=@t&body=@u%0D%0A@d";
export const EVERNOTE: Network = "https://www.evernote.com/clip.action?url=@u&title=@t";
+export const BLUESKY: Network = "https://bsky.app/intent/compose?text=@t%0D%0A@u%0D%0A@d";
export const FACEBOOK: Network =
"https://www.facebook.com/sharer/sharer.php?u=@u&title=@t&description=@d"e=@q&hashtag=@h";
export const FLIPBOARD: Network =
@@ -38,6 +39,7 @@ export const STUMBLEUPON: Network = "https://www.stumbleupon.com/submit?url=@u&t
export const TELEGRAM: Network = "https://t.me/share/url?url=@u&text=@t%0D%0A@d";
export const TUMBLR: Network = "https://www.tumblr.com/share/link?url=@u&name=@t&description=@d";
export const TWITTER: Network = "https://twitter.com/intent/tweet?text=@t&url=@u&hashtags=@h@tu";
+export const X: Network = "https://www.x.com/intent/tweet?text=@t&url=@u&hashtags=@h@tu";
export const VIBER: Network = "viber://forward?text=@t%0D%0A@u%0D%0A@d";
export const VK: Network =
"https://vk.com/share.php?url=@u&title=@t&description=@d&image=@m&noparse=true";
From 00822ccb1ceb5a423e641cfc0f0b22c91a6f2a2a Mon Sep 17 00:00:00 2001
From: David Di Biase <1168397+davedbase@users.noreply.github.com>
Date: Tue, 28 Jan 2025 10:27:07 -0500
Subject: [PATCH 2/3] Added changeset properly
---
.changeset/plenty-pears-sniff.md | 5 +++++
packages/share/package.json | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
create mode 100644 .changeset/plenty-pears-sniff.md
diff --git a/.changeset/plenty-pears-sniff.md b/.changeset/plenty-pears-sniff.md
new file mode 100644
index 000000000..09d2abf1d
--- /dev/null
+++ b/.changeset/plenty-pears-sniff.md
@@ -0,0 +1,5 @@
+---
+"@solid-primitives/share": major
+---
+
+Added Bluesky and X networks
diff --git a/packages/share/package.json b/packages/share/package.json
index ade4894ce..ee0483b33 100644
--- a/packages/share/package.json
+++ b/packages/share/package.json
@@ -1,6 +1,6 @@
{
"name": "@solid-primitives/share",
- "version": "2.2.0",
+ "version": "2.1.0",
"description": "Primitives to help with sharing content on social media and beyond.",
"author": "David Di Biase ",
"contributors": [
From 220a8be390e7fa3e67598cb7db406092d3086e01 Mon Sep 17 00:00:00 2001
From: David Di Biase <1168397+davedbase@users.noreply.github.com>
Date: Tue, 28 Jan 2025 10:57:20 -0500
Subject: [PATCH 3/3] Change it to a minor update
---
.changeset/plenty-pears-sniff.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.changeset/plenty-pears-sniff.md b/.changeset/plenty-pears-sniff.md
index 09d2abf1d..1a4c9d73c 100644
--- a/.changeset/plenty-pears-sniff.md
+++ b/.changeset/plenty-pears-sniff.md
@@ -1,5 +1,5 @@
---
-"@solid-primitives/share": major
+"@solid-primitives/share": minor
---
Added Bluesky and X networks