@clarify-labs/renderer 0.9.4 → 0.10.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-D2P0iZ_m.js → ClarifyShell-CxhXBtsR.js} +2 -2
- package/output/{ClarifyShell-D2P0iZ_m.js.map → ClarifyShell-CxhXBtsR.js.map} +1 -1
- package/output/{ClarifyShell-7r92MZg9.cjs → ClarifyShell-DjLRRW8T.cjs} +4 -4
- package/output/{ClarifyShell-7r92MZg9.cjs.map → ClarifyShell-DjLRRW8T.cjs.map} +1 -1
- package/output/{OpenApiOperation-Dhlz3JSx.js → OpenApiOperation-CyBkzvob.js} +27 -21
- package/output/{OpenApiOperation-Dhlz3JSx.js.map → OpenApiOperation-CyBkzvob.js.map} +1 -1
- package/output/{OpenApiOperation-CyyPlZL6.cjs → OpenApiOperation-qp5tFaWP.cjs} +32 -26
- package/output/{OpenApiOperation-CyyPlZL6.cjs.map → OpenApiOperation-qp5tFaWP.cjs.map} +1 -1
- package/output/{PageActions-D0PA8Zv5.js → PageActions-Dn8IGWoL.js} +3 -1
- package/output/PageActions-Dn8IGWoL.js.map +1 -0
- package/output/{PageActions-CTn2XkPg.cjs → PageActions-GS_cxeJN.cjs} +6 -4
- package/output/PageActions-GS_cxeJN.cjs.map +1 -0
- package/output/client.cjs +3 -3
- package/output/client.js +3 -3
- package/output/core/i18n.d.ts +1 -1
- package/output/index.cjs +5 -5
- package/output/index.cjs.map +1 -1
- package/output/index.js +4 -4
- package/output/index.js.map +1 -1
- package/output/markdown.cjs +1 -1
- package/output/preview.cjs +2 -2
- package/output/preview.cjs.map +1 -1
- package/output/preview.js +2 -2
- package/output/preview.js.map +1 -1
- package/output/remark-Dd2WU50s.js.map +1 -1
- package/output/{remark-Dv3owbSH.cjs → remark-zSQT0MBv.cjs} +3 -3
- package/output/{remark-Dv3owbSH.cjs.map → remark-zSQT0MBv.cjs.map} +1 -1
- package/output/{render-DXDSIfZ8.cjs → render-CCCoUWDP.cjs} +2 -2
- package/output/{render-DXDSIfZ8.cjs.map → render-CCCoUWDP.cjs.map} +1 -1
- package/output/{render-CwSsfrs7.js → render-CV0a-qtD.js} +2 -2
- package/output/{render-CwSsfrs7.js.map → render-CV0a-qtD.js.map} +1 -1
- package/output/renderer.css +1 -1
- package/output/server.cjs +2 -2
- package/output/server.cjs.map +1 -1
- package/output/server.js +2 -2
- package/package.json +10 -10
- package/output/PageActions-CTn2XkPg.cjs.map +0 -1
- package/output/PageActions-D0PA8Zv5.js.map +0 -1
- /package/output/{chunk-DakpK96I.cjs → rolldown-runtime-DakpK96I.cjs} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const
|
|
2
|
-
const require_PageActions = require("./PageActions-
|
|
3
|
-
const require_remark = require("./remark-
|
|
1
|
+
const require_rolldown_runtime = require("./rolldown-runtime-DakpK96I.cjs");
|
|
2
|
+
const require_PageActions = require("./PageActions-GS_cxeJN.cjs");
|
|
3
|
+
const require_remark = require("./remark-zSQT0MBv.cjs");
|
|
4
4
|
let clsx = require("clsx");
|
|
5
|
-
clsx =
|
|
5
|
+
clsx = require_rolldown_runtime.__toESM(clsx, 1);
|
|
6
6
|
let react = require("react");
|
|
7
7
|
let react_router_dom = require("react-router-dom");
|
|
8
8
|
let _headlessui_react = require("@headlessui/react");
|
|
@@ -12,7 +12,7 @@ let framer_motion = require("framer-motion");
|
|
|
12
12
|
let zustand = require("zustand");
|
|
13
13
|
let react_zoom_pan_pinch = require("react-zoom-pan-pinch");
|
|
14
14
|
let react_markdown = require("react-markdown");
|
|
15
|
-
react_markdown =
|
|
15
|
+
react_markdown = require_rolldown_runtime.__toESM(react_markdown, 1);
|
|
16
16
|
let github_slugger = require("github-slugger");
|
|
17
17
|
let _scalar_snippetz = require("@scalar/snippetz");
|
|
18
18
|
//#region source/components/LocalizedLink.tsx
|
|
@@ -996,7 +996,7 @@ function WebFrame(arg0) {
|
|
|
996
996
|
}
|
|
997
997
|
//#endregion
|
|
998
998
|
//#region source/mdx/primitives.tsx
|
|
999
|
-
var primitives_exports = /* @__PURE__ */
|
|
999
|
+
var primitives_exports = /* @__PURE__ */ require_rolldown_runtime.__exportAll({
|
|
1000
1000
|
Button: () => Button,
|
|
1001
1001
|
Callout: () => Callout,
|
|
1002
1002
|
Card: () => Card,
|
|
@@ -1397,7 +1397,7 @@ function getFieldValue(name, value, schema) {
|
|
|
1397
1397
|
}
|
|
1398
1398
|
function getFormParams(value, requestContent) {
|
|
1399
1399
|
const properties = getSchemaProperties(requestContent.value.schema);
|
|
1400
|
-
return Array.from(new Set([...Object.keys(properties), ...isRecord(value) ? Object.keys(value) : []])).flatMap((name) => {
|
|
1400
|
+
return Array.from(/* @__PURE__ */ new Set([...Object.keys(properties), ...isRecord(value) ? Object.keys(value) : []])).flatMap((name) => {
|
|
1401
1401
|
const fieldValue = getFieldValue(name, value, properties[name]);
|
|
1402
1402
|
if (typeof fieldValue === "undefined") return [];
|
|
1403
1403
|
const contentType = requestContent.value.encoding?.[name]?.contentType;
|
|
@@ -2273,7 +2273,7 @@ function getSchemaChildren(arg0) {
|
|
|
2273
2273
|
path,
|
|
2274
2274
|
required,
|
|
2275
2275
|
depth,
|
|
2276
|
-
seen: new Set([...seen, schema.$ref]),
|
|
2276
|
+
seen: /* @__PURE__ */ new Set([...seen, schema.$ref]),
|
|
2277
2277
|
defaultExpanded
|
|
2278
2278
|
});
|
|
2279
2279
|
}
|
|
@@ -2380,7 +2380,7 @@ function getRootSchemaNode(spec, schema, defaultExpanded) {
|
|
|
2380
2380
|
spec,
|
|
2381
2381
|
schema: resolvedSchema,
|
|
2382
2382
|
path: resolveReferenceName(schema.$ref),
|
|
2383
|
-
seen: new Set([schema.$ref]),
|
|
2383
|
+
seen: /* @__PURE__ */ new Set([schema.$ref]),
|
|
2384
2384
|
defaultExpanded
|
|
2385
2385
|
})
|
|
2386
2386
|
};
|
|
@@ -2509,19 +2509,17 @@ function SchemaProperties(arg0) {
|
|
|
2509
2509
|
})] });
|
|
2510
2510
|
}
|
|
2511
2511
|
function ParameterList(arg0) {
|
|
2512
|
-
const { title, parameters } = arg0;
|
|
2513
2512
|
const t = require_PageActions.useBuiltInText();
|
|
2514
|
-
|
|
2513
|
+
const { title, parameters } = arg0;
|
|
2514
|
+
if (parameters.length === 0) return null;
|
|
2515
|
+
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, {
|
|
2515
2516
|
name: parameter.name ?? t("openapi.parameter"),
|
|
2516
2517
|
type: [schemaToType(parameter.schema), parameter.required ? t("openapi.requiredBadge") : void 0].filter(Boolean).join(", ") || void 0,
|
|
2517
2518
|
children: parameter.description ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Markdown, {
|
|
2518
2519
|
className: "*:first:mt-0 *:last:mb-0",
|
|
2519
2520
|
children: parameter.description
|
|
2520
2521
|
}) : t("openapi.operationParameter")
|
|
2521
|
-
}, `${parameter.in}-${parameter.name}`))
|
|
2522
|
-
className: "text-sm/5 text-(--clarify-ui-text-soft)",
|
|
2523
|
-
children: t("openapi.none")
|
|
2524
|
-
}) })] });
|
|
2522
|
+
}, `${parameter.in}-${parameter.name}`)) })] });
|
|
2525
2523
|
}
|
|
2526
2524
|
function ResponseList(arg0) {
|
|
2527
2525
|
const { operation, spec, selectedStatus, onSelectStatus } = arg0;
|
|
@@ -2599,7 +2597,23 @@ function ResponseList(arg0) {
|
|
|
2599
2597
|
function EndpointRequest(arg0) {
|
|
2600
2598
|
const { spec, path, method, description, groupedParameters, parameters, requestBody, requestContents, requestSchema, selectedRequestMediaType, onSelectRequestMediaType, selectedServer, serverVariables, auth, sharedExampleKey, onSelectExampleKey } = arg0;
|
|
2601
2599
|
const t = require_PageActions.useBuiltInText();
|
|
2602
|
-
|
|
2600
|
+
const hasRequestBody = Boolean(requestBody && requestContents.length > 0);
|
|
2601
|
+
const renderDescription = () => {
|
|
2602
|
+
if (!description) return null;
|
|
2603
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Markdown, { children: description });
|
|
2604
|
+
};
|
|
2605
|
+
const renderRequestBody = () => {
|
|
2606
|
+
if (!hasRequestBody) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
2607
|
+
className: "text-sm/5 text-(--clarify-ui-text-soft)",
|
|
2608
|
+
children: t("openapi.requestBodyEmpty")
|
|
2609
|
+
});
|
|
2610
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [typeof requestBody?.description === "string" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Markdown, { children: requestBody.description }) : null, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SchemaProperties, {
|
|
2611
|
+
title: t("openapi.bodyProperties"),
|
|
2612
|
+
schema: requestSchema,
|
|
2613
|
+
spec
|
|
2614
|
+
})] });
|
|
2615
|
+
};
|
|
2616
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [renderDescription(), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Row, {
|
|
2603
2617
|
className: "relative mt-6",
|
|
2604
2618
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Col, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2605
2619
|
className: "w-full",
|
|
@@ -2616,15 +2630,7 @@ function EndpointRequest(arg0) {
|
|
|
2616
2630
|
title: t("openapi.headers"),
|
|
2617
2631
|
parameters: groupedParameters.header
|
|
2618
2632
|
}),
|
|
2619
|
-
|
|
2620
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { children: t("openapi.requestBody") }),
|
|
2621
|
-
typeof requestBody.description === "string" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Markdown, { children: requestBody.description }) : null,
|
|
2622
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SchemaProperties, {
|
|
2623
|
-
title: t("openapi.bodyProperties"),
|
|
2624
|
-
schema: requestSchema,
|
|
2625
|
-
spec
|
|
2626
|
-
})
|
|
2627
|
-
] }) : null
|
|
2633
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { children: t("openapi.requestBody") }), renderRequestBody()] })
|
|
2628
2634
|
]
|
|
2629
2635
|
}) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Col, {
|
|
2630
2636
|
sticky: true,
|
|
@@ -3326,4 +3332,4 @@ Object.defineProperty(exports, "primitives_exports", {
|
|
|
3326
3332
|
}
|
|
3327
3333
|
});
|
|
3328
3334
|
|
|
3329
|
-
//# sourceMappingURL=OpenApiOperation-
|
|
3335
|
+
//# sourceMappingURL=OpenApiOperation-qp5tFaWP.cjs.map
|