@octane-xplat/share 0.9.0 → 0.11.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
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
# `@octane-xplat/share`
|
|
2
2
|
|
|
3
|
+
```sh
|
|
4
|
+
pnpm add @octane-xplat/share
|
|
5
|
+
```
|
|
6
|
+
|
|
3
7
|
The platform share sheet for Octane xplat apps. iOS and Android run
|
|
4
8
|
`@nativescript/social-share`; web calls `navigator.share` where it exists
|
|
5
9
|
(mobile browsers, some desktop) and degrades to a clipboard copy elsewhere
|
|
6
10
|
so the call still does something useful; macOS forwards the payload to the
|
|
7
11
|
AppKit host, which presents `NSSharingServicePicker`.
|
|
8
12
|
|
|
9
|
-
```sh
|
|
10
|
-
pnpm add @octane-xplat/share
|
|
11
|
-
```
|
|
12
|
-
|
|
13
13
|
```ts
|
|
14
14
|
import { share } from '@octane-xplat/share'
|
|
15
15
|
|
|
@@ -22,7 +22,15 @@ completed, `'copied'` when the web fallback put it on the clipboard, and
|
|
|
22
22
|
`'unavailable'` when no share path exists — branch on the result rather
|
|
23
23
|
than catching.
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
```ts
|
|
26
|
+
if (result === 'copied') {
|
|
27
|
+
console.log('Trip update copied; paste it into your message app')
|
|
28
|
+
} else if (result === 'unavailable') {
|
|
29
|
+
console.log('Sharing is unavailable on this target')
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Guide: [Using device features](../../docs/platform/platform-services.md);
|
|
34
|
+
per-target availability: [platform notes](../../docs/notes/platform-notes.md).
|
|
27
35
|
Exercised by the harness `Services` screen
|
|
28
36
|
([`packages/app/src/Services.tsrx`](../app/src/Services.tsrx)).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@octane-xplat/share",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "Native share sheet for Octane xplat — matching web + NativeScript + AppKit implementations",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"android",
|
|
@@ -51,14 +51,14 @@
|
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"@nativescript/social-share": "2.3.0",
|
|
54
|
-
"@octane-xplat/platform": "0.
|
|
54
|
+
"@octane-xplat/platform": "0.11.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@nativescript-community/octane": "0.2.4",
|
|
58
58
|
"@nativescript/core": "9.1.2",
|
|
59
59
|
"@octanejs/vite-plugin": "0.1.61",
|
|
60
60
|
"octane": "0.6.3",
|
|
61
|
-
"tsrx-typegen": "0.2.
|
|
61
|
+
"tsrx-typegen": "0.2.2",
|
|
62
62
|
"typescript": "5.9.3",
|
|
63
63
|
"vite": "8.3.0"
|
|
64
64
|
},
|