@scalar/api-client 2.5.13 → 2.5.15

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 (117) hide show
  1. package/CHANGELOG.md +52 -0
  2. package/README.md +1 -1
  3. package/dist/components/AddressBar/AddressBar.vue.js +1 -1
  4. package/dist/components/AddressBar/AddressBarHistory.vue.js +1 -1
  5. package/dist/components/AddressBar/AddressBarHistory.vue2.js +1 -1
  6. package/dist/components/CodeInput/CodeInput.vue.js +2 -2
  7. package/dist/components/CodeInput/CodeInput.vue2.js +2 -2
  8. package/dist/components/CommandPalette/CommandActionInput.vue.d.ts.map +1 -1
  9. package/dist/components/CommandPalette/CommandActionInput.vue.js +11 -10
  10. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +10 -10
  11. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
  12. package/dist/components/CommandPalette/TheCommandPalette.vue.js +2 -2
  13. package/dist/components/CommandPalette/TheCommandPalette.vue2.js +129 -116
  14. package/dist/components/DataTable/DataTableCell.vue.js +8 -8
  15. package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
  16. package/dist/components/DataTable/DataTableInput.vue.js +2 -2
  17. package/dist/components/ImportCollection/ImportCollectionModal.vue.js +7 -7
  18. package/dist/components/ImportCollection/PrefetchError.vue.js +1 -1
  19. package/dist/components/ImportCollection/WorkspaceSelector.vue.js +1 -1
  20. package/dist/components/ImportCollection/utils/get-openapi-version.d.ts +5 -0
  21. package/dist/components/ImportCollection/utils/get-openapi-version.d.ts.map +1 -0
  22. package/dist/components/ImportCollection/utils/get-openapi-version.js +20 -0
  23. package/dist/components/ImportCollection/utils/get-openapi-version.test.d.ts +2 -0
  24. package/dist/components/ImportCollection/utils/get-openapi-version.test.d.ts.map +1 -0
  25. package/dist/components/ImportCollection/utils/import-collection.js +1 -1
  26. package/dist/components/ImportCollection/utils/{isDocument.d.ts → is-document.d.ts} +2 -2
  27. package/dist/components/ImportCollection/utils/is-document.d.ts.map +1 -0
  28. package/dist/components/ImportCollection/utils/is-document.js +9 -0
  29. package/dist/components/ImportCollection/utils/is-document.test.d.ts +2 -0
  30. package/dist/components/ImportCollection/utils/is-document.test.d.ts.map +1 -0
  31. package/dist/components/ImportCollection/utils/is-url.d.ts +5 -0
  32. package/dist/components/ImportCollection/utils/is-url.d.ts.map +1 -0
  33. package/dist/components/ImportCollection/utils/is-url.js +9 -0
  34. package/dist/components/ImportCollection/utils/is-url.test.d.ts +2 -0
  35. package/dist/components/ImportCollection/utils/is-url.test.d.ts.map +1 -0
  36. package/dist/components/OpenApiClientButton.vue.js +2 -2
  37. package/dist/components/Server/ServerDropdown.vue.d.ts.map +1 -1
  38. package/dist/components/Server/ServerDropdown.vue.js +8 -8
  39. package/dist/components/Server/ServerSelector.vue.d.ts.map +1 -1
  40. package/dist/components/Server/ServerSelector.vue.js +13 -13
  41. package/dist/components/TopNav/TopNav.vue.js +10 -10
  42. package/dist/components/TopNav/TopNavItem.vue.js +1 -1
  43. package/dist/components/TopNav/TopNavItem.vue2.js +1 -1
  44. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts +5 -1
  45. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
  46. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +42 -36
  47. package/dist/components/ViewLayout/ViewLayoutSection.vue.js +4 -4
  48. package/dist/hooks/useClientConfig.d.ts +42 -36
  49. package/dist/hooks/useClientConfig.d.ts.map +1 -1
  50. package/dist/layouts/App/create-api-client-app.d.ts +160 -160
  51. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  52. package/dist/layouts/Modal/create-api-client-modal.d.ts +320 -320
  53. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  54. package/dist/layouts/Web/create-api-client-web.d.ts +160 -160
  55. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  56. package/dist/libs/create-client.d.ts +160 -160
  57. package/dist/libs/create-client.d.ts.map +1 -1
  58. package/dist/libs/find-request.d.ts +5 -5
  59. package/dist/libs/find-request.d.ts.map +1 -1
  60. package/dist/libs/send-request/create-request-operation.js +10 -10
  61. package/dist/libs/send-request/create-request-operation.test.d.ts +33 -33
  62. package/dist/libs/send-request/create-request-operation.test.d.ts.map +1 -1
  63. package/dist/libs/send-request/set-request-cookies.d.ts +1 -1
  64. package/dist/libs/send-request/set-request-cookies.d.ts.map +1 -1
  65. package/dist/plugins/plugin-manager.d.ts +5 -3
  66. package/dist/plugins/plugin-manager.d.ts.map +1 -1
  67. package/dist/plugins/plugin-manager.js +17 -9
  68. package/dist/plugins/plugin-manager.test.d.ts +2 -0
  69. package/dist/plugins/plugin-manager.test.d.ts.map +1 -0
  70. package/dist/store/active-entities.d.ts +33 -33
  71. package/dist/store/active-entities.d.ts.map +1 -1
  72. package/dist/store/request-example.d.ts +130 -130
  73. package/dist/store/request-example.d.ts.map +1 -1
  74. package/dist/store/requests.d.ts +55 -55
  75. package/dist/store/requests.d.ts.map +1 -1
  76. package/dist/store/store.d.ts +162 -162
  77. package/dist/store/store.d.ts.map +1 -1
  78. package/dist/style.css +1 -1
  79. package/dist/views/Collection/CollectionInfoForm.vue.js +2 -2
  80. package/dist/views/Collection/components/EnvironmentForm.vue.js +2 -2
  81. package/dist/views/Collection/components/MarkdownInput.vue.d.ts.map +1 -1
  82. package/dist/views/Collection/components/MarkdownInput.vue.js +1 -1
  83. package/dist/views/Collection/components/MarkdownInput.vue2.js +32 -26
  84. package/dist/views/Cookies/CookieForm.vue.js +1 -1
  85. package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
  86. package/dist/views/Cookies/Cookies.vue2.js +67 -61
  87. package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
  88. package/dist/views/Environment/Environment.vue2.js +98 -92
  89. package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.js +1 -1
  90. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
  91. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
  92. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +125 -121
  93. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.js +1 -1
  94. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue2.js +22 -22
  95. package/dist/views/Request/RequestSection/RequestBody.vue.js +1 -1
  96. package/dist/views/Request/RequestSection/RequestCodeExample.vue.js +2 -2
  97. package/dist/views/Request/RequestSection/RequestTable.vue.js +1 -1
  98. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  99. package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
  100. package/dist/views/Request/RequestSidebarItem.vue2.js +9 -9
  101. package/dist/views/Request/ResponseSection/RequestHeaders.vue.js +9 -9
  102. package/dist/views/Request/ResponseSection/ResponseBody.vue.js +2 -2
  103. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.js +3 -3
  104. package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.js +1 -1
  105. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  106. package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +9 -9
  107. package/dist/views/Request/components/WorkspaceDropdown.vue.js +2 -2
  108. package/dist/views/Settings/SettingsGeneral.vue.js +2 -2
  109. package/package.json +18 -18
  110. package/dist/components/ImportCollection/utils/getOpenApiDocumentVersion.d.ts +0 -5
  111. package/dist/components/ImportCollection/utils/getOpenApiDocumentVersion.d.ts.map +0 -1
  112. package/dist/components/ImportCollection/utils/getOpenApiDocumentVersion.js +0 -20
  113. package/dist/components/ImportCollection/utils/isDocument.d.ts.map +0 -1
  114. package/dist/components/ImportCollection/utils/isDocument.js +0 -7
  115. package/dist/components/ImportCollection/utils/isUrl.d.ts +0 -3
  116. package/dist/components/ImportCollection/utils/isUrl.d.ts.map +0 -1
  117. package/dist/components/ImportCollection/utils/isUrl.js +0 -6
