@scalar/api-client 2.0.46 → 2.0.48

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 (93) hide show
  1. package/CHANGELOG.md +44 -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 +77 -71
  5. package/dist/components/CodeInput/CodeInput.vue.d.ts +3 -1
  6. package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
  7. package/dist/components/CodeInput/CodeInput.vue.js +2 -2
  8. package/dist/components/CodeInput/CodeInput.vue2.js +49 -44
  9. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
  10. package/dist/components/CommandPalette/TheCommandPalette.vue.js +2 -2
  11. package/dist/components/CommandPalette/TheCommandPalette.vue2.js +97 -106
  12. package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
  13. package/dist/components/HttpMethod/HttpMethod.vue.js +1 -1
  14. package/dist/components/HttpMethod/HttpMethod.vue2.js +10 -10
  15. package/dist/components/Search/SearchModal.vue.d.ts.map +1 -1
  16. package/dist/components/Search/SearchModal.vue.js +1 -1
  17. package/dist/components/Search/SearchModal.vue2.js +43 -41
  18. package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
  19. package/dist/components/SideNav/SideNav.vue.js +1 -1
  20. package/dist/components/SideNav/SideNav.vue2.js +22 -19
  21. package/dist/components/Sidebar/Sidebar.vue.d.ts +24 -3
  22. package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
  23. package/dist/components/Sidebar/Sidebar.vue.js +57 -19
  24. package/dist/components/Sidebar/SidebarListElement.vue.d.ts.map +1 -1
  25. package/dist/components/Sidebar/SidebarListElement.vue.js +2 -2
  26. package/dist/components/Sidebar/SidebarListElement.vue2.js +1 -1
  27. package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts +2 -0
  28. package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts.map +1 -1
  29. package/dist/components/Sidebar/SidebarListElementActions.vue.js +22 -21
  30. package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
  31. package/dist/components/TopNav/TopNav.vue.js +1 -1
  32. package/dist/components/TopNav/TopNav.vue2.js +46 -43
  33. package/dist/index.d.ts +1 -1
  34. package/dist/index.d.ts.map +1 -1
  35. package/dist/index.js +9 -9
  36. package/dist/layouts/App/ApiClientApp.vue.js +1 -1
  37. package/dist/layouts/App/create-api-client-app.d.ts +56 -46
  38. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  39. package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +1 -1
  40. package/dist/layouts/Modal/ApiClientModal.vue.js +2 -2
  41. package/dist/layouts/Modal/ApiClientModal.vue2.js +20 -20
  42. package/dist/layouts/Modal/create-api-client-modal.d.ts +112 -92
  43. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  44. package/dist/libs/create-client.d.ts +56 -46
  45. package/dist/libs/create-client.d.ts.map +1 -1
  46. package/dist/libs/event-busses/{command-palette.d.ts → command-palette-bus.d.ts} +1 -1
  47. package/dist/libs/event-busses/command-palette-bus.d.ts.map +1 -0
  48. package/dist/libs/event-busses/{execute-requestBus.d.ts → execute-request-bus.d.ts} +1 -1
  49. package/dist/libs/event-busses/execute-request-bus.d.ts.map +1 -0
  50. package/dist/libs/event-busses/hot-keys-bus.d.ts +33 -0
  51. package/dist/libs/event-busses/hot-keys-bus.d.ts.map +1 -0
  52. package/dist/libs/event-busses/hot-keys-bus.js +33 -0
  53. package/dist/libs/event-busses/index.d.ts +3 -3
  54. package/dist/libs/event-busses/index.d.ts.map +1 -1
  55. package/dist/libs/event-busses/index.js +3 -3
  56. package/dist/libs/index.js +3 -3
  57. package/dist/libs/local-storage.d.ts +1 -1
  58. package/dist/libs/local-storage.d.ts.map +1 -1
  59. package/dist/libs/local-storage.js +15 -30
  60. package/dist/router.d.ts +2 -2
  61. package/dist/router.d.ts.map +1 -1
  62. package/dist/router.js +3 -3
  63. package/dist/store/workspace.d.ts +112 -92
  64. package/dist/store/workspace.d.ts.map +1 -1
  65. package/dist/store/workspace.js +140 -137
  66. package/dist/style.css +1 -1
  67. package/dist/views/Cookies/CookieForm.vue.d.ts.map +1 -1
  68. package/dist/views/Cookies/CookieForm.vue.js +14 -15
  69. package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
  70. package/dist/views/Cookies/Cookies.vue2.js +114 -55
  71. package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
  72. package/dist/views/Environment/Environment.vue2.js +21 -20
  73. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  74. package/dist/views/Request/Request.vue.js +1 -1
  75. package/dist/views/Request/Request.vue2.js +132 -128
  76. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  77. package/dist/views/Request/RequestSidebarItem.vue.js +1 -1
  78. package/dist/views/Request/RequestSidebarItem.vue2.js +253 -139
  79. package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts +27 -5
  80. package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
  81. package/dist/views/Request/RequestSidebarItemMenu.vue.js +4 -4
  82. package/dist/views/Request/RequestSidebarItemMenu.vue2.js +83 -158
  83. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  84. package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
  85. package/dist/views/Request/components/WorkspaceDropdown.vue.js +214 -70
  86. package/package.json +6 -6
  87. package/dist/libs/event-busses/command-palette.d.ts.map +0 -1
  88. package/dist/libs/event-busses/execute-requestBus.d.ts.map +0 -1
  89. package/dist/libs/event-busses/hot-key.d.ts +0 -34
  90. package/dist/libs/event-busses/hot-key.d.ts.map +0 -1
  91. package/dist/libs/event-busses/hot-key.js +0 -25
  92. /package/dist/libs/event-busses/{command-palette.js → command-palette-bus.js} +0 -0
  93. /package/dist/libs/event-busses/{execute-requestBus.js → execute-request-bus.js} +0 -0
