@scalar/agent-chat 0.12.30 → 0.12.31
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/client-tools/execute-request.d.ts +1 -1
- package/dist/client-tools/execute-request.js.map +1 -1
- package/dist/components/Selector.vue.d.ts +1 -1
- package/dist/components/Selector.vue.js.map +1 -1
- package/dist/components/Selector.vue.script.js.map +1 -1
- package/dist/components/ServerSelector.vue.d.ts +1 -1
- package/dist/components/ServerSelector.vue.js.map +1 -1
- package/dist/components/ServerSelector.vue.script.js.map +1 -1
- package/dist/helpers.d.ts +2 -2
- package/dist/helpers.js.map +1 -1
- package/dist/package.json +1 -1
- package/dist/style.css +84 -84
- package/dist/views/Settings/Auth.vue.d.ts +1 -1
- package/dist/views/Settings/Auth.vue.js.map +1 -1
- package/dist/views/Settings/Auth.vue.script.js.map +1 -1
- package/dist/views/Settings/DocSettings.vue.d.ts +1 -1
- package/dist/views/Settings/DocSettings.vue.js +1 -1
- package/dist/views/Settings/DocSettings.vue.js.map +1 -1
- package/dist/views/Settings/DocSettings.vue.script.js.map +1 -1
- package/dist/vue-styles.css +2 -2
- package/package.json +13 -13
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Chat } from '@ai-sdk/vue';
|
|
2
2
|
import type { SecuritySchemeObjectSecret } from '@scalar/workspace-store/request-example';
|
|
3
|
-
import type { ServerObject } from '@scalar/workspace-store/schemas/v3.
|
|
3
|
+
import type { ServerObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document';
|
|
4
4
|
import type { UIDataTypes, UIMessage } from 'ai';
|
|
5
5
|
import type { Tools } from '../state/state.js';
|
|
6
6
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execute-request.js","names":[],"sources":["../../src/client-tools/execute-request.ts"],"sourcesContent":["import type { Chat } from '@ai-sdk/vue'\nimport { redirectToProxy } from '@scalar/helpers/url/redirect-to-proxy'\nimport type { SecuritySchemeObjectSecret } from '@scalar/workspace-store/request-example'\nimport { buildRequestSecurity, getResolvedUrl } from '@scalar/workspace-store/request-example'\nimport type { ServerObject } from '@scalar/workspace-store/schemas/v3.
|
|
1
|
+
{"version":3,"file":"execute-request.js","names":[],"sources":["../../src/client-tools/execute-request.ts"],"sourcesContent":["import type { Chat } from '@ai-sdk/vue'\nimport { redirectToProxy } from '@scalar/helpers/url/redirect-to-proxy'\nimport type { SecuritySchemeObjectSecret } from '@scalar/workspace-store/request-example'\nimport { buildRequestSecurity, getResolvedUrl } from '@scalar/workspace-store/request-example'\nimport type { ServerObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport type { UIDataTypes, UIMessage } from 'ai'\nimport { encode as encodeBase64 } from 'js-base64'\nimport { n } from 'neverpanic'\nimport truncateJson from 'truncate-json'\n\nimport { EXECUTE_CLIENT_SIDE_REQUEST_TOOL_NAME } from '@/entities'\nimport { createError } from '@/entities/error/helpers'\nimport type { Tools } from '@/state/state'\n\n// The maximum number of bytes the requests response can be.\nconst MAX_RESPONSE_SIZE = 50_000\n\nconst getBody = n.safeFn(\n async (response: Response) => {\n const contentType = response.headers.get('content-type')\n\n if (contentType === 'application/json') {\n return { success: true, data: await response.json() }\n }\n\n return { success: true, data: await response.text() }\n },\n (originalError) => createError('FAILED_TO_PARSE_RESPONSE_BODY', { originalError }),\n)\n\nconst truncateResponse = (response: unknown) =>\n JSON.parse(truncateJson(JSON.stringify(response), MAX_RESPONSE_SIZE).jsonString)\n\n/* Result type wrapper for fetch */\nconst safeFetch = n.safeFn(\n async (url: string, init: RequestInit) => {\n const response = await fetch(url, init)\n\n const responseBodyResult = await getBody(response)\n\n if (!response.ok) {\n return {\n success: false,\n error: createError('REQUEST_NOT_OK', {\n status: response.status,\n url: response.url,\n responseBody: truncateResponse(responseBodyResult.success ? responseBodyResult.data : undefined),\n headers: Object.fromEntries(response.headers.entries()),\n }),\n }\n }\n\n if (!responseBodyResult.success) {\n return responseBodyResult\n }\n\n return {\n success: true,\n data: {\n status: response.status,\n responseBody: truncateResponse(responseBodyResult.data),\n headers: Object.fromEntries(response.headers.entries()),\n },\n }\n },\n (originalError) => createError('FAILED_TO_FETCH', { originalError }),\n)\n\nfunction createUrl({\n path,\n activeServer,\n proxyUrl,\n queryParams,\n}: {\n path: string\n activeServer: ServerObject | null\n proxyUrl: string\n queryParams: URLSearchParams\n}) {\n const resolvedUrl = getResolvedUrl({\n path,\n server: activeServer,\n urlParams: queryParams,\n })\n\n return redirectToProxy(proxyUrl, resolvedUrl)\n}\n\n/**\n * Executes an HTTP request with the specified options, including method, path, headers, and security schemes, and returns the processed response.\n */\nexport const executeRequestTool = n.safeFn(\n async ({\n documentSettings,\n toolCallId,\n chat,\n proxyUrl,\n input: { method, path, body, headers, documentName },\n }: {\n documentSettings: Record<\n string,\n { activeServer: ServerObject | null; securitySchemes: SecuritySchemeObjectSecret[] }\n >\n toolCallId: string\n chat: Chat<UIMessage<unknown, UIDataTypes, Tools>>\n proxyUrl: string\n input: {\n method: string\n path: string\n headers?: Record<string, string>\n body?: string\n documentName: string\n }\n }) => {\n const settings = documentSettings[documentName]\n\n if (!settings) {\n return {\n success: false,\n error: createError('DOCUMENT_SETTINGS_COULD_NOT_BE_DETERMINED', {\n documentName,\n }),\n }\n }\n\n const requestSecurityOptions = buildRequestSecurity(settings.securitySchemes)\n\n const requestSecurity = requestSecurityOptions.reduce<{\n headers: Record<string, string>\n queryParams: URLSearchParams\n cookies: Record<string, string>\n }>(\n (acc, securityOption) => {\n /** Format the security value based on its authentication scheme. */\n const securityValue = (() => {\n if (securityOption.format === 'basic') {\n return `Basic ${encodeBase64(securityOption.value)}`\n }\n if (securityOption.format === 'bearer') {\n return `Bearer ${securityOption.value}`\n }\n return securityOption.value\n })()\n\n if (securityOption.in === 'header') {\n acc.headers[securityOption.name] = securityValue\n } else if (securityOption.in === 'query') {\n acc.queryParams.set(securityOption.name, securityValue)\n } else if (securityOption.in === 'cookie') {\n acc.cookies[securityOption.name] = securityValue\n }\n\n return acc\n },\n {\n headers: {},\n queryParams: new URLSearchParams(),\n cookies: {},\n },\n )\n\n const cookieHeader = Object.entries(requestSecurity.cookies)\n .map(([name, value]) => `${name}=${value}`)\n .join('; ')\n\n const fetchOptions = {\n method,\n body,\n headers: {\n ...headers,\n ...requestSecurity.headers,\n Cookie: cookieHeader,\n },\n }\n\n const url = createUrl({\n path,\n activeServer: settings.activeServer,\n proxyUrl,\n queryParams: requestSecurity.queryParams,\n })\n\n const result = await safeFetch(url, fetchOptions)\n\n void chat.addToolOutput({\n tool: EXECUTE_CLIENT_SIDE_REQUEST_TOOL_NAME,\n toolCallId,\n output: result,\n state: 'output-available',\n })\n\n return result\n },\n (originalError) => createError('FAILED_TO_EXECUTE_REQUEST', originalError),\n)\n"],"mappings":";;;;;;;;AAeA,IAAM,oBAAoB;AAE1B,IAAM,UAAU,EAAE,OAChB,OAAO,aAAuB;CAG5B,IAFoB,SAAS,QAAQ,IAAI,cAErC,MAAgB,oBAClB,OAAO;EAAE,SAAS;EAAM,MAAM,MAAM,SAAS,KAAK;CAAE;CAGtD,OAAO;EAAE,SAAS;EAAM,MAAM,MAAM,SAAS,KAAK;CAAE;AACtD,IACC,kBAAkB,YAAY,iCAAiC,EAAE,cAAc,CAAC,CACnF;AAEA,IAAM,oBAAoB,aACxB,KAAK,MAAM,aAAa,KAAK,UAAU,QAAQ,GAAG,iBAAiB,CAAC,CAAC,UAAU;AAGjF,IAAM,YAAY,EAAE,OAClB,OAAO,KAAa,SAAsB;CACxC,MAAM,WAAW,MAAM,MAAM,KAAK,IAAI;CAEtC,MAAM,qBAAqB,MAAM,QAAQ,QAAQ;CAEjD,IAAI,CAAC,SAAS,IACZ,OAAO;EACL,SAAS;EACT,OAAO,YAAY,kBAAkB;GACnC,QAAQ,SAAS;GACjB,KAAK,SAAS;GACd,cAAc,iBAAiB,mBAAmB,UAAU,mBAAmB,OAAO,KAAA,CAAS;GAC/F,SAAS,OAAO,YAAY,SAAS,QAAQ,QAAQ,CAAC;EACxD,CAAC;CACH;CAGF,IAAI,CAAC,mBAAmB,SACtB,OAAO;CAGT,OAAO;EACL,SAAS;EACT,MAAM;GACJ,QAAQ,SAAS;GACjB,cAAc,iBAAiB,mBAAmB,IAAI;GACtD,SAAS,OAAO,YAAY,SAAS,QAAQ,QAAQ,CAAC;EACxD;CACF;AACF,IACC,kBAAkB,YAAY,mBAAmB,EAAE,cAAc,CAAC,CACrE;AAEA,SAAS,UAAU,EACjB,MACA,cACA,UACA,eAMC;CAOD,OAAO,gBAAgB,UANH,eAAe;EACjC;EACA,QAAQ;EACR,WAAW;CACb,CAEiC,CAAW;AAC9C;;;;AAKA,IAAa,qBAAqB,EAAE,OAClC,OAAO,EACL,kBACA,YACA,MACA,UACA,OAAO,EAAE,QAAQ,MAAM,MAAM,SAAS,qBAgBlC;CACJ,MAAM,WAAW,iBAAiB;CAElC,IAAI,CAAC,UACH,OAAO;EACL,SAAS;EACT,OAAO,YAAY,6CAA6C,EAC9D,aACF,CAAC;CACH;CAKF,MAAM,kBAFyB,qBAAqB,SAAS,eAErC,CAAA,CAAuB,QAK5C,KAAK,mBAAmB;;EAEvB,MAAM,uBAAuB;GAC3B,IAAI,eAAe,WAAW,SAC5B,OAAO,SAAS,OAAa,eAAe,KAAK;GAEnD,IAAI,eAAe,WAAW,UAC5B,OAAO,UAAU,eAAe;GAElC,OAAO,eAAe;EACxB,EAAA,CAAG;EAEH,IAAI,eAAe,OAAO,UACxB,IAAI,QAAQ,eAAe,QAAQ;OAC9B,IAAI,eAAe,OAAO,SAC/B,IAAI,YAAY,IAAI,eAAe,MAAM,aAAa;OACjD,IAAI,eAAe,OAAO,UAC/B,IAAI,QAAQ,eAAe,QAAQ;EAGrC,OAAO;CACT,GACA;EACE,SAAS,CAAC;EACV,aAAa,IAAI,gBAAgB;EACjC,SAAS,CAAC;CACZ,CACF;CAEA,MAAM,eAAe,OAAO,QAAQ,gBAAgB,OAAO,CAAC,CACzD,KAAK,CAAC,MAAM,WAAW,GAAG,KAAK,GAAG,OAAO,CAAC,CAC1C,KAAK,IAAI;CAEZ,MAAM,eAAe;EACnB;EACA;EACA,SAAS;GACP,GAAG;GACH,GAAG,gBAAgB;GACnB,QAAQ;EACV;CACF;CASA,MAAM,SAAS,MAAM,UAPT,UAAU;EACpB;EACA,cAAc,SAAS;EACvB;EACA,aAAa,gBAAgB;CAC/B,CAE+B,GAAK,YAAY;CAEhD,KAAU,cAAc;EACtB,MAAM;EACN;EACA,QAAQ;EACR,OAAO;CACT,CAAC;CAED,OAAO;AACT,IACC,kBAAkB,YAAY,6BAA6B,aAAa,CAC3E"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ServerObject } from '@scalar/workspace-store/schemas/v3.
|
|
1
|
+
import type { ServerObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document';
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
/** The selected server URL */
|
|
4
4
|
selectedServer: ServerObject | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Selector.vue.js","names":[],"sources":["../../src/components/Selector.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarButton } from '@scalar/components/button'\nimport { ScalarListbox } from '@scalar/components/listbox'\nimport { ScalarIconCaretDown } from '@scalar/icons'\nimport type { ServerObject } from '@scalar/workspace-store/schemas/v3.
|
|
1
|
+
{"version":3,"file":"Selector.vue.js","names":[],"sources":["../../src/components/Selector.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarButton } from '@scalar/components/button'\nimport { ScalarListbox } from '@scalar/components/listbox'\nimport { ScalarIconCaretDown } from '@scalar/icons'\nimport type { ServerObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport { computed } from 'vue'\n\nconst { target, servers, selectedServer } = defineProps<{\n /** The selected server URL */\n selectedServer: ServerObject | null\n /** Available servers */\n servers: ServerObject[]\n /** The id of the target to use for the popover (e.g. address bar) */\n target: string\n}>()\n\nconst emit = defineEmits<{\n /** Emitted when the selected server changes */\n (e: 'update:modelValue', value: string): void\n}>()\n\nconst serverOptions = computed(() =>\n servers.map((server) => ({\n id: server.url,\n label: server.url,\n })),\n)\n\nconst serverUrlWithoutTrailingSlash = computed(\n () => selectedServer?.url?.replace(/\\/$/, '') || '',\n)\n\nconst selectedServerOption = computed(() =>\n serverOptions.value.find((opt) => opt.id === selectedServer?.url),\n)\n\n// For testing\ndefineExpose({\n servers,\n serverUrlWithoutTrailingSlash,\n serverOptions,\n selectedServer,\n})\n</script>\n<template>\n <ScalarListbox\n v-if=\"serverOptions.length > 1\"\n ref=\"elem\"\n class=\"group\"\n :modelValue=\"selectedServerOption\"\n :options=\"serverOptions\"\n placement=\"bottom-start\"\n resize\n :target=\"target\"\n @update:modelValue=\"(e) => emit('update:modelValue', e.id)\">\n <ScalarButton\n class=\"bg-b-1 text-c-1 h-auto w-full justify-start gap-1.5 overflow-x-auto rounded-t-none rounded-b-xl px-3 py-1.5 text-base font-normal whitespace-nowrap -outline-offset-1\"\n variant=\"ghost\">\n <span class=\"sr-only\">Server:</span>\n <span class=\"overflow-x-auto\">{{\n serverUrlWithoutTrailingSlash || 'Select a server'\n }}</span>\n <ScalarIconCaretDown\n class=\"text-c-2 ui-open:rotate-180 mt-0.25 size-3 transition-transform duration-100\"\n weight=\"bold\" />\n </ScalarButton>\n </ScalarListbox>\n <div\n v-else\n class=\"text-c-1 flex h-auto w-full items-center gap-0.75 rounded-b-lg px-3 py-1.5 text-base leading-[20px] whitespace-nowrap\">\n <span class=\"sr-only\">Server:</span>\n <span class=\"overflow-x-auto\">{{ serverUrlWithoutTrailingSlash }}</span>\n </div>\n</template>\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Selector.vue.script.js","names":[],"sources":["../../src/components/Selector.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarButton } from '@scalar/components/button'\nimport { ScalarListbox } from '@scalar/components/listbox'\nimport { ScalarIconCaretDown } from '@scalar/icons'\nimport type { ServerObject } from '@scalar/workspace-store/schemas/v3.
|
|
1
|
+
{"version":3,"file":"Selector.vue.script.js","names":[],"sources":["../../src/components/Selector.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarButton } from '@scalar/components/button'\nimport { ScalarListbox } from '@scalar/components/listbox'\nimport { ScalarIconCaretDown } from '@scalar/icons'\nimport type { ServerObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport { computed } from 'vue'\n\nconst { target, servers, selectedServer } = defineProps<{\n /** The selected server URL */\n selectedServer: ServerObject | null\n /** Available servers */\n servers: ServerObject[]\n /** The id of the target to use for the popover (e.g. address bar) */\n target: string\n}>()\n\nconst emit = defineEmits<{\n /** Emitted when the selected server changes */\n (e: 'update:modelValue', value: string): void\n}>()\n\nconst serverOptions = computed(() =>\n servers.map((server) => ({\n id: server.url,\n label: server.url,\n })),\n)\n\nconst serverUrlWithoutTrailingSlash = computed(\n () => selectedServer?.url?.replace(/\\/$/, '') || '',\n)\n\nconst selectedServerOption = computed(() =>\n serverOptions.value.find((opt) => opt.id === selectedServer?.url),\n)\n\n// For testing\ndefineExpose({\n servers,\n serverUrlWithoutTrailingSlash,\n serverOptions,\n selectedServer,\n})\n</script>\n<template>\n <ScalarListbox\n v-if=\"serverOptions.length > 1\"\n ref=\"elem\"\n class=\"group\"\n :modelValue=\"selectedServerOption\"\n :options=\"serverOptions\"\n placement=\"bottom-start\"\n resize\n :target=\"target\"\n @update:modelValue=\"(e) => emit('update:modelValue', e.id)\">\n <ScalarButton\n class=\"bg-b-1 text-c-1 h-auto w-full justify-start gap-1.5 overflow-x-auto rounded-t-none rounded-b-xl px-3 py-1.5 text-base font-normal whitespace-nowrap -outline-offset-1\"\n variant=\"ghost\">\n <span class=\"sr-only\">Server:</span>\n <span class=\"overflow-x-auto\">{{\n serverUrlWithoutTrailingSlash || 'Select a server'\n }}</span>\n <ScalarIconCaretDown\n class=\"text-c-2 ui-open:rotate-180 mt-0.25 size-3 transition-transform duration-100\"\n weight=\"bold\" />\n </ScalarButton>\n </ScalarListbox>\n <div\n v-else\n class=\"text-c-1 flex h-auto w-full items-center gap-0.75 rounded-b-lg px-3 py-1.5 text-base leading-[20px] whitespace-nowrap\">\n <span class=\"sr-only\">Server:</span>\n <span class=\"overflow-x-auto\">{{ serverUrlWithoutTrailingSlash }}</span>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;EAgBA,MAAM,OAAO;EAKb,MAAM,gBAAgB,eACpB,QAAA,QAAQ,KAAK,YAAY;GACvB,IAAI,OAAO;GACX,OAAO,OAAO;EAChB,EAAE,CACJ;EAEA,MAAM,gCAAgC,eAC9B,QAAA,gBAAgB,KAAK,QAAQ,OAAO,EAAE,KAAK,EACnD;EAEA,MAAM,uBAAuB,eAC3B,cAAc,MAAM,MAAM,QAAQ,IAAI,OAAO,QAAA,gBAAgB,GAAG,CAClE;EAGA,SAAa;GACX,SAAM,QAAA;GACN;GACA;GACA,gBAAa,QAAA;EACf,CAAC;;UAIS,cAAA,MAAc,SAAM,KAAA,UAAA,GAD5B,YAqBgB,MAAA,aAAA,GAAA;;IAnBd,KAAI;IACJ,OAAM;IACL,YAAY,qBAAA;IACZ,SAAS,cAAA;IACV,WAAU;IACV,QAAA;IACC,QAAQ,QAAA;IACR,uBAAiB,OAAA,OAAA,OAAA,MAAG,MAAM,KAAI,qBAAsB,EAAE,EAAE;;2BAW1C,CAVf,YAUe,MAAA,YAAA,GAAA;KATb,OAAM;KACN,SAAQ;;4BAC4B;gCAApC,mBAAoC,QAAA,EAA9B,OAAM,UAAS,GAAC,WAAO,EAAA;MAC7B,mBAES,QAFT,YAES,gBADP,8BAAA,SAA6B,iBAAA,GAAA,CAAA;MAE/B,YAEkB,MAAA,mBAAA,GAAA;OADhB,OAAM;OACN,QAAO;;;;;;;;;;uBAGb,mBAKM,OALN,YAKM,CAAA,OAAA,OAAA,OAAA,KAFJ,mBAAoC,QAAA,EAA9B,OAAM,UAAS,GAAC,WAAO,EAAA,IAC7B,mBAAwE,QAAxE,YAAwE,gBAAvC,8BAAA,KAA6B,GAAA,CAAA,CAAA,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
2
|
-
import type { ServerObject } from '@scalar/workspace-store/schemas/v3.
|
|
2
|
+
import type { ServerObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document';
|
|
3
3
|
type SelectorProps = {
|
|
4
4
|
/** The event bus to use for emitting events */
|
|
5
5
|
eventBus: WorkspaceEventBus;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServerSelector.vue.js","names":[],"sources":["../../src/components/ServerSelector.vue"],"sourcesContent":["<script lang=\"ts\">\ntype SelectorProps = {\n /** The event bus to use for emitting events */\n eventBus: WorkspaceEventBus\n /** The selected server */\n selectedServer: ServerObject | null\n /** Available servers */\n servers: ServerObject[]\n}\n\n/**\n * ServerSelector\n *\n * Core component for rendering a server selector block.\n * Handles server selection and emits a 'server:update:selected' event when the selected server changes.\n *\n * @event server:update:selected - Emitted when the selected server changes\n * @event server:update:variables - Emitted when a server variable changes\n */\nexport default {}\n</script>\n\n<script lang=\"ts\" setup>\nimport { ServerVariablesForm } from '@scalar/api-client/components/Server'\nimport { ScalarMarkdown } from '@scalar/components/markdown'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type { ServerObject } from '@scalar/workspace-store/schemas/v3.
|
|
1
|
+
{"version":3,"file":"ServerSelector.vue.js","names":[],"sources":["../../src/components/ServerSelector.vue"],"sourcesContent":["<script lang=\"ts\">\ntype SelectorProps = {\n /** The event bus to use for emitting events */\n eventBus: WorkspaceEventBus\n /** The selected server */\n selectedServer: ServerObject | null\n /** Available servers */\n servers: ServerObject[]\n}\n\n/**\n * ServerSelector\n *\n * Core component for rendering a server selector block.\n * Handles server selection and emits a 'server:update:selected' event when the selected server changes.\n *\n * @event server:update:selected - Emitted when the selected server changes\n * @event server:update:variables - Emitted when a server variable changes\n */\nexport default {}\n</script>\n\n<script lang=\"ts\" setup>\nimport { ServerVariablesForm } from '@scalar/api-client/components/Server'\nimport { ScalarMarkdown } from '@scalar/components/markdown'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type { ServerObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport { useId } from 'vue'\n\nimport Selector from './Selector.vue'\n\nconst { eventBus, servers, selectedServer } = defineProps<SelectorProps>()\n\nconst id = useId()\n\n/** Update the selected server */\nconst updateServer = (newServer: string) => {\n eventBus.emit('server:update:selected', {\n url: selectedServer?.url === newServer ? '' : newServer,\n meta: {\n type: 'document',\n },\n })\n}\n\n/** Update the server variable */\nconst updateServerVariable = (key: string, value: string) => {\n /** Find the index of the selected server */\n const index = servers.findIndex((s) => s.url === selectedServer?.url)\n if (index === -1) {\n return\n }\n\n eventBus.emit('server:update:variables', {\n index,\n key,\n value,\n meta: {\n type: 'document',\n },\n })\n}\n</script>\n\n<template>\n <label\n class=\"bg-b-2 flex h-8 items-center rounded-t-xl border-x border-t px-3 py-2.5 font-medium\">\n Server\n </label>\n <div\n :id=\"id\"\n class=\"border\"\n :class=\"{\n 'rounded-b-xl':\n !selectedServer?.description && !selectedServer?.variables,\n }\">\n <Selector\n v-if=\"servers.length\"\n :selectedServer\n :servers=\"servers\"\n :target=\"id\"\n @update:modelValue=\"updateServer\" />\n </div>\n <ServerVariablesForm\n layout=\"reference\"\n :variables=\"selectedServer?.variables\"\n @update:variable=\"updateServerVariable\" />\n\n <!-- Description -->\n <ScalarMarkdown\n v-if=\"selectedServer?.description\"\n class=\"text-c-3 rounded-b-xl border-x border-b px-3 py-1.5\"\n :value=\"selectedServer.description\" />\n</template>\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServerSelector.vue.script.js","names":[],"sources":["../../src/components/ServerSelector.vue"],"sourcesContent":["<script lang=\"ts\">\ntype SelectorProps = {\n /** The event bus to use for emitting events */\n eventBus: WorkspaceEventBus\n /** The selected server */\n selectedServer: ServerObject | null\n /** Available servers */\n servers: ServerObject[]\n}\n\n/**\n * ServerSelector\n *\n * Core component for rendering a server selector block.\n * Handles server selection and emits a 'server:update:selected' event when the selected server changes.\n *\n * @event server:update:selected - Emitted when the selected server changes\n * @event server:update:variables - Emitted when a server variable changes\n */\nexport default {}\n</script>\n\n<script lang=\"ts\" setup>\nimport { ServerVariablesForm } from '@scalar/api-client/components/Server'\nimport { ScalarMarkdown } from '@scalar/components/markdown'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type { ServerObject } from '@scalar/workspace-store/schemas/v3.
|
|
1
|
+
{"version":3,"file":"ServerSelector.vue.script.js","names":[],"sources":["../../src/components/ServerSelector.vue"],"sourcesContent":["<script lang=\"ts\">\ntype SelectorProps = {\n /** The event bus to use for emitting events */\n eventBus: WorkspaceEventBus\n /** The selected server */\n selectedServer: ServerObject | null\n /** Available servers */\n servers: ServerObject[]\n}\n\n/**\n * ServerSelector\n *\n * Core component for rendering a server selector block.\n * Handles server selection and emits a 'server:update:selected' event when the selected server changes.\n *\n * @event server:update:selected - Emitted when the selected server changes\n * @event server:update:variables - Emitted when a server variable changes\n */\nexport default {}\n</script>\n\n<script lang=\"ts\" setup>\nimport { ServerVariablesForm } from '@scalar/api-client/components/Server'\nimport { ScalarMarkdown } from '@scalar/components/markdown'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type { ServerObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport { useId } from 'vue'\n\nimport Selector from './Selector.vue'\n\nconst { eventBus, servers, selectedServer } = defineProps<SelectorProps>()\n\nconst id = useId()\n\n/** Update the selected server */\nconst updateServer = (newServer: string) => {\n eventBus.emit('server:update:selected', {\n url: selectedServer?.url === newServer ? '' : newServer,\n meta: {\n type: 'document',\n },\n })\n}\n\n/** Update the server variable */\nconst updateServerVariable = (key: string, value: string) => {\n /** Find the index of the selected server */\n const index = servers.findIndex((s) => s.url === selectedServer?.url)\n if (index === -1) {\n return\n }\n\n eventBus.emit('server:update:variables', {\n index,\n key,\n value,\n meta: {\n type: 'document',\n },\n })\n}\n</script>\n\n<template>\n <label\n class=\"bg-b-2 flex h-8 items-center rounded-t-xl border-x border-t px-3 py-2.5 font-medium\">\n Server\n </label>\n <div\n :id=\"id\"\n class=\"border\"\n :class=\"{\n 'rounded-b-xl':\n !selectedServer?.description && !selectedServer?.variables,\n }\">\n <Selector\n v-if=\"servers.length\"\n :selectedServer\n :servers=\"servers\"\n :target=\"id\"\n @update:modelValue=\"updateServer\" />\n </div>\n <ServerVariablesForm\n layout=\"reference\"\n :variables=\"selectedServer?.variables\"\n @update:variable=\"updateServerVariable\" />\n\n <!-- Description -->\n <ScalarMarkdown\n v-if=\"selectedServer?.description\"\n class=\"text-c-3 rounded-b-xl border-x border-b px-3 py-1.5\"\n :value=\"selectedServer.description\" />\n</template>\n"],"mappings":";;;;;;;;;;;;;;EAiCA,MAAM,KAAK,MAAM;;EAGjB,MAAM,gBAAgB,cAAsB;GAC1C,QAAA,SAAS,KAAK,0BAA0B;IACtC,KAAK,QAAA,gBAAgB,QAAQ,YAAY,KAAK;IAC9C,MAAM,EACJ,MAAM,WACR;GACF,CAAC;EACH;;EAGA,MAAM,wBAAwB,KAAa,UAAkB;;GAE3D,MAAM,QAAQ,QAAA,QAAQ,WAAW,MAAM,EAAE,QAAQ,QAAA,gBAAgB,GAAG;GACpE,IAAI,UAAU,IACZ;GAGF,QAAA,SAAS,KAAK,2BAA2B;IACvC;IACA;IACA;IACA,MAAM,EACJ,MAAM,WACR;GACF,CAAC;EACH;;;8BAIE,mBAGQ,SAAA,EAFN,OAAM,sFAAqF,GAAC,YAE9F,EAAA;IACA,mBAaM,OAAA;KAZH,IAAI,MAAA,EAAA;KACL,OAAK,eAAA,CAAC,UAAQ,EAAA,gBAAA,CAC2B,QAAA,gBAAgB,eAAW,CAAK,QAAA,gBAAgB,UAAA,CAAA,CAAA;QAKjF,QAAA,QAAQ,UAAA,UAAA,GADhB,YAKsC,kBAAA;;KAHnC,gBAAA,QAAA;KACA,SAAS,QAAA;KACT,QAAQ,MAAA,EAAA;KACR,uBAAmB;;;;;;IAExB,YAG4C,MAAA,mBAAA,GAAA;KAF1C,QAAO;KACN,WAAW,QAAA,gBAAgB;KAC3B,qBAAiB;;IAIZ,QAAA,gBAAgB,eAAA,UAAA,GADxB,YAGwC,MAAA,cAAA,GAAA;;KADtC,OAAM;KACL,OAAO,QAAA,eAAe"}
|
package/dist/helpers.d.ts
CHANGED
|
@@ -2,12 +2,12 @@ import type { OpenAPIV3_1 } from '@scalar/openapi-types';
|
|
|
2
2
|
import type { WorkspaceStore } from '@scalar/workspace-store/client';
|
|
3
3
|
import { type Auth } from '@scalar/workspace-store/entities/auth';
|
|
4
4
|
import type { SecuritySchemeObjectSecret } from '@scalar/workspace-store/request-example';
|
|
5
|
-
import type { OperationObject } from '@scalar/workspace-store/schemas/v3.
|
|
5
|
+
import type { OperationObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document';
|
|
6
6
|
export declare function getOperations(doc: Partial<OpenAPIV3_1.Document>): OperationObject[];
|
|
7
7
|
/** Generate document settings from workspace store. AsyncAPI docs are skipped — this feature is OpenAPI-native. */
|
|
8
8
|
export declare function createDocumentSettings(workspaceStore: WorkspaceStore): {
|
|
9
9
|
[k: string]: {
|
|
10
|
-
activeServer: import("@scalar/workspace-store/schemas/v3.
|
|
10
|
+
activeServer: import("@scalar/workspace-store/schemas/v3.2/strict/server").ServerObject | null;
|
|
11
11
|
securitySchemes: SecuritySchemeObjectSecret[];
|
|
12
12
|
};
|
|
13
13
|
};
|
package/dist/helpers.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","names":[],"sources":["../src/helpers.ts"],"sourcesContent":["import { REFERENCE_LS_KEYS, safeLocalStorage } from '@scalar/helpers/object/local-storage'\nimport type { OpenAPIV3_1 } from '@scalar/openapi-types'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport type { AuthStore } from '@scalar/workspace-store/entities/auth'\nimport { type Auth, AuthSchema } from '@scalar/workspace-store/entities/auth'\nimport type { SecuritySchemeObjectSecret } from '@scalar/workspace-store/request-example'\nimport {\n getSecurityRequirements,\n getSecuritySchemes,\n getSelectedSecurity,\n getSelectedServer,\n getServers,\n mergeSecurity,\n} from '@scalar/workspace-store/request-example'\nimport { isOpenApiDocument } from '@scalar/workspace-store/schemas/type-guards'\nimport { coerceValue } from '@scalar/workspace-store/schemas/typebox-coerce'\nimport type { OpenApiDocument, OperationObject } from '@scalar/workspace-store/schemas/v3.
|
|
1
|
+
{"version":3,"file":"helpers.js","names":[],"sources":["../src/helpers.ts"],"sourcesContent":["import { REFERENCE_LS_KEYS, safeLocalStorage } from '@scalar/helpers/object/local-storage'\nimport type { OpenAPIV3_1 } from '@scalar/openapi-types'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport type { AuthStore } from '@scalar/workspace-store/entities/auth'\nimport { type Auth, AuthSchema } from '@scalar/workspace-store/entities/auth'\nimport type { SecuritySchemeObjectSecret } from '@scalar/workspace-store/request-example'\nimport {\n getSecurityRequirements,\n getSecuritySchemes,\n getSelectedSecurity,\n getSelectedServer,\n getServers,\n mergeSecurity,\n} from '@scalar/workspace-store/request-example'\nimport { isOpenApiDocument } from '@scalar/workspace-store/schemas/type-guards'\nimport { coerceValue } from '@scalar/workspace-store/schemas/typebox-coerce'\nimport type { OpenApiDocument, OperationObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\n\nexport function getOperations(doc: Partial<OpenAPIV3_1.Document>) {\n return Object.values(doc.paths ?? {}).flatMap((path) => Object.values(path ?? {})) as OperationObject[]\n}\n\n/** Flattens all security requirements from a document */\nfunction getSecurityFromDocument(\n documentName: string,\n document: OpenApiDocument,\n authStore: AuthStore,\n): SecuritySchemeObjectSecret[] {\n const mergedSecurity = mergeSecurity(document?.components?.securitySchemes, {}, authStore, documentName)\n\n const securityRequirements = getSecurityRequirements(document.security)\n\n const selectedSecurity = getSelectedSecurity(\n authStore.getAuthSelectedSchemas({\n type: 'document',\n documentName,\n }),\n undefined,\n securityRequirements,\n )\n\n return getSecuritySchemes(mergedSecurity, selectedSecurity.selectedSchemes[selectedSecurity.selectedIndex] ?? {})\n}\n\n/** Generate document settings from workspace store. AsyncAPI docs are skipped — this feature is OpenAPI-native. */\nexport function createDocumentSettings(workspaceStore: WorkspaceStore) {\n const openApiEntries: [string, OpenApiDocument][] = []\n for (const [key, document] of Object.entries(workspaceStore.workspace.documents)) {\n if (isOpenApiDocument(document)) {\n openApiEntries.push([key, document])\n }\n }\n\n return Object.fromEntries(\n openApiEntries.map(([key, document]) => {\n const servers = getServers(document.servers, {\n documentUrl: document['x-scalar-original-source-url'],\n })\n\n return [\n key,\n {\n activeServer: getSelectedServer(document, null, null, servers),\n securitySchemes: getSecurityFromDocument(key, document, workspaceStore.auth),\n },\n ]\n }),\n )\n}\n\n// Local storage helper instance, safely wrapped.\nconst storage = safeLocalStorage()\n\n/**\n * Provides an interface to store and retrieve authentication scheme\n * information in local storage, including both the available schemes and\n * the user's selected schemes.\n */\nexport const authStorage = () => {\n const getKey = (slug: string) => {\n return `${REFERENCE_LS_KEYS.AUTH}-${slug}`\n }\n\n return {\n /**\n * Retrieves and coerces the authentication schemes stored in local storage.\n */\n getAuth: (slug: string) => {\n const parsed = JSON.parse(storage.getItem(getKey(slug)) ?? '{}')\n return coerceValue(AuthSchema, parsed)\n },\n /**\n * Stores the authentication schemes in local storage.\n * @param value The Auth object to stringify and store.\n */\n setAuth: (slug: string, value: Auth) => {\n storage.setItem(getKey(slug), JSON.stringify(value))\n },\n }\n}\n\n/**\n * Restores authentication secrets from local storage to the workspace store.\n *\n * This function iterates through stored authentication schemes and restores\n * any secret values (keys starting with x-scalar-secret-) to the active\n * document's security schemes. It uses the current security schemes as the\n * source of truth, only restoring secrets for structures that exist in the\n * current document.\n */\nexport const restoreAuthSecretsFromStorage = ({\n documentName,\n workspaceStore,\n}: {\n documentName: string\n workspaceStore: WorkspaceStore\n}): void => {\n const authPersistence = authStorage()\n const auth = authPersistence.getAuth(documentName)\n workspaceStore.auth.load({ [documentName]: auth })\n}\n\nexport function safeParseJson(value: string) {\n try {\n return JSON.parse(value)\n } catch {\n return\n }\n}\n"],"mappings":";;;;;;AAkBA,SAAgB,cAAc,KAAoC;CAChE,OAAO,OAAO,OAAO,IAAI,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,SAAS,OAAO,OAAO,QAAQ,CAAC,CAAC,CAAC;AACnF;;AAGA,SAAS,wBACP,cACA,UACA,WAC8B;CAC9B,MAAM,iBAAiB,cAAc,UAAU,YAAY,iBAAiB,CAAC,GAAG,WAAW,YAAY;CAEvG,MAAM,uBAAuB,wBAAwB,SAAS,QAAQ;CAEtE,MAAM,mBAAmB,oBACvB,UAAU,uBAAuB;EAC/B,MAAM;EACN;CACF,CAAC,GACD,KAAA,GACA,oBACF;CAEA,OAAO,mBAAmB,gBAAgB,iBAAiB,gBAAgB,iBAAiB,kBAAkB,CAAC,CAAC;AAClH;;AAGA,SAAgB,uBAAuB,gBAAgC;CACrE,MAAM,iBAA8C,CAAC;CACrD,KAAK,MAAM,CAAC,KAAK,aAAa,OAAO,QAAQ,eAAe,UAAU,SAAS,GAC7E,IAAI,kBAAkB,QAAQ,GAC5B,eAAe,KAAK,CAAC,KAAK,QAAQ,CAAC;CAIvC,OAAO,OAAO,YACZ,eAAe,KAAK,CAAC,KAAK,cAAc;EAKtC,OAAO,CACL,KACA;GACE,cAAc,kBAAkB,UAAU,MAAM,MAPpC,WAAW,SAAS,SAAS,EAC3C,aAAa,SAAS,gCACxB,CAK0D,CAAO;GAC7D,iBAAiB,wBAAwB,KAAK,UAAU,eAAe,IAAI;EAC7E,CACF;CACF,CAAC,CACH;AACF;AAGA,IAAM,UAAU,iBAAiB;;;;;;AAOjC,IAAa,oBAAoB;CAC/B,MAAM,UAAU,SAAiB;EAC/B,OAAO,GAAG,kBAAkB,KAAK,GAAG;CACtC;CAEA,OAAO;;;;EAIL,UAAU,SAAiB;GAEzB,OAAO,YAAY,YADJ,KAAK,MAAM,QAAQ,QAAQ,OAAO,IAAI,CAAC,KAAK,IAC5B,CAAM;EACvC;;;;;EAKA,UAAU,MAAc,UAAgB;GACtC,QAAQ,QAAQ,OAAO,IAAI,GAAG,KAAK,UAAU,KAAK,CAAC;EACrD;CACF;AACF;;;;;;;;;;AAWA,IAAa,iCAAiC,EAC5C,cACA,qBAIU;CAEV,MAAM,OADkB,YACX,CAAA,CAAgB,QAAQ,YAAY;CACjD,eAAe,KAAK,KAAK,GAAG,eAAe,KAAK,CAAC;AACnD;AAEA,SAAgB,cAAc,OAAe;CAC3C,IAAI;EACF,OAAO,KAAK,MAAM,KAAK;CACzB,QAAQ;EACN;CACF;AACF"}
|
package/dist/package.json
CHANGED
package/dist/style.css
CHANGED
|
@@ -1461,11 +1461,11 @@
|
|
|
1461
1461
|
background: var(--scalar-sidebar-item-hover-background, var(--scalar-background-2));
|
|
1462
1462
|
}
|
|
1463
1463
|
|
|
1464
|
-
.fade-request-section-content[data-v-
|
|
1464
|
+
.fade-request-section-content[data-v-ac788106] {
|
|
1465
1465
|
background: linear-gradient(to left, var(--scalar-background-1) 64%, transparent);
|
|
1466
1466
|
}
|
|
1467
1467
|
|
|
1468
|
-
.filter-hover[data-v-
|
|
1468
|
+
.filter-hover[data-v-ac788106] {
|
|
1469
1469
|
height: 100%;
|
|
1470
1470
|
padding-left: 24px;
|
|
1471
1471
|
padding-right: 39px;
|
|
@@ -1475,12 +1475,12 @@
|
|
|
1475
1475
|
overflow: hidden;
|
|
1476
1476
|
}
|
|
1477
1477
|
|
|
1478
|
-
.filter-hover[data-v-
|
|
1478
|
+
.filter-hover[data-v-ac788106]:hover, .filter-hover[data-v-ac788106]:has(:focus-visible) {
|
|
1479
1479
|
z-index: 10;
|
|
1480
1480
|
width: 100%;
|
|
1481
1481
|
}
|
|
1482
1482
|
|
|
1483
|
-
.filter-hover[data-v-
|
|
1483
|
+
.filter-hover[data-v-ac788106]:before {
|
|
1484
1484
|
content: "";
|
|
1485
1485
|
background-color: var(--scalar-background-1);
|
|
1486
1486
|
opacity: 0;
|
|
@@ -1493,90 +1493,90 @@
|
|
|
1493
1493
|
left: 0;
|
|
1494
1494
|
}
|
|
1495
1495
|
|
|
1496
|
-
.filter-hover-item[data-v-
|
|
1496
|
+
.filter-hover-item[data-v-ac788106] {
|
|
1497
1497
|
opacity: 0;
|
|
1498
1498
|
}
|
|
1499
1499
|
|
|
1500
|
-
.filter-hover-item[data-v-
|
|
1500
|
+
.filter-hover-item[data-v-ac788106]:not(:last-of-type) {
|
|
1501
1501
|
transform: translate3d(0, 3px, 0);
|
|
1502
1502
|
}
|
|
1503
1503
|
|
|
1504
|
-
.filter-hover:hover .filter-hover-item[data-v-
|
|
1504
|
+
.filter-hover:hover .filter-hover-item[data-v-ac788106] {
|
|
1505
1505
|
transition: opacity .2s ease-in-out, transform .2s ease-in-out;
|
|
1506
1506
|
}
|
|
1507
1507
|
|
|
1508
|
-
.filter-hover:hover .filter-hover-item[data-v-
|
|
1508
|
+
.filter-hover:hover .filter-hover-item[data-v-ac788106]:last-of-type {
|
|
1509
1509
|
transition-delay: 50ms;
|
|
1510
1510
|
}
|
|
1511
1511
|
|
|
1512
|
-
.filter-hover:hover .filter-hover-item[data-v-
|
|
1512
|
+
.filter-hover:hover .filter-hover-item[data-v-ac788106]:nth-last-of-type(2) {
|
|
1513
1513
|
transition-delay: .1s;
|
|
1514
1514
|
}
|
|
1515
1515
|
|
|
1516
|
-
.filter-hover:hover .filter-hover-item[data-v-
|
|
1516
|
+
.filter-hover:hover .filter-hover-item[data-v-ac788106]:nth-last-of-type(3) {
|
|
1517
1517
|
transition-delay: .15s;
|
|
1518
1518
|
}
|
|
1519
1519
|
|
|
1520
|
-
.filter-hover:hover .filter-hover-item[data-v-
|
|
1520
|
+
.filter-hover:hover .filter-hover-item[data-v-ac788106]:nth-last-of-type(4) {
|
|
1521
1521
|
transition-delay: .2s;
|
|
1522
1522
|
}
|
|
1523
1523
|
|
|
1524
|
-
.filter-hover:hover .filter-hover-item[data-v-
|
|
1524
|
+
.filter-hover:hover .filter-hover-item[data-v-ac788106]:nth-last-of-type(5) {
|
|
1525
1525
|
transition-delay: .25s;
|
|
1526
1526
|
}
|
|
1527
1527
|
|
|
1528
|
-
.filter-hover:hover .filter-hover-item[data-v-
|
|
1528
|
+
.filter-hover:hover .filter-hover-item[data-v-ac788106]:nth-last-of-type(6) {
|
|
1529
1529
|
transition-delay: .3s;
|
|
1530
1530
|
}
|
|
1531
1531
|
|
|
1532
|
-
.filter-hover:hover .filter-hover-item[data-v-
|
|
1532
|
+
.filter-hover:hover .filter-hover-item[data-v-ac788106]:nth-last-of-type(7) {
|
|
1533
1533
|
transition-delay: .35s;
|
|
1534
1534
|
}
|
|
1535
1535
|
|
|
1536
|
-
.filter-hover:hover .filter-hover-item[data-v-
|
|
1536
|
+
.filter-hover:hover .filter-hover-item[data-v-ac788106], .filter-hover:has(:focus-visible) .filter-hover-item[data-v-ac788106] {
|
|
1537
1537
|
opacity: 1;
|
|
1538
1538
|
transform: translate3d(0, 0, 0);
|
|
1539
1539
|
}
|
|
1540
1540
|
|
|
1541
|
-
.filter-hover[data-v-
|
|
1541
|
+
.filter-hover[data-v-ac788106]:hover:before, .filter-hover[data-v-ac788106]:has(:focus-visible):before {
|
|
1542
1542
|
opacity: .9;
|
|
1543
1543
|
-webkit-backdrop-filter: blur(10px);
|
|
1544
1544
|
backdrop-filter: blur(10px);
|
|
1545
1545
|
}
|
|
1546
1546
|
|
|
1547
|
-
.filter-button[data-v-
|
|
1547
|
+
.filter-button[data-v-ac788106] {
|
|
1548
1548
|
top: 50%;
|
|
1549
1549
|
transform: translateY(-50%);
|
|
1550
1550
|
}
|
|
1551
1551
|
|
|
1552
|
-
.context-bar-group:hover .context-bar-group-hover\:text-c-1[data-v-
|
|
1552
|
+
.context-bar-group:hover .context-bar-group-hover\:text-c-1[data-v-ac788106], .context-bar-group:has(:focus-visible) .context-bar-group-hover\:text-c-1[data-v-ac788106] {
|
|
1553
1553
|
--tw-text-opacity: 1;
|
|
1554
1554
|
color: rgb(var(--scalar-color-1) / var(--tw-text-opacity));
|
|
1555
1555
|
}
|
|
1556
1556
|
|
|
1557
|
-
.context-bar-group:hover .context-bar-group-hover\:hidden[data-v-
|
|
1557
|
+
.context-bar-group:hover .context-bar-group-hover\:hidden[data-v-ac788106], .context-bar-group:has(:focus-visible) .context-bar-group-hover\:hidden[data-v-ac788106] {
|
|
1558
1558
|
display: none;
|
|
1559
1559
|
}
|
|
1560
1560
|
|
|
1561
|
-
[data-v-
|
|
1561
|
+
[data-v-b5082dc8] .cm-editor {
|
|
1562
1562
|
background: none;
|
|
1563
1563
|
outline: none;
|
|
1564
1564
|
height: 100%;
|
|
1565
1565
|
padding: 0;
|
|
1566
1566
|
}
|
|
1567
1567
|
|
|
1568
|
-
[data-v-
|
|
1568
|
+
[data-v-b5082dc8] .cm-placeholder {
|
|
1569
1569
|
color: var(--scalar-color-3);
|
|
1570
1570
|
}
|
|
1571
1571
|
|
|
1572
|
-
[data-v-
|
|
1572
|
+
[data-v-b5082dc8] .cm-content {
|
|
1573
1573
|
font-family: var(--scalar-font-code);
|
|
1574
1574
|
font-size: var(--scalar-small);
|
|
1575
1575
|
max-height: 20px;
|
|
1576
1576
|
padding: 8px 0;
|
|
1577
1577
|
}
|
|
1578
1578
|
|
|
1579
|
-
[data-v-
|
|
1579
|
+
[data-v-b5082dc8] .cm-tooltip {
|
|
1580
1580
|
filter: brightness(var(--scalar-lifted-brightness));
|
|
1581
1581
|
border-radius: var(--scalar-radius);
|
|
1582
1582
|
box-shadow: var(--scalar-shadow-2);
|
|
@@ -1586,47 +1586,47 @@
|
|
|
1586
1586
|
overflow: hidden !important;
|
|
1587
1587
|
}
|
|
1588
1588
|
|
|
1589
|
-
[data-v-
|
|
1589
|
+
[data-v-b5082dc8] .cm-tooltip-autocomplete ul li {
|
|
1590
1590
|
padding: 3px 6px !important;
|
|
1591
1591
|
}
|
|
1592
1592
|
|
|
1593
|
-
[data-v-
|
|
1593
|
+
[data-v-b5082dc8] .cm-completionIcon-type:after {
|
|
1594
1594
|
color: var(--scalar-color-3) !important;
|
|
1595
1595
|
}
|
|
1596
1596
|
|
|
1597
|
-
[data-v-
|
|
1597
|
+
[data-v-b5082dc8] .cm-tooltip-autocomplete ul li[aria-selected] {
|
|
1598
1598
|
background: var(--scalar-background-2) !important;
|
|
1599
1599
|
color: var(--scalar-color-1) !important;
|
|
1600
1600
|
}
|
|
1601
1601
|
|
|
1602
|
-
[data-v-
|
|
1602
|
+
[data-v-b5082dc8] .cm-tooltip-autocomplete ul {
|
|
1603
1603
|
position: relative;
|
|
1604
1604
|
padding: 6px !important;
|
|
1605
1605
|
}
|
|
1606
1606
|
|
|
1607
|
-
[data-v-
|
|
1607
|
+
[data-v-b5082dc8] .cm-tooltip-autocomplete ul li:hover {
|
|
1608
1608
|
border-radius: 3px;
|
|
1609
1609
|
color: var(--scalar-color-1) !important;
|
|
1610
1610
|
background: var(--scalar-background-3) !important;
|
|
1611
1611
|
}
|
|
1612
1612
|
|
|
1613
|
-
[data-v-
|
|
1613
|
+
[data-v-b5082dc8] .cm-activeLine, [data-v-b5082dc8] .cm-activeLineGutter {
|
|
1614
1614
|
background-color: #0000;
|
|
1615
1615
|
}
|
|
1616
1616
|
|
|
1617
|
-
[data-v-
|
|
1617
|
+
[data-v-b5082dc8] .cm-selectionMatch, [data-v-b5082dc8] .cm-matchingBracket {
|
|
1618
1618
|
border-radius: var(--scalar-radius);
|
|
1619
1619
|
background: var(--scalar-background-4) !important;
|
|
1620
1620
|
}
|
|
1621
1621
|
|
|
1622
|
-
[data-v-
|
|
1622
|
+
[data-v-b5082dc8] .cm-css-color-picker-wrapper {
|
|
1623
1623
|
outline: 1px solid var(--scalar-background-3);
|
|
1624
1624
|
border-radius: 3px;
|
|
1625
1625
|
display: inline-flex;
|
|
1626
1626
|
overflow: hidden;
|
|
1627
1627
|
}
|
|
1628
1628
|
|
|
1629
|
-
[data-v-
|
|
1629
|
+
[data-v-b5082dc8] .cm-gutters {
|
|
1630
1630
|
color: var(--scalar-color-3);
|
|
1631
1631
|
font-size: var(--scalar-small);
|
|
1632
1632
|
background-color: #0000;
|
|
@@ -1635,7 +1635,7 @@
|
|
|
1635
1635
|
line-height: 22px;
|
|
1636
1636
|
}
|
|
1637
1637
|
|
|
1638
|
-
[data-v-
|
|
1638
|
+
[data-v-b5082dc8] .cm-gutters:before {
|
|
1639
1639
|
content: "";
|
|
1640
1640
|
border-radius: var(--scalar-radius) 0 0 var(--scalar-radius);
|
|
1641
1641
|
background-color: var(--scalar-background-1);
|
|
@@ -1646,7 +1646,7 @@
|
|
|
1646
1646
|
left: 2px;
|
|
1647
1647
|
}
|
|
1648
1648
|
|
|
1649
|
-
[data-v-
|
|
1649
|
+
[data-v-b5082dc8] .cm-gutterElement {
|
|
1650
1650
|
justify-content: flex-end;
|
|
1651
1651
|
align-items: center;
|
|
1652
1652
|
display: flex;
|
|
@@ -1656,19 +1656,19 @@
|
|
|
1656
1656
|
padding-right: 6px !important;
|
|
1657
1657
|
}
|
|
1658
1658
|
|
|
1659
|
-
[data-v-
|
|
1659
|
+
[data-v-b5082dc8] .cm-lineNumbers .cm-gutterElement {
|
|
1660
1660
|
min-width: fit-content;
|
|
1661
1661
|
}
|
|
1662
1662
|
|
|
1663
|
-
[data-v-
|
|
1663
|
+
[data-v-b5082dc8] .cm-gutter + .cm-gutter :not(.cm-foldGutter) .cm-gutterElement {
|
|
1664
1664
|
padding-left: 0 !important;
|
|
1665
1665
|
}
|
|
1666
1666
|
|
|
1667
|
-
[data-v-
|
|
1667
|
+
[data-v-b5082dc8] .cm-scroller {
|
|
1668
1668
|
overflow: auto;
|
|
1669
1669
|
}
|
|
1670
1670
|
|
|
1671
|
-
.line-wrapping[data-v-
|
|
1671
|
+
.line-wrapping[data-v-b5082dc8]:focus-within .cm-content {
|
|
1672
1672
|
white-space: break-spaces;
|
|
1673
1673
|
word-break: break-all;
|
|
1674
1674
|
min-height: fit-content;
|
|
@@ -1763,12 +1763,12 @@
|
|
|
1763
1763
|
color: var(--scalar-color-1);
|
|
1764
1764
|
}
|
|
1765
1765
|
|
|
1766
|
-
.code-input-lite[data-v-
|
|
1766
|
+
.code-input-lite[data-v-b22775cd] {
|
|
1767
1767
|
align-items: center;
|
|
1768
1768
|
display: flex;
|
|
1769
1769
|
}
|
|
1770
1770
|
|
|
1771
|
-
.code-input-lite__editor[data-v-
|
|
1771
|
+
.code-input-lite__editor[data-v-b22775cd] {
|
|
1772
1772
|
font: inherit;
|
|
1773
1773
|
letter-spacing: inherit;
|
|
1774
1774
|
min-width: 0;
|
|
@@ -1786,11 +1786,11 @@
|
|
|
1786
1786
|
overflow: auto hidden;
|
|
1787
1787
|
}
|
|
1788
1788
|
|
|
1789
|
-
.code-input-lite__editor[data-v-
|
|
1789
|
+
.code-input-lite__editor[data-v-b22775cd]::-webkit-scrollbar {
|
|
1790
1790
|
display: none;
|
|
1791
1791
|
}
|
|
1792
1792
|
|
|
1793
|
-
.code-input-lite--empty .code-input-lite__editor[data-v-
|
|
1793
|
+
.code-input-lite--empty .code-input-lite__editor[data-v-b22775cd]:not(:focus):before {
|
|
1794
1794
|
content: attr(data-placeholder);
|
|
1795
1795
|
color: var(--scalar-color-3);
|
|
1796
1796
|
pointer-events: none;
|
|
@@ -1802,7 +1802,7 @@
|
|
|
1802
1802
|
left: .5em;
|
|
1803
1803
|
}
|
|
1804
1804
|
|
|
1805
|
-
.code-input-lite--error .code-input-lite__editor[data-v-
|
|
1805
|
+
.code-input-lite--error .code-input-lite__editor[data-v-b22775cd] {
|
|
1806
1806
|
outline: 1px solid var(--scalar-color-red);
|
|
1807
1807
|
}
|
|
1808
1808
|
|
|
@@ -1866,22 +1866,22 @@
|
|
|
1866
1866
|
}
|
|
1867
1867
|
}
|
|
1868
1868
|
|
|
1869
|
-
[data-v-
|
|
1869
|
+
[data-v-8c8a738b] .code-input-lite__editor {
|
|
1870
1870
|
font-family: var(--scalar-font);
|
|
1871
1871
|
font-size: var(--scalar-small);
|
|
1872
1872
|
background-color: #0000;
|
|
1873
1873
|
padding: 5px 8px;
|
|
1874
1874
|
}
|
|
1875
1875
|
|
|
1876
|
-
[data-v-
|
|
1876
|
+
[data-v-8c8a738b] .scalar-pill:not(:last-of-type) {
|
|
1877
1877
|
margin-right: .15em;
|
|
1878
1878
|
}
|
|
1879
1879
|
|
|
1880
|
-
[data-v-
|
|
1880
|
+
[data-v-8c8a738b] .scalar-pill:not(:first-of-type) {
|
|
1881
1881
|
margin-left: .5px;
|
|
1882
1882
|
}
|
|
1883
1883
|
|
|
1884
|
-
[data-v-
|
|
1884
|
+
[data-v-ed64587d] .cm-content {
|
|
1885
1885
|
font-size: var(--scalar-small);
|
|
1886
1886
|
}
|
|
1887
1887
|
|
|
@@ -1945,38 +1945,38 @@ input[data-v-a6f4752a]::placeholder {
|
|
|
1945
1945
|
scrollbar-width: none;
|
|
1946
1946
|
}
|
|
1947
1947
|
|
|
1948
|
-
.request-section-content[data-v-
|
|
1948
|
+
.request-section-content[data-v-5d6c8262] {
|
|
1949
1949
|
--scalar-border-width: .5px;
|
|
1950
1950
|
}
|
|
1951
1951
|
|
|
1952
|
-
.request-section-content-filter[data-v-
|
|
1952
|
+
.request-section-content-filter[data-v-5d6c8262] {
|
|
1953
1953
|
box-shadow: 0 -10px 0 10px var(--scalar-background-1);
|
|
1954
1954
|
}
|
|
1955
1955
|
|
|
1956
|
-
.request-item:focus-within .request-meta-buttons[data-v-
|
|
1956
|
+
.request-item:focus-within .request-meta-buttons[data-v-5d6c8262] {
|
|
1957
1957
|
opacity: 1;
|
|
1958
1958
|
}
|
|
1959
1959
|
|
|
1960
|
-
.group-hover-input[data-v-
|
|
1960
|
+
.group-hover-input[data-v-5d6c8262] {
|
|
1961
1961
|
border-width: var(--scalar-border-width);
|
|
1962
1962
|
border-color: #0000;
|
|
1963
1963
|
}
|
|
1964
1964
|
|
|
1965
|
-
.group:hover .group-hover-input[data-v-
|
|
1965
|
+
.group:hover .group-hover-input[data-v-5d6c8262] {
|
|
1966
1966
|
background: var(--scalar-background-1);
|
|
1967
1967
|
}
|
|
1968
1968
|
|
|
1969
1969
|
@supports (color: color-mix(in lab, red, red)) {
|
|
1970
|
-
.group:hover .group-hover-input[data-v-
|
|
1970
|
+
.group:hover .group-hover-input[data-v-5d6c8262] {
|
|
1971
1971
|
background: color-mix(in srgb, var(--scalar-background-1), var(--scalar-background-2));
|
|
1972
1972
|
}
|
|
1973
1973
|
}
|
|
1974
1974
|
|
|
1975
|
-
.group:hover .group-hover-input[data-v-
|
|
1975
|
+
.group:hover .group-hover-input[data-v-5d6c8262] {
|
|
1976
1976
|
border-color: var(--scalar-border-color);
|
|
1977
1977
|
}
|
|
1978
1978
|
|
|
1979
|
-
.group-hover-input[data-v-
|
|
1979
|
+
.group-hover-input[data-v-5d6c8262]:focus {
|
|
1980
1980
|
border-color: var(--scalar-border-color) !important;
|
|
1981
1981
|
background: none !important;
|
|
1982
1982
|
}
|
|
@@ -2059,12 +2059,12 @@ input[data-v-a6f4752a]::placeholder {
|
|
|
2059
2059
|
opacity: 0;
|
|
2060
2060
|
}
|
|
2061
2061
|
|
|
2062
|
-
.animate-response-heading .response-heading[data-v-
|
|
2062
|
+
.animate-response-heading .response-heading[data-v-b969ac76] {
|
|
2063
2063
|
opacity: 1;
|
|
2064
|
-
animation: .2s ease-in-out forwards push-response-
|
|
2064
|
+
animation: .2s ease-in-out forwards push-response-b969ac76;
|
|
2065
2065
|
}
|
|
2066
2066
|
|
|
2067
|
-
@keyframes push-response-
|
|
2067
|
+
@keyframes push-response-b969ac76 {
|
|
2068
2068
|
from {
|
|
2069
2069
|
opacity: 1;
|
|
2070
2070
|
transform: translateY(0);
|
|
@@ -2076,12 +2076,12 @@ input[data-v-a6f4752a]::placeholder {
|
|
|
2076
2076
|
}
|
|
2077
2077
|
}
|
|
2078
2078
|
|
|
2079
|
-
.animate-response-heading .animate-response-children[data-v-
|
|
2079
|
+
.animate-response-heading .animate-response-children[data-v-b969ac76] {
|
|
2080
2080
|
opacity: 0;
|
|
2081
|
-
animation: .2s ease-in-out 50ms forwards response-spans-
|
|
2081
|
+
animation: .2s ease-in-out 50ms forwards response-spans-b969ac76;
|
|
2082
2082
|
}
|
|
2083
2083
|
|
|
2084
|
-
@keyframes response-spans-
|
|
2084
|
+
@keyframes response-spans-b969ac76 {
|
|
2085
2085
|
from {
|
|
2086
2086
|
opacity: 0;
|
|
2087
2087
|
transform: translateY(4px);
|
|
@@ -2093,14 +2093,14 @@ input[data-v-a6f4752a]::placeholder {
|
|
|
2093
2093
|
}
|
|
2094
2094
|
}
|
|
2095
2095
|
|
|
2096
|
-
.description[data-v-
|
|
2096
|
+
.description[data-v-9775eaaf] .markdown {
|
|
2097
2097
|
font-weight: var(--scalar-semibold);
|
|
2098
2098
|
color: var(--scalar-color--1);
|
|
2099
2099
|
padding: 0;
|
|
2100
2100
|
display: block;
|
|
2101
2101
|
}
|
|
2102
2102
|
|
|
2103
|
-
.description[data-v-
|
|
2103
|
+
.description[data-v-9775eaaf] .markdown > :first-child {
|
|
2104
2104
|
margin-top: 0;
|
|
2105
2105
|
}
|
|
2106
2106
|
|
|
@@ -2112,58 +2112,58 @@ input[data-v-a6f4752a]::placeholder {
|
|
|
2112
2112
|
background: var(--scalar-background-2);
|
|
2113
2113
|
}
|
|
2114
2114
|
|
|
2115
|
-
[data-v-
|
|
2115
|
+
[data-v-1f68de05] .cm-editor {
|
|
2116
2116
|
outline: none;
|
|
2117
2117
|
width: 100%;
|
|
2118
2118
|
height: 100%;
|
|
2119
2119
|
}
|
|
2120
2120
|
|
|
2121
|
-
[data-v-
|
|
2121
|
+
[data-v-1f68de05] .cm-line {
|
|
2122
2122
|
padding: 0;
|
|
2123
2123
|
}
|
|
2124
2124
|
|
|
2125
|
-
[data-v-
|
|
2125
|
+
[data-v-1f68de05] .cm-content {
|
|
2126
2126
|
font-size: var(--scalar-small);
|
|
2127
2127
|
align-items: center;
|
|
2128
2128
|
padding: 0;
|
|
2129
2129
|
display: flex;
|
|
2130
2130
|
}
|
|
2131
2131
|
|
|
2132
|
-
.scroll-timeline-x[data-v-
|
|
2132
|
+
.scroll-timeline-x[data-v-1f68de05] {
|
|
2133
2133
|
-ms-overflow-style: none;
|
|
2134
2134
|
-webkit-mask-image: linear-gradient(to right, #0000 0, #000 6px calc(100% - 24px), #0000 100%);
|
|
2135
2135
|
mask-image: linear-gradient(to right, #0000 0, #000 6px calc(100% - 24px), #0000 100%);
|
|
2136
2136
|
}
|
|
2137
2137
|
|
|
2138
|
-
.scroll-timeline-x-hidden[data-v-
|
|
2138
|
+
.scroll-timeline-x-hidden[data-v-1f68de05] {
|
|
2139
2139
|
overflow-x: auto;
|
|
2140
2140
|
}
|
|
2141
2141
|
|
|
2142
|
-
.scroll-timeline-x-hidden[data-v-
|
|
2142
|
+
.scroll-timeline-x-hidden[data-v-1f68de05] .cm-scroller {
|
|
2143
2143
|
scrollbar-width: none;
|
|
2144
2144
|
-ms-overflow-style: none;
|
|
2145
2145
|
padding-right: 20px;
|
|
2146
2146
|
overflow: auto;
|
|
2147
2147
|
}
|
|
2148
2148
|
|
|
2149
|
-
.scroll-timeline-x-hidden[data-v-
|
|
2149
|
+
.scroll-timeline-x-hidden[data-v-1f68de05]::-webkit-scrollbar {
|
|
2150
2150
|
width: 0;
|
|
2151
2151
|
height: 0;
|
|
2152
2152
|
display: none;
|
|
2153
2153
|
}
|
|
2154
2154
|
|
|
2155
|
-
.scroll-timeline-x-hidden[data-v-
|
|
2155
|
+
.scroll-timeline-x-hidden[data-v-1f68de05] .cm-scroller::-webkit-scrollbar {
|
|
2156
2156
|
width: 0;
|
|
2157
2157
|
height: 0;
|
|
2158
2158
|
display: none;
|
|
2159
2159
|
}
|
|
2160
2160
|
|
|
2161
|
-
.scroll-timeline-x-address[data-v-
|
|
2161
|
+
.scroll-timeline-x-address[data-v-1f68de05] {
|
|
2162
2162
|
scrollbar-width: none;
|
|
2163
2163
|
line-height: 27px;
|
|
2164
2164
|
}
|
|
2165
2165
|
|
|
2166
|
-
.scroll-timeline-x-address[data-v-
|
|
2166
|
+
.scroll-timeline-x-address[data-v-1f68de05]:after {
|
|
2167
2167
|
content: "";
|
|
2168
2168
|
cursor: text;
|
|
2169
2169
|
width: 24px;
|
|
@@ -2172,45 +2172,45 @@ input[data-v-a6f4752a]::placeholder {
|
|
|
2172
2172
|
right: 0;
|
|
2173
2173
|
}
|
|
2174
2174
|
|
|
2175
|
-
.scroll-timeline-x-address[data-v-
|
|
2175
|
+
.scroll-timeline-x-address[data-v-1f68de05]:empty:before {
|
|
2176
2176
|
content: "Enter URL or cURL request";
|
|
2177
2177
|
color: var(--scalar-color-3);
|
|
2178
2178
|
pointer-events: none;
|
|
2179
2179
|
}
|
|
2180
2180
|
|
|
2181
|
-
.address-bar-bg-states[data-v-
|
|
2181
|
+
.address-bar-bg-states[data-v-1f68de05] {
|
|
2182
2182
|
--scalar-address-bar-bg: var(--scalar-background-1);
|
|
2183
2183
|
}
|
|
2184
2184
|
|
|
2185
2185
|
@supports (color: color-mix(in lab, red, red)) {
|
|
2186
|
-
.address-bar-bg-states[data-v-
|
|
2186
|
+
.address-bar-bg-states[data-v-1f68de05] {
|
|
2187
2187
|
--scalar-address-bar-bg: color-mix(in srgb,
|
|
2188
2188
|
var(--scalar-background-1),
|
|
2189
2189
|
var(--scalar-background-2));
|
|
2190
2190
|
}
|
|
2191
2191
|
}
|
|
2192
2192
|
|
|
2193
|
-
.address-bar-bg-states[data-v-
|
|
2193
|
+
.address-bar-bg-states[data-v-1f68de05] {
|
|
2194
2194
|
background: var(--scalar-address-bar-bg);
|
|
2195
2195
|
}
|
|
2196
2196
|
|
|
2197
|
-
.address-bar-bg-states[data-v-
|
|
2197
|
+
.address-bar-bg-states[data-v-1f68de05]:has(.cm-focused) {
|
|
2198
2198
|
--scalar-address-bar-bg: var(--scalar-background-1);
|
|
2199
2199
|
border-color: var(--scalar-border-color);
|
|
2200
2200
|
outline-width: 1px;
|
|
2201
2201
|
outline-style: solid;
|
|
2202
2202
|
}
|
|
2203
2203
|
|
|
2204
|
-
.address-bar-bg-states:has(.cm-focused) .fade-left[data-v-
|
|
2204
|
+
.address-bar-bg-states:has(.cm-focused) .fade-left[data-v-1f68de05], .address-bar-bg-states:has(.cm-focused) .fade-right[data-v-1f68de05] {
|
|
2205
2205
|
--scalar-address-bar-bg: var(--scalar-background-1);
|
|
2206
2206
|
}
|
|
2207
2207
|
|
|
2208
|
-
.app-exit-button[data-v-
|
|
2208
|
+
.app-exit-button[data-v-821957c1] {
|
|
2209
2209
|
color: #fff;
|
|
2210
2210
|
background: #0000001a;
|
|
2211
2211
|
}
|
|
2212
2212
|
|
|
2213
|
-
.app-exit-button[data-v-
|
|
2213
|
+
.app-exit-button[data-v-821957c1]:hover {
|
|
2214
2214
|
background: #ffffff1a;
|
|
2215
2215
|
}
|
|
2216
2216
|
|
|
@@ -2344,7 +2344,7 @@ input[data-v-a6f4752a]::placeholder {
|
|
|
2344
2344
|
line-height: normal;
|
|
2345
2345
|
}
|
|
2346
2346
|
|
|
2347
|
-
.ref-search-meta[data-v-
|
|
2347
|
+
.ref-search-meta[data-v-89ab8a2d] {
|
|
2348
2348
|
background: var(--scalar-background-1);
|
|
2349
2349
|
border-bottom-left-radius: var(--scalar-radius-lg);
|
|
2350
2350
|
border-bottom-right-radius: var(--scalar-radius-lg);
|
|
@@ -5648,7 +5648,7 @@ div + .userMessage[data-v-6573ec87] {
|
|
|
5648
5648
|
width: 100%;
|
|
5649
5649
|
}
|
|
5650
5650
|
|
|
5651
|
-
.docSettings[data-v-
|
|
5651
|
+
.docSettings[data-v-5134b4f8] {
|
|
5652
5652
|
display: flex;
|
|
5653
5653
|
flex-direction: column;
|
|
5654
5654
|
gap: 12px;
|
|
@@ -5656,7 +5656,7 @@ div + .userMessage[data-v-6573ec87] {
|
|
|
5656
5656
|
font-size: var(--scalar-font-size-3);
|
|
5657
5657
|
max-height: 600px;
|
|
5658
5658
|
}
|
|
5659
|
-
.documentName[data-v-
|
|
5659
|
+
.documentName[data-v-5134b4f8] {
|
|
5660
5660
|
font-weight: var(--scalar-semibold);
|
|
5661
5661
|
}
|
|
5662
5662
|
|
|
@@ -2,7 +2,7 @@ import type { ApiReferenceConfigurationRaw } from '@scalar/types/api-reference';
|
|
|
2
2
|
import type { AuthStore } from '@scalar/workspace-store/entities/auth';
|
|
3
3
|
import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
4
4
|
import type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments';
|
|
5
|
-
import type { OpenApiDocument, ServerObject } from '@scalar/workspace-store/schemas/v3.
|
|
5
|
+
import type { OpenApiDocument, ServerObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document';
|
|
6
6
|
type __VLS_Props = {
|
|
7
7
|
options: Pick<ApiReferenceConfigurationRaw, 'authentication' | 'persistAuth' | 'proxyUrl'>;
|
|
8
8
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Auth.vue.js","names":[],"sources":["../../../src/views/Settings/Auth.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { AuthSelector } from '@scalar/api-client/blocks/scalar-auth-selector-block'\nimport type { ApiReferenceConfigurationRaw } from '@scalar/types/api-reference'\nimport type { AuthStore } from '@scalar/workspace-store/entities/auth'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport {\n getSecurityRequirements,\n getSelectedSecurity,\n mergeSecurity,\n} from '@scalar/workspace-store/request-example'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport type {\n OpenApiDocument,\n ServerObject,\n} from '@scalar/workspace-store/schemas/v3.
|
|
1
|
+
{"version":3,"file":"Auth.vue.js","names":[],"sources":["../../../src/views/Settings/Auth.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { AuthSelector } from '@scalar/api-client/blocks/scalar-auth-selector-block'\nimport type { ApiReferenceConfigurationRaw } from '@scalar/types/api-reference'\nimport type { AuthStore } from '@scalar/workspace-store/entities/auth'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport {\n getSecurityRequirements,\n getSelectedSecurity,\n mergeSecurity,\n} from '@scalar/workspace-store/request-example'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport type {\n OpenApiDocument,\n ServerObject,\n} from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport { useFocusWithin } from '@vueuse/core'\nimport { computed, shallowRef, watch } from 'vue'\n\nimport { useState } from '@/state/state'\n\nconst { document, name, environment, eventBus, options, authStore } =\n defineProps<{\n options: Pick<\n ApiReferenceConfigurationRaw,\n 'authentication' | 'persistAuth' | 'proxyUrl'\n >\n name: string\n authStore: AuthStore\n document: OpenApiDocument | undefined\n eventBus: WorkspaceEventBus\n selectedServer: ServerObject | null\n environment: XScalarEnvironment\n }>()\n\nconst { workspaceStore } = useState()\n\n/** Compute what the security requirements should be for the document */\nconst securityRequirements = computed(() =>\n getSecurityRequirements(document?.security),\n)\n\n/** Merge the security schemes with the authentication config and the auth store */\nconst securitySchemes = computed(() =>\n mergeSecurity(\n document?.components?.securitySchemes ?? {},\n options.authentication?.securitySchemes,\n authStore,\n name,\n ),\n)\n\n/** The selected security keys for the document */\nconst selectedSecurity = computed(() =>\n getSelectedSecurity(\n authStore.getAuthSelectedSchemas({\n type: 'document',\n documentName: name,\n }),\n undefined,\n securityRequirements.value,\n securitySchemes.value,\n options.authentication?.preferredSecurityScheme,\n ),\n)\n\nconst focusRef = shallowRef()\nconst { focused } = useFocusWithin(focusRef)\n\nwatch(focused, (isFocused) => {\n if (!isFocused) {\n return\n }\n\n workspaceStore.update('x-scalar-active-document', name)\n})\n</script>\n<template>\n <div\n ref=\"focusRef\"\n tabindex=\"0\">\n <AuthSelector\n v-if=\"Object.keys(securitySchemes).length\"\n :authStore\n :documentSlug=\"name\"\n :environment\n :eventBus\n isReadOnly\n isStatic\n layout=\"reference\"\n :meta=\"{ type: 'document' }\"\n :persistAuth=\"options.persistAuth\"\n :proxyUrl=\"options.proxyUrl ?? ''\"\n :securityRequirements\n :securitySchemes\n :selectedSecurity\n :server=\"selectedServer\"\n title=\"Authentication\" />\n </div>\n</template>\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Auth.vue.script.js","names":[],"sources":["../../../src/views/Settings/Auth.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { AuthSelector } from '@scalar/api-client/blocks/scalar-auth-selector-block'\nimport type { ApiReferenceConfigurationRaw } from '@scalar/types/api-reference'\nimport type { AuthStore } from '@scalar/workspace-store/entities/auth'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport {\n getSecurityRequirements,\n getSelectedSecurity,\n mergeSecurity,\n} from '@scalar/workspace-store/request-example'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport type {\n OpenApiDocument,\n ServerObject,\n} from '@scalar/workspace-store/schemas/v3.
|
|
1
|
+
{"version":3,"file":"Auth.vue.script.js","names":[],"sources":["../../../src/views/Settings/Auth.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { AuthSelector } from '@scalar/api-client/blocks/scalar-auth-selector-block'\nimport type { ApiReferenceConfigurationRaw } from '@scalar/types/api-reference'\nimport type { AuthStore } from '@scalar/workspace-store/entities/auth'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport {\n getSecurityRequirements,\n getSelectedSecurity,\n mergeSecurity,\n} from '@scalar/workspace-store/request-example'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport type {\n OpenApiDocument,\n ServerObject,\n} from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport { useFocusWithin } from '@vueuse/core'\nimport { computed, shallowRef, watch } from 'vue'\n\nimport { useState } from '@/state/state'\n\nconst { document, name, environment, eventBus, options, authStore } =\n defineProps<{\n options: Pick<\n ApiReferenceConfigurationRaw,\n 'authentication' | 'persistAuth' | 'proxyUrl'\n >\n name: string\n authStore: AuthStore\n document: OpenApiDocument | undefined\n eventBus: WorkspaceEventBus\n selectedServer: ServerObject | null\n environment: XScalarEnvironment\n }>()\n\nconst { workspaceStore } = useState()\n\n/** Compute what the security requirements should be for the document */\nconst securityRequirements = computed(() =>\n getSecurityRequirements(document?.security),\n)\n\n/** Merge the security schemes with the authentication config and the auth store */\nconst securitySchemes = computed(() =>\n mergeSecurity(\n document?.components?.securitySchemes ?? {},\n options.authentication?.securitySchemes,\n authStore,\n name,\n ),\n)\n\n/** The selected security keys for the document */\nconst selectedSecurity = computed(() =>\n getSelectedSecurity(\n authStore.getAuthSelectedSchemas({\n type: 'document',\n documentName: name,\n }),\n undefined,\n securityRequirements.value,\n securitySchemes.value,\n options.authentication?.preferredSecurityScheme,\n ),\n)\n\nconst focusRef = shallowRef()\nconst { focused } = useFocusWithin(focusRef)\n\nwatch(focused, (isFocused) => {\n if (!isFocused) {\n return\n }\n\n workspaceStore.update('x-scalar-active-document', name)\n})\n</script>\n<template>\n <div\n ref=\"focusRef\"\n tabindex=\"0\">\n <AuthSelector\n v-if=\"Object.keys(securitySchemes).length\"\n :authStore\n :documentSlug=\"name\"\n :environment\n :eventBus\n isReadOnly\n isStatic\n layout=\"reference\"\n :meta=\"{ type: 'document' }\"\n :persistAuth=\"options.persistAuth\"\n :proxyUrl=\"options.proxyUrl ?? ''\"\n :securityRequirements\n :securitySchemes\n :selectedSecurity\n :server=\"selectedServer\"\n title=\"Authentication\" />\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;EAkCA,MAAM,EAAE,mBAAmB,SAAS;;EAGpC,MAAM,uBAAuB,eAC3B,wBAAwB,QAAA,UAAU,QAAQ,CAC5C;;EAGA,MAAM,kBAAkB,eACtB,cACE,QAAA,UAAU,YAAY,mBAAmB,CAAC,GAC1C,QAAA,QAAQ,gBAAgB,iBACxB,QAAA,WACA,QAAA,IACF,CACF;;EAGA,MAAM,mBAAmB,eACvB,oBACE,QAAA,UAAU,uBAAuB;GAC/B,MAAM;GACN,cAAc,QAAA;EAChB,CAAC,GACD,KAAA,GACA,qBAAqB,OACrB,gBAAgB,OAChB,QAAA,QAAQ,gBAAgB,uBAC1B,CACF;EAEA,MAAM,WAAW,WAAW;EAC5B,MAAM,EAAE,YAAY,eAAe,QAAQ;EAE3C,MAAM,UAAU,cAAc;GAC5B,IAAI,CAAC,WACH;GAGF,eAAe,OAAO,4BAA4B,QAAA,IAAI;EACxD,CAAC;;uBAGC,mBAoBM,OAAA;aAnBA;IAAJ,KAAI;IACJ,UAAS;OAED,OAAO,KAAK,gBAAA,KAAe,CAAA,CAAE,UAAA,UAAA,GADrC,YAgB2B,MAAA,YAAA,GAAA;;IAdxB,WAAA,QAAA;IACA,cAAc,QAAA;IACd,aAAA,QAAA;IACA,UAAA,QAAA;IACD,YAAA;IACA,UAAA;IACA,QAAO;IACN,MAAM,EAAA,MAAA,WAAA;IACN,aAAa,QAAA,QAAQ;IACrB,UAAU,QAAA,QAAQ,YAAQ;IAC1B,sBAAA,qBAAA;IACA,iBAAA,gBAAA;IACA,kBAAA,iBAAA;IACA,QAAQ,QAAA;IACT,OAAM"}
|
|
@@ -2,7 +2,7 @@ import _plugin_vue_export_helper_default from "../../_virtual/_plugin-vue_export
|
|
|
2
2
|
import DocSettings_vue_vue_type_script_setup_true_lang_default from "./DocSettings.vue.script.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
//#region src/views/Settings/DocSettings.vue
|
|
5
|
-
var DocSettings_default = /*#__PURE__*/ _plugin_vue_export_helper_default(DocSettings_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-
|
|
5
|
+
var DocSettings_default = /*#__PURE__*/ _plugin_vue_export_helper_default(DocSettings_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-5134b4f8"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { DocSettings_default as default };
|
|
8
8
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DocSettings.vue.js","names":[],"sources":["../../../src/views/Settings/DocSettings.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n getActiveEnvironment,\n getSelectedServer,\n getServers,\n} from '@scalar/workspace-store/request-example'\nimport type { OpenApiDocument } from '@scalar/workspace-store/schemas/v3.
|
|
1
|
+
{"version":3,"file":"DocSettings.vue.js","names":[],"sources":["../../../src/views/Settings/DocSettings.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n getActiveEnvironment,\n getSelectedServer,\n getServers,\n} from '@scalar/workspace-store/request-example'\nimport type { OpenApiDocument } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport ServerSelector from '@/components/ServerSelector.vue'\nimport { useState } from '@/state/state'\nimport Auth from '@/views/Settings/Auth.vue'\n\nconst { document, name } = defineProps<{\n document: OpenApiDocument\n name: string\n}>()\n\nconst { workspaceStore, config, eventBus } = useState()\n\nconst environment = computed(\n () => getActiveEnvironment(workspaceStore, document).environment,\n)\n\nconst selectedServer = computed(() => {\n const servers = getServers(document.servers, {\n documentUrl: document['x-scalar-original-source-url'],\n })\n\n return getSelectedServer(document, null, null, servers)\n})\n\nconst securitySchemes = computed(\n () => document.components?.securitySchemes ?? {},\n)\n</script>\n\n<template>\n <div class=\"docSettings\">\n <div>\n <Auth\n :authStore=\"workspaceStore.auth\"\n :document\n :environment\n :eventBus\n :name\n :options=\"config\"\n :securitySchemes\n :selectedServer />\n </div>\n <div>\n <ServerSelector\n :eventBus\n :selectedServer\n :servers=\"document.servers ?? []\" />\n </div>\n </div>\n</template>\n\n<style scoped>\n.docSettings {\n display: flex;\n flex-direction: column;\n gap: 12px;\n margin-bottom: 12px;\n font-size: var(--scalar-font-size-3);\n max-height: 600px;\n}\n\n.documentName {\n font-weight: var(--scalar-semibold);\n}\n</style>\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DocSettings.vue.script.js","names":[],"sources":["../../../src/views/Settings/DocSettings.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n getActiveEnvironment,\n getSelectedServer,\n getServers,\n} from '@scalar/workspace-store/request-example'\nimport type { OpenApiDocument } from '@scalar/workspace-store/schemas/v3.
|
|
1
|
+
{"version":3,"file":"DocSettings.vue.script.js","names":[],"sources":["../../../src/views/Settings/DocSettings.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n getActiveEnvironment,\n getSelectedServer,\n getServers,\n} from '@scalar/workspace-store/request-example'\nimport type { OpenApiDocument } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport ServerSelector from '@/components/ServerSelector.vue'\nimport { useState } from '@/state/state'\nimport Auth from '@/views/Settings/Auth.vue'\n\nconst { document, name } = defineProps<{\n document: OpenApiDocument\n name: string\n}>()\n\nconst { workspaceStore, config, eventBus } = useState()\n\nconst environment = computed(\n () => getActiveEnvironment(workspaceStore, document).environment,\n)\n\nconst selectedServer = computed(() => {\n const servers = getServers(document.servers, {\n documentUrl: document['x-scalar-original-source-url'],\n })\n\n return getSelectedServer(document, null, null, servers)\n})\n\nconst securitySchemes = computed(\n () => document.components?.securitySchemes ?? {},\n)\n</script>\n\n<template>\n <div class=\"docSettings\">\n <div>\n <Auth\n :authStore=\"workspaceStore.auth\"\n :document\n :environment\n :eventBus\n :name\n :options=\"config\"\n :securitySchemes\n :selectedServer />\n </div>\n <div>\n <ServerSelector\n :eventBus\n :selectedServer\n :servers=\"document.servers ?? []\" />\n </div>\n </div>\n</template>\n\n<style scoped>\n.docSettings {\n display: flex;\n flex-direction: column;\n gap: 12px;\n margin-bottom: 12px;\n font-size: var(--scalar-font-size-3);\n max-height: 600px;\n}\n\n.documentName {\n font-weight: var(--scalar-semibold);\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;EAkBA,MAAM,EAAE,gBAAgB,QAAQ,aAAa,SAAS;EAEtD,MAAM,cAAc,eACZ,qBAAqB,gBAAgB,QAAA,QAAQ,CAAC,CAAC,WACvD;EAEA,MAAM,iBAAiB,eAAe;GACpC,MAAM,UAAU,WAAW,QAAA,SAAS,SAAS,EAC3C,aAAa,QAAA,SAAS,gCACxB,CAAC;GAED,OAAO,kBAAkB,QAAA,UAAU,MAAM,MAAM,OAAO;EACxD,CAAC;EAED,MAAM,kBAAkB,eAChB,QAAA,SAAS,YAAY,mBAAmB,CAAC,CACjD;;uBAIE,mBAkBM,OAlBN,YAkBM,CAjBJ,mBAUM,OAAA,MAAA,CATJ,YAQoB,cAAA;IAPjB,WAAW,MAAA,cAAA,CAAc,CAAC;IAC1B,UAAA,QAAA;IACA,aAAA,YAAA;IACA,UAAA,MAAA,QAAA;IACA,MAAA,QAAA;IACA,SAAS,MAAA,MAAA;IACT,iBAAA,gBAAA;IACA,gBAAA,eAAA;;;;;;;;;;SAEL,mBAKM,OAAA,MAAA,CAJJ,YAGsC,wBAAA;IAFnC,UAAA,MAAA,QAAA;IACA,gBAAA,eAAA;IACA,SAAS,QAAA,SAAS,WAAO,CAAA"}
|
package/dist/vue-styles.css
CHANGED
|
@@ -1260,7 +1260,7 @@ div + .userMessage[data-v-6573ec87] {
|
|
|
1260
1260
|
width: 100%;
|
|
1261
1261
|
}
|
|
1262
1262
|
|
|
1263
|
-
.docSettings[data-v-
|
|
1263
|
+
.docSettings[data-v-5134b4f8] {
|
|
1264
1264
|
display: flex;
|
|
1265
1265
|
flex-direction: column;
|
|
1266
1266
|
gap: 12px;
|
|
@@ -1268,7 +1268,7 @@ div + .userMessage[data-v-6573ec87] {
|
|
|
1268
1268
|
font-size: var(--scalar-font-size-3);
|
|
1269
1269
|
max-height: 600px;
|
|
1270
1270
|
}
|
|
1271
|
-
.documentName[data-v-
|
|
1271
|
+
.documentName[data-v-5134b4f8] {
|
|
1272
1272
|
font-weight: var(--scalar-semibold);
|
|
1273
1273
|
}
|
|
1274
1274
|
|
package/package.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"url": "git+https://github.com/scalar/scalar.git",
|
|
11
11
|
"directory": "packages/agent-chat"
|
|
12
12
|
},
|
|
13
|
-
"version": "0.12.
|
|
13
|
+
"version": "0.12.31",
|
|
14
14
|
"engines": {
|
|
15
15
|
"node": ">=22"
|
|
16
16
|
},
|
|
@@ -52,30 +52,30 @@
|
|
|
52
52
|
"neverpanic": "0.0.8",
|
|
53
53
|
"truncate-json": "3.0.1",
|
|
54
54
|
"vue": "^3.5.40",
|
|
55
|
-
"@scalar/api-client": "3.
|
|
55
|
+
"@scalar/api-client": "3.19.0",
|
|
56
|
+
"@scalar/components": "0.29.2",
|
|
57
|
+
"@scalar/helpers": "0.12.0",
|
|
58
|
+
"@scalar/json-magic": "0.13.5",
|
|
56
59
|
"@scalar/icons": "0.7.6",
|
|
57
|
-
"@scalar/
|
|
58
|
-
"@scalar/
|
|
59
|
-
"@scalar/
|
|
60
|
-
"@scalar/
|
|
61
|
-
"@scalar/
|
|
62
|
-
"@scalar/themes": "0.17.4",
|
|
63
|
-
"@scalar/types": "0.19.0",
|
|
60
|
+
"@scalar/openapi-types": "0.9.6",
|
|
61
|
+
"@scalar/schemas": "0.10.0",
|
|
62
|
+
"@scalar/themes": "0.18.0",
|
|
63
|
+
"@scalar/types": "0.20.0",
|
|
64
|
+
"@scalar/validation": "0.6.3",
|
|
64
65
|
"@scalar/use-toasts": "0.10.5",
|
|
65
|
-
"@scalar/workspace-store": "0.
|
|
66
|
-
"@scalar/validation": "0.6.3"
|
|
66
|
+
"@scalar/workspace-store": "0.61.0"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"@tailwindcss/cli": "^4.3.3",
|
|
70
70
|
"@tailwindcss/vite": "^4.3.3",
|
|
71
71
|
"@types/jsdom": "28.0.1",
|
|
72
72
|
"@vitejs/plugin-vue": "^6.0.8",
|
|
73
|
-
"hono": "^4.
|
|
73
|
+
"hono": "^4.13.7",
|
|
74
74
|
"jsdom": "27.4.0",
|
|
75
75
|
"tailwindcss": "^4.3.3",
|
|
76
76
|
"vite": "8.1.5",
|
|
77
77
|
"vitest": "4.1.10",
|
|
78
|
-
"@scalar/sidebar": "0.11.
|
|
78
|
+
"@scalar/sidebar": "0.11.2"
|
|
79
79
|
},
|
|
80
80
|
"scripts": {
|
|
81
81
|
"build": "vite build && pnpm build:styles && vue-tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json && shx cp package.json dist",
|