react-native-share 7.6.1 → 7.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -12,7 +12,7 @@ This gives you the power to prioritize our work and support the project contribu
12
12
 
13
13
  [![issuehunt-image](https://issuehunt.io/static/embed/issuehunt-button-v1.svg)](https://issuehunt.io/repos/43406976)
14
14
 
15
- # Getting started
15
+ # Getting started 🚀
16
16
 
17
17
  ---
18
18
 
@@ -98,14 +98,14 @@ public class FacebookStoriesShare extends SingleShareIntent {
98
98
  backgroundFileName = options.getString("backgroundVideo");
99
99
  }
100
100
 
101
- ShareFile backgroundAsset = new ShareFile(backgroundFileName, "background", useInternalStorage, this.reactContext);
101
+ ShareFile backgroundAsset = new ShareFile(backgroundFileName, "image/jpeg", "background", useInternalStorage, this.reactContext);
102
102
 
103
103
  this.intent.setDataAndType(backgroundAsset.getURI(), backgroundAsset.getType());
104
104
  this.intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
105
105
  }
106
106
 
107
107
  if (this.hasValidKey("stickerImage", options)) {
108
- ShareFile stickerAsset = new ShareFile(options.getString("stickerImage"), "sticker", useInternalStorage, this.reactContext);
108
+ ShareFile stickerAsset = new ShareFile(options.getString("stickerImage"), "image/png", "sticker", useInternalStorage, this.reactContext);
109
109
 
110
110
  if (!hasBackgroundAsset) {
111
111
  this.intent.setType("image/*");
@@ -1 +1 @@
1
- {"version":3,"sources":["types.ts"],"names":["Social","ShareAsset"],"mappings":";;;;;;IAAYA,M;;;WAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;GAAAA,M,sBAAAA,M;;IAoBAC,U;;;WAAAA,U;AAAAA,EAAAA,U;AAAAA,EAAAA,U;AAAAA,EAAAA,U;AAAAA,EAAAA,U;GAAAA,U,0BAAAA,U","sourcesContent":["export enum Social {\n Facebook = 'facebook',\n FacebookStories = 'facebookstories',\n Pagesmanager = 'pagesmanager',\n Twitter = 'twitter',\n Whatsapp = 'whatsapp',\n Whatsappbusiness = 'whatsappbusiness',\n Instagram = 'instagram',\n InstagramStories = 'instagramstories',\n Googleplus = 'googleplus',\n Email = 'email',\n Pinterest = 'pinterest',\n Linkedin = 'linkedin',\n Sms = 'sms',\n Telegram = 'telegram',\n Snapchat = 'snapchat',\n Messenger = 'messenger',\n Viber = 'viber',\n}\n\nexport enum ShareAsset {\n BackgroundImage = 'shareBackgroundImage',\n BackgroundVideo = 'shareBackgroundVideo',\n StickerImage = 'shareStickerImage',\n BackgroundAndStickerImage = 'shareBackgroundAndStickerImage',\n}\n\nexport interface LinkMetadata {\n originalUrl?: string;\n url?: string;\n title?: string;\n icon?: string;\n image?: string;\n remoteVideoUrl?: string;\n video?: string;\n}\n\nexport interface ActivityItem {\n type: 'text' | 'url';\n content: string;\n}\n\nexport interface ActivityItemSource {\n placeholderItem: ActivityItem;\n item: { [key in ActivityType]?: ActivityItem | null | undefined };\n subject?: { [key in ActivityType]?: string };\n dataTypeIdentifier?: { [key in ActivityType]?: string };\n thumbnailImage?: { [key in ActivityType]?: string };\n linkMetadata?: LinkMetadata;\n}\n\ninterface BaseShareSingleOptions {\n urls?: string[];\n url?: string;\n type?: string;\n filename?: string;\n message?: string;\n title?: string;\n subject?: string;\n email?: string;\n recipient?: string;\n social: Exclude<Social, Social.FacebookStories | Social.InstagramStories>;\n forceDialog?: boolean;\n}\n\ninterface BaseSocialStoriesShareSingleOptions extends Omit<BaseShareSingleOptions, 'social'> {\n backgroundImage?: string;\n stickerImage?: string;\n backgroundBottomColor?: string;\n backgroundTopColor?: string;\n attributionURL?: string;\n backgroundVideo?: string;\n}\n\nexport interface InstagramStoriesShareSingleOptions extends BaseSocialStoriesShareSingleOptions {\n social: Social.InstagramStories;\n}\n\nexport interface FacebookStoriesShareSingleOptions extends BaseSocialStoriesShareSingleOptions {\n social: Social.FacebookStories;\n method: Exclude<ShareAsset, ShareAsset.BackgroundVideo>;\n appId: string;\n}\n\nexport type ShareSingleOptions =\n | BaseShareSingleOptions\n | InstagramStoriesShareSingleOptions\n | FacebookStoriesShareSingleOptions;\n\nexport interface ShareOptions {\n message?: string;\n title?: string;\n url?: string;\n urls?: string[];\n type?: string;\n subject?: string;\n email?: string;\n recipient?: string;\n excludedActivityTypes?: ActivityType[];\n failOnCancel?: boolean;\n showAppsToView?: boolean;\n filename?: string;\n filenames?: string[];\n saveToFiles?: boolean;\n activityItemSources?: ActivityItemSource[];\n isNewTask?: boolean;\n}\n\nexport type ActivityType =\n | 'default'\n | 'addToReadingList'\n | 'airDrop'\n | 'assignToContact'\n | 'copyToPasteBoard'\n | 'mail'\n | 'message'\n | 'openInIBooks' // iOS 9 or later\n | 'postToFacebook'\n | 'postToFlickr'\n | 'postToTencentWeibo'\n | 'postToTwitter'\n | 'postToVimeo'\n | 'postToWeibo'\n | 'print'\n | 'saveToCameraRoll'\n | 'markupAsPDF'; // iOS 11 or late\n\nexport interface ShareSingleResult {\n message: string;\n success: boolean;\n}\n\nexport interface ShareOpenResult extends ShareSingleResult {\n dismissedAction?: boolean;\n}\nexport interface IsPackageInstalledResult {\n message: string;\n isInstalled: boolean;\n}\n"]}
1
+ {"version":3,"sources":["types.ts"],"names":["Social","ShareAsset"],"mappings":";;;;;;IAAYA,M;;;WAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;GAAAA,M,sBAAAA,M;;IAoBAC,U;;;WAAAA,U;AAAAA,EAAAA,U;AAAAA,EAAAA,U;AAAAA,EAAAA,U;AAAAA,EAAAA,U;GAAAA,U,0BAAAA,U","sourcesContent":["export enum Social {\n Facebook = 'facebook',\n FacebookStories = 'facebookstories',\n Pagesmanager = 'pagesmanager',\n Twitter = 'twitter',\n Whatsapp = 'whatsapp',\n Whatsappbusiness = 'whatsappbusiness',\n Instagram = 'instagram',\n InstagramStories = 'instagramstories',\n Googleplus = 'googleplus',\n Email = 'email',\n Pinterest = 'pinterest',\n Linkedin = 'linkedin',\n Sms = 'sms',\n Telegram = 'telegram',\n Snapchat = 'snapchat',\n Messenger = 'messenger',\n Viber = 'viber',\n}\n\nexport enum ShareAsset {\n BackgroundImage = 'shareBackgroundImage',\n BackgroundVideo = 'shareBackgroundVideo',\n StickerImage = 'shareStickerImage',\n BackgroundAndStickerImage = 'shareBackgroundAndStickerImage',\n}\n\nexport interface LinkMetadata {\n originalUrl?: string;\n url?: string;\n title?: string;\n icon?: string;\n image?: string;\n remoteVideoUrl?: string;\n video?: string;\n}\n\nexport interface ActivityItem {\n type: 'text' | 'url';\n content: string;\n}\n\nexport interface ActivityItemSource {\n placeholderItem: ActivityItem;\n item: { [key in ActivityType]?: ActivityItem | null | undefined };\n subject?: { [key in ActivityType]?: string };\n dataTypeIdentifier?: { [key in ActivityType]?: string };\n thumbnailImage?: { [key in ActivityType]?: string };\n linkMetadata?: LinkMetadata;\n}\n\ninterface BaseShareSingleOptions {\n urls?: string[];\n url?: string;\n type?: string;\n filename?: string;\n message?: string;\n title?: string;\n subject?: string;\n email?: string;\n recipient?: string;\n social: Exclude<Social, Social.FacebookStories | Social.InstagramStories>;\n forceDialog?: boolean;\n}\n\ninterface BaseSocialStoriesShareSingleOptions extends Omit<BaseShareSingleOptions, 'social'> {\n backgroundImage?: string;\n stickerImage?: string;\n backgroundBottomColor?: string;\n backgroundTopColor?: string;\n attributionURL?: string;\n backgroundVideo?: string;\n}\n\nexport interface InstagramStoriesShareSingleOptions extends BaseSocialStoriesShareSingleOptions {\n social: Social.InstagramStories;\n}\n\nexport interface FacebookStoriesShareSingleOptions extends BaseSocialStoriesShareSingleOptions {\n social: Social.FacebookStories;\n appId: string;\n}\n\nexport type ShareSingleOptions =\n | BaseShareSingleOptions\n | InstagramStoriesShareSingleOptions\n | FacebookStoriesShareSingleOptions;\n\nexport interface ShareOptions {\n message?: string;\n title?: string;\n url?: string;\n urls?: string[];\n type?: string;\n subject?: string;\n email?: string;\n recipient?: string;\n excludedActivityTypes?: ActivityType[];\n failOnCancel?: boolean;\n showAppsToView?: boolean;\n filename?: string;\n filenames?: string[];\n saveToFiles?: boolean;\n activityItemSources?: ActivityItemSource[];\n isNewTask?: boolean;\n}\n\nexport type ActivityType =\n | 'default'\n | 'addToReadingList'\n | 'airDrop'\n | 'assignToContact'\n | 'copyToPasteBoard'\n | 'mail'\n | 'message'\n | 'openInIBooks' // iOS 9 or later\n | 'postToFacebook'\n | 'postToFlickr'\n | 'postToTencentWeibo'\n | 'postToTwitter'\n | 'postToVimeo'\n | 'postToWeibo'\n | 'print'\n | 'saveToCameraRoll'\n | 'markupAsPDF'; // iOS 11 or late\n\nexport interface ShareSingleResult {\n message: string;\n success: boolean;\n}\n\nexport interface ShareOpenResult extends ShareSingleResult {\n dismissedAction?: boolean;\n}\nexport interface IsPackageInstalledResult {\n message: string;\n isInstalled: boolean;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["types.ts"],"names":["Social","ShareAsset"],"mappings":"AAAA,WAAYA,MAAZ;;WAAYA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;GAAAA,M,KAAAA,M;;AAoBZ,WAAYC,UAAZ;;WAAYA,U;AAAAA,EAAAA,U;AAAAA,EAAAA,U;AAAAA,EAAAA,U;AAAAA,EAAAA,U;GAAAA,U,KAAAA,U","sourcesContent":["export enum Social {\n Facebook = 'facebook',\n FacebookStories = 'facebookstories',\n Pagesmanager = 'pagesmanager',\n Twitter = 'twitter',\n Whatsapp = 'whatsapp',\n Whatsappbusiness = 'whatsappbusiness',\n Instagram = 'instagram',\n InstagramStories = 'instagramstories',\n Googleplus = 'googleplus',\n Email = 'email',\n Pinterest = 'pinterest',\n Linkedin = 'linkedin',\n Sms = 'sms',\n Telegram = 'telegram',\n Snapchat = 'snapchat',\n Messenger = 'messenger',\n Viber = 'viber',\n}\n\nexport enum ShareAsset {\n BackgroundImage = 'shareBackgroundImage',\n BackgroundVideo = 'shareBackgroundVideo',\n StickerImage = 'shareStickerImage',\n BackgroundAndStickerImage = 'shareBackgroundAndStickerImage',\n}\n\nexport interface LinkMetadata {\n originalUrl?: string;\n url?: string;\n title?: string;\n icon?: string;\n image?: string;\n remoteVideoUrl?: string;\n video?: string;\n}\n\nexport interface ActivityItem {\n type: 'text' | 'url';\n content: string;\n}\n\nexport interface ActivityItemSource {\n placeholderItem: ActivityItem;\n item: { [key in ActivityType]?: ActivityItem | null | undefined };\n subject?: { [key in ActivityType]?: string };\n dataTypeIdentifier?: { [key in ActivityType]?: string };\n thumbnailImage?: { [key in ActivityType]?: string };\n linkMetadata?: LinkMetadata;\n}\n\ninterface BaseShareSingleOptions {\n urls?: string[];\n url?: string;\n type?: string;\n filename?: string;\n message?: string;\n title?: string;\n subject?: string;\n email?: string;\n recipient?: string;\n social: Exclude<Social, Social.FacebookStories | Social.InstagramStories>;\n forceDialog?: boolean;\n}\n\ninterface BaseSocialStoriesShareSingleOptions extends Omit<BaseShareSingleOptions, 'social'> {\n backgroundImage?: string;\n stickerImage?: string;\n backgroundBottomColor?: string;\n backgroundTopColor?: string;\n attributionURL?: string;\n backgroundVideo?: string;\n}\n\nexport interface InstagramStoriesShareSingleOptions extends BaseSocialStoriesShareSingleOptions {\n social: Social.InstagramStories;\n}\n\nexport interface FacebookStoriesShareSingleOptions extends BaseSocialStoriesShareSingleOptions {\n social: Social.FacebookStories;\n method: Exclude<ShareAsset, ShareAsset.BackgroundVideo>;\n appId: string;\n}\n\nexport type ShareSingleOptions =\n | BaseShareSingleOptions\n | InstagramStoriesShareSingleOptions\n | FacebookStoriesShareSingleOptions;\n\nexport interface ShareOptions {\n message?: string;\n title?: string;\n url?: string;\n urls?: string[];\n type?: string;\n subject?: string;\n email?: string;\n recipient?: string;\n excludedActivityTypes?: ActivityType[];\n failOnCancel?: boolean;\n showAppsToView?: boolean;\n filename?: string;\n filenames?: string[];\n saveToFiles?: boolean;\n activityItemSources?: ActivityItemSource[];\n isNewTask?: boolean;\n}\n\nexport type ActivityType =\n | 'default'\n | 'addToReadingList'\n | 'airDrop'\n | 'assignToContact'\n | 'copyToPasteBoard'\n | 'mail'\n | 'message'\n | 'openInIBooks' // iOS 9 or later\n | 'postToFacebook'\n | 'postToFlickr'\n | 'postToTencentWeibo'\n | 'postToTwitter'\n | 'postToVimeo'\n | 'postToWeibo'\n | 'print'\n | 'saveToCameraRoll'\n | 'markupAsPDF'; // iOS 11 or late\n\nexport interface ShareSingleResult {\n message: string;\n success: boolean;\n}\n\nexport interface ShareOpenResult extends ShareSingleResult {\n dismissedAction?: boolean;\n}\nexport interface IsPackageInstalledResult {\n message: string;\n isInstalled: boolean;\n}\n"]}
1
+ {"version":3,"sources":["types.ts"],"names":["Social","ShareAsset"],"mappings":"AAAA,WAAYA,MAAZ;;WAAYA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;GAAAA,M,KAAAA,M;;AAoBZ,WAAYC,UAAZ;;WAAYA,U;AAAAA,EAAAA,U;AAAAA,EAAAA,U;AAAAA,EAAAA,U;AAAAA,EAAAA,U;GAAAA,U,KAAAA,U","sourcesContent":["export enum Social {\n Facebook = 'facebook',\n FacebookStories = 'facebookstories',\n Pagesmanager = 'pagesmanager',\n Twitter = 'twitter',\n Whatsapp = 'whatsapp',\n Whatsappbusiness = 'whatsappbusiness',\n Instagram = 'instagram',\n InstagramStories = 'instagramstories',\n Googleplus = 'googleplus',\n Email = 'email',\n Pinterest = 'pinterest',\n Linkedin = 'linkedin',\n Sms = 'sms',\n Telegram = 'telegram',\n Snapchat = 'snapchat',\n Messenger = 'messenger',\n Viber = 'viber',\n}\n\nexport enum ShareAsset {\n BackgroundImage = 'shareBackgroundImage',\n BackgroundVideo = 'shareBackgroundVideo',\n StickerImage = 'shareStickerImage',\n BackgroundAndStickerImage = 'shareBackgroundAndStickerImage',\n}\n\nexport interface LinkMetadata {\n originalUrl?: string;\n url?: string;\n title?: string;\n icon?: string;\n image?: string;\n remoteVideoUrl?: string;\n video?: string;\n}\n\nexport interface ActivityItem {\n type: 'text' | 'url';\n content: string;\n}\n\nexport interface ActivityItemSource {\n placeholderItem: ActivityItem;\n item: { [key in ActivityType]?: ActivityItem | null | undefined };\n subject?: { [key in ActivityType]?: string };\n dataTypeIdentifier?: { [key in ActivityType]?: string };\n thumbnailImage?: { [key in ActivityType]?: string };\n linkMetadata?: LinkMetadata;\n}\n\ninterface BaseShareSingleOptions {\n urls?: string[];\n url?: string;\n type?: string;\n filename?: string;\n message?: string;\n title?: string;\n subject?: string;\n email?: string;\n recipient?: string;\n social: Exclude<Social, Social.FacebookStories | Social.InstagramStories>;\n forceDialog?: boolean;\n}\n\ninterface BaseSocialStoriesShareSingleOptions extends Omit<BaseShareSingleOptions, 'social'> {\n backgroundImage?: string;\n stickerImage?: string;\n backgroundBottomColor?: string;\n backgroundTopColor?: string;\n attributionURL?: string;\n backgroundVideo?: string;\n}\n\nexport interface InstagramStoriesShareSingleOptions extends BaseSocialStoriesShareSingleOptions {\n social: Social.InstagramStories;\n}\n\nexport interface FacebookStoriesShareSingleOptions extends BaseSocialStoriesShareSingleOptions {\n social: Social.FacebookStories;\n appId: string;\n}\n\nexport type ShareSingleOptions =\n | BaseShareSingleOptions\n | InstagramStoriesShareSingleOptions\n | FacebookStoriesShareSingleOptions;\n\nexport interface ShareOptions {\n message?: string;\n title?: string;\n url?: string;\n urls?: string[];\n type?: string;\n subject?: string;\n email?: string;\n recipient?: string;\n excludedActivityTypes?: ActivityType[];\n failOnCancel?: boolean;\n showAppsToView?: boolean;\n filename?: string;\n filenames?: string[];\n saveToFiles?: boolean;\n activityItemSources?: ActivityItemSource[];\n isNewTask?: boolean;\n}\n\nexport type ActivityType =\n | 'default'\n | 'addToReadingList'\n | 'airDrop'\n | 'assignToContact'\n | 'copyToPasteBoard'\n | 'mail'\n | 'message'\n | 'openInIBooks' // iOS 9 or later\n | 'postToFacebook'\n | 'postToFlickr'\n | 'postToTencentWeibo'\n | 'postToTwitter'\n | 'postToVimeo'\n | 'postToWeibo'\n | 'print'\n | 'saveToCameraRoll'\n | 'markupAsPDF'; // iOS 11 or late\n\nexport interface ShareSingleResult {\n message: string;\n success: boolean;\n}\n\nexport interface ShareOpenResult extends ShareSingleResult {\n dismissedAction?: boolean;\n}\nexport interface IsPackageInstalledResult {\n message: string;\n isInstalled: boolean;\n}\n"]}
@@ -78,7 +78,6 @@ export interface InstagramStoriesShareSingleOptions extends BaseSocialStoriesSha
78
78
  }
79
79
  export interface FacebookStoriesShareSingleOptions extends BaseSocialStoriesShareSingleOptions {
80
80
  social: Social.FacebookStories;
81
- method: Exclude<ShareAsset, ShareAsset.BackgroundVideo>;
82
81
  appId: string;
83
82
  }
84
83
  export declare type ShareSingleOptions = BaseShareSingleOptions | InstagramStoriesShareSingleOptions | FacebookStoriesShareSingleOptions;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "react-native-share",
3
3
  "description": "Social share, sending simple data to other apps.",
4
- "version": "7.6.1",
4
+ "version": "7.6.4",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/react-native-community/react-native-share.git"
@@ -47,7 +47,7 @@
47
47
  "react": "17.0.2",
48
48
  "react-native": "0.66.4",
49
49
  "react-native-builder-bob": "^0.18.1",
50
- "semantic-release": "^17.1.1",
50
+ "semantic-release": "^19.0.3",
51
51
  "typescript": "4.2.4"
52
52
  },
53
53
  "keywords": [
package/src/types.ts CHANGED
@@ -78,7 +78,6 @@ export interface InstagramStoriesShareSingleOptions extends BaseSocialStoriesSha
78
78
 
79
79
  export interface FacebookStoriesShareSingleOptions extends BaseSocialStoriesShareSingleOptions {
80
80
  social: Social.FacebookStories;
81
- method: Exclude<ShareAsset, ShareAsset.BackgroundVideo>;
82
81
  appId: string;
83
82
  }
84
83