@ag2/weave 0.1.0 → 0.2.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 (62) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/components/agent-tag/AgentGlyph.d.ts +13 -0
  3. package/dist/components/agent-tag/AgentTag.d.ts +22 -0
  4. package/dist/components/agent-tag/PeopleGlyph.d.ts +10 -0
  5. package/dist/components/agent-tag/SkillGlyph.d.ts +10 -0
  6. package/dist/components/agent-tag/index.d.ts +4 -0
  7. package/dist/components/compose-icon/ComposeIcon.d.ts +2 -0
  8. package/dist/components/compose-icon/index.d.ts +1 -0
  9. package/dist/components/cutout-card/CutoutCard.css.d.ts +1 -0
  10. package/dist/components/cutout-card/CutoutCard.d.ts +5 -0
  11. package/dist/components/cutout-card/index.d.ts +1 -0
  12. package/dist/components/index.d.ts +15 -0
  13. package/dist/components/info-card/InfoCard.d.ts +12 -0
  14. package/dist/components/info-card/index.d.ts +1 -0
  15. package/dist/components/info-card/styles.css.d.ts +1 -0
  16. package/dist/components/page/NavCollapseRow.d.ts +1 -0
  17. package/dist/components/page/Page.d.ts +53 -0
  18. package/dist/components/page/index.d.ts +2 -0
  19. package/dist/components/page/style.css.d.ts +48 -0
  20. package/dist/components/robot-icon/RobotIcon.d.ts +3 -0
  21. package/dist/components/robot-icon/index.d.ts +1 -0
  22. package/dist/components/sequence-card/SequenceCard.d.ts +22 -0
  23. package/dist/components/sequence-card/index.d.ts +1 -0
  24. package/dist/components/sequence-card/style.css.d.ts +43 -0
  25. package/dist/components/server-badge/ServerBadge.d.ts +5 -0
  26. package/dist/components/server-badge/index.d.ts +1 -0
  27. package/dist/components/setting-tile/SettingTile.d.ts +10 -0
  28. package/dist/components/setting-tile/index.d.ts +1 -0
  29. package/dist/components/sidebar/Sidebar.css.d.ts +86 -0
  30. package/dist/components/sidebar/Sidebar.d.ts +2 -0
  31. package/dist/components/sidebar/SidebarContent.d.ts +7 -0
  32. package/dist/components/sidebar/SidebarItem.d.ts +24 -0
  33. package/dist/components/sidebar/SidebarStack.d.ts +2 -0
  34. package/dist/components/sidebar/SidebarStackSeparator.d.ts +1 -0
  35. package/dist/components/sidebar/index.d.ts +5 -0
  36. package/dist/components/splash-screen/SplashScreen.css.d.ts +2 -0
  37. package/dist/components/splash-screen/SplashScreen.d.ts +6 -0
  38. package/dist/components/splash-screen/index.d.ts +1 -0
  39. package/dist/components/stacked-avatar/StackedAvatar.d.ts +9 -0
  40. package/dist/components/stacked-avatar/index.d.ts +1 -0
  41. package/dist/components/stacked-avatar/styles.css.d.ts +33 -0
  42. package/dist/components/starfield/Starfield.css.d.ts +2 -0
  43. package/dist/components/starfield/Starfield.d.ts +11 -0
  44. package/dist/components/starfield/index.d.ts +1 -0
  45. package/dist/components/typing-indicator/TypingIndicator.css.d.ts +28 -0
  46. package/dist/components/typing-indicator/TypingIndicator.d.ts +6 -0
  47. package/dist/components/typing-indicator/index.d.ts +1 -0
  48. package/dist/components/window-title/AliveMark.d.ts +31 -0
  49. package/dist/components/window-title/index.d.ts +2 -0
  50. package/dist/components/window-title/mountAliveMark.d.ts +8 -0
  51. package/dist/hooks/index.d.ts +3 -0
  52. package/dist/hooks/useElementSizeObserver.d.ts +1 -0
  53. package/dist/hooks/useResizeObserver.d.ts +3 -0
  54. package/dist/hooks/useScreenSize.d.ts +11 -0
  55. package/dist/index.d.ts +1 -0
  56. package/dist/index.js +1249 -2
  57. package/dist/index.js.map +1 -1
  58. package/dist/style.css +545 -0
  59. package/dist/styles/ContainerColor.css.d.ts +15 -0
  60. package/dist/styles/Text.css.d.ts +3 -0
  61. package/dist/utils/dragOverlay.d.ts +13 -0
  62. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { forwardRef, createContext, useContext, useRef, useCallback, useEffect, useLayoutEffect, useState } from "react";
1
+ import { forwardRef, createContext, useContext, useRef, useCallback, useEffect, useLayoutEffect, useState, useMemo } from "react";
2
2
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
3
3
  import classNames from "classnames";
4
4
  import { createPortal } from "react-dom";
@@ -3452,7 +3452,7 @@ const Switch = forwardRef(
3452
3452
  );
3453
3453
  }
3454
3454
  );
3455
- const Text_css_ts_vanilla = "";
3455
+ const Text_css_ts_vanilla$1 = "";
3456
3456
  var Text$1 = createRuntimeFn({ defaultClassName: "r9vqik0 _8nex5a1 _8nex5a0", variantClassNames: { size: { Inherit: "r9vqik1", D400: "r9vqik2", H1: "r9vqik3", H2: "r9vqik4", H3: "r9vqik5", H4: "r9vqik6", H5: "r9vqik7", H6: "r9vqik8", T500: "r9vqik9", T400: "r9vqika", T300: "r9vqikb", T200: "r9vqikc", B500: "r9vqikd", B400: "r9vqike", B300: "r9vqikf", L400: "r9vqikg", O400: "r9vqikh", C400: "r9vqiki" }, align: { Left: "r9vqikj", Center: "r9vqikk", Right: "r9vqikl", Justify: "r9vqikm" }, truncate: { true: "r9vqikn" }, priority: { "300": "r9vqiko", "400": "r9vqikp", "500": "r9vqikq", Inherit: "r9vqikr", Initial: "r9vqiks" } }, defaultVariants: { size: "T400", priority: "Inherit" }, compoundVariants: [] });
3457
3457
  const Text = as(
3458
3458
  ({ as: AsText = "p", className, size, truncate, align, priority, ...props }, ref) => /* @__PURE__ */ jsx(
@@ -3625,7 +3625,1207 @@ const TooltipProvider = as(
3625
3625
  ] });
3626
3626
  }
3627
3627
  );
