@scalar/api-client 2.0.46 → 2.0.47

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 +19 -0
  2. package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
  3. package/dist/components/HttpMethod/HttpMethod.vue.js +1 -1
  4. package/dist/components/HttpMethod/HttpMethod.vue2.js +10 -10
  5. package/dist/components/Search/SearchModal.vue.d.ts.map +1 -1
  6. package/dist/components/Search/SearchModal.vue.js +1 -1
  7. package/dist/components/Search/SearchModal.vue2.js +43 -41
  8. package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
  9. package/dist/components/SideNav/SideNav.vue.js +1 -1
  10. package/dist/components/SideNav/SideNav.vue2.js +22 -19
  11. package/dist/components/Sidebar/SidebarListElement.vue.d.ts.map +1 -1
  12. package/dist/components/Sidebar/SidebarListElement.vue.js +2 -2
  13. package/dist/components/Sidebar/SidebarListElement.vue2.js +1 -1
  14. package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts +2 -0
  15. package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts.map +1 -1
  16. package/dist/components/Sidebar/SidebarListElementActions.vue.js +22 -21
  17. package/dist/layouts/App/create-api-client-app.d.ts +11 -11
  18. package/dist/layouts/Modal/create-api-client-modal.d.ts +22 -22
  19. package/dist/libs/create-client.d.ts +11 -11
  20. package/dist/store/workspace.d.ts +22 -22
  21. package/dist/style.css +1 -1
  22. package/dist/views/Cookies/CookieForm.vue.d.ts.map +1 -1
  23. package/dist/views/Cookies/CookieForm.vue.js +14 -15
  24. package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
  25. package/dist/views/Cookies/Cookies.vue2.js +114 -55
  26. package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
  27. package/dist/views/Environment/Environment.vue2.js +21 -20
  28. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  29. package/dist/views/Request/Request.vue.js +1 -1
  30. package/dist/views/Request/Request.vue2.js +117 -117
  31. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  32. package/dist/views/Request/RequestSidebarItem.vue.js +1 -1
  33. package/dist/views/Request/RequestSidebarItem.vue2.js +19 -19
  34. package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
  35. package/dist/views/Request/components/WorkspaceDropdown.vue.js +4 -4
  36. package/package.json +7 -7
package/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # @scalar/api-client
2
2
 
3
+ ## 2.0.47
4
+
5
+ ### Patch Changes
6
+
7
+ - b00e50e: fix(api-client): improve api client responsiveness
8
+ - df7372f: feat: make side navigation a drag region
9
+ - 6f0632e: fix: sidebar list element action prop
10
+ - 3023afe: fix: sidenav endpoint ui
11
+ - 711ad03: fix: search modal data population
12
+ - 14ed31f: feat: group cookie by domain and path
13
+ - Updated dependencies [60e63d3]
14
+ - Updated dependencies [db92a85]
15
+ - Updated dependencies [dba83e4]
16
+ - @scalar/themes@0.9.22
17
+ - @scalar/use-toasts@0.7.5
18
+ - @scalar/object-utils@1.1.6
19
+ - @scalar/oas-utils@0.2.28
20
+ - @scalar/components@0.12.29
21
+
3
22
  ## 2.0.46
4
23
 
5
24
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"HttpMethod.vue.d.ts","sourceRoot":"","sources":["../../../src/components/HttpMethod/HttpMethod.vue"],"names":[],"mappings":";eA0Ge,OAAO;YACV,MAAM;iBACD,OAAO;;;;;;;;eAFT,OAAO;YACV,MAAM;iBACD,OAAO;;;;;;;;cAFT,OAAO;gBAEL,OAAO;;AA+HxB,wBAOG;AAOH,KAAK,kBAAkB,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;Q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N,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC;AAExD,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,7 +1,7 @@
1
1
  import t from "./HttpMethod.vue2.js";
2
2
  /* empty css */
3
3
  import o from "../../_virtual/_plugin-vue_export-helper.js";
4
- const f = /* @__PURE__ */ o(t, [["__scopeId", "data-v-0bfd62ac"]]);
4
+ const f = /* @__PURE__ */ o(t, [["__scopeId", "data-v-5fe98831"]]);
5
5
  export {
6
6
  f as default
7
7
  };
