fumadocs-openapi 10.2.1 → 10.2.3

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 (278) hide show
  1. package/dist/generate-file.d.ts +53 -49
  2. package/dist/generate-file.d.ts.map +1 -1
  3. package/dist/generate-file.js +88 -102
  4. package/dist/generate-file.js.map +1 -0
  5. package/dist/index.d.ts +6 -6
  6. package/dist/index.js +3 -1
  7. package/dist/playground/client.d.ts +88 -72
  8. package/dist/playground/client.d.ts.map +1 -1
  9. package/dist/playground/client.js +446 -296
  10. package/dist/playground/client.js.map +1 -0
  11. package/dist/playground/components/inputs.js +395 -172
  12. package/dist/playground/components/inputs.js.map +1 -0
  13. package/dist/playground/components/oauth-dialog.js +270 -174
  14. package/dist/playground/components/oauth-dialog.js.map +1 -0
  15. package/dist/playground/components/server-select.js +115 -55
  16. package/dist/playground/components/server-select.js.map +1 -0
  17. package/dist/playground/fetcher.d.ts +10 -18
  18. package/dist/playground/fetcher.d.ts.map +1 -1
  19. package/dist/playground/fetcher.js +67 -75
  20. package/dist/playground/fetcher.js.map +1 -0
  21. package/dist/playground/get-default-values.js +23 -26
  22. package/dist/playground/get-default-values.js.map +1 -0
  23. package/dist/playground/index.d.ts +23 -13
  24. package/dist/playground/index.d.ts.map +1 -1
  25. package/dist/playground/index.js +87 -91
  26. package/dist/playground/index.js.map +1 -0
  27. package/dist/playground/lazy.js +9 -2
  28. package/dist/playground/lazy.js.map +1 -0
  29. package/dist/playground/schema.d.ts +18 -55
  30. package/dist/playground/schema.d.ts.map +1 -1
  31. package/dist/playground/schema.js +117 -106
  32. package/dist/playground/schema.js.map +1 -0
  33. package/dist/playground/status-info.js +49 -37
  34. package/dist/playground/status-info.js.map +1 -0
  35. package/dist/requests/generators/csharp.js +40 -50
  36. package/dist/requests/generators/csharp.js.map +1 -0
  37. package/dist/requests/generators/curl.js +28 -27
  38. package/dist/requests/generators/curl.js.map +1 -0
  39. package/dist/requests/generators/go.js +39 -35
  40. package/dist/requests/generators/go.js.map +1 -0
  41. package/dist/requests/generators/index.js +49 -43
  42. package/dist/requests/generators/index.js.map +1 -0
  43. package/dist/requests/generators/java.js +56 -67
  44. package/dist/requests/generators/java.js.map +1 -0
  45. package/dist/requests/generators/javascript.js +38 -45
  46. package/dist/requests/generators/javascript.js.map +1 -0
  47. package/dist/requests/generators/python.js +33 -37
  48. package/dist/requests/generators/python.js.map +1 -0
  49. package/dist/requests/media/adapter.d.ts +38 -84
  50. package/dist/requests/media/adapter.d.ts.map +1 -1
  51. package/dist/requests/media/adapter.js +122 -169
  52. package/dist/requests/media/adapter.js.map +1 -0
  53. package/dist/requests/media/encode.d.ts +12 -7
  54. package/dist/requests/media/encode.d.ts.map +1 -1
  55. package/dist/requests/media/encode.js +129 -109
  56. package/dist/requests/media/encode.js.map +1 -0
  57. package/dist/requests/media/resolve-adapter.js +28 -28
  58. package/dist/requests/media/resolve-adapter.js.map +1 -0
  59. package/dist/requests/string-utils.js +28 -35
  60. package/dist/requests/string-utils.js.map +1 -0
  61. package/dist/requests/to-python-object.js +16 -28
  62. package/dist/requests/to-python-object.js.map +1 -0
  63. package/dist/requests/types.d.ts +25 -21
  64. package/dist/requests/types.d.ts.map +1 -1
  65. package/dist/scalar/client.js +57 -20
  66. package/dist/scalar/client.js.map +1 -0
  67. package/dist/scalar/index.d.ts +8 -2
  68. package/dist/scalar/index.d.ts.map +1 -1
  69. package/dist/scalar/index.js +29 -19
  70. package/dist/scalar/index.js.map +1 -0
  71. package/dist/server/create.d.ts +29 -25
  72. package/dist/server/create.d.ts.map +1 -1
  73. package/dist/server/create.js +42 -39
  74. package/dist/server/create.js.map +1 -0
  75. package/dist/server/index.d.ts +3 -3
  76. package/dist/server/index.js +4 -2
  77. package/dist/server/proxy.d.ts +28 -28
  78. package/dist/server/proxy.d.ts.map +1 -1
  79. package/dist/server/proxy.js +58 -75
  80. package/dist/server/proxy.js.map +1 -0
  81. package/dist/server/source-api.d.ts +32 -25
  82. package/dist/server/source-api.d.ts.map +1 -1
  83. package/dist/server/source-api.js +82 -69
  84. package/dist/server/source-api.js.map +1 -0
  85. package/dist/types.d.ts +41 -36
  86. package/dist/types.d.ts.map +1 -1
  87. package/dist/ui/api-page.d.ts +140 -136
  88. package/dist/ui/api-page.d.ts.map +1 -1
  89. package/dist/ui/api-page.js +134 -118
  90. package/dist/ui/api-page.js.map +1 -0
  91. package/dist/ui/client/index.d.ts +30 -26
  92. package/dist/ui/client/index.d.ts.map +1 -1
  93. package/dist/ui/client/index.js +8 -2
  94. package/dist/ui/client/index.js.map +1 -0
  95. package/dist/ui/client/storage-key.js +16 -10
  96. package/dist/ui/client/storage-key.js.map +1 -0
  97. package/dist/ui/components/accordion.js +40 -14
  98. package/dist/ui/components/accordion.js.map +1 -0
  99. package/dist/ui/components/dialog.js +51 -15
  100. package/dist/ui/components/dialog.js.map +1 -0
  101. package/dist/ui/components/input.js +18 -8
  102. package/dist/ui/components/input.js.map +1 -0
  103. package/dist/ui/components/method-label.js +38 -33
  104. package/dist/ui/components/method-label.js.map +1 -0
  105. package/dist/ui/components/select.js +66 -15
  106. package/dist/ui/components/select.js.map +1 -0
  107. package/dist/ui/contexts/api.js +96 -85
  108. package/dist/ui/contexts/api.js.map +1 -0
  109. package/dist/ui/contexts/api.lazy.js +9 -2
  110. package/dist/ui/contexts/api.lazy.js.map +1 -0
  111. package/dist/ui/index.d.ts +2 -2
  112. package/dist/ui/index.js +3 -1
  113. package/dist/ui/operation/client.js +65 -27
  114. package/dist/ui/operation/client.js.map +1 -0
  115. package/dist/ui/operation/index.js +403 -186
  116. package/dist/ui/operation/index.js.map +1 -0
  117. package/dist/ui/operation/request-tabs.d.ts +15 -16
  118. package/dist/ui/operation/request-tabs.d.ts.map +1 -1
  119. package/dist/ui/operation/request-tabs.js +151 -131
  120. package/dist/ui/operation/request-tabs.js.map +1 -0
  121. package/dist/ui/operation/response-tabs.d.ts +27 -28
  122. package/dist/ui/operation/response-tabs.d.ts.map +1 -1
  123. package/dist/ui/operation/response-tabs.js +73 -56
  124. package/dist/ui/operation/response-tabs.js.map +1 -0
  125. package/dist/ui/operation/usage-tabs/client.js +117 -88
  126. package/dist/ui/operation/usage-tabs/client.js.map +1 -0
  127. package/dist/ui/operation/usage-tabs/index.d.ts +22 -21
  128. package/dist/ui/operation/usage-tabs/index.d.ts.map +1 -1
  129. package/dist/ui/operation/usage-tabs/index.js +63 -48
  130. package/dist/ui/operation/usage-tabs/index.js.map +1 -0
  131. package/dist/ui/operation/usage-tabs/lazy.js +11 -4
  132. package/dist/ui/operation/usage-tabs/lazy.js.map +1 -0
  133. package/dist/ui/schema/client.d.ts +11 -7
  134. package/dist/ui/schema/client.d.ts.map +1 -1
  135. package/dist/ui/schema/client.js +213 -127
  136. package/dist/ui/schema/client.js.map +1 -0
  137. package/dist/ui/schema/index.d.ts +51 -50
  138. package/dist/ui/schema/index.d.ts.map +1 -1
  139. package/dist/ui/schema/index.js +225 -248
  140. package/dist/ui/schema/index.js.map +1 -0
  141. package/dist/ui/schema/lazy.js +9 -2
  142. package/dist/ui/schema/lazy.js.map +1 -0
  143. package/dist/utils/cn.js +3 -1
  144. package/dist/utils/deep-equal.js +18 -26
  145. package/dist/utils/deep-equal.js.map +1 -0
  146. package/dist/utils/get-typescript-schema.js +21 -19
  147. package/dist/utils/get-typescript-schema.js.map +1 -0
  148. package/dist/utils/id-to-title.js +13 -16
  149. package/dist/utils/id-to-title.js.map +1 -0
  150. package/dist/utils/lazy.js +13 -11
  151. package/dist/utils/lazy.js.map +1 -0
  152. package/dist/utils/merge-schema.js +130 -174
  153. package/dist/utils/merge-schema.js.map +1 -0
  154. package/dist/utils/pages/builder.d.ts +80 -76
  155. package/dist/utils/pages/builder.d.ts.map +1 -1
  156. package/dist/utils/pages/builder.js +101 -118
  157. package/dist/utils/pages/builder.js.map +1 -0
  158. package/dist/utils/pages/preset-auto.d.ts +58 -55
  159. package/dist/utils/pages/preset-auto.d.ts.map +1 -1
  160. package/dist/utils/pages/preset-auto.js +124 -137
  161. package/dist/utils/pages/preset-auto.js.map +1 -0
  162. package/dist/utils/pages/to-body.js +21 -18
  163. package/dist/utils/pages/to-body.js.map +1 -0
  164. package/dist/utils/pages/to-static-data.js +48 -40
  165. package/dist/utils/pages/to-static-data.js.map +1 -0
  166. package/dist/utils/pages/to-text.d.ts +43 -41
  167. package/dist/utils/pages/to-text.d.ts.map +1 -1
  168. package/dist/utils/pages/to-text.js +93 -126
  169. package/dist/utils/pages/to-text.js.map +1 -0
  170. package/dist/utils/process-document.d.ts +18 -19
  171. package/dist/utils/process-document.d.ts.map +1 -1
  172. package/dist/utils/process-document.js +43 -54
  173. package/dist/utils/process-document.js.map +1 -0
  174. package/dist/utils/remove-undefined.js +18 -18
  175. package/dist/utils/remove-undefined.js.map +1 -0
  176. package/dist/utils/schema-to-string.js +46 -64
  177. package/dist/utils/schema-to-string.js.map +1 -0
  178. package/dist/utils/schema.d.ts +11 -27
  179. package/dist/utils/schema.d.ts.map +1 -1
  180. package/dist/utils/schema.js +43 -44
  181. package/dist/utils/schema.js.map +1 -0
  182. package/dist/utils/url.js +35 -56
  183. package/dist/utils/url.js.map +1 -0
  184. package/dist/utils/use-query.js +39 -33
  185. package/dist/utils/use-query.js.map +1 -0
  186. package/package.json +35 -34
  187. package/dist/index.d.ts.map +0 -1
  188. package/dist/playground/components/inputs.d.ts +0 -25
  189. package/dist/playground/components/inputs.d.ts.map +0 -1
  190. package/dist/playground/components/oauth-dialog.d.ts +0 -13
  191. package/dist/playground/components/oauth-dialog.d.ts.map +0 -1
  192. package/dist/playground/components/server-select.d.ts +0 -3
  193. package/dist/playground/components/server-select.d.ts.map +0 -1
  194. package/dist/playground/get-default-values.d.ts +0 -3
  195. package/dist/playground/get-default-values.d.ts.map +0 -1
  196. package/dist/playground/lazy.d.ts +0 -2
  197. package/dist/playground/lazy.d.ts.map +0 -1
  198. package/dist/playground/status-info.d.ts +0 -8
  199. package/dist/playground/status-info.d.ts.map +0 -1
  200. package/dist/requests/generators/csharp.d.ts +0 -3
  201. package/dist/requests/generators/csharp.d.ts.map +0 -1
  202. package/dist/requests/generators/curl.d.ts +0 -3
  203. package/dist/requests/generators/curl.d.ts.map +0 -1
  204. package/dist/requests/generators/go.d.ts +0 -3
  205. package/dist/requests/generators/go.d.ts.map +0 -1
  206. package/dist/requests/generators/index.d.ts +0 -3
  207. package/dist/requests/generators/index.d.ts.map +0 -1
  208. package/dist/requests/generators/java.d.ts +0 -3
  209. package/dist/requests/generators/java.d.ts.map +0 -1
  210. package/dist/requests/generators/javascript.d.ts +0 -3
  211. package/dist/requests/generators/javascript.d.ts.map +0 -1
  212. package/dist/requests/generators/python.d.ts +0 -3
  213. package/dist/requests/generators/python.d.ts.map +0 -1
  214. package/dist/requests/media/resolve-adapter.d.ts +0 -19
  215. package/dist/requests/media/resolve-adapter.d.ts.map +0 -1
  216. package/dist/requests/string-utils.d.ts +0 -7
  217. package/dist/requests/string-utils.d.ts.map +0 -1
  218. package/dist/requests/to-python-object.d.ts +0 -2
  219. package/dist/requests/to-python-object.d.ts.map +0 -1
  220. package/dist/requests/types.js +0 -1
  221. package/dist/scalar/client.d.ts +0 -7
  222. package/dist/scalar/client.d.ts.map +0 -1
  223. package/dist/server/index.d.ts.map +0 -1
  224. package/dist/types.js +0 -1
  225. package/dist/ui/client/storage-key.d.ts +0 -9
  226. package/dist/ui/client/storage-key.d.ts.map +0 -1
  227. package/dist/ui/components/accordion.d.ts +0 -8
  228. package/dist/ui/components/accordion.d.ts.map +0 -1
  229. package/dist/ui/components/dialog.d.ts +0 -20
  230. package/dist/ui/components/dialog.d.ts.map +0 -1
  231. package/dist/ui/components/input.d.ts +0 -6
  232. package/dist/ui/components/input.d.ts.map +0 -1
  233. package/dist/ui/components/method-label.d.ts +0 -10
  234. package/dist/ui/components/method-label.d.ts.map +0 -1
  235. package/dist/ui/components/select.d.ts +0 -14
  236. package/dist/ui/components/select.d.ts.map +0 -1
  237. package/dist/ui/contexts/api.d.ts +0 -33
  238. package/dist/ui/contexts/api.d.ts.map +0 -1
  239. package/dist/ui/contexts/api.lazy.d.ts +0 -2
  240. package/dist/ui/contexts/api.lazy.d.ts.map +0 -1
  241. package/dist/ui/icons.d.ts +0 -49
  242. package/dist/ui/icons.d.ts.map +0 -1
  243. package/dist/ui/icons.js +0 -281
  244. package/dist/ui/index.d.ts.map +0 -1
  245. package/dist/ui/operation/client.d.ts +0 -19
  246. package/dist/ui/operation/client.d.ts.map +0 -1
  247. package/dist/ui/operation/index.d.ts +0 -12
  248. package/dist/ui/operation/index.d.ts.map +0 -1
  249. package/dist/ui/operation/usage-tabs/client.d.ts +0 -23
  250. package/dist/ui/operation/usage-tabs/client.d.ts.map +0 -1
  251. package/dist/ui/operation/usage-tabs/lazy.d.ts +0 -4
  252. package/dist/ui/operation/usage-tabs/lazy.d.ts.map +0 -1
  253. package/dist/ui/schema/lazy.d.ts +0 -2
  254. package/dist/ui/schema/lazy.d.ts.map +0 -1
  255. package/dist/utils/cn.d.ts +0 -2
  256. package/dist/utils/cn.d.ts.map +0 -1
  257. package/dist/utils/deep-equal.d.ts +0 -2
  258. package/dist/utils/deep-equal.d.ts.map +0 -1
  259. package/dist/utils/get-typescript-schema.d.ts +0 -4
  260. package/dist/utils/get-typescript-schema.d.ts.map +0 -1
  261. package/dist/utils/id-to-title.d.ts +0 -2
  262. package/dist/utils/id-to-title.d.ts.map +0 -1
  263. package/dist/utils/lazy.d.ts +0 -5
  264. package/dist/utils/lazy.d.ts.map +0 -1
  265. package/dist/utils/merge-schema.d.ts +0 -7
  266. package/dist/utils/merge-schema.d.ts.map +0 -1
  267. package/dist/utils/pages/to-body.d.ts +0 -4
  268. package/dist/utils/pages/to-body.d.ts.map +0 -1
  269. package/dist/utils/pages/to-static-data.d.ts +0 -10
  270. package/dist/utils/pages/to-static-data.d.ts.map +0 -1
  271. package/dist/utils/remove-undefined.d.ts +0 -2
  272. package/dist/utils/remove-undefined.d.ts.map +0 -1
  273. package/dist/utils/schema-to-string.d.ts +0 -8
  274. package/dist/utils/schema-to-string.d.ts.map +0 -1
  275. package/dist/utils/url.d.ts +0 -11
  276. package/dist/utils/url.d.ts.map +0 -1
  277. package/dist/utils/use-query.d.ts +0 -8
  278. package/dist/utils/use-query.d.ts.map +0 -1
