@scalar/api-client 2.2.21 → 2.2.23

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.
Files changed (144) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
  3. package/dist/components/AddressBar/AddressBar.vue.js +2 -2
  4. package/dist/components/AddressBar/AddressBar.vue2.js +70 -71
  5. package/dist/components/AddressBar/AddressBarServer.vue.js +26 -26
  6. package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
  7. package/dist/components/CodeInput/CodeInput.vue.js +2 -2
  8. package/dist/components/CodeInput/CodeInput.vue2.js +46 -46
  9. package/dist/components/CodeInput/codeVariableWidget.d.ts +4 -4
  10. package/dist/components/CodeInput/codeVariableWidget.d.ts.map +1 -1
  11. package/dist/components/CodeInput/codeVariableWidget.js +42 -38
  12. package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +25 -24
  13. package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts +1 -1
  14. package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts.map +1 -1
  15. package/dist/components/CommandPalette/CommandPaletteExample.vue.js +64 -55
  16. package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
  17. package/dist/components/CommandPalette/CommandPaletteImport.vue.js +110 -106
  18. package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +2 -2
  19. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +1 -1
  20. package/dist/components/CommandPalette/TheCommandPalette.vue.js +1 -1
  21. package/dist/components/CommandPalette/TheCommandPalette.vue2.js +38 -37
  22. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
  23. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +52 -49
  24. package/dist/components/ImportCollection/DropEventListener.vue.d.ts.map +1 -1
  25. package/dist/components/ImportCollection/DropEventListener.vue.js +46 -43
  26. package/dist/components/ImportCollection/ImportCollectionModal.vue.js +40 -39
  27. package/dist/components/ImportCollection/ImportNowButton.vue.js +44 -42
  28. package/dist/components/ImportCollection/WorkspaceSelector.vue.js +76 -69
  29. package/dist/components/ScalarAsciiArt.vue.js +1 -1
  30. package/dist/components/ScalarAsciiArt.vue2.js +22 -19
  31. package/dist/components/Search/useSearch.d.ts.map +1 -1
  32. package/dist/components/Search/useSearch.js +57 -49
  33. package/dist/components/SideNav/SideNavRouterLink.vue.d.ts.map +1 -1
  34. package/dist/components/SideNav/SideNavRouterLink.vue.js +22 -19
  35. package/dist/components/Sidebar/Sidebar.vue.d.ts +2 -2
  36. package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
  37. package/dist/components/Sidebar/Sidebar.vue.js +2 -2
  38. package/dist/components/Sidebar/Sidebar.vue2.js +16 -16
  39. package/dist/components/Sidebar/SidebarListElement.vue.d.ts.map +1 -1
  40. package/dist/components/Sidebar/SidebarListElement.vue.js +2 -2
  41. package/dist/components/Sidebar/SidebarListElement.vue2.js +38 -36
  42. package/dist/components/Sidebar/SidebarToggle.vue.d.ts.map +1 -1
  43. package/dist/components/Sidebar/SidebarToggle.vue.js +3 -3
  44. package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
  45. package/dist/components/TopNav/TopNav.vue.js +71 -64
  46. package/dist/layouts/App/ApiClientApp.vue.js +4 -1
  47. package/dist/layouts/App/create-api-client-app.d.ts +2 -1
  48. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  49. package/dist/layouts/Modal/ApiClientModal.vue.js +2 -2
  50. package/dist/layouts/Modal/ApiClientModal.vue2.js +22 -19
  51. package/dist/layouts/Modal/create-api-client-modal.d.ts +4 -2
  52. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  53. package/dist/layouts/Web/ApiClientWeb.vue.js +4 -1
  54. package/dist/layouts/Web/create-api-client-web.d.ts +2 -1
  55. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  56. package/dist/libs/create-client.d.ts +12 -11
  57. package/dist/libs/create-client.d.ts.map +1 -1
  58. package/dist/libs/create-client.js +54 -47
  59. package/dist/libs/extractAttachmentFilename.d.ts +3 -0
  60. package/dist/libs/extractAttachmentFilename.d.ts.map +1 -1
  61. package/dist/libs/extractAttachmentFilename.js +7 -7
  62. package/dist/libs/importers/curl.d.ts.map +1 -1
  63. package/dist/libs/importers/curl.js +18 -18
  64. package/dist/libs/normalize-headers.d.ts.map +1 -1
  65. package/dist/libs/normalize-headers.js +2 -2
  66. package/dist/libs/parse-curl.js +39 -36
  67. package/dist/store/active-entities.d.ts +4 -4
  68. package/dist/store/active-entities.d.ts.map +1 -1
  69. package/dist/store/active-entities.js +88 -86
  70. package/dist/store/collections.d.ts.map +1 -1
  71. package/dist/store/collections.js +29 -29
  72. package/dist/store/request-example.d.ts.map +1 -1
  73. package/dist/store/request-example.js +27 -23
  74. package/dist/store/requests.d.ts.map +1 -1
  75. package/dist/store/requests.js +94 -77
  76. package/dist/store/security-schemes.d.ts.map +1 -1
  77. package/dist/store/security-schemes.js +27 -27
  78. package/dist/store/servers.d.ts.map +1 -1
  79. package/dist/store/servers.js +18 -18
  80. package/dist/store/store.d.ts +5 -5
  81. package/dist/store/store.d.ts.map +1 -1
  82. package/dist/store/store.js +53 -48
  83. package/dist/store/tags.d.ts.map +1 -1
  84. package/dist/store/tags.js +35 -33
  85. package/dist/style.css +1 -1
  86. package/dist/views/Cookies/CookieForm.vue.d.ts.map +1 -1
  87. package/dist/views/Cookies/CookieForm.vue.js +14 -9
  88. package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
  89. package/dist/views/Cookies/Cookies.vue2.js +39 -37
  90. package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
  91. package/dist/views/Environment/Environment.vue2.js +94 -89
  92. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  93. package/dist/views/Request/Request.vue.js +1 -1
  94. package/dist/views/Request/Request.vue2.js +118 -119
  95. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +1 -1
  96. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +28 -25
  97. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
  98. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +1 -1
  99. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +38 -37
  100. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts.map +1 -1
  101. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.js +2 -2
  102. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue2.js +76 -73
  103. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.js +2 -2
  104. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue2.js +80 -80
  105. package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
  106. package/dist/views/Request/RequestSection/RequestBody.vue.js +1 -1
  107. package/dist/views/Request/RequestSection/RequestBody.vue2.js +192 -178
  108. package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
  109. package/dist/views/Request/RequestSection/RequestParams.vue.js +80 -73
  110. package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts.map +1 -1
  111. package/dist/views/Request/RequestSection/RequestPathParams.vue.js +50 -48
  112. package/dist/views/Request/RequestSidebar.vue.d.ts +3 -4
  113. package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
  114. package/dist/views/Request/RequestSidebar.vue.js +1 -1
  115. package/dist/views/Request/RequestSidebar.vue2.js +166 -164
  116. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  117. package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
  118. package/dist/views/Request/RequestSidebarItem.vue2.js +168 -150
  119. package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
  120. package/dist/views/Request/RequestSidebarItemMenu.vue.js +4 -4
  121. package/dist/views/Request/RequestSidebarItemMenu.vue2.js +80 -80
  122. package/dist/views/Request/RequestSubpageHeader.vue.d.ts +0 -1
  123. package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -1
  124. package/dist/views/Request/RequestSubpageHeader.vue.js +2 -2
  125. package/dist/views/Request/RequestSubpageHeader.vue2.js +44 -49
  126. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  127. package/dist/views/Request/ResponseSection/ResponseSection.vue.js +1 -1
  128. package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +1 -1
  129. package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
  130. package/dist/views/Request/components/WorkspaceDropdown.vue.js +166 -156
  131. package/dist/views/Request/handle-drag.d.ts.map +1 -1
  132. package/dist/views/Request/handle-drag.js +37 -31
  133. package/dist/views/Request/hooks/useOpenApiWatcher.js +27 -27
  134. package/dist/views/Request/libs/live-sync.d.ts.map +1 -1
  135. package/dist/views/Request/libs/live-sync.js +147 -130
  136. package/dist/views/Request/types/sidebar-item.d.ts +4 -1
  137. package/dist/views/Request/types/sidebar-item.d.ts.map +1 -1
  138. package/dist/views/Servers/ServerForm.vue.js +38 -35
  139. package/dist/views/Servers/Servers.vue2.js +38 -35
  140. package/dist/views/Settings/Settings.vue.d.ts.map +1 -1
  141. package/dist/views/Settings/Settings.vue2.js +15 -15
  142. package/dist/views/Settings/SettingsGeneral.vue.d.ts.map +1 -1
  143. package/dist/views/Settings/SettingsGeneral.vue.js +206 -174
  144. package/package.json +6 -6
