Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@capacitor/clipboard

Package Overview
Dependencies
Maintainers
8
Versions
624
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@capacitor/clipboard - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

11

CHANGELOG.md

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

## [0.2.1](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/clipboard@0.2.0...@capacitor/clipboard@0.2.1) (2020-12-20)
### Bug Fixes
* support deprecated types from Capacitor 2 ([#139](https://github.com/ionic-team/capacitor-plugins/issues/139)) ([2d7127a](https://github.com/ionic-team/capacitor-plugins/commit/2d7127a488e26f0287951921a6db47c49d817336))
# [0.2.0](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/clipboard@0.1.1...@capacitor/clipboard@0.2.0) (2020-12-02)

@@ -8,0 +19,0 @@

23

dist/docs.json

@@ -10,3 +10,3 @@ {

"name": "write",
"signature": "(options: ClipboardWriteOptions) => Promise<void>",
"signature": "(options: WriteOptions) => Promise<void>",
"parameters": [

@@ -16,3 +16,3 @@ {

"docs": "",
"type": "ClipboardWriteOptions"
"type": "WriteOptions"
}

@@ -29,3 +29,3 @@ ],

"complexTypes": [
"ClipboardWriteOptions"
"WriteOptions"
],

@@ -36,5 +36,5 @@ "slug": "write"

"name": "read",
"signature": "() => Promise<ClipboardReadResult>",
"signature": "() => Promise<ReadResult>",
"parameters": [],
"returns": "Promise<ClipboardReadResult>",
"returns": "Promise<ReadResult>",
"tags": [

@@ -48,3 +48,3 @@ {

"complexTypes": [
"ClipboardReadResult"
"ReadResult"
],

@@ -58,4 +58,4 @@ "slug": "read"

{
"name": "ClipboardWriteOptions",
"slug": "clipboardwriteoptions",
"name": "WriteOptions",
"slug": "writeoptions",
"docs": "Represents the data to be written to the clipboard.",

@@ -121,4 +121,4 @@ "tags": [

{
"name": "ClipboardReadResult",
"slug": "clipboardreadresult",
"name": "ReadResult",
"slug": "readresult",
"docs": "Represents the data read from the clipboard.",

@@ -160,3 +160,4 @@ "tags": [

],
"enums": []
"enums": [],
"typeAliases": []
}

@@ -7,3 +7,3 @@ export interface ClipboardPlugin {

*/
write(options: ClipboardWriteOptions): Promise<void>;
write(options: WriteOptions): Promise<void>;
/**

@@ -14,3 +14,3 @@ * Read a value from the clipboard (the "paste" action)

*/
read(): Promise<ClipboardReadResult>;
read(): Promise<ReadResult>;
}

@@ -22,3 +22,3 @@ /**

*/
export interface ClipboardWriteOptions {
export interface WriteOptions {
/**

@@ -54,3 +54,3 @@ * Text value to copy.

*/
export interface ClipboardReadResult {
export interface ReadResult {
/**

@@ -69,1 +69,11 @@ * Data read from the clipboard.

}
/**
* @deprecated Use `WriteOptions`.
* @since 1.0.0
*/
export declare type ClipboardWrite = WriteOptions;
/**
* @deprecated Use `ReadResult`.
* @since 1.0.0
*/
export declare type ClipboardReadResult = ReadResult;
import type { ClipboardPlugin } from './definitions';
declare const Clipboard: ClipboardPlugin;
export * from './definitions';
export { Clipboard };

@@ -5,3 +5,4 @@ import { registerPlugin } from '@capacitor/core';

});
export * from './definitions';
export { Clipboard };
//# sourceMappingURL=index.js.map
import { WebPlugin } from '@capacitor/core';
import type { ClipboardPlugin, ClipboardWriteOptions, ClipboardReadResult } from './definitions';
import type { ClipboardPlugin, ReadResult, WriteOptions } from './definitions';
declare global {

@@ -10,4 +10,4 @@ interface Clipboard {

export declare class ClipboardWeb extends WebPlugin implements ClipboardPlugin {
write(options: ClipboardWriteOptions): Promise<void>;
read(): Promise<ClipboardReadResult>;
write(options: WriteOptions): Promise<void>;
read(): Promise<ReadResult>;
private readText;

@@ -14,0 +14,0 @@ private writeText;

{
"name": "@capacitor/clipboard",
"version": "0.2.0",
"version": "0.2.1",
"description": "The Clipboard API enables copy and pasting to/from the system clipboard.",

@@ -46,6 +46,6 @@ "main": "dist/esm/index.js",

"devDependencies": {
"@capacitor/android": "^3.0.0-alpha.7",
"@capacitor/core": "^3.0.0-alpha.7",
"@capacitor/docgen": "^0.0.10",
"@capacitor/ios": "^3.0.0-alpha.7",
"@capacitor/android": "^3.0.0-alpha.10",
"@capacitor/core": "^3.0.0-alpha.9",
"@capacitor/docgen": "0.0.14",
"@capacitor/ios": "^3.0.0-alpha.9",
"@ionic/eslint-config": "^0.3.0",

@@ -63,3 +63,3 @@ "@ionic/prettier-config": "~1.0.1",

"peerDependencies": {
"@capacitor/core": "^3.0.0-alpha.6"
"@capacitor/core": "^3.0.0-alpha.9"
},

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

},
"gitHead": "78c1981920988ec84c17bbc61b1da1df9743571c"
"gitHead": "481260d148b920b85755dd5f9b65df0bb0db4244"
}

@@ -12,2 +12,20 @@ # @capacitor/clipboard

## Example
```typescript
import { Clipboard } from '@capacitor/clipboard';
const writeToClipboard = async () => {
await Clipboard.write({
string: "Hello World!"
});
};
const checkClipboard = async () => {
const { type, value } = await Clipboard.read();
alert(`Got ${type} from clipboard: ${value}`);
};
```
## API

@@ -29,3 +47,3 @@

```typescript
write(options: ClipboardWriteOptions) => Promise<void>
write(options: WriteOptions) => Promise<void>
```

@@ -35,5 +53,5 @@

| Param | Type |
| ------------- | ----------------------------------------------------------------------- |
| **`options`** | <code><a href="#clipboardwriteoptions">ClipboardWriteOptions</a></code> |
| Param | Type |
| ------------- | ----------------------------------------------------- |
| **`options`** | <code><a href="#writeoptions">WriteOptions</a></code> |

@@ -48,3 +66,3 @@ **Since:** 1.0.0

```typescript
read() => Promise<ClipboardReadResult>
read() => Promise<ReadResult>
```

@@ -54,3 +72,3 @@

**Returns:** <code>Promise&lt;<a href="#clipboardreadresult">ClipboardReadResult</a>&gt;</code>
**Returns:** <code>Promise&lt;<a href="#readresult">ReadResult</a>&gt;</code>

@@ -65,3 +83,3 @@ **Since:** 1.0.0

#### ClipboardWriteOptions
#### WriteOptions

@@ -78,3 +96,3 @@ Represents the data to be written to the clipboard.

#### ClipboardReadResult
#### ReadResult

@@ -81,0 +99,0 @@ Represents the data read from the clipboard.

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc