[READ-ONLY] a fast, modern browser for the npm registry
at main 44 lines 1.1 kB view raw
1/** 2 * Playground/demo link extracted from README 3 */ 4export interface PlaygroundLink { 5 /** The full URL */ 6 url: string 7 /** Provider identifier (e.g., 'stackblitz', 'codesandbox') */ 8 provider: string 9 /** Human-readable provider name (e.g., 'StackBlitz', 'CodeSandbox') */ 10 providerName: string 11 /** Link text from README (e.g., 'Demo', 'Try it online') */ 12 label: string 13} 14 15/** 16 * Table of contents item extracted from README headings 17 */ 18export interface TocItem { 19 /** Plain text heading (HTML stripped) */ 20 text: string 21 /** Anchor ID (e.g., "user-content-installation") */ 22 id: string 23 /** Original heading depth (1-6) */ 24 depth: number 25} 26 27/** 28 * Response from README API endpoint 29 */ 30export interface ReadmeResponse { 31 /** Whether the README exists */ 32 mdExists?: boolean 33 /** Rendered HTML content */ 34 html: string 35 /** Extracted playground/demo links */ 36 playgroundLinks: PlaygroundLink[] 37 /** Table of contents extracted from headings */ 38 toc: TocItem[] 39} 40 41export interface ReadmeMarkdownResponse { 42 /** Original markdown content */ 43 markdown?: string 44}