Skip to content

Commit 43864e0

Browse files
committed
feat: add shared readme types
1 parent c979fbf commit 43864e0

2 files changed

Lines changed: 24 additions & 0 deletions

File tree

shared/types/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
export * from './npm-registry'
22
export * from './jsr'
33
export * from './osv'
4+
export * from './readme'

shared/types/readme.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/**
2+
* Playground/demo link extracted from README
3+
*/
4+
export 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+
* Response from README API endpoint
17+
*/
18+
export interface ReadmeResponse {
19+
/** Rendered HTML content */
20+
html: string
21+
/** Extracted playground/demo links */
22+
playgroundLinks: PlaygroundLink[]
23+
}

0 commit comments

Comments
 (0)