@symbiote-native/clipboard 0.3.0 → 1.0.0

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 (2) hide show
  1. package/README.md +58 -3
  2. package/package.json +27 -15
package/README.md CHANGED
@@ -126,6 +126,60 @@ function handleCopy(input: string): void {
126
126
  </template>
127
127
  ```
128
128
 
129
+ ```svelte
130
+ <!-- Svelte -->
131
+ <script lang="ts">
132
+ import { getStringAsync, setStringAsync } from '@symbiote-native/clipboard';
133
+ import { useClipboard } from '@symbiote-native/clipboard/svelte';
134
+
135
+ let text = $state('checking…');
136
+ function refresh(): void {
137
+ void getStringAsync().then(value => (text = value));
138
+ }
139
+
140
+ const clipboard = useClipboard(); // { current: IClipboardEvent | null }
141
+
142
+ $effect(() => {
143
+ refresh();
144
+ });
145
+ $effect(() => {
146
+ if (clipboard.current !== null) refresh();
147
+ });
148
+
149
+ function handleCopy(input: string): void {
150
+ void setStringAsync(input).then(refresh);
151
+ }
152
+ </script>
153
+
154
+ <Text>{text}</Text>
155
+ ```
156
+
157
+ ```tsx
158
+ // Solid
159
+ import { createEffect, createSignal } from 'solid-js';
160
+ import { getStringAsync, setStringAsync } from '@symbiote-native/clipboard';
161
+ import { createClipboard } from '@symbiote-native/clipboard/solid';
162
+
163
+ function ClipboardScreen() {
164
+ const clipboardEvent = createClipboard(); // Accessor<IClipboardEvent | null>
165
+ const [text, setText] = createSignal('checking…');
166
+
167
+ function refresh(): void {
168
+ getStringAsync().then(setText);
169
+ }
170
+ refresh();
171
+
172
+ createEffect(() => {
173
+ if (clipboardEvent() !== null) refresh();
174
+ });
175
+
176
+ const handleCopy = (input: string) =>
177
+ setStringAsync(input).then(refresh);
178
+
179
+ return <Text>{text()}</Text>;
180
+ }
181
+ ```
182
+
129
183
  ```ts
130
184
  // Angular
131
185
  import { Component, Injector, effect, inject, signal } from '@angular/core';
@@ -163,6 +217,7 @@ export class ClipboardScreen {
163
217
 
164
218
  These are trimmed from the real demo screens — `examples/expo-react/screens/ClipboardScreen.tsx`,
165
219
  `examples/expo-vue-sfc/screens/ClipboardScreen.vue`, `examples/expo-vue-tsx/screens/ClipboardScreen.tsx`,
220
+ `examples/expo-svelte/screens/ClipboardScreen.svelte`, `examples/expo-solid/screens/ClipboardScreen.tsx`,
166
221
  `examples/expo-angular/src/screens/ClipboardScreen.ts` — which additionally show `hasStringAsync()`
167
222
  status badges and, iOS-only, the `getUrlAsync`/`setUrlAsync`/`hasUrlAsync` URL surface.
168
223
 
@@ -224,6 +279,6 @@ is a pure async-function + one-listener surface, never a view. Native rendering
224
279
  on-device (see the parent [README](../../README.md) for the project's testing model).
225
280
 
226
281
  Native autolinking wiring (Android's 3-layer registration, iOS Podfile/pod install) is done across
227
- all four `examples/expo-*` canary apps. It isn't wired into the public non-Expo canaries
228
- (`examples/react`, `examples/vue-sfc`, `examples/vue-tsx`, `examples/angular`) yet — those don't
229
- depend on any `expo-modules-core` package today.
282
+ all six `examples/expo-*` canary apps. It isn't wired into the public non-Expo canaries
283
+ (`examples/react`, `examples/vue-sfc`, `examples/vue-tsx`, `examples/svelte`, `examples/solid`,
284
+ `examples/angular`) yet — those don't depend on any `expo-modules-core` package today.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@symbiote-native/clipboard",
3
- "version": "0.3.0",
3
+ "version": "1.0.0",
4
4
  "description": "expo-clipboard wrapped for SymbioteNative — one framework-agnostic core, built once and reachable from the React, Vue, Svelte, Solid, and Angular adapters. Reads and writes clipboard text, URLs, and images, plus a clipboard-change listener.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -13,6 +13,18 @@
13
13
  "url": "https://github.com/OneEyed1366/symbiote-native/issues"
14
14
  },
15
15
  "author": "Andrey Prokopenko <psevdoproger@gmail.com>",
16
+ "keywords": [
17
+ "react-native",
18
+ "symbiote-native",
19
+ "expo-clipboard",
20
+ "react",
21
+ "vue",
22
+ "svelte",
23
+ "solid",
24
+ "angular",
25
+ "clipboard",
26
+ "copy-paste"
27
+ ],
16
28
  "type": "module",
17
29
  "main": "./build/core/index.js",
18
30
  "module": "./build/core/index.js",
@@ -61,19 +73,19 @@
61
73
  "expo-modules-core": "57.0.5"
62
74
  },
63
75
  "peerDependencies": {
64
- "@symbiote-native/angular": ">=0.6.2",
65
- "@symbiote-native/engine": ">=0.1.7",
66
- "@symbiote-native/react": ">=0.2.8",
67
- "@symbiote-native/solid": ">=0.0.1",
68
- "@symbiote-native/svelte": ">=0.1.0",
69
- "@symbiote-native/vue": ">=0.3.8",
70
76
  "@angular/core": ">=20",
71
77
  "@vue/runtime-core": "^3.5.13",
72
78
  "react": ">=19.0.0",
73
79
  "react-native": ">=0.86",
74
80
  "solid-js": ">=1.9.0",
75
81
  "svelte": ">=5.56.0",
76
- "vue": ">=3.5.0"
82
+ "vue": ">=3.5.0",
83
+ "@symbiote-native/angular": "^1.0.0",
84
+ "@symbiote-native/engine": "^0.4.0",
85
+ "@symbiote-native/react": "^1.0.0",
86
+ "@symbiote-native/solid": "^1.0.0",
87
+ "@symbiote-native/svelte": "^1.0.0",
88
+ "@symbiote-native/vue": "^1.0.0"
77
89
  },
78
90
  "peerDependenciesMeta": {
79
91
  "@symbiote-native/angular": {
@@ -121,13 +133,13 @@
121
133
  "solid-js": "^1.9.14",
122
134
  "svelte": "^5.56.0",
123
135
  "typescript": "~6.0.0",
124
- "@symbiote-native/angular": "0.8.0",
125
- "@symbiote-native/engine": "0.3.0",
126
- "@symbiote-native/react": "0.4.0",
127
- "@symbiote-native/solid": "0.1.0",
128
- "@symbiote-native/svelte": "0.3.0",
129
- "@symbiote-native/test-utils": "0.2.0",
130
- "@symbiote-native/vue": "0.5.0"
136
+ "@symbiote-native/angular": "1.0.0",
137
+ "@symbiote-native/engine": "0.4.0",
138
+ "@symbiote-native/react": "1.0.0",
139
+ "@symbiote-native/solid": "1.0.0",
140
+ "@symbiote-native/svelte": "1.0.0",
141
+ "@symbiote-native/test-utils": "0.3.0",
142
+ "@symbiote-native/vue": "1.0.0"
131
143
  },
132
144
  "scripts": {
133
145
  "typecheck": "tsc --build",