@scalar/api-client 2.2.53 → 2.2.55

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 (84) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/components/CommandPalette/CommandActionForm.vue.d.ts +1 -1
  3. package/dist/components/CommandPalette/CommandActionForm.vue.d.ts.map +1 -1
  4. package/dist/components/CommandPalette/CommandActionForm.vue.js +15 -14
  5. package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
  6. package/dist/components/CommandPalette/CommandPaletteImport.vue.js +121 -106
  7. package/dist/components/{ImportCurl/ImportCurlModal.vue.d.ts → CommandPalette/CommandPaletteImportCurl.vue.d.ts} +9 -17
  8. package/dist/components/CommandPalette/CommandPaletteImportCurl.vue.d.ts.map +1 -0
  9. package/dist/components/CommandPalette/CommandPaletteImportCurl.vue.js +7 -0
  10. package/dist/components/CommandPalette/CommandPaletteImportCurl.vue2.js +141 -0
  11. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +98 -1
  12. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
  13. package/dist/components/CommandPalette/TheCommandPalette.vue.js +2 -2
  14. package/dist/components/CommandPalette/TheCommandPalette.vue2.js +128 -113
  15. package/dist/components/HttpMethod/HttpMethod.vue.d.ts +2 -2
  16. package/dist/components/OpenApiClientButton.vue.d.ts.map +1 -1
  17. package/dist/components/OpenApiClientButton.vue.js +2 -2
  18. package/dist/components/Server/ServerSelector.vue.d.ts +5 -1
  19. package/dist/components/Server/ServerSelector.vue.d.ts.map +1 -1
  20. package/dist/components/Server/ServerSelector.vue.js +48 -43
  21. package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
  22. package/dist/components/TopNav/TopNav.vue.js +122 -94
  23. package/dist/components/TopNav/TopNavItem.vue.d.ts +1 -0
  24. package/dist/components/TopNav/TopNavItem.vue.d.ts.map +1 -1
  25. package/dist/components/TopNav/TopNavItem.vue.js +1 -1
  26. package/dist/components/TopNav/TopNavItem.vue2.js +49 -42
  27. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
  28. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +10 -9
  29. package/dist/layouts/App/create-api-client-app.d.ts +12 -12
  30. package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +1 -1
  31. package/dist/layouts/Modal/ApiClientModal.vue.js +2 -2
  32. package/dist/layouts/Modal/create-api-client-modal.d.ts +24 -24
  33. package/dist/layouts/Web/create-api-client-web.d.ts +12 -12
  34. package/dist/libs/create-client.d.ts +12 -12
  35. package/dist/libs/create-client.d.ts.map +1 -1
  36. package/dist/libs/create-client.js +91 -115
  37. package/dist/libs/get-request-uid-by-path-method.d.ts +7 -0
  38. package/dist/libs/get-request-uid-by-path-method.d.ts.map +1 -0
  39. package/dist/libs/get-request-uid-by-path-method.js +10 -0
  40. package/dist/libs/get-request-uid-by-path-method.test.d.ts +2 -0
  41. package/dist/libs/get-request-uid-by-path-method.test.d.ts.map +1 -0
  42. package/dist/libs/send-request/create-fetch-body.d.ts +1 -1
  43. package/dist/libs/validate-parameters.d.ts +6 -0
  44. package/dist/libs/validate-parameters.d.ts.map +1 -0
  45. package/dist/libs/validate-parameters.js +12 -0
  46. package/dist/libs/validate-parameters.test.d.ts +2 -0
  47. package/dist/libs/validate-parameters.test.d.ts.map +1 -0
  48. package/dist/store/cookies.d.ts +4 -4
  49. package/dist/store/request-example.d.ts +4 -4
  50. package/dist/store/requests.d.ts +4 -4
  51. package/dist/store/store.d.ts +12 -12
  52. package/dist/style.css +1 -1
  53. package/dist/views/Request/Request.vue.d.ts +6 -3
  54. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  55. package/dist/views/Request/Request.vue.js +2 -2
  56. package/dist/views/Request/Request.vue2.js +96 -145
  57. package/dist/views/Request/RequestRoot.vue.d.ts.map +1 -1
  58. package/dist/views/Request/RequestRoot.vue.js +2 -2
  59. package/dist/views/Request/RequestRoot.vue2.js +68 -57
  60. package/dist/views/Request/RequestSection/RequestParams.vue.d.ts +1 -0
  61. package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
  62. package/dist/views/Request/RequestSection/RequestParams.vue.js +34 -31
  63. package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts +1 -0
  64. package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts.map +1 -1
  65. package/dist/views/Request/RequestSection/RequestPathParams.vue.js +35 -33
  66. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts +1 -0
  67. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
  68. package/dist/views/Request/RequestSection/RequestSection.vue.js +2 -2
  69. package/dist/views/Request/RequestSection/RequestSection.vue2.js +59 -54
  70. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +1 -0
  71. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
  72. package/dist/views/Request/RequestSection/RequestTable.vue.js +2 -2
  73. package/dist/views/Request/RequestSection/RequestTable.vue2.js +29 -27
  74. package/dist/views/Request/RequestSidebar.vue.js +2 -2
  75. package/dist/views/Request/RequestSidebar.vue2.js +23 -23
  76. package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -1
  77. package/dist/views/Request/RequestSubpageHeader.vue.js +2 -2
  78. package/dist/views/Request/RequestSubpageHeader.vue2.js +4 -4
  79. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  80. package/dist/views/Request/libs/request.js +1 -2
  81. package/package.json +11 -11
  82. package/dist/components/ImportCurl/ImportCurlModal.vue.d.ts.map +0 -1
  83. package/dist/components/ImportCurl/ImportCurlModal.vue.js +0 -7
  84. package/dist/components/ImportCurl/ImportCurlModal.vue2.js +0 -125
