@openpkg-ts/doc-generator 0.3.4 → 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/README.md +1 -1
- package/dist/cli.js +1 -1
- package/dist/index.d.ts +36 -44
- package/dist/index.js +1 -3
- package/dist/react-styled.d.ts +14 -20
- package/dist/react-styled.js +834 -1124
- package/dist/react.js +1 -6
- package/dist/shared/{server-83s9r625.js → server-4yabn81t.js} +1 -21
- package/package.json +2 -2
package/README.md
CHANGED
package/dist/cli.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OpenPkg as
|
|
1
|
+
import { OpenPkg as OpenPkg10, SpecExample as SpecExample2, SpecExport as SpecExport6, SpecExportKind as SpecExportKind5, SpecMember as SpecMember2, SpecSchema as SpecSchema3, SpecSignature as SpecSignature2, SpecSignatureParameter as SpecSignatureParameter2, SpecTag, SpecType as SpecType3, SpecTypeKind, SpecTypeParameter as SpecTypeParameter2 } from "@openpkg-ts/spec";
|
|
2
2
|
import { OpenPkg, SpecExport } from "@openpkg-ts/spec";
|
|
3
3
|
import { ComponentType, ReactNode } from "react";
|
|
4
4
|
/**
|
|
@@ -144,8 +144,8 @@ declare function createAdapterRegistry(): AdapterRegistry;
|
|
|
144
144
|
* Default adapter registry instance.
|
|
145
145
|
*/
|
|
146
146
|
declare const adapterRegistry: AdapterRegistry;
|
|
147
|
-
import { OpenPkg as
|
|
148
|
-
import { OpenPkg as
|
|
147
|
+
import { OpenPkg as OpenPkg8, SpecExport as SpecExport4, SpecExportKind as SpecExportKind4, SpecType } from "@openpkg-ts/spec";
|
|
148
|
+
import { OpenPkg as OpenPkg3 } from "@openpkg-ts/spec";
|
|
149
149
|
interface HTMLOptions {
|
|
150
150
|
/** Page title override */
|
|
151
151
|
title?: string;
|
|
@@ -181,8 +181,8 @@ interface HTMLOptions {
|
|
|
181
181
|
* const fragment = docs.toHTML({ export: 'greet', fullDocument: false })
|
|
182
182
|
* ```
|
|
183
183
|
*/
|
|
184
|
-
declare function toHTML2(spec:
|
|
185
|
-
import { OpenPkg as
|
|
184
|
+
declare function toHTML2(spec: OpenPkg3, options?: HTMLOptions): string;
|
|
185
|
+
import { OpenPkg as OpenPkg4, SpecExportKind } from "@openpkg-ts/spec";
|
|
186
186
|
interface JSONOptions {
|
|
187
187
|
/** Include raw spec data alongside simplified data */
|
|
188
188
|
includeRaw?: boolean;
|
|
@@ -274,7 +274,7 @@ interface SimplifiedSpec {
|
|
|
274
274
|
* // { id, name, kind, signature, parameters, returns, ... }
|
|
275
275
|
* ```
|
|
276
276
|
*/
|
|
277
|
-
declare function toJSON2(spec:
|
|
277
|
+
declare function toJSON2(spec: OpenPkg4, options?: JSONOptions): SimplifiedSpec | SimplifiedExport;
|
|
278
278
|
/**
|
|
279
279
|
* Serialize to JSON string with formatting.
|
|
280
280
|
*
|
|
@@ -282,10 +282,10 @@ declare function toJSON2(spec: OpenPkg3, options?: JSONOptions): SimplifiedSpec
|
|
|
282
282
|
* @param options - JSON options plus pretty formatting option
|
|
283
283
|
* @returns JSON string
|
|
284
284
|
*/
|
|
285
|
-
declare function toJSONString(spec:
|
|
285
|
+
declare function toJSONString(spec: OpenPkg4, options?: JSONOptions & {
|
|
286
286
|
pretty?: boolean;
|
|
287
287
|
}): string;
|
|
288
|
-
import { OpenPkg as
|
|
288
|
+
import { OpenPkg as OpenPkg5, SpecExport as SpecExport3 } from "@openpkg-ts/spec";
|
|
289
289
|
interface MarkdownOptions {
|
|
290
290
|
/** Include frontmatter in output */
|
|
291
291
|
frontmatter?: boolean;
|
|
@@ -327,7 +327,7 @@ interface ExportMarkdownOptions extends MarkdownOptions {
|
|
|
327
327
|
* })
|
|
328
328
|
* ```
|
|
329
329
|
*/
|
|
330
|
-
declare function exportToMarkdown(exp:
|
|
330
|
+
declare function exportToMarkdown(exp: SpecExport3, options?: MarkdownOptions): string;
|
|
331
331
|
/**
|
|
332
332
|
* Render entire spec to MDX.
|
|
333
333
|
*
|
|
@@ -347,8 +347,8 @@ declare function exportToMarkdown(exp: SpecExport2, options?: MarkdownOptions):
|
|
|
347
347
|
* // Single * const fnMdx = docs.toMarkdown({ export: 'greet' })
|
|
348
348
|
* ```
|
|
349
349
|
*/
|
|
350
|
-
declare function toMarkdown2(spec:
|
|
351
|
-
import { OpenPkg as
|
|
350
|
+
declare function toMarkdown2(spec: OpenPkg5, options?: ExportMarkdownOptions): string;
|
|
351
|
+
import { OpenPkg as OpenPkg6, SpecExportKind as SpecExportKind2 } from "@openpkg-ts/spec";
|
|
352
352
|
type NavFormat = "fumadocs" | "docusaurus" | "generic";
|
|
353
353
|
type GroupBy = "kind" | "module" | "tag" | "none";
|
|
354
354
|
interface NavOptions {
|
|
@@ -423,7 +423,7 @@ type DocusaurusSidebar = DocusaurusSidebarItem[];
|
|
|
423
423
|
* const sidebar = docs.toNavigation({ format: 'docusaurus' })
|
|
424
424
|
* ```
|
|
425
425
|
*/
|
|
426
|
-
declare function toNavigation2(spec:
|
|
426
|
+
declare function toNavigation2(spec: OpenPkg6, options?: NavOptions): GenericNav | FumadocsMeta | DocusaurusSidebar;
|
|
427
427
|
/**
|
|
428
428
|
* Generate Fumadocs meta.json file content.
|
|
429
429
|
*
|
|
@@ -437,7 +437,7 @@ declare function toNavigation2(spec: OpenPkg5, options?: NavOptions): GenericNav
|
|
|
437
437
|
* fs.writeFileSync('docs/api/meta.json', meta)
|
|
438
438
|
* ```
|
|
439
439
|
*/
|
|
440
|
-
declare function toFumadocsMetaJSON(spec:
|
|
440
|
+
declare function toFumadocsMetaJSON(spec: OpenPkg6, options?: Omit<NavOptions, "format">): string;
|
|
441
441
|
/**
|
|
442
442
|
* Generate Docusaurus sidebar config.
|
|
443
443
|
*
|
|
@@ -451,8 +451,8 @@ declare function toFumadocsMetaJSON(spec: OpenPkg5, options?: Omit<NavOptions, "
|
|
|
451
451
|
* fs.writeFileSync('sidebars.js', sidebar)
|
|
452
452
|
* ```
|
|
453
453
|
*/
|
|
454
|
-
declare function toDocusaurusSidebarJS(spec:
|
|
455
|
-
import { OpenPkg as
|
|
454
|
+
declare function toDocusaurusSidebarJS(spec: OpenPkg6, options?: Omit<NavOptions, "format">): string;
|
|
455
|
+
import { OpenPkg as OpenPkg7, SpecExportKind as SpecExportKind3 } from "@openpkg-ts/spec";
|
|
456
456
|
interface SearchOptions {
|
|
457
457
|
/** Base URL for search result links */
|
|
458
458
|
baseUrl?: string;
|
|
@@ -545,7 +545,7 @@ interface SearchIndex {
|
|
|
545
545
|
* // { records: [...], version: '1.0.0', packageName: 'my-lib' }
|
|
546
546
|
* ```
|
|
547
547
|
*/
|
|
548
|
-
declare function toSearchIndex2(spec:
|
|
548
|
+
declare function toSearchIndex2(spec: OpenPkg7, options?: SearchOptions): SearchIndex;
|
|
549
549
|
/**
|
|
550
550
|
* Generate Pagefind-compatible records.
|
|
551
551
|
*
|
|
@@ -561,7 +561,7 @@ declare function toSearchIndex2(spec: OpenPkg6, options?: SearchOptions): Search
|
|
|
561
561
|
* })
|
|
562
562
|
* ```
|
|
563
563
|
*/
|
|
564
|
-
declare function toPagefindRecords2(spec:
|
|
564
|
+
declare function toPagefindRecords2(spec: OpenPkg7, options?: SearchOptions): PagefindRecord[];
|
|
565
565
|
/**
|
|
566
566
|
* Generate Algolia-compatible records.
|
|
567
567
|
*
|
|
@@ -575,7 +575,7 @@ declare function toPagefindRecords2(spec: OpenPkg6, options?: SearchOptions): Pa
|
|
|
575
575
|
* // Upload to Algolia index
|
|
576
576
|
* ```
|
|
577
577
|
*/
|
|
578
|
-
declare function toAlgoliaRecords2(spec:
|
|
578
|
+
declare function toAlgoliaRecords2(spec: OpenPkg7, options?: SearchOptions): AlgoliaRecord[];
|
|
579
579
|
/**
|
|
580
580
|
* Serialize search index to JSON string.
|
|
581
581
|
*
|
|
@@ -589,36 +589,36 @@ declare function toAlgoliaRecords2(spec: OpenPkg6, options?: SearchOptions): Alg
|
|
|
589
589
|
* fs.writeFileSync('search-index.json', json)
|
|
590
590
|
* ```
|
|
591
591
|
*/
|
|
592
|
-
declare function toSearchIndexJSON(spec:
|
|
592
|
+
declare function toSearchIndexJSON(spec: OpenPkg7, options?: SearchOptions & {
|
|
593
593
|
pretty?: boolean;
|
|
594
594
|
}): string;
|
|
595
595
|
interface LoadOptions {
|
|
596
596
|
/** Path to openpkg.json file or the spec object directly */
|
|
597
|
-
input: string |
|
|
597
|
+
input: string | OpenPkg8;
|
|
598
598
|
}
|
|
599
599
|
interface DocsInstance {
|
|
600
600
|
/** The parsed OpenPkg spec */
|
|
601
|
-
spec:
|
|
601
|
+
spec: OpenPkg8;
|
|
602
602
|
/** Get an by its ID */
|
|
603
|
-
getExport(id: string):
|
|
603
|
+
getExport(id: string): SpecExport4 | undefined;
|
|
604
604
|
/** Get a type definition by its ID */
|
|
605
605
|
getType(id: string): SpecType | undefined;
|
|
606
606
|
/** Get all exports of a specific kind */
|
|
607
|
-
getExportsByKind(kind: SpecExportKind4):
|
|
607
|
+
getExportsByKind(kind: SpecExportKind4): SpecExport4[];
|
|
608
608
|
/** Get all exports */
|
|
609
|
-
getAllExports():
|
|
609
|
+
getAllExports(): SpecExport4[];
|
|
610
610
|
/** Get all type definitions */
|
|
611
611
|
getAllTypes(): SpecType[];
|
|
612
612
|
/** Get exports by JSDoc tag (e.g., '@beta', '@internal') */
|
|
613
|
-
getExportsByTag(tagName: string):
|
|
613
|
+
getExportsByTag(tagName: string): SpecExport4[];
|
|
614
614
|
/** Search exports by name or description */
|
|
615
|
-
search(query: string):
|
|
615
|
+
search(query: string): SpecExport4[];
|
|
616
616
|
/** Get exports belonging to a specific module/namespace */
|
|
617
|
-
getModule(moduleName: string):
|
|
617
|
+
getModule(moduleName: string): SpecExport4[];
|
|
618
618
|
/** Get deprecated exports */
|
|
619
|
-
getDeprecated():
|
|
619
|
+
getDeprecated(): SpecExport4[];
|
|
620
620
|
/** Get exports grouped by kind */
|
|
621
|
-
groupByKind(): Record<SpecExportKind4,
|
|
621
|
+
groupByKind(): Record<SpecExportKind4, SpecExport4[]>;
|
|
622
622
|
/** Render spec or single to MDX */
|
|
623
623
|
toMarkdown(options?: ExportMarkdownOptions): string;
|
|
624
624
|
/** Render spec or single to HTML */
|
|
@@ -646,7 +646,7 @@ interface DocsInstance {
|
|
|
646
646
|
* const docs = loadSpec(spec)
|
|
647
647
|
* ```
|
|
648
648
|
*/
|
|
649
|
-
declare function loadSpec(spec:
|
|
649
|
+
declare function loadSpec(spec: OpenPkg8): DocsInstance;
|
|
650
650
|
/**
|
|
651
651
|
* Creates a docs instance for querying and rendering API documentation.
|
|
652
652
|
*
|
|
@@ -668,8 +668,8 @@ declare function loadSpec(spec: OpenPkg7): DocsInstance;
|
|
|
668
668
|
* docs.search('hook')
|
|
669
669
|
* ```
|
|
670
670
|
*/
|
|
671
|
-
declare function createDocs(input: string |
|
|
672
|
-
import { OpenPkg as
|
|
671
|
+
declare function createDocs(input: string | OpenPkg8): DocsInstance;
|
|
672
|
+
import { OpenPkg as OpenPkg9, SpecExport as SpecExport5, SpecMember, SpecSchema as SpecSchema2, SpecSignature, SpecType as SpecType2, SpecTypeParameter } from "@openpkg-ts/spec";
|
|
673
673
|
/**
|
|
674
674
|
* Format a schema to a human-readable type string.
|
|
675
675
|
*
|
|
@@ -683,7 +683,7 @@ import { OpenPkg as OpenPkg8, SpecExport as SpecExport4, SpecMember, SpecSchema,
|
|
|
683
683
|
* formatSchema({ anyOf: [{ type: 'string' }, { type: 'number' }] }) // 'string | number'
|
|
684
684
|
* ```
|
|
685
685
|
*/
|
|
686
|
-
declare function formatSchema(schema:
|
|
686
|
+
declare function formatSchema(schema: SpecSchema2 | undefined): string;
|
|
687
687
|
/**
|
|
688
688
|
* Format type parameters to a string like `<T, U extends string>`.
|
|
689
689
|
*
|
|
@@ -740,7 +740,7 @@ declare function formatReturnType(sig?: SpecSignature): string;
|
|
|
740
740
|
* // 'class Logger extends EventEmitter'
|
|
741
741
|
* ```
|
|
742
742
|
*/
|
|
743
|
-
declare function buildSignatureString(exp:
|
|
743
|
+
declare function buildSignatureString(exp: SpecExport5, sigIndex?: number): string;
|
|
744
744
|
/**
|
|
745
745
|
* Resolve a type reference to its definition.
|
|
746
746
|
*
|
|
@@ -754,7 +754,7 @@ declare function buildSignatureString(exp: SpecExport4, sigIndex?: number): stri
|
|
|
754
754
|
* // { id: 'User', name: 'User', kind: 'interface', ... }
|
|
755
755
|
* ```
|
|
756
756
|
*/
|
|
757
|
-
declare function resolveTypeRef(ref: string, spec:
|
|
757
|
+
declare function resolveTypeRef(ref: string, spec: OpenPkg9): SpecType2 | undefined;
|
|
758
758
|
/**
|
|
759
759
|
* Check if a member is a method (has signatures).
|
|
760
760
|
*
|
|
@@ -816,12 +816,4 @@ declare function groupByVisibility(members?: SpecMember[]): {
|
|
|
816
816
|
declare function sortByName<T extends {
|
|
817
817
|
name: string;
|
|
818
818
|
}>(items: T[]): T[];
|
|
819
|
-
|
|
820
|
-
* Sort exports by kind, then name.
|
|
821
|
-
* Kind order: function, class, interface, type, enum, variable, namespace, module, reference, external.
|
|
822
|
-
*
|
|
823
|
-
* @param exports - Array of exports to sort
|
|
824
|
-
* @returns New sorted array
|
|
825
|
-
*/
|
|
826
|
-
declare function sortByKindThenName(exports: SpecExport4[]): SpecExport4[];
|
|
827
|
-
export { toSearchIndexJSON, toSearchIndex2 as toSearchIndex, toPagefindRecords2 as toPagefindRecords, toNavigation2 as toNavigation, toMarkdown2 as toMarkdown, toJSONString, toJSON2 as toJSON, toHTML2 as toHTML, toFumadocsMetaJSON, toDocusaurusSidebarJS, toAlgoliaRecords2 as toAlgoliaRecords, sortByName, sortByKindThenName, resolveTypeRef, loadSpec, isProperty, isMethod, groupByVisibility, getProperties, getMethods, formatTypeParameters, formatSchema, formatReturnType, formatParameters, exportToMarkdown, createDocs, createAdapterRegistry, buildSignatureString, adapterRegistry, SpecTypeParameter2 as SpecTypeParameter, SpecTypeKind, SpecType3 as SpecType, SpecTag, SpecSignatureParameter, SpecSignature2 as SpecSignature, SpecSchema2 as SpecSchema, SpecMember2 as SpecMember, SpecExportKind5 as SpecExportKind, SpecExport5 as SpecExport, SpecExample, SimplifiedSpec, SimplifiedSignature, SimplifiedReturn, SimplifiedParameter, SimplifiedMember, SimplifiedExport, SimplifiedExample, SearchRecord, SearchOptions, SearchIndex, SearchGeneratorOptions, PagefindRecord, PageGeneratorOptions, OpenPkg9 as OpenPkg, NavOptions, NavItem, NavGroup, NavGeneratorOptions, NavFormat, MarkdownOptions, LoadOptions, JSONOptions, HTMLOptions, GroupBy, GenericNav, GeneratedFile, FumadocsMetaItem, FumadocsMeta, FileGenerator, ExportPageProps, ExportMarkdownOptions, DocusaurusSidebarItem, DocusaurusSidebar, DocsInstance, DocFrameworkAdapter, ConfigValidationResult, ConfigOptions, ConfigHelper, AlgoliaRecord, AdapterRegistry, AdapterComponents, APIPageComponentProps };
|
|
819
|
+
export { toSearchIndexJSON, toSearchIndex2 as toSearchIndex, toPagefindRecords2 as toPagefindRecords, toNavigation2 as toNavigation, toMarkdown2 as toMarkdown, toJSONString, toJSON2 as toJSON, toHTML2 as toHTML, toFumadocsMetaJSON, toDocusaurusSidebarJS, toAlgoliaRecords2 as toAlgoliaRecords, sortByName, resolveTypeRef, loadSpec, isProperty, isMethod, groupByVisibility, getProperties, getMethods, formatTypeParameters, formatSchema, formatReturnType, formatParameters, exportToMarkdown, createDocs, createAdapterRegistry, buildSignatureString, adapterRegistry, SpecTypeParameter2 as SpecTypeParameter, SpecTypeKind, SpecType3 as SpecType, SpecTag, SpecSignatureParameter2 as SpecSignatureParameter, SpecSignature2 as SpecSignature, SpecSchema3 as SpecSchema, SpecMember2 as SpecMember, SpecExportKind5 as SpecExportKind, SpecExport6 as SpecExport, SpecExample2 as SpecExample, SimplifiedSpec, SimplifiedSignature, SimplifiedReturn, SimplifiedParameter, SimplifiedMember, SimplifiedExport, SimplifiedExample, SearchRecord, SearchOptions, SearchIndex, SearchGeneratorOptions, PagefindRecord, PageGeneratorOptions, OpenPkg10 as OpenPkg, NavOptions, NavItem, NavGroup, NavGeneratorOptions, NavFormat, MarkdownOptions, LoadOptions, JSONOptions, HTMLOptions, GroupBy, GenericNav, GeneratedFile, FumadocsMetaItem, FumadocsMeta, FileGenerator, ExportPageProps, ExportMarkdownOptions, DocusaurusSidebarItem, DocusaurusSidebar, DocsInstance, DocFrameworkAdapter, ConfigValidationResult, ConfigOptions, ConfigHelper, AlgoliaRecord, AdapterRegistry, AdapterComponents, APIPageComponentProps };
|
package/dist/index.js
CHANGED
|
@@ -13,7 +13,6 @@ import {
|
|
|
13
13
|
isProperty,
|
|
14
14
|
loadSpec,
|
|
15
15
|
resolveTypeRef,
|
|
16
|
-
sortByKindThenName,
|
|
17
16
|
sortByName,
|
|
18
17
|
toAlgoliaRecords,
|
|
19
18
|
toDocusaurusSidebarJS,
|
|
@@ -26,7 +25,7 @@ import {
|
|
|
26
25
|
toPagefindRecords,
|
|
27
26
|
toSearchIndex,
|
|
28
27
|
toSearchIndexJSON
|
|
29
|
-
} from "./shared/server-
|
|
28
|
+
} from "./shared/server-4yabn81t.js";
|
|
30
29
|
|
|
31
30
|
// src/adapters/types.ts
|
|
32
31
|
function createAdapterRegistry() {
|
|
@@ -57,7 +56,6 @@ export {
|
|
|
57
56
|
toDocusaurusSidebarJS,
|
|
58
57
|
toAlgoliaRecords,
|
|
59
58
|
sortByName,
|
|
60
|
-
sortByKindThenName,
|
|
61
59
|
resolveTypeRef,
|
|
62
60
|
loadSpec,
|
|
63
61
|
isProperty,
|
package/dist/react-styled.d.ts
CHANGED
|
@@ -533,28 +533,26 @@ interface APIPageProps {
|
|
|
533
533
|
*/
|
|
534
534
|
declare function APIPage({ spec, instance, id, baseHref, description, renderExample }: APIPageProps): React.ReactNode;
|
|
535
535
|
import { OpenPkg as OpenPkg8, SpecExport as SpecExport4 } from "@openpkg-ts/spec";
|
|
536
|
+
import { ReactNode as ReactNode2 } from "react";
|
|
536
537
|
interface ClassPageProps {
|
|
537
538
|
export: SpecExport4;
|
|
538
539
|
spec: OpenPkg8;
|
|
539
|
-
/** Custom code example renderer */
|
|
540
|
-
renderExample?: (code: string, filename: string) => React.ReactNode;
|
|
541
540
|
}
|
|
542
541
|
/**
|
|
543
542
|
* Stripe-style class page with two-column layout.
|
|
544
543
|
* Left: constructor, methods, properties. Right: sticky code examples.
|
|
545
544
|
*/
|
|
546
|
-
declare function ClassPage({ export: exp, spec
|
|
545
|
+
declare function ClassPage({ export: exp, spec }: ClassPageProps): ReactNode2;
|
|
547
546
|
import { OpenPkg as OpenPkg9, SpecExport as SpecExport5 } from "@openpkg-ts/spec";
|
|
547
|
+
import { ReactNode as ReactNode3 } from "react";
|
|
548
548
|
interface EnumPageProps {
|
|
549
549
|
export: SpecExport5;
|
|
550
550
|
spec: OpenPkg9;
|
|
551
|
-
/** Custom code example renderer */
|
|
552
|
-
renderExample?: (code: string, filename: string) => React.ReactNode;
|
|
553
551
|
}
|
|
554
552
|
/**
|
|
555
|
-
*
|
|
553
|
+
* Stripe-style enum page with two-column layout.
|
|
556
554
|
*/
|
|
557
|
-
declare function EnumPage({ export: exp, spec
|
|
555
|
+
declare function EnumPage({ export: exp, spec }: EnumPageProps): ReactNode3;
|
|
558
556
|
interface ExportCardProps {
|
|
559
557
|
/** Function/name */
|
|
560
558
|
name: string;
|
|
@@ -573,7 +571,7 @@ interface ExportCardProps {
|
|
|
573
571
|
*/
|
|
574
572
|
declare function ExportCard({ name, description, href, kind, className }: ExportCardProps): React.ReactNode;
|
|
575
573
|
import { OpenPkg as OpenPkg10 } from "@openpkg-ts/spec";
|
|
576
|
-
import { ReactNode as
|
|
574
|
+
import { ReactNode as ReactNode4 } from "react";
|
|
577
575
|
interface ExportIndexPageProps {
|
|
578
576
|
/** OpenPkg spec */
|
|
579
577
|
spec: OpenPkg10;
|
|
@@ -592,32 +590,29 @@ interface ExportIndexPageProps {
|
|
|
592
590
|
* Index page showing all exports in a grid, grouped by category.
|
|
593
591
|
* AI SDK-style clean layout with responsive 2-column grid.
|
|
594
592
|
*/
|
|
595
|
-
declare function ExportIndexPage({ spec, baseHref, description, className, showSearch, showFilters }: ExportIndexPageProps):
|
|
593
|
+
declare function ExportIndexPage({ spec, baseHref, description, className, showSearch, showFilters }: ExportIndexPageProps): ReactNode4;
|
|
596
594
|
import { OpenPkg as OpenPkg11, SpecExport as SpecExport6 } from "@openpkg-ts/spec";
|
|
597
|
-
import { ReactNode as
|
|
595
|
+
import { ReactNode as ReactNode5 } from "react";
|
|
598
596
|
interface FunctionPageProps {
|
|
599
597
|
export: SpecExport6;
|
|
600
598
|
spec: OpenPkg11;
|
|
601
|
-
/** Custom code example renderer */
|
|
602
|
-
renderExample?: (code: string, filename: string) => ReactNode3;
|
|
603
599
|
}
|
|
604
600
|
/**
|
|
605
601
|
* Stripe-style function page with two-column layout.
|
|
606
602
|
* Left: parameters, returns. Right: sticky code examples.
|
|
607
603
|
*/
|
|
608
|
-
declare function FunctionPage({ export: exp, spec
|
|
604
|
+
declare function FunctionPage({ export: exp, spec }: FunctionPageProps): ReactNode5;
|
|
609
605
|
import { OpenPkg as OpenPkg12, SpecExport as SpecExport7 } from "@openpkg-ts/spec";
|
|
606
|
+
import { ReactNode as ReactNode6 } from "react";
|
|
610
607
|
interface InterfacePageProps {
|
|
611
608
|
export: SpecExport7;
|
|
612
609
|
spec: OpenPkg12;
|
|
613
|
-
/** Custom code example renderer */
|
|
614
|
-
renderExample?: (code: string, filename: string) => React.ReactNode;
|
|
615
610
|
}
|
|
616
611
|
/**
|
|
617
612
|
* Stripe-style interface/type page with two-column layout.
|
|
618
613
|
* Left: properties, methods. Right: sticky code examples.
|
|
619
614
|
*/
|
|
620
|
-
declare function InterfacePage({ export: exp, spec
|
|
615
|
+
declare function InterfacePage({ export: exp, spec }: InterfacePageProps): ReactNode6;
|
|
621
616
|
import { SpecSchema as SpecSchema2, SpecSignatureParameter as SpecSignatureParameter4 } from "@openpkg-ts/spec";
|
|
622
617
|
interface ParameterItemProps {
|
|
623
618
|
/** Parameter to display */
|
|
@@ -643,14 +638,13 @@ interface NestedPropertyItemProps {
|
|
|
643
638
|
*/
|
|
644
639
|
declare function ParameterItem({ param, depth, className }: ParameterItemProps): React.ReactNode;
|
|
645
640
|
import { OpenPkg as OpenPkg13, SpecExport as SpecExport8 } from "@openpkg-ts/spec";
|
|
641
|
+
import { ReactNode as ReactNode7 } from "react";
|
|
646
642
|
interface VariablePageProps {
|
|
647
643
|
export: SpecExport8;
|
|
648
644
|
spec: OpenPkg13;
|
|
649
|
-
/** Custom code example renderer */
|
|
650
|
-
renderExample?: (code: string, filename: string) => React.ReactNode;
|
|
651
645
|
}
|
|
652
646
|
/**
|
|
653
|
-
*
|
|
647
|
+
* Stripe-style variable/constant page with two-column layout.
|
|
654
648
|
*/
|
|
655
|
-
declare function VariablePage({ export: exp, spec
|
|
649
|
+
declare function VariablePage({ export: exp, spec }: VariablePageProps): ReactNode7;
|
|
656
650
|
export { groupMembersByKind, getExampleTitle, getExampleLanguage, getExampleCode, cleanCode, VariablePageProps, VariablePage, TypeTableProps, TypeTable, SignatureProps, Signature, ParameterItemProps, ParameterItem, ParamTableProps, ParamTable, ParamRowProps, ParamRow, NestedPropertyProps, NestedPropertyItemProps, NestedProperty, MembersTableProps, MembersTable, MemberRowProps, MemberRow, MemberGroups, InterfacePageProps, InterfacePage, ImportSectionProps, ImportSection, FunctionPageProps, FunctionPage, ExportIndexPageProps, ExportIndexPage, ExportCardProps, ExportCard, ExpandablePropertyProps, ExpandableProperty, ExampleBlockProps, ExampleBlock, EnumPageProps, EnumPage, CollapsibleMethodProps, CollapsibleMethod, CodeTabsProps, CodeTabs, CodeTab, ClassPageProps, ClassPage, APIPageProps, APIPage };
|