@doccov/fumadocs-adapter 0.0.1 → 0.0.3
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/CHANGELOG.md +13 -0
- package/bunup.config.ts +0 -1
- package/dist/components/index.d.ts +76 -76
- package/dist/components/index.js +11 -6
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/shared/{chunk-pqaj3kdh.js → chunk-edfpjshy.js} +633 -632
- package/package.json +1 -2
- package/src/components/api-page.tsx +4 -10
- package/src/components/class-page.tsx +4 -10
- package/src/components/code-example.tsx +6 -2
- package/src/components/collapsible-method.tsx +12 -24
- package/src/components/coverage-badge.tsx +19 -7
- package/src/components/enum-page.tsx +13 -7
- package/src/components/examples.tsx +17 -6
- package/src/components/expandable-property.tsx +14 -17
- package/src/components/function-page.tsx +9 -12
- package/src/components/index.ts +29 -44
- package/src/components/interface-page.tsx +19 -8
- package/src/components/members-section.tsx +12 -10
- package/src/components/method-section.tsx +4 -1
- package/src/components/parameter-card.tsx +3 -8
- package/src/components/signature.tsx +1 -3
- package/src/components/type-table.tsx +7 -12
- package/src/components/variable-page.tsx +3 -9
- package/src/index.ts +3 -4
- package/src/server.ts +0 -1
- package/src/styles/docskit.css +8 -7
- package/tsconfig.json +0 -1
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# @doccov/fumadocs-adapter
|
|
2
|
+
|
|
3
|
+
## 0.0.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Remove deprecated `tsType` field in favor of `schema`, add CLI warning when `--runtime` requested without built code
|
|
8
|
+
|
|
9
|
+
## 0.0.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- update components and configuration
|
package/bunup.config.ts
CHANGED
|
@@ -42,83 +42,49 @@ interface APIPageProps {
|
|
|
42
42
|
* <APIPage instance={openpkg} id="createClient" />
|
|
43
43
|
* ```
|
|
44
44
|
*/
|
|
45
|
-
declare function APIPage({ spec, instance, id }: APIPageProps);
|
|
45
|
+
declare function APIPage({ spec, instance, id }: APIPageProps): React.ReactNode;
|
|
46
46
|
import { OpenPkg as OpenPkg3, SpecExport as SpecExport2 } from "@openpkg-ts/spec";
|
|
47
|
-
interface
|
|
47
|
+
interface ClassPageProps {
|
|
48
48
|
export: SpecExport2;
|
|
49
49
|
spec: OpenPkg3;
|
|
50
50
|
}
|
|
51
|
-
declare function
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
declare function ClassPage({ export: exp, spec }: ClassPageProps);
|
|
58
|
-
import { OpenPkg as OpenPkg5, SpecExport as SpecExport4 } from "@openpkg-ts/spec";
|
|
59
|
-
interface InterfacePageProps {
|
|
60
|
-
export: SpecExport4;
|
|
61
|
-
spec: OpenPkg5;
|
|
62
|
-
}
|
|
63
|
-
declare function InterfacePage({ export: exp, spec }: InterfacePageProps);
|
|
64
|
-
import { OpenPkg as OpenPkg6, SpecExport as SpecExport5 } from "@openpkg-ts/spec";
|
|
65
|
-
interface EnumPageProps {
|
|
66
|
-
export: SpecExport5;
|
|
67
|
-
spec: OpenPkg6;
|
|
68
|
-
}
|
|
69
|
-
declare function EnumPage({ export: exp, spec }: EnumPageProps);
|
|
70
|
-
import { OpenPkg as OpenPkg7, SpecExport as SpecExport6 } from "@openpkg-ts/spec";
|
|
71
|
-
interface VariablePageProps {
|
|
72
|
-
export: SpecExport6;
|
|
73
|
-
spec: OpenPkg7;
|
|
74
|
-
}
|
|
75
|
-
declare function VariablePage({ export: exp, spec }: VariablePageProps);
|
|
76
|
-
import { OpenPkg as OpenPkg8, SpecSignatureParameter, SpecMember } from "@openpkg-ts/spec";
|
|
77
|
-
interface TypeTableProps {
|
|
78
|
-
items: (SpecSignatureParameter | SpecMember)[];
|
|
79
|
-
spec?: OpenPkg8;
|
|
80
|
-
showRequired?: boolean;
|
|
81
|
-
}
|
|
82
|
-
declare function TypeTable({ items, showRequired }: TypeTableProps);
|
|
83
|
-
import { SpecExport as SpecExport7 } from "@openpkg-ts/spec";
|
|
84
|
-
interface SignatureProps {
|
|
85
|
-
export: SpecExport7;
|
|
86
|
-
signatureIndex?: number;
|
|
51
|
+
declare function ClassPage({ export: exp, spec: _spec }: ClassPageProps): React.ReactNode;
|
|
52
|
+
interface CodeExampleProps {
|
|
53
|
+
code: string;
|
|
54
|
+
filename?: string;
|
|
55
|
+
language?: string;
|
|
87
56
|
}
|
|
88
|
-
declare function
|
|
89
|
-
|
|
90
|
-
|
|
57
|
+
declare function CodeExample({ code, filename, language }: CodeExampleProps): React.ReactNode;
|
|
58
|
+
import { SpecMember } from "@openpkg-ts/spec";
|
|
59
|
+
interface CollapsibleMethodProps {
|
|
60
|
+
member: SpecMember;
|
|
61
|
+
defaultExpanded?: boolean;
|
|
91
62
|
}
|
|
92
|
-
|
|
63
|
+
/**
|
|
64
|
+
* Collapsible method section with expand/collapse behavior
|
|
65
|
+
* Shows compact signature when collapsed, full details when expanded
|
|
66
|
+
*/
|
|
67
|
+
declare function CollapsibleMethod({ member, defaultExpanded }: CollapsibleMethodProps): React.ReactNode;
|
|
93
68
|
import { SpecDocsMetadata } from "@openpkg-ts/spec";
|
|
94
69
|
interface CoverageBadgeProps {
|
|
95
70
|
docs: SpecDocsMetadata;
|
|
96
71
|
showMissing?: boolean;
|
|
97
72
|
showDrift?: boolean;
|
|
98
73
|
}
|
|
99
|
-
declare function CoverageBadge({ docs, showMissing, showDrift }: CoverageBadgeProps);
|
|
100
|
-
import {
|
|
101
|
-
interface
|
|
102
|
-
|
|
103
|
-
spec
|
|
104
|
-
title?: string;
|
|
105
|
-
}
|
|
106
|
-
declare function MembersSection({ members, spec, title }: MembersSectionProps);
|
|
107
|
-
import { OpenPkg as OpenPkg10, SpecSignatureParameter as SpecSignatureParameter2 } from "@openpkg-ts/spec";
|
|
108
|
-
interface ParameterCardProps {
|
|
109
|
-
param: SpecSignatureParameter2;
|
|
110
|
-
spec?: OpenPkg10;
|
|
74
|
+
declare function CoverageBadge({ docs, showMissing, showDrift }: CoverageBadgeProps): React.ReactNode;
|
|
75
|
+
import { OpenPkg as OpenPkg4, SpecExport as SpecExport3 } from "@openpkg-ts/spec";
|
|
76
|
+
interface EnumPageProps {
|
|
77
|
+
export: SpecExport3;
|
|
78
|
+
spec: OpenPkg4;
|
|
111
79
|
}
|
|
112
|
-
declare function
|
|
113
|
-
interface
|
|
114
|
-
|
|
115
|
-
filename?: string;
|
|
116
|
-
language?: string;
|
|
80
|
+
declare function EnumPage({ export: exp, spec: _spec }: EnumPageProps): React.ReactNode;
|
|
81
|
+
interface ExamplesSectionProps {
|
|
82
|
+
examples: string[];
|
|
117
83
|
}
|
|
118
|
-
declare function
|
|
119
|
-
import {
|
|
84
|
+
declare function ExamplesSection({ examples }: ExamplesSectionProps): React.ReactNode;
|
|
85
|
+
import { SpecSchema, SpecSignatureParameter } from "@openpkg-ts/spec";
|
|
120
86
|
interface ExpandablePropertyProps {
|
|
121
|
-
param:
|
|
87
|
+
param: SpecSignatureParameter;
|
|
122
88
|
depth?: number;
|
|
123
89
|
}
|
|
124
90
|
interface NestedPropertyProps {
|
|
@@ -130,25 +96,34 @@ interface NestedPropertyProps {
|
|
|
130
96
|
/**
|
|
131
97
|
* Nested property row with expandable nested objects
|
|
132
98
|
*/
|
|
133
|
-
declare function NestedProperty({ name, schema, required, depth }: NestedPropertyProps);
|
|
99
|
+
declare function NestedProperty({ name, schema, required, depth }: NestedPropertyProps): React.ReactNode;
|
|
134
100
|
/**
|
|
135
101
|
* Top-level expandable property for method parameters
|
|
136
102
|
* Entry point for rendering a parameter with progressive disclosure
|
|
137
103
|
*/
|
|
138
|
-
declare function ExpandableProperty({ param, depth }: ExpandablePropertyProps);
|
|
139
|
-
import {
|
|
140
|
-
interface
|
|
141
|
-
|
|
142
|
-
|
|
104
|
+
declare function ExpandableProperty({ param, depth }: ExpandablePropertyProps): React.ReactNode;
|
|
105
|
+
import { OpenPkg as OpenPkg5, SpecExport as SpecExport4 } from "@openpkg-ts/spec";
|
|
106
|
+
interface FunctionPageProps {
|
|
107
|
+
export: SpecExport4;
|
|
108
|
+
spec: OpenPkg5;
|
|
143
109
|
}
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
110
|
+
declare function FunctionPage({ export: exp, spec }: FunctionPageProps): React.ReactNode;
|
|
111
|
+
import { OpenPkg as OpenPkg6, SpecExport as SpecExport5 } from "@openpkg-ts/spec";
|
|
112
|
+
interface InterfacePageProps {
|
|
113
|
+
export: SpecExport5;
|
|
114
|
+
spec: OpenPkg6;
|
|
115
|
+
}
|
|
116
|
+
declare function InterfacePage({ export: exp, spec }: InterfacePageProps): React.ReactNode;
|
|
117
|
+
import { OpenPkg as OpenPkg7, SpecMember as SpecMember2 } from "@openpkg-ts/spec";
|
|
118
|
+
interface MembersSectionProps {
|
|
119
|
+
members: SpecMember2[];
|
|
120
|
+
spec?: OpenPkg7;
|
|
121
|
+
title?: string;
|
|
122
|
+
}
|
|
123
|
+
declare function MembersSection({ members, spec: _spec, title }: MembersSectionProps): React.ReactNode;
|
|
124
|
+
import { SpecMember as SpecMember3 } from "@openpkg-ts/spec";
|
|
150
125
|
interface MethodSectionProps {
|
|
151
|
-
member:
|
|
126
|
+
member: SpecMember3;
|
|
152
127
|
/** @deprecated Use CollapsibleMethod directly with defaultExpanded */
|
|
153
128
|
defaultExpanded?: boolean;
|
|
154
129
|
}
|
|
@@ -156,5 +131,30 @@ interface MethodSectionProps {
|
|
|
156
131
|
* Method display section with collapsible behavior
|
|
157
132
|
* @deprecated Use CollapsibleMethod directly for more control
|
|
158
133
|
*/
|
|
159
|
-
declare function MethodSection({ member, defaultExpanded }: MethodSectionProps);
|
|
134
|
+
declare function MethodSection({ member, defaultExpanded }: MethodSectionProps): React.ReactNode;
|
|
135
|
+
import { OpenPkg as OpenPkg8, SpecSignatureParameter as SpecSignatureParameter2 } from "@openpkg-ts/spec";
|
|
136
|
+
interface ParameterCardProps {
|
|
137
|
+
param: SpecSignatureParameter2;
|
|
138
|
+
spec?: OpenPkg8;
|
|
139
|
+
}
|
|
140
|
+
declare function ParameterCard({ param, spec: _spec }: ParameterCardProps): React.ReactNode;
|
|
141
|
+
import { SpecExport as SpecExport6 } from "@openpkg-ts/spec";
|
|
142
|
+
interface SignatureProps {
|
|
143
|
+
export: SpecExport6;
|
|
144
|
+
signatureIndex?: number;
|
|
145
|
+
}
|
|
146
|
+
declare function Signature({ export: exp, signatureIndex }: SignatureProps): React.ReactNode;
|
|
147
|
+
import { OpenPkg as OpenPkg9, SpecMember as SpecMember4, SpecSignatureParameter as SpecSignatureParameter3 } from "@openpkg-ts/spec";
|
|
148
|
+
interface TypeTableProps {
|
|
149
|
+
items: (SpecSignatureParameter3 | SpecMember4)[];
|
|
150
|
+
spec?: OpenPkg9;
|
|
151
|
+
showRequired?: boolean;
|
|
152
|
+
}
|
|
153
|
+
declare function TypeTable({ items, showRequired }: TypeTableProps): React.ReactNode;
|
|
154
|
+
import { OpenPkg as OpenPkg10, SpecExport as SpecExport7 } from "@openpkg-ts/spec";
|
|
155
|
+
interface VariablePageProps {
|
|
156
|
+
export: SpecExport7;
|
|
157
|
+
spec: OpenPkg10;
|
|
158
|
+
}
|
|
159
|
+
declare function VariablePage({ export: exp, spec: _spec }: VariablePageProps): React.ReactNode;
|
|
160
160
|
export { VariablePageProps, VariablePage, TypeTableProps, TypeTable, SignatureProps, Signature, ParameterCardProps, ParameterCard, NestedPropertyProps, NestedProperty, MethodSectionProps, MethodSection, MembersSectionProps, MembersSection, InterfacePageProps, InterfacePage, FunctionPageProps, FunctionPage, ExpandablePropertyProps, ExpandableProperty, ExamplesSectionProps, ExamplesSection, EnumPageProps, EnumPage, CoverageBadgeProps, CoverageBadge, CollapsibleMethodProps, CollapsibleMethod, CodeExampleProps, CodeExample, ClassPageProps, ClassPage, APIPageProps, APIPage };
|
package/dist/components/index.js
CHANGED
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
Signature,
|
|
16
16
|
TypeTable,
|
|
17
17
|
VariablePage
|
|
18
|
-
} from "../shared/chunk-
|
|
18
|
+
} from "../shared/chunk-edfpjshy.js";
|
|
19
19
|
// src/components/members-section.tsx
|
|
20
20
|
import { jsxDEV } from "react/jsx-dev-runtime";
|
|
21
21
|
|
|
@@ -29,8 +29,6 @@ function formatSchema(schema) {
|
|
|
29
29
|
if (s.$ref && typeof s.$ref === "string") {
|
|
30
30
|
return s.$ref.replace("#/types/", "");
|
|
31
31
|
}
|
|
32
|
-
if (s.tsType)
|
|
33
|
-
return String(s.tsType);
|
|
34
32
|
if (s.type)
|
|
35
33
|
return String(s.type);
|
|
36
34
|
}
|
|
@@ -82,7 +80,7 @@ function MemberRow({ member }) {
|
|
|
82
80
|
const optional = p.required === false ? "?" : "";
|
|
83
81
|
return `${p.name}${optional}: ${formatSchema(p.schema)}`;
|
|
84
82
|
}) ?? [];
|
|
85
|
-
const returnType =
|
|
83
|
+
const returnType = formatSchema(sig.returns?.schema) ?? "void";
|
|
86
84
|
signature = `(${params.join(", ")}): ${returnType}`;
|
|
87
85
|
}
|
|
88
86
|
return /* @__PURE__ */ jsxDEV("div", {
|
|
@@ -118,7 +116,11 @@ function MemberRow({ member }) {
|
|
|
118
116
|
]
|
|
119
117
|
}, undefined, true, undefined, this);
|
|
120
118
|
}
|
|
121
|
-
function MembersSection({
|
|
119
|
+
function MembersSection({
|
|
120
|
+
members,
|
|
121
|
+
spec: _spec,
|
|
122
|
+
title = "Members"
|
|
123
|
+
}) {
|
|
122
124
|
if (!members?.length)
|
|
123
125
|
return null;
|
|
124
126
|
const groups = groupMembersByKind(members);
|
|
@@ -210,7 +212,10 @@ function MembersSection({ members, spec, title = "Members" }) {
|
|
|
210
212
|
// src/components/method-section.tsx
|
|
211
213
|
import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
|
|
212
214
|
|
|
213
|
-
function MethodSection({
|
|
215
|
+
function MethodSection({
|
|
216
|
+
member,
|
|
217
|
+
defaultExpanded = false
|
|
218
|
+
}) {
|
|
214
219
|
return /* @__PURE__ */ jsxDEV2(CollapsibleMethod, {
|
|
215
220
|
member,
|
|
216
221
|
defaultExpanded
|
package/dist/index.d.ts
CHANGED
|
@@ -60,5 +60,5 @@ interface APIPageProps {
|
|
|
60
60
|
* <APIPage instance={openpkg} id="createClient" />
|
|
61
61
|
* ```
|
|
62
62
|
*/
|
|
63
|
-
declare function APIPage({ spec, instance, id }: APIPageProps);
|
|
63
|
+
declare function APIPage({ spec, instance, id }: APIPageProps): React.ReactNode;
|
|
64
64
|
export { createOpenPkg, OpenPkgOptions, OpenPkgInstance, APIPageProps, APIPage };
|