@scalar/api-client 2.2.11 → 2.2.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 (34) hide show
  1. package/CHANGELOG.md +57 -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 +114 -111
  5. package/dist/components/AddressBar/AddressBarServer.vue.d.ts.map +1 -1
  6. package/dist/components/AddressBar/AddressBarServer.vue.js +74 -81
  7. package/dist/components/AddressBar/AddressBarServerItem.vue.d.ts.map +1 -1
  8. package/dist/components/AddressBar/AddressBarServerItem.vue.js +19 -18
  9. package/dist/components/SideNav/SideNav.vue.js +6 -6
  10. package/dist/components/Sidebar/Sidebar.vue.js +2 -2
  11. package/dist/components/Sidebar/Sidebar.vue2.js +1 -1
  12. package/dist/components/ViewLayout/ViewLayoutSection.vue.js +3 -3
  13. package/dist/layouts/App/create-api-client-app.d.ts +1 -1
  14. package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +1 -1
  15. package/dist/layouts/Modal/ApiClientModal.vue.js +2 -2
  16. package/dist/layouts/Modal/create-api-client-modal.d.ts +2 -2
  17. package/dist/layouts/Web/create-api-client-web.d.ts +1 -1
  18. package/dist/libs/create-client.d.ts +1 -1
  19. package/dist/libs/create-client.d.ts.map +1 -1
  20. package/dist/libs/create-client.js +64 -51
  21. package/dist/libs/send-request/send-request.d.ts.map +1 -1
  22. package/dist/libs/send-request/send-request.js +47 -45
  23. package/dist/style.css +1 -1
  24. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.d.ts.map +1 -1
  25. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.js +1 -1
  26. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue2.js +49 -48
  27. package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts.map +1 -1
  28. package/dist/views/Request/RequestSection/RequestPathParams.vue.js +53 -51
  29. package/dist/views/Request/RequestSection/RequestSection.vue.js +2 -2
  30. package/dist/views/Request/RequestSection/RequestSection.vue2.js +15 -15
  31. package/dist/views/Request/RequestSubpageHeader.vue.js +3 -3
  32. package/dist/views/Request/RequestSubpageHeader.vue2.js +1 -1
  33. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  34. package/package.json +11 -11
@@ -1 +1 @@
1
- {"version":3,"file":"RequestExampleAuth.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue"],"names":[],"mappings":"AA8NA,KAAK,WAAW,GAAG;IACjB,0BAA0B,EAAE,MAAM,EAAE,CAAA;IACpC,MAAM,CAAC,EAAE,QAAQ,GAAG,WAAW,CAAA;CAChC,CAAC;;AA+YF,wBAMG"}
1
+ {"version":3,"file":"RequestExampleAuth.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue"],"names":[],"mappings":"AA+NA,KAAK,WAAW,GAAG;IACjB,0BAA0B,EAAE,MAAM,EAAE,CAAA;IACpC,MAAM,CAAC,EAAE,QAAQ,GAAG,WAAW,CAAA;CAChC,CAAC;;AAkZF,wBAMG"}
@@ -1,7 +1,7 @@
1
1
  import t from "./RequestExampleAuth.vue2.js";
2
2
  /* empty css */
3
3
  import o from "../../../../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ o(t, [["__scopeId", "data-v-8225a482"]]);
4
+ const p = /* @__PURE__ */ o(t, [["__scopeId", "data-v-59761a00"]]);
5
5
  export {
6
6
  p as default
7
7
  };
@@ -1,18 +1,18 @@
1
- import { defineComponent as K, computed as N, ref as R, openBlock as r, createElementBlock as n, Fragment as s, renderList as k, createBlock as x, unref as p, normalizeClass as v, withCtx as a, createVNode as u, createTextVNode as f, toDisplayString as _, createCommentVNode as g, createElementVNode as C, capitalize as w } from "vue";
2
- import q from "./OAuth2.vue.js";
3
- import y from "./RequestAuthDataTableInput.vue.js";
1
+ import { defineComponent as K, computed as N, ref as R, openBlock as r, createElementBlock as u, Fragment as s, renderList as k, createBlock as x, unref as p, normalizeClass as v, withCtx as a, createVNode as n, createTextVNode as f, toDisplayString as $, createCommentVNode as c, createElementVNode as _, capitalize as w } from "vue";
2
+ import j from "./OAuth2.vue.js";
3
+ import V from "./RequestAuthDataTableInput.vue.js";
4
4
  import b from "../../../../components/DataTable/DataTableRow.vue.js";
