@sesionario/blocks 1.15.0 → 1.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1673,6 +1673,53 @@ function LanguageSwitcher({
1673
1673
  }
1674
1674
  );
1675
1675
  }
1676
+ var SCROLL_EDGE_EPSILON_PX = 1;
1677
+ function measureScrollEdges(el) {
1678
+ const { scrollLeft, scrollWidth, clientWidth } = el;
1679
+ return {
1680
+ canScrollLeft: scrollLeft > SCROLL_EDGE_EPSILON_PX,
1681
+ canScrollRight: scrollLeft + clientWidth < scrollWidth - SCROLL_EDGE_EPSILON_PX
1682
+ };
1683
+ }
1684
+ function useScrollFadeXEdges(enabled = true) {
1685
+ const scrollerRef = React7.useRef(null);
1686
+ const [edges, setEdges] = React7.useState({
1687
+ canScrollLeft: false,
1688
+ canScrollRight: false
1689
+ });
1690
+ React7.useEffect(() => {
1691
+ if (!enabled) {
1692
+ setEdges({ canScrollLeft: false, canScrollRight: false });
1693
+ return;
1694
+ }
1695
+ const el = scrollerRef.current;
1696
+ if (!el) return;
1697
+ function updateEdges() {
1698
+ const scroller = scrollerRef.current;
1699
+ if (!scroller) return;
1700
+ const next = measureScrollEdges(scroller);
1701
+ setEdges(
1702
+ (prev) => prev.canScrollLeft === next.canScrollLeft && prev.canScrollRight === next.canScrollRight ? prev : next
1703
+ );
1704
+ }
1705
+ updateEdges();
1706
+ el.addEventListener("scroll", updateEdges, { passive: true });
1707
+ const resizeObserver = new ResizeObserver(updateEdges);
1708
+ resizeObserver.observe(el);
1709
+ const mutationObserver = new MutationObserver(updateEdges);
1710
+ mutationObserver.observe(el, { childList: true, subtree: true });
1711
+ return () => {
1712
+ el.removeEventListener("scroll", updateEdges);
1713
+ resizeObserver.disconnect();
1714
+ mutationObserver.disconnect();
1715
+ };
1716
+ }, [enabled]);
1717
+ const fadeStyle = {
1718
+ "--scroll-fade-left": edges.canScrollLeft ? "transparent" : "#000",
1719
+ "--scroll-fade-right": edges.canScrollRight ? "transparent" : "#000"
1720
+ };
1721
+ return { scrollerRef, fadeStyle, edges };
1722
+ }
1676
1723
  function PlatformNavbar({
1677
1724
  logo,
1678
1725
  leading,
@@ -1681,6 +1728,8 @@ function PlatformNavbar({
1681
1728
  className,
1682
1729
  innerClassName
1683
1730
  }) {
1731
+ const hasCenter = center != null && center !== false;
1732
+ const { scrollerRef, fadeStyle } = useScrollFadeXEdges(hasCenter);
1684
1733
  return /* @__PURE__ */ jsxRuntime.jsx(
1685
1734
  "header",
1686
1735
  {
@@ -1699,7 +1748,15 @@ function PlatformNavbar({
1699
1748
  children: [
1700
1749
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex shrink-0 items-center gap-2", children: logo }),
1701
1750
  leading ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex shrink-0 items-center gap-2", children: leading }) : null,
1702
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex min-w-0 flex-1 items-center overflow-x-auto", children: center }),
1751
+ /* @__PURE__ */ jsxRuntime.jsx(
1752
+ "div",
1753
+ {
1754
+ ref: scrollerRef,
1755
+ className: "flex min-w-0 flex-1 items-center overflow-x-auto scroll-fade-x-edges scrollbar-none",
1756
+ style: fadeStyle,
1757
+ children: center
1758
+ }
1759
+ ),
1703
1760
  right ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex shrink-0 items-center gap-2", children: right }) : null
1704
1761
  ]
1705
1762
  }
@@ -1779,6 +1836,9 @@ var defaultLabels3 = {
1779
1836
  backoffice: "Backoffice",
1780
1837
  memberOrgs: "My organizations",
1781
1838
  managementOrgs: "Management team",
1839
+ showMoreOrgs: "Show more",
1840
+ showLessOrgs: "Show less",
1841
+ manageOrg: "Manage organization",
1782
1842
  language: "Language",
1783
1843
  theme: "Theme",
1784
1844
  themeLight: "Light",
@@ -1789,6 +1849,30 @@ var defaultLabels3 = {
1789
1849
  signingOut: "Signing out\u2026",
1790
1850
  accountSettings: "Account settings"
1791
1851
  };
1852
+ var PLATFORM_ACCOUNT_ORG_COLLAPSE_AT = 4;
1853
+ function mergePlatformAccountOrgs(memberOrgs, manageableOrgs) {
1854
+ const manageableIds = new Set(manageableOrgs.map((org) => org.id));
1855
+ const byId = /* @__PURE__ */ new Map();
1856
+ for (const org of memberOrgs) {
1857
+ byId.set(org.id, {
1858
+ ...org,
1859
+ canManage: manageableIds.has(org.id)
1860
+ });
1861
+ }
1862
+ for (const org of manageableOrgs) {
1863
+ const existing = byId.get(org.id);
1864
+ if (existing) {
1865
+ byId.set(org.id, {
1866
+ ...existing,
1867
+ canManage: true,
1868
+ logo: existing.logo ?? org.logo
1869
+ });
1870
+ } else {
1871
+ byId.set(org.id, { ...org, canManage: true });
1872
+ }
1873
+ }
1874
+ return Array.from(byId.values());
1875
+ }
1792
1876
  function MenuAvatar({
1793
1877
  name,
1794
1878
  image,
@@ -1856,6 +1940,85 @@ function LanguageThemeSubs({
1856
1940
  ] })
1857
1941
  ] });
1858
1942
  }
1943
+ function OrgMenuRows({
1944
+ orgs,
1945
+ appUrl,
1946
+ adminUrl,
1947
+ labels
1948
+ }) {
1949
+ const [expanded, setExpanded] = React7.useState(false);
1950
+ const collapsible = orgs.length > PLATFORM_ACCOUNT_ORG_COLLAPSE_AT;
1951
+ const visibleOrgs = collapsible && !expanded ? orgs.slice(0, PLATFORM_ACCOUNT_ORG_COLLAPSE_AT) : orgs;
1952
+ if (orgs.length === 0) return null;
1953
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1954
+ "div",
1955
+ {
1956
+ className: cn(
1957
+ expanded && orgs.length > PLATFORM_ACCOUNT_ORG_COLLAPSE_AT ? "max-h-64 overflow-y-auto scroll-fade-b" : void 0
1958
+ ),
1959
+ "data-testid": "platform-account-orgs",
1960
+ children: [
1961
+ visibleOrgs.map((org) => {
1962
+ const orgHomeHref = `${appUrl}/o/${org.slug}`;
1963
+ const manageHref = `${adminUrl}/api/auth/org/select?id=${encodeURIComponent(org.id)}`;
1964
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1965
+ "div",
1966
+ {
1967
+ className: "relative flex items-center",
1968
+ "data-testid": `platform-account-org-${org.id}`,
1969
+ children: [
1970
+ /* @__PURE__ */ jsxRuntime.jsx(
1971
+ DropdownMenuItem,
1972
+ {
1973
+ asChild: true,
1974
+ className: cn("min-w-0 flex-1 gap-2", org.canManage && "pr-9"),
1975
+ children: /* @__PURE__ */ jsxRuntime.jsxs("a", { href: orgHomeHref, children: [
1976
+ /* @__PURE__ */ jsxRuntime.jsx(
1977
+ MenuAvatar,
1978
+ {
1979
+ name: org.name,
1980
+ image: org.logo,
1981
+ sizeClass: "size-6"
1982
+ }
1983
+ ),
1984
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children: org.name })
1985
+ ] })
1986
+ }
1987
+ ),
1988
+ org.canManage ? /* @__PURE__ */ jsxRuntime.jsx(
1989
+ DropdownMenuItem,
1990
+ {
1991
+ asChild: true,
1992
+ className: "absolute right-1 top-1/2 size-7 -translate-y-1/2 p-0",
1993
+ children: /* @__PURE__ */ jsxRuntime.jsx("a", { href: manageHref, "aria-label": labels.manageOrg, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Settings, { className: "size-3.5" }) })
1994
+ }
1995
+ ) : null
1996
+ ]
1997
+ },
1998
+ org.id
1999
+ );
2000
+ }),
2001
+ collapsible ? /* @__PURE__ */ jsxRuntime.jsx(
2002
+ DropdownMenuItem,
2003
+ {
2004
+ className: "gap-2",
2005
+ onSelect: (event) => {
2006
+ event.preventDefault();
2007
+ setExpanded((value) => !value);
2008
+ },
2009
+ children: expanded ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2010
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronUp, { className: "size-4" }),
2011
+ labels.showLessOrgs
2012
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2013
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "size-4" }),
2014
+ labels.showMoreOrgs
2015
+ ] })
2016
+ }
2017
+ ) : null
2018
+ ]
2019
+ }
2020
+ );
2021
+ }
1859
2022
  function PlatformAccountMenu({
1860
2023
  variant = "platform",
1861
2024
  isPending = false,
@@ -1871,10 +2034,19 @@ function PlatformAccountMenu({
1871
2034
  labels: labelsProp,
1872
2035
  onSignOut,
1873
2036
  extraItems,
2037
+ trigger: triggerProp,
2038
+ contentSide,
2039
+ contentAlign = "end",
2040
+ contentSideOffset,
2041
+ contentClassName,
1874
2042
  className
1875
2043
  }) {
1876
2044
  const labels = { ...defaultLabels3, ...labelsProp };
1877
2045
  const [signingOut, setSigningOut] = React7.useState(false);
2046
+ const mergedOrgs = React7.useMemo(
2047
+ () => mergePlatformAccountOrgs(memberOrgs, manageableOrgs),
2048
+ [memberOrgs, manageableOrgs]
2049
+ );
1878
2050
  const loginHref = `${urls.authAppUrl}${urls.loginPath ?? "/login"}`;
1879
2051
  const accountHref = `${urls.authAppUrl}${urls.accountPath ?? "/account"}`;
1880
2052
  const activityHref = `${urls.authAppUrl}${urls.activityPath ?? "/account/activity"}`;
@@ -1900,7 +2072,7 @@ function PlatformAccountMenu({
1900
2072
  }
1901
2073
  );
1902
2074
  }
1903
- const trigger = user ? /* @__PURE__ */ jsxRuntime.jsx(
2075
+ const defaultTrigger = user ? /* @__PURE__ */ jsxRuntime.jsx(
1904
2076
  Button,
1905
2077
  {
1906
2078
  variant: "ghost",
@@ -1920,129 +2092,118 @@ function PlatformAccountMenu({
1920
2092
  }
1921
2093
  );
1922
2094
  return /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenu, { children: [
1923
- /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuTrigger, { asChild: true, children: trigger }),
1924
- /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuContent, { align: "end", className: "min-w-60 rounded-lg", children: user ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1925
- /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuLabel, { className: "flex items-center gap-3 p-2 font-normal", children: [
1926
- /* @__PURE__ */ jsxRuntime.jsx(
1927
- MenuAvatar,
1928
- {
1929
- name: user.name,
1930
- image: user.image,
1931
- sizeClass: "size-9"
1932
- }
1933
- ),
1934
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 flex-col", children: [
1935
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex min-w-0 items-center gap-1.5 truncate text-sm font-medium leading-tight", children: [
1936
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children: user.name }),
1937
- variant === "platform" ? /* @__PURE__ */ jsxRuntime.jsx(
1938
- VerifiedProfessionalBadge,
2095
+ /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuTrigger, { asChild: true, children: triggerProp ?? defaultTrigger }),
2096
+ /* @__PURE__ */ jsxRuntime.jsx(
2097
+ DropdownMenuContent,
2098
+ {
2099
+ side: contentSide,
2100
+ align: contentAlign,
2101
+ sideOffset: contentSideOffset,
2102
+ className: cn("min-w-60 rounded-lg", contentClassName),
2103
+ children: user ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2104
+ /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuLabel, { className: "flex items-center gap-3 p-2 font-normal", children: [
2105
+ /* @__PURE__ */ jsxRuntime.jsx(
2106
+ MenuAvatar,
1939
2107
  {
1940
- status: verificationStatus,
1941
- className: "shrink-0"
2108
+ name: user.name,
2109
+ image: user.image,
2110
+ sizeClass: "size-9"
1942
2111
  }
1943
- ) : null
1944
- ] }),
1945
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-xs text-muted-foreground leading-tight", children: user.email })
1946
- ] })
1947
- ] }),
1948
- /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuSeparator, {}),
1949
- variant === "platform" ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1950
- /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuItem, { asChild: true, className: "gap-2", children: /* @__PURE__ */ jsxRuntime.jsxs("a", { href: accountHref, children: [
1951
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.User, { className: "size-4" }),
1952
- labels.personalProfile
1953
- ] }) }),
1954
- /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuItem, { asChild: true, className: "gap-2", children: /* @__PURE__ */ jsxRuntime.jsxs("a", { href: activityHref, children: [
1955
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Activity, { className: "size-4" }),
1956
- labels.activity
1957
- ] }) }),
1958
- /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuItem, { asChild: true, className: "gap-2", children: /* @__PURE__ */ jsxRuntime.jsxs("a", { href: profileHref, children: [
1959
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.User, { className: "size-4" }),
1960
- labels.professionalProfile
1961
- ] }) }),
1962
- /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuItem, { asChild: true, className: "gap-2", children: /* @__PURE__ */ jsxRuntime.jsxs("a", { href: urls.appUrl, children: [
1963
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.LayoutDashboard, { className: "size-4" }),
1964
- labels.mainApp
1965
- ] }) }),
1966
- /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuItem, { asChild: true, className: "gap-2", children: /* @__PURE__ */ jsxRuntime.jsxs("a", { href: urls.adminUrl, children: [
1967
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Building2, { className: "size-4" }),
1968
- labels.orgManagement
1969
- ] }) }),
1970
- isAdmin && urls.backofficeUrl ? /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuItem, { asChild: true, className: "gap-2", children: /* @__PURE__ */ jsxRuntime.jsxs("a", { href: urls.backofficeUrl, children: [
1971
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.LayoutDashboard, { className: "size-4" }),
1972
- labels.backoffice
1973
- ] }) }) : null,
1974
- memberOrgs.length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuSub, { children: [
1975
- /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuSubTrigger, { className: "gap-2", children: [
1976
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Users, { className: "size-4" }),
1977
- labels.memberOrgs
2112
+ ),
2113
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 flex-col", children: [
2114
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex min-w-0 items-center gap-1.5 truncate text-sm font-medium leading-tight", children: [
2115
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children: user.name }),
2116
+ variant === "platform" ? /* @__PURE__ */ jsxRuntime.jsx(
2117
+ VerifiedProfessionalBadge,
2118
+ {
2119
+ status: verificationStatus,
2120
+ className: "shrink-0"
2121
+ }
2122
+ ) : null
2123
+ ] }),
2124
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-xs text-muted-foreground leading-tight", children: user.email })
2125
+ ] })
1978
2126
  ] }),
