@sigx/lynx-share 0.4.2 → 0.4.3
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 +0 -16
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,34 +1,24 @@
|
|
|
1
1
|
# @sigx/lynx-share
|
|
2
|
-
|
|
3
2
|
Native share dialog for sigx-lynx. `UIActivityViewController` on iOS, `Intent.ACTION_SEND` chooser on Android.
|
|
4
|
-
|
|
5
3
|
## Install
|
|
6
|
-
|
|
7
4
|
```bash
|
|
8
5
|
pnpm add @sigx/lynx-share
|
|
9
6
|
```
|
|
10
|
-
|
|
11
7
|
`sigx prebuild` auto-discovers and links the native module. No special permissions on either platform.
|
|
12
|
-
|
|
13
8
|
## Usage
|
|
14
|
-
|
|
15
9
|
```ts
|
|
16
10
|
import { Share } from '@sigx/lynx-share';
|
|
17
|
-
|
|
18
11
|
Share.share({
|
|
19
12
|
title: 'Check this out',
|
|
20
13
|
message: 'Built with sigx-lynx!',
|
|
21
14
|
url: 'https://sigx.dev',
|
|
22
15
|
});
|
|
23
16
|
```
|
|
24
|
-
|
|
25
17
|
## API
|
|
26
|
-
|
|
27
18
|
| Method | Notes |
|
|
28
19
|
| ------------------------------------- | -------------------------------------------------------------------------------------------------- |
|
|
29
20
|
| `share(options: ShareOptions): void` | Sync — fire-and-forget. The share sheet dismissal isn't surfaced as a callback. |
|
|
30
21
|
| `isAvailable(): boolean` | Whether the native module is registered in the current build. |
|
|
31
|
-
|
|
32
22
|
```ts
|
|
33
23
|
interface ShareOptions {
|
|
34
24
|
title?: string;
|
|
@@ -36,12 +26,6 @@ interface ShareOptions {
|
|
|
36
26
|
url?: string;
|
|
37
27
|
}
|
|
38
28
|
```
|
|
39
|
-
|
|
40
29
|
## Gotchas
|
|
41
|
-
|
|
42
30
|
- **Sharing files** isn't directly supported — `url` is treated as a string (web URL). For local file sharing, the native side would need to handle file URIs and FileProvider authority, which isn't wired here yet.
|
|
43
31
|
- **No completion callback.** If you need to know whether the user actually shared (vs. cancelled the sheet), you'll need to extend the native module with `UIActivityViewController.completionWithItemsHandler` (iOS) / `ACTION_SEND` result handling (Android, harder — there's no clean signal).
|
|
44
|
-
|
|
45
|
-
## Reference app
|
|
46
|
-
|
|
47
|
-
`examples/lynx-one/my-sigx-app/src/cards/ShareCard.tsx` covers a simple share-sheet trigger with title + message + URL.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sigx/lynx-share",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.3",
|
|
4
4
|
"description": "Native share dialog for sigx-lynx",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"signalx-module.json"
|
|
20
20
|
],
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@sigx/lynx-core": "^0.4.
|
|
22
|
+
"@sigx/lynx-core": "^0.4.3"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@typescript/native-preview": "7.0.0-dev.20260521.1",
|