@burdenoff/microfe-comradecircle 2026.827.1 → 2026.830.1

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 (74) hide show
  1. package/dist/comradecircle/components/AvatarUploadField.js +8 -8
  2. package/dist/comradecircle/components/CircleCard.js +4 -4
  3. package/dist/comradecircle/components/CommentThread.d.ts.map +1 -1
  4. package/dist/comradecircle/components/CommentThread.js +66 -61
  5. package/dist/comradecircle/components/CommentThread.js.map +1 -1
  6. package/dist/comradecircle/components/CreateCircleDialog.d.ts.map +1 -1
  7. package/dist/comradecircle/components/CreateCircleDialog.js +89 -88
  8. package/dist/comradecircle/components/CreateCircleDialog.js.map +1 -1
  9. package/dist/comradecircle/components/CreateEventDialog.d.ts.map +1 -1
  10. package/dist/comradecircle/components/CreateEventDialog.js +28 -27
  11. package/dist/comradecircle/components/CreateEventDialog.js.map +1 -1
  12. package/dist/comradecircle/components/DraftsPanel.js +13 -13
  13. package/dist/comradecircle/components/EventCard.js +5 -5
  14. package/dist/comradecircle/components/FileImage.js +5 -5
  15. package/dist/comradecircle/components/ImageAttachments.js +21 -21
  16. package/dist/comradecircle/components/MemberIdentity.js +4 -4
  17. package/dist/comradecircle/components/MobileBottomNav.d.ts.map +1 -1
  18. package/dist/comradecircle/components/MobileBottomNav.js +37 -30
  19. package/dist/comradecircle/components/MobileBottomNav.js.map +1 -1
  20. package/dist/comradecircle/components/Pagination.d.ts.map +1 -1
  21. package/dist/comradecircle/components/Pagination.js +37 -28
  22. package/dist/comradecircle/components/Pagination.js.map +1 -1
  23. package/dist/comradecircle/components/PollCard.js +13 -13
  24. package/dist/comradecircle/components/PostCard.d.ts.map +1 -1
  25. package/dist/comradecircle/components/PostCard.js +102 -89
  26. package/dist/comradecircle/components/PostCard.js.map +1 -1
  27. package/dist/comradecircle/components/PostComposer.js +4 -4
  28. package/dist/comradecircle/components/ReactionBar.d.ts.map +1 -1
  29. package/dist/comradecircle/components/ReactionBar.js +65 -55
  30. package/dist/comradecircle/components/ReactionBar.js.map +1 -1
  31. package/dist/comradecircle/components/StateViews.d.ts.map +1 -1
  32. package/dist/comradecircle/components/StateViews.js +38 -30
  33. package/dist/comradecircle/components/StateViews.js.map +1 -1
  34. package/dist/comradecircle/components/UpcomingEvents.js +17 -17
  35. package/dist/comradecircle/hooks/index.d.ts +1 -0
  36. package/dist/comradecircle/hooks/index.d.ts.map +1 -1
  37. package/dist/comradecircle/hooks/index.js +1 -0
  38. package/dist/comradecircle/hooks/useTr.d.ts +18 -0
  39. package/dist/comradecircle/hooks/useTr.d.ts.map +1 -0
  40. package/dist/comradecircle/hooks/useTr.js +12 -0
  41. package/dist/comradecircle/hooks/useTr.js.map +1 -0
  42. package/dist/comradecircle/pages/FeedPage.d.ts.map +1 -1
  43. package/dist/comradecircle/pages/FeedPage.js +75 -62
  44. package/dist/comradecircle/pages/FeedPage.js.map +1 -1
  45. package/dist/comradecircle/pages/circles/CircleDetailPage.d.ts.map +1 -1
  46. package/dist/comradecircle/pages/circles/CircleDetailPage.js +439 -401
  47. package/dist/comradecircle/pages/circles/CircleDetailPage.js.map +1 -1
  48. package/dist/comradecircle/pages/circles/CirclesPage.d.ts.map +1 -1
  49. package/dist/comradecircle/pages/circles/CirclesPage.js +124 -117
  50. package/dist/comradecircle/pages/circles/CirclesPage.js.map +1 -1
  51. package/dist/comradecircle/pages/events/EventDetailPage.d.ts.map +1 -1
  52. package/dist/comradecircle/pages/events/EventDetailPage.js +182 -153
  53. package/dist/comradecircle/pages/events/EventDetailPage.js.map +1 -1
  54. package/dist/comradecircle/pages/events/EventsPage.d.ts.map +1 -1
  55. package/dist/comradecircle/pages/events/EventsPage.js +100 -91
  56. package/dist/comradecircle/pages/events/EventsPage.js.map +1 -1
  57. package/dist/comradecircle/pages/members/MemberProfilePage.d.ts.map +1 -1
  58. package/dist/comradecircle/pages/members/MemberProfilePage.js +172 -159
  59. package/dist/comradecircle/pages/members/MemberProfilePage.js.map +1 -1
  60. package/dist/comradecircle/pages/members/MembersPage.d.ts.map +1 -1
  61. package/dist/comradecircle/pages/members/MembersPage.js +103 -104
  62. package/dist/comradecircle/pages/members/MembersPage.js.map +1 -1
  63. package/dist/comradecircle/pages/monetization/MonetizationPage.d.ts.map +1 -1
  64. package/dist/comradecircle/pages/monetization/MonetizationPage.js +319 -297
  65. package/dist/comradecircle/pages/monetization/MonetizationPage.js.map +1 -1
  66. package/dist/comradecircle/pages/posts/PostThreadPage.d.ts.map +1 -1
  67. package/dist/comradecircle/pages/posts/PostThreadPage.js +37 -32
  68. package/dist/comradecircle/pages/posts/PostThreadPage.js.map +1 -1
  69. package/dist/comradecircle/pages/profile/MyProfilePage.d.ts.map +1 -1
  70. package/dist/comradecircle/pages/profile/MyProfilePage.js +182 -177
  71. package/dist/comradecircle/pages/profile/MyProfilePage.js.map +1 -1
  72. package/dist/comradecircle/utils/i18n.js +15 -0
  73. package/dist/comradecircle/utils/i18n.js.map +1 -0
  74. package/package.json +1 -1
@@ -1,58 +1,65 @@
1
1
  import { useComradeCircle as e } from "../context/ComradeCircleContext.js";
2
2
  import "../context/index.js";
3
- import { cn as t } from "../utils/cn.js";
4
- import { CalendarDays as n, Contact as r, Newspaper as i, UserCircle as a, Users as o } from "lucide-react";
5
- import { useLocation as s } from "react-router";
6
- import { jsx as c, jsxs as l } from "react/jsx-runtime";
3
+ import { useTr as t } from "../hooks/useTr.js";
4
+ import "../hooks/index.js";
5
+ import { cn as n } from "../utils/cn.js";
6
+ import { CalendarDays as r, Contact as i, Newspaper as a, UserCircle as o, Users as s } from "lucide-react";
7
+ import { useLocation as c } from "react-router";
8
+ import { jsx as l, jsxs as u } from "react/jsx-runtime";
7
9
  //#region src/comradecircle/components/MobileBottomNav.tsx
