@openpkg-ts/fumadocs-adapter 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.
@@ -1,5 +1,5 @@
1
1
  import { CollapsibleMethod, CollapsibleMethodProps, ExampleBlock, ExampleBlockProps, ExpandableProperty, ExpandablePropertyProps, MemberRow, MemberRowProps, MembersTable, MembersTableProps, NestedProperty, NestedPropertyProps, ParamRow, ParamRowProps, ParamTable, ParamTableProps, Signature, SignatureProps, TypeTable, TypeTableProps } from "@openpkg-ts/doc-generator/react";
2
- import { APIPage, APIPageProps, ClassPage, ClassPageProps, EnumPage, EnumPageProps, FunctionPage, FunctionPageProps, InterfacePage, InterfacePageProps, VariablePage, VariablePageProps } from "@openpkg-ts/doc-generator/react/styled";
2
+ import { APIPage, APIPageProps, ClassPage, ClassPageProps, CodeTabs, CodeTab, CodeTabsProps, EnumPage, EnumPageProps, ExportCard, ExportCardProps, ExportIndexPage, ExportIndexPageProps, FunctionPage, FunctionPageProps, ImportSection, ImportSectionProps, InterfacePage, InterfacePageProps, ParameterItem, NestedPropertyItemProps, ParameterItemProps, VariablePage, VariablePageProps } from "@openpkg-ts/doc-generator/react/styled";
3
3
  /**
4
4
  * Documentation drift information.
5
5
  * Describes a mismatch between docs and code.
@@ -24,4 +24,4 @@ interface CoverageBadgeProps {
24
24
  showDrift?: boolean;
25
25
  }
26
26
  declare function CoverageBadge({ docs, showMissing, showDrift }: CoverageBadgeProps): React.ReactNode;
27
- export { VariablePageProps, VariablePage, TypeTableProps, TypeTable, SignatureProps, Signature, ParamTableProps, ParamTable, ParamRowProps, ParamRow, NestedPropertyProps, NestedProperty, MembersTableProps, MembersTable, MemberRowProps, MemberRow, InterfacePageProps, InterfacePage, FunctionPageProps, FunctionPage, ExpandablePropertyProps, ExpandableProperty, ExampleBlockProps, ExampleBlock, EnumPageProps, EnumPage, DocsMetadata, DocDrift, CoverageBadgeProps, CoverageBadge, CollapsibleMethodProps, CollapsibleMethod, ClassPageProps, ClassPage, APIPageProps, APIPage };
27
+ export { VariablePageProps, VariablePage, TypeTableProps, TypeTable, SignatureProps, Signature, ParameterItemProps, ParameterItem, ParamTableProps, ParamTable, ParamRowProps, ParamRow, NestedPropertyProps, NestedPropertyItemProps, NestedProperty, MembersTableProps, MembersTable, MemberRowProps, MemberRow, InterfacePageProps, InterfacePage, ImportSectionProps, ImportSection, FunctionPageProps, FunctionPage, ExportIndexPageProps, ExportIndexPage, ExportCardProps, ExportCard, ExpandablePropertyProps, ExpandableProperty, ExampleBlockProps, ExampleBlock, EnumPageProps, EnumPage, DocsMetadata, DocDrift, CoverageBadgeProps, CoverageBadge, CollapsibleMethodProps, CollapsibleMethod, CodeTabsProps, CodeTabs, CodeTab, ClassPageProps, ClassPage, APIPageProps, APIPage };
@@ -18,27 +18,37 @@ import {
18
18
  import {
19
19
  APIPage,
20
20
  ClassPage,
21
+ CodeTabs,
21
22
  EnumPage,
23
+ ExportCard,
24
+ ExportIndexPage,
22
25
  FunctionPage,
26
+ ImportSection,
23
27
  InterfacePage,
28
+ ParameterItem,
24
29
  VariablePage
25
30
  } from "@openpkg-ts/doc-generator/react/styled";
26
31
  export {
27
32
  VariablePage,
28
33
  TypeTable,
29
34
  Signature,
35
+ ParameterItem,
30
36
  ParamTable,
31
37
  ParamRow,
32
38
  NestedProperty,
33
39
  MembersTable,
34
40
  MemberRow,
35
41
  InterfacePage,
42
+ ImportSection,
36
43
  FunctionPage,
44
+ ExportIndexPage,
45
+ ExportCard,
37
46
  ExpandableProperty,
38
47
  ExampleBlock,
39
48
  EnumPage,
40
49
  CoverageBadge,
41
50
  CollapsibleMethod,
51
+ CodeTabs,
42
52
  ClassPage,
43
53
  APIPage
44
54
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openpkg-ts/fumadocs-adapter",
3
- "version": "0.3.2",
3
+ "version": "0.4.0",
4
4
  "description": "Fumadocs integration for OpenPkg API documentation",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -28,7 +28,7 @@
28
28
  "typecheck": "tsc --noEmit"
29
29
  },
30
30
  "dependencies": {
31
- "@openpkg-ts/doc-generator": "^0.2.4"
31
+ "@openpkg-ts/doc-generator": "^0.3.0"
32
32
  },
33
33
  "peerDependencies": {
34
34
  "fumadocs-core": "^16.0.0",
@@ -14,8 +14,40 @@
14
14
  * @import '@openpkg-ts/fumadocs-adapter/css';
15
15
  */
