@scalar/api-client 2.3.34 → 2.4.1

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 (94) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/dist/components/CodeInput/CodeInput.vue.js +2 -2
  3. package/dist/components/CodeInput/CodeInput.vue2.js +1 -1
  4. package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
  5. package/dist/components/CommandPalette/CommandPaletteImport.vue.js +74 -89
  6. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +4 -0
  7. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
  8. package/dist/components/Server/ServerVariablesForm.vue.d.ts +2 -0
  9. package/dist/components/Server/ServerVariablesForm.vue.d.ts.map +1 -1
  10. package/dist/components/Server/ServerVariablesForm.vue.js +19 -18
  11. package/dist/components/TopNav/TopNavItem.vue.d.ts.map +1 -1
  12. package/dist/components/TopNav/TopNavItem.vue.js +3 -3
  13. package/dist/components/TopNav/TopNavItem.vue2.js +46 -54
  14. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +1 -1
  15. package/dist/hooks/useClientConfig.d.ts +72 -6
  16. package/dist/hooks/useClientConfig.d.ts.map +1 -1
  17. package/dist/layouts/App/ApiClientApp.vue.d.ts +1 -1
  18. package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
  19. package/dist/layouts/App/ApiClientApp.vue.js +45 -40
  20. package/dist/layouts/App/create-api-client-app.d.ts +72 -52
  21. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  22. package/dist/layouts/Modal/create-api-client-modal.d.ts +144 -104
  23. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  24. package/dist/layouts/Web/ApiClientWeb.vue.d.ts.map +1 -1
  25. package/dist/layouts/Web/ApiClientWeb.vue.js +49 -44
  26. package/dist/layouts/Web/create-api-client-web.d.ts +72 -52
  27. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  28. package/dist/libs/create-client.d.ts +72 -52
  29. package/dist/libs/create-client.d.ts.map +1 -1
  30. package/dist/libs/create-client.js +53 -49
  31. package/dist/libs/electron.d.ts +5 -0
  32. package/dist/libs/electron.d.ts.map +1 -0
  33. package/dist/libs/electron.js +4 -0
  34. package/dist/libs/find-request.d.ts +2 -0
  35. package/dist/libs/find-request.d.ts.map +1 -1
  36. package/dist/libs/send-request/create-fetch-query-params.d.ts +10 -3
  37. package/dist/libs/send-request/create-fetch-query-params.d.ts.map +1 -1
  38. package/dist/libs/send-request/create-fetch-query-params.js +28 -6
  39. package/dist/libs/send-request/create-request-operation.d.ts +3 -1
  40. package/dist/libs/send-request/create-request-operation.d.ts.map +1 -1
  41. package/dist/libs/send-request/create-request-operation.js +91 -87
  42. package/dist/libs/send-request/create-request-operation.test.d.ts +2 -0
  43. package/dist/libs/send-request/create-request-operation.test.d.ts.map +1 -1
  44. package/dist/plugins/hooks/usePluginManager.d.ts +8 -0
  45. package/dist/plugins/hooks/usePluginManager.d.ts.map +1 -0
  46. package/dist/plugins/hooks/usePluginManager.js +10 -0
  47. package/dist/plugins/index.d.ts +3 -0
  48. package/dist/plugins/index.d.ts.map +1 -0
  49. package/dist/plugins/index.js +7 -0
  50. package/dist/plugins/plugin-manager.d.ts +28 -0
  51. package/dist/plugins/plugin-manager.d.ts.map +1 -0
  52. package/dist/plugins/plugin-manager.js +24 -0
  53. package/dist/store/active-entities.d.ts +2 -0
  54. package/dist/store/active-entities.d.ts.map +1 -1
  55. package/dist/store/collections.d.ts +4 -4
  56. package/dist/store/cookies.d.ts +4 -4
  57. package/dist/store/environment.d.ts +4 -4
  58. package/dist/store/request-example.d.ts +4 -4
  59. package/dist/store/requests.d.ts +26 -4
  60. package/dist/store/requests.d.ts.map +1 -1
  61. package/dist/store/security-schemes.d.ts +24 -24
  62. package/dist/store/store.d.ts +72 -52
  63. package/dist/store/store.d.ts.map +1 -1
  64. package/dist/store/tags.d.ts +4 -4
  65. package/dist/store/workspace.d.ts +4 -4
  66. package/dist/style.css +1 -1
  67. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  68. package/dist/views/Request/Request.vue.js +2 -2
  69. package/dist/views/Request/RequestRoot.vue.d.ts.map +1 -1
  70. package/dist/views/Request/RequestRoot.vue.js +1 -1
  71. package/dist/views/Request/RequestRoot.vue2.js +47 -45
  72. package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
  73. package/dist/views/Request/RequestSection/RequestParams.vue.js +61 -70
  74. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
  75. package/dist/views/Request/RequestSection/RequestSection.vue.js +2 -2
  76. package/dist/views/Request/RequestSection/RequestSection.vue2.js +92 -77
  77. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
  78. package/dist/views/Request/RequestSection/RequestTable.vue.js +4 -4
  79. package/dist/views/Request/RequestSection/RequestTable.vue2.js +59 -65
  80. package/dist/views/Request/RequestSection/RequestTableTooltip.vue.d.ts.map +1 -1
  81. package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +1 -1
  82. package/dist/views/Request/RequestSection/RequestTableTooltip.vue2.js +34 -35
  83. package/dist/views/Request/RequestSection/types/post-response.d.ts +7 -0
  84. package/dist/views/Request/RequestSection/types/post-response.d.ts.map +1 -0
  85. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  86. package/dist/views/Request/RequestSidebarItem.vue.js +3 -3
  87. package/dist/views/Request/RequestSidebarItem.vue2.js +132 -134
  88. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  89. package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
  90. package/dist/views/Request/ResponseSection/ResponseSection.vue.js +1 -1
  91. package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +82 -70
  92. package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
  93. package/dist/views/Request/components/WorkspaceDropdown.vue.js +80 -114
  94. package/package.json +25 -20
