fumadocs-openapi 5.6.1 → 5.7.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.
package/dist/server/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx,
|
|
1
|
+
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import Slugger from 'github-slugger';
|
|
3
3
|
import Parser from '@apidevtools/json-schema-ref-parser';
|
|
4
4
|
import { Fragment as Fragment$1 } from 'react';
|
|
@@ -10,11 +10,11 @@ import { remark } from 'remark';
|
|
|
10
10
|
import remarkRehype from 'remark-rehype';
|
|
11
11
|
import { toJsxRuntime } from 'hast-util-to-jsx-runtime';
|
|
12
12
|
import { Heading } from 'fumadocs-ui/components/heading';
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
13
|
+
import { Tab, Tabs } from 'fumadocs-ui/components/tabs';
|
|
14
|
+
import { Accordion, Accordions } from 'fumadocs-ui/components/accordion';
|
|
15
15
|
import * as Base from 'fumadocs-ui/components/codeblock';
|
|
16
16
|
import { highlight } from 'fumadocs-core/server';
|
|
17
|
-
import {
|
|
17
|
+
import { APIPlayground, ObjectCollapsible, Property, APIExample as APIExample$1, APIInfo, API, Root } from '../ui/index.js';
|
|
18
18
|
import { cva } from 'class-variance-authority';
|
|
19
19
|
|
|
20
20
|
function noRef(v) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { forwardRef, createElement, useContext, createContext, useState, useEffect, useMemo } from 'react';
|
|
3
3
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
4
|
-
import {
|
|
4
|
+
import { useCopyButton, cn, buttonVariants } from 'fumadocs-ui/components/api';
|
|
5
5
|
import dynamic from 'next/dynamic';
|
|
6
6
|
import { useOnChange } from 'fumadocs-core/utils/use-on-change';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* @license lucide-react v0.
|
|
9
|
+
* @license lucide-react v0.460.0 - ISC
|
|
10
10
|
*
|
|
11
11
|
* This source code is licensed under the ISC license.
|
|
12
12
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -16,7 +16,7 @@ const mergeClasses = (...classes)=>classes.filter((className, index, array)=>{
|
|
|
16
16
|
}).join(" ").trim();
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
|
-
* @license lucide-react v0.
|
|
19
|
+
* @license lucide-react v0.460.0 - ISC
|
|
20
20
|
*
|
|
21
21
|
* This source code is licensed under the ISC license.
|
|
22
22
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -253,7 +253,7 @@ function useSchemaContext() {
|
|
|
253
253
|
return ctx;
|
|
254
254
|
}
|
|
255
255
|
|
|
256
|
-
const APIPlayground = dynamic(()=>import('./playground-client-
|
|
256
|
+
const APIPlayground = dynamic(()=>import('./playground-client-DPxpLHKJ.js').then((mod)=>mod.APIPlayground));
|
|
257
257
|
function Root({ children, baseUrl, className, shikiOptions, ...props }) {
|
|
258
258
|
return /*#__PURE__*/ jsx("div", {
|
|
259
259
|
className: cn('flex flex-col gap-24 text-sm text-fd-muted-foreground', className),
|
|
@@ -288,9 +288,9 @@ function CopyRouteButton({ className, route, ...props }) {
|
|
|
288
288
|
}
|
|
289
289
|
function BaseUrlSelect({ baseUrls }) {
|
|
290
290
|
const { baseUrl, setBaseUrl } = useApiContext();
|
|
291
|
-
if (baseUrls.length
|
|
291
|
+
if (baseUrls.length <= 1) return null;
|
|
292
292
|
return /*#__PURE__*/ jsxs("div", {
|
|
293
|
-
className: "flex flex-row items-center gap-1 px-1",
|
|
293
|
+
className: "flex flex-row items-center gap-1 px-1 mt-2",
|
|
294
294
|
children: [
|
|
295
295
|
/*#__PURE__*/ jsx("span", {
|
|
296
296
|
className: "p-0.5 text-xs font-medium text-fd-muted-foreground",
|
|
@@ -309,4 +309,4 @@ function BaseUrlSelect({ baseUrls }) {
|
|
|
309
309
|
});
|
|
310
310
|
}
|
|
311
311
|
|
|
312
|
-
export { APIPlayground as A, BaseUrlSelect as B,
|
|
312
|
+
export { APIPlayground as A, BaseUrlSelect as B, CircleX as C, Plus as P, Root as R, SchemaContext as S, Trash2 as T, CircleCheck as a, ChevronDown as b, ChevronUp as c, Check as d, useApiContext as e, CopyRouteButton as f, useSchemaContext as u };
|
package/dist/ui/index.js
CHANGED
|
@@ -3,8 +3,8 @@ import { cn } from 'fumadocs-ui/components/api';
|
|
|
3
3
|
import { Fragment } from 'react';
|
|
4
4
|
import { Accordions, Accordion } from 'fumadocs-ui/components/accordion';
|
|
5
5
|
import { cva } from 'class-variance-authority';
|
|
6
|
-
import { f as CopyRouteButton, B as BaseUrlSelect } from './client-client-
|
|
7
|
-
export { A as APIPlayground, R as Root, u as useSchemaContext } from './client-client-
|
|
6
|
+
import { f as CopyRouteButton, B as BaseUrlSelect } from './client-client-Ddkf37Pm.js';
|
|
7
|
+
export { A as APIPlayground, R as Root, u as useSchemaContext } from './client-client-Ddkf37Pm.js';
|
|
8
8
|
|
|
9
9
|
const badgeVariants = cva('rounded-xl border px-1.5 py-1 text-xs font-medium leading-[12px]', {
|
|
10
10
|
variants: {
|
|
@@ -62,7 +62,7 @@ function APIInfo({ children, className, route, badgeClassname, baseUrls, method
|
|
|
62
62
|
className: "sticky top-[var(--fd-api-info-top)] z-[4] mb-4 border-b border-fd-foreground/10 bg-fd-card/50 px-4 py-1.5 shadow-lg backdrop-blur-lg max-lg:-mx-3 max-md:-mx-4 md:rounded-xl md:border md:px-1.5",
|
|
63
63
|
children: [
|
|
64
64
|
/*#__PURE__*/ jsxs("div", {
|
|
65
|
-
className: "
|
|
65
|
+
className: "flex flex-row items-center gap-1.5",
|
|
66
66
|
children: [
|
|
67
67
|
/*#__PURE__*/ jsx("span", {
|
|
68
68
|
className: cn(badgeVariants({
|
|
@@ -94,7 +94,7 @@ function APIInfo({ children, className, route, badgeClassname, baseUrls, method
|
|
|
94
94
|
function API({ children, ...props }) {
|
|
95
95
|
return /*#__PURE__*/ jsx("div", {
|
|
96
96
|
...props,
|
|
97
|
-
className: cn('flex flex-col gap-x-6 gap-y-4 max-
|
|
97
|
+
className: cn('flex flex-col gap-x-6 gap-y-4 max-xl:[--fd-toc-height:46px] max-md:[--fd-toc-height:36px] xl:flex-row xl:items-start', props.className),
|
|
98
98
|
style: {
|
|
99
99
|
'--fd-api-info-top': 'calc(var(--fd-nav-height) + var(--fd-banner-height) + var(--fd-toc-height, 0.5rem))',
|
|
100
100
|
...props.style
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
import { forwardRef, useId,
|
|
4
|
+
import { createContext, forwardRef, useId, useContext, useState, useCallback, useRef, useMemo, useEffect } from 'react';
|
|
5
5
|
import { FormProvider, Controller, useFormContext, useFieldArray, useForm, useWatch } from 'react-hook-form';
|
|
6
6
|
import { Accordions, Accordion } from 'fumadocs-ui/components/accordion';
|
|
7
7
|
import { cn, buttonVariants } from 'fumadocs-ui/components/api';
|
|
8
|
-
import { C as
|
|
8
|
+
import { C as CircleX, a as CircleCheck, b as ChevronDown, c as ChevronUp, d as Check, u as useSchemaContext, T as Trash2, P as Plus, e as useApiContext, S as SchemaContext } from './client-client-Ddkf37Pm.js';
|
|
9
9
|
import { Slot } from '@radix-ui/react-slot';
|
|
10
10
|
import { cva } from 'class-variance-authority';
|
|
11
11
|
import { useOnChange } from 'fumadocs-core/utils/use-on-change';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fumadocs-openapi",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.7.0",
|
|
4
4
|
"description": "Generate MDX docs for your OpenAPI spec",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"NextJs",
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
"react-hook-form": "^7.53.2",
|
|
45
45
|
"remark": "^15.0.1",
|
|
46
46
|
"remark-rehype": "^11.1.1",
|
|
47
|
-
"shiki": "^1.
|
|
48
|
-
"fumadocs-core": "14.4.
|
|
49
|
-
"fumadocs-ui": "14.4.
|
|
47
|
+
"shiki": "^1.23.0",
|
|
48
|
+
"fumadocs-core": "14.4.2",
|
|
49
|
+
"fumadocs-ui": "14.4.2"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@types/js-yaml": "^4.0.9",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@types/openapi-sampler": "^1.0.3",
|
|
55
55
|
"@types/react": "^18.3.12",
|
|
56
56
|
"bunchee": "^5.6.1",
|
|
57
|
-
"lucide-react": "^0.
|
|
57
|
+
"lucide-react": "^0.460.0",
|
|
58
58
|
"next": "15.0.3",
|
|
59
59
|
"openapi-types": "^12.1.3",
|
|
60
60
|
"eslint-config-custom": "0.0.0",
|