fumadocs-openapi 8.0.1 → 8.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.
@@ -83,7 +83,7 @@ export default function Client({ route, method = 'GET', authorization, parameter
83
83
  const onSubmit = form.handleSubmit((value) => {
84
84
  testQuery.start(value);
85
85
  });
86
- return (_jsx(FormProvider, { ...form, children: _jsx(SchemaContext.Provider, { value: useMemo(() => ({ references: references, dynamic: dynamicRef }), [references]), children: _jsx(AuthProvider, { authorization: authorization, children: _jsxs("form", { ...rest, className: cn('not-prose flex flex-col rounded-xl border p-3 gap-4 shadow-md overflow-hidden bg-fd-card text-fd-card-foreground', rest.className), onSubmit: onSubmit, children: [_jsxs("div", { className: "flex flex-row items-center gap-2 text-sm", children: [_jsx(MethodLabel, { children: method }), _jsx(Route, { route: route, className: "flex-1" }), _jsx("button", { type: "submit", className: cn(buttonVariants({ color: 'primary', size: 'sm' }), 'px-3 py-1.5'), disabled: testQuery.isLoading, children: testQuery.isLoading ? (_jsx(Loader2, { className: "size-4 animate-spin" })) : ('Send') })] }), _jsx(FormBody, { body: body, fields: fields, parameters: parameters, authorization: authorization }), testQuery.data ? _jsx(ResultDisplay, { data: testQuery.data }) : null] }) }) }) }));
86
+ return (_jsx(FormProvider, { ...form, children: _jsx(SchemaContext.Provider, { value: useMemo(() => ({ references: references, dynamic: dynamicRef }), [references]), children: _jsx(AuthProvider, { authorization: authorization, children: _jsxs("form", { ...rest, className: cn('not-prose flex flex-col rounded-xl border shadow-md overflow-hidden bg-fd-card text-fd-card-foreground', rest.className), onSubmit: onSubmit, children: [_jsxs("div", { className: "flex flex-row items-center gap-2 text-sm p-3 pb-0", children: [_jsx(MethodLabel, { children: method }), _jsx(Route, { route: route, className: "flex-1" }), _jsx("button", { type: "submit", className: cn(buttonVariants({ color: 'primary', size: 'sm' }), 'px-3 py-1.5'), disabled: testQuery.isLoading, children: testQuery.isLoading ? (_jsx(Loader2, { className: "size-4 animate-spin" })) : ('Send') })] }), _jsx(FormBody, { body: body, fields: fields, parameters: parameters, authorization: authorization }), testQuery.data ? _jsx(ResultDisplay, { data: testQuery.data }) : null] }) }) }) }));
87
87
  }
88
88
  const paramNames = ['Headers', 'Cookies', 'Query', 'Path'];
89
89
  const paramTypes = ['header', 'cookie', 'query', 'path'];
@@ -209,7 +209,7 @@ function usePersistentAuthInfo(authorization) {
209
209
  };
210
210
  }
211
211
  function CollapsiblePanel({ title, children, ...props }) {
212
- return (_jsxs(Collapsible, { ...props, className: "border-b -m-2 last:border-b-0", children: [_jsxs(CollapsibleTrigger, { className: "group w-full flex items-center gap-2 p-2 text-sm font-medium", children: [title, _jsx(ChevronDown, { className: "ms-auto size-3.5 text-fd-muted-foreground group-data-[state=open]:rotate-180" })] }), _jsx(CollapsibleContent, { children: _jsx("div", { className: "flex flex-col gap-3 p-2", children: children }) })] }));
212
+ return (_jsxs(Collapsible, { ...props, className: "border-b last:border-b-0", children: [_jsxs(CollapsibleTrigger, { className: "group w-full flex items-center gap-2 p-3 text-sm font-medium", children: [title, _jsx(ChevronDown, { className: "ms-auto size-3.5 text-fd-muted-foreground group-data-[state=open]:rotate-180" })] }), _jsx(CollapsibleContent, { children: _jsx("div", { className: "flex flex-col gap-3 p-2", children: children }) })] }));
213
213
  }
214
214
  function writeAuthHeader(authorization, input, header, query, cookie) {
215
215
  if (authorization.type === 'apiKey') {
@@ -22,7 +22,7 @@ export function JsonInput({ fieldName }) {
22
22
  name: fieldName,
23
23
  });
24
24
  const [value, setValue] = useState(() => JSON.stringify(controller.field.value, null, 2));
25
- return (_jsx("textarea", { ...controller.field, value: value, className: "w-full h-[400px] resize-none rounded-lg border p-2 bg-fd-secondary text-fd-secondary-foreground focus-visible:outline-none", onChange: (v) => {
25
+ return (_jsx("textarea", { ...controller.field, value: value, className: "w-full h-[300px] text-[13px] font-mono resize-none rounded-lg border p-2 bg-fd-secondary text-fd-secondary-foreground focus-visible:outline-none", onChange: (v) => {
26
26
  setValue(v.target.value);
27
27
  try {
28
28
  controller.field.onChange(JSON.parse(v.target.value));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fumadocs-openapi",
3
- "version": "8.0.1",
3
+ "version": "8.0.3",
4
4
  "description": "Generate MDX docs for your OpenAPI spec",
5
5
  "keywords": [
6
6
  "NextJs",
@@ -47,14 +47,14 @@
47
47
  "@radix-ui/react-dialog": "^1.1.7",
48
48
  "@radix-ui/react-select": "^2.1.7",
49
49
  "@radix-ui/react-slot": "^1.2.0",
50
- "@scalar/openapi-parser": "0.10.14",
50
+ "@scalar/openapi-parser": "0.10.16",
51
51
  "ajv-draft-04": "^1.0.0",
52
52
  "class-variance-authority": "^0.7.1",
53
53
  "fast-glob": "^3.3.3",
54
54
  "github-slugger": "^2.0.0",
55
55
  "hast-util-to-jsx-runtime": "^2.3.6",
56
56
  "js-yaml": "^4.1.0",
57
- "lucide-react": "^0.487.0",
57
+ "lucide-react": "^0.488.0",
58
58
  "next-themes": "^0.4.6",
59
59
  "openapi-sampler": "^1.6.1",
60
60
  "react-hook-form": "^7.55.0",
@@ -62,18 +62,18 @@
62
62
  "remark-rehype": "^11.1.2",
63
63
  "shiki": "^3.2.2",
64
64
  "xml-js": "^1.6.11",
65
- "fumadocs-core": "15.2.7",
66
- "fumadocs-ui": "15.2.7"
65
+ "fumadocs-core": "15.2.9",
66
+ "fumadocs-ui": "15.2.9"
67
67
  },
68
68
  "devDependencies": {
69
- "@scalar/api-client-react": "^1.2.15",
69
+ "@scalar/api-client-react": "^1.2.22",
70
70
  "@types/js-yaml": "^4.0.9",
71
- "@types/node": "22.14.0",
71
+ "@types/node": "22.14.1",
72
72
  "@types/openapi-sampler": "^1.0.3",
73
- "@types/react": "^19.1.0",
74
- "next": "15.3.0",
73
+ "@types/react": "^19.1.2",
74
+ "next": "15.3.1",
75
75
  "openapi-types": "^12.1.3",
76
- "tailwindcss": "^4.1.3",
76
+ "tailwindcss": "^4.1.4",
77
77
  "tsc-alias": "^1.8.15",
78
78
  "eslint-config-custom": "0.0.0",
79
79
  "tsconfig": "0.0.0"