3628
+ const ContainerColor_css_ts_vanilla = "";
3629
+ var ContainerColor = createRuntimeFn({ defaultClassName: "_8nex5a1 _8nex5a0", variantClassNames: { variant: { Background: "_1f7zc2n1", Surface: "_1f7zc2n2", SurfaceVariant: "_1f7zc2n3", Primary: "_1f7zc2n4", Secondary: "_1f7zc2n5", Success: "_1f7zc2n6", Warning: "_1f7zc2n7", Critical: "_1f7zc2n8" } }, defaultVariants: { variant: "Surface" }, compoundVariants: [] });
3630
+ const style_css_ts_vanilla$1 = "";
3631
+ var SequenceCard$1 = createRuntimeFn({ defaultClassName: "nwqdf42", variantClassNames: { radii: { "0": "nwqdf43", "300": "nwqdf44", "400": "nwqdf45", "500": "nwqdf46" }, outlined: { true: "nwqdf47" }, mergeBorder: { true: "nwqdf48" } }, defaultVariants: { radii: "400" }, compoundVariants: [] });
3632
+ const SequenceCard = as(
3633
+ ({
3634
+ as: AsSequenceCard = "div",
3635
+ className,
3636
+ variant,
3637
+ radii,
3638
+ firstChild,
3639
+ lastChild,
3640
+ outlined,
3641
+ mergeBorder,
3642
+ ...props
3643
+ }, ref) => /* @__PURE__ */ jsx(
3644
+ Box,
3645
+ {
3646
+ as: AsSequenceCard,
3647
+ className: classNames(
3648
+ SequenceCard$1({ radii, outlined, mergeBorder }),
3649
+ ContainerColor({ variant }),
3650
+ className
3651
+ ),
3652
+ "data-first-child": firstChild,
3653
+ "data-last-child": lastChild,
3654
+ ...props,
3655
+ ref
3656
+ }
3657
+ )
3658
+ );
3659
+ const Text_css_ts_vanilla = "";
3660
+ var BreakWord = "_1o5czkz0";
3661
+ const SettingTile = ({ title, description, before, after, children }) => /* @__PURE__ */ jsxs(Box, { alignItems: "Center", gap: "300", children: [
3662
+ before && /* @__PURE__ */ jsx(Box, { shrink: "No", children: before }),
3663
+ /* @__PURE__ */ jsxs(Box, { grow: "Yes", direction: "Column", gap: "100", children: [
3664
+ title && /* @__PURE__ */ jsx(Text, { className: BreakWord, size: "T300", children: title }),
3665
+ description && /* @__PURE__ */ jsx(Text, { className: BreakWord, size: "T200", priority: "300", children: description }),
3666
+ children
3667
+ ] }),
3668
+ after && /* @__PURE__ */ jsx(Box, { shrink: "No", children: after })
3669
+ ] });
3670
+ const CutoutCard_css_ts_vanilla = "";
3671
+ var CutoutCard$1 = "_550r4h0";
3672
+ const CutoutCard = as(
3673
+ ({ as: AsCutoutCard = "div", className, variant = "Surface", ...props }, ref) => /* @__PURE__ */ jsx(
3674
+ AsCutoutCard,
3675
+ {
3676
+ className: classNames(ContainerColor({ variant }), CutoutCard$1, className),
3677
+ ...props,
3678
+ ref
3679
+ }
3680
+ )
3681
+ );
3682
+ const styles_css_ts_vanilla$1 = "";
3683
+ var InfoCard$1 = "t54ly40";
3684
+ const InfoCard = ({
3685
+ variant = "Primary",
3686
+ title,
3687
+ description,
3688
+ before,
3689
+ after,
3690
+ children
3691
+ }) => /* @__PURE__ */ jsxs(Box, { direction: "Column", className: classNames(InfoCard$1, ContainerColor({ variant })), gap: "300", children: [
3692
+ /* @__PURE__ */ jsxs(Box, { gap: "200", alignItems: "Center", children: [
3693
+ before && /* @__PURE__ */ jsx(Box, { shrink: "No", alignSelf: "Start", children: before }),
3694
+ /* @__PURE__ */ jsxs(Box, { grow: "Yes", direction: "Column", gap: "100", children: [
3695
+ title && /* @__PURE__ */ jsx(Text, { size: "L400", className: BreakWord, children: title }),
3696
+ description && /* @__PURE__ */ jsx(Text, { size: "T200", className: BreakWord, children: description })
3697
+ ] }),
3698
+ after && /* @__PURE__ */ jsx(Box, { shrink: "No", children: after })
3699
+ ] }),
3700
+ children
3701
+ ] });
3702
+ const Sidebar_css_ts_vanilla = "";
3703
+ var Sidebar$1 = "jbpukc0 _8nex5a1 _8nex5a0";
3704
+ var SidebarAvatar$1 = createRuntimeFn({ defaultClassName: "jbpukc9", variantClassNames: { size: { "200": "jbpukca", "300": "jbpukcb", "400": "jbpukcc" }, outlined: { true: "jbpukcd" } }, defaultVariants: { size: "400" }, compoundVariants: [] });
3705
+ var SidebarFolder$1 = createRuntimeFn({ defaultClassName: "jbpukce _8nex5a1 _8nex5a0 _1f7zc2n1 x4g6300 jbpukc3", variantClassNames: { state: { Close: "jbpukcf", Open: "jbpukcg" } }, defaultVariants: { state: "Close" }, compoundVariants: [] });
3706
+ var SidebarFolderDropTarget$1 = createRuntimeFn({ defaultClassName: "jbpukch", variantClassNames: { position: { Top: "jbpukci", Bottom: "jbpukcj" } }, defaultVariants: {}, compoundVariants: [] });
3707
+ var SidebarItem$1 = createRuntimeFn({ defaultClassName: "jbpukc4 _8nex5a1 _8nex5a0 x4g6301 jbpukc3", variantClassNames: { active: { true: "jbpukc5" } }, defaultVariants: {}, compoundVariants: [] });
3708
+ var SidebarItemBadge$1 = createRuntimeFn({ defaultClassName: "jbpukc6 _8nex5a1 _8nex5a0", variantClassNames: { hasCount: { true: "jbpukc7", false: "jbpukc8" } }, defaultVariants: { hasCount: false }, compoundVariants: [] });
3709
+ var SidebarStack$1 = "jbpukc1 _8nex5a1 _8nex5a0";
3710
+ const Sidebar = as(({ as: AsSidebar = "div", className, ...props }, ref) => /* @__PURE__ */ jsx(AsSidebar, { className: classNames(Sidebar$1, className), ...props, ref }));
3711
+ const SidebarItem = as(
3712
+ ({ as: AsSidebarAvatarBox = "div", className, active, ...props }, ref) => /* @__PURE__ */ jsx(
3713
+ AsSidebarAvatarBox,
3714
+ {
3715
+ className: classNames(SidebarItem$1({ active }), className),
3716
+ ...props,
3717
+ ref
3718
+ }
3719
+ )
3720
+ );
3721
+ const SidebarItemBadge = as(
3722
+ ({ as: AsSidebarBadgeBox = "div", className, hasCount, ...props }, ref) => /* @__PURE__ */ jsx(
3723
+ AsSidebarBadgeBox,
3724
+ {
3725
+ className: classNames(SidebarItemBadge$1({ hasCount }), className),
3726
+ ...props,
3727
+ ref
3728
+ }
3729
+ )
3730
+ );
3731
+ const SidebarItemTooltip = ({
3732
+ tooltip,
3733
+ children
3734
+ }) => {
3735
+ if (!tooltip) {
3736
+ return children(() => void 0);
3737
+ }
3738
+ return /* @__PURE__ */ jsx(
3739
+ TooltipProvider,
3740
+ {
3741
+ delay: 400,
3742
+ position: "Right",
3743
+ tooltip: /* @__PURE__ */ jsx(Tooltip, { style: { maxWidth: toRem(280) }, children: /* @__PURE__ */ jsx(Text, { size: "H5", children: tooltip }) }),
3744
+ children
3745
+ }
3746
+ );
3747
+ };
3748
+ const SidebarAvatar = as(
3749
+ ({ className, size, outlined, radii, ...props }, ref) => /* @__PURE__ */ jsx(
3750
+ Avatar,
3751
+ {
3752
+ className: classNames(SidebarAvatar$1({ size, outlined }), className),
3753
+ radii,
3754
+ ...props,
3755
+ ref
3756
+ }
3757
+ )
3758
+ );
3759
+ const SidebarFolder = as(
3760
+ ({ as: AsSidebarFolder = "div", className, state, ...props }, ref) => /* @__PURE__ */ jsx(
3761
+ AsSidebarFolder,
3762
+ {
3763
+ className: classNames(SidebarFolder$1({ state }), className),
3764
+ ...props,
3765
+ ref
3766
+ }
3767
+ )
3768
+ );
3769
+ const SidebarFolderDropTarget = as(
3770
+ ({ as: AsSidebarFolderDropTarget = "div", className, position, ...props }, ref) => /* @__PURE__ */ jsx(
3771
+ AsSidebarFolderDropTarget,
3772
+ {
3773
+ className: classNames(SidebarFolderDropTarget$1({ position }), className),
3774
+ ...props,
3775
+ ref
3776
+ }
3777
+ )
3778
+ );
3779
+ const SidebarContent = ({ scrollable, sticky }) => /* @__PURE__ */ jsxs(Fragment, { children: [
3780
+ /* @__PURE__ */ jsx(Box, { direction: "Column", grow: "Yes", children: scrollable }),
3781
+ /* @__PURE__ */ jsx(Box, { direction: "Column", shrink: "No", children: sticky })
3782
+ ] });
3783
+ const SidebarStack = as(
3784
+ ({ as: AsSidebarStack = "div", className, ...props }, ref) => /* @__PURE__ */ jsx(AsSidebarStack, { className: classNames(SidebarStack$1, className), ...props, ref })
3785
+ );
3786
+ const SidebarStackSeparator = () => /* @__PURE__ */ jsx(
3787
+ Line,
3788
+ {
3789
+ role: "separator",
3790
+ style: { width: toRem(24), margin: "0 auto" },
3791
+ variant: "Background",
3792
+ size: "300"
3793
+ }
3794
+ );
3795
+ const AgentGlyph = ({
3796
+ size = 22,
3797
+ strokeWidth = 2
3798
+ }) => /* @__PURE__ */ jsxs(
3799
+ "svg",
3800
+ {
3801
+ width: size,
3802
+ height: size,
3803
+ viewBox: "0 0 24 24",
3804
+ fill: "none",
3805
+ stroke: "currentColor",
3806
+ strokeWidth,
3807
+ strokeLinecap: "round",
3808
+ strokeLinejoin: "round",
3809
+ "aria-hidden": true,
3810
+ children: [
3811
+ /* @__PURE__ */ jsx("path", { d: "M12 8V4H8" }),
3812
+ /* @__PURE__ */ jsx("rect", { width: "16", height: "12", x: "4", y: "8", rx: "2" }),
3813
+ /* @__PURE__ */ jsx("path", { d: "M2 14h2" }),
3814
+ /* @__PURE__ */ jsx("path", { d: "M20 14h2" }),
3815
+ /* @__PURE__ */ jsx("path", { d: "M15 13v2" }),
3816
+ /* @__PURE__ */ jsx("path", { d: "M9 13v2" })
3817
+ ]
3818
+ }
3819
+ );
3820
+ const AgentMark = ({ size = 10 }) => /* @__PURE__ */ jsx(
3821
+ "span",
3822
+ {
3823
+ "aria-hidden": true,
3824
+ style: {
3825
+ display: "flex",
3826
+ alignItems: "center",
3827
+ justifyContent: "center",
3828
+ color: "currentColor"
3829
+ },
3830
+ children: /* @__PURE__ */ jsx(AgentGlyph, { size, strokeWidth: 2.8 })
3831
+ }
3832
+ );
3833
+ const AgentNameTag = () => /* @__PURE__ */ jsx(
3834
+ Badge,
3835
+ {
3836
+ as: "span",
3837
+ variant: "Secondary",
3838
+ fill: "Soft",
3839
+ radii: "300",
3840
+ style: {
3841
+ display: "inline-flex",
3842
+ alignItems: "center",
3843
+ justifyContent: "center",
3844
+ padding: `0 ${toRem(5)}`,
3845
+ opacity: 0.85
3846
+ },
3847
+ title: "Agent",
3848
+ "aria-label": "Agent",
3849
+ children: /* @__PURE__ */ jsx(Text, { as: "span", size: "L400", style: { fontWeight: 500, letterSpacing: "0.01em" }, children: "Agent" })
3850
+ }
3851
+ );
3852
+ const PeopleGlyph = ({
3853
+ size = 22,
3854
+ strokeWidth = 2
3855
+ }) => /* @__PURE__ */ jsxs(
3856
+ "svg",
3857
+ {
3858
+ width: size,
3859
+ height: size,
3860
+ viewBox: "0 0 24 24",
3861
+ fill: "none",
3862
+ stroke: "currentColor",
3863
+ strokeWidth,
3864
+ strokeLinecap: "round",
3865
+ strokeLinejoin: "round",
3866
+ "aria-hidden": true,
3867
+ children: [
3868
+ /* @__PURE__ */ jsx("path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" }),
3869
+ /* @__PURE__ */ jsx("circle", { cx: "9", cy: "7", r: "4" }),
3870
+ /* @__PURE__ */ jsx("path", { d: "M22 21v-2a4 4 0 0 0-3-3.87" }),
3871
+ /* @__PURE__ */ jsx("path", { d: "M16 3.13a4 4 0 0 1 0 7.75" })
3872
+ ]
3873
+ }
3874
+ );
3875
+ const SkillGlyph = ({
3876
+ size = 22,
3877
+ strokeWidth = 2
3878
+ }) => /* @__PURE__ */ jsxs(
3879
+ "svg",
3880
+ {
3881
+ width: size,
3882
+ height: size,
3883
+ viewBox: "0 0 24 24",
3884
+ fill: "none",
3885
+ stroke: "currentColor",
3886
+ strokeWidth,
3887
+ strokeLinecap: "round",
3888
+ strokeLinejoin: "round",
3889
+ "aria-hidden": true,
3890
+ children: [
3891
+ /* @__PURE__ */ jsx("path", { d: "M15 12h-5" }),
3892
+ /* @__PURE__ */ jsx("path", { d: "M15 8h-5" }),
3893
+ /* @__PURE__ */ jsx("path", { d: "M19 17V5a2 2 0 0 0-2-2H4" }),
3894
+ /* @__PURE__ */ jsx("path", { d: "M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3" })
3895
+ ]
3896
+ }
3897
+ );
3898
+ const TypingIndicator_css_ts_vanilla = "";
3899
+ var TypingDot = createRuntimeFn({ defaultClassName: "_1xj9jyp1 _8nex5a1 _8nex5a0", variantClassNames: { animated: { true: "_1xj9jyp2" }, size: { "300": "_1xj9jyp3", "400": "_1xj9jyp4" }, index: { "0": "_1xj9jyp5", "1": "_1xj9jyp6", "2": "_1xj9jyp7" } }, defaultVariants: { size: "400", animated: true }, compoundVariants: [] });
3900
+ const TypingIndicator = as(
3901
+ ({ size, disableAnimation, style, ...props }, ref) => /* @__PURE__ */ jsxs(
3902
+ Box,
3903
+ {
3904
+ as: "span",
3905
+ alignItems: "Center",
3906
+ shrink: "No",
3907
+ style: { gap: toRem(size === "300" ? 1 : 2), ...style },
3908
+ ...props,
3909
+ ref,
3910
+ children: [
3911
+ /* @__PURE__ */ jsx("span", { className: TypingDot({ size, index: "0", animated: !disableAnimation }) }),
3912
+ /* @__PURE__ */ jsx("span", { className: TypingDot({ size, index: "1", animated: !disableAnimation }) }),
3913
+ /* @__PURE__ */ jsx("span", { className: TypingDot({ size, index: "2", animated: !disableAnimation }) })
3914
+ ]
3915
+ }
3916
+ )
3917
+ );
3918
+ const RobotIcon = ({ filled = false }) => /* @__PURE__ */ jsxs(
3919
+ "svg",
3920
+ {
3921
+ width: "1rem",
3922
+ height: "1rem",
3923
+ viewBox: "0 0 24 24",
3924
+ fill: "none",
3925
+ stroke: "currentColor",
3926
+ strokeWidth: filled ? 2.2 : 1.8,
3927
+ strokeLinecap: "round",
3928
+ strokeLinejoin: "round",
3929
+ style: { display: "block" },
3930
+ "aria-hidden": true,
3931
+ children: [
3932
+ /* @__PURE__ */ jsx("rect", { x: "5", y: "8", width: "14", height: "11", rx: "3" }),
3933
+ /* @__PURE__ */ jsx("line", { x1: "12", y1: "5", x2: "12", y2: "8" }),
3934
+ /* @__PURE__ */ jsx("circle", { cx: "12", cy: "4", r: "1.1", fill: "currentColor", stroke: "none" }),
3935
+ /* @__PURE__ */ jsx("circle", { cx: "9.5", cy: "13.5", r: "1.3", fill: "currentColor", stroke: "none" }),
3936
+ /* @__PURE__ */ jsx("circle", { cx: "14.5", cy: "13.5", r: "1.3", fill: "currentColor", stroke: "none" }),
3937
+ /* @__PURE__ */ jsx("line", { x1: "3", y1: "12", x2: "3", y2: "15" }),
3938
+ /* @__PURE__ */ jsx("line", { x1: "21", y1: "12", x2: "21", y2: "15" })
3939
+ ]
3940
+ }
3941
+ );
3942
+ function mountAliveMark(container, opts) {
3943
+ var BRAND = "#6C4BE8";
3944
+ var INK = "#16324F";
3945
+ var WHITE = "#FFFFFF";
3946
+ var GCX = 34.52;
3947
+ var GCY = 33.2;
3948
+ var FIT = 1.36;
3949
+ var FIT_SMALL = 1.42;
3950
+ var SMALL_AT = 24;
3951
+ var FACE_CX = 34.75;
3952
+ var DEFAULT_C = { y: 31, gap: 12, r: 3.4, tilt: -4, hex: "#FFCE3A" };
3953
+ var FACE_PATH = "M17 22.5h30a6.5 6.5 0 0 1 6.5 6.5v7a6.5 6.5 0 0 1 -6.5 6.5H29l-8.5 6.5 1.5-6.6A6.6 6.6 0 0 1 16 36v-7a6.5 6.5 0 0 1 1-6.5z";
3954
+ function fitFor(px) {
3955
+ return px < SMALL_AT ? FIT_SMALL : FIT;
3956
+ }
3957
+ function eyeBoost(c2, px) {
3958
+ if (px >= SMALL_AT)
3959
+ return { r: c2.r, gap: c2.gap };
3960
+ var r2 = Math.min(c2.r * 1.18, 4.4);
3961
+ return { r: r2, gap: Math.min(c2.gap * 1.06, 2 * (13 - r2)) };
3962
+ }
3963
+ var DEFAULTS = {
3964
+ size: 160,
3965
+ character: DEFAULT_C,
3966
+ // { y, gap, r, tilt, hex } — any generator character works
3967
+ label: "AG2 Space",
3968
+ blinkMin: 5,
3969
+ // seconds
3970
+ blinkMax: 10,
3971
+ // seconds
3972
+ blinkMs: 120,
3973
+ // one blink, close + open
3974
+ doubleBlinkChance: 0.2,
3975
+ // ~1 in 5 blinks is a double
3976
+ driftMin: 2,
3977
+ // seconds between look-around targets
3978
+ driftMax: 5,
3979
+ driftX: 4,
3980
+ // viewBox units, ± — the pill clip is the hard bound
3981
+ driftY: 1.2,
3982
+ winkMs: 350,
3983
+ squintMs: 420,
3984
+ squintTo: 0.4,
3985
+ lidClosed: 0.08,
3986
+ // The mark does NOT track the pointer continuously by default: a face that follows you
3987
+ // everywhere reads as needy, and in a sidebar it would never sit still. It glances.
3988
+ pointerMode: "glance",
3989
+ // 'off' | 'glance' | 'follow'
3990
+ followRadius: 60,
3991
+ // px from the mark's centre — the radius a glance triggers inside.
3992
+ // Tuned deliberately tight: at sidebar sizes the pointer has to be
3993
+ // basically on the mark before it looks up. No slider — the Pointer
3994
+ // select took that slot; change it here or via setOptions().
3995
+ glanceMs: 1e3,
3996
+ // one glance, before it eases back to idle drift
3997
+ glanceCooldown: 8,
3998
+ // seconds; at most one glance per cooldown, however you wave at it
3999
+ clickLookMs: 1500,
4000
+ // after a click it looks at you for this long, then lets go
4001
+ sleepAfter: 60,
4002
+ // seconds of no pointer activity
4003
+ tiltNudge: 3,
4004
+ // degrees the swipe is knocked on a click
4005
+ doubleClickMs: 600
4006
+ };
4007
+ var o = {}, key;
4008
+ for (key in DEFAULTS)
4009
+ o[key] = DEFAULTS[key];
4010
+ if (opts) {
4011
+ for (key in opts)
4012
+ if (opts[key] !== void 0)
4013
+ o[key] = opts[key];
4014
+ }
4015
+ var c = o.character;
4016
+ var size = o.size;
4017
+ var uid = "am" + Math.random().toString(36).slice(2, 9);
4018
+ var k = fitFor(size);
4019
+ var eb = eyeBoost(c, size);
4020
+ var gap = eb.gap, y = c.y, r = eb.r;
4021
+ var lx = FACE_CX - gap / 2, rx = FACE_CX + gap / 2;
4022
+ var pillY = y - 5;
4023
+ var arcL = "M" + (FACE_CX - gap / 2 - r) + " " + y + "q" + r + " " + r * 1.1 + " " + r * 2 + " 0";
4024
+ var arcR = "M" + (FACE_CX + gap / 2 - r) + " " + y + "q" + r + " " + r * 1.1 + " " + r * 2 + " 0";
4025
+ var tx = (32 - GCX * k).toFixed(2), ty = (32 - GCY * k).toFixed(2);
4026
+ function pillT(tilt) {
4027
+ return "rotate(" + tilt + " " + FACE_CX + " " + y + ")";
4028
+ }
4029
+ container.innerHTML = '<svg class="alive-mark" xmlns="http://www.w3.org/2000/svg" width="' + size + '" height="' + size + '" viewBox="0 0 64 64" fill="none" role="img" aria-label="' + o.label + '"><defs><clipPath id="' + uid + '-pill"><rect class="am-clip" x="20.75" y="' + pillY + '" width="28" height="10" rx="5" transform="' + pillT(c.tilt) + '"/></clipPath></defs><rect x="2" y="2" width="60" height="60" rx="17" fill="' + BRAND + '"/><g transform="translate(' + tx + " " + ty + ") scale(" + k + ')"><g stroke="' + WHITE + '" stroke-width="3.1" stroke-linecap="round" stroke-linejoin="round"><path d="' + FACE_PATH + '"/></g><rect class="am-swipe" x="20.75" y="' + pillY + '" width="28" height="10" rx="5" fill="' + c.hex + '" transform="' + pillT(c.tilt) + '"/><g clip-path="url(#' + uid + '-pill)"><g class="am-look"><g class="am-eye-l"><circle cx="' + lx + '" cy="' + y + '" r="' + r + '" fill="' + INK + '"/></g><g class="am-eye-r"><circle cx="' + rx + '" cy="' + y + '" r="' + r + '" fill="' + INK + '"/></g></g></g><g class="am-dream" opacity="0"><g stroke="' + INK + '" stroke-width="2.6" stroke-linecap="round" fill="none"><path d="' + arcL + '"/><path d="' + arcR + '"/></g><g fill="' + c.hex + '"><circle cx="46" cy="17" r="2.6"/><circle cx="52" cy="12" r="1.8"/></g></g></g></svg>';
4030
+ var svg = container.querySelector("svg");
4031
+ var look = container.querySelector(".am-look");
4032
+ var eyeL = container.querySelector(".am-eye-l");
4033
+ var eyeR = container.querySelector(".am-eye-r");
4034
+ var swipe = container.querySelector(".am-swipe");
4035
+ var clip = container.querySelector(".am-clip");
4036
+ var dream = container.querySelector(".am-dream");
4037
+ var eyes = look.parentNode;
4038
+ var reduced = false;
4039
+ try {
4040
+ reduced = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
4041
+ } catch (e) {
4042
+ }
4043
+ var running = true, raf = 0, last = 0;
4044
+ var curX = 0, curY = 0, tgtX = 0, tgtY = 0;
4045
+ var animL = null, animR = null;
4046
+ var tiltCur = c.tilt;
4047
+ var dreamAmt = 0, sleeping = false;
4048
+ var lastActivity = now();
4049
+ var lastClick = -1e9;
4050
+ var pointer = null;
4051
+ var rect = null, rectAt = -1e9;
4052
+ var blinkT = 0, driftT = 0;
4053
+ var glanceUntil = 0, glanceReadyAt = 0, clickLookUntil = 0, gazing = false;
4054
+ function now() {
4055
+ return window.performance && performance.now ? performance.now() : Date.now();
4056
+ }
4057
+ function rnd(a, b) {
4058
+ return a + Math.random() * (b - a);
4059
+ }
4060
+ function setA(el, name, val) {
4061
+ var m = el.__am || (el.__am = {});
4062
+ if (m[name] === val)
4063
+ return;
4064
+ m[name] = val;
4065
+ el.setAttribute(name, val);
4066
+ }
4067
+ function lidAt(a, t) {
4068
+ if (!a)
4069
+ return 1;
4070
+ var e = t - a.t0;
4071
+ if (e >= a.dur)
4072
+ return 1;
4073
+ var edge = reduced ? 0 : Math.min(a.edge, a.dur / 2);
4074
+ var p = 1;
4075
+ if (edge > 0) {
4076
+ if (e < edge)
4077
+ p = e / edge;
4078
+ else if (e > a.dur - edge)
4079
+ p = (a.dur - e) / edge;
4080
+ p = p * p * (3 - 2 * p);
4081
+ }
4082
+ return 1 + (a.to - 1) * p;
4083
+ }
4084
+ function scheduleBlink() {
4085
+ clearTimeout(blinkT);
4086
+ var mult = reduced ? 2 : 1;
4087
+ blinkT = setTimeout(function() {
4088
+ if (!sleeping)
4089
+ doBlink(Math.random() < o.doubleBlinkChance);
4090
+ scheduleBlink();
4091
+ }, rnd(o.blinkMin, o.blinkMax) * 1e3 * mult);
4092
+ }
4093
+ function doBlink(dbl) {
4094
+ var t = now();
4095
+ animL = animR = { t0: t, dur: o.blinkMs, edge: o.blinkMs / 2, to: o.lidClosed };
4096
+ if (dbl)
4097
+ setTimeout(function() {
4098
+ if (!running)
4099
+ return;
4100
+ var t2 = now();
4101
+ animL = animR = { t0: t2, dur: o.blinkMs, edge: o.blinkMs / 2, to: o.lidClosed };
4102
+ }, o.blinkMs + 90);
4103
+ }
4104
+ function doWink() {
4105
+ var t = now(), a = { t0: t, dur: o.winkMs, edge: Math.min(70, o.winkMs / 2), to: o.lidClosed };
4106
+ if (Math.random() < 0.5)
4107
+ animL = a;
4108
+ else
4109
+ animR = a;
4110
+ tiltCur = c.tilt + (Math.random() < 0.5 ? -o.tiltNudge : o.tiltNudge);
4111
+ }
4112
+ function doSquint() {
4113
+ var t = now();
4114
+ animL = animR = { t0: t, dur: o.squintMs, edge: Math.min(110, o.squintMs / 2), to: o.squintTo };
4115
+ tiltCur = c.tilt + o.tiltNudge;
4116
+ if (!reduced) {
4117
+ tgtX = 0;
4118
+ tgtY = -o.driftY;
4119
+ }
4120
+ }
4121
+ function scheduleDrift() {
4122
+ clearTimeout(driftT);
4123
+ driftT = setTimeout(function() {
4124
+ if (!reduced && !sleeping && !gazing) {
4125
+ tgtX = rnd(-o.driftX, o.driftX);
4126
+ tgtY = rnd(-o.driftY, o.driftY);
4127
+ }
4128
+ scheduleDrift();
4129
+ }, rnd(o.driftMin, o.driftMax) * 1e3);
4130
+ }
4131
+ function frame(t) {
4132
+ if (!running)
4133
+ return;
4134
+ var dt = last ? Math.min(0.05, (t - last) / 1e3) : 0.016;
4135
+ last = t;
4136
+ var ease = function(tau) {
4137
+ return reduced ? 1 : 1 - Math.exp(-dt / tau);
4138
+ };
4139
+ if (t - rectAt > 250) {
4140
+ rect = svg.getBoundingClientRect();
4141
+ rectAt = t;
4142
+ }
4143
+ var want = (t - lastActivity) / 1e3 >= o.sleepAfter;
4144
+ if (want !== sleeping) {
4145
+ sleeping = want;
4146
+ if (!sleeping)
4147
+ doBlink(false);
4148
+ else {
4149
+ tgtX = 0;
4150
+ tgtY = 0;
4151
+ }
4152
+ }
4153
+ dreamAmt += ((sleeping ? 1 : 0) - dreamAmt) * ease(0.12);
4154
+ if (dreamAmt < 1e-3)
4155
+ dreamAmt = 0;
4156
+ if (dreamAmt > 0.999)
4157
+ dreamAmt = 1;
4158
+ var gx = null, gy = null;
4159
+ if (!reduced && !sleeping && pointer && rect && o.pointerMode !== "off") {
4160
+ var cxp = rect.left + rect.width / 2, cyp = rect.top + rect.height / 2;
4161
+ var dx = pointer.x - cxp, dy = pointer.y - cyp;
4162
+ var d = Math.max(1e-3, Math.sqrt(dx * dx + dy * dy));
4163
+ var inside = d <= o.followRadius;
4164
+ var aim = function(soft) {
4165
+ var m = Math.min(1, d / soft);
4166
+ gx = dx / d * o.driftX * m;
4167
+ gy = dy / d * o.driftY * m;
4168
+ };
4169
+ if (o.pointerMode === "follow") {
4170
+ if (inside)
4171
+ aim(80);
4172
+ } else {
4173
+ if (!glanceUntil && inside && t >= glanceReadyAt)
4174
+ glanceUntil = t + o.glanceMs;
4175
+ if (glanceUntil) {
4176
+ if (t < glanceUntil)
4177
+ aim(80);
4178
+ else {
4179
+ glanceUntil = 0;
4180
+ glanceReadyAt = t + o.glanceCooldown * 1e3;
4181
+ }
4182
+ }
4183
+ }
4184
+ if (t < clickLookUntil)
4185
+ aim(25);
4186
+ }
4187
+ var wasGazing = gazing;
4188
+ gazing = gx !== null;
4189
+ if (gazing) {
4190
+ tgtX = gx;
4191
+ tgtY = gy;
4192
+ } else if (wasGazing || reduced || sleeping) {
4193
+ tgtX = 0;
4194
+ tgtY = 0;
4195
+ }
4196
+ curX += (tgtX - curX) * ease(0.18);
4197
+ curY += (tgtY - curY) * ease(0.18);
4198
+ setA(look, "transform", "translate(" + curX.toFixed(3) + " " + curY.toFixed(3) + ")");
4199
+ var sl = lidAt(animL, t), sr = lidAt(animR, t);
4200
+ if (animL && t - animL.t0 >= animL.dur)
4201
+ animL = null;
4202
+ if (animR && t - animR.t0 >= animR.dur)
4203
+ animR = null;
4204
+ setA(
4205
+ eyeL,
4206
+ "transform",
4207
+ "translate(" + lx + " " + y + ") scale(1 " + sl.toFixed(3) + ") translate(" + -lx + " " + -y + ")"
4208
+ );
4209
+ setA(
4210
+ eyeR,
4211
+ "transform",
4212
+ "translate(" + rx + " " + y + ") scale(1 " + sr.toFixed(3) + ") translate(" + -rx + " " + -y + ")"
4213
+ );
4214
+ tiltCur += (c.tilt - tiltCur) * ease(0.22);
4215
+ var tstr = pillT(tiltCur.toFixed(3));
4216
+ setA(swipe, "transform", tstr);
4217
+ setA(clip, "transform", tstr);
4218
+ setA(swipe, "opacity", (1 - 0.2 * dreamAmt).toFixed(3));
4219
+ setA(dream, "opacity", dreamAmt.toFixed(3));
4220
+ setA(eyes, "opacity", (1 - dreamAmt).toFixed(3));
4221
+ raf = requestAnimationFrame(frame);
4222
+ }
4223
+ function activity() {
4224
+ lastActivity = now();
4225
+ }
4226
+ function onMove(e) {
4227
+ pointer = { x: e.clientX, y: e.clientY };
4228
+ activity();
4229
+ }
4230
+ function onDown() {
4231
+ activity();
4232
+ }
4233
+ function onKey() {
4234
+ activity();
4235
+ }
4236
+ function onClick() {
4237
+ activity();
4238
+ var t = now();
4239
+ if (t - lastClick < o.doubleClickMs)
4240
+ doSquint();
4241
+ else
4242
+ doWink();
4243
+ lastClick = t;
4244
+ clickLookUntil = t + o.clickLookMs;
4245
+ glanceReadyAt = clickLookUntil + o.glanceCooldown * 1e3;
4246
+ }
4247
+ window.addEventListener("pointermove", onMove, { passive: true });
4248
+ window.addEventListener("pointerdown", onDown, { passive: true });
4249
+ window.addEventListener("keydown", onKey, { passive: true });
4250
+ container.addEventListener("click", onClick);
4251
+ scheduleBlink();
4252
+ scheduleDrift();
4253
+ raf = requestAnimationFrame(frame);
4254
+ return {
4255
+ blink: function() {
4256
+ doBlink(false);
4257
+ },
4258
+ wink: function() {
4259
+ doWink();
4260
+ },
4261
+ sleep: function() {
4262
+ lastActivity = now() - o.sleepAfter * 1e3 - 1;
4263
+ },
4264
+ wake: function() {
4265
+ lastActivity = now();
4266
+ },
4267
+ setOptions: function(partial) {
4268
+ for (var p in partial)
4269
+ if (partial[p] !== void 0)
4270
+ o[p] = partial[p];
4271
+ if (o.blinkMax < o.blinkMin)
4272
+ o.blinkMax = o.blinkMin;
4273
+ scheduleBlink();
4274
+ scheduleDrift();
4275
+ },
4276
+ destroy: function() {
4277
+ running = false;
4278
+ cancelAnimationFrame(raf);
4279
+ clearTimeout(blinkT);
4280
+ clearTimeout(driftT);
4281
+ window.removeEventListener("pointermove", onMove);
4282
+ window.removeEventListener("pointerdown", onDown);
4283
+ window.removeEventListener("keydown", onKey);
4284
+ container.removeEventListener("click", onClick);
4285
+ container.innerHTML = "";
4286
+ }
4287
+ };
4288
+ }
4289
+ const MARK_ALT = "AG2 Space";
4290
+ const AliveMark = ({
4291
+ size = 40,
4292
+ label = "AG2 Space",
4293
+ onClick,
4294
+ character
4295
+ }) => {
4296
+ const ref = useRef(null);
4297
+ useEffect(() => {
4298
+ const container = ref.current;
4299
+ if (!container)
4300
+ return void 0;
4301
+ const handle = mountAliveMark(container, {
4302
+ size,
4303
+ label: MARK_ALT,
4304
+ ...character ? { character } : {}
4305
+ });
4306
+ return () => handle.destroy();
4307
+ }, [size, character]);
4308
+ return /* @__PURE__ */ jsx(
4309
+ "button",
4310
+ {
4311
+ type: "button",
4312
+ ref,
4313
+ "aria-label": label,
4314
+ onClick,
4315
+ style: {
4316
+ // Fixed box so the header's flex rules cannot reflow the SVG off 40x40.
4317
+ width: size,
4318
+ height: size,
4319
+ flexShrink: 0,
4320
+ display: "block",
4321
+ padding: 0,
4322
+ border: "none",
4323
+ background: "none",
4324
+ lineHeight: 0,
4325
+ cursor: "pointer"
4326
+ }
4327
+ }
4328
+ );
4329
+ };
4330
+ const ServerBadge = as(({ as: AsServerBadge = "div", fill, server, ...props }, ref) => /* @__PURE__ */ jsx(Badge, { as: AsServerBadge, variant: "Secondary", fill, radii: "300", ...props, ref, children: /* @__PURE__ */ jsx(Text, { as: "span", size: "L400", truncate: true, children: server }) }));
4331
+ const styles_css_ts_vanilla = "";
4332
+ var StackedAvatar$1 = createRuntimeFn({ defaultClassName: "_7lp3ua0", variantClassNames: { size: { "200": "_7lp3ua1", "300": "_7lp3ua2", "400": "_7lp3ua3", "500": "_7lp3ua4" }, variant: { Background: "_7lp3ua5", Surface: "_7lp3ua6", SurfaceVariant: "_7lp3ua7", Primary: "_7lp3ua8", Secondary: "_7lp3ua9", Success: "_7lp3uaa", Warning: "_7lp3uab", Critical: "_7lp3uac" } }, defaultVariants: { size: "400", variant: "Surface" }, compoundVariants: [] });
4333
+ const StackedAvatar = as(
4334
+ ({ size, variant, className, ...props }, ref) => /* @__PURE__ */ jsx(
4335
+ Avatar,
4336
+ {
4337
+ size,
4338
+ className: classNames(StackedAvatar$1({ size, variant }), className),
4339
+ ...props,
4340
+ ref
4341
+ }
4342
+ )
4343
+ );
4344
+ const ComposeIcon = () => /* @__PURE__ */ jsxs(Fragment, { children: [
4345
+ /* @__PURE__ */ jsx(
4346
+ "path",
4347
+ {
4348
+ d: "M12 4H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-6",
4349
+ stroke: "currentColor",
4350
+ strokeWidth: "2",
4351
+ strokeLinecap: "round",
4352
+ strokeLinejoin: "round"
4353
+ }
4354
+ ),
4355
+ /* @__PURE__ */ jsx(
4356
+ "path",
4357
+ {
4358
+ d: "M17.5 3.5a2.12 2.12 0 0 1 3 3L12 15l-4 1 1-4 8.5-8.5Z",
4359
+ stroke: "currentColor",
4360
+ strokeWidth: "2",
4361
+ strokeLinecap: "round",
4362
+ strokeLinejoin: "round"
4363
+ }
4364
+ )
4365
+ ] });
4366
+ const Starfield_css_ts_vanilla = "";
4367
+ var Starfield$1 = "_4j0z2c1";
4368
+ var StarfieldHost = "_4j0z2c0";
4369
+ const STAR_DENSITY = 1 / 9e3;
4370
+ const LINK_DIST = 120;
4371
+ const INK_RESAMPLE_FRAMES = 90;
4372
+ const Starfield = ({ className }) => {
4373
+ const canvasRef = useRef(null);
4374
+ useEffect(() => {
4375
+ const canvas = canvasRef.current;
4376
+ if (!canvas)
4377
+ return void 0;
4378
+ const ctx = canvas.getContext("2d");
4379
+ if (!ctx)
4380
+ return void 0;
4381
+ const reduceMotion = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
4382
+ let stars = [];
4383
+ let raf = 0;
4384
+ let frame = 0;
4385
+ let width = 0;
4386
+ let height = 0;
4387
+ let ink = "128, 128, 128";
4388
+ const sampleInk = () => {
4389
+ const rgb = getComputedStyle(canvas).color.match(/\d+/g);
4390
+ if (rgb && rgb.length >= 3)
4391
+ ink = `${rgb[0]}, ${rgb[1]}, ${rgb[2]}`;
4392
+ };
4393
+ const seed = () => {
4394
+ width = canvas.clientWidth;
4395
+ height = canvas.clientHeight;
4396
+ const dpr = Math.min(window.devicePixelRatio || 1, 2);
4397
+ canvas.width = Math.max(1, Math.round(width * dpr));
4398
+ canvas.height = Math.max(1, Math.round(height * dpr));
4399
+ ctx.setTransform(dpr, 0, 0, dpr, 0, 0);
4400
+ const count = Math.round(width * height * STAR_DENSITY);
4401
+ stars = Array.from({ length: count }, () => ({
4402
+ x: Math.random() * width,
4403
+ y: Math.random() * height,
4404
+ r: 0.6 + Math.random() * 1.1,
4405
+ phase: Math.random() * Math.PI * 2,
4406
+ twinkle: 0.01 + Math.random() * 0.02,
4407
+ drift: 0.02 + Math.random() * 0.05
4408
+ }));
4409
+ sampleInk();
4410
+ };
4411
+ const draw = () => {
4412
+ ctx.clearRect(0, 0, width, height);
4413
+ ctx.lineWidth = 1;
4414
+ for (let i = 0; i < stars.length; i += 1) {
4415
+ for (let j = i + 1; j < stars.length; j += 1) {
4416
+ const dx = stars[i].x - stars[j].x;
4417
+ const dy = stars[i].y - stars[j].y;
4418
+ const dist = Math.sqrt(dx * dx + dy * dy);
4419
+ if (dist < LINK_DIST) {
4420
+ ctx.strokeStyle = `rgba(${ink}, ${(1 - dist / LINK_DIST) * 0.1})`;
4421
+ ctx.beginPath();
4422
+ ctx.moveTo(stars[i].x, stars[i].y);
4423
+ ctx.lineTo(stars[j].x, stars[j].y);
4424
+ ctx.stroke();
4425
+ }
4426
+ }
4427
+ }
4428
+ for (let i = 0; i < stars.length; i += 1) {
4429
+ const star = stars[i];
4430
+ const alpha = reduceMotion ? 0.5 : 0.35 + 0.3 * (1 + Math.sin(star.phase + frame * star.twinkle)) * 0.5;
4431
+ ctx.fillStyle = `rgba(${ink}, ${alpha})`;
4432
+ ctx.beginPath();
4433
+ ctx.arc(star.x, star.y, star.r, 0, Math.PI * 2);
4434
+ ctx.fill();
4435
+ }
4436
+ };
4437
+ const tick = () => {
4438
+ frame += 1;
4439
+ for (let i = 0; i < stars.length; i += 1) {
4440
+ const star = stars[i];
4441
+ star.x += star.drift;
4442
+ star.y -= star.drift * 0.4;
4443
+ if (star.x > width + 2)
4444
+ star.x = -2;
4445
+ if (star.y < -2)
4446
+ star.y = height + 2;
4447
+ }
4448
+ if (frame % INK_RESAMPLE_FRAMES === 0)
4449
+ sampleInk();
4450
+ draw();
4451
+ raf = window.requestAnimationFrame(tick);
4452
+ };
4453
+ seed();
4454
+ if (reduceMotion) {
4455
+ draw();
4456
+ } else {
4457
+ raf = window.requestAnimationFrame(tick);
4458
+ }
4459
+ const resizeObserver = new ResizeObserver(() => {
4460
+ seed();
4461
+ draw();
4462
+ });
4463
+ resizeObserver.observe(canvas);
4464
+ return () => {
4465
+ window.cancelAnimationFrame(raf);
4466
+ resizeObserver.disconnect();
4467
+ };
4468
+ }, []);
4469
+ return /* @__PURE__ */ jsx("canvas", { ref: canvasRef, className: classNames(Starfield$1, className), "aria-hidden": true });
4470
+ };
4471
+ const SplashScreen_css_ts_vanilla = "";
4472
+ var SplashScreen$1 = "wf38060";
4473
+ var SplashScreenFooter = "wf38061";
4474
+ const SplashScreen = ({ children }) => /* @__PURE__ */ jsxs(Box, { className: classNames(SplashScreen$1, StarfieldHost), direction: "Column", children: [
4475
+ /* @__PURE__ */ jsx(Starfield, {}),
4476
+ children,
4477
+ /* @__PURE__ */ jsx(Box, { className: SplashScreenFooter, shrink: "No", alignItems: "Center", justifyContent: "Center", children: /* @__PURE__ */ jsx(Text, { size: "H2", align: "Center", children: "AG2 Space" }) })
4478
+ ] });
4479
+ const style_css_ts_vanilla = "";
4480
+ var PageContent$1 = "_18hg0vgb _8nex5a1 _8nex5a0";
4481
+ var PageContentCenter$1 = "_18hg0vgf _8nex5a1 _8nex5a0";
4482
+ var PageHeader$1 = createRuntimeFn({ defaultClassName: "_18hg0vg7", variantClassNames: { compact: { true: "_18hg0vg8" }, balance: { true: "_18hg0vg9" }, outlined: { true: "_18hg0vga" } }, defaultVariants: { outlined: false }, compoundVariants: [] });
4483
+ var PageHeroEmpty$1 = "_18hg0vgc _8nex5a1 _8nex5a0";
4484
+ var PageHeroEmptyCompact = "_18hg0vgd _8nex5a1 _8nex5a0";
4485
+ var PageHeroSection$1 = "_18hg0vge _8nex5a1 _8nex5a0";
4486
+ var PageNav$1 = createRuntimeFn({ defaultClassName: "", variantClassNames: { size: { "200": "_18hg0vg0", "300": "_18hg0vg1", "400": "_18hg0vg2" } }, defaultVariants: { size: "400" }, compoundVariants: [] });
4487
+ var PageNavContent$1 = "_18hg0vg6";
4488
+ var PageNavHeader$1 = createRuntimeFn({ defaultClassName: "_18hg0vg4", variantClassNames: { outlined: { true: "_18hg0vg5" } }, defaultVariants: { outlined: false }, compoundVariants: [] });
4489
+ var PageNavResizeHandle = "_18hg0vg3";
4490
+ const getResizeObserverEntry = (target, entries) => entries.find((entry) => entry.target === target);
4491
+ const useResizeObserver = (onResizeCallback, observeElement) => {
4492
+ const resizeObserver = useMemo(() => new ResizeObserver(onResizeCallback), [onResizeCallback]);
4493
+ useEffect(() => () => resizeObserver == null ? void 0 : resizeObserver.disconnect(), [resizeObserver]);
4494
+ useEffect(() => {
4495
+ const element = typeof observeElement === "function" ? observeElement() : observeElement;
4496
+ if (element)
4497
+ resizeObserver.observe(element);
4498
+ return () => {
4499
+ if (element)
4500
+ resizeObserver.unobserve(element);
4501
+ };
4502
+ }, [resizeObserver, observeElement]);
4503
+ return resizeObserver;
4504
+ };
4505
+ const useElementSizeObserver = (element, onResize) => {
4506
+ useResizeObserver(
4507
+ useCallback(
4508
+ (entries) => {
4509
+ const target = element();
4510
+ if (!target)
4511
+ return;
4512
+ const targetEntry = getResizeObserverEntry(target, entries);
4513
+ if (targetEntry) {
4514
+ const { clientWidth, clientHeight } = targetEntry.target;
4515
+ onResize(clientWidth, clientHeight, target);
4516
+ }
4517
+ },
4518
+ [element, onResize]
4519
+ ),
4520
+ element
4521
+ );
4522
+ };
4523
+ const TABLET_BREAKPOINT = 1124;
4524
+ const MOBILE_BREAKPOINT = 750;
4525
+ var ScreenSize = /* @__PURE__ */ ((ScreenSize2) => {
4526
+ ScreenSize2["Desktop"] = "Desktop";
4527
+ ScreenSize2["Tablet"] = "Tablet";
4528
+ ScreenSize2["Mobile"] = "Mobile";
4529
+ return ScreenSize2;
4530
+ })(ScreenSize || {});
4531
+ const getScreenSize = (width) => {
4532
+ if (width > TABLET_BREAKPOINT)
4533
+ return "Desktop";
4534
+ if (width > MOBILE_BREAKPOINT)
4535
+ return "Tablet";
4536
+ return "Mobile";
4537
+ };
4538
+ const useScreenSize = () => {
4539
+ const [size, setSize] = useState(getScreenSize(document.body.clientWidth));
4540
+ useElementSizeObserver(
4541
+ useCallback(() => document.body, []),
4542
+ useCallback((width) => setSize(getScreenSize(width)), [])
4543
+ );
4544
+ return size;
4545
+ };
4546
+ const ScreenSizeContext = createContext(null);
4547
+ const ScreenSizeProvider = ScreenSizeContext.Provider;
4548
+ const useScreenSizeContext = () => {
4549
+ const screenSize = useContext(ScreenSizeContext);
4550
+ if (screenSize === null) {
4551
+ throw new Error("Screen size not provided!");
4552
+ }
4553
+ return screenSize;
4554
+ };
4555
+ function beginDragOverlay(cursor) {
4556
+ const overlay = document.createElement("div");
4557
+ overlay.style.cssText = `position:fixed;inset:0;z-index:2147483647;cursor:${cursor};background:transparent`;
4558
+ document.body.appendChild(overlay);
4559
+ return () => overlay.remove();
4560
+ }
4561
+ const PageRoot = ({ nav, children }) => (
4562
+ // No divider between nav and content — the seam reads by the panel/content
4563
+ // tone step alone, so the line doesn't clutter the boundary (owner, 2026-07-11).
4564
+ /* @__PURE__ */ jsxs(Box, { grow: "Yes", className: ContainerColor({ variant: "Background" }), children: [
4565
+ nav,
4566
+ children
4567
+ ] })
4568
+ );
4569
+ const ROOM_NAV_COLLAPSED_KEY = "roomNavCollapsed";
4570
+ const navCollapseListeners = /* @__PURE__ */ new Set();
4571
+ const readNavCollapsed = () => {
4572
+ try {
4573
+ return localStorage.getItem(ROOM_NAV_COLLAPSED_KEY) === "1";
4574
+ } catch {
4575
+ return false;
4576
+ }
4577
+ };
4578
+ function useRoomNavCollapsed() {
4579
+ const [collapsed, set] = useState(readNavCollapsed);
4580
+ useEffect(() => {
4581
+ const cb = () => set(readNavCollapsed());
4582
+ navCollapseListeners.add(cb);
4583
+ return () => {
4584
+ navCollapseListeners.delete(cb);
4585
+ };
4586
+ }, []);
4587
+ const toggle = useCallback(() => {
4588
+ try {
4589
+ localStorage.setItem(ROOM_NAV_COLLAPSED_KEY, readNavCollapsed() ? "0" : "1");
4590
+ } catch {
4591
+ }
4592
+ navCollapseListeners.forEach((cb) => cb());
4593
+ }, []);
4594
+ return [collapsed, toggle];
4595
+ }
4596
+ const ROOM_NAV_WIDTH_KEY = "roomNavWidth";
4597
+ const NAV_MIN_WIDTH = 180;
4598
+ const NAV_MAX_WIDTH = 480;
4599
+ const navBtnStyle = {
4600
+ cursor: "pointer",
4601
+ background: "transparent",
4602
+ border: "none",
4603
+ color: "inherit",
4604
+ lineHeight: 1,
4605
+ display: "inline-flex",
4606
+ alignItems: "center",
4607
+ justifyContent: "center"
4608
+ };
4609
+ const PageNav = ({ size, children }) => {
4610
+ const screenSize = useScreenSizeContext();
4611
+ const isMobile = screenSize === ScreenSize.Mobile;
4612
+ const [collapsed, toggle] = useRoomNavCollapsed();
4613
+ const defaultWidth = size === "300" ? 222 : 256;
4614
+ const [width, setWidth] = useState(() => {
4615
+ try {
4616
+ const raw = localStorage.getItem(ROOM_NAV_WIDTH_KEY);
4617
+ const n = raw ? parseInt(raw, 10) : NaN;
4618
+ if (!Number.isNaN(n))
4619
+ return Math.min(NAV_MAX_WIDTH, Math.max(NAV_MIN_WIDTH, n));
4620
+ } catch {
4621
+ }
4622
+ return defaultWidth;
4623
+ });
4624
+ const [resizing, setResizing] = useState(false);
4625
+ const startResize = (e) => {
4626
+ e.preventDefault();
4627
+ const startX = e.clientX;
4628
+ const startWidth = width;
4629
+ setResizing(true);
4630
+ const releaseOverlay = beginDragOverlay("col-resize");
4631
+ const onMove = (me) => {
4632
+ const next = Math.min(
4633
+ NAV_MAX_WIDTH,
4634
+ Math.max(NAV_MIN_WIDTH, startWidth + (me.clientX - startX))
4635
+ );
4636
+ setWidth(next);
4637
+ };
4638
+ const onUp = () => {
4639
+ document.removeEventListener("mousemove", onMove);
4640
+ document.removeEventListener("mouseup", onUp);
4641
+ releaseOverlay();
4642
+ setResizing(false);
4643
+ setWidth((w) => {
4644
+ try {
4645
+ localStorage.setItem(ROOM_NAV_WIDTH_KEY, String(w));
4646
+ } catch {
4647
+ }
4648
+ return w;
4649
+ });
4650
+ };
4651
+ document.addEventListener("mousemove", onMove);
4652
+ document.addEventListener("mouseup", onUp);
4653
+ };
4654
+ if (collapsed && !isMobile) {
4655
+ return /* @__PURE__ */ jsx(
4656
+ Box,
4657
+ {
4658
+ shrink: "No",
4659
+ direction: "Column",
4660
+ alignItems: "Center",
4661
+ className: ContainerColor({ variant: "Background" }),
4662
+ style: { width: toRem(30), paddingTop: toRem(8) },
4663
+ children: /* @__PURE__ */ jsx(
4664
+ "button",
4665
+ {
4666
+ type: "button",
4667
+ title: "Show room list",
4668
+ onClick: toggle,
4669
+ style: { ...navBtnStyle, fontSize: 18, padding: toRem(4) },
4670
+ children: "›"
4671
+ }
4672
+ )
4673
+ }
4674
+ );
4675
+ }
4676
+ return /* @__PURE__ */ jsxs(
4677
+ Box,
4678
+ {
4679
+ grow: isMobile ? "Yes" : void 0,
4680
+ className: PageNav$1({ size }),
4681
+ shrink: isMobile ? "Yes" : "No",
4682
+ style: isMobile ? { position: "relative" } : { width: `${width}px`, position: "relative" },
4683
+ children: [
4684
+ /* @__PURE__ */ jsx(Box, { grow: "Yes", direction: "Column", children }),
4685
+ !isMobile && // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions -- drag-to-resize handle; mouse-only by design, ported as-is
4686
+ /* @__PURE__ */ jsx(
4687
+ "div",
4688
+ {
4689
+ role: "separator",
4690
+ "aria-orientation": "vertical",
4691
+ title: "Drag to resize",
4692
+ onMouseDown: startResize,
4693
+ "data-resizing": resizing,
4694
+ className: PageNavResizeHandle
4695
+ }
4696
+ )
4697
+ ]
4698
+ }
4699
+ );
4700
+ };
4701
+ const PageNavHeader = as(
4702
+ ({ className, outlined, ...props }, ref) => /* @__PURE__ */ jsx(
4703
+ Header,
4704
+ {
4705
+ className: classNames(PageNavHeader$1({ outlined }), className),
4706
+ variant: "Background",
4707
+ size: "500",
4708
+ ...props,
4709
+ ref
4710
+ }
4711
+ )
4712
+ );
4713
+ const PageNavContent = ({
4714
+ scrollRef,
4715
+ children
4716
+ }) => /* @__PURE__ */ jsx(Box, { grow: "Yes", direction: "Column", children: /* @__PURE__ */ jsx(
4717
+ Scroll,
4718
+ {
4719
+ ref: scrollRef,
4720
+ variant: "Background",
4721
+ direction: "Vertical",
4722
+ size: "300",
4723
+ hideTrack: true,
4724
+ visibility: "Hover",
4725
+ children: /* @__PURE__ */ jsx("div", { className: PageNavContent$1, children })
4726
+ }
4727
+ ) });
4728
+ const Page = as(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4729
+ Box,
4730
+ {
4731
+ grow: "Yes",
4732
+ direction: "Column",
4733
+ className: classNames(ContainerColor({ variant: "Surface" }), className),
4734
+ ...props,
4735
+ ref
4736
+ }
4737
+ ));
4738
+ const PageHeader = as(
4739
+ ({ className, outlined, balance, ...props }, ref) => /* @__PURE__ */ jsx(
4740
+ Header,
4741
+ {
4742
+ as: "header",
4743
+ size: "500",
4744
+ className: classNames(PageHeader$1({ balance, outlined }), className),
4745
+ ...props,
4746
+ ref
4747
+ }
4748
+ )
4749
+ );
4750
+ const PageContent = as(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { className: classNames(PageContent$1, className), ...props, ref }));
4751
+ const PageHeroEmpty = ({
4752
+ children,
4753
+ compact
4754
+ }) => /* @__PURE__ */ jsx(
4755
+ Box,
4756
+ {
4757
+ className: classNames(
4758
+ ContainerColor({ variant: "SurfaceVariant" }),
4759
+ compact ? PageHeroEmptyCompact : PageHeroEmpty$1
4760
+ ),
4761
+ direction: "Column",
4762
+ alignItems: "Center",
4763
+ justifyContent: "Center",
4764
+ gap: "200",
4765
+ children
4766
+ }
4767
+ );
4768
+ const PageHeroSection = as(
4769
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4770
+ Box,
4771
+ {
4772
+ direction: "Column",
4773
+ className: classNames(PageHeroSection$1, className),
4774
+ ...props,
4775
+ ref
4776
+ }
4777
+ )
4778
+ );
4779
+ const PageHero = ({
4780
+ icon,
4781
+ title,
4782
+ subTitle,
4783
+ children
4784
+ }) => /* @__PURE__ */ jsxs(Box, { direction: "Column", gap: "400", children: [
4785
+ /* @__PURE__ */ jsx(Box, { direction: "Column", alignItems: "Center", gap: "200", children: icon }),
4786
+ /* @__PURE__ */ jsxs(Box, { as: "h2", direction: "Column", gap: "200", alignItems: "Center", children: [
4787
+ /* @__PURE__ */ jsx(Text, { align: "Center", size: "H2", children: title }),
4788
+ /* @__PURE__ */ jsx(Text, { align: "Center", priority: "400", children: subTitle })
4789
+ ] }),
4790
+ children
4791
+ ] });
4792
+ const PageContentCenter = as(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { className: classNames(PageContentCenter$1, className), ...props, ref }));
4793
+ const NavCollapseRow = () => {
4794
+ const [, toggle] = useRoomNavCollapsed();
4795
+ return /* @__PURE__ */ jsx(
4796
+ Box,
4797
+ {
4798
+ shrink: "No",
4799
+ alignItems: "Center",
4800
+ justifyContent: "End",
4801
+ style: { height: toRem(22), paddingRight: config.space.S200 },
4802
+ children: /* @__PURE__ */ jsx(
4803
+ "button",
4804
+ {
4805
+ type: "button",
4806
+ title: "Hide room list",
4807
+ onClick: toggle,
4808
+ style: {
4809
+ background: "none",
4810
+ border: "none",
4811
+ cursor: "pointer",
4812
+ fontSize: 15,
4813
+ lineHeight: 1,
4814
+ padding: toRem(2),
4815
+ opacity: 0.65,
4816
+ color: "inherit"
4817
+ },
4818
+ children: "‹"
4819
+ }
4820
+ )
4821
+ }
4822
+ );
4823
+ };
3628
4824
  export {
4825
+ AgentGlyph,
4826
+ AgentMark,
4827
+ AgentNameTag,
4828
+ AliveMark,
3629
4829
  Avatar,
3630
4830
  AvatarFallback,
3631
4831
  AvatarImage,
@@ -3634,7 +4834,9 @@ export {
3634
4834
  Button,
3635
4835
  Checkbox,
3636
4836
  Chip,
4837
+ ComposeIcon,
3637
4838
  CrossSizeVariant,
4839
+ CutoutCard,
3638
4840
  DefaultReset,
3639
4841
  Dialog,
3640
4842
  Disabled,
@@ -3643,41 +4845,86 @@ export {
3643
4845
  Icon,
3644
4846
  IconButton,
3645
4847
  Icons,
4848
+ InfoCard,
3646
4849
  Input,
3647
4850
  Line,
4851
+ MOBILE_BREAKPOINT,
3648
4852
  Menu,
3649
4853
  MenuItem,
3650
4854
  Modal,
4855
+ NavCollapseRow,
3651
4856
  Overlay,
3652
4857
  OverlayBackdrop,
3653
4858
  OverlayCenter,
3654
4859
  OverlayContainerProvider,
4860
+ Page,
4861
+ PageContent,
4862
+ PageContentCenter,
4863
+ PageHeader,
4864
+ PageHero,
4865
+ PageHeroEmpty,
4866
+ PageHeroSection,
4867
+ PageNav,
4868
+ PageNavContent,
4869
+ PageNavHeader,
4870
+ PageRoot,
4871
+ PeopleGlyph,
3655
4872
  PopOut,
3656
4873
  PopOutContainerProvider,
3657
4874
  Portal,
3658
4875
  ProgressBar,
3659
4876
  RadiiVariant,
3660
4877
  RadioButton,
4878
+ RobotIcon,
4879
+ ScreenSize,
4880
+ ScreenSizeProvider,
3661
4881
  Scroll,
4882
+ SequenceCard,
4883
+ ServerBadge,
4884
+ SettingTile,
4885
+ Sidebar,
4886
+ SidebarAvatar,
4887
+ SidebarContent,
4888
+ SidebarFolder,
4889
+ SidebarFolderDropTarget,
4890
+ SidebarItem,
4891
+ SidebarItemBadge,
4892
+ SidebarItemTooltip,
4893
+ SidebarStack,
4894
+ SidebarStackSeparator,
4895
+ SkillGlyph,
3662
4896
  Spinner,
4897
+ SplashScreen,
4898
+ StackedAvatar,
4899
+ Starfield,
3663
4900
  Switch,
4901
+ TABLET_BREAKPOINT,
3664
4902
  Text,
3665
4903
  TextArea,
3666
4904
  TextReset,
3667
4905
  Tooltip,
3668
4906
  TooltipContainerProvider,
3669
4907
  TooltipProvider,
4908
+ TypingIndicator,
3670
4909
  as,
3671
4910
  color,
3672
4911
  config,
3673
4912
  configClass,
3674
4913
  getRelativeFixedPosition,
4914
+ getResizeObserverEntry,
4915
+ getScreenSize,
3675
4916
  lightTheme,
4917
+ mountAliveMark,
3676
4918
  percent,
3677
4919
  pxToRem,
3678
4920
  toRem,
4921
+ useElementSizeObserver,
3679
4922
  useOverlayContainer,
3680
4923
  usePopOutContainer,
4924
+ useResizeObserver,
4925
+ useRoomNavCollapsed,
4926
+ useScreenSize,
4927
+ useScreenSizeContext,
3681
4928
  useTooltipContainer,
3682
4929
  vars,
3683
4930
  varsClass