@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 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
@@ -7,4 +7,3 @@ export default defineConfig({
7
7
  format: ['esm'],
8
8
  external: ['react', 'react-dom', '@doccov/ui'],
9
9
  });
10
-
@@ -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 FunctionPageProps {
47
+ interface ClassPageProps {
48
48
  export: SpecExport2;
49
49
  spec: OpenPkg3;
50
50
  }
51
- declare function FunctionPage({ export: exp, spec }: FunctionPageProps);
52
- import { OpenPkg as OpenPkg4, SpecExport as SpecExport3 } from "@openpkg-ts/spec";
53
- interface ClassPageProps {
54
- export: SpecExport3;
55
- spec: OpenPkg4;
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 Signature({ export: exp, signatureIndex }: SignatureProps);
89
- interface ExamplesSectionProps {
90
- examples: string[];
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
- declare function ExamplesSection({ examples }: ExamplesSectionProps);
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 { SpecMember as SpecMember2, OpenPkg as OpenPkg9 } from "@openpkg-ts/spec";
101
- interface MembersSectionProps {
102
- members: SpecMember2[];
103
- spec?: OpenPkg9;
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 ParameterCard({ param, spec }: ParameterCardProps);
113
- interface CodeExampleProps {
114
- code: string;
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 CodeExample({ code, filename, language }: CodeExampleProps);
119
- import { SpecSignatureParameter as SpecSignatureParameter3, SpecSchema } from "@openpkg-ts/spec";
84
+ declare function ExamplesSection({ examples }: ExamplesSectionProps): React.ReactNode;
85
+ import { SpecSchema, SpecSignatureParameter } from "@openpkg-ts/spec";
120
86
  interface ExpandablePropertyProps {
121
- param: SpecSignatureParameter3;
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 { SpecMember as SpecMember3 } from "@openpkg-ts/spec";
140
- interface CollapsibleMethodProps {
141
- member: SpecMember3;
142
- defaultExpanded?: boolean;
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
- * Collapsible method section with expand/collapse behavior
146
- * Shows compact signature when collapsed, full details when expanded
147
- */
148
- declare function CollapsibleMethod({ member, defaultExpanded }: CollapsibleMethodProps);
149
- import { SpecMember as SpecMember4 } from "@openpkg-ts/spec";
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: SpecMember4;
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 };
@@ -15,7 +15,7 @@ import {
15
15
  Signature,
16
16
  TypeTable,
17
17
  VariablePage
18
- } from "../shared/chunk-pqaj3kdh.js";
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 = sig.returns?.tsType ?? formatSchema(sig.returns?.schema) ?? "void";
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({ members, spec, title = "Members" }) {
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({ member, defaultExpanded = false }) {
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 };
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  } from "./server.js";
4
4
  import {
5
5
  APIPage
6
- } from "./shared/chunk-pqaj3kdh.js";
6
+ } from "./shared/chunk-edfpjshy.js";
7
7
  export {
8
8
  createOpenPkg,
9
9
  APIPage