fumadocs-openapi 12.2.0 → 12.3.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.
Files changed (27) hide show
  1. package/css/generated/shared.css +1 -1
  2. package/dist/.translations/index.d.ts +1 -3
  3. package/dist/.translations/keys.js +1 -3
  4. package/dist/packages/shared-api/dist/.translations/index.d.ts +1 -0
  5. package/dist/packages/shared-api/dist/.translations/keys.js +1 -0
  6. package/dist/packages/shared-api/dist/auto-anchor/index.js +54 -10
  7. package/dist/packages/shared-api/dist/components/accordion.js +3 -11
  8. package/dist/packages/shared-api/dist/components/collapsible.js +16 -0
  9. package/dist/packages/shared-api/dist/components/schema/client.d.ts +5 -0
  10. package/dist/packages/shared-api/dist/components/schema/client.js +408 -455
  11. package/dist/packages/shared-api/dist/components/select-tab.js +7 -12
  12. package/dist/ui/components/dialog.js +14 -0
  13. package/dist/ui/components/endpoint.js +11 -8
  14. package/dist/ui/components/heading.js +1 -1
  15. package/dist/ui/components/schema.js +1 -1
  16. package/dist/ui/{playground/components → components}/segmented.js +2 -2
  17. package/dist/ui/operation/index.js +261 -236
  18. package/dist/ui/playground/client.js +5 -4
  19. package/dist/ui/playground/components/fields.js +1 -1
  20. package/dist/ui/playground/components/request-panel.js +1 -1
  21. package/dist/ui/playground/components/response-panel.js +1 -1
  22. package/dist/ui/playground/components/result-display.js +1 -1
  23. package/dist/ui/playground/components/server-select.js +1 -1
  24. package/package.json +5 -5
  25. package/dist/packages/shared-api/dist/auto-anchor/client.js +0 -20
  26. package/dist/packages/shared-api/dist/components/popover.js +0 -23
  27. package/dist/packages/shared-api/dist/utils/merge-refs.js +0 -11
@@ -3,7 +3,7 @@ import { usePlaygroundAuth } from "../../../playground/auth.js";
3
3
  import { useOperation } from "../../../operation.js";
4
4
  import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "../../../packages/shared-api/dist/components/select.js";
5
5
  import { cn } from "../../../utils/cn.js";
6
- import { Segmented, SegmentedList } from "./segmented.js";
6
+ import { Segmented, SegmentedList } from "../../components/segmented.js";
7
7
  import { anyFields, useResolvedSchema, useSchemaUtils } from "../../../packages/shared-api/dist/components/playground/schema.js";
8
8
  import { Spinner } from "../../../packages/shared-api/dist/components/spinner.js";
9
9
  import { FieldRow, FieldRows, LinkRow, ValueRow, getNestedFields, getRemoval, resolveField } from "./fields.js";
@@ -4,7 +4,7 @@ import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from ".
4
4
  import { Markdown } from "../../components/markdown.js";
5
5
  import { ClientCodeBlock } from "../../components/codeblock.js";
6
6
  import { cn } from "../../../utils/cn.js";
7
- import { Segmented, SegmentedList, SegmentedPanel } from "./segmented.js";
7
+ import { Segmented, SegmentedList, SegmentedPanel } from "../../components/segmented.js";
8
8
  import { DefaultResultDisplay, PanelHeader, panelCodeBlock } from "./result-display.js";
9
9
  import { Spinner } from "../../../packages/shared-api/dist/components/spinner.js";
10
10
  import { useState } from "react";
@@ -2,7 +2,7 @@
2
2
  import { ClientCodeBlock } from "../../components/codeblock.js";
3
3
  import { cn } from "../../../utils/cn.js";
4
4
  import { useStatusInfo } from "../status-info.js";
5
- import { Segmented, SegmentedList, SegmentedPanel } from "./segmented.js";
5
+ import { Segmented, SegmentedList, SegmentedPanel } from "../../components/segmented.js";
6
6
  import { Fragment, useCallback, useMemo, useState } from "react";
7
7
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
8
8
  import { useTranslations } from "@fuma-translate/react";
@@ -6,8 +6,8 @@ import { useRef, useState } from "react";
6
6
  import { jsx, jsxs } from "react/jsx-runtime";
7
7
  import { StfProvider, useFieldValue, useListener, useStf } from "@fumari/stf";
8
8
  import { useTranslations } from "@fuma-translate/react";
9
- import { Popover } from "@base-ui/react/popover";
10
9
  import { Check, ChevronDown } from "lucide-react";
