@openpkg-ts/fumadocs-adapter 0.6.4 → 0.6.5
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/index.d.ts +64 -60
- package/dist/index.js +1570 -96
- package/package.json +2 -2
- package/src/styles/docskit.css +39 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,66 @@
|
|
|
1
|
+
import { DocsInstance as DocsInstance2, LoadOptions, OpenPkg as OpenPkg2, SpecExample, SpecExport as SpecExport2, SpecExportKind as SpecExportKind2, SpecMember, SpecSchema, SpecSignature, SpecSignatureParameter, SpecTag, SpecType, SpecTypeKind, SpecTypeParameter } from "@openpkg-ts/doc-generator";
|
|
2
|
+
import { AlgoliaRecord, buildSignatureString, createDocs, createDocs as createDocs2, DocsInstance as DocsInstance3, ExportMarkdownOptions, exportToMarkdown, formatParameters, formatReturnType, formatSchema, formatTypeParameters, getMethods, getProperties, groupByVisibility, HTMLOptions, isMethod, isProperty, JSONOptions, LoadOptions as LoadOptions2, loadSpec, MarkdownOptions, NavOptions, PagefindRecord, resolveTypeRef, SearchIndex, SearchOptions, SearchRecord, sortByName, toAlgoliaRecords, toDocusaurusSidebarJS, toFumadocsMetaJSON, toHTML, toJSON, toJSONString, toMarkdown, toNavigation, toPagefindRecords, toSearchIndex, toSearchIndexJSON } from "@openpkg-ts/doc-generator";
|
|
3
|
+
import { APIPage, APIPageProps, ClassPage, ClassPageProps, ClassSection, ClassSectionProps, CodeTab, CodeTabs, CodeTabsProps, EnumPage, EnumPageProps, EnumSection, EnumSectionProps, ExportCard, ExportCardProps, ExportIndexPage, ExportIndexPageProps, ExportSection, ExportSectionProps, FullAPIReferencePage, FullAPIReferencePageProps, FunctionPage, FunctionPageProps, FunctionSection, FunctionSectionProps, ImportSection, ImportSectionProps, InterfacePage, InterfacePageProps, InterfaceSection, InterfaceSectionProps, NestedPropertyItemProps, ParameterItem, ParameterItemProps, VariablePage, VariablePageProps, VariableSection, VariableSectionProps } from "@openpkg-ts/doc-generator/react/styled";
|
|
4
|
+
/**
|
|
5
|
+
* Documentation drift information.
|
|
6
|
+
* Describes a mismatch between docs and code.
|
|
7
|
+
*/
|
|
8
|
+
interface DocDrift {
|
|
9
|
+
type: string;
|
|
10
|
+
issue: string;
|
|
11
|
+
suggestion?: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Documentation metadata for an export.
|
|
15
|
+
* Contains coverage score, missing docs, and drift issues.
|
|
16
|
+
*/
|
|
17
|
+
interface DocsMetadata {
|
|
18
|
+
coverageScore?: number;
|
|
19
|
+
missing?: string[];
|
|
20
|
+
drift?: DocDrift[];
|
|
21
|
+
}
|
|
22
|
+
interface CoverageBadgeProps {
|
|
23
|
+
docs: DocsMetadata;
|
|
24
|
+
showMissing?: boolean;
|
|
25
|
+
showDrift?: boolean;
|
|
26
|
+
}
|
|
27
|
+
declare function CoverageBadge({ docs, showMissing, showDrift }: CoverageBadgeProps): React.ReactNode;
|
|
28
|
+
import { SpecExportKind } from "@openpkg-ts/doc-generator";
|
|
29
|
+
import { ReactNode as ReactNode2 } from "react";
|
|
30
|
+
interface SidebarKindBadgeProps {
|
|
31
|
+
kind: SpecExportKind;
|
|
32
|
+
className?: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Sidebar badge component for fumadocs page tree.
|
|
36
|
+
* Wraps @doccov/ui KindBadge with size="sm" for sidebar use.
|
|
37
|
+
*
|
|
38
|
+
* Uses createElement instead of JSX for compatibility with
|
|
39
|
+
* fumadocs transformPageTree server context.
|
|
40
|
+
*/
|
|
41
|
+
declare function SidebarKindBadge({ kind, className }: SidebarKindBadgeProps): ReactNode2;
|
|
42
|
+
import { LoaderPlugin } from "fumadocs-core/source";
|
|
43
|
+
interface OpenpkgPluginOptions {
|
|
44
|
+
/** Show kind badges in sidebar (default: true) */
|
|
45
|
+
showBadges?: boolean;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Fumadocs loader plugin that enhances page tree nodes with kind badges.
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```ts
|
|
52
|
+
* import { loader } from 'fumadocs-core/source';
|
|
53
|
+
* import { openpkgSource, openpkgPlugin } from '@openpkg-ts/fumadocs-adapter';
|
|
54
|
+
* import spec from './openpkg.json';
|
|
55
|
+
*
|
|
56
|
+
* const source = loader({
|
|
57
|
+
* baseUrl: '/docs/api',
|
|
58
|
+
* source: openpkgSource({ spec }),
|
|
59
|
+
* plugins: [openpkgPlugin()],
|
|
60
|
+
* });
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
63
|
+
declare function openpkgPlugin(options?: OpenpkgPluginOptions): LoaderPlugin;
|
|
1
64
|
import { Source } from "fumadocs-core/source";
|
|
2
65
|
import { DocsInstance, OpenPkg, SpecExport } from "@openpkg-ts/doc-generator";
|
|
3
66
|
interface OpenPkgSourceOptions {
|
|
@@ -75,63 +138,4 @@ declare function openpkgSource(options: OpenPkgSourceOptions): Source<{
|
|
|
75
138
|
pageData: OpenPkgPageData | OpenPkgIndexPageData | OpenPkgSinglePageData
|
|
76
139
|
metaData: OpenPkgMetaData
|
|
77
140
|
}>;
|
|
78
|
-
|
|
79
|
-
import { SpecExportKind } from "@openpkg-ts/doc-generator";
|
|
80
|
-
import { ReactNode as ReactNode2 } from "react";
|
|
81
|
-
interface KindBadgeProps {
|
|
82
|
-
kind: SpecExportKind;
|
|
83
|
-
className?: string;
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Badge component to display kind in sidebar.
|
|
87
|
-
*/
|
|
88
|
-
declare function KindBadge({ kind, className }: KindBadgeProps): ReactNode2;
|
|
89
|
-
interface OpenpkgPluginOptions {
|
|
90
|
-
/** Show kind badges in sidebar (default: true) */
|
|
91
|
-
showBadges?: boolean;
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Fumadocs loader plugin that enhances page tree nodes with kind badges.
|
|
95
|
-
*
|
|
96
|
-
* @example
|
|
97
|
-
* ```ts
|
|
98
|
-
* import { loader } from 'fumadocs-core/source';
|
|
99
|
-
* import { openpkgSource, openpkgPlugin } from '@openpkg-ts/fumadocs-adapter';
|
|
100
|
-
* import spec from './openpkg.json';
|
|
101
|
-
*
|
|
102
|
-
* const source = loader({
|
|
103
|
-
* baseUrl: '/docs/api',
|
|
104
|
-
* source: openpkgSource({ spec }),
|
|
105
|
-
* plugins: [openpkgPlugin()],
|
|
106
|
-
* });
|
|
107
|
-
* ```
|
|
108
|
-
*/
|
|
109
|
-
declare function openpkgPlugin(options?: OpenpkgPluginOptions): LoaderPlugin;
|
|
110
|
-
import { DocsInstance as DocsInstance2, LoadOptions, OpenPkg as OpenPkg2, SpecExample, SpecExport as SpecExport2, SpecExportKind as SpecExportKind2, SpecMember, SpecSchema, SpecSignature, SpecSignatureParameter, SpecTag, SpecType, SpecTypeKind, SpecTypeParameter } from "@openpkg-ts/doc-generator";
|
|
111
|
-
import { AlgoliaRecord, buildSignatureString, createDocs, createDocs as createDocs2, DocsInstance as DocsInstance3, ExportMarkdownOptions, exportToMarkdown, formatParameters, formatReturnType, formatSchema, formatTypeParameters, getMethods, getProperties, groupByVisibility, HTMLOptions, isMethod, isProperty, JSONOptions, LoadOptions as LoadOptions2, loadSpec, MarkdownOptions, NavOptions, PagefindRecord, resolveTypeRef, SearchIndex, SearchOptions, SearchRecord, sortByName, toAlgoliaRecords, toDocusaurusSidebarJS, toFumadocsMetaJSON, toHTML, toJSON, toJSONString, toMarkdown, toNavigation, toPagefindRecords, toSearchIndex, toSearchIndexJSON } from "@openpkg-ts/doc-generator";
|
|
112
|
-
import { APIPage, APIPageProps, ClassPage, ClassPageProps, ClassSection, ClassSectionProps, CodeTabs, CodeTab, CodeTabsProps, EnumPage, EnumPageProps, EnumSection, EnumSectionProps, ExportCard, ExportCardProps, ExportIndexPage, ExportIndexPageProps, ExportSection, ExportSectionProps, FullAPIReferencePage, FullAPIReferencePageProps, FunctionPage, FunctionPageProps, FunctionSection, FunctionSectionProps, ImportSection, ImportSectionProps, InterfacePage, InterfacePageProps, InterfaceSection, InterfaceSectionProps, NestedPropertyItemProps, ParameterItem, ParameterItemProps, VariablePage, VariablePageProps, VariableSection, VariableSectionProps } from "@openpkg-ts/doc-generator/react/styled";
|
|
113
|
-
/**
|
|
114
|
-
* Documentation drift information.
|
|
115
|
-
* Describes a mismatch between docs and code.
|
|
116
|
-
*/
|
|
117
|
-
interface DocDrift {
|
|
118
|
-
type: string;
|
|
119
|
-
issue: string;
|
|
120
|
-
suggestion?: string;
|
|
121
|
-
}
|
|
122
|
-
/**
|
|
123
|
-
* Documentation metadata for an export.
|
|
124
|
-
* Contains coverage score, missing docs, and drift issues.
|
|
125
|
-
*/
|
|
126
|
-
interface DocsMetadata {
|
|
127
|
-
coverageScore?: number;
|
|
128
|
-
missing?: string[];
|
|
129
|
-
drift?: DocDrift[];
|
|
130
|
-
}
|
|
131
|
-
interface CoverageBadgeProps {
|
|
132
|
-
docs: DocsMetadata;
|
|
133
|
-
showMissing?: boolean;
|
|
134
|
-
showDrift?: boolean;
|
|
135
|
-
}
|
|
136
|
-
declare function CoverageBadge({ docs, showMissing, showDrift }: CoverageBadgeProps): React.ReactNode;
|
|
137
|
-
export { toSearchIndexJSON, toSearchIndex, toPagefindRecords, toNavigation, toMarkdown, toJSONString, toJSON, toHTML, toFumadocsMetaJSON, toDocusaurusSidebarJS, toAlgoliaRecords, sortByName, resolveTypeRef, openpkgSource, openpkgPlugin, loadSpec, isProperty, isMethod, groupByVisibility, getProperties, getMethods, formatTypeParameters, formatSchema, formatReturnType, formatParameters, exportToMarkdown, createDocs2 as createOpenPkg, createDocs, buildSignatureString, VariableSectionProps, VariableSection, VariablePageProps, VariablePage, SpecTypeParameter, SpecTypeKind, SpecType, SpecTag, SpecSignatureParameter, SpecSignature, SpecSchema, SpecMember, SpecExportKind2 as SpecExportKind, SpecExport2 as SpecExport, SpecExample, SearchRecord, SearchOptions, SearchIndex, ParameterItemProps, ParameterItem, PagefindRecord, OpenpkgPluginOptions, OpenPkgSourceOptions, OpenPkgSinglePageData, OpenPkgPageData, LoadOptions as OpenPkgOptions, OpenPkgMetaData, DocsInstance2 as OpenPkgInstance, OpenPkgIndexPageData, OpenPkg2 as OpenPkg, NestedPropertyItemProps, NavOptions, MarkdownOptions, LoadOptions2 as LoadOptions, KindBadgeProps, KindBadge, JSONOptions, InterfaceSectionProps, InterfaceSection, InterfacePageProps, InterfacePage, ImportSectionProps, ImportSection, HTMLOptions, FunctionSectionProps, FunctionSection, FunctionPageProps, FunctionPage, FullAPIReferencePageProps, FullAPIReferencePage, ExportSectionProps, ExportSection, ExportMarkdownOptions, ExportIndexPageProps, ExportIndexPage, ExportCardProps, ExportCard, EnumSectionProps, EnumSection, EnumPageProps, EnumPage, DocsMetadata, DocsInstance3 as DocsInstance, DocDrift, CoverageBadgeProps, CoverageBadge, CodeTabsProps, CodeTabs, CodeTab, ClassSectionProps, ClassSection, ClassPageProps, ClassPage, AlgoliaRecord, APIPageProps, APIPage };
|
|
141
|
+
export { toSearchIndexJSON, toSearchIndex, toPagefindRecords, toNavigation, toMarkdown, toJSONString, toJSON, toHTML, toFumadocsMetaJSON, toDocusaurusSidebarJS, toAlgoliaRecords, sortByName, resolveTypeRef, openpkgSource, openpkgPlugin, loadSpec, isProperty, isMethod, groupByVisibility, getProperties, getMethods, formatTypeParameters, formatSchema, formatReturnType, formatParameters, exportToMarkdown, createDocs2 as createOpenPkg, createDocs, buildSignatureString, VariableSectionProps, VariableSection, VariablePageProps, VariablePage, SpecTypeParameter, SpecTypeKind, SpecType, SpecTag, SpecSignatureParameter, SpecSignature, SpecSchema, SpecMember, SpecExportKind2 as SpecExportKind, SpecExport2 as SpecExport, SpecExample, SidebarKindBadgeProps, SidebarKindBadge, SearchRecord, SearchOptions, SearchIndex, ParameterItemProps, ParameterItem, PagefindRecord, OpenpkgPluginOptions, OpenPkgSourceOptions, OpenPkgSinglePageData, OpenPkgPageData, LoadOptions as OpenPkgOptions, OpenPkgMetaData, DocsInstance2 as OpenPkgInstance, OpenPkgIndexPageData, OpenPkg2 as OpenPkg, NestedPropertyItemProps, NavOptions, MarkdownOptions, LoadOptions2 as LoadOptions, SidebarKindBadgeProps as KindBadgeProps, SidebarKindBadge as KindBadge, JSONOptions, InterfaceSectionProps, InterfaceSection, InterfacePageProps, InterfacePage, ImportSectionProps, ImportSection, HTMLOptions, FunctionSectionProps, FunctionSection, FunctionPageProps, FunctionPage, FullAPIReferencePageProps, FullAPIReferencePage, ExportSectionProps, ExportSection, ExportMarkdownOptions, ExportIndexPageProps, ExportIndexPage, ExportCardProps, ExportCard, EnumSectionProps, EnumSection, EnumPageProps, EnumPage, DocsMetadata, DocsInstance3 as DocsInstance, DocDrift, CoverageBadgeProps, CoverageBadge, CodeTabsProps, CodeTabs, CodeTab, ClassSectionProps, ClassSection, ClassPageProps, ClassPage, AlgoliaRecord, APIPageProps, APIPage };
|