@@ -1,7 +1,7 @@
1
- import { defineComponent as S, computed as s, openBlock as m, createBlock as g, unref as t, withCtx as y, createElementVNode as l, normalizeClass as r, toDisplayString as c, createElementBlock as q } from "vue";
2
- import { ScalarListbox as k } from "@scalar/components";
3
- import { getRequest as x, REQUEST_METHODS as B } from "@scalar/oas-utils/helpers";
4
- import { cva as w, cx as p } from "cva";
1
+ import { defineComponent as S, computed as s, openBlock as p, createBlock as g, unref as t, withCtx as y, createElementVNode as l, normalizeClass as r, toDisplayString as c, createElementBlock as q } from "vue";
2
+ import { ScalarListbox as w } from "@scalar/components";
3
+ import { getRequest as k, REQUEST_METHODS as x } from "@scalar/oas-utils/helpers";
4
+ import { cva as B, cx as m } from "cva";
5
5
  const O = /* @__PURE__ */ S({
6
6
  __name: "HttpMethod",
7
7
  props: {
@@ -11,7 +11,7 @@ const O = /* @__PURE__ */ S({
11
11
  },
12
12
  emits: ["change"],
13
13
  setup(f, { emit: b }) {
14
- const i = f, h = b, o = s(() => x(i.method)), n = Object.entries(B).map(
14
+ const i = f, h = b, o = s(() => k(i.method)), n = Object.entries(x).map(
15
15
  ([e, { short: a }]) => ({
16
16
  id: e,
17
17
  label: e.charAt(0) + e.toLowerCase().slice(1)
@@ -19,7 +19,7 @@ const O = /* @__PURE__ */ S({
19
19
  ), d = s({
20
20
  get: () => n.find(({ id: e }) => e === i.method),
21
21
  set: (e) => (e == null ? void 0 : e.id) && h("change", e.id)
22
- }), u = w({
22
+ }), u = B({
23
23
  base: "text-center font-code text-3xs justify-center items-center flex",
24
24
  variants: {
25
25
  isSquare: {
@@ -32,7 +32,7 @@ const O = /* @__PURE__ */ S({
32
32
  }
33
33
  }
34
34
  }), v = s(() => o.value.short);
35
- return (e, a) => e.isEditable ? (m(), g(t(k), {
35
+ return (e, a) => e.isEditable ? (p(), g(t(w), {
36
36
  key: 0,
37
37
  modelValue: d.value,
38
38
  "onUpdate:modelValue": a[0] || (a[0] = (E) => d.value = E),
@@ -43,7 +43,7 @@ const O = /* @__PURE__ */ S({
43
43
  class: r(["h-full", { "pointer-events-none": !e.isEditable }])
44
44
  }, [
45
45
  l("button", {
46
- class: r(["relative h-full", t(p)(t(u)({ isSquare: e.isSquare, isEditable: e.isEditable }), o.value.color)]),
46
+ class: r(["relative h-full", t(m)(t(u)({ isSquare: e.isSquare, isEditable: e.isEditable }), o.value.color)]),
47
47
  type: "button"
48
48
  }, [
49
49
  l("span", null, c(v.value), 1)
@@ -51,9 +51,9 @@ const O = /* @__PURE__ */ S({
51
51
  ], 2)
52
52
  ]),
53
53
  _: 1
54
- }, 8, ["modelValue", "options"])) : (m(), q("div", {
54
+ }, 8, ["modelValue", "options"])) : (p(), q("div", {
55
55
  key: 1,
56
- class: r(["relative gap-1", t(p)(t(u)({ isSquare: e.isSquare, isEditable: e.isEditable }), o.value.color)]),
56
+ class: r(["relative gap-1 whitespace-nowrap", t(m)(t(u)({ isSquare: e.isSquare, isEditable: e.isEditable }), o.value.color)]),
57
57
  type: "button"
58
58
  }, c(o.value.short), 3));
59
59
  }
@@ -1 +1 @@
1
- {"version":3,"file":"SearchModal.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Search/SearchModal.vue"],"names":[],"mappings":"AAoPA,OAAO,EACL,KAAK,UAAU,EAKhB,MAAM,oBAAoB,CAAA;;gBASb,UAAU;;gBAAV,UAAU;;AAsWxB,wBAMG;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":"SearchModal.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Search/SearchModal.vue"],"names":[],"mappings":"AA2PA,OAAO,EACL,KAAK,UAAU,EAKhB,MAAM,oBAAoB,CAAA;;gBAUb,UAAU;;gBAAV,UAAU;;AA4WxB,wBAMG;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,7 +1,7 @@
1
1
  import o from "./SearchModal.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-67d6f77b"]]);
4
+ const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-905c8bd2"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -1,25 +1,35 @@
1
- import { defineComponent as y, ref as i, watch as _, computed as C, openBlock as w, createBlock as E, unref as d, withCtx as r, createElementVNode as h, createVNode as R, createTextVNode as m, toDisplayString as p, createElementBlock as F, Fragment as N, renderList as A, createSlots as D, pushScopeId as T, popScopeId as W } from "vue";
2
- import { useWorkspace as L } from "../../store/workspace.js";
3
- import { ScalarModal as U, ScalarSearchInput as j, ScalarSearchResultList as H, ScalarSearchResultItem as K } from "@scalar/components";
4
- import { useMagicKeys as O, whenever as g } from "@vueuse/core";
5
- import P from "fuse.js";
6
- import { useRouter as z } from "vue-router";
7
- import G from "../HttpMethod/HttpMethod.vue.js";
8
- const J = (u) => (T("data-v-67d6f77b"), u = u(), W(), u), Q = /* @__PURE__ */ J(() => /* @__PURE__ */ h("div", { class: "ref-search-meta" }, [
1
+ import { defineComponent as A, ref as i, watch as M, computed as y, openBlock as w, createBlock as B, unref as d, withCtx as r, createElementVNode as h, createVNode as R, createTextVNode as m, toDisplayString as p, createElementBlock as D, Fragment as N, renderList as T, createSlots as W, pushScopeId as L, popScopeId as U } from "vue";
2
+ import { useWorkspace as H } from "../../store/workspace.js";
3
+ import { ScalarModal as K, ScalarSearchInput as P, ScalarSearchResultList as j, ScalarSearchResultItem as z } from "@scalar/components";
4
+ import { useMagicKeys as G, whenever as g } from "@vueuse/core";
5
+ import J from "fuse.js";
6
+ import { useRouter as O } from "vue-router";
7
+ import Q from "../HttpMethod/HttpMethod.vue.js";
8
+ const X = (u) => (L("data-v-905c8bd2"), u = u(), U(), u), Y = /* @__PURE__ */ X(() => /* @__PURE__ */ h("div", { class: "ref-search-meta" }, [
9
9
  /* @__PURE__ */ h("span", null, "↑↓ Navigate"),
10
10
  /* @__PURE__ */ h("span", null, "⏎ Select")
11
- ], -1)), oe = /* @__PURE__ */ y({
11
+ ], -1)), re = /* @__PURE__ */ A({
12
12
  __name: "SearchModal",
13
13
  props: {
14
14
  modalState: {}
15
15
  },
16
16
  setup(u) {
17
- const c = u, M = z(), { activeWorkspaceRequests: B } = L(), v = O(), l = i([]), f = i([]), o = i(0), s = i(""), I = i(null), S = new P(l.value, {
17
+ const c = u, E = O(), { activeWorkspaceRequests: I } = H(), v = G(), l = i([]), f = i([]), o = i(0), s = i(""), V = i(null), S = new J(l.value, {
18
18
  keys: ["title", "description", "body"]
19
- }), $ = () => {
19
+ }), F = () => {
20
+ s.value = "", o.value = 0, f.value = [];
21
+ }, _ = (e) => {
22
+ l.value = e.map((a) => ({
23
+ id: a.uid,
24
+ title: a.summary ?? a.method,
25
+ description: a.description ?? "",
26
+ httpVerb: a.method,
27
+ path: a.path
28
+ })), S.setCollection(l.value);
29
+ }, $ = () => {
20
30
  o.value = 0, f.value = S.search(s.value);
21
31
  };
22
- _(
32
+ M(
23
33
  () => c.modalState.open,
24
34
  (e) => {
25
35
  var a;
@@ -27,35 +37,27 @@ const J = (u) => (T("data-v-67d6f77b"), u = u(), W(), u), Q = /* @__PURE__ */ J(
27
37
  l.value.length > 0 && (l.value = [], S.setCollection(l.value));
28
38
  return;
29
39
  }
30
- (a = I.value) == null || a.focus(), s.value = "", o.value = 0, f.value = [];
40
+ (a = V.value) == null || a.focus(), F(), _(I.value);
31
41
  }
32
- ), _(
33
- B,
42
+ ), M(
43
+ I,
34
44
  (e) => {
35
- Object.values(e).forEach((a) => {
36
- l.value.push({
37
- id: a.uid,
38
- title: a.summary ?? a.method,
39
- description: a.description ?? "",
40
- httpVerb: a.method,
41
- path: a.path
42
- });
43
- }), S.setCollection(l.value);
45
+ _(e);
44
46
  },
45
47
  { immediate: !0 }
46
48
  );
47
- function V(e) {
48
- M.push(e.item.id), c.modalState.hide();
49
+ function b(e) {
50
+ E.push(e.item.id), c.modalState.hide();
49
51
  }
50
- const k = C(
52
+ const k = y(
51
53
  () => n.value[o.value]
52
- ), n = C(
54
+ ), n = y(
53
55
  () => s.value.length === 0 ? l.value.map((e) => ({
54
56
  item: e
55
57
  })) : f.value
56
58
  );
57
59
  return g(v.enter, () => {
58
- c.modalState.open && window && V(k.value);
60
+ c.modalState.open && window && b(k.value);
59
61
  }), g(v.ArrowDown, () => {
60
62
  var e;
61
63
  c.modalState.open && window && (o.value < n.value.length - 1 ? o.value++ : o.value = 0, (e = document.getElementById(`search-modal-${k.value.item.id}`)) == null || e.scrollIntoView({
@@ -68,23 +70,23 @@ const J = (u) => (T("data-v-67d6f77b"), u = u(), W(), u), Q = /* @__PURE__ */ J(
68
70
  behavior: "smooth",
69
71
  block: "center"
70
72
  }));
71
- }), (e, a) => (w(), E(d(U), {
73
+ }), (e, a) => (w(), B(d(K), {
72
74
  state: e.modalState,
73
75
  variant: "search"
74
76
  }, {
75
77
  default: r(() => [
76
78
  h("div", {
77
79
  ref_key: "searchModalRef",
78
- ref: I,
80
+ ref: V,
79
81
  class: "ref-search-container"
80
82
  }, [
81
- R(d(j), {
83
+ R(d(P), {
82
84
  modelValue: s.value,
83
85
  "onUpdate:modelValue": a[0] || (a[0] = (t) => s.value = t),
84
86
  onInput: $
85
87
  }, null, 8, ["modelValue"])
86
88
  ], 512),
87
- R(d(H), {
89
+ R(d(j), {
88
90
  class: "ref-search-results custom-scroll",
89
91
  noResults: !n.value.length
90
92
  }, {
@@ -92,16 +94,16 @@ const J = (u) => (T("data-v-67d6f77b"), u = u(), W(), u), Q = /* @__PURE__ */ J(
92
94
  m(p(s.value), 1)
93
95
  ]),
94
96
  default: r(() => [
95
- (w(!0), F(N, null, A(n.value, (t, b) => (w(), E(d(K), {
97
+ (w(!0), D(N, null, T(n.value, (t, C) => (w(), B(d(z), {
96
98
  id: `#search-modal-${t.item.id}`,
97
99
  key: t.refIndex,
98
- active: o.value === b,
100
+ active: o.value === C,
99
101
  icon: "Terminal",
100
- onClick: (x) => V(t),
101
- onFocus: (x) => o.value = b
102
- }, D({
102
+ onClick: (x) => b(t),
103
+ onFocus: (x) => o.value = C
104
+ }, W({
103
105
  addon: r(() => [
104
- R(d(G), {
106
+ R(d(Q), {
105
107
  method: t.item.httpVerb ?? "get"
106
108
  }, null, 8, ["method"])
107
109
  ]),
@@ -127,12 +129,12 @@ const J = (u) => (T("data-v-67d6f77b"), u = u(), W(), u), Q = /* @__PURE__ */ J(
127
129
  ]),
128
130
  _: 1
129
131
  }, 8, ["noResults"]),
130
- Q
132
+ Y
131
133
  ]),
132
134
  _: 1
133
135
  }, 8, ["state"]));
134
136
  }
135
137
  });
136
138
  export {
137
- oe as default
139
+ re as default
138
140
  };
@@ -1 +1 @@
1
- {"version":3,"file":"SideNav.vue.d.ts","sourceRoot":"","sources":["../../../src/components/SideNav/SideNav.vue"],"names":[],"mappings":";AAiKA,wBAKG"}
1
+ {"version":3,"file":"SideNav.vue.d.ts","sourceRoot":"","sources":["../../../src/components/SideNav/SideNav.vue"],"names":[],"mappings":";AAmLA,wBAKG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./SideNav.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-ccbc6a46"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-ed782b2b"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -1,33 +1,36 @@
1
- import { defineComponent as _, openBlock as r, createElementBlock as i, createVNode as e, createElementVNode as t, Fragment as f, renderList as p, unref as s, withCtx as u, createTextVNode as d, toDisplayString as x } from "vue";
2
- import h from "../DarkModeToggle/DarkModeIconToggle.vue.js";
3
- import { ROUTES as v } from "../../constants.js";
4
- import { useRouter as N } from "vue-router";
5
- import g from "./SideHelp.vue.js";
1
+ import { defineComponent as _, openBlock as r, createElementBlock as a, createVNode as e, createElementVNode as t, Fragment as f, renderList as d, unref as n, withCtx as p, createTextVNode as u, toDisplayString as g } from "vue";
2
+ import x from "../DarkModeToggle/DarkModeIconToggle.vue.js";
3
+ import { ROUTES as h } from "../../constants.js";
4
+ import { useRouter as v } from "vue-router";
5
+ import N from "./SideHelp.vue.js";
6
6
  import y from "./SideNavLink.vue.js";
7
7
  import S from "./WorkspaceProfileIcon.vue.js";
8
8
  /* empty css */
9
9
  const $ = {
10
10
  "aria-label": "Side Navigation",
11
- class: "text-c-2 w-15 flex flex-col items-center px-2 py-2 scalar-sidenav relative",
11
+ class: "text-c-2 w-15 flex flex-col items-center px-2 py-2 scalar-sidenav relative drag-region",
12
12
  role: "navigation"
13
- }, k = { class: "mt-3.5 flex flex-col gap-1.5" }, E = { class: "mt-auto flex flex-col py-1.5" }, R = { class: "flex items-center" }, V = { class: "flex items-center" }, j = /* @__PURE__ */ _({
13
+ }, k = { class: "mt-3.5 flex flex-col gap-1.5" }, E = { class: "mt-auto flex flex-col py-1.5" }, R = { class: "flex items-center no-drag-region" }, V = { class: "flex items-center no-drag-region" }, j = /* @__PURE__ */ _({
14
14
  __name: "SideNav",
15
15
  setup(w) {
16
- const { currentRoute: c } = N();
17
- return (B, C) => (r(), i("nav", $, [
18
- e(S),
16
+ const { currentRoute: s } = v();
17
+ return (B, C) => (r(), a("nav", $, [
18
+ e(S, { class: "no-drag-region" }),
19
19
  t("ul", k, [
20
- (r(!0), i(f, null, p(s(v), ({ icon: n, name: o, prettyName: l }, m) => {
21
- var a;
22
- return r(), i("li", { key: m }, [
20
+ (r(!0), a(f, null, d(n(h), ({ icon: c, name: o, prettyName: l }, m) => {
21
+ var i;
22
+ return r(), a("li", {
23
+ key: m,
24
+ class: "no-drag-region"
25
+ }, [
23
26
  e(y, {
24
- active: (a = s(c).name) == null ? void 0 : a.startsWith(o),
25
- icon: n,
27
+ active: (i = n(s).name) == null ? void 0 : i.startsWith(o),
28
+ icon: c,
26
29
  name: o,
27
30
  prettyName: l
28
31
  }, {
29
- default: u(() => [
30
- d(x(o), 1)
32
+ default: p(() => [
33
+ u(g(o), 1)
31
34
  ]),
32
35
  _: 2
33
36
  }, 1032, ["active", "icon", "name", "prettyName"])
@@ -36,10 +39,10 @@ const $ = {
36
39
  ]),
37
40
  t("ul", E, [
38
41
  t("li", R, [
39
- e(g)
42
+ e(N)
40
43
  ]),
41
44
  t("li", V, [
42
- e(h)
45
+ e(x)
43
46
  ])
44
47
  ])
45
48
  ]));
@@ -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;QACZ,KAAK,CAAC,EAAE,MAAM,CAAA;QACd,SAAS,CAAC,EAAE,OAAO,CAAA;KACpB;qBACgB,MAAM;;;;AAwJzB,wBAOG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AA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AAC,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
  };