@scalar/sidebar 0.7.38 → 0.7.40

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.
@@ -67,9 +67,11 @@ type __VLS_Slots = {
67
67
  };
68
68
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
69
69
  selectItem: (id: string) => any;
70
+ toggleGroup: (id: string) => any;
70
71
  reorder: (draggingItem: DraggingItem, hoveredItem: HoveredItem) => any;
71
72
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
72
73
  onSelectItem?: ((id: string) => any) | undefined;
74
+ onToggleGroup?: ((id: string) => any) | undefined;
73
75
  onReorder?: ((draggingItem: DraggingItem, hoveredItem: HoveredItem) => any) | undefined;
74
76
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
75
77
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarSidebar.vue.d.ts","sourceRoot":"","sources":["../../src/components/ScalarSidebar.vue"],"names":[],"mappings":"AAiKA,OAAO,KAAK,EACV,YAAY,EACZ,WAAW,EACX,mBAAmB,EACpB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAI3C,KAAK,WAAW,GAAG;IACjB;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,KAAK,EAAE,IAAI,EAAE,CAAA;IACb;;OAEG;IACH,UAAU,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAA;IACnC;;OAEG;IACH,UAAU,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAA;IACnC;;;OAGG;IACH,OAAO,CAAC,EAAE;QACR,oBAAoB,EAAE,MAAM,GAAG,SAAS,GAAG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AAO,CAAA;CACrD,CAAC;AAwKF,QAAA,MAAM,UAAU;;;;;;;;kFAGd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -1,8 +1,8 @@
1
- import { defineComponent as p, useSlots as S, createBlock as f, openBlock as s, unref as i, normalizeStyle as b, withCtx as a, renderSlot as l, createVNode as g, createElementVNode as D, createElementBlock as E, Fragment as $, renderList as k, createSlots as I, mergeProps as d } from "vue";
1
+ import { defineComponent as y, useSlots as g, createBlock as f, openBlock as i, unref as d, normalizeStyle as S, withCtx as n, renderSlot as r, createVNode as b, createElementVNode as D, createElementBlock as E, Fragment as $, renderList as k, createSlots as I, mergeProps as m } from "vue";
2
2
  import { ScalarSidebar as v, ScalarSidebarItems as x } from "@scalar/components";
3
3
  import { filterItems as F } from "../helpers/filter-items.js";
4
4
  import B from "./SidebarItem.vue.js";