package/CHANGELOG.md CHANGED
@@ -1,5 +1,62 @@
1
1
  # @scalar/api-client
2
2
 
3
+ ## 2.4.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [4440949]
8
+ - @scalar/components@0.14.1
9
+ - @scalar/oas-utils@0.3.1
10
+ - @scalar/object-utils@1.2.1
11
+ - @scalar/openapi-types@0.3.1
12
+ - @scalar/types@0.2.1
13
+ - @scalar/use-codemirror@0.12.1
14
+ - @scalar/import@0.4.1
15
+ - @scalar/postman-to-openapi@0.3.1
16
+ - @scalar/openapi-parser@0.11.0
17
+ - @scalar/snippetz@0.3.0
18
+ - @scalar/themes@0.12.1
19
+ - @scalar/use-hooks@0.2.1
20
+ - @scalar/icons@0.4.1
21
+
22
+ ## 2.4.0
23
+
24
+ ### Minor Changes
25
+
26
+ - 483ca93: chore: require Node 20 (or above)
27
+
28
+ ### Patch Changes
29
+
30
+ - 26476ed: feat: send cross-origin cookies in scalar app
31
+ - 30bab1d: support unexploded serialization of array query params
32
+ - 5613e40: feat(components): scalar tooltip overhaul
33
+ - fe696ab: fix: adds server variable form border for api reference
34
+ - 20cf550: fix: array query params showing on code snippet
35
+ - Updated dependencies [bd602d3]
36
+ - Updated dependencies [b77f67a]
37
+ - Updated dependencies [30bab1d]
38
+ - Updated dependencies [5613e40]
39
+ - Updated dependencies [483ca93]
40
+ - Updated dependencies [1d1470c]
41
+ - Updated dependencies [0efcab4]
42
+ - Updated dependencies [20cf550]
43
+ - @scalar/openapi-parser@0.11.0
44
+ - @scalar/snippetz@0.3.0
45
+ - @scalar/oas-utils@0.3.0
46
+ - @scalar/components@0.14.0
47
+ - @scalar/themes@0.12.0
48
+ - @scalar/postman-to-openapi@0.3.0
49
+ - @scalar/use-codemirror@0.12.0
50
+ - @scalar/openapi-types@0.3.0
51
+ - @scalar/object-utils@1.2.0
52
+ - @scalar/use-tooltip@1.1.0
53
+ - @scalar/use-toasts@0.8.0
54
+ - @scalar/draggable@0.2.0
55
+ - @scalar/use-hooks@0.2.0
56
+ - @scalar/import@0.4.0
57
+ - @scalar/icons@0.4.0
58
+ - @scalar/types@0.2.0
59
+
3
60
  ## 2.3.34
4
61
 
5
62
  ### Patch Changes
@@ -2,7 +2,7 @@ import o from "./CodeInput.vue2.js";
2
2
  /* empty css */
3
3
  /* empty css */
4
4
  import t from "../../_virtual/_plugin-vue_export-helper.js";
5
- const _ = /* @__PURE__ */ t(o, [["__scopeId", "data-v-3834ac3d"]]);
5
+ const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-60ccbed0"]]);
6
6
  export {
7
- _ as default
7
+ e as default
8
8
  };
