feat: Code to image

Aperta
#161 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
48/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
react, typescript, vite
Ambito
devtools, frontend

Direzione di ricerca

Start with “Adding a tool” in docs/CODEMAP.md, then inspect src/tools/, src/tools/catalog.ts, and src/tools/registry.tsx to follow the existing tool pattern. Build the code editor, language and theme choices, image export, and clipboard flow using browser APIs; add Vitest coverage for the tool logic. Done means the catalog and registry entries work, nothing leaves the browser, and the tool handles offline use, light and dark mode, and phone width without layout shift.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement new tool wave-4

Why

Sharing a nice image of a code snippet (carbon.now.sh, ray.so) is popular, but those sites are online-only and some of the nicer ones are paid.

Replaces: carbon.now.sh, ray.so.

Scope

  • Paste code, pick a language and a theme, window chrome on or off, padding and background.
  • Light syntax highlighting without a big dependency: a small tokenizer for the top languages is enough, or get approval for a highlighter.
  • Export PNG or SVG, copy to clipboard.

Dependency

None. Web APIs only (canvas or SVG foreignObject, Clipboard API).

Done when

  • Logic lives in src/tools/<slug>/<slug>.ts with a Vitest test; the component only renders it.
  • One entry in src/tools/catalog.ts (category, audience, keywords, replaces) and one in src/tools/registry.tsx. See "Adding a tool" in docs/CODEMAP.md.
  • Nothing leaves the browser. It works offline once the page has loaded.
  • Works in light and dark mode and at phone width, with no layout shift when its state changes.
Lingua principale
TypeScript
Stelle
2
Fork
1
Merge medio
2g 21h
PR unite (30g)
7

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ajithakdev/toolglass

Tutte le issue di ajithakdev/toolglass

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.