@scalar/sidebar 0.7.10 → 0.7.13
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as l, computed as r, createBlock as s, openBlock as p, resolveDynamicComponent as m, normalizeStyle as c, withCtx as d, renderSlot as h, createTextVNode as i, toDisplayString as u } from "vue";
|
|
2
2
|
import { getHttpMethodInfo as f } from "@scalar/helpers/http/http-info";
|
|
3
3
|
import { normalizeHttpMethod as y } from "@scalar/helpers/http/normalize-http-method";
|
|
4
|
-
const
|
|
4
|
+
const x = /* @__PURE__ */ l({
|
|
5
5
|
__name: "HttpMethod",
|
|
6
6
|
props: {
|
|
7
7
|
as: {},
|
|
@@ -9,22 +9,22 @@ const z = /* @__PURE__ */ a({
|
|
|
9
9
|
short: { type: Boolean },
|
|
10
10
|
method: {}
|
|
11
11
|
},
|
|
12
|
-
setup(
|
|
13
|
-
const
|
|
14
|
-
() => f(String(
|
|
15
|
-
), n = r(() => y(
|
|
16
|
-
return (
|
|
12
|
+
setup(t) {
|
|
13
|
+
const e = t, o = r(
|
|
14
|
+
() => f(String(e.method || ""))
|
|
15
|
+
), n = r(() => y(e.method));
|
|
16
|
+
return (a, v) => (p(), s(m(t.as ?? "span"), {
|
|
17
17
|
class: "uppercase",
|
|
18
|
-
style:
|
|
18
|
+
style: c({ [t.property || "color"]: o.value.colorVar })
|
|
19
19
|
}, {
|
|
20
|
-
default:
|
|
21
|
-
h(
|
|
22
|
-
i(" " + u(
|
|
20
|
+
default: d(() => [
|
|
21
|
+
h(a.$slots, "default"),
|
|
22
|
+
i(" " + u(t.short ? o.value.short : n.value), 1)
|
|
23
23
|
]),
|
|
24
24
|
_: 3
|
|
25
25
|
}, 8, ["style"]));
|
|
26
26
|
}
|
|
27
27
|
});
|
|
28
28
|
export {
|
|
29
|
-
|
|
29
|
+
x as default
|
|
30
30
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarSidebar as
|
|
3
|
-
import { filterItems as
|
|
4
|
-
import
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as y, createBlock as m, openBlock as s, unref as n, normalizeStyle as p, withCtx as a, renderSlot as o, createVNode as S, createElementVNode as b, createElementBlock as g, Fragment as D, renderList as $, createSlots as E, mergeProps as f } from "vue";
|
|
2
|
+
import { ScalarSidebar as k, ScalarSidebarItems as I } from "@scalar/components";
|
|
3
|
+
import { filterItems as F } from "../helpers/filter-items.js";
|
|
4
|
+
import v from "./SidebarItem.vue.js";
|
|
5
|
+
const V = /* @__PURE__ */ y({
|
|
6
6
|
__name: "ScalarSidebar",
|
|
7
7
|
props: {
|
|
8
8
|
layout: {},
|
|
@@ -15,45 +15,45 @@ const h = /* @__PURE__ */ u({
|
|
|
15
15
|
isDroppable: { type: Function }
|
|
16
16
|
},
|
|
17
17
|
emits: ["reorder", "selectItem"],
|
|
18
|
-
setup(
|
|
19
|
-
const
|
|
20
|
-
|
|
18
|
+
setup(e, { emit: u }) {
|
|
19
|
+
const i = u, c = (t, l) => {
|
|
20
|
+
i("reorder", t, l);
|
|
21
21
|
};
|
|
22
|
-
return (
|
|
22
|
+
return (t, l) => (s(), m(n(k), {
|
|
23
23
|
class: "flex min-h-0 flex-col",
|
|
24
|
-
style:
|
|
24
|
+
style: p({
|
|
25
25
|
"--scalar-sidebar-indent": e.indent + "px"
|
|
26
26
|
})
|
|
27
27
|
}, {
|
|
28
|
-
default:
|
|
29
|
-
t
|
|
30
|
-
t
|
|
31
|
-
|
|
32
|
-
default:
|
|
33
|
-
t
|
|
34
|
-
(
|
|
35
|
-
key:
|
|
28
|
+
default: a(() => [
|
|
29
|
+
o(t.$slots, "header"),
|
|
30
|
+
o(t.$slots, "default", {}, () => [
|
|
31
|
+
S(n(I), { class: "custom-scroll pt-0" }, {
|
|
32
|
+
default: a(() => [
|
|
33
|
+
o(t.$slots, "before"),
|
|
34
|
+
(s(!0), g(D, null, $(n(F)(e.layout, e.items), (d) => (s(), m(v, {
|
|
35
|
+
key: d.id,
|
|
36
36
|
isDraggable: e.isDraggable ?? e.layout === "client",
|
|
37
37
|
isDroppable: e.isDroppable,
|
|
38
38
|
isExpanded: e.isExpanded,
|
|
39
39
|
isSelected: e.isSelected,
|
|
40
|
-
item:
|
|
40
|
+
item: d,
|
|
41
41
|
layout: e.layout,
|
|
42
42
|
options: e.options,
|
|
43
|
-
onOnDragEnd:
|
|
44
|
-
onSelectItem:
|
|
45
|
-
},
|
|
46
|
-
|
|
43
|
+
onOnDragEnd: c,
|
|
44
|
+
onSelectItem: l[0] || (l[0] = (r) => i("selectItem", r))
|
|
45
|
+
}, E({ _: 2 }, [
|
|
46
|
+
t.$slots.decorator ? {
|
|
47
47
|
name: "decorator",
|
|
48
|
-
fn:
|
|
49
|
-
t
|
|
48
|
+
fn: a((r) => [
|
|
49
|
+
o(t.$slots, "decorator", f({ ref_for: !0 }, r))
|
|
50
50
|
]),
|
|
51
51
|
key: "0"
|
|
52
52
|
} : void 0,
|
|
53
|
-
|
|
53
|
+
t.$slots.empty ? {
|
|
54
54
|
name: "empty",
|
|
55
|
-
fn:
|
|
56
|
-
t
|
|
55
|
+
fn: a((r) => [
|
|
56
|
+
o(t.$slots, "empty", f({ ref_for: !0 }, r))
|
|
57
57
|
]),
|
|
58
58
|
key: "1"
|
|
59
59
|
} : void 0
|
|
@@ -61,14 +61,14 @@ const h = /* @__PURE__ */ u({
|
|
|
61
61
|
]),
|
|
62
62
|
_: 3
|
|
63
63
|
}),
|
|
64
|
-
|
|
64
|
+
l[1] || (l[1] = b("div", { class: "flex-1" }, null, -1))
|
|
65
65
|
]),
|
|
66
|
-
t
|
|
66
|
+
o(t.$slots, "footer")
|
|
67
67
|
]),
|
|
68
68
|
_: 3
|
|
69
69
|
}, 8, ["style"]));
|
|
70
70
|
}
|
|
71
71
|
});
|
|
72
72
|
export {
|
|
73
|
-
|
|
73
|
+
V as default
|
|
74
74
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { getHttpMethodInfo as
|
|
3
|
-
import { ScalarIconWebhooksLogo as
|
|
4
|
-
import
|
|
5
|
-
const w = /* @__PURE__ */
|
|
1
|
+
import { defineComponent as n, createBlock as t, openBlock as r, normalizeClass as d, withCtx as m, createElementVNode as s, renderSlot as i, createCommentVNode as c, unref as a, normalizeStyle as h } from "vue";
|
|
2
|
+
import { getHttpMethodInfo as f } from "@scalar/helpers/http/http-info";
|
|
3
|
+
import { ScalarIconWebhooksLogo as p } from "@scalar/icons";
|
|
4
|
+
import y from "./HttpMethod.vue.js";
|
|
5
|
+
const w = /* @__PURE__ */ n({
|
|
6
6
|
__name: "SidebarHttpBadge",
|
|
7
7
|
props: {
|
|
8
8
|
method: {},
|
|
9
9
|
active: { type: Boolean },
|
|
10
10
|
webhook: { type: Boolean }
|
|
11
11
|
},
|
|
12
|
-
setup(
|
|
13
|
-
return (
|
|
14
|
-
class:
|
|
12
|
+
setup(e) {
|
|
13
|
+
return (l, o) => (r(), t(y, {
|
|
14
|
+
class: d([
|
|
15
15
|
"sidebar-heading-type",
|
|
16
16
|
`sidebar-heading-type--${e.method.toLowerCase()}`,
|
|
17
17
|
{ "sidebar-heading-type-active": e.active }
|
|
@@ -20,16 +20,16 @@ const w = /* @__PURE__ */ l({
|
|
|
20
20
|
property: "--method-color",
|
|
21
21
|
short: ""
|
|
22
22
|
}, {
|
|
23
|
-
default:
|
|
24
|
-
o[0] || (o[0] =
|
|
25
|
-
|
|
26
|
-
e.webhook ? (r(), t(a(
|
|
23
|
+
default: m(() => [
|
|
24
|
+
o[0] || (o[0] = s("span", { class: "sr-only" }, "HTTP Method: ", -1)),
|
|
25
|
+
i(l.$slots, "default", {}, () => [
|
|
26
|
+
e.webhook ? (r(), t(a(p), {
|
|
27
27
|
key: 0,
|
|
28
|
-
style:
|
|
29
|
-
color: a(
|
|
28
|
+
style: h({
|
|
29
|
+
color: a(f)(e.method).colorVar
|
|
30
30
|
}),
|
|
31
31
|
weight: "bold"
|
|
32
|
-
}, null, 8, ["style"])) :
|
|
32
|
+
}, null, 8, ["style"])) : c("", !0)
|
|
33
33
|
], !0)
|
|
34
34
|
]),
|
|
35
35
|
_: 3
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarSidebarSection as
|
|
3
|
-
import { LibraryIcon as
|
|
1
|
+
import { defineComponent as B, useSlots as N, resolveComponent as V, createBlock as m, unref as o, openBlock as a, mergeProps as u, toHandlers as D, withCtx as t, createTextVNode as H, toDisplayString as L, createElementBlock as b, Fragment as I, renderList as x, createSlots as g, renderSlot as c, createVNode as s, createCommentVNode as v, normalizeClass as w } from "vue";
|
|
2
|
+
import { ScalarSidebarSection as O, ScalarSidebarGroup as z, ScalarSidebarGroupToggle as A, ScalarSidebarItem as P } from "@scalar/components";
|
|
3
|
+
import { LibraryIcon as j } from "@scalar/icons/library";
|
|
4
4
|
import C from "./SidebarItemDecorator.vue.js";
|
|
5
5
|
import { filterItems as $ } from "../helpers/filter-items.js";
|
|
6
|
-
import { hasChildren as
|
|
7
|
-
import { isSidebarFolder as
|
|
8
|
-
import { useDraggable as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
const
|
|
6
|
+
import { hasChildren as q } from "../helpers/has-children.js";
|
|
7
|
+
import { isSidebarFolder as J } from "../helpers/is-sidebar-folder.js";
|
|
8
|
+
import { useDraggable as K } from "../hooks/use-draggable.js";
|
|
9
|
+
import p from "./SidebarHttpBadge.vue.js";
|
|
10
|
+
import f from "./SidebarItemLabel.vue.js";
|
|
11
|
+
const M = {
|
|
12
12
|
key: 0,
|
|
13
13
|
class: "line-through"
|
|
14
|
-
},
|
|
14
|
+
}, Q = {
|
|
15
15
|
key: 0,
|
|
16
16
|
class: "line-through"
|
|
17
|
-
},
|
|
17
|
+
}, oe = /* @__PURE__ */ B({
|
|
18
18
|
__name: "SidebarItem",
|
|
19
19
|
props: {
|
|
20
20
|
item: {},
|
|
@@ -26,101 +26,101 @@ const Q = {
|
|
|
26
26
|
isDroppable: { type: Function }
|
|
27
27
|
},
|
|
28
28
|
emits: ["selectItem", "onDragEnd"],
|
|
29
|
-
setup(
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
}, { draggableAttrs:
|
|
33
|
-
id:
|
|
34
|
-
isDraggable:
|
|
35
|
-
isDroppable:
|
|
36
|
-
onDragEnd:
|
|
29
|
+
setup(e, { emit: F }) {
|
|
30
|
+
const y = F, l = N(), G = (i) => "isGroup" in i && i.isGroup, E = (i) => ("isDeprecated" in i && i.isDeprecated) ?? !1, S = (i, r) => {
|
|
31
|
+
y("onDragEnd", i, r);
|
|
32
|
+
}, { draggableAttrs: h, draggableEvents: k } = K({
|
|
33
|
+
id: e.item.id,
|
|
34
|
+
isDraggable: e.isDraggable,
|
|
35
|
+
isDroppable: e.isDroppable,
|
|
36
|
+
onDragEnd: S
|
|
37
37
|
});
|
|
38
|
-
return (
|
|
39
|
-
const
|
|
40
|
-
return
|
|
41
|
-
items:
|
|
42
|
-
(
|
|
43
|
-
key:
|
|
38
|
+
return (i, r) => {
|
|
39
|
+
const T = V("SidebarItem", !0);
|
|
40
|
+
return o(q)(e.item) && G(e.item) ? (a(), m(o(O), u({ key: 0 }, o(h), D(o(k))), {
|
|
41
|
+
items: t(() => [
|
|
42
|
+
(a(!0), b(I, null, x(o($)(e.layout, e.item.children), (d) => (a(), m(T, {
|
|
43
|
+
key: d.id,
|
|
44
44
|
isDraggable: e.isDraggable,
|
|
45
45
|
isDroppable: e.isDroppable,
|
|
46
46
|
isExpanded: e.isExpanded,
|
|
47
47
|
isSelected: e.isSelected,
|
|
48
|
-
item:
|
|
48
|
+
item: d,
|
|
49
49
|
layout: e.layout,
|
|
50
50
|
options: e.options,
|
|
51
|
-
onOnDragEnd:
|
|
52
|
-
onSelectItem:
|
|
53
|
-
},
|
|
54
|
-
|
|
51
|
+
onOnDragEnd: S,
|
|
52
|
+
onSelectItem: r[0] || (r[0] = (n) => y("selectItem", n))
|
|
53
|
+
}, g({ _: 2 }, [
|
|
54
|
+
l.decorator ? {
|
|
55
55
|
name: "decorator",
|
|
56
|
-
fn:
|
|
57
|
-
|
|
56
|
+
fn: t((n) => [
|
|
57
|
+
c(i.$slots, "decorator", u({ ref_for: !0 }, n))
|
|
58
58
|
]),
|
|
59
59
|
key: "0"
|
|
60
60
|
} : void 0,
|
|
61
|
-
|
|
61
|
+
l.empty ? {
|
|
62
62
|
name: "empty",
|
|
63
|
-
fn:
|
|
64
|
-
|
|
63
|
+
fn: t((n) => [
|
|
64
|
+
c(i.$slots, "empty", u({ ref_for: !0 }, n))
|
|
65
65
|
]),
|
|
66
66
|
key: "1"
|
|
67
67
|
} : void 0
|
|
68
68
|
]), 1032, ["isDraggable", "isDroppable", "isExpanded", "isSelected", "item", "layout", "options"]))), 128))
|
|
69
69
|
]),
|
|
70
|
-
default:
|
|
71
|
-
L(
|
|
70
|
+
default: t(() => [
|
|
71
|
+
H(L(e.item.title) + " ", 1)
|
|
72
72
|
]),
|
|
73
73
|
_: 3
|
|
74
|
-
}, 16)) :
|
|
74
|
+
}, 16)) : o(J)(e.layout, e.item, l.empty !== void 0) ? (a(), m(o(z), u({
|
|
75
75
|
key: 1,
|
|
76
76
|
active: e.isSelected(e.item.id),
|
|
77
77
|
class: "relative",
|
|
78
78
|
controlled: "",
|
|
79
79
|
open: e.isExpanded(e.item.id)
|
|
80
|
-
},
|
|
81
|
-
onClick:
|
|
82
|
-
}),
|
|
83
|
-
items:
|
|
84
|
-
(
|
|
85
|
-
key:
|
|
80
|
+
}, o(h), D(o(k)), {
|
|
81
|
+
onClick: r[2] || (r[2] = () => y("selectItem", e.item.id))
|
|
82
|
+
}), g({
|
|
83
|
+
items: t(() => [
|
|
84
|
+
(a(!0), b(I, null, x(o($)(e.layout, e.item.children ?? []), (d) => (a(), m(T, {
|
|
85
|
+
key: d.id,
|
|
86
86
|
isDraggable: e.isDraggable,
|
|
87
87
|
isDroppable: e.isDroppable,
|
|
88
88
|
isExpanded: e.isExpanded,
|
|
89
89
|
isSelected: e.isSelected,
|
|
90
|
-
item:
|
|
90
|
+
item: d,
|
|
91
91
|
layout: e.layout,
|
|
92
92
|
options: e.options,
|
|
93
93
|
parentIds: [],
|
|
94
|
-
onOnDragEnd:
|
|
95
|
-
onSelectItem:
|
|
96
|
-
},
|
|
97
|
-
|
|
94
|
+
onOnDragEnd: S,
|
|
95
|
+
onSelectItem: r[1] || (r[1] = (n) => y("selectItem", n))
|
|
96
|
+
}, g({ _: 2 }, [
|
|
97
|
+
l.decorator ? {
|
|
98
98
|
name: "decorator",
|
|
99
|
-
fn:
|
|
100
|
-
|
|
99
|
+
fn: t((n) => [
|
|
100
|
+
c(i.$slots, "decorator", u({ ref_for: !0 }, n))
|
|
101
101
|
]),
|
|
102
102
|
key: "0"
|
|
103
103
|
} : void 0,
|
|
104
|
-
|
|
104
|
+
l.empty ? {
|
|
105
105
|
name: "empty",
|
|
106
|
-
fn:
|
|
107
|
-
|
|
106
|
+
fn: t((n) => [
|
|
107
|
+
c(i.$slots, "empty", u({ ref_for: !0 }, n))
|
|
108
108
|
]),
|
|
109
109
|
key: "1"
|
|
110
110
|
} : void 0
|
|
111
111
|
]), 1032, ["isDraggable", "isDroppable", "isExpanded", "isSelected", "item", "layout", "options"]))), 128)),
|
|
112
|
-
|
|
112
|
+
l.empty && (e.item.children?.length ?? 0) === 0 ? c(i.$slots, "empty", {
|
|
113
113
|
key: 0,
|
|
114
114
|
item: e.item
|
|
115
|
-
}) :
|
|
115
|
+
}) : v("", !0)
|
|
116
116
|
]),
|
|
117
|
-
default:
|
|
118
|
-
|
|
119
|
-
|
|
117
|
+
default: t(() => [
|
|
118
|
+
E(e.item) ? (a(), b("span", M, [
|
|
119
|
+
s(f, {
|
|
120
120
|
item: e.item,
|
|
121
121
|
operationTitleSource: e.options?.operationTitleSource
|
|
122
122
|
}, null, 8, ["item", "operationTitleSource"])
|
|
123
|
-
])) : (
|
|
123
|
+
])) : (a(), m(f, {
|
|
124
124
|
key: 1,
|
|
125
125
|
item: e.item,
|
|
126
126
|
operationTitleSource: e.options?.operationTitleSource
|
|
@@ -130,62 +130,62 @@ const Q = {
|
|
|
130
130
|
}, [
|
|
131
131
|
e.item.type === "document" ? {
|
|
132
132
|
name: "icon",
|
|
133
|
-
fn:
|
|
134
|
-
|
|
133
|
+
fn: t(({ open: d }) => [
|
|
134
|
+
s(o(j), {
|
|
135
135
|
class: "text-c-3 block group-hover/group-button:hidden",
|
|
136
136
|
src: e.item.icon ?? "interface-content-folder"
|
|
137
137
|
}, null, 8, ["src"]),
|
|
138
|
-
|
|
138
|
+
s(o(A), {
|
|
139
139
|
class: "text-c-3 hidden group-hover/group-button:flex",
|
|
140
|
-
open:
|
|
140
|
+
open: d
|
|
141
141
|
}, null, 8, ["open"])
|
|
142
142
|
]),
|
|
143
143
|
key: "0"
|
|
144
144
|
} : void 0,
|
|
145
145
|
"method" in e.item ? {
|
|
146
146
|
name: "aside",
|
|
147
|
-
fn:
|
|
148
|
-
"method" in e.item ? (
|
|
147
|
+
fn: t(() => [
|
|
148
|
+
"method" in e.item ? (a(), m(p, {
|
|
149
149
|
key: 0,
|
|
150
150
|
active: e.isSelected(e.item.id),
|
|
151
151
|
class: w(["ml-2 h-4 self-start", {
|
|
152
152
|
// Hide the badge when we're showing the decorator
|
|
153
|
-
"group-hover/button:opacity-0 group-focus-visible/button:opacity-0 group-has-[~*_[aria-expanded=true]]/button:opacity-0 group-has-[~*:focus-within]/button:opacity-0 group-has-[~*:hover]/button:opacity-0":
|
|
153
|
+
"group-hover/button:opacity-0 group-focus-visible/button:opacity-0 group-has-[~*_[aria-expanded=true]]/button:opacity-0 group-has-[~*:focus-within]/button:opacity-0 group-has-[~*:hover]/button:opacity-0": l.decorator
|
|
154
154
|
}]),
|
|
155
155
|
method: e.item.method,
|
|
156
156
|
webhook: e.item.type === "webhook"
|
|
157
|
-
}, null, 8, ["active", "class", "method", "webhook"])) :
|
|
157
|
+
}, null, 8, ["active", "class", "method", "webhook"])) : v("", !0)
|
|
158
158
|
]),
|
|
159
159
|
key: "1"
|
|
160
160
|
} : void 0,
|
|
161
|
-
|
|
161
|
+
l.decorator ? {
|
|
162
162
|
name: "after",
|
|
163
|
-
fn:
|
|
164
|
-
|
|
165
|
-
default:
|
|
166
|
-
|
|
163
|
+
fn: t(() => [
|
|
164
|
+
s(C, null, {
|
|
165
|
+
default: t(() => [
|
|
166
|
+
c(i.$slots, "decorator", { item: e.item })
|
|
167
167
|
]),
|
|
168
168
|
_: 3
|
|
169
169
|
})
|
|
170
170
|
]),
|
|
171
171
|
key: "2"
|
|
172
172
|
} : void 0
|
|
173
|
-
]), 1040, ["active", "open"])) : (
|
|
173
|
+
]), 1040, ["active", "open"])) : (a(), m(o(P), u({
|
|
174
174
|
key: 2,
|
|
175
175
|
is: "button"
|
|
176
|
-
},
|
|
176
|
+
}, o(h), {
|
|
177
177
|
class: "relative",
|
|
178
178
|
selected: e.isSelected(e.item.id)
|
|
179
|
-
},
|
|
180
|
-
onClick:
|
|
181
|
-
}),
|
|
182
|
-
default:
|
|
183
|
-
|
|
184
|
-
|
|
179
|
+
}, D(o(k)), {
|
|
180
|
+
onClick: r[3] || (r[3] = () => y("selectItem", e.item.id))
|
|
181
|
+
}), g({
|
|
182
|
+
default: t(() => [
|
|
183
|
+
E(e.item) ? (a(), b("span", Q, [
|
|
184
|
+
s(f, {
|
|
185
185
|
item: e.item,
|
|
186
186
|
operationTitleSource: e.options?.operationTitleSource
|
|
187
187
|
}, null, 8, ["item", "operationTitleSource"])
|
|
188
|
-
])) : (
|
|
188
|
+
])) : (a(), m(f, {
|
|
189
189
|
key: 1,
|
|
190
190
|
item: e.item,
|
|
191
191
|
operationTitleSource: e.options?.operationTitleSource
|
|
@@ -195,26 +195,26 @@ const Q = {
|
|
|
195
195
|
}, [
|
|
196
196
|
"method" in e.item ? {
|
|
197
197
|
name: "aside",
|
|
198
|
-
fn:
|
|
199
|
-
"method" in e.item ? (
|
|
198
|
+
fn: t(() => [
|
|
199
|
+
"method" in e.item ? (a(), m(p, {
|
|
200
200
|
key: 0,
|
|
201
201
|
active: e.isSelected(e.item.id),
|
|
202
202
|
class: w(["ml-2 h-4 self-start", {
|
|
203
203
|
// Hide the badge when we're showing the decorator
|
|
204
|
-
"group-hover/button:opacity-0 group-focus-visible/button:opacity-0 group-has-[~*_[aria-expanded=true]]/button:opacity-0 group-has-[~*:focus-within]/button:opacity-0 group-has-[~*:hover]/button:opacity-0":
|
|
204
|
+
"group-hover/button:opacity-0 group-focus-visible/button:opacity-0 group-has-[~*_[aria-expanded=true]]/button:opacity-0 group-has-[~*:focus-within]/button:opacity-0 group-has-[~*:hover]/button:opacity-0": l.decorator
|
|
205
205
|
}]),
|
|
206
206
|
method: e.item.method,
|
|
207
207
|
webhook: e.item.type === "webhook"
|
|
208
|
-
}, null, 8, ["active", "class", "method", "webhook"])) :
|
|
208
|
+
}, null, 8, ["active", "class", "method", "webhook"])) : v("", !0)
|
|
209
209
|
]),
|
|
210
210
|
key: "0"
|
|
211
211
|
} : void 0,
|
|
212
|
-
|
|
212
|
+
l.decorator ? {
|
|
213
213
|
name: "after",
|
|
214
|
-
fn:
|
|
215
|
-
|
|
216
|
-
default:
|
|
217
|
-
|
|
214
|
+
fn: t(() => [
|
|
215
|
+
s(C, null, {
|
|
216
|
+
default: t(() => [
|
|
217
|
+
c(i.$slots, "decorator", { item: e.item })
|
|
218
218
|
]),
|
|
219
219
|
_: 3
|
|
220
220
|
})
|
|
@@ -226,5 +226,5 @@ const Q = {
|
|
|
226
226
|
}
|
|
227
227
|
});
|
|
228
228
|
export {
|
|
229
|
-
|
|
229
|
+
oe as default
|
|
230
230
|
};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarWrappingText as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as n, createBlock as t, openBlock as i, unref as r } from "vue";
|
|
2
|
+
import { ScalarWrappingText as a } from "@scalar/components";
|
|
3
|
+
const p = /* @__PURE__ */ n({
|
|
4
4
|
__name: "SidebarItemLabel",
|
|
5
5
|
props: {
|
|
6
6
|
item: {},
|
|
7
7
|
operationTitleSource: {}
|
|
8
8
|
},
|
|
9
|
-
setup(
|
|
10
|
-
return (
|
|
9
|
+
setup(e) {
|
|
10
|
+
return (m, o) => e.item.type === "model" ? (i(), t(r(a), {
|
|
11
11
|
key: 0,
|
|
12
12
|
preset: "property",
|
|
13
13
|
text: e.item.title
|
|
14
|
-
}, null, 8, ["text"])) : (
|
|
14
|
+
}, null, 8, ["text"])) : (i(), t(r(a), {
|
|
15
15
|
key: 1,
|
|
16
16
|
text: e.operationTitleSource === "path" && "path" in e.item ? e.item.path : e.item.title
|
|
17
17
|
}, null, 8, ["text"]));
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
20
|
export {
|
|
21
|
-
|
|
21
|
+
p as default
|
|
22
22
|
};
|
package/package.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"url": "git+https://github.com/scalar/scalar.git",
|
|
11
11
|
"directory": "packages/sidebar"
|
|
12
12
|
},
|
|
13
|
-
"version": "0.7.
|
|
13
|
+
"version": "0.7.13",
|
|
14
14
|
"engines": {
|
|
15
15
|
"node": ">=20"
|
|
16
16
|
},
|
|
@@ -30,24 +30,24 @@
|
|
|
30
30
|
"dist"
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"vue": "^3.5.
|
|
34
|
-
"@scalar/components": "0.16.
|
|
33
|
+
"vue": "^3.5.26",
|
|
34
|
+
"@scalar/components": "0.16.23",
|
|
35
|
+
"@scalar/icons": "0.5.2",
|
|
36
|
+
"@scalar/helpers": "0.2.8",
|
|
35
37
|
"@scalar/themes": "0.13.26",
|
|
36
38
|
"@scalar/use-hooks": "0.3.6",
|
|
37
|
-
"@scalar/workspace-store": "0.24.
|
|
38
|
-
"@scalar/icons": "0.5.2",
|
|
39
|
-
"@scalar/helpers": "0.2.7"
|
|
39
|
+
"@scalar/workspace-store": "0.24.10"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@tailwindcss/vite": "^4.1.18",
|
|
43
43
|
"@types/jsdom": "^21.1.3",
|
|
44
44
|
"@types/node": "^22.19.3",
|
|
45
|
-
"@vitejs/plugin-vue": "6.0.
|
|
45
|
+
"@vitejs/plugin-vue": "^6.0.3",
|
|
46
46
|
"@vue/test-utils": "2.4.6",
|
|
47
47
|
"jsdom": "26.1.0",
|
|
48
48
|
"tailwindcss": "^4.1.18",
|
|
49
|
-
"vite": "7.3.
|
|
50
|
-
"vitest": "
|
|
49
|
+
"vite": "^7.3.1",
|
|
50
|
+
"vitest": "4.0.16",
|
|
51
51
|
"@scalar/build-tooling": "0.4.1"
|
|
52
52
|
},
|
|
53
53
|
"scripts": {
|