@scalar/api-client 2.2.22 → 2.2.23

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 (124) hide show
  1. package/CHANGELOG.md +10 -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 +69 -70
  5. package/dist/components/AddressBar/AddressBarServer.vue.js +26 -26
  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 +46 -46
  9. package/dist/components/CodeInput/codeVariableWidget.d.ts +4 -4
  10. package/dist/components/CodeInput/codeVariableWidget.d.ts.map +1 -1
  11. package/dist/components/CodeInput/codeVariableWidget.js +42 -38
  12. package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +25 -24
  13. package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts +1 -1
  14. package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts.map +1 -1
  15. package/dist/components/CommandPalette/CommandPaletteExample.vue.js +64 -55
  16. package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
  17. package/dist/components/CommandPalette/CommandPaletteImport.vue.js +110 -106
  18. package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +2 -2
  19. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +1 -1
  20. package/dist/components/CommandPalette/TheCommandPalette.vue.js +1 -1
  21. package/dist/components/CommandPalette/TheCommandPalette.vue2.js +38 -37
  22. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
  23. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +52 -49
  24. package/dist/components/ImportCollection/DropEventListener.vue.d.ts.map +1 -1
  25. package/dist/components/ImportCollection/DropEventListener.vue.js +46 -43
  26. package/dist/components/ImportCollection/ImportCollectionModal.vue.js +40 -39
  27. package/dist/components/ImportCollection/ImportNowButton.vue.js +44 -42
  28. package/dist/components/ImportCollection/WorkspaceSelector.vue.js +76 -69
  29. package/dist/components/ScalarAsciiArt.vue.js +1 -1
  30. package/dist/components/ScalarAsciiArt.vue2.js +22 -19
  31. package/dist/components/Search/useSearch.d.ts.map +1 -1
  32. package/dist/components/Search/useSearch.js +57 -49
  33. package/dist/components/SideNav/SideNavRouterLink.vue.d.ts.map +1 -1
  34. package/dist/components/SideNav/SideNavRouterLink.vue.js +22 -19
  35. package/dist/components/Sidebar/SidebarListElement.vue.d.ts.map +1 -1
  36. package/dist/components/Sidebar/SidebarListElement.vue.js +2 -2
  37. package/dist/components/Sidebar/SidebarListElement.vue2.js +38 -36
  38. package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
  39. package/dist/components/TopNav/TopNav.vue.js +71 -64
  40. package/dist/layouts/App/ApiClientApp.vue.js +4 -1
  41. package/dist/layouts/Modal/ApiClientModal.vue.js +2 -2
  42. package/dist/layouts/Modal/ApiClientModal.vue2.js +22 -19
  43. package/dist/layouts/Web/ApiClientWeb.vue.js +4 -1
  44. package/dist/libs/create-client.d.ts +10 -10
  45. package/dist/libs/create-client.d.ts.map +1 -1
  46. package/dist/libs/create-client.js +42 -36
  47. package/dist/libs/extractAttachmentFilename.d.ts +3 -0
  48. package/dist/libs/extractAttachmentFilename.d.ts.map +1 -1
  49. package/dist/libs/extractAttachmentFilename.js +7 -7
  50. package/dist/libs/importers/curl.d.ts.map +1 -1
  51. package/dist/libs/importers/curl.js +18 -18
  52. package/dist/libs/normalize-headers.d.ts.map +1 -1
  53. package/dist/libs/normalize-headers.js +2 -2
  54. package/dist/libs/parse-curl.js +39 -36
  55. package/dist/store/active-entities.d.ts +4 -4
  56. package/dist/store/active-entities.d.ts.map +1 -1
  57. package/dist/store/active-entities.js +88 -86
  58. package/dist/store/collections.d.ts.map +1 -1
  59. package/dist/store/collections.js +29 -29
  60. package/dist/store/request-example.d.ts.map +1 -1
  61. package/dist/store/request-example.js +27 -23
  62. package/dist/store/requests.d.ts.map +1 -1
  63. package/dist/store/requests.js +94 -77
  64. package/dist/store/security-schemes.d.ts.map +1 -1
  65. package/dist/store/security-schemes.js +27 -27
  66. package/dist/store/servers.d.ts.map +1 -1
  67. package/dist/store/servers.js +18 -18
  68. package/dist/store/tags.d.ts.map +1 -1
  69. package/dist/store/tags.js +35 -33
  70. package/dist/style.css +1 -1
  71. package/dist/views/Cookies/CookieForm.vue.d.ts.map +1 -1
  72. package/dist/views/Cookies/CookieForm.vue.js +14 -9
  73. package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
  74. package/dist/views/Cookies/Cookies.vue2.js +39 -37
  75. package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
  76. package/dist/views/Environment/Environment.vue2.js +94 -89
  77. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  78. package/dist/views/Request/Request.vue.js +1 -1
  79. package/dist/views/Request/Request.vue2.js +121 -119
  80. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +1 -1
  81. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +28 -25
  82. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
  83. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +1 -1
  84. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +38 -37
  85. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts.map +1 -1
  86. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.js +2 -2
  87. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue2.js +76 -73
  88. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.js +2 -2
  89. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue2.js +80 -80
  90. package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
  91. package/dist/views/Request/RequestSection/RequestBody.vue.js +1 -1
  92. package/dist/views/Request/RequestSection/RequestBody.vue2.js +192 -178
  93. package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
  94. package/dist/views/Request/RequestSection/RequestParams.vue.js +80 -73
  95. package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts.map +1 -1
  96. package/dist/views/Request/RequestSection/RequestPathParams.vue.js +50 -48
  97. package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
  98. package/dist/views/Request/RequestSidebar.vue.js +1 -1
  99. package/dist/views/Request/RequestSidebar.vue2.js +149 -144
  100. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  101. package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
  102. package/dist/views/Request/RequestSidebarItem.vue2.js +168 -150
  103. package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
  104. package/dist/views/Request/RequestSidebarItemMenu.vue.js +4 -4
  105. package/dist/views/Request/RequestSidebarItemMenu.vue2.js +80 -80
  106. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  107. package/dist/views/Request/ResponseSection/ResponseSection.vue.js +1 -1
  108. package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +1 -1
  109. package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
  110. package/dist/views/Request/components/WorkspaceDropdown.vue.js +166 -156
  111. package/dist/views/Request/handle-drag.d.ts.map +1 -1
  112. package/dist/views/Request/handle-drag.js +37 -31
  113. package/dist/views/Request/hooks/useOpenApiWatcher.js +27 -27
  114. package/dist/views/Request/libs/live-sync.d.ts.map +1 -1
  115. package/dist/views/Request/libs/live-sync.js +147 -130
  116. package/dist/views/Request/types/sidebar-item.d.ts +4 -1
  117. package/dist/views/Request/types/sidebar-item.d.ts.map +1 -1
  118. package/dist/views/Servers/ServerForm.vue.js +38 -35
  119. package/dist/views/Servers/Servers.vue2.js +38 -35
  120. package/dist/views/Settings/Settings.vue.d.ts.map +1 -1
  121. package/dist/views/Settings/Settings.vue2.js +15 -15
  122. package/dist/views/Settings/SettingsGeneral.vue.d.ts.map +1 -1
  123. package/dist/views/Settings/SettingsGeneral.vue.js +206 -174
  124. package/package.json +8 -8
