@clarify-labs/renderer 0.1.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 (50) hide show
  1. package/LICENSE +661 -0
  2. package/output/AppShell-C_bj6ZhV.js +1928 -0
  3. package/output/AppShell-C_bj6ZhV.js.map +1 -0
  4. package/output/AppShell-DBgUlirU.cjs +2127 -0
  5. package/output/AppShell-DBgUlirU.cjs.map +1 -0
  6. package/output/app/AppShell.d.ts +7 -0
  7. package/output/client.cjs +3 -0
  8. package/output/client.d.ts +1 -0
  9. package/output/client.js +2 -0
  10. package/output/components/BuiltWithClarify.d.ts +1 -0
  11. package/output/components/Code.d.ts +18 -0
  12. package/output/components/Feedback.d.ts +1 -0
  13. package/output/components/PageFooter.d.ts +1 -0
  14. package/output/components/SectionProvider.d.ts +25 -0
  15. package/output/components/SiteLogo.d.ts +6 -0
  16. package/output/components/ThemeProvider.d.ts +13 -0
  17. package/output/components/ThemeToggle.d.ts +1 -0
  18. package/output/components/index.d.ts +82 -0
  19. package/output/components/patterns.d.ts +9 -0
  20. package/output/context.d.ts +6 -0
  21. package/output/index.cjs +870 -0
  22. package/output/index.cjs.map +1 -0
  23. package/output/index.d.ts +11 -0
  24. package/output/index.js +850 -0
  25. package/output/index.js.map +1 -0
  26. package/output/mdx/components.d.ts +50 -0
  27. package/output/mdx/primitives.d.ts +42 -0
  28. package/output/openapi/index.d.ts +20 -0
  29. package/output/openapi/utils.d.ts +12 -0
  30. package/output/render-CLI-MnH_.cjs +60 -0
  31. package/output/render-CLI-MnH_.cjs.map +1 -0
  32. package/output/render-Ca4Is683.js +55 -0
  33. package/output/render-Ca4Is683.js.map +1 -0
  34. package/output/renderer.css +3986 -0
  35. package/output/runtime/render.d.ts +2 -0
  36. package/output/runtime/server.d.ts +7 -0
  37. package/output/server.cjs +34 -0
  38. package/output/server.cjs.map +1 -0
  39. package/output/server.d.ts +1 -0
  40. package/output/server.js +33 -0
  41. package/output/server.js.map +1 -0
  42. package/output/shell/ContentActions.d.ts +7 -0
  43. package/output/shell/Header.d.ts +8 -0
  44. package/output/shell/Navigation.d.ts +5 -0
  45. package/output/shell/Search.d.ts +10 -0
  46. package/output/shell/index.d.ts +5 -0
  47. package/output/shell/mobile.d.ts +15 -0
  48. package/output/types.d.ts +121 -0
  49. package/output/utils/remToPx.d.ts +1 -0
  50. package/package.json +71 -0
