@scalar/api-client 2.2.4 → 2.2.6

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 (77) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/dist/components/AddressBar/AddressBarServer.vue.d.ts.map +1 -1
  3. package/dist/components/AddressBar/AddressBarServer.vue.js +15 -15
  4. package/dist/components/CommandPalette/CommandPaletteExample.vue.js +1 -1
  5. package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts.map +1 -1
  6. package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +24 -24
  7. package/dist/components/CommandPalette/CommandPaletteServer.vue.js +2 -2
  8. package/dist/components/CommandPalette/CommandPaletteTag.vue.js +5 -5
  9. package/dist/components/DataTable/DataTableCheckbox.vue.d.ts.map +1 -1
  10. package/dist/components/DataTable/DataTableCheckbox.vue.js +5 -6
  11. package/dist/components/DataTable/DataTableInputSelect.vue.d.ts.map +1 -1
  12. package/dist/components/DataTable/DataTableInputSelect.vue.js +8 -8
  13. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
  14. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +9 -10
  15. package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
  16. package/dist/components/HttpMethod/HttpMethod.vue.js +2 -2
  17. package/dist/components/HttpMethod/HttpMethod.vue2.js +16 -17
  18. package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts.map +1 -1
  19. package/dist/components/ImportCollection/ImportCollectionModal.vue.js +85 -84
  20. package/dist/components/ImportCollection/WorkspaceSelector.vue.d.ts.map +1 -1
  21. package/dist/components/ImportCollection/WorkspaceSelector.vue.js +24 -26
  22. package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts +6 -0
  23. package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts.map +1 -1
  24. package/dist/components/ImportCollection/hooks/useUrlPrefetcher.js +28 -23
  25. package/dist/components/OpenApiClientButton.vue.d.ts.map +1 -1
  26. package/dist/components/OpenApiClientButton.vue.js +1 -1
  27. package/dist/components/OpenApiClientButton.vue2.js +16 -16
  28. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
  29. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +5 -6
  30. package/dist/layouts/App/create-api-client-app.d.ts +1 -0
  31. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  32. package/dist/layouts/Modal/create-api-client-modal.d.ts +2 -0
  33. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  34. package/dist/layouts/Web/create-api-client-web.d.ts +1 -0
  35. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  36. package/dist/libs/create-client.d.ts +2 -1
  37. package/dist/libs/create-client.d.ts.map +1 -1
  38. package/dist/libs/create-client.js +36 -35
  39. package/dist/store/store.d.ts +3 -1
  40. package/dist/store/store.d.ts.map +1 -1
  41. package/dist/store/store.js +47 -45
  42. package/dist/style.css +1 -1
  43. package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
  44. package/dist/views/Cookies/Cookies.vue2.js +18 -20
  45. package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
  46. package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +13 -13
  47. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +1 -1
  48. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +20 -19
  49. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
  50. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +1 -1
  51. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +2 -2
  52. package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
  53. package/dist/views/Request/RequestSection/RequestBody.vue.js +1 -1
  54. package/dist/views/Request/RequestSection/RequestBody.vue2.js +12 -14
  55. package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
  56. package/dist/views/Request/RequestSidebar.vue.js +3 -3
  57. package/dist/views/Request/RequestSidebar.vue2.js +60 -61
  58. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  59. package/dist/views/Request/RequestSidebarItem.vue.js +1 -1
  60. package/dist/views/Request/RequestSidebarItem.vue2.js +187 -195
  61. package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -1
  62. package/dist/views/Request/RequestSubpageHeader.vue.js +1 -1
  63. package/dist/views/Request/RequestSubpageHeader.vue2.js +24 -28
  64. package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.d.ts.map +1 -1
  65. package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.js +1 -1
  66. package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue2.js +5 -5
  67. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
  68. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +2 -2
  69. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +30 -25
  70. package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.d.ts.map +1 -1
  71. package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.js +41 -30
  72. package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
  73. package/dist/views/Request/components/WorkspaceDropdown.vue.js +2 -4
  74. package/dist/views/Request/libs/oauth2.d.ts +6 -2
  75. package/dist/views/Request/libs/oauth2.d.ts.map +1 -1
  76. package/dist/views/Request/libs/oauth2.js +43 -37
  77. package/package.json +13 -14
