@scalar/api-client 2.1.16 → 2.1.17

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 (36) hide show
  1. package/CHANGELOG.md +8 -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 +67 -66
  5. package/dist/components/ContextBar.vue.js +2 -2
  6. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +2 -2
  7. package/dist/components/SideNav/SideNav.vue.js +2 -2
  8. package/dist/components/SideNav/SideNav.vue2.js +1 -1
  9. package/dist/components/TopNav/TopNav.vue.js +2 -2
  10. package/dist/components/TopNav/TopNav.vue2.js +11 -11
  11. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +1 -1
  12. package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
  13. package/dist/layouts/App/ApiClientApp.vue.js +37 -38
  14. package/dist/layouts/App/hotkeys.d.ts +6 -0
  15. package/dist/layouts/App/hotkeys.d.ts.map +1 -0
  16. package/dist/layouts/App/hotkeys.js +21 -0
  17. package/dist/layouts/Web/ApiClientWeb.vue.d.ts +3 -0
  18. package/dist/layouts/Web/ApiClientWeb.vue.d.ts.map +1 -0
  19. package/dist/layouts/Web/ApiClientWeb.vue.js +57 -0
  20. package/dist/layouts/Web/ApiClientWeb.vue3.js +5 -0
  21. package/dist/layouts/Web/create-api-client-web.d.ts +3593 -0
  22. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -0
  23. package/dist/layouts/Web/create-api-client-web.js +18 -0
  24. package/dist/layouts/Web/index.d.ts +3 -0
  25. package/dist/layouts/Web/index.d.ts.map +1 -0
  26. package/dist/layouts/Web/index.js +7 -0
  27. package/dist/libs/event-busses/hot-keys-bus.d.ts +0 -1
  28. package/dist/libs/event-busses/hot-keys-bus.d.ts.map +1 -1
  29. package/dist/libs/event-busses/hot-keys-bus.js +19 -35
  30. package/dist/style.css +1 -1
  31. package/dist/views/Request/RequestSection/RequestSection.vue.js +1 -1
  32. package/dist/views/Request/RequestSubpageHeader.vue.js +3 -3
  33. package/dist/views/Request/RequestSubpageHeader.vue2.js +2 -2
  34. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  35. package/dist/views/Request/components/WorkspaceDropdown.vue.js +2 -2
  36. package/package.json +7 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @scalar/api-client
2
2
 
3
+ ## 2.1.17
4
+
5
+ ### Patch Changes
6
+
7
+ - 8396e92: style: updates overall alignments
8
+ - 6279c59: feat (api-client): remove tabs on client.scalar.com
9
+ - 5581a28: fix: displays address bar placeholder according to active server
10
+
3
11
  ## 2.1.16
4
12
 
5
13
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"AddressBar.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AddressBar/AddressBar.vue"],"names":[],"mappings":";AAiuBA,wBAKG"}
1
+ {"version":3,"file":"AddressBar.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AddressBar/AddressBar.vue"],"names":[],"mappings":";AAouBA,wBAKG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./AddressBar.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../_virtual/_plugin-vue_export-helper.js";
4
- const f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-1a9f572a"]]);
4
+ const e = /* @__PURE__ */ r(o, [["__scopeId", "data-v-ef489963"]]);
5
5
  export {
6
- f as default
6
+ e as default
7
7
  };
