@symbiote-native/clipboard 0.0.1
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/LICENSE +21 -0
- package/README.md +44 -0
- package/package.json +19 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 A. Prokopenko
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# @symbiote-native/clipboard
|
|
2
|
+
|
|
3
|
+
**Status: skeleton only — not implemented, published early to reserve the npm name.**
|
|
4
|
+
|
|
5
|
+
This package will be a port of [`expo-clipboard`](https://docs.expo.dev/versions/latest/sdk/clipboard/)
|
|
6
|
+
for [SymbioteNative](../../README.md) — read/write clipboard text, URLs, and images, plus a
|
|
7
|
+
clipboard-change listener, reachable from every adapter (React, Vue, Angular), not just React.
|
|
8
|
+
Nothing beyond this `package.json` + `README.md` exists yet.
|
|
9
|
+
|
|
10
|
+
## Planned API
|
|
11
|
+
|
|
12
|
+
Forward-looking reference only — signatures below are copied from upstream's
|
|
13
|
+
`Clipboard.ts`/`Clipboard.types.ts`, not yet ported here.
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
getStringAsync(options?: GetStringOptions): Promise<string>
|
|
17
|
+
setStringAsync(text: string, options?: SetStringOptions): Promise<boolean>
|
|
18
|
+
hasStringAsync(): Promise<boolean>
|
|
19
|
+
getUrlAsync(): Promise<string | null> // iOS only
|
|
20
|
+
setUrlAsync(url: string): Promise<void> // iOS only
|
|
21
|
+
hasUrlAsync(): Promise<boolean> // iOS only
|
|
22
|
+
getImageAsync(options: GetImageOptions): Promise<ClipboardImage | null>
|
|
23
|
+
setImageAsync(base64Image: string): Promise<void>
|
|
24
|
+
hasImageAsync(): Promise<boolean>
|
|
25
|
+
addClipboardListener(listener: (event: ClipboardEvent) => void): EventSubscription
|
|
26
|
+
removeClipboardListener(subscription: EventSubscription) // deprecated, use subscription.remove()
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Plus `ContentType`, `StringFormat`, `GetStringOptions`, `SetStringOptions`, `GetImageOptions`,
|
|
30
|
+
`ClipboardImage`, `ClipboardEvent` — ported from upstream's `Clipboard.types.ts`, renamed with
|
|
31
|
+
this repo's `I`-prefix convention for exported types where applicable
|
|
32
|
+
(`ts-js-best-practices`). Upstream also ships a `ClipboardPasteButton` component (native
|
|
33
|
+
paste-button UI, iOS 16+) — whether that's in scope for this package's first real
|
|
34
|
+
implementation is an open question for that later work, not decided here.
|
|
35
|
+
|
|
36
|
+
## When this moves past skeleton
|
|
37
|
+
|
|
38
|
+
See [`@symbiote-native/local-auth`](../local-auth) as the reference shape for what this package
|
|
39
|
+
will look like once implemented — same `expo-modules-core`-based wrapping pattern (no native
|
|
40
|
+
view, a handful of async functions + an event listener), same core/react/vue/angular layout.
|
|
41
|
+
The real wrapping mechanics (why `expo-modules-core` is depended on directly and never the
|
|
42
|
+
`expo` meta-package, why upstream JS is hand-ported rather than imported, how autolinking picks
|
|
43
|
+
up the native module) are documented in the
|
|
44
|
+
[`symbiote-expo-native-module`](../../.claude/skills/symbiote-expo-native-module/SKILL.md) skill.
|
package/package.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@symbiote-native/clipboard",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "expo-clipboard wrapped for SymbioteNative — one framework-agnostic core, built once and reachable from the React, Vue, and Angular adapters. Reads and writes clipboard text, URLs, and images, plus a clipboard-change listener.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/OneEyed1366/symbiote-native.git",
|
|
9
|
+
"directory": "packages/clipboard"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://github.com/OneEyed1366/symbiote-native/tree/master/packages/clipboard#readme",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/OneEyed1366/symbiote-native/issues"
|
|
14
|
+
},
|
|
15
|
+
"author": "Andrey Prokopenko <psevdoproger@gmail.com>",
|
|
16
|
+
"publishConfig": {
|
|
17
|
+
"access": "public"
|
|
18
|
+
}
|
|
19
|
+
}
|