UNPKG

@scalar/api-client

Version:

the open source API testing client

68 lines (67 loc) 2.07 kB
import { defineComponent as p, ref as m, watch as i, createElementBlock as u, openBlock as d, createElementVNode as a, createVNode as l, unref as f, mergeProps as v } from "vue"; import { RouterView as _ } from "vue-router"; import k from "./components/LabelInput.vue.js"; import h from "./components/Tabs.vue.js"; const w = { class: "custom-scroll h-full" }, x = { class: "w-full px-3 md:mx-auto md:max-w-180" }, b = ["aria-label"], W = { class: "group relative ml-1.25" }, y = { class: "px-1.5 py-8" }, B = {}, S = /* @__PURE__ */ p({ ...B, __name: "WorkspaceCollection", props: { documentSlug: {}, document: {}, eventBus: {}, layout: {}, path: {}, method: {}, exampleName: {}, environment: {}, securitySchemes: {}, workspaceStore: {}, activeWorkspace: {}, plugins: {}, customThemes: {}, currentTheme: {}, isDarkMode: { type: Boolean } }, setup(s) { const e = s, o = m(e.activeWorkspace.label); i( () => e.activeWorkspace.label, (t) => { o.value = t; } ); const r = (t) => { if (t.trim() === "") { o.value = e.activeWorkspace.label; return; } e.eventBus.emit("workspace:update:name", t); }; return (t, c) => (d(), u("div", w, [ a("div", x, [ a("div", { "aria-label": `title: ${s.activeWorkspace.label}`, class: "mx-auto flex h-fit w-full flex-row items-center gap-2 pt-14 pb-3 md:max-w-180 md:pt-6" }, [ a("div", W, [ l(k, { modelValue: o.value, "onUpdate:modelValue": c[0] || (c[0] = (n) => o.value = n), class: "text-xl font-bold", inputId: "workspaceName", placeholder: "Untitled Workspace", onBlur: r }, null, 8, ["modelValue"]) ]) ], 8, b), l(h, { type: "workspace" }), a("div", y, [ l(f(_), v(e, { collectionType: "workspace" }), null, 16) ]) ]) ])); } }); export { S as default };