@@ -20,7 +20,7 @@ const me = { class: "whitespace-nowrap" }, ce = ["id"], be = {
20
20
  class: "centered-y text-orange absolute right-7 text-xs"
21
21
  }, ve = {
22
22
  key: 6,
23
- class: "centered-y group-has-[.cm-focused]:z-1 -right-0.25 absolute flex h-full items-center p-1.5"
23
+ class: "centered-y group-has-[.cm-focused]:z-1 absolute right-0 flex h-full items-center p-1.5"
24
24
  }, he = {
25
25
  key: 7,
26
26
  class: "required centered-y text-xxs text-c-3 group-[.error]:text-red bg-b-1 pointer-events-none absolute right-0 mr-0.5 pr-2 pt-px opacity-100 shadow-[-8px_0_4px_var(--scalar-background-1)] transition-opacity duration-150 group-[.alert]:bg-transparent group-[.error]:bg-transparent group-[.alert]:shadow-none group-[.error]:shadow-none peer-has-[.cm-focused]:opacity-0"
@@ -1 +1 @@
1
- {"version":3,"file":"CommandPaletteImport.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteImport.vue"],"names":[],"mappings":";;;;;;;AAqxBA,wBAOG"}
1
+ {"version":3,"file":"CommandPaletteImport.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteImport.vue"],"names":[],"mappings":";;;;;;;AAwuBA,wBAOG"}
@@ -1,5 +1,5 @@
1
- import { defineComponent as G, ref as R, computed as k, watch as D, createBlock as _, openBlock as n, unref as s, withCtx as v, createElementBlock as c, Fragment as g, createElementVNode as w, createCommentVNode as H, createVNode as C, createTextVNode as f, toDisplayString as V } from "vue";
2
- import { useLoadingState as K, ScalarButton as T, ScalarCodeBlock as Q, ScalarIcon as X, ScalarTooltip as Z } from "@scalar/components";
1
+ import { defineComponent as G, ref as O, computed as I, watch as V, createBlock as P, openBlock as i, unref as s, withCtx as v, createElementBlock as f, Fragment as g, createElementVNode as S, createCommentVNode as H, createVNode as C, createTextVNode as p, toDisplayString as T } from "vue";
2
+ import { useLoadingState as K, ScalarButton as _, ScalarCodeBlock as Q, ScalarIcon as X, ScalarTooltip as Z } from "@scalar/components";
3
3
  import { useToasts as ee } from "@scalar/use-toasts";
4
4
  import { useRouter as te } from "vue-router";
5
5
  import { importCurlCommand as oe } from "../../libs/importers/curl.js";
@@ -7,119 +7,113 @@ import { useActiveEntities as ae } from "../../store/active-entities.js";
7
7
  import le from "./CommandActionForm.vue.js";
8
8
  import ne from "./CommandActionInput.vue.js";
9
9
  import re from "./WatchModeToggle.vue.js";
10
- import { isPostmanCollection as S, getPostmanDocumentDetails as ie, convertPostmanToOpenApi as F } from "../../libs/postman.js";
10
+ import { isPostmanCollection as L, getPostmanDocumentDetails as ie, convertPostmanToOpenApi as F } from "../../libs/postman.js";
11
11
  import { getOpenApiDocumentDetails as se } from "../../libs/getOpenApiDocumentDetails.js";
12
12
  import { isUrl as U } from "../../libs/isUrl.js";
13
13
  import { useFileDialog as ue } from "../../hooks/useFileDialog.js";
14
- import { PathId as M } from "../../routes.js";
14
+ import { PathId as W } from "../../routes.js";
15
15
  import { useWorkspace as ce } from "../../store/store.js";
