react-native-share 8.0.1 → 8.2.0

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.
Files changed (37) hide show
  1. package/ios/RNShare.m +7 -0
  2. package/ios/RNShareActivityItemSource.m +1 -1
  3. package/ios/RNShareUtils.h +1 -0
  4. package/ios/RNShareUtils.m +11 -0
  5. package/lib/commonjs/components/Button.js.map +1 -1
  6. package/lib/commonjs/components/Overlay.js +24 -39
  7. package/lib/commonjs/components/Overlay.js.map +1 -1
  8. package/lib/commonjs/components/ShareSheet.js +34 -38
  9. package/lib/commonjs/components/ShareSheet.js.map +1 -1
  10. package/lib/commonjs/components/Sheet.js +15 -25
  11. package/lib/commonjs/components/Sheet.js.map +1 -1
  12. package/lib/commonjs/index.js +0 -1
  13. package/lib/commonjs/index.js.map +1 -1
  14. package/lib/commonjs/types.js.map +1 -1
  15. package/lib/module/components/Button.js.map +1 -1
  16. package/lib/module/components/Overlay.js +24 -39
  17. package/lib/module/components/Overlay.js.map +1 -1
  18. package/lib/module/components/ShareSheet.js +32 -36
  19. package/lib/module/components/ShareSheet.js.map +1 -1
  20. package/lib/module/components/Sheet.js +15 -25
  21. package/lib/module/components/Sheet.js.map +1 -1
  22. package/lib/module/index.js +0 -1
  23. package/lib/module/index.js.map +1 -1
  24. package/lib/module/types.js.map +1 -1
  25. package/lib/typescript/components/Button.d.ts +1 -1
  26. package/lib/typescript/components/Overlay.d.ts +1 -19
  27. package/lib/typescript/components/ShareSheet.d.ts +2 -8
  28. package/lib/typescript/components/Sheet.d.ts +1 -11
  29. package/lib/typescript/index.d.ts +5 -4
  30. package/lib/typescript/types.d.ts +5 -4
  31. package/package.json +1 -1
  32. package/src/components/Button.tsx +7 -1
  33. package/src/components/Overlay.tsx +17 -30
  34. package/src/components/ShareSheet.tsx +38 -33
  35. package/src/components/Sheet.tsx +8 -18
  36. package/src/index.tsx +0 -1
  37. package/src/types.ts +6 -4
package/src/types.ts CHANGED
@@ -42,10 +42,10 @@ export interface ActivityItem {
42
42
 
43
43
  export interface ActivityItemSource {
44
44
  placeholderItem: ActivityItem;
45
- item: { [key in ActivityType]?: ActivityItem | null | undefined };
46
- subject?: { [key in ActivityType]?: string };
47
- dataTypeIdentifier?: { [key in ActivityType]?: string };
48
- thumbnailImage?: { [key in ActivityType]?: string };
45
+ item: { [key in ActivityTypeItemSource]?: ActivityItem | null | undefined };
46
+ subject?: { [key in ActivityTypeItemSource]?: string };
47
+ dataTypeIdentifier?: { [key in ActivityTypeItemSource]?: string };
48
+ thumbnailImage?: { [key in ActivityTypeItemSource]?: string };
49
49
  linkMetadata?: LinkMetadata;
50
50
  }
51
51
 
@@ -125,6 +125,8 @@ export type ActivityType =
125
125
  | 'saveToCameraRoll'
126
126
  | 'markupAsPDF'; // iOS 11 or late
127
127
 
128
+ export type ActivityTypeItemSource = ActivityType | string;
129
+
128
130
  export interface ShareSingleResult {
129
131
  message: string;
130
132
  success: boolean;