fumadocs-openapi 12.2.0 → 12.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.
- package/css/generated/shared.css +1 -1
- package/dist/.translations/index.d.ts +4 -4
- package/dist/.translations/keys.js +4 -4
- package/dist/operation.js +4 -4
- package/dist/packages/shared-api/dist/.translations/index.d.ts +1 -0
- package/dist/packages/shared-api/dist/.translations/keys.js +1 -0
- package/dist/packages/shared-api/dist/auto-anchor/index.js +54 -10
- package/dist/packages/shared-api/dist/components/accordion.js +3 -11
- package/dist/packages/shared-api/dist/components/collapsible.js +16 -0
- package/dist/packages/shared-api/dist/components/defaults.js +1 -1
- package/dist/packages/shared-api/dist/components/schema/client.d.ts +5 -0
- package/dist/packages/shared-api/dist/components/schema/client.js +408 -455
- package/dist/packages/shared-api/dist/components/select-tab.js +7 -12
- package/dist/playground/auth.d.ts +61 -7
- package/dist/playground/auth.js +192 -95
- package/dist/playground/fetcher.d.ts +1 -1
- package/dist/playground/index.d.ts +2 -2
- package/dist/playground/index.js +2 -2
- package/dist/playground/use-playground.d.ts +5 -3
- package/dist/playground/use-playground.js +22 -10
- package/dist/requests/generators/csharp.js +11 -21
- package/dist/requests/generators/curl.js +12 -14
- package/dist/requests/generators/go.js +22 -33
- package/dist/requests/generators/index.d.ts +1 -1
- package/dist/requests/generators/java.js +33 -37
- package/dist/requests/generators/javascript.js +13 -20
- package/dist/requests/generators/python.js +12 -17
- package/dist/requests/generators/rust.js +15 -20
- package/dist/requests/index.d.ts +1 -1
- package/dist/requests/media/adapter.d.ts +0 -1
- package/dist/requests/media/adapter.js +50 -42
- package/dist/requests/media/encode.d.ts +1 -1
- package/dist/requests/media/encode.js +1 -1
- package/dist/requests/string-utils.js +14 -6
- package/dist/ui/components/dialog.js +14 -0
- package/dist/ui/components/endpoint.js +11 -8
- package/dist/ui/components/heading.js +1 -1
- package/dist/ui/components/schema.js +1 -1
- package/dist/ui/{playground/components → components}/segmented.js +2 -2
- package/dist/ui/operation/index.js +262 -237
- package/dist/ui/operation/request-tabs.js +1 -1
- package/dist/ui/operation/response-tabs.js +1 -1
- package/dist/ui/operation/usage-tabs.js +1 -1
- package/dist/ui/playground/client.d.ts +1 -1
- package/dist/ui/playground/client.js +23 -19
- package/dist/ui/playground/components/fields.js +36 -15
- package/dist/ui/playground/components/oauth-panel.js +71 -21
- package/dist/ui/playground/components/request-panel.js +80 -94
- package/dist/ui/playground/components/response-panel.js +1 -1
- package/dist/ui/playground/components/result-display.js +1 -1
- package/dist/ui/playground/components/server-select.js +1 -1
- package/dist/utils/create-page.js +2 -2
- package/dist/utils/get-example-requests.js +1 -1
- package/dist/utils/use-server.d.ts +3 -3
- package/dist/utils/use-server.js +2 -2
- package/package.json +5 -5
- package/dist/packages/shared-api/dist/auto-anchor/client.js +0 -20
- package/dist/packages/shared-api/dist/components/popover.js +0 -23
- package/dist/packages/shared-api/dist/utils/merge-refs.js +0 -11
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { MethodLabel } from "./method-label.js";
|
|
2
2
|
import { cn } from "../../utils/cn.js";
|
|
3
|
-
import { Fragment } from "react";
|
|
4
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
4
|
//#region src/ui/components/endpoint.tsx
|
|
6
5
|
function EndpointBar({ method, route, deprecated = false, children, ...props }) {
|
|
@@ -24,13 +23,17 @@ function Route({ route, ...props }) {
|
|
|
24
23
|
return /* @__PURE__ */ jsx("div", {
|
|
25
24
|
...props,
|
|
26
25
|
className: cn("flex min-w-0 items-center overflow-x-auto font-mono text-[0.8125rem] text-nowrap [scrollbar-width:none]", props.className),
|
|
27
|
-
children: route.split(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
26
|
+
children: route.split(/(\{[^}]*\}|\/)/).map((part, index) => {
|
|
27
|
+
if (index % 2 === 0) return part;
|
|
28
|
+
if (part === "/") return /* @__PURE__ */ jsx("span", {
|
|
29
|
+
className: "text-fd-muted-foreground",
|
|
30
|
+
children: "/"
|
|
31
|
+
}, index);
|
|
32
|
+
return /* @__PURE__ */ jsx("span", {
|
|
33
|
+
className: "rounded-md bg-fd-primary/10 px-1 text-fd-primary",
|
|
34
|
+
children: part
|
|
35
|
+
}, index);
|
|
36
|
+
})
|
|
34
37
|
});
|
|
35
38
|
}
|
|
36
39
|
//#endregion
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useComponents } from "../../utils/create-page.js";
|
|
3
|
-
import { useAnchorId } from "../../packages/shared-api/dist/auto-anchor/
|
|
3
|
+
import { useAnchorId } from "../../packages/shared-api/dist/auto-anchor/index.js";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
//#region src/ui/components/heading.tsx
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useComponents, useRenderContext } from "../../utils/create-page.js";
|
|
3
|
-
import { useAnchorId } from "../../packages/shared-api/dist/auto-anchor/
|
|
3
|
+
import { useAnchorId } from "../../packages/shared-api/dist/auto-anchor/index.js";
|
|
4
4
|
import { useMemo } from "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
//#region src/ui/components/schema.tsx
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { cn } from "
|
|
2
|
+
import { cn } from "../../utils/cn.js";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
import { Tabs } from "@base-ui/react/tabs";
|
|
5
|
-
//#region src/ui/
|
|
5
|
+
//#region src/ui/components/segmented.tsx
|
|
6
6
|
const Segmented = Tabs.Root;
|
|
7
7
|
const SegmentedPanel = Tabs.Panel;
|
|
8
8
|
/** a pill switch with a sliding indicator, its panels go in `<SegmentedPanel />` */
|