@@ -1,29 +1,29 @@
1
- import { defineComponent as F, ref as B, computed as l, watch as x, onMounted as q, onUnmounted as H, openBlock as c, createBlock as R, unref as r, withCtx as W, createElementBlock as a, createCommentVNode as p, createElementVNode as e, normalizeClass as K, Fragment as y, createVNode as d, toDisplayString as G, createTextVNode as I } from "vue";
2
- import J from "../CommandPalette/WatchModeToggle.vue.js";
3
- import Q from "./ImportNowButton.vue.js";
4
- import X from "./IntegrationLogo.vue.js";
5
- import Y from "./PrefetchError.vue.js";
6
- import Z from "./WorkspaceSelector.vue.js";
7
- import { useUrlPrefetcher as ee } from "./hooks/useUrlPrefetcher.js";
8
- import { getOpenApiDocumentVersion as L } from "./utils/getOpenApiDocumentVersion.js";
9
- import { isDocument as M } from "./utils/isDocument.js";
10
- import { isUrl as A } from "./utils/isUrl.js";
11
- import { useActiveEntities as te } from "../../store/active-entities.js";
12
- import { useModal as oe, ScalarModal as se, ScalarIcon as ne } from "@scalar/components";
13
- import { isLocalUrl as ie } from "@scalar/oas-utils/helpers";
14
- import { normalize as re } from "@scalar/openapi-parser";
15
- import { getThemeStyles as le } from "@scalar/themes";
16
- import { useWorkspace as ce } from "../../store/store.js";
17
- const ae = ["innerHTML"], de = { class: "flex flex-col h-screen justify-center px-6 overflow-hidden relative md:px-0" }, me = {
1
+ import { defineComponent as B, ref as q, computed as l, watch as y, onMounted as H, onUnmounted as R, openBlock as c, createBlock as W, unref as r, withCtx as K, createElementBlock as a, createCommentVNode as p, createElementVNode as e, normalizeClass as G, Fragment as _, createVNode as d, toDisplayString as J, createTextVNode as L } from "vue";
2
+ import Q from "../CommandPalette/WatchModeToggle.vue.js";
3
+ import X from "./ImportNowButton.vue.js";
4
+ import Y from "./IntegrationLogo.vue.js";
5
+ import Z from "./PrefetchError.vue.js";
6
+ import ee from "./WorkspaceSelector.vue.js";
7
+ import { useUrlPrefetcher as te } from "./hooks/useUrlPrefetcher.js";
8
+ import { getOpenApiDocumentVersion as M } from "./utils/getOpenApiDocumentVersion.js";
9
+ import { isDocument as A } from "./utils/isDocument.js";
10
+ import { isUrl as T } from "./utils/isUrl.js";
11
+ import { useActiveEntities as oe } from "../../store/active-entities.js";
12
+ import { useModal as se, ScalarModal as ne, ScalarIcon as ie } from "@scalar/components";
13
+ import { isLocalUrl as re } from "@scalar/oas-utils/helpers";
14
+ import { normalize as le } from "@scalar/openapi-parser";
15
+ import { getThemeStyles as ce } from "@scalar/themes";
16
+ import { useWorkspace as ae } from "../../store/store.js";
17
+ const de = ["innerHTML"], me = { class: "flex flex-col h-screen justify-center px-6 overflow-hidden relative md:px-0" }, ue = {
18
18
  key: 0,
19
19
  class: "flex justify-center items-center mb-2 p-1"
20
- }, ue = { class: "rounded-xl size-10" }, pe = { class: "text-center text-md font-bold mb-2 line-clamp-1" }, fe = { class: "inline-flex flex-col gap-2 items-center z-10 w-full" }, ve = { class: "flex justify-center" }, he = { class: "inline-flex py-1 px-4 items-center text-xs font-medium text-c-3" }, xe = {
20
+ }, pe = { class: "rounded-xl size-10" }, fe = { class: "text-center text-md font-bold mb-2 line-clamp-1" }, ve = { class: "inline-flex flex-col gap-2 items-center z-10 w-full" }, he = { class: "flex justify-center" }, xe = { class: "inline-flex py-1 px-4 items-center text-xs font-medium text-c-3" }, ye = {
21
21
  key: 0,
22
22
  class: "text-sm overflow-hidden mt-5 pt-4 border-t-1/2"
23
- }, ye = { class: "flex items-center justify-center" }, _e = { class: "flex flex-col justify-center items-center pb-8" }, be = { class: "text-center flex items-center flex-col" }, ge = { class: "mb-2 w-10 h-10 border rounded-[10px] flex items-center justify-center" }, we = {
23
+ }, _e = { class: "flex items-center justify-center" }, be = { class: "flex flex-col justify-center items-center pb-8" }, ge = { class: "text-center flex items-center flex-col" }, we = { class: "mb-2 w-10 h-10 border rounded-[10px] flex items-center justify-center" }, ke = {
24
24
  href: "https://scalar.com/download",
25
25
  target: "_blank"
26
- }, $e = /* @__PURE__ */ F({
26
+ }, Ee = /* @__PURE__ */ B({
27
27
  __name: "ImportCollectionModal",
28
28
  props: {
29
29
  source: {},
@@ -31,83 +31,84 @@ const ae = ["innerHTML"], de = { class: "flex flex-col h-screen justify-center p
31
31
  eventType: {}
32
32
  },
33
33
  emits: ["importFinished"],
34
- setup(T, { emit: U }) {
35
- const o = T, P = U, { activeWorkspace: m } = te(), { workspaceMutators: C, events: D } = ce(), { prefetchResult: n, prefetchUrl: _, resetPrefetchResult: V } = ee(), i = oe(), f = B(!0);
36
- D.hotKeys.on(() => i.hide());
37
- const S = l(() => {
34
+ setup(U, { emit: P }) {
35
+ const o = U, C = P, { activeWorkspace: m } = oe(), { workspaceMutators: D, events: V } = ae(), { prefetchResult: n, prefetchUrl: b, resetPrefetchResult: S } = te(), i = se(), f = q(!0);
36
+ V.hotKeys.on(() => i.hide());
37
+ const j = l(() => {
38
38
  try {
39
- return re(
39
+ return le(
40
40
  n.content || o.source || ""
41
41
  );
42
42
  } catch {
43
43
  return;
44
44
  }
45
- }), j = l(() => {
45
+ }), z = l(() => {
46
46
  var s, t;
47
- return (t = (s = S.value) == null ? void 0 : s.info) == null ? void 0 : t.title;
48
- }), b = l(
49
- () => L(n.content || o.source || "")
47
+ return (t = (s = j.value) == null ? void 0 : s.info) == null ? void 0 : t.title;
48
+ }), g = l(
49
+ () => M(n.content || o.source || "")
50
50
  );
51
- x(
51
+ y(
52
52
  () => o.source,
53
53
  async (s) => {
54
- if (V(), A(s)) {
54
+ var t;
55
+ if (S(), T(s)) {
55
56
  if (o.eventType && ["paste", "drop"].includes(o.eventType)) {
56
- const { error: u } = await _(
57
+ const { error: u } = await b(
57
58
  s,
58
- m.value.proxyUrl
59
+ (t = m.value) == null ? void 0 : t.proxyUrl
59
60
  );
60
61
  u ? i.hide() : i.show();
61
62
  return;
62
63
  }
63
- _(s, m.value.proxyUrl), i.show();
64
+ b(s, m.value.proxyUrl), i.show();
64
65
  return;
65
66
  }
66
- s && M(s) && L(s) ? i.show() : i.hide();
67
+ s && A(s) && M(s) ? i.show() : i.hide();
67
68
  }
68
69
  );
69
- const z = l(() => !!o.source && A(o.source)), N = l(() => !!o.source && M(o.source)), v = l(() => n.url && ie(n.url)), h = (s) => {
70
- document.body.classList.remove("has-no-import-url"), (z.value || N.value) && i.open ? document.body.classList.add("has-import-url") : document.body.classList.remove("has-import-url");
71
- }, O = () => {
70
+ const N = l(() => !!o.source && T(o.source)), O = l(() => !!o.source && A(o.source)), v = l(() => n.url && re(n.url)), h = (s) => {
71
+ document.body.classList.remove("has-no-import-url"), (N.value || O.value) && i.open ? document.body.classList.add("has-import-url") : document.body.classList.remove("has-import-url");
72
+ }, $ = () => {
72
73
  document.body.classList.remove("has-import-url"), document.body.classList.add("has-no-import-url");
73
74
  };
74
- x(
75
+ y(
75
76
  () => i.open,
76
77
  (s) => {
77
- s ? h() : O();
78
+ s ? h() : $();
78
79
  }
79
- ), x(
80
+ ), y(
80
81
  () => o.source,
81
82
  () => {
82
83
  h();
83
84
  }
84
- ), q(() => {
85
+ ), H(() => {
85
86
  h();
86
- }), H(() => {
87
+ }), R(() => {
87
88
  document.body.classList.remove("has-import-url"), document.body.classList.remove("has-no-import-url");
88
89
  });
89
- const g = l(
90
- () => m.value && v.value && o.integration && `<style>${le(o.integration)}</style>`
90
+ const w = l(
91
+ () => m.value && v.value && o.integration && `<style>${ce(o.integration)}</style>`
91
92
  );
92
- function $() {
93
- v.value && o.integration && C.edit(
93
+ function E() {
94
+ v.value && o.integration && D.edit(
94
95
  m.value.uid,
95
96
  "themeId",
96
97
  o.integration
97
- ), P("importFinished");
98
+ ), C("importFinished");
98
99
  }
99
- return (s, t) => (c(), R(r(se), {
100
+ return (s, t) => (c(), W(r(ne), {
100
101
  size: "full",
101
102
  state: r(i)
102
103
  }, {
103
- default: W(() => {
104
- var u, w, k;
104
+ default: K(() => {
105
+ var x, u, k, I;
105
106
  return [
106
- g.value ? (c(), a("div", {
107
+ w.value ? (c(), a("div", {
107
108
  key: 0,
108
- innerHTML: g.value
109
- }, null, 8, ae)) : p("", !0),
110
- e("div", de, [
109
+ innerHTML: w.value
110
+ }, null, 8, de)) : p("", !0),
111
+ e("div", me, [
111
112
  t[6] || (t[6] = e("div", { class: "section-flare" }, [
112
113
  e("div", { class: "section-flare-item" }),
113
114
  e("div", { class: "section-flare-item" }),
@@ -119,41 +120,41 @@ const ae = ["innerHTML"], de = { class: "flex flex-col h-screen justify-center p
119
120
  e("div", { class: "section-flare-item" })
120
121
  ], -1)),
121
122
  e("div", {
122
- class: K(["flex items-center flex-col m-auto px-8 py-8 rounded-xl border-1/2 max-w-[380px] w-full transition-opacity", { "opacity-0": r(n).state === "loading" }])
123
+ class: G(["flex items-center flex-col m-auto px-8 py-8 rounded-xl border-1/2 max-w-[380px] w-full transition-opacity", { "opacity-0": r(n).state === "loading" }])
123
124
  }, [
124
- r(n).error && r(n).state === "idle" && !b.value ? (c(), a(y, { key: 0 }, [
125
+ r(n).error && r(n).state === "idle" && !g.value ? (c(), a(_, { key: 0 }, [
125
126
  t[1] || (t[1] = e("div", { class: "text-center text-md font-bold mb-2 line-clamp-1" }, " No OpenAPI document found ", -1)),
126
- d(Y, {
127
- url: ((u = r(n)) == null ? void 0 : u.input) || o.source
127
+ d(Z, {
128
+ url: ((x = r(n)) == null ? void 0 : x.input) || o.source
128
129
  }, null, 8, ["url"])
129
- ], 64)) : (c(), a(y, { key: 1 }, [
130
- v.value ? (c(), a("div", me, [
131
- e("div", ue, [
132
- d(X, { integration: s.integration }, null, 8, ["integration"])
130
+ ], 64)) : (c(), a(_, { key: 1 }, [
131
+ v.value ? (c(), a("div", ue, [
132
+ e("div", pe, [
133
+ d(Y, { integration: s.integration }, null, 8, ["integration"])
133
134
  ])
134
135
  ])) : p("", !0),
135
- e("div", pe, G(j.value || "Untitled Collection"), 1),
136
+ e("div", fe, J(z.value || "Untitled Collection"), 1),
136
137
  t[4] || (t[4] = e("div", { class: "text-c-1 text-sm font-medium text-center text-balance" }, " Import the OpenAPI document to instantly send API requests. No signup required. ", -1)),
137
- b.value ? (c(), a(y, { key: 1 }, [
138
- e("div", fe, [
139
- d(Q, {
140
- source: ((w = r(n)) == null ? void 0 : w.url) ?? s.source,
138
+ g.value ? (c(), a(_, { key: 1 }, [
139
+ e("div", ve, [
140
+ d(X, {
141
+ source: ((u = r(n)) == null ? void 0 : u.url) ?? ((k = r(n)) == null ? void 0 : k.content) ?? s.source,
141
142
  variant: "button",
142
143
  watchMode: f.value,
143
- onImportFinished: $
144
+ onImportFinished: E
144
145
  }, null, 8, ["source", "watchMode"])
145
146
  ]),
146
- e("div", ve, [
147
- e("div", he, [
148
- t[2] || (t[2] = I(" Import to: ")),
149
- d(Z)
147
+ e("div", he, [
148
+ e("div", xe, [
149
+ t[2] || (t[2] = L(" Import to: ")),
150
+ d(ee)
150
151
  ])
151
152
  ]),
152
- (k = r(n)) != null && k.url ? (c(), a("div", xe, [
153
- e("div", ye, [
154
- d(J, {
153
+ (I = r(n)) != null && I.url ? (c(), a("div", ye, [
154
+ e("div", _e, [
155
+ d(Q, {
155
156
  modelValue: f.value,
156
- "onUpdate:modelValue": t[0] || (t[0] = (E) => f.value = E),
157
+ "onUpdate:modelValue": t[0] || (t[0] = (F) => f.value = F),
157
158
  disableToolTip: !0
158
159
  }, null, 8, ["modelValue"])
159
160
  ]),
@@ -162,11 +163,11 @@ const ae = ["innerHTML"], de = { class: "flex flex-col h-screen justify-center p
162
163
  ], 64)) : p("", !0)
163
164
  ], 64))
164
165
  ], 2),
165
- e("div", _e, [
166
- e("div", be, [
167
- e("div", ge, [
168
- e("a", we, [
169
- d(r(ne), {
166
+ e("div", be, [
167
+ e("div", ge, [
168
+ e("div", we, [
169
+ e("a", ke, [
170
+ d(r(ie), {
170
171
  icon: "Logo",
171
172
  size: "xl"
172
173
  })
@@ -179,7 +180,7 @@ const ae = ["innerHTML"], de = { class: "flex flex-col h-screen justify-center p
179
180
  target: "_blank"
180
181
  }, " Download Desktop App "),
181
182
  e("br"),
182
- I(" free · open-source · offline first ")
183
+ L(" free · open-source · offline first ")
183
184
  ], -1))
184
185
  ])
185
186
  ])
@@ -191,5 +192,5 @@ const ae = ["innerHTML"], de = { class: "flex flex-col h-screen justify-center p
191
192
  }
192
193
  });
193
194
  export {
194
- $e as default
195
+ Ee as default
195
196
  };
@@ -1 +1 @@
1
- {"version":3,"file":"WorkspaceSelector.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ImportCollection/WorkspaceSelector.vue"],"names":[],"mappings":";AA+bA,wBAKG"}
1
+ {"version":3,"file":"WorkspaceSelector.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ImportCollection/WorkspaceSelector.vue"],"names":[],"mappings":";AA2bA,wBAKG"}
@@ -1,6 +1,6 @@
1
- import { defineComponent as y, ref as W, openBlock as d, createElementBlock as x, Fragment as w, createElementVNode as t, createVNode as s, unref as e, withCtx as o, renderList as D, createBlock as N, withModifiers as k, normalizeClass as M, toDisplayString as h, withDirectives as z, vModelText as B, createTextVNode as V } from "vue";
1
+ import { defineComponent as y, ref as W, openBlock as m, createElementBlock as x, Fragment as w, createElementVNode as t, createVNode as s, unref as e, withCtx as a, renderList as D, createBlock as N, withModifiers as k, normalizeClass as z, toDisplayString as v, withDirectives as M, vModelText as B, createTextVNode as V } from "vue";
2
2
  import { useActiveEntities as j } from "../../store/active-entities.js";
3
- import { useModal as E, ScalarDropdown as T, ScalarDropdownItem as v, ScalarIcon as m, ScalarDropdownDivider as $, ScalarButton as _, ScalarModal as A } from "@scalar/components";
3
+ import { useModal as E, ScalarDropdown as T, ScalarDropdownItem as h, ScalarIcon as d, ScalarDropdownDivider as $, ScalarButton as _, ScalarModal as A } from "@scalar/components";
4
4
  import { useToasts as I } from "@scalar/use-toasts";
5
5
  import { useRouter as F } from "vue-router";
6
6
  import { useWorkspace as L } from "../../store/store.js";
@@ -29,63 +29,61 @@ const P = { class: "flex items-center text-sm w-[inherit]" }, R = { class: "font
29
29
  }
30
30
  }), r.value = "", c.hide();
31
31
  };
32
- return (n, a) => (d(), x(w, null, [
32
+ return (n, o) => (m(), x(w, null, [
33
33
  t("div", P, [
34
34
  s(e(T), null, {
35
- items: o(() => [
36
- (d(!0), x(w, null, D(e(b), (l, p) => (d(), N(e(v), {
35
+ items: a(() => [
36
+ (m(!0), x(w, null, D(e(b), (l, p) => (m(), N(e(h), {
37
37
  key: p,
38
38
  class: "flex gap-1.5 group/item items-center whitespace-nowrap text-ellipsis overflow-hidden w-full",
39
39
  onClick: k((J) => C(p), ["stop"])
40
40
  }, {
41
- default: o(() => [
41
+ default: a(() => [
42
42
  t("div", {
43
- class: M([
43
+ class: z([
44
44
  "flex items-center justify-center rounded-full p-[3px] w-4 h-4",
45
45
  e(i).uid === p ? "bg-c-accent text-b-1" : "group-hover/item:shadow-border text-transparent"
46
46
  ])
47
47
  }, [
48
- s(e(m), {
48
+ s(e(d), {
49
49
  class: "size-2.5",
50
50
  icon: "Checkmark",
51
51
  thickness: "3.5"
52
52
  })
53
53
  ], 2),
54
- t("span", q, h(l.name), 1)
54
+ t("span", q, v(l.name), 1)
55
55
  ]),
56
56
  _: 2
57
57
  }, 1032, ["onClick"]))), 128)),
58
58
  s(e($)),
59
- s(e(v), {
59
+ s(e(h), {
60
60
  class: "flex items-center gap-1.5",
61
- onClick: a[0] || (a[0] = (l) => e(c).show())
61
+ onClick: o[0] || (o[0] = (l) => e(c).show())
62
62
  }, {
63
- default: o(() => [
63
+ default: a(() => [
64
64
  t("div", G, [
65
- s(e(m), {
66
- class: "h-2.5",
65
+ s(e(d), {
67
66
  icon: "Add",
68
- thickness: "3"
67
+ size: "sm"
69
68
  })
70
69
  ]),
71
- a[2] || (a[2] = t("span", null, "New Workspace", -1))
70
+ o[2] || (o[2] = t("span", null, "New Workspace", -1))
72
71
  ]),
73
72
  _: 1
74
73
  })
75
74
  ]),
76
- default: o(() => [
75
+ default: a(() => [
77
76
  s(e(_), {
78
77
  class: "font-normal h-full justify-start line-clamp-1 py-1 px-1.5 text-c-1 hover:bg-b-2 w-fit text-c-3",
79
78
  fullWidth: "",
80
79
  variant: "ghost"
81
80
  }, {
82
- default: o(() => [
81
+ default: a(() => [
83
82
  t("div", R, [
84
- t("h2", U, h(e(i).name), 1),
85
- s(e(m), {
86
- class: "size-3",
83
+ t("h2", U, v(e(i).name), 1),
84
+ s(e(d), {
87
85
  icon: "ChevronDown",
88
- thickness: "3"
86
+ size: "md"
89
87
  })
90
88
  ])
91
89
  ]),
@@ -101,13 +99,13 @@ const P = { class: "flex items-center text-sm w-[inherit]" }, R = { class: "font
101
99
  state: e(c),
102
100
  variant: "form"
103
101
  }, {
104
- default: o(() => [
102
+ default: a(() => [
105
103
  t("form", {
106
104
  class: "flex gap-1 rounded",
107
105
  onSubmit: k(S, ["prevent"])
108
106
  }, [
109
- z(t("input", {
110
- "onUpdate:modelValue": a[1] || (a[1] = (l) => r.value = l),
107
+ M(t("input", {
108
+ "onUpdate:modelValue": o[1] || (o[1] = (l) => r.value = l),
111
109
  class: "border-none outline-none flex-1 w-full text-sm min-h-8 p-1.5",
112
110
  placeholder: "New Workspace",
113
111
  type: "text"
@@ -119,7 +117,7 @@ const P = { class: "flex items-center text-sm w-[inherit]" }, R = { class: "font
119
117
  disabled: !r.value.trim(),
120
118
  type: "submit"
121
119
  }, {
122
- default: o(() => a[3] || (a[3] = [
120
+ default: a(() => o[3] || (o[3] = [
123
121
  V(" Continue ")
124
122
  ])),
125
123
  _: 1
@@ -22,6 +22,12 @@ export declare function useUrlPrefetcher(): {
22
22
  url: null;
23
23
  input: string | null;
24
24
  error: null;
25
+ } | {
26
+ state: string;
27
+ content: string;
28
+ url: null;
29
+ error: null;
30
+ input?: undefined;
25
31
  } | {
26
32
  state: string;
27
33
  content: string;
@@ -1 +1 @@
1
- {"version":3,"file":"useUrlPrefetcher.d.ts","sourceRoot":"","sources":["../../../../src/components/ImportCollection/hooks/useUrlPrefetcher.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;IAClB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;CACrB,CAAA;AAED;;GAEG;AACH,wBAAgB,gBAAgB;;eAVvB,MAAM,GAAG,SAAS;iBAChB,MAAM,GAAG,IAAI;eACf,MAAM,GAAG,IAAI;aACf,MAAM,GAAG,IAAI;eACX,MAAM,GAAG,IAAI;;yBAiHX,MAAM,GAAG,IAAI,UACZ,MAAM;;;;;;;;;;;;;;;;;;;;EAoBjB"}
1
+ {"version":3,"file":"useUrlPrefetcher.d.ts","sourceRoot":"","sources":["../../../../src/components/ImportCollection/hooks/useUrlPrefetcher.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;IAClB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;CACrB,CAAA;AAED;;GAEG;AACH,wBAAgB,gBAAgB;;eAVvB,MAAM,GAAG,SAAS;iBAChB,MAAM,GAAG,IAAI;eACf,MAAM,GAAG,IAAI;aACf,MAAM,GAAG,IAAI;eACX,MAAM,GAAG,IAAI;;yBAuHX,MAAM,GAAG,IAAI,UACZ,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;EAoBjB"}
@@ -2,7 +2,7 @@ import { resolve as i } from "@scalar/import";
2
2
  import { redirectToProxy as f, fetchWithProxyFallback as d } from "@scalar/oas-utils/helpers";
3
3
  import { reactive as h } from "vue";
4
4
  import { isUrl as m } from "../../../libs/isUrl.js";
5
- function b() {
5
+ function y() {
6
6
  const n = h({
7
7
  state: "idle",
8
8
  content: null,
@@ -19,40 +19,45 @@ function b() {
19
19
  error: null
20
20
  });
21
21
  }
22
- async function s(t, r) {
23
- if (!t)
22
+ async function s(e, r) {
23
+ if (!e)
24
24
  return {
25
25
  state: "idle",
26
26
  content: null,
27
27
  url: null,
28
- input: t,
28
+ input: e,
29
29
  error: null
30
30
  };
31
31
  try {
32
- const e = await i(t, {
32
+ const t = await i(e, {
33
33
  fetch: (c) => fetch(r ? f(r, c) : c, {
34
34
  cache: "no-cache"
35
35
  })
36
36
  });
37
- if (typeof e == "object" && e !== null)
38
- return { state: "idle", content: JSON.stringify(e, null, 2), url: t, error: null };
39
- if (e === void 0)
37
+ if (typeof t == "object" && t !== null)
38
+ return {
39
+ state: "idle",
40
+ content: JSON.stringify(t, null, 2),
41
+ url: null,
42
+ error: null
43
+ };
44
+ if (t === void 0)
40
45
  return {
41
46
  state: "idle",
42
47
  content: null,
43
48
  url: null,
44
- input: t,
45
- error: `Could not find an OpenAPI document in ${t}`
49
+ input: e,
50
+ error: `Could not find an OpenAPI document in ${e}`
46
51
  };
47
- if (!m(e))
52
+ if (!m(t))
48
53
  return {
49
54
  state: "idle",
50
55
  content: null,
51
56
  url: null,
52
- input: t,
57
+ input: e,
53
58
  error: "Oops, we got invalid content for the given URL."
54
59
  };
55
- const o = e, l = await d(o, {
60
+ const o = t, l = await d(o, {
56
61
  proxy: r,
57
62
  cache: "no-cache"
58
63
  });
@@ -65,29 +70,29 @@ function b() {
65
70
  state: "idle",
66
71
  content: null,
67
72
  url: null,
68
- input: t,
73
+ input: e,
69
74
  error: `Couldn't fetch ${o}, got error ${[l.status, l.statusText].join(" ").trim()}.`
70
75
  };
71
- } catch (e) {
72
- return console.error("[prefetchDocument]", e), {
76
+ } catch (t) {
77
+ return console.error("[prefetchDocument]", t), {
73
78
  state: "idle",
74
79
  content: null,
75
80
  url: null,
76
- input: t,
77
- error: e.message
81
+ input: e,
82
+ error: t.message
78
83
  };
79
84
  }
80
85
  }
81
- async function a(t, r) {
86
+ async function a(e, r) {
82
87
  Object.assign(n, {
83
88
  state: "loading",
84
89
  content: null,
85
90
  url: null,
86
- input: t,
91
+ input: e,
87
92
  error: null
88
93
  });
89
- const e = await s(t, r);
90
- return Object.assign(n, e), e;
94
+ const t = await s(e, r);
95
+ return Object.assign(n, t), t;
91
96
  }
92
97
  return {
93
98
  prefetchResult: n,
@@ -96,5 +101,5 @@ function b() {
96
101
  };
97
102
  }
98
103
  export {
99
- b as useUrlPrefetcher
104
+ y as useUrlPrefetcher
100
105
  };
@@ -1 +1 @@
1
- {"version":3,"file":"OpenApiClientButton.vue.d.ts","sourceRoot":"","sources":["../../src/components/OpenApiClientButton.vue"],"names":[],"mappings":"AA4FA,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,SAAS,GAAG,OAAO,CAAA;IACjC,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,GAAG,CAAC,EAAE,MAAM,CAAA;CACb,CAAC;;AAkGF,wBAMG"}
1
+ {"version":3,"file":"OpenApiClientButton.vue.d.ts","sourceRoot":"","sources":["../../src/components/OpenApiClientButton.vue"],"names":[],"mappings":"AAmGA,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,SAAS,GAAG,OAAO,CAAA;IACjC,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,GAAG,CAAC,EAAE,MAAM,CAAA;CACb,CAAC;;AAyGF,wBAMG"}
@@ -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 f = /* @__PURE__ */ o(t, [["__scopeId", "data-v-3d5f00c1"]]);
4
+ const f = /* @__PURE__ */ o(t, [["__scopeId", "data-v-3ceef301"]]);
5
5
  export {
6
6
  f as default
7
7
  };
@@ -1,7 +1,7 @@
1
- import { defineComponent as o, computed as a, openBlock as i, createElementBlock as s, createVNode as c, unref as m, createTextVNode as u, createCommentVNode as l } from "vue";
1
+ import { defineComponent as a, computed as i, openBlock as c, createElementBlock as s, createVNode as m, unref as u, createTextVNode as l, createCommentVNode as f } from "vue";
2
2
  import { ScalarIcon as p } from "@scalar/components";
3
- import { makeUrlAbsolute as f } from "@scalar/oas-utils/helpers";
4
- const h = ["href"], v = /* @__PURE__ */ o({
3
+ import { makeUrlAbsolute as d } from "@scalar/oas-utils/helpers";
4
+ const h = ["href"], P = /* @__PURE__ */ a({
5
5
  __name: "OpenApiClientButton",
6
6
  props: {
7
7
  buttonSource: {},
@@ -9,31 +9,31 @@ const h = ["href"], v = /* @__PURE__ */ o({
9
9
  integration: {},
10
10
  url: {}
11
11
  },
12
- setup(t) {
13
- const r = a(() => {
14
- const n = f(t.url);
15
- if (!(n != null && n.length))
12
+ setup(n) {
13
+ const o = i(() => {
14
+ const r = n.url ?? (typeof window < "u" ? window.location.href : void 0), e = d(r);
15
+ if (!(e != null && e.length))
16
16
  return;
17
- const e = new URL(
18
- t.isDevelopment ? "http://localhost:5065" : "https://client.scalar.com"
17
+ const t = new URL(
18
+ n.isDevelopment ? "http://localhost:5065" : "https://client.scalar.com"
19
19
  );
20
- return e.searchParams.set("url", n), t.integration !== null && e.searchParams.set("integration", t.integration ?? "vue"), e.searchParams.set("utm_source", "api-reference"), e.searchParams.set("utm_medium", "button"), e.searchParams.set("utm_campaign", t.buttonSource), e.toString();
20
+ return t.searchParams.set("url", e), n.integration !== null && t.searchParams.set("integration", n.integration ?? "vue"), t.searchParams.set("utm_source", "api-reference"), t.searchParams.set("utm_medium", "button"), t.searchParams.set("utm_campaign", n.buttonSource), t.toString();
21
21
  });
22
- return (n, e) => r.value ? (i(), s("a", {
22
+ return (r, e) => o.value ? (c(), s("a", {
23
23
  key: 0,
24
24
  class: "open-api-client-button",
25
- href: r.value,
25
+ href: o.value,
26
26
  target: "_blank"
27
27
  }, [
28
- c(m(p), {
28
+ m(u(p), {
29
29
  icon: "ExternalLink",
30
30
  size: "xs",
31
31
  thickness: "2.5"
32
32
  }),
33
- e[0] || (e[0] = u(" Open API Client "))
34
- ], 8, h)) : l("", !0);
33
+ e[0] || (e[0] = l(" Open API Client "))
34
+ ], 8, h)) : f("", !0);
35
35
  }
36
36
  });
37
37
  export {
38
- v as default
38
+ P as default
39
39
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ViewLayoutCollapse.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ViewLayout/ViewLayoutCollapse.vue"],"names":[],"mappings":"AAgEA,KAAK,WAAW,GAAG;IACf,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAC;AAkBJ,iBAAS,cAAc;WA2IT,OAAO,IAA6B;;;;YAVtB,GAAG;;;YACD,GAAG;;;YACH,GAAG;;;;EAahC;AAaD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;iBAlLH,OAAO;eACT,MAAM;6EAyLpB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAgBpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"ViewLayoutCollapse.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ViewLayout/ViewLayoutCollapse.vue"],"names":[],"mappings":"AA+DA,KAAK,WAAW,GAAG;IACf,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAC;AAkBJ,iBAAS,cAAc;WA2IT,OAAO,IAA6B;;;;YAVtB,GAAG;;;YACD,GAAG;;;YACH,GAAG;;;;EAahC;AAaD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;iBAlLH,OAAO;eACT,MAAM;6EAyLpB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAgBpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as c, openBlock as s, createBlock as d, unref as o, withCtx as n, createElementVNode as r, createVNode as i, renderSlot as l, createElementBlock as u, toDisplayString as p, createCommentVNode as a, mergeProps as f } from "vue";
2
- import { Disclosure as m, DisclosureButton as h, DisclosurePanel as x } from "@headlessui/vue";
2
+ import { Disclosure as m, DisclosureButton as x, DisclosurePanel as h } from "@headlessui/vue";
3
3
  import { ScalarIcon as b } from "@scalar/components";
4
4
  const g = { class: "flex items-center" }, v = { class: "flex flex-1 items-center gap-1.5 text-c-1" }, _ = {
5
5
  key: 0,
@@ -14,20 +14,19 @@ const g = { class: "flex items-center" }, v = { class: "flex flex-1 items-center
14
14
  itemCount: { default: 0 }
15
15
  },
16
16
  setup(y) {
17
- return (e, k) => (s(), d(o(m), {
17
+ return (e, w) => (s(), d(o(m), {
18
18
  as: "div",
19
19
  class: "focus-within:bg-b-2 ui-not-open:hover:bg-b-2 focus-within:text-c-1 text-c-2 rounded request-item ui-not-open:bg-transparent ui-open:[&:not(:last-child)]:mb-2.5 ui-not-open:mb-[0.5px]",
20
20
  defaultOpen: e.defaultOpen
21
21
  }, {
22
22
  default: n(({ open: t }) => [
23
23
  r("div", g, [
24
- i(o(h), { class: "group hover:text-c-1 flex flex-1 items-center gap-2.5 overflow-hidden py-1.5 text-sm font-medium px-1 md:px-1.5 xl:px-2 outline-none" }, {
24
+ i(o(x), { class: "group hover:text-c-1 flex flex-1 items-center gap-2.5 overflow-hidden py-1.5 text-sm font-medium px-1 md:px-1.5 xl:px-2 outline-none" }, {
25
25
  default: n(() => [
26
26
  i(o(b), {
27
27
  class: "text-c-3 group-hover:text-c-1 group-focus-visible:outline ui-open:rotate-90 ui-not-open:rotate-0 rounded-[1px] outline-offset-2",
28
28
  icon: "ChevronRight",
29
- size: "sm",
30
- thickness: "2.5"
29
+ size: "md"
31
30
  }),
32
31
  r("div", v, [
33
32
  l(e.$slots, "title", { open: t }),
@@ -40,7 +39,7 @@ const g = { class: "flex items-center" }, v = { class: "flex flex-1 items-center
40
39
  l(e.$slots, "actions", { open: t })
41
40
  ])) : a("", !0)
42
41
  ]),
43
- i(o(x), f(e.$attrs, { class: "h-full max-h-fit rounded-b diclosure-panel" }), {
42
+ i(o(h), f(e.$attrs, { class: "h-full max-h-fit rounded-b diclosure-panel" }), {
44
43
  default: n(() => [
45
44
  l(e.$slots, "default", { open: t })
46
45
  ]),