@@ -1,70 +1,75 @@
1
- import { defineComponent as S, computed as s, watch as p, openBlock as u, createBlock as w, unref as n, withCtx as d, createVNode as v, createElementVNode as m, createTextVNode as f, toDisplayString as g, createElementBlock as h } from "vue";
2
- import { ScalarListbox as y, ScalarButton as k, ScalarIcon as V } from "@scalar/components";
3
- import { useWorkspace as b } from "../../store/store.js";
4
- const U = {
1
+ import { defineComponent as h, computed as a, watch as y, openBlock as m, createBlock as k, unref as n, withCtx as f, createVNode as S, createElementVNode as g, createTextVNode as p, toDisplayString as x, createElementBlock as U } from "vue";
2
+ import { ScalarListbox as V, ScalarButton as b, ScalarIcon as B } from "@scalar/components";
3
+ import { useWorkspace as N } from "../../store/store.js";
4
+ const W = {
5
5
  key: 1,
6
6
  class: "gap-0.75 text-c-1 h-6.5 flex w-full items-center whitespace-nowrap rounded-b-lg px-3 py-1.5 text-xs lg:text-sm"
7
- }, z = /* @__PURE__ */ S({
7
+ }, E = /* @__PURE__ */ h({
8
8
  __name: "ServerSelector",
9
9
  props: {
10
10
  collection: {},
11
11
  server: {},
12
12
  target: {}
13
13
  },
14
- setup(r) {
15
- const { servers: x, collectionMutators: a } = b(), o = s(
14
+ emits: ["updateServer"],
15
+ setup(l, { emit: w }) {
16
+ const i = w, { servers: s, collectionMutators: c } = N(), o = a(
16
17
  () => {
17
- var e;
18
- return (e = r.collection) == null ? void 0 : e.servers.map((t) => {
19
- var l;
18
+ var t;
19
+ return (t = l.collection) == null ? void 0 : t.servers.map((e) => {
20
+ var r;
20
21
  return {
21
- id: t,
22
- label: ((l = x[t]) == null ? void 0 : l.url) ?? "Unknown server"
22
+ id: e,
23
+ label: ((r = s[e]) == null ? void 0 : r.url) ?? "Unknown server"
23
24
  };
24
25
  });
25
26
  }
26
- ), i = s({
27
- get: () => r.server ? o.value.find((e) => e.id === r.server.uid) : void 0,
28
- set: (e) => {
29
- e && a.edit(
30
- r.collection.uid,
27
+ ), u = a({
28
+ get: () => l.server ? o.value.find((t) => t.id === l.server.uid) : void 0,
29
+ set: (t) => {
30
+ var r;
31
+ if (!t) return;
32
+ c.edit(
33
+ l.collection.uid,
31
34
  "selectedServerUid",
32
- e.id
35
+ t.id
33
36
  );
37
+ const e = (r = s[t.id]) == null ? void 0 : r.url;
38
+ e && i("updateServer", e);
34
39
  }
35
40
  });
36
- p(
37
- () => r.collection,
38
- (e) => {
39
- var l;
40
- if (!e || e.selectedServerUid) return;
41
- const t = (l = r.collection.servers) == null ? void 0 : l[0];
42
- t && a.edit(r.collection.uid, "selectedServerUid", t);
41
+ y(
42
+ () => l.collection,
43
+ (t) => {
44
+ var r, v;
45
+ if (!t || t.selectedServerUid) return;
46
+ const e = (r = l.collection.servers) == null ? void 0 : r[0];
47
+ e && (c.edit(l.collection.uid, "selectedServerUid", e), (v = s[e]) != null && v.url && i("updateServer", s[e].url));
43
48
  }
44
49
  );
45
- const c = s(() => {
46
- var e, t, l;
47
- return (t = (e = r.server) == null ? void 0 : e.url) != null && t.endsWith("/") ? r.server.url.slice(0, -1) : ((l = r.server) == null ? void 0 : l.url) || "";
50
+ const d = a(() => {
51
+ var t, e, r;
52
+ return (e = (t = l.server) == null ? void 0 : t.url) != null && e.endsWith("/") ? l.server.url.slice(0, -1) : ((r = l.server) == null ? void 0 : r.url) || "";
48
53
  });
49
- return (e, t) => o.value.length > 1 ? (u(), w(n(y), {
54
+ return (t, e) => o.value.length > 1 ? (m(), k(n(V), {
50
55
  key: 0,
51
- modelValue: i.value,
52
- "onUpdate:modelValue": t[0] || (t[0] = (l) => i.value = l),
56
+ modelValue: u.value,
57
+ "onUpdate:modelValue": e[0] || (e[0] = (r) => u.value = r),
53
58
  options: o.value,
54
59
  placement: "bottom-start",
55
60
  resize: "",
56
- target: e.target,
57
- teleport: `#${e.target}`
61
+ target: t.target,
62
+ teleport: `#${t.target}`
58
63
  }, {
59
- default: d(() => [
60
- v(n(k), {
64
+ default: f(() => [
65
+ S(n(b), {
61
66
  class: "gap-0.75 text-c-1 h-6.5 w-full justify-start whitespace-nowrap rounded-b-lg px-3 py-1.5 text-xs font-normal -outline-offset-1 lg:text-sm",
62
67
  variant: "ghost"
63
68
  }, {
64
- default: d(() => [
65
- t[1] || (t[1] = m("span", { class: "sr-only" }, "Server:", -1)),
66
- f(" " + g(c.value) + " ", 1),
67
- v(n(V), {
69
+ default: f(() => [
70
+ e[1] || (e[1] = g("span", { class: "sr-only" }, "Server:", -1)),
71
+ p(" " + x(d.value) + " ", 1),
72
+ S(n(B), {
68
73
  class: "text-c-2",
69
74
  icon: "ChevronDown",
70
75
  size: "sm"
@@ -74,12 +79,12 @@ const U = {
74
79
  })
75
80
  ]),
76
81
  _: 1
77
- }, 8, ["modelValue", "options", "target", "teleport"])) : (u(), h("div", U, [
78
- t[2] || (t[2] = m("span", { class: "sr-only" }, "Server:", -1)),
79
- f(" " + g(c.value), 1)
82
+ }, 8, ["modelValue", "options", "target", "teleport"])) : (m(), U("div", W, [
83
+ e[2] || (e[2] = g("span", { class: "sr-only" }, "Server:", -1)),
84
+ p(" " + x(d.value), 1)
80
85
  ]));
81
86
  }
82
87
  });
83
88
  export {
84
- z as default
89
+ E as default
85
90
  };
@@ -1 +1 @@
1
- {"version":3,"file":"TopNav.vue.d.ts","sourceRoot":"","sources":["../../../src/components/TopNav/TopNav.vue"],"names":[],"mappings":"AAiRA,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;CACjD,CAAC;;AAkcF,wBAOG"}
1
+ {"version":3,"file":"TopNav.vue.d.ts","sourceRoot":"","sources":["../../../src/components/TopNav/TopNav.vue"],"names":[],"mappings":"AAqTA,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;CACjD,CAAC;;AA+eF,wBAOG"}
@@ -1,158 +1,182 @@
1
- import { defineComponent as j, reactive as z, ref as O, computed as W, watch as R, onMounted as D, onBeforeUnmount as K, openBlock as m, createElementBlock as b, createElementVNode as v, createVNode as r, unref as s, withCtx as u, createBlock as _, createCommentVNode as q, toDisplayString as F, createTextVNode as S, Fragment as H, renderList as G } from "vue";
2
- import { ScalarContextMenu as J, ScalarIcon as d, ScalarFloating as P, ScalarDropdownMenu as Q, ScalarDropdownButton as I } from "@scalar/components";
3
- import { useClipboard as X } from "@scalar/use-hooks/useClipboard";
4
- import { useRouter as Y } from "vue-router";
5
- import Z from "../ScalarHotkey.vue.js";
6
- import { ROUTES as ee } from "../../constants.js";
7
- import { useActiveEntities as te } from "../../store/active-entities.js";
8
- import oe from "./TopNavItem.vue.js";
9
- import { useWorkspace as ae } from "../../store/store.js";
10
- const ne = { class: "mac:pl-[72px] t-app__top-nav relative flex h-10 pl-2" }, le = { class: "relative flex h-10 flex-1 items-center gap-1.5 overflow-hidden pr-2.5 text-sm font-medium" }, ie = {
1
+ import { defineComponent as O, reactive as W, ref as D, computed as L, watch as I, onMounted as K, onBeforeUnmount as q, openBlock as p, createElementBlock as g, createElementVNode as h, createVNode as r, unref as i, withCtx as m, createBlock as k, createCommentVNode as F, toDisplayString as H, createTextVNode as U, Fragment as G, renderList as J } from "vue";
2
+ import { ScalarContextMenu as P, ScalarIcon as C, ScalarFloating as Q, ScalarDropdownMenu as X, ScalarDropdownButton as A } from "@scalar/components";
3
+ import { LibraryIcon as Y } from "@scalar/icons";
4
+ import { useClipboard as Z } from "@scalar/use-hooks/useClipboard";
5
+ import { useRouter as ee } from "vue-router";
6
+ import te from "../ScalarHotkey.vue.js";
7
+ import { ROUTES as oe } from "../../constants.js";
8
+ import { useActiveEntities as le } from "../../store/active-entities.js";
9
+ import ae from "./TopNavItem.vue.js";
10
+ import { useWorkspace as ne } from "../../store/store.js";
11
+ const ie = { class: "mac:pl-[72px] t-app__top-nav relative flex h-10 pl-2" }, se = { class: "relative flex h-10 flex-1 items-center gap-1.5 overflow-hidden pr-2.5 text-sm font-medium" }, re = {
11
12
  key: 0,
12
13
  class: "h-full w-full overflow-hidden"
13
- }, he = /* @__PURE__ */ j({
14
+ }, ge = /* @__PURE__ */ O({
14
15
  __name: "TopNav",
15
16
  props: {
16
17
  openNewTab: {}
17
18
  },
18
- setup(L) {
19
- const U = L, { activeRequest: A, activeCollection: E } = te(), c = Y(), { events: g } = ae(), { copyToClipboard: M } = X(), t = z([{ label: "", path: "", icon: "Add" }]), a = O(0), T = W(() => a.value);
20
- function k() {
21
- var o, n, l, i, x;
22
- if ((o = c.currentRoute.value.name) != null && o.toString().startsWith("collection.")) {
19
+ setup(E) {
20
+ const M = E, { activeRequest: $, activeCollection: v } = le(), c = ee(), { events: T } = ne(), { copyToClipboard: z } = Z(), t = W([
21
+ {
22
+ label: "",
23
+ path: "",
24
+ icon: "Add",
25
+ isCollection: !1
26
+ }
27
+ ]), a = D(0), y = L(() => a.value), N = L(() => {
28
+ var e;
29
+ return (e = c.currentRoute.value.name) == null ? void 0 : e.toString().startsWith("collection.");
30
+ });
31
+ function x() {
32
+ var o, l, n, u, s;
33
+ if (N.value) {
23
34
  t[a.value] = {
24
- label: ((l = (n = E.value) == null ? void 0 : n.info) == null ? void 0 : l.title) || "Untitled Collection",
35
+ label: ((l = (o = v.value) == null ? void 0 : o.info) == null ? void 0 : l.title) || "Untitled Collection",
25
36
  path: c.currentRoute.value.path,
26
- icon: "Collection"
37
+ icon: ((n = v.value) == null ? void 0 : n["x-scalar-icon"]) || "Collection",
38
+ isCollection: !0
27
39
  };
28
40
  return;
29
41
  }
30
- if ((i = c.currentRoute.value.name) != null && i.toString().startsWith("request")) {
42
+ if ((u = c.currentRoute.value.name) != null && u.toString().startsWith("request")) {
31
43
  t[a.value] = {
32
- label: ((x = A.value) == null ? void 0 : x.summary) || "",
44
+ label: ((s = $.value) == null ? void 0 : s.summary) || "",
33
45
  path: c.currentRoute.value.path,
34
- icon: "ExternalLink"
46
+ icon: "ExternalLink",
47
+ isCollection: !1
35
48
  };
36
49
  return;
37
50
  }
38
- const e = ee.find((V) => {
39
- var w;
40
- return V.to.name.startsWith(
41
- ((w = c.currentRoute.value.name) == null ? void 0 : w.toString()) ?? ""
51
+ const e = oe.find((j) => {
52
+ var S;
53
+ return j.to.name.startsWith(
54
+ ((S = c.currentRoute.value.name) == null ? void 0 : S.toString()) ?? ""
42
55
  );
43
56
  });
44
57
  if (e) {
45
58
  t[a.value] = {
46
59
  label: e.displayName,
47
60
  path: c.currentRoute.value.path,
48
- icon: e.icon
61
+ icon: e.icon,
62
+ isCollection: !1
49
63
  };
50
64
  return;
51
65
  }
52
66
  }
53
- function h() {
67
+ function b() {
54
68
  var o;
55
69
  const e = (o = t[a.value]) == null ? void 0 : o.path;
56
70
  e && c.push(e);
57
71
  }
58
- function f() {
59
- t.push({ label: "", path: "", icon: "Add" }), a.value = t.length - 1, k();
72
+ function d() {
73
+ t.push({
74
+ label: "",
75
+ path: "",
76
+ icon: "Add",
77
+ isCollection: !1
78
+ }), a.value = t.length - 1, x();
60
79
  }
61
- function p(e) {
62
- a.value = e, h();
80
+ function f(e) {
81
+ a.value = e, b();
63
82
  }
64
- R(
83
+ I(
65
84
  () => c.currentRoute.value.path,
66
85
  () => {
67
- k();
86
+ x();
68
87
  },
69
88
  { immediate: !0 }
70
89
  );
71
- function C(e) {
90
+ function w(e) {
72
91
  t.splice(e, 1), a.value = Math.min(
73
92
  a.value,
74
93
  t.length - 1
75
- ), h();
94
+ ), b();
76
95
  }
77
- const N = (e) => {
78
- var n;
79
- if (!((n = t[e]) != null && n.path)) return;
96
+ const R = (e) => {
97
+ var l;
98
+ if (!((l = t[e]) != null && l.path)) return;
80
99
  const o = new URL(window.location.href);
81
- o.pathname = t[e].path, M(o.toString());
82
- }, $ = (e) => {
83
- t.splice(0, e), t.splice(1), a.value = 0, h();
84
- }, y = (e) => {
100
+ o.pathname = t[e].path, z(o.toString());
101
+ }, B = (e) => {
102
+ t.splice(0, e), t.splice(1), a.value = 0, b();
103
+ }, _ = (e) => {
85
104
  if (e) {
86
- if (e.addTopNav && f(), e.closeTopNav && C(a.value), e.navigateTopNavLeft && p(Math.max(a.value - 1, 0)), e.navigateTopNavRight && p(Math.min(a.value + 1, t.length - 1)), e.jumpToTab) {
105
+ if (e.addTopNav && d(), e.closeTopNav && w(a.value), e.navigateTopNavLeft && f(Math.max(a.value - 1, 0)), e.navigateTopNavRight && f(Math.min(a.value + 1, t.length - 1)), e.jumpToTab) {
87
106
  const o = Number(e.jumpToTab.key) - 1;
88
- o >= 0 && o < t.length && p(o);
107
+ o >= 0 && o < t.length && f(o);
89
108
  }
90
- e.jumpToLastTab && p(t.length - 1);
109
+ e.jumpToLastTab && f(t.length - 1);
91
110
  }
92
- }, B = (e) => {
111
+ }, V = (e) => {
93
112
  t.push({
94
113
  label: e.name,
95
114
  path: e.uid,
96
- icon: "ExternalLink"
115
+ icon: "ExternalLink",
116
+ isCollection: !1
97
117
  });
98
118
  };
99
- return R(
100
- () => U.openNewTab,
119
+ return I(
120
+ () => M.openNewTab,
101
121
  (e) => {
102
- e && B(e);
122
+ e && V(e);
103
123
  },
104
124
  { immediate: !0 }
105
- ), D(() => g.hotKeys.on(y)), K(() => g.hotKeys.off(y)), (e, o) => (m(), b("nav", ne, [
106
- o[3] || (o[3] = v("div", { class: "app-drag-region absolute inset-0" }, null, -1)),
107
- v("div", le, [
108
- t.length === 1 ? (m(), b("div", ie, [
109
- r(s(J), { triggerClass: "flex custom-scroll gap-1.5 h-full items-center justify-center w-full whitespace-nowrap" }, {
110
- trigger: u(() => {
111
- var n, l, i;
125
+ ), K(() => T.hotKeys.on(_)), q(() => T.hotKeys.off(_)), (e, o) => (p(), g("nav", ie, [
126
+ o[3] || (o[3] = h("div", { class: "app-drag-region absolute inset-0" }, null, -1)),
127
+ h("div", se, [
128
+ t.length === 1 ? (p(), g("div", re, [
129
+ r(i(P), { triggerClass: "flex custom-scroll gap-1.5 h-full items-center justify-center w-full whitespace-nowrap" }, {
130
+ trigger: m(() => {
131
+ var l, n, u, s;
112
132
  return [
113
- (n = t[0]) != null && n.icon ? (m(), _(s(d), {
133
+ N.value ? (p(), k(i(Y), {
114
134
  key: 0,
115
- icon: (l = t[0]) == null ? void 0 : l.icon,
135
+ class: "size-3.5 min-w-3.5 stroke-2",
136
+ src: ((l = i(v)) == null ? void 0 : l["x-scalar-icon"]) || "Collection"
137
+ }, null, 8, ["src"])) : (n = t[0]) != null && n.icon ? (p(), k(i(C), {
138
+ key: 1,
139
+ icon: (u = t[0]) == null ? void 0 : u.icon,
116
140
  size: "xs",
117
141
  thickness: "2.5"
118
- }, null, 8, ["icon"])) : q("", !0),
119
- v("span", null, F((i = t[0]) == null ? void 0 : i.label), 1)
142
+ }, null, 8, ["icon"])) : F("", !0),
143
+ h("span", null, H((s = t[0]) == null ? void 0 : s.label), 1)
120
144
  ];
121
145
  }),
122
- content: u(() => [
123
- r(s(P), { placement: "right-start" }, {
124
- floating: u(() => [
125
- r(s(Q), { class: "scalar-app scalar-client" }, {
126
- default: u(() => [
127
- r(s(I), {
146
+ content: m(() => [
147
+ r(i(Q), { placement: "right-start" }, {
148
+ floating: m(() => [
149
+ r(i(X), { class: "scalar-app scalar-client" }, {
150
+ default: m(() => [
151
+ r(i(A), {
128
152
  class: "flex items-center gap-1.5",
129
- onClick: f
153
+ onClick: d
130
154
  }, {
131
- default: u(() => [
132
- r(s(d), {
155
+ default: m(() => [
156
+ r(i(C), {
133
157
  icon: "AddTab",
134
158
  size: "sm",
135
159
  thickness: "1.5"
136
160
  }),
137
- o[1] || (o[1] = S(" New Tab ")),
138
- r(Z, {
161
+ o[1] || (o[1] = U(" New Tab ")),
162
+ r(te, {
139
163
  class: "bg-b-2 ml-auto",
140
164
  hotkey: "T"
141
165
  })
142
166
  ]),
143
167
  _: 1
144
168
  }),
145
- r(s(I), {
169
+ r(i(A), {
146
170
  class: "flex items-center gap-1.5",
147
- onClick: o[0] || (o[0] = (n) => N(T.value))
171
+ onClick: o[0] || (o[0] = (l) => R(y.value))
148
172
  }, {
149
- default: u(() => [
150
- r(s(d), {
173
+ default: m(() => [
174
+ r(i(C), {
151
175
  icon: "Link",
152
176
  size: "sm",
153
177
  thickness: "1.5"
154
178
  }),
155
- o[2] || (o[2] = S(" Copy URL "))
179
+ o[2] || (o[2] = U(" Copy URL "))
156
180
  ]),
157
181
  _: 1
158
182
  })
@@ -165,26 +189,30 @@ const ne = { class: "mac:pl-[72px] t-app__top-nav relative flex h-10 pl-2" }, le
165
189
  ]),
166
190
  _: 1
167
191
  })
168
- ])) : (m(!0), b(H, { key: 1 }, G(t, (n, l) => (m(), _(oe, {
169
- key: n.path,
170
- active: l === T.value,
171
- hotkey: (l + 1).toString(),
172
- icon: n.icon,
173
- label: n.label,
174
- onClick: (i) => p(l),
175
- onClose: (i) => C(l),
176
- onCloseOtherTabs: (i) => $(l),
177
- onCopyUrl: (i) => N(l),
178
- onNewTab: f
179
- }, null, 8, ["active", "hotkey", "icon", "label", "onClick", "onClose", "onCloseOtherTabs", "onCopyUrl"]))), 128)),
180
- v("button", {
192
+ ])) : (p(!0), g(G, { key: 1 }, J(t, (l, n) => {
193
+ var u;
194
+ return p(), k(ae, {
195
+ key: l.path,
196
+ active: n === y.value,
197
+ hotkey: (n + 1).toString(),
198
+ icon: l.isCollection ? ((u = i(v)) == null ? void 0 : u["x-scalar-icon"]) || "Collection" : l.icon,
199
+ label: l.label,
200
+ isCollection: l.isCollection || !1,
201
+ onClick: (s) => f(n),
202
+ onClose: (s) => w(n),
203
+ onCloseOtherTabs: (s) => B(n),
204
+ onCopyUrl: (s) => R(n),
205
+ onNewTab: d
206
+ }, null, 8, ["active", "hotkey", "icon", "label", "isCollection", "onClick", "onClose", "onCloseOtherTabs", "onCopyUrl"]);
207
+ }), 128)),
208
+ h("button", {
181
209
  class: "text-c-3 hover:bg-b-3 app-no-drag-region rounded p-1.5",
182
210
  type: "button",
183
- onClick: f
211
+ onClick: d
184
212
  }, [
185
- r(s(d), {
213
+ r(i(C), {
186
214
  icon: "Add",
187
- size: "xs",
215
+ size: "sm",
188
216
  thickness: "2.5"
189
217
  })
190
218
  ])
@@ -193,5 +221,5 @@ const ne = { class: "mac:pl-[72px] t-app__top-nav relative flex h-10 pl-2" }, le
193
221
  }
194
222
  });
195
223
  export {
196
- he as default
224
+ ge as default
197
225
  };
@@ -4,6 +4,7 @@ type __VLS_Props = {
4
4
  active: boolean;
5
5
  label: string;
6
6
  icon: Icon;
7
+ isCollection?: boolean;
7
8
  };
8
9
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
9
10
  click: () => any;
@@ -1 +1 @@
1
- {"version":3,"file":"TopNavItem.vue.d.ts","sourceRoot":"","sources":["../../../src/components/TopNav/TopNavItem.vue"],"names":[],"mappings":"AAwMA,OAAO,EAQL,KAAK,IAAI,EACV,MAAM,oBAAoB,CAAA;AAM3B,KAAK,WAAW,GAAG;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,OAAO,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,IAAI,CAAA;CACX,CAAC;;;;;;;;;;;;;;AA2UF,wBAQG"}
1
+ {"version":3,"file":"TopNavItem.vue.d.ts","sourceRoot":"","sources":["../../../src/components/TopNav/TopNavItem.vue"],"names":[],"mappings":"AA+MA,OAAO,EAQL,KAAK,IAAI,EACV,MAAM,oBAAoB,CAAA;AAO3B,KAAK,WAAW,GAAG;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,OAAO,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,IAAI,CAAA;IACV,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB,CAAC;;;;;;;;;;;;;;AAyVF,wBAQG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./TopNavItem.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-220e0e29"]]);
4
+ const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-3f2a2c71"]]);
5
5
  export {
6
6
  r as default
7
7
  };