@@ -1,109 +1,113 @@
1
- import { defineComponent as B, ref as _, computed as k, watch as A, openBlock as a, createBlock as C, unref as s, withCtx as c, createElementVNode as g, createVNode as y, createTextVNode as m, createElementBlock as r, Fragment as p, toDisplayString as O, createCommentVNode as N } from "vue";
2
- import { useActiveEntities as j } from "../../store/active-entities.js";
3
- import { useLoadingState as E, ScalarButton as D, ScalarIcon as W, ScalarTooltip as J, ScalarCodeBlock as Y } from "@scalar/components";
4
- import { useToasts as q } from "@scalar/use-toasts";
5
- import G from "./CommandActionForm.vue.js";
6
- import H from "./CommandActionInput.vue.js";
7
- import K from "./WatchModeToggle.vue.js";
8
- import { isPostmanCollection as S, getPostmanDocumentDetails as Q, convertPostmanToOpenApi as L } from "../../libs/postman.js";
9
- import { getOpenApiDocumentDetails as X } from "../../libs/getOpenApiDocumentDetails.js";
10
- import { isUrl as b } from "../../libs/isUrl.js";
11
- import { useFileDialog as Z } from "../../hooks/useFileDialog.js";
12
- import { useWorkspace as ee } from "../../store/store.js";
13
- const te = { class: "flex justify-between" }, oe = { class: "flex flex-row items-center justify-between gap-3 w-full" }, ae = { class: "grid gap-1.5 pointer-events-none max-w-[320px] w-content shadow-lg rounded bg-b-1 z-100 p-2 text-xxs leading-5 z-10 text-c-1" }, le = { class: "flex items-center text-c-2" }, ne = {
1
+ import { defineComponent as j, ref as D, computed as I, watch as L, openBlock as l, createBlock as U, unref as r, withCtx as m, createElementVNode as y, createVNode as x, createTextVNode as d, createElementBlock as i, Fragment as v, toDisplayString as V, createCommentVNode as E } from "vue";
2
+ import { useActiveEntities as W } from "../../store/active-entities.js";
3
+ import { useLoadingState as J, ScalarButton as R, ScalarIcon as Y, ScalarTooltip as q, ScalarCodeBlock as G } from "@scalar/components";
4
+ import { useToasts as H } from "@scalar/use-toasts";
5
+ import K from "./CommandActionForm.vue.js";
6
+ import Q from "./CommandActionInput.vue.js";
7
+ import X from "./WatchModeToggle.vue.js";
8
+ import { isPostmanCollection as P, getPostmanDocumentDetails as Z, convertPostmanToOpenApi as F } from "../../libs/postman.js";
9
+ import { getOpenApiDocumentDetails as ee } from "../../libs/getOpenApiDocumentDetails.js";
10
+ import { isUrl as C } from "../../libs/isUrl.js";
11
+ import { useFileDialog as te } from "../../hooks/useFileDialog.js";
12
+ import { useWorkspace as oe } from "../../store/store.js";
13
+ const ae = { class: "flex justify-between" }, le = { class: "flex flex-row items-center justify-between gap-3 w-full" }, ne = { class: "grid gap-1.5 pointer-events-none max-w-[320px] w-content shadow-lg rounded bg-b-1 z-100 p-2 text-xxs leading-5 z-10 text-c-1" }, se = { class: "flex items-center text-c-2" }, re = {
14
14
  key: 0,
15
15
  class: "text-pretty"
16
- }, se = {
16
+ }, ie = {
17
17
  key: 1,
18
18
  class: "text-pretty"
19
- }, ke = /* @__PURE__ */ B({
19
+ }, he = /* @__PURE__ */ j({
20
20
  __name: "CommandPaletteImport",
21
21
  emits: ["close", "back"],
22
- setup(re, { emit: V }) {
23
- const h = V, { activeWorkspace: d } = j(), { importSpecFile: x, importSpecFromUrl: R } = ee(), { toast: i } = q(), u = E(), t = _(""), v = _(!0), l = k(() => S(t.value) ? Q(t.value) : X(t.value)), U = k(
24
- () => l.value ? l.value.type : "json"
25
- ), f = k(() => b(t.value)), F = k(() => !!l.value), { open: T } = Z({
26
- onChange: async (o) => {
27
- const e = o == null ? void 0 : o[0];
22
+ setup(ue, { emit: T }) {
23
+ const S = T, { activeWorkspace: p } = W(), { importSpecFile: w, importSpecFromUrl: M } = oe(), { toast: u } = H(), c = J(), t = D(""), f = D(!0), s = I(() => P(t.value) ? Z(t.value) : ee(t.value)), _ = I(
24
+ () => s.value ? s.value.type : "json"
25
+ ), g = I(() => C(t.value)), $ = I(() => !!s.value), { open: z } = te({
26
+ onChange: async (a) => {
27
+ const e = a == null ? void 0 : a[0];
28
28
  if (e) {
29
- const n = new FileReader();
30
- n.onload = async ($) => {
31
- var P;
32
- const I = (P = $.target) == null ? void 0 : P.result;
29
+ const o = new FileReader();
30
+ o.onload = async (k) => {
31
+ var b, A, O;
32
+ const n = (b = k.target) == null ? void 0 : b.result;
33
33
  try {
34
- S(I) ? await x(
35
- await L(I),
36
- d.value.uid
37
- ) : await x(I, d.value.uid), i("Import successful", "info"), h("close");
38
- } catch (w) {
39
- console.error(w);
40
- const z = (w == null ? void 0 : w.message) || "Unknown error";
41
- i(`Import failed: ${z}`, "error");
34
+ P(n) ? await w(
35
+ await F(n),
36
+ ((A = p.value) == null ? void 0 : A.uid) ?? ""
37
+ ) : await w(n, ((O = p.value) == null ? void 0 : O.uid) ?? ""), u("Import successful", "info"), S("close");
38
+ } catch (h) {
39
+ console.error(h);
40
+ const N = (h == null ? void 0 : h.message) || "Unknown error";
41
+ u(`Import failed: ${N}`, "error");
42
42
  }
43
- }, n.readAsText(e);
43
+ }, o.readAsText(e);
44
44
  }
45
45
  },
46
46
  multiple: !1,
47
47
  accept: ".json,.yaml,.yml"
48
48
  });
49
- A(f, (o) => {
50
- o || (v.value = !1);
51
- }), A(t, (o) => {
52
- b(o) || (v.value = !1);
49
+ L(g, (a) => {
50
+ a || (f.value = !1);
51
+ }), L(t, (a) => {
52
+ C(a) || (f.value = !1);
53
53
  });
54
- async function M() {
55
- if (!(!t.value || u.isLoading)) {
56
- u.startLoading();
54
+ async function B() {
55
+ var a, e, o, k;
56
+ if (!(!t.value || c.isLoading)) {
57
+ c.startLoading();
57
58
  try {
58
- if (f.value) {
59
- const [o] = await R(
59
+ if (g.value) {
60
+ const [n] = await M(
60
61
  t.value,
61
- d.value.uid,
62
+ ((a = p.value) == null ? void 0 : a.uid) ?? "",
62
63
  {
63
- proxyUrl: d.value.proxyUrl,
64
- watchMode: v.value
64
+ proxyUrl: (e = p.value) == null ? void 0 : e.proxyUrl,
65
+ watchMode: f.value
65
66
  }
66
67
  );
67
- if (o) {
68
- i(
68
+ if (n) {
69
+ u(
69
70
  "There was a possible CORS error while importing your spec, please make sure this server is allowed in the CORS policy of your OpenAPI document.",
70
71
  "error",
71
72
  { timeout: 5e3 }
72
- ), u.invalidate(2e3, !0);
73
+ ), c.invalidate(2e3, !0);
73
74
  return;
74
75
  }
75
- } else if (F.value)
76
- S(t.value) ? (await x(
77
- await L(t.value),
78
- d.value.uid
79
- ), i("Successfully converted Postman collection", "info")) : await x(t.value, d.value.uid);
76
+ } else if ($.value)
77
+ P(t.value) ? (await w(
78
+ await F(t.value),
79
+ ((o = p.value) == null ? void 0 : o.uid) ?? ""
80
+ ), u("Successfully converted Postman collection", "info")) : await w(
81
+ t.value,
82
+ ((k = p.value) == null ? void 0 : k.uid) ?? ""
83
+ );
80
84
  else {
81
- i("Import failed: Invalid URL or OpenAPI document", "error"), u.invalidate(2e3, !0);
85
+ u("Import failed: Invalid URL or OpenAPI document", "error"), c.invalidate(2e3, !0);
82
86
  return;
83
87
  }
84
- u.clear(), h("close"), i("Import successful", "info");
85
- } catch (o) {
86
- console.error("[importCollection]", o);
87
- const e = (o == null ? void 0 : o.message) || "Unknown error";
88
- u.invalidate(2e3, !0), i(`Import failed: ${e}`, "error");
88
+ c.clear(), S("close"), u("Import successful", "info");
89
+ } catch (n) {
90
+ console.error("[importCollection]", n);
91
+ const b = (n == null ? void 0 : n.message) || "Unknown error";
92
+ c.invalidate(2e3, !0), u(`Import failed: ${b}`, "error");
89
93
  }
90
94
  }
91
95
  }
92
- return (o, e) => (a(), C(G, {
96
+ return (a, e) => (l(), U(K, {
93
97
  disabled: !t.value.trim(),
94
- loading: s(u),
95
- onSubmit: M
98
+ loading: r(c),
99
+ onSubmit: B
96
100
  }, {
97
- options: c(() => [
98
- g("div", oe, [
99
- y(s(D), {
101
+ options: m(() => [
102
+ y("div", le, [
103
+ x(r(R), {
100
104
  class: "p-2 max-h-8 gap-1.5 text-xs hover:bg-b-2 relative",
101
105
  variant: "outlined",
102
- onClick: s(T)
106
+ onClick: r(z)
103
107
  }, {
104
- default: c(() => [
105
- e[6] || (e[6] = m(" JSON, or YAML File ")),
106
- y(s(W), {
108
+ default: m(() => [
109
+ e[6] || (e[6] = d(" JSON, or YAML File ")),
110
+ x(r(Y), {
107
111
  class: "text-c-3",
108
112
  icon: "UploadSimple",
109
113
  size: "md"
@@ -111,23 +115,23 @@ const te = { class: "flex justify-between" }, oe = { class: "flex flex-row items
111
115
  ]),
112
116
  _: 1
113
117
  }, 8, ["onClick"]),
114
- y(s(J), {
118
+ x(r(q), {
115
119
  as: "div",
116
120
  class: "z-[10001]",
117
121
  side: "bottom",
118
122
  sideOffset: 5
119
123
  }, {
120
- trigger: c(() => [
121
- y(K, {
122
- modelValue: v.value,
123
- "onUpdate:modelValue": e[3] || (e[3] = (n) => v.value = n),
124
- disabled: !f.value
124
+ trigger: m(() => [
125
+ x(X, {
126
+ modelValue: f.value,
127
+ "onUpdate:modelValue": e[3] || (e[3] = (o) => f.value = o),
128
+ disabled: !g.value
125
129
  }, null, 8, ["modelValue", "disabled"])
126
130
  ]),
127
- content: c(() => [
128
- g("div", ae, [
129
- g("div", le, [
130
- f.value ? (a(), r("span", ne, " Automatically updates the API client when the OpenAPI URL content changes, ensuring your client remains up-to-date. ")) : (a(), r("span", se, " Watch Mode is only available for URL imports. It automatically updates the API client when the OpenAPI URL content changes. "))
131
+ content: m(() => [
132
+ y("div", ne, [
133
+ y("div", se, [
134
+ g.value ? (l(), i("span", re, " Automatically updates the API client when the OpenAPI URL content changes, ensuring your client remains up-to-date. ")) : (l(), i("span", ie, " Watch Mode is only available for URL imports. It automatically updates the API client when the OpenAPI URL content changes. "))
131
135
  ])
132
136
  ])
133
137
  ]),
@@ -135,48 +139,48 @@ const te = { class: "flex justify-between" }, oe = { class: "flex flex-row items
135
139
  })
136
140
  ])
137
141
  ]),
138
- submit: c(() => [
139
- e[7] || (e[7] = m(" Import ")),
140
- f.value ? (a(), r(p, { key: 0 }, [
141
- m(" from URL ")
142
- ], 64)) : l.value && U.value ? (a(), r(p, { key: 1 }, [
143
- l.value.title ? (a(), r(p, { key: 0 }, [
144
- m(' "' + O(l.value.title) + '" ', 1)
145
- ], 64)) : (a(), r(p, { key: 1 }, [
146
- m(O(l.value.version) + " Spec", 1)
142
+ submit: m(() => [
143
+ e[7] || (e[7] = d(" Import ")),
144
+ g.value ? (l(), i(v, { key: 0 }, [
145
+ d(" from URL ")
146
+ ], 64)) : s.value && _.value ? (l(), i(v, { key: 1 }, [
147
+ s.value.title ? (l(), i(v, { key: 0 }, [
148
+ d(' "' + V(s.value.title) + '" ', 1)
149
+ ], 64)) : (l(), i(v, { key: 1 }, [
150
+ d(V(s.value.version) + " Spec", 1)
147
151
  ], 64))
148
- ], 64)) : (a(), r(p, { key: 2 }, [
149
- m("Collection")
152
+ ], 64)) : (l(), i(v, { key: 2 }, [
153
+ d("Collection")
150
154
  ], 64))
151
155
  ]),
152
- default: c(() => [
153
- !l.value || s(b)(t.value) ? (a(), C(H, {
156
+ default: m(() => [
157
+ !s.value || r(C)(t.value) ? (l(), U(Q, {
154
158
  key: 0,
155
159
  modelValue: t.value,
156
- "onUpdate:modelValue": e[0] || (e[0] = (n) => t.value = n),
160
+ "onUpdate:modelValue": e[0] || (e[0] = (o) => t.value = o),
157
161
  placeholder: "OpenAPI/Swagger/Postman URL or document",
158
- onOnDelete: e[1] || (e[1] = (n) => h("back", n))
159
- }, null, 8, ["modelValue"])) : (a(), r(p, { key: 1 }, [
160
- g("div", te, [
161
- e[5] || (e[5] = g("div", { class: "pl-8 text-xs min-h-8 py-2 text-c-2" }, "Preview", -1)),
162
- y(s(D), {
162
+ onOnDelete: e[1] || (e[1] = (o) => S("back", o))
163
+ }, null, 8, ["modelValue"])) : (l(), i(v, { key: 1 }, [
164
+ y("div", ae, [
165
+ e[5] || (e[5] = y("div", { class: "pl-8 text-xs min-h-8 py-2 text-c-2" }, "Preview", -1)),
166
+ x(r(R), {
163
167
  class: "ml-auto p-2 max-h-8 gap-1.5 text-xs hover:bg-b-2 relative",
164
168
  variant: "ghost",
165
- onClick: e[2] || (e[2] = (n) => t.value = "")
169
+ onClick: e[2] || (e[2] = (o) => t.value = "")
166
170
  }, {
167
- default: c(() => e[4] || (e[4] = [
168
- m(" Clear ")
171
+ default: m(() => e[4] || (e[4] = [
172
+ d(" Clear ")
169
173
  ])),
170
174
  _: 1
171
175
  })
172
176
  ]),
173
- l.value && !s(b)(t.value) ? (a(), C(s(Y), {
177
+ s.value && !r(C)(t.value) ? (l(), U(r(G), {
174
178
  key: 0,
175
179
  class: "border max-h-[40dvh] mt-1 bg-b-2 rounded [--scalar-small:--scalar-font-size-4]",
176
180
  content: t.value,
177
181
  copy: !1,
178
- lang: U.value
179
- }, null, 8, ["content", "lang"])) : N("", !0)
182
+ lang: _.value
183
+ }, null, 8, ["content", "lang"])) : E("", !0)
180
184
  ], 64))
181
185
  ]),
182
186
  _: 1
@@ -184,5 +188,5 @@ const te = { class: "flex justify-between" }, oe = { class: "flex flex-row items
184
188
  }
185
189
  });
186
190
  export {
187
- ke as default
191
+ he as default
188
192
  };
@@ -64,7 +64,7 @@ const J = { class: "flex" }, se = /* @__PURE__ */ W({
64
64
  return t.label === ((a = (e = y.value) == null ? void 0 : e.tags) == null ? void 0 : a[0]);
65
65
  })
66
66
  ), B = (t) => m.value = t, E = () => {
67
- var e;
67
+ var e, a;
68
68
  if (!o.value.trim()) {
69
69
  N("Please enter a name before creating a request.", "error");
70
70
  return;
@@ -85,7 +85,7 @@ const J = { class: "flex" }, se = /* @__PURE__ */ W({
85
85
  t && M({
86
86
  name: "request",
87
87
  params: {
88
- workspace: U.value.uid,
88
+ workspace: (a = U.value) == null ? void 0 : a.uid,
89
89
  request: t.uid
90
90
  }
91
91
  }), b("close");
@@ -72,7 +72,7 @@ export declare const PaletteComponents: {
72
72
  }> & Readonly<{
73
73
  onClose?: (() => any) | undefined;
74
74
  onBack?: ((e: KeyboardEvent) => any) | undefined;
75
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLFormElement>;
75
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
76
76
  };
77
77
  /** Infer the types from the commands */
78
78
  export type CommandNames = keyof typeof PaletteComponents;
@@ -2,7 +2,7 @@ import o from "./TheCommandPalette.vue2.js";
2
2
  import { PaletteComponents as s } from "./TheCommandPalette.vue2.js";
3
3
  /* empty css */
4
4
  import t from "../../_virtual/_plugin-vue_export-helper.js";
5
- const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-c09436db"]]);
5
+ const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-5143d9bb"]]);
6
6
  export {
7
7
  s as PaletteComponents,
8
8
  a as default
@@ -85,75 +85,76 @@ const he = {
85
85
  },
86
86
  {
87
87
  label: "Pages",
88
- commands: se.map((e) => ({
89
- name: e.prettyName,
90
- icon: e.icon,
91
- path: `${e.name}.default`
88
+ commands: se.map((o) => ({
89
+ name: o.prettyName,
90
+ icon: o.icon,
91
+ path: `${o.name}.default`
92
92
  }))
93
93
  }
94
94
  ], d = oe(), { push: W } = le(), { activeWorkspace: H } = re(), { events: f } = ve(), x = i(), l = i(""), s = i(null), c = i(-1), D = i([]), v = T(
95
- () => S.reduce((e, o) => {
96
- const t = o.commands.filter(
95
+ () => S.reduce((o, e) => {
96
+ const t = e.commands.filter(
97
97
  (n) => n.name.toLowerCase().includes(l.value.toLowerCase())
98
98
  );
99
- return [...e, ...t];
99
+ return [...o, ...t];
100
100
  }, [])
101
101
  ), h = () => {
102
102
  d.hide(), l.value = "", s.value = null, c.value = -1;
103
- }, O = (e) => {
104
- l.value !== "" && (e == null || e.preventDefault()), s.value = null, V(() => {
105
- var o;
106
- return (o = _.value) == null ? void 0 : o.focus();
103
+ }, O = (o) => {
104
+ l.value !== "" && (o == null || o.preventDefault()), s.value = null, V(() => {
105
+ var e;
106
+ return (e = _.value) == null ? void 0 : e.focus();
107
107
  });
108
- }, $ = (e) => {
109
- "path" in e ? (W({
110
- name: e.path,
108
+ }, $ = (o) => {
109
+ var e;
110
+ "path" in o ? (W({
111
+ name: o.path,
111
112
  params: {
112
- workspace: H.value.uid
113
+ workspace: (e = H.value) == null ? void 0 : e.uid
113
114
  }
114
- }), h()) : s.value = e.name;
115
+ }), h()) : s.value = o.name;
115
116
  }, _ = i(), I = ({
116
- commandName: e,
117
- metaData: o
117
+ commandName: o,
118
+ metaData: e
118
119
  } = {}) => {
119
- s.value = e ?? null, x.value = o, d.show(), V(() => {
120
+ s.value = o ?? null, x.value = e, d.show(), V(() => {
120
121
  var t;
121
122
  return (t = _.value) == null ? void 0 : t.focus();
122
123
  });
123
124
  };
124
- F(l, (e) => {
125
- e && v.value.length > 0 && (c.value = 0);
125
+ F(l, (o) => {
126
+ o && v.value.length > 0 && (c.value = 0);
126
127
  });
127
- const R = (e, o) => {
128
+ const R = (o, e) => {
128
129
  var C;
129
130
  if (!d.open) return;
130
- o.preventDefault();
131
- const t = e === "up" ? -1 : 1, n = v.value.length;
131
+ e.preventDefault();
132
+ const t = o === "up" ? -1 : 1, n = v.value.length;
132
133
  c.value = (c.value + t + n) % n, (C = D.value[c.value]) == null || C.scrollIntoView({
133
134
  behavior: "smooth",
134
135
  block: "nearest"
135
136
  });
136
137
  }, k = T(
137
138
  () => v.value[c.value]
138
- ), U = (e) => {
139
- !k.value || s.value || (e.preventDefault(), e.stopPropagation(), $(k.value));
140
- }, E = (e) => {
141
- d.open && e != null && e.closeModal && h();
139
+ ), U = (o) => {
140
+ !k.value || s.value || (o.preventDefault(), o.stopPropagation(), $(k.value));
141
+ }, E = (o) => {
142
+ d.open && o != null && o.closeModal && h();
142
143
  };
143
144
  return G(() => {
144
145
  f.commandPalette.on(I), f.hotKeys.on(E);
145
146
  }), Q(() => {
146
147
  f.commandPalette.off(I), f.hotKeys.off(E);
147
- }), (e, o) => (a(), z(r(te), {
148
+ }), (o, e) => (a(), z(r(te), {
148
149
  open: r(d).open,
149
- onClose: o[5] || (o[5] = (t) => h())
150
+ onClose: e[5] || (e[5] = (t) => h())
150
151
  }, {
151
152
  default: y(() => [
152
- o[7] || (o[7] = u("div", { class: "commandmenu-overlay z-overlay" }, null, -1)),
153
+ e[7] || (e[7] = u("div", { class: "commandmenu-overlay z-overlay" }, null, -1)),
153
154
  p(r(ne), { class: "commandmenu z-overlay flex flex-col" }, {
154
155
  default: y(() => [
155
156
  p(r(ae), { class: "sr-only" }, {
156
- default: y(() => o[6] || (o[6] = [
157
+ default: y(() => e[6] || (e[6] = [
157
158
  K("API Client Command Menu")
158
159
  ])),
159
160
  _: 1
@@ -162,7 +163,7 @@ const he = {
162
163
  u("button", {
163
164
  class: "absolute p-0.75 hover:bg-b-3 rounded text-c-3 active:text-c-1 mr-1.5 my-1.25 z-1",
164
165
  type: "button",
165
- onClick: o[3] || (o[3] = (t) => s.value = null)
166
+ onClick: e[3] || (e[3] = (t) => s.value = null)
166
167
  }, [
167
168
  p(r(A), {
168
169
  icon: "ChevronLeft",
@@ -171,7 +172,7 @@ const he = {
171
172
  })
172
173
  ]),
173
174
  (a(), z(Z(ge[s.value]), ee(x.value ? { metaData: x.value } : {}, {
174
- onBack: o[4] || (o[4] = (t) => O(t)),
175
+ onBack: e[4] || (e[4] = (t) => O(t)),
175
176
  onClose: h
176
177
  }), null, 16))
177
178
  ])) : (a(), m("div", he, [
@@ -188,16 +189,16 @@ const he = {
188
189
  id: "commandmenu",
189
190
  ref_key: "commandInputRef",
190
191
  ref: _,
191
- "onUpdate:modelValue": o[0] || (o[0] = (t) => l.value = t),
192
+ "onUpdate:modelValue": e[0] || (e[0] = (t) => l.value = t),
192
193
  autocomplete: "off",
193
194
  autofocus: "",
194
195
  class: "w-full rounded bg-none border-none py-1.5 text-sm focus:outline-none",
195
196
  placeholder: "Search commands...",
196
197
  type: "text",
197
198
  onKeydown: [
198
- o[1] || (o[1] = w(g((t) => R("down", t), ["stop"]), ["down"])),
199
+ e[1] || (e[1] = w(g((t) => R("down", t), ["stop"]), ["down"])),
199
200
  w(g(U, ["stop"]), ["enter"]),
200
- o[2] || (o[2] = w(g((t) => R("up", t), ["stop"]), ["up"]))
201
+ e[2] || (e[2] = w(g((t) => R("up", t), ["stop"]), ["up"]))
201
202
  ]
202
203
  }, null, 40, _e), [
203
204
  [j, l.value]
@@ -1 +1 @@
1
- {"version":3,"file":"EnvironmentSelector.vue.d.ts","sourceRoot":"","sources":["../../../src/components/EnvironmentSelector/EnvironmentSelector.vue"],"names":[],"mappings":";AA4cA,wBAMG"}
1
+ {"version":3,"file":"EnvironmentSelector.vue.d.ts","sourceRoot":"","sources":["../../../src/components/EnvironmentSelector/EnvironmentSelector.vue"],"names":[],"mappings":";AA8cA,wBAMG"}