@@ -1,50 +1,49 @@
1
- import { idToTitle } from '../utils/id-to-title.js';
2
- export const methodKeys = [
3
- 'get',
4
- 'post',
5
- 'patch',
6
- 'delete',
7
- 'head',
8
- 'put',
1
+ import { idToTitle } from "./id-to-title.js";
2
+
3
+ //#region src/utils/schema.ts
4
+ const methodKeys = [
5
+ "get",
6
+ "post",
7
+ "patch",
8
+ "delete",
9
+ "head",
10
+ "put"
9
11
  ];
10
- export function getPreferredType(body) {
11
- if ('application/json' in body)
12
- return 'application/json';
13
- return Object.keys(body)[0];
12
+ function getPreferredType(body) {
13
+ if ("application/json" in body) return "application/json";
14
+ return Object.keys(body)[0];
14
15
  }
15
- export function getTagDisplayName(tag) {
16
- return 'x-displayName' in tag && typeof tag['x-displayName'] === 'string'
17
- ? tag['x-displayName']
18
- : idToTitle(tag.name);
16
+ function getTagDisplayName(tag) {
17
+ return "x-displayName" in tag && typeof tag["x-displayName"] === "string" ? tag["x-displayName"] : idToTitle(tag.name);
19
18
  }
20
19
  /**
21
- * Summarize method endpoint information
22
- */
23
- export function createMethod(method, path, operation) {
24
- return {
25
- description: path.description,
26
- summary: path.summary,
27
- ...operation,
28
- parameters: [...(operation.parameters ?? []), ...(path.parameters ?? [])],
29
- method: method.toUpperCase(),
30
- };
20
+ * Summarize method endpoint information
21
+ */
22
+ function createMethod(method, path, operation) {
23
+ return {
24
+ description: path.description,
25
+ summary: path.summary,
26
+ ...operation,
27
+ parameters: [...operation.parameters ?? [], ...path.parameters ?? []],
28
+ method: method.toUpperCase()
29
+ };
31
30
  }
32
- export function pickExample(value) {
33
- if (value.example !== undefined) {
34
- return value.example;
35
- }
36
- if (value.content) {
37
- const type = getPreferredType(value.content);
38
- const content = type ? value.content[type] : undefined;
39
- if (type && content) {
40
- const out = value.examples?.[type].value ?? pickExample(content);
41
- if (out !== undefined)
42
- return out;
43
- }
44
- }
45
- if (value.examples) {
46
- const examples = Object.values(value.examples);
47
- if (examples.length > 0)
48
- return examples[0].value;
49
- }
31
+ function pickExample(value) {
32
+ if (value.example !== void 0) return value.example;
33
+ if (value.content) {
34
+ const type = getPreferredType(value.content);
35
+ const content = type ? value.content[type] : void 0;
36
+ if (type && content) {
37
+ const out = value.examples?.[type].value ?? pickExample(content);
38
+ if (out !== void 0) return out;
39
+ }
40
+ }
41
+ if (value.examples) {
42
+ const examples = Object.values(value.examples);
43
+ if (examples.length > 0) return examples[0].value;
44
+ }
50
45
  }
46
+
47
+ //#endregion
48
+ export { createMethod, getPreferredType, getTagDisplayName, methodKeys, pickExample };
49
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","names":[],"sources":["../../src/utils/schema.ts"],"sourcesContent":["import type { JSONSchema } from 'json-schema-typed/draft-2020-12';\nimport type {\n MethodInformation,\n OperationObject,\n PathItemObject,\n ReferenceObject,\n TagObject,\n} from '@/types';\nimport { idToTitle } from '@/utils/id-to-title';\nimport { OpenAPIV3_1 } from 'openapi-types';\n\nexport const methodKeys = ['get', 'post', 'patch', 'delete', 'head', 'put'] as const;\n\nexport type NoReference<T> = T extends (infer I)[]\n ? NoReference<I>[]\n : T extends ReferenceObject\n ? Exclude<T, ReferenceObject>\n : T extends object\n ? {\n [K in keyof T]: NoReference<T[K]>;\n }\n : T;\n\ntype NoReferenceJSONSchema<T> = T extends (infer I)[]\n ? NoReference<I>[]\n : T extends { $ref?: string }\n ? Omit<T, '$ref'>\n : T;\n\nexport type ParsedSchema = JSONSchema;\nexport type ResolvedSchema = NoReferenceJSONSchema<ParsedSchema>;\n\nexport function getPreferredType(body: Record<string, unknown>): string | undefined {\n if ('application/json' in body) return 'application/json';\n\n return Object.keys(body)[0];\n}\n\nexport function getTagDisplayName(tag: TagObject): string {\n return 'x-displayName' in tag && typeof tag['x-displayName'] === 'string'\n ? tag['x-displayName']\n : idToTitle(tag.name);\n}\n\n/**\n * Summarize method endpoint information\n */\nexport function createMethod(\n method: string,\n path: NoReference<PathItemObject>,\n operation: NoReference<OperationObject>,\n): MethodInformation {\n return {\n description: path.description,\n summary: path.summary,\n ...operation,\n parameters: [...(operation.parameters ?? []), ...(path.parameters ?? [])],\n method: method.toUpperCase(),\n };\n}\n\ninterface ExampleLike {\n example?: unknown;\n examples?: {\n [media: string]: OpenAPIV3_1.ExampleObject;\n };\n content?: {\n [media: string]: OpenAPIV3_1.MediaTypeObject;\n };\n}\n\nexport function pickExample(value: ExampleLike): unknown | undefined {\n if (value.example !== undefined) {\n return value.example;\n }\n\n if (value.content) {\n const type = getPreferredType(value.content);\n const content = type ? value.content[type] : undefined;\n\n if (type && content) {\n const out = value.examples?.[type].value ?? pickExample(content);\n if (out !== undefined) return out;\n }\n }\n\n if (value.examples) {\n const examples = Object.values(value.examples);\n if (examples.length > 0) return examples[0].value;\n }\n}\n"],"mappings":";;;AAWA,MAAa,aAAa;CAAC;CAAO;CAAQ;CAAS;CAAU;CAAQ;CAAM;AAqB3E,SAAgB,iBAAiB,MAAmD;AAClF,KAAI,sBAAsB,KAAM,QAAO;AAEvC,QAAO,OAAO,KAAK,KAAK,CAAC;;AAG3B,SAAgB,kBAAkB,KAAwB;AACxD,QAAO,mBAAmB,OAAO,OAAO,IAAI,qBAAqB,WAC7D,IAAI,mBACJ,UAAU,IAAI,KAAK;;;;;AAMzB,SAAgB,aACd,QACA,MACA,WACmB;AACnB,QAAO;EACL,aAAa,KAAK;EAClB,SAAS,KAAK;EACd,GAAG;EACH,YAAY,CAAC,GAAI,UAAU,cAAc,EAAE,EAAG,GAAI,KAAK,cAAc,EAAE,CAAE;EACzE,QAAQ,OAAO,aAAa;EAC7B;;AAaH,SAAgB,YAAY,OAAyC;AACnE,KAAI,MAAM,YAAY,OACpB,QAAO,MAAM;AAGf,KAAI,MAAM,SAAS;EACjB,MAAM,OAAO,iBAAiB,MAAM,QAAQ;EAC5C,MAAM,UAAU,OAAO,MAAM,QAAQ,QAAQ;AAE7C,MAAI,QAAQ,SAAS;GACnB,MAAM,MAAM,MAAM,WAAW,MAAM,SAAS,YAAY,QAAQ;AAChE,OAAI,QAAQ,OAAW,QAAO;;;AAIlC,KAAI,MAAM,UAAU;EAClB,MAAM,WAAW,OAAO,OAAO,MAAM,SAAS;AAC9C,MAAI,SAAS,SAAS,EAAG,QAAO,SAAS,GAAG"}
package/dist/utils/url.js CHANGED
@@ -1,62 +1,41 @@
1
- export function isUrl(schemaId) {
2
- return schemaId.startsWith('https://') || schemaId.startsWith('http://');
1
+ //#region src/utils/url.ts
2
+ function isUrl(schemaId) {
3
+ return schemaId.startsWith("https://") || schemaId.startsWith("http://");
3
4
  }
4
- export function joinURL(base, pathname) {
5
- if (pathname.startsWith('/'))
6
- pathname = pathname.slice(1);
7
- if (base.endsWith('/'))
8
- base = base.slice(0, -1);
9
- if (pathname.length > 0)
10
- return base + '/' + pathname;
11
- else
12
- return base;
5
+ function joinURL(base, pathname) {
6
+ if (pathname.startsWith("/")) pathname = pathname.slice(1);
7
+ if (base.endsWith("/")) base = base.slice(0, -1);
8
+ if (pathname.length > 0) return base + "/" + pathname;
9
+ else return base;
13
10
  }
14
11
  /**
15
- * @param url - URL (can be relative)
16
- * @param base - the base URL (must be absolute)
17
- */
18
- export function withBase(url, base) {
19
- if (!url.startsWith('https://') && !url.startsWith('http://')) {
20
- return joinURL(base, url);
21
- }
22
- return url;
12
+ * @param url - URL (can be relative)
13
+ * @param base - the base URL (must be absolute)
14
+ */
15
+ function withBase(url, base) {
16
+ if (!url.startsWith("https://") && !url.startsWith("http://")) return joinURL(base, url);
17
+ return url;
23
18
  }
24
- export function resolveServerUrl(template, variables) {
25
- for (const [key, value] of Object.entries(variables)) {
26
- template = template.replaceAll(`{${key}}`, value);
27
- }
28
- return template;
19
+ function resolveServerUrl(template, variables) {
20
+ for (const [key, value] of Object.entries(variables)) template = template.replaceAll(`{${key}}`, value);
21
+ return template;
29
22
  }
30
- export function resolveRequestData(pathname, { path, query }) {
31
- // First, resolve path parameters in the pathname
32
- for (const key in path) {
33
- const param = path[key];
34
- if (Array.isArray(param.value)) {
35
- pathname = pathname.replace(`{${key}}`, param.value.join('/'));
36
- }
37
- else {
38
- pathname = pathname.replace(`{${key}}`, param.value);
39
- }
40
- }
41
- // Check if pathname already contains query parameters (legacy API support)
42
- const [pathPart, existingQueryString] = pathname.split('?', 2);
43
- // Parse existing query parameters from the pathname if they exist
44
- const searchParams = new URLSearchParams(existingQueryString || '');
45
- // Add new query parameters from the RequestData
46
- for (const key in query) {
47
- const param = query[key];
48
- if (Array.isArray(param.value)) {
49
- // Remove existing parameter first to avoid duplicates
50
- searchParams.delete(key);
51
- for (const item of param.value) {
52
- searchParams.append(key, item);
53
- }
54
- }
55
- else {
56
- // Set (replace if exists) the parameter value
57
- searchParams.set(key, param.value);
58
- }
59
- }
60
- // Return the reconstructed URL
61
- return searchParams.size > 0 ? `${pathPart}?${searchParams}` : pathPart;
23
+ function resolveRequestData(pathname, { path, query }) {
24
+ for (const key in path) {
25
+ const param = path[key];
26
+ pathname = pathname.replace(`{${key}}`, param.value);
27
+ }
28
+ const [pathPart, existingQueryString] = pathname.split("?", 2);
29
+ const searchParams = new URLSearchParams(existingQueryString || "");
30
+ for (const key in query) {
31
+ const param = query[key];
32
+ if (param.values.length === 0) continue;
33
+ searchParams.delete(key);
34
+ for (const item of param.values) searchParams.append(key, item);
35
+ }
36
+ return searchParams.size > 0 ? `${pathPart}?${searchParams}` : pathPart;
62
37
  }
38
+
39
+ //#endregion
40
+ export { isUrl, joinURL, resolveRequestData, resolveServerUrl, withBase };
41
+ //# sourceMappingURL=url.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"url.js","names":[],"sources":["../../src/utils/url.ts"],"sourcesContent":["import type { RequestData } from '@/requests/types';\n\nexport function isUrl(schemaId: string): boolean {\n return schemaId.startsWith('https://') || schemaId.startsWith('http://');\n}\n\nexport function joinURL(base: string, pathname: string): string {\n if (pathname.startsWith('/')) pathname = pathname.slice(1);\n if (base.endsWith('/')) base = base.slice(0, -1);\n\n if (pathname.length > 0) return base + '/' + pathname;\n else return base;\n}\n\n/**\n * @param url - URL (can be relative)\n * @param base - the base URL (must be absolute)\n */\nexport function withBase(url: string, base: string): string {\n if (!url.startsWith('https://') && !url.startsWith('http://')) {\n return joinURL(base, url);\n }\n\n return url;\n}\n\nexport function resolveServerUrl(template: string, variables: Record<string, string>): string {\n for (const [key, value] of Object.entries(variables)) {\n template = template.replaceAll(`{${key}}`, value);\n }\n\n return template;\n}\n\nexport function resolveRequestData(pathname: string, { path, query }: RequestData): string {\n // First, resolve path parameters in the pathname\n for (const key in path) {\n const param = path[key];\n\n pathname = pathname.replace(`{${key}}`, param.value);\n }\n\n // Check if pathname already contains query parameters (legacy API support)\n const [pathPart, existingQueryString] = pathname.split('?', 2);\n\n // Parse existing query parameters from the pathname if they exist\n const searchParams = new URLSearchParams(existingQueryString || '');\n\n // Add new query parameters from the RequestData\n for (const key in query) {\n const param = query[key];\n if (param.values.length === 0) continue;\n\n // Remove existing parameter first to avoid duplicates\n searchParams.delete(key);\n for (const item of param.values) {\n searchParams.append(key, item);\n }\n }\n\n // Return the reconstructed URL\n return searchParams.size > 0 ? `${pathPart}?${searchParams}` : pathPart;\n}\n"],"mappings":";AAEA,SAAgB,MAAM,UAA2B;AAC/C,QAAO,SAAS,WAAW,WAAW,IAAI,SAAS,WAAW,UAAU;;AAG1E,SAAgB,QAAQ,MAAc,UAA0B;AAC9D,KAAI,SAAS,WAAW,IAAI,CAAE,YAAW,SAAS,MAAM,EAAE;AAC1D,KAAI,KAAK,SAAS,IAAI,CAAE,QAAO,KAAK,MAAM,GAAG,GAAG;AAEhD,KAAI,SAAS,SAAS,EAAG,QAAO,OAAO,MAAM;KACxC,QAAO;;;;;;AAOd,SAAgB,SAAS,KAAa,MAAsB;AAC1D,KAAI,CAAC,IAAI,WAAW,WAAW,IAAI,CAAC,IAAI,WAAW,UAAU,CAC3D,QAAO,QAAQ,MAAM,IAAI;AAG3B,QAAO;;AAGT,SAAgB,iBAAiB,UAAkB,WAA2C;AAC5F,MAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,UAAU,CAClD,YAAW,SAAS,WAAW,IAAI,IAAI,IAAI,MAAM;AAGnD,QAAO;;AAGT,SAAgB,mBAAmB,UAAkB,EAAE,MAAM,SAA8B;AAEzF,MAAK,MAAM,OAAO,MAAM;EACtB,MAAM,QAAQ,KAAK;AAEnB,aAAW,SAAS,QAAQ,IAAI,IAAI,IAAI,MAAM,MAAM;;CAItD,MAAM,CAAC,UAAU,uBAAuB,SAAS,MAAM,KAAK,EAAE;CAG9D,MAAM,eAAe,IAAI,gBAAgB,uBAAuB,GAAG;AAGnE,MAAK,MAAM,OAAO,OAAO;EACvB,MAAM,QAAQ,MAAM;AACpB,MAAI,MAAM,OAAO,WAAW,EAAG;AAG/B,eAAa,OAAO,IAAI;AACxB,OAAK,MAAM,QAAQ,MAAM,OACvB,cAAa,OAAO,KAAK,KAAK;;AAKlC,QAAO,aAAa,OAAO,IAAI,GAAG,SAAS,GAAG,iBAAiB"}
@@ -1,34 +1,40 @@
1
- import { useMemo, useRef, useState } from 'react';
2
- export function useQuery(fn) {
3
- const [loading, setLoading] = useState(false);
4
- const [data, setData] = useState();
5
- const [error, setError] = useState();
6
- const fnRef = useRef(fn);
7
- fnRef.current = fn;
8
- return useMemo(() => ({
9
- isLoading: loading,
10
- data,
11
- error,
12
- start(...input) {
13
- setLoading(true);
14
- void fnRef
15
- .current(...input)
16
- .then((res) => {
17
- setData(res);
18
- setError(undefined);
19
- })
20
- .catch((err) => {
21
- setData(undefined);
22
- setError(err);
23
- })
24
- .finally(() => {
25
- setLoading(false);
26
- });
27
- },
28
- reset() {
29
- setData(undefined);
30
- setError(undefined);
31
- setLoading(false);
32
- },
33
- }), [error, data, loading]);
1
+ import { useMemo, useRef, useState } from "react";
2
+
3
+ //#region src/utils/use-query.ts
4
+ function useQuery(fn) {
5
+ const [loading, setLoading] = useState(false);
6
+ const [data, setData] = useState();
7
+ const [error, setError] = useState();
8
+ const fnRef = useRef(fn);
9
+ fnRef.current = fn;
10
+ return useMemo(() => ({
11
+ isLoading: loading,
12
+ data,
13
+ error,
14
+ start(...input) {
15
+ setLoading(true);
16
+ fnRef.current(...input).then((res) => {
17
+ setData(res);
18
+ setError(void 0);
19
+ }).catch((err) => {
20
+ setData(void 0);
21
+ setError(err);
22
+ }).finally(() => {
23
+ setLoading(false);
24
+ });
25
+ },
26
+ reset() {
27
+ setData(void 0);
28
+ setError(void 0);
29
+ setLoading(false);
30
+ }
31
+ }), [
32
+ error,
33
+ data,
34
+ loading
35
+ ]);
34
36
  }
37
+
38
+ //#endregion
39
+ export { useQuery };
40
+ //# sourceMappingURL=use-query.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-query.js","names":[],"sources":["../../src/utils/use-query.ts"],"sourcesContent":["import { useMemo, useRef, useState } from 'react';\n\nexport function useQuery<I extends unknown[], T>(\n fn: (...input: I) => Promise<T>,\n): {\n start: (...input: I) => void;\n reset: () => void;\n data?: T;\n error?: unknown;\n isLoading: boolean;\n} {\n const [loading, setLoading] = useState(false);\n const [data, setData] = useState<T>();\n const [error, setError] = useState<T>();\n const fnRef = useRef(fn);\n fnRef.current = fn;\n\n return useMemo(\n () => ({\n isLoading: loading,\n data,\n error,\n start(...input) {\n setLoading(true);\n\n void fnRef\n .current(...input)\n .then((res) => {\n setData(res);\n setError(undefined);\n })\n .catch((err) => {\n setData(undefined);\n setError(err);\n })\n .finally(() => {\n setLoading(false);\n });\n },\n reset() {\n setData(undefined);\n setError(undefined);\n setLoading(false);\n },\n }),\n [error, data, loading],\n );\n}\n"],"mappings":";;;AAEA,SAAgB,SACd,IAOA;CACA,MAAM,CAAC,SAAS,cAAc,SAAS,MAAM;CAC7C,MAAM,CAAC,MAAM,WAAW,UAAa;CACrC,MAAM,CAAC,OAAO,YAAY,UAAa;CACvC,MAAM,QAAQ,OAAO,GAAG;AACxB,OAAM,UAAU;AAEhB,QAAO,eACE;EACL,WAAW;EACX;EACA;EACA,MAAM,GAAG,OAAO;AACd,cAAW,KAAK;AAEhB,GAAK,MACF,QAAQ,GAAG,MAAM,CACjB,MAAM,QAAQ;AACb,YAAQ,IAAI;AACZ,aAAS,OAAU;KACnB,CACD,OAAO,QAAQ;AACd,YAAQ,OAAU;AAClB,aAAS,IAAI;KACb,CACD,cAAc;AACb,eAAW,MAAM;KACjB;;EAEN,QAAQ;AACN,WAAQ,OAAU;AAClB,YAAS,OAAU;AACnB,cAAW,MAAM;;EAEpB,GACD;EAAC;EAAO;EAAM;EAAQ,CACvB"}
package/package.json CHANGED
@@ -1,53 +1,56 @@
1
1
  {
2
2
  "name": "fumadocs-openapi",
3
- "version": "10.2.1",
3
+ "version": "10.2.3",
4
4
  "description": "Generate MDX docs for your OpenAPI spec",
5
5
  "keywords": [
6
- "NextJs",
7
- "Docs"
6
+ "Docs",
7
+ "NextJs"
8
8
  ],
9
9
  "homepage": "https://fumadocs.dev",
10
- "repository": "github:fuma-nama/fumadocs",
11
10
  "license": "MIT",
12
11
  "author": "Fuma Nama",
12
+ "repository": "github:fuma-nama/fumadocs",
13
+ "files": [
14
+ "css",
15
+ "dist"
16
+ ],
13
17
  "type": "module",
18
+ "main": "./dist/index.js",
19
+ "types": "./dist/index.d.ts",
14
20
  "exports": {
15
21
  ".": {
16
- "import": "./dist/index.js",
17
- "types": "./dist/index.d.ts"
22
+ "types": "./dist/index.d.ts",
23
+ "import": "./dist/index.js"
18
24
  },
19
25
  "./css/*": "./css/*",
20
26
  "./ui": {
21
- "import": "./dist/ui/index.js",
22
- "types": "./dist/ui/index.d.ts"
27
+ "types": "./dist/ui/index.d.ts",
28
+ "import": "./dist/ui/index.js"
23
29
  },
24
30
  "./ui/client": {
25
- "import": "./dist/ui/client/index.js",
26
- "types": "./dist/ui/client/index.d.ts"
31
+ "types": "./dist/ui/client/index.d.ts",
32
+ "import": "./dist/ui/client/index.js"
27
33
  },
28
34
  "./playground": {
29
- "import": "./dist/playground/index.js",
30
- "types": "./dist/playground/index.d.ts"
35
+ "types": "./dist/playground/index.d.ts",
36
+ "import": "./dist/playground/index.js"
31
37
  },
32
38
  "./playground/client": {
33
- "import": "./dist/playground/client.js",
34
- "types": "./dist/playground/client.d.ts"
39
+ "types": "./dist/playground/client.d.ts",
40
+ "import": "./dist/playground/client.js"
35
41
  },
36
42
  "./scalar": {
37
- "import": "./dist/scalar/index.js",
38
- "types": "./dist/scalar/index.d.ts"
43
+ "types": "./dist/scalar/index.d.ts",
44
+ "import": "./dist/scalar/index.js"
39
45
  },
40
46
  "./server": {
41
- "import": "./dist/server/index.js",
42
- "types": "./dist/server/index.d.ts"
47
+ "types": "./dist/server/index.d.ts",
48
+ "import": "./dist/server/index.js"
43
49
  }
44
50
  },
45
- "main": "./dist/index.js",
46
- "types": "./dist/index.d.ts",
47
- "files": [
48
- "dist",
49
- "css"
50
- ],
51
+ "publishConfig": {
52
+ "access": "public"
53
+ },
51
54
  "dependencies": {
52
55
  "@fumari/json-schema-to-typescript": "^2.0.0",
53
56
  "@radix-ui/react-accordion": "^1.2.12",
@@ -61,16 +64,17 @@
61
64
  "github-slugger": "^2.0.0",
62
65
  "hast-util-to-jsx-runtime": "^2.3.6",
63
66
  "js-yaml": "^4.1.1",
67
+ "lucide-react": "^0.562.0",
64
68
  "next-themes": "^0.4.6",
65
69
  "openapi-sampler": "^1.6.2",
66
- "react-hook-form": "^7.68.0",
70
+ "react-hook-form": "^7.69.0",
67
71
  "remark": "^15.0.1",
68
72
  "remark-rehype": "^11.1.2",
69
73
  "tailwind-merge": "^3.4.0",
70
74
  "xml-js": "^1.6.11"
71
75
  },
72
76
  "devDependencies": {
73
- "@scalar/api-client-react": "^1.3.58",
77
+ "@scalar/api-client-react": "^1.3.59",
74
78
  "@types/js-yaml": "^4.0.9",
75
79
  "@types/node": "24.10.2",
76
80
  "@types/openapi-sampler": "^1.0.3",
@@ -78,10 +82,10 @@
78
82
  "json-schema-typed": "^8.0.2",
79
83
  "openapi-types": "^12.1.3",
80
84
  "tailwindcss": "^4.1.18",
81
- "tsc-alias": "^1.8.16",
85
+ "tsdown": "^0.18.3",
82
86
  "eslint-config-custom": "0.0.0",
83
- "fumadocs-ui": "16.3.1",
84
- "fumadocs-core": "16.3.1",
87
+ "fumadocs-core": "16.4.2",
88
+ "fumadocs-ui": "16.4.2",
85
89
  "tsconfig": "0.0.0"
86
90
  },
87
91
  "peerDependencies": {
@@ -100,13 +104,10 @@
100
104
  "optional": true
101
105
  }
102
106
  },
103
- "publishConfig": {
104
- "access": "public"
105
- },
106
107
  "scripts": {
107
- "build": "tsc --project tsconfig.build.json && tsc-alias -p tsconfig.build.json",
108
+ "build": "tsdown",
108
109
  "clean": "rimraf dist",
109
- "dev": "concurrently \"tsc -w --project tsconfig.build.json\" \"tsc-alias -w -p tsconfig.build.json\"",
110
+ "dev": "tsdown --watch",
110
111
  "lint": "eslint .",
111
112
  "types:check": "tsc --noEmit"
112
113
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,YAAY,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE7D,mBAAmB,SAAS,CAAC;AAC7B,mBAAmB,uBAAuB,CAAC;AAC3C,mBAAmB,2BAA2B,CAAC"}
@@ -1,25 +0,0 @@
1
- import { type ComponentProps, type HTMLAttributes, type ReactNode } from 'react';
2
- import type { ParsedSchema } from '../../utils/schema.js';
3
- export declare function ObjectInput({ field: _field, fieldName, ...props }: {
4
- field: Exclude<ParsedSchema, boolean>;
5
- fieldName: string;
6
- } & ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
7
- export declare function JsonInput({ fieldName }: {
8
- fieldName: string;
9
- }): import("react/jsx-runtime").JSX.Element;
10
- export declare function FieldInput({ field, fieldName, isRequired, ...props }: HTMLAttributes<HTMLElement> & {
11
- field: Exclude<ParsedSchema, boolean>;
12
- isRequired?: boolean;
13
- fieldName: string;
14
- }): import("react/jsx-runtime").JSX.Element | undefined;
15
- export declare function FieldSet({ field: _field, fieldName, toolbar, name, isRequired, depth, slotType, collapsible, ...props }: HTMLAttributes<HTMLElement> & {
16
- isRequired?: boolean;
17
- name?: ReactNode;
18
- field: ParsedSchema;
19
- fieldName: string;
20
- depth?: number;
21
- slotType?: ReactNode;
22
- toolbar?: ReactNode;
23
- collapsible?: boolean;
24
- }): import("react/jsx-runtime").JSX.Element | undefined;
25
- //# sourceMappingURL=inputs.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"inputs.d.ts","sourceRoot":"","sources":["../../../src/playground/components/inputs.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,SAAS,EAEf,MAAM,OAAO,CAAC;AAqBf,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAuCnD,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EAAE,MAAM,EACb,SAAS,EACT,GAAG,KAAK,EACT,EAAE;IACD,KAAK,EAAE,OAAO,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;IACtC,SAAS,EAAE,MAAM,CAAC;CACnB,GAAG,cAAc,CAAC,KAAK,CAAC,2CAsCxB;AAED,wBAAgB,SAAS,CAAC,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,2CA8B7D;AA6FD,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,SAAS,EACT,UAAU,EACV,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,WAAW,CAAC,GAAG;IAC/B,KAAK,EAAE,OAAO,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;IACtC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;CACnB,uDA2GA;AAED,wBAAgB,QAAQ,CAAC,EACvB,KAAK,EAAE,MAAM,EACb,SAAS,EACT,OAAO,EACP,IAAI,EACJ,UAAU,EACV,KAAS,EACT,QAAQ,EACR,WAAkB,EAClB,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,WAAW,CAAC,GAAG;IAC/B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,YAAY,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,uDAuLA"}
@@ -1,13 +0,0 @@
1
- import type { OpenAPIV3_1 } from 'openapi-types';
2
- import { type ReactNode } from 'react';
3
- export interface AuthDialogProps {
4
- scheme: OpenAPIV3_1.OAuth2SecurityScheme;
5
- scopes: string[];
6
- open: boolean;
7
- setOpen: (v: boolean) => void;
8
- setToken: (token: string) => void;
9
- children: ReactNode;
10
- }
11
- export declare function OauthDialog({ scheme, scopes, setToken, children, open, setOpen, }: AuthDialogProps): import("react/jsx-runtime").JSX.Element;
12
- export declare const OauthDialogTrigger: import("react").ForwardRefExoticComponent<import("@radix-ui/react-dialog").DialogTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
13
- //# sourceMappingURL=oauth-dialog.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"oauth-dialog.d.ts","sourceRoot":"","sources":["../../../src/playground/components/oauth-dialog.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAIjD,OAAO,EAAE,KAAK,SAAS,EAAuB,MAAM,OAAO,CAAC;AAa5D,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,WAAW,CAAC,oBAAoB,CAAC;IACzC,MAAM,EAAE,MAAM,EAAE,CAAC;IAEjB,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAC9B,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,QAAQ,EAAE,SAAS,CAAC;CACrB;AAuCD,wBAAgB,WAAW,CAAC,EAC1B,MAAM,EACN,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,IAAI,EACJ,OAAO,GACR,EAAE,eAAe,2CAwSjB;AAED,eAAO,MAAM,kBAAkB,mJAAgB,CAAC"}
@@ -1,3 +0,0 @@
1
- import { type HTMLAttributes } from 'react';
2
- export default function ServerSelect(props: HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element | undefined;
3
- //# sourceMappingURL=server-select.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"server-select.d.ts","sourceRoot":"","sources":["../../../src/playground/components/server-select.tsx"],"names":[],"mappings":"AAUA,OAAO,EACL,KAAK,cAAc,EAIpB,MAAM,OAAO,CAAC;AAef,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAK,EAAE,cAAc,CAAC,cAAc,CAAC,uDAwDzE"}
@@ -1,3 +0,0 @@
1
- import type { ParsedSchema } from '../utils/schema.js';
2
- export declare function getDefaultValue(schema: ParsedSchema): unknown;
3
- //# sourceMappingURL=get-default-values.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-default-values.d.ts","sourceRoot":"","sources":["../../src/playground/get-default-values.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,wBAAgB,eAAe,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CA2B7D"}
@@ -1,2 +0,0 @@
1
- export declare const ClientLazy: typeof import("./client.js").default;
2
- //# sourceMappingURL=lazy.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"lazy.d.ts","sourceRoot":"","sources":["../../src/playground/lazy.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,UAAU,mCAAqC,CAAC"}
@@ -1,8 +0,0 @@
1
- interface StatusInfo {
2
- description: string;
3
- color: string;
4
- icon: React.ElementType;
5
- }
6
- export declare function getStatusInfo(status: number): StatusInfo;
7
- export {};
8
- //# sourceMappingURL=status-info.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"status-info.d.ts","sourceRoot":"","sources":["../../src/playground/status-info.tsx"],"names":[],"mappings":"AAEA,UAAU,UAAU;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,KAAK,CAAC,WAAW,CAAC;CACzB;AAsBD,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,CAsBxD"}
@@ -1,3 +0,0 @@
1
- import type { SampleGenerator } from '../../requests/types.js';
2
- export declare const generator: SampleGenerator;
3
- //# sourceMappingURL=csharp.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"csharp.d.ts","sourceRoot":"","sources":["../../../src/requests/generators/csharp.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGxD,eAAO,MAAM,SAAS,EAAE,eAgEvB,CAAC"}
@@ -1,3 +0,0 @@
1
- import type { SampleGenerator } from '../../requests/types.js';
2
- export declare const generator: SampleGenerator;
3
- //# sourceMappingURL=curl.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"curl.d.ts","sourceRoot":"","sources":["../../../src/requests/generators/curl.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAExD,eAAO,MAAM,SAAS,EAAE,eAsCvB,CAAC"}
@@ -1,3 +0,0 @@
1
- import type { SampleGenerator } from '../../requests/types.js';
2
- export declare const generator: SampleGenerator;
3
- //# sourceMappingURL=go.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"go.d.ts","sourceRoot":"","sources":["../../../src/requests/generators/go.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGxD,eAAO,MAAM,SAAS,EAAE,eAyDvB,CAAC"}
@@ -1,3 +0,0 @@
1
- import type { CodeUsageGenerator } from '../../ui/operation/usage-tabs/index.js';
2
- export declare const defaultSamples: CodeUsageGenerator[];
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/requests/generators/index.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,eAAO,MAAM,cAAc,EAAE,kBAAkB,EAqC9C,CAAC"}
@@ -1,3 +0,0 @@
1
- import type { SampleGenerator } from '../../requests/types.js';
2
- export declare const generator: SampleGenerator;
3
- //# sourceMappingURL=java.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"java.d.ts","sourceRoot":"","sources":["../../../src/requests/generators/java.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGxD,eAAO,MAAM,SAAS,EAAE,eAoFvB,CAAC"}
@@ -1,3 +0,0 @@
1
- import type { SampleGenerator } from '../../requests/types.js';
2
- export declare const generator: SampleGenerator;
3
- //# sourceMappingURL=javascript.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"javascript.d.ts","sourceRoot":"","sources":["../../../src/requests/generators/javascript.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGxD,eAAO,MAAM,SAAS,EAAE,eAqDvB,CAAC"}
@@ -1,3 +0,0 @@
1
- import type { SampleGenerator } from '../../requests/types.js';
2
- export declare const generator: SampleGenerator;
3
- //# sourceMappingURL=python.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"python.d.ts","sourceRoot":"","sources":["../../../src/requests/generators/python.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAIxD,eAAO,MAAM,SAAS,EAAE,eAiDvB,CAAC"}
@@ -1,19 +0,0 @@
1
- import type { MediaAdapter } from './adapter.js';
2
- /**
3
- * Resolve a media adapter for a given media type.
4
- * Supports exact matches and pattern matching (e.g., +json suffix).
5
- *
6
- * @param mediaType - The media type to resolve (e.g., "application/json", "application/json-patch+json")
7
- * @param adapters - Record of media adapters
8
- * @returns The resolved adapter or undefined if not found
9
- */
10
- export declare function resolveMediaAdapter(mediaType: string, adapters: Record<string, MediaAdapter>): MediaAdapter | undefined;
11
- /**
12
- * Check if a media type is supported by the given adapters.
13
- *
14
- * @param mediaType - The media type to check
15
- * @param adapters - Record of media adapters
16
- * @returns true if the media type is supported
17
- */
18
- export declare function isMediaTypeSupported(mediaType: string, adapters: Record<string, MediaAdapter>): boolean;
19
- //# sourceMappingURL=resolve-adapter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"resolve-adapter.d.ts","sourceRoot":"","sources":["../../../src/requests/media/resolve-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAK9C;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,GACrC,YAAY,GAAG,SAAS,CAgB1B;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAClC,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,GACrC,OAAO,CAET"}
@@ -1,7 +0,0 @@
1
- /**
2
- * Convert input value to hardcoded string (with quotes)
3
- */
4
- export declare function inputToString(value: unknown, format?: 'application/x-www-form-urlencoded' | 'application/x-ndjson' | 'application/json' | 'application/xml'): string;
5
- export declare function escapeString(str: string, delimit?: string): string;
6
- export declare function ident(code: string, tab?: number): string;
7
- //# sourceMappingURL=string-utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"string-utils.d.ts","sourceRoot":"","sources":["../../src/requests/string-utils.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,OAAO,EACd,MAAM,GACF,mCAAmC,GACnC,sBAAsB,GACtB,kBAAkB,GAClB,iBAAsC,GACzC,MAAM,CA6BR;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAIlE;AAED,wBAAgB,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,GAAE,MAAU,UAKlD"}