@exegia/corpora-ui 0.13.0 → 0.14.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.
Files changed (29) hide show
  1. package/dist-lib/components/blocks/layout.d.ts +5 -0
  2. package/dist-lib/components/{agents → blocks/nav/sidebar}/ai-sidebar.d.ts +1 -1
  3. package/dist-lib/components/{agents → blocks/nav/sidebar}/sidebar-row.d.ts +1 -1
  4. package/dist-lib/components/blocks/shell/index.d.ts +2 -1
  5. package/dist-lib/components/blocks/shell/type.d.ts +1 -0
  6. package/dist-lib/index.d.ts +3 -1
  7. package/dist-lib/index.js +257 -260
  8. package/dist-lib/index.js.map +1 -1
  9. package/package.json +1 -1
  10. package/src/components/blocks/layout.ts +7 -0
  11. package/src/components/{agents → blocks/nav/sidebar}/ai-sidebar.tsx +13 -17
  12. package/src/components/{agents → blocks/nav/sidebar}/marquee-label.tsx +1 -1
  13. package/src/components/{agents → blocks/nav/sidebar}/sidebar-icon.tsx +1 -1
  14. package/src/components/{agents → blocks/nav/sidebar}/sidebar-row.tsx +4 -4
  15. package/src/components/{agents → blocks/nav/sidebar}/use-ai-sidebar.ts +2 -2
  16. package/src/components/{agents → blocks/nav/sidebar}/utils.ts +1 -1
  17. package/src/components/blocks/shell/index.ts +4 -1
  18. package/src/components/blocks/shell/type.ts +2 -22
  19. package/src/index.ts +3 -3
  20. /package/dist-lib/components/{agents → blocks/nav/sidebar}/__tests__/ai-sidebar.test.d.ts +0 -0
  21. /package/dist-lib/components/{agents → blocks/nav/sidebar}/index.d.ts +0 -0
  22. /package/dist-lib/components/{agents → blocks/nav/sidebar}/marquee-label.d.ts +0 -0
  23. /package/dist-lib/components/{agents → blocks/nav/sidebar}/sidebar-icon.d.ts +0 -0
  24. /package/dist-lib/components/{agents → blocks/nav/sidebar}/type.d.ts +0 -0
  25. /package/dist-lib/components/{agents → blocks/nav/sidebar}/use-ai-sidebar.d.ts +0 -0
  26. /package/dist-lib/components/{agents → blocks/nav/sidebar}/utils.d.ts +0 -0
  27. /package/src/components/{agents → blocks/nav/sidebar}/__tests__/ai-sidebar.test.tsx +0 -0
  28. /package/src/components/{agents → blocks/nav/sidebar}/index.ts +0 -0
  29. /package/src/components/{agents → blocks/nav/sidebar}/type.ts +0 -0
package/dist-lib/index.js CHANGED
@@ -3323,209 +3323,35 @@ function Er({ sections: e, activeId: t, onNavigate: n, header: r, footer: o, sho
3323
3323
  });
3324
3324
  }
3325
3325
  //#endregion