1979
- /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuSubContent, { className: "min-w-48 max-h-64 overflow-y-auto", children: memberOrgs.map((org) => /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuItem, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("a", { href: `${urls.appUrl}/o/${org.slug}`, children: org.name }) }, org.id)) })
1980
- ] }) : null,
1981
- manageableOrgs.length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuSub, { children: [
1982
- /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuSubTrigger, { className: "gap-2", children: [
1983
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Building2, { className: "size-4" }),
1984
- labels.managementOrgs
2127
+ /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuSeparator, {}),
2128
+ variant === "platform" ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2129
+ /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuItem, { asChild: true, className: "gap-2", children: /* @__PURE__ */ jsxRuntime.jsxs("a", { href: accountHref, children: [
2130
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.User, { className: "size-4" }),
2131
+ labels.personalProfile
2132
+ ] }) }),
2133
+ /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuItem, { asChild: true, className: "gap-2", children: /* @__PURE__ */ jsxRuntime.jsxs("a", { href: activityHref, children: [
2134
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Activity, { className: "size-4" }),
2135
+ labels.activity
2136
+ ] }) }),
2137
+ /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuItem, { asChild: true, className: "gap-2", children: /* @__PURE__ */ jsxRuntime.jsxs("a", { href: profileHref, children: [
2138
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.User, { className: "size-4" }),
2139
+ labels.professionalProfile
2140
+ ] }) }),
2141
+ /* @__PURE__ */ jsxRuntime.jsx(
2142
+ OrgMenuRows,
2143
+ {
2144
+ orgs: mergedOrgs,
2145
+ appUrl: urls.appUrl,
2146
+ adminUrl: urls.adminUrl,
2147
+ labels
2148
+ }
2149
+ ),
2150
+ extraItems,
2151
+ isAdmin && urls.backofficeUrl ? /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuItem, { asChild: true, className: "gap-2", children: /* @__PURE__ */ jsxRuntime.jsxs("a", { href: urls.backofficeUrl, children: [
2152
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.LayoutDashboard, { className: "size-4" }),
2153
+ labels.backoffice
2154
+ ] }) }) : null,
2155
+ /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuSeparator, {})
2156
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2157
+ /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuItem, { asChild: true, className: "gap-2", children: /* @__PURE__ */ jsxRuntime.jsxs("a", { href: accountHref, children: [
2158
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Settings, { className: "size-4" }),
2159
+ labels.accountSettings
2160
+ ] }) }),
2161
+ extraItems,
2162
+ /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuSeparator, {})
1985
2163
  ] }),