16
16
 
17
+ /* Tailwind v4 theme - shadcn-style color utilities */
18
+ @theme {
19
+ --color-background: var(--background);
20
+ --color-foreground: var(--foreground);
21
+ --color-card: var(--card);
22
+ --color-card-foreground: var(--card-foreground);
23
+ --color-muted: var(--muted);
24
+ --color-muted-foreground: var(--muted-foreground);
25
+ --color-border: var(--border);
26
+ --color-primary: var(--primary);
27
+ --color-primary-foreground: var(--primary-foreground);
28
+ --color-secondary: var(--secondary);
29
+ --color-secondary-foreground: var(--secondary-foreground);
30
+ --color-accent: var(--accent);
31
+ --color-accent-foreground: var(--accent-foreground);
32
+ }
33
+
17
34
  @layer base {
18
35
  :root {
36
+ /* shadcn/ui style variables mapped to Fumadocs */
37
+ --background: var(--color-fd-background);
38
+ --foreground: var(--color-fd-foreground);
39
+ --card: var(--color-fd-card);
40
+ --card-foreground: var(--color-fd-card-foreground, var(--color-fd-foreground));
41
+ --muted: var(--color-fd-muted);
42
+ --muted-foreground: var(--color-fd-muted-foreground);
43
+ --border: var(--color-fd-border);
44
+ --primary: var(--color-fd-primary);
45
+ --primary-foreground: var(--color-fd-primary-foreground, hsl(0 0% 100%));
46
+ --secondary: var(--color-fd-secondary);
47
+ --secondary-foreground: var(--color-fd-secondary-foreground, var(--color-fd-foreground));
48
+ --accent: var(--color-fd-accent);
49
+ --accent-foreground: var(--color-fd-accent-foreground, var(--color-fd-foreground));
50
+
19
51
  /* Docskit code block colors - mapped to Fumadocs variables */
20
52
  --dk-background: var(--color-fd-card, hsl(0 0% 3%));
21
53
  --dk-border: var(--color-fd-border, hsl(0 0% 18%));
@@ -119,6 +151,33 @@
119
151
  }
120
152
  }
121
153
 
154
+ /* Stripe-style FunctionPage layout */
155
+ @layer components {
156
+ .doccov-function-page {
157
+ /* Full width within container */
158
+ width: 100%;
159
+ }
160
+
161
+ /* Mobile-first: stack layout on small screens */
162
+ @media (max-width: 1023px) {
163
+ .doccov-function-page aside {
164
+ margin-top: 2rem;
165
+ position: relative;
166
+ top: auto;
167
+ max-height: none;
168
+ overflow-y: visible;
169
+ }
170
+ }
171
+
172
+ /* Large screens: two-column with sticky sidebar */
173
+ @media (min-width: 1024px) {
174
+ .doccov-function-page {
175
+ /* Prevent overflow in grid */
176
+ overflow: visible;
177
+ }
178
+ }
179
+ }
180
+
122
181
  /* CodeHike syntax highlighting theme - github-from-css */
123
182
  /* These --ch-* variables are required for the "github-from-css" theme */
124
183
  @layer base {