@flighthq/clipboard 0.5.0-next.1944.cd6b6e7 → 0.5.1-edge.638.d4dbd4e
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 +3 -3
- package/dist/clipboard.d.ts +24 -34
- package/dist/clipboard.d.ts.map +1 -1
- package/dist/clipboard.js +61 -456
- package/dist/clipboard.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +5 -4
- package/src/clipboard.test.ts +268 -617
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @flighthq/clipboard
|
|
2
2
|
|
|
3
|
-
System clipboard
|
|
3
|
+
System clipboard operations over explicit Host capability vectors for text, images, formats, bookmarks, and change subscriptions
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
@@ -13,5 +13,5 @@ Import the supported application-facing API from `@flighthq/clipboard`. The `@fl
|
|
|
13
13
|
This package is part of the locked-version Flight SDK graph. Applications may instead install and import `@flighthq/sdk` when package-level tree shaking is sufficient.
|
|
14
14
|
|
|
15
15
|
- [Flight project](https://github.com/flighthq/flight)
|
|
16
|
-
- [Source for @flighthq/clipboard@0.5.
|
|
17
|
-
- [License](https://github.com/flighthq/flight/blob/
|
|
16
|
+
- [Source for @flighthq/clipboard@0.5.1-edge.638.d4dbd4e](https://github.com/flighthq/flight/tree/d4dbd4e347dc8be10b180c85a766ab50333dcb51/packages/clipboard)
|
|
17
|
+
- [License](https://github.com/flighthq/flight/blob/d4dbd4e347dc8be10b180c85a766ab50333dcb51/LICENSE.md)
|
package/dist/clipboard.d.ts
CHANGED
|
@@ -1,38 +1,28 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare function attachClipboardWatch(watch: ClipboardWatch): void;
|
|
3
|
-
export declare function clearClipboard(): Promise<boolean>;
|
|
1
|
+
import type { ClipboardBookmark, ClipboardWatch, ClipboardWriteItem, HasClipboardBookmark, HasClipboardChange, HasClipboardFormats, HasClipboardImage, HasClipboardText } from '@flighthq/types/contract';
|
|
2
|
+
export declare function attachClipboardWatch(host: HasClipboardChange, watch: ClipboardWatch): void;
|
|
3
|
+
export declare function clearClipboard(host: HasClipboardText): Promise<boolean>;
|
|
4
4
|
export declare function createClipboardWatch(): ClipboardWatch;
|
|
5
|
-
export declare function createWebClipboardBackend(): ClipboardBackend;
|
|
6
5
|
export declare function detachClipboardWatch(watch: ClipboardWatch): void;
|
|
7
6
|
export declare function disposeClipboardWatch(watch: ClipboardWatch): void;
|
|
8
|
-
export declare function
|
|
9
|
-
export declare function
|
|
10
|
-
export declare function
|
|
11
|
-
export declare function
|
|
12
|
-
export declare function
|
|
13
|
-
export declare function
|
|
14
|
-
export declare function
|
|
15
|
-
export declare function
|
|
16
|
-
export declare function
|
|
17
|
-
export declare function
|
|
18
|
-
export declare function
|
|
19
|
-
export declare function
|
|
20
|
-
export declare function
|
|
21
|
-
export declare function
|
|
22
|
-
export declare function
|
|
23
|
-
export declare function
|
|
24
|
-
export declare function
|
|
25
|
-
export declare function
|
|
26
|
-
export declare function
|
|
27
|
-
export declare function
|
|
28
|
-
export declare function
|
|
29
|
-
export declare function setClipboardBackend(backend: ClipboardBackend | null): void;
|
|
30
|
-
export declare function writeClipboard(items: readonly Readonly<ClipboardWriteItem>[]): Promise<boolean>;
|
|
31
|
-
export declare function writeClipboardBookmark(title: string, url: string): Promise<boolean>;
|
|
32
|
-
export declare function writeClipboardFiles(paths: readonly string[]): Promise<boolean>;
|
|
33
|
-
export declare function writeClipboardFormat(format: string, data: string): Promise<boolean>;
|
|
34
|
-
export declare function writeClipboardHtml(html: string): Promise<boolean>;
|
|
35
|
-
export declare function writeClipboardImage(dataUrl: string): Promise<boolean>;
|
|
36
|
-
export declare function writeClipboardRTF(rtf: string): Promise<boolean>;
|
|
37
|
-
export declare function writeClipboardText(text: string): Promise<boolean>;
|
|
7
|
+
export declare function getClipboardFormats(host: HasClipboardFormats): Promise<readonly string[]>;
|
|
8
|
+
export declare function hasClipboardBookmark(host: HasClipboardBookmark): Promise<boolean>;
|
|
9
|
+
export declare function hasClipboardFormat(host: HasClipboardFormats, format: string): Promise<boolean>;
|
|
10
|
+
export declare function hasClipboardHtml(host: HasClipboardFormats): Promise<boolean>;
|
|
11
|
+
export declare function hasClipboardImage(host: HasClipboardImage): Promise<boolean>;
|
|
12
|
+
export declare function hasClipboardRTF(host: HasClipboardFormats): Promise<boolean>;
|
|
13
|
+
export declare function hasClipboardText(host: HasClipboardText): Promise<boolean>;
|
|
14
|
+
export declare function readClipboard(host: HasClipboardFormats, formats: readonly string[]): Promise<Readonly<Record<string, string>>>;
|
|
15
|
+
export declare function readClipboardBookmark(host: HasClipboardBookmark): Promise<ClipboardBookmark | null>;
|
|
16
|
+
export declare function readClipboardFormat(host: HasClipboardFormats, format: string): Promise<string>;
|
|
17
|
+
export declare function readClipboardHtml(host: HasClipboardFormats): Promise<string>;
|
|
18
|
+
export declare function readClipboardImage(host: HasClipboardImage): Promise<string>;
|
|
19
|
+
export declare function readClipboardRTF(host: HasClipboardFormats): Promise<string>;
|
|
20
|
+
export declare function readClipboardText(host: HasClipboardText): Promise<string>;
|
|
21
|
+
export declare function writeClipboard(host: HasClipboardFormats, items: readonly Readonly<ClipboardWriteItem>[]): Promise<boolean>;
|
|
22
|
+
export declare function writeClipboardBookmark(host: HasClipboardBookmark, title: string, url: string): Promise<boolean>;
|
|
23
|
+
export declare function writeClipboardFormat(host: HasClipboardFormats, format: string, data: string): Promise<boolean>;
|
|
24
|
+
export declare function writeClipboardHtml(host: HasClipboardFormats, html: string): Promise<boolean>;
|
|
25
|
+
export declare function writeClipboardImage(host: HasClipboardImage, dataUrl: string): Promise<boolean>;
|
|
26
|
+
export declare function writeClipboardRTF(host: HasClipboardFormats, rtf: string): Promise<boolean>;
|
|
27
|
+
export declare function writeClipboardText(host: HasClipboardText, text: string): Promise<boolean>;
|
|
38
28
|
//# sourceMappingURL=clipboard.d.ts.map
|
package/dist/clipboard.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clipboard.d.ts","sourceRoot":"","sources":["../src/clipboard.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,kBAAkB,EAClB,
|
|
1
|
+
{"version":3,"file":"clipboard.d.ts","sourceRoot":"","sources":["../src/clipboard.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,iBAAiB,EACjB,cAAc,EACd,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EACjB,MAAM,0BAA0B,CAAC;AAKlC,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,kBAAkB,EAAE,KAAK,EAAE,cAAc,GAAG,IAAI,CAM1F;AAGD,wBAAgB,cAAc,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,OAAO,CAAC,CAEvE;AAID,wBAAgB,oBAAoB,IAAI,cAAc,CAErD;AAGD,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,cAAc,GAAG,IAAI,CAMhE;AAID,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,cAAc,GAAG,IAAI,CAEjE;AAGD,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,SAAS,MAAM,EAAE,CAAC,CAEzF;AAGD,wBAAsB,oBAAoB,CAAC,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,OAAO,CAAC,CAEvF;AAGD,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,mBAAmB,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAE9F;AAGD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,OAAO,CAAC,CAE5E;AAGD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,O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