@openpkg-ts/ui 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/index.d.ts +64 -64
- package/dist/api/index.js +193 -193
- package/dist/docskit/index.d.ts +223 -222
- package/dist/docskit/index.js +1910 -5458
- package/package.json +3 -1
package/dist/docskit/index.d.ts
CHANGED
|
@@ -1,3 +1,179 @@
|
|
|
1
|
+
import * as React3 from "react";
|
|
2
|
+
import * as React2 from "react";
|
|
3
|
+
interface Language {
|
|
4
|
+
/** Language identifier (e.g., "curl", "node", "python") */
|
|
5
|
+
id: string;
|
|
6
|
+
/** Display label (e.g., "cURL", "Node.js", "Python") */
|
|
7
|
+
label: string;
|
|
8
|
+
}
|
|
9
|
+
interface LanguageSelectorProps {
|
|
10
|
+
/** Available languages */
|
|
11
|
+
languages: Language[];
|
|
12
|
+
/** Currently selected language id */
|
|
13
|
+
value: string;
|
|
14
|
+
/** Callback when language changes */
|
|
15
|
+
onChange: (languageId: string) => void;
|
|
16
|
+
/** Custom className */
|
|
17
|
+
className?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Dropdown selector for choosing code example language.
|
|
21
|
+
* Used in APICodePanel to switch between language examples.
|
|
22
|
+
*/
|
|
23
|
+
declare function LanguageSelector({ languages, value, onChange, className }: LanguageSelectorProps): React2.ReactNode;
|
|
24
|
+
interface CodeExample {
|
|
25
|
+
/** Language identifier */
|
|
26
|
+
languageId: string;
|
|
27
|
+
/** Code content */
|
|
28
|
+
code: string;
|
|
29
|
+
/** Optional syntax highlighting language (defaults to languageId) */
|
|
30
|
+
highlightLang?: string;
|
|
31
|
+
}
|
|
32
|
+
interface APICodePanelProps {
|
|
33
|
+
/** Available languages for the selector */
|
|
34
|
+
languages: Language[];
|
|
35
|
+
/** Code examples keyed by language id */
|
|
36
|
+
examples: CodeExample[];
|
|
37
|
+
/** Optional external link (e.g., to API playground) */
|
|
38
|
+
externalLink?: string;
|
|
39
|
+
/** Optional title shown in header */
|
|
40
|
+
title?: string;
|
|
41
|
+
/** Custom className */
|
|
42
|
+
className?: string;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Right-side sticky code panel for API documentation.
|
|
46
|
+
* Features language dropdown, copy button, and dark bg with syntax highlighting.
|
|
47
|
+
*/
|
|
48
|
+
declare function APICodePanel({ languages, examples, externalLink, title, className }: APICodePanelProps): React3.ReactNode;
|
|
49
|
+
import * as React4 from "react";
|
|
50
|
+
interface APIReferencePageProps {
|
|
51
|
+
/** Page title */
|
|
52
|
+
title: string;
|
|
53
|
+
/** Optional page description */
|
|
54
|
+
description?: React4.ReactNode;
|
|
55
|
+
/** API sections as children */
|
|
56
|
+
children: React4.ReactNode;
|
|
57
|
+
/** Custom className */
|
|
58
|
+
className?: string;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Full page wrapper for API reference documentation.
|
|
62
|
+
* Provides max-width container and consistent spacing.
|
|
63
|
+
*/
|
|
64
|
+
declare function APIReferencePage({ title, description, children, className }: APIReferencePageProps): React4.ReactNode;
|
|
65
|
+
import * as React5 from "react";
|
|
66
|
+
interface APISectionProps {
|
|
67
|
+
/** Section title (e.g., "Create a customer", "The Customer object") */
|
|
68
|
+
title: string;
|
|
69
|
+
/** Optional anchor id for deep linking */
|
|
70
|
+
id?: string;
|
|
71
|
+
/** Optional description */
|
|
72
|
+
description?: React5.ReactNode;
|
|
73
|
+
/** Left column content (parameters, returns, etc.) */
|
|
74
|
+
children: React5.ReactNode;
|
|
75
|
+
/** Languages for code panel */
|
|
76
|
+
languages: Language[];
|
|
77
|
+
/** Code examples for the right panel */
|
|
78
|
+
examples: CodeExample[];
|
|
79
|
+
/** Optional external link for code panel */
|
|
80
|
+
externalLink?: string;
|
|
81
|
+
/** Optional code panel title */
|
|
82
|
+
codePanelTitle?: string;
|
|
83
|
+
/** Custom className */
|
|
84
|
+
className?: string;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Single API section with two-column layout.
|
|
88
|
+
* Docs/params on left, sticky code panel on right.
|
|
89
|
+
*/
|
|
90
|
+
declare function APISection({ title, id, description, children, languages, examples, externalLink, codePanelTitle, className }: APISectionProps): React5.ReactNode;
|
|
91
|
+
import * as React6 from "react";
|
|
92
|
+
type HttpMethod = "GET" | "POST" | "PUT" | "DELETE" | "PATCH";
|
|
93
|
+
type EndpointBadgeSize = "sm" | "md";
|
|
94
|
+
declare const endpointBadgeVariants: (props?: {
|
|
95
|
+
method?: HttpMethod | null;
|
|
96
|
+
size?: EndpointBadgeSize | null;
|
|
97
|
+
className?: string;
|
|
98
|
+
}) => string;
|
|
99
|
+
interface EndpointBadgeProps extends React6.HTMLAttributes<HTMLSpanElement> {
|
|
100
|
+
method: HttpMethod;
|
|
101
|
+
size?: EndpointBadgeSize | null;
|
|
102
|
+
}
|
|
103
|
+
declare const EndpointBadge: React6.ForwardRefExoticComponent<EndpointBadgeProps & React6.RefAttributes<HTMLSpanElement>>;
|
|
104
|
+
import * as React7 from "react";
|
|
105
|
+
interface EndpointHeaderProps extends React7.HTMLAttributes<HTMLDivElement> {
|
|
106
|
+
/** HTTP method */
|
|
107
|
+
method: HttpMethod;
|
|
108
|
+
/** API path (e.g., "/v1/customers") */
|
|
109
|
+
path: string;
|
|
110
|
+
/** Show copy button on hover */
|
|
111
|
+
copyable?: boolean;
|
|
112
|
+
}
|
|
113
|
+
declare const EndpointHeader: React7.ForwardRefExoticComponent<EndpointHeaderProps & React7.RefAttributes<HTMLDivElement>>;
|
|
114
|
+
import * as React8 from "react";
|
|
115
|
+
interface APIParameterSchema {
|
|
116
|
+
/** Type name */
|
|
117
|
+
type?: string;
|
|
118
|
+
/** Formatted type string */
|
|
119
|
+
typeString?: string;
|
|
120
|
+
/** Description */
|
|
121
|
+
description?: string;
|
|
122
|
+
/** Nested properties for object types */
|
|
123
|
+
properties?: Record<string, APIParameterSchema>;
|
|
124
|
+
/** Required property names */
|
|
125
|
+
required?: string[];
|
|
126
|
+
}
|
|
127
|
+
interface APIParameterItemProps {
|
|
128
|
+
/** Parameter name */
|
|
129
|
+
name: string;
|
|
130
|
+
/** Type string (e.g., "string", "object") */
|
|
131
|
+
type: string;
|
|
132
|
+
/** Is required */
|
|
133
|
+
required?: boolean;
|
|
134
|
+
/** Description */
|
|
135
|
+
description?: string;
|
|
136
|
+
/** Nested children (for expandable objects) */
|
|
137
|
+
children?: APIParameterSchema;
|
|
138
|
+
/** Nesting depth */
|
|
139
|
+
depth?: number;
|
|
140
|
+
/** Custom className */
|
|
141
|
+
className?: string;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Single parameter row with name, type, required badge, description, and expandable children.
|
|
145
|
+
* Stripe-style API reference parameter display.
|
|
146
|
+
*/
|
|
147
|
+
declare function APIParameterItem({ name, type, required, description, children, depth, className }: APIParameterItemProps): React8.ReactNode;
|
|
148
|
+
import * as React9 from "react";
|
|
149
|
+
interface ParameterListProps {
|
|
150
|
+
/** Title above the list (e.g., "Body parameters") */
|
|
151
|
+
title?: string;
|
|
152
|
+
/** Number of items to show before collapsing */
|
|
153
|
+
collapseAfter?: number;
|
|
154
|
+
/** Child parameter items */
|
|
155
|
+
children: React9.ReactNode;
|
|
156
|
+
/** Custom className */
|
|
157
|
+
className?: string;
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Container for parameter items with optional "More parameters" collapse.
|
|
161
|
+
*/
|
|
162
|
+
declare function ParameterList({ title, collapseAfter, children, className }: ParameterListProps): React9.ReactNode;
|
|
163
|
+
import * as React10 from "react";
|
|
164
|
+
interface ResponseBlockProps {
|
|
165
|
+
/** Response JSON data */
|
|
166
|
+
data: object;
|
|
167
|
+
/** Optional title (e.g., "Response", "200 OK") */
|
|
168
|
+
title?: string;
|
|
169
|
+
/** Custom className */
|
|
170
|
+
className?: string;
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* JSON response preview with syntax highlighting.
|
|
174
|
+
* Displays formatted JSON with copy functionality.
|
|
175
|
+
*/
|
|
176
|
+
declare function ResponseBlock({ data, title, className }: ResponseBlockProps): React10.ReactNode;
|
|
1
177
|
import { AnnotationHandler } from "codehike/code";
|
|
2
178
|
declare const callout: AnnotationHandler;
|
|
3
179
|
import { AnnotationHandler as AnnotationHandler2, RawCode } from "codehike/code";
|
|
@@ -27,16 +203,16 @@ declare const theme = "github-from-css";
|
|
|
27
203
|
* flagsToOptions("na") // { lineNumbers: true, animate: true }
|
|
28
204
|
* flagsToOptions("c") // { copyButton: true }
|
|
29
205
|
*/
|
|
30
|
-
declare function flagsToOptions(flags?: string);
|
|
206
|
+
declare function flagsToOptions(flags?: string): CodeOptions;
|
|
31
207
|
declare function DocsKitCode(props: {
|
|
32
208
|
codeblock: RawCode;
|
|
33
209
|
handlers?: AnnotationHandler2[];
|
|
34
210
|
className?: string;
|
|
35
|
-
})
|
|
211
|
+
}): Promise<React.JSX.Element>;
|
|
36
212
|
declare function SingleCode(props: {
|
|
37
213
|
group: CodeInfo;
|
|
38
214
|
className?: string;
|
|
39
|
-
})
|
|
215
|
+
}): Promise<React.JSX.Element>;
|
|
40
216
|
declare function toCodeGroup(props: {
|
|
41
217
|
codeblocks: RawCode[];
|
|
42
218
|
flags?: string;
|
|
@@ -46,7 +222,7 @@ declare function toCodeGroup(props: {
|
|
|
46
222
|
declare function MultiCode({ group, className }: {
|
|
47
223
|
group: CodeInfo;
|
|
48
224
|
className?: string;
|
|
49
|
-
});
|
|
225
|
+
}): React.JSX.Element;
|
|
50
226
|
import { AnnotationHandler as AnnotationHandler3, RawCode as RawCode2 } from "codehike/code";
|
|
51
227
|
/**
|
|
52
228
|
* Client-side code block with syntax highlighting.
|
|
@@ -56,20 +232,20 @@ declare function ClientDocsKitCode(props: {
|
|
|
56
232
|
codeblock: RawCode2;
|
|
57
233
|
handlers?: AnnotationHandler3[];
|
|
58
234
|
className?: string;
|
|
59
|
-
});
|
|
235
|
+
}): React.JSX.Element;
|
|
60
236
|
/**
|
|
61
237
|
* Client-side terminal-style code block.
|
|
62
238
|
*/
|
|
63
239
|
declare function ClientTerminal(props: {
|
|
64
240
|
codeblock: RawCode2;
|
|
65
241
|
handlers?: AnnotationHandler3[];
|
|
66
|
-
});
|
|
242
|
+
}): React.JSX.Element;
|
|
67
243
|
/**
|
|
68
244
|
* Client-side inline code with syntax highlighting.
|
|
69
245
|
*/
|
|
70
246
|
declare function ClientInlineCode({ codeblock }: {
|
|
71
247
|
codeblock: RawCode2;
|
|
72
|
-
});
|
|
248
|
+
}): React.JSX.Element;
|
|
73
249
|
/**
|
|
74
250
|
* Client-side code tabs with multiple files.
|
|
75
251
|
*/
|
|
@@ -77,12 +253,12 @@ declare function ClientCode(props: {
|
|
|
77
253
|
codeblocks: RawCode2[];
|
|
78
254
|
flags?: string;
|
|
79
255
|
storage?: string;
|
|
80
|
-
});
|
|
256
|
+
}): React.JSX.Element;
|
|
81
257
|
declare function CopyButton({ text, className, variant }: {
|
|
82
258
|
text: string;
|
|
83
259
|
className?: string;
|
|
84
260
|
variant?: "floating" | "inline";
|
|
85
|
-
});
|
|
261
|
+
}): React.JSX.Element;
|
|
86
262
|
import { AnnotationHandler as AnnotationHandler4, RawCode as RawCode3 } from "codehike/code";
|
|
87
263
|
interface DiffStats {
|
|
88
264
|
additions?: number;
|
|
@@ -107,16 +283,16 @@ interface ClientDiffCodeProps {
|
|
|
107
283
|
* DocKit code block variant with file change row header.
|
|
108
284
|
* Displays path/filename with diff stats, collapsible with syntax-highlighted code.
|
|
109
285
|
*/
|
|
110
|
-
declare function ClientDiffCode(props: ClientDiffCodeProps);
|
|
286
|
+
declare function ClientDiffCode(props: ClientDiffCodeProps): React.JSX.Element;
|
|
111
287
|
declare function CodeIcon({ title, lang, className }: {
|
|
112
288
|
title: string;
|
|
113
289
|
lang: string;
|
|
114
290
|
className?: string;
|
|
115
|
-
});
|
|
291
|
+
}): React.JSX.Element;
|
|
116
292
|
import { RawCode as RawCode4 } from "codehike/code";
|
|
117
293
|
declare function DocsKitInlineCode({ codeblock }: {
|
|
118
294
|
codeblock: RawCode4;
|
|
119
|
-
})
|
|
295
|
+
}): Promise<React.JSX.Element>;
|
|
120
296
|
type PackageManager = "npm" | "bun" | "pnpm" | "yarn";
|
|
121
297
|
interface PackageInstallProps {
|
|
122
298
|
/** The package name to install */
|
|
@@ -140,38 +316,38 @@ interface PackageInstallProps {
|
|
|
140
316
|
* <PackageInstall package="opencode-ai" global />
|
|
141
317
|
* ```
|
|
142
318
|
*/
|
|
143
|
-
declare function PackageInstall({ package: pkg, dev, global: isGlobal, managers, copyButton }: PackageInstallProps);
|
|
319
|
+
declare function PackageInstall({ package: pkg, dev, global: isGlobal, managers, copyButton }: PackageInstallProps): React.JSX.Element;
|
|
144
320
|
/**
|
|
145
321
|
* Loading skeleton for code blocks.
|
|
146
322
|
*/
|
|
147
323
|
declare function CodeBlockSkeleton({ hasTitle, lines }: {
|
|
148
324
|
hasTitle?: boolean;
|
|
149
325
|
lines?: number;
|
|
150
|
-
});
|
|
326
|
+
}): React.JSX.Element;
|
|
151
327
|
/**
|
|
152
328
|
* Loading skeleton for terminal-style code blocks.
|
|
153
329
|
*/
|
|
154
330
|
declare function TerminalSkeleton({ lines }: {
|
|
155
331
|
lines?: number;
|
|
156
|
-
});
|
|
332
|
+
}): React.JSX.Element;
|
|
157
333
|
/**
|
|
158
334
|
* Loading skeleton for inline code.
|
|
159
335
|
*/
|
|
160
|
-
declare function InlineCodeSkeleton();
|
|
336
|
+
declare function InlineCodeSkeleton(): React.JSX.Element;
|
|
161
337
|
/**
|
|
162
338
|
* Loading skeleton for code tabs.
|
|
163
339
|
*/
|
|
164
340
|
declare function CodeTabsSkeleton({ tabs, lines }: {
|
|
165
341
|
tabs?: number;
|
|
166
342
|
lines?: number;
|
|
167
|
-
});
|
|
343
|
+
}): React.JSX.Element;
|
|
168
344
|
import { RawCode as RawCode5 } from "codehike/code";
|
|
169
|
-
declare function CodeGroup(props: unknown)
|
|
345
|
+
declare function CodeGroup(props: unknown): Promise<React.JSX.Element>;
|
|
170
346
|
declare function Code(props: {
|
|
171
347
|
codeblocks: RawCode5[];
|
|
172
348
|
flags?: string;
|
|
173
349
|
storage?: string;
|
|
174
|
-
})
|
|
350
|
+
}): Promise<React.JSX.Element>;
|
|
175
351
|
import { AnnotationHandler as AnnotationHandler5, RawCode as RawCode6 } from "codehike/code";
|
|
176
352
|
/**
|
|
177
353
|
* Terminal-style code block with macOS window controls.
|
|
@@ -190,221 +366,46 @@ import { AnnotationHandler as AnnotationHandler5, RawCode as RawCode6 } from "co
|
|
|
190
366
|
declare function Terminal(props: {
|
|
191
367
|
codeblock: RawCode6;
|
|
192
368
|
handlers?: AnnotationHandler5[];
|
|
193
|
-
})
|
|
194
|
-
declare const collapse: unknown;
|
|
369
|
+
}): Promise<React.JSX.Element>;
|
|
195
370
|
import { AnnotationHandler as AnnotationHandler6 } from "codehike/code";
|
|
196
|
-
declare const
|
|
197
|
-
import React2 from "react";
|
|
198
|
-
declare function addDocsKit<T extends Record<string, React2.ElementType | string>>(components: T): T;
|
|
371
|
+
declare const collapse: AnnotationHandler6[];
|
|
199
372
|
import { AnnotationHandler as AnnotationHandler7 } from "codehike/code";
|
|
200
|
-
declare const
|
|
373
|
+
declare const diff: AnnotationHandler7;
|
|
374
|
+
import React11 from "react";
|
|
375
|
+
declare function addDocsKit<T extends Record<string, React11.ElementType | string>>(components: T): T;
|
|
201
376
|
import { AnnotationHandler as AnnotationHandler8 } from "codehike/code";
|
|
202
|
-
|
|
377
|
+
declare const expandable: AnnotationHandler8;
|
|
378
|
+
import { AnnotationHandler as AnnotationHandler9 } from "codehike/code";
|
|
379
|
+
import React12 from "react";
|
|
203
380
|
declare function WithHover(props: {
|
|
204
|
-
children:
|
|
205
|
-
});
|
|
381
|
+
children: React12.ReactNode;
|
|
382
|
+
}): React12.JSX.Element;
|
|
206
383
|
declare function HoverLink(props: {
|
|
207
384
|
href?: string;
|
|
208
|
-
children?:
|
|
209
|
-
});
|
|
210
|
-
declare const hover:
|
|
211
|
-
import { AnnotationHandler as AnnotationHandler9 } from "codehike/code";
|
|
212
|
-
declare const lineNumbers2: AnnotationHandler9;
|
|
385
|
+
children?: React12.ReactNode;
|
|
386
|
+
}): React12.JSX.Element;
|
|
387
|
+
declare const hover: AnnotationHandler9;
|
|
213
388
|
import { AnnotationHandler as AnnotationHandler10 } from "codehike/code";
|
|
214
|
-
declare const
|
|
389
|
+
declare const lineNumbers2: AnnotationHandler10;
|
|
215
390
|
import { AnnotationHandler as AnnotationHandler11 } from "codehike/code";
|
|
216
|
-
declare const
|
|
391
|
+
declare const link: AnnotationHandler11;
|
|
392
|
+
import { AnnotationHandler as AnnotationHandler12 } from "codehike/code";
|
|
393
|
+
declare const mark: AnnotationHandler12;
|
|
217
394
|
declare function WithNotes({ children,...rest }: {
|
|
218
395
|
children: React.ReactNode;
|
|
219
|
-
});
|
|
396
|
+
}): React.JSX.Element;
|
|
220
397
|
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
221
|
-
import * as
|
|
222
|
-
declare function Tabs({ className,...props }:
|
|
223
|
-
declare function TabsList({ className,...props }:
|
|
224
|
-
declare function TabsTrigger({ className,...props }:
|
|
225
|
-
declare function TabsContent({ className,...props }:
|
|
226
|
-
import { AnnotationHandler as
|
|
227
|
-
declare const tooltip:
|
|
398
|
+
import * as React13 from "react";
|
|
399
|
+
declare function Tabs({ className,...props }: React13.ComponentProps<typeof TabsPrimitive.Root>): React13.JSX.Element;
|
|
400
|
+
declare function TabsList({ className,...props }: React13.ComponentProps<typeof TabsPrimitive.List>): React13.JSX.Element;
|
|
401
|
+
declare function TabsTrigger({ className,...props }: React13.ComponentProps<typeof TabsPrimitive.Trigger>): React13.JSX.Element;
|
|
402
|
+
declare function TabsContent({ className,...props }: React13.ComponentProps<typeof TabsPrimitive.Content>): React13.JSX.Element;
|
|
403
|
+
import { AnnotationHandler as AnnotationHandler13 } from "codehike/code";
|
|
404
|
+
declare const tooltip: AnnotationHandler13;
|
|
228
405
|
declare function TooltipLink(props: {
|
|
229
406
|
href?: string;
|
|
230
407
|
children?: React.ReactNode;
|
|
231
|
-
});
|
|
232
|
-
import { AnnotationHandler as
|
|
233
|
-
declare const wordWrap2:
|
|
234
|
-
import * as React5 from "react";
|
|
235
|
-
type HttpMethod = "GET" | "POST" | "PUT" | "DELETE" | "PATCH";
|
|
236
|
-
type EndpointBadgeSize = "sm" | "md";
|
|
237
|
-
declare const endpointBadgeVariants: (props?: {
|
|
238
|
-
method?: HttpMethod | null;
|
|
239
|
-
size?: EndpointBadgeSize | null;
|
|
240
|
-
className?: string;
|
|
241
|
-
}) => string;
|
|
242
|
-
interface EndpointBadgeProps extends React5.HTMLAttributes<HTMLSpanElement> {
|
|
243
|
-
method: HttpMethod;
|
|
244
|
-
size?: EndpointBadgeSize | null;
|
|
245
|
-
}
|
|
246
|
-
declare const EndpointBadge: React5.ForwardRefExoticComponent<EndpointBadgeProps & React5.RefAttributes<HTMLSpanElement>>;
|
|
247
|
-
import * as React6 from "react";
|
|
248
|
-
interface EndpointHeaderProps extends React6.HTMLAttributes<HTMLDivElement> {
|
|
249
|
-
/** HTTP method */
|
|
250
|
-
method: HttpMethod;
|
|
251
|
-
/** API path (e.g., "/v1/customers") */
|
|
252
|
-
path: string;
|
|
253
|
-
/** Show copy button on hover */
|
|
254
|
-
copyable?: boolean;
|
|
255
|
-
}
|
|
256
|
-
declare const EndpointHeader: React6.ForwardRefExoticComponent<EndpointHeaderProps & React6.RefAttributes<HTMLDivElement>>;
|
|
257
|
-
import * as React7 from "react";
|
|
258
|
-
interface APIParameterSchema {
|
|
259
|
-
/** Type name */
|
|
260
|
-
type?: string;
|
|
261
|
-
/** Formatted type string */
|
|
262
|
-
typeString?: string;
|
|
263
|
-
/** Description */
|
|
264
|
-
description?: string;
|
|
265
|
-
/** Nested properties for object types */
|
|
266
|
-
properties?: Record<string, APIParameterSchema>;
|
|
267
|
-
/** Required property names */
|
|
268
|
-
required?: string[];
|
|
269
|
-
}
|
|
270
|
-
interface APIParameterItemProps {
|
|
271
|
-
/** Parameter name */
|
|
272
|
-
name: string;
|
|
273
|
-
/** Type string (e.g., "string", "object") */
|
|
274
|
-
type: string;
|
|
275
|
-
/** Is required */
|
|
276
|
-
required?: boolean;
|
|
277
|
-
/** Description */
|
|
278
|
-
description?: string;
|
|
279
|
-
/** Nested children (for expandable objects) */
|
|
280
|
-
children?: APIParameterSchema;
|
|
281
|
-
/** Nesting depth */
|
|
282
|
-
depth?: number;
|
|
283
|
-
/** Custom className */
|
|
284
|
-
className?: string;
|
|
285
|
-
}
|
|
286
|
-
/**
|
|
287
|
-
* Single parameter row with name, type, required badge, description, and expandable children.
|
|
288
|
-
* Stripe-style API reference parameter display.
|
|
289
|
-
*/
|
|
290
|
-
declare function APIParameterItem({ name, type, required, description, children, depth, className }: APIParameterItemProps): React7.ReactNode;
|
|
291
|
-
import * as React8 from "react";
|
|
292
|
-
interface ParameterListProps {
|
|
293
|
-
/** Title above the list (e.g., "Body parameters") */
|
|
294
|
-
title?: string;
|
|
295
|
-
/** Number of items to show before collapsing */
|
|
296
|
-
collapseAfter?: number;
|
|
297
|
-
/** Child parameter items */
|
|
298
|
-
children: React8.ReactNode;
|
|
299
|
-
/** Custom className */
|
|
300
|
-
className?: string;
|
|
301
|
-
}
|
|
302
|
-
/**
|
|
303
|
-
* Container for parameter items with optional "More parameters" collapse.
|
|
304
|
-
*/
|
|
305
|
-
declare function ParameterList({ title, collapseAfter, children, className }: ParameterListProps): React8.ReactNode;
|
|
306
|
-
import * as React9 from "react";
|
|
307
|
-
interface ResponseBlockProps {
|
|
308
|
-
/** Response JSON data */
|
|
309
|
-
data: object;
|
|
310
|
-
/** Optional title (e.g., "Response", "200 OK") */
|
|
311
|
-
title?: string;
|
|
312
|
-
/** Custom className */
|
|
313
|
-
className?: string;
|
|
314
|
-
}
|
|
315
|
-
/**
|
|
316
|
-
* JSON response preview with syntax highlighting.
|
|
317
|
-
* Displays formatted JSON with copy functionality.
|
|
318
|
-
*/
|
|
319
|
-
declare function ResponseBlock({ data, title, className }: ResponseBlockProps): React9.ReactNode;
|
|
320
|
-
import * as React10 from "react";
|
|
321
|
-
interface Language {
|
|
322
|
-
/** Language identifier (e.g., "curl", "node", "python") */
|
|
323
|
-
id: string;
|
|
324
|
-
/** Display label (e.g., "cURL", "Node.js", "Python") */
|
|
325
|
-
label: string;
|
|
326
|
-
}
|
|
327
|
-
interface LanguageSelectorProps {
|
|
328
|
-
/** Available languages */
|
|
329
|
-
languages: Language[];
|
|
330
|
-
/** Currently selected language id */
|
|
331
|
-
value: string;
|
|
332
|
-
/** Callback when language changes */
|
|
333
|
-
onChange: (languageId: string) => void;
|
|
334
|
-
/** Custom className */
|
|
335
|
-
className?: string;
|
|
336
|
-
}
|
|
337
|
-
/**
|
|
338
|
-
* Dropdown selector for choosing code example language.
|
|
339
|
-
* Used in APICodePanel to switch between language examples.
|
|
340
|
-
*/
|
|
341
|
-
declare function LanguageSelector({ languages, value, onChange, className }: LanguageSelectorProps): React10.ReactNode;
|
|
342
|
-
import * as React11 from "react";
|
|
343
|
-
interface CodeExample {
|
|
344
|
-
/** Language identifier */
|
|
345
|
-
languageId: string;
|
|
346
|
-
/** Code content */
|
|
347
|
-
code: string;
|
|
348
|
-
/** Optional syntax highlighting language (defaults to languageId) */
|
|
349
|
-
highlightLang?: string;
|
|
350
|
-
}
|
|
351
|
-
interface APICodePanelProps {
|
|
352
|
-
/** Available languages for the selector */
|
|
353
|
-
languages: Language[];
|
|
354
|
-
/** Code examples keyed by language id */
|
|
355
|
-
examples: CodeExample[];
|
|
356
|
-
/** Optional external link (e.g., to API playground) */
|
|
357
|
-
externalLink?: string;
|
|
358
|
-
/** Optional title shown in header */
|
|
359
|
-
title?: string;
|
|
360
|
-
/** Custom className */
|
|
361
|
-
className?: string;
|
|
362
|
-
}
|
|
363
|
-
/**
|
|
364
|
-
* Right-side sticky code panel for API documentation.
|
|
365
|
-
* Features language dropdown, copy button, and dark bg with syntax highlighting.
|
|
366
|
-
*/
|
|
367
|
-
declare function APICodePanel({ languages, examples, externalLink, title, className }: APICodePanelProps): React11.ReactNode;
|
|
368
|
-
import * as React12 from "react";
|
|
369
|
-
interface APISectionProps {
|
|
370
|
-
/** Section title (e.g., "Create a customer", "The Customer object") */
|
|
371
|
-
title: string;
|
|
372
|
-
/** Optional anchor id for deep linking */
|
|
373
|
-
id?: string;
|
|
374
|
-
/** Optional description */
|
|
375
|
-
description?: React12.ReactNode;
|
|
376
|
-
/** Left column content (parameters, returns, etc.) */
|
|
377
|
-
children: React12.ReactNode;
|
|
378
|
-
/** Languages for code panel */
|
|
379
|
-
languages: Language[];
|
|
380
|
-
/** Code examples for the right panel */
|
|
381
|
-
examples: CodeExample[];
|
|
382
|
-
/** Optional external link for code panel */
|
|
383
|
-
externalLink?: string;
|
|
384
|
-
/** Optional code panel title */
|
|
385
|
-
codePanelTitle?: string;
|
|
386
|
-
/** Custom className */
|
|
387
|
-
className?: string;
|
|
388
|
-
}
|
|
389
|
-
/**
|
|
390
|
-
* Single API section with two-column layout.
|
|
391
|
-
* Docs/params on left, sticky code panel on right.
|
|
392
|
-
*/
|
|
393
|
-
declare function APISection({ title, id, description, children, languages, examples, externalLink, codePanelTitle, className }: APISectionProps): React12.ReactNode;
|
|
394
|
-
import * as React13 from "react";
|
|
395
|
-
interface APIReferencePageProps {
|
|
396
|
-
/** Page title */
|
|
397
|
-
title: string;
|
|
398
|
-
/** Optional page description */
|
|
399
|
-
description?: React13.ReactNode;
|
|
400
|
-
/** API sections as children */
|
|
401
|
-
children: React13.ReactNode;
|
|
402
|
-
/** Custom className */
|
|
403
|
-
className?: string;
|
|
404
|
-
}
|
|
405
|
-
/**
|
|
406
|
-
* Full page wrapper for API reference documentation.
|
|
407
|
-
* Provides max-width container and consistent spacing.
|
|
408
|
-
*/
|
|
409
|
-
declare function APIReferencePage({ title, description, children, className }: APIReferencePageProps): React13.ReactNode;
|
|
408
|
+
}): React.JSX.Element;
|
|
409
|
+
import { AnnotationHandler as AnnotationHandler14 } from "codehike/code";
|
|
410
|
+
declare const wordWrap2: AnnotationHandler14;
|
|
410
411
|
export { wordWrap2 as wordWrap, tooltip, toCodeGroup, theme, mark, link, lineNumbers2 as lineNumbers, hover, flagsToOptions, expandable, endpointBadgeVariants, diff, collapse, callout, addDocsKit, WithNotes, WithHover, TooltipLink, TerminalSkeleton, Terminal, TabsTrigger, TabsList, TabsContent, Tabs, SingleCode, ResponseBlockProps, ResponseBlock, ParameterListProps, ParameterList, PackageInstall, MultiCode, LanguageSelectorProps, LanguageSelector, Language, InlineCodeSkeleton, HttpMethod, HoverLink, EndpointHeaderProps, EndpointHeader, EndpointBadgeProps, EndpointBadge, DocsKitInlineCode, DocsKitCode, DiffStats, CopyButton, CodeTabsSkeleton, CodeInfo, CodeIcon, CodeGroup, CodeExample, CodeBlockSkeleton, Code, ClientTerminal, ClientInlineCode, ClientDocsKitCode, ClientDiffCodeProps, ClientDiffCode, ClientCode, APISectionProps, APISection, APIReferencePageProps, APIReferencePage, APIParameterSchema, APIParameterItemProps, APIParameterItem, APICodePanelProps, APICodePanel };
|