@choochmeque/tauri-plugin-sharekit-api 0.2.5 → 0.3.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.
package/README.md CHANGED
@@ -74,6 +74,12 @@ await shareFile('file:///path/to/document.pdf', {
74
74
  mimeType: 'application/pdf',
75
75
  title: 'My Document'
76
76
  });
77
+
78
+ // Share with position (iPad/macOS only)
79
+ // x and y are in webview coordinates (pixels from top-left)
80
+ await shareText('Hello!', {
81
+ position: { x: 100, y: 200, preferredEdge: 'bottom' }
82
+ });
77
83
  ```
78
84
 
79
85
  ## Contributing
@@ -1,9 +1,20 @@
1
+ export interface SharePosition {
2
+ x: number;
3
+ y: number;
4
+ /** macOS only: which edge the picker appears from */
5
+ preferredEdge?: "top" | "bottom" | "left" | "right";
6
+ }
1
7
  export interface ShareTextOptions {
8
+ /** Android only */
2
9
  mimeType?: string;
10
+ /** Position for the share sheet (iPad/macOS only) */
11
+ position?: SharePosition;
3
12
  }
4
13
  export interface ShareFileOptions {
5
14
  mimeType?: string;
6
15
  title?: string;
16
+ /** Position for the share sheet (iPad/macOS only) */
17
+ position?: SharePosition;
7
18
  }
8
19
  /**
9
20
  * Opens the native sharing interface to share the specified text.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@choochmeque/tauri-plugin-sharekit-api",
3
- "version": "0.2.5",
3
+ "version": "0.3.0",
4
4
  "license": "MIT",
5
5
  "author": "You",
6
6
  "description": "A Tauri v2 plugin that enables sharing content with native sharing interfaces on Android, iOS, macOS and Windows.",