5
- const w = /* @__PURE__ */ p({
5
+ const w = /* @__PURE__ */ y({
6
6
  __name: "ScalarSidebar",
7
7
  props: {
8
8
  layout: {},
@@ -14,53 +14,52 @@ const w = /* @__PURE__ */ p({
14
14
  isDraggable: {},
15
15
  isDroppable: { type: Function }
16
16
  },
17
- emits: ["reorder", "selectItem"],
18
- setup(e, { emit: u }) {
19
- const m = u, n = S(), y = (t, r) => {
20
- m("reorder", t, r);
17
+ emits: ["reorder", "selectItem", "toggleGroup"],
18
+ setup(e, { emit: c }) {
19
+ const s = c, a = g(), p = (t, l) => {
20
+ s("reorder", t, l);
21
21
  };
22
- return (t, r) => (s(), f(i(v), {
22
+ return (t, l) => (i(), f(d(v), {
23
23
  class: "flex min-h-0 flex-col",
24
- style: b({
25
- "--scalar-sidebar-indent": e.indent + "px"
26
- })
24
+ style: S({ "--scalar-sidebar-indent": e.indent + "px" })
27
25
  }, {
28
- default: a(() => [
29
- l(t.$slots, "header"),
30
- l(t.$slots, "default", {}, () => [
31
- g(i(x), { class: "custom-scroll pt-0" }, {
32
- default: a(() => [
33
- l(t.$slots, "before"),
34
- (s(!0), E($, null, k(i(F)(e.layout, e.items), (c) => (s(), f(B, {
35
- key: c.id,
26
+ default: n(() => [
27
+ r(t.$slots, "header"),
28
+ r(t.$slots, "default", {}, () => [
29
+ b(d(x), { class: "custom-scroll" }, {
30
+ default: n(() => [
31
+ r(t.$slots, "before"),
32
+ (i(!0), E($, null, k(d(F)(e.layout, e.items), (u) => (i(), f(B, {
33
+ key: u.id,
36
34
  isDraggable: e.isDraggable ?? e.layout === "client",
37
35
  isDroppable: e.isDroppable,
38
36
  isExpanded: e.isExpanded,
39
37
  isSelected: e.isSelected,
40
- item: c,
38
+ item: u,
41
39
  layout: e.layout,
42
40
  options: e.options,
43
- onOnDragEnd: y,
44
- onSelectItem: r[0] || (r[0] = (o) => m("selectItem", o))
41
+ onOnDragEnd: p,
42
+ onSelectItem: l[0] || (l[0] = (o) => s("selectItem", o)),
43
+ onToggleGroup: l[1] || (l[1] = (o) => s("toggleGroup", o))
45
44
  }, I({ _: 2 }, [
46
- n.decorator ? {
45
+ a.decorator ? {
47
46
  name: "decorator",
48
- fn: a((o) => [
49
- l(t.$slots, "decorator", d({ ref_for: !0 }, o))
47
+ fn: n((o) => [
48
+ r(t.$slots, "decorator", m({ ref_for: !0 }, o))
50
49
  ]),
51
50
  key: "0"
52
51
  } : void 0,
53
- n.empty ? {
52
+ a.empty ? {
54
53
  name: "empty",
55
- fn: a((o) => [
56
- l(t.$slots, "empty", d({ ref_for: !0 }, o))
54
+ fn: n((o) => [
55
+ r(t.$slots, "empty", m({ ref_for: !0 }, o))
57
56
  ]),
58
57
  key: "1"
59
58
  } : void 0,
60
- n.icon ? {
59
+ a.icon ? {
61
60
  name: "icon",
62
- fn: a((o) => [
63
- l(t.$slots, "icon", d({ ref_for: !0 }, o))
61
+ fn: n((o) => [
62
+ r(t.$slots, "icon", m({ ref_for: !0 }, o))
64
63
  ]),
65
64
  key: "2"
66
65
  } : void 0
@@ -68,9 +67,9 @@ const w = /* @__PURE__ */ p({
68
67
  ]),
69
68
  _: 3
70
69
  }),
71
- r[1] || (r[1] = D("div", { class: "flex-1" }, null, -1))
70
+ l[2] || (l[2] = D("div", { class: "flex-1" }, null, -1))
72
71
  ]),
73
- l(t.$slots, "footer")
72
+ r(t.$slots, "footer")
74
73
  ]),
75
74
  _: 3
76
75
  }, 8, ["style"]));
@@ -64,9 +64,11 @@ type __VLS_Slots = {
64
64
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
65
65
  onDragEnd: (draggingItem: DraggingItem, hoveredItem: HoveredItem) => any;
66
66
  selectItem: (id: string) => any;
67
+ toggleGroup: (id: string) => any;
67
68
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
68
69
  onOnDragEnd?: ((draggingItem: DraggingItem, hoveredItem: HoveredItem) => any) | undefined;
69
70
  onSelectItem?: ((id: string) => any) | undefined;
71
+ onToggleGroup?: ((id: string) => any) | undefined;
70
72
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
71
73
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
72
74
  declare const _default: typeof __VLS_export;
@@ -1 +1 @@
1
- {"version":3,"file":"SidebarItem.vue.d.ts","sourceRoot":"","sources":["../../src/components/SidebarItem.vue"],"names":[],"mappings":"AAkVA,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,mBAAmB,EACzB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAK3C,KAAK,WAAW,GAAG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eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -1,13 +1,13 @@
1
- import { defineComponent as N, useSlots as V, resolveComponent as H, createBlock as s, unref as a, openBlock as r, mergeProps as m, toHandlers as v, withCtx as i, createTextVNode as L, toDisplayString as O, createElementBlock as b, Fragment as I, renderList as T, createSlots as f, renderSlot as l, createVNode as u, createCommentVNode as $, normalizeClass as w } from "vue";
1
+ import { defineComponent as N, useSlots as V, resolveComponent as H, createBlock as u, unref as n, openBlock as r, mergeProps as m, toHandlers as D, withCtx as o, createTextVNode as L, toDisplayString as O, createElementBlock as g, Fragment as E, renderList as I, createSlots as b, renderSlot as d, createVNode as y, createCommentVNode as $, normalizeClass as G } from "vue";
2
2
  import { ScalarSidebarSection as z, ScalarSidebarGroup as A, ScalarSidebarItem as P } from "@scalar/components";
3
3
  import { LibraryIcon as j } from "@scalar/icons/library";
4
- import C from "./SidebarItemDecorator.vue.js";
5
- import { filterItems as F } from "../helpers/filter-items.js";
4
+ import w from "./SidebarItemDecorator.vue.js";
5
+ import { filterItems as C } from "../helpers/filter-items.js";
6
6
  import { hasChildren as q } from "../helpers/has-children.js";
7
7
  import { isSidebarFolder as J } from "../helpers/is-sidebar-folder.js";
8
8
  import { useDraggable as K } from "../hooks/use-draggable.js";
9
- import B from "./SidebarHttpBadge.vue.js";
10
- import g from "./SidebarItemLabel.vue.js";
9
+ import F from "./SidebarHttpBadge.vue.js";
10
+ import f from "./SidebarItemLabel.vue.js";
11
11
  const M = {
12
12
  key: 0,
13
13
  class: "line-through"
@@ -25,24 +25,24 @@ const M = {
25
25
  isDraggable: {},
26
26
  isDroppable: { type: Function }
27
27
  },
28
- emits: ["selectItem", "onDragEnd"],
29
- setup(e, { emit: G }) {
30
- const y = G, n = V(), x = (t) => "isGroup" in t && t.isGroup, D = (t) => ("isDeprecated" in t && t.isDeprecated) ?? !1, S = (t, d) => {
31
- y("onDragEnd", t, d);
32
- }, { draggableAttrs: k, draggableEvents: h } = K({
28
+ emits: ["selectItem", "onDragEnd", "toggleGroup"],
29
+ setup(e, { emit: x }) {
30
+ const s = x, l = V(), B = (t) => "isGroup" in t && t.isGroup, h = (t) => ("isDeprecated" in t && t.isDeprecated) ?? !1, S = (t, a) => {
31
+ s("onDragEnd", t, a);
32
+ }, { draggableAttrs: k, draggableEvents: v } = K({
33
33
  id: e.item.id,
34
34
  isDraggable: e.isDraggable,
35
35
  isDroppable: e.isDroppable,
36
36
  onDragEnd: S
37
37
  });
38
- return (t, d) => {
39
- const E = H("SidebarItem", !0);
40
- return a(q)(e.item) && x(e.item) ? (r(), s(a(z), m({
38
+ return (t, a) => {
39
+ const T = H("SidebarItem", !0);
40
+ return n(q)(e.item) && B(e.item) ? (r(), u(n(z), m({
41
41
  key: 0,
42
42
  "data-sidebar-id": e.item.id
43
- }, a(k), v(a(h))), {
44
- items: i(() => [
45
- (r(!0), b(I, null, T(a(F)(e.layout, e.item.children), (c) => (r(), s(E, {
43
+ }, n(k), D(n(v))), {
44
+ items: o(() => [
45
+ (r(!0), g(E, null, I(n(C)(e.layout, e.item.children), (c) => (r(), u(T, {
46
46
  key: c.id,
47
47
  isDraggable: e.isDraggable,
48
48
  isDroppable: e.isDroppable,
@@ -52,47 +52,51 @@ const M = {
52
52
  layout: e.layout,
53
53
  options: e.options,
54
54
  onOnDragEnd: S,
55
- onSelectItem: d[0] || (d[0] = (o) => y("selectItem", o))
56
- }, f({ _: 2 }, [
57
- n.decorator ? {
55
+ onSelectItem: a[0] || (a[0] = (i) => s("selectItem", i)),
56
+ onToggleGroup: a[1] || (a[1] = (i) => s("toggleGroup", i))
57
+ }, b({ _: 2 }, [
58
+ l.decorator ? {
58
59
  name: "decorator",
59
- fn: i((o) => [
60
- l(t.$slots, "decorator", m({ ref_for: !0 }, o))
60
+ fn: o((i) => [
61
+ d(t.$slots, "decorator", m({ ref_for: !0 }, i))
61
62
  ]),
62
63
  key: "0"
63
64
  } : void 0,
64
- n.empty ? {
65
+ l.empty ? {
65
66
  name: "empty",
66
- fn: i((o) => [
67
- l(t.$slots, "empty", m({ ref_for: !0 }, o))
67
+ fn: o((i) => [
68
+ d(t.$slots, "empty", m({ ref_for: !0 }, i))
68
69
  ]),
69
70
  key: "1"
70
71
  } : void 0,
71
- n.icon ? {
72
+ l.icon ? {
72
73
  name: "icon",
73
- fn: i((o) => [
74
- l(t.$slots, "icon", m({ ref_for: !0 }, o))
74
+ fn: o((i) => [
75
+ d(t.$slots, "icon", m({ ref_for: !0 }, i))
75
76
  ]),
76
77
  key: "2"
77
78
  } : void 0
78
79
  ]), 1032, ["isDraggable", "isDroppable", "isExpanded", "isSelected", "item", "layout", "options"]))), 128))
79
80
  ]),
80
- default: i(() => [
81
+ default: o(() => [
81
82
  L(O(e.item.title) + " ", 1)
82
83
  ]),
83
84
  _: 3
84
- }, 16, ["data-sidebar-id"])) : a(J)(e.layout, e.item, n.empty !== void 0) ? (r(), s(a(A), m({
85
+ }, 16, ["data-sidebar-id"])) : n(J)(e.layout, e.item, l.empty !== void 0) ? (r(), u(n(A), m({
85
86
  key: 1,
86
87
  active: e.isSelected(e.item.id),
87
88
  class: "relative",
88
89
  controlled: "",
89
- "data-sidebar-id": e.item.id,
90
+ "data-sidebar-id": e.item.id
91
+ }, n(k), {
92
+ discrete: e.layout === "reference" && e.item.type === "text",
90
93
  open: e.isExpanded(e.item.id)
91
- }, a(k), v(a(h)), {
92
- onClick: d[2] || (d[2] = () => y("selectItem", e.item.id))
93
- }), f({
94
- items: i(() => [
95
- (r(!0), b(I, null, T(a(F)(e.layout, e.item.children ?? []), (c) => (r(), s(E, {
94
+ }, D(n(v)), {
95
+ onClick: a[4] || (a[4] = () => s("selectItem", e.item.id)),
96
+ onToggle: a[5] || (a[5] = () => s("toggleGroup", e.item.id))
97
+ }), b({
98
+ items: o(() => [
99
+ (r(!0), g(E, null, I(n(C)(e.layout, e.item.children ?? []), (c) => (r(), u(T, {
96
100
  key: c.id,
97
101
  isDraggable: e.isDraggable,
98
102
  isDroppable: e.isDroppable,
@@ -103,42 +107,43 @@ const M = {
103
107
  options: e.options,
104
108
  parentIds: [],
105
109
  onOnDragEnd: S,
106
- onSelectItem: d[1] || (d[1] = (o) => y("selectItem", o))
107
- }, f({ _: 2 }, [
108
- n.decorator ? {
110
+ onSelectItem: a[2] || (a[2] = (i) => s("selectItem", i)),
111
+ onToggleGroup: a[3] || (a[3] = (i) => s("toggleGroup", i))
112
+ }, b({ _: 2 }, [
113
+ l.decorator ? {
109
114
  name: "decorator",
110
- fn: i((o) => [
111
- l(t.$slots, "decorator", m({ ref_for: !0 }, o))
115
+ fn: o((i) => [
116
+ d(t.$slots, "decorator", m({ ref_for: !0 }, i))
112
117
  ]),
113
118
  key: "0"
114
119
  } : void 0,
115
- n.empty ? {
120
+ l.empty ? {
116
121
  name: "empty",
117
- fn: i((o) => [
118
- l(t.$slots, "empty", m({ ref_for: !0 }, o))
122
+ fn: o((i) => [
123
+ d(t.$slots, "empty", m({ ref_for: !0 }, i))
119
124
  ]),
120
125
  key: "1"
121
126
  } : void 0,
122
- n.icon ? {
127
+ l.icon ? {
123
128
  name: "icon",
124
- fn: i((o) => [
125
- l(t.$slots, "icon", m({ ref_for: !0 }, o))
129
+ fn: o((i) => [
130
+ d(t.$slots, "icon", m({ ref_for: !0 }, i))
126
131
  ]),
127
132
  key: "2"
128
133
  } : void 0
129
134
  ]), 1032, ["isDraggable", "isDroppable", "isExpanded", "isSelected", "item", "layout", "options"]))), 128)),
130
- n.empty && (e.item.children?.length ?? 0) === 0 ? l(t.$slots, "empty", {
135
+ l.empty && (e.item.children?.length ?? 0) === 0 ? d(t.$slots, "empty", {
131
136
  key: 0,
132
137
  item: e.item
133
138
  }) : $("", !0)
134
139
  ]),
135
- default: i(() => [
136
- D(e.item) ? (r(), b("span", M, [
137
- u(g, {
140
+ default: o(() => [
141
+ h(e.item) ? (r(), g("span", M, [
142
+ y(f, {
138
143
  item: e.item,
139
144
  operationTitleSource: e.options?.operationTitleSource
140
145
  }, null, 8, ["item", "operationTitleSource"])
141
- ])) : (r(), s(g, {
146
+ ])) : (r(), u(f, {
142
147
  key: 1,
143
148
  item: e.item,
144
149
  operationTitleSource: e.options?.operationTitleSource
@@ -148,12 +153,12 @@ const M = {
148
153
  }, [
149
154
  e.item.type === "document" ? {
150
155
  name: "icon",
151
- fn: i(({ open: c }) => [
152
- l(t.$slots, "icon", {
156
+ fn: o(({ open: c }) => [
157
+ d(t.$slots, "icon", {
153
158
  item: e.item,
154
159
  open: c
155
160
  }, () => [
156
- u(a(j), {
161
+ y(n(j), {
157
162
  class: "block",
158
163
  src: "icon" in e.item && e.item.icon || "interface-content-folder"
159
164
  }, null, 8, ["src"])
@@ -163,12 +168,12 @@ const M = {
163
168
  } : void 0,
164
169
  "method" in e.item ? {
165
170
  name: "aside",
166
- fn: i(() => [
167
- u(B, {
171
+ fn: o(() => [
172
+ y(F, {
168
173
  active: e.isSelected(e.item.id),
169
- class: w(["mr-1 ml-2 h-4 self-start", {
174
+ class: G(["mr-1 ml-2 h-4 self-start", {
170
175
  // Hide the badge when we're showing the decorator
171
- "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": n.decorator
176
+ "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
172
177
  }]),
173
178
  method: e.item.method,
174
179
  webhook: e.item.type === "webhook"
@@ -176,35 +181,35 @@ const M = {
176
181
  ]),
177
182
  key: "1"
178
183
  } : void 0,
179
- n.decorator ? {
184
+ l.decorator ? {
180
185
  name: "after",
181
- fn: i(() => [
182
- u(C, null, {
183
- default: i(() => [
184
- l(t.$slots, "decorator", { item: e.item })
186
+ fn: o(() => [
187
+ y(w, null, {
188
+ default: o(() => [
189
+ d(t.$slots, "decorator", { item: e.item })
185
190
  ]),
186
191
  _: 3
187
192
  })
188
193
  ]),
189
194
  key: "2"
190
195
  } : void 0
191
- ]), 1040, ["active", "data-sidebar-id", "open"])) : (r(), s(a(P), m({
196
+ ]), 1040, ["active", "data-sidebar-id", "discrete", "open"])) : (r(), u(n(P), m({
192
197
  key: 2,
193
198
  is: "button"
194
- }, a(k), {
199
+ }, n(k), {
195
200
  class: "relative",
196
201
  "data-sidebar-id": e.item.id,
197
202
  selected: e.isSelected(e.item.id)
198
- }, v(a(h)), {
199
- onClick: d[3] || (d[3] = () => y("selectItem", e.item.id))
200
- }), f({
201
- default: i(() => [
202
- D(e.item) ? (r(), b("span", Q, [
203
- u(g, {
203
+ }, D(n(v)), {
204
+ onClick: a[6] || (a[6] = () => s("selectItem", e.item.id))
205
+ }), b({
206
+ default: o(() => [
207
+ h(e.item) ? (r(), g("span", Q, [
208
+ y(f, {
204
209
  item: e.item,
205
210
  operationTitleSource: e.options?.operationTitleSource
206
211
  }, null, 8, ["item", "operationTitleSource"])
207
- ])) : (r(), s(g, {
212
+ ])) : (r(), u(f, {
208
213
  key: 1,
209
214
  item: e.item,
210
215
  operationTitleSource: e.options?.operationTitleSource
@@ -212,10 +217,10 @@ const M = {
212
217
  ]),
213
218
  _: 2
214
219
  }, [
215
- n.icon ? {
220
+ l.icon ? {
216
221
  name: "icon",
217
- fn: i(() => [
218
- l(t.$slots, "icon", {
222
+ fn: o(() => [
223
+ d(t.$slots, "icon", {
219
224
  item: e.item,
220
225
  open: !0
221
226
  })
@@ -224,13 +229,13 @@ const M = {
224
229
  } : void 0,
225
230
  "method" in e.item ? {
226
231
  name: "aside",
227
- fn: i(() => [
228
- "method" in e.item ? (r(), s(B, {
232
+ fn: o(() => [
233
+ "method" in e.item ? (r(), u(F, {
229
234
  key: 0,
230
235
  active: e.isSelected(e.item.id),
231
- class: w(["ml-2 h-4 self-start", {
236
+ class: G(["ml-2 h-4 self-start", {
232
237
  // Hide the badge when we're showing the decorator
233
- "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": n.decorator
238
+ "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
234
239
  }]),
235
240
  method: e.item.method,
236
241
  webhook: e.item.type === "webhook"
@@ -238,12 +243,12 @@ const M = {
238
243
  ]),
239
244
  key: "1"
240
245
  } : void 0,
241
- n.decorator ? {
246
+ l.decorator ? {
242
247
  name: "after",
243
- fn: i(() => [
244
- u(C, null, {
245
- default: i(() => [
246
- l(t.$slots, "decorator", { item: e.item })
248
+ fn: o(() => [
249
+ y(w, null, {
250
+ default: o(() => [
251
+ d(t.$slots, "decorator", { item: e.item })
247
252
  ]),
248
253
  _: 3
249
254
  })
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.38",
13
+ "version": "0.7.40",
14
14
  "engines": {
15
15
  "node": ">=20"
16
16
  },
@@ -31,12 +31,12 @@
31
31
  ],
32
32
  "dependencies": {
33
33
  "vue": "^3.5.26",
34
- "@scalar/helpers": "0.2.15",
35
- "@scalar/components": "0.19.7",
36
34
  "@scalar/icons": "0.5.3",
35
+ "@scalar/helpers": "0.2.16",
37
36
  "@scalar/themes": "0.14.0",
38
- "@scalar/workspace-store": "0.34.1",
39
- "@scalar/use-hooks": "0.3.7"
37
+ "@scalar/use-hooks": "0.3.7",
38
+ "@scalar/workspace-store": "0.34.3",
39
+ "@scalar/components": "0.19.9"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@tailwindcss/vite": "^4.1.18",