@djangocfg/ui-tools 2.1.360 → 2.1.362
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/dist/{DocsLayout-HGYIJTF3.mjs → DocsLayout-2YKPXZYO.mjs} +20 -4
- package/dist/DocsLayout-2YKPXZYO.mjs.map +1 -0
- package/dist/{DocsLayout-OQHDNKZE.cjs → DocsLayout-Q4KS3QWW.cjs} +62 -46
- package/dist/DocsLayout-Q4KS3QWW.cjs.map +1 -0
- package/dist/{chunk-QW4RBGHN.cjs → chunk-7EYHNP3E.cjs} +9 -5
- package/dist/chunk-7EYHNP3E.cjs.map +1 -0
- package/dist/{chunk-ZUFTH5IR.mjs → chunk-Y6UTOBF6.mjs} +9 -5
- package/dist/chunk-Y6UTOBF6.mjs.map +1 -0
- package/dist/index.cjs +5 -5
- package/dist/index.d.cts +23 -1
- package/dist/index.d.ts +23 -1
- package/dist/index.mjs +3 -3
- package/package.json +6 -6
- package/src/tools/OpenapiViewer/hooks/useOpenApiSchema.ts +26 -1
- package/src/tools/OpenapiViewer/types.ts +8 -2
- package/src/tools/OpenapiViewer/utils/url.ts +9 -4
- package/dist/DocsLayout-HGYIJTF3.mjs.map +0 -1
- package/dist/DocsLayout-OQHDNKZE.cjs.map +0 -1
- package/dist/chunk-QW4RBGHN.cjs.map +0 -1
- package/dist/chunk-ZUFTH5IR.mjs.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk7EYHNP3E_cjs = require('./chunk-7EYHNP3E.cjs');
|
|
4
4
|
var chunkXACCHZH2_cjs = require('./chunk-XACCHZH2.cjs');
|
|
5
5
|
var chunkT3MWM23F_cjs = require('./chunk-T3MWM23F.cjs');
|
|
6
6
|
require('./chunk-FP2RLYQZ.cjs');
|
|
@@ -56,7 +56,7 @@ var extractEndpoints = /* @__PURE__ */ chunkOLISEQHS_cjs.__name((schema, baseUrl
|
|
|
56
56
|
description: response.description || `Response ${code}`,
|
|
57
57
|
contentType: chosenContentType,
|
|
58
58
|
schema: respSchema,
|
|
59
|
-
example: respSchema ?
|
|
59
|
+
example: respSchema ? chunk7EYHNP3E_cjs.sampleSchemaJson(respSchema, { skipWriteOnly: true }, specRoot) : void 0
|
|
60
60
|
});
|
|
61
61
|
}
|
|
62
62
|
}
|
|
@@ -69,13 +69,13 @@ var extractEndpoints = /* @__PURE__ */ chunkOLISEQHS_cjs.__name((schema, baseUrl
|
|
|
69
69
|
type: rawSchema?.type || "object",
|
|
70
70
|
description: op.requestBody.description,
|
|
71
71
|
schema: rawSchema,
|
|
72
|
-
example: rawSchema ?
|
|
72
|
+
example: rawSchema ? chunk7EYHNP3E_cjs.sampleSchemaJson(rawSchema, { skipReadOnly: true }, specRoot) : void 0
|
|
73
73
|
};
|
|
74
74
|
}
|
|
75
75
|
const endpoint = {
|
|
76
76
|
name: path.split("/").pop() || path,
|
|
77
77
|
method: methodUpper,
|
|
78
|
-
path: baseUrl ?
|
|
78
|
+
path: baseUrl ? chunk7EYHNP3E_cjs.joinUrl(baseUrl, path) : path,
|
|
79
79
|
summary,
|
|
80
80
|
description,
|
|
81
81
|
category,
|
|
@@ -129,11 +129,11 @@ function useOpenApiSchema({
|
|
|
129
129
|
[loadedSchemas, currentSchemaId]
|
|
130
130
|
);
|
|
131
131
|
const dereferencedSchema = React12.useMemo(
|
|
132
|
-
() => currentOpenApiSchema ?
|
|
132
|
+
() => currentOpenApiSchema ? chunk7EYHNP3E_cjs.dereferenceSchema(currentOpenApiSchema) : null,
|
|
133
133
|
[currentOpenApiSchema]
|
|
134
134
|
);
|
|
135
135
|
const resolvedBaseUrl = React12.useMemo(
|
|
136
|
-
() =>
|
|
136
|
+
() => chunk7EYHNP3E_cjs.resolveBaseUrl({
|
|
137
137
|
schemaSource: currentSchema?.baseUrl,
|
|
138
138
|
config: configBaseUrl,
|
|
139
139
|
fromServers: currentOpenApiSchema?.servers?.[0]?.url
|
|
@@ -164,6 +164,17 @@ function useOpenApiSchema({
|
|
|
164
164
|
}
|
|
165
165
|
setLoading(true);
|
|
166
166
|
setError(null);
|
|
167
|
+
if (currentSchema.data) {
|
|
168
|
+
setLoadedSchemas((prev) => new Map(prev).set(currentSchema.id, currentSchema.data));
|
|
169
|
+
consola__default.default.success(`Schema loaded (static): ${currentSchema.name}`);
|
|
170
|
+
setLoading(false);
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
if (!currentSchema.url) {
|
|
174
|
+
setError("SchemaSource requires either url or data");
|
|
175
|
+
setLoading(false);
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
167
178
|
fetchSchema(currentSchema.url).then((schema) => {
|
|
168
179
|
setLoadedSchemas((prev) => new Map(prev).set(currentSchema.id, schema));
|
|
169
180
|
consola__default.default.success(`Schema loaded: ${currentSchema.name}`);
|
|
@@ -194,7 +205,7 @@ function useOpenApiSchema({
|
|
|
194
205
|
});
|
|
195
206
|
Promise.allSettled(
|
|
196
207
|
pending.map(
|
|
197
|
-
(s) => fetchSchema(s.url).then((schema) => ({ id: s.id, name: s.name, schema }))
|
|
208
|
+
(s) => s.data ? Promise.resolve({ id: s.id, name: s.name, schema: s.data }) : s.url ? fetchSchema(s.url).then((schema) => ({ id: s.id, name: s.name, schema })) : Promise.reject(new Error("SchemaSource requires either url or data"))
|
|
198
209
|
)
|
|
199
210
|
).then((results) => {
|
|
200
211
|
if (cancelled) return;
|
|
@@ -232,8 +243,8 @@ function useOpenApiSchema({
|
|
|
232
243
|
if (!preloadAll) return [];
|
|
233
244
|
return schemas.map((src) => {
|
|
234
245
|
const raw = loadedSchemas.get(src.id) ?? null;
|
|
235
|
-
const deref = raw ?
|
|
236
|
-
const resolved =
|
|
246
|
+
const deref = raw ? chunk7EYHNP3E_cjs.dereferenceSchema(raw) : null;
|
|
247
|
+
const resolved = chunk7EYHNP3E_cjs.resolveBaseUrl({
|
|
237
248
|
schemaSource: src.baseUrl,
|
|
238
249
|
config: configBaseUrl,
|
|
239
250
|
fromServers: raw?.servers?.[0]?.url
|
|
@@ -262,6 +273,11 @@ function useOpenApiSchema({
|
|
|
262
273
|
}, []);
|
|
263
274
|
const refresh = React12.useCallback(() => {
|
|
264
275
|
if (!currentSchema) return;
|
|
276
|
+
if (currentSchema.data) {
|
|
277
|
+
setLoadedSchemas((prev) => new Map(prev).set(currentSchema.id, currentSchema.data));
|
|
278
|
+
return;
|
|
279
|
+
}
|
|
280
|
+
if (!currentSchema.url) return;
|
|
265
281
|
setLoading(true);
|
|
266
282
|
setError(null);
|
|
267
283
|
setLoadedSchemas((prev) => {
|
|
@@ -444,7 +460,7 @@ chunkOLISEQHS_cjs.__name(useEndpointDraft, "useEndpointDraft");
|
|
|
444
460
|
|
|
445
461
|
// src/tools/OpenapiViewer/components/shared/EndpointDraftSync.tsx
|
|
446
462
|
function EndpointDraftSync({ schemaId }) {
|
|
447
|
-
const { state, setParameters, setRequestBody, setActiveSchemaId } =
|
|
463
|
+
const { state, setParameters, setRequestBody, setActiveSchemaId } = chunk7EYHNP3E_cjs.usePlaygroundContext();
|
|
448
464
|
const ep = state.selectedEndpoint;
|
|
449
465
|
React12.useEffect(() => {
|
|
450
466
|
setActiveSchemaId(schemaId);
|
|
@@ -641,11 +657,11 @@ function sidebarLabel(ep, groupCommonPrefix) {
|
|
|
641
657
|
const tail = ep.path.slice(groupCommonPrefix.length) || "/";
|
|
642
658
|
return tail;
|
|
643
659
|
}
|
|
644
|
-
return
|
|
660
|
+
return chunk7EYHNP3E_cjs.relativePath(ep.path);
|
|
645
661
|
}
|
|
646
662
|
chunkOLISEQHS_cjs.__name(sidebarLabel, "sidebarLabel");
|
|
647
663
|
function sidebarTooltip(ep) {
|
|
648
|
-
return `${ep.method} ${
|
|
664
|
+
return `${ep.method} ${chunk7EYHNP3E_cjs.relativePath(ep.path)}`;
|
|
649
665
|
}
|
|
650
666
|
chunkOLISEQHS_cjs.__name(sidebarTooltip, "sidebarTooltip");
|
|
651
667
|
|
|
@@ -722,7 +738,7 @@ function emptyTextFor(query, method, defaultText) {
|
|
|
722
738
|
chunkOLISEQHS_cjs.__name(emptyTextFor, "emptyTextFor");
|
|
723
739
|
function buildFlatVM(endpoints, selectedVersion, query, method, activeEndpointId) {
|
|
724
740
|
const filtered = filterEndpoints(
|
|
725
|
-
|
|
741
|
+
chunk7EYHNP3E_cjs.deduplicateEndpoints(endpoints, selectedVersion),
|
|
726
742
|
query,
|
|
727
743
|
method
|
|
728
744
|
);
|
|
@@ -739,7 +755,7 @@ function buildSectionsVM(schemas, endpointsBySchema, selectedVersion, query, met
|
|
|
739
755
|
for (const src of schemas) {
|
|
740
756
|
const raw = endpointsBySchema[src.id] ?? [];
|
|
741
757
|
filteredMap[src.id] = filterEndpoints(
|
|
742
|
-
|
|
758
|
+
chunk7EYHNP3E_cjs.deduplicateEndpoints(raw, selectedVersion),
|
|
743
759
|
query,
|
|
744
760
|
method
|
|
745
761
|
);
|
|
@@ -851,9 +867,9 @@ function SchemaCopyMenu({ schema, endpoints, baseUrl, variant = "button", side }
|
|
|
851
867
|
const build = React12.useCallback(
|
|
852
868
|
(flavour) => {
|
|
853
869
|
if (!schema) return "";
|
|
854
|
-
if (flavour === "markdown") return
|
|
855
|
-
if (flavour === "compact") return
|
|
856
|
-
return
|
|
870
|
+
if (flavour === "markdown") return chunk7EYHNP3E_cjs.toMarkdown(schema, endpoints, baseUrl);
|
|
871
|
+
if (flavour === "compact") return chunk7EYHNP3E_cjs.toCompactJson(schema, baseUrl);
|
|
872
|
+
return chunk7EYHNP3E_cjs.toRawJson(schema, baseUrl);
|
|
857
873
|
},
|
|
858
874
|
[schema, endpoints, baseUrl]
|
|
859
875
|
);
|
|
@@ -864,7 +880,7 @@ function SchemaCopyMenu({ schema, endpoints, baseUrl, variant = "button", side }
|
|
|
864
880
|
const label = FLAVOUR_LABELS[flavour].title;
|
|
865
881
|
try {
|
|
866
882
|
await navigator.clipboard.writeText(text);
|
|
867
|
-
const size =
|
|
883
|
+
const size = chunk7EYHNP3E_cjs.formatBytes(text);
|
|
868
884
|
setSizeCache((prev) => ({ ...prev, [flavour]: size }));
|
|
869
885
|
setJustCopied(flavour);
|
|
870
886
|
setTimeout(() => setJustCopied(null), 1500);
|
|
@@ -1269,7 +1285,7 @@ function useActiveCodeTab(endpointId, fallback = "curl") {
|
|
|
1269
1285
|
}
|
|
1270
1286
|
chunkOLISEQHS_cjs.__name(useActiveCodeTab, "useActiveCodeTab");
|
|
1271
1287
|
function LanguageTabs({ activeId, onChange }) {
|
|
1272
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1 overflow-x-auto -mx-1 px-1", children:
|
|
1288
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1 overflow-x-auto -mx-1 px-1", children: chunk7EYHNP3E_cjs.CODE_SAMPLE_TARGETS.map((t) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1273
1289
|
"button",
|
|
1274
1290
|
{
|
|
1275
1291
|
type: "button",
|
|
@@ -1294,18 +1310,18 @@ function useCodeSnippet({
|
|
|
1294
1310
|
}) {
|
|
1295
1311
|
const effectiveBody = body ?? endpoint.requestBody?.example;
|
|
1296
1312
|
const har = React12.useMemo(() => {
|
|
1297
|
-
const h =
|
|
1313
|
+
const h = chunk7EYHNP3E_cjs.buildHarRequest({
|
|
1298
1314
|
endpoint,
|
|
1299
1315
|
body: effectiveBody,
|
|
1300
1316
|
parameters,
|
|
1301
1317
|
headers,
|
|
1302
1318
|
baseUrl
|
|
1303
1319
|
});
|
|
1304
|
-
return baseUrl ? h : { ...h, url:
|
|
1320
|
+
return baseUrl ? h : { ...h, url: chunk7EYHNP3E_cjs.resolveAbsolute(h.url) };
|
|
1305
1321
|
}, [endpoint, effectiveBody, parameters, headers, baseUrl]);
|
|
1306
1322
|
return React12.useMemo(() => {
|
|
1307
|
-
const target =
|
|
1308
|
-
const code =
|
|
1323
|
+
const target = chunk7EYHNP3E_cjs.CODE_SAMPLE_TARGETS.find((t) => t.id === activeId);
|
|
1324
|
+
const code = chunk7EYHNP3E_cjs.renderSnippet(har, activeId);
|
|
1309
1325
|
return {
|
|
1310
1326
|
snippet: code ?? `// Snippet for ${target.label} is unavailable for this request.`,
|
|
1311
1327
|
prism: target.prism
|
|
@@ -1404,7 +1420,7 @@ function PathDisplay({ path }) {
|
|
|
1404
1420
|
{
|
|
1405
1421
|
className: "block font-mono text-lg md:text-xl font-semibold text-foreground leading-tight",
|
|
1406
1422
|
style: { overflowWrap: "anywhere", wordBreak: "break-word" },
|
|
1407
|
-
children:
|
|
1423
|
+
children: chunk7EYHNP3E_cjs.relativePath(path)
|
|
1408
1424
|
}
|
|
1409
1425
|
);
|
|
1410
1426
|
}
|
|
@@ -1416,7 +1432,7 @@ function EndpointHeader({
|
|
|
1416
1432
|
onTryIt,
|
|
1417
1433
|
presentSections
|
|
1418
1434
|
}) {
|
|
1419
|
-
const endpointMd = React12.useMemo(() =>
|
|
1435
|
+
const endpointMd = React12.useMemo(() => chunk7EYHNP3E_cjs.endpointToMarkdown(endpoint), [endpoint]);
|
|
1420
1436
|
const [aiCopied, setAiCopied] = React12.useState(false);
|
|
1421
1437
|
const onAiCopy = React12.useCallback(() => {
|
|
1422
1438
|
if (typeof window === "undefined") return;
|
|
@@ -1991,7 +2007,7 @@ function buildSchemaSectionVM(entry, selectedVersion, loadedEndpoint) {
|
|
|
1991
2007
|
} else if (entry.error) {
|
|
1992
2008
|
state = { kind: "error", message: entry.error };
|
|
1993
2009
|
} else {
|
|
1994
|
-
const visible =
|
|
2010
|
+
const visible = chunk7EYHNP3E_cjs.deduplicateEndpoints(entry.endpoints, selectedVersion);
|
|
1995
2011
|
state = visible.length === 0 ? { kind: "empty" } : {
|
|
1996
2012
|
kind: "ready",
|
|
1997
2013
|
rows: visible.map((ep) => buildEndpointRow(ep, loadedEndpoint, entry.source.id))
|
|
@@ -2093,7 +2109,7 @@ function SelectorBody({
|
|
|
2093
2109
|
onTryEndpoint
|
|
2094
2110
|
}) {
|
|
2095
2111
|
const visibleEndpoints = React12.useMemo(
|
|
2096
|
-
() =>
|
|
2112
|
+
() => chunk7EYHNP3E_cjs.deduplicateEndpoints(endpoints, selectedVersion),
|
|
2097
2113
|
[endpoints, selectedVersion]
|
|
2098
2114
|
);
|
|
2099
2115
|
const rows = React12.useMemo(
|
|
@@ -2521,7 +2537,7 @@ function ArrayField({
|
|
|
2521
2537
|
}
|
|
2522
2538
|
chunkOLISEQHS_cjs.__name(ArrayField, "ArrayField");
|
|
2523
2539
|
function EndpointResetButton() {
|
|
2524
|
-
const { state, setParameters, setRequestBody } =
|
|
2540
|
+
const { state, setParameters, setRequestBody } = chunk7EYHNP3E_cjs.usePlaygroundContext();
|
|
2525
2541
|
const ep = state.selectedEndpoint;
|
|
2526
2542
|
const { reset } = useEndpointDraft(state.activeSchemaId, ep);
|
|
2527
2543
|
const hasDraft = Object.keys(state.parameters).length > 0 || state.requestBody.length > 0;
|
|
@@ -2550,7 +2566,7 @@ function EndpointResetButton() {
|
|
|
2550
2566
|
}
|
|
2551
2567
|
chunkOLISEQHS_cjs.__name(EndpointResetButton, "EndpointResetButton");
|
|
2552
2568
|
function ParamFields({ label, params }) {
|
|
2553
|
-
const { state, setParameters } =
|
|
2569
|
+
const { state, setParameters } = chunk7EYHNP3E_cjs.usePlaygroundContext();
|
|
2554
2570
|
function handleChange(name, value) {
|
|
2555
2571
|
setParameters({ ...state.parameters, [name]: value });
|
|
2556
2572
|
}
|
|
@@ -2590,7 +2606,7 @@ function RequestPanel() {
|
|
|
2590
2606
|
setSelectedApiKey,
|
|
2591
2607
|
setManualApiToken,
|
|
2592
2608
|
sendRequest
|
|
2593
|
-
} =
|
|
2609
|
+
} = chunk7EYHNP3E_cjs.usePlaygroundContext();
|
|
2594
2610
|
const apiKeyOptions = React12.useMemo(
|
|
2595
2611
|
() => apiKeys.map((k) => ({
|
|
2596
2612
|
value: k.id,
|
|
@@ -2603,12 +2619,12 @@ function RequestPanel() {
|
|
|
2603
2619
|
);
|
|
2604
2620
|
const hasApiKeys = apiKeyOptions.length > 0;
|
|
2605
2621
|
const ep = state.selectedEndpoint;
|
|
2606
|
-
const isJsonValid = state.requestBody ?
|
|
2622
|
+
const isJsonValid = state.requestBody ? chunk7EYHNP3E_cjs.isValidJson(state.requestBody) : true;
|
|
2607
2623
|
const curlCommand = React12.useMemo(() => {
|
|
2608
2624
|
if (!state.requestUrl) return "";
|
|
2609
|
-
const absoluteUrl =
|
|
2610
|
-
const apiKey = state.selectedApiKey ?
|
|
2611
|
-
const hdrs =
|
|
2625
|
+
const absoluteUrl = chunk7EYHNP3E_cjs.resolveAbsolute(state.requestUrl);
|
|
2626
|
+
const apiKey = state.selectedApiKey ? chunk7EYHNP3E_cjs.findApiKeyById(apiKeys, state.selectedApiKey) : null;
|
|
2627
|
+
const hdrs = chunk7EYHNP3E_cjs.parseRequestHeaders(state.requestHeaders);
|
|
2612
2628
|
if (apiKey) hdrs["X-API-Key"] = apiKey.secret || apiKey.id;
|
|
2613
2629
|
let cmd = `curl -X ${state.requestMethod} "${absoluteUrl}"`;
|
|
2614
2630
|
Object.entries(hdrs).forEach(([k, v]) => {
|
|
@@ -2630,13 +2646,13 @@ function RequestPanel() {
|
|
|
2630
2646
|
[ep]
|
|
2631
2647
|
);
|
|
2632
2648
|
state.loading || !state.requestUrl || !isJsonValid;
|
|
2633
|
-
const displayUrl =
|
|
2649
|
+
const displayUrl = chunk7EYHNP3E_cjs.resolveAbsolute(state.requestUrl || ep?.path || "");
|
|
2634
2650
|
const hasBody = ep?.method !== "GET";
|
|
2635
2651
|
const bodyType = ep?.requestBody?.type ?? "";
|
|
2636
2652
|
const hasPathParams = pathParams.length > 0;
|
|
2637
2653
|
const hasQueryParams = queryParams.length > 0;
|
|
2638
2654
|
const hasCurl = Boolean(curlCommand);
|
|
2639
|
-
const epPath = ep ?
|
|
2655
|
+
const epPath = ep ? chunk7EYHNP3E_cjs.relativePath(ep.path) : "";
|
|
2640
2656
|
const urlChanged = displayUrl !== "" && displayUrl !== epPath;
|
|
2641
2657
|
if (!ep) {
|
|
2642
2658
|
return /* @__PURE__ */ jsxRuntime.jsx(EmptyState, { icon: lucideReact.Send, text: "Select an endpoint to build a request" });
|
|
@@ -3087,7 +3103,7 @@ function ViewTabs({ active, onChange, showPreview }) {
|
|
|
3087
3103
|
}
|
|
3088
3104
|
chunkOLISEQHS_cjs.__name(ViewTabs, "ViewTabs");
|
|
3089
3105
|
function ResponsePanel() {
|
|
3090
|
-
const { state } =
|
|
3106
|
+
const { state } = chunk7EYHNP3E_cjs.usePlaygroundContext();
|
|
3091
3107
|
const { response, loading, selectedEndpoint } = state;
|
|
3092
3108
|
const { treeData, rawText, detected } = useResponseView(response?.data, response?.headers);
|
|
3093
3109
|
const showPreview = detected.kind === "html";
|
|
@@ -3128,15 +3144,15 @@ function ResponsePanel() {
|
|
|
3128
3144
|
}
|
|
3129
3145
|
chunkOLISEQHS_cjs.__name(ResponsePanel, "ResponsePanel");
|
|
3130
3146
|
function SendButton({ className }) {
|
|
3131
|
-
const { state, sendRequest } =
|
|
3147
|
+
const { state, sendRequest } = chunk7EYHNP3E_cjs.usePlaygroundContext();
|
|
3132
3148
|
const ep = state.selectedEndpoint;
|
|
3133
3149
|
const builder = React12.useMemo(
|
|
3134
|
-
() => ep ? new
|
|
3150
|
+
() => ep ? new chunk7EYHNP3E_cjs.UrlBuilder(ep, state.parameters) : null,
|
|
3135
3151
|
[ep, state.parameters]
|
|
3136
3152
|
);
|
|
3137
3153
|
const missingRequired = builder?.missingRequired() ?? [];
|
|
3138
3154
|
const unsubstituted = builder?.unfilledPlaceholders() ?? [];
|
|
3139
|
-
const isJsonValid = state.requestBody ?
|
|
3155
|
+
const isJsonValid = state.requestBody ? chunk7EYHNP3E_cjs.isValidJson(state.requestBody) : true;
|
|
3140
3156
|
const blockers = [];
|
|
3141
3157
|
if (missingRequired.length > 0) {
|
|
3142
3158
|
blockers.push(
|
|
@@ -3176,7 +3192,7 @@ chunkOLISEQHS_cjs.__name(SendButton, "SendButton");
|
|
|
3176
3192
|
var WIDTH_NARROW = "clamp(380px, 30vw, 480px)";
|
|
3177
3193
|
var WIDTH_WIDE = "clamp(720px, 60vw, 1280px)";
|
|
3178
3194
|
function SlideInPlayground({ open, onClose }) {
|
|
3179
|
-
const { state } =
|
|
3195
|
+
const { state } = chunk7EYHNP3E_cjs.usePlaygroundContext();
|
|
3180
3196
|
const ep = state.selectedEndpoint;
|
|
3181
3197
|
const showResponse = state.response !== null || state.loading;
|
|
3182
3198
|
const width = showResponse ? WIDTH_WIDE : WIDTH_NARROW;
|
|
@@ -3185,7 +3201,7 @@ function SlideInPlayground({ open, onClose }) {
|
|
|
3185
3201
|
/* @__PURE__ */ jsxRuntime.jsx(components.SidePanel.Title, { children: "Playground" }),
|
|
3186
3202
|
ep && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 min-w-0 flex-1", children: [
|
|
3187
3203
|
/* @__PURE__ */ jsxRuntime.jsx(MethodBadge, { method: ep.method }),
|
|
3188
|
-
/* @__PURE__ */ jsxRuntime.jsx("code", { className: "font-mono text-[11px] text-muted-foreground truncate", children:
|
|
3204
|
+
/* @__PURE__ */ jsxRuntime.jsx("code", { className: "font-mono text-[11px] text-muted-foreground truncate", children: chunk7EYHNP3E_cjs.relativePath(ep.path) })
|
|
3189
3205
|
] }),
|
|
3190
3206
|
/* @__PURE__ */ jsxRuntime.jsx(components.SidePanel.Close, { className: "ml-auto" })
|
|
3191
3207
|
] }),
|
|
@@ -3209,7 +3225,7 @@ function SlideInPlayground({ open, onClose }) {
|
|
|
3209
3225
|
}
|
|
3210
3226
|
chunkOLISEQHS_cjs.__name(SlideInPlayground, "SlideInPlayground");
|
|
3211
3227
|
function TryItSheet({ open, onOpenChange }) {
|
|
3212
|
-
const { state } =
|
|
3228
|
+
const { state } = chunk7EYHNP3E_cjs.usePlaygroundContext();
|
|
3213
3229
|
const showResponse = state.response !== null || state.loading;
|
|
3214
3230
|
return /* @__PURE__ */ jsxRuntime.jsx(components.ResponsiveSheet, { open, onOpenChange, children: /* @__PURE__ */ jsxRuntime.jsxs(components.ResponsiveSheetContent, { className: "sm:max-w-xl flex flex-col h-full p-0", children: [
|
|
3215
3231
|
/* @__PURE__ */ jsxRuntime.jsx(components.ResponsiveSheetHeader, { className: "px-4 py-3 border-b shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx(components.ResponsiveSheetTitle, { className: "text-sm", children: "Playground" }) }),
|
|
@@ -3224,7 +3240,7 @@ function TryItSheet({ open, onOpenChange }) {
|
|
|
3224
3240
|
}
|
|
3225
3241
|
chunkOLISEQHS_cjs.__name(TryItSheet, "TryItSheet");
|
|
3226
3242
|
var DocsLayout = /* @__PURE__ */ chunkOLISEQHS_cjs.__name(() => {
|
|
3227
|
-
const { state, config, setSelectedEndpoint } =
|
|
3243
|
+
const { state, config, setSelectedEndpoint } = chunk7EYHNP3E_cjs.usePlaygroundContext();
|
|
3228
3244
|
const isDesktop = hooks.useMediaQuery("(min-width: 1024px)");
|
|
3229
3245
|
const isMobile = !isDesktop;
|
|
3230
3246
|
const grouping = config.schemaGrouping ?? "selector";
|
|
@@ -3435,5 +3451,5 @@ var DocsLayout = /* @__PURE__ */ chunkOLISEQHS_cjs.__name(() => {
|
|
|
3435
3451
|
}, "DocsLayout");
|
|
3436
3452
|
|
|
3437
3453
|
exports.DocsLayout = DocsLayout;
|
|
3438
|
-
//# sourceMappingURL=DocsLayout-
|
|
3439
|
-
//# sourceMappingURL=DocsLayout-
|
|
3454
|
+
//# sourceMappingURL=DocsLayout-Q4KS3QWW.cjs.map
|
|
3455
|
+
//# sourceMappingURL=DocsLayout-Q4KS3QWW.cjs.map
|