@scalar/api-client 2.1.31 → 2.1.33

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 (54) hide show
  1. package/CHANGELOG.md +21 -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 +3 -3
  5. package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
  6. package/dist/components/CodeInput/CodeInput.vue.js +2 -2
  7. package/dist/components/CodeInput/CodeInput.vue2.js +104 -92
  8. package/dist/components/CodeInput/codeVariableWidget.js +3 -3
  9. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
  10. package/dist/components/CommandPalette/TheCommandPalette.vue.js +4 -4
  11. package/dist/components/CommandPalette/TheCommandPalette.vue2.js +110 -95
  12. package/dist/components/DataTable/DataTableCell.vue.d.ts.map +1 -1
  13. package/dist/components/DataTable/DataTableCell.vue.js +5 -5
  14. package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
  15. package/dist/components/SideNav/SideNav.vue.js +1 -1
  16. package/dist/components/SideNav/SideNav.vue2.js +22 -22
  17. package/dist/components/ViewLayout/ViewLayout.vue.d.ts.map +1 -1
  18. package/dist/components/ViewLayout/ViewLayout.vue.js +4 -4
  19. package/dist/constants.d.ts +1 -1
  20. package/dist/constants.js +1 -1
  21. package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
  22. package/dist/layouts/App/ApiClientApp.vue.js +37 -42
  23. package/dist/layouts/App/MainLayout.vue.d.ts +12 -0
  24. package/dist/layouts/App/MainLayout.vue.d.ts.map +1 -0
  25. package/dist/layouts/App/MainLayout.vue.js +18 -0
  26. package/dist/layouts/App/MainLayout.vue2.js +4 -0
  27. package/dist/layouts/App/create-api-client-app.d.ts +6 -5
  28. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  29. package/dist/layouts/Modal/create-api-client-modal.d.ts +12 -10
  30. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  31. package/dist/layouts/Web/ApiClientWeb.vue.d.ts.map +1 -1
  32. package/dist/layouts/Web/ApiClientWeb.vue.js +26 -31
  33. package/dist/layouts/Web/create-api-client-web.d.ts +6 -5
  34. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  35. package/dist/libs/create-client.d.ts +6 -5
  36. package/dist/libs/create-client.d.ts.map +1 -1
  37. package/dist/libs/create-client.js +21 -18
  38. package/dist/store/store.d.ts +28 -13
  39. package/dist/store/store.d.ts.map +1 -1
  40. package/dist/store/store.js +112 -108
  41. package/dist/store/workspace.d.ts +4 -4
  42. package/dist/style.css +1 -1
  43. package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts +4 -1
  44. package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
  45. package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +61 -48
  46. package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
  47. package/dist/views/Request/RequestSection/RequestBody.vue.js +5 -384
  48. package/dist/views/Request/RequestSection/RequestBody.vue2.js +384 -2
  49. package/dist/views/Request/RequestSection/RequestSection.vue.js +15 -15
  50. package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +1 -1
  51. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  52. package/dist/views/Settings/SettingsGeneral.vue.d.ts.map +1 -1
  53. package/dist/views/Settings/SettingsGeneral.vue.js +90 -65
  54. package/package.json +6 -6
@@ -1,32 +1,39 @@
1
- import { defineComponent as O, ref as c, computed as E, watch as U, onMounted as G, onBeforeUnmount as Q, openBlock as a, createBlock as K, unref as r, withCtx as _, createElementVNode as u, createVNode as f, createTextVNode as M, createElementBlock as m, Fragment as p, withDirectives as T, withKeys as g, withModifiers as A, vModelText as j, renderList as B, toDisplayString as V, vShow as J, normalizeClass as X, createCommentVNode as Y, resolveDynamicComponent as Z, mergeProps as ee, nextTick as W } from "vue";
2
- import { useModal as oe, ScalarIcon as S } from "@scalar/components";
1
+ import { defineComponent as q, ref as i, computed as T, watch as F, onMounted as G, onBeforeUnmount as Q, openBlock as a, createBlock as z, unref as r, withCtx as y, createElementVNode as u, createVNode as p, createTextVNode as K, createElementBlock as m, withDirectives as M, withKeys as w, withModifiers as g, vModelText as j, Fragment as S, renderList as B, toDisplayString as N, vShow as J, normalizeClass as X, createCommentVNode as Y, resolveDynamicComponent as Z, mergeProps as ee, nextTick as V } from "vue";
2
+ import { useModal as oe, ScalarIcon as A } from "@scalar/components";
3
3
  import { Dialog as te, DialogPanel as ne, DialogTitle as ae } from "@headlessui/vue";