@@ -1,15 +1,36 @@
1
1
  declare function __VLS_template(): {
2
2
  header?(_: {}): any;
3
+ title?(_: {}): any;
3
4
  content?(_: {}): any;
4
5
  button?(_: {}): any;
5
6
  };
6
- declare const __VLS_component: import("vue").DefineComponent<__VLS_TypePropsToOption<{
7
+ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<{
7
8
  title?: string;
8
- }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
9
+ showSideBar: boolean;
10
+ }>, {
11
+ showSideBar: boolean;
12
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
13
+ "update:showSideBar": (v: boolean) => void;
14
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<{
9
15
  title?: string;
10
- }>>>, {}, {}>;
16
+ showSideBar: boolean;
17
+ }>, {
18
+ showSideBar: boolean;
19
+ }>>> & {
20
+ "onUpdate:showSideBar"?: ((v: boolean) => any) | undefined;
21
+ }, {
22
+ showSideBar: boolean;
23
+ }, {}>;
11
24
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
12
25
  export default _default;
26
+ type __VLS_WithDefaults<P, D> = {
27
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
28
+ default: D[K];
29
+ }> : P[K];
30
+ };
31
+ type __VLS_Prettify<T> = {
32
+ [K in keyof T]: T[K];
33
+ } & {};
13
34
  type __VLS_WithTemplateSlots<T, S> = T & {
14
35
  new (): {
15
36
  $slots: S;
@@ -1 +1 @@
1
- {"version":3,"file":"Sidebar.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/Sidebar.vue"],"names":[],"mapp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AAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAC1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAC7C,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KAAC,CAAC,GACvC,CAAC,CAAC,CAAC,CAAC;CACP,CAAC;AAEN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC;AAExD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC;AAEN,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
@@ -1,31 +1,69 @@
1
- import { defineComponent as a, openBlock as o, createElementBlock as r, renderSlot as t, unref as l, createElementVNode as n, toDisplayString as i, createCommentVNode as d, normalizeClass as m } from "vue";
2
- import { useWorkspace as c } from "../../store/workspace.js";
3
- const p = { class: "w-sidebar relative flex flex-col border-r-1/2 bg-b-1" }, b = {
1
+ import { defineComponent as B, ref as n, watch as L, onMounted as W, withDirectives as k, openBlock as h, createElementBlock as v, normalizeClass as g, normalizeStyle as D, renderSlot as a, unref as b, createElementVNode as i, createCommentVNode as I, vShow as _ } from "vue";
2
+ import { useWorkspace as $ } from "../../store/workspace.js";
3
+ const C = {
4
4
  key: 0,
5
5
  class: "xl:min-h-header py-2.5 flex items-center border-b-1/2 px-4 text-sm"
6
- }, f = { class: "font-medium m-0 text-sm" }, x = /* @__PURE__ */ a({
6
+ }, z = { class: "font-medium m-0 text-sm whitespace-nowrap" }, X = /* @__PURE__ */ B({
7
7
  __name: "Sidebar",
8
8
  props: {
9
- title: {}
9
+ title: {},
10
+ showSideBar: { type: Boolean, default: !0 }
10
11
  },
11
- setup(h) {
12
- const { isReadOnly: s } = c();
13
- return (e, u) => (o(), r("aside", p, [
14
- t(e.$slots, "header"),
15
- !l(s) && e.title ? (o(), r("div", b, [
16
- n("h2", f, i(e.title), 1)
17
- ])) : d("", !0),
18
- n("div", {
19
- class: m(["custom-scroll sidebar-height", {
20
- "sidebar-mask": !l(s)
12
+ emits: ["update:showSideBar"],
13
+ setup(w, { emit: S }) {
14
+ const d = w, l = S, { isReadOnly: c } = $(), r = n(!1), m = n(null), s = n(localStorage.getItem("sidebarWidth") || "280px"), u = () => {
15
+ (s.value === "0px" || localStorage.getItem("sidebarWidth") === "0px") && (s.value = "280px");
16
+ }, x = (e) => {
17
+ e.preventDefault();
18
+ const o = e.clientX, y = parseInt(
19
+ getComputedStyle(m.value).width || "280px",
20
+ 10
21
+ ), p = (E) => {
22
+ r.value = !0, document.body.classList.add("dragging");
23
+ let t = y + E.clientX - o;
24
+ t > 420 && (t = 420 + (t - 420) * 0.2), t < 240 ? (t = 0, l("update:showSideBar", !1)) : l("update:showSideBar", !0), s.value = `${t}px`, localStorage.setItem("sidebarWidth", `${Math.min(t, 420)}px`);
25
+ }, f = () => {
26
+ r.value = !1, document.body.classList.remove("dragging"), document.documentElement.removeEventListener("mousemove", p, !1), document.documentElement.removeEventListener("mouseup", f, !1), parseInt(s.value, 10) > 420 && (s.value = "360px");
27
+ };
28
+ document.documentElement.addEventListener("mousemove", p, !1), document.documentElement.addEventListener("mouseup", f, !1);
29
+ };
30
+ return L(
31
+ () => d.showSideBar,
32
+ (e) => {
33
+ const o = document.querySelector(".sidebar");
34
+ o && (e ? o.classList.remove("blur-content") : (o.classList.add("blur-content"), document.body.classList.remove("dragging"))), u();
35
+ }
36
+ ), W(() => {
37
+ u();
38
+ }), (e, o) => k((h(), v("aside", {
39
+ ref_key: "sidebarRef",
40
+ ref: m,
41
+ class: g(["sidebar overflow-hidden relative flex flex-col border-r-1/2 bg-b-1", { dragging: r.value }]),
42
+ style: D({ width: s.value })
43
+ }, [
44
+ a(e.$slots, "header"),
45
+ !b(c) && e.title ? (h(), v("div", C, [
46
+ i("h2", z, [
47
+ a(e.$slots, "title")
48
+ ])
49
+ ])) : I("", !0),
50
+ i("div", {
51
+ class: g(["custom-scroll sidebar-height", {
52
+ "sidebar-mask": !b(c)
21
53
  }])
22
54
  }, [
23
- t(e.$slots, "content")
55
+ a(e.$slots, "content")
24
56
  ], 2),
25
- t(e.$slots, "button")
26
- ]));
57
+ a(e.$slots, "button"),
58
+ i("div", {
59
+ class: "resizer",
60
+ onMousedown: x
61
+ }, null, 32)
62
+ ], 6)), [
63
+ [_, d.showSideBar]
64
+ ]);
27
65
  }
28
66
  });
29
67
  export {
30
- x as default
68
+ X as default
31
69
  };
@@ -1 +1 @@
1
- {"version":3,"file":"SidebarListElement.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/SidebarListElement.vue"],"names":[],"mappings":";cAyEY;QACR,GAAG,EAAE,MAAM,CAAA;QACX,IAAI,EAAE,MAAM,CAAA;QACZ,KAAK,CAAC,EAAE,MAAM,CAAA;QACd,SAAS,CAAC,EAAE,OAAO,CAAA;KACpB;qBACgB,MAAM;;;;cANb;QACR,GAAG,EAAE,MAAM,CAAA;QACX,IAAI,EAAE,MAAM,CAAA;Q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AC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import t from "./SidebarListElement.vue2.js";
2
2
  /* empty css */
3
3
  import o from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ o(t, [["__scopeId", "data-v-c5578caa"]]);
4
+ const a = /* @__PURE__ */ o(t, [["__scopeId", "data-v-e9dbd857"]]);
5
5
  export {
6
- m as default
6
+ a as default
7
7
  };
@@ -22,7 +22,7 @@ const C = {
22
22
  const d = v("router-link");
23
23
  return o(), n("li", null, [
24
24
  t(d, {
25
- class: l(["text-c-2 hover:bg-b-2 group relative block flex items-center gap-1 rounded py-1 pr-2 font-medium no-underline", [e.variable.color ? "pl-1" : "pl-2"]]),
25
+ class: l(["h-8 text-c-2 hover:bg-b-2 group relative block flex items-center gap-1 rounded py-1 pr-2 font-medium no-underline", [e.variable.color ? "pl-1" : "pl-2"]]),
26
26
  exactActiveClass: "active-link",
27
27
  to: `${e.variable.uid}`,
28
28
  onClick: a[0] || (a[0] = f((b) => p(b, e.variable.uid), ["prevent"]))
@@ -4,6 +4,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
4
4
  name: string;
5
5
  isDefault: boolean;
6
6
  };
7
+ warningMessage?: string;
7
8
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
8
9
  delete: (id: string) => void;
9
10
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
@@ -12,6 +13,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
12
13
  name: string;
13
14
  isDefault: boolean;
14
15
  };
16
+ warningMessage?: string;
15
17
  }>>> & {
16
18
  onDelete?: ((id: string) => any) | undefined;
17
19
  }, {}, {}>;
@@ -1 +1 @@
1
- {"version":3,"file":"SidebarListElementActions.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/SidebarListElementActions.vue"],"names":[],"mappings":";cAqFY;QACR,GAAG,EAAE,MAAM,CAAA;QACX,IAAI,EAAE,MAAM,CAAA;QACZ,SAAS,EAAE,OAAO,CAAA;KACnB;;;;cAJS;QACR,GAAG,EAAE,MAAM,CAAA;QACX,IAAI,EAAE,MAAM,CAAA;QACZ,SAAS,EAAE,OAAO,CAAA;KACnB;;;;AA6LH,wBAOG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
1
+ {"version":3,"file":"SidebarListElementActions.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/SidebarListElementActions.vue"],"names":[],"mappings":";cAsFY;QACR,GAAG,EAAE,MAAM,CAAA;QACX,IAAI,EAAE,MAAM,CAAA;QACZ,SAAS,EAAE,OAAO,CAAA;KACnB;qBACgB,MAAM;;;;cALb;QACR,GAAG,EAAE,MAAM,CAAA;QACX,IAAI,EAAE,MAAM,CAAA;QACZ,SAAS,EAAE,OAAO,CAAA;KACnB;qBACgB,MAAM;;;;AA6LzB,wBAOG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
@@ -1,41 +1,42 @@
1
- import { defineComponent as k, ref as w, openBlock as l, createElementBlock as c, Fragment as g, createElementVNode as u, unref as a, createVNode as i, withModifiers as N, createCommentVNode as m, withCtx as x, createBlock as $ } from "vue";
2
- import D from "./Actions/DeleteSidebarListElement.vue.js";
3
- import { useModal as M, ScalarIcon as d, ScalarModal as A } from "@scalar/components";
4
- import { useClipboard as S } from "../../hooks/useClipboard.js";
5
- const B = { class: "absolute flex right-1 opacity-0 group-hover:opacity-100" }, z = /* @__PURE__ */ k({
1
+ import { defineComponent as w, ref as M, openBlock as l, createElementBlock as c, Fragment as k, createElementVNode as m, unref as a, createVNode as i, withModifiers as y, createCommentVNode as u, withCtx as N, createBlock as $ } from "vue";
2
+ import x from "./Actions/DeleteSidebarListElement.vue.js";
3
+ import { useModal as D, ScalarIcon as d, ScalarModal as S } from "@scalar/components";
4
+ import { useClipboard as A } from "../../hooks/useClipboard.js";
5
+ const B = { class: "absolute flex right-1 opacity-0 group-hover:opacity-100" }, I = /* @__PURE__ */ w({
6
6
  __name: "SidebarListElementActions",
7
7
  props: {
8
- variable: {}
8
+ variable: {},
9
+ warningMessage: {}
9
10
  },
10
11
  emits: ["delete"],
11
12
  setup(p, { emit: v }) {
12
- const { variable: b } = p, f = v, t = w({ action: "None", name: "" }), n = M(), { copyToClipboard: h } = S();
13
+ const { variable: b } = p, f = v, t = M({ action: "None", name: "" }), n = D(), { copyToClipboard: g } = A();
13
14
  function C(e) {
14
15
  t.value = { action: e, name: b.name }, n.show();
15
16
  }
16
17
  function r() {
17
18
  n.hide(), t.value = { action: "None", name: "" };
18
19
  }
19
- function y(e) {
20
+ function h(e) {
20
21
  f("delete", e), r();
21
22
  }
22
- return (e, o) => (l(), c(g, null, [
23
- u("div", B, [
24
- u("button", {
23
+ return (e, o) => (l(), c(k, null, [
24
+ m("div", B, [
25
+ m("button", {
25
26
  class: "text-c-3 hover:bg-b-3 hover:text-c-1 rounded p-[5px]",
26
27
  type: "button",
27
- onClick: o[0] || (o[0] = (s) => a(h)(e.variable.name))
28
+ onClick: o[0] || (o[0] = (s) => a(g)(e.variable.name))
28
29
  }, [
29
30
  i(a(d), {
30
31
  class: "h-3 w-3",
31
32
  icon: "Clipboard"
32
33
  })
33
34
  ]),
34
- e.variable.isDefault ? m("", !0) : (l(), c("button", {
35
+ e.variable.isDefault ? u("", !0) : (l(), c("button", {
35
36
  key: 0,
36
37
  class: "text-c-3 hover:bg-b-3 hover:text-c-1 rounded p-1",
37
38
  type: "button",
38
- onClick: o[1] || (o[1] = N((s) => C(
39
+ onClick: o[1] || (o[1] = y((s) => C(
39
40
  "Delete"
40
41
  /* Delete */
41
42
  ), ["prevent"]))
@@ -46,19 +47,19 @@ const B = { class: "absolute flex right-1 opacity-0 group-hover:opacity-100" },
46
47
  })
47
48
  ]))
48
49
  ]),
49
- i(a(A), {
50
+ i(a(S), {
50
51
  size: "sm",
51
52
  state: a(n),
52
53
  title: `${t.value.action} ${t.value.name}`
53
54
  }, {
54
- default: x(() => [
55
- t.value.action === "Delete" ? (l(), $(D, {
55
+ default: N(() => [
56
+ t.value.action === "Delete" ? (l(), $(x, {
56
57
  key: 0,
57
58
  variableName: t.value.name,
58
- warningMessage: "Are you sure you want to delete this cookie?",
59
+ warningMessage: e.warningMessage,
59
60
  onClose: r,
60
- onDelete: o[2] || (o[2] = (s) => y(e.variable.uid))
61
- }, null, 8, ["variableName"])) : m("", !0)
61
+ onDelete: o[2] || (o[2] = (s) => h(e.variable.uid))
62
+ }, null, 8, ["variableName", "warningMessage"])) : u("", !0)
62
63
  ]),
63
64
  _: 1
64
65
  }, 8, ["state", "title"])
@@ -66,5 +67,5 @@ const B = { class: "absolute flex right-1 opacity-0 group-hover:opacity-100" },
66
67
  }
67
68
  });
68
69
  export {
69
- z as default
70
+ I as default
70
71
  };
@@ -1 +1 @@
1
- {"version":3,"file":"TopNav.vue.d.ts","sourceRoot":"","sources":["../../../src/components/TopNav/TopNav.vue"],"names":[],"mappings":";AAyXA,wBAKG"}
1
+ {"version":3,"file":"TopNav.vue.d.ts","sourceRoot":"","sources":["../../../src/components/TopNav/TopNav.vue"],"names":[],"mappings":";AAqZA,wBAKG"}
@@ -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-76f92299"]]);
4
+ const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-19efa966"]]);
5
5
  export {
6
6
  f as default
7
7
  };
@@ -1,77 +1,80 @@
1
- import { defineComponent as N, reactive as y, ref as x, watch as S, computed as C, openBlock as r, createElementBlock as u, createElementVNode as i, createVNode as v, unref as d, toDisplayString as w, Fragment as A, renderList as R, createBlock as z, pushScopeId as B, popScopeId as E } from "vue";
2
- import { ROUTES as T } from "../../constants.js";
3
- import { ScalarIcon as h } from "@scalar/components";
4
- import { capitalize as V } from "@scalar/oas-utils/helpers";
5
- import j from "./TopNavItem.vue.js";
6
- import { useWorkspace as q } from "../../store/workspace.js";
7
- const L = (l) => (B("data-v-76f92299"), l = l(), E(), l), $ = { class: "flex h-10 t-app__top-nav" }, D = /* @__PURE__ */ L(() => /* @__PURE__ */ i("div", { class: "t-app__top-nav-draggable" }, null, -1)), F = { class: "flex h-10 flex-1 items-center justify-center gap-1.5 text-sm font-medium relative" }, M = {
1
+ import { defineComponent as x, reactive as S, ref as T, watch as C, computed as B, onMounted as R, onBeforeUnmount as w, openBlock as i, createElementBlock as p, createElementVNode as r, createVNode as _, unref as g, toDisplayString as A, Fragment as M, renderList as z, createBlock as E, pushScopeId as L, popScopeId as V } from "vue";
2
+ import { ROUTES as j } from "../../constants.js";
3
+ import { ScalarIcon as b } from "@scalar/components";
4
+ import { capitalize as q } from "@scalar/oas-utils/helpers";
5
+ import K from "./TopNavItem.vue.js";
6
+ import { useWorkspace as U } from "../../store/workspace.js";
7
+ import { hotKeyBus as k } from "../../libs/event-busses/hot-keys-bus.js";
8
+ const $ = (l) => (L("data-v-19efa966"), l = l(), V(), l), D = { class: "flex h-10 t-app__top-nav" }, F = /* @__PURE__ */ $(() => /* @__PURE__ */ r("div", { class: "t-app__top-nav-draggable" }, null, -1)), H = { class: "flex h-10 flex-1 items-center justify-center gap-1.5 text-sm font-medium relative" }, O = {
8
9
  key: 0,
9
10
  class: "flex items-center gap-1 w-full justify-center"
10
- }, K = /* @__PURE__ */ N({
11
+ }, Z = /* @__PURE__ */ x({
11
12
  __name: "TopNav",
12
13
  setup(l) {
13
- const { activeRequest: f, router: n } = q(), t = y([{ label: "", path: "", icon: "Add" }]), a = x(0);
14
- function p() {
14
+ const { activeRequest: N, router: o } = U(), t = S([{ label: "", path: "", icon: "Add" }]), a = T(0);
15
+ function m() {
15
16
  var s;
16
- const e = T.find((c) => n.currentRoute.value.name == c.name);
17
+ const e = j.find((c) => o.currentRoute.value.name == c.name);
17
18
  e && ((e == null ? void 0 : e.name) === "request" ? t[a.value] = {
18
- label: ((s = f.value) == null ? void 0 : s.summary) || "",
19
- path: n.currentRoute.value.path,
19
+ label: ((s = N.value) == null ? void 0 : s.summary) || "",
20
+ path: o.currentRoute.value.path,
20
21
  icon: e.icon
21
22
  } : t[a.value] = {
22
- label: V(e == null ? void 0 : e.name) || "",
23
- path: n.currentRoute.value.path,
23
+ label: q(e == null ? void 0 : e.name) || "",
24
+ path: o.currentRoute.value.path,
24
25
  icon: e.icon
25
26
  });
26
27
  }
27
- function m() {
28
- n.push(t[a.value].path);
28
+ function v() {
29
+ o.push(t[a.value].path);
29
30
  }
30
- function _() {
31
- t.push({ label: "", path: "", icon: "Add" }), a.value = t.length - 1, p();
31
+ function d() {
32
+ t.push({ label: "", path: "", icon: "Add" }), a.value = t.length - 1, m();
32
33
  }
33
- function b(e) {
34
- a.value = e, m();
34
+ function u(e) {
35
+ a.value = e, v();
35
36
  }
36
- S(
37
- () => n.currentRoute.value.path,
37
+ C(
38
+ () => o.currentRoute.value.path,
38
39
  () => {
39
- p();
40
+ m();
40
41
  },
41
42
  { immediate: !0 }
42
43
  );
43
- function k(e) {
44
+ function f(e) {
44
45
  t.splice(e, 1), a.value = Math.min(
45
46
  a.value,
46
47
  t.length - 1
47
- ), m();
48
+ ), v();
48
49
  }
49
- const g = C(() => a.value);
50
- return (e, s) => (r(), u("nav", $, [
51
- D,
52
- i("div", F, [
53
- t.length === 1 ? (r(), u("div", M, [
54
- v(d(h), {
50
+ const I = B(() => a.value), h = (e) => {
51
+ e.addTopNav && d(), e.closeTopNav && f(a.value), e.navigateTopNavLeft && u(Math.max(a.value - 1, 0)), e.navigateTopNavRight && u(Math.min(a.value + 1, t.length - 1));
52
+ };
53
+ return R(() => k.on(h)), w(() => k.off(h)), (e, s) => (i(), p("nav", D, [
54
+ F,
55
+ r("div", H, [
56
+ t.length === 1 ? (i(), p("div", O, [
57
+ _(g(b), {
55
58
  icon: t[0].icon,
56
59
  size: "xs",
57
60
  thickness: "2.5"
58
61
  }, null, 8, ["icon"]),
59
- i("div", null, w(t[0].label), 1)
60
- ])) : (r(!0), u(A, { key: 1 }, R(t, (c, o) => (r(), z(j, {
61
- key: o,
62
- active: o === g.value,
63
- hotkey: (o + 1).toString(),
62
+ r("div", null, A(t[0].label), 1)
63
+ ])) : (i(!0), p(M, { key: 1 }, z(t, (c, n) => (i(), E(K, {
64
+ key: n,
65
+ active: n === I.value,
66
+ hotkey: (n + 1).toString(),
64
67
  icon: c.icon,
65
68
  label: c.label,
66
- onClick: (I) => b(o),
67
- onClose: (I) => k(o)
69
+ onClick: (y) => u(n),
70
+ onClose: (y) => f(n)
68
71
  }, null, 8, ["active", "hotkey", "icon", "label", "onClick", "onClose"]))), 128)),
69
- i("button", {
72
+ r("button", {
70
73
  class: "text-c-3 hover:bg-b-3 p-1.5 rounded-lg webkit-app-no-drag",
71
74
  type: "button",
72
- onClick: _
75
+ onClick: d
73
76
  }, [
74
- v(d(h), {
77
+ _(g(b), {
75
78
  icon: "Add",
76
79
  size: "xs",
77
80
  thickness: "2.5"
@@ -82,5 +85,5 @@ const L = (l) => (B("data-v-76f92299"), l = l(), E(), l), $ = { class: "flex h-1
82
85
  }
83
86
  });
84
87
  export {
85
- K as default
88
+ Z as default
86
89
  };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export * from './layouts/Modal/index.js';
2
2
  export * from './layouts/App/index.js';
3
3
  export { useWorkspace } from './store/workspace.js';
4
- export { createModalRouter, webHashRouter, router } from './router.js';
4
+ export { createModalRouter, createWebHashRouter, router } from './router.js';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAE7B,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAE7B,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA"}
package/dist/index.js CHANGED
@@ -1,18 +1,18 @@
1
- import { useWorkspace as t } from "./store/workspace.js";
2
- import { createModalRouter as a, router as i, webHashRouter as l } from "./router.js";
3
- import { default as m } from "./layouts/App/ApiClientApp.vue.js";
1
+ import { useWorkspace as o } from "./store/workspace.js";
2
+ import { createModalRouter as a, createWebHashRouter as i, router as l } from "./router.js";
3
+ import { default as c } from "./layouts/App/ApiClientApp.vue.js";
4
4
  /* empty css */
5
- import { default as c } from "./layouts/Modal/ApiClientModal.vue.js";
5
+ import { default as A } from "./layouts/Modal/ApiClientModal.vue.js";
6
6
  import { createApiClientModal as n, createApiClientModalSync as u } from "./layouts/Modal/create-api-client-modal.js";
7
7
  import { createApiClientApp as s } from "./layouts/App/create-api-client-app.js";
8
8
  export {
9
- m as ApiClientApp,
10
- c as ApiClientModal,
9
+ c as ApiClientApp,
10
+ A as ApiClientModal,
11
11
  s as createApiClientApp,
12
12
  n as createApiClientModal,
13
13
  u as createApiClientModalSync,
14
14
  a as createModalRouter,
15
- i as router,
16
- t as useWorkspace,
17
- l as webHashRouter
15
+ i as createWebHashRouter,
16
+ l as router,
17
+ o as useWorkspace
18
18
  };
@@ -10,7 +10,7 @@ import { RouterView as A } from "vue-router";
10
10
  import { loadAllResources as D } from "../../libs/local-storage.js";
11
11
  import N from "../../components/CommandPalette/TheCommandPalette.vue.js";
12
12
  import { useDarkModeState as b } from "../../hooks/useDarkModeState.js";
13
- import { handleHotKeyDown as H } from "../../libs/event-busses/hot-key.js";
13
+ import { handleHotKeyDown as H } from "../../libs/event-busses/hot-keys-bus.js";
14
14
  const V = ["innerHTML"], F = {
15
15
  key: 0,
16
16
  class: "flex min-h-0 flex-1"