@@ -1,124 +1,131 @@
1
- import { defineComponent as y, ref as W, openBlock as m, createElementBlock as x, Fragment as w, createElementVNode as t, createVNode as s, unref as e, withCtx as a, renderList as D, createBlock as N, withModifiers as k, normalizeClass as z, toDisplayString as v, withDirectives as M, vModelText as B, createTextVNode as V } from "vue";
2
- import { useActiveEntities as j } from "../../store/active-entities.js";
3
- import { useModal as E, ScalarDropdown as T, ScalarDropdownItem as h, ScalarIcon as d, ScalarDropdownDivider as $, ScalarButton as _, ScalarModal as A } from "@scalar/components";
4
- import { useToasts as I } from "@scalar/use-toasts";
5
- import { useRouter as F } from "vue-router";
6
- import { useWorkspace as L } from "../../store/store.js";
7
- const P = { class: "flex items-center text-sm w-[inherit]" }, R = { class: "font-medium m-0 text-sm flex gap-1 items-center" }, U = { class: "line-clamp-1 text-left w-[calc(100%-10px)] text-xs" }, q = { class: "text-ellipsis overflow-hidden" }, G = { class: "flex items-center justify-center h-4 w-4" }, ee = /* @__PURE__ */ y({
1
+ import { defineComponent as W, ref as D, openBlock as d, createElementBlock as w, Fragment as k, createElementVNode as s, createVNode as o, unref as e, withCtx as r, renderList as N, createBlock as z, withModifiers as v, normalizeClass as M, toDisplayString as h, withDirectives as B, vModelText as V, createTextVNode as j } from "vue";
2
+ import { useActiveEntities as E } from "../../store/active-entities.js";
3
+ import { useModal as T, ScalarDropdown as $, ScalarDropdownItem as _, ScalarIcon as u, ScalarDropdownDivider as A, ScalarButton as b, ScalarModal as I } from "@scalar/components";
4
+ import { useToasts as F } from "@scalar/use-toasts";
5
+ import { useRouter as L } from "vue-router";
6
+ import { useWorkspace as P } from "../../store/store.js";
7
+ const R = { class: "flex items-center text-sm w-[inherit]" }, U = { class: "font-medium m-0 text-sm flex gap-1 items-center" }, q = { class: "line-clamp-1 text-left w-[calc(100%-10px)] text-xs" }, G = { class: "text-ellipsis overflow-hidden" }, H = { class: "flex items-center justify-center h-4 w-4" }, ee = /* @__PURE__ */ W({
8
8
  __name: "WorkspaceSelector",
9
- setup(H) {
10
- const { activeWorkspace: i } = j(), { workspaces: b, workspaceMutators: g } = L(), { push: u } = F(), c = E(), { toast: f } = I(), r = W(""), C = (n) => {
11
- n !== i.value.uid && u({
9
+ setup(J) {
10
+ const { activeWorkspace: i } = E(), { workspaces: g, workspaceMutators: C } = P(), { push: f } = L(), c = T(), { toast: x } = F(), n = D(""), S = (l) => {
11
+ var t;
12
+ l !== ((t = i.value) == null ? void 0 : t.uid) && f({
12
13
  name: "workspace",
13
14
  params: {
14
- workspace: n
15
+ workspace: l
15
16
  }
16
17
  });
17
- }, S = () => {
18
- if (!r.value.trim()) {
19
- f("Please enter a name before creating a workspace.", "error");
18
+ }, y = () => {
19
+ if (!n.value.trim()) {
20
+ x("Please enter a name before creating a workspace.", "error");
20
21
  return;
21
22
  }
22
- const n = g.add({
23
- name: r.value
23
+ const l = C.add({
24
+ name: n.value
24
25
  });
25
- f(`Created new workspace '${n.name}'`), u({
26
+ x(`Created new workspace '${l.name}'`), f({
26
27
  name: "workspace",
27
28
  params: {
28
- workspace: n.uid
29
+ workspace: l.uid
29
30
  }
30
- }), r.value = "", c.hide();
31
+ }), n.value = "", c.hide();
31
32
  };
32
- return (n, o) => (m(), x(w, null, [
33
- t("div", P, [
34
- s(e(T), null, {
35
- items: a(() => [
36
- (m(!0), x(w, null, D(e(b), (l, p) => (m(), N(e(h), {
33
+ return (l, t) => (d(), w(k, null, [
34
+ s("div", R, [
35
+ o(e($), null, {
36
+ items: r(() => [
37
+ (d(!0), w(k, null, N(e(g), (a, p) => (d(), z(e(_), {
37
38
  key: p,
38
39
  class: "flex gap-1.5 group/item items-center whitespace-nowrap text-ellipsis overflow-hidden w-full",
39
- onClick: k((J) => C(p), ["stop"])
40
+ onClick: v((m) => S(p), ["stop"])
40
41
  }, {
41
- default: a(() => [
42
- t("div", {
43
- class: z([
44
- "flex items-center justify-center rounded-full p-[3px] w-4 h-4",
45
- e(i).uid === p ? "bg-c-accent text-b-1" : "group-hover/item:shadow-border text-transparent"
46
- ])
47
- }, [
48
- s(e(d), {
49
- class: "size-2.5",
50
- icon: "Checkmark",
51
- thickness: "3.5"
52
- })
53
- ], 2),
54
- t("span", q, v(l.name), 1)
55
- ]),
42
+ default: r(() => {
43
+ var m;
44
+ return [
45
+ s("div", {
46
+ class: M([
47
+ "flex items-center justify-center rounded-full p-[3px] w-4 h-4",
48
+ ((m = e(i)) == null ? void 0 : m.uid) === p ? "bg-c-accent text-b-1" : "group-hover/item:shadow-border text-transparent"
49
+ ])
50
+ }, [
51
+ o(e(u), {
52
+ class: "size-2.5",
53
+ icon: "Checkmark",
54
+ thickness: "3.5"
55
+ })
56
+ ], 2),
57
+ s("span", G, h(a.name), 1)
58
+ ];
59
+ }),
56
60
  _: 2
57
61
  }, 1032, ["onClick"]))), 128)),
58
- s(e($)),
59
- s(e(h), {
62
+ o(e(A)),
63
+ o(e(_), {
60
64
  class: "flex items-center gap-1.5",
61
- onClick: o[0] || (o[0] = (l) => e(c).show())
65
+ onClick: t[0] || (t[0] = (a) => e(c).show())
62
66
  }, {
63
- default: a(() => [
64
- t("div", G, [
65
- s(e(d), {
67
+ default: r(() => [
68
+ s("div", H, [
69
+ o(e(u), {
66
70
  icon: "Add",
67
71
  size: "sm"
68
72
  })
69
73
  ]),
70
- o[2] || (o[2] = t("span", null, "New Workspace", -1))
74
+ t[2] || (t[2] = s("span", null, "New Workspace", -1))
71
75
  ]),
72
76
  _: 1
73
77
  })
74
78
  ]),
75
- default: a(() => [
76
- s(e(_), {
79
+ default: r(() => [
80
+ o(e(b), {
77
81
  class: "font-normal h-full justify-start line-clamp-1 py-1 px-1.5 text-c-1 hover:bg-b-2 w-fit text-c-3",
78
82
  fullWidth: "",
79
83
  variant: "ghost"
80
84
  }, {
81
- default: a(() => [
82
- t("div", R, [
83
- t("h2", U, v(e(i).name), 1),
84
- s(e(d), {
85
- icon: "ChevronDown",
86
- size: "md"
87
- })
88
- ])
89
- ]),
85
+ default: r(() => {
86
+ var a;
87
+ return [
88
+ s("div", U, [
89
+ s("h2", q, h((a = e(i)) == null ? void 0 : a.name), 1),
90
+ o(e(u), {
91
+ icon: "ChevronDown",
92
+ size: "md"
93
+ })
94
+ ])
95
+ ];
96
+ }),
90
97
  _: 1
91
98
  })
92
99
  ]),
93
100
  _: 1
94
101
  })
95
102
  ]),
96
- s(e(A), {
103
+ o(e(I), {
97
104
  bodyClass: "!m-0 !p-1",
98
105
  size: "xxs",
99
106
  state: e(c),
100
107
  variant: "form"
101
108
  }, {
102
- default: a(() => [
103
- t("form", {
109
+ default: r(() => [
110
+ s("form", {
104
111
  class: "flex gap-1 rounded",
105
- onSubmit: k(S, ["prevent"])
112
+ onSubmit: v(y, ["prevent"])
106
113
  }, [
107
- M(t("input", {
108
- "onUpdate:modelValue": o[1] || (o[1] = (l) => r.value = l),
114
+ B(s("input", {
115
+ "onUpdate:modelValue": t[1] || (t[1] = (a) => n.value = a),
109
116
  class: "border-none outline-none flex-1 w-full text-sm min-h-8 p-1.5",
110
117
  placeholder: "New Workspace",
111
118
  type: "text"
112
119
  }, null, 512), [
113
- [B, r.value]
120
+ [V, n.value]
114
121
  ]),
115
- s(e(_), {
122
+ o(e(b), {
116
123
  class: "max-h-8 text-xs p-0 px-3",
117
- disabled: !r.value.trim(),
124
+ disabled: !n.value.trim(),
118
125
  type: "submit"
119
126
  }, {
120
- default: a(() => o[3] || (o[3] = [
121
- V(" Continue ")
127
+ default: r(() => t[3] || (t[3] = [
128
+ j(" Continue ")
122
129
  ])),
123
130
  _: 1
124
131
  }, 8, ["disabled"])
@@ -1,7 +1,7 @@
1
1
  import o from "./ScalarAsciiArt.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../_virtual/_plugin-vue_export-helper.js";
4
- const i = /* @__PURE__ */ r(o, [["__scopeId", "data-v-93347509"]]);
4
+ const i = /* @__PURE__ */ r(o, [["__scopeId", "data-v-0018c948"]]);
5
5
  export {
6
6
  i as default
7
7
  };
@@ -1,34 +1,37 @@
1
- import { defineComponent as d, computed as g, openBlock as a, createElementBlock as i, normalizeClass as h, Fragment as f, renderList as y, normalizeStyle as r, createElementVNode as v, toDisplayString as x } from "vue";
2
- const c = 500, l = 100, k = /* @__PURE__ */ d({
1
+ import { defineComponent as h, computed as f, openBlock as i, createElementBlock as l, normalizeClass as y, Fragment as v, renderList as x, normalizeStyle as m, createElementVNode as $, toDisplayString as k } from "vue";
2
+ const p = 500, o = 100, B = /* @__PURE__ */ h({
3
3
  __name: "ScalarAsciiArt",
4
4
  props: {
5
5
  art: {},
6
6
  animate: { type: Boolean }
7
7
  },
8
- setup(m) {
9
- const p = m, e = g(() => p.art.split(`
10
- `)), u = (t, o) => ({
11
- animationDuration: `${t * l}ms, ${c}ms`,
12
- animationTimingFunction: `steps(${t}), step-end`,
13
- animationDelay: `${o * l}ms, 0ms`,
14
- animationIterationCount: `1, ${(e.value.length + e.value[e.value.length - 1].length + 5) * l / c}`
15
- });
16
- return (t, o) => (a(), i("div", {
17
- class: h(["ascii-art font-code flex flex-col items-start text-[6px] leading-[7px]", { "ascii-art-animate": t.animate }])
8
+ setup(u) {
9
+ const d = u, n = f(() => d.art.split(`
10
+ `)), g = (a, s) => {
11
+ var e, t, r, c;
12
+ return {
13
+ animationDuration: `${a * o}ms, ${p}ms`,
14
+ animationTimingFunction: `steps(${a}), step-end`,
15
+ animationDelay: `${s * o}ms, 0ms`,
16
+ animationIterationCount: `1, ${((((e = n.value) == null ? void 0 : e.length) ?? 0) + (((c = (r = n.value) == null ? void 0 : r[((t = n.value) == null ? void 0 : t.length) - 1]) == null ? void 0 : c.length) ?? 0) + 5) * o / p}`
17
+ };
18
+ };
19
+ return (a, s) => (i(), l("div", {
20
+ class: y(["ascii-art font-code flex flex-col items-start text-[6px] leading-[7px]", { "ascii-art-animate": a.animate }])
18
21
  }, [
19
- (a(!0), i(f, null, y(e.value, (n, s) => (a(), i("span", {
20
- key: s,
22
+ (i(!0), l(v, null, x(n.value, (e, t) => (i(), l("span", {
23
+ key: t,
21
24
  class: "inline-block",
22
- style: r({ width: `calc(${n.length + 1}ch)` })
25
+ style: m({ width: `calc(${e.length + 1}ch)` })
23
26
  }, [
24
- v("span", {
27
+ $("span", {
25
28
  class: "inline-block whitespace-pre overflow-hidden",
26
- style: r(u(n.length, s))
27
- }, x(n), 5)
29
+ style: m(g(e.length, t))
30
+ }, k(e), 5)
28
31
  ], 4))), 128))
29
32
  ], 2));
30
33
  }
31
34
  });
32
35
  export {
33
- k as default
36
+ B as default
34
37
  };
@@ -1 +1 @@
1
- {"version":3,"file":"useSearch.d.ts","sourceRoot":"","sources":["../../../src/components/Search/useSearch.ts"],"names":[],"mappings":"AAGA,OAAa,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAA;AAI/C;;;GAGG;AACH,wBAAgB,SAAS;;;eAMd,MAAM;qBACA,MAAM;kBACT,MAAM;YACZ,MAAM;cACJ,MAAM;cACN,MAAM;;;iCAqFsB,UAAU;eA1FrC,MAAM;qBACA,MAAM;kBACT,MAAM;YACZ,MAAM;cACJ,MAAM;cACN,MAAM;MAqF0C;sBAlDjC,IAAI;;;uCAae,IAAI,GAAG,MAAM;;EAmExD"}
1
+ {"version":3,"file":"useSearch.d.ts","sourceRoot":"","sources":["../../../src/components/Search/useSearch.ts"],"names":[],"mappings":"AAIA,OAAa,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAA;AAI/C;;;GAGG;AACH,wBAAgB,SAAS;;;eAMd,MAAM;qBACA,MAAM;kBACT,MAAM;YACZ,MAAM;cACJ,MAAM;cACN,MAAM;;;iCA4FsB,UAAU;eAjGrC,MAAM;qBACA,MAAM;kBACT,MAAM;YACZ,MAAM;cACJ,MAAM;cACN,MAAM;MA4F0C;sBAxDjC,IAAI;;;uCAae,IAAI,GAAG,MAAM;;EAyExD"}
@@ -1,68 +1,76 @@
1
- import { useActiveEntities as T } from "../../store/active-entities.js";
2
- import W from "fuse.js";
3
- import { ref as a, watch as f, computed as x, nextTick as A } from "vue";
4
- import { useRouter as E } from "vue-router";
5
- import { useWorkspace as I } from "../../store/store.js";
6
- function M() {
7
- const d = E(), { activeWorkspace: R, activeWorkspaceRequests: k } = T(), { requests: S } = I(), u = a([]), c = a([]), s = a(0), o = a(""), l = a(null), r = a([]), i = new W(u.value, {
1
+ import { useActiveEntities as x } from "../../store/active-entities.js";
2
+ import { isDefined as A } from "@scalar/oas-utils/helpers";
3
+ import D from "fuse.js";
4
+ import { ref as a, watch as d, computed as R, nextTick as E } from "vue";
5
+ import { useRouter as I } from "vue-router";
6
+ import { useWorkspace as C } from "../../store/store.js";
7
+ function P() {
8
+ const k = I(), { activeWorkspace: S, activeWorkspaceRequests: i } = x(), { requests: b } = C(), u = a([]), c = a([]), s = a(0), l = a(""), n = a(null), v = a([]), h = new D(u.value, {
8
9
  keys: ["title", "description", "body"]
9
- }), b = () => {
10
- o.value = "", s.value = 0, c.value = [], l.value instanceof HTMLInputElement && l.value.blur();
11
- }, g = (e) => {
12
- u.value = e.map((t) => ({
13
- id: t.uid,
14
- title: t.summary ?? t.method,
15
- description: t.description ?? "",
16
- httpVerb: t.method,
17
- path: t.path,
18
- link: `/workspace/${R.value.uid}/request/${t.uid}`
19
- })), i.setCollection(u.value);
20
- }, v = () => {
21
- s.value = 0, c.value = i.search(o.value);
10
+ }), g = () => {
11
+ l.value = "", s.value = 0, c.value = [], n.value instanceof HTMLInputElement && n.value.blur();
12
+ }, y = (e) => {
13
+ u.value = e.map((t) => {
14
+ var o;
15
+ return {
16
+ id: t.uid,
17
+ title: t.summary ?? t.method,
18
+ description: t.description ?? "",
19
+ httpVerb: t.method,
20
+ path: t.path,
21
+ // TODO: Use router instead
22
+ link: `/workspace/${(o = S.value) == null ? void 0 : o.uid}/request/${t.uid}`
23
+ };
24
+ }), h.setCollection(u.value);
25
+ }, m = () => {
26
+ s.value = 0, c.value = h.search(l.value);
22
27
  };
23
- f(o, (e) => {
24
- e.length ? v() : c.value = [];
28
+ d(l, (e) => {
29
+ e.length ? m() : c.value = [];
25
30
  });
26
- const y = (e) => {
27
- const t = e === "up" ? -1 : 1, p = n.value.length;
28
- s.value = (s.value + t + p) % p, A(() => {
29
- const m = r.value[s.value];
30
- m instanceof HTMLElement && m.scrollIntoView({
31
+ const w = (e) => {
32
+ const t = e === "up" ? -1 : 1, o = r.value.length;
33
+ s.value = (s.value + t + o) % o, E(() => {
34
+ const f = v.value[s.value];
35
+ f instanceof HTMLElement && f.scrollIntoView({
31
36
  behavior: "smooth",
32
37
  block: "center"
33
38
  });
34
39
  });
35
- }, w = () => {
36
- s.value >= 0 && h(
37
- n.value[s.value]
38
- );
39
- };
40
- f(
41
- k,
42
- (e) => {
43
- g(e.map((t) => S[t]));
40
+ }, T = () => {
41
+ if (s.value >= 0) {
42
+ const e = r.value[s.value];
43
+ e && p(e);
44
+ }
45
+ }, W = R(
46
+ () => i.value.map((e) => b[e]).filter(A)
47
+ );
48
+ d(
49
+ i,
50
+ () => {
51
+ y(W.value);
44
52
  },
45
53
  { immediate: !0 }
46
54
  );
47
- const h = (e) => {
48
- d.push(e.item.id), b();
49
- }, n = x(
50
- () => o.value.length === 0 ? u.value.map((e) => ({
55
+ const p = (e) => {
56
+ k.push(e.item.id), g();
57
+ }, r = R(
58
+ () => l.value.length === 0 ? u.value.map((e) => ({
51
59
  item: e
52
60
  })) : c.value
53
61
  );
54
62
  return {
55
- searchText: o,
56
- searchResultsWithPlaceholderResults: n,
63
+ searchText: l,
64
+ searchResultsWithPlaceholderResults: r,
57
65
  selectedSearchResult: s,
58
- onSearchResultClick: h,
59
- fuseSearch: v,
60
- searchInputRef: l,
61
- searchResultRefs: r,
62
- navigateSearchResults: y,
63
- selectSearchResult: w
66
+ onSearchResultClick: p,
67
+ fuseSearch: m,
68
+ searchInputRef: n,
69
+ searchResultRefs: v,
70
+ navigateSearchResults: w,
71
+ selectSearchResult: T
64
72
  };
65
73
  }
66
74
  export {
67
- M as useSearch
75
+ P as useSearch
68
76
  };
@@ -1 +1 @@
1
- {"version":3,"file":"SideNavRouterLink.vue.d.ts","sourceRoot":"","sources":["../../../src/components/SideNav/SideNavRouterLink.vue"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEzC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAA;AAK9C,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,IAAI,CAAA;IACV,IAAI,EAAE,CAAC,OAAO,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAA;IACrC,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAC;AAUF,iBAAS,cAAc;WA0CT,OAAO,IAA6B;;yBARrB,GAAG;;;;EAa/B;AAWD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,kSAOnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"SideNavRouterLink.vue.d.ts","sourceRoot":"","sources":["../../../src/components/SideNav/SideNavRouterLink.vue"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEzC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAA;AAK9C,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,IAAI,CAAA;IACV,IAAI,EAAE,CAAC,OAAO,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAA;IACrC,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAC;AAUF,iBAAS,cAAc;WAyCT,OAAO,IAA6B;;yBARrB,GAAG;;;;EAa/B;AAWD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,kSAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,29 +1,32 @@
1
- import { defineComponent as i, openBlock as n, createBlock as r, unref as o, withCtx as a, renderSlot as c } from "vue";
2
- import s from "./SideNavLink.vue.js";
3
- import { useActiveEntities as p } from "../../store/active-entities.js";
4
- import { RouterLink as m } from "vue-router";
5
- const k = /* @__PURE__ */ i({
1
+ import { defineComponent as n, openBlock as r, createBlock as a, unref as t, withCtx as c, renderSlot as s } from "vue";
2
+ import p from "./SideNavLink.vue.js";
3
+ import { useActiveEntities as m } from "../../store/active-entities.js";
4
+ import { RouterLink as f } from "vue-router";
5
+ const $ = /* @__PURE__ */ n({
6
6
  __name: "SideNavRouterLink",
7
7
  props: {
8
8
  icon: {},
9
9
  name: {},
10
10
  active: { type: Boolean }
11
11
  },
12
- setup(f) {
13
- const { activeWorkspace: t } = p();
14
- return (e, u) => (n(), r(s, {
15
- is: o(m),
16
- active: e.active,
17
- icon: e.icon,
18
- to: `/workspace/${o(t).uid}/${e.name}`
19
- }, {
20
- default: a(() => [
21
- c(e.$slots, "default")
22
- ]),
23
- _: 3
24
- }, 8, ["is", "active", "icon", "to"]));
12
+ setup(u) {
13
+ const { activeWorkspace: i } = m();
14
+ return (e, l) => {
15
+ var o;
16
+ return r(), a(p, {
17
+ is: t(f),
18
+ active: e.active,
19
+ icon: e.icon,
20
+ to: `/workspace/${(o = t(i)) == null ? void 0 : o.uid}/${e.name}`
21
+ }, {
22
+ default: c(() => [
23
+ s(e.$slots, "default")
24
+ ]),
25
+ _: 3
26
+ }, 8, ["is", "active", "icon", "to"]);
27
+ };
25
28
  }
26
29
  });
27
30
  export {
28
- k as default
31
+ $ as default
29
32
  };
@@ -1 +1 @@
1
- {"version":3,"file":"SidebarListElement.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/SidebarListElement.vue"],"names":[],"mappings":"AAoHA,OAAO,EAAE,KAAK,IAAI,EAAc,MAAM,oBAAoB,CAAA;AAK1D,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE;QACR,GAAG,EAAE,MAAM,CAAA;QACX,IAAI,EAAE,MAAM,CAAA;QACZ,KAAK,CAAC,EAAE,MAAM,CAAA;QACd,IAAI,CAAC,EAAE,IAAI,CAAA;QACX,SAAS,CAAC,EAAE,OAAO,CAAA;KACpB,CAAA;IACD,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,IAAI,EAAE,aAAa,GAAG,SAAS,GAAG,QAAQ,CAAA;CAC3C,CAAC;;;;;;;;;;AAuNF,wBAQG"}
1
+ {"version":3,"file":"SidebarListElement.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/SidebarListElement.vue"],"names":[],"mappings":"AAqHA,OAAO,EAAE,KAAK,IAAI,EAAc,MAAM,oBAAoB,CAAA;AAK1D,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE;QACR,GAAG,EAAE,MAAM,CAAA;QACX,IAAI,EAAE,MAAM,CAAA;QACZ,KAAK,CAAC,EAAE,MAAM,CAAA;QACd,IAAI,CAAC,EAAE,IAAI,CAAA;QACX,SAAS,CAAC,EAAE,OAAO,CAAA;KACpB,CAAA;IACD,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,IAAI,EAAE,aAAa,GAAG,SAAS,GAAG,QAAQ,CAAA;CAC3C,CAAC;;;;;;;;;;AAuNF,wBAQG"}
@@ -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-a3cf480d"]]);
4
+ const a = /* @__PURE__ */ o(t, [["__scopeId", "data-v-4713d7d0"]]);
5
5
  export {
6
- m as default
6
+ a as default
7
7
  };
@@ -1,9 +1,9 @@
1
- import { defineComponent as g, resolveComponent as C, openBlock as r, createElementBlock as p, createVNode as d, normalizeClass as h, unref as t, withModifiers as D, withCtx as I, createElementVNode as c, normalizeStyle as M, createCommentVNode as m, createBlock as R, toDisplayString as B } from "vue";
2
- import E from "./SidebarListElementActions.vue.js";
3
- import { useActiveEntities as N } from "../../store/active-entities.js";
4
- import { ScalarIcon as S } from "@scalar/components";
5
- import { useRouter as z } from "vue-router";
6
- const V = { class: "empty-variable-name text-sm" }, q = /* @__PURE__ */ g({
1
+ import { defineComponent as C, resolveComponent as h, openBlock as s, createElementBlock as d, createVNode as c, normalizeClass as D, unref as p, withModifiers as I, withCtx as M, createElementVNode as m, normalizeStyle as R, createCommentVNode as u, createBlock as B, toDisplayString as E } from "vue";
2
+ import N from "./SidebarListElementActions.vue.js";
3
+ import { useActiveEntities as S } from "../../store/active-entities.js";
4
+ import { ScalarIcon as z } from "@scalar/components";
5
+ import { useRouter as V } from "vue-router";
6
+ const A = { class: "empty-variable-name text-sm" }, F = /* @__PURE__ */ C({
7
7
  __name: "SidebarListElement",
8
8
  props: {
9
9
  variable: {},
@@ -15,57 +15,59 @@ const V = { class: "empty-variable-name text-sm" }, q = /* @__PURE__ */ g({
15
15
  type: {}
16
16
  },
17
17
  emits: ["delete", "colorModal", "rename"],
18
- setup(u, { emit: b }) {
19
- const v = u, i = b, k = z(), { activeWorkspace: n } = N(), y = (e, a, l) => {
18
+ setup(b, { emit: v }) {
19
+ const k = b, r = v, y = V(), { activeWorkspace: t } = S(), f = (e, a, n) => {
20
+ var i;
20
21
  const o = {
21
- workspaceId: n.value.uid,
22
- type: v.type,
23
- collectionId: l || void 0,
22
+ workspaceId: (i = t.value) == null ? void 0 : i.uid,
23
+ type: k.type,
24
+ collectionId: n || void 0,
24
25
  uid: a
25
- }, s = l ? `/workspace/${o.workspaceId}/${o.type}/${o.collectionId}/${o.uid}` : `/workspace/${o.workspaceId}/${o.type}/${o.uid}`;
26
- e.metaKey ? window.open(s, "_blank") : k.push({ path: s });
27
- }, f = (e) => {
28
- i("delete", e);
26
+ }, l = n ? `/workspace/${o.workspaceId}/${o.type}/${o.collectionId}/${o.uid}` : `/workspace/${o.workspaceId}/${o.type}/${o.uid}`;
27
+ e.metaKey ? window.open(l, "_blank") : y.push({ path: l });
29
28
  }, w = (e) => {
30
- i("colorModal", e);
29
+ r("delete", e);
31
30
  }, $ = (e) => {
32
- i("rename", e);
31
+ r("colorModal", e);
32
+ }, g = (e) => {
33
+ r("rename", e);
33
34
  };
34
35
  return (e, a) => {
35
- const l = C("router-link");
36
- return r(), p("li", null, [
37
- d(l, {
38
- class: h(["h-8 text-c-2 hover:bg-b-2 group relative block flex items-center gap-1.5 rounded py-1 pr-1.5 font-medium no-underline", [e.variable.color ? "pl-1" : "pl-1.5"]]),
36
+ var o, l;
37
+ const n = h("router-link");
38
+ return s(), d("li", null, [
39
+ c(n, {
40
+ class: D(["h-8 text-c-2 hover:bg-b-2 group relative block flex items-center gap-1.5 rounded py-1 pr-1.5 font-medium no-underline", [e.variable.color ? "pl-1" : "pl-1.5"]]),
39
41
  exactActiveClass: "active-link",
40
- to: e.collectionId ? `/workspace/${t(n).uid}/${e.type}/${e.collectionId}/${e.variable.uid}` : `/workspace/${t(n).uid}/${e.type}/${e.variable.uid}`,
41
- onClick: a[1] || (a[1] = D((o) => y(o, e.variable.uid, e.collectionId), ["prevent"]))
42
+ to: e.collectionId ? `/workspace/${(o = p(t)) == null ? void 0 : o.uid}/${e.type}/${e.collectionId}/${e.variable.uid}` : `/workspace/${(l = p(t)) == null ? void 0 : l.uid}/${e.type}/${e.variable.uid}`,
43
+ onClick: a[1] || (a[1] = I((i) => f(i, e.variable.uid, e.collectionId), ["prevent"]))
42
44
  }, {
43
- default: I(() => [
44
- e.variable.color ? (r(), p("button", {
45
+ default: M(() => [
46
+ e.variable.color ? (s(), d("button", {
45
47
  key: 0,
46
48
  class: "hover:bg-b-3 rounded p-1.5",
47
49
  type: "button",
48
- onClick: a[0] || (a[0] = (o) => w(e.variable.uid))
50
+ onClick: a[0] || (a[0] = (i) => $(e.variable.uid))
49
51
  }, [
50
- c("div", {
52
+ m("div", {
51
53
  class: "h-2.5 w-2.5 rounded-xl",
52
- style: M({ backgroundColor: e.variable.color })
54
+ style: R({ backgroundColor: e.variable.color })
53
55
  }, null, 4)
54
- ])) : m("", !0),
55
- e.variable.icon ? (r(), R(t(S), {
56
+ ])) : u("", !0),
57
+ e.variable.icon ? (s(), B(p(z), {
56
58
  key: 1,
57
59
  class: "text-sidebar-c-2 size-3.5 stroke-[2.25]",
58
60
  icon: e.variable.icon
59
- }, null, 8, ["icon"])) : m("", !0),
60
- c("span", V, B(e.variable.name), 1),
61
- d(E, {
61
+ }, null, 8, ["icon"])) : u("", !0),
62
+ m("span", A, E(e.variable.name), 1),
63
+ c(N, {
62
64
  isCopyable: e.isCopyable,
63
65
  isDeletable: e.isDeletable,
64
66
  isRenameable: e.isRenameable,
65
67
  variable: { ...e.variable, isDefault: e.variable.isDefault ?? !1 },
66
68
  warningMessage: e.warningMessage,
67
- onDelete: f,
68
- onRename: $
69
+ onDelete: w,
70
+ onRename: g
69
71
  }, null, 8, ["isCopyable", "isDeletable", "isRenameable", "variable", "warningMessage"])
70
72
  ]),
71
73
  _: 1
@@ -75,5 +77,5 @@ const V = { class: "empty-variable-name text-sm" }, q = /* @__PURE__ */ g({
75
77
  }
76
78
  });
77
79
  export {
78
- q as default
80
+ F as default
79
81
  };
@@ -1 +1 @@
1
- {"version":3,"file":"TopNav.vue.d.ts","sourceRoot":"","sources":["../../../src/components/TopNav/TopNav.vue"],"names":[],"mappings":"AA2PA,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;CACjD,CAAC;;AA2aF,wBAOG"}
1
+ {"version":3,"file":"TopNav.vue.d.ts","sourceRoot":"","sources":["../../../src/components/TopNav/TopNav.vue"],"names":[],"mappings":"AAgQA,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;CACjD,CAAC;;AAgbF,wBAOG"}