@flamingo-stack/openframe-frontend-core 0.0.617 → 0.0.619-2160.6147.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 (186) hide show
  1. package/dist/{chunk-UVK7AQAG.js → chunk-3BNNYHP2.js} +3 -3
  2. package/dist/{chunk-VHS3OYE4.js → chunk-3Z5ZIKDX.js} +2532 -2460
  3. package/dist/chunk-3Z5ZIKDX.js.map +1 -0
  4. package/dist/{chunk-BJDQZH62.cjs → chunk-4ZGUSO7M.cjs} +5 -5
  5. package/dist/{chunk-BJDQZH62.cjs.map → chunk-4ZGUSO7M.cjs.map} +1 -1
  6. package/dist/{chunk-HGPGF6SF.js → chunk-5DUTXG6P.js} +3 -3
  7. package/dist/{chunk-VIBREYUK.cjs → chunk-5G3L6327.cjs} +3 -3
  8. package/dist/{chunk-VIBREYUK.cjs.map → chunk-5G3L6327.cjs.map} +1 -1
  9. package/dist/{chunk-GBON2OCG.js → chunk-5WGOAJ4B.js} +3 -2
  10. package/dist/chunk-5WGOAJ4B.js.map +1 -0
  11. package/dist/{chunk-FP5WYJ3S.js → chunk-65SWJSQX.js} +8 -3
  12. package/dist/{chunk-FP5WYJ3S.js.map → chunk-65SWJSQX.js.map} +1 -1
  13. package/dist/{chunk-BLUL2TE3.js → chunk-7HWVD42H.js} +24 -4
  14. package/dist/chunk-7HWVD42H.js.map +1 -0
  15. package/dist/{chunk-HR6CHKD6.cjs → chunk-AU2Q75HU.cjs} +6 -6
  16. package/dist/{chunk-HR6CHKD6.cjs.map → chunk-AU2Q75HU.cjs.map} +1 -1
  17. package/dist/{chunk-45OAW4M2.js → chunk-D4ARG53E.js} +6 -6
  18. package/dist/{chunk-UXOOVP77.cjs → chunk-DV7IBKJI.cjs} +4 -4
  19. package/dist/{chunk-UXOOVP77.cjs.map → chunk-DV7IBKJI.cjs.map} +1 -1
  20. package/dist/{chunk-67XFJ442.cjs → chunk-DXR23SLZ.cjs} +523 -451
  21. package/dist/chunk-DXR23SLZ.cjs.map +1 -0
  22. package/dist/{chunk-N6CULJYR.cjs → chunk-EG4IKWY4.cjs} +3 -2
  23. package/dist/{chunk-N6CULJYR.cjs.map → chunk-EG4IKWY4.cjs.map} +1 -1
  24. package/dist/{chunk-TRY3CUWJ.cjs → chunk-EIFU6N5L.cjs} +29 -29
  25. package/dist/{chunk-TRY3CUWJ.cjs.map → chunk-EIFU6N5L.cjs.map} +1 -1
  26. package/dist/{chunk-UQEOAPAI.cjs → chunk-EYKTKDRK.cjs} +101 -58
  27. package/dist/chunk-EYKTKDRK.cjs.map +1 -0
  28. package/dist/{chunk-IW746HJ7.js → chunk-FHR2JU2J.js} +2 -2
  29. package/dist/{chunk-7GLJC4EO.cjs → chunk-GAPXVAS6.cjs} +151 -146
  30. package/dist/chunk-GAPXVAS6.cjs.map +1 -0
  31. package/dist/{chunk-QPAPUIF3.cjs → chunk-GNWKLE7O.cjs} +58 -38
  32. package/dist/chunk-GNWKLE7O.cjs.map +1 -0
  33. package/dist/{chunk-VNNIRX23.cjs → chunk-HF4EZICZ.cjs} +3 -3
  34. package/dist/{chunk-VNNIRX23.cjs.map → chunk-HF4EZICZ.cjs.map} +1 -1
  35. package/dist/{chunk-CXEGV3ZS.js → chunk-HPIRQWNK.js} +3 -3
  36. package/dist/{chunk-CGCV4QT2.js → chunk-I7RWVDN4.js} +5 -5
  37. package/dist/{chunk-RZURBPBS.js → chunk-J27HVNT2.js} +4 -4
  38. package/dist/{chunk-WFM5OAM6.js → chunk-JA2SIJ7T.js} +4 -4
  39. package/dist/{chunk-UVXMIZYK.js → chunk-JBXNDB5U.js} +8 -8
  40. package/dist/{chunk-JZELYIFZ.cjs → chunk-KQDGZS3U.cjs} +33 -33
  41. package/dist/{chunk-JZELYIFZ.cjs.map → chunk-KQDGZS3U.cjs.map} +1 -1
  42. package/dist/{chunk-7YHUP5BR.js → chunk-LPGBA4UZ.js} +3 -3
  43. package/dist/{chunk-2OJVGAGX.cjs → chunk-M4V2O2MT.cjs} +12 -12
  44. package/dist/{chunk-2OJVGAGX.cjs.map → chunk-M4V2O2MT.cjs.map} +1 -1
  45. package/dist/{chunk-VJJ7LGOI.js → chunk-MJRXGAXS.js} +5 -5
  46. package/dist/{chunk-V23BJC2Q.cjs → chunk-NOW7NGUH.cjs} +15 -15
  47. package/dist/{chunk-V23BJC2Q.cjs.map → chunk-NOW7NGUH.cjs.map} +1 -1
  48. package/dist/{chunk-GH4F4ODL.js → chunk-OD4JKGQG.js} +8 -8
  49. package/dist/{chunk-FMNS5NN2.cjs → chunk-P3I5KY4A.cjs} +20 -20
  50. package/dist/{chunk-FMNS5NN2.cjs.map → chunk-P3I5KY4A.cjs.map} +1 -1
  51. package/dist/{chunk-USP3UWID.cjs → chunk-QVOS4BPC.cjs} +65 -65
  52. package/dist/{chunk-USP3UWID.cjs.map → chunk-QVOS4BPC.cjs.map} +1 -1
  53. package/dist/{chunk-ZJYZOOTU.js → chunk-RTC3H5RW.js} +4 -4
  54. package/dist/{chunk-RU3IKVY2.js → chunk-S44BHDOI.js} +507 -464
  55. package/dist/chunk-S44BHDOI.js.map +1 -0
  56. package/dist/{chunk-6RMFEGJ4.js → chunk-SKRI6QJ5.js} +2 -2
  57. package/dist/{chunk-7FFKXXWY.cjs → chunk-U7MQS4CR.cjs} +88 -88
  58. package/dist/{chunk-7FFKXXWY.cjs.map → chunk-U7MQS4CR.cjs.map} +1 -1
  59. package/dist/{chunk-332JHI2D.cjs → chunk-UP2OB7RI.cjs} +11 -11
  60. package/dist/{chunk-332JHI2D.cjs.map → chunk-UP2OB7RI.cjs.map} +1 -1
  61. package/dist/{chunk-ULM5FCFN.cjs → chunk-UWPZT3FY.cjs} +6 -6
  62. package/dist/{chunk-ULM5FCFN.cjs.map → chunk-UWPZT3FY.cjs.map} +1 -1
  63. package/dist/{chunk-TSCIVH7T.js → chunk-VBIFSOPQ.js} +2 -2
  64. package/dist/{chunk-ZQOK4TCN.cjs → chunk-XRWY5ETC.cjs} +22 -22
  65. package/dist/{chunk-ZQOK4TCN.cjs.map → chunk-XRWY5ETC.cjs.map} +1 -1
  66. package/dist/{chunk-LFLJ3IHE.cjs → chunk-YNA7ZCDS.cjs} +28 -28
  67. package/dist/{chunk-LFLJ3IHE.cjs.map → chunk-YNA7ZCDS.cjs.map} +1 -1
  68. package/dist/{chunk-5KKLN7Q2.js → chunk-ZPJ6KYAW.js} +3 -3
  69. package/dist/components/case-studies/index.cjs +11 -11
  70. package/dist/components/case-studies/index.js +5 -5
  71. package/dist/components/chat/entity-cards/ai-prompt-card.d.ts +35 -0
  72. package/dist/components/chat/entity-cards/ai-prompt-card.d.ts.map +1 -0
  73. package/dist/components/chat/entity-cards/dispatch.d.ts.map +1 -1
  74. package/dist/components/chat/entity-cards/index.d.ts +2 -0
  75. package/dist/components/chat/entity-cards/index.d.ts.map +1 -1
  76. package/dist/components/chat/index.cjs +7 -3
  77. package/dist/components/chat/index.cjs.map +1 -1
  78. package/dist/components/chat/index.js +6 -2
  79. package/dist/components/comment-card.d.ts +26 -24
  80. package/dist/components/comment-card.d.ts.map +1 -1
  81. package/dist/components/comment-thread.d.ts +58 -0
  82. package/dist/components/comment-thread.d.ts.map +1 -0
  83. package/dist/components/contact/index.cjs +6 -6
  84. package/dist/components/contact/index.js +5 -5
  85. package/dist/components/docs/index.cjs +9 -9
  86. package/dist/components/docs/index.js +8 -8
  87. package/dist/components/embeds/index.cjs +6 -6
  88. package/dist/components/embeds/index.js +5 -5
  89. package/dist/components/faq/index.cjs +6 -6
  90. package/dist/components/faq/index.js +5 -5
  91. package/dist/components/features/index.cjs +5 -5
  92. package/dist/components/features/index.js +4 -4
  93. package/dist/components/help-center-pages/index.cjs +27 -27
  94. package/dist/components/help-center-pages/index.js +18 -18
  95. package/dist/components/index.cjs +225 -77
  96. package/dist/components/index.cjs.map +1 -1
  97. package/dist/components/index.d.ts +1 -0
  98. package/dist/components/index.d.ts.map +1 -1
  99. package/dist/components/index.js +342 -194
  100. package/dist/components/index.js.map +1 -1
  101. package/dist/components/meeting-scheduler/index.cjs +40 -40
  102. package/dist/components/meeting-scheduler/index.cjs.map +1 -1
  103. package/dist/components/meeting-scheduler/index.js +8 -8
  104. package/dist/components/meeting-scheduler/index.js.map +1 -1
  105. package/dist/components/navigation/index.cjs +8 -8
  106. package/dist/components/navigation/index.js +7 -7
  107. package/dist/components/onboarding-guides/index.cjs +8 -8
  108. package/dist/components/onboarding-guides/index.js +7 -7
  109. package/dist/components/related-content/card-registry.d.ts.map +1 -1
  110. package/dist/components/related-content/index.cjs +4 -4
  111. package/dist/components/related-content/index.js +3 -3
  112. package/dist/components/tickets/index.cjs +10 -10
  113. package/dist/components/tickets/index.js +9 -9
  114. package/dist/components/ui/avatar-stack.d.ts +16 -3
  115. package/dist/components/ui/avatar-stack.d.ts.map +1 -1
  116. package/dist/components/ui/index.cjs +13 -5
  117. package/dist/components/ui/index.cjs.map +1 -1
  118. package/dist/components/ui/index.d.ts +1 -0
  119. package/dist/components/ui/index.d.ts.map +1 -1
  120. package/dist/components/ui/index.js +12 -4
  121. package/dist/components/ui/people-cell.d.ts +46 -0
  122. package/dist/components/ui/people-cell.d.ts.map +1 -0
  123. package/dist/index.cjs +19 -9
  124. package/dist/index.cjs.map +1 -1
  125. package/dist/index.js +18 -8
  126. package/dist/index.js.map +1 -1
  127. package/dist/types/marketing.d.ts +1 -1
  128. package/dist/types/marketing.d.ts.map +1 -1
  129. package/dist/utils/content-ref-groups.d.ts.map +1 -1
  130. package/dist/utils/format.d.ts +8 -0
  131. package/dist/utils/format.d.ts.map +1 -1
  132. package/dist/utils/index.cjs +10 -1
  133. package/dist/utils/index.cjs.map +1 -1
  134. package/dist/utils/index.d.ts +1 -1
  135. package/dist/utils/index.d.ts.map +1 -1
  136. package/dist/utils/index.js +10 -2
  137. package/dist/utils/index.js.map +1 -1
  138. package/dist/utils/list-url.d.ts.map +1 -1
  139. package/dist/utils/source-icons.d.ts.map +1 -1
  140. package/package.json +1 -1
  141. package/src/components/chat/entity-cards/ai-prompt-card.tsx +62 -0
  142. package/src/components/chat/entity-cards/dispatch.tsx +3 -1
  143. package/src/components/chat/entity-cards/index.ts +2 -0
  144. package/src/components/comment-card.tsx +27 -24
  145. package/src/components/comment-thread.tsx +212 -0
  146. package/src/components/index.ts +1 -0
  147. package/src/components/meeting-scheduler/context-panel.tsx +1 -1
  148. package/src/components/meeting-scheduler/directory.tsx +1 -1
  149. package/src/components/related-content/__tests__/card-registry.test.tsx +7 -0
  150. package/src/components/related-content/card-registry.tsx +20 -1
  151. package/src/components/ui/__tests__/people-cell.test.tsx +97 -0
  152. package/src/components/ui/avatar-stack.tsx +40 -13
  153. package/src/components/ui/index.ts +1 -0
  154. package/src/components/ui/people-cell.tsx +133 -0
  155. package/src/components/ui/table/__tests__/header-hint.test.tsx +2 -2
  156. package/src/types/marketing.ts +1 -0
  157. package/src/utils/__tests__/list-url.test.ts +1 -0
  158. package/src/utils/content-ref-groups.ts +1 -0
  159. package/src/utils/format.ts +13 -0
  160. package/src/utils/index.ts +1 -0
  161. package/src/utils/list-url.ts +1 -0
  162. package/src/utils/source-icons.ts +3 -0
  163. package/dist/chunk-67XFJ442.cjs.map +0 -1
  164. package/dist/chunk-7GLJC4EO.cjs.map +0 -1
  165. package/dist/chunk-BLUL2TE3.js.map +0 -1
  166. package/dist/chunk-GBON2OCG.js.map +0 -1
  167. package/dist/chunk-QPAPUIF3.cjs.map +0 -1
  168. package/dist/chunk-RU3IKVY2.js.map +0 -1
  169. package/dist/chunk-UQEOAPAI.cjs.map +0 -1
  170. package/dist/chunk-VHS3OYE4.js.map +0 -1
  171. /package/dist/{chunk-UVK7AQAG.js.map → chunk-3BNNYHP2.js.map} +0 -0
  172. /package/dist/{chunk-HGPGF6SF.js.map → chunk-5DUTXG6P.js.map} +0 -0
  173. /package/dist/{chunk-45OAW4M2.js.map → chunk-D4ARG53E.js.map} +0 -0
  174. /package/dist/{chunk-IW746HJ7.js.map → chunk-FHR2JU2J.js.map} +0 -0
  175. /package/dist/{chunk-CXEGV3ZS.js.map → chunk-HPIRQWNK.js.map} +0 -0
  176. /package/dist/{chunk-CGCV4QT2.js.map → chunk-I7RWVDN4.js.map} +0 -0
  177. /package/dist/{chunk-RZURBPBS.js.map → chunk-J27HVNT2.js.map} +0 -0
  178. /package/dist/{chunk-WFM5OAM6.js.map → chunk-JA2SIJ7T.js.map} +0 -0
  179. /package/dist/{chunk-UVXMIZYK.js.map → chunk-JBXNDB5U.js.map} +0 -0
  180. /package/dist/{chunk-7YHUP5BR.js.map → chunk-LPGBA4UZ.js.map} +0 -0
  181. /package/dist/{chunk-VJJ7LGOI.js.map → chunk-MJRXGAXS.js.map} +0 -0
  182. /package/dist/{chunk-GH4F4ODL.js.map → chunk-OD4JKGQG.js.map} +0 -0
  183. /package/dist/{chunk-ZJYZOOTU.js.map → chunk-RTC3H5RW.js.map} +0 -0
  184. /package/dist/{chunk-6RMFEGJ4.js.map → chunk-SKRI6QJ5.js.map} +0 -0
  185. /package/dist/{chunk-TSCIVH7T.js.map → chunk-VBIFSOPQ.js.map} +0 -0
  186. /package/dist/{chunk-5KKLN7Q2.js.map → chunk-ZPJ6KYAW.js.map} +0 -0
