super-dsh 0.3.0-g → 0.3.0-r

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.
Files changed (24) hide show
  1. package/node_modules/@mariozechner/clipboard/.yarnrc.yml +1 -0
  2. package/node_modules/@mariozechner/clipboard/Cargo.toml +45 -0
  3. package/node_modules/@mariozechner/clipboard/README.md +60 -0
  4. package/node_modules/@mariozechner/clipboard/build.rs +5 -0
  5. package/node_modules/@mariozechner/clipboard/exp.ts +12 -0
  6. package/node_modules/@mariozechner/clipboard/index.d.ts +37 -0
  7. package/node_modules/@mariozechner/clipboard/index.js +606 -0
  8. package/node_modules/@mariozechner/clipboard/package.json +56 -0
  9. package/node_modules/@mariozechner/clipboard/src/clipboard_rs/common.rs +307 -0
  10. package/node_modules/@mariozechner/clipboard/src/clipboard_rs/mod.rs +93 -0
  11. package/node_modules/@mariozechner/clipboard/src/clipboard_rs/platform/ios.rs +313 -0
  12. package/node_modules/@mariozechner/clipboard/src/clipboard_rs/platform/macos.rs +471 -0
  13. package/node_modules/@mariozechner/clipboard/src/clipboard_rs/platform/mod.rs +252 -0
  14. package/node_modules/@mariozechner/clipboard/src/clipboard_rs/platform/wayland.rs +431 -0
  15. package/node_modules/@mariozechner/clipboard/src/clipboard_rs/platform/win.rs +712 -0
  16. package/node_modules/@mariozechner/clipboard/src/clipboard_rs/platform/x11.rs +916 -0
  17. package/node_modules/@mariozechner/clipboard/src/lib.rs +194 -0
  18. package/node_modules/@mariozechner/clipboard-linux-x64-gnu/README.md +3 -0
  19. package/node_modules/@mariozechner/clipboard-linux-x64-gnu/clipboard.linux-x64-gnu.node +0 -0
  20. package/node_modules/@mariozechner/clipboard-linux-x64-gnu/package.json +25 -0
  21. package/package.json +1 -1
  22. package/remote/plugin.d.ts +78 -46
  23. package/remote/plugin.js +979 -1697
  24. package/remote/provenance.json +14 -16
