fumadocs-openapi 11.4.3 → 12.0.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/css/preset.css +0 -1
- package/dist/_virtual/_rolldown/runtime.js +10 -1
- package/dist/generate-file.d.ts +2 -2
- package/dist/generate-file.js +1 -1
- package/dist/i18n.d.ts +6 -8
- package/dist/i18n.js +2 -17
- package/dist/index.browser.d.ts +13 -0
- package/dist/index.browser.js +11 -0
- package/dist/index.d.ts +5 -2
- package/dist/index.js +3 -1
- package/dist/operation.d.ts +133 -0
- package/dist/operation.js +296 -0
- package/dist/packages/shared-api/dist/.translations/index.d.ts +29 -0
- package/dist/packages/shared-api/dist/.translations/keys.js +28 -0
- package/dist/packages/shared-api/dist/auto-anchor/client.js +20 -0
- package/dist/packages/shared-api/dist/auto-anchor/index.js +17 -0
- package/dist/packages/shared-api/dist/codegen.d.ts +42 -0
- package/dist/packages/shared-api/dist/codegen.js +35 -0
- package/dist/packages/shared-api/dist/components/accordion.js +71 -0
- package/dist/packages/shared-api/dist/components/badge.js +21 -0
- package/dist/packages/shared-api/dist/components/collapsible.d.ts +7 -0
- package/dist/packages/shared-api/dist/components/collapsible.js +16 -0
- package/dist/packages/shared-api/dist/components/defaults.d.ts +20 -0
- package/dist/packages/shared-api/dist/components/defaults.js +70 -0
- package/dist/packages/shared-api/dist/components/dialog.js +55 -0
- package/dist/packages/shared-api/dist/components/input.js +14 -0
- package/dist/packages/shared-api/dist/components/label.js +11 -0
- package/dist/packages/shared-api/dist/components/playground/inputs.js +439 -0
- package/dist/packages/shared-api/dist/components/playground/schema.js +112 -0
- package/dist/packages/shared-api/dist/components/popover.js +23 -0
- package/dist/packages/shared-api/dist/components/schema/client.d.ts +12 -0
- package/dist/packages/shared-api/dist/components/schema/client.js +508 -0
- package/dist/packages/shared-api/dist/components/schema/index.d.ts +9 -0
- package/dist/packages/shared-api/dist/components/schema/index.js +28 -0
- package/dist/packages/shared-api/dist/components/select-tab.js +54 -0
- package/dist/packages/shared-api/dist/components/select.js +70 -0
- package/dist/packages/shared-api/dist/components/spinner.js +14 -0
- package/dist/packages/shared-api/dist/i18n.d.ts +3 -0
- package/dist/packages/shared-api/dist/i18n.js +7 -0
- package/dist/packages/shared-api/dist/utils/cn.js +2 -0
- package/dist/packages/shared-api/dist/utils/id-to-title.js +12 -0
- package/dist/packages/shared-api/dist/utils/is-plain-object.js +8 -0
- package/dist/packages/shared-api/dist/utils/merge-refs.js +11 -0
- package/dist/packages/shared-api/dist/utils/url.js +13 -0
- package/dist/{utils → packages/shared-api/dist/utils}/use-query.js +2 -1
- package/dist/packages/shared-api/dist/utils/use-server-store.js +56 -0
- package/dist/playground/auth.d.ts +37 -0
- package/dist/playground/auth.js +216 -21
- package/dist/playground/fetcher.d.ts +11 -1
- package/dist/playground/index.d.ts +3 -0
- package/dist/playground/index.js +3 -0
- package/dist/requests/generators/index.d.ts +4 -4
- package/dist/requests/generators/index.js +2 -2
- package/dist/requests/index.d.ts +4 -0
- package/dist/requests/index.js +3 -0
- package/dist/requests/media/adapter.d.ts +1 -0
- package/dist/requests/media/encode.d.ts +7 -2
- package/dist/requests/media/resolve-adapter.d.ts +20 -0
- package/dist/server/index.d.ts +4 -7
- package/dist/server/index.js +1 -7
- package/dist/types.d.ts +0 -14
- package/dist/ui/base.d.ts +3 -2
- package/dist/ui/base.js +15 -166
- package/dist/ui/components/codeblock.js +3 -10
- package/dist/ui/components/heading.js +10 -19
- package/dist/ui/components/markdown.js +4 -6
- package/dist/ui/components/method-label.js +2 -17
- package/dist/ui/components/schema.js +28 -0
- package/dist/ui/index.d.ts +7 -198
- package/dist/ui/index.js +1 -3
- package/dist/ui/operation/index.js +142 -229
- package/dist/ui/operation/request-tabs.js +15 -23
- package/dist/ui/operation/response-tabs.js +9 -53
- package/dist/ui/operation/usage-tabs.js +35 -93
- package/dist/{playground → ui/playground}/client.d.ts +10 -21
- package/dist/ui/playground/client.js +432 -0
- package/dist/{playground → ui/playground}/components/oauth-dialog.js +26 -91
- package/dist/{playground → ui/playground}/components/result-display.d.ts +2 -2
- package/dist/{playground → ui/playground}/components/result-display.js +7 -7
- package/dist/{playground → ui/playground}/components/server-select.js +12 -13
- package/dist/{playground → ui/playground}/status-info.js +2 -2
- package/dist/{scalar → ui/scalar}/client.js +7 -5
- package/dist/{scalar → ui/scalar}/index.d.ts +2 -2
- package/dist/{scalar → ui/scalar}/index.js +3 -7
- package/dist/utils/create-page.d.ts +216 -0
- package/dist/utils/create-page.js +221 -0
- package/dist/utils/document/dereference.d.ts +2 -2
- package/dist/utils/document/dereference.js +8 -3
- package/dist/utils/document/load.js +2 -2
- package/dist/utils/get-example-requests.js +11 -13
- package/dist/utils/pages/builder.d.ts +15 -2
- package/dist/utils/pages/builder.js +6 -6
- package/dist/utils/pages/preset-auto.d.ts +1 -1
- package/dist/utils/pages/preset-auto.js +3 -3
- package/dist/utils/pages/to-static-data.js +4 -4
- package/dist/utils/pages/to-text.d.ts +1 -1
- package/dist/utils/pages/to-text.js +3 -5
- package/dist/utils/schema.js +5 -5
- package/dist/utils/use-server.d.ts +24 -0
- package/dist/utils/use-server.js +57 -0
- package/package.json +28 -20
- package/dist/node_modules/.pnpm/@scalar_openapi-upgrader@0.2.15/node_modules/@scalar/openapi-upgrader/dist/2.0-to-3.0/upgrade-from-two-to-three.js +0 -508
- package/dist/node_modules/.pnpm/@scalar_openapi-upgrader@0.2.15/node_modules/@scalar/openapi-upgrader/dist/3.0-to-3.1/upgrade-from-three-to-three-one.js +0 -152
- package/dist/node_modules/.pnpm/@scalar_openapi-upgrader@0.2.15/node_modules/@scalar/openapi-upgrader/dist/3.1-to-3.2/upgrade-from-three-one-to-three-two.js +0 -61
- package/dist/node_modules/.pnpm/@scalar_openapi-upgrader@0.2.15/node_modules/@scalar/openapi-upgrader/dist/helpers/traverse.js +0 -25
- package/dist/node_modules/.pnpm/@scalar_openapi-upgrader@0.2.15/node_modules/@scalar/openapi-upgrader/dist/upgrade.js +0 -15
- package/dist/playground/client.js +0 -574
- package/dist/ui/contexts/api.d.ts +0 -17
- package/dist/ui/contexts/api.js +0 -84
- package/dist/ui/create-client.d.ts +0 -9
- package/dist/ui/create-client.js +0 -7
- package/dist/ui/operation/context.d.ts +0 -15
- package/dist/ui/operation/context.js +0 -48
- package/dist/ui/operation/request-tabs.d.ts +0 -12
- package/dist/ui/operation/response-tabs.d.ts +0 -30
- package/dist/utils/get-example-requests.d.ts +0 -11
- package/dist/utils/schema.d.ts +0 -3
- package/dist/utils/storage-key.js +0 -15
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Document, HttpMethods, OperationObject, PathItemObject, TagObject } from "../../types.js";
|
|
2
|
-
import {
|
|
2
|
+
import { DereferencedShallow } from "@fumadocs/json-schema";
|
|
3
3
|
//#region src/utils/pages/builder.d.ts
|
|
4
4
|
interface BaseEntry {
|
|
5
5
|
path: string;
|
|
@@ -59,7 +59,7 @@ export interface PagesBuilder {
|
|
|
59
59
|
id: string;
|
|
60
60
|
/** bundled OpenAPI document (not dereferenced) */
|
|
61
61
|
document: Document;
|
|
62
|
-
dereferenceShallow: <T>(schema: T) =>
|
|
62
|
+
dereferenceShallow: <T>(schema: T) => DereferencedShallow<T>;
|
|
63
63
|
/**
|
|
64
64
|
* add output entry.
|
|
65
65
|
*/
|
|
@@ -109,4 +109,17 @@ export interface GeneratedPageProps {
|
|
|
109
109
|
operations?: OperationItem[];
|
|
110
110
|
webhooks?: WebhookItem[];
|
|
111
111
|
}
|
|
112
|
+
export type OpenAPIPageProps = OpenAPIPageProps_Spec | OpenAPIPageProps_Preloaded;
|
|
113
|
+
export type OpenAPIPageProps_Spec = Omit<GeneratedPageProps, 'document'> & {
|
|
114
|
+
payload: {
|
|
115
|
+
bundled: Document;
|
|
116
|
+
proxyUrl?: string;
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
export type OpenAPIPageProps_Preloaded = GeneratedPageProps & {
|
|
120
|
+
preloaded: {
|
|
121
|
+
docs: Record<string, Document>;
|
|
122
|
+
proxyUrl?: string;
|
|
123
|
+
};
|
|
124
|
+
};
|
|
112
125
|
//#endregion
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { idToTitle } from "../../packages/shared-api/dist/utils/id-to-title.js";
|
|
1
2
|
import { getTagDisplayName, methodKeys } from "../schema.js";
|
|
2
|
-
import { idToTitle } from "@fumadocs/api-docs/utils/id-to-title";
|
|
3
|
-
import { dereferenceShallow } from "@fumadocs/api-docs/schema/dereference";
|
|
4
3
|
import { createMagicProxy } from "@scalar/json-magic/magic-proxy";
|
|
4
|
+
import { dereference } from "@fumadocs/json-schema";
|
|
5
5
|
//#region src/utils/pages/builder.ts
|
|
6
6
|
function fromSchema(schemaId, bundled, config) {
|
|
7
7
|
const files = [];
|
|
@@ -10,7 +10,7 @@ function fromSchema(schemaId, bundled, config) {
|
|
|
10
10
|
toPages({
|
|
11
11
|
id: schemaId,
|
|
12
12
|
document,
|
|
13
|
-
dereferenceShallow: (s) =>
|
|
13
|
+
dereferenceShallow: (s) => dereference(s),
|
|
14
14
|
create(entry) {
|
|
15
15
|
files.push(entry);
|
|
16
16
|
},
|
|
@@ -31,7 +31,7 @@ function fromSchema(schemaId, bundled, config) {
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
for (const [name, _pathItem] of Object.entries(document.webhooks ?? {})) {
|
|
34
|
-
const pathItem =
|
|
34
|
+
const pathItem = dereference(_pathItem);
|
|
35
35
|
if (!pathItem) continue;
|
|
36
36
|
for (const methodKey of methodKeys) {
|
|
37
37
|
if (!pathItem[methodKey]) continue;
|
|
@@ -52,7 +52,7 @@ function fromSchema(schemaId, bundled, config) {
|
|
|
52
52
|
}).join("/");
|
|
53
53
|
},
|
|
54
54
|
fromExtractedWebhook(item) {
|
|
55
|
-
const pathItem =
|
|
55
|
+
const pathItem = dereference(document.webhooks?.[item.name]);
|
|
56
56
|
if (!pathItem) return;
|
|
57
57
|
const operation = pathItem?.[item.method];
|
|
58
58
|
if (!operation) return;
|
|
@@ -65,7 +65,7 @@ function fromSchema(schemaId, bundled, config) {
|
|
|
65
65
|
};
|
|
66
66
|
},
|
|
67
67
|
fromExtractedOperation(item) {
|
|
68
|
-
const pathItem =
|
|
68
|
+
const pathItem = dereference(document.paths?.[item.path]);
|
|
69
69
|
if (!pathItem) return;
|
|
70
70
|
const operation = pathItem?.[item.method];
|
|
71
71
|
if (!operation) return;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { OperationOutput, PageOutput, PagesBuilder, PagesBuilderConfig, WebhookOutput } from "./builder.js";
|
|
2
1
|
import { DistributiveOmit } from "../../types.js";
|
|
2
|
+
import { OperationOutput, PageOutput, PagesBuilder, PagesBuilderConfig, WebhookOutput } from "./builder.js";
|
|
3
3
|
//#region src/utils/pages/preset-auto.d.ts
|
|
4
4
|
interface OperationConfig extends BaseConfig {
|
|
5
5
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getTagDisplayName } from "../schema.js";
|
|
2
|
+
import { dereference } from "@fumadocs/json-schema";
|
|
2
3
|
import * as path$1 from "node:path";
|
|
3
|
-
import { dereferenceShallow } from "@fumadocs/api-docs/schema/dereference";
|
|
4
4
|
//#region src/utils/pages/preset-auto.ts
|
|
5
5
|
function createAutoPreset(options) {
|
|
6
6
|
if (options.per === "custom") return options;
|
|
@@ -22,7 +22,7 @@ function createAutoPreset(options) {
|
|
|
22
22
|
if (algorithm === "v2" && operation.operationId) return operation.operationId;
|
|
23
23
|
return path$1.join(this.routePathToFilePath(result.item.path), result.item.method.toLowerCase());
|
|
24
24
|
}
|
|
25
|
-
const hook =
|
|
25
|
+
const hook = dereference(this.document.webhooks[result.item.name])[result.item.method];
|
|
26
26
|
if (algorithm === "v2" && hook.operationId) return hook.operationId;
|
|
27
27
|
return slugify(result.item.name);
|
|
28
28
|
};
|
|
@@ -83,7 +83,7 @@ function createAutoPreset(options) {
|
|
|
83
83
|
break;
|
|
84
84
|
}
|
|
85
85
|
case "tag": {
|
|
86
|
-
const operation = entry.type === "operation" ?
|
|
86
|
+
const operation = entry.type === "operation" ? dereference(doc.paths?.[entry.item.path])?.[entry.item.method] : dereference(doc.webhooks?.[entry.item.name])?.[entry.item.method];
|
|
87
87
|
const tags = [];
|
|
88
88
|
for (const name of operation?.tags ?? []) {
|
|
89
89
|
const kind = docTags.get(name)?.kind;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { idToTitle } from "
|
|
2
|
-
import { dereferenceShallow } from "@fumadocs/api-docs/schema/dereference";
|
|
1
|
+
import { idToTitle } from "../../packages/shared-api/dist/utils/id-to-title.js";
|
|
3
2
|
import { createMagicProxy } from "@scalar/json-magic/magic-proxy";
|
|
3
|
+
import { dereference } from "@fumadocs/json-schema";
|
|
4
4
|
import Slugger from "github-slugger";
|
|
5
5
|
//#region src/utils/pages/to-static-data.ts
|
|
6
6
|
const proxyCache = /* @__PURE__ */ new WeakMap();
|
|
@@ -36,12 +36,12 @@ function toStaticData(page, doc) {
|
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
38
|
for (const item of page.operations ?? []) {
|
|
39
|
-
const operation =
|
|
39
|
+
const operation = dereference(proxied.paths?.[item.path])?.[item.method];
|
|
40
40
|
if (!operation) continue;
|
|
41
41
|
pathItem(operation, item.path);
|
|
42
42
|
}
|
|
43
43
|
for (const item of page.webhooks ?? []) {
|
|
44
|
-
const webhook =
|
|
44
|
+
const webhook = dereference(proxied.webhooks?.[item.name])?.[item.method];
|
|
45
45
|
if (!webhook) continue;
|
|
46
46
|
pathItem(webhook, item.name);
|
|
47
47
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { doubleQuote } from "../../requests/string-utils.js";
|
|
1
2
|
import { getPageProps } from "./builder.js";
|
|
2
3
|
import { toStaticData } from "./to-static-data.js";
|
|
3
|
-
import { doubleQuote } from "../../requests/string-utils.js";
|
|
4
4
|
import { stringify } from "yaml";
|
|
5
5
|
//#region src/utils/pages/to-text.ts
|
|
6
6
|
function toText(entry, doc, options = {}) {
|
|
@@ -61,13 +61,11 @@ function pageContent({ showTitle, showDescription, document, webhooks, operation
|
|
|
61
61
|
if (showTitle) propStrs.push(`showTitle`);
|
|
62
62
|
if (showDescription) propStrs.push(`showDescription`);
|
|
63
63
|
return `export default function Layout(props) {
|
|
64
|
-
const {
|
|
65
|
-
// "APIPage" is the old name from v10, this allows both for backward compatibility
|
|
66
|
-
const Comp = OpenAPIPage ?? APIPage;
|
|
64
|
+
const { OpenAPIPage } = props.components ?? {};
|
|
67
65
|
return (
|
|
68
66
|
<>
|
|
69
67
|
{props.children}
|
|
70
|
-
<
|
|
68
|
+
<OpenAPIPage ${propStrs.join(" ")} />
|
|
71
69
|
</>
|
|
72
70
|
);
|
|
73
71
|
}`;
|
package/dist/utils/schema.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { idToTitle } from "
|
|
2
|
-
import { dereferenceShallow } from "@fumadocs/api-docs/schema/dereference";
|
|
1
|
+
import { idToTitle } from "../packages/shared-api/dist/utils/id-to-title.js";
|
|
3
2
|
import { getRaw } from "@scalar/json-magic/magic-proxy";
|
|
3
|
+
import { dereference } from "@fumadocs/json-schema";
|
|
4
4
|
//#region src/utils/schema.ts
|
|
5
5
|
const methodKeys = [
|
|
6
6
|
"get",
|
|
@@ -23,16 +23,16 @@ function pickExample(value) {
|
|
|
23
23
|
if (value.example !== void 0) return getRaw(value.example);
|
|
24
24
|
if (value.content) {
|
|
25
25
|
const type = getPreferredType(value.content);
|
|
26
|
-
const content = type ?
|
|
26
|
+
const content = type ? dereference(value.content[type]) : void 0;
|
|
27
27
|
if (type && content) {
|
|
28
28
|
const example = value.examples?.[type];
|
|
29
|
-
const out = (example !== void 0 ? getRaw(
|
|
29
|
+
const out = (example !== void 0 ? getRaw(dereference(example).value) : void 0) ?? pickExample(content);
|
|
30
30
|
if (out !== void 0) return out;
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
if (value.examples) {
|
|
34
34
|
const examples = Object.values(value.examples);
|
|
35
|
-
if (examples.length > 0) return getRaw(
|
|
35
|
+
if (examples.length > 0) return getRaw(dereference(examples[0]).value);
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
//#endregion
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ServerObject } from "../types.js";
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
//#region src/utils/use-server.d.ts
|
|
4
|
+
export interface SelectedServer {
|
|
5
|
+
url: string;
|
|
6
|
+
name?: string;
|
|
7
|
+
variables: Record<string, string>;
|
|
8
|
+
}
|
|
9
|
+
interface ServerContextType {
|
|
10
|
+
servers?: ServerObject[];
|
|
11
|
+
server: SelectedServer | null;
|
|
12
|
+
/**
|
|
13
|
+
* The URL of `pathname` on the selected server, with the server variables resolved.
|
|
14
|
+
*
|
|
15
|
+
* It is resolved against the page origin, which also serves the request when no server is
|
|
16
|
+
* selected. On the server and during hydration the origin is unknown, so it is
|
|
17
|
+
* `https://example.com`.
|
|
18
|
+
*/
|
|
19
|
+
resolveUrl: (pathname?: string) => string;
|
|
20
|
+
setServer: (value: string) => void;
|
|
21
|
+
setServerVariables: (value: Record<string, string>) => void;
|
|
22
|
+
}
|
|
23
|
+
export declare function useServer(): ServerContextType;
|
|
24
|
+
//#endregion
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useServerStore } from "../packages/shared-api/dist/utils/use-server-store.js";
|
|
3
|
+
import { joinURL, resolveServerUrl } from "../packages/shared-api/dist/utils/url.js";
|
|
4
|
+
import { createContext, use, useCallback, useMemo, useSyncExternalStore } from "react";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
//#region src/utils/use-server.tsx
|
|
7
|
+
const ServerContext = createContext(null);
|
|
8
|
+
const keyOfServer = (server) => server.url;
|
|
9
|
+
const noop = () => () => {};
|
|
10
|
+
function useServer() {
|
|
11
|
+
const ctx = use(ServerContext);
|
|
12
|
+
if (!ctx) throw new Error("Component must be used under <OpenAPIProvider />");
|
|
13
|
+
return ctx;
|
|
14
|
+
}
|
|
15
|
+
function ServerProvider({ servers, storageKeyPrefix, children }) {
|
|
16
|
+
const resolve = useCallback((url) => {
|
|
17
|
+
const server = servers?.find((item) => item.url === url);
|
|
18
|
+
if (!server) return null;
|
|
19
|
+
return {
|
|
20
|
+
name: server.name,
|
|
21
|
+
url,
|
|
22
|
+
variables: getDefaultValues(server)
|
|
23
|
+
};
|
|
24
|
+
}, [servers]);
|
|
25
|
+
const store = useServerStore({
|
|
26
|
+
storageKey: `${storageKeyPrefix}server-url`,
|
|
27
|
+
keyOf: keyOfServer,
|
|
28
|
+
resolve,
|
|
29
|
+
defaultKey: servers?.[0]?.url
|
|
30
|
+
});
|
|
31
|
+
const { server } = store;
|
|
32
|
+
const isClient = useSyncExternalStore(noop, () => true, () => false);
|
|
33
|
+
const resolveUrl = useCallback((pathname = "") => {
|
|
34
|
+
const base = isClient ? new URL(server ? resolveServerUrl(server.url, server.variables) : "/", window.location.origin).href : "https://example.com";
|
|
35
|
+
return pathname ? joinURL(base, pathname) : base;
|
|
36
|
+
}, [server, isClient]);
|
|
37
|
+
return /* @__PURE__ */ jsx(ServerContext, {
|
|
38
|
+
value: useMemo(() => ({
|
|
39
|
+
servers,
|
|
40
|
+
resolveUrl,
|
|
41
|
+
...store
|
|
42
|
+
}), [
|
|
43
|
+
servers,
|
|
44
|
+
resolveUrl,
|
|
45
|
+
store
|
|
46
|
+
]),
|
|
47
|
+
children
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
function getDefaultValues(server) {
|
|
51
|
+
const out = {};
|
|
52
|
+
if (!server.variables) return out;
|
|
53
|
+
for (const [k, v] of Object.entries(server.variables)) if (v.default !== void 0) out[k] = String(v.default);
|
|
54
|
+
return out;
|
|
55
|
+
}
|
|
56
|
+
//#endregion
|
|
57
|
+
export { ServerProvider, useServer };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fumadocs-openapi",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "12.0.0",
|
|
4
4
|
"description": "Generate MDX docs for your OpenAPI spec",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Docs",
|
|
@@ -22,9 +22,15 @@
|
|
|
22
22
|
"./css/**/*.css"
|
|
23
23
|
],
|
|
24
24
|
"exports": {
|
|
25
|
-
".":
|
|
25
|
+
".": {
|
|
26
|
+
"types": "./dist/index.d.ts",
|
|
27
|
+
"browser": "./dist/index.browser.js",
|
|
28
|
+
"import": "./dist/index.js"
|
|
29
|
+
},
|
|
26
30
|
"./i18n": "./dist/i18n.js",
|
|
27
|
-
"./
|
|
31
|
+
"./operation": "./dist/operation.js",
|
|
32
|
+
"./playground": "./dist/playground/index.js",
|
|
33
|
+
"./requests": "./dist/requests/index.js",
|
|
28
34
|
"./requests/generators": "./dist/requests/generators/index.js",
|
|
29
35
|
"./requests/generators/all": "./dist/requests/generators/all.js",
|
|
30
36
|
"./requests/generators/csharp": "./dist/requests/generators/csharp.js",
|
|
@@ -34,11 +40,11 @@
|
|
|
34
40
|
"./requests/generators/javascript": "./dist/requests/generators/javascript.js",
|
|
35
41
|
"./requests/generators/python": "./dist/requests/generators/python.js",
|
|
36
42
|
"./requests/generators/rust": "./dist/requests/generators/rust.js",
|
|
37
|
-
"./scalar": "./dist/scalar/index.js",
|
|
38
43
|
"./server": "./dist/server/index.js",
|
|
39
44
|
"./ui": "./dist/ui/index.js",
|
|
40
45
|
"./ui/base": "./dist/ui/base.js",
|
|
41
|
-
"./ui/
|
|
46
|
+
"./ui/playground/client": "./dist/ui/playground/client.js",
|
|
47
|
+
"./ui/scalar": "./dist/ui/scalar/index.js",
|
|
42
48
|
"./package.json": "./package.json",
|
|
43
49
|
"./css/*": "./css/*"
|
|
44
50
|
},
|
|
@@ -46,36 +52,39 @@
|
|
|
46
52
|
"access": "public"
|
|
47
53
|
},
|
|
48
54
|
"dependencies": {
|
|
55
|
+
"@base-ui/react": "^1.8.0",
|
|
49
56
|
"@fuma-translate/react": "^1.0.2",
|
|
57
|
+
"@fumadocs/json-schema": "0.2.0",
|
|
50
58
|
"@fumari/json-schema-ts": "^1.0.2",
|
|
51
|
-
"@
|
|
59
|
+
"@fumari/stf": "1.1.1",
|
|
60
|
+
"@scalar/json-magic": "^0.13.5",
|
|
61
|
+
"@scalar/openapi-upgrader": "^0.2.16",
|
|
52
62
|
"chokidar": "^5.0.0",
|
|
53
63
|
"class-variance-authority": "^0.7.1",
|
|
54
|
-
"cn": "^0.
|
|
64
|
+
"cn": "^0.3.0",
|
|
55
65
|
"github-slugger": "^2.0.0",
|
|
56
66
|
"hast-util-to-jsx-runtime": "^2.3.6",
|
|
57
|
-
"lucide-react": "^1.
|
|
67
|
+
"lucide-react": "^1.47.0",
|
|
58
68
|
"remark": "^15.0.1",
|
|
59
69
|
"remark-rehype": "^11.1.2",
|
|
60
70
|
"shiki": "^4.4.3",
|
|
61
|
-
"yaml": "^2.9.
|
|
62
|
-
"@fumadocs/api-docs": "0.2.9",
|
|
63
|
-
"@fumari/stf": "1.1.1"
|
|
71
|
+
"yaml": "^2.9.1"
|
|
64
72
|
},
|
|
65
73
|
"devDependencies": {
|
|
66
|
-
"@scalar/api-client-react": "^2.0.
|
|
67
|
-
"@scalar/openapi-upgrader": "^0.2.15",
|
|
74
|
+
"@scalar/api-client-react": "^2.0.45",
|
|
68
75
|
"@tailwindcss/oxide": "^4.3.3",
|
|
69
|
-
"@types/node": "26.
|
|
70
|
-
"@types/react": "^19.
|
|
76
|
+
"@types/node": "26.6.1",
|
|
77
|
+
"@types/react": "^19.3.0",
|
|
78
|
+
"@types/react-dom": "^19.3.0",
|
|
71
79
|
"fast-content-type-parse": "^4.0.0",
|
|
72
80
|
"fuma-cli": "^0.1.1",
|
|
81
|
+
"fumadocs-core": "16.15.12",
|
|
82
|
+
"fumadocs-ui": "npm:@fumadocs/base-ui@16.15.12",
|
|
73
83
|
"json-schema-typed": "^8.0.2",
|
|
84
|
+
"shared-api": "0.2.10",
|
|
85
|
+
"tsconfig": "0.0.0",
|
|
74
86
|
"tsdown": "0.23.0",
|
|
75
|
-
"xml-js": "^1.6.11"
|
|
76
|
-
"fumadocs-core": "16.15.11",
|
|
77
|
-
"fumadocs-ui": "npm:@fumadocs/base-ui@16.15.11",
|
|
78
|
-
"tsconfig": "0.0.0"
|
|
87
|
+
"xml-js": "^1.6.11"
|
|
79
88
|
},
|
|
80
89
|
"peerDependencies": {
|
|
81
90
|
"@scalar/api-client-react": "^2.0.20",
|
|
@@ -98,7 +107,6 @@
|
|
|
98
107
|
}
|
|
99
108
|
},
|
|
100
109
|
"inlinedDependencies": {
|
|
101
|
-
"@scalar/openapi-upgrader": "0.2.15",
|
|
102
110
|
"fast-content-type-parse": "4.0.0",
|
|
103
111
|
"xml-js": "1.6.11"
|
|
104
112
|
},
|