@exegia/corpora-ui 0.27.0 → 0.28.0
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.
- package/dist-lib/components/composed/tree/constants.d.ts +0 -4
- package/dist-lib/index.js +18 -38
- package/dist-lib/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/blocks/profile/__tests__/profile-card-block.test.tsx +4 -2
- package/src/components/blocks/profile/profile-card-block.tsx +11 -11
- package/src/components/composed/tree/CLAUDE.md +23 -10
- package/src/components/composed/tree/__tests__/tree.test.tsx +18 -21
- package/src/components/composed/tree/constants.ts +0 -5
- package/src/components/composed/tree/tree-node.tsx +7 -1
- package/src/components/composed/tree/tree.tsx +9 -62
|
@@ -9,10 +9,6 @@ export declare const TREE_CLOSE_DURATION = 0.15;
|
|
|
9
9
|
export declare const TREE_MICRO_DURATION = 0.15;
|
|
10
10
|
/** Sidebar rail label reveal/hide when `collapsed` flips. */
|
|
11
11
|
export declare const TREE_COLLAPSE_DURATION = 0.2;
|
|
12
|
-
/** The collapsed rail's width in px — one `h-10 rounded-xl` icon row, edge
|
|
13
|
-
* to edge. Kept in sync with the `w-10` resting class the rail falls back to
|
|
14
|
-
* before its expanded width has been measured. */
|
|
15
|
-
export declare const RAIL_COLLAPSED_WIDTH = 40;
|
|
16
12
|
/** Rail label text fade — starts as the width growth is finishing, so the
|
|
17
13
|
* label never reads as clipped mid-grow. */
|
|
18
14
|
export declare const TREE_LABEL_REVEAL_DELAY = 0.01;
|
package/dist-lib/index.js
CHANGED
|
@@ -9224,7 +9224,8 @@ function la({ node: e, depth: t }) {
|
|
|
9224
9224
|
}, ae = /* @__PURE__ */ a(r, { children: [
|
|
9225
9225
|
w !== "section" && k && te,
|
|
9226
9226
|
w !== "section" && e.icon && /* @__PURE__ */ i("span", {
|
|
9227
|
-
className: q("flex size-4 shrink-0 items-center justify-center [&>svg]:size-4", h && "text-accent-foreground"),
|
|
9227
|
+
className: q("flex size-4 shrink-0 items-center justify-center transition-[width,height,color] duration-150 [&>svg]:size-4", l === "sidebar" && d && "size-5 text-foreground [&>svg]:size-5", h && "text-accent-foreground"),
|
|
9228
|
+
"data-slot": "tree-row-icon",
|
|
9228
9229
|
children: e.icon
|
|
9229
9230
|
}),
|
|
9230
9231
|
M,
|
|
@@ -9566,22 +9567,8 @@ function va(e) {
|
|
|
9566
9567
|
});
|
|
9567
9568
|
}
|
|
9568
9569
|
function ya({ tree: e, ariaLabel: t, className: n, renderTrailing: r }) {
|
|
9569
|
-
let { variant: a, items: o, sectioned: s, collapsed: c } = e, l = P.useRef(null)
|
|
9570
|
-
|
|
9571
|
-
let e = d.current, t = l.current;
|
|
9572
|
-
if (a !== "sidebar" || c || !e || !t) return;
|
|
9573
|
-
let n = () => {
|
|
9574
|
-
let n = t.style.width;
|
|
9575
|
-
t.style.width = "";
|
|
9576
|
-
let r = e.clientWidth;
|
|
9577
|
-
t.style.width = n, p(r);
|
|
9578
|
-
};
|
|
9579
|
-
n();
|
|
9580
|
-
let r = new ResizeObserver(n);
|
|
9581
|
-
return r.observe(e), () => r.disconnect();
|
|
9582
|
-
}, [a, c]);
|
|
9583
|
-
let m = a === "sidebar" && f !== null ? { width: c ? 40 : f } : void 0;
|
|
9584
|
-
function h(t) {
|
|
9570
|
+
let { variant: a, items: o, sectioned: s, collapsed: c } = e, l = P.useRef(null);
|
|
9571
|
+
function u(t) {
|
|
9585
9572
|
let n = t.target.closest("[data-slot=\"tree-row\"]"), r = l.current;
|
|
9586
9573
|
if (!n || !r) return;
|
|
9587
9574
|
let i = Array.from(r.querySelectorAll("[data-slot=\"tree-row\"]")), a = i.indexOf(n);
|
|
@@ -9613,27 +9600,21 @@ function ya({ tree: e, ariaLabel: t, className: n, renderTrailing: r }) {
|
|
|
9613
9600
|
break;
|
|
9614
9601
|
}
|
|
9615
9602
|
}
|
|
9616
|
-
let
|
|
9603
|
+
let d = pa(e.treeId), f = P.useMemo(() => ({
|
|
9617
9604
|
treeId: e.treeId,
|
|
9618
9605
|
renderTrailing: r,
|
|
9619
|
-
dnd:
|
|
9606
|
+
dnd: d
|
|
9620
9607
|
}), [
|
|
9621
9608
|
e.treeId,
|
|
9622
9609
|
r,
|
|
9623
|
-
|
|
9624
|
-
]),
|
|
9625
|
-
"aria-label":
|
|
9626
|
-
className: q("flex h-full min-w-0 flex-col", c
|
|
9627
|
-
initial: !1,
|
|
9628
|
-
animate: m,
|
|
9629
|
-
transition: u ? { duration: 0 } : {
|
|
9630
|
-
duration: zr,
|
|
9631
|
-
ease: Fr
|
|
9632
|
-
},
|
|
9610
|
+
d
|
|
9611
|
+
]), p = t ?? ga[a], m = /* @__PURE__ */ i("ul", {
|
|
9612
|
+
"aria-label": p,
|
|
9613
|
+
className: q("flex h-full w-full min-w-0 flex-col", c && "gap-y-2!", a === "files" ? "gap-px" : s ? "gap-3" : "gap-0.5"),
|
|
9633
9614
|
"data-collapsed": c ? "" : void 0,
|
|
9634
9615
|
"data-slot": "tree",
|
|
9635
9616
|
"data-variant": a,
|
|
9636
|
-
onKeyDown:
|
|
9617
|
+
onKeyDown: u,
|
|
9637
9618
|
ref: l,
|
|
9638
9619
|
role: "tree",
|
|
9639
9620
|
children: o.map((e) => /* @__PURE__ */ i(ua, {
|
|
@@ -9641,18 +9622,17 @@ function ya({ tree: e, ariaLabel: t, className: n, renderTrailing: r }) {
|
|
|
9641
9622
|
node: e
|
|
9642
9623
|
}, e.id))
|
|
9643
9624
|
});
|
|
9644
|
-
return a === "sidebar" && (
|
|
9645
|
-
value:
|
|
9625
|
+
return a === "sidebar" && (m = /* @__PURE__ */ i(kr, { children: m })), /* @__PURE__ */ i(Nr.Provider, {
|
|
9626
|
+
value: f,
|
|
9646
9627
|
children: a === "files" ? /* @__PURE__ */ i("div", {
|
|
9647
9628
|
className: q("min-w-0", n),
|
|
9648
9629
|
"data-slot": "tree-root",
|
|
9649
|
-
children:
|
|
9630
|
+
children: m
|
|
9650
9631
|
}) : /* @__PURE__ */ i("nav", {
|
|
9651
|
-
"aria-label":
|
|
9652
|
-
className: q("flex h-full min-w-0
|
|
9632
|
+
"aria-label": p,
|
|
9633
|
+
className: q("flex h-full w-full min-w-0", n),
|
|
9653
9634
|
"data-slot": "tree-root",
|
|
9654
|
-
|
|
9655
|
-
children: y
|
|
9635
|
+
children: m
|
|
9656
9636
|
})
|
|
9657
9637
|
});
|
|
9658
9638
|
}
|
|
@@ -14032,7 +14012,7 @@ function Rd({ user: e, items: t = Id, align: n = "center", side: r = "bottom", s
|
|
|
14032
14012
|
disabled: w,
|
|
14033
14013
|
render: /* @__PURE__ */ a(J, {
|
|
14034
14014
|
"aria-label": `${k}, account menu`,
|
|
14035
|
-
className: q("h-auto w-full justify-between py-1.5 pl-1.5 data-popup-open:bg-accent sm:h-auto", C && "-
|
|
14015
|
+
className: q("h-auto w-full justify-between py-1.5 pl-1.5 data-popup-open:bg-accent sm:h-auto", C && "h-10 w-full shrink-0 justify-center rounded-xl p-0 sm:h-10", b),
|
|
14036
14016
|
"data-collapsed": C ? "" : void 0,
|
|
14037
14017
|
"data-slot": "profile-card",
|
|
14038
14018
|
"data-variant": C ? "collapsed" : "expanded",
|