1986
- /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuSubContent, { className: "min-w-48 max-h-64 overflow-y-auto", children: manageableOrgs.map((org) => /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuItem, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
1987
- "a",
2164
+ /* @__PURE__ */ jsxRuntime.jsx(
2165
+ LanguageThemeSubs,
1988
2166
  {
1989
- href: `${urls.adminUrl}/api/auth/org/select?id=${encodeURIComponent(org.id)}`,
1990
- children: org.name
2167
+ languages,
2168
+ currentLanguage,
2169
+ onLanguageChange,
2170
+ labels
1991
2171
  }
1992
- ) }, org.id)) })
1993
- ] }) : null,
1994
- extraItems,
1995
- /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuSeparator, {})
1996
- ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1997
- /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuItem, { asChild: true, className: "gap-2", children: /* @__PURE__ */ jsxRuntime.jsxs("a", { href: accountHref, children: [
1998
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Settings, { className: "size-4" }),
1999
- labels.accountSettings
2000
- ] }) }),
2001
- extraItems,
2002
- /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuSeparator, {})
2003
- ] }),
2004
- /* @__PURE__ */ jsxRuntime.jsx(
2005
- LanguageThemeSubs,
2006
- {
2007
- languages,
2008
- currentLanguage,
2009
- onLanguageChange,
2010
- labels
2011
- }
2012
- ),
2013
- /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuSeparator, {}),
2014
- /* @__PURE__ */ jsxRuntime.jsxs(
2015
- DropdownMenuItem,
2016
- {
2017
- variant: "destructive",
2018
- className: "gap-2",
2019
- disabled: signingOut || !onSignOut,
2020
- onSelect: (event) => {
2021
- event.preventDefault();
2022
- void handleSignOut();
2023
- },
2024
- children: [
2025
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.LogOut, { className: "size-4" }),
2026
- signingOut ? labels.signingOut : labels.signOut
2027
- ]
2028
- }
2029
- )
2030
- ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2031
- /* @__PURE__ */ jsxRuntime.jsx(
2032
- LanguageThemeSubs,
2033
- {
2034
- languages,
2035
- currentLanguage,
2036
- onLanguageChange,
2037
- labels
2038
- }
2039
- ),
2040
- /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuSeparator, {}),
2041
- /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuItem, { asChild: true, className: "gap-2", children: /* @__PURE__ */ jsxRuntime.jsxs("a", { href: loginHref, children: [
2042
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.LogIn, { className: "size-4" }),
2043
- labels.signIn
2044
- ] }) })
2045
- ] }) })
2172
+ ),
2173
+ /* @__PURE__ */ jsxRuntime.jsxs(
2174
+ DropdownMenuItem,
2175
+ {
2176
+ variant: "destructive",
2177
+ className: "gap-2",
2178
+ disabled: signingOut || !onSignOut,
2179
+ onSelect: (event) => {
2180
+ event.preventDefault();
2181
+ void handleSignOut();
2182
+ },
2183
+ children: [
2184
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.LogOut, { className: "size-4" }),
2185
+ signingOut ? labels.signingOut : labels.signOut
2186
+ ]
2187
+ }
2188
+ )
2189
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2190
+ /* @__PURE__ */ jsxRuntime.jsx(
2191
+ LanguageThemeSubs,
2192
+ {
2193
+ languages,
2194
+ currentLanguage,
2195
+ onLanguageChange,
2196
+ labels
2197
+ }
2198
+ ),
2199
+ /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuSeparator, {}),
2200
+ /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuItem, { asChild: true, className: "gap-2", children: /* @__PURE__ */ jsxRuntime.jsxs("a", { href: loginHref, children: [
2201
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.LogIn, { className: "size-4" }),
2202
+ labels.signIn
2203
+ ] }) })
2204
+ ] })
2205
+ }
2206
+ )
2046
2207
  ] });
