@scalar/sidebar 0.7.35 → 0.7.38

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 +1 @@
1
- {"version":3,"file":"SidebarItem.vue.d.ts","sourceRoot":"","sources":["../../src/components/SidebarItem.vue"],"names":[],"mappings":"AAgVA,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;IACf;;OAEG;IACH,IAAI,EAAE,IAAI,CAAA;IACV;;OAEG;IACH,MAAM,EAAE,MAAM,CAAA;IACd;;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,EACH;QACE,oBAAoB,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAAA;KACrD,GACD,SAAS,CAAA;IAEb;;;;OAIG;IACH,WAAW,CAAC,EAAE,mBAAmB,CAAC,aAAa,CAAC,CAAA;IAChD;;;;OAIG;IACH,WAAW,CAAC,EAAE,mBAAmB,CAAC,aAAa,CAAC,CAAA;CACjD,CAAC;AAoBJ,KAAK,WAAW,GAAG;IACjB;;;OAGG;IACH,SAAS,CAAC,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,IAAI,CAAA;KAAE,GAAG,OAAO,CAAA;IAC1C;;;OAGG;IACH,KAAK,CAAC,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,IAAI,CAAA;KAAE,GAAG,OAAO,CAAA;IACtC;;;OAGG;IACH,IAAI,CAAC,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,IAAI,CAAC;QAAC,IAAI,EAAE,OAAO,CAAA;KA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CAAC,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,IAAI,CAAA;KAAE,GAAG,OAAO,CAAA;IACtC;;;OAGG;IACH,IAAI,CAAC,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,IAAI,CAAC;QAAC,IAAI,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO,CAAA;CACrD,CAAC;AA4hBF,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,4 +1,4 @@
1
- import { defineComponent as N, useSlots as V, resolveComponent as H, createBlock as m, unref as a, openBlock as r, mergeProps as s, toHandlers as D, withCtx as i, createTextVNode as L, toDisplayString as O, createElementBlock as b, Fragment as T, renderList as $, createSlots as f, renderSlot as l, createCommentVNode as v, createVNode as y, normalizeClass as w } from "vue";
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";
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
4
  import C from "./SidebarItemDecorator.vue.js";
@@ -27,8 +27,8 @@ const M = {
27
27
  },
28
28
  emits: ["selectItem", "onDragEnd"],
29
29
  setup(e, { emit: G }) {
30
- const u = G, n = V(), x = (t) => "isGroup" in t && t.isGroup, E = (t) => ("isDeprecated" in t && t.isDeprecated) ?? !1, S = (t, d) => {
31
- u("onDragEnd", t, d);
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
32
  }, { draggableAttrs: k, draggableEvents: h } = K({
33
33
  id: e.item.id,
34
34
  isDraggable: e.isDraggable,
@@ -36,13 +36,13 @@ const M = {
36
36
  onDragEnd: S
37
37
  });
38
38
  return (t, d) => {
39
- const I = H("SidebarItem", !0);
40
- return a(q)(e.item) && x(e.item) ? (r(), m(a(z), s({
39
+ const E = H("SidebarItem", !0);
40
+ return a(q)(e.item) && x(e.item) ? (r(), s(a(z), m({
41
41
  key: 0,
42
42
  "data-sidebar-id": e.item.id
43
- }, a(k), D(a(h))), {
43
+ }, a(k), v(a(h))), {
44
44
  items: i(() => [
45
- (r(!0), b(T, null, $(a(F)(e.layout, e.item.children), (c) => (r(), m(I, {
45
+ (r(!0), b(I, null, T(a(F)(e.layout, e.item.children), (c) => (r(), s(E, {
46
46
  key: c.id,
47
47
  isDraggable: e.isDraggable,
48
48
  isDroppable: e.isDroppable,
@@ -52,26 +52,26 @@ const M = {
52
52
  layout: e.layout,
53
53
  options: e.options,
54
54
  onOnDragEnd: S,
55
- onSelectItem: d[0] || (d[0] = (o) => u("selectItem", o))
55
+ onSelectItem: d[0] || (d[0] = (o) => y("selectItem", o))
56
56
  }, f({ _: 2 }, [
57
57
  n.decorator ? {
58
58
  name: "decorator",
59
59
  fn: i((o) => [
60
- l(t.$slots, "decorator", s({ ref_for: !0 }, o))
60
+ l(t.$slots, "decorator", m({ ref_for: !0 }, o))
61
61
  ]),
62
62
  key: "0"
63
63
  } : void 0,
64
64
  n.empty ? {
65
65
  name: "empty",
66
66
  fn: i((o) => [
67
- l(t.$slots, "empty", s({ ref_for: !0 }, o))
67
+ l(t.$slots, "empty", m({ ref_for: !0 }, o))
68
68
  ]),
69
69
  key: "1"
70
70
  } : void 0,
71
71
  n.icon ? {
72
72
  name: "icon",
73
73
  fn: i((o) => [
74
- l(t.$slots, "icon", s({ ref_for: !0 }, o))
74
+ l(t.$slots, "icon", m({ ref_for: !0 }, o))
75
75
  ]),
76
76
  key: "2"
77
77
  } : void 0
@@ -81,18 +81,18 @@ const M = {
81
81
  L(O(e.item.title) + " ", 1)
82
82
  ]),
83
83
  _: 3
84
- }, 16, ["data-sidebar-id"])) : a(J)(e.layout, e.item, n.empty !== void 0) ? (r(), m(a(A), s({
84
+ }, 16, ["data-sidebar-id"])) : a(J)(e.layout, e.item, n.empty !== void 0) ? (r(), s(a(A), m({
85
85
  key: 1,
86
86
  active: e.isSelected(e.item.id),
87
87
  class: "relative",
88
88
  controlled: "",
89
89
  "data-sidebar-id": e.item.id,
90
90
  open: e.isExpanded(e.item.id)
91
- }, a(k), D(a(h)), {
92
- onClick: d[2] || (d[2] = () => u("selectItem", e.item.id))
91
+ }, a(k), v(a(h)), {
92
+ onClick: d[2] || (d[2] = () => y("selectItem", e.item.id))
93
93
  }), f({
94
94
  items: i(() => [
95
- (r(!0), b(T, null, $(a(F)(e.layout, e.item.children ?? []), (c) => (r(), m(I, {
95
+ (r(!0), b(I, null, T(a(F)(e.layout, e.item.children ?? []), (c) => (r(), s(E, {
96
96
  key: c.id,
97
97
  isDraggable: e.isDraggable,
98
98
  isDroppable: e.isDroppable,
@@ -103,26 +103,26 @@ const M = {
103
103
  options: e.options,
104
104
  parentIds: [],
105
105
  onOnDragEnd: S,
106
- onSelectItem: d[1] || (d[1] = (o) => u("selectItem", o))
106
+ onSelectItem: d[1] || (d[1] = (o) => y("selectItem", o))
107
107
  }, f({ _: 2 }, [
108
108
  n.decorator ? {
109
109
  name: "decorator",
110
110
  fn: i((o) => [
111
- l(t.$slots, "decorator", s({ ref_for: !0 }, o))
111
+ l(t.$slots, "decorator", m({ ref_for: !0 }, o))
112
112
  ]),
113
113
  key: "0"
114
114
  } : void 0,
115
115
  n.empty ? {
116
116
  name: "empty",
117
117
  fn: i((o) => [
118
- l(t.$slots, "empty", s({ ref_for: !0 }, o))
118
+ l(t.$slots, "empty", m({ ref_for: !0 }, o))
119
119
  ]),
120
120
  key: "1"
121
121
  } : void 0,
122
122
  n.icon ? {
123
123
  name: "icon",
124
124
  fn: i((o) => [
125
- l(t.$slots, "icon", s({ ref_for: !0 }, o))
125
+ l(t.$slots, "icon", m({ ref_for: !0 }, o))
126
126
  ]),
127
127
  key: "2"
128
128
  } : void 0
@@ -130,29 +130,19 @@ const M = {
130
130
  n.empty && (e.item.children?.length ?? 0) === 0 ? l(t.$slots, "empty", {
131
131
  key: 0,
132
132
  item: e.item
133
- }) : v("", !0)
133
+ }) : $("", !0)
134
134
  ]),
135
135
  default: i(() => [
136
- E(e.item) ? (r(), b("span", M, [
137
- y(g, {
136
+ D(e.item) ? (r(), b("span", M, [
137
+ u(g, {
138
138
  item: e.item,
139
139
  operationTitleSource: e.options?.operationTitleSource
140
140
  }, null, 8, ["item", "operationTitleSource"])
141
- ])) : (r(), m(g, {
141
+ ])) : (r(), s(g, {
142
142
  key: 1,
143
143
  item: e.item,
144
144
  operationTitleSource: e.options?.operationTitleSource
145
- }, null, 8, ["item", "operationTitleSource"])),
146
- "method" in e.item ? (r(), m(B, {
147
- key: 2,
148
- active: e.isSelected(e.item.id),
149
- class: w(["ml-2 h-4 self-start", {
150
- // Hide the badge when we're showing the decorator
151
- "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
152
- }]),
153
- method: e.item.method,
154
- webhook: e.item.type === "webhook"
155
- }, null, 8, ["active", "class", "method", "webhook"])) : v("", !0)
145
+ }, null, 8, ["item", "operationTitleSource"]))
156
146
  ]),
157
147
  _: 2
158
148
  }, [
@@ -163,7 +153,7 @@ const M = {
163
153
  item: e.item,
164
154
  open: c
165
155
  }, () => [
166
- y(a(j), {
156
+ u(a(j), {
167
157
  class: "block",
168
158
  src: "icon" in e.item && e.item.icon || "interface-content-folder"
169
159
  }, null, 8, ["src"])
@@ -171,35 +161,50 @@ const M = {
171
161
  ]),
172
162
  key: "0"
173
163
  } : void 0,
164
+ "method" in e.item ? {
165
+ name: "aside",
166
+ fn: i(() => [
167
+ u(B, {
168
+ active: e.isSelected(e.item.id),
169
+ class: w(["mr-1 ml-2 h-4 self-start", {
170
+ // 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
172
+ }]),
173
+ method: e.item.method,
174
+ webhook: e.item.type === "webhook"
175
+ }, null, 8, ["active", "class", "method", "webhook"])
176
+ ]),
177
+ key: "1"
178
+ } : void 0,
174
179
  n.decorator ? {
175
180
  name: "after",
176
181
  fn: i(() => [
177
- y(C, null, {
182
+ u(C, null, {
178
183
  default: i(() => [
179
184
  l(t.$slots, "decorator", { item: e.item })
180
185
  ]),
181
186
  _: 3
182
187
  })
183
188
  ]),
184
- key: "1"
189
+ key: "2"
185
190
  } : void 0
186
- ]), 1040, ["active", "data-sidebar-id", "open"])) : (r(), m(a(P), s({
191
+ ]), 1040, ["active", "data-sidebar-id", "open"])) : (r(), s(a(P), m({
187
192
  key: 2,
188
193
  is: "button"
189
194
  }, a(k), {
190
195
  class: "relative",
191
196
  "data-sidebar-id": e.item.id,
192
197
  selected: e.isSelected(e.item.id)
193
- }, D(a(h)), {
194
- onClick: d[3] || (d[3] = () => u("selectItem", e.item.id))
198
+ }, v(a(h)), {
199
+ onClick: d[3] || (d[3] = () => y("selectItem", e.item.id))
195
200
  }), f({
196
201
  default: i(() => [
197
- E(e.item) ? (r(), b("span", Q, [
198
- y(g, {
202
+ D(e.item) ? (r(), b("span", Q, [
203
+ u(g, {
199
204
  item: e.item,
200
205
  operationTitleSource: e.options?.operationTitleSource
201
206
  }, null, 8, ["item", "operationTitleSource"])
202
- ])) : (r(), m(g, {
207
+ ])) : (r(), s(g, {
203
208
  key: 1,
204
209
  item: e.item,
205
210
  operationTitleSource: e.options?.operationTitleSource
@@ -220,7 +225,7 @@ const M = {
220
225
  "method" in e.item ? {
221
226
  name: "aside",
222
227
  fn: i(() => [
223
- "method" in e.item ? (r(), m(B, {
228
+ "method" in e.item ? (r(), s(B, {
224
229
  key: 0,
225
230
  active: e.isSelected(e.item.id),
226
231
  class: w(["ml-2 h-4 self-start", {
@@ -229,14 +234,14 @@ const M = {
229
234
  }]),
230
235
  method: e.item.method,
231
236
  webhook: e.item.type === "webhook"
232
- }, null, 8, ["active", "class", "method", "webhook"])) : v("", !0)
237
+ }, null, 8, ["active", "class", "method", "webhook"])) : $("", !0)
233
238
  ]),
234
239
  key: "1"
235
240
  } : void 0,
236
241
  n.decorator ? {
237
242
  name: "after",
238
243
  fn: i(() => [
239
- y(C, null, {
244
+ u(C, null, {
240
245
  default: i(() => [
241
246
  l(t.$slots, "decorator", { item: e.item })
242
247
  ]),
@@ -1 +1 @@
1
- {"version":3,"file":"SidebarItemDecorator.vue.d.ts","sourceRoot":"","sources":["../../src/components/SidebarItemDecorator.vue"],"names":[],"mappings":"AAuCA,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAG/C,QAAA,MAAM,UAAU,+QACd,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
+ {"version":3,"file":"SidebarItemDecorator.vue.d.ts","sourceRoot":"","sources":["../../src/components/SidebarItemDecorator.vue"],"names":[],"mappings":"AAsCA,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAG/C,QAAA,MAAM,UAAU,+QACd,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 { createElementBlock as o, openBlock as t, renderSlot as r } from "vue";
1
+ import { createElementBlock as t, openBlock as o, renderSlot as r } from "vue";
2
2
  import a from "../_virtual/_plugin-vue_export-helper.js";
3
- const c = {}, i = { class: "bg-b-2 border-red absolute top-[1lh] right-0.75 flex -translate-y-1/2 rounded border p-0.25 opacity-0 peer-hover/button:opacity-100 peer-focus-visible/button:opacity-100 focus-within:opacity-100 hover:opacity-100 has-[&[aria-expanded=true]]:opacity-100" };
3
+ const c = {}, i = { class: "bg-b-2 absolute top-[1lh] right-0.75 flex -translate-y-1/2 rounded border p-0.25 opacity-0 peer-hover/button:opacity-100 peer-focus-visible/button:opacity-100 focus-within:opacity-100 hover:opacity-100 has-[&[aria-expanded=true]]:opacity-100" };
4
4
  function n(e, s) {
5
- return t(), o("div", i, [
5
+ return o(), t("div", i, [
6
6
  r(e.$slots, "default")
7
7
  ]);
8
8
  }
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.35",
13
+ "version": "0.7.38",
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/components": "0.19.4",
35
- "@scalar/helpers": "0.2.12",
34
+ "@scalar/helpers": "0.2.15",
35
+ "@scalar/components": "0.19.7",
36
36
  "@scalar/icons": "0.5.3",
37
37
  "@scalar/themes": "0.14.0",
38
- "@scalar/use-hooks": "0.3.7",
39
- "@scalar/workspace-store": "0.32.1"
38
+ "@scalar/workspace-store": "0.34.1",
39
+ "@scalar/use-hooks": "0.3.7"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@tailwindcss/vite": "^4.1.18",