matthewwong525/WongStack / .agents/plugins/access
access
VerifiedSee who can sign in and what each person may use; add, change or remove a person.
screen/copy-text.mjs
View on GitHubimport { html, useState } from "./vendor/preact-htm.mjs";
import { Button, Textarea } from "./ui.mjs";
/** One button copies the text, which stays selectable if the clipboard refuses: folded under the button, opening by
* itself on a failed copy, unless `shown` says it is already on screen. `variant` makes the button solid. */
export function CopyText({ text, label, variant = "outline", shown = false }) {
const [status, setStatus] = useState("");
const [expanded, setExpanded] = useState(false);
const copy = async () => {
try { await navigator.clipboard.writeText(text); setStatus("Copied."); }
catch { setExpanded(true); setStatus(shown ? "Select the message above to copy it by hand." : "Copy the message below by hand."); }
};
return html`<div class="flex w-full min-w-0 flex-col items-start">
<${Button} variant=${variant} onClick=${copy}>${label}<//>
<p role="status" class="mt-2 text-sm empty:mt-0">${status}</p>
${!shown && html`<details class="mt-2 w-full min-w-0" open=${expanded} onToggle=${event => setExpanded(event.currentTarget.open)}>
<summary class="cursor-pointer text-sm text-muted-foreground">Can't copy? Show the message</summary>
<${Textarea} class="mt-2 field-sizing-fixed wrap-anywhere" aria-label="The message to copy" value=${text} readOnly rows=${7} />
</details>`}
</div>`;
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |