/** * A clipboard write the host can inject via `FunkitProvider`'s `copyToClipboard` * to use their own clipboard module — e.g. `expo-clipboard` in Expo Go, where * the bare-RN native module isn't linked. Given the address text; returns * whether the write succeeded (a `void` return is treated as success). */ export type ClipboardWriter = (value: string) => void | Promise; /** Normalize host writers: void succeeds; false or rejection fails without throwing. */ export declare function writeClipboard(write: ClipboardWriter, value: string): Promise; /** * Default clipboard: lazily (dynamic import) loads the bare-RN * `@react-native-clipboard/clipboard` peer and writes via `setString`. * * The import is dynamic + guarded so the native module is only **evaluated when * a copy actually happens** — not at startup. A host that hasn't linked it * (e.g. Expo Go, where `getEnforcing('RNCClipboard')` would throw) should inject * its own writer through `FunkitProvider`'s `copyToClipboard`; that override * runs instead, so this path — and the throw — never execute. If the module is * absent and no override is provided, the copy degrades to a no-op + warning * instead of crashing. * * Returns whether the copy succeeded. */ export declare function copyToClipboard(value: string): Promise; /** * A clipboard read the host can inject via `FunkitProvider`'s * `pasteFromClipboard`, for the same reason as {@link ClipboardWriter}: the * bare-RN native module isn't linked everywhere. Returns the clipboard's text, * or `undefined` when it can't be read. */ export type ClipboardReader = () => string | undefined | Promise; /** A {@link ClipboardReader} that resolves to `undefined` instead of rejecting. */ export type SafeClipboardReader = () => Promise; /** * Wraps a host-injected reader where it enters the SDK, so no paste call site * has to defend itself. Only injected readers can fail; the default below is * already guarded, and the type lets a host throw as easily as reject. */ export declare function guardClipboardReader(read: ClipboardReader): SafeClipboardReader; /** * Default clipboard read — the mirror of {@link copyToClipboard}, and dynamic for * the same reason: the native module is only evaluated when a paste actually * happens, so a host that hasn't linked it degrades to a warning instead of * crashing at startup. */ export declare function pasteFromClipboard(): Promise; //# sourceMappingURL=clipboard.d.ts.map