@@ -0,0 +1 @@
1
+ nodeLinker: node-modules
@@ -0,0 +1,45 @@
1
+ [package]
2
+ edition = "2021"
3
+ name = "crosscopy_clipboard"
4
+ version = "0.0.0"
5
+
6
+ [lib]
7
+ crate-type = ["cdylib"]
8
+
9
+ [features]
10
+ default = ["image"]
11
+ image = ["dep:image"]
12
+ wayland = ["dep:wl-clipboard-rs"]
13
+
14
+ [dependencies]
15
+ base64 = "0.22.0"
16
+ futures = "0.3.30"
17
+ # Pin image to version compatible with older Rust in CI Docker images
18
+ image = { version = "=0.25.5", features = ["png", "jpeg"], optional = true, default-features = false }
19
+ # Default enable napi4 feature, see https://nodejs.org/api/n-api.html#node-api-version-matrix
20
+ napi = { version = "3.9.0", default-features = false, features = ["napi4", "tokio_rt", "dyn-symbols"] }
21
+ napi-derive = "3.5.6"
22
+ tokio = "1.36.0"
23
+
24
+ [target.'cfg(all(unix, not(any(target_os="macos", target_os="android", target_os="ios", target_os="emscripten"))))'.dependencies]
25
+ wl-clipboard-rs = { version = "0.9", optional = true }
26
+ x11rb = { version = "0.13.2", features = ["xfixes"] }
27
+
28
+ [target.'cfg(target_os = "macos")'.dependencies]
29
+ image = { version = "=0.25.5", features = ["tiff", "png", "jpeg"], optional = true, default-features = false }
30
+ objc2 = "0.6.3"
31
+ objc2-app-kit = { version = "0.3.2", features = ["NSPasteboard", "NSPasteboardItem", "NSImage"] }
32
+ objc2-foundation = { version = "0.3.2", features = ["NSArray", "NSString", "NSEnumerator"] }
33
+
34
+ [target.'cfg(target_os = "windows")'.dependencies]
35
+ clipboard-win = { version = "5.4.1", features = ["monitor"] }
36
+ image = { version = "=0.25.5", features = ["bmp", "png", "jpeg"], optional = true, default-features = false }
37
+ windows = { version = "0.59.0", features = ["Win32_Foundation", "Win32_Graphics_Gdi", "Win32_System_DataExchange"] }
38
+
39
+ [build-dependencies]
40
+ # Pin to version that works with older Rust in Docker images
41
+ napi-build = "2.3.2"
42
+
43
+ [profile.release]
44
+ lto = true
45
+ strip = "symbols"
@@ -0,0 +1,60 @@
1
+ # @mariozechner/clipboard
2
+
3
+ > **Fork of [@crosscopy/clipboard](https://github.com/CrossCopy/clipboard)**
4
+ >
5
+ > This fork updates to the latest `clipboard-rs` (0.3.1) and adds musl (Alpine Linux) support.
6
+ > All credit goes to the original authors.
7
+
8
+ ![NPM Version](https://img.shields.io/npm/v/@mariozechner/clipboard)
9
+ [![CI](https://github.com/badlogic/clipboard/actions/workflows/CI.yml/badge.svg)](https://github.com/badlogic/clipboard/actions/workflows/CI.yml)
10
+
11
+ **NPM Package**: https://www.npmjs.com/package/@mariozechner/clipboard
12
+
13
+ **GitHub**: https://github.com/badlogic/clipboard
14
+
15
+ > This is a clipboard API npm package that allows you to copy and paste data to and from the clipboard.
16
+ > There doesn't seem to be a good clipboard package for node.js (that supports data format beyond text), so I decided to make one.
17
+ > Data Format Supported
18
+ >
19
+ > - Text
20
+ > - Image
21
+ > - Rich Text Format
22
+ > - Files
23
+ > - HTML
24
+
25
+ ## Acknowledgements
26
+
27
+ - [ChurchTao/clipboard-rs](https://github.com/ChurchTao/clipboard-rs) is written in rust, which is used to provide the native clipboard support for this package across Linux, Windows and MacOS. This package is basically a wrapper around this rust package.
28
+ - https://crates.io/crates/clipboard-rs
29
+ - [napi.rs](https://napi.rs/) was used to create the node.js addon for this package, so that API calls written in rust can be called from node.js.
30
+
31
+ ## API
32
+
33
+ Detailed API function declarations can be found in the [index.d.ts](./index.d.ts).
34
+
35
+ Or you can refer to the source code in [src/lib.rs](./src/lib.rs).
36
+
37
+ ## Sample
38
+
39
+ ```javascript
40
+ import Clipboard from "@mariozechner/clipboard";
41
+
42
+ console.log(await Clipboard.getText());
43
+
44
+ console.log(await Clipboard.getHtml());
45
+
46
+ if (await Clipboard.hasImage()) {
47
+ console.log(await Clipboard.getImageBase64());
48
+ } else {
49
+ console.log("No Image");
50
+ }
51
+ ```
52
+
53
+ ## Publish
54
+
55
+ Everything is done with GitHub Action.
56
+
57
+ Run `npm version patch` to bump the version.
58
+ Then `git push --follow-tags` to push the changes and tags to GitHub. GitHub Action will automatically build and publish.
59
+
60
+ The GitHub Actions `NPM_TOKEN` repository secret is a granular npm token with publish access to `@mariozechner/clipboard` and all `@mariozechner/clipboard-*` platform packages. npm granular access tokens expire after 90 days, so this secret must be rotated before expiry.
@@ -0,0 +1,5 @@
1
+ extern crate napi_build;
2
+
3
+ fn main() {
4
+ napi_build::setup();
5
+ }
@@ -0,0 +1,12 @@
1
+ import Clipboard from "./index.js";
2
+
3
+ console.log(await Clipboard.getText());
4
+
5
+ console.log(await Clipboard.getHtml());
6
+
7
+
8
+ if (await Clipboard.hasImage()) {
9
+ console.log(await Clipboard.getImageBase64());
10
+ } else {
11
+ console.log("No Image");
12
+ }
@@ -0,0 +1,37 @@
1
+ /* auto-generated by NAPI-RS */
2
+ /* eslint-disable */
3
+ export declare function availableFormats(): Array<string>
4
+
5
+ export declare function callThreadsafeFunction(callback: ((err: Error | null, arg: number) => void)): void
6
+
7
+ export declare function clear(): Promise<void>
8
+
9
+ export declare function getHtml(): Promise<string>
10
+
11
+ export declare function getImageBase64(): Promise<string>
12
+
13
+ export declare function getImageBinary(): Promise<Array<number>>
14
+
15
+ export declare function getRtf(): Promise<string>
16
+
17
+ export declare function getText(): Promise<string>
18
+
19
+ export declare function hasHtml(): boolean
20
+
21
+ export declare function hasImage(): boolean
22
+
23
+ export declare function hasRtf(): boolean
24
+
25
+ export declare function hasText(): boolean
26
+
27
+ export declare function setHtml(html: string): Promise<void>
28
+
29
+ export declare function setImageBase64(base64Str: string): Promise<void>
30
+
31
+ export declare function setImageBinary(imageBytes: Array<number>): Promise<void>
32
+
33
+ export declare function setRtf(rtf: string): Promise<void>
34
+
35
+ export declare function setText(text: string): Promise<void>
36
+
37
+ export declare function watch(): void