@rebasepro/studio 0.19.1 → 0.19.2-canary.g08eed46
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/{ApiExplorer-9iwGvNnt.js → ApiExplorer-CND5O4Z5.js} +11 -11
- package/dist/ApiExplorer-CND5O4Z5.js.map +1 -0
- package/dist/{ApiKeysView-EIvegrUk.js → ApiKeysView-OfJLH2x7.js} +14 -14
- package/dist/ApiKeysView-OfJLH2x7.js.map +1 -0
- package/dist/{AuthSimulationSelector-Bougd521.js → AuthSimulationSelector-BewmhMBw.js} +2 -2
- package/dist/{AuthSimulationSelector-Bougd521.js.map → AuthSimulationSelector-BewmhMBw.js.map} +1 -1
- package/dist/{BackupsView-DVkKzaPR.js → BackupsView-D0ZDqTEn.js} +6 -6
- package/dist/{BackupsView-DVkKzaPR.js.map → BackupsView-D0ZDqTEn.js.map} +1 -1
- package/dist/{BranchesView-Df8hQ8wE.js → BranchesView-D6Sz1a5f.js} +11 -11
- package/dist/BranchesView-D6Sz1a5f.js.map +1 -0
- package/dist/{CronJobsView-CLOGjb-L.js → CronJobsView-JwRjQCde.js} +12 -12
- package/dist/CronJobsView-JwRjQCde.js.map +1 -0
- package/dist/{JSEditor-75FTeu6P.js → JSEditor-qiuwmcvk.js} +21 -21
- package/dist/JSEditor-qiuwmcvk.js.map +1 -0
- package/dist/{LogsExplorer-DI8SVpya.js → LogsExplorer-Xq8K4oo6.js} +3 -3
- package/dist/{LogsExplorer-DI8SVpya.js.map → LogsExplorer-Xq8K4oo6.js.map} +1 -1
- package/dist/{RLSEditor-Sa1D34ny.js → RLSEditor-C958zVWW.js} +34 -34
- package/dist/RLSEditor-C958zVWW.js.map +1 -0
- package/dist/{SQLEditor-BfNA8xM3.js → SQLEditor-sdtoZv5F.js} +37 -37
- package/dist/SQLEditor-sdtoZv5F.js.map +1 -0
- package/dist/{SchemaVisualizer-DTDMYL6o.js → SchemaVisualizer-DtDzIUNy.js} +30 -27
- package/dist/SchemaVisualizer-DtDzIUNy.js.map +1 -0
- package/dist/{StorageView-Ed9Q_VlB.js → StorageView-C52dSZNf.js} +16 -16
- package/dist/StorageView-C52dSZNf.js.map +1 -0
- package/dist/index.es.js +19 -19
- package/dist/index.es.js.map +1 -1
- package/package.json +9 -9
- package/dist/ApiExplorer-9iwGvNnt.js.map +0 -1
- package/dist/ApiKeysView-EIvegrUk.js.map +0 -1
- package/dist/BranchesView-Df8hQ8wE.js.map +0 -1
- package/dist/CronJobsView-CLOGjb-L.js.map +0 -1
- package/dist/JSEditor-75FTeu6P.js.map +0 -1
- package/dist/RLSEditor-Sa1D34ny.js.map +0 -1
- package/dist/SQLEditor-BfNA8xM3.js.map +0 -1
- package/dist/SchemaVisualizer-DTDMYL6o.js.map +0 -1
- package/dist/StorageView-Ed9Q_VlB.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as AuthSimulationSelector } from "./AuthSimulationSelector-
|
|
1
|
+
import { t as AuthSimulationSelector } from "./AuthSimulationSelector-BewmhMBw.js";
|
|
2
2
|
import { useApiBase, useApiConfig, useAuthController, useRebaseContext } from "@rebasepro/app";
|
|
3
3
|
import React, { useCallback, useEffect, useMemo, useState } from "react";
|
|
4
4
|
import { Alert, ArrowRightFromLineIcon, BookOpenIcon, Button, Chip, CircularProgress, IconButton, LoaderIcon, PlayIcon, PlusIcon, SearchBar, SendIcon, SlidersHorizontalIcon, TextField, Typography, UploadIcon, XIcon, cls, defaultBorderMixin, iconSize } from "@rebasepro/ui";
|
|
@@ -123,7 +123,7 @@ function EndpointDetail({ endpoint, spec }) {
|
|
|
123
123
|
children: /* @__PURE__ */ jsxs("table", {
|
|
124
124
|
className: "w-full text-sm",
|
|
125
125
|
children: [/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", {
|
|
126
|
-
className: "bg-surface-
|
|
126
|
+
className: "bg-surface-raised text-left",
|
|
127
127
|
children: [
|
|
128
128
|
/* @__PURE__ */ jsx("th", {
|
|
129
129
|
className: "px-4 py-2 font-medium text-text-secondary dark:text-text-secondary-dark",
|
|
@@ -202,7 +202,7 @@ function EndpointDetail({ endpoint, spec }) {
|
|
|
202
202
|
children: Object.entries(endpoint.responses).map(([code, res]) => /* @__PURE__ */ jsxs("div", {
|
|
203
203
|
className: cls("rounded-lg border overflow-hidden", defaultBorderMixin),
|
|
204
204
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
205
|
-
className: cls("flex items-center gap-3 px-4 py-2.5", "bg-surface-
|
|
205
|
+
className: cls("flex items-center gap-3 px-4 py-2.5", "bg-surface-sheet"),
|
|
206
206
|
children: [/* @__PURE__ */ jsx(StatusBadge, { code }), /* @__PURE__ */ jsx(Typography, {
|
|
207
207
|
variant: "body2",
|
|
208
208
|
className: "text-text-secondary dark:text-text-secondary-dark text-xs",
|
|
@@ -275,7 +275,7 @@ function SchemaBlock({ schema, spec, depth }) {
|
|
|
275
275
|
prop.enum && /* @__PURE__ */ jsx("div", {
|
|
276
276
|
className: "flex flex-wrap gap-1 mt-1",
|
|
277
277
|
children: prop.enum.map((v) => /* @__PURE__ */ jsx("span", {
|
|
278
|
-
className: "px-1.5 py-0.5 rounded bg-surface-
|
|
278
|
+
className: "px-1.5 py-0.5 rounded bg-surface-raised text-[10px] font-mono",
|
|
279
279
|
children: String(v)
|
|
280
280
|
}, String(v)))
|
|
281
281
|
}),
|
|
@@ -573,7 +573,7 @@ function TryItPanel({ endpoint, apiUrl, getAuthToken, user, basePath = "" }) {
|
|
|
573
573
|
})
|
|
574
574
|
] }),
|
|
575
575
|
/* @__PURE__ */ jsxs("div", {
|
|
576
|
-
className: "rounded-lg bg-surface-
|
|
576
|
+
className: "rounded-lg bg-surface-raised p-3",
|
|
577
577
|
children: [/* @__PURE__ */ jsx(Typography, {
|
|
578
578
|
variant: "caption",
|
|
579
579
|
className: "text-text-secondary dark:text-text-secondary-dark text-[10px] uppercase tracking-wider block mb-1",
|
|
@@ -602,7 +602,7 @@ function TryItPanel({ endpoint, apiUrl, getAuthToken, user, basePath = "" }) {
|
|
|
602
602
|
response && /* @__PURE__ */ jsxs("div", {
|
|
603
603
|
className: cls("rounded-lg border overflow-hidden", defaultBorderMixin),
|
|
604
604
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
605
|
-
className: cls("flex items-center justify-between px-4 py-2.5", "bg-surface-
|
|
605
|
+
className: cls("flex items-center justify-between px-4 py-2.5", "bg-surface-sheet"),
|
|
606
606
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
607
607
|
className: "flex items-center gap-3",
|
|
608
608
|
children: [/* @__PURE__ */ jsx(ResponseBadge, { status: response.status }), /* @__PURE__ */ jsx(Typography, {
|
|
@@ -616,7 +616,7 @@ function TryItPanel({ endpoint, apiUrl, getAuthToken, user, basePath = "" }) {
|
|
|
616
616
|
children: [response.time, "ms"]
|
|
617
617
|
})]
|
|
618
618
|
}), /* @__PURE__ */ jsx("pre", {
|
|
619
|
-
className: cls("p-4 text-xs font-mono overflow-auto max-h-96", "bg-surface-
|
|
619
|
+
className: cls("p-4 text-xs font-mono overflow-auto max-h-96", "bg-surface-well text-emerald-700 dark:text-emerald-400"),
|
|
620
620
|
children: response.body
|
|
621
621
|
})]
|
|
622
622
|
})
|
|
@@ -863,7 +863,7 @@ function ApiExplorer() {
|
|
|
863
863
|
return /* @__PURE__ */ jsxs("div", {
|
|
864
864
|
className: "flex h-full w-full overflow-hidden",
|
|
865
865
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
866
|
-
className: cls("w-72 min-w-[272px] flex flex-col h-full overflow-hidden border-r", defaultBorderMixin, "bg-surface-
|
|
866
|
+
className: cls("w-72 min-w-[272px] flex flex-col h-full overflow-hidden border-r", defaultBorderMixin, "bg-surface-sheet"),
|
|
867
867
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
868
868
|
className: "p-4 space-y-3",
|
|
869
869
|
children: [
|
|
@@ -909,7 +909,7 @@ function ApiExplorer() {
|
|
|
909
909
|
setSelectedEndpoint(ep);
|
|
910
910
|
setTryItOpen(false);
|
|
911
911
|
},
|
|
912
|
-
className: cls("!justify-between !px-2.5 !py-1.5 !text-left !text-sm", selectedEndpoint?.id === ep.id ? "bg-surface-
|
|
912
|
+
className: cls("!justify-between !px-2.5 !py-1.5 !text-left !text-sm", selectedEndpoint?.id === ep.id ? "bg-surface-raised font-medium" : "text-text-primary dark:text-text-primary-dark"),
|
|
913
913
|
children: [/* @__PURE__ */ jsx("span", {
|
|
914
914
|
className: "truncate text-[13px] opacity-90",
|
|
915
915
|
children: ep.summary || ep.shortPath
|
|
@@ -928,7 +928,7 @@ function ApiExplorer() {
|
|
|
928
928
|
}), /* @__PURE__ */ jsx("div", {
|
|
929
929
|
className: "flex-1 flex flex-col h-full overflow-hidden",
|
|
930
930
|
children: selectedEndpoint ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("div", {
|
|
931
|
-
className: cls("flex items-center justify-between px-5 py-3 gap-4 shrink-0 border-b z-10", defaultBorderMixin, "bg-surface-
|
|
931
|
+
className: cls("flex items-center justify-between px-5 py-3 gap-4 shrink-0 border-b z-10", defaultBorderMixin, "bg-surface-sheet/90 backdrop-blur-md sticky top-0"),
|
|
932
932
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
933
933
|
className: "flex items-center gap-3 min-w-0",
|
|
934
934
|
children: [/* @__PURE__ */ jsx("span", {
|
|
@@ -974,4 +974,4 @@ ApiExplorer.displayName = "ApiExplorer";
|
|
|
974
974
|
//#endregion
|
|
975
975
|
export { ApiExplorer };
|
|
976
976
|
|
|
977
|
-
//# sourceMappingURL=ApiExplorer-
|
|
977
|
+
//# sourceMappingURL=ApiExplorer-CND5O4Z5.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApiExplorer-CND5O4Z5.js","names":[],"sources":["../src/components/ApiExplorer/parseSpec.ts","../src/components/ApiExplorer/EndpointDetail.tsx","../src/components/ApiExplorer/TryItPanel.tsx","../src/components/ApiExplorer/ApiExplorer.tsx"],"sourcesContent":["import type { OpenApiSpec, ParsedEndpoint, EndpointGroup } from \"./types\";\n\n/**\n * Parse an OpenAPI 3.x spec into grouped, sorted endpoints for the sidebar.\n */\nexport function parseOpenApiSpec(spec: OpenApiSpec): {\n groups: EndpointGroup[];\n allEndpoints: ParsedEndpoint[];\n} {\n const allEndpoints: ParsedEndpoint[] = [];\n const tagMap = new Map<string, ParsedEndpoint[]>();\n\n // Build tag description lookup\n const tagDescriptions = new Map<string, string>();\n for (const t of spec.tags ?? []) {\n tagDescriptions.set(t.name, t.description ?? \"\");\n }\n\n for (const [path, methods] of Object.entries(spec.paths ?? {})) {\n for (const [method, op] of Object.entries(methods)) {\n if ([\"get\", \"post\", \"put\", \"patch\", \"delete\"].indexOf(method) === -1) continue;\n\n const tags = op.tags?.length ? op.tags : [\"Other\"];\n const shortPath = path.replace(/^\\/api\\/data/, \"\");\n\n const endpoint: ParsedEndpoint = {\n id: `${method}:${path}`,\n method,\n path,\n shortPath: shortPath || \"/\",\n summary: op.summary ?? \"\",\n description: op.description ?? \"\",\n tags,\n parameters: op.parameters ?? [],\n requestBody: op.requestBody,\n responses: op.responses ?? {},\n security: op.security,\n operationId: op.operationId\n };\n\n allEndpoints.push(endpoint);\n for (const tag of tags) {\n if (!tagMap.has(tag)) tagMap.set(tag, []);\n tagMap.get(tag)!.push(endpoint);\n }\n }\n }\n\n // Method sort order\n const ORDER: Record<string, number> = { get: 0,\npost: 1,\nput: 2,\npatch: 3,\ndelete: 4 };\n\n const groups: EndpointGroup[] = [];\n // Sort tags: use spec.tags order if available, else alphabetical\n const tagOrder = (spec.tags ?? []).map((t) => t.name);\n const sortedTags = [...tagMap.keys()].sort((a, b) => {\n const ai = tagOrder.indexOf(a);\n const bi = tagOrder.indexOf(b);\n if (ai !== -1 && bi !== -1) return ai - bi;\n if (ai !== -1) return -1;\n if (bi !== -1) return 1;\n return a.localeCompare(b);\n });\n\n for (const tag of sortedTags) {\n const endpoints = tagMap.get(tag)!;\n endpoints.sort((a, b) => {\n const pa = a.path.localeCompare(b.path);\n if (pa !== 0) return pa;\n return (ORDER[a.method] ?? 99) - (ORDER[b.method] ?? 99);\n });\n groups.push({\n tag,\n description: tagDescriptions.get(tag),\n endpoints\n });\n }\n\n return { groups,\nallEndpoints };\n}\n\n/**\n * Resolve a $ref string (e.g. \"#/components/schemas/Author\") to a schema name.\n */\nexport function resolveRefName(ref: string): string {\n const parts = ref.split(\"/\");\n return parts[parts.length - 1];\n}\n\n/**\n * Resolve a $ref to its actual schema from the spec.\n */\nexport function resolveRef(spec: OpenApiSpec, ref: string): unknown {\n const parts = ref.replace(\"#/\", \"\").split(\"/\");\n let current: unknown = spec;\n for (const part of parts) {\n current = (current as Record<string, unknown>)?.[part];\n }\n return current ?? {};\n}\n","import React from \"react\";\nimport {\n ArrowRightFromLineIcon,\n Chip,\n cls,\n defaultBorderMixin,\n iconSize,\n SlidersHorizontalIcon,\n Typography,\n UploadIcon\n} from \"@rebasepro/ui\";\nimport type { ParsedEndpoint, OpenApiSpec, OpenApiSchema } from \"./types\";\nimport { resolveRef, resolveRefName } from \"./parseSpec\";\n\n/**\n * Renders the documentation view for a single API endpoint:\n * parameters, request body schema, response schemas.\n */\nexport function EndpointDetail({ endpoint, spec }: { endpoint: ParsedEndpoint; spec: OpenApiSpec }) {\n return (\n <div className=\"p-6 space-y-8 max-w-4xl\">\n {/* Summary / Description */}\n {(endpoint.summary || endpoint.description) && (\n <div>\n {endpoint.summary && (\n <Typography variant=\"h6\" className=\"font-semibold mb-1\">\n {endpoint.summary}\n </Typography>\n )}\n {endpoint.description && (\n <Typography variant=\"body2\" className=\"text-text-secondary dark:text-text-secondary-dark\">\n {endpoint.description}\n </Typography>\n )}\n </div>\n )}\n\n {/* Parameters */}\n {endpoint.parameters.length > 0 && (\n <section>\n <SectionHeading icon={<SlidersHorizontalIcon size={iconSize.small} className=\"text-text-secondary dark:text-text-secondary-dark\" />} title=\"Parameters\"/>\n <div className={cls(\"rounded-lg border overflow-hidden\", defaultBorderMixin)}>\n <table className=\"w-full text-sm\">\n <thead>\n <tr className=\"bg-surface-raised text-left\">\n <th className=\"px-4 py-2 font-medium text-text-secondary dark:text-text-secondary-dark\">\n Name\n </th>\n <th className=\"px-4 py-2 font-medium text-text-secondary dark:text-text-secondary-dark\">\n In\n </th>\n <th className=\"px-4 py-2 font-medium text-text-secondary dark:text-text-secondary-dark\">\n Type\n </th>\n <th className=\"px-4 py-2 font-medium text-text-secondary dark:text-text-secondary-dark\">\n Description\n </th>\n </tr>\n </thead>\n <tbody>\n {endpoint.parameters.map((p, i) => (\n <tr\n key={p.name + i}\n className={cls(\"border-t\", defaultBorderMixin)}\n >\n <td className=\"px-4 py-2.5\">\n <code className=\"text-xs font-mono font-semibold\">{p.name}</code>\n {p.required && <span className=\"text-red-500 ml-1 text-xs\">*</span>}\n </td>\n <td className=\"px-4 py-2.5\">\n <Chip\n size=\"smallest\"\n colorScheme={p.in === \"path\" ? \"orangeDarker\" : \"cyanDarker\"}\n >\n {p.in}\n </Chip>\n </td>\n <td className=\"px-4 py-2.5 text-xs font-mono text-text-secondary dark:text-text-secondary-dark\">\n {schemaTypeLabel(p.schema)}\n </td>\n <td className=\"px-4 py-2.5 text-xs text-text-secondary dark:text-text-secondary-dark\">\n {p.description ?? \"—\"}\n </td>\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n </section>\n )}\n\n {/* Request Body */}\n {endpoint.requestBody && (\n <section>\n <SectionHeading icon={<UploadIcon size={iconSize.small} className=\"text-text-secondary dark:text-text-secondary-dark\" />} title=\"Request Body\"/>\n {Object.entries(endpoint.requestBody.content ?? {}).map(([contentType, media]) => (\n <div key={contentType}>\n <Chip size=\"smallest\" colorScheme=\"blueDarker\" className=\"mb-3\">\n {contentType}\n </Chip>\n {media.schema && <SchemaBlock schema={media.schema} spec={spec} depth={0}/>}\n </div>\n ))}\n </section>\n )}\n\n {/* Responses */}\n <section>\n <SectionHeading icon={<ArrowRightFromLineIcon size={iconSize.small} className=\"text-text-secondary dark:text-text-secondary-dark\" />} title=\"Responses\"/>\n <div className=\"space-y-3\">\n {Object.entries(endpoint.responses).map(([code, res]) => (\n <div\n key={code}\n className={cls(\"rounded-lg border overflow-hidden\", defaultBorderMixin)}\n >\n <div\n className={cls(\n \"flex items-center gap-3 px-4 py-2.5\",\n \"bg-surface-sheet\"\n )}\n >\n <StatusBadge code={code}/>\n <Typography\n variant=\"body2\"\n className=\"text-text-secondary dark:text-text-secondary-dark text-xs\"\n >\n {res.description}\n </Typography>\n </div>\n {res.content &&\n Object.entries(res.content).map(\n ([ct, media]) =>\n media.schema && (\n <div\n key={ct}\n className={cls(\"px-4 py-3 border-t\", defaultBorderMixin)}\n >\n <SchemaBlock schema={media.schema} spec={spec} depth={0}/>\n </div>\n )\n )}\n </div>\n ))}\n </div>\n </section>\n </div>\n );\n}\n\n/* ── Schema Block ─────────────────────────────────────────────────── */\n\nfunction SchemaBlock({ schema, spec, depth }: { schema: OpenApiSchema; spec: OpenApiSpec; depth: number }) {\n // Resolve $ref\n if (schema.$ref) {\n const name = resolveRefName(schema.$ref);\n const resolved = resolveRef(spec, schema.$ref) as OpenApiSchema;\n return (\n <div>\n <Typography\n variant=\"caption\"\n className=\"text-primary dark:text-primary-dark font-mono text-xs mb-2 block\"\n >\n {name}\n </Typography>\n <SchemaBlock schema={resolved} spec={spec} depth={depth}/>\n </div>\n );\n }\n\n // Object with properties\n if (schema.properties) {\n const required = new Set(schema.required ?? []);\n return (\n <div\n className={cls(\n \"rounded-lg overflow-hidden\",\n depth > 0 && `border ml-4 mt-1 ${defaultBorderMixin}`\n )}\n >\n <table className=\"w-full text-xs\">\n <tbody>\n {Object.entries(schema.properties).map(([key, prop]) => (\n <tr\n key={key}\n className={cls(\"border-t first:border-t-0\", defaultBorderMixin)}\n >\n <td className=\"px-3 py-2 align-top w-36\">\n <code className=\"font-mono font-semibold text-text-primary dark:text-text-primary-dark\">\n {key}\n </code>\n {required.has(key) && <span className=\"text-red-500 ml-0.5\">*</span>}\n {prop.readOnly && (\n <span className=\"ml-1.5 text-[9px] text-text-secondary dark:text-text-secondary-dark italic\">\n read-only\n </span>\n )}\n </td>\n <td className=\"px-3 py-2 align-top w-28\">\n <span className=\"font-mono text-text-secondary dark:text-text-secondary-dark\">\n {schemaTypeLabel(prop)}\n </span>\n </td>\n <td className=\"px-3 py-2 align-top text-text-secondary dark:text-text-secondary-dark\">\n {prop.description ?? \"\"}\n {prop.enum && (\n <div className=\"flex flex-wrap gap-1 mt-1\">\n {prop.enum.map((v) => (\n <span\n key={String(v)}\n className=\"px-1.5 py-0.5 rounded bg-surface-raised text-[10px] font-mono\"\n >\n {String(v)}\n </span>\n ))}\n </div>\n )}\n {prop.properties && <SchemaBlock schema={prop} spec={spec} depth={depth + 1}/>}\n {prop.$ref && <SchemaBlock schema={prop} spec={spec} depth={depth + 1}/>}\n </td>\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n );\n }\n\n // Array\n if (schema.type === \"array\" && schema.items) {\n return (\n <div>\n <span className=\"font-mono text-xs text-text-secondary dark:text-text-secondary-dark\">Array of:</span>\n <SchemaBlock schema={schema.items} spec={spec} depth={depth + 1}/>\n </div>\n );\n }\n\n // Primitive\n return (\n <span className=\"font-mono text-xs text-text-secondary dark:text-text-secondary-dark\">\n {schemaTypeLabel(schema)}\n </span>\n );\n}\n\n/* ── Helpers ──────────────────────────────────────────────────────── */\n\nfunction schemaTypeLabel(schema?: OpenApiSchema): string {\n if (!schema) return \"any\";\n if (schema.$ref) return resolveRefName(schema.$ref);\n if (schema.type === \"array\") return `${schemaTypeLabel(schema.items)}[]`;\n if (schema.format) return `${schema.type} (${schema.format})`;\n return schema.type ?? \"object\";\n}\n\nfunction SectionHeading({ icon, title }: { icon: React.ReactNode; title: string }) {\n return (\n <div className=\"flex items-center gap-2 mb-3\">\n {icon}\n <Typography variant=\"subtitle2\" className=\"font-semibold text-sm\">\n {title}\n </Typography>\n </div>\n );\n}\n\nfunction StatusBadge({ code }: { code: string }) {\n const n = parseInt(code, 10);\n const color =\n n < 300\n ? \"text-emerald-600 dark:text-emerald-400\"\n : n < 400\n ? \"text-blue-600 dark:text-blue-400\"\n : n < 500\n ? \"text-amber-600 dark:text-amber-400\"\n : \"text-red-600 dark:text-red-400\";\n\n return <span className={cls(\"text-xs font-semibold font-mono\", color)}>{code}</span>;\n}\n","import React, { useState, useCallback, useMemo, useEffect } from \"react\";\nimport {\n Button,\n cls,\n defaultBorderMixin,\n IconButton,\n iconSize,\n LoaderIcon,\n PlusIcon,\n SendIcon,\n TextField,\n Typography,\n XIcon\n} from \"@rebasepro/ui\";\nimport { useRebaseContext, UserSelectPopover, SelectableUser } from \"@rebasepro/app\";\nimport { AuthSimulationSelector } from \"../AuthSimulationSelector\";\nimport type { ParsedEndpoint } from \"./types\";\nimport type { User } from \"@rebasepro/types\";\n\ninterface TryItPanelProps {\n endpoint: ParsedEndpoint;\n apiUrl: string;\n getAuthToken: () => Promise<string | null | undefined>;\n user: User | null;\n basePath?: string;\n}\n\n/**\n * Interactive \"Try It\" panel that lets the user execute API requests\n * using their current JWT token directly from the Studio.\n */\nexport function TryItPanel({ endpoint, apiUrl, getAuthToken, user, basePath = \"\" }: TryItPanelProps) {\n const storageKey = `rebase_apiexplorer_${endpoint.method}_${endpoint.path}`;\n\n const [pathParams, setPathParams] = useState<Record<string, string>>(() => {\n try { const v = localStorage.getItem(`${storageKey}_path`); if (v) return JSON.parse(v); } catch { /* ignore */ }\n return {};\n });\n const [queryParams, setQueryParams] = useState<Record<string, string>>(() => {\n try { const v = localStorage.getItem(`${storageKey}_query`); if (v) return JSON.parse(v); } catch { /* ignore */ }\n return {};\n });\n const [customHeaders, setCustomHeaders] = useState<Array<{ key: string; value: string }>>(() => {\n try { const v = localStorage.getItem(`${storageKey}_headers`); if (v) return JSON.parse(v); } catch { /* ignore */ }\n return [{ key: \"rebase-branch\",\nvalue: \"\" }];\n });\n const [body, setBody] = useState(() => {\n try { const v = localStorage.getItem(`${storageKey}_body`); if (v) return JSON.parse(v); } catch { /* ignore */ }\n return buildBodyTemplate(endpoint);\n });\n const [response, setResponse] = useState<{ status: number; statusText: string; body: string; time: number } | null>(\n null\n );\n const [loading, setLoading] = useState(false);\n const [authMode, setAuthMode] = useState<\"jwt\" | \"none\">(\"jwt\");\n const [validationError, setValidationError] = useState<string | null>(null);\n\n const rebaseContext = useRebaseContext();\n const currentUser = rebaseContext.authController?.user;\n\n const users = useMemo((): SelectableUser[] => {\n const managed: SelectableUser[] = [];\n if (currentUser) {\n managed.push({\n uid: currentUser.uid,\n displayName: currentUser.displayName,\n email: currentUser.email,\n photoURL: currentUser.photoURL,\n roles: currentUser.roles\n });\n }\n return managed;\n }, [currentUser]);\n\n const currentSelectableUser = useMemo((): SelectableUser | null => {\n if (!currentUser) return null;\n return {\n uid: currentUser.uid,\n displayName: currentUser.displayName,\n email: currentUser.email,\n photoURL: currentUser.photoURL,\n roles: currentUser.roles\n };\n }, [currentUser]);\n\n const [selectedUser, setSelectedUser] = useState<SelectableUser | null>(null);\n\n useEffect(() => {\n localStorage.setItem(`${storageKey}_path`, JSON.stringify(pathParams));\n localStorage.setItem(`${storageKey}_query`, JSON.stringify(queryParams));\n localStorage.setItem(`${storageKey}_headers`, JSON.stringify(customHeaders));\n localStorage.setItem(`${storageKey}_body`, JSON.stringify(body));\n }, [storageKey, pathParams, queryParams, customHeaders, body]);\n\n // Build the final URL\n const resolvedUrl = useMemo(() => {\n const base = basePath.startsWith(\"/\") ? basePath : `/${basePath}`;\n const cleanBase = base === \"/\" ? \"\" : base;\n let url = `${apiUrl.replace(/\\/+$/, \"\")}${cleanBase}${endpoint.path}`;\n // Replace path params\n for (const [key, val] of Object.entries(pathParams)) {\n url = url.replace(`{${key}}`, encodeURIComponent(val));\n }\n // Append query params\n const qp = Object.entries(queryParams).filter(([, v]) => v.trim() !== \"\");\n if (qp.length > 0) {\n url += \"?\" + qp.map(([k, v]) => `${encodeURIComponent(k)}=${encodeURIComponent(v)}`).join(\"&\");\n }\n return url;\n }, [apiUrl, basePath, endpoint.path, pathParams, queryParams]);\n\n const pathParamDefs = endpoint.parameters.filter((p) => p.in === \"path\");\n const queryParamDefs = endpoint.parameters.filter((p) => p.in === \"query\");\n const hasBody = [\"post\", \"put\", \"patch\"].includes(endpoint.method);\n\n const execute = useCallback(async () => {\n setValidationError(null);\n if (hasBody && body.trim()) {\n try {\n JSON.parse(body);\n } catch (err: unknown) {\n setValidationError(`Invalid JSON: ${err instanceof Error ? err.message : String(err)}`);\n return;\n }\n }\n\n setLoading(true);\n setResponse(null);\n const start = performance.now();\n\n try {\n const headers: Record<string, string> = { \"Content-Type\": \"application/json\" };\n\n for (const h of customHeaders) {\n if (h.key.trim()) headers[h.key.trim()] = h.value;\n }\n\n if (authMode === \"jwt\") {\n const token = await getAuthToken();\n if (token) headers[\"Authorization\"] = `Bearer ${token}`;\n if (selectedUser && selectedUser.uid !== currentUser?.uid) {\n headers[\"x-rebase-impersonate\"] = selectedUser.uid;\n }\n }\n\n const res = await fetch(resolvedUrl, {\n method: endpoint.method.toUpperCase(),\n headers,\n body: hasBody && body.trim() ? body : undefined\n });\n\n const elapsed = Math.round(performance.now() - start);\n let text: string;\n\n const rawText = await res.text();\n try {\n const json = JSON.parse(rawText);\n text = JSON.stringify(json, null, 2);\n } catch {\n text = rawText;\n }\n\n setResponse({ status: res.status,\nstatusText: res.statusText,\nbody: text,\ntime: elapsed });\n } catch (err: unknown) {\n setResponse({\n status: 0,\n statusText: \"Network Error\",\n body: err instanceof Error ? err.message : \"Request failed\",\n time: Math.round(performance.now() - start)\n });\n } finally {\n setLoading(false);\n }\n }, [resolvedUrl, endpoint.method, hasBody, body, authMode, getAuthToken, customHeaders, selectedUser, currentUser?.uid]);\n\n return (\n <div className=\"flex flex-col h-full\">\n <div className=\"p-5 space-y-5 overflow-y-auto flex-1\">\n {/* Auth Mode */}\n <AuthSimulationSelector\n authMode={authMode}\n setAuthMode={setAuthMode}\n selectedUser={selectedUser}\n setSelectedUser={setSelectedUser}\n users={users}\n loading={false}\n currentUser={currentSelectableUser}\n />\n\n {/* Path Params */}\n {pathParamDefs.length > 0 && (\n <ParamSection\n title=\"Path Parameters\"\n params={pathParamDefs}\n values={pathParams}\n onChange={(k, v) => setPathParams((prev) => ({ ...prev,\n[k]: v }))}\n />\n )}\n\n {/* Query Params */}\n {queryParamDefs.length > 0 && (\n <ParamSection\n title=\"Query Parameters\"\n params={queryParamDefs}\n values={queryParams}\n onChange={(k, v) => setQueryParams((prev) => ({ ...prev,\n[k]: v }))}\n />\n )}\n\n {/* Custom Headers */}\n <CustomKeyValueSection\n title=\"Custom Headers\"\n values={customHeaders}\n onChange={(i, k, v) => {\n const next = [...customHeaders];\n next[i] = { key: k,\nvalue: v };\n setCustomHeaders(next);\n }}\n onAdd={() => setCustomHeaders((prev) => [...prev, { key: \"\",\nvalue: \"\" }])}\n onRemove={(i) => {\n const next = [...customHeaders];\n next.splice(i, 1);\n setCustomHeaders(next);\n }}\n />\n\n {/* Request Body */}\n {hasBody && (\n <div>\n <Typography\n variant=\"caption\"\n className=\"text-text-secondary dark:text-text-secondary-dark text-xs font-semibold uppercase tracking-wider mb-2 block\"\n >\n Request Body\n </Typography>\n <TextField\n multiline\n minRows={10}\n aria-label=\"Request Body\"\n value={body}\n onChange={(e) => { setBody(e.target.value); setValidationError(null); }}\n spellCheck={false}\n error={!!validationError}\n className=\"w-full\"\n inputClassName=\"font-mono text-xs p-3 resize-y\"\n />\n {validationError && (\n <Typography variant=\"caption\" className=\"text-red-500 mt-1 block text-xs\">\n {validationError}\n </Typography>\n )}\n </div>\n )}\n\n {/* URL Preview */}\n <div className=\"rounded-lg bg-surface-raised p-3\">\n <Typography\n variant=\"caption\"\n className=\"text-text-secondary dark:text-text-secondary-dark text-[10px] uppercase tracking-wider block mb-1\"\n >\n Request URL\n </Typography>\n <code className=\"text-xs font-mono text-text-primary dark:text-text-primary-dark break-all\">\n {resolvedUrl}\n </code>\n </div>\n\n {/* Execute Button */}\n <Button variant=\"filled\" onClick={execute} disabled={loading} className=\"w-full\">\n {loading ? (\n <span className=\"flex items-center gap-2\">\n <LoaderIcon size={iconSize.small} className=\"animate-spin\" />\n Sending…\n </span>\n ) : (\n <span className=\"flex items-center gap-2\">\n <SendIcon size={iconSize.small} />\n Send Request\n </span>\n )}\n </Button>\n\n {/* Response */}\n {response && (\n <div className={cls(\"rounded-lg border overflow-hidden\", defaultBorderMixin)}>\n <div\n className={cls(\n \"flex items-center justify-between px-4 py-2.5\",\n \"bg-surface-sheet\"\n )}\n >\n <div className=\"flex items-center gap-3\">\n <ResponseBadge status={response.status}/>\n <Typography\n variant=\"caption\"\n className=\"text-text-secondary dark:text-text-secondary-dark text-xs\"\n >\n {response.statusText}\n </Typography>\n </div>\n <Typography\n variant=\"caption\"\n className=\"text-text-secondary dark:text-text-secondary-dark text-xs font-mono\"\n >\n {response.time}ms\n </Typography>\n </div>\n <pre\n className={cls(\n \"p-4 text-xs font-mono overflow-auto max-h-96\",\n \"bg-surface-well text-emerald-700 dark:text-emerald-400\"\n )}\n >\n {response.body}\n </pre>\n </div>\n )}\n </div>\n </div>\n );\n}\n\n/* ── Param Section ────────────────────────────────────────────────── */\n\nfunction ParamSection({\n title,\n params,\n values,\n onChange\n}: {\n title: string;\n params: ParsedEndpoint[\"parameters\"];\n values: Record<string, string>;\n onChange: (_key: string, _value: string) => void;\n}) {\n const paramIdBase = React.useId();\n return (\n <div>\n <Typography\n variant=\"caption\"\n className=\"text-text-secondary dark:text-text-secondary-dark text-xs font-semibold uppercase tracking-wider mb-2 block\"\n >\n {title}\n </Typography>\n <div className=\"space-y-2\">\n {params.map((p, index) => (\n <div key={p.name} className=\"flex items-center gap-3\">\n <label className=\"w-32 shrink-0\" htmlFor={`${paramIdBase}-${index}-param`}>\n <code className=\"text-xs font-mono font-semibold\">{p.name}</code>\n {p.required && <span className=\"text-red-500 ml-0.5 text-xs\">*</span>}\n </label>\n <TextField\n id={`${paramIdBase}-${index}-param`}\n size=\"small\"\n placeholder={p.description ?? p.name}\n value={values[p.name] ?? \"\"}\n onChange={(e) => onChange(p.name, e.target.value)}\n className=\"flex-1\"\n inputClassName=\"font-mono text-xs\"\n />\n </div>\n ))}\n </div>\n </div>\n );\n}\n\nfunction CustomKeyValueSection({\n title,\n values,\n onChange,\n onAdd,\n onRemove\n}: {\n title: string;\n values: Array<{ key: string; value: string }>;\n onChange: (index: number, key: string, value: string) => void;\n onAdd: () => void;\n onRemove: (index: number) => void;\n}) {\n return (\n <div>\n <div className=\"flex items-center justify-between mb-2\">\n <Typography\n variant=\"caption\"\n className=\"text-text-secondary dark:text-text-secondary-dark text-xs font-semibold uppercase tracking-wider block\"\n >\n {title}\n </Typography>\n <Button\n variant=\"text\"\n size=\"small\"\n color=\"primary\"\n onClick={onAdd}\n className=\"text-xs p-0 min-h-0\"\n >\n <PlusIcon size={iconSize.small} className=\"mr-1\" /> Add Header\n </Button>\n </div>\n <div className=\"space-y-2\">\n {values.map((v, i) => (\n <div key={i} className=\"flex items-center gap-2\">\n <TextField\n size=\"small\"\n aria-label={`Header ${i + 1} name`}\n placeholder=\"Header name\"\n value={v.key}\n onChange={(e) => onChange(i, e.target.value, v.value)}\n className=\"w-1/3\"\n inputClassName=\"font-mono text-xs\"\n />\n <TextField\n size=\"small\"\n aria-label={`Header ${i + 1} value`}\n placeholder=\"Value\"\n value={v.value}\n onChange={(e) => onChange(i, v.key, e.target.value)}\n className=\"flex-1\"\n inputClassName=\"font-mono text-xs\"\n />\n <IconButton\n size=\"small\"\n onClick={() => onRemove(i)}\n className=\"text-text-secondary hover:text-red-500 shrink-0\"\n title=\"Remove\"\n >\n <XIcon size={iconSize.small} />\n </IconButton>\n </div>\n ))}\n {values.length === 0 && (\n <Typography variant=\"caption\" className=\"text-text-secondary/50 italic text-xs\">\n No custom headers added.\n </Typography>\n )}\n </div>\n </div>\n );\n}\n\n/* ── Helpers ──────────────────────────────────────────────────────── */\n\nfunction ResponseBadge({ status }: { status: number }) {\n let colorClass = \"text-red-500\";\n if (status >= 200 && status < 300) colorClass = \"text-emerald-500\";\n else if (status >= 300 && status < 400) colorClass = \"text-blue-500\";\n else if (status >= 400 && status < 500) colorClass = \"text-amber-500\";\n\n return (\n <span className={cls(\"text-xs font-semibold font-mono\", colorClass)}>\n {status || \"ERR\"}\n </span>\n );\n}\n\nfunction buildBodyTemplate(endpoint: ParsedEndpoint): string {\n if (!endpoint.requestBody?.content) return \"{\\n \\n}\";\n const json = endpoint.requestBody.content[\"application/json\"];\n if (!json?.schema?.properties) return \"{\\n \\n}\";\n\n const props = json.schema.properties;\n const lines: string[] = [\"{\"];\n const keys = Object.keys(props);\n keys.forEach((key, i) => {\n const prop = props[key];\n if (prop.readOnly) return;\n const comma = i < keys.length - 1 ? \",\" : \"\";\n const val = defaultValue(prop);\n lines.push(` \"${key}\": ${val}${comma}`);\n });\n lines.push(\"}\");\n return lines.join(\"\\n\");\n}\n\nfunction defaultValue(schema: { type?: string; format?: string; enum?: (string | number)[] }): string {\n if (schema.enum) return JSON.stringify(schema.enum[0]);\n switch (schema.type) {\n case \"string\":\n return schema.format === \"date-time\" ? `\"${new Date().toISOString()}\"` : '\"\"';\n case \"number\":\n case \"integer\":\n return \"0\";\n case \"boolean\":\n return \"false\";\n case \"array\":\n return \"[]\";\n default:\n return \"null\";\n }\n}\n","import React, { useState, useEffect, useMemo } from \"react\";\nimport { useApiBase, useApiConfig, useAuthController } from \"@rebasepro/app\";\nimport {\n CircularProgress,\n Typography,\n Alert,\n cls,\n Button,\n Chip,\n defaultBorderMixin,\n SearchBar,\n iconSize\n} from \"@rebasepro/ui\";\nimport { BookOpenIcon, PlayIcon } from \"@rebasepro/ui\";\nimport { EndpointDetail } from \"./EndpointDetail\";\nimport { TryItPanel } from \"./TryItPanel\";\nimport type { OpenApiSpec, ParsedEndpoint } from \"./types\";\nimport { parseOpenApiSpec } from \"./parseSpec\";\n\n/**\n * Custom-built API Explorer for Rebase Studio.\n * No external dependencies — renders the OpenAPI spec natively\n * with deep integration into the Rebase auth system.\n */\nexport function ApiExplorer() {\n const apiConfig = useApiConfig();\n const apiBase = useApiBase();\n const authController = useAuthController();\n const apiUrl = apiConfig?.apiUrl;\n\n const [spec, setSpec] = useState<OpenApiSpec | null>(null);\n const [loading, setLoading] = useState(true);\n const [error, setError] = useState<string | null>(null);\n\n const [selectedEndpoint, setSelectedEndpoint] = useState<ParsedEndpoint | null>(null);\n const [sidebarFilter, setSidebarFilter] = useState(\"\");\n const [tryItOpen, setTryItOpen] = useState(false);\n\n // Fetch OpenAPI spec\n useEffect(() => {\n if (!apiUrl) return;\n let cancelled = false;\n const specUrl = `${apiBase}/docs`;\n\n (async () => {\n try {\n // The spec endpoint itself is public on a stock backend, but\n // `apiUrl` may route through an authenticated proxy (the\n // console's Studio embed) — carry the token like every other\n // request in this view, and like LogsExplorer does.\n const getAuthToken = apiConfig?.getAuthToken ?? authController.getAuthToken;\n const token = getAuthToken ? await getAuthToken() : null;\n const res = await fetch(specUrl, token ? { headers: { Authorization: `Bearer ${token}` } } : undefined);\n if (!res.ok) throw new Error(`${res.status} ${res.statusText}`);\n const data = await res.json();\n if (!cancelled) {\n setSpec(data);\n setLoading(false);\n }\n } catch (err: unknown) {\n if (!cancelled) {\n setError(err instanceof Error ? err.message : \"Failed to load API spec\");\n setLoading(false);\n }\n }\n })();\n return () => {\n cancelled = true;\n };\n }, [apiUrl, apiBase, apiConfig, authController]);\n\n // Parse spec into grouped endpoints\n const { groups, allEndpoints } = useMemo(() => {\n if (!spec) return { groups: [],\nallEndpoints: [] };\n return parseOpenApiSpec(spec);\n }, [spec]);\n\n // Filter\n const filteredGroups = useMemo(() => {\n if (!sidebarFilter.trim()) return groups;\n const q = sidebarFilter.toLowerCase();\n return groups\n .map((g) => ({\n ...g,\n endpoints: g.endpoints.filter(\n (e) =>\n e.path.toLowerCase().includes(q) ||\n e.summary.toLowerCase().includes(q) ||\n e.method.toLowerCase().includes(q)\n )\n }))\n .filter((g) => g.endpoints.length > 0);\n }, [groups, sidebarFilter]);\n\n // Auto-select first endpoint\n useEffect(() => {\n if (!selectedEndpoint && allEndpoints.length > 0) {\n setSelectedEndpoint(allEndpoints[0]);\n }\n }, [allEndpoints, selectedEndpoint]);\n\n // ── States ───────────────────────────────────────────────────────\n if (!apiUrl) {\n return (\n <div className=\"flex items-center justify-center h-full w-full p-8\">\n <Alert color=\"warning\">\n <Typography variant=\"body2\">\n No API URL configured. Ensure your app provides an{\" \"}\n <code className=\"font-mono text-xs\">apiUrl</code>.\n </Typography>\n </Alert>\n </div>\n );\n }\n\n if (loading) {\n return (\n <div className=\"flex flex-col items-center justify-center h-full w-full gap-4\">\n <CircularProgress size=\"medium\"/>\n <Typography variant=\"body2\" className=\"text-text-secondary dark:text-text-secondary-dark animate-pulse\">\n Loading API specification…\n </Typography>\n </div>\n );\n }\n\n if (error || !spec) {\n return (\n <div className=\"flex items-center justify-center h-full w-full p-8\">\n <Alert color=\"error\">\n <Typography variant=\"body2\">{error ?? \"Unknown error\"}</Typography>\n </Alert>\n </div>\n );\n }\n\n const METHOD_COLORS: Record<string, string> = {\n get: \"text-blue-600 dark:text-blue-400\",\n post: \"text-emerald-600 dark:text-emerald-400\",\n put: \"text-amber-600 dark:text-amber-400\",\n patch: \"text-orange-600 dark:text-orange-400\",\n delete: \"text-red-600 dark:text-red-400\"\n };\n\n return (\n <div className=\"flex h-full w-full overflow-hidden\">\n {/* ── Sidebar ──────────────────────────────────────── */}\n <div\n className={cls(\n \"w-72 min-w-[272px] flex flex-col h-full overflow-hidden border-r\",\n defaultBorderMixin,\n \"bg-surface-sheet\"\n )}\n >\n {/* Header */}\n <div className=\"p-4 space-y-3\">\n <div className=\"flex items-center gap-2\">\n <BookOpenIcon size={iconSize.medium} className=\"text-primary dark:text-primary-dark\" />\n <Typography variant=\"subtitle2\" className=\"font-semibold\">\n {spec.info?.title ?? \"API Reference\"}\n </Typography>\n </div>\n {spec.info?.version && (\n <Chip size=\"smallest\" colorScheme=\"cyanDarker\">\n v{spec.info.version}\n </Chip>\n )}\n {/* Search */}\n <div className=\"mb-2\">\n <SearchBar\n placeholder=\"Filter endpoints…\"\n size=\"small\"\n onTextSearch={(val) => setSidebarFilter(val ?? \"\")}\n />\n </div>\n\n {/* Auth status removed to avoid redundancy with the AuthSimulationSelector */}\n </div>\n\n {/* Endpoint list */}\n <div className=\"flex-1 overflow-y-auto px-2 pb-4\">\n {filteredGroups.map((group) => (\n <div key={group.tag} className=\"mb-3\">\n <Typography\n variant=\"caption\"\n className=\"px-2 py-1.5 text-text-secondary dark:text-text-secondary-dark uppercase tracking-wider font-semibold text-[10px]\"\n >\n {group.tag}\n </Typography>\n {group.endpoints.map((ep) => {\n const isSelected = selectedEndpoint?.id === ep.id;\n return (\n <Button\n key={ep.id}\n variant=\"text\"\n color=\"neutral\"\n fullWidth\n onClick={() => {\n setSelectedEndpoint(ep);\n setTryItOpen(false);\n }}\n className={cls(\n \"!justify-between !px-2.5 !py-1.5 !text-left !text-sm\",\n isSelected\n ? \"bg-surface-raised font-medium\"\n : \"text-text-primary dark:text-text-primary-dark\"\n )}\n >\n <span className=\"truncate text-[13px] opacity-90\">{ep.summary || ep.shortPath}</span>\n <span\n className={cls(\n \"text-[10px] font-semibold uppercase shrink-0\",\n METHOD_COLORS[ep.method] ?? \"text-text-secondary\"\n )}\n >\n {ep.method}\n </span>\n </Button>\n );\n })}\n </div>\n ))}\n {filteredGroups.length === 0 && (\n <Typography\n variant=\"body2\"\n className=\"text-center text-text-secondary dark:text-text-secondary-dark py-8\"\n >\n No endpoints match\n </Typography>\n )}\n </div>\n </div>\n\n {/* ── Main content ─────────────────────────────────── */}\n <div className=\"flex-1 flex flex-col h-full overflow-hidden\">\n {selectedEndpoint ? (\n <>\n {/* Top bar */}\n <div\n className={cls(\n \"flex items-center justify-between px-5 py-3 gap-4 shrink-0 border-b z-10\",\n defaultBorderMixin,\n \"bg-surface-sheet/90 backdrop-blur-md sticky top-0\"\n )}\n >\n <div className=\"flex items-center gap-3 min-w-0\">\n <span\n className={cls(\n \"text-xs font-semibold uppercase\",\n METHOD_COLORS[selectedEndpoint.method] ?? \"\"\n )}\n >\n {selectedEndpoint.method}\n </span>\n <code className=\"text-sm font-mono text-text-primary dark:text-text-primary-dark truncate\">\n {selectedEndpoint.path}\n </code>\n </div>\n <Button\n variant={tryItOpen ? \"filled\" : \"outlined\"}\n size=\"small\"\n onClick={() => setTryItOpen((v) => !v)}\n >\n <PlayIcon size={iconSize.small} className=\"mr-1\" />\n Try It\n </Button>\n </div>\n\n {/* Body */}\n <div className=\"flex-1 overflow-y-auto\">\n {tryItOpen ? (\n <TryItPanel\n key={selectedEndpoint.operationId || selectedEndpoint.path}\n endpoint={selectedEndpoint}\n apiUrl={apiUrl}\n getAuthToken={apiConfig?.getAuthToken ?? authController.getAuthToken}\n user={authController.user}\n basePath={spec?.servers?.[0]?.url || \"\"}\n />\n ) : (\n <EndpointDetail endpoint={selectedEndpoint} spec={spec}/>\n )}\n </div>\n </>\n ) : (\n <div className=\"flex items-center justify-center h-full\">\n <Typography variant=\"body2\" className=\"text-text-secondary dark:text-text-secondary-dark\">\n Select an endpoint from the sidebar\n </Typography>\n </div>\n )}\n </div>\n </div>\n );\n}\n\nApiExplorer.displayName = \"ApiExplorer\";\n\n"],"mappings":";;;;;;;;;AAKA,SAAgB,iBAAiB,MAG/B;CACE,MAAM,eAAiC,CAAC;CACxC,MAAM,yBAAS,IAAI,IAA8B;CAGjD,MAAM,kCAAkB,IAAI,IAAoB;CAChD,KAAK,MAAM,KAAK,KAAK,QAAQ,CAAC,GAC1B,gBAAgB,IAAI,EAAE,MAAM,EAAE,eAAe,EAAE;CAGnD,KAAK,MAAM,CAAC,MAAM,YAAY,OAAO,QAAQ,KAAK,SAAS,CAAC,CAAC,GACzD,KAAK,MAAM,CAAC,QAAQ,OAAO,OAAO,QAAQ,OAAO,GAAG;EAChD,IAAI;GAAC;GAAO;GAAQ;GAAO;GAAS;EAAQ,CAAC,CAAC,QAA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ACJ;MAGL,oBAAC,OAAD;GAAK,WAAU;aACV,mBACG,qBAAA,UAAA,EAAA,UAAA,CAEI,qBAAC,OAAD;IACI,WAAW,IACP,4EACA,oBACA,mDACJ;cALJ,CAOI,qBAAC,OAAD;KAAK,WAAU;eAAf,CACI,oBAAC,QAAD;MACI,WAAW,IACP,mCACA,cAAc,iBAAiB,WAAW,EAC9C;gBAEC,iBAAiB;KAChB,CAAA,GACN,oBAAC,QAAD;MAAM,WAAU;gBACX,iBAAiB;KAChB,CAAA,CACL;QACL,qBAAC,QAAD;KACI,SAAS,YAAY,WAAW;KAChC,MAAK;KACL,eAAe,cAAc,MAAM,CAAC,CAAC;eAHzC,CAKI,oBAAC,UAAD;MAAU,MAAM,SAAS;MAAO,WAAU;KAAQ,CAAA,GAAC,QAE/C;MACP;OAGL,oBAAC,OAAD;IAAK,WAAU;cACV,YACG,oBAAC,YAAD;KAEI,UAAU;KACF;KACR,cAAc,WAAW,gBAAgB,eAAe;KACxD,MAAM,eAAe;KACrB,UAAU,MAAM,UAAU,EAAE,EAAE,OAAO;IACxC,GANQ,iBAAiB,eAAe,iBAAiB,IAMzD,IAED,oBAAC,gBAAD;KAAgB,UAAU;KAAwB;IAAM,CAAA;GAE3D,CAAA,CACP,EAAA,CAAA,IAEF,oBAAC,OAAD;IAAK,WAAU;cACX,oBAAC,YAAD;KAAY,SAAQ;KAAQ,WAAU;eAAoD;IAE9E,CAAA;GACX,CAAA;EAER,CAAA,CACJ;;AAEb;AAEA,YAAY,cAAc"}
|
|
@@ -188,8 +188,8 @@ function OperationToggles({ row, onToggle }) {
|
|
|
188
188
|
type: "button",
|
|
189
189
|
"aria-pressed": active,
|
|
190
190
|
onClick: () => onToggle(op, !active),
|
|
191
|
-
className: cls("flex items-center gap-1.5 h-7 pl-2 pr-2.5 rounded-md text-2xs font-medium", "ring-1 transition-colors duration-150 cursor-pointer", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary", active ? styles.on : "bg-transparent ring-transparent text-surface-500 dark:text-surface-400 hover:bg-surface-
|
|
192
|
-
children: [/* @__PURE__ */ jsx("span", { className: cls("w-1.5 h-1.5 rounded-full transition-colors duration-150", active ? styles.dot : "bg-surface-
|
|
191
|
+
className: cls("flex items-center gap-1.5 h-7 pl-2 pr-2.5 rounded-md text-2xs font-medium", "ring-1 transition-colors duration-150 cursor-pointer", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary", active ? styles.on : "bg-transparent ring-transparent text-surface-500 dark:text-surface-400 hover:bg-surface-hover"),
|
|
192
|
+
children: [/* @__PURE__ */ jsx("span", { className: cls("w-1.5 h-1.5 rounded-full transition-colors duration-150", active ? styles.dot : "bg-surface-400") }), op]
|
|
193
193
|
})
|
|
194
194
|
}, op);
|
|
195
195
|
})
|
|
@@ -471,7 +471,7 @@ function CreateApiKeyDialog({ onClose, onCreated }) {
|
|
|
471
471
|
children: "Add resource"
|
|
472
472
|
}),
|
|
473
473
|
/* @__PURE__ */ jsxs("div", {
|
|
474
|
-
className: cls("mt-3 rounded-lg border px-3 py-2.5 bg-surface-
|
|
474
|
+
className: cls("mt-3 rounded-lg border px-3 py-2.5 bg-surface-field", defaultBorderMixin),
|
|
475
475
|
children: [
|
|
476
476
|
/* @__PURE__ */ jsx(Typography, {
|
|
477
477
|
variant: "label",
|
|
@@ -755,11 +755,11 @@ function ApiKeysView() {
|
|
|
755
755
|
});
|
|
756
756
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
757
757
|
/* @__PURE__ */ jsxs("div", {
|
|
758
|
-
className: "flex h-full w-full overflow-hidden bg-
|
|
758
|
+
className: "flex h-full w-full overflow-hidden bg-surface-card",
|
|
759
759
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
760
760
|
className: cls("flex flex-col w-[340px] min-w-[280px] border-r h-full", defaultBorderMixin),
|
|
761
761
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
762
|
-
className: cls("flex items-center justify-between px-4 py-2.5 border-b bg-surface-
|
|
762
|
+
className: cls("flex items-center justify-between px-4 py-2.5 border-b bg-surface-sheet min-h-[48px]", defaultBorderMixin),
|
|
763
763
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
764
764
|
className: "flex items-center gap-2",
|
|
765
765
|
children: [
|
|
@@ -774,7 +774,7 @@ function ApiKeysView() {
|
|
|
774
774
|
}),
|
|
775
775
|
/* @__PURE__ */ jsx(Chip, {
|
|
776
776
|
size: "smallest",
|
|
777
|
-
className: "bg-surface-
|
|
777
|
+
className: "bg-surface-raised text-surface-600 dark:text-surface-300",
|
|
778
778
|
children: activeKeys.length
|
|
779
779
|
})
|
|
780
780
|
]
|
|
@@ -853,7 +853,7 @@ function ApiKeysView() {
|
|
|
853
853
|
})
|
|
854
854
|
}) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
855
855
|
/* @__PURE__ */ jsxs("div", {
|
|
856
|
-
className: cls("flex items-center justify-between px-5 py-3 border-b bg-
|
|
856
|
+
className: cls("flex items-center justify-between px-5 py-3 border-b bg-surface-card min-h-[56px]", defaultBorderMixin),
|
|
857
857
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
858
858
|
className: "flex items-center gap-3 min-w-0",
|
|
859
859
|
children: [/* @__PURE__ */ jsx(KeyRoundIcon, {
|
|
@@ -889,7 +889,7 @@ function ApiKeysView() {
|
|
|
889
889
|
})]
|
|
890
890
|
}),
|
|
891
891
|
/* @__PURE__ */ jsxs("div", {
|
|
892
|
-
className: "px-5 py-4 bg-surface-
|
|
892
|
+
className: "px-5 py-4 bg-surface-sheet",
|
|
893
893
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
894
894
|
className: "grid grid-cols-2 md:grid-cols-4 gap-3",
|
|
895
895
|
children: [
|
|
@@ -932,14 +932,14 @@ function ApiKeysView() {
|
|
|
932
932
|
})]
|
|
933
933
|
}),
|
|
934
934
|
/* @__PURE__ */ jsxs("div", {
|
|
935
|
-
className: cls("flex items-center gap-2 px-5 py-2 border-y bg-
|
|
935
|
+
className: cls("flex items-center gap-2 px-5 py-2 border-y bg-surface-card", defaultBorderMixin),
|
|
936
936
|
children: [/* @__PURE__ */ jsx(Typography, {
|
|
937
937
|
variant: "subtitle2",
|
|
938
938
|
className: "font-semibold text-[13px]",
|
|
939
939
|
children: t("studio_api_keys_permissions")
|
|
940
940
|
}), /* @__PURE__ */ jsx(Chip, {
|
|
941
941
|
size: "smallest",
|
|
942
|
-
className: "bg-surface-
|
|
942
|
+
className: "bg-surface-raised text-surface-600 dark:text-surface-300",
|
|
943
943
|
children: selectedKey.permissions.length
|
|
944
944
|
})]
|
|
945
945
|
}),
|
|
@@ -1073,7 +1073,7 @@ function KeyListItem({ apiKey, selected, onClick }) {
|
|
|
1073
1073
|
const status = keyStatus(apiKey);
|
|
1074
1074
|
return /* @__PURE__ */ jsxs("div", {
|
|
1075
1075
|
onClick,
|
|
1076
|
-
className: cls("flex items-center gap-3 px-3 py-2.5 rounded-lg cursor-pointer transition-all", selected ? "bg-primary/10 dark:bg-primary/15 ring-1 ring-primary/30" : "hover:bg-surface-
|
|
1076
|
+
className: cls("flex items-center gap-3 px-3 py-2.5 rounded-lg cursor-pointer transition-all", selected ? "bg-primary/10 dark:bg-primary/15 ring-1 ring-primary/30" : "hover:bg-surface-hover"),
|
|
1077
1077
|
children: [
|
|
1078
1078
|
/* @__PURE__ */ jsx("div", { className: cls("w-2 h-2 rounded-full shrink-0", status.kind === "active" ? "bg-emerald-400" : status.kind === "expired" ? "bg-amber-400" : "bg-red-400") }),
|
|
1079
1079
|
/* @__PURE__ */ jsxs("div", {
|
|
@@ -1106,7 +1106,7 @@ function KeyListItem({ apiKey, selected, onClick }) {
|
|
|
1106
1106
|
}
|
|
1107
1107
|
function StatCard({ label, value, mono, className }) {
|
|
1108
1108
|
return /* @__PURE__ */ jsxs("div", {
|
|
1109
|
-
className: cls("px-3 py-2 rounded-lg border bg-
|
|
1109
|
+
className: cls("px-3 py-2 rounded-lg border bg-surface-card", defaultBorderMixin),
|
|
1110
1110
|
children: [/* @__PURE__ */ jsx(Typography, {
|
|
1111
1111
|
variant: "caption",
|
|
1112
1112
|
color: "secondary",
|
|
@@ -1173,7 +1173,7 @@ function SecretDisplayDialog({ keyWithSecret, onClose }) {
|
|
|
1173
1173
|
})]
|
|
1174
1174
|
}),
|
|
1175
1175
|
/* @__PURE__ */ jsxs("div", {
|
|
1176
|
-
className: cls("flex items-center gap-2 p-3 rounded-lg border bg-surface-
|
|
1176
|
+
className: cls("flex items-center gap-2 p-3 rounded-lg border bg-surface-sheet", defaultBorderMixin),
|
|
1177
1177
|
children: [/* @__PURE__ */ jsx("code", {
|
|
1178
1178
|
className: "flex-1 text-[12px] font-mono break-all text-surface-700 dark:text-surface-300 select-all",
|
|
1179
1179
|
children: keyWithSecret.key
|
|
@@ -1236,4 +1236,4 @@ function SecretDisplayDialog({ keyWithSecret, onClose }) {
|
|
|
1236
1236
|
//#endregion
|
|
1237
1237
|
export { ApiKeysView };
|
|
1238
1238
|
|
|
1239
|
-
//# sourceMappingURL=ApiKeysView-
|
|
1239
|
+
//# sourceMappingURL=ApiKeysView-OfJLH2x7.js.map
|