@doccov/ui 0.2.2 → 0.3.0
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/badge/index.d.ts +14 -0
- package/dist/badge/index.js +86 -0
- package/dist/breadcrumb/index.d.ts +24 -0
- package/dist/breadcrumb/index.js +77 -0
- package/dist/button/index.d.ts +18 -0
- package/dist/button/index.js +109 -0
- package/dist/coverage-trends/index.d.ts +46 -0
- package/dist/coverage-trends/index.js +182 -0
- package/dist/docskit/index.d.ts +172 -1
- package/dist/docskit/index.js +755 -1
- package/dist/file-change-row/index.d.ts +34 -0
- package/dist/file-change-row/index.js +4415 -0
- package/dist/file-chip/index.d.ts +7 -0
- package/dist/file-chip/index.js +30 -0
- package/dist/input/index.d.ts +23 -0
- package/dist/input/index.js +242 -0
- package/dist/tabs/index.d.ts +56 -0
- package/dist/tabs/index.js +224 -0
- package/package.json +33 -1
package/dist/docskit/index.d.ts
CHANGED
|
@@ -231,4 +231,175 @@ declare function TooltipLink(props: {
|
|
|
231
231
|
});
|
|
232
232
|
import { AnnotationHandler as AnnotationHandler13 } from "codehike/code";
|
|
233
233
|
declare const wordWrap2: AnnotationHandler13;
|
|
234
|
-
|
|
234
|
+
import { VariantProps } from "class-variance-authority";
|
|
235
|
+
import * as React5 from "react";
|
|
236
|
+
type HttpMethod = "GET" | "POST" | "PUT" | "DELETE" | "PATCH";
|
|
237
|
+
declare const endpointBadgeVariants: unknown;
|
|
238
|
+
interface EndpointBadgeProps extends React5.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof endpointBadgeVariants> {
|
|
239
|
+
method: HttpMethod;
|
|
240
|
+
}
|
|
241
|
+
declare const EndpointBadge: unknown;
|
|
242
|
+
import * as React6 from "react";
|
|
243
|
+
interface EndpointHeaderProps extends React6.HTMLAttributes<HTMLDivElement> {
|
|
244
|
+
/** HTTP method */
|
|
245
|
+
method: HttpMethod;
|
|
246
|
+
/** API path (e.g., "/v1/customers") */
|
|
247
|
+
path: string;
|
|
248
|
+
/** Show copy button on hover */
|
|
249
|
+
copyable?: boolean;
|
|
250
|
+
}
|
|
251
|
+
declare const EndpointHeader: unknown;
|
|
252
|
+
import * as React7 from "react";
|
|
253
|
+
interface APIParameterSchema {
|
|
254
|
+
/** Type name */
|
|
255
|
+
type?: string;
|
|
256
|
+
/** Formatted type string */
|
|
257
|
+
typeString?: string;
|
|
258
|
+
/** Description */
|
|
259
|
+
description?: string;
|
|
260
|
+
/** Nested properties for object types */
|
|
261
|
+
properties?: Record<string, APIParameterSchema>;
|
|
262
|
+
/** Required property names */
|
|
263
|
+
required?: string[];
|
|
264
|
+
}
|
|
265
|
+
interface APIParameterItemProps {
|
|
266
|
+
/** Parameter name */
|
|
267
|
+
name: string;
|
|
268
|
+
/** Type string (e.g., "string", "object") */
|
|
269
|
+
type: string;
|
|
270
|
+
/** Is required */
|
|
271
|
+
required?: boolean;
|
|
272
|
+
/** Description */
|
|
273
|
+
description?: string;
|
|
274
|
+
/** Nested children (for expandable objects) */
|
|
275
|
+
children?: APIParameterSchema;
|
|
276
|
+
/** Nesting depth */
|
|
277
|
+
depth?: number;
|
|
278
|
+
/** Custom className */
|
|
279
|
+
className?: string;
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* Single parameter row with name, type, required badge, description, and expandable children.
|
|
283
|
+
* Stripe-style API reference parameter display.
|
|
284
|
+
*/
|
|
285
|
+
declare function APIParameterItem({ name, type, required, description, children, depth, className }: APIParameterItemProps): React7.ReactNode;
|
|
286
|
+
import * as React8 from "react";
|
|
287
|
+
interface ParameterListProps {
|
|
288
|
+
/** Title above the list (e.g., "Body parameters") */
|
|
289
|
+
title?: string;
|
|
290
|
+
/** Number of items to show before collapsing */
|
|
291
|
+
collapseAfter?: number;
|
|
292
|
+
/** Child parameter items */
|
|
293
|
+
children: React8.ReactNode;
|
|
294
|
+
/** Custom className */
|
|
295
|
+
className?: string;
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* Container for parameter items with optional "More parameters" collapse.
|
|
299
|
+
*/
|
|
300
|
+
declare function ParameterList({ title, collapseAfter, children, className }: ParameterListProps): React8.ReactNode;
|
|
301
|
+
import * as React9 from "react";
|
|
302
|
+
interface ResponseBlockProps {
|
|
303
|
+
/** Response JSON data */
|
|
304
|
+
data: object;
|
|
305
|
+
/** Optional title (e.g., "Response", "200 OK") */
|
|
306
|
+
title?: string;
|
|
307
|
+
/** Custom className */
|
|
308
|
+
className?: string;
|
|
309
|
+
}
|
|
310
|
+
/**
|
|
311
|
+
* JSON response preview with syntax highlighting.
|
|
312
|
+
* Displays formatted JSON with copy functionality.
|
|
313
|
+
*/
|
|
314
|
+
declare function ResponseBlock({ data, title, className }: ResponseBlockProps): React9.ReactNode;
|
|
315
|
+
import * as React10 from "react";
|
|
316
|
+
interface Language {
|
|
317
|
+
/** Language identifier (e.g., "curl", "node", "python") */
|
|
318
|
+
id: string;
|
|
319
|
+
/** Display label (e.g., "cURL", "Node.js", "Python") */
|
|
320
|
+
label: string;
|
|
321
|
+
}
|
|
322
|
+
interface LanguageSelectorProps {
|
|
323
|
+
/** Available languages */
|
|
324
|
+
languages: Language[];
|
|
325
|
+
/** Currently selected language id */
|
|
326
|
+
value: string;
|
|
327
|
+
/** Callback when language changes */
|
|
328
|
+
onChange: (languageId: string) => void;
|
|
329
|
+
/** Custom className */
|
|
330
|
+
className?: string;
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* Dropdown selector for choosing code example language.
|
|
334
|
+
* Used in APICodePanel to switch between language examples.
|
|
335
|
+
*/
|
|
336
|
+
declare function LanguageSelector({ languages, value, onChange, className }: LanguageSelectorProps): React10.ReactNode;
|
|
337
|
+
import * as React11 from "react";
|
|
338
|
+
interface CodeExample {
|
|
339
|
+
/** Language identifier */
|
|
340
|
+
languageId: string;
|
|
341
|
+
/** Code content */
|
|
342
|
+
code: string;
|
|
343
|
+
/** Optional syntax highlighting language (defaults to languageId) */
|
|
344
|
+
highlightLang?: string;
|
|
345
|
+
}
|
|
346
|
+
interface APICodePanelProps {
|
|
347
|
+
/** Available languages for the selector */
|
|
348
|
+
languages: Language[];
|
|
349
|
+
/** Code examples keyed by language id */
|
|
350
|
+
examples: CodeExample[];
|
|
351
|
+
/** Optional external link (e.g., to API playground) */
|
|
352
|
+
externalLink?: string;
|
|
353
|
+
/** Optional title shown in header */
|
|
354
|
+
title?: string;
|
|
355
|
+
/** Custom className */
|
|
356
|
+
className?: string;
|
|
357
|
+
}
|
|
358
|
+
/**
|
|
359
|
+
* Right-side sticky code panel for API documentation.
|
|
360
|
+
* Features language dropdown, copy button, and dark bg with syntax highlighting.
|
|
361
|
+
*/
|
|
362
|
+
declare function APICodePanel({ languages, examples, externalLink, title, className }: APICodePanelProps): React11.ReactNode;
|
|
363
|
+
import * as React12 from "react";
|
|
364
|
+
interface APISectionProps {
|
|
365
|
+
/** Section title (e.g., "Create a customer", "The Customer object") */
|
|
366
|
+
title: string;
|
|
367
|
+
/** Optional anchor id for deep linking */
|
|
368
|
+
id?: string;
|
|
369
|
+
/** Optional description */
|
|
370
|
+
description?: React12.ReactNode;
|
|
371
|
+
/** Left column content (parameters, returns, etc.) */
|
|
372
|
+
children: React12.ReactNode;
|
|
373
|
+
/** Languages for code panel */
|
|
374
|
+
languages: Language[];
|
|
375
|
+
/** Code examples for the right panel */
|
|
376
|
+
examples: CodeExample[];
|
|
377
|
+
/** Optional external link for code panel */
|
|
378
|
+
externalLink?: string;
|
|
379
|
+
/** Optional code panel title */
|
|
380
|
+
codePanelTitle?: string;
|
|
381
|
+
/** Custom className */
|
|
382
|
+
className?: string;
|
|
383
|
+
}
|
|
384
|
+
/**
|
|
385
|
+
* Single API section with two-column layout.
|
|
386
|
+
* Docs/params on left, sticky code panel on right.
|
|
387
|
+
*/
|
|
388
|
+
declare function APISection({ title, id, description, children, languages, examples, externalLink, codePanelTitle, className }: APISectionProps): React12.ReactNode;
|
|
389
|
+
import * as React13 from "react";
|
|
390
|
+
interface APIReferencePageProps {
|
|
391
|
+
/** Page title */
|
|
392
|
+
title: string;
|
|
393
|
+
/** Optional page description */
|
|
394
|
+
description?: React13.ReactNode;
|
|
395
|
+
/** API sections as children */
|
|
396
|
+
children: React13.ReactNode;
|
|
397
|
+
/** Custom className */
|
|
398
|
+
className?: string;
|
|
399
|
+
}
|
|
400
|
+
/**
|
|
401
|
+
* Full page wrapper for API reference documentation.
|
|
402
|
+
* Provides max-width container and consistent spacing.
|
|
403
|
+
*/
|
|
404
|
+
declare function APIReferencePage({ title, description, children, className }: APIReferencePageProps): React13.ReactNode;
|
|
405
|
+
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 };
|