fumadocs-openapi 10.0.0 → 10.0.1

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,3 +1,4 @@
1
+ import '@scalar/api-client-react/style.css';
1
2
  export default function ScalarPlayground({ path, method, spec, }: {
2
3
  spec: object;
3
4
  path: string;
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/scalar/client.tsx"],"names":[],"mappings":"AAYA,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,EACvC,IAAI,EACJ,MAAM,EACN,IAAI,GACL,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB,2CA+BA"}
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/scalar/client.tsx"],"names":[],"mappings":"AAWA,OAAO,oCAAoC,CAAC;AAE5C,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,EACvC,IAAI,EACJ,MAAM,EACN,IAAI,GACL,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB,2CA6BA"}
@@ -6,6 +6,7 @@ import { ApiClientModalProvider, useApiClientModal, } from '@scalar/api-client-r
6
6
  import { MethodLabel } from '../ui/components/method-label.js';
7
7
  import { useTheme } from 'next-themes';
8
8
  import { useEffect, useState } from 'react';
9
+ import '@scalar/api-client-react/style.css';
9
10
  export default function ScalarPlayground({ path, method, spec, }) {
10
11
  const { resolvedTheme } = useTheme();
11
12
  const [mounted, setMounted] = useState(false);
@@ -14,9 +15,7 @@ export default function ScalarPlayground({ path, method, spec, }) {
14
15
  }, []);
15
16
  return (_jsxs("div", { className: cn('flex flex-row items-center gap-2.5 p-3 rounded-xl border bg-fd-card text-fd-card-foreground not-prose', mounted ? `${resolvedTheme}-mode` : null), children: [_jsx(MethodLabel, { className: "text-xs", children: method }), _jsx("code", { className: "flex-1 overflow-auto text-nowrap text-[13px] text-fd-muted-foreground", children: path }), _jsx(ApiClientModalProvider, { configuration: {
16
17
  theme: 'moon',
17
- spec: {
18
- content: spec,
19
- },
18
+ content: spec,
20
19
  }, children: _jsx(Trigger, { path: path, method: method }) })] }));
21
20
  }
22
21
  function Trigger({ path, method }) {
@@ -1,12 +1,8 @@
1
- import type { MethodInformation, RenderContext } from '../types.js';
2
1
  import type { CreateAPIPageOptions } from '../ui/index.js';
3
- export declare function APIPlayground({ path, method, ctx, }: {
4
- path: string;
5
- method: MethodInformation;
6
- ctx: RenderContext;
7
- }): import("react/jsx-runtime").JSX.Element;
8
2
  /**
9
3
  * Enable Scalar for API playgrounds by wrapping your options inside.
4
+ *
5
+ * Requires `@scalar/api-client-react` to be installed, it imports the styles automatically.
10
6
  */
11
7
  export declare function withScalar(options?: CreateAPIPageOptions): CreateAPIPageOptions;
12
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/scalar/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAChE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,MAAM,CAAC;AAKjD,wBAAgB,aAAa,CAAC,EAC5B,IAAI,EACJ,MAAM,EACN,GAAG,GACJ,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,iBAAiB,CAAC;IAC1B,GAAG,EAAE,aAAa,CAAC;CACpB,2CAIA;AAED;;GAEG;AACH,wBAAgB,UAAU,CACxB,OAAO,GAAE,oBAAyB,GACjC,oBAAoB,CAUtB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/scalar/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,MAAM,CAAC;AAmBjD;;;;GAIG;AACH,wBAAgB,UAAU,CACxB,OAAO,GAAE,oBAAyB,GACjC,oBAAoB,CAUtB"}
@@ -1,11 +1,13 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { lazy } from 'react';
3
3
  const Client = lazy(() => import('./client.js'));
4
- export function APIPlayground({ path, method, ctx, }) {
4
+ function APIPlayground({ path, method, ctx, }) {
5
5
  return (_jsx(Client, { method: method.method, path: path, spec: ctx.schema.bundled }));
6
6
  }
7
7
  /**
8
8
  * Enable Scalar for API playgrounds by wrapping your options inside.
9
+ *
10
+ * Requires `@scalar/api-client-react` to be installed, it imports the styles automatically.
9
11
  */
10
12
  export function withScalar(options = {}) {
11
13
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fumadocs-openapi",
3
- "version": "10.0.0",
3
+ "version": "10.0.1",
4
4
  "description": "Generate MDX docs for your OpenAPI spec",
5
5
  "keywords": [
6
6
  "NextJs",
@@ -69,8 +69,8 @@
69
69
  "remark-rehype": "^11.1.2",
70
70
  "tinyglobby": "^0.2.15",
71
71
  "xml-js": "^1.6.11",
72
- "fumadocs-core": "16.0.8",
73
- "fumadocs-ui": "16.0.8"
72
+ "fumadocs-ui": "16.0.8",
73
+ "fumadocs-core": "16.0.8"
74
74
  },
75
75
  "devDependencies": {
76
76
  "@scalar/api-client-react": "^1.3.48",
@@ -82,8 +82,8 @@
82
82
  "openapi-types": "^12.1.3",
83
83
  "tailwindcss": "^4.1.16",
84
84
  "tsc-alias": "^1.8.16",
85
- "eslint-config-custom": "0.0.0",
86
- "tsconfig": "0.0.0"
85
+ "tsconfig": "0.0.0",
86
+ "eslint-config-custom": "0.0.0"
87
87
  },
88
88
  "peerDependencies": {
89
89
  "@scalar/api-client-react": "*",