3326
- //#region src/components/blocks/shell/utils.ts
3327
- var Dr = 48;
3328
- //#endregion
3329
- //#region src/components/blocks/shell/shell-layout.tsx
3330
- function Or({ children: e, open: t, defaultOpen: n, onOpenChange: r, rightDrawer: o, rightOpen: s, defaultRightOpen: c, onRightOpenChange: l, variant: u = "desktop", className: d }) {
3331
- return /* @__PURE__ */ a(ar, {
3332
- className: J("block-full", d, "bg-linear-to-tr/increasing from-neutral-200 via-neutral-100 to-stone-200 dark:from-neutral-900 dark:via-neutral-950 dark:to-stone-950", "relative pr-2"),
3333
- defaultOpen: n,
3334
- defaultOpenRight: c,
3335
- onOpenChange: r,
3336
- onOpenRightChange: l,
3337
- open: t,
3338
- openRight: s,
3339
- style: { paddingTop: u === "desktop" ? 48 : 0 },
3340
- children: [
3341
- /* @__PURE__ */ i(sr, {
3342
- ariaLabel: "Primary navigation",
3343
- className: J(""),
3344
- collapsible: "icon",
3345
- role: "navigation",
3346
- variant: "inset"
3347
- }),
3348
- /* @__PURE__ */ a(dr, {
3349
- className: J("min-w-24 overflow-hidden border-t border-neutral-200 dark:border-neutral-700 inset-ring-1 inset-ring-neutral-50 dark:inset-ring-black bg-white dark:bg-card rounded-lg!", "mx-0!"),
3350
- children: [/* @__PURE__ */ a("header", {
3351
- className: "flex h-16 items-center justify-between gap-3 px-4 sm:px-6",
3352
- children: [/* @__PURE__ */ i("div", {
3353
- className: "flex min-w-0 items-center gap-3",
3354
- children: /* @__PURE__ */ i(cr, { children: /* @__PURE__ */ i(T, { className: "size-5" }) })
3355
- }), /* @__PURE__ */ i("div", {
3356
- className: "flex shrink-0 items-center gap-3",
3357
- children: /* @__PURE__ */ i(cr, {
3358
- "aria-label": "Toggle panel",
3359
- side: "right",
3360
- children: /* @__PURE__ */ i(O, { className: "size-5" })
3361
- })
3362
- })]
3363
- }), /* @__PURE__ */ i("div", {
3364
- className: "min-h-24 flex-1 overflow-auto",
3365
- children: e ?? /* @__PURE__ */ i(kr, {})
3366
- })]
3367
- }),
3368
- /* @__PURE__ */ i(sr, {
3369
- ariaLabel: "Secondary panel",
3370
- className: J("max-md:border-l max-md:border-neutral-200 max-md:bg-white dark:max-md:border-neutral-700 dark:max-md:bg-card"),
3371
- collapsible: "offcanvas",
3372
- panelClassName: J("top-2 ml-0 h-[calc(100%-1rem)] min-w-[calc(var(--sidebar-width))]", "rounded-lg border-t border-neutral-200 bg-white shadow-md inset-ring-1 inset-ring-neutral-50", "dark:border-neutral-700 dark:bg-card dark:inset-ring-black"),
3373
- role: "complementary",
3374
- side: "right",
3375
- variant: "inset",
3376
- children: o
3377
- })
3378
- ]
3379
- });
3380
- }
3381
- function kr() {
3382
- return /* @__PURE__ */ a("div", {
3383
- className: "grid gap-5",
3384
- children: [/* @__PURE__ */ i("div", {
3385
- className: "grid gap-5 lg:grid-cols-3",
3386
- children: Array.from({ length: 3 }).map((e, t) => /* @__PURE__ */ i("div", { className: "h-32 border border-border bg-background/60" }, t))
3387
- }), /* @__PURE__ */ i("div", { className: "h-72 border border-border bg-background/60" })]
3388
- });
3389
- }
3390
- //#endregion
3391
- //#region src/components/blocks/profile/profile-card-block.tsx
3392
- var Ar = [
3393
- {
3394
- type: "label",
3395
- label: "Management"
3396
- },
3397
- {
3398
- id: "profile",
3399
- label: "Profile",
3400
- icon: /* @__PURE__ */ i(M, { "aria-hidden": "true" })
3401
- },
3402
- {
3403
- id: "settings",
3404
- label: "Settings",
3405
- icon: /* @__PURE__ */ i(A, { "aria-hidden": "true" })
3406
- },
3407
- { type: "separator" },
3408
- {
3409
- id: "teams",
3410
- label: "Teams",
3411
- icon: /* @__PURE__ */ i(ee, { "aria-hidden": "true" })
3412
- },
3413
- {
3414
- id: "invite",
3415
- label: "Invite",
3416
- icon: /* @__PURE__ */ i(N, { "aria-hidden": "true" })
3417
- },
3418
- { type: "separator" },
3419
- {
3420
- id: "sign-out",
3421
- label: "Log out",
3422
- icon: /* @__PURE__ */ i(C, { "aria-hidden": "true" }),
3423
- variant: "destructive"
3424
- }
3425
- ];
3426
- function jr(e) {
3427
- let t = [], n = { actions: [] };
3428
- for (let r of e) r.type === "separator" ? (t.push(n), n = { actions: [] }) : r.type === "label" ? n.label = r.label : n.actions.push(r);
3429
- return t.push(n), t.filter((e) => e.actions.length > 0 || e.label !== void 0);
3430
- }
3431
- function Mr({ user: e, items: t = Ar, align: n = "center", side: r = "bottom", sideOffset: o = 8, menuWidth: s = "content", open: c, defaultOpen: l, onOpenChange: u, sound: d = !0, onError: f, className: p }) {
3432
- let [h, g] = P.useState(null), _ = P.useRef(!0);
3433
- P.useEffect(() => (_.current = !0, () => {
3434
- _.current = !1;
3435
- }), []);
3436
- let v = P.useMemo(() => jr(t), [t]);
3437
- function y(e) {
3438
- let t = e.onSelect?.();
3439
- t instanceof Promise && (g(e.id), t.catch((e) => f?.(e)).finally(() => {
3440
- _.current && g(null);
3441
- }));
3442
- }
3443
- let b = h !== null;
3444
- return /* @__PURE__ */ a(Ct, {
3445
- defaultOpen: l,
3446
- onOpenChange: (e, t) => {
3447
- d && et(e ? "bloom" : "droplet"), u?.(e, t);
3448
- },
3449
- open: c,
3450
- children: [/* @__PURE__ */ i(Tt, {
3451
- disabled: b,
3452
- render: /* @__PURE__ */ a(Y, {
3453
- "aria-label": `${e.name}${e.username ? ` ${e.username}` : ""}, account menu`,
3454
- className: J("h-auto w-full justify-between py-1.5 pl-1.5 data-popup-open:bg-accent sm:h-auto", p),
3455
- "data-slot": "profile-card",
3456
- loading: b,
3457
- sound: d,
3458
- variant: "ghost",
3459
- children: [/* @__PURE__ */ a("span", {
3460
- className: "flex w-full min-w-0 items-center justify-start gap-2",
3461
- children: [/* @__PURE__ */ i(en, {
3462
- alt: "",
3463
- initials: e.initials,
3464
- name: e.name,
3465
- src: e.avatar
3466
- }), /* @__PURE__ */ a("span", {
3467
- className: "flex min-w-0 flex-col text-left",
3468
- children: [/* @__PURE__ */ i("span", {
3469
- className: "truncate font-medium",
3470
- children: e.name
3471
- }), e.username ? /* @__PURE__ */ i("span", {
3472
- className: "truncate text-xs font-normal text-muted-foreground",
3473
- children: e.username
3474
- }) : null]
3475
- })]
3476
- }), /* @__PURE__ */ i(m, {
3477
- "aria-hidden": "true",
3478
- className: "size-3.5"
3479
- })]
3480
- })
3481
- }), /* @__PURE__ */ i(Et, {
3482
- align: n,
3483
- className: J(s === "card" ? "w-(--anchor-width)" : "min-w-44!", "origin-(--transform-origin) transition-[opacity,scale,translate] duration-150 ease-smooth-out data-ending-style:scale-98 data-ending-style:opacity-0 data-ending-style:duration-100 data-starting-style:scale-98 data-starting-style:opacity-0 data-[side=bottom]:data-ending-style:-translate-y-1 data-[side=bottom]:data-starting-style:-translate-y-1 data-[side=top]:data-ending-style:translate-y-1 data-[side=top]:data-starting-style:translate-y-1 motion-reduce:transition-none"),
3484
- side: r,
3485
- sideOffset: o,
3486
- children: v.map((e, t) => /* @__PURE__ */ a(P.Fragment, { children: [t > 0 ? /* @__PURE__ */ i(Pt, {}) : null, /* @__PURE__ */ a(Dt, { children: [e.label ? /* @__PURE__ */ i(Nt, { children: e.label }) : null, e.actions.map((e) => /* @__PURE__ */ a(Ot, {
3487
- disabled: e.disabled,
3488
- onClick: () => y(e),
3489
- variant: e.variant,
3490
- children: [
3491
- e.icon,
3492
- /* @__PURE__ */ i("span", { children: e.label }),
3493
- e.shortcut ? /* @__PURE__ */ i(Ft, { children: e.shortcut }) : null
3494
- ]
3495
- }, e.id))] })] }, e.label ?? `group-${e.actions[0]?.id}`))
3496
- })]
3497
- });
3498
- }
3499
- //#endregion
3500
- //#region src/components/agents/utils.ts
3501
- var Nr = {
3326
+ //#region src/components/blocks/nav/sidebar/utils.ts
3327
+ var Dr = {
3502
3328
  duration: .16,
3503
3329
  ease: Dn
3504
3330
  };
3505
- function Pr(e) {
3331
+ function Or(e) {
3506
3332
  return e.kind === "folder" || e.kind === "project";
3507
3333
  }
3508
- function Fr(e, t, n = 0, r = null) {
3334
+ function kr(e, t, n = 0, r = null) {
3509
3335
  return e.flatMap((e) => {
3510
3336
  let i = {
3511
3337
  item: e,
3512
3338
  depth: n,
3513
3339
  parentId: r
3514
3340
  };
3515
- return !e.children?.length || !t.has(e.id) ? [i] : [i, ...Fr(e.children, t, n + 1, e.id)];
3341
+ return !e.children?.length || !t.has(e.id) ? [i] : [i, ...kr(e.children, t, n + 1, e.id)];
3516
3342
  });
3517
3343
  }
3518
- function Ir(e, t) {
3344
+ function Ar(e, t) {
3519
3345
  for (let n of e) {
3520
3346
  if (n.id === t) return n;
3521
- let e = n.children ? Ir(n.children, t) : void 0;
3347
+ let e = n.children ? Ar(n.children, t) : void 0;
3522
3348
  if (e) return e;
3523
3349
  }
3524
3350
  }
3525
- function Lr(e, t) {
3526
- return e.id === t || e.children?.some((e) => Lr(e, t)) === !0;
3351
+ function jr(e, t) {
3352
+ return e.id === t || e.children?.some((e) => jr(e, t)) === !0;
3527
3353
  }
3528
- function Rr(e, t) {
3354
+ function Mr(e, t) {
3529
3355
  let n, r = [];
3530
3356
  for (let i of e) {
3531
3357
  if (i.id === t) {
@@ -3533,7 +3359,7 @@ function Rr(e, t) {
3533
3359
  continue;
3534
3360
  }
3535
3361
  if (i.children?.length) {
3536
- let e = Rr(i.children, t);
3362
+ let e = Mr(i.children, t);
3537
3363
  if (e.removed) {
3538
3364
  n = e.removed, r.push({
3539
3365
  ...i,
@@ -3549,7 +3375,7 @@ function Rr(e, t) {
3549
3375
  removed: n
3550
3376
  };
3551
3377
  }
3552
- function zr(e, t, n, r) {
3378
+ function Nr(e, t, n, r) {
3553
3379
  if (n === null) return [...e, t];
3554
3380
  let i = [];
3555
3381
  for (let a of e) {
@@ -3562,32 +3388,32 @@ function zr(e, t, n, r) {
3562
3388
  }
3563
3389
  a.children?.length ? i.push({
3564
3390
  ...a,
3565
- children: zr(a.children, t, n, r)
3391
+ children: Nr(a.children, t, n, r)
3566
3392
  }) : i.push(a);
3567
3393
  }
3568
3394
  return i;
3569
3395
  }
3570
- function Br(e, t) {
3571
- let n = Ir(e, t.itemId);
3572
- if (!n || n.disabled || t.targetId && Lr(n, t.targetId)) return null;
3573
- let r = t.targetId ? Ir(e, t.targetId) : void 0;
3574
- if (t.position === "inside" && (!r || r.disabled || !Pr(r))) return null;
3575
- let i = Rr(e, t.itemId);
3576
- return i.removed ? zr(i.items, i.removed, t.targetId, t.position) : null;
3396
+ function Pr(e, t) {
3397
+ let n = Ar(e, t.itemId);
3398
+ if (!n || n.disabled || t.targetId && jr(n, t.targetId)) return null;
3399
+ let r = t.targetId ? Ar(e, t.targetId) : void 0;
3400
+ if (t.position === "inside" && (!r || r.disabled || !Or(r))) return null;
3401
+ let i = Mr(e, t.itemId);
3402
+ return i.removed ? Nr(i.items, i.removed, t.targetId, t.position) : null;
3577
3403
  }
3578
- function Vr(e, t, n) {
3404
+ function Fr(e, t, n) {
3579
3405
  return e.map((e) => ({
3580
3406
  ...e,
3581
3407
  label: e.id === t ? n : e.label,
3582
- children: e.children ? Vr(e.children, t, n) : void 0
3408
+ children: e.children ? Fr(e.children, t, n) : void 0
3583
3409
  }));
3584
3410
  }
3585
3411
  //#endregion
3586
- //#region src/components/agents/use-ai-sidebar.ts
3587
- function Hr({ items: e, defaultItems: t = [], onItemsChange: n, onMove: r, onMoveError: i, onRename: a, activeId: o, defaultActiveId: s = null, onActiveChange: c, defaultExpandedIds: l = [] }) {
3412
+ //#region src/components/blocks/nav/sidebar/use-ai-sidebar.ts
3413
+ function Ir({ items: e, defaultItems: t = [], onItemsChange: n, onMove: r, onMoveError: i, onRename: a, activeId: o, defaultActiveId: s = null, onActiveChange: c, defaultExpandedIds: l = [] }) {
3588
3414
  let [u, d] = W(e ?? t), [f, p] = W(s), [m, h] = W(() => new Set(l)), [g, _] = W(o ?? s), [v, y] = W(null), [b, x] = W(null), [S, C] = W(null), [w, T] = W(null), [E, D] = W(null), O = re(), [k, A] = W(""), j = U(/* @__PURE__ */ new Map()), M = U(!1), N = u, ee = o ?? f, [te, P] = W(e);
3589
3415
  e !== te && (P(e), e && d(e));
3590
- let F = ae(() => Fr(N, m), [m, N]);
3416
+ let F = ae(() => kr(N, m), [m, N]);
3591
3417
  if (!(g !== null && F.some((e) => e.item.id === g))) {
3592
3418
  let e = F[0]?.item.id ?? null;
3593
3419
  g !== e && _(e);
@@ -3606,10 +3432,10 @@ function Hr({ items: e, defaultItems: t = [], onItemsChange: n, onMove: r, onMov
3606
3432
  A("Wait for the current move to finish.");
3607
3433
  return;
3608
3434
  }
3609
- let t = N, n = Br(t, e);
3435
+ let t = N, n = Pr(t, e);
3610
3436
  if (!n || n === t) return;
3611
3437
  M.current = !0, I(n), x(null), y(null);
3612
- let a = Ir(t, e.itemId), o = e.targetId ? Ir(t, e.targetId) : null;
3438
+ let a = Ar(t, e.itemId), o = e.targetId ? Ar(t, e.targetId) : null;
3613
3439
  A(o ? `Moved ${a?.label ?? "item"} ${e.position} ${o.label}.` : `Moved ${a?.label ?? "item"} to the top level.`);
3614
3440
  try {
3615
3441
  await r?.(e);
@@ -3676,7 +3502,7 @@ function Hr({ items: e, defaultItems: t = [], onItemsChange: n, onMove: r, onMov
3676
3502
  });
3677
3503
  return;
3678
3504
  }
3679
- if (a && e.key === "ArrowRight" && r && Pr(r.item)) {
3505
+ if (a && e.key === "ArrowRight" && r && Or(r.item)) {
3680
3506
  e.preventDefault(), h((e) => new Set(e).add(r.item.id)), L({
3681
3507
  itemId: t.item.id,
3682
3508
  targetId: r.item.id,
@@ -3692,7 +3518,7 @@ function Hr({ items: e, defaultItems: t = [], onItemsChange: n, onMove: r, onMov
3692
3518
  });
3693
3519
  return;
3694
3520
  }
3695
- e.key === "ArrowRight" && Pr(t.item) ? (e.preventDefault(), m.has(t.item.id) ? i?.parentId === t.item.id && R(i.item.id) : B(t.item.id)) : e.key === "ArrowLeft" ? (e.preventDefault(), m.has(t.item.id) ? B(t.item.id) : t.parentId && R(t.parentId)) : e.key === "Enter" || e.key === " " ? (e.preventDefault(), Pr(t.item) ? B(t.item.id) : z(t.item.id)) : e.key === "F2" ? (e.preventDefault(), T(t.item.id)) : (e.key === "ContextMenu" || e.shiftKey && e.key === "F10") && (e.preventDefault(), C(t.item.id));
3521
+ e.key === "ArrowRight" && Or(t.item) ? (e.preventDefault(), m.has(t.item.id) ? i?.parentId === t.item.id && R(i.item.id) : B(t.item.id)) : e.key === "ArrowLeft" ? (e.preventDefault(), m.has(t.item.id) ? B(t.item.id) : t.parentId && R(t.parentId)) : e.key === "Enter" || e.key === " " ? (e.preventDefault(), Or(t.item) ? B(t.item.id) : z(t.item.id)) : e.key === "F2" ? (e.preventDefault(), T(t.item.id)) : (e.key === "ContextMenu" || e.shiftKey && e.key === "F10") && (e.preventDefault(), C(t.item.id));
3696
3522
  }, [
3697
3523
  m,
3698
3524
  F,
@@ -3721,10 +3547,10 @@ function Hr({ items: e, defaultItems: t = [], onItemsChange: n, onMove: r, onMov
3721
3547
  y(null), x(null);
3722
3548
  }, []), le = V((e, t) => {
3723
3549
  if (!v || v === t.item.id) return;
3724
- let n = Ir(N, v);
3725
- if (n && Lr(n, t.item.id)) return;
3550
+ let n = Ar(N, v);
3551
+ if (n && jr(n, t.item.id)) return;
3726
3552
  e.preventDefault(), e.stopPropagation();
3727
- let r = e.currentTarget.getBoundingClientRect(), i = (e.clientY - r.top) / r.height, a = !t.item.disabled && Pr(t.item) && i >= .25 && i <= .75 ? "inside" : i < .5 ? "before" : "after";
3553
+ let r = e.currentTarget.getBoundingClientRect(), i = (e.clientY - r.top) / r.height, a = !t.item.disabled && Or(t.item) && i >= .25 && i <= .75 ? "inside" : i < .5 ? "before" : "after";
3728
3554
  x({
3729
3555
  id: t.item.id,
3730
3556
  position: a
@@ -3733,7 +3559,7 @@ function Hr({ items: e, defaultItems: t = [], onItemsChange: n, onMove: r, onMov
3733
3559
  let n = t.trim();
3734
3560
  if (T(null), !n || n === e.item.label) return;
3735
3561
  let r = N;
3736
- I(Vr(r, e.item.id, n)), Promise.resolve(a?.(e.item, n)).catch(() => {
3562
+ I(Fr(r, e.item.id, n)), Promise.resolve(a?.(e.item, n)).catch(() => {
3737
3563
  I(r), A(`Rename failed. ${e.item.label} was restored.`);
3738
3564
  });
3739
3565
  }, [
@@ -3777,13 +3603,13 @@ function Hr({ items: e, defaultItems: t = [], onItemsChange: n, onMove: r, onMov
3777
3603
  };
3778
3604
  }
3779
3605
  //#endregion
3780
- //#region src/components/agents/sidebar-icon.tsx
3781
- function Ur(e, t) {
3606
+ //#region src/components/blocks/nav/sidebar/sidebar-icon.tsx
3607
+ function Lr(e, t) {
3782
3608
  return /* @__PURE__ */ i(e.kind === "folder" || e.kind === "project" ? t ? b : y : e.kind === "bookmark" ? u : _, { className: "size-4" });
3783
3609
  }
3784
3610
  //#endregion
3785
- //#region src/components/agents/marquee-label.tsx
3786
- function Wr({ active: e, children: t }) {
3611
+ //#region src/components/blocks/nav/sidebar/marquee-label.tsx
3612
+ function Rr({ active: e, children: t }) {
3787
3613
  let n = be() ?? !1, r = U(null), o = U(null), [s, c] = W(0);
3788
3614
  H(() => {
3789
3615
  let e = () => {
@@ -3806,7 +3632,7 @@ function Wr({ active: e, children: t }) {
3806
3632
  ease: "linear",
3807
3633
  repeat: Infinity,
3808
3634
  repeatDelay: 2
3809
- } : Nr,
3635
+ } : Dr,
3810
3636
  children: [/* @__PURE__ */ i("span", {
3811
3637
  ref: o,
3812
3638
  children: t
@@ -3819,10 +3645,10 @@ function Wr({ active: e, children: t }) {
3819
3645
  }
3820
3646
  //#endregion
3821
3647
  //#region src/components/motion/popover-position.ts
3822
- function Gr(e, t) {
3648
+ function zr(e, t) {
3823
3649
  return e?.trigger.left === t.trigger.left && e.trigger.top === t.trigger.top && e.trigger.width === t.trigger.width && e.trigger.height === t.trigger.height && e.content.width === t.content.width && e.content.height === t.content.height;
3824
3650
  }
3825
- function Kr(e, t, n) {
3651
+ function Br(e, t, n) {
3826
3652
  let [r, i] = W(null), a = V(() => {
3827
3653
  let n = e.current, r = t.current;
3828
3654
  if (!n || !r) return;
@@ -3838,7 +3664,7 @@ function Kr(e, t, n) {
3838
3664
  height: r.offsetHeight
3839
3665
  }
3840
3666
  };
3841
- i((e) => Gr(e, o) ? e : o);
3667
+ i((e) => zr(e, o) ? e : o);
3842
3668
  }, [t, e]);
3843
3669
  return ie(() => {
3844
3670
  if (a(), !n) return;
@@ -3855,13 +3681,13 @@ function Kr(e, t, n) {
3855
3681
  }
3856
3682
  //#endregion
3857
3683
  //#region src/components/motion/popover-morph.tsx
3858
- var qr = L(null);
3859
- function Jr(e) {
3860
- let t = ne(qr);
3684
+ var Vr = L(null);
3685
+ function Hr(e) {
3686
+ let t = ne(Vr);
3861
3687
  if (!t) throw Error(`${e} must be used within <MorphPopover>`);
3862
3688
  return t;
3863
3689
  }
3864
- function Yr({ children: e, open: t, defaultOpen: n = !1, onOpenChange: r, className: a }) {
3690
+ function Ur({ children: e, open: t, defaultOpen: n = !1, onOpenChange: r, className: a }) {
3865
3691
  let o = re(), s = U(null), c = U(null), l = U(null), [u, d] = W(n), f = t !== void 0, p = f ? t : u, m = V((e) => {
3866
3692
  f || d(e), r?.(e);
3867
3693
  }, [f, r]), h = V(() => m(!p), [m, p]);
@@ -3892,7 +3718,7 @@ function Yr({ children: e, open: t, defaultOpen: n = !1, onOpenChange: r, classN
3892
3718
  h,
3893
3719
  o
3894
3720
  ]);
3895
- return /* @__PURE__ */ i(qr.Provider, {
3721
+ return /* @__PURE__ */ i(Vr.Provider, {
3896
3722
  value: g,
3897
3723
  children: /* @__PURE__ */ i("div", {
3898
3724
  ref: s,
@@ -3901,18 +3727,18 @@ function Yr({ children: e, open: t, defaultOpen: n = !1, onOpenChange: r, classN
3901
3727
  })
3902
3728
  });
3903
3729
  }
3904
- function Xr(...e) {
3730
+ function Wr(...e) {
3905
3731
  return (t) => {
3906
3732
  for (let n of e) typeof n == "function" ? n(t) : n && typeof n == "object" && (n.current = t);
3907
3733
  };
3908
3734
  }
3909
- function Zr({ children: e }) {
3910
- let t = Jr("MorphPopoverTrigger");
3735
+ function Gr({ children: e }) {
3736
+ let t = Hr("MorphPopoverTrigger");
3911
3737
  if (!B(e)) return e;
3912
3738
  let n = e, r = n.props.onClick, i = n.props.ref;
3913
3739
  return I(n, {
3914
3740
  id: t.triggerId,
3915
- ref: Xr(i, (e) => {
3741
+ ref: Wr(i, (e) => {
3916
3742
  t.triggerRef.current = e;
3917
3743
  }),
3918
3744
  onClick: (e) => {
@@ -3923,16 +3749,16 @@ function Zr({ children: e }) {
3923
3749
  "aria-controls": t.open ? t.contentId : void 0
3924
3750
  });
3925
3751
  }
3926
- var Qr = (e, t) => `${e === "bottom" ? "top" : "bottom"} ${t === "end" ? "right" : "left"}`;
3927
- function $r(e, t, n) {
3752
+ var Kr = (e, t) => `${e === "bottom" ? "top" : "bottom"} ${t === "end" ? "right" : "left"}`;
3753
+ function qr(e, t, n) {
3928
3754
  return `inset(${e === "bottom" ? "0%" : "92%"} ${t === "end" ? "0%" : "92%"} ${e === "bottom" ? "92%" : "0%"} ${t === "end" ? "92%" : "0%"} round ${n}px)`;
3929
3755
  }
3930
- var ei = (e) => `inset(0% 0% 0% 0% round ${e}px)`, ti = {
3756
+ var Jr = (e) => `inset(0% 0% 0% 0% round ${e}px)`, Yr = {
3931
3757
  duration: .32,
3932
3758
  ease: Dn
3933
3759
  };
3934
- function ni({ children: e, side: t = "bottom", align: n = "end", sideOffset: r = 8, radius: a = 16, className: o }) {
3935
- let s = Jr("MorphPopoverContent"), { contentId: c, setContentRef: l, triggerId: u } = s, d = be() ?? !1, [f, p] = W(!1), m = Kr(s.triggerRef, s.contentRef, f && s.open);
3760
+ function Xr({ children: e, side: t = "bottom", align: n = "end", sideOffset: r = 8, radius: a = 16, className: o }) {
3761
+ let s = Hr("MorphPopoverContent"), { contentId: c, setContentRef: l, triggerId: u } = s, d = be() ?? !1, [f, p] = W(!1), m = Br(s.triggerRef, s.contentRef, f && s.open);
3936
3762
  H(() => p(!0), []);
3937
3763
  let h = m ? n === "end" ? m.trigger.left + m.trigger.width - m.content.width : m.trigger.left : 0, g = m ? t === "bottom" ? m.trigger.top + m.trigger.height + r : m.trigger.top - m.content.height - r : 0, _ = d ? void 0 : {
3938
3764
  hidden: {
@@ -3947,12 +3773,12 @@ function ni({ children: e, side: t = "bottom", align: n = "end", sideOffset: r =
3947
3773
  }
3948
3774
  }, v = d ? void 0 : {
3949
3775
  hidden: {
3950
- clipPath: $r(t, n, a),
3951
- transition: ti
3776
+ clipPath: qr(t, n, a),
3777
+ transition: Yr
3952
3778
  },
3953
3779
  show: {
3954
- clipPath: ei(a),
3955
- transition: ti
3780
+ clipPath: Jr(a),
3781
+ transition: Yr
3956
3782
  }
3957
3783
  };
3958
3784
  return f ? Te(/* @__PURE__ */ i(K, { children: s.open ? /* @__PURE__ */ i(q.div, {
@@ -3966,7 +3792,7 @@ function ni({ children: e, side: t = "bottom", align: n = "end", sideOffset: r =
3966
3792
  left: h,
3967
3793
  top: g,
3968
3794
  visibility: m ? "visible" : "hidden",
3969
- transformOrigin: Qr(t, n)
3795
+ transformOrigin: Kr(t, n)
3970
3796
  },
3971
3797
  className: "fixed z-[9999] [filter:drop-shadow(0_10px_18px_rgba(0,0,0,0.14))]",
3972
3798
  children: /* @__PURE__ */ i(q.div, {
@@ -3982,8 +3808,8 @@ function ni({ children: e, side: t = "bottom", align: n = "end", sideOffset: r =
3982
3808
  }) : null }), document.body) : null;
3983
3809
  }
3984
3810
  //#endregion
3985
- //#region src/components/agents/sidebar-row.tsx
3986
- var ri = {
3811
+ //#region src/components/blocks/nav/sidebar/sidebar-row.tsx
3812
+ var Zr = {
3987
3813
  initial: {
3988
3814
  opacity: 0,
3989
3815
  filter: "blur(6px)"
@@ -3996,13 +3822,13 @@ var ri = {
3996
3822
  opacity: 0,
3997
3823
  filter: "blur(6px)"
3998
3824
  }
3999
- }, ii = {
3825
+ }, Qr = {
4000
3826
  initial: { opacity: 0 },
4001
3827
  animate: { opacity: 1 },
4002
3828
  exit: (e) => e ? {} : { opacity: 0 }
4003
3829
  };
4004
- function ai({ row: e, active: t, expanded: n, focused: r, draggingId: o, dropTarget: s, menuOpen: c, renaming: l, onDragEnd: u, onDragOver: d, onDragStart: p, onDrop: m, onFocus: h, onKeyDown: g, onMenuOpenChange: _, onRenameCancel: v, onRenameCommit: y, onRenameStart: b, onSelect: x, onToggle: S, hoverActive: C = !1, hoverPill: w = !1, hoverLayoutId: T, onHoverChange: D, renderIcon: O, renderMenu: A, renderActionsTrigger: j, setRef: M }) {
4005
- let N = be() ?? !1, [ee, te] = W(!1), P = U(null), F = U(!1), L = U(!1), [R, z] = W(e.item.label), B = Pr(e.item), V = o === e.item.id, ne = s?.id === e.item.id ? s.position : null;
3830
+ function $r({ row: e, active: t, expanded: n, focused: r, draggingId: o, dropTarget: s, menuOpen: c, renaming: l, onDragEnd: u, onDragOver: d, onDragStart: p, onDrop: m, onFocus: h, onKeyDown: g, onMenuOpenChange: _, onRenameCancel: v, onRenameCommit: y, onRenameStart: b, onSelect: x, onToggle: S, hoverActive: C = !1, hoverPill: w = !1, hoverLayoutId: T, onHoverChange: D, renderIcon: O, renderMenu: A, renderActionsTrigger: j, setRef: M }) {
3831
+ let N = be() ?? !1, [ee, te] = W(!1), P = U(null), F = U(!1), L = U(!1), [R, z] = W(e.item.label), B = Or(e.item), V = o === e.item.id, ne = s?.id === e.item.id ? s.position : null;
4006
3832
  H(() => {
4007
3833
  l && (F.current = !1, requestAnimationFrame(() => {
4008
3834
  P.current?.focus(), P.current?.select();
@@ -4069,7 +3895,7 @@ function ai({ row: e, active: t, expanded: n, focused: r, draggingId: o, dropTar
4069
3895
  custom: C,
4070
3896
  children: C ? /* @__PURE__ */ i(q.span, {
4071
3897
  "aria-hidden": "true",
4072
- variants: N ? ii : ri,
3898
+ variants: N ? Qr : Zr,
4073
3899
  initial: "initial",
4074
3900
  animate: "animate",
4075
3901
  exit: "exit",
@@ -4085,7 +3911,7 @@ function ai({ row: e, active: t, expanded: n, focused: r, draggingId: o, dropTar
4085
3911
  /* @__PURE__ */ i("span", {
4086
3912
  "aria-hidden": "true",
4087
3913
  className: "relative grid size-5 shrink-0 place-items-center",
4088
- children: O?.(e.item) ?? Ur(e.item, n)
3914
+ children: O?.(e.item) ?? Lr(e.item, n)
4089
3915
  }),
4090
3916
  l ? /* @__PURE__ */ i("input", {
4091
3917
  ref: P,
@@ -4102,14 +3928,14 @@ function ai({ row: e, active: t, expanded: n, focused: r, draggingId: o, dropTar
4102
3928
  e.stopPropagation(), e.key === "Enter" && (F.current = !0, y(R)), e.key === "Escape" && (F.current = !0, v());
4103
3929
  },
4104
3930
  className: "relative h-7 min-w-0 flex-1 text-sm text-foreground outline-none focus-visible:ring-0 focus-visible:ring-ring"
4105
- }) : /* @__PURE__ */ i(Wr, {
3931
+ }) : /* @__PURE__ */ i(Rr, {
4106
3932
  active: ee || c,
4107
3933
  children: e.item.label
4108
3934
  }),
4109
- !l && !e.item.disabled ? /* @__PURE__ */ a(Yr, {
3935
+ !l && !e.item.disabled ? /* @__PURE__ */ a(Ur, {
4110
3936
  open: c,
4111
3937
  onOpenChange: _,
4112
- children: [/* @__PURE__ */ i(Zr, { children: (() => {
3938
+ children: [/* @__PURE__ */ i(Gr, { children: (() => {
4113
3939
  let t = j?.(e.item);
4114
3940
  if (t) {
4115
3941
  let e = t.props.onClick;
@@ -4132,7 +3958,7 @@ function ai({ row: e, active: t, expanded: n, focused: r, draggingId: o, dropTar
4132
3958
  className: "size-4"
4133
3959
  })
4134
3960
  });
4135
- })() }), /* @__PURE__ */ i(ni, {
3961
+ })() }), /* @__PURE__ */ i(Xr, {
4136
3962
  side: "bottom",
4137
3963
  align: "end",
4138
3964
  sideOffset: 8,
@@ -4152,9 +3978,9 @@ function ai({ row: e, active: t, expanded: n, focused: r, draggingId: o, dropTar
4152
3978
  });
4153
3979
  }
4154
3980
  //#endregion
4155
- //#region src/components/agents/ai-sidebar.tsx
4156
- function oi({ renderIcon: e, renderMenu: t, renderActionsTrigger: n, ariaLabel: o = "Resources", className: s, ...c }) {
4157
- let { flat: l, selectedId: u, expandedIds: d, focusedId: f, setFocusedId: p, draggingId: m, dropTarget: h, hoveredId: g, hoverLayoutId: _, handleRowHover: v, clearHover: y, menuOpenId: b, renamingId: x, setRenamingId: S, announcement: C, select: w, toggle: T, handleKeyDown: E, handleRootDragOver: D, handleDrop: O, handleRowDragStart: k, handleRowDragEnd: A, handleRowDragOver: j, commitRename: M, handleMenuOpenChange: N, setRowRef: ee } = Hr(c);
3981
+ //#region src/components/blocks/nav/sidebar/ai-sidebar.tsx
3982
+ function ei({ renderIcon: e, renderMenu: t, renderActionsTrigger: n, ariaLabel: o = "Resources", className: s, ...c }) {
3983
+ let { flat: l, selectedId: u, expandedIds: d, focusedId: f, setFocusedId: p, draggingId: m, dropTarget: h, hoveredId: g, hoverLayoutId: _, handleRowHover: v, clearHover: y, menuOpenId: b, renamingId: x, setRenamingId: S, announcement: C, select: w, toggle: T, handleKeyDown: E, handleRootDragOver: D, handleDrop: O, handleRowDragStart: k, handleRowDragEnd: A, handleRowDragOver: j, commitRename: M, handleMenuOpenChange: N, setRowRef: ee } = Ir(c);
4158
3984
  return /* @__PURE__ */ a(r, { children: [/* @__PURE__ */ a("div", {
4159
3985
  role: "tree",
4160
3986
  "aria-label": o,
@@ -4162,10 +3988,10 @@ function oi({ renderIcon: e, renderMenu: t, renderActionsTrigger: n, ariaLabel:
4162
3988
  onDragOver: D,
4163
3989
  onDrop: O,
4164
3990
  onMouseLeave: y,
4165
- className: J("relative flex min-w-0 flex-col gap-0.5 [overflow-anchor:none] group-data-[state=collapsed]/sidebar:hidden", m && "select-none pb-9", s),
3991
+ className: J("relative min-w-0 flex-col gap-0.5 [overflow-anchor:none] group-data-[state=collapsed]/sidebar:hidden", m && "pb-9 select-none", s),
4166
3992
  children: [/* @__PURE__ */ i(K, {
4167
3993
  initial: !1,
4168
- children: l.map((r) => /* @__PURE__ */ i(ai, {
3994
+ children: l.map((r) => /* @__PURE__ */ i($r, {
4169
3995
  row: r,
4170
3996
  active: u === r.item.id,
4171
3997
  expanded: d.has(r.item.id),
@@ -4195,12 +4021,12 @@ function oi({ renderIcon: e, renderMenu: t, renderActionsTrigger: n, ariaLabel:
4195
4021
  renderActionsTrigger: n,
4196
4022
  setRef: (e) => ee(r.item.id, e)
4197
4023
  }, r.item.id))
4198
- }), m ? /* @__PURE__ */ i("div", {
4024
+ }), m && /* @__PURE__ */ i("div", {
4199
4025
  "aria-hidden": "true",
4200
4026
  "data-active": h?.id === null || void 0,
4201
4027
  className: "absolute inset-x-1 bottom-0 flex h-8 items-center justify-center rounded-md border border-dashed border-border text-[10px] text-muted-foreground data-[active=true]:border-primary/50 data-[active=true]:bg-primary/10 data-[active=true]:text-foreground",
4202
4028
  children: "Move to top level"
4203
- }) : null]
4029
+ })]
4204
4030
  }), /* @__PURE__ */ i("span", {
4205
4031
  className: "sr-only",
4206
4032
  "aria-live": "polite",
@@ -4208,14 +4034,185 @@ function oi({ renderIcon: e, renderMenu: t, renderActionsTrigger: n, ariaLabel:
4208
4034
  })] });
4209
4035
  }
4210
4036
  //#endregion
4211
- //#region src/components/agents/index.ts
4212
- var si = {
4213
- Wrapper: oi,
4214
- MarqueeLabel: Wr,
4215
- Row: ai,
4216
- Icon: Ur
4217
- };
4037
+ //#region src/components/blocks/nav/sidebar/index.ts
4038
+ var ti = {
4039
+ Wrapper: ei,
4040
+ MarqueeLabel: Rr,
4041
+ Row: $r,
4042
+ Icon: Lr
4043
+ }, ni = 48;
4044
+ //#endregion
4045
+ //#region src/components/blocks/shell/shell-layout.tsx
4046
+ function ri({ children: e, open: t, defaultOpen: n, onOpenChange: r, rightDrawer: o, rightOpen: s, defaultRightOpen: c, onRightOpenChange: l, variant: u = "desktop", className: d }) {
4047
+ return /* @__PURE__ */ a(ar, {
4048
+ className: J("block-full", d, "bg-linear-to-tr/increasing from-neutral-200 via-neutral-100 to-stone-200 dark:from-neutral-900 dark:via-neutral-950 dark:to-stone-950", "relative pr-2"),
4049
+ defaultOpen: n,
4050
+ defaultOpenRight: c,
4051
+ onOpenChange: r,
4052
+ onOpenRightChange: l,
4053
+ open: t,
4054
+ openRight: s,
4055
+ style: { paddingTop: u === "desktop" ? 48 : 0 },
4056
+ children: [
4057
+ /* @__PURE__ */ i(sr, {
4058
+ ariaLabel: "Primary navigation",
4059
+ className: J(""),
4060
+ collapsible: "icon",
4061
+ role: "navigation",
4062
+ variant: "inset"
4063
+ }),
4064
+ /* @__PURE__ */ a(dr, {
4065
+ className: J("min-w-24 overflow-hidden border-t border-neutral-200 dark:border-neutral-700 inset-ring-1 inset-ring-neutral-50 dark:inset-ring-black bg-white dark:bg-card rounded-lg!", "mx-0!"),
4066
+ children: [/* @__PURE__ */ a("header", {
4067
+ className: "flex h-16 items-center justify-between gap-3 px-4 sm:px-6",
4068
+ children: [/* @__PURE__ */ i("div", {
4069
+ className: "flex min-w-0 items-center gap-3",
4070
+ children: /* @__PURE__ */ i(cr, { children: /* @__PURE__ */ i(T, { className: "size-5" }) })
4071
+ }), /* @__PURE__ */ i("div", {
4072
+ className: "flex shrink-0 items-center gap-3",
4073
+ children: /* @__PURE__ */ i(cr, {
4074
+ "aria-label": "Toggle panel",
4075
+ side: "right",
4076
+ children: /* @__PURE__ */ i(O, { className: "size-5" })
4077
+ })
4078
+ })]
4079
+ }), /* @__PURE__ */ i("div", {
4080
+ className: "min-h-24 flex-1 overflow-auto",
4081
+ children: e ?? /* @__PURE__ */ i(ii, {})
4082
+ })]
4083
+ }),
4084
+ /* @__PURE__ */ i(sr, {
4085
+ ariaLabel: "Secondary panel",
4086
+ className: J("max-md:border-l max-md:border-neutral-200 max-md:bg-white dark:max-md:border-neutral-700 dark:max-md:bg-card"),
4087
+ collapsible: "offcanvas",
4088
+ panelClassName: J("top-2 ml-0 h-[calc(100%-1rem)] min-w-[calc(var(--sidebar-width))]", "rounded-lg border-t border-neutral-200 bg-white shadow-md inset-ring-1 inset-ring-neutral-50", "dark:border-neutral-700 dark:bg-card dark:inset-ring-black"),
4089
+ role: "complementary",
4090
+ side: "right",
4091
+ variant: "inset",
4092
+ children: o
4093
+ })
4094
+ ]
4095
+ });
4096
+ }
4097
+ function ii() {
4098
+ return /* @__PURE__ */ a("div", {
4099
+ className: "grid gap-5",
4100
+ children: [/* @__PURE__ */ i("div", {
4101
+ className: "grid gap-5 lg:grid-cols-3",
4102
+ children: Array.from({ length: 3 }).map((e, t) => /* @__PURE__ */ i("div", { className: "h-32 border border-border bg-background/60" }, t))
4103
+ }), /* @__PURE__ */ i("div", { className: "h-72 border border-border bg-background/60" })]
4104
+ });
4105
+ }
4106
+ //#endregion
4107
+ //#region src/components/blocks/layout.ts
4108
+ var ai = { Main: ri }, oi = [
4109
+ {
4110
+ type: "label",
4111
+ label: "Management"
4112
+ },
4113
+ {
4114
+ id: "profile",
4115
+ label: "Profile",
4116
+ icon: /* @__PURE__ */ i(M, { "aria-hidden": "true" })
4117
+ },
4118
+ {
4119
+ id: "settings",
4120
+ label: "Settings",
4121
+ icon: /* @__PURE__ */ i(A, { "aria-hidden": "true" })
4122
+ },
4123
+ { type: "separator" },
4124
+ {
4125
+ id: "teams",
4126
+ label: "Teams",
4127
+ icon: /* @__PURE__ */ i(ee, { "aria-hidden": "true" })
4128
+ },
4129
+ {
4130
+ id: "invite",
4131
+ label: "Invite",
4132
+ icon: /* @__PURE__ */ i(N, { "aria-hidden": "true" })
4133
+ },
4134
+ { type: "separator" },
4135
+ {
4136
+ id: "sign-out",
4137
+ label: "Log out",
4138
+ icon: /* @__PURE__ */ i(C, { "aria-hidden": "true" }),
4139
+ variant: "destructive"
4140
+ }
4141
+ ];
4142
+ function si(e) {
4143
+ let t = [], n = { actions: [] };
4144
+ for (let r of e) r.type === "separator" ? (t.push(n), n = { actions: [] }) : r.type === "label" ? n.label = r.label : n.actions.push(r);
4145
+ return t.push(n), t.filter((e) => e.actions.length > 0 || e.label !== void 0);
4146
+ }
4147
+ function ci({ user: e, items: t = oi, align: n = "center", side: r = "bottom", sideOffset: o = 8, menuWidth: s = "content", open: c, defaultOpen: l, onOpenChange: u, sound: d = !0, onError: f, className: p }) {
4148
+ let [h, g] = P.useState(null), _ = P.useRef(!0);
4149
+ P.useEffect(() => (_.current = !0, () => {
4150
+ _.current = !1;
4151
+ }), []);
4152
+ let v = P.useMemo(() => si(t), [t]);
4153
+ function y(e) {
4154
+ let t = e.onSelect?.();
4155
+ t instanceof Promise && (g(e.id), t.catch((e) => f?.(e)).finally(() => {
4156
+ _.current && g(null);
4157
+ }));
4158
+ }
4159
+ let b = h !== null;
4160
+ return /* @__PURE__ */ a(Ct, {
4161
+ defaultOpen: l,
4162
+ onOpenChange: (e, t) => {
4163
+ d && et(e ? "bloom" : "droplet"), u?.(e, t);
4164
+ },
4165
+ open: c,
4166
+ children: [/* @__PURE__ */ i(Tt, {
4167
+ disabled: b,
4168
+ render: /* @__PURE__ */ a(Y, {
4169
+ "aria-label": `${e.name}${e.username ? ` ${e.username}` : ""}, account menu`,
4170
+ className: J("h-auto w-full justify-between py-1.5 pl-1.5 data-popup-open:bg-accent sm:h-auto", p),
4171
+ "data-slot": "profile-card",
4172
+ loading: b,
4173
+ sound: d,
4174
+ variant: "ghost",
4175
+ children: [/* @__PURE__ */ a("span", {
4176
+ className: "flex w-full min-w-0 items-center justify-start gap-2",
4177
+ children: [/* @__PURE__ */ i(en, {
4178
+ alt: "",
4179
+ initials: e.initials,
4180
+ name: e.name,
4181
+ src: e.avatar
4182
+ }), /* @__PURE__ */ a("span", {
4183
+ className: "flex min-w-0 flex-col text-left",
4184
+ children: [/* @__PURE__ */ i("span", {
4185
+ className: "truncate font-medium",
4186
+ children: e.name
4187
+ }), e.username ? /* @__PURE__ */ i("span", {
4188
+ className: "truncate text-xs font-normal text-muted-foreground",
4189
+ children: e.username
4190
+ }) : null]
4191
+ })]
4192
+ }), /* @__PURE__ */ i(m, {
4193
+ "aria-hidden": "true",
4194
+ className: "size-3.5"
4195
+ })]
4196
+ })
4197
+ }), /* @__PURE__ */ i(Et, {
4198
+ align: n,
4199
+ className: J(s === "card" ? "w-(--anchor-width)" : "min-w-44!", "origin-(--transform-origin) transition-[opacity,scale,translate] duration-150 ease-smooth-out data-ending-style:scale-98 data-ending-style:opacity-0 data-ending-style:duration-100 data-starting-style:scale-98 data-starting-style:opacity-0 data-[side=bottom]:data-ending-style:-translate-y-1 data-[side=bottom]:data-starting-style:-translate-y-1 data-[side=top]:data-ending-style:translate-y-1 data-[side=top]:data-starting-style:translate-y-1 motion-reduce:transition-none"),
4200
+ side: r,
4201
+ sideOffset: o,
4202
+ children: v.map((e, t) => /* @__PURE__ */ a(P.Fragment, { children: [t > 0 ? /* @__PURE__ */ i(Pt, {}) : null, /* @__PURE__ */ a(Dt, { children: [e.label ? /* @__PURE__ */ i(Nt, { children: e.label }) : null, e.actions.map((e) => /* @__PURE__ */ a(Ot, {
4203
+ disabled: e.disabled,
4204
+ onClick: () => y(e),
4205
+ variant: e.variant,
4206
+ children: [
4207
+ e.icon,
4208
+ /* @__PURE__ */ i("span", { children: e.label }),
4209
+ e.shortcut ? /* @__PURE__ */ i(Ft, { children: e.shortcut }) : null
4210
+ ]
4211
+ }, e.id))] })] }, e.label ?? `group-${e.actions[0]?.id}`))
4212
+ })]
4213
+ });
4214
+ }
4218
4215
  //#endregion
4219
- export { oi as AISidebar, sr as AnimatedSidebar, lr as AnimatedSidebarClose, pr as AnimatedSidebarContent, mr as AnimatedSidebarFooter, hr as AnimatedSidebarGroup, _r as AnimatedSidebarGroupContent, gr as AnimatedSidebarGroupLabel, fr as AnimatedSidebarHeader, dr as AnimatedSidebarInset, vr as AnimatedSidebarMenu, Cr as AnimatedSidebarMenuButton, yr as AnimatedSidebarMenuItem, br as AnimatedSidebarMenuSub, Sr as AnimatedSidebarMenuSubButton, xr as AnimatedSidebarMenuSubItem, ar as AnimatedSidebarProvider, ur as AnimatedSidebarRail, cr as AnimatedSidebarTrigger, rn as AuthCard, on as AuthError, cn as AuthSeparator, sn as AuthSuccess, Ee as Avatar, Oe as AvatarFallback, De as AvatarImage, e as AvatarPrimitive, Y as Button, ze as Card, Ye as CardAction, Xe as CardContent, Xe as CardPanel, Je as CardDescription, Ze as CardFooter, Be as CardFrame, We as CardFrameAction, Ue as CardFrameDescription, Ge as CardFrameFooter, Ve as CardFrameHeader, He as CardFrameTitle, Ke as CardHeader, qe as CardTitle, tt as Checkbox, se as CheckboxPrimitive, un as CodeAuthBlock, vn as DEFAULT_ONBOARDING_STEPS, Ct as DropdownMenu, Ct as Menu, At as DropdownMenuCheckboxItem, At as MenuCheckboxItem, Et as DropdownMenuContent, Et as MenuPopup, St as DropdownMenuCreateHandle, St as MenuCreateHandle, Dt as DropdownMenuGroup, Dt as MenuGroup, Ot as DropdownMenuItem, Ot as MenuItem, Nt as DropdownMenuLabel, Nt as MenuGroupLabel, wt as DropdownMenuPortal, wt as MenuPortal, jt as DropdownMenuRadioGroup, jt as MenuRadioGroup, Mt as DropdownMenuRadioItem, Mt as MenuRadioItem, Pt as DropdownMenuSeparator, Pt as MenuSeparator, Ft as DropdownMenuShortcut, Ft as MenuShortcut, It as DropdownMenuSub, It as MenuSub, Rt as DropdownMenuSubContent, Rt as MenuSubPopup, Lt as DropdownMenuSubTrigger, Lt as MenuSubTrigger, Tt as DropdownMenuTrigger, Tt as MenuTrigger, Q as EASE, kn as EASE_DRAWER, On as EASE_IN_OUT, Dn as EASE_OUT, An as EASE_OUT_CSS, X as Field, at as FieldControl, rt as FieldDescription, it as FieldError, nt as FieldItem, Z as FieldLabel, ot as FieldValidity, dn as ForgotPasswordBlock, st as Frame, dt as FrameDescription, ft as FrameFooter, lt as FrameHeader, ct as FramePanel, ut as FrameTitle, pt as Input, gt as InputGroup, _t as InputGroupAddon, yt as InputGroupInput, vt as InputGroupText, bt as InputGroupTextarea, ge as InputPrimitive, xt as Label, pn as LinkedAccountsBlock, mn as LoginBlock, Wr as MarqueeLabel, kt as MenuLinkItem, G as MenuPrimitive, an as MorphStep, Bt as OTPField, Vt as OTPFieldInput, _e as OTPFieldPrimitive, Ht as OTPFieldSeparator, yn as OnboardingBlock, Cn as PasskeyManagerBlock, wn as PasskeySignInBlock, Jt as PasswordInput, Mr as ProfileCardBlock, ai as ResourceRow, $ as Reveal, Xt as SOCIAL_PROVIDERS, In as SPRING_GLIDE, Pn as SPRING_LAYOUT, Fn as SPRING_MOUSE, Nn as SPRING_PANEL, jn as SPRING_PRESS, Mn as SPRING_SWAP, zt as Separator, ve as SeparatorPrimitive, zn as SharedLayoutBg, Or as ShellLayout, si as Sidebar, Er as SidebarBlock, Ur as SidebarIcon, Tn as SignupBlock, Ut as Skeleton, Qt as SocialProviders, ke as Spinner, Dr as TITLE_BAR_HEIGHT, mt as Textarea, En as UpdatePasswordBlock, en as UserAvatar, nn as authAccentActionStyles, tn as authAccentVars, $e as bindSounds, Re as buttonVariants, J as cn, Ar as defaultProfileCardItems, Kt as getPasswordStrength, $t as initialsFrom, Gt as passwordRequirements, et as playCue, ue as playSound, de as setSoundEnabled, fe as setSoundVolume, pe as sounds, Hr as useAISidebar, rr as useAnimatedSidebar, ln as useCountdown };
4216
+ export { ei as AISidebar, sr as AnimatedSidebar, lr as AnimatedSidebarClose, pr as AnimatedSidebarContent, mr as AnimatedSidebarFooter, hr as AnimatedSidebarGroup, _r as AnimatedSidebarGroupContent, gr as AnimatedSidebarGroupLabel, fr as AnimatedSidebarHeader, dr as AnimatedSidebarInset, vr as AnimatedSidebarMenu, Cr as AnimatedSidebarMenuButton, yr as AnimatedSidebarMenuItem, br as AnimatedSidebarMenuSub, Sr as AnimatedSidebarMenuSubButton, xr as AnimatedSidebarMenuSubItem, ar as AnimatedSidebarProvider, ur as AnimatedSidebarRail, cr as AnimatedSidebarTrigger, rn as AuthCard, on as AuthError, cn as AuthSeparator, sn as AuthSuccess, Ee as Avatar, Oe as AvatarFallback, De as AvatarImage, e as AvatarPrimitive, Y as Button, ze as Card, Ye as CardAction, Xe as CardContent, Xe as CardPanel, Je as CardDescription, Ze as CardFooter, Be as CardFrame, We as CardFrameAction, Ue as CardFrameDescription, Ge as CardFrameFooter, Ve as CardFrameHeader, He as CardFrameTitle, Ke as CardHeader, qe as CardTitle, tt as Checkbox, se as CheckboxPrimitive, un as CodeAuthBlock, vn as DEFAULT_ONBOARDING_STEPS, Ct as DropdownMenu, Ct as Menu, At as DropdownMenuCheckboxItem, At as MenuCheckboxItem, Et as DropdownMenuContent, Et as MenuPopup, St as DropdownMenuCreateHandle, St as MenuCreateHandle, Dt as DropdownMenuGroup, Dt as MenuGroup, Ot as DropdownMenuItem, Ot as MenuItem, Nt as DropdownMenuLabel, Nt as MenuGroupLabel, wt as DropdownMenuPortal, wt as MenuPortal, jt as DropdownMenuRadioGroup, jt as MenuRadioGroup, Mt as DropdownMenuRadioItem, Mt as MenuRadioItem, Pt as DropdownMenuSeparator, Pt as MenuSeparator, Ft as DropdownMenuShortcut, Ft as MenuShortcut, It as DropdownMenuSub, It as MenuSub, Rt as DropdownMenuSubContent, Rt as MenuSubPopup, Lt as DropdownMenuSubTrigger, Lt as MenuSubTrigger, Tt as DropdownMenuTrigger, Tt as MenuTrigger, Q as EASE, kn as EASE_DRAWER, On as EASE_IN_OUT, Dn as EASE_OUT, An as EASE_OUT_CSS, X as Field, at as FieldControl, rt as FieldDescription, it as FieldError, nt as FieldItem, Z as FieldLabel, ot as FieldValidity, dn as ForgotPasswordBlock, st as Frame, dt as FrameDescription, ft as FrameFooter, lt as FrameHeader, ct as FramePanel, ut as FrameTitle, pt as Input, gt as InputGroup, _t as InputGroupAddon, yt as InputGroupInput, vt as InputGroupText, bt as InputGroupTextarea, ge as InputPrimitive, xt as Label, ai as Layout, pn as LinkedAccountsBlock, mn as LoginBlock, Rr as MarqueeLabel, kt as MenuLinkItem, G as MenuPrimitive, an as MorphStep, Bt as OTPField, Vt as OTPFieldInput, _e as OTPFieldPrimitive, Ht as OTPFieldSeparator, yn as OnboardingBlock, Cn as PasskeyManagerBlock, wn as PasskeySignInBlock, Jt as PasswordInput, ci as ProfileCardBlock, $r as ResourceRow, $ as Reveal, Xt as SOCIAL_PROVIDERS, In as SPRING_GLIDE, Pn as SPRING_LAYOUT, Fn as SPRING_MOUSE, Nn as SPRING_PANEL, jn as SPRING_PRESS, Mn as SPRING_SWAP, zt as Separator, ve as SeparatorPrimitive, zn as SharedLayoutBg, ri as ShellLayout, ti as Sidebar, Er as SidebarBlock, Lr as SidebarIcon, Tn as SignupBlock, Ut as Skeleton, Qt as SocialProviders, ke as Spinner, ni as TITLE_BAR_HEIGHT, mt as Textarea, En as UpdatePasswordBlock, en as UserAvatar, nn as authAccentActionStyles, tn as authAccentVars, $e as bindSounds, Re as buttonVariants, J as cn, oi as defaultProfileCardItems, Kt as getPasswordStrength, $t as initialsFrom, Gt as passwordRequirements, et as playCue, ue as playSound, de as setSoundEnabled, fe as setSoundVolume, pe as sounds, Ir as useAISidebar, rr as useAnimatedSidebar, ln as useCountdown };
4220
4217
 
4221
4218
  //# sourceMappingURL=index.js.map