Launch Week Day 5: Introducing Reachability for PHP.Learn More
Socket
Book a DemoSign in
Socket

@capacitor/share

Package Overview
Dependencies
Maintainers
7
Versions
1066
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@capacitor/share - npm Package Compare versions

Comparing version
0.1.0
to
0.1.1
+8
-0
CHANGELOG.md

@@ -6,2 +6,10 @@ # Change Log

## [0.1.1](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/share@0.1.0...@capacitor/share@0.1.1) (2020-10-30)
**Note:** Version bump only for package @capacitor/share
# 0.1.0 (2020-10-12)

@@ -8,0 +16,0 @@

+1
-0

@@ -0,1 +1,2 @@

export {};
//# sourceMappingURL=definitions.js.map
+2
-2

@@ -1,2 +0,2 @@

import { UnsupportedBrowserException, WebPlugin } from '@capacitor/core';
import { WebPlugin } from '@capacitor/core';
export class ShareWeb extends WebPlugin {

@@ -8,3 +8,3 @@ constructor() {

if (typeof navigator === 'undefined' || !navigator.share) {
throw new UnsupportedBrowserException('Share API not available in this browser');
throw this.unavailable('Share API not available in this browser');
}

@@ -11,0 +11,0 @@ await navigator.share({

@@ -1,1 +0,1 @@

{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAIzE,MAAM,OAAO,QAAS,SAAQ,SAAS;IACrC;QACE,KAAK,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;IAC3B,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,OAAqB;QAC/B,IAAI,OAAO,SAAS,KAAK,WAAW,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE;YACxD,MAAM,IAAI,2BAA2B,CACnC,yCAAyC,CAC1C,CAAC;SACH;QAED,MAAM,SAAS,CAAC,KAAK,CAAC;YACpB,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,GAAG,EAAE,OAAO,CAAC,GAAG;SACjB,CAAC,CAAC;QACH,OAAO,EAAE,CAAC;IACZ,CAAC;CACF"}
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,MAAM,OAAO,QAAS,SAAQ,SAAS;IACrC;QACE,KAAK,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;IAC3B,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,OAAqB;QAC/B,IAAI,OAAO,SAAS,KAAK,WAAW,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE;YACxD,MAAM,IAAI,CAAC,WAAW,CAAC,yCAAyC,CAAC,CAAC;SACnE;QAED,MAAM,SAAS,CAAC,KAAK,CAAC;YACpB,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,GAAG,EAAE,OAAO,CAAC,GAAG;SACjB,CAAC,CAAC;QACH,OAAO,EAAE,CAAC;IACZ,CAAC;CACF"}

@@ -10,3 +10,3 @@ var capacitorShare = (function (exports, core) {

if (typeof navigator === 'undefined' || !navigator.share) {
throw new core.UnsupportedBrowserException('Share API not available in this browser');
throw this.unavailable('Share API not available in this browser');
}

@@ -31,2 +31,4 @@ await navigator.share({

Object.defineProperty(exports, '__esModule', { value: true });
return exports;

@@ -33,0 +35,0 @@

@@ -1,1 +0,1 @@

{"version":3,"file":"plugin.js","sources":["esm/web.js","esm/index.js"],"sourcesContent":["import { UnsupportedBrowserException, WebPlugin } from '@capacitor/core';\nexport class ShareWeb extends WebPlugin {\n constructor() {\n super({ name: 'Share' });\n }\n async share(options) {\n if (typeof navigator === 'undefined' || !navigator.share) {\n throw new UnsupportedBrowserException('Share API not available in this browser');\n }\n await navigator.share({\n title: options.title,\n text: options.text,\n url: options.url,\n });\n return {};\n }\n}\n//# sourceMappingURL=web.js.map","import { Plugins, registerPlugin } from '@capacitor/core';\nimport { ShareWeb } from './web';\nconst implementations = {\n android: Plugins.Share,\n ios: Plugins.Share,\n web: new ShareWeb(),\n};\nconst Share = registerPlugin('Share', implementations).getImplementation();\nexport { Share };\n//# sourceMappingURL=index.js.map"],"names":["WebPlugin","UnsupportedBrowserException","Plugins","registerPlugin"],"mappings":";;;IACO,MAAM,QAAQ,SAASA,cAAS,CAAC;IACxC,IAAI,WAAW,GAAG;IAClB,QAAQ,KAAK,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;IACjC,KAAK;IACL,IAAI,MAAM,KAAK,CAAC,OAAO,EAAE;IACzB,QAAQ,IAAI,OAAO,SAAS,KAAK,WAAW,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE;IAClE,YAAY,MAAM,IAAIC,gCAA2B,CAAC,yCAAyC,CAAC,CAAC;IAC7F,SAAS;IACT,QAAQ,MAAM,SAAS,CAAC,KAAK,CAAC;IAC9B,YAAY,KAAK,EAAE,OAAO,CAAC,KAAK;IAChC,YAAY,IAAI,EAAE,OAAO,CAAC,IAAI;IAC9B,YAAY,GAAG,EAAE,OAAO,CAAC,GAAG;IAC5B,SAAS,CAAC,CAAC;IACX,QAAQ,OAAO,EAAE,CAAC;IAClB,KAAK;IACL;;ICdA,MAAM,eAAe,GAAG;IACxB,IAAI,OAAO,EAAEC,YAAO,CAAC,KAAK;IAC1B,IAAI,GAAG,EAAEA,YAAO,CAAC,KAAK;IACtB,IAAI,GAAG,EAAE,IAAI,QAAQ,EAAE;IACvB,CAAC,CAAC;AACG,UAAC,KAAK,GAAGC,mBAAc,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC,iBAAiB;;;;;;;;;;"}
{"version":3,"file":"plugin.js","sources":["esm/web.js","esm/index.js"],"sourcesContent":["import { WebPlugin } from '@capacitor/core';\nexport class ShareWeb extends WebPlugin {\n constructor() {\n super({ name: 'Share' });\n }\n async share(options) {\n if (typeof navigator === 'undefined' || !navigator.share) {\n throw this.unavailable('Share API not available in this browser');\n }\n await navigator.share({\n title: options.title,\n text: options.text,\n url: options.url,\n });\n return {};\n }\n}\n//# sourceMappingURL=web.js.map","import { Plugins, registerPlugin } from '@capacitor/core';\nimport { ShareWeb } from './web';\nconst implementations = {\n android: Plugins.Share,\n ios: Plugins.Share,\n web: new ShareWeb(),\n};\nconst Share = registerPlugin('Share', implementations).getImplementation();\nexport { Share };\n//# sourceMappingURL=index.js.map"],"names":["WebPlugin","Plugins","registerPlugin"],"mappings":";;;IACO,MAAM,QAAQ,SAASA,cAAS,CAAC;IACxC,IAAI,WAAW,GAAG;IAClB,QAAQ,KAAK,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;IACjC,KAAK;IACL,IAAI,MAAM,KAAK,CAAC,OAAO,EAAE;IACzB,QAAQ,IAAI,OAAO,SAAS,KAAK,WAAW,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE;IAClE,YAAY,MAAM,IAAI,CAAC,WAAW,CAAC,yCAAyC,CAAC,CAAC;IAC9E,SAAS;IACT,QAAQ,MAAM,SAAS,CAAC,KAAK,CAAC;IAC9B,YAAY,KAAK,EAAE,OAAO,CAAC,KAAK;IAChC,YAAY,IAAI,EAAE,OAAO,CAAC,IAAI;IAC9B,YAAY,GAAG,EAAE,OAAO,CAAC,GAAG;IAC5B,SAAS,CAAC,CAAC;IACX,QAAQ,OAAO,EAAE,CAAC;IAClB,KAAK;IACL;;ICdA,MAAM,eAAe,GAAG;IACxB,IAAI,OAAO,EAAEC,YAAO,CAAC,KAAK;IAC1B,IAAI,GAAG,EAAEA,YAAO,CAAC,KAAK;IACtB,IAAI,GAAG,EAAE,IAAI,QAAQ,EAAE;IACvB,CAAC,CAAC;AACG,UAAC,KAAK,GAAGC,mBAAc,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC,iBAAiB;;;;;;;;;;;;"}
{
"name": "@capacitor/share",
"version": "0.1.0",
"version": "0.1.1",
"description": "The Share API provides methods for sharing content in any sharing-enabled apps the user may have installed.",

@@ -39,10 +39,10 @@ "main": "dist/plugin.js",

"devDependencies": {
"@capacitor/android": "^3.0.0-alpha.5",
"@capacitor/core": "^3.0.0-alpha.5",
"@capacitor/docgen": "^0.0.6",
"@capacitor/ios": "^3.0.0-alpha.5",
"@capacitor/android": "^3.0.0-alpha.6",
"@capacitor/core": "^3.0.0-alpha.6",
"@capacitor/docgen": "^0.0.10",
"@capacitor/ios": "^3.0.0-alpha.6",
"@ionic/eslint-config": "^0.3.0",
"@ionic/prettier-config": "^1.0.0",
"@ionic/prettier-config": "^1.0.1",
"@ionic/swiftlint-config": "^1.1.2",
"@rollup/plugin-node-resolve": "^8.1.0",
"@rollup/plugin-node-resolve": "^9.0.0",
"eslint": "^7.11.0",

@@ -54,6 +54,6 @@ "prettier": "^2.0.5",

"swiftlint": "^1.0.1",
"typescript": "~3.9.7"
"typescript": "~4.0.3"
},
"peerDependencies": {
"@capacitor/core": "^3.0.0-alpha.5"
"@capacitor/core": "^3.0.0-alpha.6"
},

@@ -76,3 +76,3 @@ "prettier": "@ionic/prettier-config",

},
"gitHead": "e2856f5d9d77b26a16ebe2a5e5708832a7ff063b"
"gitHead": "3ab6d510236e3f595945c7de16ca731323cc295b"
}

@@ -5,10 +5,20 @@ # @capacitor/share

<!--DOCGEN_INDEX_START-->
## Install
```bash
npm install @capacitor/share
npx cap sync
```
## API
<docgen-index>
* [`share(...)`](#share)
* [Interfaces](#interfaces)
<!--DOCGEN_INDEX_END-->
<!--DOCGEN_API_START-->
</docgen-index>
<docgen-api>
<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->
## API

@@ -23,5 +33,5 @@ ### share(...)

| Param | Type |
| ----------- | ----------------------------------------------------- |
| **options** | <code><a href="#shareoptions">ShareOptions</a></code> |
| Param | Type |
| ------------- | ----------------------------------------------------- |
| **`options`** | <code><a href="#shareoptions">ShareOptions</a></code> |

@@ -54,3 +64,2 @@ **Returns:** <code>Promise&lt;<a href="#shareresult">ShareResult</a>&gt;</code>

<!--DOCGEN_API_END-->
</docgen-api>

@@ -1,2 +0,2 @@

import { UnsupportedBrowserException, WebPlugin } from '@capacitor/core';
import { WebPlugin } from '@capacitor/core';

@@ -12,5 +12,3 @@ import type { ShareOptions, SharePlugin, ShareResult } from './definitions';

if (typeof navigator === 'undefined' || !navigator.share) {
throw new UnsupportedBrowserException(
'Share API not available in this browser',
);
throw this.unavailable('Share API not available in this browser');
}

@@ -17,0 +15,0 @@