@openpkg-ts/ui 0.3.2 → 0.4.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 +2 -10
- package/dist/docskit/index.d.ts +31 -62
- package/dist/docskit/index.js +232 -286
- package/package.json +1 -1
- package/src/styles/docskit.css +11 -11
package/dist/badge/index.d.ts
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
type KindBadgeKind = "function" | "class" | "interface" | "type" | "enum" | "variable" | "namespace" | "module" | "reference" | "external";
|
|
3
3
|
type KindBadgeSize = "sm" | "md";
|
|
4
|
-
declare const kindBadgeVariants:
|
|
5
|
-
kind?: KindBadgeKind | null;
|
|
6
|
-
size?: KindBadgeSize | null;
|
|
7
|
-
className?: string;
|
|
8
|
-
}) => string;
|
|
4
|
+
declare const kindBadgeVariants: unknown;
|
|
9
5
|
interface KindBadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
10
6
|
kind?: KindBadgeKind | null;
|
|
11
7
|
size?: KindBadgeSize | null;
|
|
@@ -14,11 +10,7 @@ interface KindBadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
|
14
10
|
declare const KindBadge: React.ForwardRefExoticComponent<KindBadgeProps & React.RefAttributes<HTMLSpanElement>>;
|
|
15
11
|
type StatusBadgeStatus = "success" | "warning" | "error" | "neutral";
|
|
16
12
|
type StatusBadgeSize = "sm" | "md";
|
|
17
|
-
declare const statusBadgeVariants:
|
|
18
|
-
status?: StatusBadgeStatus | null;
|
|
19
|
-
size?: StatusBadgeSize | null;
|
|
20
|
-
className?: string;
|
|
21
|
-
}) => string;
|
|
13
|
+
declare const statusBadgeVariants: unknown;
|
|
22
14
|
interface StatusBadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
23
15
|
status?: StatusBadgeStatus | null;
|
|
24
16
|
size?: StatusBadgeSize | null;
|
package/dist/docskit/index.d.ts
CHANGED
|
@@ -91,11 +91,7 @@ declare function APISection({ title, id, description, children, languages, examp
|
|
|
91
91
|
import * as React6 from "react";
|
|
92
92
|
type HttpMethod = "GET" | "POST" | "PUT" | "DELETE" | "PATCH";
|
|
93
93
|
type EndpointBadgeSize = "sm" | "md";
|
|
94
|
-
declare const endpointBadgeVariants:
|
|
95
|
-
method?: HttpMethod | null;
|
|
96
|
-
size?: EndpointBadgeSize | null;
|
|
97
|
-
className?: string;
|
|
98
|
-
}) => string;
|
|
94
|
+
declare const endpointBadgeVariants: unknown;
|
|
99
95
|
interface EndpointBadgeProps extends React6.HTMLAttributes<HTMLSpanElement> {
|
|
100
96
|
method: HttpMethod;
|
|
101
97
|
size?: EndpointBadgeSize | null;
|
|
@@ -208,11 +204,11 @@ declare function DocsKitCode(props: {
|
|
|
208
204
|
codeblock: RawCode;
|
|
209
205
|
handlers?: AnnotationHandler2[];
|
|
210
206
|
className?: string;
|
|
211
|
-
}): Promise<React.
|
|
207
|
+
}): Promise<React.ReactNode>;
|
|
212
208
|
declare function SingleCode(props: {
|
|
213
209
|
group: CodeInfo;
|
|
214
210
|
className?: string;
|
|
215
|
-
}): Promise<React.
|
|
211
|
+
}): Promise<React.ReactNode>;
|
|
216
212
|
declare function toCodeGroup(props: {
|
|
217
213
|
codeblocks: RawCode[];
|
|
218
214
|
flags?: string;
|
|
@@ -222,7 +218,7 @@ declare function toCodeGroup(props: {
|
|
|
222
218
|
declare function MultiCode({ group, className }: {
|
|
223
219
|
group: CodeInfo;
|
|
224
220
|
className?: string;
|
|
225
|
-
}): React.
|
|
221
|
+
}): React.ReactNode;
|
|
226
222
|
import { AnnotationHandler as AnnotationHandler3, RawCode as RawCode2 } from "codehike/code";
|
|
227
223
|
/**
|
|
228
224
|
* Client-side code block with syntax highlighting.
|
|
@@ -232,20 +228,20 @@ declare function ClientDocsKitCode(props: {
|
|
|
232
228
|
codeblock: RawCode2;
|
|
233
229
|
handlers?: AnnotationHandler3[];
|
|
234
230
|
className?: string;
|
|
235
|
-
}): React.
|
|
231
|
+
}): React.ReactNode;
|
|
236
232
|
/**
|
|
237
233
|
* Client-side terminal-style code block.
|
|
238
234
|
*/
|
|
239
235
|
declare function ClientTerminal(props: {
|
|
240
236
|
codeblock: RawCode2;
|
|
241
237
|
handlers?: AnnotationHandler3[];
|
|
242
|
-
}): React.
|
|
238
|
+
}): React.ReactNode;
|
|
243
239
|
/**
|
|
244
240
|
* Client-side inline code with syntax highlighting.
|
|
245
241
|
*/
|
|
246
242
|
declare function ClientInlineCode({ codeblock }: {
|
|
247
243
|
codeblock: RawCode2;
|
|
248
|
-
}): React.
|
|
244
|
+
}): React.ReactNode;
|
|
249
245
|
/**
|
|
250
246
|
* Client-side code tabs with multiple files.
|
|
251
247
|
*/
|
|
@@ -253,12 +249,12 @@ declare function ClientCode(props: {
|
|
|
253
249
|
codeblocks: RawCode2[];
|
|
254
250
|
flags?: string;
|
|
255
251
|
storage?: string;
|
|
256
|
-
}): React.
|
|
252
|
+
}): React.ReactNode;
|
|
257
253
|
declare function CopyButton({ text, className, variant }: {
|
|
258
254
|
text: string;
|
|
259
255
|
className?: string;
|
|
260
256
|
variant?: "floating" | "inline";
|
|
261
|
-
}): React.
|
|
257
|
+
}): React.ReactNode;
|
|
262
258
|
import { AnnotationHandler as AnnotationHandler4, RawCode as RawCode3 } from "codehike/code";
|
|
263
259
|
interface DiffStats {
|
|
264
260
|
additions?: number;
|
|
@@ -283,16 +279,16 @@ interface ClientDiffCodeProps {
|
|
|
283
279
|
* DocKit code block variant with file change row header.
|
|
284
280
|
* Displays path/filename with diff stats, collapsible with syntax-highlighted code.
|
|
285
281
|
*/
|
|
286
|
-
declare function ClientDiffCode(props: ClientDiffCodeProps): React.
|
|
282
|
+
declare function ClientDiffCode(props: ClientDiffCodeProps): React.ReactNode;
|
|
287
283
|
declare function CodeIcon({ title, lang, className }: {
|
|
288
284
|
title: string;
|
|
289
285
|
lang: string;
|
|
290
286
|
className?: string;
|
|
291
|
-
}): React.
|
|
287
|
+
}): React.ReactNode;
|
|
292
288
|
import { RawCode as RawCode4 } from "codehike/code";
|
|
293
289
|
declare function DocsKitInlineCode({ codeblock }: {
|
|
294
290
|
codeblock: RawCode4;
|
|
295
|
-
}): Promise<React.
|
|
291
|
+
}): Promise<React.ReactNode>;
|
|
296
292
|
type PackageManager = "npm" | "bun" | "pnpm" | "yarn";
|
|
297
293
|
interface PackageInstallProps {
|
|
298
294
|
/** The package name to install */
|
|
@@ -316,38 +312,38 @@ interface PackageInstallProps {
|
|
|
316
312
|
* <PackageInstall package="opencode-ai" global />
|
|
317
313
|
* ```
|
|
318
314
|
*/
|
|
319
|
-
declare function PackageInstall({ package: pkg, dev, global: isGlobal, managers, copyButton }: PackageInstallProps): React.
|
|
315
|
+
declare function PackageInstall({ package: pkg, dev, global: isGlobal, managers, copyButton }: PackageInstallProps): React.ReactNode;
|
|
320
316
|
/**
|
|
321
317
|
* Loading skeleton for code blocks.
|
|
322
318
|
*/
|
|
323
319
|
declare function CodeBlockSkeleton({ hasTitle, lines }: {
|
|
324
320
|
hasTitle?: boolean;
|
|
325
321
|
lines?: number;
|
|
326
|
-
}): React.
|
|
322
|
+
}): React.ReactNode;
|
|
327
323
|
/**
|
|
328
324
|
* Loading skeleton for terminal-style code blocks.
|
|
329
325
|
*/
|
|
330
326
|
declare function TerminalSkeleton({ lines }: {
|
|
331
327
|
lines?: number;
|
|
332
|
-
}): React.
|
|
328
|
+
}): React.ReactNode;
|
|
333
329
|
/**
|
|
334
330
|
* Loading skeleton for inline code.
|
|
335
331
|
*/
|
|
336
|
-
declare function InlineCodeSkeleton(): React.
|
|
332
|
+
declare function InlineCodeSkeleton(): React.ReactNode;
|
|
337
333
|
/**
|
|
338
334
|
* Loading skeleton for code tabs.
|
|
339
335
|
*/
|
|
340
336
|
declare function CodeTabsSkeleton({ tabs, lines }: {
|
|
341
337
|
tabs?: number;
|
|
342
338
|
lines?: number;
|
|
343
|
-
}): React.
|
|
339
|
+
}): React.ReactNode;
|
|
344
340
|
import { RawCode as RawCode5 } from "codehike/code";
|
|
345
|
-
declare function CodeGroup(props: unknown): Promise<React.
|
|
341
|
+
declare function CodeGroup(props: unknown): Promise<React.ReactNode>;
|
|
346
342
|
declare function Code(props: {
|
|
347
343
|
codeblocks: RawCode5[];
|
|
348
344
|
flags?: string;
|
|
349
345
|
storage?: string;
|
|
350
|
-
}): Promise<React.
|
|
346
|
+
}): Promise<React.ReactNode>;
|
|
351
347
|
import { AnnotationHandler as AnnotationHandler5, RawCode as RawCode6 } from "codehike/code";
|
|
352
348
|
/**
|
|
353
349
|
* Terminal-style code block with macOS window controls.
|
|
@@ -366,9 +362,9 @@ import { AnnotationHandler as AnnotationHandler5, RawCode as RawCode6 } from "co
|
|
|
366
362
|
declare function Terminal(props: {
|
|
367
363
|
codeblock: RawCode6;
|
|
368
364
|
handlers?: AnnotationHandler5[];
|
|
369
|
-
}): Promise<React.
|
|
365
|
+
}): Promise<React.ReactNode>;
|
|
370
366
|
import { AnnotationHandler as AnnotationHandler6 } from "codehike/code";
|
|
371
|
-
declare const collapse: AnnotationHandler6[];
|
|
367
|
+
declare const collapse: readonly AnnotationHandler6[];
|
|
372
368
|
import { AnnotationHandler as AnnotationHandler7 } from "codehike/code";
|
|
373
369
|
declare const diff: AnnotationHandler7;
|
|
374
370
|
import React11 from "react";
|
|
@@ -379,11 +375,11 @@ import { AnnotationHandler as AnnotationHandler9 } from "codehike/code";
|
|
|
379
375
|
import React12 from "react";
|
|
380
376
|
declare function WithHover(props: {
|
|
381
377
|
children: React12.ReactNode;
|
|
382
|
-
}): React12.
|
|
378
|
+
}): React12.ReactNode;
|
|
383
379
|
declare function HoverLink(props: {
|
|
384
380
|
href?: string;
|
|
385
381
|
children?: React12.ReactNode;
|
|
386
|
-
}): React12.
|
|
382
|
+
}): React12.ReactNode;
|
|
387
383
|
declare const hover: AnnotationHandler9;
|
|
388
384
|
import { AnnotationHandler as AnnotationHandler10 } from "codehike/code";
|
|
389
385
|
declare const lineNumbers2: AnnotationHandler10;
|
|
@@ -393,45 +389,21 @@ import { AnnotationHandler as AnnotationHandler12 } from "codehike/code";
|
|
|
393
389
|
declare const mark: AnnotationHandler12;
|
|
394
390
|
declare function WithNotes({ children,...rest }: {
|
|
395
391
|
children: React.ReactNode;
|
|
396
|
-
}): React.
|
|
392
|
+
}): React.ReactNode;
|
|
397
393
|
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
398
394
|
import * as React13 from "react";
|
|
399
|
-
declare function Tabs({ className,...props }: React13.ComponentProps<typeof TabsPrimitive.Root>): React13.
|
|
400
|
-
declare function TabsList({ className,...props }: React13.ComponentProps<typeof TabsPrimitive.List>): React13.
|
|
401
|
-
declare function TabsTrigger({ className,...props }: React13.ComponentProps<typeof TabsPrimitive.Trigger>): React13.
|
|
402
|
-
declare function TabsContent({ className,...props }: React13.ComponentProps<typeof TabsPrimitive.Content>): React13.
|
|
395
|
+
declare function Tabs({ className,...props }: React13.ComponentProps<typeof TabsPrimitive.Root>): React13.ReactNode;
|
|
396
|
+
declare function TabsList({ className,...props }: React13.ComponentProps<typeof TabsPrimitive.List>): React13.ReactNode;
|
|
397
|
+
declare function TabsTrigger({ className,...props }: React13.ComponentProps<typeof TabsPrimitive.Trigger>): React13.ReactNode;
|
|
398
|
+
declare function TabsContent({ className,...props }: React13.ComponentProps<typeof TabsPrimitive.Content>): React13.ReactNode;
|
|
403
399
|
import { AnnotationHandler as AnnotationHandler13 } from "codehike/code";
|
|
404
400
|
declare const tooltip: AnnotationHandler13;
|
|
405
401
|
declare function TooltipLink(props: {
|
|
406
402
|
href?: string;
|
|
407
403
|
children?: React.ReactNode;
|
|
408
|
-
}): React.
|
|
404
|
+
}): React.ReactNode;
|
|
409
405
|
import { AnnotationHandler as AnnotationHandler14 } from "codehike/code";
|
|
410
406
|
declare const wordWrap2: AnnotationHandler14;
|
|
411
|
-
import { ReactNode as ReactNode2 } from "react";
|
|
412
|
-
interface CodeTab {
|
|
413
|
-
/** Tab label */
|
|
414
|
-
label: string;
|
|
415
|
-
/** Tab content (code block) */
|
|
416
|
-
content: ReactNode2;
|
|
417
|
-
/** Raw code for copy button */
|
|
418
|
-
code: string;
|
|
419
|
-
}
|
|
420
|
-
interface CodeTabsProps {
|
|
421
|
-
/** Array of tabs */
|
|
422
|
-
tabs: CodeTab[];
|
|
423
|
-
/** Default selected tab index */
|
|
424
|
-
defaultIndex?: number;
|
|
425
|
-
/** Enable sticky positioning for the header */
|
|
426
|
-
sticky?: boolean;
|
|
427
|
-
/** Custom className */
|
|
428
|
-
className?: string;
|
|
429
|
-
}
|
|
430
|
-
/**
|
|
431
|
-
* Tabbed code block wrapper with copy button per tab.
|
|
432
|
-
* Uses docskit --dk-* CSS variables for consistent theming.
|
|
433
|
-
*/
|
|
434
|
-
declare function CodeTabs({ tabs, defaultIndex, sticky, className }: CodeTabsProps): React.ReactNode2;
|
|
435
407
|
interface ImportSectionProps {
|
|
436
408
|
/** Import statement text */
|
|
437
409
|
importStatement: string;
|
|
@@ -449,10 +421,7 @@ type TypeColor = "string" | "number" | "boolean" | "null" | "undefined" | "objec
|
|
|
449
421
|
* Type coloring for syntax display.
|
|
450
422
|
* Follows Stripe-style: consistent colors for primitives vs complex types.
|
|
451
423
|
*/
|
|
452
|
-
declare const typeBadgeVariants:
|
|
453
|
-
typeColor?: TypeColor | null;
|
|
454
|
-
className?: string;
|
|
455
|
-
}) => string;
|
|
424
|
+
declare const typeBadgeVariants: unknown;
|
|
456
425
|
interface TypeBadgeProps extends React14.HTMLAttributes<HTMLSpanElement> {
|
|
457
426
|
/** Type string to display */
|
|
458
427
|
type: string;
|
|
@@ -464,4 +433,4 @@ interface TypeBadgeProps extends React14.HTMLAttributes<HTMLSpanElement> {
|
|
|
464
433
|
* Automatically detects type category and applies appropriate color.
|
|
465
434
|
*/
|
|
466
435
|
declare const TypeBadge: React14.ForwardRefExoticComponent<TypeBadgeProps & React14.RefAttributes<HTMLSpanElement>>;
|
|
467
|
-
export { wordWrap2 as wordWrap, typeBadgeVariants, tooltip, toCodeGroup, theme, mark, link, lineNumbers2 as lineNumbers, hover, flagsToOptions, expandable, endpointBadgeVariants, diff, collapse, callout, addDocsKit, WithNotes, WithHover, TypeColor, TypeBadgeProps, TypeBadge, TooltipLink, TerminalSkeleton, Terminal, TabsTrigger, TabsList, TabsContent, Tabs, SingleCode, ResponseBlockProps, ResponseBlock, ParameterListProps, ParameterList, PackageInstall, MultiCode, LanguageSelectorProps, LanguageSelector, Language, InlineCodeSkeleton, ImportSectionProps, ImportSection, HttpMethod, HoverLink, EndpointHeaderProps, EndpointHeader, EndpointBadgeProps, EndpointBadge, DocsKitInlineCode, DocsKitCode, DiffStats, CopyButton, CodeTabsSkeleton,
|
|
436
|
+
export { wordWrap2 as wordWrap, typeBadgeVariants, tooltip, toCodeGroup, theme, mark, link, lineNumbers2 as lineNumbers, hover, flagsToOptions, expandable, endpointBadgeVariants, diff, collapse, callout, addDocsKit, WithNotes, WithHover, TypeColor, TypeBadgeProps, TypeBadge, TooltipLink, TerminalSkeleton, Terminal, TabsTrigger, TabsList, TabsContent, Tabs, SingleCode, ResponseBlockProps, ResponseBlock, ParameterListProps, ParameterList, PackageInstall, MultiCode, LanguageSelectorProps, LanguageSelector, Language, InlineCodeSkeleton, ImportSectionProps, ImportSection, 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 };
|