@clarify-labs/renderer 0.10.2 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/output/{ClarifyShell-C6li72Ce.cjs → ClarifyShell-BAjq876Z.cjs} +113 -90
- package/output/ClarifyShell-BAjq876Z.cjs.map +1 -0
- package/output/{ClarifyShell-1LuBliwt.js → ClarifyShell-GoSXvgMg.js} +114 -91
- package/output/ClarifyShell-GoSXvgMg.js.map +1 -0
- package/output/{MermaidViewer-B6-BMCJG.cjs → MermaidViewer-BZ8ghcFP.cjs} +2 -2
- package/output/{MermaidViewer-B6-BMCJG.cjs.map → MermaidViewer-BZ8ghcFP.cjs.map} +1 -1
- package/output/{MermaidViewer-dXsomvM7.js → MermaidViewer-CkIxyqtf.js} +2 -2
- package/output/{MermaidViewer-dXsomvM7.js.map → MermaidViewer-CkIxyqtf.js.map} +1 -1
- package/output/{OpenApiOperation-DgrqzeiS.js → OpenApiOperation-C2vJztWZ.js} +1983 -365
- package/output/OpenApiOperation-C2vJztWZ.js.map +1 -0
- package/output/{OpenApiOperation-B52IWlKb.cjs → OpenApiOperation-D-5uE5v7.cjs} +2009 -361
- package/output/OpenApiOperation-D-5uE5v7.cjs.map +1 -0
- package/output/{PageActions-BjB6PYmL.cjs → PageActions-DJRXlGhz.cjs} +532 -358
- package/output/PageActions-DJRXlGhz.cjs.map +1 -0
- package/output/{PageActions-D7K9LDGf.js → PageActions-bugd7GZh.js} +535 -361
- package/output/PageActions-bugd7GZh.js.map +1 -0
- package/output/{SearchDialog-CIPvXMT3.cjs → SearchDialog-8AdCRp6K.cjs} +3 -3
- package/output/{SearchDialog-CIPvXMT3.cjs.map → SearchDialog-8AdCRp6K.cjs.map} +1 -1
- package/output/{SearchDialog-CxYLjRi5.js → SearchDialog-CBJjDs_9.js} +3 -3
- package/output/{SearchDialog-CxYLjRi5.js.map → SearchDialog-CBJjDs_9.js.map} +1 -1
- package/output/app/ContentDiagnostic.d.ts +2 -1
- package/output/app/PageFooter.d.ts +1 -1
- package/output/client.cjs +3 -3
- package/output/client.js +3 -3
- package/output/components/AccordionGroup.d.ts +7 -0
- package/output/components/Collapse.d.ts +2 -0
- package/output/components/FileTree.d.ts +10 -0
- package/output/components/Image.d.ts +6 -0
- package/output/components/Steps.d.ts +12 -0
- package/output/components/Tabs.d.ts +12 -5
- package/output/components/Tooltip.d.ts +8 -0
- package/output/components/index.d.ts +10 -1
- package/output/core/i18n.d.ts +1 -1
- package/output/core/types.d.ts +37 -19
- package/output/{i18n-DnqZHFT7.js → i18n-BPrC45nD.js} +102 -2
- package/output/i18n-BPrC45nD.js.map +1 -0
- package/output/{i18n-b4iTLeia.cjs → i18n-wXINKKV0.cjs} +102 -2
- package/output/i18n-wXINKKV0.cjs.map +1 -0
- package/output/index.cjs +38 -8
- package/output/index.cjs.map +1 -1
- package/output/index.d.ts +8 -7
- package/output/index.js +34 -9
- package/output/index.js.map +1 -1
- package/output/mdx/components.d.ts +11 -1
- package/output/mdx/primitives.d.ts +4 -2
- package/output/openapi/components/CodeDisplay.d.ts +1 -0
- package/output/openapi/components/EndpointMethodBadge.d.ts +6 -0
- package/output/openapi/components/EndpointSections.d.ts +2 -2
- package/output/openapi/components/ExamplePanels.d.ts +2 -2
- package/output/openapi/components/InlineListbox.d.ts +31 -0
- package/output/openapi/components/OpenApiAuthPanel.d.ts +12 -0
- package/output/openapi/components/OpenApiOperation.d.ts +1 -9
- package/output/openapi/components/OpenApiOperation.state.d.ts +4 -2
- package/output/openapi/components/OpenApiRequest.d.ts +18 -0
- package/output/openapi/components/OpenApiRequestFields.d.ts +25 -0
- package/output/openapi/components/OpenApiResponseViewer.d.ts +8 -0
- package/output/openapi/components/SendRequestButton.d.ts +9 -0
- package/output/openapi/components/helpers.d.ts +6 -1
- package/output/openapi/components/useOpenApiRequestState.d.ts +41 -0
- package/output/openapi/entry.d.ts +2 -0
- package/output/openapi/index.d.ts +2 -2
- package/output/openapi/lib/api-exchange-code.d.ts +8 -0
- package/output/openapi/lib/api-exchange.d.ts +30 -0
- package/output/openapi/lib/api-request.d.ts +24 -0
- package/output/openapi/lib/request-code.d.ts +2 -2
- package/output/openapi/lib/request-parameters.d.ts +5 -0
- package/output/openapi/store.d.ts +10 -0
- package/output/openapi/types.d.ts +4 -0
- package/output/preview.cjs +37 -27
- package/output/preview.cjs.map +1 -1
- package/output/preview.js +37 -27
- package/output/preview.js.map +1 -1
- package/output/{render-Di5B6Zc0.cjs → render-FICIzeXz.cjs} +2 -2
- package/output/{render-Di5B6Zc0.cjs.map → render-FICIzeXz.cjs.map} +1 -1
- package/output/{render-DKj24Jqw.js → render-XQiw_48i.js} +2 -2
- package/output/{render-DKj24Jqw.js.map → render-XQiw_48i.js.map} +1 -1
- package/output/renderer.css +1310 -318
- package/output/server.cjs +2 -2
- package/output/server.js +2 -2
- package/output/theme/ThemeEditor.d.ts +8 -4
- package/output/theme/variables.d.ts +8 -4
- package/package.json +1 -1
- package/output/ClarifyShell-1LuBliwt.js.map +0 -1
- package/output/ClarifyShell-C6li72Ce.cjs.map +0 -1
- package/output/OpenApiOperation-B52IWlKb.cjs.map +0 -1
- package/output/OpenApiOperation-DgrqzeiS.js.map +0 -1
- package/output/PageActions-BjB6PYmL.cjs.map +0 -1
- package/output/PageActions-D7K9LDGf.js.map +0 -1
- package/output/i18n-DnqZHFT7.js.map +0 -1
- package/output/i18n-b4iTLeia.cjs.map +0 -1
|
@@ -5,6 +5,9 @@ export type OpenApiParameter = {
|
|
|
5
5
|
in?: string;
|
|
6
6
|
required?: boolean;
|
|
7
7
|
description?: string;
|
|
8
|
+
style?: string;
|
|
9
|
+
explode?: boolean;
|
|
10
|
+
allowEmptyValue?: boolean;
|
|
8
11
|
schema?: unknown;
|
|
9
12
|
};
|
|
10
13
|
export type OpenApiMediaType = {
|
|
@@ -48,6 +51,7 @@ export type RequestAuthInput = {
|
|
|
48
51
|
value: string;
|
|
49
52
|
scheme: OpenApiSecurityScheme;
|
|
50
53
|
};
|
|
54
|
+
export type RequestAuthInputs = RequestAuthInput[];
|
|
51
55
|
export type MediaTypeEntry = {
|
|
52
56
|
mediaType: string;
|
|
53
57
|
value: OpenApiMediaType;
|
package/output/preview.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_i18n = require("./i18n-
|
|
3
|
-
const require_PageActions = require("./PageActions-
|
|
4
|
-
const require_OpenApiOperation = require("./OpenApiOperation-
|
|
2
|
+
const require_i18n = require("./i18n-wXINKKV0.cjs");
|
|
3
|
+
const require_PageActions = require("./PageActions-DJRXlGhz.cjs");
|
|
4
|
+
const require_OpenApiOperation = require("./OpenApiOperation-D-5uE5v7.cjs");
|
|
5
5
|
let react = require("react");
|
|
6
6
|
let react_router_dom = require("react-router-dom");
|
|
7
7
|
let lucide_react = require("lucide-react");
|
|
@@ -25,8 +25,8 @@ function usePreviewIdentityState(arg0) {
|
|
|
25
25
|
const [serverVariables, setServerVariables] = (0, react.useState)(require_OpenApiOperation.defaultServerVariables(selectedServer));
|
|
26
26
|
const [serverOpen, setServerOpen] = (0, react.useState)(false);
|
|
27
27
|
const authOptions = require_OpenApiOperation.getAuthOptions(spec, operation);
|
|
28
|
-
const [selectedAuthName, setSelectedAuthName] = (0, react.useState)(authOptions[0]?.
|
|
29
|
-
const selectedAuth = authOptions.find((option) => option.
|
|
28
|
+
const [selectedAuthName, setSelectedAuthName] = (0, react.useState)(authOptions[0]?.key ?? "");
|
|
29
|
+
const selectedAuth = authOptions.find((option) => option.key === selectedAuthName);
|
|
30
30
|
const [authValues, setAuthValues] = (0, react.useState)({});
|
|
31
31
|
const [authOpen, setAuthOpen] = (0, react.useState)(false);
|
|
32
32
|
return {
|
|
@@ -40,11 +40,11 @@ function usePreviewIdentityState(arg0) {
|
|
|
40
40
|
selectedAuth,
|
|
41
41
|
authValues,
|
|
42
42
|
authOpen,
|
|
43
|
-
authInput: selectedAuth ? {
|
|
44
|
-
name:
|
|
45
|
-
scheme:
|
|
46
|
-
value: authValues[
|
|
47
|
-
} : void 0,
|
|
43
|
+
authInput: selectedAuth ? selectedAuth.schemes.map((option) => ({
|
|
44
|
+
name: option.name,
|
|
45
|
+
scheme: option.scheme,
|
|
46
|
+
value: authValues[option.name] ?? require_OpenApiOperation.authPlaceholder(option)
|
|
47
|
+
})) : void 0,
|
|
48
48
|
onSelectServer: (value) => {
|
|
49
49
|
const nextServer = servers.find((server, index) => require_OpenApiOperation.getServerKey(server, index) === value) ?? servers[0];
|
|
50
50
|
setSelectedServerKey(value);
|
|
@@ -70,7 +70,15 @@ function usePreviewIdentityState(arg0) {
|
|
|
70
70
|
...current,
|
|
71
71
|
[name]: value
|
|
72
72
|
}));
|
|
73
|
-
}
|
|
73
|
+
},
|
|
74
|
+
onClearAuthValue: (name) => {
|
|
75
|
+
setAuthValues((current) => {
|
|
76
|
+
const values = { ...current };
|
|
77
|
+
delete values[name];
|
|
78
|
+
return values;
|
|
79
|
+
});
|
|
80
|
+
},
|
|
81
|
+
onClearAuthValues: () => setAuthValues({})
|
|
74
82
|
};
|
|
75
83
|
}
|
|
76
84
|
function schemaFromType(type) {
|
|
@@ -191,17 +199,9 @@ function OpenApiExamplesPreview(arg0) {
|
|
|
191
199
|
selectedServer: identityState.selectedServer,
|
|
192
200
|
serverVariables: identityState.serverVariables,
|
|
193
201
|
serverOpen: identityState.serverOpen,
|
|
194
|
-
authOptions: identityState.authOptions,
|
|
195
|
-
selectedAuthName: identityState.selectedAuthName,
|
|
196
|
-
selectedAuth: identityState.selectedAuth,
|
|
197
|
-
authValues: identityState.authValues,
|
|
198
|
-
authOpen: identityState.authOpen,
|
|
199
202
|
onSelectServer: identityState.onSelectServer,
|
|
200
203
|
onChangeServerVariable: identityState.onChangeServerVariable,
|
|
201
|
-
onToggleServer: identityState.onToggleServer
|
|
202
|
-
onToggleAuth: identityState.onToggleAuth,
|
|
203
|
-
onSelectAuth: identityState.onSelectAuth,
|
|
204
|
-
onChangeAuthValue: identityState.onChangeAuthValue
|
|
204
|
+
onToggleServer: identityState.onToggleServer
|
|
205
205
|
});
|
|
206
206
|
}
|
|
207
207
|
function renderExamples() {
|
|
@@ -387,10 +387,8 @@ var staticOutputEndpoint = {
|
|
|
387
387
|
var previewConfig = {
|
|
388
388
|
title: "Clarify preview",
|
|
389
389
|
description: "Renderer preview environment",
|
|
390
|
-
rootDirectory: "source",
|
|
391
390
|
routePrefix: "/",
|
|
392
391
|
assetPrefix: "/",
|
|
393
|
-
outputDirectory: "output",
|
|
394
392
|
theme: {
|
|
395
393
|
preset: "default",
|
|
396
394
|
tokens: {
|
|
@@ -411,16 +409,28 @@ var previewConfig = {
|
|
|
411
409
|
xl: "1rem"
|
|
412
410
|
}
|
|
413
411
|
},
|
|
414
|
-
layout: { maxWidth: "88rem" }
|
|
415
|
-
editor: false
|
|
412
|
+
layout: { maxWidth: "88rem" }
|
|
416
413
|
},
|
|
417
|
-
|
|
418
|
-
|
|
414
|
+
locales: {
|
|
415
|
+
default: "en",
|
|
419
416
|
missing: "fallback",
|
|
420
417
|
locales: [{
|
|
421
418
|
code: "en",
|
|
422
419
|
label: "English"
|
|
423
420
|
}]
|
|
421
|
+
},
|
|
422
|
+
variables: {},
|
|
423
|
+
features: {
|
|
424
|
+
search: {
|
|
425
|
+
enabled: true,
|
|
426
|
+
provider: "pagefind"
|
|
427
|
+
},
|
|
428
|
+
repository: { enabled: true },
|
|
429
|
+
themeEditor: { enabled: true },
|
|
430
|
+
openapi: {
|
|
431
|
+
enabled: true,
|
|
432
|
+
playground: true
|
|
433
|
+
}
|
|
424
434
|
}
|
|
425
435
|
};
|
|
426
436
|
var methodStyleVars = {
|
|
@@ -445,7 +455,7 @@ function PreviewEnvironment(arg0) {
|
|
|
445
455
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_i18n.ConfigContext.Provider, {
|
|
446
456
|
value: previewConfig,
|
|
447
457
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_i18n.LocaleContext.Provider, {
|
|
448
|
-
value: previewConfig.
|
|
458
|
+
value: previewConfig.locales.default,
|
|
449
459
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_i18n.OpenApiSpecsContext.Provider, {
|
|
450
460
|
value: {},
|
|
451
461
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_PageActions.SectionProvider, {
|
package/output/preview.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preview.cjs","names":[],"sources":["../source/preview/openapi.tsx","../source/preview.tsx"],"sourcesContent":["import { useState } from 'react'\n\nimport { authPlaceholder, defaultServerVariables, getAuthOptions, getServerKey, getServers, RequestExamplesPanel, ResponseExamplesPanel } from '../openapi/components/ExamplePanels'\nimport { EndpointIdentity } from '../openapi/components/OpenApiOperation'\nimport { getMediaTypeEntries, getRequestBody } from '../openapi/lib/helpers'\nimport type { OpenAPIOperation, OpenAPISpec } from '../openapi/lib/utils'\nimport type { OpenApiParameter, RequestAuthInput } from '../openapi/types'\n\nexport type PreviewParameter = {\n name: string\n in: string\n type: string\n required?: boolean\n description?: string\n schema?: unknown\n}\n\nexport type PreviewEndpoint = {\n method: string\n path: string\n summary: string\n description: string\n parameters?: PreviewParameter[]\n requestDescription?: string\n requestSchema?: unknown\n requestExample?: unknown\n response?: string\n responseStatus?: string\n responseDescription?: string\n responseSchema?: unknown\n responseExample?: unknown\n}\n\ntype CreatePreviewOpenApiResult = {\n operation: OpenAPIOperation\n spec: OpenAPISpec\n parameters: OpenApiParameter[]\n}\n\ntype OpenApiExamplesPreviewProps = { endpoint: PreviewEndpoint }\n\ntype UsePreviewRequestStateArgs = {\n spec: OpenAPISpec\n operation: OpenAPIOperation\n}\n\nfunction usePreviewRequestState(arg0: UsePreviewRequestStateArgs) {\n const { spec, operation } = arg0\n const requestBody = getRequestBody(spec, operation)\n const requestContents = getMediaTypeEntries(requestBody?.content, spec)\n const [selectedRequestMediaType, setSelectedRequestMediaType] = useState(requestContents[0]?.mediaType ?? '')\n const selectedRequestContent = requestContents.find((content) => content.mediaType === selectedRequestMediaType) ?? requestContents[0]\n\n return {\n requestContents,\n selectedRequestContent,\n setSelectedRequestMediaType,\n }\n}\n\ntype UsePreviewIdentityStateArgs = {\n spec: OpenAPISpec\n operation: OpenAPIOperation\n path: string\n}\n\nfunction usePreviewIdentityState(arg0: UsePreviewIdentityStateArgs) {\n const { spec, operation, path } = arg0\n const servers = getServers(spec, operation, path)\n const [selectedServerKey, setSelectedServerKey] = useState(getServerKey(servers[0], 0))\n const selectedServer = servers.find((server, index) => getServerKey(server, index) === selectedServerKey) ?? servers[0]\n const [serverVariables, setServerVariables] = useState(defaultServerVariables(selectedServer))\n const [serverOpen, setServerOpen] = useState(false)\n\n const authOptions = getAuthOptions(spec, operation)\n const [selectedAuthName, setSelectedAuthName] = useState(authOptions[0]?.name ?? '')\n const selectedAuth = authOptions.find((option) => option.name === selectedAuthName)\n const [authValues, setAuthValues] = useState<Record<string, string>>({})\n const [authOpen, setAuthOpen] = useState(false)\n\n const authInput: RequestAuthInput | undefined = selectedAuth\n ? { name: selectedAuth.name, scheme: selectedAuth.scheme, value: authValues[selectedAuth.name] ?? authPlaceholder(selectedAuth) }\n : undefined\n\n return {\n servers,\n selectedServerKey,\n selectedServer,\n serverVariables,\n serverOpen,\n authOptions,\n selectedAuthName,\n selectedAuth,\n authValues,\n authOpen,\n authInput,\n onSelectServer: (value: string) => {\n const nextServer = servers.find((server, index) => getServerKey(server, index) === value) ?? servers[0]\n setSelectedServerKey(value)\n setServerVariables(defaultServerVariables(nextServer))\n },\n onChangeServerVariable: (name: string, value: string) => {\n setServerVariables((current) => ({ ...current, [name]: value }))\n },\n onToggleServer: () => {\n setServerOpen((current) => !current)\n setAuthOpen(false)\n },\n onToggleAuth: () => {\n setAuthOpen((current) => !current)\n setServerOpen(false)\n },\n onSelectAuth: setSelectedAuthName,\n onChangeAuthValue: (name: string, value: string) => {\n setAuthValues((current) => ({ ...current, [name]: value }))\n },\n }\n}\n\nfunction schemaFromType(type: string): unknown {\n if (type.endsWith('[]')) return { type: 'array', items: schemaFromType(type.slice(0, -2)) }\n if (type === 'number' || type === 'integer' || type === 'boolean' || type === 'object') return { type }\n return { type: 'string' }\n}\n\nfunction parseResponseExample(endpoint: PreviewEndpoint): unknown {\n if (typeof endpoint.responseExample !== 'undefined') return endpoint.responseExample\n if (!endpoint.response) return undefined\n\n try {\n return JSON.parse(endpoint.response)\n } catch {\n return endpoint.response\n }\n}\n\nfunction inferSchemaFromExample(example: unknown): unknown {\n if (Array.isArray(example)) {\n return { type: 'array', items: inferSchemaFromExample(example[0]) ?? { type: 'object' } }\n }\n\n if (typeof example === 'object' && example !== null) {\n return {\n type: 'object',\n properties: Object.fromEntries(Object.entries(example).map(([key, value]) => [key, inferSchemaFromExample(value)])),\n }\n }\n\n if (typeof example === 'number') return { type: Number.isInteger(example) ? 'integer' : 'number' }\n if (typeof example === 'boolean') return { type: 'boolean' }\n return typeof example === 'undefined' ? undefined : { type: 'string' }\n}\n\nfunction normalizeParameterLocation(location: string): string {\n return location === 'route' ? 'path' : location\n}\n\nfunction toOpenApiParameter(parameter: PreviewParameter): OpenApiParameter {\n return {\n name: parameter.name,\n in: normalizeParameterLocation(parameter.in),\n required: parameter.required,\n description: parameter.description,\n schema: parameter.schema ?? schemaFromType(parameter.type),\n }\n}\n\nfunction createPreviewOpenApi(endpoint: PreviewEndpoint): CreatePreviewOpenApiResult {\n const method = endpoint.method.toLowerCase()\n const parameters = (endpoint.parameters ?? []).map(toOpenApiParameter)\n const responseExample = parseResponseExample(endpoint)\n const responseSchema = endpoint.responseSchema ?? inferSchemaFromExample(responseExample)\n const requestSchema = endpoint.requestSchema ?? inferSchemaFromExample(endpoint.requestExample)\n const operation = {\n summary: endpoint.summary,\n description: endpoint.description,\n parameters,\n requestBody: requestSchema\n ? {\n description: endpoint.requestDescription,\n required: true,\n content: {\n 'application/json': {\n schema: requestSchema,\n example: endpoint.requestExample,\n },\n },\n }\n : undefined,\n responses: {\n [endpoint.responseStatus ?? '200']: {\n description: endpoint.responseDescription ?? 'OK',\n content: {\n 'application/json': {\n schema: responseSchema,\n example: responseExample,\n },\n },\n },\n },\n } as OpenAPIOperation\n const spec = {\n openapi: '3.1.0',\n info: {\n title: 'Clarify Build API',\n version: '2026-06-20',\n description: 'API reference generated from OpenAPI and rendered as static documentation.',\n },\n servers: [\n {\n url: 'https://server',\n description: 'Production',\n },\n {\n url: 'https://test-server',\n description: 'Test',\n },\n ],\n components: {\n securitySchemes: {\n bearerAuth: {\n type: 'http',\n scheme: 'bearer',\n bearerFormat: 'JWT',\n },\n },\n },\n security: [{ bearerAuth: [] }],\n paths: {\n [endpoint.path]: {\n [method]: operation,\n },\n },\n } as OpenAPISpec\n\n return { operation, spec, parameters }\n}\n\nexport function OpenApiExamplesPreview(arg0: OpenApiExamplesPreviewProps) {\n const { endpoint } = arg0\n const { operation, spec, parameters } = createPreviewOpenApi(endpoint)\n const method = endpoint.method.toUpperCase()\n const { requestContents, selectedRequestContent, setSelectedRequestMediaType } = usePreviewRequestState({ spec, operation })\n const identityState = usePreviewIdentityState({ spec, operation, path: endpoint.path })\n\n function renderIdentity() {\n return (\n <EndpointIdentity\n method={method}\n path={endpoint.path}\n operationSource=\"path\"\n servers={identityState.servers}\n selectedServerKey={identityState.selectedServerKey}\n selectedServer={identityState.selectedServer}\n serverVariables={identityState.serverVariables}\n serverOpen={identityState.serverOpen}\n authOptions={identityState.authOptions}\n selectedAuthName={identityState.selectedAuthName}\n selectedAuth={identityState.selectedAuth}\n authValues={identityState.authValues}\n authOpen={identityState.authOpen}\n onSelectServer={identityState.onSelectServer}\n onChangeServerVariable={identityState.onChangeServerVariable}\n onToggleServer={identityState.onToggleServer}\n onToggleAuth={identityState.onToggleAuth}\n onSelectAuth={identityState.onSelectAuth}\n onChangeAuthValue={identityState.onChangeAuthValue}\n />\n )\n }\n\n function renderExamples() {\n return (\n <div className=\"grid min-w-0 gap-4 lg:grid-cols-2\">\n <RequestExamplesPanel\n spec={spec}\n path={endpoint.path}\n method={method}\n parameters={parameters}\n requestContents={requestContents}\n selectedMediaType={selectedRequestContent?.mediaType ?? ''}\n onSelectMediaType={setSelectedRequestMediaType}\n selectedServer={identityState.selectedServer}\n serverVariables={identityState.serverVariables}\n auth={identityState.authInput}\n />\n <ResponseExamplesPanel operation={operation} spec={spec} />\n </div>\n )\n }\n\n return (\n <div className=\"space-y-4\">\n {renderIdentity()}\n {renderExamples()}\n </div>\n )\n}\n","import { Menu, X } from 'lucide-react'\nimport type { ReactNode } from 'react'\nimport { useState } from 'react'\nimport { MemoryRouter } from 'react-router-dom'\n\nimport { SectionProvider } from './app/SectionProvider'\nimport type { Section } from './app/SectionProvider'\nimport { ConfigContext, LocaleContext, OpenApiSpecsContext } from './core/context'\nimport { OpenApiExamplesPreview } from './preview/openapi'\nimport type { PreviewEndpoint } from './preview/openapi'\nimport { Navigation } from './shell'\nimport type { Config, NavigationNode } from './types'\n\nexport type PreviewGuide = {\n label: string\n title: string\n body: string\n embed: string\n outputs?: string[]\n}\n\nexport type PreviewMetric = {\n label: string\n value: string\n hint?: string\n}\n\nexport type PreviewCard = {\n title: string\n description: string\n}\n\nconst embeddedEndpoint = {\n method: 'GET',\n path: '/examples/basic-request',\n summary: 'Basic request',\n description: 'Rendered from api.openapi.json inside the MDX guide.',\n parameters: [\n { name: 'cursor', in: 'query', type: 'string', description: 'Start after this cursor.' },\n { name: 'limit', in: 'query', type: 'integer', description: 'Max items to return.' },\n { name: 'X-Trace-Id', in: 'header', type: 'string', description: 'Optional request trace.' },\n ],\n responseDescription: 'A page of example records.',\n responseSchema: {\n type: 'object',\n required: ['items'],\n properties: {\n items: { type: 'array', items: { type: 'object' } },\n next: { type: 'string' },\n },\n },\n responseExample: {\n items: [],\n next: 'cursor_2',\n },\n} satisfies PreviewEndpoint\n\nconst embeddedGuide = {\n label: 'source/en-US/openapi/embedding.mdx',\n title: 'Embed OpenAPI in MDX',\n body: 'Use MDX for workflow context, then render the exact operation from the spec.',\n embed: '<OpenApiOperation specPath=\"/api\" path=\"/examples/basic-request\" method=\"get\" />',\n outputs: ['/openapi/embedding', '/api', '/api.openapi.json', '/llms.txt'],\n} satisfies PreviewGuide\n\nconst staticOutputEndpoint = {\n method: 'POST',\n path: '/api/{id}/path',\n summary: 'Create static build',\n description: 'Build static docs from MDX and OpenAPI sources.',\n parameters: [\n { name: 'id', in: 'path', type: 'string', required: true, description: 'Project ID.' }\n ],\n responseDescription: 'Build metadata and static outputs.',\n responseSchema: {\n type: 'object',\n required: ['id', 'status', 'outputs'],\n properties: {\n id: { type: 'string', description: 'Build identifier.' },\n status: { type: 'string', enum: ['queued', 'running', 'ready'], description: 'Current build state.' },\n outputs: {\n type: 'array',\n description: 'Generated static artifacts.',\n items: {\n type: 'object',\n required: ['path', 'kind'],\n properties: {\n path: { type: 'string' },\n kind: { type: 'string', enum: ['html', 'asset', 'openapi', 'llms'] },\n },\n },\n },\n },\n },\n requestDescription: 'Static build options.',\n requestSchema: {\n type: 'object',\n required: ['source', 'output'],\n properties: {\n source: { type: 'string', description: 'MDX source root.' },\n output: { type: 'string', description: 'Static output root.' },\n includeSearchIndex: { type: 'boolean', description: 'Generate search data.' },\n },\n },\n requestExample: {\n source: 'source',\n output: 'output',\n includeSearchIndex: true,\n },\n responseExample: {\n id: 'build_01HY',\n status: 'ready',\n outputs: [\n { path: '/openapi/index.html', kind: 'html' },\n { path: '/api.openapi.json', kind: 'openapi' },\n { path: '/llms.txt', kind: 'llms' },\n ],\n },\n} satisfies PreviewEndpoint\n\nconst previewConfig = {\n title: 'Clarify preview',\n description: 'Renderer preview environment',\n rootDirectory: 'source',\n routePrefix: '/',\n assetPrefix: '/',\n outputDirectory: 'output',\n theme: {\n preset: 'default',\n tokens: {\n colors: {\n primary: '#2563eb',\n accent: '#60a5fa',\n background: '#ffffff',\n foreground: '#18181b',\n surface: '#ffffff',\n muted: '#71717a',\n border: 'rgb(24 24 27 / 0.1)',\n codeBackground: '#f4f4f5',\n },\n radius: {\n sm: '0.375rem',\n md: '0.5rem',\n lg: '0.75rem',\n xl: '1rem',\n },\n },\n layout: {\n maxWidth: '88rem',\n },\n editor: false,\n },\n i18n: {\n defaultLocale: 'en',\n missing: 'fallback',\n locales: [{ code: 'en', label: 'English' }],\n },\n} satisfies Config\n\nconst methodStyleVars: Record<string, string> = {\n GET: 'bg-(--clarify-http-method-get-background) text-(--clarify-http-method-get-text)',\n POST: 'bg-(--clarify-http-method-post-background) text-(--clarify-http-method-post-text)',\n PUT: 'bg-(--clarify-http-method-put-background) text-(--clarify-http-method-put-text)',\n PATCH: 'bg-(--clarify-http-method-patch-background) text-(--clarify-http-method-patch-text)',\n DELETE: 'bg-(--clarify-http-method-delete-background) text-(--clarify-http-method-delete-text)',\n}\n\nconst mainPreviewPath = '/openapi/embedding'\n\nconst mainPreviewSections = [\n { id: 'overview', title: 'Overview' },\n { id: 'request-example', title: 'Request example' }\n] satisfies Section[]\n\ntype PreviewEnvironmentProps = { children: ReactNode; initialEntry?: string; sections?: Section[] }\n\nfunction PreviewEnvironment(arg0: PreviewEnvironmentProps) {\n const { children, initialEntry = '/preview', sections = [] } = arg0\n\n return (\n <MemoryRouter initialEntries={[initialEntry]}>\n <ConfigContext.Provider value={previewConfig}>\n <LocaleContext.Provider value={previewConfig.i18n.defaultLocale}>\n <OpenApiSpecsContext.Provider value={{}}>\n <SectionProvider sections={sections}>\n {children}\n </SectionProvider>\n </OpenApiSpecsContext.Provider>\n </LocaleContext.Provider>\n </ConfigContext.Provider>\n </MemoryRouter>\n )\n}\n\ntype ChromeProps = { title: string; status?: string; headerAction?: ReactNode; children: ReactNode }\n\nfunction Chrome(arg0: ChromeProps) {\n const { title, status, headerAction, children } = arg0\n\n return (\n <div className=\"clarify-app clarify-preview h-full overflow-hidden bg-(--clarify-theme-tokens-colors-background) text-(--clarify-ui-text) shadow-2xl ring-1 ring-(--clarify-theme-tokens-colors-border) dark:bg-zinc-950 dark:text-white dark:ring-white/10\">\n <div className=\"flex items-center gap-3 border-b border-(--clarify-theme-tokens-colors-border) px-4 py-3 text-xs/6 text-(--clarify-ui-text-faint) dark:border-white/10\">\n <span className=\"size-2 rounded-full bg-rose-400\" />\n <span className=\"size-2 rounded-full bg-amber-400\" />\n <span className=\"size-2 rounded-full bg-emerald-400\" />\n <span className=\"ml-2 min-w-0 flex-1 truncate font-medium text-(--clarify-ui-text-soft)\">{title}</span>\n {status ? <span className=\"hidden rounded-full bg-emerald-400/15 px-2 py-0.5 font-medium text-emerald-700 sm:inline dark:text-emerald-300\">{status}</span> : null}\n {headerAction}\n </div>\n {children}\n </div>\n )\n}\n\ntype MethodBadgeProps = { method: string }\n\nfunction MethodBadge(arg0: MethodBadgeProps) {\n const method = arg0.method.toUpperCase()\n\n return (\n <span className={`rounded-md px-2.5 py-0.5 text-xs/6 font-black tracking-wide ${methodStyleVars[method] ?? 'bg-(--clarify-http-method-default-background) text-(--clarify-http-method-default-text)'}`}>\n {method}\n </span>\n )\n}\n\ntype CreatePreviewNavigationProps = { endpoint: PreviewEndpoint; guide?: PreviewGuide; outputs: string[] }\n\nfunction createPreviewNavigation(arg0: CreatePreviewNavigationProps): NavigationNode[] {\n const { endpoint, guide, outputs } = arg0\n\n return [\n {\n title: 'Guides',\n path: '/guides',\n icon: 'BookOpenText',\n children: [\n { title: guide?.title ?? 'MDX guide', path: mainPreviewPath, icon: 'FileText' },\n { title: 'Getting started', path: '/getting-started', icon: 'Rocket' },\n ],\n },\n {\n title: 'API Reference',\n path: '/api',\n icon: 'Braces',\n children: [\n { title: endpoint.summary, path: endpoint.path, icon: 'Cable' },\n { title: 'Generate static output', path: staticOutputEndpoint.path, icon: 'UploadCloud' },\n ],\n },\n {\n title: 'Build Output',\n path: '/output',\n icon: 'PackageCheck',\n children: [\n { title: `Routes (${outputs.length})`, path: '/output/routes', icon: 'ListTree' }\n ],\n },\n ] satisfies NavigationNode[]\n}\n\ntype PreviewNavigationProps = { endpoint: PreviewEndpoint; guide?: PreviewGuide; outputs: string[] }\n\nfunction PreviewNavigation(arg0: PreviewNavigationProps) {\n return <Navigation navigation={createPreviewNavigation(arg0)} className=\"px-2\" />\n}\n\ntype MainPreviewMobileNavigationProps = PreviewNavigationProps & { isOpen: boolean; onClose: () => void }\n\nfunction MainPreviewMobileNavigation(arg0: MainPreviewMobileNavigationProps) {\n const { isOpen, onClose, ...navigationProps } = arg0\n const navigationId = 'clarify-main-preview-mobile-navigation'\n\n return (\n <div className=\"clarify-preview-mobile-navigation pointer-events-none absolute inset-0 z-20\">\n {isOpen ? (\n <button\n type=\"button\"\n className=\"absolute inset-0 bg-zinc-950/20 backdrop-blur-[1px] dark:bg-black/30\"\n aria-label=\"Close documentation menu\"\n onClick={onClose}\n />\n ) : null}\n <aside\n id={navigationId}\n className=\"pointer-events-auto absolute top-0 bottom-0 left-0 w-64 max-w-[82%] overflow-y-auto border-r border-(--clarify-theme-tokens-colors-border) bg-(--clarify-theme-tokens-colors-background) px-1 py-4 text-sm/7 shadow-2xl shadow-zinc-900/20 transition-transform duration-200 ease-out data-closed:-translate-x-full dark:border-white/10 dark:bg-zinc-950 dark:shadow-black/40\"\n data-closed={!isOpen ? 'true' : undefined}\n >\n <PreviewNavigation {...navigationProps} />\n </aside>\n </div>\n )\n}\n\ntype PreviewMetricGridProps = { metrics: PreviewMetric[] }\n\nfunction PreviewMetricGrid(arg0: PreviewMetricGridProps) {\n const { metrics } = arg0\n\n return (\n <div className=\"grid grid-cols-1 gap-2 sm:grid-cols-3\">\n {metrics.map((metric) => (\n <div key={metric.label} className=\"rounded-xl border border-(--clarify-theme-tokens-colors-border) bg-(--clarify-theme-tokens-colors-surface) p-2.5 shadow-sm dark:border-white/10 dark:bg-zinc-900/50\">\n <div className=\"text-xs/5 text-(--clarify-ui-text-faint)\">{metric.label}</div>\n <div className=\"text-base/6 font-semibold text-(--clarify-ui-text-strong)\">{metric.value}</div>\n {metric.hint ? <div className=\"text-xs/5 text-(--clarify-ui-text-faint)\">{metric.hint}</div> : null}\n </div>\n ))}\n </div>\n )\n}\n\ntype PreviewLabelProps = { children: ReactNode }\n\nfunction PreviewLabel(arg0: PreviewLabelProps) {\n return <div className=\"text-xs/5 font-semibold uppercase tracking-wider text-(--clarify-ui-text-faint)\">{arg0.children}</div>\n}\n\ntype GuideSummaryPreviewProps = { guide: PreviewGuide }\n\nfunction GuideSummaryPreview(arg0: GuideSummaryPreviewProps) {\n const { guide } = arg0\n\n return (\n <header className=\"border-b border-(--clarify-theme-tokens-colors-border) pb-4 dark:border-white/10\">\n <PreviewLabel>{guide.label}</PreviewLabel>\n <h2 className=\"mt-1 text-xl/7 font-semibold tracking-tight text-(--clarify-ui-text-strong)\">{guide.title}</h2>\n <p className=\"mt-2 max-w-2xl text-sm/6 text-(--clarify-ui-text-soft)\">{guide.body}</p>\n <pre className=\"mt-3 overflow-hidden rounded-xl bg-zinc-950 px-3 py-2 text-xs/5 whitespace-pre-wrap text-zinc-300\">{guide.embed}</pre>\n </header>\n )\n}\n\ntype EndpointSummaryPreviewProps = { endpoint: PreviewEndpoint }\n\nfunction EndpointSummaryPreview(arg0: EndpointSummaryPreviewProps) {\n const { endpoint } = arg0\n\n return (\n <div className=\"min-w-0\">\n <div className=\"flex flex-wrap items-center gap-3\">\n <MethodBadge method={endpoint.method} />\n <code className=\"text-sm font-medium text-(--clarify-ui-text)\">{endpoint.path}</code>\n </div>\n <h3 className=\"mt-3 text-lg/7 font-semibold tracking-tight text-(--clarify-ui-text-strong)\">{endpoint.summary}</h3>\n <p className=\"mt-1 text-sm/6 text-(--clarify-ui-text-soft)\">{endpoint.description}</p>\n </div>\n )\n}\n\ntype EmbeddedApiPreviewProps = { endpoint: PreviewEndpoint }\n\nfunction EmbeddedApiPreview(arg0: EmbeddedApiPreviewProps) {\n const { endpoint } = arg0\n\n return (\n <div className=\"clarify-preview-api-frame min-w-0 overflow-hidden border-t border-(--clarify-theme-tokens-colors-border) pt-4 dark:border-white/10\">\n <div className=\"clarify-preview-api-content clarify-preview-api-content-embedded\">\n <OpenApiExamplesPreview endpoint={endpoint} />\n </div>\n </div>\n )\n}\n\ntype OutputListPreviewProps = { outputs: string[] }\n\nfunction OutputListPreview(arg0: OutputListPreviewProps) {\n const { outputs } = arg0\n\n return (\n <div className=\"border-t border-(--clarify-theme-tokens-colors-border) pt-4 dark:border-white/10\">\n <PreviewLabel>Static output</PreviewLabel>\n <div className=\"mt-3 grid gap-2 sm:grid-cols-2 xl:grid-cols-4\">\n {outputs.map((output) => (\n <div key={output} className=\"flex items-center gap-2 rounded-lg bg-(--clarify-ui-subtle-background) px-3 py-2 text-xs/5 text-(--clarify-ui-text-soft) dark:bg-white/5\">\n <span className=\"size-1.5 rounded-full bg-emerald-400\" />\n <span className=\"truncate font-mono\">{output}</span>\n </div>\n ))}\n </div>\n </div>\n )\n}\n\nfunction MainContentPreview() {\n return (\n <section className=\"min-w-0 bg-(--clarify-theme-tokens-colors-background) px-5 py-4 dark:bg-zinc-950\">\n <div className=\"clarify-preview-content-window overflow-hidden\">\n <div className=\"space-y-4\">\n <GuideSummaryPreview guide={embeddedGuide} />\n <PreviewMetricGrid metrics={[\n { label: 'MDX', value: 'Guide', hint: 'context' },\n { label: 'Spec', value: 'OpenAPI', hint: 'source' },\n { label: 'Out', value: 'Static', hint: 'CDN' },\n ]} />\n <div className=\"clarify-preview-endpoint-grid grid gap-4\">\n <EndpointSummaryPreview endpoint={embeddedEndpoint} />\n <EmbeddedApiPreview endpoint={embeddedEndpoint} />\n </div>\n <OutputListPreview outputs={embeddedGuide.outputs ?? []} />\n </div>\n </div>\n </section>\n )\n}\n\nexport function MainPreview() {\n const [isMobileNavigationOpen, setMobileNavigationOpen] = useState(false)\n const navigationProps = { endpoint: embeddedEndpoint, guide: embeddedGuide, outputs: embeddedGuide.outputs ?? [] }\n\n return (\n <PreviewEnvironment initialEntry={mainPreviewPath} sections={mainPreviewSections}>\n <Chrome\n title=\"source/en-US/openapi/embedding.mdx\"\n status=\"Rendered from OpenAPI + MDX\"\n headerAction={\n <button\n type=\"button\"\n className=\"clarify-preview-mobile-menu-button -my-1 flex size-7 items-center justify-center rounded-(--clarify-theme-tokens-radius-md) text-(--clarify-ui-text-strong) transition hover:bg-(--clarify-ui-hover-background)\"\n aria-controls=\"clarify-main-preview-mobile-navigation\"\n aria-expanded={isMobileNavigationOpen}\n aria-label={isMobileNavigationOpen ? 'Close documentation menu' : 'Open documentation menu'}\n onClick={() => setMobileNavigationOpen((value) => !value)}\n >\n {isMobileNavigationOpen ? <X className=\"h-4 w-4 shrink-0\" /> : <Menu className=\"h-4 w-4 shrink-0\" />}\n </button>\n }\n >\n <div className=\"clarify-preview-shell relative grid overflow-hidden\">\n <MainPreviewMobileNavigation {...navigationProps} isOpen={isMobileNavigationOpen} onClose={() => setMobileNavigationOpen(false)} />\n <aside className=\"clarify-preview-sidebar border-r border-(--clarify-theme-tokens-colors-border) px-1 py-4 text-sm/7 dark:border-white/10 dark:bg-white/5\">\n <PreviewNavigation {...navigationProps} />\n </aside>\n <MainContentPreview />\n </div>\n </Chrome>\n </PreviewEnvironment>\n )\n}\n\nexport function MdxPreview() {\n return (\n <PreviewEnvironment>\n <Chrome title=\"source/started/index.mdx\" status=\"Rendered by renderer\">\n <div className=\"clarify-preview-body overflow-x-hidden overflow-y-auto bg-(--clarify-theme-tokens-colors-background) p-4 sm:p-5 dark:bg-zinc-950\">\n <article className=\"max-w-3xl text-sm/7 text-(--clarify-ui-text-soft)\">\n <div className=\"inline-flex rounded-full bg-(--clarify-ui-accent-background) px-3 py-1 text-xs/5 font-semibold text-(--clarify-ui-accent-text)\">MDX page</div>\n <h2 className=\"mt-3 text-xl/7 font-semibold tracking-tight text-(--clarify-ui-text-strong) sm:text-2xl/8\">Get Started</h2>\n <p className=\"mt-3\">Write pages in source/. Clarify turns MDX, config, and OpenAPI files into routes.</p>\n <div className=\"mt-4 rounded-2xl border border-(--clarify-ui-accent-border) bg-(--clarify-ui-accent-background) p-4 text-sm/6 text-(--clarify-ui-text-strong) sm:mt-5\">\n <div className=\"font-semibold text-(--clarify-ui-text-strong)\">Static output ready</div>\n <p className=\"mt-1\">output/ is plain static files.</p>\n </div>\n <div className=\"mt-4 grid gap-3 sm:mt-5 sm:grid-cols-2 sm:gap-4\">\n <div className=\"rounded-2xl border border-(--clarify-theme-tokens-colors-border) bg-(--clarify-theme-tokens-colors-surface) p-5 shadow-sm dark:border-white/10 dark:bg-zinc-900/50\">\n <h3 className=\"text-base/6 font-semibold text-(--clarify-ui-text-strong)\">MDX pages</h3>\n <p className=\"mt-2 text-sm/6\">Guides live beside code.</p>\n </div>\n <div className=\"rounded-2xl border border-(--clarify-theme-tokens-colors-border) bg-(--clarify-theme-tokens-colors-surface) p-5 shadow-sm dark:border-white/10 dark:bg-zinc-900/50\">\n <h3 className=\"text-base/6 font-semibold text-(--clarify-ui-text-strong)\">API embeds</h3>\n <p className=\"mt-2 text-sm/6\">Specs render inline.</p>\n </div>\n </div>\n <div className=\"mt-5 rounded-2xl border border-(--clarify-theme-tokens-colors-border) bg-(--clarify-theme-tokens-colors-surface) p-5 shadow-sm dark:border-white/10 dark:bg-zinc-900/50\">\n <div className=\"flex items-center gap-3\">\n <MethodBadge method={embeddedEndpoint.method} />\n <code className=\"text-sm font-medium text-(--clarify-ui-text)\">{embeddedEndpoint.path}</code>\n </div>\n <p className=\"mt-3 text-sm/6\">{embeddedEndpoint.description}</p>\n </div>\n </article>\n </div>\n </Chrome>\n </PreviewEnvironment>\n )\n}\n\nexport function OpenApiPreview() {\n return (\n <PreviewEnvironment>\n <Chrome title=\"source/api.openapi.json\" status=\"Endpoint + examples\">\n <div className=\"clarify-preview-openapi-window overflow-x-hidden overflow-y-auto bg-(--clarify-theme-tokens-colors-background) px-3 py-3 sm:px-4 sm:py-4 dark:bg-zinc-950\">\n <div className=\"clarify-preview-openapi-mask min-h-full\">\n <div className=\"clarify-preview-api-content clarify-preview-api-content-openapi origin-top pb-6 sm:pb-10\">\n <OpenApi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,KAAD;OAAG,WAAU;iBAAkB,iBAAiB;MAAe,CAAA,CAC5D;;IACE;;EACN,CAAA;CACC,CAAA,EACU,CAAA;AAExB;AAEA,SAAgB,iBAAiB;CAC/B,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,oBAAD,EAAA,UACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;EAAQ,OAAM;EAA0B,QAAO;YAC7C,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;GAAK,WAAU;aACb,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;IAAK,WAAU;cACb,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;KAAK,WAAU;eACb,iBAAA,GAAA,kBAAA,IAAA,CAAC,wBAAD,EAAwB,UAAU,qBAAuB,CAAA;IACtD,CAAA;GACF,CAAA;EACF,CAAA;CACC,CAAA,EACU,CAAA;AAExB"}
|
|
1
|
+
{"version":3,"file":"preview.cjs","names":[],"sources":["../source/preview/openapi.tsx","../source/preview.tsx"],"sourcesContent":["import { useState } from 'react'\n\nimport { authPlaceholder, defaultServerVariables, getAuthOptions, getServerKey, getServers, RequestExamplesPanel, ResponseExamplesPanel } from '../openapi/components/ExamplePanels'\nimport { EndpointIdentity } from '../openapi/components/OpenApiOperation'\nimport { getMediaTypeEntries, getRequestBody } from '../openapi/lib/helpers'\nimport type { OpenAPIOperation, OpenAPISpec } from '../openapi/lib/utils'\nimport type { OpenApiParameter, RequestAuthInput } from '../openapi/types'\n\nexport type PreviewParameter = {\n name: string\n in: string\n type: string\n required?: boolean\n description?: string\n schema?: unknown\n}\n\nexport type PreviewEndpoint = {\n method: string\n path: string\n summary: string\n description: string\n parameters?: PreviewParameter[]\n requestDescription?: string\n requestSchema?: unknown\n requestExample?: unknown\n response?: string\n responseStatus?: string\n responseDescription?: string\n responseSchema?: unknown\n responseExample?: unknown\n}\n\ntype CreatePreviewOpenApiResult = {\n operation: OpenAPIOperation\n spec: OpenAPISpec\n parameters: OpenApiParameter[]\n}\n\ntype OpenApiExamplesPreviewProps = { endpoint: PreviewEndpoint }\n\ntype UsePreviewRequestStateArgs = {\n spec: OpenAPISpec\n operation: OpenAPIOperation\n}\n\nfunction usePreviewRequestState(arg0: UsePreviewRequestStateArgs) {\n const { spec, operation } = arg0\n const requestBody = getRequestBody(spec, operation)\n const requestContents = getMediaTypeEntries(requestBody?.content, spec)\n const [selectedRequestMediaType, setSelectedRequestMediaType] = useState(requestContents[0]?.mediaType ?? '')\n const selectedRequestContent = requestContents.find((content) => content.mediaType === selectedRequestMediaType) ?? requestContents[0]\n\n return {\n requestContents,\n selectedRequestContent,\n setSelectedRequestMediaType,\n }\n}\n\ntype UsePreviewIdentityStateArgs = {\n spec: OpenAPISpec\n operation: OpenAPIOperation\n path: string\n}\n\nfunction usePreviewIdentityState(arg0: UsePreviewIdentityStateArgs) {\n const { spec, operation, path } = arg0\n const servers = getServers(spec, operation, path)\n const [selectedServerKey, setSelectedServerKey] = useState(getServerKey(servers[0], 0))\n const selectedServer = servers.find((server, index) => getServerKey(server, index) === selectedServerKey) ?? servers[0]\n const [serverVariables, setServerVariables] = useState(defaultServerVariables(selectedServer))\n const [serverOpen, setServerOpen] = useState(false)\n\n const authOptions = getAuthOptions(spec, operation)\n const [selectedAuthName, setSelectedAuthName] = useState(authOptions[0]?.key ?? '')\n const selectedAuth = authOptions.find((option) => option.key === selectedAuthName)\n const [authValues, setAuthValues] = useState<Record<string, string>>({})\n const [authOpen, setAuthOpen] = useState(false)\n\n const authInput: RequestAuthInput[] | undefined = selectedAuth\n ? selectedAuth.schemes.map((option) => ({ name: option.name, scheme: option.scheme, value: authValues[option.name] ?? authPlaceholder(option) }))\n : undefined\n\n return {\n servers,\n selectedServerKey,\n selectedServer,\n serverVariables,\n serverOpen,\n authOptions,\n selectedAuthName,\n selectedAuth,\n authValues,\n authOpen,\n authInput,\n onSelectServer: (value: string) => {\n const nextServer = servers.find((server, index) => getServerKey(server, index) === value) ?? servers[0]\n setSelectedServerKey(value)\n setServerVariables(defaultServerVariables(nextServer))\n },\n onChangeServerVariable: (name: string, value: string) => {\n setServerVariables((current) => ({ ...current, [name]: value }))\n },\n onToggleServer: () => {\n setServerOpen((current) => !current)\n setAuthOpen(false)\n },\n onToggleAuth: () => {\n setAuthOpen((current) => !current)\n setServerOpen(false)\n },\n onSelectAuth: setSelectedAuthName,\n onChangeAuthValue: (name: string, value: string) => {\n setAuthValues((current) => ({ ...current, [name]: value }))\n },\n onClearAuthValue: (name: string) => {\n setAuthValues((current) => {\n const values = { ...current }\n delete values[name]\n return values\n })\n },\n onClearAuthValues: () => setAuthValues({}),\n }\n}\n\nfunction schemaFromType(type: string): unknown {\n if (type.endsWith('[]')) return { type: 'array', items: schemaFromType(type.slice(0, -2)) }\n if (type === 'number' || type === 'integer' || type === 'boolean' || type === 'object') return { type }\n return { type: 'string' }\n}\n\nfunction parseResponseExample(endpoint: PreviewEndpoint): unknown {\n if (typeof endpoint.responseExample !== 'undefined') return endpoint.responseExample\n if (!endpoint.response) return undefined\n\n try {\n return JSON.parse(endpoint.response)\n } catch {\n return endpoint.response\n }\n}\n\nfunction inferSchemaFromExample(example: unknown): unknown {\n if (Array.isArray(example)) {\n return { type: 'array', items: inferSchemaFromExample(example[0]) ?? { type: 'object' } }\n }\n\n if (typeof example === 'object' && example !== null) {\n return {\n type: 'object',\n properties: Object.fromEntries(Object.entries(example).map(([key, value]) => [key, inferSchemaFromExample(value)])),\n }\n }\n\n if (typeof example === 'number') return { type: Number.isInteger(example) ? 'integer' : 'number' }\n if (typeof example === 'boolean') return { type: 'boolean' }\n return typeof example === 'undefined' ? undefined : { type: 'string' }\n}\n\nfunction normalizeParameterLocation(location: string): string {\n return location === 'route' ? 'path' : location\n}\n\nfunction toOpenApiParameter(parameter: PreviewParameter): OpenApiParameter {\n return {\n name: parameter.name,\n in: normalizeParameterLocation(parameter.in),\n required: parameter.required,\n description: parameter.description,\n schema: parameter.schema ?? schemaFromType(parameter.type),\n }\n}\n\nfunction createPreviewOpenApi(endpoint: PreviewEndpoint): CreatePreviewOpenApiResult {\n const method = endpoint.method.toLowerCase()\n const parameters = (endpoint.parameters ?? []).map(toOpenApiParameter)\n const responseExample = parseResponseExample(endpoint)\n const responseSchema = endpoint.responseSchema ?? inferSchemaFromExample(responseExample)\n const requestSchema = endpoint.requestSchema ?? inferSchemaFromExample(endpoint.requestExample)\n const operation = {\n summary: endpoint.summary,\n description: endpoint.description,\n parameters,\n requestBody: requestSchema\n ? {\n description: endpoint.requestDescription,\n required: true,\n content: {\n 'application/json': {\n schema: requestSchema,\n example: endpoint.requestExample,\n },\n },\n }\n : undefined,\n responses: {\n [endpoint.responseStatus ?? '200']: {\n description: endpoint.responseDescription ?? 'OK',\n content: {\n 'application/json': {\n schema: responseSchema,\n example: responseExample,\n },\n },\n },\n },\n } as OpenAPIOperation\n const spec = {\n openapi: '3.1.0',\n info: {\n title: 'Clarify Build API',\n version: '2026-06-20',\n description: 'API reference generated from OpenAPI and rendered as static documentation.',\n },\n servers: [\n {\n url: 'https://server',\n description: 'Production',\n },\n {\n url: 'https://test-server',\n description: 'Test',\n },\n ],\n components: {\n securitySchemes: {\n bearerAuth: {\n type: 'http',\n scheme: 'bearer',\n bearerFormat: 'JWT',\n },\n },\n },\n security: [{ bearerAuth: [] }],\n paths: {\n [endpoint.path]: {\n [method]: operation,\n },\n },\n } as OpenAPISpec\n\n return { operation, spec, parameters }\n}\n\nexport function OpenApiExamplesPreview(arg0: OpenApiExamplesPreviewProps) {\n const { endpoint } = arg0\n const { operation, spec, parameters } = createPreviewOpenApi(endpoint)\n const method = endpoint.method.toUpperCase()\n const { requestContents, selectedRequestContent, setSelectedRequestMediaType } = usePreviewRequestState({ spec, operation })\n const identityState = usePreviewIdentityState({ spec, operation, path: endpoint.path })\n\n function renderIdentity() {\n return (\n <EndpointIdentity\n method={method}\n path={endpoint.path}\n operationSource=\"path\"\n servers={identityState.servers}\n selectedServerKey={identityState.selectedServerKey}\n selectedServer={identityState.selectedServer}\n serverVariables={identityState.serverVariables}\n serverOpen={identityState.serverOpen}\n onSelectServer={identityState.onSelectServer}\n onChangeServerVariable={identityState.onChangeServerVariable}\n onToggleServer={identityState.onToggleServer}\n />\n )\n }\n\n function renderExamples() {\n return (\n <div className=\"grid min-w-0 gap-4 lg:grid-cols-2\">\n <RequestExamplesPanel\n spec={spec}\n path={endpoint.path}\n method={method}\n parameters={parameters}\n requestContents={requestContents}\n selectedMediaType={selectedRequestContent?.mediaType ?? ''}\n onSelectMediaType={setSelectedRequestMediaType}\n selectedServer={identityState.selectedServer}\n serverVariables={identityState.serverVariables}\n auth={identityState.authInput}\n />\n <ResponseExamplesPanel operation={operation} spec={spec} />\n </div>\n )\n }\n\n return (\n <div className=\"space-y-4\">\n {renderIdentity()}\n {renderExamples()}\n </div>\n )\n}\n","import { Menu, X } from 'lucide-react'\nimport type { ReactNode } from 'react'\nimport { useState } from 'react'\nimport { MemoryRouter } from 'react-router-dom'\n\nimport { SectionProvider } from './app/SectionProvider'\nimport type { Section } from './app/SectionProvider'\nimport { ConfigContext, LocaleContext, OpenApiSpecsContext } from './core/context'\nimport { OpenApiExamplesPreview } from './preview/openapi'\nimport type { PreviewEndpoint } from './preview/openapi'\nimport { Navigation } from './shell'\nimport type { Config, NavigationNode } from './types'\n\nexport type PreviewGuide = {\n label: string\n title: string\n body: string\n embed: string\n outputs?: string[]\n}\n\nexport type PreviewMetric = {\n label: string\n value: string\n hint?: string\n}\n\nexport type PreviewCard = {\n title: string\n description: string\n}\n\nconst embeddedEndpoint = {\n method: 'GET',\n path: '/examples/basic-request',\n summary: 'Basic request',\n description: 'Rendered from api.openapi.json inside the MDX guide.',\n parameters: [\n { name: 'cursor', in: 'query', type: 'string', description: 'Start after this cursor.' },\n { name: 'limit', in: 'query', type: 'integer', description: 'Max items to return.' },\n { name: 'X-Trace-Id', in: 'header', type: 'string', description: 'Optional request trace.' },\n ],\n responseDescription: 'A page of example records.',\n responseSchema: {\n type: 'object',\n required: ['items'],\n properties: {\n items: { type: 'array', items: { type: 'object' } },\n next: { type: 'string' },\n },\n },\n responseExample: {\n items: [],\n next: 'cursor_2',\n },\n} satisfies PreviewEndpoint\n\nconst embeddedGuide = {\n label: 'source/en-US/openapi/embedding.mdx',\n title: 'Embed OpenAPI in MDX',\n body: 'Use MDX for workflow context, then render the exact operation from the spec.',\n embed: '<OpenApiOperation specPath=\"/api\" path=\"/examples/basic-request\" method=\"get\" />',\n outputs: ['/openapi/embedding', '/api', '/api.openapi.json', '/llms.txt'],\n} satisfies PreviewGuide\n\nconst staticOutputEndpoint = {\n method: 'POST',\n path: '/api/{id}/path',\n summary: 'Create static build',\n description: 'Build static docs from MDX and OpenAPI sources.',\n parameters: [\n { name: 'id', in: 'path', type: 'string', required: true, description: 'Project ID.' }\n ],\n responseDescription: 'Build metadata and static outputs.',\n responseSchema: {\n type: 'object',\n required: ['id', 'status', 'outputs'],\n properties: {\n id: { type: 'string', description: 'Build identifier.' },\n status: { type: 'string', enum: ['queued', 'running', 'ready'], description: 'Current build state.' },\n outputs: {\n type: 'array',\n description: 'Generated static artifacts.',\n items: {\n type: 'object',\n required: ['path', 'kind'],\n properties: {\n path: { type: 'string' },\n kind: { type: 'string', enum: ['html', 'asset', 'openapi', 'llms'] },\n },\n },\n },\n },\n },\n requestDescription: 'Static build options.',\n requestSchema: {\n type: 'object',\n required: ['source', 'output'],\n properties: {\n source: { type: 'string', description: 'MDX source root.' },\n output: { type: 'string', description: 'Static output root.' },\n includeSearchIndex: { type: 'boolean', description: 'Generate search data.' },\n },\n },\n requestExample: {\n source: 'source',\n output: 'output',\n includeSearchIndex: true,\n },\n responseExample: {\n id: 'build_01HY',\n status: 'ready',\n outputs: [\n { path: '/openapi/index.html', kind: 'html' },\n { path: '/api.openapi.json', kind: 'openapi' },\n { path: '/llms.txt', kind: 'llms' },\n ],\n },\n} satisfies PreviewEndpoint\n\nconst previewConfig = {\n title: 'Clarify preview',\n description: 'Renderer preview environment',\n routePrefix: '/',\n assetPrefix: '/',\n theme: {\n preset: 'default',\n tokens: {\n colors: {\n primary: '#2563eb',\n accent: '#60a5fa',\n background: '#ffffff',\n foreground: '#18181b',\n surface: '#ffffff',\n muted: '#71717a',\n border: 'rgb(24 24 27 / 0.1)',\n codeBackground: '#f4f4f5',\n },\n radius: {\n sm: '0.375rem',\n md: '0.5rem',\n lg: '0.75rem',\n xl: '1rem',\n },\n },\n layout: {\n maxWidth: '88rem',\n },\n },\n locales: {\n default: 'en',\n missing: 'fallback',\n locales: [{ code: 'en', label: 'English' }],\n },\n variables: {},\n features: {\n search: { enabled: true, provider: 'pagefind' },\n repository: { enabled: true },\n themeEditor: { enabled: true },\n openapi: { enabled: true, playground: true },\n },\n} satisfies Config\n\nconst methodStyleVars: Record<string, string> = {\n GET: 'bg-(--clarify-http-method-get-background) text-(--clarify-http-method-get-text)',\n POST: 'bg-(--clarify-http-method-post-background) text-(--clarify-http-method-post-text)',\n PUT: 'bg-(--clarify-http-method-put-background) text-(--clarify-http-method-put-text)',\n PATCH: 'bg-(--clarify-http-method-patch-background) text-(--clarify-http-method-patch-text)',\n DELETE: 'bg-(--clarify-http-method-delete-background) text-(--clarify-http-method-delete-text)',\n}\n\nconst mainPreviewPath = '/openapi/embedding'\n\nconst mainPreviewSections = [\n { id: 'overview', title: 'Overview' },\n { id: 'request-example', title: 'Request example' }\n] satisfies Section[]\n\ntype PreviewEnvironmentProps = { children: ReactNode; initialEntry?: string; sections?: Section[] }\n\nfunction PreviewEnvironment(arg0: PreviewEnvironmentProps) {\n const { children, initialEntry = '/preview', sections = [] } = arg0\n\n return (\n <MemoryRouter initialEntries={[initialEntry]}>\n <ConfigContext.Provider value={previewConfig}>\n <LocaleContext.Provider value={previewConfig.locales.default}>\n <OpenApiSpecsContext.Provider value={{}}>\n <SectionProvider sections={sections}>\n {children}\n </SectionProvider>\n </OpenApiSpecsContext.Provider>\n </LocaleContext.Provider>\n </ConfigContext.Provider>\n </MemoryRouter>\n )\n}\n\ntype ChromeProps = { title: string; status?: string; headerAction?: ReactNode; children: ReactNode }\n\nfunction Chrome(arg0: ChromeProps) {\n const { title, status, headerAction, children } = arg0\n\n return (\n <div className=\"clarify-app clarify-preview h-full overflow-hidden bg-(--clarify-theme-tokens-colors-background) text-(--clarify-ui-text) shadow-2xl ring-1 ring-(--clarify-theme-tokens-colors-border) dark:bg-zinc-950 dark:text-white dark:ring-white/10\">\n <div className=\"flex items-center gap-3 border-b border-(--clarify-theme-tokens-colors-border) px-4 py-3 text-xs/6 text-(--clarify-ui-text-faint) dark:border-white/10\">\n <span className=\"size-2 rounded-full bg-rose-400\" />\n <span className=\"size-2 rounded-full bg-amber-400\" />\n <span className=\"size-2 rounded-full bg-emerald-400\" />\n <span className=\"ml-2 min-w-0 flex-1 truncate font-medium text-(--clarify-ui-text-soft)\">{title}</span>\n {status ? <span className=\"hidden rounded-full bg-emerald-400/15 px-2 py-0.5 font-medium text-emerald-700 sm:inline dark:text-emerald-300\">{status}</span> : null}\n {headerAction}\n </div>\n {children}\n </div>\n )\n}\n\ntype MethodBadgeProps = { method: string }\n\nfunction MethodBadge(arg0: MethodBadgeProps) {\n const method = arg0.method.toUpperCase()\n\n return (\n <span className={`rounded-md px-2.5 py-0.5 text-xs/6 font-black tracking-wide ${methodStyleVars[method] ?? 'bg-(--clarify-http-method-default-background) text-(--clarify-http-method-default-text)'}`}>\n {method}\n </span>\n )\n}\n\ntype CreatePreviewNavigationProps = { endpoint: PreviewEndpoint; guide?: PreviewGuide; outputs: string[] }\n\nfunction createPreviewNavigation(arg0: CreatePreviewNavigationProps): NavigationNode[] {\n const { endpoint, guide, outputs } = arg0\n\n return [\n {\n title: 'Guides',\n path: '/guides',\n icon: 'BookOpenText',\n children: [\n { title: guide?.title ?? 'MDX guide', path: mainPreviewPath, icon: 'FileText' },\n { title: 'Getting started', path: '/getting-started', icon: 'Rocket' },\n ],\n },\n {\n title: 'API Reference',\n path: '/api',\n icon: 'Braces',\n children: [\n { title: endpoint.summary, path: endpoint.path, icon: 'Cable' },\n { title: 'Generate static output', path: staticOutputEndpoint.path, icon: 'UploadCloud' },\n ],\n },\n {\n title: 'Build Output',\n path: '/output',\n icon: 'PackageCheck',\n children: [\n { title: `Routes (${outputs.length})`, path: '/output/routes', icon: 'ListTree' }\n ],\n },\n ] satisfies NavigationNode[]\n}\n\ntype PreviewNavigationProps = { endpoint: PreviewEndpoint; guide?: PreviewGuide; outputs: string[] }\n\nfunction PreviewNavigation(arg0: PreviewNavigationProps) {\n return <Navigation navigation={createPreviewNavigation(arg0)} className=\"px-2\" />\n}\n\ntype MainPreviewMobileNavigationProps = PreviewNavigationProps & { isOpen: boolean; onClose: () => void }\n\nfunction MainPreviewMobileNavigation(arg0: MainPreviewMobileNavigationProps) {\n const { isOpen, onClose, ...navigationProps } = arg0\n const navigationId = 'clarify-main-preview-mobile-navigation'\n\n return (\n <div className=\"clarify-preview-mobile-navigation pointer-events-none absolute inset-0 z-20\">\n {isOpen ? (\n <button\n type=\"button\"\n className=\"absolute inset-0 bg-zinc-950/20 backdrop-blur-[1px] dark:bg-black/30\"\n aria-label=\"Close documentation menu\"\n onClick={onClose}\n />\n ) : null}\n <aside\n id={navigationId}\n className=\"pointer-events-auto absolute top-0 bottom-0 left-0 w-64 max-w-[82%] overflow-y-auto border-r border-(--clarify-theme-tokens-colors-border) bg-(--clarify-theme-tokens-colors-background) px-1 py-4 text-sm/7 shadow-2xl shadow-zinc-900/20 transition-transform duration-200 ease-out data-closed:-translate-x-full dark:border-white/10 dark:bg-zinc-950 dark:shadow-black/40\"\n data-closed={!isOpen ? 'true' : undefined}\n >\n <PreviewNavigation {...navigationProps} />\n </aside>\n </div>\n )\n}\n\ntype PreviewMetricGridProps = { metrics: PreviewMetric[] }\n\nfunction PreviewMetricGrid(arg0: PreviewMetricGridProps) {\n const { metrics } = arg0\n\n return (\n <div className=\"grid grid-cols-1 gap-2 sm:grid-cols-3\">\n {metrics.map((metric) => (\n <div key={metric.label} className=\"rounded-xl border border-(--clarify-theme-tokens-colors-border) bg-(--clarify-theme-tokens-colors-surface) p-2.5 shadow-sm dark:border-white/10 dark:bg-zinc-900/50\">\n <div className=\"text-xs/5 text-(--clarify-ui-text-faint)\">{metric.label}</div>\n <div className=\"text-base/6 font-semibold text-(--clarify-ui-text-strong)\">{metric.value}</div>\n {metric.hint ? <div className=\"text-xs/5 text-(--clarify-ui-text-faint)\">{metric.hint}</div> : null}\n </div>\n ))}\n </div>\n )\n}\n\ntype PreviewLabelProps = { children: ReactNode }\n\nfunction PreviewLabel(arg0: PreviewLabelProps) {\n return <div className=\"text-xs/5 font-semibold uppercase tracking-wider text-(--clarify-ui-text-faint)\">{arg0.children}</div>\n}\n\ntype GuideSummaryPreviewProps = { guide: PreviewGuide }\n\nfunction GuideSummaryPreview(arg0: GuideSummaryPreviewProps) {\n const { guide } = arg0\n\n return (\n <header className=\"border-b border-(--clarify-theme-tokens-colors-border) pb-4 dark:border-white/10\">\n <PreviewLabel>{guide.label}</PreviewLabel>\n <h2 className=\"mt-1 text-xl/7 font-semibold tracking-tight text-(--clarify-ui-text-strong)\">{guide.title}</h2>\n <p className=\"mt-2 max-w-2xl text-sm/6 text-(--clarify-ui-text-soft)\">{guide.body}</p>\n <pre className=\"mt-3 overflow-hidden rounded-xl bg-zinc-950 px-3 py-2 text-xs/5 whitespace-pre-wrap text-zinc-300\">{guide.embed}</pre>\n </header>\n )\n}\n\ntype EndpointSummaryPreviewProps = { endpoint: PreviewEndpoint }\n\nfunction EndpointSummaryPreview(arg0: EndpointSummaryPreviewProps) {\n const { endpoint } = arg0\n\n return (\n <div className=\"min-w-0\">\n <div className=\"flex flex-wrap items-center gap-3\">\n <MethodBadge method={endpoint.method} />\n <code className=\"text-sm font-medium text-(--clarify-ui-text)\">{endpoint.path}</code>\n </div>\n <h3 className=\"mt-3 text-lg/7 font-semibold tracking-tight text-(--clarify-ui-text-strong)\">{endpoint.summary}</h3>\n <p className=\"mt-1 text-sm/6 text-(--clarify-ui-text-soft)\">{endpoint.description}</p>\n </div>\n )\n}\n\ntype EmbeddedApiPreviewProps = { endpoint: PreviewEndpoint }\n\nfunction EmbeddedApiPreview(arg0: EmbeddedApiPreviewProps) {\n const { endpoint } = arg0\n\n return (\n <div className=\"clarify-preview-api-frame min-w-0 overflow-hidden border-t border-(--clarify-theme-tokens-colors-border) pt-4 dark:border-white/10\">\n <div className=\"clarify-preview-api-content clarify-preview-api-content-embedded\">\n <OpenApiExamplesPreview endpoint={endpoint} />\n </div>\n </div>\n )\n}\n\ntype OutputListPreviewProps = { outputs: string[] }\n\nfunction OutputListPreview(arg0: OutputListPreviewProps) {\n const { outputs } = arg0\n\n return (\n <div className=\"border-t border-(--clarify-theme-tokens-colors-border) pt-4 dark:border-white/10\">\n <PreviewLabel>Static output</PreviewLabel>\n <div className=\"mt-3 grid gap-2 sm:grid-cols-2 xl:grid-cols-4\">\n {outputs.map((output) => (\n <div key={output} className=\"flex items-center gap-2 rounded-lg bg-(--clarify-ui-subtle-background) px-3 py-2 text-xs/5 text-(--clarify-ui-text-soft) dark:bg-white/5\">\n <span className=\"size-1.5 rounded-full bg-emerald-400\" />\n <span className=\"truncate font-mono\">{output}</span>\n </div>\n ))}\n </div>\n </div>\n )\n}\n\nfunction MainContentPreview() {\n return (\n <section className=\"min-w-0 bg-(--clarify-theme-tokens-colors-background) px-5 py-4 dark:bg-zinc-950\">\n <div className=\"clarify-preview-content-window overflow-hidden\">\n <div className=\"space-y-4\">\n <GuideSummaryPreview guide={embeddedGuide} />\n <PreviewMetricGrid metrics={[\n { label: 'MDX', value: 'Guide', hint: 'context' },\n { label: 'Spec', value: 'OpenAPI', hint: 'source' },\n { label: 'Out', value: 'Static', hint: 'CDN' },\n ]} />\n <div className=\"clarify-preview-endpoint-grid grid gap-4\">\n <EndpointSummaryPreview endpoint={embeddedEndpoint} />\n <EmbeddedApiPreview endpoint={embeddedEndpoint} />\n </div>\n <OutputListPreview outputs={embeddedGuide.outputs ?? []} />\n </div>\n </div>\n </section>\n )\n}\n\nexport function MainPreview() {\n const [isMobileNavigationOpen, setMobileNavigationOpen] = useState(false)\n const navigationProps = { endpoint: embeddedEndpoint, guide: embeddedGuide, outputs: embeddedGuide.outputs ?? [] }\n\n return (\n <PreviewEnvironment initialEntry={mainPreviewPath} sections={mainPreviewSections}>\n <Chrome\n title=\"source/en-US/openapi/embedding.mdx\"\n status=\"Rendered from OpenAPI + MDX\"\n headerAction={\n <button\n type=\"button\"\n className=\"clarify-preview-mobile-menu-button -my-1 flex size-7 items-center justify-center rounded-(--clarify-theme-tokens-radius-md) text-(--clarify-ui-text-strong) transition hover:bg-(--clarify-ui-hover-background)\"\n aria-controls=\"clarify-main-preview-mobile-navigation\"\n aria-expanded={isMobileNavigationOpen}\n aria-label={isMobileNavigationOpen ? 'Close documentation menu' : 'Open documentation menu'}\n onClick={() => setMobileNavigationOpen((value) => !value)}\n >\n {isMobileNavigationOpen ? <X className=\"h-4 w-4 shrink-0\" /> : <Menu className=\"h-4 w-4 shrink-0\" />}\n </button>\n }\n >\n <div className=\"clarify-preview-shell relative grid overflow-hidden\">\n <MainPreviewMobileNavigation {...navigationProps} isOpen={isMobileNavigationOpen} onClose={() => setMobileNavigationOpen(false)} />\n <aside className=\"clarify-preview-sidebar border-r border-(--clarify-theme-tokens-colors-border) px-1 py-4 text-sm/7 dark:border-white/10 dark:bg-white/5\">\n <PreviewNavigation {...navigationProps} />\n </aside>\n <MainContentPreview />\n </div>\n </Chrome>\n </PreviewEnvironment>\n )\n}\n\nexport function MdxPreview() {\n return (\n <PreviewEnvironment>\n <Chrome title=\"source/started/index.mdx\" status=\"Rendered by renderer\">\n <div className=\"clarify-preview-body overflow-x-hidden overflow-y-auto bg-(--clarify-theme-tokens-colors-background) p-4 sm:p-5 dark:bg-zinc-950\">\n <article className=\"max-w-3xl text-sm/7 text-(--clarify-ui-text-soft)\">\n <div className=\"inline-flex rounded-full bg-(--clarify-ui-accent-background) px-3 py-1 text-xs/5 font-semibold text-(--clarify-ui-accent-text)\">MDX page</div>\n <h2 className=\"mt-3 text-xl/7 font-semibold tracking-tight text-(--clarify-ui-text-strong) sm:text-2xl/8\">Get Started</h2>\n <p className=\"mt-3\">Write pages in source/. Clarify turns MDX, config, and OpenAPI files into routes.</p>\n <div className=\"mt-4 rounded-2xl border border-(--clarify-ui-accent-border) bg-(--clarify-ui-accent-background) p-4 text-sm/6 text-(--clarify-ui-text-strong) sm:mt-5\">\n <div className=\"font-semibold text-(--clarify-ui-text-strong)\">Static output ready</div>\n <p className=\"mt-1\">output/ is plain static files.</p>\n </div>\n <div className=\"mt-4 grid gap-3 sm:mt-5 sm:grid-cols-2 sm:gap-4\">\n <div className=\"rounded-2xl border border-(--clarify-theme-tokens-colors-border) bg-(--clarify-theme-tokens-colors-surface) p-5 shadow-sm dark:border-white/10 dark:bg-zinc-900/50\">\n <h3 className=\"text-base/6 font-semibold text-(--clarify-ui-text-strong)\">MDX pages</h3>\n <p className=\"mt-2 text-sm/6\">Guides live beside code.</p>\n </div>\n <div className=\"rounded-2xl border border-(--clarify-theme-tokens-colors-border) bg-(--clarify-theme-tokens-colors-surface) p-5 shadow-sm dark:border-white/10 dark:bg-zinc-900/50\">\n <h3 className=\"text-base/6 font-semibold text-(--clarify-ui-text-strong)\">API embeds</h3>\n <p className=\"mt-2 text-sm/6\">Specs render inline.</p>\n </div>\n </div>\n <div className=\"mt-5 rounded-2xl border border-(--clarify-theme-tokens-colors-border) bg-(--clarify-theme-tokens-colors-surface) p-5 shadow-sm dark:border-white/10 dark:bg-zinc-900/50\">\n <div className=\"flex items-center gap-3\">\n <MethodBadge method={embeddedEndpoint.method} />\n <code className=\"text-sm font-medium text-(--clarify-ui-text)\">{embeddedEndpoint.path}</code>\n </div>\n <p className=\"mt-3 text-sm/6\">{embeddedEndpoint.description}</p>\n </div>\n </article>\n </div>\n </Chrome>\n </PreviewEnvironment>\n )\n}\n\nexport function OpenApiPreview() {\n return (\n <PreviewEnvironment>\n <Chrome title=\"source/api.openapi.json\" status=\"Endpoint + examples\">\n <div className=\"clarify-preview-openapi-window overflow-x-hidden overflow-y-auto bg-(--clarify-theme-tokens-colors-background) px-3 py-3 sm:px-4 sm:py-4 dark:bg-zinc-950\">\n <div className=\"clarify-preview-openapi-mask min-h-full\">\n <div className=\"clarify-preview-api-content clarify-preview-api-content-openapi origin-top pb-6 sm:pb-10\">\n <OpenApiExamplesPreview endpoint={staticOutputEndpoint} />\n </div>\n </div>\n </div>\n </Chrome>\n </PreviewEnvironment>\n )\n}\n"],"mappings":";;;;;;;;;AA8CA,SAAS,uBAAuB,MAAkC;CAChE,MAAM,EAAE,MAAM,cAAc;CAE5B,MAAM,kBAAkB,yBAAA,oBADJ,yBAAA,eAAe,MAAM,SACG,CAAA,EAAa,SAAS,IAAI;CACtE,MAAM,CAAC,0BAA0B,gCAAA,GAAA,MAAA,SAAA,CAAwC,gBAAgB,EAAE,EAAE,aAAa,EAAE;CAG5G,OAAO;EACL;EACA,wBAJ6B,gBAAgB,MAAM,YAAY,QAAQ,cAAc,wBAAwB,KAAK,gBAAgB;EAKlI;CACF;AACF;AAQA,SAAS,wBAAwB,MAAmC;CAClE,MAAM,EAAE,MAAM,WAAW,SAAS;CAClC,MAAM,UAAU,yBAAA,WAAW,MAAM,WAAW,IAAI;CAChD,MAAM,CAAC,mBAAmB,yBAAA,GAAA,MAAA,SAAA,CAAiC,yBAAA,aAAa,QAAQ,IAAI,CAAC,CAAC;CACtF,MAAM,iBAAiB,QAAQ,MAAM,QAAQ,UAAU,yBAAA,aAAa,QAAQ,KAAK,MAAM,iBAAiB,KAAK,QAAQ;CACrH,MAAM,CAAC,iBAAiB,uBAAA,GAAA,MAAA,SAAA,CAA+B,yBAAA,uBAAuB,cAAc,CAAC;CAC7F,MAAM,CAAC,YAAY,kBAAA,GAAA,MAAA,SAAA,CAA0B,KAAK;CAElD,MAAM,cAAc,yBAAA,eAAe,MAAM,SAAS;CAClD,MAAM,CAAC,kBAAkB,wBAAA,GAAA,MAAA,SAAA,CAAgC,YAAY,EAAE,EAAE,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AC,KAAD;QAAG,WAAU;kBAAiB;OAAuB,CAAA,CAClD;QACF;;KACL,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;MAAK,WAAU;gBAAf,CACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;OAAK,WAAU;iBAAf,CACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,aAAD,EAAa,QAAQ,iBAAiB,OAAS,CAAA,GAC/C,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;QAAM,WAAU;kBAAgD,iBAAiB;OAAW,CAAA,CACzF;UACL,iBAAA,GAAA,kBAAA,IAAA,CAAC,KAAD;OAAG,WAAU;iBAAkB,iBAAiB;MAAe,CAAA,CAC5D;;IACE;;EACN,CAAA;CACC,CAAA,EACU,CAAA;AAExB;AAEA,SAAgB,iBAAiB;CAC/B,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,oBAAD,EAAA,UACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;EAAQ,OAAM;EAA0B,QAAO;YAC7C,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;GAAK,WAAU;aACb,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;IAAK,WAAU;cACb,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;KAAK,WAAU;eACb,iBAAA,GAAA,kBAAA,IAAA,CAAC,wBAAD,EAAwB,UAAU,qBAAuB,CAAA;IACtD,CAAA;GACF,CAAA;EACF,CAAA;CACC,CAAA,EACU,CAAA;AAExB"}
|
package/output/preview.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import { i as OpenApiSpecsContext, n as ConfigContext, r as LocaleContext } from "./i18n-
|
|
3
|
-
import { a as SectionProvider, i as Navigation } from "./PageActions-
|
|
1
|
+
import { a as ResponseExamplesPanel, c as getAuthOptions, i as RequestExamplesPanel, l as getServerKey, m as getRequestBody, o as authPlaceholder, p as getMediaTypeEntries, s as defaultServerVariables, t as EndpointIdentity, u as getServers } from "./OpenApiOperation-C2vJztWZ.js";
|
|
2
|
+
import { i as OpenApiSpecsContext, n as ConfigContext, r as LocaleContext } from "./i18n-BPrC45nD.js";
|
|
3
|
+
import { a as SectionProvider, i as Navigation } from "./PageActions-bugd7GZh.js";
|
|
4
4
|
import { useState } from "react";
|
|
5
5
|
import { MemoryRouter } from "react-router-dom";
|
|
6
6
|
import { Menu, X } from "lucide-react";
|
|
@@ -24,8 +24,8 @@ function usePreviewIdentityState(arg0) {
|
|
|
24
24
|
const [serverVariables, setServerVariables] = useState(defaultServerVariables(selectedServer));
|
|
25
25
|
const [serverOpen, setServerOpen] = useState(false);
|
|
26
26
|
const authOptions = getAuthOptions(spec, operation);
|
|
27
|
-
const [selectedAuthName, setSelectedAuthName] = useState(authOptions[0]?.
|
|
28
|
-
const selectedAuth = authOptions.find((option) => option.
|
|
27
|
+
const [selectedAuthName, setSelectedAuthName] = useState(authOptions[0]?.key ?? "");
|
|
28
|
+
const selectedAuth = authOptions.find((option) => option.key === selectedAuthName);
|
|
29
29
|
const [authValues, setAuthValues] = useState({});
|
|
30
30
|
const [authOpen, setAuthOpen] = useState(false);
|
|
31
31
|
return {
|
|
@@ -39,11 +39,11 @@ function usePreviewIdentityState(arg0) {
|
|
|
39
39
|
selectedAuth,
|
|
40
40
|
authValues,
|
|
41
41
|
authOpen,
|
|
42
|
-
authInput: selectedAuth ? {
|
|
43
|
-
name:
|
|
44
|
-
scheme:
|
|
45
|
-
value: authValues[
|
|
46
|
-
} : void 0,
|
|
42
|
+
authInput: selectedAuth ? selectedAuth.schemes.map((option) => ({
|
|
43
|
+
name: option.name,
|
|
44
|
+
scheme: option.scheme,
|
|
45
|
+
value: authValues[option.name] ?? authPlaceholder(option)
|
|
46
|
+
})) : void 0,
|
|
47
47
|
onSelectServer: (value) => {
|
|
48
48
|
const nextServer = servers.find((server, index) => getServerKey(server, index) === value) ?? servers[0];
|
|
49
49
|
setSelectedServerKey(value);
|
|
@@ -69,7 +69,15 @@ function usePreviewIdentityState(arg0) {
|
|
|
69
69
|
...current,
|
|
70
70
|
[name]: value
|
|
71
71
|
}));
|
|
72
|
-
}
|
|
72
|
+
},
|
|
73
|
+
onClearAuthValue: (name) => {
|
|
74
|
+
setAuthValues((current) => {
|
|
75
|
+
const values = { ...current };
|
|
76
|
+
delete values[name];
|
|
77
|
+
return values;
|
|
78
|
+
});
|
|
79
|
+
},
|
|
80
|
+
onClearAuthValues: () => setAuthValues({})
|
|
73
81
|
};
|
|
74
82
|
}
|
|
75
83
|
function schemaFromType(type) {
|
|
@@ -190,17 +198,9 @@ function OpenApiExamplesPreview(arg0) {
|
|
|
190
198
|
selectedServer: identityState.selectedServer,
|
|
191
199
|
serverVariables: identityState.serverVariables,
|
|
192
200
|
serverOpen: identityState.serverOpen,
|
|
193
|
-
authOptions: identityState.authOptions,
|
|
194
|
-
selectedAuthName: identityState.selectedAuthName,
|
|
195
|
-
selectedAuth: identityState.selectedAuth,
|
|
196
|
-
authValues: identityState.authValues,
|
|
197
|
-
authOpen: identityState.authOpen,
|
|
198
201
|
onSelectServer: identityState.onSelectServer,
|
|
199
202
|
onChangeServerVariable: identityState.onChangeServerVariable,
|
|
200
|
-
onToggleServer: identityState.onToggleServer
|
|
201
|
-
onToggleAuth: identityState.onToggleAuth,
|
|
202
|
-
onSelectAuth: identityState.onSelectAuth,
|
|
203
|
-
onChangeAuthValue: identityState.onChangeAuthValue
|
|
203
|
+
onToggleServer: identityState.onToggleServer
|
|
204
204
|
});
|
|
205
205
|
}
|
|
206
206
|
function renderExamples() {
|
|
@@ -386,10 +386,8 @@ var staticOutputEndpoint = {
|
|
|
386
386
|
var previewConfig = {
|
|
387
387
|
title: "Clarify preview",
|
|
388
388
|
description: "Renderer preview environment",
|
|
389
|
-
rootDirectory: "source",
|
|
390
389
|
routePrefix: "/",
|
|
391
390
|
assetPrefix: "/",
|
|
392
|
-
outputDirectory: "output",
|
|
393
391
|
theme: {
|
|
394
392
|
preset: "default",
|
|
395
393
|
tokens: {
|
|
@@ -410,16 +408,28 @@ var previewConfig = {
|
|
|
410
408
|
xl: "1rem"
|
|
411
409
|
}
|
|
412
410
|
},
|
|
413
|
-
layout: { maxWidth: "88rem" }
|
|
414
|
-
editor: false
|
|
411
|
+
layout: { maxWidth: "88rem" }
|
|
415
412
|
},
|
|
416
|
-
|
|
417
|
-
|
|
413
|
+
locales: {
|
|
414
|
+
default: "en",
|
|
418
415
|
missing: "fallback",
|
|
419
416
|
locales: [{
|
|
420
417
|
code: "en",
|
|
421
418
|
label: "English"
|
|
422
419
|
}]
|
|
420
|
+
},
|
|
421
|
+
variables: {},
|
|
422
|
+
features: {
|
|
423
|
+
search: {
|
|
424
|
+
enabled: true,
|
|
425
|
+
provider: "pagefind"
|
|
426
|
+
},
|
|
427
|
+
repository: { enabled: true },
|
|
428
|
+
themeEditor: { enabled: true },
|
|
429
|
+
openapi: {
|
|
430
|
+
enabled: true,
|
|
431
|
+
playground: true
|
|
432
|
+
}
|
|
423
433
|
}
|
|
424
434
|
};
|
|
425
435
|
var methodStyleVars = {
|
|
@@ -444,7 +454,7 @@ function PreviewEnvironment(arg0) {
|
|
|
444
454
|
children: /* @__PURE__ */ jsx(ConfigContext.Provider, {
|
|
445
455
|
value: previewConfig,
|
|
446
456
|
children: /* @__PURE__ */ jsx(LocaleContext.Provider, {
|
|
447
|
-
value: previewConfig.
|
|
457
|
+
value: previewConfig.locales.default,
|
|
448
458
|
children: /* @__PURE__ */ jsx(OpenApiSpecsContext.Provider, {
|
|
449
459
|
value: {},
|
|
450
460
|
children: /* @__PURE__ */ jsx(SectionProvider, {
|