@scalar/api-client 2.5.22 → 2.5.24

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 (71) hide show
  1. package/CHANGELOG.md +67 -0
  2. package/README.md +2 -2
  3. package/dist/components/CodeInput/CodeInput.vue.d.ts +0 -3
  4. package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
  5. package/dist/components/CodeInput/CodeInput.vue.js +1 -1
  6. package/dist/components/CodeInput/CodeInput.vue2.js +86 -106
  7. package/dist/components/CodeInput/codeVariableWidget.d.ts.map +1 -1
  8. package/dist/components/CodeInput/codeVariableWidget.js +55 -87
  9. package/dist/components/DataTable/DataTableInput.vue.d.ts +1 -6
  10. package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
  11. package/dist/components/DataTable/DataTableInput.vue.js +3 -3
  12. package/dist/components/EmptyState.vue.d.ts.map +1 -1
  13. package/dist/components/EmptyState.vue.js +1 -1
  14. package/dist/components/EmptyState.vue2.js +12 -12
  15. package/dist/components/Server/ServerVariablesTextbox.vue.d.ts.map +1 -1
  16. package/dist/components/Server/ServerVariablesTextbox.vue.js +1 -1
  17. package/dist/components/Sidebar/SidebarButton.vue.d.ts.map +1 -1
  18. package/dist/components/Sidebar/SidebarButton.vue.js +11 -12
  19. package/dist/components/TopNav/TopNav.vue.js +50 -51
  20. package/dist/components/TopNav/TopNavItem.vue.d.ts.map +1 -1
  21. package/dist/components/TopNav/TopNavItem.vue.js +1 -1
  22. package/dist/components/TopNav/TopNavItem.vue2.js +19 -20
  23. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
  24. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +8 -8
  25. package/dist/layouts/App/create-api-client-app.d.ts +50 -50
  26. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  27. package/dist/layouts/Modal/create-api-client-modal.d.ts +100 -100
  28. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  29. package/dist/layouts/Web/create-api-client-web.d.ts +50 -50
  30. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  31. package/dist/libs/create-client.d.ts +50 -50
  32. package/dist/libs/create-client.d.ts.map +1 -1
  33. package/dist/libs/send-request/create-request-operation.test.d.ts +5 -5
  34. package/dist/libs/send-request/create-request-operation.test.d.ts.map +1 -1
  35. package/dist/store/active-entities.d.ts +5 -5
  36. package/dist/store/active-entities.d.ts.map +1 -1
  37. package/dist/store/request-example.d.ts +50 -50
  38. package/dist/store/request-example.d.ts.map +1 -1
  39. package/dist/store/store.d.ts +50 -50
  40. package/dist/store/store.d.ts.map +1 -1
  41. package/dist/style.css +1 -1
  42. package/dist/views/Collection/components/EnvironmentForm.vue.js +2 -2
  43. package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
  44. package/dist/views/Environment/Environment.vue2.js +14 -15
  45. package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
  46. package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +71 -65
  47. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts.map +1 -1
  48. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +80 -59
  49. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.d.ts.map +1 -1
  50. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.js +52 -52
  51. package/dist/views/Request/RequestSection/RequestBody.vue.js +2 -2
  52. package/dist/views/Request/RequestSection/RequestBody.vue2.js +1 -1
  53. package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts.map +1 -1
  54. package/dist/views/Request/RequestSection/RequestCodeExample.vue.js +2 -2
  55. package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +5 -7
  56. package/dist/views/Request/RequestSection/RequestTable.vue.js +1 -1
  57. package/dist/views/Request/RequestSection/helpers/filter-security-requirements.d.ts.map +1 -1
  58. package/dist/views/Request/RequestSection/helpers/filter-security-requirements.js +26 -13
  59. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.d.ts.map +1 -1
  60. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.js +2 -2
  61. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue2.js +26 -37
  62. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
  63. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +1 -1
  64. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +9 -9
  65. package/package.json +16 -17
  66. package/dist/components/ScalarHotkey.test.d.ts +0 -2
  67. package/dist/components/ScalarHotkey.test.d.ts.map +0 -1
  68. package/dist/components/ScalarHotkey.vue.d.ts +0 -8
  69. package/dist/components/ScalarHotkey.vue.d.ts.map +0 -1
  70. package/dist/components/ScalarHotkey.vue.js +0 -44
  71. package/dist/components/ScalarHotkey.vue2.js +0 -4
@@ -1,17 +1,17 @@
1
- import { defineComponent as z, computed as F, ref as P, onMounted as R, createElementBlock as i, openBlock as l, Fragment as s, renderList as U, createBlock as m, createCommentVNode as v, unref as d, withCtx as n, createVNode as u, createElementVNode as $, toDisplayString as A, mergeProps as V, createTextVNode as w, normalizeClass as I, capitalize as x } from "vue";
2
- import { ScalarMarkdown as D } from "@scalar/components";
1
+ import { defineComponent as F, computed as P, ref as R, onMounted as z, createElementBlock as i, openBlock as l, Fragment as s, renderList as U, createBlock as x, createCommentVNode as v, unref as d, withCtx as n, createVNode as u, createElementVNode as $, toDisplayString as A, mergeProps as V, createTextVNode as m, normalizeClass as I, capitalize as _ } from "vue";
2
+ import { ScalarMarkdownSummary as D } from "@scalar/components";
3
3
  import { safeLocalStorage as N, CLIENT_LS_KEYS as j } from "@scalar/helpers/object/local-storage";