@@ -0,0 +1,870 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_AppShell = require("./AppShell-DBgUlirU.cjs");
3
+ const require_render = require("./render-CLI-MnH_.cjs");
4
+ let react = require("react");
5
+ let react_router_dom = require("react-router-dom");
6
+ let react_jsx_runtime = require("react/jsx-runtime");
7
+ let clsx = require("clsx");
8
+ clsx = require_AppShell.__toESM(clsx, 1);
9
+ let _headlessui_react = require("@headlessui/react");
10
+ let lucide_react = require("lucide-react");
11
+ let github_slugger = require("github-slugger");
12
+ //#region source/mdx/primitives.tsx
13
+ var primitives_exports = /* @__PURE__ */ require_AppShell.__exportAll({
14
+ Button: () => require_AppShell.Button,
15
+ CodeGroup: () => require_AppShell.CodeGroup,
16
+ Col: () => Col,
17
+ Note: () => Note,
18
+ Properties: () => Properties,
19
+ Property: () => Property,
20
+ Row: () => Row,
21
+ a: () => a,
22
+ code: () => code,
23
+ h2: () => h2,
24
+ h3: () => h3,
25
+ pre: () => pre,
26
+ wrapper: () => wrapper
27
+ });
28
+ function wrapper(arg0) {
29
+ const { children } = arg0;
30
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("article", {
31
+ className: "clarify-mdx-page flex h-full flex-col pt-16 pb-10",
32
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_AppShell.Prose, {
33
+ className: "flex-auto",
34
+ children
35
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_AppShell.PageFooter, {})]
36
+ });
37
+ }
38
+ function a(arg0) {
39
+ const { href = "", ...props } = arg0;
40
+ if (href.startsWith("/") && !href.startsWith("//")) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_router_dom.Link, {
41
+ to: href,
42
+ ...props
43
+ });
44
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("a", {
45
+ href,
46
+ ...props
47
+ });
48
+ }
49
+ var code = require_AppShell.Code;
50
+ var pre = require_AppShell.Pre;
51
+ function h2(props) {
52
+ return (0, react.createElement)(require_AppShell.Heading, {
53
+ level: 2,
54
+ ...props
55
+ });
56
+ }
57
+ function h3(props) {
58
+ return (0, react.createElement)(require_AppShell.Heading, {
59
+ level: 3,
60
+ ...props
61
+ });
62
+ }
63
+ function InfoIcon(props) {
64
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
65
+ viewBox: "0 0 16 16",
66
+ "aria-hidden": "true",
67
+ ...props,
68
+ children: [
69
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", {
70
+ cx: "8",
71
+ cy: "8",
72
+ r: "8",
73
+ strokeWidth: "0"
74
+ }),
75
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
76
+ fill: "none",
77
+ strokeLinecap: "round",
78
+ strokeLinejoin: "round",
79
+ strokeWidth: "1.5",
80
+ d: "M6.75 7.75h1.5v3.5"
81
+ }),
82
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", {
83
+ cx: "8",
84
+ cy: "4",
85
+ r: ".5",
86
+ fill: "none"
87
+ })
88
+ ]
89
+ });
90
+ }
91
+ function Note(arg0) {
92
+ const { children } = arg0;
93
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
94
+ className: "clarify-note my-6 flex gap-2.5 rounded-2xl border border-emerald-500/20 bg-emerald-50/50 p-4 text-sm/6 text-emerald-900 dark:border-emerald-500/30 dark:bg-emerald-500/5 dark:text-emerald-200 dark:[--tw-prose-links-hover:var(--color-emerald-300)] dark:[--tw-prose-links:var(--color-white)]",
95
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(InfoIcon, { className: "mt-1 h-4 w-4 flex-none fill-emerald-500 stroke-white dark:fill-emerald-200/20 dark:stroke-emerald-200" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
96
+ className: "*:first:mt-0 *:last:mb-0",
97
+ children
98
+ })]
99
+ });
100
+ }
101
+ function Row(arg0) {
102
+ const { children } = arg0;
103
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
104
+ className: "clarify-row grid grid-cols-1 items-start gap-x-16 gap-y-10 xl:max-w-none xl:grid-cols-2",
105
+ children
106
+ });
107
+ }
108
+ function Col(arg0) {
109
+ const { children, sticky = false } = arg0;
110
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
111
+ className: (0, clsx.default)("clarify-col *:first:mt-0 *:last:mb-0", sticky && "xl:sticky xl:top-24"),
112
+ children
113
+ });
114
+ }
115
+ function Properties(arg0) {
116
+ const { children } = arg0;
117
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
118
+ className: "clarify-properties my-6",
119
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", {
120
+ role: "list",
121
+ className: "m-0 list-none divide-y divide-zinc-900/5 p-0 dark:divide-white/5",
122
+ children
123
+ })
124
+ });
125
+ }
126
+ function Property(arg0) {
127
+ const { name, children, type } = arg0;
128
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", {
129
+ className: "clarify-property m-0 px-0 py-4 first:pt-0 last:pb-0",
130
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("dl", {
131
+ className: "m-0 flex flex-wrap items-center gap-x-3 gap-y-2",
132
+ children: [
133
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("dt", {
134
+ className: "sr-only",
135
+ children: "Name"
136
+ }),
137
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("dd", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", { children: name }) }),
138
+ type ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("dt", {
139
+ className: "sr-only",
140
+ children: "Type"
141
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("dd", {
142
+ className: "font-mono text-xs text-zinc-400 dark:text-zinc-500",
143
+ children: type
144
+ })] }) : null,
145
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("dt", {
146
+ className: "sr-only",
147
+ children: "Description"
148
+ }),
149
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("dd", {
150
+ className: "w-full flex-none *:first:mt-0 *:last:mb-0",
151
+ children
152
+ })
153
+ ]
154
+ })
155
+ });
156
+ }
157
+ //#endregion
158
+ //#region source/openapi/utils.ts
159
+ var OPENAPI_HTTP_METHODS = [
160
+ "get",
161
+ "put",
162
+ "post",
163
+ "delete",
164
+ "options",
165
+ "head",
166
+ "patch",
167
+ "trace"
168
+ ];
169
+ function isOpenAPIHttpMethod(method) {
170
+ return OPENAPI_HTTP_METHODS.includes(method.toLowerCase());
171
+ }
172
+ function getOpenApiOperation(spec, path, method) {
173
+ if (!isOpenAPIHttpMethod(method)) return void 0;
174
+ return spec.paths?.[path]?.[method.toLowerCase()];
175
+ }
176
+ function listOpenApiOperations(spec) {
177
+ const paths = spec.paths ?? {};
178
+ const operations = [];
179
+ for (const [path, pathItem] of Object.entries(paths)) {
180
+ if (!pathItem) continue;
181
+ for (const method of OPENAPI_HTTP_METHODS) {
182
+ const operation = pathItem[method];
183
+ if (operation) operations.push({
184
+ path,
185
+ method,
186
+ operation
187
+ });
188
+ }
189
+ }
190
+ return operations;
191
+ }
192
+ //#endregion
193
+ //#region source/openapi/index.tsx
194
+ var VIRTUAL_PREFIX = "virtual:clarify-page/";
195
+ function isRecord(value) {
196
+ return typeof value === "object" && value !== null && !Array.isArray(value);
197
+ }
198
+ function isReference(value) {
199
+ return isRecord(value) && typeof value.$ref === "string";
200
+ }
201
+ function resolveReferenceName(ref) {
202
+ return ref.split("/").filter(Boolean).at(-1) ?? ref;
203
+ }
204
+ function getPathItem(spec, path) {
205
+ const pathItem = spec.paths?.[path];
206
+ return isRecord(pathItem) ? pathItem : void 0;
207
+ }
208
+ function getOperationParameters(spec, path, operation) {
209
+ const pathParameters = getPathItem(spec, path)?.parameters;
210
+ const operationParameters = operation.parameters;
211
+ return [...Array.isArray(pathParameters) ? pathParameters : [], ...Array.isArray(operationParameters) ? operationParameters : []].filter((parameter) => isRecord(parameter) && !isReference(parameter));
212
+ }
213
+ function getRequestBody(operation) {
214
+ const requestBody = operation.requestBody;
215
+ return isRecord(requestBody) && !isReference(requestBody) ? requestBody : void 0;
216
+ }
217
+ function getMediaTypeEntries(content) {
218
+ if (!isRecord(content)) return [];
219
+ return Object.entries(content).filter(([, value]) => isRecord(value) && !isReference(value)).map(([mediaType, value]) => ({
220
+ mediaType,
221
+ value
222
+ })).sort((a, z) => {
223
+ return (a.mediaType.includes("json") ? 0 : 1) - (z.mediaType.includes("json") ? 0 : 1);
224
+ });
225
+ }
226
+ function getJsonLikeContent(content) {
227
+ return getMediaTypeEntries(content)[0];
228
+ }
229
+ function getExampleValue(example) {
230
+ if (isRecord(example) && "value" in example) return example.value;
231
+ if (isRecord(example) && "externalValue" in example) return void 0;
232
+ return example;
233
+ }
234
+ function getExampleTitle(key, example) {
235
+ if (isRecord(example)) {
236
+ const summary = typeof example.summary === "string" ? example.summary : void 0;
237
+ return {
238
+ title: summary ?? key,
239
+ summary
240
+ };
241
+ }
242
+ return { title: key };
243
+ }
244
+ function getExampleEntries(mediaType) {
245
+ if (!mediaType) return [];
246
+ if (isRecord(mediaType.examples)) {
247
+ const examples = [];
248
+ for (const [key, example] of Object.entries(mediaType.examples)) {
249
+ const value = getExampleValue(example);
250
+ if (typeof value === "undefined") continue;
251
+ const { title, summary } = getExampleTitle(key, example);
252
+ examples.push({
253
+ key,
254
+ title,
255
+ summary,
256
+ value
257
+ });
258
+ }
259
+ if (examples.length > 0) return examples;
260
+ }
261
+ if (typeof mediaType.example !== "undefined") return [{
262
+ key: "default",
263
+ title: "Example",
264
+ value: mediaType.example
265
+ }];
266
+ const generated = schemaToExample(mediaType.schema);
267
+ return typeof generated === "undefined" ? [] : [{
268
+ key: "schema",
269
+ title: "Schema example",
270
+ value: generated,
271
+ generated: true
272
+ }];
273
+ }
274
+ function getContentExample(mediaType) {
275
+ return getExampleEntries(mediaType)[0]?.value;
276
+ }
277
+ function schemaToType(schema) {
278
+ if (!isRecord(schema)) return void 0;
279
+ if (isReference(schema)) return resolveReferenceName(schema.$ref);
280
+ if (Array.isArray(schema.enum)) return schema.enum.map(String).join(" | ");
281
+ const oneOf = schema.oneOf ?? schema.anyOf;
282
+ if (Array.isArray(oneOf)) return oneOf.map(schemaToType).filter(Boolean).join(" | ");
283
+ if (schema.type === "array") return `${schemaToType(schema.items) ?? "unknown"}[]`;
284
+ return typeof schema.type === "string" ? schema.type : void 0;
285
+ }
286
+ function schemaToExample(schema, depth = 0) {
287
+ if (!isRecord(schema) || depth > 3) return void 0;
288
+ if (typeof schema.example !== "undefined") return schema.example;
289
+ if (typeof schema.default !== "undefined") return schema.default;
290
+ if (Array.isArray(schema.enum)) return schema.enum[0];
291
+ if (isReference(schema)) return { id: resolveReferenceName(schema.$ref) };
292
+ if (schema.type === "array") return [schemaToExample(schema.items, depth + 1) ?? "string"];
293
+ if (schema.type === "object" || isRecord(schema.properties)) {
294
+ const properties = isRecord(schema.properties) ? schema.properties : {};
295
+ return Object.fromEntries(Object.entries(properties).slice(0, 8).map(([name, propertySchema]) => [name, schemaToExample(propertySchema, depth + 1) ?? exampleForType(schemaToType(propertySchema))]));
296
+ }
297
+ return exampleForType(schemaToType(schema));
298
+ }
299
+ function exampleForType(type) {
300
+ if (!type) return "string";
301
+ if (type.endsWith("[]")) return [];
302
+ if (type.includes("integer") || type.includes("number")) return 42;
303
+ if (type.includes("boolean")) return true;
304
+ if (type.includes("object")) return {};
305
+ return "string";
306
+ }
307
+ function stringifyExample(value) {
308
+ if (typeof value === "undefined") return "";
309
+ if (typeof value === "string") return value;
310
+ return JSON.stringify(value, null, 2);
311
+ }
312
+ function shellQuote(value) {
313
+ return `'${value.replace(/'/g, `'"'"'`)}'`;
314
+ }
315
+ function getServerUrl(spec) {
316
+ const servers = spec.servers;
317
+ if (!Array.isArray(servers)) return "";
318
+ const firstServer = servers.find(isRecord);
319
+ return typeof firstServer?.url === "string" ? firstServer.url : "";
320
+ }
321
+ function buildOperationUrl(spec, path, parameters) {
322
+ const query = parameters.filter((parameter) => parameter.in === "query" && parameter.name).map((parameter) => `${parameter.name}={${parameter.name}}`).join("&");
323
+ return `${getServerUrl(spec).replace(/\/$/, "")}${path}${query ? `?${query}` : ""}`;
324
+ }
325
+ function buildCurlExample(arg0) {
326
+ const { spec, path, method, parameters, requestContent } = arg0;
327
+ const url = buildOperationUrl(spec, path, parameters);
328
+ const lines = [`curl ${method === "GET" ? "-G " : ""}${shellQuote(url)}`];
329
+ if (method !== "GET") lines.push(` -X ${method}`);
330
+ lines.push(" -H 'Authorization: Bearer {token}'");
331
+ lines.push(" -H 'Accept: application/json'");
332
+ const requestExample = getContentExample(requestContent?.value);
333
+ if (requestContent && typeof requestExample !== "undefined") {
334
+ lines.push(` -H 'Content-Type: ${requestContent.mediaType}'`);
335
+ lines.push(` -d ${shellQuote(stringifyExample(requestExample))}`);
336
+ }
337
+ return lines.join(" \\\n");
338
+ }
339
+ function getResponseEntries(operation) {
340
+ const responses = operation.responses;
341
+ if (!isRecord(responses)) return [];
342
+ return Object.entries(responses).filter(([, response]) => isRecord(response) && !isReference(response)).map(([status, response]) => ({
343
+ status,
344
+ response
345
+ }));
346
+ }
347
+ function SchemaProperties(arg0) {
348
+ const { title, schema } = arg0;
349
+ const targetSchema = isReference(schema) ? void 0 : schema;
350
+ const properties = isRecord(targetSchema) && isRecord(targetSchema.properties) ? targetSchema.properties : void 0;
351
+ const required = isRecord(targetSchema) && Array.isArray(targetSchema.required) ? targetSchema.required.map(String) : [];
352
+ if (!properties || Object.keys(properties).length === 0) return null;
353
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { children: title }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Properties, { children: Object.entries(properties).map(([name, propertySchema]) => {
354
+ const property = isRecord(propertySchema) ? propertySchema : {};
355
+ const type = schemaToType(propertySchema);
356
+ const description = typeof property.description === "string" ? property.description : void 0;
357
+ const isRequired = required.includes(name);
358
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Property, {
359
+ name,
360
+ type: isRequired && type ? `${type}, required` : type,
361
+ children: description ?? (isRequired ? "Required." : "Optional.")
362
+ }, name);
363
+ }) })] });
364
+ }
365
+ function ParameterList(arg0) {
366
+ const { title, parameters } = arg0;
367
+ if (parameters.length === 0) return null;
368
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { children: title }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Properties, { children: parameters.map((parameter) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Property, {
369
+ name: parameter.name ?? "parameter",
370
+ type: [schemaToType(parameter.schema), parameter.required ? "required" : void 0].filter(Boolean).join(", ") || void 0,
371
+ children: parameter.description ?? `${parameter.in ?? "Operation"} parameter.`
372
+ }, `${parameter.in}-${parameter.name}`)) })] });
373
+ }
374
+ function ResponseList(arg0) {
375
+ const { operation } = arg0;
376
+ const responses = getResponseEntries(operation);
377
+ if (responses.length === 0) return null;
378
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { children: "Responses" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Properties, { children: responses.map(({ status, response }) => {
379
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Property, {
380
+ name: status,
381
+ type: schemaToType(getJsonLikeContent(response.content)?.value.schema),
382
+ children: response.description ?? "Response."
383
+ }, status);
384
+ }) })] });
385
+ }
386
+ function codeLanguageForMediaType(mediaType) {
387
+ if (!mediaType) return "json";
388
+ if (mediaType.includes("json")) return "json";
389
+ if (mediaType.includes("yaml") || mediaType.includes("yml")) return "yaml";
390
+ if (mediaType.startsWith("text/")) return "text";
391
+ if (mediaType.includes("xml")) return "xml";
392
+ return "text";
393
+ }
394
+ function SelectControl(arg0) {
395
+ const { label, value, options, onChange } = arg0;
396
+ if (options.length <= 1) return null;
397
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_headlessui_react.Listbox, {
398
+ value,
399
+ onChange,
400
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
401
+ className: "clarify-api-select relative flex flex-col gap-1 text-[0.625rem]/5 font-semibold tracking-widest text-zinc-400 uppercase",
402
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_headlessui_react.ListboxButton, {
403
+ className: "clarify-api-select-button flex min-w-32 items-center justify-between gap-2 rounded-lg border border-white/10 bg-zinc-900 px-2.5 py-1.5 font-mono text-xs font-medium tracking-normal text-zinc-100 outline-hidden transition hover:border-white/20 focus:border-emerald-400 focus:ring-2 focus:ring-emerald-400/20 data-open:border-emerald-400 data-open:ring-2 data-open:ring-emerald-400/20",
404
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
405
+ className: "flex flex-col items-start gap-0.5 truncate",
406
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
407
+ className: "font-sans text-[0.625rem]/4 font-semibold tracking-widest text-zinc-500 uppercase",
408
+ children: label
409
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
410
+ className: "truncate",
411
+ children: value
412
+ })]
413
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronsUpDownIcon, {
414
+ className: "h-3.5 w-3.5 shrink-0 text-zinc-500",
415
+ "aria-hidden": "true"
416
+ })]
417
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_headlessui_react.ListboxOptions, {
418
+ anchor: "bottom start",
419
+ className: "clarify-api-select-options z-30 mt-1 max-h-64 w-(--button-width) min-w-40 overflow-auto rounded-xl border border-white/10 bg-zinc-900 p-1 text-xs shadow-lg shadow-black/20 [--anchor-gap:--spacing(1)] focus:outline-none",
420
+ children: options.map((option) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_headlessui_react.ListboxOption, {
421
+ value: option,
422
+ className: "clarify-api-select-option group flex cursor-default items-center justify-between gap-3 rounded-lg px-2.5 py-2 font-mono text-xs text-zinc-300 select-none data-focus:bg-white/10 data-focus:text-white data-selected:text-emerald-300",
423
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
424
+ className: "truncate",
425
+ children: option
426
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.CheckIcon, {
427
+ className: "h-3.5 w-3.5 shrink-0 opacity-0 group-data-selected:opacity-100",
428
+ "aria-hidden": "true"
429
+ })]
430
+ }, option))
431
+ })]
432
+ })
433
+ });
434
+ }
435
+ function ExamplePicker(arg0) {
436
+ const { examples, selectedKey, onSelect } = arg0;
437
+ const scrollerRef = (0, react.useRef)(null);
438
+ if (examples.length <= 1) return null;
439
+ function scrollBy(direction) {
440
+ const el = scrollerRef.current;
441
+ if (!el) return;
442
+ el.scrollBy({
443
+ left: direction * Math.max(120, el.clientWidth * .6),
444
+ behavior: "smooth"
445
+ });
446
+ }
447
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
448
+ className: "relative -mr-1 flex min-w-0 flex-1 items-center gap-1",
449
+ children: [
450
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
451
+ type: "button",
452
+ "aria-label": "Scroll examples left",
453
+ onClick: () => scrollBy(-1),
454
+ className: "flex h-6 w-6 shrink-0 items-center justify-center rounded-full text-zinc-500 transition hover:bg-white/5 hover:text-zinc-200",
455
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", {
456
+ viewBox: "0 0 20 20",
457
+ fill: "currentColor",
458
+ className: "h-3 w-3",
459
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
460
+ fillRule: "evenodd",
461
+ d: "M12.79 5.23a.75.75 0 010 1.06L9.06 10l3.73 3.71a.75.75 0 11-1.06 1.06l-4.25-4.24a.75.75 0 010-1.06l4.25-4.24a.75.75 0 011.06 0z",
462
+ clipRule: "evenodd"
463
+ })
464
+ })
465
+ }),
466
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
467
+ ref: scrollerRef,
468
+ className: "flex min-w-0 flex-1 items-center gap-1.5 overflow-x-auto whitespace-nowrap scroll-smooth scrollbar-none [&::-webkit-scrollbar]:hidden",
469
+ children: examples.map((example) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
470
+ type: "button",
471
+ onClick: () => onSelect(example.key),
472
+ title: example.summary,
473
+ className: ["shrink-0 rounded-md px-2 py-0.5 text-xs font-medium transition", example.key === selectedKey ? "bg-white/10 text-white" : "text-zinc-400 hover:bg-white/5 hover:text-zinc-200"].join(" "),
474
+ children: example.title
475
+ }, example.key))
476
+ }),
477
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
478
+ type: "button",
479
+ "aria-label": "Scroll examples right",
480
+ onClick: () => scrollBy(1),
481
+ className: "flex h-6 w-6 shrink-0 items-center justify-center rounded-full text-zinc-500 transition hover:bg-white/5 hover:text-zinc-200",
482
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", {
483
+ viewBox: "0 0 20 20",
484
+ fill: "currentColor",
485
+ className: "h-3 w-3",
486
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
487
+ fillRule: "evenodd",
488
+ d: "M7.21 14.77a.75.75 0 010-1.06L10.94 10 7.21 6.29a.75.75 0 111.06-1.06l4.25 4.24a.75.75 0 010 1.06l-4.25 4.24a.75.75 0 01-1.06 0z",
489
+ clipRule: "evenodd"
490
+ })
491
+ })
492
+ })
493
+ ]
494
+ });
495
+ }
496
+ function CopyCodeButton(arg0) {
497
+ const { code } = arg0;
498
+ const [copied, setCopied] = (0, react.useState)(false);
499
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
500
+ type: "button",
501
+ onClick: () => {
502
+ window.navigator.clipboard.writeText(code).then(() => {
503
+ setCopied(true);
504
+ window.setTimeout(() => setCopied(false), 1e3);
505
+ });
506
+ },
507
+ className: "absolute top-3.5 right-4 rounded-full bg-white/5 px-3 py-1 text-2xs font-medium text-zinc-400 opacity-0 transition hover:bg-white/10 hover:text-zinc-200 group-hover:opacity-100 focus:opacity-100",
508
+ children: copied ? "Copied!" : "Copy"
509
+ });
510
+ }
511
+ function ApiExampleCodeGroup(arg0) {
512
+ const { title, tag, label, code, language, examples, selectedExampleKey, onSelectExample } = arg0;
513
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
514
+ className: "clarify-api-example my-6 overflow-hidden rounded-2xl bg-zinc-900 shadow-md dark:ring-1 dark:ring-white/10",
515
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
516
+ className: "not-prose",
517
+ children: [
518
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
519
+ className: "clarify-api-example-header flex min-h-[calc(--spacing(12)+1px)] flex-wrap items-center gap-x-4 border-b border-zinc-700 bg-zinc-800 px-4 dark:border-zinc-800 dark:bg-transparent",
520
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", {
521
+ className: "shrink-0 py-3 text-xs font-semibold text-white",
522
+ children: title
523
+ }), examples && examples.length > 1 && selectedExampleKey && onSelectExample ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ExamplePicker, {
524
+ examples,
525
+ selectedKey: selectedExampleKey,
526
+ onSelect: onSelectExample
527
+ }) : null]
528
+ }),
529
+ tag || label ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
530
+ className: "flex h-9 items-center gap-2 border-y border-t-transparent border-b-white/7.5 bg-zinc-900 px-4 dark:border-b-white/5 dark:bg-white/1",
531
+ children: [
532
+ tag ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
533
+ className: "font-mono text-[0.625rem]/6 font-semibold text-emerald-400",
534
+ children: tag
535
+ }) : null,
536
+ tag && label ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: "h-0.5 w-0.5 rounded-full bg-zinc-500" }) : null,
537
+ label ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
538
+ className: "font-mono text-xs text-zinc-400",
539
+ children: label
540
+ }) : null
541
+ ]
542
+ }) : null,
543
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
544
+ className: "clarify-api-example-code group relative",
545
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("pre", {
546
+ className: "overflow-x-auto p-4 text-xs text-white",
547
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", {
548
+ className: `language-${language}`,
549
+ children: code
550
+ })
551
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CopyCodeButton, { code })]
552
+ })
553
+ ]
554
+ })
555
+ });
556
+ }
557
+ function RequestExamplesPanel(arg0) {
558
+ const { spec, path, method, parameters, requestContents } = arg0;
559
+ const [selectedMediaType, setSelectedMediaType] = (0, react.useState)(requestContents[0]?.mediaType ?? "");
560
+ const selectedContent = requestContents.find((content) => content.mediaType === selectedMediaType) ?? requestContents[0];
561
+ const examples = getExampleEntries(selectedContent?.value);
562
+ const [selectedExampleKey, setSelectedExampleKey] = (0, react.useState)(examples[0]?.key ?? "");
563
+ const selectedExample = examples.find((example) => example.key === selectedExampleKey) ?? examples[0];
564
+ const curl = buildCurlExample({
565
+ spec,
566
+ path,
567
+ method,
568
+ parameters,
569
+ requestContent: selectedContent ? {
570
+ ...selectedContent,
571
+ value: {
572
+ ...selectedContent.value,
573
+ example: selectedExample?.value,
574
+ examples: void 0
575
+ }
576
+ } : void 0
577
+ });
578
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
579
+ className: "mb-3 flex flex-wrap gap-3",
580
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectControl, {
581
+ label: "Media type",
582
+ value: selectedContent?.mediaType ?? "",
583
+ options: requestContents.map((content) => content.mediaType),
584
+ onChange: (value) => {
585
+ setSelectedMediaType(value);
586
+ setSelectedExampleKey(getExampleEntries(requestContents.find((content) => content.mediaType === value)?.value)[0]?.key ?? "");
587
+ }
588
+ })
589
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ApiExampleCodeGroup, {
590
+ title: "Request",
591
+ tag: method,
592
+ label: path,
593
+ code: curl,
594
+ language: "bash",
595
+ examples,
596
+ selectedExampleKey: selectedExample?.key,
597
+ onSelectExample: setSelectedExampleKey
598
+ })] });
599
+ }
600
+ function ResponseExamplesPanel(arg0) {
601
+ const { operation } = arg0;
602
+ const responses = getResponseEntries(operation).filter(({ response }) => getMediaTypeEntries(response.content).length > 0);
603
+ const [selectedStatus, setSelectedStatus] = (0, react.useState)(responses.find(({ status }) => status.startsWith("2"))?.status ?? responses[0]?.status ?? "");
604
+ const selectedResponse = responses.find(({ status }) => status === selectedStatus) ?? responses[0];
605
+ const responseContents = getMediaTypeEntries(selectedResponse?.response.content);
606
+ const [selectedMediaType, setSelectedMediaType] = (0, react.useState)(responseContents[0]?.mediaType ?? "");
607
+ const selectedContent = responseContents.find((content) => content.mediaType === selectedMediaType) ?? responseContents[0];
608
+ const examples = getExampleEntries(selectedContent?.value);
609
+ const [selectedExampleKey, setSelectedExampleKey] = (0, react.useState)(examples[0]?.key ?? "");
610
+ const selectedExample = examples.find((example) => example.key === selectedExampleKey) ?? examples[0];
611
+ const responseCode = stringifyExample(selectedExample?.value);
612
+ if (!selectedResponse || !selectedContent || !responseCode) return null;
613
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
614
+ className: "mb-3 flex flex-wrap gap-3",
615
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectControl, {
616
+ label: "Status",
617
+ value: selectedResponse.status,
618
+ options: responses.map(({ status }) => status),
619
+ onChange: (value) => {
620
+ const nextContents = getMediaTypeEntries(responses.find(({ status }) => status === value)?.response.content);
621
+ setSelectedStatus(value);
622
+ setSelectedMediaType(nextContents[0]?.mediaType ?? "");
623
+ setSelectedExampleKey(getExampleEntries(nextContents[0]?.value)[0]?.key ?? "");
624
+ }
625
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectControl, {
626
+ label: "Media type",
627
+ value: selectedContent.mediaType,
628
+ options: responseContents.map((content) => content.mediaType),
629
+ onChange: (value) => {
630
+ setSelectedMediaType(value);
631
+ setSelectedExampleKey(getExampleEntries(responseContents.find((content) => content.mediaType === value)?.value)[0]?.key ?? "");
632
+ }
633
+ })]
634
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ApiExampleCodeGroup, {
635
+ title: "Response",
636
+ tag: selectedResponse.status,
637
+ label: selectedContent.mediaType,
638
+ code: responseCode,
639
+ language: codeLanguageForMediaType(selectedContent.mediaType),
640
+ examples,
641
+ selectedExampleKey: selectedExample?.key,
642
+ onSelectExample: setSelectedExampleKey
643
+ })] });
644
+ }
645
+ function EndpointExamples(arg0) {
646
+ const { spec, path, method, operation, parameters, requestContents } = arg0;
647
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
648
+ className: "space-y-6",
649
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(RequestExamplesPanel, {
650
+ spec,
651
+ path,
652
+ method,
653
+ parameters,
654
+ requestContents
655
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ResponseExamplesPanel, { operation })]
656
+ });
657
+ }
658
+ function OpenApiHeader(arg0) {
659
+ const { spec } = arg0;
660
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("header", {
661
+ className: "mb-16",
662
+ children: [
663
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
664
+ className: "mb-3 font-mono text-xs/6 font-medium tracking-widest text-emerald-500 uppercase dark:text-emerald-400",
665
+ children: "OpenAPI Reference"
666
+ }),
667
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h1", { children: spec.info?.title ?? "API Documentation" }),
668
+ spec.info?.description ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
669
+ className: "lead",
670
+ children: spec.info.description
671
+ }) : null,
672
+ spec.info?.version ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
673
+ className: "text-sm text-zinc-500 dark:text-zinc-400",
674
+ children: ["Version ", spec.info.version]
675
+ }) : null
676
+ ]
677
+ });
678
+ }
679
+ function OpenApiOperation(arg0) {
680
+ const { spec, path, method, operation } = arg0;
681
+ const id = (0, github_slugger.slug)(`${method.toLowerCase()} ${path}`);
682
+ const summary = operation.summary ?? `${method} ${path}`;
683
+ const description = operation.description;
684
+ const parameters = getOperationParameters(spec, path, operation);
685
+ const requestBody = getRequestBody(operation);
686
+ const requestContents = getMediaTypeEntries(requestBody?.content);
687
+ const requestSchema = requestContents[0]?.value.schema;
688
+ const groupedParameters = {
689
+ path: parameters.filter((parameter) => parameter.in === "path"),
690
+ query: parameters.filter((parameter) => parameter.in === "query"),
691
+ header: parameters.filter((parameter) => parameter.in === "header")
692
+ };
693
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
694
+ className: "clarify-api-endpoint scroll-mt-24",
695
+ "aria-labelledby": id,
696
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_AppShell.Heading, {
697
+ id,
698
+ tag: method,
699
+ label: path,
700
+ children: summary
701
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Row, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Col, { children: [
702
+ description ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: description }) : null,
703
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ParameterList, {
704
+ title: "Path parameters",
705
+ parameters: groupedParameters.path
706
+ }),
707
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ParameterList, {
708
+ title: "Query parameters",
709
+ parameters: groupedParameters.query
710
+ }),
711
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ParameterList, {
712
+ title: "Headers",
713
+ parameters: groupedParameters.header
714
+ }),
715
+ requestBody && requestContents.length > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
716
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { children: "Request body" }),
717
+ typeof requestBody.description === "string" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: requestBody.description }) : null,
718
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SchemaProperties, {
719
+ title: "Body properties",
720
+ schema: requestSchema
721
+ })
722
+ ] }) : null,
723
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ResponseList, { operation })
724
+ ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Col, {
725
+ sticky: true,
726
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EndpointExamples, {
727
+ spec,
728
+ path,
729
+ method,
730
+ operation,
731
+ parameters,
732
+ requestContents
733
+ })
734
+ })] })]
735
+ });
736
+ }
737
+ function OpenApiPaths(arg0) {
738
+ const { spec } = arg0;
739
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
740
+ className: "clarify-api-endpoints space-y-16",
741
+ children: listOpenApiOperations(spec).map(({ path, method, operation }) => ({
742
+ path,
743
+ method: method.toUpperCase(),
744
+ operation
745
+ })).map(({ path, method, operation }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(OpenApiOperation, {
746
+ spec,
747
+ path,
748
+ method,
749
+ operation
750
+ }, `${method}-${path}`))
751
+ });
752
+ }
753
+ function resolveRelativePath(fromDir, to) {
754
+ const parts = (fromDir + "/" + to).split("/").filter(Boolean);
755
+ const stack = [];
756
+ for (const part of parts) if (part === "..") stack.pop();
757
+ else if (part !== ".") stack.push(part);
758
+ return stack.join("/");
759
+ }
760
+ function normalizeSpecPath(specPath, currentRoutePath, routePrefix = "") {
761
+ if (specPath.startsWith(VIRTUAL_PREFIX)) return specPath;
762
+ const normalizedRoutePrefix = routePrefix.replace(/^\/+|\/+$/g, "");
763
+ const normalizedSpecPath = specPath.startsWith("/") && normalizedRoutePrefix && specPath.slice(1).startsWith(`${normalizedRoutePrefix}/`) ? "/" + specPath.slice(normalizedRoutePrefix.length + 2) : specPath;
764
+ if (normalizedSpecPath.startsWith("/")) return VIRTUAL_PREFIX + normalizedSpecPath.replace(/^\//, "");
765
+ const fromDir = currentRoutePath === "/" ? "" : currentRoutePath?.replace(/^\//, "").replace(/\/[^/]*$/, "") ?? "";
766
+ return VIRTUAL_PREFIX + resolveRelativePath(normalizedRoutePrefix && fromDir.startsWith(`${normalizedRoutePrefix}/`) ? fromDir.slice(normalizedRoutePrefix.length + 1) : fromDir, normalizedSpecPath);
767
+ }
768
+ function useOpenApiSpec(spec, specPath) {
769
+ const specs = require_AppShell.useOpenApis();
770
+ const location = (0, react_router_dom.useLocation)();
771
+ const config = require_AppShell.useClarifyConfig();
772
+ if (spec) return spec;
773
+ if (!specPath) return null;
774
+ return specs[normalizeSpecPath(specPath, location.pathname, config.routePrefix)] ?? null;
775
+ }
776
+ function WarningBox(arg0) {
777
+ const { children, tone = "amber" } = arg0;
778
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
779
+ className: (0, clsx.default)("clarify-warning", tone === "red" ? "rounded-lg border border-red-200 bg-red-50 p-4 text-sm text-red-700 dark:border-red-500/30 dark:bg-red-500/10 dark:text-red-200" : "rounded-lg border border-amber-200 bg-amber-50 p-4 text-sm text-amber-700 dark:border-amber-500/30 dark:bg-amber-500/10 dark:text-amber-200"),
780
+ children
781
+ });
782
+ }
783
+ function OpenApiPage(arg0) {
784
+ const { spec, specPath } = arg0;
785
+ const resolved = useOpenApiSpec(spec, specPath);
786
+ if (!resolved) return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(WarningBox, { children: ["OpenAPI spec not found: ", specPath ?? "(未提供 spec 或 specPath)"] });
787
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("article", {
788
+ className: "clarify-openapi-page flex h-full flex-col pt-16 pb-10",
789
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_AppShell.Prose, {
790
+ className: "flex-auto",
791
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(OpenApiHeader, { spec: resolved }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(OpenApiPaths, { spec: resolved })]
792
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_AppShell.PageFooter, {})]
793
+ });
794
+ }
795
+ function ApiEndpoint(arg0) {
796
+ const { spec, path, method } = arg0;
797
+ const op = getOpenApiOperation(spec, path, method);
798
+ if (!op) return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(WarningBox, {
799
+ tone: "red",
800
+ children: [
801
+ "Endpoint not found: ",
802
+ method.toUpperCase(),
803
+ " ",
804
+ path
805
+ ]
806
+ });
807
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(OpenApiOperation, {
808
+ spec,
809
+ path,
810
+ method: method.toUpperCase(),
811
+ operation: op
812
+ });
813
+ }
814
+ function OpenApiEndpoint(arg0) {
815
+ const { specPath, path, method } = arg0;
816
+ const spec = useOpenApiSpec(void 0, specPath);
817
+ if (!spec) return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(WarningBox, { children: ["OpenAPI spec not found: ", specPath] });
818
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ApiEndpoint, {
819
+ spec,
820
+ path,
821
+ method
822
+ });
823
+ }
824
+ //#endregion
825
+ //#region source/mdx/components.ts
826
+ function useMDXComponents(components = {}) {
827
+ return {
828
+ ...components,
829
+ ...primitives_exports,
830
+ OpenApiPage,
831
+ ApiEndpoint,
832
+ OpenApiEndpoint,
833
+ ApiEndpointCard: require_AppShell.ApiEndpointCard,
834
+ DocShell: require_AppShell.DocShell
835
+ };
836
+ }
837
+ //#endregion
838
+ exports.ApiEndpoint = ApiEndpoint;
839
+ exports.ApiEndpointCard = require_AppShell.ApiEndpointCard;
840
+ exports.AppShell = require_AppShell.AppShell;
841
+ exports.BuiltWithClarify = require_AppShell.BuiltWithClarify;
842
+ exports.Button = require_AppShell.Button;
843
+ exports.ClarifyConfigContext = require_AppShell.ClarifyConfigContext;
844
+ exports.Code = require_AppShell.Code;
845
+ exports.CodeGroup = require_AppShell.CodeGroup;
846
+ exports.DocShell = require_AppShell.DocShell;
847
+ exports.Feedback = require_AppShell.Feedback;
848
+ exports.GridPattern = require_AppShell.GridPattern;
849
+ exports.Heading = require_AppShell.Heading;
850
+ exports.HeroPattern = require_AppShell.HeroPattern;
851
+ exports.Logo = require_AppShell.Logo;
852
+ exports.OpenApiEndpoint = OpenApiEndpoint;
853
+ exports.OpenApiPage = OpenApiPage;
854
+ exports.OpenApisContext = require_AppShell.OpenApisContext;
855
+ exports.PageFooter = require_AppShell.PageFooter;
856
+ exports.Pre = require_AppShell.Pre;
857
+ exports.Prose = require_AppShell.Prose;
858
+ exports.SectionProvider = require_AppShell.SectionProvider;
859
+ exports.Tag = require_AppShell.Tag;
860
+ exports.ThemeProvider = require_AppShell.ThemeProvider;
861
+ exports.ThemeToggle = require_AppShell.ThemeToggle;
862
+ exports.remToPx = require_AppShell.remToPx;
863
+ exports.render = require_render.render;
864
+ exports.useClarifyConfig = require_AppShell.useClarifyConfig;
865
+ exports.useMDXComponents = useMDXComponents;
866
+ exports.useOpenApis = require_AppShell.useOpenApis;
867
+ exports.useSectionStore = require_AppShell.useSectionStore;
868
+ exports.useTheme = require_AppShell.useTheme;
869
+
870
+ //# sourceMappingURL=index.cjs.map