@@ -19,43 +19,66 @@ export interface AvatarStackPerson {
19
19
  key?: string | number;
20
20
  }
21
21
 
22
+ type AvatarStackSize = 'xs' | 'sm' | 'md' | 'lg';
23
+
22
24
  export interface AvatarStackProps {
23
25
  people: AvatarStackPerson[];
24
- /** Avatars shown before collapsing into the "+N" circle. */
26
+ /** Avatars shown before collapsing into the "+N" circle. Ignored when `slots` is set. */
25
27
  max?: number;
28
+ /**
29
+ * FIXED-WIDTH mode: the stack always occupies exactly `slots` positions, the
30
+ * "+N" circle counting as one. Up to `slots` people show as faces; more show
31
+ * `slots - 1` faces and the circle. Use it wherever rows must line up (a
32
+ * table column): the width no longer depends on how many people a row holds,
33
+ * so the text beside every stack starts at the same x.
34
+ */
35
+ slots?: number;
26
36
  /** Size bucket (also sizes the "+N" circle). `xs` (24px) is for
27
37
  * dense card meta rows (chat compact cards, delivery rows). */
28
- size?: 'xs' | 'sm' | 'md' | 'lg';
38
+ size?: AvatarStackSize;
29
39
  /** Ring color class separating overlapped avatars from each other —
30
40
  * MUST match the surface the stack sits on (default: card surface).
31
41
  * Without the surface-colored ring, overlapping photos read as one
32
42
  * smeared blob — the ring is what makes a stack look deliberate. */
33
43
  ringClassName?: string;
44
+ /** What these people ARE, for the group's accessible name ("Hosts: Ada, Lin").
45
+ * Default "Assignees". */
46
+ label?: string;
34
47
  className?: string;
35
48
  }