16
- const me = { class: "flex justify-between" }, de = { class: "flex w-full flex-row items-center justify-between gap-3" }, pe = { class: "w-content bg-b-1 text-xxs text-c-1 pointer-events-none z-10 grid max-w-[320px] gap-1.5 rounded p-2 leading-5 shadow-lg" }, ve = { class: "text-c-2 flex items-center" }, fe = {
17
- key: 0,
18
- class: "text-pretty"
19
- }, ge = {
20
- key: 1,
21
- class: "text-pretty"
22
- }, De = /* @__PURE__ */ G({
16
+ const me = { class: "flex justify-between" }, de = { class: "flex w-full flex-row items-center justify-between gap-3" }, Ae = /* @__PURE__ */ G({
23
17
  __name: "CommandPaletteImport",
24
18
  emits: ["close", "back"],
25
- setup(ye, { emit: N }) {
26
- const P = N, $ = te(), { activeWorkspace: m, activeCollection: B } = ae(), { importSpecFile: b, importSpecFromUrl: W, events: j } = ce(), { toast: d } = ee(), p = K(), a = R(""), y = R(!0), i = k(() => S(a.value) ? ie(a.value) : se(a.value)), A = k(
27
- () => i.value ? i.value.type : "json"
19
+ setup(pe, { emit: N }) {
20
+ const k = N, $ = te(), { activeWorkspace: c, activeCollection: B } = ae(), { importSpecFile: w, importSpecFromUrl: M, events: j } = ce(), { toast: m } = ee(), d = K(), a = O(""), y = O(!0), r = I(() => L(a.value) ? ie(a.value) : se(a.value)), A = I(
21
+ () => r.value ? r.value.type : "json"
28
22
  );
29
23
  function x(t) {
30
24
  var e;
31
25
  t && $.push({
32
26
  name: "collection",
33
27
  params: {
34
- [M.Workspace]: (e = m.value) == null ? void 0 : e.uid,
35
- [M.Collection]: t.uid
28
+ [W.Workspace]: (e = c.value) == null ? void 0 : e.uid,
29
+ [W.Collection]: t.uid
36
30
  }
37
31
  });
38
32
  }
39
- const h = k(() => U(a.value)), z = k(() => !!i.value), { open: E } = ue({
33
+ const h = I(() => U(a.value)), E = I(() => !!r.value), { open: z } = ue({
40
34
  onChange: async (t) => {
41
35
  const e = t == null ? void 0 : t[0];
42
36
  if (e) {
43
- const r = new FileReader();
44
- r.onload = async (I) => {
45
- var u, L, O;
46
- const o = (u = I.target) == null ? void 0 : u.result;
37
+ const n = new FileReader();
38
+ n.onload = async (b) => {
39
+ var u, R, D;
40
+ const o = (u = b.target) == null ? void 0 : u.result;
47
41
  try {
48
- if (S(o)) {
49
- const l = await b(
42
+ if (L(o)) {
43
+ const l = await w(
50
44
  await F(o),
51
- ((L = m.value) == null ? void 0 : L.uid) ?? ""
45
+ ((R = c.value) == null ? void 0 : R.uid) ?? ""
52
46
  );
53
47
  x(l == null ? void 0 : l.collection);
54
48
  } else {
55
- const l = await b(
49
+ const l = await w(
56
50
  o,
57
- ((O = m.value) == null ? void 0 : O.uid) ?? ""
51
+ ((D = c.value) == null ? void 0 : D.uid) ?? ""
58
52
  );
59
53
  x(l == null ? void 0 : l.collection);
60
54
  }
61
- d("Import successful", "info"), P("close");
55
+ m("Import successful", "info"), k("close");
62
56
  } catch (l) {
63
57
  console.error(l);
64
58
  const q = (l == null ? void 0 : l.message) || "Unknown error";
65
- d(`Import failed: ${q}`, "error");
59
+ m(`Import failed: ${q}`, "error");
66
60
  }
67
- }, r.readAsText(e);
61
+ }, n.readAsText(e);
68
62
  }
69
63
  },
70
64
  multiple: !1,
71
65
  accept: ".json,.yaml,.yml"
72
66
  });
73
- D(h, (t) => {
67
+ V(h, (t) => {
74
68
  t || (y.value = !1);
75
- }), D(a, (t) => {
69
+ }), V(a, (t) => {
76
70
  U(t) || (y.value = !1);
77
71
  });
78
72
  async function J() {
79
- var t, e, r, I;
80
- if (!(!a.value || p.isLoading)) {
81
- p.startLoading();
73
+ var t, e, n, b;
74
+ if (!(!a.value || d.isLoading)) {
75
+ d.startLoading();
82
76
  try {
83
77
  if (h.value) {
84
- const [o, u] = await W(
78
+ const [o, u] = await M(
85
79
  a.value,
86
- ((t = m.value) == null ? void 0 : t.uid) ?? "",
80
+ ((t = c.value) == null ? void 0 : t.uid) ?? "",
87
81
  {
88
- proxyUrl: (e = m.value) == null ? void 0 : e.proxyUrl,
82
+ proxyUrl: (e = c.value) == null ? void 0 : e.proxyUrl,
89
83
  watchMode: y.value
90
84
  }
91
85
  );
92
86
  if (x(u == null ? void 0 : u.collection), o) {
93
- d(
87
+ m(
94
88
  "There was a possible CORS error while importing your spec, please make sure this server is allowed in the CORS policy of your OpenAPI document.",
95
89
  "error",
96
90
  { timeout: 5e3 }
97
- ), p.invalidate(2e3, !0);
91
+ ), d.invalidate(2e3, !0);
98
92
  return;
99
93
  }
100
- } else if (z.value)
101
- if (S(a.value)) {
102
- const o = await b(
94
+ } else if (E.value)
95
+ if (L(a.value)) {
96
+ const o = await w(
103
97
  await F(a.value),
104
- ((r = m.value) == null ? void 0 : r.uid) ?? ""
98
+ ((n = c.value) == null ? void 0 : n.uid) ?? ""
105
99
  );
106
- x(o == null ? void 0 : o.collection), d("Successfully converted Postman collection", "info");
100
+ x(o == null ? void 0 : o.collection), m("Successfully converted Postman collection", "info");
107
101
  } else {
108
- const o = await b(
102
+ const o = await w(
109
103
  a.value,
110
- ((I = m.value) == null ? void 0 : I.uid) ?? ""
104
+ ((b = c.value) == null ? void 0 : b.uid) ?? ""
111
105
  );
112
106
  x(o == null ? void 0 : o.collection);
113
107
  }
114
108
  else {
115
- d("Import failed: Invalid URL or OpenAPI document", "error"), p.invalidate(2e3, !0);
109
+ m("Import failed: Invalid URL or OpenAPI document", "error"), d.invalidate(2e3, !0);
116
110
  return;
117
111
  }
118
- p.clear(), P("close"), d("Import successful", "info");
112
+ d.clear(), k("close"), m("Import successful", "info");
119
113
  } catch (o) {
120
114
  console.error("[importCollection]", o);
121
115
  const u = (o == null ? void 0 : o.message) || "Unknown error";
122
- p.invalidate(2e3, !0), d(`Import failed: ${u}`, "error");
116
+ d.invalidate(2e3, !0), m(`Import failed: ${u}`, "error");
123
117
  }
124
118
  }
125
119
  }
@@ -137,20 +131,20 @@ const me = { class: "flex justify-between" }, de = { class: "flex w-full flex-ro
137
131
  }
138
132
  a.value = t;
139
133
  };
140
- return (t, e) => (n(), _(le, {
134
+ return (t, e) => (i(), P(le, {
141
135
  disabled: !a.value.trim(),
142
- loading: s(p),
136
+ loading: s(d),
143
137
  onSubmit: J
144
138
  }, {
145
139
  options: v(() => [
146
- w("div", de, [
147
- C(s(T), {
140
+ S("div", de, [
141
+ C(s(_), {
148
142
  class: "hover:bg-b-2 relative max-h-8 gap-1.5 p-2 text-xs",
149
143
  variant: "outlined",
150
- onClick: s(E)
144
+ onClick: s(z)
151
145
  }, {
152
146
  default: v(() => [
153
- e[5] || (e[5] = f(" JSON, or YAML File ")),
147
+ e[5] || (e[5] = p(" JSON, or YAML File ")),
154
148
  C(s(X), {
155
149
  class: "text-c-3",
156
150
  icon: "Upload",
@@ -160,65 +154,56 @@ const me = { class: "flex justify-between" }, de = { class: "flex w-full flex-ro
160
154
  _: 1
161
155
  }, 8, ["onClick"]),
162
156
  C(s(Z), {
163
- as: "div",
164
- class: "z-[10001]",
165
- side: "bottom",
166
- sideOffset: 5
157
+ content: h.value ? "Watch mode automatically updates the API client when the OpenAPI URL content changes, ensuring your client remains up-to-date." : "Watch mode is only available for URL imports. When enabled it automatically updates the API client when the OpenAPI URL content changes.",
158
+ placement: "bottom"
167
159
  }, {
168
- trigger: v(() => [
160
+ default: v(() => [
169
161
  C(re, {
170
162
  modelValue: y.value,
171
- "onUpdate:modelValue": e[2] || (e[2] = (r) => y.value = r),
163
+ "onUpdate:modelValue": e[2] || (e[2] = (n) => y.value = n),
172
164
  disabled: !h.value
173
165
  }, null, 8, ["modelValue", "disabled"])
174
166
  ]),
175
- content: v(() => [
176
- w("div", pe, [
177
- w("div", ve, [
178
- h.value ? (n(), c("span", fe, " Automatically updates the API client when the OpenAPI URL content changes, ensuring your client remains up-to-date. ")) : (n(), c("span", ge, " Watch Mode is only available for URL imports. It automatically updates the API client when the OpenAPI URL content changes. "))
179
- ])
180
- ])
181
- ]),
182
167
  _: 1
183
- })
168
+ }, 8, ["content"])
184
169
  ])
185
170
  ]),
186
171
  submit: v(() => [
187
- e[6] || (e[6] = f(" Import ")),
188
- h.value ? (n(), c(g, { key: 0 }, [
189
- f(" from URL ")
190
- ], 64)) : i.value && A.value ? (n(), c(g, { key: 1 }, [
191
- i.value.title ? (n(), c(g, { key: 0 }, [
192
- f(' "' + V(i.value.title) + '" ', 1)
193
- ], 64)) : (n(), c(g, { key: 1 }, [
194
- f(V(i.value.version), 1)
172
+ e[6] || (e[6] = p(" Import ")),
173
+ h.value ? (i(), f(g, { key: 0 }, [
174
+ p(" from URL ")
175
+ ], 64)) : r.value && A.value ? (i(), f(g, { key: 1 }, [
176
+ r.value.title ? (i(), f(g, { key: 0 }, [
177
+ p(' "' + T(r.value.title) + '" ', 1)
178
+ ], 64)) : (i(), f(g, { key: 1 }, [
179
+ p(T(r.value.version), 1)
195
180
  ], 64))
196
- ], 64)) : (n(), c(g, { key: 2 }, [
197
- f(" Collection ")
181
+ ], 64)) : (i(), f(g, { key: 2 }, [
182
+ p(" Collection ")
198
183
  ], 64))
199
184
  ]),
200
185
  default: v(() => [
201
- !i.value || s(U)(a.value) ? (n(), _(ne, {
186
+ !r.value || s(U)(a.value) ? (i(), P(ne, {
202
187
  key: 0,
203
188
  modelValue: a.value,
204
189
  placeholder: "OpenAPI/Swagger/Postman URL or cURL",
205
- onOnDelete: e[0] || (e[0] = (r) => P("back", r)),
190
+ onOnDelete: e[0] || (e[0] = (n) => k("back", n)),
206
191
  "onUpdate:modelValue": Y
207
- }, null, 8, ["modelValue"])) : (n(), c(g, { key: 1 }, [
208
- w("div", me, [
209
- e[4] || (e[4] = w("div", { class: "text-c-2 min-h-8 w-full py-2 pl-12 text-center text-xs" }, " Preview ", -1)),
210
- C(s(T), {
192
+ }, null, 8, ["modelValue"])) : (i(), f(g, { key: 1 }, [
193
+ S("div", me, [
194
+ e[4] || (e[4] = S("div", { class: "text-c-2 min-h-8 w-full py-2 pl-12 text-center text-xs" }, " Preview ", -1)),
195
+ C(s(_), {
211
196
  class: "hover:bg-b-2 relative ml-auto max-h-8 gap-1.5 p-2 text-xs",
212
197
  variant: "ghost",
213
- onClick: e[1] || (e[1] = (r) => a.value = "")
198
+ onClick: e[1] || (e[1] = (n) => a.value = "")
214
199
  }, {
215
200
  default: v(() => e[3] || (e[3] = [
216
- f(" Clear ")
201
+ p(" Clear ")
217
202
  ])),
218
203
  _: 1
219
204
  })
220
205
  ]),
221
- i.value && !s(U)(a.value) ? (n(), _(s(Q), {
206
+ r.value && !s(U)(a.value) ? (i(), P(s(Q), {
222
207
  key: 0,
223
208
  class: "bg-b-2 mt-1 max-h-[40dvh] rounded border px-2 py-1 text-sm",
224
209
  content: a.value,
@@ -232,5 +217,5 @@ const me = { class: "flex justify-between" }, de = { class: "flex w-full flex-ro
232
217
  }
233
218
  });
234
219
  export {
235
- De as default
220
+ Ae as default
236
221
  };
@@ -104,11 +104,13 @@ export declare const PaletteComponents: {
104
104
  schema?: unknown;
105
105
  content?: unknown;
106
106
  style?: "matrix" | "simple" | "form" | "label" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
107
+ explode?: boolean | undefined;
107
108
  }[] | undefined;
108
109
  requestBody?: any;
109
110
  responses?: Record<string, any> | undefined;
110
111
  'x-scalar-stability'?: unknown;
111
112
  method?: "options" | "connect" | "delete" | "get" | "head" | "patch" | "post" | "put" | "trace" | undefined;
113
+ 'x-post-response'?: string | undefined;
112
114
  'x-codeSamples'?: unknown;
113
115
  'x-code-samples'?: unknown;
114
116
  'x-custom-examples'?: unknown;
@@ -157,11 +159,13 @@ export declare const PaletteComponents: {
157
159
  schema?: unknown;
158
160
  content?: unknown;
159
161
  style?: "matrix" | "simple" | "form" | "label" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
162
+ explode?: boolean | undefined;
160
163
  }[] | undefined;
161
164
  requestBody?: any;
162
165
  responses?: Record<string, any> | undefined;
163
166
  'x-scalar-stability'?: unknown;
164
167
  method?: "options" | "connect" | "delete" | "get" | "head" | "patch" | "post" | "put" | "trace" | undefined;
168
+ 'x-post-response'?: string | undefined;
165
169
  'x-codeSamples'?: unknown;
166
170
  'x-code-samples'?: unknown;
167
171
  'x-custom-examples'?: unknown;
@@ -1 +1 @@
1
- {"version":3,"file":"TheCommandPalette.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/TheCommandPalette.vue"],"names":[],"mappings":"AA0eA;;;;GAIG;;AACH,wBAmjBI;AAEJ,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;mBAnlB9B,CAvTqC;qBAuTrC,CAtTY;;;;;;;mBAsTZ,CAvTqC;qBAuTrC,CAtTY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+BA6sBkB,CAAC;;;;;;;;;;;;;;;+BAOmD,CAAC;4BAAsC,CAAC;2BAAsC,CAAC;8BAEjK,CAAC;4BAEmC,CAAC;6BACb,CAAC;+BAA8B,CAAC;qCAA+C,CAAC;;0BAI/F,CAAC;2BAA0B,CAAC;yBAAwB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;+BAhBhC,CAAC;;;;;;;;;;;;;;;+BAOmD,CAAC;4BAAsC,CAAC;2BAAsC,CAAC;8BAEjK,CAAC;4BAEmC,CAAC;6BACb,CAAC;+BAA8B,CAAC;qCAA+C,CAAC;;0BAI/F,CAAC;2BAA0B,CAAC;yBAAwB,CAAC;;;;;;;;;;;;;;;;;;CAqLpD,CAAA;AAEV,yCAAyC;AACzC,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,iBAAiB,CAAA;AAEzD,MAAM,MAAM,mBAAmB,GAAG;IAChC,8DAA8D;IAC9D,WAAW,CAAC,EAAE,YAAY,CAAA;IAC1B,iEAAiE;IACjE,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAC/B,CACA"}
1
+ {"version":3,"file":"TheCommandPalette.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/TheCommandPalette.vue"],"names":[],"mappings":"AA0eA;;;;GAIG;;AACH,wBAmjBI;AAEJ,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;mBAnlB9B,CAvTqC;qBAuTrC,CAtTY;;;;;;;mBAsTZ,CAvTqC;qBAuTrC,CAtTY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+BAytBoF,CAAC;;;;;;;;;;;;;;;+BAUzE,CAAC;4BAClB,CAAC;2BACwB,CAAC;8BAA6B,CAAC;4BAAuC,CAAC;6BACnF,CAAC;+BAA8B,CAAC;qCAA+C,CAAC;;0BAC5E,CAAC;2BAA0B,CAAC;yBACnD,CAAC;2BAC2G,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;+BAhBd,CAAC;;;;;;;;;;;;;;;+BAUzE,CAAC;4BAClB,CAAC;2BACwB,CAAC;8BAA6B,CAAC;4BAAuC,CAAC;6BACnF,CAAC;+BAA8B,CAAC;qCAA+C,CAAC;;0BAC5E,CAAC;2BAA0B,CAAC;yBACnD,CAAC;2BAC2G,CAAC;;;;;;;;;;;;;;;;;;;CAyKpG,CAAA;AAEV,yCAAyC;AACzC,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,iBAAiB,CAAA;AAEzD,MAAM,MAAM,mBAAmB,GAAG;IAChC,8DAA8D;IAC9D,WAAW,CAAC,EAAE,YAAY,CAAA;IAC1B,iEAAiE;IACjE,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAC/B,CACA"}
@@ -4,6 +4,8 @@ type __VLS_Props = {
4
4
  values?: ServerVariableValues;
5
5
  /** The ID of the input controlled by the variables form */
6
6
  controls?: string;
7
+ /** The layout of the server variables form */
8
+ layout?: 'client' | 'reference';
7
9
  };
8
10
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
9
11
  "update:variable": (name: string, value: string) => any;
@@ -1 +1 @@
1
- {"version":3,"file":"ServerVariablesForm.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Server/ServerVariablesForm.vue"],"names":[],"mappings":"AA+DA,OAAO,KAAK,EACV,eAAe,EACf,oBAAoB,EACrB,MAAM,2BAA2B,CAAA;AAIlC,KAAK,WAAW,GAAG;IACjB,SAAS,CAAC,EAAE,eAAe,GAAG,SAAS,CAAA;IACvC,MAAM,CAAC,EAAE,oBAAoB,CAAA;IAC7B,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAC;;;;;;AA0IF,wBAOG"}
1
+ {"version":3,"file":"ServerVariablesForm.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Server/ServerVariablesForm.vue"],"names":[],"mappings":"AAmEA,OAAO,KAAK,EACV,eAAe,EACf,oBAAoB,EACrB,MAAM,2BAA2B,CAAA;AAIlC,KAAK,WAAW,GAAG;IACjB,SAAS,CAAC,EAAE,eAAe,GAAG,SAAS,CAAA;IACvC,MAAM,CAAC,EAAE,oBAAoB,CAAA;IAC7B,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,8CAA8C;IAC9C,MAAM,CAAC,EAAE,QAAQ,GAAG,WAAW,CAAA;CAChC,CAAC;;;;;;AA2IF,wBAOG"}
@@ -1,16 +1,17 @@
1
- import { defineComponent as h, createElementBlock as m, createCommentVNode as k, openBlock as o, Fragment as y, renderList as C, createElementVNode as V, createBlock as v, toDisplayString as _ } from "vue";
2
- import B from "./ServerVariablesSelect.vue.js";
3
- import S from "./ServerVariablesTextbox.vue.js";
4
- const $ = { class: "mr-1.5 flex items-center py-1.5 pl-3 after:content-[':'] group-has-[input]/label:mr-0" }, N = /* @__PURE__ */ h({
1
+ import { defineComponent as g, createElementBlock as p, createCommentVNode as y, openBlock as o, Fragment as h, renderList as k, normalizeClass as C, createElementVNode as V, createBlock as f, toDisplayString as B } from "vue";
2
+ import S from "./ServerVariablesSelect.vue.js";
3
+ import $ from "./ServerVariablesTextbox.vue.js";
4
+ const j = { class: "mr-1.5 flex items-center py-1.5 pl-3 after:content-[':'] group-has-[input]/label:mr-0" }, O = /* @__PURE__ */ g({
5
5
  __name: "ServerVariablesForm",
6
6
  props: {
7
7
  variables: {},
8
8
  values: {},
9
- controls: {}
9
+ controls: {},
10
+ layout: { default: "client" }
10
11
  },
11
12
  emits: ["update:variable"],
12
- setup(f, { emit: g }) {
13
- const n = f, d = g;
13
+ setup(n, { emit: v }) {
14
+ const d = v;
14
15
  function s(e, r) {
15
16
  d("update:variable", e, r);
16
17
  }
@@ -18,30 +19,30 @@ const $ = { class: "mr-1.5 flex items-center py-1.5 pl-3 after:content-[':'] gro
18
19
  var r, l, a;
19
20
  return (((r = n.values) == null ? void 0 : r[e]) ?? ((a = (l = n.variables) == null ? void 0 : l[e]) == null ? void 0 : a.default) ?? "").toString();
20
21
  };
21
- return (e, r) => e.variables && Object.keys(e.variables ?? {}).length ? (o(!0), m(y, { key: 0 }, C(Object.keys(e.variables), (l) => {
22
- var a, u, c, p, b;
23
- return o(), m("label", {
22
+ return (e, r) => e.variables && Object.keys(e.variables ?? {}).length ? (o(!0), p(h, { key: 0 }, k(Object.keys(e.variables), (l) => {
23
+ var a, u, c, b, m;
24
+ return o(), p("label", {
24
25
  key: l,
25
- class: "group/label flex w-full"
26
+ class: C(["group/label flex w-full", e.layout === "reference" && "border-x border-b"])
26
27
  }, [
27
- V("span", $, _(l), 1),
28
- (c = (u = (a = e.variables) == null ? void 0 : a[l]) == null ? void 0 : u.enum) != null && c.length ? (o(), v(B, {
28
+ V("span", j, B(l), 1),
29
+ (c = (u = (a = e.variables) == null ? void 0 : a[l]) == null ? void 0 : u.enum) != null && c.length ? (o(), f(S, {
29
30
  key: 0,
30
31
  controls: e.controls,
31
- enum: ((b = (p = e.variables[l]) == null ? void 0 : p.enum) == null ? void 0 : b.map((t) => `${t}`)) ?? [],
32
+ enum: ((m = (b = e.variables[l]) == null ? void 0 : b.enum) == null ? void 0 : m.map((t) => `${t}`)) ?? [],
32
33
  label: l,
33
34
  value: i(l),
34
35
  onChange: (t) => s(l, t)
35
- }, null, 8, ["controls", "enum", "label", "value", "onChange"])) : (o(), v(S, {
36
+ }, null, 8, ["controls", "enum", "label", "value", "onChange"])) : (o(), f($, {
36
37
  key: 1,
37
38
  controls: e.controls,
38
39
  value: i(l),
39
40
  onChange: (t) => s(l, t)
40
41
  }, null, 8, ["controls", "value", "onChange"]))
41
- ]);
42
- }), 128)) : k("", !0);
42
+ ], 2);
43
+ }), 128)) : y("", !0);
43
44
  }
44
45
  });
45
46
  export {
46
- N as default
47
+ O as default
47
48
  };
@@ -1 +1 @@
1
- {"version":3,"file":"TopNavItem.vue.d.ts","sourceRoot":"","sources":["../../../src/components/TopNav/TopNavItem.vue"],"names":[],"mappings":"AA+MA,OAAO,EAQL,KAAK,IAAI,EACV,MAAM,oBAAoB,CAAA;AAO3B,KAAK,WAAW,GAAG;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,OAAO,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,IAAI,CAAA;IACV,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB,CAAC;;;;;;;;;;;;;;AAyVF,wBAQG"}
1
+ {"version":3,"file":"TopNavItem.vue.d.ts","sourceRoot":"","sources":["../../../src/components/TopNav/TopNavItem.vue"],"names":[],"mappings":"AAoMA,OAAO,EAQL,KAAK,IAAI,EACV,MAAM,oBAAoB,CAAA;AAQ3B,KAAK,WAAW,GAAG;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,OAAO,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,IAAI,CAAA;IACV,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB,CAAC;;;;;;;;;;;;;;AAyUF,wBAQG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./TopNavItem.vue2.js";
2
2
  /* empty css */
3
- import a from "../../_virtual/_plugin-vue_export-helper.js";
4
- const r = /* @__PURE__ */ a(o, [["__scopeId", "data-v-ada738af"]]);
3
+ import t from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-8dbdfe92"]]);
5
5
  export {
6
- r as default
6
+ a as default
7
7
  };