4
4
  import { useRouter as le } from "vue-router";
5
- import se from "./CommandPaletteCollection.vue.js";
6
- import re from "./CommandPaletteExample.vue.js";
7
- import me from "./CommandPaletteImport.vue.js";
5
+ import { ROUTES as se } from "../../constants.js";
6
+ import re from "./CommandPaletteCollection.vue.js";
7
+ import me from "./CommandPaletteExample.vue.js";
8
+ import ce from "./CommandPaletteImport.vue.js";
8
9
  import ie from "./CommandPaletteRequest.vue.js";
9
- import ce from "./CommandPaletteServer.vue.js";
10
- import ue from "./CommandPaletteTag.vue.js";
11
- import de from "./CommandPaletteWorkspace.vue.js";
10
+ import ue from "./CommandPaletteServer.vue.js";
11
+ import de from "./CommandPaletteTag.vue.js";
12
+ import pe from "./CommandPaletteWorkspace.vue.js";
12
13
  import { useWorkspace as fe } from "../../store/store.js";
13
- const pe = { class: "bg-b-2 flex items-center rounded-md mb-2.5 pl-2 focus-within:bg-b-1 focus-within:shadow-border" }, ve = { for: "commandmenu" }, Ce = ["onKeydown"], he = ["onClick"], ke = {
14
+ const ve = {
15
+ key: 0,
16
+ class: "flex-1 min-h-0 p-1.5 custom-scroll rounded-lg"
17
+ }, Ce = { class: "bg-b-2 border border-transparent flex items-center rounded-md sticky top-0 pl-2 shadow-[0_-8px_0_8px_var(--scalar-background-1),0_0_8px_8px_var(--scalar-background-1)] focus-within:bg-b-1 focus-within:border-b-3" }, he = { for: "commandmenu" }, xe = ["onKeydown"], _e = ["onClick"], ke = {
14
18
  key: 0,
15
19
  class: "text-c-3 text-center text-sm p-2 pt-3"
16
- }, xe = {
17
- name: "TheCommandPalette"
18
20
  }, be = {
19
- "Import from OpenAPI/Swagger": me,
21
+ key: 1,
22
+ class: "flex-1 p-1.5"
23
+ }, ye = {
24
+ name: "TheCommandPalette"
25
+ }, we = {
26
+ "Import from OpenAPI/Swagger": ce,
20
27
  "Create Request": ie,
21
- "Create Workspace": de,
22
- "Add Tag": ue,
23
- "Add Server": ce,
24
- "Create Collection": se,
25
- "Add Example": re
26
- }, Ee = /* @__PURE__ */ O({
27
- ...xe,
28
- setup(we) {
29
- const D = [
28
+ "Create Workspace": pe,
29
+ "Add Tag": de,
30
+ "Add Server": ue,
31
+ "Create Collection": re,
32
+ "Add Example": me
33
+ }, Be = /* @__PURE__ */ q({
34
+ ...ye,
35
+ setup(ge) {
36
+ const P = [
30
37
  {
31
38
  label: "",
32
39
  commands: [
@@ -74,118 +81,126 @@ const pe = { class: "bg-b-2 flex items-center rounded-md mb-2.5 pl-2 focus-withi
74
81
  path: "/cookies"
75
82
  }
76
83
  ]
84
+ },
85
+ {
86
+ label: "Pages",
87
+ commands: se.map((e) => ({
88
+ name: e.prettyName,
89
+ icon: e.icon,
90
+ path: `/${e.name}`
91
+ }))
77
92
  }
78
- ], d = oe(), { push: N } = le(), { activeWorkspace: H, events: v } = fe(), x = c(), l = c(""), s = c(null), i = c(-1), P = c([]), C = E(
79
- () => D.reduce((o, e) => {
80
- const t = e.commands.filter(
93
+ ], d = oe(), { push: W } = le(), { activeWorkspace: H, events: f } = fe(), x = i(), l = i(""), s = i(null), c = i(-1), $ = i([]), v = T(
94
+ () => P.reduce((e, o) => {
95
+ const t = o.commands.filter(
81
96
  (n) => n.name.toLowerCase().includes(l.value.toLowerCase())
82
97
  );
83
- return [...o, ...t];
98
+ return [...e, ...t];
84
99
  }, [])
85
- ), h = () => {
86
- d.hide(), l.value = "", s.value = null, i.value = -1;
87
- }, q = (o) => {
88
- l.value !== "" && (o == null || o.preventDefault()), s.value = null, W(() => {
89
- var e;
90
- return (e = b.value) == null ? void 0 : e.focus();
100
+ ), C = () => {
101
+ d.hide(), l.value = "", s.value = null, c.value = -1;
102
+ }, O = (e) => {
103
+ l.value !== "" && (e == null || e.preventDefault()), s.value = null, V(() => {
104
+ var o;
105
+ return (o = _.value) == null ? void 0 : o.focus();
91
106
  });
92
- }, $ = (o) => {
93
- "path" in o ? (N(`/workspace/${H.value.uid}${o.path}`), h()) : s.value = o.name;
94
- }, b = c(), I = ({
95
- commandName: o,
96
- metaData: e
107
+ }, D = (e) => {
108
+ "path" in e ? (W(`/workspace/${H.value.uid}${e.path}`), C()) : s.value = e.name;
109
+ }, _ = i(), I = ({
110
+ commandName: e,
111
+ metaData: o
97
112
  } = {}) => {
98
- s.value = o ?? null, x.value = e, d.show(), W(() => {
113
+ s.value = e ?? null, x.value = o, d.show(), V(() => {
99
114
  var t;
100
- return (t = b.value) == null ? void 0 : t.focus();
115
+ return (t = _.value) == null ? void 0 : t.focus();
101
116
  });
102
117
  };
103
- U(l, (o) => {
104
- o && C.value.length > 0 && (i.value = 0);
118
+ F(l, (e) => {
119
+ e && v.value.length > 0 && (c.value = 0);
105
120
  });
106
- const L = (o, e) => {
107
- var k;
121
+ const R = (e, o) => {
122
+ var h;
108
123
  if (!d.open) return;
109
- e.preventDefault();
110
- const t = o === "up" ? -1 : 1, n = C.value.length;
111
- i.value = (i.value + t + n) % n, (k = P.value[i.value]) == null || k.scrollIntoView({
124
+ o.preventDefault();
125
+ const t = e === "up" ? -1 : 1, n = v.value.length;
126
+ c.value = (c.value + t + n) % n, (h = $.value[c.value]) == null || h.scrollIntoView({
112
127
  behavior: "smooth",
113
128
  block: "nearest"
114
129
  });
115
- }, w = E(
116
- () => C.value[i.value]
117
- ), F = (o) => {
118
- !w.value || s.value || (o.preventDefault(), o.stopPropagation(), $(w.value));
119
- }, R = (o) => {
120
- d.open && o != null && o.closeModal && h();
130
+ }, k = T(
131
+ () => v.value[c.value]
132
+ ), U = (e) => {
133
+ !k.value || s.value || (e.preventDefault(), e.stopPropagation(), D(k.value));
134
+ }, L = (e) => {
135
+ d.open && e != null && e.closeModal && C();
121
136
  };
122
137
  return G(() => {
123
- v.commandPalette.on(I), v.hotKeys.on(R);
138
+ f.commandPalette.on(I), f.hotKeys.on(L);
124
139
  }), Q(() => {
125
- v.commandPalette.off(I), v.hotKeys.off(R);
126
- }), (o, e) => (a(), K(r(te), {
140
+ f.commandPalette.off(I), f.hotKeys.off(L);
141
+ }), (e, o) => (a(), z(r(te), {
127
142
  open: r(d).open,
128
- onClose: e[5] || (e[5] = (t) => h())
143
+ onClose: o[5] || (o[5] = (t) => C())
129
144
  }, {
130
- default: _(() => [
131
- e[7] || (e[7] = u("div", { class: "commandmenu-overlay z-overlay" }, null, -1)),
132
- f(r(ne), { class: "commandmenu z-overlay" }, {
133
- default: _(() => [
134
- f(r(ae), { class: "sr-only" }, {
135
- default: _(() => e[6] || (e[6] = [
136
- M("API Client Command Menu")
145
+ default: y(() => [
146
+ o[7] || (o[7] = u("div", { class: "commandmenu-overlay z-overlay" }, null, -1)),
147
+ p(r(ne), { class: "commandmenu z-overlay flex flex-co" }, {
148
+ default: y(() => [
149
+ p(r(ae), { class: "sr-only" }, {
150
+ default: y(() => o[6] || (o[6] = [
151
+ K("API Client Command Menu")
137
152
  ])),
138
153
  _: 1
139
154
  }),
140
- s.value ? (a(), m(p, { key: 1 }, [
155
+ s.value ? (a(), m("div", be, [
141
156
  u("button", {
142
157
  class: "absolute p-0.75 hover:bg-b-3 rounded text-c-3 active:text-c-1 mr-1.5 my-1.25 z-1",
143
158
  type: "button",
144
- onClick: e[3] || (e[3] = (t) => s.value = null)
159
+ onClick: o[3] || (o[3] = (t) => s.value = null)
145
160
  }, [
146
- f(r(S), {
161
+ p(r(A), {
147
162
  icon: "ChevronLeft",
148
163
  size: "md",
149
164
  thickness: "1.5"
150
165
  })
151
166
  ]),
152
- (a(), K(Z(be[s.value]), ee(x.value ? { metaData: x.value } : {}, {
153
- onBack: e[4] || (e[4] = (t) => q(t)),
154
- onClose: h
167
+ (a(), z(Z(we[s.value]), ee(x.value ? { metaData: x.value } : {}, {
168
+ onBack: o[4] || (o[4] = (t) => O(t)),
169
+ onClose: C
155
170
  }), null, 16))
156
- ], 64)) : (a(), m(p, { key: 0 }, [
157
- u("div", pe, [
158
- u("label", ve, [
159
- f(r(S), {
171
+ ])) : (a(), m("div", ve, [
172
+ u("div", Ce, [
173
+ u("label", he, [
174
+ p(r(A), {
160
175
  class: "text-c-2 mr-2.5",
161
176
  icon: "Search",
162
177
  size: "md",
163
178
  thickness: "1.5"
164
179
  })
165
180
  ]),
166
- T(u("input", {
181
+ M(u("input", {
167
182
  id: "commandmenu",
168
183
  ref_key: "commandInputRef",
169
- ref: b,
170
- "onUpdate:modelValue": e[0] || (e[0] = (t) => l.value = t),
184
+ ref: _,
185
+ "onUpdate:modelValue": o[0] || (o[0] = (t) => l.value = t),
171
186
  autocomplete: "off",
172
187
  autofocus: "",
173
188
  class: "w-full rounded bg-none border-none py-1.5 text-sm focus:outline-none",
174
189
  placeholder: "Search commands...",
175
190
  type: "text",
176
191
  onKeydown: [
177
- e[1] || (e[1] = g(A((t) => L("down", t), ["stop"]), ["down"])),
178
- g(A(F, ["stop"]), ["enter"]),
179
- e[2] || (e[2] = g(A((t) => L("up", t), ["stop"]), ["up"]))
192
+ o[1] || (o[1] = w(g((t) => R("down", t), ["stop"]), ["down"])),
193
+ w(g(U, ["stop"]), ["enter"]),
194
+ o[2] || (o[2] = w(g((t) => R("up", t), ["stop"]), ["up"]))
180
195
  ]
181
- }, null, 40, Ce), [
196
+ }, null, 40, xe), [
182
197
  [j, l.value]
183
198
  ])
184
199
  ]),
185
- (a(), m(p, null, B(D, (t) => (a(), m(p, {
200
+ (a(), m(S, null, B(P, (t) => (a(), m(S, {
186
201
  key: t.label
187
202
  }, [
188
- T(u("div", { class: "text-c-3 font-medium text-xs px-2 mb-1 mt-2" }, V(t.label), 513), [
203
+ M(u("div", { class: "text-c-3 font-medium text-xs px-2 mb-1 mt-2" }, N(t.label), 513), [
189
204
  [
190
205
  J,
191
206
  t.commands.filter(
@@ -193,33 +208,33 @@ const pe = { class: "bg-b-2 flex items-center rounded-md mb-2.5 pl-2 focus-withi
193
208
  ).length > 0
194
209
  ]
195
210
  ]),
196
- (a(!0), m(p, null, B(t.commands.filter(
211
+ (a(!0), m(S, null, B(t.commands.filter(
197
212
  (n) => n.name.toLowerCase().includes(l.value.toLowerCase())
198
- ), (n, k) => {
199
- var z;
213
+ ), (n, h) => {
214
+ var E;
200
215
  return a(), m("div", {
201
216
  key: n.name,
202
217
  ref_for: !0,
203
- ref: (y) => {
204
- y && (P.value[k] = y);
218
+ ref: (b) => {
219
+ b && ($.value[h] = b);
205
220
  },
206
221
  class: X(["commandmenu-item text-sm flex items-center py-1.5 px-2 rounded hover:bg-b-2 cursor-pointer", {
207
- "bg-b-2": n.name === ((z = w.value) == null ? void 0 : z.name)
222
+ "bg-b-2": n.name === ((E = k.value) == null ? void 0 : E.name)
208
223
  }]),
209
- onClick: (y) => $(n)
224
+ onClick: (b) => D(n)
210
225
  }, [
211
- f(r(S), {
226
+ p(r(A), {
212
227
  class: "text-c-2 mr-2.5",
213
228
  icon: n.icon,
214
229
  size: "md",
215
230
  thickness: "1.5"
216
231
  }, null, 8, ["icon"]),
217
- M(" " + V(n.name), 1)
218
- ], 10, he);
232
+ K(" " + N(n.name), 1)
233
+ ], 10, _e);
219
234
  }), 128))
220
235
  ], 64))), 64)),
221
- C.value.length ? Y("", !0) : (a(), m("div", ke, " No commands found "))
222
- ], 64))
236
+ v.value.length ? Y("", !0) : (a(), m("div", ke, " No commands found "))
237
+ ]))
223
238
  ]),
224
239
  _: 1
225
240
  })
@@ -229,6 +244,6 @@ const pe = { class: "bg-b-2 flex items-center rounded-md mb-2.5 pl-2 focus-withi
229
244
  }
230
245
  });
231
246
  export {
232
- be as PaletteComponents,
233
- Ee as default
247
+ we as PaletteComponents,
248
+ Be as default
234
249
  };
@@ -1 +1 @@
1
- {"version":3,"file":"DataTableCell.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/DataTableCell.vue"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAkBpC,iBAAS,cAAc;qBAuCM,GAAG;EAe/B;AACD,QAAA,MAAM,eAAe;SApEZ,MAAM,GAAG,SAAS;;SAAlB,MAAM,GAAG,SAAS;;QAAlB,MAAM,GAAG,SAAS;6EA2EzB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAexG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"DataTableCell.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/DataTableCell.vue"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAkBpC,iBAAS,cAAc;qBAsCM,GAAG;EAe/B;AACD,QAAA,MAAM,eAAe;SAnEZ,MAAM,GAAG,SAAS;;SAAlB,MAAM,GAAG,SAAS;;QAAlB,MAAM,GAAG,SAAS;6EA0EzB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAexG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,12 +1,12 @@
1
- import { defineComponent as r, openBlock as o, createBlock as t, resolveDynamicComponent as l, withCtx as a, renderSlot as n } from "vue";
2
- const i = /* @__PURE__ */ r({
1
+ import { defineComponent as r, openBlock as t, createBlock as o, resolveDynamicComponent as l, withCtx as a, renderSlot as n } from "vue";
2
+ const m = /* @__PURE__ */ r({
3
3
  __name: "DataTableCell",
4
4
  props: {
5
5
  is: { default: "td" }
6
6
  },
7
7
  setup(s) {
8
- return (e, d) => (o(), t(l(e.is), {
9
- class: "min-h-8 min-w-8 border-l-0 border-t-0 border-b-1/2 border-r-1/2 flex text-sm last:border-r-0 group-last:border-b-transparent p-0 m-0 relative overflow-hidden",
8
+ return (e, d) => (t(), o(l(e.is), {
9
+ class: "min-h-8 min-w-8 border-l-0 border-t-0 border-b-1/2 border-r-1/2 flex text-sm last:border-r-0 group-last:border-b-transparent p-0 m-0 relative",
10
10
  role: "cell"
11
11
  }, {
12
12
  default: a(() => [
@@ -17,5 +17,5 @@ const i = /* @__PURE__ */ r({
17
17
  }
18
18
  });
19
19
  export {
20
- i as default
20
+ m as default
21
21
  };
@@ -1 +1 @@
1
- {"version":3,"file":"SideNav.vue.d.ts","sourceRoot":"","sources":["../../../src/components/SideNav/SideNav.vue"],"names":[],"mappings":";AAmLA,wBAKG"}
1
+ {"version":3,"file":"SideNav.vue.d.ts","sourceRoot":"","sources":["../../../src/components/SideNav/SideNav.vue"],"names":[],"mappings":";AA+KA,wBAKG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./SideNav.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-26a2bed3"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-b96e8d60"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -1,34 +1,34 @@
1
- import { defineComponent as p, openBlock as o, createElementBlock as r, createElementVNode as e, Fragment as u, renderList as x, unref as i, createVNode as a, withCtx as m, createTextVNode as f, toDisplayString as v } from "vue";
2
- import { ROUTES as N } from "../../constants.js";
3
- import { useRouter as S } from "vue-router";
1
+ import { defineComponent as d, openBlock as n, createElementBlock as r, createElementVNode as e, Fragment as u, renderList as x, unref as o, createVNode as i, withCtx as m, createTextVNode as f, toDisplayString as v } from "vue";
2
+ import { ROUTES as y } from "../../constants.js";
3
+ import { useRouter as N } from "vue-router";
4
4
  import h from "./SideHelp.vue.js";
5
5
  import _ from "./SideNavLink.vue.js";
6
- const y = {
7
- "aria-label": "Side Navigation",
8
- class: "text-c-2 w-15 flex flex-col items-center px-2 py-2 scalar-sidenav relative drag-region bg-b-1 border-t-1/2",
6
+ const S = {
7
+ "aria-label": "App Navigation",
8
+ class: "text-c-2 sm:w-13 flex sm:flex-col justify-center items-center px-2 py-2 scalar-sidenav relative drag-region bg-b-1 border-t-1/2",
9
9
  role: "navigation"
10
- }, b = { class: "flex flex-col gap-1.5" }, k = { class: "mt-auto flex flex-col gap-1.5 py-0.5" }, E = { class: "flex items-center no-drag-region" }, R = { class: "flex items-center no-drag-region" }, F = /* @__PURE__ */ p({
10
+ }, b = { class: "flex sm:flex-col gap-1.5" }, k = { class: "mt-auto flex sm:flex-col gap-1.5 py-0.5" }, E = { class: "flex items-center no-drag-region" }, R = { class: "flex items-center no-drag-region" }, A = /* @__PURE__ */ d({
11
11
  __name: "SideNav",
12
12
  setup(V) {
13
- const { currentRoute: s } = S();
14
- return (w, l) => (o(), r("nav", y, [
13
+ const { currentRoute: a } = N();
14
+ return (w, l) => (n(), r("nav", S, [
15
15
  e("ul", b, [
16
- (o(!0), r(u, null, x(i(N).filter(
16
+ (n(!0), r(u, null, x(o(y).filter(
17
17
  (t) => t.name !== "settings"
18
- ), ({ icon: t, name: n, prettyName: d }, g) => {
18
+ ), ({ icon: t, name: s, prettyName: g }, p) => {
19
19
  var c;
20
- return o(), r("li", {
21
- key: g,
20
+ return n(), r("li", {
21
+ key: p,
22
22
  class: "no-drag-region"
23
23
  }, [
24
- a(_, {
25
- active: (c = i(s).name) == null ? void 0 : c.startsWith(n),
24
+ i(_, {
25
+ active: (c = o(a).name) == null ? void 0 : c.startsWith(s),
26
26
  icon: t,
27
- name: n,
28
- prettyName: d
27
+ name: s,
28
+ prettyName: g
29
29
  }, {
30
30
  default: m(() => [
31
- f(v(n), 1)
31
+ f(v(s), 1)
32
32
  ]),
33
33
  _: 2
34
34
  }, 1032, ["active", "icon", "name", "prettyName"])
@@ -37,8 +37,8 @@ const y = {
37
37
  ]),
38
38
  e("ul", k, [
39
39
  e("li", E, [
40
- a(_, {
41
- active: i(s).name === "settings",
40
+ i(_, {
41
+ active: o(a).name === "settings",
42
42
  icon: "Settings",
43
43
  name: "settings",
44
44
  prettyName: "Settings"
@@ -50,12 +50,12 @@ const y = {
50
50
  }, 8, ["active"])
51
51
  ]),
52
52
  e("li", R, [
53
- a(h)
53
+ i(h)
54
54
  ])
55
55
  ])
56
56
  ]));
57
57
  }
58
58
  });
59
59
  export {
60
- F as default
60
+ A as default
61
61
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ViewLayout.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ViewLayout/ViewLayout.vue"],"names":[],"mappings":"AAeA,iBAAS,cAAc;qBAwBM,GAAG;EAa/B;AACD,QAAA,MAAM,eAAe,+QAKnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"ViewLayout.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ViewLayout/ViewLayout.vue"],"names":[],"mappings":"AAeA,iBAAS,cAAc;qBA2BM,GAAG;EAa/B;AACD,QAAA,MAAM,eAAe,+QAKnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,12 +1,12 @@
1
1
  import { openBlock as o, createElementBlock as r, renderSlot as t } from "vue";
2
2
  import l from "../../_virtual/_plugin-vue_export-helper.js";
3
- const n = {}, c = { class: "flex flex-col min-h-0 flex-1 xl:overflow-hidden md:flex-row leading-3" };
4
- function f(e, s) {
5
- return o(), r("div", c, [
3
+ const d = {}, n = { class: "flex flex-col min-h-0 flex-1 *:border-t-1/2 first:*:border-t-0 md:*:border-t-0 xl:overflow-hidden md:flex-row leading-3" };
4
+ function c(e, f) {
5
+ return o(), r("div", n, [
6
6
  t(e.$slots, "default")
7
7
  ]);
8
8
  }
9
- const a = /* @__PURE__ */ l(n, [["render", f]]);
9
+ const a = /* @__PURE__ */ l(d, [["render", c]]);
10
10
  export {
11
11
  a as default
12
12
  };
@@ -7,7 +7,7 @@ export declare const ROUTES: readonly [{
7
7
  readonly name: "cookies";
8
8
  readonly icon: "Cookie";
9
9
  }, {
10
- readonly prettyName: "Env Vars";
10
+ readonly prettyName: "Environment";
11
11
  readonly name: "environment";
12
12
  readonly icon: "Brackets";
13
13
  }, {
package/dist/constants.js CHANGED
@@ -1,7 +1,7 @@
1
1
  const e = [
2
2
  { prettyName: "Request", name: "request", icon: "ExternalLink" },
3
3
  { prettyName: "Cookies", name: "cookies", icon: "Cookie" },
4
- { prettyName: "Env Vars", name: "environment", icon: "Brackets" },
4
+ { prettyName: "Environment", name: "environment", icon: "Brackets" },
5
5
  { prettyName: "Settings", name: "settings", icon: "Settings" }
6
6
  // { prettyName: 'Servers', name: 'servers', icon: 'Server' },
7
7
  // { label: 'Git Sync', icon: 'Branch', path: '/git-sync' },
@@ -1 +1 @@
1
- {"version":3,"file":"ApiClientApp.vue.d.ts","sourceRoot":"","sources":["../../../src/layouts/App/ApiClientApp.vue"],"names":[],"mappings":";;cAmU8B,MAAM;aAAO,MAAM;;;;cAAnB,MAAM;aAAO,MAAM;;;AANjD,wBAQG"}
1
+ {"version":3,"file":"ApiClientApp.vue.d.ts","sourceRoot":"","sources":["../../../src/layouts/App/ApiClientApp.vue"],"names":[],"mappings":";;cA8R8B,MAAM;aAAO,MAAM;;;;cAAnB,MAAM;aAAO,MAAM;;;AANjD,wBAQG"}
@@ -1,57 +1,52 @@
1
- import { defineComponent as w, ref as T, onBeforeMount as _, onMounted as h, onBeforeUnmount as k, computed as y, openBlock as n, createElementBlock as s, Fragment as N, createElementVNode as i, createVNode as e, unref as r, withCtx as S, createBlock as c, KeepAlive as b, resolveDynamicComponent as x, createCommentVNode as C } from "vue";
2
- import E from "../../components/SideNav/SideNav.vue.js";
3
- import K from "../../components/TopNav/TopNav.vue.js";
4
- import { addScalarClassesToHeadless as H } from "@scalar/components";
5
- import { getThemeStyles as A } from "@scalar/themes";
6
- import { ScalarToasts as B } from "@scalar/use-toasts";
7
- import { RouterView as D } from "vue-router";
8
- import { APP_HOTKEYS as L } from "./hotkeys.js";
9
- import { useDarkModeState as M } from "../../hooks/useDarkModeState.js";
10
- import V from "../../components/CommandPalette/TheCommandPalette.vue.js";
1
+ import { defineComponent as v, ref as w, onBeforeMount as T, onMounted as _, onBeforeUnmount as k, computed as y, openBlock as t, createElementBlock as h, Fragment as N, createElementVNode as S, createVNode as n, unref as r, createBlock as a, withCtx as c, KeepAlive as E, resolveDynamicComponent as K, createCommentVNode as b } from "vue";
2
+ import C from "../../components/TopNav/TopNav.vue.js";
3
+ import H from "./MainLayout.vue.js";
4
+ import { addScalarClassesToHeadless as A } from "@scalar/components";
5
+ import { getThemeStyles as B } from "@scalar/themes";
6
+ import { ScalarToasts as D } from "@scalar/use-toasts";
7
+ import { RouterView as L } from "vue-router";
8
+ import { APP_HOTKEYS as M } from "./hotkeys.js";
9
+ import { useDarkModeState as V } from "../../hooks/useDarkModeState.js";
11
10
  import { DEFAULT_HOTKEYS as W, handleHotKeyDown as g } from "../../libs/hot-keys.js";
12
- import { useWorkspace as P } from "../../store/store.js";
13
- const F = ["innerHTML"], O = {
14
- key: 0,
15
- class: "flex min-h-0 flex-1"
16
- }, U = { class: "flex flex-1 flex-col min-w-0 border-l-1/2 border-t-1/2" }, te = /* @__PURE__ */ w({
11
+ import { useWorkspace as x } from "../../store/store.js";
12
+ const F = ["innerHTML"], X = /* @__PURE__ */ v({
17
13
  __name: "ApiClientApp",
18
14
  emits: ["newTab"],
19
- setup(Y) {
20
- const d = { ...W, ...L }, a = T(null), p = (t) => {
21
- a.value = t;
15
+ setup(O) {
16
+ const i = { ...W, ...M }, m = w(null), p = (o) => {
17
+ m.value = o;
22
18
  };
23
- M();
24
- const o = P(), { events: u } = o;
25
- _(() => H());
26
- const l = (t) => g(t, u.hotKeys, { hotKeys: d });
27
- h(() => window.addEventListener("keydown", l)), k(() => window.removeEventListener("keydown", l));
28
- const f = y(
29
- () => o.activeWorkspace.value && `<style>${A(o.activeWorkspace.value.themeId)}</style>`
19
+ V();
20
+ const e = x(), { events: u } = e;
21
+ T(() => A());
22
+ const s = (o) => g(o, u.hotKeys, { hotKeys: i });
23
+ _(() => window.addEventListener("keydown", s)), k(() => window.removeEventListener("keydown", s));
24
+ const d = y(
25
+ () => e.activeWorkspace.value && `<style>${B(e.activeWorkspace.value.themeId)}</style>`
30
26
  );
31
- return (t, I) => {
32
- var m;
33
- return n(), s(N, null, [
34
- i("div", { innerHTML: f.value }, null, 8, F),
35
- e(K, { openNewTab: a.value }, null, 8, ["openNewTab"]),
36
- (m = r(o).activeWorkspace.value) != null && m.uid ? (n(), s("main", O, [
37
- e(E),
38
- e(r(V)),
39
- i("div", U, [
40
- e(r(D), { onNewTab: p }, {
41
- default: S(({ Component: v }) => [
42
- (n(), c(b, null, [
43
- (n(), c(x(v)))
27
+ return (o, P) => {
28
+ var l;
29
+ return t(), h(N, null, [
30
+ S("div", { innerHTML: d.value }, null, 8, F),
31
+ n(C, { openNewTab: m.value }, null, 8, ["openNewTab"]),
32
+ (l = r(e).activeWorkspace.value) != null && l.uid ? (t(), a(H, { key: 0 }, {
33
+ default: c(() => [
34
+ n(r(L), { onNewTab: p }, {
35
+ default: c(({ Component: f }) => [
36
+ (t(), a(E, null, [
37
+ (t(), a(K(f)))
44
38
  ], 1024))
45
39
  ]),
46
40
  _: 1
47
41
  })
48
- ])
49
- ])) : C("", !0),
50
- e(r(B))
42
+ ]),
43
+ _: 1
44
+ })) : b("", !0),
45
+ n(r(D))
51
46
  ], 64);
52
47
  };
53
48
  }
54
49
  });
55
50
  export {
56
- te as default
51
+ X as default
57
52
  };
@@ -0,0 +1,12 @@
1
+ declare function __VLS_template(): {
2
+ default?(_: {}): any;
3
+ };
4
+ declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
5
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
6
+ export default _default;
7
+ type __VLS_WithTemplateSlots<T, S> = T & {
8
+ new (): {
9
+ $slots: S;
10
+ };
11
+ };
12
+ //# sourceMappingURL=MainLayout.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MainLayout.vue.d.ts","sourceRoot":"","sources":["../../../src/layouts/App/MainLayout.vue"],"names":[],"mappings":"AA6BA,iBAAS,cAAc;qBAmDO,GAAG;EAehC;AACD,QAAA,MAAM,eAAe,+QAKnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { defineComponent as r, openBlock as t, createElementBlock as l, createVNode as e, unref as n, createElementVNode as s, renderSlot as a } from "vue";
2
+ import m from "../../components/SideNav/SideNav.vue.js";
3
+ import c from "../../components/CommandPalette/TheCommandPalette.vue.js";
4
+ const d = { class: "flex flex-col sm:flex-row min-h-0 flex-1" }, f = { class: "flex flex-1 flex-col min-w-0 min-h-0 border-l-1/2 border-t-1/2" }, h = /* @__PURE__ */ r({
5
+ __name: "MainLayout",
6
+ setup(i) {
7
+ return (o, _) => (t(), l("main", d, [
8
+ e(m, { class: "order-last sm:order-none" }),
9
+ e(n(c)),
10
+ s("div", f, [
11
+ a(o.$slots, "default")
12
+ ])
13
+ ]));
14
+ }
15
+ });
16
+ export {
17
+ h as default
18
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./MainLayout.vue.js";
2
+ export {
3
+ f as default
4
+ };