36
49
 
37
- const OVERFLOW_CIRCLE_SIZE: Record<NonNullable<AvatarStackProps['size']>, string> = {
38
- xs: 'h-6 w-6',
39
- sm: 'h-8 w-8',
40
- md: 'h-10 w-10',
41
- lg: 'h-12 w-12',
50
+ /** Face diameter and how far each later face tucks under the previous one — the
51
+ * `SquareAvatar` buckets and the `-ml-*` classes below, in px, for `slots`. */
52
+ const SIZE_PX: Record<AvatarStackSize, number> = { xs: 24, sm: 32, md: 40, lg: 48 };
53
+ const OVERLAP_PX: Record<AvatarStackSize, number> = { xs: 8, sm: 12, md: 12, lg: 12 };
54
+
55
+ const OVERFLOW_CIRCLE_SIZE: Record<AvatarStackSize, string> = {
56
+ xs: 'h-6 min-w-6',
57
+ sm: 'h-8 min-w-8',
58
+ md: 'h-10 min-w-10',
59
+ lg: 'h-12 min-w-12',
42
60
  };
43
61
 
44
62
  export function AvatarStack({
45
63
  people,
46
64
  max = 3,
65
+ slots,
47
66
  size = 'md',
48
67
  ringClassName = 'ring-ods-card',
68
+ label = 'Assignees',
49
69
  className,
50
70
  }: AvatarStackProps) {
51
71
  if (people.length === 0) return null;
52
- const visible = people.slice(0, max);
53
- const overflow = people.slice(max);
72
+ const faces = slots ? (people.length > slots ? slots - 1 : slots) : max;
73
+ const visible = people.slice(0, faces);
74
+ const overflow = people.slice(faces);
75
+ const compact = size === 'xs';
54
76
  return (
55
77
  <div
56
- className={cn('flex items-center', className)}
78
+ className={cn('flex items-center', slots && 'shrink-0', className)}
79
+ style={slots ? { width: SIZE_PX[size] + (slots - 1) * (SIZE_PX[size] - OVERLAP_PX[size]) } : undefined}
57
80
  role="group"
58
- aria-label={`Assignees: ${people.map(p => p.name).join(', ')}`}
81
+ aria-label={`${label}: ${people.map(p => p.name).join(', ')}`}
59
82
  >
60
83
  {visible.map((person, i) => (
61
84
  <SquareAvatar
@@ -66,7 +89,7 @@ export function AvatarStack({
66
89
  alt={person.name}
67
90
  fallback={person.name}
68
91
  title={person.name}
69
- className={cn('relative ring-2', ringClassName, i > 0 && (size === 'xs' ? '-ml-2' : '-ml-3'))}
92
+ className={cn('relative ring-2', ringClassName, i > 0 && (compact ? '-ml-2' : '-ml-3'))}
70
93
  // Leftmost (primary assignee) on TOP — later avatars tuck
71
94
  // BEHIND, so the first face is always fully visible.
72
95
  style={{ zIndex: visible.length - i }}
@@ -78,7 +101,11 @@ export function AvatarStack({
78
101
  className={cn(
79
102
  'relative z-0 flex shrink-0 items-center justify-center rounded-full bg-ods-bg text-ods-text-secondary ring-2',
80
103
  ringClassName,
81
- size === 'xs' ? '-ml-2 text-badge' : '-ml-3 text-h6',
104
+ // The circle tucks under the last face like every other avatar, so
105
+ // its left edge is covered: the left padding equals that overlap,
106
+ // centering "+N" in the part that shows. `min-w` (not a fixed
107
+ // width) lets a two-digit count widen the circle instead of clipping.
108
+ compact ? '-ml-2 pl-2 pr-1 text-badge' : '-ml-3 pl-3 pr-1.5 text-h6',
82
109
  OVERFLOW_CIRCLE_SIZE[size],
83
110
  )}
84
111
  >
@@ -115,6 +115,7 @@ export * from './page-actions';
115
115
  export * from './service-card';
116
116
  export * from './slider';
117
117
  export * from './avatar-stack';
118
+ export * from './people-cell';
118
119
  export * from './deleted-user-avatar';
119
120
  export * from './square-avatar';
120
121
  export * from './tab-selector';
@@ -0,0 +1,133 @@
1
+ 'use client';
2
+
3
+ import { personFirstName } from '../../utils/format';
4
+ import { AvatarStack } from './avatar-stack';
5
+ import { Button } from './button';
6
+ import { FloatingTooltip } from './floating-tooltip';
7
+ import { SquareAvatar } from './square-avatar';
8
+ import { TruncateText } from './truncate-text';
9
+
10
+ /**
11
+ * THE person cells for tables and dense lists — one for a single person, one
12
+ * for a column that may hold several — so every column of people in every app
13
+ * reads the same way.
14
+ *
15
+ * - `PersonCell` → avatar, name, then a second line (a title, an email)
16
+ * - `PeopleCell` → zero or one person IS `PersonCell`; several become an
17
+ * `AvatarStack` in a FIXED two-position slot beside their
18
+ * first names ("Dmytro & Michael & Ilona") across both
19
+ * lines. A title per person does not fit, and the names are
20
+ * what the column is read for; the tooltip carries the full
21
+ * names. The fixed slot keeps every multi-person row's names
22
+ * on the same x, whether it holds two people or twelve.
23
+ */
24
+
25
+ export interface PersonCellProps {
26
+ name?: string | null;
27
+ avatarUrl?: string | null;
28
+ /**
29
+ * The second line: a job title, an email, a department. Omitted keeps the
30
+ * two-line height with an empty line; `null` or `''` (a value that is
31
+ * expected but missing) renders a `·` placeholder.
32
+ */
33
+ secondary?: string | null;
34
+ /** Shown when there is no name — "Unassigned", "Unknown", … */
35
+ fallbackName?: string;
36
+ /** Makes the whole cell a button and the name an accent link (e.g. filter by this person). */
37
+ onClick?: () => void;
38
+ /** Tooltip for the clickable cell ("Filter by ada@example.com"). */
39
+ actionTitle?: string;
40
+ }
41
+
42
+ export function PersonCell({
43
+ name,
44
+ avatarUrl,
45
+ secondary,
46
+ fallbackName = 'Unassigned',
47
+ onClick,
48
+ actionTitle,
49
+ }: PersonCellProps) {
50
+ const displayName = name || fallbackName;
51
+ const row = (
52
+ <div className="group/person-cell flex min-w-0 items-center gap-3">
53
+ <SquareAvatar size="sm" src={avatarUrl ?? undefined} alt={displayName} fallback={displayName} />
54
+ <div className="min-w-0 flex-1">
55
+ <TruncateText
56
+ variant="h6"
57
+ className={onClick ? 'text-ods-accent group-hover/person-cell:underline' : undefined}
58
+ >
59
+ {displayName}
60
+ </TruncateText>
61
+ <TruncateText variant="h6" tone="secondary">
62
+ {secondary === undefined ? ' ' : secondary || '·'}
63
+ </TruncateText>
64
+ </div>
65
+ </div>
66
+ );
67
+ if (!onClick) return row;
68
+ return (
69
+ <Button
70
+ variant="transparent"
71
+ onClick={onClick}
72
+ title={actionTitle}
73
+ // No hover background — only the name underlines. `text-left`: a button
74
+ // centers its text by default, which would center the second line.
75
+ className="h-auto w-full min-w-0 cursor-pointer justify-start bg-transparent p-0 text-left hover:bg-transparent focus:bg-transparent"
76
+ >
77
+ {row}
78
+ </Button>
79
+ );
80
+ }
81
+
82
+ export interface PeopleCellPerson {
83
+ /** Stable render key (a profile id) — names can collide or be blank. */
84
+ key?: string | number;
85
+ name?: string | null;
86
+ avatarUrl?: string | null;
87
+ /** The single-person second line — see `PersonCellProps.secondary`. */
88
+ secondary?: string | null;
89
+ }
90
+
91
+ export interface PeopleCellProps {
92
+ people: PeopleCellPerson[];
93
+ /** Shown when the list is empty — the same slot `PersonCell` fills. */
94
+ fallbackName?: string;
95
+ }
96
+
97
+ /** Positions the multi-person stack reserves: two faces, or one face and "+N". */
98
+ const PEOPLE_CELL_STACK_SLOTS = 2;
99
+
100
+ export function PeopleCell({ people, fallbackName = 'Unassigned' }: PeopleCellProps) {
101
+ if (people.length <= 1) {
102
+ const [person] = people;
103
+ return (
104
+ <PersonCell
105
+ name={person?.name}
106
+ avatarUrl={person?.avatarUrl}
107
+ secondary={person ? person.secondary : undefined}
108
+ fallbackName={fallbackName}
109
+ />
110
+ );
111
+ }
112
+ const fullNames = people.map(p => p.name || 'Unknown').join(', ');
113
+ return (
114
+ <FloatingTooltip content={fullNames} triggerClassName="min-w-0 max-w-full">
115
+ {/* Same gap and two-line height as `PersonCell`, so the two sit on one rhythm. */}
116
+ <div className="flex min-w-0 items-center gap-3">
117
+ {/* Decorative here: the names are the text right beside it, so the
118
+ stack's own accessible name would read every name twice. */}
119
+ <div aria-hidden className="shrink-0">
120
+ <AvatarStack
121
+ size="sm"
122
+ slots={PEOPLE_CELL_STACK_SLOTS}
123
+ people={people.map(p => ({ key: p.key, name: p.name || 'Unknown', avatarUrl: p.avatarUrl }))}
124
+ />
125
+ </div>
126
+ <p className="line-clamp-2 min-w-0 flex-1 break-words text-ods-text-primary text-h6">
127
+ <span aria-hidden>{people.map(p => personFirstName(p.name, 'Unknown')).join(' & ')}</span>
128
+ <span className="sr-only">{fullNames}</span>
129
+ </p>
130
+ </div>
131
+ </FloatingTooltip>
132
+ );
133
+ }
@@ -25,7 +25,7 @@ const data: Row[] = [{ id: '1', name: 'Alpha' }];
25
25
  // narrow branch, so this file opts into the wide one for its own cases.
26
26
  const realMatchMedia = window.matchMedia;
27
27
  beforeEach(() => {
28
- window.matchMedia = ((query: string) => ({
28
+ window.matchMedia = (query: string) => ({
29
29
  matches: true,
30
30
  media: query,
31
31
  onchange: null,
@@ -34,7 +34,7 @@ beforeEach(() => {
34
34
  addListener: () => {},
35
35
  removeListener: () => {},
36
36
  dispatchEvent: () => false,
37
- })) as typeof window.matchMedia;
37
+ });
38
38
  });
39
39
  afterEach(() => {
40
40
  window.matchMedia = realMatchMedia;
@@ -368,6 +368,7 @@ export type ContentSourceType =
368
368
  | 'walkthrough_video' // Per-platform floating demo video (no slug, no detail page; URL is the platform home)
369
369
  | 'what_i_shipped' // What I Shipped employee check-ins (lives on people-hub)
370
370
  | 'how_i_work' // How I Work employee AI-workflow sessions (lives on people-hub)
371
+ | 'ai_prompt' // Squawkbox prompt library entries (lives on people-hub)
371
372
  | 'faq' // FAQ Q&A pair (single-page /faqs index; deep-link by category anchor)
372
373
  | 'design_doc' // Internal design docs (product-hub admin; preview route only, no public page)
373
374
  | 'from_scratch';
@@ -52,6 +52,7 @@ const BASELINE: Record<string, string> = {
52
52
  // product-hub design docs + tenants via per-object card routes).
53
53
  what_i_shipped: '/api/what-i-shipped?ids=a,b&limit=2',
54
54
  how_i_work: '/api/how-i-work?ids=a,b&limit=2',
55
+ ai_prompt: '/api/prompts?ids=a,b&limit=2',
55
56
  design_doc: '/api/design-docs?ids=a,b',
56
57
  openframe_tenant: '/api/openframe-tenants?ids=a,b',
57
58
  };
@@ -55,6 +55,7 @@ export const CONTENT_REF_GROUPS: Record<string, ContentRefGroupConfig> = {
55
55
  onboarding_guide: { label: 'Onboarding Guides', order: 9, layout: 'list', gridSize: 'default' },
56
56
  what_i_shipped: { label: 'What I Shipped', order: 10, layout: 'grid', gridSize: 'default' },
57
57
  how_i_work: { label: 'How I Work', order: 11, layout: 'grid', gridSize: 'default' },
58
+ ai_prompt: { label: 'Squawkbox', order: 12, layout: 'grid', gridSize: 'default' },
58
59
  };
59
60
 
60
61
  /** Human-readable label for a content_ref `type`. Returns null when the type
@@ -207,6 +207,19 @@ export function personInitials(name?: string | null): string {
207
207
  return nameInitials(name, '', { pick: 'first-last' });
208
208
  }
209
209
 
210
+ /**
211
+ * A PERSON's first name: the first whitespace-delimited word, or `fallback`
212
+ * (default `null`) when there is nothing usable. THE named first-name policy,
213
+ * beside `personInitials`, so a greeting, a byline and a people cell agree on
214
+ * leading whitespace and on an empty name.
215
+ */
216
+ export function personFirstName(name: string | null | undefined): string | null;
217
+ export function personFirstName(name: string | null | undefined, fallback: string): string;
218
+ export function personFirstName(name: string | null | undefined, fallback: string | null = null): string | null {
219
+ const first = (typeof name === 'string' ? name.trim() : '').split(/\s+/)[0];
220
+ return first || fallback;
221
+ }
222
+
210
223
  /** A single leading letter, `?` when there is no name. THE named one-letter policy. */
211
224
  export function singleInitial(name?: string | null): string {
212
225
  return nameInitials(name, '?', { maxLetters: 1 });
@@ -132,6 +132,7 @@ export {
132
132
  formatLargeNumber,
133
133
  formatAbbreviatedNumber,
134
134
  nameInitials,
135
+ personFirstName,
135
136
  personInitials,
136
137
  singleInitial,
137
138
  formatDurationMMSS,
@@ -108,6 +108,7 @@ const BUILDERS: Record<string, (ids: string[], base: string) => string> = {
108
108
  // the related-content rail + author page), entry-shaped rows.
109
109
  what_i_shipped: (ids, b) => `${b}/api/what-i-shipped?ids=${ids.join(',')}&limit=${ids.length}`,
110
110
  how_i_work: (ids, b) => `${b}/api/how-i-work?ids=${ids.join(',')}&limit=${ids.length}`,
111
+ ai_prompt: (ids, b) => `${b}/api/prompts?ids=${ids.join(',')}&limit=${ids.length}`,
111
112
  // Product-hub internal objects — per-object card-hydration routes
112
113
  // (ChatRef-shaped items, `handleEntityCardList`), like github / slack.
113
114
  design_doc: (ids, b) => `${b}/api/design-docs?ids=${ids.join(',')}`,
@@ -73,6 +73,7 @@ export const SOURCE_ICON_NAMES: Record<string, string> = {
73
73
  // People-hub employee content
74
74
  'what-i-shipped': 'package',
75
75
  'how-i-work': 'book-open',
76
+ 'ai-prompts': 'message-square',
76
77
 
77
78
  // Product-hub internal
78
79
  'design-docs': 'file-text',
@@ -153,6 +154,7 @@ export const SOURCE_LABELS_BY_TABLE: Record<string, string> = {
153
154
  // People-hub employee content
154
155
  'what-i-shipped': 'What I Shipped',
155
156
  'how-i-work': 'How I Work',
157
+ 'ai-prompts': 'Squawkbox',
156
158
 
157
159
  // Product-hub internal
158
160
  'design-docs': 'Design Docs',
@@ -235,6 +237,7 @@ export const DEFAULT_DOCUMENT_TYPE_TO_TABLE_ID: Record<string, string> = {
235
237
  // People-hub employee content
236
238
  what_i_shipped: 'what-i-shipped',
237
239
  how_i_work: 'how-i-work',
240
+ ai_prompt: 'ai-prompts',
238
241
 
239
242
  // Product-hub internal
240
243
  design_doc: 'design-docs',