(text: string)
| 10 | } from '../utils/clipboard' |
| 11 | |
| 12 | function formatDefaultClipboardMessage(text: string): string | null { |
| 13 | const preview = text.replace(/\s+/g, ' ').trim() |
| 14 | if (!preview) { |
| 15 | return null |
| 16 | } |
| 17 | const truncated = preview.length > 40 ? `${preview.slice(0, 37)}…` : preview |
| 18 | return `Copied: "${truncated}"` |
| 19 | } |
| 20 | |
| 21 | export const useClipboard = () => { |
| 22 | const renderer = useRenderer() |