2047
2208
  }
2048
2209
  function Slider({
@@ -7585,6 +7746,8 @@ exports.BubbleGroup = BubbleGroup;
7585
7746
  exports.BubbleReactions = BubbleReactions;
7586
7747
  exports.ChatMessageList = ChatMessageList;
7587
7748
  exports.ConfirmDestructiveDialog = ConfirmDestructiveDialog;
7749
+ exports.DropdownMenuItem = DropdownMenuItem;
7750
+ exports.DropdownMenuSeparator = DropdownMenuSeparator;
7588
7751
  exports.EmojiInput = EmojiInput;
7589
7752
  exports.EmojiPicker = EmojiPicker;
7590
7753
  exports.EmojiPickerPopover = EmojiPickerPopover;
@@ -7622,6 +7785,7 @@ exports.MessageScrollerProvider = MessageScrollerProvider;
7622
7785
  exports.MessageScrollerViewport = MessageScrollerViewport;
7623
7786
  exports.MexicoMap = MexicoMap;
7624
7787
  exports.OrgSwitcher = OrgSwitcher;
7788
+ exports.PLATFORM_ACCOUNT_ORG_COLLAPSE_AT = PLATFORM_ACCOUNT_ORG_COLLAPSE_AT;
7625
7789
  exports.PhoneInput = PhoneInput;
7626
7790
  exports.PlatformAccountMenu = PlatformAccountMenu;
7627
7791
  exports.PlatformNavbar = PlatformNavbar;
@@ -7645,6 +7809,7 @@ exports.getAvatarColors = getAvatarColors;
7645
7809
  exports.getInitials = getInitials;
7646
7810
  exports.insertAtCaret = insertAtCaret;
7647
7811
  exports.markerVariants = markerVariants;
7812
+ exports.mergePlatformAccountOrgs = mergePlatformAccountOrgs;
7648
7813
  exports.normalizeEmojiQuery = normalizeEmojiQuery;
7649
7814
  exports.shouldRetryLiveEdge404 = shouldRetryLiveEdge404;
7650
7815
  exports.useDebouncedValue = useDebouncedValue;
@@ -7654,6 +7819,7 @@ exports.useLanguageContext = useLanguageContext;
7654
7819
  exports.useMediaQuery = useMediaQuery2;
7655
7820
  exports.usePlaybackStats = usePlaybackStats;
7656
7821
  exports.useRealtimeChannel = useRealtimeChannel;
7822
+ exports.useScrollFadeXEdges = useScrollFadeXEdges;
7657
7823
  exports.useSearchHotkey = useSearchHotkey;
7658
7824
  exports.useSupportConversation = useSupportConversation;
7659
7825
  exports.useSupportMessenger = useSupportMessenger;