8
- var u = [
10
+ var d = [
9
11
  {
10
12
  id: "feed",
11
- label: "Home",
13
+ labelKey: "comradecircle.nav.feed",
14
+ labelFallback: "Home",
12
15
  path: "",
13
- icon: i
16
+ icon: a
14
17
  },
15
18
  {
16
19
  id: "circles",
17
- label: "Circles",
20
+ labelKey: "comradecircle.nav.circles",
21
+ labelFallback: "Circles",
18
22
  path: "circles",
19
- icon: o
23
+ icon: s
20
24
  },
21
25
  {
22
26
  id: "events",
23
- label: "Events",
27
+ labelKey: "comradecircle.nav.events",
28
+ labelFallback: "Events",
24
29
  path: "events",
25
- icon: n
30
+ icon: r
26
31
  },
27
32
  {
28
33
  id: "members",
29
- label: "Members",
34
+ labelKey: "comradecircle.nav.members",
35
+ labelFallback: "Members",
30
36
  path: "members",
31
- icon: r
37
+ icon: i
32
38
  },
33
39
  {
34
40
  id: "profile",
35
- label: "Profile",
41
+ labelKey: "comradecircle.nav.profile",
42
+ labelFallback: "Profile",
36
43
  path: "profile",
37
- icon: a
44
+ icon: o
38
45
  }
39
- ], d = () => {
40
- let { getPath: n, navigateTo: r } = e(), i = s();
41
- return /* @__PURE__ */ c("nav", {
42
- "aria-label": "ComradeCircle mobile navigation",
43
- className: t("fixed inset-x-0 bottom-0 z-40 lg:hidden", "border-t border-border-seam bg-bg-surface/95 backdrop-blur-sm", "pb-[max(env(safe-area-inset-bottom),0px)]"),
44
- children: /* @__PURE__ */ c("ul", {
46
+ ], f = () => {
47
+ let { getPath: r, navigateTo: i } = e(), a = c(), o = t();
48
+ return /* @__PURE__ */ l("nav", {
49
+ "aria-label": o("comradecircle.nav.mobileAriaLabel", "ComradeCircle mobile navigation"),
50
+ className: n("fixed inset-x-0 bottom-0 z-40 lg:hidden", "border-t border-border-seam bg-bg-surface/95 backdrop-blur-sm", "pb-[max(env(safe-area-inset-bottom),0px)]"),
51
+ children: /* @__PURE__ */ l("ul", {
45
52
  className: "flex",
46
- children: u.map((e) => {
47
- let a = n(e.path), o = e.path === "" ? i.pathname === a : i.pathname === a || i.pathname.startsWith(`${a}/`), s = e.icon;
48
- return /* @__PURE__ */ c("li", {
53
+ children: d.map((e) => {
54
+ let t = r(e.path), s = e.path === "" ? a.pathname === t : a.pathname === t || a.pathname.startsWith(`${t}/`), c = e.icon;
55
+ return /* @__PURE__ */ l("li", {
49
56
  className: "flex-1",
50
- children: /* @__PURE__ */ l("button", {
57
+ children: /* @__PURE__ */ u("button", {
51
58
  type: "button",
52
- "aria-current": o ? "page" : void 0,
53
- onClick: () => r(e.path),
54
- className: t("flex w-full flex-col items-center gap-1 py-2.5 text-[11px] font-medium transition-colors", o ? "text-accent" : "text-text-tertiary hover:text-text-secondary"),
55
- children: [/* @__PURE__ */ c(s, { className: t("h-5 w-5", o && "text-accent") }), e.label]
59
+ "aria-current": s ? "page" : void 0,
60
+ onClick: () => i(e.path),
61
+ className: n("flex w-full flex-col items-center gap-1 py-2.5 text-[11px] font-medium transition-colors", s ? "text-accent" : "text-text-tertiary hover:text-text-secondary"),
62
+ children: [/* @__PURE__ */ l(c, { className: n("h-5 w-5", s && "text-accent") }), o(e.labelKey, e.labelFallback)]
56
63
  })
57
64
  }, e.id);
58
65
  })
@@ -60,6 +67,6 @@ var u = [
60
67
  });
61
68
  };
62
69
  //#endregion
63
- export { d as MobileBottomNav };
70
+ export { f as MobileBottomNav };
64
71
 
65
72
  //# sourceMappingURL=MobileBottomNav.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MobileBottomNav.js","names":[],"sources":["../../../src/comradecircle/components/MobileBottomNav.tsx"],"sourcesContent":["/**\n * MobileBottomNav — ComradeCircle's product-specific mobile tab bar (BOFF-3957).\n * @module comradecircle/components\n *\n * The mobile mocks (`comradecircle-00-mobile-app-preview.png`,\n * `comradecircle-19/20/21-mobile-*.png`) show a fixed Home / Circles / Events /\n * Members / Profile bottom tab bar instead of the shared app-shell's\n * collapsible sidebar/hamburger menu. Mirrors the same five items registered\n * with the host shell in `ComradeCircleRoot` (id/path/icon/order) so the two\n * navs never drift.\n *\n * Fixed at the bottom of the viewport, hidden at and above the `lg` breakpoint\n * to match every other responsive split already used in this MFE (see the\n * `lg:hidden` mobile channel picker / `hidden lg:block` desktop rail in\n * `CircleDetailPage`). Uses `flex` with each tab `flex-1` rather than a CSS\n * grid: build-time MFE composition means only utility classes the host\n * shell's own Tailwind build already emits reach this MFE at runtime, and\n * `grid`/`grid-cols-*` is not reliably among them.\n */\n\nimport type { FC } from 'react';\nimport { Newspaper, Users, CalendarDays, Contact, UserCircle } from 'lucide-react';\nimport { useLocation } from 'react-router';\nimport { useComradeCircle } from '../context';\nimport { cn } from '../utils/cn';\n\ninterface TabDef {\n id: string;\n label: string;\n /** Path relative to basePath, '' for the home feed. */\n path: string;\n icon: FC<{ className?: string }>;\n}\n\nconst TABS: TabDef[] = [\n { id: 'feed', label: 'Home', path: '', icon: Newspaper },\n { id: 'circles', label: 'Circles', path: 'circles', icon: Users },\n { id: 'events', label: 'Events', path: 'events', icon: CalendarDays },\n { id: 'members', label: 'Members', path: 'members', icon: Contact },\n { id: 'profile', label: 'Profile', path: 'profile', icon: UserCircle },\n];\n\nexport const MobileBottomNav: FC = () => {\n const { getPath, navigateTo } = useComradeCircle();\n const location = useLocation();\n\n return (\n <nav\n aria-label=\"ComradeCircle mobile navigation\"\n className={cn(\n 'fixed inset-x-0 bottom-0 z-40 lg:hidden',\n 'border-t border-border-seam bg-bg-surface/95 backdrop-blur-sm',\n 'pb-[max(env(safe-area-inset-bottom),0px)]'\n )}\n >\n <ul className=\"flex\">\n {TABS.map((tab) => {\n const target = getPath(tab.path);\n const isActive =\n tab.path === ''\n ? location.pathname === target\n : location.pathname === target || location.pathname.startsWith(`${target}/`);\n const Icon = tab.icon;\n return (\n <li key={tab.id} className=\"flex-1\">\n <button\n type=\"button\"\n aria-current={isActive ? 'page' : undefined}\n onClick={() => navigateTo(tab.path)}\n className={cn(\n 'flex w-full flex-col items-center gap-1 py-2.5 text-[11px] font-medium transition-colors',\n isActive ? 'text-accent' : 'text-text-tertiary hover:text-text-secondary'\n )}\n >\n <Icon className={cn('h-5 w-5', isActive && 'text-accent')} />\n {tab.label}\n </button>\n </li>\n );\n })}\n </ul>\n </nav>\n );\n};\n"],"mappings":";;;;;;;AAkCA,IAAM,IAAiB;CACrB;EAAE,IAAI;EAAQ,OAAO;EAAQ,MAAM;EAAI,MAAM;CAAU;CACvD;EAAE,IAAI;EAAW,OAAO;EAAW,MAAM;EAAW,MAAM;CAAM;CAChE;EAAE,IAAI;EAAU,OAAO;EAAU,MAAM;EAAU,MAAM;CAAa;CACpE;EAAE,IAAI;EAAW,OAAO;EAAW,MAAM;EAAW,MAAM;CAAQ;CAClE;EAAE,IAAI;EAAW,OAAO;EAAW,MAAM;EAAW,MAAM;CAAW;AACvE,GAEa,UAA4B;CACvC,IAAM,EAAE,YAAS,kBAAe,EAAiB,GAC3C,IAAW,EAAY;CAE7B,OACE,kBAAC,OAAD;EACE,cAAW;EACX,WAAW,EACT,2CACA,iEACA,2CACF;YAEA,kBAAC,MAAD;GAAI,WAAU;aACX,EAAK,KAAK,MAAQ;IACjB,IAAM,IAAS,EAAQ,EAAI,IAAI,GACzB,IACJ,EAAI,SAAS,KACT,EAAS,aAAa,IACtB,EAAS,aAAa,KAAU,EAAS,SAAS,WAAW,GAAG,EAAO,EAAE,GACzE,IAAO,EAAI;IACjB,OACE,kBAAC,MAAD;KAAiB,WAAU;eACzB,kBAAC,UAAD;MACE,MAAK;MACL,gBAAc,IAAW,SAAS,KAAA;MAClC,eAAe,EAAW,EAAI,IAAI;MAClC,WAAW,EACT,4FACA,IAAW,gBAAgB,8CAC7B;gBAPF,CASE,kBAAC,GAAD,EAAM,WAAW,EAAG,WAAW,KAAY,aAAa,EAAI,CAAA,GAC3D,EAAI,KACC;;IACN,GAbK,EAAI,EAaT;GAER,CAAC;EACC,CAAA;CACD,CAAA;AAET"}
1
+ {"version":3,"file":"MobileBottomNav.js","names":[],"sources":["../../../src/comradecircle/components/MobileBottomNav.tsx"],"sourcesContent":["/**\n * MobileBottomNav — ComradeCircle's product-specific mobile tab bar (BOFF-3957).\n * @module comradecircle/components\n *\n * The mobile mocks (`comradecircle-00-mobile-app-preview.png`,\n * `comradecircle-19/20/21-mobile-*.png`) show a fixed Home / Circles / Events /\n * Members / Profile bottom tab bar instead of the shared app-shell's\n * collapsible sidebar/hamburger menu. Mirrors the same five items registered\n * with the host shell in `ComradeCircleRoot` (id/path/icon/order) so the two\n * navs never drift.\n *\n * Fixed at the bottom of the viewport, hidden at and above the `lg` breakpoint\n * to match every other responsive split already used in this MFE (see the\n * `lg:hidden` mobile channel picker / `hidden lg:block` desktop rail in\n * `CircleDetailPage`). Uses `flex` with each tab `flex-1` rather than a CSS\n * grid: build-time MFE composition means only utility classes the host\n * shell's own Tailwind build already emits reach this MFE at runtime, and\n * `grid`/`grid-cols-*` is not reliably among them.\n */\n\nimport type { FC } from 'react';\nimport { Newspaper, Users, CalendarDays, Contact, UserCircle } from 'lucide-react';\nimport { useLocation } from 'react-router';\nimport { useComradeCircle } from '../context';\nimport { useTr } from '../hooks';\nimport { cn } from '../utils/cn';\n\ninterface TabDef {\n id: string;\n labelKey: string;\n labelFallback: string;\n /** Path relative to basePath, '' for the home feed. */\n path: string;\n icon: FC<{ className?: string }>;\n}\n\nconst TABS: TabDef[] = [\n {\n id: 'feed',\n labelKey: 'comradecircle.nav.feed',\n labelFallback: 'Home',\n path: '',\n icon: Newspaper,\n },\n {\n id: 'circles',\n labelKey: 'comradecircle.nav.circles',\n labelFallback: 'Circles',\n path: 'circles',\n icon: Users,\n },\n {\n id: 'events',\n labelKey: 'comradecircle.nav.events',\n labelFallback: 'Events',\n path: 'events',\n icon: CalendarDays,\n },\n {\n id: 'members',\n labelKey: 'comradecircle.nav.members',\n labelFallback: 'Members',\n path: 'members',\n icon: Contact,\n },\n {\n id: 'profile',\n labelKey: 'comradecircle.nav.profile',\n labelFallback: 'Profile',\n path: 'profile',\n icon: UserCircle,\n },\n];\n\nexport const MobileBottomNav: FC = () => {\n const { getPath, navigateTo } = useComradeCircle();\n const location = useLocation();\n const tr = useTr();\n\n return (\n <nav\n aria-label={tr('comradecircle.nav.mobileAriaLabel', 'ComradeCircle mobile navigation')}\n className={cn(\n 'fixed inset-x-0 bottom-0 z-40 lg:hidden',\n 'border-t border-border-seam bg-bg-surface/95 backdrop-blur-sm',\n 'pb-[max(env(safe-area-inset-bottom),0px)]'\n )}\n >\n <ul className=\"flex\">\n {TABS.map((tab) => {\n const target = getPath(tab.path);\n const isActive =\n tab.path === ''\n ? location.pathname === target\n : location.pathname === target || location.pathname.startsWith(`${target}/`);\n const Icon = tab.icon;\n return (\n <li key={tab.id} className=\"flex-1\">\n <button\n type=\"button\"\n aria-current={isActive ? 'page' : undefined}\n onClick={() => navigateTo(tab.path)}\n className={cn(\n 'flex w-full flex-col items-center gap-1 py-2.5 text-[11px] font-medium transition-colors',\n isActive ? 'text-accent' : 'text-text-tertiary hover:text-text-secondary'\n )}\n >\n <Icon className={cn('h-5 w-5', isActive && 'text-accent')} />\n {tr(tab.labelKey, tab.labelFallback)}\n </button>\n </li>\n );\n })}\n </ul>\n </nav>\n );\n};\n"],"mappings":";;;;;;;;;AAoCA,IAAM,IAAiB;CACrB;EACE,IAAI;EACJ,UAAU;EACV,eAAe;EACf,MAAM;EACN,MAAM;CACR;CACA;EACE,IAAI;EACJ,UAAU;EACV,eAAe;EACf,MAAM;EACN,MAAM;CACR;CACA;EACE,IAAI;EACJ,UAAU;EACV,eAAe;EACf,MAAM;EACN,MAAM;CACR;CACA;EACE,IAAI;EACJ,UAAU;EACV,eAAe;EACf,MAAM;EACN,MAAM;CACR;CACA;EACE,IAAI;EACJ,UAAU;EACV,eAAe;EACf,MAAM;EACN,MAAM;CACR;AACF,GAEa,UAA4B;CACvC,IAAM,EAAE,YAAS,kBAAe,EAAiB,GAC3C,IAAW,EAAY,GACvB,IAAK,EAAM;CAEjB,OACE,kBAAC,OAAD;EACE,cAAY,EAAG,qCAAqC,iCAAiC;EACrF,WAAW,EACT,2CACA,iEACA,2CACF;YAEA,kBAAC,MAAD;GAAI,WAAU;aACX,EAAK,KAAK,MAAQ;IACjB,IAAM,IAAS,EAAQ,EAAI,IAAI,GACzB,IACJ,EAAI,SAAS,KACT,EAAS,aAAa,IACtB,EAAS,aAAa,KAAU,EAAS,SAAS,WAAW,GAAG,EAAO,EAAE,GACzE,IAAO,EAAI;IACjB,OACE,kBAAC,MAAD;KAAiB,WAAU;eACzB,kBAAC,UAAD;MACE,MAAK;MACL,gBAAc,IAAW,SAAS,KAAA;MAClC,eAAe,EAAW,EAAI,IAAI;MAClC,WAAW,EACT,4FACA,IAAW,gBAAgB,8CAC7B;gBAPF,CASE,kBAAC,GAAD,EAAM,WAAW,EAAG,WAAW,KAAY,aAAa,EAAI,CAAA,GAC3D,EAAG,EAAI,UAAU,EAAI,aAAa,CAC7B;;IACN,GAbK,EAAI,EAaT;GAER,CAAC;EACC,CAAA;CACD,CAAA;AAET"}
@@ -1 +1 @@
1
- {"version":3,"file":"Pagination.d.ts","sourceRoot":"","sources":["../../../src/comradecircle/components/Pagination.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAMH,UAAU,eAAe;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,0CAA0C;IAC1C,SAAS,EAAE,MAAM,CAAC;IAClB,wDAAwD;IACxD,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,OAAO,EACP,YAAY,EACZ,SAAS,GACV,EAAE,eAAe,kDAuCjB"}
1
+ {"version":3,"file":"Pagination.d.ts","sourceRoot":"","sources":["../../../src/comradecircle/components/Pagination.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAOH,UAAU,eAAe;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,0CAA0C;IAC1C,SAAS,EAAE,MAAM,CAAC;IAClB,wDAAwD;IACxD,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,OAAO,EACP,YAAY,EACZ,SAAS,GACV,EAAE,eAAe,kDA2CjB"}
@@ -1,50 +1,59 @@
1
- import { cn as e } from "../utils/cn.js";
2
- import { ChevronLeft as t, ChevronRight as n } from "lucide-react";
3
- import { jsx as r, jsxs as i } from "react/jsx-runtime";
4
- import { Button as a } from "@burdenoff/fe-libs/ui";
1
+ import { useTr as e } from "../hooks/useTr.js";
2
+ import "../hooks/index.js";
3
+ import { cn as t } from "../utils/cn.js";
4
+ import { ChevronLeft as n, ChevronRight as r } from "lucide-react";
5
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
6
+ import { Button as o } from "@burdenoff/fe-libs/ui";
5
7
  //#region src/comradecircle/components/Pagination.tsx
6
- function o({ page: o, pageSize: s, itemCount: c, hasMore: l, onPageChange: u, className: d }) {
7
- if (o === 0 && !l) return null;
8
- let f = c === 0 ? 0 : o * s + 1, p = o * s + c;
9
- return /* @__PURE__ */ i("div", {
10
- className: e("mt-4 flex flex-col items-center justify-between gap-3 sm:flex-row", d),
8
+ function s({ page: s, pageSize: c, itemCount: l, hasMore: u, onPageChange: d, className: f }) {
9
+ let p = e();
10
+ if (s === 0 && !u) return null;
11
+ let m = l === 0 ? 0 : s * c + 1, h = s * c + l;
12
+ return /* @__PURE__ */ a("div", {
13
+ className: t("mt-4 flex flex-col items-center justify-between gap-3 sm:flex-row", f),
11
14
  children: [/* @__PURE__ */ i("p", {
12
15
  className: "text-sm text-text-secondary tabular-nums",
13
16
  "aria-live": "polite",
14
- children: [
15
- "Showing ",
16
- f,
17
- "–",
18
- p
19
- ]
20
- }), /* @__PURE__ */ i("div", {
17
+ children: p("comradecircle.components.pagination.showing", "Showing {{from}}–{{to}}", {
18
+ from: m,
19
+ to: h
20
+ })
21
+ }), /* @__PURE__ */ a("div", {
21
22
  className: "flex items-center gap-2",
22
23
  children: [
23
- /* @__PURE__ */ i(a, {
24
+ /* @__PURE__ */ a(o, {
24
25
  variant: "outline",
25
26
  size: "sm",
26
- onClick: () => u(o - 1),
27
- disabled: o === 0,
28
- "aria-label": "Previous page",
29
- children: [/* @__PURE__ */ r(t, { className: "mr-1 h-4 w-4" }), " Previous"]
27
+ onClick: () => d(s - 1),
28
+ disabled: s === 0,
29
+ "aria-label": p("comradecircle.components.pagination.previousAriaLabel", "Previous page"),
30
+ children: [
31
+ /* @__PURE__ */ i(n, { className: "mr-1 h-4 w-4" }),
32
+ " ",
33
+ p("comradecircle.components.pagination.previous", "Previous")
34
+ ]
30
35
  }),
31
36
  /* @__PURE__ */ i("span", {
32
37
  className: "min-w-[4.5rem] text-center text-sm text-text-secondary tabular-nums",
33
- children: ["Page ", o + 1]
38
+ children: p("comradecircle.components.pagination.page", "Page {{page}}", { page: s + 1 })
34
39
  }),
35
- /* @__PURE__ */ i(a, {
40
+ /* @__PURE__ */ a(o, {
36
41
  variant: "outline",
37
42
  size: "sm",
38
- onClick: () => u(o + 1),
39
- disabled: !l,
40
- "aria-label": "Next page",
41
- children: ["Next ", /* @__PURE__ */ r(n, { className: "ml-1 h-4 w-4" })]
43
+ onClick: () => d(s + 1),
44
+ disabled: !u,
45
+ "aria-label": p("comradecircle.components.pagination.nextAriaLabel", "Next page"),
46
+ children: [
47
+ p("comradecircle.components.pagination.next", "Next"),
48
+ " ",
49
+ /* @__PURE__ */ i(r, { className: "ml-1 h-4 w-4" })
50
+ ]
42
51
  })
43
52
  ]
44
53
  })]
45
54
  });
46
55
  }
47
56
  //#endregion
48
- export { o as Pagination };
57
+ export { s as Pagination };
49
58
 
50
59
  //# sourceMappingURL=Pagination.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Pagination.js","names":[],"sources":["../../../src/comradecircle/components/Pagination.tsx"],"sourcesContent":["/**\n * Pagination — cursor-aware Prev/Next control for Com* connection lists.\n * @module comradecircle/components\n *\n * The svc list connections return `pageInfo { cursor, hasMore }` and paginate by\n * cursor (offset is a no-op). Pages track a 0-indexed `page` for display and a\n * cursor stack for navigation; this control exposes Prev/Next, disabling Prev on\n * page 0 and Next when the server reports no more rows.\n */\n\nimport { ChevronLeft, ChevronRight } from 'lucide-react';\nimport { Button } from '@burdenoff/fe-libs/ui';\nimport { cn } from '../utils/cn';\n\ninterface PaginationProps {\n page: number;\n pageSize: number;\n /** Number of rows on the current page. */\n itemCount: number;\n /** Server flag: are there more rows after this page? */\n hasMore: boolean;\n onPageChange: (page: number) => void;\n className?: string;\n}\n\nexport function Pagination({\n page,\n pageSize,\n itemCount,\n hasMore,\n onPageChange,\n className,\n}: PaginationProps) {\n // Nothing to paginate: single page that also has no more rows.\n if (page === 0 && !hasMore) return null;\n\n const from = itemCount === 0 ? 0 : page * pageSize + 1;\n const to = page * pageSize + itemCount;\n\n return (\n <div\n className={cn('mt-4 flex flex-col items-center justify-between gap-3 sm:flex-row', className)}\n >\n <p className=\"text-sm text-text-secondary tabular-nums\" aria-live=\"polite\">\n Showing {from}–{to}\n </p>\n <div className=\"flex items-center gap-2\">\n <Button\n variant=\"outline\"\n size=\"sm\"\n onClick={() => onPageChange(page - 1)}\n disabled={page === 0}\n aria-label=\"Previous page\"\n >\n <ChevronLeft className=\"mr-1 h-4 w-4\" /> Previous\n </Button>\n <span className=\"min-w-[4.5rem] text-center text-sm text-text-secondary tabular-nums\">\n Page {page + 1}\n </span>\n <Button\n variant=\"outline\"\n size=\"sm\"\n onClick={() => onPageChange(page + 1)}\n disabled={!hasMore}\n aria-label=\"Next page\"\n >\n Next <ChevronRight className=\"ml-1 h-4 w-4\" />\n </Button>\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;AAyBA,SAAgB,EAAW,EACzB,SACA,aACA,cACA,YACA,iBACA,gBACkB;CAElB,IAAI,MAAS,KAAK,CAAC,GAAS,OAAO;CAEnC,IAAM,IAAO,MAAc,IAAI,IAAI,IAAO,IAAW,GAC/C,IAAK,IAAO,IAAW;CAE7B,OACE,kBAAC,OAAD;EACE,WAAW,EAAG,qEAAqE,CAAS;YAD9F,CAGE,kBAAC,KAAD;GAAG,WAAU;GAA2C,aAAU;aAAlE;IAA2E;IAChE;IAAK;IAAE;GACf;MACH,kBAAC,OAAD;GAAK,WAAU;aAAf;IACE,kBAAC,GAAD;KACE,SAAQ;KACR,MAAK;KACL,eAAe,EAAa,IAAO,CAAC;KACpC,UAAU,MAAS;KACnB,cAAW;eALb,CAOE,kBAAC,GAAD,EAAa,WAAU,eAAgB,CAAA,GAAC,WAClC;;IACR,kBAAC,QAAD;KAAM,WAAU;eAAhB,CAAsF,SAC9E,IAAO,CACT;;IACN,kBAAC,GAAD;KACE,SAAQ;KACR,MAAK;KACL,eAAe,EAAa,IAAO,CAAC;KACpC,UAAU,CAAC;KACX,cAAW;eALb,CAMC,SACM,kBAAC,GAAD,EAAc,WAAU,eAAgB,CAAA,CACvC;;GACL;IACF;;AAET"}
1
+ {"version":3,"file":"Pagination.js","names":[],"sources":["../../../src/comradecircle/components/Pagination.tsx"],"sourcesContent":["/**\n * Pagination — cursor-aware Prev/Next control for Com* connection lists.\n * @module comradecircle/components\n *\n * The svc list connections return `pageInfo { cursor, hasMore }` and paginate by\n * cursor (offset is a no-op). Pages track a 0-indexed `page` for display and a\n * cursor stack for navigation; this control exposes Prev/Next, disabling Prev on\n * page 0 and Next when the server reports no more rows.\n */\n\nimport { ChevronLeft, ChevronRight } from 'lucide-react';\nimport { Button } from '@burdenoff/fe-libs/ui';\nimport { useTr } from '../hooks';\nimport { cn } from '../utils/cn';\n\ninterface PaginationProps {\n page: number;\n pageSize: number;\n /** Number of rows on the current page. */\n itemCount: number;\n /** Server flag: are there more rows after this page? */\n hasMore: boolean;\n onPageChange: (page: number) => void;\n className?: string;\n}\n\nexport function Pagination({\n page,\n pageSize,\n itemCount,\n hasMore,\n onPageChange,\n className,\n}: PaginationProps) {\n const tr = useTr();\n\n // Nothing to paginate: single page that also has no more rows.\n if (page === 0 && !hasMore) return null;\n\n const from = itemCount === 0 ? 0 : page * pageSize + 1;\n const to = page * pageSize + itemCount;\n\n return (\n <div\n className={cn('mt-4 flex flex-col items-center justify-between gap-3 sm:flex-row', className)}\n >\n <p className=\"text-sm text-text-secondary tabular-nums\" aria-live=\"polite\">\n {tr('comradecircle.components.pagination.showing', 'Showing {{from}}–{{to}}', { from, to })}\n </p>\n <div className=\"flex items-center gap-2\">\n <Button\n variant=\"outline\"\n size=\"sm\"\n onClick={() => onPageChange(page - 1)}\n disabled={page === 0}\n aria-label={tr('comradecircle.components.pagination.previousAriaLabel', 'Previous page')}\n >\n <ChevronLeft className=\"mr-1 h-4 w-4\" />{' '}\n {tr('comradecircle.components.pagination.previous', 'Previous')}\n </Button>\n <span className=\"min-w-[4.5rem] text-center text-sm text-text-secondary tabular-nums\">\n {tr('comradecircle.components.pagination.page', 'Page {{page}}', { page: page + 1 })}\n </span>\n <Button\n variant=\"outline\"\n size=\"sm\"\n onClick={() => onPageChange(page + 1)}\n disabled={!hasMore}\n aria-label={tr('comradecircle.components.pagination.nextAriaLabel', 'Next page')}\n >\n {tr('comradecircle.components.pagination.next', 'Next')}{' '}\n <ChevronRight className=\"ml-1 h-4 w-4\" />\n </Button>\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;AA0BA,SAAgB,EAAW,EACzB,SACA,aACA,cACA,YACA,iBACA,gBACkB;CAClB,IAAM,IAAK,EAAM;CAGjB,IAAI,MAAS,KAAK,CAAC,GAAS,OAAO;CAEnC,IAAM,IAAO,MAAc,IAAI,IAAI,IAAO,IAAW,GAC/C,IAAK,IAAO,IAAW;CAE7B,OACE,kBAAC,OAAD;EACE,WAAW,EAAG,qEAAqE,CAAS;YAD9F,CAGE,kBAAC,KAAD;GAAG,WAAU;GAA2C,aAAU;aAC/D,EAAG,+CAA+C,2BAA2B;IAAE;IAAM;GAAG,CAAC;EACzF,CAAA,GACH,kBAAC,OAAD;GAAK,WAAU;aAAf;IACE,kBAAC,GAAD;KACE,SAAQ;KACR,MAAK;KACL,eAAe,EAAa,IAAO,CAAC;KACpC,UAAU,MAAS;KACnB,cAAY,EAAG,yDAAyD,eAAe;eALzF;MAOE,kBAAC,GAAD,EAAa,WAAU,eAAgB,CAAA;MAAE;MACxC,EAAG,gDAAgD,UAAU;KACxD;;IACR,kBAAC,QAAD;KAAM,WAAU;eACb,EAAG,4CAA4C,iBAAiB,EAAE,MAAM,IAAO,EAAE,CAAC;IAC/E,CAAA;IACN,kBAAC,GAAD;KACE,SAAQ;KACR,MAAK;KACL,eAAe,EAAa,IAAO,CAAC;KACpC,UAAU,CAAC;KACX,cAAY,EAAG,qDAAqD,WAAW;eALjF;MAOG,EAAG,4CAA4C,MAAM;MAAG;MACzD,kBAAC,GAAD,EAAc,WAAU,eAAgB,CAAA;KAClC;;GACL;IACF;;AAET"}
@@ -1,6 +1,6 @@
1
- import { cn as e } from "../utils/cn.js";
2
- import { useComClosePoll as t, useComVotePoll as n } from "../hooks/useComradeCircleApi.js";
1
+ import { useComClosePoll as e, useComVotePoll as t } from "../hooks/useComradeCircleApi.js";
3
2
  import "../hooks/index.js";
3
+ import { cn as n } from "../utils/cn.js";
4
4
  import { describeError as r, notify as i } from "../lib/toast.js";
5
5
  import { formatNumber as a, formatRelativeTime as o } from "../utils/formatters.js";
6
6
  import { StatusBadge as s } from "./StatusBadge.js";
@@ -11,7 +11,7 @@ import { jsx as m, jsxs as h } from "react/jsx-runtime";
11
11
  import { Button as g, GlassCard as _ } from "@burdenoff/fe-libs/ui";
12
12
  //#region src/comradecircle/components/PollCard.tsx
13
13
  function v({ poll: v, canManage: y = !1 }) {
14
- let b = n(), x = t(), [S, C] = u(/* @__PURE__ */ new Set()), w = v.options.reduce((e, t) => e + t.voteCount, 0), T = v.status === "CLOSED", E = l(() => v.options.reduce((e, t) => Math.max(e, t.voteCount), 0), [v.options]), D = S.size > 0, O = async (e) => {
14
+ let b = t(), x = e(), [S, C] = u(/* @__PURE__ */ new Set()), w = v.options.reduce((e, t) => e + t.voteCount, 0), T = v.status === "CLOSED", E = l(() => v.options.reduce((e, t) => Math.max(e, t.voteCount), 0), [v.options]), D = S.size > 0, O = async (e) => {
15
15
  if (!T) try {
16
16
  await b.mutateAsync({
17
17
  pollId: v.id,
@@ -41,14 +41,14 @@ function v({ poll: v, canManage: y = !1 }) {
41
41
  }),
42
42
  /* @__PURE__ */ m("div", {
43
43
  className: "mt-4 flex flex-col gap-2.5",
44
- children: [...v.options].sort((e, t) => e.position - t.position).map((t) => {
45
- let n = w > 0 ? t.voteCount / w * 100 : 0, r = w > 0 && t.voteCount === E, i = S.has(t.id);
44
+ children: [...v.options].sort((e, t) => e.position - t.position).map((e) => {
45
+ let t = w > 0 ? e.voteCount / w * 100 : 0, r = w > 0 && e.voteCount === E, i = S.has(e.id);
46
46
  return /* @__PURE__ */ h("button", {
47
47
  type: "button",
48
- onClick: () => O(t.id),
48
+ onClick: () => O(e.id),
49
49
  disabled: T || b.isPending,
50
50
  "aria-pressed": i,
51
- className: e("group w-full rounded-xl border px-3 py-2.5 text-left transition-all duration-200", i ? "border-accent bg-[var(--color-accent-soft)]/40" : "border-border-seam", !T && !i && "hover:-translate-y-px hover:border-accent hover:bg-bg-sunken/60", T && "cursor-default"),
51
+ className: n("group w-full rounded-xl border px-3 py-2.5 text-left transition-all duration-200", i ? "border-accent bg-[var(--color-accent-soft)]/40" : "border-border-seam", !T && !i && "hover:-translate-y-px hover:border-accent hover:bg-bg-sunken/60", T && "cursor-default"),
52
52
  children: [/* @__PURE__ */ h("div", {
53
53
  className: "flex items-center justify-between gap-2",
54
54
  children: [/* @__PURE__ */ h("span", {
@@ -59,8 +59,8 @@ function v({ poll: v, canManage: y = !1 }) {
59
59
  "aria-hidden": "true"
60
60
  }),
61
61
  /* @__PURE__ */ m("span", {
62
- className: e("truncate text-sm", r ? "font-semibold text-text-primary" : "font-medium text-text-secondary"),
63
- children: t.label
62
+ className: n("truncate text-sm", r ? "font-semibold text-text-primary" : "font-medium text-text-secondary"),
63
+ children: e.label
64
64
  }),
65
65
  r && w > 1 && /* @__PURE__ */ m(f, {
66
66
  className: "h-3.5 w-3.5 shrink-0 text-status-warning-text",
@@ -70,18 +70,18 @@ function v({ poll: v, canManage: y = !1 }) {
70
70
  }), /* @__PURE__ */ h("span", {
71
71
  className: "shrink-0 text-xs tabular-nums text-text-secondary",
72
72
  children: [
73
- a(t.voteCount),
73
+ a(e.voteCount),
74
74
  " · ",
75
- Math.round(n),
75
+ Math.round(t),
76
76
  "%"
77
77
  ]
78
78
  })]
79
79
  }), /* @__PURE__ */ m(c, {
80
- value: n,
80
+ value: t,
81
81
  className: "mt-2",
82
82
  barClassName: r ? "bg-gradient-to-r from-accent to-[var(--color-accent-soft)]" : "bg-accent/40"
83
83
  })]
84
- }, t.id);
84
+ }, e.id);
85
85
  })
86
86
  }),
87
87
  /* @__PURE__ */ h("div", {
@@ -1 +1 @@
1
- {"version":3,"file":"PostCard.d.ts","sourceRoot":"","sources":["../../../src/comradecircle/components/PostCard.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAuBH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAExC,UAAU,aAAa;IACrB,IAAI,EAAE,OAAO,CAAC;IACd,0CAA0C;IAC1C,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,yFAAyF;IACzF,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,wBAAgB,QAAQ,CAAC,EAAE,IAAI,EAAE,eAAuB,EAAE,cAAsB,EAAE,EAAE,aAAa,2CAoLhG"}
1
+ {"version":3,"file":"PostCard.d.ts","sourceRoot":"","sources":["../../../src/comradecircle/components/PostCard.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAuBH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAExC,UAAU,aAAa;IACrB,IAAI,EAAE,OAAO,CAAC;IACd,0CAA0C;IAC1C,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,yFAAyF;IACzF,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,wBAAgB,QAAQ,CAAC,EAAE,IAAI,EAAE,eAAuB,EAAE,cAAsB,EAAE,EAAE,aAAa,2CAiNhG"}
@@ -1,176 +1,189 @@
1
1
  import { useComradeCircle as e } from "../context/ComradeCircleContext.js";
2
2
  import "../context/index.js";
3
- import { cn as t } from "../utils/cn.js";
4
- import { useComRemovePost as n, useComUpdatePost as r } from "../hooks/useComradeCircleApi.js";
3
+ import { useComRemovePost as t, useComUpdatePost as n } from "../hooks/useComradeCircleApi.js";
4
+ import { useTr as r } from "../hooks/useTr.js";
5
5
  import "../hooks/index.js";
6
- import { MemberIdentity as i } from "./MemberIdentity.js";
7
- import { describeError as a, notify as o } from "../lib/toast.js";
8
- import { ReactionBar as s } from "./ReactionBar.js";
9
- import { formatRelativeTime as c } from "../utils/formatters.js";
10
- import { CommentThread as l } from "./CommentThread.js";
11
- import { AttachmentGrid as u } from "./ImageAttachments.js";
12
- import { useState as d } from "react";
13
- import { ArrowUpRight as f, MessageSquare as p, MoreHorizontal as m, Pencil as h, Pin as g, Trash2 as _ } from "lucide-react";
14
- import { jsx as v, jsxs as y } from "react/jsx-runtime";
15
- import { Button as b, DropdownMenu as x, DropdownMenuContent as S, DropdownMenuItem as C, DropdownMenuSeparator as w, DropdownMenuTrigger as T, GlassCard as E, Textarea as D } from "@burdenoff/fe-libs/ui";
6
+ import { cn as i } from "../utils/cn.js";
7
+ import { MemberIdentity as a } from "./MemberIdentity.js";
8
+ import { describeError as o, notify as s } from "../lib/toast.js";
9
+ import { ReactionBar as c } from "./ReactionBar.js";
10
+ import { formatRelativeTime as l } from "../utils/formatters.js";
11
+ import { CommentThread as u } from "./CommentThread.js";
12
+ import { AttachmentGrid as d } from "./ImageAttachments.js";
13
+ import { useState as f } from "react";
14
+ import { ArrowUpRight as p, MessageSquare as m, MoreHorizontal as h, Pencil as g, Pin as _, Trash2 as v } from "lucide-react";
15
+ import { jsx as y, jsxs as b } from "react/jsx-runtime";
16
+ import { Button as x, DropdownMenu as S, DropdownMenuContent as C, DropdownMenuItem as w, DropdownMenuSeparator as T, DropdownMenuTrigger as E, GlassCard as D, Textarea as O } from "@burdenoff/fe-libs/ui";
16
17
  //#region src/comradecircle/components/PostCard.tsx
17
- function O({ post: O, defaultExpanded: k = !1, hideThreadLink: A = !1 }) {
18
- let { currentUser: j, navigateTo: M } = e(), N = r(), P = n(), [F, I] = d(k), [L, R] = d(!1), [z, B] = d(O.body), V = !!(j?.id && j.id === O.authorId);
19
- return /* @__PURE__ */ y(E, {
18
+ function k({ post: k, defaultExpanded: A = !1, hideThreadLink: j = !1 }) {
19
+ let { currentUser: M, navigateTo: N } = e(), P = n(), F = t(), I = r(), [L, R] = f(A), [z, B] = f(!1), [V, H] = f(k.body), U = !!(M?.id && M.id === k.authorId);
20
+ return /* @__PURE__ */ b(D, {
20
21
  treatment: "plain",
21
- className: t("p-4 transition-all duration-200 motion-safe:hover:-translate-y-0.5 hover:border-[var(--color-accent-soft)]", O.isPinned && "ring-1 ring-accent/40"),
22
+ className: i("p-4 transition-all duration-200 motion-safe:hover:-translate-y-0.5 hover:border-[var(--color-accent-soft)]", k.isPinned && "ring-1 ring-accent/40"),
22
23
  children: [
23
- /* @__PURE__ */ y("div", {
24
+ /* @__PURE__ */ b("div", {
24
25
  className: "flex items-start justify-between gap-3",
25
- children: [/* @__PURE__ */ v(i, {
26
- memberId: O.authorId,
26
+ children: [/* @__PURE__ */ y(a, {
27
+ memberId: k.authorId,
27
28
  variant: "row",
28
29
  size: "md",
29
- suffix: c(O.createdAt),
30
+ suffix: l(k.createdAt),
30
31
  showPresence: !0
31
- }), /* @__PURE__ */ y("div", {
32
+ }), /* @__PURE__ */ b("div", {
32
33
  className: "flex items-center gap-1",
33
- children: [O.isPinned && /* @__PURE__ */ y("span", {
34
+ children: [k.isPinned && /* @__PURE__ */ b("span", {
34
35
  className: "inline-flex items-center gap-1 rounded-full bg-[var(--color-accent-soft)] px-2 py-0.5 text-xs font-medium text-text-primary",
35
- children: [/* @__PURE__ */ v(g, { className: "h-3 w-3" }), " Pinned"]
36
- }), V && /* @__PURE__ */ y(x, { children: [/* @__PURE__ */ v(T, {
36
+ children: [
37
+ /* @__PURE__ */ y(_, { className: "h-3 w-3" }),
38
+ " ",
39
+ I("comradecircle.components.postCard.pinned", "Pinned")
40
+ ]
41
+ }), U && /* @__PURE__ */ b(S, { children: [/* @__PURE__ */ y(E, {
37
42
  asChild: !0,
38
- children: /* @__PURE__ */ v("button", {
43
+ children: /* @__PURE__ */ y("button", {
39
44
  type: "button",
40
- "aria-label": "Post actions",
45
+ "aria-label": I("comradecircle.components.postCard.postActionsAriaLabel", "Post actions"),
41
46
  className: "rounded-lg p-1.5 text-text-tertiary transition-colors hover:bg-bg-sunken hover:text-text-primary",
42
- children: /* @__PURE__ */ v(m, { className: "h-4 w-4" })
47
+ children: /* @__PURE__ */ y(h, { className: "h-4 w-4" })
43
48
  })
44
- }), /* @__PURE__ */ y(S, {
49
+ }), /* @__PURE__ */ b(C, {
45
50
  align: "end",
46
51
  children: [
47
- /* @__PURE__ */ y(C, {
48
- onClick: () => R(!0),
49
- children: [/* @__PURE__ */ v(h, { className: "mr-2 h-4 w-4" }), " Edit"]
52
+ /* @__PURE__ */ b(w, {
53
+ onClick: () => B(!0),
54
+ children: [
55
+ /* @__PURE__ */ y(g, { className: "mr-2 h-4 w-4" }),
56
+ " ",
57
+ I("comradecircle.components.postCard.edit", "Edit")
58
+ ]
50
59
  }),
51
- /* @__PURE__ */ y(C, {
60
+ /* @__PURE__ */ b(w, {
52
61
  onClick: async () => {
53
62
  try {
54
- await N.mutateAsync({
55
- id: O.id,
56
- input: { isPinned: !O.isPinned }
57
- }), o.success(O.isPinned ? "Post unpinned" : "Post pinned");
63
+ await P.mutateAsync({
64
+ id: k.id,
65
+ input: { isPinned: !k.isPinned }
66
+ }), s.success(k.isPinned ? I("comradecircle.components.postCard.unpinnedSuccess", "Post unpinned") : I("comradecircle.components.postCard.pinnedSuccess", "Post pinned"));
58
67
  } catch (e) {
59
- o.error("Could not update post", a(e));
68
+ s.error(I("comradecircle.components.postCard.pinError", "Could not update post"), o(e));
60
69
  }
61
70
  },
62
71
  children: [
63
- /* @__PURE__ */ v(g, { className: "mr-2 h-4 w-4" }),
72
+ /* @__PURE__ */ y(_, { className: "mr-2 h-4 w-4" }),
64
73
  " ",
65
- O.isPinned ? "Unpin" : "Pin"
74
+ k.isPinned ? I("comradecircle.components.postCard.unpin", "Unpin") : I("comradecircle.components.postCard.pin", "Pin")
66
75
  ]
67
76
  }),
68
- /* @__PURE__ */ v(w, {}),
69
- /* @__PURE__ */ y(C, {
77
+ /* @__PURE__ */ y(T, {}),
78
+ /* @__PURE__ */ b(w, {
70
79
  onClick: async () => {
71
80
  try {
72
- await P.mutateAsync({
73
- id: O.id,
74
- channelId: O.channelId
75
- }), o.success("Post removed");
81
+ await F.mutateAsync({
82
+ id: k.id,
83
+ channelId: k.channelId
84
+ }), s.success(I("comradecircle.components.postCard.removedSuccess", "Post removed"));
76
85
  } catch (e) {
77
- o.error("Could not remove post", a(e));
86
+ s.error(I("comradecircle.components.postCard.removeError", "Could not remove post"), o(e));
78
87
  }
79
88
  },
80
89
  className: "text-status-error-text focus:text-status-error-text",
81
- children: [/* @__PURE__ */ v(_, { className: "mr-2 h-4 w-4" }), " Delete"]
90
+ children: [
91
+ /* @__PURE__ */ y(v, { className: "mr-2 h-4 w-4" }),
92
+ " ",
93
+ I("comradecircle.components.postCard.delete", "Delete")
94
+ ]
82
95
  })
83
96
  ]
84
97
  })] })]
85
98
  })]
86
99
  }),
87
- L ? /* @__PURE__ */ y("div", {
100
+ z ? /* @__PURE__ */ b("div", {
88
101
  className: "mt-3",
89
- children: [/* @__PURE__ */ v(D, {
90
- value: z,
91
- onChange: (e) => B(e.target.value),
102
+ children: [/* @__PURE__ */ y(O, {
103
+ value: V,
104
+ onChange: (e) => H(e.target.value),
92
105
  rows: 3,
93
106
  className: "resize-none"
94
- }), /* @__PURE__ */ y("div", {
107
+ }), /* @__PURE__ */ b("div", {
95
108
  className: "mt-2 flex justify-end gap-2",
96
- children: [/* @__PURE__ */ v(b, {
109
+ children: [/* @__PURE__ */ y(x, {
97
110
  variant: "outline",
98
111
  size: "sm",
99
112
  onClick: () => {
100
- B(O.body), R(!1);
113
+ H(k.body), B(!1);
101
114
  },
102
- children: "Cancel"
103
- }), /* @__PURE__ */ v(b, {
115
+ children: I("comradecircle.components.postCard.cancel", "Cancel")
116
+ }), /* @__PURE__ */ y(x, {
104
117
  size: "sm",
105
118
  onClick: async () => {
106
- let e = z.trim();
107
- if (!e || e === O.body) {
108
- R(!1);
119
+ let e = V.trim();
120
+ if (!e || e === k.body) {
121
+ B(!1);
109
122
  return;
110
123
  }
111
124
  try {
112
- await N.mutateAsync({
113
- id: O.id,
125
+ await P.mutateAsync({
126
+ id: k.id,
114
127
  input: { body: e }
115
- }), R(!1), o.success("Post updated");
128
+ }), B(!1), s.success(I("comradecircle.components.postCard.updatedSuccess", "Post updated"));
116
129
  } catch (e) {
117
- o.error("Could not update post", a(e));
130
+ s.error(I("comradecircle.components.postCard.updateError", "Could not update post"), o(e));
118
131
  }
119
132
  },
120
- disabled: N.isPending,
121
- children: "Save"
133
+ disabled: P.isPending,
134
+ children: I("comradecircle.components.postCard.save", "Save")
122
135
  })]
123
136
  })]
124
- }) : /* @__PURE__ */ v("p", {
137
+ }) : /* @__PURE__ */ y("p", {
125
138
  className: "mt-3 whitespace-pre-wrap break-words text-sm text-text-primary",
126
- children: O.body
139
+ children: k.body
127
140
  }),
128
- O.tags.length > 0 && /* @__PURE__ */ v("div", {
141
+ k.tags.length > 0 && /* @__PURE__ */ y("div", {
129
142
  className: "mt-2 flex flex-wrap gap-1.5",
130
- children: O.tags.map((e) => /* @__PURE__ */ y("span", {
143
+ children: k.tags.map((e) => /* @__PURE__ */ b("span", {
131
144
  className: "rounded-full bg-bg-sunken px-2 py-0.5 text-xs font-medium text-text-secondary",
132
145
  children: ["#", e]
133
146
  }, e))
134
147
  }),
135
- O.attachmentFileIds.length > 0 && /* @__PURE__ */ v(u, { fileIds: O.attachmentFileIds }),
136
- /* @__PURE__ */ y("div", {
148
+ k.attachmentFileIds.length > 0 && /* @__PURE__ */ y(d, { fileIds: k.attachmentFileIds }),
149
+ /* @__PURE__ */ b("div", {
137
150
  className: "mt-3 flex items-center justify-between gap-3 border-t border-border-seam pt-3",
138
- children: [/* @__PURE__ */ v(s, { post: O }), /* @__PURE__ */ y("div", {
151
+ children: [/* @__PURE__ */ y(c, { post: k }), /* @__PURE__ */ b("div", {
139
152
  className: "flex items-center gap-1",
140
- children: [/* @__PURE__ */ y("button", {
153
+ children: [/* @__PURE__ */ b("button", {
141
154
  type: "button",
142
- onClick: () => I((e) => !e),
143
- "aria-expanded": F,
144
- className: t("inline-flex items-center gap-1.5 rounded-full px-2 py-0.5 text-xs font-medium transition-colors", F ? "bg-[var(--color-accent-soft)] text-text-primary" : "text-text-secondary hover:bg-bg-sunken hover:text-text-primary"),
155
+ onClick: () => R((e) => !e),
156
+ "aria-expanded": L,
157
+ className: i("inline-flex items-center gap-1.5 rounded-full px-2 py-0.5 text-xs font-medium transition-colors", L ? "bg-[var(--color-accent-soft)] text-text-primary" : "text-text-secondary hover:bg-bg-sunken hover:text-text-primary"),
145
158
  children: [
146
- /* @__PURE__ */ v(p, { className: "h-3.5 w-3.5" }),
147
- /* @__PURE__ */ v("span", {
159
+ /* @__PURE__ */ y(m, { className: "h-3.5 w-3.5" }),
160
+ /* @__PURE__ */ y("span", {
148
161
  className: "tabular-nums",
149
- children: O.commentCount
162
+ children: k.commentCount
150
163
  }),
151
- /* @__PURE__ */ v("span", {
164
+ /* @__PURE__ */ y("span", {
152
165
  className: "hidden sm:inline",
153
- children: O.commentCount === 1 ? "comment" : "comments"
166
+ children: k.commentCount === 1 ? I("comradecircle.components.postCard.comment", "comment") : I("comradecircle.components.postCard.comments", "comments")
154
167
  })
155
168
  ]
156
- }), !A && /* @__PURE__ */ y("button", {
169
+ }), !j && /* @__PURE__ */ b("button", {
157
170
  type: "button",
158
- onClick: () => M(`posts/${O.id}`),
159
- "aria-label": "Open thread",
160
- title: "Open thread",
171
+ onClick: () => N(`posts/${k.id}`),
172
+ "aria-label": I("comradecircle.components.postCard.openThreadAriaLabel", "Open thread"),
173
+ title: I("comradecircle.components.postCard.openThreadTitle", "Open thread"),
161
174
  className: "inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium text-text-tertiary transition-colors hover:bg-bg-sunken hover:text-text-primary",
162
- children: [/* @__PURE__ */ v(f, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ v("span", {
175
+ children: [/* @__PURE__ */ y(p, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ y("span", {
163
176
  className: "hidden sm:inline",
164
- children: "Open thread"
177
+ children: I("comradecircle.components.postCard.openThread", "Open thread")
165
178
  })]
166
179
  })]
167
180
  })]
168
181
  }),
169
- F && /* @__PURE__ */ v(l, { postId: O.id })
182
+ L && /* @__PURE__ */ y(u, { postId: k.id })
170
183
  ]
171
184
  });
172
185
  }
173
186
  //#endregion
174
- export { O as PostCard };
187
+ export { k as PostCard };
175
188
 
176
189
  //# sourceMappingURL=PostCard.js.map