5
- import I from "../../../../components/DataTable/DataTableCell.vue.js";
6
- import { useWorkspace as j } from "../../../../store/store.js";
7
- const E = { class: "flex flex-wrap px-2 items-center gap-1 py-1" }, M = ["onClick"], O = /* @__PURE__ */ K({
5
+ import q from "../../../../components/DataTable/DataTableCell.vue.js";
6
+ import { useWorkspace as I } from "../../../../store/store.js";
7
+ const E = { class: "flex flex-wrap px-2 items-center gap-1 py-1" }, M = ["onClick"], H = /* @__PURE__ */ K({
8
8
  __name: "RequestExampleAuth",
9
9
  props: {
10
10
  selectedSecuritySchemeUids: {},
11
11
  layout: { default: "client" }
12
12
  },
13
- setup(U) {
14
- const { securitySchemes: S, securitySchemeMutators: F } = j(), $ = N(
15
- () => U.selectedSecuritySchemeUids.map((e) => ({
13
+ setup(C) {
14
+ const { securitySchemes: S, securitySchemeMutators: F } = I(), U = N(
15
+ () => C.selectedSecuritySchemeUids.map((e) => ({
16
16
  scheme: S[e]
17
17
  }))
18
18
  ), d = R(""), T = (e) => {
@@ -23,16 +23,16 @@ const E = { class: "flex flex-wrap px-2 items-center gap-1 py-1" }, M = ["onClic
23
23
  return `${w(e.nameKey)}: ${d.value ? d.value : l.type}`;
24
24
  }
25
25
  return e.type === "http" ? `${w(e.nameKey)}: ${e.scheme}` : `${w(e.nameKey)}: ${e.type}`;
26
- }, c = (e, l, t) => F.edit(e, l, t), m = (e = "") => U.layout === "reference" ? `bg-b-2 border-l-1/2 last:border-r-1/2 group-last:border-b-border ${e}` : "";
27
- return (e, l) => (r(!0), n(s, null, k($.value, ({ scheme: t }, B) => (r(), n(s, {
26
+ }, y = (e, l, t) => F.edit(e, l, t), m = (e = "") => C.layout === "reference" ? `bg-b-2 border-l-1/2 last:border-r-1/2 group-last:border-b-border ${e}` : "";
27
+ return (e, l) => (r(!0), u(s, null, k(U.value, ({ scheme: t }, B) => (r(), u(s, {
28
28
  key: t.uid
29
29
  }, [
30
- $.value.length > 1 ? (r(), x(p(b), {
30
+ U.value.length > 1 ? (r(), x(p(b), {
31
31
  key: 0,
32
32
  class: v({ "request-example-references-header": e.layout === "reference" })
33
33
  }, {
34
34
  default: a(() => [
35
- u(p(I), {
35
+ n(p(q), {
36
36
  class: v([
37
37
  "text-c-3 pl-2 font-medium flex items-center",
38
38
  m(
@@ -41,22 +41,22 @@ const E = { class: "flex flex-wrap px-2 items-center gap-1 py-1" }, M = ["onClic
41
41
  ])
42
42
  }, {
43
43
  default: a(() => [
44
- f(_(T(t)), 1)
44
+ f($(T(t)), 1)
45
45
  ]),
46
46
  _: 2
47
47
  }, 1032, ["class"])
48
48
  ]),
49
49
  _: 2
50
- }, 1032, ["class"])) : g("", !0),
51
- t.type === "http" ? (r(), n(s, { key: 1 }, [
50
+ }, 1032, ["class"])) : c("", !0),
51
+ t.type === "http" ? (r(), u(s, { key: 1 }, [
52
52
  t.scheme === "bearer" ? (r(), x(p(b), { key: 0 }, {
53
53
  default: a(() => [
54
- u(y, {
54
+ n(V, {
55
55
  containerClass: m("bg-b-2 rounded border-1/2"),
56
56
  modelValue: t.token,
57
57
  placeholder: "Token",
58
58
  type: "password",
59
- "onUpdate:modelValue": (o) => c(t.uid, "token", o)
59
+ "onUpdate:modelValue": (o) => y(t.uid, "token", o)
60
60
  }, {
61
61
  default: a(() => l[0] || (l[0] = [
62
62
  f(" Bearer Token ")
@@ -65,10 +65,10 @@ const E = { class: "flex flex-wrap px-2 items-center gap-1 py-1" }, M = ["onClic
65
65
  }, 1032, ["containerClass", "modelValue", "onUpdate:modelValue"])
66
66
  ]),
67
67
  _: 2
68
- }, 1024)) : t.scheme === "basic" ? (r(), n(s, { key: 1 }, [
69
- u(p(b), null, {
68
+ }, 1024)) : t.scheme === "basic" ? (r(), u(s, { key: 1 }, [
69
+ n(p(b), null, {
70
70
  default: a(() => [
71
- u(y, {
71
+ n(V, {
72
72
  class: "text-c-2",
73
73
  containerClass: m(
74
74
  "auth-blend-required bg-b-2 rounded-t border-t-1/2"
@@ -76,7 +76,7 @@ const E = { class: "flex flex-wrap px-2 items-center gap-1 py-1" }, M = ["onClic
76
76
  modelValue: t.username,
77
77
  placeholder: "janedoe",
78
78
  required: "",
79
- "onUpdate:modelValue": (o) => c(t.uid, "username", o)
79
+ "onUpdate:modelValue": (o) => y(t.uid, "username", o)
80
80
  }, {
81
81
  default: a(() => l[1] || (l[1] = [
82
82
  f(" Username ")
@@ -86,14 +86,14 @@ const E = { class: "flex flex-wrap px-2 items-center gap-1 py-1" }, M = ["onClic
86
86
  ]),
87
87
  _: 2
88
88
  }, 1024),
89
- u(p(b), null, {
89
+ n(p(b), null, {
90
90
  default: a(() => [
91
- u(y, {
91
+ n(V, {
92
92
  containerClass: m("bg-b-2 rounded-b border-b-1/2"),
93
93
  modelValue: t.password,
94
94
  placeholder: "********",
95
95
  type: "password",
96
- "onUpdate:modelValue": (o) => c(t.uid, "password", o)
96
+ "onUpdate:modelValue": (o) => y(t.uid, "password", o)
97
97
  }, {
98
98
  default: a(() => l[2] || (l[2] = [
99
99
  f(" Password ")
@@ -103,15 +103,15 @@ const E = { class: "flex flex-wrap px-2 items-center gap-1 py-1" }, M = ["onClic
103
103
  ]),
104
104
  _: 2
105
105
  }, 1024)
106
- ], 64)) : g("", !0)
107
- ], 64)) : t.type === "apiKey" ? (r(), n(s, { key: 2 }, [
108
- u(p(b), null, {
106
+ ], 64)) : c("", !0)
107
+ ], 64)) : t.type === "apiKey" ? (r(), u(s, { key: 2 }, [
108
+ n(p(b), null, {
109
109
  default: a(() => [
110
- u(y, {
110
+ n(V, {
111
111
  containerClass: m("bg-b-2 rounded-t border-t-1/2"),
112
112
  modelValue: t.name,
113
113
  placeholder: "api-key",
114
- "onUpdate:modelValue": (o) => c(t.uid, "name", o)
114
+ "onUpdate:modelValue": (o) => y(t.uid, "name", o)
115
115
  }, {
116
116
  default: a(() => l[3] || (l[3] = [
117
117
  f(" Name ")
@@ -121,13 +121,13 @@ const E = { class: "flex flex-wrap px-2 items-center gap-1 py-1" }, M = ["onClic
121
121
  ]),
122
122
  _: 2
123
123
  }, 1024),
124
- u(p(b), null, {
124
+ n(p(b), null, {
125
125
  default: a(() => [
126
- u(y, {
126
+ n(V, {
127
127
  containerClass: m("bg-b-2 rounded-b border-b-1/2"),
128
128
  modelValue: t.value,
129
129
  placeholder: "QUxMIFlPVVIgQkFTRSBBUkUgQkVMT05HIFRPIFVT",
130
- "onUpdate:modelValue": (o) => c(t.uid, "value", o)
130
+ "onUpdate:modelValue": (o) => y(t.uid, "value", o)
131
131
  }, {
132
132
  default: a(() => l[4] || (l[4] = [
133
133
  f(" Value ")
@@ -137,42 +137,43 @@ const E = { class: "flex flex-wrap px-2 items-center gap-1 py-1" }, M = ["onClic
137
137
  ]),
138
138
  _: 2
139
139
  }, 1024)
140
- ], 64)) : t.type === "oauth2" ? (r(), n(s, { key: 3 }, [
141
- u(p(b), null, {
140
+ ], 64)) : t.type === "oauth2" ? (r(), u(s, { key: 3 }, [
141
+ n(p(b), null, {
142
142
  default: a(() => [
143
- C("div", {
143
+ Object.keys(t.flows).length > 1 ? (r(), u("div", {
144
+ key: 0,
144
145
  class: v(["min-h-8 min-w-8 flex text-sm border-t-1/2 last:border-r-0 p-0 m-0 relative row", {
145
146
  "border-1/2 border-b-0 rounded-t bg-b-2": e.layout === "reference"
146
147
  }])
147
148
  }, [
148
- l[5] || (l[5] = C("div", { class: "text-c-1 flex min-w-[94px] items-center pl-2 pr-0" }, " Flow ", -1)),
149
- C("div", E, [
150
- (r(!0), n(s, null, k(t.flows, (o, i, V) => (r(), n("button", {
149
+ l[5] || (l[5] = _("div", { class: "text-c-1 flex min-w-[94px] items-center pl-2 pr-0" }, " Flow ", -1)),
150
+ _("div", E, [
151
+ (r(!0), u(s, null, k(t.flows, (o, i, g) => (r(), u("button", {
151
152
  key: i,
152
153
  class: v(["h-6 scalar-button scalar-row cursor-pointer items-center justify-center rounded font-medium text-xs scalar-button-outlined border border-solid border-border text-c-1 hover:bg-b-2 p-0 px-2", {
153
- "bg-b-3": e.layout === "client" && (d.value === i || V === 0 && !d.value),
154
- "bg-b-1": e.layout === "reference" && (d.value === i || V === 0 && !d.value)
154
+ "bg-b-3": e.layout === "client" && (d.value === i || g === 0 && !d.value),
155
+ "bg-b-1": e.layout === "reference" && (d.value === i || g === 0 && !d.value)
155
156
  }]),
156
157
  type: "button",
157
158
  onClick: (P) => d.value = i
158
- }, _(i), 11, M))), 128))
159
+ }, $(i), 11, M))), 128))
159
160
  ])
160
- ], 2)
161
+ ], 2)) : c("", !0)
161
162
  ]),
162
163
  _: 2
163
164
  }, 1024),
164
- (r(!0), n(s, null, k(t.flows, (o, i, V) => (r(), n(s, { key: i }, [
165
- d.value === i || V === 0 && !d.value ? (r(), x(q, {
165
+ (r(!0), u(s, null, k(t.flows, (o, i, g) => (r(), u(s, { key: i }, [
166
+ d.value === i || g === 0 && !d.value ? (r(), x(j, {
166
167
  key: 0,
167
168
  flow: o,
168
169
  layout: e.layout,
169
170
  scheme: t
170
- }, null, 8, ["flow", "layout", "scheme"])) : g("", !0)
171
+ }, null, 8, ["flow", "layout", "scheme"])) : c("", !0)
171
172
  ], 64))), 128))
172
- ], 64)) : g("", !0)
173
+ ], 64)) : c("", !0)
173
174
  ], 64))), 128));
174
175
  }
175
176
  });
176
177
  export {
177
- O as default
178
+ H as default
178
179
  };
@@ -1 +1 @@
1
- {"version":3,"file":"RequestPathParams.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestPathParams.vue"],"names":[],"mappings":"AAoIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAMrE,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,cAAc,CAAC,YAAY,CAAC,CAAA;CAC7C,CAAC;;AA0MF,wBAOG"}
1
+ {"version":3,"file":"RequestPathParams.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestPathParams.vue"],"names":[],"mappings":"AA8IA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAMrE,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,cAAc,CAAC,YAAY,CAAC,CAAA;CAC7C,CAAC;;AAyMF,wBAOG"}
@@ -1,96 +1,98 @@
1
- import { defineComponent as _, computed as $, watch as K, openBlock as d, createBlock as h, withCtx as y, createTextVNode as x, toDisplayString as q, createElementBlock as C, createElementVNode as P } from "vue";
2
- import w from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
3
- import { useActiveEntities as V } from "../../../store/active-entities.js";
4
- import M from "./RequestTable.vue.js";
5
- import { REGEX as B } from "@scalar/oas-utils/helpers";
6
- import { useWorkspace as N } from "../../../store/store.js";
7
- const T = {
8
- key: 1,
9
- class: "text-c-3 px-4 text-sm border rounded min-h-12 justify-center flex items-center bg-b-1 mx-1"
10
- }, O = /* @__PURE__ */ _({
1
+ import { defineComponent as P, computed as _, watch as y, openBlock as g, createBlock as R, withCtx as $, createTextVNode as b, toDisplayString as q, createCommentVNode as w } from "vue";
2
+ import V from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
3
+ import { useActiveEntities as M } from "../../../store/active-entities.js";
4
+ import U from "./RequestTable.vue.js";
5
+ import { REGEX as N } from "@scalar/oas-utils/helpers";
6
+ import { useWorkspace as T } from "../../../store/store.js";
7
+ const S = /* @__PURE__ */ P({
11
8
  __name: "RequestPathParams",
12
9
  props: {
13
10
  title: {},
14
11
  paramKey: {}
15
12
  },
16
- setup(b) {
17
- const o = b, { activeRequest: s, activeExample: n } = V(), { requestMutators: v, requestExampleMutators: f } = N(), l = $(() => {
13
+ setup(E) {
14
+ const o = E, { activeRequest: s, activeExample: n, activeServer: d } = M(), { requestMutators: f, requestExampleMutators: v } = T(), p = _(() => {
18
15
  const e = n.value;
19
- return e ? e.parameters[o.paramKey].map((a) => {
16
+ return e ? e.parameters[o.paramKey].map((t) => {
20
17
  var r;
21
18
  return {
22
- ...a,
23
- enum: a.enum || ((r = e.serverVariables) == null ? void 0 : r[a.key])
19
+ ...t,
20
+ enum: t.enum || ((r = e.serverVariables) == null ? void 0 : r[t.key])
24
21
  };
25
22
  }) : [];
26
- }), g = (e, a, r) => {
27
- var u, t;
23
+ }), K = (e, t, r) => {
24
+ var l, a;
28
25
  if (!s.value || !n.value) return;
29
- const i = n.value.parameters[o.paramKey], p = (u = i[e]) == null ? void 0 : u.key;
30
- if (a === "key") {
31
- if ((t = i[e]) != null && t.required)
26
+ const i = n.value.parameters[o.paramKey], u = (l = i[e]) == null ? void 0 : l.key;
27
+ if (t === "key") {
28
+ if ((a = i[e]) != null && a.required)
32
29
  return;
33
30
  if (r) {
34
- const c = encodeURIComponent(p), m = encodeURIComponent(r), k = new RegExp(`(?<=/):${c}(?=[/?#]|$)`, "g"), R = s.value.path.replace(
35
- k,
31
+ const c = encodeURIComponent(u), m = encodeURIComponent(r), x = new RegExp(`(?<=/):${c}(?=[/?#]|$)`, "g"), C = s.value.path.replace(
32
+ x,
36
33
  `:${m}`
37
34
  );
38
- v.edit(s.value.uid, "path", R);
35
+ f.edit(s.value.uid, "path", C);
39
36
  } else {
40
37
  i.splice(e, 1);
41
- const c = new RegExp(`/:${encodeURIComponent(p)}(?=[/?#]|$)`, "g"), m = s.value.path.replace(c, "");
42
- v.edit(s.value.uid, "path", m);
38
+ const c = new RegExp(`/:${encodeURIComponent(u)}(?=[/?#]|$)`, "g"), m = s.value.path.replace(c, "");
39
+ f.edit(s.value.uid, "path", m);
43
40
  }
44
41
  }
45
- f.edit(
42
+ v.edit(
46
43
  n.value.uid,
47
- `parameters.${o.paramKey}.${e}.${a}`,
44
+ `parameters.${o.paramKey}.${e}.${t}`,
48
45
  r
49
46
  );
50
- }, E = (e) => {
51
- var u;
47
+ }, k = (e) => {
48
+ var l;
52
49
  if (!n.value) return;
53
- const a = ((u = e.match(B.PATH)) == null ? void 0 : u.map((t) => t.slice(1, -1))) || [], r = n.value.parameters[o.paramKey], i = new Map(r.map((t) => [t.key, t])), p = a.map(
54
- (t) => i.get(t) || { key: t, value: "", enabled: !0 }
50
+ const t = ((l = e.match(N.PATH)) == null ? void 0 : l.map((a) => a.slice(1, -1))) || [], r = n.value.parameters[o.paramKey], i = new Map(r.map((a) => [a.key, a])), u = t.map(
51
+ (a) => i.get(a) || { key: a, value: "", enabled: !0 }
55
52
  );
56
- r.forEach((t) => {
57
- !a.includes(t.key) && (t.value || t.required) && p.push(t);
58
- }), r.splice(0, r.length, ...p), f.edit(
53
+ r.forEach((a) => {
54
+ !t.includes(a.key) && (a.value || a.required) && u.push(a);
55
+ }), r.splice(0, r.length, ...u), t.length === 0 && r.splice(0, r.length), v.edit(
59
56
  n.value.uid,
60
57
  `parameters.${o.paramKey}`,
61
58
  r
62
59
  );
60
+ }, h = (e) => {
61
+ e && k(e);
63
62
  };
64
- return K(
63
+ return y(
64
+ () => s.value,
65
+ (e) => {
66
+ var t;
67
+ e && h((t = d.value) == null ? void 0 : t.url);
68
+ }
69
+ ), y(
65
70
  () => {
66
71
  var e;
67
- return (e = s.value) == null ? void 0 : e.path;
72
+ return (e = d.value) == null ? void 0 : e.url;
68
73
  },
69
- (e) => {
70
- e && E(e);
74
+ (e, t) => {
75
+ e !== t && h(e);
71
76
  }
72
- ), (e, a) => (d(), h(w, {
73
- itemCount: l.value.length
77
+ ), (e, t) => (g(), R(V, {
78
+ itemCount: p.value.length
74
79
  }, {
75
- title: y(() => [
76
- x(q(e.title), 1)
80
+ title: $(() => [
81
+ b(q(e.title), 1)
77
82
  ]),
78
- default: y(() => [
79
- l.value.length ? (d(), h(M, {
83
+ default: $(() => [
84
+ p.value.length ? (g(), R(U, {
80
85
  key: 0,
81
86
  class: "flex-1",
82
87
  isEnabledHidden: "",
83
- items: l.value,
84
- onUpdateRow: g
85
- }, null, 8, ["items"])) : (d(), C("div", T, a[0] || (a[0] = [
86
- x(" You can use variables in your path: "),
87
- P("code", { class: "bg-b-2 ml-1 px-1 rounded" }, "/endpoint/{my_path_variable}", -1)
88
- ])))
88
+ items: p.value,
89
+ onUpdateRow: K
90
+ }, null, 8, ["items"])) : w("", !0)
89
91
  ]),
90
92
  _: 1
91
93
  }, 8, ["itemCount"]));
92
94
  }
93
95
  });
94
96
  export {
95
- O as default
97
+ S as default
96
98
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./RequestSection.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-ade1db3e"]]);
4
+ const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-317bb675"]]);
5
5
  export {
6
- m as default
6
+ p as default
7
7
  };
@@ -3,24 +3,24 @@ import H from "../../../components/ContextBar.vue.js";
3
3
  import N from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
4
4
  import { useActiveEntities as E } from "../../../store/active-entities.js";
5
5
  import K from "./RequestBody.vue.js";
6
- import h from "./RequestParams.vue.js";
6
+ import f from "./RequestParams.vue.js";
7
7
  import U from "./RequestPathParams.vue.js";
8
- import { canMethodHaveBody as f } from "@scalar/oas-utils/helpers";
8
+ import { canMethodHaveBody as h } from "@scalar/oas-utils/helpers";
9
9
  import Q from "./RequestAuth/RequestAuth.vue.js";
10
10
  import { useWorkspace as $ } from "../../../store/store.js";
11
11
  const D = { class: "flex-1 flex gap-1 items-center lg:pr-24 pointer-events-none group" }, M = {
12
12
  key: 0,
13
13
  class: "absolute w-full h-full top-0 left-0 pointer-events-auto opacity-0 cursor-text",
14
14
  for: "requestname"
15
- }, P = ["value"], z = {
15
+ }, z = ["value"], I = {
16
16
  key: 2,
17
17
  class: "flex items-center text-c-1 h-8"
18
- }, I = { class: "request-section-content custom-scroll flex flex-1 flex-col px-3 xl:px-4 py-2.5" }, ee = /* @__PURE__ */ B({
18
+ }, L = { class: "request-section-content custom-scroll flex flex-1 flex-col px-3 xl:px-4 py-2.5" }, ee = /* @__PURE__ */ B({
19
19
  __name: "RequestSection",
20
20
  props: {
21
21
  selectedSecuritySchemeUids: {}
22
22
  },
23
- setup(L) {
23
+ setup(O) {
24
24
  const { activeRequest: l, activeExample: y } = E(), { isReadOnly: p, requestMutators: g } = $(), k = S(() => {
25
25
  var a, u;
26
26
  const t = /* @__PURE__ */ new Set([
@@ -32,7 +32,7 @@ const D = { class: "flex-1 flex gap-1 items-center lg:pr-24 pointer-events-none
32
32
  "Headers",
33
33
  "Body"
34
34
  ]);
35
- return (a = y.value) != null && a.parameters.path.length || t.delete("Variables"), f(((u = l.value) == null ? void 0 : u.method) ?? "get") || t.delete("Body"), _.value && t.delete("Auth"), [...t];
35
+ return (a = y.value) != null && a.parameters.path.length || t.delete("Variables"), h(((u = l.value) == null ? void 0 : u.method) ?? "get") || t.delete("Body"), _.value && t.delete("Auth"), [...t];
36
36
  }), _ = S(
37
37
  () => {
38
38
  var t, a;
@@ -40,7 +40,7 @@ const D = { class: "flex-1 flex gap-1 items-center lg:pr-24 pointer-events-none
40
40
  }
41
41
  ), e = b("All");
42
42
  V(l, (t) => {
43
- e.value === "Body" && t && !f(t.method) && (e.value = "All");
43
+ e.value === "Body" && t && !h(t.method) && (e.value = "All");
44
44
  });
45
45
  const q = (t) => {
46
46
  if (!l.value) return;
@@ -57,14 +57,14 @@ const D = { class: "flex-1 flex gap-1 items-center lg:pr-24 pointer-events-none
57
57
  return [
58
58
  A("div", D, [
59
59
  o(p) ? C("", !0) : (d(), v("label", M)),
60
- o(p) ? (d(), v("span", z, R((c = o(l)) == null ? void 0 : c.summary), 1)) : (d(), v("input", {
60
+ o(p) ? (d(), v("span", I, R((c = o(l)) == null ? void 0 : c.summary), 1)) : (d(), v("input", {
61
61
  key: 1,
62
62
  id: "requestname",
63
63
  class: "text-c-1 rounded pointer-events-auto relative w-full pl-2 -ml-0.5 md:-ml-1 xl:-ml-2 has-[:focus-visible]:outline h-8 group-hover-input has-[:focus-visible]:outline z-10",
64
64
  placeholder: "Request Name",
65
65
  value: (n = o(l)) == null ? void 0 : n.summary,
66
66
  onInput: q
67
- }, null, 40, P))
67
+ }, null, 40, z))
68
68
  ]),
69
69
  s(H, {
70
70
  activeSection: e.value,
@@ -76,7 +76,7 @@ const D = { class: "flex-1 flex gap-1 items-center lg:pr-24 pointer-events-none
76
76
  default: x(() => {
77
77
  var n, c, m;
78
78
  return [
79
- A("div", I, [
79
+ A("div", L, [
80
80
  i(s(Q, {
81
81
  selectedSecuritySchemeUids: t.selectedSecuritySchemeUids,
82
82
  title: "Authentication"
@@ -88,26 +88,26 @@ const D = { class: "flex-1 flex gap-1 items-center lg:pr-24 pointer-events-none
88
88
  ]),
89
89
  i(s(U, {
90
90
  paramKey: "path",
91
- title: "Path Variables"
91
+ title: "Variables"
92
92
  }, null, 512), [
93
93
  [
94
94
  r,
95
95
  (e.value === "All" || e.value === "Variables") && ((m = (c = (n = o(y)) == null ? void 0 : n.parameters) == null ? void 0 : c.path) == null ? void 0 : m.length)
96
96
  ]
97
97
  ]),
98
- i(s(h, {
98
+ i(s(f, {
99
99
  paramKey: "cookies",
100
100
  title: "Cookies"
101
101
  }, null, 512), [
102
102
  [r, e.value === "All" || e.value === "Cookies"]
103
103
  ]),
104
- i(s(h, {
104
+ i(s(f, {
105
105
  paramKey: "headers",
106
106
  title: "Headers"
107
107
  }, null, 512), [
108
108
  [r, e.value === "All" || e.value === "Headers"]
109
109
  ]),
110
- i(s(h, {
110
+ i(s(f, {
111
111
  paramKey: "query",
112
112
  title: "Query Parameters"
113
113
  }, null, 512), [
@@ -116,7 +116,7 @@ const D = { class: "flex-1 flex gap-1 items-center lg:pr-24 pointer-events-none
116
116
  i(s(K, { title: "Body" }, null, 512), [
117
117
  [
118
118
  r,
119
- o(l) && (e.value === "All" || e.value === "Body") && o(f)(o(l).method)
119
+ o(l) && (e.value === "All" || e.value === "Body") && o(h)(o(l).method)
120
120
  ]
121
121
  ])
122
122
  ])
@@ -1,7 +1,7 @@
1
- import a from "./RequestSubpageHeader.vue2.js";
1
+ import e from "./RequestSubpageHeader.vue2.js";
2
2
  /* empty css */
3
- import e from "../../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ e(a, [["__scopeId", "data-v-cad1af01"]]);
3
+ import o from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const p = /* @__PURE__ */ o(e, [["__scopeId", "data-v-48474404"]]);
5
5
  export {
6
6
  p as default
7
7
  };
@@ -9,7 +9,7 @@ import B from "./components/WorkspaceDropdown.vue.js";
9
9
  import h from "../../components/OpenApiClientButton.vue.js";
10
10
  import { useWorkspace as z } from "../../store/store.js";
11
11
  import { useLayout as A } from "../../hooks/useLayout.js";
12
- const E = { class: "lg:min-h-header flex items-center w-full justify-center p-2 pt-2 lg:pt-1 lg:p-1 flex-wrap t-app__top-container border-b-1/2" }, M = { class: "flex flex-row items-center gap-1 lg:px-1 lg:mb-0 lg:mb-0 mb-2 lg:flex-1 w-6/12" }, N = { class: "flex flex-row items-center gap-1 lg:px-2.5 lg:mb-0 mb-2 lg:flex-1 justify-end w-6/12" }, J = /* @__PURE__ */ C({
12
+ const E = { class: "lg:min-h-client-header flex items-center w-full justify-center p-2 pt-2 lg:pt-1 lg:p-1 flex-wrap t-app__top-container border-b-1/2" }, M = { class: "flex flex-row items-center gap-1 lg:px-1 lg:mb-0 lg:mb-0 mb-2 lg:flex-1 w-6/12" }, N = { class: "flex flex-row items-center gap-1 lg:px-2.5 lg:mb-0 mb-2 lg:flex-1 justify-end w-6/12" }, J = /* @__PURE__ */ C({
13
13
  __name: "RequestSubpageHeader",
14
14
  props: {
15
15
  modelValue: { type: Boolean },
@@ -17,7 +17,7 @@ const K = { class: "relative col-1 flex-center gap-6 p-2 capitalize" }, A = {
17
17
  a.commandPalette.emit({ commandName: "Create Request" });
18
18
  }, y = (i) => {
19
19
  i != null && i.createNew && v.name === "request" && f();
20
- }, h = "2.2.11";
20
+ }, h = "2.2.15";
21
21
  return R(() => a.hotKeys.on(y)), C(() => a.hotKeys.off(y)), (i, e) => (r(), l("div", K, [
22
22
  o("div", {
23
23
  class: k(["flex h-[calc(100%_-_50px)] flex-col items-center justify-center", {
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "bugs": "https://github.com/scalar/scalar/issues/new/choose",
8
8
  "repository": {
9
9
  "type": "git",
10
- "url": "https://github.com/scalar/scalar.git",
10
+ "url": "git+https://github.com/scalar/scalar.git",
11
11
  "directory": "packages/api-client"
12
12
  },
13
13
  "keywords": [
@@ -18,7 +18,7 @@
18
18
  "rest",
19
19
  "testing"
20
20
  ],
21
- "version": "2.2.11",
21
+ "version": "2.2.15",
22
22
  "engines": {
23
23
  "node": ">=18"
24
24
  },
@@ -169,20 +169,20 @@
169
169
  "whatwg-mimetype": "^4.0.0",
170
170
  "yaml": "^2.4.5",
171
171
  "zod": "^3.23.8",
172
- "@scalar/components": "0.13.4",
172
+ "@scalar/components": "0.13.7",
173
173
  "@scalar/draggable": "0.1.7",
174
+ "@scalar/import": "0.2.9",
174
175
  "@scalar/icons": "0.1.2",
175
- "@scalar/import": "0.2.6",
176
+ "@scalar/oas-utils": "0.2.90",
177
+ "@scalar/openapi-parser": "0.10.1",
178
+ "@scalar/postman-to-openapi": "0.1.13",
176
179
  "@scalar/object-utils": "1.1.12",
177
- "@scalar/openapi-parser": "0.9.0",
180
+ "@scalar/themes": "0.9.57",
178
181
  "@scalar/openapi-types": "0.1.5",
179
- "@scalar/oas-utils": "0.2.87",
180
- "@scalar/themes": "0.9.54",
181
- "@scalar/types": "0.0.23",
182
- "@scalar/postman-to-openapi": "0.1.10",
183
- "@scalar/use-hooks": "0.1.7",
184
- "@scalar/use-codemirror": "0.11.48",
182
+ "@scalar/use-codemirror": "0.11.51",
183
+ "@scalar/use-hooks": "0.1.10",
185
184
  "@scalar/use-toasts": "0.7.7",
185
+ "@scalar/types": "0.0.25",
186
186
  "@scalar/use-tooltip": "1.0.4"
187
187
  },
188
188
  "devDependencies": {