@@ -1,23 +1,23 @@
1
- import { defineComponent as oe, ref as f, computed as U, watch as te, onMounted as ne, onBeforeUnmount as ae, createBlock as W, openBlock as l, unref as c, withCtx as A, createElementVNode as v, createVNode as k, createElementBlock as u, createTextVNode as V, createCommentVNode as le, withKeys as S, withModifiers as T, Fragment as D, renderList as O, withDirectives as se, toDisplayString as F, vShow as re, normalizeClass as me, resolveDynamicComponent as ie, mergeProps as ce, nextTick as b } from "vue";
2
- import { Dialog as ue, DialogPanel as de, DialogTitle as pe } from "@headlessui/vue";
3
- import { useModal as fe, ScalarIcon as L } from "@scalar/components";
4
- import { useRouter as ve } from "vue-router";
5
- import { ROUTES as Ce } from "../../constants.js";
6
- import { importCurlCommand as he } from "../../libs/importers/curl.js";
7
- import { PathId as xe } from "../../routes.js";
8
- import { useActiveEntities as ke } from "../../store/active-entities.js";
9
- import ye from "./CommandPaletteCollection.vue.js";
10
- import ge from "./CommandPaletteExample.vue.js";
11
- import _e from "./CommandPaletteImport.vue.js";
12
- import be from "./CommandPaletteImportCurl.vue.js";
13
- import we from "./CommandPaletteServer.vue.js";
14
- import Pe from "./CommandPaletteTag.vue.js";
15
- import Ie from "./CommandPaletteWorkspace.vue.js";
16
- import { useWorkspace as Re } from "../../store/store.js";
17
- const Ae = {
1
+ import { defineComponent as ae, ref as v, computed as O, watch as le, onMounted as re, onBeforeUnmount as se, createBlock as F, openBlock as r, unref as u, withCtx as A, createElementVNode as C, createVNode as y, createElementBlock as d, createTextVNode as G, createCommentVNode as me, withKeys as S, withModifiers as T, Fragment as D, renderList as Q, withDirectives as ie, toDisplayString as j, vShow as ce, normalizeClass as ue, resolveDynamicComponent as de, mergeProps as pe, nextTick as b } from "vue";
2
+ import { Dialog as fe, DialogPanel as ve, DialogTitle as Ce } from "@headlessui/vue";
3
+ import { useModal as he, ScalarIcon as L } from "@scalar/components";
4
+ import { useRouter as xe } from "vue-router";
5
+ import { ROUTES as ke } from "../../constants.js";
6
+ import { importCurlCommand as ye } from "../../libs/importers/curl.js";
7
+ import { PathId as E } from "../../routes.js";
8
+ import { useActiveEntities as ge } from "../../store/active-entities.js";
9
+ import _e from "./CommandPaletteCollection.vue.js";
10
+ import be from "./CommandPaletteExample.vue.js";
11
+ import we from "./CommandPaletteImport.vue.js";
12
+ import Pe from "./CommandPaletteImportCurl.vue.js";
13
+ import Ie from "./CommandPaletteServer.vue.js";
14
+ import Re from "./CommandPaletteTag.vue.js";
15
+ import Ae from "./CommandPaletteWorkspace.vue.js";
16
+ import { useWorkspace as Se } from "../../store/store.js";
17
+ const Te = {
18
18
  key: 0,
19
19
  class: "custom-scroll max-h-[50dvh] min-h-0 flex-1 rounded-lg p-1.5"
20
- }, Se = { class: "bg-b-2 focus-within:bg-b-1 sticky top-0 flex items-center rounded-md border border-transparent pl-2 shadow-[0_-8px_0_8px_var(--scalar-background-1),0_0_8px_8px_var(--scalar-background-1)] focus-within:border-(--scalar-background-3)" }, Te = { for: "commandmenu" }, De = ["value", "onKeydown"], Le = ["onClick"], Ee = {
20
+ }, De = { class: "bg-b-2 focus-within:bg-b-1 sticky top-0 flex items-center rounded-md border border-transparent pl-2 shadow-[0_-8px_0_8px_var(--scalar-background-1),0_0_8px_8px_var(--scalar-background-1)] focus-within:border-(--scalar-background-3)" }, Le = { for: "commandmenu" }, Ee = ["value", "onKeydown"], qe = ["onClick"], Me = {
21
21
  key: 0,
22
22
  class: "text-c-3 p-2 pt-3 text-center text-sm"
23
23
  }, Be = {
@@ -26,18 +26,19 @@ const Ae = {
26
26
  }, He = {
27
27
  name: "TheCommandPalette"
28
28
  }, Ke = {
29
- "Import from OpenAPI/Swagger/Postman/cURL": _e,
29
+ "Import from OpenAPI/Swagger/Postman/cURL": we,
30
30
  "Create Request": "",
31
- "Create Workspace": Ie,
32
- "Add Tag": Pe,
33
- "Add Server": we,
34
- "Create Collection": ye,
35
- "Add Example": ge,
36
- "Import from cURL": be
37
- }, eo = /* @__PURE__ */ oe({
31
+ "Create Workspace": Ae,
32
+ "Add Tag": Re,
33
+ "Add Server": Ie,
34
+ "Create Collection": _e,
35
+ "Add Example": be,
36
+ "Import from cURL": Pe
37
+ }, to = /* @__PURE__ */ ae({
38
38
  ...He,
39
39
  setup($e) {
40
- const C = fe(), w = ve(), { activeWorkspace: y, activeWorkspaceCollections: G, activeCollection: Q } = ke(), { events: d, requestMutators: j } = Re(), E = [
40
+ var z, N;
41
+ const h = he(), w = xe(), { activeWorkspace: l, activeWorkspaceCollections: J, activeCollection: X } = ge(), { events: p, requestMutators: Y } = Se(), q = [
41
42
  {
42
43
  label: "",
43
44
  commands: [
@@ -77,18 +78,30 @@ const Ae = {
77
78
  {
78
79
  name: "Add Environment",
79
80
  icon: "Brackets",
80
- path: "environment.default"
81
+ path: {
82
+ name: "environment.default",
83
+ params: {
84
+ [E.Workspace]: ((z = l == null ? void 0 : l.value) == null ? void 0 : z.uid) ?? "default"
85
+ },
86
+ query: { openEnvironmentModal: "true" }
87
+ }
81
88
  },
82
89
  {
83
90
  name: "Add Cookie",
84
91
  icon: "Cookie",
85
- path: "cookies.default"
92
+ path: {
93
+ name: "cookies.default",
94
+ params: {
95
+ [E.Workspace]: ((N = l == null ? void 0 : l.value) == null ? void 0 : N.uid) ?? "default"
96
+ },
97
+ query: { openCookieModal: "true" }
98
+ }
86
99
  }
87
100
  ]
88
101
  },
89
102
  {
90
103
  label: "Pages",
91
- commands: Ce.map((o) => {
104
+ commands: ke.map((o) => {
92
105
  var e;
93
106
  return {
94
107
  name: o.displayName,
@@ -96,148 +109,148 @@ const Ae = {
96
109
  path: w.resolve({
97
110
  ...o.to,
98
111
  params: {
99
- [xe.Workspace]: ((e = y == null ? void 0 : y.value) == null ? void 0 : e.uid) ?? "default"
112
+ [E.Workspace]: ((e = l == null ? void 0 : l.value) == null ? void 0 : e.uid) ?? "default"
100
113
  }
101
114
  }).href
102
115
  };
103
116
  })
104
117
  }
105
- ], P = f(), s = f(""), r = f(null), m = f(-1), B = f([]), h = U(
106
- () => E.reduce((o, e) => {
118
+ ], P = v(), s = v(""), m = v(null), i = v(-1), M = v([]), x = O(
119
+ () => q.reduce((o, e) => {
107
120
  const t = e.commands.filter(
108
121
  (n) => n.name.toLowerCase().includes(s.value.toLowerCase())
109
122
  );
110
123
  return [...o, ...t];
111
124
  }, [])
112
- ), p = () => {
113
- C.hide(), s.value = "", r.value = null, m.value = -1;
114
- }, J = (o) => {
115
- s.value !== "" && (o == null || o.preventDefault()), r.value = null, b(() => {
125
+ ), f = () => {
126
+ h.hide(), s.value = "", m.value = null, i.value = -1;
127
+ }, Z = (o) => {
128
+ s.value !== "" && (o == null || o.preventDefault()), m.value = null, b(() => {
116
129
  var e;
117
130
  return (e = g.value) == null ? void 0 : e.focus();
118
131
  });
119
- }, H = (o) => {
132
+ }, B = (o) => {
120
133
  var e;
121
134
  if ("path" in o)
122
- w.push(o.path), p();
135
+ w.push(o.path), f();
123
136
  else if (o.name === "Create Request") {
124
- const t = G.value.find(
137
+ const t = J.value.find(
125
138
  (n) => {
126
139
  var a;
127
140
  return ((a = n.info) == null ? void 0 : a.title) === "Drafts";
128
141
  }
129
142
  );
130
143
  if (t) {
131
- const n = j.add({}, t.uid);
144
+ const n = Y.add({}, t.uid);
132
145
  n && (w.push({
133
146
  name: "request",
134
147
  params: {
135
- workspace: (e = y.value) == null ? void 0 : e.uid,
148
+ workspace: (e = l.value) == null ? void 0 : e.uid,
136
149
  request: n.uid
137
150
  }
138
- }), p(), b(() => {
139
- d.hotKeys.emit({
151
+ }), f(), b(() => {
152
+ p.hotKeys.emit({
140
153
  focusAddressBar: new KeyboardEvent("keydown", { key: "l" })
141
154
  });
142
155
  }));
143
156
  } else
144
- p();
157
+ f();
145
158
  } else
146
- r.value = o.name;
147
- }, g = f(), K = ({
159
+ m.value = o.name;
160
+ }, g = v(), H = ({
148
161
  commandName: o,
149
162
  metaData: e
150
163
  } = {}) => {
151
- r.value = o ?? null, P.value = e, C.show(), b(() => {
164
+ m.value = o ?? null, P.value = e, h.show(), b(() => {
152
165
  var t;
153
166
  return (t = g.value) == null ? void 0 : t.focus();
154
167
  });
155
168
  };
156
- te(s, (o) => {
157
- o && h.value.length > 0 && (m.value = 0);
169
+ le(s, (o) => {
170
+ o && x.value.length > 0 && (i.value = 0);
158
171
  });
159
- const $ = (o, e) => {
160
- if (!C.open) return;
172
+ const K = (o, e) => {
173
+ if (!h.open) return;
161
174
  e.preventDefault();
162
- const t = o === "up" ? -1 : 1, n = h.value.length;
163
- m.value = (m.value + t + n) % n, b(() => {
164
- var z, N;
165
- const a = (z = g.value) == null ? void 0 : z.closest(".custom-scroll");
175
+ const t = o === "up" ? -1 : 1, n = x.value.length;
176
+ i.value = (i.value + t + n) % n, b(() => {
177
+ var W, V;
178
+ const a = (W = g.value) == null ? void 0 : W.closest(".custom-scroll");
166
179
  if (!a) return;
167
- if (m.value === 0) {
180
+ if (i.value === 0) {
168
181
  a.scrollTop = 0;
169
182
  return;
170
183
  }
171
- const i = B.value[m.value];
172
- if (!i) return;
173
- const x = (((N = a.querySelector(".sticky")) == null ? void 0 : N.clientHeight) || 0) + 16, _ = 6, R = i.offsetTop, M = R + i.clientHeight, Z = a.scrollTop + x, ee = a.scrollTop + a.clientHeight - _;
174
- R < Z ? a.scrollTop = R - x : M > ee && (a.scrollTop = M - a.clientHeight + _);
184
+ const c = M.value[i.value];
185
+ if (!c) return;
186
+ const k = (((V = a.querySelector(".sticky")) == null ? void 0 : V.clientHeight) || 0) + 16, _ = 6, R = c.offsetTop, U = R + c.clientHeight, te = a.scrollTop + k, ne = a.scrollTop + a.clientHeight - _;
187
+ R < te ? a.scrollTop = R - k : U > ne && (a.scrollTop = U - a.clientHeight + _);
175
188
  });
176
- }, I = U(
177
- () => h.value[m.value]
178
- ), X = (o) => {
179
- !I.value || r.value || (o.preventDefault(), o.stopPropagation(), H(I.value));
180
- }, q = (o) => {
181
- C.open && o != null && o.closeModal && p();
182
- }, Y = (o) => {
189
+ }, I = O(
190
+ () => x.value[i.value]
191
+ ), ee = (o) => {
192
+ !I.value || m.value || (o.preventDefault(), o.stopPropagation(), B(I.value));
193
+ }, $ = (o) => {
194
+ h.open && o != null && o.closeModal && f();
195
+ }, oe = (o) => {
183
196
  var e;
184
197
  if (o.trim().toLowerCase().startsWith("curl")) {
185
- d.commandPalette.emit({
198
+ p.commandPalette.emit({
186
199
  commandName: "Import from cURL",
187
200
  metaData: {
188
- parsedCurl: he(o),
189
- collectionUid: (e = Q.value) == null ? void 0 : e.uid
201
+ parsedCurl: ye(o),
202
+ collectionUid: (e = X.value) == null ? void 0 : e.uid
190
203
  }
191
204
  });
192
205
  return;
193
206
  }
194
207
  s.value = o;
195
208
  };
196
- return ne(() => {
197
- d.commandPalette.on(K), d.hotKeys.on(q);
198
- }), ae(() => {
199
- d.commandPalette.off(K), d.hotKeys.off(q);
200
- }), (o, e) => (l(), W(c(ue), {
201
- open: c(C).open,
202
- onClose: e[5] || (e[5] = (t) => p())
209
+ return re(() => {
210
+ p.commandPalette.on(H), p.hotKeys.on($);
211
+ }), se(() => {
212
+ p.commandPalette.off(H), p.hotKeys.off($);
213
+ }), (o, e) => (r(), F(u(fe), {
214
+ open: u(h).open,
215
+ onClose: e[5] || (e[5] = (t) => f())
203
216
  }, {
204
217
  default: A(() => [
205
- e[7] || (e[7] = v("div", { class: "commandmenu-overlay z-overlay" }, null, -1)),
206
- k(c(de), { class: "commandmenu z-overlay flex flex-col" }, {
218
+ e[7] || (e[7] = C("div", { class: "commandmenu-overlay z-overlay" }, null, -1)),
219
+ y(u(ve), { class: "commandmenu z-overlay flex flex-col" }, {
207
220
  default: A(() => [
208
- k(c(pe), { class: "sr-only" }, {
221
+ y(u(Ce), { class: "sr-only" }, {
209
222
  default: A(() => e[6] || (e[6] = [
210
- V("API Client Command Menu")
223
+ G("API Client Command Menu")
211
224
  ])),
212
225
  _: 1
213
226
  }),
214
- r.value ? (l(), u("div", Be, [
215
- v("button", {
216
- class: "hover:bg-b-3 text-c-3 active:text-c-1 absolute z-1 my-1.25 mr-1.5 rounded p-0.75",
227
+ m.value ? (r(), d("div", Be, [
228
+ C("button", {
229
+ class: "hover:bg-b-3 text-c-3 active:text-c-1 absolute z-1 mt-[0.5px] rounded p-1.5",
217
230
  type: "button",
218
- onClick: e[3] || (e[3] = (t) => r.value = null)
231
+ onClick: e[3] || (e[3] = (t) => m.value = null)
219
232
  }, [
220
- k(c(L), {
233
+ y(u(L), {
221
234
  icon: "ChevronLeft",
222
235
  size: "md",
223
236
  thickness: "1.5"
224
237
  })
225
238
  ]),
226
- (l(), W(ie(Ke[r.value]), ce(P.value ? { metaData: P.value } : {}, {
227
- onBack: e[4] || (e[4] = (t) => J(t)),
228
- onClose: p
239
+ (r(), F(de(Ke[m.value]), pe(P.value ? { metaData: P.value } : {}, {
240
+ onBack: e[4] || (e[4] = (t) => Z(t)),
241
+ onClose: f
229
242
  }), null, 16))
230
- ])) : (l(), u("div", Ae, [
231
- v("div", Se, [
232
- v("label", Te, [
233
- k(c(L), {
243
+ ])) : (r(), d("div", Te, [
244
+ C("div", De, [
245
+ C("label", Le, [
246
+ y(u(L), {
234
247
  class: "text-c-2 mr-2.5",
235
248
  icon: "Search",
236
249
  size: "md",
237
250
  thickness: "1.5"
238
251
  })
239
252
  ]),
240
- v("input", {
253
+ C("input", {
241
254
  id: "commandmenu",
242
255
  ref_key: "commandInputRef",
243
256
  ref: g,
@@ -247,56 +260,56 @@ const Ae = {
247
260
  placeholder: "Search commands...",
248
261
  type: "text",
249
262
  value: s.value,
250
- onInput: e[0] || (e[0] = (t) => Y(t.target.value)),
263
+ onInput: e[0] || (e[0] = (t) => oe(t.target.value)),
251
264
  onKeydown: [
252
- e[1] || (e[1] = S(T((t) => $("down", t), ["stop"]), ["down"])),
253
- S(T(X, ["stop"]), ["enter"]),
254
- e[2] || (e[2] = S(T((t) => $("up", t), ["stop"]), ["up"]))
265
+ e[1] || (e[1] = S(T((t) => K("down", t), ["stop"]), ["down"])),
266
+ S(T(ee, ["stop"]), ["enter"]),
267
+ e[2] || (e[2] = S(T((t) => K("up", t), ["stop"]), ["up"]))
255
268
  ]
256
- }, null, 40, De)
269
+ }, null, 40, Ee)
257
270
  ]),
258
- (l(), u(D, null, O(E, (t) => (l(), u(D, {
271
+ (r(), d(D, null, Q(q, (t) => (r(), d(D, {
259
272
  key: t.label
260
273
  }, [
261
- se(v("div", { class: "text-c-3 mt-2 mb-1 px-2 text-xs font-medium" }, F(t.label), 513), [
274
+ ie(C("div", { class: "text-c-3 mt-2 mb-1 px-2 text-xs font-medium" }, j(t.label), 513), [
262
275
  [
263
- re,
276
+ ce,
264
277
  t.commands.filter(
265
278
  (n) => n.name.toLowerCase().includes(s.value.toLowerCase())
266
279
  ).length > 0
267
280
  ]
268
281
  ]),
269
- (l(!0), u(D, null, O(t.commands.filter(
282
+ (r(!0), d(D, null, Q(t.commands.filter(
270
283
  (n) => n.name.toLowerCase().includes(s.value.toLowerCase())
271
284
  ), (n) => {
272
285
  var a;
273
- return l(), u("div", {
286
+ return r(), d("div", {
274
287
  key: n.name,
275
288
  ref_for: !0,
276
- ref: (i) => {
277
- if (i) {
278
- const x = h.value.findIndex(
289
+ ref: (c) => {
290
+ if (c) {
291
+ const k = x.value.findIndex(
279
292
  (_) => _.name === n.name
280
293
  );
281
- x !== -1 && (B.value[x] = i);
294
+ k !== -1 && (M.value[k] = c);
282
295
  }
283
296
  },
284
- class: me(["commandmenu-item hover:bg-b-2 flex cursor-pointer items-center rounded px-2 py-1.5 text-sm", {
297
+ class: ue(["commandmenu-item hover:bg-b-2 flex cursor-pointer items-center rounded px-2 py-1.5 text-sm", {
285
298
  "bg-b-2": n.name === ((a = I.value) == null ? void 0 : a.name)
286
299
  }]),
287
- onClick: (i) => H(n)
300
+ onClick: (c) => B(n)
288
301
  }, [
289
- k(c(L), {
302
+ y(u(L), {
290
303
  class: "text-c-2 mr-2.5",
291
304
  icon: n.icon,
292
305
  size: "md",
293
306
  thickness: "1.5"
294
307
  }, null, 8, ["icon"]),
295
- V(" " + F(n.name), 1)
296
- ], 10, Le);
308
+ G(" " + j(n.name), 1)
309
+ ], 10, qe);
297
310
  }), 128))
298
311
  ], 64))), 64)),
299
- h.value.length ? le("", !0) : (l(), u("div", Ee, " No commands found "))
312
+ x.value.length ? me("", !0) : (r(), d("div", Me, " No commands found "))
300
313
  ]))
301
314
  ]),
302
315
  _: 1
@@ -308,5 +321,5 @@ const Ae = {
308
321
  });
309
322
  export {
310
323
  Ke as PaletteComponents,
311
- eo as default
324
+ to as default
312
325
  };
@@ -1,21 +1,21 @@
1
- import { defineComponent as t, createBlock as o, openBlock as a, resolveDynamicComponent as n, mergeProps as s, unref as l, withCtx as p, renderSlot as d } from "vue";
2
- import { useBindCx as m } from "@scalar/components";
1
+ import { defineComponent as t, createBlock as o, openBlock as a, resolveDynamicComponent as n, mergeProps as s, unref as l, withCtx as p, renderSlot as b } from "vue";
2
+ import { useBindCx as d } from "@scalar/components";
3
3
  const f = /* @__PURE__ */ t({
4
4
  inheritAttrs: !1,
5
5
  __name: "DataTableCell",
6
6
  props: {
7
7
  is: { default: "td" }
8
8
  },
9
- setup(b) {
10
- const { cx: e } = m();
11
- return (r, i) => (a(), o(n(r.is), s(
12
- l(e)(
13
- "box-content max-h-8 min-h-8 min-w-8 border-l-0 border-t border-b-0 border-r flex text-sm last:border-r-0 group-last:border-b-transparent p-0 m-0 relative"
9
+ setup(i) {
10
+ const { cx: r } = d();
11
+ return (e, m) => (a(), o(n(e.is), s(
12
+ l(r)(
13
+ "box-content max-h-8 min-h-8 min-w-8 border-l-0 border-t border-b-0 border-r flex text-base last:border-r-0 group-last:border-b-transparent p-0 m-0 relative"
14
14
  ),
15
15
  { class: "group-[.alert]:bg-b-alert group-[.error]:bg-b-danger" }
16
16
  ), {
17
17
  default: p(() => [
18
- d(r.$slots, "default")
18
+ b(e.$slots, "default")
19
19
  ]),
20
20
  _: 3
21
21
  }, 16));
@@ -1 +1 @@
1
- {"version":3,"file":"DataTableInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/Data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W,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,SAAS,EAAE,SAAS,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAChC,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB,CAAC;AAsDJ,iBAAS,cAAc;WA6OT,OAAO,IAA6B;;yBAXrB,GAAG;yBACF,GAAG;sBACN,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAkE+sI,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EApDl2I;AAoBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;cA1UN,OAAO;cAIP,OAAO;kBAQH,OAAO;2BATE,OAAO;6EA+UjC,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAepG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import t from "./DataTableInput.vue2.js";
2
2
  /* empty css */
3
3
  import a from "../../_virtual/_plugin-vue_export-helper.js";
4
- const f = /* @__PURE__ */ a(t, [["__scopeId", "data-v-a8683fd7"]]);
4
+ const e = /* @__PURE__ */ a(t, [["__scopeId", "data-v-f7d71ae7"]]);
5
5
  export {
6
- f as default
6
+ e as default
7
7
  };
@@ -10,9 +10,9 @@ import { useUrlPrefetcher as ae } from "./hooks/useUrlPrefetcher.js";
10
10
  import de from "./ImportNowButton.vue.js";
11
11
  import me from "./IntegrationLogo.vue.js";
12
12
  import ue from "./PrefetchError.vue.js";
13
- import { getOpenApiDocumentVersion as T } from "./utils/getOpenApiDocumentVersion.js";
14
- import { isDocument as U } from "./utils/isDocument.js";
15
- import { isUrl as A } from "./utils/isUrl.js";
13
+ import { getOpenApiVersion as T } from "./utils/get-openapi-version.js";
14
+ import { isDocument as U } from "./utils/is-document.js";
15
+ import { isUrl as A } from "./utils/is-url.js";
16
16
  import fe from "./WorkspaceSelector.vue.js";
17
17
  import { useActiveEntities as pe } from "../../store/active-entities.js";
18
18
  import { useWorkspace as ve } from "../../store/store.js";
@@ -37,8 +37,8 @@ const he = ["innerHTML"], xe = { class: "relative flex h-screen flex-col justify
37
37
  },
38
38
  emits: ["importFinished"],
39
39
  setup(C, { emit: P }) {
40
- const s = C, D = P, { activeWorkspace: p } = pe(), { workspaceMutators: V, events: j } = ve(), { prefetchResult: n, prefetchUrl: w, resetPrefetchResult: S } = ae(), r = Z(), h = W(!0);
41
- j.hotKeys.on(() => r.hide());
40
+ const s = C, V = P, { activeWorkspace: p } = pe(), { workspaceMutators: j, events: D } = ve(), { prefetchResult: n, prefetchUrl: w, resetPrefetchResult: S } = ae(), r = Z(), h = W(!0);
41
+ D.hotKeys.on(() => r.hide());
42
42
  const z = a(() => {
43
43
  try {
44
44
  return se(
@@ -106,11 +106,11 @@ const he = ["innerHTML"], xe = { class: "relative flex h-screen flex-col justify
106
106
  function q() {
107
107
  var c;
108
108
  const o = (u) => re.includes(u), t = s.integration && o(s.integration) ? s.integration : "default";
109
- y.value && V.edit(
109
+ y.value && j.edit(
110
110
  (c = p.value) == null ? void 0 : c.uid,
111
111
  "themeId",
112
112
  t
113
- ), D("importFinished");
113
+ ), V("importFinished");
114
114
  }
115
115
  return (o, t) => (l(), J(i(ee), {
116
116
  size: "full",
@@ -10,7 +10,7 @@ const a = { class: "w-full text-center text-sm font-medium break-words" }, u = [
10
10
  },
11
11
  setup(p) {
12
12
  return (t, e) => (o(), n("div", a, [
13
- e[0] || (e[0] = r(" We couldnt find an OpenAPI document at the provided URL. Please download and import the ")),
13
+ e[0] || (e[0] = r(" We couldn't find an OpenAPI document at the provided URL. Please download and import the ")),
14
14
  t.url && d(s)(t.url) ? (o(), n("a", {
15
15
  key: 0,
16
16
  href: t.url,
@@ -4,7 +4,7 @@ import { useToasts as I } from "@scalar/use-toasts";
4
4
  import { useRouter as F } from "vue-router";
5
5
  import { useActiveEntities as L } from "../../store/active-entities.js";
6
6
  import { useWorkspace as P } from "../../store/store.js";
7
- const R = { class: "flex w-[inherit] items-center text-sm" }, U = { class: "m-0 flex items-center gap-1 text-sm font-medium" }, q = { class: "line-clamp-1 w-[calc(100%-10px)] text-left text-xs" }, G = { class: "overflow-hidden text-ellipsis" }, H = { class: "flex h-4 w-4 items-center justify-center" }, ee = /* @__PURE__ */ W({
7
+ const R = { class: "flex w-[inherit] items-center text-base" }, U = { class: "m-0 flex items-center gap-1 text-sm font-medium" }, q = { class: "line-clamp-1 w-[calc(100%-10px)] text-left text-xs" }, G = { class: "overflow-hidden text-ellipsis" }, H = { class: "flex h-4 w-4 items-center justify-center" }, ee = /* @__PURE__ */ W({
8
8
  __name: "WorkspaceSelector",
9
9
  setup(J) {
10
10
  const { activeWorkspace: i } = L(), { workspaces: g, workspaceMutators: C } = P(), { push: f } = F(), c = E(), { toast: x } = I(), l = D(""), y = (n) => {
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Get the Swagger/OpenAPI version and format from the given string
3
+ */
4
+ export declare function getOpenApiVersion(input: string | null): string | false;
5
+ //# sourceMappingURL=get-openapi-version.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-openapi-version.d.ts","sourceRoot":"","sources":["../../../../src/components/ImportCollection/utils/get-openapi-version.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,kBAsCrD"}
@@ -0,0 +1,20 @@
1
+ import { parse as n } from "yaml";
2
+ import { isDocument as t } from "./is-document.js";
3
+ function o(e) {
4
+ if (!t(e))
5
+ return !1;
6
+ try {
7
+ const r = JSON.parse(e ?? "");
8
+ return typeof (r == null ? void 0 : r.openapi) == "string" ? `OpenAPI ${r.openapi} JSON` : typeof (r == null ? void 0 : r.swagger) == "string" ? `Swagger ${r.swagger} JSON` : !1;
9
+ } catch {
10
+ }
11
+ try {
12
+ const r = n(e ?? "");
13
+ return typeof (r == null ? void 0 : r.openapi) == "string" ? `OpenAPI ${r.openapi} YAML` : typeof (r == null ? void 0 : r.swagger) == "string" ? `Swagger ${r.swagger} YAML` : !1;
14
+ } catch {
15
+ }
16
+ return !1;
17
+ }
18
+ export {
19
+ o as getOpenApiVersion
20
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=get-openapi-version.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-openapi-version.test.d.ts","sourceRoot":"","sources":["../../../../src/components/ImportCollection/utils/get-openapi-version.test.ts"],"names":[],"mappings":""}
@@ -1,4 +1,4 @@
1
- import { isUrl as f } from "./isUrl.js";
1
+ import { isUrl as f } from "./is-url.js";
2
2
  async function U({
3
3
  store: t,
4
4
  workspace: i,
@@ -1,3 +1,3 @@
1
1
  /** Checks whether the given string could be an OpenAPI document */
2
- export declare function isDocument(input: string | null): boolean | "" | null;
3
- //# sourceMappingURL=isDocument.d.ts.map
2
+ export declare function isDocument(input: string | null): boolean;
3
+ //# sourceMappingURL=is-document.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-document.d.ts","sourceRoot":"","sources":["../../../../src/components/ImportCollection/utils/is-document.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAcxD"}
@@ -0,0 +1,9 @@
1
+ function e(t) {
2
+ if (!t || t.trim().length === 0)
3
+ return !1;
4
+ const r = t.trim();
5
+ return !(r.startsWith("http://") || r.startsWith("https://"));
6
+ }
7
+ export {
8
+ e as isDocument
9
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=is-document.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-document.test.d.ts","sourceRoot":"","sources":["../../../../src/components/ImportCollection/utils/is-document.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Checks whether the given string is an URL
3
+ **/
4
+ export declare function isUrl(input: string | null): boolean;
5
+ //# sourceMappingURL=is-url.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-url.d.ts","sourceRoot":"","sources":["../../../../src/components/ImportCollection/utils/is-url.ts"],"names":[],"mappings":"AAAA;;IAEI;AACJ,wBAAgB,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAgBnD"}
@@ -0,0 +1,9 @@
1
+ function e(r) {
2
+ if (!r)
3
+ return !1;
4
+ const t = r.trim();
5
+ return !t.startsWith("http://") && !t.startsWith("https://") ? !1 : t.replace(/^https?:\/\//, "").length > 0;
6
+ }
7
+ export {
8
+ e as isUrl
9
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=is-url.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-url.test.d.ts","sourceRoot":"","sources":["../../../../src/components/ImportCollection/utils/is-url.test.ts"],"names":[],"mappings":""}
@@ -1,7 +1,7 @@
1
1
  import t from "./OpenApiClientButton.vue2.js";
2
2
  /* empty css */
3
3
  import o from "../_virtual/_plugin-vue_export-helper.js";
4
- const a = /* @__PURE__ */ o(t, [["__scopeId", "data-v-e913a538"]]);
4
+ const i = /* @__PURE__ */ o(t, [["__scopeId", "data-v-210c4985"]]);
5
5
  export {
6
- a as default
6
+ i as default
7
7
  };