10
+ import { Popover } from "@base-ui/react/popover";
11
11
  //#region src/ui/playground/components/server-select.tsx
12
12
  /** the base URL of requests, selects the server and edits its variables */
13
13
  function ServerSelect({ className }) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fumadocs-openapi",
3
- "version": "12.2.0",
3
+ "version": "12.3.0",
4
4
  "description": "Generate MDX docs for your OpenAPI spec",
5
5
  "keywords": [
6
6
  "Docs",
@@ -54,7 +54,7 @@
54
54
  "dependencies": {
55
55
  "@base-ui/react": "^1.8.0",
56
56
  "@fuma-translate/react": "^1.0.2",
57
- "@fumadocs/json-schema": "0.2.0",
57
+ "@fumadocs/json-schema": "0.3.0",
58
58
  "@fumari/json-schema-ts": "^1.0.2",
59
59
  "@fumari/stf": "1.1.1",
60
60
  "@scalar/json-magic": "^0.15.4",
@@ -78,10 +78,10 @@
78
78
  "@types/react-dom": "^19.3.0",
79
79
  "fast-content-type-parse": "^4.0.0",
80
80
  "fuma-cli": "^0.3.1",
81
- "fumadocs-core": "16.16.0",
82
- "fumadocs-ui": "npm:@fumadocs/base-ui@16.16.0",
81
+ "fumadocs-core": "16.16.1",
82
+ "fumadocs-ui": "npm:@fumadocs/base-ui@16.16.1",
83
83
  "json-schema-typed": "^8.0.2",
84
- "shared-api": "0.2.10",
84
+ "shared-api": "0.2.11",
85
85
  "tsconfig": "0.0.0",
86
86
  "tsdown": "0.23.0",
87
87
  "xml-js": "^1.6.11"
@@ -1,20 +0,0 @@
1
- "use client";
2
- import { anchorSegments } from "./index.js";
3
- import { createContext, use, useMemo } from "react";
4
- import { jsx } from "react/jsx-runtime";
5
- //#region ../shared-api/dist/auto-anchor/client.js
6
- const AnchorContext = createContext([]);
7
- /** Append segment to anchor IDs */
8
- function AnchorSection({ segments, children }) {
9
- const v = use(AnchorContext);
10
- return /* @__PURE__ */ jsx(AnchorContext, {
11
- value: useMemo(() => [...v, ...segments], [v, segments]),
12
- children
13
- });
14
- }
15
- function useAnchorId(segments) {
16
- if (!segments) return null;
17
- return anchorSegments(...use(AnchorContext), ...segments);
18
- }
19
- //#endregion
20
- export { AnchorSection, useAnchorId };
@@ -1,23 +0,0 @@
1
- "use client";
2
- import { cn } from "../utils/cn.js";
3
- import "react";
4
- import { jsx } from "react/jsx-runtime";
5
- import { Popover } from "@base-ui/react/popover";
6
- //#region ../shared-api/dist/components/popover.js
7
- const Popover$1 = Popover.Root;
8
- const PopoverTrigger = Popover.Trigger;
9
- function PopoverContent({ className, align = "center", sideOffset = 4, ...props }) {
10
- return /* @__PURE__ */ jsx(Popover.Portal, { children: /* @__PURE__ */ jsx(Popover.Positioner, {
11
- align,
12
- side: "bottom",
13
- sideOffset,
14
- className: "z-50",
15
- children: /* @__PURE__ */ jsx(Popover.Popup, {
16
- className: (s) => cn("z-50 origin-(--transform-origin) overflow-y-auto max-h-(--available-height) min-w-[240px] max-w-[98vw] rounded-xl border bg-fd-popover/60 backdrop-blur-lg p-2 text-sm text-fd-popover-foreground shadow-lg focus-visible:outline-none data-[closed]:animate-fd-popover-out data-[open]:animate-fd-popover-in", typeof className === "function" ? className(s) : className),
17
- ...props
18
- })
19
- }) });
20
- }
21
- Popover.Close;
22
- //#endregion
23
- export { Popover$1 as Popover, PopoverContent, PopoverTrigger };
@@ -1,11 +0,0 @@
1
- //#region ../shared-api/dist/utils/merge-refs.js
2
- function mergeRefs(...refs) {
3
- return (value) => {
4
- refs.forEach((ref) => {
5
- if (typeof ref === "function") ref(value);
6
- else if (ref != null) ref.current = value;
7
- });
8
- };
9
- }
10
- //#endregion
11
- export { mergeRefs };