@scalar/sidebar 0.8.3 → 0.8.5
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.
|
@@ -51,6 +51,8 @@ type __VLS_Slots = {
|
|
|
51
51
|
}): unknown;
|
|
52
52
|
/** Places content at the top of the sidebar outside of the items list */
|
|
53
53
|
header?(): unknown;
|
|
54
|
+
/** Places content between the header and the items list */
|
|
55
|
+
spacer?(): unknown;
|
|
54
56
|
/** Places content at the bottom of the sidebar outside of the items list */
|
|
55
57
|
footer?(): unknown;
|
|
56
58
|
/** Places content before the first item in the items list */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScalarSidebar.vue.d.ts","sourceRoot":"","sources":["../../src/components/ScalarSidebar.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ScalarSidebar.vue.d.ts","sourceRoot":"","sources":["../../src/components/ScalarSidebar.vue"],"names":[],"mappings":"AA0KA,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,SAAS,CAAA;KACrD,CAAA;IACD;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;;;OAIG;IACH,WAAW,CAAC,EAAE,mBAAmB,CAAC,aAAa,CAAC,CAAA;IAChD;;;;OAIG;IACH,WAAW,CAAC,EAAE,mBAAmB,CAAC,aAAa,CAAC,CAAA;CACjD,CAAC;AA8BF,KAAK,WAAW,GAAG;IACjB,oCAAoC;IACpC,OAAO,CAAC,IAAI,OAAO,CAAA;IACnB,iEAAiE;IACjE,SAAS,CAAC,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,IAAI,CAAA;KAAE,GAAG,OAAO,CAAA;IAC1C,yEAAyE;IACzE,MAAM,CAAC,IAAI,OAAO,CAAA;IAClB,2DAA2D;IAC3D,MAAM,CAAC,IAAI,OAAO,CAAA;IAClB,4EAA4E;IAC5E,MAAM,CAAC,IAAI,OAAO,CAAA;IAClB,6DAA6D;IAC7D,MAAM,CAAC,IAAI,OAAO,CAAA;IAClB,2CAA2C;IAC3C,KAAK,CAAC,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,IAAI,CAAA;KAAE,GAAG,OAAO,CAAA;IACtC,2CAA2C;IAC3C,IAAI,CAAC,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,IAAI,CAAC;QAAC,IAAI,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO,CAAA;CACrD,CAAC;AA0KF,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,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as y, useSlots as g, createBlock as f, openBlock as i, unref as d, normalizeStyle as S, withCtx as
|
|
2
|
-
import { ScalarSidebar as v, ScalarSidebarItems as
|
|
3
|
-
import { filterItems as
|
|
1
|
+
import { defineComponent as y, useSlots as g, createBlock as f, openBlock as i, unref as d, normalizeStyle as S, withCtx as s, renderSlot as r, createVNode as b, createElementBlock as D, Fragment as $, renderList as E, createSlots as k, mergeProps as m, createElementVNode as I } from "vue";
|
|
2
|
+
import { ScalarSidebar as v, ScalarSidebarItems as F } from "@scalar/components";
|
|
3
|
+
import { filterItems as x } from "../helpers/filter-items.js";
|
|
4
4
|
import B from "./SidebarItem.vue.js";
|
|
5
5
|
const w = /* @__PURE__ */ y({
|
|
6
6
|
__name: "ScalarSidebar",
|
|
@@ -16,20 +16,20 @@ const w = /* @__PURE__ */ y({
|
|
|
16
16
|
},
|
|
17
17
|
emits: ["reorder", "selectItem", "toggleGroup"],
|
|
18
18
|
setup(e, { emit: c }) {
|
|
19
|
-
const
|
|
20
|
-
|
|
19
|
+
const n = c, a = g(), p = (t, l) => {
|
|
20
|
+
n("reorder", t, l);
|
|
21
21
|
};
|
|
22
22
|
return (t, l) => (i(), f(d(v), {
|
|
23
23
|
class: "flex min-h-0 flex-col",
|
|
24
24
|
style: S({ "--scalar-sidebar-indent": e.indent + "px" })
|
|
25
25
|
}, {
|
|
26
|
-
default:
|
|
26
|
+
default: s(() => [
|
|
27
27
|
r(t.$slots, "header"),
|
|
28
28
|
r(t.$slots, "default", {}, () => [
|
|
29
|
-
b(d(
|
|
30
|
-
default:
|
|
29
|
+
b(d(F), { class: "custom-scroll" }, {
|
|
30
|
+
default: s(() => [
|
|
31
31
|
r(t.$slots, "before"),
|
|
32
|
-
(i(!0),
|
|
32
|
+
(i(!0), D($, null, E(d(x)(e.layout, e.items), (u) => (i(), f(B, {
|
|
33
33
|
key: u.id,
|
|
34
34
|
isDraggable: e.isDraggable ?? e.layout === "client",
|
|
35
35
|
isDroppable: e.isDroppable,
|
|
@@ -39,26 +39,26 @@ const w = /* @__PURE__ */ y({
|
|
|
39
39
|
layout: e.layout,
|
|
40
40
|
options: e.options,
|
|
41
41
|
onOnDragEnd: p,
|
|
42
|
-
onSelectItem: l[0] || (l[0] = (o) =>
|
|
43
|
-
onToggleGroup: l[1] || (l[1] = (o) =>
|
|
44
|
-
},
|
|
42
|
+
onSelectItem: l[0] || (l[0] = (o) => n("selectItem", o)),
|
|
43
|
+
onToggleGroup: l[1] || (l[1] = (o) => n("toggleGroup", o))
|
|
44
|
+
}, k({ _: 2 }, [
|
|
45
45
|
a.decorator ? {
|
|
46
46
|
name: "decorator",
|
|
47
|
-
fn:
|
|
47
|
+
fn: s((o) => [
|
|
48
48
|
r(t.$slots, "decorator", m({ ref_for: !0 }, o))
|
|
49
49
|
]),
|
|
50
50
|
key: "0"
|
|
51
51
|
} : void 0,
|
|
52
52
|
a.empty ? {
|
|
53
53
|
name: "empty",
|
|
54
|
-
fn:
|
|
54
|
+
fn: s((o) => [
|
|
55
55
|
r(t.$slots, "empty", m({ ref_for: !0 }, o))
|
|
56
56
|
]),
|
|
57
57
|
key: "1"
|
|
58
58
|
} : void 0,
|
|
59
59
|
a.icon ? {
|
|
60
60
|
name: "icon",
|
|
61
|
-
fn:
|
|
61
|
+
fn: s((o) => [
|
|
62
62
|
r(t.$slots, "icon", m({ ref_for: !0 }, o))
|
|
63
63
|
]),
|
|
64
64
|
key: "2"
|
|
@@ -67,7 +67,9 @@ const w = /* @__PURE__ */ y({
|
|
|
67
67
|
]),
|
|
68
68
|
_: 3
|
|
69
69
|
}),
|
|
70
|
-
|
|
70
|
+
r(t.$slots, "spacer", {}, () => [
|
|
71
|
+
l[2] || (l[2] = I("div", { class: "flex-1" }, null, -1))
|
|
72
|
+
])
|
|
71
73
|
]),
|
|
72
74
|
r(t.$slots, "footer")
|
|
73
75
|
]),
|
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.8.
|
|
13
|
+
"version": "0.8.5",
|
|
14
14
|
"engines": {
|
|
15
15
|
"node": ">=22"
|
|
16
16
|
},
|
|
@@ -31,12 +31,12 @@
|
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"vue": "^3.5.26",
|
|
34
|
-
"@scalar/components": "0.20.
|
|
35
|
-
"@scalar/helpers": "0.3.0",
|
|
36
|
-
"@scalar/icons": "0.6.0",
|
|
34
|
+
"@scalar/components": "0.20.5",
|
|
37
35
|
"@scalar/themes": "0.15.0",
|
|
36
|
+
"@scalar/icons": "0.6.0",
|
|
38
37
|
"@scalar/use-hooks": "0.4.0",
|
|
39
|
-
"@scalar/workspace-store": "0.
|
|
38
|
+
"@scalar/workspace-store": "0.39.1",
|
|
39
|
+
"@scalar/helpers": "0.4.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@tailwindcss/vite": "^4.1.18",
|