@@ -1,112 +1,113 @@
1
- import { defineComponent as U, ref as i, watch as L, onMounted as O, onBeforeUnmount as A, unref as l, openBlock as K, createElementBlock as N, createElementVNode as o, createVNode as s, withCtx as w, normalizeClass as B, normalizeStyle as T, createCommentVNode as $, pushScopeId as D, popScopeId as P } from "vue";
2
- import Q from "../CodeInput/CodeInput.vue.js";
3
- import { Listbox as W } from "@headlessui/vue";
4
- import { ScalarButton as j, ScalarIcon as F } from "@scalar/components";
5
- import { REQUEST_METHODS as G } from "@scalar/oas-utils/helpers";
6
- import { isMacOS as J } from "@scalar/use-tooltip";
7
- import { useMagicKeys as X, whenever as Y } from "@vueuse/core";
8
- import Z from "../HttpMethod/HttpMethod.vue.js";
9
- import ee from "./AddressBarHistory.vue.js";
10
- import te from "./AddressBarServer.vue.js";
11
- import { executeRequestBus as k } from "../../libs/event-busses/execute-request-bus.js";
12
- import { useWorkspace as le } from "../../store/store.js";
13
- import { requestStatusBus as oe } from "../../libs/event-busses/request-status-bus.js";
14
- import { hotKeyBus as y } from "../../libs/event-busses/hot-keys-bus.js";
15
- const v = (d) => (D("data-v-1a9f572a"), d = d(), P(), d), ae = {
1
+ import { defineComponent as L, ref as i, watch as O, onMounted as A, onBeforeUnmount as K, unref as l, openBlock as N, createElementBlock as T, createElementVNode as o, createVNode as s, withCtx as w, normalizeClass as B, normalizeStyle as $, createCommentVNode as D, pushScopeId as P, popScopeId as Q } from "vue";
2
+ import W from "../CodeInput/CodeInput.vue.js";
3
+ import { Listbox as j } from "@headlessui/vue";
4
+ import { ScalarButton as F, ScalarIcon as G } from "@scalar/components";
5
+ import { REQUEST_METHODS as J } from "@scalar/oas-utils/helpers";
6
+ import { isMacOS as X } from "@scalar/use-tooltip";
7
+ import { useMagicKeys as Y, whenever as Z } from "@vueuse/core";
8
+ import ee from "../HttpMethod/HttpMethod.vue.js";
9
+ import te from "./AddressBarHistory.vue.js";
10
+ import le from "./AddressBarServer.vue.js";
11
+ import { executeRequestBus as S } from "../../libs/event-busses/execute-request-bus.js";
12
+ import { useWorkspace as oe } from "../../store/store.js";
13
+ import { requestStatusBus as ae } from "../../libs/event-busses/request-status-bus.js";
14
+ import { hotKeyBus as k } from "../../libs/event-busses/hot-keys-bus.js";
15
+ const v = (d) => (P("data-v-ef489963"), d = d(), Q(), d), re = {
16
16
  key: 0,
17
17
  class: "order-last lg:order-none lg:w-auto w-full"
18
- }, re = { class: "m-auto flex flex-row items-center" }, se = { class: "pointer-events-none absolute left-0 top-0 z-10 block h-full w-full overflow-hidden" }, ne = { class: "flex gap-1" }, ie = { class: "codemirror-bg-switcher scroll-timeline-x scroll-timeline-x-hidden relative flex w-full" }, ue = /* @__PURE__ */ v(() => /* @__PURE__ */ o("div", { class: "fade-left" }, null, -1)), de = /* @__PURE__ */ v(() => /* @__PURE__ */ o("div", { class: "fade-right" }, null, -1)), fe = /* @__PURE__ */ v(() => /* @__PURE__ */ o("span", { class: "text-xxs relative z-10 lg:flex hidden" }, "Send", -1)), qe = /* @__PURE__ */ U({
18
+ }, se = { class: "m-auto flex flex-row items-center" }, ne = { class: "pointer-events-none absolute left-0 top-0 z-10 block h-full w-full overflow-hidden" }, ie = { class: "flex gap-1" }, ue = { class: "codemirror-bg-switcher scroll-timeline-x scroll-timeline-x-hidden relative flex w-full" }, de = /* @__PURE__ */ v(() => /* @__PURE__ */ o("div", { class: "fade-left" }, null, -1)), ce = /* @__PURE__ */ v(() => /* @__PURE__ */ o("div", { class: "fade-right" }, null, -1)), fe = /* @__PURE__ */ v(() => /* @__PURE__ */ o("span", { class: "text-xxs relative z-10 lg:flex hidden" }, "Send", -1)), Ce = /* @__PURE__ */ L({
19
19
  __name: "AddressBar",
20
20
  setup(d) {
21
21
  const {
22
22
  activeRequest: t,
23
- activeExample: S,
23
+ activeExample: y,
24
+ activeServer: q,
24
25
  isReadOnly: m,
25
- requestMutators: c,
26
- requestHistory: q
27
- } = le(), p = i(q[0]), h = i(null), _ = X();
28
- Y(
29
- J() ? _.meta_enter : _.ctrl_enter,
30
- () => k.emit()
26
+ requestMutators: f,
27
+ requestHistory: C
28
+ } = oe(), p = i(C[0]), h = i(null), _ = Y();
29
+ Z(
30
+ X() ? _.meta_enter : _.ctrl_enter,
31
+ () => S.emit()
31
32
  );
32
- const C = (e) => {
33
- !t.value || t.value.path === e || c.edit(t.value.uid, "path", e);
33
+ const E = (e) => {
34
+ !t.value || t.value.path === e || f.edit(t.value.uid, "path", e);
34
35
  };
35
- L(
36
+ O(
36
37
  () => {
37
38
  var e;
38
39
  return (e = t.value) == null ? void 0 : e.path;
39
40
  },
40
41
  (e) => {
41
- !t.value || !e || C(e);
42
+ !t.value || !e || E(e);
42
43
  }
43
44
  );
44
45
  const a = i(100), x = i(0), r = i(!1), n = i();
45
- function E() {
46
- r.value ? a.value -= (a.value - 15) / 60 : a.value -= x.value / 20, a.value <= 0 && (clearInterval(n.value), n.value = void 0, a.value = 100, r.value = !1);
47
- }
48
46
  function R() {
49
- n.value || (r.value = !0, n.value = setInterval(E, 20));
47
+ r.value ? a.value -= (a.value - 15) / 60 : a.value -= x.value / 20, a.value <= 0 && (clearInterval(n.value), n.value = void 0, a.value = 100, r.value = !1);
50
48
  }
51
49
  function I() {
52
- x.value = a.value, r.value = !1;
50
+ n.value || (r.value = !0, n.value = setInterval(R, 20));
53
51
  }
54
52
  function V() {
53
+ x.value = a.value, r.value = !1;
54
+ }
55
+ function z() {
55
56
  clearInterval(n.value), n.value = void 0, a.value = 100, r.value = !1;
56
57
  }
57
- oe.on((e) => {
58
- e === "start" && R(), e === "stop" && I(), e === "abort" && V();
58
+ ae.on((e) => {
59
+ e === "start" && I(), e === "stop" && V(), e === "abort" && z();
59
60
  });
60
- function z(e) {
61
- t.value && c.edit(t.value.uid, "method", e);
61
+ function M(e) {
62
+ t.value && f.edit(t.value.uid, "method", e);
62
63
  }
63
- function M() {
64
+ function H() {
64
65
  if (!t.value) return;
65
66
  const { method: e } = t.value;
66
- return G[e].backgroundColor;
67
+ return J[e].backgroundColor;
67
68
  }
68
69
  function b() {
69
- r.value || (r.value = !0, k.emit());
70
+ r.value || (r.value = !0, S.emit());
70
71
  }
71
- function H(e) {
72
- t.value && c.edit(t.value.uid, "path", e);
72
+ function U(e) {
73
+ t.value && f.edit(t.value.uid, "path", e);
73
74
  }
74
75
  function g(e) {
75
76
  var u;
76
77
  e.focusAddressBar && ((u = h.value) == null || u.focus());
77
78
  }
78
- return O(() => y.on(g)), A(() => y.off(g)), (e, u) => l(t) && l(S) ? (K(), N("div", ae, [
79
- o("div", re, [
80
- s(l(W), {
79
+ return A(() => k.on(g)), K(() => k.off(g)), (e, u) => l(t) && l(y) ? (N(), T("div", re, [
80
+ o("div", se, [
81
+ s(l(j), {
81
82
  modelValue: p.value,
82
- "onUpdate:modelValue": u[0] || (u[0] = (f) => p.value = f)
83
+ "onUpdate:modelValue": u[0] || (u[0] = (c) => p.value = c)
83
84
  }, {
84
- default: w(({ open: f }) => [
85
+ default: w(({ open: c }) => [
85
86
  o("div", {
86
87
  class: B([
87
88
  "addressbar-bg-states text-xxs relative flex w-full lg:min-w-[720px] lg:max-w-[720px] order-last overflow-hidden lg:order-none flex-1 flex-row items-stretch rounded-lg border-1/2 p-[3px]",
88
- { "border-transparent overflow-visible rounded-b-none": f }
89
+ { "border-transparent overflow-visible rounded-b-none": c }
89
90
  ])
90
91
  }, [
91
- o("div", se, [
92
+ o("div", ne, [
92
93
  o("div", {
93
- class: B(["bg-mix-transparent bg-mix-amount-90 absolute left-0 top-0 h-full w-full", M()]),
94
- style: T({ transform: `translate3d(-${a.value}%,0,0)` })
94
+ class: B(["bg-mix-transparent bg-mix-amount-90 absolute left-0 top-0 h-full w-full", H()]),
95
+ style: $({ transform: `translate3d(-${a.value}%,0,0)` })
95
96
  }, null, 6)
96
97
  ]),
97
- o("div", ne, [
98
- s(Z, {
98
+ o("div", ie, [
99
+ s(ee, {
99
100
  isEditable: !l(m),
100
101
  isSquare: "",
101
102
  method: l(t).method,
102
103
  teleport: ".scalar-client",
103
- onChange: z
104
+ onChange: M
104
105
  }, null, 8, ["isEditable", "method"])
105
106
  ]),
106
- o("div", ie, [
107
- ue,
108
- s(te),
109
- s(Q, {
107
+ o("div", ue, [
108
+ de,
109
+ s(le),
110
+ s(W, {
110
111
  ref_key: "addressBarRef",
111
112
  ref: h,
112
113
  disableCloseBrackets: "",
@@ -115,21 +116,21 @@ const v = (d) => (D("data-v-1a9f572a"), d = d(), P(), d), ae = {
115
116
  disableTabIndent: "",
116
117
  emitOnBlur: !1,
117
118
  modelValue: l(t).path,
118
- placeholder: "Enter URL to get started",
119
+ placeholder: l(q) ? "" : "Enter URL to get started",
119
120
  server: "",
120
121
  onSubmit: b,
121
- "onUpdate:modelValue": H
122
- }, null, 8, ["disabled", "modelValue"]),
123
- de
122
+ "onUpdate:modelValue": U
123
+ }, null, 8, ["disabled", "modelValue", "placeholder"]),
124
+ ce
124
125
  ]),
125
- s(ee, { open: f }, null, 8, ["open"]),
126
- s(l(j), {
126
+ s(te, { open: c }, null, 8, ["open"]),
127
+ s(l(F), {
127
128
  class: "relative h-auto shrink-0 gap-1 overflow-hidden pl-2 pr-2.5 py-1 z-[1] font-bold",
128
129
  disabled: r.value,
129
130
  onClick: b
130
131
  }, {
131
132
  default: w(() => [
132
- s(l(F), {
133
+ s(l(G), {
133
134
  class: "relative z-10 shrink-0 fill-current",
134
135
  icon: "Play",
135
136
  size: "xs"
@@ -143,9 +144,9 @@ const v = (d) => (D("data-v-1a9f572a"), d = d(), P(), d), ae = {
143
144
  _: 1
144
145
  }, 8, ["modelValue"])
145
146
  ])
146
- ])) : $("", !0);
147
+ ])) : D("", !0);
147
148
  }
148
149
  });
149
150
  export {
150
- qe as default
151
+ Ce as default
151
152
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./ContextBar.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-59badb72"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-ba672e06"]]);
5
5
  export {
6
- p as default
6
+ m as default
7
7
  };
@@ -94,9 +94,9 @@ const W = { class: "font-medium m-0 text-sm flex gap-1.5 items-center" }, $ = {
94
94
  r("h2", W, [
95
95
  l(k(((t = e(_)) == null ? void 0 : t.name) ?? "No Environment") + " ", 1),
96
96
  n(e(c), {
97
- class: "size-2.5",
97
+ class: "size-3",
98
98
  icon: "ChevronDown",
99
- thickness: "3.5"
99
+ thickness: "3"
100
100
  })
101
101
  ])
102
102
  ];
@@ -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 p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-34c56294"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-985878af"]]);
5
5
  export {
6
- p as default
6
+ m as default
7
7
  };
@@ -8,7 +8,7 @@ const b = {
8
8
  "aria-label": "Side Navigation",
9
9
  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",
10
10
  role: "navigation"
11
- }, S = { class: "flex flex-col gap-1.5" }, k = { class: "mt-auto flex flex-col py-1.5" }, E = { class: "flex items-center no-drag-region" }, R = { class: "flex items-center no-drag-region" }, O = /* @__PURE__ */ _({
11
+ }, S = { class: "flex flex-col gap-1.5" }, k = { class: "mt-auto flex flex-col py-0.5" }, E = { class: "flex items-center no-drag-region" }, R = { class: "flex items-center no-drag-region" }, O = /* @__PURE__ */ _({
12
12
  __name: "SideNav",
13
13
  setup(V) {
14
14
  const { currentRoute: s } = v();
@@ -1,7 +1,7 @@
1
1
  import o from "./TopNav.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-df123a3c"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-9a66e94b"]]);
5
5
  export {
6
- f as default
6
+ m as default
7
7
  };
@@ -1,13 +1,13 @@
1
- import { defineComponent as z, reactive as A, ref as B, computed as M, watch as y, onMounted as j, onBeforeUnmount as E, openBlock as d, createElementBlock as g, createElementVNode as h, createVNode as n, unref as l, withCtx as u, toDisplayString as O, createTextVNode as C, Fragment as V, renderList as D, createBlock as q, pushScopeId as K, popScopeId as F } from "vue";
1
+ import { defineComponent as z, reactive as A, ref as B, computed as M, watch as y, onMounted as j, onBeforeUnmount as E, openBlock as d, createElementBlock as g, createElementVNode as f, createVNode as n, unref as l, withCtx as u, toDisplayString as O, createTextVNode as C, Fragment as V, renderList as D, createBlock as q, pushScopeId as K, popScopeId as F } from "vue";
2
2
  import H from "../ScalarHotkey.vue.js";
3
3
  import { ROUTES as W } from "../../constants.js";
4
4
  import { useClipboard as G } from "../../hooks/useClipboard.js";
5
- import { ScalarContextMenu as J, ScalarIcon as f, ScalarDropdown as P, ScalarDropdownItem as x } from "@scalar/components";
5
+ import { ScalarContextMenu as J, ScalarIcon as h, ScalarDropdown as P, ScalarDropdownItem as x } from "@scalar/components";
6
6
  import { capitalize as Q } from "@scalar/oas-utils/helpers";
7
7
  import X from "./TopNavItem.vue.js";
8
8
  import { useWorkspace as Y } from "../../store/store.js";
9
9
  import { hotKeyBus as I } from "../../libs/event-busses/hot-keys-bus.js";
10
- const Z = (s) => (K("data-v-df123a3c"), s = s(), F(), s), ee = { class: "flex h-10 t-app__top-nav" }, te = /* @__PURE__ */ Z(() => /* @__PURE__ */ h("div", { class: "t-app__top-nav-draggable" }, null, -1)), oe = { class: "flex h-10 flex-1 items-center gap-1.5 text-sm font-medium pr-1 relative overflow-hidden" }, ae = {
10
+ const Z = (s) => (K("data-v-9a66e94b"), s = s(), F(), s), ee = { class: "flex h-10 t-app__top-nav" }, te = /* @__PURE__ */ Z(() => /* @__PURE__ */ f("div", { class: "t-app__top-nav-draggable" }, null, -1)), oe = { class: "flex h-10 flex-1 items-center gap-1.5 text-sm font-medium pr-1 relative overflow-hidden" }, ae = {
11
11
  key: 0,
12
12
  class: "h-full w-full overflow-hidden"
13
13
  }, de = /* @__PURE__ */ z({
@@ -78,16 +78,16 @@ const Z = (s) => (K("data-v-df123a3c"), s = s(), F(), s), ee = { class: "flex h-
78
78
  { immediate: !0 }
79
79
  ), j(() => I.on(w)), E(() => I.off(w)), (e, a) => (d(), g("nav", ee, [
80
80
  te,
81
- h("div", oe, [
81
+ f("div", oe, [
82
82
  t.length === 1 ? (d(), g("div", ae, [
83
83
  n(l(J), { triggerClass: "flex custom-scroll gap-1.5 h-full items-center justify-center w-full whitespace-nowrap" }, {
84
84
  trigger: u(() => [
85
- n(l(f), {
85
+ n(l(h), {
86
86
  icon: t[0].icon,
87
87
  size: "xs",
88
88
  thickness: "2.5"
89
89
  }, null, 8, ["icon"]),
90
- h("span", null, O(t[0].label), 1)
90
+ f("span", null, O(t[0].label), 1)
91
91
  ]),
92
92
  content: u(() => [
93
93
  n(l(P), {
@@ -100,7 +100,7 @@ const Z = (s) => (K("data-v-df123a3c"), s = s(), F(), s), ee = { class: "flex h-
100
100
  onClick: m
101
101
  }, {
102
102
  default: u(() => [
103
- n(l(f), {
103
+ n(l(h), {
104
104
  icon: "AddTab",
105
105
  size: "sm",
106
106
  thickness: "1.5"
@@ -118,7 +118,7 @@ const Z = (s) => (K("data-v-df123a3c"), s = s(), F(), s), ee = { class: "flex h-
118
118
  onClick: a[0] || (a[0] = (p) => N(T.value))
119
119
  }, {
120
120
  default: u(() => [
121
- n(l(f), {
121
+ n(l(h), {
122
122
  icon: "Link",
123
123
  size: "sm",
124
124
  thickness: "1.5"
@@ -145,12 +145,12 @@ const Z = (s) => (K("data-v-df123a3c"), s = s(), F(), s), ee = { class: "flex h-
145
145
  onCopyUrl: (b) => N(c),
146
146
  onNewTab: m
147
147
  }, null, 8, ["active", "hotkey", "icon", "label", "onClick", "onClose", "onCloseOtherTabs", "onCopyUrl"]))), 128)),
148
- h("button", {
149
- class: "text-c-3 hover:bg-b-3 p-1.5 rounded-lg webkit-app-no-drag",
148
+ f("button", {
149
+ class: "text-c-3 hover:bg-b-3 p-1.5 rounded webkit-app-no-drag",
150
150
  type: "button",
151
151
  onClick: m
152
152
  }, [
153
- n(l(f), {
153
+ n(l(h), {
154
154
  icon: "Add",
155
155
  size: "xs",
156
156
  thickness: "2.5"
@@ -20,7 +20,7 @@ const x = { class: "flex flex-1 items-center gap-1.5 text-c-1" }, g = {
20
20
  defaultOpen: e.defaultOpen
21
21
  }, {
22
22
  default: n(({ open: t }) => [
23
- i(o(m), { class: "hover:text-c-1 group flex w-full items-center gap-1.5 overflow-hidden py-1.5 text-sm font-medium px-1.5" }, {
23
+ i(o(m), { class: "hover:text-c-1 group flex w-full items-center gap-2.5 overflow-hidden py-1.5 text-sm font-medium px-1.5" }, {
24
24
  default: n(() => [
25
25
  i(o(b), {
26
26
  class: "text-c-3 group-hover:text-c-1 ui-open:rotate-90 ui-not-open:rotate-0",
@@ -1 +1 @@
1
- {"version":3,"file":"ApiClientApp.vue.d.ts","sourceRoot":"","sources":["../../../src/layouts/App/ApiClientApp.vue"],"names":[],"mappings":";;cAyI8B,MAAM;aAAO,MAAM;;;;cAAnB,MAAM;aAAO,MAAM;;;AAuMjD,wBAMG"}
1
+ {"version":3,"file":"ApiClientApp.vue.d.ts","sourceRoot":"","sources":["../../../src/layouts/App/ApiClientApp.vue"],"names":[],"mappings":";;cA6I8B,MAAM;aAAO,MAAM;;;;cAAnB,MAAM;aAAO,MAAM;;;AAuMjD,wBAMG"}
@@ -1,65 +1,64 @@
1
- import { defineComponent as w, ref as _, onMounted as c, watchEffect as h, onBeforeMount as k, onBeforeUnmount as T, computed as y, openBlock as t, createElementBlock as i, Fragment as b, createElementVNode as d, createVNode as e, unref as n, withCtx as N, createBlock as p, KeepAlive as g, resolveDynamicComponent as x, createCommentVNode as C } from "vue";
2
- import S from "../../components/SideNav/SideNav.vue.js";
1
+ import { defineComponent as T, ref as _, onMounted as c, watchEffect as h, onBeforeMount as k, onBeforeUnmount as y, computed as b, openBlock as t, createElementBlock as i, Fragment as N, createElementVNode as d, createVNode as e, unref as n, withCtx as S, createBlock as p, KeepAlive as g, resolveDynamicComponent as x, createCommentVNode as E } from "vue";
2
+ import C from "../../components/SideNav/SideNav.vue.js";
3
3
  import L from "../../components/TopNav/TopNav.vue.js";
4
- import { addScalarClassesToHeadless as B } from "@scalar/components";
5
- import { getThemeStyles as D } from "@scalar/themes";
6
- import { ScalarToasts as E } from "@scalar/use-toasts";
7
- import { RouterView as M } from "vue-router";
8
- import H from "../../components/CommandPalette/TheCommandPalette.vue.js";
9
- import { useDarkModeState as V } from "../../hooks/useDarkModeState.js";
10
- import { useWorkspace as W } from "../../store/store.js";
11
- import { handleHotKeyDown as A } from "../../libs/event-busses/hot-keys-bus.js";
12
- const K = ["innerHTML"], z = {
4
+ import { addScalarClassesToHeadless as D } from "@scalar/components";
5
+ import { getThemeStyles as H } from "@scalar/themes";
6
+ import { ScalarToasts as K } from "@scalar/use-toasts";
7
+ import { RouterView as A } from "vue-router";
8
+ import { APP_HOTKEYS as B } from "./hotkeys.js";
9
+ import M from "../../components/CommandPalette/TheCommandPalette.vue.js";
10
+ import { DEFAULT_HOTKEYS as V, handleHotKeyDown as W } from "../../libs/event-busses/hot-keys-bus.js";
11
+ import { useDarkModeState as P } from "../../hooks/useDarkModeState.js";
12
+ import { useWorkspace as F } from "../../store/store.js";
13
+ const O = ["innerHTML"], U = {
13
14
  key: 0,
14
15
  class: "flex min-h-0 flex-1 z-0"
15
- }, F = { class: "flex flex-1 flex-col min-w-0 border-l-1/2 border-t-1/2" }, Z = /* @__PURE__ */ w({
16
+ }, Y = { class: "flex flex-1 flex-col min-w-0 border-l-1/2 border-t-1/2" }, ne = /* @__PURE__ */ T({
16
17
  __name: "ApiClientApp",
17
18
  emits: ["newTab"],
18
- setup(I) {
19
- const r = _(null), u = (o) => {
20
- r.value = o;
19
+ setup(z) {
20
+ const u = { ...V, ...B }, a = _(null), f = (o) => {
21
+ a.value = o;
21
22
  };
22
23
  c(() => {
23
24
  h(() => {
24
25
  document.body.classList.toggle("dark-mode", l.value), document.body.classList.toggle("light-mode", !l.value);
25
26
  });
26
27
  });
27
- const { isDark: l } = V(), a = W();
28
- k(async () => {
29
- B();
30
- });
31
- const s = (o) => A(o);
32
- c(() => window.addEventListener("keydown", s)), T(() => window.removeEventListener("keydown", s));
33
- const f = y(
34
- () => a.activeWorkspace.value && `<style>
35
- ${D(a.activeWorkspace.value.themeId, {
28
+ const { isDark: l } = P(), r = F();
29
+ k(() => D());
30
+ const s = (o) => W(o, { hotKeys: u });
31
+ c(() => window.addEventListener("keydown", s)), y(() => window.removeEventListener("keydown", s));
32
+ const v = b(
33
+ () => r.activeWorkspace.value && `<style>
34
+ ${H(r.activeWorkspace.value.themeId, {
36
35
  fonts: !0
37
36
  })}</style>`
38
37
  );
39
- return (o, P) => {
38
+ return (o, I) => {
40
39
  var m;
41
- return t(), i(b, null, [
42
- d("div", { innerHTML: f.value }, null, 8, K),
43
- e(L, { openNewTab: r.value }, null, 8, ["openNewTab"]),
44
- (m = n(a).activeWorkspace.value) != null && m.uid ? (t(), i("main", z, [
45
- e(S),
46
- e(n(H)),
47
- d("div", F, [
48
- e(n(M), { onNewTab: u }, {
49
- default: N(({ Component: v }) => [
40
+ return t(), i(N, null, [
41
+ d("div", { innerHTML: v.value }, null, 8, O),
42
+ e(L, { openNewTab: a.value }, null, 8, ["openNewTab"]),
43
+ (m = n(r).activeWorkspace.value) != null && m.uid ? (t(), i("main", U, [
44
+ e(C),
45
+ e(n(M)),
46
+ d("div", Y, [
47
+ e(n(A), { onNewTab: f }, {
48
+ default: S(({ Component: w }) => [
50
49
  (t(), p(g, null, [
51
- (t(), p(x(v)))
50
+ (t(), p(x(w)))
52
51
  ], 1024))
53
52
  ]),
54
53
  _: 1
55
54
  })
56
55
  ])
57
- ])) : C("", !0),
58
- e(n(E))
56
+ ])) : E("", !0),
57
+ e(n(K))
59
58
  ], 64);
60
59
  };
61
60
  }
62
61
  });
63
62
  export {
64
- Z as default
63
+ ne as default
65
64
  };
@@ -0,0 +1,6 @@
1
+ import type { HotKeyConfig } from '@scalar/oas-utils/entities/workspace';
2
+ /**
3
+ * Default set of keybindings for the client app
4
+ */
5
+ export declare const APP_HOTKEYS: HotKeyConfig;
6
+ //# sourceMappingURL=hotkeys.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hotkeys.d.ts","sourceRoot":"","sources":["../../../src/layouts/App/hotkeys.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAA;AAExE;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,YAiBzB,CAAA"}
@@ -0,0 +1,21 @@
1
+ const e = {
2
+ t: { event: "addTopNav", modifiers: ["default"] },
3
+ w: { event: "closeTopNav", modifiers: ["default"] },
4
+ ArrowLeft: { event: "navigateTopNavLeft", modifiers: ["default", "Alt"] },
5
+ ArrowRight: { event: "navigateTopNavRight", modifiers: ["default", "Alt"] },
6
+ l: { event: "focusAddressBar", modifiers: ["default"] },
7
+ 1: { event: "jumpToTab", modifiers: ["default"] },
8
+ 2: { event: "jumpToTab", modifiers: ["default"] },
9
+ 3: { event: "jumpToTab", modifiers: ["default"] },
10
+ 4: { event: "jumpToTab", modifiers: ["default"] },
11
+ 5: { event: "jumpToTab", modifiers: ["default"] },
12
+ 6: { event: "jumpToTab", modifiers: ["default"] },
13
+ 7: { event: "jumpToTab", modifiers: ["default"] },
14
+ 8: { event: "jumpToTab", modifiers: ["default"] },
15
+ 9: { event: "jumpToLastTab", modifiers: ["default"] },
16
+ f: { event: "focusRequestSearch", modifiers: ["default"] },
17
+ n: { event: "openCommandPaletteRequest", modifiers: ["default"] }
18
+ };
19
+ export {
20
+ e as APP_HOTKEYS
21
+ };
@@ -0,0 +1,3 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
2
+ export default _default;
3
+ //# sourceMappingURL=ApiClientWeb.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ApiClientWeb.vue.d.ts","sourceRoot":"","sources":["../../../src/layouts/Web/ApiClientWeb.vue"],"names":[],"mappings":";AAmRA,wBAKG"}
@@ -0,0 +1,57 @@
1
+ import { defineComponent as p, onMounted as m, watchEffect as v, onBeforeMount as _, onBeforeUnmount as k, computed as h, openBlock as e, createElementBlock as c, Fragment as w, createElementVNode as i, unref as o, createVNode as t, withCtx as y, createBlock as d, KeepAlive as g, resolveDynamicComponent as x, createCommentVNode as C } from "vue";
2
+ import S from "../../components/SideNav/SideNav.vue.js";
3
+ import { addScalarClassesToHeadless as T } from "@scalar/components";
4
+ import { getThemeStyles as L } from "@scalar/themes";
5
+ import { ScalarToasts as b } from "@scalar/use-toasts";
6
+ import { RouterView as B } from "vue-router";
7
+ import D from "../../components/CommandPalette/TheCommandPalette.vue.js";
8
+ import { useDarkModeState as E } from "../../hooks/useDarkModeState.js";
9
+ import { useWorkspace as M } from "../../store/store.js";
10
+ import { handleHotKeyDown as W } from "../../libs/event-busses/hot-keys-bus.js";
11
+ const H = ["innerHTML"], N = {
12
+ key: 0,
13
+ class: "flex min-h-0 flex-1 z-0"
14
+ }, V = { class: "flex flex-1 flex-col min-w-0 border-l-1/2 border-t-1/2" }, J = /* @__PURE__ */ p({
15
+ __name: "ApiClientWeb",
16
+ setup(K) {
17
+ m(() => {
18
+ v(() => {
19
+ document.body.classList.toggle("dark-mode", r.value), document.body.classList.toggle("light-mode", !r.value);
20
+ });
21
+ });
22
+ const { isDark: r } = E(), n = M();
23
+ _(() => T());
24
+ const a = (l) => W(l);
25
+ m(() => window.addEventListener("keydown", a)), k(() => window.removeEventListener("keydown", a));
26
+ const u = h(
27
+ () => n.activeWorkspace.value && `<style>
28
+ ${L(n.activeWorkspace.value.themeId, {
29
+ fonts: !0
30
+ })}</style>`
31
+ );
32
+ return (l, A) => {
33
+ var s;
34
+ return e(), c(w, null, [
35
+ i("div", { innerHTML: u.value }, null, 8, H),
36
+ (s = o(n).activeWorkspace.value) != null && s.uid ? (e(), c("main", N, [
37
+ t(S),
38
+ t(o(D)),
39
+ i("div", V, [
40
+ t(o(B), null, {
41
+ default: y(({ Component: f }) => [
42
+ (e(), d(g, null, [
43
+ (e(), d(x(f)))
44
+ ], 1024))
45
+ ]),
46
+ _: 1
47
+ })
48
+ ])
49
+ ])) : C("", !0),
50
+ t(o(b))
51
+ ], 64);
52
+ };
53
+ }
54
+ });
55
+ export {
56
+ J as default
57
+ };
@@ -0,0 +1,5 @@
1
+ import o from "./ApiClientWeb.vue.js";
2
+ /* empty css */
3
+ export {
4
+ o as default
5
+ };