4
4
  import { isDefined as B } from "@scalar/oas-utils/helpers";
5
5
  import { useWorkspace as H } from "../../../../store/store.js";
6
6
  import { updateScheme as Q } from "../helpers/update-scheme.js";
7
7
  import q from "./OAuth2.vue.js";
8
- import k from "./RequestAuthDataTableInput.vue.js";
8
+ import w from "./RequestAuthDataTableInput.vue.js";
9
9
  import f from "../../../../components/DataTable/DataTableRow.vue.js";
10
10
  import L from "../../../../components/DataTable/DataTableCell.vue.js";
11
11
  const J = { class: "bg-b-1 text-c-2 outline-b-3 top-0 z-1 h-full w-full overflow-hidden px-3 py-1.25 text-ellipsis group-hover/auth:absolute group-hover/auth:h-auto group-hover/auth:border-b *:first:line-clamp-1 *:first:text-ellipsis group-hover/auth:*:first:line-clamp-none" }, Y = {
12
12
  key: 0,
13
13
  class: "flex min-h-8 border-t text-base"
14
- }, W = { class: "flex h-8 max-w-full gap-2.5 overflow-x-auto px-3" }, G = ["onClick"], X = { class: "relative z-10" }, ie = /* @__PURE__ */ z({
14
+ }, W = { class: "flex h-8 max-w-full gap-2.5 overflow-x-auto px-3" }, G = ["onClick"], X = { class: "relative z-10" }, ie = /* @__PURE__ */ F({
15
15
  __name: "RequestAuthTab",
16
16
  props: {
17
17
  collection: {},
@@ -23,31 +23,31 @@ const J = { class: "bg-b-1 text-c-2 outline-b-3 top-0 z-1 h-full w-full overflow
23
23
  server: {},
24
24
  workspace: {}
25
25
  },
26
- setup(c) {
27
- const C = H(), { collectionMutators: M, securitySchemes: _, securitySchemeMutators: O } = C, S = F(
28
- () => c.securitySchemeUids.map((t) => ({
29
- scheme: _[t]
26
+ setup(b) {
27
+ const C = H(), { collectionMutators: M, securitySchemes: g, securitySchemeMutators: O } = C, S = P(
28
+ () => b.securitySchemeUids.map((t) => ({
29
+ scheme: g[t]
30
30
  }))
31
- ), p = P(""), T = (t) => {
32
- const r = t.description ? `: ${t.description}` : "", e = `${x(t.nameKey)}${r || `: ${t.type}`}`;
31
+ ), p = R(""), T = (t) => {
32
+ const r = t.description ? `: ${t.description}` : "", e = `${_(t.nameKey)}${r || `: ${t.type}`}`;
33
33
  if (t.type === "apiKey")
34
- return `${x(t.nameKey)}${r || `: ${t.in}`}`;
34
+ return `${_(t.nameKey)}${r || `: ${t.in}`}`;
35
35
  if (t.type === "oauth2") {
36
36
  const o = Object.values(t.flows ?? {})[0];
37
- return `${x(t.nameKey)}: ${p.value ? p.value : (o == null ? void 0 : o.type) ?? ""}${r}`;
37
+ return `${_(t.nameKey)}: ${p.value ? p.value : (o == null ? void 0 : o.type) ?? ""}${r}`;
38
38
  }
39
- return t.type === "http" ? `${x(t.nameKey)}: ${t.scheme}${r}` : `${e}${r}`;
40
- }, g = (t, r, e) => {
41
- Q(t, r, e, C, c.persistAuth);
39
+ return t.type === "http" ? `${_(t.nameKey)}: ${t.scheme}${r}` : `${e}${r}`;
40
+ }, k = (t, r, e) => {
41
+ Q(t, r, e, C, b.persistAuth);
42
42
  };
43
- R(() => {
44
- if (!c.persistAuth)
43
+ z(() => {
44
+ if (!b.persistAuth)
45
45
  return;
46
46
  const t = JSON.parse(
47
47
  N().getItem(j.AUTH) ?? "{}"
48
- ), r = Object.keys(_).reduce(
48
+ ), r = Object.keys(g).reduce(
49
49
  (e, o) => {
50
- const a = _[o];
50
+ const a = g[o];
51
51
  return a && (e[a.nameKey] = a.uid), e;
52
52
  },
53
53
  {}
@@ -61,20 +61,20 @@ const J = { class: "bg-b-1 text-c-2 outline-b-3 top-0 z-1 h-full w-full overflow
61
61
  try {
62
62
  const o = JSON.parse(
63
63
  N().getItem(j.SELECTED_SECURITY_SCHEMES) ?? ""
64
- ).map((a) => Array.isArray(a) ? a.map((b) => r[b]).filter(B) : r[a]).filter(B);
65
- M.edit(c.collection.uid, "selectedSecuritySchemeUids", o);
64
+ ).map((a) => Array.isArray(a) ? a.map((y) => r[y]).filter(B) : r[a]).filter(B);
65
+ M.edit(b.collection.uid, "selectedSecuritySchemeUids", o);
66
66
  } catch {
67
67
  }
68
68
  });
69
- const y = {
70
- environment: c.environment,
71
- envVariables: c.envVariables,
72
- workspace: c.workspace
69
+ const c = {
70
+ environment: b.environment,
71
+ envVariables: b.envVariables,
72
+ workspace: b.workspace
73
73
  };
74
74
  return (t, r) => (l(!0), i(s, null, U(S.value, ({ scheme: e }) => (l(), i(s, {
75
75
  key: e == null ? void 0 : e.uid
76
76
  }, [
77
- S.value.length > 1 && e ? (l(), m(d(f), { key: 0 }, {
77
+ S.value.length > 1 && e ? (l(), x(d(f), { key: 0 }, {
78
78
  default: n(() => [
79
79
  u(d(L), {
80
80
  "aria-label": T(e),
@@ -88,15 +88,15 @@ const J = { class: "bg-b-1 text-c-2 outline-b-3 top-0 z-1 h-full w-full overflow
88
88
  ]),
89
89
  _: 2
90
90
  }, 1024)) : v("", !0),
91
- e != null && e.description && S.value.length <= 1 ? (l(), m(d(f), { key: 1 }, {
91
+ e != null && e.description && S.value.length <= 1 ? (l(), x(d(f), { key: 1 }, {
92
92
  default: n(() => [
93
93
  u(d(L), {
94
- "aria-label": e.description,
95
- class: "text-c-2 group/auth auth-description-container flex items-center whitespace-nowrap outline-none hover:whitespace-normal"
94
+ class: "max-h-[auto]",
95
+ "aria-label": e.description
96
96
  }, {
97
97
  default: n(() => [
98
98
  u(d(D), {
99
- class: "auth-description bg-b-1 text-c-2 outline-b-3 top-0 z-1 h-full w-full px-3 py-1.25 group-hover/auth:absolute group-hover/auth:h-auto group-hover/auth:border-b *:first:line-clamp-1 *:first:text-ellipsis group-hover/auth:*:first:line-clamp-none",
99
+ class: "auth-description bg-b-1 text-c-2 min-w-0 flex-1 px-3 py-1.25",
100
100
  value: e.description
101
101
  }, null, 8, ["value"])
102
102
  ]),
@@ -106,17 +106,17 @@ const J = { class: "bg-b-1 text-c-2 outline-b-3 top-0 z-1 h-full w-full overflow
106
106
  _: 2
107
107
  }, 1024)) : v("", !0),
108
108
  (e == null ? void 0 : e.type) === "http" ? (l(), i(s, { key: 2 }, [
109
- e.scheme === "bearer" ? (l(), m(d(f), { key: 0 }, {
109
+ e.scheme === "bearer" ? (l(), x(d(f), { key: 0 }, {
110
110
  default: n(() => [
111
- u(k, V({ ref_for: !0 }, y, {
111
+ u(w, V({ ref_for: !0 }, c, {
112
112
  containerClass: t.layout === "reference" && "border-t",
113
113
  modelValue: e.token,
114
114
  placeholder: "Token",
115
115
  type: "password",
116
- "onUpdate:modelValue": (o) => g(e.uid, "token", o)
116
+ "onUpdate:modelValue": (o) => k(e.uid, "token", o)
117
117
  }), {
118
118
  default: n(() => r[0] || (r[0] = [
119
- w(" Bearer Token ")
119
+ m(" Bearer Token ")
120
120
  ])),
121
121
  _: 2,
122
122
  __: [0]
@@ -126,15 +126,15 @@ const J = { class: "bg-b-1 text-c-2 outline-b-3 top-0 z-1 h-full w-full overflow
126
126
  }, 1024)) : (e == null ? void 0 : e.scheme) === "basic" ? (l(), i(s, { key: 1 }, [
127
127
  u(d(f), null, {
128
128
  default: n(() => [
129
- u(k, V({ ref_for: !0 }, y, {
129
+ u(w, V({ ref_for: !0 }, c, {
130
130
  class: "text-c-2",
131
131
  modelValue: e.username,
132
132
  placeholder: "janedoe",
133
133
  required: "",
134
- "onUpdate:modelValue": (o) => g(e.uid, "username", o)
134
+ "onUpdate:modelValue": (o) => k(e.uid, "username", o)
135
135
  }), {
136
136
  default: n(() => r[1] || (r[1] = [
137
- w(" Username ")
137
+ m(" Username ")
138
138
  ])),
139
139
  _: 2,
140
140
  __: [1]
@@ -144,14 +144,14 @@ const J = { class: "bg-b-1 text-c-2 outline-b-3 top-0 z-1 h-full w-full overflow
144
144
  }, 1024),
145
145
  u(d(f), null, {
146
146
  default: n(() => [
147
- u(k, V({ ref_for: !0 }, y, {
147
+ u(w, V({ ref_for: !0 }, c, {
148
148
  modelValue: e.password,
149
149
  placeholder: "********",
150
150
  type: "password",
151
- "onUpdate:modelValue": (o) => g(e.uid, "password", o)
151
+ "onUpdate:modelValue": (o) => k(e.uid, "password", o)
152
152
  }), {
153
153
  default: n(() => r[2] || (r[2] = [
154
- w(" Password ")
154
+ m(" Password ")
155
155
  ])),
156
156
  _: 2,
157
157
  __: [2]
@@ -163,14 +163,14 @@ const J = { class: "bg-b-1 text-c-2 outline-b-3 top-0 z-1 h-full w-full overflow
163
163
  ], 64)) : (e == null ? void 0 : e.type) === "apiKey" ? (l(), i(s, { key: 3 }, [
164
164
  u(d(f), null, {
165
165
  default: n(() => [
166
- u(k, V({ ref_for: !0 }, y, {
166
+ u(w, V({ ref_for: !0 }, c, {
167
167
  containerClass: t.layout === "reference" && "border-t",
168
168
  modelValue: e.name,
169
169
  placeholder: "api-key",
170
- "onUpdate:modelValue": (o) => g(e.uid, "name", o)
170
+ "onUpdate:modelValue": (o) => k(e.uid, "name", o)
171
171
  }), {
172
172
  default: n(() => r[3] || (r[3] = [
173
- w(" Name ")
173
+ m(" Name ")
174
174
  ])),
175
175
  _: 2,
176
176
  __: [3]
@@ -180,14 +180,14 @@ const J = { class: "bg-b-1 text-c-2 outline-b-3 top-0 z-1 h-full w-full overflow
180
180
  }, 1024),
181
181
  u(d(f), null, {
182
182
  default: n(() => [
183
- u(k, V({ ref_for: !0 }, y, {
183
+ u(w, V({ ref_for: !0 }, c, {
184
184
  modelValue: e.value,
185
185
  placeholder: "QUxMIFlPVVIgQkFTRSBBUkUgQkVMT05HIFRPIFVT",
186
186
  type: "password",
187
- "onUpdate:modelValue": (o) => g(e.uid, "value", o)
187
+ "onUpdate:modelValue": (o) => k(e.uid, "value", o)
188
188
  }), {
189
189
  default: n(() => r[4] || (r[4] = [
190
- w(" Value ")
190
+ m(" Value ")
191
191
  ])),
192
192
  _: 2,
193
193
  __: [4]
@@ -200,11 +200,11 @@ const J = { class: "bg-b-1 text-c-2 outline-b-3 top-0 z-1 h-full w-full overflow
200
200
  default: n(() => [
201
201
  Object.keys(e.flows).length > 1 ? (l(), i("div", Y, [
202
202
  $("div", W, [
203
- (l(!0), i(s, null, U(e == null ? void 0 : e.flows, (o, a, b) => (l(), i("button", {
203
+ (l(!0), i(s, null, U(e == null ? void 0 : e.flows, (o, a, y) => (l(), i("button", {
204
204
  key: a,
205
205
  class: I(["floating-bg text-c-3 relative cursor-pointer border-b-[1px] border-transparent py-1 text-base font-medium", {
206
- "!text-c-1 !rounded-none border-b-[1px] !border-current": t.layout !== "reference" && (p.value === a || b === 0 && !p.value),
207
- "!text-c-1 !rounded-none border-b-[1px] !border-current opacity-100": t.layout === "reference" && (p.value === a || b === 0 && !p.value)
206
+ "!text-c-1 !rounded-none border-b-[1px] !border-current": t.layout !== "reference" && (p.value === a || y === 0 && !p.value),
207
+ "!text-c-1 !rounded-none border-b-[1px] !border-current opacity-100": t.layout === "reference" && (p.value === a || y === 0 && !p.value)
208
208
  }]),
209
209
  type: "button",
210
210
  onClick: (E) => p.value = a
@@ -216,11 +216,11 @@ const J = { class: "bg-b-1 text-c-2 outline-b-3 top-0 z-1 h-full w-full overflow
216
216
  ]),
217
217
  _: 2
218
218
  }, 1024),
219
- (l(!0), i(s, null, U(e == null ? void 0 : e.flows, (o, a, b) => (l(), i(s, { key: a }, [
220
- p.value === a || b === 0 && !p.value ? (l(), m(q, V({
219
+ (l(!0), i(s, null, U(e == null ? void 0 : e.flows, (o, a, y) => (l(), i(s, { key: a }, [
220
+ p.value === a || y === 0 && !p.value ? (l(), x(q, V({
221
221
  key: 0,
222
222
  ref_for: !0
223
- }, y, {
223
+ }, c, {
224
224
  collection: t.collection,
225
225
  flow: o,
226
226
  persistAuth: t.persistAuth,
@@ -1,7 +1,7 @@
1
1
  import o from "./RequestBody.vue2.js";
2
2
  import "./RequestBody.vue3.js";
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-49d6ce0d"]]);
4
+ const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-a4d93a6f"]]);
5
5
  export {
6
- m as default
6
+ f as default
7
7
  };
@@ -423,7 +423,7 @@ const me = {
423
423
  onUploadFile: W
424
424
  }, null, 8, ["envVariables", "environment", "items", "workspace"])) : (b(), g(ie, {
425
425
  key: 4,
426
- class: "border-t px-1",
426
+ class: "border-t px-3",
427
427
  content: "",
428
428
  envVariables: e.envVariables,
429
429
  environment: e.environment,
@@ -1 +1 @@
1
- {"version":3,"file":"RequestCodeExample.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestCodeExample.vue"],"names":[],"mappings":"AA8RA,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EACT,cAAc,EAEd,MAAM,EACP,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAOrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAMtD,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,cAAc,CAAA;IACvB,SAAS,EAAE,SAAS,CAAA;IACpB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,SAAS,EAAE,SAAS,CAAA;IACpB,WAAW,EAAE,YAAY,CAAA;CAC1B,CAAC;;AA6WF,wBAOG"}
1
+ {"version":3,"file":"RequestCodeExample.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestCodeExample.vue"],"names":[],"mappings":"AA4RA,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EACT,cAAc,EAEd,MAAM,EACP,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAOrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAMtD,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,cAAc,CAAA;IACvB,SAAS,EAAE,SAAS,CAAA;IACpB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,SAAS,EAAE,SAAS,CAAA;IACpB,WAAW,EAAE,YAAY,CAAA;CAC1B,CAAC;;AAwWF,wBAOG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./RequestCodeExample.vue2.js";
2
2
  import "./RequestCodeExample.vue3.js";
3
- import e from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const r = /* @__PURE__ */ e(o, [["__scopeId", "data-v-9e7d5436"]]);
3
+ import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
+ const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-1c71f6b6"]]);
5
5
  export {
6
6
  r as default
7
7
  };
@@ -6,7 +6,7 @@ import q from "../../../components/DataTable/DataTableRow.vue.js";
6
6
  import M from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
7
7
  import P from "../../Components/CodeSnippet/CodeSnippet.vue.js";
8
8
  import { useWorkspace as A } from "../../../store/store.js";
9
- const F = { class: "w-full" }, G = { class: "-mx-1 flex flex-1" }, J = { class: "bg-b-1 flex items-center justify-center overflow-hidden border-t" }, le = /* @__PURE__ */ H({
9
+ const F = { class: "w-full" }, G = { class: "flex flex-1" }, J = { class: "bg-b-1 flex items-center justify-center overflow-hidden border-t" }, le = /* @__PURE__ */ H({
10
10
  __name: "RequestCodeExample",
11
11
  props: {
12
12
  collection: {},
@@ -17,7 +17,7 @@ const F = { class: "w-full" }, G = { class: "-mx-1 flex flex-1" }, J = { class:
17
17
  environment: {}
18
18
  },
19
19
  setup(o) {
20
- var b, K, h, S;
20
+ var K, b, h, S;
21
21
  const { securitySchemes: k, workspaceMutators: w } = A(), f = a(() => {
22
22
  var t, e, l;
23
23
  return d.value.targetKey === "custom" && ((t = u.value) == null ? void 0 : t.some(
@@ -29,9 +29,9 @@ const F = { class: "w-full" }, G = { class: "-mx-1 flex flex-1" }, J = { class:
29
29
  }), u = a(
30
30
  () => o.operation["x-codeSamples"] || o.operation["x-code-samples"] || o.operation["x-custom-examples"]
31
31
  ), d = U(
32
- (b = u.value) != null && b.length ? {
32
+ (K = u.value) != null && K.length ? {
33
33
  targetKey: "custom",
34
- clientKey: (K = u.value[0]) == null ? void 0 : K.lang
34
+ clientKey: (b = u.value[0]) == null ? void 0 : b.lang
35
35
  } : {
36
36
  targetKey: ((h = o.workspace.selectedHttpClient) == null ? void 0 : h.targetKey) ?? "js",
37
37
  clientKey: ((S = o.workspace.selectedHttpClient) == null ? void 0 : S.clientKey) ?? "fetch"
@@ -115,7 +115,7 @@ const F = { class: "w-full" }, G = { class: "-mx-1 flex flex-1" }, J = { class:
115
115
  }, {
116
116
  default: c(() => [
117
117
  i(r(z), {
118
- class: "text-c-1 hover:bg-b-3 flex h-full w-fit gap-1.5 px-1.5 py-0.75 font-normal",
118
+ class: "text-c-2 hover:text-c-1 flex h-full w-fit gap-1.5 px-1.25 py-0.75 font-normal",
119
119
  fullWidth: "",
120
120
  variant: "ghost"
121
121
  }, {
@@ -147,12 +147,10 @@ const F = { class: "w-full" }, G = { class: "-mx-1 flex flex-1" }, J = { class:
147
147
  x("div", J, [
148
148
  g.value ? (y(), C(r(T), {
149
149
  key: 0,
150
- class: "px-3 py-1.5",
151
150
  content: g.value,
152
151
  lang: s.value.id.split(",")[1] ?? "plaintext"
153
152
  }, null, 8, ["content", "lang"])) : (y(), C(r(P), {
154
153
  key: 1,
155
- class: "px-3 py-1.5",
156
154
  client: B.value,
157
155
  example: t.example,
158
156
  operation: t.operation,
@@ -1,7 +1,7 @@
1
1
  import o from "./RequestTable.vue2.js";
2
2
  import "./RequestTable.vue3.js";
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-5831422d"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-04661eb4"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -1 +1 @@
1
- {"version":3,"file":"filter-security-requirements.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/helpers/filter-security-requirements.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAGjF;;GAEG;AACH,eAAO,MAAM,0BAA0B,yBACf,UAAU,CAAC,UAAU,CAAC,+BAChB,UAAU,CAAC,4BAA4B,CAAC,oBACnD,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,KAC9C,cAAc,EAsBhB,CAAA"}
1
+ {"version":3,"file":"filter-security-requirements.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/helpers/filter-security-requirements.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAEjF;;GAEG;AACH,eAAO,MAAM,0BAA0B,yBACf,UAAU,CAAC,UAAU,CAAC,+BAChB,UAAU,CAAC,4BAA4B,CAAC,oBACnD,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,KAC9C,cAAc,EA0DhB,CAAA"}
@@ -1,16 +1,29 @@
1
- import { isDefined as j } from "@scalar/oas-utils/helpers";
2
- const b = (r, f = [], a = {}) => {
3
- const i = new Set(
4
- (r == null ? void 0 : r.map((o) => Object.keys(o).sort().join(","))) ?? []
5
- );
6
- return f.reduce((o, n) => {
7
- const p = Array.isArray(n) ? n : [n], m = p.map((t) => {
8
- var e;
9
- return (e = a[t]) == null ? void 0 : e.nameKey;
10
- }).sort().join(",");
11
- return i.has(m) && o.push(...p.map((t) => a[t]).filter(j)), o;
12
- }, []);
1
+ const m = (s, f = [], a = {}) => {
2
+ if (!s || s.length === 0)
3
+ return [];
4
+ const r = s.filter((n) => Object.keys(n).length > 0);
5
+ if (r.length === 0)
6
+ return [];
7
+ if (f.length === 0) {
8
+ const n = r[0], i = n ? Object.keys(n)[0] : void 0, t = Object.values(a).find((e) => e.nameKey === i);
9
+ return t ? [t] : [];
10
+ }
11
+ const l = new Set(
12
+ r.map((n) => Object.keys(n).sort().join(","))
13
+ ), h = [];
14
+ for (const n of f) {
15
+ const i = Array.isArray(n) ? n : [n], t = [], e = [];
16
+ for (const c of i) {
17
+ const o = a[c];
18
+ o != null && o.nameKey && (t.push(o), e.push(o.nameKey));
19
+ }
20
+ if (e.length > 0) {
21
+ const c = e.sort().join(",");
22
+ l.has(c) && h.push(...t);
23
+ }
24
+ }
25
+ return h;
13
26
  };
14
27
  export {
15
- b as filterSecurityRequirements
28
+ m as filterSecurityRequirements
16
29
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ResponseBodyRaw.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseBodyRaw.vue"],"names":[],"mappings":"AAkHA,OAAO,EAAiB,KAAK,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAM/E,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,GAAG,CAAA;IACZ,QAAQ,EAAE,kBAAkB,GAAG,SAAS,CAAA;CACzC,CAAC;;AAuHF,wBAOG"}
1
+ {"version":3,"file":"ResponseBodyRaw.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseBodyRaw.vue"],"names":[],"mappings":"AAmEA,OAAO,EAAiB,KAAK,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAK/E,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,GAAG,CAAA;IACZ,QAAQ,EAAE,kBAAkB,GAAG,SAAS,CAAA;CACzC,CAAC;;AA8GF,wBAOG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./ResponseBodyRaw.vue2.js";
2
2
  import "./ResponseBodyRaw.vue3.js";
3
- import e from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const s = /* @__PURE__ */ e(o, [["__scopeId", "data-v-27e5c2e0"]]);
3
+ import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
+ const s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-85d2902e"]]);
5
5
  export {
6
6
  s as default
7
7
  };
@@ -1,55 +1,44 @@
1
- import { defineComponent as m, ref as f, toRef as c, createElementBlock as l, openBlock as i, createCommentVNode as y, createElementVNode as e, unref as a, createVNode as b } from "vue";
2
- import { ScalarIcon as v } from "@scalar/components";
3
- import { prettyPrintJson as C } from "@scalar/oas-utils/helpers";
4
- import { useCodeMirror as g } from "@scalar/use-codemirror";
5
- import { useClipboard as _ } from "@scalar/use-hooks/useClipboard";
6
- const k = { class: "body-raw grid min-h-0 overflow-hidden p-px outline-none has-[:focus-visible]:outline" }, w = {
7
- key: 0,
8
- class: "scalar-code-copy"
9
- }, R = {
10
- class: "body-raw-scroller relative overflow-auto overscroll-contain",
1
+ import { defineComponent as u, ref as p, useId as m, toRef as n, createElementBlock as f, openBlock as c, createBlock as _, createCommentVNode as g, createElementVNode as l, unref as s } from "vue";
2
+ import { ScalarCodeBlockCopy as k } from "@scalar/components";
3
+ import { prettyPrintJson as y } from "@scalar/oas-utils/helpers";
4
+ import { useCodeMirror as b } from "@scalar/use-codemirror";
5
+ const v = { class: "scalar-code-block group/code-block body-raw grid min-h-0 overflow-hidden p-px outline-none has-[:focus-visible]:outline" }, C = {
6
+ class: "body-raw-scroller custom-scroll relative pr-1",
11
7
  tabindex: "0"
12
- }, E = /* @__PURE__ */ m({
8
+ }, M = /* @__PURE__ */ u({
13
9
  __name: "ResponseBodyRaw",
14
10
  props: {
15
11
  content: {},
16
12
  language: {}
17
13
  },
18
- setup(d) {
19
- const r = d, n = f(null), { copyToClipboard: u } = _(), { codeMirror: p } = g({
20
- codeMirrorRef: n,
14
+ setup(a) {
15
+ const o = a, t = p(null), d = m(), { codeMirror: i } = b({
16
+ codeMirrorRef: t,
21
17
  readOnly: !0,
22
18
  lineNumbers: !0,
23
- content: c(() => C(r.content)),
24
- language: c(() => r.language),
19
+ content: n(() => y(o.content)),
20
+ language: n(() => o.language),
25
21
  forceFoldGutter: !0
26
- }), s = () => {
27
- var t;
28
- return ((t = p.value) == null ? void 0 : t.state.doc.toString()) || "";
22
+ }), r = () => {
23
+ var e;
24
+ return ((e = i.value) == null ? void 0 : e.state.doc.toString()) || "";
29
25
  };
30
- return (t, o) => (i(), l("div", k, [
31
- s() ? (i(), l("div", w, [
32
- e("button", {
33
- class: "copy-button",
34
- type: "button",
35
- onClick: o[0] || (o[0] = (x) => a(u)(s()))
36
- }, [
37
- o[1] || (o[1] = e("span", { class: "sr-only" }, "Copy content", -1)),
38
- b(a(v), {
39
- icon: "Clipboard",
40
- size: "md"
41
- })
42
- ])
43
- ])) : y("", !0),
44
- e("div", R, [
45
- e("div", {
26
+ return (e, h) => (c(), f("div", v, [
27
+ r() ? (c(), _(s(k), {
28
+ key: 0,
29
+ content: r(),
30
+ controls: s(d),
31
+ class: "z-context top-2 mr-2"
32
+ }, null, 8, ["content", "controls"])) : g("", !0),
33
+ l("div", C, [
34
+ l("div", {
46
35
  ref_key: "codeMirrorRef",
47
- ref: n
36
+ ref: t
48
37
  }, null, 512)
49
38
  ])
50
39
  ]));
51
40
  }
52
41
  });
53
42
  export {
54
- E as default
43
+ M as default
55
44
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ResponseEmpty.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseEmpty.vue"],"names":[],"mappings":"AAoKA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAA;AAC5E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAcrE,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,UAAU,CAAA;IACtB,SAAS,EAAE,SAAS,CAAA;IACpB,SAAS,EAAE,SAAS,CAAA;IACpB,oBAAoB,EAAE,MAAM,CAAA;CAC7B,CAAC;;AAoNF,wBAOG"}
1
+ {"version":3,"file":"ResponseEmpty.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseEmpty.vue"],"names":[],"mappings":"AAqKA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAA;AAC5E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAarE,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,UAAU,CAAA;IACtB,SAAS,EAAE,SAAS,CAAA;IACpB,SAAS,EAAE,SAAS,CAAA;IACpB,oBAAoB,EAAE,MAAM,CAAA;CAC7B,CAAC;;AAoNF,wBAOG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./ResponseEmpty.vue2.js";
2
2
  import "./ResponseEmpty.vue3.js";
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-bb2369d4"]]);
4
+ const s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-6d2bdb61"]]);
5
5
  export {
6
6
  s as default
7
7
  };
@@ -1,9 +1,9 @@
1
- import { defineComponent as q, onMounted as R, onBeforeUnmount as v, createElementBlock as i, openBlock as u, createElementVNode as s, createCommentVNode as c, normalizeClass as y, unref as t, createVNode as m, createTextVNode as p, toDisplayString as h, nextTick as C } from "vue";
2
- import { useRoute as N, useRouter as S } from "vue-router";
1
+ import { defineComponent as q, onMounted as R, onBeforeUnmount as v, createElementBlock as i, openBlock as u, createElementVNode as s, createCommentVNode as c, normalizeClass as y, unref as t, createVNode as m, createTextVNode as p, toDisplayString as h, nextTick as S } from "vue";
2
+ import { ScalarHotkey as d } from "@scalar/components";
3
+ import { useRoute as C, useRouter as N } from "vue-router";
3
4
  import B from "../../../assets/computer.ascii.js";
4
5
  import V from "../../../components/EmptyState.vue.js";
5
6
  import E from "../../../components/ScalarAsciiArt.vue.js";
6
- import d from "../../../components/ScalarHotkey.vue.js";
7
7
  import { useWorkspace as K } from "../../../store/store.js";
8
8
  import { useLayout as A } from "../../../hooks/useLayout.js";
9
9
  const W = { class: "flex-center relative flex flex-1 flex-col gap-6 p-2 capitalize" }, $ = {
@@ -18,7 +18,7 @@ const W = { class: "flex-center relative flex flex-1 flex-col gap-6 p-2 capitali
18
18
  numWorkspaceRequests: {}
19
19
  },
20
20
  setup(r) {
21
- const { events: a, requestMutators: x } = K(), g = N(), b = S(), { layout: n } = A(), f = () => {
21
+ const { events: a, requestMutators: x } = K(), g = C(), b = N(), { layout: n } = A(), f = () => {
22
22
  var l;
23
23
  const o = (l = r.operation.tags) != null && l.length ? { tags: r.operation.tags[0] ? [r.operation.tags[0]] : [] } : {}, e = x.add(o, r.collection.uid);
24
24
  e && (b.push({
@@ -27,14 +27,14 @@ const W = { class: "flex-center relative flex flex-1 flex-col gap-6 p-2 capitali
27
27
  workspace: r.workspace.uid,
28
28
  request: e.uid
29
29
  }
30
- }), C(() => {
30
+ }), S(() => {
31
31
  a.hotKeys.emit({
32
32
  focusAddressBar: new KeyboardEvent("keydown", { key: "l" })
33
33
  });
34
34
  }));
35
35
  }, k = (o) => {
36
36
  o != null && o.createNew && g.name === "request" && f();
37
- }, w = "2.5.22";
37
+ }, w = "2.5.24";
38
38
  return R(() => a.hotKeys.on(k)), v(() => a.hotKeys.off(k)), (o, e) => (u(), i("div", W, [
39
39
  s("div", {
40
40
  class: y(["flex h-[calc(100%_-_50px)] flex-col items-center justify-center", {
@@ -76,7 +76,7 @@ const W = { class: "flex-center relative flex flex-1 flex-col gap-6 p-2 capitali
76
76
  onClick: e[0] || (e[0] = (l) => t(a).commandPalette.emit())
77
77
  }, [
78
78
  e[5] || (e[5] = p(" Get Started ")),
79
- m(d, { hotkey: "k" })
79
+ m(t(d), { hotkey: "k" })
80
80
  ])) : c("", !0),
81
81
  t(n) === "desktop" ? (u(), i("button", {
82
82
  key: 1,
@@ -85,7 +85,7 @@ const W = { class: "flex-center relative flex flex-1 flex-col gap-6 p-2 capitali
85
85
  onClick: e[1] || (e[1] = (l) => f())
86
86
  }, [
87
87
  e[6] || (e[6] = p(" New Request ")),
88
- m(d, { hotkey: "N" })
88
+ m(t(d), { hotkey: "N" })
89
89
  ])) : c("", !0),
90
90
  s("button", {
91
91
  class: "flex items-center gap-1.5",
@@ -93,7 +93,7 @@ const W = { class: "flex-center relative flex flex-1 flex-col gap-6 p-2 capitali
93
93
  onClick: e[2] || (e[2] = (l) => t(a).executeRequest.emit())
94
94
  }, [
95
95
  e[7] || (e[7] = p(" Send Request ")),
96
- m(d, { hotkey: "↵" })
96
+ m(t(d), { hotkey: "↵" })
97
97
  ])
98
98
  ])
99
99
  ]));
package/package.json CHANGED
@@ -18,7 +18,7 @@
18
18
  "rest",
19
19
  "testing"
20
20
  ],
21
- "version": "2.5.22",
21
+ "version": "2.5.24",
22
22
  "engines": {
23
23
  "node": ">=20"
24
24
  },
@@ -205,23 +205,22 @@
205
205
  "whatwg-mimetype": "^4.0.0",
206
206
  "yaml": "2.8.0",
207
207
  "zod": "3.24.1",
208
- "@scalar/components": "0.14.23",
208
+ "@scalar/components": "0.14.25",
209
+ "@scalar/helpers": "0.0.8",
210
+ "@scalar/icons": "0.4.7",
211
+ "@scalar/oas-utils": "0.4.20",
209
212
  "@scalar/draggable": "0.2.0",
210
- "@scalar/helpers": "0.0.7",
211
- "@scalar/icons": "0.4.6",
212
- "@scalar/import": "0.4.16",
213
- "@scalar/oas-utils": "0.4.18",
213
+ "@scalar/object-utils": "1.2.4",
214
+ "@scalar/import": "0.4.18",
214
215
  "@scalar/openapi-types": "0.3.7",
215
- "@scalar/object-utils": "1.2.3",
216
- "@scalar/snippetz": "0.4.4",
217
- "@scalar/openapi-parser": "0.19.0",
218
- "@scalar/postman-to-openapi": "0.3.21",
219
- "@scalar/themes": "0.13.12",
220
- "@scalar/types": "0.2.11",
221
- "@scalar/use-codemirror": "0.12.24",
216
+ "@scalar/openapi-parser": "0.20.0",
217
+ "@scalar/postman-to-openapi": "0.3.23",
218
+ "@scalar/snippetz": "0.4.5",
219
+ "@scalar/themes": "0.13.13",
220
+ "@scalar/types": "0.2.12",
221
+ "@scalar/use-codemirror": "0.12.26",
222
222
  "@scalar/use-hooks": "0.2.4",
223
- "@scalar/use-toasts": "0.8.0",
224
- "@scalar/use-tooltip": "1.1.0"
223
+ "@scalar/use-toasts": "0.8.0"
225
224
  },
226
225
  "devDependencies": {
227
226
  "@tailwindcss/vite": "^4.1.7",
@@ -234,8 +233,8 @@
234
233
  "vite": "6.1.6",
235
234
  "vite-svg-loader": "^5.1.0",
236
235
  "vitest": "^3.2.4",
237
- "@scalar/build-tooling": "0.2.4",
238
- "@scalar/galaxy": "0.5.5"
236
+ "@scalar/galaxy": "0.5.7",
237
+ "@scalar/build-tooling": "0.2.6"
239
238
  },
240
239
  "scripts": {
241
240
  "build": "scalar-build-vite",
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=ScalarHotkey.test.d.ts.map